You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Question__AddOrEdit__ind...

1395 lines
2.8 MiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(self.webpackChunk=self.webpackChunk||[]).push([[6913],{35323:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return be}});var rt=$e(5891),St=$e(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"},Re=ie,je=$e(88853),ve=function(ye,we){return St.createElement(je.Z,(0,rt.Z)({},ye,{ref:we,icon:Re}))},ce=St.forwardRef(ve),be=ce},19155:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return be}});var rt=$e(5891),St=$e(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"},Re=ie,je=$e(88853),ve=function(ye,we){return St.createElement(je.Z,(0,rt.Z)({},ye,{ref:we,icon:Re}))},ce=St.forwardRef(ve),be=ce},10402:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return be}});var rt=$e(5891),St=$e(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"},Re=ie,je=$e(88853),ve=function(ye,we){return St.createElement(je.Z,(0,rt.Z)({},ye,{ref:we,icon:Re}))},ce=St.forwardRef(ve),be=ce},2377:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return be}});var rt=$e(5891),St=$e(59301),ie={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z"}}]},name:"close-circle",theme:"outlined"},Re=ie,je=$e(88853),ve=function(ye,we){return St.createElement(je.Z,(0,rt.Z)({},ye,{ref:we,icon:Re}))},ce=St.forwardRef(ve),be=ce},72295:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return be}});var rt=$e(5891),St=$e(59301),ie={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},Re=ie,je=$e(88853),ve=function(ye,we){return St.createElement(je.Z,(0,rt.Z)({},ye,{ref:we,icon:Re}))},ce=St.forwardRef(ve),be=ce},93343:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return be}});var rt=$e(5891),St=$e(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"},Re=ie,je=$e(88853),ve=function(ye,we){return St.createElement(je.Z,(0,rt.Z)({},ye,{ref:we,icon:Re}))},ce=St.forwardRef(ve),be=ce},24566:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return be}});var rt=$e(5891),St=$e(59301),ie={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},Re=ie,je=$e(88853),ve=function(ye,we){return St.createElement(je.Z,(0,rt.Z)({},ye,{ref:we,icon:Re}))},ce=St.forwardRef(ve),be=ce},61441:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return be}});var rt=$e(5891),St=$e(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"},Re=ie,je=$e(88853),ve=function(ye,we){return St.createElement(je.Z,(0,rt.Z)({},ye,{ref:we,icon:Re}))},ce=St.forwardRef(ve),be=ce},30631:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return be}});var rt=$e(5891),St=$e(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"},Re=ie,je=$e(88853),ve=function(ye,we){return St.createElement(je.Z,(0,rt.Z)({},ye,{ref:we,icon:Re}))},ce=St.forwardRef(ve),be=ce},43971:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return be}});var rt=$e(5891),St=$e(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"},Re=ie,je=$e(88853),ve=function(ye,we){return St.createElement(je.Z,(0,rt.Z)({},ye,{ref:we,icon:Re}))},ce=St.forwardRef(ve),be=ce},58358:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return be}});var rt=$e(5891),St=$e(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"},Re=ie,je=$e(88853),ve=function(ye,we){return St.createElement(je.Z,(0,rt.Z)({},ye,{ref:we,icon:Re}))},ce=St.forwardRef(ve),be=ce},44757:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return be}});var rt=$e(5891),St=$e(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"},Re=ie,je=$e(88853),ve=function(ye,we){return St.createElement(je.Z,(0,rt.Z)({},ye,{ref:we,icon:Re}))},ce=St.forwardRef(ve),be=ce},16537:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return be}});var rt=$e(5891),St=$e(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"},Re=ie,je=$e(88853),ve=function(ye,we){return St.createElement(je.Z,(0,rt.Z)({},ye,{ref:we,icon:Re}))},ce=St.forwardRef(ve),be=ce},77042:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return be}});var rt=$e(5891),St=$e(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"},Re=ie,je=$e(88853),ve=function(ye,we){return St.createElement(je.Z,(0,rt.Z)({},ye,{ref:we,icon:Re}))},ce=St.forwardRef(ve),be=ce},5527:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return be}});var rt=$e(5891),St=$e(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"},Re=ie,je=$e(88853),ve=function(ye,we){return St.createElement(je.Z,(0,rt.Z)({},ye,{ref:we,icon:Re}))},ce=St.forwardRef(ve),be=ce},15962:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return be}});var rt=$e(5891),St=$e(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"},Re=ie,je=$e(88853),ve=function(ye,we){return St.createElement(je.Z,(0,rt.Z)({},ye,{ref:we,icon:Re}))},ce=St.forwardRef(ve),be=ce},86902:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return be}});var rt=$e(5891),St=$e(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"},Re=ie,je=$e(88853),ve=function(ye,we){return St.createElement(je.Z,(0,rt.Z)({},ye,{ref:we,icon:Re}))},ce=St.forwardRef(ve),be=ce},53878:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return be}});var rt=$e(5891),St=$e(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"},Re=ie,je=$e(88853),ve=function(ye,we){return St.createElement(je.Z,(0,rt.Z)({},ye,{ref:we,icon:Re}))},ce=St.forwardRef(ve),be=ce},21970:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return be}});var rt=$e(5891),St=$e(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"},Re=ie,je=$e(88853),ve=function(ye,we){return St.createElement(je.Z,(0,rt.Z)({},ye,{ref:we,icon:Re}))},ce=St.forwardRef(ve),be=ce},79906:function(){"use strict"},93938:function(bn,ln){"use strict";ln.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},7543:function(){"use strict"},37404:function(){"use strict";function bn(fe,z,ee,ae){ee===void 0&&(ee=0),ae===void 0&&(ae=1/0),this._name=fe,this._defaultValue=z,this._minimum=ee,this._maximum=ae}Object.defineProperty(bn.prototype,"name",{get:function(){return this._name},set:function(fe){if(typeof fe!="string"||fe==="")throw new Error("Shape name must be a valid string.");this._name=fe}}),Object.defineProperty(bn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(fe){if(typeof fe!="number"||isNaN(fe))throw new Error("The default value must be a real number, not: "+fe);this._defaultValue=fe}}),Object.defineProperty(bn.prototype,"minimum",{get:function(){return this._minimum},set:function(fe){if(typeof fe!="number"||isNaN(fe))throw new Error("Minimum must be a real number, not: "+fe);this._minimum=fe}}),Object.defineProperty(bn.prototype,"maximum",{get:function(){return this._maximum},set:function(fe){if(typeof fe!="number"||isNaN(fe))throw new Error("Maximum must be a real number, not: "+fe);this._maximum=fe}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(fe,z){var ee=go.Shape._FigureParameters[fe];return ee?ee[z]:null},go.Shape.setFigureParameter=function(fe,z,ee){if(!(ee instanceof bn))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 ae=go.Shape._FigureParameters[fe];ae||(ae=[],go.Shape._FigureParameters[fe]=ae),ae[z]=ee};var ln=[];function $e(fe,z){var ee=ln.pop();return ee===void 0?new go.Point(fe,z):(ee.x=fe,ee.y=z,ee)}function rt(){var fe=ln.pop();return fe===void 0?new go.Point:fe}function St(fe){ln.push(fe)}function ie(fe,z,ee,ae,re,le,ue,pe,Ee){Ee||(Ee=new go.Point);var Pe=fe-ee,Ie=re-ue,ke=NaN,Ae=NaN;if(Pe===0)if(Ie===0)fe===ee&&(ke=fe,Ae=z);else{var Oe=(le-pe)/Ie,Fe=le-Oe*re;ke=fe,Ae=Oe*ke+Fe}else if(Ie===0){var _e=(z-ae)/Pe,Ye=z-_e*fe;ke=re,Ae=_e*ke+Ye}else{var _e=(z-ae)/Pe,Oe=(le-pe)/Ie,Ye=z-_e*fe,Fe=le-Oe*re;ke=(Fe-Ye)/(_e-Oe),Ae=_e*ke+Ye}return Ee.x=ke,Ee.y=Ae,Ee}function Re(fe,z,ee,ae,re,le,ue,pe,Ee,Pe,Ie,ke,Ae,Oe){var Fe=1-Ee,_e=Ee,Ye=fe*Fe+ee*_e,ze=z*Fe+ae*_e,Xe=ee*Fe+re*_e,st=ae*Fe+le*_e,ht=re*Fe+ue*_e,ft=le*Fe+pe*_e,Lt=Ye*Fe+Xe*_e,et=ze*Fe+st*_e,it=Xe*Fe+ht*_e,xt=st*Fe+ft*_e,Et=Lt*Fe+it*_e,Mt=et*Fe+xt*_e;Pe.x=Ye,Pe.y=ze,Ie.x=Lt,Ie.y=et,ke.x=Et,ke.y=Mt,Ae.x=it,Ae.y=xt,Oe.x=ht,Oe.y=ft}var je=new go.Spot(.156,.156),ve=new go.Spot(.844,.844),ce=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new bn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=5),ae=Math.min(ae,z/3),ae=Math.min(ae,ee/3);var re=ae*ce,le=new go.Geometry().add(new go.PathFigure(ae,0,!0).add(new go.PathSegment(go.PathSegment.Line,z-ae,0)).add(new go.PathSegment(go.PathSegment.Bezier,z,ae,z-re,0,z,re)).add(new go.PathSegment(go.PathSegment.Line,z,ee-ae)).add(new go.PathSegment(go.PathSegment.Bezier,z-ae,ee,z,ee-re,z-re,ee)).add(new go.PathSegment(go.PathSegment.Line,ae,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ae,re,ee,0,ee-re)).add(new go.PathSegment(go.PathSegment.Line,0,ae)).add(new go.PathSegment(go.PathSegment.Bezier,ae,0,0,re,re,0).close()));return re>1&&(le.spot1=new go.Spot(0,0,re,re),le.spot2=new go.Spot(1,1,-re,-re)),le}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(fe,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(fe,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(fe,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(fe,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(fe,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(fe,z,ee){var ae=new go.Geometry(go.Geometry.Line);return ae.startX=0,ae.startY=ee/2,ae.endX=z,ae.endY=ee/2,ae}),go.Shape.defineFigureGenerator("LineV",function(fe,z,ee){var ae=new go.Geometry(go.Geometry.Line);return ae.startX=z/2,ae.startY=0,ae.endX=z/2,ae.endY=ee,ae}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(fe,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(fe,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(fe,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(fe,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(fe,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(fe,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(fe,z,ee){var ae=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(ae*z,(1-ae)*ee,!1).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*z,ae*ee)).add(new go.PathSegment(go.PathSegment.Move,ae*z,ae*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*z,(1-ae)*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(fe,z,ee){var ae=z/2,re=new go.Geometry().add(new go.PathFigure(z,z/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,ae,ae,ae,ae).close()));return re.spot1=je,re.spot2=ve,re.defaultStretch=go.GraphObject.Uniform,re}),go.Shape.defineFigureGenerator("Line1",function(fe,z,ee){var ae=new go.Geometry(go.Geometry.Line);return ae.startX=0,ae.startY=0,ae.endX=z,ae.endY=ee,ae}),go.Shape.defineFigureGenerator("Line2",function(fe,z,ee){var ae=new go.Geometry(go.Geometry.Line);return ae.startX=z,ae.startY=0,ae.endX=0,ae.endY=ee,ae}),go.Shape.defineFigureGenerator("Curve1",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,z,ee,ce*z,0,z,(1-ce)*ee)))}),go.Shape.defineFigureGenerator("Curve2",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,z,ee,0,ce*ee,(1-ce)*z,ee)))}),go.Shape.defineFigureGenerator("Curve3",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,z,ce*ee,ce*z,ee)))}),go.Shape.defineFigureGenerator("Curve4",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,(1-ce)*z,0,0,(1-ce)*ee)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(fe,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(fe,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(fe,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(fe,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 bn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;isNaN(ae)?ae=.1:ae<-1?ae=-1:ae>1&&(ae=1);var re=Math.abs(ae)*z;if(ae===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=ee,le}else{var le=new go.Geometry;return ae>0?le.add(new go.PathFigure(re,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-re,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z-re,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,re,ee).close())),re<z/2&&le.setSpots(re/z,0,(z-re)/z,1),le}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new bn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;isNaN(ae)?ae=10:ae<-z?ae=-z:ae>z&&(ae=z);var re=Math.abs(ae);if(ae===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=ee,le}else{var le=new go.Geometry;return ae>0?le.add(new go.PathFigure(re,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-re,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z-re,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,re,ee).close())),re<z/2&&le.setSpots(re/z,0,(z-re)/z,1),le}}),go.Shape.setFigureParameter("Trapezoid1",0,new bn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;isNaN(ae)?ae=.2:ae<.5?ae=-.5:ae>.5&&(ae=.5);var re=Math.abs(ae)*z;if(ae===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=ee,le}else{var le=new go.Geometry;return ae>0?le.add(new go.PathFigure(re,0).add(new go.PathSegment(go.PathSegment.Line,z-re,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-re,ee)).add(new go.PathSegment(go.PathSegment.Line,re,ee).close())),re<z/2&&le.setSpots(re/z,0,(z-re)/z,1),le}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new bn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;isNaN(ae)?ae=20:ae<-z?ae=-z/2:ae>z&&(ae=z/2);var re=Math.abs(ae);if(ae===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=ee,le}else{var le=new go.Geometry;return ae>0?le.add(new go.PathFigure(re,0).add(new go.PathSegment(go.PathSegment.Line,z-re,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-re,ee)).add(new go.PathSegment(go.PathSegment.Line,re,ee).close())),re<z/2&&le.setSpots(re/z,0,(z-re)/z,1),le}}),go.Shape.setFigureParameter("ManualOperation",0,new bn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;isNaN(ae)?ae=10:ae<-z?ae=-z/2:ae>z&&(ae=z/2);var re=Math.abs(ae);if(ae===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=ee,le}else{var le=new go.Geometry;return ae>0?le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-re,ee)).add(new go.PathSegment(go.PathSegment.Line,re,ee).close())):le.add(new go.PathFigure(re,0).add(new go.PathSegment(go.PathSegment.Line,z-re,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())),re<z/2&&le.setSpots(re/z,0,(z-re)/z,1),le}});var be=[];function Ce(){var fe=be.pop();return fe===void 0?[]:fe}function ye(fe){fe.length=0,be.push(fe)}function we(fe){for(var z=Ce(),ee=.5,ae=.5,re=Math.PI*1.5,le=0,ue=0;ue<fe;ue++)le=2*Math.PI/fe*ue+re,z[ue]=new go.Point(ae+ee*Math.cos(le),ae+ee*Math.sin(le));return z.push(z[0]),z}function me(fe){var z=xe(fe),ee=Ce();ee[0]=z[0];for(var ae=1,re=1;ae<z.length;ae+=2,re+=3)ee[re]=z[ae],ee[re+1]=z[ae],ee[re+2]=z[ae+1];return ye(z),ee}function xe(fe){for(var z=we(fe),ee=Ce(),ae=Math.floor(z.length/2),re=z.length-1,le=fe%2===0?2:1,ue=0;ue<re;ue++){var pe=z[ue],Ee=z[ue+1],Pe=z[(ae+ue-1)%re],Ie=z[(ae+ue+le)%re];ee[ue*2]=pe,ee[ue*2+1]=ie(pe.x,pe.y,Pe.x,Pe.y,Ee.x,Ee.y,Ie.x,Ie.y,new go.Point)}return ee[ee.length]=ee[0],ye(z),ee}go.Shape.defineFigureGenerator("Pentagon",function(fe,z,ee){var ae=we(5),re=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);re.add(le);for(var ue=1;ue<5;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),ye(ae),re.spot1=new go.Spot(.2,.22),re.spot2=new go.Spot(.8,.9),re}),go.Shape.defineFigureGenerator("Hexagon",function(fe,z,ee){var ae=we(6),re=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);re.add(le);for(var ue=1;ue<6;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),ye(ae),re.spot1=new go.Spot(.07,.25),re.spot2=new go.Spot(.93,.75),re}),go.Shape.defineFigureGenerator("Heptagon",function(fe,z,ee){var ae=we(7),re=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);re.add(le);for(var ue=1;ue<7;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),ye(ae),re.spot1=new go.Spot(.2,.15),re.spot2=new go.Spot(.8,.85),re}),go.Shape.defineFigureGenerator("Octagon",function(fe,z,ee){var ae=we(8),re=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);re.add(le);for(var ue=1;ue<8;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),ye(ae),re.spot1=new go.Spot(.15,.15),re.spot2=new go.Spot(.85,.85),re}),go.Shape.defineFigureGenerator("Nonagon",function(fe,z,ee){var ae=we(9),re=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);re.add(le);for(var ue=1;ue<9;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),ye(ae),re.spot1=new go.Spot(.17,.13),re.spot2=new go.Spot(.82,.82),re}),go.Shape.defineFigureGenerator("Decagon",function(fe,z,ee){var ae=we(10),re=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);re.add(le);for(var ue=1;ue<10;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),ye(ae),re.spot1=new go.Spot(.16,.16),re.spot2=new go.Spot(.84,.84),re}),go.Shape.defineFigureGenerator("Dodecagon",function(fe,z,ee){var ae=we(12),re=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);re.add(le);for(var ue=1;ue<12;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),ye(ae),re.spot1=new go.Spot(.16,.16),re.spot2=new go.Spot(.84,.84),re}),go.Shape.defineFigureGenerator("FivePointedStar",function(fe,z,ee){var ae=xe(5),re=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);re.add(le);for(var ue=1;ue<10;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),ye(ae),re.spot1=new go.Spot(.266,.333),re.spot2=new go.Spot(.733,.733),re}),go.Shape.defineFigureGenerator("SixPointedStar",function(fe,z,ee){var ae=xe(6),re=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);re.add(le);for(var ue=1;ue<12;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),ye(ae),re.spot1=new go.Spot(.17,.25),re.spot2=new go.Spot(.83,.75),re}),go.Shape.defineFigureGenerator("SevenPointedStar",function(fe,z,ee){var ae=xe(7),re=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);re.add(le);for(var ue=1;ue<14;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),ye(ae),re.spot1=new go.Spot(.222,.277),re.spot2=new go.Spot(.777,.666),re}),go.Shape.defineFigureGenerator("EightPointedStar",function(fe,z,ee){var ae=xe(8),re=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);re.add(le);for(var ue=1;ue<16;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),ye(ae),re.spot1=new go.Spot(.25,.25),re.spot2=new go.Spot(.75,.75),re}),go.Shape.defineFigureGenerator("NinePointedStar",function(fe,z,ee){var ae=xe(9),re=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);re.add(le);for(var ue=1;ue<18;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),ye(ae),re.spot1=new go.Spot(.222,.277),re.spot2=new go.Spot(.777,.666),re}),go.Shape.defineFigureGenerator("TenPointedStar",function(fe,z,ee){var ae=xe(10),re=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);re.add(le);for(var ue=1;ue<20;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),ye(ae),re.spot1=new go.Spot(.281,.261),re.spot2=new go.Spot(.723,.748),re}),go.Shape.defineFigureGenerator("FivePointedBurst",function(fe,z,ee){var ae=me(5),re=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);re.add(le);for(var ue=1;ue<ae.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,ae[ue+2].x*z,ae[ue+2].y*ee,ae[ue].x*z,ae[ue].y*ee,ae[ue+1].x*z,ae[ue+1].y*ee));return le.segments.last().close(),ye(ae),re.spot1=new go.Spot(.222,.277),re.spot2=new go.Spot(.777,.777),re}),go.Shape.defineFigureGenerator("SixPointedBurst",function(fe,z,ee){var ae=me(6),re=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);re.add(le);for(var ue=1;ue<ae.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,ae[ue+2].x*z,ae[ue+2].y*ee,ae[ue].x*z,ae[ue].y*ee,ae[ue+1].x*z,ae[ue+1].y*ee));return le.segments.last().close(),ye(ae),re.spot1=new go.Spot(.17,.222),re.spot2=new go.Spot(.833,.777),re}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(fe,z,ee){var ae=me(7),re=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);re.add(le);for(var ue=1;ue<ae.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,ae[ue+2].x*z,ae[ue+2].y*ee,ae[ue].x*z,ae[ue].y*ee,ae[ue+1].x*z,ae[ue+1].y*ee));return le.segments.last().close(),ye(ae),re.spot1=new go.Spot(.222,.222),re.spot2=new go.Spot(.777,.777),re}),go.Shape.defineFigureGenerator("EightPointedBurst",function(fe,z,ee){var ae=me(8),re=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);re.add(le);for(var ue=1;ue<ae.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,ae[ue+2].x*z,ae[ue+2].y*ee,ae[ue].x*z,ae[ue].y*ee,ae[ue+1].x*z,ae[ue+1].y*ee));return le.segments.last().close(),ye(ae),re.spot1=new go.Spot(.222,.222),re.spot2=new go.Spot(.777,.777),re}),go.Shape.defineFigureGenerator("NinePointedBurst",function(fe,z,ee){var ae=me(9),re=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);re.add(le);for(var ue=1;ue<ae.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,ae[ue+2].x*z,ae[ue+2].y*ee,ae[ue].x*z,ae[ue].y*ee,ae[ue+1].x*z,ae[ue+1].y*ee));return le.segments.last().close(),ye(ae),re.spot1=new go.Spot(.222,.222),re.spot2=new go.Spot(.777,.777),re}),go.Shape.defineFigureGenerator("TenPointedBurst",function(fe,z,ee){var ae=me(10),re=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);re.add(le);for(var ue=1;ue<ae.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,ae[ue+2].x*z,ae[ue+2].y*ee,ae[ue].x*z,ae[ue].y*ee,ae[ue+1].x*z,ae[ue+1].y*ee));return le.segments.last().close(),ye(ae),re.spot1=new go.Spot(.222,.222),re.spot2=new go.Spot(.777,.777),re}),go.Shape.setFigureParameter("FramedRectangle",0,new bn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new bn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(fe,z,ee){var ae=fe?fe.parameter1:NaN,re=fe?fe.parameter2:NaN;isNaN(ae)&&(ae=8),isNaN(re)&&(re=8);var le=new go.Geometry,ue=new go.PathFigure(0,0,!0);return le.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae<z/2&&re<ee/2&&(ue.add(new go.PathSegment(go.PathSegment.Move,ae,re)),ue.add(new go.PathSegment(go.PathSegment.Line,ae,ee-re)),ue.add(new go.PathSegment(go.PathSegment.Line,z-ae,ee-re)),ue.add(new go.PathSegment(go.PathSegment.Line,z-ae,re).close())),le.setSpots(0,0,1,1,ae,re,-ae,-re),le}),go.Shape.setFigureParameter("Ring",0,new bn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=8);var re=z/2,le=new go.Geometry,ue=new go.PathFigure(z,z/2,!0);le.add(ue),ue.add(new go.PathSegment(go.PathSegment.Arc,0,360,re,re,re,re).close());var pe=Math.max(re-ae,0);return pe>0&&(ue.add(new go.PathSegment(go.PathSegment.Move,z/2+pe,z/2)),ue.add(new go.PathSegment(go.PathSegment.Arc,0,-360,re,re,pe,pe).close())),le.spot1=je,le.spot2=ve,le.defaultStretch=go.GraphObject.Uniform,le}),go.Shape.defineFigureGenerator("Cloud",function(fe,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(fe,z,ee){var ae=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(ae*z,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*z,0)).add(new go.PathSegment(go.PathSegment.Line,z,ae*ee)).add(new go.PathSegment(go.PathSegment.Line,z,(1-ae)*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*z,ee)).add(new go.PathSegment(go.PathSegment.Line,ae*z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,(1-ae)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ae*ee).close())).setSpots(ae/2,ae/2,1-ae/2,1-ae/2)}),go.Shape.setFigureParameter("Pie",0,new bn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new bn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(fe,z,ee){var ae=fe?fe.parameter1:NaN,re=fe?fe.parameter2:NaN;isNaN(ae)&&(ae=0),isNaN(re)&&(re=315);var le=ae%360;le<0&&(le+=360);var ue=re%360,pe=Math.min(z,ee)/2;return new go.Geometry().add(new go.PathFigure(pe,pe).add(new go.PathSegment(go.PathSegment.Arc,le,ue,pe,pe,pe,pe).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(fe,z,ee){var ae=ce/Math.SQRT2*.5,re=Math.SQRT2/2,le=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(z,ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,re*z,le*ee,z,(1-ae)*ee,(re+ae)*z,(le+ae)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()))}),go.Shape.setFigureParameter("ThickCross",0,new bn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=30);var re=Math.min(ae,z)/2,le=z/2,ue=ee/2;return new go.Geometry().add(new go.PathFigure(le-re,0,!0).add(new go.PathSegment(go.PathSegment.Line,le+re,0)).add(new go.PathSegment(go.PathSegment.Line,le+re,ue-re)).add(new go.PathSegment(go.PathSegment.Line,z,ue-re)).add(new go.PathSegment(go.PathSegment.Line,z,ue+re)).add(new go.PathSegment(go.PathSegment.Line,le+re,ue+re)).add(new go.PathSegment(go.PathSegment.Line,le+re,ee)).add(new go.PathSegment(go.PathSegment.Line,le-re,ee)).add(new go.PathSegment(go.PathSegment.Line,le-re,ue+re)).add(new go.PathSegment(go.PathSegment.Line,0,ue+re)).add(new go.PathSegment(go.PathSegment.Line,0,ue-re)).add(new go.PathSegment(go.PathSegment.Line,le-re,ue-re).close()))}),go.Shape.setFigureParameter("ThinCross",0,new bn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=10);var re=Math.min(ae,z)/2,le=z/2,ue=ee/2;return new go.Geometry().add(new go.PathFigure(le-re,0,!0).add(new go.PathSegment(go.PathSegment.Line,le+re,0)).add(new go.PathSegment(go.PathSegment.Line,le+re,ue-re)).add(new go.PathSegment(go.PathSegment.Line,z,ue-re)).add(new go.PathSegment(go.PathSegment.Line,z,ue+re)).add(new go.PathSegment(go.PathSegment.Line,le+re,ue+re)).add(new go.PathSegment(go.PathSegment.Line,le+re,ee)).add(new go.PathSegment(go.PathSegment.Line,le-re,ee)).add(new go.PathSegment(go.PathSegment.Line,le-re,ue+re)).add(new go.PathSegment(go.PathSegment.Line,0,ue+re)).add(new go.PathSegment(go.PathSegment.Line,0,ue-re)).add(new go.PathSegment(go.PathSegment.Line,le-re,ue-re).close()))}),go.Shape.setFigureParameter("ThickX",0,new bn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;if((isNaN(ae)||ae<0)&&(ae=30),z===0||ee===0){var re=new go.Geometry(go.Geometry.Rectangle);return re.startX=0,re.startY=0,re.endX=z,re.endY=ee,re}else{var le=z/2,ue=ee/2,pe=Math.atan2(ee,z),Ee=ae-Math.min(Math.cos(pe)*ae/2,le),Pe=ae-Math.min(Math.sin(pe)*ae/2,ue),re=new go.Geometry,Ie=new go.PathFigure(Ee,0,!0);return re.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Line,le,.2*ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,z-Ee,0)),Ie.add(new go.PathSegment(go.PathSegment.Line,z,Pe)),Ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,ue)),Ie.add(new go.PathSegment(go.PathSegment.Line,z,ee-Pe)),Ie.add(new go.PathSegment(go.PathSegment.Line,z-Ee,ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,le,.8*ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,Ee,ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,0,ee-Pe)),Ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,ue)),Ie.add(new go.PathSegment(go.PathSegment.Line,0,Pe).close()),re}}),go.Shape.setFigureParameter("ThinX",0,new bn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=10);var re=new go.Geometry,le=new go.PathFigure(.1*z,0,!0);return re.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee).close()),re}),go.Shape.setFigureParameter("SquareIBeam",0,new bn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;isNaN(ae)&&(ae=.2);var re=new go.Geometry,le=new go.PathFigure(0,0,!0);return re.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ae*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(.5+ae/2)*z,ae*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(.5+ae/2)*z,(1-ae)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,(1-ae)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,(1-ae)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(.5-ae/2)*z,(1-ae)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(.5-ae/2)*z,ae*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ae*ee).close()),re}),go.Shape.setFigureParameter("RoundedIBeam",0,new bn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;isNaN(ae)&&(ae=.5);var re=new go.Geometry,le=new go.PathFigure(0,0,!0);return re.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,ee,Math.abs(1-ae)*z,.25*ee,Math.abs(1-ae)*z,.75*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ae*z,.75*ee,ae*z,.25*ee).close()),re}),go.Shape.defineFigureGenerator("HalfEllipse",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,ce*z,0,z,(.5-ce/2)*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,z,(.5+ce/2)*ee,ce*z,ee).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(fe,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(fe,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(fe,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(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.4*z,.6*ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,.15*z,ee,.5*z,.75*ee,.45*z,.95*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.85*z,ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.6*z,.6*ee,.55*z,.95*ee,.5*z,.75*ee));var le=.2,ue=.3,pe=0,Ee=le*ce;return re.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5+le+pe)*ee,(.5-le+ue)*z,(.5+Ee+pe)*ee,(.5-Ee+ue)*z,(.5+le+pe)*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+le+ue)*z,(.5+pe)*ee,(.5+Ee+ue)*z,(.5+le+pe)*ee,(.5+le+ue)*z,(.5+Ee+pe)*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5-le+pe)*ee,(1-.5+le+ue)*z,(.5-Ee+pe)*ee,(.5+Ee+ue)*z,(.5-le+pe)*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.65*z,.36771243*ee,(.5-Ee+ue)*z,(.5-le+pe)*ee,(.5-le+ue+.05)*z,(.5-Ee+pe-.02)*ee)),le=.2,ue=0,pe=-.3,Ee=le*ce,re.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+le+ue)*z,(.5+pe)*ee,(.5+Ee+ue)*z,(.5+le+pe)*ee,(.5+le+ue)*z,(.5+Ee+pe)*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5-le+pe)*ee,(1-.5+le+ue)*z,(.5-Ee+pe)*ee,(.5+Ee+ue)*z,(.5-le+pe)*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,(.5-le+ue)*z,(.5+pe)*ee,(.5-Ee+ue)*z,(.5-le+pe)*ee,(.5-le+ue)*z,(.5-Ee+pe)*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Ee+ue)*z,(.5+le+pe)*ee,(.5-le+ue)*z,(.5+Ee+pe)*ee,(.5-Ee+ue)*z,(.5+le+pe)*ee)),le=.2,ue=-.3,pe=0,Ee=le*ce,re.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5-le+pe)*ee,(1-.5+le+ue-.05)*z,(.5-Ee+pe-.02)*ee,(.5+Ee+ue)*z,(.5-le+pe)*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,(.5-le+ue)*z,(.5+pe)*ee,(.5-Ee+ue)*z,(.5-le+pe)*ee,(.5-le+ue)*z,(.5-Ee+pe)*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5+le+pe)*ee,(.5-le+ue)*z,(.5+Ee+pe)*ee,(.5-Ee+ue)*z,(.5+le+pe)*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,.6*ee,(.5+Ee+ue)*z,(.5+le+pe)*ee,(.5+le+ue)*z,(.5+Ee+pe)*ee).close()),ae.setSpots(.06,.33,.93,.68),ae}),go.Shape.defineFigureGenerator("YinYang",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z*.5,0,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Arc,270,180,z*.5,z*.5,z*.5,z*.5)),re.add(new go.PathSegment(go.PathSegment.Arc,90,-180,z*.5,z*.75,z*.25,z*.25)),re.add(new go.PathSegment(go.PathSegment.Arc,90,180,z*.5,z*.25,z*.25,z*.25));var le=.1,ue=.5,pe=.25;return re.add(new go.PathSegment(go.PathSegment.Move,(ue+le)*z,pe*ee)),re.add(new go.PathSegment(go.PathSegment.Arc,0,-360,z*ue,ee*pe,le*z,le*z).close()),re=new go.PathFigure(z*.5,0,!1),ae.add(re),re.add(new go.PathSegment(go.PathSegment.Arc,270,-180,z*.5,z*.5,z*.5,z*.5)),pe=.75,re=new go.PathFigure((ue+le)*z,pe*ee,!0),ae.add(re),re.add(new go.PathSegment(go.PathSegment.Arc,0,360,z*ue,ee*pe,le*z,le*z).close()),ae.defaultStretch=go.GraphObject.Uniform,ae}),go.Shape.defineFigureGenerator("Peace",function(fe,z,ee){var ae=.8535533905932737,re=.5*z,le=.5*ee;return new go.Geometry().add(new go.PathFigure(re,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,re,le,re,le)).add(new go.PathSegment(go.PathSegment.Line,re,ee)).add(new go.PathSegment(go.PathSegment.Move,re,le)).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*z,ae*ee)).add(new go.PathSegment(go.PathSegment.Move,re,le)).add(new go.PathSegment(go.PathSegment.Line,ae*z,ae*ee)))}),go.Shape.defineFigureGenerator("NotAllowed",function(fe,z,ee){var ae=new go.Geometry,re=ce*.5,le=.5,ue=.5,pe=.5,Ee=new go.PathFigure(ue*z,(pe-le)*ee);ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,pe*ee,(ue-re)*z,(pe-le)*ee,(ue-le)*z,(pe-re)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+le)*ee,(ue-le)*z,(pe+re)*ee,(ue-re)*z,(pe+le)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,pe*ee,(ue+re)*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-le)*ee,(ue+le)*z,(pe-re)*ee,(ue+re)*z,(pe-le)*ee)),le=.4,re=ce*.4;var Pe=rt(),Ie=rt(),ke=rt(),Ae=rt();Re(ue,pe-le,ue+re,pe-le,ue+le,pe-re,ue+le,pe,.42,Pe,Ie,ke,Ae,Ae);var Oe=rt(),Fe=rt(),_e=rt();Re(ue,pe-le,ue+re,pe-le,ue+le,pe-re,ue+le,pe,.58,Ae,Ae,_e,Oe,Fe);var Ye=rt(),ze=rt(),Xe=rt();Re(ue,pe+le,ue-re,pe+le,ue-le,pe+re,ue-le,pe,.42,Ye,ze,Xe,Ae,Ae);var st=rt(),ht=rt(),ft=rt();return Re(ue,pe+le,ue-re,pe+le,ue-le,pe+re,ue-le,pe,.58,Ae,Ae,ft,st,ht),Ee.add(new go.PathSegment(go.PathSegment.Move,ft.x*z,ft.y*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,pe*ee,st.x*z,st.y*ee,ht.x*z,ht.y*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-le)*ee,(ue-le)*z,(pe-re)*ee,(ue-re)*z,(pe-le)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,ke.x*z,ke.y*ee,Pe.x*z,Pe.y*ee,Ie.x*z,Ie.y*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,ft.x*z,ft.y*ee).close()),Ee.add(new go.PathSegment(go.PathSegment.Move,Xe.x*z,Xe.y*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,_e.x*z,_e.y*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,pe*ee,Oe.x*z,Oe.y*ee,Fe.x*z,Fe.y*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee,(ue+re)*z,(pe+le)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,Xe.x*z,Xe.y*ee,Ye.x*z,Ye.y*ee,ze.x*z,ze.y*ee).close()),St(Pe),St(Ie),St(ke),St(Ae),St(Oe),St(Fe),St(_e),St(Ye),St(ze),St(Xe),St(st),St(ht),St(ft),ae.defaultStretch=go.GraphObject.Uniform,ae}),go.Shape.defineFigureGenerator("Fragile",function(fe,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 bn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=30),ae>z&&(ae=z);var re=(z-ae)/2,le=re+ae;return new go.Geometry().add(new go.PathFigure(le,.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,re,.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(fe,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(fe,z,ee){var ae=new go.Geometry,re=ce*.4,le=.4,ue=.5,pe=.5,Ee=rt(),Pe=rt(),Ie=rt(),ke=rt(),Ae=new go.PathFigure((ue-le)*z,pe*ee,!1);ae.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-le)*ee,(ue-le)*z,(pe-re)*ee,(ue-re)*z,(pe-le)*ee)),Re(ue,pe-le,ue+re,pe-le,ue+le,pe-re,ue+le,pe,.44,Ie,ke,Pe,Ee,Ee),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Pe.x*z,Pe.y*ee,Ie.x*z,Ie.y*ee,ke.x*z,ke.y*ee));var Oe=$e(Pe.x,Pe.y);Re(ue,pe-le,ue+re,pe-le,ue+le,pe-re,ue+le,pe,.56,Ee,Ee,Pe,Ie,ke);var Fe=$e(Pe.x,Pe.y);Ae.add(new go.PathSegment(go.PathSegment.Line,(Oe.x*.1+.95*.9)*z,Oe.y*.1*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.85*z,Oe.y*.1*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.85*z,0)),Ae.add(new go.PathSegment(go.PathSegment.Line,z,0)),Ae.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,(Fe.x*.1+.9)*z,.15*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,(Fe.x*.1+.9)*z,(Fe.y*.1+.05*.9)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,Fe.x*z,Fe.y*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,pe*ee,Ie.x*z,Ie.y*ee,ke.x*z,ke.y*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee,(ue+re)*z,(pe+le)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,pe*ee,(ue-re)*z,(pe+le)*ee,(ue-le)*z,(pe+re)*ee)),le=.35,re=ce*.35;var _e=new go.PathFigure(ue*z,(pe-le)*ee,!1);ae.add(_e),_e.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,pe*ee,(ue-re)*z,(pe-le)*ee,(ue-le)*z,(pe-re)*ee)),_e.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+le)*ee,(ue-le)*z,(pe+re)*ee,(ue-re)*z,(pe+le)*ee)),_e.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,pe*ee,(ue+re)*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee)),_e.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-le)*ee,(ue+le)*z,(pe-re)*ee,(ue+re)*z,(pe-le)*ee));var Ye=new go.PathFigure((ue-le)*z,pe*ee,!1);return ae.add(Ye),St(Ee),St(Pe),St(Ie),St(ke),St(Oe),St(Fe),ae.spot1=new go.Spot(.202,.257),ae.spot2=new go.Spot(.792,.739),ae.defaultStretch=go.GraphObject.Uniform,ae}),go.Shape.defineFigureGenerator("GenderFemale",function(fe,z,ee){var ae=new go.Geometry,re=.375,le=0,ue=-.125,pe=re*ce,Ee=new go.PathFigure((.525+le)*z,(.5+re+ue)*ee,!1);ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+re+le)*z,(.5+ue)*ee,(.5+pe+le)*z,(.5+re+ue)*ee,(.5+re+le)*z,(.5+pe+ue)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5-re+ue)*ee,(1-.5+re+le)*z,(.5-pe+ue)*ee,(.5+pe+le)*z,(.5-re+ue)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(.5-re+le)*z,(.5+ue)*ee,(.5-pe+le)*z,(.5-re+ue)*ee,(.5-re+le)*z,(.5-pe+ue)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(.475+le)*z,(.5+re+ue)*ee,(.5-re+le)*z,(.5+pe+ue)*ee,(.5-pe+le)*z,(.5+re+ue)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.475*z,.85*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.425*z,.85*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.425*z,.9*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.475*z,.9*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.475*z,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.525*z,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.525*z,.9*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.575*z,.9*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.575*z,.85*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.525*z,.85*ee).close()),re=.325,le=0,ue=-.125,pe=re*ce;var Ee=new go.PathFigure((1-.5+re+le)*z,(.5+ue)*ee,!1);ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5+re+ue)*ee,(.5+re+le)*z,(.5+pe+ue)*ee,(.5+pe+le)*z,(.5+re+ue)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(.5-re+le)*z,(.5+ue)*ee,(.5-pe+le)*z,(.5+re+ue)*ee,(.5-re+le)*z,(.5+pe+ue)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5-re+ue)*ee,(.5-re+le)*z,(.5-pe+ue)*ee,(.5-pe+le)*z,(.5-re+ue)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+re+le)*z,(.5+ue)*ee,(.5+pe+le)*z,(.5-re+ue)*ee,(1-.5+re+le)*z,(.5-pe+ue)*ee));var Ee=new go.PathFigure((.525+le)*z,(.5+re+ue)*ee,!1);return ae.add(Ee),ae.spot1=new go.Spot(.232,.136),ae.spot2=new go.Spot(.682,.611),ae.defaultStretch=go.GraphObject.Uniform,ae}),go.Shape.defineFigureGenerator("LogicImplies",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;return isNaN(ae)&&(ae=.2),new go.Geometry().add(new go.PathFigure((1-ae)*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*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(fe,z,ee){var ae=fe?fe.parameter1:NaN;return isNaN(ae)&&(ae=.2),new go.Geometry().add(new go.PathFigure((1-ae)*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*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,ae*z,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,ae*z,ee))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(fe,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(fe,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(fe,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(fe,z,ee){var ae=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 ae.defaultStretch=go.GraphObject.Uniform,ae}),go.Shape.defineFigureGenerator("LogicTruth",function(fe,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(fe,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(fe,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(fe,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(fe,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(fe,z,ee){var ae=.5;return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,0,ae*ee)).add(new go.PathSegment(go.PathSegment.Arc,180,180,ae*z,ae*ee,ae*z,ae*ee)).add(new go.PathSegment(go.PathSegment.Line,z,ee))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(fe,z,ee){var ae=.5;return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,ae*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,180,ae*z,ae*ee,ae*z,ae*ee)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new bn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new bn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;isNaN(ae)&&(ae=.3);var re=fe?fe.parameter2:NaN;isNaN(re)&&(re=.3);var le=(1-ae)*z,ue=(.5-re/2)*ee,pe=(.5+re/2)*ee,Ee=new go.Geometry,Pe=new go.PathFigure(0,ue,!0);Ee.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,le,ue)),Pe.add(new go.PathSegment(go.PathSegment.Line,le,0)),Pe.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,le,ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,le,pe)),Pe.add(new go.PathSegment(go.PathSegment.Line,0,pe).close()),Ee.spot1=new go.Spot(0,ue/ee);var Ie=ie(0,pe/ee,1,pe/ee,le/z,1,1,.5,rt());return Ee.spot2=new go.Spot(Ie.x,Ie.y),St(Ie),Ee}),go.Shape.setFigureParameter("Arrow2",0,new bn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new bn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;isNaN(ae)&&(ae=30),ae>z&&(ae=z);var re=fe?fe.parameter2:NaN;isNaN(re)&&(re=30),re=Math.min(re,ee/2);var le=z-ae,ue=(ee-re)/2,pe=ue+re,Ee=new go.Geometry,Pe=new go.PathFigure(0,ue,!0);Ee.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,le,ue)),Pe.add(new go.PathSegment(go.PathSegment.Line,le,0)),Pe.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,le,ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,le,pe)),Pe.add(new go.PathSegment(go.PathSegment.Line,0,pe).close()),Ee.spot1=new go.Spot(0,ue/ee);var Ie=ie(0,pe/ee,1,pe/ee,le/z,1,1,.5,rt());return Ee.spot2=new go.Spot(Ie.x,Ie.y),St(Ie),Ee}),go.Shape.defineFigureGenerator("Chevron",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee).close()),ae}),go.Shape.defineFigureGenerator("DoubleArrow",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.3*z,.214*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,1*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.3*z,1*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.3*z,.786*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,1*ee).close()),ae}),go.Shape.setFigureParameter("DoubleEndArrow",0,new bn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;isNaN(ae)&&(ae=.3);var re=(.5-ae/2)*ee,le=(.5+ae/2)*ee,ue=new go.Geometry,pe=new go.PathFigure(z,.5*ee,!0);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),pe.add(new go.PathSegment(go.PathSegment.Line,.3*z,le)),pe.add(new go.PathSegment(go.PathSegment.Line,.3*z,ee)),pe.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),pe.add(new go.PathSegment(go.PathSegment.Line,.3*z,re)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,re)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close());var Ee=ie(0,.5,.3,0,0,re/ee,.1,re/ee,rt());return ue.spot1=new go.Spot(Ee.x,Ee.y),Ee=ie(.7,1,1,.5,0,le/ee,1,le/ee,Ee),ue.spot2=new go.Spot(Ee.x,Ee.y),St(Ee),ue}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new bn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new bn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;isNaN(ae)&&(ae=40);var re=fe?fe.parameter2:NaN;isNaN(re)&&(re=100);var le=(ee-ae)/2,ue=le+ae,pe=(ee-re)/2,Ee=pe+re;(ae>ee||re>ee)&&(re>ae?(ae=ae*ee/re,le=(ee-ae)/2,ue=le+ae,pe=0,Ee=ee):(le=0,ue=ee,pe=0,Ee=ee));var Pe=new go.Geometry,Ie=new go.PathFigure(z,.5*ee,!0);Pe.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,Ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,ue)),Ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,ue)),Ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,Ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,pe)),Ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,le)),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,pe).close());var ke=ie(0,.5,.3,pe/ee,0,le/ee,1,le/ee,rt());return Pe.spot1=new go.Spot(ke.x,ke.y),ke=ie(.7,Ee/ee,1,.5,0,ue/ee,1,ue/ee,ke),Pe.spot2=new go.Spot(ke.x,ke.y),St(ke),Pe}),go.Shape.setFigureParameter("IBeamArrow",0,new bn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;isNaN(ae)&&(ae=.3);var re=(.5-ae/2)*ee,le=(.5+ae/2)*ee,ue=new go.Geometry,pe=new go.PathFigure(z,.5*ee,!0);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,le)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),pe.add(new go.PathSegment(go.PathSegment.Line,0,ee)),pe.add(new go.PathSegment(go.PathSegment.Line,0,0)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,0)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,re)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,re)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ue.spot1=new go.Spot(0,re/ee);var Ee=ie(.7,1,1,.5,0,le/ee,1,le/ee,rt());return ue.spot2=new go.Spot(Ee.x,Ee.y),St(Ee),ue}),go.Shape.setFigureParameter("IBeamArrow2",0,new bn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new bn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;isNaN(ae)&&(ae=40);var re=fe?fe.parameter2:NaN;isNaN(re)&&(re=100);var le=(ee-ae)/2,ue=le+ae,pe=(ee-re)/2,Ee=pe+re;(ae>ee||re>ee)&&(re>ae?(ae=ae*ee/re,le=(ee-ae)/2,ue=le+ae,pe=0,Ee=ee):(le=0,ue=ee,pe=0,Ee=ee));var Pe=new go.Geometry,Ie=new go.PathFigure(z,.5*ee,!0);Pe.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,Ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,ue)),Ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,ue)),Ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,Ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,0,Ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,0,pe)),Ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,pe)),Ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,le)),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,pe).close()),Pe.spot1=new go.Spot(0,le/ee);var ke=ie(.7,Ee/ee,1,.5,0,ue/ee,1,ue/ee,rt());return Pe.spot2=new go.Spot(ke.x,ke.y),St(ke),Pe}),go.Shape.setFigureParameter("Pointer",0,new bn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;isNaN(ae)&&(ae=.1);var re=new go.Geometry,le=new go.PathFigure(z,.5*ee,!0);re.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,ae*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),re.spot1=new go.Spot(ae,.35);var ue=ie(.2,.65,1,.65,0,1,1,.5,rt());return re.spot2=new go.Spot(ue.x,ue.y),St(ue),re}),go.Shape.setFigureParameter("RoundedPointer",0,new bn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;isNaN(ae)&&(ae=.3);var re=new go.Geometry,le=new go.PathFigure(z,.5*ee,!0);re.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ae*z,.75*ee,ae*z,.25*ee).close()),re.spot1=new go.Spot(ae,.35);var ue=ie(0,.65,1,.65,0,1,1,.5,rt());return re.spot2=new go.Spot(ue.x,ue.y),St(ue),re}),go.Shape.setFigureParameter("SplitEndArrow",0,new bn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;isNaN(ae)&&(ae=.4);var re=(.5-ae/2)*ee,le=(.5+ae/2)*ee,ue=new go.Geometry,pe=new go.PathFigure(z,.5*ee,!0);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),pe.add(new go.PathSegment(go.PathSegment.Line,0,le)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,0,re)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,re)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ue.spot1=new go.Spot(.2,.3);var Ee=ie(.7,1,1,.5,0,le/ee,1,le/ee,rt());return ue.spot2=new go.Spot(Ee.x,Ee.y),St(Ee),ue}),go.Shape.setFigureParameter("SplitEndArrow2",0,new bn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;isNaN(ae)&&(ae=50);var re=(ee-ae)/2,le=re+ae;ae>ee&&(re=0,le=ee);var ue=new go.Geometry,pe=new go.PathFigure(z,.5*ee,!0);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),pe.add(new go.PathSegment(go.PathSegment.Line,0,le)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,0,re)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,re)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ue.spot1=new go.Spot(.2,re/ee);var Ee=ie(.7,1,1,.5,0,le/ee,1,le/ee,rt());return ue.spot2=new go.Spot(Ee.x,Ee.y),St(Ee),ue}),go.Shape.setFigureParameter("SquareArrow",0,new bn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;isNaN(ae)&&(ae=.7);var re=new go.Geometry,le=new go.PathFigure(z,.5*ee,!0);return re.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ae*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,0)),le.add(new go.PathSegment(go.PathSegment.Line,ae*z,0).close()),re.spot1=go.Spot.TopLeft,re.spot2=new go.Spot(ae,1),re}),go.Shape.defineFigureGenerator("Cone1",function(fe,z,ee){var ae=new go.Geometry,re=ce*.5,le=ce*.1,ue=new go.PathFigure(0,.9*ee,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.9+le)*ee,(.5+re)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-re)*z,ee,0,(.9+le)*ee).close()),ae.spot1=new go.Spot(.25,.5),ae.spot2=new go.Spot(.75,.97),ae}),go.Shape.defineFigureGenerator("Cone2",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,.9*ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,z,.9*ee,(1-.85/.9)*z,ee,.85/.9*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee).close());var le=new go.PathFigure(0,.9*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.9*ee,(1-.85/.9)*z,.8*ee,.85/.9*z,.8*ee)),ae.spot1=new go.Spot(.25,.5),ae.spot2=new go.Spot(.75,.82),ae}),go.Shape.defineFigureGenerator("Cube1",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.5*z,ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,.85*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,0,.15*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee).close());var le=new go.PathFigure(.5*z,ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.15*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.5*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),ae.spot1=new go.Spot(0,.3),ae.spot2=new go.Spot(.5,.85),ae}),go.Shape.defineFigureGenerator("Cube2",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,.3*ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.3*z,0).close());var le=new go.PathFigure(0,.3*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.7*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Move,.7*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),ae.spot1=new go.Spot(0,.3),ae.spot2=new go.Spot(.7,1),ae}),go.Shape.defineFigureGenerator("Cylinder1",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;isNaN(ae)&&(ae=5),ae=Math.min(ae,ee/3);var re=new go.Geometry,le=ce*.5,ue=new go.PathFigure(0,ae,!0);re.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,ce*ae,(.5-le)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,1*z,ae,(.5+le)*z,0,1*z,ce*ae)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee-ae)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,1*ee,1*z,ee-ce*ae,(.5+le)*z,1*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ae,(.5-le)*z,1*ee,0,ee-ce*ae)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ae));var pe=new go.PathFigure(z,ae,!1);return re.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,2*ae,1*z,2*ae-ce*ae,(.5+le)*z,2*ae)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,ae,(.5-le)*z,2*ae,0,2*ae-ce*ae)),re.spot1=new go.Spot(0,0,0,2*ae),re.spot2=new go.Spot(1,1),re}),go.Shape.defineFigureGenerator("Cylinder2",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;isNaN(ae)&&(ae=5),ae=Math.min(ae,ee/3);var re=new go.Geometry,le=ce*.5,ue=new go.PathFigure(0,ee-ae,!0);re.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,0,ae)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,ce*ae,(.5-le)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,ae,(.5+le)*z,0,z,ce*ae)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee-ae)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,ee-ce*ae,(.5+le)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ae,(.5-le)*z,ee,0,ee-ce*ae));var pe=new go.PathFigure(0,ee-ae,!1);return re.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee-2*ae,0,ee-ae-ce*ae,(.5-le)*z,ee-2*ae)),pe.add(new go.PathSegment(go.PathSegment.Bezier,z,ee-ae,(.5+le)*z,ee-2*ae,z,ee-ae-ce*ae)),re.spot1=new go.Spot(0,0),re.spot2=new go.Spot(1,1,0,-2*ae),re}),go.Shape.defineFigureGenerator("Cylinder3",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;isNaN(ae)&&(ae=5),ae=Math.min(ae,z/3);var re=new go.Geometry,le=ce*.5,ue=new go.PathFigure(ae,0,!0);re.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z-ae,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,z-ce*ae,0,z,(.5-le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z-ae,ee,z,(.5+le)*ee,z-ce*ae,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,ae,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,ce*ae,ee,0,(.5+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ae,0,0,(.5-le)*ee,ce*ae,0));var pe=new go.PathFigure(ae,0,!1);return re.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,2*ae,.5*ee,ae+ce*ae,0,2*ae,(.5-le)*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,ae,ee,2*ae,(.5+le)*ee,ae+ce*ae,ee)),re.spot1=new go.Spot(0,0,2*ae,0),re.spot2=new go.Spot(1,1),re}),go.Shape.defineFigureGenerator("Cylinder4",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;isNaN(ae)&&(ae=5),ae=Math.min(ae,z/3);var re=new go.Geometry,le=ce*.5,ue=new go.PathFigure(z-ae,0,!0);re.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,z-ce*ae,0,z,(.5-le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z-ae,ee,z,(.5+le)*ee,z-ce*ae,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,ae,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,ce*ae,ee,0,(.5+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ae,0,0,(.5-le)*ee,ce*ae,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z-ae,0));var pe=new go.PathFigure(z-ae,0,!1);return re.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,z-2*ae,.5*ee,z-ae-ce*ae,0,z-2*ae,(.5-le)*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,z-ae,ee,z-2*ae,(.5+le)*ee,z-ae-ce*ae,ee)),re.spot1=new go.Spot(0,0),re.spot2=new go.Spot(1,1,-2*ae,0),re}),go.Shape.defineFigureGenerator("Prism1",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.25*z,.25*ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var le=new go.PathFigure(.25*z,.25*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ae.spot1=new go.Spot(.408,.172),ae.spot2=new go.Spot(.833,.662),ae}),go.Shape.defineFigureGenerator("Prism2",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,.25*ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.75*z,.75*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var le=new go.PathFigure(0,ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),le.add(new go.PathSegment(go.PathSegment.Move,0,.25*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*ee)),ae.spot1=new go.Spot(.25,.5),ae.spot2=new go.Spot(.75,.75),ae}),go.Shape.defineFigureGenerator("Pyramid1",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.5*z,0,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,.75*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee).close());var le=new go.PathFigure(.5*z,0,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ae.spot1=new go.Spot(.25,.367),ae.spot2=new go.Spot(.75,.875),ae}),go.Shape.defineFigureGenerator("Pyramid2",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.5*z,0,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,.85*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee).close());var le=new go.PathFigure(.5*z,0,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.7*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.5*z,.7*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.85*ee)),ae.spot1=new go.Spot(.25,.367),ae.spot2=new go.Spot(.75,.875),ae}),go.Shape.defineFigureGenerator("Actor",function(fe,z,ee){var ae=new go.Geometry,re=.2,le=.1,ue=ce*re,pe=ce*le,Ee=.5,Pe=.1,Ie=new go.PathFigure(Ee*z,(Pe+le)*ee,!0);ae.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(Ee-re)*z,Pe*ee,(Ee-ue)*z,(Pe+le)*ee,(Ee-re)*z,(Pe+pe)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z,(Pe-le)*ee,(Ee-re)*z,(Pe-pe)*ee,(Ee-ue)*z,(Pe-le)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(Ee+re)*z,Pe*ee,(Ee+ue)*z,(Pe-le)*ee,(Ee+re)*z,(Pe-pe)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z,(Pe+le)*ee,(Ee+re)*z,(Pe+pe)*ee,(Ee+ue)*z,(Pe+le)*ee));var ke=.05,Ae=ce*ke;Ee=.05,Pe=.25;var Oe=new go.PathFigure(.5*z,.2*ee,!0);return ae.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Line,.95*z,.2*ee)),Ee=.95,Pe=.25,Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Ee+ke)*z,Pe*ee,(Ee+Ae)*z,(Pe-ke)*ee,(Ee+ke)*z,(Pe-Ae)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,z,.6*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.85*z,.35*ee)),ke=.025,Ae=ce*ke,Ee=.825,Pe=.35,Oe.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z,(Pe-ke)*ee,(Ee+ke)*z,(Pe-Ae)*ee,(Ee+Ae)*z,(Pe-ke)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Ee-ke)*z,Pe*ee,(Ee-Ae)*z,(Pe-ke)*ee,(Ee-ke)*z,(Pe-Ae)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.8*z,ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.55*z,ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.55*z,.7*ee)),ke=.05,Ae=ce*ke,Ee=.5,Pe=.7,Oe.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z,(Pe-ke)*ee,(Ee+ke)*z,(Pe-Ae)*ee,(Ee+Ae)*z,(Pe-ke)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Ee-ke)*z,Pe*ee,(Ee-Ae)*z,(Pe-ke)*ee,(Ee-ke)*z,(Pe-Ae)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.45*z,ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.2*z,.35*ee)),ke=.025,Ae=ce*ke,Ee=.175,Pe=.35,Oe.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z,(Pe-ke)*ee,(Ee+ke)*z,(Pe-Ae)*ee,(Ee+Ae)*z,(Pe-ke)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Ee-ke)*z,Pe*ee,(Ee-Ae)*z,(Pe-ke)*ee,(Ee-ke)*z,(Pe-Ae)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),ke=.05,Ae=ce*ke,Ee=.05,Pe=.25,Oe.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z,(Pe-ke)*ee,(Ee-ke)*z,(Pe-Ae)*ee,(Ee-Ae)*z,(Pe-ke)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.5*z,.2*ee)),ae.spot1=new go.Spot(.2,.2),ae.spot2=new go.Spot(.8,.65),ae}),go.Shape.setFigureParameter("Card",0,new bn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;isNaN(ae)&&(ae=.2);var re=new go.Geometry,le=new go.PathFigure(z,0,!0);return re.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ae*ee)),le.add(new go.PathSegment(go.PathSegment.Line,ae*z,0).close()),re.spot1=new go.Spot(0,ae),re.spot2=go.Spot.BottomRight,re}),go.Shape.defineFigureGenerator("Collate",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.5*z,.5*ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee));var le=new go.PathFigure(.5*z,.5*ee,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),ae.spot1=new go.Spot(.25,0),ae.spot2=new go.Spot(.75,.25),ae}),go.Shape.defineFigureGenerator("CreateRequest",function(fe,z,ee){var ae=new go.Geometry,re=fe?fe.parameter1:NaN;isNaN(re)&&(re=.1);var le=new go.PathFigure(0,0,!0);ae.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 ue=new go.PathFigure(0,re*ee,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,re*ee)),ue.add(new go.PathSegment(go.PathSegment.Move,0,(1-re)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,(1-re)*ee)),ae}),go.Shape.defineFigureGenerator("Database",function(fe,z,ee){var ae=new go.Geometry,re=ce*.5,le=ce*.1,ue=new go.PathFigure(z,.1*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.9+le)*ee,(.5+re)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-re)*z,ee,0,(.9+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,(.1-le)*ee,(.5-re)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*ee,(.5+re)*z,0,z,(.1-le)*ee));var pe=new go.PathFigure(z,.1*ee,!1);return ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*ee,z,(.1+le)*ee,(.5+re)*z,.2*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-re)*z,.2*ee,0,(.1+le)*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,z,.2*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*ee,z,(.2+le)*ee,(.5+re)*z,.3*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-re)*z,.3*ee,0,(.2+le)*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,z,.3*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.4*ee,z,(.3+le)*ee,(.5+re)*z,.4*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,(.5-re)*z,.4*ee,0,(.3+le)*ee)),ae.spot1=new go.Spot(0,.4),ae.spot2=new go.Spot(1,.9),ae}),go.Shape.defineFigureGenerator("DataStorage",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,ee,z,0,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.9*ee,.25*z,.1*ee).close()),ae.spot1=new go.Spot(.226,0),ae.spot2=new go.Spot(.81,1),ae}),go.Shape.defineFigureGenerator("DiskStorage",function(fe,z,ee){var ae=new go.Geometry,re=ce*.5,le=ce*.1,ue=new go.PathFigure(z,.1*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.9+le)*ee,(.5+re)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-re)*z,ee,0,(.9+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,(.1-le)*ee,(.5-re)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*ee,(.5+re)*z,0,z,(.1-le)*ee));var pe=new go.PathFigure(z,.1*ee,!1);return ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*ee,z,(.1+le)*ee,(.5+re)*z,.2*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-re)*z,.2*ee,0,(.1+le)*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,z,.2*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*ee,z,(.2+le)*ee,(.5+re)*z,.3*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-re)*z,.3*ee,0,(.2+le)*ee)),ae.spot1=new go.Spot(0,.3),ae.spot2=new go.Spot(1,.9),ae}),go.Shape.defineFigureGenerator("Display",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.25*z,0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,ee,z,0,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.25*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close()),ae.spot1=new go.Spot(.25,0),ae.spot2=new go.Spot(.75,1),ae}),go.Shape.defineFigureGenerator("DividedEvent",function(fe,z,ee){var ae=new go.Geometry,re=fe?fe.parameter1:NaN;isNaN(re)?re=.2:re<.15&&(re=.15);var le=ce*.2,ue=new go.PathFigure(0,.2*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,0,(.2-le)*ee,(.2-le)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.2*ee,(.8+le)*z,0,z,(.2-le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,ee,z,(.8+le)*ee,(.8+le)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*ee,(.2-le)*z,ee,0,(.8+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee));var pe=new go.PathFigure(0,re*ee,!1);return ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z,re*ee)),ae}),go.Shape.defineFigureGenerator("DividedProcess",function(fe,z,ee){var ae=new go.Geometry,re=fe?fe.parameter1:NaN;(isNaN(re)||re<.1)&&(re=.1);var le=new go.PathFigure(0,0,!0);ae.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 ue=new go.PathFigure(0,re*ee,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,re*ee)),ae}),go.Shape.defineFigureGenerator("Document",function(fe,z,ee){var ae=new go.Geometry;ee=ee/.8;var re=new go.PathFigure(0,.7*ee,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*z,.4*ee,.5*z,ee).close()),ae.spot1=go.Spot.TopLeft,ae.spot2=new go.Spot(1,.6),ae}),go.Shape.defineFigureGenerator("ExternalOrganization",function(fe,z,ee){var ae=new go.Geometry,re=fe?fe.parameter1:NaN;(isNaN(re)||re<.2)&&(re=.2);var le=new go.PathFigure(0,0,!0);ae.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 ue=new go.PathFigure(re*z,0,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,0,re*ee)),ue.add(new go.PathSegment(go.PathSegment.Move,z,re*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-re)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Move,0,(1-re)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,re*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Move,(1-re)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,(1-re)*ee)),ae}),go.Shape.defineFigureGenerator("ExternalProcess",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.5*z,0,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close());var le=new go.PathFigure(.1*z,.4*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.9*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.6*z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.4*z,.9*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,.9*ee)),ae.spot1=new go.Spot(.25,.25),ae.spot2=new go.Spot(.75,.75),ae}),go.Shape.defineFigureGenerator("File",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var le=new go.PathFigure(.75*z,0,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.75*z,.25*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),ae.spot1=new go.Spot(0,.25),ae.spot2=go.Spot.BottomRight,ae}),go.Shape.defineFigureGenerator("Interrupt",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z,.5*ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee));var le=new go.PathFigure(z,.5*ee,!1);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,ee));var ue=new go.PathFigure(z,.5*ee,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ae.spot1=new go.Spot(0,.25),ae.spot2=new go.Spot(.5,.75),ae}),go.Shape.defineFigureGenerator("InternalStorage",function(fe,z,ee){var ae=new go.Geometry,re=fe?fe.parameter1:NaN,le=fe?fe.parameter2:NaN;isNaN(re)&&(re=.1),isNaN(le)&&(le=.1);var ue=new go.PathFigure(0,0,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var pe=new go.PathFigure(re*z,0,!1);return ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,re*z,ee)),pe.add(new go.PathSegment(go.PathSegment.Move,0,le*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,z,le*ee)),ae}),go.Shape.defineFigureGenerator("Junction",function(fe,z,ee){var ae=new go.Geometry,re=1/Math.SQRT2,le=(1-1/Math.SQRT2)/2,ue=ce*.5,pe=.5,Ee=new go.PathFigure(z,pe*ee,!0);ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,pe*z,ee,z,(pe+ue)*ee,(pe+ue)*z,ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,pe*ee,(pe-ue)*z,ee,0,(pe+ue)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,pe*z,0,0,(pe-ue)*ee,(pe-ue)*z,0)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,z,pe*ee,(pe+ue)*z,0,z,(pe-ue)*ee));var Pe=new go.PathFigure((le+re)*z,(le+re)*ee,!1);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,le*z,le*ee)),Pe.add(new go.PathSegment(go.PathSegment.Move,le*z,(le+re)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,(le+re)*z,le*ee)),ae}),go.Shape.defineFigureGenerator("LinedDocument",function(fe,z,ee){var ae=new go.Geometry;ee=ee/.8;var re=new go.PathFigure(0,.7*ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*z,.4*ee,.5*z,ee).close());var le=new go.PathFigure(.1*z,0,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,.75*ee)),ae.spot1=new go.Spot(.1,0),ae.spot2=new go.Spot(1,.6),ae}),go.Shape.defineFigureGenerator("LoopLimit",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,ee,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.25*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee).close()),ae.spot1=new go.Spot(0,.25),ae.spot2=go.Spot.BottomRight,ae}),go.Shape.defineFigureGenerator("MagneticTape",function(fe,z,ee){var ae=new go.Geometry,re=ce*.5,le=.5,ue=new go.PathFigure(.5*z,ee,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,le*ee,(le-re)*z,ee,0,(le+re)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,le*z,0,0,(le-re)*ee,(le-re)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,le*ee,(le+re)*z,0,z,(le-re)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,(le+.1)*z,.9*ee,z,(le+re)*ee,(le+re)*z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ae.spot1=new go.Spot(.15,.15),ae.spot2=new go.Spot(.85,.8),ae}),go.Shape.defineFigureGenerator("ManualInput",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z,0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee).close()),ae.spot1=new go.Spot(0,.25),ae.spot2=go.Spot.BottomRight,ae}),go.Shape.defineFigureGenerator("MessageFromUser",function(fe,z,ee){var ae=new go.Geometry,re=fe?fe.parameter1:NaN;isNaN(re)&&(re=.7);var le=new go.PathFigure(0,0,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,re*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae.spot1=go.Spot.TopLeft,ae}),go.Shape.defineFigureGenerator("MicroformProcessing",function(fe,z,ee){var ae=new go.Geometry,re=fe?fe.parameter1:NaN;isNaN(re)&&(re=.25);var le=new go.PathFigure(0,0,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,re*ee)),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,.5*z,(1-re)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae}),go.Shape.defineFigureGenerator("MicroformRecording",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.75*z,.25*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.85*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.75*z,.75*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae.spot1=new go.Spot(0,.25),ae.spot2=new go.Spot(1,.75),ae}),go.Shape.defineFigureGenerator("MultiDocument",function(fe,z,ee){var ae=new go.Geometry;ee=ee/.8;var re=new go.PathFigure(z,0,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.44*ee,.96*z,.47*ee,.93*z,.45*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.9*z,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.54*ee,.86*z,.57*ee,.83*z,.55*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.8*z,.7*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.4*z,.4*ee,.4*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.1*z,.1*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.2*z,0).close());var le=new go.PathFigure(.1*z,.2*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.54*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.44*ee)),ae.spot1=new go.Spot(0,.25),ae.spot2=new go.Spot(.8,.77),ae}),go.Shape.defineFigureGenerator("MultiProcess",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.1*z,.1*ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.2*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.9*z,.9*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.8*z,.9*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.8*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*ee).close());var le=new go.PathFigure(.2*z,.1*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.1*z,.2*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.9*ee)),ae.spot1=new go.Spot(0,.2),ae.spot2=new go.Spot(.8,1),ae}),go.Shape.defineFigureGenerator("OfflineStorage",function(fe,z,ee){var ae=new go.Geometry,re=fe?fe.parameter1:NaN;isNaN(re)&&(re=.1);var le=1-re,ue=new go.PathFigure(0,0,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee).close());var pe=new go.PathFigure(.5*re*z,re*ee,!1);return ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,(1-.5*re)*z,re*ee)),ae}),go.Shape.defineFigureGenerator("OffPageConnector",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.75*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae.spot1=go.Spot.TopLeft,ae.spot2=new go.Spot(.75,1),ae}),go.Shape.defineFigureGenerator("Or",function(fe,z,ee){var ae=new go.Geometry,re=ce*.5,le=.5,ue=new go.PathFigure(z,le*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,le*z,ee,z,(le+re)*ee,(le+re)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,le*ee,(le-re)*z,ee,0,(le+re)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,le*z,0,0,(le-re)*ee,(le-re)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,le*ee,(le+re)*z,0,z,(le-re)*ee));var pe=new go.PathFigure(z,.5*ee,!1);return ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,.5*z,ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ae}),go.Shape.defineFigureGenerator("PaperTape",function(fe,z,ee){var ae=new go.Geometry;ee=ee/.8;var re=new go.PathFigure(0,.7*ee,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,.3*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,z,.3*ee,.5*z,.6*ee,.5*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*z,.4*ee,.5*z,ee).close()),ae.spot1=new go.Spot(0,.49),ae.spot2=new go.Spot(1,.75),ae}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(fe,z,ee){var ae=new go.Geometry,re=fe?fe.parameter1:NaN,le=fe?fe.parameter2:NaN;isNaN(re)&&(re=.1),isNaN(le)&&(le=.3);var ue=new go.PathFigure(0,0,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-le)*z,.5*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(fe,z,ee){var ae=new go.Geometry,re=fe?fe.parameter1:NaN,le=fe?fe.parameter2:NaN;isNaN(re)&&(re=.1),isNaN(le)&&(le=.3);var ue=new go.PathFigure(0,0,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,(1-le)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-le)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae}),go.Shape.defineFigureGenerator("Procedure",function(fe,z,ee){var ae=new go.Geometry,re=fe?fe.parameter1:NaN;isNaN(re)&&(re=.1);var le=new go.PathFigure(0,0,!0);ae.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 ue=new go.PathFigure((1-re)*z,0,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,(1-re)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Move,re*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,re*z,ee)),ae}),go.Shape.defineFigureGenerator("Process",function(fe,z,ee){var ae=new go.Geometry,re=fe?fe.parameter1:NaN;isNaN(re)&&(re=.1);var le=new go.PathFigure(0,0,!0);ae.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 ue=new go.PathFigure(re*z,0,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,re*z,ee)),ae.spot2=go.Spot.BottomRight,ae}),go.Shape.defineFigureGenerator("Sort",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.5*z,0,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close());var le=new go.PathFigure(0,.5*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ae.spot1=new go.Spot(.25,.25),ae.spot2=new go.Spot(.75,.5),ae}),go.Shape.defineFigureGenerator("Start",function(fe,z,ee){var ae=new go.Geometry,re=fe?fe.parameter1:NaN;isNaN(re)&&(re=.25);var le=new go.PathFigure(re*z,0,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*z,.5*ee,.25*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*z,.5*ee,.25*z,.5*ee));var ue=new go.PathFigure(re*z,0,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,re*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Move,(1-re)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-re)*z,ee)),ae.spot1=new go.Spot(re,0),ae.spot2=new go.Spot(1-re,1),ae}),go.Shape.defineFigureGenerator("Terminator",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.25*z,0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*z,.5*ee,.25*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*z,.5*ee,.25*z,.5*ee)),ae.spot1=new go.Spot(.23,0),ae.spot2=new go.Spot(.77,1),ae}),go.Shape.defineFigureGenerator("TransmittalTape",function(fe,z,ee){var ae=new go.Geometry,re=fe?fe.parameter1:NaN;isNaN(re)&&(re=.1);var le=new go.PathFigure(0,0,!0);return ae.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,.75*z,(1-re)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,(1-re)*ee).close()),ae.spot1=go.Spot.TopLeft,ae}),go.Shape.defineFigureGenerator("AndGate",function(fe,z,ee){var ae=new go.Geometry,re=ce*.5,le=new go.PathFigure(0,0,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,(.5+re)*z,0,z,(.5-re)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.5+re)*ee,(.5+re)*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae.spot1=go.Spot.TopLeft,ae.spot2=new go.Spot(.55,1),ae}),go.Shape.defineFigureGenerator("Buffer",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae.spot1=new go.Spot(0,.25),ae.spot2=new go.Spot(.5,.75),ae}),go.Shape.defineFigureGenerator("Clock",function(fe,z,ee){var ae=new go.Geometry,re=ce*.5,le=.5,ue=new go.PathFigure(z,le*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,le*z,ee,z,(le+re)*ee,(le+re)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,le*ee,(le-re)*z,ee,0,(le+re)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,le*z,0,0,(le-re)*ee,(le-re)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,le*ee,(le+re)*z,0,z,(le-re)*ee));var pe=new go.PathFigure(z,le*ee,!1);ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z,le*ee));var Ee=new go.PathFigure(.8*z,.75*ee,!1);return ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,.8*z,.25*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.6*z,.25*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.6*z,.75*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.4*z,.75*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.4*z,.25*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.2*z,.25*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.2*z,.75*ee)),ae}),go.Shape.defineFigureGenerator("Ground",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.5*z,0,!1);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*ee)),re.add(new go.PathSegment(go.PathSegment.Move,.2*z,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.8*z,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Move,.3*z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.7*z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Move,.4*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.6*z,ee)),ae}),go.Shape.defineFigureGenerator("Inverter",function(fe,z,ee){var ae=new go.Geometry,re=ce*.1,le=.1,ue=.9,pe=.5,Ee=new go.PathFigure(.8*z,.5*ee,!0);ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,0,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,0,0)),Ee.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*ee));var Pe=new go.PathFigure((ue+le)*z,pe*ee,!0);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee,(ue+re)*z,(pe+le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,pe*ee,(ue-re)*z,(pe+le)*ee,(ue-le)*z,(pe+re)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-le)*ee,(ue-le)*z,(pe-re)*ee,(ue-re)*z,(pe-le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,pe*ee,(ue+re)*z,(pe-le)*ee,(ue+le)*z,(pe-re)*ee)),ae.spot1=new go.Spot(0,.25),ae.spot2=new go.Spot(.4,.75),ae}),go.Shape.defineFigureGenerator("NandGate",function(fe,z,ee){var ae=new go.Geometry,re=ce*.5,le=ce*.4,ue=ce*.1,pe=.1,Ee=.9,Pe=.5,Ie=new go.PathFigure(.8*z,.5*ee,!0);ae.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,ee,.8*z,(.5+le)*ee,(.4+re)*z,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,.4*z,0)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*ee,(.4+re)*z,0,.8*z,(.5-le)*ee));var ke=new go.PathFigure((Ee+pe)*z,Pe*ee,!0);return ae.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z,(Pe+pe)*ee,(Ee+pe)*z,(Pe+ue)*ee,(Ee+ue)*z,(Pe+pe)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(Ee-pe)*z,Pe*ee,(Ee-ue)*z,(Pe+pe)*ee,(Ee-pe)*z,(Pe+ue)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z,(Pe-pe)*ee,(Ee-pe)*z,(Pe-ue)*ee,(Ee-ue)*z,(Pe-pe)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(Ee+pe)*z,Pe*ee,(Ee+ue)*z,(Pe-pe)*ee,(Ee+pe)*z,(Pe-ue)*ee)),ae.spot1=new go.Spot(0,.05),ae.spot2=new go.Spot(.55,.95),ae}),go.Shape.defineFigureGenerator("NorGate",function(fe,z,ee){var ae=new go.Geometry,re=.5,le=ce*re,ue=0,pe=.5,Ee=new go.PathFigure(.8*z,.5*ee,!0);ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.7*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.75*ee,.25*z,.25*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*ee,(ue+le)*z,(pe-re)*ee,.7*z,(pe-le)*ee)),re=.1,le=ce*.1,ue=.9,pe=.5;var Pe=new go.PathFigure((ue-re)*z,pe*ee,!0);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-re)*ee,(ue-re)*z,(pe-le)*ee,(ue-le)*z,(pe-re)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+re)*z,pe*ee,(ue+le)*z,(pe-re)*ee,(ue+re)*z,(pe-le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+re)*ee,(ue+re)*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-re)*z,pe*ee,(ue-le)*z,(pe+re)*ee,(ue-re)*z,(pe+le)*ee)),ae.spot1=new go.Spot(.2,.25),ae.spot2=new go.Spot(.6,.75),ae}),go.Shape.defineFigureGenerator("OrGate",function(fe,z,ee){var ae=new go.Geometry,re=.5,le=ce*re,ue=0,pe=.5,Ee=new go.PathFigure(0,0,!0);return ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,(ue+le+le)*z,(pe-re)*ee,.8*z,(pe-le)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.8*z,(pe+le)*ee,(ue+le+le)*z,(pe+re)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.75*ee,.25*z,.25*ee).close()),ae.spot1=new go.Spot(.2,.25),ae.spot2=new go.Spot(.75,.75),ae}),go.Shape.defineFigureGenerator("XnorGate",function(fe,z,ee){var ae=new go.Geometry,re=.5,le=ce*re,ue=.2,pe=.5,Ee=new go.PathFigure(.1*z,0,!1);ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,ee,.35*z,.25*ee,.35*z,.75*ee));var Pe=new go.PathFigure(.8*z,.5*ee,!0);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,ee,.7*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,.45*z,.75*ee,.45*z,.25*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*ee,(ue+le)*z,(pe-re)*ee,.7*z,(pe-le)*ee)),re=.1,le=ce*.1,ue=.9,pe=.5;var Ie=new go.PathFigure((ue-re)*z,pe*ee,!0);return ae.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-re)*ee,(ue-re)*z,(pe-le)*ee,(ue-le)*z,(pe-re)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(ue+re)*z,pe*ee,(ue+le)*z,(pe-re)*ee,(ue+re)*z,(pe-le)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+re)*ee,(ue+re)*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(ue-re)*z,pe*ee,(ue-le)*z,(pe+re)*ee,(ue-re)*z,(pe+le)*ee)),ae.spot1=new go.Spot(.4,.25),ae.spot2=new go.Spot(.65,.75),ae}),go.Shape.defineFigureGenerator("XorGate",function(fe,z,ee){var ae=new go.Geometry,re=.5,le=ce*re,ue=.2,pe=.5,Ee=new go.PathFigure(.1*z,0,!1);ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,ee,.35*z,.25*ee,.35*z,.75*ee));var Pe=new go.PathFigure(.2*z,0,!0);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,(ue+le)*z,(pe-re)*ee,.9*z,(pe-le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,ee,.9*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,.45*z,.75*ee,.45*z,.25*ee).close()),ae.spot1=new go.Spot(.4,.25),ae.spot2=new go.Spot(.8,.75),ae}),go.Shape.defineFigureGenerator("Capacitor",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!1);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Move,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ae}),go.Shape.defineFigureGenerator("Resistor",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,.5*ee,!1);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.1*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.4*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.6*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.7*z,.5*ee)),ae}),go.Shape.defineFigureGenerator("Inductor",function(fe,z,ee){var ae=new go.Geometry,re=ce*.1,le=.1,ue=.1,pe=.5,Ee=new go.PathFigure((ue-re*.5)*z,ee,!1);return ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,0,(ue-re)*z,ee,(ue-le)*z,0)),ue=.3,Ee.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,ee,(ue+le)*z,0,(ue+re)*z,ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,0,(ue-re)*z,ee,(ue-le)*z,0)),ue=.5,Ee.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,ee,(ue+le)*z,0,(ue+re)*z,ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,0,(ue-re)*z,ee,(ue-le)*z,0)),ue=.7,Ee.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,ee,(ue+le)*z,0,(ue+re)*z,ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,0,(ue-re)*z,ee,(ue-le)*z,0)),ue=.9,Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue+re*.5)*z,ee,(ue+le)*z,0,(ue+re)*z,ee)),ae}),go.Shape.defineFigureGenerator("ACvoltageSource",function(fe,z,ee){var ae=new go.Geometry,re=ce*.5,le=.5,ue=.5,pe=.5,Ee=new go.PathFigure((ue-le)*z,pe*ee,!1);return ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-le)*ee,(ue-le)*z,(pe-re)*ee,(ue-re)*z,(pe-le)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,pe*ee,(ue+re)*z,(pe-le)*ee,(ue+le)*z,(pe-re)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee,(ue+re)*z,(pe+le)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,pe*ee,(ue-re)*z,(pe+le)*ee,(ue-le)*z,(pe+re)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,(ue-le+.1)*z,pe*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le-.1)*z,pe*ee,ue*z,(pe-le)*ee,ue*z,(pe+le)*ee)),ae}),go.Shape.defineFigureGenerator("DCvoltageSource",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,.75*ee,!1);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),re.add(new go.PathSegment(go.PathSegment.Move,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ae}),go.Shape.defineFigureGenerator("Diode",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z,0,!1);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ae.spot1=new go.Spot(0,.25),ae.spot2=new go.Spot(.5,.75),ae}),go.Shape.defineFigureGenerator("Wifi",function(fe,z,ee){var ae=new go.Geometry,re=z,le=ee;z=z*.38,ee=ee*.6;var ue=ce*.8,pe=.8,Ee=0,Pe=.5,Ie=(re-z)/2,ke=(le-ee)/2,Ae=new go.PathFigure(Ee*z+Ie,(Pe+pe)*ee+ke,!0);ae.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Ee-pe)*z+Ie,Pe*ee+ke,(Ee-ue)*z+Ie,(Pe+pe)*ee+ke,(Ee-pe)*z+Ie,(Pe+ue)*ee+ke)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z+Ie,(Pe-pe)*ee+ke,(Ee-pe)*z+Ie,(Pe-ue)*ee+ke,(Ee-ue)*z+Ie,(Pe-pe)*ee+ke)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Ee-pe+ue*.5)*z+Ie,Pe*ee+ke,Ee*z+Ie,(Pe-pe)*ee+ke,(Ee-pe+ue*.5)*z+Ie,(Pe-ue)*ee+ke)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z+Ie,(Pe+pe)*ee+ke,(Ee-pe+ue*.5)*z+Ie,(Pe+ue)*ee+ke,Ee*z+Ie,(Pe+pe)*ee+ke).close()),ue=ce*.4,pe=.4,Ee=.2,Pe=.5;var Oe=new go.PathFigure(Ee*z+Ie,(Pe+pe)*ee+ke,!0);ae.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Ee-pe)*z+Ie,Pe*ee+ke,(Ee-ue)*z+Ie,(Pe+pe)*ee+ke,(Ee-pe)*z+Ie,(Pe+ue)*ee+ke)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z+Ie,(Pe-pe)*ee+ke,(Ee-pe)*z+Ie,(Pe-ue)*ee+ke,(Ee-ue)*z+Ie,(Pe-pe)*ee+ke)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Ee-pe+ue*.5)*z+Ie,Pe*ee+ke,Ee*z+Ie,(Pe-pe)*ee+ke,(Ee-pe+ue*.5)*z+Ie,(Pe-ue)*ee+ke)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z+Ie,(Pe+pe)*ee+ke,(Ee-pe+ue*.5)*z+Ie,(Pe+ue)*ee+ke,Ee*z+Ie,(Pe+pe)*ee+ke).close()),ue=ce*.2,pe=.2,Ee=.5,Pe=.5;var Fe=new go.PathFigure((Ee-pe)*z+Ie,Pe*ee+ke,!0);ae.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z+Ie,(Pe-pe)*ee+ke,(Ee-pe)*z+Ie,(Pe-ue)*ee+ke,(Ee-ue)*z+Ie,(Pe-pe)*ee+ke)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Ee+pe)*z+Ie,Pe*ee+ke,(Ee+ue)*z+Ie,(Pe-pe)*ee+ke,(Ee+pe)*z+Ie,(Pe-ue)*ee+ke)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z+Ie,(Pe+pe)*ee+ke,(Ee+pe)*z+Ie,(Pe+ue)*ee+ke,(Ee+ue)*z+Ie,(Pe+pe)*ee+ke)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Ee-pe)*z+Ie,Pe*ee+ke,(Ee-ue)*z+Ie,(Pe+pe)*ee+ke,(Ee-pe)*z+Ie,(Pe+ue)*ee+ke)),ue=ce*.4,pe=.4,Ee=.8,Pe=.5;var _e=new go.PathFigure(Ee*z+Ie,(Pe-pe)*ee+ke,!0);ae.add(_e),_e.add(new go.PathSegment(go.PathSegment.Bezier,(Ee+pe)*z+Ie,Pe*ee+ke,(Ee+ue)*z+Ie,(Pe-pe)*ee+ke,(Ee+pe)*z+Ie,(Pe-ue)*ee+ke)),_e.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z+Ie,(Pe+pe)*ee+ke,(Ee+pe)*z+Ie,(Pe+ue)*ee+ke,(Ee+ue)*z+Ie,(Pe+pe)*ee+ke)),_e.add(new go.PathSegment(go.PathSegment.Bezier,(Ee+pe-ue*.5)*z+Ie,Pe*ee+ke,Ee*z+Ie,(Pe+pe)*ee+ke,(Ee+pe-ue*.5)*z+Ie,(Pe+ue)*ee+ke)),_e.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z+Ie,(Pe-pe)*ee+ke,(Ee+pe-ue*.5)*z+Ie,(Pe-ue)*ee+ke,Ee*z+Ie,(Pe-pe)*ee+ke).close()),ue=ce*.8,pe=.8,Ee=1,Pe=.5;var Ye=new go.PathFigure(Ee*z+Ie,(Pe-pe)*ee+ke,!0);return ae.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(Ee+pe)*z+Ie,Pe*ee+ke,(Ee+ue)*z+Ie,(Pe-pe)*ee+ke,(Ee+pe)*z+Ie,(Pe-ue)*ee+ke)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z+Ie,(Pe+pe)*ee+ke,(Ee+pe)*z+Ie,(Pe+ue)*ee+ke,(Ee+ue)*z+Ie,(Pe+pe)*ee+ke)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(Ee+pe-ue*.5)*z+Ie,Pe*ee+ke,Ee*z+Ie,(Pe+pe)*ee+ke,(Ee+pe-ue*.5)*z+Ie,(Pe+ue)*ee+ke)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z+Ie,(Pe-pe)*ee+ke,(Ee+pe-ue*.5)*z+Ie,(Pe-ue)*ee+ke,Ee*z+Ie,(Pe-pe)*ee+ke).close()),ae}),go.Shape.defineFigureGenerator("Email",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(0,0,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Move,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.45*z,.54*ee)),le.add(new go.PathSegment(go.PathSegment.Move,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.55*z,.54*ee)),ae}),go.Shape.defineFigureGenerator("Ethernet",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.35*z,0,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.65*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.65*z,.4*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.35*z,.4*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.35*z,0).close());var le=new go.PathFigure(.1*z,ee,!0,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,ee).close());var ue=new go.PathFigure(.6*z,ee,!0,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,.6*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.6*z,.6*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.6*z,ee).close());var pe=new go.PathFigure(0,.5*ee,!1);return ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,.5*z,.5*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,.75*z,.5*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.75*z,.6*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,.25*z,.5*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.25*z,.6*ee)),ae}),go.Shape.defineFigureGenerator("Power",function(fe,z,ee){var ae=new go.Geometry,re=ce*.4,le=.4,ue=.5,pe=.5,Ee=rt(),Pe=rt(),Ie=rt(),ke=rt();Re(ue,pe-le,ue+re,pe-le,ue+le,pe-re,ue+le,pe,.5,Ee,Ee,Pe,Ie,ke);var Ae=$e(Pe.x,Pe.y),Oe=new go.PathFigure(Pe.x*z,Pe.y*ee,!0);ae.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,pe*ee,Ie.x*z,Ie.y*ee,ke.x*z,ke.y*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee,(ue+re)*z,(pe+le)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,pe*ee,(ue-re)*z,(pe+le)*ee,(ue-le)*z,(pe+re)*ee)),Re(ue-le,pe,ue-le,pe-re,ue-re,pe-le,ue,pe-le,.5,Ie,ke,Pe,Ee,Ee),Oe.add(new go.PathSegment(go.PathSegment.Bezier,Pe.x*z,Pe.y*ee,Ie.x*z,Ie.y*ee,ke.x*z,ke.y*ee)),re=ce*.3,le=.3,Re(ue-le,pe,ue-le,pe-re,ue-re,pe-le,ue,pe-le,.5,Ie,ke,Pe,Ee,Ee),Oe.add(new go.PathSegment(go.PathSegment.Line,Pe.x*z,Pe.y*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,pe*ee,ke.x*z,ke.y*ee,Ie.x*z,Ie.y*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+le)*ee,(ue-le)*z,(pe+re)*ee,(ue-re)*z,(pe+le)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,pe*ee,(ue+re)*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee)),Re(ue,pe-le,ue+re,pe-le,ue+le,pe-re,ue+le,pe,.5,Ee,Ee,Pe,Ie,ke),Oe.add(new go.PathSegment(go.PathSegment.Bezier,Pe.x*z,Pe.y*ee,ke.x*z,ke.y*ee,Ie.x*z,Ie.y*ee).close());var Oe=new go.PathFigure(.45*z,0,!0);return ae.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Line,.45*z,.5*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.55*z,.5*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.55*z,0).close()),St(Ee),St(Pe),St(Ie),St(ke),St(Ae),ae.spot1=new go.Spot(.25,.45),ae.spot2=new go.Spot(.75,.8),ae}),go.Shape.defineFigureGenerator("Fallout",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,ee/2,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Arc,180,360,z/2,ee/2,z/2,ee/2));function le(ue,pe,Ee){ue.add(new go.PathSegment(go.PathSegment.Move,(.3+pe)*z,(.8+Ee)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(.5+pe)*z,(.5+Ee)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(.1+pe)*z,(.5+Ee)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(.3+pe)*z,(.8+Ee)*ee).close())}return le(re,0,0),le(re,.4,0),le(re,.2,-.3),ae}),go.Shape.defineFigureGenerator("IrritationHazard",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.2*z,0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,.3*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.7*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.8*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,.7*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.3*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee).close()),ae.spot1=new go.Spot(.3,.3),ae.spot2=new go.Spot(.7,.7),ae}),go.Shape.defineFigureGenerator("ElectricalHazard",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.37*z,0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,.11*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.77*z,.04*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.33*z,.49*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.37*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.63*z,.86*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.77*z,.91*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.34*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.34*z,.78*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.44*z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.65*z,.56*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.68*ee).close()),ae}),go.Shape.defineFigureGenerator("FireHazard",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.1*z,ee,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,.29*z,0,-.25*z,.63*ee,.45*z,.44*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.51*z,.42*ee,.48*z,.17*ee,.54*z,.35*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.59*z,.18*ee,.59*z,.29*ee,.58*z,.28*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,.6*ee,.8*z,.34*ee,.88*z,.43*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.88*z,.31*ee,.87*z,.48*ee,.88*z,.43*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,ee,1.17*z,.76*ee,.82*z,.8*ee).close()),ae.spot1=new go.Spot(.07,.445),ae.spot2=new go.Spot(.884,.958),ae}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(fe,z,ee){var ae=new go.Geometry,re=.5,le=0,ue=0,pe=re*ce,Ee=.4*Math.SQRT2/2+.5,Pe=.5-.5*Math.SQRT2/2,Ie=1,ke=.5,Ae=.5,Oe=0,Fe=new go.PathFigure(Ee*z,(1-Pe)*ee,!1);return ae.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Ie*z,ke*ee,Ie*z,.7*ee,Ie*z,ke*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Ae+le)*z,(Oe+le)*ee,(.5+re+le)*z,(.5-pe+le)*ee,(.5+pe+le)*z,(.5-re+le)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(.5-re+le)*z,(.5+ue)*ee,(.5-pe+le)*z,(.5-re+ue)*ee,(.5-re+le)*z,(.5-pe+ue)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(.35+le)*z,.9*ee,(.5-re+le)*z,(.5+pe+ue)*ee,(.5-pe+le)*z,.9*ee)),Fe.add(new go.PathSegment(go.PathSegment.Move,(.25+le)*z,.8*ee)),Fe.add(new go.PathSegment(go.PathSegment.Line,(.35+le)*z,.9*ee)),Fe.add(new go.PathSegment(go.PathSegment.Line,(.2+le)*z,.95*ee)),ae}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!1);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Move,.5*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),re.add(new go.PathSegment(go.PathSegment.Move,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ae}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!1);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Move,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ae}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!1);ae.add(re);var le=new go.PathFigure(z,ee,!1);ae.add(le);var ue=new go.PathFigure(0,.5*ee,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.5*ee,.2*z,.35*ee,.3*z,.35*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,.7*z,.65*ee,.8*z,.65*ee)),ae}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,.5*ee,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee).close()),ae}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,.2*ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee).close());var re=new go.PathFigure(0,.2*ee,!1);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee)),ae}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.7*z,ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.3*z,ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,0,.6*z,.5*ee,0,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.7*z,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,ee,.4*z,.5*ee,z,.5*ee).close());var le=new go.PathFigure(.45*z,.73*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.7*z,.73*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.38*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.63*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.31*z,.27*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.56*z,.27*ee)),ae}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!1);ae.add(re);var le=new go.PathFigure(.335*z,(1-.555)*ee,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.335*z,(1-.405)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.405)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.555)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.68*ee,(1-.12)*z,.46*ee,(1-.02)*z,.54*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.68*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.335*z,(1-.555)*ee,.02*z,.54*ee,.12*z,.46*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.365*z,(1-.595)*ee));var ue=.5-.285,pe=.5,Ee=ue,Pe=Math.PI/4,Ie=4*(1-Math.cos(Pe))/(3*Math.sin(Pe)),ke=Ie*.5,Ae=ue,Oe=ue,Fe=Ie*Ae,_e=Ie*Oe;le.add(new go.PathSegment(go.PathSegment.Bezier,(pe-Ae)*z,Ee*ee,(pe-(Fe+Ae)/2)*z,(Ee+(Oe+_e)/2)*ee,(pe-Ae)*z,(Ee+_e)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,pe*z,(Ee-Oe)*ee,(pe-Ae)*z,(Ee-_e)*ee,(pe-Fe)*z,(Ee-Oe)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,(pe+Ae)*z,Ee*ee,(pe+Fe)*z,(Ee-Oe)*ee,(pe+Ae)*z,(Ee-_e)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*z,(1-.595)*ee,(pe+Ae)*z,(Ee+_e)*ee,(pe+(Fe+Ae)/2)*z,(Ee+(Oe+_e)/2)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*z,(1-.595)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.555)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.405)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.335*z,(1-.405)*ee));var Ye=new go.PathFigure(.2*z,ee,!1);ae.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Line,.2*z,.8*ee));var ze=new go.PathFigure(.8*z,ee,!1);return ae.add(ze),ze.add(new go.PathSegment(go.PathSegment.Line,.8*z,.8*ee)),ae}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.1*z,0,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.1*z,ee).close());var le=new go.PathFigure(.2*z,.2*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.8*ee)),ae}),go.Shape.defineFigureGenerator("BpmnEventError",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,ee,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.33*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.66*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.66*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.33*z,.5*ee).close()),ae}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!1);ae.add(re);var le=new go.PathFigure(z,ee,!1);ae.add(le);var ue=new go.PathFigure(.1*z,ee,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee).close()),ae}),go.Shape.defineFigureGenerator("Caution",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.05*z,ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,.8*ee,0,ee,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.45*z,.1*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.55*z,.1*ee,.5*z,0,.5*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.95*z,.9*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,ee,z,ee,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.05*z,ee));var le=.05;return re.add(new go.PathSegment(go.PathSegment.Move,(.5-le)*z,.875*ee)),re.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*z,.875*ee,le*z,le*ee)),re.add(new go.PathSegment(go.PathSegment.Move,.5*z,.75*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.325*ee,.575*z,.725*ee,.625*z,.375*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.75*ee,.375*z,.375*ee,.425*z,.725*ee)),ae}),go.Shape.defineFigureGenerator("Recycle",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.45*z,.95*ee,!1);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.2*z,.95*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.185*z,.85*ee,.17*z,.95*ee,.15*z,.9*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.235*z,.75*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.3*z,.625*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.35*z,.65*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.275*z,.45*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.05*z,.45*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.1*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.05*z,.575*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.1875*z,.95*ee,0,.675*ee,0,.7*ee)),re.add(new go.PathSegment(go.PathSegment.Move,.45*z,.95*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.45*z,.775*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.22*z,.775*ee));var le=new go.PathFigure(.475*z,.2*ee,!1);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.225*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.275*z,.175*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.325*z,.05*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,.05*ee,.35*z,0,.375*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.575*z,.375*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.525*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.75*z,.475*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.85*z,.315*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.32*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.65*z,.05*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.575*z,0,.65*z,.05*ee,.625*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.38*z,.0105*ee));var ue=new go.PathFigure(.675*z,.575*ee,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.875*z,.525*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.775*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.85*z,.95*ee,z,.8*ee,z,.85*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*z,.95*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.85*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*z,.725*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*z,.775*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.7*z,.775*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.775*ee)),ue.add(new go.PathSegment(go.PathSegment.Move,.675*z,.575*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.775*z,.775*ee)),ae}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(fe,z,ee){var ae=new go.Geometry,re=.5,le=ce*.5,ue=new go.PathFigure(z,re*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,re*z,ee,z,(re+le)*ee,(re+le)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,re*ee,(re-le)*z,ee,0,(re+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,re*z,0,0,(re-le)*ee,(re-le)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,re*ee,(re+le)*z,0,z,(re-le)*ee));var pe=new go.PathFigure(re*z,0,!1);return ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,re*z,.15*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,re*z,ee)),pe.add(new go.PathSegment(go.PathSegment.Line,re*z,.85*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,0,re*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.15*z,re*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,z,re*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.85*z,re*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,re*z,re*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.58*z,.1*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,re*z,re*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.78*z,.54*ee)),ae}),go.Shape.defineFigureGenerator("Package",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,.15*ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var le=new go.PathFigure(0,.15*ee,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,0)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.65*z,.15*ee).close()),ae.spot1=new go.Spot(0,.1),ae.spot2=new go.Spot(1,1),ae}),go.Shape.defineFigureGenerator("Class",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(0,.2*ee,!1);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee).close());var ue=new go.PathFigure(0,.5*ee,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee).close()),ae}),go.Shape.defineFigureGenerator("Component",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z,ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.15*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.15*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee).close());var le=new go.PathFigure(0,.2*ee,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.45*z,.2*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.45*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee).close());var ue=new go.PathFigure(0,.6*ee,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.45*z,.6*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.45*z,.8*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee).close()),ae}),go.Shape.defineFigureGenerator("Boat Shipment",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.15*z,.6*ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.15*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.85*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*ee));var le=new go.PathFigure(.15*z,.6*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*ee)),ae}),go.Shape.defineFigureGenerator("Customer/Supplier",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z,ee,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.66*z,.33*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.66*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.33*z,.33*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.33*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,0,.33*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee).close()),ae}),go.Shape.defineFigureGenerator("Workcell",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,ee,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.65*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.65*z,.4*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.35*z,.4*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.35*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae}),go.Shape.defineFigureGenerator("Supermarket",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!1);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.33*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.33*ee)),re.add(new go.PathSegment(go.PathSegment.Move,z,.33*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.66*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.66*ee)),re.add(new go.PathSegment(go.PathSegment.Move,z,.66*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ae}),go.Shape.defineFigureGenerator("TruckShipment",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.6*z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(z,.8*ee,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee).close());var ue=.1,pe=ce*.1,Ee=.2,Pe=.9,Ie=new go.PathFigure((Ee-ue)*z,Pe*ee,!0);ae.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z,(Pe-ue)*ee,(Ee-ue)*z,(Pe-pe)*ee,(Ee-pe)*z,(Pe-ue)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(Ee+ue)*z,Pe*ee,(Ee+pe)*z,(Pe-ue)*ee,(Ee+ue)*z,(Pe-pe)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z,(Pe+ue)*ee,(Ee+ue)*z,(Pe+pe)*ee,(Ee+pe)*z,(Pe+ue)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(Ee-ue)*z,Pe*ee,(Ee-pe)*z,(Pe+ue)*ee,(Ee-ue)*z,(Pe+pe)*ee).close()),ue=.1,pe=ce*.1,Ee=.8,Pe=.9;var ke=new go.PathFigure((Ee-ue)*z,Pe*ee,!0);return ae.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z,(Pe-ue)*ee,(Ee-ue)*z,(Pe-pe)*ee,(Ee-pe)*z,(Pe-ue)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(Ee+ue)*z,Pe*ee,(Ee+pe)*z,(Pe-ue)*ee,(Ee+ue)*z,(Pe-pe)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z,(Pe+ue)*ee,(Ee+ue)*z,(Pe+pe)*ee,(Ee+pe)*z,(Pe+ue)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(Ee-ue)*z,Pe*ee,(Ee-pe)*z,(Pe+ue)*ee,(Ee-ue)*z,(Pe+pe)*ee).close()),ae}),go.Shape.defineFigureGenerator("KanbanPost",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.2*z,0,!1);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),re.add(new go.PathSegment(go.PathSegment.Move,.5*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),re.add(new go.PathSegment(go.PathSegment.Move,.5*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.8*z,ee)),ae}),go.Shape.defineFigureGenerator("Forklift",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,0,0));var le=new go.PathFigure(0,.5*ee,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var ue=new go.PathFigure(.5*z,.8*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,.1*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.1*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.8*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,.8*ee));var pe=new go.PathFigure(.5*z,.7*ee,!1);ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee));var Ee=.1,Pe=ce*.1,Ie=.1,ke=.9,Ae=new go.PathFigure((Ie-Ee)*z,ke*ee,!0);ae.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Ie*z,(ke-Ee)*ee,(Ie-Ee)*z,(ke-Pe)*ee,(Ie-Pe)*z,(ke-Ee)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Ie+Ee)*z,ke*ee,(Ie+Pe)*z,(ke-Ee)*ee,(Ie+Ee)*z,(ke-Pe)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Ie*z,(ke+Ee)*ee,(Ie+Ee)*z,(ke+Pe)*ee,(Ie+Pe)*z,(ke+Ee)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Ie-Ee)*z,ke*ee,(Ie-Pe)*z,(ke+Ee)*ee,(Ie-Ee)*z,(ke+Pe)*ee)),Ee=.1,Pe=ce*.1,Ie=.4,ke=.9;var Oe=new go.PathFigure((Ie-Ee)*z,ke*ee,!0);return ae.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Bezier,Ie*z,(ke-Ee)*ee,(Ie-Ee)*z,(ke-Pe)*ee,(Ie-Pe)*z,(ke-Ee)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Ie+Ee)*z,ke*ee,(Ie+Pe)*z,(ke-Ee)*ee,(Ie+Ee)*z,(ke-Pe)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,Ie*z,(ke+Ee)*ee,(Ie+Ee)*z,(ke+Pe)*ee,(Ie+Pe)*z,(ke+Ee)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Ie-Ee)*z,ke*ee,(Ie-Pe)*z,(ke+Ee)*ee,(Ie-Ee)*z,(ke+Pe)*ee)),ae}),go.Shape.defineFigureGenerator("RailShipment",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.1*z,.4*ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.45*z,.4*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.45*z,.9*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.1*z,.9*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.1*z,.4*ee).close());var le=new go.PathFigure(.45*z,.7*ee,!1);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.55*z,.7*ee));var ue=new go.PathFigure(.55*z,.4*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.4*ee).close());var Ie=.05,ke=ce*.05,Ae=.175,Oe=.95,pe=new go.PathFigure((Ae-Ie)*z,Oe*ee,!0);ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,Ae*z,(Oe-Ie)*ee,(Ae-Ie)*z,(Oe-ke)*ee,(Ae-ke)*z,(Oe-Ie)*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(Ae+Ie)*z,Oe*ee,(Ae+ke)*z,(Oe-Ie)*ee,(Ae+Ie)*z,(Oe-ke)*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,Ae*z,(Oe+Ie)*ee,(Ae+Ie)*z,(Oe+ke)*ee,(Ae+ke)*z,(Oe+Ie)*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(Ae-Ie)*z,Oe*ee,(Ae-ke)*z,(Oe+Ie)*ee,(Ae-Ie)*z,(Oe+ke)*ee));var Ie=.05,ke=ce*.05,Ae=.375,Oe=.95,Ee=new go.PathFigure((Ae-Ie)*z,Oe*ee,!0);ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,Ae*z,(Oe-Ie)*ee,(Ae-Ie)*z,(Oe-ke)*ee,(Ae-ke)*z,(Oe-Ie)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(Ae+Ie)*z,Oe*ee,(Ae+ke)*z,(Oe-Ie)*ee,(Ae+Ie)*z,(Oe-ke)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,Ae*z,(Oe+Ie)*ee,(Ae+Ie)*z,(Oe+ke)*ee,(Ae+ke)*z,(Oe+Ie)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(Ae-Ie)*z,Oe*ee,(Ae-ke)*z,(Oe+Ie)*ee,(Ae-Ie)*z,(Oe+ke)*ee));var Ie=.05,ke=ce*.05,Ae=.625,Oe=.95,Pe=new go.PathFigure((Ae-Ie)*z,Oe*ee,!0);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,Ae*z,(Oe-Ie)*ee,(Ae-Ie)*z,(Oe-ke)*ee,(Ae-ke)*z,(Oe-Ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(Ae+Ie)*z,Oe*ee,(Ae+ke)*z,(Oe-Ie)*ee,(Ae+Ie)*z,(Oe-ke)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,Ae*z,(Oe+Ie)*ee,(Ae+Ie)*z,(Oe+ke)*ee,(Ae+ke)*z,(Oe+Ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(Ae-Ie)*z,Oe*ee,(Ae-ke)*z,(Oe+Ie)*ee,(Ae-Ie)*z,(Oe+ke)*ee));var Ie=.05,ke=ce*.05,Ae=.825,Oe=.95,Fe=new go.PathFigure((Ae-Ie)*z,Oe*ee,!0);ae.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Ae*z,(Oe-Ie)*ee,(Ae-Ie)*z,(Oe-ke)*ee,(Ae-ke)*z,(Oe-Ie)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Ae+Ie)*z,Oe*ee,(Ae+ke)*z,(Oe-Ie)*ee,(Ae+Ie)*z,(Oe-ke)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Ae*z,(Oe+Ie)*ee,(Ae+Ie)*z,(Oe+ke)*ee,(Ae+ke)*z,(Oe+Ie)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Ae-Ie)*z,Oe*ee,(Ae-ke)*z,(Oe+Ie)*ee,(Ae-Ie)*z,(Oe+ke)*ee).close());var _e=new go.PathFigure(0,ee,!1);return ae.add(_e),_e.add(new go.PathSegment(go.PathSegment.Line,z,ee).close()),ae}),go.Shape.defineFigureGenerator("Warehouse",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(0,.2*ee,!1);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee).close());var ue=new go.PathFigure(.15*z,ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.15*z,.5*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.4*z,.5*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.4*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.15*z,ee).close());var pe=.05,Ee=ce*.05,Pe=.35,Ie=.775,ke=new go.PathFigure((Pe-pe)*z,Ie*ee,!0);return ae.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(Ie-pe)*ee,(Pe-pe)*z,(Ie-Ee)*ee,(Pe-Ee)*z,(Ie-pe)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+pe)*z,Ie*ee,(Pe+Ee)*z,(Ie-pe)*ee,(Pe+pe)*z,(Ie-Ee)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(Ie+pe)*ee,(Pe+pe)*z,(Ie+Ee)*ee,(Pe+Ee)*z,(Ie+pe)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-pe)*z,Ie*ee,(Pe-Ee)*z,(Ie+pe)*ee,(Pe-pe)*z,(Ie+Ee)*ee).close()),ae}),go.Shape.defineFigureGenerator("ControlCenter",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,ee,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.1*z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.1*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Move,.1*z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee).close()),ae}),go.Shape.defineFigureGenerator("Bluetooth",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,.75*ee,!1);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.75*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),ae}),go.Shape.defineFigureGenerator("Bookmark",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Move,.2*z,.2*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),re.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*ee)),ae}),go.Shape.defineFigureGenerator("Bookmark",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Move,.2*z,.2*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),re.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*ee)),ae}),go.Shape.defineFigureGenerator("Globe",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.5*z,0,!1);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),re.add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Move,.5*z,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,.75*z,0,z,.25*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,.75*ee,.75*z,ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.25*z,ee,0,.75*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,.25*ee,.25*z,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,.15*z,.25*ee,.15*z,.75*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.85*z,.75*ee,.85*z,.25*ee)),re.add(new go.PathSegment(go.PathSegment.Move,.1675*z,.15*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.8325*z,.15*ee,.35*z,.3*ee,.65*z,.3*ee)),re.add(new go.PathSegment(go.PathSegment.Move,.1675*z,.85*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.8325*z,.85*ee,.35*z,.7*ee,.65*z,.7*ee)),ae}),go.Shape.defineFigureGenerator("Wave",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,.25*ee,!1);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.25*ee,.1*z,0,.2*z,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,.25*ee,.425*z,.5*ee,.575*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,z,.25*ee,.8*z,0,.9*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.75*ee)),re.add(new go.PathSegment(go.PathSegment.Move,0,.25*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.75*ee,.1*z,.5*ee,.2*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,.75*ee,.425*z,ee,.575*z,ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,z,.75*ee,.8*z,.5*ee,.9*z,.5*ee)),ae}),go.Shape.defineFigureGenerator("Operator",function(fe,z,ee){var ae=new go.Geometry,re=.3,le=ce*.3,ue=.5,pe=.7,Ee=new go.PathFigure((ue-re)*z,pe*ee,!0);ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-re)*ee,(ue-re)*z,(pe-le)*ee,(ue-le)*z,(pe-re)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue+re)*z,pe*ee,(ue+le)*z,(pe-re)*ee,(ue+re)*z,(pe-le)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+re)*ee,(ue+re)*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue-re)*z,pe*ee,(ue-le)*z,(pe+re)*ee,(ue-re)*z,(pe+le)*ee));var Pe=new go.PathFigure(0,.7*ee,!1);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,z,.7*ee,0,0,z,0)),ae}),go.Shape.defineFigureGenerator("TripleFanBlades",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.5*z,0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*ee,.65*z,.3*ee,.65*z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.35*z,.5*ee,.35*z,.3*ee)),re.add(new go.PathSegment(go.PathSegment.Move,.5*z,.65*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.3*z,.6*ee,.1*z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*ee,.2*z,ee,.35*z,.95*ee)),re.add(new go.PathSegment(go.PathSegment.Move,.5*z,.65*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,z,ee,.7*z,.6*ee,.9*z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*ee,.8*z,ee,.65*z,.95*ee)),ae}),go.Shape.defineFigureGenerator("CentrifugalPump",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z,0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,0,.075*ee,0,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,ee,0,ee,.4*z,ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.4*ee,.8*z,ee,.85*z,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.4*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,0)),ae}),go.Shape.defineFigureGenerator("Battery",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.1*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Move,.4*z,.1*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.6*z,.1*ee));var le=new go.PathFigure(0,.6*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Move,0,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.4*ee)),ae}),go.Shape.defineFigureGenerator("Delete",function(fe,z,ee){var ae=new go.Geometry,re=.5,le=ce*.5,ue=.5,pe=.5,Ee=new go.PathFigure((ue-re)*z,pe*ee,!0);ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-re)*ee,(ue-re)*z,(pe-le)*ee,(ue-le)*z,(pe-re)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue+re)*z,pe*ee,(ue+le)*z,(pe-re)*ee,(ue+re)*z,(pe-le)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+re)*ee,(ue+re)*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue-re)*z,pe*ee,(ue-le)*z,(pe+re)*ee,(ue-re)*z,(pe+le)*ee));var Pe=new go.PathFigure(.15*z,.5*ee,!1);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,.85*z,.5*ee)),ae}),go.Shape.defineFigureGenerator("Flag",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,.1*ee,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Move,0,.1*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.1*ee,.15*z,0,.35*z,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*ee,.65*z,.2*ee,.85*z,.2*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.5*ee,.85*z,.6*ee,.65*z,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.35*z,.4*ee,.15*z,.4*ee).close()),ae}),go.Shape.defineFigureGenerator("Help",function(fe,z,ee){var ae=new go.Geometry,re=.5,le=ce*.5,ue=.5,pe=.5,Ee=new go.PathFigure((ue-re)*z,pe*ee,!1);ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-re)*ee,(ue-re)*z,(pe-le)*ee,(ue-le)*z,(pe-re)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue+re)*z,pe*ee,(ue+le)*z,(pe-re)*ee,(ue+re)*z,(pe-le)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+re)*ee,(ue+re)*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue-re)*z,pe*ee,(ue-le)*z,(pe+re)*ee,(ue-re)*z,(pe+le)*ee).close()),re=.05,le=ce*.05,ue=.5,pe=.8;var Pe=new go.PathFigure((ue-re)*z,pe*ee,!1);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-re)*ee,(ue-re)*z,(pe-le)*ee,(ue-le)*z,(pe-re)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+re)*z,pe*ee,(ue+le)*z,(pe-re)*ee,(ue+re)*z,(pe-le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+re)*ee,(ue+re)*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-re)*z,pe*ee,(ue-le)*z,(pe+re)*ee,(ue-re)*z,(pe+le)*ee).close()),Pe.add(new go.PathSegment(go.PathSegment.Move,.5*z,.7*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*ee,.75*z,.475*ee,.75*z,.225*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.35*ee,.4*z,.2*ee,.3*z,.25*ee)),ae}),go.Shape.defineFigureGenerator("Location",function(fe,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(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,.5*ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var le=new go.PathFigure(.2*z,.5*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.2*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.3*ee,.25*z,0,.75*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.3*ee)),ae}),go.Shape.defineFigureGenerator("Unlocked",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,.5*ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var le=new go.PathFigure(.2*z,.5*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.2*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.3*ee,.25*z,0,.75*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.35*ee)),ae}),go.Shape.defineFigureGenerator("Gear",function(fe,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(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,.5*ee,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,.3*ee,0,.375*ee,.05*z,.325*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.45*z,.075*ee,.3*z,.225*ee,.4*z,.175*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.525*z,.075*ee,.46*z,.05*ee,.525*z,.05*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.4*ee,.525*z,.275*ee,.475*z,.325*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.55*ee,z,.4*ee,z,.55*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.425*z,.55*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.6*z,.55*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.6*z,.7*ee,.675*z,.55*ee,.675*z,.7*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.4*z,.7*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.575*z,.7*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.575*z,.85*ee,.65*z,.7*ee,.65*z,.85*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.4*z,.85*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.525*z,.85*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.535*z,ee,.61*z,.85*ee,.61*z,ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,.435*z,ee,0,ee).close()),ae}),go.Shape.defineFigureGenerator("Map",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,.2*ee,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.25*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,.2*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.75*z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,.25*z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),re.add(new go.PathSegment(go.PathSegment.Move,.25*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.25*z,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Move,.5*z,.2*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),re.add(new go.PathSegment(go.PathSegment.Move,.75*z,0)),re.add(new go.PathSegment(go.PathSegment.Line,.75*z,.8*ee)),ae}),go.Shape.defineFigureGenerator("Eject",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,ee,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z,ee)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee*.7)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee*.7).close());var le=new go.PathFigure(0,ee*.6,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,0).close()),ae}),go.Shape.defineFigureGenerator("Pencil",function(fe,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(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z*1,ee*1,!1);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee*.85)),re.add(new go.PathSegment(go.PathSegment.Line,.046*z,ee*.85)),re.add(new go.PathSegment(go.PathSegment.Line,.046*z,ee*.45)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee*.45)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee*.3)),re.add(new go.PathSegment(go.PathSegment.Line,.046*z,ee*.3)),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,ee*.3)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee*.3)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee*.45)),re.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,ee*.45)),re.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,ee*.85)),re.add(new go.PathSegment(go.PathSegment.Line,z,ee*.85).close());var le=new go.PathFigure(.126*z,.85*ee,!1);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.126*z,.45*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.322*z,.45*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.322*z,.85*ee).close());var ue=new go.PathFigure(.402*z,.85*ee,!1);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.402*z,.45*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.598*z,.45*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.598*z,.85*ee).close());var pe=new go.PathFigure(.678*z,.85*ee,!1);ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.678*z,.45*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.874*z,.45*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.874*z,.85*ee).close());var Ee=new go.PathFigure(.5*z,.1*ee,!1);return ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*z,.3*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*z,.3*ee).close()),ae}),go.Shape.defineFigureGenerator("Staircase",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,ee*1,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z*.2,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*.2,ee*.8)),re.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.8)),re.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.6)),re.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.6)),re.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.4)),re.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*.4)),re.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*.2)),re.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.2)),re.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.15)),re.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.15)),re.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.35)),re.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.35)),re.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.55)),re.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*.55)),re.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*.75)),re.add(new go.PathSegment(go.PathSegment.Line,z*.15,ee*.75)),re.add(new go.PathSegment(go.PathSegment.Line,z*.15,ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee*.95).close()),ae}),go.Shape.defineFigureGenerator("5Bars",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,ee*1,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z*.184,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*.184,ee*(1-.184)).close());var le=new go.PathFigure(z*.204,ee,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.204,ee*(1-.184))),le.add(new go.PathSegment(go.PathSegment.Line,z*.388,ee*(1-.184*2))),le.add(new go.PathSegment(go.PathSegment.Line,z*.388,ee*1).close());var ue=new go.PathFigure(z*.408,ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.408,ee*(1-.184*2))),ue.add(new go.PathSegment(go.PathSegment.Line,z*.592,ee*(1-.184*3))),ue.add(new go.PathSegment(go.PathSegment.Line,z*.592,ee*1).close());var pe=new go.PathFigure(z*.612,ee,!0);ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z*.612,ee*(1-.184*3))),pe.add(new go.PathSegment(go.PathSegment.Line,z*.796,ee*(1-.184*4))),pe.add(new go.PathSegment(go.PathSegment.Line,z*.796,ee*1).close());var Ee=new go.PathFigure(z*.816,ee,!0);return ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,z*.816,ee*(1-.184*4))),Ee.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*(1-.184*5))),Ee.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1).close()),ae}),go.Shape.defineFigureGenerator("PC",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*.3,0).close());var le=new go.PathFigure(z*.055,.07*ee,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.07)),le.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.1)),le.add(new go.PathSegment(go.PathSegment.Line,z*.055,ee*.1).close());var ue=new go.PathFigure(z*.055,.13*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.13)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.16)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.055,ee*.16).close());var pe=new go.PathFigure(z*.055,.18*ee,!0);ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.18)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.21)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.055,ee*.21).close());var Ee=new go.PathFigure(z*1,0,!0);return ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,z*.4,0)),Ee.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.65)),Ee.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.65).close()),ae}),go.Shape.defineFigureGenerator("Plane",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(.55*z,ee,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.4*z,.7*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.1*z,.475*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.35*z,.525*ee,0,.4*ee,.225*z,.45*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.4*z,.475*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.15*z,.35*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.2*z,.325*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.6*z,.325*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.85*z,.1*ee)),re.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.2*ee,.975*z,0,z,.08*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.7*z,.45*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.6*z,.95*ee)),re.add(new go.PathSegment(go.PathSegment.Line,.55*z,ee).close()),ae}),go.Shape.defineFigureGenerator("Key",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z*1,ee*.5,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z*.9,.4*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.5,.4*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.5,.35*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.45,.35*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.3,.2*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.15,.2*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.35*ee)),re.add(new go.PathSegment(go.PathSegment.Line,0,.65*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.15,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.3,.8*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.45,.65*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.5,.65*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.5,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.6,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.65,.55*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.7,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.75,.55*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.8,.6*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.85,.575*ee)),re.add(new go.PathSegment(go.PathSegment.Line,z*.9,.6*ee).close()),re.add(new go.PathSegment(go.PathSegment.Move,.17*z,.425*ee)),re.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*z,.5*ee,.075*z,.075*ee).close()),ae}),go.Shape.defineFigureGenerator("FilmTape",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(0,0,!1);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Arc,270,180,z*0,z*.3,z*.055)),re.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*.08,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*.08,ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*1),ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*1),ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*2),ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*2),ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*3),ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*3),ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*4),ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*4),ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*5),ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*5),ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*6),ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*6),ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*7),ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*7),ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*8),ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*8),ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*9),ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*9),ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*10),ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*10),ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*11),ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*11),ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*12),ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*12),ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*13),ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*13),ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*14),ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*14),ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*15),ee*.95)),re.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*15),ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1));var le=new go.PathFigure(0,0,!1);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*0)),le.add(new go.PathSegment(go.PathSegment.Arc,270,-180,z*1,z*.3,z*.055)),le.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1));var ue=new go.PathFigure(z*.11,ee*.1,!1);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*0),ee*.1)),ue.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*0),ee*.8)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.11,ee*.8).close());var pe=new go.PathFigure(z*(.11+.24133333*1+.028*1),ee*.1,!1);ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*1),ee*.1)),pe.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*1),ee*.8)),pe.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*1),ee*.8).close());var Ee=new go.PathFigure(z*(.11+.24133333*2+.028*2),ee*.1,!1);return ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*3+.028*2),ee*.1)),Ee.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*3+.028*2),ee*.8)),Ee.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*2),ee*.8).close()),ae}),go.Shape.defineFigureGenerator("FloppyDisk",function(fe,z,ee){var ae=new go.Geometry,re=8,le=re*ce,ue=new go.PathFigure(re,0,!1);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.86,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.14)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee-re)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z-re,ee,z,ee-le,z-le,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,re,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-re,le,ee,0,ee-le)),ue.add(new go.PathSegment(go.PathSegment.Line,0,re)),ue.add(new go.PathSegment(go.PathSegment.Bezier,re,0,0,le,le,0).close());var pe=new go.PathFigure(z*.83,0,!1);ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z*.83,ee*.3)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*.3)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*0).close());var Ee=new go.PathFigure(z*.83,ee*1,!1);ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,z*.83,ee*.5)),Ee.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*.5)),Ee.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*1).close());var Pe=new go.PathFigure(z*.78,ee*.05,!1);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.05)),Pe.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.25)),Pe.add(new go.PathSegment(go.PathSegment.Line,z*.78,ee*.25).close()),ae}),go.Shape.defineFigureGenerator("SpeechBubble",function(fe,z,ee){var ae=fe?fe.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=15),ae=Math.min(ae,z/3),ae=Math.min(ae,ee/3);var re=ae*ce,le=ee*.8,ue=new go.Geometry,pe=new go.PathFigure(ae,0,!0);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z-ae,0)),pe.add(new go.PathSegment(go.PathSegment.Bezier,z,ae,z-re,0,z,re)),pe.add(new go.PathSegment(go.PathSegment.Line,z,le-ae)),pe.add(new go.PathSegment(go.PathSegment.Bezier,z-ae,le,z,le-re,z-re,le)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.7,le)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.55,le)),pe.add(new go.PathSegment(go.PathSegment.Line,ae,le)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,le-ae,re,le,0,le-re)),pe.add(new go.PathSegment(go.PathSegment.Line,0,ae)),pe.add(new go.PathSegment(go.PathSegment.Bezier,ae,0,0,re,re,0).close()),re>1?(ue.spot1=new go.Spot(0,0,re,re),ue.spot2=new go.Spot(1,.8,-re,-re)):(ue.spot1=go.Spot.TopLeft,ue.spot2=new go.Spot(1,.8)),ue}),go.Shape.defineFigureGenerator("Repeat",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z*0,ee*.45,!0);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.45)),re.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*.45)),re.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*.9)),re.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.9)),re.add(new go.PathSegment(go.PathSegment.Line,z*.65,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*.2,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*.2,ee*.45).close());var le=new go.PathFigure(z*1,ee*.55,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*1)),le.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.55)),le.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee*.55)),le.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee*.1)),le.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.1)),le.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*0)),le.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*0)),le.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*.55).close()),ae}),go.Shape.defineFigureGenerator("Windows",function(fe,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(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z*0,ee*.1,!1);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.1)),re.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.9)),re.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*.9).close());var le=new go.PathFigure(z*.1,ee*.2,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.1,ee*.25)),le.add(new go.PathSegment(go.PathSegment.Line,z*.22,ee*.285)),le.add(new go.PathSegment(go.PathSegment.Line,z*.1,ee*.32)),le.add(new go.PathSegment(go.PathSegment.Line,z*.1,ee*.37)),le.add(new go.PathSegment(go.PathSegment.Line,z*.275,ee*.32)),le.add(new go.PathSegment(go.PathSegment.Line,z*.275,ee*.25).close());var ue=new go.PathFigure(z*.28,ee*.37,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.37)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.41)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.28,ee*.41).close()),ae}),go.Shape.defineFigureGenerator("Beaker",function(fe,z,ee){var ae=new go.Geometry,re=15,le=re*ce,ue=new go.PathFigure(z*.62,ee*.475,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee-re)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z-re,ee,z,ee-le,z-le,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,re,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-re,le,ee,0,ee-le)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.38,ee*.475)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.38,ee*.03)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.36,ee*0)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.64,ee*0)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.62,ee*.03).close()),le>1?(ae.spot1=new go.Spot(0,0,le,le),ae.spot2=new go.Spot(1,1,-le,-le)):(ae.spot1=go.Spot.TopLeft,ae.spot2=go.Spot.BottomRight),ae}),go.Shape.defineFigureGenerator("Download",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z*0,ee*1,!0);ae.add(re);var le=.1/.3;re.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*(1-le))),re.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.055)),re.add(new go.PathSegment(go.PathSegment.Line,z*.755,ee*.055)),re.add(new go.PathSegment(go.PathSegment.Line,z*.93,ee*(1-le))),re.add(new go.PathSegment(go.PathSegment.Line,z*.64,ee*(1-le))),re.add(new go.PathSegment(go.PathSegment.Line,z*.61,ee*.75)),re.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.75)),re.add(new go.PathSegment(go.PathSegment.Line,z*.39,ee*.75)),re.add(new go.PathSegment(go.PathSegment.Line,z*.36,ee*(1-le))),re.add(new go.PathSegment(go.PathSegment.Line,z*.07,ee*(1-le))),re.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),ee*.055)),re.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*.055)),re.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*(1-le)).close());var ue=new go.PathFigure(z*.4,ee*0,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.26,ee*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.66)),ue.add(new go.PathSegment(go.PathSegment.Line,z*(1-.26),ee*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*0).close()),ae}),go.Shape.defineFigureGenerator("Bin",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z*0,ee*1,!0);ae.add(re);var le=.1/.3;return re.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*(1-le))),re.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.055)),re.add(new go.PathSegment(go.PathSegment.Line,z*.755,ee*.055)),re.add(new go.PathSegment(go.PathSegment.Line,z*.93,ee*(1-le))),re.add(new go.PathSegment(go.PathSegment.Line,z*.64,ee*(1-le))),re.add(new go.PathSegment(go.PathSegment.Line,z*.61,ee*.75)),re.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.75)),re.add(new go.PathSegment(go.PathSegment.Line,z*.39,ee*.75)),re.add(new go.PathSegment(go.PathSegment.Line,z*.36,ee*(1-le))),re.add(new go.PathSegment(go.PathSegment.Line,z*.07,ee*(1-le))),re.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),ee*.055)),re.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*.055)),re.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*(1-le)).close()),ae}),go.Shape.defineFigureGenerator("Upload",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z*0,ee*1,!0);ae.add(re);var le=.1/.3;re.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*(1-le))),re.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.055)),re.add(new go.PathSegment(go.PathSegment.Line,z*.755,ee*.055)),re.add(new go.PathSegment(go.PathSegment.Line,z*.93,ee*(1-le))),re.add(new go.PathSegment(go.PathSegment.Line,z*.64,ee*(1-le))),re.add(new go.PathSegment(go.PathSegment.Line,z*.61,ee*.75)),re.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.75)),re.add(new go.PathSegment(go.PathSegment.Line,z*.39,ee*.75)),re.add(new go.PathSegment(go.PathSegment.Line,z*.36,ee*(1-le))),re.add(new go.PathSegment(go.PathSegment.Line,z*.07,ee*(1-le))),re.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),ee*.055)),re.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*.055)),re.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*(1-le)).close());var ue=new go.PathFigure(z*.5,ee*0,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.26,ee*.25)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.25)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.63)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.63)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.25)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.74,ee*.25).close()),ae}),go.Shape.defineFigureGenerator("EmptyDrink",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z*.15,ee*0,!1);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z*.85,ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*1).close()),ae}),go.Shape.defineFigureGenerator("Drink",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z*.15,ee*0,!1);ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z*.85,ee*0)),re.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*1).close());var le=new go.PathFigure(z*.235,ee*.28,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.765,ee*.28)),le.add(new go.PathSegment(go.PathSegment.Line,z*.655,ee*.97)),le.add(new go.PathSegment(go.PathSegment.Line,z*.345,ee*.97).close()),ae}),go.Shape.defineFigureGenerator("4Arrows",function(fe,z,ee){var ae=new go.Geometry,re=new go.PathFigure(z*.5,ee*0,!0);return ae.add(re),re.add(new go.PathSegment(go.PathSegment.Line,z*.65,ee*.25)),re.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.25)),re.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.45)),re.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.45)),re.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.35)),re.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.5)),re.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.65)),re.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.55)),re.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.55)),re.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.75)),re.add(new go.PathSegment(go.PathSegment.Line,z*.65,ee*.75)),re.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*1)),re.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*.75)),re.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.75)),re.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.55)),re.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.55)),re.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.65)),re.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*.5)),re.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.35)),re.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.45)),re.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.45)),re.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.25)),re.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*.25).close()),ae}),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")},98598: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 bn={},ln="5.0",$e={},rt=null,St=!1,ie=!1,Re=null,je=!1,ve=null,ce=null,be=0;be<arguments.length;be++){var Ce=arguments[be];if(Ce!==null)switch(typeof Ce){case"number":ln=Ce.toFixed(1);break;case"string":Ce.match(new RegExp("^[0-9]\\.[0-9]+$"))?ln=Ce:Re=Ce;break;case"object":typeof Ce.is3D!="undefined"?rt=Ce:$e=Ce;break;case"boolean":St=Ce,ie=!0;break}}rt===null&&(rt={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},$e.material_id!==void 0&&!ie&&(St=!0)),Re!==null&&$e.id===void 0&&($e.id=Re);var ye="",we="",me=!1,xe=null,fe=null,z=null,ee=!1,ae=null,re=null,le=null,ue=null,pe=null;$e.height!==void 0&&($e.height=Math.round($e.height)),$e.width!==void 0&&($e.width=Math.round($e.width));var Ee=function(mt){return parseFloat(mt)>4?parseFloat(mt):5};bn.setHTML5Codebase=function(mt,pt){ce=mt,xt(mt,pt)},bn.setJavaCodebase=bn.setJavaCodebaseVersion=bn.isCompiledInstalled=bn.setPreCompiledScriptPath=bn.setPreCompiledResourcePath=function(){},bn.setHTML5CodebaseVersion=function(mt,pt){var vt=parseFloat(mt);if(vt!==NaN&&vt<5){console.log("The GeoGebra HTML5 codebase version "+vt+" is deprecated. Using version latest instead.");return}ve=mt,it(mt,pt)},bn.getHTML5CodebaseVersion=function(){return fe},bn.getParameters=function(){return $e},bn.setFontsCSSURL=function(mt){ue=mt},bn.setGiacJSURL=function(mt){},bn.setJNLPFile=function(mt){ye=mt},bn.setJNLPBaseDir=function(mt){},bn.inject=function(){function mt(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var pt="auto",vt=$e.id,jt,At=!1,Kt=0;Kt<arguments.length;Kt++){var Ct=arguments[Kt];typeof Ct=="string"?(Ct=Ct.toLowerCase(),Ct.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?pt=Ct:vt=arguments[Kt]):typeof Ct=="boolean"?At=Ct:Ct instanceof HTMLElement&&(jt=Ct)}gt();function gt(){if(!je){setTimeout(gt,200);return}pt=Lt(pt);var tt=jt||document.getElementById(vt);if(!tt){console.log("possibly bug on ajax loading? ");return}if(bn.removeExistingApplet(tt,!1),$e.width===void 0&&tt.clientWidth&&($e.width=tt.clientWidth),$e.height===void 0&&tt.clientHeight&&($e.height=tt.clientHeight),!($e.width&&$e.height)&&pt==="html5"&&(delete $e.width,delete $e.height),xe=pt,pt==="screenshot")ze(tt,$e);else{var bt=!1;$e.hasOwnProperty("playButton")&&$e.playButton||$e.hasOwnProperty("clickToLoad")&&$e.clickToLoad?bt=!0:$e.hasOwnProperty("playButtonAutoDecide")&&$e.playButtonAutoDecide&&(bt=(!Pe()||mt())&&Ie()),bt?(xe="screenshot",st(tt,$e,At,pt)):Ye(tt,$e,At)}}};function Pe(){try{return window.self!==window.top}catch(mt){return!0}}function Ie(){return $e.hasOwnProperty("screenshotGenerator")&&$e.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}bn.getViews=function(){return rt},bn.isJavaInstalled=function(){return!1};var ke=function(mt){var pt=function(Kt){var Ct=JSON.parse(Kt),gt=function(Ke){return Ke.type=="G"||Ke.type=="E"},tt=Ct.elements?Ct.elements.filter(gt)[0]:Ct;if(!tt||!tt.url){vt();return}$e.fileName=tt.url,Ae(tt.settings||{}),rt.is3D=!0;var bt="https://www.geogebra.org/images/";bn.setPreviewImage(ae||tt.previewUrl,bt+"GeoGebra_loading.png",bt+"applet_play.png"),mt()},vt=function(){$e.onError&&$e.onError(),Et("Error: Fetching material (id "+$e.material_id+") failed.",$e)},jt=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",At="/materials/"+$e.material_id+"?scope=basic";Oe("https://"+jt+"/api/proxy.php?path="+encodeURIComponent(At),pt,vt)};function Ae(mt){var pt=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(vt){mt[vt]=!!mt[vt]}),pt.forEach(function(vt){$e[vt]===void 0&&mt[vt]!==void 0&&($e[vt]=mt[vt])}),$e.showToolBarHelp===void 0&&($e.showToolBarHelp=$e.showToolBar)}function Oe(mt,pt,vt){var jt=new XMLHttpRequest;jt.open("GET",mt),jt.onload=function(){pt(jt.responseText)},jt.onerror=vt,jt.send()}bn.isHTML5Installed=function(){return!0},bn.getLoadedAppletType=function(){return xe},bn.setPreviewImage=function(mt,pt,vt){ae=mt,re=pt,le=vt},bn.removeExistingApplet=function(mt,pt){var vt;typeof mt=="string"&&(mt=document.getElementById(mt)),xe=null;var jt=null;for(vt=0;vt<mt.childNodes.length;vt++){var At=mt.childNodes[vt],Kt=At.className;Kt==="applet_screenshot"?pt?(At.style.display="block",xe="screenshot"):At.style.display="none":Kt!=="applet_scaler prerender"&&(mt.removeChild(At),jt=Kt&&Kt.indexOf("appletParameters")!=-1?At.id:null,vt--)}var Ct=$e.id!==void 0?$e.id:jt,gt=window[Ct];gt&&typeof gt.getBase64=="function"&&(gt.remove(),window[Ct]=null)},bn.refreshHitPoints=function(){if(Ee(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var mt=bn.getAppletObject();return mt&&typeof mt.recalculateEnvironments=="function"?(mt.recalculateEnvironments(),!0):!1},bn.startAnimation=function(){var mt=bn.getAppletObject();return mt&&typeof mt.startAnimation=="function"?(mt.startAnimation(),!0):!1},bn.stopAnimation=function(){var mt=bn.getAppletObject();return mt&&typeof mt.stopAnimation=="function"?(mt.stopAnimation(),!0):!1},bn.getAppletObject=function(){var mt=$e.id!==void 0?$e.id:"ggbApplet";return window[mt]},bn.resize=function(){};var Fe=function(mt,pt,vt){var jt=document.createElement("param");jt.setAttribute("name",pt),jt.setAttribute("value",vt),mt.appendChild(jt)},_e=function(mt){return mt&&mt!=="false"},Ye=function(mt,pt,vt){Ee(fe)<=4.2&&(vt=!0);var jt=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==fe||ggbHTML5LoadedCodebaseIsWebSimple&&!ee)&&(jt=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var At=document.createElement("div");At.classList.add("appletParameters","notranslate");var Kt=pt.width,Ct=pt.height;if(pt.disableAutoScale=pt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():pt.disableAutoScale,pt.width!==void 0)if(Ee(fe)<=4.4)_e(pt.showToolBar)&&(pt.height-=7),_e(pt.showAlgebraInput)&&(pt.height-=37),pt.width<605&&_e(pt.showToolBar)&&(pt.width=605,Kt=605);else{var gt=100;(_e(pt.showToolBar)||_e(pt.showMenuBar))&&(pt.hasOwnProperty("customToolBar")&&(pt.customToolbar=pt.customToolBar),gt=_e(pt.showMenuBar)?245:155),Kt<gt&&(pt.width=gt,Kt=gt)}At.style.border="none",At.style.display="inline-block";for(var tt in pt)pt.hasOwnProperty(tt)&&tt!=="appletOnLoad"&&At.setAttribute("data-param-"+tt,pt[tt]);ue&&At.setAttribute("data-param-fontscssurl",ue),bn.resize=function(){GGBAppletUtils.responsiveResize(mt,pt)},window.addEventListener("resize",function(Le){bn.resize()});var bt=typeof pt.appletOnLoad=="function"?pt.appletOnLoad:function(){};if(!vt&&pt.width!==void 0){pt.hasOwnProperty("showSplash")||At.setAttribute("data-param-showSplash","false");var Ke=mt.querySelector(".applet_scaler.prerender"),ut=Ke!==null;if(ut)var wt=Ke.querySelector(".ggb_preview");else{var wt=ft(Kt,Ct,pt.borderColor,!1);Ke=document.createElement("div"),Ke.className="applet_scaler",Ke.style.position="relative",Ke.style.display="block",Ke.style.width=Kt+"px",Ke.style.height=Ct+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Ke,"66%"),Ee(fe)>=5?(pt.appletOnLoad=function(Le){var Ve=mt.querySelector(".ggb_preview");Ve&&Ve.parentNode.removeChild(Ve),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Ke),window.GGBT_wsf_view&&$(window).trigger("resize"),bt(Le)},ut||Ke.appendChild(wt)):At.appendChild(wt),Ke.appendChild(At),ut||mt.appendChild(Ke),setTimeout(function(){bn.resize()},1)}else{var yt=document.createElement("div");yt.className="applet_scaler",yt.style.position="relative",yt.style.display="block",yt.appendChild(At),mt.appendChild(yt),pt.appletOnLoad=function(Le){bn.resize(),bt(Le)}}function lt(Le,Ve){Ve&&typeof Ve.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Le,Ve.appletOnLoad):renderGGBElement(Le),Et("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Ve)}function Qe(Le,Ve){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Le,params:Ve}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(dt){lt(dt.article,dt.params)}),html5AppletsToProcess=null)},Ee(fe)<5&&(Le.className+=" geogebraweb")):lt(Le,Ve)}if(jt){scriptLoadStarted=!0;for(var We=0;We<At.childNodes.length;We++){var Ue=At.childNodes[We].tagName;Ue==="TABLE"&&(At.removeChild(At.childNodes[We]),We--)}if(ggbHTML5LoadedScript!==null){var qe=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');qe!=null&&qe.parentNode.removeChild(qe)}var He=document.createElement("script"),De=function(){Qe(At,pt)};He.src=we+z,ggbHTML5LoadedCodebaseIsWebSimple=ee,ggbHTML5LoadedCodebaseVersion=fe,ggbHTML5LoadedScript=He.src,Et("GeoGebra HTML5 codebase loaded: '"+we+"'.",pt),!ce&&(!ve||ve=="5.0")?(ee?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),De()):we.requirejs?__webpack_require__.e(7374).then(function(){var Le=[__webpack_require__(97374)];De.apply(null,Le)}.bind(this)).catch(__webpack_require__.oe):(He.onload=De,mt.appendChild(He))}else Qe(At,pt);pt.height=Ct,pt.width=Kt},ze=function(mt,pt,vt){var jt=ft(pt.width,pt.height,pt.borderColor,vt),At=document.createElement("div");At.style.position="relative",At.style.display="block",At.style.width=pt.width+"px",At.style.height=pt.height+"px",At.className="applet_screenshot applet_scaler"+(vt?" applet_screenshot_play":""),At.appendChild(jt);var Kt=GGBAppletUtils.getScale(pt,mt,vt);vt?(mt.appendChild(ht()),window.GGBT_wsf_view||(mt.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(At,"66%"),mt.appendChild(At),Kt!==1&&!isNaN(Kt)&&(GGBAppletUtils.scaleElement(At,Kt),At.style.width=pt.width+"px",At.style.height=pt.height+"px",At.parentNode.style.width=pt.width*Kt+"px",At.parentNode.style.height=pt.height*Kt+"px"),bn.resize=function(){Xe(mt,jt,At,vt)},window.addEventListener("resize",function(Ct){bn.resize()}),bn.resize()};function Xe(mt,pt,vt,jt){if(mt.contains(pt)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(mt.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(mt)}var At=GGBAppletUtils.getScale($e,mt,jt);vt.parentNode!==null&&(!isNaN(At)&&At!==1?(GGBAppletUtils.scaleElement(vt,At),vt.parentNode.style.width=$e.width*At+"px",vt.parentNode.style.height=$e.height*At+"px"):(GGBAppletUtils.scaleElement(vt,1),vt.parentNode.style.width=$e.width+"px",vt.parentNode.style.height=$e.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(mt),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}bn.onExitFullscreen=function(mt,pt){pt.appendChild(mt)};var st=function(mt,pt,vt,jt){ze(mt,pt,!0);for(var At=function(){var gt=[];for(Ct=0;Ct<mt.childNodes.length;Ct++)gt.push(mt.childNodes[Ct]);if(window.GGBT_wsf_view){var tt=window.GGBT_wsf_view.renderFullScreen(mt,pt.id),bt=document.getElementById("fullscreencontainer"),Ke=jQuery(mt).find(".fullscreencontent");Ke.length>0?(tt.remove(),Ke.attr("id","fullscreencontent").show(),jQuery(bt).append(Ke),window.dispatchEvent(new Event("resize"))):Ye(tt,pt,!1),window.GGBT_wsf_view.launchFullScreen(bt)}else xe=jt,Ye(mt,pt,!1);if(!window.GGBT_wsf_view)for(Ct=0;Ct<gt.length;Ct++)mt.removeChild(gt[Ct])},Kt=mt.getElementsByClassName("ggb_preview_play"),Ct=0;Ct<Kt.length;Ct++)Kt[Ct].addEventListener("click",At,!1),Kt[Ct].addEventListener("ontouchstart",At,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(mt),Ie()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},ht=function(){var mt=document.createElement("div");if(mt.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var pt='.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");}',vt=document.createElement("style");vt.styleSheet?vt.styleSheet.cssText=pt:vt.appendChild(document.createTextNode(pt)),document.getElementsByTagName("head")[0].appendChild(vt)}return mt},ft=function(mt,pt,vt,jt){var At=document.createElement("div");At.className="ggb_preview",At.style.position="absolute",At.style.zIndex="90",At.style.width=mt-2+"px",At.style.height=pt-2+"px",At.style.top="0px",At.style.left="0px",At.style.overflow="hidden",At.style.backgroundColor="white";var Kt="lightgrey";vt!==void 0&&(vt==="none"?Kt="transparent":Kt=vt),At.style.border="1px solid "+Kt;var Ct=document.createElement("img");if(Ct.style.position="relative",Ct.style.zIndex="1000",Ct.style.top="-1px",Ct.style.left="-1px",ae!==null&&Ct.setAttribute("src",ae),Ct.style.opacity=.7,re!==null){var gt,tt,bt;if(!jt){gt=document.createElement("img"),gt.style.position="absolute",gt.style.zIndex="1001",gt.style.opacity=1,Ct.style.opacity=.3,tt=360,tt>mt/4*3&&(tt=mt/4*3),bt=tt/5.8,gt.setAttribute("src",re),gt.setAttribute("width",tt),gt.setAttribute("height",bt);var Ke=(mt-tt)/2,ut=(pt-bt)/2;gt.style.left=Ke+"px",gt.style.top=ut+"px",At.appendChild(gt)}}return At.appendChild(Ct),At},Lt=function(mt){return mt=mt.toLowerCase(),mt==="html5"||mt==="screenshot"?mt:"html5"},et=["web","webSimple","web3d","tablet","tablet3d","phone"],it=function(mt,pt){if(fe=mt,pt){xt(fe,!0);return}var vt=!St;if(vt){var jt=Ee(fe);!isNaN(jt)&&jt<4.4&&(vt=!1)}var At,Kt;window.location.protocol.substr(0,4)==="http"?At=window.location.protocol:At="http:";var Ct=fe.indexOf("//");Ct>0?Kt=fe:Ct===0?Kt=At+fe:Kt="https://www.geogebra.org/apps/5.2.814.0/";for(var gt in et)if(fe.slice(et[gt].length*-1)===et[gt]||fe.slice((et[gt].length+1)*-1)===et[gt]+"/"){xt(Kt,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&vt&&!rt.is3D&&!rt.AV&&!rt.SV&&!rt.CV&&!rt.EV2&&!rt.CP&&!rt.PC&&!rt.DA&&!rt.FI&&!rt.PV&&!_e($e.showToolBar)&&!_e($e.showMenuBar)&&!_e($e.showAlgebraInput)&&!_e($e.enableRightClick)&&(!$e.appName||$e.appName=="classic")?Kt+="webSimple/":Kt+="web3d/",xt(Kt,!1)},xt=function(mt,pt){if(mt.requirejs){we=mt;return}mt.slice(-1)!=="/"&&(mt+="/"),we=mt,pt===null&&(pt=mt.indexOf("http")===-1),me=pt,z="web.nocache.js",ee=!1;var vt=we.split("/");vt.length>1&&(!pt&&vt[vt.length-2]==="webSimple"?(z="webSimple.nocache.js",ee=!0):et.indexOf(vt[vt.length-2])>=0&&(z=vt[vt.length-2]+".nocache.js")),vt=mt.split("/"),fe=vt[vt.length-3],fe.substr(0,4)==="test"?fe=fe.substr(4,1)+"."+fe.substr(5,1):(fe.substr(0,3)==="war"||fe.substr(0,4)==="beta")&&(fe="5.0");var jt=parseFloat(fe);jt!==NaN&&jt<5&&mt.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+jt+" is deprecated. Using version latest instead."),it("5.0",pt))},Et=function(mt,pt){window.console&&window.console.log&&(!pt||typeof pt.showLogging=="undefined"||pt.showLogging&&pt.showLogging!=="false")&&console.log(mt)};$e.material_id!==void 0?ke(Mt):Mt();function Mt(){var mt=ln;ve!==null?mt=ve:parseFloat(mt)<5&&(mt="5.0"),it(mt,!1),ce!==null&&xt(ce,me),je=!0}return bn},GGBAppletUtils=function(){"use strict";function bn(){return window.GGBT_wsf_edit!==void 0}function ln(je,ve){ve!=1?(je.style.transformOrigin="0% 0% 0px",je.style.webkitTransformOrigin="0% 0% 0px",je.style.transform="scale("+ve+","+ve+")",je.style.webkitTransform="scale("+ve+","+ve+")",je.style.maxWidth="initial",je.querySelector(".ggb_preview")!==null&&(je.querySelector(".ggb_preview").style.maxWidth="initial"),je.querySelectorAll(".ggb_preview img")[0]!==void 0&&(je.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),je.querySelectorAll(".ggb_preview img")[1]!==void 0&&(je.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(je.style.transform="none",je.style.webkitTransform="none")}function $e(je,ve,ce,be,Ce,ye){var we=null;if(ye!=null&&ye!="")for(var me=je.parentNode;me!=null;)if((" "+me.className+" ").indexOf(" "+ye+" ")>-1){we=me;break}else me=me.parentNode;var xe=0,fe=0,z=0,ee=0,ae=0,re=0,le=0;if(we)xe=we.offsetWidth,fe=Math.max(be?we.offsetWidth:0,we.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(xe=Math.min(window.innerWidth,document.documentElement.clientWidth),fe=Math.min(window.innerHeight,document.documentElement.clientHeight),z=xe):(xe=window.innerWidth,fe=window.innerHeight,z=window.innerWidth),je){var ue=je.getBoundingClientRect();ue.left>0&&ue.left<=xe&&(Ce===void 0||!Ce)&&(document.dir==="rtl"?(ae=xe-ue.width-ue.left,re=z<=480?10:30):(re=ue.left,ae=z<=480?10:30),ee=re+ae)}if(je&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var pe=je.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ee=40,le=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ee=0,le=40)}}return je&&((ce===void 0||!ce)&&ve>0&&ve+ee<xe?xe=ve:xe-=ee,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(ce===void 0||!ce)&&(fe-=le)),{width:xe,height:fe}}function rt(je,ve,ce,be,Ce){if(je.isScreenshoGenerator)return 1;var ye=be!==void 0&&be,we=je.noScaleMargin!=null&&je.noScaleMargin,me=function(pe){return pe&&pe!=="false"},xe=me(je.autoHeight),fe=$e(ve,je.width,ce,xe,ye&&window.GGBT_wsf_view||we,Ce),z=parseInt(fe.width),ee=je.width,ae=je.height;if(ee===void 0){var re=ve.querySelector(".appletParameters");re&&(ee=re.offsetWidth,ae=re.offsetHeight)}var le=z/ee,ue=ye?1:fe.height/ae;return ce!==void 0&&!ce&&(le=Math.min(1,le),ue=Math.min(1,ue)),Math.min(le,ue)}function St(je,ve,ce){var be=1,Ce,ye=!1;if(je.hasOwnProperty("allowUpscale")&&(ye=je.allowUpscale),je.hasOwnProperty("scale")&&(be=parseFloat(je.scale),(isNaN(be)||be===null||be===0)&&(be=1),be>1&&(ye=!0)),ve&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(ye=!0),!(je.hasOwnProperty("disableAutoScale")&&je.disableAutoScale))Ce=rt(je,ve,ye,ce,je.scaleContainerClass);else return be;return ye&&(!je.hasOwnProperty("scale")||be===1)?Ce:Math.min(be,Ce)}function ie(je){var ve=Math.min(window.innerWidth,document.documentElement.clientWidth),ce=Math.min(window.innerHeight,document.documentElement.clientHeight),be=je.getBoundingClientRect(),Ce=(ve-be.width)/2,ye=(ce-be.height)/2;ye<0&&(ye=0),je.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Ce<40?je.style.left="40px":je.style.left=Ce+"px",je.style.top=ye+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ye<40?je.style.top="40px":je.style.top=ye+"px",je.style.left=Ce+"px")}function Re(je,ve){var ce=je.querySelector(".appletParameters");if(ce){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ve.id!==ce.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(je)}if(ce.parentElement&&/fullscreen/.test(ce.parentElement.className))return;var be=St(ve,je);bn()&&ce.setAttribute("data-param-scale",be);for(var Ce=null,ye=0;ye<je.childNodes.length;ye++)if(je.childNodes[ye].className!==void 0&&je.childNodes[ye].className.match(/^applet_scaler/)){Ce=je.childNodes[ye];break}if(Ce!==null&&Ce.querySelector(".noscale")!==null)return;var we=ve.id!==void 0?ve.id:"ggbApplet",me=window[we];(me==null||!me.recalculateEnvironments)&&Ce!==null&&!Ce.className.match(/fullscreen/)&&(Ce.parentNode.style.transform="",!isNaN(be)&&be!==1?(Ce.parentNode.style.width=ve.width*be+"px",Ce.parentNode.style.height=ve.height*be+"px",ln(Ce,be)):(ln(Ce,1),Ce.parentNode.style.width=ve.width+"px",Ce.parentNode.style.height=ve.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&ie(je),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(ce).parents(".content-added-content"))}}return{responsiveResize:Re,isFlexibleWorksheetEditor:bn,positionCenter:ie,getScale:St,scaleElement:ln}}();__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 bn=n.location.search;return bn.indexOf(J)!=-1||bn.indexOf(K)!=-1}function q(bn,ln){}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(bn){var ln=s[L].bindings;s[L].bindings=function(){for(var $e=ln?ln():{},rt=bn[webModule.__softPermutationId],St=O;St<rt.length;St++){var ie=rt[St];$e[ie[O]]=ie[P]}return $e}};var t;function u(){return v(),t}function v(){if(!t){var bn=o.createElement(Q);if(bn.id=L,bn.style.cssText=R+S,bn.tabIndex=-1,o.body.appendChild(bn),t=bn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var ln=document.compatMode==U?V:W;t.write(ln+X),t.close()}}}function w(bn){function ln(rt){function St(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var ie=St();if(ie){rt();return}function Re(){if(!ie){if(!St())return;ie=!0,rt(),o.removeEventListener&&o.removeEventListener(Z,Re,!1),je&&clearInterval(je)}}o.addEventListener&&o.addEventListener(Z,Re,!1);var je=setInterval(function(){Re()},$)}function $e(rt){var St=u(),ie=St.body,Re=St.createElement(_);Re.language=ab,Re.crossOrigin=W,Re.src=rt,webModule.__errFn&&(Re.onerror=function(){webModule.__errFn(L,new Error(bb+rt))}),ie.appendChild(Re)}ln(function(){$e(bn)})}webModule.__startLoadingFragment=function(bn){return C(bn)},webModule.__installRunAsyncCode=function(bn){var ln=u(),$e=ln.body,rt=ln.createElement(_);rt.language=ab,rt.text=bn,$e.appendChild(rt),$e.removeChild(rt)};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(bn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(bn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(bn){var ln=c[bn];return ln==null?null:ln},r=d,webModule.__errFn=e}function B(){function bn(je){var ve=je.lastIndexOf(rb);ve==-1&&(ve=je.length);var ce=je.indexOf(sb);ce==-1&&(ce=je.length);var be=je.lastIndexOf(tb,Math.min(ce,ve));return be>=O?je.substring(O,be+P):W}function ln(je){if(!je.match(/^\w+:\/\//)){var ve=o.createElement(ub);ve.src=je+vb,je=bn(ve.src)}return je}function $e(){var je=__gwt_getMetaProperty(wb);return je!=null?je:W}function rt(){for(var je=o.getElementsByTagName(_),ve=O;ve<je.length;++ve)if(je[ve].src.indexOf(xb)!=-1)return bn(je[ve].src);return W}function St(){var je=o.getElementsByTagName(yb);return je.length>O?je[je.length-P].href:W}function ie(){var je=o.location;return je.href==je.protocol+zb+je.host+je.pathname+je.search+je.hash}var Re=$e();return Re==W&&(Re=rt()),Re==W&&(Re=St()),Re==W&&ie()&&(Re=bn(o.location.href)),Re=ln(Re),Re}function C(bn){return bn.match(/^\//)||bn.match(/^[a-zA-Z]+:\/\//)?bn:webModule.__moduleBase+bn}function D(){var bn=[],ln=O,$e=[],rt=[];function St(je){var ve=rt[je](),ce=$e[je];if(ve in ce)return ve;var be=[];for(var Ce in ce)be[ce[Ce]]=Ce;throw r&&r(je,be,ve),null}if(__gwt_isKnownPropertyValue=function(je,ve){return ve in $e[je]},webModule.__getPropMap=function(){var je={};for(var ve in $e)$e.hasOwnProperty(ve)&&(je[ve]=St(ve));return je},webModule.__computePropValue=St,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var ie;try{ie=Cb;var Re=ie.indexOf(Db);Re!=-1&&(ln=parseInt(ie.substring(Re+P),$),ie=ie.substring(O,Re))}catch(je){}return webModule.__softPermutationId=ln,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})()},58788:function(bn,ln,$e){"use strict";$e.d(ln,{Ax:function(){return Re},Ds:function(){return je},KI:function(){return ce},SI:function(){return ie},f1:function(){return St}});var rt=$e(10148);function St(be){let Ce=!0;if(be.length>0){for(let ye=0;ye<be.length;ye++)if(be[ye].compile_success==0||!be[ye].compile_success){Ce=!1;break}}else Ce=!1;return Ce}function ie(be,Ce=""){let ye=[];for(let we=0;we<be.length;we++){let me=be[we],xe=Ce?`${Ce}/${me.name}`:`${me.name}`;ye.push({title:me.name,type:me.type,isLeaf:me.type!=="tree",key:xe})}return ye}function Re(be,Ce,ye){for(let we=0;we<be.length;we++){let me=be[we];if(me.key===Ce){me.children=ye;break}me.children&&Re(me.children,Ce,ye)}return be}function je(be,Ce,ye){let we;return function(){let me=this,xe=arguments,fe=function(){we=null,ye||be.apply(me,xe)},z=ye&&!we;clearTimeout(we),we=setTimeout(fe,Ce),z&&be.apply(me,xe)}}const ve=!0,ce=rt.Z.API_SERVER},65983:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return qe}});var rt=$e(59301),St={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},ie=$e(92310),Re=$e.n(ie),je=$e(71418);var ve=function(He,De){return(ve=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Le,Ve){Le.__proto__=Ve}||function(Le,Ve){for(var dt in Ve)Object.prototype.hasOwnProperty.call(Ve,dt)&&(Le[dt]=Ve[dt])})(He,De)};function ce(He,De){function Le(){this.constructor=He}ve(He,De),He.prototype=De===null?Object.create(De):(Le.prototype=De.prototype,new Le)}function be(He,De,Le,Ve){return new(Le||(Le=Promise))(function(dt,Ze){function Tt(kt){try{Qt(Ve.next(kt))}catch(Nt){Ze(Nt)}}function _t(kt){try{Qt(Ve.throw(kt))}catch(Nt){Ze(Nt)}}function Qt(kt){var Nt;kt.done?dt(kt.value):(Nt=kt.value,Nt instanceof Le?Nt:new Le(function(Zt){Zt(Nt)})).then(Tt,_t)}Qt((Ve=Ve.apply(He,De||[])).next())})}function Ce(He,De){var Le,Ve,dt,Ze,Tt={label:0,sent:function(){if(1&dt[0])throw dt[1];return dt[1]},trys:[],ops:[]};return Ze={next:_t(0),throw:_t(1),return:_t(2)},typeof Symbol=="function"&&(Ze[Symbol.iterator]=function(){return this}),Ze;function _t(Qt){return function(kt){return function(Nt){if(Le)throw new TypeError("Generator is already executing.");for(;Tt;)try{if(Le=1,Ve&&(dt=2&Nt[0]?Ve.return:Nt[0]?Ve.throw||((dt=Ve.return)&&dt.call(Ve),0):Ve.next)&&!(dt=dt.call(Ve,Nt[1])).done)return dt;switch(Ve=0,dt&&(Nt=[2&Nt[0],dt.value]),Nt[0]){case 0:case 1:dt=Nt;break;case 4:return Tt.label++,{value:Nt[1],done:!1};case 5:Tt.label++,Ve=Nt[1],Nt=[0];continue;case 7:Nt=Tt.ops.pop(),Tt.trys.pop();continue;default:if(dt=Tt.trys,!((dt=dt.length>0&&dt[dt.length-1])||Nt[0]!==6&&Nt[0]!==2)){Tt=0;continue}if(Nt[0]===3&&(!dt||Nt[1]>dt[0]&&Nt[1]<dt[3])){Tt.label=Nt[1];break}if(Nt[0]===6&&Tt.label<dt[1]){Tt.label=dt[1],dt=Nt;break}if(dt&&Tt.label<dt[2]){Tt.label=dt[2],Tt.ops.push(Nt);break}dt[2]&&Tt.ops.pop(),Tt.trys.pop();continue}Nt=De.call(He,Tt)}catch(Zt){Nt=[6,Zt],Ve=0}finally{Le=dt=0}if(5&Nt[0])throw Nt[1];return{value:Nt[0]?Nt[1]:void 0,done:!0}}([Qt,kt])}}}function ye(){for(var He=0,De=0,Le=arguments.length;De<Le;De++)He+=arguments[De].length;var Ve=Array(He),dt=0;for(De=0;De<Le;De++)for(var Ze=arguments[De],Tt=0,_t=Ze.length;Tt<_t;Tt++,dt++)Ve[dt]=Ze[Tt];return Ve}var we=function(){function He(){}return He.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},He.setAttributes=function(De,Le){for(var Ve=0,dt=Le;Ve<dt.length;Ve++){var Ze=dt[Ve],Tt=Ze[0],_t=Ze[1];De.setAttribute(Tt,_t)}},He.createRect=function(De,Le,Ve){var dt=document.createElementNS("http://www.w3.org/2000/svg","rect");return dt.setAttribute("width",De.toString()),dt.setAttribute("height",Le.toString()),Ve&&He.setAttributes(dt,Ve),dt},He.createLine=function(De,Le,Ve,dt,Ze){var Tt=document.createElementNS("http://www.w3.org/2000/svg","line");return Tt.setAttribute("x1",De.toString()),Tt.setAttribute("y1",Le.toString()),Tt.setAttribute("x2",Ve.toString()),Tt.setAttribute("y2",dt.toString()),Ze&&He.setAttributes(Tt,Ze),Tt},He.createPolygon=function(De,Le){var Ve=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Ve.setAttribute("points",De),Le&&He.setAttributes(Ve,Le),Ve},He.createCircle=function(De,Le){var Ve=document.createElementNS("http://www.w3.org/2000/svg","circle");return Ve.setAttribute("cx",(De/2).toString()),Ve.setAttribute("cy",(De/2).toString()),Ve.setAttribute("r",De.toString()),Le&&He.setAttributes(Ve,Le),Ve},He.createEllipse=function(De,Le,Ve){var dt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return dt.setAttribute("cx",(De/2).toString()),dt.setAttribute("cy",(Le/2).toString()),dt.setAttribute("rx",(De/2).toString()),dt.setAttribute("ry",(Le/2).toString()),Ve&&He.setAttributes(dt,Ve),dt},He.createGroup=function(De){var Le=document.createElementNS("http://www.w3.org/2000/svg","g");return De&&He.setAttributes(Le,De),Le},He.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},He.createMarker=function(De,Le,Ve,dt,Ze,Tt,_t){var Qt=document.createElementNS("http://www.w3.org/2000/svg","marker");return He.setAttributes(Qt,[["id",De],["orient",Le],["markerWidth",Ve.toString()],["markerHeight",dt.toString()],["refX",Ze.toString()],["refY",Tt.toString()]]),Qt.appendChild(_t),Qt},He.createText=function(De){var Le=document.createElementNS("http://www.w3.org/2000/svg","text");return Le.setAttribute("x","0"),Le.setAttribute("y","0"),De&&He.setAttributes(Le,De),Le},He.createTSpan=function(De,Le){var Ve=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Ve.textContent=De,Le&&He.setAttributes(Ve,Le),Ve},He.createImage=function(De){var Le=document.createElementNS("http://www.w3.org/2000/svg","image");return De&&He.setAttributes(Le,De),Le},He.createPoint=function(De,Le){var Ve=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Ve.x=De,Ve.y=Le,Ve},He.createPath=function(De,Le){var Ve=document.createElementNS("http://www.w3.org/2000/svg","path");return Ve.setAttribute("d",De),Le&&He.setAttributes(Ve,Le),Ve},He}(),me=function(){function He(){}return He.addKey=function(De){He.key=De},Object.defineProperty(He,"isLicensed",{get:function(){return!!He.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(He.key)},enumerable:!1,configurable:!0}),He}(),xe=function(){function He(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return He.prototype.rasterize=function(De,Le,Ve){var dt=this;return new Promise(function(Ze){var Tt=Ve!==void 0?Ve:document.createElement("canvas");De===null&&(dt.markersOnly=!0,dt.naturalSize=!1);var _t=document.createElementNS("http://www.w3.org/2000/svg","svg");_t.setAttribute("xmlns","http://www.w3.org/2000/svg"),_t.setAttribute("width",Le.width.baseVal.valueAsString),_t.setAttribute("height",Le.height.baseVal.valueAsString),_t.setAttribute("viewBox","0 0 "+Le.viewBox.baseVal.width.toString()+" "+Le.viewBox.baseVal.height.toString()),_t.innerHTML=Le.innerHTML,dt.naturalSize===!0?(_t.width.baseVal.value=De.naturalWidth,_t.height.baseVal.value=De.naturalHeight):dt.width!==void 0&&dt.height!==void 0&&(_t.width.baseVal.value=dt.width,_t.height.baseVal.value=dt.height),Tt.width=_t.width.baseVal.value,Tt.height=_t.height.baseVal.value;var Qt=_t.outerHTML,kt=Tt.getContext("2d");dt.markersOnly!==!0&&kt.drawImage(De,0,0,Tt.width,Tt.height);var Nt=window.URL,Zt=new Image(Tt.width,Tt.height);Zt.setAttribute("crossOrigin","anonymous");var on=new Blob([Qt],{type:"image/svg+xml"}),vn=Nt.createObjectURL(on);Zt.onload=function(){kt.drawImage(Zt,0,0),Nt.revokeObjectURL(vn);var kn=Tt.toDataURL(dt.imageType,dt.imageQuality);Ze(kn)},Zt.src=vn})},He}(),fe=function(){},z=function(){function He(De){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+De+"_"}return Object.defineProperty(He.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(He.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(He.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),He.prototype.addClass=function(De){return this.styleSheet===void 0&&this.addStyleSheet(),De.name=""+this.classNamePrefix+De.localName,this.classes.push(De),this.styleSheet.sheet.insertRule("."+De.name+" {"+De.style+"}",this.styleSheet.sheet.cssRules.length),De},He.prototype.addRule=function(De){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(De),this.styleSheet.sheet.insertRule(De.selector+" {"+De.style+"}",this.styleSheet.sheet.cssRules.length)},He.prototype.addStyleSheet=function(){var De;this.styleSheet=document.createElement("style"),((De=this.styleSheetRoot)!==null&&De!==void 0?De:document.head).appendChild(this.styleSheet),this.addRule(new ee("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new ee("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new ee("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new ae("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new ae("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},He.prototype.removeStyleSheet=function(){var De;this.styleSheet&&(((De=this.styleSheetRoot)!==null&&De!==void 0?De:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},He}(),ee=function(He,De){this.selector=He,this.style=De},ae=function(He,De){this.localName=He,this.style=De},re=function(){function He(De,Le,Ve,dt,Ze){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=De,this.displayMode=Le,this.markerItems=Ve,this.uiStyleSettings=dt,this.styles=Ze,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return He.prototype.show=function(De){var Le=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=De,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Ve=document.createElement("div");Ve.className=this.toolbarBlockStyleClass.name,Ve.style.whiteSpace="nowrap",this.uiContainer.appendChild(Ve),this.addActionButton(Ve,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(Ve,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(Ve,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(Ve,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(Ve,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(Ve,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(Ve,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(Ve,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(Ze){var Tt=document.createElement("div");Tt.className=""+Le.toolbarButtonStyleClass.name,Tt.setAttribute("data-type-name",Ze.typeName),Tt.innerHTML=Ze.icon,Tt.addEventListener("click",function(){Le.markerToolbarButtonClicked(Tt,Ze)}),Le.buttons.push(Tt),Le.markerButtons.push(Tt)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var dt=document.createElement("div");dt.className=this.toolbarBlockStyleClass.name,dt.style.whiteSpace="nowrap",dt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(dt),this.addActionButton(dt,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(dt,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},He.prototype.addButtonClickListener=function(De){this.buttonClickListeners.push(De)},He.prototype.removeButtonClickListener=function(De){this.buttonClickListeners.indexOf(De)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(De),1)},He.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},He.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var De=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Le=0;Le<this.markerButtons.length;Le++)Le<De||Le===De&&this.markerButtons.length-1===De?this.markerButtonBlock.appendChild(this.markerButtons[Le]):(Le===De&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Le]))}},He.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")},He.prototype.resetButtonStyles=function(){var De=this;this.buttons.forEach(function(Le){Le.className=Le.className.replace(De.uiStyleSettings.toolbarButtonStyleColorsClassName?De.uiStyleSettings.toolbarButtonStyleColorsClassName:De.toolbarButtonStyleColorsClass.name,"").trim(),Le.className=Le.className.replace(De.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?De.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:De.toolbarActiveButtonStyleColorsClass.name,"").trim(),Le.className+=" "+(De.uiStyleSettings.toolbarButtonStyleColorsClassName?De.uiStyleSettings.toolbarButtonStyleColorsClassName:De.toolbarButtonStyleColorsClass.name)})},He.prototype.addActionButton=function(De,Le,Ve){var dt=this,Ze=document.createElement("div");switch(Ze.className=""+this.toolbarButtonStyleClass.name,Ze.innerHTML=Le,Ze.setAttribute("data-action",Ve),Ze.addEventListener("click",function(){dt.actionToolbarButtonClicked(Ze,Ve)}),Ve){case"select":Ze.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Ze.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Ze.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Ze.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Ze.style.fill=this.uiStyleSettings.closeButtonColor}De.appendChild(Ze),this.buttons.push(Ze)},He.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ae("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 ae("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ae("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ae("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 ae("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var De=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ae("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*De)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*De)+`px;
padding: `+De+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new ae("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ae("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new ee("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new ee("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},He.prototype.markerToolbarButtonClicked=function(De,Le){this.setActiveButton(De),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Ve){return Ve("marker",Le)}),this.markerButtonOverflowBlock.style.display="none"},He.prototype.actionToolbarButtonClicked=function(De,Le){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Ve){return Ve("action",Le)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},He.prototype.setActiveButton=function(De){this.resetButtonStyles(),De.className=De.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),De.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},He.prototype.setActiveMarkerButton=function(De){var Le=this.markerButtons.find(function(Ve){return Ve.getAttribute("data-type-name")===De});Le&&this.setActiveButton(Le)},He.prototype.setCurrentMarker=function(De){var Le=this;this.currentMarker=De,this.buttons.filter(function(Ve){return/delete|notes/.test(Ve.getAttribute("data-action"))}).forEach(function(Ve){Le.currentMarker===void 0?(Ve.style.fillOpacity="0.4",Ve.style.pointerEvents="none"):(Ve.style.fillOpacity="1",Ve.style.pointerEvents="all")})},He}(),le=function(){function He(De,Le,Ve,dt){this.panels=[],this.panelButtons=[],this.markerjsContainer=De,this.displayMode=Le,this.uiStyleSettings=Ve,this.styles=dt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return He.prototype.addStyles=function(){var De;this.toolboxStyleClass=this.styles.addClass(new ae("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 ae("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var Le=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ae("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ae("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ae("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 ae("toolbox-panel-row_colors",`
background-color: `+((De=this.uiStyleSettings.toolboxBackgroundColor)!==null&&De!==void 0?De:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ae("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*Le)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*Le)+`px;
padding: `+Le+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ae("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ae("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new ee("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new ee("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},He.prototype.show=function(De){var Le;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=De,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Le=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Le!==void 0?Le:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},He.prototype.setPanelButtons=function(De){var Le,Ve,dt=this;this.panels=De,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Le=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Le!==void 0?Le:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Ve=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Ve!==void 0?Ve:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Ze){var Tt;Ze.uiStyleSettings=dt.uiStyleSettings;var _t=document.createElement("div");_t.className=dt.toolboxButtonStyleClass.name+" "+((Tt=dt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Tt!==void 0?Tt:dt.toolboxButtonStyleColorsClass.name),_t.innerHTML=Ze.icon,_t.title=Ze.title,_t.addEventListener("click",function(){dt.panelButtonClick(Ze)}),dt.panelButtons.push(_t),dt.buttonRow.appendChild(_t)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},He.prototype.panelButtonClick=function(De){var Le=this,Ve=-1;if(De!==this.activePanel){Ve=this.panels.indexOf(De),this.panelRow.innerHTML="";var dt=De.getUi();dt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(dt),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=De}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Le.displayMode==="inline"?Le.panelRow.style.display="none":Le.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Ze,Tt){var _t,Qt;Ze.className=Le.toolboxButtonStyleClass.name+" "+(Tt===Ve?""+((_t=Le.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&_t!==void 0?_t:Le.toolboxActiveButtonStyleColorsClass.name):""+((Qt=Le.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Qt!==void 0?Qt:Le.toolboxButtonStyleColorsClass.name))})},He}(),ue=function(He,De){this.title=He,this.icon=De},pe=function(He){function De(Le,Ve,dt,Ze){var Tt=He.call(this,Le,Ze||'<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 Tt.colors=[],Tt.addTransparent=!1,Tt.colorBoxes=[],Tt.colors=Ve,Tt.currentColor=dt,Tt.setCurrentColor=Tt.setCurrentColor.bind(Tt),Tt.getColorBox=Tt.getColorBox.bind(Tt),Tt}return ce(De,He),De.prototype.getUi=function(){var Le=this,Ve=document.createElement("div");return Ve.style.overflow="hidden",Ve.style.whiteSpace="nowrap",this.colors.forEach(function(dt){var Ze=Le.getColorBox(dt);Ve.appendChild(Ze),Le.colorBoxes.push(Ze)}),Ve},De.prototype.getColorBox=function(Le){var Ve=this,dt=this.uiStyleSettings.toolbarHeight/4,Ze=this.uiStyleSettings.toolbarHeight-dt,Tt=document.createElement("div");Tt.style.display="inline-block",Tt.style.boxSizing="content-box",Tt.style.width=Ze-2+"px",Tt.style.height=Ze-2+"px",Tt.style.padding="1px",Tt.style.marginRight="2px",Tt.style.marginBottom="2px",Tt.style.borderWidth="2px",Tt.style.borderStyle="solid",Tt.style.borderRadius=(Ze+2)/2+"px",Tt.style.borderColor=Le===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Tt.addEventListener("click",function(){Ve.setCurrentColor(Le,Tt)});var _t=document.createElement("div");return _t.style.display="inline-block",_t.style.width=Ze-2+"px",_t.style.height=Ze-2+"px",_t.style.backgroundColor=Le,_t.style.borderRadius=Ze/2+"px",Le==="transparent"&&(_t.style.fill=this.uiStyleSettings.toolboxAccentColor,_t.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>`),Tt.appendChild(_t),Tt},De.prototype.setCurrentColor=function(Le,Ve){var dt=this;this.currentColor=Le,this.colorBoxes.forEach(function(Ze){Ze.style.borderColor=Ze===Ve?dt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Le)},De}(ue),Ee=function(){function He(De,Le,Ve){this._state="new",this._isSelected=!1,this._container=De,this._overlayContainer=Le,this.globalSettings=Ve,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(He.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),He.prototype.ownsTarget=function(De){return!1},Object.defineProperty(He.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),He.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},He.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},He.prototype.pointerDown=function(De,Le){},He.prototype.dblClick=function(De,Le){},He.prototype.manipulate=function(De){},He.prototype.pointerUp=function(De){this.stateChanged()},He.prototype.dispose=function(){},He.prototype.addMarkerVisualToContainer=function(De){this.container.childNodes.length>0?this.container.insertBefore(De,this.container.childNodes[0]):this.container.appendChild(De)},He.prototype.getState=function(){return{typeName:He.typeName,state:this.state,notes:this.notes}},He.prototype.restoreState=function(De){this._state=De.state,this.notes=De.notes},He.prototype.scale=function(De,Le){},He.prototype.colorChanged=function(De){this.onColorChanged&&this.onColorChanged(De),this.stateChanged()},He.prototype.fillColorChanged=function(De){this.onFillColorChanged&&this.onFillColorChanged(De),this.stateChanged()},He.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var De=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),De.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(De)&&this.onStateChanged(this)}},He.typeName="MarkerBase",He}(),Pe=function(){function He(){this.findGripByVisual=this.findGripByVisual.bind(this)}return He.prototype.findGripByVisual=function(De){return this.topLeft.ownsTarget(De)?this.topLeft:this.topCenter.ownsTarget(De)?this.topCenter:this.topRight.ownsTarget(De)?this.topRight:this.centerLeft.ownsTarget(De)?this.centerLeft:this.centerRight.ownsTarget(De)?this.centerRight:this.bottomLeft.ownsTarget(De)?this.bottomLeft:this.bottomCenter.ownsTarget(De)?this.bottomCenter:this.bottomRight.ownsTarget(De)?this.bottomRight:void 0},He}(),Ie=function(){function He(){this.GRIP_SIZE=10,this.visual=we.createGroup(),this.visual.appendChild(we.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(we.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return He.prototype.ownsTarget=function(De){return De===this.visual||De===this.visual.childNodes[0]||De===this.visual.childNodes[1]},He}(),ke=function(){function He(){}return He.toITransformMatrix=function(De){return{a:De.a,b:De.b,c:De.c,d:De.d,e:De.e,f:De.f}},He.toSVGMatrix=function(De,Le){return De.a=Le.a,De.b=Le.b,De.c=Le.c,De.d=Le.d,De.e=Le.e,De.f=Le.f,De},He}(),Ae=function(He){function De(Le,Ve,dt){var Ze=He.call(this,Le,Ve,dt)||this;return Ze.left=0,Ze.top=0,Ze.width=0,Ze.height=0,Ze.defaultSize={x:50,y:20},Ze.offsetX=0,Ze.offsetY=0,Ze.rotationAngle=0,Ze.CB_DISTANCE=10,Ze._suppressMarkerCreateEvent=!1,Ze.container.transform.baseVal.appendItem(we.createTransform()),Ze.setupControlBox(),Ze}return ce(De,He),Object.defineProperty(De.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(De.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(De.prototype,"visual",{get:function(){return this._visual},set:function(Le){this._visual=Le;var Ve=we.createTransform();this._visual.transform.baseVal.appendItem(Ve)},enumerable:!1,configurable:!0}),De.prototype.ownsTarget=function(Le){return!!He.prototype.ownsTarget.call(this,Le)||!!(this.controlGrips.findGripByVisual(Le)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Le))},De.prototype.pointerDown=function(Le,Ve){He.prototype.pointerDown.call(this,Le,Ve),this.state==="new"&&(this.left=Le.x,this.top=Le.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var dt=this.unrotatePoint(Le);if(this.manipulationStartX=dt.x,this.manipulationStartY=dt.y,this.offsetX=dt.x-this.left,this.offsetY=dt.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Ve),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Ve)){this.activeGrip=this.rotatorGrip;var Ze=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Ze.x-this.width/2,this.top=Ze.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Tt=this.container.transform.baseVal.getItem(0);Tt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Tt,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},De.prototype.pointerUp=function(Le){var Ve=this.state;He.prototype.pointerUp.call(this,Le),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Le),this._state="select",Ve==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},De.prototype.moveVisual=function(Le){this.visual.style.transform="translate("+Le.x+"px, "+Le.y+"px)"},De.prototype.manipulate=function(Le){var Ve=this.unrotatePoint(Le);this.state==="creating"?this.resize(Le):this.state==="move"?(this.left=this.manipulationStartLeft+(Ve.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Ve.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Ve):this.state==="rotate"&&this.rotate(Le)},De.prototype.resize=function(Le){var Ve=this.manipulationStartLeft,dt=this.manipulationStartWidth,Ze=this.manipulationStartTop,Tt=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Ve=this.manipulationStartLeft+Le.x-this.manipulationStartX,dt=this.manipulationStartWidth+this.manipulationStartLeft-Ve;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:dt=this.manipulationStartWidth+Le.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Ze=this.manipulationStartTop+Le.y-this.manipulationStartY,Tt=this.manipulationStartHeight+this.manipulationStartTop-Ze;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Tt=this.manipulationStartHeight+Le.y-this.manipulationStartY}dt>=0?(this.left=Ve,this.width=dt):(this.left=Ve+dt,this.width=-dt),Tt>=0?(this.top=Ze,this.height=Tt):(this.top=Ze+Tt,this.height=-Tt),this.setSize()},De.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},De.prototype.rotate=function(Le){if(Math.abs(Le.x-this.centerX)>.1){var Ve=Math.sign(Le.x-this.centerX);this.rotationAngle=180*Math.atan((Le.y-this.centerY)/(Le.x-this.centerX))/Math.PI+90*Ve,this.applyRotation()}},De.prototype.applyRotation=function(){var Le=this.container.transform.baseVal.getItem(0);Le.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Le,0)},De.prototype.rotatePoint=function(Le){if(this.rotationAngle===0)return Le;var Ve=this.container.getCTM(),dt=we.createPoint(Le.x,Le.y);return{x:(dt=dt.matrixTransform(Ve)).x,y:dt.y}},De.prototype.unrotatePoint=function(Le){if(this.rotationAngle===0)return Le;var Ve=this.container.getCTM();Ve=Ve.inverse();var dt=we.createPoint(Le.x,Le.y);return{x:(dt=dt.matrixTransform(Ve)).x,y:dt.y}},De.prototype.select=function(){He.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},De.prototype.deselect=function(){He.prototype.deselect.call(this),this.controlBox.style.display="none"},De.prototype.setupControlBox=function(){this.controlBox=we.createGroup();var Le=we.createTransform();Le.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Le),this.container.appendChild(this.controlBox),this.controlRect=we.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=we.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new Pe,this.addControlGrips(),this.controlBox.style.display="none"},De.prototype.adjustControlBox=function(){var Le=this.controlBox.transform.baseVal.getItem(0);Le.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Le,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},De.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()},De.prototype.createGrip=function(){var Le=new Ie;return Le.visual.transform.baseVal.appendItem(we.createTransform()),this.controlBox.appendChild(Le.visual),Le},De.prototype.positionGrips=function(){var Le=this.controlGrips.topLeft.GRIP_SIZE,Ve=-Le/2,dt=Ve,Ze=(this.width+this.CB_DISTANCE)/2-Le/2,Tt=(this.height+this.CB_DISTANCE)/2-Le/2,_t=this.height+this.CB_DISTANCE-Le/2,Qt=this.width+this.CB_DISTANCE-Le/2;this.positionGrip(this.controlGrips.topLeft.visual,Ve,dt),this.positionGrip(this.controlGrips.topCenter.visual,Ze,dt),this.positionGrip(this.controlGrips.topRight.visual,Qt,dt),this.positionGrip(this.controlGrips.centerLeft.visual,Ve,Tt),this.positionGrip(this.controlGrips.centerRight.visual,Qt,Tt),this.positionGrip(this.controlGrips.bottomLeft.visual,Ve,_t),this.positionGrip(this.controlGrips.bottomCenter.visual,Ze,_t),this.positionGrip(this.controlGrips.bottomRight.visual,Qt,_t),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Ze,dt-3*this.CB_DISTANCE)},De.prototype.positionGrip=function(Le,Ve,dt){var Ze=Le.transform.baseVal.getItem(0);Ze.setTranslate(Ve,dt),Le.transform.baseVal.replaceItem(Ze,0)},De.prototype.hideControlBox=function(){this.controlBox.style.display="none"},De.prototype.showControlBox=function(){this.controlBox.style.display=""},De.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ke.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ke.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},He.prototype.getState.call(this))},De.prototype.restoreState=function(Le){He.prototype.restoreState.call(this,Le);var Ve=Le;this.left=Ve.left,this.top=Ve.top,this.width=Ve.width,this.height=Ve.height,this.rotationAngle=Ve.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ke.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Ve.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ke.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Ve.containerTransformMatrix))},De.prototype.scale=function(Le,Ve){He.prototype.scale.call(this,Le,Ve);var dt=this.rotatePoint({x:this.left,y:this.top}),Ze=this.unrotatePoint({x:dt.x*Le,y:dt.y*Ve});this.left=Ze.x,this.top=Ze.y,this.width=this.width*Le,this.height=this.height*Ve,this.adjustControlBox()},De}(Ee),Oe=function(He){function De(Le,Ve,dt){var Ze=He.call(this,Le,Ve,dt)||this;return Ze.fillColor="transparent",Ze.strokeColor="transparent",Ze.strokeWidth=0,Ze.strokeDasharray="",Ze.opacity=1,Ze.setStrokeColor=Ze.setStrokeColor.bind(Ze),Ze.setFillColor=Ze.setFillColor.bind(Ze),Ze.setStrokeWidth=Ze.setStrokeWidth.bind(Ze),Ze.setStrokeDasharray=Ze.setStrokeDasharray.bind(Ze),Ze.createVisual=Ze.createVisual.bind(Ze),Ze}return ce(De,He),De.prototype.ownsTarget=function(Le){return!(!He.prototype.ownsTarget.call(this,Le)&&Le!==this.visual)},De.prototype.createVisual=function(){this.visual=we.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)},De.prototype.pointerDown=function(Le,Ve){He.prototype.pointerDown.call(this,Le,Ve),this.state==="new"&&(this.createVisual(),this.moveVisual(Le),this._state="creating")},De.prototype.manipulate=function(Le){He.prototype.manipulate.call(this,Le)},De.prototype.resize=function(Le){He.prototype.resize.call(this,Le),this.setSize()},De.prototype.setSize=function(){He.prototype.setSize.call(this),we.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},De.prototype.pointerUp=function(Le){He.prototype.pointerUp.call(this,Le),this.setSize()},De.prototype.setStrokeColor=function(Le){this.strokeColor=Le,this.visual&&we.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Le),this.stateChanged()},De.prototype.setFillColor=function(Le){this.fillColor=Le,this.visual&&we.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},De.prototype.setStrokeWidth=function(Le){this.strokeWidth=Le,this.visual&&we.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},De.prototype.setStrokeDasharray=function(Le){this.strokeDasharray=Le,this.visual&&we.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},De.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},He.prototype.getState.call(this))},De.prototype.restoreState=function(Le){var Ve=Le;this.fillColor=Ve.fillColor,this.strokeColor=Ve.strokeColor,this.strokeWidth=Ve.strokeWidth,this.strokeDasharray=Ve.strokeDasharray,this.opacity=Ve.opacity,this.createVisual(),He.prototype.restoreState.call(this,Le),this.setSize()},De.prototype.scale=function(Le,Ve){He.prototype.scale.call(this,Le,Ve),this.setSize()},De.title="Rectangle marker",De}(Ae),Fe=function(He){function De(Le,Ve,dt,Ze){var Tt=He.call(this,Le,Ze||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Tt.widths=[],Tt.widthBoxes=[],Tt.widths=Ve,Tt.currentWidth=dt,Tt.setCurrentWidth=Tt.setCurrentWidth.bind(Tt),Tt}return ce(De,He),De.prototype.getUi=function(){var Le=this,Ve=document.createElement("div");return Ve.style.display="flex",Ve.style.overflow="hidden",Ve.style.flexGrow="2",this.widths.forEach(function(dt){var Ze=document.createElement("div");Ze.style.display="flex",Ze.style.flexGrow="2",Ze.style.alignItems="center",Ze.style.justifyContent="space-between",Ze.style.padding="5px",Ze.style.borderWidth="2px",Ze.style.borderStyle="solid",Ze.style.borderColor=dt===Le.currentWidth?Le.uiStyleSettings.toolboxAccentColor:"transparent",Ze.addEventListener("click",function(){Le.setCurrentWidth(dt,Ze)}),Ve.appendChild(Ze);var Tt=document.createElement("div");Tt.innerText=dt.toString(),Tt.style.marginRight="5px",Ze.appendChild(Tt);var _t=document.createElement("div");_t.style.minHeight="20px",_t.style.flexGrow="2",_t.style.display="flex",_t.style.alignItems="center";var Qt=document.createElement("hr");Qt.style.minWidth="20px",Qt.style.border="0px",Qt.style.borderTop=dt+"px solid "+Le.uiStyleSettings.toolboxColor,Qt.style.flexGrow="2",_t.appendChild(Qt),Ze.appendChild(_t),Le.widthBoxes.push(Ze)}),Ve},De.prototype.setCurrentWidth=function(Le,Ve){var dt=this;this.currentWidth=Le,this.widthBoxes.forEach(function(Ze){Ze.style.borderColor=Ze===Ve?dt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},De}(ue),_e=function(He){function De(Le,Ve,dt,Ze){var Tt=He.call(this,Le,Ze||'<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 Tt.styles=[],Tt.styleBoxes=[],Tt.styles=Ve,Tt.currentStyle=dt,Tt.setCurrentStyle=Tt.setCurrentStyle.bind(Tt),Tt}return ce(De,He),De.prototype.getUi=function(){var Le=this,Ve=document.createElement("div");return Ve.style.display="flex",Ve.style.overflow="hidden",Ve.style.flexGrow="2",this.styles.forEach(function(dt){var Ze=document.createElement("div");Ze.style.display="flex",Ze.style.alignItems="center",Ze.style.justifyContent="space-between",Ze.style.padding="5px",Ze.style.borderWidth="2px",Ze.style.borderStyle="solid",Ze.style.overflow="hidden",Ze.style.maxWidth=100/Le.styles.length-5+"%",Ze.style.borderColor=dt===Le.currentStyle?Le.uiStyleSettings.toolboxAccentColor:"transparent",Ze.addEventListener("click",function(){Le.setCurrentStyle(dt,Ze)}),Ve.appendChild(Ze);var Tt=document.createElement("div");Tt.style.minHeight="20px",Tt.style.flexGrow="2",Tt.style.overflow="hidden";var _t=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Le.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(dt!==""?'stroke-dasharray="'+dt+'"':"")+` />
</svg>`;Tt.innerHTML=_t,Ze.appendChild(Tt),Le.styleBoxes.push(Ze)}),Ve},De.prototype.setCurrentStyle=function(Le,Ve){var dt=this;this.currentStyle=Le,this.styleBoxes.forEach(function(Ze){Ze.style.borderColor=Ze===Ve?dt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},De}(ue),Ye=function(He){function De(Le,Ve,dt){var Ze=He.call(this,Le,Ve,dt)||this;return Ze.strokeColor=dt.defaultColor,Ze.strokeWidth=dt.defaultStrokeWidth,Ze.strokeDasharray=dt.defaultStrokeDasharray,Ze.strokePanel=new pe("Line color",dt.defaultColorSet,dt.defaultColor),Ze.strokePanel.onColorChanged=Ze.setStrokeColor,Ze.strokeWidthPanel=new Fe("Line width",dt.defaultStrokeWidths,dt.defaultStrokeWidth),Ze.strokeWidthPanel.onWidthChanged=Ze.setStrokeWidth,Ze.strokeStylePanel=new _e("Line style",dt.defaultStrokeDasharrays,dt.defaultStrokeDasharray),Ze.strokeStylePanel.onStyleChanged=Ze.setStrokeDasharray,Ze}return ce(De,He),Object.defineProperty(De.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),De.prototype.getState=function(){var Le=He.prototype.getState.call(this);return Le.typeName=De.typeName,Le},De.typeName="FrameMarker",De.title="Frame marker",De.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',De}(Oe),ze=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"},Xe=function(He){function De(Le,Ve,dt){var Ze=He.call(this,Le,Ve,dt)||this;return Ze.x1=0,Ze.y1=0,Ze.x2=0,Ze.y2=0,Ze.defaultLength=50,Ze.manipulationStartX=0,Ze.manipulationStartY=0,Ze.manipulationStartX1=0,Ze.manipulationStartY1=0,Ze.manipulationStartX2=0,Ze.manipulationStartY2=0,Ze.setupControlBox(),Ze}return ce(De,He),De.prototype.ownsTarget=function(Le){return!!He.prototype.ownsTarget.call(this,Le)||!(!this.grip1.ownsTarget(Le)&&!this.grip2.ownsTarget(Le))},De.prototype.pointerDown=function(Le,Ve){He.prototype.pointerDown.call(this,Le,Ve),this.manipulationStartX=Le.x,this.manipulationStartY=Le.y,this.state==="new"&&(this.x1=Le.x,this.y1=Le.y,this.x2=Le.x,this.y2=Le.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(Ve)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Ve)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},De.prototype.pointerUp=function(Le){var Ve=this.state;He.prototype.pointerUp.call(this,Le),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(Le),this._state="select",Ve==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},De.prototype.adjustVisual=function(){},De.prototype.manipulate=function(Le){this.state==="creating"?this.resize(Le):this.state==="move"?(this.x1=this.manipulationStartX1+Le.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Le.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Le.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Le.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Le)},De.prototype.resize=function(Le){switch(this.activeGrip){case this.grip1:this.x1=Le.x,this.y1=Le.y;break;case this.grip2:case void 0:this.x2=Le.x,this.y2=Le.y}this.adjustVisual(),this.adjustControlBox()},De.prototype.select=function(){He.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},De.prototype.deselect=function(){He.prototype.deselect.call(this),this.controlBox.style.display="none"},De.prototype.setupControlBox=function(){this.controlBox=we.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},De.prototype.adjustControlBox=function(){this.positionGrips()},De.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},De.prototype.createGrip=function(){var Le=new Ie;return Le.visual.transform.baseVal.appendItem(we.createTransform()),this.controlBox.appendChild(Le.visual),Le},De.prototype.positionGrips=function(){var Le=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Le/2,this.y1-Le/2),this.positionGrip(this.grip2.visual,this.x2-Le/2,this.y2-Le/2)},De.prototype.positionGrip=function(Le,Ve,dt){var Ze=Le.transform.baseVal.getItem(0);Ze.setTranslate(Ve,dt),Le.transform.baseVal.replaceItem(Ze,0)},De.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},He.prototype.getState.call(this))},De.prototype.restoreState=function(Le){He.prototype.restoreState.call(this,Le);var Ve=Le;this.x1=Ve.x1,this.y1=Ve.y1,this.x2=Ve.x2,this.y2=Ve.y2},De.prototype.scale=function(Le,Ve){He.prototype.scale.call(this,Le,Ve),this.x1=this.x1*Le,this.y1=this.y1*Ve,this.x2=this.x2*Le,this.y2=this.y2*Ve,this.adjustVisual(),this.adjustControlBox()},De}(Ee),st=function(He){function De(Le,Ve,dt){var Ze=He.call(this,Le,Ve,dt)||this;return Ze.strokeColor="transparent",Ze.strokeWidth=0,Ze.strokeDasharray="",Ze.setStrokeColor=Ze.setStrokeColor.bind(Ze),Ze.setStrokeWidth=Ze.setStrokeWidth.bind(Ze),Ze.setStrokeDasharray=Ze.setStrokeDasharray.bind(Ze),Ze.strokeColor=dt.defaultColor,Ze.strokeWidth=dt.defaultStrokeWidth,Ze.strokeDasharray=dt.defaultStrokeDasharray,Ze.strokePanel=new pe("Line color",dt.defaultColorSet,dt.defaultColor),Ze.strokePanel.onColorChanged=Ze.setStrokeColor,Ze.strokeWidthPanel=new Fe("Line width",dt.defaultStrokeWidths,dt.defaultStrokeWidth),Ze.strokeWidthPanel.onWidthChanged=Ze.setStrokeWidth,Ze.strokeStylePanel=new _e("Line style",dt.defaultStrokeDasharrays,dt.defaultStrokeDasharray),Ze.strokeStylePanel.onStyleChanged=Ze.setStrokeDasharray,Ze}return ce(De,He),De.prototype.ownsTarget=function(Le){return!(!He.prototype.ownsTarget.call(this,Le)&&Le!==this.visual&&Le!==this.selectorLine&&Le!==this.visibleLine)},De.prototype.createVisual=function(){this.visual=we.createGroup(),this.selectorLine=we.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=we.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)},De.prototype.pointerDown=function(Le,Ve){He.prototype.pointerDown.call(this,Le,Ve),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},De.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()),we.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),we.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),we.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},De.prototype.setStrokeColor=function(Le){this.strokeColor=Le,this.adjustVisual(),this.colorChanged(Le)},De.prototype.setStrokeWidth=function(Le){this.strokeWidth=Le,this.adjustVisual()},De.prototype.setStrokeDasharray=function(Le){this.strokeDasharray=Le,this.adjustVisual(),this.stateChanged()},Object.defineProperty(De.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),De.prototype.getState=function(){var Le=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},He.prototype.getState.call(this));return Le.typeName=De.typeName,Le},De.prototype.restoreState=function(Le){He.prototype.restoreState.call(this,Le);var Ve=Le;this.strokeColor=Ve.strokeColor,this.strokeWidth=Ve.strokeWidth,this.strokeDasharray=Ve.strokeDasharray,this.createVisual(),this.adjustVisual()},De.typeName="LineMarker",De.title="Line marker",De.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',De}(Xe),ht=function(He){function De(Le,Ve,dt,Ze){var Tt=He.call(this,Le,Ze||'<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 Tt.fonts=[],Tt.fontBoxes=[],Tt.fonts=Ve,Tt.currentFont=dt,Tt.setCurrentFont=Tt.setCurrentFont.bind(Tt),Tt}return ce(De,He),De.prototype.getUi=function(){var Le=this,Ve=document.createElement("div");return Ve.style.overflow="hidden",Ve.style.flexGrow="2",this.fonts.forEach(function(dt){var Ze=document.createElement("div");Ze.style.display="inline-block",Ze.style.alignItems="center",Ze.style.justifyContent="space-between",Ze.style.padding="5px",Ze.style.borderWidth="2px",Ze.style.borderStyle="solid",Ze.style.overflow="hidden",Ze.style.maxWidth=100/Le.fonts.length-5+"%",Ze.style.borderColor=dt===Le.currentFont?Le.uiStyleSettings.toolboxAccentColor:"transparent",Ze.addEventListener("click",function(){Le.setCurrentFont(dt,Ze)}),Ve.appendChild(Ze);var Tt=document.createElement("div");Tt.style.display="flex",Tt.style.minHeight="20px",Tt.style.flexGrow="2",Tt.style.fontFamily=dt,Tt.style.overflow="hidden";var _t=document.createElement("div");_t.style.whiteSpace="nowrap",_t.style.overflow="hidden",_t.style.textOverflow="ellipsis",_t.innerHTML="The quick brown fox jumps over the lazy dog",Tt.appendChild(_t),Ze.appendChild(Tt),Le.fontBoxes.push(Ze)}),Ve},De.prototype.setCurrentFont=function(Le,Ve){var dt=this;this.currentFont=Le,this.fontBoxes.forEach(function(Ze){Ze.style.borderColor=Ze===Ve?dt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},De}(ue),ft=function(He){function De(Le,Ve,dt){var Ze=He.call(this,Le,Ve,dt)||this;return Ze.color="transparent",Ze.padding=5,Ze.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Ze.text=Ze.DEFAULT_TEXT,Ze.isMoved=!1,Ze.color=dt.defaultColor,Ze.fontFamily=dt.defaultFontFamily,Ze.defaultSize={x:100,y:30},Ze.setColor=Ze.setColor.bind(Ze),Ze.setFont=Ze.setFont.bind(Ze),Ze.renderText=Ze.renderText.bind(Ze),Ze.sizeText=Ze.sizeText.bind(Ze),Ze.textEditDivClicked=Ze.textEditDivClicked.bind(Ze),Ze.showTextEditor=Ze.showTextEditor.bind(Ze),Ze.setSize=Ze.setSize.bind(Ze),Ze.positionTextEditor=Ze.positionTextEditor.bind(Ze),Ze.colorPanel=new pe("Color",dt.defaultColorSet,dt.defaultColor),Ze.colorPanel.onColorChanged=Ze.setColor,Ze.fontFamilyPanel=new ht("Font",dt.defaultFontFamilies,dt.defaultFontFamily),Ze.fontFamilyPanel.onFontChanged=Ze.setFont,Ze}return ce(De,He),De.prototype.ownsTarget=function(Le){if(He.prototype.ownsTarget.call(this,Le)||Le===this.visual||Le===this.textElement||Le===this.bgRectangle)return!0;var Ve=!1;return this.textElement.childNodes.forEach(function(dt){dt===Le&&(Ve=!0)}),Ve},De.prototype.createVisual=function(){this.visual=we.createGroup(),this.bgRectangle=we.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=we.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(we.createTransform()),this.textElement.transform.baseVal.appendItem(we.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},De.prototype.pointerDown=function(Le,Ve){He.prototype.pointerDown.call(this,Le,Ve),this.isMoved=!1,this.pointerDownPoint=Le,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Le),this._state="creating")},De.prototype.renderText=function(){var Le=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(Ve){Le.textElement.appendChild(we.createTSpan(Ve.trim()===""?" ":Ve.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},De.prototype.getTextScale=function(){var Le=this.textElement.getBBox(),Ve=1;if(Le.width>0&&Le.height>0){var dt=(1*this.width-this.width*this.padding*2/100)/Le.width,Ze=(1*this.height-this.height*this.padding*2/100)/Le.height;Ve=Math.min(dt,Ze)}return Ve},De.prototype.getTextPosition=function(Le){var Ve=this.textElement.getBBox(),dt=0,Ze=0;return Ve.width>0&&Ve.height>0&&(dt=(this.width-Ve.width*Le)/2,Ze=this.height/2-Ve.height*Le/2),{x:dt,y:Ze}},De.prototype.sizeText=function(){var Le=this.textElement.getBBox(),Ve=this.getTextScale(),dt=this.getTextPosition(Ve);dt.y-=Le.y*Ve,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+dt.x+"px, "+dt.y+"px) scale("+Ve+", "+Ve+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(dt.x,dt.y),this.textElement.transform.baseVal.getItem(1).setScale(Ve,Ve))},De.prototype.manipulate=function(Le){He.prototype.manipulate.call(this,Le),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Le.x-this.pointerDownPoint.x)>5||Math.abs(Le.y-this.pointerDownPoint.y)>5)},De.prototype.resize=function(Le){He.prototype.resize.call(this,Le),this.isMoved=!0,this.setSize(),this.sizeText()},De.prototype.setSize=function(){He.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(we.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),we.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},De.prototype.pointerUp=function(Le){var Ve=this.state;Ve==="creating"&&(this._suppressMarkerCreateEvent=!0),He.prototype.pointerUp.call(this,Le),this.setSize(),(Ve==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},De.prototype.showTextEditor=function(){var Le=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(Ve){Ve.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Ve=Number.parseFloat(Le.textEditor.style.fontSize);Le.textEditor.clientWidth>=Number.parseInt(Le.textEditor.style.maxWidth)&&Ve>.9;)Ve-=.1,Le.textEditor.style.fontSize=Math.max(Ve,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Ve){Ve.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Ve){if(Ve.clipboardData){var dt=Ve.clipboardData.getData("text"),Ze=window.getSelection();if(!Ze.rangeCount)return!1;Ze.deleteFromDocument(),Ze.getRangeAt(0).insertNode(document.createTextNode(dt)),Ve.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Le.textEditDivClicked(Le.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},De.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Le=this.getTextScale(),Ve=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),dt=this.textElement.getBBox(),Ze={x:dt.width*Le,y:dt.height*Le};Ve.x-=Ze.x/2,Ve.y-=Ze.y/2,this.textEditor.style.top=Ve.y+"px",this.textEditor.style.left=Ve.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Ve.x+"px",this.textEditor.style.fontSize=Math.max(16*Le,12)+"px",this.textElement.style.display="none"}},De.prototype.textEditDivClicked=function(Le){this.text=Le.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},De.prototype.select=function(){He.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},De.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),He.prototype.deselect.call(this)},De.prototype.dblClick=function(Le,Ve){He.prototype.dblClick.call(this,Le,Ve),this.showTextEditor()},De.prototype.setColor=function(Le){this.textElement&&we.setAttributes(this.textElement,[["fill",Le]]),this.color=Le,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Le)},De.prototype.setFont=function(Le){this.textElement&&we.setAttributes(this.textElement,[["font-family",Le]]),this.fontFamily=Le,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},De.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},De.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(De.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),De.prototype.getState=function(){var Le=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},He.prototype.getState.call(this));return Le.typeName=De.typeName,Le},De.prototype.restoreState=function(Le){var Ve=Le;this.color=Ve.color,this.fontFamily=Ve.fontFamily,this.padding=Ve.padding,this.text=Ve.text,this.createVisual(),He.prototype.restoreState.call(this,Le),this.setSize()},De.prototype.scale=function(Le,Ve){He.prototype.scale.call(this,Le,Ve),this.setSize(),this.sizeText(),this.positionTextEditor()},De.typeName="TextMarker",De.title="Text marker",De.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>',De}(Ae),Lt=function(He){function De(Le,Ve,dt){var Ze=He.call(this,Le,Ve,dt)||this;return Ze.color="transparent",Ze.lineWidth=3,Ze.drawing=!1,Ze.pixelRatio=1,Ze.color=dt.defaultColor,Ze.lineWidth=dt.defaultStrokeWidth,Ze.pixelRatio=dt.freehandPixelRatio,Ze.setColor=Ze.setColor.bind(Ze),Ze.addCanvas=Ze.addCanvas.bind(Ze),Ze.finishCreation=Ze.finishCreation.bind(Ze),Ze.setLineWidth=Ze.setLineWidth.bind(Ze),Ze.colorPanel=new pe("Color",dt.defaultColorSet,dt.defaultColor),Ze.colorPanel.onColorChanged=Ze.setColor,Ze.lineWidthPanel=new Fe("Line width",dt.defaultStrokeWidths,dt.defaultStrokeWidth),Ze.lineWidthPanel.onWidthChanged=Ze.setLineWidth,Ze}return ce(De,He),De.prototype.ownsTarget=function(Le){return!(!He.prototype.ownsTarget.call(this,Le)&&Le!==this.visual&&Le!==this.drawingImage)},De.prototype.createVisual=function(){this.visual=we.createGroup(),this.drawingImage=we.createImage(),this.visual.appendChild(this.drawingImage);var Le=we.createTransform();this.visual.transform.baseVal.appendItem(Le),this.addMarkerVisualToContainer(this.visual)},De.prototype.pointerDown=function(Le,Ve){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(Le.x,Le.y),this.drawing=!0):He.prototype.pointerDown.call(this,Le,Ve)},De.prototype.manipulate=function(Le){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Le.x,Le.y),this.canvasContext.stroke()):He.prototype.manipulate.call(this,Le)},De.prototype.resize=function(Le){He.prototype.resize.call(this,Le),we.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),we.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},De.prototype.pointerUp=function(Le){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):He.prototype.pointerUp.call(this,Le)},De.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)},De.prototype.select=function(){this.state==="creating"&&this.finishCreation(),He.prototype.select.call(this)},De.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),He.prototype.deselect.call(this)},De.prototype.finishCreation=function(){for(var Le=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Ve=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],dt=Ve[0],Ze=Ve[1],Tt=Ve[2],_t=Ve[3],Qt=!1,kt=0;kt<this.canvasElement.height;kt++)for(var Nt=0;Nt<this.canvasElement.width;Nt++)Le.data[kt*this.canvasElement.width*4+4*Nt+3]>0&&(Qt=!0,kt<Ze&&(Ze=kt),Nt<dt&&(dt=Nt),kt>_t&&(_t=kt),Nt>Tt&&(Tt=Nt));if(Qt){this.left=dt/this.pixelRatio,this.top=Ze/this.pixelRatio,this.width=(Tt-dt)/this.pixelRatio,this.height=(_t-Ze)/this.pixelRatio;var Zt=document.createElement("canvas");Zt.width=Tt-dt,Zt.height=_t-Ze,Zt.getContext("2d").putImageData(this.canvasContext.getImageData(dt,Ze,Tt-dt,_t-Ze),0,0),this.drawingImgUrl=Zt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},De.prototype.setDrawingImage=function(){we.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),we.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},De.prototype.setColor=function(Le){this.color=Le,this.colorChanged(Le)},De.prototype.setLineWidth=function(Le){this.lineWidth=Le},Object.defineProperty(De.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),De.prototype.getState=function(){var Le=Object.assign({drawingImgUrl:this.drawingImgUrl},He.prototype.getState.call(this));return Le.typeName=De.typeName,Le},De.prototype.restoreState=function(Le){this.createVisual(),He.prototype.restoreState.call(this,Le),this.drawingImgUrl=Le.drawingImgUrl,this.setDrawingImage()},De.prototype.scale=function(Le,Ve){He.prototype.scale.call(this,Le,Ve),this.setDrawingImage()},De.typeName="FreehandMarker",De.title="Freehand marker",De.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>',De}(Ae),et=function(He){function De(Le,Ve,dt){var Ze=He.call(this,Le,dt||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Ze.typeBoxes=[],Ze.currentType=Ve,Ze.setCurrentType=Ze.setCurrentType.bind(Ze),Ze}return ce(De,He),De.prototype.getUi=function(){var Le=this,Ve=document.createElement("div");Ve.style.display="flex",Ve.style.overflow="hidden",Ve.style.flexGrow="2";for(var dt=function(_t){var Qt="both";switch(_t){case 0:Qt="both";break;case 1:Qt="start";break;case 2:Qt="end";break;case 3:Qt="none"}var kt=document.createElement("div");if(kt.style.display="flex",kt.style.flexGrow="2",kt.style.alignItems="center",kt.style.justifyContent="space-between",kt.style.padding="5px",kt.style.borderWidth="2px",kt.style.borderStyle="solid",kt.style.borderColor=Qt===Ze.currentType?Ze.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){Le.setCurrentType(Qt,kt)}),Ve.appendChild(kt),Qt==="both"||Qt==="start"){var Nt=document.createElement("div");Nt.style.display="flex",Nt.style.alignItems="center",Nt.style.minHeight="20px",Nt.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="`+(Ze.uiStyleSettings!==void 0?Ze.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Nt.style.marginLeft="5px",kt.appendChild(Nt)}var Zt=document.createElement("div");Zt.style.display="flex",Zt.style.alignItems="center",Zt.style.minHeight="20px",Zt.style.flexGrow="2";var on=document.createElement("hr");if(on.style.minWidth="20px",on.style.border="0px",on.style.borderTop="3px solid "+(Ze.uiStyleSettings!==void 0?Ze.uiStyleSettings.toolboxColor:"#eeeeee"),on.style.flexGrow="2",Zt.appendChild(on),kt.appendChild(Zt),Qt==="both"||Qt==="end"){var vn=document.createElement("div");vn.style.display="flex",vn.style.alignItems="center",vn.style.minHeight="20px",vn.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="`+(Ze.uiStyleSettings!==void 0?Ze.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,vn.style.marginRight="5px",kt.appendChild(vn)}Ze.typeBoxes.push(kt)},Ze=this,Tt=0;Tt<4;Tt++)dt(Tt);return Ve},De.prototype.setCurrentType=function(Le,Ve){var dt=this;this.currentType=Le,this.typeBoxes.forEach(function(Ze){Ze.style.borderColor=Ze===Ve?dt.uiStyleSettings!==void 0?dt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},De}(ue),it=function(He){function De(Le,Ve,dt){var Ze=He.call(this,Le,Ve,dt)||this;return Ze.arrowType="end",Ze.arrowBaseHeight=10,Ze.arrowBaseWidth=10,Ze.getArrowPoints=Ze.getArrowPoints.bind(Ze),Ze.setArrowType=Ze.setArrowType.bind(Ze),Ze.arrowTypePanel=new et("Arrow type","end"),Ze.arrowTypePanel.onArrowTypeChanged=Ze.setArrowType,Ze}return ce(De,He),De.prototype.ownsTarget=function(Le){return!(!He.prototype.ownsTarget.call(this,Le)&&Le!==this.arrow1&&Le!==this.arrow2)},De.prototype.getArrowPoints=function(Le,Ve){var dt=this.arrowBaseWidth+2*this.strokeWidth,Ze=this.arrowBaseHeight+2*this.strokeWidth;return Le-dt/2+","+(Ve+Ze/2)+" "+Le+","+(Ve-Ze/2)+" "+(Le+dt/2)+","+(Ve+Ze/2)},De.prototype.createTips=function(){this.arrow1=we.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(we.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=we.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(we.createTransform()),this.visual.appendChild(this.arrow2)},De.prototype.pointerDown=function(Le,Ve){He.prototype.pointerDown.call(this,Le,Ve),this.state==="creating"&&this.createTips()},De.prototype.adjustVisual=function(){if(He.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",we.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),we.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var Le=0;Math.abs(this.x1-this.x2)>.1&&(Le=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Ve=this.arrow1.transform.baseVal.getItem(0);Ve.setRotate(Le,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Ve,0);var dt=this.arrow2.transform.baseVal.getItem(0);dt.setRotate(Le+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(dt,0)}},De.prototype.setArrowType=function(Le){this.arrowType=Le,this.adjustVisual(),this.stateChanged()},Object.defineProperty(De.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),De.prototype.getState=function(){var Le=Object.assign({arrowType:this.arrowType},He.prototype.getState.call(this));return Le.typeName=De.typeName,Le},De.prototype.restoreState=function(Le){He.prototype.restoreState.call(this,Le);var Ve=Le;this.arrowType=Ve.arrowType,this.createTips(),this.adjustVisual()},De.typeName="ArrowMarker",De.title="Arrow marker",De.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',De}(st),xt=function(He){function De(Le,Ve,dt){var Ze=He.call(this,Le,Ve,dt)||this;return Ze.fillColor=dt.defaultFillColor,Ze.strokeWidth=0,Ze.fillPanel=new pe("Color",dt.defaultColorSet,dt.defaultFillColor),Ze.fillPanel.onColorChanged=Ze.setFillColor,Ze}return ce(De,He),Object.defineProperty(De.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),De.prototype.getState=function(){var Le=He.prototype.getState.call(this);return Le.typeName=De.typeName,Le},De.typeName="CoverMarker",De.title="Cover marker",De.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',De}(Oe),Et=function(He){function De(Le,Ve,dt,Ze){var Tt=He.call(this,Le,Ze||'<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 Tt.opacities=[],Tt.opacityBoxes=[],Tt.opacities=Ve,Tt.currentOpacity=dt,Tt.setCurrentOpacity=Tt.setCurrentOpacity.bind(Tt),Tt}return ce(De,He),De.prototype.getUi=function(){var Le=this,Ve=document.createElement("div");return Ve.style.display="flex",Ve.style.overflow="hidden",Ve.style.flexGrow="2",Ve.style.justifyContent="space-between",this.opacities.forEach(function(dt){var Ze=document.createElement("div");Ze.style.display="flex",Ze.style.alignItems="center",Ze.style.justifyContent="center",Ze.style.padding="5px",Ze.style.borderWidth="2px",Ze.style.borderStyle="solid",Ze.style.borderColor=dt===Le.currentOpacity?Le.uiStyleSettings.toolboxAccentColor:"transparent",Ze.addEventListener("click",function(){Le.setCurrentOpacity(dt,Ze)}),Ve.appendChild(Ze);var Tt=document.createElement("div");Tt.innerText=100*dt+"%",Ze.appendChild(Tt),Le.opacityBoxes.push(Ze)}),Ve},De.prototype.setCurrentOpacity=function(Le,Ve){var dt=this;this.currentOpacity=Le,this.opacityBoxes.forEach(function(Ze){Ze.style.borderColor=Ze===Ve?dt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},De}(ue),Mt=function(He){function De(Le,Ve,dt){var Ze=He.call(this,Le,Ve,dt)||this;return Ze.setOpacity=Ze.setOpacity.bind(Ze),Ze.fillColor=dt.defaultHighlightColor,Ze.strokeWidth=0,Ze.opacity=dt.defaultHighlightOpacity,Ze.fillPanel=new pe("Color",dt.defaultColorSet,Ze.fillColor),Ze.fillPanel.onColorChanged=Ze.setFillColor,Ze.opacityPanel=new Et("Opacity",dt.defaultOpacitySteps,Ze.opacity),Ze.opacityPanel.onOpacityChanged=Ze.setOpacity,Ze}return ce(De,He),De.prototype.setOpacity=function(Le){this.opacity=Le,this.visual&&we.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(De.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),De.prototype.getState=function(){var Le=He.prototype.getState.call(this);return Le.typeName=De.typeName,Le},De.typeName="HighlightMarker",De.title="Highlight marker",De.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>',De}(xt),mt='<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>',pt='<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>',vt=function(He){function De(Le,Ve,dt){var Ze=He.call(this,Le,Ve,dt)||this;return Ze.bgColor="transparent",Ze.tipPosition={x:0,y:0},Ze.tipBase1Position={x:0,y:0},Ze.tipBase2Position={x:0,y:0},Ze.tipMoving=!1,Ze.color=dt.defaultStrokeColor,Ze.bgColor=dt.defaultFillColor,Ze.fontFamily=dt.defaultFontFamily,Ze.defaultSize={x:100,y:30},Ze.setBgColor=Ze.setBgColor.bind(Ze),Ze.getTipPoints=Ze.getTipPoints.bind(Ze),Ze.positionTip=Ze.positionTip.bind(Ze),Ze.setTipPoints=Ze.setTipPoints.bind(Ze),Ze.colorPanel=new pe("Text color",dt.defaultColorSet,Ze.color,mt),Ze.colorPanel.onColorChanged=Ze.setColor,Ze.bgColorPanel=new pe("Fill color",dt.defaultColorSet,Ze.bgColor,pt),Ze.bgColorPanel.onColorChanged=Ze.setBgColor,Ze.fontFamilyPanel=new ht("Font",dt.defaultFontFamilies,dt.defaultFontFamily),Ze.fontFamilyPanel.onFontChanged=Ze.setFont,Ze.tipGrip=new Ie,Ze.tipGrip.visual.transform.baseVal.appendItem(we.createTransform()),Ze.controlBox.appendChild(Ze.tipGrip.visual),Ze}return ce(De,He),De.prototype.ownsTarget=function(Le){return He.prototype.ownsTarget.call(this,Le)||this.tipGrip.ownsTarget(Le)||this.tip===Le},De.prototype.createTip=function(){we.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=we.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},De.prototype.pointerDown=function(Le,Ve){this.state==="new"&&He.prototype.pointerDown.call(this,Le,Ve),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Ve)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):He.prototype.pointerDown.call(this,Le,Ve)},De.prototype.pointerUp=function(Le){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,He.prototype.pointerUp.call(this,Le);else{var Ve=this.state==="creating";He.prototype.pointerUp.call(this,Le),this.setTipPoints(Ve),this.positionTip()}},De.prototype.manipulate=function(Le){if(this.tipMoving){var Ve=this.unrotatePoint(Le);this.tipPosition={x:Ve.x-this.manipulationStartLeft,y:Ve.y-this.manipulationStartTop},this.positionTip()}else He.prototype.manipulate.call(this,Le)},De.prototype.setBgColor=function(Le){this.bgRectangle&&this.tip&&(we.setAttributes(this.bgRectangle,[["fill",Le]]),we.setAttributes(this.tip,[["fill",Le]])),this.bgColor=Le,this.fillColorChanged(Le)},De.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},De.prototype.setTipPoints=function(Le){Le===void 0&&(Le=!1);var Ve=Math.min(this.height/2,15),dt=this.height/5;Le&&(this.tipPosition={x:Ve+dt/2,y:this.height+20});var Ze=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Ze<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(dt=this.width/5,Ve=Math.min(this.width/2,15),this.tipBase1Position={x:Ve,y:0},this.tipBase2Position={x:Ve+dt,y:0}):(this.tipBase1Position={x:0,y:Ve},this.tipBase2Position={x:0,y:Ve+dt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Ze<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(dt=this.width/5,Ve=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Ve-dt,y:0},this.tipBase2Position={x:this.width-Ve,y:0}):(this.tipBase1Position={x:this.width,y:Ve},this.tipBase2Position={x:this.width,y:Ve+dt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Ze<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(dt=this.width/5,Ve=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Ve-dt,y:this.height},this.tipBase2Position={x:this.width-Ve,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Ve-dt},this.tipBase2Position={x:this.width,y:this.height-Ve}):Ze<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(dt=this.width/5,Ve=Math.min(this.width/2,15),this.tipBase1Position={x:Ve,y:this.height},this.tipBase2Position={x:Ve+dt,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Ve},this.tipBase2Position={x:0,y:this.height-Ve-dt})},De.prototype.resize=function(Le){He.prototype.resize.call(this,Le),this.positionTip()},De.prototype.positionTip=function(){we.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Le=this.tipGrip.visual.transform.baseVal.getItem(0);Le.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Le,0)},Object.defineProperty(De.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),De.prototype.select=function(){this.positionTip(),He.prototype.select.call(this)},De.prototype.getState=function(){var Le=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},He.prototype.getState.call(this));return Le.typeName=De.typeName,Le},De.prototype.restoreState=function(Le){var Ve=Le;this.bgColor=Ve.bgColor,this.tipPosition=Ve.tipPosition,He.prototype.restoreState.call(this,Le),this.createTip(),this.setTipPoints()},De.prototype.scale=function(Le,Ve){He.prototype.scale.call(this,Le,Ve),this.tipPosition={x:this.tipPosition.x*Le,y:this.tipPosition.y*Ve},this.positionTip()},De.typeName="CalloutMarker",De.title="Callout marker",De.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>',De}(ft),jt=function(He){function De(Le,Ve,dt){var Ze=He.call(this,Le,Ve,dt)||this;return Ze.fillColor="transparent",Ze.strokeColor="transparent",Ze.strokeWidth=0,Ze.strokeDasharray="",Ze.opacity=1,Ze.strokeColor=dt.defaultColor,Ze.strokeWidth=dt.defaultStrokeWidth,Ze.strokeDasharray=dt.defaultStrokeDasharray,Ze.fillColor=dt.defaultFillColor,Ze.setStrokeColor=Ze.setStrokeColor.bind(Ze),Ze.setFillColor=Ze.setFillColor.bind(Ze),Ze.setStrokeWidth=Ze.setStrokeWidth.bind(Ze),Ze.setStrokeDasharray=Ze.setStrokeDasharray.bind(Ze),Ze.setOpacity=Ze.setOpacity.bind(Ze),Ze.createVisual=Ze.createVisual.bind(Ze),Ze.strokePanel=new pe("Line color",ye(dt.defaultColorSet,["transparent"]),dt.defaultColor),Ze.strokePanel.onColorChanged=Ze.setStrokeColor,Ze.fillPanel=new pe("Fill color",ye(dt.defaultColorSet,["transparent"]),Ze.fillColor,pt),Ze.fillPanel.onColorChanged=Ze.setFillColor,Ze.strokeWidthPanel=new Fe("Line width",dt.defaultStrokeWidths,dt.defaultStrokeWidth),Ze.strokeWidthPanel.onWidthChanged=Ze.setStrokeWidth,Ze.strokeStylePanel=new _e("Line style",dt.defaultStrokeDasharrays,dt.defaultStrokeDasharray),Ze.strokeStylePanel.onStyleChanged=Ze.setStrokeDasharray,Ze.opacityPanel=new Et("Opacity",dt.defaultOpacitySteps,Ze.opacity),Ze.opacityPanel.onOpacityChanged=Ze.setOpacity,Ze}return ce(De,He),De.prototype.ownsTarget=function(Le){return!(!He.prototype.ownsTarget.call(this,Le)&&Le!==this.visual)},De.prototype.createVisual=function(){this.visual=we.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)},De.prototype.pointerDown=function(Le,Ve){He.prototype.pointerDown.call(this,Le,Ve),this.state==="new"&&(this.createVisual(),this.moveVisual(Le),this._state="creating")},De.prototype.manipulate=function(Le){He.prototype.manipulate.call(this,Le)},De.prototype.resize=function(Le){He.prototype.resize.call(this,Le),this.setSize()},De.prototype.setSize=function(){He.prototype.setSize.call(this),we.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},De.prototype.pointerUp=function(Le){He.prototype.pointerUp.call(this,Le),this.setSize()},De.prototype.setStrokeColor=function(Le){this.strokeColor=Le,this.visual&&we.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Le),this.stateChanged()},De.prototype.setFillColor=function(Le){this.fillColor=Le,this.visual&&we.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Le),this.stateChanged()},De.prototype.setStrokeWidth=function(Le){this.strokeWidth=Le,this.visual&&we.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},De.prototype.setStrokeDasharray=function(Le){this.strokeDasharray=Le,this.visual&&we.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},De.prototype.setOpacity=function(Le){this.opacity=Le,this.visual&&we.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(De.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),De.prototype.getState=function(){var Le=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},He.prototype.getState.call(this));return Le.typeName=De.typeName,Le},De.prototype.restoreState=function(Le){var Ve=Le;this.fillColor=Ve.fillColor,this.strokeColor=Ve.strokeColor,this.strokeWidth=Ve.strokeWidth,this.strokeDasharray=Ve.strokeDasharray,this.opacity=Ve.opacity,this.createVisual(),He.prototype.restoreState.call(this,Le),this.setSize()},De.prototype.scale=function(Le,Ve){He.prototype.scale.call(this,Le,Ve),this.setSize()},De.typeName="EllipseMarker",De.title="Ellipse marker",De.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>',De}(Ae),At=function(He){function De(Le,Ve,dt){return He.call(this,Le,Ve,dt)||this}return ce(De,He),Object.defineProperty(De.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),De.prototype.ownsTarget=function(Le){return!(!He.prototype.ownsTarget.call(this,Le)&&Le!==this.tip1&&Le!==this.tip2)},De.prototype.createTips=function(){this.tip1=we.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(we.createTransform()),this.visual.appendChild(this.tip1),this.tip2=we.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(we.createTransform()),this.visual.appendChild(this.tip2)},De.prototype.pointerDown=function(Le,Ve){He.prototype.pointerDown.call(this,Le,Ve),this.state==="creating"&&this.createTips()},De.prototype.adjustVisual=function(){if(He.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(we.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()]]),we.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var Le=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Ve=this.tip1.transform.baseVal.getItem(0);Ve.setRotate(Le,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Ve,0);var dt=this.tip2.transform.baseVal.getItem(0);dt.setRotate(Le+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(dt,0)}},Object.defineProperty(De.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),De.prototype.getState=function(){var Le=He.prototype.getState.call(this);return Le.typeName=De.typeName,Le},De.prototype.restoreState=function(Le){He.prototype.restoreState.call(this,Le),this.createTips(),this.adjustVisual()},De.typeName="MeasurementMarker",De.title="Measurement marker",De.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>',De}(st),Kt=function(He){function De(Le,Ve,dt){var Ze=He.call(this,Le,Ve,dt)||this;return Ze.strokePanel.colors=dt.defaultColorSet,Ze.fillColor="transparent",Ze}return ce(De,He),Object.defineProperty(De.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),De.prototype.getState=function(){var Le=He.prototype.getState.call(this);return Le.typeName=De.typeName,Le},De.typeName="EllipseFrameMarker",De.title="Ellipse frame marker",De.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>',De}(jt),Ct=function(){function He(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(He.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),He.prototype.addUndoStep=function(De){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(De)||(this.undoStack.push(De),JSON.stringify(this.lastRedoStep)!==JSON.stringify(De)&&this.redoStack.splice(0,this.redoStack.length))},He.prototype.replaceLastUndoStep=function(De){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=De)},He.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},He.prototype.undo=function(){if(this.undoStack.length>1){var De=this.undoStack.pop();return De!==void 0&&this.redoStack.push(De),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},He.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},He}(),gt=function(He){function De(Le,Ve,dt){var Ze=He.call(this,Le,Ve,dt)||this;return Ze.strokeColor="transparent",Ze.strokeWidth=0,Ze.strokeDasharray="",Ze.curveX=0,Ze.curveY=0,Ze.manipulationStartCurveX=0,Ze.manipulationStartCurveY=0,Ze.setStrokeColor=Ze.setStrokeColor.bind(Ze),Ze.setStrokeWidth=Ze.setStrokeWidth.bind(Ze),Ze.setStrokeDasharray=Ze.setStrokeDasharray.bind(Ze),Ze.positionGrips=Ze.positionGrips.bind(Ze),Ze.addControlGrips=Ze.addControlGrips.bind(Ze),Ze.adjustVisual=Ze.adjustVisual.bind(Ze),Ze.setupControlBox=Ze.setupControlBox.bind(Ze),Ze.resize=Ze.resize.bind(Ze),Ze.strokeColor=dt.defaultColor,Ze.strokeWidth=dt.defaultStrokeWidth,Ze.strokeDasharray=dt.defaultStrokeDasharray,Ze.strokePanel=new pe("Line color",dt.defaultColorSet,dt.defaultColor),Ze.strokePanel.onColorChanged=Ze.setStrokeColor,Ze.strokeWidthPanel=new Fe("Line width",dt.defaultStrokeWidths,dt.defaultStrokeWidth),Ze.strokeWidthPanel.onWidthChanged=Ze.setStrokeWidth,Ze.strokeStylePanel=new _e("Line style",dt.defaultStrokeDasharrays,dt.defaultStrokeDasharray),Ze.strokeStylePanel.onStyleChanged=Ze.setStrokeDasharray,Ze}return ce(De,He),De.prototype.ownsTarget=function(Le){return!(!He.prototype.ownsTarget.call(this,Le)&&Le!==this.visual&&Le!==this.selectorCurve&&Le!==this.visibleCurve&&!this.curveGrip.ownsTarget(Le))},De.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},De.prototype.createVisual=function(){this.visual=we.createGroup(),this.selectorCurve=we.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=we.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)},De.prototype.pointerDown=function(Le,Ve){He.prototype.pointerDown.call(this,Le,Ve),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Le.x,this.curveY=Le.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Ve)&&(this.activeGrip=this.curveGrip,this._state="resize")},De.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),we.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),we.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),we.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},De.prototype.setupControlBox=function(){He.prototype.setupControlBox.call(this),this.curveControlLine1=we.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=we.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)},De.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,He.prototype.addControlGrips.call(this)},De.prototype.positionGrips=function(){He.prototype.positionGrips.call(this);var Le=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Le/2,this.curveY-Le/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},De.prototype.manipulate=function(Le){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Le.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Le.y-this.manipulationStartY),He.prototype.manipulate.call(this,Le)},De.prototype.resize=function(Le){this.activeGrip===this.curveGrip&&(this.curveX=Le.x,this.curveY=Le.y),He.prototype.resize.call(this,Le),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},De.prototype.setStrokeColor=function(Le){this.strokeColor=Le,this.adjustVisual(),this.colorChanged(Le)},De.prototype.setStrokeWidth=function(Le){this.strokeWidth=Le,this.adjustVisual()},De.prototype.setStrokeDasharray=function(Le){this.strokeDasharray=Le,this.adjustVisual()},De.prototype.scale=function(Le,Ve){this.curveX=this.curveX*Le,this.curveY=this.curveY*Ve,He.prototype.scale.call(this,Le,Ve)},Object.defineProperty(De.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),De.prototype.getState=function(){var Le=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},He.prototype.getState.call(this));return Le.typeName=De.typeName,Le},De.prototype.restoreState=function(Le){He.prototype.restoreState.call(this,Le);var Ve=Le;this.strokeColor=Ve.strokeColor,this.strokeWidth=Ve.strokeWidth,this.strokeDasharray=Ve.strokeDasharray,this.curveX=Ve.curveX,this.curveY=Ve.curveY,this.createVisual(),this.adjustVisual()},De.typeName="CurveMarker",De.title="Curve marker",De.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>',De}(Xe),tt=function(He){function De(Le,Ve,dt){var Ze=He.call(this,Le,Ve,dt)||this;return Ze.fillColor="transparent",Ze.strokeColor="transparent",Ze.strokeWidth=0,Ze.strokeDasharray="",Ze.textColor="transparent",Ze.fontSize="1rem",Ze.isMoved=!1,Ze.captionText="Caption",Ze.PADDING=5,Ze.captionBoxWidth=0,Ze.captionBoxHeight=0,Ze.strokeColor=dt.defaultColor,Ze.strokeWidth=dt.defaultStrokeWidth,Ze.strokeDasharray=dt.defaultStrokeDasharray,Ze.fillColor=dt.defaultFillColor,Ze.textColor=dt.defaultStrokeColor,Ze.fontFamily=dt.defaultFontFamily,Ze.fontSize=dt.defaultCaptionFontSize,Ze.captionText=dt.defaultCaptionText,Ze.setStrokeColor=Ze.setStrokeColor.bind(Ze),Ze.setFillColor=Ze.setFillColor.bind(Ze),Ze.setStrokeWidth=Ze.setStrokeWidth.bind(Ze),Ze.setStrokeDasharray=Ze.setStrokeDasharray.bind(Ze),Ze.createVisual=Ze.createVisual.bind(Ze),Ze.sizeCaption=Ze.sizeCaption.bind(Ze),Ze.setCaptionText=Ze.setCaptionText.bind(Ze),Ze.showTextEditor=Ze.showTextEditor.bind(Ze),Ze.positionTextEditor=Ze.positionTextEditor.bind(Ze),Ze.finishTextEditing=Ze.finishTextEditing.bind(Ze),Ze.setFont=Ze.setFont.bind(Ze),Ze.setTextColor=Ze.setTextColor.bind(Ze),Ze.strokePanel=new pe("Line color",ye(dt.defaultColorSet,["transparent"]),Ze.strokeColor),Ze.strokePanel.onColorChanged=Ze.setStrokeColor,Ze.fillPanel=new pe("Fill color",ye(dt.defaultColorSet,["transparent"]),Ze.fillColor,pt),Ze.fillPanel.onColorChanged=Ze.setFillColor,Ze.strokeWidthPanel=new Fe("Line width",dt.defaultStrokeWidths,dt.defaultStrokeWidth),Ze.strokeWidthPanel.onWidthChanged=Ze.setStrokeWidth,Ze.strokeStylePanel=new _e("Line style",dt.defaultStrokeDasharrays,dt.defaultStrokeDasharray),Ze.strokeStylePanel.onStyleChanged=Ze.setStrokeDasharray,Ze.fontFamilyPanel=new ht("Font",dt.defaultFontFamilies,dt.defaultFontFamily),Ze.fontFamilyPanel.onFontChanged=Ze.setFont,Ze.textColorPanel=new pe("Text color",dt.defaultColorSet,Ze.textColor,mt),Ze.textColorPanel.onColorChanged=Ze.setTextColor,Ze}return ce(De,He),De.prototype.ownsTarget=function(Le){return!(!He.prototype.ownsTarget.call(this,Le)&&Le!==this.visual&&Le!==this.frame&&Le!==this.captionBg&&Le!==this.captionElement)},De.prototype.createVisual=function(){this.visual=we.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=we.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=we.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=we.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()},De.prototype.setCaptionText=function(Le){this.captionText=Le,this.captionElement.textContent=this.captionText,this.sizeCaption()},De.prototype.pointerDown=function(Le,Ve){He.prototype.pointerDown.call(this,Le,Ve),this.isMoved=!1,this.pointerDownPoint=Le,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Le),this._state="creating")},De.prototype.manipulate=function(Le){He.prototype.manipulate.call(this,Le),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Le.x-this.pointerDownPoint.x)>5||Math.abs(Le.y-this.pointerDownPoint.y)>5)},De.prototype.resize=function(Le){He.prototype.resize.call(this,Le),this.setSize()},De.prototype.sizeCaption=function(){var Le=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Le.width+2*this.PADDING,this.captionBoxHeight=Le.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),we.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')"]]),we.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')"]])},De.prototype.showTextEditor=function(){var Le=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",function(Ve){Ve.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Ve){Ve.key==="Enter"&&Le.finishTextEditing(Le.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Ve){Ve.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Le.finishTextEditing(Le.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Le.finishTextEditing(Le.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},De.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"))},De.prototype.finishTextEditing=function(Le){this.setCaptionText(Le.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},De.prototype.setFont=function(Le){this.captionElement&&we.setAttributes(this.captionElement,[["font-family",Le]]),this.fontFamily=Le,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},De.prototype.setTextColor=function(Le){this.captionElement&&we.setAttributes(this.captionElement,[["fill",Le]]),this.textColor=Le,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},De.prototype.setSize=function(){He.prototype.setSize.call(this),we.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},De.prototype.pointerUp=function(Le){He.prototype.pointerUp.call(this,Le),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},De.prototype.dblClick=function(Le,Ve){He.prototype.dblClick.call(this,Le,Ve),this.showTextEditor()},De.prototype.setStrokeColor=function(Le){this.strokeColor=Le,this.frame&&we.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Le),this.stateChanged()},De.prototype.setFillColor=function(Le){this.fillColor=Le,this.captionBg&&we.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Le),this.stateChanged()},De.prototype.setStrokeWidth=function(Le){this.strokeWidth=Le,this.frame&&we.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},De.prototype.setStrokeDasharray=function(Le){this.strokeDasharray=Le,this.frame&&we.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(De.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),De.prototype.getState=function(){var Le=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},He.prototype.getState.call(this));return Le.typeName=this.typeName,Le},De.prototype.restoreState=function(Le){var Ve=Le;this.fillColor=Ve.fillColor,this.strokeColor=Ve.strokeColor,this.strokeWidth=Ve.strokeWidth,this.strokeDasharray=Ve.strokeDasharray,this.textColor=Ve.textColor,this.fontFamily=Ve.fontFamily,this.captionText=Ve.captionText,this.fontSize=Ve.fontSize,this.createVisual(),He.prototype.restoreState.call(this,Le),this.setSize()},De.prototype.scale=function(Le,Ve){He.prototype.scale.call(this,Le,Ve),this.setSize()},De.typeName="CaptionFrameMarker",De.title="Caption frame marker",De.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>',De}(Ae),bt=function(){function He(De,Le){Le===void 0&&(Le=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=De,this.cancelable=Le}return Object.defineProperty(He.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),He.prototype.preventDefault=function(){this._defaultPrevented=!0},He}(),Ke=function(He){function De(Le,Ve,dt){var Ze=He.call(this,Le,!1)||this;return Ze.dataUrl=Ve,Ze.state=dt,Ze}return ce(De,He),De}(bt),ut=function(He){function De(Le,Ve,dt){dt===void 0&&(dt=!1);var Ze=He.call(this,Le,dt)||this;return Ze.marker=Ve,Ze}return ce(De,He),De}(bt),wt=function(){function He(){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 He.prototype.addEventListener=function(De,Le){this[De].push(Le)},He.prototype.removeEventListener=function(De,Le){var Ve=this[De].indexOf(Le);Ve>-1&&this[De].splice(Ve,1)},He}(),yt=function(){function He(De){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new ze,this._isOpen=!1,this.undoRedoManager=new Ct,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 wt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=He.instanceCounter++,this.styles=new z(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=De,this.targetRoot=document.body,this.width=De.clientWidth,this.height=De.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(He.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ye,Lt,it,ft,Kt,jt,Mt,vt,At,xt,st,gt,tt]},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ye,Lt,it,ft,jt,Mt,vt]},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ye,Lt,it,ft,Mt]},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(De){var Le=this;this._availableMarkerTypes.splice(0),De.forEach(function(Ve){if(typeof Ve=="string"){var dt=Le.ALL_MARKER_TYPES.find(function(Ze){return Ze.typeName===Ve});dt!==void 0&&Le._availableMarkerTypes.push(dt)}else Le._availableMarkerTypes.push(Ve)})},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(De){this._zoomLevel=De,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(He.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),He.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),me.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},He.prototype.show=function(){var De=this;this.styles.styleSheetRoot===void 0&&fe.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=fe.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Le){return Le(new bt(De))})},He.prototype.render=function(){return be(this,void 0,void 0,function(){var De;return Ce(this,function(Le){switch(Le.label){case 0:return this.setCurrentMarker(),(De=new xe).naturalSize=this.renderAtNaturalSize,De.imageType=this.renderImageType,De.imageQuality=this.renderImageQuality,De.markersOnly=this.renderMarkersOnly,De.width=this.renderWidth,De.height=this.renderHeight,[4,De.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Le.sent(),[4,De.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Le.sent()]}})})},He.prototype.close=function(De){var Le=this;if(De===void 0&&(De=!1),this.isOpen){var Ve=!1;De||this.eventListeners.beforeclose.forEach(function(dt){var Ze=new bt(Le,!0);dt(Ze),Ze.defaultPrevented&&(Ve=!0)}),Ve||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(dt){return dt(new bt(Le))}),this.detachEvents(),this._isOpen=!1)}},He.prototype.addMarkersToToolbar=function(){for(var De,Le=[],Ve=0;Ve<arguments.length;Ve++)Le[Ve]=arguments[Ve];(De=this._availableMarkerTypes).push.apply(De,Le)},He.prototype.addRenderEventListener=function(De){this.addEventListener("render",function(Le){De(Le.dataUrl,Le.state)})},He.prototype.removeRenderEventListener=function(De){},He.prototype.addCloseEventListener=function(De){this.addEventListener("close",function(){De()})},He.prototype.removeCloseEventListener=function(De){},He.prototype.setupResizeObserver=function(){var De=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){De.resize(De.target.clientWidth,De.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return De.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},He.prototype.onPopupTargetResize=function(){var De=1*this.target.clientWidth/this.target.clientHeight,Le=this.editorCanvas.clientWidth/De>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*De:this.editorCanvas.clientWidth,Ve=Le<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/De;this.resize(Le,Ve)},He.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},He.prototype.resize=function(De,Le){this._isResizing=!0;var Ve=De/this.imageWidth,dt=Le/this.imageHeight;this.imageWidth=Math.round(De),this.imageHeight=Math.round(Le),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(Ve,dt),this._isResizing=!1},He.prototype.scaleMarkers=function(De,Le){var Ve,dt=this;this._currentMarker&&this._currentMarker instanceof ft?this._currentMarker.scale(De,Le):(Ve=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Ze){Ze!==dt._currentMarker&&Ze.scale(De,Le)}),Ve!==void 0&&this.setCurrentMarker(Ve)},He.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"},He.prototype.setTopLeft=function(){var De=this.editingTarget.getBoundingClientRect(),Le=this.editorCanvas.getBoundingClientRect();this.left=De.left-Le.left,this.top=De.top-Le.top},He.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)},He.prototype.addDefs=function(){for(var De,Le=[],Ve=0;Ve<arguments.length;Ve++)Le[Ve]=arguments[Ve];this.defs=we.createDefs(),this.addDefsToImage(),(De=this.defs).append.apply(De,Le)},He.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},He.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)},He.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},He.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},He.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)},He.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},He.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)},He.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 De=document.createElement("a");De.href="https://markerjs.com/",De.target="_blank",De.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>',De.title="Powered by marker.js",De.style.display="grid",De.style.alignItems="center",De.style.justifyItems="center",De.style.padding="3px",De.style.width="20px",De.style.height="20px",this.logoUI.appendChild(De),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},He.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")},He.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"},He.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},He.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 De=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=De+"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 re(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 le(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},He.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},He.prototype.removeMarker=function(De){this.markerImage.removeChild(De.container),this.markers.indexOf(De)>-1&&this.markers.splice(this.markers.indexOf(De),1),De.dispose()},He.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())},He.prototype.toolbarButtonClicked=function(De,Le){if(De==="marker"&&Le!==void 0)this.createNewMarker(Le);else if(De==="action")switch(Le){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},He.prototype.deleteSelectedMarker=function(){var De=this;if(this._currentMarker!==void 0){var Le=!1;if(this.eventListeners.markerbeforedelete.forEach(function(dt){var Ze=new ut(De,De._currentMarker,!0);dt(Ze),Ze.defaultPrevented&&(Le=!0)}),!Le){var Ve=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(dt){return dt(new ut(De,Ve))})}}},He.prototype.clear=function(){var De=this,Le=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Tt){var _t=new ut(De,void 0,!0);Tt(_t),_t.defaultPrevented&&(Le=!0)}),!Le)){this.setCurrentMarker();for(var Ve=function(Tt){var _t=dt.markers[Tt];dt.setCurrentMarker(dt.markers[Tt]),dt._currentMarker.dispose(),dt.markerImage.removeChild(dt._currentMarker.container),dt.markers.splice(dt.markers.indexOf(dt._currentMarker),1),dt.eventListeners.markerdelete.forEach(function(Qt){return Qt(new ut(De,_t))})},dt=this,Ze=this.markers.length-1;Ze>=0;Ze--)Ve(Ze);this.addUndoStep()}},Object.defineProperty(He.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),He.prototype.showNotesEditor=function(){var De;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=(De=this._currentMarker.notes)!==null&&De!==void 0?De:"",this.overlayContainer.appendChild(this.notesArea))},He.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)},He.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},He.prototype.addUndoStep=function(){var De=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Le=this.getState(),Ve=this.undoRedoManager.getLastUndoStep();if(!Ve||Ve.width===Le.width&&Ve.height===Le.height){var dt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Le),dt<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Ze){return Ze(new bt(De))})}else this.undoRedoManager.replaceLastUndoStep(Le),this.eventListeners.statechange.forEach(function(Ze){return Ze(new bt(De))})}},He.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},He.prototype.undoStep=function(){var De=this,Le=this.undoRedoManager.undo();Le!==void 0&&(this.restoreState(Le),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Ve){return Ve(new bt(De))}))},He.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},He.prototype.redoStep=function(){var De=this,Le=this.undoRedoManager.redo();Le!==void 0&&(this.restoreState(Le),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Ve){return Ve(new bt(De))}))},He.prototype.stepZoom=function(){var De=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=De<this.zoomSteps.length-1?this.zoomSteps[De+1]:this.zoomSteps[0]},He.prototype.panTo=function(De){this.contentDiv.scrollBy({left:this.prevPanPoint.x-De.x,top:this.prevPanPoint.y-De.y}),this.prevPanPoint=De},He.prototype.startRenderAndClose=function(){return be(this,void 0,void 0,function(){var De,Le,Ve=this;return Ce(this,function(dt){switch(dt.label){case 0:return[4,this.render()];case 1:return De=dt.sent(),Le=this.getState(),this.eventListeners.render.forEach(function(Ze){return Ze(new Ke(Ve,De,Le))}),this.close(!0),[2]}})})},He.prototype.getState=function(De){De===!0&&this.setCurrentMarker();var Le={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Ve){return Le.markers.push(Ve.getState())}),Le},He.prototype.restoreState=function(De){var Le=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);De.markers.forEach(function(Ve){var dt=Le._availableMarkerTypes.find(function(Tt){return Tt.typeName===Ve.typeName});if(dt!==void 0){var Ze=Le.addNewMarker(dt);Ze.restoreState(Ve),Le.markers.push(Ze)}}),De.width&&De.height&&(De.width!==this.imageWidth||De.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/De.width,this.imageHeight/De.height),this.eventListeners.restorestate.forEach(function(Ve){return Ve(new bt(Le))})},He.prototype.addNewMarker=function(De){var Le=we.createGroup();return this.markerImage.appendChild(Le),new De(Le,this.overlayContainer,this.settings)},He.prototype.createNewMarker=function(De){var Le,Ve=this;(Le=typeof De=="string"?this._availableMarkerTypes.find(function(dt){return dt.typeName===De}):De)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Le),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(Le.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(dt){return dt(new ut(Ve,Ve._currentMarker))}))},He.prototype.markerCreated=function(De){var Le=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(De),this.setCurrentMarker(De),De instanceof Lt&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Lt):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Ve){return Ve(new ut(Le,Le._currentMarker))})},He.prototype.colorChanged=function(De){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=De,this.settings.defaultStrokeColor=De)},He.prototype.fillColorChanged=function(De){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=De)},He.prototype.markerStateChanged=function(De){var Le=this;this.eventListeners.markerchange.forEach(function(Ve){return Ve(new ut(Le,De))})},He.prototype.setCurrentMarker=function(De){var Le=this;this._currentMarker!==De&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Ve){return Ve(new ut(Le,Le._currentMarker))})),this._currentMarker=De,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(Ve){return Ve(new ut(Le,Le._currentMarker))}))},He.prototype.onPointerDown=function(De){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||De.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var Le=this.markers.find(function(Ve){return Ve.ownsTarget(De.target)});Le!==void 0?(this.setCurrentMarker(Le),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(De.clientX,De.clientY),De.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:De.clientX,y:De.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(De.clientX,De.clientY))},He.prototype.onDblClick=function(De){if(this._isFocused||this.focus(),this.mode==="select"){var Le=this.markers.find(function(Ve){return Ve.ownsTarget(De.target)});Le!==void 0&&Le!==this._currentMarker&&this.setCurrentMarker(Le),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(De.clientX,De.clientY),De.target):this.setCurrentMarker()}},He.prototype.onPointerMove=function(De){this.touchPoints!==1&&De.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||De.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(De.clientX,De.clientY)):this.zoomLevel>1&&this.panTo({x:De.clientX,y:De.clientY}))},He.prototype.onPointerUp=function(De){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(De.clientX,De.clientY)),this.isDragging=!1,this.addUndoStep()},He.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},He.prototype.onKeyUp=function(De){this._currentMarker===void 0||this.notesArea!==void 0||De.key!=="Delete"&&De.key!=="Backspace"||this.deleteSelectedMarker()},He.prototype.clientToLocalCoordinates=function(De,Le){var Ve=this.markerImage.getBoundingClientRect();return{x:(De-Ve.left)/this.zoomLevel,y:(Le-Ve.top)/this.zoomLevel}},He.prototype.onWindowResize=function(){this.positionUI()},He.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var De=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=De+"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()},He.prototype.addLicenseKey=function(De){me.addKey(De)},He.prototype.addEventListener=function(De,Le){this.eventListeners.addEventListener(De,Le)},He.prototype.removeEventListener=function(De,Le){this.eventListeners.removeEventListener(De,Le)},He.prototype.renderState=function(De){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(De),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(He.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),He.prototype.focus=function(){var De=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Le){return Le(new bt(De))}))},He.prototype.blur=function(){var De=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Le){return Le(new bt(De))}))},He.instanceCounter=0,He}(),lt=$e(70635),Qe=$e(58130),We=(He,De,Le)=>new Promise((Ve,dt)=>{var Ze=Qt=>{try{_t(Le.next(Qt))}catch(kt){dt(kt)}},Tt=Qt=>{try{_t(Le.throw(Qt))}catch(kt){dt(kt)}},_t=Qt=>Qt.done?Ve(Qt.value):Promise.resolve(Qt.value).then(Ze,Tt);_t((Le=Le.apply(He,De)).next())}),qe=({data:He,className:De,fullWidth:Le,style:Ve={},onClose:dt,onOk:Ze,showFullTools:Tt,noAssociationId:_t})=>{const Qt=(0,rt.useRef)(null),kt=(0,rt.useRef)(null),Nt=(0,rt.useRef)(null),Zt=(0,rt.useRef)(null),[on,vn]=(0,rt.useState)(!1),[kn,Kn]=(0,rt.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,rt.useEffect)(()=>{Nt.current||(Nt.current=document.createElement("style"),document.head.appendChild(Nt.current)),He!=null&&He.visible?(document.body.setAttribute("data-custom","y-hidden"),Nt.current.innerHTML=" html { overflow-y: hidden; }",He!=null&&He.src&&Xn()):(document.body.removeAttribute("data-custom"),Nt.current&&(document.head.removeChild(Nt.current),Nt.current=null))},[He==null?void 0:He.visible]);const Xn=()=>We(void 0,null,function*(){vn(!0),Kn("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Sr=yield(0,Qe.ZJ)(He==null?void 0:He.src);Qt.current.src="",Qt.current.src=Sr,Qt.current.onload=function(){vr()},vn(!1),Kn("")}),pr=Sr=>We(void 0,null,function*(){vn(!0),Kn("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Fr=yield(0,lt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:He.title,file:Sr.dataUrl}});Fr!=null&&Fr.id&&!_t?(yield(0,lt.ZP)(`/api/attachments/${He.id}/add_subitem.json`,{method:"post",body:{subitem_id:Fr==null?void 0:Fr.id,settings:JSON.stringify(Sr.state)}})).status===0&&Ze():Fr!=null&&Fr.id&&Ze(Fr),vn(!1),Kn("")}),dr=()=>{const Sr=document.querySelector('a[href="https://markerjs.com/"]');Sr&&Sr.parentNode&&(Sr.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(li=>{const Er=document.querySelector(li.name);Er&&Er.setAttribute("title",li.title)})},vr=()=>{kt.current=new yt(Qt.current),kt.current.targetRoot=Zt.current,kt.current.addEventListener("render",pr),kt.current.addEventListener("beforeclose",dt),Tt&&(kt.current.availableMarkerTypes=kt.current.ALL_MARKER_TYPES,kt.current.uiStyleSettings.redoButtonVisible=!0,kt.current.uiStyleSettings.notesButtonVisible=!0,kt.current.uiStyleSettings.zoomButtonVisible=!0,kt.current.uiStyleSettings.zoomOutButtonVisible=!0,kt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=kt.current.uiStyleSettings,kt.current.show(),He!=null&&He.snapshotData&&kt.current.restoreState(He.snapshotData),setTimeout(()=>{window.scrollTo(0,0),dr()},300)};return rt.createElement(rt.Fragment,null,(He==null?void 0:He.visible)&&rt.createElement(je.Z,{spinning:on,tip:kn,style:{position:"absolute"}},rt.createElement("div",{ref:Zt,className:Re()(St.imageDimensions,De,Le?St.fullWidth:""),style:Ve},rt.createElement("img",{className:St.img,ref:Qt}))))}},75890:function(bn,ln,$e){"use strict";var rt=$e(59301),St=$e(95237),ie=$e(43604),Re=$e(99313),je=$e(3113),ve=$e(25711),ce=$e(93938),be=$e(48136),Ce=$e(59301);const ye=(0,rt.forwardRef)(({callback:we,showSaveButton:me,value:xe=""},fe)=>{const z=(0,rt.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 "}]}]}],ae=[{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}`}]}]}],re=pe=>{z.current.setValue(z.current.getValue()+" "+pe.value+" ")},le=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Ce.createElement(St.Z,{className:ce.Z.lists,gutter:[10,10]},ee.map((pe,Ee)=>Ce.createElement(ie.Z,{flex:"110px",className:ce.Z.item},Ce.createElement("div",null,Ce.createElement(ve.Z,{value:`$$${pe.value}$$`}),pe.name),Ce.createElement("div",{className:ce.Z.children},pe.children.map((Pe,Ie)=>Ce.createElement("div",{key:Ie},Ce.createElement("h1",null,Pe.name),Ce.createElement(St.Z,{gutter:[10,10]},Pe.data.map((ke,Ae)=>Ce.createElement(ie.Z,{key:Ae,onClick:()=>re(ke),className:ce.Z.diamond},Ce.createElement(ve.Z,{value:"`$$"+ke.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Ce.createElement(St.Z,{className:ce.Z.lists,gutter:[10,10]},ae.map((pe,Ee)=>Ce.createElement(ie.Z,{flex:"110px",className:ce.Z.item},Ce.createElement("div",null,Ce.createElement(ve.Z,{value:"`$$"+pe.value+"$$`"}),pe.name),Ce.createElement("div",{className:ce.Z.children},pe.children.map((Pe,Ie)=>Ce.createElement("div",{key:Ie},Pe.name&&Ce.createElement("h1",null,Pe.name),Ce.createElement(St.Z,{gutter:[10,10]},Pe.data.map((ke,Ae)=>Ce.createElement(ie.Z,{key:Ae,onClick:()=>re(ke),className:ce.Z.diamond},Ce.createElement(ve.Z,{value:"`$$"+ke.value+"$$`"}))))))))))}],ue=()=>{var pe=document.createElement("div");pe.innerHTML=z.current.getValue();var Ee=pe.innerText;return we&&we(Ee),Ee};return(0,rt.useImperativeHandle)(fe,()=>({getData:ue})),Ce.createElement("div",{className:ce.Z.mathWrap},Ce.createElement(Re.default,{defaultActiveKey:"1",items:le}),Ce.createElement("math-field",{locale:"zh_cn",className:ce.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:z,style:{width:800,marginTop:30,fontSize:18}},xe||""),me&&Ce.createElement("div",{className:ce.Z.button},Ce.createElement(je.ZP,{size:"large",onClick:ue,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});ln.Z=ye},97267:function(bn,ln,$e){"use strict";var rt=$e(59301),St=$e(93314),ie=$e(3113),Re=Object.defineProperty,je=Object.defineProperties,ve=Object.getOwnPropertyDescriptors,ce=Object.getOwnPropertySymbols,be=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,ye=(fe,z,ee)=>z in fe?Re(fe,z,{enumerable:!0,configurable:!0,writable:!0,value:ee}):fe[z]=ee,we=(fe,z)=>{for(var ee in z||(z={}))be.call(z,ee)&&ye(fe,ee,z[ee]);if(ce)for(var ee of ce(z))Ce.call(z,ee)&&ye(fe,ee,z[ee]);return fe},me=(fe,z)=>je(fe,ve(z));const xe=({img:fe,buttonProps:z={},styles:ee={},customText:ae,ButtonText:re,ButtonClick:le,Buttonclass:ue,ButtonTwo:pe,imgStyles:Ee,loading:Pe=!1})=>rt.createElement("section",{className:"tc animated fadeIn",style:we(we({},{color:"#999",margin:"100px auto",visibility:Pe?"hidden":"visible"}),ee)},rt.createElement("img",{src:fe||St,style:me(we({},Ee),{pointerEvents:"none",userSelect:"none"})}),rt.createElement("p",{className:"mt20 font14"},ae||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),re&&rt.createElement(ie.ZP,we({className:ue,onClick:le},z),re),pe&&pe);ln.Z=xe},79646:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return ue}});var rt=$e(59301),St={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},ie=$e(3113),Re=$e(63093),je=$e(48551),ve=$e(6848),ce=$e(58130),be=$e(79124),Ce=$e(97267),ye=$e(10148),we=$e(63486),me=$e(59301),xe=Object.defineProperty,fe=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ae=(pe,Ee,Pe)=>Ee in pe?xe(pe,Ee,{enumerable:!0,configurable:!0,writable:!0,value:Pe}):pe[Ee]=Pe,re=(pe,Ee)=>{for(var Pe in Ee||(Ee={}))z.call(Ee,Pe)&&ae(pe,Pe,Ee[Pe]);if(fe)for(var Pe of fe(Ee))ee.call(Ee,Pe)&&ae(pe,Pe,Ee[Pe]);return pe},le=(pe,Ee,Pe)=>new Promise((Ie,ke)=>{var Ae=_e=>{try{Fe(Pe.next(_e))}catch(Ye){ke(Ye)}},Oe=_e=>{try{Fe(Pe.throw(_e))}catch(Ye){ke(Ye)}},Fe=_e=>_e.done?Ie(_e.value):Promise.resolve(_e.value).then(Ae,Oe);Fe((Pe=Pe.apply(pe,Ee)).next())}),ue=({editOffice:pe="view",data:Ee,theme:Pe,type:Ie,filename:ke,monacoEditor:Ae,className:Oe,style:Fe,close:_e,onClose:Ye,hasMask:ze,disabledDownload:Xe,onImgDimensions:st,showNodata:ht,recordInfo:ft})=>{const[Lt,et]=(0,rt.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[it,xt]=(0,rt.useState)(""),[Et,Mt]=(0,rt.useState)(),mt=window.ENV==="build"?"/react/build":"",pt=location.host.startsWith("localhost")?ye.Z.PROXY_SERVER:ye.Z.API_SERVER,jt=10*(1024*1024),At=(0,rt.useRef)();Ee!=null&&Ee.startsWith("/api")&&Ie!=="txt"&&(Ee=ye.Z.API_SERVER+Ee);const Kt=bt=>bt.substring(bt.lastIndexOf("/")+1).split(".").pop();ke&&Ae&&(Ae.filename=ke),(0,rt.useEffect)(()=>{var bt,Ke;const ut=(Ke=(bt=document.cookie)==null?void 0:bt.replace(/\s/g,""))==null?void 0:Ke.split(";");ut==null||ut.map(wt=>{let yt=wt.split("=");yt[0]==="_educoder_session"&&xt(yt[1])})},[]),(0,rt.useEffect)(()=>{Ie==="office"&&(Ee.indexOf("bigfilescdn.")>-1||Ee.indexOf("bigfiles1")>-1?Mt({url:Ee,fileType:Kt(Ee),model:Ee.indexOf("model=edit")?"edit":"view"}):Ct())},[Ie,Ee]);const Ct=()=>le(void 0,null,function*(){console.log("data:",Ee);let bt=Ee;Ee.startsWith("http")||(bt=location.origin+bt);let Ke=new URL(bt).pathname.split("/").pop();const ut=yield(0,be.gJ)({attachment_id:Ke});ut.url=pt+ut.url,Mt(ut)}),gt=()=>{if(Ee.startsWith("http")||Ee.startsWith("blob:")){tt();return}(0,ce.Sv)(ke||"educoder",Ee,ke)},tt=()=>{ft&&(0,we.fc)({id:ft==null?void 0:ft.id,watch_type:1,course_id:ft==null?void 0:ft.course_id}),(0,ce.Nd)(ke||"educoder",decodeURIComponent(Ee))};return me.createElement("div",{style:re({},Fe||{}),className:`${ze&&St.bgBlack} ${Ie?St.wrp:"hide"}`},_e&&me.createElement("div",{className:St.close,ref:At},!!st&&me.createElement(ve.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>At.current},me.createElement("span",{onClick:()=>{Ye(),st()}},me.createElement("i",{className:"icon-yulanpizhu"}))),!Xe&&me.createElement(ve.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>At.current},me.createElement("span",{onClick:tt},me.createElement("i",{className:"icon-quxiaozhiding"}))),me.createElement(ve.Z,{title:"\u5173\u95ED",getPopupContainer:()=>At.current},me.createElement("span",{className:"",onClick:Ye},me.createElement("i",{className:"icon-guanbi1"})))),me.createElement("div",{className:`${St[Oe]} ${Oe} ${St.monaco} ${Ie==="txt"?"show":"hide"}`},Ie==="txt"&&me.createElement(me.Fragment,null,me.createElement(je.ZP,re({},Ae)))),Ie==="audio"&&me.createElement("audio",{src:`${(Ee==null?void 0:Ee.indexOf("http://"))>-1||(Ee==null?void 0:Ee.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Ee}`,autoPlay:!0}),Ie==="video"&&me.createElement(me.Fragment,null,(Ee==null?void 0:Ee.indexOf("http"))>-1?me.createElement("video",{controls:!0,src:`${Ee}`,autoPlay:!0}):me.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Ee}`,autoPlay:!0})),Ie==="office"&&Et&&me.createElement("iframe",{src:`${mt}/office.html?key=${Et.key}&url=${btoa(Et.url)}&callbackUrl=${pt+(Et.callbackUrl||"")}&fileType=${Et.fileType}&title=${Et.title||""}&model=${pe}&officeServer=${ye.Z.ONLYOFFICE}&disabledDownload=${!!Xe}`}),Ie==="html"&&me.createElement("iframe",{src:Ee+"&disposition=inline"}),Ie==="pdf"&&me.createElement("iframe",{src:`${mt}/js/pdfview/index.html?filename=${ke||"educoder.pdf"}&url=${encodeURIComponent(Ee)}&disabledDownload=${!!Xe}`}),Ie==="image"&&me.createElement("img",{src:`${(Ee==null?void 0:Ee.indexOf("http://"))>-1||(Ee==null?void 0:Ee.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Ee}`}),(Ie==="other"||Ie==="download")&&me.createElement(me.Fragment,null,ht?me.createElement(Ce.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:me.createElement(ie.ZP,{icon:me.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:gt,disabled:Xe},"\u4E0B\u8F7D")}):me.createElement(ie.ZP,{type:"primary",size:"middle",onClick:gt,disabled:Xe},me.createElement(Re.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},25711:function(bn,ln,$e){"use strict";$e.d(ln,{z:function(){return Ie},Z:function(){return ke}});var rt=$e(59301),St=$e(1751),ie=$e(31087),Re=$e(64018),je=$e(37312),ve=$e(10148),ce=$e(58130),be=$e(15342),Ce=$e(1012),ye=$e(79646),we=$e(59301),xe=({html:Ae})=>{const Oe=(0,rt.useRef)(null),Fe=(0,rt.useRef)(null),_e=`.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,rt.useEffect)(()=>{const Ye=Oe.current.attachShadow({mode:"open"});Fe.current=document.createElement("div"),Fe.current.className="markdown-body",Fe.current.innerHTML=Ae,Ye.appendChild(Fe.current);const ze=document.createElement("style");return ze.textContent=_e,Ye.appendChild(ze),()=>{Ye.innerHTML=""}},[]),(0,rt.useEffect)(()=>{Fe.current&&(Fe.current.innerHTML=Ae)},[Ae]),we.createElement("div",{ref:Oe})},fe=Object.defineProperty,z=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable,re=(Ae,Oe,Fe)=>Oe in Ae?fe(Ae,Oe,{enumerable:!0,configurable:!0,writable:!0,value:Fe}):Ae[Oe]=Fe,le=(Ae,Oe)=>{for(var Fe in Oe||(Oe={}))ee.call(Oe,Fe)&&re(Ae,Fe,Oe[Fe]);if(z)for(var Fe of z(Oe))ae.call(Oe,Fe)&&re(Ae,Fe,Oe[Fe]);return Ae};const ue="@\u2581\u2581@",pe="@\u2581@",Ee=/<pre[^>]*>/g;function Pe(Ae){let Oe=document.createElement("div");return Oe.innerHTML=Ae,Oe.childNodes.length===0?"":Oe.childNodes[0].nodeValue}const Ie=(Ae,Oe)=>{Ae=Ae||"";const Fe=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,_e=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ye=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,ze=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Oe?Ae.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Fe,(Xe,st,ht,ft,Lt,et,it)=>{const xt=st||ft||et,Et=ht||Lt||it||"?";return ve.Z.API_SERVER+"/api/attachments/"+xt+Et+"&t="+(0,ce.Jn)(xt,Date.now())+(Xe.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Ae=Ae.replace(ze,(Xe,st,ht,ft,Lt,et,it)=>{const xt=st||ft||et,Et=ht||Lt||it||"?";return ve.Z.API_SERVER+"/attachments/download/"+xt+Et+"&t="+(0,ce.Jn)(xt,Date.now())+(Xe.indexOf(")")>-1?")":"&")}).replace(Fe,(Xe,st,ht,ft,Lt,et,it)=>{const xt=st||ft||et,Et=ht||Lt||it||"?";return ve.Z.API_SERVER+"/api/attachments/"+xt+Et+"&t="+(0,ce.Jn)(xt,Date.now())+(Xe.indexOf(")")>-1?")":"&")}).replace(_e,(Xe,st,ht,ft,Lt)=>{const et=st||ft,it=ht||Lt||"";return'"'+ve.Z.API_SERVER+"/api/attachments/"+et+it+et+it+"&t="+(0,ce.Jn)(et,Date.now())}).replace(Ye,(Xe,st,ht,ft,Lt)=>{const et=st||ft,it=ht||Lt||"";return"("+ve.Z.API_SERVER+"/files/uploads/"+et+it+et+it+"&t="+(0,ce.Jn)(et,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,`
`),Ae)};var ke=({value:Ae="",className:Oe,showTextOnly:Fe,showLines:_e,style:Ye={},stylesPrev:ze={},highlightKeywords:Xe,showProgramFill:st,isProgramFill:ht,disabledFill:ft=!1,programFillValue:Lt,onFillChange:et=Et=>{},onFillBlur:it=()=>{},onFillFocus:xt=()=>{}})=>{let Et=String(Ae);const[Mt,mt]=(0,rt.useState)(""),[pt,vt]=(0,rt.useState)("office"),[jt,At]=(0,rt.useState)([]),Kt=(0,rt.useRef)("a"+(0,Ce.Z)()),Ct={},gt=(He,De,Le)=>{const Ve=document.createElement(He===pe?"input":"textarea");Ve.style.width="100%",Ve.style.height=He===pe?"40px":"151px",Ve.rows=5,Ve.spellcheck=!1,Ve.name="edu-program-fill",Ve.placeholder="\u8BF7\u8F93\u5165",Ve.dataset.id=De;const dt=Object.keys(Ct).length;return Ct[dt]=Ve,`<span class="edu-program-fill-wrap ${He===pe?"":"show"}" style="width:${He===pe?"400px":"100%"}" title=${Le||""}><span>${Ve.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function tt(He){return He=He.replace(/!\[.*?\]\(.*?\)/g,""),He=He.replace(/\[.*?\]\(.*?\)/g,""),He=He.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),He=He.replace(/<embed.*?>/g,""),He=He.replace(/<img.*?>/g,""),He=He.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),He=He.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),He=He.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),He=He.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),He}const bt=He=>He.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(De,Le){let Ve=Le.replace(/(\n|\r)/g,"").split("}"),dt=[];return Ve.map(Ze=>{Ze!=""&&dt.push(`.${Kt.current} ${Ze}`)}),`<style>${dt.join("}")}</style>`}),Ke=(0,rt.useMemo)(()=>{try{const Ve=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,dt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Ze=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Tt=/\(\/attachments\/download\//g;Et=Et.replace(Tt,"("+ve.Z.API_SERVER+"/attachments/download/").replace(Ve,"("+ve.Z.API_SERVER+"/api/attachments/").replace(dt,'"'+ve.Z.API_SERVER+"/api/attachments/").replace(Ze,'"'+ve.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(Ve){}if(st){let Ve=-1;return Et=Et.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(dt,Ze,Tt){var _t;return++Ve,gt(dt,Ve,(_t=Lt==null?void 0:Lt[Ve])==null?void 0:_t.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${bt(Et||"")}</pre>`}let He=bt(Et);He=(0,ie.ZP)(He);const De=(0,ie.ez)();Et.match(/\[TOC\]/)&&(He=He.replace("<p>[TOC]</p>",(0,ie.Qv)()),(0,ie.Iy)()),He=He.replace(/(__special_katext_id_\d+__)/g,(Ve,dt)=>{const{type:Ze,expression:Tt}=De[dt];return(0,be.renderToString)(Pe(Tt)||"",{displayMode:Ze==="block",throwOnError:!1,output:"html"})}),He=He.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,ie.AL)();const Le=document.createElement("div");if(Le.innerHTML=He,Fe)return Le.innerText;if(Xe){const Ve=Xe.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return lt(Le,Ve),Le.innerHTML}return setTimeout(()=>Ue(),500),Le.innerHTML},[Et,Xe]);(0,rt.useEffect)(()=>{Qe.current&&Qe.current.querySelectorAll(["input","textarea"]).forEach(De=>{De.oninput=ut,De.onblur=wt,De.onfocus=yt})},[jt]),(0,rt.useEffect)(()=>{var He,De,Le,Ve,dt;if(Lt!=null&&Lt.length)try{const Ze=Qe.current.querySelectorAll(".edu-program-fill-score"),Tt=Qe.current.querySelectorAll('[name="edu-program-fill"]');for(const[_t,Qt]of Tt.entries())Qt.value=((He=Lt==null?void 0:Lt[_t])==null?void 0:He.value)||"",((De=Lt==null?void 0:Lt[_t])==null?void 0:De.type)==="warning"?Qt.className="program-fill-warning":((Le=Lt==null?void 0:Lt[_t])==null?void 0:Le.type)==="success"?Qt.className="program-fill-success":Qt.className="";for(const[_t,Qt]of Ze.entries())Qt.innerHTML=(Ve=Lt==null?void 0:Lt[_t])!=null&&Ve.score?`${(dt=Lt==null?void 0:Lt[_t])==null?void 0:dt.score}\u5206`:"";At(Lt)}catch(Ze){console.log(Ze,"error")}},[Lt]);const ut=He=>{jt[He.target.dataset.id]=jt[He.target.dataset.id]||{},jt[He.target.dataset.id].value=He.target.value,At([...jt]),et(jt,He.target.dataset.id)},wt=He=>{jt[He.target.dataset.id]=jt[He.target.dataset.id]||{},jt[He.target.dataset.id].value=He.target.value,At([...jt]),it(jt,He.target.dataset.id)},yt=He=>{jt[He.target.dataset.id]=jt[He.target.dataset.id]||{},jt[He.target.dataset.id].value=He.target.value,At([...jt]),xt(jt,He.target.dataset.id)};function lt(He,De){return He.childNodes.forEach(Le=>{var Ve;if(Le.childNodes.length>0)lt(Le,De);else if(Le.nodeName!=="IMG")if(Le.innerHTML)Le.innerHTML=(Ve=Le.innerHTML)==null?void 0:Ve.replace(new RegExp(De,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const dt=document.createElement("span");dt.innerHTML=Le.textContent.replace(new RegExp(De,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Le.replaceWith(dt)}})}const Qe=(0,rt.useRef)();ie.jb.WebkitLineClamp=_e,_e&&(Ye=le(le({},Ye),ie.jb));function We(He){let De=He.target;if(De.tagName.toUpperCase()==="A"){let Le=De.getAttribute("href");if(Le.indexOf("office")>-1)He.preventDefault(),mt(Le),vt("office");else if(Le.indexOf("application/pdf")>-1)He.preventDefault(),mt(Le),vt("pdf");else if(Le.indexOf("text/html")>-1)He.preventDefault(),mt(Le),vt("html");else if(Le.startsWith("#")){He.preventDefault();let Ve=document.getElementById(Le.replace("#",""));Ve&&Ve.scrollIntoView(!0)}}}const Ue=()=>{var He;const De=(He=Qe.current)==null?void 0:He.querySelectorAll("video");De==null||De.forEach(Le=>{if(Le.oncontextmenu=()=>!1,Le.src.indexOf(".m3u8")>-1&&!Le.canPlayType("application/vnd.apple.mpegurl")){if(je.ZP.isSupported()){var Ve=new je.ZP;Ve.loadSource(Le.src),Ve.attachMedia(Le)}}})};(0,rt.useEffect)(()=>{if(Qe.current&&Ke&&Ke.match(Ee)&&window.PR.prettyPrint(),Qe.current)return Qe.current.addEventListener("click",We),()=>{var He;(He=Qe.current)==null||He.removeEventListener("click",We),(0,ie.AL)(),(0,ie.Iy)()}},[Ke,Qe.current,We]),(0,rt.useEffect)(()=>{var He;const De=Le=>{Le.preventDefault(),Le.clipboardData.setData("text",window.getSelection().toString())};return(He=Qe.current)==null||He.addEventListener("copy",De),()=>{var Le;(Le=Qe.current)==null||Le.removeEventListener("copy",De)}},[Qe.current]);const qe=He=>/<style[\s\S]*?>/i.test(He||"");return rt.createElement(rt.Fragment,null,Fe&&rt.createElement("div",{ref:Qe},Ke),!Fe&&!qe(Ke)&&rt.createElement("div",{ref:Qe,style:le({},Ye),className:`${Oe||""} ${ft?"disabled-fill":""} markdown-body ${Kt.current}`,dangerouslySetInnerHTML:{__html:Ke}}),!Fe&&qe(Ke)&&rt.createElement(xe,{html:Ke}),rt.createElement(ye.Z,{close:!0,data:Mt,type:Mt!=null&&Mt.length?pt:"",style:le({},ze),onClose:()=>mt("")}))}},69003:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return Re}});var rt=$e(59301),St=$e(86766),ie=$e(59301),Re=({defaultX:je="40%",leftChild:ve,rightChild:ce,className:be,hideResize:Ce=!1})=>{const[ye,we]=(0,rt.useState)(je),me=(0,rt.useRef)();function xe(){me.current=!0}(0,rt.useEffect)(()=>{function ee(re){me.current&&(St.Z.publish("resize-move-bar",re),we(re.pageX))}function ae(){me.current=!1}return window.addEventListener("mousemove",ee),window.addEventListener("mouseup",ae),()=>{window.removeEventListener("mousemove",ee),window.removeEventListener("mouseup",ae)}},[]);const fe=typeof ye=="number"&&ye!==.01?`${ye}px`:je,z=`calc(100% - ${Ce?"0px":"4px"} - ${fe})`;return ie.createElement("div",{className:`split-panel-container ${be}`},ie.createElement("section",{style:{width:fe,display:ye===.01?"none":""}},ve),ie.createElement("section",{className:"resize-x-bar",onMouseDown:xe},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}},ce))}},9168:function(bn,ln,$e){"use strict";$e.d(ln,{cT:function(){return Ae},pe:function(){return Pe}});var rt=$e(59301),St=$e(24645),ie=$e(8591),Re=$e(70635),je=$e(28209),ve=$e.n(je),ce=$e(1012),be=$e(42203),Ce=$e(47257),ye=$e.n(Ce),we=Object.defineProperty,me=Object.defineProperties,xe=Object.getOwnPropertyDescriptors,fe=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ae=(Fe,_e,Ye)=>_e in Fe?we(Fe,_e,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):Fe[_e]=Ye,re=(Fe,_e)=>{for(var Ye in _e||(_e={}))z.call(_e,Ye)&&ae(Fe,Ye,_e[Ye]);if(fe)for(var Ye of fe(_e))ee.call(_e,Ye)&&ae(Fe,Ye,_e[Ye]);return Fe},le=(Fe,_e)=>me(Fe,xe(_e)),ue=(Fe,_e)=>{var Ye={};for(var ze in Fe)z.call(Fe,ze)&&_e.indexOf(ze)<0&&(Ye[ze]=Fe[ze]);if(Fe!=null&&fe)for(var ze of fe(Fe))_e.indexOf(ze)<0&&ee.call(Fe,ze)&&(Ye[ze]=Fe[ze]);return Ye},pe=(Fe,_e,Ye)=>new Promise((ze,Xe)=>{var st=Lt=>{try{ft(Ye.next(Lt))}catch(et){Xe(et)}},ht=Lt=>{try{ft(Ye.throw(Lt))}catch(et){Xe(et)}},ft=Lt=>Lt.done?ze(Lt.value):Promise.resolve(Lt.value).then(st,ht);ft((Ye=Ye.apply(Fe,_e)).next())});const{Dragger:Ee}=St.default,Pe=Fe=>{const _e="bf3c199c2470cb477d907b1e0917c17b",Ye="5183666c72eec9e4";var ze=ve().enc.Utf8.parse(_e);let Xe=ve().enc.Utf8.parse(Ye);var st=ve().AES.decrypt(Fe,ze,{iv:Xe,mode:ve().mode.CBC});return st.toString(ve().enc.Utf8)};let Ie;const ke=Fe=>pe(void 0,[Fe],function*({identifier:_e,oldFilename:Ye,newFilename:ze}){var Xe,st,ht,ft,Lt,et;const it=yield Fetch("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});it.data=JSON.parse(Pe(it.data));const xt=new OSS({endpoint:(Xe=it==null?void 0:it.data)==null?void 0:Xe.end_point,region:(st=it==null?void 0:it.data)==null?void 0:st.region,accessKeyId:(ht=it==null?void 0:it.data)==null?void 0:ht.access_key_id,accessKeySecret:(ft=it==null?void 0:it.data)==null?void 0:ft.access_key_secret,bucket:(Lt=it==null?void 0:it.data)==null?void 0:Lt.bucket,stsToken:(et=it==null?void 0:it.data)==null?void 0:et.security_token});return new Promise((Et,Mt)=>{console.log(11111,`${_e}/${Ye}`,`${_e}/${ze}`,it.data),xt.copy(`/${_e}/${Ye}`,`/${_e}/${ze}`).then(mt=>{console.log("\u62F7\u8D1D\u6210\u529F",mt)}).catch(mt=>{console.log(mt)})})}),Ae=(Fe,_e,Ye)=>pe(void 0,null,function*(){var ze,Xe,st,ht,ft,Lt;_e.file_name=Fe.name;const et=yield(0,Re.ZP)("/api/buckets/get_upload_token.json",{method:"get"});console.log("decrypt(res.data):",Pe(et.data)),et.data=JSON.parse(Pe(et.data));const it=Fe.name.split(".");it.pop();const xt=_e.realFileName?it.join(""):(0,ce.Z)(),Et=new(ye())({endpoint:(ze=et==null?void 0:et.data)==null?void 0:ze.end_point,region:(Xe=et==null?void 0:et.data)==null?void 0:Xe.region,accessKeyId:(st=et==null?void 0:et.data)==null?void 0:st.access_key_id,accessKeySecret:(ht=et==null?void 0:et.data)==null?void 0:ht.access_key_secret,bucket:(ft=et==null?void 0:et.data)==null?void 0:ft.bucket,stsToken:(Lt=et==null?void 0:et.data)==null?void 0:Lt.security_token});return new Promise((Mt,mt)=>{var pt;Et.multipartUpload(`${xt}`,new Blob([Fe],{type:Fe.type}),le(re({timeout:200*1e3,partSize:102400},Ye),{callback:{url:(pt=et==null?void 0:et.data)==null?void 0:pt.callback_url,host:et==null?void 0:et.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,Re.rz)(_e)}})).then(function(vt){var jt;Fe.response=(jt=vt.data)==null?void 0:jt.data,Mt(vt==null?void 0:vt.data)}).catch(function(vt){mt(vt),console.log("err:",vt)})})}),Oe=Fe=>{var _e=Fe,{user:Ye,cancelUpload:ze}=_e,Xe=ue(_e,["user","cancelUpload"]);const[st,ht]=(0,rt.useState)([]);let[ft,Lt]=(0,rt.useState)();const et={onRemove:xt=>{ht([...st.filter(Et=>Et.name!==xt.name)]),Xe.onChange(st.filter(Et=>Et.name!==xt.name))},disabled:Xe.disabled,multiple:!0,fileList:st==null?void 0:st.map(xt=>xt.file),customRequest:()=>{},beforeUpload:xt=>pe(void 0,null,function*(){let Et=Xe.maxSize||1073741824;if(st.filter(Mt=>Mt.name===xt.name).length){ie.ZP.info(`${xt.name}\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9`);return}return(xt==null?void 0:xt.size)>Et?(ie.ZP.info(`\u6587\u4EF6\u8D85\u8FC7${Et/1024/1024/1024}GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42`),!1):(st.push({name:xt.name,file:xt}),ht([...st]),Xe.onChange(st),!1)})},it=(xt,Et)=>pe(void 0,null,function*(){var Mt,mt,pt,vt,jt,At;Et.file_name=xt.name;const Kt=xt.name,Ct=yield(0,Re.ZP)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});if(Ct.data=JSON.parse(Pe(Ct.data)),(Ct==null?void 0:Ct.status)!==0){st[st.findIndex(bt=>bt.name===Kt)].status="error",st[st.findIndex(bt=>bt.name===Kt)].file.status="error",Xe.onChange(st),ie.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}ft=new(ye())({endpoint:(Mt=Ct==null?void 0:Ct.data)==null?void 0:Mt.end_point,region:(mt=Ct==null?void 0:Ct.data)==null?void 0:mt.region,accessKeyId:(pt=Ct==null?void 0:Ct.data)==null?void 0:pt.access_key_id,accessKeySecret:(vt=Ct==null?void 0:Ct.data)==null?void 0:vt.access_key_secret,bucket:(jt=Ct==null?void 0:Ct.data)==null?void 0:jt.bucket,stsToken:(At=Ct==null?void 0:Ct.data)==null?void 0:At.security_token}),console.log(xt,"file"),Lt(ft);const gt=xt.name.split(".");gt.pop();const tt=Kt.indexOf(".")>-1?Et.realFileName?gt.join("."):(0,ce.Z)():Kt;return new Promise((bt,Ke)=>{var ut;try{ft.multipartUpload(`${Xe.identifier}/${tt}${Kt.indexOf(".")>-1?"."+Kt.split(".").pop():""}`,new Blob([xt.file],{type:xt.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(wt,yt,lt)=>{try{console.log("\u8FDB\u5EA6",wt,yt,lt);const Qe=st.findIndex(We=>We.name===Kt);st[Qe].file.percent=wt*100,st[Qe].tempCheckpoint=yt,ht([...st])}catch(Qe){}},checkpoint:st[st.findIndex(wt=>wt.name===Kt)].tempCheckpoint,callback:{customValue:{id:Kt+""},url:(ut=Ct==null?void 0:Ct.data)==null?void 0:ut.callback_url,host:Ct==null?void 0:Ct.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,Re.rz)(Et)}}).then(function(wt){var yt,lt,Qe;const We=st.findIndex(qe=>qe.name===Kt);let Ue="done";if(((yt=wt.data)==null?void 0:yt.status)===0){xt.response=(lt=wt.data)==null?void 0:lt.data;const qe=st.findIndex(He=>He.name===Kt);st[qe].status="done",st[qe].file.status="done"}else ie.ZP.warning((Qe=wt.data)==null?void 0:Qe.message),Ue="error";st[We].status=Ue,st[We].file.status=Ue,Xe.onChange(st),bt(wt==null?void 0:wt.data)}).catch(function(wt){st[st.findIndex(yt=>yt.name===Kt)].status="error",st[st.findIndex(yt=>yt.name===Kt)].file.status="error",ie.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),ht([...st]),Xe.onChange(st),Ke(wt),console.log("err:",wt)})}catch(wt){}})});return(0,rt.useEffect)(()=>{st.every(xt=>xt==="done"||xt==="error")&&Xe.onComplete(st)},[st]),(0,rt.useEffect)(()=>{ze&&(ft==null||ft.cancel())},[ze]),(0,rt.useEffect)(()=>{Xe.uploading&&st.map(xt=>pe(void 0,null,function*(){var Et;if((!xt.status||xt.status==="error")&&!ze){xt.status="uploading",xt.file.status="uploading";const Mt=yield it(xt,{login:(Et=Ye==null?void 0:Ye.userInfo)==null?void 0:Et.login,container_type:Xe.container_type,container_id:Xe.container_id,description:Xe.description,realFileName:Xe.realFileName})}}))},[Xe.uploading]),rt.createElement(Ee,le(re({},et),{height:Xe.height,className:Xe.className}),rt.createElement("p",{className:"ant-upload-hint"},Xe.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};ln.ZP=(0,be.connect)(({loading:Fe,globalSetting:_e,user:Ye})=>({globalSetting:_e,loading:Fe.models.competitions,user:Ye}))(Oe)},36866:function(bn,ln,$e){"use strict";$e.d(ln,{h:function(){return pe},Z:function(){return ue}});var rt=$e(59301),St=$e(57809),ie=$e(78241),Re=$e(3113),je=$e(89780),ve=$e.n(je),ce=$e(79906),be=Object.defineProperty,Ce=Object.defineProperties,ye=Object.getOwnPropertyDescriptors,we=Object.getOwnPropertySymbols,me=Object.prototype.hasOwnProperty,xe=Object.prototype.propertyIsEnumerable,fe=(Ee,Pe,Ie)=>Pe in Ee?be(Ee,Pe,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):Ee[Pe]=Ie,z=(Ee,Pe)=>{for(var Ie in Pe||(Pe={}))me.call(Pe,Ie)&&fe(Ee,Ie,Pe[Ie]);if(we)for(var Ie of we(Pe))xe.call(Pe,Ie)&&fe(Ee,Ie,Pe[Ie]);return Ee},ee=(Ee,Pe)=>Ce(Ee,ye(Pe));const ae=St.default.Option,re={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"]};var ue=({callback:Ee,onCancel:Pe})=>{const[Ie,ke]=(0,rt.useState)("python");function Ae(Fe){ke(le[Fe][1])}function Oe(Fe){Ee(Fe)}return rt.createElement(ie.default,ee(z({},re),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Oe,style:{width:500}}),rt.createElement(ie.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},rt.createElement(St.default,{getPopupContainer:Fe=>Fe.parentNode,onChange:Ae},Object.keys(le).map(Fe=>rt.createElement(ae,{key:Fe,value:Fe},le[Fe][0])))),rt.createElement(ie.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},rt.createElement(pe,{mode:Ie})),rt.createElement("div",{className:"flex-container flex-end"},rt.createElement(Re.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),rt.createElement(Re.ZP,{type:"ghost",onClick:Pe},"\u53D6\u6D88")))};function pe({value:Ee,onChange:Pe,mode:Ie,options:ke={}}){const Ae=(0,rt.useRef)(),[Oe,Fe]=(0,rt.useState)();return(0,rt.useEffect)(()=>{if(Oe){let _e=function(Ye){const ze=Ye.getValue();Pe&&Pe(ze)};return Oe.on("change",_e),()=>{Oe.off("change",_e)}}},[Oe,Pe]),(0,rt.useEffect)(()=>{Oe&&Oe.setOption("mode",Ie)},[Oe,Ie]),(0,rt.useEffect)(()=>{Oe&&(Ee!==Oe.getValue()||Ee==="")&&setTimeout(()=>{Oe.setValue(Ee||"")},300)},[Oe,Ee]),(0,rt.useEffect)(()=>{if(Ae.current&&!Oe){const _e=ve().fromTextArea(Ae.current,z({mode:Ie,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},ke));Fe(_e)}},[Ae.current,Oe]),rt.createElement("div",{className:"my-codemirror-container"},rt.createElement("textarea",{ref:Ae}))}},23469:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return yi}});var rt=$e(59301),St=$e(89780),ie=$e.n(St),Re=$e(76374),je=$e(79906),ve=$e(6313),ce=$e(25717),be=$e(99498),Ce=$e(25419),ye=$e(67549),we=$e(25711),me=({value:dn="",className:mn,showTextOnly:un,showLines:Ut,style:xn={}})=>{const jn=(0,rt.useMemo)(()=>"",[dn]);return rt.createElement(rt.Fragment,null,rt.createElement("div",{dangerouslySetInnerHTML:{__html:jn}}))},xe=$e(59301),fe=Object.defineProperty,z=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,ae=Object.getOwnPropertySymbols,re=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable,ue=(dn,mn,un)=>mn in dn?fe(dn,mn,{enumerable:!0,configurable:!0,writable:!0,value:un}):dn[mn]=un,pe=(dn,mn)=>{for(var un in mn||(mn={}))re.call(mn,un)&&ue(dn,un,mn[un]);if(ae)for(var un of ae(mn))le.call(mn,un)&&ue(dn,un,mn[un]);return dn},Ee=(dn,mn)=>z(dn,ee(mn));let Pe=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u56FE\u50CF",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"iconfont icon-jisuan1",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function Ie({onActionCallback:dn,title:mn,icon:un,actionName:Ut,className:xn="",children:jn}){function en(){dn(Ut)}return xe.createElement("a",{title:mn,className:xn,onClick:en},xe.createElement("i",{className:`${un}`}),jn)}var ke=({watch:dn,showNullButton:mn,showNullProgramButton:un,onActionCallback:Ut,fullScreen:xn,insertTemp:jn,hidetoolBar:en,extraUse:Gt})=>{const Cn=[...Pe,{title:`${dn?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${dn?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return xe.createElement("ul",{className:"markdown-toolbar-container"},!en&&Cn.map((Gn,ir)=>xe.createElement("li",{key:ir},Gn.actionName?xe.createElement(Ie,Ee(pe({},Gn),{onActionCallback:Ut})):xe.createElement("span",{className:"v-line"}))),mn?xe.createElement("li",null,xe.createElement(Ie,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Ut},xe.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,un?xe.createElement(xe.Fragment,null,xe.createElement("li",null,xe.createElement(Ie,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Ut},xe.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),xe.createElement("li",null,xe.createElement(Ie,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Ut},xe.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,jn&&xe.createElement("li",null,xe.createElement(Ie,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${jn}`,onActionCallback:Ut},xe.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Gt&&xe.createElement("li",null,Gt),xe.createElement("li",{className:"btn-full-screen"},xe.createElement(Ie,{icon:`${xn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:xn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Ut})))},Ae=$e(50474),Oe=$e(78241),Fe=$e(92832),_e=$e(3113),Ye=Object.defineProperty,ze=Object.defineProperties,Xe=Object.getOwnPropertyDescriptors,st=Object.getOwnPropertySymbols,ht=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,Lt=(dn,mn,un)=>mn in dn?Ye(dn,mn,{enumerable:!0,configurable:!0,writable:!0,value:un}):dn[mn]=un,et=(dn,mn)=>{for(var un in mn||(mn={}))ht.call(mn,un)&&Lt(dn,un,mn[un]);if(st)for(var un of st(mn))ft.call(mn,un)&&Lt(dn,un,mn[un]);return dn},it=(dn,mn)=>ze(dn,Xe(mn));const xt={labelCol:{span:4},wrapperCol:{span:20}};var Et=({callback:dn,onCancel:mn})=>{function un(Ut){dn(Ut)}return rt.createElement(Oe.default,it(et({},xt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:un,style:{width:500}}),rt.createElement(Oe.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},rt.createElement(Fe.default,null)),rt.createElement(Oe.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},rt.createElement(Fe.default,null)),rt.createElement("div",{className:"flex-container flex-end"},rt.createElement(_e.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),rt.createElement(_e.ZP,{type:"ghost",onClick:mn},"\u53D6\u6D88")))},Mt=$e(36866),mt=$e(56701),pt=$e(43418),vt=$e(95237),jt=$e(65983),At=$e(59301),Kt=({callback:dn,onCancel:mn})=>{const un=document.createElement("canvas"),Ut=un.getContext("2d");un.width=1e3,un.height=800,Ut.fillStyle="#ffffff",Ut.fillRect(0,0,un.width,un.height);const xn=un.toDataURL("image/png");return At.createElement(pt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},At.createElement(vt.Z,{style:{height:"100vh"}},At.createElement(jt.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:xn,visible:!0,title:String(Date.now())},onOk:jn=>{dn({src:jn.url})},onClose:mn})))},Ct=$e(12378);function gt(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(gt,go.CommandHandler),gt.prototype.canAlignSelection=function(){var dn=this.diagram;return!(dn===null||dn.isReadOnly||dn.isModelReadOnly||dn.selection.count<2)},gt.prototype.alignLeft=function(){var dn=this.diagram;dn.startTransaction("aligning left");var mn=1/0;dn.selection.each(function(un){un instanceof go.Link||(mn=Math.min(un.position.x,mn))}),dn.selection.each(function(un){un instanceof go.Link||un.move(new go.Point(mn,un.position.y))}),dn.commitTransaction("aligning left")},gt.prototype.alignRight=function(){var dn=this.diagram;dn.startTransaction("aligning right");var mn=-1/0;dn.selection.each(function(un){if(!(un instanceof go.Link)){var Ut=un.actualBounds.x+un.actualBounds.width;mn=Math.max(Ut,mn)}}),dn.selection.each(function(un){un instanceof go.Link||un.move(new go.Point(mn-un.actualBounds.width,un.position.y))}),dn.commitTransaction("aligning right")},gt.prototype.alignTop=function(){var dn=this.diagram;dn.startTransaction("alignTop");var mn=1/0;dn.selection.each(function(un){un instanceof go.Link||(mn=Math.min(un.position.y,mn))}),dn.selection.each(function(un){un instanceof go.Link||un.move(new go.Point(un.position.x,mn))}),dn.commitTransaction("alignTop")},gt.prototype.alignBottom=function(){var dn=this.diagram;dn.startTransaction("aligning bottom");var mn=-1/0;dn.selection.each(function(un){if(!(un instanceof go.Link)){var Ut=un.actualBounds.y+un.actualBounds.height;mn=Math.max(Ut,mn)}}),dn.selection.each(function(un){un instanceof go.Link||un.move(new go.Point(un.actualBounds.x,mn-un.actualBounds.height))}),dn.commitTransaction("aligning bottom")},gt.prototype.alignCenterX=function(){var dn=this.diagram,mn=dn.selection.first();if(mn){dn.startTransaction("aligning Center X");var un=mn.actualBounds.x+mn.actualBounds.width/2;dn.selection.each(function(Ut){Ut instanceof go.Link||Ut.move(new go.Point(un-Ut.actualBounds.width/2,Ut.actualBounds.y))}),dn.commitTransaction("aligning Center X")}},gt.prototype.alignCenterY=function(){var dn=this.diagram,mn=dn.selection.first();if(mn){dn.startTransaction("aligning Center Y");var un=mn.actualBounds.y+mn.actualBounds.height/2;dn.selection.each(function(Ut){Ut instanceof go.Link||Ut.move(new go.Point(Ut.actualBounds.x,un-Ut.actualBounds.height/2))}),dn.commitTransaction("aligning Center Y")}},gt.prototype.alignColumn=function(dn){var mn=this.diagram;mn.startTransaction("align Column"),dn===void 0&&(dn=0),dn=parseFloat(dn);var un=new Array;mn.selection.each(function(Gt){Gt instanceof go.Link||un.push(Gt)});for(var Ut=0;Ut<un.length-1;Ut++){var xn=un[Ut],jn=xn.actualBounds.y+xn.actualBounds.height+dn,en=un[Ut+1];en.move(new go.Point(xn.actualBounds.x,jn))}mn.commitTransaction("align Column")},gt.prototype.alignRow=function(dn){dn===void 0&&(dn=0),dn=parseFloat(dn);var mn=this.diagram;mn.startTransaction("align Row");var un=new Array;mn.selection.each(function(Gt){Gt instanceof go.Link||un.push(Gt)});for(var Ut=0;Ut<un.length-1;Ut++){var xn=un[Ut],jn=xn.actualBounds.x+xn.actualBounds.width+dn,en=un[Ut+1];en.move(new go.Point(jn,xn.actualBounds.y))}mn.commitTransaction("align Row")},gt.prototype.canRotate=function(dn){var mn=this.diagram;return!(mn===null||mn.isReadOnly||mn.isModelReadOnly||mn.selection.count<1)},gt.prototype.rotate=function(dn){dn===void 0&&(dn=90);var mn=this.diagram;mn.startTransaction("rotate "+dn.toString());var mn=this.diagram;mn.selection.each(function(un){un instanceof go.Link||un instanceof go.Group||(un.angle+=dn)}),mn.commitTransaction("rotate "+dn.toString())},gt.prototype.pullToFront=function(){var dn=this.diagram;dn.startTransaction("pullToFront");var mn=new go.Map;dn.selection.each(function(un){mn.set(un.layer,0)}),mn.iteratorKeys.each(function(un){var Ut=0;un.parts.each(function(xn){if(!xn.isSelected){var jn=xn.zOrder;isNaN(jn)?xn.zOrder=0:Ut=Math.max(Ut,jn)}}),mn.set(un,Ut)}),dn.selection.each(function(un){gt._assignZOrder(un,mn.get(un.layer)+1)}),dn.commitTransaction("pullToFront")},gt.prototype.pushToBack=function(){var dn=this.diagram;dn.startTransaction("pushToBack");var mn=new go.Map;dn.selection.each(function(un){mn.set(un.layer,0)}),mn.iteratorKeys.each(function(un){var Ut=0;un.parts.each(function(xn){if(!xn.isSelected){var jn=xn.zOrder;isNaN(jn)?xn.zOrder=0:Ut=Math.min(Ut,jn)}}),mn.set(un,Ut)}),dn.selection.each(function(un){gt._assignZOrder(un,mn.get(un.layer)-1-gt._findGroupDepth(un))}),dn.commitTransaction("pushToBack")},gt._assignZOrder=function(dn,mn,un){un===void 0&&(un=dn),dn.layer===un.layer&&(dn.zOrder=mn),dn instanceof go.Group&&dn.memberParts.each(function(Ut){gt._assignZOrder(Ut,mn+1,un)})},gt._findGroupDepth=function(dn){if(dn instanceof go.Group){var mn=0;return dn.memberParts.each(function(un){mn=Math.max(mn,gt._findGroupDepth(un))}),mn+1}else return 0},gt.prototype.doKeyDown=function(){var dn=this.diagram;if(dn!==null){var mn=dn.lastInput;if(mn.key==="Up"||mn.key==="Down"||mn.key==="Left"||mn.key==="Right"){var un=this.arrowKeyBehavior;if(un==="none")return;if(un==="select"){this._arrowKeySelect();return}else if(un==="move"){this._arrowKeyMove();return}else if(un==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},gt.prototype._getAllParts=function(){var dn=new Array;return this.diagram.nodes.each(function(mn){dn.push(mn)}),this.diagram.parts.each(function(mn){dn.push(mn)}),dn},gt.prototype._arrowKeyMove=function(){var dn=this.diagram,mn=dn.lastInput,un=0,Ut=0;if(mn.control||mn.meta)un=1,Ut=1;else if(dn.grid!==null){var xn=dn.grid.gridCellSize;Ut=xn.width,un=xn.height}dn.startTransaction("arrowKeyMove"),dn.selection.each(function(jn){mn.key==="Up"?jn.move(new go.Point(jn.actualBounds.x,jn.actualBounds.y-un)):mn.key==="Down"?jn.move(new go.Point(jn.actualBounds.x,jn.actualBounds.y+un)):mn.key==="Left"?jn.move(new go.Point(jn.actualBounds.x-Ut,jn.actualBounds.y)):mn.key==="Right"&&jn.move(new go.Point(jn.actualBounds.x+Ut,jn.actualBounds.y))}),dn.commitTransaction("arrowKeyMove")},gt.prototype._arrowKeySelect=function(){var dn=this.diagram,mn=dn.lastInput,un=null;mn.key==="Up"?un=this._findNearestPartTowards(270):mn.key==="Down"?un=this._findNearestPartTowards(90):mn.key==="Left"?un=this._findNearestPartTowards(180):mn.key==="Right"&&(un=this._findNearestPartTowards(0)),un!==null&&(mn.shift?un.isSelected=!0:mn.control||mn.meta?un.isSelected=!un.isSelected:dn.select(un))},gt.prototype._findNearestPartTowards=function(dn){var mn=this.diagram.selection.first();if(mn===null)return null;for(var un=mn.actualBounds.center,Ut=this._getAllParts(),xn=1/0,jn=mn,en=0;en<Ut.length;en++){var Gt=Ut[en];if(Gt!==mn&&Gt.canSelect()){var Cn=Gt.actualBounds.center,Gn=un.directionPoint(Cn),ir=this._angleCloseness(Gn,dn);if(ir<=45){var Pn=un.distanceSquaredPoint(Cn);Pn*=1+Math.sin(ir*Math.PI/180),Pn<xn&&(xn=Pn,jn=Gt)}}}return jn},gt.prototype._angleCloseness=function(dn,mn){return Math.min(Math.abs(mn-dn),Math.min(Math.abs(mn+360-dn),Math.abs(mn-360-dn)))},gt.prototype._arrowKeyTree=function(){var dn=this.diagram,mn=dn.selection.first();if(mn instanceof go.Node){var un=dn.lastInput;if(un.key==="Right"){if(!mn.isTreeLeaf)if(!mn.isTreeExpanded)dn.commandHandler.canExpandTree(mn)&&dn.commandHandler.expandTree(mn);else{var Ut=this._sortTreeChildrenByY(mn).first();Ut!==null&&dn.select(Ut)}}else if(un.key==="Left")if(!mn.isTreeLeaf&&mn.isTreeExpanded)dn.commandHandler.canCollapseTree(mn)&&dn.commandHandler.collapseTree(mn);else{var xn=mn.findTreeParentNode();xn!==null&&dn.select(xn)}else if(un.key==="Up"){var xn=mn.findTreeParentNode();if(xn!==null){var jn=this._sortTreeChildrenByY(xn),en=jn.indexOf(mn);if(en>0){for(var Gt=jn.elt(en-1);Gt!==null&&Gt.isTreeExpanded&&!Gt.isTreeLeaf;){var Cn=this._sortTreeChildrenByY(Gt);Gt=Cn.last()}Gt!==null&&dn.select(Gt)}else dn.select(xn)}}else if(un.key==="Down")if(mn.isTreeExpanded&&!mn.isTreeLeaf){var Ut=this._sortTreeChildrenByY(mn).first();Ut!==null&&dn.select(Ut)}else for(;mn!==null;){var xn=mn.findTreeParentNode();if(xn===null)break;var jn=this._sortTreeChildrenByY(xn),en=jn.indexOf(mn);if(en<jn.length-1){dn.select(jn.elt(en+1));break}else mn=xn}var Gn=dn.selection.first();Gn!==null&&dn.scrollToRect(Gn.actualBounds)}},gt.prototype._sortTreeChildrenByY=function(dn){var mn=new go.List().addAll(dn.findTreeChildrenNodes());return mn.sort(function(un,Ut){var xn=un.location,jn=Ut.location;return xn.y<jn.y?-1:xn.y>jn.y?1:xn.x<jn.x?-1:xn.x>jn.x?1:0}),mn},gt.prototype.copyToClipboard=function(dn){go.CommandHandler.prototype.copyToClipboard.call(this,dn),this._lastPasteOffset.set(this.pasteOffset)},gt.prototype.pasteFromClipboard=function(){var dn=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(dn,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),dn},Object.defineProperty(gt.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(dn){if(dn!=="move"&&dn!=="select"&&dn!=="scroll"&&dn!=="tree"&&dn!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+dn);this._arrowKeyBehavior=dn}}),Object.defineProperty(gt.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(dn){if(!(dn instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+dn);this._pasteOffset.set(dn)}});var tt=gt,bt=$e(37404),Ke=$e(43604),ut=$e(70635),wt={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},yt=$e(59301),lt=(dn,mn,un)=>new Promise((Ut,xn)=>{var jn=Cn=>{try{Gt(un.next(Cn))}catch(Gn){xn(Gn)}},en=Cn=>{try{Gt(un.throw(Cn))}catch(Gn){xn(Gn)}},Gt=Cn=>Cn.done?Ut(Cn.value):Promise.resolve(Cn.value).then(jn,en);Gt((un=un.apply(dn,mn)).next())});function Qe({onCancel:dn,callback:mn}){let un=(0,rt.useRef)(),Ut=(0,rt.useRef)(),xn=(0,rt.useRef)(),jn=(0,rt.useRef)(!1);const en=(0,rt.useRef)(!1),[Gt,Cn]=(0,rt.useState)(0);function Gn(){const Pn=Ct.bx.make,Yt={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"};un.current=new Ct.S0(Ut.current,{padding:20,grid:Pn(Ct.s_,"Grid",Pn(Ct.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Pn(Ct.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:tn=>{var lr=tn.diagram.commandHandler.addTopLevelParts(tn.diagram.selection,!0);lr||tn.diagram.currentTool.doCancel()},commandHandler:Pn(tt),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:tn=>{var lr=tn.subject;lr.location=lr.location.copy().snapToGridPoint(tn.diagram.grid.gridOrigin,tn.diagram.grid.gridCellSize),setTimeout(()=>{tn.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:tn=>{var lr=tn.subject;setTimeout(()=>{tn.diagram.commandHandler.editTextBlock()})},LinkRelinked:tn=>{var lr=tn.parameter.part;lr.invalidateConnectedLinks();var br=tn.subject;tn.diagram.toolManager.linkingTool.isForwards?br.toNode.invalidateConnectedLinks():br.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),un.current.nodeTemplate=Pn(Ct.NB,"Auto",{locationSpot:Ct.z6.Center,locationObjectName:"SHAPE",desiredSize:new Ct.$u(120,60),minSize:new Ct.$u(40,40),resizable:!0,resizeCellSize:new Ct.$u(10,10),rotatable:!0},new Ct.KX("location","loc",Ct.E9.parse).makeTwoWay(Ct.E9.stringify),new Ct.KX("desiredSize","size",Ct.$u.parse).makeTwoWay(Ct.$u.stringify),Pn(Ct.bn,{name:"SHAPE",fill:Yt.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Ct.z6.AllSides,toSpot:Ct.z6.AllSides},new Ct.KX("figure"),new Ct.KX("fill"),new Ct.KX("stroke","borderColor"),new Ct.KX("strokeWidth","thickness"),new Ct.KX("strokeDashArray","dash")),Pn(Ct.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),Pn(Ct.al,{margin:1,textAlign:"center",overflow:Ct.al.OverflowEllipsis,editable:!0},new Ct.KX("text").makeTwoWay(),new Ct.KX("stroke","color"))),un.current.nodeTemplate.toolTip=Pn("ToolTip",Pn(Ct.s_,"Vertical",{maxSize:new Ct.$u(200,NaN)},Pn(Ct.al,{font:"bold 10pt sans-serif",textAlign:"center"},new Ct.KX("text")),Pn(Ct.al,{font:"10pt sans-serif",textAlign:"center"},new Ct.KX("text","details"))));function zn(tn,lr){var br=(ar,Qr)=>{ar.handled=!0,ar.diagram.model.commit(Xr=>{var hi=Qr.part.adornedPart,Gr=new Ct.E9().setRectSpot(hi.actualBounds,tn);Gr.subtract(hi.location),Gr.scale(2,2),Gr.x+=Math.sign(Gr.x)*130,Gr.y+=Math.sign(Gr.y)*130,Gr.add(hi.location),Gr.snapToGridPoint(ar.diagram.grid.gridOrigin,ar.diagram.grid.gridCellSize);var Tr=Xr.copyNodeData(hi.data);Xr.setGroupKeyForNodeData(Tr,Xr.getGroupKeyForNodeData(hi.data)),Xr.addNodeData(Tr);var Si={from:hi.key,to:Xr.getKeyForNodeData(Tr)};Xr.addLinkData(Si);var Ln=ar.diagram.findNodeForData(Tr);Ln.location=Gr,ar.diagram.select(Ln),setTimeout(()=>{ar.diagram.commandHandler.editTextBlock()},20)})};return Pn(Ct.bn,{figure:lr,alignment:tn,alignmentFocus:tn.opposite(),width:tn.equals(Ct.z6.Top)||tn.equals(Ct.z6.Bottom)?25:18,height:tn.equals(Ct.z6.Top)||tn.equals(Ct.z6.Bottom)?18:25,fill:"orange",stroke:Yt.white,strokeWidth:4,mouseEnter:(ar,Qr)=>Qr.fill="dodgerblue",mouseLeave:(ar,Qr)=>Qr.fill="orange",isActionable:!0,click:br,contextClick:br})}function Qn(tn){return Pn(Ct.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:(lr,br)=>br.fill="dodgerblue",mouseLeave:(lr,br)=>br.fill="orange",click:(lr,br)=>{lr.diagram.commandHandler.showContextMenu(br.part.adornedPart)}},tn||{})}un.current.nodeTemplate.selectionAdornmentTemplate=Pn(Ct.uz,"Spot",Pn(Ct.Vm,{padding:10}),zn(Ct.z6.Top,"TriangleUp"),zn(Ct.z6.Left,"TriangleLeft"),zn(Ct.z6.Right,"TriangleRight"),zn(Ct.z6.Bottom,"TriangleDown"),Qn({alignment:new Ct.z6(.75,0)}));function or(tn,lr){return(br,ar)=>{br.handled=!0,br.diagram.model.commit(Qr=>{Qr.set(ar.part.adornedPart.data,tn,lr)})}}function rn(tn,lr){return lr||(lr="color"),Pn(Ct.bn,{width:16,height:16,stroke:"lightgray",fill:tn,margin:1,background:"transparent",mouseEnter:(br,ar)=>ar.stroke="dodgerblue",mouseLeave:(br,ar)=>ar.stroke="lightgray",click:or(lr,tn),contextClick:or(lr,tn)})}function Mn(){return[Pn("ContextMenuButton",Pn(Ct.s_,"Horizontal",rn(Yt.white,"fill"),rn(Yt.beige,"fill"),rn(Yt.extralightblue,"fill"),rn(Yt.extralightred,"fill"))),Pn("ContextMenuButton",Pn(Ct.s_,"Horizontal",rn(Yt.lightgray,"fill"),rn(Yt.lightgreen,"fill"),rn(Yt.lightblue,"fill"),rn(Yt.lightred,"fill")))]}function an(){return[Pn("ContextMenuButton",Pn(Ct.s_,"Horizontal",rn(Yt.black),rn(Yt.green),rn(Yt.blue),rn(Yt.red))),Pn("ContextMenuButton",Pn(Ct.s_,"Horizontal",rn(Yt.white),rn(Yt.magenta),rn(Yt.purple),rn(Yt.orange)))]}function gn(tn,lr){return lr||(lr="thickness"),Pn(Ct.bn,"LineH",{width:16,height:16,strokeWidth:tn,margin:1,background:"transparent",mouseEnter:(br,ar)=>ar.background="dodgerblue",mouseLeave:(br,ar)=>ar.background="transparent",click:or(lr,tn),contextClick:or(lr,tn)})}function En(tn,lr){return lr||(lr="dash"),Pn(Ct.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:tn,margin:1,background:"transparent",mouseEnter:(br,ar)=>ar.background="dodgerblue",mouseLeave:(br,ar)=>ar.background="transparent",click:or(lr,tn),contextClick:or(lr,tn)})}function pn(){return[Pn("ContextMenuButton",Pn(Ct.s_,"Horizontal",gn(1),gn(2),gn(3),gn(4))),Pn("ContextMenuButton",Pn(Ct.s_,"Horizontal",En(null),En([2,4]),En([4,4])))]}function On(tn,lr){return lr||(lr="figure"),Pn(Ct.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:tn,margin:1,background:"transparent",mouseEnter:(br,ar)=>ar.fill="dodgerblue",mouseLeave:(br,ar)=>ar.fill="lightgray",click:or(lr,tn),contextClick:or(lr,tn)})}un.current.nodeTemplate.contextMenu=Pn("ContextMenu",Pn("ContextMenuButton",Pn(Ct.s_,"Horizontal",On("Rectangle"),On("RoundedRectangle"),On("Ellipse"),On("Diamond"))),Pn("ContextMenuButton",Pn(Ct.s_,"Horizontal",On("Parallelogram2"),On("ManualOperation"),On("Procedure"),On("Cylinder1"))),Pn("ContextMenuButton",Pn(Ct.s_,"Horizontal",On("Terminator"),On("CreateRequest"),On("Document"),On("TriangleDown"))),Mn(),an(),pn()),un.current.groupTemplate=Pn(Ct.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:Ct.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(tn,lr)=>{var br=lr.addMembers(lr.diagram.selection,!0);br||lr.diagram.currentTool.doCancel()},avoidable:!1},new Ct.KX("location","loc",Ct.E9.parse).makeTwoWay(Ct.E9.stringify),Pn(Ct.s_,"Auto",{name:"BODY"},Pn(Ct.bn,{parameter1:10,fill:Yt.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Ct.z6.AllSides,toSpot:Ct.z6.AllSides},new Ct.KX("fill"),new Ct.KX("stroke","color"),new Ct.KX("strokeWidth","thickness"),new Ct.KX("strokeDashArray","dash")),Pn(Ct.Vm,{background:"transparent",margin:20})),Pn(Ct.al,{alignment:Ct.z6.Top,alignmentFocus:Ct.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new Ct.KX("text"),new Ct.KX("stroke","color"))),un.current.groupTemplate.selectionAdornmentTemplate=Pn(Ct.uz,"Spot",Pn(Ct.s_,"Auto",Pn(Ct.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),Pn(Ct.Vm,{margin:1.5})),Qn({alignment:Ct.z6.TopRight,alignmentFocus:Ct.z6.BottomRight})),un.current.groupTemplate.contextMenu=Pn("ContextMenu",Mn(),an(),pn()),un.current.linkTemplate=Pn(Ct.rU,{layerName:"Foreground",routing:Ct.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new Ct.KX("fromSpot","fromSpot",Ct.z6.parse),new Ct.KX("toSpot","toSpot",Ct.z6.parse),new Ct.KX("fromShortLength","dir",tn=>tn>=1?10:0),new Ct.KX("toShortLength","dir",tn=>tn>=1?10:0),new Ct.KX("points").makeTwoWay(),Pn(Ct.bn,{strokeWidth:2},new Ct.KX("stroke","color"),new Ct.KX("strokeWidth","thickness"),new Ct.KX("strokeDashArray","dash")),Pn(Ct.bn,{segmentIndex:0,segmentOffset:new Ct.E9(15,0),segmentOrientation:Ct.rU.OrientAlong,alignmentFocus:Ct.z6.Right,figure:"circle",width:10,strokeWidth:0},new Ct.KX("fill","color"),new Ct.KX("visible","dir",tn=>tn===1)),Pn(Ct.bn,{segmentIndex:-1,segmentOffset:new Ct.E9(-10,6),segmentOrientation:Ct.rU.OrientPlus90,alignmentFocus:Ct.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Ct.KX("fill","color"),new Ct.KX("visible","dir",tn=>tn>=1),new Ct.KX("width","thickness",tn=>7+3*tn),new Ct.KX("height","thickness",tn=>7+3*tn),new Ct.KX("segmentOffset","thickness",tn=>new Ct.E9(-15,4+1.5*tn))),Pn(Ct.bn,{segmentIndex:0,segmentOffset:new Ct.E9(15,-6),segmentOrientation:Ct.rU.OrientMinus90,alignmentFocus:Ct.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Ct.KX("fill","color"),new Ct.KX("visible","dir",tn=>tn===2),new Ct.KX("width","thickness",tn=>7+3*tn),new Ct.KX("height","thickness",tn=>7+3*tn),new Ct.KX("segmentOffset","thickness",tn=>new Ct.E9(-15,4+1.5*tn))),Pn(Ct.al,{alignmentFocus:new Ct.z6(0,1,-4,0),editable:!0},new Ct.KX("text").makeTwoWay(),new Ct.KX("stroke","color"))),un.current.linkTemplate.selectionAdornmentTemplate=Pn(Ct.uz,Pn(Ct.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Dn(2)},new Ct.KX("pathPattern","thickness",Dn)),Qn({alignmentFocus:new Ct.z6(0,0,-6,-4)}));function Dn(tn){return Pn(Ct.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(tn+4).toString()+" H3"})}function $n(tn){var lr="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return tn===0?lr="M0 0 M16 16 M0 8 L16 8":tn===2&&(lr="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),Pn(Ct.bn,{geometryString:lr,margin:2,background:"transparent",mouseEnter:(br,ar)=>ar.background="dodgerblue",mouseLeave:(br,ar)=>ar.background="transparent",click:or("dir",tn),contextClick:or("dir",tn)})}function Fn(tn){var lr=(br,ar)=>{br.handled=!0,br.diagram.model.commit(Qr=>{var Xr=ar.part.adornedPart;Qr.set(Xr.data,tn?"toSpot":"fromSpot",Ct.z6.stringify(Ct.z6.AllSides)),(tn?Xr.toNode:Xr.fromNode).invalidateConnectedLinks()})};return Pn(Ct.bn,{width:12,height:12,fill:"transparent",mouseEnter:(br,ar)=>ar.background="dodgerblue",mouseLeave:(br,ar)=>ar.background="transparent",click:lr,contextClick:lr})}function Tn(tn,lr){var br=0,ar=Ct.z6.RightSide;tn.equals(Ct.z6.Top)?(br=270,ar=Ct.z6.TopSide):tn.equals(Ct.z6.Left)?(br=180,ar=Ct.z6.LeftSide):tn.equals(Ct.z6.Bottom)&&(br=90,ar=Ct.z6.BottomSide),lr||(br-=180);var Qr=(Xr,hi)=>{Xr.handled=!0,Xr.diagram.model.commit(Gr=>{var Tr=hi.part.adornedPart;Gr.set(Tr.data,lr?"toSpot":"fromSpot",Ct.z6.stringify(ar)),(lr?Tr.toNode:Tr.fromNode).invalidateConnectedLinks()})};return Pn(Ct.bn,{alignment:tn,alignmentFocus:tn.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:br,background:"transparent",mouseEnter:(Xr,hi)=>hi.background="dodgerblue",mouseLeave:(Xr,hi)=>hi.background="transparent",click:Qr,contextClick:Qr})}un.current.linkTemplate.contextMenu=Pn("ContextMenu",an(),pn(),Pn("ContextMenuButton",Pn(Ct.s_,"Horizontal",$n(0),$n(1),$n(2))),Pn("ContextMenuButton",Pn(Ct.s_,"Horizontal",Pn(Ct.s_,"Spot",Fn(!1),Tn(Ct.z6.Top,!1),Tn(Ct.z6.Left,!1),Tn(Ct.z6.Right,!1),Tn(Ct.z6.Bottom,!1)),Pn(Ct.s_,"Spot",{margin:new Ct.Zt(0,0,0,2)},Fn(!0),Tn(Ct.z6.Top,!0),Tn(Ct.z6.Left,!0),Tn(Ct.z6.Right,!0),Tn(Ct.z6.Bottom,!0)))));const Yn=`{ "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 Lr=["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 qr(tn){return console.log("shapeName:",tn),Lr.indexOf(tn)>=0}var Br=new Ct.YI(xn.current,{maxSelectionCount:1,linkTemplate:Pn(Ct.rU,{locationSpot:Ct.z6.Center,selectionAdornmentTemplate:Pn(Ct.uz,"Link",{locationSpot:Ct.z6.Center},Pn(Ct.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),Pn(Ct.bn,{toArrow:"Standard",stroke:null}))},{routing:Ct.rU.AvoidsNodes,curve:Ct.rU.JumpOver,corner:5,toShortLength:4},new Ct.KX("points"),Pn(Ct.bn,{isPanelMain:!0,strokeWidth:2}),Pn(Ct.bn,{toArrow:"Standard",stroke:null})),model:new Ct.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...Ct.bn.getFigureGenerators().toArray().map(tn=>({text:"\u672A\u547D\u540D",size:"100 100",figure:tn.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return un.current.addDiagramListener("TextEdited",function(tn){var lr;const br=tn.subject.part;var ar=(lr=document.activeElement)==null?void 0:lr.value;typeof ar=="string"&&ar.trim()===""&&un.current.model.commit(function(Qr){Qr.set(br.data,"text","\u672A\u547D\u540D"),un.current.commandHandler.stopCommand()},"increment")}),Br.nodeTemplate=Pn(Ct.NB,"Auto",{locationSpot:Ct.z6.Center},new Ct.KX("location","location",Ct.E9.parse).makeTwoWay(Ct.E9.stringify),Pn(Ct.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 Ct.KX("stroke").makeTwoWay(),new Ct.KX("fill").makeTwoWay(),new Ct.KX("figure")),Pn(Ct.al,{margin:new Ct.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new Ct.$u(16,16),maxSize:new Ct.$u(10,NaN),textAlign:"center",editable:!0},new Ct.KX("key").makeTwoWay())),setTimeout(()=>{un.current.grid=Pn(Ct.s_,"Grid",Pn(Ct.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Pn(Ct.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),un.current.grid.visible=!0,un.current.grid.gridCellStroke="darkgray",un.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=un.current,un.current}const ir=()=>lt(this,null,function*(){var Pn=un.current.makeImage();const Yt=yield(0,ut.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:Pn.src}});mn({src:Yt.url})});return(0,rt.useEffect)(()=>(setTimeout(()=>{Gn()},500),Cn(Gt+1),()=>{un.current=null}),[]),yt.createElement("div",{ref:en,className:jn.current?`${wt.maxH60} body-overflow-initial`:"body-overflow-initial"},yt.createElement(pt.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!Gt,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:yt.createElement(vt.Z,null,yt.createElement(Ke.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),yt.createElement(Ke.Z,{onClick:()=>{var Pn,Yt,zn=un.current.selection.first();if(jn.current=!jn.current,document.activeElement&&zn){let Qn=(Yt=(Pn=document.activeElement)==null?void 0:Pn.value)==null?void 0:Yt.trim();typeof Qn=="string"&&un.current.model.commit(function(or){or.set(zn.data,"text",Qn||"\u672A\u547D\u540D"),un.current.commandHandler.stopCommand()},"increment")}Cn(Gt+1)}},yt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:dn},yt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:wt.flowChartWrp},yt.createElement("div",{style:{display:"flex",height:"100%"}},yt.createElement("div",{style:{width:"300px",height:"100%"}},yt.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),yt.createElement("div",{style:{height:"calc(100% - 50px)"},className:wt.myPaletteDiv,ref:xn})),yt.createElement("div",{style:{flex:1,position:"relative"}},yt.createElement("div",{ref:Ut,style:{height:"80vh"}}))),yt.createElement("div",{className:"tr"},yt.createElement(_e.ZP,{size:"large",onClick:ir,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var We=Qe,Ue=$e(5112),qe=$e(88897);const He=Ue.ZP.Group,De={margin:"0 8px"};var Le=({callback:dn,onCancel:mn})=>{function un(Ut){dn(Ut)}return rt.createElement(Oe.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:un},rt.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},rt.createElement("span",{style:De},"\u5355\u5143\u683C\u6570\uFF1A"),rt.createElement("span",{style:De},"\u884C\u6570"),rt.createElement(Oe.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},rt.createElement(qe.Z,null)),rt.createElement("span",{style:De},"\u5217\u6570"),rt.createElement(Oe.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},rt.createElement(qe.Z,null))),rt.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},rt.createElement("span",{style:De},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),rt.createElement(Oe.default.Item,{name:"align"},rt.createElement(He,null,rt.createElement(Ue.ZP,{value:"default"},rt.createElement("i",{className:"fa fa-align-justify"})),rt.createElement(Ue.ZP,{value:"left"},rt.createElement("i",{className:"fa fa-align-left"})),rt.createElement(Ue.ZP,{value:"center"},rt.createElement("i",{className:"fa fa-align-center"})),rt.createElement(Ue.ZP,{value:"right"},rt.createElement("i",{className:"fa fa-align-right"}))))),rt.createElement("div",{className:"flex-container flex-end"},rt.createElement(_e.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),rt.createElement(_e.ZP,{type:"ghost",onClick:mn},"\u53D6\u6D88")))},Ve=$e(78673),dt=$e(98598),Ze=$e.n(dt),_t=(0,rt.forwardRef)(({use3d:dn,width:mn,height:un,callback:Ut,showSaveButton:xn},jn)=>{const en=(0,rt.useRef)(),Gt=(0,rt.useRef)(),[Cn,Gn]=(0,rt.useState)(!1),ir=(0,rt.useRef)({id:en,appName:"graphing",width:mn||1e3,height:un||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,rt.useEffect)(()=>{Gt.current=new(Ze())(ir.current,!0),window.onload=function(){Gt.current.inject("applet_container")}},[]);const Pn=()=>{var Yt=window.ggbApplet.getPNGBase64(1,!0,72);return Ut&&Ut(Yt),Yt};return(0,rt.useEffect)(()=>{ir.current.appName=Cn?"3D":"graphing",Gt.current.inject("applet_container")},[Cn]),(0,rt.useEffect)(()=>{Gn(dn)},[dn]),(0,rt.useImperativeHandle)(jn,()=>({getImgData:Pn})),rt.createElement(rt.Fragment,null,rt.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:en}),rt.createElement(vt.Z,{align:"middle"},rt.createElement(Ke.Z,{flex:1},rt.createElement(Ve.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Cn,onChange:Yt=>Gn(Yt)})),rt.createElement(Ke.Z,null,rt.createElement(_e.ZP,{size:"large",onClick:Pn,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Qt=$e(75890),kt=$e(8591);const Nt="link",Zt="upload-image",on="add-flowchart",vn="draw-image",kn="add-flowchart",Kn="code-block",Xn="add-table",pr="------------",dr={default:pr,left:`:${pr}`,center:`:${pr}:`,right:`${pr}:`};var vr=$e(91300);function Sr(){}let Fr=0;const li=1e4,Er="\u2581",xi="@\u2581\u2581@",Cr="@\u2581@",ot=`
**\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`,di=["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 Yr(dn){return/^\d+$/.test(dn)?`${dn}px`:dn}const hr=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Ir={[hr+"-B"]:"bold",[hr+"-I"]:"italic"},Rr={[Nt]:"\u6DFB\u52A0\u94FE\u63A5",[Kn]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Zt]:"\u6DFB\u52A0\u56FE\u7247",[vn]:"\u6DFB\u52A0\u753B\u56FE",[on]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Xn]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var yi=({defaultValue:dn="",onChange:mn,width:un="100%",height:Ut=400,miniToolbar:xn=!1,isFocus:jn=!1,watch:en,insertTemp:Gt,mode:Cn="markdown",id:Gn="markdown-editor-id",showResizeBar:ir=!1,noStorage:Pn=!1,showNullButton:Yt=!1,showNullProgramButton:zn=!1,hidetoolBar:Qn=!1,fullScreen:or=!1,onBlur:rn,onCMBeforeChange:Mn,onFullScreen:an,className:gn="",disablePaste:En=!1,disabled:pn=!1,disabledFill:On=!1,placeholder:Dn="",values:$n="",extraUse:Fn})=>{const[Tn,Yn]=(0,rt.useState)(null),[Lr,qr]=(0,rt.useState)(dn),[Br,tn]=(0,rt.useState)(en),[lr,br]=(0,rt.useState)(or),[ar,Qr]=(0,rt.useState)(""),[Xr,hi]=(0,rt.useState)(0),[Gr,Tr]=(0,rt.useState)(Ut),[Si,Ln]=(0,rt.useState)(!1),[Ki,Nn]=(0,rt.useState)(0),[gi,xo]=(0,rt.useState)(0),Mi=(0,rt.useRef)(),Go=(0,rt.useRef)(),po=(0,rt.useRef)(),Wr=(0,rt.useRef)();(0,rt.useEffect)(()=>{const Ar=window.scrollY||window.pageYOffset;qr($n),Tn==null||Tn.setValue($n),window.scrollTo(0,Ar)},[$n]),(0,rt.useEffect)(()=>{an==null||an(lr)},[lr]),(0,rt.useEffect)(()=>{if(Mi.current){let Ar=function(zr,Zn){var to;if(En){Zn.preventDefault();return}const yo=Zn.clipboardData;if(yo){const ta=yo.types.toString(),wo=yo.items;if(ta==="Files"||yo.types.indexOf("Files")>-1){if(Zn.preventDefault(),Cn=="stex")return;try{let Zo=wo[1];((to=wo[0])==null?void 0:to.kind)==="file"&&(Zo=wo[0]);const ua=Zo.getAsFile(),Pa=ua.name.split(".").pop();(0,mt.I)(ua,Da=>{var Ss,es,wn;Da.id?((Ss=ua==null?void 0:ua.type)==null?void 0:Ss.indexOf("image"))>-1?Dr.replaceSelection(`![,](/api/attachments/${Da.id}?type=${Da.content_type})`):((es=ua==null?void 0:ua.type)==null?void 0:es.indexOf("video"))>-1?Dr.replaceSelection(`<video width="100%" controls src="/api/attachments/${Da.id}"></video>`):((wn=ua==null?void 0:ua.type)==null?void 0:wn.indexOf("pdf"))>-1?Dr.replaceSelection(`<a href="/api/attachments/${Da.id}?type=${ua.type}&disposition=inline" target="_blank">${ua.name}</a>`):di.includes(Pa)?Dr.replaceSelection(`<a href="/api/attachments/${Da.id}?type=office&disposition=inline" target="_blank">${ua.name}</a>`):Dr.replaceSelection(`[${ua.name}](/api/attachments/${Da.id}?type=${Da.content_type})`):(Da==null?void 0:Da.status)===401&&(document.location.href="/user/login")})}catch(Zo){kt.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Dr=ie().fromTextArea(Mi.current,{mode:Cn,lineNumbers:!xn,lineWrapping:!0,value:dn,autoCloseTags:!0,autoCloseBrackets:!0});return Dr.on("keyup",function(zr,Zn){Zn.keyCode===8&&(zr.getValue()==""?Dr.setOption("placeholder",Dn):Dr.setOption("placeholder",null))}),Dr.on("keydown",function(zr,Zn){if(Zn.keyCode===8){var to=Li(zr);to&&Zn.preventDefault()}}),jn&&Dr.focus(),Dr.on("paste",Ar),pn&&Dr.on("beforeChange",function(zr,Zn){(Zn.origin==="paste"||Zn.origin==="+input")&&Zn.cancel()}),Yn(Dr),()=>{Dr.off("paste",Ar)}}},[]);const Hr=(0,rt.useCallback)(()=>{if(Go.current)try{}catch(Ar){console.log(Ar,"---- to set md editor body height")}},[Gr,Go,lr]);(0,rt.useEffect)(()=>{function Ar(){let Dr=new Re.Z(zr=>{for(let Zn of zr)(Zn.target.offsetHeight>0||Zn.target.offsetWidth>0)&&(Hr(),Tn.setSize("100%","100%"),Tn.refresh())});return Dr.observe(Mi.current.parentElement),Dr}if(Tn){const Dr=Ar();return()=>{var zr,Zn;(zr=Mi.current)!=null&&zr.parentElement&&Dr.unobserve((Zn=Mi.current)==null?void 0:Zn.parentElement)}}},[Tn,Hr]),(0,rt.useEffect)(()=>{if(Tn){let Ar=[];for(const[Dr,zr]of Object.entries(Ir)){let Zn={[Dr]:()=>{_i(zr)}};Ar.push(Zn),Tn.addKeyMap(Zn)}return()=>{for(let Dr of Ar)Tn.removeKeyMap(Dr)}}},[Tn]),(0,rt.useEffect)(()=>{or!==lr&&br(or)},[or]),(0,vr.Z)(()=>{if(!Pn&&Xr>0){let Ar=new Date().getTime(),Dr=window.sessionStorage.getItem(Gn);Ar>=Xr+li&&(!Dr||Dr!==Lr)&&(window.sessionStorage.setItem(Gn,Lr),Ln(!0))}},li),(0,rt.useEffect)(()=>{tn(en)},[Tn,en]),(0,rt.useEffect)(()=>{Tn&&jn&&Tn.focus()},[Tn,jn]),(0,rt.useEffect)(()=>{if(Br&&Tn){let Ar=function(zr){let Zn=zr.target;if(Wr.current){let to=Zn.scrollTop/Zn.scrollHeight;Wr.current.scrollTop=Wr.current.scrollHeight*to}};const Dr=Tn.getScrollerElement();return Dr.addEventListener("scroll",Ar),()=>{Dr.removeEventListener("scroll",Ar)}}},[Tn,Br]),(0,rt.useEffect)(()=>{if(Tn&&Mn){let Ar=function(Dr,zr){Mn(Dr,zr)};return Tn.on("beforeChange",Ar),()=>{Tn.off("beforeChange",Ar)}}},[Tn,Mn]),(0,rt.useEffect)(()=>{if(Tn&&rn){let Ar=function(){rn(Tn.getValue())};return Tn.on("blur",Ar),()=>{Tn.off("blur",Ar)}}},[Tn,rn]);function Li(Ar,Dr){var zr=Ar.getDoc(),Zn=zr.getCursor(),to=zr.getLine(Zn.line),yo=to.charAt(Zn.ch-1),ta=to.lastIndexOf("@\u2581@",Zn.ch),wo=to.lastIndexOf("@\u2581\u2581@",Zn.ch),Zo=ta>wo?ta:wo,ua=ta>wo?3:4;if(xi.indexOf(yo)===-1)return null;if(console.log("change1:",Dr,Ar,to,Zn,Zo,ta,wo,yo),Zo>=0&&Zn.ch-Zo<5){var Pa=Zo+ua;return zr.replaceRange("",{line:Zn.line,ch:Zo},{line:Zn.line,ch:Pa}),{line:Zn.line,ch:Pa}}return null}(0,rt.useEffect)(()=>{if(Tn){let Ar=function(Dr,zr){const Zn=Dr.getValue();qr(Zn),hi(new Date().getTime()),Dr.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),mn&&(zn?mn(Zn,jr(Zn)):mn(Zn))};return Tn.on("change",Ar),()=>{Tn.off("change",Ar)}}},[Tn,mn]),(0,rt.useEffect)(()=>{if(Tn)if(dn==null)Tn.setValue(""),qr("");else{const Ar=window.scrollY||window.pageYOffset;dn!==Tn.getValue()&&(Tn.setValue(dn),qr(dn),Tn.setCursor(pn?1:Tn.lineCount(),0),window.scrollTo(0,Ar))}},[Tn,dn]);const _i=(0,rt.useCallback)(Ar=>{const Dr=Tn.getCursor(),zr=Tn.getSelection();let Zn=zr.split(`
`);switch(Ar){case"bold":return Tn.replaceSelection("**"+zr+"**"),zr===""&&Tn.setCursor(Dr.line,Dr.ch+2),Tn.focus();case"italic":return Tn.replaceSelection("*"+zr+"*"),zr===""&&Tn.setCursor(Dr.line,Dr.ch+1),Tn.focus();case"code":return Tn.replaceSelection("`"+zr+"`"),zr===""&&Tn.setCursor(Dr.line,Dr.ch+1),Tn.focus();case"inline-latex":return Qr("inline-latex"),Tn.focus();case"latex":return Tn.replaceSelection("```latex\n"+zr+"\n```"),Tn.setCursor(Dr.line+1,zr.length+1),Tn.focus();case"line-break":return Tn.replaceSelection(`<br/>
`),Tn.focus();case"list-ul":return zr===""?Tn.replaceSelection("- "+zr):Tn.replaceSelection(Zn.map(to=>to===""?"":`- ${to}`).join(`
`)),Tn.focus();case"list-ol":return zr===""?Tn.replaceSelection("1. "+zr):Tn.replaceSelection(Zn.map((to,yo)=>to===""?"":`${yo+1}. ${to}`).join(`
`)),Tn.focus();case"add-null-ch":return zr===""&&Tn.setCursor(Dr.line,Dr.ch),Tn.replaceSelection(Er),Tn.focus();case"add-signal":return zr===""&&Tn.setCursor(Dr.line,Dr.ch),Tn.replaceSelection(Cr),Tn.focus();case"add-multiple":return zr===""&&Tn.setCursor(Dr.line,Dr.ch),Tn.replaceSelection(xi),Tn.focus();case"inster-template-1":return zr===""&&Tn.setCursor(Dr.line,Dr.ch),Tn.replaceSelection(ot),Tn.focus();case"eraser":return Tn.setValue(""),Tn.focus();case"trigger-watch":return tn(!Br),Tn.focus();case"trigger-full-screen":return br(!lr),Tn.focus();case Nt:Qr(Nt);return;case Kn:Qr(Kn);return;case Zt:Qr(Zt);return;case vn:Qr(vn);return;case"maths-latex":Qr("maths-latex");return;case on:Qr(on);return;case Xn:Qr(Xn);return;default:throw new Error}},[Tn,Br,lr]),ur=(0,rt.useCallback)((Ar,Dr)=>{var zr,Zn,to,yo,ta,wo;switch(Qr(""),ar){case Nt:const{title:Ss,link:es}=Ar;return Tn.replaceSelection(`[${Ss}](${es})`),Tn.focus();case Kn:const{language:wn,content:Fa}=Ar;return Tn.replaceSelection(["```"+wn,Fa,"```"].join(`
`)),Tn.focus();case"maths-latex":for(var Zo=atob(Ar),ua=new Uint8Array(Zo.length),Pa=0;Pa<Zo.length;Pa++)ua[Pa]=Zo.charCodeAt(Pa);var Da=new Blob([ua],{type:"image/png"});(0,mt.I)(Da,Wa=>{Wa.id?Tn.replaceSelection(`![,](/api/attachments/${Wa.id}?type=${Wa.content_type})`):(Wa==null?void 0:Wa.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":Tn.replaceSelection("`$$"+Ar+"$$`");break;case Zt:case vn:case kn:const{src:_s,alt:Il}=Ar,Ji=Dr,jo=(to=(Zn=(zr=Ji==null?void 0:Ji.name)==null?void 0:zr.split("."))==null?void 0:Zn.pop)==null?void 0:to.call(Zn);return((yo=Ji==null?void 0:Ji.type)==null?void 0:yo.indexOf("image"))>-1||!(Ji!=null&&Ji.type)?Il?Tn.replaceSelection(`![ ${Il} ]( ${_s} "${Il}" )`):Tn.replaceSelection(`![,](${_s})`):((ta=Ji==null?void 0:Ji.type)==null?void 0:ta.indexOf("video"))>-1?Tn.replaceSelection(`<video width="100%" controls src="${_s}"></video>`):((wo=Ji==null?void 0:Ji.type)==null?void 0:wo.indexOf("pdf"))>-1?Tn.replaceSelection(`<a href="${_s}?type=${Ji.type}&disposition=inline" target="_blank">${Ji.name}</a>`):di.includes(jo)?Tn.replaceSelection(`<a href="${_s}?type=office&disposition=inline" target="_blank">${Ji.name}</a>`):Tn.replaceSelection(`[${Ji.name}](${_s})`),Tn.focus();case Xn:const{row:ga,col:Oo,align:no}=Ar;let Mo=`
`;for(let Wa=0;Wa<ga;Wa++){let ki=[],ao=[];for(let io=0;io<Oo;io++)Wa===1&&ao.push(dr[no]),ki.push(" ");Wa===1&&(Mo+=`| ${ao.join(" | ")} |
`),Mo+=`| ${ki.join(Oo===1?"":" | ")} |
`}return Tn.replaceSelection(Mo+`
`),Tn.focus();default:throw new Error}},[Tn,ar]),It=(0,rt.useMemo)(()=>{switch(ar){case Nt:return rt.createElement(Et,{callback:ur,onCancel:Ei});case Kn:return rt.createElement(Mt.Z,{callback:ur,onCancel:Ei});case Zt:return rt.createElement(mt.Z,{callback:ur,onCancel:Ei});case on:return rt.createElement(We,{callback:ur,onCancel:Ei});case Xn:return rt.createElement(Le,{callback:ur,onCancel:Ei});case"maths-latex":return rt.createElement(_t,{showSaveButton:!0,callback:ur});case"inline-latex":return rt.createElement(Qt.Z,{showSaveButton:!0,callback:ur});default:return null}},[ar]);function Ei(){Qr("")}(0,rt.useEffect)(()=>{if(po.current){let Ar=function(ta){to=!0,yo=ta.pageY},Dr=function(){to=!1},zr=function(ta){if(to){let wo=ta.pageY-yo;wo<0&&(wo=0),wo>300&&(wo=300);let Zo=Ut+wo+"px";Tr(Zo)}},Zn=po.current,to=!1,yo=0;return Zn.addEventListener("mousedown",Ar),document.addEventListener("mousemove",zr),document.addEventListener("mouseup",Dr),()=>{Zn.removeEventListener("mousedown",Ar),document.removeEventListener("mousemove",zr),document.removeEventListener("mouseup",Dr)}}},[Tn,po]),(0,rt.useEffect)(()=>{Tr(Ut)},[Ut]);const Kr=Yr(un),Nr=Yr(Gr),Wi={width:Kr,height:Nr},Ur=(0,rt.useMemo)(()=>{if(Xr){let Ar=new Date(Xr),Dr=Ar.getHours(),zr=Ar.getMinutes(),Zn=Ar.getSeconds();return Dr=Dr<10?"0"+Dr:Dr,zr=zr<10?"0"+zr:zr,Zn=Zn<10?"0"+Zn:Zn,`${Dr}:${zr}:${Zn}`}return 0},[Xr]),jr=Ar=>{const Dr=[];if(zn){let zr=-1;Ar=Ar.replace(/(@▁▁@|@▁@)/g,function(Zn,to,yo){Dr.push({multiLine:Zn!==Cr})})}return Dr};function wi(){window.sessionStorage.removeItem(Gn),Ln(!1),hi(0)}function Vi(){Ln(!1),hi(0),Tn.setValue(window.sessionStorage.getItem(Gn))}(0,rt.useEffect)(()=>{Rr[ar]&&ar!==vn&&ar!==on&&setTimeout(()=>{const Ar=document.getElementsByClassName("markdown-popup-form")[0],Dr=window.innerWidth/2-Ar.offsetWidth/2,zr=window.innerHeight/2-Ar.offsetHeight/2;Nn(Dr),xo(zr)},0)},[ar]);const bi=Ar=>{Ar.preventDefault();const Dr=Ar.clientX-Ki,zr=Ar.clientY-gi;document.body.onmousemove=Zn=>{let to=Zn.clientX-Dr,yo=Zn.clientY-zr;const ta=document.getElementsByClassName("markdown-popup-form")[0],wo=window.innerWidth-ta.offsetWidth,Zo=window.innerHeight-ta.offsetHeight;to=Math.max(0,Math.min(to,wo)),yo=Math.max(0,Math.min(yo,Zo)),vo(Zn.clientX,Zn.clientY,Dr,zr)&&(Nn(to),xo(yo))},document.body.onmouseup=function(){document.body.onmousemove=null}},vo=(Ar,Dr,zr,Zn)=>{const to=document.body.clientHeight,yo=document.body.clientWidth;return Ar<20&&zr>Ar||Ar>yo-20&&zr<Ar||Dr<20&&Zn>Dr||Dr>to-20&&Zn<Dr?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return rt.createElement(rt.Fragment,null,rt.createElement("div",{className:"markdown-editor-wrapper",ref:Go},rt.createElement("div",{className:`markdown-editor-container ${gn} ${Br?"on-preview":""} ${xn?"mini":""} ${lr?"full-screen":""}`,style:Wi},rt.createElement(ke,{insertTemp:Gt,watch:Br,fullScreen:lr,showNullButton:Yt,showNullProgramButton:zn,onActionCallback:_i,hidetoolBar:Qn,extraUse:Fn}),rt.createElement("div",{className:"markdown-editor-body"},rt.createElement("div",{className:"codemirror-container"},rt.createElement("textarea",{ref:Mi,placeholder:Dn})),Br?rt.createElement("div",{ref:Wr,className:"preview-container"},Cn==="stex"&&rt.createElement(me,{value:Lr}),Cn!=="stex"&&rt.createElement(we.Z,{disabledFill:On,showProgramFill:zn,value:Lr})):null))),ir?rt.createElement("a",{ref:po,className:"editor-resize"}):null,ar===vn&&rt.createElement(Kt,{callback:ur,onCancel:Ei}),ar===on&&rt.createElement(We,{callback:ur,onCancel:Ei}),rt.createElement(Ae.Z,null,Rr[ar]&&ar!==vn&&ar!==on?rt.createElement(pt.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Ki,top:gi},title:rt.createElement("div",{style:{cursor:"move"},onMouseDown:bi},Rr[ar]),open:!0,onCancel:Ei,footer:null,destroyOnClose:!0,width:ar===on?"1200px":null,height:ar===on?"80vh":null,className:"markdown-popup-form"},It):null))}},56701:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return ue},I:function(){return Ee}});var rt=$e(78241),St=$e(8591),ie=$e(92832),Re=$e(3113),je=$e(58788),ve=$e(59301),ce=$e(59301),be=Object.defineProperty,Ce=Object.defineProperties,ye=Object.getOwnPropertyDescriptors,we=Object.getOwnPropertySymbols,me=Object.prototype.hasOwnProperty,xe=Object.prototype.propertyIsEnumerable,fe=(Pe,Ie,ke)=>Ie in Pe?be(Pe,Ie,{enumerable:!0,configurable:!0,writable:!0,value:ke}):Pe[Ie]=ke,z=(Pe,Ie)=>{for(var ke in Ie||(Ie={}))me.call(Ie,ke)&&fe(Pe,ke,Ie[ke]);if(we)for(var ke of we(Ie))xe.call(Ie,ke)&&fe(Pe,ke,Ie[ke]);return Pe},ee=(Pe,Ie)=>Ce(Pe,ye(Ie));const{useForm:ae}=rt.default,re={width:280,marginRight:10},le={labelCol:{span:5},wrapperCol:{span:19}};var ue=({callback:Pe,onCancel:Ie})=>{const[ke]=ae();let Ae=(0,ve.useRef)();function Oe(Ye){Pe(Ye,Ae.current)}function Fe(Ye,ze){if(Ye.status===-1){St.ZP.error(Ye.message);return}ke.setFieldsValue({src:`/api/attachments/${Ye.id}`,type:ze.type})}function _e(Ye){let ze=Ye.target.files[0];Ae.current=ze,Ee(ze,Fe)}return ce.createElement(rt.default,ee(z({form:ke},le),{className:"upload-image-panel",onFinish:Oe,style:{width:470,overflow:"hidden"}}),ce.createElement(rt.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},ce.createElement("div",{className:"flex-container"},ce.createElement(rt.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},ce.createElement(ie.default,{style:re})),ce.createElement(pe,{onFileChange:_e}))),ce.createElement(rt.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},ce.createElement(ie.default,{style:{width:264}})),ce.createElement(rt.default.Item,{style:{textAlign:"right"}},ce.createElement(Re.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ce.createElement(Re.ZP,{type:"default",onClick:Ie},"\u53D6\u6D88")))};function pe({onFileChange:Pe}){return ce.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",ce.createElement("input",{type:"file",onChange:Pe}))}function Ee(Pe,Ie){if(!Pe)throw new String("\u6CA1\u6709\u6587\u4EF6");let ke=new FormData;ke.append("editormd-image-file",Pe),ke.append("file_param_name","editormd-image-file"),ke.append("byxhr","true");var Ae=new window.XMLHttpRequest;Ae.withCredentials=!0,Ae.addEventListener("load",function(Oe){Ie(JSON.parse(Oe.target.responseText),Pe)},!1),Ae.addEventListener("error",function(Oe){console.error(Oe)},!1),Ae.open("POST",`${je.KI}/api/attachments.json`),Ae.send(ke)}},50474:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return ie}});var rt=$e(59301),St=$e(4676);class ie extends rt.Component{constructor(je){super(je);const ve=window.document;this.node=ve.createElement("div"),ve.body.appendChild(this.node)}render(){const{children:je}=this.props;return(0,St.createPortal)(je,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},48551:function(bn,ln,$e){"use strict";$e.d(ln,{SV:function(){return Qe},ZP:function(){return lt}});var rt=$e(59301),St=$e(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"]},Re={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"]},je={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(`
`)}]},ve={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(`
`)}]},ce={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 be=$e(86061),Ce=$e.n(be),ye=Object.defineProperty,we=Object.defineProperties,me=Object.getOwnPropertyDescriptors,xe=Object.getOwnPropertySymbols,fe=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,ee=(We,Ue,qe)=>Ue in We?ye(We,Ue,{enumerable:!0,configurable:!0,writable:!0,value:qe}):We[Ue]=qe,ae=(We,Ue)=>{for(var qe in Ue||(Ue={}))fe.call(Ue,qe)&&ee(We,qe,Ue[qe]);if(xe)for(var qe of xe(Ue))z.call(Ue,qe)&&ee(We,qe,Ue[qe]);return We},re=(We,Ue)=>we(We,me(Ue)),le=(We,Ue,qe)=>new Promise((He,De)=>{var Le=Ze=>{try{dt(qe.next(Ze))}catch(Tt){De(Tt)}},Ve=Ze=>{try{dt(qe.throw(Ze))}catch(Tt){De(Tt)}},dt=Ze=>Ze.done?He(Ze.value):Promise.resolve(Ze.value).then(Le,Ve);dt((qe=qe.apply(We,Ue)).next())});const ue={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},pe=(We,Ue)=>Ue.map(qe=>({label:qe,kind:We.languages.CompletionItemKind.Keyword,insertText:qe})),Ee=We=>Object.keys(ue.tables).map(Ue=>({label:Ue,kind:We.languages.CompletionItemKind.Variable,insertText:Ue})),Pe=(We,Ue)=>{const qe=ue.tables[We];return qe?qe.map(He=>({label:He,kind:Ue.languages.CompletionItemKind.Field,insertText:He})):[]};function Ie(We,Ue,qe,He,De){let Le=Ue.getWordUntilPosition(qe),Ve={startLineNumber:qe.lineNumber,endLineNumber:qe.lineNumber,startColumn:Le.startColumn,endColumn:Le.endColumn},dt=He.map(Ze=>({label:Ze,kind:We.languages.CompletionItemKind.Keyword,insertText:Ze,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ve}));return De.map(Ze=>{dt.push(re(ae({},Ze),{range:Ve}))}),dt}var ke=We=>{ue.languages.map(De=>(We.languages.registerDocumentFormattingEditProvider(De,{provideDocumentFormattingEdits(Le,Ve,dt){return le(this,null,function*(){const Ze=Ce()(Le.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:Le.getFullModelRange(),text:Ze}]})}}),De));const Ue=je.quickKey.map(De=>({label:De.label,kind:We.languages.CompletionItemKind.Method,insertText:De.content,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet})),qe=ve.quickKey.map(De=>({label:De.label,kind:We.languages.CompletionItemKind.Method,insertText:De.content,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet})),He=Re.quickKey.map(De=>({label:De.label,kind:We.languages.CompletionItemKind.Method,insertText:De.content,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet}));We.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(De,Le){var Ve=De.getWordUntilPosition(Le),dt={startLineNumber:Le.lineNumber,endLineNumber:Le.lineNumber,startColumn:Ve.startColumn,endColumn:Ve.endColumn},Ze=De.getLineContent(Le.lineNumber).substring(Ve.startColumn-2,Ve.endColumn);return{suggestions:[...je.keywords.map(Tt=>({label:Tt,kind:We.languages.CompletionItemKind.Function,documentation:Tt,insertText:Tt,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt})),...je.quickKey.map(Tt=>({label:Tt.label,kind:We.languages.CompletionItemKind.Function,documentation:Tt.content,insertText:Ze.startsWith("#")?Tt.content.replace(/#/,""):Tt.content,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt}))]}}}),We.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(De,Le){var Ve=De.getWordUntilPosition(Le),dt={startLineNumber:Le.lineNumber,endLineNumber:Le.lineNumber,startColumn:Ve.startColumn,endColumn:Ve.endColumn};return{suggestions:[...ie.keywords.map(Ze=>({label:Ze,kind:We.languages.CompletionItemKind.Function,documentation:Ze,insertText:Ze,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt}))]}}}),We.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(De,Le){var Ve=De.getWordUntilPosition(Le),dt={startLineNumber:Le.lineNumber,endLineNumber:Le.lineNumber,startColumn:Ve.startColumn,endColumn:Ve.endColumn},Ze=De.getLineContent(Le.lineNumber).substring(Ve.startColumn-2,Ve.endColumn);return{suggestions:[...Re.keywords.map(Tt=>({label:Tt,kind:We.languages.CompletionItemKind.Function,documentation:Tt,insertText:Tt,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt})),...Re.quickKey.map(Tt=>({label:Tt.label,kind:We.languages.CompletionItemKind.Function,documentation:Tt.content,insertText:Ze.startsWith("#")?Tt.content.replace(/#/,""):Tt.content,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt}))]}}}),We.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(De,Le){var Ve=De.getWordUntilPosition(Le),dt={startLineNumber:Le.lineNumber,endLineNumber:Le.lineNumber,startColumn:Ve.startColumn,endColumn:Ve.endColumn},Ze=De.getLineContent(Le.lineNumber).substring(Ve.startColumn-2,Ve.endColumn);return{suggestions:[...ce.keywords.map(Tt=>({label:Tt,kind:We.languages.CompletionItemKind.Function,documentation:Tt,insertText:Tt,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt})),...ce.quickKey.map(Tt=>({label:Tt.label,kind:We.languages.CompletionItemKind.Function,documentation:Tt.content,insertText:Ze.startsWith("#")?Tt.content.replace(/#/,""):Tt.content,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt}))]}}}),We.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(De,Le){var Ve=De.getWordUntilPosition(Le),dt={startLineNumber:Le.lineNumber,endLineNumber:Le.lineNumber,startColumn:Ve.startColumn,endColumn:Ve.endColumn},Ze=De.getLineContent(Le.lineNumber).substring(Ve.startColumn-2,Ve.endColumn);return{suggestions:[...ve.keywords.map(Tt=>({label:Tt,kind:We.languages.CompletionItemKind.Function,documentation:Tt,insertText:Tt,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt})),...ve.quickKey.map(Tt=>({label:Tt.label,kind:We.languages.CompletionItemKind.Function,documentation:Tt.content,insertText:Ze.startsWith("#")?Tt.content.replace(/#/,""):Tt.content,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt}))]}}})};const Ae="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Oe=Object.defineProperty,Fe=(We,Ue,qe)=>Ue in We?Oe(We,Ue,{enumerable:!0,configurable:!0,writable:!0,value:qe}):We[Ue]=qe,_e=(We,Ue,qe)=>Fe(We,typeof Ue!="symbol"?Ue+"":Ue,qe);const Ye=class mx{constructor(Ue,qe,He){this.placeholder=Ue,this.editor=qe,this.monaco=He,qe.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)}};_e(Ye,"ID","editor.widget.placeholderHint");var Xe=Ye,st=$e(96236),ht=$e(8591),ft=$e(6848),Lt=$e(89392),et=$e(86766),it=$e(56102),xt=Object.defineProperty,Et=Object.defineProperties,Mt=Object.getOwnPropertyDescriptors,mt=Object.getOwnPropertySymbols,pt=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable,jt=(We,Ue,qe)=>Ue in We?xt(We,Ue,{enumerable:!0,configurable:!0,writable:!0,value:qe}):We[Ue]=qe,At=(We,Ue)=>{for(var qe in Ue||(Ue={}))pt.call(Ue,qe)&&jt(We,qe,Ue[qe]);if(mt)for(var qe of mt(Ue))vt.call(Ue,qe)&&jt(We,qe,Ue[qe]);return We},Kt=(We,Ue)=>Et(We,Mt(Ue)),Ct=(We,Ue)=>{var qe={};for(var He in We)pt.call(We,He)&&Ue.indexOf(He)<0&&(qe[He]=We[He]);if(We!=null&&mt)for(var He of mt(We))Ue.indexOf(He)<0&&vt.call(We,He)&&(qe[He]=We[He]);return qe},gt=(We,Ue,qe)=>new Promise((He,De)=>{var Le=Ze=>{try{dt(qe.next(Ze))}catch(Tt){De(Tt)}},Ve=Ze=>{try{dt(qe.throw(Ze))}catch(Tt){De(Tt)}},dt=Ze=>Ze.done?He(Ze.value):Promise.resolve(Ze.value).then(Le,Ve);dt((qe=qe.apply(We,Ue)).next())});function tt(We){return/^\d+$/.test(We)?`${We}px`:We}function bt(){}let Ke=!1;const ut={"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 wt(We=[]){let Ue=We;if(Array.isArray(We)){for(let qe=0;qe<We.length;qe++){let He=ut[We[qe]];if(He)return He}return Ue[0]}return ut[Ue]||Ue}let yt=null;var lt=We=>{var Ue=We,{width:qe="100%",height:He="100%",value:De,language:Le="javascript",style:Ve={},options:dt={},overrideServices:Ze={},theme:Tt="vs-dark",onEditBlur:_t,isCopy:Qt=!1,onSave:kt,autoHeight:Nt=!1,forbidCopy:Zt=!1,onChange:on=bt,editorDidMount:vn=bt,onFocus:kn=bt,onBreakPoint:Kn=bt,breakPointValue:Xn=[],filename:pr="educoder.txt",errorLine:dr,errorContent:vr="",highlightLine:Sr,openBreakPoint:Fr=!1,placeholder:li=""}=Ue,Er=Ct(Ue,["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 xi=(0,rt.useRef)(),Cr=(0,rt.useRef)({}),ot=(0,rt.useRef)(),di=(0,rt.useRef)(),Yr=(0,rt.useRef)([]),Ri=(0,rt.useRef)(!1),hr=(0,rt.useRef)(),Ir=(0,rt.useRef)(),Rr=(0,rt.useRef)(!1),[yi,dn]=(0,rt.useState)(!1);function mn(){let rn;return xi.current&&(rn=new St.Z(Mn=>{for(let an of Mn)(an.target.offsetHeight>0||an.target.offsetWidth>0)&&Cr.current.instance.layout()}),rn.observe(xi.current)),rn}function un(){ht.ZP.warning({content:decodeURIComponent(Ae),key:"monaco-editor-tip"})}const Ut=()=>{let rn=Cr.current.instance;if(De!=null&&rn&&yi){const Mn=rn.getModel();Mn&&De!==Mn.getValue()&&(Ke=!0,Mn.setValue(De),rn.layout(),Ke=!1)}};(0,rt.useEffect)(()=>{const rn=et.Z.subscribe("formatDocument",Mn=>{var an;let gn=Cr.current.instance;(an=gn==null?void 0:gn.getAction)==null||an.call(gn,"editor.action.formatDocument").run()});return window.updateMonacoValue=Mn=>{on(Mn)},rn},[]),(0,rt.useEffect)(()=>{var rn;let Mn=Cr.current.instance;di.current&&clearTimeout(di.current),di.current=setTimeout(()=>{Ut()},500),De&&(De!=null&&De.length)&&((rn=Mn==null?void 0:Mn.updateOptions)==null||rn.call(Mn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(De.split(/\r\n|\r|\n/g).length))+3,5)}))},[De,yi,Cr.current]),(0,rt.useEffect)(()=>{if(dr&&Cr.current&&Cr.current.instance){let Mn=Cr.current.instance;Mn.changeViewZones(function(an){var gn=document.createElement("div");gn.style.padding="10px 20px",gn.style.width="calc(100% - 20px)",gn.className="my-error-line-wrp",gn.innerHTML=vr,an.addZone({afterLineNumber:dr||11,heightInLines:3,domNode:gn})});var rn={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}};Mn.addOverlayWidget(rn),Mn.revealPositionInCenter({lineNumber:20,column:1})}},[dr,Cr.current,yi]);const xn=(rn="",Mn)=>{if(!rn||rn.trim()==="")return!0;const gn=Cr.current.instance.getModel().getLineTokens(Mn);let En=!1;for(let pn=0;pn<2;pn++)gn.getStandardTokenType(pn)===1&&(En=!0);return En};(0,rt.useEffect)(()=>{var rn;const Mn=(rn=Cr.current)==null?void 0:rn.instance;if(Mn&&yi&&Zt){const an=Mn.onDidBlurEditorWidget(()=>{Rr.current=!1}),gn=Mn.onDidFocusEditorText(()=>{Rr.current=!0});return()=>{an.dispose(),gn.dispose()}}},[Cr.current,yi,Zt]),(0,rt.useEffect)(()=>{var rn;if((rn=Cr.current)!=null&&rn.instance&&yi&&Fr){let Mn=Cr.current.instance,an=Mn.getModel();if(!an)return;(()=>{var Br;let tn=[],lr=[];const br=an.getAllDecorations();for(let Qr of br)Qr.options.className==="highlighted-line"&&(tn.push((Br=Qr==null?void 0:Qr.range)==null?void 0:Br.startLineNumber),lr.push(Qr==null?void 0:Qr.id));if(Sr===tn[0])return;an.deltaDecorations(lr,[]);const ar=an.getLineCount();Sr&&Sr<=ar&&(Mn.deltaDecorations([],[{range:new yt.Range(Sr,1,Sr,an.getLineMaxColumn(Sr)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Mn.revealLineInCenter(Sr))})();const En=(Br=!1)=>{var tn;let lr=[],br=[];const ar=an.getAllDecorations();for(let Qr of ar)Qr.options.linesDecorationsClassName==="breakpoints-select"&&(lr.push((tn=Qr==null?void 0:Qr.range)==null?void 0:tn.startLineNumber),br.push(Qr==null?void 0:Qr.id));if(Br)return{lines:lr,ids:br};Kn(lr)},pn=Br=>gt(void 0,null,function*(){let tn={range:new yt.Range(Br,1,Br,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield an.deltaDecorations([],[tn]),En()}),On=Br=>gt(void 0,null,function*(){let tn=[];const lr=Mn.getLineDecorations(Br);for(let br of lr)br.options.linesDecorationsClassName==="breakpoints-select"&&tn.push(br.id);yield an.deltaDecorations(tn,[]),En()}),Dn=Br=>{let tn=Mn.getLineDecorations(Br);for(let lr of tn)if(lr.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Lt.isEqual)(Xn,En(!0).lines)){an.deltaDecorations(En(!0).ids,[]);const Br=Xn.map(tn=>({range:new yt.Range(tn,1,tn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));an.deltaDecorations([],Br)}const $n=Mn.onDidChangeModelContent(Br=>{let tn=Mn.getPosition();if(tn){let lr=tn.lineNumber;clearTimeout(Ir.current),Ir.current=setTimeout(()=>{xn(an.getLineContent(lr),lr)?On(lr):Dn(lr)?(On(lr),pn(lr)):En()},100)}}),Fn=Mn.onMouseDown(Br=>{var tn,lr,br;if(Br.target.detail&&((br=(lr=(tn=Br.target)==null?void 0:tn.element)==null?void 0:lr.className)!=null&&br.includes("line-numbers"))){let ar=Br.target.position.lineNumber;if(xn(an.getLineContent(ar),ar))return;Dn(ar)?On(ar):pn(ar)}}),Tn=Br=>{let tn={range:new yt.Range(Br,1,Br,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Yr.current=Mn.deltaDecorations(Yr.current,[tn])},Yn=()=>{Yr.current=Mn.deltaDecorations(Yr.current,[])},Lr=Mn.onMouseMove(Br=>{var tn,lr,br;if(Yn(),Br.target.detail&&((br=(lr=(tn=Br.target)==null?void 0:tn.element)==null?void 0:lr.className)!=null&&br.includes("line-numbers"))){let ar=Br.target.position.lineNumber;if(xn(an.getLineContent(ar),ar))return;Tn(ar)}}),qr=Mn.onMouseLeave(()=>{Yn()});return()=>{$n.dispose(),Fn.dispose(),Lr.dispose(),qr.dispose()}}},[Cr.current,yi,Xn,Sr,Fr,Le]),(0,rt.useEffect)(()=>{var rn;(rn=Cr.current)!=null&&rn.instance&&Fr&&Cr.current.instance.setPosition({lineNumber:0,column:0})},[Sr]);function jn(){let rn=Cr.current.instance;if(rn){const Mn=rn.getSelection(),an=Cr.current.pastePos||{},gn=new yt.Range(an.startLineNumber||Mn.endLineNumber,an.startColumn||Mn.endColumn,an.endLineNumber||Mn.endLineNumber,an.endColumn||Mn.endColumn);setTimeout(()=>{rn.executeEdits("",[{range:gn,text:""}])},300)}}function en(rn){(window.navigator.platform.match("Mac")?rn.metaKey:rn.ctrlKey)&&rn.keyCode==83&&(rn.preventDefault(),kt())}const Gt=()=>{if(Nt&&Cr.current.instance){const rn=Cr.current.instance.getContentHeight();Qn(rn<He?He:rn)}else Qn(He)};function Cn(rn){var Mn=document.createEvent("MouseEvents");Mn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),rn.dispatchEvent(Mn)}const Gn=rn=>{if(!Rr.current)return;const{keyCode:Mn,ctrlKey:an,metaKey:gn,target:En,type:pn}=rn;return(pn==="paste"||(Mn===67||Mn===86)&&(gn||an))&&En.nodeName==="TEXTAREA"&&(un(),rn.preventDefault()),!1};function ir(rn,Mn){var an=window.URL||window.webkitURL||window,gn=new Blob([Mn]),En=document.createElementNS("http://www.w3.org/1999/xhtml","a");En.href=an.createObjectURL(gn),En.download=rn,Cn(En)}(0,rt.useEffect)(()=>{Gt()},[Gt]),(0,rt.useEffect)(()=>{xi.current&&!yi&&Promise.all([$e.e(8909),$e.e(1810)]).then($e.bind($e,71448)).then(rn=>{try{yt=rn,Cr.current.instance=yt.editor.create(xi.current,{value:De,language:wt(Le),theme:Tt,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},Ze);const Mn=Cr.current.instance;let En=[...st.BH._menuItems].find($n=>$n[0]._debugName=="EditorContext")[1],pn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],On=($n,Fn)=>{var Tn,Yn;let Lr=$n._first;do Fn.includes((Yn=(Tn=Lr.element)==null?void 0:Tn.command)==null?void 0:Yn.id)&&$n._remove(Lr);while(Lr=Lr.next)};if(vn(Mn,yt),setTimeout(()=>{Gt(),Cr.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{ir(pr||"educoder.txt",Mn.getValue())}})},500),Cr.current.subscription=Mn.onDidChangeModelContent($n=>{Ri.current?clearTimeout(hr.current):(Gt(),on(Mn.getValue(),$n)),hr.current=setTimeout(()=>{Ri.current=!1},500)}),window.Monaco||ke(yt,wt(Le)),Zt&&(On(En,pn),xi.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Gn),window.removeEventListener("paste",Gn),window.addEventListener("keydown",Gn),window.addEventListener("paste",Gn)),window.Monaco=yt,_t&&Mn.onDidBlurEditorWidget(()=>{_t(Mn.getValue())}),kn&&Mn.onDidFocusEditorText(()=>{kn(Mn.getValue())}),Zt)try{Mn.onDidPaste($n=>{const Fn=Mn.getSelection(),Tn=Cr.current.pastePos||{},Yn=new yt.Range(Tn.startLineNumber||Fn.endLineNumber,Tn.startColumn||Fn.endColumn,Tn.endLineNumber||Fn.endLineNumber,Tn.endColumn||Fn.endColumn);Mn.executeEdits("",[{range:$n.range,text:""}])})}catch($n){}let Dn=mn();return li&&typeof li=="string"&&new Xe(li,Mn,yt),dn(!0),()=>{const $n=Cr.current.instance;$n.dispose();const Fn=$n.getModel();Fn&&Fn.dispose(),Cr.current.subscription&&Cr.current.subscription.dispose(),Dn.unobserve(xi.current)}}catch(Mn){}})},[]),(0,rt.useEffect)(()=>{if(Cr.current.instance&&yi)return document.addEventListener("keydown",en,!1),()=>{document.removeEventListener("keydown",en)}},[kt,yi]),(0,rt.useEffect)(()=>{let rn=Cr.current.instance;if(rn&&yi){let Mn=wt(Le);yt.editor.setModelLanguage(rn.getModel(),Mn)}},[Le,yi]),(0,rt.useEffect)(()=>{Cr.current.instance&&yi&&yt.editor.setTheme(Tt)},[Tt,yi]),(0,rt.useEffect)(()=>{let rn=Cr.current.instance;ot.current=dt,rn&&yi&&(rn.updateOptions(At({},dt)),setTimeout(()=>{rn.getModel().updateOptions(At({},dt))},200))},[JSON.stringify(dt),yi]),(0,rt.useEffect)(()=>{let rn=Cr.current.instance;rn&&yi&&rn.layout()},[qe,He,yi]);const[Pn,Yt]=(0,rt.useState)(tt(qe)),[zn,Qn]=(0,rt.useState)(tt(He)),or=Kt(At({},Ve),{width:Pn,height:zn,position:"relative"});return rt.createElement("div",{className:"my-monaco-editor",ref:xi,style:or},Qt&&rt.createElement(it.CopyToClipboard,{text:De,onCopy:()=>ht.ZP.success("\u590D\u5236\u6210\u529F")},rt.createElement(ft.Z,{title:"\u590D\u5236\u4EE3\u7801"},rt.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},rt.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Qe({width:We="100%",height:Ue="100%",original:qe,modified:He,language:De,options:Le={}}){const Ve=(0,rt.useRef)(),[dt,Ze]=(0,rt.useState)(null);function Tt(Nt){let Zt;return Ve.current&&(Zt=new St.Z(on=>{for(let vn of on)(vn.target.offsetHeight>0||vn.target.offsetWidth>0)&&Nt.layout()}),Zt.observe(Ve.current)),Zt}(0,rt.useEffect)(()=>(Ve.current&&Promise.all([$e.e(8909),$e.e(9404)]).then($e.bind($e,2550)).then(Nt=>{yt=Nt;const Zt=yt.editor.createDiffEditor(Ve.current,Kt(At({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},Le),{wordWrap:!0}));Ze(Zt);let on=Tt(Zt);return()=>{Zt.dispose();const vn=Zt.getModel();vn&&vn.dispose(),on.unobserve(Ve.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,rt.useEffect)(()=>{dt&&dt.setModel({original:yt.editor.createModel(qe,De),modified:yt.editor.createModel(He,De)})},[qe,He,De,dt]);const _t=tt(We),Qt=tt(Ue),kt={width:_t,height:Qt};return rt.createElement("div",{className:"my-diff-editor",ref:Ve,style:kt})}},26403:function(bn,ln,$e){"use strict";var rt=$e(7543),St=$e(57809),ie=$e(78673),Re=$e(59301);const je=St.default.Option;ln.Z=({isTheoretical:ve,onFontSizeChange:ce,cmFontSize:be,cmCodeMode:Ce,autoFormat:ye,onCodeModeChange:we,onTabToSpace:me,onAutoFormat:xe,formatDocument:fe,className:z="",tabToSpace:ee,children:ae,code_editor:re,challenge:le})=>{const ue={1:"\u7B80\u5355",2:"\u4E2D\u7B49",3:"\u56F0\u96BE"};return Re.createElement("div",{className:`tpi-code-setting ${z}`},Re.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),Re.createElement("section",null,Re.createElement("div",{className:"file-item"},Re.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),Re.createElement(St.default,{bordered:!1,size:"small",value:Ce,onChange:we},Re.createElement(je,{value:"vs"},"\u767D\u8272\u80CC\u666F"),Re.createElement(je,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),!ve&&Re.createElement(Re.Fragment,null,Re.createElement("div",{className:"file-item"},Re.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),Re.createElement(St.default,{bordered:!1,size:"small",value:be,onChange:ce},Re.createElement(je,{value:12},"12px"),Re.createElement(je,{value:14},"14px"),Re.createElement(je,{value:16},"16px"),Re.createElement(je,{value:18},"18px"),Re.createElement(je,{value:20},"20px"),Re.createElement(je,{value:22},"22px"))),Re.createElement("div",{className:"file-item"},Re.createElement("b",null,"Tab\u8F6C\u6362"),Re.createElement(ie.Z,{checked:ee,onChange:me})),Re.createElement("div",{className:"file-item",onClick:fe},Re.createElement("b",{style:{cursor:"pointer"}},"\u683C\u5F0F\u5316\u4EE3\u7801")))),!ve&&Re.createElement(Re.Fragment,null,Re.createElement("h3",null,"\u5FEB\u6377\u952E"),Re.createElement("section",null,Re.createElement("div",{className:"file-item"},Re.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),Re.createElement("span",null,"Ctrl + S")),Re.createElement("div",{className:"file-item"},Re.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),Re.createElement("span",null,"F1 / Alt + F1")),Re.createElement("div",{className:"file-item"},Re.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),Re.createElement("span",null,"Ctrl + ]/[")),Re.createElement("div",{className:"file-item"},Re.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),Re.createElement("span",null,"Ctrl + Shift + \\")),Re.createElement("div",{className:"file-item"},Re.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),Re.createElement("span",null,"Home")),Re.createElement("div",{className:"file-item"},Re.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),Re.createElement("span",null,"End"))),ae),!ve&&Re.createElement(Re.Fragment,null,Re.createElement("h3",null,"\u5FEB\u6377\u952E"),Re.createElement("section",null,Re.createElement("div",{className:"file-item"},Re.createElement("b",null,"\u5B9E\u8BAD\u96BE\u6613\u5EA6"),Re.createElement("span",null,ue[le==null?void 0:le.difficulty])),Re.createElement("div",{className:"file-item"},Re.createElement("b",null,"\u5B9E\u9A8C\u73AF\u5883"),Re.createElement("span",null,re==null?void 0:re.name)),Re.createElement("div",{className:"file-item"},Re.createElement("b",null,"\u5B9E\u9A8C\u5BB9\u5668\u7F51\u7EDC"),Re.createElement("span",null,re!=null&&re.close_internet?"\u5173\u95ED\u5916\u7F51":"\u5F00\u542F\u5916\u7F51")))))}},91300:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return St}});var rt=$e(59301);function St(ie,Re){const je=(0,rt.useRef)();(0,rt.useEffect)(()=>{je.current=ie}),(0,rt.useEffect)(()=>{function ve(){je.current()}if(Re!==null){let ce=setInterval(ve,Re);return()=>clearInterval(ce)}},[Re])}},36667:function(bn,ln,$e){"use strict";$e.r(ln),$e.d(ln,{Types:function(){return Cr},default:function(){return Yr}});var rt=$e(59301),St={header:"header___N_IdR",field:"field___XG_dh","oj-form-container":"oj-form-container___syYzK","oj-left-panel":"oj-left-panel___L082x","oj-form-info":"oj-form-info___q0IU5",footer:"footer___pGCM2",result:"result___LM9Ms",passText:"passText___nUoL4",noPassText:"noPassText___ECHHG",pass:"pass___tDubp",noPass:"noPass___ilYvg","test-case-name":"test-case-name___MI_KD","btn-remove-case":"btn-remove-case___OiaTQ","icon-tag":"icon-tag___D86WO",btn_back:"btn_back___FyaSY",testJi:"testJi___NDviK",upBtn:"upBtn___FiZX4","oj-problems":"oj-problems___xb70g",row:"row___v036E",a:"a___yRaYH",b:"b___gWQyu",inputTwo:"inputTwo___IZ9og",inputOne:"inputOne____NmcT",cusModal:"cusModal___fJ5gm","oj-custom-large-spin":"oj-custom-large-spin___Aar0g",MdEditor:"MdEditor___hgoes"},ie=$e(92832),Re=$e(43418),je=$e(36381),ve=$e(78241),ce=$e(8591),be=$e(95237),Ce=$e(43604),ye=$e(71418),we=$e(3113),me=$e(2595),xe=$e(57809),fe=$e(88897),z=$e(5112),ee=$e(24905),ae=$e(81327),re=$e(14478),le=$e(59301);const{Option:ue}=xe.default;var pe=(hr=>(hr[hr.language=0]="language",hr[hr.difficulty=1]="difficulty",hr[hr.category=2]="category",hr[hr.openOrNot=3]="openOrNot",hr))(pe||{});const Ee={0:[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"}],1:[{title:"\u7B80\u5355",key:1},{title:"\u9002\u4E2D",key:2},{title:"\u56F0\u96BE",key:3}],2:[{title:"\u7A0B\u5E8F\u8BBE\u8BA1",key:1},{title:"\u7B97\u6CD5",key:2}],3:[{title:"\u516C\u5F00",key:1},{title:"\u79C1\u6709",key:0}]};function Pe(hr){return Ee[hr].map(Ir=>le.createElement(ue,{key:Ir.title,value:Ir.key}," ",Ir.title," "))}function Ie(hr,Ir){hr.map(Rr=>{const{id:yi,name:dn,sub_disciplines:mn}=Rr;let un={value:yi,label:dn};Ir.push(un),mn&&mn.length>0&&(un.children=[],Ie(mn,un.children))})}function ke(hr,Ir){var Rr;let yi=[];for(let dn=0;dn<hr.length;dn++){const mn=hr[dn];if(((Rr=mn.sub_disciplines)==null?void 0:Rr.length)>0){yi[0]=mn.id;for(let un=0;un<mn.sub_disciplines.length;un++){const Ut=mn.sub_disciplines[un];if(Ut.id===Ir)return yi[1]=Ut.id,[yi,Ut.tag_disciplines||Ut.sub_disciplines||[]]}}}return[yi,[]]}var Ae=$e(42203),Oe=$e(24334),Fe=$e(15962),_e=$e(2377),Ye=$e(23469),ze=$e(70635);function Xe(hr){return(0,ze.v_)("practices.json",hr)}function st(){return(0,ze.U2)("problems/new.json")}function ht(hr){return(0,ze.U2)(`practices/${hr}/edit.json`)}function ft(hr,Ir){return(0,ze.gz)(`practices/${hr}`,Ir)}function Lt(hr,Ir){return post(`exercises/${hr}/exercise_questions.json`,Ir)}function et(hr,Ir){return put(`exercise_questions/${hr}.json`,Ir)}var it=$e(69003),xt=$e(43428),Et=$e(48551),Mt=$e(26403),mt=$e(50474),pt=$e(49371),vt={"code-panel-container":"code-panel-container___BZjjl","action-oj-bar":"action-oj-bar___xbXpK",active:"active___EMVKI"},jt=Object.defineProperty,At=Object.defineProperties,Kt=Object.getOwnPropertyDescriptors,Ct=Object.getOwnPropertySymbols,gt=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable,bt=(hr,Ir,Rr)=>Ir in hr?jt(hr,Ir,{enumerable:!0,configurable:!0,writable:!0,value:Rr}):hr[Ir]=Rr,Ke=(hr,Ir)=>{for(var Rr in Ir||(Ir={}))gt.call(Ir,Rr)&&bt(hr,Rr,Ir[Rr]);if(Ct)for(var Rr of Ct(Ir))tt.call(Ir,Rr)&&bt(hr,Rr,Ir[Rr]);return hr},ut=(hr,Ir)=>At(hr,Kt(Ir));const wt={theme:(0,pt.G)("cmCodeMode","vs-dark"),fontSize:(0,pt.G)("cmFontSize",14),showEditorSetting:!1,tabToSpace:(0,pt.G)("cmTabToSpace",!0)};var yt=(hr=>(hr[hr.set_font_size=0]="set_font_size",hr[hr.set_theme=1]="set_theme",hr[hr.on_tab_to_space=2]="on_tab_to_space",hr[hr.set_show_editor_setting=3]="set_show_editor_setting",hr))(yt||{});function lt(hr,Ir){switch(Ir.type){case 3:return ut(Ke({},hr),{showEditorSetting:Ir.payload});case 1:return ut(Ke({},hr),{theme:Ir.payload});case 0:return ut(Ke({},hr),{fontSize:Ir.payload});case 2:return ut(Ke({},hr),{tabToSpace:Ir.payload});default:throw new Error}}var Qe=({value:hr,onChange:Ir,language:Rr,onLanguage:yi,languageItems:dn,ActionBarRender:mn=un=>rt.createElement(We,{languageItems:dn,onLanguage:yi,language:Rr,onShowCodeSetting:un})})=>{const[un,Ut]=(0,rt.useReducer)(lt,wt),{theme:xn,fontSize:jn,showEditorSetting:en,tabToSpace:Gt}=un;console.log(hr,Rr,"value");const Cn={onFontSizeChange:Yt=>{Ut({type:0,payload:Yt}),(0,pt.t)("cmFontSize",Yt)},tabToSpace:Gt,cmFontSize:jn,className:"oj",cmCodeMode:xn,onTabToSpace:Yt=>{Ut({type:2,payload:Yt}),(0,pt.t)("cmTabToSpace",Yt)},onCodeModeChange:Yt=>{Ut({type:1,payload:Yt}),(0,pt.t)("cmCodeMode",Yt)}};function Gn(){Ut({type:3,payload:!1})}function ir(){Ut({type:3,payload:!0})}const Pn={value:hr,language:Rr,onChange:Ir,theme:xn,height:"calc(100% - 56px)",options:{fontSize:jn,insertSpaces:Gt}};return rt.createElement(rt.Fragment,null,rt.createElement("div",{className:vt["code-panel-container"]},mn(ir),rt.createElement(Et.ZP,Ke({key:Rr},Pn))),rt.createElement(mt.Z,null,rt.createElement(xt.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:en,onClose:Gn},rt.createElement(Mt.Z,Ke({},Cn)))))};function We({languageItems:hr,language:Ir,onShowCodeSetting:Rr,onLanguage:yi}){return rt.createElement("div",{className:vt["action-oj-bar"]},hr==null?void 0:hr.map(dn=>rt.createElement("div",{className:Ir===(dn==null?void 0:dn.language)?vt.active:"",onClick:()=>yi(dn==null?void 0:dn.language),key:dn==null?void 0:dn.language},dn==null?void 0:dn.language)),rt.createElement("a",{onClick:Rr},rt.createElement("i",{className:"iconfont icon-shezhi"})))}var Ue=$e(99313),qe={flex_box_center:"flex_box_center___4yAaY",flex_space_between:"flex_space_between___YaUgM",flex_box_vertical_center:"flex_box_vertical_center___zR3dp",flex_box_center_end:"flex_box_center_end___rwgS5",flex_box_column:"flex_box_column___LhFeP",wrap:"wrap___xTL91",in:"in___eSY86",btns:"btns___UdEGI",customModal:"customModal___CL0OL"},He=(hr,Ir,Rr)=>new Promise((yi,dn)=>{var mn=xn=>{try{Ut(Rr.next(xn))}catch(jn){dn(jn)}},un=xn=>{try{Ut(Rr.throw(xn))}catch(jn){dn(jn)}},Ut=xn=>xn.done?yi(xn.value):Promise.resolve(xn.value).then(mn,un);Ut((Rr=Rr.apply(hr,Ir)).next())}),Le=({visible:hr,onOK:Ir,onCancel:Rr})=>{const[yi,dn]=(0,rt.useState)(!1),[mn,un]=(0,rt.useState)(!1),[Ut,xn]=(0,rt.useState)("1"),[jn,en]=(0,rt.useState)(""),[Gt,Cn]=(0,rt.useState)([]),Gn=()=>He(void 0,null,function*(){if(!jn){ce.ZP.warning(`\u9898\u76EE${Qn}\u4E0D\u80FD\u4E3A\u7A7A`);return}un(!0);const or=yield(0,ze.ZP)("/api/tag_disciplines.json",{method:"post",body:{target:hr,name:jn}});if((or==null?void 0:or.status)===0){Ir();return}un(!1)}),ir=(or="")=>He(void 0,null,function*(){dn(!0);let rn=yield(0,ze.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:hr,search:or}});Cn(rn.tag_disciplines||[]),dn(!1)}),Pn=or=>{let rn=or.name;Re.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u91CD\u547D\u540D",content:rt.createElement("div",null,rt.createElement(ie.default,{defaultValue:rn,placeholder:`\u8BF7\u8F93\u5165${Qn}\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57`,maxLength:20,onChange:Mn=>{rn=Mn.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>He(void 0,null,function*(){if(!rn)return ce.ZP.warning(`\u9898\u76EE${Qn}\u4E0D\u80FD\u4E3A\u7A7A`),Promise.reject();const Mn=yield(0,ze.ZP)(`/api/tag_disciplines/${or.id}/rename.json`,{method:"post",body:{id:or.id,name:rn}});(Mn==null?void 0:Mn.status)===0&&ir()})})},Yt=or=>{Re.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,width:570,title:"\u5220\u9664",content:hr==="practice"?rt.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u6765\u6E90\u201C",rt.createElement("span",{className:"c-light-primary"},or.name),"\u201D\u5220\u9664\u5417\uFF1F",rt.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u6765\u6E90\u8FDB\u884C\u6E05\u9664\u3002"):rt.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u77E5\u8BC6\u70B9\u201C",rt.createElement("span",{className:"c-light-primary"},or.name),"\u201D\u5220\u9664\u5417\uFF1F",rt.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u77E5\u8BC6\u70B9\u8FDB\u884C\u6E05\u9664\u3002"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>He(void 0,null,function*(){const rn=yield(0,ze.ZP)(`/api/tag_disciplines/${or.id}.json`,{method:"delete",body:{id:or.id}});(rn==null?void 0:rn.status)===0&&ir()})})},zn=or=>{ir(or)},Qn=hr==="practice"?"\u77E5\u8BC6\u70B9":"\u6765\u6E90";return rt.createElement(Re.default,{afterClose:()=>{un(!1),dn(!1),en(""),xn("1"),Cn([])},centered:!0,keyboard:!1,width:600,title:`${Qn}\u7BA1\u7406`,open:!!hr,className:qe.customModal,footer:null,onCancel:Rr},rt.createElement("section",{className:qe.wrap},rt.createElement(Ue.default,{activeKey:Ut,onChange:or=>{en(""),xn(or),ir()}},rt.createElement(Ue.default.TabPane,{tab:`\u65B0\u589E${Qn}`,key:"1"},rt.createElement(ie.default,{value:jn,onChange:or=>en(or.target.value),className:qe.in,placeholder:`\u8F93\u5165${Qn}\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57`,maxLength:20}),rt.createElement("div",{className:qe.btns},rt.createElement(we.ZP,{onClick:Rr,className:"mr20"},"\u53D6\u6D88 "),rt.createElement(we.ZP,{loading:mn,onClick:Gn,type:"primary"},"\u786E\u8BA4\u65B0\u5EFA"))),rt.createElement(Ue.default.TabPane,{tab:`\u5DF2\u6709${Qn}`,key:"2"},rt.createElement(ie.default.Search,{allowClear:!0,onSearch:zn,value:jn,onChange:or=>en(or.target.value),className:qe.in,placeholder:`\u8F93\u5165${Qn}\u540D\u79F0\u8FDB\u884C\u67E5\u8BE2`}),rt.createElement(me.default,{dataSource:Gt,bordered:!1,loading:yi,scroll:Gt.length>7?{y:300}:{},style:{padding:"0 0px 20px 0px"},columns:[{title:`${Qn}\u540D\u79F0`,dataIndex:"name",ellipsis:!0},{title:"\u64CD\u4F5C",dataIndex:"action",width:120,render:(or,rn)=>rt.createElement("span",null,rt.createElement("span",{onClick:()=>Pn(rn),className:"current mr10 c-light-primary"},"\u91CD\u547D\u540D"),rt.createElement("span",{onClick:()=>Yt(rn),className:"current c-grey-666"},"\u5220\u9664"))}],pagination:!1})))))},Ve=$e(10148),dt=$e(31604),Ze=$e(61186),Tt=$e.n(Ze),_t=$e(58130),Qt=$e(25711),kt=$e(2119),Nt=$e(59301),Zt=Object.defineProperty,on=Object.defineProperties,vn=Object.getOwnPropertyDescriptors,kn=Object.getOwnPropertySymbols,Kn=Object.prototype.hasOwnProperty,Xn=Object.prototype.propertyIsEnumerable,pr=(hr,Ir,Rr)=>Ir in hr?Zt(hr,Ir,{enumerable:!0,configurable:!0,writable:!0,value:Rr}):hr[Ir]=Rr,dr=(hr,Ir)=>{for(var Rr in Ir||(Ir={}))Kn.call(Ir,Rr)&&pr(hr,Rr,Ir[Rr]);if(kn)for(var Rr of kn(Ir))Xn.call(Ir,Rr)&&pr(hr,Rr,Ir[Rr]);return hr},vr=(hr,Ir)=>on(hr,vn(Ir)),Sr=(hr,Ir,Rr)=>new Promise((yi,dn)=>{var mn=xn=>{try{Ut(Rr.next(xn))}catch(jn){dn(jn)}},un=xn=>{try{Ut(Rr.throw(xn))}catch(jn){dn(jn)}},Ut=xn=>xn.done?yi(xn.value):Promise.resolve(xn.value).then(mn,un);Ut((Rr=Rr.apply(hr,Ir)).next())});const{TextArea:Fr}=ie.default,{confirm:li}=Re.default,{Panel:Er}=je.default,xi={loading:!0,user:null,status:0,data:void 0,lastedUpdateTime:0};var Cr=(hr=>(hr[hr.SET_INITAL_DATA=0]="SET_INITAL_DATA",hr[hr.SET_LOADING=1]="SET_LOADING",hr[hr.SET_STATUS=2]="SET_STATUS",hr))(Cr||{});const ot="#### \u9898\u76EE\u63CF\u8FF0\n\u73B0\u6709\u4E00\u4E2A\u6574\u578B\u6570\u7EC4 `nums`\uFF0C\u8BF7\u7F16\u5199\u7A0B\u5E8F\u5C06\u6570\u7EC4 `nums` \u4E2D\u7684\u6240\u6709 `$$0$$` \u79FB\u52A8\u5230\u6570\u7EC4\u7684\u672B\u5C3E\uFF0C\u4F46\u4E0D\u6539\u53D8\u975E\u96F6\u5143\u7D20\u5728\u6570\u7EC4\u4E2D\u7684\u76F8\u5BF9\u4F4D\u7F6E\u3002\u8BF7\u5728\u539F\u6570\u7EC4 `nums` \u4E0A\u8FDB\u884C\u64CD\u4F5C\u3002\n#### \u8F93\u5165\u8F93\u51FA\u683C\u5F0F\n**\u8F93\u5165\u683C\u5F0F**\n\u7B2C\u4E00\u884C\u6709\u4E00\u4E2A\u6574\u6570 `numsSize`\uFF0C\u8868\u793A\u6570\u7EC4 `nums` \u7684\u5927\u5C0F\uFF1B\n\u7B2C\u4E8C\u884C\u6709 `numsSize` \u4E2A\u6574\u6570\uFF0C\u8868\u793A\u6570\u7EC4 `nums` \u7684\u6240\u6709\u5143\u7D20\uFF0C\u6BCF\u4E2A\u6574\u6570\u7528\u4E00\u4E2A\u7A7A\u683C\u9694\u5F00\u3002\n**\u8F93\u51FA\u683C\u5F0F**\n\u4E00\u884C\u8F93\u51FA\u6570\u7EC4 `nums` \u7684\u6240\u6709\u5143\u7D20\uFF0C\u6709 `numsSize` \u4E2A\u6574\u6570\uFF0C\u6BCF\u4E2A\u6574\u6570\u7528\u4E00\u4E2A\u7A7A\u683C\u9694\u5F00\u3002\n#### \u8F93\u5165\u8F93\u51FA\u6837\u4F8B1\n**\u8F93\u5165**\n`4`\n`0 1 2 3`\n**\u8F93\u51FA**\n`1 2 3 0`\n**\u89E3\u91CA\uFF08\u53EF\u9009\uFF09**\nXXXXX\n#### \u8F93\u5165\u8F93\u51FA\u6837\u4F8B2\n**\u8F93\u5165**\n`5`\n`1 1 0 1 0`\n**\u8F93\u51FA**\n`1 1 1 0 0`\n**\u89E3\u91CA\uFF08\u53EF\u9009\uFF09**\nXXXXX\n#### \u8BF4\u660E\u63D0\u793A\n-`1\u2264n\u2264100`";function di(hr,Ir){switch(Ir.type){case 0:return dr(dr({},hr),Ir.payload);case 1:return vr(dr({},hr),{loading:Ir.payload});case 2:return vr(dr({},hr),{status:Ir.payload});default:throw new Error}}var Yr=()=>{var hr,Ir,Rr;const yi=(0,Ae.useLocation)(),{id:dn}=(0,Ae.useParams)(),[mn]=ve.default.useForm(),[un,Ut]=(0,rt.useState)(),[xn,jn]=(0,rt.useState)(!1),[en,Gt]=(0,rt.useState)([]),[Cn,Gn]=(0,rt.useState)([]),[ir,Pn]=(0,rt.useState)([]),[Yt,zn]=(0,rt.useState)([]),[Qn,or]=(0,rt.useState)([]),[rn,Mn]=(0,rt.useState)("C"),[an,gn]=(0,rt.useReducer)(di,xi),{loading:En,data:pn,user:On,status:Dn}=an,$n=pn==null?void 0:pn.hack_sets,Fn=(hr=pn==null?void 0:pn.hack)==null?void 0:hr.test_set_average,[Tn,Yn]=(0,rt.useState)(!1),Lr=(0,rt.useRef)([]),[qr,Br]=(0,rt.useState)(!1),[tn,lr]=(0,rt.useState)(!1),br=(0,rt.useRef)(!0),[ar,Qr]=(0,rt.useState)({});(0,rt.useEffect)(()=>((0,Ae.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),(0,Ae.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),()=>{(0,Ae.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),(0,Ae.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}),[]),(0,rt.useEffect)(()=>{setTimeout(()=>{document.title="\u5728\u7EBF\u5237\u9898"},400)});const Xr=()=>Sr(void 0,null,function*(){const Kr=yield(0,ze.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice"}}),Nr=yield(0,ze.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice_source"}});Gn(Kr.tag_disciplines||[]),Pn(Nr.tag_disciplines||[])});var hi=[{language:"C",code:""},{language:"C++",code:""},{language:"Java",code:""},{language:"Python",code:""}];const Gr=(0,rt.useCallback)(()=>Sr(void 0,null,function*(){if(gn({type:1,payload:!0}),dn){const Kr=yield ht(dn),{user:Nr,language:Wi,practice_sets:Ur,practice_codes:jr,description:wi,difficulty:Vi,name:bi,open_or_not:vo,time_limit:Ar,test_set_average:Dr,test_set_score:zr,status:Zn,tag_discipline_ids:to,source_discipline_ids:yo,item_banks_group_id:ta,is_file:wo=!1,hide_actual_output:Zo,review_privilege:ua,review_description:Pa,submit_rule:Da}=Kr;Qr({review_privilege:ua,status:Zn,review_description:Pa,name:bi}),Yn(Zo);const es=wo?[{input:"",output:"",score:100,position:1}]:Ur;wo?(Gt(Ur),mn.setFieldsValue({hack_sets:es})):Gt([]),gn({type:0,payload:{loading:!0,user:Nr,status:Zn,data:{hack:{difficulty:Vi,name:bi,description:wi,open_or_not:vo,time_limit:Ar,test_set_average:Dr,test_set_score:zr,tag_discipline_ids:to,source_discipline_ids:yo,is_file:wo,submit_rule:Da},hack_sets:es}}}),Ut({hack:{difficulty:Vi,name:bi,description:wi,open_or_not:vo,time_limit:Ar,test_set_average:Dr,test_set_score:zr,tag_discipline_ids:to,source_discipline_ids:yo,is_file:wo}});const Fa=jr==null?void 0:jr.map(_s=>vr(dr({},_s),{code:Oe.Base64.decode(_s==null?void 0:_s.code)}));or(Fa),Lr.current=Fa}else{const{user:Kr}=yield st();gn({type:0,payload:{loading:!0,status:0,user:Kr,data:{hack:{difficulty:"",time_limit:3,description:ot,test_set_score:!0,test_set_average:!0,open_or_not:!0,name:"",is_file:!1,submit_rule:1},hack_sets:[{input:"",output:"",score:100,position:1}]}}}),Ut({hack:{difficulty:"",time_limit:3,description:"",test_set_average:!0,open_or_not:!0,name:"",is_file:!1}}),or(hi),Lr.current=hi}gn({type:1,payload:!1})}),[dn]);(0,rt.useEffect)(()=>{try{Gr(),Xr()}catch(Kr){console.log(Kr,"----")}},[]);function Tr(Kr,Nr){return Sr(this,null,function*(){var Wi;const{hack_sets:Ur,hack:jr}=dr({},Kr);jr.hide_actual_output=Tn;let wi=[],Vi=[],bi=0;const vo=jr!=null&&jr.is_file?en.map((zr,Zn)=>vr(dr({},zr),{position:Zn+1})):Ur.map(zr=>vr(dr({},zr),{is_file:!1}));for(let zr of vo)bi+=zr.score,zr.id&&zr.id>=0?wi.push(zr):Vi.push(zr);if(!(vo!=null&&vo.length)){ce.ZP.error("\u6D4B\u8BD5\u96C6\u4E0D\u80FD\u4E3A\u7A7A");return}if(bi!==100&&!jr.test_set_score){ce.ZP.error("\u6D4B\u8BD5\u96C6\u7684\u8BC4\u5206\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E100");return}if(vo!=null&&vo.some(zr=>!zr.output)){ce.ZP.error("\u6D4B\u8BD5\u96C6\u8F93\u51FA\u4E0D\u80FD\u4E3A\u7A7A");return}br.current?Br(!0):lr(!0);let Ar;const Dr=Qn==null?void 0:Qn.map(zr=>vr(dr({},zr),{code:Oe.Base64.encode(zr==null?void 0:zr.code)}));if(dn?Ar=yield ft(dn,{practice:jr,practice_codes:Dr,practice_sets:Vi,update_practice_sets:wi}):Ar=yield Xe({practice:jr,practice_codes:Dr,practice_sets:vo,publish:!br.current}),Br(!1),lr(!1),(Ar==null?void 0:Ar.status)===0){if((Wi=Ar==null?void 0:Ar.similar_practice)!=null&&Wi.length){jn(!0),zn(Ar==null?void 0:Ar.similar_practice);return}if(dn){if(ce.ZP.success("\u4FDD\u5B58\u6210\u529F"),!br.current){const zr=yield(0,ze.ZP)(`/api/practices/${dn}/start`,{method:"get"});(zr==null?void 0:zr.status)===0&&Ae.history.push(`/problems/${zr==null?void 0:zr.identifier}/oj/${dn}`)}}else ce.ZP.success("\u65B0\u5EFA\u6210\u529F"),Ae.history.replace(`/problems/${Ar==null?void 0:Ar.identifier}/ojedit`)}})}function Si(){Ae.history.replace("/problems")}const Ln=Kr=>{const Nr=Math.floor(100/Kr.length),Wi=Nr+100%Kr.length;Kr=Kr.map((Ur,jr)=>jr===Kr.length-1?vr(dr({},Ur),{score:Wi}):vr(dr({},Ur),{score:Nr})),Gt(Kr)};function Ki(Kr){Kr.target.value||Ln(en),gn({type:0,payload:{data:vr(dr({},pn),{hack:vr(dr({},pn.hack),{test_set_score:Kr.target.value})})}})}function Nn(Kr){gn({type:0,payload:{data:vr(dr({},pn),{hack:vr(dr({},pn.hack),{is_file:Kr.target.value})})}})}function gi(Kr){Yn(Kr.target.checked)}function xo(Kr){const Nr=Kr.target.value;Nr&&Ln(en),gn({type:0,payload:{data:vr(dr({},pn),{hack:vr(dr({},pn.hack),{test_set_average:Nr})})}})}function Mi(){let Kr=mn.getFieldValue("hack_sets");const Nr=Kr.length+1,Wi=Math.floor(100/Nr),Ur=100%Nr;Kr.map((jr,wi)=>(Fn&&(jr.score=Wi),jr.position=wi+1,jr)),Kr.push({input:"",output:"",position:Nr,score:Fn?Wi+Ur:0}),mn.setFieldsValue({hack_sets:Kr}),gn({type:0,payload:{data:vr(dr({},pn),{hack_sets:Kr})}})}(0,rt.useEffect)(()=>{if(Fn){const Kr=$n==null?void 0:$n.length,Nr=Math.floor(100/Kr),Wi=100%Kr;$n==null||$n.map((Ur,jr)=>(Ur.score=Nr,Ur.position=jr+1,jr===Kr-1&&(Ur.score=Nr+Wi),Ur)),gn({type:0,payload:{data:vr(dr({},pn),{hack_sets:$n})}}),mn.setFieldsValue({hack_sets:$n})}},[Fn]);function Go(Kr){let Nr=mn.getFieldValue("hack_sets");const Wi=(Nr==null?void 0:Nr.length)-1,Ur=Math.ceil(100/Wi),jr=100%Wi;Nr.splice(Kr,1),Nr==null||Nr.map((wi,Vi)=>(Fn&&(wi.score=Ur,Vi===Wi-1&&(wi.score=Ur+jr)),wi.position=Vi+1,wi)),gn({type:0,payload:{data:vr(dr({},pn),{hack_sets:Nr})}}),mn.setFieldsValue({hack_sets:Nr})}function po(Kr){Mn(Kr)}const Wr=Kr=>{var Nr;const Wi=(Nr=Lr.current)==null?void 0:Nr.findIndex(Ur=>Ur.language===rn);Lr.current[Wi].code=Kr,or(Lr.current)},Hr=Kr=>{Ut(dr({},mn.getFieldsValue()))},Li=Kr=>Sr(void 0,null,function*(){const Nr=yield(0,ze.ZP)(`/api/practices/${Kr}/start`,{method:"get"});(Nr==null?void 0:Nr.status)===0&&(0,_t.xg)(`/problems/${Nr==null?void 0:Nr.identifier}/oj/${Kr}`)}),_i=()=>Sr(void 0,null,function*(){const Kr=yield ht(dn),{name:Nr,status:Wi,review_privilege:Ur,review_description:jr}=Kr;Qr({review_privilege:Ur,status:Wi,review_description:jr,name:Nr})}),ur=()=>{let Kr="";Re.default.confirm({icon:null,width:700,className:"custom-modal-divider",centered:!0,title:"\u4E0D\u901A\u8FC7\u539F\u56E0",content:Nt.createElement("div",{className:"mt20"},Nt.createElement(Ye.Z,{className:St.MdEditor,defaultValue:Kr,onChange:Nr=>{Kr=Nr}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>Sr(void 0,null,function*(){if(!Kr)return ce.ZP.warning("\u4E0D\u901A\u8FC7\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A"),Promise.reject();const Nr=yield(0,ze.ZP)(`/api/practices/${dn}/review.json`,{method:"post",body:{op:"fail",description:Kr}});(Nr==null?void 0:Nr.status)===0&&(ce.ZP.success("\u63D0\u4EA4\u6210\u529F"),_i())})})},It=()=>Sr(void 0,null,function*(){Re.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u63D0\u793A",content:`\u786E\u8BA4\u5C06\u9898\u76EE\u300A${ar==null?void 0:ar.name}\u300B\u7684\u5BA1\u6838\u901A\u8FC7\u5417\uFF1F`,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>Sr(void 0,null,function*(){const Kr=yield(0,ze.ZP)(`/api/practices/${dn}/review.json`,{method:"post",body:{op:"pass"}});(Kr==null?void 0:Kr.status)===0&&(ce.ZP.success("\u63D0\u4EA4\u6210\u529F"),_i())})})}),Ei=()=>{const Kr=Re.default.confirm({icon:null,width:700,className:`${St.cusModal} custom-modal-divider`,centered:!0,title:Nt.createElement(be.Z,null,Nt.createElement(Ce.Z,{flex:"1"},"\u4E0D\u901A\u8FC7\u539F\u56E0"),Nt.createElement(Ce.Z,null,Nt.createElement("span",{className:"iconfont icon-guanbi7 font12 current c-grey-c",onClick:()=>Kr.destroy()}))),content:Nt.createElement("div",null,Nt.createElement(Qt.Z,{className:"mt20",value:(ar==null?void 0:ar.review_description)||""}))})};return Nt.createElement(ye.Z,{spinning:En,size:"large",className:St["oj-custom-large-spin"]},pn?Nt.createElement(rt.Fragment,null,Nt.createElement("header",{className:St.header},Nt.createElement("div",null,Nt.createElement("img",{src:`${Ve.Z.IMG_SERVER}/images/${On==null?void 0:On.image_url}`,alt:"user",width:30}),Nt.createElement("span",null,On==null?void 0:On.name)),Nt.createElement("h2",null," ",(Ir=pn==null?void 0:pn.hack)==null?void 0:Ir.name," "),dn?Nt.createElement("a",{className:St.btn_back,onClick:Si}," ",Nt.createElement(Fe.Z,null),"\u9000\u51FA"):null),Nt.createElement(ve.default,{form:mn,initialValues:pn,layout:"vertical",className:St["oj-form-container"],onValuesChange:Hr,onFinish:Tr},Nt.createElement(it.Z,{hideResize:!0,className:St["oj-problems"],leftChild:Nt.createElement(Ri,{formValue:un,onRemoveTestCase:Go,onAddTestCase:Mi,hack:pn.hack,onChangeScore:Ki,onChangehide:gi,onChangeAverage:xo,onChangeFile:Nn,uploadData:en,setUploadData:Gt,handleUploadRatio:Ln,ischecked:Tn,pointData:Cn,sourceData:ir,getPointData:Xr}),rightChild:Nt.createElement(Qe,{value:(Rr=Qn==null?void 0:Qn.find(Kr=>Kr.language===rn))==null?void 0:Rr.code,onChange:Wr,onLanguage:po,languageItems:Qn,language:rn})}),Nt.createElement("div",{className:St.footer},!!dn&&Nt.createElement("div",{className:St.result},Nt.createElement("span",null,"\u5BA1\u6838\u7ED3\u679C:"),ar!=null&&ar.review_privilege?Nt.createElement(Nt.Fragment,null,Nt.createElement("div",{onClick:It,className:St.pass},"\u901A\u8FC7"),Nt.createElement("div",{onClick:ur,className:St.noPass},"\u4E0D\u901A\u8FC7")):Nt.createElement(Nt.Fragment,null,(ar==null?void 0:ar.status)===0&&Nt.createElement("div",{className:St.passText},Nt.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u53D1\u5E03"),(ar==null?void 0:ar.status)===1&&Nt.createElement("div",{className:St.passText},Nt.createElement("i",{className:"iconfont icon-tongguo"}),"\u5DF2\u516C\u5F00"),(ar==null?void 0:ar.status)===2&&Nt.createElement("div",{className:St.passText},Nt.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u5BA1\u6279"),(ar==null?void 0:ar.status)===3&&Nt.createElement("div",{className:St.passText},Nt.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u4E2D"),(ar==null?void 0:ar.status)===4&&Nt.createElement("div",{className:St.passText},Nt.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u5B8C\u6210\u5F85\u516C\u5F00"),(ar==null?void 0:ar.status)===5&&Nt.createElement("div",{className:St.noPassText},Nt.createElement("i",{className:"iconfont icon-weitongguo1"}),"\u5BA1\u6838\u4E0D\u901A\u8FC7",Nt.createElement("span",{onClick:Ei},"\u67E5\u770B\u539F\u56E0")))),Nt.createElement(we.ZP,{type:"primary",ghost:!0,onClick:Si},"\u9000\u51FA\u7F16\u8F91"),Nt.createElement(we.ZP,{disabled:tn,loading:qr,type:"primary",onClick:()=>{br.current=!0,mn.submit()}},"\u4FDD\u5B58 "),dn?Nt.createElement(we.ZP,{disabled:qr,loading:tn,style:{background:"#2FC25B",border:0},type:"primary",onClick:()=>{br.current=!1,mn.submit()}},"\u7ACB\u5373\u4F53\u9A8C"):Nt.createElement(we.ZP,{disabled:qr,loading:tn,type:"primary",onClick:()=>{br.current=!1,mn.submit()}},"\u4FDD\u5B58\u5E76\u53D1\u5E03\u5BA1\u6838")))):null,Nt.createElement(Re.default,{centered:!0,destroyOnClose:!0,footer:null,open:xn,onCancel:()=>jn(!1),title:"\u76F8\u4F3C\u6027\u68C0\u6D4B",width:"600px"},Nt.createElement("div",null,Nt.createElement("p",{className:"font14"},"\u7ECF\u7CFB\u7EDF\u68C0\u6D4B\u53D1\u73B0\uFF0C\u672C\u9898\u76EE\u4E0E\u7CFB\u7EDF\u4E2D\u5DF2\u521B\u5EFA\u7684\u9898\u76EE\u9AD8\u5EA6\u96F7\u540C\uFF0C\u8BF7\u8C03\u6574\u9898\u76EE\u540E\u518D\u8FDB\u884C\u4FDD\u5B58"),Nt.createElement(me.default,{dataSource:Yt,bordered:!1,scroll:Yt.length>7?{y:300}:{},columns:[{title:"\u76F8\u4F3C\u9898\u9898\u76EE",dataIndex:"name",ellipsis:!0,render:(Kr,Nr)=>Nt.createElement("span",{onClick:()=>Li(Nr==null?void 0:Nr.identifier),style:{textDecorationLine:"underline"},className:"current c-light-primary"},Kr)},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"create_time",width:170,render:Kr=>{var Nr;return(Nr=Tt()(Kr))==null?void 0:Nr.format("YYYY-MM-DD HH:mm")}}],pagination:!1}))))};function Ri({ischecked:hr,formValue:Ir,hack:Rr,onChangeAverage:yi,onChangeScore:dn,onChangehide:mn,onChangeFile:un,onAddTestCase:Ut,onRemoveTestCase:xn,uploadData:jn,setUploadData:en,handleUploadRatio:Gt,pointData:Cn,sourceData:Gn,getPointData:ir}){var Pn,Yt;const{test_set_average:zn,test_set_score:Qn}=Rr,[or,rn]=(0,rt.useState)(!1),[Mn,an]=(0,rt.useState)(!1),gn=(Fn,Tn)=>{const Yn=[...jn];Yn.splice(Tn,1),zn?Gt(Yn):en(Yn)},En=(Fn,Tn)=>{console.log(Fn,Tn);const Yn=jn.map((Lr,qr)=>qr===Tn?vr(dr({},Lr),{score:Fn.target.value?Number(Fn.target.value):0}):Lr);en(Yn)},pn=Fn=>{const Tn=jn.concat(Fn);Rr.test_set_average?Gt(Tn):en(Tn)};function On(Fn){Fn.stopPropagation()}function Dn(){if((0,kt.Ny)()){an("practice");return}let Fn="";Re.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u77E5\u8BC6\u70B9",content:Nt.createElement("div",null,Nt.createElement(ie.default,{placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:Tn=>{Fn=Tn.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>Sr(this,null,function*(){const Tn=yield(0,ze.ZP)("/api/tag_disciplines.json",{method:"post",body:{target:"practice",name:Fn}});(Tn==null?void 0:Tn.status)===0&&ir()})})}function $n(){if((0,kt.Ny)()){an("practice_source");return}let Fn="";Re.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u6765\u6E90",content:Nt.createElement("div",null,Nt.createElement(ie.default,{placeholder:"\u8BF7\u8F93\u5165\u6765\u6E90\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:Tn=>{Fn=Tn.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>Sr(this,null,function*(){const Tn=yield(0,ze.ZP)("/api/tag_disciplines.json",{method:"post",body:{target:"practice_source",name:Fn}});(Tn==null?void 0:Tn.status)===0&&ir()})})}return Nt.createElement("div",{className:St["oj-left-panel"]},Nt.createElement("div",{className:St["oj-form-info"]},Nt.createElement(ve.default.Item,{label:"\u9898\u76EE\u540D\u79F0",name:["hack","name"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0"}],className:St.inputOne},Nt.createElement(ie.default,{bordered:!1,maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0",suffix:Nt.createElement("span",null,((Yt=(Pn=Ir==null?void 0:Ir.hack)==null?void 0:Pn.name)==null?void 0:Yt.length)||0,"/",Nt.createElement("span",{className:"c-grey-999"},"60"))})),Nt.createElement(ve.default.Item,{name:["hack","description"],valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},Nt.createElement(Ye.Z,{placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u63CF\u8FF0\u2026",miniToolbar:!0,id:"moop_cases_content",noStorage:!0,height:200})),Nt.createElement("div",{className:St.row},Nt.createElement("div",{className:St.a},Nt.createElement(ve.default.Item,{label:"\u96BE\u6613\u5EA6",name:["hack","difficulty"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u6613\u5EA6"}]},Nt.createElement(xe.default,null,Pe(pe.difficulty)))),Nt.createElement("div",{className:St.b},Nt.createElement(ve.default.Item,{label:"\u9898\u76EE\u6765\u6E90",name:["hack","source_discipline_ids"]},Nt.createElement(xe.default,{placeholder:"\u9009\u62E9\u9898\u76EE\u6765\u6E90",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:Fn=>Fn.parentNode},Gn.map(Fn=>Nt.createElement(xe.default.Option,{key:Fn.id,value:Fn.id},Fn.name)))),Nt.createElement(we.ZP,{style:{padding:"0 18px"},type:"primary",ghost:!0,onClick:()=>$n()},(0,kt.Ny)()?"\u6765\u6E90\u7BA1\u7406":"\u65B0\u5EFA\u6765\u6E90"))),Nt.createElement("div",{className:St.row},Nt.createElement("div",{className:St.b,style:{width:"100%",marginLeft:0}},Nt.createElement(ve.default.Item,{label:"\u77E5\u8BC6\u70B9",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9"}],name:["hack","tag_discipline_ids"]},Nt.createElement(xe.default,{placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:Fn=>Fn.parentNode},Cn.map(Fn=>Nt.createElement(xe.default.Option,{key:Fn.id,value:Fn.id},Fn.name)))),Nt.createElement(we.ZP,{type:"primary",ghost:!0,onClick:()=>Dn()},(0,kt.Ny)()?"\u77E5\u8BC6\u70B9\u7BA1\u7406":"\u65B0\u5EFA\u77E5\u8BC6\u70B9"))),Nt.createElement("div",{className:St.field},Nt.createElement(ve.default.Item,{label:"\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236",name:["hack","time_limit"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236"},{type:"number",min:1,message:"\u6700\u5C0F\u9650\u5236\u65F6\u95F4\u662F1\u79D2"}],className:St.inputTwo,extra:Nt.createElement("span",{style:{position:"absolute",left:200,top:11,color:"#333"}},"\u79D2",Nt.createElement("span",{className:"ml5 c-grey-999"},"(\u4EE3\u7801\u6267\u884C\u6240\u5141\u8BB8\u7684\u6700\u5927\u65F6\u957F)"))},Nt.createElement(fe.Z,{style:{width:185},min:1}))),Nt.createElement("div",{className:"tst-case-info"},Nt.createElement("h3",{className:"flex-container",style:{justifyContent:"space-between"}}," ","\u6D4B\u8BD5\u7528\u4F8B\u4E0E\u7CFB\u7EDF\u8BC4\u5206\u89C4\u5219",!Rr.is_file&&Nt.createElement(we.ZP,{style:{height:40},type:"primary",ghost:!0,onClick:Ut},"\u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B")),Nt.createElement(ve.default.Item,{name:["hack","test_set_score"]},Nt.createElement(z.ZP.Group,{onChange:dn},Nt.createElement(z.ZP,{value:!0},"\u901A\u8FC7\u5168\u90E8\u6D4B\u8BD5\u96C6",Nt.createElement("span",{className:"tip"}," ","\uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u4EC5\u5F53\u6240\u6709\u6D4B\u8BD5\u96C6\u90FD\u6B63\u786E\u65F6\uFF0C\u624D\u83B7\u5F97\u4E00\u6B21\u6027\u5956\u52B1\uFF09")),Nt.createElement(z.ZP,{value:!1},"\u901A\u8FC7\u90E8\u5206\u6D4B\u8BD5\u96C6",Nt.createElement("span",{className:"tip"}," ","\uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u901A\u8FC7\u6D4B\u8BD5\u96C6\u5373\u53EF\u83B7\u5F97\u5BF9\u5E94\u5956\u52B1\uFF09")))),Nt.createElement(ee.default,{style:{marginBottom:"5px"},checked:hr,onChange:mn},"\u9690\u85CF\u5B9E\u9645\u8F93\u51FA \uFF08\u9009\u4E2D\uFF0C\u5219\u5728\u5B66\u751F\u505A\u9898\u8FC7\u7A0B\u4E2D\u65E0\u6CD5\u770B\u5230\u5B9E\u9645\u8F93\u51FA\u7ED3\u679C\uFF0C\u4EC5\u5C55\u793A\u662F\u5426\u8BC4\u6D4B\u662F\u5426\u901A\u8FC7\uFF09"),Nt.createElement(ve.default.Item,{className:St.testJi,name:["hack","is_file"],label:"\u7528\u4F8B\u7C7B\u578B:"},Nt.createElement(z.ZP.Group,{onChange:un},Nt.createElement(ae.Z,{direction:"horizontal"},Nt.createElement(z.ZP,{value:!1},"\u6587\u672C"),Nt.createElement(z.ZP,{value:!0},"\u6587\u4EF6")))),Nt.createElement(ve.default.Item,{label:"\u8BC4\u6D4B\u65F6\u7A7A\u683C\u5904\u7406",name:["hack","submit_rule"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BC4\u6D4B\u65F6\u7A7A\u683C\u5904\u7406"}]},Nt.createElement(z.ZP.Group,null,Nt.createElement(z.ZP,{value:0},"\u4E0D\u5FFD\u7565\u7A7A\u683C"),Nt.createElement(z.ZP,{value:1},"\u5FFD\u7565\u9996\u5C3E\u7A7A\u683C"),Nt.createElement(z.ZP,{value:2},"\u5FFD\u7565\u6240\u6709\u7A7A\u683C"))),!Rr.test_set_score&&Nt.createElement(ve.default.Item,{name:["hack","test_set_average"],label:"\u7CFB\u7EDF\u8BC4\u5206\u5360\u6BD4"},Nt.createElement(z.ZP.Group,{onChange:yi},Nt.createElement(z.ZP,{value:!0},"\u5747\u5206\u6BD4\u4F8B"),Nt.createElement(z.ZP,{value:!1},"\u81EA\u5B9A\u4E49\u6BD4\u4F8B"))),Rr.is_file&&Nt.createElement("div",{className:St.upBtn},Nt.createElement(we.ZP,{ghost:!0,type:"primary",className:"mb20",onClick:()=>rn(!0)},"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"),Nt.createElement(dt.Y2,{disabled:Rr==null?void 0:Rr.test_set_average,inputChange:En,showScore:!Rr.test_set_score,data:jn,onRemove:gn})),!Rr.is_file&&Nt.createElement(ve.default.List,{name:"hack_sets"},(Fn,{})=>Nt.createElement(je.default,{accordion:!0},Fn.map((Tn,Yn)=>Nt.createElement(Er,{key:`${Tn.key}--${Yn}`,header:Nt.createElement("a",{className:St["test-case-name"]},Nt.createElement("span",null,"\u6D4B\u8BD5\u7528\u4F8B",Yn+1),Qn?null:Nt.createElement(Nt.Fragment,null,Nt.createElement(ve.default.Item,{name:[Tn.name,"score"],fieldKey:[Tn.fieldKey,"score"],rules:[{required:!0,message:`\u8BF7\u8F93\u5165\u6D4B\u8BD5\u96C6${Yn+1}\u8BC4\u5206`}]},Nt.createElement(fe.Z,{onClick:On,min:0,max:100,disabled:zn})),Nt.createElement("span",null,"%"))),extra:Yn>0?Nt.createElement("div",{onClick:On},Nt.createElement(re.Z,{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u5B9A\u5220\u9664\u6D4B\u8BD5\u96C6\b"+(Yn+1),onConfirm:()=>{xn(Yn)}},Nt.createElement(_e.Z,{className:St["btn-remove-case"]}))):null},Nt.createElement(ve.default.Item,{label:"\u8F93\u5165",name:[Tn.name,"input"],fieldKey:[Tn.fieldKey,"input"]},Nt.createElement(Fr,null)),Nt.createElement(ve.default.Item,{label:"\u8F93\u51FA",name:[Tn.name,"output"],fieldKey:[Tn.fieldKey,"output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},Nt.createElement(Fr,null)))))))),Nt.createElement(dt.ZP,{rootIdentifier:null,visible:or,onClose:()=>rn(!1),onOK:pn}),Nt.createElement(Le,{visible:Mn,onCancel:()=>{an(!1),ir()},onOK:()=>{an(!1),ir()}}))}},31604:function(bn,ln,$e){"use strict";$e.d(ln,{Y2:function(){return ht},ZP:function(){return ft}});var rt=$e(59301),St=$e(24645),ie=$e(8591),Re=$e(43418),je=$e(95237),ve=$e(5112),ce=$e(3113),be=$e(24905),Ce=$e(6848),ye=$e(92832),we={wrap:"wrap___MkYbQ",colorBlue:"colorBlue___onjbP",repeatedName:"repeatedName___nbqnE",text:"text___xvutp",greyText:"greyText___dihvZ",noData:"noData___LxOJA",dragger:"dragger___y7F4A",uploadText:"uploadText___Et3KS",btnS:"btnS___k1e6j",testCaseRadio:"testCaseRadio___q1wXT",head:"head___s4Eix",operation:"operation___JCAVh",headProgram:"headProgram___uWA_M",listWrapper:"listWrapper___xW3b4",list:"list___dCbd6",del:"del___abNho",info:"info___J1Wmf"},me="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATEAAADICAYAAACAj9YNAAAAAXNSR0IArs4c6QAAD59JREFUeF7tnet527gShsFUZFeQpJN1GkncyG46iVJBVFG4D6mLKYmSMLgQM4NXf855NrgMvm/8egBC9BD4oIBhBV7++fPlHP6n8PH/p/84Dp8XS7v8txB2N8sext/h7+G/73++3v67YZ08hz54Xhxr86fAy7c/P+ZVHQB1DaYaCz7AbBzfgVsNefPHBGL5GjJCRQUW0PpecRrp0DugJpWsXnsgVk9bRk5QQCm0nq1khhpb0Gcy1fl3IFZHV0YVKDCfa03nWeOgqdoSrODc9Lz1BGgp8qX1AWJputGrgAJz1bXd2VaBiEVDUJ2J5EpvDMTStaNnogJHeFmvuiSrB2gStYRtgZhQMJqnKWD0rCttsfd7AbPSioYQgFgFURnyQwHnW8ZUq4FZqnIr/YBYQTEZ6lKBDreNshQYxvf9v6+He298khUAYsnS0fGeAsBLmBvj+JWnmULNFs2BWLp29LxSYL4qMczXJLa4Se9Nf7aYiY4CsUTh6MbWsUoOsMUUywrExJLRYakAW8cq+UBVJpAViAnEoinV16Y5QFUWJTcQi5KJRtcKUIFtlBOA7KnQQOypRDS42D5yeN8iIdhePlAdiLVISaNzUn01No6rGKsGALHGeWllegCmxCm2lzdGADEluak5DACmzB1AdmEIEFOWn9rCAWDaHDnGA8jOxgAxpTmqIayXt/0vbt9rcOJODIBsFgaIKc7RlqFRgbVUXzA3IANignTppikAM2Z15yCjEjOWr7XDBWC1Fa40fscgA2KVcsrisADMomuLmDsFGRAznrelwj++Rmc6yOdjWYEOL8QCMcsJWyh2AFZISCXD7P976ernuqvFKskxVWEAMFV2lAmms20lECuTNmZH4S6YWeseB94RyICY0xyOWRYH+TEqGW7TCciAmOEczQmdbWSOenb69nA+BsTs5GPRSNlGFpVT72AdVGNATG/6VYuMbWQ1aXUO7BxkQExn2lWN6uVtP1adgMHVKeB5WwnE1KVb3YDYRtbVV+3ojqsxIKY268oHxmF+eU0tjei1GgNilrIwM1a2kZkCWu/utBoDYtYTMzJ+tpGRQnlv5hBkQMx70h7XRxXWidHPl7nb//fy9XkzOy2AmB2vkiPlSkWydD47OqvGgJjPNL1YFVVYByZLlgjEJGrRtrUCPJFs7YDS+R2BjEpMSY7NsDl+9j9fd6XC4kC/lJLOxgFizgzdYDnzudTpMw6fj//3DK4HIRyANoy/w9+wkwCOKmwDYy1P4QRkVGIVk/AMrnH4XniaXQzUqMIKq+5tOCDmzdH89cyVz6fwJRwqrZgqK3/SEFaBRhVWQlr/Y3i4xU8lVihPlVxj2IVxfJ+2nFRhhYz1PoyDagyIZSapEnhdr2I6R9uqEsxUkO5NFQBiTeVvOrlSeDXVhMltKmB9S0klJsw74CUUjOb6FTBejQExQYoBMIFYNLWkgOnvUwKxyFTjoDxSKJqZVMDylhKIPUk5riqY/JkkaKkChreUQOyB2WwfpT8JtDerABAza93dwAGYP09Z0WMFrG4pqcRWfGULyY97jwoAMSeuAzAnRrIMuQJGt5RUYldW8xRSnvv0cKIAELNvJACz7yEryFLA5H0xKrGj5xzkZyU/nZ0oYPFcDIiFEDgHc/ITyDKyFQBi2RK2GYBtZBvdmVWhAuP4VfL2YA0r6L4SYxupIQ2JQY0CBg/3gdjbflSTQASCAq0VAGKtHZDNTxUm04vWHSgAxOyYzGG+Ha+IdFMFzF2z6HY7yWH+pj8YTGZHASBmwSuqMAsuEWMjBYBYI+FF0wIxkVw07kwBa3fFutxOspXs7KeS5YoUAGIiudo0fuFaRRvhmdWEAkBMuU1sJZUbRHjNFQBizS14HABbSeUGEV5zBYBYcwueQowb+so9Iry2CgCxtvo/nJ2tpGJzCE2NAkBMjRW3gQAxxeYQmhoFgJgaK1Yg9u3PjzAO3xWHSGgo0FoBLru2duDR/HzhW7M7xKZEASCmxIjVMHgyqdkdYlOiABBTYgQQ02wEsWlWAIhpdodKTLM7xKZCAd4npsKGu0HwdSPd/hCdAgV4x35bE+YrFNPnUzj87/IzDp9DWPnvbUNmdhTQpQAQ286P+Unj9DnAafrcgmu7cJgJBVwoYO2O2CS6mVfxXEELYLn4kWERShXYhXF8t/Kn21RDbAEuLqgqzXbCcq+AeqCpgxjgcv9DwQLtKqASaGogxm16u5lN5B0qoOgqRnOIAa8OfwBYshcFVFRmzSAGvLzkMetAgdAUZptD7Agv7myR+SjgT4EmMNsUYlRf/rKWFaHAigKbwmwTiAEvEh0FOlRgo8P/6hADYB0mL0tGgZMCG4CsGsSOr4KeLqlyu56URoG+Fai6vawCMaqvvjOW1aPAqgKVqrLiEANgJDAKoMBdBSqArCjEABjJiwIoEKFA0bfHFoMYAIuwjiYogAInBYqBrAjEeO0zmYkCKJCgQBGQZUMMgCVYRxcUQIFiFVkWxNhCkokogALZCmQe9idDDIBlW8cAKIACJwUyQJYEMQBG7qEAChRXIBFkYogdb+L/Kr4ABkQBFECBBJDJIfa2H1EaBVAABaopIASZCGI8iaxmGwOjAAosFJD86bhoiHEORo6hAApspoCgGouCGOdgm1nHRCiAAsInlnEQe9tPB/m8Uof0kiswjO/hb9jNHYeBVzPJFey6R8y28inE2EZ2nUM5i1/9Sgn5lCNph30jtpUPIcY2ssOkKbTkR79BAVkhkXsZ5gnIHkOMbWQvaVJ2neP4df/z9bCFvPMBZGUl9z7ao1+KdyFGFeY9LSqtLwJgp5m5slPJA4/DPqjG7kOMKsxjKtRdU8T5xXUAL1yeruuJo9HvVWOrEKMKc+T8VktJANgUGrm2lUEO5rmTY+sQowpz4PiGS0gE2Hlb+c+fL2EY+D7uhpaZnCoWYvxmNGlvu6AzAXYG2bc/P8I43yPjgwL3FVjJt5tKjMNWMkigQJHXCwMygeK9N42EGG+p6D1R4tZfFGCALE50WoVwfcB/UYmxlSRFohUQXKWIHvPYkDtkUsU6a39VjV1CjAP9zrIhcbkVAXauyMjFRHP66Lasxq4hxlayjxxIX+UGAANk6fZ003ORh2eIsZXsxv70hRZ6EikJgMuwErU6arvIxQ+IUb53lAEJS20AsClKfrkmeNVHl/ODpSXE2Er2Yb58lY0AxhNLuVU99Tidi80Q47ddT9aL11rlKoU0Cp5YShXroP3xlysQ68DrjCWqABgVWYaDnrteQIzzMM9Wp65NFcAAWaqNrvvNOXqoxICYa6eTFrfhVQppfGwtpYr5bT+di50gxqG+X5/lK1MMsHNFxi9eua8eewzj+8ChvkdnM9bU+EmkJHJ2EBK1nLYFYk6NTV2WIYDNxyC8hyzVaT/9ZojxHic/huasxBjAzttKQJbjuv2+M8Q4W7BvZO4KjAKMJ5a5xrvovwNiLnzMWoTKqxTSFbGjkCrmpj0Qc2Nl2kJcAIyKLM18L72oxLw4mbIOA1cppMuiIpMqZr/9BDHuiNn3Ub4ChwCjIpOngYceQMyDi9I1OAbYGWQ8sJJmhdn2QMysdYmBG38SKVk1uwyJWnbbAjG73skj7whgkzhchpWniMUeQMyiaykxdwaw87aSy7Ap2WKqD08nTdmVHKyrqxRSFXhiKVXMVnsgZsuvlGi7BhhPLFNSxlYfIGbLL2m0AGyhGBWZNH1stAdiNnxKi7KDqxRSYQCZVDH97XmLhX6P0iIEYHd146UHaSmltNcOiCl1JissAPZUPkD2VCIrDXa82dWKVbFxdnqVIlaeZTsuw6aopqzP9D6xKSTMVGZMajgATKQcl2FFculsPI7nv3bEl8B1WiSJiieRErWObTnoTxBNU5cFxH6FEL5oio1YhApwDiYU7KM5IEuWrnnHjz/Zxnv2m5uRGQBVWIaAQCxDvLZdF388l++XtbWiwOzTb6QCw3Q5BBAzavvxDPic+BzuGzXyFDbbyWQDuW6RLF3bjsecX0KMc7G2luTPDsjEGlKFiSVT0+G0+/iAGOdiaszJDGSX1X8c3/c/X/PGyAogrvMMn+kzDp/jeqy24mFWhniNu57PgT8gxrlYY09UTa/6QQHVk6pcaRPMYtdxcRjM2UAbP1TOqvTiLBdUVWbL5kEtH2RdQowt5eZmqJ0QiKm1hsDCxU7h5rE8TylJkaMCKreUVGLkZ7h6gHULMaoxsuSgABAjE1QqcH0nEoiptElFUEBMhQ0EcaXATV6u3vJmS0niUImRAyoVWLkLuQ4xtpQq/ds4KCqxjQVnuqcKrObk3e/bUY09FdR7AyDm3WFr67vzjZT7EKMas2Zx6XiBWGlFGS9Hgbv5+PDNB1RjOZqb7wvEzFvoaAEPvhf8GGJUY46yQLwUICaWjA5VFHhy8frpO6j4nloVWywMCsQsuOQ/xqd5+BRik0ZsK/1nysoKnyZPC1W4sd9C9YZzRrxeKg5ibCsbuthsaiDWTHomPioQlYNREJurMUDWW2ZFJdDWolCJba14u/liX7keDTG2le3MbDQzEGskPNNOL7scv8a+nFMGMaqxnvILiPXktqa1Cl8DJYIY20pNTlePBYhVl5gJSjxQEkMMkHWTeECsG6v1LDT2HGwZcRLEjudj/HUkPd7XiASI1VCVMe8rIDgHKwIxQOY+G4GYe4sVLTARYNMKkiuxGWL8hSRFWVA8FCBWXFIGXFVAeJB/PUYWxACZ66QEYq7tVbK4TIBlV2InGajIlCRE2TCAWFk9Ge2mhBrf9/++Hv4IcsYnuxK7Atn3EAJ/VTnDEEVdgZgiM9yFUqACO2lSDGJnmL3teWrpI+OAmA8f9a0i4xB/bTHFITafkwEyfYkjjwiIyTWjx2MFdmEc32O/ThQrZhWIzSDjK0qxHmhtB8S0OmMxroLbx5ujtZp6HA/8OSerKXK9sYFYPW37GrkiwCYhq1ViS5fYXprMWSBm0jZVQVfZPm5aiV2A7HAxlqpMVY49DAaI2fFKX6SVq6/lgjepxC5gxlmZvoRbjwiIWXFKU5wbwuu07M0hNh/6U5VpSrt7sQAxCy5pirEBwDY7E7unMzDTlIE3sQAx1fYoCq4RvJpWYtfyAzNFCfkRChBTaYuioBrDSxXETsEAM0UJGgIQU2WHkmCG8X2KpMR3HkutqMmZWEzwAC1GpaptgFhVeU0NvgvD+FsTuJbqqYXYMkiA1iThgVgT2dVMqhpc5iB2A7T5kcR852z68NaMOnkPxOroqnXUGVrhb9iV/m5j7QWbqMSeiTBXatPnU/gSxuHzSntA90zE238HYnLNWvTYXU26lusfbSZQnT4GgbUm8P/6C+VmwqlgeQAAAABJRU5ErkJggg==",xe=$e(47257),fe=$e.n(xe),z=$e(9168),ee=$e(70635),ae=$e(1012),re=$e(58130),le=$e(79646),ue=$e(59301),pe=Object.defineProperty,Ee=Object.defineProperties,Pe=Object.getOwnPropertyDescriptors,Ie=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,Oe=(Lt,et,it)=>et in Lt?pe(Lt,et,{enumerable:!0,configurable:!0,writable:!0,value:it}):Lt[et]=it,Fe=(Lt,et)=>{for(var it in et||(et={}))ke.call(et,it)&&Oe(Lt,it,et[it]);if(Ie)for(var it of Ie(et))Ae.call(et,it)&&Oe(Lt,it,et[it]);return Lt},_e=(Lt,et)=>Ee(Lt,Pe(et)),Ye=(Lt,et,it)=>new Promise((xt,Et)=>{var Mt=vt=>{try{pt(it.next(vt))}catch(jt){Et(jt)}},mt=vt=>{try{pt(it.throw(vt))}catch(jt){Et(jt)}},pt=vt=>vt.done?xt(vt.value):Promise.resolve(vt.value).then(Mt,mt);pt((it=it.apply(Lt,et)).next())});const{Dragger:ze}=St.default,Xe=Lt=>{const et=jt=>jt&&jt.substring(0,jt.lastIndexOf("."));for(var it=[...Lt],xt=0,Et=[],Mt=0;Mt<it.length;Mt++){for(var mt="",pt=0;pt<Et.length;pt++)if(et(Et[pt][0].name)==et(it[Mt].name)){xt=1,mt=pt;break}if(xt==1)Et[mt].push(it[Mt]),xt=0;else if(xt==0){let jt=new Array;jt.push(it[Mt]),Et.push(jt)}}return Et.map(jt=>{if(jt.forEach(At=>{let Kt=At.name.split(/\.(?=[^\.]+$)/);At.name=`${Kt[0]}.${Kt[1].toLowerCase()}`}),jt[0].name.includes(".in"))return jt.length===2?jt:[jt[0],{}];if(jt[0].name.includes(".out"))return jt.length===2?jt.reverse():[{},jt[0]]})},st=({onClose:Lt,onOK:et,visible:it,wrapClassName:xt,rootIdentifier:Et,multiple:Mt=!1,defaultMultipleValue:mt=!0})=>{const[pt,vt]=(0,rt.useState)([]),[jt,At]=(0,rt.useState)({}),[Kt,Ct]=(0,rt.useState)(!1),[gt,tt]=(0,rt.useState)(!0),bt=(0,rt.useRef)([]),Ke=(0,rt.useRef)(0),ut=()=>{Lt()};(0,rt.useEffect)(()=>{wt()},[]),(0,rt.useEffect)(()=>{it&&(bt.current=[],Ke.current=0,vt([]),tt(mt))},[it]);const wt=()=>Ye(void 0,null,function*(){try{const De=yield(0,ee.ZP)("/api/buckets/get_upload_token_for_big_files",{method:"get"}),Le=JSON.parse((0,z.pe)(De.data));At(Le)}catch(De){}}),yt=De=>De&&De.substring(0,De.lastIndexOf(".")),lt=De=>{var Le,Ve;const dt=yt((Le=De[0])==null?void 0:Le.name)||yt((Ve=De[1])==null?void 0:Ve.name),Ze=pt.filter(Tt=>yt(Tt.name)!==dt);bt.current=[...Ze],vt([...Ze])},Qe=De=>{if(!gt){const _t=new FormData;_t.append("file",De.file),(0,ee.ZP)("/api/attachments/get_file_content.json",{method:"post",body:_t},!0).then(kt=>{if(kt.status===0){Ke.current=Ke.current+1;const Nt=bt.current.map(Zt=>{var on;if(Zt.name===De.name){const vn=Fe({},Zt);return(on=De==null?void 0:De.name)!=null&&on.includes(".in")?vn.input=kt==null?void 0:kt.content:vn.output=kt==null?void 0:kt.content,vn}return Zt});if(bt.current=[...Nt],vt([...Nt]),Ke.current>0&&Ke.current===pt.length){Ct(!1);let Zt=Xe(Nt);Zt=Zt.filter(on=>{var vn,kn;return!!((vn=on[0])!=null&&vn.name&&((kn=on[1])!=null&&kn.name))}),Zt=Zt.map(on=>_e(Fe(Fe({},on[0]),on[1]),{is_file:!1})),et(Zt),Lt()}}else Ct(!1),Lt()});return}const Le=new(fe())({endpoint:jt.end_point,region:jt.region,accessKeyId:jt.access_key_id,accessKeySecret:jt.access_key_secret,bucket:jt.bucket,stsToken:jt.security_token}),Ve=De.name,dt={container_type:"TestSet",file_name:Ve},Ze=(0,ae.Z)();let Tt=`testsets/${Et}/${Ze}${Ve.indexOf(".")>-1?"."+Ve.split(".").pop():""}`;Et===null&&(Tt=`testsets/${Ze}${Ve.indexOf(".")>-1?"."+Ve.split(".").pop():""}`),Le.multipartUpload(Tt,new Blob([De.file],{type:De.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:Ve+""},url:jt==null?void 0:jt.callback_url,host:jt==null?void 0:jt.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,ee.rz)(dt)}}).then(function(_t){if(_t.data.status===0){Ke.current=Ke.current+1;const Qt=bt.current.map(kt=>{var Nt,Zt,on,vn,kn,Kn,Xn,pr,dr,vr,Sr,Fr,li,Er,xi,Cr,ot;if(kt.name===((Zt=(Nt=_t.data)==null?void 0:Nt.data)==null?void 0:Zt.file_name)){const di=Fe({},kt);return(kn=(vn=(on=_t.data)==null?void 0:on.data)==null?void 0:vn.file_name)!=null&&kn.includes(".in")?(di.in_object_key=(Xn=(Kn=_t.data)==null?void 0:Kn.data)==null?void 0:Xn.object,di.in_object_size=(dr=(pr=_t.data)==null?void 0:pr.data)==null?void 0:dr.size,di.input=(Sr=(vr=_t.data)==null?void 0:vr.data)==null?void 0:Sr.file_name,di.in_file=De):(di.out_object_key=(li=(Fr=_t.data)==null?void 0:Fr.data)==null?void 0:li.object,di.out_object_size=(xi=(Er=_t.data)==null?void 0:Er.data)==null?void 0:xi.size,di.output=(ot=(Cr=_t.data)==null?void 0:Cr.data)==null?void 0:ot.file_name,di.out_file=De),di}return kt});if(bt.current=[...Qt],vt([...Qt]),Ke.current>0&&Ke.current===pt.length){Ct(!1);let kt=Xe(Qt);kt=kt.filter(Nt=>{var Zt,on;return!!((Zt=Nt[0])!=null&&Zt.name&&((on=Nt[1])!=null&&on.name))}),kt=kt.map(Nt=>_e(Fe(Fe({},Nt[0]),Nt[1]),{is_file:!0})),et(kt),Lt()}}})},We=De=>new Promise((Le,Ve)=>{let dt=0,Ze=[];for(let Tt=0;Tt<De.length;Tt++)De[Tt].file.slice(0,1).arrayBuffer().then(()=>{dt++,dt===De.length&&(Ze.length?(ie.ZP.warning(`${Ze.join("\uFF0C")}\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01`),Ve()):Le(De))}).catch(_t=>{console.log("\u9519\u8BEF\u4FE1\u606F\uFF1A",_t),dt++,Ze.push(De[Tt].name),dt===De.length&&(Ze.length?(ie.ZP.warning(`${Ze.join("\uFF0C")}\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01`),Ve()):Le(De))})}),Ue=()=>Ye(void 0,null,function*(){if(pt.length===0){ie.ZP.warning("\u8BF7\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6");return}if(yield We(pt),Ct(!0),Xe(pt).some(Le=>{var Ve,dt;return!((Ve=Le[0])!=null&&Ve.name&&((dt=Le[1])!=null&&dt.name))})){Re.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u4E0A\u4F20\u7684\u6D4B\u8BD5\u7528\u4F8B\u4E2D\u5B58\u5728\u672A\u914D\u5BF9\u7684\u6587\u4EF6\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u4EC5\u4FDD\u5B58\u5DF2\u914D\u5BF9\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF1F",onOk:()=>Ye(void 0,null,function*(){pt.map(Le=>Ye(void 0,null,function*(){Qe(Le)}))}),onCancel:()=>{Ct(!1)}});return}pt.map(Le=>Ye(void 0,null,function*(){Qe(Le)}))}),qe={name:"file",fileList:pt,multiple:!0,accept:".in, .out",showUploadList:!1,beforeUpload:De=>{if(pt!=null&&pt.some(Ve=>Ve.name===De.name))return ie.ZP.info(`${De.name}\u6587\u4EF6\u5DF2\u5B58\u5728`),!1;if(De.size/1024/1024>100)return ie.ZP.info("\u6587\u4EF6\u8D85\u8FC7100M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;if(!/\.(in|out|IN|OUT)$/.test(De.name))return ie.ZP.warning("\u8F93\u5165\u6587\u4EF6\u53EA\u80FD\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6"),!1;const Le={name:De.name,uid:De.uid,file:De,percent:0};return pt.push(Le),bt.current=[...pt],vt([...pt]),!1}},He=Xe(pt);return console.log(pt,He,"fileList"),ue.createElement(Re.default,{open:it,wrapClassName:xt,onOk:Ue,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:Kt},onCancel:ut,width:730,title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},ue.createElement("div",{className:we.wrap},pt.length?ue.createElement("div",null,ue.createElement(je.Z,{justify:"space-between",align:"middle",style:{marginBottom:40}},ue.createElement("div",{style:{visibility:Mt?"visible":"hidden"}},ue.createElement("span",{className:we.greyText},"\u7528\u4F8B\u7C7B\u578B"),ue.createElement(ve.ZP.Group,{className:`ml20 ${we.testCaseRadio}`,optionType:"button",value:gt,onChange:De=>tt(De.target.value)},ue.createElement(ve.ZP,{value:!1},"\u6587\u672C"),ue.createElement(ve.ZP,{value:!0},"\u6587\u4EF6"))),ue.createElement(St.default,Fe({},qe),ue.createElement(ce.ZP,{type:"primary",className:we.btnS},ue.createElement("i",{className:"iconfont icon-shangchuan2"}),"\u4E0A\u4F20\u6587\u4EF6"))),ue.createElement(ht,{data:He,onRemove:lt})):ue.createElement("div",{className:`${we.noData} mb30`},ue.createElement(St.default.Dragger,_e(Fe({},qe),{className:we.dragger}),ue.createElement("img",{src:me,alt:"",className:"mb20"}),ue.createElement("div",null,ue.createElement("span",null,"\u62D6\u62FD\u6587\u4EF6\u6216"),ue.createElement("span",{className:we.uploadText},"\u70B9\u51FB\u6B64\u5904\u4E0A\u4F20")))),ue.createElement("div",{className:we.text},ue.createElement("span",{style:{color:"#FA6400"}},"\u63D0\u793A"),ue.createElement("br",null),"1\u3001\u6587\u4EF6\u5FC5\u987B\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6\u3002",ue.createElement("br",null),"2\u3001\u4E0A\u4F20\u7684\u6587\u4EF6\u7F16\u7801\u4EC5\u652F\u6301UTF-8\uFF0C\u5426\u5219\u53EF\u80FD\u4F1A\u51FA\u73B0\u6587\u672C\u4E71\u7801\u3002",ue.createElement("br",null),"3\u3001\u8F93\u5165\u8F93\u51FA\u6587\u4EF6\u9700\u6587\u4EF6\u540D\u79F0\u4E00\u4E00\u5BF9\u5E94\uFF0C\u672A\u5BF9\u5E94\u65F6\uFF0C\u5C06\u65E0\u6CD5\u4E0A\u4F20\u3002",ue.createElement("br",null),"4\u3001\u5355\u4E2A\u4E0A\u4F20\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC7100MB\uFF0C\u8D85\u8FC7\u65F6\u53EF\u4EE5\u5206\u6279\u6B21\u4E0A\u4F20\u3002",ue.createElement("br",null))))},ht=({data:Lt=[],onRemove:et,width:it="auto",showScore:xt=!1,disabled:Et=!1,inputChange:Mt,onEvaluatingChange:mt,onSelectAll:pt,checkAll1:vt,checkAll2:jt,checkAll3:At,checkAll4:Kt,checkAll5:Ct,showEvaluatingSetting:gt=!1,className:tt="",isProgramHomework:bt=!1})=>{const Ke={value:"",filename:"",dataUrl:""},[ut,wt]=(0,rt.useState)(Fe({},Ke)),yt=We=>{let Ue=document.createElement("a");document.body.appendChild(Ue);let qe=URL.createObjectURL(We.file);Ue.href=qe,Ue.download=We.name,Ue.click(),URL.revokeObjectURL(qe),document.body.removeChild(Ue)},lt=(We,Ue)=>{(0,re.LR)(We,Ue)},Qe=(We,Ue)=>{Re.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:ue.createElement("div",{className:"tc font16"},"\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u8BE5\u6D4B\u8BD5\u7528\u4F8B?"),onOk:()=>{et(We,Ue)},onCancel:()=>{}})};return Lt.length?ue.createElement("div",{className:tt,style:{width:it}},ue.createElement("div",{className:`${bt?we.headProgram:we.head}`},gt&&ue.createElement("div",{style:{width:"15%",display:"flex",alignItems:"center"}},ue.createElement(be.default,{checked:vt,onChange:We=>{pt(We.target.checked,"hidden")}}),ue.createElement(Ce.Z,{title:'\u9690\u85CF\u6D4B\u8BD5\u96C6\u53EF\u4EE5\u9632\u6B62\u5B66\u751F\u901A\u8FC7"print"\u7B49\u624B\u6BB5\u76F4\u63A5\u901A\u5173'},ue.createElement("span",{style:{marginLeft:"8px"}},"\u9690\u85CF"),ue.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),ue.createElement("div",{style:{width:bt?"25%":"15%"}},"\u7528\u4F8B"),ue.createElement("div",{style:{width:xt?bt?"20%":"15%":"25%",padding:"0 12px"}},"\u8F93\u5165"),ue.createElement("div",{style:{width:xt?bt?"20%":"15%":"25%",padding:"0 12px"}},"\u8F93\u51FA"),xt&&ue.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),gt&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(be.default,{checked:Kt,onChange:We=>{pt(We.target.checked,"input_visible")}}),ue.createElement(Ce.Z,{title:"\u52FE\u9009\u540E\uFF0C\u8F93\u5165\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},ue.createElement("span",{style:{marginLeft:"8px"}},"\u8F93\u5165"),ue.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),gt&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(be.default,{checked:jt,onChange:We=>{pt(We.target.checked,"is_invisible")}}),ue.createElement(Ce.Z,{title:"\u52FE\u9009\u540E\uFF0C\u9884\u671F\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},ue.createElement("span",{style:{marginLeft:"8px"}},"\u9884\u671F\u8F93\u51FA"),ue.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),gt&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(be.default,{checked:Ct,onChange:We=>{pt(We.target.checked,"actual_output_visible")}}),ue.createElement(Ce.Z,{title:"\u52FE\u9009\u540E\uFF0C\u5B9E\u9645\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},ue.createElement("span",{style:{marginLeft:"8px"}},"\u5B9E\u9645\u8F93\u51FA"),ue.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),gt&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(be.default,{checked:At,onChange:We=>{pt(We.target.checked,"last_match_rule")}}),ue.createElement(Ce.Z,{title:"\u52FE\u9009\u540E\uFF0C\u5B9E\u9645\u8F93\u51FA\u4E0E\u9884\u671F\u8F93\u51FA\u6700\u540E\u4E00\u884C\u76F8\u540C\u5373\u53EF\u901A\u5173"},ue.createElement("span",{style:{marginLeft:"8px"}},"\u7279\u6B8A\u5224\u5B9A"),ue.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),ue.createElement("div",{className:we.operation,style:bt?{flex:1,textAlign:"right"}:{width:"10%"}},"\u64CD\u4F5C")),ue.createElement("div",{className:we.listWrapper,style:{boxShadow:bt?"0px 2px 4px 0px #EAEEF4":"unset"}},Lt.map((We,Ue)=>{var qe,He,De,Le;return ue.createElement("div",{key:Ue,className:we.list,style:bt?{marginBottom:"0px",height:"66px",borderBottom:"1px solid #F6F7F8"}:{}},gt&&ue.createElement("div",{style:{width:"15%"}},ue.createElement(be.default,{checked:!!We.hidden,onChange:Ve=>{mt(Ve.target.checked,Ue,"hidden")}})),ue.createElement("div",{style:{width:bt?"25%":"15%",paddingLeft:bt?"5px":"0px",paddingRight:bt?"5px":"0px"}},"\u6D4B\u8BD5\u7528\u4F8B",Ue+1),ue.createElement("div",{className:we.info,style:{width:xt?bt?"20%":"15%":"25%"}},ue.createElement("span",{title:We.input||((qe=We[0])==null?void 0:qe.name),onClick:()=>Ye(void 0,null,function*(){let Ve;We.input?We.input_file_url?Ve=We.input_file_url:Ve=We.in_file:Ve=We[0];let dt;typeof Ve=="string"?(dt=yield fetch(Ve,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}}),wt({value:yield dt.text(),filename:"",dataUrl:Ve})):(dt=yield(0,re.db)(Ve.file),wt({value:dt.text,filename:Ve.name,dataUrl:dt.link}))})},We.input||((He=We[0])==null?void 0:He.name))),ue.createElement("div",{className:we.info,style:{width:xt?bt?"20%":"15%":"25%"}},ue.createElement("span",{title:We.output||((De=We[1])==null?void 0:De.name),onClick:()=>Ye(void 0,null,function*(){let Ve;We.input?We.output_file_url?Ve=We.output_file_url:Ve=We.out_file:Ve=We[1];let dt;typeof Ve=="string"?(dt=yield fetch(Ve,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}}),wt({value:yield dt.text(),filename:"",dataUrl:Ve})):(dt=yield(0,re.db)(Ve.file),wt({value:dt.text,filename:Ve.name,dataUrl:dt.link}))})},We.output||((Le=We[1])==null?void 0:Le.name))),xt&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(ye.default,{size:"large",addonAfter:bt?"%":null,disabled:Et,style:{width:"80%"},onChange:Ve=>Mt(Ve,Ue),value:We.score}),!bt&&ue.createElement("span",null,"\xA0%")),gt&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(be.default,{checked:We.input_visible||!1,onChange:Ve=>{mt(Ve.target.checked,Ue,"input_visible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),gt&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(be.default,{checked:We.is_invisible||!1,onChange:Ve=>{mt(Ve.target.checked,Ue,"is_invisible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),gt&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(be.default,{checked:We.actual_output_visible||!1,onChange:Ve=>{mt(Ve.target.checked,Ue,"actual_output_visible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),gt&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(be.default,{checked:We.last_match_rule||!1,onChange:Ve=>{mt(Ve.target.checked,Ue,"last_match_rule")},className:"font14"},"\u672B\u5C3E\u5339\u914D")),ue.createElement("div",{onClick:()=>Qe(We,Ue),style:bt?{flex:1,textAlign:"right",paddingLeft:"5px",paddingRight:"5px"}:{width:"10%",textAlign:"center"}},ue.createElement("span",{className:we.del},"\u5220\u9664")))})),ue.createElement(le.Z,{close:!0,data:ut.dataUrl,filename:ut.filename,type:ut.dataUrl.length?"txt":"",onClose:()=>wt(Fe({},Ke)),monacoEditor:{value:ut.value,language:"txt",onChange:()=>{},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}})):ue.createElement(ue.Fragment,null)};var ft=st},31087:function(bn,ln,$e){"use strict";$e.d(ln,{AL:function(){return pe},Iy:function(){return we},Qv:function(){return fe},ez:function(){return ue},jb:function(){return me}});var rt=$e(32834),St=$e.n(rt),ie=$e(11690),Re=$e.n(ie);let je=1;function ve(Ae,Oe){const Fe=Ae.match(/^(\s+)(?:```)/);if(Fe===null)return Oe;const _e=Fe[1];return Oe.split(`
`).map(Ye=>{const ze=Ye.match(/^\s+/);if(ze===null)return Ye;const[Xe]=ze;return Xe.length>=_e.length?Ye.slice(_e.length):Ye}).join(`
`)}let ce=[],be=["<ul>"];const Ce=new(St()).Renderer,ye=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function we(){ce.length=0,be=["<ul>"]}const me={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function xe(Ae,Oe,Fe,_e){if(Oe>=Ae.length||Ae[Oe].level<=Fe)return Oe;var Ye=Ae[Oe];_e.push("<li><a href='#"+je+Ye.anchor+"'>"+Ye.text+"</a>"),Oe++;var ze=[];return Oe=xe(Ae,Oe,Ye.level,ze),ze.length>0&&(_e.push("<ul>"),ze.forEach(function(Xe){_e.push(Xe)}),_e.push("</ul>")),_e.push("</li>"),Oe=xe(Ae,Oe,Fe,_e),Oe}function fe(){return xe(ce,0,0,be),be.push("</ul>"),be.join("")}const z={heading(Ae){const Oe=ye.exec(Ae);if(je+=1,Oe)return{type:"heading",raw:Oe[0],depth:Oe[1].length,text:Oe[2]}},fences(Ae){const Oe=this.rules.block.fences.exec(Ae);if(Oe){const Fe=Oe[0];let _e=ve(Fe,Oe[3]||"");const Ye=Oe[2]?Oe[2].trim():Oe[2];if(["latex","katex","math"].indexOf(Ye)>=0){const ze=re(),Xe=_e;_e=ze,le[ze]={type:"block",expression:Xe}}return{type:"code",raw:Fe,lang:Ye,text:_e}}}},ee=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ae=0;const re=()=>`__special_katext_id_${ae++}__`;let le={};function ue(){return le}function pe(){ae=0,le={}}function Ee(Ae){return Ae=Ae.replace(ee,(Oe,Fe)=>{const _e=re();return le[_e]={type:"inline",expression:Fe},_e}),Ae}const Pe=Ce.listitem;Ce.listitem=function(Ae){return Pe(Ee(Ae))};const Ie=Ce.paragraph;Ce.paragraph=function(Ae){return Ie(Ee(Ae))};const ke=Ce.tablecell;Ce.tablecell=function(Ae,Oe){return ke(Ee(Ae),Oe)},Ce.code=function(Ae,Oe,Fe){const _e=(Oe||"").match(/\S*/)[0];return _e?["latex","katex","math"].indexOf(_e)>=0?`<p class='editormd-tex'>${Ae}</p>`:`<pre class="prettyprint linenums"><code class="language-${Oe}">${Fe?Ae:(0,ie.escape)(Ae,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(Fe?Ae:(0,ie.escape)(Ae,!0))+"</code></pre>"},Ce.heading=function(Ae,Oe,Fe){let _e=this.options.headerPrefix+Fe.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ce.push({anchor:_e,level:Oe,text:Ae}),"<h"+Oe+' id="'+je+_e+'">'+Ae+"</h"+Oe+">"},St().setOptions({silent:!0,gfm:!0,pedantic:!1}),St().use({tokenizer:z,renderer:Ce}),ln.ZP=St()},49371:function(bn,ln,$e){"use strict";$e.d(ln,{G:function(){return je},t:function(){return Re}});var rt=$e(7062),St=$e.n(rt);const ie=null;function Re(ve,ce){let be=St().get("__ec");be||(be={}),be[ve]=ce,St().set("__ec",be)}function je(ve,ce){let be=St().get("__ec");return be?be[ve]===void 0?ce:be[ve]:ce}},47257:function(bn){(function(ln){(function($e){if(1)bn.exports=$e();else var rt})(function(){var $e,rt,St;return function(){function ie(Re,je,ve){function ce(ye,we){if(!je[ye]){if(!Re[ye]){var me=void 0;if(!we&&me)return require(ye,!0);if(be)return be(ye,!0);var xe=new Error("Cannot find module '"+ye+"'");throw xe.code="MODULE_NOT_FOUND",xe}var fe=je[ye]={exports:{}};Re[ye][0].call(fe.exports,function(z){var ee=Re[ye][1][z];return ce(ee||z)},fe,fe.exports,ie,Re,je,ve)}return je[ye].exports}for(var be=void 0,Ce=0;Ce<ve.length;Ce++)ce(ve[Ce]);return ce}return ie}()({1:[function(ie,Re,je){"use strict";var ve=ie("./browser/client");ve.Buffer=ie("buffer").Buffer,ve.urllib=ie("../shims/xhr"),ve.version=ie("./browser/version").version,Re.exports=ve},{"../shims/xhr":475,"./browser/client":3,"./browser/version":6,buffer:90}],2:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator")),be=ve(ie("@babel/runtime/helpers/asyncToGenerator"));ie("core-js/modules/es.object.to-string.js"),ie("core-js/modules/web.dom-collections.for-each.js"),ie("core-js/modules/es.object.keys.js"),ie("core-js/modules/es.array.slice.js");var Ce=ie("assert"),ye=ie("../common/utils/checkBucketName"),we=ye.checkBucketName,me=je;function xe(z){return Array.isArray?Array.isArray(z):Object.prototype.toString.call(z)==="[object Array]"}function fe(z){return z?xe(z)?z:[z]:[]}me.useBucket=function(ee){return we(ee),this.options.bucket=ee,this},me.setBucket=function(ee){return we(ee),this.options.bucket=ee,this},me.getBucket=function(){return this.options.bucket},me.deleteBucket=function(){var z=(0,be.default)(ce.default.mark(function ae(re,le){var ue,pe;return ce.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return ue=this._bucketRequestParams("DELETE",re,"",le),Pe.next=3,this.request(ue);case 3:if(pe=Pe.sent,!(pe.status===200||pe.status===204)){Pe.next=6;break}return Pe.abrupt("return",{res:pe.res});case 6:return Pe.next=8,this.requestError(pe);case 8:throw Pe.sent;case 9:case"end":return Pe.stop()}},ae,this)}));function ee(ae,re){return z.apply(this,arguments)}return ee}(),me.putBucketACL=function(){var z=(0,be.default)(ce.default.mark(function ae(re,le,ue){var pe,Ee;return ce.default.wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:return pe=this._bucketRequestParams("PUT",re,"acl",ue),pe.headers={"x-oss-acl":le},pe.successStatuses=[200],Ie.next=5,this.request(pe);case 5:return Ee=Ie.sent,Ie.abrupt("return",{bucket:Ee.headers.location&&Ee.headers.location.substring(1)||null,res:Ee.res});case 7:case"end":return Ie.stop()}},ae,this)}));function ee(ae,re,le){return z.apply(this,arguments)}return ee}(),me.getBucketACL=function(){var z=(0,be.default)(ce.default.mark(function ae(re,le){var ue,pe;return ce.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return ue=this._bucketRequestParams("GET",re,"acl",le),ue.successStatuses=[200],ue.xmlResponse=!0,Pe.next=5,this.request(ue);case 5:return pe=Pe.sent,Pe.abrupt("return",{acl:pe.data.AccessControlList.Grant,owner:{id:pe.data.Owner.ID,displayName:pe.data.Owner.DisplayName},res:pe.res});case 7:case"end":return Pe.stop()}},ae,this)}));function ee(ae,re){return z.apply(this,arguments)}return ee}(),me.putBucketLogging=function(){var z=(0,be.default)(ce.default.mark(function ae(re,le,ue){var pe,Ee,Pe;return ce.default.wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:return pe=this._bucketRequestParams("PUT",re,"logging",ue),Ee=`<?xml version="1.0" encoding="UTF-8"?>
<BucketLoggingStatus>
<LoggingEnabled>
<TargetBucket>`.concat(re,`</TargetBucket>
`),le&&(Ee+="<TargetPrefix>".concat(le,`</TargetPrefix>
`)),Ee+=`</LoggingEnabled>
</BucketLoggingStatus>`,pe.content=Ee,pe.mime="xml",pe.successStatuses=[200],ke.next=9,this.request(pe);case 9:return Pe=ke.sent,ke.abrupt("return",{res:Pe.res});case 11:case"end":return ke.stop()}},ae,this)}));function ee(ae,re,le){return z.apply(this,arguments)}return ee}(),me.getBucketLogging=function(){var z=(0,be.default)(ce.default.mark(function ae(re,le){var ue,pe,Ee;return ce.default.wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:return ue=this._bucketRequestParams("GET",re,"logging",le),ue.successStatuses=[200],ue.xmlResponse=!0,Ie.next=5,this.request(ue);case 5:return pe=Ie.sent,Ee=pe.data.LoggingEnabled,Ie.abrupt("return",{enable:!!Ee,prefix:Ee&&Ee.TargetPrefix||null,res:pe.res});case 8:case"end":return Ie.stop()}},ae,this)}));function ee(ae,re){return z.apply(this,arguments)}return ee}(),me.deleteBucketLogging=function(){var z=(0,be.default)(ce.default.mark(function ae(re,le){var ue,pe;return ce.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return ue=this._bucketRequestParams("DELETE",re,"logging",le),ue.successStatuses=[204,200],Pe.next=4,this.request(ue);case 4:return pe=Pe.sent,Pe.abrupt("return",{res:pe.res});case 6:case"end":return Pe.stop()}},ae,this)}));function ee(ae,re){return z.apply(this,arguments)}return ee}(),me.putBucketCORS=function(){var z=(0,be.default)(ce.default.mark(function ae(re,le,ue){var pe,Ee,Pe,Ie,ke,Ae,Oe,Fe,_e,Ye;return ce.default.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:for(le=le||[],Ce(le.length,"rules is required"),le.forEach(function(st){Ce(st.allowedOrigin,"allowedOrigin is required"),Ce(st.allowedMethod,"allowedMethod is required")}),pe=this._bucketRequestParams("PUT",re,"cors",ue),Ee=`<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration>`,Pe=function(ht){Ee+="<AllowedOrigin>".concat(ht,"</AllowedOrigin>")},Ie=function(ht){Ee+="<AllowedMethod>".concat(ht,"</AllowedMethod>")},ke=function(ht){Ee+="<AllowedHeader>".concat(ht,"</AllowedHeader>")},Ae=function(ht){Ee+="<ExposeHeader>".concat(ht,"</ExposeHeader>")},Oe=0,Fe=le.length;Oe<Fe;Oe++)_e=le[Oe],Ee+="<CORSRule>",fe(_e.allowedOrigin).forEach(Pe),fe(_e.allowedMethod).forEach(Ie),fe(_e.allowedHeader).forEach(ke),fe(_e.exposeHeader).forEach(Ae),_e.maxAgeSeconds&&(Ee+="<MaxAgeSeconds>".concat(_e.maxAgeSeconds,"</MaxAgeSeconds>")),Ee+="</CORSRule>";return Ee+="</CORSConfiguration>",pe.content=Ee,pe.mime="xml",pe.successStatuses=[200],Xe.next=16,this.request(pe);case 16:return Ye=Xe.sent,Xe.abrupt("return",{res:Ye.res});case 18:case"end":return Xe.stop()}},ae,this)}));function ee(ae,re,le){return z.apply(this,arguments)}return ee}(),me.getBucketCORS=function(){var z=(0,be.default)(ce.default.mark(function ae(re,le){var ue,pe,Ee,Pe;return ce.default.wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:return ue=this._bucketRequestParams("GET",re,"cors",le),ue.successStatuses=[200],ue.xmlResponse=!0,ke.next=5,this.request(ue);case 5:return pe=ke.sent,Ee=[],pe.data&&pe.data.CORSRule&&(Pe=pe.data.CORSRule,xe(Pe)||(Pe=[Pe]),Pe.forEach(function(Ae){var Oe={};Object.keys(Ae).forEach(function(Fe){Oe[Fe.slice(0,1).toLowerCase()+Fe.slice(1,Fe.length)]=Ae[Fe]}),Ee.push(Oe)})),ke.abrupt("return",{rules:Ee,res:pe.res});case 9:case"end":return ke.stop()}},ae,this)}));function ee(ae,re){return z.apply(this,arguments)}return ee}(),me.deleteBucketCORS=function(){var z=(0,be.default)(ce.default.mark(function ae(re,le){var ue,pe;return ce.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return ue=this._bucketRequestParams("DELETE",re,"cors",le),ue.successStatuses=[204],Pe.next=4,this.request(ue);case 4:return pe=Pe.sent,Pe.abrupt("return",{res:pe.res});case 6:case"end":return Pe.stop()}},ae,this)}));function ee(ae,re){return z.apply(this,arguments)}return ee}(),me.putBucketReferer=function(){var z=(0,be.default)(ce.default.mark(function ae(re,le,ue,pe){var Ee,Pe,Ie,ke;return ce.default.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:if(Ee=this._bucketRequestParams("PUT",re,"referer",pe),Pe=`<?xml version="1.0" encoding="UTF-8"?>
<RefererConfiguration>
`,Pe+=" <AllowEmptyReferer>".concat(le?"true":"false",`</AllowEmptyReferer>
`),ue&&ue.length>0){for(Pe+=` <RefererList>
`,Ie=0;Ie<ue.length;Ie++)Pe+=" <Referer>".concat(ue[Ie],`</Referer>
`);Pe+=` </RefererList>
`}else Pe+=` <RefererList />
`;return Pe+="</RefererConfiguration>",Ee.content=Pe,Ee.mime="xml",Ee.successStatuses=[200],Oe.next=10,this.request(Ee);case 10:return ke=Oe.sent,Oe.abrupt("return",{res:ke.res});case 12:case"end":return Oe.stop()}},ae,this)}));function ee(ae,re,le,ue){return z.apply(this,arguments)}return ee}(),me.getBucketReferer=function(){var z=(0,be.default)(ce.default.mark(function ae(re,le){var ue,pe,Ee;return ce.default.wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:return ue=this._bucketRequestParams("GET",re,"referer",le),ue.successStatuses=[200],ue.xmlResponse=!0,Ie.next=5,this.request(ue);case 5:return pe=Ie.sent,Ee=pe.data.RefererList.Referer||null,Ee&&(xe(Ee)||(Ee=[Ee])),Ie.abrupt("return",{allowEmpty:pe.data.AllowEmptyReferer==="true",referers:Ee,res:pe.res});case 9:case"end":return Ie.stop()}},ae,this)}));function ee(ae,re){return z.apply(this,arguments)}return ee}(),me.deleteBucketReferer=function(){var z=(0,be.default)(ce.default.mark(function ae(re,le){return ce.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return pe.next=2,this.putBucketReferer(re,!0,null,le);case 2:return pe.abrupt("return",pe.sent);case 3:case"end":return pe.stop()}},ae,this)}));function ee(ae,re){return z.apply(this,arguments)}return ee}(),me._bucketRequestParams=function(ee,ae,re,le){return{method:ee,bucket:ae,subres:re,timeout:le&&le.timeout,ctx:le&&le.ctx}}},{"../common/utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,assert:82,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],3:[function(ie,Re,je){(function(ve,ce){(function(){"use strict";var be=ie("@babel/runtime/helpers/interopRequireDefault"),Ce=be(ie("@babel/runtime/regenerator")),ye=be(ie("@babel/runtime/helpers/asyncToGenerator"));ie("core-js/modules/es.function.name.js"),ie("core-js/modules/es.regexp.exec.js"),ie("core-js/modules/es.string.split.js"),ie("core-js/modules/es.object.assign.js"),ie("core-js/modules/es.array.includes.js"),ie("core-js/modules/es.string.replace.js"),ie("core-js/modules/es.array.concat.js"),ie("core-js/modules/es.symbol.js"),ie("core-js/modules/es.symbol.description.js"),ie("core-js/modules/es.array.slice.js"),ie("core-js/modules/es.object.to-string.js"),ie("core-js/modules/es.promise.js"),ie("core-js/modules/es.regexp.to-string.js");var we=ie("debug")("ali-oss"),me=ie("xml2js"),xe=ie("agentkeepalive"),fe=ie("merge-descriptors"),z=ie("platform"),ee=ie("utility"),ae=ie("urllib"),re=ie("./version"),le=ie("bowser"),ue=ie("../common/signUtils"),pe=ie("../common/client/initOptions"),Ee=ie("../common/utils/createRequest"),Pe=Ee.createRequest,Ie=ie("../common/utils/encoder"),ke=Ie.encoder,Ae=ie("../common/client/getReqUrl"),Oe=Ae.getReqUrl,Fe=ie("../common/utils/setSTSToken"),_e=Fe.setSTSToken,Ye=ie("../common/utils/retry"),ze=Ye.retry,Xe=ie("../common/utils/isFunction"),st=Xe.isFunction,ht=new xe;function ft(){var Mt=z.name,mt=z.version;Mt&&Mt.toLowerCase&&Mt.toLowerCase()==="ie"&&mt.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function Lt(){return location&&location.protocol==="https:"}function et(Mt,mt){if(ft(),!(this instanceof et))return new et(Mt,mt);Mt&&Mt.inited?this.options=Mt:this.options=et.initOptions(Mt),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=ae,this.agent=this.options.agent||ht),this.ctx=mt,this.userAgent=this._getUserAgent(),this.stsTokenFreshTime=new Date,this.options.amendTimeSkewed=0}Re.exports=et,et.initOptions=function(mt){mt.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var pt=Object.assign({secure:Lt(),useFetch:!1},mt);return pe(pt)};var it=et.prototype;it.debug=we,fe(it,ie("./object")),fe(it,ie("./bucket")),fe(it,ie("../common/bucket/getBucketWebsite")),fe(it,ie("../common/bucket/putBucketWebsite")),fe(it,ie("../common/bucket/deleteBucketWebsite")),fe(it,ie("../common/bucket/getBucketLifecycle")),fe(it,ie("../common/bucket/putBucketLifecycle")),fe(it,ie("../common/bucket/deleteBucketLifecycle")),fe(it,ie("../common/bucket/putBucketVersioning")),fe(it,ie("../common/bucket/getBucketVersioning")),fe(it,ie("../common/bucket/getBucketInventory")),fe(it,ie("../common/bucket/deleteBucketInventory")),fe(it,ie("../common/bucket/listBucketInventory")),fe(it,ie("../common/bucket/putBucketInventory")),fe(it,ie("../common/bucket/abortBucketWorm")),fe(it,ie("../common/bucket/completeBucketWorm")),fe(it,ie("../common/bucket/extendBucketWorm")),fe(it,ie("../common/bucket/getBucketWorm")),fe(it,ie("../common/bucket/initiateBucketWorm")),fe(it,ie("./managed-upload")),fe(it,ie("../common/multipart-copy")),fe(it,ie("../common/multipart")),fe(it,ie("../common/parallel")),it.signature=function(mt){return this.debug("authorization stringToSign: %s",mt,"info"),ue.computeSignature(this.options.accessKeySecret,mt,this.options.headerEncoding)},it._getReqUrl=Oe,it.authorization=function(mt,pt,vt,jt){var At=ue.buildCanonicalString(mt.toUpperCase(),pt,{headers:jt,parameters:vt});return ue.authorization(this.options.accessKeyId,this.options.accessKeySecret,At,this.options.headerEncoding)},it.request=function(){var Mt=(0,ye.default)(Ce.default.mark(function mt(pt){var vt=this;return Ce.default.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:if(!this.options.retryMax){At.next=6;break}return At.next=3,ze(xt.bind(this),this.options.retryMax,{errorHandler:function(Ct){var gt=function(bt){if(pt.stream)return!1;var Ke=[-1,-2].includes(bt.status),ut=vt.options.requestErrorRetryHandle||function(){return!0};return Ke&&ut(bt)};return!!gt(Ct)}})(pt);case 3:return At.abrupt("return",At.sent);case 6:return At.abrupt("return",xt.call(this,pt));case 7:case"end":return At.stop()}},mt,this)}));return function(mt){return Mt.apply(this,arguments)}}();function xt(Mt){return Et.apply(this,arguments)}function Et(){return Et=(0,ye.default)(Ce.default.mark(function Mt(mt){var pt,vt,jt,At,Kt,Ct;return Ce.default.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:if(!(this.options.stsToken&&st(this.options.refreshSTSToken))){tt.next=3;break}return tt.next=3,_e.call(this);case 3:return pt=Pe.call(this,mt),this.options.useFetch||(pt.params.mode="disable-fetch"),At=!!mt.stream,tt.prev=6,tt.next=9,this.urllib.request(pt.url,pt.params);case 9:vt=tt.sent,this.debug("response %s %s, got %s, headers: %j",mt.method,pt.url,vt.status,vt.headers,"info"),tt.next=16;break;case 13:tt.prev=13,tt.t0=tt.catch(6),jt=tt.t0;case 16:if(!(vt&&mt.successStatuses&&mt.successStatuses.indexOf(vt.status)===-1)){tt.next=28;break}return tt.next=19,this.requestError(vt);case 19:if(Kt=tt.sent,!(Kt.code==="RequestTimeTooSkewed"&&!At)){tt.next=25;break}return this.options.amendTimeSkewed=+new Date(Kt.serverTime)-new Date,tt.next=24,this.request(mt);case 24:return tt.abrupt("return",tt.sent);case 25:Kt.params=mt,tt.next=32;break;case 28:if(!jt){tt.next=32;break}return tt.next=31,this.requestError(jt);case 31:Kt=tt.sent;case 32:if(!Kt){tt.next=34;break}throw Kt;case 34:if(!mt.xmlResponse){tt.next=39;break}return tt.next=37,this.parseXML(vt.data);case 37:Ct=tt.sent,vt.data=Ct;case 39:return tt.abrupt("return",vt);case 40:case"end":return tt.stop()}},Mt,this,[[6,13]])})),Et.apply(this,arguments)}it._getResource=function(mt){var pt="/";return mt.bucket&&(pt+="".concat(mt.bucket,"/")),mt.object&&(pt+=ke(mt.object,this.options.headerEncoding)),pt},it._escape=function(mt){return ee.encodeURIComponent(mt).replace(/%2F/g,"/")},it._getUserAgent=function(){var mt=ce&&ce.browser?"js":"nodejs",pt="aliyun-sdk-".concat(mt,"/").concat(re.version),vt=z.description;return!vt&&ce&&(vt="Node.js ".concat(ce.version.slice(1)," on ").concat(ce.platform," ").concat(ce.arch)),this._checkUserAgent("".concat(pt," ").concat(vt))},it._checkUserAgent=function(mt){var pt=mt.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return pt},it.checkBrowserAndVersion=function(mt,pt){return le.name===mt&&le.version.split(".")[0]===pt},it.parseXML=function(mt){return new Promise(function(pt,vt){ve.isBuffer(mt)&&(mt=mt.toString()),me.parseString(mt,{explicitRoot:!1,explicitArray:!1},function(jt,At){jt?vt(jt):pt(At)})})},it.requestError=function(){var Mt=(0,ye.default)(Ce.default.mark(function pt(vt){var jt,At,Kt,Ct;return Ce.default.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:if(jt=null,!(!vt.data||!vt.data.length)){tt.next=5;break}vt.status===-1||vt.status===-2?(jt=new Error(vt.message),jt.name=vt.name,jt.status=vt.status,jt.code=vt.name):(vt.status===404?(jt=new Error("Object not exists"),jt.name="NoSuchKeyError",jt.status=404,jt.code="NoSuchKey"):vt.status===412?(jt=new Error("Pre condition failed"),jt.name="PreconditionFailedError",jt.status=412,jt.code="PreconditionFailed"):(jt=new Error("Unknow error, status: ".concat(vt.status)),jt.name="UnknownError",jt.status=vt.status),jt.requestId=vt.headers["x-oss-request-id"],jt.host=""),tt.next=32;break;case 5:return At=String(vt.data),this.debug("request response error data: %s",At,"error"),tt.prev=7,tt.next=10,this.parseXML(At);case 10:if(tt.t0=tt.sent,tt.t0){tt.next=13;break}tt.t0={};case 13:Kt=tt.t0,tt.next=23;break;case 16:return tt.prev=16,tt.t1=tt.catch(7),this.debug(At,"error"),tt.t1.message+=`
raw xml: `.concat(At),tt.t1.status=vt.status,tt.t1.requestId=vt.headers["x-oss-request-id"],tt.abrupt("return",tt.t1);case 23:Ct=Kt.Message||"unknow request error, status: ".concat(vt.status),Kt.Condition&&(Ct+=" (condition: ".concat(Kt.Condition,")")),jt=new Error(Ct),jt.name=Kt.Code?"".concat(Kt.Code,"Error"):"UnknownError",jt.status=vt.status,jt.code=Kt.Code,jt.requestId=Kt.RequestId,jt.hostId=Kt.HostId,jt.serverTime=Kt.ServerTime;case 32:return this.debug("generate error %j",jt,"error"),tt.abrupt("return",jt);case 34:case"end":return tt.stop()}},pt,this,[[7,16]])}));function mt(pt){return Mt.apply(this,arguments)}return mt}()}).call(this)}).call(this,{isBuffer:ie("../../node_modules/is-buffer/index.js")},ie("_process"))},{"../../node_modules/is-buffer/index.js":366,"../common/bucket/abortBucketWorm":7,"../common/bucket/completeBucketWorm":8,"../common/bucket/deleteBucketInventory":9,"../common/bucket/deleteBucketLifecycle":10,"../common/bucket/deleteBucketWebsite":11,"../common/bucket/extendBucketWorm":12,"../common/bucket/getBucketInventory":13,"../common/bucket/getBucketLifecycle":14,"../common/bucket/getBucketVersioning":15,"../common/bucket/getBucketWebsite":16,"../common/bucket/getBucketWorm":17,"../common/bucket/initiateBucketWorm":18,"../common/bucket/listBucketInventory":19,"../common/bucket/putBucketInventory":20,"../common/bucket/putBucketLifecycle":21,"../common/bucket/putBucketVersioning":22,"../common/bucket/putBucketWebsite":23,"../common/client/getReqUrl":25,"../common/client/initOptions":26,"../common/multipart":30,"../common/multipart-copy":29,"../common/parallel":49,"../common/signUtils":50,"../common/utils/createRequest":56,"../common/utils/encoder":59,"../common/utils/isFunction":68,"../common/utils/retry":74,"../common/utils/setSTSToken":76,"./bucket":2,"./managed-upload":4,"./object":5,"./version":6,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,agentkeepalive:81,bowser:88,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/es.string.split.js":307,"core-js/modules/es.symbol.description.js":310,"core-js/modules/es.symbol.js":313,debug:465,"merge-descriptors":372,platform:379,urllib:475,utility:474,xml2js:426}],4:[function(ie,Re,je){(function(ve){(function(){"use strict";var ce=ie("@babel/runtime/helpers/interopRequireDefault"),be=ce(ie("@babel/runtime/regenerator"));ie("core-js/modules/es.function.name.js"),ie("core-js/modules/es.object.to-string.js"),ie("core-js/modules/es.promise.js"),ie("core-js/modules/es.array.from.js"),ie("core-js/modules/es.string.iterator.js"),ie("core-js/modules/es.array.map.js"),ie("core-js/modules/es.array.filter.js"),ie("core-js/modules/es.array.find.js"),ie("core-js/modules/es.array.concat.js"),ie("core-js/modules/es.regexp.to-string.js"),ie("core-js/modules/es.array.slice.js"),ie("core-js/modules/es.array.iterator.js"),ie("core-js/modules/es.array-buffer.slice.js"),ie("core-js/modules/es.typed-array.uint8-array.js"),ie("core-js/modules/es.typed-array.copy-within.js"),ie("core-js/modules/es.typed-array.every.js"),ie("core-js/modules/es.typed-array.fill.js"),ie("core-js/modules/es.typed-array.filter.js"),ie("core-js/modules/es.typed-array.find.js"),ie("core-js/modules/es.typed-array.find-index.js"),ie("core-js/modules/es.typed-array.for-each.js"),ie("core-js/modules/es.typed-array.includes.js"),ie("core-js/modules/es.typed-array.index-of.js"),ie("core-js/modules/es.typed-array.iterator.js"),ie("core-js/modules/es.typed-array.join.js"),ie("core-js/modules/es.typed-array.last-index-of.js"),ie("core-js/modules/es.typed-array.map.js"),ie("core-js/modules/es.typed-array.reduce.js"),ie("core-js/modules/es.typed-array.reduce-right.js"),ie("core-js/modules/es.typed-array.reverse.js"),ie("core-js/modules/es.typed-array.set.js"),ie("core-js/modules/es.typed-array.slice.js"),ie("core-js/modules/es.typed-array.some.js"),ie("core-js/modules/es.typed-array.sort.js"),ie("core-js/modules/es.typed-array.subarray.js"),ie("core-js/modules/es.typed-array.to-locale-string.js"),ie("core-js/modules/es.typed-array.to-string.js");var Ce=ce(ie("@babel/runtime/helpers/asyncToGenerator")),ye=ie("util"),we=ie("path"),me=ie("mime"),xe=ie("copy-to"),fe=ie("../common/utils/isBlob"),z=fe.isBlob,ee=ie("../common/utils/isFile"),ae=ee.isFile,re=ie("../common/utils/isBuffer"),le=re.isBuffer,ue=je;ue.multipartUpload=function(){var ke=(0,Ce.default)(be.default.mark(function Oe(Fe,_e){var Ye,ze,Xe,st,ht,ft,Lt,et,it,xt=arguments;return be.default.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:if(Ye=xt.length>2&&xt[2]!==void 0?xt[2]:{},this.resetCancelFlag(),Ye.disabledMD5=Ye.disabledMD5===void 0?!0:!!Ye.disabledMD5,!(Ye.checkpoint&&Ye.checkpoint.uploadId)){Mt.next=8;break}return _e&&ae(_e)&&(Ye.checkpoint.file=_e),Mt.next=7,this._resumeMultipart(Ye.checkpoint,Ye);case 7:return Mt.abrupt("return",Mt.sent);case 8:return ze=102400,Ye.mime||(ae(_e)?Ye.mime=me.getType(we.extname(_e.name)):z(_e)?Ye.mime=_e.type:le(_e)?Ye.mime="":Ye.mime=me.getType(we.extname(_e))),Ye.headers=Ye.headers||{},this._convertMetaToHeaders(Ye.meta,Ye.headers),Mt.next=14,this._getFileSize(_e);case 14:if(Xe=Mt.sent,!(Xe<ze)){Mt.next=26;break}return Ye.contentLength=Xe,Mt.next=19,this.put(Fe,_e,Ye);case 19:if(st=Mt.sent,!(Ye&&Ye.progress)){Mt.next=23;break}return Mt.next=23,Ye.progress(1);case 23:return ht={res:st.res,bucket:this.options.bucket,name:Fe,etag:st.res.headers.etag},(Ye.headers&&Ye.headers["x-oss-callback"]||Ye.callback)&&(ht.data=st.data),Mt.abrupt("return",ht);case 26:if(!(Ye.partSize&&parseInt(Ye.partSize,10)!==Ye.partSize)){Mt.next=28;break}throw new Error("partSize must be int number");case 28:if(!(Ye.partSize&&Ye.partSize<ze)){Mt.next=30;break}throw new Error("partSize must not be smaller than ".concat(ze));case 30:return Mt.next=32,this.initMultipartUpload(Fe,Ye);case 32:if(ft=Mt.sent,Lt=ft.uploadId,et=this._getPartSize(Xe,Ye.partSize),it={file:_e,name:Fe,fileSize:Xe,partSize:et,uploadId:Lt,doneParts:[]},!(Ye&&Ye.progress)){Mt.next=39;break}return Mt.next=39,Ye.progress(0,it,ft.res);case 39:return Mt.next=41,this._resumeMultipart(it,Ye);case 41:return Mt.abrupt("return",Mt.sent);case 42:case"end":return Mt.stop()}},Oe,this)}));function Ae(Oe,Fe){return ke.apply(this,arguments)}return Ae}(),ue._resumeMultipart=function(){var ke=(0,Ce.default)(be.default.mark(function Oe(Fe,_e){var Ye,ze,Xe,st,ht,ft,Lt,et,it,xt,Et,Mt,mt,pt,vt,jt,At,Kt,Ct;return be.default.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:if(Ye=this,!this.isCancel()){tt.next=3;break}throw this._makeCancelEvent();case 3:return ze=Fe.file,Xe=Fe.fileSize,st=Fe.partSize,ht=Fe.uploadId,ft=Fe.doneParts,Lt=Fe.name,et=[],ft.length>0&&xe(ft).to(et),it=this._divideParts(Xe,st),xt=it.length,Et=!1,Mt=function(Ke,ut){return new Promise(function(){var wt=(0,Ce.default)(be.default.mark(function yt(lt,Qe){var We,Ue,qe,He,De;return be.default.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:if(Ve.prev=0,Ke.isCancel()){Ve.next=29;break}return We=it[ut-1],Ve.next=5,Ke._createBuffer(ze,We.start,We.end);case 5:return Ue=Ve.sent,qe={content:Ue,size:We.end-We.start},Ve.prev=7,Ve.next=10,Ke._uploadPart(Lt,ht,ut,qe,_e);case 10:He=Ve.sent,Ve.next=18;break;case 13:if(Ve.prev=13,Ve.t0=Ve.catch(7),Ve.t0.status!==404){Ve.next=17;break}throw Ke._makeAbortEvent();case 17:throw Ve.t0;case 18:if(!(!Ke.isCancel()&&!Et)){Ve.next=26;break}if(Fe.doneParts.push({number:ut,etag:He.res.headers.etag}),!_e.progress){Ve.next=23;break}return Ve.next=23,_e.progress(ft.length/(xt+1),Fe,He.res);case 23:lt({number:ut,etag:He.res.headers.etag}),Ve.next=27;break;case 26:lt();case 27:Ve.next=30;break;case 29:lt();case 30:Ve.next=41;break;case 32:Ve.prev=32,Ve.t1=Ve.catch(0),De=new Error,De.name=Ve.t1.name,De.message=Ve.t1.message,De.stack=Ve.t1.stack,De.partNum=ut,xe(Ve.t1).to(De),Qe(De);case 41:case"end":return Ve.stop()}},yt,null,[[0,32],[7,13]])}));return function(yt,lt){return wt.apply(this,arguments)}}())},mt=Array.from(new Array(xt),function(bt,Ke){return Ke+1}),pt=et.map(function(bt){return bt.number}),vt=mt.filter(function(bt){return pt.indexOf(bt)<0}),jt=5,At=_e.parallel||jt,tt.next=17,this._parallel(vt,At,function(bt){return new Promise(function(Ke,ut){Mt(Ye,bt).then(function(wt){wt&&et.push(wt),Ke()}).catch(function(wt){ut(wt)})})});case 17:if(Kt=tt.sent,Et=!0,Ct=Kt.find(function(bt){return bt.name==="abort"}),!Ct){tt.next=22;break}throw Ct;case 22:if(!this.isCancel()){tt.next=25;break}throw Mt=null,this._makeCancelEvent();case 25:if(!(Kt&&Kt.length>0)){tt.next=28;break}throw Kt[0].message="Failed to upload some parts with error: ".concat(Kt[0].toString()," part_num: ").concat(Kt[0].partNum),Kt[0];case 28:return tt.next=30,this.completeMultipartUpload(Lt,ht,et,_e);case 30:return tt.abrupt("return",tt.sent);case 31:case"end":return tt.stop()}},Oe,this)}));function Ae(Oe,Fe){return ke.apply(this,arguments)}return Ae}(),ue._getFileSize=function(){var ke=(0,Ce.default)(be.default.mark(function Oe(Fe){return be.default.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:if(!le(Fe)){Ye.next=4;break}return Ye.abrupt("return",Fe.length);case 4:if(!(z(Fe)||ae(Fe))){Ye.next=6;break}return Ye.abrupt("return",Fe.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return Ye.stop()}},Oe)}));function Ae(Oe){return ke.apply(this,arguments)}return Ae}();var pe=ie("stream"),Ee=pe.Readable;function Pe(ke,Ae){if(!(this instanceof Pe))return new Pe(ke,Ae);Ee.call(this,Ae),this.file=ke,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}ye.inherits(Pe,Ee),Pe.prototype.readFileAndPush=function(Ae){if(this.fileBuffer)for(var Oe=!0;Oe&&this.fileBuffer&&this.start<this.fileBuffer.length;){var Fe=this.start,_e=Fe+Ae;_e=_e>this.fileBuffer.length?this.fileBuffer.length:_e,this.start=_e,Oe=this.push(this.fileBuffer.slice(Fe,_e))}},Pe.prototype._read=function(Ae){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file){this.finish||(this.fileBuffer=null,this.finish=!0),this.push(null);return}var Oe=16*1024;Ae=Ae||Oe;var Fe=this;this.reader.onload=function(Ye){Fe.fileBuffer=ve.from(new Uint8Array(Ye.target.result)),Fe.file=null,Fe.readFileAndPush(Ae)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(Ae)};function Ie(ke){return ke.arrayBuffer?ke.arrayBuffer():new Promise(function(Ae,Oe){var Fe=new FileReader;Fe.onload=function(_e){Ae(_e.target.result)},Fe.onerror=function(_e){Oe(_e)},Fe.readAsArrayBuffer(ke)})}ue._createBuffer=function(){var ke=(0,Ce.default)(be.default.mark(function Oe(Fe,_e,Ye){var ze,Xe;return be.default.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:if(!(z(Fe)||ae(Fe))){ht.next=8;break}return ze=Fe.slice(_e,Ye),ht.next=4,Ie(ze);case 4:return Xe=ht.sent,ht.abrupt("return",ve.from(Xe));case 8:if(!le(Fe)){ht.next=12;break}return ht.abrupt("return",Fe.subarray(_e,Ye));case 12:throw new Error("_createBuffer requires File/Blob/Buffer.");case 13:case"end":return ht.stop()}},Oe)}));function Ae(Oe,Fe,_e){return ke.apply(this,arguments)}return Ae}(),ue._getPartSize=function(Ae,Oe){var Fe=1e4,_e=1*1024*1024;Oe||(Oe=_e);var Ye=Math.ceil(Ae/Fe);return Oe<Ye&&(Oe=Ye,console.warn("partSize has been set to ".concat(Oe,", because the partSize you provided causes partNumber to be greater than 10,000"))),Oe},ue._divideParts=function(Ae,Oe){for(var Fe=Math.ceil(Ae/Oe),_e=[],Ye=0;Ye<Fe;Ye++){var ze=Oe*Ye,Xe=Math.min(ze+Oe,Ae);_e.push({start:ze,end:Xe})}return _e}}).call(this)}).call(this,ie("buffer").Buffer)},{"../common/utils/isBlob":64,"../common/utils/isBuffer":65,"../common/utils/isFile":67,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,buffer:90,"copy-to":94,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.map.js":280,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.iterator.js":303,"core-js/modules/es.typed-array.copy-within.js":315,"core-js/modules/es.typed-array.every.js":316,"core-js/modules/es.typed-array.fill.js":317,"core-js/modules/es.typed-array.filter.js":318,"core-js/modules/es.typed-array.find-index.js":319,"core-js/modules/es.typed-array.find.js":320,"core-js/modules/es.typed-array.for-each.js":321,"core-js/modules/es.typed-array.includes.js":322,"core-js/modules/es.typed-array.index-of.js":323,"core-js/modules/es.typed-array.iterator.js":324,"core-js/modules/es.typed-array.join.js":325,"core-js/modules/es.typed-array.last-index-of.js":326,"core-js/modules/es.typed-array.map.js":327,"core-js/modules/es.typed-array.reduce-right.js":328,"core-js/modules/es.typed-array.reduce.js":329,"core-js/modules/es.typed-array.reverse.js":330,"core-js/modules/es.typed-array.set.js":331,"core-js/modules/es.typed-array.slice.js":332,"core-js/modules/es.typed-array.some.js":333,"core-js/modules/es.typed-array.sort.js":334,"core-js/modules/es.typed-array.subarray.js":335,"core-js/modules/es.typed-array.to-locale-string.js":336,"core-js/modules/es.typed-array.to-string.js":337,"core-js/modules/es.typed-array.uint8-array.js":338,mime:374,path:378,stream:398,util:419}],5:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault");ie("core-js/modules/es.function.name.js"),ie("core-js/modules/es.object.to-string.js"),ie("core-js/modules/es.regexp.to-string.js"),ie("core-js/modules/es.array.map.js"),ie("core-js/modules/es.number.constructor.js"),ie("core-js/modules/es.object.assign.js"),ie("core-js/modules/es.regexp.exec.js"),ie("core-js/modules/es.string.replace.js"),ie("core-js/modules/web.dom-collections.for-each.js"),ie("core-js/modules/es.object.keys.js"),ie("core-js/modules/es.promise.js");var ce=ve(ie("@babel/runtime/regenerator")),be=ve(ie("@babel/runtime/helpers/asyncToGenerator")),Ce=ie("fs"),ye=ie("copy-to"),we=ie("path"),me=ie("mime"),xe=ie("../common/callback"),fe=ie("merge-descriptors"),z=ie("../common/utils/isBlob"),ee=z.isBlob,ae=ie("../common/utils/isFile"),re=ae.isFile,le=ie("../common/utils/isBuffer"),ue=le.isBuffer,pe=ie("../common/utils/obj2xml"),Ee=pe.obj2xml,Pe=je;Pe.append=function(){var Ie=(0,be.default)(ce.default.mark(function Ae(Oe,Fe,_e){var Ye;return ce.default.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:return _e=_e||{},_e.position===void 0&&(_e.position="0"),_e.subres={append:"",position:_e.position},_e.method="POST",Xe.next=6,this.put(Oe,Fe,_e);case 6:return Ye=Xe.sent,Ye.nextAppendPosition=Ye.res.headers["x-oss-next-append-position"],Xe.abrupt("return",Ye);case 9:case"end":return Xe.stop()}},Ae,this)}));function ke(Ae,Oe,Fe){return Ie.apply(this,arguments)}return ke}(),Pe.put=function(){var Ie=(0,be.default)(ce.default.mark(function Ae(Oe,Fe,_e){var Ye,ze,Xe,st,ht;return ce.default.wrap(function(Lt){for(;;)switch(Lt.prev=Lt.next){case 0:if(_e=_e||{},_e.disabledMD5=_e.disabledMD5===void 0?!0:!!_e.disabledMD5,_e.headers=_e.headers||{},Oe=this._objectName(Oe),!ue(Fe)){Lt.next=8;break}Ye=Fe,Lt.next=19;break;case 8:if(!(ee(Fe)||re(Fe))){Lt.next=18;break}return _e.mime||(re(Fe)?_e.mime=me.getType(we.extname(Fe.name)):_e.mime=Fe.type),Lt.next=12,this._createBuffer(Fe,0,Fe.size);case 12:return Ye=Lt.sent,Lt.next=15,this._getFileSize(Fe);case 15:_e.contentLength=Lt.sent,Lt.next=19;break;case 18:throw new TypeError("Must provide Buffer/Blob/File for put.");case 19:return this._convertMetaToHeaders(_e.meta,_e.headers),ze=_e.method||"PUT",Xe=this._objectRequestParams(ze,Oe,_e),xe.encodeCallback(Xe,_e),Xe.mime=_e.mime,Xe.disabledMD5=_e.disabledMD5,Xe.content=Ye,Xe.successStatuses=[200],Lt.next=29,this.request(Xe);case 29:return st=Lt.sent,ht={name:Oe,url:this._objectUrl(Oe),res:st.res},Xe.headers&&Xe.headers["x-oss-callback"]&&(ht.data=JSON.parse(st.data.toString())),Lt.abrupt("return",ht);case 33:case"end":return Lt.stop()}},Ae,this)}));function ke(Ae,Oe,Fe){return Ie.apply(this,arguments)}return ke}(),Pe.putStream=function(){var Ie=(0,be.default)(ce.default.mark(function Ae(Oe,Fe,_e){var Ye,ze,Xe,st;return ce.default.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:return _e=_e||{},_e.headers=_e.headers||{},Oe=this._objectName(Oe),_e.contentLength?_e.headers["Content-Length"]=_e.contentLength:_e.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(_e.meta,_e.headers),Ye=_e.method||"PUT",ze=this._objectRequestParams(Ye,Oe,_e),xe.encodeCallback(ze,_e),ze.mime=_e.mime,ze.stream=Fe,ze.successStatuses=[200],ft.next=13,this.request(ze);case 13:return Xe=ft.sent,st={name:Oe,url:this._objectUrl(Oe),res:Xe.res},ze.headers&&ze.headers["x-oss-callback"]&&(st.data=JSON.parse(Xe.data.toString())),ft.abrupt("return",st);case 17:case"end":return ft.stop()}},Ae,this)}));function ke(Ae,Oe,Fe){return Ie.apply(this,arguments)}return ke}(),fe(Pe,ie("../common/object/copyObject")),fe(Pe,ie("../common/object/getObjectTagging")),fe(Pe,ie("../common/object/putObjectTagging")),fe(Pe,ie("../common/object/deleteObjectTagging")),fe(Pe,ie("../common/image")),fe(Pe,ie("../common/object/getBucketVersions")),fe(Pe,ie("../common/object/getACL")),fe(Pe,ie("../common/object/putACL")),fe(Pe,ie("../common/object/head")),fe(Pe,ie("../common/object/delete")),fe(Pe,ie("../common/object/get")),fe(Pe,ie("../common/object/putSymlink")),fe(Pe,ie("../common/object/getSymlink")),fe(Pe,ie("../common/object/deleteMulti")),fe(Pe,ie("../common/object/getObjectMeta")),fe(Pe,ie("../common/object/getObjectUrl")),fe(Pe,ie("../common/object/generateObjectUrl")),fe(Pe,ie("../common/object/signatureUrl")),fe(Pe,ie("../common/object/asyncSignatureUrl")),Pe.putMeta=function(){var Ie=(0,be.default)(ce.default.mark(function Ae(Oe,Fe,_e){var Ye;return ce.default.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:return Xe.next=2,this.copy(Oe,Oe,{meta:Fe||{},timeout:_e&&_e.timeout,ctx:_e&&_e.ctx});case 2:return Ye=Xe.sent,Xe.abrupt("return",Ye);case 4:case"end":return Xe.stop()}},Ae,this)}));function ke(Ae,Oe,Fe){return Ie.apply(this,arguments)}return ke}(),Pe.list=function(){var Ie=(0,be.default)(ce.default.mark(function Ae(Oe,Fe){var _e,Ye,ze,Xe,st;return ce.default.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:return _e=this._objectRequestParams("GET","",Fe),_e.query=Oe,_e.xmlResponse=!0,_e.successStatuses=[200],ft.next=6,this.request(_e);case 6:return Ye=ft.sent,ze=Ye.data.Contents||[],Xe=this,ze&&(Array.isArray(ze)||(ze=[ze]),ze=ze.map(function(Lt){return{name:Lt.Key,url:Xe._objectUrl(Lt.Key),lastModified:Lt.LastModified,etag:Lt.ETag,type:Lt.Type,size:Number(Lt.Size),storageClass:Lt.StorageClass,owner:{id:Lt.Owner.ID,displayName:Lt.Owner.DisplayName}}})),st=Ye.data.CommonPrefixes||null,st&&(Array.isArray(st)||(st=[st]),st=st.map(function(Lt){return Lt.Prefix})),ft.abrupt("return",{res:Ye.res,objects:ze,prefixes:st,nextMarker:Ye.data.NextMarker||null,isTruncated:Ye.data.IsTruncated==="true"});case 13:case"end":return ft.stop()}},Ae,this)}));function ke(Ae,Oe){return Ie.apply(this,arguments)}return ke}(),Pe.listV2=function(){var Ie=(0,be.default)(ce.default.mark(function Ae(Oe){var Fe,_e,Ye,ze,Xe,st,ht,ft=arguments;return ce.default.wrap(function(et){for(;;)switch(et.prev=et.next){case 0:return Fe=ft.length>1&&ft[1]!==void 0?ft[1]:{},_e=Oe["continuation-token"]||Oe.continuationToken,_e&&(Fe.subres=Object.assign({"continuation-token":_e},Fe.subres)),Ye=this._objectRequestParams("GET","",Fe),Ye.query=Object.assign({"list-type":2},Oe),delete Ye.query["continuation-token"],delete Ye.query.continuationToken,Ye.xmlResponse=!0,Ye.successStatuses=[200],et.next=11,this.request(Ye);case 11:return ze=et.sent,Xe=ze.data.Contents||[],st=this,Xe&&(Array.isArray(Xe)||(Xe=[Xe]),Xe=Xe.map(function(it){var xt=null;return it.Owner&&(xt={id:it.Owner.ID,displayName:it.Owner.DisplayName}),{name:it.Key,url:st._objectUrl(it.Key),lastModified:it.LastModified,etag:it.ETag,type:it.Type,size:Number(it.Size),storageClass:it.StorageClass,owner:xt}})),ht=ze.data.CommonPrefixes||null,ht&&(Array.isArray(ht)||(ht=[ht]),ht=ht.map(function(it){return it.Prefix})),et.abrupt("return",{res:ze.res,objects:Xe,prefixes:ht,isTruncated:ze.data.IsTruncated==="true",keyCount:+ze.data.KeyCount,continuationToken:ze.data.ContinuationToken||null,nextContinuationToken:ze.data.NextContinuationToken||null});case 18:case"end":return et.stop()}},Ae,this)}));function ke(Ae){return Ie.apply(this,arguments)}return ke}(),Pe.restore=function(){var Ie=(0,be.default)(ce.default.mark(function Ae(Oe){var Fe,_e,Ye,ze,Xe=arguments;return ce.default.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:return Fe=Xe.length>1&&Xe[1]!==void 0?Xe[1]:{type:"Archive"},Fe=Fe||{},Fe.subres=Object.assign({restore:""},Fe.subres),Fe.versionId&&(Fe.subres.versionId=Fe.versionId),_e=this._objectRequestParams("POST",Oe,Fe),Fe.type==="ColdArchive"&&(Ye={RestoreRequest:{Days:Fe.Days?Fe.Days:2,JobParameters:{Tier:Fe.JobParameters?Fe.JobParameters:"Standard"}}},_e.content=Ee(Ye,{headers:!0}),_e.mime="xml"),_e.successStatuses=[202],ht.next=9,this.request(_e);case 9:return ze=ht.sent,ht.abrupt("return",{res:ze.res});case 11:case"end":return ht.stop()}},Ae,this)}));function ke(Ae){return Ie.apply(this,arguments)}return ke}(),Pe._objectUrl=function(ke){return this._getReqUrl({bucket:this.options.bucket,object:ke})},Pe._objectRequestParams=function(ke,Ae,Oe){if(!this.options.bucket&&!this.options.cname)throw new Error("Please create a bucket first");Oe=Oe||{},Ae=this._objectName(Ae);var Fe={object:Ae,bucket:this.options.bucket,method:ke,subres:Oe&&Oe.subres,timeout:Oe&&Oe.timeout,ctx:Oe&&Oe.ctx};return Oe.headers&&(Fe.headers={},ye(Oe.headers).to(Fe.headers)),Fe},Pe._objectName=function(ke){return ke.replace(/^\/+/,"")},Pe._convertMetaToHeaders=function(ke,Ae){ke&&Object.keys(ke).forEach(function(Oe){Ae["x-oss-meta-".concat(Oe)]=ke[Oe]})},Pe._deleteFileSafe=function(ke){var Ae=this;return new Promise(function(Oe){Ce.exists(ke,function(Fe){Fe?Ce.unlink(ke,function(_e){_e&&Ae.debug("unlink %j error: %s",ke,_e,"error"),Oe()}):Oe()})})}},{"../common/callback":24,"../common/image":27,"../common/object/asyncSignatureUrl":31,"../common/object/copyObject":32,"../common/object/delete":33,"../common/object/deleteMulti":34,"../common/object/deleteObjectTagging":35,"../common/object/generateObjectUrl":36,"../common/object/get":37,"../common/object/getACL":38,"../common/object/getBucketVersions":39,"../common/object/getObjectMeta":40,"../common/object/getObjectTagging":41,"../common/object/getObjectUrl":42,"../common/object/getSymlink":43,"../common/object/head":44,"../common/object/putACL":45,"../common/object/putObjectTagging":46,"../common/object/putSymlink":47,"../common/object/signatureUrl":48,"../common/utils/isBlob":64,"../common/utils/isBuffer":65,"../common/utils/isFile":67,"../common/utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.number.constructor.js":286,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339,fs:89,"merge-descriptors":372,mime:374,path:378}],6:[function(ie,Re,je){"use strict";je.version="6.18.1"},{}],7:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator")),be=ve(ie("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(je,"__esModule",{value:!0}),je.abortBucketWorm=void 0;var Ce=ie("../utils/checkBucketName");function ye(me,xe){return we.apply(this,arguments)}function we(){return we=(0,be.default)(ce.default.mark(function me(xe,fe){var z,ee;return ce.default.wrap(function(re){for(;;)switch(re.prev=re.next){case 0:return Ce.checkBucketName(xe),z=this._bucketRequestParams("DELETE",xe,"worm",fe),re.next=4,this.request(z);case 4:return ee=re.sent,re.abrupt("return",{res:ee.res,status:ee.status});case 6:case"end":return re.stop()}},me,this)})),we.apply(this,arguments)}je.abortBucketWorm=ye},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],8:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator")),be=ve(ie("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(je,"__esModule",{value:!0}),je.completeBucketWorm=void 0;var Ce=ie("../utils/checkBucketName");function ye(me,xe,fe){return we.apply(this,arguments)}function we(){return we=(0,be.default)(ce.default.mark(function me(xe,fe,z){var ee,ae;return ce.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return Ce.checkBucketName(xe),ee=this._bucketRequestParams("POST",xe,{wormId:fe},z),le.next=4,this.request(ee);case 4:return ae=le.sent,le.abrupt("return",{res:ae.res,status:ae.status});case 6:case"end":return le.stop()}},me,this)})),we.apply(this,arguments)}je.completeBucketWorm=ye},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],9:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator"));ie("core-js/modules/es.object.assign.js");var be=ve(ie("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(je,"__esModule",{value:!0}),je.deleteBucketInventory=void 0;var Ce=ie("../utils/checkBucketName");function ye(me,xe){return we.apply(this,arguments)}function we(){return we=(0,be.default)(ce.default.mark(function me(xe,fe){var z,ee,ae,re,le=arguments;return ce.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return z=le.length>2&&le[2]!==void 0?le[2]:{},ee=Object.assign({inventory:"",inventoryId:fe},z.subres),Ce.checkBucketName(xe),ae=this._bucketRequestParams("DELETE",xe,ee,z),ae.successStatuses=[204],pe.next=7,this.request(ae);case 7:return re=pe.sent,pe.abrupt("return",{status:re.status,res:re.res});case 9:case"end":return pe.stop()}},me,this)})),we.apply(this,arguments)}je.deleteBucketInventory=ye},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],10:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator")),be=ve(ie("@babel/runtime/helpers/asyncToGenerator")),Ce=ie("../utils/checkBucketName"),ye=Ce.checkBucketName,we=je;we.deleteBucketLifecycle=function(){var me=(0,be.default)(ce.default.mark(function fe(z,ee){var ae,re;return ce.default.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return ye(z),ae=this._bucketRequestParams("DELETE",z,"lifecycle",ee),ae.successStatuses=[204],ue.next=5,this.request(ae);case 5:return re=ue.sent,ue.abrupt("return",{res:re.res});case 7:case"end":return ue.stop()}},fe,this)}));function xe(fe,z){return me.apply(this,arguments)}return xe}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],11:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator")),be=ve(ie("@babel/runtime/helpers/asyncToGenerator")),Ce=ie("../utils/checkBucketName"),ye=Ce.checkBucketName,we=je;we.deleteBucketWebsite=function(){var me=(0,be.default)(ce.default.mark(function fe(z,ee){var ae,re;return ce.default.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return ye(z),ae=this._bucketRequestParams("DELETE",z,"website",ee),ae.successStatuses=[204],ue.next=5,this.request(ae);case 5:return re=ue.sent,ue.abrupt("return",{res:re.res});case 7:case"end":return ue.stop()}},fe,this)}));function xe(fe,z){return me.apply(this,arguments)}return xe}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],12:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator")),be=ve(ie("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(je,"__esModule",{value:!0}),je.extendBucketWorm=void 0;var Ce=ie("../utils/checkBucketName"),ye=ie("../utils/obj2xml");function we(xe,fe,z,ee){return me.apply(this,arguments)}function me(){return me=(0,be.default)(ce.default.mark(function xe(fe,z,ee,ae){var re,le,ue;return ce.default.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return Ce.checkBucketName(fe),re=this._bucketRequestParams("POST",fe,{wormExtend:"",wormId:z},ae),le={ExtendWormConfiguration:{RetentionPeriodInDays:ee}},re.mime="xml",re.content=ye.obj2xml(le,{headers:!0}),re.successStatuses=[200],Ee.next=8,this.request(re);case 8:return ue=Ee.sent,Ee.abrupt("return",{res:ue.res,status:ue.status});case 10:case"end":return Ee.stop()}},xe,this)})),me.apply(this,arguments)}je.extendBucketWorm=we},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],13:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator"));ie("core-js/modules/es.object.assign.js");var be=ve(ie("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(je,"__esModule",{value:!0}),je.getBucketInventory=void 0;var Ce=ie("../utils/checkBucketName"),ye=ie("../utils/formatInventoryConfig");function we(xe,fe){return me.apply(this,arguments)}function me(){return me=(0,be.default)(ce.default.mark(function xe(fe,z){var ee,ae,re,le,ue=arguments;return ce.default.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return ee=ue.length>2&&ue[2]!==void 0?ue[2]:{},ae=Object.assign({inventory:"",inventoryId:z},ee.subres),Ce.checkBucketName(fe),re=this._bucketRequestParams("GET",fe,ae,ee),re.successStatuses=[200],re.xmlResponse=!0,Ee.next=8,this.request(re);case 8:return le=Ee.sent,Ee.abrupt("return",{status:le.status,res:le.res,inventory:ye.formatInventoryConfig(le.data)});case 10:case"end":return Ee.stop()}},xe,this)})),me.apply(this,arguments)}je.getBucketInventory=we},{"../utils/checkBucketName":51,"../utils/formatInventoryConfig":60,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],14:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator"));ie("core-js/modules/es.array.map.js");var be=ve(ie("@babel/runtime/helpers/asyncToGenerator")),Ce=ie("../utils/checkBucketName"),ye=Ce.checkBucketName,we=ie("../utils/isArray"),me=we.isArray,xe=ie("../utils/formatObjKey"),fe=xe.formatObjKey,z=je;z.getBucketLifecycle=function(){var ee=(0,be.default)(ce.default.mark(function re(le,ue){var pe,Ee,Pe;return ce.default.wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:return ye(le),pe=this._bucketRequestParams("GET",le,"lifecycle",ue),pe.successStatuses=[200],pe.xmlResponse=!0,ke.next=6,this.request(pe);case 6:return Ee=ke.sent,Pe=Ee.data.Rule||null,Pe&&(me(Pe)||(Pe=[Pe]),Pe=Pe.map(function(Ae){return Ae.ID&&(Ae.id=Ae.ID,delete Ae.ID),Ae.Tag&&!me(Ae.Tag)&&(Ae.Tag=[Ae.Tag]),fe(Ae,"firstLowerCase")})),ke.abrupt("return",{rules:Pe,res:Ee.res});case 10:case"end":return ke.stop()}},re,this)}));function ae(re,le){return ee.apply(this,arguments)}return ae}()},{"../utils/checkBucketName":51,"../utils/formatObjKey":61,"../utils/isArray":63,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280}],15:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator")),be=ve(ie("@babel/runtime/helpers/asyncToGenerator")),Ce=ie("../utils/checkBucketName"),ye=Ce.checkBucketName,we=je;we.getBucketVersioning=function(){var me=(0,be.default)(ce.default.mark(function fe(z,ee){var ae,re,le;return ce.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return ye(z),ae=this._bucketRequestParams("GET",z,"versioning",ee),ae.xmlResponse=!0,ae.successStatuses=[200],pe.next=6,this.request(ae);case 6:return re=pe.sent,le=re.data.Status,pe.abrupt("return",{status:re.status,versionStatus:le,res:re.res});case 9:case"end":return pe.stop()}},fe,this)}));function xe(fe,z){return me.apply(this,arguments)}return xe}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],16:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator")),be=ve(ie("@babel/runtime/helpers/asyncToGenerator")),Ce=ie("../utils/checkBucketName"),ye=Ce.checkBucketName,we=ie("../utils/isObject"),me=we.isObject,xe=je;xe.getBucketWebsite=function(){var fe=(0,be.default)(ce.default.mark(function ee(ae,re){var le,ue,pe;return ce.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return ye(ae),le=this._bucketRequestParams("GET",ae,"website",re),le.successStatuses=[200],le.xmlResponse=!0,Pe.next=6,this.request(le);case 6:return ue=Pe.sent,pe=[],ue.data.RoutingRules&&ue.data.RoutingRules.RoutingRule&&(me(ue.data.RoutingRules.RoutingRule)?pe=[ue.data.RoutingRules.RoutingRule]:pe=ue.data.RoutingRules.RoutingRule),Pe.abrupt("return",{index:ue.data.IndexDocument&&ue.data.IndexDocument.Suffix||"",supportSubDir:ue.data.IndexDocument&&ue.data.IndexDocument.SupportSubDir||"false",type:ue.data.IndexDocument&&ue.data.IndexDocument.Type,routingRules:pe,error:ue.data.ErrorDocument&&ue.data.ErrorDocument.Key||null,res:ue.res});case 10:case"end":return Pe.stop()}},ee,this)}));function z(ee,ae){return fe.apply(this,arguments)}return z}()},{"../utils/checkBucketName":51,"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],17:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator"));ie("core-js/modules/es.object.assign.js");var be=ve(ie("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(je,"__esModule",{value:!0}),je.getBucketWorm=void 0;var Ce=ie("../utils/checkBucketName"),ye=ie("../utils/dataFix");function we(xe,fe){return me.apply(this,arguments)}function me(){return me=(0,be.default)(ce.default.mark(function xe(fe,z){var ee,ae;return ce.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return Ce.checkBucketName(fe),ee=this._bucketRequestParams("GET",fe,"worm",z),ee.successStatuses=[200],ee.xmlResponse=!0,le.next=6,this.request(ee);case 6:return ae=le.sent,ye.dataFix(ae.data,{lowerFirst:!0,rename:{RetentionPeriodInDays:"days"}}),le.abrupt("return",Object.assign(Object.assign({},ae.data),{res:ae.res,status:ae.status}));case 9:case"end":return le.stop()}},xe,this)})),me.apply(this,arguments)}je.getBucketWorm=we},{"../utils/checkBucketName":51,"../utils/dataFix":57,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],18:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator")),be=ve(ie("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(je,"__esModule",{value:!0}),je.initiateBucketWorm=void 0;var Ce=ie("../utils/obj2xml"),ye=ie("../utils/checkBucketName");function we(xe,fe,z){return me.apply(this,arguments)}function me(){return me=(0,be.default)(ce.default.mark(function xe(fe,z,ee){var ae,re,le;return ce.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return ye.checkBucketName(fe),ae=this._bucketRequestParams("POST",fe,"worm",ee),re={InitiateWormConfiguration:{RetentionPeriodInDays:z}},ae.mime="xml",ae.content=Ce.obj2xml(re,{headers:!0}),ae.successStatuses=[200],pe.next=8,this.request(ae);case 8:return le=pe.sent,pe.abrupt("return",{res:le.res,wormId:le.res.headers["x-oss-worm-id"],status:le.status});case 10:case"end":return pe.stop()}},xe,this)})),me.apply(this,arguments)}je.initiateBucketWorm=we},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],19:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator"));ie("core-js/modules/es.object.assign.js");var be=ve(ie("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(je,"__esModule",{value:!0}),je.listBucketInventory=void 0;var Ce=ie("../utils/checkBucketName"),ye=ie("../utils/formatInventoryConfig");function we(xe){return me.apply(this,arguments)}function me(){return me=(0,be.default)(ce.default.mark(function xe(fe){var z,ee,ae,re,le,ue,pe,Ee,Pe=arguments;return ce.default.wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:return z=Pe.length>1&&Pe[1]!==void 0?Pe[1]:{},ee=z.continuationToken,ae=Object.assign({inventory:""},ee&&{"continuation-token":ee},z.subres),Ce.checkBucketName(fe),re=this._bucketRequestParams("GET",fe,ae,z),re.successStatuses=[200],re.xmlResponse=!0,ke.next=9,this.request(re);case 9:return le=ke.sent,ue=le.data,pe=le.res,Ee=le.status,ke.abrupt("return",{isTruncated:ue.IsTruncated==="true",nextContinuationToken:ue.NextContinuationToken,inventoryList:ye.formatInventoryConfig(ue.InventoryConfiguration,!0),status:Ee,res:pe});case 12:case"end":return ke.stop()}},xe,this)})),me.apply(this,arguments)}je.listBucketInventory=we},{"../utils/checkBucketName":51,"../utils/formatInventoryConfig":60,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],20:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator"));ie("core-js/modules/es.object.assign.js"),ie("core-js/modules/es.array.concat.js");var be=ve(ie("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(je,"__esModule",{value:!0}),je.putBucketInventory=void 0;var Ce=ie("../utils/checkBucketName"),ye=ie("../utils/obj2xml");function we(xe,fe){return me.apply(this,arguments)}function me(){return me=(0,be.default)(ce.default.mark(function xe(fe,z){var ee,ae,re,le,ue,pe,Ee,Pe,Ie,ke,Ae,Oe=arguments;return ce.default.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:return ee=Oe.length>2&&Oe[2]!==void 0?Oe[2]:{},ae=Object.assign({inventory:"",inventoryId:z.id},ee.subres),Ce.checkBucketName(fe),re=z.OSSBucketDestination,le=z.optionalFields,ue=z.includedObjectVersions,pe="acs:oss:::",Ee="acs:ram::".concat(re.accountId,":role/"),Pe={InventoryConfiguration:{Id:z.id,IsEnabled:z.isEnabled,Filter:{Prefix:z.prefix||""},Destination:{OSSBucketDestination:{Format:re.format,AccountId:re.accountId,RoleArn:"".concat(Ee).concat(re.rolename),Bucket:"".concat(pe).concat(re.bucket),Prefix:re.prefix||"",Encryption:re.encryption||""}},Schedule:{Frequency:z.frequency},IncludedObjectVersions:ue,OptionalFields:{Field:(le==null?void 0:le.field)||[]}}},Ie=ye.obj2xml(Pe,{headers:!0,firstUpperCase:!0}),ke=this._bucketRequestParams("PUT",fe,ae,ee),ke.successStatuses=[200],ke.mime="xml",ke.content=Ie,_e.next=14,this.request(ke);case 14:return Ae=_e.sent,_e.abrupt("return",{status:Ae.status,res:Ae.res});case 16:case"end":return _e.stop()}},xe,this)})),me.apply(this,arguments)}je.putBucketInventory=we},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.assign.js":287}],21:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator"));ie("core-js/modules/es.object.to-string.js"),ie("core-js/modules/web.dom-collections.for-each.js"),ie("core-js/modules/es.regexp.exec.js"),ie("core-js/modules/es.array.includes.js");var be=ve(ie("@babel/runtime/helpers/asyncToGenerator")),Ce=ie("../utils/checkBucketName"),ye=Ce.checkBucketName,we=ie("../utils/isArray"),me=we.isArray,xe=ie("../utils/deepCopy"),fe=xe.deepCopy,z=ie("../utils/isObject"),ee=z.isObject,ae=ie("../utils/obj2xml"),re=ae.obj2xml,le=ie("../utils/checkObjectTag"),ue=le.checkObjectTag,pe=ie("../utils/getStrBytesCount"),Ee=pe.getStrBytesCount,Pe=je;Pe.putBucketLifecycle=function(){var Fe=(0,be.default)(ce.default.mark(function Ye(ze,Xe,st){var ht,ft,Lt,et,it;return ce.default.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:if(ye(ze),me(Xe)){Et.next=3;break}throw new Error("rules must be Array");case 3:return ht=this._bucketRequestParams("PUT",ze,"lifecycle",st),ft=[],Lt={LifecycleConfiguration:{Rule:ft}},Xe.forEach(function(Mt){Ie(Mt),Oe(Mt),Mt.id&&(Mt.ID=Mt.id,delete Mt.id),ft.push(Mt)}),et=re(Lt,{headers:!0,firstUpperCase:!0}),ht.content=et,ht.mime="xml",ht.successStatuses=[200],Et.next=13,this.request(ht);case 13:return it=Et.sent,Et.abrupt("return",{res:it.res});case 15:case"end":return Et.stop()}},Ye,this)}));function _e(Ye,ze,Xe){return Fe.apply(this,arguments)}return _e}();function Ie(Fe){Fe.days&&(Fe.expiration={days:Fe.days}),Fe.date&&(Fe.expiration={createdBeforeDate:Fe.date})}function ke(Fe,_e){var Ye=Fe.days,ze=Fe.createdBeforeDate;if(!Ye&&!ze)throw new Error("".concat(_e," must includes days or createdBeforeDate"));if(Ye&&!/^[1-9][0-9]*$/.test(Ye))throw new Error("days must be a positive integer");if(ze&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(ze))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function Ae(Fe){if(!me(Fe)&&!ee(Fe))throw new Error("tag must be Object or Array");Fe=ee(Fe)?[Fe]:Fe;var _e={},Ye=fe(Fe);Ye.forEach(function(ze){_e[ze.key]=ze.value}),ue(_e)}function Oe(Fe){if(Fe.id&&Ee(Fe.id)>255)throw new Error("ID is composed of 255 bytes at most");if(Fe.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(Fe.status))throw new Error("Status must be Enabled or Disabled");if(Fe.transition){if(!["IA","Archive"].includes(Fe.transition.storageClass))throw new Error("StorageClass must be IA or Archive");ke(Fe.transition,"Transition")}if(Fe.expiration){if(!Fe.expiration.expiredObjectDeleteMarker)ke(Fe.expiration,"Expiration");else if(Fe.expiration.days||Fe.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(Fe.abortMultipartUpload&&ke(Fe.abortMultipartUpload,"AbortMultipartUpload"),!Fe.expiration&&!Fe.abortMultipartUpload&&!Fe.transition&&!Fe.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(Fe.tag){if(Fe.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");Ae(Fe.tag)}}},{"../utils/checkBucketName":51,"../utils/checkObjectTag":54,"../utils/deepCopy":58,"../utils/getStrBytesCount":62,"../utils/isArray":63,"../utils/isObject":70,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/web.dom-collections.for-each.js":339}],22:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator"));ie("core-js/modules/es.array.includes.js");var be=ve(ie("@babel/runtime/helpers/asyncToGenerator")),Ce=ie("../utils/checkBucketName"),ye=Ce.checkBucketName,we=ie("../utils/obj2xml"),me=we.obj2xml,xe=je;xe.putBucketVersioning=function(){var fe=(0,be.default)(ce.default.mark(function ee(ae,re){var le,ue,pe,Ee,Pe=arguments;return ce.default.wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:if(le=Pe.length>2&&Pe[2]!==void 0?Pe[2]:{},ye(ae),["Enabled","Suspended"].includes(re)){ke.next=4;break}throw new Error("status must be Enabled or Suspended");case 4:return ue=this._bucketRequestParams("PUT",ae,"versioning",le),pe={VersioningConfiguration:{Status:re}},ue.mime="xml",ue.content=me(pe,{headers:!0}),ke.next=10,this.request(ue);case 10:return Ee=ke.sent,ke.abrupt("return",{res:Ee.res,status:Ee.status});case 12:case"end":return ke.stop()}},ee,this)}));function z(ee,ae){return fe.apply(this,arguments)}return z}()},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.includes.js":277}],23:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator")),be=ve(ie("@babel/runtime/helpers/asyncToGenerator")),Ce=ie("../utils/checkBucketName"),ye=Ce.checkBucketName,we=ie("../utils/obj2xml"),me=we.obj2xml,xe=ie("../utils/isArray"),fe=xe.isArray,z=je;z.putBucketWebsite=function(){var ee=(0,be.default)(ce.default.mark(function re(le){var ue,pe,Ee,Pe,Ie,ke,Ae,Oe=arguments;return ce.default.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:if(ue=Oe.length>1&&Oe[1]!==void 0?Oe[1]:{},pe=Oe.length>2?Oe[2]:void 0,ye(le),Ee=this._bucketRequestParams("PUT",le,"website",pe),Pe={Suffix:ue.index||"index.html"},Ie={IndexDocument:Pe},ke={WebsiteConfiguration:Ie},ue.supportSubDir&&(Pe.SupportSubDir=ue.supportSubDir),ue.type&&(Pe.Type=ue.type),ue.error&&(Ie.ErrorDocument={Key:ue.error}),ue.routingRules===void 0){_e.next=14;break}if(fe(ue.routingRules)){_e.next=13;break}throw new Error("RoutingRules must be Array");case 13:Ie.RoutingRules={RoutingRule:ue.routingRules};case 14:return ke=me(ke),Ee.content=ke,Ee.mime="xml",Ee.successStatuses=[200],_e.next=20,this.request(Ee);case 20:return Ae=_e.sent,_e.abrupt("return",{res:Ae.res});case 22:case"end":return _e.stop()}},re,this)}));function ae(re){return ee.apply(this,arguments)}return ae}()},{"../utils/checkBucketName":51,"../utils/isArray":63,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],24:[function(ie,Re,je){(function(ve){(function(){"use strict";ie("core-js/modules/es.object.to-string.js"),ie("core-js/modules/es.regexp.to-string.js"),ie("core-js/modules/web.dom-collections.for-each.js"),ie("core-js/modules/es.object.keys.js"),je.encodeCallback=function(be,Ce){if(be.headers=be.headers||{},!Object.prototype.hasOwnProperty.call(be.headers,"x-oss-callback")&&Ce.callback){var ye={callbackUrl:encodeURI(Ce.callback.url),callbackBody:Ce.callback.body};Ce.callback.host&&(ye.callbackHost=Ce.callback.host),Ce.callback.contentType&&(ye.callbackBodyType=Ce.callback.contentType);var we=ve.from(JSON.stringify(ye)).toString("base64");if(be.headers["x-oss-callback"]=we,Ce.callback.customValue){var me={};Object.keys(Ce.callback.customValue).forEach(function(xe){me["x:".concat(xe)]=Ce.callback.customValue[xe].toString()}),be.headers["x-oss-callback-var"]=ve.from(JSON.stringify(me)).toString("base64")}}}}).call(this)}).call(this,ie("buffer").Buffer)},{buffer:90,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/web.dom-collections.for-each.js":339}],25:[function(ie,Re,je){"use strict";ie("core-js/modules/es.array.concat.js"),ie("core-js/modules/es.regexp.exec.js"),ie("core-js/modules/es.string.replace.js"),ie("core-js/modules/es.object.to-string.js"),ie("core-js/modules/web.dom-collections.for-each.js");var ve=function(fe){return fe&&fe.__esModule?fe:{default:fe}};Object.defineProperty(je,"__esModule",{value:!0}),je.getReqUrl=void 0;var ce=ve(ie("copy-to")),be=ve(ie("url")),Ce=ve(ie("merge-descriptors")),ye=ve(ie("is-type-of")),we=ie("../utils/isIP"),me=ie("../utils/checkConfigValid");function xe(fe){var z={},ee=this.options.cname;me.checkConfigValid(this.options.endpoint,"endpoint"),ce.default(this.options.endpoint,!1).to(z),fe.bucket&&!ee&&!we.isIP(z.hostname)&&!this.options.sldEnable&&(z.host="".concat(fe.bucket,".").concat(z.host));var ae="/";fe.bucket&&this.options.sldEnable&&(ae+="".concat(fe.bucket,"/")),fe.object&&(ae+=this._escape(fe.object).replace(/\+/g,"%2B")),z.pathname=ae;var re={};if(fe.query&&Ce.default(re,fe.query),fe.subres){var le={};ye.default.string(fe.subres)?le[fe.subres]="":ye.default.array(fe.subres)?fe.subres.forEach(function(ue){le[ue]=""}):le=fe.subres,Ce.default(re,le)}return z.query=re,be.default.format(z)}je.getReqUrl=xe},{"../utils/checkConfigValid":52,"../utils/isIP":69,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339,"is-type-of":466,"merge-descriptors":372,url:472}],26:[function(ie,Re,je){"use strict";ie("core-js/modules/es.array.concat.js"),ie("core-js/modules/es.object.assign.js"),ie("core-js/modules/es.string.trim.js");var ve=ie("humanize-ms"),ce=ie("url"),be=ie("../utils/checkBucketName"),Ce=be.checkBucketName,ye=ie("../utils/setRegion"),we=ye.setRegion,me=ie("../utils/checkConfigValid"),xe=me.checkConfigValid;function fe(z,ee){xe(z,"endpoint");var ae=ce.parse(z);if(ae.protocol||(ae=ce.parse("http".concat(ee?"s":"","://").concat(z))),ae.protocol!=="http:"&&ae.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return ae}Re.exports=function(z){if(!z||!z.accessKeyId||!z.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");z.stsToken&&!z.refreshSTSToken&&!z.refreshSTSTokenInterval&&console.warn("It's recommended to set 'refreshSTSToken' and 'refreshSTSTokenInterval' to refresh stsToken\u3001accessKeyId\u3001accessKeySecret automatically when sts token has expired"),z.bucket&&Ce(z.bucket);var ee=Object.assign({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1,headerEncoding:"utf-8",refreshSTSToken:null,refreshSTSTokenInterval:6e4*5,retryMax:0},z);if(ee.accessKeyId=ee.accessKeyId.trim(),ee.accessKeySecret=ee.accessKeySecret.trim(),ee.timeout&&(ee.timeout=ve(ee.timeout)),ee.endpoint)ee.endpoint=fe(ee.endpoint,ee.secure);else if(ee.region)ee.endpoint=we(ee.region,ee.internal,ee.secure);else throw new Error("require options.endpoint or options.region");return ee.inited=!0,ee}},{"../utils/checkBucketName":51,"../utils/checkConfigValid":52,"../utils/setRegion":75,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.string.trim.js":308,"humanize-ms":356,url:472}],27:[function(ie,Re,je){"use strict";var ve=ie("merge-descriptors"),ce=je;ve(ce,ie("./processObjectSave"))},{"./processObjectSave":28,"merge-descriptors":372}],28:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator"));ie("core-js/modules/es.array.concat.js");var be=ve(ie("@babel/runtime/helpers/asyncToGenerator")),Ce=ie("../utils/checkBucketName"),ye=Ce.checkBucketName,we=ie("querystring"),me=ie("js-base64"),xe=me.Base64.encode,fe=je;fe.processObjectSave=function(){var ee=(0,be.default)(ce.default.mark(function re(le,ue,pe,Ee){var Pe,Ie,ke,Ae;return ce.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return z(le,"sourceObject"),z(ue,"targetObject"),z(pe,"process"),ue=this._objectName(ue),Ee&&ye(Ee),Pe=this._objectRequestParams("POST",le,{subres:"x-oss-process"}),Ie=Ee?",b_".concat(xe(Ee)):"",ue=xe(ue),ke={"x-oss-process":"".concat(pe,"|sys/saveas,o_").concat(ue).concat(Ie)},Pe.content=we.stringify(ke),Fe.next=12,this.request(Pe);case 12:return Ae=Fe.sent,Fe.abrupt("return",{res:Ae.res,status:Ae.res.status});case 14:case"end":return Fe.stop()}},re,this)}));function ae(re,le,ue,pe){return ee.apply(this,arguments)}return ae}();function z(ee,ae){if(!ee)throw new Error("".concat(ae," is required"));if(typeof ee!="string")throw new Error("".concat(ae," must be String"))}},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"js-base64":371,querystring:385}],29:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator"));ie("core-js/modules/es.array.concat.js"),ie("core-js/modules/es.function.name.js"),ie("core-js/modules/es.object.to-string.js"),ie("core-js/modules/es.promise.js"),ie("core-js/modules/es.array.from.js"),ie("core-js/modules/es.string.iterator.js"),ie("core-js/modules/es.array.map.js"),ie("core-js/modules/es.array.filter.js"),ie("core-js/modules/es.array.find.js"),ie("core-js/modules/es.regexp.to-string.js");var be=ve(ie("@babel/runtime/helpers/asyncToGenerator")),Ce=ie("debug")("ali-oss:multipart-copy"),ye=ie("copy-to"),we=je;we.uploadPartCopy=function(){var me=(0,be.default)(ce.default.mark(function fe(z,ee,ae,re,le){var ue,pe,Ee,Pe,Ie,ke=arguments;return ce.default.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:return ue=ke.length>5&&ke[5]!==void 0?ke[5]:{},ue.headers=ue.headers||{},pe=ue.versionId||ue.subres&&ue.subres.versionId||null,pe?Ee="/".concat(le.sourceBucketName,"/").concat(encodeURIComponent(le.sourceKey),"?versionId=").concat(pe):Ee="/".concat(le.sourceBucketName,"/").concat(encodeURIComponent(le.sourceKey)),ue.headers["x-oss-copy-source"]=Ee,re&&(ue.headers["x-oss-copy-source-range"]="bytes=".concat(re)),ue.subres={partNumber:ae,uploadId:ee},Pe=this._objectRequestParams("PUT",z,ue),Pe.mime=ue.mime,Pe.successStatuses=[200],Oe.next=12,this.request(Pe);case 12:return Ie=Oe.sent,Oe.abrupt("return",{name:z,etag:Ie.res.headers.etag,res:Ie.res});case 14:case"end":return Oe.stop()}},fe,this)}));function xe(fe,z,ee,ae,re){return me.apply(this,arguments)}return xe}(),we.multipartUploadCopy=function(){var me=(0,be.default)(ce.default.mark(function fe(z,ee){var ae,re,le,ue,pe,Ee,Pe,Ie,ke,Ae,Oe,Fe,_e=arguments;return ce.default.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:return ae=_e.length>2&&_e[2]!==void 0?_e[2]:{},this.resetCancelFlag(),re=ae.versionId,le=re===void 0?null:re,ue={versionId:le},ze.next=6,this._getObjectMeta(ee.sourceBucketName,ee.sourceKey,ue);case 6:if(pe=ze.sent,Ee=pe.res.headers["content-length"],ee.startOffset=ee.startOffset||0,ee.endOffset=ee.endOffset||Ee,!(ae.checkpoint&&ae.checkpoint.uploadId)){ze.next=14;break}return ze.next=13,this._resumeMultipartCopy(ae.checkpoint,ee,ae);case 13:return ze.abrupt("return",ze.sent);case 14:if(Pe=102400,Ie=ee.endOffset-ee.startOffset,!(Ie<Pe)){ze.next=18;break}throw new Error("copySize must not be smaller than ".concat(Pe));case 18:if(!(ae.partSize&&ae.partSize<Pe)){ze.next=20;break}throw new Error("partSize must not be smaller than ".concat(Pe));case 20:return ze.next=22,this.initMultipartUpload(z,ae);case 22:if(ke=ze.sent,Ae=ke.uploadId,Oe=this._getPartSize(Ie,ae.partSize),Fe={name:z,copySize:Ie,partSize:Oe,uploadId:Ae,doneParts:[]},!(ae&&ae.progress)){ze.next=29;break}return ze.next=29,ae.progress(0,Fe,ke.res);case 29:return ze.next=31,this._resumeMultipartCopy(Fe,ee,ae);case 31:return ze.abrupt("return",ze.sent);case 32:case"end":return ze.stop()}},fe,this)}));function xe(fe,z){return me.apply(this,arguments)}return xe}(),we._resumeMultipartCopy=function(){var me=(0,be.default)(ce.default.mark(function fe(z,ee,ae){var re,le,ue,pe,Ee,Pe,Ie,ke,Ae,Oe,Fe,_e,Ye,ze,Xe,st,ht,ft,Lt,et,it;return ce.default.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:if(!this.isCancel()){Et.next=2;break}throw this._makeCancelEvent();case 2:if(re=ae.versionId,le=re===void 0?null:re,ue={versionId:le},pe=z.copySize,Ee=z.partSize,Pe=z.uploadId,Ie=z.doneParts,ke=z.name,Ae=this._divideMultipartCopyParts(pe,Ee,ee.startOffset),Oe=Ae.length,Fe={headers:{}},ae.copyheaders&&ye(ae.copyheaders).to(Fe.headers),le&&ye(ue).to(Fe),_e=function(mt,pt,vt){return new Promise(function(){var jt=(0,be.default)(ce.default.mark(function At(Kt,Ct){var gt,tt,bt;return ce.default.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:if(ut.prev=0,mt.isCancel()){ut.next=22;break}return gt=Ae[pt-1],tt="".concat(gt.start,"-").concat(gt.end-1),ut.prev=4,ut.next=7,mt.uploadPartCopy(ke,Pe,pt,tt,vt,Fe);case 7:bt=ut.sent,ut.next=15;break;case 10:if(ut.prev=10,ut.t0=ut.catch(4),ut.t0.status!==404){ut.next=14;break}throw mt._makeAbortEvent();case 14:throw ut.t0;case 15:if(mt.isCancel()){ut.next=22;break}if(Ce("content-range ".concat(bt.res.headers["content-range"])),Ie.push({number:pt,etag:bt.res.headers.etag}),z.doneParts=Ie,!(ae&&ae.progress)){ut.next=22;break}return ut.next=22,ae.progress(Ie.length/Oe,z,bt.res);case 22:Kt(),ut.next=29;break;case 25:ut.prev=25,ut.t1=ut.catch(0),ut.t1.partNum=pt,Ct(ut.t1);case 29:case"end":return ut.stop()}},At,null,[[0,25],[4,10]])}));return function(At,Kt){return jt.apply(this,arguments)}}())},Ye=Array.from(new Array(Oe),function(Mt,mt){return mt+1}),ze=Ie.map(function(Mt){return Mt.number}),Xe=Ye.filter(function(Mt){return ze.indexOf(Mt)<0}),st=5,ht=ae.parallel||st,!(this.checkBrowserAndVersion("Internet Explorer","10")||ht===1)){Et.next=28;break}ft=0;case 18:if(!(ft<Xe.length)){Et.next=26;break}if(!this.isCancel()){Et.next=21;break}throw this._makeCancelEvent();case 21:return Et.next=23,_e(this,Xe[ft],ee);case 23:ft++,Et.next=18;break;case 26:Et.next=40;break;case 28:return Et.next=30,this._parallelNode(Xe,ht,_e,ee);case 30:if(Lt=Et.sent,et=Lt.find(function(Mt){return Mt.name==="abort"}),!et){Et.next=34;break}throw et;case 34:if(!this.isCancel()){Et.next=36;break}throw this._makeCancelEvent();case 36:if(!(Lt&&Lt.length>0)){Et.next=40;break}throw it=Lt[0],it.message="Failed to copy some parts with error: ".concat(it.toString()," part_num: ").concat(it.partNum),it;case 40:return Et.next=42,this.completeMultipartUpload(ke,Pe,Ie,ae);case 42:return Et.abrupt("return",Et.sent);case 43:case"end":return Et.stop()}},fe,this)}));function xe(fe,z,ee){return me.apply(this,arguments)}return xe}(),we._divideMultipartCopyParts=function(xe,fe,z){for(var ee=Math.ceil(xe/fe),ae=[],re=0;re<ee;re++){var le=fe*re+z,ue=Math.min(le+fe,xe+z);ae.push({start:le,end:ue})}return ae},we._getObjectMeta=function(){var me=(0,be.default)(ce.default.mark(function fe(z,ee,ae){var re,le;return ce.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return re=this.getBucket(),this.setBucket(z),pe.next=4,this.head(ee,ae);case 4:return le=pe.sent,this.setBucket(re),pe.abrupt("return",le);case 7:case"end":return pe.stop()}},fe,this)}));function xe(fe,z,ee){return me.apply(this,arguments)}return xe}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.iterator.js":303,debug:465}],30:[function(ie,Re,je){(function(ve){(function(){"use strict";var ce=ie("@babel/runtime/helpers/interopRequireDefault"),be=ce(ie("@babel/runtime/regenerator"));ie("core-js/modules/es.array.map.js"),ie("core-js/modules/es.array.filter.js"),ie("core-js/modules/es.object.to-string.js"),ie("core-js/modules/es.array.sort.js"),ie("core-js/modules/es.array.concat.js"),ie("core-js/modules/es.regexp.to-string.js");var Ce=ce(ie("@babel/runtime/helpers/asyncToGenerator")),ye=ie("copy-to"),we=ie("./callback"),me=ie("./utils/deepCopy"),xe=me.deepCopyWith,fe=ie("./utils/isBuffer"),z=fe.isBuffer,ee=ie("./utils/omit"),ae=ee.omit,re=je;re.listUploads=function(){var le=(0,Ce.default)(be.default.mark(function pe(Ee,Pe){var Ie,ke,Ae,Oe;return be.default.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:return Pe=Pe||{},Ie={},ye(Pe).to(Ie),Ie.subres="uploads",ke=this._objectRequestParams("GET","",Ie),ke.query=Ee,ke.xmlResponse=!0,ke.successStatuses=[200],_e.next=10,this.request(ke);case 10:return Ae=_e.sent,Oe=Ae.data.Upload||[],Array.isArray(Oe)||(Oe=[Oe]),Oe=Oe.map(function(Ye){return{name:Ye.Key,uploadId:Ye.UploadId,initiated:Ye.Initiated}}),_e.abrupt("return",{res:Ae.res,uploads:Oe,bucket:Ae.data.Bucket,nextKeyMarker:Ae.data.NextKeyMarker,nextUploadIdMarker:Ae.data.NextUploadIdMarker,isTruncated:Ae.data.IsTruncated==="true"});case 15:case"end":return _e.stop()}},pe,this)}));function ue(pe,Ee){return le.apply(this,arguments)}return ue}(),re.listParts=function(){var le=(0,Ce.default)(be.default.mark(function pe(Ee,Pe,Ie,ke){var Ae,Oe,Fe;return be.default.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:return ke=ke||{},Ae={},ye(ke).to(Ae),Ae.subres={uploadId:Pe},Oe=this._objectRequestParams("GET",Ee,Ae),Oe.query=Ie,Oe.xmlResponse=!0,Oe.successStatuses=[200],Ye.next=10,this.request(Oe);case 10:return Fe=Ye.sent,Ye.abrupt("return",{res:Fe.res,uploadId:Fe.data.UploadId,bucket:Fe.data.Bucket,name:Fe.data.Key,partNumberMarker:Fe.data.PartNumberMarker,nextPartNumberMarker:Fe.data.NextPartNumberMarker,maxParts:Fe.data.MaxParts,isTruncated:Fe.data.IsTruncated,parts:Fe.data.Part||[]});case 12:case"end":return Ye.stop()}},pe,this)}));function ue(pe,Ee,Pe,Ie){return le.apply(this,arguments)}return ue}(),re.abortMultipartUpload=function(){var le=(0,Ce.default)(be.default.mark(function pe(Ee,Pe,Ie){var ke,Ae,Oe;return be.default.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:return this._stop(),Ie=Ie||{},ke={},ye(Ie).to(ke),ke.subres={uploadId:Pe},Ae=this._objectRequestParams("DELETE",Ee,ke),Ae.successStatuses=[204],_e.next=9,this.request(Ae);case 9:return Oe=_e.sent,_e.abrupt("return",{res:Oe.res});case 11:case"end":return _e.stop()}},pe,this)}));function ue(pe,Ee,Pe){return le.apply(this,arguments)}return ue}(),re.initMultipartUpload=function(){var le=(0,Ce.default)(be.default.mark(function pe(Ee,Pe){var Ie,ke,Ae;return be.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return Pe=Pe||{},Ie={},ye(Pe).to(Ie),Ie.headers=Ie.headers||{},this._convertMetaToHeaders(Pe.meta,Ie.headers),Ie.subres="uploads",ke=this._objectRequestParams("POST",Ee,Ie),ke.mime=Pe.mime,ke.xmlResponse=!0,ke.successStatuses=[200],Fe.next=12,this.request(ke);case 12:return Ae=Fe.sent,Fe.abrupt("return",{res:Ae.res,bucket:Ae.data.Bucket,name:Ae.data.Key,uploadId:Ae.data.UploadId});case 14:case"end":return Fe.stop()}},pe,this)}));function ue(pe,Ee){return le.apply(this,arguments)}return ue}(),re.uploadPart=function(){var le=(0,Ce.default)(be.default.mark(function pe(Ee,Pe,Ie,ke,Ae,Oe,Fe){var _e,Ye;return be.default.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:if(_e={size:Oe-Ae},Ye=ve&&ve.browser,!Ye){Xe.next=8;break}return Xe.next=5,this._createBuffer(ke,Ae,Oe);case 5:_e.content=Xe.sent,Xe.next=11;break;case 8:return Xe.next=10,this._createStream(ke,Ae,Oe);case 10:_e.stream=Xe.sent;case 11:return Xe.next=13,this._uploadPart(Ee,Pe,Ie,_e,Fe);case 13:return Xe.abrupt("return",Xe.sent);case 14:case"end":return Xe.stop()}},pe,this)}));function ue(pe,Ee,Pe,Ie,ke,Ae,Oe){return le.apply(this,arguments)}return ue}(),re.completeMultipartUpload=function(){var le=(0,Ce.default)(be.default.mark(function pe(Ee,Pe,Ie,ke){var Ae,Oe,Fe,_e,Ye,ze,Xe,st;return be.default.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:for(Ae=Ie.concat().sort(function(Lt,et){return Lt.number-et.number}).filter(function(Lt,et,it){return!et||Lt.number!==it[et-1].number}),Oe=`<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
`,Fe=0;Fe<Ae.length;Fe++)_e=Ae[Fe],Oe+=`<Part>
`,Oe+="<PartNumber>".concat(_e.number,`</PartNumber>
`),Oe+="<ETag>".concat(_e.etag,`</ETag>
`),Oe+=`</Part>
`;return Oe+="</CompleteMultipartUpload>",ke=ke||{},Ye={},Ye=xe(ke,function(Lt){if(z(Lt))return null}),Ye.subres={uploadId:Pe},Ye.headers=ae(Ye.headers,["x-oss-server-side-encryption","x-oss-storage-class"]),ze=this._objectRequestParams("POST",Ee,Ye),we.encodeCallback(ze,Ye),ze.mime="xml",ze.content=Oe,ze.headers&&ze.headers["x-oss-callback"]||(ze.xmlResponse=!0),ze.successStatuses=[200],ft.next=17,this.request(ze);case 17:if(Xe=ft.sent,!ke.progress){ft.next=21;break}return ft.next=21,ke.progress(1,null,Xe.res);case 21:return st={res:Xe.res,bucket:ze.bucket,name:Ee,etag:Xe.res.headers.etag},ze.headers&&ze.headers["x-oss-callback"]&&(st.data=JSON.parse(Xe.data.toString())),ft.abrupt("return",st);case 24:case"end":return ft.stop()}},pe,this)}));function ue(pe,Ee,Pe,Ie){return le.apply(this,arguments)}return ue}(),re._uploadPart=function(){var le=(0,Ce.default)(be.default.mark(function pe(Ee,Pe,Ie,ke,Ae){var Oe,Fe,_e,Ye;return be.default.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:return Ae=Ae||{},Oe={},ye(Ae).to(Oe),Oe.headers=Oe.headers||{},Oe.headers["Content-Length"]=ke.size,Oe.headers=ae(Oe.headers,["x-oss-server-side-encryption"]),Oe.subres={partNumber:Ie,uploadId:Pe},Fe=this._objectRequestParams("PUT",Ee,Oe),Fe.mime=Oe.mime,_e=ve&&ve.browser,_e?Fe.content=ke.content:Fe.stream=ke.stream,Fe.successStatuses=[200],Fe.disabledMD5=Ae.disabledMD5,Xe.next=15,this.request(Fe);case 15:if(Ye=Xe.sent,Ye.res.headers.etag){Xe.next=18;break}throw new Error(`Please set the etag of expose-headers in OSS
https://help.aliyun.com/document_detail/32069.html`);case 18:return ke.stream&&(ke.stream=null,Fe.stream=null),Xe.abrupt("return",{name:Ee,etag:Ye.res.headers.etag,res:Ye.res});case 20:case"end":return Xe.stop()}},pe,this)}));function ue(pe,Ee,Pe,Ie,ke){return le.apply(this,arguments)}return ue}()}).call(this)}).call(this,ie("_process"))},{"./callback":24,"./utils/deepCopy":58,"./utils/isBuffer":65,"./utils/omit":73,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.map.js":280,"core-js/modules/es.array.sort.js":282,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],31:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator")),be=ve(ie("@babel/runtime/helpers/asyncToGenerator")),Ce=ie("url"),ye=ie("utility"),we=ie("copy-to"),me=ie("../../common/signUtils"),xe=ie("../utils/isIP"),fe=xe.isIP,z=ie("../utils/setSTSToken"),ee=z.setSTSToken,ae=ie("../utils/isFunction"),re=ae.isFunction,le=je;le.asyncSignatureUrl=function(){var ue=(0,be.default)(ce.default.mark(function Ee(Pe,Ie){var ke,Ae,Oe,Fe,_e;return ce.default.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:if(!fe(this.options.endpoint.hostname)){ze.next=2;break}throw new Error("can not get the object URL when endpoint is IP");case 2:if(Ie=Ie||{},Pe=this._objectName(Pe),Ie.method=Ie.method||"GET",ke=ye.timestamp()+(Ie.expires||1800),Ae={bucket:this.options.bucket,object:Pe},Oe=this._getResource(Ae),!(this.options.stsToken&&re(this.options.refreshSTSToken))){ze.next=11;break}return ze.next=11,ee.call(this);case 11:return this.options.stsToken&&(Ie["security-token"]=this.options.stsToken),Fe=me._signatureForURL(this.options.accessKeySecret,Ie,Oe,ke),_e=Ce.parse(this._getReqUrl(Ae)),_e.query={OSSAccessKeyId:this.options.accessKeyId,Expires:ke,Signature:Fe.Signature},we(Fe.subResource).to(_e.query),ze.abrupt("return",_e.format());case 17:case"end":return ze.stop()}},Ee,this)}));function pe(Ee,Pe){return ue.apply(this,arguments)}return pe}()},{"../../common/signUtils":50,"../utils/isFunction":68,"../utils/isIP":69,"../utils/setSTSToken":76,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,url:472,utility:474}],32:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator"));ie("core-js/modules/es.object.to-string.js"),ie("core-js/modules/web.dom-collections.for-each.js"),ie("core-js/modules/es.object.keys.js"),ie("core-js/modules/es.array.find.js"),ie("core-js/modules/es.array.includes.js"),ie("core-js/modules/es.array.concat.js"),ie("core-js/modules/es.regexp.exec.js"),ie("core-js/modules/es.string.replace.js");var be=ve(ie("@babel/runtime/helpers/typeof")),Ce=ve(ie("@babel/runtime/helpers/asyncToGenerator")),ye=ie("../utils/checkBucketName"),we=ye.checkBucketName,me=je,xe=["content-type","content-encoding","content-language","content-disposition","cache-control","expires"];me.copy=function(){var fe=(0,Ce.default)(ce.default.mark(function ee(ae,re,le,ue){var pe,Ee,Pe;return ce.default.wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:return(0,be.default)(le)==="object"&&(ue=le),ue=ue||{},ue.headers=ue.headers||{},Object.keys(ue.headers).forEach(function(Ae){ue.headers["x-oss-copy-source-".concat(Ae.toLowerCase())]=ue.headers[Ae]}),(ue.meta||Object.keys(ue.headers).find(function(Ae){return xe.includes(Ae.toLowerCase())}))&&(ue.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(ue.meta,ue.headers),re=this._getSourceName(re,le),ue.versionId&&(re="".concat(re,"?versionId=").concat(ue.versionId)),ue.headers["x-oss-copy-source"]=re,pe=this._objectRequestParams("PUT",ae,ue),pe.xmlResponse=!0,pe.successStatuses=[200,304],ke.next=14,this.request(pe);case 14:return Ee=ke.sent,Pe=Ee.data,Pe&&(Pe={etag:Pe.ETag,lastModified:Pe.LastModified}),ke.abrupt("return",{data:Pe,res:Ee.res});case 18:case"end":return ke.stop()}},ee,this)}));function z(ee,ae,re,le){return fe.apply(this,arguments)}return z}(),me._getSourceName=function(z,ee){return typeof ee=="string"?z=this._objectName(z):z[0]!=="/"?ee=this.options.bucket:(ee=z.replace(/\/(.+?)(\/.*)/,"$1"),z=z.replace(/(\/.+?\/)(.*)/,"$2")),we(ee),z=encodeURIComponent(z),z="/".concat(ee,"/").concat(z),z}},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],33:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator"));ie("core-js/modules/es.object.assign.js");var be=ve(ie("@babel/runtime/helpers/asyncToGenerator")),Ce=je;Ce.delete=function(){var ye=(0,be.default)(ce.default.mark(function me(xe){var fe,z,ee,ae=arguments;return ce.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return fe=ae.length>1&&ae[1]!==void 0?ae[1]:{},fe.subres=Object.assign({},fe.subres),fe.versionId&&(fe.subres.versionId=fe.versionId),z=this._objectRequestParams("DELETE",xe,fe),z.successStatuses=[204],le.next=7,this.request(z);case 7:return ee=le.sent,le.abrupt("return",{res:ee.res});case 9:case"end":return le.stop()}},me,this)}));function we(me){return ye.apply(this,arguments)}return we}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],34:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator"));ie("core-js/modules/es.object.assign.js");var be=ve(ie("@babel/runtime/helpers/asyncToGenerator")),Ce=ie("utility"),ye=ie("../utils/obj2xml"),we=ye.obj2xml,me=je;me.deleteMulti=function(){var xe=(0,be.default)(ce.default.mark(function z(ee){var ae,re,le,ue,pe,Ee,Pe,Ie,ke,Ae,Oe,Fe,_e,Ye=arguments;return ce.default.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:if(ae=Ye.length>1&&Ye[1]!==void 0?Ye[1]:{},re=[],!(!ee||!ee.length)){Xe.next=4;break}throw new Error("names is required");case 4:for(le=0;le<ee.length;le++)ue={},typeof ee[le]=="string"?ue.Key=Ce.escape(this._objectName(ee[le])):(pe=ee[le],Ee=pe.key,Pe=pe.versionId,ue.Key=Ce.escape(this._objectName(Ee)),ue.VersionId=Pe),re.push(ue);return Ie={Delete:{Quiet:!!ae.quiet,Object:re}},ke=we(Ie,{headers:!0}),ae.subres=Object.assign({delete:""},ae.subres),ae.versionId&&(ae.subres.versionId=ae.versionId),Ae=this._objectRequestParams("POST","",ae),Ae.mime="xml",Ae.content=ke,Ae.xmlResponse=!0,Ae.successStatuses=[200],Xe.next=16,this.request(Ae);case 16:return Oe=Xe.sent,Fe=Oe.data,_e=Fe&&Fe.Deleted||null,_e&&(Array.isArray(_e)||(_e=[_e])),Xe.abrupt("return",{res:Oe.res,deleted:_e||[]});case 21:case"end":return Xe.stop()}},z,this)}));function fe(z){return xe.apply(this,arguments)}return fe}()},{"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,utility:474}],35:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator"));ie("core-js/modules/es.object.assign.js");var be=ve(ie("@babel/runtime/helpers/asyncToGenerator")),Ce=je;Ce.deleteObjectTagging=function(){var ye=(0,be.default)(ce.default.mark(function me(xe){var fe,z,ee,ae=arguments;return ce.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return fe=ae.length>1&&ae[1]!==void 0?ae[1]:{},fe.subres=Object.assign({tagging:""},fe.subres),fe.versionId&&(fe.subres.versionId=fe.versionId),xe=this._objectName(xe),z=this._objectRequestParams("DELETE",xe,fe),z.successStatuses=[204],le.next=8,this.request(z);case 8:return ee=le.sent,le.abrupt("return",{status:ee.status,res:ee.res});case 10:case"end":return le.stop()}},me,this)}));function we(me){return ye.apply(this,arguments)}return we}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],36:[function(ie,Re,je){"use strict";ie("core-js/modules/es.array.concat.js");var ve=ie("url"),ce=ie("../utils/isIP"),be=ce.isIP,Ce=je;Ce.generateObjectUrl=function(we,me){if(be(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");if(me)me[me.length-1]!=="/"&&(me+="/");else{me=this.options.endpoint.format();var xe=ve.parse(me),fe=this.options.bucket;xe.hostname="".concat(fe,".").concat(xe.hostname),xe.host="".concat(fe,".").concat(xe.host),me=xe.format()}return me+this._escape(this._objectName(we))}},{"../utils/isIP":69,"core-js/modules/es.array.concat.js":272,url:472}],37:[function(ie,Re,je){(function(ve){(function(){"use strict";var ce=ie("@babel/runtime/helpers/interopRequireDefault"),be=ce(ie("@babel/runtime/regenerator"));ie("core-js/modules/es.object.assign.js");var Ce=ce(ie("@babel/runtime/helpers/asyncToGenerator")),ye=ie("fs"),we=ie("is-type-of"),me=je;me.get=function(){var xe=(0,Ce.default)(be.default.mark(function z(ee,ae){var re,le,ue,pe,Ee,Pe,Ie,ke,Ae=arguments;return be.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return re=Ae.length>2&&Ae[2]!==void 0?Ae[2]:{},le=null,ue=!1,we.writableStream(ae)?le=ae:we.string(ae)?(le=ye.createWriteStream(ae),ue=!0):re=ae,re=re||{},pe=ve&&ve.browser,Ee=re.responseCacheControl===null?"":"no-cache",Pe=pe&&Ee?{"response-cache-control":Ee}:{},re.subres=Object.assign(Pe,re.subres),re.versionId&&(re.subres.versionId=re.versionId),re.process&&(re.subres["x-oss-process"]=re.process),Fe.prev=11,ke=this._objectRequestParams("GET",ee,re),ke.writeStream=le,ke.successStatuses=[200,206,304],Fe.next=17,this.request(ke);case 17:Ie=Fe.sent,ue&&le.destroy(),Fe.next=28;break;case 21:if(Fe.prev=21,Fe.t0=Fe.catch(11),!ue){Fe.next=27;break}return le.destroy(),Fe.next=27,this._deleteFileSafe(ae);case 27:throw Fe.t0;case 28:return Fe.abrupt("return",{res:Ie.res,content:Ie.data});case 29:case"end":return Fe.stop()}},z,this,[[11,21]])}));function fe(z,ee){return xe.apply(this,arguments)}return fe}()}).call(this)}).call(this,ie("_process"))},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,"core-js/modules/es.object.assign.js":287,fs:89,"is-type-of":466}],38:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator"));ie("core-js/modules/es.object.assign.js");var be=ve(ie("@babel/runtime/helpers/asyncToGenerator")),Ce=je;Ce.getACL=function(){var ye=(0,be.default)(ce.default.mark(function me(xe){var fe,z,ee,ae=arguments;return ce.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return fe=ae.length>1&&ae[1]!==void 0?ae[1]:{},fe.subres=Object.assign({acl:""},fe.subres),fe.versionId&&(fe.subres.versionId=fe.versionId),xe=this._objectName(xe),z=this._objectRequestParams("GET",xe,fe),z.successStatuses=[200],z.xmlResponse=!0,le.next=9,this.request(z);case 9:return ee=le.sent,le.abrupt("return",{acl:ee.data.AccessControlList.Grant,owner:{id:ee.data.Owner.ID,displayName:ee.data.Owner.DisplayName},res:ee.res});case 11:case"end":return le.stop()}},me,this)}));function we(me){return ye.apply(this,arguments)}return we}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],39:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator"));ie("core-js/modules/es.regexp.exec.js"),ie("core-js/modules/es.string.replace.js"),ie("core-js/modules/es.object.to-string.js"),ie("core-js/modules/web.dom-collections.for-each.js"),ie("core-js/modules/es.object.keys.js"),ie("core-js/modules/es.object.assign.js"),ie("core-js/modules/es.array.map.js"),ie("core-js/modules/es.number.constructor.js");var be=ve(ie("@babel/runtime/helpers/asyncToGenerator")),Ce=je,ye=ie("../utils/isObject"),we=ye.isObject,me=ie("../utils/isArray"),xe=me.isArray;Ce.getBucketVersions=fe,Ce.listObjectVersions=fe;function fe(){return z.apply(this,arguments)}function z(){return z=(0,be.default)(ce.default.mark(function re(){var le,ue,pe,Ee,Pe,Ie,ke,Ae,Oe=arguments;return ce.default.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:if(le=Oe.length>0&&Oe[0]!==void 0?Oe[0]:{},ue=Oe.length>1&&Oe[1]!==void 0?Oe[1]:{},!(le.versionIdMarker&&le.keyMarker===void 0)){_e.next=4;break}throw new Error("A version-id marker cannot be specified without a key marker");case 4:return ue.subres=Object.assign({versions:""},ue.subres),ue.versionId&&(ue.subres.versionId=ue.versionId),pe=this._objectRequestParams("GET","",ue),pe.xmlResponse=!0,pe.successStatuses=[200],pe.query=ae(le),_e.next=12,this.request(pe);case 12:return Ee=_e.sent,Pe=Ee.data.Version||[],Ie=Ee.data.DeleteMarker||[],ke=this,Pe&&(Array.isArray(Pe)||(Pe=[Pe]),Pe=Pe.map(function(Ye){return{name:Ye.Key,url:ke._objectUrl(Ye.Key),lastModified:Ye.LastModified,isLatest:Ye.IsLatest==="true",versionId:Ye.VersionId,etag:Ye.ETag,type:Ye.Type,size:Number(Ye.Size),storageClass:Ye.StorageClass,owner:{id:Ye.Owner.ID,displayName:Ye.Owner.DisplayName}}})),Ie&&(xe(Ie)||(Ie=[Ie]),Ie=Ie.map(function(Ye){return{name:Ye.Key,lastModified:Ye.LastModified,versionId:Ye.VersionId,owner:{id:Ye.Owner.ID,displayName:Ye.Owner.DisplayName}}})),Ae=Ee.data.CommonPrefixes||null,Ae&&(xe(Ae)||(Ae=[Ae]),Ae=Ae.map(function(Ye){return Ye.Prefix})),_e.abrupt("return",{res:Ee.res,objects:Pe,deleteMarker:Ie,prefixes:Ae,nextMarker:Ee.data.NextKeyMarker||null,NextVersionIdMarker:Ee.data.NextVersionIdMarker||null,nextKeyMarker:Ee.data.NextKeyMarker||null,nextVersionIdMarker:Ee.data.NextVersionIdMarker||null,isTruncated:Ee.data.IsTruncated==="true"});case 21:case"end":return _e.stop()}},re,this)})),z.apply(this,arguments)}function ee(re){return re.replace(/([A-Z])/g,"-$1").toLowerCase()}function ae(){var re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},le={};return we(re)&&Object.keys(re).forEach(function(ue){le[ee(ue)]=re[ue]}),le}},{"../utils/isArray":63,"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280,"core-js/modules/es.number.constructor.js":286,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],40:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator"));ie("core-js/modules/es.object.assign.js");var be=ve(ie("@babel/runtime/helpers/asyncToGenerator")),Ce=je;Ce.getObjectMeta=function(){var ye=(0,be.default)(ce.default.mark(function me(xe,fe){var z,ee;return ce.default.wrap(function(re){for(;;)switch(re.prev=re.next){case 0:return fe=fe||{},xe=this._objectName(xe),fe.subres=Object.assign({objectMeta:""},fe.subres),fe.versionId&&(fe.subres.versionId=fe.versionId),z=this._objectRequestParams("HEAD",xe,fe),z.successStatuses=[200],re.next=8,this.request(z);case 8:return ee=re.sent,re.abrupt("return",{status:ee.status,res:ee.res});case 10:case"end":return re.stop()}},me,this)}));function we(me,xe){return ye.apply(this,arguments)}return we}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],41:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator"));ie("core-js/modules/es.object.assign.js"),ie("core-js/modules/es.object.to-string.js"),ie("core-js/modules/web.dom-collections.for-each.js");var be=ve(ie("@babel/runtime/helpers/asyncToGenerator")),Ce=je,ye=ie("../utils/isObject"),we=ye.isObject;Ce.getObjectTagging=function(){var me=(0,be.default)(ce.default.mark(function fe(z){var ee,ae,re,le,ue,pe,Ee=arguments;return ce.default.wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:return ee=Ee.length>1&&Ee[1]!==void 0?Ee[1]:{},ee.subres=Object.assign({tagging:""},ee.subres),ee.versionId&&(ee.subres.versionId=ee.versionId),z=this._objectName(z),ae=this._objectRequestParams("GET",z,ee),ae.successStatuses=[200],Ie.next=8,this.request(ae);case 8:return re=Ie.sent,Ie.next=11,this.parseXML(re.data);case 11:return le=Ie.sent,ue=le.TagSet.Tag,ue=ue&&we(ue)?[ue]:ue||[],pe={},ue.forEach(function(ke){pe[ke.Key]=ke.Value}),Ie.abrupt("return",{status:re.status,res:re.res,tag:pe});case 17:case"end":return Ie.stop()}},fe,this)}));function xe(fe){return me.apply(this,arguments)}return xe}()},{"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],42:[function(ie,Re,je){"use strict";var ve=ie("../utils/isIP"),ce=ve.isIP,be=je;be.getObjectUrl=function(ye,we){if(ce(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");return we?we[we.length-1]!=="/"&&(we+="/"):we=this.options.endpoint.format(),we+this._escape(this._objectName(ye))}},{"../utils/isIP":69}],43:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator"));ie("core-js/modules/es.object.assign.js");var be=ve(ie("@babel/runtime/helpers/asyncToGenerator")),Ce=je;Ce.getSymlink=function(){var ye=(0,be.default)(ce.default.mark(function me(xe){var fe,z,ee,ae,re=arguments;return ce.default.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return fe=re.length>1&&re[1]!==void 0?re[1]:{},fe.subres=Object.assign({symlink:""},fe.subres),fe.versionId&&(fe.subres.versionId=fe.versionId),xe=this._objectName(xe),z=this._objectRequestParams("GET",xe,fe),z.successStatuses=[200],ue.next=8,this.request(z);case 8:return ee=ue.sent,ae=ee.res.headers["x-oss-symlink-target"],ue.abrupt("return",{targetName:decodeURIComponent(ae),res:ee.res});case 11:case"end":return ue.stop()}},me,this)}));function we(me){return ye.apply(this,arguments)}return we}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],44:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator"));ie("core-js/modules/es.object.assign.js"),ie("core-js/modules/es.object.to-string.js"),ie("core-js/modules/web.dom-collections.for-each.js"),ie("core-js/modules/es.object.keys.js");var be=ve(ie("@babel/runtime/helpers/asyncToGenerator")),Ce=ie("../utils/checkEnv"),ye=Ce.checkEnv,we=je;we.head=function(){var me=(0,be.default)(ce.default.mark(function fe(z){var ee,ae,re,le,ue=arguments;return ce.default.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return ee=ue.length>1&&ue[1]!==void 0?ue[1]:{},ye("Because HeadObject has gzip enabled, head cannot get the file size correctly. If you need to get the file size, please use getObjectMeta"),ee.subres=Object.assign({},ee.subres),ee.versionId&&(ee.subres.versionId=ee.versionId),ae=this._objectRequestParams("HEAD",z,ee),ae.successStatuses=[200,304],Ee.next=8,this.request(ae);case 8:return re=Ee.sent,le={meta:null,res:re.res,status:re.status},re.status===200&&Object.keys(re.headers).forEach(function(Pe){Pe.indexOf("x-oss-meta-")===0&&(le.meta||(le.meta={}),le.meta[Pe.substring(11)]=re.headers[Pe])}),Ee.abrupt("return",le);case 12:case"end":return Ee.stop()}},fe,this)}));function xe(fe){return me.apply(this,arguments)}return xe}()},{"../utils/checkEnv":53,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],45:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator"));ie("core-js/modules/es.object.assign.js");var be=ve(ie("@babel/runtime/helpers/asyncToGenerator")),Ce=je;Ce.putACL=function(){var ye=(0,be.default)(ce.default.mark(function me(xe,fe,z){var ee,ae;return ce.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return z=z||{},z.subres=Object.assign({acl:""},z.subres),z.versionId&&(z.subres.versionId=z.versionId),z.headers=z.headers||{},z.headers["x-oss-object-acl"]=fe,xe=this._objectName(xe),ee=this._objectRequestParams("PUT",xe,z),ee.successStatuses=[200],le.next=10,this.request(ee);case 10:return ae=le.sent,le.abrupt("return",{res:ae.res});case 12:case"end":return le.stop()}},me,this)}));function we(me,xe,fe){return ye.apply(this,arguments)}return we}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],46:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator"));ie("core-js/modules/es.object.assign.js"),ie("core-js/modules/es.array.map.js"),ie("core-js/modules/es.object.keys.js");var be=ve(ie("@babel/runtime/helpers/asyncToGenerator")),Ce=ie("../utils/obj2xml"),ye=Ce.obj2xml,we=ie("../utils/checkObjectTag"),me=we.checkObjectTag,xe=je;xe.putObjectTagging=function(){var fe=(0,be.default)(ce.default.mark(function ee(ae,re){var le,ue,pe,Ee,Pe=arguments;return ce.default.wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:return le=Pe.length>2&&Pe[2]!==void 0?Pe[2]:{},me(re),le.subres=Object.assign({tagging:""},le.subres),le.versionId&&(le.subres.versionId=le.versionId),ae=this._objectName(ae),ue=this._objectRequestParams("PUT",ae,le),ue.successStatuses=[200],re=Object.keys(re).map(function(Ae){return{Key:Ae,Value:re[Ae]}}),pe={Tagging:{TagSet:{Tag:re}}},ue.mime="xml",ue.content=ye(pe),ke.next=13,this.request(ue);case 13:return Ee=ke.sent,ke.abrupt("return",{res:Ee.res,status:Ee.status});case 15:case"end":return ke.stop()}},ee,this)}));function z(ee,ae){return fe.apply(this,arguments)}return z}()},{"../utils/checkObjectTag":54,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290}],47:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator"));ie("core-js/modules/es.object.assign.js");var be=ve(ie("@babel/runtime/helpers/asyncToGenerator")),Ce=je;Ce.putSymlink=function(){var ye=(0,be.default)(ce.default.mark(function me(xe,fe,z){var ee,ae;return ce.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return z=z||{},z.headers=z.headers||{},fe=this._escape(this._objectName(fe)),this._convertMetaToHeaders(z.meta,z.headers),z.headers["x-oss-symlink-target"]=fe,z.subres=Object.assign({symlink:""},z.subres),z.versionId&&(z.subres.versionId=z.versionId),z.storageClass&&(z.headers["x-oss-storage-class"]=z.storageClass),xe=this._objectName(xe),ee=this._objectRequestParams("PUT",xe,z),ee.successStatuses=[200],le.next=13,this.request(ee);case 13:return ae=le.sent,le.abrupt("return",{res:ae.res});case 15:case"end":return le.stop()}},me,this)}));function we(me,xe,fe){return ye.apply(this,arguments)}return we}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],48:[function(ie,Re,je){"use strict";var ve=ie("url"),ce=ie("utility"),be=ie("copy-to"),Ce=ie("../../common/signUtils"),ye=ie("../utils/isIP"),we=ye.isIP,me=je;me.signatureUrl=function(fe,z){if(we(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");z=z||{},fe=this._objectName(fe),z.method=z.method||"GET";var ee=ce.timestamp()+(z.expires||1800),ae={bucket:this.options.bucket,object:fe},re=this._getResource(ae);this.options.stsToken&&(z["security-token"]=this.options.stsToken);var le=Ce._signatureForURL(this.options.accessKeySecret,z,re,ee),ue=ve.parse(this._getReqUrl(ae));return ue.query={OSSAccessKeyId:this.options.accessKeyId,Expires:ee,Signature:le.Signature},be(le.subResource).to(ue.query),ue.format()}},{"../../common/signUtils":50,"../utils/isIP":69,"copy-to":94,url:472,utility:474}],49:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator"));ie("core-js/modules/es.array.iterator.js"),ie("core-js/modules/es.object.to-string.js"),ie("core-js/modules/es.promise.js"),ie("core-js/modules/es.string.iterator.js"),ie("core-js/modules/web.dom-collections.iterator.js"),ie("core-js/modules/web.dom-collections.for-each.js"),ie("core-js/modules/es.function.name.js");var be=ve(ie("@babel/runtime/helpers/asyncToGenerator")),Ce=ie("./utils/isArray"),ye=Ce.isArray,we=je;we._parallelNode=function(){var me=(0,be.default)(ce.default.mark(function fe(z,ee,ae,re){var le,ue,pe,Ee,Pe,Ie,ke,Ae;return ce.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:le=this,ue=[],pe=[],Ee=z.length/ee,Pe=z.length%ee,Ie=Pe===0?Ee:(z.length-Pe)/ee+1,ke=1,Ae=0;case 8:if(!(Ae<z.length)){Fe.next=26;break}if(!le.isCancel()){Fe.next=11;break}return Fe.abrupt("break",26);case 11:if(re?pe.push(ae(le,z[Ae],re)):pe.push(ae(le,z[Ae])),!(pe.length===ee||ke===Ie&&Ae===z.length-1)){Fe.next=23;break}return Fe.prev=13,ke+=1,Fe.next=17,Promise.all(pe);case 17:Fe.next=22;break;case 19:Fe.prev=19,Fe.t0=Fe.catch(13),ue.push(Fe.t0);case 22:pe=[];case 23:Ae++,Fe.next=8;break;case 26:return Fe.abrupt("return",ue);case 27:case"end":return Fe.stop()}},fe,this,[[13,19]])}));function xe(fe,z,ee,ae){return me.apply(this,arguments)}return xe}(),we._parallel=function(xe,fe,z){var ee=this;return new Promise(function(ae){var re=[];if(fe<=0||!xe){ae(re);return}function le(Fe){return function(){if(Fe===null)throw new Error("Callback was already called.");var _e=Fe;Fe=null;for(var Ye=arguments.length,ze=new Array(Ye),Xe=0;Xe<Ye;Xe++)ze[Xe]=arguments[Xe];_e.apply(this,ze)}}function ue(Fe){var _e=-1,Ye=Fe.length;return function(){return++_e<Ye&&!ee.isCancel()?{value:Fe[_e],key:_e}:null}}var pe=ue(xe),Ee=!1,Pe=0,Ie=!1;function ke(Fe){Pe-=1,Fe?(Ee=!0,re.push(Fe),ae(re)):Ee&&Pe<=0?(Ee=!0,ae(re)):Ie||(ee.isCancel()?ae(re):Oe())}function Ae(Fe,_e){z(Fe).then(function(Ye){_e(null,Ye)}).catch(function(Ye){_e(Ye)})}function Oe(){for(Ie=!0;Pe<fe&&!Ee&&!ee.isCancel();){var Fe=pe();if(Fe===null||re.length>0){Ee=!0,Pe<=0&&ae(re);return}Pe+=1,Ae(Fe.value,le(ke))}Ie=!1}Oe()})},we.cancel=function(xe){this.options.cancelFlag=!0,ye(this.multipartUploadStreams)&&this.multipartUploadStreams.forEach(function(fe){if(fe.destroyed===!1){var z={name:"cancel",message:"cancel"};fe.destroy(z)}}),this.multipartUploadStreams=[],xe&&this.abortMultipartUpload(xe.name,xe.uploadId,xe.options)},we.isCancel=function(){return this.options.cancelFlag},we.resetCancelFlag=function(){this.options.cancelFlag=!1},we._stop=function(){this.options.cancelFlag=!0},we._makeCancelEvent=function(){var xe={status:0,name:"cancel"};return xe},we._makeAbortEvent=function(){var xe={status:0,name:"abort",message:"upload task has been abort"};return xe}},{"./utils/isArray":63,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.string.iterator.js":303,"core-js/modules/web.dom-collections.for-each.js":339,"core-js/modules/web.dom-collections.iterator.js":340}],50:[function(ie,Re,je){(function(ve){(function(){"use strict";ie("core-js/modules/es.string.trim.js"),ie("core-js/modules/es.array.sort.js"),ie("core-js/modules/es.array.join.js"),ie("core-js/modules/es.object.to-string.js"),ie("core-js/modules/web.dom-collections.for-each.js"),ie("core-js/modules/es.object.keys.js"),ie("core-js/modules/es.array.concat.js"),ie("core-js/modules/es.regexp.to-string.js");var ce=ie("./../../shims/crypto/crypto.js"),be=ie("is-type-of"),Ce=ie("./utils/lowercaseKeyHeader"),ye=Ce.lowercaseKeyHeader;je.buildCanonicalizedResource=function(me,xe){var fe="".concat(me),z="?";if(be.string(xe)&&xe.trim()!=="")fe+=z+xe;else if(be.array(xe))xe.sort(),fe+=z+xe.join("&");else if(xe){var ee=function(le,ue){return le[0]>ue[0]?1:le[0]<ue[0]?-1:0},ae=function(le){fe+=z+le,(xe[le]||xe[le]===0)&&(fe+="=".concat(xe[le])),z="&"};Object.keys(xe).sort(ee).forEach(ae)}return fe},je.buildCanonicalString=function(me,xe,fe,z){fe=fe||{};var ee=ye(fe.headers),ae="x-oss-",re=[],le={},ue=[me.toUpperCase(),ee["content-md5"]||"",ee["content-type"],z||ee["x-oss-date"]];return Object.keys(ee).forEach(function(pe){var Ee=pe.toLowerCase();Ee.indexOf(ae)===0&&(le[Ee]=String(ee[pe]).trim())}),Object.keys(le).sort().forEach(function(pe){re.push("".concat(pe,":").concat(le[pe]))}),ue=ue.concat(re),ue.push(this.buildCanonicalizedResource(xe,fe.parameters)),ue.join(`
`)},je.computeSignature=function(me,xe){var fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"utf-8",z=ce.createHmac("sha1",me);return z.update(ve.from(xe,fe)).digest("base64")},je.authorization=function(me,xe,fe,z){return"OSS ".concat(me,":").concat(this.computeSignature(xe,fe,z))},je._signatureForURL=function(me){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},fe=arguments.length>2?arguments[2]:void 0,z=arguments.length>3?arguments[3]:void 0,ee=arguments.length>4?arguments[4]:void 0,ae={},re=xe.subResource,le=re===void 0?{}:re;if(xe.process){var ue="x-oss-process";le[ue]=xe.process}if(xe.trafficLimit){var pe="x-oss-traffic-limit";le[pe]=xe.trafficLimit}if(xe.response&&Object.keys(xe.response).forEach(function(ke){var Ae="response-".concat(ke.toLowerCase());le[Ae]=xe.response[ke]}),Object.keys(xe).forEach(function(ke){var Ae=ke.toLowerCase(),Oe=xe[ke];Ae.indexOf("x-oss-")===0?ae[Ae]=Oe:(Ae.indexOf("content-md5")===0||Ae.indexOf("content-type")===0)&&(ae[ke]=Oe)}),Object.prototype.hasOwnProperty.call(xe,"security-token")&&(le["security-token"]=xe["security-token"]),Object.prototype.hasOwnProperty.call(xe,"callback")){var Ee={callbackUrl:encodeURI(xe.callback.url),callbackBody:xe.callback.body};if(xe.callback.host&&(Ee.callbackHost=xe.callback.host),xe.callback.contentType&&(Ee.callbackBodyType=xe.callback.contentType),le.callback=ve.from(JSON.stringify(Ee)).toString("base64"),xe.callback.customValue){var Pe={};Object.keys(xe.callback.customValue).forEach(function(ke){Pe["x:".concat(ke)]=xe.callback.customValue[ke]}),le["callback-var"]=ve.from(JSON.stringify(Pe)).toString("base64")}}var Ie=this.buildCanonicalString(xe.method,fe,{headers:ae,parameters:le},z.toString());return{Signature:this.computeSignature(me,Ie,ee),subResource:le}}}).call(this)}).call(this,ie("buffer").Buffer)},{"./../../shims/crypto/crypto.js":461,"./utils/lowercaseKeyHeader":71,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.sort.js":282,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.trim.js":308,"core-js/modules/web.dom-collections.for-each.js":339,"is-type-of":466}],51:[function(ie,Re,je){"use strict";ie("core-js/modules/es.regexp.exec.js"),Object.defineProperty(je,"__esModule",{value:!0}),je.checkBucketName=void 0,je.checkBucketName=function(ve){var ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,be=ce?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!be.test(ve))throw new Error("The bucket must be conform to the specifications")}},{"core-js/modules/es.regexp.exec.js":300}],52:[function(ie,Re,je){"use strict";ie("core-js/modules/es.regexp.exec.js"),Object.defineProperty(je,"__esModule",{value:!0}),je.checkConfigValid=void 0;var ve={endpoint:ce,region:/^[a-zA-Z0-9\-_]+$/};function ce(be){return typeof be=="string"?/^[a-zA-Z0-9._:/-]+$/.test(be):be.host?/^[a-zA-Z0-9._:/-]+$/.test(be.host):!1}je.checkConfigValid=function(be,Ce){if(ve[Ce]){var ye=!0;if(ve[Ce]instanceof Function?ye=ve[Ce](be):ye=ve[Ce].test(be),!ye)throw new Error("The ".concat(Ce," must be conform to the specifications"))}}},{"core-js/modules/es.regexp.exec.js":300}],53:[function(ie,Re,je){(function(ve){(function(){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.checkEnv=void 0;function ce(be){ve.browser&&console.warn(be)}je.checkEnv=ce}).call(this)}).call(this,ie("_process"))},{_process:467}],54:[function(ie,Re,je){"use strict";ie("core-js/modules/es.array.concat.js"),ie("core-js/modules/es.object.entries.js"),ie("core-js/modules/es.object.to-string.js"),ie("core-js/modules/web.dom-collections.for-each.js"),Object.defineProperty(je,"__esModule",{value:!0}),je.checkObjectTag=void 0;var ve=ie("./checkValid"),ce=ve.checkValid,be=ie("./isObject"),Ce=be.isObject,ye=[{validator:function(fe){if(typeof fe!="string")throw new Error("the key and value of the tag must be String")}},{pattern:/^[a-zA-Z0-9 +-=._:/]+$/,msg:"tag can contain letters, numbers, spaces, and the following symbols: plus sign (+), hyphen (-), equal sign (=), period (.), underscore (_), colon (:), and forward slash (/)"}],we={key:[].concat(ye,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(ye,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function me(xe){if(!Ce(xe))throw new Error("tag must be Object");var fe=Object.entries(xe);if(fe.length>10)throw new Error("maximum of 10 tags for a object");var z=["key","value"];fe.forEach(function(ee){ee.forEach(function(ae,re){ce(ae,we[z[re]])})})}je.checkObjectTag=me},{"./checkValid":55,"./isObject":70,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.entries.js":288,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],55:[function(ie,Re,je){"use strict";ie("core-js/modules/es.object.to-string.js"),ie("core-js/modules/web.dom-collections.for-each.js"),ie("core-js/modules/es.regexp.exec.js"),Object.defineProperty(je,"__esModule",{value:!0}),je.checkValid=void 0;function ve(ce,be){be.forEach(function(Ce){if(Ce.validator)Ce.validator(ce);else if(Ce.pattern&&!Ce.pattern.test(ce))throw new Error(Ce.msg)})}je.checkValid=ve},{"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/web.dom-collections.for-each.js":339}],56:[function(ie,Re,je){(function(ve){(function(){"use strict";ie("core-js/modules/es.array.includes.js"),ie("core-js/modules/es.string.includes.js"),ie("core-js/modules/es.object.assign.js"),ie("core-js/modules/es.array.concat.js"),Object.defineProperty(je,"__esModule",{value:!0}),je.createRequest=void 0;var ce=ie("./../../../shims/crypto/crypto.js"),be=ie("debug")("ali-oss"),Ce=ie("mime"),ye=ie("dateformat"),we=ie("copy-to"),me=ie("path"),xe=ie("./encoder"),fe=xe.encoder,z=ie("./isIP"),ee=z.isIP,ae=ie("./setRegion"),re=ae.setRegion,le=ie("../client/getReqUrl"),ue=le.getReqUrl,pe=ie("./isDingTalk"),Ee=pe.isDingTalk;function Pe(Ae,Oe){return Ae[Oe]||Ae[Oe.toLowerCase()]}function Ie(Ae,Oe){delete Ae[Oe],delete Ae[Oe.toLowerCase()]}function ke(Ae){var Oe=new Date;this.options.amendTimeSkewed&&(Oe=+new Date+this.options.amendTimeSkewed);var Fe={"x-oss-date":ye(Oe,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'")};typeof window!="undefined"&&(Fe["x-oss-user-agent"]=this.userAgent),this.userAgent.includes("nodejs")&&(Fe["User-Agent"]=this.userAgent),this.options.isRequestPay&&Object.assign(Fe,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(Fe["x-oss-security-token"]=this.options.stsToken),we(Ae.headers).to(Fe),Pe(Fe,"Content-Type")||(Ae.mime&&Ae.mime.indexOf("/")>0?Fe["Content-Type"]=Ae.mime:Ee()?Fe["Content-Type"]="application/octet-stream":Fe["Content-Type"]=Ce.getType(Ae.mime||me.extname(Ae.object||""))),Pe(Fe,"Content-Type")||Ie(Fe,"Content-Type"),Ae.content&&(Ae.disabledMD5||(!Ae.headers||!Ae.headers["Content-MD5"]?Fe["Content-MD5"]=ce.createHash("md5").update(ve.from(Ae.content,"utf8")).digest("base64"):Fe["Content-MD5"]=Ae.headers["Content-MD5"]),Fe["Content-Length"]||(Fe["Content-Length"]=Ae.content.length));var _e=Object.prototype.hasOwnProperty;for(var Ye in Fe)Fe[Ye]&&_e.call(Fe,Ye)&&(Fe[Ye]=fe(String(Fe[Ye]),this.options.headerEncoding));var ze=this._getResource(Ae);if(Fe.authorization=this.authorization(Ae.method,ze,Ae.subres,Fe,this.options.headerEncoding),ee(this.options.endpoint.hostname)){var Xe=this.options,st=Xe.region,ht=Xe.internal,ft=Xe.secure,Lt=re(st,ht,ft);Fe.host="".concat(Ae.bucket,".").concat(Lt.host)}var et=ue.bind(this)(Ae);be("request %s %s, with headers %j, !!stream: %s",Ae.method,et,Fe,!!Ae.stream);var it=Ae.timeout||this.options.timeout,xt={method:Ae.method,content:Ae.content,stream:Ae.stream,headers:Fe,timeout:it,writeStream:Ae.writeStream,customResponse:Ae.customResponse,ctx:Ae.ctx||this.ctx};return this.agent&&(xt.agent=this.agent),this.httpsAgent&&(xt.httpsAgent=this.httpsAgent),xt.enableProxy=!!this.options.enableProxy,xt.proxy=this.options.proxy?this.options.proxy:null,{url:et,params:xt}}je.createRequest=ke}).call(this)}).call(this,ie("buffer").Buffer)},{"../client/getReqUrl":25,"./../../../shims/crypto/crypto.js":461,"./encoder":59,"./isDingTalk":66,"./isIP":69,"./setRegion":75,buffer:90,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.string.includes.js":302,dateformat:342,debug:465,mime:374,path:378}],57:[function(ie,Re,je){"use strict";ie("core-js/modules/es.object.to-string.js"),ie("core-js/modules/web.dom-collections.for-each.js"),ie("core-js/modules/es.object.entries.js"),ie("core-js/modules/es.regexp.exec.js"),ie("core-js/modules/es.string.replace.js"),ie("core-js/modules/es.array.includes.js"),ie("core-js/modules/es.object.keys.js"),Object.defineProperty(je,"__esModule",{value:!0}),je.dataFix=void 0;var ve=ie("./isObject"),ce=["true","TRUE","1",1],be=["false","FALSE","0",0];function Ce(me,xe,fe){if(ve.isObject(me)){var z=xe.remove,ee=z===void 0?[]:z,ae=xe.rename,re=ae===void 0?{}:ae,le=xe.camel,ue=le===void 0?[]:le,pe=xe.bool,Ee=pe===void 0?[]:pe,Pe=xe.lowerFirst,Ie=Pe===void 0?!1:Pe;return ee.forEach(function(ke){return delete me[ke]}),Object.entries(re).forEach(function(ke){me[ke[0]]&&(me[ke[1]]||(me[ke[1]]=me[ke[0]],delete me[ke[0]]))}),ue.forEach(function(ke){if(me[ke]){var Ae=ke.replace(/^(.)/,function(Oe){return Oe.toLowerCase()}).replace(/-(\w)/g,function(Oe,Fe){return Fe.toUpperCase()});me[Ae]||(me[Ae]=me[ke])}}),Ee.forEach(function(ke){me[ke]=ye(me[ke])}),typeof fe=="function"&&fe(me),we(me,Ie),Ce}}je.dataFix=Ce;function ye(me){return me?ce.includes(me)?!0:be.includes(me)?!1:me:!1}function we(me,xe){xe&&Object.keys(me).forEach(function(fe){var z=fe.replace(/^\w/,function(ee){return ee.toLowerCase()});typeof me[z]=="undefined"&&(me[z]=me[fe],delete me[fe])})}},{"./isObject":70,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.entries.js":288,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],58:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault");ie("core-js/modules/es.array.slice.js"),ie("core-js/modules/es.object.to-string.js"),ie("core-js/modules/web.dom-collections.for-each.js"),ie("core-js/modules/es.object.keys.js");var ce=ve(ie("@babel/runtime/helpers/typeof"));Object.defineProperty(je,"__esModule",{value:!0}),je.deepCopyWith=je.deepCopy=void 0;var be=ie("./isBuffer");je.deepCopy=function(Ce){if(Ce===null||(0,ce.default)(Ce)!=="object")return Ce;if(be.isBuffer(Ce))return Ce.slice();var ye=Array.isArray(Ce)?[]:{};return Object.keys(Ce).forEach(function(we){ye[we]=je.deepCopy(Ce[we])}),ye},je.deepCopyWith=function(Ce,ye){function we(me,xe,fe){var z=ye(me,xe,fe);if(z!==void 0)return z;if(me===null||(0,ce.default)(me)!=="object")return me;if(be.isBuffer(me))return me.slice();var ee=Array.isArray(me)?[]:{};return Object.keys(me).forEach(function(ae){ee[ae]=we(me[ae],ae,me)}),ee}return ye?we(Ce,"",null):je.deepCopy(Ce)}},{"./isBuffer":65,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],59:[function(ie,Re,je){(function(ve){(function(){"use strict";ie("core-js/modules/es.object.to-string.js"),ie("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(je,"__esModule",{value:!0}),je.encoder=void 0;function ce(be){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"utf-8";return Ce==="utf-8"?be:ve.from(be).toString("latin1")}je.encoder=ce}).call(this)}).call(this,ie("buffer").Buffer)},{buffer:90,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],60:[function(ie,Re,je){"use strict";ie("core-js/modules/es.array.map.js"),ie("core-js/modules/es.regexp.exec.js"),ie("core-js/modules/es.string.replace.js"),Object.defineProperty(je,"__esModule",{value:!0}),je.formatInventoryConfig=void 0;var ve=ie("../utils/dataFix"),ce=ie("../utils/isObject"),be=ie("../utils/isArray"),Ce=ie("../utils/formatObjKey");function ye(me){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return xe&&ce.isObject(me)&&(me=[me]),be.isArray(me)?me=me.map(we):me=we(me),me}je.formatInventoryConfig=ye;function we(me){return ve.dataFix(me,{bool:["IsEnabled"]},function(xe){var fe,z;xe.prefix=xe.Filter.Prefix,delete xe.Filter,xe.OSSBucketDestination=xe.Destination.OSSBucketDestination,xe.OSSBucketDestination.rolename=xe.OSSBucketDestination.RoleArn.replace(/.*\//,""),delete xe.OSSBucketDestination.RoleArn,xe.OSSBucketDestination.bucket=xe.OSSBucketDestination.Bucket.replace(/.*:::/,""),delete xe.OSSBucketDestination.Bucket,delete xe.Destination,xe.frequency=xe.Schedule.Frequency,delete xe.Schedule.Frequency,!((fe=xe==null?void 0:xe.OptionalFields)===null||fe===void 0)&&fe.Field&&!be.isArray((z=xe.OptionalFields)===null||z===void 0?void 0:z.Field)&&(xe.OptionalFields.Field=[xe.OptionalFields.Field])}),me=Ce.formatObjKey(me,"firstLowerCase",{exclude:["OSSBucketDestination","SSE-OSS","SSE-KMS"]}),me}},{"../utils/dataFix":57,"../utils/formatObjKey":61,"../utils/isArray":63,"../utils/isObject":70,"core-js/modules/es.array.map.js":280,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305}],61:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault");ie("core-js/modules/es.object.to-string.js"),ie("core-js/modules/web.dom-collections.for-each.js"),ie("core-js/modules/es.object.keys.js"),ie("core-js/modules/es.array.includes.js"),ie("core-js/modules/es.string.includes.js"),ie("core-js/modules/es.regexp.exec.js"),ie("core-js/modules/es.string.replace.js");var ce=ve(ie("@babel/runtime/helpers/typeof"));Object.defineProperty(je,"__esModule",{value:!0}),je.formatObjKey=void 0;function be(ye,we,me){if(ye===null||(0,ce.default)(ye)!=="object")return ye;var xe;if(Array.isArray(ye)){xe=[];for(var fe=0;fe<ye.length;fe++)xe.push(be(ye[fe],we,me))}else xe={},Object.keys(ye).forEach(function(z){xe[Ce(z,we,me)]=be(ye[z],we,me)});return xe}je.formatObjKey=be;function Ce(ye,we,me){return me&&me.exclude&&me.exclude.includes(ye)||(we==="firstUpperCase"?ye=ye.replace(/^./,function(xe){return xe.toUpperCase()}):we==="firstLowerCase"&&(ye=ye.replace(/^./,function(xe){return xe.toLowerCase()}))),ye}},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.includes.js":302,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],62:[function(ie,Re,je){"use strict";ie("core-js/modules/es.regexp.exec.js"),Object.defineProperty(je,"__esModule",{value:!0}),je.getStrBytesCount=void 0;function ve(ce){for(var be=0,Ce=0;Ce<ce.length;Ce++){var ye=ce.charAt(Ce);/^[\u00-\uff]$/.test(ye)?be+=1:be+=2}return be}je.getStrBytesCount=ve},{"core-js/modules/es.regexp.exec.js":300}],63:[function(ie,Re,je){"use strict";ie("core-js/modules/es.object.to-string.js"),Object.defineProperty(je,"__esModule",{value:!0}),je.isArray=void 0,je.isArray=function(ve){return Object.prototype.toString.call(ve)==="[object Array]"}},{"core-js/modules/es.object.to-string.js":291}],64:[function(ie,Re,je){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.isBlob=void 0;function ve(ce){return typeof Blob!="undefined"&&ce instanceof Blob}je.isBlob=ve},{}],65:[function(ie,Re,je){(function(ve){(function(){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.isBuffer=void 0;function ce(be){return ve.isBuffer(be)}je.isBuffer=ce}).call(this)}).call(this,{isBuffer:ie("../../../node_modules/is-buffer/index.js")})},{"../../../node_modules/is-buffer/index.js":366}],66:[function(ie,Re,je){(function(ve){(function(){"use strict";ie("core-js/modules/es.array.includes.js"),ie("core-js/modules/es.string.includes.js"),Object.defineProperty(je,"__esModule",{value:!0}),je.isDingTalk=void 0;function ce(){return!!(ve.browser&&window.navigator.userAgent.toLowerCase().includes("aliapp(dingtalk"))}je.isDingTalk=ce}).call(this)}).call(this,ie("_process"))},{_process:467,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.string.includes.js":302}],67:[function(ie,Re,je){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.isFile=void 0,je.isFile=function(ve){return typeof File!="undefined"&&ve instanceof File}},{}],68:[function(ie,Re,je){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.isFunction=void 0,je.isFunction=function(ve){return typeof ve=="function"}},{}],69:[function(ie,Re,je){"use strict";ie("core-js/modules/es.regexp.exec.js"),Object.defineProperty(je,"__esModule",{value:!0}),je.isIP=void 0,je.isIP=function(ve){var ce=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,be=/^\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 ce.test(ve)||be.test(ve)}},{"core-js/modules/es.regexp.exec.js":300}],70:[function(ie,Re,je){"use strict";ie("core-js/modules/es.object.to-string.js"),Object.defineProperty(je,"__esModule",{value:!0}),je.isObject=void 0,je.isObject=function(ve){return Object.prototype.toString.call(ve)==="[object Object]"}},{"core-js/modules/es.object.to-string.js":291}],71:[function(ie,Re,je){"use strict";ie("core-js/modules/es.object.to-string.js"),ie("core-js/modules/web.dom-collections.for-each.js"),ie("core-js/modules/es.object.keys.js"),Object.defineProperty(je,"__esModule",{value:!0}),je.lowercaseKeyHeader=void 0;var ve=ie("./isObject");function ce(be){var Ce={};return ve.isObject(be)&&Object.keys(be).forEach(function(ye){Ce[ye.toLowerCase()]=be[ye]}),Ce}je.lowercaseKeyHeader=ce},{"./isObject":70,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],72:[function(ie,Re,je){"use strict";ie("core-js/modules/es.regexp.exec.js"),ie("core-js/modules/es.string.replace.js"),ie("core-js/modules/es.object.to-string.js"),ie("core-js/modules/web.dom-collections.for-each.js"),ie("core-js/modules/es.object.keys.js"),ie("core-js/modules/es.array.concat.js"),ie("core-js/modules/es.array.join.js"),ie("core-js/modules/es.array.map.js"),ie("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(je,"__esModule",{value:!0}),je.obj2xml=void 0;var ve=ie("./formatObjKey");function ce(Ce){return Object.prototype.toString.call(Ce).replace(/(.*? |])/g,"").toLowerCase()}function be(Ce,ye){var we="";return ye&&ye.headers&&(we=`<?xml version="1.0" encoding="UTF-8"?>
`),ye&&ye.firstUpperCase&&(Ce=ve.formatObjKey(Ce,"firstUpperCase")),ce(Ce)==="object"?Object.keys(Ce).forEach(function(me){ce(Ce[me])!=="undefined"&&ce(Ce[me])!=="null"&&(ce(Ce[me])==="string"||ce(Ce[me])==="number"?we+="<".concat(me,">").concat(Ce[me],"</").concat(me,">"):ce(Ce[me])==="object"?we+="<".concat(me,">").concat(be(Ce[me]),"</").concat(me,">"):ce(Ce[me])==="array"?we+=Ce[me].map(function(xe){return"<".concat(me,">").concat(be(xe),"</").concat(me,">")}).join(""):we+="<".concat(me,">").concat(Ce[me].toString(),"</").concat(me,">"))}):we+=Ce.toString(),we}je.obj2xml=be},{"./formatObjKey":61,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.map.js":280,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],73:[function(ie,Re,je){"use strict";ie("core-js/modules/es.array.slice.js"),ie("core-js/modules/es.object.to-string.js"),ie("core-js/modules/es.function.name.js"),ie("core-js/modules/es.array.from.js"),ie("core-js/modules/es.string.iterator.js"),ie("core-js/modules/es.regexp.exec.js"),ie("core-js/modules/es.symbol.js"),ie("core-js/modules/es.symbol.description.js"),ie("core-js/modules/es.symbol.iterator.js"),ie("core-js/modules/es.array.iterator.js"),ie("core-js/modules/web.dom-collections.iterator.js"),ie("core-js/modules/es.object.assign.js");function ve(ye,we){var me=typeof Symbol!="undefined"&&ye[Symbol.iterator]||ye["@@iterator"];if(!me){if(Array.isArray(ye)||(me=ce(ye))||we&&ye&&typeof ye.length=="number"){me&&(ye=me);var xe=0,fe=function(){};return{s:fe,n:function(){return xe>=ye.length?{done:!0}:{done:!1,value:ye[xe++]}},e:function(le){throw le},f:fe}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var z=!0,ee=!1,ae;return{s:function(){me=me.call(ye)},n:function(){var le=me.next();return z=le.done,le},e:function(le){ee=!0,ae=le},f:function(){try{!z&&me.return!=null&&me.return()}finally{if(ee)throw ae}}}}function ce(ye,we){if(ye){if(typeof ye=="string")return be(ye,we);var me=Object.prototype.toString.call(ye).slice(8,-1);if(me==="Object"&&ye.constructor&&(me=ye.constructor.name),me==="Map"||me==="Set")return Array.from(ye);if(me==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(me))return be(ye,we)}}function be(ye,we){(we==null||we>ye.length)&&(we=ye.length);for(var me=0,xe=new Array(we);me<we;me++)xe[me]=ye[me];return xe}Object.defineProperty(je,"__esModule",{value:!0}),je.omit=void 0;function Ce(ye,we){var me=Object.assign({},ye),xe=ve(we),fe;try{for(xe.s();!(fe=xe.n()).done;){var z=fe.value;delete me[z]}}catch(ee){xe.e(ee)}finally{xe.f()}return me}je.omit=Ce},{"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.iterator.js":303,"core-js/modules/es.symbol.description.js":310,"core-js/modules/es.symbol.iterator.js":312,"core-js/modules/es.symbol.js":313,"core-js/modules/web.dom-collections.iterator.js":340}],74:[function(ie,Re,je){"use strict";ie("core-js/modules/es.object.to-string.js"),ie("core-js/modules/es.promise.js"),Object.defineProperty(je,"__esModule",{value:!0}),je.retry=void 0;function ve(ce,be){var Ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ye=0,we=Ce.retryDelay,me=we===void 0?500:we,xe=Ce.errorHandler,fe=xe===void 0?function(){return!0}:xe,z=function ee(){for(var ae=arguments.length,re=new Array(ae),le=0;le<ae;le++)re[le]=arguments[le];return new Promise(function(ue,pe){ce.apply(void 0,re).then(function(Ee){ye=0,ue(Ee)}).catch(function(Ee){ye<be&&fe(Ee)?(ye++,setTimeout(function(){ue(ee.apply(void 0,re))},me)):(ye=0,pe(Ee))})})};return z}je.retry=ve},{"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295}],75:[function(ie,Re,je){"use strict";var ve=function(ye){return ye&&ye.__esModule?ye:{default:ye}};Object.defineProperty(je,"__esModule",{value:!0}),je.setRegion=void 0;var ce=ve(ie("url")),be=ie("./checkConfigValid");function Ce(ye){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;be.checkConfigValid(ye,"region");var xe=me?"https://":"http://",fe=we?"-internal.aliyuncs.com":".aliyuncs.com",z="vpc100-oss-cn-";return ye.substr(0,z.length)===z&&(fe=".aliyuncs.com"),ce.default.parse(xe+ye+fe)}je.setRegion=Ce},{"./checkConfigValid":52,url:472}],76:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/regenerator"));ie("core-js/modules/es.object.keys.js"),ie("core-js/modules/es.object.to-string.js"),ie("core-js/modules/es.array.find.js"),ie("core-js/modules/es.object.assign.js");var be=ve(ie("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(je,"__esModule",{value:!0}),je.checkCredentials=je.setSTSToken=void 0;var Ce=ie("./formatObjKey");function ye(){return we.apply(this,arguments)}function we(){return we=(0,be.default)(ce.default.mark(function xe(){var fe,z;return ce.default.wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:if(this.options||(this.options={}),fe=new Date,!this.stsTokenFreshTime){ae.next=14;break}if(!(+fe-this.stsTokenFreshTime>=this.options.refreshSTSTokenInterval)){ae.next=12;break}return this.stsTokenFreshTime=fe,ae.next=7,this.options.refreshSTSToken();case 7:z=ae.sent,z=Ce.formatObjKey(z,"firstLowerCase"),z.securityToken&&(z.stsToken=z.securityToken),me(z),Object.assign(this.options,z);case 12:ae.next=15;break;case 14:this.stsTokenFreshTime=fe;case 15:return ae.abrupt("return",null);case 16:case"end":return ae.stop()}},xe,this)})),we.apply(this,arguments)}je.setSTSToken=ye;function me(xe){var fe=["accessKeySecret","accessKeyId","stsToken"],z=Object.keys(xe);fe.forEach(function(ee){if(!z.find(function(ae){return ae===ee}))throw Error("refreshSTSToken must return contains ".concat(ee))})}je.checkCredentials=me},{"./formatObjKey":61,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.find.js":275,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291}],77:[function(ie,Re,je){function ve(be,Ce,ye,we,me,xe,fe){try{var z=be[xe](fe),ee=z.value}catch(ae){ye(ae);return}z.done?Ce(ee):Promise.resolve(ee).then(we,me)}function ce(be){return function(){var Ce=this,ye=arguments;return new Promise(function(we,me){var xe=be.apply(Ce,ye);function fe(ee){ve(xe,we,me,fe,z,"next",ee)}function z(ee){ve(xe,we,me,fe,z,"throw",ee)}fe(void 0)})}}Re.exports=ce,Re.exports.__esModule=!0,Re.exports.default=Re.exports},{}],78:[function(ie,Re,je){function ve(ce){return ce&&ce.__esModule?ce:{default:ce}}Re.exports=ve,Re.exports.__esModule=!0,Re.exports.default=Re.exports},{}],79:[function(ie,Re,je){function ve(ce){"@babel/helpers - typeof";return Re.exports=ve=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(be){return typeof be}:function(be){return be&&typeof Symbol=="function"&&be.constructor===Symbol&&be!==Symbol.prototype?"symbol":typeof be},Re.exports.__esModule=!0,Re.exports.default=Re.exports,ve(ce)}Re.exports=ve,Re.exports.__esModule=!0,Re.exports.default=Re.exports},{}],80:[function(ie,Re,je){Re.exports=ie("regenerator-runtime")},{"regenerator-runtime":395}],81:[function(ie,Re,je){Re.exports=ve,Re.exports.HttpsAgent=ve;function ve(){}},{}],82:[function(ie,Re,je){(function(ve){(function(){"use strict";var ce=ie("object-assign");function be(st,ht){if(st===ht)return 0;for(var ft=st.length,Lt=ht.length,et=0,it=Math.min(ft,Lt);et<it;++et)if(st[et]!==ht[et]){ft=st[et],Lt=ht[et];break}return ft<Lt?-1:Lt<ft?1:0}function Ce(st){return ve.Buffer&&typeof ve.Buffer.isBuffer=="function"?ve.Buffer.isBuffer(st):!!(st!=null&&st._isBuffer)}var ye=ie("util/"),we=Object.prototype.hasOwnProperty,me=Array.prototype.slice,xe=function(){return function(){}.name==="foo"}();function fe(st){return Object.prototype.toString.call(st)}function z(st){return Ce(st)||typeof ve.ArrayBuffer!="function"?!1:typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(st):st?!!(st instanceof DataView||st.buffer&&st.buffer instanceof ArrayBuffer):!1}var ee=Re.exports=Pe,ae=/\s*function\s+([^\(\s]*)\s*/;function re(st){if(ye.isFunction(st)){if(xe)return st.name;var ht=st.toString(),ft=ht.match(ae);return ft&&ft[1]}}ee.AssertionError=function(ht){this.name="AssertionError",this.actual=ht.actual,this.expected=ht.expected,this.operator=ht.operator,ht.message?(this.message=ht.message,this.generatedMessage=!1):(this.message=pe(this),this.generatedMessage=!0);var ft=ht.stackStartFunction||Ee;if(Error.captureStackTrace)Error.captureStackTrace(this,ft);else{var Lt=new Error;if(Lt.stack){var et=Lt.stack,it=re(ft),xt=et.indexOf(`
`+it);if(xt>=0){var Et=et.indexOf(`
`,xt+1);et=et.substring(Et+1)}this.stack=et}}},ye.inherits(ee.AssertionError,Error);function le(st,ht){return typeof st=="string"?st.length<ht?st:st.slice(0,ht):st}function ue(st){if(xe||!ye.isFunction(st))return ye.inspect(st);var ht=re(st),ft=ht?": "+ht:"";return"[Function"+ft+"]"}function pe(st){return le(ue(st.actual),128)+" "+st.operator+" "+le(ue(st.expected),128)}function Ee(st,ht,ft,Lt,et){throw new ee.AssertionError({message:ft,actual:st,expected:ht,operator:Lt,stackStartFunction:et})}ee.fail=Ee;function Pe(st,ht){st||Ee(st,!0,ht,"==",ee.ok)}ee.ok=Pe,ee.equal=function(ht,ft,Lt){ht!=ft&&Ee(ht,ft,Lt,"==",ee.equal)},ee.notEqual=function(ht,ft,Lt){ht==ft&&Ee(ht,ft,Lt,"!=",ee.notEqual)},ee.deepEqual=function(ht,ft,Lt){Ie(ht,ft,!1)||Ee(ht,ft,Lt,"deepEqual",ee.deepEqual)},ee.deepStrictEqual=function(ht,ft,Lt){Ie(ht,ft,!0)||Ee(ht,ft,Lt,"deepStrictEqual",ee.deepStrictEqual)};function Ie(st,ht,ft,Lt){if(st===ht)return!0;if(Ce(st)&&Ce(ht))return be(st,ht)===0;if(ye.isDate(st)&&ye.isDate(ht))return st.getTime()===ht.getTime();if(ye.isRegExp(st)&&ye.isRegExp(ht))return st.source===ht.source&&st.global===ht.global&&st.multiline===ht.multiline&&st.lastIndex===ht.lastIndex&&st.ignoreCase===ht.ignoreCase;if((st===null||typeof st!="object")&&(ht===null||typeof ht!="object"))return ft?st===ht:st==ht;if(z(st)&&z(ht)&&fe(st)===fe(ht)&&!(st instanceof Float32Array||st instanceof Float64Array))return be(new Uint8Array(st.buffer),new Uint8Array(ht.buffer))===0;if(Ce(st)!==Ce(ht))return!1;Lt=Lt||{actual:[],expected:[]};var et=Lt.actual.indexOf(st);return et!==-1&&et===Lt.expected.indexOf(ht)?!0:(Lt.actual.push(st),Lt.expected.push(ht),Ae(st,ht,ft,Lt))}function ke(st){return Object.prototype.toString.call(st)=="[object Arguments]"}function Ae(st,ht,ft,Lt){if(st==null||ht===null||ht===void 0)return!1;if(ye.isPrimitive(st)||ye.isPrimitive(ht))return st===ht;if(ft&&Object.getPrototypeOf(st)!==Object.getPrototypeOf(ht))return!1;var et=ke(st),it=ke(ht);if(et&&!it||!et&&it)return!1;if(et)return st=me.call(st),ht=me.call(ht),Ie(st,ht,ft);var xt=Xe(st),Et=Xe(ht),Mt,mt;if(xt.length!==Et.length)return!1;for(xt.sort(),Et.sort(),mt=xt.length-1;mt>=0;mt--)if(xt[mt]!==Et[mt])return!1;for(mt=xt.length-1;mt>=0;mt--)if(Mt=xt[mt],!Ie(st[Mt],ht[Mt],ft,Lt))return!1;return!0}ee.notDeepEqual=function(ht,ft,Lt){Ie(ht,ft,!1)&&Ee(ht,ft,Lt,"notDeepEqual",ee.notDeepEqual)},ee.notDeepStrictEqual=Oe;function Oe(st,ht,ft){Ie(st,ht,!0)&&Ee(st,ht,ft,"notDeepStrictEqual",Oe)}ee.strictEqual=function(ht,ft,Lt){ht!==ft&&Ee(ht,ft,Lt,"===",ee.strictEqual)},ee.notStrictEqual=function(ht,ft,Lt){ht===ft&&Ee(ht,ft,Lt,"!==",ee.notStrictEqual)};function Fe(st,ht){if(!st||!ht)return!1;if(Object.prototype.toString.call(ht)=="[object RegExp]")return ht.test(st);try{if(st instanceof ht)return!0}catch(ft){}return Error.isPrototypeOf(ht)?!1:ht.call({},st)===!0}function _e(st){var ht;try{st()}catch(ft){ht=ft}return ht}function Ye(st,ht,ft,Lt){var et;if(typeof ht!="function")throw new TypeError('"block" argument must be a function');typeof ft=="string"&&(Lt=ft,ft=null),et=_e(ht),Lt=(ft&&ft.name?" ("+ft.name+").":".")+(Lt?" "+Lt:"."),st&&!et&&Ee(et,ft,"Missing expected exception"+Lt);var it=typeof Lt=="string",xt=!st&&ye.isError(et),Et=!st&&et&&!ft;if((xt&&it&&Fe(et,ft)||Et)&&Ee(et,ft,"Got unwanted exception"+Lt),st&&et&&ft&&!Fe(et,ft)||!st&&et)throw et}ee.throws=function(st,ht,ft){Ye(!0,st,ht,ft)},ee.doesNotThrow=function(st,ht,ft){Ye(!1,st,ht,ft)},ee.ifError=function(st){if(st)throw st};function ze(st,ht){st||Ee(st,!0,ht,"==",ze)}ee.strict=ce(ze,ee,{equal:ee.strictEqual,deepEqual:ee.deepStrictEqual,notEqual:ee.notStrictEqual,notDeepEqual:ee.notDeepStrictEqual}),ee.strict.strict=ee.strict;var Xe=Object.keys||function(st){var ht=[];for(var ft in st)we.call(st,ft)&&ht.push(ft);return ht}}).call(this)}).call(this,typeof ln!="undefined"?ln:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"object-assign":377,"util/":85}],83:[function(ie,Re,je){typeof Object.create=="function"?Re.exports=function(ce,be){ce.super_=be,ce.prototype=Object.create(be.prototype,{constructor:{value:ce,enumerable:!1,writable:!0,configurable:!0}})}:Re.exports=function(ce,be){ce.super_=be;var Ce=function(){};Ce.prototype=be.prototype,ce.prototype=new Ce,ce.prototype.constructor=ce}},{}],84:[function(ie,Re,je){Re.exports=function(ce){return ce&&typeof ce=="object"&&typeof ce.copy=="function"&&typeof ce.fill=="function"&&typeof ce.readUInt8=="function"}},{}],85:[function(ie,Re,je){(function(ve,ce){(function(){var be=/%[sdj%]/g;je.format=function(Et){if(!Ae(Et)){for(var Mt=[],mt=0;mt<arguments.length;mt++)Mt.push(we(arguments[mt]));return Mt.join(" ")}for(var mt=1,pt=arguments,vt=pt.length,jt=String(Et).replace(be,function(Kt){if(Kt==="%%")return"%";if(mt>=vt)return Kt;switch(Kt){case"%s":return String(pt[mt++]);case"%d":return Number(pt[mt++]);case"%j":try{return JSON.stringify(pt[mt++])}catch(Ct){return"[Circular]"}default:return Kt}}),At=pt[mt];mt<vt;At=pt[++mt])Pe(At)||!Ye(At)?jt+=" "+At:jt+=" "+we(At);return jt},je.deprecate=function(Et,Mt){if(Fe(ce.process))return function(){return je.deprecate(Et,Mt).apply(this,arguments)};if(ve.noDeprecation===!0)return Et;var mt=!1;function pt(){if(!mt){if(ve.throwDeprecation)throw new Error(Mt);ve.traceDeprecation?console.trace(Mt):console.error(Mt),mt=!0}return Et.apply(this,arguments)}return pt};var Ce={},ye;je.debuglog=function(Et){if(Fe(ye)&&(ye=ve.env.NODE_DEBUG||""),Et=Et.toUpperCase(),!Ce[Et])if(new RegExp("\\b"+Et+"\\b","i").test(ye)){var Mt=ve.pid;Ce[Et]=function(){var mt=je.format.apply(je,arguments);console.error("%s %d: %s",Et,Mt,mt)}}else Ce[Et]=function(){};return Ce[Et]};function we(Et,Mt){var mt={seen:[],stylize:xe};return arguments.length>=3&&(mt.depth=arguments[2]),arguments.length>=4&&(mt.colors=arguments[3]),Ee(Mt)?mt.showHidden=Mt:Mt&&je._extend(mt,Mt),Fe(mt.showHidden)&&(mt.showHidden=!1),Fe(mt.depth)&&(mt.depth=2),Fe(mt.colors)&&(mt.colors=!1),Fe(mt.customInspect)&&(mt.customInspect=!0),mt.colors&&(mt.stylize=me),z(mt,Et,mt.depth)}je.inspect=we,we.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]},we.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function me(Et,Mt){var mt=we.styles[Mt];return mt?"\x1B["+we.colors[mt][0]+"m"+Et+"\x1B["+we.colors[mt][1]+"m":Et}function xe(Et,Mt){return Et}function fe(Et){var Mt={};return Et.forEach(function(mt,pt){Mt[mt]=!0}),Mt}function z(Et,Mt,mt){if(Et.customInspect&&Mt&&st(Mt.inspect)&&Mt.inspect!==je.inspect&&!(Mt.constructor&&Mt.constructor.prototype===Mt)){var pt=Mt.inspect(mt,Et);return Ae(pt)||(pt=z(Et,pt,mt)),pt}var vt=ee(Et,Mt);if(vt)return vt;var jt=Object.keys(Mt),At=fe(jt);if(Et.showHidden&&(jt=Object.getOwnPropertyNames(Mt)),Xe(Mt)&&(jt.indexOf("message")>=0||jt.indexOf("description")>=0))return ae(Mt);if(jt.length===0){if(st(Mt)){var Kt=Mt.name?": "+Mt.name:"";return Et.stylize("[Function"+Kt+"]","special")}if(_e(Mt))return Et.stylize(RegExp.prototype.toString.call(Mt),"regexp");if(ze(Mt))return Et.stylize(Date.prototype.toString.call(Mt),"date");if(Xe(Mt))return ae(Mt)}var Ct="",gt=!1,tt=["{","}"];if(pe(Mt)&&(gt=!0,tt=["[","]"]),st(Mt)){var bt=Mt.name?": "+Mt.name:"";Ct=" [Function"+bt+"]"}if(_e(Mt)&&(Ct=" "+RegExp.prototype.toString.call(Mt)),ze(Mt)&&(Ct=" "+Date.prototype.toUTCString.call(Mt)),Xe(Mt)&&(Ct=" "+ae(Mt)),jt.length===0&&(!gt||Mt.length==0))return tt[0]+Ct+tt[1];if(mt<0)return _e(Mt)?Et.stylize(RegExp.prototype.toString.call(Mt),"regexp"):Et.stylize("[Object]","special");Et.seen.push(Mt);var Ke;return gt?Ke=re(Et,Mt,mt,At,jt):Ke=jt.map(function(ut){return le(Et,Mt,mt,At,ut,gt)}),Et.seen.pop(),ue(Ke,Ct,tt)}function ee(Et,Mt){if(Fe(Mt))return Et.stylize("undefined","undefined");if(Ae(Mt)){var mt="'"+JSON.stringify(Mt).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return Et.stylize(mt,"string")}if(ke(Mt))return Et.stylize(""+Mt,"number");if(Ee(Mt))return Et.stylize(""+Mt,"boolean");if(Pe(Mt))return Et.stylize("null","null")}function ae(Et){return"["+Error.prototype.toString.call(Et)+"]"}function re(Et,Mt,mt,pt,vt){for(var jt=[],At=0,Kt=Mt.length;At<Kt;++At)xt(Mt,String(At))?jt.push(le(Et,Mt,mt,pt,String(At),!0)):jt.push("");return vt.forEach(function(Ct){Ct.match(/^\d+$/)||jt.push(le(Et,Mt,mt,pt,Ct,!0))}),jt}function le(Et,Mt,mt,pt,vt,jt){var At,Kt,Ct;if(Ct=Object.getOwnPropertyDescriptor(Mt,vt)||{value:Mt[vt]},Ct.get?Ct.set?Kt=Et.stylize("[Getter/Setter]","special"):Kt=Et.stylize("[Getter]","special"):Ct.set&&(Kt=Et.stylize("[Setter]","special")),xt(pt,vt)||(At="["+vt+"]"),Kt||(Et.seen.indexOf(Ct.value)<0?(Pe(mt)?Kt=z(Et,Ct.value,null):Kt=z(Et,Ct.value,mt-1),Kt.indexOf(`
`)>-1&&(jt?Kt=Kt.split(`
`).map(function(gt){return" "+gt}).join(`
`).substr(2):Kt=`
`+Kt.split(`
`).map(function(gt){return" "+gt}).join(`
`))):Kt=Et.stylize("[Circular]","special")),Fe(At)){if(jt&&vt.match(/^\d+$/))return Kt;At=JSON.stringify(""+vt),At.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(At=At.substr(1,At.length-2),At=Et.stylize(At,"name")):(At=At.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),At=Et.stylize(At,"string"))}return At+": "+Kt}function ue(Et,Mt,mt){var pt=0,vt=Et.reduce(function(jt,At){return pt++,At.indexOf(`
`)>=0&&pt++,jt+At.replace(/\u001b\[\d\d?m/g,"").length+1},0);return vt>60?mt[0]+(Mt===""?"":Mt+`
`)+" "+Et.join(`,
`)+" "+mt[1]:mt[0]+Mt+" "+Et.join(", ")+" "+mt[1]}function pe(Et){return Array.isArray(Et)}je.isArray=pe;function Ee(Et){return typeof Et=="boolean"}je.isBoolean=Ee;function Pe(Et){return Et===null}je.isNull=Pe;function Ie(Et){return Et==null}je.isNullOrUndefined=Ie;function ke(Et){return typeof Et=="number"}je.isNumber=ke;function Ae(Et){return typeof Et=="string"}je.isString=Ae;function Oe(Et){return typeof Et=="symbol"}je.isSymbol=Oe;function Fe(Et){return Et===void 0}je.isUndefined=Fe;function _e(Et){return Ye(Et)&&ft(Et)==="[object RegExp]"}je.isRegExp=_e;function Ye(Et){return typeof Et=="object"&&Et!==null}je.isObject=Ye;function ze(Et){return Ye(Et)&&ft(Et)==="[object Date]"}je.isDate=ze;function Xe(Et){return Ye(Et)&&(ft(Et)==="[object Error]"||Et instanceof Error)}je.isError=Xe;function st(Et){return typeof Et=="function"}je.isFunction=st;function ht(Et){return Et===null||typeof Et=="boolean"||typeof Et=="number"||typeof Et=="string"||typeof Et=="symbol"||typeof Et=="undefined"}je.isPrimitive=ht,je.isBuffer=ie("./support/isBuffer");function ft(Et){return Object.prototype.toString.call(Et)}function Lt(Et){return Et<10?"0"+Et.toString(10):Et.toString(10)}var et=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function it(){var Et=new Date,Mt=[Lt(Et.getHours()),Lt(Et.getMinutes()),Lt(Et.getSeconds())].join(":");return[Et.getDate(),et[Et.getMonth()],Mt].join(" ")}je.log=function(){console.log("%s - %s",it(),je.format.apply(je,arguments))},je.inherits=ie("inherits"),je._extend=function(Et,Mt){if(!Mt||!Ye(Mt))return Et;for(var mt=Object.keys(Mt),pt=mt.length;pt--;)Et[mt[pt]]=Mt[mt[pt]];return Et};function xt(Et,Mt){return Object.prototype.hasOwnProperty.call(Et,Mt)}}).call(this)}).call(this,ie("_process"),typeof ln!="undefined"?ln:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":84,_process:467,inherits:83}],86:[function(ie,Re,je){(function(ve){(function(){"use strict";var ce=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],be=typeof globalThis=="undefined"?ve:globalThis;Re.exports=function(){for(var ye=[],we=0;we<ce.length;we++)typeof be[ce[we]]=="function"&&(ye[ye.length]=ce[we]);return ye}}).call(this)}).call(this,typeof ln!="undefined"?ln:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],87:[function(ie,Re,je){"use strict";je.byteLength=xe,je.toByteArray=z,je.fromByteArray=re;for(var ve=[],ce=[],be=typeof Uint8Array!="undefined"?Uint8Array:Array,Ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ye=0,we=Ce.length;ye<we;++ye)ve[ye]=Ce[ye],ce[Ce.charCodeAt(ye)]=ye;ce[45]=62,ce[95]=63;function me(le){var ue=le.length;if(ue%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var pe=le.indexOf("=");pe===-1&&(pe=ue);var Ee=pe===ue?0:4-pe%4;return[pe,Ee]}function xe(le){var ue=me(le),pe=ue[0],Ee=ue[1];return(pe+Ee)*3/4-Ee}function fe(le,ue,pe){return(ue+pe)*3/4-pe}function z(le){var ue,pe=me(le),Ee=pe[0],Pe=pe[1],Ie=new be(fe(le,Ee,Pe)),ke=0,Ae=Pe>0?Ee-4:Ee,Oe;for(Oe=0;Oe<Ae;Oe+=4)ue=ce[le.charCodeAt(Oe)]<<18|ce[le.charCodeAt(Oe+1)]<<12|ce[le.charCodeAt(Oe+2)]<<6|ce[le.charCodeAt(Oe+3)],Ie[ke++]=ue>>16&255,Ie[ke++]=ue>>8&255,Ie[ke++]=ue&255;return Pe===2&&(ue=ce[le.charCodeAt(Oe)]<<2|ce[le.charCodeAt(Oe+1)]>>4,Ie[ke++]=ue&255),Pe===1&&(ue=ce[le.charCodeAt(Oe)]<<10|ce[le.charCodeAt(Oe+1)]<<4|ce[le.charCodeAt(Oe+2)]>>2,Ie[ke++]=ue>>8&255,Ie[ke++]=ue&255),Ie}function ee(le){return ve[le>>18&63]+ve[le>>12&63]+ve[le>>6&63]+ve[le&63]}function ae(le,ue,pe){for(var Ee,Pe=[],Ie=ue;Ie<pe;Ie+=3)Ee=(le[Ie]<<16&16711680)+(le[Ie+1]<<8&65280)+(le[Ie+2]&255),Pe.push(ee(Ee));return Pe.join("")}function re(le){for(var ue,pe=le.length,Ee=pe%3,Pe=[],Ie=16383,ke=0,Ae=pe-Ee;ke<Ae;ke+=Ie)Pe.push(ae(le,ke,ke+Ie>Ae?Ae:ke+Ie));return Ee===1?(ue=le[pe-1],Pe.push(ve[ue>>2]+ve[ue<<4&63]+"==")):Ee===2&&(ue=(le[pe-2]<<8)+le[pe-1],Pe.push(ve[ue>>10]+ve[ue>>4&63]+ve[ue<<2&63]+"=")),Pe.join("")}},{}],88:[function(ie,Re,je){(function(ve,ce,be){typeof Re!="undefined"&&Re.exports?Re.exports=be():typeof $e=="function"&&$e.amd?$e(ce,be):ve[ce]=be()})(this,"bowser",function(){var ve=!0;function ce(fe){function z(Mt){var mt=fe.match(Mt);return mt&&mt.length>1&&mt[1]||""}function ee(Mt){var mt=fe.match(Mt);return mt&&mt.length>1&&mt[2]||""}var ae=z(/(ipod|iphone|ipad)/i).toLowerCase(),re=/like android/i.test(fe),le=!re&&/android/i.test(fe),ue=/nexus\s*[0-6]\s*/i.test(fe),pe=!ue&&/nexus\s*[0-9]+/i.test(fe),Ee=/CrOS/.test(fe),Pe=/silk/i.test(fe),Ie=/sailfish/i.test(fe),ke=/tizen/i.test(fe),Ae=/(web|hpw)(o|0)s/i.test(fe),Oe=/windows phone/i.test(fe),Fe=/SamsungBrowser/i.test(fe),_e=!Oe&&/windows/i.test(fe),Ye=!ae&&!Pe&&/macintosh/i.test(fe),ze=!le&&!Ie&&!ke&&!Ae&&/linux/i.test(fe),Xe=ee(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),st=z(/version\/(\d+(\.\d+)?)/i),ht=/tablet/i.test(fe)&&!/tablet pc/i.test(fe),ft=!ht&&/[^-]mobi/i.test(fe),Lt=/xbox/i.test(fe),et;/opera/i.test(fe)?et={name:"Opera",opera:ve,version:st||z(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(fe)?et={name:"Opera",opera:ve,version:z(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||st}:/SamsungBrowser/i.test(fe)?et={name:"Samsung Internet for Android",samsungBrowser:ve,version:st||z(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(fe)?et={name:"NAVER Whale browser",whale:ve,version:z(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(fe)?et={name:"MZ Browser",mzbrowser:ve,version:z(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(fe)?et={name:"Opera Coast",coast:ve,version:st||z(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(fe)?et={name:"Focus",focus:ve,version:z(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(fe)?et={name:"Yandex Browser",yandexbrowser:ve,version:st||z(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(fe)?et={name:"UC Browser",ucbrowser:ve,version:z(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(fe)?et={name:"Maxthon",maxthon:ve,version:z(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(fe)?et={name:"Epiphany",epiphany:ve,version:z(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(fe)?et={name:"Puffin",puffin:ve,version:z(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(fe)?et={name:"Sleipnir",sleipnir:ve,version:z(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(fe)?et={name:"K-Meleon",kMeleon:ve,version:z(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:Oe?(et={name:"Windows Phone",osname:"Windows Phone",windowsphone:ve},Xe?(et.msedge=ve,et.version=Xe):(et.msie=ve,et.version=z(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(fe)?et={name:"Internet Explorer",msie:ve,version:z(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:Ee?et={name:"Chrome",osname:"Chrome OS",chromeos:ve,chromeBook:ve,chrome:ve,version:z(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(fe)?et={name:"Microsoft Edge",msedge:ve,version:Xe}:/vivaldi/i.test(fe)?et={name:"Vivaldi",vivaldi:ve,version:z(/vivaldi\/(\d+(\.\d+)?)/i)||st}:Ie?et={name:"Sailfish",osname:"Sailfish OS",sailfish:ve,version:z(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(fe)?et={name:"SeaMonkey",seamonkey:ve,version:z(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(fe)?(et={name:"Firefox",firefox:ve,version:z(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(fe)&&(et.firefoxos=ve,et.osname="Firefox OS")):Pe?et={name:"Amazon Silk",silk:ve,version:z(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(fe)?et={name:"PhantomJS",phantom:ve,version:z(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(fe)?et={name:"SlimerJS",slimer:ve,version:z(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(fe)||/rim\stablet/i.test(fe)?et={name:"BlackBerry",osname:"BlackBerry OS",blackberry:ve,version:st||z(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:Ae?(et={name:"WebOS",osname:"WebOS",webos:ve,version:st||z(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(fe)&&(et.touchpad=ve)):/bada/i.test(fe)?et={name:"Bada",osname:"Bada",bada:ve,version:z(/dolfin\/(\d+(\.\d+)?)/i)}:ke?et={name:"Tizen",osname:"Tizen",tizen:ve,version:z(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||st}:/qupzilla/i.test(fe)?et={name:"QupZilla",qupzilla:ve,version:z(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||st}:/chromium/i.test(fe)?et={name:"Chromium",chromium:ve,version:z(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||st}:/chrome|crios|crmo/i.test(fe)?et={name:"Chrome",chrome:ve,version:z(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:le?et={name:"Android",version:st}:/safari|applewebkit/i.test(fe)?(et={name:"Safari",safari:ve},st&&(et.version=st)):ae?(et={name:ae=="iphone"?"iPhone":ae=="ipad"?"iPad":"iPod"},st&&(et.version=st)):/googlebot/i.test(fe)?et={name:"Googlebot",googlebot:ve,version:z(/googlebot\/(\d+(\.\d+))/i)||st}:et={name:z(/^(.*)\/(.*) /),version:ee(/^(.*)\/(.*) /)},!et.msedge&&/(apple)?webkit/i.test(fe)?(/(apple)?webkit\/537\.36/i.test(fe)?(et.name=et.name||"Blink",et.blink=ve):(et.name=et.name||"Webkit",et.webkit=ve),!et.version&&st&&(et.version=st)):!et.opera&&/gecko\//i.test(fe)&&(et.name=et.name||"Gecko",et.gecko=ve,et.version=et.version||z(/gecko\/(\d+(\.\d+)?)/i)),!et.windowsphone&&(le||et.silk)?(et.android=ve,et.osname="Android"):!et.windowsphone&&ae?(et[ae]=ve,et.ios=ve,et.osname="iOS"):Ye?(et.mac=ve,et.osname="macOS"):Lt?(et.xbox=ve,et.osname="Xbox"):_e?(et.windows=ve,et.osname="Windows"):ze&&(et.linux=ve,et.osname="Linux");function it(Mt){switch(Mt){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}}var xt="";et.windows?xt=it(z(/Windows ((NT|XP)( \d\d?.\d)?)/i)):et.windowsphone?xt=z(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):et.mac?(xt=z(/Mac OS X (\d+([_\.\s]\d+)*)/i),xt=xt.replace(/[_\s]/g,".")):ae?(xt=z(/os (\d+([_\s]\d+)*) like mac os x/i),xt=xt.replace(/[_\s]/g,".")):le?xt=z(/android[ \/-](\d+(\.\d+)*)/i):et.webos?xt=z(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):et.blackberry?xt=z(/rim\stablet\sos\s(\d+(\.\d+)*)/i):et.bada?xt=z(/bada\/(\d+(\.\d+)*)/i):et.tizen&&(xt=z(/tizen[\/\s](\d+(\.\d+)*)/i)),xt&&(et.osversion=xt);var Et=!et.windows&&xt.split(".")[0];return ht||pe||ae=="ipad"||le&&(Et==3||Et>=4&&!ft)||et.silk?et.tablet=ve:(ft||ae=="iphone"||ae=="ipod"||le||ue||et.blackberry||et.webos||et.bada)&&(et.mobile=ve),et.msedge||et.msie&&et.version>=10||et.yandexbrowser&&et.version>=15||et.vivaldi&&et.version>=1||et.chrome&&et.version>=20||et.samsungBrowser&&et.version>=4||et.whale&&we([et.version,"1.0"])===1||et.mzbrowser&&we([et.version,"6.0"])===1||et.focus&&we([et.version,"1.0"])===1||et.firefox&&et.version>=20||et.safari&&et.version>=6||et.opera&&et.version>=10||et.ios&&et.osversion&&et.osversion.split(".")[0]>=6||et.blackberry&&et.version>=10.1||et.chromium&&et.version>=20?et.a=ve:et.msie&&et.version<10||et.chrome&&et.version<20||et.firefox&&et.version<20||et.safari&&et.version<6||et.opera&&et.version<10||et.ios&&et.osversion&&et.osversion.split(".")[0]<6||et.chromium&&et.version<20?et.c=ve:et.x=ve,et}var be=ce(typeof navigator!="undefined"&&navigator.userAgent||"");be.test=function(fe){for(var z=0;z<fe.length;++z){var ee=fe[z];if(typeof ee=="string"&&ee in be)return!0}return!1};function Ce(fe){return fe.split(".").length}function ye(fe,z){var ee=[],ae;if(Array.prototype.map)return Array.prototype.map.call(fe,z);for(ae=0;ae<fe.length;ae++)ee.push(z(fe[ae]));return ee}function we(fe){for(var z=Math.max(Ce(fe[0]),Ce(fe[1])),ee=ye(fe,function(ae){var re=z-Ce(ae);return ae=ae+new Array(re+1).join(".0"),ye(ae.split("."),function(le){return new Array(20-le.length).join("0")+le}).reverse()});--z>=0;){if(ee[0][z]>ee[1][z])return 1;if(ee[0][z]===ee[1][z]){if(z===0)return 0}else return-1}}function me(fe,z,ee){var ae=be;typeof z=="string"&&(ee=z,z=void 0),z===void 0&&(z=!1),ee&&(ae=ce(ee));var re=""+ae.version;for(var le in fe)if(fe.hasOwnProperty(le)&&ae[le]){if(typeof fe[le]!="string")throw new Error("Browser version in the minVersion map should be a string: "+le+": "+String(fe));return we([re,fe[le]])<0}return z}function xe(fe,z,ee){return!me(fe,z,ee)}return be.isUnsupportedBrowser=me,be.compareVersions=we,be.check=xe,be._detect=ce,be.detect=ce,be})},{}],89:[function(ie,Re,je){},{}],90:[function(ie,Re,je){(function(ve){(function(){"use strict";var ce=ie("base64-js"),be=ie("ieee754");je.Buffer=me,je.SlowBuffer=Ee,je.INSPECT_MAX_BYTES=50;var Ce=2147483647;je.kMaxLength=Ce,me.TYPED_ARRAY_SUPPORT=ye(),!me.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function ye(){try{var Qe=new Uint8Array(1);return Qe.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},Qe.foo()===42}catch(We){return!1}}Object.defineProperty(me.prototype,"parent",{enumerable:!0,get:function(){if(me.isBuffer(this))return this.buffer}}),Object.defineProperty(me.prototype,"offset",{enumerable:!0,get:function(){if(me.isBuffer(this))return this.byteOffset}});function we(Qe){if(Qe>Ce)throw new RangeError('The value "'+Qe+'" is invalid for option "size"');var We=new Uint8Array(Qe);return We.__proto__=me.prototype,We}function me(Qe,We,Ue){if(typeof Qe=="number"){if(typeof We=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return ee(Qe)}return xe(Qe,We,Ue)}typeof Symbol!="undefined"&&Symbol.species!=null&&me[Symbol.species]===me&&Object.defineProperty(me,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),me.poolSize=8192;function xe(Qe,We,Ue){if(typeof Qe=="string")return ae(Qe,We);if(ArrayBuffer.isView(Qe))return re(Qe);if(Qe==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Qe);if(yt(Qe,ArrayBuffer)||Qe&&yt(Qe.buffer,ArrayBuffer))return le(Qe,We,Ue);if(typeof Qe=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var qe=Qe.valueOf&&Qe.valueOf();if(qe!=null&&qe!==Qe)return me.from(qe,We,Ue);var He=ue(Qe);if(He)return He;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof Qe[Symbol.toPrimitive]=="function")return me.from(Qe[Symbol.toPrimitive]("string"),We,Ue);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Qe)}me.from=function(Qe,We,Ue){return xe(Qe,We,Ue)},me.prototype.__proto__=Uint8Array.prototype,me.__proto__=Uint8Array;function fe(Qe){if(typeof Qe!="number")throw new TypeError('"size" argument must be of type number');if(Qe<0)throw new RangeError('The value "'+Qe+'" is invalid for option "size"')}function z(Qe,We,Ue){return fe(Qe),Qe<=0?we(Qe):We!==void 0?typeof Ue=="string"?we(Qe).fill(We,Ue):we(Qe).fill(We):we(Qe)}me.alloc=function(Qe,We,Ue){return z(Qe,We,Ue)};function ee(Qe){return fe(Qe),we(Qe<0?0:pe(Qe)|0)}me.allocUnsafe=function(Qe){return ee(Qe)},me.allocUnsafeSlow=function(Qe){return ee(Qe)};function ae(Qe,We){if((typeof We!="string"||We==="")&&(We="utf8"),!me.isEncoding(We))throw new TypeError("Unknown encoding: "+We);var Ue=Pe(Qe,We)|0,qe=we(Ue),He=qe.write(Qe,We);return He!==Ue&&(qe=qe.slice(0,He)),qe}function re(Qe){for(var We=Qe.length<0?0:pe(Qe.length)|0,Ue=we(We),qe=0;qe<We;qe+=1)Ue[qe]=Qe[qe]&255;return Ue}function le(Qe,We,Ue){if(We<0||Qe.byteLength<We)throw new RangeError('"offset" is outside of buffer bounds');if(Qe.byteLength<We+(Ue||0))throw new RangeError('"length" is outside of buffer bounds');var qe;return We===void 0&&Ue===void 0?qe=new Uint8Array(Qe):Ue===void 0?qe=new Uint8Array(Qe,We):qe=new Uint8Array(Qe,We,Ue),qe.__proto__=me.prototype,qe}function ue(Qe){if(me.isBuffer(Qe)){var We=pe(Qe.length)|0,Ue=we(We);return Ue.length===0||Qe.copy(Ue,0,0,We),Ue}if(Qe.length!==void 0)return typeof Qe.length!="number"||lt(Qe.length)?we(0):re(Qe);if(Qe.type==="Buffer"&&Array.isArray(Qe.data))return re(Qe.data)}function pe(Qe){if(Qe>=Ce)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ce.toString(16)+" bytes");return Qe|0}function Ee(Qe){return+Qe!=Qe&&(Qe=0),me.alloc(+Qe)}me.isBuffer=function(We){return We!=null&&We._isBuffer===!0&&We!==me.prototype},me.compare=function(We,Ue){if(yt(We,Uint8Array)&&(We=me.from(We,We.offset,We.byteLength)),yt(Ue,Uint8Array)&&(Ue=me.from(Ue,Ue.offset,Ue.byteLength)),!me.isBuffer(We)||!me.isBuffer(Ue))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(We===Ue)return 0;for(var qe=We.length,He=Ue.length,De=0,Le=Math.min(qe,He);De<Le;++De)if(We[De]!==Ue[De]){qe=We[De],He=Ue[De];break}return qe<He?-1:He<qe?1:0},me.isEncoding=function(We){switch(String(We).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}},me.concat=function(We,Ue){if(!Array.isArray(We))throw new TypeError('"list" argument must be an Array of Buffers');if(We.length===0)return me.alloc(0);var qe;if(Ue===void 0)for(Ue=0,qe=0;qe<We.length;++qe)Ue+=We[qe].length;var He=me.allocUnsafe(Ue),De=0;for(qe=0;qe<We.length;++qe){var Le=We[qe];if(yt(Le,Uint8Array)&&(Le=me.from(Le)),!me.isBuffer(Le))throw new TypeError('"list" argument must be an Array of Buffers');Le.copy(He,De),De+=Le.length}return He};function Pe(Qe,We){if(me.isBuffer(Qe))return Qe.length;if(ArrayBuffer.isView(Qe)||yt(Qe,ArrayBuffer))return Qe.byteLength;if(typeof Qe!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Qe);var Ue=Qe.length,qe=arguments.length>2&&arguments[2]===!0;if(!qe&&Ue===0)return 0;for(var He=!1;;)switch(We){case"ascii":case"latin1":case"binary":return Ue;case"utf8":case"utf-8":return tt(Qe).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ue*2;case"hex":return Ue>>>1;case"base64":return ut(Qe).length;default:if(He)return qe?-1:tt(Qe).length;We=(""+We).toLowerCase(),He=!0}}me.byteLength=Pe;function Ie(Qe,We,Ue){var qe=!1;if((We===void 0||We<0)&&(We=0),We>this.length||((Ue===void 0||Ue>this.length)&&(Ue=this.length),Ue<=0)||(Ue>>>=0,We>>>=0,Ue<=We))return"";for(Qe||(Qe="utf8");;)switch(Qe){case"hex":return Et(this,We,Ue);case"utf8":case"utf-8":return ft(this,We,Ue);case"ascii":return it(this,We,Ue);case"latin1":case"binary":return xt(this,We,Ue);case"base64":return ht(this,We,Ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Mt(this,We,Ue);default:if(qe)throw new TypeError("Unknown encoding: "+Qe);Qe=(Qe+"").toLowerCase(),qe=!0}}me.prototype._isBuffer=!0;function ke(Qe,We,Ue){var qe=Qe[We];Qe[We]=Qe[Ue],Qe[Ue]=qe}me.prototype.swap16=function(){var We=this.length;if(We%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Ue=0;Ue<We;Ue+=2)ke(this,Ue,Ue+1);return this},me.prototype.swap32=function(){var We=this.length;if(We%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Ue=0;Ue<We;Ue+=4)ke(this,Ue,Ue+3),ke(this,Ue+1,Ue+2);return this},me.prototype.swap64=function(){var We=this.length;if(We%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Ue=0;Ue<We;Ue+=8)ke(this,Ue,Ue+7),ke(this,Ue+1,Ue+6),ke(this,Ue+2,Ue+5),ke(this,Ue+3,Ue+4);return this},me.prototype.toString=function(){var We=this.length;return We===0?"":arguments.length===0?ft(this,0,We):Ie.apply(this,arguments)},me.prototype.toLocaleString=me.prototype.toString,me.prototype.equals=function(We){if(!me.isBuffer(We))throw new TypeError("Argument must be a Buffer");return this===We?!0:me.compare(this,We)===0},me.prototype.inspect=function(){var We="",Ue=je.INSPECT_MAX_BYTES;return We=this.toString("hex",0,Ue).replace(/(.{2})/g,"$1 ").trim(),this.length>Ue&&(We+=" ... "),"<Buffer "+We+">"},me.prototype.compare=function(We,Ue,qe,He,De){if(yt(We,Uint8Array)&&(We=me.from(We,We.offset,We.byteLength)),!me.isBuffer(We))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof We);if(Ue===void 0&&(Ue=0),qe===void 0&&(qe=We?We.length:0),He===void 0&&(He=0),De===void 0&&(De=this.length),Ue<0||qe>We.length||He<0||De>this.length)throw new RangeError("out of range index");if(He>=De&&Ue>=qe)return 0;if(He>=De)return-1;if(Ue>=qe)return 1;if(Ue>>>=0,qe>>>=0,He>>>=0,De>>>=0,this===We)return 0;for(var Le=De-He,Ve=qe-Ue,dt=Math.min(Le,Ve),Ze=this.slice(He,De),Tt=We.slice(Ue,qe),_t=0;_t<dt;++_t)if(Ze[_t]!==Tt[_t]){Le=Ze[_t],Ve=Tt[_t];break}return Le<Ve?-1:Ve<Le?1:0};function Ae(Qe,We,Ue,qe,He){if(Qe.length===0)return-1;if(typeof Ue=="string"?(qe=Ue,Ue=0):Ue>2147483647?Ue=2147483647:Ue<-2147483648&&(Ue=-2147483648),Ue=+Ue,lt(Ue)&&(Ue=He?0:Qe.length-1),Ue<0&&(Ue=Qe.length+Ue),Ue>=Qe.length){if(He)return-1;Ue=Qe.length-1}else if(Ue<0)if(He)Ue=0;else return-1;if(typeof We=="string"&&(We=me.from(We,qe)),me.isBuffer(We))return We.length===0?-1:Oe(Qe,We,Ue,qe,He);if(typeof We=="number")return We=We&255,typeof Uint8Array.prototype.indexOf=="function"?He?Uint8Array.prototype.indexOf.call(Qe,We,Ue):Uint8Array.prototype.lastIndexOf.call(Qe,We,Ue):Oe(Qe,[We],Ue,qe,He);throw new TypeError("val must be string, number or Buffer")}function Oe(Qe,We,Ue,qe,He){var De=1,Le=Qe.length,Ve=We.length;if(qe!==void 0&&(qe=String(qe).toLowerCase(),qe==="ucs2"||qe==="ucs-2"||qe==="utf16le"||qe==="utf-16le")){if(Qe.length<2||We.length<2)return-1;De=2,Le/=2,Ve/=2,Ue/=2}function dt(kt,Nt){return De===1?kt[Nt]:kt.readUInt16BE(Nt*De)}var Ze;if(He){var Tt=-1;for(Ze=Ue;Ze<Le;Ze++)if(dt(Qe,Ze)===dt(We,Tt===-1?0:Ze-Tt)){if(Tt===-1&&(Tt=Ze),Ze-Tt+1===Ve)return Tt*De}else Tt!==-1&&(Ze-=Ze-Tt),Tt=-1}else for(Ue+Ve>Le&&(Ue=Le-Ve),Ze=Ue;Ze>=0;Ze--){for(var _t=!0,Qt=0;Qt<Ve;Qt++)if(dt(Qe,Ze+Qt)!==dt(We,Qt)){_t=!1;break}if(_t)return Ze}return-1}me.prototype.includes=function(We,Ue,qe){return this.indexOf(We,Ue,qe)!==-1},me.prototype.indexOf=function(We,Ue,qe){return Ae(this,We,Ue,qe,!0)},me.prototype.lastIndexOf=function(We,Ue,qe){return Ae(this,We,Ue,qe,!1)};function Fe(Qe,We,Ue,qe){Ue=Number(Ue)||0;var He=Qe.length-Ue;qe?(qe=Number(qe),qe>He&&(qe=He)):qe=He;var De=We.length;qe>De/2&&(qe=De/2);for(var Le=0;Le<qe;++Le){var Ve=parseInt(We.substr(Le*2,2),16);if(lt(Ve))return Le;Qe[Ue+Le]=Ve}return Le}function _e(Qe,We,Ue,qe){return wt(tt(We,Qe.length-Ue),Qe,Ue,qe)}function Ye(Qe,We,Ue,qe){return wt(bt(We),Qe,Ue,qe)}function ze(Qe,We,Ue,qe){return Ye(Qe,We,Ue,qe)}function Xe(Qe,We,Ue,qe){return wt(ut(We),Qe,Ue,qe)}function st(Qe,We,Ue,qe){return wt(Ke(We,Qe.length-Ue),Qe,Ue,qe)}me.prototype.write=function(We,Ue,qe,He){if(Ue===void 0)He="utf8",qe=this.length,Ue=0;else if(qe===void 0&&typeof Ue=="string")He=Ue,qe=this.length,Ue=0;else if(isFinite(Ue))Ue=Ue>>>0,isFinite(qe)?(qe=qe>>>0,He===void 0&&(He="utf8")):(He=qe,qe=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var De=this.length-Ue;if((qe===void 0||qe>De)&&(qe=De),We.length>0&&(qe<0||Ue<0)||Ue>this.length)throw new RangeError("Attempt to write outside buffer bounds");He||(He="utf8");for(var Le=!1;;)switch(He){case"hex":return Fe(this,We,Ue,qe);case"utf8":case"utf-8":return _e(this,We,Ue,qe);case"ascii":return Ye(this,We,Ue,qe);case"latin1":case"binary":return ze(this,We,Ue,qe);case"base64":return Xe(this,We,Ue,qe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return st(this,We,Ue,qe);default:if(Le)throw new TypeError("Unknown encoding: "+He);He=(""+He).toLowerCase(),Le=!0}},me.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ht(Qe,We,Ue){return We===0&&Ue===Qe.length?ce.fromByteArray(Qe):ce.fromByteArray(Qe.slice(We,Ue))}function ft(Qe,We,Ue){Ue=Math.min(Qe.length,Ue);for(var qe=[],He=We;He<Ue;){var De=Qe[He],Le=null,Ve=De>239?4:De>223?3:De>191?2:1;if(He+Ve<=Ue){var dt,Ze,Tt,_t;switch(Ve){case 1:De<128&&(Le=De);break;case 2:dt=Qe[He+1],(dt&192)===128&&(_t=(De&31)<<6|dt&63,_t>127&&(Le=_t));break;case 3:dt=Qe[He+1],Ze=Qe[He+2],(dt&192)===128&&(Ze&192)===128&&(_t=(De&15)<<12|(dt&63)<<6|Ze&63,_t>2047&&(_t<55296||_t>57343)&&(Le=_t));break;case 4:dt=Qe[He+1],Ze=Qe[He+2],Tt=Qe[He+3],(dt&192)===128&&(Ze&192)===128&&(Tt&192)===128&&(_t=(De&15)<<18|(dt&63)<<12|(Ze&63)<<6|Tt&63,_t>65535&&_t<1114112&&(Le=_t))}}Le===null?(Le=65533,Ve=1):Le>65535&&(Le-=65536,qe.push(Le>>>10&1023|55296),Le=56320|Le&1023),qe.push(Le),He+=Ve}return et(qe)}var Lt=4096;function et(Qe){var We=Qe.length;if(We<=Lt)return String.fromCharCode.apply(String,Qe);for(var Ue="",qe=0;qe<We;)Ue+=String.fromCharCode.apply(String,Qe.slice(qe,qe+=Lt));return Ue}function it(Qe,We,Ue){var qe="";Ue=Math.min(Qe.length,Ue);for(var He=We;He<Ue;++He)qe+=String.fromCharCode(Qe[He]&127);return qe}function xt(Qe,We,Ue){var qe="";Ue=Math.min(Qe.length,Ue);for(var He=We;He<Ue;++He)qe+=String.fromCharCode(Qe[He]);return qe}function Et(Qe,We,Ue){var qe=Qe.length;(!We||We<0)&&(We=0),(!Ue||Ue<0||Ue>qe)&&(Ue=qe);for(var He="",De=We;De<Ue;++De)He+=gt(Qe[De]);return He}function Mt(Qe,We,Ue){for(var qe=Qe.slice(We,Ue),He="",De=0;De<qe.length;De+=2)He+=String.fromCharCode(qe[De]+qe[De+1]*256);return He}me.prototype.slice=function(We,Ue){var qe=this.length;We=~~We,Ue=Ue===void 0?qe:~~Ue,We<0?(We+=qe,We<0&&(We=0)):We>qe&&(We=qe),Ue<0?(Ue+=qe,Ue<0&&(Ue=0)):Ue>qe&&(Ue=qe),Ue<We&&(Ue=We);var He=this.subarray(We,Ue);return He.__proto__=me.prototype,He};function mt(Qe,We,Ue){if(Qe%1!==0||Qe<0)throw new RangeError("offset is not uint");if(Qe+We>Ue)throw new RangeError("Trying to access beyond buffer length")}me.prototype.readUIntLE=function(We,Ue,qe){We=We>>>0,Ue=Ue>>>0,qe||mt(We,Ue,this.length);for(var He=this[We],De=1,Le=0;++Le<Ue&&(De*=256);)He+=this[We+Le]*De;return He},me.prototype.readUIntBE=function(We,Ue,qe){We=We>>>0,Ue=Ue>>>0,qe||mt(We,Ue,this.length);for(var He=this[We+--Ue],De=1;Ue>0&&(De*=256);)He+=this[We+--Ue]*De;return He},me.prototype.readUInt8=function(We,Ue){return We=We>>>0,Ue||mt(We,1,this.length),this[We]},me.prototype.readUInt16LE=function(We,Ue){return We=We>>>0,Ue||mt(We,2,this.length),this[We]|this[We+1]<<8},me.prototype.readUInt16BE=function(We,Ue){return We=We>>>0,Ue||mt(We,2,this.length),this[We]<<8|this[We+1]},me.prototype.readUInt32LE=function(We,Ue){return We=We>>>0,Ue||mt(We,4,this.length),(this[We]|this[We+1]<<8|this[We+2]<<16)+this[We+3]*16777216},me.prototype.readUInt32BE=function(We,Ue){return We=We>>>0,Ue||mt(We,4,this.length),this[We]*16777216+(this[We+1]<<16|this[We+2]<<8|this[We+3])},me.prototype.readIntLE=function(We,Ue,qe){We=We>>>0,Ue=Ue>>>0,qe||mt(We,Ue,this.length);for(var He=this[We],De=1,Le=0;++Le<Ue&&(De*=256);)He+=this[We+Le]*De;return De*=128,He>=De&&(He-=Math.pow(2,8*Ue)),He},me.prototype.readIntBE=function(We,Ue,qe){We=We>>>0,Ue=Ue>>>0,qe||mt(We,Ue,this.length);for(var He=Ue,De=1,Le=this[We+--He];He>0&&(De*=256);)Le+=this[We+--He]*De;return De*=128,Le>=De&&(Le-=Math.pow(2,8*Ue)),Le},me.prototype.readInt8=function(We,Ue){return We=We>>>0,Ue||mt(We,1,this.length),this[We]&128?(255-this[We]+1)*-1:this[We]},me.prototype.readInt16LE=function(We,Ue){We=We>>>0,Ue||mt(We,2,this.length);var qe=this[We]|this[We+1]<<8;return qe&32768?qe|4294901760:qe},me.prototype.readInt16BE=function(We,Ue){We=We>>>0,Ue||mt(We,2,this.length);var qe=this[We+1]|this[We]<<8;return qe&32768?qe|4294901760:qe},me.prototype.readInt32LE=function(We,Ue){return We=We>>>0,Ue||mt(We,4,this.length),this[We]|this[We+1]<<8|this[We+2]<<16|this[We+3]<<24},me.prototype.readInt32BE=function(We,Ue){return We=We>>>0,Ue||mt(We,4,this.length),this[We]<<24|this[We+1]<<16|this[We+2]<<8|this[We+3]},me.prototype.readFloatLE=function(We,Ue){return We=We>>>0,Ue||mt(We,4,this.length),be.read(this,We,!0,23,4)},me.prototype.readFloatBE=function(We,Ue){return We=We>>>0,Ue||mt(We,4,this.length),be.read(this,We,!1,23,4)},me.prototype.readDoubleLE=function(We,Ue){return We=We>>>0,Ue||mt(We,8,this.length),be.read(this,We,!0,52,8)},me.prototype.readDoubleBE=function(We,Ue){return We=We>>>0,Ue||mt(We,8,this.length),be.read(this,We,!1,52,8)};function pt(Qe,We,Ue,qe,He,De){if(!me.isBuffer(Qe))throw new TypeError('"buffer" argument must be a Buffer instance');if(We>He||We<De)throw new RangeError('"value" argument is out of bounds');if(Ue+qe>Qe.length)throw new RangeError("Index out of range")}me.prototype.writeUIntLE=function(We,Ue,qe,He){if(We=+We,Ue=Ue>>>0,qe=qe>>>0,!He){var De=Math.pow(2,8*qe)-1;pt(this,We,Ue,qe,De,0)}var Le=1,Ve=0;for(this[Ue]=We&255;++Ve<qe&&(Le*=256);)this[Ue+Ve]=We/Le&255;return Ue+qe},me.prototype.writeUIntBE=function(We,Ue,qe,He){if(We=+We,Ue=Ue>>>0,qe=qe>>>0,!He){var De=Math.pow(2,8*qe)-1;pt(this,We,Ue,qe,De,0)}var Le=qe-1,Ve=1;for(this[Ue+Le]=We&255;--Le>=0&&(Ve*=256);)this[Ue+Le]=We/Ve&255;return Ue+qe},me.prototype.writeUInt8=function(We,Ue,qe){return We=+We,Ue=Ue>>>0,qe||pt(this,We,Ue,1,255,0),this[Ue]=We&255,Ue+1},me.prototype.writeUInt16LE=function(We,Ue,qe){return We=+We,Ue=Ue>>>0,qe||pt(this,We,Ue,2,65535,0),this[Ue]=We&255,this[Ue+1]=We>>>8,Ue+2},me.prototype.writeUInt16BE=function(We,Ue,qe){return We=+We,Ue=Ue>>>0,qe||pt(this,We,Ue,2,65535,0),this[Ue]=We>>>8,this[Ue+1]=We&255,Ue+2},me.prototype.writeUInt32LE=function(We,Ue,qe){return We=+We,Ue=Ue>>>0,qe||pt(this,We,Ue,4,4294967295,0),this[Ue+3]=We>>>24,this[Ue+2]=We>>>16,this[Ue+1]=We>>>8,this[Ue]=We&255,Ue+4},me.prototype.writeUInt32BE=function(We,Ue,qe){return We=+We,Ue=Ue>>>0,qe||pt(this,We,Ue,4,4294967295,0),this[Ue]=We>>>24,this[Ue+1]=We>>>16,this[Ue+2]=We>>>8,this[Ue+3]=We&255,Ue+4},me.prototype.writeIntLE=function(We,Ue,qe,He){if(We=+We,Ue=Ue>>>0,!He){var De=Math.pow(2,8*qe-1);pt(this,We,Ue,qe,De-1,-De)}var Le=0,Ve=1,dt=0;for(this[Ue]=We&255;++Le<qe&&(Ve*=256);)We<0&&dt===0&&this[Ue+Le-1]!==0&&(dt=1),this[Ue+Le]=(We/Ve>>0)-dt&255;return Ue+qe},me.prototype.writeIntBE=function(We,Ue,qe,He){if(We=+We,Ue=Ue>>>0,!He){var De=Math.pow(2,8*qe-1);pt(this,We,Ue,qe,De-1,-De)}var Le=qe-1,Ve=1,dt=0;for(this[Ue+Le]=We&255;--Le>=0&&(Ve*=256);)We<0&&dt===0&&this[Ue+Le+1]!==0&&(dt=1),this[Ue+Le]=(We/Ve>>0)-dt&255;return Ue+qe},me.prototype.writeInt8=function(We,Ue,qe){return We=+We,Ue=Ue>>>0,qe||pt(this,We,Ue,1,127,-128),We<0&&(We=255+We+1),this[Ue]=We&255,Ue+1},me.prototype.writeInt16LE=function(We,Ue,qe){return We=+We,Ue=Ue>>>0,qe||pt(this,We,Ue,2,32767,-32768),this[Ue]=We&255,this[Ue+1]=We>>>8,Ue+2},me.prototype.writeInt16BE=function(We,Ue,qe){return We=+We,Ue=Ue>>>0,qe||pt(this,We,Ue,2,32767,-32768),this[Ue]=We>>>8,this[Ue+1]=We&255,Ue+2},me.prototype.writeInt32LE=function(We,Ue,qe){return We=+We,Ue=Ue>>>0,qe||pt(this,We,Ue,4,2147483647,-2147483648),this[Ue]=We&255,this[Ue+1]=We>>>8,this[Ue+2]=We>>>16,this[Ue+3]=We>>>24,Ue+4},me.prototype.writeInt32BE=function(We,Ue,qe){return We=+We,Ue=Ue>>>0,qe||pt(this,We,Ue,4,2147483647,-2147483648),We<0&&(We=4294967295+We+1),this[Ue]=We>>>24,this[Ue+1]=We>>>16,this[Ue+2]=We>>>8,this[Ue+3]=We&255,Ue+4};function vt(Qe,We,Ue,qe,He,De){if(Ue+qe>Qe.length)throw new RangeError("Index out of range");if(Ue<0)throw new RangeError("Index out of range")}function jt(Qe,We,Ue,qe,He){return We=+We,Ue=Ue>>>0,He||vt(Qe,We,Ue,4,34028234663852886e22,-34028234663852886e22),be.write(Qe,We,Ue,qe,23,4),Ue+4}me.prototype.writeFloatLE=function(We,Ue,qe){return jt(this,We,Ue,!0,qe)},me.prototype.writeFloatBE=function(We,Ue,qe){return jt(this,We,Ue,!1,qe)};function At(Qe,We,Ue,qe,He){return We=+We,Ue=Ue>>>0,He||vt(Qe,We,Ue,8,17976931348623157e292,-17976931348623157e292),be.write(Qe,We,Ue,qe,52,8),Ue+8}me.prototype.writeDoubleLE=function(We,Ue,qe){return At(this,We,Ue,!0,qe)},me.prototype.writeDoubleBE=function(We,Ue,qe){return At(this,We,Ue,!1,qe)},me.prototype.copy=function(We,Ue,qe,He){if(!me.isBuffer(We))throw new TypeError("argument should be a Buffer");if(qe||(qe=0),!He&&He!==0&&(He=this.length),Ue>=We.length&&(Ue=We.length),Ue||(Ue=0),He>0&&He<qe&&(He=qe),He===qe||We.length===0||this.length===0)return 0;if(Ue<0)throw new RangeError("targetStart out of bounds");if(qe<0||qe>=this.length)throw new RangeError("Index out of range");if(He<0)throw new RangeError("sourceEnd out of bounds");He>this.length&&(He=this.length),We.length-Ue<He-qe&&(He=We.length-Ue+qe);var De=He-qe;if(this===We&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(Ue,qe,He);else if(this===We&&qe<Ue&&Ue<He)for(var Le=De-1;Le>=0;--Le)We[Le+Ue]=this[Le+qe];else Uint8Array.prototype.set.call(We,this.subarray(qe,He),Ue);return De},me.prototype.fill=function(We,Ue,qe,He){if(typeof We=="string"){if(typeof Ue=="string"?(He=Ue,Ue=0,qe=this.length):typeof qe=="string"&&(He=qe,qe=this.length),He!==void 0&&typeof He!="string")throw new TypeError("encoding must be a string");if(typeof He=="string"&&!me.isEncoding(He))throw new TypeError("Unknown encoding: "+He);if(We.length===1){var De=We.charCodeAt(0);(He==="utf8"&&De<128||He==="latin1")&&(We=De)}}else typeof We=="number"&&(We=We&255);if(Ue<0||this.length<Ue||this.length<qe)throw new RangeError("Out of range index");if(qe<=Ue)return this;Ue=Ue>>>0,qe=qe===void 0?this.length:qe>>>0,We||(We=0);var Le;if(typeof We=="number")for(Le=Ue;Le<qe;++Le)this[Le]=We;else{var Ve=me.isBuffer(We)?We:me.from(We,He),dt=Ve.length;if(dt===0)throw new TypeError('The value "'+We+'" is invalid for argument "value"');for(Le=0;Le<qe-Ue;++Le)this[Le+Ue]=Ve[Le%dt]}return this};var Kt=/[^+/0-9A-Za-z-_]/g;function Ct(Qe){if(Qe=Qe.split("=")[0],Qe=Qe.trim().replace(Kt,""),Qe.length<2)return"";for(;Qe.length%4!==0;)Qe=Qe+"=";return Qe}function gt(Qe){return Qe<16?"0"+Qe.toString(16):Qe.toString(16)}function tt(Qe,We){We=We||1/0;for(var Ue,qe=Qe.length,He=null,De=[],Le=0;Le<qe;++Le){if(Ue=Qe.charCodeAt(Le),Ue>55295&&Ue<57344){if(!He){if(Ue>56319){(We-=3)>-1&&De.push(239,191,189);continue}else if(Le+1===qe){(We-=3)>-1&&De.push(239,191,189);continue}He=Ue;continue}if(Ue<56320){(We-=3)>-1&&De.push(239,191,189),He=Ue;continue}Ue=(He-55296<<10|Ue-56320)+65536}else He&&(We-=3)>-1&&De.push(239,191,189);if(He=null,Ue<128){if((We-=1)<0)break;De.push(Ue)}else if(Ue<2048){if((We-=2)<0)break;De.push(Ue>>6|192,Ue&63|128)}else if(Ue<65536){if((We-=3)<0)break;De.push(Ue>>12|224,Ue>>6&63|128,Ue&63|128)}else if(Ue<1114112){if((We-=4)<0)break;De.push(Ue>>18|240,Ue>>12&63|128,Ue>>6&63|128,Ue&63|128)}else throw new Error("Invalid code point")}return De}function bt(Qe){for(var We=[],Ue=0;Ue<Qe.length;++Ue)We.push(Qe.charCodeAt(Ue)&255);return We}function Ke(Qe,We){for(var Ue,qe,He,De=[],Le=0;Le<Qe.length&&!((We-=2)<0);++Le)Ue=Qe.charCodeAt(Le),qe=Ue>>8,He=Ue%256,De.push(He),De.push(qe);return De}function ut(Qe){return ce.toByteArray(Ct(Qe))}function wt(Qe,We,Ue,qe){for(var He=0;He<qe&&!(He+Ue>=We.length||He>=Qe.length);++He)We[He+Ue]=Qe[He];return He}function yt(Qe,We){return Qe instanceof We||Qe!=null&&Qe.constructor!=null&&Qe.constructor.name!=null&&Qe.constructor.name===We.name}function lt(Qe){return Qe!==Qe}}).call(this)}).call(this,ie("buffer").Buffer)},{"base64-js":87,buffer:90,ieee754:357}],91:[function(ie,Re,je){Re.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"}},{}],92:[function(ie,Re,je){"use strict";var ve=ie("get-intrinsic"),ce=ie("./"),be=ce(ve("String.prototype.indexOf"));Re.exports=function(ye,we){var me=ve(ye,!!we);return typeof me=="function"&&be(ye,".prototype.")>-1?ce(me):me}},{"./":93,"get-intrinsic":348}],93:[function(ie,Re,je){"use strict";var ve=ie("function-bind"),ce=ie("get-intrinsic"),be=ce("%Function.prototype.apply%"),Ce=ce("%Function.prototype.call%"),ye=ce("%Reflect.apply%",!0)||ve.call(Ce,be),we=ce("%Object.getOwnPropertyDescriptor%",!0),me=ce("%Object.defineProperty%",!0),xe=ce("%Math.max%");if(me)try{me({},"a",{value:1})}catch(z){me=null}Re.exports=function(ee){var ae=ye(ve,Ce,arguments);if(we&&me){var re=we(ae,"length");re.configurable&&me(ae,"length",{value:1+xe(0,ee.length-(arguments.length-1))})}return ae};var fe=function(){return ye(ve,be,arguments)};me?me(Re.exports,"apply",{value:fe}):Re.exports.apply=fe},{"function-bind":347,"get-intrinsic":348}],94:[function(ie,Re,je){"use strict";var ve=Array.prototype.slice;Re.exports=ce;function ce(Ce,ye){if(!(this instanceof ce))return new ce(Ce,ye);this.src=Ce,this._withAccess=ye}ce.prototype.withAccess=function(Ce){return this._withAccess=Ce!==!1,this},ce.prototype.pick=function(Ce){return Array.isArray(Ce)||(Ce=ve.call(arguments)),Ce.length&&(this.keys=Ce),this},ce.prototype.to=function(Ce){if(Ce=Ce||{},!this.src)return Ce;var ye=this.keys||Object.keys(this.src);if(!this._withAccess){for(var we=0;we<ye.length;we++)me=ye[we],Ce[me]===void 0&&(Ce[me]=this.src[me]);return Ce}for(var we=0;we<ye.length;we++){var me=ye[we];if(be(Ce,me)){var xe=this.src.__lookupGetter__(me),fe=this.src.__lookupSetter__(me);xe&&Ce.__defineGetter__(me,xe),fe&&Ce.__defineSetter__(me,fe),!xe&&!fe&&(Ce[me]=this.src[me])}}return Ce},ce.prototype.toCover=function(Ce){for(var ye=this.keys||Object.keys(this.src),we=0;we<ye.length;we++){var me=ye[we];delete Ce[me];var xe=this.src.__lookupGetter__(me),fe=this.src.__lookupSetter__(me);xe&&Ce.__defineGetter__(me,xe),fe&&Ce.__defineSetter__(me,fe),!xe&&!fe&&(Ce[me]=this.src[me])}},ce.prototype.override=ce.prototype.toCover,ce.prototype.and=function(Ce){var ye={};return this.to(ye),this.src=Ce,this.to(ye),this.src=ye,this};function be(Ce,ye){return Ce[ye]===void 0&&Ce.__lookupGetter__(ye)===void 0&&Ce.__lookupSetter__(ye)===void 0}},{}],95:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/is-callable"),be=ie("../internals/try-to-string"),Ce=ve.TypeError;Re.exports=function(ye){if(ce(ye))return ye;throw Ce(be(ye)+" is not a function")}},{"../internals/global":163,"../internals/is-callable":176,"../internals/try-to-string":257}],96:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/is-constructor"),be=ie("../internals/try-to-string"),Ce=ve.TypeError;Re.exports=function(ye){if(ce(ye))return ye;throw Ce(be(ye)+" is not a constructor")}},{"../internals/global":163,"../internals/is-constructor":177,"../internals/try-to-string":257}],97:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/is-callable"),be=ve.String,Ce=ve.TypeError;Re.exports=function(ye){if(typeof ye=="object"||ce(ye))return ye;throw Ce("Can't set "+be(ye)+" as a prototype")}},{"../internals/global":163,"../internals/is-callable":176}],98:[function(ie,Re,je){var ve=ie("../internals/well-known-symbol"),ce=ie("../internals/object-create"),be=ie("../internals/object-define-property"),Ce=ve("unscopables"),ye=Array.prototype;ye[Ce]==null&&be.f(ye,Ce,{configurable:!0,value:ce(null)}),Re.exports=function(we){ye[Ce][we]=!0}},{"../internals/object-create":196,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],99:[function(ie,Re,je){"use strict";var ve=ie("../internals/string-multibyte").charAt;Re.exports=function(ce,be,Ce){return be+(Ce?ve(ce,be).length:1)}},{"../internals/string-multibyte":239}],100:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/object-is-prototype-of"),be=ve.TypeError;Re.exports=function(Ce,ye){if(ce(ye,Ce))return Ce;throw be("Incorrect invocation")}},{"../internals/global":163,"../internals/object-is-prototype-of":204}],101:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/is-object"),be=ve.String,Ce=ve.TypeError;Re.exports=function(ye){if(ce(ye))return ye;throw Ce(be(ye)+" is not an object")}},{"../internals/global":163,"../internals/is-object":180}],102:[function(ie,Re,je){Re.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"},{}],103:[function(ie,Re,je){"use strict";var ve=ie("../internals/array-buffer-native"),ce=ie("../internals/descriptors"),be=ie("../internals/global"),Ce=ie("../internals/is-callable"),ye=ie("../internals/is-object"),we=ie("../internals/has-own-property"),me=ie("../internals/classof"),xe=ie("../internals/try-to-string"),fe=ie("../internals/create-non-enumerable-property"),z=ie("../internals/redefine"),ee=ie("../internals/object-define-property").f,ae=ie("../internals/object-is-prototype-of"),re=ie("../internals/object-get-prototype-of"),le=ie("../internals/object-set-prototype-of"),ue=ie("../internals/well-known-symbol"),pe=ie("../internals/uid"),Ee=be.Int8Array,Pe=Ee&&Ee.prototype,Ie=be.Uint8ClampedArray,ke=Ie&&Ie.prototype,Ae=Ee&&re(Ee),Oe=Pe&&re(Pe),Fe=Object.prototype,_e=be.TypeError,Ye=ue("toStringTag"),ze=pe("TYPED_ARRAY_TAG"),Xe=pe("TYPED_ARRAY_CONSTRUCTOR"),st=ve&&!!le&&me(be.opera)!=="Opera",ht=!1,ft,Lt,et,it={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},xt={BigInt64Array:8,BigUint64Array:8},Et=function(Kt){if(!ye(Kt))return!1;var Ct=me(Kt);return Ct==="DataView"||we(it,Ct)||we(xt,Ct)},Mt=function(At){if(!ye(At))return!1;var Kt=me(At);return we(it,Kt)||we(xt,Kt)},mt=function(At){if(Mt(At))return At;throw _e("Target is not a typed array")},pt=function(At){if(Ce(At)&&(!le||ae(Ae,At)))return At;throw _e(xe(At)+" is not a typed array constructor")},vt=function(At,Kt,Ct,gt){if(ce){if(Ct)for(var tt in it){var bt=be[tt];if(bt&&we(bt.prototype,At))try{delete bt.prototype[At]}catch(Ke){try{bt.prototype[At]=Kt}catch(ut){}}}(!Oe[At]||Ct)&&z(Oe,At,Ct?Kt:st&&Pe[At]||Kt,gt)}},jt=function(At,Kt,Ct){var gt,tt;if(ce){if(le){if(Ct){for(gt in it)if(tt=be[gt],tt&&we(tt,At))try{delete tt[At]}catch(bt){}}if(!Ae[At]||Ct)try{return z(Ae,At,Ct?Kt:st&&Ae[At]||Kt)}catch(bt){}else return}for(gt in it)tt=be[gt],tt&&(!tt[At]||Ct)&&z(tt,At,Kt)}};for(ft in it)Lt=be[ft],et=Lt&&Lt.prototype,et?fe(et,Xe,Lt):st=!1;for(ft in xt)Lt=be[ft],et=Lt&&Lt.prototype,et&&fe(et,Xe,Lt);if((!st||!Ce(Ae)||Ae===Function.prototype)&&(Ae=function(){throw _e("Incorrect invocation")},st))for(ft in it)be[ft]&&le(be[ft],Ae);if((!st||!Oe||Oe===Fe)&&(Oe=Ae.prototype,st))for(ft in it)be[ft]&&le(be[ft].prototype,Oe);if(st&&re(ke)!==Oe&&le(ke,Oe),ce&&!we(Oe,Ye)){ht=!0,ee(Oe,Ye,{get:function(){return ye(this)?this[ze]:void 0}});for(ft in it)be[ft]&&fe(be[ft],ze,ft)}Re.exports={NATIVE_ARRAY_BUFFER_VIEWS:st,TYPED_ARRAY_CONSTRUCTOR:Xe,TYPED_ARRAY_TAG:ht&&ze,aTypedArray:mt,aTypedArrayConstructor:pt,exportTypedArrayMethod:vt,exportTypedArrayStaticMethod:jt,isView:Et,isTypedArray:Mt,TypedArray:Ae,TypedArrayPrototype:Oe}},{"../internals/array-buffer-native":102,"../internals/classof":124,"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/is-object":180,"../internals/object-define-property":198,"../internals/object-get-prototype-of":203,"../internals/object-is-prototype-of":204,"../internals/object-set-prototype-of":208,"../internals/redefine":222,"../internals/try-to-string":257,"../internals/uid":263,"../internals/well-known-symbol":268}],104:[function(ie,Re,je){"use strict";var ve=ie("../internals/global"),ce=ie("../internals/function-uncurry-this"),be=ie("../internals/descriptors"),Ce=ie("../internals/array-buffer-native"),ye=ie("../internals/function-name"),we=ie("../internals/create-non-enumerable-property"),me=ie("../internals/redefine-all"),xe=ie("../internals/fails"),fe=ie("../internals/an-instance"),z=ie("../internals/to-integer-or-infinity"),ee=ie("../internals/to-length"),ae=ie("../internals/to-index"),re=ie("../internals/ieee754"),le=ie("../internals/object-get-prototype-of"),ue=ie("../internals/object-set-prototype-of"),pe=ie("../internals/object-get-own-property-names").f,Ee=ie("../internals/object-define-property").f,Pe=ie("../internals/array-fill"),Ie=ie("../internals/array-slice-simple"),ke=ie("../internals/set-to-string-tag"),Ae=ie("../internals/internal-state"),Oe=ye.PROPER,Fe=ye.CONFIGURABLE,_e=Ae.get,Ye=Ae.set,ze="ArrayBuffer",Xe="DataView",st="prototype",ht="Wrong length",ft="Wrong index",Lt=ve[ze],et=Lt,it=et&&et[st],xt=ve[Xe],Et=xt&&xt[st],Mt=Object.prototype,mt=ve.Array,pt=ve.RangeError,vt=ce(Pe),jt=ce([].reverse),At=re.pack,Kt=re.unpack,Ct=function(Le){return[Le&255]},gt=function(Le){return[Le&255,Le>>8&255]},tt=function(Le){return[Le&255,Le>>8&255,Le>>16&255,Le>>24&255]},bt=function(Le){return Le[3]<<24|Le[2]<<16|Le[1]<<8|Le[0]},Ke=function(Le){return At(Le,23,4)},ut=function(Le){return At(Le,52,8)},wt=function(Le,Ve){Ee(Le[st],Ve,{get:function(){return _e(this)[Ve]}})},yt=function(Le,Ve,dt,Ze){var Tt=ae(dt),_t=_e(Le);if(Tt+Ve>_t.byteLength)throw pt(ft);var Qt=_e(_t.buffer).bytes,kt=Tt+_t.byteOffset,Nt=Ie(Qt,kt,kt+Ve);return Ze?Nt:jt(Nt)},lt=function(Le,Ve,dt,Ze,Tt,_t){var Qt=ae(dt),kt=_e(Le);if(Qt+Ve>kt.byteLength)throw pt(ft);for(var Nt=_e(kt.buffer).bytes,Zt=Qt+kt.byteOffset,on=Ze(+Tt),vn=0;vn<Ve;vn++)Nt[Zt+vn]=on[_t?vn:Ve-vn-1]};if(!Ce)et=function(Ve){fe(this,it);var dt=ae(Ve);Ye(this,{bytes:vt(mt(dt),0),byteLength:dt}),be||(this.byteLength=dt)},it=et[st],xt=function(Ve,dt,Ze){fe(this,Et),fe(Ve,it);var Tt=_e(Ve).byteLength,_t=z(dt);if(_t<0||_t>Tt)throw pt("Wrong offset");if(Ze=Ze===void 0?Tt-_t:ee(Ze),_t+Ze>Tt)throw pt(ht);Ye(this,{buffer:Ve,byteLength:Ze,byteOffset:_t}),be||(this.buffer=Ve,this.byteLength=Ze,this.byteOffset=_t)},Et=xt[st],be&&(wt(et,"byteLength"),wt(xt,"buffer"),wt(xt,"byteLength"),wt(xt,"byteOffset")),me(Et,{getInt8:function(Ve){return yt(this,1,Ve)[0]<<24>>24},getUint8:function(Ve){return yt(this,1,Ve)[0]},getInt16:function(Ve){var dt=yt(this,2,Ve,arguments.length>1?arguments[1]:void 0);return(dt[1]<<8|dt[0])<<16>>16},getUint16:function(Ve){var dt=yt(this,2,Ve,arguments.length>1?arguments[1]:void 0);return dt[1]<<8|dt[0]},getInt32:function(Ve){return bt(yt(this,4,Ve,arguments.length>1?arguments[1]:void 0))},getUint32:function(Ve){return bt(yt(this,4,Ve,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(Ve){return Kt(yt(this,4,Ve,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(Ve){return Kt(yt(this,8,Ve,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(Ve,dt){lt(this,1,Ve,Ct,dt)},setUint8:function(Ve,dt){lt(this,1,Ve,Ct,dt)},setInt16:function(Ve,dt){lt(this,2,Ve,gt,dt,arguments.length>2?arguments[2]:void 0)},setUint16:function(Ve,dt){lt(this,2,Ve,gt,dt,arguments.length>2?arguments[2]:void 0)},setInt32:function(Ve,dt){lt(this,4,Ve,tt,dt,arguments.length>2?arguments[2]:void 0)},setUint32:function(Ve,dt){lt(this,4,Ve,tt,dt,arguments.length>2?arguments[2]:void 0)},setFloat32:function(Ve,dt){lt(this,4,Ve,Ke,dt,arguments.length>2?arguments[2]:void 0)},setFloat64:function(Ve,dt){lt(this,8,Ve,ut,dt,arguments.length>2?arguments[2]:void 0)}});else{var Qe=Oe&&Lt.name!==ze;if(!xe(function(){Lt(1)})||!xe(function(){new Lt(-1)})||xe(function(){return new Lt,new Lt(1.5),new Lt(NaN),Qe&&!Fe})){et=function(Ve){return fe(this,it),new Lt(ae(Ve))},et[st]=it;for(var We=pe(Lt),Ue=0,qe;We.length>Ue;)(qe=We[Ue++])in et||we(et,qe,Lt[qe]);it.constructor=et}else Qe&&Fe&&we(Lt,"name",ze);ue&&le(Et)!==Mt&&ue(Et,Mt);var He=new xt(new et(2)),De=ce(Et.setInt8);He.setInt8(0,2147483648),He.setInt8(1,2147483649),(He.getInt8(0)||!He.getInt8(1))&&me(Et,{setInt8:function(Ve,dt){De(this,Ve,dt<<24>>24)},setUint8:function(Ve,dt){De(this,Ve,dt<<24>>24)}},{unsafe:!0})}ke(et,ze),ke(xt,Xe),Re.exports={ArrayBuffer:et,DataView:xt}},{"../internals/an-instance":100,"../internals/array-buffer-native":102,"../internals/array-fill":106,"../internals/array-slice-simple":116,"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/fails":150,"../internals/function-name":156,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/ieee754":169,"../internals/internal-state":173,"../internals/object-define-property":198,"../internals/object-get-own-property-names":201,"../internals/object-get-prototype-of":203,"../internals/object-set-prototype-of":208,"../internals/redefine-all":221,"../internals/set-to-string-tag":234,"../internals/to-index":246,"../internals/to-integer-or-infinity":248,"../internals/to-length":249}],105:[function(ie,Re,je){"use strict";var ve=ie("../internals/to-object"),ce=ie("../internals/to-absolute-index"),be=ie("../internals/length-of-array-like"),Ce=Math.min;Re.exports=[].copyWithin||function(we,me){var xe=ve(this),fe=be(xe),z=ce(we,fe),ee=ce(me,fe),ae=arguments.length>2?arguments[2]:void 0,re=Ce((ae===void 0?fe:ce(ae,fe))-ee,fe-z),le=1;for(ee<z&&z<ee+re&&(le=-1,ee+=re-1,z+=re-1);re-- >0;)ee in xe?xe[z]=xe[ee]:delete xe[z],z+=le,ee+=le;return xe}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],106:[function(ie,Re,je){"use strict";var ve=ie("../internals/to-object"),ce=ie("../internals/to-absolute-index"),be=ie("../internals/length-of-array-like");Re.exports=function(ye){for(var we=ve(this),me=be(we),xe=arguments.length,fe=ce(xe>1?arguments[1]:void 0,me),z=xe>2?arguments[2]:void 0,ee=z===void 0?me:ce(z,me);ee>fe;)we[fe++]=ye;return we}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],107:[function(ie,Re,je){"use strict";var ve=ie("../internals/array-iteration").forEach,ce=ie("../internals/array-method-is-strict"),be=ce("forEach");Re.exports=be?[].forEach:function(ye){return ve(this,ye,arguments.length>1?arguments[1]:void 0)}},{"../internals/array-iteration":111,"../internals/array-method-is-strict":114}],108:[function(ie,Re,je){var ve=ie("../internals/length-of-array-like");Re.exports=function(ce,be){for(var Ce=0,ye=ve(be),we=new ce(ye);ye>Ce;)we[Ce]=be[Ce++];return we}},{"../internals/length-of-array-like":188}],109:[function(ie,Re,je){"use strict";var ve=ie("../internals/global"),ce=ie("../internals/function-bind-context"),be=ie("../internals/function-call"),Ce=ie("../internals/to-object"),ye=ie("../internals/call-with-safe-iteration-closing"),we=ie("../internals/is-array-iterator-method"),me=ie("../internals/is-constructor"),xe=ie("../internals/length-of-array-like"),fe=ie("../internals/create-property"),z=ie("../internals/get-iterator"),ee=ie("../internals/get-iterator-method"),ae=ve.Array;Re.exports=function(le){var ue=Ce(le),pe=me(this),Ee=arguments.length,Pe=Ee>1?arguments[1]:void 0,Ie=Pe!==void 0;Ie&&(Pe=ce(Pe,Ee>2?arguments[2]:void 0));var ke=ee(ue),Ae=0,Oe,Fe,_e,Ye,ze,Xe;if(ke&&!(this==ae&&we(ke)))for(Ye=z(ue,ke),ze=Ye.next,Fe=pe?new this:[];!(_e=be(ze,Ye)).done;Ae++)Xe=Ie?ye(Ye,Pe,[_e.value,Ae],!0):_e.value,fe(Fe,Ae,Xe);else for(Oe=xe(ue),Fe=pe?new this(Oe):ae(Oe);Oe>Ae;Ae++)Xe=Ie?Pe(ue[Ae],Ae):ue[Ae],fe(Fe,Ae,Xe);return Fe.length=Ae,Fe}},{"../internals/call-with-safe-iteration-closing":121,"../internals/create-property":131,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/is-array-iterator-method":174,"../internals/is-constructor":177,"../internals/length-of-array-like":188,"../internals/to-object":250}],110:[function(ie,Re,je){var ve=ie("../internals/to-indexed-object"),ce=ie("../internals/to-absolute-index"),be=ie("../internals/length-of-array-like"),Ce=function(ye){return function(we,me,xe){var fe=ve(we),z=be(fe),ee=ce(xe,z),ae;if(ye&&me!=me){for(;z>ee;)if(ae=fe[ee++],ae!=ae)return!0}else for(;z>ee;ee++)if((ye||ee in fe)&&fe[ee]===me)return ye||ee||0;return!ye&&-1}};Re.exports={includes:Ce(!0),indexOf:Ce(!1)}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-indexed-object":247}],111:[function(ie,Re,je){var ve=ie("../internals/function-bind-context"),ce=ie("../internals/function-uncurry-this"),be=ie("../internals/indexed-object"),Ce=ie("../internals/to-object"),ye=ie("../internals/length-of-array-like"),we=ie("../internals/array-species-create"),me=ce([].push),xe=function(fe){var z=fe==1,ee=fe==2,ae=fe==3,re=fe==4,le=fe==6,ue=fe==7,pe=fe==5||le;return function(Ee,Pe,Ie,ke){for(var Ae=Ce(Ee),Oe=be(Ae),Fe=ve(Pe,Ie),_e=ye(Oe),Ye=0,ze=ke||we,Xe=z?ze(Ee,_e):ee||ue?ze(Ee,0):void 0,st,ht;_e>Ye;Ye++)if((pe||Ye in Oe)&&(st=Oe[Ye],ht=Fe(st,Ye,Ae),fe))if(z)Xe[Ye]=ht;else if(ht)switch(fe){case 3:return!0;case 5:return st;case 6:return Ye;case 2:me(Xe,st)}else switch(fe){case 4:return!1;case 7:me(Xe,st)}return le?-1:ae||re?re:Xe}};Re.exports={forEach:xe(0),map:xe(1),filter:xe(2),some:xe(3),every:xe(4),find:xe(5),findIndex:xe(6),filterReject:xe(7)}},{"../internals/array-species-create":120,"../internals/function-bind-context":153,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/length-of-array-like":188,"../internals/to-object":250}],112:[function(ie,Re,je){"use strict";var ve=ie("../internals/function-apply"),ce=ie("../internals/to-indexed-object"),be=ie("../internals/to-integer-or-infinity"),Ce=ie("../internals/length-of-array-like"),ye=ie("../internals/array-method-is-strict"),we=Math.min,me=[].lastIndexOf,xe=!!me&&1/[1].lastIndexOf(1,-0)<0,fe=ye("lastIndexOf"),z=xe||!fe;Re.exports=z?function(ae){if(xe)return ve(me,this,arguments)||0;var re=ce(this),le=Ce(re),ue=le-1;for(arguments.length>1&&(ue=we(ue,be(arguments[1]))),ue<0&&(ue=le+ue);ue>=0;ue--)if(ue in re&&re[ue]===ae)return ue||0;return-1}:me},{"../internals/array-method-is-strict":114,"../internals/function-apply":152,"../internals/length-of-array-like":188,"../internals/to-indexed-object":247,"../internals/to-integer-or-infinity":248}],113:[function(ie,Re,je){var ve=ie("../internals/fails"),ce=ie("../internals/well-known-symbol"),be=ie("../internals/engine-v8-version"),Ce=ce("species");Re.exports=function(ye){return be>=51||!ve(function(){var we=[],me=we.constructor={};return me[Ce]=function(){return{foo:1}},we[ye](Boolean).foo!==1})}},{"../internals/engine-v8-version":146,"../internals/fails":150,"../internals/well-known-symbol":268}],114:[function(ie,Re,je){"use strict";var ve=ie("../internals/fails");Re.exports=function(ce,be){var Ce=[][ce];return!!Ce&&ve(function(){Ce.call(null,be||function(){return 1},1)})}},{"../internals/fails":150}],115:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/a-callable"),be=ie("../internals/to-object"),Ce=ie("../internals/indexed-object"),ye=ie("../internals/length-of-array-like"),we=ve.TypeError,me=function(xe){return function(fe,z,ee,ae){ce(z);var re=be(fe),le=Ce(re),ue=ye(re),pe=xe?ue-1:0,Ee=xe?-1:1;if(ee<2)for(;;){if(pe in le){ae=le[pe],pe+=Ee;break}if(pe+=Ee,xe?pe<0:ue<=pe)throw we("Reduce of empty array with no initial value")}for(;xe?pe>=0:ue>pe;pe+=Ee)pe in le&&(ae=z(ae,le[pe],pe,re));return ae}};Re.exports={left:me(!1),right:me(!0)}},{"../internals/a-callable":95,"../internals/global":163,"../internals/indexed-object":170,"../internals/length-of-array-like":188,"../internals/to-object":250}],116:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/to-absolute-index"),be=ie("../internals/length-of-array-like"),Ce=ie("../internals/create-property"),ye=ve.Array,we=Math.max;Re.exports=function(me,xe,fe){for(var z=be(me),ee=ce(xe,z),ae=ce(fe===void 0?z:fe,z),re=ye(we(ae-ee,0)),le=0;ee<ae;ee++,le++)Ce(re,le,me[ee]);return re.length=le,re}},{"../internals/create-property":131,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245}],117:[function(ie,Re,je){var ve=ie("../internals/function-uncurry-this");Re.exports=ve([].slice)},{"../internals/function-uncurry-this":157}],118:[function(ie,Re,je){var ve=ie("../internals/array-slice-simple"),ce=Math.floor,be=function(we,me){var xe=we.length,fe=ce(xe/2);return xe<8?Ce(we,me):ye(we,be(ve(we,0,fe),me),be(ve(we,fe),me),me)},Ce=function(we,me){for(var xe=we.length,fe=1,z,ee;fe<xe;){for(ee=fe,z=we[fe];ee&&me(we[ee-1],z)>0;)we[ee]=we[--ee];ee!==fe++&&(we[ee]=z)}return we},ye=function(we,me,xe,fe){for(var z=me.length,ee=xe.length,ae=0,re=0;ae<z||re<ee;)we[ae+re]=ae<z&&re<ee?fe(me[ae],xe[re])<=0?me[ae++]:xe[re++]:ae<z?me[ae++]:xe[re++];return we};Re.exports=be},{"../internals/array-slice-simple":116}],119:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/is-array"),be=ie("../internals/is-constructor"),Ce=ie("../internals/is-object"),ye=ie("../internals/well-known-symbol"),we=ye("species"),me=ve.Array;Re.exports=function(xe){var fe;return ce(xe)&&(fe=xe.constructor,be(fe)&&(fe===me||ce(fe.prototype))?fe=void 0:Ce(fe)&&(fe=fe[we],fe===null&&(fe=void 0))),fe===void 0?me:fe}},{"../internals/global":163,"../internals/is-array":175,"../internals/is-constructor":177,"../internals/is-object":180,"../internals/well-known-symbol":268}],120:[function(ie,Re,je){var ve=ie("../internals/array-species-constructor");Re.exports=function(ce,be){return new(ve(ce))(be===0?0:be)}},{"../internals/array-species-constructor":119}],121:[function(ie,Re,je){var ve=ie("../internals/an-object"),ce=ie("../internals/iterator-close");Re.exports=function(be,Ce,ye,we){try{return we?Ce(ve(ye)[0],ye[1]):Ce(ye)}catch(me){ce(be,"throw",me)}}},{"../internals/an-object":101,"../internals/iterator-close":185}],122:[function(ie,Re,je){var ve=ie("../internals/well-known-symbol"),ce=ve("iterator"),be=!1;try{var Ce=0,ye={next:function(){return{done:!!Ce++}},return:function(){be=!0}};ye[ce]=function(){return this},Array.from(ye,function(){throw 2})}catch(we){}Re.exports=function(we,me){if(!me&&!be)return!1;var xe=!1;try{var fe={};fe[ce]=function(){return{next:function(){return{done:xe=!0}}}},we(fe)}catch(z){}return xe}},{"../internals/well-known-symbol":268}],123:[function(ie,Re,je){var ve=ie("../internals/function-uncurry-this"),ce=ve({}.toString),be=ve("".slice);Re.exports=function(Ce){return be(ce(Ce),8,-1)}},{"../internals/function-uncurry-this":157}],124:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/to-string-tag-support"),be=ie("../internals/is-callable"),Ce=ie("../internals/classof-raw"),ye=ie("../internals/well-known-symbol"),we=ye("toStringTag"),me=ve.Object,xe=Ce(function(){return arguments}())=="Arguments",fe=function(z,ee){try{return z[ee]}catch(ae){}};Re.exports=ce?Ce:function(z){var ee,ae,re;return z===void 0?"Undefined":z===null?"Null":typeof(ae=fe(ee=me(z),we))=="string"?ae:xe?Ce(ee):(re=Ce(ee))=="Object"&&be(ee.callee)?"Arguments":re}},{"../internals/classof-raw":123,"../internals/global":163,"../internals/is-callable":176,"../internals/to-string-tag-support":255,"../internals/well-known-symbol":268}],125:[function(ie,Re,je){var ve=ie("../internals/has-own-property"),ce=ie("../internals/own-keys"),be=ie("../internals/object-get-own-property-descriptor"),Ce=ie("../internals/object-define-property");Re.exports=function(ye,we,me){for(var xe=ce(we),fe=Ce.f,z=be.f,ee=0;ee<xe.length;ee++){var ae=xe[ee];!ve(ye,ae)&&!(me&&ve(me,ae))&&fe(ye,ae,z(we,ae))}}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/own-keys":212}],126:[function(ie,Re,je){var ve=ie("../internals/well-known-symbol"),ce=ve("match");Re.exports=function(be){var Ce=/./;try{"/./"[be](Ce)}catch(ye){try{return Ce[ce]=!1,"/./"[be](Ce)}catch(we){}}return!1}},{"../internals/well-known-symbol":268}],127:[function(ie,Re,je){var ve=ie("../internals/fails");Re.exports=!ve(function(){function ce(){}return ce.prototype.constructor=null,Object.getPrototypeOf(new ce)!==ce.prototype})},{"../internals/fails":150}],128:[function(ie,Re,je){"use strict";var ve=ie("../internals/iterators-core").IteratorPrototype,ce=ie("../internals/object-create"),be=ie("../internals/create-property-descriptor"),Ce=ie("../internals/set-to-string-tag"),ye=ie("../internals/iterators"),we=function(){return this};Re.exports=function(me,xe,fe,z){var ee=xe+" Iterator";return me.prototype=ce(ve,{next:be(+!z,fe)}),Ce(me,ee,!1,!0),ye[ee]=we,me}},{"../internals/create-property-descriptor":130,"../internals/iterators":187,"../internals/iterators-core":186,"../internals/object-create":196,"../internals/set-to-string-tag":234}],129:[function(ie,Re,je){var ve=ie("../internals/descriptors"),ce=ie("../internals/object-define-property"),be=ie("../internals/create-property-descriptor");Re.exports=ve?function(Ce,ye,we){return ce.f(Ce,ye,be(1,we))}:function(Ce,ye,we){return Ce[ye]=we,Ce}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/object-define-property":198}],130:[function(ie,Re,je){Re.exports=function(ve,ce){return{enumerable:!(ve&1),configurable:!(ve&2),writable:!(ve&4),value:ce}}},{}],131:[function(ie,Re,je){"use strict";var ve=ie("../internals/to-property-key"),ce=ie("../internals/object-define-property"),be=ie("../internals/create-property-descriptor");Re.exports=function(Ce,ye,we){var me=ve(ye);me in Ce?ce.f(Ce,me,be(0,we)):Ce[me]=we}},{"../internals/create-property-descriptor":130,"../internals/object-define-property":198,"../internals/to-property-key":254}],132:[function(ie,Re,je){"use strict";var ve=ie("../internals/export"),ce=ie("../internals/function-call"),be=ie("../internals/is-pure"),Ce=ie("../internals/function-name"),ye=ie("../internals/is-callable"),we=ie("../internals/create-iterator-constructor"),me=ie("../internals/object-get-prototype-of"),xe=ie("../internals/object-set-prototype-of"),fe=ie("../internals/set-to-string-tag"),z=ie("../internals/create-non-enumerable-property"),ee=ie("../internals/redefine"),ae=ie("../internals/well-known-symbol"),re=ie("../internals/iterators"),le=ie("../internals/iterators-core"),ue=Ce.PROPER,pe=Ce.CONFIGURABLE,Ee=le.IteratorPrototype,Pe=le.BUGGY_SAFARI_ITERATORS,Ie=ae("iterator"),ke="keys",Ae="values",Oe="entries",Fe=function(){return this};Re.exports=function(_e,Ye,ze,Xe,st,ht,ft){we(ze,Ye,Xe);var Lt=function(At){if(At===st&&Mt)return Mt;if(!Pe&&At in xt)return xt[At];switch(At){case ke:return function(){return new ze(this,At)};case Ae:return function(){return new ze(this,At)};case Oe:return function(){return new ze(this,At)}}return function(){return new ze(this)}},et=Ye+" Iterator",it=!1,xt=_e.prototype,Et=xt[Ie]||xt["@@iterator"]||st&&xt[st],Mt=!Pe&&Et||Lt(st),mt=Ye=="Array"&&xt.entries||Et,pt,vt,jt;if(mt&&(pt=me(mt.call(new _e)),pt!==Object.prototype&&pt.next&&(!be&&me(pt)!==Ee&&(xe?xe(pt,Ee):ye(pt[Ie])||ee(pt,Ie,Fe)),fe(pt,et,!0,!0),be&&(re[et]=Fe))),ue&&st==Ae&&Et&&Et.name!==Ae&&(!be&&pe?z(xt,"name",Ae):(it=!0,Mt=function(){return ce(Et,this)})),st)if(vt={values:Lt(Ae),keys:ht?Mt:Lt(ke),entries:Lt(Oe)},ft)for(jt in vt)(Pe||it||!(jt in xt))&&ee(xt,jt,vt[jt]);else ve({target:Ye,proto:!0,forced:Pe||it},vt);return(!be||ft)&&xt[Ie]!==Mt&&ee(xt,Ie,Mt,{name:st}),re[Ye]=Mt,vt}},{"../internals/create-iterator-constructor":128,"../internals/create-non-enumerable-property":129,"../internals/export":149,"../internals/function-call":155,"../internals/function-name":156,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/iterators":187,"../internals/iterators-core":186,"../internals/object-get-prototype-of":203,"../internals/object-set-prototype-of":208,"../internals/redefine":222,"../internals/set-to-string-tag":234,"../internals/well-known-symbol":268}],133:[function(ie,Re,je){var ve=ie("../internals/path"),ce=ie("../internals/has-own-property"),be=ie("../internals/well-known-symbol-wrapped"),Ce=ie("../internals/object-define-property").f;Re.exports=function(ye){var we=ve.Symbol||(ve.Symbol={});ce(we,ye)||Ce(we,ye,{value:be.f(ye)})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/path":213,"../internals/well-known-symbol-wrapped":267}],134:[function(ie,Re,je){var ve=ie("../internals/fails");Re.exports=!ve(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},{"../internals/fails":150}],135:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/is-object"),be=ve.document,Ce=ce(be)&&ce(be.createElement);Re.exports=function(ye){return Ce?be.createElement(ye):{}}},{"../internals/global":163,"../internals/is-object":180}],136:[function(ie,Re,je){Re.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},{}],137:[function(ie,Re,je){var ve=ie("../internals/document-create-element"),ce=ve("span").classList,be=ce&&ce.constructor&&ce.constructor.prototype;Re.exports=be===Object.prototype?void 0:be},{"../internals/document-create-element":135}],138:[function(ie,Re,je){var ve=ie("../internals/engine-user-agent"),ce=ve.match(/firefox\/(\d+)/i);Re.exports=!!ce&&+ce[1]},{"../internals/engine-user-agent":145}],139:[function(ie,Re,je){Re.exports=typeof window=="object"&&typeof Deno!="object"},{}],140:[function(ie,Re,je){var ve=ie("../internals/engine-user-agent");Re.exports=/MSIE|Trident/.test(ve)},{"../internals/engine-user-agent":145}],141:[function(ie,Re,je){var ve=ie("../internals/engine-user-agent"),ce=ie("../internals/global");Re.exports=/ipad|iphone|ipod/i.test(ve)&&ce.Pebble!==void 0},{"../internals/engine-user-agent":145,"../internals/global":163}],142:[function(ie,Re,je){var ve=ie("../internals/engine-user-agent");Re.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(ve)},{"../internals/engine-user-agent":145}],143:[function(ie,Re,je){var ve=ie("../internals/classof-raw"),ce=ie("../internals/global");Re.exports=ve(ce.process)=="process"},{"../internals/classof-raw":123,"../internals/global":163}],144:[function(ie,Re,je){var ve=ie("../internals/engine-user-agent");Re.exports=/web0s(?!.*chrome)/i.test(ve)},{"../internals/engine-user-agent":145}],145:[function(ie,Re,je){var ve=ie("../internals/get-built-in");Re.exports=ve("navigator","userAgent")||""},{"../internals/get-built-in":158}],146:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/engine-user-agent"),be=ve.process,Ce=ve.Deno,ye=be&&be.versions||Ce&&Ce.version,we=ye&&ye.v8,me,xe;we&&(me=we.split("."),xe=me[0]>0&&me[0]<4?1:+(me[0]+me[1])),!xe&&ce&&(me=ce.match(/Edge\/(\d+)/),(!me||me[1]>=74)&&(me=ce.match(/Chrome\/(\d+)/),me&&(xe=+me[1]))),Re.exports=xe},{"../internals/engine-user-agent":145,"../internals/global":163}],147:[function(ie,Re,je){var ve=ie("../internals/engine-user-agent"),ce=ve.match(/AppleWebKit\/(\d+)\./);Re.exports=!!ce&&+ce[1]},{"../internals/engine-user-agent":145}],148:[function(ie,Re,je){Re.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],149:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/object-get-own-property-descriptor").f,be=ie("../internals/create-non-enumerable-property"),Ce=ie("../internals/redefine"),ye=ie("../internals/set-global"),we=ie("../internals/copy-constructor-properties"),me=ie("../internals/is-forced");Re.exports=function(xe,fe){var z=xe.target,ee=xe.global,ae=xe.stat,re,le,ue,pe,Ee,Pe;if(ee?le=ve:ae?le=ve[z]||ye(z,{}):le=(ve[z]||{}).prototype,le)for(ue in fe){if(Ee=fe[ue],xe.noTargetGet?(Pe=ce(le,ue),pe=Pe&&Pe.value):pe=le[ue],re=me(ee?ue:z+(ae?".":"#")+ue,xe.forced),!re&&pe!==void 0){if(typeof Ee==typeof pe)continue;we(Ee,pe)}(xe.sham||pe&&pe.sham)&&be(Ee,"sham",!0),Ce(le,ue,Ee,xe)}}},{"../internals/copy-constructor-properties":125,"../internals/create-non-enumerable-property":129,"../internals/global":163,"../internals/is-forced":178,"../internals/object-get-own-property-descriptor":199,"../internals/redefine":222,"../internals/set-global":232}],150:[function(ie,Re,je){Re.exports=function(ve){try{return!!ve()}catch(ce){return!0}}},{}],151:[function(ie,Re,je){"use strict";ie("../modules/es.regexp.exec");var ve=ie("../internals/function-uncurry-this"),ce=ie("../internals/redefine"),be=ie("../internals/regexp-exec"),Ce=ie("../internals/fails"),ye=ie("../internals/well-known-symbol"),we=ie("../internals/create-non-enumerable-property"),me=ye("species"),xe=RegExp.prototype;Re.exports=function(fe,z,ee,ae){var re=ye(fe),le=!Ce(function(){var Pe={};return Pe[re]=function(){return 7},""[fe](Pe)!=7}),ue=le&&!Ce(function(){var Pe=!1,Ie=/a/;return fe==="split"&&(Ie={},Ie.constructor={},Ie.constructor[me]=function(){return Ie},Ie.flags="",Ie[re]=/./[re]),Ie.exec=function(){return Pe=!0,null},Ie[re](""),!Pe});if(!le||!ue||ee){var pe=ve(/./[re]),Ee=z(re,""[fe],function(Pe,Ie,ke,Ae,Oe){var Fe=ve(Pe),_e=Ie.exec;return _e===be||_e===xe.exec?le&&!Oe?{done:!0,value:pe(Ie,ke,Ae)}:{done:!0,value:Fe(ke,Ie,Ae)}:{done:!1}});ce(String.prototype,fe,Ee[0]),ce(xe,re,Ee[1])}ae&&we(xe[re],"sham",!0)}},{"../internals/create-non-enumerable-property":129,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/redefine":222,"../internals/regexp-exec":224,"../internals/well-known-symbol":268,"../modules/es.regexp.exec":300}],152:[function(ie,Re,je){var ve=ie("../internals/function-bind-native"),ce=Function.prototype,be=ce.apply,Ce=ce.call;Re.exports=typeof Reflect=="object"&&Reflect.apply||(ve?Ce.bind(be):function(){return Ce.apply(be,arguments)})},{"../internals/function-bind-native":154}],153:[function(ie,Re,je){var ve=ie("../internals/function-uncurry-this"),ce=ie("../internals/a-callable"),be=ie("../internals/function-bind-native"),Ce=ve(ve.bind);Re.exports=function(ye,we){return ce(ye),we===void 0?ye:be?Ce(ye,we):function(){return ye.apply(we,arguments)}}},{"../internals/a-callable":95,"../internals/function-bind-native":154,"../internals/function-uncurry-this":157}],154:[function(ie,Re,je){var ve=ie("../internals/fails");Re.exports=!ve(function(){var ce=function(){}.bind();return typeof ce!="function"||ce.hasOwnProperty("prototype")})},{"../internals/fails":150}],155:[function(ie,Re,je){var ve=ie("../internals/function-bind-native"),ce=Function.prototype.call;Re.exports=ve?ce.bind(ce):function(){return ce.apply(ce,arguments)}},{"../internals/function-bind-native":154}],156:[function(ie,Re,je){var ve=ie("../internals/descriptors"),ce=ie("../internals/has-own-property"),be=Function.prototype,Ce=ve&&Object.getOwnPropertyDescriptor,ye=ce(be,"name"),we=ye&&function(){}.name==="something",me=ye&&(!ve||ve&&Ce(be,"name").configurable);Re.exports={EXISTS:ye,PROPER:we,CONFIGURABLE:me}},{"../internals/descriptors":134,"../internals/has-own-property":164}],157:[function(ie,Re,je){var ve=ie("../internals/function-bind-native"),ce=Function.prototype,be=ce.bind,Ce=ce.call,ye=ve&&be.bind(Ce,Ce);Re.exports=ve?function(we){return we&&ye(we)}:function(we){return we&&function(){return Ce.apply(we,arguments)}}},{"../internals/function-bind-native":154}],158:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/is-callable"),be=function(Ce){return ce(Ce)?Ce:void 0};Re.exports=function(Ce,ye){return arguments.length<2?be(ve[Ce]):ve[Ce]&&ve[Ce][ye]}},{"../internals/global":163,"../internals/is-callable":176}],159:[function(ie,Re,je){var ve=ie("../internals/classof"),ce=ie("../internals/get-method"),be=ie("../internals/iterators"),Ce=ie("../internals/well-known-symbol"),ye=Ce("iterator");Re.exports=function(we){if(we!=null)return ce(we,ye)||ce(we,"@@iterator")||be[ve(we)]}},{"../internals/classof":124,"../internals/get-method":161,"../internals/iterators":187,"../internals/well-known-symbol":268}],160:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/function-call"),be=ie("../internals/a-callable"),Ce=ie("../internals/an-object"),ye=ie("../internals/try-to-string"),we=ie("../internals/get-iterator-method"),me=ve.TypeError;Re.exports=function(xe,fe){var z=arguments.length<2?we(xe):fe;if(be(z))return Ce(ce(z,xe));throw me(ye(xe)+" is not iterable")}},{"../internals/a-callable":95,"../internals/an-object":101,"../internals/function-call":155,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/try-to-string":257}],161:[function(ie,Re,je){var ve=ie("../internals/a-callable");Re.exports=function(ce,be){var Ce=ce[be];return Ce==null?void 0:ve(Ce)}},{"../internals/a-callable":95}],162:[function(ie,Re,je){var ve=ie("../internals/function-uncurry-this"),ce=ie("../internals/to-object"),be=Math.floor,Ce=ve("".charAt),ye=ve("".replace),we=ve("".slice),me=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,xe=/\$([$&'`]|\d{1,2})/g;Re.exports=function(fe,z,ee,ae,re,le){var ue=ee+fe.length,pe=ae.length,Ee=xe;return re!==void 0&&(re=ce(re),Ee=me),ye(le,Ee,function(Pe,Ie){var ke;switch(Ce(Ie,0)){case"$":return"$";case"&":return fe;case"`":return we(z,0,ee);case"'":return we(z,ue);case"<":ke=re[we(Ie,1,-1)];break;default:var Ae=+Ie;if(Ae===0)return Pe;if(Ae>pe){var Oe=be(Ae/10);return Oe===0?Pe:Oe<=pe?ae[Oe-1]===void 0?Ce(Ie,1):ae[Oe-1]+Ce(Ie,1):Pe}ke=ae[Ae-1]}return ke===void 0?"":ke})}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],163:[function(ie,Re,je){(function(ve){(function(){var ce=function(be){return be&&be.Math==Math&&be};Re.exports=ce(typeof globalThis=="object"&&globalThis)||ce(typeof window=="object"&&window)||ce(typeof self=="object"&&self)||ce(typeof ve=="object"&&ve)||function(){return this}()||Function("return this")()}).call(this)}).call(this,typeof ln!="undefined"?ln:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],164:[function(ie,Re,je){var ve=ie("../internals/function-uncurry-this"),ce=ie("../internals/to-object"),be=ve({}.hasOwnProperty);Re.exports=Object.hasOwn||function(ye,we){return be(ce(ye),we)}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],165:[function(ie,Re,je){Re.exports={}},{}],166:[function(ie,Re,je){var ve=ie("../internals/global");Re.exports=function(ce,be){var Ce=ve.console;Ce&&Ce.error&&(arguments.length==1?Ce.error(ce):Ce.error(ce,be))}},{"../internals/global":163}],167:[function(ie,Re,je){var ve=ie("../internals/get-built-in");Re.exports=ve("document","documentElement")},{"../internals/get-built-in":158}],168:[function(ie,Re,je){var ve=ie("../internals/descriptors"),ce=ie("../internals/fails"),be=ie("../internals/document-create-element");Re.exports=!ve&&!ce(function(){return Object.defineProperty(be("div"),"a",{get:function(){return 7}}).a!=7})},{"../internals/descriptors":134,"../internals/document-create-element":135,"../internals/fails":150}],169:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ve.Array,be=Math.abs,Ce=Math.pow,ye=Math.floor,we=Math.log,me=Math.LN2,xe=function(z,ee,ae){var re=ce(ae),le=ae*8-ee-1,ue=(1<<le)-1,pe=ue>>1,Ee=ee===23?Ce(2,-24)-Ce(2,-77):0,Pe=z<0||z===0&&1/z<0?1:0,Ie=0,ke,Ae,Oe;for(z=be(z),z!=z||z===1/0?(Ae=z!=z?1:0,ke=ue):(ke=ye(we(z)/me),Oe=Ce(2,-ke),z*Oe<1&&(ke--,Oe*=2),ke+pe>=1?z+=Ee/Oe:z+=Ee*Ce(2,1-pe),z*Oe>=2&&(ke++,Oe/=2),ke+pe>=ue?(Ae=0,ke=ue):ke+pe>=1?(Ae=(z*Oe-1)*Ce(2,ee),ke=ke+pe):(Ae=z*Ce(2,pe-1)*Ce(2,ee),ke=0));ee>=8;)re[Ie++]=Ae&255,Ae/=256,ee-=8;for(ke=ke<<ee|Ae,le+=ee;le>0;)re[Ie++]=ke&255,ke/=256,le-=8;return re[--Ie]|=Pe*128,re},fe=function(z,ee){var ae=z.length,re=ae*8-ee-1,le=(1<<re)-1,ue=le>>1,pe=re-7,Ee=ae-1,Pe=z[Ee--],Ie=Pe&127,ke;for(Pe>>=7;pe>0;)Ie=Ie*256+z[Ee--],pe-=8;for(ke=Ie&(1<<-pe)-1,Ie>>=-pe,pe+=ee;pe>0;)ke=ke*256+z[Ee--],pe-=8;if(Ie===0)Ie=1-ue;else{if(Ie===le)return ke?NaN:Pe?-1/0:1/0;ke=ke+Ce(2,ee),Ie=Ie-ue}return(Pe?-1:1)*ke*Ce(2,Ie-ee)};Re.exports={pack:xe,unpack:fe}},{"../internals/global":163}],170:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/function-uncurry-this"),be=ie("../internals/fails"),Ce=ie("../internals/classof-raw"),ye=ve.Object,we=ce("".split);Re.exports=be(function(){return!ye("z").propertyIsEnumerable(0)})?function(me){return Ce(me)=="String"?we(me,""):ye(me)}:ye},{"../internals/classof-raw":123,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],171:[function(ie,Re,je){var ve=ie("../internals/is-callable"),ce=ie("../internals/is-object"),be=ie("../internals/object-set-prototype-of");Re.exports=function(Ce,ye,we){var me,xe;return be&&ve(me=ye.constructor)&&me!==we&&ce(xe=me.prototype)&&xe!==we.prototype&&be(Ce,xe),Ce}},{"../internals/is-callable":176,"../internals/is-object":180,"../internals/object-set-prototype-of":208}],172:[function(ie,Re,je){var ve=ie("../internals/function-uncurry-this"),ce=ie("../internals/is-callable"),be=ie("../internals/shared-store"),Ce=ve(Function.toString);ce(be.inspectSource)||(be.inspectSource=function(ye){return Ce(ye)}),Re.exports=be.inspectSource},{"../internals/function-uncurry-this":157,"../internals/is-callable":176,"../internals/shared-store":236}],173:[function(ie,Re,je){var ve=ie("../internals/native-weak-map"),ce=ie("../internals/global"),be=ie("../internals/function-uncurry-this"),Ce=ie("../internals/is-object"),ye=ie("../internals/create-non-enumerable-property"),we=ie("../internals/has-own-property"),me=ie("../internals/shared-store"),xe=ie("../internals/shared-key"),fe=ie("../internals/hidden-keys"),z="Object already initialized",ee=ce.TypeError,ae=ce.WeakMap,re,le,ue,pe=function(Fe){return ue(Fe)?le(Fe):re(Fe,{})},Ee=function(Fe){return function(_e){var Ye;if(!Ce(_e)||(Ye=le(_e)).type!==Fe)throw ee("Incompatible receiver, "+Fe+" required");return Ye}};if(ve||me.state){var Pe=me.state||(me.state=new ae),Ie=be(Pe.get),ke=be(Pe.has),Ae=be(Pe.set);re=function(Fe,_e){if(ke(Pe,Fe))throw new ee(z);return _e.facade=Fe,Ae(Pe,Fe,_e),_e},le=function(Fe){return Ie(Pe,Fe)||{}},ue=function(Fe){return ke(Pe,Fe)}}else{var Oe=xe("state");fe[Oe]=!0,re=function(Fe,_e){if(we(Fe,Oe))throw new ee(z);return _e.facade=Fe,ye(Fe,Oe,_e),_e},le=function(Fe){return we(Fe,Oe)?Fe[Oe]:{}},ue=function(Fe){return we(Fe,Oe)}}Re.exports={set:re,get:le,has:ue,enforce:pe,getterFor:Ee}},{"../internals/create-non-enumerable-property":129,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/is-object":180,"../internals/native-weak-map":192,"../internals/shared-key":235,"../internals/shared-store":236}],174:[function(ie,Re,je){var ve=ie("../internals/well-known-symbol"),ce=ie("../internals/iterators"),be=ve("iterator"),Ce=Array.prototype;Re.exports=function(ye){return ye!==void 0&&(ce.Array===ye||Ce[be]===ye)}},{"../internals/iterators":187,"../internals/well-known-symbol":268}],175:[function(ie,Re,je){var ve=ie("../internals/classof-raw");Re.exports=Array.isArray||function(be){return ve(be)=="Array"}},{"../internals/classof-raw":123}],176:[function(ie,Re,je){Re.exports=function(ve){return typeof ve=="function"}},{}],177:[function(ie,Re,je){var ve=ie("../internals/function-uncurry-this"),ce=ie("../internals/fails"),be=ie("../internals/is-callable"),Ce=ie("../internals/classof"),ye=ie("../internals/get-built-in"),we=ie("../internals/inspect-source"),me=function(){},xe=[],fe=ye("Reflect","construct"),z=/^\s*(?:class|function)\b/,ee=ve(z.exec),ae=!z.exec(me),re=function(pe){if(!be(pe))return!1;try{return fe(me,xe,pe),!0}catch(Ee){return!1}},le=function(pe){if(!be(pe))return!1;switch(Ce(pe)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return ae||!!ee(z,we(pe))}catch(Ee){return!0}};le.sham=!0,Re.exports=!fe||ce(function(){var ue;return re(re.call)||!re(Object)||!re(function(){ue=!0})||ue})?le:re},{"../internals/classof":124,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/inspect-source":172,"../internals/is-callable":176}],178:[function(ie,Re,je){var ve=ie("../internals/fails"),ce=ie("../internals/is-callable"),be=/#|\.prototype\./,Ce=function(fe,z){var ee=we[ye(fe)];return ee==xe?!0:ee==me?!1:ce(z)?ve(z):!!z},ye=Ce.normalize=function(fe){return String(fe).replace(be,".").toLowerCase()},we=Ce.data={},me=Ce.NATIVE="N",xe=Ce.POLYFILL="P";Re.exports=Ce},{"../internals/fails":150,"../internals/is-callable":176}],179:[function(ie,Re,je){var ve=ie("../internals/is-object"),ce=Math.floor;Re.exports=Number.isInteger||function(Ce){return!ve(Ce)&&isFinite(Ce)&&ce(Ce)===Ce}},{"../internals/is-object":180}],180:[function(ie,Re,je){var ve=ie("../internals/is-callable");Re.exports=function(ce){return typeof ce=="object"?ce!==null:ve(ce)}},{"../internals/is-callable":176}],181:[function(ie,Re,je){Re.exports=!1},{}],182:[function(ie,Re,je){var ve=ie("../internals/is-object"),ce=ie("../internals/classof-raw"),be=ie("../internals/well-known-symbol"),Ce=be("match");Re.exports=function(ye){var we;return ve(ye)&&((we=ye[Ce])!==void 0?!!we:ce(ye)=="RegExp")}},{"../internals/classof-raw":123,"../internals/is-object":180,"../internals/well-known-symbol":268}],183:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/get-built-in"),be=ie("../internals/is-callable"),Ce=ie("../internals/object-is-prototype-of"),ye=ie("../internals/use-symbol-as-uid"),we=ve.Object;Re.exports=ye?function(me){return typeof me=="symbol"}:function(me){var xe=ce("Symbol");return be(xe)&&Ce(xe.prototype,we(me))}},{"../internals/get-built-in":158,"../internals/global":163,"../internals/is-callable":176,"../internals/object-is-prototype-of":204,"../internals/use-symbol-as-uid":264}],184:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/function-bind-context"),be=ie("../internals/function-call"),Ce=ie("../internals/an-object"),ye=ie("../internals/try-to-string"),we=ie("../internals/is-array-iterator-method"),me=ie("../internals/length-of-array-like"),xe=ie("../internals/object-is-prototype-of"),fe=ie("../internals/get-iterator"),z=ie("../internals/get-iterator-method"),ee=ie("../internals/iterator-close"),ae=ve.TypeError,re=function(ue,pe){this.stopped=ue,this.result=pe},le=re.prototype;Re.exports=function(ue,pe,Ee){var Pe=Ee&&Ee.that,Ie=!!(Ee&&Ee.AS_ENTRIES),ke=!!(Ee&&Ee.IS_ITERATOR),Ae=!!(Ee&&Ee.INTERRUPTED),Oe=ce(pe,Pe),Fe,_e,Ye,ze,Xe,st,ht,ft=function(et){return Fe&&ee(Fe,"normal",et),new re(!0,et)},Lt=function(et){return Ie?(Ce(et),Ae?Oe(et[0],et[1],ft):Oe(et[0],et[1])):Ae?Oe(et,ft):Oe(et)};if(ke)Fe=ue;else{if(_e=z(ue),!_e)throw ae(ye(ue)+" is not iterable");if(we(_e)){for(Ye=0,ze=me(ue);ze>Ye;Ye++)if(Xe=Lt(ue[Ye]),Xe&&xe(le,Xe))return Xe;return new re(!1)}Fe=fe(ue,_e)}for(st=Fe.next;!(ht=be(st,Fe)).done;){try{Xe=Lt(ht.value)}catch(et){ee(Fe,"throw",et)}if(typeof Xe=="object"&&Xe&&xe(le,Xe))return Xe}return new re(!1)}},{"../internals/an-object":101,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/is-array-iterator-method":174,"../internals/iterator-close":185,"../internals/length-of-array-like":188,"../internals/object-is-prototype-of":204,"../internals/try-to-string":257}],185:[function(ie,Re,je){var ve=ie("../internals/function-call"),ce=ie("../internals/an-object"),be=ie("../internals/get-method");Re.exports=function(Ce,ye,we){var me,xe;ce(Ce);try{if(me=be(Ce,"return"),!me){if(ye==="throw")throw we;return we}me=ve(me,Ce)}catch(fe){xe=!0,me=fe}if(ye==="throw")throw we;if(xe)throw me;return ce(me),we}},{"../internals/an-object":101,"../internals/function-call":155,"../internals/get-method":161}],186:[function(ie,Re,je){"use strict";var ve=ie("../internals/fails"),ce=ie("../internals/is-callable"),be=ie("../internals/object-create"),Ce=ie("../internals/object-get-prototype-of"),ye=ie("../internals/redefine"),we=ie("../internals/well-known-symbol"),me=ie("../internals/is-pure"),xe=we("iterator"),fe=!1,z,ee,ae;[].keys&&(ae=[].keys(),"next"in ae?(ee=Ce(Ce(ae)),ee!==Object.prototype&&(z=ee)):fe=!0);var re=z==null||ve(function(){var le={};return z[xe].call(le)!==le});re?z={}:me&&(z=be(z)),ce(z[xe])||ye(z,xe,function(){return this}),Re.exports={IteratorPrototype:z,BUGGY_SAFARI_ITERATORS:fe}},{"../internals/fails":150,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/object-create":196,"../internals/object-get-prototype-of":203,"../internals/redefine":222,"../internals/well-known-symbol":268}],187:[function(ie,Re,je){arguments[4][165][0].apply(je,arguments)},{dup:165}],188:[function(ie,Re,je){var ve=ie("../internals/to-length");Re.exports=function(ce){return ve(ce.length)}},{"../internals/to-length":249}],189:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/function-bind-context"),be=ie("../internals/object-get-own-property-descriptor").f,Ce=ie("../internals/task").set,ye=ie("../internals/engine-is-ios"),we=ie("../internals/engine-is-ios-pebble"),me=ie("../internals/engine-is-webos-webkit"),xe=ie("../internals/engine-is-node"),fe=ve.MutationObserver||ve.WebKitMutationObserver,z=ve.document,ee=ve.process,ae=ve.Promise,re=be(ve,"queueMicrotask"),le=re&&re.value,ue,pe,Ee,Pe,Ie,ke,Ae,Oe;le||(ue=function(){var Fe,_e;for(xe&&(Fe=ee.domain)&&Fe.exit();pe;){_e=pe.fn,pe=pe.next;try{_e()}catch(Ye){throw pe?Pe():Ee=void 0,Ye}}Ee=void 0,Fe&&Fe.enter()},!ye&&!xe&&!me&&fe&&z?(Ie=!0,ke=z.createTextNode(""),new fe(ue).observe(ke,{characterData:!0}),Pe=function(){ke.data=Ie=!Ie}):!we&&ae&&ae.resolve?(Ae=ae.resolve(void 0),Ae.constructor=ae,Oe=ce(Ae.then,Ae),Pe=function(){Oe(ue)}):xe?Pe=function(){ee.nextTick(ue)}:(Ce=ce(Ce,ve),Pe=function(){Ce(ue)})),Re.exports=le||function(Fe){var _e={fn:Fe,next:void 0};Ee&&(Ee.next=_e),pe||(pe=_e,Pe()),Ee=_e}},{"../internals/engine-is-ios":142,"../internals/engine-is-ios-pebble":141,"../internals/engine-is-node":143,"../internals/engine-is-webos-webkit":144,"../internals/function-bind-context":153,"../internals/global":163,"../internals/object-get-own-property-descriptor":199,"../internals/task":243}],190:[function(ie,Re,je){var ve=ie("../internals/native-symbol");Re.exports=ve&&!!Symbol.for&&!!Symbol.keyFor},{"../internals/native-symbol":191}],191:[function(ie,Re,je){var ve=ie("../internals/engine-v8-version"),ce=ie("../internals/fails");Re.exports=!!Object.getOwnPropertySymbols&&!ce(function(){var be=Symbol();return!String(be)||!(Object(be)instanceof Symbol)||!Symbol.sham&&ve&&ve<41})},{"../internals/engine-v8-version":146,"../internals/fails":150}],192:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/is-callable"),be=ie("../internals/inspect-source"),Ce=ve.WeakMap;Re.exports=ce(Ce)&&/native code/.test(be(Ce))},{"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176}],193:[function(ie,Re,je){"use strict";var ve=ie("../internals/a-callable"),ce=function(be){var Ce,ye;this.promise=new be(function(we,me){if(Ce!==void 0||ye!==void 0)throw TypeError("Bad Promise constructor");Ce=we,ye=me}),this.resolve=ve(Ce),this.reject=ve(ye)};Re.exports.f=function(be){return new ce(be)}},{"../internals/a-callable":95}],194:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/is-regexp"),be=ve.TypeError;Re.exports=function(Ce){if(ce(Ce))throw be("The method doesn't accept regular expressions");return Ce}},{"../internals/global":163,"../internals/is-regexp":182}],195:[function(ie,Re,je){"use strict";var ve=ie("../internals/descriptors"),ce=ie("../internals/function-uncurry-this"),be=ie("../internals/function-call"),Ce=ie("../internals/fails"),ye=ie("../internals/object-keys"),we=ie("../internals/object-get-own-property-symbols"),me=ie("../internals/object-property-is-enumerable"),xe=ie("../internals/to-object"),fe=ie("../internals/indexed-object"),z=Object.assign,ee=Object.defineProperty,ae=ce([].concat);Re.exports=!z||Ce(function(){if(ve&&z({b:1},z(ee({},"a",{enumerable:!0,get:function(){ee(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var re={},le={},ue=Symbol(),pe="abcdefghijklmnopqrst";return re[ue]=7,pe.split("").forEach(function(Ee){le[Ee]=Ee}),z({},re)[ue]!=7||ye(z({},le)).join("")!=pe})?function(le,ue){for(var pe=xe(le),Ee=arguments.length,Pe=1,Ie=we.f,ke=me.f;Ee>Pe;)for(var Ae=fe(arguments[Pe++]),Oe=Ie?ae(ye(Ae),Ie(Ae)):ye(Ae),Fe=Oe.length,_e=0,Ye;Fe>_e;)Ye=Oe[_e++],(!ve||be(ke,Ae,Ye))&&(pe[Ye]=Ae[Ye]);return pe}:z},{"../internals/descriptors":134,"../internals/fails":150,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/object-get-own-property-symbols":202,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/to-object":250}],196:[function(ie,Re,je){var ve=ie("../internals/an-object"),ce=ie("../internals/object-define-properties"),be=ie("../internals/enum-bug-keys"),Ce=ie("../internals/hidden-keys"),ye=ie("../internals/html"),we=ie("../internals/document-create-element"),me=ie("../internals/shared-key"),xe=">",fe="<",z="prototype",ee="script",ae=me("IE_PROTO"),re=function(){},le=function(Ie){return fe+ee+xe+Ie+fe+"/"+ee+xe},ue=function(Ie){Ie.write(le("")),Ie.close();var ke=Ie.parentWindow.Object;return Ie=null,ke},pe=function(){var Ie=we("iframe"),ke="java"+ee+":",Ae;return Ie.style.display="none",ye.appendChild(Ie),Ie.src=String(ke),Ae=Ie.contentWindow.document,Ae.open(),Ae.write(le("document.F=Object")),Ae.close(),Ae.F},Ee,Pe=function(){try{Ee=new ActiveXObject("htmlfile")}catch(ke){}Pe=typeof document!="undefined"?document.domain&&Ee?ue(Ee):pe():ue(Ee);for(var Ie=be.length;Ie--;)delete Pe[z][be[Ie]];return Pe()};Ce[ae]=!0,Re.exports=Object.create||function(ke,Ae){var Oe;return ke!==null?(re[z]=ve(ke),Oe=new re,re[z]=null,Oe[ae]=ke):Oe=Pe(),Ae===void 0?Oe:ce.f(Oe,Ae)}},{"../internals/an-object":101,"../internals/document-create-element":135,"../internals/enum-bug-keys":148,"../internals/hidden-keys":165,"../internals/html":167,"../internals/object-define-properties":197,"../internals/shared-key":235}],197:[function(ie,Re,je){var ve=ie("../internals/descriptors"),ce=ie("../internals/v8-prototype-define-bug"),be=ie("../internals/object-define-property"),Ce=ie("../internals/an-object"),ye=ie("../internals/to-indexed-object"),we=ie("../internals/object-keys");je.f=ve&&!ce?Object.defineProperties:function(xe,fe){Ce(xe);for(var z=ye(fe),ee=we(fe),ae=ee.length,re=0,le;ae>re;)be.f(xe,le=ee[re++],z[le]);return xe}},{"../internals/an-object":101,"../internals/descriptors":134,"../internals/object-define-property":198,"../internals/object-keys":206,"../internals/to-indexed-object":247,"../internals/v8-prototype-define-bug":265}],198:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/descriptors"),be=ie("../internals/ie8-dom-define"),Ce=ie("../internals/v8-prototype-define-bug"),ye=ie("../internals/an-object"),we=ie("../internals/to-property-key"),me=ve.TypeError,xe=Object.defineProperty,fe=Object.getOwnPropertyDescriptor,z="enumerable",ee="configurable",ae="writable";je.f=ce?Ce?function(le,ue,pe){if(ye(le),ue=we(ue),ye(pe),typeof le=="function"&&ue==="prototype"&&"value"in pe&&ae in pe&&!pe[ae]){var Ee=fe(le,ue);Ee&&Ee[ae]&&(le[ue]=pe.value,pe={configurable:ee in pe?pe[ee]:Ee[ee],enumerable:z in pe?pe[z]:Ee[z],writable:!1})}return xe(le,ue,pe)}:xe:function(le,ue,pe){if(ye(le),ue=we(ue),ye(pe),be)try{return xe(le,ue,pe)}catch(Ee){}if("get"in pe||"set"in pe)throw me("Accessors not supported");return"value"in pe&&(le[ue]=pe.value),le}},{"../internals/an-object":101,"../internals/descriptors":134,"../internals/global":163,"../internals/ie8-dom-define":168,"../internals/to-property-key":254,"../internals/v8-prototype-define-bug":265}],199:[function(ie,Re,je){var ve=ie("../internals/descriptors"),ce=ie("../internals/function-call"),be=ie("../internals/object-property-is-enumerable"),Ce=ie("../internals/create-property-descriptor"),ye=ie("../internals/to-indexed-object"),we=ie("../internals/to-property-key"),me=ie("../internals/has-own-property"),xe=ie("../internals/ie8-dom-define"),fe=Object.getOwnPropertyDescriptor;je.f=ve?fe:function(ee,ae){if(ee=ye(ee),ae=we(ae),xe)try{return fe(ee,ae)}catch(re){}if(me(ee,ae))return Ce(!ce(be.f,ee,ae),ee[ae])}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/function-call":155,"../internals/has-own-property":164,"../internals/ie8-dom-define":168,"../internals/object-property-is-enumerable":207,"../internals/to-indexed-object":247,"../internals/to-property-key":254}],200:[function(ie,Re,je){var ve=ie("../internals/classof-raw"),ce=ie("../internals/to-indexed-object"),be=ie("../internals/object-get-own-property-names").f,Ce=ie("../internals/array-slice-simple"),ye=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],we=function(me){try{return be(me)}catch(xe){return Ce(ye)}};Re.exports.f=function(xe){return ye&&ve(xe)=="Window"?we(xe):be(ce(xe))}},{"../internals/array-slice-simple":116,"../internals/classof-raw":123,"../internals/object-get-own-property-names":201,"../internals/to-indexed-object":247}],201:[function(ie,Re,je){var ve=ie("../internals/object-keys-internal"),ce=ie("../internals/enum-bug-keys"),be=ce.concat("length","prototype");je.f=Object.getOwnPropertyNames||function(ye){return ve(ye,be)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],202:[function(ie,Re,je){je.f=Object.getOwnPropertySymbols},{}],203:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/has-own-property"),be=ie("../internals/is-callable"),Ce=ie("../internals/to-object"),ye=ie("../internals/shared-key"),we=ie("../internals/correct-prototype-getter"),me=ye("IE_PROTO"),xe=ve.Object,fe=xe.prototype;Re.exports=we?xe.getPrototypeOf:function(z){var ee=Ce(z);if(ce(ee,me))return ee[me];var ae=ee.constructor;return be(ae)&&ee instanceof ae?ae.prototype:ee instanceof xe?fe:null}},{"../internals/correct-prototype-getter":127,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/shared-key":235,"../internals/to-object":250}],204:[function(ie,Re,je){var ve=ie("../internals/function-uncurry-this");Re.exports=ve({}.isPrototypeOf)},{"../internals/function-uncurry-this":157}],205:[function(ie,Re,je){var ve=ie("../internals/function-uncurry-this"),ce=ie("../internals/has-own-property"),be=ie("../internals/to-indexed-object"),Ce=ie("../internals/array-includes").indexOf,ye=ie("../internals/hidden-keys"),we=ve([].push);Re.exports=function(me,xe){var fe=be(me),z=0,ee=[],ae;for(ae in fe)!ce(ye,ae)&&ce(fe,ae)&&we(ee,ae);for(;xe.length>z;)ce(fe,ae=xe[z++])&&(~Ce(ee,ae)||we(ee,ae));return ee}},{"../internals/array-includes":110,"../internals/function-uncurry-this":157,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/to-indexed-object":247}],206:[function(ie,Re,je){var ve=ie("../internals/object-keys-internal"),ce=ie("../internals/enum-bug-keys");Re.exports=Object.keys||function(Ce){return ve(Ce,ce)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],207:[function(ie,Re,je){"use strict";var ve={}.propertyIsEnumerable,ce=Object.getOwnPropertyDescriptor,be=ce&&!ve.call({1:2},1);je.f=be?function(ye){var we=ce(this,ye);return!!we&&we.enumerable}:ve},{}],208:[function(ie,Re,je){var ve=ie("../internals/function-uncurry-this"),ce=ie("../internals/an-object"),be=ie("../internals/a-possible-prototype");Re.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var Ce=!1,ye={},we;try{we=ve(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),we(ye,[]),Ce=ye instanceof Array}catch(me){}return function(xe,fe){return ce(xe),be(fe),Ce?we(xe,fe):xe.__proto__=fe,xe}}():void 0)},{"../internals/a-possible-prototype":97,"../internals/an-object":101,"../internals/function-uncurry-this":157}],209:[function(ie,Re,je){var ve=ie("../internals/descriptors"),ce=ie("../internals/function-uncurry-this"),be=ie("../internals/object-keys"),Ce=ie("../internals/to-indexed-object"),ye=ie("../internals/object-property-is-enumerable").f,we=ce(ye),me=ce([].push),xe=function(fe){return function(z){for(var ee=Ce(z),ae=be(ee),re=ae.length,le=0,ue=[],pe;re>le;)pe=ae[le++],(!ve||we(ee,pe))&&me(ue,fe?[pe,ee[pe]]:ee[pe]);return ue}};Re.exports={entries:xe(!0),values:xe(!1)}},{"../internals/descriptors":134,"../internals/function-uncurry-this":157,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/to-indexed-object":247}],210:[function(ie,Re,je){"use strict";var ve=ie("../internals/to-string-tag-support"),ce=ie("../internals/classof");Re.exports=ve?{}.toString:function(){return"[object "+ce(this)+"]"}},{"../internals/classof":124,"../internals/to-string-tag-support":255}],211:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/function-call"),be=ie("../internals/is-callable"),Ce=ie("../internals/is-object"),ye=ve.TypeError;Re.exports=function(we,me){var xe,fe;if(me==="string"&&be(xe=we.toString)&&!Ce(fe=ce(xe,we))||be(xe=we.valueOf)&&!Ce(fe=ce(xe,we))||me!=="string"&&be(xe=we.toString)&&!Ce(fe=ce(xe,we)))return fe;throw ye("Can't convert object to primitive value")}},{"../internals/function-call":155,"../internals/global":163,"../internals/is-callable":176,"../internals/is-object":180}],212:[function(ie,Re,je){var ve=ie("../internals/get-built-in"),ce=ie("../internals/function-uncurry-this"),be=ie("../internals/object-get-own-property-names"),Ce=ie("../internals/object-get-own-property-symbols"),ye=ie("../internals/an-object"),we=ce([].concat);Re.exports=ve("Reflect","ownKeys")||function(xe){var fe=be.f(ye(xe)),z=Ce.f;return z?we(fe,z(xe)):fe}},{"../internals/an-object":101,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/object-get-own-property-names":201,"../internals/object-get-own-property-symbols":202}],213:[function(ie,Re,je){var ve=ie("../internals/global");Re.exports=ve},{"../internals/global":163}],214:[function(ie,Re,je){Re.exports=function(ve){try{return{error:!1,value:ve()}}catch(ce){return{error:!0,value:ce}}}},{}],215:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/promise-native-constructor"),be=ie("../internals/is-callable"),Ce=ie("../internals/is-forced"),ye=ie("../internals/inspect-source"),we=ie("../internals/well-known-symbol"),me=ie("../internals/engine-is-browser"),xe=ie("../internals/is-pure"),fe=ie("../internals/engine-v8-version"),z=ce&&ce.prototype,ee=we("species"),ae=!1,re=be(ve.PromiseRejectionEvent),le=Ce("Promise",function(){var ue=ye(ce),pe=ue!==String(ce);if(!pe&&fe===66||xe&&!(z.catch&&z.finally))return!0;if(fe>=51&&/native code/.test(ue))return!1;var Ee=new ce(function(ke){ke(1)}),Pe=function(ke){ke(function(){},function(){})},Ie=Ee.constructor={};return Ie[ee]=Pe,ae=Ee.then(function(){})instanceof Pe,ae?!pe&&me&&!re:!0});Re.exports={CONSTRUCTOR:le,REJECTION_EVENT:re,SUBCLASSING:ae}},{"../internals/engine-is-browser":139,"../internals/engine-v8-version":146,"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176,"../internals/is-forced":178,"../internals/is-pure":181,"../internals/promise-native-constructor":216,"../internals/well-known-symbol":268}],216:[function(ie,Re,je){var ve=ie("../internals/global");Re.exports=ve.Promise},{"../internals/global":163}],217:[function(ie,Re,je){var ve=ie("../internals/an-object"),ce=ie("../internals/is-object"),be=ie("../internals/new-promise-capability");Re.exports=function(Ce,ye){if(ve(Ce),ce(ye)&&ye.constructor===Ce)return ye;var we=be.f(Ce),me=we.resolve;return me(ye),we.promise}},{"../internals/an-object":101,"../internals/is-object":180,"../internals/new-promise-capability":193}],218:[function(ie,Re,je){var ve=ie("../internals/promise-native-constructor"),ce=ie("../internals/check-correctness-of-iteration"),be=ie("../internals/promise-constructor-detection").CONSTRUCTOR;Re.exports=be||!ce(function(Ce){ve.all(Ce).then(void 0,function(){})})},{"../internals/check-correctness-of-iteration":122,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216}],219:[function(ie,Re,je){var ve=ie("../internals/object-define-property").f;Re.exports=function(ce,be,Ce){Ce in ce||ve(ce,Ce,{configurable:!0,get:function(){return be[Ce]},set:function(ye){be[Ce]=ye}})}},{"../internals/object-define-property":198}],220:[function(ie,Re,je){var ve=function(){this.head=null,this.tail=null};ve.prototype={add:function(ce){var be={item:ce,next:null};this.head?this.tail.next=be:this.head=be,this.tail=be},get:function(){var ce=this.head;if(ce)return this.head=ce.next,this.tail===ce&&(this.tail=null),ce.item}},Re.exports=ve},{}],221:[function(ie,Re,je){var ve=ie("../internals/redefine");Re.exports=function(ce,be,Ce){for(var ye in be)ve(ce,ye,be[ye],Ce);return ce}},{"../internals/redefine":222}],222:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/is-callable"),be=ie("../internals/has-own-property"),Ce=ie("../internals/create-non-enumerable-property"),ye=ie("../internals/set-global"),we=ie("../internals/inspect-source"),me=ie("../internals/internal-state"),xe=ie("../internals/function-name").CONFIGURABLE,fe=me.get,z=me.enforce,ee=String(String).split("String");(Re.exports=function(ae,re,le,ue){var pe=ue?!!ue.unsafe:!1,Ee=ue?!!ue.enumerable:!1,Pe=ue?!!ue.noTargetGet:!1,Ie=ue&&ue.name!==void 0?ue.name:re,ke;if(ce(le)&&(String(Ie).slice(0,7)==="Symbol("&&(Ie="["+String(Ie).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!be(le,"name")||xe&&le.name!==Ie)&&Ce(le,"name",Ie),ke=z(le),ke.source||(ke.source=ee.join(typeof Ie=="string"?Ie:""))),ae===ve){Ee?ae[re]=le:ye(re,le);return}else pe?!Pe&&ae[re]&&(Ee=!0):delete ae[re];Ee?ae[re]=le:Ce(ae,re,le)})(Function.prototype,"toString",function(){return ce(this)&&fe(this).source||we(this)})},{"../internals/create-non-enumerable-property":129,"../internals/function-name":156,"../internals/global":163,"../internals/has-own-property":164,"../internals/inspect-source":172,"../internals/internal-state":173,"../internals/is-callable":176,"../internals/set-global":232}],223:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/function-call"),be=ie("../internals/an-object"),Ce=ie("../internals/is-callable"),ye=ie("../internals/classof-raw"),we=ie("../internals/regexp-exec"),me=ve.TypeError;Re.exports=function(xe,fe){var z=xe.exec;if(Ce(z)){var ee=ce(z,xe,fe);return ee!==null&&be(ee),ee}if(ye(xe)==="RegExp")return ce(we,xe,fe);throw me("RegExp#exec called on incompatible receiver")}},{"../internals/an-object":101,"../internals/classof-raw":123,"../internals/function-call":155,"../internals/global":163,"../internals/is-callable":176,"../internals/regexp-exec":224}],224:[function(ie,Re,je){"use strict";var ve=ie("../internals/function-call"),ce=ie("../internals/function-uncurry-this"),be=ie("../internals/to-string"),Ce=ie("../internals/regexp-flags"),ye=ie("../internals/regexp-sticky-helpers"),we=ie("../internals/shared"),me=ie("../internals/object-create"),xe=ie("../internals/internal-state").get,fe=ie("../internals/regexp-unsupported-dot-all"),z=ie("../internals/regexp-unsupported-ncg"),ee=we("native-string-replace",String.prototype.replace),ae=RegExp.prototype.exec,re=ae,le=ce("".charAt),ue=ce("".indexOf),pe=ce("".replace),Ee=ce("".slice),Pe=function(){var Oe=/a/,Fe=/b*/g;return ve(ae,Oe,"a"),ve(ae,Fe,"a"),Oe.lastIndex!==0||Fe.lastIndex!==0}(),Ie=ye.BROKEN_CARET,ke=/()??/.exec("")[1]!==void 0,Ae=Pe||ke||Ie||fe||z;Ae&&(re=function(Fe){var _e=this,Ye=xe(_e),ze=be(Fe),Xe=Ye.raw,st,ht,ft,Lt,et,it,xt;if(Xe)return Xe.lastIndex=_e.lastIndex,st=ve(re,Xe,ze),_e.lastIndex=Xe.lastIndex,st;var Et=Ye.groups,Mt=Ie&&_e.sticky,mt=ve(Ce,_e),pt=_e.source,vt=0,jt=ze;if(Mt&&(mt=pe(mt,"y",""),ue(mt,"g")===-1&&(mt+="g"),jt=Ee(ze,_e.lastIndex),_e.lastIndex>0&&(!_e.multiline||_e.multiline&&le(ze,_e.lastIndex-1)!==`
`)&&(pt="(?: "+pt+")",jt=" "+jt,vt++),ht=new RegExp("^(?:"+pt+")",mt)),ke&&(ht=new RegExp("^"+pt+"$(?!\\s)",mt)),Pe&&(ft=_e.lastIndex),Lt=ve(ae,Mt?ht:_e,jt),Mt?Lt?(Lt.input=Ee(Lt.input,vt),Lt[0]=Ee(Lt[0],vt),Lt.index=_e.lastIndex,_e.lastIndex+=Lt[0].length):_e.lastIndex=0:Pe&&Lt&&(_e.lastIndex=_e.global?Lt.index+Lt[0].length:ft),ke&&Lt&&Lt.length>1&&ve(ee,Lt[0],ht,function(){for(et=1;et<arguments.length-2;et++)arguments[et]===void 0&&(Lt[et]=void 0)}),Lt&&Et)for(Lt.groups=it=me(null),et=0;et<Et.length;et++)xt=Et[et],it[xt[0]]=Lt[xt[1]];return Lt}),Re.exports=re},{"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/internal-state":173,"../internals/object-create":196,"../internals/regexp-flags":225,"../internals/regexp-sticky-helpers":227,"../internals/regexp-unsupported-dot-all":228,"../internals/regexp-unsupported-ncg":229,"../internals/shared":237,"../internals/to-string":256}],225:[function(ie,Re,je){"use strict";var ve=ie("../internals/an-object");Re.exports=function(){var ce=ve(this),be="";return ce.hasIndices&&(be+="d"),ce.global&&(be+="g"),ce.ignoreCase&&(be+="i"),ce.multiline&&(be+="m"),ce.dotAll&&(be+="s"),ce.unicode&&(be+="u"),ce.sticky&&(be+="y"),be}},{"../internals/an-object":101}],226:[function(ie,Re,je){var ve=ie("../internals/function-call"),ce=ie("../internals/has-own-property"),be=ie("../internals/object-is-prototype-of"),Ce=ie("../internals/regexp-flags"),ye=RegExp.prototype;Re.exports=function(we){var me=we.flags;return me===void 0&&!("flags"in ye)&&!ce(we,"flags")&&be(ye,we)?ve(Ce,we):me}},{"../internals/function-call":155,"../internals/has-own-property":164,"../internals/object-is-prototype-of":204,"../internals/regexp-flags":225}],227:[function(ie,Re,je){var ve=ie("../internals/fails"),ce=ie("../internals/global"),be=ce.RegExp,Ce=ve(function(){var me=be("a","y");return me.lastIndex=2,me.exec("abcd")!=null}),ye=Ce||ve(function(){return!be("a","y").sticky}),we=Ce||ve(function(){var me=be("^r","gy");return me.lastIndex=2,me.exec("str")!=null});Re.exports={BROKEN_CARET:we,MISSED_STICKY:ye,UNSUPPORTED_Y:Ce}},{"../internals/fails":150,"../internals/global":163}],228:[function(ie,Re,je){var ve=ie("../internals/fails"),ce=ie("../internals/global"),be=ce.RegExp;Re.exports=ve(function(){var Ce=be(".","s");return!(Ce.dotAll&&Ce.exec(`
`)&&Ce.flags==="s")})},{"../internals/fails":150,"../internals/global":163}],229:[function(ie,Re,je){var ve=ie("../internals/fails"),ce=ie("../internals/global"),be=ce.RegExp;Re.exports=ve(function(){var Ce=be("(?<a>b)","g");return Ce.exec("b").groups.a!=="b"||"b".replace(Ce,"$<a>c")!=="bc"})},{"../internals/fails":150,"../internals/global":163}],230:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ve.TypeError;Re.exports=function(be){if(be==null)throw ce("Can't call method on "+be);return be}},{"../internals/global":163}],231:[function(ie,Re,je){Re.exports=Object.is||function(ce,be){return ce===be?ce!==0||1/ce===1/be:ce!=ce&&be!=be}},{}],232:[function(ie,Re,je){var ve=ie("../internals/global"),ce=Object.defineProperty;Re.exports=function(be,Ce){try{ce(ve,be,{value:Ce,configurable:!0,writable:!0})}catch(ye){ve[be]=Ce}return Ce}},{"../internals/global":163}],233:[function(ie,Re,je){"use strict";var ve=ie("../internals/get-built-in"),ce=ie("../internals/object-define-property"),be=ie("../internals/well-known-symbol"),Ce=ie("../internals/descriptors"),ye=be("species");Re.exports=function(we){var me=ve(we),xe=ce.f;Ce&&me&&!me[ye]&&xe(me,ye,{configurable:!0,get:function(){return this}})}},{"../internals/descriptors":134,"../internals/get-built-in":158,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],234:[function(ie,Re,je){var ve=ie("../internals/object-define-property").f,ce=ie("../internals/has-own-property"),be=ie("../internals/well-known-symbol"),Ce=be("toStringTag");Re.exports=function(ye,we,me){ye&&!me&&(ye=ye.prototype),ye&&!ce(ye,Ce)&&ve(ye,Ce,{configurable:!0,value:we})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],235:[function(ie,Re,je){var ve=ie("../internals/shared"),ce=ie("../internals/uid"),be=ve("keys");Re.exports=function(Ce){return be[Ce]||(be[Ce]=ce(Ce))}},{"../internals/shared":237,"../internals/uid":263}],236:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/set-global"),be="__core-js_shared__",Ce=ve[be]||ce(be,{});Re.exports=Ce},{"../internals/global":163,"../internals/set-global":232}],237:[function(ie,Re,je){var ve=ie("../internals/is-pure"),ce=ie("../internals/shared-store");(Re.exports=function(be,Ce){return ce[be]||(ce[be]=Ce!==void 0?Ce:{})})("versions",[]).push({version:"3.22.1",mode:ve?"pure":"global",copyright:"\xA9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.1/LICENSE",source:"https://github.com/zloirock/core-js"})},{"../internals/is-pure":181,"../internals/shared-store":236}],238:[function(ie,Re,je){var ve=ie("../internals/an-object"),ce=ie("../internals/a-constructor"),be=ie("../internals/well-known-symbol"),Ce=be("species");Re.exports=function(ye,we){var me=ve(ye).constructor,xe;return me===void 0||(xe=ve(me)[Ce])==null?we:ce(xe)}},{"../internals/a-constructor":96,"../internals/an-object":101,"../internals/well-known-symbol":268}],239:[function(ie,Re,je){var ve=ie("../internals/function-uncurry-this"),ce=ie("../internals/to-integer-or-infinity"),be=ie("../internals/to-string"),Ce=ie("../internals/require-object-coercible"),ye=ve("".charAt),we=ve("".charCodeAt),me=ve("".slice),xe=function(fe){return function(z,ee){var ae=be(Ce(z)),re=ce(ee),le=ae.length,ue,pe;return re<0||re>=le?fe?"":void 0:(ue=we(ae,re),ue<55296||ue>56319||re+1===le||(pe=we(ae,re+1))<56320||pe>57343?fe?ye(ae,re):ue:fe?me(ae,re,re+2):(ue-55296<<10)+(pe-56320)+65536)}};Re.exports={codeAt:xe(!1),charAt:xe(!0)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-integer-or-infinity":248,"../internals/to-string":256}],240:[function(ie,Re,je){var ve=ie("../internals/function-name").PROPER,ce=ie("../internals/fails"),be=ie("../internals/whitespaces"),Ce="\u200B\x85\u180E";Re.exports=function(ye){return ce(function(){return!!be[ye]()||Ce[ye]()!==Ce||ve&&be[ye].name!==ye})}},{"../internals/fails":150,"../internals/function-name":156,"../internals/whitespaces":269}],241:[function(ie,Re,je){var ve=ie("../internals/function-uncurry-this"),ce=ie("../internals/require-object-coercible"),be=ie("../internals/to-string"),Ce=ie("../internals/whitespaces"),ye=ve("".replace),we="["+Ce+"]",me=RegExp("^"+we+we+"*"),xe=RegExp(we+we+"*$"),fe=function(z){return function(ee){var ae=be(ce(ee));return z&1&&(ae=ye(ae,me,"")),z&2&&(ae=ye(ae,xe,"")),ae}};Re.exports={start:fe(1),end:fe(2),trim:fe(3)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-string":256,"../internals/whitespaces":269}],242:[function(ie,Re,je){var ve=ie("../internals/function-call"),ce=ie("../internals/get-built-in"),be=ie("../internals/well-known-symbol"),Ce=ie("../internals/redefine");Re.exports=function(){var ye=ce("Symbol"),we=ye&&ye.prototype,me=we&&we.valueOf,xe=be("toPrimitive");we&&!we[xe]&&Ce(we,xe,function(fe){return ve(me,this)})}},{"../internals/function-call":155,"../internals/get-built-in":158,"../internals/redefine":222,"../internals/well-known-symbol":268}],243:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/function-apply"),be=ie("../internals/function-bind-context"),Ce=ie("../internals/is-callable"),ye=ie("../internals/has-own-property"),we=ie("../internals/fails"),me=ie("../internals/html"),xe=ie("../internals/array-slice"),fe=ie("../internals/document-create-element"),z=ie("../internals/validate-arguments-length"),ee=ie("../internals/engine-is-ios"),ae=ie("../internals/engine-is-node"),re=ve.setImmediate,le=ve.clearImmediate,ue=ve.process,pe=ve.Dispatch,Ee=ve.Function,Pe=ve.MessageChannel,Ie=ve.String,ke=0,Ae={},Oe="onreadystatechange",Fe,_e,Ye,ze;try{Fe=ve.location}catch(Lt){}var Xe=function(Lt){if(ye(Ae,Lt)){var et=Ae[Lt];delete Ae[Lt],et()}},st=function(Lt){return function(){Xe(Lt)}},ht=function(Lt){Xe(Lt.data)},ft=function(Lt){ve.postMessage(Ie(Lt),Fe.protocol+"//"+Fe.host)};(!re||!le)&&(re=function(et){z(arguments.length,1);var it=Ce(et)?et:Ee(et),xt=xe(arguments,1);return Ae[++ke]=function(){ce(it,void 0,xt)},_e(ke),ke},le=function(et){delete Ae[et]},ae?_e=function(Lt){ue.nextTick(st(Lt))}:pe&&pe.now?_e=function(Lt){pe.now(st(Lt))}:Pe&&!ee?(Ye=new Pe,ze=Ye.port2,Ye.port1.onmessage=ht,_e=be(ze.postMessage,ze)):ve.addEventListener&&Ce(ve.postMessage)&&!ve.importScripts&&Fe&&Fe.protocol!=="file:"&&!we(ft)?(_e=ft,ve.addEventListener("message",ht,!1)):Oe in fe("script")?_e=function(Lt){me.appendChild(fe("script"))[Oe]=function(){me.removeChild(this),Xe(Lt)}}:_e=function(Lt){setTimeout(st(Lt),0)}),Re.exports={set:re,clear:le}},{"../internals/array-slice":117,"../internals/document-create-element":135,"../internals/engine-is-ios":142,"../internals/engine-is-node":143,"../internals/fails":150,"../internals/function-apply":152,"../internals/function-bind-context":153,"../internals/global":163,"../internals/has-own-property":164,"../internals/html":167,"../internals/is-callable":176,"../internals/validate-arguments-length":266}],244:[function(ie,Re,je){var ve=ie("../internals/function-uncurry-this");Re.exports=ve(1 .valueOf)},{"../internals/function-uncurry-this":157}],245:[function(ie,Re,je){var ve=ie("../internals/to-integer-or-infinity"),ce=Math.max,be=Math.min;Re.exports=function(Ce,ye){var we=ve(Ce);return we<0?ce(we+ye,0):be(we,ye)}},{"../internals/to-integer-or-infinity":248}],246:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/to-integer-or-infinity"),be=ie("../internals/to-length"),Ce=ve.RangeError;Re.exports=function(ye){if(ye===void 0)return 0;var we=ce(ye),me=be(we);if(we!==me)throw Ce("Wrong length or index");return me}},{"../internals/global":163,"../internals/to-integer-or-infinity":248,"../internals/to-length":249}],247:[function(ie,Re,je){var ve=ie("../internals/indexed-object"),ce=ie("../internals/require-object-coercible");Re.exports=function(be){return ve(ce(be))}},{"../internals/indexed-object":170,"../internals/require-object-coercible":230}],248:[function(ie,Re,je){var ve=Math.ceil,ce=Math.floor;Re.exports=function(be){var Ce=+be;return Ce!==Ce||Ce===0?0:(Ce>0?ce:ve)(Ce)}},{}],249:[function(ie,Re,je){var ve=ie("../internals/to-integer-or-infinity"),ce=Math.min;Re.exports=function(be){return be>0?ce(ve(be),9007199254740991):0}},{"../internals/to-integer-or-infinity":248}],250:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/require-object-coercible"),be=ve.Object;Re.exports=function(Ce){return be(ce(Ce))}},{"../internals/global":163,"../internals/require-object-coercible":230}],251:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/to-positive-integer"),be=ve.RangeError;Re.exports=function(Ce,ye){var we=ce(Ce);if(we%ye)throw be("Wrong offset");return we}},{"../internals/global":163,"../internals/to-positive-integer":252}],252:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/to-integer-or-infinity"),be=ve.RangeError;Re.exports=function(Ce){var ye=ce(Ce);if(ye<0)throw be("The argument can't be less than 0");return ye}},{"../internals/global":163,"../internals/to-integer-or-infinity":248}],253:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/function-call"),be=ie("../internals/is-object"),Ce=ie("../internals/is-symbol"),ye=ie("../internals/get-method"),we=ie("../internals/ordinary-to-primitive"),me=ie("../internals/well-known-symbol"),xe=ve.TypeError,fe=me("toPrimitive");Re.exports=function(z,ee){if(!be(z)||Ce(z))return z;var ae=ye(z,fe),re;if(ae){if(ee===void 0&&(ee="default"),re=ce(ae,z,ee),!be(re)||Ce(re))return re;throw xe("Can't convert object to primitive value")}return ee===void 0&&(ee="number"),we(z,ee)}},{"../internals/function-call":155,"../internals/get-method":161,"../internals/global":163,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/ordinary-to-primitive":211,"../internals/well-known-symbol":268}],254:[function(ie,Re,je){var ve=ie("../internals/to-primitive"),ce=ie("../internals/is-symbol");Re.exports=function(be){var Ce=ve(be,"string");return ce(Ce)?Ce:Ce+""}},{"../internals/is-symbol":183,"../internals/to-primitive":253}],255:[function(ie,Re,je){var ve=ie("../internals/well-known-symbol"),ce=ve("toStringTag"),be={};be[ce]="z",Re.exports=String(be)==="[object z]"},{"../internals/well-known-symbol":268}],256:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/classof"),be=ve.String;Re.exports=function(Ce){if(ce(Ce)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return be(Ce)}},{"../internals/classof":124,"../internals/global":163}],257:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ve.String;Re.exports=function(be){try{return ce(be)}catch(Ce){return"Object"}}},{"../internals/global":163}],258:[function(ie,Re,je){"use strict";var ve=ie("../internals/export"),ce=ie("../internals/global"),be=ie("../internals/function-call"),Ce=ie("../internals/descriptors"),ye=ie("../internals/typed-array-constructors-require-wrappers"),we=ie("../internals/array-buffer-view-core"),me=ie("../internals/array-buffer"),xe=ie("../internals/an-instance"),fe=ie("../internals/create-property-descriptor"),z=ie("../internals/create-non-enumerable-property"),ee=ie("../internals/is-integral-number"),ae=ie("../internals/to-length"),re=ie("../internals/to-index"),le=ie("../internals/to-offset"),ue=ie("../internals/to-property-key"),pe=ie("../internals/has-own-property"),Ee=ie("../internals/classof"),Pe=ie("../internals/is-object"),Ie=ie("../internals/is-symbol"),ke=ie("../internals/object-create"),Ae=ie("../internals/object-is-prototype-of"),Oe=ie("../internals/object-set-prototype-of"),Fe=ie("../internals/object-get-own-property-names").f,_e=ie("../internals/typed-array-from"),Ye=ie("../internals/array-iteration").forEach,ze=ie("../internals/set-species"),Xe=ie("../internals/object-define-property"),st=ie("../internals/object-get-own-property-descriptor"),ht=ie("../internals/internal-state"),ft=ie("../internals/inherit-if-required"),Lt=ht.get,et=ht.set,it=Xe.f,xt=st.f,Et=Math.round,Mt=ce.RangeError,mt=me.ArrayBuffer,pt=mt.prototype,vt=me.DataView,jt=we.NATIVE_ARRAY_BUFFER_VIEWS,At=we.TYPED_ARRAY_CONSTRUCTOR,Kt=we.TYPED_ARRAY_TAG,Ct=we.TypedArray,gt=we.TypedArrayPrototype,tt=we.aTypedArrayConstructor,bt=we.isTypedArray,Ke="BYTES_PER_ELEMENT",ut="Wrong length",wt=function(qe,He){tt(qe);for(var De=0,Le=He.length,Ve=new qe(Le);Le>De;)Ve[De]=He[De++];return Ve},yt=function(qe,He){it(qe,He,{get:function(){return Lt(this)[He]}})},lt=function(qe){var He;return Ae(pt,qe)||(He=Ee(qe))=="ArrayBuffer"||He=="SharedArrayBuffer"},Qe=function(qe,He){return bt(qe)&&!Ie(He)&&He in qe&&ee(+He)&&He>=0},We=function(He,De){return De=ue(De),Qe(He,De)?fe(2,He[De]):xt(He,De)},Ue=function(He,De,Le){return De=ue(De),Qe(He,De)&&Pe(Le)&&pe(Le,"value")&&!pe(Le,"get")&&!pe(Le,"set")&&!Le.configurable&&(!pe(Le,"writable")||Le.writable)&&(!pe(Le,"enumerable")||Le.enumerable)?(He[De]=Le.value,He):it(He,De,Le)};Ce?(jt||(st.f=We,Xe.f=Ue,yt(gt,"buffer"),yt(gt,"byteOffset"),yt(gt,"byteLength"),yt(gt,"length")),ve({target:"Object",stat:!0,forced:!jt},{getOwnPropertyDescriptor:We,defineProperty:Ue}),Re.exports=function(qe,He,De){var Le=qe.match(/\d+$/)[0]/8,Ve=qe+(De?"Clamped":"")+"Array",dt="get"+qe,Ze="set"+qe,Tt=ce[Ve],_t=Tt,Qt=_t&&_t.prototype,kt={},Nt=function(vn,kn){var Kn=Lt(vn);return Kn.view[dt](kn*Le+Kn.byteOffset,!0)},Zt=function(vn,kn,Kn){var Xn=Lt(vn);De&&(Kn=(Kn=Et(Kn))<0?0:Kn>255?255:Kn&255),Xn.view[Ze](kn*Le+Xn.byteOffset,Kn,!0)},on=function(vn,kn){it(vn,kn,{get:function(){return Nt(this,kn)},set:function(Kn){return Zt(this,kn,Kn)},enumerable:!0})};jt?ye&&(_t=He(function(vn,kn,Kn,Xn){return xe(vn,Qt),ft(function(){return Pe(kn)?lt(kn)?Xn!==void 0?new Tt(kn,le(Kn,Le),Xn):Kn!==void 0?new Tt(kn,le(Kn,Le)):new Tt(kn):bt(kn)?wt(_t,kn):be(_e,_t,kn):new Tt(re(kn))}(),vn,_t)}),Oe&&Oe(_t,Ct),Ye(Fe(Tt),function(vn){vn in _t||z(_t,vn,Tt[vn])}),_t.prototype=Qt):(_t=He(function(vn,kn,Kn,Xn){xe(vn,Qt);var pr=0,dr=0,vr,Sr,Fr;if(!Pe(kn))Fr=re(kn),Sr=Fr*Le,vr=new mt(Sr);else if(lt(kn)){vr=kn,dr=le(Kn,Le);var li=kn.byteLength;if(Xn===void 0){if(li%Le||(Sr=li-dr,Sr<0))throw Mt(ut)}else if(Sr=ae(Xn)*Le,Sr+dr>li)throw Mt(ut);Fr=Sr/Le}else return bt(kn)?wt(_t,kn):be(_e,_t,kn);for(et(vn,{buffer:vr,byteOffset:dr,byteLength:Sr,length:Fr,view:new vt(vr)});pr<Fr;)on(vn,pr++)}),Oe&&Oe(_t,Ct),Qt=_t.prototype=ke(gt)),Qt.constructor!==_t&&z(Qt,"constructor",_t),z(Qt,At,_t),Kt&&z(Qt,Kt,Ve),kt[Ve]=_t,ve({global:!0,forced:_t!=Tt,sham:!jt},kt),Ke in _t||z(_t,Ke,Le),Ke in Qt||z(Qt,Ke,Le),ze(Ve)}):Re.exports=function(){}},{"../internals/an-instance":100,"../internals/array-buffer":104,"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/classof":124,"../internals/create-non-enumerable-property":129,"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/export":149,"../internals/function-call":155,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/internal-state":173,"../internals/is-integral-number":179,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/object-create":196,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/object-set-prototype-of":208,"../internals/set-species":233,"../internals/to-index":246,"../internals/to-length":249,"../internals/to-offset":251,"../internals/to-property-key":254,"../internals/typed-array-constructors-require-wrappers":259,"../internals/typed-array-from":261}],259:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/fails"),be=ie("../internals/check-correctness-of-iteration"),Ce=ie("../internals/array-buffer-view-core").NATIVE_ARRAY_BUFFER_VIEWS,ye=ve.ArrayBuffer,we=ve.Int8Array;Re.exports=!Ce||!ce(function(){we(1)})||!ce(function(){new we(-1)})||!be(function(me){new we,new we(null),new we(1.5),new we(me)},!0)||ce(function(){return new we(new ye(2),1,void 0).length!==1})},{"../internals/array-buffer-view-core":103,"../internals/check-correctness-of-iteration":122,"../internals/fails":150,"../internals/global":163}],260:[function(ie,Re,je){var ve=ie("../internals/array-from-constructor-and-list"),ce=ie("../internals/typed-array-species-constructor");Re.exports=function(be,Ce){return ve(ce(be),Ce)}},{"../internals/array-from-constructor-and-list":108,"../internals/typed-array-species-constructor":262}],261:[function(ie,Re,je){var ve=ie("../internals/function-bind-context"),ce=ie("../internals/function-call"),be=ie("../internals/a-constructor"),Ce=ie("../internals/to-object"),ye=ie("../internals/length-of-array-like"),we=ie("../internals/get-iterator"),me=ie("../internals/get-iterator-method"),xe=ie("../internals/is-array-iterator-method"),fe=ie("../internals/array-buffer-view-core").aTypedArrayConstructor;Re.exports=function(ee){var ae=be(this),re=Ce(ee),le=arguments.length,ue=le>1?arguments[1]:void 0,pe=ue!==void 0,Ee=me(re),Pe,Ie,ke,Ae,Oe,Fe;if(Ee&&!xe(Ee))for(Oe=we(re,Ee),Fe=Oe.next,re=[];!(Ae=ce(Fe,Oe)).done;)re.push(Ae.value);for(pe&&le>2&&(ue=ve(ue,arguments[2])),Ie=ye(re),ke=new(fe(ae))(Ie),Pe=0;Ie>Pe;Pe++)ke[Pe]=pe?ue(re[Pe],Pe):re[Pe];return ke}},{"../internals/a-constructor":96,"../internals/array-buffer-view-core":103,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/is-array-iterator-method":174,"../internals/length-of-array-like":188,"../internals/to-object":250}],262:[function(ie,Re,je){var ve=ie("../internals/array-buffer-view-core"),ce=ie("../internals/species-constructor"),be=ve.TYPED_ARRAY_CONSTRUCTOR,Ce=ve.aTypedArrayConstructor;Re.exports=function(ye){return Ce(ce(ye,ye[be]))}},{"../internals/array-buffer-view-core":103,"../internals/species-constructor":238}],263:[function(ie,Re,je){var ve=ie("../internals/function-uncurry-this"),ce=0,be=Math.random(),Ce=ve(1 .toString);Re.exports=function(ye){return"Symbol("+(ye===void 0?"":ye)+")_"+Ce(++ce+be,36)}},{"../internals/function-uncurry-this":157}],264:[function(ie,Re,je){var ve=ie("../internals/native-symbol");Re.exports=ve&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},{"../internals/native-symbol":191}],265:[function(ie,Re,je){var ve=ie("../internals/descriptors"),ce=ie("../internals/fails");Re.exports=ve&&ce(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},{"../internals/descriptors":134,"../internals/fails":150}],266:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ve.TypeError;Re.exports=function(be,Ce){if(be<Ce)throw ce("Not enough arguments");return be}},{"../internals/global":163}],267:[function(ie,Re,je){var ve=ie("../internals/well-known-symbol");je.f=ve},{"../internals/well-known-symbol":268}],268:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/shared"),be=ie("../internals/has-own-property"),Ce=ie("../internals/uid"),ye=ie("../internals/native-symbol"),we=ie("../internals/use-symbol-as-uid"),me=ce("wks"),xe=ve.Symbol,fe=xe&&xe.for,z=we?xe:xe&&xe.withoutSetter||Ce;Re.exports=function(ee){if(!be(me,ee)||!(ye||typeof me[ee]=="string")){var ae="Symbol."+ee;ye&&be(xe,ee)?me[ee]=xe[ee]:we&&fe?me[ee]=fe(ae):me[ee]=z(ae)}return me[ee]}},{"../internals/global":163,"../internals/has-own-property":164,"../internals/native-symbol":191,"../internals/shared":237,"../internals/uid":263,"../internals/use-symbol-as-uid":264}],269:[function(ie,Re,je){Re.exports=`
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`},{}],270:[function(ie,Re,je){"use strict";var ve=ie("../internals/export"),ce=ie("../internals/global"),be=ie("../internals/array-buffer"),Ce=ie("../internals/set-species"),ye="ArrayBuffer",we=be[ye],me=ce[ye];ve({global:!0,forced:me!==we},{ArrayBuffer:we}),Ce(ye)},{"../internals/array-buffer":104,"../internals/export":149,"../internals/global":163,"../internals/set-species":233}],271:[function(ie,Re,je){"use strict";var ve=ie("../internals/export"),ce=ie("../internals/function-uncurry-this"),be=ie("../internals/fails"),Ce=ie("../internals/array-buffer"),ye=ie("../internals/an-object"),we=ie("../internals/to-absolute-index"),me=ie("../internals/to-length"),xe=ie("../internals/species-constructor"),fe=Ce.ArrayBuffer,z=Ce.DataView,ee=z.prototype,ae=ce(fe.prototype.slice),re=ce(ee.getUint8),le=ce(ee.setUint8),ue=be(function(){return!new fe(2).slice(1,void 0).byteLength});ve({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:ue},{slice:function(Ee,Pe){if(ae&&Pe===void 0)return ae(ye(this),Ee);for(var Ie=ye(this).byteLength,ke=we(Ee,Ie),Ae=we(Pe===void 0?Ie:Pe,Ie),Oe=new(xe(this,fe))(me(Ae-ke)),Fe=new z(this),_e=new z(Oe),Ye=0;ke<Ae;)le(_e,Ye++,re(Fe,ke++));return Oe}})},{"../internals/an-object":101,"../internals/array-buffer":104,"../internals/export":149,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/species-constructor":238,"../internals/to-absolute-index":245,"../internals/to-length":249}],272:[function(ie,Re,je){"use strict";var ve=ie("../internals/export"),ce=ie("../internals/global"),be=ie("../internals/fails"),Ce=ie("../internals/is-array"),ye=ie("../internals/is-object"),we=ie("../internals/to-object"),me=ie("../internals/length-of-array-like"),xe=ie("../internals/create-property"),fe=ie("../internals/array-species-create"),z=ie("../internals/array-method-has-species-support"),ee=ie("../internals/well-known-symbol"),ae=ie("../internals/engine-v8-version"),re=ee("isConcatSpreadable"),le=9007199254740991,ue="Maximum allowed index exceeded",pe=ce.TypeError,Ee=ae>=51||!be(function(){var Ae=[];return Ae[re]=!1,Ae.concat()[0]!==Ae}),Pe=z("concat"),Ie=function(Ae){if(!ye(Ae))return!1;var Oe=Ae[re];return Oe!==void 0?!!Oe:Ce(Ae)},ke=!Ee||!Pe;ve({target:"Array",proto:!0,forced:ke},{concat:function(Oe){var Fe=we(this),_e=fe(Fe,0),Ye=0,ze,Xe,st,ht,ft;for(ze=-1,st=arguments.length;ze<st;ze++)if(ft=ze===-1?Fe:arguments[ze],Ie(ft)){if(ht=me(ft),Ye+ht>le)throw pe(ue);for(Xe=0;Xe<ht;Xe++,Ye++)Xe in ft&&xe(_e,Ye,ft[Xe])}else{if(Ye>=le)throw pe(ue);xe(_e,Ye++,ft)}return _e.length=Ye,_e}})},{"../internals/array-method-has-species-support":113,"../internals/array-species-create":120,"../internals/create-property":131,"../internals/engine-v8-version":146,"../internals/export":149,"../internals/fails":150,"../internals/global":163,"../internals/is-array":175,"../internals/is-object":180,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/well-known-symbol":268}],273:[function(ie,Re,je){var ve=ie("../internals/export"),ce=ie("../internals/array-fill"),be=ie("../internals/add-to-unscopables");ve({target:"Array",proto:!0},{fill:ce}),be("fill")},{"../internals/add-to-unscopables":98,"../internals/array-fill":106,"../internals/export":149}],274:[function(ie,Re,je){"use strict";var ve=ie("../internals/export"),ce=ie("../internals/array-iteration").filter,be=ie("../internals/array-method-has-species-support"),Ce=be("filter");ve({target:"Array",proto:!0,forced:!Ce},{filter:function(we){return ce(this,we,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],275:[function(ie,Re,je){"use strict";var ve=ie("../internals/export"),ce=ie("../internals/array-iteration").find,be=ie("../internals/add-to-unscopables"),Ce="find",ye=!0;Ce in[]&&Array(1)[Ce](function(){ye=!1}),ve({target:"Array",proto:!0,forced:ye},{find:function(me){return ce(this,me,arguments.length>1?arguments[1]:void 0)}}),be(Ce)},{"../internals/add-to-unscopables":98,"../internals/array-iteration":111,"../internals/export":149}],276:[function(ie,Re,je){var ve=ie("../internals/export"),ce=ie("../internals/array-from"),be=ie("../internals/check-correctness-of-iteration"),Ce=!be(function(ye){Array.from(ye)});ve({target:"Array",stat:!0,forced:Ce},{from:ce})},{"../internals/array-from":109,"../internals/check-correctness-of-iteration":122,"../internals/export":149}],277:[function(ie,Re,je){"use strict";var ve=ie("../internals/export"),ce=ie("../internals/array-includes").includes,be=ie("../internals/add-to-unscopables");ve({target:"Array",proto:!0},{includes:function(ye){return ce(this,ye,arguments.length>1?arguments[1]:void 0)}}),be("includes")},{"../internals/add-to-unscopables":98,"../internals/array-includes":110,"../internals/export":149}],278:[function(ie,Re,je){"use strict";var ve=ie("../internals/to-indexed-object"),ce=ie("../internals/add-to-unscopables"),be=ie("../internals/iterators"),Ce=ie("../internals/internal-state"),ye=ie("../internals/object-define-property").f,we=ie("../internals/define-iterator"),me=ie("../internals/is-pure"),xe=ie("../internals/descriptors"),fe="Array Iterator",z=Ce.set,ee=Ce.getterFor(fe);Re.exports=we(Array,"Array",function(re,le){z(this,{type:fe,target:ve(re),index:0,kind:le})},function(){var re=ee(this),le=re.target,ue=re.kind,pe=re.index++;return!le||pe>=le.length?(re.target=void 0,{value:void 0,done:!0}):ue=="keys"?{value:pe,done:!1}:ue=="values"?{value:le[pe],done:!1}:{value:[pe,le[pe]],done:!1}},"values");var ae=be.Arguments=be.Array;if(ce("keys"),ce("values"),ce("entries"),!me&&xe&&ae.name!=="values")try{ye(ae,"name",{value:"values"})}catch(re){}},{"../internals/add-to-unscopables":98,"../internals/define-iterator":132,"../internals/descriptors":134,"../internals/internal-state":173,"../internals/is-pure":181,"../internals/iterators":187,"../internals/object-define-property":198,"../internals/to-indexed-object":247}],279:[function(ie,Re,je){"use strict";var ve=ie("../internals/export"),ce=ie("../internals/function-uncurry-this"),be=ie("../internals/indexed-object"),Ce=ie("../internals/to-indexed-object"),ye=ie("../internals/array-method-is-strict"),we=ce([].join),me=be!=Object,xe=ye("join",",");ve({target:"Array",proto:!0,forced:me||!xe},{join:function(z){return we(Ce(this),z===void 0?",":z)}})},{"../internals/array-method-is-strict":114,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/to-indexed-object":247}],280:[function(ie,Re,je){"use strict";var ve=ie("../internals/export"),ce=ie("../internals/array-iteration").map,be=ie("../internals/array-method-has-species-support"),Ce=be("map");ve({target:"Array",proto:!0,forced:!Ce},{map:function(we){return ce(this,we,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],281:[function(ie,Re,je){"use strict";var ve=ie("../internals/export"),ce=ie("../internals/global"),be=ie("../internals/is-array"),Ce=ie("../internals/is-constructor"),ye=ie("../internals/is-object"),we=ie("../internals/to-absolute-index"),me=ie("../internals/length-of-array-like"),xe=ie("../internals/to-indexed-object"),fe=ie("../internals/create-property"),z=ie("../internals/well-known-symbol"),ee=ie("../internals/array-method-has-species-support"),ae=ie("../internals/array-slice"),re=ee("slice"),le=z("species"),ue=ce.Array,pe=Math.max;ve({target:"Array",proto:!0,forced:!re},{slice:function(Pe,Ie){var ke=xe(this),Ae=me(ke),Oe=we(Pe,Ae),Fe=we(Ie===void 0?Ae:Ie,Ae),_e,Ye,ze;if(be(ke)&&(_e=ke.constructor,Ce(_e)&&(_e===ue||be(_e.prototype))?_e=void 0:ye(_e)&&(_e=_e[le],_e===null&&(_e=void 0)),_e===ue||_e===void 0))return ae(ke,Oe,Fe);for(Ye=new(_e===void 0?ue:_e)(pe(Fe-Oe,0)),ze=0;Oe<Fe;Oe++,ze++)Oe in ke&&fe(Ye,ze,ke[Oe]);return Ye.length=ze,Ye}})},{"../internals/array-method-has-species-support":113,"../internals/array-slice":117,"../internals/create-property":131,"../internals/export":149,"../internals/global":163,"../internals/is-array":175,"../internals/is-constructor":177,"../internals/is-object":180,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-indexed-object":247,"../internals/well-known-symbol":268}],282:[function(ie,Re,je){"use strict";var ve=ie("../internals/export"),ce=ie("../internals/function-uncurry-this"),be=ie("../internals/a-callable"),Ce=ie("../internals/to-object"),ye=ie("../internals/length-of-array-like"),we=ie("../internals/to-string"),me=ie("../internals/fails"),xe=ie("../internals/array-sort"),fe=ie("../internals/array-method-is-strict"),z=ie("../internals/engine-ff-version"),ee=ie("../internals/engine-is-ie-or-edge"),ae=ie("../internals/engine-v8-version"),re=ie("../internals/engine-webkit-version"),le=[],ue=ce(le.sort),pe=ce(le.push),Ee=me(function(){le.sort(void 0)}),Pe=me(function(){le.sort(null)}),Ie=fe("sort"),ke=!me(function(){if(ae)return ae<70;if(!(z&&z>3)){if(ee)return!0;if(re)return re<603;var Fe="",_e,Ye,ze,Xe;for(_e=65;_e<76;_e++){switch(Ye=String.fromCharCode(_e),_e){case 66:case 69:case 70:case 72:ze=3;break;case 68:case 71:ze=4;break;default:ze=2}for(Xe=0;Xe<47;Xe++)le.push({k:Ye+Xe,v:ze})}for(le.sort(function(st,ht){return ht.v-st.v}),Xe=0;Xe<le.length;Xe++)Ye=le[Xe].k.charAt(0),Fe.charAt(Fe.length-1)!==Ye&&(Fe+=Ye);return Fe!=="DGBEFHACIJK"}}),Ae=Ee||!Pe||!Ie||!ke,Oe=function(Fe){return function(_e,Ye){return Ye===void 0?-1:_e===void 0?1:Fe!==void 0?+Fe(_e,Ye)||0:we(_e)>we(Ye)?1:-1}};ve({target:"Array",proto:!0,forced:Ae},{sort:function(_e){_e!==void 0&&be(_e);var Ye=Ce(this);if(ke)return _e===void 0?ue(Ye):ue(Ye,_e);var ze=[],Xe=ye(Ye),st,ht;for(ht=0;ht<Xe;ht++)ht in Ye&&pe(ze,Ye[ht]);for(xe(ze,Oe(_e)),st=ze.length,ht=0;ht<st;)Ye[ht]=ze[ht++];for(;ht<Xe;)delete Ye[ht++];return Ye}})},{"../internals/a-callable":95,"../internals/array-method-is-strict":114,"../internals/array-sort":118,"../internals/engine-ff-version":138,"../internals/engine-is-ie-or-edge":140,"../internals/engine-v8-version":146,"../internals/engine-webkit-version":147,"../internals/export":149,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/to-string":256}],283:[function(ie,Re,je){"use strict";var ve=ie("../internals/export"),ce=ie("../internals/global"),be=ie("../internals/to-absolute-index"),Ce=ie("../internals/to-integer-or-infinity"),ye=ie("../internals/length-of-array-like"),we=ie("../internals/to-object"),me=ie("../internals/array-species-create"),xe=ie("../internals/create-property"),fe=ie("../internals/array-method-has-species-support"),z=fe("splice"),ee=ce.TypeError,ae=Math.max,re=Math.min,le=9007199254740991,ue="Maximum allowed length exceeded";ve({target:"Array",proto:!0,forced:!z},{splice:function(Ee,Pe){var Ie=we(this),ke=ye(Ie),Ae=be(Ee,ke),Oe=arguments.length,Fe,_e,Ye,ze,Xe,st;if(Oe===0?Fe=_e=0:Oe===1?(Fe=0,_e=ke-Ae):(Fe=Oe-2,_e=re(ae(Ce(Pe),0),ke-Ae)),ke+Fe-_e>le)throw ee(ue);for(Ye=me(Ie,_e),ze=0;ze<_e;ze++)Xe=Ae+ze,Xe in Ie&&xe(Ye,ze,Ie[Xe]);if(Ye.length=_e,Fe<_e){for(ze=Ae;ze<ke-_e;ze++)Xe=ze+_e,st=ze+Fe,Xe in Ie?Ie[st]=Ie[Xe]:delete Ie[st];for(ze=ke;ze>ke-_e+Fe;ze--)delete Ie[ze-1]}else if(Fe>_e)for(ze=ke-_e;ze>Ae;ze--)Xe=ze+_e-1,st=ze+Fe-1,Xe in Ie?Ie[st]=Ie[Xe]:delete Ie[st];for(ze=0;ze<Fe;ze++)Ie[ze+Ae]=arguments[ze+2];return Ie.length=ke-_e+Fe,Ye}})},{"../internals/array-method-has-species-support":113,"../internals/array-species-create":120,"../internals/create-property":131,"../internals/export":149,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-integer-or-infinity":248,"../internals/to-object":250}],284:[function(ie,Re,je){var ve=ie("../internals/descriptors"),ce=ie("../internals/function-name").EXISTS,be=ie("../internals/function-uncurry-this"),Ce=ie("../internals/object-define-property").f,ye=Function.prototype,we=be(ye.toString),me=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,xe=be(me.exec),fe="name";ve&&!ce&&Ce(ye,fe,{configurable:!0,get:function(){try{return xe(me,we(this))[1]}catch(z){return""}}})},{"../internals/descriptors":134,"../internals/function-name":156,"../internals/function-uncurry-this":157,"../internals/object-define-property":198}],285:[function(ie,Re,je){var ve=ie("../internals/export"),ce=ie("../internals/get-built-in"),be=ie("../internals/function-apply"),Ce=ie("../internals/function-call"),ye=ie("../internals/function-uncurry-this"),we=ie("../internals/fails"),me=ie("../internals/is-array"),xe=ie("../internals/is-callable"),fe=ie("../internals/is-object"),z=ie("../internals/is-symbol"),ee=ie("../internals/array-slice"),ae=ie("../internals/native-symbol"),re=ce("JSON","stringify"),le=ye(/./.exec),ue=ye("".charAt),pe=ye("".charCodeAt),Ee=ye("".replace),Pe=ye(1 .toString),Ie=/[\uD800-\uDFFF]/g,ke=/^[\uD800-\uDBFF]$/,Ae=/^[\uDC00-\uDFFF]$/,Oe=!ae||we(function(){var ze=ce("Symbol")();return re([ze])!="[null]"||re({a:ze})!="{}"||re(Object(ze))!="{}"}),Fe=we(function(){return re("\uDF06\uD834")!=='"\\udf06\\ud834"'||re("\uDEAD")!=='"\\udead"'}),_e=function(ze,Xe){var st=ee(arguments),ht=Xe;if(!(!fe(Xe)&&ze===void 0||z(ze)))return me(Xe)||(Xe=function(ft,Lt){if(xe(ht)&&(Lt=Ce(ht,this,ft,Lt)),!z(Lt))return Lt}),st[1]=Xe,be(re,null,st)},Ye=function(ze,Xe,st){var ht=ue(st,Xe-1),ft=ue(st,Xe+1);return le(ke,ze)&&!le(Ae,ft)||le(Ae,ze)&&!le(ke,ht)?"\\u"+Pe(pe(ze,0),16):ze};re&&ve({target:"JSON",stat:!0,forced:Oe||Fe},{stringify:function(Xe,st,ht){var ft=ee(arguments),Lt=be(Oe?_e:re,null,ft);return Fe&&typeof Lt=="string"?Ee(Lt,Ie,Ye):Lt}})},{"../internals/array-slice":117,"../internals/export":149,"../internals/fails":150,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/is-array":175,"../internals/is-callable":176,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/native-symbol":191}],286:[function(ie,Re,je){"use strict";var ve=ie("../internals/descriptors"),ce=ie("../internals/global"),be=ie("../internals/function-uncurry-this"),Ce=ie("../internals/is-forced"),ye=ie("../internals/redefine"),we=ie("../internals/has-own-property"),me=ie("../internals/inherit-if-required"),xe=ie("../internals/object-is-prototype-of"),fe=ie("../internals/is-symbol"),z=ie("../internals/to-primitive"),ee=ie("../internals/fails"),ae=ie("../internals/object-get-own-property-names").f,re=ie("../internals/object-get-own-property-descriptor").f,le=ie("../internals/object-define-property").f,ue=ie("../internals/this-number-value"),pe=ie("../internals/string-trim").trim,Ee="Number",Pe=ce[Ee],Ie=Pe.prototype,ke=ce.TypeError,Ae=be("".slice),Oe=be("".charCodeAt),Fe=function(ht){var ft=z(ht,"number");return typeof ft=="bigint"?ft:_e(ft)},_e=function(ht){var ft=z(ht,"number"),Lt,et,it,xt,Et,Mt,mt,pt;if(fe(ft))throw ke("Cannot convert a Symbol value to a number");if(typeof ft=="string"&&ft.length>2){if(ft=pe(ft),Lt=Oe(ft,0),Lt===43||Lt===45){if(et=Oe(ft,2),et===88||et===120)return NaN}else if(Lt===48){switch(Oe(ft,1)){case 66:case 98:it=2,xt=49;break;case 79:case 111:it=8,xt=55;break;default:return+ft}for(Et=Ae(ft,2),Mt=Et.length,mt=0;mt<Mt;mt++)if(pt=Oe(Et,mt),pt<48||pt>xt)return NaN;return parseInt(Et,it)}}return+ft};if(Ce(Ee,!Pe(" 0o1")||!Pe("0b1")||Pe("+0x1"))){for(var Ye=function(ft){var Lt=arguments.length<1?0:Pe(Fe(ft)),et=this;return xe(Ie,et)&&ee(function(){ue(et)})?me(Object(Lt),et,Ye):Lt},ze=ve?ae(Pe):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),Xe=0,st;ze.length>Xe;Xe++)we(Pe,st=ze[Xe])&&!we(Ye,st)&&le(Ye,st,re(Pe,st));Ye.prototype=Ie,Ie.constructor=Ye,ye(ce,Ee,Ye)}},{"../internals/descriptors":134,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/is-forced":178,"../internals/is-symbol":183,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/redefine":222,"../internals/string-trim":241,"../internals/this-number-value":244,"../internals/to-primitive":253}],287:[function(ie,Re,je){var ve=ie("../internals/export"),ce=ie("../internals/object-assign");ve({target:"Object",stat:!0,forced:Object.assign!==ce},{assign:ce})},{"../internals/export":149,"../internals/object-assign":195}],288:[function(ie,Re,je){var ve=ie("../internals/export"),ce=ie("../internals/object-to-array").entries;ve({target:"Object",stat:!0},{entries:function(Ce){return ce(Ce)}})},{"../internals/export":149,"../internals/object-to-array":209}],289:[function(ie,Re,je){var ve=ie("../internals/export"),ce=ie("../internals/native-symbol"),be=ie("../internals/fails"),Ce=ie("../internals/object-get-own-property-symbols"),ye=ie("../internals/to-object"),we=!ce||be(function(){Ce.f(1)});ve({target:"Object",stat:!0,forced:we},{getOwnPropertySymbols:function(xe){var fe=Ce.f;return fe?fe(ye(xe)):[]}})},{"../internals/export":149,"../internals/fails":150,"../internals/native-symbol":191,"../internals/object-get-own-property-symbols":202,"../internals/to-object":250}],290:[function(ie,Re,je){var ve=ie("../internals/export"),ce=ie("../internals/to-object"),be=ie("../internals/object-keys"),Ce=ie("../internals/fails"),ye=Ce(function(){be(1)});ve({target:"Object",stat:!0,forced:ye},{keys:function(me){return be(ce(me))}})},{"../internals/export":149,"../internals/fails":150,"../internals/object-keys":206,"../internals/to-object":250}],291:[function(ie,Re,je){var ve=ie("../internals/to-string-tag-support"),ce=ie("../internals/redefine"),be=ie("../internals/object-to-string");ve||ce(Object.prototype,"toString",be,{unsafe:!0})},{"../internals/object-to-string":210,"../internals/redefine":222,"../internals/to-string-tag-support":255}],292:[function(ie,Re,je){"use strict";var ve=ie("../internals/export"),ce=ie("../internals/function-call"),be=ie("../internals/a-callable"),Ce=ie("../internals/new-promise-capability"),ye=ie("../internals/perform"),we=ie("../internals/iterate"),me=ie("../internals/promise-statics-incorrect-iteration");ve({target:"Promise",stat:!0,forced:me},{all:function(fe){var z=this,ee=Ce.f(z),ae=ee.resolve,re=ee.reject,le=ye(function(){var ue=be(z.resolve),pe=[],Ee=0,Pe=1;we(fe,function(Ie){var ke=Ee++,Ae=!1;Pe++,ce(ue,z,Ie).then(function(Oe){Ae||(Ae=!0,pe[ke]=Oe,--Pe||ae(pe))},re)}),--Pe||ae(pe)});return le.error&&re(le.value),ee.promise}})},{"../internals/a-callable":95,"../internals/export":149,"../internals/function-call":155,"../internals/iterate":184,"../internals/new-promise-capability":193,"../internals/perform":214,"../internals/promise-statics-incorrect-iteration":218}],293:[function(ie,Re,je){"use strict";var ve=ie("../internals/export"),ce=ie("../internals/is-pure"),be=ie("../internals/promise-constructor-detection").CONSTRUCTOR,Ce=ie("../internals/promise-native-constructor"),ye=ie("../internals/get-built-in"),we=ie("../internals/is-callable"),me=ie("../internals/redefine"),xe=Ce&&Ce.prototype;if(ve({target:"Promise",proto:!0,forced:be,real:!0},{catch:function(z){return this.then(void 0,z)}}),!ce&&we(Ce)){var fe=ye("Promise").prototype.catch;xe.catch!==fe&&me(xe,"catch",fe,{unsafe:!0})}},{"../internals/export":149,"../internals/get-built-in":158,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/redefine":222}],294:[function(ie,Re,je){"use strict";var ve=ie("../internals/export"),ce=ie("../internals/is-pure"),be=ie("../internals/engine-is-node"),Ce=ie("../internals/global"),ye=ie("../internals/function-call"),we=ie("../internals/redefine"),me=ie("../internals/redefine-all"),xe=ie("../internals/object-set-prototype-of"),fe=ie("../internals/set-to-string-tag"),z=ie("../internals/set-species"),ee=ie("../internals/a-callable"),ae=ie("../internals/is-callable"),re=ie("../internals/is-object"),le=ie("../internals/an-instance"),ue=ie("../internals/species-constructor"),pe=ie("../internals/task").set,Ee=ie("../internals/microtask"),Pe=ie("../internals/host-report-errors"),Ie=ie("../internals/perform"),ke=ie("../internals/queue"),Ae=ie("../internals/internal-state"),Oe=ie("../internals/promise-native-constructor"),Fe=ie("../internals/promise-constructor-detection"),_e=ie("../internals/new-promise-capability"),Ye="Promise",ze=Fe.CONSTRUCTOR,Xe=Fe.REJECTION_EVENT,st=Fe.SUBCLASSING,ht=Ae.getterFor(Ye),ft=Ae.set,Lt=Oe&&Oe.prototype,et=Oe,it=Lt,xt=Ce.TypeError,Et=Ce.document,Mt=Ce.process,mt=_e.f,pt=mt,vt=!!(Et&&Et.createEvent&&Ce.dispatchEvent),jt="unhandledrejection",At="rejectionhandled",Kt=0,Ct=1,gt=2,tt=1,bt=2,Ke,ut,wt,yt,lt=function(Ze){var Tt;return re(Ze)&&ae(Tt=Ze.then)?Tt:!1},Qe=function(Ze,Tt){var _t=Tt.value,Qt=Tt.state==Ct,kt=Qt?Ze.ok:Ze.fail,Nt=Ze.resolve,Zt=Ze.reject,on=Ze.domain,vn,kn,Kn;try{kt?(Qt||(Tt.rejection===bt&&De(Tt),Tt.rejection=tt),kt===!0?vn=_t:(on&&on.enter(),vn=kt(_t),on&&(on.exit(),Kn=!0)),vn===Ze.promise?Zt(xt("Promise-chain cycle")):(kn=lt(vn))?ye(kn,vn,Nt,Zt):Nt(vn)):Zt(_t)}catch(Xn){on&&!Kn&&on.exit(),Zt(Xn)}},We=function(Ze,Tt){Ze.notified||(Ze.notified=!0,Ee(function(){for(var _t=Ze.reactions,Qt;Qt=_t.get();)Qe(Qt,Ze);Ze.notified=!1,Tt&&!Ze.rejection&&qe(Ze)}))},Ue=function(Ze,Tt,_t){var Qt,kt;vt?(Qt=Et.createEvent("Event"),Qt.promise=Tt,Qt.reason=_t,Qt.initEvent(Ze,!1,!0),Ce.dispatchEvent(Qt)):Qt={promise:Tt,reason:_t},!Xe&&(kt=Ce["on"+Ze])?kt(Qt):Ze===jt&&Pe("Unhandled promise rejection",_t)},qe=function(Ze){ye(pe,Ce,function(){var Tt=Ze.facade,_t=Ze.value,Qt=He(Ze),kt;if(Qt&&(kt=Ie(function(){be?Mt.emit("unhandledRejection",_t,Tt):Ue(jt,Tt,_t)}),Ze.rejection=be||He(Ze)?bt:tt,kt.error))throw kt.value})},He=function(Ze){return Ze.rejection!==tt&&!Ze.parent},De=function(Ze){ye(pe,Ce,function(){var Tt=Ze.facade;be?Mt.emit("rejectionHandled",Tt):Ue(At,Tt,Ze.value)})},Le=function(Ze,Tt,_t){return function(Qt){Ze(Tt,Qt,_t)}},Ve=function(Ze,Tt,_t){Ze.done||(Ze.done=!0,_t&&(Ze=_t),Ze.value=Tt,Ze.state=gt,We(Ze,!0))},dt=function(Ze,Tt,_t){if(!Ze.done){Ze.done=!0,_t&&(Ze=_t);try{if(Ze.facade===Tt)throw xt("Promise can't be resolved itself");var Qt=lt(Tt);Qt?Ee(function(){var kt={done:!1};try{ye(Qt,Tt,Le(dt,kt,Ze),Le(Ve,kt,Ze))}catch(Nt){Ve(kt,Nt,Ze)}}):(Ze.value=Tt,Ze.state=Ct,We(Ze,!1))}catch(kt){Ve({done:!1},kt,Ze)}}};if(ze&&(et=function(Tt){le(this,it),ee(Tt),ye(Ke,this);var _t=ht(this);try{Tt(Le(dt,_t),Le(Ve,_t))}catch(Qt){Ve(_t,Qt)}},it=et.prototype,Ke=function(Tt){ft(this,{type:Ye,done:!1,notified:!1,parent:!1,reactions:new ke,rejection:!1,state:Kt,value:void 0})},Ke.prototype=me(it,{then:function(Tt,_t){var Qt=ht(this),kt=mt(ue(this,et));return Qt.parent=!0,kt.ok=ae(Tt)?Tt:!0,kt.fail=ae(_t)&&_t,kt.domain=be?Mt.domain:void 0,Qt.state==Kt?Qt.reactions.add(kt):Ee(function(){Qe(kt,Qt)}),kt.promise}}),ut=function(){var Ze=new Ke,Tt=ht(Ze);this.promise=Ze,this.resolve=Le(dt,Tt),this.reject=Le(Ve,Tt)},_e.f=mt=function(Ze){return Ze===et||Ze===wt?new ut(Ze):pt(Ze)},!ce&&ae(Oe)&&Lt!==Object.prototype)){yt=Lt.then,st||we(Lt,"then",function(Tt,_t){var Qt=this;return new et(function(kt,Nt){ye(yt,Qt,kt,Nt)}).then(Tt,_t)},{unsafe:!0});try{delete Lt.constructor}catch(Ze){}xe&&xe(Lt,it)}ve({global:!0,wrap:!0,forced:ze},{Promise:et}),fe(et,Ye,!1,!0),z(Ye)},{"../internals/a-callable":95,"../internals/an-instance":100,"../internals/engine-is-node":143,"../internals/export":149,"../internals/function-call":155,"../internals/global":163,"../internals/host-report-errors":166,"../internals/internal-state":173,"../internals/is-callable":176,"../internals/is-object":180,"../internals/is-pure":181,"../internals/microtask":189,"../internals/new-promise-capability":193,"../internals/object-set-prototype-of":208,"../internals/perform":214,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/queue":220,"../internals/redefine":222,"../internals/redefine-all":221,"../internals/set-species":233,"../internals/set-to-string-tag":234,"../internals/species-constructor":238,"../internals/task":243}],295:[function(ie,Re,je){ie("../modules/es.promise.constructor"),ie("../modules/es.promise.all"),ie("../modules/es.promise.catch"),ie("../modules/es.promise.race"),ie("../modules/es.promise.reject"),ie("../modules/es.promise.resolve")},{"../modules/es.promise.all":292,"../modules/es.promise.catch":293,"../modules/es.promise.constructor":294,"../modules/es.promise.race":296,"../modules/es.promise.reject":297,"../modules/es.promise.resolve":298}],296:[function(ie,Re,je){"use strict";var ve=ie("../internals/export"),ce=ie("../internals/function-call"),be=ie("../internals/a-callable"),Ce=ie("../internals/new-promise-capability"),ye=ie("../internals/perform"),we=ie("../internals/iterate"),me=ie("../internals/promise-statics-incorrect-iteration");ve({target:"Promise",stat:!0,forced:me},{race:function(fe){var z=this,ee=Ce.f(z),ae=ee.reject,re=ye(function(){var le=be(z.resolve);we(fe,function(ue){ce(le,z,ue).then(ee.resolve,ae)})});return re.error&&ae(re.value),ee.promise}})},{"../internals/a-callable":95,"../internals/export":149,"../internals/function-call":155,"../internals/iterate":184,"../internals/new-promise-capability":193,"../internals/perform":214,"../internals/promise-statics-incorrect-iteration":218}],297:[function(ie,Re,je){"use strict";var ve=ie("../internals/export"),ce=ie("../internals/function-call"),be=ie("../internals/new-promise-capability"),Ce=ie("../internals/promise-constructor-detection").CONSTRUCTOR;ve({target:"Promise",stat:!0,forced:Ce},{reject:function(we){var me=be.f(this);return ce(me.reject,void 0,we),me.promise}})},{"../internals/export":149,"../internals/function-call":155,"../internals/new-promise-capability":193,"../internals/promise-constructor-detection":215}],298:[function(ie,Re,je){"use strict";var ve=ie("../internals/export"),ce=ie("../internals/get-built-in"),be=ie("../internals/is-pure"),Ce=ie("../internals/promise-native-constructor"),ye=ie("../internals/promise-constructor-detection").CONSTRUCTOR,we=ie("../internals/promise-resolve"),me=ce("Promise"),xe=be&&!ye;ve({target:"Promise",stat:!0,forced:be||ye},{resolve:function(z){return we(xe&&this===me?Ce:this,z)}})},{"../internals/export":149,"../internals/get-built-in":158,"../internals/is-pure":181,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/promise-resolve":217}],299:[function(ie,Re,je){var ve=ie("../internals/descriptors"),ce=ie("../internals/global"),be=ie("../internals/function-uncurry-this"),Ce=ie("../internals/is-forced"),ye=ie("../internals/inherit-if-required"),we=ie("../internals/create-non-enumerable-property"),me=ie("../internals/object-get-own-property-names").f,xe=ie("../internals/object-is-prototype-of"),fe=ie("../internals/is-regexp"),z=ie("../internals/to-string"),ee=ie("../internals/regexp-get-flags"),ae=ie("../internals/regexp-sticky-helpers"),re=ie("../internals/proxy-accessor"),le=ie("../internals/redefine"),ue=ie("../internals/fails"),pe=ie("../internals/has-own-property"),Ee=ie("../internals/internal-state").enforce,Pe=ie("../internals/set-species"),Ie=ie("../internals/well-known-symbol"),ke=ie("../internals/regexp-unsupported-dot-all"),Ae=ie("../internals/regexp-unsupported-ncg"),Oe=Ie("match"),Fe=ce.RegExp,_e=Fe.prototype,Ye=ce.SyntaxError,ze=be(_e.exec),Xe=be("".charAt),st=be("".replace),ht=be("".indexOf),ft=be("".slice),Lt=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,et=/a/g,it=/a/g,xt=new Fe(et)!==et,Et=ae.MISSED_STICKY,Mt=ae.UNSUPPORTED_Y,mt=ve&&(!xt||Et||ke||Ae||ue(function(){return it[Oe]=!1,Fe(et)!=et||Fe(it)==it||Fe(et,"i")!="/a/i"})),pt=function(Ct){for(var gt=Ct.length,tt=0,bt="",Ke=!1,ut;tt<=gt;tt++){if(ut=Xe(Ct,tt),ut==="\\"){bt+=ut+Xe(Ct,++tt);continue}!Ke&&ut==="."?bt+="[\\s\\S]":(ut==="["?Ke=!0:ut==="]"&&(Ke=!1),bt+=ut)}return bt},vt=function(Ct){for(var gt=Ct.length,tt=0,bt="",Ke=[],ut={},wt=!1,yt=!1,lt=0,Qe="",We;tt<=gt;tt++){if(We=Xe(Ct,tt),We==="\\")We=We+Xe(Ct,++tt);else if(We==="]")wt=!1;else if(!wt)switch(!0){case We==="[":wt=!0;break;case We==="(":ze(Lt,ft(Ct,tt+1))&&(tt+=2,yt=!0),bt+=We,lt++;continue;case(We===">"&&yt):if(Qe===""||pe(ut,Qe))throw new Ye("Invalid capture group name");ut[Qe]=!0,Ke[Ke.length]=[Qe,lt],yt=!1,Qe="";continue}yt?Qe+=We:bt+=We}return[bt,Ke]};if(Ce("RegExp",mt)){for(var jt=function(gt,tt){var bt=xe(_e,this),Ke=fe(gt),ut=tt===void 0,wt=[],yt=gt,lt,Qe,We,Ue,qe,He;if(!bt&&Ke&&ut&&gt.constructor===jt)return gt;if((Ke||xe(_e,gt))&&(gt=gt.source,ut&&(tt=ee(yt))),gt=gt===void 0?"":z(gt),tt=tt===void 0?"":z(tt),yt=gt,ke&&"dotAll"in et&&(Qe=!!tt&&ht(tt,"s")>-1,Qe&&(tt=st(tt,/s/g,""))),lt=tt,Et&&"sticky"in et&&(We=!!tt&&ht(tt,"y")>-1,We&&Mt&&(tt=st(tt,/y/g,""))),Ae&&(Ue=vt(gt),gt=Ue[0],wt=Ue[1]),qe=ye(Fe(gt,tt),bt?this:_e,jt),(Qe||We||wt.length)&&(He=Ee(qe),Qe&&(He.dotAll=!0,He.raw=jt(pt(gt),lt)),We&&(He.sticky=!0),wt.length&&(He.groups=wt)),gt!==yt)try{we(qe,"source",yt===""?"(?:)":yt)}catch(De){}return qe},At=me(Fe),Kt=0;At.length>Kt;)re(jt,Fe,At[Kt++]);_e.constructor=jt,jt.prototype=_e,le(ce,"RegExp",jt)}Pe("RegExp")},{"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/internal-state":173,"../internals/is-forced":178,"../internals/is-regexp":182,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/proxy-accessor":219,"../internals/redefine":222,"../internals/regexp-get-flags":226,"../internals/regexp-sticky-helpers":227,"../internals/regexp-unsupported-dot-all":228,"../internals/regexp-unsupported-ncg":229,"../internals/set-species":233,"../internals/to-string":256,"../internals/well-known-symbol":268}],300:[function(ie,Re,je){"use strict";var ve=ie("../internals/export"),ce=ie("../internals/regexp-exec");ve({target:"RegExp",proto:!0,forced:/./.exec!==ce},{exec:ce})},{"../internals/export":149,"../internals/regexp-exec":224}],301:[function(ie,Re,je){"use strict";var ve=ie("../internals/function-name").PROPER,ce=ie("../internals/redefine"),be=ie("../internals/an-object"),Ce=ie("../internals/to-string"),ye=ie("../internals/fails"),we=ie("../internals/regexp-get-flags"),me="toString",xe=RegExp.prototype,fe=xe[me],z=ye(function(){return fe.call({source:"a",flags:"b"})!="/a/b"}),ee=ve&&fe.name!=me;(z||ee)&&ce(RegExp.prototype,me,function(){var re=be(this),le=Ce(re.source),ue=Ce(we(re));return"/"+le+"/"+ue},{unsafe:!0})},{"../internals/an-object":101,"../internals/fails":150,"../internals/function-name":156,"../internals/redefine":222,"../internals/regexp-get-flags":226,"../internals/to-string":256}],302:[function(ie,Re,je){"use strict";var ve=ie("../internals/export"),ce=ie("../internals/function-uncurry-this"),be=ie("../internals/not-a-regexp"),Ce=ie("../internals/require-object-coercible"),ye=ie("../internals/to-string"),we=ie("../internals/correct-is-regexp-logic"),me=ce("".indexOf);ve({target:"String",proto:!0,forced:!we("includes")},{includes:function(fe){return!!~me(ye(Ce(this)),ye(be(fe)),arguments.length>1?arguments[1]:void 0)}})},{"../internals/correct-is-regexp-logic":126,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/not-a-regexp":194,"../internals/require-object-coercible":230,"../internals/to-string":256}],303:[function(ie,Re,je){"use strict";var ve=ie("../internals/string-multibyte").charAt,ce=ie("../internals/to-string"),be=ie("../internals/internal-state"),Ce=ie("../internals/define-iterator"),ye="String Iterator",we=be.set,me=be.getterFor(ye);Ce(String,"String",function(xe){we(this,{type:ye,string:ce(xe),index:0})},function(){var fe=me(this),z=fe.string,ee=fe.index,ae;return ee>=z.length?{value:void 0,done:!0}:(ae=ve(z,ee),fe.index+=ae.length,{value:ae,done:!1})})},{"../internals/define-iterator":132,"../internals/internal-state":173,"../internals/string-multibyte":239,"../internals/to-string":256}],304:[function(ie,Re,je){"use strict";var ve=ie("../internals/function-call"),ce=ie("../internals/fix-regexp-well-known-symbol-logic"),be=ie("../internals/an-object"),Ce=ie("../internals/to-length"),ye=ie("../internals/to-string"),we=ie("../internals/require-object-coercible"),me=ie("../internals/get-method"),xe=ie("../internals/advance-string-index"),fe=ie("../internals/regexp-exec-abstract");ce("match",function(z,ee,ae){return[function(le){var ue=we(this),pe=le==null?void 0:me(le,z);return pe?ve(pe,le,ue):new RegExp(le)[z](ye(ue))},function(re){var le=be(this),ue=ye(re),pe=ae(ee,le,ue);if(pe.done)return pe.value;if(!le.global)return fe(le,ue);var Ee=le.unicode;le.lastIndex=0;for(var Pe=[],Ie=0,ke;(ke=fe(le,ue))!==null;){var Ae=ye(ke[0]);Pe[Ie]=Ae,Ae===""&&(le.lastIndex=xe(ue,Ce(le.lastIndex),Ee)),Ie++}return Ie===0?null:Pe}]})},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-call":155,"../internals/get-method":161,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/to-length":249,"../internals/to-string":256}],305:[function(ie,Re,je){"use strict";var ve=ie("../internals/function-apply"),ce=ie("../internals/function-call"),be=ie("../internals/function-uncurry-this"),Ce=ie("../internals/fix-regexp-well-known-symbol-logic"),ye=ie("../internals/fails"),we=ie("../internals/an-object"),me=ie("../internals/is-callable"),xe=ie("../internals/to-integer-or-infinity"),fe=ie("../internals/to-length"),z=ie("../internals/to-string"),ee=ie("../internals/require-object-coercible"),ae=ie("../internals/advance-string-index"),re=ie("../internals/get-method"),le=ie("../internals/get-substitution"),ue=ie("../internals/regexp-exec-abstract"),pe=ie("../internals/well-known-symbol"),Ee=pe("replace"),Pe=Math.max,Ie=Math.min,ke=be([].concat),Ae=be([].push),Oe=be("".indexOf),Fe=be("".slice),_e=function(st){return st===void 0?st:String(st)},Ye=function(){return"a".replace(/./,"$0")==="$0"}(),ze=function(){return/./[Ee]?/./[Ee]("a","$0")==="":!1}(),Xe=!ye(function(){var st=/./;return st.exec=function(){var ht=[];return ht.groups={a:"7"},ht},"".replace(st,"$<a>")!=="7"});Ce("replace",function(st,ht,ft){var Lt=ze?"$":"$0";return[function(it,xt){var Et=ee(this),Mt=it==null?void 0:re(it,Ee);return Mt?ce(Mt,it,Et,xt):ce(ht,z(Et),it,xt)},function(et,it){var xt=we(this),Et=z(et);if(typeof it=="string"&&Oe(it,Lt)===-1&&Oe(it,"$<")===-1){var Mt=ft(ht,xt,Et,it);if(Mt.done)return Mt.value}var mt=me(it);mt||(it=z(it));var pt=xt.global;if(pt){var vt=xt.unicode;xt.lastIndex=0}for(var jt=[];;){var At=ue(xt,Et);if(At===null||(Ae(jt,At),!pt))break;var Kt=z(At[0]);Kt===""&&(xt.lastIndex=ae(Et,fe(xt.lastIndex),vt))}for(var Ct="",gt=0,tt=0;tt<jt.length;tt++){At=jt[tt];for(var bt=z(At[0]),Ke=Pe(Ie(xe(At.index),Et.length),0),ut=[],wt=1;wt<At.length;wt++)Ae(ut,_e(At[wt]));var yt=At.groups;if(mt){var lt=ke([bt],ut,Ke,Et);yt!==void 0&&Ae(lt,yt);var Qe=z(ve(it,void 0,lt))}else Qe=le(bt,Et,Ke,ut,yt,it);Ke>=gt&&(Ct+=Fe(Et,gt,Ke)+Qe,gt=Ke+bt.length)}return Ct+Fe(Et,gt)}]},!Xe||!Ye||ze)},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/fails":150,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-method":161,"../internals/get-substitution":162,"../internals/is-callable":176,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/to-integer-or-infinity":248,"../internals/to-length":249,"../internals/to-string":256,"../internals/well-known-symbol":268}],306:[function(ie,Re,je){"use strict";var ve=ie("../internals/function-call"),ce=ie("../internals/fix-regexp-well-known-symbol-logic"),be=ie("../internals/an-object"),Ce=ie("../internals/require-object-coercible"),ye=ie("../internals/same-value"),we=ie("../internals/to-string"),me=ie("../internals/get-method"),xe=ie("../internals/regexp-exec-abstract");ce("search",function(fe,z,ee){return[function(re){var le=Ce(this),ue=re==null?void 0:me(re,fe);return ue?ve(ue,re,le):new RegExp(re)[fe](we(le))},function(ae){var re=be(this),le=we(ae),ue=ee(z,re,le);if(ue.done)return ue.value;var pe=re.lastIndex;ye(pe,0)||(re.lastIndex=0);var Ee=xe(re,le);return ye(re.lastIndex,pe)||(re.lastIndex=pe),Ee===null?-1:Ee.index}]})},{"../internals/an-object":101,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-call":155,"../internals/get-method":161,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/same-value":231,"../internals/to-string":256}],307:[function(ie,Re,je){"use strict";var ve=ie("../internals/function-apply"),ce=ie("../internals/function-call"),be=ie("../internals/function-uncurry-this"),Ce=ie("../internals/fix-regexp-well-known-symbol-logic"),ye=ie("../internals/is-regexp"),we=ie("../internals/an-object"),me=ie("../internals/require-object-coercible"),xe=ie("../internals/species-constructor"),fe=ie("../internals/advance-string-index"),z=ie("../internals/to-length"),ee=ie("../internals/to-string"),ae=ie("../internals/get-method"),re=ie("../internals/array-slice-simple"),le=ie("../internals/regexp-exec-abstract"),ue=ie("../internals/regexp-exec"),pe=ie("../internals/regexp-sticky-helpers"),Ee=ie("../internals/fails"),Pe=pe.UNSUPPORTED_Y,Ie=4294967295,ke=Math.min,Ae=[].push,Oe=be(/./.exec),Fe=be(Ae),_e=be("".slice),Ye=!Ee(function(){var ze=/(?:)/,Xe=ze.exec;ze.exec=function(){return Xe.apply(this,arguments)};var st="ab".split(ze);return st.length!==2||st[0]!=="a"||st[1]!=="b"});Ce("split",function(ze,Xe,st){var ht;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?ht=function(ft,Lt){var et=ee(me(this)),it=Lt===void 0?Ie:Lt>>>0;if(it===0)return[];if(ft===void 0)return[et];if(!ye(ft))return ce(Xe,et,ft,it);for(var xt=[],Et=(ft.ignoreCase?"i":"")+(ft.multiline?"m":"")+(ft.unicode?"u":"")+(ft.sticky?"y":""),Mt=0,mt=new RegExp(ft.source,Et+"g"),pt,vt,jt;(pt=ce(ue,mt,et))&&(vt=mt.lastIndex,!(vt>Mt&&(Fe(xt,_e(et,Mt,pt.index)),pt.length>1&&pt.index<et.length&&ve(Ae,xt,re(pt,1)),jt=pt[0].length,Mt=vt,xt.length>=it)));)mt.lastIndex===pt.index&&mt.lastIndex++;return Mt===et.length?(jt||!Oe(mt,""))&&Fe(xt,""):Fe(xt,_e(et,Mt)),xt.length>it?re(xt,0,it):xt}:"0".split(void 0,0).length?ht=function(ft,Lt){return ft===void 0&&Lt===0?[]:ce(Xe,this,ft,Lt)}:ht=Xe,[function(Lt,et){var it=me(this),xt=Lt==null?void 0:ae(Lt,ze);return xt?ce(xt,Lt,it,et):ce(ht,ee(it),Lt,et)},function(ft,Lt){var et=we(this),it=ee(ft),xt=st(ht,et,it,Lt,ht!==Xe);if(xt.done)return xt.value;var Et=xe(et,RegExp),Mt=et.unicode,mt=(et.ignoreCase?"i":"")+(et.multiline?"m":"")+(et.unicode?"u":"")+(Pe?"g":"y"),pt=new Et(Pe?"^(?:"+et.source+")":et,mt),vt=Lt===void 0?Ie:Lt>>>0;if(vt===0)return[];if(it.length===0)return le(pt,it)===null?[it]:[];for(var jt=0,At=0,Kt=[];At<it.length;){pt.lastIndex=Pe?0:At;var Ct=le(pt,Pe?_e(it,At):it),gt;if(Ct===null||(gt=ke(z(pt.lastIndex+(Pe?At:0)),it.length))===jt)At=fe(it,At,Mt);else{if(Fe(Kt,_e(it,jt,At)),Kt.length===vt)return Kt;for(var tt=1;tt<=Ct.length-1;tt++)if(Fe(Kt,Ct[tt]),Kt.length===vt)return Kt;At=jt=gt}}return Fe(Kt,_e(it,jt)),Kt}]},!Ye,Pe)},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/array-slice-simple":116,"../internals/fails":150,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-method":161,"../internals/is-regexp":182,"../internals/regexp-exec":224,"../internals/regexp-exec-abstract":223,"../internals/regexp-sticky-helpers":227,"../internals/require-object-coercible":230,"../internals/species-constructor":238,"../internals/to-length":249,"../internals/to-string":256}],308:[function(ie,Re,je){"use strict";var ve=ie("../internals/export"),ce=ie("../internals/string-trim").trim,be=ie("../internals/string-trim-forced");ve({target:"String",proto:!0,forced:be("trim")},{trim:function(){return ce(this)}})},{"../internals/export":149,"../internals/string-trim":241,"../internals/string-trim-forced":240}],309:[function(ie,Re,je){"use strict";var ve=ie("../internals/export"),ce=ie("../internals/global"),be=ie("../internals/function-call"),Ce=ie("../internals/function-uncurry-this"),ye=ie("../internals/is-pure"),we=ie("../internals/descriptors"),me=ie("../internals/native-symbol"),xe=ie("../internals/fails"),fe=ie("../internals/has-own-property"),z=ie("../internals/object-is-prototype-of"),ee=ie("../internals/an-object"),ae=ie("../internals/to-indexed-object"),re=ie("../internals/to-property-key"),le=ie("../internals/to-string"),ue=ie("../internals/create-property-descriptor"),pe=ie("../internals/object-create"),Ee=ie("../internals/object-keys"),Pe=ie("../internals/object-get-own-property-names"),Ie=ie("../internals/object-get-own-property-names-external"),ke=ie("../internals/object-get-own-property-symbols"),Ae=ie("../internals/object-get-own-property-descriptor"),Oe=ie("../internals/object-define-property"),Fe=ie("../internals/object-define-properties"),_e=ie("../internals/object-property-is-enumerable"),Ye=ie("../internals/redefine"),ze=ie("../internals/shared"),Xe=ie("../internals/shared-key"),st=ie("../internals/hidden-keys"),ht=ie("../internals/uid"),ft=ie("../internals/well-known-symbol"),Lt=ie("../internals/well-known-symbol-wrapped"),et=ie("../internals/define-well-known-symbol"),it=ie("../internals/symbol-define-to-primitive"),xt=ie("../internals/set-to-string-tag"),Et=ie("../internals/internal-state"),Mt=ie("../internals/array-iteration").forEach,mt=Xe("hidden"),pt="Symbol",vt="prototype",jt=Et.set,At=Et.getterFor(pt),Kt=Object[vt],Ct=ce.Symbol,gt=Ct&&Ct[vt],tt=ce.TypeError,bt=ce.QObject,Ke=Ae.f,ut=Oe.f,wt=Ie.f,yt=_e.f,lt=Ce([].push),Qe=ze("symbols"),We=ze("op-symbols"),Ue=ze("wks"),qe=!bt||!bt[vt]||!bt[vt].findChild,He=we&&xe(function(){return pe(ut({},"a",{get:function(){return ut(this,"a",{value:7}).a}})).a!=7})?function(kt,Nt,Zt){var on=Ke(Kt,Nt);on&&delete Kt[Nt],ut(kt,Nt,Zt),on&&kt!==Kt&&ut(Kt,Nt,on)}:ut,De=function(kt,Nt){var Zt=Qe[kt]=pe(gt);return jt(Zt,{type:pt,tag:kt,description:Nt}),we||(Zt.description=Nt),Zt},Le=function(Nt,Zt,on){Nt===Kt&&Le(We,Zt,on),ee(Nt);var vn=re(Zt);return ee(on),fe(Qe,vn)?(on.enumerable?(fe(Nt,mt)&&Nt[mt][vn]&&(Nt[mt][vn]=!1),on=pe(on,{enumerable:ue(0,!1)})):(fe(Nt,mt)||ut(Nt,mt,ue(1,{})),Nt[mt][vn]=!0),He(Nt,vn,on)):ut(Nt,vn,on)},Ve=function(Nt,Zt){ee(Nt);var on=ae(Zt),vn=Ee(on).concat(Qt(on));return Mt(vn,function(kn){(!we||be(Ze,on,kn))&&Le(Nt,kn,on[kn])}),Nt},dt=function(Nt,Zt){return Zt===void 0?pe(Nt):Ve(pe(Nt),Zt)},Ze=function(Nt){var Zt=re(Nt),on=be(yt,this,Zt);return this===Kt&&fe(Qe,Zt)&&!fe(We,Zt)?!1:on||!fe(this,Zt)||!fe(Qe,Zt)||fe(this,mt)&&this[mt][Zt]?on:!0},Tt=function(Nt,Zt){var on=ae(Nt),vn=re(Zt);if(!(on===Kt&&fe(Qe,vn)&&!fe(We,vn))){var kn=Ke(on,vn);return kn&&fe(Qe,vn)&&!(fe(on,mt)&&on[mt][vn])&&(kn.enumerable=!0),kn}},_t=function(Nt){var Zt=wt(ae(Nt)),on=[];return Mt(Zt,function(vn){!fe(Qe,vn)&&!fe(st,vn)&&lt(on,vn)}),on},Qt=function(kt){var Nt=kt===Kt,Zt=wt(Nt?We:ae(kt)),on=[];return Mt(Zt,function(vn){fe(Qe,vn)&&(!Nt||fe(Kt,vn))&&lt(on,Qe[vn])}),on};me||(Ct=function(){if(z(gt,this))throw tt("Symbol is not a constructor");var Nt=!arguments.length||arguments[0]===void 0?void 0:le(arguments[0]),Zt=ht(Nt),on=function(vn){this===Kt&&be(on,We,vn),fe(this,mt)&&fe(this[mt],Zt)&&(this[mt][Zt]=!1),He(this,Zt,ue(1,vn))};return we&&qe&&He(Kt,Zt,{configurable:!0,set:on}),De(Zt,Nt)},gt=Ct[vt],Ye(gt,"toString",function(){return At(this).tag}),Ye(Ct,"withoutSetter",function(kt){return De(ht(kt),kt)}),_e.f=Ze,Oe.f=Le,Fe.f=Ve,Ae.f=Tt,Pe.f=Ie.f=_t,ke.f=Qt,Lt.f=function(kt){return De(ft(kt),kt)},we&&(ut(gt,"description",{configurable:!0,get:function(){return At(this).description}}),ye||Ye(Kt,"propertyIsEnumerable",Ze,{unsafe:!0}))),ve({global:!0,wrap:!0,forced:!me,sham:!me},{Symbol:Ct}),Mt(Ee(Ue),function(kt){et(kt)}),ve({target:pt,stat:!0,forced:!me},{useSetter:function(){qe=!0},useSimple:function(){qe=!1}}),ve({target:"Object",stat:!0,forced:!me,sham:!we},{create:dt,defineProperty:Le,defineProperties:Ve,getOwnPropertyDescriptor:Tt}),ve({target:"Object",stat:!0,forced:!me},{getOwnPropertyNames:_t}),it(),xt(Ct,pt),st[mt]=!0},{"../internals/an-object":101,"../internals/array-iteration":111,"../internals/create-property-descriptor":130,"../internals/define-well-known-symbol":133,"../internals/descriptors":134,"../internals/export":149,"../internals/fails":150,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/internal-state":173,"../internals/is-pure":181,"../internals/native-symbol":191,"../internals/object-create":196,"../internals/object-define-properties":197,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-get-own-property-names-external":200,"../internals/object-get-own-property-symbols":202,"../internals/object-is-prototype-of":204,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/redefine":222,"../internals/set-to-string-tag":234,"../internals/shared":237,"../internals/shared-key":235,"../internals/symbol-define-to-primitive":242,"../internals/to-indexed-object":247,"../internals/to-property-key":254,"../internals/to-string":256,"../internals/uid":263,"../internals/well-known-symbol":268,"../internals/well-known-symbol-wrapped":267}],310:[function(ie,Re,je){"use strict";var ve=ie("../internals/export"),ce=ie("../internals/descriptors"),be=ie("../internals/global"),Ce=ie("../internals/function-uncurry-this"),ye=ie("../internals/has-own-property"),we=ie("../internals/is-callable"),me=ie("../internals/object-is-prototype-of"),xe=ie("../internals/to-string"),fe=ie("../internals/object-define-property").f,z=ie("../internals/copy-constructor-properties"),ee=be.Symbol,ae=ee&&ee.prototype;if(ce&&we(ee)&&(!("description"in ae)||ee().description!==void 0)){var re={},le=function(){var Oe=arguments.length<1||arguments[0]===void 0?void 0:xe(arguments[0]),Fe=me(ae,this)?new ee(Oe):Oe===void 0?ee():ee(Oe);return Oe===""&&(re[Fe]=!0),Fe};z(le,ee),le.prototype=ae,ae.constructor=le;var ue=String(ee("test"))=="Symbol(test)",pe=Ce(ae.toString),Ee=Ce(ae.valueOf),Pe=/^Symbol\((.*)\)[^)]+$/,Ie=Ce("".replace),ke=Ce("".slice);fe(ae,"description",{configurable:!0,get:function(){var Oe=Ee(this),Fe=pe(Oe);if(ye(re,Oe))return"";var _e=ue?ke(Fe,7,-1):Ie(Fe,Pe,"$1");return _e===""?void 0:_e}}),ve({global:!0,forced:!0},{Symbol:le})}},{"../internals/copy-constructor-properties":125,"../internals/descriptors":134,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/object-define-property":198,"../internals/object-is-prototype-of":204,"../internals/to-string":256}],311:[function(ie,Re,je){var ve=ie("../internals/export"),ce=ie("../internals/get-built-in"),be=ie("../internals/has-own-property"),Ce=ie("../internals/to-string"),ye=ie("../internals/shared"),we=ie("../internals/native-symbol-registry"),me=ye("string-to-symbol-registry"),xe=ye("symbol-to-string-registry");ve({target:"Symbol",stat:!0,forced:!we},{for:function(fe){var z=Ce(fe);if(be(me,z))return me[z];var ee=ce("Symbol")(z);return me[z]=ee,xe[ee]=z,ee}})},{"../internals/export":149,"../internals/get-built-in":158,"../internals/has-own-property":164,"../internals/native-symbol-registry":190,"../internals/shared":237,"../internals/to-string":256}],312:[function(ie,Re,je){var ve=ie("../internals/define-well-known-symbol");ve("iterator")},{"../internals/define-well-known-symbol":133}],313:[function(ie,Re,je){ie("../modules/es.symbol.constructor"),ie("../modules/es.symbol.for"),ie("../modules/es.symbol.key-for"),ie("../modules/es.json.stringify"),ie("../modules/es.object.get-own-property-symbols")},{"../modules/es.json.stringify":285,"../modules/es.object.get-own-property-symbols":289,"../modules/es.symbol.constructor":309,"../modules/es.symbol.for":311,"../modules/es.symbol.key-for":314}],314:[function(ie,Re,je){var ve=ie("../internals/export"),ce=ie("../internals/has-own-property"),be=ie("../internals/is-symbol"),Ce=ie("../internals/try-to-string"),ye=ie("../internals/shared"),we=ie("../internals/native-symbol-registry"),me=ye("symbol-to-string-registry");ve({target:"Symbol",stat:!0,forced:!we},{keyFor:function(fe){if(!be(fe))throw TypeError(Ce(fe)+" is not a symbol");if(ce(me,fe))return me[fe]}})},{"../internals/export":149,"../internals/has-own-property":164,"../internals/is-symbol":183,"../internals/native-symbol-registry":190,"../internals/shared":237,"../internals/try-to-string":257}],315:[function(ie,Re,je){"use strict";var ve=ie("../internals/function-uncurry-this"),ce=ie("../internals/array-buffer-view-core"),be=ie("../internals/array-copy-within"),Ce=ve(be),ye=ce.aTypedArray,we=ce.exportTypedArrayMethod;we("copyWithin",function(xe,fe){return Ce(ye(this),xe,fe,arguments.length>2?arguments[2]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-copy-within":105,"../internals/function-uncurry-this":157}],316:[function(ie,Re,je){"use strict";var ve=ie("../internals/array-buffer-view-core"),ce=ie("../internals/array-iteration").every,be=ve.aTypedArray,Ce=ve.exportTypedArrayMethod;Ce("every",function(we){return ce(be(this),we,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],317:[function(ie,Re,je){"use strict";var ve=ie("../internals/array-buffer-view-core"),ce=ie("../internals/function-call"),be=ie("../internals/array-fill"),Ce=ve.aTypedArray,ye=ve.exportTypedArrayMethod;ye("fill",function(me){var xe=arguments.length;return ce(be,Ce(this),me,xe>1?arguments[1]:void 0,xe>2?arguments[2]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-fill":106,"../internals/function-call":155}],318:[function(ie,Re,je){"use strict";var ve=ie("../internals/array-buffer-view-core"),ce=ie("../internals/array-iteration").filter,be=ie("../internals/typed-array-from-species-and-list"),Ce=ve.aTypedArray,ye=ve.exportTypedArrayMethod;ye("filter",function(me){var xe=ce(Ce(this),me,arguments.length>1?arguments[1]:void 0);return be(this,xe)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-from-species-and-list":260}],319:[function(ie,Re,je){"use strict";var ve=ie("../internals/array-buffer-view-core"),ce=ie("../internals/array-iteration").findIndex,be=ve.aTypedArray,Ce=ve.exportTypedArrayMethod;Ce("findIndex",function(we){return ce(be(this),we,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],320:[function(ie,Re,je){"use strict";var ve=ie("../internals/array-buffer-view-core"),ce=ie("../internals/array-iteration").find,be=ve.aTypedArray,Ce=ve.exportTypedArrayMethod;Ce("find",function(we){return ce(be(this),we,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],321:[function(ie,Re,je){"use strict";var ve=ie("../internals/array-buffer-view-core"),ce=ie("../internals/array-iteration").forEach,be=ve.aTypedArray,Ce=ve.exportTypedArrayMethod;Ce("forEach",function(we){ce(be(this),we,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],322:[function(ie,Re,je){"use strict";var ve=ie("../internals/array-buffer-view-core"),ce=ie("../internals/array-includes").includes,be=ve.aTypedArray,Ce=ve.exportTypedArrayMethod;Ce("includes",function(we){return ce(be(this),we,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],323:[function(ie,Re,je){"use strict";var ve=ie("../internals/array-buffer-view-core"),ce=ie("../internals/array-includes").indexOf,be=ve.aTypedArray,Ce=ve.exportTypedArrayMethod;Ce("indexOf",function(we){return ce(be(this),we,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],324:[function(ie,Re,je){"use strict";var ve=ie("../internals/global"),ce=ie("../internals/fails"),be=ie("../internals/function-uncurry-this"),Ce=ie("../internals/array-buffer-view-core"),ye=ie("../modules/es.array.iterator"),we=ie("../internals/well-known-symbol"),me=we("iterator"),xe=ve.Uint8Array,fe=be(ye.values),z=be(ye.keys),ee=be(ye.entries),ae=Ce.aTypedArray,re=Ce.exportTypedArrayMethod,le=xe&&xe.prototype,ue=!ce(function(){le[me].call([1])}),pe=!!le&&le.values&&le[me]===le.values&&le.values.name==="values",Ee=function(){return fe(ae(this))};re("entries",function(){return ee(ae(this))},ue),re("keys",function(){return z(ae(this))},ue),re("values",Ee,ue||!pe,{name:"values"}),re(me,Ee,ue||!pe,{name:"values"})},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/well-known-symbol":268,"../modules/es.array.iterator":278}],325:[function(ie,Re,je){"use strict";var ve=ie("../internals/array-buffer-view-core"),ce=ie("../internals/function-uncurry-this"),be=ve.aTypedArray,Ce=ve.exportTypedArrayMethod,ye=ce([].join);Ce("join",function(me){return ye(be(this),me)})},{"../internals/array-buffer-view-core":103,"../internals/function-uncurry-this":157}],326:[function(ie,Re,je){"use strict";var ve=ie("../internals/array-buffer-view-core"),ce=ie("../internals/function-apply"),be=ie("../internals/array-last-index-of"),Ce=ve.aTypedArray,ye=ve.exportTypedArrayMethod;ye("lastIndexOf",function(me){var xe=arguments.length;return ce(be,Ce(this),xe>1?[me,arguments[1]]:[me])})},{"../internals/array-buffer-view-core":103,"../internals/array-last-index-of":112,"../internals/function-apply":152}],327:[function(ie,Re,je){"use strict";var ve=ie("../internals/array-buffer-view-core"),ce=ie("../internals/array-iteration").map,be=ie("../internals/typed-array-species-constructor"),Ce=ve.aTypedArray,ye=ve.exportTypedArrayMethod;ye("map",function(me){return ce(Ce(this),me,arguments.length>1?arguments[1]:void 0,function(xe,fe){return new(be(xe))(fe)})})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-species-constructor":262}],328:[function(ie,Re,je){"use strict";var ve=ie("../internals/array-buffer-view-core"),ce=ie("../internals/array-reduce").right,be=ve.aTypedArray,Ce=ve.exportTypedArrayMethod;Ce("reduceRight",function(we){var me=arguments.length;return ce(be(this),we,me,me>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],329:[function(ie,Re,je){"use strict";var ve=ie("../internals/array-buffer-view-core"),ce=ie("../internals/array-reduce").left,be=ve.aTypedArray,Ce=ve.exportTypedArrayMethod;Ce("reduce",function(we){var me=arguments.length;return ce(be(this),we,me,me>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],330:[function(ie,Re,je){"use strict";var ve=ie("../internals/array-buffer-view-core"),ce=ve.aTypedArray,be=ve.exportTypedArrayMethod,Ce=Math.floor;be("reverse",function(){for(var we=this,me=ce(we).length,xe=Ce(me/2),fe=0,z;fe<xe;)z=we[fe],we[fe++]=we[--me],we[me]=z;return we})},{"../internals/array-buffer-view-core":103}],331:[function(ie,Re,je){"use strict";var ve=ie("../internals/global"),ce=ie("../internals/function-call"),be=ie("../internals/array-buffer-view-core"),Ce=ie("../internals/length-of-array-like"),ye=ie("../internals/to-offset"),we=ie("../internals/to-object"),me=ie("../internals/fails"),xe=ve.RangeError,fe=ve.Int8Array,z=fe&&fe.prototype,ee=z&&z.set,ae=be.aTypedArray,re=be.exportTypedArrayMethod,le=!me(function(){var pe=new Uint8ClampedArray(2);return ce(ee,pe,{length:1,0:3},1),pe[1]!==3}),ue=le&&be.NATIVE_ARRAY_BUFFER_VIEWS&&me(function(){var pe=new fe(2);return pe.set(1),pe.set("2",1),pe[0]!==0||pe[1]!==2});re("set",function(Ee){ae(this);var Pe=ye(arguments.length>1?arguments[1]:void 0,1),Ie=we(Ee);if(le)return ce(ee,this,Ie,Pe);var ke=this.length,Ae=Ce(Ie),Oe=0;if(Ae+Pe>ke)throw xe("Wrong length");for(;Oe<Ae;)this[Pe+Oe]=Ie[Oe++]},!le||ue)},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-call":155,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/to-offset":251}],332:[function(ie,Re,je){"use strict";var ve=ie("../internals/array-buffer-view-core"),ce=ie("../internals/typed-array-species-constructor"),be=ie("../internals/fails"),Ce=ie("../internals/array-slice"),ye=ve.aTypedArray,we=ve.exportTypedArrayMethod,me=be(function(){new Int8Array(1).slice()});we("slice",function(fe,z){for(var ee=Ce(ye(this),fe,z),ae=ce(this),re=0,le=ee.length,ue=new ae(le);le>re;)ue[re]=ee[re++];return ue},me)},{"../internals/array-buffer-view-core":103,"../internals/array-slice":117,"../internals/fails":150,"../internals/typed-array-species-constructor":262}],333:[function(ie,Re,je){"use strict";var ve=ie("../internals/array-buffer-view-core"),ce=ie("../internals/array-iteration").some,be=ve.aTypedArray,Ce=ve.exportTypedArrayMethod;Ce("some",function(we){return ce(be(this),we,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],334:[function(ie,Re,je){"use strict";var ve=ie("../internals/global"),ce=ie("../internals/function-uncurry-this"),be=ie("../internals/fails"),Ce=ie("../internals/a-callable"),ye=ie("../internals/array-sort"),we=ie("../internals/array-buffer-view-core"),me=ie("../internals/engine-ff-version"),xe=ie("../internals/engine-is-ie-or-edge"),fe=ie("../internals/engine-v8-version"),z=ie("../internals/engine-webkit-version"),ee=we.aTypedArray,ae=we.exportTypedArrayMethod,re=ve.Uint16Array,le=re&&ce(re.prototype.sort),ue=!!le&&!(be(function(){le(new re(2),null)})&&be(function(){le(new re(2),{})})),pe=!!le&&!be(function(){if(fe)return fe<74;if(me)return me<67;if(xe)return!0;if(z)return z<602;var Pe=new re(516),Ie=Array(516),ke,Ae;for(ke=0;ke<516;ke++)Ae=ke%4,Pe[ke]=515-ke,Ie[ke]=ke-2*Ae+3;for(le(Pe,function(Oe,Fe){return(Oe/4|0)-(Fe/4|0)}),ke=0;ke<516;ke++)if(Pe[ke]!==Ie[ke])return!0}),Ee=function(Pe){return function(Ie,ke){return Pe!==void 0?+Pe(Ie,ke)||0:ke!==ke?-1:Ie!==Ie?1:Ie===0&&ke===0?1/Ie>0&&1/ke<0?1:-1:Ie>ke}};ae("sort",function(Ie){return Ie!==void 0&&Ce(Ie),pe?le(this,Ie):ye(ee(this),Ee(Ie))},!pe||ue)},{"../internals/a-callable":95,"../internals/array-buffer-view-core":103,"../internals/array-sort":118,"../internals/engine-ff-version":138,"../internals/engine-is-ie-or-edge":140,"../internals/engine-v8-version":146,"../internals/engine-webkit-version":147,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],335:[function(ie,Re,je){"use strict";var ve=ie("../internals/array-buffer-view-core"),ce=ie("../internals/to-length"),be=ie("../internals/to-absolute-index"),Ce=ie("../internals/typed-array-species-constructor"),ye=ve.aTypedArray,we=ve.exportTypedArrayMethod;we("subarray",function(xe,fe){var z=ye(this),ee=z.length,ae=be(xe,ee),re=Ce(z);return new re(z.buffer,z.byteOffset+ae*z.BYTES_PER_ELEMENT,ce((fe===void 0?ee:be(fe,ee))-ae))})},{"../internals/array-buffer-view-core":103,"../internals/to-absolute-index":245,"../internals/to-length":249,"../internals/typed-array-species-constructor":262}],336:[function(ie,Re,je){"use strict";var ve=ie("../internals/global"),ce=ie("../internals/function-apply"),be=ie("../internals/array-buffer-view-core"),Ce=ie("../internals/fails"),ye=ie("../internals/array-slice"),we=ve.Int8Array,me=be.aTypedArray,xe=be.exportTypedArrayMethod,fe=[].toLocaleString,z=!!we&&Ce(function(){fe.call(new we(1))}),ee=Ce(function(){return[1,2].toLocaleString()!=new we([1,2]).toLocaleString()})||!Ce(function(){we.prototype.toLocaleString.call([1,2])});xe("toLocaleString",function(){return ce(fe,z?ye(me(this)):me(this),ye(arguments))},ee)},{"../internals/array-buffer-view-core":103,"../internals/array-slice":117,"../internals/fails":150,"../internals/function-apply":152,"../internals/global":163}],337:[function(ie,Re,je){"use strict";var ve=ie("../internals/array-buffer-view-core").exportTypedArrayMethod,ce=ie("../internals/fails"),be=ie("../internals/global"),Ce=ie("../internals/function-uncurry-this"),ye=be.Uint8Array,we=ye&&ye.prototype||{},me=[].toString,xe=Ce([].join);ce(function(){me.call({})})&&(me=function(){return xe(this)});var fe=we.toString!=me;ve("toString",me,fe)},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],338:[function(ie,Re,je){var ve=ie("../internals/typed-array-constructor");ve("Uint8",function(ce){return function(Ce,ye,we){return ce(this,Ce,ye,we)}})},{"../internals/typed-array-constructor":258}],339:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/dom-iterables"),be=ie("../internals/dom-token-list-prototype"),Ce=ie("../internals/array-for-each"),ye=ie("../internals/create-non-enumerable-property"),we=function(xe){if(xe&&xe.forEach!==Ce)try{ye(xe,"forEach",Ce)}catch(fe){xe.forEach=Ce}};for(var me in ce)ce[me]&&we(ve[me]&&ve[me].prototype);we(be)},{"../internals/array-for-each":107,"../internals/create-non-enumerable-property":129,"../internals/dom-iterables":136,"../internals/dom-token-list-prototype":137,"../internals/global":163}],340:[function(ie,Re,je){var ve=ie("../internals/global"),ce=ie("../internals/dom-iterables"),be=ie("../internals/dom-token-list-prototype"),Ce=ie("../modules/es.array.iterator"),ye=ie("../internals/create-non-enumerable-property"),we=ie("../internals/well-known-symbol"),me=we("iterator"),xe=we("toStringTag"),fe=Ce.values,z=function(ae,re){if(ae){if(ae[me]!==fe)try{ye(ae,me,fe)}catch(ue){ae[me]=fe}if(ae[xe]||ye(ae,xe,re),ce[re]){for(var le in Ce)if(ae[le]!==Ce[le])try{ye(ae,le,Ce[le])}catch(ue){ae[le]=Ce[le]}}}};for(var ee in ce)z(ve[ee]&&ve[ee].prototype,ee);z(be,"DOMTokenList")},{"../internals/create-non-enumerable-property":129,"../internals/dom-iterables":136,"../internals/dom-token-list-prototype":137,"../internals/global":163,"../internals/well-known-symbol":268,"../modules/es.array.iterator":278}],341:[function(ie,Re,je){function ve(pe){return Array.isArray?Array.isArray(pe):ue(pe)==="[object Array]"}je.isArray=ve;function ce(pe){return typeof pe=="boolean"}je.isBoolean=ce;function be(pe){return pe===null}je.isNull=be;function Ce(pe){return pe==null}je.isNullOrUndefined=Ce;function ye(pe){return typeof pe=="number"}je.isNumber=ye;function we(pe){return typeof pe=="string"}je.isString=we;function me(pe){return typeof pe=="symbol"}je.isSymbol=me;function xe(pe){return pe===void 0}je.isUndefined=xe;function fe(pe){return ue(pe)==="[object RegExp]"}je.isRegExp=fe;function z(pe){return typeof pe=="object"&&pe!==null}je.isObject=z;function ee(pe){return ue(pe)==="[object Date]"}je.isDate=ee;function ae(pe){return ue(pe)==="[object Error]"||pe instanceof Error}je.isError=ae;function re(pe){return typeof pe=="function"}je.isFunction=re;function le(pe){return pe===null||typeof pe=="boolean"||typeof pe=="number"||typeof pe=="string"||typeof pe=="symbol"||typeof pe=="undefined"}je.isPrimitive=le,je.isBuffer=ie("buffer").Buffer.isBuffer;function ue(pe){return Object.prototype.toString.call(pe)}},{buffer:90}],342:[function(ie,Re,je){(function(ve){"use strict";var ce=function(){var me=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,xe=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,fe=/[^-+\dA-Z]/g;return function(z,ee,ae,re){if(arguments.length===1&&we(z)==="string"&&!/\d/.test(z)&&(ee=z,z=void 0),z=z||new Date,z instanceof Date||(z=new Date(z)),isNaN(z))throw TypeError("Invalid date");ee=String(ce.masks[ee]||ee||ce.masks.default);var le=ee.slice(0,4);(le==="UTC:"||le==="GMT:")&&(ee=ee.slice(4),ae=!0,le==="GMT:"&&(re=!0));var ue=ae?"getUTC":"get",pe=z[ue+"Date"](),Ee=z[ue+"Day"](),Pe=z[ue+"Month"](),Ie=z[ue+"FullYear"](),ke=z[ue+"Hours"](),Ae=z[ue+"Minutes"](),Oe=z[ue+"Seconds"](),Fe=z[ue+"Milliseconds"](),_e=ae?0:z.getTimezoneOffset(),Ye=Ce(z),ze=ye(z),Xe={d:pe,dd:be(pe),ddd:ce.i18n.dayNames[Ee],dddd:ce.i18n.dayNames[Ee+7],m:Pe+1,mm:be(Pe+1),mmm:ce.i18n.monthNames[Pe],mmmm:ce.i18n.monthNames[Pe+12],yy:String(Ie).slice(2),yyyy:Ie,h:ke%12||12,hh:be(ke%12||12),H:ke,HH:be(ke),M:Ae,MM:be(Ae),s:Oe,ss:be(Oe),l:be(Fe,3),L:be(Math.round(Fe/10)),t:ke<12?"a":"p",tt:ke<12?"am":"pm",T:ke<12?"A":"P",TT:ke<12?"AM":"PM",Z:re?"GMT":ae?"UTC":(String(z).match(xe)||[""]).pop().replace(fe,""),o:(_e>0?"-":"+")+be(Math.floor(Math.abs(_e)/60)*100+Math.abs(_e)%60,4),S:["th","st","nd","rd"][pe%10>3?0:(pe%100-pe%10!=10)*pe%10],W:Ye,N:ze};return ee.replace(me,function(st){return st in Xe?Xe[st]:st.slice(1,st.length-1)})}}();ce.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"},ce.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"]};function be(me,xe){for(me=String(me),xe=xe||2;me.length<xe;)me="0"+me;return me}function Ce(me){var xe=new Date(me.getFullYear(),me.getMonth(),me.getDate());xe.setDate(xe.getDate()-(xe.getDay()+6)%7+3);var fe=new Date(xe.getFullYear(),0,4);fe.setDate(fe.getDate()-(fe.getDay()+6)%7+3);var z=xe.getTimezoneOffset()-fe.getTimezoneOffset();xe.setHours(xe.getHours()-z);var ee=(xe-fe)/(864e5*7);return 1+Math.floor(ee)}function ye(me){var xe=me.getDay();return xe===0&&(xe=7),xe}function we(me){return me===null?"null":me===void 0?"undefined":typeof me!="object"?typeof me:Array.isArray(me)?"array":{}.toString.call(me).slice(8,-1).toLowerCase()}typeof $e=="function"&&$e.amd?$e(function(){return ce}):typeof je=="object"?Re.exports=ce:ve.dateFormat=ce})(this)},{}],343:[function(ie,Re,je){"use strict";var ve=/["'&<>]/;Re.exports=ce;function ce(be){var Ce=""+be,ye=ve.exec(Ce);if(!ye)return Ce;var we,me="",xe=0,fe=0;for(xe=ye.index;xe<Ce.length;xe++){switch(Ce.charCodeAt(xe)){case 34:we="&quot;";break;case 38:we="&amp;";break;case 39:we="&#39;";break;case 60:we="&lt;";break;case 62:we="&gt;";break;default:continue}fe!==xe&&(me+=Ce.substring(fe,xe)),fe=xe+1,me+=we}return fe!==xe?me+Ce.substring(fe,xe):me}},{}],344:[function(ie,Re,je){"use strict";var ve=typeof Reflect=="object"?Reflect:null,ce=ve&&typeof ve.apply=="function"?ve.apply:function(Oe,Fe,_e){return Function.prototype.apply.call(Oe,Fe,_e)},be;ve&&typeof ve.ownKeys=="function"?be=ve.ownKeys:Object.getOwnPropertySymbols?be=function(Oe){return Object.getOwnPropertyNames(Oe).concat(Object.getOwnPropertySymbols(Oe))}:be=function(Oe){return Object.getOwnPropertyNames(Oe)};function Ce(Ae){console&&console.warn&&console.warn(Ae)}var ye=Number.isNaN||function(Oe){return Oe!==Oe};function we(){we.init.call(this)}Re.exports=we,Re.exports.once=Pe,we.EventEmitter=we,we.prototype._events=void 0,we.prototype._eventsCount=0,we.prototype._maxListeners=void 0;var me=10;function xe(Ae){if(typeof Ae!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof Ae)}Object.defineProperty(we,"defaultMaxListeners",{enumerable:!0,get:function(){return me},set:function(Ae){if(typeof Ae!="number"||Ae<0||ye(Ae))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+Ae+".");me=Ae}}),we.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},we.prototype.setMaxListeners=function(Oe){if(typeof Oe!="number"||Oe<0||ye(Oe))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+Oe+".");return this._maxListeners=Oe,this};function fe(Ae){return Ae._maxListeners===void 0?we.defaultMaxListeners:Ae._maxListeners}we.prototype.getMaxListeners=function(){return fe(this)},we.prototype.emit=function(Oe){for(var Fe=[],_e=1;_e<arguments.length;_e++)Fe.push(arguments[_e]);var Ye=Oe==="error",ze=this._events;if(ze!==void 0)Ye=Ye&&ze.error===void 0;else if(!Ye)return!1;if(Ye){var Xe;if(Fe.length>0&&(Xe=Fe[0]),Xe instanceof Error)throw Xe;var st=new Error("Unhandled error."+(Xe?" ("+Xe.message+")":""));throw st.context=Xe,st}var ht=ze[Oe];if(ht===void 0)return!1;if(typeof ht=="function")ce(ht,this,Fe);else for(var ft=ht.length,Lt=ue(ht,ft),_e=0;_e<ft;++_e)ce(Lt[_e],this,Fe);return!0};function z(Ae,Oe,Fe,_e){var Ye,ze,Xe;if(xe(Fe),ze=Ae._events,ze===void 0?(ze=Ae._events=Object.create(null),Ae._eventsCount=0):(ze.newListener!==void 0&&(Ae.emit("newListener",Oe,Fe.listener?Fe.listener:Fe),ze=Ae._events),Xe=ze[Oe]),Xe===void 0)Xe=ze[Oe]=Fe,++Ae._eventsCount;else if(typeof Xe=="function"?Xe=ze[Oe]=_e?[Fe,Xe]:[Xe,Fe]:_e?Xe.unshift(Fe):Xe.push(Fe),Ye=fe(Ae),Ye>0&&Xe.length>Ye&&!Xe.warned){Xe.warned=!0;var st=new Error("Possible EventEmitter memory leak detected. "+Xe.length+" "+String(Oe)+" listeners added. Use emitter.setMaxListeners() to increase limit");st.name="MaxListenersExceededWarning",st.emitter=Ae,st.type=Oe,st.count=Xe.length,Ce(st)}return Ae}we.prototype.addListener=function(Oe,Fe){return z(this,Oe,Fe,!1)},we.prototype.on=we.prototype.addListener,we.prototype.prependListener=function(Oe,Fe){return z(this,Oe,Fe,!0)};function ee(){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 ae(Ae,Oe,Fe){var _e={fired:!1,wrapFn:void 0,target:Ae,type:Oe,listener:Fe},Ye=ee.bind(_e);return Ye.listener=Fe,_e.wrapFn=Ye,Ye}we.prototype.once=function(Oe,Fe){return xe(Fe),this.on(Oe,ae(this,Oe,Fe)),this},we.prototype.prependOnceListener=function(Oe,Fe){return xe(Fe),this.prependListener(Oe,ae(this,Oe,Fe)),this},we.prototype.removeListener=function(Oe,Fe){var _e,Ye,ze,Xe,st;if(xe(Fe),Ye=this._events,Ye===void 0)return this;if(_e=Ye[Oe],_e===void 0)return this;if(_e===Fe||_e.listener===Fe)--this._eventsCount===0?this._events=Object.create(null):(delete Ye[Oe],Ye.removeListener&&this.emit("removeListener",Oe,_e.listener||Fe));else if(typeof _e!="function"){for(ze=-1,Xe=_e.length-1;Xe>=0;Xe--)if(_e[Xe]===Fe||_e[Xe].listener===Fe){st=_e[Xe].listener,ze=Xe;break}if(ze<0)return this;ze===0?_e.shift():pe(_e,ze),_e.length===1&&(Ye[Oe]=_e[0]),Ye.removeListener!==void 0&&this.emit("removeListener",Oe,st||Fe)}return this},we.prototype.off=we.prototype.removeListener,we.prototype.removeAllListeners=function(Oe){var Fe,_e,Ye;if(_e=this._events,_e===void 0)return this;if(_e.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):_e[Oe]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete _e[Oe]),this;if(arguments.length===0){var ze=Object.keys(_e),Xe;for(Ye=0;Ye<ze.length;++Ye)Xe=ze[Ye],Xe!=="removeListener"&&this.removeAllListeners(Xe);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(Fe=_e[Oe],typeof Fe=="function")this.removeListener(Oe,Fe);else if(Fe!==void 0)for(Ye=Fe.length-1;Ye>=0;Ye--)this.removeListener(Oe,Fe[Ye]);return this};function re(Ae,Oe,Fe){var _e=Ae._events;if(_e===void 0)return[];var Ye=_e[Oe];return Ye===void 0?[]:typeof Ye=="function"?Fe?[Ye.listener||Ye]:[Ye]:Fe?Ee(Ye):ue(Ye,Ye.length)}we.prototype.listeners=function(Oe){return re(this,Oe,!0)},we.prototype.rawListeners=function(Oe){return re(this,Oe,!1)},we.listenerCount=function(Ae,Oe){return typeof Ae.listenerCount=="function"?Ae.listenerCount(Oe):le.call(Ae,Oe)},we.prototype.listenerCount=le;function le(Ae){var Oe=this._events;if(Oe!==void 0){var Fe=Oe[Ae];if(typeof Fe=="function")return 1;if(Fe!==void 0)return Fe.length}return 0}we.prototype.eventNames=function(){return this._eventsCount>0?be(this._events):[]};function ue(Ae,Oe){for(var Fe=new Array(Oe),_e=0;_e<Oe;++_e)Fe[_e]=Ae[_e];return Fe}function pe(Ae,Oe){for(;Oe+1<Ae.length;Oe++)Ae[Oe]=Ae[Oe+1];Ae.pop()}function Ee(Ae){for(var Oe=new Array(Ae.length),Fe=0;Fe<Oe.length;++Fe)Oe[Fe]=Ae[Fe].listener||Ae[Fe];return Oe}function Pe(Ae,Oe){return new Promise(function(Fe,_e){function Ye(Xe){Ae.removeListener(Oe,ze),_e(Xe)}function ze(){typeof Ae.removeListener=="function"&&Ae.removeListener("error",Ye),Fe([].slice.call(arguments))}ke(Ae,Oe,ze,{once:!0}),Oe!=="error"&&Ie(Ae,Ye,{once:!0})})}function Ie(Ae,Oe,Fe){typeof Ae.on=="function"&&ke(Ae,"error",Oe,Fe)}function ke(Ae,Oe,Fe,_e){if(typeof Ae.on=="function")_e.once?Ae.once(Oe,Fe):Ae.on(Oe,Fe);else if(typeof Ae.addEventListener=="function")Ae.addEventListener(Oe,function Ye(ze){_e.once&&Ae.removeEventListener(Oe,Ye),Fe(ze)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof Ae)}},{}],345:[function(ie,Re,je){"use strict";var ve=ie("is-callable"),ce=Object.prototype.toString,be=Object.prototype.hasOwnProperty,Ce=function(fe,z,ee){for(var ae=0,re=fe.length;ae<re;ae++)be.call(fe,ae)&&(ee==null?z(fe[ae],ae,fe):z.call(ee,fe[ae],ae,fe))},ye=function(fe,z,ee){for(var ae=0,re=fe.length;ae<re;ae++)ee==null?z(fe.charAt(ae),ae,fe):z.call(ee,fe.charAt(ae),ae,fe)},we=function(fe,z,ee){for(var ae in fe)be.call(fe,ae)&&(ee==null?z(fe[ae],ae,fe):z.call(ee,fe[ae],ae,fe))},me=function(fe,z,ee){if(!ve(z))throw new TypeError("iterator must be a function");var ae;arguments.length>=3&&(ae=ee),ce.call(fe)==="[object Array]"?Ce(fe,z,ae):typeof fe=="string"?ye(fe,z,ae):we(fe,z,ae)};Re.exports=me},{"is-callable":367}],346:[function(ie,Re,je){"use strict";var ve="Function.prototype.bind called on incompatible ",ce=Array.prototype.slice,be=Object.prototype.toString,Ce="[object Function]";Re.exports=function(we){var me=this;if(typeof me!="function"||be.call(me)!==Ce)throw new TypeError(ve+me);for(var xe=ce.call(arguments,1),fe,z=function(){if(this instanceof fe){var ue=me.apply(this,xe.concat(ce.call(arguments)));return Object(ue)===ue?ue:this}else return me.apply(we,xe.concat(ce.call(arguments)))},ee=Math.max(0,me.length-xe.length),ae=[],re=0;re<ee;re++)ae.push("$"+re);if(fe=Function("binder","return function ("+ae.join(",")+"){ return binder.apply(this,arguments); }")(z),me.prototype){var le=function(){};le.prototype=me.prototype,fe.prototype=new le,le.prototype=null}return fe}},{}],347:[function(ie,Re,je){"use strict";var ve=ie("./implementation");Re.exports=Function.prototype.bind||ve},{"./implementation":346}],348:[function(ie,Re,je){"use strict";var ve,ce=SyntaxError,be=Function,Ce=TypeError,ye=function(ht){try{return be('"use strict"; return ('+ht+").constructor;")()}catch(ft){}},we=Object.getOwnPropertyDescriptor;if(we)try{we({},"")}catch(ht){we=null}var me=function(){throw new Ce},xe=we?function(){try{return arguments.callee,me}catch(ht){try{return we(arguments,"callee").get}catch(ft){return me}}}():me,fe=ie("has-symbols")(),z=ie("has-proto")(),ee=Object.getPrototypeOf||(z?function(ht){return ht.__proto__}:null),ae={},re=typeof Uint8Array=="undefined"||!ee?ve:ee(Uint8Array),le={"%AggregateError%":typeof AggregateError=="undefined"?ve:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?ve:ArrayBuffer,"%ArrayIteratorPrototype%":fe&&ee?ee([][Symbol.iterator]()):ve,"%AsyncFromSyncIteratorPrototype%":ve,"%AsyncFunction%":ae,"%AsyncGenerator%":ae,"%AsyncGeneratorFunction%":ae,"%AsyncIteratorPrototype%":ae,"%Atomics%":typeof Atomics=="undefined"?ve:Atomics,"%BigInt%":typeof BigInt=="undefined"?ve:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?ve:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?ve:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?ve:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array=="undefined"?ve:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?ve:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?ve:FinalizationRegistry,"%Function%":be,"%GeneratorFunction%":ae,"%Int8Array%":typeof Int8Array=="undefined"?ve:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?ve:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?ve:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":fe&&ee?ee(ee([][Symbol.iterator]())):ve,"%JSON%":typeof JSON=="object"?JSON:ve,"%Map%":typeof Map=="undefined"?ve:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!fe||!ee?ve:ee(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?ve:Promise,"%Proxy%":typeof Proxy=="undefined"?ve:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect=="undefined"?ve:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?ve:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!fe||!ee?ve:ee(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?ve:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":fe&&ee?ee(""[Symbol.iterator]()):ve,"%Symbol%":fe?Symbol:ve,"%SyntaxError%":ce,"%ThrowTypeError%":xe,"%TypedArray%":re,"%TypeError%":Ce,"%Uint8Array%":typeof Uint8Array=="undefined"?ve:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?ve:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?ve:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?ve:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap=="undefined"?ve:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?ve:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?ve:WeakSet};if(ee)try{null.error}catch(ht){var ue=ee(ee(ht));le["%Error.prototype%"]=ue}var pe=function ht(ft){var Lt;if(ft==="%AsyncFunction%")Lt=ye("async function () {}");else if(ft==="%GeneratorFunction%")Lt=ye("function* () {}");else if(ft==="%AsyncGeneratorFunction%")Lt=ye("async function* () {}");else if(ft==="%AsyncGenerator%"){var et=ht("%AsyncGeneratorFunction%");et&&(Lt=et.prototype)}else if(ft==="%AsyncIteratorPrototype%"){var it=ht("%AsyncGenerator%");it&&ee&&(Lt=ee(it.prototype))}return le[ft]=Lt,Lt},Ee={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Pe=ie("function-bind"),Ie=ie("has"),ke=Pe.call(Function.call,Array.prototype.concat),Ae=Pe.call(Function.apply,Array.prototype.splice),Oe=Pe.call(Function.call,String.prototype.replace),Fe=Pe.call(Function.call,String.prototype.slice),_e=Pe.call(Function.call,RegExp.prototype.exec),Ye=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ze=/\\(\\)?/g,Xe=function(ft){var Lt=Fe(ft,0,1),et=Fe(ft,-1);if(Lt==="%"&&et!=="%")throw new ce("invalid intrinsic syntax, expected closing `%`");if(et==="%"&&Lt!=="%")throw new ce("invalid intrinsic syntax, expected opening `%`");var it=[];return Oe(ft,Ye,function(xt,Et,Mt,mt){it[it.length]=Mt?Oe(mt,ze,"$1"):Et||xt}),it},st=function(ft,Lt){var et=ft,it;if(Ie(Ee,et)&&(it=Ee[et],et="%"+it[0]+"%"),Ie(le,et)){var xt=le[et];if(xt===ae&&(xt=pe(et)),typeof xt=="undefined"&&!Lt)throw new Ce("intrinsic "+ft+" exists, but is not available. Please file an issue!");return{alias:it,name:et,value:xt}}throw new ce("intrinsic "+ft+" does not exist!")};Re.exports=function(ft,Lt){if(typeof ft!="string"||ft.length===0)throw new Ce("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Lt!="boolean")throw new Ce('"allowMissing" argument must be a boolean');if(_e(/^%?[^%]*%?$/,ft)===null)throw new ce("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var et=Xe(ft),it=et.length>0?et[0]:"",xt=st("%"+it+"%",Lt),Et=xt.name,Mt=xt.value,mt=!1,pt=xt.alias;pt&&(it=pt[0],Ae(et,ke([0,1],pt)));for(var vt=1,jt=!0;vt<et.length;vt+=1){var At=et[vt],Kt=Fe(At,0,1),Ct=Fe(At,-1);if((Kt==='"'||Kt==="'"||Kt==="`"||Ct==='"'||Ct==="'"||Ct==="`")&&Kt!==Ct)throw new ce("property names with quotes must have matching quotes");if((At==="constructor"||!jt)&&(mt=!0),it+="."+At,Et="%"+it+"%",Ie(le,Et))Mt=le[Et];else if(Mt!=null){if(!(At in Mt)){if(!Lt)throw new Ce("base intrinsic for "+ft+" exists, but the property is not available.");return}if(we&&vt+1>=et.length){var gt=we(Mt,At);jt=!!gt,jt&&"get"in gt&&!("originalValue"in gt.get)?Mt=gt.get:Mt=Mt[At]}else jt=Ie(Mt,At),Mt=Mt[At];jt&&!mt&&(le[Et]=Mt)}}return Mt}},{"function-bind":347,has:354,"has-proto":350,"has-symbols":351}],349:[function(ie,Re,je){"use strict";var ve=ie("get-intrinsic"),ce=ve("%Object.getOwnPropertyDescriptor%",!0);if(ce)try{ce([],"length")}catch(be){ce=null}Re.exports=ce},{"get-intrinsic":348}],350:[function(ie,Re,je){"use strict";var ve={foo:{}},ce=Object;Re.exports=function(){return{__proto__:ve}.foo===ve.foo&&!({__proto__:null}instanceof ce)}},{}],351:[function(ie,Re,je){"use strict";var ve=typeof Symbol!="undefined"&&Symbol,ce=ie("./shams");Re.exports=function(){return typeof ve!="function"||typeof Symbol!="function"||typeof ve("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:ce()}},{"./shams":352}],352:[function(ie,Re,je){"use strict";Re.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var ce={},be=Symbol("test"),Ce=Object(be);if(typeof be=="string"||Object.prototype.toString.call(be)!=="[object Symbol]"||Object.prototype.toString.call(Ce)!=="[object Symbol]")return!1;var ye=42;ce[be]=ye;for(be in ce)return!1;if(typeof Object.keys=="function"&&Object.keys(ce).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(ce).length!==0)return!1;var we=Object.getOwnPropertySymbols(ce);if(we.length!==1||we[0]!==be||!Object.prototype.propertyIsEnumerable.call(ce,be))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var me=Object.getOwnPropertyDescriptor(ce,be);if(me.value!==ye||me.enumerable!==!0)return!1}return!0}},{}],353:[function(ie,Re,je){"use strict";var ve=ie("has-symbols/shams");Re.exports=function(){return ve()&&!!Symbol.toStringTag}},{"has-symbols/shams":352}],354:[function(ie,Re,je){"use strict";var ve=ie("function-bind");Re.exports=ve.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":347}],355:[function(ie,Re,je){var ve=ie("http"),ce=ie("url"),be=Re.exports;for(var Ce in ve)ve.hasOwnProperty(Ce)&&(be[Ce]=ve[Ce]);be.request=function(we,me){return we=ye(we),ve.request.call(this,we,me)},be.get=function(we,me){return we=ye(we),ve.get.call(this,we,me)};function ye(we){if(typeof we=="string"&&(we=ce.parse(we)),we.protocol||(we.protocol="https:"),we.protocol!=="https:")throw new Error('Protocol "'+we.protocol+'" not supported. Expected "https:"');return we}},{http:468,url:472}],356:[function(ie,Re,je){"use strict";var ve=ie("util"),ce=ie("ms");Re.exports=function(be){if(typeof be=="number")return be;var Ce=ce(be);if(Ce===void 0){var ye=new Error(ve.format("humanize-ms(%j) result undefined",be));console.warn(ye.stack)}return Ce}},{ms:376,util:419}],357:[function(ie,Re,je){je.read=function(ve,ce,be,Ce,ye){var we,me,xe=ye*8-Ce-1,fe=(1<<xe)-1,z=fe>>1,ee=-7,ae=be?ye-1:0,re=be?-1:1,le=ve[ce+ae];for(ae+=re,we=le&(1<<-ee)-1,le>>=-ee,ee+=xe;ee>0;we=we*256+ve[ce+ae],ae+=re,ee-=8);for(me=we&(1<<-ee)-1,we>>=-ee,ee+=Ce;ee>0;me=me*256+ve[ce+ae],ae+=re,ee-=8);if(we===0)we=1-z;else{if(we===fe)return me?NaN:(le?-1:1)*(1/0);me=me+Math.pow(2,Ce),we=we-z}return(le?-1:1)*me*Math.pow(2,we-Ce)},je.write=function(ve,ce,be,Ce,ye,we){var me,xe,fe,z=we*8-ye-1,ee=(1<<z)-1,ae=ee>>1,re=ye===23?Math.pow(2,-24)-Math.pow(2,-77):0,le=Ce?0:we-1,ue=Ce?1:-1,pe=ce<0||ce===0&&1/ce<0?1:0;for(ce=Math.abs(ce),isNaN(ce)||ce===1/0?(xe=isNaN(ce)?1:0,me=ee):(me=Math.floor(Math.log(ce)/Math.LN2),ce*(fe=Math.pow(2,-me))<1&&(me--,fe*=2),me+ae>=1?ce+=re/fe:ce+=re*Math.pow(2,1-ae),ce*fe>=2&&(me++,fe/=2),me+ae>=ee?(xe=0,me=ee):me+ae>=1?(xe=(ce*fe-1)*Math.pow(2,ye),me=me+ae):(xe=ce*Math.pow(2,ae-1)*Math.pow(2,ye),me=0));ye>=8;ve[be+le]=xe&255,le+=ue,xe/=256,ye-=8);for(me=me<<ye|xe,z+=ye;z>0;ve[be+le]=me&255,le+=ue,me/=256,z-=8);ve[be+le-ue]|=pe*128}},{}],358:[function(ie,Re,je){"use strict";var ve=[ie("./nextTick"),ie("./queueMicrotask"),ie("./mutation.js"),ie("./messageChannel"),ie("./stateChange"),ie("./timeout")],ce,be,Ce=-1,ye=[],we=!1;function me(){!ce||!be||(ce=!1,be.length?ye=be.concat(ye):Ce=-1,ye.length&&xe())}function xe(){if(!ce){we=!1,ce=!0;for(var le=ye.length,ue=setTimeout(me);le;){for(be=ye,ye=[];be&&++Ce<le;)be[Ce].run();Ce=-1,le=ye.length}be=null,Ce=-1,ce=!1,clearTimeout(ue)}}for(var fe,z=-1,ee=ve.length;++z<ee;)if(ve[z]&&ve[z].test&&ve[z].test()){fe=ve[z].install(xe);break}function ae(le,ue){this.fun=le,this.array=ue}ae.prototype.run=function(){var le=this.fun,ue=this.array;switch(ue.length){case 0:return le();case 1:return le(ue[0]);case 2:return le(ue[0],ue[1]);case 3:return le(ue[0],ue[1],ue[2]);default:return le.apply(null,ue)}},Re.exports=re;function re(le){var ue=new Array(arguments.length-1);if(arguments.length>1)for(var pe=1;pe<arguments.length;pe++)ue[pe-1]=arguments[pe];ye.push(new ae(le,ue)),!we&&!ce&&(we=!0,fe())}},{"./messageChannel":359,"./mutation.js":360,"./nextTick":89,"./queueMicrotask":361,"./stateChange":362,"./timeout":363}],359:[function(ie,Re,je){(function(ve){(function(){"use strict";je.test=function(){return ve.setImmediate?!1:typeof ve.MessageChannel!="undefined"},je.install=function(ce){var be=new ve.MessageChannel;return be.port1.onmessage=ce,function(){be.port2.postMessage(0)}}}).call(this)}).call(this,typeof ln!="undefined"?ln:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],360:[function(ie,Re,je){(function(ve){(function(){"use strict";var ce=ve.MutationObserver||ve.WebKitMutationObserver;je.test=function(){return ce},je.install=function(be){var Ce=0,ye=new ce(be),we=ve.document.createTextNode("");return ye.observe(we,{characterData:!0}),function(){we.data=Ce=++Ce%2}}}).call(this)}).call(this,typeof ln!="undefined"?ln:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],361:[function(ie,Re,je){(function(ve){(function(){"use strict";je.test=function(){return typeof ve.queueMicrotask=="function"},je.install=function(ce){return function(){ve.queueMicrotask(ce)}}}).call(this)}).call(this,typeof ln!="undefined"?ln:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],362:[function(ie,Re,je){(function(ve){(function(){"use strict";je.test=function(){return"document"in ve&&"onreadystatechange"in ve.document.createElement("script")},je.install=function(ce){return function(){var be=ve.document.createElement("script");return be.onreadystatechange=function(){ce(),be.onreadystatechange=null,be.parentNode.removeChild(be),be=null},ve.document.documentElement.appendChild(be),ce}}}).call(this)}).call(this,typeof ln!="undefined"?ln:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],363:[function(ie,Re,je){"use strict";je.test=function(){return!0},je.install=function(ve){return function(){setTimeout(ve,0)}}},{}],364:[function(ie,Re,je){typeof Object.create=="function"?Re.exports=function(ce,be){be&&(ce.super_=be,ce.prototype=Object.create(be.prototype,{constructor:{value:ce,enumerable:!1,writable:!0,configurable:!0}}))}:Re.exports=function(ce,be){if(be){ce.super_=be;var Ce=function(){};Ce.prototype=be.prototype,ce.prototype=new Ce,ce.prototype.constructor=ce}}},{}],365:[function(ie,Re,je){"use strict";var ve=ie("has-tostringtag/shams")(),ce=ie("call-bind/callBound"),be=ce("Object.prototype.toString"),Ce=function(xe){return ve&&xe&&typeof xe=="object"&&Symbol.toStringTag in xe?!1:be(xe)==="[object Arguments]"},ye=function(xe){return Ce(xe)?!0:xe!==null&&typeof xe=="object"&&typeof xe.length=="number"&&xe.length>=0&&be(xe)!=="[object Array]"&&be(xe.callee)==="[object Function]"},we=function(){return Ce(arguments)}();Ce.isLegacyArguments=ye,Re.exports=we?Ce:ye},{"call-bind/callBound":92,"has-tostringtag/shams":353}],366:[function(ie,Re,je){Re.exports=function(be){return be!=null&&(ve(be)||ce(be)||!!be._isBuffer)};function ve(be){return!!be.constructor&&typeof be.constructor.isBuffer=="function"&&be.constructor.isBuffer(be)}function ce(be){return typeof be.readFloatLE=="function"&&typeof be.slice=="function"&&ve(be.slice(0,0))}},{}],367:[function(ie,Re,je){"use strict";var ve=Function.prototype.toString,ce=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,be,Ce;if(typeof ce=="function"&&typeof Object.defineProperty=="function")try{be=Object.defineProperty({},"length",{get:function(){throw Ce}}),Ce={},ce(function(){throw 42},null,be)}catch(Ie){Ie!==Ce&&(ce=null)}else ce=null;var ye=/^\s*class\b/,we=function(ke){try{var Ae=ve.call(ke);return ye.test(Ae)}catch(Oe){return!1}},me=function(ke){try{return we(ke)?!1:(ve.call(ke),!0)}catch(Ae){return!1}},xe=Object.prototype.toString,fe="[object Object]",z="[object Function]",ee="[object GeneratorFunction]",ae="[object HTMLAllCollection]",re="[object HTML document.all class]",le="[object HTMLCollection]",ue=typeof Symbol=="function"&&!!Symbol.toStringTag,pe=!(0 in[,]),Ee=function(){return!1};if(typeof document=="object"){var Pe=document.all;xe.call(Pe)===xe.call(document.all)&&(Ee=function(ke){if((pe||!ke)&&(typeof ke=="undefined"||typeof ke=="object"))try{var Ae=xe.call(ke);return(Ae===ae||Ae===re||Ae===le||Ae===fe)&&ke("")==null}catch(Oe){}return!1})}Re.exports=ce?function(ke){if(Ee(ke))return!0;if(!ke||typeof ke!="function"&&typeof ke!="object")return!1;try{ce(ke,null,be)}catch(Ae){if(Ae!==Ce)return!1}return!we(ke)&&me(ke)}:function(ke){if(Ee(ke))return!0;if(!ke||typeof ke!="function"&&typeof ke!="object")return!1;if(ue)return me(ke);if(we(ke))return!1;var Ae=xe.call(ke);return Ae!==z&&Ae!==ee&&!/^\[object HTML/.test(Ae)?!1:me(ke)}},{}],368:[function(ie,Re,je){"use strict";var ve=Object.prototype.toString,ce=Function.prototype.toString,be=/^\s*(?:function)?\*/,Ce=ie("has-tostringtag/shams")(),ye=Object.getPrototypeOf,we=function(){if(!Ce)return!1;try{return Function("return function*() {}")()}catch(xe){}},me;Re.exports=function(fe){if(typeof fe!="function")return!1;if(be.test(ce.call(fe)))return!0;if(!Ce){var z=ve.call(fe);return z==="[object GeneratorFunction]"}if(!ye)return!1;if(typeof me=="undefined"){var ee=we();me=ee?ye(ee):!1}return ye(fe)===me}},{"has-tostringtag/shams":353}],369:[function(ie,Re,je){"use strict";var ve=ie("which-typed-array");Re.exports=function(be){return!!ve(be)}},{"which-typed-array":420}],370:[function(ie,Re,je){var ve={}.toString;Re.exports=Array.isArray||function(ce){return ve.call(ce)=="[object Array]"}},{}],371:[function(ie,Re,je){(function(ve){(function(){(function(ce,be){typeof je=="object"&&typeof Re!="undefined"?Re.exports=be(ce):typeof $e=="function"&&$e.amd?$e(be):be(ce)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof ve!="undefined"?ve:this,function(ce){"use strict";ce=ce||{};var be=ce.Base64,Ce="2.6.4",ye="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",we=function(ft){for(var Lt={},et=0,it=ft.length;et<it;et++)Lt[ft.charAt(et)]=et;return Lt}(ye),me=String.fromCharCode,xe=function(ft){if(ft.length<2){var Lt=ft.charCodeAt(0);return Lt<128?ft:Lt<2048?me(192|Lt>>>6)+me(128|Lt&63):me(224|Lt>>>12&15)+me(128|Lt>>>6&63)+me(128|Lt&63)}else{var Lt=65536+(ft.charCodeAt(0)-55296)*1024+(ft.charCodeAt(1)-56320);return me(240|Lt>>>18&7)+me(128|Lt>>>12&63)+me(128|Lt>>>6&63)+me(128|Lt&63)}},fe=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,z=function(ft){return ft.replace(fe,xe)},ee=function(ft){var Lt=[0,2,1][ft.length%3],et=ft.charCodeAt(0)<<16|(ft.length>1?ft.charCodeAt(1):0)<<8|(ft.length>2?ft.charCodeAt(2):0),it=[ye.charAt(et>>>18),ye.charAt(et>>>12&63),Lt>=2?"=":ye.charAt(et>>>6&63),Lt>=1?"=":ye.charAt(et&63)];return it.join("")},ae=ce.btoa&&typeof ce.btoa=="function"?function(ft){return ce.btoa(ft)}:function(ft){if(ft.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return ft.replace(/[\s\S]{1,3}/g,ee)},re=function(ft){return ae(z(String(ft)))},le=function(ft){return ft.replace(/[+\/]/g,function(Lt){return Lt=="+"?"-":"_"}).replace(/=/g,"")},ue=function(ft,Lt){return Lt?le(re(ft)):re(ft)},pe=function(ft){return ue(ft,!0)},Ee;ce.Uint8Array&&(Ee=function(ft,Lt){for(var et="",it=0,xt=ft.length;it<xt;it+=3){var Et=ft[it],Mt=ft[it+1],mt=ft[it+2],pt=Et<<16|Mt<<8|mt;et+=ye.charAt(pt>>>18)+ye.charAt(pt>>>12&63)+(typeof Mt!="undefined"?ye.charAt(pt>>>6&63):"=")+(typeof mt!="undefined"?ye.charAt(pt&63):"=")}return Lt?le(et):et});var Pe=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Ie=function(ft){switch(ft.length){case 4:var Lt=(7&ft.charCodeAt(0))<<18|(63&ft.charCodeAt(1))<<12|(63&ft.charCodeAt(2))<<6|63&ft.charCodeAt(3),et=Lt-65536;return me((et>>>10)+55296)+me((et&1023)+56320);case 3:return me((15&ft.charCodeAt(0))<<12|(63&ft.charCodeAt(1))<<6|63&ft.charCodeAt(2));default:return me((31&ft.charCodeAt(0))<<6|63&ft.charCodeAt(1))}},ke=function(ft){return ft.replace(Pe,Ie)},Ae=function(ft){var Lt=ft.length,et=Lt%4,it=(Lt>0?we[ft.charAt(0)]<<18:0)|(Lt>1?we[ft.charAt(1)]<<12:0)|(Lt>2?we[ft.charAt(2)]<<6:0)|(Lt>3?we[ft.charAt(3)]:0),xt=[me(it>>>16),me(it>>>8&255),me(it&255)];return xt.length-=[0,0,2,1][et],xt.join("")},Oe=ce.atob&&typeof ce.atob=="function"?function(ft){return ce.atob(ft)}:function(ft){return ft.replace(/\S{1,4}/g,Ae)},Fe=function(ft){return Oe(String(ft).replace(/[^A-Za-z0-9\+\/]/g,""))},_e=function(ft){return ke(Oe(ft))},Ye=function(ft){return String(ft).replace(/[-_]/g,function(Lt){return Lt=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},ze=function(ft){return _e(Ye(ft))},Xe;ce.Uint8Array&&(Xe=function(ft){return Uint8Array.from(Fe(Ye(ft)),function(Lt){return Lt.charCodeAt(0)})});var st=function(){var ft=ce.Base64;return ce.Base64=be,ft};if(ce.Base64={VERSION:Ce,atob:Fe,btoa:ae,fromBase64:ze,toBase64:ue,utob:z,encode:ue,encodeURI:pe,btou:ke,decode:ze,noConflict:st,fromUint8Array:Ee,toUint8Array:Xe},typeof Object.defineProperty=="function"){var ht=function(ft){return{value:ft,enumerable:!1,writable:!0,configurable:!0}};ce.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",ht(function(){return ze(this)})),Object.defineProperty(String.prototype,"toBase64",ht(function(ft){return ue(this,ft)})),Object.defineProperty(String.prototype,"toBase64URI",ht(function(){return ue(this,!0)}))}}return ce.Meteor&&(Base64=ce.Base64),typeof Re!="undefined"&&Re.exports?Re.exports.Base64=ce.Base64:typeof $e=="function"&&$e.amd&&$e([],function(){return ce.Base64}),{Base64:ce.Base64}})}).call(this)}).call(this,typeof ln!="undefined"?ln:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],372:[function(ie,Re,je){"use strict";Re.exports=ce;var ve=Object.prototype.hasOwnProperty;function ce(be,Ce,ye){if(!be)throw new TypeError("argument dest is required");if(!Ce)throw new TypeError("argument src is required");return ye===void 0&&(ye=!0),Object.getOwnPropertyNames(Ce).forEach(function(me){if(!(!ye&&ve.call(be,me))){var xe=Object.getOwnPropertyDescriptor(Ce,me);Object.defineProperty(be,me,xe)}}),be}},{}],373:[function(ie,Re,je){"use strict";ie("core-js/modules/es.array.map.js"),ie("core-js/modules/es.regexp.exec.js"),ie("core-js/modules/es.string.replace.js"),ie("core-js/modules/es.regexp.constructor.js"),ie("core-js/modules/es.regexp.to-string.js");function ve(){this._types=Object.create(null),this._extensions=Object.create(null);for(var ce=0;ce<arguments.length;ce++)this.define(arguments[ce]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}ve.prototype.define=function(ce,be){for(var Ce in ce){var ye=ce[Ce].map(function(fe){return fe.toLowerCase()});Ce=Ce.toLowerCase();for(var we=0;we<ye.length;we++){var me=ye[we];if(me[0]!=="*"){if(!be&&me in this._types)throw new Error('Attempt to change mapping for "'+me+'" extension from "'+this._types[me]+'" to "'+Ce+'". Pass `force=true` to allow this, otherwise remove "'+me+'" from the list of extensions for "'+Ce+'".');this._types[me]=Ce}}if(be||!this._extensions[Ce]){var xe=ye[0];this._extensions[Ce]=xe[0]!=="*"?xe:xe.substr(1)}}},ve.prototype.getType=function(ce){ce=String(ce);var be=ce.replace(/^.*[/\\]/,"").toLowerCase(),Ce=be.replace(/^.*\./,"").toLowerCase(),ye=be.length<ce.length,we=Ce.length<be.length-1;return(we||!ye)&&this._types[Ce]||null},ve.prototype.getExtension=function(ce){return ce=/^\s*([^;\s]*)/.test(ce)&&RegExp.$1,ce&&this._extensions[ce.toLowerCase()]||null},Re.exports=ve},{"core-js/modules/es.array.map.js":280,"core-js/modules/es.regexp.constructor.js":299,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305}],374:[function(ie,Re,je){"use strict";var ve=ie("./Mime");Re.exports=new ve(ie("./types/standard"))},{"./Mime":373,"./types/standard":375}],375:[function(ie,Re,je){"use strict";Re.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"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":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"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/lgr+xml":["lgr"],"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/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"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/p2p-overlay+xml":["relo"],"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/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"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/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"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/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"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/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"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":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"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"]}},{}],376:[function(ie,Re,je){var ve=1e3,ce=ve*60,be=ce*60,Ce=be*24,ye=Ce*7,we=Ce*365.25;Re.exports=function(ee,ae){ae=ae||{};var re=typeof ee;if(re==="string"&&ee.length>0)return me(ee);if(re==="number"&&isFinite(ee))return ae.long?fe(ee):xe(ee);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(ee))};function me(ee){if(ee=String(ee),!(ee.length>100)){var ae=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(ee);if(ae){var re=parseFloat(ae[1]),le=(ae[2]||"ms").toLowerCase();switch(le){case"years":case"year":case"yrs":case"yr":case"y":return re*we;case"weeks":case"week":case"w":return re*ye;case"days":case"day":case"d":return re*Ce;case"hours":case"hour":case"hrs":case"hr":case"h":return re*be;case"minutes":case"minute":case"mins":case"min":case"m":return re*ce;case"seconds":case"second":case"secs":case"sec":case"s":return re*ve;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return re;default:return}}}}function xe(ee){var ae=Math.abs(ee);return ae>=Ce?Math.round(ee/Ce)+"d":ae>=be?Math.round(ee/be)+"h":ae>=ce?Math.round(ee/ce)+"m":ae>=ve?Math.round(ee/ve)+"s":ee+"ms"}function fe(ee){var ae=Math.abs(ee);return ae>=Ce?z(ee,ae,Ce,"day"):ae>=be?z(ee,ae,be,"hour"):ae>=ce?z(ee,ae,ce,"minute"):ae>=ve?z(ee,ae,ve,"second"):ee+" ms"}function z(ee,ae,re,le){var ue=ae>=re*1.5;return Math.round(ee/re)+" "+le+(ue?"s":"")}},{}],377:[function(ie,Re,je){"use strict";var ve=Object.getOwnPropertySymbols,ce=Object.prototype.hasOwnProperty,be=Object.prototype.propertyIsEnumerable;function Ce(we){if(we==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(we)}function ye(){try{if(!Object.assign)return!1;var we=new String("abc");if(we[5]="de",Object.getOwnPropertyNames(we)[0]==="5")return!1;for(var me={},xe=0;xe<10;xe++)me["_"+String.fromCharCode(xe)]=xe;var fe=Object.getOwnPropertyNames(me).map(function(ee){return me[ee]});if(fe.join("")!=="0123456789")return!1;var z={};return"abcdefghijklmnopqrst".split("").forEach(function(ee){z[ee]=ee}),Object.keys(Object.assign({},z)).join("")==="abcdefghijklmnopqrst"}catch(ee){return!1}}Re.exports=ye()?Object.assign:function(we,me){for(var xe,fe=Ce(we),z,ee=1;ee<arguments.length;ee++){xe=Object(arguments[ee]);for(var ae in xe)ce.call(xe,ae)&&(fe[ae]=xe[ae]);if(ve){z=ve(xe);for(var re=0;re<z.length;re++)be.call(xe,z[re])&&(fe[z[re]]=xe[z[re]])}}return fe}},{}],378:[function(ie,Re,je){(function(ve){(function(){"use strict";function ce(we){if(typeof we!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(we))}function be(we,me){for(var xe="",fe=0,z=-1,ee=0,ae,re=0;re<=we.length;++re){if(re<we.length)ae=we.charCodeAt(re);else{if(ae===47)break;ae=47}if(ae===47){if(!(z===re-1||ee===1))if(z!==re-1&&ee===2){if(xe.length<2||fe!==2||xe.charCodeAt(xe.length-1)!==46||xe.charCodeAt(xe.length-2)!==46){if(xe.length>2){var le=xe.lastIndexOf("/");if(le!==xe.length-1){le===-1?(xe="",fe=0):(xe=xe.slice(0,le),fe=xe.length-1-xe.lastIndexOf("/")),z=re,ee=0;continue}}else if(xe.length===2||xe.length===1){xe="",fe=0,z=re,ee=0;continue}}me&&(xe.length>0?xe+="/..":xe="..",fe=2)}else xe.length>0?xe+="/"+we.slice(z+1,re):xe=we.slice(z+1,re),fe=re-z-1;z=re,ee=0}else ae===46&&ee!==-1?++ee:ee=-1}return xe}function Ce(we,me){var xe=me.dir||me.root,fe=me.base||(me.name||"")+(me.ext||"");return xe?xe===me.root?xe+fe:xe+we+fe:fe}var ye={resolve:function(){for(var me="",xe=!1,fe,z=arguments.length-1;z>=-1&&!xe;z--){var ee;z>=0?ee=arguments[z]:(fe===void 0&&(fe=ve.cwd()),ee=fe),ce(ee),ee.length!==0&&(me=ee+"/"+me,xe=ee.charCodeAt(0)===47)}return me=be(me,!xe),xe?me.length>0?"/"+me:"/":me.length>0?me:"."},normalize:function(me){if(ce(me),me.length===0)return".";var xe=me.charCodeAt(0)===47,fe=me.charCodeAt(me.length-1)===47;return me=be(me,!xe),me.length===0&&!xe&&(me="."),me.length>0&&fe&&(me+="/"),xe?"/"+me:me},isAbsolute:function(me){return ce(me),me.length>0&&me.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var me,xe=0;xe<arguments.length;++xe){var fe=arguments[xe];ce(fe),fe.length>0&&(me===void 0?me=fe:me+="/"+fe)}return me===void 0?".":ye.normalize(me)},relative:function(me,xe){if(ce(me),ce(xe),me===xe||(me=ye.resolve(me),xe=ye.resolve(xe),me===xe))return"";for(var fe=1;fe<me.length&&me.charCodeAt(fe)===47;++fe);for(var z=me.length,ee=z-fe,ae=1;ae<xe.length&&xe.charCodeAt(ae)===47;++ae);for(var re=xe.length,le=re-ae,ue=ee<le?ee:le,pe=-1,Ee=0;Ee<=ue;++Ee){if(Ee===ue){if(le>ue){if(xe.charCodeAt(ae+Ee)===47)return xe.slice(ae+Ee+1);if(Ee===0)return xe.slice(ae+Ee)}else ee>ue&&(me.charCodeAt(fe+Ee)===47?pe=Ee:Ee===0&&(pe=0));break}var Pe=me.charCodeAt(fe+Ee),Ie=xe.charCodeAt(ae+Ee);if(Pe!==Ie)break;Pe===47&&(pe=Ee)}var ke="";for(Ee=fe+pe+1;Ee<=z;++Ee)(Ee===z||me.charCodeAt(Ee)===47)&&(ke.length===0?ke+="..":ke+="/..");return ke.length>0?ke+xe.slice(ae+pe):(ae+=pe,xe.charCodeAt(ae)===47&&++ae,xe.slice(ae))},_makeLong:function(me){return me},dirname:function(me){if(ce(me),me.length===0)return".";for(var xe=me.charCodeAt(0),fe=xe===47,z=-1,ee=!0,ae=me.length-1;ae>=1;--ae)if(xe=me.charCodeAt(ae),xe===47){if(!ee){z=ae;break}}else ee=!1;return z===-1?fe?"/":".":fe&&z===1?"//":me.slice(0,z)},basename:function(me,xe){if(xe!==void 0&&typeof xe!="string")throw new TypeError('"ext" argument must be a string');ce(me);var fe=0,z=-1,ee=!0,ae;if(xe!==void 0&&xe.length>0&&xe.length<=me.length){if(xe.length===me.length&&xe===me)return"";var re=xe.length-1,le=-1;for(ae=me.length-1;ae>=0;--ae){var ue=me.charCodeAt(ae);if(ue===47){if(!ee){fe=ae+1;break}}else le===-1&&(ee=!1,le=ae+1),re>=0&&(ue===xe.charCodeAt(re)?--re===-1&&(z=ae):(re=-1,z=le))}return fe===z?z=le:z===-1&&(z=me.length),me.slice(fe,z)}else{for(ae=me.length-1;ae>=0;--ae)if(me.charCodeAt(ae)===47){if(!ee){fe=ae+1;break}}else z===-1&&(ee=!1,z=ae+1);return z===-1?"":me.slice(fe,z)}},extname:function(me){ce(me);for(var xe=-1,fe=0,z=-1,ee=!0,ae=0,re=me.length-1;re>=0;--re){var le=me.charCodeAt(re);if(le===47){if(!ee){fe=re+1;break}continue}z===-1&&(ee=!1,z=re+1),le===46?xe===-1?xe=re:ae!==1&&(ae=1):xe!==-1&&(ae=-1)}return xe===-1||z===-1||ae===0||ae===1&&xe===z-1&&xe===fe+1?"":me.slice(xe,z)},format:function(me){if(me===null||typeof me!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof me);return Ce("/",me)},parse:function(me){ce(me);var xe={root:"",dir:"",base:"",ext:"",name:""};if(me.length===0)return xe;var fe=me.charCodeAt(0),z=fe===47,ee;z?(xe.root="/",ee=1):ee=0;for(var ae=-1,re=0,le=-1,ue=!0,pe=me.length-1,Ee=0;pe>=ee;--pe){if(fe=me.charCodeAt(pe),fe===47){if(!ue){re=pe+1;break}continue}le===-1&&(ue=!1,le=pe+1),fe===46?ae===-1?ae=pe:Ee!==1&&(Ee=1):ae!==-1&&(Ee=-1)}return ae===-1||le===-1||Ee===0||Ee===1&&ae===le-1&&ae===re+1?le!==-1&&(re===0&&z?xe.base=xe.name=me.slice(1,le):xe.base=xe.name=me.slice(re,le)):(re===0&&z?(xe.name=me.slice(1,ae),xe.base=me.slice(1,le)):(xe.name=me.slice(re,ae),xe.base=me.slice(re,le)),xe.ext=me.slice(ae,le)),re>0?xe.dir=me.slice(0,re-1):z&&(xe.dir="/"),xe},sep:"/",delimiter:":",win32:null,posix:null};ye.posix=ye,Re.exports=ye}).call(this)}).call(this,ie("_process"))},{_process:467}],379:[function(ie,Re,je){(function(ve){(function(){(function(){"use strict";var ce={function:!0,object:!0},be=ce[typeof window]&&window||this,Ce=be,ye=ce[typeof je]&&je,we=ce[typeof Re]&&Re&&!Re.nodeType&&Re,me=ye&&we&&typeof ve=="object"&&ve;me&&(me.global===me||me.window===me||me.self===me)&&(be=me);var xe=Math.pow(2,53)-1,fe=/\bOpera/,z=this,ee=Object.prototype,ae=ee.hasOwnProperty,re=ee.toString;function le(ze){return ze=String(ze),ze.charAt(0).toUpperCase()+ze.slice(1)}function ue(ze,Xe,st){var ht={"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 Xe&&st&&/^Win/i.test(ze)&&!/^Windows Phone /i.test(ze)&&(ht=ht[/[\d.]+$/.exec(ze)])&&(ze="Windows "+ht),ze=String(ze),Xe&&st&&(ze=ze.replace(RegExp(Xe,"i"),st)),ze=Ee(ze.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]),ze}function pe(ze,Xe){var st=-1,ht=ze?ze.length:0;if(typeof ht=="number"&&ht>-1&&ht<=xe)for(;++st<ht;)Xe(ze[st],st,ze);else Pe(ze,Xe)}function Ee(ze){return ze=Fe(ze),/^(?:webOS|i(?:OS|P))/.test(ze)?ze:le(ze)}function Pe(ze,Xe){for(var st in ze)ae.call(ze,st)&&Xe(ze[st],st,ze)}function Ie(ze){return ze==null?le(ze):re.call(ze).slice(8,-1)}function ke(ze,Xe){var st=ze!=null?typeof ze[Xe]:"number";return!/^(?:boolean|number|string|undefined)$/.test(st)&&(st=="object"?!!ze[Xe]:!0)}function Ae(ze){return String(ze).replace(/([ -])(?!$)/g,"$1?")}function Oe(ze,Xe){var st=null;return pe(ze,function(ht,ft){st=Xe(st,ht,ft,ze)}),st}function Fe(ze){return String(ze).replace(/^ +| +$/g,"")}function _e(ze){var Xe=be,st=ze&&typeof ze=="object"&&Ie(ze)!="String";st&&(Xe=ze,ze=null);var ht=Xe.navigator||{},ft=ht.userAgent||"";ze||(ze=ft);var Lt=st||z==Ce,et=st?!!ht.likeChrome:/\bChrome\b/.test(ze)&&!/internal|\n/i.test(re.toString()),it="Object",xt=st?it:"ScriptBridgingProxyObject",Et=st?it:"Environment",Mt=st&&Xe.java?"JavaPackage":Ie(Xe.java),mt=st?it:"RuntimeObject",pt=/\bJava/.test(Mt)&&Xe.java,vt=pt&&Ie(Xe.environment)==Et,jt=pt?"a":"\u03B1",At=pt?"b":"\u03B2",Kt=Xe.document||{},Ct=Xe.operamini||Xe.opera,gt=fe.test(gt=st&&Ct?Ct["[[Class]]"]:Ie(Ct))?gt:Ct=null,tt,bt=ze,Ke=[],ut=null,wt=ze==ft,yt=wt&&Ct&&typeof Ct.version=="function"&&Ct.version(),lt,Qe=De([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),We=Ve(["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|Edg|EdgA|EdgiOS)"},"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","Vivaldi","Waterfox","WebPositive",{label:"Yandex Browser",pattern:"YaBrowser"},{label:"UC Browser",pattern:"UCBrowser"},"Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chromium","Chrome",{label:"Chrome",pattern:"(?:HeadlessChrome)"},{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=Ze([{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"]),qe=Le({Apple:{iPad:1,iPhone:1,iPod:1},Alcatel:{},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:{},Huawei:{},Lenovo:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Oppo:{},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1},Xiaomi:{Mi:1,Redmi:1}}),He=dt(["Windows Phone","KaiOS","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian",{label:"DragonFly BSD",pattern:"DragonFly"},"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 "]);function De(kt){return Oe(kt,function(Nt,Zt){return Nt||RegExp("\\b"+(Zt.pattern||Ae(Zt))+"\\b","i").exec(ze)&&(Zt.label||Zt)})}function Le(kt){return Oe(kt,function(Nt,Zt,on){return Nt||(Zt[Ue]||Zt[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Ue)]||RegExp("\\b"+Ae(on)+"(?:\\b|\\w*\\d)","i").exec(ze))&&on})}function Ve(kt){return Oe(kt,function(Nt,Zt){return Nt||RegExp("\\b"+(Zt.pattern||Ae(Zt))+"\\b","i").exec(ze)&&(Zt.label||Zt)})}function dt(kt){return Oe(kt,function(Nt,Zt){var on=Zt.pattern||Ae(Zt);return!Nt&&(Nt=RegExp("\\b"+on+"(?:/[\\d.]+|[ \\w.]*)","i").exec(ze))&&(Nt=ue(Nt,on,Zt.label||Zt)),Nt})}function Ze(kt){return Oe(kt,function(Nt,Zt){var on=Zt.pattern||Ae(Zt);return!Nt&&(Nt=RegExp("\\b"+on+" *\\d+[.\\w_]*","i").exec(ze)||RegExp("\\b"+on+" *\\w+-[\\w]*","i").exec(ze)||RegExp("\\b"+on+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(ze))&&((Nt=String(Zt.label&&!RegExp(on,"i").test(Zt.label)?Zt.label:Nt).split("/"))[1]&&!/[\d.]+/.test(Nt[0])&&(Nt[0]+=" "+Nt[1]),Zt=Zt.label||Zt,Nt=Ee(Nt[0].replace(RegExp(on,"i"),Zt).replace(RegExp("; *(?:"+Zt+"[_-])?","i")," ").replace(RegExp("("+Zt+")[-_.]?(\\w)","i"),"$1 $2"))),Nt})}function Tt(kt){return Oe(kt,function(Nt,Zt){return Nt||(RegExp(Zt+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(ze)||0)[1]||null})}function _t(){return this.description||""}if(Qe&&(Qe=[Qe]),/\bAndroid\b/.test(He)&&!Ue&&(tt=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(ze))&&(Ue=Fe(tt[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),qe&&!Ue?Ue=Ze([qe]):qe&&Ue&&(Ue=Ue.replace(RegExp("^("+Ae(qe)+")[-_.\\s]","i"),qe+" ").replace(RegExp("^("+Ae(qe)+")[-_.]?(\\w)","i"),qe+" $2")),(tt=/\bGoogle TV\b/.exec(Ue))&&(Ue=tt[0]),/\bSimulator\b/i.test(ze)&&(Ue=(Ue?Ue+" ":"")+"Simulator"),We=="Opera Mini"&&/\bOPiOS\b/.test(ze)&&Ke.push("running in Turbo/Uncompressed mode"),We=="IE"&&/\blike iPhone OS\b/.test(ze)?(tt=_e(ze.replace(/like iPhone OS/,"")),qe=tt.manufacturer,Ue=tt.product):/^iP/.test(Ue)?(We||(We="Safari"),He="iOS"+((tt=/ OS ([\d_]+)/i.exec(ze))?" "+tt[1].replace(/_/g,"."):"")):We=="Konqueror"&&/^Linux\b/i.test(He)?He="Kubuntu":qe&&qe!="Google"&&(/Chrome/.test(We)&&!/\bMobile Safari\b/i.test(ze)||/\bVita\b/.test(Ue))||/\bAndroid\b/.test(He)&&/^Chrome/.test(We)&&/\bVersion\//i.test(ze)?(We="Android Browser",He=/\bAndroid\b/.test(He)?He:"Android"):We=="Silk"?(/\bMobi/i.test(ze)||(He="Android",Ke.unshift("desktop mode")),/Accelerated *= *true/i.test(ze)&&Ke.unshift("accelerated")):We=="UC Browser"&&/\bUCWEB\b/.test(ze)?Ke.push("speed mode"):We=="PaleMoon"&&(tt=/\bFirefox\/([\d.]+)\b/.exec(ze))?Ke.push("identifying as Firefox "+tt[1]):We=="Firefox"&&(tt=/\b(Mobile|Tablet|TV)\b/i.exec(ze))?(He||(He="Firefox OS"),Ue||(Ue=tt[1])):!We||(tt=!/\bMinefield\b/i.test(ze)&&/\b(?:Firefox|Safari)\b/.exec(We))?(We&&!Ue&&/[\/,]|^[^(]+?\)/.test(ze.slice(ze.indexOf(tt+"/")+8))&&(We=null),(tt=Ue||qe||He)&&(Ue||qe||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(He))&&(We=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(He)?He:tt)+" Browser")):We=="Electron"&&(tt=(/\bChrome\/([\d.]+)\b/.exec(ze)||0)[1])&&Ke.push("Chromium "+tt),yt||(yt=Tt(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",Ae(We),"(?:Firefox|Minefield|NetFront)"])),(tt=Qe=="iCab"&&parseFloat(yt)>3&&"WebKit"||/\bOpera\b/.test(We)&&(/\bOPR\b/.test(ze)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(ze)&&!/^(?:Trident|EdgeHTML)$/.test(Qe)&&"WebKit"||!Qe&&/\bMSIE\b/i.test(ze)&&(He=="Mac OS"?"Tasman":"Trident")||Qe=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(We)&&"NetFront")&&(Qe=[tt]),We=="IE"&&(tt=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(ze)||0)[1])?(We+=" Mobile",He="Windows Phone "+(/\+$/.test(tt)?tt:tt+".x"),Ke.unshift("desktop mode")):/\bWPDesktop\b/i.test(ze)?(We="IE Mobile",He="Windows Phone 8.x",Ke.unshift("desktop mode"),yt||(yt=(/\brv:([\d.]+)/.exec(ze)||0)[1])):We!="IE"&&Qe=="Trident"&&(tt=/\brv:([\d.]+)/.exec(ze))&&(We&&Ke.push("identifying as "+We+(yt?" "+yt:"")),We="IE",yt=tt[1]),wt){if(ke(Xe,"global"))if(pt&&(tt=pt.lang.System,bt=tt.getProperty("os.arch"),He=He||tt.getProperty("os.name")+" "+tt.getProperty("os.version")),vt){try{yt=Xe.require("ringo/engine").version.join("."),We="RingoJS"}catch(kt){(tt=Xe.system)&&tt.global.system==Xe.system&&(We="Narwhal",He||(He=tt[0].os||null))}We||(We="Rhino")}else typeof Xe.process=="object"&&!Xe.process.browser&&(tt=Xe.process)&&(typeof tt.versions=="object"&&(typeof tt.versions.electron=="string"?(Ke.push("Node "+tt.versions.node),We="Electron",yt=tt.versions.electron):typeof tt.versions.nw=="string"&&(Ke.push("Chromium "+yt,"Node "+tt.versions.node),We="NW.js",yt=tt.versions.nw)),We||(We="Node.js",bt=tt.arch,He=tt.platform,yt=/[\d.]+/.exec(tt.version),yt=yt?yt[0]:null));else Ie(tt=Xe.runtime)==xt?(We="Adobe AIR",He=tt.flash.system.Capabilities.os):Ie(tt=Xe.phantom)==mt?(We="PhantomJS",yt=(tt=tt.version||null)&&tt.major+"."+tt.minor+"."+tt.patch):typeof Kt.documentMode=="number"&&(tt=/\bTrident\/(\d+)/i.exec(ze))?(yt=[yt,Kt.documentMode],(tt=+tt[1]+4)!=yt[1]&&(Ke.push("IE "+yt[1]+" mode"),Qe&&(Qe[1]=""),yt[1]=tt),yt=We=="IE"?String(yt[1].toFixed(1)):yt[0]):typeof Kt.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(We)&&(Ke.push("masking as "+We+" "+yt),We="IE",yt="11.0",Qe=["Trident"],He="Windows");He=He&&Ee(He)}if(yt&&(tt=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(yt)||/(?:alpha|beta)(?: ?\d)?/i.exec(ze+";"+(wt&&ht.appMinorVersion))||/\bMinefield\b/i.test(ze)&&"a")&&(ut=/b/i.test(tt)?"beta":"alpha",yt=yt.replace(RegExp(tt+"\\+?$"),"")+(ut=="beta"?At:jt)+(/\d+\+?/.exec(tt)||"")),We=="Fennec"||We=="Firefox"&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(He))We="Firefox Mobile";else if(We=="Maxthon"&&yt)yt=yt.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Ue))Ue=="Xbox 360"&&(He=null),Ue=="Xbox 360"&&/\bIEMobile\b/.test(ze)&&Ke.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(We)||We&&!Ue&&!/Browser|Mobi/.test(We))&&(He=="Windows CE"||/Mobi/i.test(ze)))We+=" Mobile";else if(We=="IE"&&wt)try{Xe.external===null&&Ke.unshift("platform preview")}catch(kt){Ke.unshift("embedded")}else(/\bBlackBerry\b/.test(Ue)||/\bBB10\b/.test(ze))&&(tt=(RegExp(Ue.replace(/ +/g," *")+"/([.\\d]+)","i").exec(ze)||0)[1]||yt)?(tt=[tt,/BB10/.test(ze)],He=(tt[1]?(Ue=null,qe="BlackBerry"):"Device Software")+" "+tt[0],yt=null):this!=Pe&&Ue!="Wii"&&(wt&&Ct||/Opera/.test(We)&&/\b(?:MSIE|Firefox)\b/i.test(ze)||We=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(He)||We=="IE"&&(He&&!/^Win/.test(He)&&yt>5.5||/\bWindows XP\b/.test(He)&&yt>8||yt==8&&!/\bTrident\b/.test(ze)))&&!fe.test(tt=_e.call(Pe,ze.replace(fe,"")+";"))&&tt.name&&(tt="ing as "+tt.name+((tt=tt.version)?" "+tt:""),fe.test(We)?(/\bIE\b/.test(tt)&&He=="Mac OS"&&(He=null),tt="identify"+tt):(tt="mask"+tt,gt?We=Ee(gt.replace(/([a-z])([A-Z])/g,"$1 $2")):We="Opera",/\bIE\b/.test(tt)&&(He=null),wt||(yt=null)),Qe=["Presto"],Ke.push(tt));(tt=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(ze)||0)[1])&&(tt=[parseFloat(tt.replace(/\.(\d)$/,".0$1")),tt],We=="Safari"&&tt[1].slice(-1)=="+"?(We="WebKit Nightly",ut="alpha",yt=tt[1].slice(0,-1)):(yt==tt[1]||yt==(tt[2]=(/\bSafari\/([\d.]+\+?)/i.exec(ze)||0)[1]))&&(yt=null),tt[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(ze)||0)[1],tt[0]==537.36&&tt[2]==537.36&&parseFloat(tt[1])>=28&&Qe=="WebKit"&&(Qe=["Blink"]),!wt||!et&&!tt[1]?(Qe&&(Qe[1]="like Safari"),tt=(tt=tt[0],tt<400?1:tt<500?2:tt<526?3:tt<533?4:tt<534?"4+":tt<535?5:tt<537?6:tt<538?7:tt<601?8:tt<602?9:tt<604?10:tt<606?11:tt<608?12:"12")):(Qe&&(Qe[1]="like Chrome"),tt=tt[1]||(tt=tt[0],tt<530?1:tt<532?2:tt<532.05?3:tt<533?4:tt<534.03?5:tt<534.07?6:tt<534.1?7:tt<534.13?8:tt<534.16?9:tt<534.24?10:tt<534.3?11:tt<535.01?12:tt<535.02?"13+":tt<535.07?15:tt<535.11?16:tt<535.19?17:tt<536.05?18:tt<536.1?19:tt<537.01?20:tt<537.11?"21+":tt<537.13?23:tt<537.18?24:tt<537.24?25:tt<537.36?26:Qe!="Blink"?"27":"28")),Qe&&(Qe[1]+=" "+(tt+=typeof tt=="number"?".x":/[.+]/.test(tt)?"":"+")),We=="Safari"&&(!yt||parseInt(yt)>45)?yt=tt:We=="Chrome"&&/\bHeadlessChrome/i.test(ze)&&Ke.unshift("headless")),We=="Opera"&&(tt=/\bzbov|zvav$/.exec(He))?(We+=" ",Ke.unshift("desktop mode"),tt=="zvav"?(We+="Mini",yt=null):We+="Mobile",He=He.replace(RegExp(" *"+tt+"$"),"")):We=="Safari"&&/\bChrome\b/.exec(Qe&&Qe[1])?(Ke.unshift("desktop mode"),We="Chrome Mobile",yt=null,/\bOS X\b/.test(He)?(qe="Apple",He="iOS 4.3+"):He=null):/\bSRWare Iron\b/.test(We)&&!yt&&(yt=Tt("Chrome")),yt&&yt.indexOf(tt=/[\d.]+$/.exec(He))==0&&ze.indexOf("/"+tt+"-")>-1&&(He=Fe(He.replace(tt,""))),He&&He.indexOf(We)!=-1&&!RegExp(We+" OS").test(He)&&(He=He.replace(RegExp(" *"+Ae(We)+" *"),"")),Qe&&!/\b(?:Avant|Nook)\b/.test(We)&&(/Browser|Lunascape|Maxthon/.test(We)||We!="Safari"&&/^iOS/.test(He)&&/\bSafari\b/.test(Qe[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(We)&&Qe[1])&&(tt=Qe[Qe.length-1])&&Ke.push(tt),Ke.length&&(Ke=["("+Ke.join("; ")+")"]),qe&&Ue&&Ue.indexOf(qe)<0&&Ke.push("on "+qe),Ue&&Ke.push((/^on /.test(Ke[Ke.length-1])?"":"on ")+Ue),He&&(tt=/ ([\d.+]+)$/.exec(He),lt=tt&&He.charAt(He.length-tt[0].length-1)=="/",He={architecture:32,family:tt&&!lt?He.replace(tt[0],""):He,version:tt?tt[1]:null,toString:function(){var kt=this.version;return this.family+(kt&&!lt?" "+kt:"")+(this.architecture==64?" 64-bit":"")}}),(tt=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(bt))&&!/\bi686\b/i.test(bt)?(He&&(He.architecture=64,He.family=He.family.replace(RegExp(" *"+tt),"")),We&&(/\bWOW64\b/i.test(ze)||wt&&/\w(?:86|32)$/.test(ht.cpuClass||ht.platform)&&!/\bWin64; x64\b/i.test(ze))&&Ke.unshift("32-bit")):He&&/^OS X/.test(He.family)&&We=="Chrome"&&parseFloat(yt)>=39&&(He.architecture=64),ze||(ze=null);var Qt={};return Qt.description=ze,Qt.layout=Qe&&Qe[0],Qt.manufacturer=qe,Qt.name=We,Qt.prerelease=ut,Qt.product=Ue,Qt.ua=ze,Qt.version=We&&yt,Qt.os=He||{architecture:null,family:null,version:null,toString:function(){return"null"}},Qt.parse=_e,Qt.toString=_t,Qt.version&&Ke.unshift(yt),Qt.name&&Ke.unshift(We),He&&We&&!(He==String(He).split(" ")[0]&&(He==We.split(" ")[0]||Ue))&&Ke.push(Ue?"("+He+")":"on "+He),Ke.length&&(Qt.description=Ke.join(" ")),Qt}var Ye=_e();typeof $e=="function"&&typeof $e.amd=="object"&&$e.amd?(be.platform=Ye,$e(function(){return Ye})):ye&&we?Pe(Ye,function(ze,Xe){ye[Xe]=ze}):be.platform=Ye}).call(this)}).call(this)}).call(this,typeof ln!="undefined"?ln:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],380:[function(ie,Re,je){(function(ve){(function(){"use strict";typeof ve=="undefined"||!ve.version||ve.version.indexOf("v0.")===0||ve.version.indexOf("v1.")===0&&ve.version.indexOf("v1.8.")!==0?Re.exports={nextTick:ce}:Re.exports=ve;function ce(be,Ce,ye,we){if(typeof be!="function")throw new TypeError('"callback" argument must be a function');var me=arguments.length,xe,fe;switch(me){case 0:case 1:return ve.nextTick(be);case 2:return ve.nextTick(function(){be.call(null,Ce)});case 3:return ve.nextTick(function(){be.call(null,Ce,ye)});case 4:return ve.nextTick(function(){be.call(null,Ce,ye,we)});default:for(xe=new Array(me-1),fe=0;fe<xe.length;)xe[fe++]=arguments[fe];return ve.nextTick(function(){be.apply(null,xe)})}}}).call(this)}).call(this,ie("_process"))},{_process:467}],381:[function(ie,Re,je){var ve=Re.exports={},ce,be;function Ce(){throw new Error("setTimeout has not been defined")}function ye(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?ce=setTimeout:ce=Ce}catch(pe){ce=Ce}try{typeof clearTimeout=="function"?be=clearTimeout:be=ye}catch(pe){be=ye}})();function we(pe){if(ce===setTimeout)return setTimeout(pe,0);if((ce===Ce||!ce)&&setTimeout)return ce=setTimeout,setTimeout(pe,0);try{return ce(pe,0)}catch(Ee){try{return ce.call(null,pe,0)}catch(Pe){return ce.call(this,pe,0)}}}function me(pe){if(be===clearTimeout)return clearTimeout(pe);if((be===ye||!be)&&clearTimeout)return be=clearTimeout,clearTimeout(pe);try{return be(pe)}catch(Ee){try{return be.call(null,pe)}catch(Pe){return be.call(this,pe)}}}var xe=[],fe=!1,z,ee=-1;function ae(){!fe||!z||(fe=!1,z.length?xe=z.concat(xe):ee=-1,xe.length&&re())}function re(){if(!fe){var pe=we(ae);fe=!0;for(var Ee=xe.length;Ee;){for(z=xe,xe=[];++ee<Ee;)z&&z[ee].run();ee=-1,Ee=xe.length}z=null,fe=!1,me(pe)}}ve.nextTick=function(pe){var Ee=new Array(arguments.length-1);if(arguments.length>1)for(var Pe=1;Pe<arguments.length;Pe++)Ee[Pe-1]=arguments[Pe];xe.push(new le(pe,Ee)),xe.length===1&&!fe&&we(re)};function le(pe,Ee){this.fun=pe,this.array=Ee}le.prototype.run=function(){this.fun.apply(null,this.array)},ve.title="browser",ve.browser=!0,ve.env={},ve.argv=[],ve.version="",ve.versions={};function ue(){}ve.on=ue,ve.addListener=ue,ve.once=ue,ve.off=ue,ve.removeListener=ue,ve.removeAllListeners=ue,ve.emit=ue,ve.prependListener=ue,ve.prependOnceListener=ue,ve.listeners=function(pe){return[]},ve.binding=function(pe){throw new Error("process.binding is not supported")},ve.cwd=function(){return"/"},ve.chdir=function(pe){throw new Error("process.chdir is not supported")},ve.umask=function(){return 0}},{}],382:[function(ie,Re,je){(function(ve){(function(){(function(ce){var be=typeof je=="object"&&je&&!je.nodeType&&je,Ce=typeof Re=="object"&&Re&&!Re.nodeType&&Re,ye=typeof ve=="object"&&ve;(ye.global===ye||ye.window===ye||ye.self===ye)&&(ce=ye);var we,me=2147483647,xe=36,fe=1,z=26,ee=38,ae=700,re=72,le=128,ue="-",pe=/^xn--/,Ee=/[^\x20-\x7E]/,Pe=/[\x2E\u3002\uFF0E\uFF61]/g,Ie={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ke=xe-fe,Ae=Math.floor,Oe=String.fromCharCode,Fe;function _e(Mt){throw new RangeError(Ie[Mt])}function Ye(Mt,mt){for(var pt=Mt.length,vt=[];pt--;)vt[pt]=mt(Mt[pt]);return vt}function ze(Mt,mt){var pt=Mt.split("@"),vt="";pt.length>1&&(vt=pt[0]+"@",Mt=pt[1]),Mt=Mt.replace(Pe,".");var jt=Mt.split("."),At=Ye(jt,mt).join(".");return vt+At}function Xe(Mt){for(var mt=[],pt=0,vt=Mt.length,jt,At;pt<vt;)jt=Mt.charCodeAt(pt++),jt>=55296&&jt<=56319&&pt<vt?(At=Mt.charCodeAt(pt++),(At&64512)==56320?mt.push(((jt&1023)<<10)+(At&1023)+65536):(mt.push(jt),pt--)):mt.push(jt);return mt}function st(Mt){return Ye(Mt,function(mt){var pt="";return mt>65535&&(mt-=65536,pt+=Oe(mt>>>10&1023|55296),mt=56320|mt&1023),pt+=Oe(mt),pt}).join("")}function ht(Mt){return Mt-48<10?Mt-22:Mt-65<26?Mt-65:Mt-97<26?Mt-97:xe}function ft(Mt,mt){return Mt+22+75*(Mt<26)-((mt!=0)<<5)}function Lt(Mt,mt,pt){var vt=0;for(Mt=pt?Ae(Mt/ae):Mt>>1,Mt+=Ae(Mt/mt);Mt>ke*z>>1;vt+=xe)Mt=Ae(Mt/ke);return Ae(vt+(ke+1)*Mt/(Mt+ee))}function et(Mt){var mt=[],pt=Mt.length,vt,jt=0,At=le,Kt=re,Ct,gt,tt,bt,Ke,ut,wt,yt,lt;for(Ct=Mt.lastIndexOf(ue),Ct<0&&(Ct=0),gt=0;gt<Ct;++gt)Mt.charCodeAt(gt)>=128&&_e("not-basic"),mt.push(Mt.charCodeAt(gt));for(tt=Ct>0?Ct+1:0;tt<pt;){for(bt=jt,Ke=1,ut=xe;tt>=pt&&_e("invalid-input"),wt=ht(Mt.charCodeAt(tt++)),(wt>=xe||wt>Ae((me-jt)/Ke))&&_e("overflow"),jt+=wt*Ke,yt=ut<=Kt?fe:ut>=Kt+z?z:ut-Kt,!(wt<yt);ut+=xe)lt=xe-yt,Ke>Ae(me/lt)&&_e("overflow"),Ke*=lt;vt=mt.length+1,Kt=Lt(jt-bt,vt,bt==0),Ae(jt/vt)>me-At&&_e("overflow"),At+=Ae(jt/vt),jt%=vt,mt.splice(jt++,0,At)}return st(mt)}function it(Mt){var mt,pt,vt,jt,At,Kt,Ct,gt,tt,bt,Ke,ut=[],wt,yt,lt,Qe;for(Mt=Xe(Mt),wt=Mt.length,mt=le,pt=0,At=re,Kt=0;Kt<wt;++Kt)Ke=Mt[Kt],Ke<128&&ut.push(Oe(Ke));for(vt=jt=ut.length,jt&&ut.push(ue);vt<wt;){for(Ct=me,Kt=0;Kt<wt;++Kt)Ke=Mt[Kt],Ke>=mt&&Ke<Ct&&(Ct=Ke);for(yt=vt+1,Ct-mt>Ae((me-pt)/yt)&&_e("overflow"),pt+=(Ct-mt)*yt,mt=Ct,Kt=0;Kt<wt;++Kt)if(Ke=Mt[Kt],Ke<mt&&++pt>me&&_e("overflow"),Ke==mt){for(gt=pt,tt=xe;bt=tt<=At?fe:tt>=At+z?z:tt-At,!(gt<bt);tt+=xe)Qe=gt-bt,lt=xe-bt,ut.push(Oe(ft(bt+Qe%lt,0))),gt=Ae(Qe/lt);ut.push(Oe(ft(gt,0))),At=Lt(pt,yt,vt==jt),pt=0,++vt}++pt,++mt}return ut.join("")}function xt(Mt){return ze(Mt,function(mt){return pe.test(mt)?et(mt.slice(4).toLowerCase()):mt})}function Et(Mt){return ze(Mt,function(mt){return Ee.test(mt)?"xn--"+it(mt):mt})}if(we={version:"1.4.1",ucs2:{decode:Xe,encode:st},decode:et,encode:it,toASCII:Et,toUnicode:xt},typeof $e=="function"&&typeof $e.amd=="object"&&$e.amd)$e("punycode",function(){return we});else if(be&&Ce)if(Re.exports==be)Ce.exports=we;else for(Fe in we)we.hasOwnProperty(Fe)&&(be[Fe]=we[Fe]);else ce.punycode=we})(this)}).call(this)}).call(this,typeof ln!="undefined"?ln:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],383:[function(ie,Re,je){"use strict";function ve(be,Ce){return Object.prototype.hasOwnProperty.call(be,Ce)}Re.exports=function(be,Ce,ye,we){Ce=Ce||"&",ye=ye||"=";var me={};if(typeof be!="string"||be.length===0)return me;var xe=/\+/g;be=be.split(Ce);var fe=1e3;we&&typeof we.maxKeys=="number"&&(fe=we.maxKeys);var z=be.length;fe>0&&z>fe&&(z=fe);for(var ee=0;ee<z;++ee){var ae=be[ee].replace(xe,"%20"),re=ae.indexOf(ye),le,ue,pe,Ee;re>=0?(le=ae.substr(0,re),ue=ae.substr(re+1)):(le=ae,ue=""),pe=decodeURIComponent(le),Ee=decodeURIComponent(ue),ve(me,pe)?ce(me[pe])?me[pe].push(Ee):me[pe]=[me[pe],Ee]:me[pe]=Ee}return me};var ce=Array.isArray||function(be){return Object.prototype.toString.call(be)==="[object Array]"}},{}],384:[function(ie,Re,je){"use strict";var ve=function(ye){switch(typeof ye){case"string":return ye;case"boolean":return ye?"true":"false";case"number":return isFinite(ye)?ye:"";default:return""}};Re.exports=function(ye,we,me,xe){return we=we||"&",me=me||"=",ye===null&&(ye=void 0),typeof ye=="object"?be(Ce(ye),function(fe){var z=encodeURIComponent(ve(fe))+me;return ce(ye[fe])?be(ye[fe],function(ee){return z+encodeURIComponent(ve(ee))}).join(we):z+encodeURIComponent(ve(ye[fe]))}).join(we):xe?encodeURIComponent(ve(xe))+me+encodeURIComponent(ve(ye)):""};var ce=Array.isArray||function(ye){return Object.prototype.toString.call(ye)==="[object Array]"};function be(ye,we){if(ye.map)return ye.map(we);for(var me=[],xe=0;xe<ye.length;xe++)me.push(we(ye[xe],xe));return me}var Ce=Object.keys||function(ye){var we=[];for(var me in ye)Object.prototype.hasOwnProperty.call(ye,me)&&we.push(me);return we}},{}],385:[function(ie,Re,je){"use strict";je.decode=je.parse=ie("./decode"),je.encode=je.stringify=ie("./encode")},{"./decode":383,"./encode":384}],386:[function(ie,Re,je){"use strict";var ve=ie("process-nextick-args"),ce=Object.keys||function(ae){var re=[];for(var le in ae)re.push(le);return re};Re.exports=fe;var be=Object.create(ie("core-util-is"));be.inherits=ie("inherits");var Ce=ie("./_stream_readable"),ye=ie("./_stream_writable");be.inherits(fe,Ce);for(var we=ce(ye.prototype),me=0;me<we.length;me++){var xe=we[me];fe.prototype[xe]||(fe.prototype[xe]=ye.prototype[xe])}function fe(ae){if(!(this instanceof fe))return new fe(ae);Ce.call(this,ae),ye.call(this,ae),ae&&ae.readable===!1&&(this.readable=!1),ae&&ae.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,ae&&ae.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",z)}Object.defineProperty(fe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(){this.allowHalfOpen||this._writableState.ended||ve.nextTick(ee,this)}function ee(ae){ae.end()}Object.defineProperty(fe.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(ae){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=ae,this._writableState.destroyed=ae)}}),fe.prototype._destroy=function(ae,re){this.push(null),this.end(),ve.nextTick(re,ae)}},{"./_stream_readable":388,"./_stream_writable":390,"core-util-is":341,inherits:364,"process-nextick-args":380}],387:[function(ie,Re,je){"use strict";Re.exports=be;var ve=ie("./_stream_transform"),ce=Object.create(ie("core-util-is"));ce.inherits=ie("inherits"),ce.inherits(be,ve);function be(Ce){if(!(this instanceof be))return new be(Ce);ve.call(this,Ce)}be.prototype._transform=function(Ce,ye,we){we(null,Ce)}},{"./_stream_transform":389,"core-util-is":341,inherits:364}],388:[function(ie,Re,je){(function(ve,ce){(function(){"use strict";var be=ie("process-nextick-args");Re.exports=Oe;var Ce=ie("isarray"),ye;Oe.ReadableState=Ae;var we=ie("events").EventEmitter,me=function(Ke,ut){return Ke.listeners(ut).length},xe=ie("./internal/streams/stream"),fe=ie("safe-buffer").Buffer,z=ce.Uint8Array||function(){};function ee(Ke){return fe.from(Ke)}function ae(Ke){return fe.isBuffer(Ke)||Ke instanceof z}var re=Object.create(ie("core-util-is"));re.inherits=ie("inherits");var le=ie("util"),ue=void 0;le&&le.debuglog?ue=le.debuglog("stream"):ue=function(){};var pe=ie("./internal/streams/BufferList"),Ee=ie("./internal/streams/destroy"),Pe;re.inherits(Oe,xe);var Ie=["error","close","destroy","pause","resume"];function ke(Ke,ut,wt){if(typeof Ke.prependListener=="function")return Ke.prependListener(ut,wt);!Ke._events||!Ke._events[ut]?Ke.on(ut,wt):Ce(Ke._events[ut])?Ke._events[ut].unshift(wt):Ke._events[ut]=[wt,Ke._events[ut]]}function Ae(Ke,ut){ye=ye||ie("./_stream_duplex"),Ke=Ke||{};var wt=ut instanceof ye;this.objectMode=!!Ke.objectMode,wt&&(this.objectMode=this.objectMode||!!Ke.readableObjectMode);var yt=Ke.highWaterMark,lt=Ke.readableHighWaterMark,Qe=this.objectMode?16:16*1024;yt||yt===0?this.highWaterMark=yt:wt&&(lt||lt===0)?this.highWaterMark=lt:this.highWaterMark=Qe,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new pe,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=Ke.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Ke.encoding&&(Pe||(Pe=ie("string_decoder/").StringDecoder),this.decoder=new Pe(Ke.encoding),this.encoding=Ke.encoding)}function Oe(Ke){if(ye=ye||ie("./_stream_duplex"),!(this instanceof Oe))return new Oe(Ke);this._readableState=new Ae(Ke,this),this.readable=!0,Ke&&(typeof Ke.read=="function"&&(this._read=Ke.read),typeof Ke.destroy=="function"&&(this._destroy=Ke.destroy)),xe.call(this)}Object.defineProperty(Oe.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(Ke){this._readableState&&(this._readableState.destroyed=Ke)}}),Oe.prototype.destroy=Ee.destroy,Oe.prototype._undestroy=Ee.undestroy,Oe.prototype._destroy=function(Ke,ut){this.push(null),ut(Ke)},Oe.prototype.push=function(Ke,ut){var wt=this._readableState,yt;return wt.objectMode?yt=!0:typeof Ke=="string"&&(ut=ut||wt.defaultEncoding,ut!==wt.encoding&&(Ke=fe.from(Ke,ut),ut=""),yt=!0),Fe(this,Ke,ut,!1,yt)},Oe.prototype.unshift=function(Ke){return Fe(this,Ke,null,!0,!1)};function Fe(Ke,ut,wt,yt,lt){var Qe=Ke._readableState;if(ut===null)Qe.reading=!1,ft(Ke,Qe);else{var We;lt||(We=Ye(Qe,ut)),We?Ke.emit("error",We):Qe.objectMode||ut&&ut.length>0?(typeof ut!="string"&&!Qe.objectMode&&Object.getPrototypeOf(ut)!==fe.prototype&&(ut=ee(ut)),yt?Qe.endEmitted?Ke.emit("error",new Error("stream.unshift() after end event")):_e(Ke,Qe,ut,!0):Qe.ended?Ke.emit("error",new Error("stream.push() after EOF")):(Qe.reading=!1,Qe.decoder&&!wt?(ut=Qe.decoder.write(ut),Qe.objectMode||ut.length!==0?_e(Ke,Qe,ut,!1):it(Ke,Qe)):_e(Ke,Qe,ut,!1))):yt||(Qe.reading=!1)}return ze(Qe)}function _e(Ke,ut,wt,yt){ut.flowing&&ut.length===0&&!ut.sync?(Ke.emit("data",wt),Ke.read(0)):(ut.length+=ut.objectMode?1:wt.length,yt?ut.buffer.unshift(wt):ut.buffer.push(wt),ut.needReadable&&Lt(Ke)),it(Ke,ut)}function Ye(Ke,ut){var wt;return!ae(ut)&&typeof ut!="string"&&ut!==void 0&&!Ke.objectMode&&(wt=new TypeError("Invalid non-string/buffer chunk")),wt}function ze(Ke){return!Ke.ended&&(Ke.needReadable||Ke.length<Ke.highWaterMark||Ke.length===0)}Oe.prototype.isPaused=function(){return this._readableState.flowing===!1},Oe.prototype.setEncoding=function(Ke){return Pe||(Pe=ie("string_decoder/").StringDecoder),this._readableState.decoder=new Pe(Ke),this._readableState.encoding=Ke,this};var Xe=8388608;function st(Ke){return Ke>=Xe?Ke=Xe:(Ke--,Ke|=Ke>>>1,Ke|=Ke>>>2,Ke|=Ke>>>4,Ke|=Ke>>>8,Ke|=Ke>>>16,Ke++),Ke}function ht(Ke,ut){return Ke<=0||ut.length===0&&ut.ended?0:ut.objectMode?1:Ke!==Ke?ut.flowing&&ut.length?ut.buffer.head.data.length:ut.length:(Ke>ut.highWaterMark&&(ut.highWaterMark=st(Ke)),Ke<=ut.length?Ke:ut.ended?ut.length:(ut.needReadable=!0,0))}Oe.prototype.read=function(Ke){ue("read",Ke),Ke=parseInt(Ke,10);var ut=this._readableState,wt=Ke;if(Ke!==0&&(ut.emittedReadable=!1),Ke===0&&ut.needReadable&&(ut.length>=ut.highWaterMark||ut.ended))return ue("read: emitReadable",ut.length,ut.ended),ut.length===0&&ut.ended?gt(this):Lt(this),null;if(Ke=ht(Ke,ut),Ke===0&&ut.ended)return ut.length===0&&gt(this),null;var yt=ut.needReadable;ue("need readable",yt),(ut.length===0||ut.length-Ke<ut.highWaterMark)&&(yt=!0,ue("length less than watermark",yt)),ut.ended||ut.reading?(yt=!1,ue("reading or ended",yt)):yt&&(ue("do read"),ut.reading=!0,ut.sync=!0,ut.length===0&&(ut.needReadable=!0),this._read(ut.highWaterMark),ut.sync=!1,ut.reading||(Ke=ht(wt,ut)));var lt;return Ke>0?lt=jt(Ke,ut):lt=null,lt===null?(ut.needReadable=!0,Ke=0):ut.length-=Ke,ut.length===0&&(ut.ended||(ut.needReadable=!0),wt!==Ke&&ut.ended&&gt(this)),lt!==null&&this.emit("data",lt),lt};function ft(Ke,ut){if(!ut.ended){if(ut.decoder){var wt=ut.decoder.end();wt&&wt.length&&(ut.buffer.push(wt),ut.length+=ut.objectMode?1:wt.length)}ut.ended=!0,Lt(Ke)}}function Lt(Ke){var ut=Ke._readableState;ut.needReadable=!1,ut.emittedReadable||(ue("emitReadable",ut.flowing),ut.emittedReadable=!0,ut.sync?be.nextTick(et,Ke):et(Ke))}function et(Ke){ue("emit readable"),Ke.emit("readable"),vt(Ke)}function it(Ke,ut){ut.readingMore||(ut.readingMore=!0,be.nextTick(xt,Ke,ut))}function xt(Ke,ut){for(var wt=ut.length;!ut.reading&&!ut.flowing&&!ut.ended&&ut.length<ut.highWaterMark&&(ue("maybeReadMore read 0"),Ke.read(0),wt!==ut.length);)wt=ut.length;ut.readingMore=!1}Oe.prototype._read=function(Ke){this.emit("error",new Error("_read() is not implemented"))},Oe.prototype.pipe=function(Ke,ut){var wt=this,yt=this._readableState;switch(yt.pipesCount){case 0:yt.pipes=Ke;break;case 1:yt.pipes=[yt.pipes,Ke];break;default:yt.pipes.push(Ke);break}yt.pipesCount+=1,ue("pipe count=%d opts=%j",yt.pipesCount,ut);var lt=(!ut||ut.end!==!1)&&Ke!==ve.stdout&&Ke!==ve.stderr,Qe=lt?Ue:_t;yt.endEmitted?be.nextTick(Qe):wt.once("end",Qe),Ke.on("unpipe",We);function We(Qt,kt){ue("onunpipe"),Qt===wt&&kt&&kt.hasUnpiped===!1&&(kt.hasUnpiped=!0,De())}function Ue(){ue("onend"),Ke.end()}var qe=Et(wt);Ke.on("drain",qe);var He=!1;function De(){ue("cleanup"),Ke.removeListener("close",Ze),Ke.removeListener("finish",Tt),Ke.removeListener("drain",qe),Ke.removeListener("error",dt),Ke.removeListener("unpipe",We),wt.removeListener("end",Ue),wt.removeListener("end",_t),wt.removeListener("data",Ve),He=!0,yt.awaitDrain&&(!Ke._writableState||Ke._writableState.needDrain)&&qe()}var Le=!1;wt.on("data",Ve);function Ve(Qt){ue("ondata"),Le=!1;var kt=Ke.write(Qt);kt===!1&&!Le&&((yt.pipesCount===1&&yt.pipes===Ke||yt.pipesCount>1&&bt(yt.pipes,Ke)!==-1)&&!He&&(ue("false write response, pause",wt._readableState.awaitDrain),wt._readableState.awaitDrain++,Le=!0),wt.pause())}function dt(Qt){ue("onerror",Qt),_t(),Ke.removeListener("error",dt),me(Ke,"error")===0&&Ke.emit("error",Qt)}ke(Ke,"error",dt);function Ze(){Ke.removeListener("finish",Tt),_t()}Ke.once("close",Ze);function Tt(){ue("onfinish"),Ke.removeListener("close",Ze),_t()}Ke.once("finish",Tt);function _t(){ue("unpipe"),wt.unpipe(Ke)}return Ke.emit("pipe",wt),yt.flowing||(ue("pipe resume"),wt.resume()),Ke};function Et(Ke){return function(){var ut=Ke._readableState;ue("pipeOnDrain",ut.awaitDrain),ut.awaitDrain&&ut.awaitDrain--,ut.awaitDrain===0&&me(Ke,"data")&&(ut.flowing=!0,vt(Ke))}}Oe.prototype.unpipe=function(Ke){var ut=this._readableState,wt={hasUnpiped:!1};if(ut.pipesCount===0)return this;if(ut.pipesCount===1)return Ke&&Ke!==ut.pipes?this:(Ke||(Ke=ut.pipes),ut.pipes=null,ut.pipesCount=0,ut.flowing=!1,Ke&&Ke.emit("unpipe",this,wt),this);if(!Ke){var yt=ut.pipes,lt=ut.pipesCount;ut.pipes=null,ut.pipesCount=0,ut.flowing=!1;for(var Qe=0;Qe<lt;Qe++)yt[Qe].emit("unpipe",this,wt);return this}var We=bt(ut.pipes,Ke);return We===-1?this:(ut.pipes.splice(We,1),ut.pipesCount-=1,ut.pipesCount===1&&(ut.pipes=ut.pipes[0]),Ke.emit("unpipe",this,wt),this)},Oe.prototype.on=function(Ke,ut){var wt=xe.prototype.on.call(this,Ke,ut);if(Ke==="data")this._readableState.flowing!==!1&&this.resume();else if(Ke==="readable"){var yt=this._readableState;!yt.endEmitted&&!yt.readableListening&&(yt.readableListening=yt.needReadable=!0,yt.emittedReadable=!1,yt.reading?yt.length&&Lt(this):be.nextTick(Mt,this))}return wt},Oe.prototype.addListener=Oe.prototype.on;function Mt(Ke){ue("readable nexttick read 0"),Ke.read(0)}Oe.prototype.resume=function(){var Ke=this._readableState;return Ke.flowing||(ue("resume"),Ke.flowing=!0,mt(this,Ke)),this};function mt(Ke,ut){ut.resumeScheduled||(ut.resumeScheduled=!0,be.nextTick(pt,Ke,ut))}function pt(Ke,ut){ut.reading||(ue("resume read 0"),Ke.read(0)),ut.resumeScheduled=!1,ut.awaitDrain=0,Ke.emit("resume"),vt(Ke),ut.flowing&&!ut.reading&&Ke.read(0)}Oe.prototype.pause=function(){return ue("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(ue("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function vt(Ke){var ut=Ke._readableState;for(ue("flow",ut.flowing);ut.flowing&&Ke.read()!==null;);}Oe.prototype.wrap=function(Ke){var ut=this,wt=this._readableState,yt=!1;Ke.on("end",function(){if(ue("wrapped end"),wt.decoder&&!wt.ended){var We=wt.decoder.end();We&&We.length&&ut.push(We)}ut.push(null)}),Ke.on("data",function(We){if(ue("wrapped data"),wt.decoder&&(We=wt.decoder.write(We)),!(wt.objectMode&&We==null)&&!(!wt.objectMode&&(!We||!We.length))){var Ue=ut.push(We);Ue||(yt=!0,Ke.pause())}});for(var lt in Ke)this[lt]===void 0&&typeof Ke[lt]=="function"&&(this[lt]=function(We){return function(){return Ke[We].apply(Ke,arguments)}}(lt));for(var Qe=0;Qe<Ie.length;Qe++)Ke.on(Ie[Qe],this.emit.bind(this,Ie[Qe]));return this._read=function(We){ue("wrapped _read",We),yt&&(yt=!1,Ke.resume())},this},Object.defineProperty(Oe.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Oe._fromList=jt;function jt(Ke,ut){if(ut.length===0)return null;var wt;return ut.objectMode?wt=ut.buffer.shift():!Ke||Ke>=ut.length?(ut.decoder?wt=ut.buffer.join(""):ut.buffer.length===1?wt=ut.buffer.head.data:wt=ut.buffer.concat(ut.length),ut.buffer.clear()):wt=At(Ke,ut.buffer,ut.decoder),wt}function At(Ke,ut,wt){var yt;return Ke<ut.head.data.length?(yt=ut.head.data.slice(0,Ke),ut.head.data=ut.head.data.slice(Ke)):Ke===ut.head.data.length?yt=ut.shift():yt=wt?Kt(Ke,ut):Ct(Ke,ut),yt}function Kt(Ke,ut){var wt=ut.head,yt=1,lt=wt.data;for(Ke-=lt.length;wt=wt.next;){var Qe=wt.data,We=Ke>Qe.length?Qe.length:Ke;if(We===Qe.length?lt+=Qe:lt+=Qe.slice(0,Ke),Ke-=We,Ke===0){We===Qe.length?(++yt,wt.next?ut.head=wt.next:ut.head=ut.tail=null):(ut.head=wt,wt.data=Qe.slice(We));break}++yt}return ut.length-=yt,lt}function Ct(Ke,ut){var wt=fe.allocUnsafe(Ke),yt=ut.head,lt=1;for(yt.data.copy(wt),Ke-=yt.data.length;yt=yt.next;){var Qe=yt.data,We=Ke>Qe.length?Qe.length:Ke;if(Qe.copy(wt,wt.length-Ke,0,We),Ke-=We,Ke===0){We===Qe.length?(++lt,yt.next?ut.head=yt.next:ut.head=ut.tail=null):(ut.head=yt,yt.data=Qe.slice(We));break}++lt}return ut.length-=lt,wt}function gt(Ke){var ut=Ke._readableState;if(ut.length>0)throw new Error('"endReadable()" called on non-empty stream');ut.endEmitted||(ut.ended=!0,be.nextTick(tt,ut,Ke))}function tt(Ke,ut){!Ke.endEmitted&&Ke.length===0&&(Ke.endEmitted=!0,ut.readable=!1,ut.emit("end"))}function bt(Ke,ut){for(var wt=0,yt=Ke.length;wt<yt;wt++)if(Ke[wt]===ut)return wt;return-1}}).call(this)}).call(this,ie("_process"),typeof ln!="undefined"?ln:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":386,"./internal/streams/BufferList":391,"./internal/streams/destroy":392,"./internal/streams/stream":393,_process:467,"core-util-is":341,events:344,inherits:364,isarray:370,"process-nextick-args":380,"safe-buffer":396,"string_decoder/":413,util:89}],389:[function(ie,Re,je){"use strict";Re.exports=Ce;var ve=ie("./_stream_duplex"),ce=Object.create(ie("core-util-is"));ce.inherits=ie("inherits"),ce.inherits(Ce,ve);function be(me,xe){var fe=this._transformState;fe.transforming=!1;var z=fe.writecb;if(!z)return this.emit("error",new Error("write callback called multiple times"));fe.writechunk=null,fe.writecb=null,xe!=null&&this.push(xe),z(me);var ee=this._readableState;ee.reading=!1,(ee.needReadable||ee.length<ee.highWaterMark)&&this._read(ee.highWaterMark)}function Ce(me){if(!(this instanceof Ce))return new Ce(me);ve.call(this,me),this._transformState={afterTransform:be.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,me&&(typeof me.transform=="function"&&(this._transform=me.transform),typeof me.flush=="function"&&(this._flush=me.flush)),this.on("prefinish",ye)}function ye(){var me=this;typeof this._flush=="function"?this._flush(function(xe,fe){we(me,xe,fe)}):we(this,null,null)}Ce.prototype.push=function(me,xe){return this._transformState.needTransform=!1,ve.prototype.push.call(this,me,xe)},Ce.prototype._transform=function(me,xe,fe){throw new Error("_transform() is not implemented")},Ce.prototype._write=function(me,xe,fe){var z=this._transformState;if(z.writecb=fe,z.writechunk=me,z.writeencoding=xe,!z.transforming){var ee=this._readableState;(z.needTransform||ee.needReadable||ee.length<ee.highWaterMark)&&this._read(ee.highWaterMark)}},Ce.prototype._read=function(me){var xe=this._transformState;xe.writechunk!==null&&xe.writecb&&!xe.transforming?(xe.transforming=!0,this._transform(xe.writechunk,xe.writeencoding,xe.afterTransform)):xe.needTransform=!0},Ce.prototype._destroy=function(me,xe){var fe=this;ve.prototype._destroy.call(this,me,function(z){xe(z),fe.emit("close")})};function we(me,xe,fe){if(xe)return me.emit("error",xe);if(fe!=null&&me.push(fe),me._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(me._transformState.transforming)throw new Error("Calling transform done when still transforming");return me.push(null)}},{"./_stream_duplex":386,"core-util-is":341,inherits:364}],390:[function(ie,Re,je){(function(ve,ce,be){(function(){"use strict";var Ce=ie("process-nextick-args");Re.exports=ke;function ye(pt,vt,jt){this.chunk=pt,this.encoding=vt,this.callback=jt,this.next=null}function we(pt){var vt=this;this.next=null,this.entry=null,this.finish=function(){mt(vt,pt)}}var me=!ve.browser&&["v0.10","v0.9."].indexOf(ve.version.slice(0,5))>-1?be:Ce.nextTick,xe;ke.WritableState=Pe;var fe=Object.create(ie("core-util-is"));fe.inherits=ie("inherits");var z={deprecate:ie("util-deprecate")},ee=ie("./internal/streams/stream"),ae=ie("safe-buffer").Buffer,re=ce.Uint8Array||function(){};function le(pt){return ae.from(pt)}function ue(pt){return ae.isBuffer(pt)||pt instanceof re}var pe=ie("./internal/streams/destroy");fe.inherits(ke,ee);function Ee(){}function Pe(pt,vt){xe=xe||ie("./_stream_duplex"),pt=pt||{};var jt=vt instanceof xe;this.objectMode=!!pt.objectMode,jt&&(this.objectMode=this.objectMode||!!pt.writableObjectMode);var At=pt.highWaterMark,Kt=pt.writableHighWaterMark,Ct=this.objectMode?16:16*1024;At||At===0?this.highWaterMark=At:jt&&(Kt||Kt===0)?this.highWaterMark=Kt:this.highWaterMark=Ct,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 gt=pt.decodeStrings===!1;this.decodeStrings=!gt,this.defaultEncoding=pt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(tt){st(vt,tt)},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 we(this)}Pe.prototype.getBuffer=function(){for(var vt=this.bufferedRequest,jt=[];vt;)jt.push(vt),vt=vt.next;return jt},function(){try{Object.defineProperty(Pe.prototype,"buffer",{get:z.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(pt){}}();var Ie;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Ie=Function.prototype[Symbol.hasInstance],Object.defineProperty(ke,Symbol.hasInstance,{value:function(pt){return Ie.call(this,pt)?!0:this!==ke?!1:pt&&pt._writableState instanceof Pe}})):Ie=function(pt){return pt instanceof this};function ke(pt){if(xe=xe||ie("./_stream_duplex"),!Ie.call(ke,this)&&!(this instanceof xe))return new ke(pt);this._writableState=new Pe(pt,this),this.writable=!0,pt&&(typeof pt.write=="function"&&(this._write=pt.write),typeof pt.writev=="function"&&(this._writev=pt.writev),typeof pt.destroy=="function"&&(this._destroy=pt.destroy),typeof pt.final=="function"&&(this._final=pt.final)),ee.call(this)}ke.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function Ae(pt,vt){var jt=new Error("write after end");pt.emit("error",jt),Ce.nextTick(vt,jt)}function Oe(pt,vt,jt,At){var Kt=!0,Ct=!1;return jt===null?Ct=new TypeError("May not write null values to stream"):typeof jt!="string"&&jt!==void 0&&!vt.objectMode&&(Ct=new TypeError("Invalid non-string/buffer chunk")),Ct&&(pt.emit("error",Ct),Ce.nextTick(At,Ct),Kt=!1),Kt}ke.prototype.write=function(pt,vt,jt){var At=this._writableState,Kt=!1,Ct=!At.objectMode&&ue(pt);return Ct&&!ae.isBuffer(pt)&&(pt=le(pt)),typeof vt=="function"&&(jt=vt,vt=null),Ct?vt="buffer":vt||(vt=At.defaultEncoding),typeof jt!="function"&&(jt=Ee),At.ended?Ae(this,jt):(Ct||Oe(this,At,pt,jt))&&(At.pendingcb++,Kt=_e(this,At,Ct,pt,vt,jt)),Kt},ke.prototype.cork=function(){var pt=this._writableState;pt.corked++},ke.prototype.uncork=function(){var pt=this._writableState;pt.corked&&(pt.corked--,!pt.writing&&!pt.corked&&!pt.finished&&!pt.bufferProcessing&&pt.bufferedRequest&&Lt(this,pt))},ke.prototype.setDefaultEncoding=function(vt){if(typeof vt=="string"&&(vt=vt.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((vt+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+vt);return this._writableState.defaultEncoding=vt,this};function Fe(pt,vt,jt){return!pt.objectMode&&pt.decodeStrings!==!1&&typeof vt=="string"&&(vt=ae.from(vt,jt)),vt}Object.defineProperty(ke.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function _e(pt,vt,jt,At,Kt,Ct){if(!jt){var gt=Fe(vt,At,Kt);At!==gt&&(jt=!0,Kt="buffer",At=gt)}var tt=vt.objectMode?1:At.length;vt.length+=tt;var bt=vt.length<vt.highWaterMark;if(bt||(vt.needDrain=!0),vt.writing||vt.corked){var Ke=vt.lastBufferedRequest;vt.lastBufferedRequest={chunk:At,encoding:Kt,isBuf:jt,callback:Ct,next:null},Ke?Ke.next=vt.lastBufferedRequest:vt.bufferedRequest=vt.lastBufferedRequest,vt.bufferedRequestCount+=1}else Ye(pt,vt,!1,tt,At,Kt,Ct);return bt}function Ye(pt,vt,jt,At,Kt,Ct,gt){vt.writelen=At,vt.writecb=gt,vt.writing=!0,vt.sync=!0,jt?pt._writev(Kt,vt.onwrite):pt._write(Kt,Ct,vt.onwrite),vt.sync=!1}function ze(pt,vt,jt,At,Kt){--vt.pendingcb,jt?(Ce.nextTick(Kt,At),Ce.nextTick(Et,pt,vt),pt._writableState.errorEmitted=!0,pt.emit("error",At)):(Kt(At),pt._writableState.errorEmitted=!0,pt.emit("error",At),Et(pt,vt))}function Xe(pt){pt.writing=!1,pt.writecb=null,pt.length-=pt.writelen,pt.writelen=0}function st(pt,vt){var jt=pt._writableState,At=jt.sync,Kt=jt.writecb;if(Xe(jt),vt)ze(pt,jt,At,vt,Kt);else{var Ct=et(jt);!Ct&&!jt.corked&&!jt.bufferProcessing&&jt.bufferedRequest&&Lt(pt,jt),At?me(ht,pt,jt,Ct,Kt):ht(pt,jt,Ct,Kt)}}function ht(pt,vt,jt,At){jt||ft(pt,vt),vt.pendingcb--,At(),Et(pt,vt)}function ft(pt,vt){vt.length===0&&vt.needDrain&&(vt.needDrain=!1,pt.emit("drain"))}function Lt(pt,vt){vt.bufferProcessing=!0;var jt=vt.bufferedRequest;if(pt._writev&&jt&&jt.next){var At=vt.bufferedRequestCount,Kt=new Array(At),Ct=vt.corkedRequestsFree;Ct.entry=jt;for(var gt=0,tt=!0;jt;)Kt[gt]=jt,jt.isBuf||(tt=!1),jt=jt.next,gt+=1;Kt.allBuffers=tt,Ye(pt,vt,!0,vt.length,Kt,"",Ct.finish),vt.pendingcb++,vt.lastBufferedRequest=null,Ct.next?(vt.corkedRequestsFree=Ct.next,Ct.next=null):vt.corkedRequestsFree=new we(vt),vt.bufferedRequestCount=0}else{for(;jt;){var bt=jt.chunk,Ke=jt.encoding,ut=jt.callback,wt=vt.objectMode?1:bt.length;if(Ye(pt,vt,!1,wt,bt,Ke,ut),jt=jt.next,vt.bufferedRequestCount--,vt.writing)break}jt===null&&(vt.lastBufferedRequest=null)}vt.bufferedRequest=jt,vt.bufferProcessing=!1}ke.prototype._write=function(pt,vt,jt){jt(new Error("_write() is not implemented"))},ke.prototype._writev=null,ke.prototype.end=function(pt,vt,jt){var At=this._writableState;typeof pt=="function"?(jt=pt,pt=null,vt=null):typeof vt=="function"&&(jt=vt,vt=null),pt!=null&&this.write(pt,vt),At.corked&&(At.corked=1,this.uncork()),!At.ending&&!At.finished&&Mt(this,At,jt)};function et(pt){return pt.ending&&pt.length===0&&pt.bufferedRequest===null&&!pt.finished&&!pt.writing}function it(pt,vt){pt._final(function(jt){vt.pendingcb--,jt&&pt.emit("error",jt),vt.prefinished=!0,pt.emit("prefinish"),Et(pt,vt)})}function xt(pt,vt){!vt.prefinished&&!vt.finalCalled&&(typeof pt._final=="function"?(vt.pendingcb++,vt.finalCalled=!0,Ce.nextTick(it,pt,vt)):(vt.prefinished=!0,pt.emit("prefinish")))}function Et(pt,vt){var jt=et(vt);return jt&&(xt(pt,vt),vt.pendingcb===0&&(vt.finished=!0,pt.emit("finish"))),jt}function Mt(pt,vt,jt){vt.ending=!0,Et(pt,vt),jt&&(vt.finished?Ce.nextTick(jt):pt.once("finish",jt)),vt.ended=!0,pt.writable=!1}function mt(pt,vt,jt){var At=pt.entry;for(pt.entry=null;At;){var Kt=At.callback;vt.pendingcb--,Kt(jt),At=At.next}vt.corkedRequestsFree?vt.corkedRequestsFree.next=pt:vt.corkedRequestsFree=pt}Object.defineProperty(ke.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(pt){this._writableState&&(this._writableState.destroyed=pt)}}),ke.prototype.destroy=pe.destroy,ke.prototype._undestroy=pe.undestroy,ke.prototype._destroy=function(pt,vt){this.end(),vt(pt)}}).call(this)}).call(this,ie("_process"),typeof ln!="undefined"?ln:typeof self!="undefined"?self:typeof window!="undefined"?window:{},ie("timers").setImmediate)},{"./_stream_duplex":386,"./internal/streams/destroy":392,"./internal/streams/stream":393,_process:467,"core-util-is":341,inherits:364,"process-nextick-args":380,"safe-buffer":396,timers:414,"util-deprecate":416}],391:[function(ie,Re,je){"use strict";function ve(ye,we){if(!(ye instanceof we))throw new TypeError("Cannot call a class as a function")}var ce=ie("safe-buffer").Buffer,be=ie("util");function Ce(ye,we,me){ye.copy(we,me)}Re.exports=function(){function ye(){ve(this,ye),this.head=null,this.tail=null,this.length=0}return ye.prototype.push=function(me){var xe={data:me,next:null};this.length>0?this.tail.next=xe:this.head=xe,this.tail=xe,++this.length},ye.prototype.unshift=function(me){var xe={data:me,next:this.head};this.length===0&&(this.tail=xe),this.head=xe,++this.length},ye.prototype.shift=function(){if(this.length!==0){var me=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,me}},ye.prototype.clear=function(){this.head=this.tail=null,this.length=0},ye.prototype.join=function(me){if(this.length===0)return"";for(var xe=this.head,fe=""+xe.data;xe=xe.next;)fe+=me+xe.data;return fe},ye.prototype.concat=function(me){if(this.length===0)return ce.alloc(0);if(this.length===1)return this.head.data;for(var xe=ce.allocUnsafe(me>>>0),fe=this.head,z=0;fe;)Ce(fe.data,xe,z),z+=fe.data.length,fe=fe.next;return xe},ye}(),be&&be.inspect&&be.inspect.custom&&(Re.exports.prototype[be.inspect.custom]=function(){var ye=be.inspect({length:this.length});return this.constructor.name+" "+ye})},{"safe-buffer":396,util:89}],392:[function(ie,Re,je){"use strict";var ve=ie("process-nextick-args");function ce(ye,we){var me=this,xe=this._readableState&&this._readableState.destroyed,fe=this._writableState&&this._writableState.destroyed;return xe||fe?(we?we(ye):ye&&(!this._writableState||!this._writableState.errorEmitted)&&ve.nextTick(Ce,this,ye),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(ye||null,function(z){!we&&z?(ve.nextTick(Ce,me,z),me._writableState&&(me._writableState.errorEmitted=!0)):we&&we(z)}),this)}function be(){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 Ce(ye,we){ye.emit("error",we)}Re.exports={destroy:ce,undestroy:be}},{"process-nextick-args":380}],393:[function(ie,Re,je){Re.exports=ie("events").EventEmitter},{events:344}],394:[function(ie,Re,je){je=Re.exports=ie("./lib/_stream_readable.js"),je.Stream=je,je.Readable=je,je.Writable=ie("./lib/_stream_writable.js"),je.Duplex=ie("./lib/_stream_duplex.js"),je.Transform=ie("./lib/_stream_transform.js"),je.PassThrough=ie("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":386,"./lib/_stream_passthrough.js":387,"./lib/_stream_readable.js":388,"./lib/_stream_transform.js":389,"./lib/_stream_writable.js":390}],395:[function(ie,Re,je){var ve=function(ce){"use strict";var be=Object.prototype,Ce=be.hasOwnProperty,ye,we=typeof Symbol=="function"?Symbol:{},me=we.iterator||"@@iterator",xe=we.asyncIterator||"@@asyncIterator",fe=we.toStringTag||"@@toStringTag";function z(xt,Et,Mt){return Object.defineProperty(xt,Et,{value:Mt,enumerable:!0,configurable:!0,writable:!0}),xt[Et]}try{z({},"")}catch(xt){z=function(Et,Mt,mt){return Et[Mt]=mt}}function ee(xt,Et,Mt,mt){var pt=Et&&Et.prototype instanceof Pe?Et:Pe,vt=Object.create(pt.prototype),jt=new Lt(mt||[]);return vt._invoke=Xe(xt,Mt,jt),vt}ce.wrap=ee;function ae(xt,Et,Mt){try{return{type:"normal",arg:xt.call(Et,Mt)}}catch(mt){return{type:"throw",arg:mt}}}var re="suspendedStart",le="suspendedYield",ue="executing",pe="completed",Ee={};function Pe(){}function Ie(){}function ke(){}var Ae={};z(Ae,me,function(){return this});var Oe=Object.getPrototypeOf,Fe=Oe&&Oe(Oe(et([])));Fe&&Fe!==be&&Ce.call(Fe,me)&&(Ae=Fe);var _e=ke.prototype=Pe.prototype=Object.create(Ae);Ie.prototype=ke,z(_e,"constructor",ke),z(ke,"constructor",Ie),Ie.displayName=z(ke,fe,"GeneratorFunction");function Ye(xt){["next","throw","return"].forEach(function(Et){z(xt,Et,function(Mt){return this._invoke(Et,Mt)})})}ce.isGeneratorFunction=function(xt){var Et=typeof xt=="function"&&xt.constructor;return Et?Et===Ie||(Et.displayName||Et.name)==="GeneratorFunction":!1},ce.mark=function(xt){return Object.setPrototypeOf?Object.setPrototypeOf(xt,ke):(xt.__proto__=ke,z(xt,fe,"GeneratorFunction")),xt.prototype=Object.create(_e),xt},ce.awrap=function(xt){return{__await:xt}};function ze(xt,Et){function Mt(vt,jt,At,Kt){var Ct=ae(xt[vt],xt,jt);if(Ct.type==="throw")Kt(Ct.arg);else{var gt=Ct.arg,tt=gt.value;return tt&&typeof tt=="object"&&Ce.call(tt,"__await")?Et.resolve(tt.__await).then(function(bt){Mt("next",bt,At,Kt)},function(bt){Mt("throw",bt,At,Kt)}):Et.resolve(tt).then(function(bt){gt.value=bt,At(gt)},function(bt){return Mt("throw",bt,At,Kt)})}}var mt;function pt(vt,jt){function At(){return new Et(function(Kt,Ct){Mt(vt,jt,Kt,Ct)})}return mt=mt?mt.then(At,At):At()}this._invoke=pt}Ye(ze.prototype),z(ze.prototype,xe,function(){return this}),ce.AsyncIterator=ze,ce.async=function(xt,Et,Mt,mt,pt){pt===void 0&&(pt=Promise);var vt=new ze(ee(xt,Et,Mt,mt),pt);return ce.isGeneratorFunction(Et)?vt:vt.next().then(function(jt){return jt.done?jt.value:vt.next()})};function Xe(xt,Et,Mt){var mt=re;return function(vt,jt){if(mt===ue)throw new Error("Generator is already running");if(mt===pe){if(vt==="throw")throw jt;return it()}for(Mt.method=vt,Mt.arg=jt;;){var At=Mt.delegate;if(At){var Kt=st(At,Mt);if(Kt){if(Kt===Ee)continue;return Kt}}if(Mt.method==="next")Mt.sent=Mt._sent=Mt.arg;else if(Mt.method==="throw"){if(mt===re)throw mt=pe,Mt.arg;Mt.dispatchException(Mt.arg)}else Mt.method==="return"&&Mt.abrupt("return",Mt.arg);mt=ue;var Ct=ae(xt,Et,Mt);if(Ct.type==="normal"){if(mt=Mt.done?pe:le,Ct.arg===Ee)continue;return{value:Ct.arg,done:Mt.done}}else Ct.type==="throw"&&(mt=pe,Mt.method="throw",Mt.arg=Ct.arg)}}}function st(xt,Et){var Mt=xt.iterator[Et.method];if(Mt===ye){if(Et.delegate=null,Et.method==="throw"){if(xt.iterator.return&&(Et.method="return",Et.arg=ye,st(xt,Et),Et.method==="throw"))return Ee;Et.method="throw",Et.arg=new TypeError("The iterator does not provide a 'throw' method")}return Ee}var mt=ae(Mt,xt.iterator,Et.arg);if(mt.type==="throw")return Et.method="throw",Et.arg=mt.arg,Et.delegate=null,Ee;var pt=mt.arg;if(!pt)return Et.method="throw",Et.arg=new TypeError("iterator result is not an object"),Et.delegate=null,Ee;if(pt.done)Et[xt.resultName]=pt.value,Et.next=xt.nextLoc,Et.method!=="return"&&(Et.method="next",Et.arg=ye);else return pt;return Et.delegate=null,Ee}Ye(_e),z(_e,fe,"Generator"),z(_e,me,function(){return this}),z(_e,"toString",function(){return"[object Generator]"});function ht(xt){var Et={tryLoc:xt[0]};1 in xt&&(Et.catchLoc=xt[1]),2 in xt&&(Et.finallyLoc=xt[2],Et.afterLoc=xt[3]),this.tryEntries.push(Et)}function ft(xt){var Et=xt.completion||{};Et.type="normal",delete Et.arg,xt.completion=Et}function Lt(xt){this.tryEntries=[{tryLoc:"root"}],xt.forEach(ht,this),this.reset(!0)}ce.keys=function(xt){var Et=[];for(var Mt in xt)Et.push(Mt);return Et.reverse(),function mt(){for(;Et.length;){var pt=Et.pop();if(pt in xt)return mt.value=pt,mt.done=!1,mt}return mt.done=!0,mt}};function et(xt){if(xt){var Et=xt[me];if(Et)return Et.call(xt);if(typeof xt.next=="function")return xt;if(!isNaN(xt.length)){var Mt=-1,mt=function pt(){for(;++Mt<xt.length;)if(Ce.call(xt,Mt))return pt.value=xt[Mt],pt.done=!1,pt;return pt.value=ye,pt.done=!0,pt};return mt.next=mt}}return{next:it}}ce.values=et;function it(){return{value:ye,done:!0}}return Lt.prototype={constructor:Lt,reset:function(xt){if(this.prev=0,this.next=0,this.sent=this._sent=ye,this.done=!1,this.delegate=null,this.method="next",this.arg=ye,this.tryEntries.forEach(ft),!xt)for(var Et in this)Et.charAt(0)==="t"&&Ce.call(this,Et)&&!isNaN(+Et.slice(1))&&(this[Et]=ye)},stop:function(){this.done=!0;var xt=this.tryEntries[0],Et=xt.completion;if(Et.type==="throw")throw Et.arg;return this.rval},dispatchException:function(xt){if(this.done)throw xt;var Et=this;function Mt(Kt,Ct){return vt.type="throw",vt.arg=xt,Et.next=Kt,Ct&&(Et.method="next",Et.arg=ye),!!Ct}for(var mt=this.tryEntries.length-1;mt>=0;--mt){var pt=this.tryEntries[mt],vt=pt.completion;if(pt.tryLoc==="root")return Mt("end");if(pt.tryLoc<=this.prev){var jt=Ce.call(pt,"catchLoc"),At=Ce.call(pt,"finallyLoc");if(jt&&At){if(this.prev<pt.catchLoc)return Mt(pt.catchLoc,!0);if(this.prev<pt.finallyLoc)return Mt(pt.finallyLoc)}else if(jt){if(this.prev<pt.catchLoc)return Mt(pt.catchLoc,!0)}else if(At){if(this.prev<pt.finallyLoc)return Mt(pt.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(xt,Et){for(var Mt=this.tryEntries.length-1;Mt>=0;--Mt){var mt=this.tryEntries[Mt];if(mt.tryLoc<=this.prev&&Ce.call(mt,"finallyLoc")&&this.prev<mt.finallyLoc){var pt=mt;break}}pt&&(xt==="break"||xt==="continue")&&pt.tryLoc<=Et&&Et<=pt.finallyLoc&&(pt=null);var vt=pt?pt.completion:{};return vt.type=xt,vt.arg=Et,pt?(this.method="next",this.next=pt.finallyLoc,Ee):this.complete(vt)},complete:function(xt,Et){if(xt.type==="throw")throw xt.arg;return xt.type==="break"||xt.type==="continue"?this.next=xt.arg:xt.type==="return"?(this.rval=this.arg=xt.arg,this.method="return",this.next="end"):xt.type==="normal"&&Et&&(this.next=Et),Ee},finish:function(xt){for(var Et=this.tryEntries.length-1;Et>=0;--Et){var Mt=this.tryEntries[Et];if(Mt.finallyLoc===xt)return this.complete(Mt.completion,Mt.afterLoc),ft(Mt),Ee}},catch:function(xt){for(var Et=this.tryEntries.length-1;Et>=0;--Et){var Mt=this.tryEntries[Et];if(Mt.tryLoc===xt){var mt=Mt.completion;if(mt.type==="throw"){var pt=mt.arg;ft(Mt)}return pt}}throw new Error("illegal catch attempt")},delegateYield:function(xt,Et,Mt){return this.delegate={iterator:et(xt),resultName:Et,nextLoc:Mt},this.method==="next"&&(this.arg=ye),Ee}},ce}(typeof Re=="object"?Re.exports:{});try{regeneratorRuntime=ve}catch(ce){typeof globalThis=="object"?globalThis.regeneratorRuntime=ve:Function("r","regeneratorRuntime = r")(ve)}},{}],396:[function(ie,Re,je){var ve=ie("buffer"),ce=ve.Buffer;function be(ye,we){for(var me in ye)we[me]=ye[me]}ce.from&&ce.alloc&&ce.allocUnsafe&&ce.allocUnsafeSlow?Re.exports=ve:(be(ve,je),je.Buffer=Ce);function Ce(ye,we,me){return ce(ye,we,me)}be(ce,Ce),Ce.from=function(ye,we,me){if(typeof ye=="number")throw new TypeError("Argument must not be a number");return ce(ye,we,me)},Ce.alloc=function(ye,we,me){if(typeof ye!="number")throw new TypeError("Argument must be a number");var xe=ce(ye);return we!==void 0?typeof me=="string"?xe.fill(we,me):xe.fill(we):xe.fill(0),xe},Ce.allocUnsafe=function(ye){if(typeof ye!="number")throw new TypeError("Argument must be a number");return ce(ye)},Ce.allocUnsafeSlow=function(ye){if(typeof ye!="number")throw new TypeError("Argument must be a number");return ve.SlowBuffer(ye)}},{buffer:90}],397:[function(ie,Re,je){(function(ve){(function(){(function(ce){ce.parser=function(gt,tt){return new Ce(gt,tt)},ce.SAXParser=Ce,ce.SAXStream=ee,ce.createStream=z,ce.MAX_BUFFER_LENGTH=64*1024;var be=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];ce.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function Ce(gt,tt){if(!(this instanceof Ce))return new Ce(gt,tt);var bt=this;we(bt),bt.q=bt.c="",bt.bufferCheckPosition=ce.MAX_BUFFER_LENGTH,bt.opt=tt||{},bt.opt.lowercase=bt.opt.lowercase||bt.opt.lowercasetags,bt.looseCase=bt.opt.lowercase?"toLowerCase":"toUpperCase",bt.tags=[],bt.closed=bt.closedRoot=bt.sawRoot=!1,bt.tag=bt.error=null,bt.strict=!!gt,bt.noscript=!!(gt||bt.opt.noscript),bt.state=ze.BEGIN,bt.strictEntities=bt.opt.strictEntities,bt.ENTITIES=bt.strictEntities?Object.create(ce.XML_ENTITIES):Object.create(ce.ENTITIES),bt.attribList=[],bt.opt.xmlns&&(bt.ns=Object.create(pe)),bt.trackPosition=bt.opt.position!==!1,bt.trackPosition&&(bt.position=bt.line=bt.column=0),st(bt,"onready")}Object.create||(Object.create=function(gt){function tt(){}tt.prototype=gt;var bt=new tt;return bt}),Object.keys||(Object.keys=function(gt){var tt=[];for(var bt in gt)gt.hasOwnProperty(bt)&&tt.push(bt);return tt});function ye(gt){for(var tt=Math.max(ce.MAX_BUFFER_LENGTH,10),bt=0,Ke=0,ut=be.length;Ke<ut;Ke++){var wt=gt[be[Ke]].length;if(wt>tt)switch(be[Ke]){case"textNode":ft(gt);break;case"cdata":ht(gt,"oncdata",gt.cdata),gt.cdata="";break;case"script":ht(gt,"onscript",gt.script),gt.script="";break;default:et(gt,"Max buffer length exceeded: "+be[Ke])}bt=Math.max(bt,wt)}var yt=ce.MAX_BUFFER_LENGTH-bt;gt.bufferCheckPosition=yt+gt.position}function we(gt){for(var tt=0,bt=be.length;tt<bt;tt++)gt[be[tt]]=""}function me(gt){ft(gt),gt.cdata!==""&&(ht(gt,"oncdata",gt.cdata),gt.cdata=""),gt.script!==""&&(ht(gt,"onscript",gt.script),gt.script="")}Ce.prototype={end:function(){it(this)},write:Ct,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){me(this)}};var xe;try{xe=ie("stream").Stream}catch(gt){xe=function(){}}var fe=ce.EVENTS.filter(function(gt){return gt!=="error"&&gt!=="end"});function z(gt,tt){return new ee(gt,tt)}function ee(gt,tt){if(!(this instanceof ee))return new ee(gt,tt);xe.apply(this),this._parser=new Ce(gt,tt),this.writable=!0,this.readable=!0;var bt=this;this._parser.onend=function(){bt.emit("end")},this._parser.onerror=function(Ke){bt.emit("error",Ke),bt._parser.error=null},this._decoder=null,fe.forEach(function(Ke){Object.defineProperty(bt,"on"+Ke,{get:function(){return bt._parser["on"+Ke]},set:function(ut){if(!ut)return bt.removeAllListeners(Ke),bt._parser["on"+Ke]=ut,ut;bt.on(Ke,ut)},enumerable:!0,configurable:!1})})}ee.prototype=Object.create(xe.prototype,{constructor:{value:ee}}),ee.prototype.write=function(gt){if(typeof ve=="function"&&typeof ve.isBuffer=="function"&&ve.isBuffer(gt)){if(!this._decoder){var tt=ie("string_decoder").StringDecoder;this._decoder=new tt("utf8")}gt=this._decoder.write(gt)}return this._parser.write(gt.toString()),this.emit("data",gt),!0},ee.prototype.end=function(gt){return gt&&gt.length&&this.write(gt),this._parser.end(),!0},ee.prototype.on=function(gt,tt){var bt=this;return!bt._parser["on"+gt]&&fe.indexOf(gt)!==-1&&(bt._parser["on"+gt]=function(){var Ke=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);Ke.splice(0,0,gt),bt.emit.apply(bt,Ke)}),xe.prototype.on.call(bt,gt,tt)};var ae="[CDATA[",re="DOCTYPE",le="http://www.w3.org/XML/1998/namespace",ue="http://www.w3.org/2000/xmlns/",pe={xml:le,xmlns:ue},Ee=/[:_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]/,Pe=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,Ie=/[#:_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]/,ke=/[#:_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-]/;function Ae(gt){return gt===" "||gt===`
`||gt==="\r"||gt===" "}function Oe(gt){return gt==='"'||gt==="'"}function Fe(gt){return gt===">"||Ae(gt)}function _e(gt,tt){return gt.test(tt)}function Ye(gt,tt){return!_e(gt,tt)}var ze=0;ce.STATE={BEGIN:ze++,BEGIN_WHITESPACE:ze++,TEXT:ze++,TEXT_ENTITY:ze++,OPEN_WAKA:ze++,SGML_DECL:ze++,SGML_DECL_QUOTED:ze++,DOCTYPE:ze++,DOCTYPE_QUOTED:ze++,DOCTYPE_DTD:ze++,DOCTYPE_DTD_QUOTED:ze++,COMMENT_STARTING:ze++,COMMENT:ze++,COMMENT_ENDING:ze++,COMMENT_ENDED:ze++,CDATA:ze++,CDATA_ENDING:ze++,CDATA_ENDING_2:ze++,PROC_INST:ze++,PROC_INST_BODY:ze++,PROC_INST_ENDING:ze++,OPEN_TAG:ze++,OPEN_TAG_SLASH:ze++,ATTRIB:ze++,ATTRIB_NAME:ze++,ATTRIB_NAME_SAW_WHITE:ze++,ATTRIB_VALUE:ze++,ATTRIB_VALUE_QUOTED:ze++,ATTRIB_VALUE_CLOSED:ze++,ATTRIB_VALUE_UNQUOTED:ze++,ATTRIB_VALUE_ENTITY_Q:ze++,ATTRIB_VALUE_ENTITY_U:ze++,CLOSE_TAG:ze++,CLOSE_TAG_SAW_WHITE:ze++,SCRIPT:ze++,SCRIPT_ENDING:ze++},ce.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},ce.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},Object.keys(ce.ENTITIES).forEach(function(gt){var tt=ce.ENTITIES[gt],bt=typeof tt=="number"?String.fromCharCode(tt):tt;ce.ENTITIES[gt]=bt});for(var Xe in ce.STATE)ce.STATE[ce.STATE[Xe]]=Xe;ze=ce.STATE;function st(gt,tt,bt){gt[tt]&&gt[tt](bt)}function ht(gt,tt,bt){gt.textNode&&ft(gt),st(gt,tt,bt)}function ft(gt){gt.textNode=Lt(gt.opt,gt.textNode),gt.textNode&&st(gt,"ontext",gt.textNode),gt.textNode=""}function Lt(gt,tt){return gt.trim&&(tt=tt.trim()),gt.normalize&&(tt=tt.replace(/\s+/g," ")),tt}function et(gt,tt){return ft(gt),gt.trackPosition&&(tt+=`
Line: `+gt.line+`
Column: `+gt.column+`
Char: `+gt.c),tt=new Error(tt),gt.error=tt,st(gt,"onerror",tt),gt}function it(gt){return gt.sawRoot&&!gt.closedRoot&&xt(gt,"Unclosed root tag"),gt.state!==ze.BEGIN&&gt.state!==ze.BEGIN_WHITESPACE&&gt.state!==ze.TEXT&&et(gt,"Unexpected end"),ft(gt),gt.c="",gt.closed=!0,st(gt,"onend"),Ce.call(gt,gt.strict,gt.opt),gt}function xt(gt,tt){if(typeof gt!="object"||!(gt instanceof Ce))throw new Error("bad call to strictFail");gt.strict&&et(gt,tt)}function Et(gt){gt.strict||(gt.tagName=gt.tagName[gt.looseCase]());var tt=gt.tags[gt.tags.length-1]||gt,bt=gt.tag={name:gt.tagName,attributes:{}};gt.opt.xmlns&&(bt.ns=tt.ns),gt.attribList.length=0,ht(gt,"onopentagstart",bt)}function Mt(gt,tt){var bt=gt.indexOf(":"),Ke=bt<0?["",gt]:gt.split(":"),ut=Ke[0],wt=Ke[1];return tt&&gt==="xmlns"&&(ut="xmlns",wt=""),{prefix:ut,local:wt}}function mt(gt){if(gt.strict||(gt.attribName=gt.attribName[gt.looseCase]()),gt.attribList.indexOf(gt.attribName)!==-1||gt.tag.attributes.hasOwnProperty(gt.attribName)){gt.attribName=gt.attribValue="";return}if(gt.opt.xmlns){var tt=Mt(gt.attribName,!0),bt=tt.prefix,Ke=tt.local;if(bt==="xmlns")if(Ke==="xml"&&gt.attribValue!==le)xt(gt,"xml: prefix must be bound to "+le+`
Actual: `+gt.attribValue);else if(Ke==="xmlns"&&gt.attribValue!==ue)xt(gt,"xmlns: prefix must be bound to "+ue+`
Actual: `+gt.attribValue);else{var ut=gt.tag,wt=gt.tags[gt.tags.length-1]||gt;ut.ns===wt.ns&&(ut.ns=Object.create(wt.ns)),ut.ns[Ke]=gt.attribValue}gt.attribList.push([gt.attribName,gt.attribValue])}else gt.tag.attributes[gt.attribName]=gt.attribValue,ht(gt,"onattribute",{name:gt.attribName,value:gt.attribValue});gt.attribName=gt.attribValue=""}function pt(gt,tt){if(gt.opt.xmlns){var bt=gt.tag,Ke=Mt(gt.tagName);bt.prefix=Ke.prefix,bt.local=Ke.local,bt.uri=bt.ns[Ke.prefix]||"",bt.prefix&&!bt.uri&&(xt(gt,"Unbound namespace prefix: "+JSON.stringify(gt.tagName)),bt.uri=Ke.prefix);var ut=gt.tags[gt.tags.length-1]||gt;bt.ns&&ut.ns!==bt.ns&&Object.keys(bt.ns).forEach(function(Ve){ht(gt,"onopennamespace",{prefix:Ve,uri:bt.ns[Ve]})});for(var wt=0,yt=gt.attribList.length;wt<yt;wt++){var lt=gt.attribList[wt],Qe=lt[0],We=lt[1],Ue=Mt(Qe,!0),qe=Ue.prefix,He=Ue.local,De=qe===""?"":bt.ns[qe]||"",Le={name:Qe,value:We,prefix:qe,local:He,uri:De};qe&&qe!=="xmlns"&&!De&&(xt(gt,"Unbound namespace prefix: "+JSON.stringify(qe)),Le.uri=qe),gt.tag.attributes[Qe]=Le,ht(gt,"onattribute",Le)}gt.attribList.length=0}gt.tag.isSelfClosing=!!tt,gt.sawRoot=!0,gt.tags.push(gt.tag),ht(gt,"onopentag",gt.tag),tt||(!gt.noscript&&gt.tagName.toLowerCase()==="script"?gt.state=ze.SCRIPT:gt.state=ze.TEXT,gt.tag=null,gt.tagName=""),gt.attribName=gt.attribValue="",gt.attribList.length=0}function vt(gt){if(!gt.tagName){xt(gt,"Weird empty close tag."),gt.textNode+="</>",gt.state=ze.TEXT;return}if(gt.script){if(gt.tagName!=="script"){gt.script+="</"+gt.tagName+">",gt.tagName="",gt.state=ze.SCRIPT;return}ht(gt,"onscript",gt.script),gt.script=""}var tt=gt.tags.length,bt=gt.tagName;gt.strict||(bt=bt[gt.looseCase]());for(var Ke=bt;tt--;){var ut=gt.tags[tt];if(ut.name!==Ke)xt(gt,"Unexpected close tag");else break}if(tt<0){xt(gt,"Unmatched closing tag: "+gt.tagName),gt.textNode+="</"+gt.tagName+">",gt.state=ze.TEXT;return}gt.tagName=bt;for(var wt=gt.tags.length;wt-- >tt;){var yt=gt.tag=gt.tags.pop();gt.tagName=gt.tag.name,ht(gt,"onclosetag",gt.tagName);var lt={};for(var Qe in yt.ns)lt[Qe]=yt.ns[Qe];var We=gt.tags[gt.tags.length-1]||gt;gt.opt.xmlns&&yt.ns!==We.ns&&Object.keys(yt.ns).forEach(function(Ue){var qe=yt.ns[Ue];ht(gt,"onclosenamespace",{prefix:Ue,uri:qe})})}tt===0&&(gt.closedRoot=!0),gt.tagName=gt.attribValue=gt.attribName="",gt.attribList.length=0,gt.state=ze.TEXT}function jt(gt){var tt=gt.entity,bt=tt.toLowerCase(),Ke,ut="";return gt.ENTITIES[tt]?gt.ENTITIES[tt]:gt.ENTITIES[bt]?gt.ENTITIES[bt]:(tt=bt,tt.charAt(0)==="#"&&(tt.charAt(1)==="x"?(tt=tt.slice(2),Ke=parseInt(tt,16),ut=Ke.toString(16)):(tt=tt.slice(1),Ke=parseInt(tt,10),ut=Ke.toString(10))),tt=tt.replace(/^0+/,""),isNaN(Ke)||ut.toLowerCase()!==tt?(xt(gt,"Invalid character entity"),"&"+gt.entity+";"):String.fromCodePoint(Ke))}function At(gt,tt){tt==="<"?(gt.state=ze.OPEN_WAKA,gt.startTagPosition=gt.position):Ae(tt)||(xt(gt,"Non-whitespace before first tag."),gt.textNode=tt,gt.state=ze.TEXT)}function Kt(gt,tt){var bt="";return tt<gt.length&&(bt=gt.charAt(tt)),bt}function Ct(gt){var tt=this;if(this.error)throw this.error;if(tt.closed)return et(tt,"Cannot write after close. Assign an onready handler.");if(gt===null)return it(tt);typeof gt=="object"&&(gt=gt.toString());for(var bt=0,Ke="";Ke=Kt(gt,bt++),tt.c=Ke,!!Ke;)switch(tt.trackPosition&&(tt.position++,Ke===`
`?(tt.line++,tt.column=0):tt.column++),tt.state){case ze.BEGIN:if(tt.state=ze.BEGIN_WHITESPACE,Ke==="\uFEFF")continue;At(tt,Ke);continue;case ze.BEGIN_WHITESPACE:At(tt,Ke);continue;case ze.TEXT:if(tt.sawRoot&&!tt.closedRoot){for(var ut=bt-1;Ke&&Ke!=="<"&&Ke!=="&";)Ke=Kt(gt,bt++),Ke&&tt.trackPosition&&(tt.position++,Ke===`
`?(tt.line++,tt.column=0):tt.column++);tt.textNode+=gt.substring(ut,bt-1)}Ke==="<"&&!(tt.sawRoot&&tt.closedRoot&&!tt.strict)?(tt.state=ze.OPEN_WAKA,tt.startTagPosition=tt.position):(!Ae(Ke)&&(!tt.sawRoot||tt.closedRoot)&&xt(tt,"Text data outside of root node."),Ke==="&"?tt.state=ze.TEXT_ENTITY:tt.textNode+=Ke);continue;case ze.SCRIPT:Ke==="<"?tt.state=ze.SCRIPT_ENDING:tt.script+=Ke;continue;case ze.SCRIPT_ENDING:Ke==="/"?tt.state=ze.CLOSE_TAG:(tt.script+="<"+Ke,tt.state=ze.SCRIPT);continue;case ze.OPEN_WAKA:if(Ke==="!")tt.state=ze.SGML_DECL,tt.sgmlDecl="";else if(!Ae(Ke))if(_e(Ee,Ke))tt.state=ze.OPEN_TAG,tt.tagName=Ke;else if(Ke==="/")tt.state=ze.CLOSE_TAG,tt.tagName="";else if(Ke==="?")tt.state=ze.PROC_INST,tt.procInstName=tt.procInstBody="";else{if(xt(tt,"Unencoded <"),tt.startTagPosition+1<tt.position){var wt=tt.position-tt.startTagPosition;Ke=new Array(wt).join(" ")+Ke}tt.textNode+="<"+Ke,tt.state=ze.TEXT}continue;case ze.SGML_DECL:(tt.sgmlDecl+Ke).toUpperCase()===ae?(ht(tt,"onopencdata"),tt.state=ze.CDATA,tt.sgmlDecl="",tt.cdata=""):tt.sgmlDecl+Ke==="--"?(tt.state=ze.COMMENT,tt.comment="",tt.sgmlDecl=""):(tt.sgmlDecl+Ke).toUpperCase()===re?(tt.state=ze.DOCTYPE,(tt.doctype||tt.sawRoot)&&xt(tt,"Inappropriately located doctype declaration"),tt.doctype="",tt.sgmlDecl=""):Ke===">"?(ht(tt,"onsgmldeclaration",tt.sgmlDecl),tt.sgmlDecl="",tt.state=ze.TEXT):(Oe(Ke)&&(tt.state=ze.SGML_DECL_QUOTED),tt.sgmlDecl+=Ke);continue;case ze.SGML_DECL_QUOTED:Ke===tt.q&&(tt.state=ze.SGML_DECL,tt.q=""),tt.sgmlDecl+=Ke;continue;case ze.DOCTYPE:Ke===">"?(tt.state=ze.TEXT,ht(tt,"ondoctype",tt.doctype),tt.doctype=!0):(tt.doctype+=Ke,Ke==="["?tt.state=ze.DOCTYPE_DTD:Oe(Ke)&&(tt.state=ze.DOCTYPE_QUOTED,tt.q=Ke));continue;case ze.DOCTYPE_QUOTED:tt.doctype+=Ke,Ke===tt.q&&(tt.q="",tt.state=ze.DOCTYPE);continue;case ze.DOCTYPE_DTD:tt.doctype+=Ke,Ke==="]"?tt.state=ze.DOCTYPE:Oe(Ke)&&(tt.state=ze.DOCTYPE_DTD_QUOTED,tt.q=Ke);continue;case ze.DOCTYPE_DTD_QUOTED:tt.doctype+=Ke,Ke===tt.q&&(tt.state=ze.DOCTYPE_DTD,tt.q="");continue;case ze.COMMENT:Ke==="-"?tt.state=ze.COMMENT_ENDING:tt.comment+=Ke;continue;case ze.COMMENT_ENDING:Ke==="-"?(tt.state=ze.COMMENT_ENDED,tt.comment=Lt(tt.opt,tt.comment),tt.comment&&ht(tt,"oncomment",tt.comment),tt.comment=""):(tt.comment+="-"+Ke,tt.state=ze.COMMENT);continue;case ze.COMMENT_ENDED:Ke!==">"?(xt(tt,"Malformed comment"),tt.comment+="--"+Ke,tt.state=ze.COMMENT):tt.state=ze.TEXT;continue;case ze.CDATA:Ke==="]"?tt.state=ze.CDATA_ENDING:tt.cdata+=Ke;continue;case ze.CDATA_ENDING:Ke==="]"?tt.state=ze.CDATA_ENDING_2:(tt.cdata+="]"+Ke,tt.state=ze.CDATA);continue;case ze.CDATA_ENDING_2:Ke===">"?(tt.cdata&&ht(tt,"oncdata",tt.cdata),ht(tt,"onclosecdata"),tt.cdata="",tt.state=ze.TEXT):Ke==="]"?tt.cdata+="]":(tt.cdata+="]]"+Ke,tt.state=ze.CDATA);continue;case ze.PROC_INST:Ke==="?"?tt.state=ze.PROC_INST_ENDING:Ae(Ke)?tt.state=ze.PROC_INST_BODY:tt.procInstName+=Ke;continue;case ze.PROC_INST_BODY:if(!tt.procInstBody&&Ae(Ke))continue;Ke==="?"?tt.state=ze.PROC_INST_ENDING:tt.procInstBody+=Ke;continue;case ze.PROC_INST_ENDING:Ke===">"?(ht(tt,"onprocessinginstruction",{name:tt.procInstName,body:tt.procInstBody}),tt.procInstName=tt.procInstBody="",tt.state=ze.TEXT):(tt.procInstBody+="?"+Ke,tt.state=ze.PROC_INST_BODY);continue;case ze.OPEN_TAG:_e(Pe,Ke)?tt.tagName+=Ke:(Et(tt),Ke===">"?pt(tt):Ke==="/"?tt.state=ze.OPEN_TAG_SLASH:(Ae(Ke)||xt(tt,"Invalid character in tag name"),tt.state=ze.ATTRIB));continue;case ze.OPEN_TAG_SLASH:Ke===">"?(pt(tt,!0),vt(tt)):(xt(tt,"Forward-slash in opening tag not followed by >"),tt.state=ze.ATTRIB);continue;case ze.ATTRIB:if(Ae(Ke))continue;Ke===">"?pt(tt):Ke==="/"?tt.state=ze.OPEN_TAG_SLASH:_e(Ee,Ke)?(tt.attribName=Ke,tt.attribValue="",tt.state=ze.ATTRIB_NAME):xt(tt,"Invalid attribute name");continue;case ze.ATTRIB_NAME:Ke==="="?tt.state=ze.ATTRIB_VALUE:Ke===">"?(xt(tt,"Attribute without value"),tt.attribValue=tt.attribName,mt(tt),pt(tt)):Ae(Ke)?tt.state=ze.ATTRIB_NAME_SAW_WHITE:_e(Pe,Ke)?tt.attribName+=Ke:xt(tt,"Invalid attribute name");continue;case ze.ATTRIB_NAME_SAW_WHITE:if(Ke==="=")tt.state=ze.ATTRIB_VALUE;else{if(Ae(Ke))continue;xt(tt,"Attribute without value"),tt.tag.attributes[tt.attribName]="",tt.attribValue="",ht(tt,"onattribute",{name:tt.attribName,value:""}),tt.attribName="",Ke===">"?pt(tt):_e(Ee,Ke)?(tt.attribName=Ke,tt.state=ze.ATTRIB_NAME):(xt(tt,"Invalid attribute name"),tt.state=ze.ATTRIB)}continue;case ze.ATTRIB_VALUE:if(Ae(Ke))continue;Oe(Ke)?(tt.q=Ke,tt.state=ze.ATTRIB_VALUE_QUOTED):(xt(tt,"Unquoted attribute value"),tt.state=ze.ATTRIB_VALUE_UNQUOTED,tt.attribValue=Ke);continue;case ze.ATTRIB_VALUE_QUOTED:if(Ke!==tt.q){Ke==="&"?tt.state=ze.ATTRIB_VALUE_ENTITY_Q:tt.attribValue+=Ke;continue}mt(tt),tt.q="",tt.state=ze.ATTRIB_VALUE_CLOSED;continue;case ze.ATTRIB_VALUE_CLOSED:Ae(Ke)?tt.state=ze.ATTRIB:Ke===">"?pt(tt):Ke==="/"?tt.state=ze.OPEN_TAG_SLASH:_e(Ee,Ke)?(xt(tt,"No whitespace between attributes"),tt.attribName=Ke,tt.attribValue="",tt.state=ze.ATTRIB_NAME):xt(tt,"Invalid attribute name");continue;case ze.ATTRIB_VALUE_UNQUOTED:if(!Fe(Ke)){Ke==="&"?tt.state=ze.ATTRIB_VALUE_ENTITY_U:tt.attribValue+=Ke;continue}mt(tt),Ke===">"?pt(tt):tt.state=ze.ATTRIB;continue;case ze.CLOSE_TAG:if(tt.tagName)Ke===">"?vt(tt):_e(Pe,Ke)?tt.tagName+=Ke:tt.script?(tt.script+="</"+tt.tagName,tt.tagName="",tt.state=ze.SCRIPT):(Ae(Ke)||xt(tt,"Invalid tagname in closing tag"),tt.state=ze.CLOSE_TAG_SAW_WHITE);else{if(Ae(Ke))continue;Ye(Ee,Ke)?tt.script?(tt.script+="</"+Ke,tt.state=ze.SCRIPT):xt(tt,"Invalid tagname in closing tag."):tt.tagName=Ke}continue;case ze.CLOSE_TAG_SAW_WHITE:if(Ae(Ke))continue;Ke===">"?vt(tt):xt(tt,"Invalid characters in closing tag");continue;case ze.TEXT_ENTITY:case ze.ATTRIB_VALUE_ENTITY_Q:case ze.ATTRIB_VALUE_ENTITY_U:var yt,lt;switch(tt.state){case ze.TEXT_ENTITY:yt=ze.TEXT,lt="textNode";break;case ze.ATTRIB_VALUE_ENTITY_Q:yt=ze.ATTRIB_VALUE_QUOTED,lt="attribValue";break;case ze.ATTRIB_VALUE_ENTITY_U:yt=ze.ATTRIB_VALUE_UNQUOTED,lt="attribValue";break}Ke===";"?(tt[lt]+=jt(tt),tt.entity="",tt.state=yt):_e(tt.entity.length?ke:Ie,Ke)?tt.entity+=Ke:(xt(tt,"Invalid character in entity name"),tt[lt]+="&"+tt.entity+Ke,tt.entity="",tt.state=yt);continue;default:throw new Error(tt,"Unknown state: "+tt.state)}return tt.position>=tt.bufferCheckPosition&&ye(tt),tt}String.fromCodePoint||function(){var gt=String.fromCharCode,tt=Math.floor,bt=function(){var Ke=16384,ut=[],wt,yt,lt=-1,Qe=arguments.length;if(!Qe)return"";for(var We="";++lt<Qe;){var Ue=Number(arguments[lt]);if(!isFinite(Ue)||Ue<0||Ue>1114111||tt(Ue)!==Ue)throw RangeError("Invalid code point: "+Ue);Ue<=65535?ut.push(Ue):(Ue-=65536,wt=(Ue>>10)+55296,yt=Ue%1024+56320,ut.push(wt,yt)),(lt+1===Qe||ut.length>Ke)&&(We+=gt.apply(null,ut),ut.length=0)}return We};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:bt,configurable:!0,writable:!0}):String.fromCodePoint=bt}()})(typeof je=="undefined"?this.sax={}:je)}).call(this)}).call(this,ie("buffer").Buffer)},{buffer:90,stream:398,string_decoder:413}],398:[function(ie,Re,je){Re.exports=be;var ve=ie("events").EventEmitter,ce=ie("inherits");ce(be,ve),be.Readable=ie("readable-stream/lib/_stream_readable.js"),be.Writable=ie("readable-stream/lib/_stream_writable.js"),be.Duplex=ie("readable-stream/lib/_stream_duplex.js"),be.Transform=ie("readable-stream/lib/_stream_transform.js"),be.PassThrough=ie("readable-stream/lib/_stream_passthrough.js"),be.finished=ie("readable-stream/lib/internal/streams/end-of-stream.js"),be.pipeline=ie("readable-stream/lib/internal/streams/pipeline.js"),be.Stream=be;function be(){ve.call(this)}be.prototype.pipe=function(Ce,ye){var we=this;function me(le){Ce.writable&&Ce.write(le)===!1&&we.pause&&we.pause()}we.on("data",me);function xe(){we.readable&&we.resume&&we.resume()}Ce.on("drain",xe),!Ce._isStdio&&(!ye||ye.end!==!1)&&(we.on("end",z),we.on("close",ee));var fe=!1;function z(){fe||(fe=!0,Ce.end())}function ee(){fe||(fe=!0,typeof Ce.destroy=="function"&&Ce.destroy())}function ae(le){if(re(),ve.listenerCount(this,"error")===0)throw le}we.on("error",ae),Ce.on("error",ae);function re(){we.removeListener("data",me),Ce.removeListener("drain",xe),we.removeListener("end",z),we.removeListener("close",ee),we.removeListener("error",ae),Ce.removeListener("error",ae),we.removeListener("end",re),we.removeListener("close",re),Ce.removeListener("close",re)}return we.on("end",re),we.on("close",re),Ce.on("close",re),Ce.emit("pipe",we),Ce}},{events:344,inherits:364,"readable-stream/lib/_stream_duplex.js":400,"readable-stream/lib/_stream_passthrough.js":401,"readable-stream/lib/_stream_readable.js":402,"readable-stream/lib/_stream_transform.js":403,"readable-stream/lib/_stream_writable.js":404,"readable-stream/lib/internal/streams/end-of-stream.js":408,"readable-stream/lib/internal/streams/pipeline.js":410}],399:[function(ie,Re,je){"use strict";function ve(xe,fe){xe.prototype=Object.create(fe.prototype),xe.prototype.constructor=xe,xe.__proto__=fe}var ce={};function be(xe,fe,z){z||(z=Error);function ee(re,le,ue){return typeof fe=="string"?fe:fe(re,le,ue)}var ae=function(re){ve(le,re);function le(ue,pe,Ee){return re.call(this,ee(ue,pe,Ee))||this}return le}(z);ae.prototype.name=z.name,ae.prototype.code=xe,ce[xe]=ae}function Ce(xe,fe){if(Array.isArray(xe)){var z=xe.length;return xe=xe.map(function(ee){return String(ee)}),z>2?"one of ".concat(fe," ").concat(xe.slice(0,z-1).join(", "),", or ")+xe[z-1]:z===2?"one of ".concat(fe," ").concat(xe[0]," or ").concat(xe[1]):"of ".concat(fe," ").concat(xe[0])}else return"of ".concat(fe," ").concat(String(xe))}function ye(xe,fe,z){return xe.substr(!z||z<0?0:+z,fe.length)===fe}function we(xe,fe,z){return(z===void 0||z>xe.length)&&(z=xe.length),xe.substring(z-fe.length,z)===fe}function me(xe,fe,z){return typeof z!="number"&&(z=0),z+fe.length>xe.length?!1:xe.indexOf(fe,z)!==-1}be("ERR_INVALID_OPT_VALUE",function(xe,fe){return'The value "'+fe+'" is invalid for option "'+xe+'"'},TypeError),be("ERR_INVALID_ARG_TYPE",function(xe,fe,z){var ee;typeof fe=="string"&&ye(fe,"not ")?(ee="must not be",fe=fe.replace(/^not /,"")):ee="must be";var ae;if(we(xe," argument"))ae="The ".concat(xe," ").concat(ee," ").concat(Ce(fe,"type"));else{var re=me(xe,".")?"property":"argument";ae='The "'.concat(xe,'" ').concat(re," ").concat(ee," ").concat(Ce(fe,"type"))}return ae+=". Received type ".concat(typeof z),ae},TypeError),be("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),be("ERR_METHOD_NOT_IMPLEMENTED",function(xe){return"The "+xe+" method is not implemented"}),be("ERR_STREAM_PREMATURE_CLOSE","Premature close"),be("ERR_STREAM_DESTROYED",function(xe){return"Cannot call "+xe+" after a stream was destroyed"}),be("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),be("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),be("ERR_STREAM_WRITE_AFTER_END","write after end"),be("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),be("ERR_UNKNOWN_ENCODING",function(xe){return"Unknown encoding: "+xe},TypeError),be("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Re.exports.codes=ce},{}],400:[function(ie,Re,je){(function(ve){(function(){"use strict";var ce=Object.keys||function(ee){var ae=[];for(var re in ee)ae.push(re);return ae};Re.exports=xe;var be=ie("./_stream_readable"),Ce=ie("./_stream_writable");ie("inherits")(xe,be);for(var ye=ce(Ce.prototype),we=0;we<ye.length;we++){var me=ye[we];xe.prototype[me]||(xe.prototype[me]=Ce.prototype[me])}function xe(ee){if(!(this instanceof xe))return new xe(ee);be.call(this,ee),Ce.call(this,ee),this.allowHalfOpen=!0,ee&&(ee.readable===!1&&(this.readable=!1),ee.writable===!1&&(this.writable=!1),ee.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",fe)))}Object.defineProperty(xe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(xe.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(xe.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function fe(){this._writableState.ended||ve.nextTick(z,this)}function z(ee){ee.end()}Object.defineProperty(xe.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(ae){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=ae,this._writableState.destroyed=ae)}})}).call(this)}).call(this,ie("_process"))},{"./_stream_readable":402,"./_stream_writable":404,_process:467,inherits:364}],401:[function(ie,Re,je){"use strict";Re.exports=ce;var ve=ie("./_stream_transform");ie("inherits")(ce,ve);function ce(be){if(!(this instanceof ce))return new ce(be);ve.call(this,be)}ce.prototype._transform=function(be,Ce,ye){ye(null,be)}},{"./_stream_transform":403,inherits:364}],402:[function(ie,Re,je){(function(ve,ce){(function(){"use strict";Re.exports=ht;var be;ht.ReadableState=st;var Ce=ie("events").EventEmitter,ye=function(Qe,We){return Qe.listeners(We).length},we=ie("./internal/streams/stream"),me=ie("buffer").Buffer,xe=(typeof ce!="undefined"?ce:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function fe(lt){return me.from(lt)}function z(lt){return me.isBuffer(lt)||lt instanceof xe}var ee=ie("util"),ae;ee&&ee.debuglog?ae=ee.debuglog("stream"):ae=function(){};var re=ie("./internal/streams/buffer_list"),le=ie("./internal/streams/destroy"),ue=ie("./internal/streams/state"),pe=ue.getHighWaterMark,Ee=ie("../errors").codes,Pe=Ee.ERR_INVALID_ARG_TYPE,Ie=Ee.ERR_STREAM_PUSH_AFTER_EOF,ke=Ee.ERR_METHOD_NOT_IMPLEMENTED,Ae=Ee.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Oe,Fe,_e;ie("inherits")(ht,we);var Ye=le.errorOrDestroy,ze=["error","close","destroy","pause","resume"];function Xe(lt,Qe,We){if(typeof lt.prependListener=="function")return lt.prependListener(Qe,We);!lt._events||!lt._events[Qe]?lt.on(Qe,We):Array.isArray(lt._events[Qe])?lt._events[Qe].unshift(We):lt._events[Qe]=[We,lt._events[Qe]]}function st(lt,Qe,We){be=be||ie("./_stream_duplex"),lt=lt||{},typeof We!="boolean"&&(We=Qe instanceof be),this.objectMode=!!lt.objectMode,We&&(this.objectMode=this.objectMode||!!lt.readableObjectMode),this.highWaterMark=pe(this,lt,"readableHighWaterMark",We),this.buffer=new re,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.paused=!0,this.emitClose=lt.emitClose!==!1,this.autoDestroy=!!lt.autoDestroy,this.destroyed=!1,this.defaultEncoding=lt.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,lt.encoding&&(Oe||(Oe=ie("string_decoder/").StringDecoder),this.decoder=new Oe(lt.encoding),this.encoding=lt.encoding)}function ht(lt){if(be=be||ie("./_stream_duplex"),!(this instanceof ht))return new ht(lt);var Qe=this instanceof be;this._readableState=new st(lt,this,Qe),this.readable=!0,lt&&(typeof lt.read=="function"&&(this._read=lt.read),typeof lt.destroy=="function"&&(this._destroy=lt.destroy)),we.call(this)}Object.defineProperty(ht.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(Qe){this._readableState&&(this._readableState.destroyed=Qe)}}),ht.prototype.destroy=le.destroy,ht.prototype._undestroy=le.undestroy,ht.prototype._destroy=function(lt,Qe){Qe(lt)},ht.prototype.push=function(lt,Qe){var We=this._readableState,Ue;return We.objectMode?Ue=!0:typeof lt=="string"&&(Qe=Qe||We.defaultEncoding,Qe!==We.encoding&&(lt=me.from(lt,Qe),Qe=""),Ue=!0),ft(this,lt,Qe,!1,Ue)},ht.prototype.unshift=function(lt){return ft(this,lt,null,!0,!1)};function ft(lt,Qe,We,Ue,qe){ae("readableAddChunk",Qe);var He=lt._readableState;if(Qe===null)He.reading=!1,Mt(lt,He);else{var De;if(qe||(De=et(He,Qe)),De)Ye(lt,De);else if(He.objectMode||Qe&&Qe.length>0)if(typeof Qe!="string"&&!He.objectMode&&Object.getPrototypeOf(Qe)!==me.prototype&&(Qe=fe(Qe)),Ue)He.endEmitted?Ye(lt,new Ae):Lt(lt,He,Qe,!0);else if(He.ended)Ye(lt,new Ie);else{if(He.destroyed)return!1;He.reading=!1,He.decoder&&!We?(Qe=He.decoder.write(Qe),He.objectMode||Qe.length!==0?Lt(lt,He,Qe,!1):vt(lt,He)):Lt(lt,He,Qe,!1)}else Ue||(He.reading=!1,vt(lt,He))}return!He.ended&&(He.length<He.highWaterMark||He.length===0)}function Lt(lt,Qe,We,Ue){Qe.flowing&&Qe.length===0&&!Qe.sync?(Qe.awaitDrain=0,lt.emit("data",We)):(Qe.length+=Qe.objectMode?1:We.length,Ue?Qe.buffer.unshift(We):Qe.buffer.push(We),Qe.needReadable&&mt(lt)),vt(lt,Qe)}function et(lt,Qe){var We;return!z(Qe)&&typeof Qe!="string"&&Qe!==void 0&&!lt.objectMode&&(We=new Pe("chunk",["string","Buffer","Uint8Array"],Qe)),We}ht.prototype.isPaused=function(){return this._readableState.flowing===!1},ht.prototype.setEncoding=function(lt){Oe||(Oe=ie("string_decoder/").StringDecoder);var Qe=new Oe(lt);this._readableState.decoder=Qe,this._readableState.encoding=this._readableState.decoder.encoding;for(var We=this._readableState.buffer.head,Ue="";We!==null;)Ue+=Qe.write(We.data),We=We.next;return this._readableState.buffer.clear(),Ue!==""&&this._readableState.buffer.push(Ue),this._readableState.length=Ue.length,this};var it=1073741824;function xt(lt){return lt>=it?lt=it:(lt--,lt|=lt>>>1,lt|=lt>>>2,lt|=lt>>>4,lt|=lt>>>8,lt|=lt>>>16,lt++),lt}function Et(lt,Qe){return lt<=0||Qe.length===0&&Qe.ended?0:Qe.objectMode?1:lt!==lt?Qe.flowing&&Qe.length?Qe.buffer.head.data.length:Qe.length:(lt>Qe.highWaterMark&&(Qe.highWaterMark=xt(lt)),lt<=Qe.length?lt:Qe.ended?Qe.length:(Qe.needReadable=!0,0))}ht.prototype.read=function(lt){ae("read",lt),lt=parseInt(lt,10);var Qe=this._readableState,We=lt;if(lt!==0&&(Qe.emittedReadable=!1),lt===0&&Qe.needReadable&&((Qe.highWaterMark!==0?Qe.length>=Qe.highWaterMark:Qe.length>0)||Qe.ended))return ae("read: emitReadable",Qe.length,Qe.ended),Qe.length===0&&Qe.ended?ut(this):mt(this),null;if(lt=Et(lt,Qe),lt===0&&Qe.ended)return Qe.length===0&&ut(this),null;var Ue=Qe.needReadable;ae("need readable",Ue),(Qe.length===0||Qe.length-lt<Qe.highWaterMark)&&(Ue=!0,ae("length less than watermark",Ue)),Qe.ended||Qe.reading?(Ue=!1,ae("reading or ended",Ue)):Ue&&(ae("do read"),Qe.reading=!0,Qe.sync=!0,Qe.length===0&&(Qe.needReadable=!0),this._read(Qe.highWaterMark),Qe.sync=!1,Qe.reading||(lt=Et(We,Qe)));var qe;return lt>0?qe=Ke(lt,Qe):qe=null,qe===null?(Qe.needReadable=Qe.length<=Qe.highWaterMark,lt=0):(Qe.length-=lt,Qe.awaitDrain=0),Qe.length===0&&(Qe.ended||(Qe.needReadable=!0),We!==lt&&Qe.ended&&ut(this)),qe!==null&&this.emit("data",qe),qe};function Mt(lt,Qe){if(ae("onEofChunk"),!Qe.ended){if(Qe.decoder){var We=Qe.decoder.end();We&&We.length&&(Qe.buffer.push(We),Qe.length+=Qe.objectMode?1:We.length)}Qe.ended=!0,Qe.sync?mt(lt):(Qe.needReadable=!1,Qe.emittedReadable||(Qe.emittedReadable=!0,pt(lt)))}}function mt(lt){var Qe=lt._readableState;ae("emitReadable",Qe.needReadable,Qe.emittedReadable),Qe.needReadable=!1,Qe.emittedReadable||(ae("emitReadable",Qe.flowing),Qe.emittedReadable=!0,ve.nextTick(pt,lt))}function pt(lt){var Qe=lt._readableState;ae("emitReadable_",Qe.destroyed,Qe.length,Qe.ended),!Qe.destroyed&&(Qe.length||Qe.ended)&&(lt.emit("readable"),Qe.emittedReadable=!1),Qe.needReadable=!Qe.flowing&&!Qe.ended&&Qe.length<=Qe.highWaterMark,bt(lt)}function vt(lt,Qe){Qe.readingMore||(Qe.readingMore=!0,ve.nextTick(jt,lt,Qe))}function jt(lt,Qe){for(;!Qe.reading&&!Qe.ended&&(Qe.length<Qe.highWaterMark||Qe.flowing&&Qe.length===0);){var We=Qe.length;if(ae("maybeReadMore read 0"),lt.read(0),We===Qe.length)break}Qe.readingMore=!1}ht.prototype._read=function(lt){Ye(this,new ke("_read()"))},ht.prototype.pipe=function(lt,Qe){var We=this,Ue=this._readableState;switch(Ue.pipesCount){case 0:Ue.pipes=lt;break;case 1:Ue.pipes=[Ue.pipes,lt];break;default:Ue.pipes.push(lt);break}Ue.pipesCount+=1,ae("pipe count=%d opts=%j",Ue.pipesCount,Qe);var qe=(!Qe||Qe.end!==!1)&&lt!==ve.stdout&&lt!==ve.stderr,He=qe?Le:Nt;Ue.endEmitted?ve.nextTick(He):We.once("end",He),lt.on("unpipe",De);function De(Zt,on){ae("onunpipe"),Zt===We&&on&&on.hasUnpiped===!1&&(on.hasUnpiped=!0,Ze())}function Le(){ae("onend"),lt.end()}var Ve=At(We);lt.on("drain",Ve);var dt=!1;function Ze(){ae("cleanup"),lt.removeListener("close",Qt),lt.removeListener("finish",kt),lt.removeListener("drain",Ve),lt.removeListener("error",_t),lt.removeListener("unpipe",De),We.removeListener("end",Le),We.removeListener("end",Nt),We.removeListener("data",Tt),dt=!0,Ue.awaitDrain&&(!lt._writableState||lt._writableState.needDrain)&&Ve()}We.on("data",Tt);function Tt(Zt){ae("ondata");var on=lt.write(Zt);ae("dest.write",on),on===!1&&((Ue.pipesCount===1&&Ue.pipes===lt||Ue.pipesCount>1&&yt(Ue.pipes,lt)!==-1)&&!dt&&(ae("false write response, pause",Ue.awaitDrain),Ue.awaitDrain++),We.pause())}function _t(Zt){ae("onerror",Zt),Nt(),lt.removeListener("error",_t),ye(lt,"error")===0&&Ye(lt,Zt)}Xe(lt,"error",_t);function Qt(){lt.removeListener("finish",kt),Nt()}lt.once("close",Qt);function kt(){ae("onfinish"),lt.removeListener("close",Qt),Nt()}lt.once("finish",kt);function Nt(){ae("unpipe"),We.unpipe(lt)}return lt.emit("pipe",We),Ue.flowing||(ae("pipe resume"),We.resume()),lt};function At(lt){return function(){var We=lt._readableState;ae("pipeOnDrain",We.awaitDrain),We.awaitDrain&&We.awaitDrain--,We.awaitDrain===0&&ye(lt,"data")&&(We.flowing=!0,bt(lt))}}ht.prototype.unpipe=function(lt){var Qe=this._readableState,We={hasUnpiped:!1};if(Qe.pipesCount===0)return this;if(Qe.pipesCount===1)return lt&&lt!==Qe.pipes?this:(lt||(lt=Qe.pipes),Qe.pipes=null,Qe.pipesCount=0,Qe.flowing=!1,lt&&lt.emit("unpipe",this,We),this);if(!lt){var Ue=Qe.pipes,qe=Qe.pipesCount;Qe.pipes=null,Qe.pipesCount=0,Qe.flowing=!1;for(var He=0;He<qe;He++)Ue[He].emit("unpipe",this,{hasUnpiped:!1});return this}var De=yt(Qe.pipes,lt);return De===-1?this:(Qe.pipes.splice(De,1),Qe.pipesCount-=1,Qe.pipesCount===1&&(Qe.pipes=Qe.pipes[0]),lt.emit("unpipe",this,We),this)},ht.prototype.on=function(lt,Qe){var We=we.prototype.on.call(this,lt,Qe),Ue=this._readableState;return lt==="data"?(Ue.readableListening=this.listenerCount("readable")>0,Ue.flowing!==!1&&this.resume()):lt==="readable"&&!Ue.endEmitted&&!Ue.readableListening&&(Ue.readableListening=Ue.needReadable=!0,Ue.flowing=!1,Ue.emittedReadable=!1,ae("on readable",Ue.length,Ue.reading),Ue.length?mt(this):Ue.reading||ve.nextTick(Ct,this)),We},ht.prototype.addListener=ht.prototype.on,ht.prototype.removeListener=function(lt,Qe){var We=we.prototype.removeListener.call(this,lt,Qe);return lt==="readable"&&ve.nextTick(Kt,this),We},ht.prototype.removeAllListeners=function(lt){var Qe=we.prototype.removeAllListeners.apply(this,arguments);return(lt==="readable"||lt===void 0)&&ve.nextTick(Kt,this),Qe};function Kt(lt){var Qe=lt._readableState;Qe.readableListening=lt.listenerCount("readable")>0,Qe.resumeScheduled&&!Qe.paused?Qe.flowing=!0:lt.listenerCount("data")>0&&lt.resume()}function Ct(lt){ae("readable nexttick read 0"),lt.read(0)}ht.prototype.resume=function(){var lt=this._readableState;return lt.flowing||(ae("resume"),lt.flowing=!lt.readableListening,gt(this,lt)),lt.paused=!1,this};function gt(lt,Qe){Qe.resumeScheduled||(Qe.resumeScheduled=!0,ve.nextTick(tt,lt,Qe))}function tt(lt,Qe){ae("resume",Qe.reading),Qe.reading||lt.read(0),Qe.resumeScheduled=!1,lt.emit("resume"),bt(lt),Qe.flowing&&!Qe.reading&&lt.read(0)}ht.prototype.pause=function(){return ae("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(ae("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function bt(lt){var Qe=lt._readableState;for(ae("flow",Qe.flowing);Qe.flowing&&lt.read()!==null;);}ht.prototype.wrap=function(lt){var Qe=this,We=this._readableState,Ue=!1;lt.on("end",function(){if(ae("wrapped end"),We.decoder&&!We.ended){var De=We.decoder.end();De&&De.length&&Qe.push(De)}Qe.push(null)}),lt.on("data",function(De){if(ae("wrapped data"),We.decoder&&(De=We.decoder.write(De)),!(We.objectMode&&De==null)&&!(!We.objectMode&&(!De||!De.length))){var Le=Qe.push(De);Le||(Ue=!0,lt.pause())}});for(var qe in lt)this[qe]===void 0&&typeof lt[qe]=="function"&&(this[qe]=function(Le){return function(){return lt[Le].apply(lt,arguments)}}(qe));for(var He=0;He<ze.length;He++)lt.on(ze[He],this.emit.bind(this,ze[He]));return this._read=function(De){ae("wrapped _read",De),Ue&&(Ue=!1,lt.resume())},this},typeof Symbol=="function"&&(ht.prototype[Symbol.asyncIterator]=function(){return Fe===void 0&&(Fe=ie("./internal/streams/async_iterator")),Fe(this)}),Object.defineProperty(ht.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(ht.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(ht.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(Qe){this._readableState&&(this._readableState.flowing=Qe)}}),ht._fromList=Ke,Object.defineProperty(ht.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Ke(lt,Qe){if(Qe.length===0)return null;var We;return Qe.objectMode?We=Qe.buffer.shift():!lt||lt>=Qe.length?(Qe.decoder?We=Qe.buffer.join(""):Qe.buffer.length===1?We=Qe.buffer.first():We=Qe.buffer.concat(Qe.length),Qe.buffer.clear()):We=Qe.buffer.consume(lt,Qe.decoder),We}function ut(lt){var Qe=lt._readableState;ae("endReadable",Qe.endEmitted),Qe.endEmitted||(Qe.ended=!0,ve.nextTick(wt,Qe,lt))}function wt(lt,Qe){if(ae("endReadableNT",lt.endEmitted,lt.length),!lt.endEmitted&&lt.length===0&&(lt.endEmitted=!0,Qe.readable=!1,Qe.emit("end"),lt.autoDestroy)){var We=Qe._writableState;(!We||We.autoDestroy&&We.finished)&&Qe.destroy()}}typeof Symbol=="function"&&(ht.from=function(lt,Qe){return _e===void 0&&(_e=ie("./internal/streams/from")),_e(ht,lt,Qe)});function yt(lt,Qe){for(var We=0,Ue=lt.length;We<Ue;We++)if(lt[We]===Qe)return We;return-1}}).call(this)}).call(this,ie("_process"),typeof ln!="undefined"?ln:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"../errors":399,"./_stream_duplex":400,"./internal/streams/async_iterator":405,"./internal/streams/buffer_list":406,"./internal/streams/destroy":407,"./internal/streams/from":409,"./internal/streams/state":411,"./internal/streams/stream":412,_process:467,buffer:90,events:344,inherits:364,"string_decoder/":413,util:89}],403:[function(ie,Re,je){"use strict";Re.exports=xe;var ve=ie("../errors").codes,ce=ve.ERR_METHOD_NOT_IMPLEMENTED,be=ve.ERR_MULTIPLE_CALLBACK,Ce=ve.ERR_TRANSFORM_ALREADY_TRANSFORMING,ye=ve.ERR_TRANSFORM_WITH_LENGTH_0,we=ie("./_stream_duplex");ie("inherits")(xe,we);function me(ee,ae){var re=this._transformState;re.transforming=!1;var le=re.writecb;if(le===null)return this.emit("error",new be);re.writechunk=null,re.writecb=null,ae!=null&&this.push(ae),le(ee);var ue=this._readableState;ue.reading=!1,(ue.needReadable||ue.length<ue.highWaterMark)&&this._read(ue.highWaterMark)}function xe(ee){if(!(this instanceof xe))return new xe(ee);we.call(this,ee),this._transformState={afterTransform:me.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,ee&&(typeof ee.transform=="function"&&(this._transform=ee.transform),typeof ee.flush=="function"&&(this._flush=ee.flush)),this.on("prefinish",fe)}function fe(){var ee=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(ae,re){z(ee,ae,re)}):z(this,null,null)}xe.prototype.push=function(ee,ae){return this._transformState.needTransform=!1,we.prototype.push.call(this,ee,ae)},xe.prototype._transform=function(ee,ae,re){re(new ce("_transform()"))},xe.prototype._write=function(ee,ae,re){var le=this._transformState;if(le.writecb=re,le.writechunk=ee,le.writeencoding=ae,!le.transforming){var ue=this._readableState;(le.needTransform||ue.needReadable||ue.length<ue.highWaterMark)&&this._read(ue.highWaterMark)}},xe.prototype._read=function(ee){var ae=this._transformState;ae.writechunk!==null&&!ae.transforming?(ae.transforming=!0,this._transform(ae.writechunk,ae.writeencoding,ae.afterTransform)):ae.needTransform=!0},xe.prototype._destroy=function(ee,ae){we.prototype._destroy.call(this,ee,function(re){ae(re)})};function z(ee,ae,re){if(ae)return ee.emit("error",ae);if(re!=null&&ee.push(re),ee._writableState.length)throw new ye;if(ee._transformState.transforming)throw new Ce;return ee.push(null)}},{"../errors":399,"./_stream_duplex":400,inherits:364}],404:[function(ie,Re,je){(function(ve,ce){(function(){"use strict";Re.exports=st;function be(bt,Ke,ut){this.chunk=bt,this.encoding=Ke,this.callback=ut,this.next=null}function Ce(bt){var Ke=this;this.next=null,this.entry=null,this.finish=function(){tt(Ke,bt)}}var ye;st.WritableState=ze;var we={deprecate:ie("util-deprecate")},me=ie("./internal/streams/stream"),xe=ie("buffer").Buffer,fe=(typeof ce!="undefined"?ce:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function z(bt){return xe.from(bt)}function ee(bt){return xe.isBuffer(bt)||bt instanceof fe}var ae=ie("./internal/streams/destroy"),re=ie("./internal/streams/state"),le=re.getHighWaterMark,ue=ie("../errors").codes,pe=ue.ERR_INVALID_ARG_TYPE,Ee=ue.ERR_METHOD_NOT_IMPLEMENTED,Pe=ue.ERR_MULTIPLE_CALLBACK,Ie=ue.ERR_STREAM_CANNOT_PIPE,ke=ue.ERR_STREAM_DESTROYED,Ae=ue.ERR_STREAM_NULL_VALUES,Oe=ue.ERR_STREAM_WRITE_AFTER_END,Fe=ue.ERR_UNKNOWN_ENCODING,_e=ae.errorOrDestroy;ie("inherits")(st,me);function Ye(){}function ze(bt,Ke,ut){ye=ye||ie("./_stream_duplex"),bt=bt||{},typeof ut!="boolean"&&(ut=Ke instanceof ye),this.objectMode=!!bt.objectMode,ut&&(this.objectMode=this.objectMode||!!bt.writableObjectMode),this.highWaterMark=le(this,bt,"writableHighWaterMark",ut),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var wt=bt.decodeStrings===!1;this.decodeStrings=!wt,this.defaultEncoding=bt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(yt){Mt(Ke,yt)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=bt.emitClose!==!1,this.autoDestroy=!!bt.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Ce(this)}ze.prototype.getBuffer=function(){for(var Ke=this.bufferedRequest,ut=[];Ke;)ut.push(Ke),Ke=Ke.next;return ut},function(){try{Object.defineProperty(ze.prototype,"buffer",{get:we.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(bt){}}();var Xe;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Xe=Function.prototype[Symbol.hasInstance],Object.defineProperty(st,Symbol.hasInstance,{value:function(Ke){return Xe.call(this,Ke)?!0:this!==st?!1:Ke&&Ke._writableState instanceof ze}})):Xe=function(Ke){return Ke instanceof this};function st(bt){ye=ye||ie("./_stream_duplex");var Ke=this instanceof ye;if(!Ke&&!Xe.call(st,this))return new st(bt);this._writableState=new ze(bt,this,Ke),this.writable=!0,bt&&(typeof bt.write=="function"&&(this._write=bt.write),typeof bt.writev=="function"&&(this._writev=bt.writev),typeof bt.destroy=="function"&&(this._destroy=bt.destroy),typeof bt.final=="function"&&(this._final=bt.final)),me.call(this)}st.prototype.pipe=function(){_e(this,new Ie)};function ht(bt,Ke){var ut=new Oe;_e(bt,ut),ve.nextTick(Ke,ut)}function ft(bt,Ke,ut,wt){var yt;return ut===null?yt=new Ae:typeof ut!="string"&&!Ke.objectMode&&(yt=new pe("chunk",["string","Buffer"],ut)),yt?(_e(bt,yt),ve.nextTick(wt,yt),!1):!0}st.prototype.write=function(bt,Ke,ut){var wt=this._writableState,yt=!1,lt=!wt.objectMode&&ee(bt);return lt&&!xe.isBuffer(bt)&&(bt=z(bt)),typeof Ke=="function"&&(ut=Ke,Ke=null),lt?Ke="buffer":Ke||(Ke=wt.defaultEncoding),typeof ut!="function"&&(ut=Ye),wt.ending?ht(this,ut):(lt||ft(this,wt,bt,ut))&&(wt.pendingcb++,yt=et(this,wt,lt,bt,Ke,ut)),yt},st.prototype.cork=function(){this._writableState.corked++},st.prototype.uncork=function(){var bt=this._writableState;bt.corked&&(bt.corked--,!bt.writing&&!bt.corked&&!bt.bufferProcessing&&bt.bufferedRequest&&vt(this,bt))},st.prototype.setDefaultEncoding=function(Ke){if(typeof Ke=="string"&&(Ke=Ke.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Ke+"").toLowerCase())>-1))throw new Fe(Ke);return this._writableState.defaultEncoding=Ke,this},Object.defineProperty(st.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Lt(bt,Ke,ut){return!bt.objectMode&&bt.decodeStrings!==!1&&typeof Ke=="string"&&(Ke=xe.from(Ke,ut)),Ke}Object.defineProperty(st.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function et(bt,Ke,ut,wt,yt,lt){if(!ut){var Qe=Lt(Ke,wt,yt);wt!==Qe&&(ut=!0,yt="buffer",wt=Qe)}var We=Ke.objectMode?1:wt.length;Ke.length+=We;var Ue=Ke.length<Ke.highWaterMark;if(Ue||(Ke.needDrain=!0),Ke.writing||Ke.corked){var qe=Ke.lastBufferedRequest;Ke.lastBufferedRequest={chunk:wt,encoding:yt,isBuf:ut,callback:lt,next:null},qe?qe.next=Ke.lastBufferedRequest:Ke.bufferedRequest=Ke.lastBufferedRequest,Ke.bufferedRequestCount+=1}else it(bt,Ke,!1,We,wt,yt,lt);return Ue}function it(bt,Ke,ut,wt,yt,lt,Qe){Ke.writelen=wt,Ke.writecb=Qe,Ke.writing=!0,Ke.sync=!0,Ke.destroyed?Ke.onwrite(new ke("write")):ut?bt._writev(yt,Ke.onwrite):bt._write(yt,lt,Ke.onwrite),Ke.sync=!1}function xt(bt,Ke,ut,wt,yt){--Ke.pendingcb,ut?(ve.nextTick(yt,wt),ve.nextTick(Ct,bt,Ke),bt._writableState.errorEmitted=!0,_e(bt,wt)):(yt(wt),bt._writableState.errorEmitted=!0,_e(bt,wt),Ct(bt,Ke))}function Et(bt){bt.writing=!1,bt.writecb=null,bt.length-=bt.writelen,bt.writelen=0}function Mt(bt,Ke){var ut=bt._writableState,wt=ut.sync,yt=ut.writecb;if(typeof yt!="function")throw new Pe;if(Et(ut),Ke)xt(bt,ut,wt,Ke,yt);else{var lt=jt(ut)||bt.destroyed;!lt&&!ut.corked&&!ut.bufferProcessing&&ut.bufferedRequest&&vt(bt,ut),wt?ve.nextTick(mt,bt,ut,lt,yt):mt(bt,ut,lt,yt)}}function mt(bt,Ke,ut,wt){ut||pt(bt,Ke),Ke.pendingcb--,wt(),Ct(bt,Ke)}function pt(bt,Ke){Ke.length===0&&Ke.needDrain&&(Ke.needDrain=!1,bt.emit("drain"))}function vt(bt,Ke){Ke.bufferProcessing=!0;var ut=Ke.bufferedRequest;if(bt._writev&&ut&&ut.next){var wt=Ke.bufferedRequestCount,yt=new Array(wt),lt=Ke.corkedRequestsFree;lt.entry=ut;for(var Qe=0,We=!0;ut;)yt[Qe]=ut,ut.isBuf||(We=!1),ut=ut.next,Qe+=1;yt.allBuffers=We,it(bt,Ke,!0,Ke.length,yt,"",lt.finish),Ke.pendingcb++,Ke.lastBufferedRequest=null,lt.next?(Ke.corkedRequestsFree=lt.next,lt.next=null):Ke.corkedRequestsFree=new Ce(Ke),Ke.bufferedRequestCount=0}else{for(;ut;){var Ue=ut.chunk,qe=ut.encoding,He=ut.callback,De=Ke.objectMode?1:Ue.length;if(it(bt,Ke,!1,De,Ue,qe,He),ut=ut.next,Ke.bufferedRequestCount--,Ke.writing)break}ut===null&&(Ke.lastBufferedRequest=null)}Ke.bufferedRequest=ut,Ke.bufferProcessing=!1}st.prototype._write=function(bt,Ke,ut){ut(new Ee("_write()"))},st.prototype._writev=null,st.prototype.end=function(bt,Ke,ut){var wt=this._writableState;return typeof bt=="function"?(ut=bt,bt=null,Ke=null):typeof Ke=="function"&&(ut=Ke,Ke=null),bt!=null&&this.write(bt,Ke),wt.corked&&(wt.corked=1,this.uncork()),wt.ending||gt(this,wt,ut),this},Object.defineProperty(st.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function jt(bt){return bt.ending&&bt.length===0&&bt.bufferedRequest===null&&!bt.finished&&!bt.writing}function At(bt,Ke){bt._final(function(ut){Ke.pendingcb--,ut&&_e(bt,ut),Ke.prefinished=!0,bt.emit("prefinish"),Ct(bt,Ke)})}function Kt(bt,Ke){!Ke.prefinished&&!Ke.finalCalled&&(typeof bt._final=="function"&&!Ke.destroyed?(Ke.pendingcb++,Ke.finalCalled=!0,ve.nextTick(At,bt,Ke)):(Ke.prefinished=!0,bt.emit("prefinish")))}function Ct(bt,Ke){var ut=jt(Ke);if(ut&&(Kt(bt,Ke),Ke.pendingcb===0&&(Ke.finished=!0,bt.emit("finish"),Ke.autoDestroy))){var wt=bt._readableState;(!wt||wt.autoDestroy&&wt.endEmitted)&&bt.destroy()}return ut}function gt(bt,Ke,ut){Ke.ending=!0,Ct(bt,Ke),ut&&(Ke.finished?ve.nextTick(ut):bt.once("finish",ut)),Ke.ended=!0,bt.writable=!1}function tt(bt,Ke,ut){var wt=bt.entry;for(bt.entry=null;wt;){var yt=wt.callback;Ke.pendingcb--,yt(ut),wt=wt.next}Ke.corkedRequestsFree.next=bt}Object.defineProperty(st.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(Ke){this._writableState&&(this._writableState.destroyed=Ke)}}),st.prototype.destroy=ae.destroy,st.prototype._undestroy=ae.undestroy,st.prototype._destroy=function(bt,Ke){Ke(bt)}}).call(this)}).call(this,ie("_process"),typeof ln!="undefined"?ln:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"../errors":399,"./_stream_duplex":400,"./internal/streams/destroy":407,"./internal/streams/state":411,"./internal/streams/stream":412,_process:467,buffer:90,inherits:364,"util-deprecate":416}],405:[function(ie,Re,je){(function(ve){(function(){"use strict";var ce;function be(Ae,Oe,Fe){return Oe=Ce(Oe),Oe in Ae?Object.defineProperty(Ae,Oe,{value:Fe,enumerable:!0,configurable:!0,writable:!0}):Ae[Oe]=Fe,Ae}function Ce(Ae){var Oe=ye(Ae,"string");return typeof Oe=="symbol"?Oe:String(Oe)}function ye(Ae,Oe){if(typeof Ae!="object"||Ae===null)return Ae;var Fe=Ae[Symbol.toPrimitive];if(Fe!==void 0){var _e=Fe.call(Ae,Oe||"default");if(typeof _e!="object")return _e;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Oe==="string"?String:Number)(Ae)}var we=ie("./end-of-stream"),me=Symbol("lastResolve"),xe=Symbol("lastReject"),fe=Symbol("error"),z=Symbol("ended"),ee=Symbol("lastPromise"),ae=Symbol("handlePromise"),re=Symbol("stream");function le(Ae,Oe){return{value:Ae,done:Oe}}function ue(Ae){var Oe=Ae[me];if(Oe!==null){var Fe=Ae[re].read();Fe!==null&&(Ae[ee]=null,Ae[me]=null,Ae[xe]=null,Oe(le(Fe,!1)))}}function pe(Ae){ve.nextTick(ue,Ae)}function Ee(Ae,Oe){return function(Fe,_e){Ae.then(function(){if(Oe[z]){Fe(le(void 0,!0));return}Oe[ae](Fe,_e)},_e)}}var Pe=Object.getPrototypeOf(function(){}),Ie=Object.setPrototypeOf((ce={get stream(){return this[re]},next:function(){var Oe=this,Fe=this[fe];if(Fe!==null)return Promise.reject(Fe);if(this[z])return Promise.resolve(le(void 0,!0));if(this[re].destroyed)return new Promise(function(Xe,st){ve.nextTick(function(){Oe[fe]?st(Oe[fe]):Xe(le(void 0,!0))})});var _e=this[ee],Ye;if(_e)Ye=new Promise(Ee(_e,this));else{var ze=this[re].read();if(ze!==null)return Promise.resolve(le(ze,!1));Ye=new Promise(this[ae])}return this[ee]=Ye,Ye}},be(ce,Symbol.asyncIterator,function(){return this}),be(ce,"return",function(){var Oe=this;return new Promise(function(Fe,_e){Oe[re].destroy(null,function(Ye){if(Ye){_e(Ye);return}Fe(le(void 0,!0))})})}),ce),Pe),ke=function(Oe){var Fe,_e=Object.create(Ie,(Fe={},be(Fe,re,{value:Oe,writable:!0}),be(Fe,me,{value:null,writable:!0}),be(Fe,xe,{value:null,writable:!0}),be(Fe,fe,{value:null,writable:!0}),be(Fe,z,{value:Oe._readableState.endEmitted,writable:!0}),be(Fe,ae,{value:function(ze,Xe){var st=_e[re].read();st?(_e[ee]=null,_e[me]=null,_e[xe]=null,ze(le(st,!1))):(_e[me]=ze,_e[xe]=Xe)},writable:!0}),Fe));return _e[ee]=null,we(Oe,function(Ye){if(Ye&&Ye.code!=="ERR_STREAM_PREMATURE_CLOSE"){var ze=_e[xe];ze!==null&&(_e[ee]=null,_e[me]=null,_e[xe]=null,ze(Ye)),_e[fe]=Ye;return}var Xe=_e[me];Xe!==null&&(_e[ee]=null,_e[me]=null,_e[xe]=null,Xe(le(void 0,!0))),_e[z]=!0}),Oe.on("readable",pe.bind(null,_e)),_e};Re.exports=ke}).call(this)}).call(this,ie("_process"))},{"./end-of-stream":408,_process:467}],406:[function(ie,Re,je){"use strict";function ve(ue,pe){var Ee=Object.keys(ue);if(Object.getOwnPropertySymbols){var Pe=Object.getOwnPropertySymbols(ue);pe&&(Pe=Pe.filter(function(Ie){return Object.getOwnPropertyDescriptor(ue,Ie).enumerable})),Ee.push.apply(Ee,Pe)}return Ee}function ce(ue){for(var pe=1;pe<arguments.length;pe++){var Ee=arguments[pe]!=null?arguments[pe]:{};pe%2?ve(Object(Ee),!0).forEach(function(Pe){be(ue,Pe,Ee[Pe])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ue,Object.getOwnPropertyDescriptors(Ee)):ve(Object(Ee)).forEach(function(Pe){Object.defineProperty(ue,Pe,Object.getOwnPropertyDescriptor(Ee,Pe))})}return ue}function be(ue,pe,Ee){return pe=me(pe),pe in ue?Object.defineProperty(ue,pe,{value:Ee,enumerable:!0,configurable:!0,writable:!0}):ue[pe]=Ee,ue}function Ce(ue,pe){if(!(ue instanceof pe))throw new TypeError("Cannot call a class as a function")}function ye(ue,pe){for(var Ee=0;Ee<pe.length;Ee++){var Pe=pe[Ee];Pe.enumerable=Pe.enumerable||!1,Pe.configurable=!0,"value"in Pe&&(Pe.writable=!0),Object.defineProperty(ue,me(Pe.key),Pe)}}function we(ue,pe,Ee){return pe&&ye(ue.prototype,pe),Ee&&ye(ue,Ee),Object.defineProperty(ue,"prototype",{writable:!1}),ue}function me(ue){var pe=xe(ue,"string");return typeof pe=="symbol"?pe:String(pe)}function xe(ue,pe){if(typeof ue!="object"||ue===null)return ue;var Ee=ue[Symbol.toPrimitive];if(Ee!==void 0){var Pe=Ee.call(ue,pe||"default");if(typeof Pe!="object")return Pe;throw new TypeError("@@toPrimitive must return a primitive value.")}return(pe==="string"?String:Number)(ue)}var fe=ie("buffer"),z=fe.Buffer,ee=ie("util"),ae=ee.inspect,re=ae&&ae.custom||"inspect";function le(ue,pe,Ee){z.prototype.copy.call(ue,pe,Ee)}Re.exports=function(){function ue(){Ce(this,ue),this.head=null,this.tail=null,this.length=0}return we(ue,[{key:"push",value:function(Ee){var Pe={data:Ee,next:null};this.length>0?this.tail.next=Pe:this.head=Pe,this.tail=Pe,++this.length}},{key:"unshift",value:function(Ee){var Pe={data:Ee,next:this.head};this.length===0&&(this.tail=Pe),this.head=Pe,++this.length}},{key:"shift",value:function(){if(this.length!==0){var Ee=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,Ee}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(Ee){if(this.length===0)return"";for(var Pe=this.head,Ie=""+Pe.data;Pe=Pe.next;)Ie+=Ee+Pe.data;return Ie}},{key:"concat",value:function(Ee){if(this.length===0)return z.alloc(0);for(var Pe=z.allocUnsafe(Ee>>>0),Ie=this.head,ke=0;Ie;)le(Ie.data,Pe,ke),ke+=Ie.data.length,Ie=Ie.next;return Pe}},{key:"consume",value:function(Ee,Pe){var Ie;return Ee<this.head.data.length?(Ie=this.head.data.slice(0,Ee),this.head.data=this.head.data.slice(Ee)):Ee===this.head.data.length?Ie=this.shift():Ie=Pe?this._getString(Ee):this._getBuffer(Ee),Ie}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(Ee){var Pe=this.head,Ie=1,ke=Pe.data;for(Ee-=ke.length;Pe=Pe.next;){var Ae=Pe.data,Oe=Ee>Ae.length?Ae.length:Ee;if(Oe===Ae.length?ke+=Ae:ke+=Ae.slice(0,Ee),Ee-=Oe,Ee===0){Oe===Ae.length?(++Ie,Pe.next?this.head=Pe.next:this.head=this.tail=null):(this.head=Pe,Pe.data=Ae.slice(Oe));break}++Ie}return this.length-=Ie,ke}},{key:"_getBuffer",value:function(Ee){var Pe=z.allocUnsafe(Ee),Ie=this.head,ke=1;for(Ie.data.copy(Pe),Ee-=Ie.data.length;Ie=Ie.next;){var Ae=Ie.data,Oe=Ee>Ae.length?Ae.length:Ee;if(Ae.copy(Pe,Pe.length-Ee,0,Oe),Ee-=Oe,Ee===0){Oe===Ae.length?(++ke,Ie.next?this.head=Ie.next:this.head=this.tail=null):(this.head=Ie,Ie.data=Ae.slice(Oe));break}++ke}return this.length-=ke,Pe}},{key:re,value:function(Ee,Pe){return ae(this,ce(ce({},Pe),{},{depth:0,customInspect:!1}))}}]),ue}()},{buffer:90,util:89}],407:[function(ie,Re,je){(function(ve){(function(){"use strict";function ce(xe,fe){var z=this,ee=this._readableState&&this._readableState.destroyed,ae=this._writableState&&this._writableState.destroyed;return ee||ae?(fe?fe(xe):xe&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,ve.nextTick(we,this,xe)):ve.nextTick(we,this,xe)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(xe||null,function(re){!fe&&re?z._writableState?z._writableState.errorEmitted?ve.nextTick(Ce,z):(z._writableState.errorEmitted=!0,ve.nextTick(be,z,re)):ve.nextTick(be,z,re):fe?(ve.nextTick(Ce,z),fe(re)):ve.nextTick(Ce,z)}),this)}function be(xe,fe){we(xe,fe),Ce(xe)}function Ce(xe){xe._writableState&&!xe._writableState.emitClose||xe._readableState&&!xe._readableState.emitClose||xe.emit("close")}function ye(){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.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function we(xe,fe){xe.emit("error",fe)}function me(xe,fe){var z=xe._readableState,ee=xe._writableState;z&&z.autoDestroy||ee&&ee.autoDestroy?xe.destroy(fe):xe.emit("error",fe)}Re.exports={destroy:ce,undestroy:ye,errorOrDestroy:me}}).call(this)}).call(this,ie("_process"))},{_process:467}],408:[function(ie,Re,je){"use strict";var ve=ie("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function ce(we){var me=!1;return function(){if(!me){me=!0;for(var xe=arguments.length,fe=new Array(xe),z=0;z<xe;z++)fe[z]=arguments[z];we.apply(this,fe)}}}function be(){}function Ce(we){return we.setHeader&&typeof we.abort=="function"}function ye(we,me,xe){if(typeof me=="function")return ye(we,null,me);me||(me={}),xe=ce(xe||be);var fe=me.readable||me.readable!==!1&&we.readable,z=me.writable||me.writable!==!1&&we.writable,ee=function(){we.writable||re()},ae=we._writableState&&we._writableState.finished,re=function(){z=!1,ae=!0,fe||xe.call(we)},le=we._readableState&&we._readableState.endEmitted,ue=function(){fe=!1,le=!0,z||xe.call(we)},pe=function(ke){xe.call(we,ke)},Ee=function(){var ke;if(fe&&!le)return(!we._readableState||!we._readableState.ended)&&(ke=new ve),xe.call(we,ke);if(z&&!ae)return(!we._writableState||!we._writableState.ended)&&(ke=new ve),xe.call(we,ke)},Pe=function(){we.req.on("finish",re)};return Ce(we)?(we.on("complete",re),we.on("abort",Ee),we.req?Pe():we.on("request",Pe)):z&&!we._writableState&&(we.on("end",ee),we.on("close",ee)),we.on("end",ue),we.on("finish",re),me.error!==!1&&we.on("error",pe),we.on("close",Ee),function(){we.removeListener("complete",re),we.removeListener("abort",Ee),we.removeListener("request",Pe),we.req&&we.req.removeListener("finish",re),we.removeListener("end",ee),we.removeListener("close",ee),we.removeListener("finish",re),we.removeListener("end",ue),we.removeListener("error",pe),we.removeListener("close",Ee)}}Re.exports=ye},{"../../../errors":399}],409:[function(ie,Re,je){Re.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],410:[function(ie,Re,je){"use strict";var ve;function ce(re){var le=!1;return function(){le||(le=!0,re.apply(void 0,arguments))}}var be=ie("../../../errors").codes,Ce=be.ERR_MISSING_ARGS,ye=be.ERR_STREAM_DESTROYED;function we(re){if(re)throw re}function me(re){return re.setHeader&&typeof re.abort=="function"}function xe(re,le,ue,pe){pe=ce(pe);var Ee=!1;re.on("close",function(){Ee=!0}),ve===void 0&&(ve=ie("./end-of-stream")),ve(re,{readable:le,writable:ue},function(Ie){if(Ie)return pe(Ie);Ee=!0,pe()});var Pe=!1;return function(Ie){if(!Ee&&!Pe){if(Pe=!0,me(re))return re.abort();if(typeof re.destroy=="function")return re.destroy();pe(Ie||new ye("pipe"))}}}function fe(re){re()}function z(re,le){return re.pipe(le)}function ee(re){return!re.length||typeof re[re.length-1]!="function"?we:re.pop()}function ae(){for(var re=arguments.length,le=new Array(re),ue=0;ue<re;ue++)le[ue]=arguments[ue];var pe=ee(le);if(Array.isArray(le[0])&&(le=le[0]),le.length<2)throw new Ce("streams");var Ee,Pe=le.map(function(Ie,ke){var Ae=ke<le.length-1,Oe=ke>0;return xe(Ie,Ae,Oe,function(Fe){Ee||(Ee=Fe),Fe&&Pe.forEach(fe),!Ae&&(Pe.forEach(fe),pe(Ee))})});return le.reduce(z)}Re.exports=ae},{"../../../errors":399,"./end-of-stream":408}],411:[function(ie,Re,je){"use strict";var ve=ie("../../../errors").codes.ERR_INVALID_OPT_VALUE;function ce(Ce,ye,we){return Ce.highWaterMark!=null?Ce.highWaterMark:ye?Ce[we]:null}function be(Ce,ye,we,me){var xe=ce(ye,me,we);if(xe!=null){if(!(isFinite(xe)&&Math.floor(xe)===xe)||xe<0){var fe=me?we:"highWaterMark";throw new ve(fe,xe)}return Math.floor(xe)}return Ce.objectMode?16:16*1024}Re.exports={getHighWaterMark:be}},{"../../../errors":399}],412:[function(ie,Re,je){arguments[4][393][0].apply(je,arguments)},{dup:393,events:344}],413:[function(ie,Re,je){"use strict";var ve=ie("safe-buffer").Buffer,ce=ve.isEncoding||function(Pe){switch(Pe=""+Pe,Pe&&Pe.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}};function be(Pe){if(!Pe)return"utf8";for(var Ie;;)switch(Pe){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 Pe;default:if(Ie)return;Pe=(""+Pe).toLowerCase(),Ie=!0}}function Ce(Pe){var Ie=be(Pe);if(typeof Ie!="string"&&(ve.isEncoding===ce||!ce(Pe)))throw new Error("Unknown encoding: "+Pe);return Ie||Pe}je.StringDecoder=ye;function ye(Pe){this.encoding=Ce(Pe);var Ie;switch(this.encoding){case"utf16le":this.text=ae,this.end=re,Ie=4;break;case"utf8":this.fillLast=fe,Ie=4;break;case"base64":this.text=le,this.end=ue,Ie=3;break;default:this.write=pe,this.end=Ee;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=ve.allocUnsafe(Ie)}ye.prototype.write=function(Pe){if(Pe.length===0)return"";var Ie,ke;if(this.lastNeed){if(Ie=this.fillLast(Pe),Ie===void 0)return"";ke=this.lastNeed,this.lastNeed=0}else ke=0;return ke<Pe.length?Ie?Ie+this.text(Pe,ke):this.text(Pe,ke):Ie||""},ye.prototype.end=ee,ye.prototype.text=z,ye.prototype.fillLast=function(Pe){if(this.lastNeed<=Pe.length)return Pe.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);Pe.copy(this.lastChar,this.lastTotal-this.lastNeed,0,Pe.length),this.lastNeed-=Pe.length};function we(Pe){return Pe<=127?0:Pe>>5===6?2:Pe>>4===14?3:Pe>>3===30?4:Pe>>6===2?-1:-2}function me(Pe,Ie,ke){var Ae=Ie.length-1;if(Ae<ke)return 0;var Oe=we(Ie[Ae]);return Oe>=0?(Oe>0&&(Pe.lastNeed=Oe-1),Oe):--Ae<ke||Oe===-2?0:(Oe=we(Ie[Ae]),Oe>=0?(Oe>0&&(Pe.lastNeed=Oe-2),Oe):--Ae<ke||Oe===-2?0:(Oe=we(Ie[Ae]),Oe>=0?(Oe>0&&(Oe===2?Oe=0:Pe.lastNeed=Oe-3),Oe):0))}function xe(Pe,Ie,ke){if((Ie[0]&192)!==128)return Pe.lastNeed=0,"\uFFFD";if(Pe.lastNeed>1&&Ie.length>1){if((Ie[1]&192)!==128)return Pe.lastNeed=1,"\uFFFD";if(Pe.lastNeed>2&&Ie.length>2&&(Ie[2]&192)!==128)return Pe.lastNeed=2,"\uFFFD"}}function fe(Pe){var Ie=this.lastTotal-this.lastNeed,ke=xe(this,Pe,Ie);if(ke!==void 0)return ke;if(this.lastNeed<=Pe.length)return Pe.copy(this.lastChar,Ie,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);Pe.copy(this.lastChar,Ie,0,Pe.length),this.lastNeed-=Pe.length}function z(Pe,Ie){var ke=me(this,Pe,Ie);if(!this.lastNeed)return Pe.toString("utf8",Ie);this.lastTotal=ke;var Ae=Pe.length-(ke-this.lastNeed);return Pe.copy(this.lastChar,0,Ae),Pe.toString("utf8",Ie,Ae)}function ee(Pe){var Ie=Pe&&Pe.length?this.write(Pe):"";return this.lastNeed?Ie+"\uFFFD":Ie}function ae(Pe,Ie){if((Pe.length-Ie)%2===0){var ke=Pe.toString("utf16le",Ie);if(ke){var Ae=ke.charCodeAt(ke.length-1);if(Ae>=55296&&Ae<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=Pe[Pe.length-2],this.lastChar[1]=Pe[Pe.length-1],ke.slice(0,-1)}return ke}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=Pe[Pe.length-1],Pe.toString("utf16le",Ie,Pe.length-1)}function re(Pe){var Ie=Pe&&Pe.length?this.write(Pe):"";if(this.lastNeed){var ke=this.lastTotal-this.lastNeed;return Ie+this.lastChar.toString("utf16le",0,ke)}return Ie}function le(Pe,Ie){var ke=(Pe.length-Ie)%3;return ke===0?Pe.toString("base64",Ie):(this.lastNeed=3-ke,this.lastTotal=3,ke===1?this.lastChar[0]=Pe[Pe.length-1]:(this.lastChar[0]=Pe[Pe.length-2],this.lastChar[1]=Pe[Pe.length-1]),Pe.toString("base64",Ie,Pe.length-ke))}function ue(Pe){var Ie=Pe&&Pe.length?this.write(Pe):"";return this.lastNeed?Ie+this.lastChar.toString("base64",0,3-this.lastNeed):Ie}function pe(Pe){return Pe.toString(this.encoding)}function Ee(Pe){return Pe&&Pe.length?this.write(Pe):""}},{"safe-buffer":396}],414:[function(ie,Re,je){(function(ve,ce){(function(){var be=ie("process/browser.js").nextTick,Ce=Function.prototype.apply,ye=Array.prototype.slice,we={},me=0;je.setTimeout=function(){return new xe(Ce.call(setTimeout,window,arguments),clearTimeout)},je.setInterval=function(){return new xe(Ce.call(setInterval,window,arguments),clearInterval)},je.clearTimeout=je.clearInterval=function(fe){fe.close()};function xe(fe,z){this._id=fe,this._clearFn=z}xe.prototype.unref=xe.prototype.ref=function(){},xe.prototype.close=function(){this._clearFn.call(window,this._id)},je.enroll=function(fe,z){clearTimeout(fe._idleTimeoutId),fe._idleTimeout=z},je.unenroll=function(fe){clearTimeout(fe._idleTimeoutId),fe._idleTimeout=-1},je._unrefActive=je.active=function(fe){clearTimeout(fe._idleTimeoutId);var z=fe._idleTimeout;z>=0&&(fe._idleTimeoutId=setTimeout(function(){fe._onTimeout&&fe._onTimeout()},z))},je.setImmediate=typeof ve=="function"?ve:function(fe){var z=me++,ee=arguments.length<2?!1:ye.call(arguments,1);return we[z]=!0,be(function(){we[z]&&(ee?fe.apply(null,ee):fe.call(null),je.clearImmediate(z))}),z},je.clearImmediate=typeof ce=="function"?ce:function(fe){delete we[fe]}}).call(this)}).call(this,ie("timers").setImmediate,ie("timers").clearImmediate)},{"process/browser.js":381,timers:414}],415:[function(ie,Re,je){var ve=ie("buffer").Buffer;Re.exports=function(ce){if(ce instanceof Uint8Array){if(ce.byteOffset===0&&ce.byteLength===ce.buffer.byteLength)return ce.buffer;if(typeof ce.buffer.slice=="function")return ce.buffer.slice(ce.byteOffset,ce.byteOffset+ce.byteLength)}if(ve.isBuffer(ce)){for(var be=new Uint8Array(ce.length),Ce=ce.length,ye=0;ye<Ce;ye++)be[ye]=ce[ye];return be.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:90}],416:[function(ie,Re,je){(function(ve){(function(){Re.exports=ce;function ce(Ce,ye){if(be("noDeprecation"))return Ce;var we=!1;function me(){if(!we){if(be("throwDeprecation"))throw new Error(ye);be("traceDeprecation")?console.trace(ye):console.warn(ye),we=!0}return Ce.apply(this,arguments)}return me}function be(Ce){try{if(!ve.localStorage)return!1}catch(we){return!1}var ye=ve.localStorage[Ce];return ye==null?!1:String(ye).toLowerCase()==="true"}}).call(this)}).call(this,typeof ln!="undefined"?ln:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],417:[function(ie,Re,je){arguments[4][84][0].apply(je,arguments)},{dup:84}],418:[function(ie,Re,je){"use strict";var ve=ie("is-arguments"),ce=ie("is-generator-function"),be=ie("which-typed-array"),Ce=ie("is-typed-array");function ye(qe){return qe.call.bind(qe)}var we=typeof BigInt!="undefined",me=typeof Symbol!="undefined",xe=ye(Object.prototype.toString),fe=ye(Number.prototype.valueOf),z=ye(String.prototype.valueOf),ee=ye(Boolean.prototype.valueOf);if(we)var ae=ye(BigInt.prototype.valueOf);if(me)var re=ye(Symbol.prototype.valueOf);function le(qe,He){if(typeof qe!="object")return!1;try{return He(qe),!0}catch(De){return!1}}je.isArgumentsObject=ve,je.isGeneratorFunction=ce,je.isTypedArray=Ce;function ue(qe){return typeof Promise!="undefined"&&qe instanceof Promise||qe!==null&&typeof qe=="object"&&typeof qe.then=="function"&&typeof qe.catch=="function"}je.isPromise=ue;function pe(qe){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(qe):Ce(qe)||vt(qe)}je.isArrayBufferView=pe;function Ee(qe){return be(qe)==="Uint8Array"}je.isUint8Array=Ee;function Pe(qe){return be(qe)==="Uint8ClampedArray"}je.isUint8ClampedArray=Pe;function Ie(qe){return be(qe)==="Uint16Array"}je.isUint16Array=Ie;function ke(qe){return be(qe)==="Uint32Array"}je.isUint32Array=ke;function Ae(qe){return be(qe)==="Int8Array"}je.isInt8Array=Ae;function Oe(qe){return be(qe)==="Int16Array"}je.isInt16Array=Oe;function Fe(qe){return be(qe)==="Int32Array"}je.isInt32Array=Fe;function _e(qe){return be(qe)==="Float32Array"}je.isFloat32Array=_e;function Ye(qe){return be(qe)==="Float64Array"}je.isFloat64Array=Ye;function ze(qe){return be(qe)==="BigInt64Array"}je.isBigInt64Array=ze;function Xe(qe){return be(qe)==="BigUint64Array"}je.isBigUint64Array=Xe;function st(qe){return xe(qe)==="[object Map]"}st.working=typeof Map!="undefined"&&st(new Map);function ht(qe){return typeof Map=="undefined"?!1:st.working?st(qe):qe instanceof Map}je.isMap=ht;function ft(qe){return xe(qe)==="[object Set]"}ft.working=typeof Set!="undefined"&&ft(new Set);function Lt(qe){return typeof Set=="undefined"?!1:ft.working?ft(qe):qe instanceof Set}je.isSet=Lt;function et(qe){return xe(qe)==="[object WeakMap]"}et.working=typeof WeakMap!="undefined"&&et(new WeakMap);function it(qe){return typeof WeakMap=="undefined"?!1:et.working?et(qe):qe instanceof WeakMap}je.isWeakMap=it;function xt(qe){return xe(qe)==="[object WeakSet]"}xt.working=typeof WeakSet!="undefined"&&xt(new WeakSet);function Et(qe){return xt(qe)}je.isWeakSet=Et;function Mt(qe){return xe(qe)==="[object ArrayBuffer]"}Mt.working=typeof ArrayBuffer!="undefined"&&Mt(new ArrayBuffer);function mt(qe){return typeof ArrayBuffer=="undefined"?!1:Mt.working?Mt(qe):qe instanceof ArrayBuffer}je.isArrayBuffer=mt;function pt(qe){return xe(qe)==="[object DataView]"}pt.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&pt(new DataView(new ArrayBuffer(1),0,1));function vt(qe){return typeof DataView=="undefined"?!1:pt.working?pt(qe):qe instanceof DataView}je.isDataView=vt;var jt=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function At(qe){return xe(qe)==="[object SharedArrayBuffer]"}function Kt(qe){return typeof jt=="undefined"?!1:(typeof At.working=="undefined"&&(At.working=At(new jt)),At.working?At(qe):qe instanceof jt)}je.isSharedArrayBuffer=Kt;function Ct(qe){return xe(qe)==="[object AsyncFunction]"}je.isAsyncFunction=Ct;function gt(qe){return xe(qe)==="[object Map Iterator]"}je.isMapIterator=gt;function tt(qe){return xe(qe)==="[object Set Iterator]"}je.isSetIterator=tt;function bt(qe){return xe(qe)==="[object Generator]"}je.isGeneratorObject=bt;function Ke(qe){return xe(qe)==="[object WebAssembly.Module]"}je.isWebAssemblyCompiledModule=Ke;function ut(qe){return le(qe,fe)}je.isNumberObject=ut;function wt(qe){return le(qe,z)}je.isStringObject=wt;function yt(qe){return le(qe,ee)}je.isBooleanObject=yt;function lt(qe){return we&&le(qe,ae)}je.isBigIntObject=lt;function Qe(qe){return me&&le(qe,re)}je.isSymbolObject=Qe;function We(qe){return ut(qe)||wt(qe)||yt(qe)||lt(qe)||Qe(qe)}je.isBoxedPrimitive=We;function Ue(qe){return typeof Uint8Array!="undefined"&&(mt(qe)||Kt(qe))}je.isAnyArrayBuffer=Ue,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(qe){Object.defineProperty(je,qe,{enumerable:!1,value:function(){throw new Error(qe+" is not supported in userland")}})})},{"is-arguments":365,"is-generator-function":368,"is-typed-array":369,"which-typed-array":420}],419:[function(ie,Re,je){(function(ve){(function(){var ce=Object.getOwnPropertyDescriptors||function(jt){for(var At=Object.keys(jt),Kt={},Ct=0;Ct<At.length;Ct++)Kt[At[Ct]]=Object.getOwnPropertyDescriptor(jt,At[Ct]);return Kt},be=/%[sdj%]/g;je.format=function(vt){if(!Oe(vt)){for(var jt=[],At=0;At<arguments.length;At++)jt.push(me(arguments[At]));return jt.join(" ")}for(var At=1,Kt=arguments,Ct=Kt.length,gt=String(vt).replace(be,function(bt){if(bt==="%%")return"%";if(At>=Ct)return bt;switch(bt){case"%s":return String(Kt[At++]);case"%d":return Number(Kt[At++]);case"%j":try{return JSON.stringify(Kt[At++])}catch(Ke){return"[Circular]"}default:return bt}}),tt=Kt[At];At<Ct;tt=Kt[++At])Ie(tt)||!ze(tt)?gt+=" "+tt:gt+=" "+me(tt);return gt},je.deprecate=function(vt,jt){if(typeof ve!="undefined"&&ve.noDeprecation===!0)return vt;if(typeof ve=="undefined")return function(){return je.deprecate(vt,jt).apply(this,arguments)};var At=!1;function Kt(){if(!At){if(ve.throwDeprecation)throw new Error(jt);ve.traceDeprecation?console.trace(jt):console.error(jt),At=!0}return vt.apply(this,arguments)}return Kt};var Ce={},ye=/^$/;if(ve.env.NODE_DEBUG){var we=ve.env.NODE_DEBUG;we=we.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),ye=new RegExp("^"+we+"$","i")}je.debuglog=function(vt){if(vt=vt.toUpperCase(),!Ce[vt])if(ye.test(vt)){var jt=ve.pid;Ce[vt]=function(){var At=je.format.apply(je,arguments);console.error("%s %d: %s",vt,jt,At)}}else Ce[vt]=function(){};return Ce[vt]};function me(vt,jt){var At={seen:[],stylize:fe};return arguments.length>=3&&(At.depth=arguments[2]),arguments.length>=4&&(At.colors=arguments[3]),Pe(jt)?At.showHidden=jt:jt&&je._extend(At,jt),_e(At.showHidden)&&(At.showHidden=!1),_e(At.depth)&&(At.depth=2),_e(At.colors)&&(At.colors=!1),_e(At.customInspect)&&(At.customInspect=!0),At.colors&&(At.stylize=xe),ee(At,vt,At.depth)}je.inspect=me,me.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]},me.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function xe(vt,jt){var At=me.styles[jt];return At?"\x1B["+me.colors[At][0]+"m"+vt+"\x1B["+me.colors[At][1]+"m":vt}function fe(vt,jt){return vt}function z(vt){var jt={};return vt.forEach(function(At,Kt){jt[At]=!0}),jt}function ee(vt,jt,At){if(vt.customInspect&&jt&&ht(jt.inspect)&&jt.inspect!==je.inspect&&!(jt.constructor&&jt.constructor.prototype===jt)){var Kt=jt.inspect(At,vt);return Oe(Kt)||(Kt=ee(vt,Kt,At)),Kt}var Ct=ae(vt,jt);if(Ct)return Ct;var gt=Object.keys(jt),tt=z(gt);if(vt.showHidden&&(gt=Object.getOwnPropertyNames(jt)),st(jt)&&(gt.indexOf("message")>=0||gt.indexOf("description")>=0))return re(jt);if(gt.length===0){if(ht(jt)){var bt=jt.name?": "+jt.name:"";return vt.stylize("[Function"+bt+"]","special")}if(Ye(jt))return vt.stylize(RegExp.prototype.toString.call(jt),"regexp");if(Xe(jt))return vt.stylize(Date.prototype.toString.call(jt),"date");if(st(jt))return re(jt)}var Ke="",ut=!1,wt=["{","}"];if(Ee(jt)&&(ut=!0,wt=["[","]"]),ht(jt)){var yt=jt.name?": "+jt.name:"";Ke=" [Function"+yt+"]"}if(Ye(jt)&&(Ke=" "+RegExp.prototype.toString.call(jt)),Xe(jt)&&(Ke=" "+Date.prototype.toUTCString.call(jt)),st(jt)&&(Ke=" "+re(jt)),gt.length===0&&(!ut||jt.length==0))return wt[0]+Ke+wt[1];if(At<0)return Ye(jt)?vt.stylize(RegExp.prototype.toString.call(jt),"regexp"):vt.stylize("[Object]","special");vt.seen.push(jt);var lt;return ut?lt=le(vt,jt,At,tt,gt):lt=gt.map(function(Qe){return ue(vt,jt,At,tt,Qe,ut)}),vt.seen.pop(),pe(lt,Ke,wt)}function ae(vt,jt){if(_e(jt))return vt.stylize("undefined","undefined");if(Oe(jt)){var At="'"+JSON.stringify(jt).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return vt.stylize(At,"string")}if(Ae(jt))return vt.stylize(""+jt,"number");if(Pe(jt))return vt.stylize(""+jt,"boolean");if(Ie(jt))return vt.stylize("null","null")}function re(vt){return"["+Error.prototype.toString.call(vt)+"]"}function le(vt,jt,At,Kt,Ct){for(var gt=[],tt=0,bt=jt.length;tt<bt;++tt)Et(jt,String(tt))?gt.push(ue(vt,jt,At,Kt,String(tt),!0)):gt.push("");return Ct.forEach(function(Ke){Ke.match(/^\d+$/)||gt.push(ue(vt,jt,At,Kt,Ke,!0))}),gt}function ue(vt,jt,At,Kt,Ct,gt){var tt,bt,Ke;if(Ke=Object.getOwnPropertyDescriptor(jt,Ct)||{value:jt[Ct]},Ke.get?Ke.set?bt=vt.stylize("[Getter/Setter]","special"):bt=vt.stylize("[Getter]","special"):Ke.set&&(bt=vt.stylize("[Setter]","special")),Et(Kt,Ct)||(tt="["+Ct+"]"),bt||(vt.seen.indexOf(Ke.value)<0?(Ie(At)?bt=ee(vt,Ke.value,null):bt=ee(vt,Ke.value,At-1),bt.indexOf(`
`)>-1&&(gt?bt=bt.split(`
`).map(function(ut){return" "+ut}).join(`
`).slice(2):bt=`
`+bt.split(`
`).map(function(ut){return" "+ut}).join(`
`))):bt=vt.stylize("[Circular]","special")),_e(tt)){if(gt&&Ct.match(/^\d+$/))return bt;tt=JSON.stringify(""+Ct),tt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(tt=tt.slice(1,-1),tt=vt.stylize(tt,"name")):(tt=tt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),tt=vt.stylize(tt,"string"))}return tt+": "+bt}function pe(vt,jt,At){var Kt=0,Ct=vt.reduce(function(gt,tt){return Kt++,tt.indexOf(`
`)>=0&&Kt++,gt+tt.replace(/\u001b\[\d\d?m/g,"").length+1},0);return Ct>60?At[0]+(jt===""?"":jt+`
`)+" "+vt.join(`,
`)+" "+At[1]:At[0]+jt+" "+vt.join(", ")+" "+At[1]}je.types=ie("./support/types");function Ee(vt){return Array.isArray(vt)}je.isArray=Ee;function Pe(vt){return typeof vt=="boolean"}je.isBoolean=Pe;function Ie(vt){return vt===null}je.isNull=Ie;function ke(vt){return vt==null}je.isNullOrUndefined=ke;function Ae(vt){return typeof vt=="number"}je.isNumber=Ae;function Oe(vt){return typeof vt=="string"}je.isString=Oe;function Fe(vt){return typeof vt=="symbol"}je.isSymbol=Fe;function _e(vt){return vt===void 0}je.isUndefined=_e;function Ye(vt){return ze(vt)&&Lt(vt)==="[object RegExp]"}je.isRegExp=Ye,je.types.isRegExp=Ye;function ze(vt){return typeof vt=="object"&&vt!==null}je.isObject=ze;function Xe(vt){return ze(vt)&&Lt(vt)==="[object Date]"}je.isDate=Xe,je.types.isDate=Xe;function st(vt){return ze(vt)&&(Lt(vt)==="[object Error]"||vt instanceof Error)}je.isError=st,je.types.isNativeError=st;function ht(vt){return typeof vt=="function"}je.isFunction=ht;function ft(vt){return vt===null||typeof vt=="boolean"||typeof vt=="number"||typeof vt=="string"||typeof vt=="symbol"||typeof vt=="undefined"}je.isPrimitive=ft,je.isBuffer=ie("./support/isBuffer");function Lt(vt){return Object.prototype.toString.call(vt)}function et(vt){return vt<10?"0"+vt.toString(10):vt.toString(10)}var it=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function xt(){var vt=new Date,jt=[et(vt.getHours()),et(vt.getMinutes()),et(vt.getSeconds())].join(":");return[vt.getDate(),it[vt.getMonth()],jt].join(" ")}je.log=function(){console.log("%s - %s",xt(),je.format.apply(je,arguments))},je.inherits=ie("inherits"),je._extend=function(vt,jt){if(!jt||!ze(jt))return vt;for(var At=Object.keys(jt),Kt=At.length;Kt--;)vt[At[Kt]]=jt[At[Kt]];return vt};function Et(vt,jt){return Object.prototype.hasOwnProperty.call(vt,jt)}var Mt=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;je.promisify=function(jt){if(typeof jt!="function")throw new TypeError('The "original" argument must be of type Function');if(Mt&&jt[Mt]){var At=jt[Mt];if(typeof At!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(At,Mt,{value:At,enumerable:!1,writable:!1,configurable:!0}),At}function At(){for(var Kt,Ct,gt=new Promise(function(Ke,ut){Kt=Ke,Ct=ut}),tt=[],bt=0;bt<arguments.length;bt++)tt.push(arguments[bt]);tt.push(function(Ke,ut){Ke?Ct(Ke):Kt(ut)});try{jt.apply(this,tt)}catch(Ke){Ct(Ke)}return gt}return Object.setPrototypeOf(At,Object.getPrototypeOf(jt)),Mt&&Object.defineProperty(At,Mt,{value:At,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(At,ce(jt))},je.promisify.custom=Mt;function mt(vt,jt){if(!vt){var At=new Error("Promise was rejected with a falsy value");At.reason=vt,vt=At}return jt(vt)}function pt(vt){if(typeof vt!="function")throw new TypeError('The "original" argument must be of type Function');function jt(){for(var At=[],Kt=0;Kt<arguments.length;Kt++)At.push(arguments[Kt]);var Ct=At.pop();if(typeof Ct!="function")throw new TypeError("The last argument must be of type Function");var gt=this,tt=function(){return Ct.apply(gt,arguments)};vt.apply(this,At).then(function(bt){ve.nextTick(tt.bind(null,null,bt))},function(bt){ve.nextTick(mt.bind(null,bt,tt))})}return Object.setPrototypeOf(jt,Object.getPrototypeOf(vt)),Object.defineProperties(jt,ce(vt)),jt}je.callbackify=pt}).call(this)}).call(this,ie("_process"))},{"./support/isBuffer":417,"./support/types":418,_process:467,inherits:364}],420:[function(ie,Re,je){(function(ve){(function(){"use strict";var ce=ie("for-each"),be=ie("available-typed-arrays"),Ce=ie("call-bind"),ye=ie("call-bind/callBound"),we=ie("gopd"),me=ye("Object.prototype.toString"),xe=ie("has-tostringtag/shams")(),fe=typeof globalThis=="undefined"?ve:globalThis,z=be(),ee=ye("String.prototype.slice"),ae=Object.getPrototypeOf,re=ye("Array.prototype.indexOf",!0)||function(Pe,Ie){for(var ke=0;ke<Pe.length;ke+=1)if(Pe[ke]===Ie)return ke;return-1},le={__proto__:null};xe&&we&&ae?ce(z,function(Ee){var Pe=new fe[Ee];if(Symbol.toStringTag in Pe){var Ie=ae(Pe),ke=we(Ie,Symbol.toStringTag);if(!ke){var Ae=ae(Ie);ke=we(Ae,Symbol.toStringTag)}le["$"+Ee]=Ce(ke.get)}}):ce(z,function(Ee){var Pe=new fe[Ee];le["$"+Ee]=Ce(Pe.slice)});var ue=function(Pe){var Ie=!1;return ce(le,function(ke,Ae){if(!Ie)try{"$"+ke(Pe)===Ae&&(Ie=ee(Ae,1))}catch(Oe){}}),Ie},pe=function(Pe){var Ie=!1;return ce(le,function(ke,Ae){if(!Ie)try{ke(Pe),Ie=ee(Ae,1)}catch(Oe){}}),Ie};Re.exports=function(Pe){if(!Pe||typeof Pe!="object")return!1;if(!xe){var Ie=ee(me(Pe),8,-1);return re(z,Ie)>-1?Ie:Ie!=="Object"?!1:pe(Pe)}return we?ue(Pe):null}}).call(this)}).call(this,typeof ln!="undefined"?ln:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"available-typed-arrays":86,"call-bind":93,"call-bind/callBound":92,"for-each":345,gopd:349,"has-tostringtag/shams":353}],421:[function(ie,Re,je){(function(){"use strict";je.stripBOM=function(ve){return ve[0]==="\uFEFF"?ve.substring(1):ve}}).call(this)},{}],422:[function(ie,Re,je){(function(){"use strict";var ve,ce,be,Ce,ye,we={}.hasOwnProperty;ve=ie("xmlbuilder"),ce=ie("./defaults").defaults,Ce=function(me){return typeof me=="string"&&(me.indexOf("&")>=0||me.indexOf(">")>=0||me.indexOf("<")>=0)},ye=function(me){return"<![CDATA["+be(me)+"]]>"},be=function(me){return me.replace("]]>","]]]]><![CDATA[>")},je.Builder=function(){function me(xe){var fe,z,ee;this.options={},z=ce["0.2"];for(fe in z)we.call(z,fe)&&(ee=z[fe],this.options[fe]=ee);for(fe in xe)we.call(xe,fe)&&(ee=xe[fe],this.options[fe]=ee)}return me.prototype.buildObject=function(xe){var fe,z,ee,ae,re;return fe=this.options.attrkey,z=this.options.charkey,Object.keys(xe).length===1&&this.options.rootName===ce["0.2"].rootName?(re=Object.keys(xe)[0],xe=xe[re]):re=this.options.rootName,ee=function(le){return function(ue,pe){var Ee,Pe,Ie,ke,Ae,Oe;if(typeof pe!="object")le.options.cdata&&Ce(pe)?ue.raw(ye(pe)):ue.txt(pe);else if(Array.isArray(pe)){for(ke in pe)if(we.call(pe,ke)){Pe=pe[ke];for(Ae in Pe)Ie=Pe[Ae],ue=ee(ue.ele(Ae),Ie).up()}}else for(Ae in pe)if(we.call(pe,Ae))if(Pe=pe[Ae],Ae===fe){if(typeof Pe=="object")for(Ee in Pe)Oe=Pe[Ee],ue=ue.att(Ee,Oe)}else if(Ae===z)le.options.cdata&&Ce(Pe)?ue=ue.raw(ye(Pe)):ue=ue.txt(Pe);else if(Array.isArray(Pe))for(ke in Pe)we.call(Pe,ke)&&(Ie=Pe[ke],typeof Ie=="string"?le.options.cdata&&Ce(Ie)?ue=ue.ele(Ae).raw(ye(Ie)).up():ue=ue.ele(Ae,Ie).up():ue=ee(ue.ele(Ae),Ie).up());else typeof Pe=="object"?ue=ee(ue.ele(Ae),Pe).up():typeof Pe=="string"&&le.options.cdata&&Ce(Pe)?ue=ue.ele(Ae).raw(ye(Pe)).up():(Pe==null&&(Pe=""),ue=ue.ele(Ae,Pe.toString()).up());return ue}}(this),ae=ve.create(re,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),ee(ae,xe).end(this.options.renderOpts)},me}()}).call(this)},{"./defaults":423,xmlbuilder:459}],423:[function(ie,Re,je){(function(){je.defaults={"0.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:""},"0.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(this)},{}],424:[function(ie,Re,je){(function(){"use strict";var ve,ce,be,Ce,ye,we,me,xe,fe,z=function(re,le){return function(){return re.apply(le,arguments)}},ee=function(re,le){for(var ue in le)ae.call(le,ue)&&(re[ue]=le[ue]);function pe(){this.constructor=re}return pe.prototype=le.prototype,re.prototype=new pe,re.__super__=le.prototype,re},ae={}.hasOwnProperty;xe=ie("sax"),Ce=ie("events"),ve=ie("./bom"),me=ie("./processors"),fe=ie("timers").setImmediate,ce=ie("./defaults").defaults,ye=function(re){return typeof re=="object"&&re!=null&&Object.keys(re).length===0},we=function(re,le,ue){var pe,Ee,Pe;for(pe=0,Ee=re.length;pe<Ee;pe++)Pe=re[pe],le=Pe(le,ue);return le},be=function(re,le,ue){var pe;return pe=Object.create(null),pe.value=ue,pe.writable=!0,pe.enumerable=!0,pe.configurable=!0,Object.defineProperty(re,le,pe)},je.Parser=function(re){ee(le,re);function le(ue){this.parseStringPromise=z(this.parseStringPromise,this),this.parseString=z(this.parseString,this),this.reset=z(this.reset,this),this.assignOrPush=z(this.assignOrPush,this),this.processAsync=z(this.processAsync,this);var pe,Ee,Pe;if(!(this instanceof je.Parser))return new je.Parser(ue);this.options={},Ee=ce["0.2"];for(pe in Ee)ae.call(Ee,pe)&&(Pe=Ee[pe],this.options[pe]=Pe);for(pe in ue)ae.call(ue,pe)&&(Pe=ue[pe],this.options[pe]=Pe);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(me.normalize)),this.reset()}return le.prototype.processAsync=function(){var ue,pe;try{return this.remaining.length<=this.options.chunkSize?(ue=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(ue),this.saxParser.close()):(ue=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(ue),fe(this.processAsync))}catch(Ee){if(pe=Ee,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(pe)}},le.prototype.assignOrPush=function(ue,pe,Ee){return pe in ue?(ue[pe]instanceof Array||be(ue,pe,[ue[pe]]),ue[pe].push(Ee)):this.options.explicitArray?be(ue,pe,[Ee]):be(ue,pe,Ee)},le.prototype.reset=function(){var ue,pe,Ee,Pe;return this.removeAllListeners(),this.saxParser=xe.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(Ie){return function(ke){if(Ie.saxParser.resume(),!Ie.saxParser.errThrown)return Ie.saxParser.errThrown=!0,Ie.emit("error",ke)}}(this),this.saxParser.onend=function(Ie){return function(){if(!Ie.saxParser.ended)return Ie.saxParser.ended=!0,Ie.emit("end",Ie.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,Pe=[],ue=this.options.attrkey,pe=this.options.charkey,this.saxParser.onopentag=function(Ie){return function(ke){var Ae,Oe,Fe,_e,Ye;if(Fe={},Fe[pe]="",!Ie.options.ignoreAttrs){Ye=ke.attributes;for(Ae in Ye)ae.call(Ye,Ae)&&(!(ue in Fe)&&!Ie.options.mergeAttrs&&(Fe[ue]={}),Oe=Ie.options.attrValueProcessors?we(Ie.options.attrValueProcessors,ke.attributes[Ae],Ae):ke.attributes[Ae],_e=Ie.options.attrNameProcessors?we(Ie.options.attrNameProcessors,Ae):Ae,Ie.options.mergeAttrs?Ie.assignOrPush(Fe,_e,Oe):be(Fe[ue],_e,Oe))}return Fe["#name"]=Ie.options.tagNameProcessors?we(Ie.options.tagNameProcessors,ke.name):ke.name,Ie.options.xmlns&&(Fe[Ie.options.xmlnskey]={uri:ke.uri,local:ke.local}),Pe.push(Fe)}}(this),this.saxParser.onclosetag=function(Ie){return function(){var ke,Ae,Oe,Fe,_e,Ye,ze,Xe,st,ht;if(Ye=Pe.pop(),_e=Ye["#name"],(!Ie.options.explicitChildren||!Ie.options.preserveChildrenOrder)&&delete Ye["#name"],Ye.cdata===!0&&(ke=Ye.cdata,delete Ye.cdata),st=Pe[Pe.length-1],Ye[pe].match(/^\s*$/)&&!ke?(Ae=Ye[pe],delete Ye[pe]):(Ie.options.trim&&(Ye[pe]=Ye[pe].trim()),Ie.options.normalize&&(Ye[pe]=Ye[pe].replace(/\s{2,}/g," ").trim()),Ye[pe]=Ie.options.valueProcessors?we(Ie.options.valueProcessors,Ye[pe],_e):Ye[pe],Object.keys(Ye).length===1&&pe in Ye&&!Ie.EXPLICIT_CHARKEY&&(Ye=Ye[pe])),ye(Ye)&&(typeof Ie.options.emptyTag=="function"?Ye=Ie.options.emptyTag():Ye=Ie.options.emptyTag!==""?Ie.options.emptyTag:Ae),Ie.options.validator!=null&&(ht="/"+function(){var ft,Lt,et;for(et=[],ft=0,Lt=Pe.length;ft<Lt;ft++)Fe=Pe[ft],et.push(Fe["#name"]);return et}().concat(_e).join("/"),function(){var ft;try{return Ye=Ie.options.validator(ht,st&&st[_e],Ye)}catch(Lt){return ft=Lt,Ie.emit("error",ft)}}()),Ie.options.explicitChildren&&!Ie.options.mergeAttrs&&typeof Ye=="object"){if(!Ie.options.preserveChildrenOrder)Fe={},Ie.options.attrkey in Ye&&(Fe[Ie.options.attrkey]=Ye[Ie.options.attrkey],delete Ye[Ie.options.attrkey]),!Ie.options.charsAsChildren&&Ie.options.charkey in Ye&&(Fe[Ie.options.charkey]=Ye[Ie.options.charkey],delete Ye[Ie.options.charkey]),Object.getOwnPropertyNames(Ye).length>0&&(Fe[Ie.options.childkey]=Ye),Ye=Fe;else if(st){st[Ie.options.childkey]=st[Ie.options.childkey]||[],ze={};for(Oe in Ye)ae.call(Ye,Oe)&&be(ze,Oe,Ye[Oe]);st[Ie.options.childkey].push(ze),delete Ye["#name"],Object.keys(Ye).length===1&&pe in Ye&&!Ie.EXPLICIT_CHARKEY&&(Ye=Ye[pe])}}return Pe.length>0?Ie.assignOrPush(st,_e,Ye):(Ie.options.explicitRoot&&(Xe=Ye,Ye={},be(Ye,_e,Xe)),Ie.resultObject=Ye,Ie.saxParser.ended=!0,Ie.emit("end",Ie.resultObject))}}(this),Ee=function(Ie){return function(ke){var Ae,Oe;if(Oe=Pe[Pe.length-1],Oe)return Oe[pe]+=ke,Ie.options.explicitChildren&&Ie.options.preserveChildrenOrder&&Ie.options.charsAsChildren&&(Ie.options.includeWhiteChars||ke.replace(/\\n/g,"").trim()!=="")&&(Oe[Ie.options.childkey]=Oe[Ie.options.childkey]||[],Ae={"#name":"__text__"},Ae[pe]=ke,Ie.options.normalize&&(Ae[pe]=Ae[pe].replace(/\s{2,}/g," ").trim()),Oe[Ie.options.childkey].push(Ae)),Oe}}(this),this.saxParser.ontext=Ee,this.saxParser.oncdata=function(Ie){return function(ke){var Ae;if(Ae=Ee(ke),Ae)return Ae.cdata=!0}}(this)},le.prototype.parseString=function(ue,pe){var Ee;pe!=null&&typeof pe=="function"&&(this.on("end",function(Pe){return this.reset(),pe(null,Pe)}),this.on("error",function(Pe){return this.reset(),pe(Pe)}));try{return ue=ue.toString(),ue.trim()===""?(this.emit("end",null),!0):(ue=ve.stripBOM(ue),this.options.async?(this.remaining=ue,fe(this.processAsync),this.saxParser):this.saxParser.write(ue).close())}catch(Pe){if(Ee=Pe,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw Ee}else return this.emit("error",Ee),this.saxParser.errThrown=!0}},le.prototype.parseStringPromise=function(ue){return new Promise(function(pe){return function(Ee,Pe){return pe.parseString(ue,function(Ie,ke){return Ie?Pe(Ie):Ee(ke)})}}(this))},le}(Ce),je.parseString=function(re,le,ue){var pe,Ee,Pe;return ue!=null?(typeof ue=="function"&&(pe=ue),typeof le=="object"&&(Ee=le)):(typeof le=="function"&&(pe=le),Ee={}),Pe=new je.Parser(Ee),Pe.parseString(re,pe)},je.parseStringPromise=function(re,le){var ue,pe;return typeof le=="object"&&(ue=le),pe=new je.Parser(ue),pe.parseStringPromise(re)}}).call(this)},{"./bom":421,"./defaults":423,"./processors":425,events:344,sax:397,timers:414}],425:[function(ie,Re,je){(function(){"use strict";var ve;ve=new RegExp(/(?!xmlns)^.*:/),je.normalize=function(ce){return ce.toLowerCase()},je.firstCharLowerCase=function(ce){return ce.charAt(0).toLowerCase()+ce.slice(1)},je.stripPrefix=function(ce){return ce.replace(ve,"")},je.parseNumbers=function(ce){return isNaN(ce)||(ce=ce%1===0?parseInt(ce,10):parseFloat(ce)),ce},je.parseBooleans=function(ce){return/^(?:true|false)$/i.test(ce)&&(ce=ce.toLowerCase()==="true"),ce}}).call(this)},{}],426:[function(ie,Re,je){(function(){"use strict";var ve,ce,be,Ce,ye=function(me,xe){for(var fe in xe)we.call(xe,fe)&&(me[fe]=xe[fe]);function z(){this.constructor=me}return z.prototype=xe.prototype,me.prototype=new z,me.__super__=xe.prototype,me},we={}.hasOwnProperty;ce=ie("./defaults"),ve=ie("./builder"),be=ie("./parser"),Ce=ie("./processors"),je.defaults=ce.defaults,je.processors=Ce,je.ValidationError=function(me){ye(xe,me);function xe(fe){this.message=fe}return xe}(Error),je.Builder=ve.Builder,je.Parser=be.Parser,je.parseString=be.parseString,je.parseStringPromise=be.parseStringPromise}).call(this)},{"./builder":422,"./defaults":423,"./parser":424,"./processors":425}],427:[function(ie,Re,je){(function(){Re.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},{}],428:[function(ie,Re,je){(function(){Re.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(this)},{}],429:[function(ie,Re,je){(function(){var ve,ce,be,Ce,ye,we,me,xe=[].slice,fe={}.hasOwnProperty;ve=function(){var z,ee,ae,re,le,ue;if(ue=arguments[0],le=2<=arguments.length?xe.call(arguments,1):[],ye(Object.assign))Object.assign.apply(null,arguments);else for(z=0,ae=le.length;z<ae;z++)if(re=le[z],re!=null)for(ee in re)fe.call(re,ee)&&(ue[ee]=re[ee]);return ue},ye=function(z){return!!z&&Object.prototype.toString.call(z)==="[object Function]"},we=function(z){var ee;return!!z&&((ee=typeof z)=="function"||ee==="object")},be=function(z){return ye(Array.isArray)?Array.isArray(z):Object.prototype.toString.call(z)==="[object Array]"},Ce=function(z){var ee;if(be(z))return!z.length;for(ee in z)if(fe.call(z,ee))return!1;return!0},me=function(z){var ee,ae;return we(z)&&(ae=Object.getPrototypeOf(z))&&(ee=ae.constructor)&&typeof ee=="function"&&ee instanceof ee&&Function.prototype.toString.call(ee)===Function.prototype.toString.call(Object)},ce=function(z){return ye(z.valueOf)?z.valueOf():z},Re.exports.assign=ve,Re.exports.isFunction=ye,Re.exports.isObject=we,Re.exports.isArray=be,Re.exports.isEmpty=Ce,Re.exports.isPlainObject=me,Re.exports.getValue=ce}).call(this)},{}],430:[function(ie,Re,je){(function(){Re.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},{}],431:[function(ie,Re,je){(function(){var ve,ce,be;ve=ie("./NodeType"),be=ie("./XMLNode"),Re.exports=ce=function(){function Ce(ye,we,me){if(this.parent=ye,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),we==null)throw new Error("Missing attribute name. "+this.debugInfo(we));this.name=this.stringify.name(we),this.value=this.stringify.attValue(me),this.type=ve.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(Ce.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(Ce.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(Ce.prototype,"textContent",{get:function(){return this.value},set:function(ye){return this.value=ye||""}}),Object.defineProperty(Ce.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(Ce.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(Ce.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(Ce.prototype,"specified",{get:function(){return!0}}),Ce.prototype.clone=function(){return Object.create(this)},Ce.prototype.toString=function(ye){return this.options.writer.attribute(this,this.options.writer.filterOptions(ye))},Ce.prototype.debugInfo=function(ye){return ye=ye||this.name,ye==null?"parent: <"+this.parent.name+">":"attribute: {"+ye+"}, parent: <"+this.parent.name+">"},Ce.prototype.isEqualNode=function(ye){return!(ye.namespaceURI!==this.namespaceURI||ye.prefix!==this.prefix||ye.localName!==this.localName||ye.value!==this.value)},Ce}()}).call(this)},{"./NodeType":428,"./XMLNode":450}],432:[function(ie,Re,je){(function(){var ve,ce,be,Ce=function(we,me){for(var xe in me)ye.call(me,xe)&&(we[xe]=me[xe]);function fe(){this.constructor=we}return fe.prototype=me.prototype,we.prototype=new fe,we.__super__=me.prototype,we},ye={}.hasOwnProperty;ve=ie("./NodeType"),be=ie("./XMLCharacterData"),Re.exports=ce=function(we){Ce(me,we);function me(xe,fe){if(me.__super__.constructor.call(this,xe),fe==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=ve.CData,this.value=this.stringify.cdata(fe)}return me.prototype.clone=function(){return Object.create(this)},me.prototype.toString=function(xe){return this.options.writer.cdata(this,this.options.writer.filterOptions(xe))},me}(be)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],433:[function(ie,Re,je){(function(){var ve,ce,be=function(ye,we){for(var me in we)Ce.call(we,me)&&(ye[me]=we[me]);function xe(){this.constructor=ye}return xe.prototype=we.prototype,ye.prototype=new xe,ye.__super__=we.prototype,ye},Ce={}.hasOwnProperty;ce=ie("./XMLNode"),Re.exports=ve=function(ye){be(we,ye);function we(me){we.__super__.constructor.call(this,me),this.value=""}return Object.defineProperty(we.prototype,"data",{get:function(){return this.value},set:function(me){return this.value=me||""}}),Object.defineProperty(we.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(we.prototype,"textContent",{get:function(){return this.value},set:function(me){return this.value=me||""}}),we.prototype.clone=function(){return Object.create(this)},we.prototype.substringData=function(me,xe){throw new Error("This DOM method is not implemented."+this.debugInfo())},we.prototype.appendData=function(me){throw new Error("This DOM method is not implemented."+this.debugInfo())},we.prototype.insertData=function(me,xe){throw new Error("This DOM method is not implemented."+this.debugInfo())},we.prototype.deleteData=function(me,xe){throw new Error("This DOM method is not implemented."+this.debugInfo())},we.prototype.replaceData=function(me,xe,fe){throw new Error("This DOM method is not implemented."+this.debugInfo())},we.prototype.isEqualNode=function(me){return!(!we.__super__.isEqualNode.apply(this,arguments).isEqualNode(me)||me.data!==this.data)},we}(ce)}).call(this)},{"./XMLNode":450}],434:[function(ie,Re,je){(function(){var ve,ce,be,Ce=function(we,me){for(var xe in me)ye.call(me,xe)&&(we[xe]=me[xe]);function fe(){this.constructor=we}return fe.prototype=me.prototype,we.prototype=new fe,we.__super__=me.prototype,we},ye={}.hasOwnProperty;ve=ie("./NodeType"),ce=ie("./XMLCharacterData"),Re.exports=be=function(we){Ce(me,we);function me(xe,fe){if(me.__super__.constructor.call(this,xe),fe==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=ve.Comment,this.value=this.stringify.comment(fe)}return me.prototype.clone=function(){return Object.create(this)},me.prototype.toString=function(xe){return this.options.writer.comment(this,this.options.writer.filterOptions(xe))},me}(ce)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],435:[function(ie,Re,je){(function(){var ve,ce,be;ce=ie("./XMLDOMErrorHandler"),be=ie("./XMLDOMStringList"),Re.exports=ve=function(){function Ce(){var ye;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new ce,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=ye=Object.create(this.defaultParams)}return Object.defineProperty(Ce.prototype,"parameterNames",{get:function(){return new be(Object.keys(this.defaultParams))}}),Ce.prototype.getParameter=function(ye){return this.params.hasOwnProperty(ye)?this.params[ye]:null},Ce.prototype.canSetParameter=function(ye,we){return!0},Ce.prototype.setParameter=function(ye,we){return we!=null?this.params[ye]=we:delete this.params[ye]},Ce}()}).call(this)},{"./XMLDOMErrorHandler":436,"./XMLDOMStringList":438}],436:[function(ie,Re,je){(function(){var ve;Re.exports=ve=function(){function ce(){}return ce.prototype.handleError=function(be){throw new Error(be)},ce}()}).call(this)},{}],437:[function(ie,Re,je){(function(){var ve;Re.exports=ve=function(){function ce(){}return ce.prototype.hasFeature=function(be,Ce){return!0},ce.prototype.createDocumentType=function(be,Ce,ye){throw new Error("This DOM method is not implemented.")},ce.prototype.createDocument=function(be,Ce,ye){throw new Error("This DOM method is not implemented.")},ce.prototype.createHTMLDocument=function(be){throw new Error("This DOM method is not implemented.")},ce.prototype.getFeature=function(be,Ce){throw new Error("This DOM method is not implemented.")},ce}()}).call(this)},{}],438:[function(ie,Re,je){(function(){var ve;Re.exports=ve=function(){function ce(be){this.arr=be||[]}return Object.defineProperty(ce.prototype,"length",{get:function(){return this.arr.length}}),ce.prototype.item=function(be){return this.arr[be]||null},ce.prototype.contains=function(be){return this.arr.indexOf(be)!==-1},ce}()}).call(this)},{}],439:[function(ie,Re,je){(function(){var ve,ce,be,Ce=function(we,me){for(var xe in me)ye.call(me,xe)&&(we[xe]=me[xe]);function fe(){this.constructor=we}return fe.prototype=me.prototype,we.prototype=new fe,we.__super__=me.prototype,we},ye={}.hasOwnProperty;be=ie("./XMLNode"),ve=ie("./NodeType"),Re.exports=ce=function(we){Ce(me,we);function me(xe,fe,z,ee,ae,re){if(me.__super__.constructor.call(this,xe),fe==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(z==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(fe));if(!ee)throw new Error("Missing DTD attribute type. "+this.debugInfo(fe));if(!ae)throw new Error("Missing DTD attribute default. "+this.debugInfo(fe));if(ae.indexOf("#")!==0&&(ae="#"+ae),!ae.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(fe));if(re&&!ae.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(fe));this.elementName=this.stringify.name(fe),this.type=ve.AttributeDeclaration,this.attributeName=this.stringify.name(z),this.attributeType=this.stringify.dtdAttType(ee),re&&(this.defaultValue=this.stringify.dtdAttDefault(re)),this.defaultValueType=ae}return me.prototype.toString=function(xe){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(xe))},me}(be)}).call(this)},{"./NodeType":428,"./XMLNode":450}],440:[function(ie,Re,je){(function(){var ve,ce,be,Ce=function(we,me){for(var xe in me)ye.call(me,xe)&&(we[xe]=me[xe]);function fe(){this.constructor=we}return fe.prototype=me.prototype,we.prototype=new fe,we.__super__=me.prototype,we},ye={}.hasOwnProperty;be=ie("./XMLNode"),ve=ie("./NodeType"),Re.exports=ce=function(we){Ce(me,we);function me(xe,fe,z){if(me.__super__.constructor.call(this,xe),fe==null)throw new Error("Missing DTD element name. "+this.debugInfo());z||(z="(#PCDATA)"),Array.isArray(z)&&(z="("+z.join(",")+")"),this.name=this.stringify.name(fe),this.type=ve.ElementDeclaration,this.value=this.stringify.dtdElementValue(z)}return me.prototype.toString=function(xe){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(xe))},me}(be)}).call(this)},{"./NodeType":428,"./XMLNode":450}],441:[function(ie,Re,je){(function(){var ve,ce,be,Ce,ye=function(me,xe){for(var fe in xe)we.call(xe,fe)&&(me[fe]=xe[fe]);function z(){this.constructor=me}return z.prototype=xe.prototype,me.prototype=new z,me.__super__=xe.prototype,me},we={}.hasOwnProperty;Ce=ie("./Utility").isObject,be=ie("./XMLNode"),ve=ie("./NodeType"),Re.exports=ce=function(me){ye(xe,me);function xe(fe,z,ee,ae){if(xe.__super__.constructor.call(this,fe),ee==null)throw new Error("Missing DTD entity name. "+this.debugInfo(ee));if(ae==null)throw new Error("Missing DTD entity value. "+this.debugInfo(ee));if(this.pe=!!z,this.name=this.stringify.name(ee),this.type=ve.EntityDeclaration,!Ce(ae))this.value=this.stringify.dtdEntityValue(ae),this.internal=!0;else{if(!ae.pubID&&!ae.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(ee));if(ae.pubID&&!ae.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(ee));if(this.internal=!1,ae.pubID!=null&&(this.pubID=this.stringify.dtdPubID(ae.pubID)),ae.sysID!=null&&(this.sysID=this.stringify.dtdSysID(ae.sysID)),ae.nData!=null&&(this.nData=this.stringify.dtdNData(ae.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(ee))}}return Object.defineProperty(xe.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(xe.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(xe.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(xe.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(xe.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(xe.prototype,"xmlVersion",{get:function(){return null}}),xe.prototype.toString=function(fe){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(fe))},xe}(be)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],442:[function(ie,Re,je){(function(){var ve,ce,be,Ce=function(we,me){for(var xe in me)ye.call(me,xe)&&(we[xe]=me[xe]);function fe(){this.constructor=we}return fe.prototype=me.prototype,we.prototype=new fe,we.__super__=me.prototype,we},ye={}.hasOwnProperty;be=ie("./XMLNode"),ve=ie("./NodeType"),Re.exports=ce=function(we){Ce(me,we);function me(xe,fe,z){if(me.__super__.constructor.call(this,xe),fe==null)throw new Error("Missing DTD notation name. "+this.debugInfo(fe));if(!z.pubID&&!z.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(fe));this.name=this.stringify.name(fe),this.type=ve.NotationDeclaration,z.pubID!=null&&(this.pubID=this.stringify.dtdPubID(z.pubID)),z.sysID!=null&&(this.sysID=this.stringify.dtdSysID(z.sysID))}return Object.defineProperty(me.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(me.prototype,"systemId",{get:function(){return this.sysID}}),me.prototype.toString=function(xe){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(xe))},me}(be)}).call(this)},{"./NodeType":428,"./XMLNode":450}],443:[function(ie,Re,je){(function(){var ve,ce,be,Ce,ye=function(me,xe){for(var fe in xe)we.call(xe,fe)&&(me[fe]=xe[fe]);function z(){this.constructor=me}return z.prototype=xe.prototype,me.prototype=new z,me.__super__=xe.prototype,me},we={}.hasOwnProperty;Ce=ie("./Utility").isObject,be=ie("./XMLNode"),ve=ie("./NodeType"),Re.exports=ce=function(me){ye(xe,me);function xe(fe,z,ee,ae){var re;xe.__super__.constructor.call(this,fe),Ce(z)&&(re=z,z=re.version,ee=re.encoding,ae=re.standalone),z||(z="1.0"),this.type=ve.Declaration,this.version=this.stringify.xmlVersion(z),ee!=null&&(this.encoding=this.stringify.xmlEncoding(ee)),ae!=null&&(this.standalone=this.stringify.xmlStandalone(ae))}return xe.prototype.toString=function(fe){return this.options.writer.declaration(this,this.options.writer.filterOptions(fe))},xe}(be)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],444:[function(ie,Re,je){(function(){var ve,ce,be,Ce,ye,we,me,xe,fe,z=function(ae,re){for(var le in re)ee.call(re,le)&&(ae[le]=re[le]);function ue(){this.constructor=ae}return ue.prototype=re.prototype,ae.prototype=new ue,ae.__super__=re.prototype,ae},ee={}.hasOwnProperty;fe=ie("./Utility").isObject,xe=ie("./XMLNode"),ve=ie("./NodeType"),ce=ie("./XMLDTDAttList"),Ce=ie("./XMLDTDEntity"),be=ie("./XMLDTDElement"),ye=ie("./XMLDTDNotation"),me=ie("./XMLNamedNodeMap"),Re.exports=we=function(ae){z(re,ae);function re(le,ue,pe){var Ee,Pe,Ie,ke,Ae,Oe;if(re.__super__.constructor.call(this,le),this.type=ve.DocType,le.children){for(ke=le.children,Pe=0,Ie=ke.length;Pe<Ie;Pe++)if(Ee=ke[Pe],Ee.type===ve.Element){this.name=Ee.name;break}}this.documentObject=le,fe(ue)&&(Ae=ue,ue=Ae.pubID,pe=Ae.sysID),pe==null&&(Oe=[ue,pe],pe=Oe[0],ue=Oe[1]),ue!=null&&(this.pubID=this.stringify.dtdPubID(ue)),pe!=null&&(this.sysID=this.stringify.dtdSysID(pe))}return Object.defineProperty(re.prototype,"entities",{get:function(){var le,ue,pe,Ee,Pe;for(Ee={},Pe=this.children,ue=0,pe=Pe.length;ue<pe;ue++)le=Pe[ue],le.type===ve.EntityDeclaration&&!le.pe&&(Ee[le.name]=le);return new me(Ee)}}),Object.defineProperty(re.prototype,"notations",{get:function(){var le,ue,pe,Ee,Pe;for(Ee={},Pe=this.children,ue=0,pe=Pe.length;ue<pe;ue++)le=Pe[ue],le.type===ve.NotationDeclaration&&(Ee[le.name]=le);return new me(Ee)}}),Object.defineProperty(re.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(re.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(re.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),re.prototype.element=function(le,ue){var pe;return pe=new be(this,le,ue),this.children.push(pe),this},re.prototype.attList=function(le,ue,pe,Ee,Pe){var Ie;return Ie=new ce(this,le,ue,pe,Ee,Pe),this.children.push(Ie),this},re.prototype.entity=function(le,ue){var pe;return pe=new Ce(this,!1,le,ue),this.children.push(pe),this},re.prototype.pEntity=function(le,ue){var pe;return pe=new Ce(this,!0,le,ue),this.children.push(pe),this},re.prototype.notation=function(le,ue){var pe;return pe=new ye(this,le,ue),this.children.push(pe),this},re.prototype.toString=function(le){return this.options.writer.docType(this,this.options.writer.filterOptions(le))},re.prototype.ele=function(le,ue){return this.element(le,ue)},re.prototype.att=function(le,ue,pe,Ee,Pe){return this.attList(le,ue,pe,Ee,Pe)},re.prototype.ent=function(le,ue){return this.entity(le,ue)},re.prototype.pent=function(le,ue){return this.pEntity(le,ue)},re.prototype.not=function(le,ue){return this.notation(le,ue)},re.prototype.up=function(){return this.root()||this.documentObject},re.prototype.isEqualNode=function(le){return!(!re.__super__.isEqualNode.apply(this,arguments).isEqualNode(le)||le.name!==this.name||le.publicId!==this.publicId||le.systemId!==this.systemId)},re}(xe)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLNamedNodeMap":449,"./XMLNode":450}],445:[function(ie,Re,je){(function(){var ve,ce,be,Ce,ye,we,me,xe,fe=function(ee,ae){for(var re in ae)z.call(ae,re)&&(ee[re]=ae[re]);function le(){this.constructor=ee}return le.prototype=ae.prototype,ee.prototype=new le,ee.__super__=ae.prototype,ee},z={}.hasOwnProperty;xe=ie("./Utility").isPlainObject,be=ie("./XMLDOMImplementation"),ce=ie("./XMLDOMConfiguration"),ye=ie("./XMLNode"),ve=ie("./NodeType"),me=ie("./XMLStringifier"),we=ie("./XMLStringWriter"),Re.exports=Ce=function(ee){fe(ae,ee);function ae(re){ae.__super__.constructor.call(this,null),this.name="#document",this.type=ve.Document,this.documentURI=null,this.domConfig=new ce,re||(re={}),re.writer||(re.writer=new we),this.options=re,this.stringify=new me(re)}return Object.defineProperty(ae.prototype,"implementation",{value:new be}),Object.defineProperty(ae.prototype,"doctype",{get:function(){var re,le,ue,pe;for(pe=this.children,le=0,ue=pe.length;le<ue;le++)if(re=pe[le],re.type===ve.DocType)return re;return null}}),Object.defineProperty(ae.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(ae.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(ae.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(ae.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===ve.Declaration?this.children[0].encoding:null}}),Object.defineProperty(ae.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===ve.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(ae.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===ve.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(ae.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(ae.prototype,"origin",{get:function(){return null}}),Object.defineProperty(ae.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(ae.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(ae.prototype,"contentType",{get:function(){return null}}),ae.prototype.end=function(re){var le;return le={},re?xe(re)&&(le=re,re=this.options.writer):re=this.options.writer,re.document(this,re.filterOptions(le))},ae.prototype.toString=function(re){return this.options.writer.document(this,this.options.writer.filterOptions(re))},ae.prototype.createElement=function(re){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createTextNode=function(re){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createComment=function(re){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createCDATASection=function(re){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createProcessingInstruction=function(re,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createAttribute=function(re){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createEntityReference=function(re){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.getElementsByTagName=function(re){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.importNode=function(re,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createElementNS=function(re,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createAttributeNS=function(re,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.getElementsByTagNameNS=function(re,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.getElementById=function(re){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.adoptNode=function(re){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.renameNode=function(re,le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.getElementsByClassName=function(re){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createEvent=function(re){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createNodeIterator=function(re,le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createTreeWalker=function(re,le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae}(ye)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLDOMConfiguration":435,"./XMLDOMImplementation":437,"./XMLNode":450,"./XMLStringWriter":455,"./XMLStringifier":456}],446:[function(ie,Re,je){(function(){var ve,ce,be,Ce,ye,we,me,xe,fe,z,ee,ae,re,le,ue,pe,Ee,Pe,Ie,ke,Ae,Oe,Fe,_e,Ye={}.hasOwnProperty;_e=ie("./Utility"),Oe=_e.isObject,Ae=_e.isFunction,Fe=_e.isPlainObject,ke=_e.getValue,ve=ie("./NodeType"),ae=ie("./XMLDocument"),le=ie("./XMLElement"),Ce=ie("./XMLCData"),ye=ie("./XMLComment"),pe=ie("./XMLRaw"),Ie=ie("./XMLText"),ue=ie("./XMLProcessingInstruction"),z=ie("./XMLDeclaration"),ee=ie("./XMLDocType"),we=ie("./XMLDTDAttList"),xe=ie("./XMLDTDEntity"),me=ie("./XMLDTDElement"),fe=ie("./XMLDTDNotation"),be=ie("./XMLAttribute"),Pe=ie("./XMLStringifier"),Ee=ie("./XMLStringWriter"),ce=ie("./WriterState"),Re.exports=re=function(){function ze(Xe,st,ht){var ft;this.name="?xml",this.type=ve.Document,Xe||(Xe={}),ft={},Xe.writer?Fe(Xe.writer)&&(ft=Xe.writer,Xe.writer=new Ee):Xe.writer=new Ee,this.options=Xe,this.writer=Xe.writer,this.writerOptions=this.writer.filterOptions(ft),this.stringify=new Pe(Xe),this.onDataCallback=st||function(){},this.onEndCallback=ht||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return ze.prototype.createChildNode=function(Xe){var st,ht,ft,Lt,et,it,xt,Et;switch(Xe.type){case ve.CData:this.cdata(Xe.value);break;case ve.Comment:this.comment(Xe.value);break;case ve.Element:ft={},xt=Xe.attribs;for(ht in xt)Ye.call(xt,ht)&&(st=xt[ht],ft[ht]=st.value);this.node(Xe.name,ft);break;case ve.Dummy:this.dummy();break;case ve.Raw:this.raw(Xe.value);break;case ve.Text:this.text(Xe.value);break;case ve.ProcessingInstruction:this.instruction(Xe.target,Xe.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+Xe.constructor.name)}for(Et=Xe.children,et=0,it=Et.length;et<it;et++)Lt=Et[et],this.createChildNode(Lt),Lt.type===ve.Element&&this.up();return this},ze.prototype.dummy=function(){return this},ze.prototype.node=function(Xe,st,ht){var ft;if(Xe==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(Xe));return this.openCurrent(),Xe=ke(Xe),st==null&&(st={}),st=ke(st),Oe(st)||(ft=[st,ht],ht=ft[0],st=ft[1]),this.currentNode=new le(this,Xe,st),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,ht!=null&&this.text(ht),this},ze.prototype.element=function(Xe,st,ht){var ft,Lt,et,it,xt,Et;if(this.currentNode&&this.currentNode.type===ve.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(Xe)||Oe(Xe)||Ae(Xe))for(it=this.options.noValidation,this.options.noValidation=!0,Et=new ae(this.options).element("TEMP_ROOT"),Et.element(Xe),this.options.noValidation=it,xt=Et.children,Lt=0,et=xt.length;Lt<et;Lt++)ft=xt[Lt],this.createChildNode(ft),ft.type===ve.Element&&this.up();else this.node(Xe,st,ht);return this},ze.prototype.attribute=function(Xe,st){var ht,ft;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(Xe));if(Xe!=null&&(Xe=ke(Xe)),Oe(Xe))for(ht in Xe)Ye.call(Xe,ht)&&(ft=Xe[ht],this.attribute(ht,ft));else Ae(st)&&(st=st.apply()),this.options.keepNullAttributes&&st==null?this.currentNode.attribs[Xe]=new be(this,Xe,""):st!=null&&(this.currentNode.attribs[Xe]=new be(this,Xe,st));return this},ze.prototype.text=function(Xe){var st;return this.openCurrent(),st=new Ie(this,Xe),this.onData(this.writer.text(st,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},ze.prototype.cdata=function(Xe){var st;return this.openCurrent(),st=new Ce(this,Xe),this.onData(this.writer.cdata(st,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},ze.prototype.comment=function(Xe){var st;return this.openCurrent(),st=new ye(this,Xe),this.onData(this.writer.comment(st,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},ze.prototype.raw=function(Xe){var st;return this.openCurrent(),st=new pe(this,Xe),this.onData(this.writer.raw(st,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},ze.prototype.instruction=function(Xe,st){var ht,ft,Lt,et,it;if(this.openCurrent(),Xe!=null&&(Xe=ke(Xe)),st!=null&&(st=ke(st)),Array.isArray(Xe))for(ht=0,et=Xe.length;ht<et;ht++)ft=Xe[ht],this.instruction(ft);else if(Oe(Xe))for(ft in Xe)Ye.call(Xe,ft)&&(Lt=Xe[ft],this.instruction(ft,Lt));else Ae(st)&&(st=st.apply()),it=new ue(this,Xe,st),this.onData(this.writer.processingInstruction(it,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},ze.prototype.declaration=function(Xe,st,ht){var ft;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return ft=new z(this,Xe,st,ht),this.onData(this.writer.declaration(ft,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},ze.prototype.doctype=function(Xe,st,ht){if(this.openCurrent(),Xe==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 ee(this,st,ht),this.currentNode.rootNodeName=Xe,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},ze.prototype.dtdElement=function(Xe,st){var ht;return this.openCurrent(),ht=new me(this,Xe,st),this.onData(this.writer.dtdElement(ht,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},ze.prototype.attList=function(Xe,st,ht,ft,Lt){var et;return this.openCurrent(),et=new we(this,Xe,st,ht,ft,Lt),this.onData(this.writer.dtdAttList(et,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},ze.prototype.entity=function(Xe,st){var ht;return this.openCurrent(),ht=new xe(this,!1,Xe,st),this.onData(this.writer.dtdEntity(ht,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},ze.prototype.pEntity=function(Xe,st){var ht;return this.openCurrent(),ht=new xe(this,!0,Xe,st),this.onData(this.writer.dtdEntity(ht,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},ze.prototype.notation=function(Xe,st){var ht;return this.openCurrent(),ht=new fe(this,Xe,st),this.onData(this.writer.dtdNotation(ht,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},ze.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},ze.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},ze.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},ze.prototype.openNode=function(Xe){var st,ht,ft,Lt;if(!Xe.isOpen){if(!this.root&&this.currentLevel===0&&Xe.type===ve.Element&&(this.root=Xe),ht="",Xe.type===ve.Element){this.writerOptions.state=ce.OpenTag,ht=this.writer.indent(Xe,this.writerOptions,this.currentLevel)+"<"+Xe.name,Lt=Xe.attribs;for(ft in Lt)Ye.call(Lt,ft)&&(st=Lt[ft],ht+=this.writer.attribute(st,this.writerOptions,this.currentLevel));ht+=(Xe.children?">":"/>")+this.writer.endline(Xe,this.writerOptions,this.currentLevel),this.writerOptions.state=ce.InsideTag}else this.writerOptions.state=ce.OpenTag,ht=this.writer.indent(Xe,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+Xe.rootNodeName,Xe.pubID&&Xe.sysID?ht+=' PUBLIC "'+Xe.pubID+'" "'+Xe.sysID+'"':Xe.sysID&&(ht+=' SYSTEM "'+Xe.sysID+'"'),Xe.children?(ht+=" [",this.writerOptions.state=ce.InsideTag):(this.writerOptions.state=ce.CloseTag,ht+=">"),ht+=this.writer.endline(Xe,this.writerOptions,this.currentLevel);return this.onData(ht,this.currentLevel),Xe.isOpen=!0}},ze.prototype.closeNode=function(Xe){var st;if(!Xe.isClosed)return st="",this.writerOptions.state=ce.CloseTag,Xe.type===ve.Element?st=this.writer.indent(Xe,this.writerOptions,this.currentLevel)+"</"+Xe.name+">"+this.writer.endline(Xe,this.writerOptions,this.currentLevel):st=this.writer.indent(Xe,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(Xe,this.writerOptions,this.currentLevel),this.writerOptions.state=ce.None,this.onData(st,this.currentLevel),Xe.isClosed=!0},ze.prototype.onData=function(Xe,st){return this.documentStarted=!0,this.onDataCallback(Xe,st+1)},ze.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},ze.prototype.debugInfo=function(Xe){return Xe==null?"":"node: <"+Xe+">"},ze.prototype.ele=function(){return this.element.apply(this,arguments)},ze.prototype.nod=function(Xe,st,ht){return this.node(Xe,st,ht)},ze.prototype.txt=function(Xe){return this.text(Xe)},ze.prototype.dat=function(Xe){return this.cdata(Xe)},ze.prototype.com=function(Xe){return this.comment(Xe)},ze.prototype.ins=function(Xe,st){return this.instruction(Xe,st)},ze.prototype.dec=function(Xe,st,ht){return this.declaration(Xe,st,ht)},ze.prototype.dtd=function(Xe,st,ht){return this.doctype(Xe,st,ht)},ze.prototype.e=function(Xe,st,ht){return this.element(Xe,st,ht)},ze.prototype.n=function(Xe,st,ht){return this.node(Xe,st,ht)},ze.prototype.t=function(Xe){return this.text(Xe)},ze.prototype.d=function(Xe){return this.cdata(Xe)},ze.prototype.c=function(Xe){return this.comment(Xe)},ze.prototype.r=function(Xe){return this.raw(Xe)},ze.prototype.i=function(Xe,st){return this.instruction(Xe,st)},ze.prototype.att=function(){return this.currentNode&&this.currentNode.type===ve.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},ze.prototype.a=function(){return this.currentNode&&this.currentNode.type===ve.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},ze.prototype.ent=function(Xe,st){return this.entity(Xe,st)},ze.prototype.pent=function(Xe,st){return this.pEntity(Xe,st)},ze.prototype.not=function(Xe,st){return this.notation(Xe,st)},ze}()}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLAttribute":431,"./XMLCData":432,"./XMLComment":434,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDocument":445,"./XMLElement":448,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLStringWriter":455,"./XMLStringifier":456,"./XMLText":457}],447:[function(ie,Re,je){(function(){var ve,ce,be,Ce=function(we,me){for(var xe in me)ye.call(me,xe)&&(we[xe]=me[xe]);function fe(){this.constructor=we}return fe.prototype=me.prototype,we.prototype=new fe,we.__super__=me.prototype,we},ye={}.hasOwnProperty;be=ie("./XMLNode"),ve=ie("./NodeType"),Re.exports=ce=function(we){Ce(me,we);function me(xe){me.__super__.constructor.call(this,xe),this.type=ve.Dummy}return me.prototype.clone=function(){return Object.create(this)},me.prototype.toString=function(xe){return""},me}(be)}).call(this)},{"./NodeType":428,"./XMLNode":450}],448:[function(ie,Re,je){(function(){var ve,ce,be,Ce,ye,we,me,xe,fe,z=function(ae,re){for(var le in re)ee.call(re,le)&&(ae[le]=re[le]);function ue(){this.constructor=ae}return ue.prototype=re.prototype,ae.prototype=new ue,ae.__super__=re.prototype,ae},ee={}.hasOwnProperty;fe=ie("./Utility"),xe=fe.isObject,me=fe.isFunction,we=fe.getValue,ye=ie("./XMLNode"),ve=ie("./NodeType"),ce=ie("./XMLAttribute"),Ce=ie("./XMLNamedNodeMap"),Re.exports=be=function(ae){z(re,ae);function re(le,ue,pe){var Ee,Pe,Ie,ke;if(re.__super__.constructor.call(this,le),ue==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(ue),this.type=ve.Element,this.attribs={},this.schemaTypeInfo=null,pe!=null&&this.attribute(pe),le.type===ve.Document&&(this.isRoot=!0,this.documentObject=le,le.rootObject=this,le.children)){for(ke=le.children,Pe=0,Ie=ke.length;Pe<Ie;Pe++)if(Ee=ke[Pe],Ee.type===ve.DocType){Ee.name=this.name;break}}}return Object.defineProperty(re.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(re.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(re.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(re.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(re.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(re.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(re.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(re.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new Ce(this.attribs)),this.attributeMap}}),re.prototype.clone=function(){var le,ue,pe,Ee;pe=Object.create(this),pe.isRoot&&(pe.documentObject=null),pe.attribs={},Ee=this.attribs;for(ue in Ee)ee.call(Ee,ue)&&(le=Ee[ue],pe.attribs[ue]=le.clone());return pe.children=[],this.children.forEach(function(Pe){var Ie;return Ie=Pe.clone(),Ie.parent=pe,pe.children.push(Ie)}),pe},re.prototype.attribute=function(le,ue){var pe,Ee;if(le!=null&&(le=we(le)),xe(le))for(pe in le)ee.call(le,pe)&&(Ee=le[pe],this.attribute(pe,Ee));else me(ue)&&(ue=ue.apply()),this.options.keepNullAttributes&&ue==null?this.attribs[le]=new ce(this,le,""):ue!=null&&(this.attribs[le]=new ce(this,le,ue));return this},re.prototype.removeAttribute=function(le){var ue,pe,Ee;if(le==null)throw new Error("Missing attribute name. "+this.debugInfo());if(le=we(le),Array.isArray(le))for(pe=0,Ee=le.length;pe<Ee;pe++)ue=le[pe],delete this.attribs[ue];else delete this.attribs[le];return this},re.prototype.toString=function(le){return this.options.writer.element(this,this.options.writer.filterOptions(le))},re.prototype.att=function(le,ue){return this.attribute(le,ue)},re.prototype.a=function(le,ue){return this.attribute(le,ue)},re.prototype.getAttribute=function(le){return this.attribs.hasOwnProperty(le)?this.attribs[le].value:null},re.prototype.setAttribute=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},re.prototype.getAttributeNode=function(le){return this.attribs.hasOwnProperty(le)?this.attribs[le]:null},re.prototype.setAttributeNode=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},re.prototype.removeAttributeNode=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},re.prototype.getElementsByTagName=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},re.prototype.getAttributeNS=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},re.prototype.setAttributeNS=function(le,ue,pe){throw new Error("This DOM method is not implemented."+this.debugInfo())},re.prototype.removeAttributeNS=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},re.prototype.getAttributeNodeNS=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},re.prototype.setAttributeNodeNS=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},re.prototype.getElementsByTagNameNS=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},re.prototype.hasAttribute=function(le){return this.attribs.hasOwnProperty(le)},re.prototype.hasAttributeNS=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},re.prototype.setIdAttribute=function(le,ue){return this.attribs.hasOwnProperty(le)?this.attribs[le].isId:ue},re.prototype.setIdAttributeNS=function(le,ue,pe){throw new Error("This DOM method is not implemented."+this.debugInfo())},re.prototype.setIdAttributeNode=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},re.prototype.getElementsByTagName=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},re.prototype.getElementsByTagNameNS=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},re.prototype.getElementsByClassName=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},re.prototype.isEqualNode=function(le){var ue,pe,Ee;if(!re.__super__.isEqualNode.apply(this,arguments).isEqualNode(le)||le.namespaceURI!==this.namespaceURI||le.prefix!==this.prefix||le.localName!==this.localName||le.attribs.length!==this.attribs.length)return!1;for(ue=pe=0,Ee=this.attribs.length-1;0<=Ee?pe<=Ee:pe>=Ee;ue=0<=Ee?++pe:--pe)if(!this.attribs[ue].isEqualNode(le.attribs[ue]))return!1;return!0},re}(ye)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLAttribute":431,"./XMLNamedNodeMap":449,"./XMLNode":450}],449:[function(ie,Re,je){(function(){var ve;Re.exports=ve=function(){function ce(be){this.nodes=be}return Object.defineProperty(ce.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),ce.prototype.clone=function(){return this.nodes=null},ce.prototype.getNamedItem=function(be){return this.nodes[be]},ce.prototype.setNamedItem=function(be){var Ce;return Ce=this.nodes[be.nodeName],this.nodes[be.nodeName]=be,Ce||null},ce.prototype.removeNamedItem=function(be){var Ce;return Ce=this.nodes[be],delete this.nodes[be],Ce||null},ce.prototype.item=function(be){return this.nodes[Object.keys(this.nodes)[be]]||null},ce.prototype.getNamedItemNS=function(be,Ce){throw new Error("This DOM method is not implemented.")},ce.prototype.setNamedItemNS=function(be){throw new Error("This DOM method is not implemented.")},ce.prototype.removeNamedItemNS=function(be,Ce){throw new Error("This DOM method is not implemented.")},ce}()}).call(this)},{}],450:[function(ie,Re,je){(function(){var ve,ce,be,Ce,ye,we,me,xe,fe,z,ee,ae,re,le,ue,pe,Ee,Pe,Ie,ke={}.hasOwnProperty;Ie=ie("./Utility"),Pe=Ie.isObject,Ee=Ie.isFunction,pe=Ie.isEmpty,ue=Ie.getValue,xe=null,be=null,Ce=null,ye=null,we=null,re=null,le=null,ae=null,me=null,ce=null,ee=null,fe=null,ve=null,Re.exports=z=function(){function Ae(Oe){this.parent=Oe,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,xe||(xe=ie("./XMLElement"),be=ie("./XMLCData"),Ce=ie("./XMLComment"),ye=ie("./XMLDeclaration"),we=ie("./XMLDocType"),re=ie("./XMLRaw"),le=ie("./XMLText"),ae=ie("./XMLProcessingInstruction"),me=ie("./XMLDummy"),ce=ie("./NodeType"),ee=ie("./XMLNodeList"),fe=ie("./XMLNamedNodeMap"),ve=ie("./DocumentPosition"))}return Object.defineProperty(Ae.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(Ae.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(Ae.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(Ae.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(Ae.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new ee(this.children)),this.childNodeList}}),Object.defineProperty(Ae.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(Ae.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(Ae.prototype,"previousSibling",{get:function(){var Oe;return Oe=this.parent.children.indexOf(this),this.parent.children[Oe-1]||null}}),Object.defineProperty(Ae.prototype,"nextSibling",{get:function(){var Oe;return Oe=this.parent.children.indexOf(this),this.parent.children[Oe+1]||null}}),Object.defineProperty(Ae.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(Ae.prototype,"textContent",{get:function(){var Oe,Fe,_e,Ye,ze;if(this.nodeType===ce.Element||this.nodeType===ce.DocumentFragment){for(ze="",Ye=this.children,Fe=0,_e=Ye.length;Fe<_e;Fe++)Oe=Ye[Fe],Oe.textContent&&(ze+=Oe.textContent);return ze}else return null},set:function(Oe){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Ae.prototype.setParent=function(Oe){var Fe,_e,Ye,ze,Xe;for(this.parent=Oe,Oe&&(this.options=Oe.options,this.stringify=Oe.stringify),ze=this.children,Xe=[],_e=0,Ye=ze.length;_e<Ye;_e++)Fe=ze[_e],Xe.push(Fe.setParent(this));return Xe},Ae.prototype.element=function(Oe,Fe,_e){var Ye,ze,Xe,st,ht,ft,Lt,et,it,xt,Et;if(ft=null,Fe===null&&_e==null&&(it=[{},null],Fe=it[0],_e=it[1]),Fe==null&&(Fe={}),Fe=ue(Fe),Pe(Fe)||(xt=[Fe,_e],_e=xt[0],Fe=xt[1]),Oe!=null&&(Oe=ue(Oe)),Array.isArray(Oe))for(Xe=0,Lt=Oe.length;Xe<Lt;Xe++)ze=Oe[Xe],ft=this.element(ze);else if(Ee(Oe))ft=this.element(Oe.apply());else if(Pe(Oe)){for(ht in Oe)if(ke.call(Oe,ht))if(Et=Oe[ht],Ee(Et)&&(Et=Et.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&ht.indexOf(this.stringify.convertAttKey)===0)ft=this.attribute(ht.substr(this.stringify.convertAttKey.length),Et);else if(!this.options.separateArrayItems&&Array.isArray(Et)&&pe(Et))ft=this.dummy();else if(Pe(Et)&&pe(Et))ft=this.element(ht);else if(!this.options.keepNullNodes&&Et==null)ft=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(Et))for(st=0,et=Et.length;st<et;st++)ze=Et[st],Ye={},Ye[ht]=ze,ft=this.element(Ye);else Pe(Et)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&ht.indexOf(this.stringify.convertTextKey)===0?ft=this.element(Et):(ft=this.element(ht),ft.element(Et)):ft=this.element(ht,Et)}else!this.options.keepNullNodes&&_e===null?ft=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&Oe.indexOf(this.stringify.convertTextKey)===0?ft=this.text(_e):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&Oe.indexOf(this.stringify.convertCDataKey)===0?ft=this.cdata(_e):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&Oe.indexOf(this.stringify.convertCommentKey)===0?ft=this.comment(_e):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&Oe.indexOf(this.stringify.convertRawKey)===0?ft=this.raw(_e):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&Oe.indexOf(this.stringify.convertPIKey)===0?ft=this.instruction(Oe.substr(this.stringify.convertPIKey.length),_e):ft=this.node(Oe,Fe,_e);if(ft==null)throw new Error("Could not create any elements with: "+Oe+". "+this.debugInfo());return ft},Ae.prototype.insertBefore=function(Oe,Fe,_e){var Ye,ze,Xe,st,ht;if(Oe!=null&&Oe.type)return Xe=Oe,st=Fe,Xe.setParent(this),st?(ze=children.indexOf(st),ht=children.splice(ze),children.push(Xe),Array.prototype.push.apply(children,ht)):children.push(Xe),Xe;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(Oe));return ze=this.parent.children.indexOf(this),ht=this.parent.children.splice(ze),Ye=this.parent.element(Oe,Fe,_e),Array.prototype.push.apply(this.parent.children,ht),Ye},Ae.prototype.insertAfter=function(Oe,Fe,_e){var Ye,ze,Xe;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(Oe));return ze=this.parent.children.indexOf(this),Xe=this.parent.children.splice(ze+1),Ye=this.parent.element(Oe,Fe,_e),Array.prototype.push.apply(this.parent.children,Xe),Ye},Ae.prototype.remove=function(){var Oe,Fe;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return Oe=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[Oe,Oe-Oe+1].concat(Fe=[])),this.parent},Ae.prototype.node=function(Oe,Fe,_e){var Ye,ze;return Oe!=null&&(Oe=ue(Oe)),Fe||(Fe={}),Fe=ue(Fe),Pe(Fe)||(ze=[Fe,_e],_e=ze[0],Fe=ze[1]),Ye=new xe(this,Oe,Fe),_e!=null&&Ye.text(_e),this.children.push(Ye),Ye},Ae.prototype.text=function(Oe){var Fe;return Pe(Oe)&&this.element(Oe),Fe=new le(this,Oe),this.children.push(Fe),this},Ae.prototype.cdata=function(Oe){var Fe;return Fe=new be(this,Oe),this.children.push(Fe),this},Ae.prototype.comment=function(Oe){var Fe;return Fe=new Ce(this,Oe),this.children.push(Fe),this},Ae.prototype.commentBefore=function(Oe){var Fe,_e,Ye;return _e=this.parent.children.indexOf(this),Ye=this.parent.children.splice(_e),Fe=this.parent.comment(Oe),Array.prototype.push.apply(this.parent.children,Ye),this},Ae.prototype.commentAfter=function(Oe){var Fe,_e,Ye;return _e=this.parent.children.indexOf(this),Ye=this.parent.children.splice(_e+1),Fe=this.parent.comment(Oe),Array.prototype.push.apply(this.parent.children,Ye),this},Ae.prototype.raw=function(Oe){var Fe;return Fe=new re(this,Oe),this.children.push(Fe),this},Ae.prototype.dummy=function(){var Oe;return Oe=new me(this),Oe},Ae.prototype.instruction=function(Oe,Fe){var _e,Ye,ze,Xe,st;if(Oe!=null&&(Oe=ue(Oe)),Fe!=null&&(Fe=ue(Fe)),Array.isArray(Oe))for(Xe=0,st=Oe.length;Xe<st;Xe++)_e=Oe[Xe],this.instruction(_e);else if(Pe(Oe))for(_e in Oe)ke.call(Oe,_e)&&(Ye=Oe[_e],this.instruction(_e,Ye));else Ee(Fe)&&(Fe=Fe.apply()),ze=new ae(this,Oe,Fe),this.children.push(ze);return this},Ae.prototype.instructionBefore=function(Oe,Fe){var _e,Ye,ze;return Ye=this.parent.children.indexOf(this),ze=this.parent.children.splice(Ye),_e=this.parent.instruction(Oe,Fe),Array.prototype.push.apply(this.parent.children,ze),this},Ae.prototype.instructionAfter=function(Oe,Fe){var _e,Ye,ze;return Ye=this.parent.children.indexOf(this),ze=this.parent.children.splice(Ye+1),_e=this.parent.instruction(Oe,Fe),Array.prototype.push.apply(this.parent.children,ze),this},Ae.prototype.declaration=function(Oe,Fe,_e){var Ye,ze;return Ye=this.document(),ze=new ye(Ye,Oe,Fe,_e),Ye.children.length===0?Ye.children.unshift(ze):Ye.children[0].type===ce.Declaration?Ye.children[0]=ze:Ye.children.unshift(ze),Ye.root()||Ye},Ae.prototype.dtd=function(Oe,Fe){var _e,Ye,ze,Xe,st,ht,ft,Lt,et,it;for(Ye=this.document(),ze=new we(Ye,Oe,Fe),et=Ye.children,Xe=st=0,ft=et.length;st<ft;Xe=++st)if(_e=et[Xe],_e.type===ce.DocType)return Ye.children[Xe]=ze,ze;for(it=Ye.children,Xe=ht=0,Lt=it.length;ht<Lt;Xe=++ht)if(_e=it[Xe],_e.isRoot)return Ye.children.splice(Xe,0,ze),ze;return Ye.children.push(ze),ze},Ae.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},Ae.prototype.root=function(){var Oe;for(Oe=this;Oe;){if(Oe.type===ce.Document)return Oe.rootObject;if(Oe.isRoot)return Oe;Oe=Oe.parent}},Ae.prototype.document=function(){var Oe;for(Oe=this;Oe;){if(Oe.type===ce.Document)return Oe;Oe=Oe.parent}},Ae.prototype.end=function(Oe){return this.document().end(Oe)},Ae.prototype.prev=function(){var Oe;if(Oe=this.parent.children.indexOf(this),Oe<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[Oe-1]},Ae.prototype.next=function(){var Oe;if(Oe=this.parent.children.indexOf(this),Oe===-1||Oe===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[Oe+1]},Ae.prototype.importDocument=function(Oe){var Fe;return Fe=Oe.root().clone(),Fe.parent=this,Fe.isRoot=!1,this.children.push(Fe),this},Ae.prototype.debugInfo=function(Oe){var Fe,_e;return Oe=Oe||this.name,Oe==null&&!((Fe=this.parent)!=null&&Fe.name)?"":Oe==null?"parent: <"+this.parent.name+">":(_e=this.parent)!=null&&_e.name?"node: <"+Oe+">, parent: <"+this.parent.name+">":"node: <"+Oe+">"},Ae.prototype.ele=function(Oe,Fe,_e){return this.element(Oe,Fe,_e)},Ae.prototype.nod=function(Oe,Fe,_e){return this.node(Oe,Fe,_e)},Ae.prototype.txt=function(Oe){return this.text(Oe)},Ae.prototype.dat=function(Oe){return this.cdata(Oe)},Ae.prototype.com=function(Oe){return this.comment(Oe)},Ae.prototype.ins=function(Oe,Fe){return this.instruction(Oe,Fe)},Ae.prototype.doc=function(){return this.document()},Ae.prototype.dec=function(Oe,Fe,_e){return this.declaration(Oe,Fe,_e)},Ae.prototype.e=function(Oe,Fe,_e){return this.element(Oe,Fe,_e)},Ae.prototype.n=function(Oe,Fe,_e){return this.node(Oe,Fe,_e)},Ae.prototype.t=function(Oe){return this.text(Oe)},Ae.prototype.d=function(Oe){return this.cdata(Oe)},Ae.prototype.c=function(Oe){return this.comment(Oe)},Ae.prototype.r=function(Oe){return this.raw(Oe)},Ae.prototype.i=function(Oe,Fe){return this.instruction(Oe,Fe)},Ae.prototype.u=function(){return this.up()},Ae.prototype.importXMLBuilder=function(Oe){return this.importDocument(Oe)},Ae.prototype.replaceChild=function(Oe,Fe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.removeChild=function(Oe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.appendChild=function(Oe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.hasChildNodes=function(){return this.children.length!==0},Ae.prototype.cloneNode=function(Oe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.isSupported=function(Oe,Fe){return!0},Ae.prototype.hasAttributes=function(){return this.attribs.length!==0},Ae.prototype.compareDocumentPosition=function(Oe){var Fe,_e;return Fe=this,Fe===Oe?0:this.document()!==Oe.document()?(_e=ve.Disconnected|ve.ImplementationSpecific,Math.random()<.5?_e|=ve.Preceding:_e|=ve.Following,_e):Fe.isAncestor(Oe)?ve.Contains|ve.Preceding:Fe.isDescendant(Oe)?ve.Contains|ve.Following:Fe.isPreceding(Oe)?ve.Preceding:ve.Following},Ae.prototype.isSameNode=function(Oe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.lookupPrefix=function(Oe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.isDefaultNamespace=function(Oe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.lookupNamespaceURI=function(Oe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.isEqualNode=function(Oe){var Fe,_e,Ye;if(Oe.nodeType!==this.nodeType||Oe.children.length!==this.children.length)return!1;for(Fe=_e=0,Ye=this.children.length-1;0<=Ye?_e<=Ye:_e>=Ye;Fe=0<=Ye?++_e:--_e)if(!this.children[Fe].isEqualNode(Oe.children[Fe]))return!1;return!0},Ae.prototype.getFeature=function(Oe,Fe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.setUserData=function(Oe,Fe,_e){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.getUserData=function(Oe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.contains=function(Oe){return Oe?Oe===this||this.isDescendant(Oe):!1},Ae.prototype.isDescendant=function(Oe){var Fe,_e,Ye,ze,Xe;for(Xe=this.children,Ye=0,ze=Xe.length;Ye<ze;Ye++)if(Fe=Xe[Ye],Oe===Fe||(_e=Fe.isDescendant(Oe),_e))return!0;return!1},Ae.prototype.isAncestor=function(Oe){return Oe.isDescendant(this)},Ae.prototype.isPreceding=function(Oe){var Fe,_e;return Fe=this.treePosition(Oe),_e=this.treePosition(this),Fe===-1||_e===-1?!1:Fe<_e},Ae.prototype.isFollowing=function(Oe){var Fe,_e;return Fe=this.treePosition(Oe),_e=this.treePosition(this),Fe===-1||_e===-1?!1:Fe>_e},Ae.prototype.treePosition=function(Oe){var Fe,_e;return _e=0,Fe=!1,this.foreachTreeNode(this.document(),function(Ye){if(_e++,!Fe&&Ye===Oe)return Fe=!0}),Fe?_e:-1},Ae.prototype.foreachTreeNode=function(Oe,Fe){var _e,Ye,ze,Xe,st;for(Oe||(Oe=this.document()),Xe=Oe.children,Ye=0,ze=Xe.length;Ye<ze;Ye++){if(_e=Xe[Ye],st=Fe(_e))return st;if(st=this.foreachTreeNode(_e,Fe),st)return st}},Ae}()}).call(this)},{"./DocumentPosition":427,"./NodeType":428,"./Utility":429,"./XMLCData":432,"./XMLComment":434,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDummy":447,"./XMLElement":448,"./XMLNamedNodeMap":449,"./XMLNodeList":451,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLText":457}],451:[function(ie,Re,je){(function(){var ve;Re.exports=ve=function(){function ce(be){this.nodes=be}return Object.defineProperty(ce.prototype,"length",{get:function(){return this.nodes.length||0}}),ce.prototype.clone=function(){return this.nodes=null},ce.prototype.item=function(be){return this.nodes[be]||null},ce}()}).call(this)},{}],452:[function(ie,Re,je){(function(){var ve,ce,be,Ce=function(we,me){for(var xe in me)ye.call(me,xe)&&(we[xe]=me[xe]);function fe(){this.constructor=we}return fe.prototype=me.prototype,we.prototype=new fe,we.__super__=me.prototype,we},ye={}.hasOwnProperty;ve=ie("./NodeType"),ce=ie("./XMLCharacterData"),Re.exports=be=function(we){Ce(me,we);function me(xe,fe,z){if(me.__super__.constructor.call(this,xe),fe==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=ve.ProcessingInstruction,this.target=this.stringify.insTarget(fe),this.name=this.target,z&&(this.value=this.stringify.insValue(z))}return me.prototype.clone=function(){return Object.create(this)},me.prototype.toString=function(xe){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(xe))},me.prototype.isEqualNode=function(xe){return!(!me.__super__.isEqualNode.apply(this,arguments).isEqualNode(xe)||xe.target!==this.target)},me}(ce)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],453:[function(ie,Re,je){(function(){var ve,ce,be,Ce=function(we,me){for(var xe in me)ye.call(me,xe)&&(we[xe]=me[xe]);function fe(){this.constructor=we}return fe.prototype=me.prototype,we.prototype=new fe,we.__super__=me.prototype,we},ye={}.hasOwnProperty;ve=ie("./NodeType"),ce=ie("./XMLNode"),Re.exports=be=function(we){Ce(me,we);function me(xe,fe){if(me.__super__.constructor.call(this,xe),fe==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=ve.Raw,this.value=this.stringify.raw(fe)}return me.prototype.clone=function(){return Object.create(this)},me.prototype.toString=function(xe){return this.options.writer.raw(this,this.options.writer.filterOptions(xe))},me}(ce)}).call(this)},{"./NodeType":428,"./XMLNode":450}],454:[function(ie,Re,je){(function(){var ve,ce,be,Ce,ye=function(me,xe){for(var fe in xe)we.call(xe,fe)&&(me[fe]=xe[fe]);function z(){this.constructor=me}return z.prototype=xe.prototype,me.prototype=new z,me.__super__=xe.prototype,me},we={}.hasOwnProperty;ve=ie("./NodeType"),Ce=ie("./XMLWriterBase"),ce=ie("./WriterState"),Re.exports=be=function(me){ye(xe,me);function xe(fe,z){this.stream=fe,xe.__super__.constructor.call(this,z)}return xe.prototype.endline=function(fe,z,ee){return fe.isLastRootNode&&z.state===ce.CloseTag?"":xe.__super__.endline.call(this,fe,z,ee)},xe.prototype.document=function(fe,z){var ee,ae,re,le,ue,pe,Ee,Pe,Ie;for(Ee=fe.children,ae=re=0,ue=Ee.length;re<ue;ae=++re)ee=Ee[ae],ee.isLastRootNode=ae===fe.children.length-1;for(z=this.filterOptions(z),Pe=fe.children,Ie=[],le=0,pe=Pe.length;le<pe;le++)ee=Pe[le],Ie.push(this.writeChildNode(ee,z,0));return Ie},xe.prototype.attribute=function(fe,z,ee){return this.stream.write(xe.__super__.attribute.call(this,fe,z,ee))},xe.prototype.cdata=function(fe,z,ee){return this.stream.write(xe.__super__.cdata.call(this,fe,z,ee))},xe.prototype.comment=function(fe,z,ee){return this.stream.write(xe.__super__.comment.call(this,fe,z,ee))},xe.prototype.declaration=function(fe,z,ee){return this.stream.write(xe.__super__.declaration.call(this,fe,z,ee))},xe.prototype.docType=function(fe,z,ee){var ae,re,le,ue;if(ee||(ee=0),this.openNode(fe,z,ee),z.state=ce.OpenTag,this.stream.write(this.indent(fe,z,ee)),this.stream.write("<!DOCTYPE "+fe.root().name),fe.pubID&&fe.sysID?this.stream.write(' PUBLIC "'+fe.pubID+'" "'+fe.sysID+'"'):fe.sysID&&this.stream.write(' SYSTEM "'+fe.sysID+'"'),fe.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(fe,z,ee)),z.state=ce.InsideTag,ue=fe.children,re=0,le=ue.length;re<le;re++)ae=ue[re],this.writeChildNode(ae,z,ee+1);z.state=ce.CloseTag,this.stream.write("]")}return z.state=ce.CloseTag,this.stream.write(z.spaceBeforeSlash+">"),this.stream.write(this.endline(fe,z,ee)),z.state=ce.None,this.closeNode(fe,z,ee)},xe.prototype.element=function(fe,z,ee){var ae,re,le,ue,pe,Ee,Pe,Ie,ke,Ae;ee||(ee=0),this.openNode(fe,z,ee),z.state=ce.OpenTag,this.stream.write(this.indent(fe,z,ee)+"<"+fe.name),ke=fe.attribs;for(Pe in ke)we.call(ke,Pe)&&(ae=ke[Pe],this.attribute(ae,z,ee));if(le=fe.children.length,ue=le===0?null:fe.children[0],le===0||fe.children.every(function(Oe){return(Oe.type===ve.Text||Oe.type===ve.Raw)&&Oe.value===""}))z.allowEmpty?(this.stream.write(">"),z.state=ce.CloseTag,this.stream.write("</"+fe.name+">")):(z.state=ce.CloseTag,this.stream.write(z.spaceBeforeSlash+"/>"));else if(z.pretty&&le===1&&(ue.type===ve.Text||ue.type===ve.Raw)&&ue.value!=null)this.stream.write(">"),z.state=ce.InsideTag,z.suppressPrettyCount++,Ie=!0,this.writeChildNode(ue,z,ee+1),z.suppressPrettyCount--,Ie=!1,z.state=ce.CloseTag,this.stream.write("</"+fe.name+">");else{for(this.stream.write(">"+this.endline(fe,z,ee)),z.state=ce.InsideTag,Ae=fe.children,pe=0,Ee=Ae.length;pe<Ee;pe++)re=Ae[pe],this.writeChildNode(re,z,ee+1);z.state=ce.CloseTag,this.stream.write(this.indent(fe,z,ee)+"</"+fe.name+">")}return this.stream.write(this.endline(fe,z,ee)),z.state=ce.None,this.closeNode(fe,z,ee)},xe.prototype.processingInstruction=function(fe,z,ee){return this.stream.write(xe.__super__.processingInstruction.call(this,fe,z,ee))},xe.prototype.raw=function(fe,z,ee){return this.stream.write(xe.__super__.raw.call(this,fe,z,ee))},xe.prototype.text=function(fe,z,ee){return this.stream.write(xe.__super__.text.call(this,fe,z,ee))},xe.prototype.dtdAttList=function(fe,z,ee){return this.stream.write(xe.__super__.dtdAttList.call(this,fe,z,ee))},xe.prototype.dtdElement=function(fe,z,ee){return this.stream.write(xe.__super__.dtdElement.call(this,fe,z,ee))},xe.prototype.dtdEntity=function(fe,z,ee){return this.stream.write(xe.__super__.dtdEntity.call(this,fe,z,ee))},xe.prototype.dtdNotation=function(fe,z,ee){return this.stream.write(xe.__super__.dtdNotation.call(this,fe,z,ee))},xe}(Ce)}).call(this)},{"./NodeType":428,"./WriterState":430,"./XMLWriterBase":458}],455:[function(ie,Re,je){(function(){var ve,ce,be=function(ye,we){for(var me in we)Ce.call(we,me)&&(ye[me]=we[me]);function xe(){this.constructor=ye}return xe.prototype=we.prototype,ye.prototype=new xe,ye.__super__=we.prototype,ye},Ce={}.hasOwnProperty;ce=ie("./XMLWriterBase"),Re.exports=ve=function(ye){be(we,ye);function we(me){we.__super__.constructor.call(this,me)}return we.prototype.document=function(me,xe){var fe,z,ee,ae,re;for(xe=this.filterOptions(xe),ae="",re=me.children,z=0,ee=re.length;z<ee;z++)fe=re[z],ae+=this.writeChildNode(fe,xe,0);return xe.pretty&&ae.slice(-xe.newline.length)===xe.newline&&(ae=ae.slice(0,-xe.newline.length)),ae},we}(ce)}).call(this)},{"./XMLWriterBase":458}],456:[function(ie,Re,je){(function(){var ve,ce=function(Ce,ye){return function(){return Ce.apply(ye,arguments)}},be={}.hasOwnProperty;Re.exports=ve=function(){function Ce(ye){this.assertLegalName=ce(this.assertLegalName,this),this.assertLegalChar=ce(this.assertLegalChar,this);var we,me,xe;ye||(ye={}),this.options=ye,this.options.version||(this.options.version="1.0"),me=ye.stringify||{};for(we in me)be.call(me,we)&&(xe=me[we],this[we]=xe)}return Ce.prototype.name=function(ye){return this.options.noValidation?ye:this.assertLegalName(""+ye||"")},Ce.prototype.text=function(ye){return this.options.noValidation?ye:this.assertLegalChar(this.textEscape(""+ye||""))},Ce.prototype.cdata=function(ye){return this.options.noValidation?ye:(ye=""+ye||"",ye=ye.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(ye))},Ce.prototype.comment=function(ye){if(this.options.noValidation)return ye;if(ye=""+ye||"",ye.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+ye);return this.assertLegalChar(ye)},Ce.prototype.raw=function(ye){return this.options.noValidation?ye:""+ye||""},Ce.prototype.attValue=function(ye){return this.options.noValidation?ye:this.assertLegalChar(this.attEscape(ye=""+ye||""))},Ce.prototype.insTarget=function(ye){return this.options.noValidation?ye:this.assertLegalChar(""+ye||"")},Ce.prototype.insValue=function(ye){if(this.options.noValidation)return ye;if(ye=""+ye||"",ye.match(/\?>/))throw new Error("Invalid processing instruction value: "+ye);return this.assertLegalChar(ye)},Ce.prototype.xmlVersion=function(ye){if(this.options.noValidation)return ye;if(ye=""+ye||"",!ye.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+ye);return ye},Ce.prototype.xmlEncoding=function(ye){if(this.options.noValidation)return ye;if(ye=""+ye||"",!ye.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+ye);return this.assertLegalChar(ye)},Ce.prototype.xmlStandalone=function(ye){return this.options.noValidation?ye:ye?"yes":"no"},Ce.prototype.dtdPubID=function(ye){return this.options.noValidation?ye:this.assertLegalChar(""+ye||"")},Ce.prototype.dtdSysID=function(ye){return this.options.noValidation?ye:this.assertLegalChar(""+ye||"")},Ce.prototype.dtdElementValue=function(ye){return this.options.noValidation?ye:this.assertLegalChar(""+ye||"")},Ce.prototype.dtdAttType=function(ye){return this.options.noValidation?ye:this.assertLegalChar(""+ye||"")},Ce.prototype.dtdAttDefault=function(ye){return this.options.noValidation?ye:this.assertLegalChar(""+ye||"")},Ce.prototype.dtdEntityValue=function(ye){return this.options.noValidation?ye:this.assertLegalChar(""+ye||"")},Ce.prototype.dtdNData=function(ye){return this.options.noValidation?ye:this.assertLegalChar(""+ye||"")},Ce.prototype.convertAttKey="@",Ce.prototype.convertPIKey="?",Ce.prototype.convertTextKey="#text",Ce.prototype.convertCDataKey="#cdata",Ce.prototype.convertCommentKey="#comment",Ce.prototype.convertRawKey="#raw",Ce.prototype.assertLegalChar=function(ye){var we,me;if(this.options.noValidation)return ye;if(we="",this.options.version==="1.0"){if(we=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,me=ye.match(we))throw new Error("Invalid character in string: "+ye+" at index "+me.index)}else if(this.options.version==="1.1"&&(we=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,me=ye.match(we)))throw new Error("Invalid character in string: "+ye+" at index "+me.index);return ye},Ce.prototype.assertLegalName=function(ye){var we;if(this.options.noValidation)return ye;if(this.assertLegalChar(ye),we=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!ye.match(we))throw new Error("Invalid character in name");return ye},Ce.prototype.textEscape=function(ye){var we;return this.options.noValidation?ye:(we=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,ye.replace(we,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},Ce.prototype.attEscape=function(ye){var we;return this.options.noValidation?ye:(we=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,ye.replace(we,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},Ce}()}).call(this)},{}],457:[function(ie,Re,je){(function(){var ve,ce,be,Ce=function(we,me){for(var xe in me)ye.call(me,xe)&&(we[xe]=me[xe]);function fe(){this.constructor=we}return fe.prototype=me.prototype,we.prototype=new fe,we.__super__=me.prototype,we},ye={}.hasOwnProperty;ve=ie("./NodeType"),ce=ie("./XMLCharacterData"),Re.exports=be=function(we){Ce(me,we);function me(xe,fe){if(me.__super__.constructor.call(this,xe),fe==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=ve.Text,this.value=this.stringify.text(fe)}return Object.defineProperty(me.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(me.prototype,"wholeText",{get:function(){var xe,fe,z;for(z="",fe=this.previousSibling;fe;)z=fe.data+z,fe=fe.previousSibling;for(z+=this.data,xe=this.nextSibling;xe;)z=z+xe.data,xe=xe.nextSibling;return z}}),me.prototype.clone=function(){return Object.create(this)},me.prototype.toString=function(xe){return this.options.writer.text(this,this.options.writer.filterOptions(xe))},me.prototype.splitText=function(xe){throw new Error("This DOM method is not implemented."+this.debugInfo())},me.prototype.replaceWholeText=function(xe){throw new Error("This DOM method is not implemented."+this.debugInfo())},me}(ce)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],458:[function(ie,Re,je){(function(){var ve,ce,be,Ce,ye,we,me,xe,fe,z,ee,ae,re,le,ue,pe,Ee,Pe={}.hasOwnProperty;Ee=ie("./Utility").assign,ve=ie("./NodeType"),fe=ie("./XMLDeclaration"),z=ie("./XMLDocType"),be=ie("./XMLCData"),Ce=ie("./XMLComment"),ae=ie("./XMLElement"),le=ie("./XMLRaw"),ue=ie("./XMLText"),re=ie("./XMLProcessingInstruction"),ee=ie("./XMLDummy"),ye=ie("./XMLDTDAttList"),we=ie("./XMLDTDElement"),me=ie("./XMLDTDEntity"),xe=ie("./XMLDTDNotation"),ce=ie("./WriterState"),Re.exports=pe=function(){function Ie(ke){var Ae,Oe,Fe;ke||(ke={}),this.options=ke,Oe=ke.writer||{};for(Ae in Oe)Pe.call(Oe,Ae)&&(Fe=Oe[Ae],this["_"+Ae]=this[Ae],this[Ae]=Fe)}return Ie.prototype.filterOptions=function(ke){var Ae,Oe,Fe,_e,Ye,ze,Xe,st;return ke||(ke={}),ke=Ee({},this.options,ke),Ae={writer:this},Ae.pretty=ke.pretty||!1,Ae.allowEmpty=ke.allowEmpty||!1,Ae.indent=(Oe=ke.indent)!=null?Oe:" ",Ae.newline=(Fe=ke.newline)!=null?Fe:`
`,Ae.offset=(_e=ke.offset)!=null?_e:0,Ae.dontPrettyTextNodes=(Ye=(ze=ke.dontPrettyTextNodes)!=null?ze:ke.dontprettytextnodes)!=null?Ye:0,Ae.spaceBeforeSlash=(Xe=(st=ke.spaceBeforeSlash)!=null?st:ke.spacebeforeslash)!=null?Xe:"",Ae.spaceBeforeSlash===!0&&(Ae.spaceBeforeSlash=" "),Ae.suppressPrettyCount=0,Ae.user={},Ae.state=ce.None,Ae},Ie.prototype.indent=function(ke,Ae,Oe){var Fe;return!Ae.pretty||Ae.suppressPrettyCount?"":Ae.pretty&&(Fe=(Oe||0)+Ae.offset+1,Fe>0)?new Array(Fe).join(Ae.indent):""},Ie.prototype.endline=function(ke,Ae,Oe){return!Ae.pretty||Ae.suppressPrettyCount?"":Ae.newline},Ie.prototype.attribute=function(ke,Ae,Oe){var Fe;return this.openAttribute(ke,Ae,Oe),Fe=" "+ke.name+'="'+ke.value+'"',this.closeAttribute(ke,Ae,Oe),Fe},Ie.prototype.cdata=function(ke,Ae,Oe){var Fe;return this.openNode(ke,Ae,Oe),Ae.state=ce.OpenTag,Fe=this.indent(ke,Ae,Oe)+"<![CDATA[",Ae.state=ce.InsideTag,Fe+=ke.value,Ae.state=ce.CloseTag,Fe+="]]>"+this.endline(ke,Ae,Oe),Ae.state=ce.None,this.closeNode(ke,Ae,Oe),Fe},Ie.prototype.comment=function(ke,Ae,Oe){var Fe;return this.openNode(ke,Ae,Oe),Ae.state=ce.OpenTag,Fe=this.indent(ke,Ae,Oe)+"<!-- ",Ae.state=ce.InsideTag,Fe+=ke.value,Ae.state=ce.CloseTag,Fe+=" -->"+this.endline(ke,Ae,Oe),Ae.state=ce.None,this.closeNode(ke,Ae,Oe),Fe},Ie.prototype.declaration=function(ke,Ae,Oe){var Fe;return this.openNode(ke,Ae,Oe),Ae.state=ce.OpenTag,Fe=this.indent(ke,Ae,Oe)+"<?xml",Ae.state=ce.InsideTag,Fe+=' version="'+ke.version+'"',ke.encoding!=null&&(Fe+=' encoding="'+ke.encoding+'"'),ke.standalone!=null&&(Fe+=' standalone="'+ke.standalone+'"'),Ae.state=ce.CloseTag,Fe+=Ae.spaceBeforeSlash+"?>",Fe+=this.endline(ke,Ae,Oe),Ae.state=ce.None,this.closeNode(ke,Ae,Oe),Fe},Ie.prototype.docType=function(ke,Ae,Oe){var Fe,_e,Ye,ze,Xe;if(Oe||(Oe=0),this.openNode(ke,Ae,Oe),Ae.state=ce.OpenTag,ze=this.indent(ke,Ae,Oe),ze+="<!DOCTYPE "+ke.root().name,ke.pubID&&ke.sysID?ze+=' PUBLIC "'+ke.pubID+'" "'+ke.sysID+'"':ke.sysID&&(ze+=' SYSTEM "'+ke.sysID+'"'),ke.children.length>0){for(ze+=" [",ze+=this.endline(ke,Ae,Oe),Ae.state=ce.InsideTag,Xe=ke.children,_e=0,Ye=Xe.length;_e<Ye;_e++)Fe=Xe[_e],ze+=this.writeChildNode(Fe,Ae,Oe+1);Ae.state=ce.CloseTag,ze+="]"}return Ae.state=ce.CloseTag,ze+=Ae.spaceBeforeSlash+">",ze+=this.endline(ke,Ae,Oe),Ae.state=ce.None,this.closeNode(ke,Ae,Oe),ze},Ie.prototype.element=function(ke,Ae,Oe){var Fe,_e,Ye,ze,Xe,st,ht,ft,Lt,et,it,xt,Et,Mt;Oe||(Oe=0),et=!1,it="",this.openNode(ke,Ae,Oe),Ae.state=ce.OpenTag,it+=this.indent(ke,Ae,Oe)+"<"+ke.name,xt=ke.attribs;for(Lt in xt)Pe.call(xt,Lt)&&(Fe=xt[Lt],it+=this.attribute(Fe,Ae,Oe));if(Ye=ke.children.length,ze=Ye===0?null:ke.children[0],Ye===0||ke.children.every(function(mt){return(mt.type===ve.Text||mt.type===ve.Raw)&&mt.value===""}))Ae.allowEmpty?(it+=">",Ae.state=ce.CloseTag,it+="</"+ke.name+">"+this.endline(ke,Ae,Oe)):(Ae.state=ce.CloseTag,it+=Ae.spaceBeforeSlash+"/>"+this.endline(ke,Ae,Oe));else if(Ae.pretty&&Ye===1&&(ze.type===ve.Text||ze.type===ve.Raw)&&ze.value!=null)it+=">",Ae.state=ce.InsideTag,Ae.suppressPrettyCount++,et=!0,it+=this.writeChildNode(ze,Ae,Oe+1),Ae.suppressPrettyCount--,et=!1,Ae.state=ce.CloseTag,it+="</"+ke.name+">"+this.endline(ke,Ae,Oe);else{if(Ae.dontPrettyTextNodes){for(Et=ke.children,Xe=0,ht=Et.length;Xe<ht;Xe++)if(_e=Et[Xe],(_e.type===ve.Text||_e.type===ve.Raw)&&_e.value!=null){Ae.suppressPrettyCount++,et=!0;break}}for(it+=">"+this.endline(ke,Ae,Oe),Ae.state=ce.InsideTag,Mt=ke.children,st=0,ft=Mt.length;st<ft;st++)_e=Mt[st],it+=this.writeChildNode(_e,Ae,Oe+1);Ae.state=ce.CloseTag,it+=this.indent(ke,Ae,Oe)+"</"+ke.name+">",et&&Ae.suppressPrettyCount--,it+=this.endline(ke,Ae,Oe),Ae.state=ce.None}return this.closeNode(ke,Ae,Oe),it},Ie.prototype.writeChildNode=function(ke,Ae,Oe){switch(ke.type){case ve.CData:return this.cdata(ke,Ae,Oe);case ve.Comment:return this.comment(ke,Ae,Oe);case ve.Element:return this.element(ke,Ae,Oe);case ve.Raw:return this.raw(ke,Ae,Oe);case ve.Text:return this.text(ke,Ae,Oe);case ve.ProcessingInstruction:return this.processingInstruction(ke,Ae,Oe);case ve.Dummy:return"";case ve.Declaration:return this.declaration(ke,Ae,Oe);case ve.DocType:return this.docType(ke,Ae,Oe);case ve.AttributeDeclaration:return this.dtdAttList(ke,Ae,Oe);case ve.ElementDeclaration:return this.dtdElement(ke,Ae,Oe);case ve.EntityDeclaration:return this.dtdEntity(ke,Ae,Oe);case ve.NotationDeclaration:return this.dtdNotation(ke,Ae,Oe);default:throw new Error("Unknown XML node type: "+ke.constructor.name)}},Ie.prototype.processingInstruction=function(ke,Ae,Oe){var Fe;return this.openNode(ke,Ae,Oe),Ae.state=ce.OpenTag,Fe=this.indent(ke,Ae,Oe)+"<?",Ae.state=ce.InsideTag,Fe+=ke.target,ke.value&&(Fe+=" "+ke.value),Ae.state=ce.CloseTag,Fe+=Ae.spaceBeforeSlash+"?>",Fe+=this.endline(ke,Ae,Oe),Ae.state=ce.None,this.closeNode(ke,Ae,Oe),Fe},Ie.prototype.raw=function(ke,Ae,Oe){var Fe;return this.openNode(ke,Ae,Oe),Ae.state=ce.OpenTag,Fe=this.indent(ke,Ae,Oe),Ae.state=ce.InsideTag,Fe+=ke.value,Ae.state=ce.CloseTag,Fe+=this.endline(ke,Ae,Oe),Ae.state=ce.None,this.closeNode(ke,Ae,Oe),Fe},Ie.prototype.text=function(ke,Ae,Oe){var Fe;return this.openNode(ke,Ae,Oe),Ae.state=ce.OpenTag,Fe=this.indent(ke,Ae,Oe),Ae.state=ce.InsideTag,Fe+=ke.value,Ae.state=ce.CloseTag,Fe+=this.endline(ke,Ae,Oe),Ae.state=ce.None,this.closeNode(ke,Ae,Oe),Fe},Ie.prototype.dtdAttList=function(ke,Ae,Oe){var Fe;return this.openNode(ke,Ae,Oe),Ae.state=ce.OpenTag,Fe=this.indent(ke,Ae,Oe)+"<!ATTLIST",Ae.state=ce.InsideTag,Fe+=" "+ke.elementName+" "+ke.attributeName+" "+ke.attributeType,ke.defaultValueType!=="#DEFAULT"&&(Fe+=" "+ke.defaultValueType),ke.defaultValue&&(Fe+=' "'+ke.defaultValue+'"'),Ae.state=ce.CloseTag,Fe+=Ae.spaceBeforeSlash+">"+this.endline(ke,Ae,Oe),Ae.state=ce.None,this.closeNode(ke,Ae,Oe),Fe},Ie.prototype.dtdElement=function(ke,Ae,Oe){var Fe;return this.openNode(ke,Ae,Oe),Ae.state=ce.OpenTag,Fe=this.indent(ke,Ae,Oe)+"<!ELEMENT",Ae.state=ce.InsideTag,Fe+=" "+ke.name+" "+ke.value,Ae.state=ce.CloseTag,Fe+=Ae.spaceBeforeSlash+">"+this.endline(ke,Ae,Oe),Ae.state=ce.None,this.closeNode(ke,Ae,Oe),Fe},Ie.prototype.dtdEntity=function(ke,Ae,Oe){var Fe;return this.openNode(ke,Ae,Oe),Ae.state=ce.OpenTag,Fe=this.indent(ke,Ae,Oe)+"<!ENTITY",Ae.state=ce.InsideTag,ke.pe&&(Fe+=" %"),Fe+=" "+ke.name,ke.value?Fe+=' "'+ke.value+'"':(ke.pubID&&ke.sysID?Fe+=' PUBLIC "'+ke.pubID+'" "'+ke.sysID+'"':ke.sysID&&(Fe+=' SYSTEM "'+ke.sysID+'"'),ke.nData&&(Fe+=" NDATA "+ke.nData)),Ae.state=ce.CloseTag,Fe+=Ae.spaceBeforeSlash+">"+this.endline(ke,Ae,Oe),Ae.state=ce.None,this.closeNode(ke,Ae,Oe),Fe},Ie.prototype.dtdNotation=function(ke,Ae,Oe){var Fe;return this.openNode(ke,Ae,Oe),Ae.state=ce.OpenTag,Fe=this.indent(ke,Ae,Oe)+"<!NOTATION",Ae.state=ce.InsideTag,Fe+=" "+ke.name,ke.pubID&&ke.sysID?Fe+=' PUBLIC "'+ke.pubID+'" "'+ke.sysID+'"':ke.pubID?Fe+=' PUBLIC "'+ke.pubID+'"':ke.sysID&&(Fe+=' SYSTEM "'+ke.sysID+'"'),Ae.state=ce.CloseTag,Fe+=Ae.spaceBeforeSlash+">"+this.endline(ke,Ae,Oe),Ae.state=ce.None,this.closeNode(ke,Ae,Oe),Fe},Ie.prototype.openNode=function(ke,Ae,Oe){},Ie.prototype.closeNode=function(ke,Ae,Oe){},Ie.prototype.openAttribute=function(ke,Ae,Oe){},Ie.prototype.closeAttribute=function(ke,Ae,Oe){},Ie}()}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLCData":432,"./XMLComment":434,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDummy":447,"./XMLElement":448,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLText":457}],459:[function(ie,Re,je){(function(){var ve,ce,be,Ce,ye,we,me,xe,fe,z;z=ie("./Utility"),xe=z.assign,fe=z.isFunction,be=ie("./XMLDOMImplementation"),Ce=ie("./XMLDocument"),ye=ie("./XMLDocumentCB"),me=ie("./XMLStringWriter"),we=ie("./XMLStreamWriter"),ve=ie("./NodeType"),ce=ie("./WriterState"),Re.exports.create=function(ee,ae,re,le){var ue,pe;if(ee==null)throw new Error("Root element needs a name.");return le=xe({},ae,re,le),ue=new Ce(le),pe=ue.element(ee),le.headless||(ue.declaration(le),(le.pubID!=null||le.sysID!=null)&&ue.dtd(le)),pe},Re.exports.begin=function(ee,ae,re){var le;return fe(ee)&&(le=[ee,ae],ae=le[0],re=le[1],ee={}),ae?new ye(ee,ae,re):new Ce(ee)},Re.exports.stringWriter=function(ee){return new me(ee)},Re.exports.streamWriter=function(ee,ae){return new we(ee,ae)},Re.exports.implementation=new be,Re.exports.nodeType=ve,Re.exports.writerState=ce}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLDOMImplementation":437,"./XMLDocument":445,"./XMLDocumentCB":446,"./XMLStreamWriter":454,"./XMLStringWriter":455}],460:[function(ie,Re,je){Re.exports=ce;var ve=Object.prototype.hasOwnProperty;function ce(){for(var be={},Ce=0;Ce<arguments.length;Ce++){var ye=arguments[Ce];for(var we in ye)ve.call(ye,we)&&(be[we]=ye[we])}return be}},{}],461:[function(ie,Re,je){"use strict";ie("core-js/modules/es.array.fill.js"),ie("core-js/modules/es.array.concat.js"),ie("core-js/modules/es.object.to-string.js"),ie("core-js/modules/es.regexp.to-string.js"),ie("core-js/modules/es.array.join.js"),ie("core-js/modules/es.array.slice.js");var ve=ie("buffer").Buffer,ce=ie("./sha"),be=ie("./md5"),Ce={sha1:ce,md5:be},ye=64,we=ve.alloc(ye);we.fill(0);function me(z,ee,ae){ve.isBuffer(ee)||(ee=ve.from(ee)),ve.isBuffer(ae)||(ae=ve.from(ae)),ee.length>ye?ee=z(ee):ee.length<ye&&(ee=ve.concat([ee,we],ye));for(var re=ve.alloc(ye),le=ve.alloc(ye),ue=0;ue<ye;ue++)re[ue]=ee[ue]^54,le[ue]=ee[ue]^92;var pe=z(ve.concat([re,ae]));return z(ve.concat([le,pe]))}function xe(z,ee){z=z||"sha1";var ae=Ce[z],re=[],le=0;return ae||fe("algorithm:",z,"is not yet supported"),{update:function(pe){return ve.isBuffer(pe)||(pe=ve.from(pe)),re.push(pe),le+=pe.length,this},digest:function(pe){var Ee=ve.concat(re),Pe=ee?me(ae,ee,Ee):ae(Ee);return re=null,pe?Pe.toString(pe):Pe}}}function fe(){var z=[].slice.call(arguments).join(" ");throw new Error([z,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
`))}je.createHash=function(z){return xe(z)},je.createHmac=function(z,ee){return xe(z,ee)},je.createCredentials=function(){fe("sorry,createCredentials is not implemented yet")},je.createCipher=function(){fe("sorry,createCipher is not implemented yet")},je.createCipheriv=function(){fe("sorry,createCipheriv is not implemented yet")},je.createDecipher=function(){fe("sorry,createDecipher is not implemented yet")},je.createDecipheriv=function(){fe("sorry,createDecipheriv is not implemented yet")},je.createSign=function(){fe("sorry,createSign is not implemented yet")},je.createVerify=function(){fe("sorry,createVerify is not implemented yet")},je.createDiffieHellman=function(){fe("sorry,createDiffieHellman is not implemented yet")},je.pbkdf2=function(){fe("sorry,pbkdf2 is not implemented yet")}},{"./md5":463,"./sha":464,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.fill.js":273,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],462:[function(ie,Re,je){"use strict";ie("core-js/modules/es.array.fill.js"),ie("core-js/modules/es.array.concat.js");var ve=ie("buffer").Buffer,ce=4,be=ve.alloc(ce);be.fill(0);var Ce=8;function ye(xe,fe){if(xe.length%ce!==0){var z=xe.length+(ce-xe.length%ce);xe=ve.concat([xe,be],z)}for(var ee=[],ae=fe?xe.readInt32BE:xe.readInt32LE,re=0;re<xe.length;re+=ce)ee.push(ae.call(xe,re));return ee}function we(xe,fe,z){for(var ee=ve.alloc(fe),ae=z?ee.writeInt32BE:ee.writeInt32LE,re=0;re<xe.length;re++)ae.call(ee,xe[re],re*4,!0);return ee}function me(xe,fe,z,ee){ve.isBuffer(xe)||(xe=ve.from(xe));var ae=fe(ye(xe,ee),xe.length*Ce);return we(ae,z,ee)}Re.exports={hash:me}},{buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.fill.js":273}],463:[function(ie,Re,je){"use strict";var ve=ie("./helpers");function ce(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function be(ee,ae){ee[ae>>5]|=128<<ae%32,ee[(ae+64>>>9<<4)+14]=ae;for(var re=1732584193,le=-271733879,ue=-1732584194,pe=271733878,Ee=0;Ee<ee.length;Ee+=16){var Pe=re,Ie=le,ke=ue,Ae=pe;re=ye(re,le,ue,pe,ee[Ee+0],7,-680876936),pe=ye(pe,re,le,ue,ee[Ee+1],12,-389564586),ue=ye(ue,pe,re,le,ee[Ee+2],17,606105819),le=ye(le,ue,pe,re,ee[Ee+3],22,-1044525330),re=ye(re,le,ue,pe,ee[Ee+4],7,-176418897),pe=ye(pe,re,le,ue,ee[Ee+5],12,1200080426),ue=ye(ue,pe,re,le,ee[Ee+6],17,-1473231341),le=ye(le,ue,pe,re,ee[Ee+7],22,-45705983),re=ye(re,le,ue,pe,ee[Ee+8],7,1770035416),pe=ye(pe,re,le,ue,ee[Ee+9],12,-1958414417),ue=ye(ue,pe,re,le,ee[Ee+10],17,-42063),le=ye(le,ue,pe,re,ee[Ee+11],22,-1990404162),re=ye(re,le,ue,pe,ee[Ee+12],7,1804603682),pe=ye(pe,re,le,ue,ee[Ee+13],12,-40341101),ue=ye(ue,pe,re,le,ee[Ee+14],17,-1502002290),le=ye(le,ue,pe,re,ee[Ee+15],22,1236535329),re=we(re,le,ue,pe,ee[Ee+1],5,-165796510),pe=we(pe,re,le,ue,ee[Ee+6],9,-1069501632),ue=we(ue,pe,re,le,ee[Ee+11],14,643717713),le=we(le,ue,pe,re,ee[Ee+0],20,-373897302),re=we(re,le,ue,pe,ee[Ee+5],5,-701558691),pe=we(pe,re,le,ue,ee[Ee+10],9,38016083),ue=we(ue,pe,re,le,ee[Ee+15],14,-660478335),le=we(le,ue,pe,re,ee[Ee+4],20,-405537848),re=we(re,le,ue,pe,ee[Ee+9],5,568446438),pe=we(pe,re,le,ue,ee[Ee+14],9,-1019803690),ue=we(ue,pe,re,le,ee[Ee+3],14,-187363961),le=we(le,ue,pe,re,ee[Ee+8],20,1163531501),re=we(re,le,ue,pe,ee[Ee+13],5,-1444681467),pe=we(pe,re,le,ue,ee[Ee+2],9,-51403784),ue=we(ue,pe,re,le,ee[Ee+7],14,1735328473),le=we(le,ue,pe,re,ee[Ee+12],20,-1926607734),re=me(re,le,ue,pe,ee[Ee+5],4,-378558),pe=me(pe,re,le,ue,ee[Ee+8],11,-2022574463),ue=me(ue,pe,re,le,ee[Ee+11],16,1839030562),le=me(le,ue,pe,re,ee[Ee+14],23,-35309556),re=me(re,le,ue,pe,ee[Ee+1],4,-1530992060),pe=me(pe,re,le,ue,ee[Ee+4],11,1272893353),ue=me(ue,pe,re,le,ee[Ee+7],16,-155497632),le=me(le,ue,pe,re,ee[Ee+10],23,-1094730640),re=me(re,le,ue,pe,ee[Ee+13],4,681279174),pe=me(pe,re,le,ue,ee[Ee+0],11,-358537222),ue=me(ue,pe,re,le,ee[Ee+3],16,-722521979),le=me(le,ue,pe,re,ee[Ee+6],23,76029189),re=me(re,le,ue,pe,ee[Ee+9],4,-640364487),pe=me(pe,re,le,ue,ee[Ee+12],11,-421815835),ue=me(ue,pe,re,le,ee[Ee+15],16,530742520),le=me(le,ue,pe,re,ee[Ee+2],23,-995338651),re=xe(re,le,ue,pe,ee[Ee+0],6,-198630844),pe=xe(pe,re,le,ue,ee[Ee+7],10,1126891415),ue=xe(ue,pe,re,le,ee[Ee+14],15,-1416354905),le=xe(le,ue,pe,re,ee[Ee+5],21,-57434055),re=xe(re,le,ue,pe,ee[Ee+12],6,1700485571),pe=xe(pe,re,le,ue,ee[Ee+3],10,-1894986606),ue=xe(ue,pe,re,le,ee[Ee+10],15,-1051523),le=xe(le,ue,pe,re,ee[Ee+1],21,-2054922799),re=xe(re,le,ue,pe,ee[Ee+8],6,1873313359),pe=xe(pe,re,le,ue,ee[Ee+15],10,-30611744),ue=xe(ue,pe,re,le,ee[Ee+6],15,-1560198380),le=xe(le,ue,pe,re,ee[Ee+13],21,1309151649),re=xe(re,le,ue,pe,ee[Ee+4],6,-145523070),pe=xe(pe,re,le,ue,ee[Ee+11],10,-1120210379),ue=xe(ue,pe,re,le,ee[Ee+2],15,718787259),le=xe(le,ue,pe,re,ee[Ee+9],21,-343485551),re=fe(re,Pe),le=fe(le,Ie),ue=fe(ue,ke),pe=fe(pe,Ae)}return Array(re,le,ue,pe)}function Ce(ee,ae,re,le,ue,pe){return fe(z(fe(fe(ae,ee),fe(le,pe)),ue),re)}function ye(ee,ae,re,le,ue,pe,Ee){return Ce(ae&re|~ae&le,ee,ae,ue,pe,Ee)}function we(ee,ae,re,le,ue,pe,Ee){return Ce(ae&le|re&~le,ee,ae,ue,pe,Ee)}function me(ee,ae,re,le,ue,pe,Ee){return Ce(ae^re^le,ee,ae,ue,pe,Ee)}function xe(ee,ae,re,le,ue,pe,Ee){return Ce(re^(ae|~le),ee,ae,ue,pe,Ee)}function fe(ee,ae){var re=(ee&65535)+(ae&65535),le=(ee>>16)+(ae>>16)+(re>>16);return le<<16|re&65535}function z(ee,ae){return ee<<ae|ee>>>32-ae}Re.exports=function(ae){return ve.hash(ae,be,16)}},{"./helpers":462}],464:[function(ie,Re,je){"use strict";var ve=ie("./helpers");function ce(me,xe){me[xe>>5]|=128<<24-xe%32,me[(xe+64>>9<<4)+15]=xe;for(var fe=Array(80),z=1732584193,ee=-271733879,ae=-1732584194,re=271733878,le=-1009589776,ue=0;ue<me.length;ue+=16){for(var pe=z,Ee=ee,Pe=ae,Ie=re,ke=le,Ae=0;Ae<80;Ae++){Ae<16?fe[Ae]=me[ue+Ae]:fe[Ae]=we(fe[Ae-3]^fe[Ae-8]^fe[Ae-14]^fe[Ae-16],1);var Oe=ye(ye(we(z,5),be(Ae,ee,ae,re)),ye(ye(le,fe[Ae]),Ce(Ae)));le=re,re=ae,ae=we(ee,30),ee=z,z=Oe}z=ye(z,pe),ee=ye(ee,Ee),ae=ye(ae,Pe),re=ye(re,Ie),le=ye(le,ke)}return Array(z,ee,ae,re,le)}function be(me,xe,fe,z){return me<20?xe&fe|~xe&z:me<40?xe^fe^z:me<60?xe&fe|xe&z|fe&z:xe^fe^z}function Ce(me){return me<20?1518500249:me<40?1859775393:me<60?-1894007588:-899497514}function ye(me,xe){var fe=(me&65535)+(xe&65535),z=(me>>16)+(xe>>16)+(fe>>16);return z<<16|fe&65535}function we(me,xe){return me<<xe|me>>>32-xe}Re.exports=function(xe){return ve.hash(xe,ce,20,!0)}},{"./helpers":462}],465:[function(ie,Re,je){"use strict";Re.exports=function(){return function(){}}},{}],466:[function(ie,Re,je){(function(ve){(function(){"use strict";var ce=ie("@babel/runtime/helpers/interopRequireDefault"),be=ce(ie("@babel/runtime/helpers/typeof")),Ce=ie("stream"),ye=Ce.Stream,we=ie("../lib/common/utils/isArray"),me=we.isArray;Re.exports.string=function(z){return typeof z=="string"},Re.exports.array=me,Re.exports.buffer=ve.isBuffer;function xe(fe){return fe instanceof ye}Re.exports.writableStream=function(z){return xe(z)&&typeof z._write=="function"&&(0,be.default)(z._writableState)==="object"}}).call(this)}).call(this,{isBuffer:ie("../node_modules/is-buffer/index.js")})},{"../lib/common/utils/isArray":63,"../node_modules/is-buffer/index.js":366,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,stream:398}],467:[function(ie,Re,je){"use strict";var ve=ie("immediate"),ce=Re.exports={};ce.nextTick=ve,ce.title="browser",ce.browser=!0,ce.env={},ce.argv=[],ce.version="",ce.versions={};function be(){}ce.on=be,ce.addListener=be,ce.once=be,ce.off=be,ce.removeListener=be,ce.removeAllListeners=be,ce.emit=be,ce.prependListener=be,ce.prependOnceListener=be,ce.listeners=function(Ce){return[]},ce.binding=function(Ce){throw new Error("process.binding is not supported")},ce.cwd=function(){return"/"},ce.chdir=function(Ce){throw new Error("process.chdir is not supported")},ce.umask=function(){return 0}},{immediate:358}],468:[function(ie,Re,je){(function(ve){(function(){"use strict";ie("core-js/modules/es.regexp.exec.js"),ie("core-js/modules/es.string.search.js");var ce=ie("./lib/request"),be=ie("./lib/response"),Ce=ie("xtend"),ye=ie("builtin-status-codes"),we=ie("url"),me=je;me.request=function(xe,fe){typeof xe=="string"?xe=we.parse(xe):xe=Ce(xe);var z=ve.location.protocol.search(/^https?:$/)===-1?"http:":"",ee=xe.protocol||z,ae=xe.hostname||xe.host,re=xe.port,le=xe.path||"/";ae&&ae.indexOf(":")!==-1&&(ae="["+ae+"]"),xe.url=(ae?ee+"//"+ae:"")+(re?":"+re:"")+le,xe.method=(xe.method||"GET").toUpperCase(),xe.headers=xe.headers||{};var ue=new ce(xe);return fe&&ue.on("response",fe),ue},me.get=function(fe,z){var ee=me.request(fe,z);return ee.end(),ee},me.ClientRequest=ce,me.IncomingMessage=be.IncomingMessage,me.Agent=function(){},me.Agent.defaultMaxSockets=4,me.globalAgent=new me.Agent,me.STATUS_CODES=ye,me.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)}).call(this,typeof ln!="undefined"?ln:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":470,"./lib/response":471,"builtin-status-codes":91,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.search.js":306,url:472,xtend:460}],469:[function(ie,Re,je){(function(ve){(function(){"use strict";ie("core-js/modules/es.object.to-string.js"),ie("core-js/modules/es.promise.js"),ie("core-js/modules/es.array-buffer.constructor.js"),ie("core-js/modules/es.array-buffer.slice.js"),ie("core-js/modules/es.array.slice.js"),je.fetch=me(ve.fetch)&&me(ve.ReadableStream),je.writableStream=me(ve.WritableStream),je.abortController=me(ve.AbortController),je.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),je.blobConstructor=!0}catch(xe){}var ce;function be(){if(ce!==void 0)return ce;if(ve.XMLHttpRequest){ce=new ve.XMLHttpRequest;try{ce.open("GET",ve.XDomainRequest?"/":"https://example.com")}catch(xe){ce=null}}else ce=null;return ce}function Ce(xe){var fe=be();if(!fe)return!1;try{return fe.responseType=xe,fe.responseType===xe}catch(z){}return!1}var ye=typeof ve.ArrayBuffer!="undefined",we=ye&&me(ve.ArrayBuffer.prototype.slice);je.arraybuffer=je.fetch||ye&&Ce("arraybuffer"),je.msstream=!je.fetch&&we&&Ce("ms-stream"),je.mozchunkedarraybuffer=!je.fetch&&ye&&Ce("moz-chunked-arraybuffer"),je.overrideMimeType=je.fetch||(be()?me(be().overrideMimeType):!1),je.vbArray=me(ve.VBArray);function me(xe){return typeof xe=="function"}ce=null}).call(this)}).call(this,typeof ln!="undefined"?ln:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"core-js/modules/es.array-buffer.constructor.js":270,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295}],470:[function(ie,Re,je){(function(ve,ce,be){(function(){"use strict";ie("core-js/modules/es.object.to-string.js"),ie("core-js/modules/es.regexp.to-string.js"),ie("core-js/modules/web.dom-collections.for-each.js"),ie("core-js/modules/es.object.keys.js"),ie("core-js/modules/es.array.concat.js"),ie("core-js/modules/es.array.map.js"),ie("core-js/modules/es.function.name.js"),ie("core-js/modules/es.promise.js"),ie("core-js/modules/es.regexp.exec.js"),ie("core-js/modules/es.string.split.js");var Ce=ie("./capability"),ye=ie("inherits"),we=ie("./response"),me=ie("readable-stream"),xe=ie("to-arraybuffer"),fe=we.IncomingMessage,z=we.readyStates;function ee(ue,pe){return Ce.fetch&&pe?"fetch":Ce.mozchunkedarraybuffer?"moz-chunked-arraybuffer":Ce.msstream?"ms-stream":Ce.arraybuffer&&ue?"arraybuffer":Ce.vbArray&&ue?"text:vbarray":"text"}var ae=Re.exports=function(ue){var pe=this;me.Writable.call(pe),pe._opts=ue,pe._body=[],pe._headers={},ue.auth&&pe.setHeader("Authorization","Basic "+new be(ue.auth).toString("base64")),Object.keys(ue.headers).forEach(function(Ie){pe.setHeader(Ie,ue.headers[Ie])});var Ee,Pe=!0;if(ue.mode==="disable-fetch"||"requestTimeout"in ue&&!Ce.abortController)Pe=!1,Ee=!0;else if(ue.mode==="prefer-streaming")Ee=!1;else if(ue.mode==="allow-wrong-content-type")Ee=!Ce.overrideMimeType;else if(!ue.mode||ue.mode==="default"||ue.mode==="prefer-fast")Ee=!0;else throw new Error("Invalid value for opts.mode");pe._mode=ee(Ee,Pe),pe._fetchTimer=null,pe.on("finish",function(){pe._onFinish()})};ye(ae,me.Writable),ae.prototype.setHeader=function(ue,pe){var Ee=this,Pe=ue.toLowerCase();le.indexOf(Pe)===-1&&(Ee._headers[Pe]={name:ue,value:pe})},ae.prototype.getHeader=function(ue){var pe=this._headers[ue.toLowerCase()];return pe?pe.value:null},ae.prototype.removeHeader=function(ue){var pe=this;delete pe._headers[ue.toLowerCase()]},ae.prototype._onFinish=function(){var ue=this;if(!ue._destroyed){var pe=ue._opts,Ee=ue._headers,Pe=null;pe.method!=="GET"&&pe.method!=="HEAD"&&(Ce.arraybuffer?Pe=xe(be.concat(ue._body)):Ce.blobConstructor?Pe=new ce.Blob(ue._body.map(function(_e){return xe(_e)}),{type:(Ee["content-type"]||{}).value||""}):Pe=be.concat(ue._body).toString());var Ie=[];if(Object.keys(Ee).forEach(function(_e){var Ye=Ee[_e].name,ze=Ee[_e].value;Array.isArray(ze)?ze.forEach(function(Xe){Ie.push([Ye,Xe])}):Ie.push([Ye,ze])}),ue._mode==="fetch"){var ke=null,Ae=null;if(Ce.abortController){var Oe=new AbortController;ke=Oe.signal,ue._fetchAbortController=Oe,"requestTimeout"in pe&&pe.requestTimeout!==0&&(ue._fetchTimer=ce.setTimeout(function(){ue.emit("requestTimeout"),ue._fetchAbortController&&ue._fetchAbortController.abort()},pe.requestTimeout))}ce.fetch(ue._opts.url,{method:ue._opts.method,headers:Ie,body:Pe||void 0,mode:"cors",credentials:pe.withCredentials?"include":"same-origin",signal:ke}).then(function(_e){ue._fetchResponse=_e,ue._connect()},function(_e){ce.clearTimeout(ue._fetchTimer),ue._destroyed||ue.emit("error",_e)})}else{var Fe=ue._xhr=new ce.XMLHttpRequest;try{Fe.open(ue._opts.method,ue._opts.url,!0)}catch(_e){ve.nextTick(function(){ue.emit("error",_e)});return}"responseType"in Fe&&(Fe.responseType=ue._mode.split(":")[0]),"withCredentials"in Fe&&(Fe.withCredentials=!!pe.withCredentials),ue._mode==="text"&&"overrideMimeType"in Fe&&Fe.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in pe&&(Fe.timeout=pe.requestTimeout,Fe.ontimeout=function(){ue.emit("requestTimeout")}),Ie.forEach(function(_e){Fe.setRequestHeader(_e[0],_e[1])}),ue._response=null,Fe.onreadystatechange=function(){switch(Fe.readyState){case z.LOADING:case z.DONE:ue._onXHRProgress();break}},ue._mode==="moz-chunked-arraybuffer"&&(Fe.onprogress=function(){ue._onXHRProgress()}),Fe.onerror=function(){ue._destroyed||ue.emit("error",new Error("XHR error"))};try{Fe.send(Pe)}catch(_e){ve.nextTick(function(){ue.emit("error",_e)});return}}}};function re(ue){try{var pe=ue.status;return pe!==null&&pe!==0}catch(Ee){return!1}}ae.prototype._onXHRProgress=function(){var ue=this;!re(ue._xhr)||ue._destroyed||(ue._response||ue._connect(),ue._response._onXHRProgress())},ae.prototype._connect=function(){var ue=this;ue._destroyed||(ue._response=new fe(ue._xhr,ue._fetchResponse,ue._mode,ue._fetchTimer),ue._response.on("error",function(pe){ue.emit("error",pe)}),ue.emit("response",ue._response))},ae.prototype._write=function(ue,pe,Ee){var Pe=this;Pe._body.push(ue),Ee()},ae.prototype.abort=ae.prototype.destroy=function(){var ue=this;ue._destroyed=!0,ce.clearTimeout(ue._fetchTimer),ue._response&&(ue._response._destroyed=!0),ue._xhr?ue._xhr.abort():ue._fetchAbortController&&ue._fetchAbortController.abort()},ae.prototype.end=function(ue,pe,Ee){var Pe=this;typeof ue=="function"&&(Ee=ue,ue=void 0),me.Writable.prototype.end.call(Pe,ue,pe,Ee)},ae.prototype.flushHeaders=function(){},ae.prototype.setTimeout=function(){},ae.prototype.setNoDelay=function(){},ae.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)}).call(this,ie("_process"),typeof ln!="undefined"?ln:typeof self!="undefined"?self:typeof window!="undefined"?window:{},ie("buffer").Buffer)},{"./capability":469,"./response":471,_process:467,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.split.js":307,"core-js/modules/web.dom-collections.for-each.js":339,inherits:364,"readable-stream":394,"to-arraybuffer":415}],471:[function(ie,Re,je){(function(ve,ce,be){(function(){"use strict";ie("core-js/modules/es.object.to-string.js"),ie("core-js/modules/web.dom-collections.for-each.js"),ie("core-js/modules/es.promise.js"),ie("core-js/modules/es.regexp.exec.js"),ie("core-js/modules/es.string.split.js"),ie("core-js/modules/es.string.match.js"),ie("core-js/modules/es.array.iterator.js"),ie("core-js/modules/es.array-buffer.slice.js"),ie("core-js/modules/es.typed-array.uint8-array.js"),ie("core-js/modules/es.typed-array.copy-within.js"),ie("core-js/modules/es.typed-array.every.js"),ie("core-js/modules/es.typed-array.fill.js"),ie("core-js/modules/es.typed-array.filter.js"),ie("core-js/modules/es.typed-array.find.js"),ie("core-js/modules/es.typed-array.find-index.js"),ie("core-js/modules/es.typed-array.for-each.js"),ie("core-js/modules/es.typed-array.includes.js"),ie("core-js/modules/es.typed-array.index-of.js"),ie("core-js/modules/es.typed-array.iterator.js"),ie("core-js/modules/es.typed-array.join.js"),ie("core-js/modules/es.typed-array.last-index-of.js"),ie("core-js/modules/es.typed-array.map.js"),ie("core-js/modules/es.typed-array.reduce.js"),ie("core-js/modules/es.typed-array.reduce-right.js"),ie("core-js/modules/es.typed-array.reverse.js"),ie("core-js/modules/es.typed-array.set.js"),ie("core-js/modules/es.typed-array.slice.js"),ie("core-js/modules/es.typed-array.some.js"),ie("core-js/modules/es.typed-array.sort.js"),ie("core-js/modules/es.typed-array.subarray.js"),ie("core-js/modules/es.typed-array.to-locale-string.js"),ie("core-js/modules/es.typed-array.to-string.js"),ie("core-js/modules/es.array.slice.js");var Ce=ie("./capability"),ye=ie("inherits"),we=ie("readable-stream"),me=je.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},xe=je.IncomingMessage=function(fe,z,ee,ae){var re=this;if(we.Readable.call(re),re._mode=ee,re.headers={},re.rawHeaders=[],re.trailers={},re.rawTrailers=[],re.on("end",function(){ve.nextTick(function(){re.emit("close")})}),ee==="fetch"){var le=function ke(){pe.read().then(function(Ae){if(!re._destroyed){if(Ae.done){ce.clearTimeout(ae),re.push(null);return}re.push(new be(Ae.value)),ke()}}).catch(function(Ae){ce.clearTimeout(ae),re._destroyed||re.emit("error",Ae)})};if(re._fetchResponse=z,re.url=z.url,re.statusCode=z.status,re.statusMessage=z.statusText,z.headers.forEach(function(ke,Ae){re.headers[Ae.toLowerCase()]=ke,re.rawHeaders.push(Ae,ke)}),Ce.writableStream){var ue=new WritableStream({write:function(Ae){return new Promise(function(Oe,Fe){re._destroyed?Fe():re.push(new be(Ae))?Oe():re._resumeFetch=Oe})},close:function(){ce.clearTimeout(ae),re._destroyed||re.push(null)},abort:function(Ae){re._destroyed||re.emit("error",Ae)}});try{z.body.pipeTo(ue).catch(function(ke){ce.clearTimeout(ae),re._destroyed||re.emit("error",ke)});return}catch(ke){}}var pe=z.body.getReader();le()}else{re._xhr=fe,re._pos=0,re.url=fe.responseURL,re.statusCode=fe.status,re.statusMessage=fe.statusText;var Ee=fe.getAllResponseHeaders().split(/\r?\n/);if(Ee.forEach(function(ke){var Ae=ke.match(/^([^:]+):\s*(.*)/);if(Ae){var Oe=Ae[1].toLowerCase();Oe==="set-cookie"?(re.headers[Oe]===void 0&&(re.headers[Oe]=[]),re.headers[Oe].push(Ae[2])):re.headers[Oe]!==void 0?re.headers[Oe]+=", "+Ae[2]:re.headers[Oe]=Ae[2],re.rawHeaders.push(Ae[1],Ae[2])}}),re._charset="x-user-defined",!Ce.overrideMimeType){var Pe=re.rawHeaders["mime-type"];if(Pe){var Ie=Pe.match(/;\s*charset=([^;])(;|$)/);Ie&&(re._charset=Ie[1].toLowerCase())}re._charset||(re._charset="utf-8")}}};ye(xe,we.Readable),xe.prototype._read=function(){var fe=this,z=fe._resumeFetch;z&&(fe._resumeFetch=null,z())},xe.prototype._onXHRProgress=function(){var fe=this,z=fe._xhr,ee=null;switch(fe._mode){case"text:vbarray":if(z.readyState!==me.DONE)break;try{ee=new ce.VBArray(z.responseBody).toArray()}catch(pe){}if(ee!==null){fe.push(new be(ee));break}case"text":try{ee=z.responseText}catch(pe){fe._mode="text:vbarray";break}if(ee.length>fe._pos){var ae=ee.substr(fe._pos);if(fe._charset==="x-user-defined"){for(var re=new be(ae.length),le=0;le<ae.length;le++)re[le]=ae.charCodeAt(le)&255;fe.push(re)}else fe.push(ae,fe._charset);fe._pos=ee.length}break;case"arraybuffer":if(z.readyState!==me.DONE||!z.response)break;ee=z.response,fe.push(new be(new Uint8Array(ee)));break;case"moz-chunked-arraybuffer":if(ee=z.response,z.readyState!==me.LOADING||!ee)break;fe.push(new be(new Uint8Array(ee)));break;case"ms-stream":if(ee=z.response,z.readyState!==me.LOADING)break;var ue=new ce.MSStreamReader;ue.onprogress=function(){ue.result.byteLength>fe._pos&&(fe.push(new be(new Uint8Array(ue.result.slice(fe._pos)))),fe._pos=ue.result.byteLength)},ue.onload=function(){fe.push(null)},ue.readAsArrayBuffer(ee);break}fe._xhr.readyState===me.DONE&&fe._mode!=="ms-stream"&&fe.push(null)}}).call(this)}).call(this,ie("_process"),typeof ln!="undefined"?ln:typeof self!="undefined"?self:typeof window!="undefined"?window:{},ie("buffer").Buffer)},{"./capability":469,_process:467,buffer:90,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.match.js":304,"core-js/modules/es.string.split.js":307,"core-js/modules/es.typed-array.copy-within.js":315,"core-js/modules/es.typed-array.every.js":316,"core-js/modules/es.typed-array.fill.js":317,"core-js/modules/es.typed-array.filter.js":318,"core-js/modules/es.typed-array.find-index.js":319,"core-js/modules/es.typed-array.find.js":320,"core-js/modules/es.typed-array.for-each.js":321,"core-js/modules/es.typed-array.includes.js":322,"core-js/modules/es.typed-array.index-of.js":323,"core-js/modules/es.typed-array.iterator.js":324,"core-js/modules/es.typed-array.join.js":325,"core-js/modules/es.typed-array.last-index-of.js":326,"core-js/modules/es.typed-array.map.js":327,"core-js/modules/es.typed-array.reduce-right.js":328,"core-js/modules/es.typed-array.reduce.js":329,"core-js/modules/es.typed-array.reverse.js":330,"core-js/modules/es.typed-array.set.js":331,"core-js/modules/es.typed-array.slice.js":332,"core-js/modules/es.typed-array.some.js":333,"core-js/modules/es.typed-array.sort.js":334,"core-js/modules/es.typed-array.subarray.js":335,"core-js/modules/es.typed-array.to-locale-string.js":336,"core-js/modules/es.typed-array.to-string.js":337,"core-js/modules/es.typed-array.uint8-array.js":338,"core-js/modules/web.dom-collections.for-each.js":339,inherits:364,"readable-stream":394}],472:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/helpers/typeof"));ie("core-js/modules/es.regexp.exec.js"),ie("core-js/modules/es.string.search.js"),ie("core-js/modules/es.array.concat.js"),ie("core-js/modules/es.string.split.js"),ie("core-js/modules/es.string.replace.js"),ie("core-js/modules/es.array.join.js"),ie("core-js/modules/es.string.trim.js"),ie("core-js/modules/es.string.match.js"),ie("core-js/modules/es.array.slice.js"),ie("core-js/modules/es.object.keys.js"),ie("core-js/modules/es.array.splice.js");var be=ie("punycode"),Ce=ie("./util");je.parse=Ae,je.resolve=Fe,je.resolveObject=_e,je.format=Oe,je.Url=ye;function ye(){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}var we=/^([a-z0-9.+-]+:)/i,me=/:[0-9]*$/,xe=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,fe=["<",">",'"',"`"," ","\r",`
`," "],z=["{","}","|","\\","^","`"].concat(fe),ee=["'"].concat(z),ae=["%","/","?",";","#"].concat(ee),re=["/","?","#"],le=255,ue=/^[+a-z0-9A-Z_-]{0,63}$/,pe=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Ee={javascript:!0,"javascript:":!0},Pe={javascript:!0,"javascript:":!0},Ie={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},ke=ie("querystring");function Ae(Ye,ze,Xe){if(Ye&&Ce.isObject(Ye)&&Ye instanceof ye)return Ye;var st=new ye;return st.parse(Ye,ze,Xe),st}ye.prototype.parse=function(Ye,ze,Xe){if(!Ce.isString(Ye))throw new TypeError("Parameter 'url' must be a string, not "+(0,ce.default)(Ye));var st=Ye.indexOf("?"),ht=st!==-1&&st<Ye.indexOf("#")?"?":"#",ft=Ye.split(ht),Lt=/\\/g;ft[0]=ft[0].replace(Lt,"/"),Ye=ft.join(ht);var et=Ye;if(et=et.trim(),!Xe&&Ye.split("#").length===1){var it=xe.exec(et);if(it)return this.path=et,this.href=et,this.pathname=it[1],it[2]?(this.search=it[2],ze?this.query=ke.parse(this.search.substr(1)):this.query=this.search.substr(1)):ze&&(this.search="",this.query={}),this}var xt=we.exec(et);if(xt){xt=xt[0];var Et=xt.toLowerCase();this.protocol=Et,et=et.substr(xt.length)}if(Xe||xt||et.match(/^\/\/[^@\/]+@[^@\/]+/)){var Mt=et.substr(0,2)==="//";Mt&&!(xt&&Pe[xt])&&(et=et.substr(2),this.slashes=!0)}if(!Pe[xt]&&(Mt||xt&&!Ie[xt])){for(var mt=-1,pt=0;pt<re.length;pt++){var vt=et.indexOf(re[pt]);vt!==-1&&(mt===-1||vt<mt)&&(mt=vt)}var jt,At;mt===-1?At=et.lastIndexOf("@"):At=et.lastIndexOf("@",mt),At!==-1&&(jt=et.slice(0,At),et=et.slice(At+1),this.auth=decodeURIComponent(jt)),mt=-1;for(var pt=0;pt<ae.length;pt++){var vt=et.indexOf(ae[pt]);vt!==-1&&(mt===-1||vt<mt)&&(mt=vt)}mt===-1&&(mt=et.length),this.host=et.slice(0,mt),et=et.slice(mt),this.parseHost(),this.hostname=this.hostname||"";var Kt=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Kt)for(var Ct=this.hostname.split("."),pt=0,gt=Ct.length;pt<gt;pt++){var tt=Ct[pt];if(tt&&!tt.match(ue)){for(var bt="",Ke=0,ut=tt.length;Ke<ut;Ke++)tt.charCodeAt(Ke)>127?bt+="x":bt+=tt[Ke];if(!bt.match(ue)){var wt=Ct.slice(0,pt),yt=Ct.slice(pt+1),lt=tt.match(pe);lt&&(wt.push(lt[1]),yt.unshift(lt[2])),yt.length&&(et="/"+yt.join(".")+et),this.hostname=wt.join(".");break}}}this.hostname.length>le?this.hostname="":this.hostname=this.hostname.toLowerCase(),Kt||(this.hostname=be.toASCII(this.hostname));var Qe=this.port?":"+this.port:"",We=this.hostname||"";this.host=We+Qe,this.href+=this.host,Kt&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),et[0]!=="/"&&(et="/"+et))}if(!Ee[Et])for(var pt=0,gt=ee.length;pt<gt;pt++){var Ue=ee[pt];if(et.indexOf(Ue)!==-1){var qe=encodeURIComponent(Ue);qe===Ue&&(qe=escape(Ue)),et=et.split(Ue).join(qe)}}var He=et.indexOf("#");He!==-1&&(this.hash=et.substr(He),et=et.slice(0,He));var De=et.indexOf("?");if(De!==-1?(this.search=et.substr(De),this.query=et.substr(De+1),ze&&(this.query=ke.parse(this.query)),et=et.slice(0,De)):ze&&(this.search="",this.query={}),et&&(this.pathname=et),Ie[Et]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var Qe=this.pathname||"",Le=this.search||"";this.path=Qe+Le}return this.href=this.format(),this};function Oe(Ye){return Ce.isString(Ye)&&(Ye=Ae(Ye)),Ye instanceof ye?Ye.format():ye.prototype.format.call(Ye)}ye.prototype.format=function(){var Ye=this.auth||"";Ye&&(Ye=encodeURIComponent(Ye),Ye=Ye.replace(/%3A/i,":"),Ye+="@");var ze=this.protocol||"",Xe=this.pathname||"",st=this.hash||"",ht=!1,ft="";this.host?ht=Ye+this.host:this.hostname&&(ht=Ye+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(ht+=":"+this.port)),this.query&&Ce.isObject(this.query)&&Object.keys(this.query).length&&(ft=ke.stringify(this.query));var Lt=this.search||ft&&"?"+ft||"";return ze&&ze.substr(-1)!==":"&&(ze+=":"),this.slashes||(!ze||Ie[ze])&&ht!==!1?(ht="//"+(ht||""),Xe&&Xe.charAt(0)!=="/"&&(Xe="/"+Xe)):ht||(ht=""),st&&st.charAt(0)!=="#"&&(st="#"+st),Lt&&Lt.charAt(0)!=="?"&&(Lt="?"+Lt),Xe=Xe.replace(/[?#]/g,function(et){return encodeURIComponent(et)}),Lt=Lt.replace("#","%23"),ze+ht+Xe+Lt+st};function Fe(Ye,ze){return Ae(Ye,!1,!0).resolve(ze)}ye.prototype.resolve=function(Ye){return this.resolveObject(Ae(Ye,!1,!0)).format()};function _e(Ye,ze){return Ye?Ae(Ye,!1,!0).resolveObject(ze):ze}ye.prototype.resolveObject=function(Ye){if(Ce.isString(Ye)){var ze=new ye;ze.parse(Ye,!1,!0),Ye=ze}for(var Xe=new ye,st=Object.keys(this),ht=0;ht<st.length;ht++){var ft=st[ht];Xe[ft]=this[ft]}if(Xe.hash=Ye.hash,Ye.href==="")return Xe.href=Xe.format(),Xe;if(Ye.slashes&&!Ye.protocol){for(var Lt=Object.keys(Ye),et=0;et<Lt.length;et++){var it=Lt[et];it!=="protocol"&&(Xe[it]=Ye[it])}return Ie[Xe.protocol]&&Xe.hostname&&!Xe.pathname&&(Xe.path=Xe.pathname="/"),Xe.href=Xe.format(),Xe}if(Ye.protocol&&Ye.protocol!==Xe.protocol){if(!Ie[Ye.protocol]){for(var xt=Object.keys(Ye),Et=0;Et<xt.length;Et++){var Mt=xt[Et];Xe[Mt]=Ye[Mt]}return Xe.href=Xe.format(),Xe}if(Xe.protocol=Ye.protocol,!Ye.host&&!Pe[Ye.protocol]){for(var gt=(Ye.pathname||"").split("/");gt.length&&!(Ye.host=gt.shift()););Ye.host||(Ye.host=""),Ye.hostname||(Ye.hostname=""),gt[0]!==""&&gt.unshift(""),gt.length<2&&gt.unshift(""),Xe.pathname=gt.join("/")}else Xe.pathname=Ye.pathname;if(Xe.search=Ye.search,Xe.query=Ye.query,Xe.host=Ye.host||"",Xe.auth=Ye.auth,Xe.hostname=Ye.hostname||Ye.host,Xe.port=Ye.port,Xe.pathname||Xe.search){var mt=Xe.pathname||"",pt=Xe.search||"";Xe.path=mt+pt}return Xe.slashes=Xe.slashes||Ye.slashes,Xe.href=Xe.format(),Xe}var vt=Xe.pathname&&Xe.pathname.charAt(0)==="/",jt=Ye.host||Ye.pathname&&Ye.pathname.charAt(0)==="/",At=jt||vt||Xe.host&&Ye.pathname,Kt=At,Ct=Xe.pathname&&Xe.pathname.split("/")||[],gt=Ye.pathname&&Ye.pathname.split("/")||[],tt=Xe.protocol&&!Ie[Xe.protocol];if(tt&&(Xe.hostname="",Xe.port=null,Xe.host&&(Ct[0]===""?Ct[0]=Xe.host:Ct.unshift(Xe.host)),Xe.host="",Ye.protocol&&(Ye.hostname=null,Ye.port=null,Ye.host&&(gt[0]===""?gt[0]=Ye.host:gt.unshift(Ye.host)),Ye.host=null),At=At&&(gt[0]===""||Ct[0]==="")),jt)Xe.host=Ye.host||Ye.host===""?Ye.host:Xe.host,Xe.hostname=Ye.hostname||Ye.hostname===""?Ye.hostname:Xe.hostname,Xe.search=Ye.search,Xe.query=Ye.query,Ct=gt;else if(gt.length)Ct||(Ct=[]),Ct.pop(),Ct=Ct.concat(gt),Xe.search=Ye.search,Xe.query=Ye.query;else if(!Ce.isNullOrUndefined(Ye.search)){if(tt){Xe.hostname=Xe.host=Ct.shift();var bt=Xe.host&&Xe.host.indexOf("@")>0?Xe.host.split("@"):!1;bt&&(Xe.auth=bt.shift(),Xe.host=Xe.hostname=bt.shift())}return Xe.search=Ye.search,Xe.query=Ye.query,(!Ce.isNull(Xe.pathname)||!Ce.isNull(Xe.search))&&(Xe.path=(Xe.pathname?Xe.pathname:"")+(Xe.search?Xe.search:"")),Xe.href=Xe.format(),Xe}if(!Ct.length)return Xe.pathname=null,Xe.search?Xe.path="/"+Xe.search:Xe.path=null,Xe.href=Xe.format(),Xe;for(var Ke=Ct.slice(-1)[0],ut=(Xe.host||Ye.host||Ct.length>1)&&(Ke==="."||Ke==="..")||Ke==="",wt=0,yt=Ct.length;yt>=0;yt--)Ke=Ct[yt],Ke==="."?Ct.splice(yt,1):Ke===".."?(Ct.splice(yt,1),wt++):wt&&(Ct.splice(yt,1),wt--);if(!At&&!Kt)for(;wt--;wt)Ct.unshift("..");At&&Ct[0]!==""&&(!Ct[0]||Ct[0].charAt(0)!=="/")&&Ct.unshift(""),ut&&Ct.join("/").substr(-1)!=="/"&&Ct.push("");var lt=Ct[0]===""||Ct[0]&&Ct[0].charAt(0)==="/";if(tt){Xe.hostname=Xe.host=lt?"":Ct.length?Ct.shift():"";var bt=Xe.host&&Xe.host.indexOf("@")>0?Xe.host.split("@"):!1;bt&&(Xe.auth=bt.shift(),Xe.host=Xe.hostname=bt.shift())}return At=At||Xe.host&&Ct.length,At&&!lt&&Ct.unshift(""),Ct.length?Xe.pathname=Ct.join("/"):(Xe.pathname=null,Xe.path=null),(!Ce.isNull(Xe.pathname)||!Ce.isNull(Xe.search))&&(Xe.path=(Xe.pathname?Xe.pathname:"")+(Xe.search?Xe.search:"")),Xe.auth=Ye.auth||Xe.auth,Xe.slashes=Xe.slashes||Ye.slashes,Xe.href=Xe.format(),Xe},ye.prototype.parseHost=function(){var Ye=this.host,ze=me.exec(Ye);ze&&(ze=ze[0],ze!==":"&&(this.port=ze.substr(1)),Ye=Ye.substr(0,Ye.length-ze.length)),Ye&&(this.hostname=Ye)}},{"./util":473,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.array.splice.js":283,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.match.js":304,"core-js/modules/es.string.replace.js":305,"core-js/modules/es.string.search.js":306,"core-js/modules/es.string.split.js":307,"core-js/modules/es.string.trim.js":308,punycode:382,querystring:385}],473:[function(ie,Re,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/helpers/typeof"));Re.exports={isString:function(Ce){return typeof Ce=="string"},isObject:function(Ce){return(0,ce.default)(Ce)==="object"&&Ce!==null},isNull:function(Ce){return Ce===null},isNullOrUndefined:function(Ce){return Ce==null}}},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79}],474:[function(ie,Re,je){"use strict";ie("core-js/modules/es.number.constructor.js"),je.encodeURIComponent=function(ve){try{return encodeURIComponent(ve)}catch(ce){return ve}},je.escape=ie("escape-html"),je.timestamp=function(ce){if(ce){var be=ce;return typeof be=="string"&&(be=Number(be)),String(ce).length===10&&(be*=1e3),new Date(be)}return Math.round(Date.now()/1e3)}},{"core-js/modules/es.number.constructor.js":286,"escape-html":343}],475:[function(ie,Re,je){(function(ve,ce){(function(){"use strict";var be=ie("@babel/runtime/helpers/interopRequireDefault"),Ce=be(ie("@babel/runtime/helpers/typeof"));ie("core-js/modules/es.string.trim.js"),ie("core-js/modules/es.regexp.exec.js"),ie("core-js/modules/es.string.split.js"),ie("core-js/modules/es.object.to-string.js"),ie("core-js/modules/es.promise.js"),ie("core-js/modules/es.function.name.js"),ie("core-js/modules/es.array.concat.js");var ye=ie("util"),we=ie("url"),me=ie("http"),xe=ie("https"),fe=ie("debug")("urllib"),z=ie("humanize-ms"),ee=0,ae=Math.pow(2,31)-10,re=/^https?:\/\//i;function le(Pe,Ie){return Pe===void 0?Ie:Pe}function ue(Pe){return Pe?Pe.split(";")[0].trim().toLowerCase():""}function pe(Pe,Ie){return function(ke,Ae,Oe){if(ke)return Ie(ke);Pe({data:Ae,status:Oe.statusCode,headers:Oe.headers,res:Oe})}}je.TIMEOUTS=[z("300s"),z("300s")];var Ee=["json","text"];je.request=function(Ie,ke,Ae){return arguments.length===2&&typeof ke=="function"&&(Ae=ke,ke=null),typeof Ae=="function"?je.requestWithCallback(Ie,ke,Ae):new Promise(function(Oe,Fe){je.requestWithCallback(Ie,ke,pe(Oe,Fe))})},je.requestWithCallback=function(Ie,ke,Ae){if(!Ie||typeof Ie!="string"&&(0,Ce.default)(Ie)!=="object"){var Oe=ye.format("expect request url to be a string or a http request options, but got %j",Ie);throw new Error(Oe)}arguments.length===2&&typeof ke=="function"&&(Ae=ke,ke=null),ke=ke||{},ee>=ae&&(ee=0);var Fe=++ee;ke.requestUrls=ke.requestUrls||[];var _e={requestId:Fe,url:Ie,args:ke,ctx:ke.ctx};ke.emitter&&ke.emitter.emit("request",_e),ke.timeout=ke.timeout||je.TIMEOUTS,ke.maxRedirects=ke.maxRedirects||10,ke.streaming=ke.streaming||ke.customResponse;var Ye=Date.now(),ze;typeof Ie=="string"?(re.test(Ie)||(Ie="https://"+Ie),ze=we.parse(Ie)):ze=Ie;var Xe=(ke.type||ke.method||ze.method||"GET").toUpperCase(),st=ze.port||80,ht=me,ft=le(ke.agent,je.agent),Lt=ke.fixJSONCtlChars;ze.protocol==="https:"&&(ht=xe,ft=le(ke.httpsAgent,je.httpsAgent),ze.port||(st=443));var et={host:ze.hostname||ze.host||"localhost",path:ze.path||"/",method:Xe,port:st,agent:ft,headers:ke.headers||{},lookup:ke.lookup};Array.isArray(ke.timeout)?et.requestTimeout=ke.timeout[ke.timeout.length-1]:typeof ke.timeout!="undefined"&&(et.requestTimeout=ke.timeout);var it=ke.auth||ze.auth;it&&(et.auth=it);var xt=ke.content||ke.data,Et=Xe==="GET"||Xe==="HEAD"||ke.dataAsQueryString;if(!ke.content&&xt&&!(typeof xt=="string"||ce.isBuffer(xt)))if(Et)xt=ke.nestedQuerystring?qs.stringify(xt):querystring.stringify(xt);else{var Mt=et.headers["Content-Type"]||et.headers["content-type"];Mt||(ke.contentType==="json"?Mt="application/json":Mt="application/x-www-form-urlencoded",et.headers["Content-Type"]=Mt),ue(Mt)==="application/json"?xt=JSON.stringify(xt):xt=ke.nestedQuerystring?qs.stringify(xt):querystring.stringify(xt)}Et&&xt&&(et.path+=(ze.query?"&":"?")+xt,xt=null);var mt=0;if(xt){var pt=xt.length;ce.isBuffer(xt)||(pt=ce.byteLength(xt)),mt=et.headers["Content-Length"]=pt}ke.dataType==="json"&&(et.headers.Accept="application/json"),typeof ke.beforeRequest=="function"&&ke.beforeRequest(et);var vt=null,jt=null,At=null,Kt=!1,Ct=!1,gt=0,tt=-1,bt=!1,Ke="",ut="",wt=null;ke.timing&&(wt={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function yt(){vt&&(clearTimeout(vt),vt=null)}function lt(){jt&&(clearTimeout(jt),jt=null)}function Qe(_t,Qt,kt){if(lt(),!Ae){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),Fe,ve.pid,et.method,Ie),_t&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
stack: %s`,Date(),Fe,ve.pid,_t.name,_t.message,_t.stack);return}var Nt=Ae;Ae=null;var Zt={};kt&&(tt=kt.statusCode,Zt=kt.headers);var on=Date.now()-Ye;wt&&(wt.contentDownload=on),fe("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",on,gt,tt,et.method,et.host,et.path,Ct,wt);var vn={status:tt,statusCode:tt,headers:Zt,size:gt,aborted:bt,rt:on,keepAliveSocket:Ct,data:Qt,requestUrls:ke.requestUrls,timing:wt,remoteAddress:Ke,remotePort:ut};if(_t){var kn="";ft&&typeof ft.getCurrentStatus=="function"&&(kn=", agent status: "+JSON.stringify(ft.getCurrentStatus())),_t.message+=", "+et.method+" "+Ie+" "+tt+" (connected: "+Kt+", keepalive socket: "+Ct+kn+`)
headers: `+JSON.stringify(Zt),_t.data=Qt,_t.path=et.path,_t.status=tt,_t.headers=Zt,_t.res=vn}Nt(_t,Qt,ke.streaming?kt:vn),ke.emitter&&(_e.url=Ie,_e.socket=Ze&&Ze.connection,_e.options=et,_e.size=mt,ke.emitter.emit("response",{requestId:Fe,error:_t,ctx:ke.ctx,req:_e,res:vn}))}function We(_t){var Qt=null;if(ke.followRedirect&&statuses.redirect[_t.statusCode]){ke._followRedirectCount=(ke._followRedirectCount||0)+1;var kt=_t.headers.location;if(!kt)Qt=new Error("Got statusCode "+_t.statusCode+" but cannot resolve next location from headers"),Qt.name="FollowRedirectError";else if(ke._followRedirectCount>ke.maxRedirects)Qt=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+Ie),Qt.name="MaxRedirectError";else{var Nt=ke.formatRedirectUrl?ke.formatRedirectUrl(Ie,kt):we.resolve(Ie,kt);fe("Request#%d %s: `redirected` from %s to %s",Fe,et.path,Ie,Nt),lt(),ke.headers&&ke.headers.Host&&re.test(kt)&&(ke.headers.Host=null);var Zt=Ae;return Ae=null,je.requestWithCallback(Nt,ke,Zt),{redirect:!0,error:null}}}return{redirect:!1,error:Qt}}ke.gzip&&!et.headers["Accept-Encoding"]&&!et.headers["accept-encoding"]&&(et.headers["Accept-Encoding"]="gzip");function Ue(_t,Qt,kt){var Nt=_t.headers["content-encoding"];return kt(null,Qt,Nt)}var qe=ke.writeStream;fe("Request#%d %s %s with headers %j, options.path: %s",Fe,Xe,Ie,et.headers,et.path),ke.requestUrls.push(Ie);function He(_t){if(wt&&(wt.waiting=Date.now()-Ye),fe("Request#%d %s `req response` event emit: status %d, headers: %j",Fe,Ie,_t.statusCode,_t.headers),ke.streaming){var Qt=We(_t);if(Qt.redirect){_t.resume();return}return Qt.error?(_t.resume(),Qe(Qt.error,null,_t)):Qe(null,null,_t)}if(_t.on("close",function(){fe("Request#%d %s: `res close` event emit, total size %d",Fe,Ie,gt)}),_t.on("error",function(){fe("Request#%d %s: `res error` event emit, total size %d",Fe,Ie,gt)}),_t.on("aborted",function(){bt=!0,fe("Request#%d %s: `res aborted` event emit, total size %d",Fe,Ie,gt)}),qe){var kt=We(_t);if(kt.redirect){_t.resume();return}return kt.error?(_t.resume(),qe.end(),Qe(kt.error,null,_t)):(ke.consumeWriteStream===!1?_t.on("end",Qe.bind(null,null,null,_t)):qe.on("close",function(){fe("Request#%d %s: writeStream close event emitted",Fe,Ie),Qe(At||null,null,_t)}),_t.pipe(qe))}var Nt=[];_t.on("data",function(Zt){fe("Request#%d %s: `res data` event emit, size %d",Fe,Ie,Zt.length),gt+=Zt.length,Nt.push(Zt)}),_t.on("end",function(){var Zt=ce.concat(Nt,gt);if(fe("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",Fe,Ie,gt,_t._dumped),At)return Qe(At,Zt,_t);var on=We(_t);if(on.error)return Qe(on.error,Zt,_t);on.redirect||Ue(_t,Zt,function(vn,kn,Kn){if(vn)return Qe(vn,Zt,_t);if(!Kn&&Ee.indexOf(ke.dataType)>=0){try{kn=decodeBodyByCharset(kn,_t)}catch(pr){return fe("decodeBodyByCharset error: %s",pr),Qe(null,kn,_t)}if(ke.dataType==="json")if(gt===0)kn=null;else{var Xn=parseJSON(kn,Lt);Xn.error?vn=Xn.error:kn=Xn.data}}bt&&fe("Request#%d %s: Remote socket was terminated before `response.end()` was called",Fe,Ie),Qe(vn,kn,_t)})})}var De,Le;Array.isArray(ke.timeout)?(De=z(ke.timeout[0]),Le=z(ke.timeout[1])):De=Le=z(ke.timeout),fe("ConnectTimeout: %d, ResponseTimeout: %d",De,Le);function Ve(){fe("Connect timer ticking, timeout: %d",De),vt=setTimeout(function(){vt=null,tt===-1&&(tt=-2);var _t="Connect timeout for "+De+"ms",Qt="ConnectionTimeoutError";Ze.socket||(Qt="SocketAssignTimeoutError",_t+=", working sockets is full"),At=new Error(_t),At.name=Qt,At.requestId=Fe,fe("ConnectTimeout: Request#%d %s %s: %s, connected: %s",Fe,Ie,At.name,_t,Kt),Tt()},De)}function dt(){fe("Response timer ticking, timeout: %d",Le),jt=setTimeout(function(){jt=null;var _t="Response timeout for "+Le+"ms",Qt="ResponseTimeoutError";At=new Error(_t),At.name=Qt,At.requestId=Fe,fe("ResponseTimeout: Request#%d %s %s: %s, connected: %s",Fe,Ie,At.name,_t,Kt),Tt()},Le)}var Ze;et.mode=ke.mode?ke.mode:"";try{Ze=ht.request(et,He)}catch(_t){return Qe(_t)}typeof window=="undefined"?Ve():Ze.on("requestTimeout",function(){tt===-1&&(tt=-2);var _t="Connect timeout for "+De+"ms",Qt="ConnectionTimeoutError";At=new Error(_t),At.name=Qt,At.requestId=Fe,Tt()});function Tt(){fe("Request#%d %s abort, connected: %s",Fe,Ie,Kt),Ze.socket||(At.noSocket=!0,Qe(At)),Ze.abort()}return wt&&Ze.on("finish",function(){wt.requestSent=Date.now()-Ye}),Ze.once("socket",function(_t){wt&&(wt.queuing=Date.now()-Ye);var Qt=_t.readyState;if(Qt==="opening"){_t.once("lookup",function(kt,Nt,Zt){fe("Request#%d %s lookup: %s, %s, %s",Fe,Ie,kt,Nt,Zt),wt&&(wt.dnslookup=Date.now()-Ye),Nt&&(Ke=Nt)}),_t.once("connect",function(){wt&&(wt.connected=Date.now()-Ye),yt(),dt(),fe("Request#%d %s new socket connected",Fe,Ie),Kt=!0,Ke||(Ke=_t.remoteAddress),ut=_t.remotePort});return}fe("Request#%d %s reuse socket connected, readyState: %s",Fe,Ie,Qt),Kt=!0,Ct=!0,Ke||(Ke=_t.remoteAddress),ut=_t.remotePort,yt(),dt()}),Ze.on("error",function(_t){(_t.name==="Error"||_t.name==="TypeError")&&(_t.name=Kt?"ResponseError":"RequestError"),_t.message+=' (req "error")',fe("Request#%d %s `req error` event emit, %s: %s",Fe,Ie,_t.name,_t.message),Qe(At||_t)}),qe&&qe.once("error",function(_t){_t.message+=' (writeStream "error")',At=_t,fe("Request#%d %s `writeStream error` event emit, %s: %s",Fe,Ie,_t.name,_t.message),Tt()}),ke.stream?(ke.stream.pipe(Ze),ke.stream.once("error",function(_t){_t.message+=' (stream "error")',At=_t,fe("Request#%d %s `readStream error` event emit, %s: %s",Fe,Ie,_t.name,_t.message),Tt()})):Ze.end(xt),Ze.requestId=Fe,Ze}}).call(this)}).call(this,ie("_process"),ie("buffer").Buffer)},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,_process:467,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.split.js":307,"core-js/modules/es.string.trim.js":308,debug:465,http:468,https:355,"humanize-ms":356,url:472,util:419}]},{},[1])(1)})})(window)},50371:function(bn,ln){"use strict";function $e(){const rt=Object.assign({},arguments.length<=0?void 0:arguments[0]);for(let St=1;St<arguments.length;St++){const ie=St<0||arguments.length<=St?void 0:arguments[St];ie&&Object.keys(ie).forEach(Re=>{const je=ie[Re];je!==void 0&&(rt[Re]=je)})}return rt}ln.Z=$e},77578:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return rt}});const rt=St=>St?typeof St=="function"?St():St:null},13845:function(bn,ln,$e){"use strict";$e.d(ln,{F:function(){return rt},Z:function(){return St}});function rt(ie){return ie!=null&&ie===ie.window}function St(ie,Re){var je,ve;if(typeof window=="undefined")return 0;const ce=Re?"scrollTop":"scrollLeft";let be=0;return rt(ie)?be=ie[Re?"pageYOffset":"pageXOffset"]:ie instanceof Document?be=ie.documentElement[ce]:(ie instanceof HTMLElement||ie)&&(be=ie[ce]),ie&&!rt(ie)&&typeof be!="number"&&(be=(ve=((je=ie.ownerDocument)!==null&&je!==void 0?je:ie).documentElement)===null||ve===void 0?void 0:ve[ce]),be}},56762:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return St}});var rt=$e(59301);function St(){const[,ie]=rt.useReducer(Re=>Re+1,0);return ie}},68031:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return Re}});var rt=$e(23073);function St(je,ve,ce,be){const Ce=ce-ve;return je/=be/2,je<1?Ce/2*je*je*je+ve:Ce/2*((je-=2)*je*je+2)+ve}var ie=$e(13845);function Re(je){let ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:ce=()=>window,callback:be,duration:Ce=450}=ve,ye=ce(),we=(0,ie.Z)(ye,!0),me=Date.now(),xe=()=>{const z=Date.now()-me,ee=St(z>Ce?Ce:z,we,je,Ce);(0,ie.F)(ye)?ye.scrollTo(window.pageXOffset,ee):ye instanceof Document||ye.constructor.name==="HTMLDocument"?ye.documentElement.scrollTop=ee:ye.scrollTop=ee,z<Ce?(0,rt.Z)(xe):typeof be=="function"&&be()};(0,rt.Z)(xe)}},24905:function(bn,ln,$e){"use strict";$e.d(ln,{default:function(){return Ie}});var rt=$e(92310),St=$e.n(rt),ie=$e(5630),Re=$e(59301),je=$e(36355),ve=$e(1684),ce=$e(32441),Ce=Re.createContext(null),ye=$e(98447),we=$e(14088),me=$e(4572),xe=function(ke,Ae){var Oe={};for(var Fe in ke)Object.prototype.hasOwnProperty.call(ke,Fe)&&Ae.indexOf(Fe)<0&&(Oe[Fe]=ke[Fe]);if(ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _e=0,Fe=Object.getOwnPropertySymbols(ke);_e<Fe.length;_e++)Ae.indexOf(Fe[_e])<0&&Object.prototype.propertyIsEnumerable.call(ke,Fe[_e])&&(Oe[Fe[_e]]=ke[Fe[_e]]);return Oe};const fe=(ke,Ae)=>{var Oe;const{prefixCls:Fe,className:_e,rootClassName:Ye,children:ze,indeterminate:Xe=!1,style:st,onMouseEnter:ht,onMouseLeave:ft,skipGroup:Lt=!1,disabled:et}=ke,it=xe(ke,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:xt,direction:Et,checkbox:Mt}=Re.useContext(je.E_),mt=Re.useContext(Ce),{isFormItemInput:pt}=Re.useContext(ce.aM),vt=Re.useContext(ve.Z),jt=(Oe=(mt==null?void 0:mt.disabled)||et)!==null&&Oe!==void 0?Oe:vt,At=Re.useRef(it.value);Re.useEffect(()=>{mt==null||mt.registerValue(it.value)},[]),Re.useEffect(()=>{if(!Lt)return it.value!==At.current&&(mt==null||mt.cancelValue(At.current),mt==null||mt.registerValue(it.value),At.current=it.value),()=>mt==null?void 0:mt.cancelValue(it.value)},[it.value]);const Kt=xt("checkbox",Fe),[Ct,gt]=(0,ye.ZP)(Kt),tt=Object.assign({},it);mt&&!Lt&&(tt.onChange=function(){it.onChange&&it.onChange.apply(it,arguments),mt.toggleOption&&mt.toggleOption({label:ze,value:it.value})},tt.name=mt.name,tt.checked=mt.value.includes(it.value));const bt=St()(`${Kt}-wrapper`,{[`${Kt}-rtl`]:Et==="rtl",[`${Kt}-wrapper-checked`]:tt.checked,[`${Kt}-wrapper-disabled`]:jt,[`${Kt}-wrapper-in-form-item`]:pt},Mt==null?void 0:Mt.className,_e,Ye,gt),Ke=St()({[`${Kt}-indeterminate`]:Xe},me.A,gt),ut=Xe?"mixed":void 0;return Ct(Re.createElement(we.Z,{component:"Checkbox",disabled:jt},Re.createElement("label",{className:bt,style:Object.assign(Object.assign({},Mt==null?void 0:Mt.style),st),onMouseEnter:ht,onMouseLeave:ft},Re.createElement(ie.Z,Object.assign({"aria-checked":ut},tt,{prefixCls:Kt,className:Ke,disabled:jt,ref:Ae})),ze!==void 0&&Re.createElement("span",null,ze))))};var ee=Re.forwardRef(fe),ae=$e(26390),re=$e(64002),le=function(ke,Ae){var Oe={};for(var Fe in ke)Object.prototype.hasOwnProperty.call(ke,Fe)&&Ae.indexOf(Fe)<0&&(Oe[Fe]=ke[Fe]);if(ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _e=0,Fe=Object.getOwnPropertySymbols(ke);_e<Fe.length;_e++)Ae.indexOf(Fe[_e])<0&&Object.prototype.propertyIsEnumerable.call(ke,Fe[_e])&&(Oe[Fe[_e]]=ke[Fe[_e]]);return Oe};const ue=(ke,Ae)=>{const{defaultValue:Oe,children:Fe,options:_e=[],prefixCls:Ye,className:ze,rootClassName:Xe,style:st,onChange:ht}=ke,ft=le(ke,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:Lt,direction:et}=Re.useContext(je.E_),[it,xt]=Re.useState(ft.value||Oe||[]),[Et,Mt]=Re.useState([]);Re.useEffect(()=>{"value"in ft&&xt(ft.value||[])},[ft.value]);const mt=Re.useMemo(()=>_e.map(wt=>typeof wt=="string"||typeof wt=="number"?{label:wt,value:wt}:wt),[_e]),pt=wt=>{Mt(yt=>yt.filter(lt=>lt!==wt))},vt=wt=>{Mt(yt=>[].concat((0,ae.Z)(yt),[wt]))},jt=wt=>{const yt=it.indexOf(wt.value),lt=(0,ae.Z)(it);yt===-1?lt.push(wt.value):lt.splice(yt,1),"value"in ft||xt(lt),ht==null||ht(lt.filter(Qe=>Et.includes(Qe)).sort((Qe,We)=>{const Ue=mt.findIndex(He=>He.value===Qe),qe=mt.findIndex(He=>He.value===We);return Ue-qe}))},At=Lt("checkbox",Ye),Kt=`${At}-group`,[Ct,gt]=(0,ye.ZP)(At),tt=(0,re.Z)(ft,["value","disabled"]),bt=_e.length?mt.map(wt=>Re.createElement(ee,{prefixCls:At,key:wt.value.toString(),disabled:"disabled"in wt?wt.disabled:ft.disabled,value:wt.value,checked:it.includes(wt.value),onChange:wt.onChange,className:`${Kt}-item`,style:wt.style,title:wt.title},wt.label)):Fe,Ke={toggleOption:jt,value:it,disabled:ft.disabled,name:ft.name,registerValue:vt,cancelValue:pt},ut=St()(Kt,{[`${Kt}-rtl`]:et==="rtl"},ze,Xe,gt);return Ct(Re.createElement("div",Object.assign({className:ut,style:st},tt,{ref:Ae}),Re.createElement(Ce.Provider,{value:Ke},bt)))},pe=Re.forwardRef(ue);var Ee=Re.memo(pe);const Pe=ee;Pe.Group=Ee,Pe.__ANT_CHECKBOX=!0;var Ie=Pe},98447:function(bn,ln,$e){"use strict";$e.d(ln,{C2:function(){return je}});var rt=$e(17313),St=$e(37613),ie=$e(83116);const Re=ve=>{const{checkboxCls:ce}=ve,be=`${ce}-wrapper`;return[{[`${ce}-group`]:Object.assign(Object.assign({},(0,rt.Wf)(ve)),{display:"inline-flex",flexWrap:"wrap",columnGap:ve.marginXS,[`> ${ve.antCls}-row`]:{flex:1}}),[be]:Object.assign(Object.assign({},(0,rt.Wf)(ve)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${be}`]:{marginInlineStart:0},[`&${be}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[ce]:Object.assign(Object.assign({},(0,rt.Wf)(ve)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:ve.borderRadiusSM,alignSelf:"center",[`${ce}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${ce}-inner`]:Object.assign({},(0,rt.oN)(ve))},[`${ce}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:ve.checkboxSize,height:ve.checkboxSize,direction:"ltr",backgroundColor:ve.colorBgContainer,border:`${ve.lineWidth}px ${ve.lineType} ${ve.colorBorder}`,borderRadius:ve.borderRadiusSM,borderCollapse:"separate",transition:`all ${ve.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:ve.checkboxSize/14*5,height:ve.checkboxSize/14*8,border:`${ve.lineWidthBold}px solid ${ve.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${ve.motionDurationFast} ${ve.motionEaseInBack}, opacity ${ve.motionDurationFast}`}},"& + span":{paddingInlineStart:ve.paddingXS,paddingInlineEnd:ve.paddingXS}})},{[`
${be}:not(${be}-disabled),
${ce}:not(${ce}-disabled)
`]:{[`&:hover ${ce}-inner`]:{borderColor:ve.colorPrimary}},[`${be}:not(${be}-disabled)`]:{[`&:hover ${ce}-checked:not(${ce}-disabled) ${ce}-inner`]:{backgroundColor:ve.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${ce}-checked:not(${ce}-disabled):after`]:{borderColor:ve.colorPrimaryHover}}},{[`${ce}-checked`]:{[`${ce}-inner`]:{backgroundColor:ve.colorPrimary,borderColor:ve.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${ve.motionDurationMid} ${ve.motionEaseOutBack} ${ve.motionDurationFast}`}}},[`
${be}-checked:not(${be}-disabled),
${ce}-checked:not(${ce}-disabled)
`]:{[`&:hover ${ce}-inner`]:{backgroundColor:ve.colorPrimaryHover,borderColor:"transparent"}}},{[ce]:{"&-indeterminate":{[`${ce}-inner`]:{backgroundColor:ve.colorBgContainer,borderColor:ve.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:ve.fontSizeLG/2,height:ve.fontSizeLG/2,backgroundColor:ve.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${be}-disabled`]:{cursor:"not-allowed"},[`${ce}-disabled`]:{[`&, ${ce}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${ce}-inner`]:{background:ve.colorBgContainerDisabled,borderColor:ve.colorBorder,"&:after":{borderColor:ve.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:ve.colorTextDisabled},[`&${ce}-indeterminate ${ce}-inner::after`]:{background:ve.colorTextDisabled}}}]};function je(ve,ce){const be=(0,St.TS)(ce,{checkboxCls:`.${ve}`,checkboxSize:ce.controlInteractiveSize});return[Re(be)]}ln.ZP=(0,ie.Z)("Checkbox",(ve,ce)=>{let{prefixCls:be}=ce;return[je(be,ve)]})},36381:function(bn,ln,$e){"use strict";$e.d(ln,{default:function(){return tt}});var rt=$e(53878),St=$e(92310),ie=$e.n(St),Re=$e(5891),je=$e(26390),ve=$e(29043),ce=$e(80665),be=$e(35788),Ce=$e(51395),ye=$e(59301),we=$e(19149),me=$e(38298),xe=$e(80962),fe=$e(43469),z=$e(85108),ee=ye.forwardRef(function(bt,Ke){var ut=bt.prefixCls,wt=bt.forceRender,yt=bt.className,lt=bt.style,Qe=bt.children,We=bt.isActive,Ue=bt.role,qe=ye.useState(We||wt),He=(0,ve.Z)(qe,2),De=He[0],Le=He[1];return ye.useEffect(function(){(wt||We)&&Le(!0)},[wt,We]),De?ye.createElement("div",{ref:Ke,className:ie()("".concat(ut,"-content"),(0,xe.Z)((0,xe.Z)({},"".concat(ut,"-content-active"),We),"".concat(ut,"-content-inactive"),!We),yt),style:lt,role:Ue},ye.createElement("div",{className:"".concat(ut,"-content-box")},Qe)):null});ee.displayName="PanelContent";var ae=ee,re=["showArrow","headerClass","isActive","onItemClick","forceRender","className","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],le=ye.forwardRef(function(bt,Ke){var ut=bt.showArrow,wt=ut===void 0?!0:ut,yt=bt.headerClass,lt=bt.isActive,Qe=bt.onItemClick,We=bt.forceRender,Ue=bt.className,qe=bt.prefixCls,He=bt.collapsible,De=bt.accordion,Le=bt.panelKey,Ve=bt.extra,dt=bt.header,Ze=bt.expandIcon,Tt=bt.openMotion,_t=bt.destroyInactivePanel,Qt=bt.children,kt=(0,we.Z)(bt,re),Nt=He==="disabled",Zt=He==="header",on=He==="icon",vn=Ve!=null&&typeof Ve!="boolean",kn=function(){Qe==null||Qe(Le)},Kn=function(Fr){(Fr.key==="Enter"||Fr.keyCode===z.Z.ENTER||Fr.which===z.Z.ENTER)&&kn()},Xn=typeof Ze=="function"?Ze(bt):ye.createElement("i",{className:"arrow"});Xn&&(Xn=ye.createElement("div",{className:"".concat(qe,"-expand-icon"),onClick:["header","icon"].includes(He)?kn:void 0},Xn));var pr=ie()((0,xe.Z)((0,xe.Z)((0,xe.Z)({},"".concat(qe,"-item"),!0),"".concat(qe,"-item-active"),lt),"".concat(qe,"-item-disabled"),Nt),Ue),dr=ie()(yt,(0,xe.Z)((0,xe.Z)((0,xe.Z)({},"".concat(qe,"-header"),!0),"".concat(qe,"-header-collapsible-only"),Zt),"".concat(qe,"-icon-collapsible-only"),on)),vr={className:dr,"aria-expanded":lt,"aria-disabled":Nt,onKeyDown:Kn};return!Zt&&!on&&(vr.onClick=kn,vr.role=De?"tab":"button",vr.tabIndex=Nt?-1:0),ye.createElement("div",(0,Re.Z)({},kt,{ref:Ke,className:pr}),ye.createElement("div",vr,wt&&Xn,ye.createElement("span",{className:"".concat(qe,"-header-text"),onClick:He==="header"?kn:void 0},dt),vn&&ye.createElement("div",{className:"".concat(qe,"-extra")},Ve)),ye.createElement(fe.default,(0,Re.Z)({visible:lt,leavedClassName:"".concat(qe,"-content-hidden")},Tt,{forceRender:We,removeOnLeave:_t}),function(Sr,Fr){var li=Sr.className,Er=Sr.style;return ye.createElement(ae,{ref:Fr,prefixCls:qe,className:li,style:Er,isActive:lt,forceRender:We,role:De?"tabpanel":void 0},Qt)}))}),ue=le,pe=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],Ee=function(Ke,ut){var wt=ut.prefixCls,yt=ut.accordion,lt=ut.collapsible,Qe=ut.destroyInactivePanel,We=ut.onItemClick,Ue=ut.activeKey,qe=ut.openMotion,He=ut.expandIcon;return Ke.map(function(De,Le){var Ve=De.children,dt=De.label,Ze=De.key,Tt=De.collapsible,_t=De.onItemClick,Qt=De.destroyInactivePanel,kt=(0,we.Z)(De,pe),Nt=String(Ze!=null?Ze:Le),Zt=Tt!=null?Tt:lt,on=Qt!=null?Qt:Qe,vn=function(Xn){Zt!=="disabled"&&(We(Xn),_t==null||_t(Xn))},kn=!1;return yt?kn=Ue[0]===Nt:kn=Ue.indexOf(Nt)>-1,ye.createElement(ue,(0,Re.Z)({},kt,{prefixCls:wt,key:Nt,panelKey:Nt,isActive:kn,accordion:yt,openMotion:qe,expandIcon:He,header:dt,collapsible:Zt,onItemClick:vn,destroyInactivePanel:on}),Ve)})},Pe=function(Ke,ut,wt){if(!Ke)return null;var yt=wt.prefixCls,lt=wt.accordion,Qe=wt.collapsible,We=wt.destroyInactivePanel,Ue=wt.onItemClick,qe=wt.activeKey,He=wt.openMotion,De=wt.expandIcon,Le=Ke.key||String(ut),Ve=Ke.props,dt=Ve.header,Ze=Ve.headerClass,Tt=Ve.destroyInactivePanel,_t=Ve.collapsible,Qt=Ve.onItemClick,kt=!1;lt?kt=qe[0]===Le:kt=qe.indexOf(Le)>-1;var Nt=_t!=null?_t:Qe,Zt=function(kn){Nt!=="disabled"&&(Ue(kn),Qt==null||Qt(kn))},on={key:Le,panelKey:Le,header:dt,headerClass:Ze,isActive:kt,prefixCls:yt,destroyInactivePanel:Tt!=null?Tt:We,openMotion:He,accordion:lt,children:Ke.props.children,onItemClick:Zt,expandIcon:De,collapsible:Nt};return typeof Ke.type=="string"?Ke:(Object.keys(on).forEach(function(vn){typeof on[vn]=="undefined"&&delete on[vn]}),ye.cloneElement(Ke,on))};function Ie(bt,Ke,ut){return Array.isArray(bt)?Ee(bt,ut):(0,me.Z)(Ke).map(function(wt,yt){return Pe(wt,yt,ut)})}var ke=Ie,Ae=$e(36994);function Oe(bt){var Ke=bt;if(!Array.isArray(Ke)){var ut=(0,ce.Z)(Ke);Ke=ut==="number"||ut==="string"?[Ke]:[]}return Ke.map(function(wt){return String(wt)})}var Fe=ye.forwardRef(function(bt,Ke){var ut=bt.prefixCls,wt=ut===void 0?"rc-collapse":ut,yt=bt.destroyInactivePanel,lt=yt===void 0?!1:yt,Qe=bt.style,We=bt.accordion,Ue=bt.className,qe=bt.children,He=bt.collapsible,De=bt.openMotion,Le=bt.expandIcon,Ve=bt.activeKey,dt=bt.defaultActiveKey,Ze=bt.onChange,Tt=bt.items,_t=ie()(wt,Ue),Qt=(0,be.Z)([],{value:Ve,onChange:function(Kn){return Ze==null?void 0:Ze(Kn)},defaultValue:dt,postState:Oe}),kt=(0,ve.Z)(Qt,2),Nt=kt[0],Zt=kt[1],on=function(Kn){return Zt(function(){if(We)return Nt[0]===Kn?[]:[Kn];var Xn=Nt.indexOf(Kn),pr=Xn>-1;return pr?Nt.filter(function(dr){return dr!==Kn}):[].concat((0,je.Z)(Nt),[Kn])})};(0,Ce.ZP)(!qe,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var vn=ke(Tt,qe,{prefixCls:wt,accordion:We,openMotion:De,expandIcon:Le,collapsible:He,destroyInactivePanel:lt,onItemClick:on,activeKey:Nt});return ye.createElement("div",(0,Re.Z)({ref:Ke,className:_t,style:Qe,role:We?"tablist":void 0},(0,Ae.Z)(bt,{aria:!0,data:!0})),vn)}),_e=Object.assign(Fe,{Panel:ue}),Ye=_e,ze=_e.Panel,Xe=$e(64002),st=$e(62892),ht=$e(92343),ft=$e(36355),Lt=$e(19716),it=ye.forwardRef((bt,Ke)=>{const{getPrefixCls:ut}=ye.useContext(ft.E_),{prefixCls:wt,className:yt,showArrow:lt=!0}=bt,Qe=ut("collapse",wt),We=ie()({[`${Qe}-no-arrow`]:!lt},yt);return ye.createElement(Ye.Panel,Object.assign({ref:Ke},bt,{prefixCls:Qe,className:We}))}),xt=$e(17313),Et=$e(8378),Mt=$e(83116),mt=$e(37613);const pt=bt=>{const{componentCls:Ke,contentBg:ut,padding:wt,headerBg:yt,headerPadding:lt,collapseHeaderPaddingSM:Qe,collapseHeaderPaddingLG:We,collapsePanelBorderRadius:Ue,lineWidth:qe,lineType:He,colorBorder:De,colorText:Le,colorTextHeading:Ve,colorTextDisabled:dt,fontSize:Ze,fontSizeLG:Tt,lineHeight:_t,marginSM:Qt,paddingSM:kt,paddingLG:Nt,paddingXS:Zt,motionDurationSlow:on,fontSizeIcon:vn,contentPadding:kn}=bt,Kn=`${qe}px ${He} ${De}`;return{[Ke]:Object.assign(Object.assign({},(0,xt.Wf)(bt)),{backgroundColor:yt,border:Kn,borderBottom:0,borderRadius:`${Ue}px`,"&-rtl":{direction:"rtl"},[`& > ${Ke}-item`]:{borderBottom:Kn,"&:last-child":{[`
&,
& > ${Ke}-header`]:{borderRadius:`0 0 ${Ue}px ${Ue}px`}},[`> ${Ke}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:lt,color:Ve,lineHeight:_t,cursor:"pointer",transition:`all ${on}, visibility 0s`,[`> ${Ke}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${Ke}-expand-icon`]:{height:Ze*_t,display:"flex",alignItems:"center",paddingInlineEnd:Qt},[`${Ke}-arrow`]:Object.assign(Object.assign({},(0,xt.Ro)()),{fontSize:vn,svg:{transition:`transform ${on}`}}),[`${Ke}-header-text`]:{marginInlineEnd:"auto"}},[`${Ke}-header-collapsible-only`]:{cursor:"default",[`${Ke}-header-text`]:{flex:"none",cursor:"pointer"}},[`${Ke}-icon-collapsible-only`]:{cursor:"default",[`${Ke}-expand-icon`]:{cursor:"pointer"}}},[`${Ke}-content`]:{color:Le,backgroundColor:ut,borderTop:Kn,[`& > ${Ke}-content-box`]:{padding:kn},"&-hidden":{display:"none"}},"&-small":{[`> ${Ke}-item`]:{[`> ${Ke}-header`]:{padding:Qe,paddingInlineStart:Zt,[`> ${Ke}-expand-icon`]:{marginInlineStart:kt-Zt}},[`> ${Ke}-content > ${Ke}-content-box`]:{padding:kt}}},"&-large":{[`> ${Ke}-item`]:{fontSize:Tt,[`> ${Ke}-header`]:{padding:We,paddingInlineStart:wt,[`> ${Ke}-expand-icon`]:{height:Tt*_t,marginInlineStart:Nt-wt}},[`> ${Ke}-content > ${Ke}-content-box`]:{padding:Nt}}},[`${Ke}-item:last-child`]:{[`> ${Ke}-content`]:{borderRadius:`0 0 ${Ue}px ${Ue}px`}},[`& ${Ke}-item-disabled > ${Ke}-header`]:{"\n &,\n & > .arrow\n ":{color:dt,cursor:"not-allowed"}},[`&${Ke}-icon-position-end`]:{[`& > ${Ke}-item`]:{[`> ${Ke}-header`]:{[`${Ke}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:Qt}}}}})}},vt=bt=>{const{componentCls:Ke}=bt,ut=`> ${Ke}-item > ${Ke}-header ${Ke}-arrow svg`;return{[`${Ke}-rtl`]:{[ut]:{transform:"rotate(180deg)"}}}},jt=bt=>{const{componentCls:Ke,headerBg:ut,paddingXXS:wt,colorBorder:yt}=bt;return{[`${Ke}-borderless`]:{backgroundColor:ut,border:0,[`> ${Ke}-item`]:{borderBottom:`1px solid ${yt}`},[`
> ${Ke}-item:last-child,
> ${Ke}-item:last-child ${Ke}-header
`]:{borderRadius:0},[`> ${Ke}-item:last-child`]:{borderBottom:0},[`> ${Ke}-item > ${Ke}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${Ke}-item > ${Ke}-content > ${Ke}-content-box`]:{paddingTop:wt}}}},At=bt=>{const{componentCls:Ke,paddingSM:ut}=bt;return{[`${Ke}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${Ke}-item`]:{borderBottom:0,[`> ${Ke}-content`]:{backgroundColor:"transparent",border:0,[`> ${Ke}-content-box`]:{paddingBlock:ut}}}}}};var Kt=(0,Mt.Z)("Collapse",bt=>{const Ke=(0,mt.TS)(bt,{collapseHeaderPaddingSM:`${bt.paddingXS}px ${bt.paddingSM}px`,collapseHeaderPaddingLG:`${bt.padding}px ${bt.paddingLG}px`,collapsePanelBorderRadius:bt.borderRadiusLG});return[pt(Ke),jt(Ke),At(Ke),vt(Ke),(0,Et.Z)(Ke)]},bt=>({headerPadding:`${bt.paddingSM}px ${bt.padding}px`,headerBg:bt.colorFillAlter,contentPadding:`${bt.padding}px 16px`,contentBg:bt.colorBgContainer})),gt=Object.assign(ye.forwardRef((bt,Ke)=>{const{getPrefixCls:ut,direction:wt,collapse:yt}=ye.useContext(ft.E_),{prefixCls:lt,className:Qe,rootClassName:We,style:Ue,bordered:qe=!0,ghost:He,size:De,expandIconPosition:Le="start",children:Ve,expandIcon:dt}=bt,Ze=(0,Lt.Z)(Kn=>{var Xn;return(Xn=De!=null?De:Kn)!==null&&Xn!==void 0?Xn:"middle"}),Tt=ut("collapse",lt),_t=ut(),[Qt,kt]=Kt(Tt),Nt=ye.useMemo(()=>Le==="left"?"start":Le==="right"?"end":Le,[Le]),Zt=function(){let Kn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const Xn=dt?dt(Kn):ye.createElement(rt.Z,{rotate:Kn.isActive?90:void 0});return(0,ht.Tm)(Xn,()=>({className:ie()(Xn.props.className,`${Tt}-arrow`)}))},on=ie()(`${Tt}-icon-position-${Nt}`,{[`${Tt}-borderless`]:!qe,[`${Tt}-rtl`]:wt==="rtl",[`${Tt}-ghost`]:!!He,[`${Tt}-${Ze}`]:Ze!=="middle"},yt==null?void 0:yt.className,Qe,We,kt),vn=Object.assign(Object.assign({},(0,st.Z)(_t)),{motionAppear:!1,leavedClassName:`${Tt}-content-hidden`}),kn=ye.useMemo(()=>Ve?(0,me.Z)(Ve).map((Kn,Xn)=>{var pr,dr;if(!((pr=Kn.props)===null||pr===void 0)&&pr.disabled){const vr=(dr=Kn.key)!==null&&dr!==void 0?dr:String(Xn),{disabled:Sr,collapsible:Fr}=Kn.props,li=Object.assign(Object.assign({},(0,Xe.Z)(Kn.props,["disabled"])),{key:vr,collapsible:Fr!=null?Fr:Sr?"disabled":void 0});return(0,ht.Tm)(Kn,li)}return Kn}):null,[Ve]);return Qt(ye.createElement(Ye,Object.assign({ref:Ke,openMotion:vn},(0,Xe.Z)(bt,["rootClassName"]),{expandIcon:Zt,prefixCls:Tt,className:on,style:Object.assign(Object.assign({},yt==null?void 0:yt.style),Ue)}),kn))}),{Panel:it}),tt=gt},93891:function(bn,ln,$e){"use strict";var rt=$e(59301),St=$e(36355),ie=$e(64165);const Re=je=>{const{componentName:ve}=je,{getPrefixCls:ce}=(0,rt.useContext)(St.E_),be=ce("empty");switch(ve){case"Table":case"List":return rt.createElement(ie.Z,{image:ie.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return rt.createElement(ie.Z,{image:ie.Z.PRESENTED_IMAGE_SIMPLE,className:`${be}-small`});default:return rt.createElement(ie.Z,null)}};ln.Z=Re},43428:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return Ct}});var rt=$e(92310),St=$e.n(rt),ie=$e(57259),Re=$e(29043),je=$e(43403),ve=$e(28800),ce=$e(59301),be=ce.createContext(null),Ce=ce.createContext({}),ye=be,we=$e(80962),me=$e(5891),xe=$e(43469),fe=$e(85108),z=$e(36994),ee=$e(80764),ae=function(tt){var bt=tt.prefixCls,Ke=tt.className,ut=tt.style,wt=tt.children,yt=tt.containerRef,lt=tt.id,Qe=tt.onMouseEnter,We=tt.onMouseOver,Ue=tt.onMouseLeave,qe=tt.onClick,He=tt.onKeyDown,De=tt.onKeyUp,Le={onMouseEnter:Qe,onMouseOver:We,onMouseLeave:Ue,onClick:qe,onKeyDown:He,onKeyUp:De},Ve=ce.useContext(Ce),dt=Ve.panel,Ze=(0,ee.useComposeRef)(dt,yt);return ce.createElement(ce.Fragment,null,ce.createElement("div",(0,me.Z)({id:lt,className:St()("".concat(bt,"-content"),Ke),style:(0,ie.Z)({},ut),"aria-modal":"true",role:"dialog",ref:Ze},Le),wt))},re=ae,le=$e(51395);function ue(gt){return typeof gt=="string"&&String(Number(gt))===gt?((0,le.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(gt)):gt}function pe(gt){warning(!("wrapperClassName"in gt),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!gt.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var Ee={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Pe(gt,tt){var bt,Ke,ut,wt,yt=gt.prefixCls,lt=gt.open,Qe=gt.placement,We=gt.inline,Ue=gt.push,qe=gt.forceRender,He=gt.autoFocus,De=gt.keyboard,Le=gt.rootClassName,Ve=gt.rootStyle,dt=gt.zIndex,Ze=gt.className,Tt=gt.id,_t=gt.style,Qt=gt.motion,kt=gt.width,Nt=gt.height,Zt=gt.children,on=gt.contentWrapperStyle,vn=gt.mask,kn=gt.maskClosable,Kn=gt.maskMotion,Xn=gt.maskClassName,pr=gt.maskStyle,dr=gt.afterOpenChange,vr=gt.onClose,Sr=gt.onMouseEnter,Fr=gt.onMouseOver,li=gt.onMouseLeave,Er=gt.onClick,xi=gt.onKeyDown,Cr=gt.onKeyUp,ot=ce.useRef(),di=ce.useRef(),Yr=ce.useRef();ce.useImperativeHandle(tt,function(){return ot.current});var Ri=function(Pn){var Yt=Pn.keyCode,zn=Pn.shiftKey;switch(Yt){case fe.Z.TAB:{if(Yt===fe.Z.TAB){if(!zn&&document.activeElement===Yr.current){var Qn;(Qn=di.current)===null||Qn===void 0||Qn.focus({preventScroll:!0})}else if(zn&&document.activeElement===di.current){var or;(or=Yr.current)===null||or===void 0||or.focus({preventScroll:!0})}}break}case fe.Z.ESC:{vr&&De&&(Pn.stopPropagation(),vr(Pn));break}}};ce.useEffect(function(){if(lt&&He){var ir;(ir=ot.current)===null||ir===void 0||ir.focus({preventScroll:!0})}},[lt]);var hr=ce.useState(!1),Ir=(0,Re.Z)(hr,2),Rr=Ir[0],yi=Ir[1],dn=ce.useContext(ye),mn;Ue===!1?mn={distance:0}:Ue===!0?mn={}:mn=Ue||{};var un=(bt=(Ke=(ut=mn)===null||ut===void 0?void 0:ut.distance)!==null&&Ke!==void 0?Ke:dn==null?void 0:dn.pushDistance)!==null&&bt!==void 0?bt:180,Ut=ce.useMemo(function(){return{pushDistance:un,push:function(){yi(!0)},pull:function(){yi(!1)}}},[un]);ce.useEffect(function(){if(lt){var ir;dn==null||(ir=dn.push)===null||ir===void 0||ir.call(dn)}else{var Pn;dn==null||(Pn=dn.pull)===null||Pn===void 0||Pn.call(dn)}},[lt]),ce.useEffect(function(){return function(){var ir;dn==null||(ir=dn.pull)===null||ir===void 0||ir.call(dn)}},[]);var xn=vn&&ce.createElement(xe.default,(0,me.Z)({key:"mask"},Kn,{visible:lt}),function(ir,Pn){var Yt=ir.className,zn=ir.style;return ce.createElement("div",{className:St()("".concat(yt,"-mask"),Yt,Xn),style:(0,ie.Z)((0,ie.Z)({},zn),pr),onClick:kn&&lt?vr:void 0,ref:Pn})}),jn=typeof Qt=="function"?Qt(Qe):Qt,en={};if(Rr&&un)switch(Qe){case"top":en.transform="translateY(".concat(un,"px)");break;case"bottom":en.transform="translateY(".concat(-un,"px)");break;case"left":en.transform="translateX(".concat(un,"px)");break;default:en.transform="translateX(".concat(-un,"px)");break}Qe==="left"||Qe==="right"?en.width=ue(kt):en.height=ue(Nt);var Gt={onMouseEnter:Sr,onMouseOver:Fr,onMouseLeave:li,onClick:Er,onKeyDown:xi,onKeyUp:Cr},Cn=ce.createElement(xe.default,(0,me.Z)({key:"panel"},jn,{visible:lt,forceRender:qe,onVisibleChanged:function(Pn){dr==null||dr(Pn)},removeOnLeave:!1,leavedClassName:"".concat(yt,"-content-wrapper-hidden")}),function(ir,Pn){var Yt=ir.className,zn=ir.style;return ce.createElement("div",(0,me.Z)({className:St()("".concat(yt,"-content-wrapper"),Yt),style:(0,ie.Z)((0,ie.Z)((0,ie.Z)({},en),zn),on)},(0,z.Z)(gt,{data:!0})),ce.createElement(re,(0,me.Z)({id:Tt,containerRef:Pn,prefixCls:yt,className:Ze,style:_t},Gt),Zt))}),Gn=(0,ie.Z)({},Ve);return dt&&(Gn.zIndex=dt),ce.createElement(ye.Provider,{value:Ut},ce.createElement("div",{className:St()(yt,"".concat(yt,"-").concat(Qe),Le,(wt={},(0,we.Z)(wt,"".concat(yt,"-open"),lt),(0,we.Z)(wt,"".concat(yt,"-inline"),We),wt)),style:Gn,tabIndex:-1,ref:ot,onKeyDown:Ri},xn,ce.createElement("div",{tabIndex:0,ref:di,style:Ee,"aria-hidden":"true","data-sentinel":"start"}),Cn,ce.createElement("div",{tabIndex:0,ref:Yr,style:Ee,"aria-hidden":"true","data-sentinel":"end"})))}var Ie=ce.forwardRef(Pe),ke=Ie,Ae=function(tt){var bt=tt.open,Ke=bt===void 0?!1:bt,ut=tt.prefixCls,wt=ut===void 0?"rc-drawer":ut,yt=tt.placement,lt=yt===void 0?"right":yt,Qe=tt.autoFocus,We=Qe===void 0?!0:Qe,Ue=tt.keyboard,qe=Ue===void 0?!0:Ue,He=tt.width,De=He===void 0?378:He,Le=tt.mask,Ve=Le===void 0?!0:Le,dt=tt.maskClosable,Ze=dt===void 0?!0:dt,Tt=tt.getContainer,_t=tt.forceRender,Qt=tt.afterOpenChange,kt=tt.destroyOnClose,Nt=tt.onMouseEnter,Zt=tt.onMouseOver,on=tt.onMouseLeave,vn=tt.onClick,kn=tt.onKeyDown,Kn=tt.onKeyUp,Xn=tt.panelRef,pr=ce.useState(!1),dr=(0,Re.Z)(pr,2),vr=dr[0],Sr=dr[1],Fr=ce.useState(!1),li=(0,Re.Z)(Fr,2),Er=li[0],xi=li[1];(0,ve.Z)(function(){xi(!0)},[]);var Cr=Er?Ke:!1,ot=ce.useRef(),di=ce.useRef();(0,ve.Z)(function(){Cr&&(di.current=document.activeElement)},[Cr]);var Yr=function(yi){var dn;if(Sr(yi),Qt==null||Qt(yi),!yi&&di.current&&!((dn=ot.current)!==null&&dn!==void 0&&dn.contains(di.current))){var mn;(mn=di.current)===null||mn===void 0||mn.focus({preventScroll:!0})}},Ri=ce.useMemo(function(){return{panel:Xn}},[Xn]);if(!_t&&!vr&&!Cr&&kt)return null;var hr={onMouseEnter:Nt,onMouseOver:Zt,onMouseLeave:on,onClick:vn,onKeyDown:kn,onKeyUp:Kn},Ir=(0,ie.Z)((0,ie.Z)({},tt),{},{open:Cr,prefixCls:wt,placement:lt,autoFocus:We,keyboard:qe,width:De,mask:Ve,maskClosable:Ze,inline:Tt===!1,afterOpenChange:Yr,ref:ot},hr);return ce.createElement(Ce.Provider,{value:Ri},ce.createElement(je.Z,{open:Cr||_t||vr,autoDestroy:!1,getContainer:Tt,autoLock:Ve&&(Cr||vr)},ce.createElement(ke,Ir)))},Oe=Ae,Fe=Oe,_e=$e(62892),Ye=$e(36355),ze=$e(32441),Xe=$e(47729),ht=gt=>{const{prefixCls:tt,title:bt,footer:Ke,extra:ut,closeIcon:wt,closable:yt,onClose:lt,headerStyle:Qe,drawerStyle:We,bodyStyle:Ue,footerStyle:qe,children:He}=gt,De=ce.useCallback(Tt=>ce.createElement("button",{type:"button",onClick:lt,"aria-label":"Close",className:`${tt}-close`},Tt),[lt]),[Le,Ve]=(0,Xe.Z)(yt,wt,De,void 0,!0),dt=ce.useMemo(()=>!bt&&!Le?null:ce.createElement("div",{style:Qe,className:St()(`${tt}-header`,{[`${tt}-header-close-only`]:Le&&!bt&&!ut})},ce.createElement("div",{className:`${tt}-header-title`},Ve,bt&&ce.createElement("div",{className:`${tt}-title`},bt)),ut&&ce.createElement("div",{className:`${tt}-extra`},ut)),[Le,Ve,ut,Qe,tt,bt]),Ze=ce.useMemo(()=>{if(!Ke)return null;const Tt=`${tt}-footer`;return ce.createElement("div",{className:Tt,style:qe},Ke)},[Ke,qe,tt]);return ce.createElement("div",{className:`${tt}-wrapper-body`,style:We},dt,ce.createElement("div",{className:`${tt}-body`,style:Ue},He),Ze)},ft=$e(33234),Lt=$e(83116),et=$e(37613),xt=gt=>{const{componentCls:tt,motionDurationSlow:bt}=gt,Ke={"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${bt}`}}};return{[tt]:{[`${tt}-mask-motion`]:{"&-enter, &-appear, &-leave":{"&-active":{transition:`all ${bt}`}},"&-enter, &-appear":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}},[`${tt}-panel-motion`]:{"&-left":[Ke,{"&-enter, &-appear":{"&-start":{transform:"translateX(-100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(-100%)"}}}],"&-right":[Ke,{"&-enter, &-appear":{"&-start":{transform:"translateX(100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(100%)"}}}],"&-top":[Ke,{"&-enter, &-appear":{"&-start":{transform:"translateY(-100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(-100%)"}}}],"&-bottom":[Ke,{"&-enter, &-appear":{"&-start":{transform:"translateY(100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(100%)"}}}]}}}};const Et=gt=>{const{componentCls:tt,zIndexPopup:bt,colorBgMask:Ke,colorBgElevated:ut,motionDurationSlow:wt,motionDurationMid:yt,padding:lt,paddingLG:Qe,fontSizeLG:We,lineHeightLG:Ue,lineWidth:qe,lineType:He,colorSplit:De,marginSM:Le,colorIcon:Ve,colorIconHover:dt,colorText:Ze,fontWeightStrong:Tt,footerPaddingBlock:_t,footerPaddingInline:Qt}=gt,kt=`${tt}-content-wrapper`;return{[tt]:{position:"fixed",inset:0,zIndex:bt,pointerEvents:"none","&-pure":{position:"relative",background:ut,[`&${tt}-left`]:{boxShadow:gt.boxShadowDrawerLeft},[`&${tt}-right`]:{boxShadow:gt.boxShadowDrawerRight},[`&${tt}-top`]:{boxShadow:gt.boxShadowDrawerUp},[`&${tt}-bottom`]:{boxShadow:gt.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${tt}-mask`]:{position:"absolute",inset:0,zIndex:bt,background:Ke,pointerEvents:"auto"},[kt]:{position:"absolute",zIndex:bt,maxWidth:"100vw",transition:`all ${wt}`,"&-hidden":{display:"none"}},[`&-left > ${kt}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:gt.boxShadowDrawerLeft},[`&-right > ${kt}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:gt.boxShadowDrawerRight},[`&-top > ${kt}`]:{top:0,insetInline:0,boxShadow:gt.boxShadowDrawerUp},[`&-bottom > ${kt}`]:{bottom:0,insetInline:0,boxShadow:gt.boxShadowDrawerDown},[`${tt}-content`]:{width:"100%",height:"100%",overflow:"auto",background:ut,pointerEvents:"auto"},[`${tt}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${tt}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${lt}px ${Qe}px`,fontSize:We,lineHeight:Ue,borderBottom:`${qe}px ${He} ${De}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${tt}-extra`]:{flex:"none"},[`${tt}-close`]:{display:"inline-block",marginInlineEnd:Le,color:Ve,fontWeight:Tt,fontSize:We,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${yt}`,textRendering:"auto","&:focus, &:hover":{color:dt,textDecoration:"none"}},[`${tt}-title`]:{flex:1,margin:0,color:Ze,fontWeight:gt.fontWeightStrong,fontSize:We,lineHeight:Ue},[`${tt}-body`]:{flex:1,minWidth:0,minHeight:0,padding:Qe,overflow:"auto"},[`${tt}-footer`]:{flexShrink:0,padding:`${_t}px ${Qt}px`,borderTop:`${qe}px ${He} ${De}`},"&-rtl":{direction:"rtl"}}}};var Mt=(0,Lt.Z)("Drawer",gt=>{const tt=(0,et.TS)(gt,{});return[Et(tt),xt(tt)]},gt=>({zIndexPopup:gt.zIndexPopupBase,footerPaddingBlock:gt.paddingXS,footerPaddingInline:gt.padding})),mt=$e(11575),pt=function(gt,tt){var bt={};for(var Ke in gt)Object.prototype.hasOwnProperty.call(gt,Ke)&&tt.indexOf(Ke)<0&&(bt[Ke]=gt[Ke]);if(gt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,Ke=Object.getOwnPropertySymbols(gt);ut<Ke.length;ut++)tt.indexOf(Ke[ut])<0&&Object.prototype.propertyIsEnumerable.call(gt,Ke[ut])&&(bt[Ke[ut]]=gt[Ke[ut]]);return bt};const vt=null,jt={distance:180},At=gt=>{var tt;const{rootClassName:bt,width:Ke,height:ut,size:wt="default",mask:yt=!0,push:lt=jt,open:Qe,afterOpenChange:We,onClose:Ue,prefixCls:qe,getContainer:He,style:De,className:Le,visible:Ve,afterVisibleChange:dt}=gt,Ze=pt(gt,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange"]),{getPopupContainer:Tt,getPrefixCls:_t,direction:Qt,drawer:kt}=ce.useContext(Ye.E_),Nt=_t("drawer",qe),[Zt,on]=Mt(Nt),vn=He===void 0&&Tt?()=>Tt(document.body):He,kn=St()({"no-mask":!yt,[`${Nt}-rtl`]:Qt==="rtl"},bt,on),Kn=ce.useMemo(()=>Ke!=null?Ke:wt==="large"?736:378,[Ke,wt]),Xn=ce.useMemo(()=>ut!=null?ut:wt==="large"?736:378,[ut,wt]),pr={motionName:(0,_e.m)(Nt,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},dr=Sr=>({motionName:(0,_e.m)(Nt,`panel-motion-${Sr}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),vr=(0,mt.H)();return Zt(ce.createElement(ft.BR,null,ce.createElement(ze.Ux,{status:!0,override:!0},ce.createElement(Fe,Object.assign({prefixCls:Nt,onClose:Ue,maskMotion:pr,motion:dr},Ze,{open:Qe!=null?Qe:Ve,mask:yt,push:lt,width:Kn,height:Xn,style:Object.assign(Object.assign({},kt==null?void 0:kt.style),De),className:St()(kt==null?void 0:kt.className,Le),rootClassName:kn,getContainer:vn,afterOpenChange:We!=null?We:dt,panelRef:vr}),ce.createElement(ht,Object.assign({prefixCls:Nt},Ze,{onClose:Ue}))))))},Kt=gt=>{const{prefixCls:tt,style:bt,className:Ke,placement:ut="right"}=gt,wt=pt(gt,["prefixCls","style","className","placement"]),{getPrefixCls:yt}=ce.useContext(Ye.E_),lt=yt("drawer",tt),[Qe,We]=Mt(lt),Ue=St()(lt,`${lt}-pure`,`${lt}-${ut}`,We,Ke);return Qe(ce.createElement("div",{className:Ue,style:bt},ce.createElement(ht,Object.assign({prefixCls:lt},wt))))};At._InternalPanelDoNotUseOrYouWillBeFired=Kt;var Ct=At},91857:function(bn,ln,$e){"use strict";var rt=$e(59301),St=$e(53878),ie=$e(92310),Re=$e.n(ie),je=$e(31561),ve=$e(80764),ce=$e(35788),be=$e(64002),Ce=$e(79676),ye=$e(53487),we=$e(92343),me=$e(36355),xe=$e(20834),fe=$e(40875),z=$e(88088),ee=$e(47211);const ae=null,re=Ee=>{const{menu:Pe,arrow:Ie,prefixCls:ke,children:Ae,trigger:Oe,disabled:Fe,dropdownRender:_e,getPopupContainer:Ye,overlayClassName:ze,rootClassName:Xe,open:st,onOpenChange:ht,visible:ft,onVisibleChange:Lt,mouseEnterDelay:et=.15,mouseLeaveDelay:it=.1,autoAdjustOverflow:xt=!0,placement:Et="",overlay:Mt,transitionName:mt}=Ee,{getPopupContainer:pt,getPrefixCls:vt,direction:jt}=rt.useContext(me.E_),At=rt.useMemo(()=>{const Le=vt();return mt!==void 0?mt:Et.includes("top")?`${Le}-slide-down`:`${Le}-slide-up`},[vt,Et,mt]),Kt=rt.useMemo(()=>Et?Et.includes("Center")?Et.slice(0,Et.indexOf("Center")):Et:jt==="rtl"?"bottomRight":"bottomLeft",[Et,jt]),Ct=vt("dropdown",ke),[gt,tt]=(0,ee.Z)(Ct),[,bt]=(0,z.Z)(),Ke=rt.Children.only(Ae),ut=(0,we.Tm)(Ke,{className:Re()(`${Ct}-trigger`,{[`${Ct}-rtl`]:jt==="rtl"},Ke.props.className),disabled:Fe}),wt=Fe?[]:Oe;let yt;wt&&wt.includes("contextMenu")&&(yt=!0);const[lt,Qe]=(0,ce.Z)(!1,{value:st!=null?st:ft}),We=(0,ve.useEvent)(Le=>{ht==null||ht(Le),Lt==null||Lt(Le),Qe(Le)}),Ue=Re()(ze,Xe,tt,{[`${Ct}-rtl`]:jt==="rtl"}),qe=(0,Ce.Z)({arrowPointAtCenter:typeof Ie=="object"&&Ie.pointAtCenter,autoAdjustOverflow:xt,offset:bt.marginXXS,arrowWidth:Ie?bt.sizePopupArrow:0,borderRadius:bt.borderRadius}),He=rt.useCallback(()=>{Qe(!1)},[]),De=()=>{let Le;return Pe!=null&&Pe.items?Le=rt.createElement(xe.default,Object.assign({},Pe)):typeof Mt=="function"?Le=Mt():Le=Mt,_e&&(Le=_e(Le)),Le=rt.Children.only(typeof Le=="string"?rt.createElement("span",null,Le):Le),rt.createElement(fe.J,{prefixCls:`${Ct}-menu`,expandIcon:rt.createElement("span",{className:`${Ct}-menu-submenu-arrow`},rt.createElement(St.Z,{className:`${Ct}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:He,validator:Ve=>{let{mode:dt}=Ve}},Le)};return gt(rt.createElement(je.Z,Object.assign({alignPoint:yt},(0,be.Z)(Ee,["rootClassName"]),{mouseEnterDelay:et,mouseLeaveDelay:it,visible:lt,builtinPlacements:qe,arrow:!!Ie,overlayClassName:Ue,prefixCls:Ct,getPopupContainer:Ye||pt,transitionName:At,trigger:wt,overlay:De,placement:Kt,onVisibleChange:We}),ut))};function le(Ee){return Object.assign(Object.assign({},Ee),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const ue=(0,ye.Z)(re,"dropdown",Ee=>Ee,le),pe=Ee=>rt.createElement(ue,Object.assign({},Ee),rt.createElement("span",null));re._InternalPanelDoNotUseOrYouWillBeFired=pe,ln.Z=re},38854:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return z}});var rt=$e(91857),St=$e(92310),ie=$e.n(St),Re=$e(59301),je=$e(19362),ve=$e(3113),ce=$e(36355),be=$e(81327),Ce=$e(33234),ye=$e(47211),we=function(ee,ae){var re={};for(var le in ee)Object.prototype.hasOwnProperty.call(ee,le)&&ae.indexOf(le)<0&&(re[le]=ee[le]);if(ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ue=0,le=Object.getOwnPropertySymbols(ee);ue<le.length;ue++)ae.indexOf(le[ue])<0&&Object.prototype.propertyIsEnumerable.call(ee,le[ue])&&(re[le[ue]]=ee[le[ue]]);return re};const me=ee=>{const{getPopupContainer:ae,getPrefixCls:re,direction:le}=Re.useContext(ce.E_),{prefixCls:ue,type:pe="default",danger:Ee,disabled:Pe,loading:Ie,onClick:ke,htmlType:Ae,children:Oe,className:Fe,menu:_e,arrow:Ye,autoFocus:ze,overlay:Xe,trigger:st,align:ht,open:ft,onOpenChange:Lt,placement:et,getPopupContainer:it,href:xt,icon:Et=Re.createElement(je.Z,null),title:Mt,buttonsRender:mt=De=>De,mouseEnterDelay:pt,mouseLeaveDelay:vt,overlayClassName:jt,overlayStyle:At,destroyPopupOnHide:Kt,dropdownRender:Ct}=ee,gt=we(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"]),tt=re("dropdown",ue),bt=`${tt}-button`,[Ke,ut]=(0,ye.Z)(tt),wt={menu:_e,arrow:Ye,autoFocus:ze,align:ht,disabled:Pe,trigger:Pe?[]:st,onOpenChange:Lt,getPopupContainer:it||ae,mouseEnterDelay:pt,mouseLeaveDelay:vt,overlayClassName:jt,overlayStyle:At,destroyPopupOnHide:Kt,dropdownRender:Ct},{compactSize:yt,compactItemClassnames:lt}=(0,Ce.ri)(tt,le),Qe=ie()(bt,lt,Fe,ut);"overlay"in ee&&(wt.overlay=Xe),"open"in ee&&(wt.open=ft),"placement"in ee?wt.placement=et:wt.placement=le==="rtl"?"bottomLeft":"bottomRight";const We=Re.createElement(ve.ZP,{type:pe,danger:Ee,disabled:Pe,loading:Ie,onClick:ke,htmlType:Ae,href:xt,title:Mt},Oe),Ue=Re.createElement(ve.ZP,{type:pe,danger:Ee,icon:Et}),[qe,He]=mt([We,Ue]);return Ke(Re.createElement(be.Z.Compact,Object.assign({className:Qe,size:yt,block:!0},gt),qe,Re.createElement(rt.Z,Object.assign({},wt),He)))};me.__ANT_BUTTON=!0;var xe=me;const fe=rt.Z;fe.Button=xe;var z=fe},47211:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return we}});var rt=$e(17313),St=$e(13826),ie=$e(92899),Re=$e(29878),je=$e(19447),ve=$e(83116),ce=$e(37613),Ce=me=>{const{componentCls:xe,menuCls:fe,colorError:z,colorTextLightSolid:ee}=me,ae=`${fe}-item`;return{[`${xe}, ${xe}-menu-submenu`]:{[`${fe} ${ae}`]:{[`&${ae}-danger:not(${ae}-disabled)`]:{color:z,"&:hover":{color:ee,backgroundColor:z}}}}}};const ye=me=>{const{componentCls:xe,menuCls:fe,zIndexPopup:z,dropdownArrowDistance:ee,sizePopupArrow:ae,antCls:re,iconCls:le,motionDurationMid:ue,dropdownPaddingVertical:pe,fontSize:Ee,dropdownEdgeChildPadding:Pe,colorTextDisabled:Ie,fontSizeIcon:ke,controlPaddingHorizontal:Ae,colorBgElevated:Oe}=me;return[{[xe]:Object.assign(Object.assign({},(0,rt.Wf)(me)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:z,display:"block","&::before":{position:"absolute",insetBlock:-ee+ae/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${re}-btn`]:{[`& > ${le}-down, & > ${re}-btn-icon > ${le}-down`]:{fontSize:ke}},[`${xe}-wrap`]:{position:"relative",[`${re}-btn > ${le}-down`]:{fontSize:ke},[`${le}-down::before`]:{transition:`transform ${ue}`}},[`${xe}-wrap-open`]:{[`${le}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${re}-slide-down-enter${re}-slide-down-enter-active${xe}-placement-bottomLeft,
&${re}-slide-down-appear${re}-slide-down-appear-active${xe}-placement-bottomLeft,
&${re}-slide-down-enter${re}-slide-down-enter-active${xe}-placement-bottom,
&${re}-slide-down-appear${re}-slide-down-appear-active${xe}-placement-bottom,
&${re}-slide-down-enter${re}-slide-down-enter-active${xe}-placement-bottomRight,
&${re}-slide-down-appear${re}-slide-down-appear-active${xe}-placement-bottomRight`]:{animationName:St.fJ},[`&${re}-slide-up-enter${re}-slide-up-enter-active${xe}-placement-topLeft,
&${re}-slide-up-appear${re}-slide-up-appear-active${xe}-placement-topLeft,
&${re}-slide-up-enter${re}-slide-up-enter-active${xe}-placement-top,
&${re}-slide-up-appear${re}-slide-up-appear-active${xe}-placement-top,
&${re}-slide-up-enter${re}-slide-up-enter-active${xe}-placement-topRight,
&${re}-slide-up-appear${re}-slide-up-appear-active${xe}-placement-topRight`]:{animationName:St.Qt},[`&${re}-slide-down-leave${re}-slide-down-leave-active${xe}-placement-bottomLeft,
&${re}-slide-down-leave${re}-slide-down-leave-active${xe}-placement-bottom,
&${re}-slide-down-leave${re}-slide-down-leave-active${xe}-placement-bottomRight`]:{animationName:St.Uw},[`&${re}-slide-up-leave${re}-slide-up-leave-active${xe}-placement-topLeft,
&${re}-slide-up-leave${re}-slide-up-leave-active${xe}-placement-top,
&${re}-slide-up-leave${re}-slide-up-leave-active${xe}-placement-topRight`]:{animationName:St.ly}})},(0,je.ZP)(me,{colorBg:Oe,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${xe} ${fe}`]:{position:"relative",margin:0},[`${fe}-submenu-popup`]:{position:"absolute",zIndex:z,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${xe}, ${xe}-menu-submenu`]:{[fe]:Object.assign(Object.assign({padding:Pe,listStyleType:"none",backgroundColor:Oe,backgroundClip:"padding-box",borderRadius:me.borderRadiusLG,outline:"none",boxShadow:me.boxShadowSecondary},(0,rt.Qy)(me)),{[`${fe}-item-group-title`]:{padding:`${pe}px ${Ae}px`,color:me.colorTextDescription,transition:`all ${ue}`},[`${fe}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${fe}-item-icon`]:{minWidth:Ee,marginInlineEnd:me.marginXS,fontSize:me.fontSizeSM},[`${fe}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${ue}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${fe}-item, ${fe}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${pe}px ${Ae}px`,color:me.colorText,fontWeight:"normal",fontSize:Ee,lineHeight:me.lineHeight,cursor:"pointer",transition:`all ${ue}`,borderRadius:me.borderRadiusSM,"&:hover, &-active":{backgroundColor:me.controlItemBgHover}},(0,rt.Qy)(me)),{"&-selected":{color:me.colorPrimary,backgroundColor:me.controlItemBgActive,"&:hover, &-active":{backgroundColor:me.controlItemBgActiveHover}},"&-disabled":{color:Ie,cursor:"not-allowed","&:hover":{color:Ie,backgroundColor:Oe,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${me.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:me.colorSplit},[`${xe}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:me.paddingXS,[`${xe}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:me.colorTextDescription,fontSize:ke,fontStyle:"normal"}}}),[`${fe}-item-group-list`]:{margin:`0 ${me.marginXS}px`,padding:0,listStyle:"none"},[`${fe}-submenu-title`]:{paddingInlineEnd:Ae+me.fontSizeSM},[`${fe}-submenu-vertical`]:{position:"relative"},[`${fe}-submenu${fe}-submenu-disabled ${xe}-menu-submenu-title`]:{[`&, ${xe}-menu-submenu-arrow-icon`]:{color:Ie,backgroundColor:Oe,cursor:"not-allowed"}},[`${fe}-submenu-selected ${xe}-menu-submenu-title`]:{color:me.colorPrimary}})}},[(0,St.oN)(me,"slide-up"),(0,St.oN)(me,"slide-down"),(0,ie.Fm)(me,"move-up"),(0,ie.Fm)(me,"move-down"),(0,Re._y)(me,"zoom-big")]]};var we=(0,ve.Z)("Dropdown",(me,xe)=>{let{rootPrefixCls:fe}=xe;const{marginXXS:z,sizePopupArrow:ee,controlHeight:ae,fontSize:re,lineHeight:le,paddingXXS:ue,componentCls:pe,borderRadiusLG:Ee}=me,Pe=(ae-re*le)/2,{dropdownArrowOffset:Ie}=(0,je.fS)({contentRadius:Ee}),ke=(0,ce.TS)(me,{menuCls:`${pe}-menu`,rootPrefixCls:fe,dropdownArrowDistance:ee/2+z,dropdownArrowOffset:Ie,dropdownPaddingVertical:Pe,dropdownEdgeChildPadding:ue});return[ye(ke),Ce(ke)]},me=>({zIndexPopup:me.zIndexPopupBase+50}))},64165:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return ue}});var rt=$e(92310),St=$e.n(rt),ie=$e(59301),Re=$e(36355),je=$e(9763),ve=$e(64993),ce=$e(88088),Ce=()=>{const[,pe]=(0,ce.Z)(),Pe=new ve.C(pe.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return ie.createElement("svg",{style:Pe,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"}))))},we=()=>{const[,pe]=(0,ce.Z)(),{colorFill:Ee,colorFillTertiary:Pe,colorFillQuaternary:Ie,colorBgContainer:ke}=pe,{borderColor:Ae,shadowColor:Oe,contentColor:Fe}=(0,ie.useMemo)(()=>({borderColor:new ve.C(Ee).onBackground(ke).toHexShortString(),shadowColor:new ve.C(Pe).onBackground(ke).toHexShortString(),contentColor:new ve.C(Ie).onBackground(ke).toHexShortString()}),[Ee,Pe,Ie,ke]);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:Oe,cx:"32",cy:"33",rx:"32",ry:"7"}),ie.createElement("g",{fillRule:"nonzero",stroke:Ae},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:Fe}))))},me=$e(83116),xe=$e(37613);const fe=pe=>{const{componentCls:Ee,margin:Pe,marginXS:Ie,marginXL:ke,fontSize:Ae,lineHeight:Oe}=pe;return{[Ee]:{marginInline:Ie,fontSize:Ae,lineHeight:Oe,textAlign:"center",[`${Ee}-image`]:{height:pe.emptyImgHeight,marginBottom:Ie,opacity:pe.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${Ee}-description`]:{color:pe.colorText},[`${Ee}-footer`]:{marginTop:Pe},"&-normal":{marginBlock:ke,color:pe.colorTextDisabled,[`${Ee}-description`]:{color:pe.colorTextDisabled},[`${Ee}-image`]:{height:pe.emptyImgHeightMD}},"&-small":{marginBlock:Ie,color:pe.colorTextDisabled,[`${Ee}-image`]:{height:pe.emptyImgHeightSM}}}}};var z=(0,me.Z)("Empty",pe=>{const{componentCls:Ee,controlHeightLG:Pe}=pe,Ie=(0,xe.TS)(pe,{emptyImgCls:`${Ee}-img`,emptyImgHeight:Pe*2.5,emptyImgHeightMD:Pe,emptyImgHeightSM:Pe*.875});return[fe(Ie)]}),ee=function(pe,Ee){var Pe={};for(var Ie in pe)Object.prototype.hasOwnProperty.call(pe,Ie)&&Ee.indexOf(Ie)<0&&(Pe[Ie]=pe[Ie]);if(pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ke=0,Ie=Object.getOwnPropertySymbols(pe);ke<Ie.length;ke++)Ee.indexOf(Ie[ke])<0&&Object.prototype.propertyIsEnumerable.call(pe,Ie[ke])&&(Pe[Ie[ke]]=pe[Ie[ke]]);return Pe};const ae=ie.createElement(Ce,null),re=ie.createElement(we,null),le=pe=>{var{className:Ee,rootClassName:Pe,prefixCls:Ie,image:ke=ae,description:Ae,children:Oe,imageStyle:Fe,style:_e}=pe,Ye=ee(pe,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:ze,direction:Xe,empty:st}=ie.useContext(Re.E_),ht=ze("empty",Ie),[ft,Lt]=z(ht),[et]=(0,je.Z)("Empty"),it=typeof Ae!="undefined"?Ae:et==null?void 0:et.description,xt=typeof it=="string"?it:"empty";let Et=null;return typeof ke=="string"?Et=ie.createElement("img",{alt:xt,src:ke}):Et=ke,ft(ie.createElement("div",Object.assign({className:St()(Lt,ht,st==null?void 0:st.className,{[`${ht}-normal`]:ke===re,[`${ht}-rtl`]:Xe==="rtl"},Ee,Pe),style:Object.assign(Object.assign({},st==null?void 0:st.style),_e)},Ye),ie.createElement("div",{className:`${ht}-image`,style:Fe},Et),it&&ie.createElement("div",{className:`${ht}-description`},it),Oe&&ie.createElement("div",{className:`${ht}-footer`},Oe)))};le.PRESENTED_IMAGE_DEFAULT=ae,le.PRESENTED_IMAGE_SIMPLE=re;var ue=le},78241:function(bn,ln,$e){"use strict";$e.d(ln,{default:function(){return un}});var rt=$e(26390),St=$e(92310),ie=$e.n(St),Re=$e(43469),je=$e(59301),ve=$e(62892),ce=$e(32441);function be(Ut){const[xn,jn]=je.useState(Ut);return je.useEffect(()=>{const en=setTimeout(()=>{jn(Ut)},Ut.length?0:10);return()=>{clearTimeout(en)}},[Ut]),xn}var Ce=$e(17313),ye=$e(29878),we=$e(8378),me=$e(37613),xe=$e(83116),z=Ut=>{const{componentCls:xn}=Ut,jn=`${xn}-show-help`,en=`${xn}-show-help-item`;return{[jn]:{transition:`opacity ${Ut.motionDurationSlow} ${Ut.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[en]:{overflow:"hidden",transition:`height ${Ut.motionDurationSlow} ${Ut.motionEaseInOut},
opacity ${Ut.motionDurationSlow} ${Ut.motionEaseInOut},
transform ${Ut.motionDurationSlow} ${Ut.motionEaseInOut} !important`,[`&${en}-appear, &${en}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${en}-leave-active`]:{transform:"translateY(-5px)"}}}}};const ee=Ut=>({legend:{display:"block",width:"100%",marginBottom:Ut.marginLG,padding:0,color:Ut.colorTextDescription,fontSize:Ut.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${Ut.lineWidth}px ${Ut.lineType} ${Ut.colorBorder}`},label:{fontSize:Ut.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 ${Ut.controlOutlineWidth}px ${Ut.controlOutline}`},output:{display:"block",paddingTop:15,color:Ut.colorText,fontSize:Ut.fontSize,lineHeight:Ut.lineHeight}}),ae=(Ut,xn)=>{const{formItemCls:jn}=Ut;return{[jn]:{[`${jn}-label > label`]:{height:xn},[`${jn}-control-input`]:{minHeight:xn}}}},re=Ut=>{const{componentCls:xn}=Ut;return{[Ut.componentCls]:Object.assign(Object.assign(Object.assign({},(0,Ce.Wf)(Ut)),ee(Ut)),{[`${xn}-text`]:{display:"inline-block",paddingInlineEnd:Ut.paddingSM},"&-small":Object.assign({},ae(Ut,Ut.controlHeightSM)),"&-large":Object.assign({},ae(Ut,Ut.controlHeightLG))})}},le=Ut=>{const{formItemCls:xn,iconCls:jn,componentCls:en,rootPrefixCls:Gt,labelRequiredMarkColor:Cn,labelColor:Gn,labelFontSize:ir,labelHeight:Pn,labelColonMarginInlineStart:Yt,labelColonMarginInlineEnd:zn,itemMarginBottom:Qn}=Ut;return{[xn]:Object.assign(Object.assign({},(0,Ce.Wf)(Ut)),{marginBottom:Qn,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
&-hidden.${Gt}-row`]:{display:"none"},"&-has-warning":{[`${xn}-split`]:{color:Ut.colorError}},"&-has-error":{[`${xn}-split`]:{color:Ut.colorWarning}},[`${xn}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${Ut.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:Pn,color:Gn,fontSize:ir,[`> ${jn}`]:{fontSize:Ut.fontSize,verticalAlign:"top"},[`&${xn}-required:not(${xn}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:Ut.marginXXS,color:Cn,fontSize:Ut.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${en}-hide-required-mark &`]:{display:"none"}},[`${xn}-optional`]:{display:"inline-block",marginInlineStart:Ut.marginXXS,color:Ut.colorTextDescription,[`${en}-hide-required-mark &`]:{display:"none"}},[`${xn}-tooltip`]:{color:Ut.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:Ut.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:Yt,marginInlineEnd:zn},[`&${xn}-no-colon::after`]:{content:'"\\a0"'}}},[`${xn}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${Gt}-col-'"]):not([class*="' ${Gt}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:Ut.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[xn]:{"&-explain, &-extra":{clear:"both",color:Ut.colorTextDescription,fontSize:Ut.fontSize,lineHeight:Ut.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:Ut.controlHeightSM,transition:`color ${Ut.motionDurationMid} ${Ut.motionEaseOut}`},"&-explain":{"&-error":{color:Ut.colorError},"&-warning":{color:Ut.colorWarning}}},[`&-with-help ${xn}-explain`]:{height:"auto",opacity:1},[`${xn}-feedback-icon`]:{fontSize:Ut.fontSize,textAlign:"center",visibility:"visible",animationName:ye.kr,animationDuration:Ut.motionDurationMid,animationTimingFunction:Ut.motionEaseOutBack,pointerEvents:"none","&-success":{color:Ut.colorSuccess},"&-error":{color:Ut.colorError},"&-warning":{color:Ut.colorWarning},"&-validating":{color:Ut.colorPrimary}}})}},ue=Ut=>{const{componentCls:xn,formItemCls:jn}=Ut;return{[`${xn}-horizontal`]:{[`${jn}-label`]:{flexGrow:0},[`${jn}-control`]:{flex:"1 1 0",minWidth:0},[`${jn}-label[class$='-24'], ${jn}-label[class*='-24 ']`]:{[`& + ${jn}-control`]:{minWidth:"unset"}}}}},pe=Ut=>{const{componentCls:xn,formItemCls:jn}=Ut;return{[`${xn}-inline`]:{display:"flex",flexWrap:"wrap",[jn]:{flex:"none",marginInlineEnd:Ut.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${jn}-label,
> ${jn}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${jn}-label`]:{flex:"none"},[`${xn}-text`]:{display:"inline-block"},[`${jn}-has-feedback`]:{display:"inline-block"}}}}},Ee=Ut=>({padding:Ut.verticalLabelPadding,margin:Ut.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),Pe=Ut=>{const{componentCls:xn,formItemCls:jn,rootPrefixCls:en}=Ut;return{[`${jn} ${jn}-label`]:Ee(Ut),[xn]:{[jn]:{flexWrap:"wrap",[`${jn}-label, ${jn}-control`]:{[`&:not([class*=" ${en}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},Ie=Ut=>{const{componentCls:xn,formItemCls:jn,rootPrefixCls:en}=Ut;return{[`${xn}-vertical`]:{[jn]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${xn}-item-control`]:{width:"100%"}}},[`${xn}-vertical ${jn}-label,
.${en}-col-24${jn}-label,
.${en}-col-xl-24${jn}-label`]:Ee(Ut),[`@media (max-width: ${Ut.screenXSMax}px)`]:[Pe(Ut),{[xn]:{[`.${en}-col-xs-24${jn}-label`]:Ee(Ut)}}],[`@media (max-width: ${Ut.screenSMMax}px)`]:{[xn]:{[`.${en}-col-sm-24${jn}-label`]:Ee(Ut)}},[`@media (max-width: ${Ut.screenMDMax}px)`]:{[xn]:{[`.${en}-col-md-24${jn}-label`]:Ee(Ut)}},[`@media (max-width: ${Ut.screenLGMax}px)`]:{[xn]:{[`.${en}-col-lg-24${jn}-label`]:Ee(Ut)}}}},ke=(Ut,xn)=>(0,me.TS)(Ut,{formItemCls:`${Ut.componentCls}-item`,rootPrefixCls:xn});var Ae=(0,xe.Z)("Form",(Ut,xn)=>{let{rootPrefixCls:jn}=xn;const en=ke(Ut,jn);return[re(en),le(en),z(en),ue(en),pe(en),Ie(en),(0,we.Z)(en),ye.kr]},Ut=>({labelRequiredMarkColor:Ut.colorError,labelColor:Ut.colorTextHeading,labelFontSize:Ut.fontSize,labelHeight:Ut.controlHeight,labelColonMarginInlineStart:Ut.marginXXS/2,labelColonMarginInlineEnd:Ut.marginXS,itemMarginBottom:Ut.marginLG,verticalLabelPadding:`0 0 ${Ut.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const Oe=[];function Fe(Ut,xn,jn){let en=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof Ut=="string"?Ut:`${xn}-${en}`,error:Ut,errorStatus:jn}}var Ye=Ut=>{let{help:xn,helpStatus:jn,errors:en=Oe,warnings:Gt=Oe,className:Cn,fieldId:Gn,onVisibleChanged:ir}=Ut;const{prefixCls:Pn}=je.useContext(ce.Rk),Yt=`${Pn}-item-explain`,[,zn]=Ae(Pn),Qn=(0,je.useMemo)(()=>(0,ve.Z)(Pn),[Pn]),or=be(en),rn=be(Gt),Mn=je.useMemo(()=>xn!=null?[Fe(xn,"help",jn)]:[].concat((0,rt.Z)(or.map((gn,En)=>Fe(gn,"error","error",En))),(0,rt.Z)(rn.map((gn,En)=>Fe(gn,"warning","warning",En)))),[xn,jn,or,rn]),an={};return Gn&&(an.id=`${Gn}_help`),je.createElement(Re.default,{motionDeadline:Qn.motionDeadline,motionName:`${Pn}-show-help`,visible:!!Mn.length,onVisibleChanged:ir},gn=>{const{className:En,style:pn}=gn;return je.createElement("div",Object.assign({},an,{className:ie()(Yt,En,Cn,zn),style:pn,role:"alert"}),je.createElement(Re.CSSMotionList,Object.assign({keys:Mn},(0,ve.Z)(Pn),{motionName:`${Pn}-show-help-item`,component:!1}),On=>{const{key:Dn,error:$n,errorStatus:Fn,className:Tn,style:Yn}=On;return je.createElement("div",{key:Dn,className:ie()(Tn,{[`${Yt}-${Fn}`]:Fn}),style:Yn},$n)}))})},ze=$e(95013),Xe=$e(36355),st=$e(1684),ht=$e(52946),ft=$e(19716),Lt=$e(16722);const et=["parentNode"],it="form_item";function xt(Ut){return Ut===void 0||Ut===!1?[]:Array.isArray(Ut)?Ut:[Ut]}function Et(Ut,xn){if(!Ut.length)return;const jn=Ut.join("_");return xn?`${xn}_${jn}`:et.includes(jn)?`${it}_${jn}`:jn}function Mt(Ut,xn,jn,en,Gt,Cn){let Gn=en;return Cn!==void 0?Gn=Cn:jn.validating?Gn="validating":Ut.length?Gn="error":xn.length?Gn="warning":(jn.touched||Gt&&jn.validated)&&(Gn="success"),Gn}function mt(Ut){return xt(Ut).join("_")}function pt(Ut){const[xn]=(0,ze.useForm)(),jn=je.useRef({}),en=je.useMemo(()=>Ut!=null?Ut:Object.assign(Object.assign({},xn),{__INTERNAL__:{itemRef:Gt=>Cn=>{const Gn=mt(Gt);Cn?jn.current[Gn]=Cn:delete jn.current[Gn]}},scrollToField:function(Gt){let Cn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const Gn=xt(Gt),ir=Et(Gn,en.__INTERNAL__.name),Pn=ir?document.getElementById(ir):null;Pn&&(0,Lt.Z)(Pn,Object.assign({scrollMode:"if-needed",block:"nearest"},Cn))},getFieldInstance:Gt=>{const Cn=mt(Gt);return jn.current[Cn]}}),[Ut,xn]);return[en]}var vt=$e(28726),jt=function(Ut,xn){var jn={};for(var en in Ut)Object.prototype.hasOwnProperty.call(Ut,en)&&xn.indexOf(en)<0&&(jn[en]=Ut[en]);if(Ut!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Gt=0,en=Object.getOwnPropertySymbols(Ut);Gt<en.length;Gt++)xn.indexOf(en[Gt])<0&&Object.prototype.propertyIsEnumerable.call(Ut,en[Gt])&&(jn[en[Gt]]=Ut[en[Gt]]);return jn};const At=(Ut,xn)=>{const jn=je.useContext(st.Z),{getPrefixCls:en,direction:Gt,form:Cn}=je.useContext(Xe.E_),{prefixCls:Gn,className:ir,rootClassName:Pn,size:Yt,disabled:zn=jn,form:Qn,colon:or,labelAlign:rn,labelWrap:Mn,labelCol:an,wrapperCol:gn,hideRequiredMark:En,layout:pn="horizontal",scrollToFirstError:On,requiredMark:Dn,onFinishFailed:$n,name:Fn,style:Tn,feedbackIcons:Yn}=Ut,Lr=jt(Ut,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),qr=(0,ft.Z)(Yt),Br=je.useContext(vt.Z),tn=(0,je.useMemo)(()=>Dn!==void 0?Dn:Cn&&Cn.requiredMark!==void 0?Cn.requiredMark:!En,[En,Dn,Cn]),lr=or!=null?or:Cn==null?void 0:Cn.colon,br=en("form",Gn),[ar,Qr]=Ae(br),Xr=ie()(br,`${br}-${pn}`,{[`${br}-hide-required-mark`]:tn===!1,[`${br}-rtl`]:Gt==="rtl",[`${br}-${qr}`]:qr},Qr,Cn==null?void 0:Cn.className,ir,Pn),[hi]=pt(Qn),{__INTERNAL__:Gr}=hi;Gr.name=Fn;const Tr=(0,je.useMemo)(()=>({name:Fn,labelAlign:rn,labelCol:an,labelWrap:Mn,wrapperCol:gn,vertical:pn==="vertical",colon:lr,requiredMark:tn,itemRef:Gr.itemRef,form:hi,feedbackIcons:Yn}),[Fn,rn,an,gn,pn,lr,tn,hi,Yn]);je.useImperativeHandle(xn,()=>hi);const Si=(Ki,Nn)=>{if(Ki){let gi={block:"nearest"};typeof Ki=="object"&&(gi=Ki),hi.scrollToField(Nn,gi)}},Ln=Ki=>{if($n==null||$n(Ki),Ki.errorFields.length){const Nn=Ki.errorFields[0].name;if(On!==void 0){Si(On,Nn);return}Cn&&Cn.scrollToFirstError!==void 0&&Si(Cn.scrollToFirstError,Nn)}};return ar(je.createElement(st.n,{disabled:zn},je.createElement(ht.q,{size:qr},je.createElement(ce.RV,Object.assign({},{validateMessages:Br}),je.createElement(ce.q3.Provider,{value:Tr},je.createElement(ze.default,Object.assign({id:Fn},Lr,{name:Fn,onFinishFailed:Ln,form:hi,style:Object.assign(Object.assign({},Cn==null?void 0:Cn.style),Tn),className:Xr})))))))};var Ct=je.forwardRef(At),gt=$e(12383),tt=$e(20475),bt=$e(92343),Ke=$e(38298);function ut(Ut){if(typeof Ut=="function")return Ut;const xn=(0,Ke.Z)(Ut);return xn.length<=1?xn[0]:xn}const wt=()=>{const{status:Ut,errors:xn=[],warnings:jn=[]}=(0,je.useContext)(ce.aM);return{status:Ut,errors:xn,warnings:jn}};wt.Context=ce.aM;var yt=wt,lt=$e(23073);function Qe(Ut){const[xn,jn]=je.useState(Ut),en=(0,je.useRef)(null),Gt=(0,je.useRef)([]),Cn=(0,je.useRef)(!1);je.useEffect(()=>(Cn.current=!1,()=>{Cn.current=!0,lt.Z.cancel(en.current),en.current=null}),[]);function Gn(ir){Cn.current||(en.current===null&&(Gt.current=[],en.current=(0,lt.Z)(()=>{en.current=null,jn(Pn=>{let Yt=Pn;return Gt.current.forEach(zn=>{Yt=zn(Yt)}),Yt})})),Gt.current.push(ir))}return[xn,Gn]}function We(){const{itemRef:Ut}=je.useContext(ce.q3),xn=je.useRef({});function jn(en,Gt){const Cn=Gt&&typeof Gt=="object"&&Gt.ref,Gn=en.join("_");return(xn.current.name!==Gn||xn.current.originRef!==Cn)&&(xn.current.name=Gn,xn.current.originRef=Cn,xn.current.ref=(0,tt.sQ)(Ut(en),Cn)),xn.current.ref}return jn}var Ue=$e(48886),qe=$e(28800),He=$e(64002),De=$e(27382),Le=$e(37028);const Ve=Ut=>{const{formItemCls:xn}=Ut;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${xn}-control`]:{display:"flex"}}}};var dt=(0,xe.b)(["Form","item-item"],(Ut,xn)=>{let{rootPrefixCls:jn}=xn;const en=ke(Ut,jn);return[Ve(en)]}),Tt=Ut=>{const{prefixCls:xn,status:jn,wrapperCol:en,children:Gt,errors:Cn,warnings:Gn,_internalItemRender:ir,extra:Pn,help:Yt,fieldId:zn,marginBottom:Qn,onErrorVisibleChanged:or}=Ut,rn=`${xn}-item`,Mn=je.useContext(ce.q3),an=en||Mn.wrapperCol||{},gn=ie()(`${rn}-control`,an.className),En=je.useMemo(()=>Object.assign({},Mn),[Mn]);delete En.labelCol,delete En.wrapperCol;const pn=je.createElement("div",{className:`${rn}-control-input`},je.createElement("div",{className:`${rn}-control-input-content`},Gt)),On=je.useMemo(()=>({prefixCls:xn,status:jn}),[xn,jn]),Dn=Qn!==null||Cn.length||Gn.length?je.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},je.createElement(ce.Rk.Provider,{value:On},je.createElement(Ye,{fieldId:zn,errors:Cn,warnings:Gn,help:Yt,helpStatus:jn,className:`${rn}-explain-connected`,onVisibleChanged:or})),!!Qn&&je.createElement("div",{style:{width:0,height:Qn}})):null,$n={};zn&&($n.id=`${zn}_extra`);const Fn=Pn?je.createElement("div",Object.assign({},$n,{className:`${rn}-extra`}),Pn):null,Tn=ir&&ir.mark==="pro_table_render"&&ir.render?ir.render(Ut,{input:pn,errorList:Dn,extra:Fn}):je.createElement(je.Fragment,null,pn,Dn,Fn);return je.createElement(ce.q3.Provider,{value:En},je.createElement(Le.Z,Object.assign({},an,{className:gn}),Tn),je.createElement(dt,{prefixCls:xn}))},_t=$e(86902),Qt=$e(31724),kt=$e(9763),Nt=$e(6848),Zt=function(Ut,xn){var jn={};for(var en in Ut)Object.prototype.hasOwnProperty.call(Ut,en)&&xn.indexOf(en)<0&&(jn[en]=Ut[en]);if(Ut!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Gt=0,en=Object.getOwnPropertySymbols(Ut);Gt<en.length;Gt++)xn.indexOf(en[Gt])<0&&Object.prototype.propertyIsEnumerable.call(Ut,en[Gt])&&(jn[en[Gt]]=Ut[en[Gt]]);return jn};function on(Ut){return Ut?typeof Ut=="object"&&!je.isValidElement(Ut)?Ut:{title:Ut}:null}var kn=Ut=>{let{prefixCls:xn,label:jn,htmlFor:en,labelCol:Gt,labelAlign:Cn,colon:Gn,required:ir,requiredMark:Pn,tooltip:Yt}=Ut;var zn;const[Qn]=(0,kt.Z)("Form"),{vertical:or,labelAlign:rn,labelCol:Mn,labelWrap:an,colon:gn}=je.useContext(ce.q3);if(!jn)return null;const En=Gt||Mn||{},pn=Cn||rn,On=`${xn}-item-label`,Dn=ie()(On,pn==="left"&&`${On}-left`,En.className,{[`${On}-wrap`]:!!an});let $n=jn;const Fn=Gn===!0||gn!==!1&&Gn!==!1;Fn&&!or&&typeof jn=="string"&&jn.trim()!==""&&($n=jn.replace(/[:|]\s*$/,""));const Yn=on(Yt);if(Yn){const{icon:tn=je.createElement(_t.Z,null)}=Yn,lr=Zt(Yn,["icon"]),br=je.createElement(Nt.Z,Object.assign({},lr),je.cloneElement(tn,{className:`${xn}-item-tooltip`,title:""}));$n=je.createElement(je.Fragment,null,$n,br)}const Lr=Pn==="optional",qr=typeof Pn=="function";qr?$n=Pn($n,{required:!!ir}):Lr&&!ir&&($n=je.createElement(je.Fragment,null,$n,je.createElement("span",{className:`${xn}-item-optional`,title:""},(Qn==null?void 0:Qn.optional)||((zn=Qt.Z.Form)===null||zn===void 0?void 0:zn.optional))));const Br=ie()({[`${xn}-item-required`]:ir,[`${xn}-item-required-mark-optional`]:Lr||qr,[`${xn}-item-no-colon`]:!Fn});return je.createElement(Le.Z,Object.assign({},En,{className:Dn}),je.createElement("label",{htmlFor:en,className:Br,title:typeof jn=="string"?jn:""},$n))},Kn=$e(79999),Xn=$e(33130),pr=$e(85404),dr=$e(50023);const vr={success:Kn.Z,warning:pr.Z,error:Xn.Z,validating:dr.Z};function Sr(Ut){let{children:xn,errors:jn,warnings:en,hasFeedback:Gt,validateStatus:Cn,prefixCls:Gn,meta:ir,noStyle:Pn}=Ut;const Yt=`${Gn}-item`,{feedbackIcons:zn}=je.useContext(ce.q3),Qn=Mt(jn,en,ir,null,!!Gt,Cn),{isFormItemInput:or,status:rn}=je.useContext(ce.aM),Mn=je.useMemo(()=>{var an;let gn;if(Gt){const On=Gt!==!0&&Gt.icons||zn,Dn=Qn&&((an=On==null?void 0:On({status:Qn,errors:jn,warnings:en}))===null||an===void 0?void 0:an[Qn]),$n=Qn&&vr[Qn];gn=Dn!==!1&&$n?je.createElement("span",{className:ie()(`${Yt}-feedback-icon`,`${Yt}-feedback-icon-${Qn}`)},Dn||je.createElement($n,null)):null}let En=!0,pn=Qn||"";return Pn&&(En=or,pn=(Qn!=null?Qn:rn)||""),{status:pn,errors:jn,warnings:en,hasFeedback:!!Gt,feedbackIcon:gn,isFormItemInput:En}},[Qn,Gt,Pn,or,rn]);return je.createElement(ce.aM.Provider,{value:Mn},xn)}var Fr=function(Ut,xn){var jn={};for(var en in Ut)Object.prototype.hasOwnProperty.call(Ut,en)&&xn.indexOf(en)<0&&(jn[en]=Ut[en]);if(Ut!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Gt=0,en=Object.getOwnPropertySymbols(Ut);Gt<en.length;Gt++)xn.indexOf(en[Gt])<0&&Object.prototype.propertyIsEnumerable.call(Ut,en[Gt])&&(jn[en[Gt]]=Ut[en[Gt]]);return jn};function li(Ut){const{prefixCls:xn,className:jn,rootClassName:en,style:Gt,help:Cn,errors:Gn,warnings:ir,validateStatus:Pn,meta:Yt,hasFeedback:zn,hidden:Qn,children:or,fieldId:rn,required:Mn,isRequired:an,onSubItemMetaChange:gn}=Ut,En=Fr(Ut,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),pn=`${xn}-item`,{requiredMark:On}=je.useContext(ce.q3),Dn=je.useRef(null),$n=be(Gn),Fn=be(ir),Tn=Cn!=null,Yn=!!(Tn||Gn.length||ir.length),Lr=!!Dn.current&&(0,Ue.Z)(Dn.current),[qr,Br]=je.useState(null);(0,qe.Z)(()=>{if(Yn&&Dn.current){const Qr=getComputedStyle(Dn.current);Br(parseInt(Qr.marginBottom,10))}},[Yn,Lr]);const tn=Qr=>{Qr||Br(null)},br=function(){let Qr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Xr=Qr?$n:Yt.errors,hi=Qr?Fn:Yt.warnings;return Mt(Xr,hi,Yt,"",!!zn,Pn)}(),ar=ie()(pn,jn,en,{[`${pn}-with-help`]:Tn||$n.length||Fn.length,[`${pn}-has-feedback`]:br&&zn,[`${pn}-has-success`]:br==="success",[`${pn}-has-warning`]:br==="warning",[`${pn}-has-error`]:br==="error",[`${pn}-is-validating`]:br==="validating",[`${pn}-hidden`]:Qn});return je.createElement("div",{className:ar,style:Gt,ref:Dn},je.createElement(De.Z,Object.assign({className:`${pn}-row`},(0,He.Z)(En,["_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"])),je.createElement(kn,Object.assign({htmlFor:rn},Ut,{requiredMark:On,required:Mn!=null?Mn:an,prefixCls:xn})),je.createElement(Tt,Object.assign({},Ut,Yt,{errors:$n,warnings:Fn,prefixCls:xn,status:br,help:Cn,marginBottom:qr,onErrorVisibleChanged:tn}),je.createElement(ce.qI.Provider,{value:gn},je.createElement(Sr,{prefixCls:xn,meta:Yt,errors:Yt.errors,warnings:Yt.warnings,hasFeedback:zn,validateStatus:br},or)))),!!qr&&je.createElement("div",{className:`${pn}-margin-offset`,style:{marginBottom:-qr}}))}const Er="__SPLIT__",xi=null,Cr=je.memo(Ut=>{let{children:xn}=Ut;return xn},(Ut,xn)=>Ut.value===xn.value&&Ut.update===xn.update&&Ut.childProps.length===xn.childProps.length&&Ut.childProps.every((jn,en)=>jn===xn.childProps[en]));function ot(Ut){return Ut!=null}function di(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Yr(Ut){const{name:xn,noStyle:jn,className:en,dependencies:Gt,prefixCls:Cn,shouldUpdate:Gn,rules:ir,children:Pn,required:Yt,label:zn,messageVariables:Qn,trigger:or="onChange",validateTrigger:rn,hidden:Mn,help:an}=Ut,{getPrefixCls:gn}=je.useContext(Xe.E_),{name:En}=je.useContext(ce.q3),pn=ut(Pn),On=typeof pn=="function",Dn=je.useContext(ce.qI),{validateTrigger:$n}=je.useContext(ze.FieldContext),Fn=rn!==void 0?rn:$n,Tn=ot(xn),Yn=gn("form",Cn),[Lr,qr]=Ae(Yn),Br=je.useContext(ze.ListContext),tn=je.useRef(),[lr,br]=Qe({}),[ar,Qr]=(0,gt.Z)(()=>di()),Xr=Nn=>{const gi=Br==null?void 0:Br.getKey(Nn.name);if(Qr(Nn.destroy?di():Nn,!0),jn&&an!==!1&&Dn){let xo=Nn.name;if(Nn.destroy)xo=tn.current||xo;else if(gi!==void 0){const[Mi,Go]=gi;xo=[Mi].concat((0,rt.Z)(Go)),tn.current=xo}Dn(Nn,xo)}},hi=(Nn,gi)=>{br(xo=>{const Mi=Object.assign({},xo),po=[].concat((0,rt.Z)(Nn.name.slice(0,-1)),(0,rt.Z)(gi)).join(Er);return Nn.destroy?delete Mi[po]:Mi[po]=Nn,Mi})},[Gr,Tr]=je.useMemo(()=>{const Nn=(0,rt.Z)(ar.errors),gi=(0,rt.Z)(ar.warnings);return Object.values(lr).forEach(xo=>{Nn.push.apply(Nn,(0,rt.Z)(xo.errors||[])),gi.push.apply(gi,(0,rt.Z)(xo.warnings||[]))}),[Nn,gi]},[lr,ar.errors,ar.warnings]),Si=We();function Ln(Nn,gi,xo){return jn&&!Mn?je.createElement(Sr,{prefixCls:Yn,hasFeedback:Ut.hasFeedback,validateStatus:Ut.validateStatus,meta:ar,errors:Gr,warnings:Tr,noStyle:!0},Nn):je.createElement(li,Object.assign({key:"row"},Ut,{className:ie()(en,qr),prefixCls:Yn,fieldId:gi,isRequired:xo,errors:Gr,warnings:Tr,meta:ar,onSubItemMetaChange:hi}),Nn)}if(!Tn&&!On&&!Gt)return Lr(Ln(pn));let Ki={};return typeof zn=="string"?Ki.label=zn:xn&&(Ki.label=String(xn)),Qn&&(Ki=Object.assign(Object.assign({},Ki),Qn)),Lr(je.createElement(ze.Field,Object.assign({},Ut,{messageVariables:Ki,trigger:or,validateTrigger:Fn,onMetaChange:Xr}),(Nn,gi,xo)=>{const Mi=xt(xn).length&&gi?gi.name:[],Go=Et(Mi,En),po=Yt!==void 0?Yt:!!(ir&&ir.some(Li=>{if(Li&&typeof Li=="object"&&Li.required&&!Li.warningOnly)return!0;if(typeof Li=="function"){const _i=Li(xo);return _i&&_i.required&&!_i.warningOnly}return!1})),Wr=Object.assign({},Nn);let Hr=null;if(Array.isArray(pn)&&Tn)Hr=pn;else if(!(On&&(!(Gn||Gt)||Tn))){if(!(Gt&&!On&&!Tn))if((0,bt.l$)(pn)){const Li=Object.assign(Object.assign({},pn.props),Wr);if(Li.id||(Li.id=Go),an||Gr.length>0||Tr.length>0||Ut.extra){const It=[];(an||Gr.length>0)&&It.push(`${Go}_help`),Ut.extra&&It.push(`${Go}_extra`),Li["aria-describedby"]=It.join(" ")}Gr.length>0&&(Li["aria-invalid"]="true"),po&&(Li["aria-required"]="true"),(0,tt.Yr)(pn)&&(Li.ref=Si(Mi,pn)),new Set([].concat((0,rt.Z)(xt(or)),(0,rt.Z)(xt(Fn)))).forEach(It=>{Li[It]=function(){for(var Ei,Kr,Nr,Wi,Ur,jr=arguments.length,wi=new Array(jr),Vi=0;Vi<jr;Vi++)wi[Vi]=arguments[Vi];(Nr=Wr[It])===null||Nr===void 0||(Ei=Nr).call.apply(Ei,[Wr].concat(wi)),(Ur=(Wi=pn.props)[It])===null||Ur===void 0||(Kr=Ur).call.apply(Kr,[Wi].concat(wi))}});const ur=[Li["aria-required"],Li["aria-invalid"],Li["aria-describedby"]];Hr=je.createElement(Cr,{value:Wr[Ut.valuePropName||"value"],update:pn,childProps:ur},(0,bt.Tm)(pn,Li))}else On&&(Gn||Gt)&&!Tn?Hr=pn(xo):Hr=pn}return Ln(Hr,Go,po)}))}const Ri=Yr;Ri.useStatus=yt;var hr=Ri,Ir=function(Ut,xn){var jn={};for(var en in Ut)Object.prototype.hasOwnProperty.call(Ut,en)&&xn.indexOf(en)<0&&(jn[en]=Ut[en]);if(Ut!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Gt=0,en=Object.getOwnPropertySymbols(Ut);Gt<en.length;Gt++)xn.indexOf(en[Gt])<0&&Object.prototype.propertyIsEnumerable.call(Ut,en[Gt])&&(jn[en[Gt]]=Ut[en[Gt]]);return jn},yi=Ut=>{var{prefixCls:xn,children:jn}=Ut,en=Ir(Ut,["prefixCls","children"]);const{getPrefixCls:Gt}=je.useContext(Xe.E_),Cn=Gt("form",xn),Gn=je.useMemo(()=>({prefixCls:Cn,status:"error"}),[Cn]);return je.createElement(ze.List,Object.assign({},en),(ir,Pn,Yt)=>je.createElement(ce.Rk.Provider,{value:Gn},jn(ir.map(zn=>Object.assign(Object.assign({},zn),{fieldKey:zn.key})),Pn,{errors:Yt.errors,warnings:Yt.warnings})))};function dn(){const{form:Ut}=(0,je.useContext)(ce.q3);return Ut}const mn=Ct;mn.Item=hr,mn.List=yi,mn.ErrorList=Ye,mn.useForm=pt,mn.useFormInstance=dn,mn.useWatch=ze.useWatch,mn.Provider=ce.RV,mn.create=()=>{};var un=mn},8628:function(bn,ln,$e){"use strict";var rt=$e(59301),St=$e(28800),ie=$e(56762),Re=$e(69507);function je(){let ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const ce=(0,rt.useRef)({}),be=(0,ie.Z)(),Ce=(0,Re.ZP)();return(0,St.Z)(()=>{const ye=Ce.subscribe(we=>{ce.current=we,ve&&be()});return()=>Ce.unsubscribe(ye)},[]),ce.current}ln.Z=je},9432:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return le},n:function(){return ae}});var rt=$e(33130),St=$e(92310),ie=$e.n(St),Re=$e(93681),je=$e(20475),ve=$e(59301),ce=$e(19080),be=$e(36355),Ce=$e(1684),ye=$e(19716),we=$e(32441),me=$e(33234),xe=$e(59412),fe=$e(9937);function z(ue){return!!(ue.prefix||ue.suffix||ue.allowClear)}var ee=function(ue,pe){var Ee={};for(var Pe in ue)Object.prototype.hasOwnProperty.call(ue,Pe)&&pe.indexOf(Pe)<0&&(Ee[Pe]=ue[Pe]);if(ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ie=0,Pe=Object.getOwnPropertySymbols(ue);Ie<Pe.length;Ie++)pe.indexOf(Pe[Ie])<0&&Object.prototype.propertyIsEnumerable.call(ue,Pe[Ie])&&(Ee[Pe[Ie]]=ue[Pe[Ie]]);return Ee};function ae(ue,pe){if(!ue)return;ue.focus(pe);const{cursor:Ee}=pe||{};if(Ee){const Pe=ue.value.length;switch(Ee){case"start":ue.setSelectionRange(0,0);break;case"end":ue.setSelectionRange(Pe,Pe);break;default:ue.setSelectionRange(0,Pe);break}}}var le=(0,ve.forwardRef)((ue,pe)=>{var Ee;const{prefixCls:Pe,bordered:Ie=!0,status:ke,size:Ae,disabled:Oe,onBlur:Fe,onFocus:_e,suffix:Ye,allowClear:ze,addonAfter:Xe,addonBefore:st,className:ht,style:ft,styles:Lt,rootClassName:et,onChange:it,classNames:xt}=ue,Et=ee(ue,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:Mt,direction:mt,input:pt}=ve.useContext(be.E_),vt=Mt("input",Pe),jt=(0,ve.useRef)(null),[At,Kt]=(0,fe.ZP)(vt),{compactSize:Ct,compactItemClassnames:gt}=(0,me.ri)(vt,mt),tt=(0,ye.Z)(dt=>{var Ze;return(Ze=Ae!=null?Ae:Ct)!==null&&Ze!==void 0?Ze:dt}),bt=ve.useContext(Ce.Z),Ke=Oe!=null?Oe:bt,{status:ut,hasFeedback:wt,feedbackIcon:yt}=(0,ve.useContext)(we.aM),lt=(0,ce.F)(ut,ke),Qe=z(ue)||!!wt,We=(0,ve.useRef)(Qe);(0,ve.useEffect)(()=>{var dt;Qe&&We.current,We.current=Qe},[Qe]);const Ue=(0,xe.Z)(jt,!0),qe=dt=>{Ue(),Fe==null||Fe(dt)},He=dt=>{Ue(),_e==null||_e(dt)},De=dt=>{Ue(),it==null||it(dt)},Le=(wt||Ye)&&ve.createElement(ve.Fragment,null,Ye,wt&&yt);let Ve;return typeof ze=="object"&&(ze!=null&&ze.clearIcon)?Ve=ze:ze&&(Ve={clearIcon:ve.createElement(rt.Z,null)}),At(ve.createElement(Re.default,Object.assign({ref:(0,je.sQ)(pe,jt),prefixCls:vt,autoComplete:pt==null?void 0:pt.autoComplete},Et,{disabled:Ke,onBlur:qe,onFocus:He,style:Object.assign(Object.assign({},pt==null?void 0:pt.style),ft),styles:Object.assign(Object.assign({},pt==null?void 0:pt.styles),Lt),suffix:Le,allowClear:Ve,className:ie()(ht,et,gt,pt==null?void 0:pt.className),onChange:De,addonAfter:Xe&&ve.createElement(me.BR,null,ve.createElement(we.Ux,{override:!0,status:!0},Xe)),addonBefore:st&&ve.createElement(me.BR,null,ve.createElement(we.Ux,{override:!0,status:!0},st)),classNames:Object.assign(Object.assign(Object.assign({},xt),pt==null?void 0:pt.classNames),{input:ie()({[`${vt}-sm`]:tt==="small",[`${vt}-lg`]:tt==="large",[`${vt}-rtl`]:mt==="rtl",[`${vt}-borderless`]:!Ie},!Qe&&(0,ce.Z)(vt,lt),xt==null?void 0:xt.input,(Ee=pt==null?void 0:pt.classNames)===null||Ee===void 0?void 0:Ee.input,Kt)}),classes:{affixWrapper:ie()({[`${vt}-affix-wrapper-sm`]:tt==="small",[`${vt}-affix-wrapper-lg`]:tt==="large",[`${vt}-affix-wrapper-rtl`]:mt==="rtl",[`${vt}-affix-wrapper-borderless`]:!Ie},(0,ce.Z)(`${vt}-affix-wrapper`,lt,wt),Kt),wrapper:ie()({[`${vt}-group-rtl`]:mt==="rtl"},Kt),group:ie()({[`${vt}-group-wrapper-sm`]:tt==="small",[`${vt}-group-wrapper-lg`]:tt==="large",[`${vt}-group-wrapper-rtl`]:mt==="rtl",[`${vt}-group-wrapper-disabled`]:Ke},(0,ce.Z)(`${vt}-group-wrapper`,lt,wt),Kt)}})))})},1643:function(bn,ln,$e){"use strict";var rt=$e(33130),St=$e(92310),ie=$e.n(St),Re=$e(9296),je=$e(59301),ve=$e(19080),ce=$e(36355),be=$e(1684),Ce=$e(19716),ye=$e(32441),we=$e(9432),me=$e(9937),xe=function(z,ee){var ae={};for(var re in z)Object.prototype.hasOwnProperty.call(z,re)&&ee.indexOf(re)<0&&(ae[re]=z[re]);if(z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var le=0,re=Object.getOwnPropertySymbols(z);le<re.length;le++)ee.indexOf(re[le])<0&&Object.prototype.propertyIsEnumerable.call(z,re[le])&&(ae[re[le]]=z[re[le]]);return ae};const fe=(0,je.forwardRef)((z,ee)=>{const{prefixCls:ae,bordered:re=!0,size:le,disabled:ue,status:pe,allowClear:Ee,showCount:Pe,classNames:Ie,rootClassName:ke,className:Ae}=z,Oe=xe(z,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:Fe,direction:_e}=je.useContext(ce.E_),Ye=(0,Ce.Z)(le),ze=je.useContext(be.Z),Xe=ue!=null?ue:ze,{status:st,hasFeedback:ht,feedbackIcon:ft}=je.useContext(ye.aM),Lt=(0,ve.F)(st,pe),et=je.useRef(null);je.useImperativeHandle(ee,()=>{var mt;return{resizableTextArea:(mt=et.current)===null||mt===void 0?void 0:mt.resizableTextArea,focus:pt=>{var vt,jt;(0,we.n)((jt=(vt=et.current)===null||vt===void 0?void 0:vt.resizableTextArea)===null||jt===void 0?void 0:jt.textArea,pt)},blur:()=>{var pt;return(pt=et.current)===null||pt===void 0?void 0:pt.blur()}}});const it=Fe("input",ae);let xt;typeof Ee=="object"&&(Ee!=null&&Ee.clearIcon)?xt=Ee:Ee&&(xt={clearIcon:je.createElement(rt.Z,null)});const[Et,Mt]=(0,me.ZP)(it);return Et(je.createElement(Re.default,Object.assign({},Oe,{disabled:Xe,allowClear:xt,className:ie()(Ae,ke),classes:{affixWrapper:ie()(`${it}-textarea-affix-wrapper`,{[`${it}-affix-wrapper-rtl`]:_e==="rtl",[`${it}-affix-wrapper-borderless`]:!re,[`${it}-affix-wrapper-sm`]:Ye==="small",[`${it}-affix-wrapper-lg`]:Ye==="large",[`${it}-textarea-show-count`]:Pe},(0,ve.Z)(`${it}-affix-wrapper`,Lt),Mt)},classNames:Object.assign(Object.assign({},Ie),{textarea:ie()({[`${it}-borderless`]:!re,[`${it}-sm`]:Ye==="small",[`${it}-lg`]:Ye==="large"},(0,ve.Z)(it,Lt),Mt,Ie==null?void 0:Ie.textarea)}),prefixCls:it,suffix:ht&&je.createElement("span",{className:`${it}-textarea-suffix`},ft),showCount:Pe,ref:et})))});ln.Z=fe},59412:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return St}});var rt=$e(59301);function St(ie,Re){const je=(0,rt.useRef)([]),ve=()=>{je.current.push(setTimeout(()=>{var ce,be,Ce,ye;!((ce=ie.current)===null||ce===void 0)&&ce.input&&((be=ie.current)===null||be===void 0?void 0:be.input.getAttribute("type"))==="password"&&(!((Ce=ie.current)===null||Ce===void 0)&&Ce.input.hasAttribute("value"))&&((ye=ie.current)===null||ye===void 0||ye.input.removeAttribute("value"))}))};return(0,rt.useEffect)(()=>(Re&&ve(),()=>je.current.forEach(ce=>{ce&&clearTimeout(ce)})),[]),ve}},92832:function(bn,ln,$e){"use strict";$e.d(ln,{default:function(){return Ye}});var rt=$e(92310),St=$e.n(rt),ie=$e(59301),Re=$e(36355),je=$e(32441),ve=$e(9937),be=ze=>{const{getPrefixCls:Xe,direction:st}=(0,ie.useContext)(Re.E_),{prefixCls:ht,className:ft}=ze,Lt=Xe("input-group",ht),et=Xe("input"),[it,xt]=(0,ve.ZP)(et),Et=St()(Lt,{[`${Lt}-lg`]:ze.size==="large",[`${Lt}-sm`]:ze.size==="small",[`${Lt}-compact`]:ze.compact,[`${Lt}-rtl`]:st==="rtl"},xt,ft),Mt=(0,ie.useContext)(je.aM),mt=(0,ie.useMemo)(()=>Object.assign(Object.assign({},Mt),{isFormItemInput:!1}),[Mt]);return it(ie.createElement("span",{className:Et,style:ze.style,onMouseEnter:ze.onMouseEnter,onMouseLeave:ze.onMouseLeave,onFocus:ze.onFocus,onBlur:ze.onBlur},ie.createElement(je.aM.Provider,{value:mt},ze.children)))},Ce=$e(9432),ye=$e(61441),we=$e(30631),me=$e(64002),xe=$e(20475),fe=$e(59412),z=function(ze,Xe){var st={};for(var ht in ze)Object.prototype.hasOwnProperty.call(ze,ht)&&Xe.indexOf(ht)<0&&(st[ht]=ze[ht]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ft=0,ht=Object.getOwnPropertySymbols(ze);ft<ht.length;ft++)Xe.indexOf(ht[ft])<0&&Object.prototype.propertyIsEnumerable.call(ze,ht[ft])&&(st[ht[ft]]=ze[ht[ft]]);return st};const ee=ze=>ze?ie.createElement(we.Z,null):ie.createElement(ye.Z,null),ae={click:"onClick",hover:"onMouseOver"};var le=ie.forwardRef((ze,Xe)=>{const{visibilityToggle:st=!0}=ze,ht=typeof st=="object"&&st.visible!==void 0,[ft,Lt]=(0,ie.useState)(()=>ht?st.visible:!1),et=(0,ie.useRef)(null);ie.useEffect(()=>{ht&&Lt(st.visible)},[ht,st]);const it=(0,fe.Z)(et),xt=()=>{const{disabled:Ke}=ze;Ke||(ft&&it(),Lt(ut=>{var wt;const yt=!ut;return typeof st=="object"&&((wt=st.onVisibleChange)===null||wt===void 0||wt.call(st,yt)),yt}))},Et=Ke=>{const{action:ut="click",iconRender:wt=ee}=ze,yt=ae[ut]||"",lt=wt(ft),Qe={[yt]:xt,className:`${Ke}-icon`,key:"passwordIcon",onMouseDown:We=>{We.preventDefault()},onMouseUp:We=>{We.preventDefault()}};return ie.cloneElement(ie.isValidElement(lt)?lt:ie.createElement("span",null,lt),Qe)},{className:Mt,prefixCls:mt,inputPrefixCls:pt,size:vt}=ze,jt=z(ze,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:At}=ie.useContext(Re.E_),Kt=At("input",pt),Ct=At("input-password",mt),gt=st&&Et(Ct),tt=St()(Ct,Mt,{[`${Ct}-${vt}`]:!!vt}),bt=Object.assign(Object.assign({},(0,me.Z)(jt,["suffix","iconRender","visibilityToggle"])),{type:ft?"text":"password",className:tt,prefixCls:Kt,suffix:gt});return vt&&(bt.size=vt),ie.createElement(Ce.Z,Object.assign({ref:(0,xe.sQ)(Xe,et)},bt))}),ue=$e(21970),pe=$e(92343),Ee=$e(3113),Pe=$e(19716),Ie=$e(33234),ke=function(ze,Xe){var st={};for(var ht in ze)Object.prototype.hasOwnProperty.call(ze,ht)&&Xe.indexOf(ht)<0&&(st[ht]=ze[ht]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ft=0,ht=Object.getOwnPropertySymbols(ze);ft<ht.length;ft++)Xe.indexOf(ht[ft])<0&&Object.prototype.propertyIsEnumerable.call(ze,ht[ft])&&(st[ht[ft]]=ze[ht[ft]]);return st},Oe=ie.forwardRef((ze,Xe)=>{const{prefixCls:st,inputPrefixCls:ht,className:ft,size:Lt,suffix:et,enterButton:it=!1,addonAfter:xt,loading:Et,disabled:Mt,onSearch:mt,onChange:pt,onCompositionStart:vt,onCompositionEnd:jt}=ze,At=ke(ze,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Kt,direction:Ct}=ie.useContext(Re.E_),gt=ie.useRef(!1),tt=Kt("input-search",st),bt=Kt("input",ht),{compactSize:Ke}=(0,Ie.ri)(tt,Ct),ut=(0,Pe.Z)(Tt=>{var _t;return(_t=Lt!=null?Lt:Ke)!==null&&_t!==void 0?_t:Tt}),wt=ie.useRef(null),yt=Tt=>{Tt&&Tt.target&&Tt.type==="click"&&mt&&mt(Tt.target.value,Tt,{source:"clear"}),pt&&pt(Tt)},lt=Tt=>{var _t;document.activeElement===((_t=wt.current)===null||_t===void 0?void 0:_t.input)&&Tt.preventDefault()},Qe=Tt=>{var _t,Qt;mt&&mt((Qt=(_t=wt.current)===null||_t===void 0?void 0:_t.input)===null||Qt===void 0?void 0:Qt.value,Tt,{source:"input"})},We=Tt=>{gt.current||Et||Qe(Tt)},Ue=typeof it=="boolean"?ie.createElement(ue.Z,null):null,qe=`${tt}-button`;let He;const De=it||{},Le=De.type&&De.type.__ANT_BUTTON===!0;Le||De.type==="button"?He=(0,pe.Tm)(De,Object.assign({onMouseDown:lt,onClick:Tt=>{var _t,Qt;(Qt=(_t=De==null?void 0:De.props)===null||_t===void 0?void 0:_t.onClick)===null||Qt===void 0||Qt.call(_t,Tt),Qe(Tt)},key:"enterButton"},Le?{className:qe,size:ut}:{})):He=ie.createElement(Ee.ZP,{className:qe,type:it?"primary":void 0,size:ut,disabled:Mt,key:"enterButton",onMouseDown:lt,onClick:Qe,loading:Et,icon:Ue},it),xt&&(He=[He,(0,pe.Tm)(xt,{key:"addonAfter"})]);const Ve=St()(tt,{[`${tt}-rtl`]:Ct==="rtl",[`${tt}-${ut}`]:!!ut,[`${tt}-with-button`]:!!it},ft),dt=Tt=>{gt.current=!0,vt==null||vt(Tt)},Ze=Tt=>{gt.current=!1,jt==null||jt(Tt)};return ie.createElement(Ce.Z,Object.assign({ref:(0,xe.sQ)(wt,Xe),onPressEnter:We},At,{size:ut,onCompositionStart:dt,onCompositionEnd:Ze,prefixCls:bt,addonAfter:He,suffix:et,onChange:yt,className:Ve,disabled:Mt}))}),Fe=$e(1643);const _e=Ce.Z;_e.Group=be,_e.Search=Oe,_e.TextArea=Fe.Z,_e.Password=le;var Ye=_e},99580:function(bn,ln,$e){"use strict";$e.d(ln,{D:function(){return ue},Z:function(){return Pe}});var rt=$e(5891),St=$e(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"},Re=ie,je=$e(88853),ve=function(ke,Ae){return St.createElement(je.Z,(0,rt.Z)({},ke,{ref:Ae,icon:Re}))},ce=St.forwardRef(ve),be=ce,Ce=$e(16537),ye=$e(53878),we=$e(92310),me=$e.n(we),xe=$e(64002),z=Ie=>!isNaN(parseFloat(Ie))&&isFinite(Ie),ee=$e(36355),ae=$e(84966),re=function(Ie,ke){var Ae={};for(var Oe in Ie)Object.prototype.hasOwnProperty.call(Ie,Oe)&&ke.indexOf(Oe)<0&&(Ae[Oe]=Ie[Oe]);if(Ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Fe=0,Oe=Object.getOwnPropertySymbols(Ie);Fe<Oe.length;Fe++)ke.indexOf(Oe[Fe])<0&&Object.prototype.propertyIsEnumerable.call(Ie,Oe[Fe])&&(Ae[Oe[Fe]]=Ie[Oe[Fe]]);return Ae};const le={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},ue=St.createContext({}),pe=(()=>{let Ie=0;return function(){let ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return Ie+=1,`${ke}${Ie}`}})();var Pe=St.forwardRef((Ie,ke)=>{const{prefixCls:Ae,className:Oe,trigger:Fe,children:_e,defaultCollapsed:Ye=!1,theme:ze="dark",style:Xe={},collapsible:st=!1,reverseArrow:ht=!1,width:ft=200,collapsedWidth:Lt=80,zeroWidthTriggerStyle:et,breakpoint:it,onCollapse:xt,onBreakpoint:Et}=Ie,Mt=re(Ie,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:mt}=(0,St.useContext)(ae.Gs),[pt,vt]=(0,St.useState)("collapsed"in Ie?Ie.collapsed:Ye),[jt,At]=(0,St.useState)(!1);(0,St.useEffect)(()=>{"collapsed"in Ie&&vt(Ie.collapsed)},[Ie.collapsed]);const Kt=(ut,wt)=>{"collapsed"in Ie||vt(ut),xt==null||xt(ut,wt)},Ct=(0,St.useRef)();Ct.current=ut=>{At(ut.matches),Et==null||Et(ut.matches),pt!==ut.matches&&Kt(ut.matches,"responsive")},(0,St.useEffect)(()=>{function ut(yt){return Ct.current(yt)}let wt;if(typeof window!="undefined"){const{matchMedia:yt}=window;if(yt&&it&&it in le){wt=yt(`(max-width: ${le[it]})`);try{wt.addEventListener("change",ut)}catch(lt){wt.addListener(ut)}ut(wt)}}return()=>{try{wt==null||wt.removeEventListener("change",ut)}catch(yt){wt==null||wt.removeListener(ut)}}},[it]),(0,St.useEffect)(()=>{const ut=pe("ant-sider-");return mt.addSider(ut),()=>mt.removeSider(ut)},[]);const gt=()=>{Kt(!pt,"clickTrigger")},{getPrefixCls:tt}=(0,St.useContext)(ee.E_),bt=()=>{const ut=tt("layout-sider",Ae),wt=(0,xe.Z)(Mt,["collapsed"]),yt=pt?Lt:ft,lt=z(yt)?`${yt}px`:String(yt),Qe=parseFloat(String(Lt||0))===0?St.createElement("span",{onClick:gt,className:me()(`${ut}-zero-width-trigger`,`${ut}-zero-width-trigger-${ht?"right":"left"}`),style:et},Fe||St.createElement(be,null)):null,qe={expanded:ht?St.createElement(ye.Z,null):St.createElement(Ce.Z,null),collapsed:ht?St.createElement(Ce.Z,null):St.createElement(ye.Z,null)}[pt?"collapsed":"expanded"],He=Fe!==null?Qe||St.createElement("div",{className:`${ut}-trigger`,onClick:gt,style:{width:lt}},Fe||qe):null,De=Object.assign(Object.assign({},Xe),{flex:`0 0 ${lt}`,maxWidth:lt,minWidth:lt,width:lt}),Le=me()(ut,`${ut}-${ze}`,{[`${ut}-collapsed`]:!!pt,[`${ut}-has-trigger`]:st&&Fe!==null&&!Qe,[`${ut}-below`]:!!jt,[`${ut}-zero-width`]:parseFloat(lt)===0},Oe);return St.createElement("aside",Object.assign({className:Le},wt,{style:De,ref:ke}),St.createElement("div",{className:`${ut}-children`},_e),st||jt&&Qe?He:null)},Ke=St.useMemo(()=>({siderCollapsed:pt}),[pt]);return St.createElement(ue.Provider,{value:Ke},bt())})},84966:function(bn,ln,$e){"use strict";$e.d(ln,{VY:function(){return ue},$_:function(){return le},h4:function(){return re},Gs:function(){return xe},ZP:function(){return pe}});var rt=$e(26390),St=$e(92310),ie=$e.n(St),Re=$e(64002),je=$e(59301),ve=$e(36355),ce=$e(83116),Ce=Ee=>{const{componentCls:Pe,bodyBg:Ie,lightSiderBg:ke,lightTriggerBg:Ae,lightTriggerColor:Oe}=Ee;return{[`${Pe}-sider-light`]:{background:ke,[`${Pe}-sider-trigger`]:{color:Oe,background:Ae},[`${Pe}-sider-zero-width-trigger`]:{color:Oe,background:Ae,border:`1px solid ${Ie}`,borderInlineStart:0}}}};const ye=Ee=>{const{antCls:Pe,componentCls:Ie,colorText:ke,triggerColor:Ae,footerBg:Oe,triggerBg:Fe,headerHeight:_e,headerPadding:Ye,headerColor:ze,footerPadding:Xe,triggerHeight:st,zeroTriggerHeight:ht,zeroTriggerWidth:ft,motionDurationMid:Lt,motionDurationSlow:et,fontSize:it,borderRadius:xt,bodyBg:Et,headerBg:Mt,siderBg:mt}=Ee;return{[Ie]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:Et,"&, *":{boxSizing:"border-box"},[`&${Ie}-has-sider`]:{flexDirection:"row",[`> ${Ie}, > ${Ie}-content`]:{width:0}},[`${Ie}-header, &${Ie}-footer`]:{flex:"0 0 auto"},[`${Ie}-sider`]:{position:"relative",minWidth:0,background:mt,transition:`all ${Lt}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${Pe}-menu${Pe}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:st},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:st,color:Ae,lineHeight:`${st}px`,textAlign:"center",background:Fe,cursor:"pointer",transition:`all ${Lt}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:_e,insetInlineEnd:-ft,zIndex:1,width:ft,height:ht,color:Ae,fontSize:Ee.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:mt,borderStartStartRadius:0,borderStartEndRadius:xt,borderEndEndRadius:xt,borderEndStartRadius:0,cursor:"pointer",transition:`background ${et} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${et}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-ft,borderStartStartRadius:xt,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:xt}}}}},Ce(Ee)),{"&-rtl":{direction:"rtl"}}),[`${Ie}-header`]:{height:_e,padding:Ye,color:ze,lineHeight:`${_e}px`,background:Mt,[`${Pe}-menu`]:{lineHeight:"inherit"}},[`${Ie}-footer`]:{padding:Xe,color:ke,fontSize:it,background:Oe},[`${Ie}-content`]:{flex:"auto",minHeight:0}}};var we=(0,ce.Z)("Layout",Ee=>[ye(Ee)],Ee=>{const{colorBgLayout:Pe,controlHeight:Ie,controlHeightLG:ke,colorText:Ae,controlHeightSM:Oe,marginXXS:Fe,colorTextLightSolid:_e,colorBgContainer:Ye}=Ee,ze=ke*1.25;return{colorBgHeader:"#001529",colorBgBody:Pe,colorBgTrigger:"#002140",bodyBg:Pe,headerBg:"#001529",headerHeight:Ie*2,headerPadding:`0 ${ze}px`,headerColor:Ae,footerPadding:`${Oe}px ${ze}px`,footerBg:Pe,siderBg:"#001529",triggerHeight:ke+Fe*2,triggerBg:"#002140",triggerColor:_e,zeroTriggerWidth:ke,zeroTriggerHeight:ke,lightSiderBg:Ye,lightTriggerBg:Ye,lightTriggerColor:Ae}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),me=function(Ee,Pe){var Ie={};for(var ke in Ee)Object.prototype.hasOwnProperty.call(Ee,ke)&&Pe.indexOf(ke)<0&&(Ie[ke]=Ee[ke]);if(Ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ae=0,ke=Object.getOwnPropertySymbols(Ee);Ae<ke.length;Ae++)Pe.indexOf(ke[Ae])<0&&Object.prototype.propertyIsEnumerable.call(Ee,ke[Ae])&&(Ie[ke[Ae]]=Ee[ke[Ae]]);return Ie};const xe=je.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function fe(Ee){let{suffixCls:Pe,tagName:Ie,displayName:ke}=Ee;return Ae=>je.forwardRef((Fe,_e)=>je.createElement(Ae,Object.assign({ref:_e,suffixCls:Pe,tagName:Ie},Fe)))}const z=je.forwardRef((Ee,Pe)=>{const{prefixCls:Ie,suffixCls:ke,className:Ae,tagName:Oe}=Ee,Fe=me(Ee,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:_e}=je.useContext(ve.E_),Ye=_e("layout",Ie),[ze,Xe]=we(Ye),st=ke?`${Ye}-${ke}`:Ye;return ze(je.createElement(Oe,Object.assign({className:ie()(Ie||st,Ae,Xe),ref:Pe},Fe)))}),ee=je.forwardRef((Ee,Pe)=>{const{direction:Ie}=je.useContext(ve.E_),[ke,Ae]=je.useState([]),{prefixCls:Oe,className:Fe,rootClassName:_e,children:Ye,hasSider:ze,tagName:Xe,style:st}=Ee,ht=me(Ee,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),ft=(0,Re.Z)(ht,["suffixCls"]),{getPrefixCls:Lt,layout:et}=je.useContext(ve.E_),it=Lt("layout",Oe),[xt,Et]=we(it),Mt=ie()(it,{[`${it}-has-sider`]:typeof ze=="boolean"?ze:ke.length>0,[`${it}-rtl`]:Ie==="rtl"},et==null?void 0:et.className,Fe,_e,Et),mt=je.useMemo(()=>({siderHook:{addSider:pt=>{Ae(vt=>[].concat((0,rt.Z)(vt),[pt]))},removeSider:pt=>{Ae(vt=>vt.filter(jt=>jt!==pt))}}}),[]);return xt(je.createElement(xe.Provider,{value:mt},je.createElement(Xe,Object.assign({ref:Pe,className:Mt,style:Object.assign(Object.assign({},et==null?void 0:et.style),st)},ft),Ye)))}),ae=fe({tagName:"div",displayName:"Layout"})(ee),re=fe({suffixCls:"header",tagName:"header",displayName:"Header"})(z),le=fe({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(z),ue=fe({suffixCls:"content",tagName:"main",displayName:"Content"})(z);var pe=ae},40875:function(bn,ln,$e){"use strict";$e.d(ln,{J:function(){return ve}});var rt=$e(59301),St=$e(33234),ie=$e(80764),Re=function(ce,be){var Ce={};for(var ye in ce)Object.prototype.hasOwnProperty.call(ce,ye)&&be.indexOf(ye)<0&&(Ce[ye]=ce[ye]);if(ce!=null&&typeof Object.getOwnPropertySymbols=="function")for(var we=0,ye=Object.getOwnPropertySymbols(ce);we<ye.length;we++)be.indexOf(ye[we])<0&&Object.prototype.propertyIsEnumerable.call(ce,ye[we])&&(Ce[ye[we]]=ce[ye[we]]);return Ce};const je=rt.createContext(null),ve=rt.forwardRef((ce,be)=>{const{children:Ce}=ce,ye=Re(ce,["children"]),we=rt.useContext(je),me=rt.useMemo(()=>Object.assign(Object.assign({},we),ye),[we,ye.prefixCls,ye.mode,ye.selectable]);return rt.createElement(je.Provider,{value:me},rt.createElement(St.BR,null,(0,ie.supportNodeRef)(Ce)?rt.cloneElement(Ce,{ref:be}):Ce))});ln.Z=je},20834:function(bn,ln,$e){"use strict";$e.d(ln,{default:function(){return Ke}});var rt=$e(22798),St=$e(59301),ie=$e(99580),Re=$e(92310),je=$e.n(Re),ve=$e(36355),ce=function(ut,wt){var yt={};for(var lt in ut)Object.prototype.hasOwnProperty.call(ut,lt)&&wt.indexOf(lt)<0&&(yt[lt]=ut[lt]);if(ut!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Qe=0,lt=Object.getOwnPropertySymbols(ut);Qe<lt.length;Qe++)wt.indexOf(lt[Qe])<0&&Object.prototype.propertyIsEnumerable.call(ut,lt[Qe])&&(yt[lt[Qe]]=ut[lt[Qe]]);return yt},Ce=ut=>{const{prefixCls:wt,className:yt,dashed:lt}=ut,Qe=ce(ut,["prefixCls","className","dashed"]),{getPrefixCls:We}=St.useContext(ve.E_),Ue=We("menu",wt),qe=je()({[`${Ue}-item-divider-dashed`]:!!lt},yt);return St.createElement(rt.iz,Object.assign({className:qe},Qe))},ye=$e(38298),we=$e(64002),me=$e(6848),xe=$e(92343),z=(0,St.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),ae=ut=>{var wt;const{className:yt,children:lt,icon:Qe,title:We,danger:Ue}=ut,{prefixCls:qe,firstLevel:He,direction:De,disableMenuItemTitleTooltip:Le,inlineCollapsed:Ve}=St.useContext(z),dt=Nt=>{const Zt=St.createElement("span",{className:`${qe}-title-content`},lt);return(!Qe||(0,xe.l$)(lt)&&lt.type==="span")&&lt&&Nt&&He&&typeof lt=="string"?St.createElement("div",{className:`${qe}-inline-collapsed-noicon`},lt.charAt(0)):Zt},{siderCollapsed:Ze}=St.useContext(ie.D);let Tt=We;typeof We=="undefined"?Tt=He?lt:"":We===!1&&(Tt="");const _t={title:Tt};!Ze&&!Ve&&(_t.title=null,_t.open=!1);const Qt=(0,ye.Z)(lt).length;let kt=St.createElement(rt.ck,Object.assign({},(0,we.Z)(ut,["title","icon","danger"]),{className:je()({[`${qe}-item-danger`]:Ue,[`${qe}-item-only-child`]:(Qe?Qt+1:Qt)===1},yt),title:typeof We=="string"?We:void 0}),(0,xe.Tm)(Qe,{className:je()((0,xe.l$)(Qe)?(wt=Qe.props)===null||wt===void 0?void 0:wt.className:"",`${qe}-item-icon`)}),dt(Ve));return Le||(kt=St.createElement(me.Z,Object.assign({},_t,{placement:De==="rtl"?"left":"right",overlayClassName:`${qe}-inline-collapsed-tooltip`}),kt)),kt},le=ut=>{var wt;const{popupClassName:yt,icon:lt,title:Qe,theme:We}=ut,Ue=St.useContext(z),{prefixCls:qe,inlineCollapsed:He,theme:De}=Ue,Le=(0,rt.Xl)();let Ve;if(!lt)Ve=He&&!Le.length&&Qe&&typeof Qe=="string"?St.createElement("div",{className:`${qe}-inline-collapsed-noicon`},Qe.charAt(0)):St.createElement("span",{className:`${qe}-title-content`},Qe);else{const Ze=(0,xe.l$)(Qe)&&Qe.type==="span";Ve=St.createElement(St.Fragment,null,(0,xe.Tm)(lt,{className:je()((0,xe.l$)(lt)?(wt=lt.props)===null||wt===void 0?void 0:wt.className:"",`${qe}-item-icon`)}),Ze?Qe:St.createElement("span",{className:`${qe}-title-content`},Qe))}const dt=St.useMemo(()=>Object.assign(Object.assign({},Ue),{firstLevel:!1}),[Ue]);return St.createElement(z.Provider,{value:dt},St.createElement(rt.Wd,Object.assign({},(0,we.Z)(ut,["icon"]),{title:Ve,popupClassName:je()(qe,yt,`${qe}-${We||De}`)})))},ue=$e(19362),pe=$e(80764),Ee=$e(62892),Pe=$e(40875),Ie=function(ut,wt){var yt={};for(var lt in ut)Object.prototype.hasOwnProperty.call(ut,lt)&&wt.indexOf(lt)<0&&(yt[lt]=ut[lt]);if(ut!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Qe=0,lt=Object.getOwnPropertySymbols(ut);Qe<lt.length;Qe++)wt.indexOf(lt[Qe])<0&&Object.prototype.propertyIsEnumerable.call(ut,lt[Qe])&&(yt[lt[Qe]]=ut[lt[Qe]]);return yt};function ke(ut){return(ut||[]).map((wt,yt)=>{if(wt&&typeof wt=="object"){const lt=wt,{label:Qe,children:We,key:Ue,type:qe}=lt,He=Ie(lt,["label","children","key","type"]),De=Ue!=null?Ue:`tmp-${yt}`;return We||qe==="group"?qe==="group"?St.createElement(rt.BW,Object.assign({key:De},He,{title:Qe}),ke(We)):St.createElement(le,Object.assign({key:De},He,{title:Qe}),ke(We)):qe==="divider"?St.createElement(Ce,Object.assign({key:De},He)):St.createElement(ae,Object.assign({key:De},He),Qe)}return null}).filter(wt=>wt)}function Ae(ut){return St.useMemo(()=>ut&&ke(ut),[ut])}var Oe=$e(64993),Fe=$e(17313),_e=$e(8378),Ye=$e(13826),ze=$e(29878),Xe=$e(83116),st=$e(37613),ft=ut=>{const{componentCls:wt,motionDurationSlow:yt,horizontalLineHeight:lt,colorSplit:Qe,lineWidth:We,lineType:Ue,itemPaddingInline:qe}=ut;return{[`${wt}-horizontal`]:{lineHeight:lt,border:0,borderBottom:`${We}px ${Ue} ${Qe}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${wt}-item, ${wt}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:qe},[`> ${wt}-item:hover,
> ${wt}-item-active,
> ${wt}-submenu ${wt}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${wt}-item, ${wt}-submenu-title`]:{transition:[`border-color ${yt}`,`background ${yt}`].join(",")},[`${wt}-submenu-arrow`]:{display:"none"}}}},et=ut=>{let{componentCls:wt,menuArrowOffset:yt}=ut;return{[`${wt}-rtl`]:{direction:"rtl"},[`${wt}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${wt}-rtl${wt}-vertical,
${wt}-submenu-rtl ${wt}-vertical`]:{[`${wt}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${yt})`},"&::after":{transform:`rotate(45deg) translateY(${yt})`}}}}};const it=ut=>Object.assign({},(0,Fe.oN)(ut));var Et=(ut,wt)=>{const{componentCls:yt,itemColor:lt,itemSelectedColor:Qe,groupTitleColor:We,itemBg:Ue,subMenuItemBg:qe,itemSelectedBg:He,activeBarHeight:De,activeBarWidth:Le,activeBarBorderWidth:Ve,motionDurationSlow:dt,motionEaseInOut:Ze,motionEaseOut:Tt,itemPaddingInline:_t,motionDurationMid:Qt,itemHoverColor:kt,lineType:Nt,colorSplit:Zt,itemDisabledColor:on,dangerItemColor:vn,dangerItemHoverColor:kn,dangerItemSelectedColor:Kn,dangerItemActiveBg:Xn,dangerItemSelectedBg:pr,itemHoverBg:dr,itemActiveBg:vr,menuSubMenuBg:Sr,horizontalItemSelectedColor:Fr,horizontalItemSelectedBg:li,horizontalItemBorderRadius:Er,horizontalItemHoverBg:xi,popupBg:Cr}=ut;return{[`${yt}-${wt}, ${yt}-${wt} > ${yt}`]:{color:lt,background:Ue,[`&${yt}-root:focus-visible`]:Object.assign({},it(ut)),[`${yt}-item-group-title`]:{color:We},[`${yt}-submenu-selected`]:{[`> ${yt}-submenu-title`]:{color:Qe}},[`${yt}-item-disabled, ${yt}-submenu-disabled`]:{color:`${on} !important`},[`${yt}-item:not(${yt}-item-selected):not(${yt}-submenu-selected)`]:{[`&:hover, > ${yt}-submenu-title:hover`]:{color:kt}},[`&:not(${yt}-horizontal)`]:{[`${yt}-item:not(${yt}-item-selected)`]:{"&:hover":{backgroundColor:dr},"&:active":{backgroundColor:vr}},[`${yt}-submenu-title`]:{"&:hover":{backgroundColor:dr},"&:active":{backgroundColor:vr}}},[`${yt}-item-danger`]:{color:vn,[`&${yt}-item:hover`]:{[`&:not(${yt}-item-selected):not(${yt}-submenu-selected)`]:{color:kn}},[`&${yt}-item:active`]:{background:Xn}},[`${yt}-item a`]:{"&, &:hover":{color:"inherit"}},[`${yt}-item-selected`]:{color:Qe,[`&${yt}-item-danger`]:{color:Kn},"a, a:hover":{color:"inherit"}},[`& ${yt}-item-selected`]:{backgroundColor:He,[`&${yt}-item-danger`]:{backgroundColor:pr}},[`${yt}-item, ${yt}-submenu-title`]:{[`&:not(${yt}-item-disabled):focus-visible`]:Object.assign({},it(ut))},[`&${yt}-submenu > ${yt}`]:{backgroundColor:Sr},[`&${yt}-popup > ${yt}`]:{backgroundColor:Cr},[`&${yt}-horizontal`]:Object.assign(Object.assign({},wt==="dark"?{borderBottom:0}:{}),{[`> ${yt}-item, > ${yt}-submenu`]:{top:Ve,marginTop:-Ve,marginBottom:0,borderRadius:Er,"&::after":{position:"absolute",insetInline:_t,bottom:0,borderBottom:`${De}px solid transparent`,transition:`border-color ${dt} ${Ze}`,content:'""'},"&:hover, &-active, &-open":{background:xi,"&::after":{borderBottomWidth:De,borderBottomColor:Fr}},"&-selected":{color:Fr,backgroundColor:li,"&:hover":{backgroundColor:li},"&::after":{borderBottomWidth:De,borderBottomColor:Fr}}}}),[`&${yt}-root`]:{[`&${yt}-inline, &${yt}-vertical`]:{borderInlineEnd:`${Ve}px ${Nt} ${Zt}`}},[`&${yt}-inline`]:{[`${yt}-sub${yt}-inline`]:{background:qe},[`${yt}-item, ${yt}-submenu-title`]:Ve&&Le?{width:`calc(100% + ${Ve}px)`}:{},[`${yt}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${Le}px solid ${Qe}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${Qt} ${Tt}`,`opacity ${Qt} ${Tt}`].join(","),content:'""'},[`&${yt}-item-danger`]:{"&::after":{borderInlineEndColor:Kn}}},[`${yt}-selected, ${yt}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${Qt} ${Ze}`,`opacity ${Qt} ${Ze}`].join(",")}}}}}};const Mt=ut=>{const{componentCls:wt,itemHeight:yt,itemMarginInline:lt,padding:Qe,menuArrowSize:We,marginXS:Ue,itemMarginBlock:qe}=ut,He=Qe+We+Ue;return{[`${wt}-item`]:{position:"relative",overflow:"hidden"},[`${wt}-item, ${wt}-submenu-title`]:{height:yt,lineHeight:`${yt}px`,paddingInline:Qe,overflow:"hidden",textOverflow:"ellipsis",marginInline:lt,marginBlock:qe,width:`calc(100% - ${lt*2}px)`},[`> ${wt}-item,
> ${wt}-submenu > ${wt}-submenu-title`]:{height:yt,lineHeight:`${yt}px`},[`${wt}-item-group-list ${wt}-submenu-title,
${wt}-submenu-title`]:{paddingInlineEnd:He}}};var pt=ut=>{const{componentCls:wt,iconCls:yt,itemHeight:lt,colorTextLightSolid:Qe,dropdownWidth:We,controlHeightLG:Ue,motionDurationMid:qe,motionEaseOut:He,paddingXL:De,itemMarginInline:Le,fontSizeLG:Ve,motionDurationSlow:dt,paddingXS:Ze,boxShadowSecondary:Tt,collapsedWidth:_t,collapsedIconSize:Qt}=ut,kt={height:lt,lineHeight:`${lt}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[wt]:{"&-inline, &-vertical":Object.assign({[`&${wt}-root`]:{boxShadow:"none"}},Mt(ut))},[`${wt}-submenu-popup`]:{[`${wt}-vertical`]:Object.assign(Object.assign({},Mt(ut)),{boxShadow:Tt})}},{[`${wt}-submenu-popup ${wt}-vertical${wt}-sub`]:{minWidth:We,maxHeight:`calc(100vh - ${Ue*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${wt}-inline`]:{width:"100%",[`&${wt}-root`]:{[`${wt}-item, ${wt}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${dt}`,`background ${dt}`,`padding ${qe} ${He}`].join(","),[`> ${wt}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${wt}-sub${wt}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${wt}-submenu > ${wt}-submenu-title`]:kt,[`& ${wt}-item-group-title`]:{paddingInlineStart:De}},[`${wt}-item`]:kt}},{[`${wt}-inline-collapsed`]:{width:_t,[`&${wt}-root`]:{[`${wt}-item, ${wt}-submenu ${wt}-submenu-title`]:{[`> ${wt}-inline-collapsed-noicon`]:{fontSize:Ve,textAlign:"center"}}},[`> ${wt}-item,
> ${wt}-item-group > ${wt}-item-group-list > ${wt}-item,
> ${wt}-item-group > ${wt}-item-group-list > ${wt}-submenu > ${wt}-submenu-title,
> ${wt}-submenu > ${wt}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${Ve/2}px - ${Le}px)`,textOverflow:"clip",[`
${wt}-submenu-arrow,
${wt}-submenu-expand-icon
`]:{opacity:0},[`${wt}-item-icon, ${yt}`]:{margin:0,fontSize:Qt,lineHeight:`${lt}px`,"+ span":{display:"inline-block",opacity:0}}},[`${wt}-item-icon, ${yt}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${wt}-item-icon, ${yt}`]:{display:"none"},"a, a:hover":{color:Qe}},[`${wt}-item-group-title`]:Object.assign(Object.assign({},Fe.vS),{paddingInline:Ze})}}]};const vt=ut=>{const{componentCls:wt,motionDurationSlow:yt,motionDurationMid:lt,motionEaseInOut:Qe,motionEaseOut:We,iconCls:Ue,iconSize:qe,iconMarginInlineEnd:He}=ut;return{[`${wt}-item, ${wt}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${yt}`,`background ${yt}`,`padding ${yt} ${Qe}`].join(","),[`${wt}-item-icon, ${Ue}`]:{minWidth:qe,fontSize:qe,transition:[`font-size ${lt} ${We}`,`margin ${yt} ${Qe}`,`color ${yt}`].join(","),"+ span":{marginInlineStart:He,opacity:1,transition:[`opacity ${yt} ${Qe}`,`margin ${yt}`,`color ${yt}`].join(",")}},[`${wt}-item-icon`]:Object.assign({},(0,Fe.Ro)()),[`&${wt}-item-only-child`]:{[`> ${Ue}, > ${wt}-item-icon`]:{marginInlineEnd:0}}},[`${wt}-item-disabled, ${wt}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${wt}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},jt=ut=>{const{componentCls:wt,motionDurationSlow:yt,motionEaseInOut:lt,borderRadius:Qe,menuArrowSize:We,menuArrowOffset:Ue}=ut;return{[`${wt}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:ut.margin,width:We,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${yt} ${lt}, opacity ${yt}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:We*.6,height:We*.15,backgroundColor:"currentcolor",borderRadius:Qe,transition:[`background ${yt} ${lt}`,`transform ${yt} ${lt}`,`top ${yt} ${lt}`,`color ${yt} ${lt}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${Ue})`},"&::after":{transform:`rotate(-45deg) translateY(${Ue})`}}}}},At=ut=>{const{antCls:wt,componentCls:yt,fontSize:lt,motionDurationSlow:Qe,motionDurationMid:We,motionEaseInOut:Ue,paddingXS:qe,padding:He,colorSplit:De,lineWidth:Le,zIndexPopup:Ve,borderRadiusLG:dt,subMenuItemBorderRadius:Ze,menuArrowSize:Tt,menuArrowOffset:_t,lineType:Qt,menuPanelMaskInset:kt,groupTitleLineHeight:Nt,groupTitleFontSize:Zt}=ut;return[{"":{[`${yt}`]:Object.assign(Object.assign({},(0,Fe.dF)()),{"&-hidden":{display:"none"}})},[`${yt}-submenu-hidden`]:{display:"none"}},{[yt]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Fe.Wf)(ut)),(0,Fe.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:lt,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${Qe} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${yt}-item`]:{flex:"none"}},[`${yt}-item, ${yt}-submenu, ${yt}-submenu-title`]:{borderRadius:ut.itemBorderRadius},[`${yt}-item-group-title`]:{padding:`${qe}px ${He}px`,fontSize:Zt,lineHeight:Nt,transition:`all ${Qe}`},[`&-horizontal ${yt}-submenu`]:{transition:[`border-color ${Qe} ${Ue}`,`background ${Qe} ${Ue}`].join(",")},[`${yt}-submenu, ${yt}-submenu-inline`]:{transition:[`border-color ${Qe} ${Ue}`,`background ${Qe} ${Ue}`,`padding ${We} ${Ue}`].join(",")},[`${yt}-submenu ${yt}-sub`]:{cursor:"initial",transition:[`background ${Qe} ${Ue}`,`padding ${Qe} ${Ue}`].join(",")},[`${yt}-title-content`]:{transition:`color ${Qe}`},[`${yt}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${yt}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:De,borderStyle:Qt,borderWidth:0,borderTopWidth:Le,marginBlock:Le,padding:0,"&-dashed":{borderStyle:"dashed"}}}),vt(ut)),{[`${yt}-item-group`]:{[`${yt}-item-group-list`]:{margin:0,padding:0,[`${yt}-item, ${yt}-submenu-title`]:{paddingInline:`${lt*2}px ${He}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:Ve,borderRadius:dt,boxShadow:"none",transformOrigin:"0 0",[`&${yt}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${kt}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:kt},"\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:ut.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:ut.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:ut.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:ut.paddingXS},[`> ${yt}`]:Object.assign(Object.assign(Object.assign({borderRadius:dt},vt(ut)),jt(ut)),{[`${yt}-item, ${yt}-submenu > ${yt}-submenu-title`]:{borderRadius:Ze},[`${yt}-submenu-title::after`]:{transition:`transform ${Qe} ${Ue}`}})}}),jt(ut)),{[`&-inline-collapsed ${yt}-submenu-arrow,
&-inline ${yt}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${_t})`},"&::after":{transform:`rotate(45deg) translateX(-${_t})`}},[`${yt}-submenu-open${yt}-submenu-inline > ${yt}-submenu-title > ${yt}-submenu-arrow`]:{transform:`translateY(-${Tt*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${_t})`},"&::before":{transform:`rotate(45deg) translateX(${_t})`}}})},{[`${wt}-layout-header`]:{[yt]:{lineHeight:"inherit"}}}]};var Kt=(ut,wt)=>(0,Xe.Z)("Menu",lt=>{if(wt===!1)return[];const{colorBgElevated:Qe,colorPrimary:We,colorTextLightSolid:Ue,controlHeightLG:qe,fontSize:He,darkItemColor:De,darkDangerItemColor:Le,darkItemBg:Ve,darkSubMenuItemBg:dt,darkItemSelectedColor:Ze,darkItemSelectedBg:Tt,darkDangerItemSelectedBg:_t,darkItemHoverBg:Qt,darkGroupTitleColor:kt,darkItemHoverColor:Nt,darkItemDisabledColor:Zt,darkDangerItemHoverColor:on,darkDangerItemSelectedColor:vn,darkDangerItemActiveBg:kn}=lt,Kn=He/7*5,Xn=(0,st.TS)(lt,{menuArrowSize:Kn,menuHorizontalHeight:qe*1.15,menuArrowOffset:`${Kn*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:Qe}),pr=(0,st.TS)(Xn,{itemColor:De,itemHoverColor:Nt,groupTitleColor:kt,itemSelectedColor:Ze,itemBg:Ve,popupBg:Ve,subMenuItemBg:dt,itemActiveBg:"transparent",itemSelectedBg:Tt,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:Qt,itemDisabledColor:Zt,dangerItemColor:Le,dangerItemHoverColor:on,dangerItemSelectedColor:vn,dangerItemActiveBg:kn,dangerItemSelectedBg:_t,menuSubMenuBg:dt,horizontalItemSelectedColor:Ue,horizontalItemSelectedBg:We});return[At(Xn),ft(Xn),pt(Xn),Et(Xn,"light"),Et(pr,"dark"),et(Xn),(0,_e.Z)(Xn),(0,Ye.oN)(Xn,"slide-up"),(0,Ye.oN)(Xn,"slide-down"),(0,ze._y)(Xn,"zoom-big")]},lt=>{const{colorPrimary:Qe,colorError:We,colorTextDisabled:Ue,colorErrorBg:qe,colorText:He,colorTextDescription:De,colorBgContainer:Le,colorFillAlter:Ve,colorFillContent:dt,lineWidth:Ze,lineWidthBold:Tt,controlItemBgActive:_t,colorBgTextHover:Qt,controlHeightLG:kt,lineHeight:Nt,colorBgElevated:Zt,marginXXS:on,padding:vn,fontSize:kn,controlHeightSM:Kn,fontSizeLG:Xn,colorTextLightSolid:pr,colorErrorHover:dr}=lt,vr=new Oe.C(pr).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:lt.zIndexPopupBase+50,radiusItem:lt.borderRadiusLG,itemBorderRadius:lt.borderRadiusLG,radiusSubMenuItem:lt.borderRadiusSM,subMenuItemBorderRadius:lt.borderRadiusSM,colorItemText:He,itemColor:He,colorItemTextHover:He,itemHoverColor:He,colorItemTextHoverHorizontal:Qe,horizontalItemHoverColor:Qe,colorGroupTitle:De,groupTitleColor:De,colorItemTextSelected:Qe,itemSelectedColor:Qe,colorItemTextSelectedHorizontal:Qe,horizontalItemSelectedColor:Qe,colorItemBg:Le,itemBg:Le,colorItemBgHover:Qt,itemHoverBg:Qt,colorItemBgActive:dt,itemActiveBg:_t,colorSubItemBg:Ve,subMenuItemBg:Ve,colorItemBgSelected:_t,itemSelectedBg:_t,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:Tt,activeBarHeight:Tt,colorActiveBarBorderSize:Ze,activeBarBorderWidth:Ze,colorItemTextDisabled:Ue,itemDisabledColor:Ue,colorDangerItemText:We,dangerItemColor:We,colorDangerItemTextHover:We,dangerItemHoverColor:We,colorDangerItemTextSelected:We,dangerItemSelectedColor:We,colorDangerItemBgActive:qe,dangerItemActiveBg:qe,colorDangerItemBgSelected:qe,dangerItemSelectedBg:qe,itemMarginInline:lt.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:kt,groupTitleLineHeight:Nt,collapsedWidth:kt*2,popupBg:Zt,itemMarginBlock:on,itemPaddingInline:vn,horizontalLineHeight:`${kt*1.15}px`,iconSize:kn,iconMarginInlineEnd:Kn-kn,collapsedIconSize:Xn,groupTitleFontSize:kn,darkItemDisabledColor:new Oe.C(pr).setAlpha(.25).toRgbString(),darkItemColor:vr,darkDangerItemColor:We,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:pr,darkItemSelectedBg:Qe,darkDangerItemSelectedBg:We,darkItemHoverBg:"transparent",darkGroupTitleColor:vr,darkItemHoverColor:pr,darkDangerItemHoverColor:dr,darkDangerItemSelectedColor:pr,darkDangerItemActiveBg:We}},{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"]]})(ut),Ct=function(ut,wt){var yt={};for(var lt in ut)Object.prototype.hasOwnProperty.call(ut,lt)&&wt.indexOf(lt)<0&&(yt[lt]=ut[lt]);if(ut!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Qe=0,lt=Object.getOwnPropertySymbols(ut);Qe<lt.length;Qe++)wt.indexOf(lt[Qe])<0&&Object.prototype.propertyIsEnumerable.call(ut,lt[Qe])&&(yt[lt[Qe]]=ut[lt[Qe]]);return yt},tt=(0,St.forwardRef)((ut,wt)=>{var yt,lt;const Qe=St.useContext(Pe.Z),We=Qe||{},{getPrefixCls:Ue,getPopupContainer:qe,direction:He,menu:De}=St.useContext(ve.E_),Le=Ue(),{prefixCls:Ve,className:dt,style:Ze,theme:Tt="light",expandIcon:_t,_internalDisableMenuItemTitleTooltip:Qt,inlineCollapsed:kt,siderCollapsed:Nt,items:Zt,children:on,rootClassName:vn,mode:kn,selectable:Kn,onClick:Xn,overflowedIndicatorPopupClassName:pr}=ut,dr=Ct(ut,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),vr=(0,we.Z)(dr,["collapsedWidth"]),Sr=Ae(Zt)||on;(yt=We.validator)===null||yt===void 0||yt.call(We,{mode:kn});const Fr=(0,pe.useEvent)(function(){var Rr;Xn==null||Xn.apply(void 0,arguments),(Rr=We.onClick)===null||Rr===void 0||Rr.call(We)}),li=We.mode||kn,Er=Kn!=null?Kn:We.selectable,xi=St.useMemo(()=>Nt!==void 0?Nt:kt,[kt,Nt]),Cr={horizontal:{motionName:`${Le}-slide-up`},inline:(0,Ee.Z)(Le),other:{motionName:`${Le}-zoom-big`}},ot=Ue("menu",Ve||We.prefixCls),[di,Yr]=Kt(ot,!Qe),Ri=je()(`${ot}-${Tt}`,De==null?void 0:De.className,dt);let hr;if(typeof _t=="function")hr=_t;else if(_t===null||_t===!1)hr=null;else if(We.expandIcon===null||We.expandIcon===!1)hr=null;else{const Rr=_t!=null?_t:We.expandIcon;hr=(0,xe.Tm)(Rr,{className:je()(`${ot}-submenu-expand-icon`,(0,xe.l$)(Rr)?(lt=Rr.props)===null||lt===void 0?void 0:lt.className:"")})}const Ir=St.useMemo(()=>({prefixCls:ot,inlineCollapsed:xi||!1,direction:He,firstLevel:!0,theme:Tt,mode:li,disableMenuItemTitleTooltip:Qt}),[ot,xi,He,Qt,Tt]);return di(St.createElement(Pe.Z.Provider,{value:null},St.createElement(z.Provider,{value:Ir},St.createElement(rt.ZP,Object.assign({getPopupContainer:qe,overflowedIndicator:St.createElement(ue.Z,null),overflowedIndicatorPopupClassName:je()(ot,`${ot}-${Tt}`,pr),mode:li,selectable:Er,onClick:Fr},vr,{inlineCollapsed:xi,style:Object.assign(Object.assign({},De==null?void 0:De.style),Ze),className:Ri,prefixCls:ot,direction:He,defaultMotions:Cr,expandIcon:hr,ref:wt,rootClassName:je()(vn,Yr)}),Sr))))});const bt=(0,St.forwardRef)((ut,wt)=>{const yt=(0,St.useRef)(null),lt=St.useContext(ie.D);return(0,St.useImperativeHandle)(wt,()=>({menu:yt.current,focus:Qe=>{var We;(We=yt.current)===null||We===void 0||We.focus(Qe)}})),St.createElement(tt,Object.assign({ref:yt},ut,lt))});bt.Item=ae,bt.SubMenu=le,bt.Divider=Ce,bt.ItemGroup=rt.BW;var Ke=bt},25700:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return We}});var rt=$e(5891),St=$e(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"},Re=ie,je=$e(88853),ve=function(qe,He){return St.createElement(je.Z,(0,rt.Z)({},qe,{ref:He,icon:Re}))},ce=St.forwardRef(ve),be=ce,Ce=$e(93343),ye=$e(16537),we=$e(53878),me=$e(92310),xe=$e.n(me),fe=$e(80962),z=$e(57259),ee=$e(79545),ae=$e(68550),re=$e(17928),le=$e(7711),ue=$e(36994),pe={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},Ee=pe,Pe=$e(91735),Ie=function(Ue){(0,re.Z)(He,Ue);var qe=(0,le.Z)(He);function He(){var De;(0,ee.Z)(this,He);for(var Le=arguments.length,Ve=new Array(Le),dt=0;dt<Le;dt++)Ve[dt]=arguments[dt];return De=qe.call.apply(qe,[this].concat(Ve)),De.state={goInputText:""},De.getValidValue=function(){var Ze=De.state.goInputText;return!Ze||Number.isNaN(Ze)?void 0:Number(Ze)},De.buildOptionText=function(Ze){return"".concat(Ze," ").concat(De.props.locale.items_per_page)},De.changeSize=function(Ze){De.props.changeSize(Number(Ze))},De.handleChange=function(Ze){De.setState({goInputText:Ze.target.value})},De.handleBlur=function(Ze){var Tt=De.props,_t=Tt.goButton,Qt=Tt.quickGo,kt=Tt.rootPrefixCls,Nt=De.state.goInputText;_t||Nt===""||(De.setState({goInputText:""}),!(Ze.relatedTarget&&(Ze.relatedTarget.className.indexOf("".concat(kt,"-item-link"))>=0||Ze.relatedTarget.className.indexOf("".concat(kt,"-item"))>=0))&&Qt(De.getValidValue()))},De.go=function(Ze){var Tt=De.state.goInputText;Tt!==""&&(Ze.keyCode===Ee.ENTER||Ze.type==="click")&&(De.setState({goInputText:""}),De.props.quickGo(De.getValidValue()))},De}return(0,ae.Z)(He,[{key:"getPageSizeOptions",value:function(){var Le=this.props,Ve=Le.pageSize,dt=Le.pageSizeOptions;return dt.some(function(Ze){return Ze.toString()===Ve.toString()})?dt:dt.concat([Ve.toString()]).sort(function(Ze,Tt){var _t=Number.isNaN(Number(Ze))?0:Number(Ze),Qt=Number.isNaN(Number(Tt))?0:Number(Tt);return _t-Qt})}},{key:"render",value:function(){var Le=this,Ve=this.props,dt=Ve.pageSize,Ze=Ve.locale,Tt=Ve.rootPrefixCls,_t=Ve.changeSize,Qt=Ve.quickGo,kt=Ve.goButton,Nt=Ve.selectComponentClass,Zt=Ve.buildOptionText,on=Ve.selectPrefixCls,vn=Ve.disabled,kn=this.state.goInputText,Kn="".concat(Tt,"-options"),Xn=Nt,pr=null,dr=null,vr=null;if(!_t&&!Qt)return null;var Sr=this.getPageSizeOptions();if(_t&&Xn){var Fr=Sr.map(function(li,Er){return St.createElement(Xn.Option,{key:Er,value:li.toString()},(Zt||Le.buildOptionText)(li))});pr=St.createElement(Xn,{disabled:vn,prefixCls:on,showSearch:!1,className:"".concat(Kn,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(dt||Sr[0]).toString(),onChange:this.changeSize,getPopupContainer:function(Er){return Er.parentNode},"aria-label":Ze.page_size,defaultOpen:!1},Fr)}return Qt&&(kt&&(vr=typeof kt=="boolean"?St.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:vn,className:"".concat(Kn,"-quick-jumper-button")},Ze.jump_to_confirm):St.createElement("span",{onClick:this.go,onKeyUp:this.go},kt)),dr=St.createElement("div",{className:"".concat(Kn,"-quick-jumper")},Ze.jump_to,St.createElement("input",{disabled:vn,type:"text",value:kn,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":Ze.page}),Ze.page,vr)),St.createElement("li",{className:"".concat(Kn)},pr,dr)}}]),He}(St.Component);Ie.defaultProps={pageSizeOptions:["10","20","50","100"]};var ke=Ie,Ae=function(qe){var He,De=qe.rootPrefixCls,Le=qe.page,Ve=qe.active,dt=qe.className,Ze=qe.showTitle,Tt=qe.onClick,_t=qe.onKeyPress,Qt=qe.itemRender,kt="".concat(De,"-item"),Nt=xe()(kt,"".concat(kt,"-").concat(Le),(He={},(0,fe.Z)(He,"".concat(kt,"-active"),Ve),(0,fe.Z)(He,"".concat(kt,"-disabled"),!Le),(0,fe.Z)(He,qe.className,dt),He)),Zt=function(){Tt(Le)},on=function(Kn){_t(Kn,Tt,Le)},vn=Qt(Le,"page",St.createElement("a",{rel:"nofollow"},Le));return vn?St.createElement("li",{title:Ze?Le.toString():null,className:Nt,onClick:Zt,onKeyPress:on,tabIndex:0},vn):null},Oe=Ae;function Fe(){}function _e(Ue){var qe=Number(Ue);return typeof qe=="number"&&!Number.isNaN(qe)&&isFinite(qe)&&Math.floor(qe)===qe}var Ye=function(qe,He,De){return De};function ze(Ue,qe,He){var De=typeof Ue=="undefined"?qe.pageSize:Ue;return Math.floor((He.total-1)/De)+1}var Xe=function(Ue){(0,re.Z)(He,Ue);var qe=(0,le.Z)(He);function He(De){var Le;(0,ee.Z)(this,He),Le=qe.call(this,De),Le.paginationNode=St.createRef(),Le.getJumpPrevPage=function(){return Math.max(1,Le.state.current-(Le.props.showLessItems?3:5))},Le.getJumpNextPage=function(){return Math.min(ze(void 0,Le.state,Le.props),Le.state.current+(Le.props.showLessItems?3:5))},Le.getItemIcon=function(_t,Qt){var kt=Le.props.prefixCls,Nt=_t||St.createElement("button",{type:"button","aria-label":Qt,className:"".concat(kt,"-item-link")});return typeof _t=="function"&&(Nt=St.createElement(_t,(0,z.Z)({},Le.props))),Nt},Le.isValid=function(_t){var Qt=Le.props.total;return _e(_t)&&_t!==Le.state.current&&_e(Qt)&&Qt>0},Le.shouldDisplayQuickJumper=function(){var _t=Le.props,Qt=_t.showQuickJumper,kt=_t.total,Nt=Le.state.pageSize;return kt<=Nt?!1:Qt},Le.handleKeyDown=function(_t){(_t.keyCode===Ee.ARROW_UP||_t.keyCode===Ee.ARROW_DOWN)&&_t.preventDefault()},Le.handleKeyUp=function(_t){var Qt=Le.getValidValue(_t),kt=Le.state.currentInputValue;Qt!==kt&&Le.setState({currentInputValue:Qt}),_t.keyCode===Ee.ENTER?Le.handleChange(Qt):_t.keyCode===Ee.ARROW_UP?Le.handleChange(Qt-1):_t.keyCode===Ee.ARROW_DOWN&&Le.handleChange(Qt+1)},Le.handleBlur=function(_t){var Qt=Le.getValidValue(_t);Le.handleChange(Qt)},Le.changePageSize=function(_t){var Qt=Le.state.current,kt=ze(_t,Le.state,Le.props);Qt=Qt>kt?kt:Qt,kt===0&&(Qt=Le.state.current),typeof _t=="number"&&("pageSize"in Le.props||Le.setState({pageSize:_t}),"current"in Le.props||Le.setState({current:Qt,currentInputValue:Qt})),Le.props.onShowSizeChange(Qt,_t),"onChange"in Le.props&&Le.props.onChange&&Le.props.onChange(Qt,_t)},Le.handleChange=function(_t){var Qt=Le.props,kt=Qt.disabled,Nt=Qt.onChange,Zt=Le.state,on=Zt.pageSize,vn=Zt.current,kn=Zt.currentInputValue;if(Le.isValid(_t)&&!kt){var Kn=ze(void 0,Le.state,Le.props),Xn=_t;return _t>Kn?Xn=Kn:_t<1&&(Xn=1),"current"in Le.props||Le.setState({current:Xn}),Xn!==kn&&Le.setState({currentInputValue:Xn}),Nt(Xn,on),Xn}return vn},Le.prev=function(){Le.hasPrev()&&Le.handleChange(Le.state.current-1)},Le.next=function(){Le.hasNext()&&Le.handleChange(Le.state.current+1)},Le.jumpPrev=function(){Le.handleChange(Le.getJumpPrevPage())},Le.jumpNext=function(){Le.handleChange(Le.getJumpNextPage())},Le.hasPrev=function(){return Le.state.current>1},Le.hasNext=function(){return Le.state.current<ze(void 0,Le.state,Le.props)},Le.runIfEnter=function(_t,Qt){if(_t.key==="Enter"||_t.charCode===13){for(var kt=arguments.length,Nt=new Array(kt>2?kt-2:0),Zt=2;Zt<kt;Zt++)Nt[Zt-2]=arguments[Zt];Qt.apply(void 0,Nt)}},Le.runIfEnterPrev=function(_t){Le.runIfEnter(_t,Le.prev)},Le.runIfEnterNext=function(_t){Le.runIfEnter(_t,Le.next)},Le.runIfEnterJumpPrev=function(_t){Le.runIfEnter(_t,Le.jumpPrev)},Le.runIfEnterJumpNext=function(_t){Le.runIfEnter(_t,Le.jumpNext)},Le.handleGoTO=function(_t){(_t.keyCode===Ee.ENTER||_t.type==="click")&&Le.handleChange(Le.state.currentInputValue)},Le.renderPrev=function(_t){var Qt=Le.props,kt=Qt.prevIcon,Nt=Qt.itemRender,Zt=Nt(_t,"prev",Le.getItemIcon(kt,"prev page")),on=!Le.hasPrev();return(0,St.isValidElement)(Zt)?(0,St.cloneElement)(Zt,{disabled:on}):Zt},Le.renderNext=function(_t){var Qt=Le.props,kt=Qt.nextIcon,Nt=Qt.itemRender,Zt=Nt(_t,"next",Le.getItemIcon(kt,"next page")),on=!Le.hasNext();return(0,St.isValidElement)(Zt)?(0,St.cloneElement)(Zt,{disabled:on}):Zt};var Ve=De.onChange!==Fe,dt="current"in De;dt&&!Ve&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var Ze=De.defaultCurrent;"current"in De&&(Ze=De.current);var Tt=De.defaultPageSize;return"pageSize"in De&&(Tt=De.pageSize),Ze=Math.min(Ze,ze(Tt,void 0,De)),Le.state={current:Ze,currentInputValue:Ze,pageSize:Tt},Le}return(0,ae.Z)(He,[{key:"componentDidUpdate",value:function(Le,Ve){var dt=this.props.prefixCls;if(Ve.current!==this.state.current&&this.paginationNode.current){var Ze=this.paginationNode.current.querySelector(".".concat(dt,"-item-").concat(Ve.current));if(Ze&&document.activeElement===Ze){var Tt;Ze==null||(Tt=Ze.blur)===null||Tt===void 0||Tt.call(Ze)}}}},{key:"getValidValue",value:function(Le){var Ve=Le.target.value,dt=ze(void 0,this.state,this.props),Ze=this.state.currentInputValue,Tt;return Ve===""?Tt=Ve:Number.isNaN(Number(Ve))?Tt=Ze:Ve>=dt?Tt=dt:Tt=Number(Ve),Tt}},{key:"getShowSizeChanger",value:function(){var Le=this.props,Ve=Le.showSizeChanger,dt=Le.total,Ze=Le.totalBoundaryShowSizeChanger;return typeof Ve!="undefined"?Ve:dt>Ze}},{key:"render",value:function(){var Le=this.props,Ve=Le.prefixCls,dt=Le.className,Ze=Le.style,Tt=Le.disabled,_t=Le.hideOnSinglePage,Qt=Le.total,kt=Le.locale,Nt=Le.showQuickJumper,Zt=Le.showLessItems,on=Le.showTitle,vn=Le.showTotal,kn=Le.simple,Kn=Le.itemRender,Xn=Le.showPrevNextJumpers,pr=Le.jumpPrevIcon,dr=Le.jumpNextIcon,vr=Le.selectComponentClass,Sr=Le.selectPrefixCls,Fr=Le.pageSizeOptions,li=this.state,Er=li.current,xi=li.pageSize,Cr=li.currentInputValue;if(_t===!0&&Qt<=xi)return null;var ot=ze(void 0,this.state,this.props),di=[],Yr=null,Ri=null,hr=null,Ir=null,Rr=null,yi=Nt&&Nt.goButton,dn=Zt?1:2,mn=Er-1>0?Er-1:0,un=Er+1<ot?Er+1:ot,Ut=(0,ue.Z)(this.props,{aria:!0,data:!0}),xn=vn&&St.createElement("li",{className:"".concat(Ve,"-total-text")},vn(Qt,[Qt===0?0:(Er-1)*xi+1,Er*xi>Qt?Qt:Er*xi]));if(kn){yi&&(typeof yi=="boolean"?Rr=St.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},kt.jump_to_confirm):Rr=St.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},yi),Rr=St.createElement("li",{title:on?"".concat(kt.jump_to).concat(Er,"/").concat(ot):null,className:"".concat(Ve,"-simple-pager")},Rr));var jn=this.renderPrev(mn);return St.createElement("ul",(0,rt.Z)({className:xe()(Ve,"".concat(Ve,"-simple"),(0,fe.Z)({},"".concat(Ve,"-disabled"),Tt),dt),style:Ze,ref:this.paginationNode},Ut),xn,jn?St.createElement("li",{title:on?kt.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:xe()("".concat(Ve,"-prev"),(0,fe.Z)({},"".concat(Ve,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},jn):null,St.createElement("li",{title:on?"".concat(Er,"/").concat(ot):null,className:"".concat(Ve,"-simple-pager")},St.createElement("input",{type:"text",value:Cr,disabled:Tt,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:3}),St.createElement("span",{className:"".concat(Ve,"-slash")},"/"),ot),St.createElement("li",{title:on?kt.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:xe()("".concat(Ve,"-next"),(0,fe.Z)({},"".concat(Ve,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(un)),Rr)}if(ot<=3+dn*2){var en={locale:kt,rootPrefixCls:Ve,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:on,itemRender:Kn};ot||di.push(St.createElement(Oe,(0,rt.Z)({},en,{key:"noPager",page:1,className:"".concat(Ve,"-item-disabled")})));for(var Gt=1;Gt<=ot;Gt+=1){var Cn=Er===Gt;di.push(St.createElement(Oe,(0,rt.Z)({},en,{key:Gt,page:Gt,active:Cn})))}}else{var Gn=Zt?kt.prev_3:kt.prev_5,ir=Zt?kt.next_3:kt.next_5,Pn=Kn(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(pr,"prev page")),Yt=Kn(this.getJumpNextPage(),"jump-next",this.getItemIcon(dr,"next page"));Xn&&(Yr=Pn?St.createElement("li",{title:on?Gn:null,key:"prev",onClick:this.jumpPrev,tabIndex:0,onKeyPress:this.runIfEnterJumpPrev,className:xe()("".concat(Ve,"-jump-prev"),(0,fe.Z)({},"".concat(Ve,"-jump-prev-custom-icon"),!!pr))},Pn):null,Ri=Yt?St.createElement("li",{title:on?ir:null,key:"next",tabIndex:0,onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:xe()("".concat(Ve,"-jump-next"),(0,fe.Z)({},"".concat(Ve,"-jump-next-custom-icon"),!!dr))},Yt):null),Ir=St.createElement(Oe,{locale:kt,last:!0,rootPrefixCls:Ve,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:ot,page:ot,active:!1,showTitle:on,itemRender:Kn}),hr=St.createElement(Oe,{locale:kt,rootPrefixCls:Ve,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:on,itemRender:Kn});var zn=Math.max(1,Er-dn),Qn=Math.min(Er+dn,ot);Er-1<=dn&&(Qn=1+dn*2),ot-Er<=dn&&(zn=ot-dn*2);for(var or=zn;or<=Qn;or+=1){var rn=Er===or;di.push(St.createElement(Oe,{locale:kt,rootPrefixCls:Ve,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:or,page:or,active:rn,showTitle:on,itemRender:Kn}))}Er-1>=dn*2&&Er!==3&&(di[0]=(0,St.cloneElement)(di[0],{className:"".concat(Ve,"-item-after-jump-prev")}),di.unshift(Yr)),ot-Er>=dn*2&&Er!==ot-2&&(di[di.length-1]=(0,St.cloneElement)(di[di.length-1],{className:"".concat(Ve,"-item-before-jump-next")}),di.push(Ri)),zn!==1&&di.unshift(hr),Qn!==ot&&di.push(Ir)}var Mn=!this.hasPrev()||!ot,an=!this.hasNext()||!ot,gn=this.renderPrev(mn),En=this.renderNext(un);return St.createElement("ul",(0,rt.Z)({className:xe()(Ve,dt,(0,fe.Z)({},"".concat(Ve,"-disabled"),Tt)),style:Ze,ref:this.paginationNode},Ut),xn,gn?St.createElement("li",{title:on?kt.prev_page:null,onClick:this.prev,tabIndex:Mn?null:0,onKeyPress:this.runIfEnterPrev,className:xe()("".concat(Ve,"-prev"),(0,fe.Z)({},"".concat(Ve,"-disabled"),Mn)),"aria-disabled":Mn},gn):null,di,En?St.createElement("li",{title:on?kt.next_page:null,onClick:this.next,tabIndex:an?null:0,onKeyPress:this.runIfEnterNext,className:xe()("".concat(Ve,"-next"),(0,fe.Z)({},"".concat(Ve,"-disabled"),an)),"aria-disabled":an},En):null,St.createElement(ke,{disabled:Tt,locale:kt,rootPrefixCls:Ve,selectComponentClass:vr,selectPrefixCls:Sr,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Er,pageSize:xi,pageSizeOptions:Fr,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:yi}))}}],[{key:"getDerivedStateFromProps",value:function(Le,Ve){var dt={};if("current"in Le&&(dt.current=Le.current,Le.current!==Ve.current&&(dt.currentInputValue=dt.current)),"pageSize"in Le&&Le.pageSize!==Ve.pageSize){var Ze=Ve.current,Tt=ze(Le.pageSize,Ve,Le);Ze=Ze>Tt?Tt:Ze,"current"in Le||(dt.current=Ze,dt.currentInputValue=Ze),dt.pageSize=Le.pageSize}return dt}}]),He}(St.Component);Xe.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:Fe,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:Fe,locale:Pe.Z,style:{},itemRender:Ye,totalBoundaryShowSizeChanger:50};var st=Xe,ht=$e(22075),ft=$e(36355),Lt=$e(19716),et=$e(8628),it=$e(9763),xt=$e(57809);const Et=Ue=>St.createElement(xt.default,Object.assign({},Ue,{showSearch:!0,size:"small"})),Mt=Ue=>St.createElement(xt.default,Object.assign({},Ue,{showSearch:!0,size:"middle"}));Et.Option=xt.default.Option,Mt.Option=xt.default.Option;var mt=$e(9937),pt=$e(17313),vt=$e(83116),jt=$e(37613);const At=Ue=>{const{componentCls:qe}=Ue;return{[`${qe}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${qe}-item-link`]:{color:Ue.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${qe}-item-link`]:{color:Ue.colorTextDisabled,cursor:"not-allowed"}}},[`&${qe}-disabled`]:{cursor:"not-allowed",[`${qe}-item`]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:Ue.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:Ue.colorBorder,backgroundColor:Ue.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:Ue.itemActiveBgDisabled},a:{color:Ue.itemActiveColorDisabled}}},[`${qe}-item-link`]:{color:Ue.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${qe}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${qe}-simple-pager`]:{color:Ue.colorTextDisabled},[`${qe}-jump-prev, ${qe}-jump-next`]:{[`${qe}-item-link-icon`]:{opacity:0},[`${qe}-item-ellipsis`]:{opacity:1}}},[`&${qe}-simple`]:{[`${qe}-prev, ${qe}-next`]:{[`&${qe}-disabled ${qe}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},Kt=Ue=>{const{componentCls:qe}=Ue;return{[`&${qe}-mini ${qe}-total-text, &${qe}-mini ${qe}-simple-pager`]:{height:Ue.itemSizeSM,lineHeight:`${Ue.itemSizeSM}px`},[`&${qe}-mini ${qe}-item`]:{minWidth:Ue.itemSizeSM,height:Ue.itemSizeSM,margin:0,lineHeight:`${Ue.itemSizeSM-2}px`},[`&${qe}-mini:not(${qe}-disabled) ${qe}-item:not(${qe}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:Ue.colorBgTextHover},"&:active":{backgroundColor:Ue.colorBgTextActive}},[`&${qe}-mini ${qe}-prev, &${qe}-mini ${qe}-next`]:{minWidth:Ue.itemSizeSM,height:Ue.itemSizeSM,margin:0,lineHeight:`${Ue.itemSizeSM}px`},[`&${qe}-mini:not(${qe}-disabled)`]:{[`${qe}-prev, ${qe}-next`]:{[`&:hover ${qe}-item-link`]:{backgroundColor:Ue.colorBgTextHover},[`&:active ${qe}-item-link`]:{backgroundColor:Ue.colorBgTextActive},[`&${qe}-disabled:hover ${qe}-item-link`]:{backgroundColor:"transparent"}}},[`
&${qe}-mini ${qe}-prev ${qe}-item-link,
&${qe}-mini ${qe}-next ${qe}-item-link
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:Ue.itemSizeSM,lineHeight:`${Ue.itemSizeSM}px`}},[`&${qe}-mini ${qe}-jump-prev, &${qe}-mini ${qe}-jump-next`]:{height:Ue.itemSizeSM,marginInlineEnd:0,lineHeight:`${Ue.itemSizeSM}px`},[`&${qe}-mini ${qe}-options`]:{marginInlineStart:Ue.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:Ue.miniOptionsSizeChangerTop},"&-quick-jumper":{height:Ue.itemSizeSM,lineHeight:`${Ue.itemSizeSM}px`,input:Object.assign(Object.assign({},(0,mt.x0)(Ue)),{width:Ue.paginationMiniQuickJumperInputWidth,height:Ue.controlHeightSM})}}}},Ct=Ue=>{const{componentCls:qe}=Ue;return{[`
&${qe}-simple ${qe}-prev,
&${qe}-simple ${qe}-next
`]:{height:Ue.itemSizeSM,lineHeight:`${Ue.itemSizeSM}px`,verticalAlign:"top",[`${qe}-item-link`]:{height:Ue.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:Ue.colorBgTextHover},"&:active":{backgroundColor:Ue.colorBgTextActive},"&::after":{height:Ue.itemSizeSM,lineHeight:`${Ue.itemSizeSM}px`}}},[`&${qe}-simple ${qe}-simple-pager`]:{display:"inline-block",height:Ue.itemSizeSM,marginInlineEnd:Ue.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:Ue.marginXS,padding:`0 ${Ue.paginationItemPaddingInline}px`,textAlign:"center",backgroundColor:Ue.itemInputBg,border:`${Ue.lineWidth}px ${Ue.lineType} ${Ue.colorBorder}`,borderRadius:Ue.borderRadius,outline:"none",transition:`border-color ${Ue.motionDurationMid}`,color:"inherit","&:hover":{borderColor:Ue.colorPrimary},"&:focus":{borderColor:Ue.colorPrimaryHover,boxShadow:`${Ue.inputOutlineOffset}px 0 ${Ue.controlOutlineWidth}px ${Ue.controlOutline}`},"&[disabled]":{color:Ue.colorTextDisabled,backgroundColor:Ue.colorBgContainerDisabled,borderColor:Ue.colorBorder,cursor:"not-allowed"}}}}},gt=Ue=>{const{componentCls:qe}=Ue;return{[`${qe}-jump-prev, ${qe}-jump-next`]:{outline:0,[`${qe}-item-container`]:{position:"relative",[`${qe}-item-link-icon`]:{color:Ue.colorPrimary,fontSize:Ue.fontSizeSM,opacity:0,transition:`all ${Ue.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${qe}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:Ue.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:Ue.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:Ue.paginationEllipsisTextIndent,opacity:1,transition:`all ${Ue.motionDurationMid}`}},"&:hover":{[`${qe}-item-link-icon`]:{opacity:1},[`${qe}-item-ellipsis`]:{opacity:0}}},[`
${qe}-prev,
${qe}-jump-prev,
${qe}-jump-next
`]:{marginInlineEnd:Ue.marginXS},[`
${qe}-prev,
${qe}-next,
${qe}-jump-prev,
${qe}-jump-next
`]:{display:"inline-block",minWidth:Ue.itemSize,height:Ue.itemSize,color:Ue.colorText,fontFamily:Ue.fontFamily,lineHeight:`${Ue.itemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:Ue.borderRadius,cursor:"pointer",transition:`all ${Ue.motionDurationMid}`},[`${qe}-prev, ${qe}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:Ue.colorText,cursor:"pointer",userSelect:"none"},[`${qe}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:Ue.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${Ue.lineWidth}px ${Ue.lineType} transparent`,borderRadius:Ue.borderRadius,outline:"none",transition:`all ${Ue.motionDurationMid}`},[`&:hover ${qe}-item-link`]:{backgroundColor:Ue.colorBgTextHover},[`&:active ${qe}-item-link`]:{backgroundColor:Ue.colorBgTextActive},[`&${qe}-disabled:hover`]:{[`${qe}-item-link`]:{backgroundColor:"transparent"}}},[`${qe}-slash`]:{marginInlineEnd:Ue.paginationSlashMarginInlineEnd,marginInlineStart:Ue.paginationSlashMarginInlineStart},[`${qe}-options`]:{display:"inline-block",marginInlineStart:Ue.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:Ue.controlHeight,marginInlineStart:Ue.marginXS,lineHeight:`${Ue.controlHeight}px`,verticalAlign:"top",input:Object.assign(Object.assign({},(0,mt.ik)(Ue)),{width:Ue.controlHeightLG*1.25,height:Ue.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:Ue.marginXS,marginInlineEnd:Ue.marginXS})}}}},tt=Ue=>{const{componentCls:qe}=Ue;return{[`${qe}-item`]:{display:"inline-block",minWidth:Ue.itemSize,height:Ue.itemSize,marginInlineEnd:Ue.marginXS,fontFamily:Ue.fontFamily,lineHeight:`${Ue.itemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${Ue.lineWidth}px ${Ue.lineType} transparent`,borderRadius:Ue.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${Ue.paginationItemPaddingInline}px`,color:Ue.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${qe}-item-active)`]:{"&:hover":{transition:`all ${Ue.motionDurationMid}`,backgroundColor:Ue.colorBgTextHover},"&:active":{backgroundColor:Ue.colorBgTextActive}},"&-active":{fontWeight:Ue.fontWeightStrong,backgroundColor:Ue.itemActiveBg,borderColor:Ue.colorPrimary,a:{color:Ue.colorPrimary},"&:hover":{borderColor:Ue.colorPrimaryHover},"&:hover a":{color:Ue.colorPrimaryHover}}}}},bt=Ue=>{const{componentCls:qe}=Ue;return{[qe]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,pt.Wf)(Ue)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${qe}-total-text`]:{display:"inline-block",height:Ue.itemSize,marginInlineEnd:Ue.marginXS,lineHeight:`${Ue.itemSize-2}px`,verticalAlign:"middle"}}),tt(Ue)),gt(Ue)),Ct(Ue)),Kt(Ue)),At(Ue)),{[`@media only screen and (max-width: ${Ue.screenLG}px)`]:{[`${qe}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${Ue.screenSM}px)`]:{[`${qe}-options`]:{display:"none"}}}),[`&${Ue.componentCls}-rtl`]:{direction:"rtl"}}},Ke=Ue=>{const{componentCls:qe}=Ue;return{[`${qe}${qe}-disabled:not(${qe}-mini)`]:{"&, &:hover":{[`${qe}-item-link`]:{borderColor:Ue.colorBorder}},"&:focus-visible":{[`${qe}-item-link`]:{borderColor:Ue.colorBorder}},[`${qe}-item, ${qe}-item-link`]:{backgroundColor:Ue.colorBgContainerDisabled,borderColor:Ue.colorBorder,[`&:hover:not(${qe}-item-active)`]:{backgroundColor:Ue.colorBgContainerDisabled,borderColor:Ue.colorBorder,a:{color:Ue.colorTextDisabled}},[`&${qe}-item-active`]:{backgroundColor:Ue.itemActiveBgDisabled}},[`${qe}-prev, ${qe}-next`]:{"&:hover button":{backgroundColor:Ue.colorBgContainerDisabled,borderColor:Ue.colorBorder,color:Ue.colorTextDisabled},[`${qe}-item-link`]:{backgroundColor:Ue.colorBgContainerDisabled,borderColor:Ue.colorBorder}}},[`${qe}:not(${qe}-mini)`]:{[`${qe}-prev, ${qe}-next`]:{"&:hover button":{borderColor:Ue.colorPrimaryHover,backgroundColor:Ue.itemBg},[`${qe}-item-link`]:{backgroundColor:Ue.itemLinkBg,borderColor:Ue.colorBorder},[`&:hover ${qe}-item-link`]:{borderColor:Ue.colorPrimary,backgroundColor:Ue.itemBg,color:Ue.colorPrimary},[`&${qe}-disabled`]:{[`${qe}-item-link`]:{borderColor:Ue.colorBorder,color:Ue.colorTextDisabled}}},[`${qe}-item`]:{backgroundColor:Ue.itemBg,border:`${Ue.lineWidth}px ${Ue.lineType} ${Ue.colorBorder}`,[`&:hover:not(${qe}-item-active)`]:{borderColor:Ue.colorPrimary,backgroundColor:Ue.itemBg,a:{color:Ue.colorPrimary}},"&-active":{borderColor:Ue.colorPrimary}}}}},ut=Ue=>{const{componentCls:qe}=Ue;return{[`${qe}:not(${qe}-disabled)`]:{[`${qe}-item`]:Object.assign({},(0,pt.Qy)(Ue)),[`${qe}-jump-prev, ${qe}-jump-next`]:{"&:focus-visible":Object.assign({[`${qe}-item-link-icon`]:{opacity:1},[`${qe}-item-ellipsis`]:{opacity:0}},(0,pt.oN)(Ue))},[`${qe}-prev, ${qe}-next`]:{[`&:focus-visible ${qe}-item-link`]:Object.assign({},(0,pt.oN)(Ue))}}}};var wt=(0,vt.Z)("Pagination",Ue=>{const qe=(0,jt.TS)(Ue,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:Ue.marginXXS/2,paginationMiniQuickJumperInputWidth:Ue.controlHeightLG*1.1,paginationItemPaddingInline:Ue.marginXXS*1.5,paginationEllipsisLetterSpacing:Ue.marginXXS/2,paginationSlashMarginInlineStart:Ue.marginXXS,paginationSlashMarginInlineEnd:Ue.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,mt.e5)(Ue),(0,mt.TM)(Ue));return[bt(qe),ut(qe),Ue.wireframe&&Ke(qe)]},Ue=>({itemBg:Ue.colorBgContainer,itemSize:Ue.controlHeight,itemSizeSM:Ue.controlHeightSM,itemActiveBg:Ue.colorBgContainer,itemLinkBg:Ue.colorBgContainer,itemActiveColorDisabled:Ue.colorTextDisabled,itemActiveBgDisabled:Ue.controlItemBgActiveDisabled,itemInputBg:Ue.colorBgContainer,miniOptionsSizeChangerTop:0})),yt=function(Ue,qe){var He={};for(var De in Ue)Object.prototype.hasOwnProperty.call(Ue,De)&&qe.indexOf(De)<0&&(He[De]=Ue[De]);if(Ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Le=0,De=Object.getOwnPropertySymbols(Ue);Le<De.length;Le++)qe.indexOf(De[Le])<0&&Object.prototype.propertyIsEnumerable.call(Ue,De[Le])&&(He[De[Le]]=Ue[De[Le]]);return He},Qe=Ue=>{const{prefixCls:qe,selectPrefixCls:He,className:De,rootClassName:Le,style:Ve,size:dt,locale:Ze,selectComponentClass:Tt,responsive:_t,showSizeChanger:Qt}=Ue,kt=yt(Ue,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:Nt}=(0,et.Z)(_t),{getPrefixCls:Zt,direction:on,pagination:vn={}}=St.useContext(ft.E_),kn=Zt("pagination",qe),[Kn,Xn]=wt(kn),pr=Qt!=null?Qt:vn.showSizeChanger,dr=St.useMemo(()=>{const ot=St.createElement("span",{className:`${kn}-item-ellipsis`},"\u2022\u2022\u2022"),di=St.createElement("button",{className:`${kn}-item-link`,type:"button",tabIndex:-1},on==="rtl"?St.createElement(we.Z,null):St.createElement(ye.Z,null)),Yr=St.createElement("button",{className:`${kn}-item-link`,type:"button",tabIndex:-1},on==="rtl"?St.createElement(ye.Z,null):St.createElement(we.Z,null)),Ri=St.createElement("a",{className:`${kn}-item-link`},St.createElement("div",{className:`${kn}-item-container`},on==="rtl"?St.createElement(Ce.Z,{className:`${kn}-item-link-icon`}):St.createElement(be,{className:`${kn}-item-link-icon`}),ot)),hr=St.createElement("a",{className:`${kn}-item-link`},St.createElement("div",{className:`${kn}-item-container`},on==="rtl"?St.createElement(be,{className:`${kn}-item-link-icon`}):St.createElement(Ce.Z,{className:`${kn}-item-link-icon`}),ot));return{prevIcon:di,nextIcon:Yr,jumpPrevIcon:Ri,jumpNextIcon:hr}},[on,kn]),[vr]=(0,it.Z)("Pagination",ht.Z),Sr=Object.assign(Object.assign({},vr),Ze),Fr=(0,Lt.Z)(dt),li=Fr==="small"||!!(Nt&&!Fr&&_t),Er=Zt("select",He),xi=xe()({[`${kn}-mini`]:li,[`${kn}-rtl`]:on==="rtl"},vn==null?void 0:vn.className,De,Le,Xn),Cr=Object.assign(Object.assign({},vn==null?void 0:vn.style),Ve);return Kn(St.createElement(st,Object.assign({},dr,kt,{style:Cr,prefixCls:kn,selectPrefixCls:Er,className:xi,selectComponentClass:Tt||(li?Et:Mt),locale:Sr,showSizeChanger:pr})))},We=Qe},14478:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return Oe}});var rt=$e(85404),St=$e(92310),ie=$e.n(St),Re=$e(85108),je=$e(35788),ve=$e(64002),ce=$e(59301),be=$e(92343),Ce=$e(36355),ye=$e(60324),we=$e(92806),me=$e(77578),xe=$e(3113),fe=$e(67797),z=$e(9763),ee=$e(31724),ae=$e(39722),re=$e(83116);const le=Fe=>{const{componentCls:_e,iconCls:Ye,antCls:ze,zIndexPopup:Xe,colorText:st,colorWarning:ht,marginXXS:ft,marginXS:Lt,fontSize:et,fontWeightStrong:it,colorTextHeading:xt}=Fe;return{[_e]:{zIndex:Xe,[`&${ze}-popover`]:{fontSize:et},[`${_e}-message`]:{marginBottom:Lt,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${_e}-message-icon ${Ye}`]:{color:ht,fontSize:et,lineHeight:1,marginInlineEnd:Lt},[`${_e}-title`]:{fontWeight:it,color:xt,"&:only-child":{fontWeight:"normal"}},[`${_e}-description`]:{marginTop:ft,color:st}},[`${_e}-buttons`]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:Lt}}}}};var ue=(0,re.Z)("Popconfirm",Fe=>le(Fe),Fe=>{const{zIndexPopupBase:_e}=Fe;return{zIndexPopup:_e+60}},{resetStyle:!1}),pe=function(Fe,_e){var Ye={};for(var ze in Fe)Object.prototype.hasOwnProperty.call(Fe,ze)&&_e.indexOf(ze)<0&&(Ye[ze]=Fe[ze]);if(Fe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,ze=Object.getOwnPropertySymbols(Fe);Xe<ze.length;Xe++)_e.indexOf(ze[Xe])<0&&Object.prototype.propertyIsEnumerable.call(Fe,ze[Xe])&&(Ye[ze[Xe]]=Fe[ze[Xe]]);return Ye};const Ee=Fe=>{const{prefixCls:_e,okButtonProps:Ye,cancelButtonProps:ze,title:Xe,description:st,cancelText:ht,okText:ft,okType:Lt="primary",icon:et=ce.createElement(rt.Z,null),showCancel:it=!0,close:xt,onConfirm:Et,onCancel:Mt,onPopupClick:mt}=Fe,{getPrefixCls:pt}=ce.useContext(Ce.E_),[vt]=(0,z.Z)("Popconfirm",ee.Z.Popconfirm),jt=(0,me.Z)(Xe),At=(0,me.Z)(st);return ce.createElement("div",{className:`${_e}-inner-content`,onClick:mt},ce.createElement("div",{className:`${_e}-message`},et&&ce.createElement("span",{className:`${_e}-message-icon`},et),ce.createElement("div",{className:`${_e}-message-text`},jt&&ce.createElement("div",{className:ie()(`${_e}-title`)},jt),At&&ce.createElement("div",{className:`${_e}-description`},At))),ce.createElement("div",{className:`${_e}-buttons`},it&&ce.createElement(xe.ZP,Object.assign({onClick:Mt,size:"small"},ze),ht!=null?ht:vt==null?void 0:vt.cancelText),ce.createElement(we.Z,{buttonProps:Object.assign(Object.assign({size:"small"},(0,fe.n)(Lt)),Ye),actionFn:Et,close:xt,prefixCls:pt("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},ft!=null?ft:vt==null?void 0:vt.okText)))};var Ie=Fe=>{const{prefixCls:_e,placement:Ye,className:ze,style:Xe}=Fe,st=pe(Fe,["prefixCls","placement","className","style"]),{getPrefixCls:ht}=ce.useContext(Ce.E_),ft=ht("popconfirm",_e),[Lt]=ue(ft);return Lt(ce.createElement(ae.ZP,{placement:Ye,className:ie()(ft,ze),style:Xe,content:ce.createElement(Ee,Object.assign({prefixCls:ft},st))}))},ke=function(Fe,_e){var Ye={};for(var ze in Fe)Object.prototype.hasOwnProperty.call(Fe,ze)&&_e.indexOf(ze)<0&&(Ye[ze]=Fe[ze]);if(Fe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,ze=Object.getOwnPropertySymbols(Fe);Xe<ze.length;Xe++)_e.indexOf(ze[Xe])<0&&Object.prototype.propertyIsEnumerable.call(Fe,ze[Xe])&&(Ye[ze[Xe]]=Fe[ze[Xe]]);return Ye};const Ae=ce.forwardRef((Fe,_e)=>{const{prefixCls:Ye,placement:ze="top",trigger:Xe="click",okType:st="primary",icon:ht=ce.createElement(rt.Z,null),children:ft,overlayClassName:Lt,onOpenChange:et,onVisibleChange:it}=Fe,xt=ke(Fe,["prefixCls","placement","trigger","okType","icon","children","overlayClassName","onOpenChange","onVisibleChange"]),{getPrefixCls:Et}=ce.useContext(Ce.E_),[Mt,mt]=(0,je.Z)(!1,{value:Fe.open,defaultValue:Fe.defaultOpen}),pt=(Ke,ut)=>{mt(Ke,!0),it==null||it(Ke),et==null||et(Ke,ut)},vt=Ke=>{pt(!1,Ke)},jt=Ke=>{var ut;return(ut=Fe.onConfirm)===null||ut===void 0?void 0:ut.call(void 0,Ke)},At=Ke=>{var ut;pt(!1,Ke),(ut=Fe.onCancel)===null||ut===void 0||ut.call(void 0,Ke)},Kt=Ke=>{Ke.keyCode===Re.Z.ESC&&Mt&&pt(!1,Ke)},Ct=Ke=>{const{disabled:ut=!1}=Fe;ut||pt(Ke)},gt=Et("popconfirm",Ye),tt=ie()(gt,Lt),[bt]=ue(gt);return bt(ce.createElement(ye.Z,Object.assign({},(0,ve.Z)(xt,["title"]),{trigger:Xe,placement:ze,onOpenChange:Ct,open:Mt,ref:_e,overlayClassName:tt,content:ce.createElement(Ee,Object.assign({okType:st,icon:ht},Fe,{prefixCls:gt,close:vt,onConfirm:jt,onCancel:At})),"data-popover-inject":!0}),(0,be.Tm)(ft,{onKeyDown:Ke=>{var ut,wt;ce.isValidElement(ft)&&((wt=ft==null?void 0:(ut=ft.props).onKeyDown)===null||wt===void 0||wt.call(ut,Ke)),Kt(Ke)}})))});Ae._InternalPanelDoNotUseOrYouWillBeFired=Ie;var Oe=Ae},39722:function(bn,ln,$e){"use strict";$e.d(ln,{t5:function(){return ye}});var rt=$e(92310),St=$e.n(rt),ie=$e(55477),Re=$e(59301),je=$e(36355),ve=$e(77578),ce=$e(17356),be=function(me,xe){var fe={};for(var z in me)Object.prototype.hasOwnProperty.call(me,z)&&xe.indexOf(z)<0&&(fe[z]=me[z]);if(me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ee=0,z=Object.getOwnPropertySymbols(me);ee<z.length;ee++)xe.indexOf(z[ee])<0&&Object.prototype.propertyIsEnumerable.call(me,z[ee])&&(fe[z[ee]]=me[z[ee]]);return fe};const Ce=(me,xe,fe)=>{if(!(!xe&&!fe))return Re.createElement(Re.Fragment,null,xe&&Re.createElement("div",{className:`${me}-title`},(0,ve.Z)(xe)),Re.createElement("div",{className:`${me}-inner-content`},(0,ve.Z)(fe)))},ye=me=>{const{hashId:xe,prefixCls:fe,className:z,style:ee,placement:ae="top",title:re,content:le,children:ue}=me;return Re.createElement("div",{className:St()(xe,fe,`${fe}-pure`,`${fe}-placement-${ae}`,z),style:ee},Re.createElement("div",{className:`${fe}-arrow`}),Re.createElement(ie.G,Object.assign({},me,{className:xe,prefixCls:fe}),ue||Ce(fe,re,le)))},we=me=>{const{prefixCls:xe}=me,fe=be(me,["prefixCls"]),{getPrefixCls:z}=Re.useContext(je.E_),ee=z("popover",xe),[ae,re]=(0,ce.Z)(ee);return ae(Re.createElement(ye,Object.assign({},fe,{prefixCls:ee,hashId:re})))};ln.ZP=we},60324:function(bn,ln,$e){"use strict";var rt=$e(92310),St=$e.n(rt),ie=$e(59301),Re=$e(77578),je=$e(62892),ve=$e(36355),ce=$e(6848),be=$e(39722),Ce=$e(17356),ye=function(xe,fe){var z={};for(var ee in xe)Object.prototype.hasOwnProperty.call(xe,ee)&&fe.indexOf(ee)<0&&(z[ee]=xe[ee]);if(xe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ae=0,ee=Object.getOwnPropertySymbols(xe);ae<ee.length;ae++)fe.indexOf(ee[ae])<0&&Object.prototype.propertyIsEnumerable.call(xe,ee[ae])&&(z[ee[ae]]=xe[ee[ae]]);return z};const we=xe=>{let{title:fe,content:z,prefixCls:ee}=xe;return ie.createElement(ie.Fragment,null,fe&&ie.createElement("div",{className:`${ee}-title`},(0,Re.Z)(fe)),ie.createElement("div",{className:`${ee}-inner-content`},(0,Re.Z)(z)))},me=ie.forwardRef((xe,fe)=>{const{prefixCls:z,title:ee,content:ae,overlayClassName:re,placement:le="top",trigger:ue="hover",mouseEnterDelay:pe=.1,mouseLeaveDelay:Ee=.1,overlayStyle:Pe={}}=xe,Ie=ye(xe,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:ke}=ie.useContext(ve.E_),Ae=ke("popover",z),[Oe,Fe]=(0,Ce.Z)(Ae),_e=ke(),Ye=St()(re,Fe);return Oe(ie.createElement(ce.Z,Object.assign({placement:le,trigger:ue,mouseEnterDelay:pe,mouseLeaveDelay:Ee,overlayStyle:Pe},Ie,{prefixCls:Ae,overlayClassName:Ye,ref:fe,overlay:ee||ae?ie.createElement(we,{prefixCls:Ae,title:ee,content:ae}):null,transitionName:(0,je.m)(_e,"zoom-big",Ie.transitionName),"data-popover-inject":!0})))});me._InternalPanelDoNotUseOrYouWillBeFired=be.ZP,ln.Z=me},17356:function(bn,ln,$e){"use strict";var rt=$e(17313),St=$e(29878),ie=$e(19447),Re=$e(33166),je=$e(83116),ve=$e(37613);const ce=ye=>{const{componentCls:we,popoverColor:me,minWidth:xe,fontWeightStrong:fe,popoverPadding:z,boxShadowSecondary:ee,colorTextHeading:ae,borderRadiusLG:re,zIndexPopup:le,marginXS:ue,colorBgElevated:pe,popoverBg:Ee}=ye;return[{[we]:Object.assign(Object.assign({},(0,rt.Wf)(ye)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:le,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":pe,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${we}-content`]:{position:"relative"},[`${we}-inner`]:{backgroundColor:Ee,backgroundClip:"padding-box",borderRadius:re,boxShadow:ee,padding:z},[`${we}-title`]:{minWidth:xe,marginBottom:ue,color:ae,fontWeight:fe},[`${we}-inner-content`]:{color:me}})},(0,ie.ZP)(ye,{colorBg:"var(--antd-arrow-background-color)"}),{[`${we}-pure`]:{position:"relative",maxWidth:"none",margin:ye.sizePopupArrow,display:"inline-block",[`${we}-content`]:{display:"inline-block"}}}]},be=ye=>{const{componentCls:we}=ye;return{[we]:Re.i.map(me=>{const xe=ye[`${me}6`];return{[`&${we}-${me}`]:{"--antd-arrow-background-color":xe,[`${we}-inner`]:{backgroundColor:xe},[`${we}-arrow`]:{background:"transparent"}}}})}},Ce=ye=>{const{componentCls:we,lineWidth:me,lineType:xe,colorSplit:fe,paddingSM:z,controlHeight:ee,fontSize:ae,lineHeight:re,padding:le}=ye,ue=ee-Math.round(ae*re),pe=ue/2,Ee=ue/2-me,Pe=le;return{[we]:{[`${we}-inner`]:{padding:0},[`${we}-title`]:{margin:0,padding:`${pe}px ${Pe}px ${Ee}px`,borderBottom:`${me}px ${xe} ${fe}`},[`${we}-inner-content`]:{padding:`${z}px ${Pe}px`}}}};ln.Z=(0,je.Z)("Popover",ye=>{const{colorBgElevated:we,colorText:me,wireframe:xe}=ye,fe=(0,ve.TS)(ye,{popoverPadding:12,popoverBg:we,popoverColor:me});return[ce(fe),be(fe),xe&&Ce(fe),(0,St._y)(fe,"zoom-big")]},ye=>({width:177,minWidth:177,zIndexPopup:ye.zIndexPopupBase+30}),{resetStyle:!1,deprecatedTokens:[["width","minWidth"]]})},93948:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return Qt}});var rt=$e(59301),St=$e(79999),ie=$e(10402),Re=$e(33130),je=$e(72119),ve=$e(92310),ce=$e.n(ve),be=$e(64002),Ce=$e(36355),ye=$e(5891),we=$e(57259),me=$e(19149),xe={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},fe=function(){var Nt=(0,rt.useRef)([]),Zt=(0,rt.useRef)(null);return(0,rt.useEffect)(function(){var on=Date.now(),vn=!1;Nt.current.forEach(function(kn){if(kn){vn=!0;var Kn=kn.style;Kn.transitionDuration=".3s, .3s, .3s, .06s",Zt.current&&on-Zt.current<100&&(Kn.transitionDuration="0s, 0s")}}),vn&&(Zt.current=Date.now())}),Nt.current},z=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],ee=function(Nt){var Zt=(0,we.Z)((0,we.Z)({},xe),Nt),on=Zt.className,vn=Zt.percent,kn=Zt.prefixCls,Kn=Zt.strokeColor,Xn=Zt.strokeLinecap,pr=Zt.strokeWidth,dr=Zt.style,vr=Zt.trailColor,Sr=Zt.trailWidth,Fr=Zt.transition,li=(0,me.Z)(Zt,z);delete li.gapPosition;var Er=Array.isArray(vn)?vn:[vn],xi=Array.isArray(Kn)?Kn:[Kn],Cr=fe(),ot=pr/2,di=100-pr/2,Yr="M ".concat(Xn==="round"?ot:0,",").concat(ot,`
L `).concat(Xn==="round"?di:100,",").concat(ot),Ri="0 0 100 ".concat(pr),hr=0;return rt.createElement("svg",(0,ye.Z)({className:ce()("".concat(kn,"-line"),on),viewBox:Ri,preserveAspectRatio:"none",style:dr},li),rt.createElement("path",{className:"".concat(kn,"-line-trail"),d:Yr,strokeLinecap:Xn,stroke:vr,strokeWidth:Sr||pr,fillOpacity:"0"}),Er.map(function(Ir,Rr){var yi=1;switch(Xn){case"round":yi=1-pr/100;break;case"square":yi=1-pr/2/100;break;default:yi=1;break}var dn={strokeDasharray:"".concat(Ir*yi,"px, 100px"),strokeDashoffset:"-".concat(hr,"px"),transition:Fr||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},mn=xi[Rr]||xi[xi.length-1];return hr+=Ir,rt.createElement("path",{key:Rr,className:"".concat(kn,"-line-path"),d:Yr,strokeLinecap:Xn,stroke:mn,strokeWidth:pr,fillOpacity:"0",ref:function(Ut){Cr[Rr]=Ut},style:dn})}))},ae=ee,re=$e(80665),le=$e(29043),ue=$e(87746),pe=0,Ee=(0,ue.Z)();function Pe(){var kt;return Ee?(kt=pe,pe+=1):kt="TEST_OR_SSR",kt}var Ie=function(kt){var Nt=rt.useState(),Zt=(0,le.Z)(Nt,2),on=Zt[0],vn=Zt[1];return rt.useEffect(function(){vn("rc_progress_".concat(Pe()))},[]),kt||on},ke=function(Nt){var Zt=Nt.bg,on=Nt.children;return rt.createElement("div",{style:{width:"100%",height:"100%",background:Zt}},on)};function Ae(kt,Nt){return Object.keys(kt).map(function(Zt){var on=parseFloat(Zt),vn="".concat(Math.floor(on*Nt),"%");return"".concat(kt[Zt]," ").concat(vn)})}var Oe=rt.forwardRef(function(kt,Nt){var Zt=kt.prefixCls,on=kt.color,vn=kt.gradientId,kn=kt.radius,Kn=kt.style,Xn=kt.ptg,pr=kt.strokeLinecap,dr=kt.strokeWidth,vr=kt.size,Sr=kt.gapDegree,Fr=on&&(0,re.Z)(on)==="object",li=Fr?"#FFF":void 0,Er=vr/2,xi=rt.createElement("circle",{className:"".concat(Zt,"-circle-path"),r:kn,cx:Er,cy:Er,stroke:li,strokeLinecap:pr,strokeWidth:dr,opacity:Xn===0?0:1,style:Kn,ref:Nt});if(!Fr)return xi;var Cr="".concat(vn,"-conic"),ot=Sr?"".concat(180+Sr/2,"deg"):"0deg",di=Ae(on,(360-Sr)/360),Yr=Ae(on,1),Ri="conic-gradient(from ".concat(ot,", ").concat(di.join(", "),")"),hr="linear-gradient(to ".concat(Sr?"bottom":"top",", ").concat(Yr.join(", "),")");return rt.createElement(rt.Fragment,null,rt.createElement("mask",{id:Cr},xi),rt.createElement("foreignObject",{x:0,y:0,width:vr,height:vr,mask:"url(#".concat(Cr,")")},rt.createElement(ke,{bg:hr},rt.createElement(ke,{bg:Ri}))))}),Fe=Oe,_e=100,Ye=function(Nt,Zt,on,vn,kn,Kn,Xn,pr,dr,vr){var Sr=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,Fr=on/100*360*((360-Kn)/360),li=Kn===0?0:{bottom:0,top:180,left:90,right:-90}[Xn],Er=(100-vn)/100*Zt;dr==="round"&&vn!==100&&(Er+=vr/2,Er>=Zt&&(Er=Zt-.01));var xi=_e/2;return{stroke:typeof pr=="string"?pr:void 0,strokeDasharray:"".concat(Zt,"px ").concat(Nt),strokeDashoffset:Er+Sr,transform:"rotate(".concat(kn+Fr+li,"deg)"),transformOrigin:"".concat(xi,"px ").concat(xi,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},ze=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function Xe(kt){var Nt=kt!=null?kt:[];return Array.isArray(Nt)?Nt:[Nt]}var st=function(Nt){var Zt=(0,we.Z)((0,we.Z)({},xe),Nt),on=Zt.id,vn=Zt.prefixCls,kn=Zt.steps,Kn=Zt.strokeWidth,Xn=Zt.trailWidth,pr=Zt.gapDegree,dr=pr===void 0?0:pr,vr=Zt.gapPosition,Sr=Zt.trailColor,Fr=Zt.strokeLinecap,li=Zt.style,Er=Zt.className,xi=Zt.strokeColor,Cr=Zt.percent,ot=(0,me.Z)(Zt,ze),di=_e/2,Yr=Ie(on),Ri="".concat(Yr,"-gradient"),hr=di-Kn/2,Ir=Math.PI*2*hr,Rr=dr>0?90+dr/2:-90,yi=Ir*((360-dr)/360),dn=(0,re.Z)(kn)==="object"?kn:{count:kn,space:2},mn=dn.count,un=dn.space,Ut=Xe(Cr),xn=Xe(xi),jn=xn.find(function(Yt){return Yt&&(0,re.Z)(Yt)==="object"}),en=jn&&(0,re.Z)(jn)==="object",Gt=en?"butt":Fr,Cn=Ye(Ir,yi,0,100,Rr,dr,vr,Sr,Gt,Kn),Gn=fe(),ir=function(){var zn=0;return Ut.map(function(Qn,or){var rn=xn[or]||xn[xn.length-1],Mn=Ye(Ir,yi,zn,Qn,Rr,dr,vr,rn,Gt,Kn);return zn+=Qn,rt.createElement(Fe,{key:or,color:rn,ptg:Qn,radius:hr,prefixCls:vn,gradientId:Ri,style:Mn,strokeLinecap:Gt,strokeWidth:Kn,gapDegree:dr,ref:function(gn){Gn[or]=gn},size:_e})}).reverse()},Pn=function(){var zn=Math.round(mn*(Ut[0]/100)),Qn=100/mn,or=0;return new Array(mn).fill(null).map(function(rn,Mn){var an=Mn<=zn-1?xn[0]:Sr,gn=an&&(0,re.Z)(an)==="object"?"url(#".concat(Ri,")"):void 0,En=Ye(Ir,yi,or,Qn,Rr,dr,vr,an,"butt",Kn,un);return or+=(yi-En.strokeDashoffset+un)*100/yi,rt.createElement("circle",{key:Mn,className:"".concat(vn,"-circle-path"),r:hr,cx:di,cy:di,stroke:gn,strokeWidth:Kn,opacity:1,style:En,ref:function(On){Gn[Mn]=On}})})};return rt.createElement("svg",(0,ye.Z)({className:ce()("".concat(vn,"-circle"),Er),viewBox:"0 0 ".concat(_e," ").concat(_e),style:li,id:on,role:"presentation"},ot),!mn&&rt.createElement("circle",{className:"".concat(vn,"-circle-trail"),r:hr,cx:di,cy:di,stroke:Sr,strokeLinecap:Gt,strokeWidth:Xn||Kn,style:Cn}),mn?Pn():ir())},ht=st,ft={Line:ae,Circle:ht},Lt=$e(6848),et=$e(93398);function it(kt){return!kt||kt<0?0:kt>100?100:kt}function xt(kt){let{success:Nt,successPercent:Zt}=kt,on=Zt;return Nt&&"progress"in Nt&&(on=Nt.progress),Nt&&"percent"in Nt&&(on=Nt.percent),on}const Et=kt=>{let{percent:Nt,success:Zt,successPercent:on}=kt;const vn=it(xt({success:Zt,successPercent:on}));return[vn,it(it(Nt)-vn)]},Mt=kt=>{let{success:Nt={},strokeColor:Zt}=kt;const{strokeColor:on}=Nt;return[on||et.presetPrimaryColors.green,Zt||null]},mt=(kt,Nt,Zt)=>{var on,vn,kn,Kn;let Xn=-1,pr=-1;if(Nt==="step"){const dr=Zt.steps,vr=Zt.strokeWidth;typeof kt=="string"||typeof kt=="undefined"?(Xn=kt==="small"?2:14,pr=vr!=null?vr:8):typeof kt=="number"?[Xn,pr]=[kt,kt]:[Xn=14,pr=8]=kt,Xn*=dr}else if(Nt==="line"){const dr=Zt==null?void 0:Zt.strokeWidth;typeof kt=="string"||typeof kt=="undefined"?pr=dr||(kt==="small"?6:8):typeof kt=="number"?[Xn,pr]=[kt,kt]:[Xn=-1,pr=8]=kt}else(Nt==="circle"||Nt==="dashboard")&&(typeof kt=="string"||typeof kt=="undefined"?[Xn,pr]=kt==="small"?[60,60]:[120,120]:typeof kt=="number"?[Xn,pr]=[kt,kt]:(Xn=(vn=(on=kt[0])!==null&&on!==void 0?on:kt[1])!==null&&vn!==void 0?vn:120,pr=(Kn=(kn=kt[0])!==null&&kn!==void 0?kn:kt[1])!==null&&Kn!==void 0?Kn:120));return[Xn,pr]},pt=3,vt=kt=>pt/kt*100;var At=kt=>{const{prefixCls:Nt,trailColor:Zt=null,strokeLinecap:on="round",gapPosition:vn,gapDegree:kn,width:Kn=120,type:Xn,children:pr,success:dr,size:vr=Kn}=kt,[Sr,Fr]=mt(vr,"circle");let{strokeWidth:li}=kt;li===void 0&&(li=Math.max(vt(Sr),6));const Er={width:Sr,height:Fr,fontSize:Sr*.15+6},xi=rt.useMemo(()=>{if(kn||kn===0)return kn;if(Xn==="dashboard")return 75},[kn,Xn]),Cr=vn||Xn==="dashboard"&&"bottom"||void 0,ot=Object.prototype.toString.call(kt.strokeColor)==="[object Object]",di=Mt({success:dr,strokeColor:kt.strokeColor}),Yr=ce()(`${Nt}-inner`,{[`${Nt}-circle-gradient`]:ot}),Ri=rt.createElement(ht,{percent:Et(kt),strokeWidth:li,trailWidth:li,strokeColor:di,strokeLinecap:on,trailColor:Zt,prefixCls:Nt,gapDegree:xi,gapPosition:Cr});return rt.createElement("div",{className:Yr,style:Er},Sr<=20?rt.createElement(Lt.Z,{title:pr},rt.createElement("span",null,Ri)):rt.createElement(rt.Fragment,null,Ri,pr))},Kt=function(kt,Nt){var Zt={};for(var on in kt)Object.prototype.hasOwnProperty.call(kt,on)&&Nt.indexOf(on)<0&&(Zt[on]=kt[on]);if(kt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var vn=0,on=Object.getOwnPropertySymbols(kt);vn<on.length;vn++)Nt.indexOf(on[vn])<0&&Object.prototype.propertyIsEnumerable.call(kt,on[vn])&&(Zt[on[vn]]=kt[on[vn]]);return Zt};const Ct=kt=>{let Nt=[];return Object.keys(kt).forEach(Zt=>{const on=parseFloat(Zt.replace(/%/g,""));isNaN(on)||Nt.push({key:on,value:kt[Zt]})}),Nt=Nt.sort((Zt,on)=>Zt.key-on.key),Nt.map(Zt=>{let{key:on,value:vn}=Zt;return`${vn} ${on}%`}).join(", ")},gt=(kt,Nt)=>{const{from:Zt=et.presetPrimaryColors.blue,to:on=et.presetPrimaryColors.blue,direction:vn=Nt==="rtl"?"to left":"to right"}=kt,kn=Kt(kt,["from","to","direction"]);if(Object.keys(kn).length!==0){const Kn=Ct(kn);return{backgroundImage:`linear-gradient(${vn}, ${Kn})`}}return{backgroundImage:`linear-gradient(${vn}, ${Zt}, ${on})`}};var bt=kt=>{const{prefixCls:Nt,direction:Zt,percent:on,size:vn,strokeWidth:kn,strokeColor:Kn,strokeLinecap:Xn="round",children:pr,trailColor:dr=null,success:vr}=kt,Sr=Kn&&typeof Kn!="string"?gt(Kn,Zt):{backgroundColor:Kn},Fr=Xn==="square"||Xn==="butt"?0:void 0,li={backgroundColor:dr||void 0,borderRadius:Fr},Er=vn!=null?vn:[-1,kn||(vn==="small"?6:8)],[xi,Cr]=mt(Er,"line",{strokeWidth:kn}),ot=Object.assign({width:`${it(on)}%`,height:Cr,borderRadius:Fr},Sr),di=xt(kt),Yr={width:`${it(di)}%`,height:Cr,borderRadius:Fr,backgroundColor:vr==null?void 0:vr.strokeColor},Ri={width:xi<0?"100%":xi,height:Cr};return rt.createElement(rt.Fragment,null,rt.createElement("div",{className:`${Nt}-outer`,style:Ri},rt.createElement("div",{className:`${Nt}-inner`,style:li},rt.createElement("div",{className:`${Nt}-bg`,style:ot}),di!==void 0?rt.createElement("div",{className:`${Nt}-success-bg`,style:Yr}):null)),pr)},ut=kt=>{const{size:Nt,steps:Zt,percent:on=0,strokeWidth:vn=8,strokeColor:kn,trailColor:Kn=null,prefixCls:Xn,children:pr}=kt,dr=Math.round(Zt*(on/100)),vr=Nt==="small"?2:14,Sr=Nt!=null?Nt:[vr,vn],[Fr,li]=mt(Sr,"step",{steps:Zt,strokeWidth:vn}),Er=Fr/Zt,xi=new Array(Zt);for(let Cr=0;Cr<Zt;Cr++){const ot=Array.isArray(kn)?kn[Cr]:kn;xi[Cr]=rt.createElement("div",{key:Cr,className:ce()(`${Xn}-steps-item`,{[`${Xn}-steps-item-active`]:Cr<=dr-1}),style:{backgroundColor:Cr<=dr-1?ot:Kn,width:Er,height:li}})}return rt.createElement("div",{className:`${Xn}-steps-outer`},xi,pr)},wt=$e(9792),yt=$e(17313),lt=$e(83116),Qe=$e(37613);const We=kt=>{const Nt=kt?"100%":"-100%";return new wt.Keyframes(`antProgress${kt?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${Nt}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${Nt}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},Ue=kt=>{const{componentCls:Nt,iconCls:Zt}=kt;return{[Nt]:Object.assign(Object.assign({},(0,yt.Wf)(kt)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:kt.fontSize,marginInlineEnd:kt.marginXS,marginBottom:kt.marginXS},[`${Nt}-outer`]:{display:"inline-block",width:"100%"},[`&${Nt}-show-info`]:{[`${Nt}-outer`]:{marginInlineEnd:`calc(-2em - ${kt.marginXS}px)`,paddingInlineEnd:`calc(2em + ${kt.paddingXS}px)`}},[`${Nt}-inner`]:{position:"relative",display:"inline-block",width:"100%",overflow:"hidden",verticalAlign:"middle",backgroundColor:kt.remainingColor,borderRadius:kt.lineBorderRadius},[`${Nt}-inner:not(${Nt}-circle-gradient)`]:{[`${Nt}-circle-path`]:{stroke:kt.defaultColor}},[`${Nt}-success-bg, ${Nt}-bg`]:{position:"relative",backgroundColor:kt.defaultColor,borderRadius:kt.lineBorderRadius,transition:`all ${kt.motionDurationSlow} ${kt.motionEaseInOutCirc}`},[`${Nt}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:kt.colorSuccess},[`${Nt}-text`]:{display:"inline-block",width:"2em",marginInlineStart:kt.marginXS,color:kt.colorText,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[Zt]:{fontSize:kt.fontSize}},[`&${Nt}-status-active`]:{[`${Nt}-bg::before`]:{position:"absolute",inset:0,backgroundColor:kt.colorBgContainer,borderRadius:kt.lineBorderRadius,opacity:0,animationName:We(),animationDuration:kt.progressActiveMotionDuration,animationTimingFunction:kt.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${Nt}-rtl${Nt}-status-active`]:{[`${Nt}-bg::before`]:{animationName:We(!0)}},[`&${Nt}-status-exception`]:{[`${Nt}-bg`]:{backgroundColor:kt.colorError},[`${Nt}-text`]:{color:kt.colorError}},[`&${Nt}-status-exception ${Nt}-inner:not(${Nt}-circle-gradient)`]:{[`${Nt}-circle-path`]:{stroke:kt.colorError}},[`&${Nt}-status-success`]:{[`${Nt}-bg`]:{backgroundColor:kt.colorSuccess},[`${Nt}-text`]:{color:kt.colorSuccess}},[`&${Nt}-status-success ${Nt}-inner:not(${Nt}-circle-gradient)`]:{[`${Nt}-circle-path`]:{stroke:kt.colorSuccess}}})}},qe=kt=>{const{componentCls:Nt,iconCls:Zt}=kt;return{[Nt]:{[`${Nt}-circle-trail`]:{stroke:kt.remainingColor},[`&${Nt}-circle ${Nt}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${Nt}-circle ${Nt}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:kt.circleTextColor,fontSize:kt.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[Zt]:{fontSize:`${kt.fontSize/kt.fontSizeSM}em`}},[`${Nt}-circle&-status-exception`]:{[`${Nt}-text`]:{color:kt.colorError}},[`${Nt}-circle&-status-success`]:{[`${Nt}-text`]:{color:kt.colorSuccess}}},[`${Nt}-inline-circle`]:{lineHeight:1,[`${Nt}-inner`]:{verticalAlign:"bottom"}}}},He=kt=>{const{componentCls:Nt}=kt;return{[Nt]:{[`${Nt}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:kt.progressStepMinWidth,marginInlineEnd:kt.progressStepMarginInlineEnd,backgroundColor:kt.remainingColor,transition:`all ${kt.motionDurationSlow}`,"&-active":{backgroundColor:kt.defaultColor}}}}}},De=kt=>{const{componentCls:Nt,iconCls:Zt}=kt;return{[Nt]:{[`${Nt}-small&-line, ${Nt}-small&-line ${Nt}-text ${Zt}`]:{fontSize:kt.fontSizeSM}}}};var Le=(0,lt.Z)("Progress",kt=>{const Nt=kt.marginXXS/2,Zt=(0,Qe.TS)(kt,{progressStepMarginInlineEnd:Nt,progressStepMinWidth:Nt,progressActiveMotionDuration:"2.4s"});return[Ue(Zt),qe(Zt),He(Zt),De(Zt)]},kt=>({circleTextColor:kt.colorText,defaultColor:kt.colorInfo,remainingColor:kt.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em"})),Ve=function(kt,Nt){var Zt={};for(var on in kt)Object.prototype.hasOwnProperty.call(kt,on)&&Nt.indexOf(on)<0&&(Zt[on]=kt[on]);if(kt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var vn=0,on=Object.getOwnPropertySymbols(kt);vn<on.length;vn++)Nt.indexOf(on[vn])<0&&Object.prototype.propertyIsEnumerable.call(kt,on[vn])&&(Zt[on[vn]]=kt[on[vn]]);return Zt};const dt=null,Ze=["normal","exception","active","success"];var _t=rt.forwardRef((kt,Nt)=>{const{prefixCls:Zt,className:on,rootClassName:vn,steps:kn,strokeColor:Kn,percent:Xn=0,size:pr="default",showInfo:dr=!0,type:vr="line",status:Sr,format:Fr,style:li}=kt,Er=Ve(kt,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style"]),xi=rt.useMemo(()=>{var Ut,xn;const jn=xt(kt);return parseInt(jn!==void 0?(Ut=jn!=null?jn:0)===null||Ut===void 0?void 0:Ut.toString():(xn=Xn!=null?Xn:0)===null||xn===void 0?void 0:xn.toString(),10)},[Xn,kt.success,kt.successPercent]),Cr=rt.useMemo(()=>!Ze.includes(Sr)&&xi>=100?"success":Sr||"normal",[Sr,xi]),{getPrefixCls:ot,direction:di,progress:Yr}=rt.useContext(Ce.E_),Ri=ot("progress",Zt),[hr,Ir]=Le(Ri),Rr=rt.useMemo(()=>{if(!dr)return null;const Ut=xt(kt);let xn;const jn=Fr||(Gt=>`${Gt}%`),en=vr==="line";return Fr||Cr!=="exception"&&Cr!=="success"?xn=jn(it(Xn),it(Ut)):Cr==="exception"?xn=en?rt.createElement(Re.Z,null):rt.createElement(je.Z,null):Cr==="success"&&(xn=en?rt.createElement(St.Z,null):rt.createElement(ie.Z,null)),rt.createElement("span",{className:`${Ri}-text`,title:typeof xn=="string"?xn:void 0},xn)},[dr,Xn,xi,Cr,vr,Ri,Fr]),yi=Array.isArray(Kn)?Kn[0]:Kn,dn=typeof Kn=="string"||Array.isArray(Kn)?Kn:void 0;let mn;vr==="line"?mn=kn?rt.createElement(ut,Object.assign({},kt,{strokeColor:dn,prefixCls:Ri,steps:kn}),Rr):rt.createElement(bt,Object.assign({},kt,{strokeColor:yi,prefixCls:Ri,direction:di}),Rr):(vr==="circle"||vr==="dashboard")&&(mn=rt.createElement(At,Object.assign({},kt,{strokeColor:yi,prefixCls:Ri,progressStatus:Cr}),Rr));const un=ce()(Ri,`${Ri}-status-${Cr}`,`${Ri}-${vr==="dashboard"&&"circle"||kn&&"steps"||vr}`,{[`${Ri}-inline-circle`]:vr==="circle"&&mt(pr,"circle")[0]<=20,[`${Ri}-show-info`]:dr,[`${Ri}-${pr}`]:typeof pr=="string",[`${Ri}-rtl`]:di==="rtl"},Yr==null?void 0:Yr.className,on,vn,Ir);return hr(rt.createElement("div",Object.assign({ref:Nt,style:Object.assign(Object.assign({},Yr==null?void 0:Yr.style),li),className:un,role:"progressbar","aria-valuenow":xi},(0,be.Z)(Er,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),mn))}),Qt=_t},57809:function(bn,ln,$e){"use strict";var rt=$e(92310),St=$e.n(rt),ie=$e(77861),Re=$e(64002),je=$e(59301),ve=$e(53487),ce=$e(62892),be=$e(19080),Ce=$e(36355),ye=$e(1684),we=$e(93891),me=$e(19716),xe=$e(32441),fe=$e(33234),z=$e(14154),ee=$e(58582),ae=$e(84443),re=$e(66339),le=function(Ie,ke){var Ae={};for(var Oe in Ie)Object.prototype.hasOwnProperty.call(Ie,Oe)&&ke.indexOf(Oe)<0&&(Ae[Oe]=Ie[Oe]);if(Ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Fe=0,Oe=Object.getOwnPropertySymbols(Ie);Fe<Oe.length;Fe++)ke.indexOf(Oe[Fe])<0&&Object.prototype.propertyIsEnumerable.call(Ie,Oe[Fe])&&(Ae[Oe[Fe]]=Ie[Oe[Fe]]);return Ae};const ue="SECRET_COMBOBOX_MODE_DO_NOT_USE",pe=(Ie,ke)=>{var Ae,{prefixCls:Oe,bordered:Fe=!0,className:_e,rootClassName:Ye,getPopupContainer:ze,popupClassName:Xe,dropdownClassName:st,listHeight:ht=256,placement:ft,listItemHeight:Lt=24,size:et,disabled:it,notFoundContent:xt,status:Et,builtinPlacements:Mt,dropdownMatchSelectWidth:mt,popupMatchSelectWidth:pt,direction:vt,style:jt,allowClear:At}=Ie,Kt=le(Ie,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:Ct,getPrefixCls:gt,renderEmpty:tt,direction:bt,virtual:Ke,popupMatchSelectWidth:ut,popupOverflow:wt,select:yt}=je.useContext(Ce.E_),lt=gt("select",Oe),Qe=gt(),We=vt!=null?vt:bt,{compactSize:Ue,compactItemClassnames:qe}=(0,fe.ri)(lt,We),[He,De]=(0,z.Z)(lt),Le=je.useMemo(()=>{const{mode:Cr}=Kt;if(Cr!=="combobox")return Cr===ue?"combobox":Cr},[Kt.mode]),Ve=Le==="multiple"||Le==="tags",dt=(0,ae.Z)(Kt.suffixIcon,Kt.showArrow),Ze=(Ae=pt!=null?pt:mt)!==null&&Ae!==void 0?Ae:ut,{status:Tt,hasFeedback:_t,isFormItemInput:Qt,feedbackIcon:kt}=je.useContext(xe.aM),Nt=(0,be.F)(Tt,Et);let Zt;xt!==void 0?Zt=xt:Le==="combobox"?Zt=null:Zt=(tt==null?void 0:tt("Select"))||je.createElement(we.Z,{componentName:"Select"});const{suffixIcon:on,itemIcon:vn,removeIcon:kn,clearIcon:Kn}=(0,re.Z)(Object.assign(Object.assign({},Kt),{multiple:Ve,hasFeedback:_t,feedbackIcon:kt,showSuffixIcon:dt,prefixCls:lt,showArrow:Kt.showArrow,componentName:"Select"})),Xn=At===!0?{clearIcon:Kn}:At,pr=(0,Re.Z)(Kt,["suffixIcon","itemIcon"]),dr=St()(Xe||st,{[`${lt}-dropdown-${We}`]:We==="rtl"},Ye,De),vr=(0,me.Z)(Cr=>{var ot;return(ot=et!=null?et:Ue)!==null&&ot!==void 0?ot:Cr}),Sr=je.useContext(ye.Z),Fr=it!=null?it:Sr,li=St()({[`${lt}-lg`]:vr==="large",[`${lt}-sm`]:vr==="small",[`${lt}-rtl`]:We==="rtl",[`${lt}-borderless`]:!Fe,[`${lt}-in-form-item`]:Qt},(0,be.Z)(lt,Nt,_t),qe,yt==null?void 0:yt.className,_e,Ye,De),Er=je.useMemo(()=>ft!==void 0?ft:We==="rtl"?"bottomRight":"bottomLeft",[ft,We]),xi=(0,ee.Z)(Mt,wt);return He(je.createElement(ie.ZP,Object.assign({ref:ke,virtual:Ke,showSearch:yt==null?void 0:yt.showSearch},pr,{style:Object.assign(Object.assign({},yt==null?void 0:yt.style),jt),dropdownMatchSelectWidth:Ze,builtinPlacements:xi,transitionName:(0,ce.m)(Qe,"slide-up",Kt.transitionName),listHeight:ht,listItemHeight:Lt,mode:Le,prefixCls:lt,placement:Er,direction:We,suffixIcon:on,menuItemSelectedIcon:vn,removeIcon:kn,allowClear:Xn,notFoundContent:Zt,className:li,getPopupContainer:ze||Ct,dropdownClassName:dr,disabled:Fr})))},Ee=je.forwardRef(pe),Pe=(0,ve.Z)(Ee);Ee.SECRET_COMBOBOX_MODE_DO_NOT_USE=ue,Ee.Option=ie.Wx,Ee.OptGroup=ie.Xo,Ee._InternalPanelDoNotUseOrYouWillBeFired=Pe,ln.default=Ee},14154:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return Ee}});var rt=$e(17313),St=$e(74207),ie=$e(37613),Re=$e(83116),je=$e(13826),ve=$e(92899);const ce=Pe=>{const{optionHeight:Ie,optionFontSize:ke,optionLineHeight:Ae,optionPadding:Oe}=Pe;return{position:"relative",display:"block",minHeight:Ie,padding:Oe,color:Pe.colorText,fontWeight:"normal",fontSize:ke,lineHeight:Ae,boxSizing:"border-box"}};var Ce=Pe=>{const{antCls:Ie,componentCls:ke}=Pe,Ae=`${ke}-item`,Oe=`&${Ie}-slide-up-enter${Ie}-slide-up-enter-active`,Fe=`&${Ie}-slide-up-appear${Ie}-slide-up-appear-active`,_e=`&${Ie}-slide-up-leave${Ie}-slide-up-leave-active`,Ye=`${ke}-dropdown-placement-`;return[{[`${ke}-dropdown`]:Object.assign(Object.assign({},(0,rt.Wf)(Pe)),{position:"absolute",top:-9999,zIndex:Pe.zIndexPopup,boxSizing:"border-box",padding:Pe.paddingXXS,overflow:"hidden",fontSize:Pe.fontSize,fontVariant:"initial",backgroundColor:Pe.colorBgElevated,borderRadius:Pe.borderRadiusLG,outline:"none",boxShadow:Pe.boxShadowSecondary,[`
${Oe}${Ye}bottomLeft,
${Fe}${Ye}bottomLeft
`]:{animationName:je.fJ},[`
${Oe}${Ye}topLeft,
${Fe}${Ye}topLeft,
${Oe}${Ye}topRight,
${Fe}${Ye}topRight
`]:{animationName:je.Qt},[`${_e}${Ye}bottomLeft`]:{animationName:je.Uw},[`
${_e}${Ye}topLeft,
${_e}${Ye}topRight
`]:{animationName:je.ly},"&-hidden":{display:"none"},[`${Ae}`]:Object.assign(Object.assign({},ce(Pe)),{cursor:"pointer",transition:`background ${Pe.motionDurationSlow} ease`,borderRadius:Pe.borderRadiusSM,"&-group":{color:Pe.colorTextDescription,fontSize:Pe.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},rt.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${Ae}-option-disabled)`]:{backgroundColor:Pe.optionActiveBg},[`&-selected:not(${Ae}-option-disabled)`]:{color:Pe.optionSelectedColor,fontWeight:Pe.optionSelectedFontWeight,backgroundColor:Pe.optionSelectedBg,[`${Ae}-option-state`]:{color:Pe.colorPrimary}},"&-disabled":{[`&${Ae}-option-selected`]:{backgroundColor:Pe.colorBgContainerDisabled},color:Pe.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:Pe.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,je.oN)(Pe,"slide-up"),(0,je.oN)(Pe,"slide-down"),(0,ve.Fm)(Pe,"move-up"),(0,ve.Fm)(Pe,"move-down")]};const ye=2,we=Pe=>{let{controlHeightSM:Ie,controlHeight:ke,lineWidth:Ae}=Pe;const Oe=(ke-Ie)/2-Ae,Fe=Math.ceil(Oe/2);return[Oe,Fe]};function me(Pe,Ie){const{componentCls:ke,iconCls:Ae}=Pe,Oe=`${ke}-selection-overflow`,Fe=Pe.multipleSelectItemHeight,[_e]=we(Pe),Ye=Ie?`${ke}-${Ie}`:"";return{[`${ke}-multiple${Ye}`]:{fontSize:Pe.fontSize,[Oe]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${ke}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${_e-ye}px ${ye*2}px`,borderRadius:Pe.borderRadius,[`${ke}-show-search&`]:{cursor:"text"},[`${ke}-disabled&`]:{background:Pe.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${ye}px 0`,lineHeight:`${Fe}px`,visibility:"hidden",content:'"\\a0"'}},[`
&${ke}-show-arrow ${ke}-selector,
&${ke}-allow-clear ${ke}-selector
`]:{paddingInlineEnd:Pe.fontSizeIcon+Pe.controlPaddingHorizontal},[`${ke}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:Fe,marginTop:ye,marginBottom:ye,lineHeight:`${Fe-Pe.lineWidth*2}px`,background:Pe.multipleItemBg,border:`${Pe.lineWidth}px ${Pe.lineType} ${Pe.multipleItemBorderColor}`,borderRadius:Pe.borderRadiusSM,cursor:"default",transition:`font-size ${Pe.motionDurationSlow}, line-height ${Pe.motionDurationSlow}, height ${Pe.motionDurationSlow}`,userSelect:"none",marginInlineEnd:ye*2,paddingInlineStart:Pe.paddingXS,paddingInlineEnd:Pe.paddingXS/2,[`${ke}-disabled&`]:{color:Pe.multipleItemColorDisabled,borderColor:Pe.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:Pe.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,rt.Ro)()),{display:"inline-flex",alignItems:"center",color:Pe.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${Ae}`]:{verticalAlign:"-0.2em"},"&:hover":{color:Pe.colorIconHover}})},[`${Oe}-item + ${Oe}-item`]:{[`${ke}-selection-search`]:{marginInlineStart:0}},[`${ke}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:Pe.inputPaddingHorizontalBase-_e,"\n &-input,\n &-mirror\n ":{height:Fe,fontFamily:Pe.fontFamily,lineHeight:`${Fe}px`,transition:`all ${Pe.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${ke}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:Pe.inputPaddingHorizontalBase,insetInlineEnd:Pe.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${Pe.motionDurationSlow}`}}}}var fe=Pe=>{const{componentCls:Ie}=Pe,ke=(0,ie.TS)(Pe,{controlHeight:Pe.controlHeightSM,multipleSelectItemHeight:Pe.controlHeightXS,borderRadius:Pe.borderRadiusSM,borderRadiusSM:Pe.borderRadiusXS}),Ae=(0,ie.TS)(Pe,{fontSize:Pe.fontSizeLG,controlHeight:Pe.controlHeightLG,multipleSelectItemHeight:Pe.multipleItemHeightLG,borderRadius:Pe.borderRadiusLG,borderRadiusSM:Pe.borderRadius}),[,Oe]=we(Pe);return[me(Pe),me(ke,"sm"),{[`${Ie}-multiple${Ie}-sm`]:{[`${Ie}-selection-placeholder`]:{insetInline:Pe.controlPaddingHorizontalSM-Pe.lineWidth},[`${Ie}-selection-search`]:{marginInlineStart:Oe}}},me(Ae,"lg")]};function z(Pe,Ie){const{componentCls:ke,inputPaddingHorizontalBase:Ae,borderRadius:Oe}=Pe,Fe=Pe.controlHeight-Pe.lineWidth*2,_e=Math.ceil(Pe.fontSize*1.25),Ye=Ie?`${ke}-${Ie}`:"";return{[`${ke}-single${Ye}`]:{fontSize:Pe.fontSize,[`${ke}-selector`]:Object.assign(Object.assign({},(0,rt.Wf)(Pe)),{display:"flex",borderRadius:Oe,[`${ke}-selection-search`]:{position:"absolute",top:0,insetInlineStart:Ae,insetInlineEnd:Ae,bottom:0,"&-input":{width:"100%"}},[`
${ke}-selection-item,
${ke}-selection-placeholder
`]:{padding:0,lineHeight:`${Fe}px`,transition:`all ${Pe.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${Fe}px`}},[`${ke}-selection-item`]:{position:"relative",userSelect:"none"},[`${ke}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${ke}-selection-item:after`,`${ke}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
&${ke}-show-arrow ${ke}-selection-item,
&${ke}-show-arrow ${ke}-selection-placeholder
`]:{paddingInlineEnd:_e},[`&${ke}-open ${ke}-selection-item`]:{color:Pe.colorTextPlaceholder},[`&:not(${ke}-customize-input)`]:{[`${ke}-selector`]:{width:"100%",height:Pe.controlHeight,padding:`0 ${Ae}px`,[`${ke}-selection-search-input`]:{height:Fe},"&:after":{lineHeight:`${Fe}px`}}},[`&${ke}-customize-input`]:{[`${ke}-selector`]:{"&:after":{display:"none"},[`${ke}-selection-search`]:{position:"static",width:"100%"},[`${ke}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${Ae}px`,"&:after":{display:"none"}}}}}}}function ee(Pe){const{componentCls:Ie}=Pe,ke=Pe.controlPaddingHorizontalSM-Pe.lineWidth;return[z(Pe),z((0,ie.TS)(Pe,{controlHeight:Pe.controlHeightSM,borderRadius:Pe.borderRadiusSM}),"sm"),{[`${Ie}-single${Ie}-sm`]:{[`&:not(${Ie}-customize-input)`]:{[`${Ie}-selection-search`]:{insetInlineStart:ke,insetInlineEnd:ke},[`${Ie}-selector`]:{padding:`0 ${ke}px`},[`&${Ie}-show-arrow ${Ie}-selection-search`]:{insetInlineEnd:ke+Pe.fontSize*1.5},[`
&${Ie}-show-arrow ${Ie}-selection-item,
&${Ie}-show-arrow ${Ie}-selection-placeholder
`]:{paddingInlineEnd:Pe.fontSize*1.5}}}},z((0,ie.TS)(Pe,{controlHeight:Pe.singleItemHeightLG,fontSize:Pe.fontSizeLG,borderRadius:Pe.borderRadiusLG}),"lg")]}const ae=Pe=>{const{componentCls:Ie,selectorBg:ke}=Pe;return{position:"relative",backgroundColor:ke,border:`${Pe.lineWidth}px ${Pe.lineType} ${Pe.colorBorder}`,transition:`all ${Pe.motionDurationMid} ${Pe.motionEaseInOut}`,input:{cursor:"pointer"},[`${Ie}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${Ie}-disabled&`]:{color:Pe.colorTextDisabled,background:Pe.colorBgContainerDisabled,cursor:"not-allowed",[`${Ie}-multiple&`]:{background:Pe.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},re=function(Pe,Ie){let ke=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:Ae,borderHoverColor:Oe,outlineColor:Fe,antCls:_e}=Ie,Ye=ke?{[`${Ae}-selector`]:{borderColor:Oe}}:{};return{[Pe]:{[`&:not(${Ae}-disabled):not(${Ae}-customize-input):not(${_e}-pagination-size-changer)`]:Object.assign(Object.assign({},Ye),{[`${Ae}-focused& ${Ae}-selector`]:{borderColor:Oe,boxShadow:`0 0 0 ${Ie.controlOutlineWidth}px ${Fe}`,outline:0},[`&:hover ${Ae}-selector`]:{borderColor:Oe}})}}},le=Pe=>{const{componentCls:Ie}=Pe;return{[`${Ie}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},ue=Pe=>{const{componentCls:Ie,inputPaddingHorizontalBase:ke,iconCls:Ae}=Pe;return{[Ie]:Object.assign(Object.assign({},(0,rt.Wf)(Pe)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${Ie}-customize-input) ${Ie}-selector`]:Object.assign(Object.assign({},ae(Pe)),le(Pe)),[`${Ie}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},rt.vS),[`${Ie}-selection-placeholder`]:Object.assign(Object.assign({},rt.vS),{flex:1,color:Pe.colorTextPlaceholder,pointerEvents:"none"}),[`${Ie}-arrow`]:Object.assign(Object.assign({},(0,rt.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:ke,height:Pe.fontSizeIcon,marginTop:-Pe.fontSizeIcon/2,color:Pe.colorTextQuaternary,fontSize:Pe.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[Ae]:{verticalAlign:"top",transition:`transform ${Pe.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${Ie}-suffix)`]:{pointerEvents:"auto"}},[`${Ie}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${Ie}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:ke,zIndex:1,display:"inline-block",width:Pe.fontSizeIcon,height:Pe.fontSizeIcon,marginTop:-Pe.fontSizeIcon/2,color:Pe.colorTextQuaternary,fontSize:Pe.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:Pe.clearBg,cursor:"pointer",opacity:0,transition:`color ${Pe.motionDurationMid} ease, opacity ${Pe.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:Pe.colorTextTertiary}},"&:hover":{[`${Ie}-clear`]:{opacity:1}}}),[`${Ie}-has-feedback`]:{[`${Ie}-clear`]:{insetInlineEnd:ke+Pe.fontSize+Pe.paddingXS}}}},pe=Pe=>{const{componentCls:Ie}=Pe;return[{[Ie]:{[`&-borderless ${Ie}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${Ie}-in-form-item`]:{width:"100%"}}},ue(Pe),ee(Pe),fe(Pe),Ce(Pe),{[`${Ie}-rtl`]:{direction:"rtl"}},re(Ie,(0,ie.TS)(Pe,{borderHoverColor:Pe.colorPrimaryHover,outlineColor:Pe.controlOutline})),re(`${Ie}-status-error`,(0,ie.TS)(Pe,{borderHoverColor:Pe.colorErrorHover,outlineColor:Pe.colorErrorOutline}),!0),re(`${Ie}-status-warning`,(0,ie.TS)(Pe,{borderHoverColor:Pe.colorWarningHover,outlineColor:Pe.colorWarningOutline}),!0),(0,St.c)(Pe,{borderElCls:`${Ie}-selector`,focusElCls:`${Ie}-focused`})]};var Ee=(0,Re.Z)("Select",(Pe,Ie)=>{let{rootPrefixCls:ke}=Ie;const Ae=(0,ie.TS)(Pe,{rootPrefixCls:ke,inputPaddingHorizontalBase:Pe.paddingSM-1,multipleSelectItemHeight:Pe.multipleItemHeight});return[pe(Ae)]},Pe=>{const{fontSize:Ie,lineHeight:ke,controlHeight:Ae,controlPaddingHorizontal:Oe,zIndexPopupBase:Fe,colorText:_e,fontWeightStrong:Ye,controlItemBgActive:ze,controlItemBgHover:Xe,colorBgContainer:st,colorFillSecondary:ht,controlHeightLG:ft,controlHeightSM:Lt,colorBgContainerDisabled:et,colorTextDisabled:it}=Pe;return{zIndexPopup:Fe+50,optionSelectedColor:_e,optionSelectedFontWeight:Ye,optionSelectedBg:ze,optionActiveBg:Xe,optionPadding:`${(Ae-Ie*ke)/2}px ${Oe}px`,optionFontSize:Ie,optionLineHeight:ke,optionHeight:Ae,selectorBg:st,clearBg:st,singleItemHeightLG:ft,multipleItemBg:ht,multipleItemBorderColor:"transparent",multipleItemHeight:Lt,multipleItemHeightLG:Ae,multipleSelectorBgDisabled:et,multipleItemColorDisabled:it,multipleItemBorderColorDisabled:"transparent"}})},58582:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return St}});const rt=ie=>{const je={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:ie==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},je),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},je),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},je),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},je),{points:["br","tr"],offset:[0,-4]})}};function St(ie,Re){return ie||rt(Re)}},84443:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return rt}});function rt(St,ie){return ie!==void 0?ie:St!==null}},66339:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return be}});var rt=$e(10402),St=$e(33130),ie=$e(72119),Re=$e(18290),je=$e(50023),ve=$e(21970),ce=$e(59301);function be(Ce){let{suffixIcon:ye,clearIcon:we,menuItemSelectedIcon:me,removeIcon:xe,loading:fe,multiple:z,hasFeedback:ee,prefixCls:ae,showSuffixIcon:re,feedbackIcon:le,showArrow:ue,componentName:pe}=Ce;const Ee=we!=null?we:ce.createElement(St.Z,null),Pe=Oe=>ye===null&&!ee&&!ue?null:ce.createElement(ce.Fragment,null,re!==!1&&Oe,ee&&le);let Ie=null;if(ye!==void 0)Ie=Pe(ye);else if(fe)Ie=Pe(ce.createElement(je.Z,{spin:!0}));else{const Oe=`${ae}-suffix`;Ie=Fe=>{let{open:_e,showSearch:Ye}=Fe;return Pe(_e&&Ye?ce.createElement(ve.Z,{className:Oe}):ce.createElement(Re.Z,{className:Oe}))}}let ke=null;me!==void 0?ke=me:z?ke=ce.createElement(rt.Z,null):ke=null;let Ae=null;return xe!==void 0?Ae=xe:Ae=ce.createElement(ie.Z,null),{clearIcon:Ee,suffixIcon:Ie,itemIcon:ke,removeIcon:Ae}}},81327:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return ae}});var rt=$e(59301),St=$e(92310),ie=$e.n(St),Re=$e(38298),je=$e(36355),ve=$e(33234);const ce=rt.createContext({latestIndex:0}),be=ce.Provider;var ye=re=>{let{className:le,index:ue,children:pe,split:Ee,style:Pe}=re;const{latestIndex:Ie}=rt.useContext(ce);return pe==null?null:rt.createElement(rt.Fragment,null,rt.createElement("div",{className:le,style:Pe},pe),ue<Ie&&Ee&&rt.createElement("span",{className:`${le}-split`},Ee))},we=$e(2856);function me(re){return["small","middle","large"].includes(re)}function xe(re){return re?typeof re=="number"&&!Number.isNaN(re):!1}var fe=function(re,le){var ue={};for(var pe in re)Object.prototype.hasOwnProperty.call(re,pe)&&le.indexOf(pe)<0&&(ue[pe]=re[pe]);if(re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ee=0,pe=Object.getOwnPropertySymbols(re);Ee<pe.length;Ee++)le.indexOf(pe[Ee])<0&&Object.prototype.propertyIsEnumerable.call(re,pe[Ee])&&(ue[pe[Ee]]=re[pe[Ee]]);return ue};const ee=rt.forwardRef((re,le)=>{var ue,pe;const{getPrefixCls:Ee,space:Pe,direction:Ie}=rt.useContext(je.E_),{size:ke=(Pe==null?void 0:Pe.size)||"small",align:Ae,className:Oe,rootClassName:Fe,children:_e,direction:Ye="horizontal",prefixCls:ze,split:Xe,style:st,wrap:ht=!1,classNames:ft,styles:Lt}=re,et=fe(re,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[it,xt]=Array.isArray(ke)?ke:[ke,ke],Et=me(xt),Mt=me(it),mt=xe(xt),pt=xe(it),vt=(0,Re.Z)(_e,{keepEmpty:!0}),jt=Ae===void 0&&Ye==="horizontal"?"center":Ae,At=Ee("space",ze),[Kt,Ct]=(0,we.Z)(At),gt=ie()(At,Pe==null?void 0:Pe.className,Ct,`${At}-${Ye}`,{[`${At}-rtl`]:Ie==="rtl",[`${At}-align-${jt}`]:jt,[`${At}-gap-row-${xt}`]:Et,[`${At}-gap-col-${it}`]:Mt},Oe,Fe),tt=ie()(`${At}-item`,(ue=ft==null?void 0:ft.item)!==null&&ue!==void 0?ue:(pe=Pe==null?void 0:Pe.classNames)===null||pe===void 0?void 0:pe.item);let bt=0;const Ke=vt.map((yt,lt)=>{var Qe,We;yt!=null&&(bt=lt);const Ue=yt&&yt.key||`${tt}-${lt}`;return rt.createElement(ye,{className:tt,key:Ue,index:lt,split:Xe,style:(Qe=Lt==null?void 0:Lt.item)!==null&&Qe!==void 0?Qe:(We=Pe==null?void 0:Pe.styles)===null||We===void 0?void 0:We.item},yt)}),ut=rt.useMemo(()=>({latestIndex:bt}),[bt]);if(vt.length===0)return null;const wt={};return ht&&(wt.flexWrap="wrap"),!Mt&&pt&&(wt.columnGap=it),!Et&&mt&&(wt.rowGap=xt),Kt(rt.createElement("div",Object.assign({ref:le,className:gt,style:Object.assign(Object.assign(Object.assign({},wt),Pe==null?void 0:Pe.style),st)},et),rt.createElement(be,{value:ut},Ke)))});ee.Compact=ve.ZP;var ae=ee},15969:function(bn,ln,$e){"use strict";$e.d(ln,{N:function(){return rt}});const rt=St=>({color:St.colorLink,textDecoration:"none",outline:"none",cursor:"pointer",transition:`color ${St.motionDurationSlow}`,"&:focus, &:hover":{color:St.colorLinkHover},"&:active":{color:St.colorLinkActive}})},78673:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return Ye}});var rt=$e(50023),St=$e(92310),ie=$e.n(St),Re=$e(5891),je=$e(80962),ve=$e(29043),ce=$e(19149),be=$e(59301),Ce=$e(35788),ye=$e(85108),we=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],me=be.forwardRef(function(ze,Xe){var st,ht=ze.prefixCls,ft=ht===void 0?"rc-switch":ht,Lt=ze.className,et=ze.checked,it=ze.defaultChecked,xt=ze.disabled,Et=ze.loadingIcon,Mt=ze.checkedChildren,mt=ze.unCheckedChildren,pt=ze.onClick,vt=ze.onChange,jt=ze.onKeyDown,At=(0,ce.Z)(ze,we),Kt=(0,Ce.Z)(!1,{value:et,defaultValue:it}),Ct=(0,ve.Z)(Kt,2),gt=Ct[0],tt=Ct[1];function bt(yt,lt){var Qe=gt;return xt||(Qe=yt,tt(Qe),vt==null||vt(Qe,lt)),Qe}function Ke(yt){yt.which===ye.Z.LEFT?bt(!1,yt):yt.which===ye.Z.RIGHT&&bt(!0,yt),jt==null||jt(yt)}function ut(yt){var lt=bt(!gt,yt);pt==null||pt(lt,yt)}var wt=ie()(ft,Lt,(st={},(0,je.Z)(st,"".concat(ft,"-checked"),gt),(0,je.Z)(st,"".concat(ft,"-disabled"),xt),st));return be.createElement("button",(0,Re.Z)({},At,{type:"button",role:"switch","aria-checked":gt,disabled:xt,className:wt,ref:Xe,onKeyDown:Ke,onClick:ut}),Et,be.createElement("span",{className:"".concat(ft,"-inner")},be.createElement("span",{className:"".concat(ft,"-inner-checked")},Mt),be.createElement("span",{className:"".concat(ft,"-inner-unchecked")},mt)))});me.displayName="Switch";var xe=me,fe=$e(14088),z=$e(36355),ee=$e(1684),ae=$e(19716),re=$e(64993),le=$e(17313),ue=$e(83116),pe=$e(37613);const Ee=ze=>{const{componentCls:Xe,trackHeightSM:st,trackPadding:ht,trackMinWidthSM:ft,innerMinMarginSM:Lt,innerMaxMarginSM:et,handleSizeSM:it}=ze,xt=`${Xe}-inner`;return{[Xe]:{[`&${Xe}-small`]:{minWidth:ft,height:st,lineHeight:`${st}px`,[`${Xe}-inner`]:{paddingInlineStart:et,paddingInlineEnd:Lt,[`${xt}-checked`]:{marginInlineStart:`calc(-100% + ${it+ht*2}px - ${et*2}px)`,marginInlineEnd:`calc(100% - ${it+ht*2}px + ${et*2}px)`},[`${xt}-unchecked`]:{marginTop:-st,marginInlineStart:0,marginInlineEnd:0}},[`${Xe}-handle`]:{width:it,height:it},[`${Xe}-loading-icon`]:{top:(it-ze.switchLoadingIconSize)/2,fontSize:ze.switchLoadingIconSize},[`&${Xe}-checked`]:{[`${Xe}-inner`]:{paddingInlineStart:Lt,paddingInlineEnd:et,[`${xt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${xt}-unchecked`]:{marginInlineStart:`calc(100% - ${it+ht*2}px + ${et*2}px)`,marginInlineEnd:`calc(-100% + ${it+ht*2}px - ${et*2}px)`}},[`${Xe}-handle`]:{insetInlineStart:`calc(100% - ${it+ht}px)`}},[`&:not(${Xe}-disabled):active`]:{[`&:not(${Xe}-checked) ${xt}`]:{[`${xt}-unchecked`]:{marginInlineStart:ze.marginXXS/2,marginInlineEnd:-ze.marginXXS/2}},[`&${Xe}-checked ${xt}`]:{[`${xt}-checked`]:{marginInlineStart:-ze.marginXXS/2,marginInlineEnd:ze.marginXXS/2}}}}}}},Pe=ze=>{const{componentCls:Xe,handleSize:st}=ze;return{[Xe]:{[`${Xe}-loading-icon${ze.iconCls}`]:{position:"relative",top:(st-ze.fontSize)/2,color:ze.switchLoadingIconColor,verticalAlign:"top"},[`&${Xe}-checked ${Xe}-loading-icon`]:{color:ze.switchColor}}}},Ie=ze=>{const{componentCls:Xe,motion:st,trackPadding:ht,handleBg:ft,handleShadow:Lt,handleSize:et}=ze,it=`${Xe}-handle`;return{[Xe]:{[it]:{position:"absolute",top:ht,insetInlineStart:ht,width:et,height:et,transition:`all ${ze.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:ft,borderRadius:et/2,boxShadow:Lt,transition:`all ${ze.switchDuration} ease-in-out`,content:'""'}},[`&${Xe}-checked ${it}`]:{insetInlineStart:`calc(100% - ${et+ht}px)`},[`&:not(${Xe}-disabled):active`]:st?{[`${it}::before`]:{insetInlineEnd:ze.switchHandleActiveInset,insetInlineStart:0},[`&${Xe}-checked ${it}::before`]:{insetInlineEnd:0,insetInlineStart:ze.switchHandleActiveInset}}:{}}}},ke=ze=>{const{componentCls:Xe,trackHeight:st,trackPadding:ht,innerMinMargin:ft,innerMaxMargin:Lt,handleSize:et}=ze,it=`${Xe}-inner`;return{[Xe]:{[it]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:Lt,paddingInlineEnd:ft,transition:`padding-inline-start ${ze.switchDuration} ease-in-out, padding-inline-end ${ze.switchDuration} ease-in-out`,[`${it}-checked, ${it}-unchecked`]:{display:"block",color:ze.colorTextLightSolid,fontSize:ze.fontSizeSM,transition:`margin-inline-start ${ze.switchDuration} ease-in-out, margin-inline-end ${ze.switchDuration} ease-in-out`,pointerEvents:"none"},[`${it}-checked`]:{marginInlineStart:`calc(-100% + ${et+ht*2}px - ${Lt*2}px)`,marginInlineEnd:`calc(100% - ${et+ht*2}px + ${Lt*2}px)`},[`${it}-unchecked`]:{marginTop:-st,marginInlineStart:0,marginInlineEnd:0}},[`&${Xe}-checked ${it}`]:{paddingInlineStart:ft,paddingInlineEnd:Lt,[`${it}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${it}-unchecked`]:{marginInlineStart:`calc(100% - ${et+ht*2}px + ${Lt*2}px)`,marginInlineEnd:`calc(-100% + ${et+ht*2}px - ${Lt*2}px)`}},[`&:not(${Xe}-disabled):active`]:{[`&:not(${Xe}-checked) ${it}`]:{[`${it}-unchecked`]:{marginInlineStart:ht*2,marginInlineEnd:-ht*2}},[`&${Xe}-checked ${it}`]:{[`${it}-checked`]:{marginInlineStart:-ht*2,marginInlineEnd:ht*2}}}}}},Ae=ze=>{const{componentCls:Xe,trackHeight:st,trackMinWidth:ht}=ze;return{[Xe]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,le.Wf)(ze)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:ht,height:st,lineHeight:`${st}px`,verticalAlign:"middle",background:ze.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${ze.motionDurationMid}`,userSelect:"none",[`&:hover:not(${Xe}-disabled)`]:{background:ze.colorTextTertiary}}),(0,le.Qy)(ze)),{[`&${Xe}-checked`]:{background:ze.switchColor,[`&:hover:not(${Xe}-disabled)`]:{background:ze.colorPrimaryHover}},[`&${Xe}-loading, &${Xe}-disabled`]:{cursor:"not-allowed",opacity:ze.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${Xe}-rtl`]:{direction:"rtl"}})}};var Oe=(0,ue.Z)("Switch",ze=>{const Xe=(0,pe.TS)(ze,{switchDuration:ze.motionDurationMid,switchColor:ze.colorPrimary,switchDisabledOpacity:ze.opacityLoading,switchLoadingIconSize:ze.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${ze.opacityLoading})`,switchHandleActiveInset:"-30%"});return[Ae(Xe),ke(Xe),Ie(Xe),Pe(Xe),Ee(Xe)]},ze=>{const{fontSize:Xe,lineHeight:st,controlHeight:ht,colorWhite:ft}=ze,Lt=Xe*st,et=ht/2,it=2,xt=Lt-it*2,Et=et-it*2;return{trackHeight:Lt,trackHeightSM:et,trackMinWidth:xt*2+it*4,trackMinWidthSM:Et*2+it*2,trackPadding:it,handleBg:ft,handleSize:xt,handleSizeSM:Et,handleShadow:`0 2px 4px 0 ${new re.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:xt/2,innerMaxMargin:xt+it+it*2,innerMinMarginSM:Et/2,innerMaxMarginSM:Et+it+it*2}}),Fe=function(ze,Xe){var st={};for(var ht in ze)Object.prototype.hasOwnProperty.call(ze,ht)&&Xe.indexOf(ht)<0&&(st[ht]=ze[ht]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ft=0,ht=Object.getOwnPropertySymbols(ze);ft<ht.length;ft++)Xe.indexOf(ht[ft])<0&&Object.prototype.propertyIsEnumerable.call(ze,ht[ft])&&(st[ht[ft]]=ze[ht[ft]]);return st};const _e=be.forwardRef((ze,Xe)=>{const{prefixCls:st,size:ht,disabled:ft,loading:Lt,className:et,rootClassName:it,style:xt}=ze,Et=Fe(ze,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:Mt,direction:mt,switch:pt}=be.useContext(z.E_),vt=be.useContext(ee.Z),jt=(ft!=null?ft:vt)||Lt,At=Mt("switch",st),Kt=be.createElement("div",{className:`${At}-handle`},Lt&&be.createElement(rt.Z,{className:`${At}-loading-icon`})),[Ct,gt]=Oe(At),tt=(0,ae.Z)(ht),bt=ie()(pt==null?void 0:pt.className,{[`${At}-small`]:tt==="small",[`${At}-loading`]:Lt,[`${At}-rtl`]:mt==="rtl"},et,it,gt),Ke=Object.assign(Object.assign({},pt==null?void 0:pt.style),xt);return Ct(be.createElement(fe.Z,{component:"Switch"},be.createElement(xe,Object.assign({},Et,{prefixCls:At,className:bt,style:Ke,disabled:jt,ref:Xe,loadingIcon:Kt}))))});_e.__ANT_SWITCH=!0;var Ye=_e},2595:function(bn,ln,$e){"use strict";$e.d(ln,{default:function(){return Wp}});var rt={},St="rc-table-internal-hook",ie=$e(29043),Re=$e(8107),je=$e(28800),ve=$e(51346),ce=$e(59301),be=$e(4676);function Ce(Rt){var $t=ce.createContext(void 0),nn=function(Sn){var fn=Sn.value,Rn=Sn.children,_n=ce.useRef(fn);_n.current=fn;var In=ce.useState(function(){return{getValue:function(){return _n.current},listeners:new Set}}),qn=(0,ie.Z)(In,1),rr=qn[0];return(0,je.Z)(function(){(0,be.unstable_batchedUpdates)(function(){rr.listeners.forEach(function(tr){tr(fn)})})},[fn]),ce.createElement($t.Provider,{value:rr},Rn)};return{Context:$t,Provider:nn,defaultValue:Rt}}function ye(Rt,$t){var nn=(0,Re.Z)(typeof $t=="function"?$t:function(tr){if($t===void 0)return tr;if(!Array.isArray($t))return tr[$t];var Or={};return $t.forEach(function(Pr){Or[Pr]=tr[Pr]}),Or}),sn=ce.useContext(Rt==null?void 0:Rt.Context),Sn=sn||{},fn=Sn.listeners,Rn=Sn.getValue,_n=ce.useRef();_n.current=nn(sn?Rn():Rt==null?void 0:Rt.defaultValue);var In=ce.useState({}),qn=(0,ie.Z)(In,2),rr=qn[1];return(0,je.Z)(function(){if(!sn)return;function tr(Or){var Pr=nn(Or);(0,ve.Z)(_n.current,Pr,!0)||rr({})}return fn.add(tr),function(){fn.delete(tr)}},[sn]),_n.current}var we=$e(5891),me=$e(20475);function xe(){var Rt=ce.createContext(null);function $t(){return ce.useContext(Rt)}function nn(Sn,fn){var Rn=(0,me.Yr)(Sn),_n=function(qn,rr){var tr=Rn?{ref:rr}:{},Or=ce.useRef(0),Pr=ce.useRef(qn),gr=$t();return gr!==null?ce.createElement(Sn,(0,we.Z)({},qn,tr)):((!fn||fn(Pr.current,qn))&&(Or.current+=1),Pr.current=qn,ce.createElement(Rt.Provider,{value:Or.current},ce.createElement(Sn,(0,we.Z)({},qn,tr))))};return Rn?ce.forwardRef(_n):_n}function sn(Sn,fn){var Rn=(0,me.Yr)(Sn),_n=function(qn,rr){var tr=Rn?{ref:rr}:{};return $t(),ce.createElement(Sn,(0,we.Z)({},qn,tr))};return Rn?ce.memo(ce.forwardRef(_n),fn):ce.memo(_n,fn)}return{makeImmutable:nn,responseImmutable:sn,useImmutableMark:$t}}var fe=xe(),z=fe.makeImmutable,ee=fe.responseImmutable,ae=fe.useImmutableMark,re=xe(),le=re.makeImmutable,ue=re.responseImmutable,pe=re.useImmutableMark,Ee=Ce(),Pe=Ee;function Ie(Rt,$t){var nn=ce.useRef(0);nn.current+=1;var sn=ce.useRef(Rt),Sn=[];Object.keys(Rt||{}).map(function(Rn){var _n;(Rt==null?void 0:Rt[Rn])!==((_n=sn.current)===null||_n===void 0?void 0:_n[Rn])&&Sn.push(Rn)}),sn.current=Rt;var fn=ce.useRef([]);return Sn.length&&(fn.current=Sn),ce.useDebugValue(nn.current),ce.useDebugValue(fn.current.join(", ")),$t&&console.log("".concat($t,":"),nn.current,fn.current),nn.current}var ke=null,Ae=ce.memo(function(){var Rt=Ie();return ce.createElement("h1",null,"Render Times: ",Rt)});Ae.displayName="RenderBlock";var Oe=$e(80665),Fe=$e(57259),_e=$e(80962),Ye=$e(92310),ze=$e.n(Ye),Xe=$e(79722),st=$e(69004),ht=$e(51395),ft=ce.createContext({renderWithProps:!1}),Lt=ft,et="RC_TABLE_KEY";function it(Rt){return Rt==null?[]:Array.isArray(Rt)?Rt:[Rt]}function xt(Rt){var $t=[],nn={};return Rt.forEach(function(sn){for(var Sn=sn||{},fn=Sn.key,Rn=Sn.dataIndex,_n=fn||it(Rn).join("-")||et;nn[_n];)_n="".concat(_n,"_next");nn[_n]=!0,$t.push(_n)}),$t}function Et(Rt){return Rt!=null}function Mt(Rt){return Rt&&(0,Oe.Z)(Rt)==="object"&&!Array.isArray(Rt)&&!ce.isValidElement(Rt)}function mt(Rt,$t,nn,sn,Sn,fn){var Rn=ce.useContext(Lt),_n=pe(),In=(0,Xe.Z)(function(){if(Et(sn))return[sn];var qn=$t==null||$t===""?[]:Array.isArray($t)?$t:[$t],rr=(0,st.Z)(Rt,qn),tr=rr,Or=void 0;if(Sn){var Pr=Sn(rr,Rt,nn);Mt(Pr)?(tr=Pr.children,Or=Pr.props,Rn.renderWithProps=!0):tr=Pr}return[tr,Or]},[_n,Rt,sn,$t,Sn,nn],function(qn,rr){if(fn){var tr=(0,ie.Z)(qn,2),Or=tr[1],Pr=(0,ie.Z)(rr,2),gr=Pr[1];return fn(gr,Or)}return Rn.renderWithProps?!0:!(0,ve.Z)(qn,rr,!0)});return In}function pt(Rt,$t,nn,sn){var Sn=Rt+$t-1;return Rt<=sn&&Sn>=nn}function vt(Rt,$t){return ye(Pe,function(nn){var sn=pt(Rt,$t||1,nn.hoverStartRow,nn.hoverEndRow);return[sn,nn.onHover]})}var jt=function($t){var nn=$t.ellipsis,sn=$t.rowType,Sn=$t.children,fn,Rn=nn===!0?{showTitle:!0}:nn;return Rn&&(Rn.showTitle||sn==="header")&&(typeof Sn=="string"||typeof Sn=="number"?fn=Sn.toString():ce.isValidElement(Sn)&&typeof Sn.props.children=="string"&&(fn=Sn.props.children)),fn};function At(Rt){var $t,nn,sn,Sn,fn,Rn,_n,In,qn=Rt.component,rr=Rt.children,tr=Rt.ellipsis,Or=Rt.scope,Pr=Rt.prefixCls,gr=Rt.className,ti=Rt.align,xr=Rt.record,Jr=Rt.render,Zr=Rt.dataIndex,ui=Rt.renderIndex,Ni=Rt.shouldCellUpdate,Hi=Rt.index,ri=Rt.rowType,Oi=Rt.colSpan,uo=Rt.rowSpan,si=Rt.fixLeft,Pi=Rt.fixRight,ai=Rt.firstFixLeft,$r=Rt.lastFixLeft,mi=Rt.firstFixRight,Fi=Rt.lastFixRight,Yi=Rt.appendNode,Qi=Rt.additionalProps,ii=Qi===void 0?{}:Qi,ho=Rt.isSticky,So="".concat(Pr,"-cell"),Yo=ye(Pe,["supportSticky","allColumnsFixedLeft"]),No=Yo.supportSticky,ka=Yo.allColumnsFixedLeft,Ea=mt(xr,Zr,ui,rr,Jr,Ni),mo=(0,ie.Z)(Ea,2),$i=mo[0],Ho=mo[1],Oa={},va=typeof si=="number"&&No,is=typeof Pi=="number"&&No;va&&(Oa.position="sticky",Oa.left=si),is&&(Oa.position="sticky",Oa.right=Pi);var qi=($t=(nn=(sn=Ho==null?void 0:Ho.colSpan)!==null&&sn!==void 0?sn:ii.colSpan)!==null&&nn!==void 0?nn:Oi)!==null&&$t!==void 0?$t:1,Zi=(Sn=(fn=(Rn=Ho==null?void 0:Ho.rowSpan)!==null&&Rn!==void 0?Rn:ii.rowSpan)!==null&&fn!==void 0?fn:uo)!==null&&Sn!==void 0?Sn:1,eo=vt(Hi,Zi),Ai=(0,ie.Z)(eo,2),Ko=Ai[0],ji=Ai[1],co=function(ts){var ps;xr&&ji(Hi,Hi+Zi-1),ii==null||(ps=ii.onMouseEnter)===null||ps===void 0||ps.call(ii,ts)},Fo=function(ts){var ps;xr&&ji(-1,-1),ii==null||(ps=ii.onMouseLeave)===null||ps===void 0||ps.call(ii,ts)};if(qi===0||Zi===0)return null;var Bo=(_n=ii.title)!==null&&_n!==void 0?_n:jt({rowType:ri,ellipsis:tr,children:$i}),bs=ze()(So,gr,(In={},(0,_e.Z)(In,"".concat(So,"-fix-left"),va&&No),(0,_e.Z)(In,"".concat(So,"-fix-left-first"),ai&&No),(0,_e.Z)(In,"".concat(So,"-fix-left-last"),$r&&No),(0,_e.Z)(In,"".concat(So,"-fix-left-all"),$r&&ka&&No),(0,_e.Z)(In,"".concat(So,"-fix-right"),is&&No),(0,_e.Z)(In,"".concat(So,"-fix-right-first"),mi&&No),(0,_e.Z)(In,"".concat(So,"-fix-right-last"),Fi&&No),(0,_e.Z)(In,"".concat(So,"-ellipsis"),tr),(0,_e.Z)(In,"".concat(So,"-with-append"),Yi),(0,_e.Z)(In,"".concat(So,"-fix-sticky"),(va||is)&&ho&&No),(0,_e.Z)(In,"".concat(So,"-row-hover"),!Ho&&Ko),In),ii.className,Ho==null?void 0:Ho.className),ls={};ti&&(ls.textAlign=ti);var Gs=(0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)({},Oa),ii.style),ls),Ho==null?void 0:Ho.style),Jo=$i;return(0,Oe.Z)(Jo)==="object"&&!Array.isArray(Jo)&&!ce.isValidElement(Jo)&&(Jo=null),tr&&($r||mi)&&(Jo=ce.createElement("span",{className:"".concat(So,"-content")},Jo)),ce.createElement(qn,(0,we.Z)({},Ho,ii,{className:bs,style:Gs,title:Bo,scope:Or,onMouseEnter:co,onMouseLeave:Fo,colSpan:qi!==1?qi:null,rowSpan:Zi!==1?Zi:null}),Yi,Jo)}var Kt=ce.memo(At);function Ct(Rt,$t,nn,sn,Sn,fn){var Rn=nn[Rt]||{},_n=nn[$t]||{},In,qn;Rn.fixed==="left"?In=sn.left[Sn==="rtl"?$t:Rt]:_n.fixed==="right"&&(qn=sn.right[Sn==="rtl"?Rt:$t]);var rr=!1,tr=!1,Or=!1,Pr=!1,gr=nn[$t+1],ti=nn[Rt-1],xr=!(fn!=null&&fn.children);if(Sn==="rtl"){if(In!==void 0){var Jr=ti&&ti.fixed==="left";Pr=!Jr&&xr}else if(qn!==void 0){var Zr=gr&&gr.fixed==="right";Or=!Zr&&xr}}else if(In!==void 0){var ui=gr&&gr.fixed==="left";rr=!ui&&xr}else if(qn!==void 0){var Ni=ti&&ti.fixed==="right";tr=!Ni&&xr}return{fixLeft:In,fixRight:qn,lastFixLeft:rr,firstFixRight:tr,lastFixRight:Or,firstFixLeft:Pr,isSticky:sn.isSticky}}var gt=ce.createContext({}),tt=gt;function bt(Rt){var $t=Rt.className,nn=Rt.index,sn=Rt.children,Sn=Rt.colSpan,fn=Sn===void 0?1:Sn,Rn=Rt.rowSpan,_n=Rt.align,In=ye(Pe,["prefixCls","direction"]),qn=In.prefixCls,rr=In.direction,tr=ce.useContext(tt),Or=tr.scrollColumnIndex,Pr=tr.stickyOffsets,gr=tr.flattenColumns,ti=tr.columns,xr=nn+fn-1,Jr=xr+1===Or?fn+1:fn,Zr=Ct(nn,nn+Jr-1,gr,Pr,rr,ti==null?void 0:ti[nn]);return ce.createElement(Kt,(0,we.Z)({className:$t,index:nn,component:"td",prefixCls:qn,record:null,dataIndex:null,align:_n,colSpan:Jr,rowSpan:Rn,render:function(){return sn}},Zr))}var Ke=$e(19149),ut=["children"];function wt(Rt){var $t=Rt.children,nn=(0,Ke.Z)(Rt,ut);return ce.createElement("tr",nn,$t)}function yt(Rt){var $t=Rt.children;return $t}yt.Row=wt,yt.Cell=bt;var lt=yt;function Qe(Rt){var $t=Rt.children,nn=Rt.stickyOffsets,sn=Rt.flattenColumns,Sn=Rt.columns,fn=ye(Pe,"prefixCls"),Rn=sn.length-1,_n=sn[Rn],In=ce.useMemo(function(){return{stickyOffsets:nn,flattenColumns:sn,scrollColumnIndex:_n!=null&&_n.scrollbar?Rn:null,columns:Sn}},[_n,sn,Rn,nn,Sn]);return ce.createElement(tt.Provider,{value:In},ce.createElement("tfoot",{className:"".concat(fn,"-summary")},$t))}var We=ue(Qe),Ue=lt,qe=$e(80764),He=$e(29301),De=$e(48886),Le=$e(24387),Ve=$e(59055),dt=$e(36994);function Ze(Rt,$t,nn,sn,Sn,fn,Rn){Rt.push({record:$t,indent:nn,index:Rn});var _n=fn($t),In=Sn==null?void 0:Sn.has(_n);if($t&&Array.isArray($t[sn])&&In)for(var qn=0;qn<$t[sn].length;qn+=1)Ze(Rt,$t[sn][qn],nn+1,sn,Sn,fn,qn)}function Tt(Rt,$t,nn,sn){var Sn=ce.useMemo(function(){if(nn!=null&&nn.size){for(var fn=[],Rn=0;Rn<(Rt==null?void 0:Rt.length);Rn+=1){var _n=Rt[Rn];Ze(fn,_n,0,$t,nn,sn,Rn)}return fn}return Rt==null?void 0:Rt.map(function(In,qn){return{record:In,indent:0,index:qn}})},[Rt,$t,nn,sn]);return Sn}function _t(Rt){var $t=Rt.prefixCls,nn=Rt.children,sn=Rt.component,Sn=Rt.cellComponent,fn=Rt.className,Rn=Rt.expanded,_n=Rt.colSpan,In=Rt.isEmpty,qn=ye(Pe,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),rr=qn.scrollbarSize,tr=qn.fixHeader,Or=qn.fixColumn,Pr=qn.componentWidth,gr=qn.horizonScroll,ti=nn;return(In?gr&&Pr:Or)&&(ti=ce.createElement("div",{style:{width:Pr-(tr?rr:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat($t,"-expanded-row-fixed")},ti)),ce.createElement(sn,{className:fn,style:{display:Rn?null:"none"}},ce.createElement(Kt,{component:Sn,prefixCls:$t,colSpan:_n},ti))}var Qt=_t;function kt(Rt,$t,nn,sn){var Sn=ye(Pe,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),fn=Sn.flattenColumns,Rn=Sn.expandableType,_n=Sn.expandedKeys,In=Sn.childrenColumnName,qn=Sn.onTriggerExpand,rr=Sn.rowExpandable,tr=Sn.onRow,Or=Sn.expandRowByClick,Pr=Sn.rowClassName,gr=Rn==="nest",ti=Rn==="row"&&(!rr||rr(Rt)),xr=ti||gr,Jr=_n&&_n.has($t),Zr=In&&Rt&&Rt[In],ui=(0,qe.useEvent)(qn),Ni=tr==null?void 0:tr(Rt,nn),Hi=Ni==null?void 0:Ni.onClick,ri=function(Pi){Or&&xr&&qn(Rt,Pi);for(var ai=arguments.length,$r=new Array(ai>1?ai-1:0),mi=1;mi<ai;mi++)$r[mi-1]=arguments[mi];Hi==null||Hi.apply(void 0,[Pi].concat($r))},Oi;typeof Pr=="string"?Oi=Pr:typeof Pr=="function"&&(Oi=Pr(Rt,nn,sn));var uo=xt(fn);return(0,Fe.Z)((0,Fe.Z)({},Sn),{},{columnsKey:uo,nestExpandable:gr,expanded:Jr,hasNestChildren:Zr,record:Rt,onTriggerExpand:ui,rowSupportExpand:ti,expandable:xr,rowProps:(0,Fe.Z)((0,Fe.Z)({},Ni),{},{className:ze()(Oi,Ni==null?void 0:Ni.className),onClick:ri})})}function Nt(Rt,$t,nn,sn,Sn){var fn=Rt.record,Rn=Rt.prefixCls,_n=Rt.columnsKey,In=Rt.fixedInfoList,qn=Rt.expandIconColumnIndex,rr=Rt.nestExpandable,tr=Rt.indentSize,Or=Rt.expandIcon,Pr=Rt.expanded,gr=Rt.hasNestChildren,ti=Rt.onTriggerExpand,xr=_n[nn],Jr=In[nn],Zr;nn===(qn||0)&&rr&&(Zr=ce.createElement(ce.Fragment,null,ce.createElement("span",{style:{paddingLeft:"".concat(tr*sn,"px")},className:"".concat(Rn,"-row-indent indent-level-").concat(sn)}),Or({prefixCls:Rn,expanded:Pr,expandable:gr,record:fn,onExpand:ti})));var ui;return $t.onCell&&(ui=$t.onCell(fn,Sn)),{key:xr,fixedInfo:Jr,appendCellNode:Zr,additionalCellProps:ui||{}}}function Zt(Rt){var $t=Rt.className,nn=Rt.style,sn=Rt.record,Sn=Rt.index,fn=Rt.renderIndex,Rn=Rt.rowKey,_n=Rt.indent,In=_n===void 0?0:_n,qn=Rt.rowComponent,rr=Rt.cellComponent,tr=Rt.scopeCellComponent,Or=kt(sn,Rn,Sn,In),Pr=Or.prefixCls,gr=Or.flattenColumns,ti=Or.expandedRowClassName,xr=Or.expandedRowRender,Jr=Or.rowProps,Zr=Or.expanded,ui=Or.rowSupportExpand,Ni=ce.useState(!1),Hi=(0,ie.Z)(Ni,2),ri=Hi[0],Oi=Hi[1];ce.useEffect(function(){Zr&&Oi(!0)},[Zr]);var uo=ce.createElement(qn,(0,we.Z)({},Jr,{"data-row-key":Rn,className:ze()($t,"".concat(Pr,"-row"),"".concat(Pr,"-row-level-").concat(In),Jr==null?void 0:Jr.className),style:(0,Fe.Z)((0,Fe.Z)({},nn),Jr==null?void 0:Jr.style)}),gr.map(function($r,mi){var Fi=$r.render,Yi=$r.dataIndex,Qi=$r.className,ii=Nt(Or,$r,mi,In,Sn),ho=ii.key,So=ii.fixedInfo,Yo=ii.appendCellNode,No=ii.additionalCellProps;return ce.createElement(Kt,(0,we.Z)({className:Qi,ellipsis:$r.ellipsis,align:$r.align,scope:$r.rowScope,component:$r.rowScope?tr:rr,prefixCls:Pr,key:ho,record:sn,index:Sn,renderIndex:fn,dataIndex:Yi,render:Fi,shouldCellUpdate:$r.shouldCellUpdate},So,{appendNode:Yo,additionalProps:No}))})),si;if(ui&&(ri||Zr)){var Pi=xr(sn,Sn,In+1,Zr),ai=ti&&ti(sn,Sn,In);si=ce.createElement(Qt,{expanded:Zr,className:ze()("".concat(Pr,"-expanded-row"),"".concat(Pr,"-expanded-row-level-").concat(In+1),ai),prefixCls:Pr,component:qn,cellComponent:rr,colSpan:gr.length,isEmpty:!1},Pi)}return ce.createElement(ce.Fragment,null,uo,si)}Zt.displayName="BodyRow";var on=ue(Zt);function vn(Rt){var $t=Rt.columnKey,nn=Rt.onColumnResize,sn=ce.useRef();return ce.useEffect(function(){sn.current&&nn($t,sn.current.offsetWidth)},[]),ce.createElement(He.Z,{data:$t},ce.createElement("td",{ref:sn,style:{padding:0,border:0,height:0}},ce.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function kn(Rt){var $t=Rt.prefixCls,nn=Rt.columnsKey,sn=Rt.onColumnResize;return ce.createElement("tr",{"aria-hidden":"true",className:"".concat($t,"-measure-row"),style:{height:0,fontSize:0}},ce.createElement(He.Z.Collection,{onBatchResize:function(fn){fn.forEach(function(Rn){var _n=Rn.data,In=Rn.size;sn(_n,In.offsetWidth)})}},nn.map(function(Sn){return ce.createElement(vn,{key:Sn,columnKey:Sn,onColumnResize:sn})})))}function Kn(Rt){var $t=Rt.data,nn=Rt.measureColumnWidth,sn=ye(Pe,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),Sn=sn.prefixCls,fn=sn.getComponent,Rn=sn.onColumnResize,_n=sn.flattenColumns,In=sn.getRowKey,qn=sn.expandedKeys,rr=sn.childrenColumnName,tr=sn.emptyNode,Or=Tt($t,rr,qn,In),Pr=ce.useRef({renderWithProps:!1}),gr=fn(["body","wrapper"],"tbody"),ti=fn(["body","row"],"tr"),xr=fn(["body","cell"],"td"),Jr=fn(["body","cell"],"th"),Zr;$t.length?Zr=Or.map(function(Ni,Hi){var ri=Ni.record,Oi=Ni.indent,uo=Ni.index,si=In(ri,Hi);return ce.createElement(on,{key:si,rowKey:si,record:ri,index:Hi,renderIndex:uo,rowComponent:ti,cellComponent:xr,scopeCellComponent:Jr,getRowKey:In,indent:Oi})}):Zr=ce.createElement(Qt,{expanded:!0,className:"".concat(Sn,"-placeholder"),prefixCls:Sn,component:ti,cellComponent:xr,colSpan:_n.length,isEmpty:!0},tr);var ui=xt(_n);return ce.createElement(Lt.Provider,{value:Pr.current},ce.createElement(gr,{className:"".concat(Sn,"-tbody")},nn&&ce.createElement(kn,{prefixCls:Sn,columnsKey:ui,onColumnResize:Rn}),Zr))}Kn.displayName="Body";var Xn=ue(Kn),pr=["expandable"],dr="RC_TABLE_INTERNAL_COL_DEFINE";function vr(Rt){var $t=Rt.expandable,nn=(0,Ke.Z)(Rt,pr),sn;return"expandable"in Rt?sn=(0,Fe.Z)((0,Fe.Z)({},nn),$t):sn=nn,sn.showExpandColumn===!1&&(sn.expandIconColumnIndex=-1),sn}var Sr=["columnType"];function Fr(Rt){for(var $t=Rt.colWidths,nn=Rt.columns,sn=Rt.columCount,Sn=[],fn=sn||nn.length,Rn=!1,_n=fn-1;_n>=0;_n-=1){var In=$t[_n],qn=nn&&nn[_n],rr=qn&&qn[dr];if(In||rr||Rn){var tr=rr||{},Or=tr.columnType,Pr=(0,Ke.Z)(tr,Sr);Sn.unshift(ce.createElement("col",(0,we.Z)({key:_n,style:{width:In}},Pr))),Rn=!0}}return ce.createElement("colgroup",null,Sn)}var li=Fr,Er=$e(26390),xi=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function Cr(Rt,$t){return(0,ce.useMemo)(function(){for(var nn=[],sn=0;sn<$t;sn+=1){var Sn=Rt[sn];if(Sn!==void 0)nn[sn]=Sn;else return null}return nn},[Rt.join("_"),$t])}var ot=ce.forwardRef(function(Rt,$t){var nn=Rt.className,sn=Rt.noData,Sn=Rt.columns,fn=Rt.flattenColumns,Rn=Rt.colWidths,_n=Rt.columCount,In=Rt.stickyOffsets,qn=Rt.direction,rr=Rt.fixHeader,tr=Rt.stickyTopOffset,Or=Rt.stickyBottomOffset,Pr=Rt.stickyClassName,gr=Rt.onScroll,ti=Rt.maxContentScroll,xr=Rt.children,Jr=(0,Ke.Z)(Rt,xi),Zr=ye(Pe,["prefixCls","scrollbarSize","isSticky"]),ui=Zr.prefixCls,Ni=Zr.scrollbarSize,Hi=Zr.isSticky,ri=Hi&&!rr?0:Ni,Oi=ce.useRef(null),uo=ce.useCallback(function(Qi){(0,me.mH)($t,Qi),(0,me.mH)(Oi,Qi)},[]);ce.useEffect(function(){var Qi;function ii(ho){var So=ho,Yo=So.currentTarget,No=So.deltaX;No&&(gr({currentTarget:Yo,scrollLeft:Yo.scrollLeft+No}),ho.preventDefault())}return(Qi=Oi.current)===null||Qi===void 0||Qi.addEventListener("wheel",ii),function(){var ho;(ho=Oi.current)===null||ho===void 0||ho.removeEventListener("wheel",ii)}},[]);var si=ce.useMemo(function(){return fn.every(function(Qi){return Qi.width})},[fn]),Pi=fn[fn.length-1],ai={fixed:Pi?Pi.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(ui,"-cell-scrollbar")}}},$r=(0,ce.useMemo)(function(){return ri?[].concat((0,Er.Z)(Sn),[ai]):Sn},[ri,Sn]),mi=(0,ce.useMemo)(function(){return ri?[].concat((0,Er.Z)(fn),[ai]):fn},[ri,fn]),Fi=(0,ce.useMemo)(function(){var Qi=In.right,ii=In.left;return(0,Fe.Z)((0,Fe.Z)({},In),{},{left:qn==="rtl"?[].concat((0,Er.Z)(ii.map(function(ho){return ho+ri})),[0]):ii,right:qn==="rtl"?Qi:[].concat((0,Er.Z)(Qi.map(function(ho){return ho+ri})),[0]),isSticky:Hi})},[ri,In,Hi]),Yi=Cr(Rn,_n);return ce.createElement("div",{style:(0,Fe.Z)({overflow:"hidden"},Hi?{top:tr,bottom:Or}:{}),ref:uo,className:ze()(nn,(0,_e.Z)({},Pr,!!Pr))},ce.createElement("table",{style:{tableLayout:"fixed",visibility:sn||Yi?null:"hidden"}},(!sn||!ti||si)&&ce.createElement(li,{colWidths:Yi?[].concat((0,Er.Z)(Yi),[ri]):[],columCount:_n+1,columns:mi}),xr((0,Fe.Z)((0,Fe.Z)({},Jr),{},{stickyOffsets:Fi,columns:$r,flattenColumns:mi}))))});ot.displayName="FixedHolder";var di=ce.memo(ot);function Yr(Rt){var $t=Rt.cells,nn=Rt.stickyOffsets,sn=Rt.flattenColumns,Sn=Rt.rowComponent,fn=Rt.cellComponent,Rn=Rt.tdCellComponent,_n=Rt.onHeaderRow,In=Rt.index,qn=ye(Pe,["prefixCls","direction"]),rr=qn.prefixCls,tr=qn.direction,Or;_n&&(Or=_n($t.map(function(gr){return gr.column}),In));var Pr=xt($t.map(function(gr){return gr.column}));return ce.createElement(Sn,Or,$t.map(function(gr,ti){var xr=gr.column,Jr=Ct(gr.colStart,gr.colEnd,sn,nn,tr,xr),Zr;return xr&&xr.onHeaderCell&&(Zr=gr.column.onHeaderCell(xr)),ce.createElement(Kt,(0,we.Z)({},gr,{scope:xr.title?gr.colSpan>1?"colgroup":"col":null,ellipsis:xr.ellipsis,align:xr.align,component:xr.title?fn:Rn,prefixCls:rr,key:Pr[ti]},Jr,{additionalProps:Zr,rowType:"header"}))}))}Yr.displayName="HeaderRow";var Ri=Yr;function hr(Rt){var $t=[];function nn(Rn,_n){var In=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;$t[In]=$t[In]||[];var qn=_n,rr=Rn.filter(Boolean).map(function(tr){var Or={key:tr.key,className:tr.className||"",children:tr.title,column:tr,colStart:qn},Pr=1,gr=tr.children;return gr&&gr.length>0&&(Pr=nn(gr,qn,In+1).reduce(function(ti,xr){return ti+xr},0),Or.hasSubColumns=!0),"colSpan"in tr&&(Pr=tr.colSpan),"rowSpan"in tr&&(Or.rowSpan=tr.rowSpan),Or.colSpan=Pr,Or.colEnd=Or.colStart+Pr-1,$t[In].push(Or),qn+=Pr,Pr});return rr}nn(Rt,0);for(var sn=$t.length,Sn=function(_n){$t[_n].forEach(function(In){!("rowSpan"in In)&&!In.hasSubColumns&&(In.rowSpan=sn-_n)})},fn=0;fn<sn;fn+=1)Sn(fn);return $t}function Ir(Rt){var $t=Rt.stickyOffsets,nn=Rt.columns,sn=Rt.flattenColumns,Sn=Rt.onHeaderRow,fn=ye(Pe,["prefixCls","getComponent"]),Rn=fn.prefixCls,_n=fn.getComponent,In=ce.useMemo(function(){return hr(nn)},[nn]),qn=_n(["header","wrapper"],"thead"),rr=_n(["header","row"],"tr"),tr=_n(["header","cell"],"th"),Or=_n(["header","cell"],"td");return ce.createElement(qn,{className:"".concat(Rn,"-thead")},In.map(function(Pr,gr){var ti=ce.createElement(Ri,{key:gr,flattenColumns:sn,cells:Pr,stickyOffsets:$t,rowComponent:rr,cellComponent:tr,tdCellComponent:Or,onHeaderRow:Sn,index:gr});return ti}))}var Rr=ue(Ir),yi=$e(38298);function dn(Rt){var $t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof $t=="number"?$t:$t.endsWith("%")?Rt*parseFloat($t)/100:null}function mn(Rt,$t){return ce.useMemo(function(){if($t&&$t>0){var nn=0,sn=0;Rt.forEach(function(qn){var rr=dn($t,qn.width);rr?nn+=rr:sn+=1});var Sn=$t-nn,fn=sn,Rn=Sn/sn,_n=0,In=Rt.map(function(qn){var rr=(0,Fe.Z)({},qn),tr=dn($t,rr.width);if(tr)rr.width=tr;else{var Or=Math.floor(Rn);rr.width=fn===1?Sn:Or,Sn-=Or,fn-=1}return _n+=rr.width,rr});return[In,_n]}return[Rt,$t]},[Rt,$t])}var un=["children"],Ut=["fixed"];function xn(Rt){return(0,yi.Z)(Rt).filter(function($t){return ce.isValidElement($t)}).map(function($t){var nn=$t.key,sn=$t.props,Sn=sn.children,fn=(0,Ke.Z)(sn,un),Rn=(0,Fe.Z)({key:nn},fn);return Sn&&(Rn.children=xn(Sn)),Rn})}function jn(Rt){var $t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return Rt.filter(function(nn){return nn&&(0,Oe.Z)(nn)==="object"}).reduce(function(nn,sn,Sn){var fn=sn.fixed,Rn=fn===!0?"left":fn,_n="".concat($t,"-").concat(Sn),In=sn.children;return In&&In.length>0?[].concat((0,Er.Z)(nn),(0,Er.Z)(jn(In,_n).map(function(qn){return(0,Fe.Z)({fixed:Rn},qn)}))):[].concat((0,Er.Z)(nn),[(0,Fe.Z)((0,Fe.Z)({key:_n},sn),{},{fixed:Rn})])},[])}function en(Rt){for(var $t=!0,nn=0;nn<Rt.length;nn+=1){var sn=Rt[nn];if($t&&sn.fixed!=="left")$t=!1;else if(!$t&&sn.fixed==="left"){warning(!1,"Index ".concat(nn-1," of `columns` missing `fixed='left'` prop."));break}}for(var Sn=!0,fn=Rt.length-1;fn>=0;fn-=1){var Rn=Rt[fn];if(Sn&&Rn.fixed!=="right")Sn=!1;else if(!Sn&&Rn.fixed==="right"){warning(!1,"Index ".concat(fn+1," of `columns` missing `fixed='right'` prop."));break}}}function Gt(Rt){return Rt.map(function($t){var nn=$t.fixed,sn=(0,Ke.Z)($t,Ut),Sn=nn;return nn==="left"?Sn="right":nn==="right"&&(Sn="left"),(0,Fe.Z)({fixed:Sn},sn)})}function Cn(Rt,$t){var nn=Rt.prefixCls,sn=Rt.columns,Sn=Rt.children,fn=Rt.expandable,Rn=Rt.expandedKeys,_n=Rt.columnTitle,In=Rt.getRowKey,qn=Rt.onTriggerExpand,rr=Rt.expandIcon,tr=Rt.rowExpandable,Or=Rt.expandIconColumnIndex,Pr=Rt.direction,gr=Rt.expandRowByClick,ti=Rt.columnWidth,xr=Rt.fixed,Jr=Rt.scrollWidth,Zr=ce.useMemo(function(){return sn||xn(Sn)},[sn,Sn]),ui=ce.useMemo(function(){if(fn){var Pi,ai=Zr.slice();if(!ai.includes(rt)){var $r=Or||0;$r>=0&&ai.splice($r,0,rt)}var mi=ai.indexOf(rt);ai=ai.filter(function(ii,ho){return ii!==rt||ho===mi});var Fi=Zr[mi],Yi;(xr==="left"||xr)&&!Or?Yi="left":(xr==="right"||xr)&&Or===Zr.length?Yi="right":Yi=Fi?Fi.fixed:null;var Qi=(Pi={},(0,_e.Z)(Pi,dr,{className:"".concat(nn,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),(0,_e.Z)(Pi,"title",_n),(0,_e.Z)(Pi,"fixed",Yi),(0,_e.Z)(Pi,"className","".concat(nn,"-row-expand-icon-cell")),(0,_e.Z)(Pi,"width",ti),(0,_e.Z)(Pi,"render",function(ho,So,Yo){var No=In(So,Yo),ka=Rn.has(No),Ea=tr?tr(So):!0,mo=rr({prefixCls:nn,expanded:ka,expandable:Ea,record:So,onExpand:qn});return gr?ce.createElement("span",{onClick:function(Ho){return Ho.stopPropagation()}},mo):mo}),Pi);return ai.map(function(ii){return ii===rt?Qi:ii})}return Zr.filter(function(ii){return ii!==rt})},[fn,Zr,In,Rn,rr,Pr]),Ni=ce.useMemo(function(){var Pi=ui;return $t&&(Pi=$t(Pi)),Pi.length||(Pi=[{render:function(){return null}}]),Pi},[$t,ui,Pr]),Hi=ce.useMemo(function(){return Pr==="rtl"?Gt(jn(Ni)):jn(Ni)},[Ni,Pr,Jr]),ri=mn(Hi,Jr),Oi=(0,ie.Z)(ri,2),uo=Oi[0],si=Oi[1];return[Ni,uo,si]}var Gn=Cn;function ir(Rt){var $t,nn=Rt.prefixCls,sn=Rt.record,Sn=Rt.onExpand,fn=Rt.expanded,Rn=Rt.expandable,_n="".concat(nn,"-row-expand-icon");if(!Rn)return ce.createElement("span",{className:ze()(_n,"".concat(nn,"-row-spaced"))});var In=function(rr){Sn(sn,rr),rr.stopPropagation()};return ce.createElement("span",{className:ze()(_n,($t={},(0,_e.Z)($t,"".concat(nn,"-row-expanded"),fn),(0,_e.Z)($t,"".concat(nn,"-row-collapsed"),!fn),$t)),onClick:In})}function Pn(Rt,$t,nn){var sn=[];function Sn(fn){(fn||[]).forEach(function(Rn,_n){sn.push($t(Rn,_n)),Sn(Rn[nn])})}return Sn(Rt),sn}function Yt(Rt,$t,nn){var sn=vr(Rt),Sn=sn.expandIcon,fn=sn.expandedRowKeys,Rn=sn.defaultExpandedRowKeys,_n=sn.defaultExpandAllRows,In=sn.expandedRowRender,qn=sn.onExpand,rr=sn.onExpandedRowsChange,tr=sn.childrenColumnName,Or=Sn||ir,Pr=tr||"children",gr=ce.useMemo(function(){return In?"row":Rt.expandable&&Rt.internalHooks===St&&Rt.expandable.__PARENT_RENDER_ICON__||$t.some(function(Hi){return Hi&&(0,Oe.Z)(Hi)==="object"&&Hi[Pr]})?"nest":!1},[!!In,$t]),ti=ce.useState(function(){return Rn||(_n?Pn($t,nn,Pr):[])}),xr=(0,ie.Z)(ti,2),Jr=xr[0],Zr=xr[1],ui=ce.useMemo(function(){return new Set(fn||Jr||[])},[fn,Jr]),Ni=ce.useCallback(function(Hi){var ri=nn(Hi,$t.indexOf(Hi)),Oi,uo=ui.has(ri);uo?(ui.delete(ri),Oi=(0,Er.Z)(ui)):Oi=[].concat((0,Er.Z)(ui),[ri]),Zr(Oi),qn&&qn(!uo,Hi),rr&&rr(Oi)},[nn,ui,$t,qn,rr]);return[sn,gr,ui,Or,Pr,Ni]}function zn(Rt,$t,nn,sn){var Sn=Rt.map(function(fn,Rn){return Ct(Rn,Rn,Rt,$t,nn,sn==null?void 0:sn[Rn])});return(0,Xe.Z)(function(){return Sn},[Sn],function(fn,Rn){return!(0,ve.Z)(fn,Rn)})}function Qn(Rt){var $t=(0,ce.useRef)(Rt),nn=(0,ce.useState)({}),sn=(0,ie.Z)(nn,2),Sn=sn[1],fn=(0,ce.useRef)(null),Rn=(0,ce.useRef)([]);function _n(In){Rn.current.push(In);var qn=Promise.resolve();fn.current=qn,qn.then(function(){if(fn.current===qn){var rr=Rn.current,tr=$t.current;Rn.current=[],rr.forEach(function(Or){$t.current=Or($t.current)}),fn.current=null,tr!==$t.current&&Sn({})}})}return(0,ce.useEffect)(function(){return function(){fn.current=null}},[]),[$t.current,_n]}function or(Rt){var $t=(0,ce.useRef)(Rt||null),nn=(0,ce.useRef)();function sn(){window.clearTimeout(nn.current)}function Sn(Rn){$t.current=Rn,sn(),nn.current=window.setTimeout(function(){$t.current=null,nn.current=void 0},100)}function fn(){return $t.current}return(0,ce.useEffect)(function(){return sn},[]),[Sn,fn]}function rn(){var Rt=ce.useState(-1),$t=(0,ie.Z)(Rt,2),nn=$t[0],sn=$t[1],Sn=ce.useState(-1),fn=(0,ie.Z)(Sn,2),Rn=fn[0],_n=fn[1],In=ce.useCallback(function(qn,rr){sn(qn),_n(rr)},[]);return[nn,Rn,In]}var Mn=$e(87746),an=(0,Mn.Z)()?window:null;function gn(Rt,$t){var nn=(0,Oe.Z)(Rt)==="object"?Rt:{},sn=nn.offsetHeader,Sn=sn===void 0?0:sn,fn=nn.offsetSummary,Rn=fn===void 0?0:fn,_n=nn.offsetScroll,In=_n===void 0?0:_n,qn=nn.getContainer,rr=qn===void 0?function(){return an}:qn,tr=rr()||an;return ce.useMemo(function(){var Or=!!Rt;return{isSticky:Or,stickyClassName:Or?"".concat($t,"-sticky-holder"):"",offsetHeader:Sn,offsetSummary:Rn,offsetScroll:In,container:tr}},[In,Sn,Rn,$t,tr])}function En(Rt,$t,nn){var sn=(0,ce.useMemo)(function(){for(var Sn=[],fn=[],Rn=0,_n=0,In=0;In<$t;In+=1)if(nn==="rtl"){fn[In]=_n,_n+=Rt[In]||0;var qn=$t-In-1;Sn[qn]=Rn,Rn+=Rt[qn]||0}else{Sn[In]=Rn,Rn+=Rt[In]||0;var rr=$t-In-1;fn[rr]=_n,_n+=Rt[rr]||0}return{left:Sn,right:fn}},[Rt,$t,nn]);return sn}var pn=En;function On(Rt){var $t=Rt.className,nn=Rt.children;return ce.createElement("div",{className:$t},nn)}var Dn=On,$n=$e(8178),Fn=$e(21783),Tn=function($t,nn){var sn,Sn,fn=$t.scrollBodyRef,Rn=$t.onScroll,_n=$t.offsetScroll,In=$t.container,qn=ye(Pe,"prefixCls"),rr=((sn=fn.current)===null||sn===void 0?void 0:sn.scrollWidth)||0,tr=((Sn=fn.current)===null||Sn===void 0?void 0:Sn.clientWidth)||0,Or=rr&&tr*(tr/rr),Pr=ce.useRef(),gr=Qn({scrollLeft:0,isHiddenScrollBar:!1}),ti=(0,ie.Z)(gr,2),xr=ti[0],Jr=ti[1],Zr=ce.useRef({delta:0,x:0}),ui=ce.useState(!1),Ni=(0,ie.Z)(ui,2),Hi=Ni[0],ri=Ni[1],Oi=function(){ri(!1)},uo=function(mi){mi.persist(),Zr.current.delta=mi.pageX-xr.scrollLeft,Zr.current.x=0,ri(!0),mi.preventDefault()},si=function(mi){var Fi,Yi=mi||((Fi=window)===null||Fi===void 0?void 0:Fi.event),Qi=Yi.buttons;if(!Hi||Qi===0){Hi&&ri(!1);return}var ii=Zr.current.x+mi.pageX-Zr.current.x-Zr.current.delta;ii<=0&&(ii=0),ii+Or>=tr&&(ii=tr-Or),Rn({scrollLeft:ii/tr*(rr+2)}),Zr.current.x=mi.pageX},Pi=function(){if(fn.current){var mi=(0,Fn.os)(fn.current).top,Fi=mi+fn.current.offsetHeight,Yi=In===window?document.documentElement.scrollTop+window.innerHeight:(0,Fn.os)(In).top+In.clientHeight;Fi-(0,Ve.Z)()<=Yi||mi>=Yi-_n?Jr(function(Qi){return(0,Fe.Z)((0,Fe.Z)({},Qi),{},{isHiddenScrollBar:!0})}):Jr(function(Qi){return(0,Fe.Z)((0,Fe.Z)({},Qi),{},{isHiddenScrollBar:!1})})}},ai=function(mi){Jr(function(Fi){return(0,Fe.Z)((0,Fe.Z)({},Fi),{},{scrollLeft:mi/rr*tr||0})})};return ce.useImperativeHandle(nn,function(){return{setScrollLeft:ai}}),ce.useEffect(function(){var $r=(0,$n.Z)(document.body,"mouseup",Oi,!1),mi=(0,$n.Z)(document.body,"mousemove",si,!1);return Pi(),function(){$r.remove(),mi.remove()}},[Or,Hi]),ce.useEffect(function(){var $r=(0,$n.Z)(In,"scroll",Pi,!1),mi=(0,$n.Z)(window,"resize",Pi,!1);return function(){$r.remove(),mi.remove()}},[In]),ce.useEffect(function(){xr.isHiddenScrollBar||Jr(function($r){var mi=fn.current;return mi?(0,Fe.Z)((0,Fe.Z)({},$r),{},{scrollLeft:mi.scrollLeft/mi.scrollWidth*mi.clientWidth}):$r})},[xr.isHiddenScrollBar]),rr<=tr||!Or||xr.isHiddenScrollBar?null:ce.createElement("div",{style:{height:(0,Ve.Z)(),width:tr,bottom:_n},className:"".concat(qn,"-sticky-scroll")},ce.createElement("div",{onMouseDown:uo,ref:Pr,className:ze()("".concat(qn,"-sticky-scroll-bar"),(0,_e.Z)({},"".concat(qn,"-sticky-scroll-bar-active"),Hi)),style:{width:"".concat(Or,"px"),transform:"translate3d(".concat(xr.scrollLeft,"px, 0, 0)")}}))},Yn=ce.forwardRef(Tn);function Lr(Rt){return null}var qr=Lr;function Br(Rt){return null}var tn=Br,lr="rc-table",br=[],ar={};function Qr(){return"No Data"}function Xr(Rt){var $t,nn=(0,Fe.Z)({rowKey:"key",prefixCls:lr,emptyText:Qr},Rt),sn=nn.prefixCls,Sn=nn.className,fn=nn.rowClassName,Rn=nn.style,_n=nn.data,In=nn.rowKey,qn=nn.scroll,rr=nn.tableLayout,tr=nn.direction,Or=nn.title,Pr=nn.footer,gr=nn.summary,ti=nn.caption,xr=nn.id,Jr=nn.showHeader,Zr=nn.components,ui=nn.emptyText,Ni=nn.onRow,Hi=nn.onHeaderRow,ri=nn.internalHooks,Oi=nn.transformColumns,uo=nn.internalRefs,si=nn.tailor,Pi=nn.sticky,ai=_n||br,$r=!!ai.length,mi=ri===St,Fi=ce.useCallback(function(qo,Ta){return(0,st.Z)(Zr,qo)||Ta},[Zr]),Yi=ce.useMemo(function(){return typeof In=="function"?In:function(qo){var Ta=qo&&qo[In];return Ta}},[In]),Qi=Fi(["body"]),ii=rn(),ho=(0,ie.Z)(ii,3),So=ho[0],Yo=ho[1],No=ho[2],ka=Yt(nn,ai,Yi),Ea=(0,ie.Z)(ka,6),mo=Ea[0],$i=Ea[1],Ho=Ea[2],Oa=Ea[3],va=Ea[4],is=Ea[5],qi=qn==null?void 0:qn.x,Zi=ce.useState(0),eo=(0,ie.Z)(Zi,2),Ai=eo[0],Ko=eo[1],ji=Gn((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)({},nn),mo),{},{expandable:!!mo.expandedRowRender,columnTitle:mo.columnTitle,expandedKeys:Ho,getRowKey:Yi,onTriggerExpand:is,expandIcon:Oa,expandIconColumnIndex:mo.expandIconColumnIndex,direction:tr,scrollWidth:mi&&si&&typeof qi=="number"?qi:null}),mi?Oi:null),co=(0,ie.Z)(ji,3),Fo=co[0],Bo=co[1],bs=co[2],ls=bs!=null?bs:qi,Gs=ce.useMemo(function(){return{columns:Fo,flattenColumns:Bo}},[Fo,Bo]),Jo=ce.useRef(),Ps=ce.useRef(),ts=ce.useRef(),ps=ce.useRef(),Wu=ce.useRef(),Qo=ce.useState(!1),ra=(0,ie.Z)(Qo,2),la=ra[0],Xa=ra[1],gs=ce.useState(!1),Lo=(0,ie.Z)(gs,2),da=Lo[0],ms=Lo[1],pl=Qn(new Map),$l=(0,ie.Z)(pl,2),El=$l[0],eu=$l[1],tu=xt(Bo),Gl=tu.map(function(qo){return El.get(qo)}),ea=ce.useMemo(function(){return Gl},[Gl.join("_")]),Ts=pn(ea,Bo.length,tr),Ga=qn&&Et(qn.y),fa=qn&&Et(ls)||!!mo.fixed,Hl=fa&&Bo.some(function(qo){var Ta=qo.fixed;return Ta}),oc=ce.useRef(),nu=gn(Pi,sn),Mu=nu.isSticky,Ku=nu.offsetHeader,Tl=nu.offsetSummary,Vo=nu.offsetScroll,ya=nu.stickyClassName,us=nu.container,Sa=ce.useMemo(function(){return gr==null?void 0:gr(ai)},[gr,ai]),$o=(Ga||Mu)&&ce.isValidElement(Sa)&&Sa.type===lt&&Sa.props.fixed,vs,gl,gu;Ga&&(gl={overflowY:"scroll",maxHeight:qn.y}),fa&&(vs={overflowX:"auto"},Ga||(gl={overflowY:"hidden"}),gu={width:ls===!0?"auto":ls,minWidth:"100%"});var cf=ce.useCallback(function(qo,Ta){(0,De.Z)(Jo.current)&&eu(function(js){if(js.get(qo)!==Ta){var ru=new Map(js);return ru.set(qo,Ta),ru}return js})},[]),cn=or(null),Pc=(0,ie.Z)(cn,2),Vu=Pc[0],hf=Pc[1];function gh(qo,Ta){Ta&&(typeof Ta=="function"?Ta(qo):Ta.scrollLeft!==qo&&(Ta.scrollLeft=qo,Ta.scrollLeft!==qo&&setTimeout(function(){Ta.scrollLeft=qo},0)))}var Yc=(0,Re.Z)(function(qo){var Ta=qo.currentTarget,js=qo.scrollLeft,ru=tr==="rtl",iu=typeof js=="number"?js:Ta.scrollLeft,Dd=Ta||ar;if(!hf()||hf()===Dd){var Tc;Vu(Dd),gh(iu,Ps.current),gh(iu,ts.current),gh(iu,Wu.current),gh(iu,(Tc=oc.current)===null||Tc===void 0?void 0:Tc.setScrollLeft)}var Zh=Ta||Ps.current;if(Zh){var mu=Zh.scrollWidth,ac=Zh.clientWidth;if(mu===ac){Xa(!1),ms(!1);return}ru?(Xa(-iu<mu-ac),ms(-iu>0)):(Xa(iu>0),ms(iu<mu-ac))}}),Md=function(){fa&&ts.current?Yc({currentTarget:ts.current}):(Xa(!1),ms(!1))},Kp=function(Ta){var js=Ta.width;js!==Ai&&(Md(),Ko(Jo.current?Jo.current.offsetWidth:js))},Ms=ce.useRef(!1);ce.useEffect(function(){Ms.current&&Md()},[fa,_n,Fo.length]),ce.useEffect(function(){Ms.current=!0},[]);var Kh=ce.useState(0),Ld=(0,ie.Z)(Kh,2),Vh=Ld[0],df=Ld[1],Zf=ce.useState(!0),ff=(0,ie.Z)(Zf,2),kd=ff[0],Ul=ff[1];ce.useEffect(function(){(!si||!mi)&&(ts.current instanceof Element?df((0,Ve.o)(ts.current).width):df((0,Ve.o)(ps.current).width)),Ul((0,Le.G)("position","sticky"))},[]),ce.useEffect(function(){mi&&uo&&(uo.body.current=ts.current)});var mh=ce.useCallback(function(qo){return ce.createElement(ce.Fragment,null,ce.createElement(Rr,qo),$o==="top"&&ce.createElement(We,qo,Sa))},[$o,Sa]),pf=ce.useCallback(function(qo){return ce.createElement(We,qo,Sa)},[Sa]),Lu=Fi(["table"],"table"),Cc=ce.useMemo(function(){return rr||(Hl?ls==="max-content"?"auto":"fixed":Ga||Mu||Bo.some(function(qo){var Ta=qo.ellipsis;return Ta})?"fixed":"auto")},[Ga,Hl,Bo,rr,Mu]),vh,Jc={colWidths:ea,columCount:Bo.length,stickyOffsets:Ts,onHeaderRow:Hi,fixHeader:Ga,scroll:qn},ml=ce.useMemo(function(){return $r?null:typeof ui=="function"?ui():ui},[$r,ui]),Od=ce.createElement(Xn,{data:ai,measureColumnWidth:Ga||fa||Mu}),Nd=ce.createElement(li,{colWidths:Bo.map(function(qo){var Ta=qo.width;return Ta}),columns:Bo}),Wl=ti!=null?ce.createElement("caption",{className:"".concat(sn,"-caption")},ti):void 0,yh=(0,dt.Z)(nn,{data:!0}),Ad=(0,dt.Z)(nn,{aria:!0});if(Ga||Mu){var jd;typeof Qi=="function"?(jd=Qi(ai,{scrollbarSize:Vh,ref:ts,onScroll:Yc}),Jc.colWidths=Bo.map(function(qo,Ta){var js=qo.width,ru=Ta===Bo.length-1?js-Vh:js;return typeof ru=="number"&&!Number.isNaN(ru)?ru:0})):jd=ce.createElement("div",{style:(0,Fe.Z)((0,Fe.Z)({},vs),gl),onScroll:Yc,ref:ts,className:ze()("".concat(sn,"-body"))},ce.createElement(Lu,(0,we.Z)({style:(0,Fe.Z)((0,Fe.Z)({},gu),{},{tableLayout:Cc})},Ad),Wl,Nd,Od,!$o&&Sa&&ce.createElement(We,{stickyOffsets:Ts,flattenColumns:Bo,columns:Fo},Sa)));var Ec=(0,Fe.Z)((0,Fe.Z)((0,Fe.Z)({noData:!ai.length,maxContentScroll:fa&&ls==="max-content"},Jc),Gs),{},{direction:tr,stickyClassName:ya,onScroll:Yc});vh=ce.createElement(ce.Fragment,null,Jr!==!1&&ce.createElement(di,(0,we.Z)({},Ec,{stickyTopOffset:Ku,className:"".concat(sn,"-header"),ref:Ps}),mh),jd,$o&&$o!=="top"&&ce.createElement(di,(0,we.Z)({},Ec,{stickyBottomOffset:Tl,className:"".concat(sn,"-summary"),ref:Wu}),pf),Mu&&ce.createElement(Yn,{ref:oc,offsetScroll:Vo,scrollBodyRef:ts,onScroll:Yc,container:us}))}else vh=ce.createElement("div",{style:(0,Fe.Z)((0,Fe.Z)({},vs),gl),className:ze()("".concat(sn,"-content")),onScroll:Yc,ref:ts},ce.createElement(Lu,(0,we.Z)({style:(0,Fe.Z)((0,Fe.Z)({},gu),{},{tableLayout:Cc})},Ad),Wl,Nd,Jr!==!1&&ce.createElement(Rr,(0,we.Z)({},Jc,Gs)),Od,Sa&&ce.createElement(We,{stickyOffsets:Ts,flattenColumns:Bo,columns:Fo},Sa)));var ol=ce.createElement("div",(0,we.Z)({className:ze()(sn,Sn,($t={},(0,_e.Z)($t,"".concat(sn,"-rtl"),tr==="rtl"),(0,_e.Z)($t,"".concat(sn,"-ping-left"),la),(0,_e.Z)($t,"".concat(sn,"-ping-right"),da),(0,_e.Z)($t,"".concat(sn,"-layout-fixed"),rr==="fixed"),(0,_e.Z)($t,"".concat(sn,"-fixed-header"),Ga),(0,_e.Z)($t,"".concat(sn,"-fixed-column"),Hl),(0,_e.Z)($t,"".concat(sn,"-scroll-horizontal"),fa),(0,_e.Z)($t,"".concat(sn,"-has-fix-left"),Bo[0]&&Bo[0].fixed),(0,_e.Z)($t,"".concat(sn,"-has-fix-right"),Bo[Bo.length-1]&&Bo[Bo.length-1].fixed==="right"),$t)),style:Rn,id:xr,ref:Jo},yh),Or&&ce.createElement(Dn,{className:"".concat(sn,"-title")},Or(ai)),ce.createElement("div",{ref:ps,className:"".concat(sn,"-container")},vh),Pr&&ce.createElement(Dn,{className:"".concat(sn,"-footer")},Pr(ai)));fa&&(ol=ce.createElement(He.Z,{onResize:Kp},ol));var Id=zn(Bo,Ts,tr,Fo),cs=ce.useMemo(function(){return{scrollX:ls,prefixCls:sn,getComponent:Fi,scrollbarSize:Vh,direction:tr,fixedInfoList:Id,isSticky:Mu,supportSticky:kd,componentWidth:Ai,fixHeader:Ga,fixColumn:Hl,horizonScroll:fa,tableLayout:Cc,rowClassName:fn,expandedRowClassName:mo.expandedRowClassName,expandIcon:Oa,expandableType:$i,expandRowByClick:mo.expandRowByClick,expandedRowRender:mo.expandedRowRender,onTriggerExpand:is,expandIconColumnIndex:mo.expandIconColumnIndex,indentSize:mo.indentSize,allColumnsFixedLeft:Bo.every(function(qo){return qo.fixed==="left"}),emptyNode:ml,columns:Fo,flattenColumns:Bo,onColumnResize:cf,hoverStartRow:So,hoverEndRow:Yo,onHover:No,rowExpandable:mo.rowExpandable,onRow:Ni,getRowKey:Yi,expandedKeys:Ho,childrenColumnName:va}},[ls,sn,Fi,Vh,tr,Id,Mu,kd,Ai,Ga,Hl,fa,Cc,fn,mo.expandedRowClassName,Oa,$i,mo.expandRowByClick,mo.expandedRowRender,is,mo.expandIconColumnIndex,mo.indentSize,ml,Fo,Bo,cf,So,Yo,No,mo.rowExpandable,Ni,Yi,Ho,va]);return ce.createElement(Pe.Provider,{value:cs},ol)}function hi(Rt){return le(Xr,Rt)}var Gr=hi();Gr.EXPAND_COLUMN=rt,Gr.INTERNAL_HOOKS=St,Gr.Column=qr,Gr.ColumnGroup=tn,Gr.Summary=Ue;var Tr=Gr,Si=$e(21881),Ln=Ce(null),Ki=Ce(null);function Nn(Rt,$t,nn){var sn=$t||1;return nn[Rt+sn]-(nn[Rt]||0)}function gi(Rt){var $t=Rt.rowInfo,nn=Rt.column,sn=Rt.colIndex,Sn=Rt.indent,fn=Rt.index,Rn=Rt.renderIndex,_n=Rt.record,In=Rt.style,qn=Rt.className,rr=Rt.inverse,tr=Rt.getHeight,Or=nn.render,Pr=nn.dataIndex,gr=nn.className,ti=nn.width,xr=ye(Ki,["columnsOffset"]),Jr=xr.columnsOffset,Zr=Nt($t,nn,sn,Sn,fn),ui=Zr.key,Ni=Zr.fixedInfo,Hi=Zr.appendCellNode,ri=Zr.additionalCellProps,Oi=ri.style,uo=ri.colSpan,si=uo===void 0?1:uo,Pi=ri.rowSpan,ai=Pi===void 0?1:Pi,$r=sn-1,mi=Nn($r,si,Jr),Fi=si>1?ti-mi:0,Yi=(0,Fe.Z)((0,Fe.Z)((0,Fe.Z)({},Oi),In),{},{flex:"0 0 ".concat(mi,"px"),width:"".concat(mi,"px"),marginRight:Fi,pointerEvents:"auto"}),Qi=ce.useMemo(function(){return rr?ai<=1:si===0||ai===0||ai>1},[ai,si,rr]);Qi?Yi.visibility="hidden":rr&&(Yi.height=tr==null?void 0:tr(ai));var ii=Qi?function(){return null}:Or,ho={};return(ai===0||si===0)&&(ho.rowSpan=1,ho.colSpan=1),ce.createElement(Kt,(0,we.Z)({className:ze()(gr,qn),ellipsis:nn.ellipsis,align:nn.align,scope:nn.rowScope,component:"div",prefixCls:$t.prefixCls,key:ui,record:_n,index:fn,renderIndex:Rn,dataIndex:Pr,render:ii,shouldCellUpdate:nn.shouldCellUpdate},Ni,{appendNode:Hi,additionalProps:(0,Fe.Z)((0,Fe.Z)({},ri),{},{style:Yi},ho)}))}var xo=gi,Mi=["data","index","className","rowKey","style","extra","getHeight"],Go=ce.forwardRef(function(Rt,$t){var nn=Rt.data,sn=Rt.index,Sn=Rt.className,fn=Rt.rowKey,Rn=Rt.style,_n=Rt.extra,In=Rt.getHeight,qn=(0,Ke.Z)(Rt,Mi),rr=nn.record,tr=nn.indent,Or=nn.index,Pr=ye(Pe,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),gr=Pr.scrollX,ti=Pr.flattenColumns,xr=Pr.prefixCls,Jr=Pr.fixColumn,Zr=Pr.componentWidth,ui=kt(rr,fn,sn,tr),Ni=ui.rowSupportExpand,Hi=ui.expanded,ri=ui.rowProps,Oi=ui.expandedRowRender,uo=ui.expandedRowClassName,si;if(Ni&&Hi){var Pi=Oi(rr,sn,tr+1,Hi),ai=uo==null?void 0:uo(rr,sn,tr),$r={};Jr&&($r={style:(0,_e.Z)({},"--virtual-width","".concat(Zr,"px"))});var mi="".concat(xr,"-expanded-row-cell");si=ce.createElement("div",{className:ze()("".concat(xr,"-expanded-row"),"".concat(xr,"-expanded-row-level-").concat(tr+1),ai)},ce.createElement(Kt,{component:"div",prefixCls:xr,className:ze()(mi,(0,_e.Z)({},"".concat(mi,"-fixed"),Jr)),additionalProps:$r},Pi))}var Fi=(0,Fe.Z)((0,Fe.Z)({},Rn),{},{width:gr});_n&&(Fi.position="absolute",Fi.pointerEvents="none");var Yi=ce.createElement("div",(0,we.Z)({},ri,qn,{ref:Ni?null:$t,className:ze()(Sn,"".concat(xr,"-row"),ri==null?void 0:ri.className,(0,_e.Z)({},"".concat(xr,"-row-extra"),_n)),style:(0,Fe.Z)((0,Fe.Z)({},Fi),ri==null?void 0:ri.style)}),ti.map(function(Qi,ii){return ce.createElement(xo,{key:ii,rowInfo:ui,column:Qi,colIndex:ii,indent:tr,index:sn,renderIndex:Or,record:rr,inverse:_n,getHeight:In})}));return Ni?ce.createElement("div",{ref:$t},Yi,si):Yi}),po=ue(Go),Wr=po,Hr=ce.forwardRef(function(Rt,$t){var nn=Rt.data,sn=Rt.onScroll,Sn=ye(Pe,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","emptyNode","scrollX"]),fn=Sn.flattenColumns,Rn=Sn.onColumnResize,_n=Sn.getRowKey,In=Sn.expandedKeys,qn=Sn.prefixCls,rr=Sn.childrenColumnName,tr=Sn.emptyNode,Or=Sn.scrollX,Pr=ye(Ln),gr=Pr.scrollY,ti=Pr.listItemHeight,xr=ce.useRef(),Jr=Tt(nn,rr,In,_n),Zr=ce.useMemo(function(){var si=0;return fn.map(function(Pi){var ai=Pi.width,$r=Pi.key;return si+=ai,[$r,ai,si]})},[fn]),ui=ce.useMemo(function(){return Zr.map(function(si){return si[2]})},[Zr]);ce.useEffect(function(){Zr.forEach(function(si){var Pi=(0,ie.Z)(si,2),ai=Pi[0],$r=Pi[1];Rn(ai,$r)})},[Zr]),ce.useImperativeHandle($t,function(){var si={};return Object.defineProperty(si,"scrollLeft",{get:function(){var ai;return((ai=xr.current)===null||ai===void 0?void 0:ai.getScrollInfo().x)||0},set:function(ai){var $r;($r=xr.current)===null||$r===void 0||$r.scrollTo({left:ai})}}),si});var Ni=function(Pi,ai){var $r,mi=($r=Jr[ai])===null||$r===void 0?void 0:$r.record,Fi=Pi.onCell;if(Fi){var Yi,Qi=Fi(mi,ai);return(Yi=Qi==null?void 0:Qi.rowSpan)!==null&&Yi!==void 0?Yi:1}return 1},Hi=function(Pi){var ai=Pi.start,$r=Pi.end,mi=Pi.getSize,Fi=Pi.offsetY;if($r<0)return null;for(var Yi=fn.filter(function(qi){return Ni(qi,ai)===0}),Qi=ai,ii=function(Zi){if(Yi=Yi.filter(function(eo){return Ni(eo,Zi)===0}),!Yi.length)return Qi=Zi,"break"},ho=ai;ho>=0;ho-=1){var So=ii(ho);if(So==="break")break}for(var Yo=fn.filter(function(qi){return Ni(qi,$r)!==1}),No=$r,ka=function(Zi){if(Yo=Yo.filter(function(eo){return Ni(eo,Zi)!==1}),!Yo.length)return No=Math.max(Zi-1,$r),"break"},Ea=$r;Ea<Jr.length;Ea+=1){var mo=ka(Ea);if(mo==="break")break}for(var $i=[],Ho=function(Zi){var eo=Jr[Zi];if(!eo)return"continue";fn.some(function(Ai){return Ni(Ai,Zi)>1})&&$i.push(Zi)},Oa=Qi;Oa<=No;Oa+=1)var va=Ho(Oa);var is=$i.map(function(qi){var Zi=Jr[qi],eo=_n(Zi.record,qi),Ai=function(co){var Fo=qi+co-1,Bo=_n(Jr[Fo].record,Fo),bs=mi(eo,Bo);return bs.bottom-bs.top},Ko=mi(eo);return ce.createElement(Wr,{key:qi,data:Zi,rowKey:eo,index:qi,style:{top:-Fi+Ko.top},extra:!0,getHeight:Ai})});return is},ri=ce.useMemo(function(){return{columnsOffset:ui}},[ui]),Oi="".concat(qn,"-tbody"),uo;return Jr.length?uo=ce.createElement(Si.Z,{fullHeight:!1,ref:xr,className:ze()(Oi,"".concat(Oi,"-virtual")),height:gr,itemHeight:ti||24,data:Jr,itemKey:function(Pi){return _n(Pi.record)},scrollWidth:Or,onVirtualScroll:function(Pi){var ai=Pi.x;sn({scrollLeft:ai})},extraRender:Hi},function(si,Pi,ai){var $r=_n(si.record,Pi);return ce.createElement(Wr,(0,we.Z)({data:si,rowKey:$r,index:Pi},ai))}):uo=ce.createElement("div",{className:ze()("".concat(qn,"-placeholder"))},ce.createElement(Kt,{component:"div",prefixCls:qn},tr)),ce.createElement(Ki.Provider,{value:ri},uo)}),Li=ue(Hr),_i=Li,ur=function($t,nn){var sn=nn.ref,Sn=nn.onScroll;return ce.createElement(_i,{ref:sn,data:$t,onScroll:Sn})},It=100;function Ei(Rt){var $t=Rt.columns,nn=Rt.scroll,sn=Rt.prefixCls,Sn=sn===void 0?lr:sn,fn=Rt.className,Rn=Rt.listItemHeight,_n=nn||{},In=_n.x,qn=_n.y;typeof In!="number"&&(In=(($t||[]).length+1)*It),typeof qn!="number"&&(qn=500);var rr=ce.useMemo(function(){return{scrollY:qn,listItemHeight:Rn}},[qn,Rn]);return ce.createElement(Ln.Provider,{value:rr},ce.createElement(Tr,(0,we.Z)({},Rt,{className:ze()(fn,"".concat(Sn,"-virtual")),scroll:(0,Fe.Z)((0,Fe.Z)({},nn),{},{x:In}),components:{body:ur},columns:$t,internalHooks:St,tailor:!0})))}function Kr(Rt){return le(Ei,Rt)}var Nr=Kr(),Wi=null;function Ur(Rt){return null}var jr=Ur;function wi(Rt){return null}var Vi=wi,bi=$e(64002),vo=$e(68031),Ar=$e(36355),Dr=$e(93891),zr=$e(19716),Zn=$e(8628),to=$e(31724),yo=$e(25700),ta=$e(71418),wo=$e(88088);function Zo(Rt){return function(nn){let{prefixCls:sn,onExpand:Sn,record:fn,expanded:Rn,expandable:_n}=nn;const In=`${sn}-row-expand-icon`;return ce.createElement("button",{type:"button",onClick:qn=>{Sn(fn,qn),qn.stopPropagation()},className:ze()(In,{[`${In}-spaced`]:!_n,[`${In}-expanded`]:_n&&Rn,[`${In}-collapsed`]:_n&&!Rn}),"aria-label":Rn?Rt.collapse:Rt.expand,"aria-expanded":Rn})}}var ua=Zo;function Pa(Rt,$t){return"key"in Rt&&Rt.key!==void 0&&Rt.key!==null?Rt.key:Rt.dataIndex?Array.isArray(Rt.dataIndex)?Rt.dataIndex.join("."):Rt.dataIndex:$t}function Da(Rt,$t){return $t?`${$t}-${Rt}`:`${Rt}`}function Ss(Rt,$t){return typeof Rt=="function"?Rt($t):Rt}function es(Rt,$t){const nn=Ss(Rt,$t);return Object.prototype.toString.call(nn)==="[object Object]"?"":nn}var wn={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"},Fa=wn,_s=$e(88853),Il=function($t,nn){return ce.createElement(_s.Z,(0,we.Z)({},$t,{ref:nn,icon:Fa}))},Ji=ce.forwardRef(Il),jo=Ji,ga=$e(56762);function Oo(Rt){const $t=ce.useRef(Rt),nn=(0,ga.Z)();return[()=>$t.current,sn=>{$t.current=sn,nn()}]}var no=$e(3113),Mo=$e(24905),Wa=$e(38854),ki=$e(64165),ao=$e(20834),io=$e(40875),kr=$e(5112),Ba=$e(86914),Ra=$e(21970),Cs=$e(92832);function Dl(Rt){let{value:$t,onChange:nn,filterSearch:sn,tablePrefixCls:Sn,locale:fn}=Rt;return sn?ce.createElement("div",{className:`${Sn}-filter-dropdown-search`},ce.createElement(Cs.default,{prefix:ce.createElement(Ra.Z,null),placeholder:fn.filterSearchPlaceholder,onChange:nn,value:$t,htmlSize:1,className:`${Sn}-filter-dropdown-search-input`})):null}var ql=Dl,yr=$e(85108);const oa=Rt=>{const{keyCode:$t}=Rt;$t===yr.Z.ENTER&&Rt.stopPropagation()};var Pl=ce.forwardRef((Rt,$t)=>ce.createElement("div",{className:Rt.className,onClick:nn=>nn.stopPropagation(),onKeyDown:oa,ref:$t},Rt.children));function Fl(Rt){let $t=[];return(Rt||[]).forEach(nn=>{let{value:sn,children:Sn}=nn;$t.push(sn),Sn&&($t=[].concat((0,Er.Z)($t),(0,Er.Z)(Fl(Sn))))}),$t}function Bl(Rt){return Rt.some($t=>{let{children:nn}=$t;return nn})}function Di(Rt,$t){return typeof $t=="string"||typeof $t=="number"?$t==null?void 0:$t.toString().toLowerCase().includes(Rt.trim().toLowerCase()):!1}function mc(Rt){let{filters:$t,prefixCls:nn,filteredKeys:sn,filterMultiple:Sn,searchValue:fn,filterSearch:Rn}=Rt;return $t.map((_n,In)=>{const qn=String(_n.value);if(_n.children)return{key:qn||In,label:_n.text,popupClassName:`${nn}-dropdown-submenu`,children:mc({filters:_n.children,prefixCls:nn,filteredKeys:sn,filterMultiple:Sn,searchValue:fn,filterSearch:Rn})};const rr=Sn?Mo.default:kr.ZP,tr={key:_n.value!==void 0?qn:In,label:ce.createElement(ce.Fragment,null,ce.createElement(rr,{checked:sn.includes(qn)}),ce.createElement("span",null,_n.text))};return fn.trim()?typeof Rn=="function"?Rn(fn,_n)?tr:null:Di(fn,_n.text)?tr:null:tr})}function tl(Rt){var $t,nn;const{tablePrefixCls:sn,prefixCls:Sn,column:fn,dropdownPrefixCls:Rn,columnKey:_n,filterMultiple:In,filterMode:qn="menu",filterSearch:rr=!1,filterState:tr,triggerFilter:Or,locale:Pr,children:gr,getPopupContainer:ti}=Rt,{filterDropdownOpen:xr,onFilterDropdownOpenChange:Jr,filterResetToDefaultFilteredValue:Zr,defaultFilteredValue:ui,filterDropdownVisible:Ni,onFilterDropdownVisibleChange:Hi}=fn,[ri,Oi]=ce.useState(!1),uo=!!(tr&&(!(($t=tr.filteredKeys)===null||$t===void 0)&&$t.length||tr.forceFiltered)),si=ji=>{Oi(ji),Jr==null||Jr(ji),Hi==null||Hi(ji)},Pi=(nn=xr!=null?xr:Ni)!==null&&nn!==void 0?nn:ri,ai=tr==null?void 0:tr.filteredKeys,[$r,mi]=Oo(ai||[]),Fi=ji=>{let{selectedKeys:co}=ji;mi(co)},Yi=(ji,co)=>{let{node:Fo,checked:Bo}=co;Fi(In?{selectedKeys:ji}:{selectedKeys:Bo&&Fo.key?[Fo.key]:[]})};ce.useEffect(()=>{ri&&Fi({selectedKeys:ai||[]})},[ai]);const[Qi,ii]=ce.useState([]),ho=ji=>{ii(ji)},[So,Yo]=ce.useState(""),No=ji=>{const{value:co}=ji.target;Yo(co)};ce.useEffect(()=>{ri||Yo("")},[ri]);const ka=ji=>{const co=ji&&ji.length?ji:null;if(co===null&&(!tr||!tr.filteredKeys)||(0,ve.Z)(co,tr==null?void 0:tr.filteredKeys,!0))return null;Or({column:fn,key:_n,filteredKeys:co})},Ea=()=>{si(!1),ka($r())},mo=function(){let{confirm:ji,closeDropdown:co}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};ji&&ka([]),co&&si(!1),Yo(""),mi(Zr?(ui||[]).map(Fo=>String(Fo)):[])},$i=function(){let{closeDropdown:ji}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};ji&&si(!1),ka($r())},Ho=ji=>{ji&&ai!==void 0&&mi(ai||[]),si(ji),!ji&&!fn.filterDropdown&&Ea()},Oa=ze()({[`${Rn}-menu-without-submenu`]:!Bl(fn.filters||[])}),va=ji=>{if(ji.target.checked){const co=Fl(fn==null?void 0:fn.filters).map(Fo=>String(Fo));mi(co)}else mi([])},is=ji=>{let{filters:co}=ji;return(co||[]).map((Fo,Bo)=>{const bs=String(Fo.value),ls={title:Fo.text,key:Fo.value!==void 0?bs:Bo};return Fo.children&&(ls.children=is({filters:Fo.children})),ls})},qi=ji=>{var co;return Object.assign(Object.assign({},ji),{text:ji.title,value:ji.key,children:((co=ji.children)===null||co===void 0?void 0:co.map(Fo=>qi(Fo)))||[]})};let Zi;if(typeof fn.filterDropdown=="function")Zi=fn.filterDropdown({prefixCls:`${Rn}-custom`,setSelectedKeys:ji=>Fi({selectedKeys:ji}),selectedKeys:$r(),confirm:$i,clearFilters:mo,filters:fn.filters,visible:Pi,close:()=>{si(!1)}});else if(fn.filterDropdown)Zi=fn.filterDropdown;else{const ji=$r()||[],co=()=>(fn.filters||[]).length===0?ce.createElement(ki.Z,{image:ki.Z.PRESENTED_IMAGE_SIMPLE,description:Pr.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):qn==="tree"?ce.createElement(ce.Fragment,null,ce.createElement(ql,{filterSearch:rr,value:So,onChange:No,tablePrefixCls:sn,locale:Pr}),ce.createElement("div",{className:`${sn}-filter-dropdown-tree`},In?ce.createElement(Mo.default,{checked:ji.length===Fl(fn.filters).length,indeterminate:ji.length>0&&ji.length<Fl(fn.filters).length,className:`${sn}-filter-dropdown-checkall`,onChange:va},Pr.filterCheckall):null,ce.createElement(Ba.default,{checkable:!0,selectable:!1,blockNode:!0,multiple:In,checkStrictly:!In,className:`${Rn}-menu`,onCheck:Yi,checkedKeys:ji,selectedKeys:ji,showIcon:!1,treeData:is({filters:fn.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:So.trim()?Bo=>typeof rr=="function"?rr(So,qi(Bo)):Di(So,Bo.title):void 0}))):ce.createElement(ce.Fragment,null,ce.createElement(ql,{filterSearch:rr,value:So,onChange:No,tablePrefixCls:sn,locale:Pr}),ce.createElement(ao.default,{selectable:!0,multiple:In,prefixCls:`${Rn}-menu`,className:Oa,onSelect:Fi,onDeselect:Fi,selectedKeys:ji,getPopupContainer:ti,openKeys:Qi,onOpenChange:ho,items:mc({filters:fn.filters||[],filterSearch:rr,prefixCls:Sn,filteredKeys:$r(),filterMultiple:In,searchValue:So})})),Fo=()=>Zr?(0,ve.Z)((ui||[]).map(Bo=>String(Bo)),ji,!0):ji.length===0;Zi=ce.createElement(ce.Fragment,null,co(),ce.createElement("div",{className:`${Sn}-dropdown-btns`},ce.createElement(no.ZP,{type:"link",size:"small",disabled:Fo(),onClick:()=>mo()},Pr.filterReset),ce.createElement(no.ZP,{type:"primary",size:"small",onClick:Ea},Pr.filterConfirm)))}fn.filterDropdown&&(Zi=ce.createElement(io.J,{selectable:void 0},Zi));const eo=()=>ce.createElement(Pl,{className:`${Sn}-dropdown`},Zi);let Ai;typeof fn.filterIcon=="function"?Ai=fn.filterIcon(uo):fn.filterIcon?Ai=fn.filterIcon:Ai=ce.createElement(jo,null);const{direction:Ko}=ce.useContext(Ar.E_);return ce.createElement("div",{className:`${Sn}-column`},ce.createElement("span",{className:`${sn}-column-title`},gr),ce.createElement(Wa.Z,{dropdownRender:eo,trigger:["click"],open:Pi,onOpenChange:Ho,getPopupContainer:ti,placement:Ko==="rtl"?"bottomLeft":"bottomRight"},ce.createElement("span",{role:"button",tabIndex:-1,className:ze()(`${Sn}-trigger`,{active:uo}),onClick:ji=>{ji.stopPropagation()}},Ai)))}var nl=tl;function As(Rt,$t,nn){let sn=[];return(Rt||[]).forEach((Sn,fn)=>{var Rn;const _n=Da(fn,nn);if(Sn.filters||"filterDropdown"in Sn||"onFilter"in Sn)if("filteredValue"in Sn){let In=Sn.filteredValue;"filterDropdown"in Sn||(In=(Rn=In==null?void 0:In.map(String))!==null&&Rn!==void 0?Rn:In),sn.push({column:Sn,key:Pa(Sn,_n),filteredKeys:In,forceFiltered:Sn.filtered})}else sn.push({column:Sn,key:Pa(Sn,_n),filteredKeys:$t&&Sn.defaultFilteredValue?Sn.defaultFilteredValue:void 0,forceFiltered:Sn.filtered});"children"in Sn&&(sn=[].concat((0,Er.Z)(sn),(0,Er.Z)(As(Sn.children,$t,_n))))}),sn}function Eu(Rt,$t,nn,sn,Sn,fn,Rn,_n){return nn.map((In,qn)=>{const rr=Da(qn,_n),{filterMultiple:tr=!0,filterMode:Or,filterSearch:Pr}=In;let gr=In;if(gr.filters||gr.filterDropdown){const ti=Pa(gr,rr),xr=sn.find(Jr=>{let{key:Zr}=Jr;return ti===Zr});gr=Object.assign(Object.assign({},gr),{title:Jr=>ce.createElement(nl,{tablePrefixCls:Rt,prefixCls:`${Rt}-filter`,dropdownPrefixCls:$t,column:gr,columnKey:ti,filterState:xr,filterMultiple:tr,filterMode:Or,filterSearch:Pr,triggerFilter:fn,locale:Sn,getPopupContainer:Rn},Ss(In.title,Jr))})}return"children"in gr&&(gr=Object.assign(Object.assign({},gr),{children:Eu(Rt,$t,gr.children,sn,Sn,fn,Rn,rr)})),gr})}function Ru(Rt){const $t={};return Rt.forEach(nn=>{let{key:sn,filteredKeys:Sn,column:fn}=nn;const{filters:Rn,filterDropdown:_n}=fn;if(_n)$t[sn]=Sn||null;else if(Array.isArray(Sn)){const In=Fl(Rn);$t[sn]=In.filter(qn=>Sn.includes(String(qn)))}else $t[sn]=null}),$t}function zs(Rt,$t){return $t.reduce((nn,sn)=>{const{column:{onFilter:Sn,filters:fn},filteredKeys:Rn}=sn;return Sn&&Rn&&Rn.length?nn.filter(_n=>Rn.some(In=>{const qn=Fl(fn),rr=qn.findIndex(Or=>String(Or)===String(In)),tr=rr!==-1?qn[rr]:In;return Sn(tr,_n)})):nn},Rt)}const dl=Rt=>Rt.flatMap($t=>"children"in $t?[$t].concat((0,Er.Z)(dl($t.children||[]))):[$t]);function $c(Rt){let{prefixCls:$t,dropdownPrefixCls:nn,mergedColumns:sn,onFilterChange:Sn,getPopupContainer:fn,locale:Rn}=Rt;const _n=ce.useMemo(()=>dl(sn||[]),[sn]),[In,qn]=ce.useState(()=>As(_n,!0)),rr=ce.useMemo(()=>{const gr=As(_n,!1);if(gr.length===0)return gr;let ti=!0,xr=!0;if(gr.forEach(Jr=>{let{filteredKeys:Zr}=Jr;Zr!==void 0?ti=!1:xr=!1}),ti){const Jr=(_n||[]).map((Zr,ui)=>Pa(Zr,Da(ui)));return In.filter(Zr=>{let{key:ui}=Zr;return Jr.includes(ui)}).map(Zr=>{const ui=_n[Jr.findIndex(Ni=>Ni===Zr.key)];return Object.assign(Object.assign({},Zr),{column:Object.assign(Object.assign({},Zr.column),ui),forceFiltered:ui.filtered})})}return gr},[_n,In]),tr=ce.useMemo(()=>Ru(rr),[rr]),Or=gr=>{const ti=rr.filter(xr=>{let{key:Jr}=xr;return Jr!==gr.key});ti.push(gr),qn(ti),Sn(Ru(ti),ti)};return[gr=>Eu($t,nn,gr,rr,Rn,Or,fn),rr,tr]}var hh=$c;function Gc(Rt,$t,nn){const sn=ce.useRef({});function Sn(fn){if(!sn.current||sn.current.data!==Rt||sn.current.childrenColumnName!==$t||sn.current.getRowKey!==nn){let _n=function(In){In.forEach((qn,rr)=>{const tr=nn(qn,rr);Rn.set(tr,qn),qn&&typeof qn=="object"&&$t in qn&&_n(qn[$t]||[])})};const Rn=new Map;_n(Rt),sn.current={data:Rt,childrenColumnName:$t,kvMap:Rn,getRowKey:nn}}return sn.current.kvMap.get(fn)}return[Sn]}var Hh=$e(50371),Hc=function(Rt,$t){var nn={};for(var sn in Rt)Object.prototype.hasOwnProperty.call(Rt,sn)&&$t.indexOf(sn)<0&&(nn[sn]=Rt[sn]);if(Rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Sn=0,sn=Object.getOwnPropertySymbols(Rt);Sn<sn.length;Sn++)$t.indexOf(sn[Sn])<0&&Object.prototype.propertyIsEnumerable.call(Rt,sn[Sn])&&(nn[sn[Sn]]=Rt[sn[Sn]]);return nn};const vc=10;function _u(Rt,$t){const nn={current:Rt.current,pageSize:Rt.pageSize};return Object.keys($t&&typeof $t=="object"?$t:{}).forEach(Sn=>{const fn=Rt[Sn];typeof fn!="function"&&(nn[Sn]=fn)}),nn}function Rl(Rt,$t,nn){const sn=nn&&typeof nn=="object"?nn:{},{total:Sn=0}=sn,fn=Hc(sn,["total"]),[Rn,_n]=(0,ce.useState)(()=>({current:"defaultCurrent"in fn?fn.defaultCurrent:1,pageSize:"defaultPageSize"in fn?fn.defaultPageSize:vc})),In=(0,Hh.Z)(Rn,fn,{total:Sn>0?Sn:Rt}),qn=Math.ceil((Sn||Rt)/In.pageSize);In.current>qn&&(In.current=qn||1);const rr=(Or,Pr)=>{_n({current:Or!=null?Or:1,pageSize:Pr||In.pageSize})},tr=(Or,Pr)=>{var gr;nn&&((gr=nn.onChange)===null||gr===void 0||gr.call(nn,Or,Pr)),rr(Or,Pr),$t(Or,Pr||(In==null?void 0:In.pageSize))};return nn===!1?[{},()=>{}]:[Object.assign(Object.assign({},In),{onChange:tr}),rr]}var dh=Rl,Uc=$e(18290),yc=$e(35654),ro=$e(90782),Io=$e(71430),Es=$e(35788);const Ya={},_a="SELECT_ALL",ca="SELECT_INVERT",Ca="SELECT_NONE",Va=[],za=(Rt,$t)=>{let nn=[];return($t||[]).forEach(sn=>{nn.push(sn),sn&&typeof sn=="object"&&Rt in sn&&(nn=[].concat((0,Er.Z)(nn),(0,Er.Z)(za(Rt,sn[Rt]))))}),nn};var _l=(Rt,$t)=>{const{preserveSelectedRowKeys:nn,selectedRowKeys:sn,defaultSelectedRowKeys:Sn,getCheckboxProps:fn,onChange:Rn,onSelect:_n,onSelectAll:In,onSelectInvert:qn,onSelectNone:rr,onSelectMultiple:tr,columnWidth:Or,type:Pr,selections:gr,fixed:ti,renderCell:xr,hideSelectAll:Jr,checkStrictly:Zr=!0}=$t||{},{prefixCls:ui,data:Ni,pageData:Hi,getRecordByKey:ri,getRowKey:Oi,expandType:uo,childrenColumnName:si,locale:Pi,getPopupContainer:ai}=Rt,[$r,mi]=(0,Es.Z)(sn||Sn||Va,{value:sn}),Fi=ce.useRef(new Map),Yi=(0,ce.useCallback)(qi=>{if(nn){const Zi=new Map;qi.forEach(eo=>{let Ai=ri(eo);!Ai&&Fi.current.has(eo)&&(Ai=Fi.current.get(eo)),Zi.set(eo,Ai)}),Fi.current=Zi}},[ri,nn]);ce.useEffect(()=>{Yi($r)},[$r]);const{keyEntities:Qi}=(0,ce.useMemo)(()=>{if(Zr)return{keyEntities:null};let qi=Ni;if(nn){const Zi=new Set(Ni.map((Ai,Ko)=>Oi(Ai,Ko))),eo=Array.from(Fi.current).reduce((Ai,Ko)=>{let[ji,co]=Ko;return Zi.has(ji)?Ai:Ai.concat(co)},[]);qi=[].concat((0,Er.Z)(qi),(0,Er.Z)(eo))}return(0,Io.I8)(qi,{externalGetKey:Oi,childrenPropName:si})},[Ni,Oi,Zr,si,nn]),ii=(0,ce.useMemo)(()=>za(si,Hi),[si,Hi]),ho=(0,ce.useMemo)(()=>{const qi=new Map;return ii.forEach((Zi,eo)=>{const Ai=Oi(Zi,eo),Ko=(fn?fn(Zi):null)||{};qi.set(Ai,Ko)}),qi},[ii,Oi,fn]),So=(0,ce.useCallback)(qi=>{var Zi;return!!(!((Zi=ho.get(Oi(qi)))===null||Zi===void 0)&&Zi.disabled)},[ho,Oi]),[Yo,No]=(0,ce.useMemo)(()=>{if(Zr)return[$r||[],[]];const{checkedKeys:qi,halfCheckedKeys:Zi}=(0,ro.S)($r,!0,Qi,So);return[qi||[],Zi]},[$r,Zr,Qi,So]),ka=(0,ce.useMemo)(()=>{const qi=Pr==="radio"?Yo.slice(0,1):Yo;return new Set(qi)},[Yo,Pr]),Ea=(0,ce.useMemo)(()=>Pr==="radio"?new Set:new Set(No),[No,Pr]),[mo,$i]=(0,ce.useState)(null);ce.useEffect(()=>{$t||mi(Va)},[!!$t]);const Ho=(0,ce.useCallback)((qi,Zi)=>{let eo,Ai;Yi(qi),nn?(eo=qi,Ai=qi.map(Ko=>Fi.current.get(Ko))):(eo=[],Ai=[],qi.forEach(Ko=>{const ji=ri(Ko);ji!==void 0&&(eo.push(Ko),Ai.push(ji))})),mi(eo),Rn==null||Rn(eo,Ai,{type:Zi})},[mi,ri,Rn,nn]),Oa=(0,ce.useCallback)((qi,Zi,eo,Ai)=>{if(_n){const Ko=eo.map(ji=>ri(ji));_n(ri(qi),Zi,Ko,Ai)}Ho(eo,"single")},[_n,ri,Ho]),va=(0,ce.useMemo)(()=>!gr||Jr?null:(gr===!0?[_a,ca,Ca]:gr).map(Zi=>Zi===_a?{key:"all",text:Pi.selectionAll,onSelect(){Ho(Ni.map((eo,Ai)=>Oi(eo,Ai)).filter(eo=>{const Ai=ho.get(eo);return!(Ai!=null&&Ai.disabled)||ka.has(eo)}),"all")}}:Zi===ca?{key:"invert",text:Pi.selectInvert,onSelect(){const eo=new Set(ka);Hi.forEach((Ko,ji)=>{const co=Oi(Ko,ji),Fo=ho.get(co);Fo!=null&&Fo.disabled||(eo.has(co)?eo.delete(co):eo.add(co))});const Ai=Array.from(eo);qn&&qn(Ai),Ho(Ai,"invert")}}:Zi===Ca?{key:"none",text:Pi.selectNone,onSelect(){rr==null||rr(),Ho(Array.from(ka).filter(eo=>{const Ai=ho.get(eo);return Ai==null?void 0:Ai.disabled}),"none")}}:Zi).map(Zi=>Object.assign(Object.assign({},Zi),{onSelect:function(){for(var eo,Ai,Ko=arguments.length,ji=new Array(Ko),co=0;co<Ko;co++)ji[co]=arguments[co];(Ai=Zi.onSelect)===null||Ai===void 0||(eo=Ai).call.apply(eo,[Zi].concat(ji)),$i(null)}})),[gr,ka,Hi,Oi,qn,Ho]);return[(0,ce.useCallback)(qi=>{var Zi;if(!$t)return qi.filter(Qo=>Qo!==Ya);let eo=(0,Er.Z)(qi);const Ai=new Set(ka),Ko=ii.map(Oi).filter(Qo=>!ho.get(Qo).disabled),ji=Ko.every(Qo=>Ai.has(Qo)),co=Ko.some(Qo=>Ai.has(Qo)),Fo=()=>{const Qo=[];ji?Ko.forEach(la=>{Ai.delete(la),Qo.push(la)}):Ko.forEach(la=>{Ai.has(la)||(Ai.add(la),Qo.push(la))});const ra=Array.from(Ai);In==null||In(!ji,ra.map(la=>ri(la)),Qo.map(la=>ri(la))),Ho(ra,"all"),$i(null)};let Bo;if(Pr!=="radio"){let Qo;if(va){const Lo={getPopupContainer:ai,items:va.map((da,ms)=>{const{key:pl,text:$l,onSelect:El}=da;return{key:pl!=null?pl:ms,onClick:()=>{El==null||El(Ko)},label:$l}})};Qo=ce.createElement("div",{className:`${ui}-selection-extra`},ce.createElement(Wa.Z,{menu:Lo,getPopupContainer:ai},ce.createElement("span",null,ce.createElement(Uc.Z,null))))}const ra=ii.map((Lo,da)=>{const ms=Oi(Lo,da),pl=ho.get(ms)||{};return Object.assign({checked:Ai.has(ms)},pl)}).filter(Lo=>{let{disabled:da}=Lo;return da}),la=!!ra.length&&ra.length===ii.length,Xa=la&&ra.every(Lo=>{let{checked:da}=Lo;return da}),gs=la&&ra.some(Lo=>{let{checked:da}=Lo;return da});Bo=!Jr&&ce.createElement("div",{className:`${ui}-selection`},ce.createElement(Mo.default,{checked:la?Xa:!!ii.length&&ji,indeterminate:la?!Xa&&gs:!ji&&co,onChange:Fo,disabled:ii.length===0||la,"aria-label":Qo?"Custom selection":"Select all",skipGroup:!0}),Qo)}let bs;Pr==="radio"?bs=(Qo,ra,la)=>{const Xa=Oi(ra,la),gs=Ai.has(Xa);return{node:ce.createElement(kr.ZP,Object.assign({},ho.get(Xa),{checked:gs,onClick:Lo=>Lo.stopPropagation(),onChange:Lo=>{Ai.has(Xa)||Oa(Xa,!0,[Xa],Lo.nativeEvent)}})),checked:gs}}:bs=(Qo,ra,la)=>{var Xa;const gs=Oi(ra,la),Lo=Ai.has(gs),da=Ea.has(gs),ms=ho.get(gs);let pl;return uo==="nest"?pl=da:pl=(Xa=ms==null?void 0:ms.indeterminate)!==null&&Xa!==void 0?Xa:da,{node:ce.createElement(Mo.default,Object.assign({},ms,{indeterminate:pl,checked:Lo,skipGroup:!0,onClick:$l=>$l.stopPropagation(),onChange:$l=>{let{nativeEvent:El}=$l;const{shiftKey:eu}=El;let tu=-1,Gl=-1;if(eu&&Zr){const ea=new Set([mo,gs]);Ko.some((Ts,Ga)=>{if(ea.has(Ts))if(tu===-1)tu=Ga;else return Gl=Ga,!0;return!1})}if(Gl!==-1&&tu!==Gl&&Zr){const ea=Ko.slice(tu,Gl+1),Ts=[];Lo?ea.forEach(fa=>{Ai.has(fa)&&(Ts.push(fa),Ai.delete(fa))}):ea.forEach(fa=>{Ai.has(fa)||(Ts.push(fa),Ai.add(fa))});const Ga=Array.from(Ai);tr==null||tr(!Lo,Ga.map(fa=>ri(fa)),Ts.map(fa=>ri(fa))),Ho(Ga,"multiple")}else{const ea=Yo;if(Zr){const Ts=Lo?(0,yc._5)(ea,gs):(0,yc.L0)(ea,gs);Oa(gs,!Lo,Ts,El)}else{const Ts=(0,ro.S)([].concat((0,Er.Z)(ea),[gs]),!0,Qi,So),{checkedKeys:Ga,halfCheckedKeys:fa}=Ts;let Hl=Ga;if(Lo){const oc=new Set(Ga);oc.delete(gs),Hl=(0,ro.S)(Array.from(oc),{checked:!1,halfCheckedKeys:fa},Qi,So).checkedKeys}Oa(gs,!Lo,Hl,El)}}$i(Lo?null:gs)}})),checked:Lo}};const ls=(Qo,ra,la)=>{const{node:Xa,checked:gs}=bs(Qo,ra,la);return xr?xr(gs,ra,la,Xa):Xa};if(!eo.includes(Ya))if(eo.findIndex(Qo=>{var ra;return((ra=Qo[dr])===null||ra===void 0?void 0:ra.columnType)==="EXPAND_COLUMN"})===0){const[Qo,...ra]=eo;eo=[Qo,Ya].concat((0,Er.Z)(ra))}else eo=[Ya].concat((0,Er.Z)(eo));const Gs=eo.indexOf(Ya);eo=eo.filter((Qo,ra)=>Qo!==Ya||ra===Gs);const Jo=eo[Gs-1],Ps=eo[Gs+1];let ts=ti;ts===void 0&&((Ps==null?void 0:Ps.fixed)!==void 0?ts=Ps.fixed:(Jo==null?void 0:Jo.fixed)!==void 0&&(ts=Jo.fixed)),ts&&Jo&&((Zi=Jo[dr])===null||Zi===void 0?void 0:Zi.columnType)==="EXPAND_COLUMN"&&Jo.fixed===void 0&&(Jo.fixed=ts);const ps=ze()(`${ui}-selection-col`,{[`${ui}-selection-col-with-dropdown`]:gr&&Pr==="checkbox"}),Wu={fixed:ts,width:Or,className:`${ui}-selection-column`,title:$t.columnTitle||Bo,render:ls,onCell:$t.onCell,[dr]:{className:ps}};return eo.map(Qo=>Qo===Ya?Wu:Qo)},[Oi,ii,$t,Yo,ka,Ea,Or,va,uo,mo,ho,tr,Oa,So]),ka]},Ma=$e(35323),wd=$e(19155),bd=$e(6848);const Wc="ascend",fi="descend";function fh(Rt){return typeof Rt.sorter=="object"&&typeof Rt.sorter.multiple=="number"?Rt.sorter.multiple:!1}function qt(Rt){return typeof Rt=="function"?Rt:Rt&&typeof Rt=="object"&&Rt.compare?Rt.compare:!1}function Jn(Rt,$t){return $t?Rt[Rt.indexOf($t)+1]:Rt[0]}function Pd(Rt,$t,nn){let sn=[];function Sn(fn,Rn){sn.push({column:fn,key:Pa(fn,Rn),multiplePriority:fh(fn),sortOrder:fn.sortOrder})}return(Rt||[]).forEach((fn,Rn)=>{const _n=Da(Rn,nn);fn.children?("sortOrder"in fn&&Sn(fn,_n),sn=[].concat((0,Er.Z)(sn),(0,Er.Z)(Pd(fn.children,$t,_n)))):fn.sorter&&("sortOrder"in fn?Sn(fn,_n):$t&&fn.defaultSortOrder&&sn.push({column:fn,key:Pa(fn,_n),multiplePriority:fh(fn),sortOrder:fn.defaultSortOrder}))}),sn}function af(Rt,$t,nn,sn,Sn,fn,Rn,_n){return($t||[]).map((In,qn)=>{const rr=Da(qn,_n);let tr=In;if(tr.sorter){const Or=tr.sortDirections||Sn,Pr=tr.showSorterTooltip===void 0?Rn:tr.showSorterTooltip,gr=Pa(tr,rr),ti=nn.find(uo=>{let{key:si}=uo;return si===gr}),xr=ti?ti.sortOrder:null,Jr=Jn(Or,xr);let Zr;if(In.sortIcon)Zr=In.sortIcon({sortOrder:xr});else{const uo=Or.includes(Wc)&&ce.createElement(wd.Z,{className:ze()(`${Rt}-column-sorter-up`,{active:xr===Wc})}),si=Or.includes(fi)&&ce.createElement(Ma.Z,{className:ze()(`${Rt}-column-sorter-down`,{active:xr===fi})});Zr=ce.createElement("span",{className:ze()(`${Rt}-column-sorter`,{[`${Rt}-column-sorter-full`]:!!(uo&&si)})},ce.createElement("span",{className:`${Rt}-column-sorter-inner`,"aria-hidden":"true"},uo,si))}const{cancelSort:ui,triggerAsc:Ni,triggerDesc:Hi}=fn||{};let ri=ui;Jr===fi?ri=Hi:Jr===Wc&&(ri=Ni);const Oi=typeof Pr=="object"?Pr:{title:ri};tr=Object.assign(Object.assign({},tr),{className:ze()(tr.className,{[`${Rt}-column-sort`]:xr}),title:uo=>{const si=ce.createElement("div",{className:`${Rt}-column-sorters`},ce.createElement("span",{className:`${Rt}-column-title`},Ss(In.title,uo)),Zr);return Pr?ce.createElement(bd.Z,Object.assign({},Oi),si):si},onHeaderCell:uo=>{const si=In.onHeaderCell&&In.onHeaderCell(uo)||{},Pi=si.onClick,ai=si.onKeyDown;si.onClick=Fi=>{sn({column:In,key:gr,sortOrder:Jr,multiplePriority:fh(In)}),Pi==null||Pi(Fi)},si.onKeyDown=Fi=>{Fi.keyCode===yr.Z.ENTER&&(sn({column:In,key:gr,sortOrder:Jr,multiplePriority:fh(In)}),ai==null||ai(Fi))};const $r=es(In.title,{}),mi=$r==null?void 0:$r.toString();return xr?si["aria-sort"]=xr==="ascend"?"ascending":"descending":si["aria-label"]=mi||"",si.className=ze()(si.className,`${Rt}-column-has-sorters`),si.tabIndex=0,In.ellipsis&&(si.title=($r!=null?$r:"").toString()),si}})}return"children"in tr&&(tr=Object.assign(Object.assign({},tr),{children:af(Rt,tr.children,nn,sn,Sn,fn,Rn,rr)})),tr})}function $u(Rt){const{column:$t,sortOrder:nn}=Rt;return{column:$t,order:nn,field:$t.dataIndex,columnKey:$t.key}}function Gu(Rt){const $t=Rt.filter(nn=>{let{sortOrder:sn}=nn;return sn}).map($u);return $t.length===0&&Rt.length?Object.assign(Object.assign({},$u(Rt[Rt.length-1])),{column:void 0}):$t.length<=1?$t[0]||{}:$t}function ic(Rt,$t,nn){const sn=$t.slice().sort((Rn,_n)=>_n.multiplePriority-Rn.multiplePriority),Sn=Rt.slice(),fn=sn.filter(Rn=>{let{column:{sorter:_n},sortOrder:In}=Rn;return qt(_n)&&In});return fn.length?Sn.sort((Rn,_n)=>{for(let In=0;In<fn.length;In+=1){const qn=fn[In],{column:{sorter:rr},sortOrder:tr}=qn,Or=qt(rr);if(Or&&tr){const Pr=Or(Rn,_n,tr);if(Pr!==0)return tr===Wc?Pr:-Pr}}return 0}).map(Rn=>{const _n=Rn[nn];return _n?Object.assign(Object.assign({},Rn),{[nn]:ic(_n,$t,nn)}):Rn}):Sn}function Cd(Rt){let{prefixCls:$t,mergedColumns:nn,onSorterChange:sn,sortDirections:Sn,tableLocale:fn,showSorterTooltip:Rn}=Rt;const[_n,In]=ce.useState(Pd(nn,!0)),qn=ce.useMemo(()=>{let gr=!0;const ti=Pd(nn,!1);if(!ti.length)return _n;const xr=[];function Jr(ui){gr?xr.push(ui):xr.push(Object.assign(Object.assign({},ui),{sortOrder:null}))}let Zr=null;return ti.forEach(ui=>{Zr===null?(Jr(ui),ui.sortOrder&&(ui.multiplePriority===!1?gr=!1:Zr=!0)):(Zr&&ui.multiplePriority!==!1||(gr=!1),Jr(ui))}),xr},[nn,_n]),rr=ce.useMemo(()=>{const gr=qn.map(ti=>{let{column:xr,sortOrder:Jr}=ti;return{column:xr,order:Jr}});return{sortColumns:gr,sortColumn:gr[0]&&gr[0].column,sortOrder:gr[0]&&gr[0].order}},[qn]);function tr(gr){let ti;gr.multiplePriority===!1||!qn.length||qn[0].multiplePriority===!1?ti=[gr]:ti=[].concat((0,Er.Z)(qn.filter(xr=>{let{key:Jr}=xr;return Jr!==gr.key})),[gr]),In(ti),sn(Gu(ti),ti)}return[gr=>af($t,gr,qn,tr,Sn,fn,Rn),qn,rr,()=>Gu(qn)]}function ph(Rt,$t){return Rt.map(nn=>{const sn=Object.assign({},nn);return sn.title=Ss(nn.title,$t),"children"in sn&&(sn.children=ph(sn.children,$t)),sn})}function $a(Rt){return[ce.useCallback(nn=>ph(nn,Rt),[Rt])]}var Gi=hi((Rt,$t)=>{const{_renderTimes:nn}=Rt,{_renderTimes:sn}=$t;return nn!==sn}),rl=Kr((Rt,$t)=>{const{_renderTimes:nn}=Rt,{_renderTimes:sn}=$t;return nn!==sn}),$s=$e(64993),ma=$e(17313),Po=$e(83116),ss=$e(37613),ha=Rt=>{const{componentCls:$t}=Rt,nn=`${Rt.lineWidth}px ${Rt.lineType} ${Rt.tableBorderColor}`,sn=(Sn,fn,Rn)=>({[`&${$t}-${Sn}`]:{[`> ${$t}-container`]:{[`> ${$t}-content, > ${$t}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${$t}-expanded-row-fixed`]:{margin:`-${fn}px -${Rn+Rt.lineWidth}px`}}}}}});return{[`${$t}-wrapper`]:{[`${$t}${$t}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${$t}-title`]:{border:nn,borderBottom:0},[`> ${$t}-container`]:{borderInlineStart:nn,borderTop:nn,[`
> ${$t}-content,
> ${$t}-header,
> ${$t}-body,
> ${$t}-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:nn},"> thead":{"> tr:not(:last-child) > th":{borderBottom:nn},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${$t}-cell-fix-right-first::after`]:{borderInlineEnd:nn}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${$t}-expanded-row-fixed`]:{margin:`-${Rt.tablePaddingVertical}px -${Rt.tablePaddingHorizontal+Rt.lineWidth}px`,"&::after":{position:"absolute",top:0,insetInlineEnd:Rt.lineWidth,bottom:0,borderInlineEnd:nn,content:'""'}}}}}},[`&${$t}-scroll-horizontal`]:{[`> ${$t}-container > ${$t}-body`]:{"> table > tbody":{[`
> tr${$t}-expanded-row,
> tr${$t}-placeholder
`]:{"> th, > td":{borderInlineEnd:0}}}}}},sn("middle",Rt.tablePaddingVerticalMiddle,Rt.tablePaddingHorizontalMiddle)),sn("small",Rt.tablePaddingVerticalSmall,Rt.tablePaddingHorizontalSmall)),{[`> ${$t}-footer`]:{border:nn,borderTop:0}}),[`${$t}-cell`]:{[`${$t}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${Rt.lineWidth}px 0 ${Rt.lineWidth}px ${Rt.tableHeaderBg}`}},[`${$t}-bordered ${$t}-cell-scrollbar`]:{borderInlineEnd:nn}}}},ws=Rt=>{const{componentCls:$t}=Rt;return{[`${$t}-wrapper`]:{[`${$t}-cell-ellipsis`]:Object.assign(Object.assign({},ma.vS),{wordBreak:"keep-all",[`
&${$t}-cell-fix-left-last,
&${$t}-cell-fix-right-first
`]:{overflow:"visible",[`${$t}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${$t}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},_o=Rt=>{const{componentCls:$t}=Rt;return{[`${$t}-wrapper`]:{[`${$t}-tbody > tr${$t}-placeholder`]:{textAlign:"center",color:Rt.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:Rt.colorBgContainer}}}}},il=$e(15969),sa=Rt=>{const{componentCls:$t,antCls:nn,controlInteractiveSize:sn,motionDurationSlow:Sn,lineWidth:fn,paddingXS:Rn,lineType:_n,tableBorderColor:In,tableExpandIconBg:qn,tableExpandColumnWidth:rr,borderRadius:tr,fontSize:Or,fontSizeSM:Pr,lineHeight:gr,tablePaddingVertical:ti,tablePaddingHorizontal:xr,tableExpandedRowBg:Jr,paddingXXS:Zr}=Rt,ui=sn/2-fn,Ni=ui*2+fn*3,Hi=`${fn}px ${_n} ${In}`,ri=Zr-fn;return{[`${$t}-wrapper`]:{[`${$t}-expand-icon-col`]:{width:rr},[`${$t}-row-expand-icon-cell`]:{textAlign:"center",[`${$t}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${$t}-row-indent`]:{height:1,float:"left"},[`${$t}-row-expand-icon`]:Object.assign(Object.assign({},(0,il.N)(Rt)),{position:"relative",float:"left",boxSizing:"border-box",width:Ni,height:Ni,padding:0,color:"inherit",lineHeight:`${Ni}px`,background:qn,border:Hi,borderRadius:tr,transform:`scale(${sn/Ni})`,transition:`all ${Sn}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${Sn} ease-out`,content:'""'},"&::before":{top:ui,insetInlineEnd:ri,insetInlineStart:ri,height:fn},"&::after":{top:ri,bottom:ri,insetInlineStart:ui,width:fn,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"}}),[`${$t}-row-indent + ${$t}-row-expand-icon`]:{marginTop:(Or*gr-fn*3)/2-Math.ceil((Pr*1.4-fn*3)/2),marginInlineEnd:Rn},[`tr${$t}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:Jr}},[`${nn}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${$t}-expanded-row-fixed`]:{position:"relative",margin:`-${ti}px -${xr}px`,padding:`${ti}px ${xr}px`}}}},Za=Rt=>{const{componentCls:$t,antCls:nn,iconCls:sn,tableFilterDropdownWidth:Sn,tableFilterDropdownSearchWidth:fn,paddingXXS:Rn,paddingXS:_n,colorText:In,lineWidth:qn,lineType:rr,tableBorderColor:tr,tableHeaderIconColor:Or,fontSizeSM:Pr,tablePaddingHorizontal:gr,borderRadius:ti,motionDurationSlow:xr,colorTextDescription:Jr,colorPrimary:Zr,tableHeaderFilterActiveBg:ui,colorTextDisabled:Ni,tableFilterDropdownBg:Hi,tableFilterDropdownHeight:ri,controlItemBgHover:Oi,controlItemBgActive:uo,boxShadowSecondary:si,filterDropdownMenuBg:Pi}=Rt,ai=`${nn}-dropdown`,$r=`${$t}-filter-dropdown`,mi=`${nn}-tree`,Fi=`${qn}px ${rr} ${tr}`;return[{[`${$t}-wrapper`]:{[`${$t}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${$t}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:-Rn,marginInline:`${Rn}px ${-gr/2}px`,padding:`0 ${Rn}px`,color:Or,fontSize:Pr,borderRadius:ti,cursor:"pointer",transition:`all ${xr}`,"&:hover":{color:Jr,background:ui},"&.active":{color:Zr}}}},{[`${nn}-dropdown`]:{[$r]:Object.assign(Object.assign({},(0,ma.Wf)(Rt)),{minWidth:Sn,backgroundColor:Hi,borderRadius:ti,boxShadow:si,overflow:"hidden",[`${ai}-menu`]:{maxHeight:ri,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:Pi,"&:empty::after":{display:"block",padding:`${_n}px 0`,color:Ni,fontSize:Pr,textAlign:"center",content:'"Not Found"'}},[`${$r}-tree`]:{paddingBlock:`${_n}px 0`,paddingInline:_n,[mi]:{padding:0},[`${mi}-treenode ${mi}-node-content-wrapper:hover`]:{backgroundColor:Oi},[`${mi}-treenode-checkbox-checked ${mi}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:uo}}},[`${$r}-search`]:{padding:_n,borderBottom:Fi,"&-input":{input:{minWidth:fn},[sn]:{color:Ni}}},[`${$r}-checkall`]:{width:"100%",marginBottom:Rn,marginInlineStart:Rn},[`${$r}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${_n-qn}px ${_n}px`,overflow:"hidden",borderTop:Fi}})}},{[`${nn}-dropdown ${$r}, ${$r}-submenu`]:{[`${nn}-checkbox-wrapper + span`]:{paddingInlineStart:_n,color:In},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},Vc=Rt=>{const{componentCls:$t,lineWidth:nn,colorSplit:sn,motionDurationSlow:Sn,zIndexTableFixed:fn,tableBg:Rn,zIndexTableSticky:_n}=Rt,In=sn;return{[`${$t}-wrapper`]:{[`
${$t}-cell-fix-left,
${$t}-cell-fix-right
`]:{position:"sticky !important",zIndex:fn,background:Rn},[`
${$t}-cell-fix-left-first::after,
${$t}-cell-fix-left-last::after
`]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:-nn,width:30,transform:"translateX(100%)",transition:`box-shadow ${Sn}`,content:'""',pointerEvents:"none"},[`${$t}-cell-fix-left-all::after`]:{display:"none"},[`
${$t}-cell-fix-right-first::after,
${$t}-cell-fix-right-last::after
`]:{position:"absolute",top:0,bottom:-nn,left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${Sn}`,content:'""',pointerEvents:"none"},[`${$t}-container`]:{"&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:_n+1,width:30,transition:`box-shadow ${Sn}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${$t}-ping-left`]:{[`&:not(${$t}-has-fix-left) ${$t}-container`]:{position:"relative","&::before":{boxShadow:`inset 10px 0 8px -8px ${In}`}},[`
${$t}-cell-fix-left-first::after,
${$t}-cell-fix-left-last::after
`]:{boxShadow:`inset 10px 0 8px -8px ${In}`},[`${$t}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${$t}-ping-right`]:{[`&:not(${$t}-has-fix-right) ${$t}-container`]:{position:"relative","&::after":{boxShadow:`inset -10px 0 8px -8px ${In}`}},[`
${$t}-cell-fix-right-first::after,
${$t}-cell-fix-right-last::after
`]:{boxShadow:`inset -10px 0 8px -8px ${In}`}}}}},Hf=Rt=>{const{componentCls:$t,antCls:nn}=Rt;return{[`${$t}-wrapper`]:{[`${$t}-pagination${nn}-pagination`]:{margin:`${Rt.margin}px 0`},[`${$t}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:Rt.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},Uf=Rt=>{const{componentCls:$t,tableRadius:nn}=Rt;return{[`${$t}-wrapper`]:{[$t]:{[`${$t}-title, ${$t}-header`]:{borderRadius:`${nn}px ${nn}px 0 0`},[`${$t}-title + ${$t}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${$t}-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:nn,borderStartEndRadius:nn,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:nn},"> *:last-child":{borderStartEndRadius:nn}}},"&-footer":{borderRadius:`0 0 ${nn}px ${nn}px`}}}}},Wh=Rt=>{const{componentCls:$t}=Rt;return{[`${$t}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${$t}-pagination-left`]:{justifyContent:"flex-end"},[`${$t}-pagination-right`]:{justifyContent:"flex-start"},[`${$t}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${$t}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${$t}-row-indent`]:{float:"right"}}}}},Ed=Rt=>{const{componentCls:$t,antCls:nn,iconCls:sn,fontSizeIcon:Sn,padding:fn,paddingXS:Rn,tableHeaderIconColor:_n,tableHeaderIconColorHover:In,tableSelectionColumnWidth:qn}=Rt;return{[`${$t}-wrapper`]:{[`${$t}-selection-col`]:{width:qn,[`&${$t}-selection-col-with-dropdown`]:{width:qn+Sn+fn/4}},[`${$t}-bordered ${$t}-selection-col`]:{width:qn+Rn*2,[`&${$t}-selection-col-with-dropdown`]:{width:qn+Sn+fn/4+Rn*2}},[`
table tr th${$t}-selection-column,
table tr td${$t}-selection-column
`]:{paddingInlineEnd:Rt.paddingXS,paddingInlineStart:Rt.paddingXS,textAlign:"center",[`${nn}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${$t}-selection-column${$t}-cell-fix-left`]:{zIndex:Rt.zIndexTableFixed+1},[`table tr th${$t}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${$t}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${$t}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${Rt.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:`${Rt.tablePaddingHorizontal/4}px`,[sn]:{color:_n,fontSize:Sn,verticalAlign:"baseline","&:hover":{color:In}}}}}},Zc=Rt=>{const{componentCls:$t}=Rt,nn=(sn,Sn,fn,Rn)=>({[`${$t}${$t}-${sn}`]:{fontSize:Rn,[`
${$t}-title,
${$t}-footer,
${$t}-cell,
${$t}-thead > tr > th,
${$t}-tbody > tr > th,
${$t}-tbody > tr > td,
tfoot > tr > th,
tfoot > tr > td
`]:{padding:`${Sn}px ${fn}px`},[`${$t}-filter-trigger`]:{marginInlineEnd:`-${fn/2}px`},[`${$t}-expanded-row-fixed`]:{margin:`-${Sn}px -${fn}px`},[`${$t}-tbody`]:{[`${$t}-wrapper:only-child ${$t}`]:{marginBlock:`-${Sn}px`,marginInline:`${Rt.tableExpandColumnWidth-fn}px -${fn}px`}},[`${$t}-selection-column`]:{paddingInlineStart:`${fn/4}px`}}});return{[`${$t}-wrapper`]:Object.assign(Object.assign({},nn("middle",Rt.tablePaddingVerticalMiddle,Rt.tablePaddingHorizontalMiddle,Rt.tableFontSizeMiddle)),nn("small",Rt.tablePaddingVerticalSmall,Rt.tablePaddingHorizontalSmall,Rt.tableFontSizeSmall))}},Hu=Rt=>{const{componentCls:$t,marginXXS:nn,fontSizeIcon:sn,tableHeaderIconColor:Sn,tableHeaderIconColorHover:fn}=Rt;return{[`${$t}-wrapper`]:{[`${$t}-thead th${$t}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${Rt.motionDurationSlow}`,"&:hover":{background:Rt.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:Rt.colorPrimary},[`
&${$t}-cell-fix-left:hover,
&${$t}-cell-fix-right:hover
`]:{background:Rt.tableFixedHeaderSortActiveBg}},[`${$t}-thead th${$t}-column-sort`]:{background:Rt.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${$t}-column-sort`]:{background:Rt.tableBodySortBg},[`${$t}-column-title`]:{position:"relative",zIndex:1,flex:1},[`${$t}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${$t}-column-sorter`]:{marginInlineStart:nn,color:Sn,fontSize:0,transition:`color ${Rt.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:sn,"&.active":{color:Rt.colorPrimary}},[`${$t}-column-sorter-up + ${$t}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${$t}-column-sorters:hover ${$t}-column-sorter`]:{color:fn}}}},Xc=Rt=>{const{componentCls:$t,opacityLoading:nn,tableScrollThumbBg:sn,tableScrollThumbBgHover:Sn,tableScrollThumbSize:fn,tableScrollBg:Rn,zIndexTableSticky:_n,stickyScrollBarBorderRadius:In}=Rt,qn=`${Rt.lineWidth}px ${Rt.lineType} ${Rt.tableBorderColor}`;return{[`${$t}-wrapper`]:{[`${$t}-sticky`]:{"&-holder":{position:"sticky",zIndex:_n,background:Rt.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${fn}px !important`,zIndex:_n,display:"flex",alignItems:"center",background:Rn,borderTop:qn,opacity:nn,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:fn,backgroundColor:sn,borderRadius:In,transition:`all ${Rt.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:Sn}}}}}}},Uu=Rt=>{const{componentCls:$t,lineWidth:nn,tableBorderColor:sn}=Rt,Sn=`${nn}px ${Rt.lineType} ${sn}`;return{[`${$t}-wrapper`]:{[`${$t}-summary`]:{position:"relative",zIndex:Rt.zIndexTableFixed,background:Rt.tableBg,"> tr":{"> th, > td":{borderBottom:Sn}}},[`div${$t}-summary`]:{boxShadow:`0 -${nn}px 0 ${sn}`}}}},xc=Rt=>{const{componentCls:$t}=Rt,nn=`${Rt.lineWidth}px ${Rt.lineType} ${Rt.tableBorderColor}`,sn=`${$t}-expanded-row-cell`;return{[`${$t}-wrapper`]:{[`${$t}-tbody-virtual`]:{[`${$t}-row`]:{display:"flex",boxSizing:"border-box",width:"100%"},[`${$t}-cell`]:{borderBottom:nn},[`${$t}-expanded-row`]:{[`${sn}${sn}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${Rt.lineWidth}px)`,borderInlineEnd:"none"}}},[`${$t}-bordered`]:{[`${$t}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:nn,position:"absolute"},[`${$t}-cell`]:{borderInlineEnd:nn,[`&${$t}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:-Rt.lineWidth,borderInlineStart:nn}}}}}}};const Tu=Rt=>{const{componentCls:$t,fontWeightStrong:nn,tablePaddingVertical:sn,tablePaddingHorizontal:Sn,lineWidth:fn,lineType:Rn,tableBorderColor:_n,tableFontSize:In,tableBg:qn,tableRadius:rr,tableHeaderTextColor:tr,motionDurationMid:Or,tableHeaderBg:Pr,tableHeaderCellSplitColor:gr,tableRowHoverBg:ti,tableSelectedRowBg:xr,tableSelectedRowHoverBg:Jr,tableFooterTextColor:Zr,tableFooterBg:ui,paddingContentVerticalLG:Ni}=Rt,Hi=`${fn}px ${Rn} ${_n}`;return{[`${$t}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},(0,ma.dF)()),{[$t]:Object.assign(Object.assign({},(0,ma.Wf)(Rt)),{fontSize:In,background:qn,borderRadius:`${rr}px ${rr}px 0 0`}),table:{width:"100%",textAlign:"start",borderRadius:`${rr}px ${rr}px 0 0`,borderCollapse:"separate",borderSpacing:0},[`
${$t}-cell,
${$t}-thead > tr > th,
${$t}-tbody > tr > th,
${$t}-tbody > tr > td,
tfoot > tr > th,
tfoot > tr > td
`]:{position:"relative",padding:`${Ni}px ${Sn}px`,overflowWrap:"break-word"},[`${$t}-title`]:{padding:`${sn}px ${Sn}px`},[`${$t}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:tr,fontWeight:nn,textAlign:"start",background:Pr,borderBottom:Hi,transition:`background ${Or} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${$t}-selection-column):not(${$t}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:gr,transform:"translateY(-50%)",transition:`background-color ${Or}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${$t}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${Or}, border-color ${Or}`,borderBottom:Hi,[`
> ${$t}-wrapper:only-child,
> ${$t}-expanded-row-fixed > ${$t}-wrapper:only-child
`]:{[$t]:{marginBlock:`-${sn}px`,marginInline:`${Rt.tableExpandColumnWidth-Sn}px -${Sn}px`,[`${$t}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:tr,fontWeight:nn,textAlign:"start",background:Pr,borderBottom:Hi,transition:`background ${Or} ease`},[`
&${$t}-row:hover > th,
&${$t}-row:hover > td,
> th${$t}-cell-row-hover,
> td${$t}-cell-row-hover
`]:{background:ti},[`&${$t}-row-selected`]:{"> th, > td":{background:xr},"&:hover > th, &:hover > td":{background:Jr}}}},[`${$t}-footer`]:{padding:`${sn}px ${Sn}px`,color:Zr,background:ui}})}};var wc=(0,Po.Z)("Table",Rt=>{const{colorTextHeading:$t,colorSplit:nn,colorIcon:sn,colorIconHover:Sn,opacityLoading:fn,colorBgContainer:Rn,controlInteractiveSize:_n,headerBg:In,headerColor:qn,headerSortActiveBg:rr,headerSortHoverBg:tr,bodySortBg:Or,rowHoverBg:Pr,rowSelectedBg:gr,rowSelectedHoverBg:ti,rowExpandedBg:xr,cellPaddingBlock:Jr,cellPaddingInline:Zr,cellPaddingBlockMD:ui,cellPaddingInlineMD:Ni,cellPaddingBlockSM:Hi,cellPaddingInlineSM:ri,borderColor:Oi,footerBg:uo,footerColor:si,headerBorderRadius:Pi,cellFontSize:ai,cellFontSizeMD:$r,cellFontSizeSM:mi,headerSplitColor:Fi,fixedHeaderSortActiveBg:Yi,headerFilterHoverBg:Qi,filterDropdownBg:ii,expandIconBg:ho,selectionColumnWidth:So,stickyScrollBarBg:Yo}=Rt,No=new $s.C(sn),ka=new $s.C(Sn),Ea=2,mo=(0,ss.TS)(Rt,{tableFontSize:ai,tableBg:Rn,tableRadius:Pi,tablePaddingVertical:Jr,tablePaddingHorizontal:Zr,tablePaddingVerticalMiddle:ui,tablePaddingHorizontalMiddle:Ni,tablePaddingVerticalSmall:Hi,tablePaddingHorizontalSmall:ri,tableBorderColor:Oi,tableHeaderTextColor:qn,tableHeaderBg:In,tableFooterTextColor:si,tableFooterBg:uo,tableHeaderCellSplitColor:Fi,tableHeaderSortBg:rr,tableHeaderSortHoverBg:tr,tableHeaderIconColor:No.clone().setAlpha(No.getAlpha()*fn).toRgbString(),tableHeaderIconColorHover:ka.clone().setAlpha(ka.getAlpha()*fn).toRgbString(),tableBodySortBg:Or,tableFixedHeaderSortActiveBg:Yi,tableHeaderFilterActiveBg:Qi,tableFilterDropdownBg:ii,tableRowHoverBg:Pr,tableSelectedRowBg:gr,tableSelectedRowHoverBg:ti,zIndexTableFixed:Ea,zIndexTableSticky:Ea+1,tableFontSizeMiddle:$r,tableFontSizeSmall:mi,tableSelectionColumnWidth:So,tableExpandIconBg:ho,tableExpandColumnWidth:_n+2*Rt.padding,tableExpandedRowBg:xr,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:Yo,tableScrollThumbBgHover:$t,tableScrollBg:nn});return[Tu(mo),Hf(mo),Uu(mo),Hu(mo),Za(mo),ha(mo),Uf(mo),sa(mo),Uu(mo),_o(mo),Ed(mo),Vc(mo),Xc(mo),ws(mo),Zc(mo),Wh(mo),xc(mo)]},Rt=>{const{colorFillAlter:$t,colorBgContainer:nn,colorTextHeading:sn,colorFillSecondary:Sn,colorFillContent:fn,controlItemBgActive:Rn,controlItemBgActiveHover:_n,padding:In,paddingSM:qn,paddingXS:rr,colorBorderSecondary:tr,borderRadiusLG:Or,fontSize:Pr,controlHeight:gr,colorTextPlaceholder:ti}=Rt,xr=new $s.C(Sn).onBackground(nn).toHexShortString(),Jr=new $s.C(fn).onBackground(nn).toHexShortString(),Zr=new $s.C($t).onBackground(nn).toHexShortString();return{headerBg:Zr,headerColor:sn,headerSortActiveBg:xr,headerSortHoverBg:Jr,bodySortBg:Zr,rowHoverBg:Zr,rowSelectedBg:Rn,rowSelectedHoverBg:_n,rowExpandedBg:$t,cellPaddingBlock:In,cellPaddingInline:In,cellPaddingBlockMD:qn,cellPaddingInlineMD:rr,cellPaddingBlockSM:rr,cellPaddingInlineSM:rr,borderColor:tr,headerBorderRadius:Or,footerBg:Zr,footerColor:sn,cellFontSize:Pr,cellFontSizeMD:Pr,cellFontSizeSM:Pr,headerSplitColor:tr,fixedHeaderSortActiveBg:xr,headerFilterHoverBg:fn,filterDropdownMenuBg:nn,filterDropdownBg:nn,expandIconBg:nn,selectionColumnWidth:gr,stickyScrollBarBg:ti,stickyScrollBarBorderRadius:100}});const Td=[],lf=(Rt,$t)=>{const{prefixCls:nn,className:sn,rootClassName:Sn,style:fn,size:Rn,bordered:_n,dropdownPrefixCls:In,dataSource:qn,pagination:rr,rowSelection:tr,rowKey:Or="key",rowClassName:Pr,columns:gr,children:ti,childrenColumnName:xr,onChange:Jr,getPopupContainer:Zr,loading:ui,expandIcon:Ni,expandable:Hi,expandedRowRender:ri,expandIconColumnIndex:Oi,indentSize:uo,scroll:si,sortDirections:Pi,locale:ai,showSorterTooltip:$r=!0,virtual:mi}=Rt,Fi=ce.useMemo(()=>gr||xn(ti),[gr,ti]),Yi=ce.useMemo(()=>Fi.some(Vo=>Vo.responsive),[Fi]),Qi=(0,Zn.Z)(Yi),ii=ce.useMemo(()=>{const Vo=new Set(Object.keys(Qi).filter(ya=>Qi[ya]));return Fi.filter(ya=>!ya.responsive||ya.responsive.some(us=>Vo.has(us)))},[Fi,Qi]),ho=(0,bi.Z)(Rt,["className","style","columns"]),{locale:So=to.Z,direction:Yo,table:No,renderEmpty:ka,getPrefixCls:Ea,getPopupContainer:mo}=ce.useContext(Ar.E_),$i=(0,zr.Z)(Rn),Ho=Object.assign(Object.assign({},So.Table),ai),Oa=qn||Td,va=Ea("table",nn),is=Ea("dropdown",In),qi=Object.assign({childrenColumnName:xr,expandIconColumnIndex:Oi},Hi),{childrenColumnName:Zi="children"}=qi,eo=ce.useMemo(()=>Oa.some(Vo=>Vo==null?void 0:Vo[Zi])?"nest":ri||Hi&&Hi.expandedRowRender?"row":null,[Oa]),Ai={body:ce.useRef()},Ko=ce.useMemo(()=>typeof Or=="function"?Or:Vo=>Vo==null?void 0:Vo[Or],[Or]),[ji]=Gc(Oa,Zi,Ko),co={},Fo=function(Vo,ya){let us=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var Sa,$o,vs;const gl=Object.assign(Object.assign({},co),Vo);us&&((Sa=co.resetPagination)===null||Sa===void 0||Sa.call(co),!(($o=gl.pagination)===null||$o===void 0)&&$o.current&&(gl.pagination.current=1),rr&&rr.onChange&&rr.onChange(1,(vs=gl.pagination)===null||vs===void 0?void 0:vs.pageSize)),si&&si.scrollToFirstRowOnChange!==!1&&Ai.body.current&&(0,vo.Z)(0,{getContainer:()=>Ai.body.current}),Jr==null||Jr(gl.pagination,gl.filters,gl.sorter,{currentDataSource:zs(ic(Oa,gl.sorterStates,Zi),gl.filterStates),action:ya})},Bo=(Vo,ya)=>{Fo({sorter:Vo,sorterStates:ya},"sort",!1)},[bs,ls,Gs,Jo]=Cd({prefixCls:va,mergedColumns:ii,onSorterChange:Bo,sortDirections:Pi||["ascend","descend"],tableLocale:Ho,showSorterTooltip:$r}),Ps=ce.useMemo(()=>ic(Oa,ls,Zi),[Oa,ls]);co.sorter=Jo(),co.sorterStates=ls;const ts=(Vo,ya)=>{Fo({filters:Vo,filterStates:ya},"filter",!0)},[ps,Wu,Qo]=hh({prefixCls:va,locale:Ho,dropdownPrefixCls:is,mergedColumns:ii,onFilterChange:ts,getPopupContainer:Zr||mo}),ra=zs(Ps,Wu);co.filters=Qo,co.filterStates=Wu;const la=ce.useMemo(()=>{const Vo={};return Object.keys(Qo).forEach(ya=>{Qo[ya]!==null&&(Vo[ya]=Qo[ya])}),Object.assign(Object.assign({},Gs),{filters:Vo})},[Gs,Qo]),[Xa]=$a(la),gs=(Vo,ya)=>{Fo({pagination:Object.assign(Object.assign({},co.pagination),{current:Vo,pageSize:ya})},"paginate")},[Lo,da]=dh(ra.length,gs,rr);co.pagination=rr===!1?{}:_u(Lo,rr),co.resetPagination=da;const ms=ce.useMemo(()=>{if(rr===!1||!Lo.pageSize)return ra;const{current:Vo=1,total:ya,pageSize:us=vc}=Lo;return ra.length<ya?ra.length>us?ra.slice((Vo-1)*us,Vo*us):ra:ra.slice((Vo-1)*us,Vo*us)},[!!rr,ra,Lo&&Lo.current,Lo&&Lo.pageSize,Lo&&Lo.total]),[pl,$l]=_l({prefixCls:va,data:ra,pageData:ms,getRowKey:Ko,getRecordByKey:ji,expandType:eo,childrenColumnName:Zi,locale:Ho,getPopupContainer:Zr||mo},tr),El=(Vo,ya,us)=>{let Sa;return typeof Pr=="function"?Sa=ze()(Pr(Vo,ya,us)):Sa=ze()(Pr),ze()({[`${va}-row-selected`]:$l.has(Ko(Vo,ya))},Sa)};qi.__PARENT_RENDER_ICON__=qi.expandIcon,qi.expandIcon=qi.expandIcon||Ni||ua(Ho),eo==="nest"&&qi.expandIconColumnIndex===void 0?qi.expandIconColumnIndex=tr?1:0:qi.expandIconColumnIndex>0&&tr&&(qi.expandIconColumnIndex-=1),typeof qi.indentSize!="number"&&(qi.indentSize=typeof uo=="number"?uo:15);const eu=ce.useCallback(Vo=>Xa(pl(ps(bs(Vo)))),[bs,ps,pl]);let tu,Gl;if(rr!==!1&&(Lo!=null&&Lo.total)){let Vo;Lo.size?Vo=Lo.size:Vo=$i==="small"||$i==="middle"?"small":void 0;const ya=$o=>ce.createElement(yo.Z,Object.assign({},Lo,{className:ze()(`${va}-pagination ${va}-pagination-${$o}`,Lo.className),size:Vo})),us=Yo==="rtl"?"left":"right",{position:Sa}=Lo;if(Sa!==null&&Array.isArray(Sa)){const $o=Sa.find(gu=>gu.includes("top")),vs=Sa.find(gu=>gu.includes("bottom")),gl=Sa.every(gu=>`${gu}`=="none");!$o&&!vs&&!gl&&(Gl=ya(us)),$o&&(tu=ya($o.toLowerCase().replace("top",""))),vs&&(Gl=ya(vs.toLowerCase().replace("bottom","")))}else Gl=ya(us)}let ea;typeof ui=="boolean"?ea={spinning:ui}:typeof ui=="object"&&(ea=Object.assign({spinning:!0},ui));const[Ts,Ga]=wc(va),[,fa]=(0,wo.Z)(),Hl=ze()(`${va}-wrapper`,No==null?void 0:No.className,{[`${va}-wrapper-rtl`]:Yo==="rtl"},sn,Sn,Ga),oc=Object.assign(Object.assign({},No==null?void 0:No.style),fn),nu=ai&&ai.emptyText||(ka==null?void 0:ka("Table"))||ce.createElement(Dr.Z,{componentName:"Table"}),Mu=mi?rl:Gi,Ku={},Tl=ce.useMemo(()=>{const{fontSize:Vo,lineHeight:ya,padding:us,paddingXS:Sa,paddingSM:$o}=fa,vs=Math.floor(Vo*ya);switch($i){case"large":return us*2+vs;case"small":return Sa*2+vs;default:return $o*2+vs}},[fa,$i]);return mi&&(Ku.listItemHeight=Tl),Ts(ce.createElement("div",{ref:$t,className:Hl,style:oc},ce.createElement(ta.Z,Object.assign({spinning:!1},ea),tu,ce.createElement(Mu,Object.assign({},Ku,ho,{columns:ii,direction:Yo,expandable:qi,prefixCls:va,className:ze()({[`${va}-middle`]:$i==="middle",[`${va}-small`]:$i==="small",[`${va}-bordered`]:_n,[`${va}-empty`]:Oa.length===0}),data:ms,rowKey:Ko,rowClassName:El,emptyText:nu,internalHooks:St,internalRefs:Ai,transformColumns:eu})),Gl)))};var uf=ce.forwardRef(lf);const Vf=(Rt,$t)=>{const nn=ce.useRef(0);return nn.current+=1,ce.createElement(uf,Object.assign({},Rt,{ref:$t,_renderTimes:nn.current}))},fl=ce.forwardRef(Vf);fl.SELECTION_COLUMN=Ya,fl.EXPAND_COLUMN=rt,fl.SELECTION_ALL=_a,fl.SELECTION_INVERT=ca,fl.SELECTION_NONE=Ca,fl.Column=jr,fl.ColumnGroup=Vi,fl.Summary=Ue;var bc=fl,Wp=bc},86914:function(bn,ln,$e){"use strict";$e.d(ln,{default:function(){return et}});var rt=$e(99581),St=$e(26390),ie=$e(43971),Re=$e(58358),je=$e(5891),ve=$e(59301),ce={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"},be=ce,Ce=$e(88853),ye=function(xt,Et){return ve.createElement(Ce.Z,(0,je.Z)({},xt,{ref:Et,icon:be}))},we=ve.forwardRef(ye),me=we,xe=$e(92310),fe=$e.n(xe),z=$e(35654),ee=$e(71430),ae=$e(36355),re=$e(44757),le=$e(62892),ue=$e(20648);const pe=4;function Ee(it){const{dropPosition:xt,dropLevelOffset:Et,prefixCls:Mt,indent:mt,direction:pt="ltr"}=it,vt=pt==="ltr"?"left":"right",jt=pt==="ltr"?"right":"left",At={[vt]:-Et*mt+pe,[jt]:0};switch(xt){case-1:At.top=-3;break;case 1:At.bottom=-3;break;default:At.bottom=-3,At[vt]=mt+pe;break}return ve.createElement("div",{style:At,className:`${Mt}-drop-indicator`})}var Pe=$e(48610),ke=ve.forwardRef((it,xt)=>{const{getPrefixCls:Et,direction:Mt,virtual:mt,tree:pt}=ve.useContext(ae.E_),{prefixCls:vt,className:jt,showIcon:At=!1,showLine:Kt,switcherIcon:Ct,blockNode:gt=!1,children:tt,checkable:bt=!1,selectable:Ke=!0,draggable:ut,motion:wt,style:yt}=it,lt=Et("tree",vt),Qe=Et(),We=wt!=null?wt:Object.assign(Object.assign({},(0,le.Z)(Qe)),{motionAppear:!1}),Ue=Object.assign(Object.assign({},it),{checkable:bt,selectable:Ke,showIcon:At,motion:We,blockNode:gt,showLine:!!Kt,dropIndicatorRender:Ee}),[qe,He]=(0,ue.ZP)(lt),De=ve.useMemo(()=>{if(!ut)return!1;let Ve={};switch(typeof ut){case"function":Ve.nodeDraggable=ut;break;case"object":Ve=Object.assign({},ut);break;default:break}return Ve.icon!==!1&&(Ve.icon=Ve.icon||ve.createElement(re.Z,null)),Ve},[ut]),Le=Ve=>ve.createElement(Pe.Z,{prefixCls:lt,switcherIcon:Ct,treeNodeProps:Ve,showLine:Kt});return qe(ve.createElement(rt.Z,Object.assign({itemHeight:20,ref:xt,virtual:mt},Ue,{style:Object.assign(Object.assign({},pt==null?void 0:pt.style),yt),prefixCls:lt,className:fe()({[`${lt}-icon-hide`]:!At,[`${lt}-block-node`]:gt,[`${lt}-unselectable`]:!Ke,[`${lt}-rtl`]:Mt==="rtl"},pt==null?void 0:pt.className,jt,He),direction:Mt,checkable:bt&&ve.createElement("span",{className:`${lt}-checkbox-inner`}),selectable:Ke,switcherIcon:Le,draggable:De}),tt))}),Ae;(function(it){it[it.None=0]="None",it[it.Start=1]="Start",it[it.End=2]="End"})(Ae||(Ae={}));function Oe(it,xt){function Et(Mt){const{key:mt,children:pt}=Mt;xt(mt,Mt)!==!1&&Oe(pt||[],xt)}it.forEach(Et)}function Fe(it){let{treeData:xt,expandedKeys:Et,startKey:Mt,endKey:mt}=it;const pt=[];let vt=Ae.None;if(Mt&&Mt===mt)return[Mt];if(!Mt||!mt)return[];function jt(At){return At===Mt||At===mt}return Oe(xt,At=>{if(vt===Ae.End)return!1;if(jt(At)){if(pt.push(At),vt===Ae.None)vt=Ae.Start;else if(vt===Ae.Start)return vt=Ae.End,!1}else vt===Ae.Start&&pt.push(At);return Et.includes(At)}),pt}function _e(it,xt){const Et=(0,St.Z)(xt),Mt=[];return Oe(it,(mt,pt)=>{const vt=Et.indexOf(mt);return vt!==-1&&(Mt.push(pt),Et.splice(vt,1)),!!Et.length}),Mt}var Ye=function(it,xt){var Et={};for(var Mt in it)Object.prototype.hasOwnProperty.call(it,Mt)&&xt.indexOf(Mt)<0&&(Et[Mt]=it[Mt]);if(it!=null&&typeof Object.getOwnPropertySymbols=="function")for(var mt=0,Mt=Object.getOwnPropertySymbols(it);mt<Mt.length;mt++)xt.indexOf(Mt[mt])<0&&Object.prototype.propertyIsEnumerable.call(it,Mt[mt])&&(Et[Mt[mt]]=it[Mt[mt]]);return Et};function ze(it){const{isLeaf:xt,expanded:Et}=it;return xt?ve.createElement(ie.Z,null):Et?ve.createElement(Re.Z,null):ve.createElement(me,null)}function Xe(it){let{treeData:xt,children:Et}=it;return xt||(0,ee.zn)(Et)}const st=(it,xt)=>{var{defaultExpandAll:Et,defaultExpandParent:Mt,defaultExpandedKeys:mt}=it,pt=Ye(it,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const vt=ve.useRef(),jt=ve.useRef(),At=()=>{const{keyEntities:De}=(0,ee.I8)(Xe(pt));let Le;return Et?Le=Object.keys(De):Mt?Le=(0,z.r7)(pt.expandedKeys||mt||[],De):Le=pt.expandedKeys||mt,Le},[Kt,Ct]=ve.useState(pt.selectedKeys||pt.defaultSelectedKeys||[]),[gt,tt]=ve.useState(()=>At());ve.useEffect(()=>{"selectedKeys"in pt&&Ct(pt.selectedKeys)},[pt.selectedKeys]),ve.useEffect(()=>{"expandedKeys"in pt&&tt(pt.expandedKeys)},[pt.expandedKeys]);const bt=(De,Le)=>{var Ve;return"expandedKeys"in pt||tt(De),(Ve=pt.onExpand)===null||Ve===void 0?void 0:Ve.call(pt,De,Le)},Ke=(De,Le)=>{var Ve;const{multiple:dt}=pt,{node:Ze,nativeEvent:Tt}=Le,{key:_t=""}=Ze,Qt=Xe(pt),kt=Object.assign(Object.assign({},Le),{selected:!0}),Nt=(Tt==null?void 0:Tt.ctrlKey)||(Tt==null?void 0:Tt.metaKey),Zt=Tt==null?void 0:Tt.shiftKey;let on;dt&&Nt?(on=De,vt.current=_t,jt.current=on,kt.selectedNodes=_e(Qt,on)):dt&&Zt?(on=Array.from(new Set([].concat((0,St.Z)(jt.current||[]),(0,St.Z)(Fe({treeData:Qt,expandedKeys:gt,startKey:_t,endKey:vt.current}))))),kt.selectedNodes=_e(Qt,on)):(on=[_t],vt.current=_t,jt.current=on,kt.selectedNodes=_e(Qt,on)),(Ve=pt.onSelect)===null||Ve===void 0||Ve.call(pt,on,kt),"selectedKeys"in pt||Ct(on)},{getPrefixCls:ut,direction:wt}=ve.useContext(ae.E_),{prefixCls:yt,className:lt,showIcon:Qe=!0,expandAction:We="click"}=pt,Ue=Ye(pt,["prefixCls","className","showIcon","expandAction"]),qe=ut("tree",yt),He=fe()(`${qe}-directory`,{[`${qe}-directory-rtl`]:wt==="rtl"},lt);return ve.createElement(ke,Object.assign({icon:ze,ref:xt,blockNode:!0},Ue,{showIcon:Qe,expandAction:We,prefixCls:qe,className:He,expandedKeys:gt,selectedKeys:Kt,onSelect:Ke,onExpand:bt}))};var ft=ve.forwardRef(st);const Lt=ke;Lt.DirectoryTree=ft,Lt.TreeNode=rt.O;var et=Lt},20648:function(bn,ln,$e){"use strict";$e.d(ln,{TM:function(){return xe},Yk:function(){return me}});var rt=$e(9792),St=$e(98447),ie=$e(17313),Re=$e(8378),je=$e(37613),ve=$e(83116);const ce=new rt.Keyframes("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),be=(fe,z)=>({[`.${fe}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${z.motionDurationSlow}`}}}),Ce=(fe,z)=>({[`.${fe}-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:'""'}}}),ye=(fe,z)=>{const{treeCls:ee,treeNodeCls:ae,treeNodePadding:re,titleHeight:le,nodeSelectedBg:ue,nodeHoverBg:pe}=z,Ee=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"},[`${ae}.dragging`]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:re,insetInlineStart:0,border:`1px solid ${z.colorPrimary}`,opacity:0,animationName:ce,animationDuration:z.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},[`${ae}`]:{display:"flex",alignItems:"flex-start",padding:`0 0 ${re}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(${ae}-disabled).filter-node ${ee}-title`]:{color:"inherit",fontWeight:500},"&-draggable":{[`${ee}-draggable-icon`]:{flexShrink:0,width:le,lineHeight:`${le}px`,textAlign:"center",visibility:"visible",opacity:.2,transition:`opacity ${z.motionDurationSlow}`,[`${ae}:hover &`]:{opacity:.45}},[`&${ae}-disabled`]:{[`${ee}-draggable-icon`]:{visibility:"hidden"}}}},[`${ee}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:le}},[`${ee}-draggable-icon`]:{visibility:"hidden"},[`${ee}-switcher`]:Object.assign(Object.assign({},be(fe,z)),{position:"relative",flex:"none",alignSelf:"stretch",width:le,margin:0,lineHeight:`${le}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:le/2,bottom:-re,marginInlineStart:-1,borderInlineEnd:`1px solid ${z.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:le/2*.8,height:le/2,borderBottom:`1px solid ${z.colorBorder}`,content:'""'}}}),[`${ee}-checkbox`]:{top:"initial",marginInlineEnd:Ee},[`${ee}-node-content-wrapper, ${ee}-checkbox + span`]:{position:"relative",zIndex:"auto",minHeight:le,margin:0,padding:`0 ${z.paddingXS/2}px`,color:"inherit",lineHeight:`${le}px`,background:"transparent",borderRadius:z.borderRadius,cursor:"pointer",transition:`all ${z.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,"&:hover":{backgroundColor:pe},[`&${ee}-node-selected`]:{backgroundColor:ue},[`${ee}-iconEle`]:{display:"inline-block",width:le,height:le,lineHeight:`${le}px`,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${ee}-unselectable ${ee}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${ee}-node-content-wrapper`]:Object.assign({lineHeight:`${le}px`,userSelect:"none"},Ce(fe,z)),[`${ae}.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:le/2,bottom:-re,borderInlineEnd:`1px solid ${z.colorBorder}`,content:'""'},"&-end":{"&:before":{display:"none"}}}},[`${ee}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${ae}-leaf-last`]:{[`${ee}-switcher`]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:`${le/2}px !important`}}}}})}},we=fe=>{const{treeCls:z,treeNodeCls:ee,treeNodePadding:ae,directoryNodeSelectedBg:re,directoryNodeSelectedColor:le}=fe;return{[`${z}${z}-directory`]:{[ee]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:ae,insetInlineStart:0,transition:`background-color ${fe.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:fe.controlItemBgHover}},"> *":{zIndex:1},[`${z}-switcher`]:{transition:`color ${fe.motionDurationMid}`},[`${z}-node-content-wrapper`]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},[`&${z}-node-selected`]:{color:le,background:"transparent"}},"&-selected":{"\n &:hover::before,\n &::before\n ":{background:re},[`${z}-switcher`]:{color:le},[`${z}-node-content-wrapper`]:{color:le,background:"transparent"}}}}}},me=(fe,z)=>{const ee=`.${fe}`,ae=`${ee}-treenode`,re=z.paddingXS/2,le=(0,je.TS)(z,{treeCls:ee,treeNodeCls:ae,treeNodePadding:re});return[ye(fe,le),we(le)]},xe=fe=>{const{controlHeightSM:z}=fe;return{titleHeight:z,nodeHoverBg:fe.controlItemBgHover,nodeSelectedBg:fe.controlItemBgActive}};ln.ZP=(0,ve.Z)("Tree",(fe,z)=>{let{prefixCls:ee}=z;return[{[fe.componentCls]:(0,St.C2)(`${ee}-checkbox`,fe)},me(ee,fe),(0,Re.Z)(fe)]},fe=>{const{colorTextLightSolid:z,colorPrimary:ee}=fe;return Object.assign(Object.assign({},xe(fe)),{directoryNodeSelectedColor:z,directoryNodeSelectedBg:ee})})},48610:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return ae}});var rt=$e(5891),St=$e(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"},Re=ie,je=$e(88853),ve=function(le,ue){return St.createElement(je.Z,(0,rt.Z)({},le,{ref:ue,icon:Re}))},ce=St.forwardRef(ve),be=ce,Ce=$e(43971),ye=$e(50023),we=$e(77042),me=$e(5527),xe=$e(92310),fe=$e.n(xe),z=$e(92343),ae=re=>{const{prefixCls:le,switcherIcon:ue,treeNodeProps:pe,showLine:Ee}=re,{isLeaf:Pe,expanded:Ie,loading:ke}=pe;if(ke)return St.createElement(ye.Z,{className:`${le}-switcher-loading-icon`});let Ae;if(Ee&&typeof Ee=="object"&&(Ae=Ee.showLeafIcon),Pe){if(!Ee)return null;if(typeof Ae!="boolean"&&Ae){const _e=typeof Ae=="function"?Ae(pe):Ae,Ye=`${le}-switcher-line-custom-icon`;return(0,z.l$)(_e)?(0,z.Tm)(_e,{className:fe()(_e.props.className||"",Ye)}):_e}return Ae?St.createElement(Ce.Z,{className:`${le}-switcher-line-icon`}):St.createElement("span",{className:`${le}-switcher-leaf-line`})}const Oe=`${le}-switcher-icon`,Fe=typeof ue=="function"?ue(pe):ue;return(0,z.l$)(Fe)?(0,z.Tm)(Fe,{className:fe()(Fe.props.className||"",Oe)}):Fe!==void 0?Fe:Ee?Ie?St.createElement(we.Z,{className:`${le}-switcher-line-icon`}):St.createElement(me.Z,{className:`${le}-switcher-line-icon`}):St.createElement(be,{className:Oe})}},24645:function(bn,ln,$e){"use strict";$e.d(ln,{default:function(){return Mn}});var rt=$e(59301),St=$e(26390),ie=$e(92310),Re=$e.n(ie),je=$e(5891),ve=$e(79545),ce=$e(68550),be=$e(17928),Ce=$e(7711),ye=$e(80962),we=$e(19149),me=$e(50204),xe=$e(80665),fe=$e(20959),z=$e(36994);function ee(an,gn){var En="cannot ".concat(an.method," ").concat(an.action," ").concat(gn.status,"'"),pn=new Error(En);return pn.status=gn.status,pn.method=an.method,pn.url=an.action,pn}function ae(an){var gn=an.responseText||an.response;if(!gn)return gn;try{return JSON.parse(gn)}catch(En){return gn}}function re(an){var gn=new XMLHttpRequest;an.onProgress&&gn.upload&&(gn.upload.onprogress=function(Dn){Dn.total>0&&(Dn.percent=Dn.loaded/Dn.total*100),an.onProgress(Dn)});var En=new FormData;an.data&&Object.keys(an.data).forEach(function(On){var Dn=an.data[On];if(Array.isArray(Dn)){Dn.forEach(function($n){En.append("".concat(On,"[]"),$n)});return}En.append(On,Dn)}),an.file instanceof Blob?En.append(an.filename,an.file,an.file.name):En.append(an.filename,an.file),gn.onerror=function(Dn){an.onError(Dn)},gn.onload=function(){return gn.status<200||gn.status>=300?an.onError(ee(an,gn),ae(gn)):an.onSuccess(ae(gn),gn)},gn.open(an.method,an.action,!0),an.withCredentials&&"withCredentials"in gn&&(gn.withCredentials=!0);var pn=an.headers||{};return pn["X-Requested-With"]!==null&&gn.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(pn).forEach(function(On){pn[On]!==null&&gn.setRequestHeader(On,pn[On])}),gn.send(En),{abort:function(){gn.abort()}}}var le=+new Date,ue=0;function pe(){return"rc-upload-".concat(le,"-").concat(++ue)}var Ee=$e(51395),Pe=function(an,gn){if(an&&gn){var En=Array.isArray(gn)?gn:gn.split(","),pn=an.name||"",On=an.type||"",Dn=On.replace(/\/.*$/,"");return En.some(function($n){var Fn=$n.trim();if(/^\*(\/\*)?$/.test($n))return!0;if(Fn.charAt(0)==="."){var Tn=pn.toLowerCase(),Yn=Fn.toLowerCase(),Lr=[Yn];return(Yn===".jpg"||Yn===".jpeg")&&(Lr=[".jpg",".jpeg"]),Lr.some(function(qr){return Tn.endsWith(qr)})}return/\/\*$/.test(Fn)?Dn===Fn.replace(/\/.*$/,""):On===Fn?!0:/^\w+$/.test(Fn)?((0,Ee.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(Fn,"'.Skip for check.")),!0):!1})}return!0};function Ie(an,gn){var En=an.createReader(),pn=[];function On(){En.readEntries(function(Dn){var $n=Array.prototype.slice.apply(Dn);pn=pn.concat($n);var Fn=!$n.length;Fn?gn(pn):On()})}On()}var ke=function(gn,En,pn){var On=function Dn($n,Fn){$n&&($n.path=Fn||"",$n.isFile?$n.file(function(Tn){pn(Tn)&&($n.fullPath&&!Tn.webkitRelativePath&&(Object.defineProperties(Tn,{webkitRelativePath:{writable:!0}}),Tn.webkitRelativePath=$n.fullPath.replace(/^\//,""),Object.defineProperties(Tn,{webkitRelativePath:{writable:!1}})),En([Tn]))}):$n.isDirectory&&Ie($n,function(Tn){Tn.forEach(function(Yn){Dn(Yn,"".concat(Fn).concat($n.name,"/"))})}))};gn.forEach(function(Dn){On(Dn.webkitGetAsEntry())})},Ae=ke,Oe=["component","prefixCls","className","disabled","id","style","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"],Fe=function(an){(0,be.Z)(En,an);var gn=(0,Ce.Z)(En);function En(){var pn;(0,ve.Z)(this,En);for(var On=arguments.length,Dn=new Array(On),$n=0;$n<On;$n++)Dn[$n]=arguments[$n];return pn=gn.call.apply(gn,[this].concat(Dn)),pn.state={uid:pe()},pn.reqs={},pn.fileInput=void 0,pn._isMounted=void 0,pn.onChange=function(Fn){var Tn=pn.props,Yn=Tn.accept,Lr=Tn.directory,qr=Fn.target.files,Br=(0,St.Z)(qr).filter(function(tn){return!Lr||Pe(tn,Yn)});pn.uploadFiles(Br),pn.reset()},pn.onClick=function(Fn){var Tn=pn.fileInput;if(Tn){var Yn=Fn.target,Lr=pn.props.onClick;if(Yn&&Yn.tagName==="BUTTON"){var qr=Tn.parentNode;qr.focus(),Yn.blur()}Tn.click(),Lr&&Lr(Fn)}},pn.onKeyDown=function(Fn){Fn.key==="Enter"&&pn.onClick(Fn)},pn.onFileDrop=function(Fn){var Tn=pn.props.multiple;if(Fn.preventDefault(),Fn.type!=="dragover")if(pn.props.directory)Ae(Array.prototype.slice.call(Fn.dataTransfer.items),pn.uploadFiles,function(Lr){return Pe(Lr,pn.props.accept)});else{var Yn=(0,St.Z)(Fn.dataTransfer.files).filter(function(Lr){return Pe(Lr,pn.props.accept)});Tn===!1&&(Yn=Yn.slice(0,1)),pn.uploadFiles(Yn)}},pn.uploadFiles=function(Fn){var Tn=(0,St.Z)(Fn),Yn=Tn.map(function(Lr){return Lr.uid=pe(),pn.processFile(Lr,Tn)});Promise.all(Yn).then(function(Lr){var qr=pn.props.onBatchStart;qr==null||qr(Lr.map(function(Br){var tn=Br.origin,lr=Br.parsedFile;return{file:tn,parsedFile:lr}})),Lr.filter(function(Br){return Br.parsedFile!==null}).forEach(function(Br){pn.post(Br)})})},pn.processFile=function(){var Fn=(0,fe.Z)((0,me.Z)().mark(function Tn(Yn,Lr){var qr,Br,tn,lr,br,ar,Qr,Xr,hi;return(0,me.Z)().wrap(function(Tr){for(;;)switch(Tr.prev=Tr.next){case 0:if(qr=pn.props.beforeUpload,Br=Yn,!qr){Tr.next=14;break}return Tr.prev=3,Tr.next=6,qr(Yn,Lr);case 6:Br=Tr.sent,Tr.next=12;break;case 9:Tr.prev=9,Tr.t0=Tr.catch(3),Br=!1;case 12:if(Br!==!1){Tr.next=14;break}return Tr.abrupt("return",{origin:Yn,parsedFile:null,action:null,data:null});case 14:if(tn=pn.props.action,typeof tn!="function"){Tr.next=21;break}return Tr.next=18,tn(Yn);case 18:lr=Tr.sent,Tr.next=22;break;case 21:lr=tn;case 22:if(br=pn.props.data,typeof br!="function"){Tr.next=29;break}return Tr.next=26,br(Yn);case 26:ar=Tr.sent,Tr.next=30;break;case 29:ar=br;case 30:return Qr=((0,xe.Z)(Br)==="object"||typeof Br=="string")&&Br?Br:Yn,Qr instanceof File?Xr=Qr:Xr=new File([Qr],Yn.name,{type:Yn.type}),hi=Xr,hi.uid=Yn.uid,Tr.abrupt("return",{origin:Yn,data:ar,parsedFile:hi,action:lr});case 35:case"end":return Tr.stop()}},Tn,null,[[3,9]])}));return function(Tn,Yn){return Fn.apply(this,arguments)}}(),pn.saveFileInput=function(Fn){pn.fileInput=Fn},pn}return(0,ce.Z)(En,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(On){var Dn=this,$n=On.data,Fn=On.origin,Tn=On.action,Yn=On.parsedFile;if(this._isMounted){var Lr=this.props,qr=Lr.onStart,Br=Lr.customRequest,tn=Lr.name,lr=Lr.headers,br=Lr.withCredentials,ar=Lr.method,Qr=Fn.uid,Xr=Br||re,hi={action:Tn,filename:tn,data:$n,file:Yn,headers:lr,withCredentials:br,method:ar||"post",onProgress:function(Tr){var Si=Dn.props.onProgress;Si==null||Si(Tr,Yn)},onSuccess:function(Tr,Si){var Ln=Dn.props.onSuccess;Ln==null||Ln(Tr,Yn,Si),delete Dn.reqs[Qr]},onError:function(Tr,Si){var Ln=Dn.props.onError;Ln==null||Ln(Tr,Si,Yn),delete Dn.reqs[Qr]}};qr(Fn),this.reqs[Qr]=Xr(hi)}}},{key:"reset",value:function(){this.setState({uid:pe()})}},{key:"abort",value:function(On){var Dn=this.reqs;if(On){var $n=On.uid?On.uid:On;Dn[$n]&&Dn[$n].abort&&Dn[$n].abort(),delete Dn[$n]}else Object.keys(Dn).forEach(function(Fn){Dn[Fn]&&Dn[Fn].abort&&Dn[Fn].abort(),delete Dn[Fn]})}},{key:"render",value:function(){var On=this.props,Dn=On.component,$n=On.prefixCls,Fn=On.className,Tn=On.disabled,Yn=On.id,Lr=On.style,qr=On.multiple,Br=On.accept,tn=On.capture,lr=On.children,br=On.directory,ar=On.openFileDialogOnClick,Qr=On.onMouseEnter,Xr=On.onMouseLeave,hi=(0,we.Z)(On,Oe),Gr=Re()((0,ye.Z)((0,ye.Z)((0,ye.Z)({},$n,!0),"".concat($n,"-disabled"),Tn),Fn,Fn)),Tr=br?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},Si=Tn?{}:{onClick:ar?this.onClick:function(){},onKeyDown:ar?this.onKeyDown:function(){},onMouseEnter:Qr,onMouseLeave:Xr,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return rt.createElement(Dn,(0,je.Z)({},Si,{className:Gr,role:"button",style:Lr}),rt.createElement("input",(0,je.Z)({},(0,z.Z)(hi,{aria:!0,data:!0}),{id:Yn,disabled:Tn,type:"file",ref:this.saveFileInput,onClick:function(Ki){return Ki.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:Br},Tr,{multiple:qr,onChange:this.onChange},tn!=null?{capture:tn}:{})),lr)}}]),En}(rt.Component),_e=Fe;function Ye(){}var ze=function(an){(0,be.Z)(En,an);var gn=(0,Ce.Z)(En);function En(){var pn;(0,ve.Z)(this,En);for(var On=arguments.length,Dn=new Array(On),$n=0;$n<On;$n++)Dn[$n]=arguments[$n];return pn=gn.call.apply(gn,[this].concat(Dn)),pn.uploader=void 0,pn.saveUploader=function(Fn){pn.uploader=Fn},pn}return(0,ce.Z)(En,[{key:"abort",value:function(On){this.uploader.abort(On)}},{key:"render",value:function(){return rt.createElement(_e,(0,je.Z)({},this.props,{ref:this.saveUploader}))}}]),En}(rt.Component);ze.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Ye,onError:Ye,onSuccess:Ye,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var Xe=ze,st=Xe,ht=$e(35788),ft=$e(4676),Lt=$e(36355),et=$e(1684),it=$e(9763),xt=$e(31724),Et={icon:function(gn,En){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:En}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:gn}}]}},name:"file",theme:"twotone"},Mt=Et,mt=$e(88853),pt=function(gn,En){return rt.createElement(mt.Z,(0,je.Z)({},gn,{ref:En,icon:Mt}))},vt=rt.forwardRef(pt),jt=vt,At=$e(50023),Kt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},Ct=Kt,gt=function(gn,En){return rt.createElement(mt.Z,(0,je.Z)({},gn,{ref:En,icon:Ct}))},tt=rt.forwardRef(gt),bt=tt,Ke={icon:function(gn,En){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:gn}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:En}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:En}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:En}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:gn}}]}},name:"picture",theme:"twotone"},ut=Ke,wt=function(gn,En){return rt.createElement(mt.Z,(0,je.Z)({},gn,{ref:En,icon:ut}))},yt=rt.forwardRef(wt),lt=yt,Qe=$e(43469),We=$e(56762),Ue=$e(62892),qe=$e(92343),He=$e(3113);function De(an){return Object.assign(Object.assign({},an),{lastModified:an.lastModified,lastModifiedDate:an.lastModifiedDate,name:an.name,size:an.size,type:an.type,uid:an.uid,percent:0,originFileObj:an})}function Le(an,gn){const En=(0,St.Z)(gn),pn=En.findIndex(On=>{let{uid:Dn}=On;return Dn===an.uid});return pn===-1?En.push(an):En[pn]=an,En}function Ve(an,gn){const En=an.uid!==void 0?"uid":"name";return gn.filter(pn=>pn[En]===an[En])[0]}function dt(an,gn){const En=an.uid!==void 0?"uid":"name",pn=gn.filter(On=>On[En]!==an[En]);return pn.length===gn.length?null:pn}const Ze=function(){const gn=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),pn=gn[gn.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(pn)||[""])[0]},Tt=an=>an.indexOf("image/")===0,_t=an=>{if(an.type&&!an.thumbUrl)return Tt(an.type);const gn=an.thumbUrl||an.url||"",En=Ze(gn);return/^data:image\//.test(gn)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(En)?!0:!(/^data:/.test(gn)||En)},Qt=200;function kt(an){return new Promise(gn=>{if(!an.type||!Tt(an.type)){gn("");return}const En=document.createElement("canvas");En.width=Qt,En.height=Qt,En.style.cssText=`position: fixed; left: 0; top: 0; width: ${Qt}px; height: ${Qt}px; z-index: 9999; display: none;`,document.body.appendChild(En);const pn=En.getContext("2d"),On=new Image;if(On.onload=()=>{const{width:Dn,height:$n}=On;let Fn=Qt,Tn=Qt,Yn=0,Lr=0;Dn>$n?(Tn=$n*(Qt/Dn),Lr=-(Tn-Fn)/2):(Fn=Dn*(Qt/$n),Yn=-(Fn-Tn)/2),pn.drawImage(On,Yn,Lr,Fn,Tn);const qr=En.toDataURL();document.body.removeChild(En),window.URL.revokeObjectURL(On.src),gn(qr)},On.crossOrigin="anonymous",an.type.startsWith("image/svg+xml")){const Dn=new FileReader;Dn.onload=()=>{Dn.result&&(On.src=Dn.result)},Dn.readAsDataURL(an)}else if(an.type.startsWith("image/gif")){const Dn=new FileReader;Dn.onload=()=>{Dn.result&&gn(Dn.result)},Dn.readAsDataURL(an)}else On.src=window.URL.createObjectURL(an)})}var Nt=$e(72295),Zt=$e(24566),on=$e(30631),vn=$e(93948),kn=$e(6848),Xn=rt.forwardRef((an,gn)=>{let{prefixCls:En,className:pn,style:On,locale:Dn,listType:$n,file:Fn,items:Tn,progress:Yn,iconRender:Lr,actionIconRender:qr,itemRender:Br,isImgUrl:tn,showPreviewIcon:lr,showRemoveIcon:br,showDownloadIcon:ar,previewIcon:Qr,removeIcon:Xr,downloadIcon:hi,onPreview:Gr,onDownload:Tr,onClose:Si}=an;var Ln,Ki;const{status:Nn}=Fn,[gi,xo]=rt.useState(Nn);rt.useEffect(()=>{Nn!=="removed"&&xo(Nn)},[Nn]);const[Mi,Go]=rt.useState(!1);rt.useEffect(()=>{const Ar=setTimeout(()=>{Go(!0)},300);return()=>{clearTimeout(Ar)}},[]);const po=Lr(Fn);let Wr=rt.createElement("div",{className:`${En}-icon`},po);if($n==="picture"||$n==="picture-card"||$n==="picture-circle")if(gi==="uploading"||!Fn.thumbUrl&&!Fn.url){const Ar=Re()(`${En}-list-item-thumbnail`,{[`${En}-list-item-file`]:gi!=="uploading"});Wr=rt.createElement("div",{className:Ar},po)}else{const Ar=tn!=null&&tn(Fn)?rt.createElement("img",{src:Fn.thumbUrl||Fn.url,alt:Fn.name,className:`${En}-list-item-image`,crossOrigin:Fn.crossOrigin}):po,Dr=Re()(`${En}-list-item-thumbnail`,{[`${En}-list-item-file`]:tn&&!tn(Fn)});Wr=rt.createElement("a",{className:Dr,onClick:zr=>Gr(Fn,zr),href:Fn.url||Fn.thumbUrl,target:"_blank",rel:"noopener noreferrer"},Ar)}const Hr=Re()(`${En}-list-item`,`${En}-list-item-${gi}`),Li=typeof Fn.linkProps=="string"?JSON.parse(Fn.linkProps):Fn.linkProps,_i=br?qr((typeof Xr=="function"?Xr(Fn):Xr)||rt.createElement(Nt.Z,null),()=>Si(Fn),En,Dn.removeFile):null,ur=ar&&gi==="done"?qr((typeof hi=="function"?hi(Fn):hi)||rt.createElement(Zt.Z,null),()=>Tr(Fn),En,Dn.downloadFile):null,It=$n!=="picture-card"&&$n!=="picture-circle"&&rt.createElement("span",{key:"download-delete",className:Re()(`${En}-list-item-actions`,{picture:$n==="picture"})},ur,_i),Ei=Re()(`${En}-list-item-name`),Kr=Fn.url?[rt.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:Ei,title:Fn.name},Li,{href:Fn.url,onClick:Ar=>Gr(Fn,Ar)}),Fn.name),It]:[rt.createElement("span",{key:"view",className:Ei,onClick:Ar=>Gr(Fn,Ar),title:Fn.name},Fn.name),It],Nr={pointerEvents:"none",opacity:.5},Wi=lr?rt.createElement("a",{href:Fn.url||Fn.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:Fn.url||Fn.thumbUrl?void 0:Nr,onClick:Ar=>Gr(Fn,Ar),title:Dn.previewFile},typeof Qr=="function"?Qr(Fn):Qr||rt.createElement(on.Z,null)):null,Ur=($n==="picture-card"||$n==="picture-circle")&&gi!=="uploading"&&rt.createElement("span",{className:`${En}-list-item-actions`},Wi,gi==="done"&&ur,_i),{getPrefixCls:jr}=rt.useContext(Lt.E_),wi=jr(),Vi=rt.createElement("div",{className:Hr},Wr,Kr,Ur,Mi&&rt.createElement(Qe.default,{motionName:`${wi}-fade`,visible:gi==="uploading",motionDeadline:2e3},Ar=>{let{className:Dr}=Ar;const zr="percent"in Fn?rt.createElement(vn.Z,Object.assign({},Yn,{type:"line",percent:Fn.percent,"aria-label":Fn["aria-label"],"aria-labelledby":Fn["aria-labelledby"]})):null;return rt.createElement("div",{className:Re()(`${En}-list-item-progress`,Dr)},zr)})),bi=Fn.response&&typeof Fn.response=="string"?Fn.response:((Ln=Fn.error)===null||Ln===void 0?void 0:Ln.statusText)||((Ki=Fn.error)===null||Ki===void 0?void 0:Ki.message)||Dn.uploadError,vo=gi==="error"?rt.createElement(kn.Z,{title:bi,getPopupContainer:Ar=>Ar.parentNode},Vi):Vi;return rt.createElement("div",{className:Re()(`${En}-list-item-container`,pn),style:On,ref:gn},Br?Br(vo,Fn,Tn,{download:Tr.bind(null,Fn),preview:Gr.bind(null,Fn),remove:Si.bind(null,Fn)}):vo)});const pr=(an,gn)=>{const{listType:En="text",previewFile:pn=kt,onPreview:On,onDownload:Dn,onRemove:$n,locale:Fn,iconRender:Tn,isImageUrl:Yn=_t,prefixCls:Lr,items:qr=[],showPreviewIcon:Br=!0,showRemoveIcon:tn=!0,showDownloadIcon:lr=!1,removeIcon:br,previewIcon:ar,downloadIcon:Qr,progress:Xr={size:[-1,2],showInfo:!1},appendAction:hi,appendActionVisible:Gr=!0,itemRender:Tr,disabled:Si}=an,Ln=(0,We.Z)(),[Ki,Nn]=rt.useState(!1);rt.useEffect(()=>{En!=="picture"&&En!=="picture-card"&&En!=="picture-circle"||(qr||[]).forEach(Nr=>{typeof document=="undefined"||typeof window=="undefined"||!window.FileReader||!window.File||!(Nr.originFileObj instanceof File||Nr.originFileObj instanceof Blob)||Nr.thumbUrl!==void 0||(Nr.thumbUrl="",pn&&pn(Nr.originFileObj).then(Wi=>{Nr.thumbUrl=Wi||"",Ln()}))})},[En,qr,pn]),rt.useEffect(()=>{Nn(!0)},[]);const gi=(Nr,Wi)=>{if(On)return Wi==null||Wi.preventDefault(),On(Nr)},xo=Nr=>{typeof Dn=="function"?Dn(Nr):Nr.url&&window.open(Nr.url)},Mi=Nr=>{$n==null||$n(Nr)},Go=Nr=>{if(Tn)return Tn(Nr,En);const Wi=Nr.status==="uploading",Ur=Yn&&Yn(Nr)?rt.createElement(lt,null):rt.createElement(jt,null);let jr=Wi?rt.createElement(At.Z,null):rt.createElement(bt,null);return En==="picture"?jr=Wi?rt.createElement(At.Z,null):Ur:(En==="picture-card"||En==="picture-circle")&&(jr=Wi?Fn.uploading:Ur),jr},po=(Nr,Wi,Ur,jr)=>{const wi={type:"text",size:"small",title:jr,onClick:Vi=>{Wi(),(0,qe.l$)(Nr)&&Nr.props.onClick&&Nr.props.onClick(Vi)},className:`${Ur}-list-item-action`,disabled:Si};if((0,qe.l$)(Nr)){const Vi=(0,qe.Tm)(Nr,Object.assign(Object.assign({},Nr.props),{onClick:()=>{}}));return rt.createElement(He.ZP,Object.assign({},wi,{icon:Vi}))}return rt.createElement(He.ZP,Object.assign({},wi),rt.createElement("span",null,Nr))};rt.useImperativeHandle(gn,()=>({handlePreview:gi,handleDownload:xo}));const{getPrefixCls:Wr}=rt.useContext(Lt.E_),Hr=Wr("upload",Lr),Li=Wr(),_i=Re()(`${Hr}-list`,`${Hr}-list-${En}`),ur=(0,St.Z)(qr.map(Nr=>({key:Nr.uid,file:Nr})));let Ei={motionDeadline:2e3,motionName:`${Hr}-${En==="picture-card"||En==="picture-circle"?"animate-inline":"animate"}`,keys:ur,motionAppear:Ki};const Kr=rt.useMemo(()=>{const Nr=Object.assign({},(0,Ue.Z)(Li));return delete Nr.onAppearEnd,delete Nr.onEnterEnd,delete Nr.onLeaveEnd,Nr},[Li]);return En!=="picture-card"&&En!=="picture-circle"&&(Ei=Object.assign(Object.assign({},Kr),Ei)),rt.createElement("div",{className:_i},rt.createElement(Qe.CSSMotionList,Object.assign({},Ei,{component:!1}),Nr=>{let{key:Wi,file:Ur,className:jr,style:wi}=Nr;return rt.createElement(Xn,{key:Wi,locale:Fn,prefixCls:Hr,className:jr,style:wi,file:Ur,items:qr,progress:Xr,listType:En,isImgUrl:Yn,showPreviewIcon:Br,showRemoveIcon:tn,showDownloadIcon:lr,removeIcon:br,previewIcon:ar,downloadIcon:Qr,iconRender:Go,actionIconRender:po,itemRender:Tr,onPreview:gi,onDownload:xo,onClose:Mi})}),hi&&rt.createElement(Qe.default,Object.assign({},Ei,{visible:Gr,forceRender:!0}),Nr=>{let{className:Wi,style:Ur}=Nr;return(0,qe.Tm)(hi,jr=>({className:Re()(jr.className,Wi),style:Object.assign(Object.assign(Object.assign({},Ur),{pointerEvents:Wi?"none":void 0}),jr.style)}))}))};var vr=rt.forwardRef(pr),Sr=$e(17313),Fr=$e(8378),li=$e(83116),Er=$e(37613),Cr=an=>{const{componentCls:gn,iconCls:En}=an;return{[`${gn}-wrapper`]:{[`${gn}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:an.colorFillAlter,border:`${an.lineWidth}px dashed ${an.colorBorder}`,borderRadius:an.borderRadiusLG,cursor:"pointer",transition:`border-color ${an.motionDurationSlow}`,[gn]:{padding:`${an.padding}px 0`},[`${gn}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none"},[`${gn}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`&:not(${gn}-disabled):hover`]:{borderColor:an.colorPrimaryHover},[`p${gn}-drag-icon`]:{marginBottom:an.margin,[En]:{color:an.colorPrimary,fontSize:an.uploadThumbnailSize}},[`p${gn}-text`]:{margin:`0 0 ${an.marginXXS}px`,color:an.colorTextHeading,fontSize:an.fontSizeLG},[`p${gn}-hint`]:{color:an.colorTextDescription,fontSize:an.fontSize},[`&${gn}-disabled`]:{cursor:"not-allowed",[`p${gn}-drag-icon ${En},
p${gn}-text,
p${gn}-hint
`]:{color:an.colorTextDisabled}}}}}},di=an=>{const{componentCls:gn,antCls:En,iconCls:pn,fontSize:On,lineHeight:Dn}=an,$n=`${gn}-list-item`,Fn=`${$n}-actions`,Tn=`${$n}-action`,Yn=Math.round(On*Dn);return{[`${gn}-wrapper`]:{[`${gn}-list`]:Object.assign(Object.assign({},(0,Sr.dF)()),{lineHeight:an.lineHeight,[$n]:{position:"relative",height:an.lineHeight*On,marginTop:an.marginXS,fontSize:On,display:"flex",alignItems:"center",transition:`background-color ${an.motionDurationSlow}`,"&:hover":{backgroundColor:an.controlItemBgHover},[`${$n}-name`]:Object.assign(Object.assign({},Sr.vS),{padding:`0 ${an.paddingXS}px`,lineHeight:Dn,flex:"auto",transition:`all ${an.motionDurationSlow}`}),[Fn]:{[Tn]:{opacity:0},[`${Tn}${En}-btn-sm`]:{height:Yn,border:0,lineHeight:1,"> span":{transform:"scale(1)"}},[`
${Tn}:focus-visible,
&.picture ${Tn}
`]:{opacity:1},[pn]:{color:an.actionsColor,transition:`all ${an.motionDurationSlow}`},[`&:hover ${pn}`]:{color:an.colorText}},[`${gn}-icon ${pn}`]:{color:an.colorTextDescription,fontSize:On},[`${$n}-progress`]:{position:"absolute",bottom:-an.uploadProgressOffset,width:"100%",paddingInlineStart:On+an.paddingXS,fontSize:On,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${$n}:hover ${Tn}`]:{opacity:1,color:an.colorText},[`${$n}-error`]:{color:an.colorError,[`${$n}-name, ${gn}-icon ${pn}`]:{color:an.colorError},[Fn]:{[`${pn}, ${pn}:hover`]:{color:an.colorError},[Tn]:{opacity:1}}},[`${gn}-list-item-container`]:{transition:`opacity ${an.motionDurationSlow}, height ${an.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},Yr=$e(9792),Ri=$e(1950);const hr=new Yr.Keyframes("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),Ir=new Yr.Keyframes("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}});var yi=an=>{const{componentCls:gn}=an,En=`${gn}-animate-inline`;return[{[`${gn}-wrapper`]:{[`${En}-appear, ${En}-enter, ${En}-leave`]:{animationDuration:an.motionDurationSlow,animationTimingFunction:an.motionEaseInOutCirc,animationFillMode:"forwards"},[`${En}-appear, ${En}-enter`]:{animationName:hr},[`${En}-leave`]:{animationName:Ir}}},{[`${gn}-wrapper`]:(0,Ri.J$)(an)},hr,Ir]},dn=$e(93398),mn=$e(64993);const un=an=>{const{componentCls:gn,iconCls:En,uploadThumbnailSize:pn,uploadProgressOffset:On}=an,Dn=`${gn}-list`,$n=`${Dn}-item`;return{[`${gn}-wrapper`]:{[`
${Dn}${Dn}-picture,
${Dn}${Dn}-picture-card,
${Dn}${Dn}-picture-circle
`]:{[$n]:{position:"relative",height:pn+an.lineWidth*2+an.paddingXS*2,padding:an.paddingXS,border:`${an.lineWidth}px ${an.lineType} ${an.colorBorder}`,borderRadius:an.borderRadiusLG,"&:hover":{background:"transparent"},[`${$n}-thumbnail`]:Object.assign(Object.assign({},Sr.vS),{width:pn,height:pn,lineHeight:`${pn+an.paddingSM}px`,textAlign:"center",flex:"none",[En]:{fontSize:an.fontSizeHeading2,color:an.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${$n}-progress`]:{bottom:On,width:`calc(100% - ${an.paddingSM*2}px)`,marginTop:0,paddingInlineStart:pn+an.paddingXS}},[`${$n}-error`]:{borderColor:an.colorError,[`${$n}-thumbnail ${En}`]:{[`svg path[fill='${dn.blue[0]}']`]:{fill:an.colorErrorBg},[`svg path[fill='${dn.blue.primary}']`]:{fill:an.colorError}}},[`${$n}-uploading`]:{borderStyle:"dashed",[`${$n}-name`]:{marginBottom:On}}},[`${Dn}${Dn}-picture-circle ${$n}`]:{[`&, &::before, ${$n}-thumbnail`]:{borderRadius:"50%"}}}}},Ut=an=>{const{componentCls:gn,iconCls:En,fontSizeLG:pn,colorTextLightSolid:On}=an,Dn=`${gn}-list`,$n=`${Dn}-item`,Fn=an.uploadPicCardSize;return{[`
${gn}-wrapper${gn}-picture-card-wrapper,
${gn}-wrapper${gn}-picture-circle-wrapper
`]:Object.assign(Object.assign({},(0,Sr.dF)()),{display:"inline-block",width:"100%",[`${gn}${gn}-select`]:{width:Fn,height:Fn,marginInlineEnd:an.marginXS,marginBottom:an.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:an.colorFillAlter,border:`${an.lineWidth}px dashed ${an.colorBorder}`,borderRadius:an.borderRadiusLG,cursor:"pointer",transition:`border-color ${an.motionDurationSlow}`,[`> ${gn}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${gn}-disabled):hover`]:{borderColor:an.colorPrimary}},[`${Dn}${Dn}-picture-card, ${Dn}${Dn}-picture-circle`]:{[`${Dn}-item-container`]:{display:"inline-block",width:Fn,height:Fn,marginBlock:`0 ${an.marginXS}px`,marginInline:`0 ${an.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[$n]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${an.paddingXS*2}px)`,height:`calc(100% - ${an.paddingXS*2}px)`,backgroundColor:an.colorBgMask,opacity:0,transition:`all ${an.motionDurationSlow}`,content:'" "'}},[`${$n}:hover`]:{[`&::before, ${$n}-actions`]:{opacity:1}},[`${$n}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${an.motionDurationSlow}`,[`${En}-eye, ${En}-download, ${En}-delete`]:{zIndex:10,width:pn,margin:`0 ${an.marginXXS}px`,fontSize:pn,cursor:"pointer",transition:`all ${an.motionDurationSlow}`,svg:{verticalAlign:"baseline"}}},[`${$n}-actions, ${$n}-actions:hover`]:{[`${En}-eye, ${En}-download, ${En}-delete`]:{color:new mn.C(On).setAlpha(.65).toRgbString(),"&:hover":{color:On}}},[`${$n}-thumbnail, ${$n}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${$n}-name`]:{display:"none",textAlign:"center"},[`${$n}-file + ${$n}-name`]:{position:"absolute",bottom:an.margin,display:"block",width:`calc(100% - ${an.paddingXS*2}px)`},[`${$n}-uploading`]:{[`&${$n}`]:{backgroundColor:an.colorFillAlter},[`&::before, ${En}-eye, ${En}-download, ${En}-delete`]:{display:"none"}},[`${$n}-progress`]:{bottom:an.marginXL,width:`calc(100% - ${an.paddingXS*2}px)`,paddingInlineStart:0}}}),[`${gn}-wrapper${gn}-picture-circle-wrapper`]:{[`${gn}${gn}-select`]:{borderRadius:"50%"}}}};var jn=an=>{const{componentCls:gn}=an;return{[`${gn}-rtl`]:{direction:"rtl"}}};const en=an=>{const{componentCls:gn,colorTextDisabled:En}=an;return{[`${gn}-wrapper`]:Object.assign(Object.assign({},(0,Sr.Wf)(an)),{[gn]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${gn}-select`]:{display:"inline-block"},[`${gn}-disabled`]:{color:En,cursor:"not-allowed"}})}};var Gt=(0,li.Z)("Upload",an=>{const{fontSizeHeading3:gn,fontSize:En,lineHeight:pn,lineWidth:On,controlHeightLG:Dn}=an,$n=Math.round(En*pn),Fn=(0,Er.TS)(an,{uploadThumbnailSize:gn*2,uploadProgressOffset:$n/2+On,uploadPicCardSize:Dn*2.55});return[en(Fn),Cr(Fn),un(Fn),Ut(Fn),di(Fn),yi(Fn),jn(Fn),(0,Fr.Z)(Fn)]},an=>({actionsColor:an.colorTextDescription})),Cn=function(an,gn,En,pn){function On(Dn){return Dn instanceof En?Dn:new En(function($n){$n(Dn)})}return new(En||(En=Promise))(function(Dn,$n){function Fn(Lr){try{Yn(pn.next(Lr))}catch(qr){$n(qr)}}function Tn(Lr){try{Yn(pn.throw(Lr))}catch(qr){$n(qr)}}function Yn(Lr){Lr.done?Dn(Lr.value):On(Lr.value).then(Fn,Tn)}Yn((pn=pn.apply(an,gn||[])).next())})};const Gn=`__LIST_IGNORE_${Date.now()}__`,ir=(an,gn)=>{const{fileList:En,defaultFileList:pn,onRemove:On,showUploadList:Dn=!0,listType:$n="text",onPreview:Fn,onDownload:Tn,onChange:Yn,onDrop:Lr,previewFile:qr,disabled:Br,locale:tn,iconRender:lr,isImageUrl:br,progress:ar,prefixCls:Qr,className:Xr,type:hi="select",children:Gr,style:Tr,itemRender:Si,maxCount:Ln,data:Ki={},multiple:Nn=!1,action:gi="",accept:xo="",supportServerRender:Mi=!0,rootClassName:Go}=an,po=rt.useContext(et.Z),Wr=Br!=null?Br:po,[Hr,Li]=(0,ht.Z)(pn||[],{value:En,postState:Ji=>Ji!=null?Ji:[]}),[_i,ur]=rt.useState("drop"),It=rt.useRef(null);rt.useMemo(()=>{const Ji=Date.now();(En||[]).forEach((jo,ga)=>{!jo.uid&&!Object.isFrozen(jo)&&(jo.uid=`__AUTO__${Ji}_${ga}__`)})},[En]);const Ei=(Ji,jo,ga)=>{let Oo=(0,St.Z)(jo),no=!1;Ln===1?Oo=Oo.slice(-1):Ln&&(no=Oo.length>Ln,Oo=Oo.slice(0,Ln)),(0,ft.flushSync)(()=>{Li(Oo)});const Mo={file:Ji,fileList:Oo};ga&&(Mo.event=ga),(!no||Oo.some(Wa=>Wa.uid===Ji.uid))&&(0,ft.flushSync)(()=>{Yn==null||Yn(Mo)})},Kr=(Ji,jo)=>Cn(void 0,void 0,void 0,function*(){const{beforeUpload:ga,transformFile:Oo}=an;let no=Ji;if(ga){const Mo=yield ga(Ji,jo);if(Mo===!1)return!1;if(delete Ji[Gn],Mo===Gn)return Object.defineProperty(Ji,Gn,{value:!0,configurable:!0}),!1;typeof Mo=="object"&&Mo&&(no=Mo)}return Oo&&(no=yield Oo(no)),no}),Nr=Ji=>{const jo=Ji.filter(no=>!no.file[Gn]);if(!jo.length)return;const ga=jo.map(no=>De(no.file));let Oo=(0,St.Z)(Hr);ga.forEach(no=>{Oo=Le(no,Oo)}),ga.forEach((no,Mo)=>{let Wa=no;if(jo[Mo].parsedFile)no.status="uploading";else{const{originFileObj:ki}=no;let ao;try{ao=new File([ki],ki.name,{type:ki.type})}catch(io){ao=new Blob([ki],{type:ki.type}),ao.name=ki.name,ao.lastModifiedDate=new Date,ao.lastModified=new Date().getTime()}ao.uid=no.uid,Wa=ao}Ei(Wa,Oo)})},Wi=(Ji,jo,ga)=>{try{typeof Ji=="string"&&(Ji=JSON.parse(Ji))}catch(Mo){}if(!Ve(jo,Hr))return;const Oo=De(jo);Oo.status="done",Oo.percent=100,Oo.response=Ji,Oo.xhr=ga;const no=Le(Oo,Hr);Ei(Oo,no)},Ur=(Ji,jo)=>{if(!Ve(jo,Hr))return;const ga=De(jo);ga.status="uploading",ga.percent=Ji.percent;const Oo=Le(ga,Hr);Ei(ga,Oo,Ji)},jr=(Ji,jo,ga)=>{if(!Ve(ga,Hr))return;const Oo=De(ga);Oo.error=Ji,Oo.response=jo,Oo.status="error";const no=Le(Oo,Hr);Ei(Oo,no)},wi=Ji=>{let jo;Promise.resolve(typeof On=="function"?On(Ji):On).then(ga=>{var Oo;if(ga===!1)return;const no=dt(Ji,Hr);no&&(jo=Object.assign(Object.assign({},Ji),{status:"removed"}),Hr==null||Hr.forEach(Mo=>{const Wa=jo.uid!==void 0?"uid":"name";Mo[Wa]===jo[Wa]&&!Object.isFrozen(Mo)&&(Mo.status="removed")}),(Oo=It.current)===null||Oo===void 0||Oo.abort(jo),Ei(jo,no))})},Vi=Ji=>{ur(Ji.type),Ji.type==="drop"&&(Lr==null||Lr(Ji))};rt.useImperativeHandle(gn,()=>({onBatchStart:Nr,onSuccess:Wi,onProgress:Ur,onError:jr,fileList:Hr,upload:It.current}));const{getPrefixCls:bi,direction:vo,upload:Ar}=rt.useContext(Lt.E_),Dr=bi("upload",Qr),zr=Object.assign(Object.assign({onBatchStart:Nr,onError:jr,onProgress:Ur,onSuccess:Wi},an),{data:Ki,multiple:Nn,action:gi,accept:xo,supportServerRender:Mi,prefixCls:Dr,disabled:Wr,beforeUpload:Kr,onChange:void 0});delete zr.className,delete zr.style,(!Gr||Wr)&&delete zr.id;const[Zn,to]=Gt(Dr),[yo]=(0,it.Z)("Upload",xt.Z.Upload),{showRemoveIcon:ta,showPreviewIcon:wo,showDownloadIcon:Zo,removeIcon:ua,previewIcon:Pa,downloadIcon:Da}=typeof Dn=="boolean"?{}:Dn,Ss=(Ji,jo)=>Dn?rt.createElement(vr,{prefixCls:Dr,listType:$n,items:Hr,previewFile:qr,onPreview:Fn,onDownload:Tn,onRemove:wi,showRemoveIcon:!Wr&&ta,showPreviewIcon:wo,showDownloadIcon:Zo,removeIcon:ua,previewIcon:Pa,downloadIcon:Da,iconRender:lr,locale:Object.assign(Object.assign({},yo),tn),isImageUrl:br,progress:ar,appendAction:Ji,appendActionVisible:jo,itemRender:Si,disabled:Wr}):Ji,es=Re()(`${Dr}-wrapper`,Xr,Go,to,Ar==null?void 0:Ar.className,{[`${Dr}-rtl`]:vo==="rtl",[`${Dr}-picture-card-wrapper`]:$n==="picture-card",[`${Dr}-picture-circle-wrapper`]:$n==="picture-circle"}),wn=Object.assign(Object.assign({},Ar==null?void 0:Ar.style),Tr);if(hi==="drag"){const Ji=Re()(to,Dr,`${Dr}-drag`,{[`${Dr}-drag-uploading`]:Hr.some(jo=>jo.status==="uploading"),[`${Dr}-drag-hover`]:_i==="dragover",[`${Dr}-disabled`]:Wr,[`${Dr}-rtl`]:vo==="rtl"});return Zn(rt.createElement("span",{className:es},rt.createElement("div",{className:Ji,style:wn,onDrop:Vi,onDragOver:Vi,onDragLeave:Vi},rt.createElement(st,Object.assign({},zr,{ref:It,className:`${Dr}-btn`}),rt.createElement("div",{className:`${Dr}-drag-container`},Gr))),Ss()))}const Fa=Re()(Dr,`${Dr}-select`,{[`${Dr}-disabled`]:Wr}),Il=(Ji=>rt.createElement("div",{className:Fa,style:Ji},rt.createElement(st,Object.assign({},zr,{ref:It}))))(Gr?void 0:{display:"none"});return Zn($n==="picture-card"||$n==="picture-circle"?rt.createElement("span",{className:es},Ss(Il,!!Gr)):rt.createElement("span",{className:es},Il,Ss()))};var Yt=rt.forwardRef(ir),zn=function(an,gn){var En={};for(var pn in an)Object.prototype.hasOwnProperty.call(an,pn)&&gn.indexOf(pn)<0&&(En[pn]=an[pn]);if(an!=null&&typeof Object.getOwnPropertySymbols=="function")for(var On=0,pn=Object.getOwnPropertySymbols(an);On<pn.length;On++)gn.indexOf(pn[On])<0&&Object.prototype.propertyIsEnumerable.call(an,pn[On])&&(En[pn[On]]=an[pn[On]]);return En},or=rt.forwardRef((an,gn)=>{var{style:En,height:pn}=an,On=zn(an,["style","height"]);return rt.createElement(Yt,Object.assign({ref:gn},On,{type:"drag",style:Object.assign(Object.assign({},En),{height:pn})}))});const rn=Yt;rn.Dragger=or,rn.LIST_IGNORE=Gn;var Mn=rn},99498:function(bn,ln,$e){(function(rt){rt($e(89780))})(function(rt){rt.defineOption("placeholder","",function(be,Ce,ye){var we=ye&&ye!=rt.Init;if(Ce&&!we)be.on("blur",je),be.on("change",ve),be.on("swapDoc",ve),rt.on(be.getInputField(),"compositionupdate",be.state.placeholderCompose=function(){Re(be)}),ve(be);else if(!Ce&&we){be.off("blur",je),be.off("change",ve),be.off("swapDoc",ve),rt.off(be.getInputField(),"compositionupdate",be.state.placeholderCompose),St(be);var me=be.getWrapperElement();me.className=me.className.replace(" CodeMirror-empty","")}Ce&&!be.hasFocus()&&je(be)});function St(be){be.state.placeholder&&(be.state.placeholder.parentNode.removeChild(be.state.placeholder),be.state.placeholder=null)}function ie(be){St(be);var Ce=be.state.placeholder=document.createElement("pre");Ce.style.cssText="height: 0; overflow: visible",Ce.style.direction=be.getOption("direction"),Ce.className="CodeMirror-placeholder CodeMirror-line-like";var ye=be.getOption("placeholder");typeof ye=="string"&&(ye=document.createTextNode(ye)),Ce.appendChild(ye),be.display.lineSpace.insertBefore(Ce,be.display.lineSpace.firstChild)}function Re(be){setTimeout(function(){var Ce=!1,ye=be.getInputField();ye.nodeName=="TEXTAREA"?Ce=!ye.value:be.lineCount()==1&&(Ce=!/[^\u200b]/.test(ye.querySelector(".CodeMirror-line").textContent)),Ce?ie(be):St(be)},20)}function je(be){ce(be)&&ie(be)}function ve(be){var Ce=be.getWrapperElement(),ye=ce(be);Ce.className=Ce.className.replace(" CodeMirror-empty","")+(ye?" CodeMirror-empty":""),ye?ie(be):St(be)}function ce(be){return be.lineCount()===1&&be.getLine(0)===""}})},25717:function(bn,ln,$e){(function(rt){rt($e(89780))})(function(rt){var St={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},ie=rt.Pos;rt.defineOption("autoCloseBrackets",!1,function(z,ee,ae){ae&&ae!=rt.Init&&(z.removeKeyMap(je),z.state.closeBrackets=null),ee&&(ve(Re(ee,"pairs")),z.state.closeBrackets=ee,z.addKeyMap(je))});function Re(z,ee){return ee=="pairs"&&typeof z=="string"?z:typeof z=="object"&&z[ee]!=null?z[ee]:St[ee]}var je={Backspace:Ce,Enter:ye};function ve(z){for(var ee=0;ee<z.length;ee++){var ae=z.charAt(ee),re="'"+ae+"'";je[re]||(je[re]=ce(ae))}}ve(St.pairs+"`");function ce(z){return function(ee){return me(ee,z)}}function be(z){var ee=z.state.closeBrackets;if(!ee||ee.override)return ee;var ae=z.getModeAt(z.getCursor());return ae.closeBrackets||ee}function Ce(z){var ee=be(z);if(!ee||z.getOption("disableInput"))return rt.Pass;for(var ae=Re(ee,"pairs"),re=z.listSelections(),le=0;le<re.length;le++){if(!re[le].empty())return rt.Pass;var ue=xe(z,re[le].head);if(!ue||ae.indexOf(ue)%2!=0)return rt.Pass}for(var le=re.length-1;le>=0;le--){var pe=re[le].head;z.replaceRange("",ie(pe.line,pe.ch-1),ie(pe.line,pe.ch+1),"+delete")}}function ye(z){var ee=be(z),ae=ee&&Re(ee,"explode");if(!ae||z.getOption("disableInput"))return rt.Pass;for(var re=z.listSelections(),le=0;le<re.length;le++){if(!re[le].empty())return rt.Pass;var ue=xe(z,re[le].head);if(!ue||ae.indexOf(ue)%2!=0)return rt.Pass}z.operation(function(){var pe=z.lineSeparator()||`
`;z.replaceSelection(pe+pe,null),z.execCommand("goCharLeft"),re=z.listSelections();for(var Ee=0;Ee<re.length;Ee++){var Pe=re[Ee].head.line;z.indentLine(Pe,null,!0),z.indentLine(Pe+1,null,!0)}})}function we(z){var ee=rt.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 me(z,ee){var ae=be(z);if(!ae||z.getOption("disableInput"))return rt.Pass;var re=Re(ae,"pairs"),le=re.indexOf(ee);if(le==-1)return rt.Pass;for(var ue=Re(ae,"closeBefore"),pe=Re(ae,"triples"),Ee=re.charAt(le+1)==ee,Pe=z.listSelections(),Ie=le%2==0,ke,Ae=0;Ae<Pe.length;Ae++){var Oe=Pe[Ae],Fe=Oe.head,_e,Ye=z.getRange(Fe,ie(Fe.line,Fe.ch+1));if(Ie&&!Oe.empty())_e="surround";else if((Ee||!Ie)&&Ye==ee)Ee&&fe(z,Fe)?_e="both":pe.indexOf(ee)>=0&&z.getRange(Fe,ie(Fe.line,Fe.ch+3))==ee+ee+ee?_e="skipThree":_e="skip";else if(Ee&&Fe.ch>1&&pe.indexOf(ee)>=0&&z.getRange(ie(Fe.line,Fe.ch-2),Fe)==ee+ee){if(Fe.ch>2&&/\bstring/.test(z.getTokenTypeAt(ie(Fe.line,Fe.ch-2))))return rt.Pass;_e="addFour"}else if(Ee){var ze=Fe.ch==0?" ":z.getRange(ie(Fe.line,Fe.ch-1),Fe);if(!rt.isWordChar(Ye)&&ze!=ee&&!rt.isWordChar(ze))_e="both";else return rt.Pass}else if(Ie&&(Ye.length===0||/\s/.test(Ye)||ue.indexOf(Ye)>-1))_e="both";else return rt.Pass;if(!ke)ke=_e;else if(ke!=_e)return rt.Pass}var Xe=le%2?re.charAt(le-1):ee,st=le%2?ee:re.charAt(le+1);z.operation(function(){if(ke=="skip")z.execCommand("goCharRight");else if(ke=="skipThree")for(var ht=0;ht<3;ht++)z.execCommand("goCharRight");else if(ke=="surround"){for(var ft=z.getSelections(),ht=0;ht<ft.length;ht++)ft[ht]=Xe+ft[ht]+st;z.replaceSelections(ft,"around"),ft=z.listSelections().slice();for(var ht=0;ht<ft.length;ht++)ft[ht]=we(ft[ht]);z.setSelections(ft)}else ke=="both"?(z.replaceSelection(Xe+st,null),z.triggerElectric(Xe+st),z.execCommand("goCharLeft")):ke=="addFour"&&(z.replaceSelection(Xe+Xe+Xe+Xe,"before"),z.execCommand("goCharRight"))})}function xe(z,ee){var ae=z.getRange(ie(ee.line,ee.ch-1),ie(ee.line,ee.ch+1));return ae.length==2?ae:null}function fe(z,ee){var ae=z.getTokenAt(ie(ee.line,ee.ch+1));return/\bstring/.test(ae.type)&&ae.start==ee.ch&&(ee.ch==0||!/\bstring/.test(z.getTokenTypeAt(ee)))}})},6313:function(bn,ln,$e){(function(rt){rt($e(89780),$e(32855))})(function(rt){rt.defineOption("autoCloseTags",!1,function(Ce,ye,we){if(we!=rt.Init&&we&&Ce.removeKeyMap("autoCloseTags"),!!ye){var me={name:"autoCloseTags"};(typeof ye!="object"||ye.whenClosing!==!1)&&(me["'/'"]=function(xe){return ve(xe)}),(typeof ye!="object"||ye.whenOpening!==!1)&&(me["'>'"]=function(xe){return Re(xe)}),Ce.addKeyMap(me)}});var St=["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 Re(Ce){if(Ce.getOption("disableInput"))return rt.Pass;for(var ye=Ce.listSelections(),we=[],me=Ce.getOption("autoCloseTags"),xe=0;xe<ye.length;xe++){if(!ye[xe].empty())return rt.Pass;var fe=ye[xe].head,z=Ce.getTokenAt(fe),ee=rt.innerMode(Ce.getMode(),z.state),ae=ee.state,re=ee.mode.xmlCurrentTag&&ee.mode.xmlCurrentTag(ae),le=re&&re.name;if(!le)return rt.Pass;var ue=ee.mode.configuration=="html",pe=typeof me=="object"&&me.dontCloseTags||ue&&St,Ee=typeof me=="object"&&me.indentTags||ue&&ie;z.end>fe.ch&&(le=le.slice(0,le.length-z.end+fe.ch));var Pe=le.toLowerCase();if(!le||z.type=="string"&&(z.end!=fe.ch||!/[\"\']/.test(z.string.charAt(z.string.length-1))||z.string.length==1)||z.type=="tag"&&re.close||z.string.indexOf("/")==fe.ch-z.start-1||pe&&ce(pe,Pe)>-1||be(Ce,ee.mode.xmlCurrentContext&&ee.mode.xmlCurrentContext(ae)||[],le,fe,!0))return rt.Pass;var Ie=typeof me=="object"&&me.emptyTags;if(Ie&&ce(Ie,le)>-1){we[xe]={text:"/>",newPos:rt.Pos(fe.line,fe.ch+2)};continue}var ke=Ee&&ce(Ee,Pe)>-1;we[xe]={indent:ke,text:">"+(ke?`
`:"")+"</"+le+">",newPos:ke?rt.Pos(fe.line+1,0):rt.Pos(fe.line,fe.ch+1)}}for(var Ae=typeof me=="object"&&me.dontIndentOnAutoClose,xe=ye.length-1;xe>=0;xe--){var Oe=we[xe];Ce.replaceRange(Oe.text,ye[xe].head,ye[xe].anchor,"+insert");var Fe=Ce.listSelections().slice(0);Fe[xe]={head:Oe.newPos,anchor:Oe.newPos},Ce.setSelections(Fe),!Ae&&Oe.indent&&(Ce.indentLine(Oe.newPos.line,null,!0),Ce.indentLine(Oe.newPos.line+1,null,!0))}}function je(Ce,ye){for(var we=Ce.listSelections(),me=[],xe=ye?"/":"</",fe=Ce.getOption("autoCloseTags"),z=typeof fe=="object"&&fe.dontIndentOnSlash,ee=0;ee<we.length;ee++){if(!we[ee].empty())return rt.Pass;var ae=we[ee].head,re=Ce.getTokenAt(ae),le=rt.innerMode(Ce.getMode(),re.state),ue=le.state;if(ye&&(re.type=="string"||re.string.charAt(0)!="<"||re.start!=ae.ch-1))return rt.Pass;var pe,Ee=le.mode.name!="xml"&&Ce.getMode().name=="htmlmixed";if(Ee&&le.mode.name=="javascript")pe=xe+"script";else if(Ee&&le.mode.name=="css")pe=xe+"style";else{var Pe=le.mode.xmlCurrentContext&&le.mode.xmlCurrentContext(ue);if(!Pe||Pe.length&&be(Ce,Pe,Pe[Pe.length-1],ae))return rt.Pass;pe=xe+Pe[Pe.length-1]}Ce.getLine(ae.line).charAt(re.end)!=">"&&(pe+=">"),me[ee]=pe}if(Ce.replaceSelections(me),we=Ce.listSelections(),!z)for(var ee=0;ee<we.length;ee++)(ee==we.length-1||we[ee].head.line<we[ee+1].head.line)&&Ce.indentLine(we[ee].head.line)}function ve(Ce){return Ce.getOption("disableInput")?rt.Pass:je(Ce,!0)}rt.commands.closeTag=function(Ce){return je(Ce)};function ce(Ce,ye){if(Ce.indexOf)return Ce.indexOf(ye);for(var we=0,me=Ce.length;we<me;++we)if(Ce[we]==ye)return we;return-1}function be(Ce,ye,we,me,xe){if(!rt.scanForClosingTag)return!1;var fe=Math.min(Ce.lastLine()+1,me.line+500),z=rt.scanForClosingTag(Ce,me,null,fe);if(!z||z.tag!=we)return!1;for(var ee=xe?1:0,ae=ye.length-1;ae>=0&&ye[ae]==we;ae--)++ee;me=z.to;for(var ae=1;ae<ee;ae++){var re=rt.scanForClosingTag(Ce,me,null,fe);if(!re||re.tag!=we)return!1;me=re.to}return!0}})},32855:function(bn,ln,$e){(function(rt){rt($e(89780))})(function(rt){"use strict";var St=rt.Pos;function ie(ae,re){return ae.line-re.line||ae.ch-re.ch}var Re="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",je=Re+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ve=new RegExp("<(/?)(["+Re+"]["+je+"]*)","g");function ce(ae,re,le,ue){this.line=re,this.ch=le,this.cm=ae,this.text=ae.getLine(re),this.min=ue?Math.max(ue.from,ae.firstLine()):ae.firstLine(),this.max=ue?Math.min(ue.to-1,ae.lastLine()):ae.lastLine()}function be(ae,re){var le=ae.cm.getTokenTypeAt(St(ae.line,re));return le&&/\btag\b/.test(le)}function Ce(ae){if(!(ae.line>=ae.max))return ae.ch=0,ae.text=ae.cm.getLine(++ae.line),!0}function ye(ae){if(!(ae.line<=ae.min))return ae.text=ae.cm.getLine(--ae.line),ae.ch=ae.text.length,!0}function we(ae){for(;;){var re=ae.text.indexOf(">",ae.ch);if(re==-1){if(Ce(ae))continue;return}if(!be(ae,re+1)){ae.ch=re+1;continue}var le=ae.text.lastIndexOf("/",re),ue=le>-1&&!/\S/.test(ae.text.slice(le+1,re));return ae.ch=re+1,ue?"selfClose":"regular"}}function me(ae){for(;;){var re=ae.ch?ae.text.lastIndexOf("<",ae.ch-1):-1;if(re==-1){if(ye(ae))continue;return}if(!be(ae,re+1)){ae.ch=re;continue}ve.lastIndex=re,ae.ch=re;var le=ve.exec(ae.text);if(le&&le.index==re)return le}}function xe(ae){for(;;){ve.lastIndex=ae.ch;var re=ve.exec(ae.text);if(!re){if(Ce(ae))continue;return}if(!be(ae,re.index+1)){ae.ch=re.index+1;continue}return ae.ch=re.index+re[0].length,re}}function fe(ae){for(;;){var re=ae.ch?ae.text.lastIndexOf(">",ae.ch-1):-1;if(re==-1){if(ye(ae))continue;return}if(!be(ae,re+1)){ae.ch=re;continue}var le=ae.text.lastIndexOf("/",re),ue=le>-1&&!/\S/.test(ae.text.slice(le+1,re));return ae.ch=re+1,ue?"selfClose":"regular"}}function z(ae,re){for(var le=[];;){var ue=xe(ae),pe,Ee=ae.line,Pe=ae.ch-(ue?ue[0].length:0);if(!ue||!(pe=we(ae)))return;if(pe!="selfClose")if(ue[1]){for(var Ie=le.length-1;Ie>=0;--Ie)if(le[Ie]==ue[2]){le.length=Ie;break}if(Ie<0&&(!re||re==ue[2]))return{tag:ue[2],from:St(Ee,Pe),to:St(ae.line,ae.ch)}}else le.push(ue[2])}}function ee(ae,re){for(var le=[];;){var ue=fe(ae);if(!ue)return;if(ue=="selfClose"){me(ae);continue}var pe=ae.line,Ee=ae.ch,Pe=me(ae);if(!Pe)return;if(Pe[1])le.push(Pe[2]);else{for(var Ie=le.length-1;Ie>=0;--Ie)if(le[Ie]==Pe[2]){le.length=Ie;break}if(Ie<0&&(!re||re==Pe[2]))return{tag:Pe[2],from:St(ae.line,ae.ch),to:St(pe,Ee)}}}}rt.registerHelper("fold","xml",function(ae,re){for(var le=new ce(ae,re.line,0);;){var ue=xe(le);if(!ue||le.line!=re.line)return;var pe=we(le);if(!pe)return;if(!ue[1]&&pe!="selfClose"){var Ee=St(le.line,le.ch),Pe=z(le,ue[2]);return Pe&&ie(Pe.from,Ee)>0?{from:Ee,to:Pe.from}:null}}}),rt.findMatchingTag=function(ae,re,le){var ue=new ce(ae,re.line,re.ch,le);if(!(ue.text.indexOf(">")==-1&&ue.text.indexOf("<")==-1)){var pe=we(ue),Ee=pe&&St(ue.line,ue.ch),Pe=pe&&me(ue);if(!(!pe||!Pe||ie(ue,re)>0)){var Ie={from:St(ue.line,ue.ch),to:Ee,tag:Pe[2]};return pe=="selfClose"?{open:Ie,close:null,at:"open"}:Pe[1]?{open:ee(ue,Pe[2]),close:Ie,at:"close"}:(ue=new ce(ae,Ee.line,Ee.ch,le),{open:Ie,close:z(ue,Pe[2]),at:"open"})}}},rt.findEnclosingTag=function(ae,re,le,ue){for(var pe=new ce(ae,re.line,re.ch,le);;){var Ee=ee(pe,ue);if(!Ee)break;var Pe=new ce(ae,re.line,re.ch,le),Ie=z(Pe,Ee.tag);if(Ie)return{open:Ee,close:Ie}}},rt.scanForClosingTag=function(ae,re,le,ue){var pe=new ce(ae,re.line,re.ch,ue?{from:0,to:ue}:null);return z(pe,le)}})},89780:function(bn){(function(ln,$e){bn.exports=$e()})(this,function(){"use strict";var ln=navigator.userAgent,$e=navigator.platform,rt=/gecko\/\d/i.test(ln),St=/MSIE \d/.test(ln),ie=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ln),Re=/Edge\/(\d+)/.exec(ln),je=St||ie||Re,ve=je&&(St?document.documentMode||6:+(Re||ie)[1]),ce=!Re&&/WebKit\//.test(ln),be=ce&&/Qt\/\d+\.\d+/.test(ln),Ce=!Re&&/Chrome\//.test(ln),ye=/Opera\//.test(ln),we=/Apple Computer/.test(navigator.vendor),me=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ln),xe=/PhantomJS/.test(ln),fe=!Re&&/AppleWebKit/.test(ln)&&/Mobile\/\w+/.test(ln),z=/Android/.test(ln),ee=fe||z||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ln),ae=fe||/Mac/.test($e),re=/\bCrOS\b/.test(ln),le=/win/i.test($e),ue=ye&&ln.match(/Version\/(\d*\.\d*)/);ue&&(ue=Number(ue[1])),ue&&ue>=15&&(ye=!1,ce=!0);var pe=ae&&(be||ye&&(ue==null||ue<12.11)),Ee=rt||je&&ve>=9;function Pe(oe){return new RegExp("(^|\\s)"+oe+"(?:$|\\s)\\s*")}var Ie=function(oe,de){var Me=oe.className,Te=Pe(de).exec(Me);if(Te){var Be=Me.slice(Te.index+Te[0].length);oe.className=Me.slice(0,Te.index)+(Be?Te[1]+Be:"")}};function ke(oe){for(var de=oe.childNodes.length;de>0;--de)oe.removeChild(oe.firstChild);return oe}function Ae(oe,de){return ke(oe).appendChild(de)}function Oe(oe,de,Me,Te){var Be=document.createElement(oe);if(Me&&(Be.className=Me),Te&&(Be.style.cssText=Te),typeof de=="string")Be.appendChild(document.createTextNode(de));else if(de)for(var at=0;at<de.length;++at)Be.appendChild(de[at]);return Be}function Fe(oe,de,Me,Te){var Be=Oe(oe,de,Me,Te);return Be.setAttribute("role","presentation"),Be}var _e;document.createRange?_e=function(oe,de,Me,Te){var Be=document.createRange();return Be.setEnd(Te||oe,Me),Be.setStart(oe,de),Be}:_e=function(oe,de,Me){var Te=document.body.createTextRange();try{Te.moveToElementText(oe.parentNode)}catch(Be){return Te}return Te.collapse(!0),Te.moveEnd("character",Me),Te.moveStart("character",de),Te};function Ye(oe,de){if(de.nodeType==3&&(de=de.parentNode),oe.contains)return oe.contains(de);do if(de.nodeType==11&&(de=de.host),de==oe)return!0;while(de=de.parentNode)}function ze(){var oe;try{oe=document.activeElement}catch(de){oe=document.body||null}for(;oe&&oe.shadowRoot&&oe.shadowRoot.activeElement;)oe=oe.shadowRoot.activeElement;return oe}function Xe(oe,de){var Me=oe.className;Pe(de).test(Me)||(oe.className+=(Me?" ":"")+de)}function st(oe,de){for(var Me=oe.split(" "),Te=0;Te<Me.length;Te++)Me[Te]&&!Pe(Me[Te]).test(de)&&(de+=" "+Me[Te]);return de}var ht=function(oe){oe.select()};fe?ht=function(oe){oe.selectionStart=0,oe.selectionEnd=oe.value.length}:je&&(ht=function(oe){try{oe.select()}catch(de){}});function ft(oe){var de=Array.prototype.slice.call(arguments,1);return function(){return oe.apply(null,de)}}function Lt(oe,de,Me){de||(de={});for(var Te in oe)oe.hasOwnProperty(Te)&&(Me!==!1||!de.hasOwnProperty(Te))&&(de[Te]=oe[Te]);return de}function et(oe,de,Me,Te,Be){de==null&&(de=oe.search(/[^\s\u00a0]/),de==-1&&(de=oe.length));for(var at=Te||0,Pt=Be||0;;){var Bt=oe.indexOf(" ",at);if(Bt<0||Bt>=de)return Pt+(de-at);Pt+=Bt-at,Pt+=Me-Pt%Me,at=Bt+1}}var it=function(){this.id=null,this.f=null,this.time=0,this.handler=ft(this.onTimeout,this)};it.prototype.onTimeout=function(oe){oe.id=0,oe.time<=+new Date?oe.f():setTimeout(oe.handler,oe.time-+new Date)},it.prototype.set=function(oe,de){this.f=de;var Me=+new Date+oe;(!this.id||Me<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,oe),this.time=Me)};function xt(oe,de){for(var Me=0;Me<oe.length;++Me)if(oe[Me]==de)return Me;return-1}var Et=50,Mt={toString:function(){return"CodeMirror.Pass"}},mt={scroll:!1},pt={origin:"*mouse"},vt={origin:"+move"};function jt(oe,de,Me){for(var Te=0,Be=0;;){var at=oe.indexOf(" ",Te);at==-1&&(at=oe.length);var Pt=at-Te;if(at==oe.length||Be+Pt>=de)return Te+Math.min(Pt,de-Be);if(Be+=at-Te,Be+=Me-Be%Me,Te=at+1,Be>=de)return Te}}var At=[""];function Kt(oe){for(;At.length<=oe;)At.push(Ct(At)+" ");return At[oe]}function Ct(oe){return oe[oe.length-1]}function gt(oe,de){for(var Me=[],Te=0;Te<oe.length;Te++)Me[Te]=de(oe[Te],Te);return Me}function tt(oe,de,Me){for(var Te=0,Be=Me(de);Te<oe.length&&Me(oe[Te])<=Be;)Te++;oe.splice(Te,0,de)}function bt(){}function Ke(oe,de){var Me;return Object.create?Me=Object.create(oe):(bt.prototype=oe,Me=new bt),de&&Lt(de,Me),Me}var ut=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function wt(oe){return/\w/.test(oe)||oe>"\x80"&&(oe.toUpperCase()!=oe.toLowerCase()||ut.test(oe))}function yt(oe,de){return de?de.source.indexOf("\\w")>-1&&wt(oe)?!0:de.test(oe):wt(oe)}function lt(oe){for(var de in oe)if(oe.hasOwnProperty(de)&&oe[de])return!1;return!0}var Qe=/[\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 We(oe){return oe.charCodeAt(0)>=768&&Qe.test(oe)}function Ue(oe,de,Me){for(;(Me<0?de>0:de<oe.length)&&We(oe.charAt(de));)de+=Me;return de}function qe(oe,de,Me){for(var Te=de>Me?-1:1;;){if(de==Me)return de;var Be=(de+Me)/2,at=Te<0?Math.ceil(Be):Math.floor(Be);if(at==de)return oe(at)?de:Me;oe(at)?Me=at:de=at+Te}}function He(oe,de,Me,Te){if(!oe)return Te(de,Me,"ltr",0);for(var Be=!1,at=0;at<oe.length;++at){var Pt=oe[at];(Pt.from<Me&&Pt.to>de||de==Me&&Pt.to==de)&&(Te(Math.max(Pt.from,de),Math.min(Pt.to,Me),Pt.level==1?"rtl":"ltr",at),Be=!0)}Be||Te(de,Me,"ltr")}var De=null;function Le(oe,de,Me){var Te;De=null;for(var Be=0;Be<oe.length;++Be){var at=oe[Be];if(at.from<de&&at.to>de)return Be;at.to==de&&(at.from!=at.to&&Me=="before"?Te=Be:De=Be),at.from==de&&(at.from!=at.to&&Me!="before"?Te=Be:De=Be)}return Te!=null?Te:De}var Ve=function(){var oe="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",de="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function Me(Vt){return Vt<=247?oe.charAt(Vt):1424<=Vt&&Vt<=1524?"R":1536<=Vt&&Vt<=1785?de.charAt(Vt-1536):1774<=Vt&&Vt<=2220?"r":8192<=Vt&&Vt<=8203?"w":Vt==8204?"b":"L"}var Te=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,Be=/[stwN]/,at=/[LRr]/,Pt=/[Lb1n]/,Bt=/[1n]/;function Dt(Vt,yn,Jt){this.level=Vt,this.from=yn,this.to=Jt}return function(Vt,yn){var Jt=yn=="ltr"?"L":"R";if(Vt.length==0||yn=="ltr"&&!Te.test(Vt))return!1;for(var Hn=Vt.length,Bn=[],fr=0;fr<Hn;++fr)Bn.push(Me(Vt.charCodeAt(fr)));for(var wr=0,_r=Jt;wr<Hn;++wr){var oi=Bn[wr];oi=="m"?Bn[wr]=_r:_r=oi}for(var Ti=0,vi=Jt;Ti<Hn;++Ti){var Bi=Bn[Ti];Bi=="1"&&vi=="r"?Bn[Ti]="n":at.test(Bi)&&(vi=Bi,Bi=="r"&&(Bn[Ti]="R"))}for(var fo=1,pi=Bn[0];fo<Hn-1;++fo){var ko=Bn[fo];ko=="+"&&pi=="1"&&Bn[fo+1]=="1"?Bn[fo]="1":ko==","&&pi==Bn[fo+1]&&(pi=="1"||pi=="n")&&(Bn[fo]=pi),pi=ko}for(var Ja=0;Ja<Hn;++Ja){var Ds=Bn[Ja];if(Ds==",")Bn[Ja]="N";else if(Ds=="%"){var os=void 0;for(os=Ja+1;os<Hn&&Bn[os]=="%";++os);for(var Vl=Ja&&Bn[Ja-1]=="!"||os<Hn&&Bn[os]=="1"?"1":"N",vl=Ja;vl<os;++vl)Bn[vl]=Vl;Ja=os-1}}for(var ks=0,ou=Jt;ks<Hn;++ks){var al=Bn[ks];ou=="L"&&al=="1"?Bn[ks]="L":at.test(al)&&(ou=al)}for(var Os=0;Os<Hn;++Os)if(Be.test(Bn[Os])){var ia=void 0;for(ia=Os+1;ia<Hn&&Be.test(Bn[ia]);++ia);for(var hs=(Os?Bn[Os-1]:Jt)=="L",Hs=(ia<Hn?Bn[ia]:Jt)=="L",sl=hs==Hs?hs?"L":"R":Jt,Zu=Os;Zu<ia;++Zu)Bn[Zu]=sl;Os=ia-1}for(var as=[],ku,ys=0;ys<Hn;)if(Pt.test(Bn[ys])){var xf=ys;for(++ys;ys<Hn&&Pt.test(Bn[ys]);++ys);as.push(new Dt(0,xf,ys))}else{var vu=ys,au=as.length,Zl=yn=="rtl"?1:0;for(++ys;ys<Hn&&Bn[ys]!="L";++ys);for(var Aa=vu;Aa<ys;)if(Bt.test(Bn[Aa])){vu<Aa&&(as.splice(au,0,new Dt(1,vu,Aa)),au+=Zl);var Us=Aa;for(++Aa;Aa<ys&&Bt.test(Bn[Aa]);++Aa);as.splice(au,0,new Dt(2,Us,Aa)),au+=Zl,vu=Aa}else++Aa;vu<ys&&as.splice(au,0,new Dt(1,vu,ys))}return yn=="ltr"&&(as[0].level==1&&(ku=Vt.match(/^\s+/))&&(as[0].from=ku[0].length,as.unshift(new Dt(0,0,ku[0].length))),Ct(as).level==1&&(ku=Vt.match(/\s+$/))&&(Ct(as).to-=ku[0].length,as.push(new Dt(0,Hn-ku[0].length,Hn)))),yn=="rtl"?as.reverse():as}}();function dt(oe,de){var Me=oe.order;return Me==null&&(Me=oe.order=Ve(oe.text,de)),Me}var Ze=[],Tt=function(oe,de,Me){if(oe.addEventListener)oe.addEventListener(de,Me,!1);else if(oe.attachEvent)oe.attachEvent("on"+de,Me);else{var Te=oe._handlers||(oe._handlers={});Te[de]=(Te[de]||Ze).concat(Me)}};function _t(oe,de){return oe._handlers&&oe._handlers[de]||Ze}function Qt(oe,de,Me){if(oe.removeEventListener)oe.removeEventListener(de,Me,!1);else if(oe.detachEvent)oe.detachEvent("on"+de,Me);else{var Te=oe._handlers,Be=Te&&Te[de];if(Be){var at=xt(Be,Me);at>-1&&(Te[de]=Be.slice(0,at).concat(Be.slice(at+1)))}}}function kt(oe,de){var Me=_t(oe,de);if(Me.length)for(var Te=Array.prototype.slice.call(arguments,2),Be=0;Be<Me.length;++Be)Me[Be].apply(null,Te)}function Nt(oe,de,Me){return typeof de=="string"&&(de={type:de,preventDefault:function(){this.defaultPrevented=!0}}),kt(oe,Me||de.type,oe,de),Xn(de)||de.codemirrorIgnore}function Zt(oe){var de=oe._handlers&&oe._handlers.cursorActivity;if(de)for(var Me=oe.curOp.cursorActivityHandlers||(oe.curOp.cursorActivityHandlers=[]),Te=0;Te<de.length;++Te)xt(Me,de[Te])==-1&&Me.push(de[Te])}function on(oe,de){return _t(oe,de).length>0}function vn(oe){oe.prototype.on=function(de,Me){Tt(this,de,Me)},oe.prototype.off=function(de,Me){Qt(this,de,Me)}}function kn(oe){oe.preventDefault?oe.preventDefault():oe.returnValue=!1}function Kn(oe){oe.stopPropagation?oe.stopPropagation():oe.cancelBubble=!0}function Xn(oe){return oe.defaultPrevented!=null?oe.defaultPrevented:oe.returnValue==!1}function pr(oe){kn(oe),Kn(oe)}function dr(oe){return oe.target||oe.srcElement}function vr(oe){var de=oe.which;return de==null&&(oe.button&1?de=1:oe.button&2?de=3:oe.button&4&&(de=2)),ae&&oe.ctrlKey&&de==1&&(de=3),de}var Sr=function(){if(je&&ve<9)return!1;var oe=Oe("div");return"draggable"in oe||"dragDrop"in oe}(),Fr;function li(oe){if(Fr==null){var de=Oe("span","\u200B");Ae(oe,Oe("span",[de,document.createTextNode("x")])),oe.firstChild.offsetHeight!=0&&(Fr=de.offsetWidth<=1&&de.offsetHeight>2&&!(je&&ve<8))}var Me=Fr?Oe("span","\u200B"):Oe("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return Me.setAttribute("cm-text",""),Me}var Er;function xi(oe){if(Er!=null)return Er;var de=Ae(oe,document.createTextNode("A\u062EA")),Me=_e(de,0,1).getBoundingClientRect(),Te=_e(de,1,2).getBoundingClientRect();return ke(oe),!Me||Me.left==Me.right?!1:Er=Te.right-Me.right<3}var Cr=`
b`.split(/\n/).length!=3?function(oe){for(var de=0,Me=[],Te=oe.length;de<=Te;){var Be=oe.indexOf(`
`,de);Be==-1&&(Be=oe.length);var at=oe.slice(de,oe.charAt(Be-1)=="\r"?Be-1:Be),Pt=at.indexOf("\r");Pt!=-1?(Me.push(at.slice(0,Pt)),de+=Pt+1):(Me.push(at),de=Be+1)}return Me}:function(oe){return oe.split(/\r\n?|\n/)},ot=window.getSelection?function(oe){try{return oe.selectionStart!=oe.selectionEnd}catch(de){return!1}}:function(oe){var de;try{de=oe.ownerDocument.selection.createRange()}catch(Me){}return!de||de.parentElement()!=oe?!1:de.compareEndPoints("StartToEnd",de)!=0},di=function(){var oe=Oe("div");return"oncopy"in oe?!0:(oe.setAttribute("oncopy","return;"),typeof oe.oncopy=="function")}(),Yr=null;function Ri(oe){if(Yr!=null)return Yr;var de=Ae(oe,Oe("span","x")),Me=de.getBoundingClientRect(),Te=_e(de,0,1).getBoundingClientRect();return Yr=Math.abs(Me.left-Te.left)>1}var hr={},Ir={};function Rr(oe,de){arguments.length>2&&(de.dependencies=Array.prototype.slice.call(arguments,2)),hr[oe]=de}function yi(oe,de){Ir[oe]=de}function dn(oe){if(typeof oe=="string"&&Ir.hasOwnProperty(oe))oe=Ir[oe];else if(oe&&typeof oe.name=="string"&&Ir.hasOwnProperty(oe.name)){var de=Ir[oe.name];typeof de=="string"&&(de={name:de}),oe=Ke(de,oe),oe.name=de.name}else{if(typeof oe=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(oe))return dn("application/xml");if(typeof oe=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(oe))return dn("application/json")}return typeof oe=="string"?{name:oe}:oe||{name:"null"}}function mn(oe,de){de=dn(de);var Me=hr[de.name];if(!Me)return mn(oe,"text/plain");var Te=Me(oe,de);if(un.hasOwnProperty(de.name)){var Be=un[de.name];for(var at in Be)Be.hasOwnProperty(at)&&(Te.hasOwnProperty(at)&&(Te["_"+at]=Te[at]),Te[at]=Be[at])}if(Te.name=de.name,de.helperType&&(Te.helperType=de.helperType),de.modeProps)for(var Pt in de.modeProps)Te[Pt]=de.modeProps[Pt];return Te}var un={};function Ut(oe,de){var Me=un.hasOwnProperty(oe)?un[oe]:un[oe]={};Lt(de,Me)}function xn(oe,de){if(de===!0)return de;if(oe.copyState)return oe.copyState(de);var Me={};for(var Te in de){var Be=de[Te];Be instanceof Array&&(Be=Be.concat([])),Me[Te]=Be}return Me}function jn(oe,de){for(var Me;oe.innerMode&&(Me=oe.innerMode(de),!(!Me||Me.mode==oe));)de=Me.state,oe=Me.mode;return Me||{mode:oe,state:de}}function en(oe,de,Me){return oe.startState?oe.startState(de,Me):!0}var Gt=function(oe,de,Me){this.pos=this.start=0,this.string=oe,this.tabSize=de||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=Me};Gt.prototype.eol=function(){return this.pos>=this.string.length},Gt.prototype.sol=function(){return this.pos==this.lineStart},Gt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Gt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Gt.prototype.eat=function(oe){var de=this.string.charAt(this.pos),Me;if(typeof oe=="string"?Me=de==oe:Me=de&&(oe.test?oe.test(de):oe(de)),Me)return++this.pos,de},Gt.prototype.eatWhile=function(oe){for(var de=this.pos;this.eat(oe););return this.pos>de},Gt.prototype.eatSpace=function(){for(var oe=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>oe},Gt.prototype.skipToEnd=function(){this.pos=this.string.length},Gt.prototype.skipTo=function(oe){var de=this.string.indexOf(oe,this.pos);if(de>-1)return this.pos=de,!0},Gt.prototype.backUp=function(oe){this.pos-=oe},Gt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=et(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?et(this.string,this.lineStart,this.tabSize):0)},Gt.prototype.indentation=function(){return et(this.string,null,this.tabSize)-(this.lineStart?et(this.string,this.lineStart,this.tabSize):0)},Gt.prototype.match=function(oe,de,Me){if(typeof oe=="string"){var Te=function(Pt){return Me?Pt.toLowerCase():Pt},Be=this.string.substr(this.pos,oe.length);if(Te(Be)==Te(oe))return de!==!1&&(this.pos+=oe.length),!0}else{var at=this.string.slice(this.pos).match(oe);return at&&at.index>0?null:(at&&de!==!1&&(this.pos+=at[0].length),at)}},Gt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Gt.prototype.hideFirstChars=function(oe,de){this.lineStart+=oe;try{return de()}finally{this.lineStart-=oe}},Gt.prototype.lookAhead=function(oe){var de=this.lineOracle;return de&&de.lookAhead(oe)},Gt.prototype.baseToken=function(){var oe=this.lineOracle;return oe&&oe.baseToken(this.pos)};function Cn(oe,de){if(de-=oe.first,de<0||de>=oe.size)throw new Error("There is no line "+(de+oe.first)+" in the document.");for(var Me=oe;!Me.lines;)for(var Te=0;;++Te){var Be=Me.children[Te],at=Be.chunkSize();if(de<at){Me=Be;break}de-=at}return Me.lines[de]}function Gn(oe,de,Me){var Te=[],Be=de.line;return oe.iter(de.line,Me.line+1,function(at){var Pt=at.text;Be==Me.line&&(Pt=Pt.slice(0,Me.ch)),Be==de.line&&(Pt=Pt.slice(de.ch)),Te.push(Pt),++Be}),Te}function ir(oe,de,Me){var Te=[];return oe.iter(de,Me,function(Be){Te.push(Be.text)}),Te}function Pn(oe,de){var Me=de-oe.height;if(Me)for(var Te=oe;Te;Te=Te.parent)Te.height+=Me}function Yt(oe){if(oe.parent==null)return null;for(var de=oe.parent,Me=xt(de.lines,oe),Te=de.parent;Te;de=Te,Te=Te.parent)for(var Be=0;Te.children[Be]!=de;++Be)Me+=Te.children[Be].chunkSize();return Me+de.first}function zn(oe,de){var Me=oe.first;e:do{for(var Te=0;Te<oe.children.length;++Te){var Be=oe.children[Te],at=Be.height;if(de<at){oe=Be;continue e}de-=at,Me+=Be.chunkSize()}return Me}while(!oe.lines);for(var Pt=0;Pt<oe.lines.length;++Pt){var Bt=oe.lines[Pt],Dt=Bt.height;if(de<Dt)break;de-=Dt}return Me+Pt}function Qn(oe,de){return de>=oe.first&&de<oe.first+oe.size}function or(oe,de){return String(oe.lineNumberFormatter(de+oe.firstLineNumber))}function rn(oe,de,Me){if(Me===void 0&&(Me=null),!(this instanceof rn))return new rn(oe,de,Me);this.line=oe,this.ch=de,this.sticky=Me}function Mn(oe,de){return oe.line-de.line||oe.ch-de.ch}function an(oe,de){return oe.sticky==de.sticky&&Mn(oe,de)==0}function gn(oe){return rn(oe.line,oe.ch)}function En(oe,de){return Mn(oe,de)<0?de:oe}function pn(oe,de){return Mn(oe,de)<0?oe:de}function On(oe,de){return Math.max(oe.first,Math.min(de,oe.first+oe.size-1))}function Dn(oe,de){if(de.line<oe.first)return rn(oe.first,0);var Me=oe.first+oe.size-1;return de.line>Me?rn(Me,Cn(oe,Me).text.length):$n(de,Cn(oe,de.line).text.length)}function $n(oe,de){var Me=oe.ch;return Me==null||Me>de?rn(oe.line,de):Me<0?rn(oe.line,0):oe}function Fn(oe,de){for(var Me=[],Te=0;Te<de.length;Te++)Me[Te]=Dn(oe,de[Te]);return Me}var Tn=function(oe,de){this.state=oe,this.lookAhead=de},Yn=function(oe,de,Me,Te){this.state=de,this.doc=oe,this.line=Me,this.maxLookAhead=Te||0,this.baseTokens=null,this.baseTokenPos=1};Yn.prototype.lookAhead=function(oe){var de=this.doc.getLine(this.line+oe);return de!=null&&oe>this.maxLookAhead&&(this.maxLookAhead=oe),de},Yn.prototype.baseToken=function(oe){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=oe;)this.baseTokenPos+=2;var de=this.baseTokens[this.baseTokenPos+1];return{type:de&&de.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-oe}},Yn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Yn.fromSaved=function(oe,de,Me){return de instanceof Tn?new Yn(oe,xn(oe.mode,de.state),Me,de.lookAhead):new Yn(oe,xn(oe.mode,de),Me)},Yn.prototype.save=function(oe){var de=oe!==!1?xn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Tn(de,this.maxLookAhead):de};function Lr(oe,de,Me,Te){var Be=[oe.state.modeGen],at={};hi(oe,de.text,oe.doc.mode,Me,function(Vt,yn){return Be.push(Vt,yn)},at,Te);for(var Pt=Me.state,Bt=function(Vt){Me.baseTokens=Be;var yn=oe.state.overlays[Vt],Jt=1,Hn=0;Me.state=!0,hi(oe,de.text,yn.mode,Me,function(Bn,fr){for(var wr=Jt;Hn<Bn;){var _r=Be[Jt];_r>Bn&&Be.splice(Jt,1,Bn,Be[Jt+1],_r),Jt+=2,Hn=Math.min(Bn,_r)}if(fr)if(yn.opaque)Be.splice(wr,Jt-wr,Bn,"overlay "+fr),Jt=wr+2;else for(;wr<Jt;wr+=2){var oi=Be[wr+1];Be[wr+1]=(oi?oi+" ":"")+"overlay "+fr}},at),Me.state=Pt,Me.baseTokens=null,Me.baseTokenPos=1},Dt=0;Dt<oe.state.overlays.length;++Dt)Bt(Dt);return{styles:Be,classes:at.bgClass||at.textClass?at:null}}function qr(oe,de,Me){if(!de.styles||de.styles[0]!=oe.state.modeGen){var Te=Br(oe,Yt(de)),Be=de.text.length>oe.options.maxHighlightLength&&xn(oe.doc.mode,Te.state),at=Lr(oe,de,Te);Be&&(Te.state=Be),de.stateAfter=Te.save(!Be),de.styles=at.styles,at.classes?de.styleClasses=at.classes:de.styleClasses&&(de.styleClasses=null),Me===oe.doc.highlightFrontier&&(oe.doc.modeFrontier=Math.max(oe.doc.modeFrontier,++oe.doc.highlightFrontier))}return de.styles}function Br(oe,de,Me){var Te=oe.doc,Be=oe.display;if(!Te.mode.startState)return new Yn(Te,!0,de);var at=Gr(oe,de,Me),Pt=at>Te.first&&Cn(Te,at-1).stateAfter,Bt=Pt?Yn.fromSaved(Te,Pt,at):new Yn(Te,en(Te.mode),at);return Te.iter(at,de,function(Dt){tn(oe,Dt.text,Bt);var Vt=Bt.line;Dt.stateAfter=Vt==de-1||Vt%5==0||Vt>=Be.viewFrom&&Vt<Be.viewTo?Bt.save():null,Bt.nextLine()}),Me&&(Te.modeFrontier=Bt.line),Bt}function tn(oe,de,Me,Te){var Be=oe.doc.mode,at=new Gt(de,oe.options.tabSize,Me);for(at.start=at.pos=Te||0,de==""&&lr(Be,Me.state);!at.eol();)br(Be,at,Me.state),at.start=at.pos}function lr(oe,de){if(oe.blankLine)return oe.blankLine(de);if(oe.innerMode){var Me=jn(oe,de);if(Me.mode.blankLine)return Me.mode.blankLine(Me.state)}}function br(oe,de,Me,Te){for(var Be=0;Be<10;Be++){Te&&(Te[0]=jn(oe,Me).mode);var at=oe.token(de,Me);if(de.pos>de.start)return at}throw new Error("Mode "+oe.name+" failed to advance stream.")}var ar=function(oe,de,Me){this.start=oe.start,this.end=oe.pos,this.string=oe.current(),this.type=de||null,this.state=Me};function Qr(oe,de,Me,Te){var Be=oe.doc,at=Be.mode,Pt;de=Dn(Be,de);var Bt=Cn(Be,de.line),Dt=Br(oe,de.line,Me),Vt=new Gt(Bt.text,oe.options.tabSize,Dt),yn;for(Te&&(yn=[]);(Te||Vt.pos<de.ch)&&!Vt.eol();)Vt.start=Vt.pos,Pt=br(at,Vt,Dt.state),Te&&yn.push(new ar(Vt,Pt,xn(Be.mode,Dt.state)));return Te?yn:new ar(Vt,Pt,Dt.state)}function Xr(oe,de){if(oe)for(;;){var Me=oe.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!Me)break;oe=oe.slice(0,Me.index)+oe.slice(Me.index+Me[0].length);var Te=Me[1]?"bgClass":"textClass";de[Te]==null?de[Te]=Me[2]:new RegExp("(?:^|\\s)"+Me[2]+"(?:$|\\s)").test(de[Te])||(de[Te]+=" "+Me[2])}return oe}function hi(oe,de,Me,Te,Be,at,Pt){var Bt=Me.flattenSpans;Bt==null&&(Bt=oe.options.flattenSpans);var Dt=0,Vt=null,yn=new Gt(de,oe.options.tabSize,Te),Jt,Hn=oe.options.addModeClass&&[null];for(de==""&&Xr(lr(Me,Te.state),at);!yn.eol();){if(yn.pos>oe.options.maxHighlightLength?(Bt=!1,Pt&&tn(oe,de,Te,yn.pos),yn.pos=de.length,Jt=null):Jt=Xr(br(Me,yn,Te.state,Hn),at),Hn){var Bn=Hn[0].name;Bn&&(Jt="m-"+(Jt?Bn+" "+Jt:Bn))}if(!Bt||Vt!=Jt){for(;Dt<yn.start;)Dt=Math.min(yn.start,Dt+5e3),Be(Dt,Vt);Vt=Jt}yn.start=yn.pos}for(;Dt<yn.pos;){var fr=Math.min(yn.pos,Dt+5e3);Be(fr,Vt),Dt=fr}}function Gr(oe,de,Me){for(var Te,Be,at=oe.doc,Pt=Me?-1:de-(oe.doc.mode.innerMode?1e3:100),Bt=de;Bt>Pt;--Bt){if(Bt<=at.first)return at.first;var Dt=Cn(at,Bt-1),Vt=Dt.stateAfter;if(Vt&&(!Me||Bt+(Vt instanceof Tn?Vt.lookAhead:0)<=at.modeFrontier))return Bt;var yn=et(Dt.text,null,oe.options.tabSize);(Be==null||Te>yn)&&(Be=Bt-1,Te=yn)}return Be}function Tr(oe,de){if(oe.modeFrontier=Math.min(oe.modeFrontier,de),!(oe.highlightFrontier<de-10)){for(var Me=oe.first,Te=de-1;Te>Me;Te--){var Be=Cn(oe,Te).stateAfter;if(Be&&(!(Be instanceof Tn)||Te+Be.lookAhead<de)){Me=Te+1;break}}oe.highlightFrontier=Math.min(oe.highlightFrontier,Me)}}var Si=!1,Ln=!1;function Ki(){Si=!0}function Nn(){Ln=!0}function gi(oe,de,Me){this.marker=oe,this.from=de,this.to=Me}function xo(oe,de){if(oe)for(var Me=0;Me<oe.length;++Me){var Te=oe[Me];if(Te.marker==de)return Te}}function Mi(oe,de){for(var Me,Te=0;Te<oe.length;++Te)oe[Te]!=de&&(Me||(Me=[])).push(oe[Te]);return Me}function Go(oe,de){oe.markedSpans=oe.markedSpans?oe.markedSpans.concat([de]):[de],de.marker.attachLine(oe)}function po(oe,de,Me){var Te;if(oe)for(var Be=0;Be<oe.length;++Be){var at=oe[Be],Pt=at.marker,Bt=at.from==null||(Pt.inclusiveLeft?at.from<=de:at.from<de);if(Bt||at.from==de&&Pt.type=="bookmark"&&(!Me||!at.marker.insertLeft)){var Dt=at.to==null||(Pt.inclusiveRight?at.to>=de:at.to>de);(Te||(Te=[])).push(new gi(Pt,at.from,Dt?null:at.to))}}return Te}function Wr(oe,de,Me){var Te;if(oe)for(var Be=0;Be<oe.length;++Be){var at=oe[Be],Pt=at.marker,Bt=at.to==null||(Pt.inclusiveRight?at.to>=de:at.to>de);if(Bt||at.from==de&&Pt.type=="bookmark"&&(!Me||at.marker.insertLeft)){var Dt=at.from==null||(Pt.inclusiveLeft?at.from<=de:at.from<de);(Te||(Te=[])).push(new gi(Pt,Dt?null:at.from-de,at.to==null?null:at.to-de))}}return Te}function Hr(oe,de){if(de.full)return null;var Me=Qn(oe,de.from.line)&&Cn(oe,de.from.line).markedSpans,Te=Qn(oe,de.to.line)&&Cn(oe,de.to.line).markedSpans;if(!Me&&!Te)return null;var Be=de.from.ch,at=de.to.ch,Pt=Mn(de.from,de.to)==0,Bt=po(Me,Be,Pt),Dt=Wr(Te,at,Pt),Vt=de.text.length==1,yn=Ct(de.text).length+(Vt?Be:0);if(Bt)for(var Jt=0;Jt<Bt.length;++Jt){var Hn=Bt[Jt];if(Hn.to==null){var Bn=xo(Dt,Hn.marker);Bn?Vt&&(Hn.to=Bn.to==null?null:Bn.to+yn):Hn.to=Be}}if(Dt)for(var fr=0;fr<Dt.length;++fr){var wr=Dt[fr];if(wr.to!=null&&(wr.to+=yn),wr.from==null){var _r=xo(Bt,wr.marker);_r||(wr.from=yn,Vt&&(Bt||(Bt=[])).push(wr))}else wr.from+=yn,Vt&&(Bt||(Bt=[])).push(wr)}Bt&&(Bt=Li(Bt)),Dt&&Dt!=Bt&&(Dt=Li(Dt));var oi=[Bt];if(!Vt){var Ti=de.text.length-2,vi;if(Ti>0&&Bt)for(var Bi=0;Bi<Bt.length;++Bi)Bt[Bi].to==null&&(vi||(vi=[])).push(new gi(Bt[Bi].marker,null,null));for(var fo=0;fo<Ti;++fo)oi.push(vi);oi.push(Dt)}return oi}function Li(oe){for(var de=0;de<oe.length;++de){var Me=oe[de];Me.from!=null&&Me.from==Me.to&&Me.marker.clearWhenEmpty!==!1&&oe.splice(de--,1)}return oe.length?oe:null}function _i(oe,de,Me){var Te=null;if(oe.iter(de.line,Me.line+1,function(Bn){if(Bn.markedSpans)for(var fr=0;fr<Bn.markedSpans.length;++fr){var wr=Bn.markedSpans[fr].marker;wr.readOnly&&(!Te||xt(Te,wr)==-1)&&(Te||(Te=[])).push(wr)}}),!Te)return null;for(var Be=[{from:de,to:Me}],at=0;at<Te.length;++at)for(var Pt=Te[at],Bt=Pt.find(0),Dt=0;Dt<Be.length;++Dt){var Vt=Be[Dt];if(!(Mn(Vt.to,Bt.from)<0||Mn(Vt.from,Bt.to)>0)){var yn=[Dt,1],Jt=Mn(Vt.from,Bt.from),Hn=Mn(Vt.to,Bt.to);(Jt<0||!Pt.inclusiveLeft&&!Jt)&&yn.push({from:Vt.from,to:Bt.from}),(Hn>0||!Pt.inclusiveRight&&!Hn)&&yn.push({from:Bt.to,to:Vt.to}),Be.splice.apply(Be,yn),Dt+=yn.length-3}}return Be}function ur(oe){var de=oe.markedSpans;if(de){for(var Me=0;Me<de.length;++Me)de[Me].marker.detachLine(oe);oe.markedSpans=null}}function It(oe,de){if(de){for(var Me=0;Me<de.length;++Me)de[Me].marker.attachLine(oe);oe.markedSpans=de}}function Ei(oe){return oe.inclusiveLeft?-1:0}function Kr(oe){return oe.inclusiveRight?1:0}function Nr(oe,de){var Me=oe.lines.length-de.lines.length;if(Me!=0)return Me;var Te=oe.find(),Be=de.find(),at=Mn(Te.from,Be.from)||Ei(oe)-Ei(de);if(at)return-at;var Pt=Mn(Te.to,Be.to)||Kr(oe)-Kr(de);return Pt||de.id-oe.id}function Wi(oe,de){var Me=Ln&&oe.markedSpans,Te;if(Me)for(var Be=void 0,at=0;at<Me.length;++at)Be=Me[at],Be.marker.collapsed&&(de?Be.from:Be.to)==null&&(!Te||Nr(Te,Be.marker)<0)&&(Te=Be.marker);return Te}function Ur(oe){return Wi(oe,!0)}function jr(oe){return Wi(oe,!1)}function wi(oe,de){var Me=Ln&&oe.markedSpans,Te;if(Me)for(var Be=0;Be<Me.length;++Be){var at=Me[Be];at.marker.collapsed&&(at.from==null||at.from<de)&&(at.to==null||at.to>de)&&(!Te||Nr(Te,at.marker)<0)&&(Te=at.marker)}return Te}function Vi(oe,de,Me,Te,Be){var at=Cn(oe,de),Pt=Ln&&at.markedSpans;if(Pt)for(var Bt=0;Bt<Pt.length;++Bt){var Dt=Pt[Bt];if(Dt.marker.collapsed){var Vt=Dt.marker.find(0),yn=Mn(Vt.from,Me)||Ei(Dt.marker)-Ei(Be),Jt=Mn(Vt.to,Te)||Kr(Dt.marker)-Kr(Be);if(!(yn>=0&&Jt<=0||yn<=0&&Jt>=0)&&(yn<=0&&(Dt.marker.inclusiveRight&&Be.inclusiveLeft?Mn(Vt.to,Me)>=0:Mn(Vt.to,Me)>0)||yn>=0&&(Dt.marker.inclusiveRight&&Be.inclusiveLeft?Mn(Vt.from,Te)<=0:Mn(Vt.from,Te)<0)))return!0}}}function bi(oe){for(var de;de=Ur(oe);)oe=de.find(-1,!0).line;return oe}function vo(oe){for(var de;de=jr(oe);)oe=de.find(1,!0).line;return oe}function Ar(oe){for(var de,Me;de=jr(oe);)oe=de.find(1,!0).line,(Me||(Me=[])).push(oe);return Me}function Dr(oe,de){var Me=Cn(oe,de),Te=bi(Me);return Me==Te?de:Yt(Te)}function zr(oe,de){if(de>oe.lastLine())return de;var Me=Cn(oe,de),Te;if(!Zn(oe,Me))return de;for(;Te=jr(Me);)Me=Te.find(1,!0).line;return Yt(Me)+1}function Zn(oe,de){var Me=Ln&&de.markedSpans;if(Me){for(var Te=void 0,Be=0;Be<Me.length;++Be)if(Te=Me[Be],!!Te.marker.collapsed){if(Te.from==null)return!0;if(!Te.marker.widgetNode&&Te.from==0&&Te.marker.inclusiveLeft&&to(oe,de,Te))return!0}}}function to(oe,de,Me){if(Me.to==null){var Te=Me.marker.find(1,!0);return to(oe,Te.line,xo(Te.line.markedSpans,Me.marker))}if(Me.marker.inclusiveRight&&Me.to==de.text.length)return!0;for(var Be=void 0,at=0;at<de.markedSpans.length;++at)if(Be=de.markedSpans[at],Be.marker.collapsed&&!Be.marker.widgetNode&&Be.from==Me.to&&(Be.to==null||Be.to!=Me.from)&&(Be.marker.inclusiveLeft||Me.marker.inclusiveRight)&&to(oe,de,Be))return!0}function yo(oe){oe=bi(oe);for(var de=0,Me=oe.parent,Te=0;Te<Me.lines.length;++Te){var Be=Me.lines[Te];if(Be==oe)break;de+=Be.height}for(var at=Me.parent;at;Me=at,at=Me.parent)for(var Pt=0;Pt<at.children.length;++Pt){var Bt=at.children[Pt];if(Bt==Me)break;de+=Bt.height}return de}function ta(oe){if(oe.height==0)return 0;for(var de=oe.text.length,Me,Te=oe;Me=Ur(Te);){var Be=Me.find(0,!0);Te=Be.from.line,de+=Be.from.ch-Be.to.ch}for(Te=oe;Me=jr(Te);){var at=Me.find(0,!0);de-=Te.text.length-at.from.ch,Te=at.to.line,de+=Te.text.length-at.to.ch}return de}function wo(oe){var de=oe.display,Me=oe.doc;de.maxLine=Cn(Me,Me.first),de.maxLineLength=ta(de.maxLine),de.maxLineChanged=!0,Me.iter(function(Te){var Be=ta(Te);Be>de.maxLineLength&&(de.maxLineLength=Be,de.maxLine=Te)})}var Zo=function(oe,de,Me){this.text=oe,It(this,de),this.height=Me?Me(this):1};Zo.prototype.lineNo=function(){return Yt(this)},vn(Zo);function ua(oe,de,Me,Te){oe.text=de,oe.stateAfter&&(oe.stateAfter=null),oe.styles&&(oe.styles=null),oe.order!=null&&(oe.order=null),ur(oe),It(oe,Me);var Be=Te?Te(oe):1;Be!=oe.height&&Pn(oe,Be)}function Pa(oe){oe.parent=null,ur(oe)}var Da={},Ss={};function es(oe,de){if(!oe||/^\s*$/.test(oe))return null;var Me=de.addModeClass?Ss:Da;return Me[oe]||(Me[oe]=oe.replace(/\S+/g,"cm-$&"))}function wn(oe,de){var Me=Fe("span",null,null,ce?"padding-right: .1px":null),Te={pre:Fe("pre",[Me],"CodeMirror-line"),content:Me,col:0,pos:0,cm:oe,trailingSpace:!1,splitSpaces:oe.getOption("lineWrapping")};de.measure={};for(var Be=0;Be<=(de.rest?de.rest.length:0);Be++){var at=Be?de.rest[Be-1]:de.line,Pt=void 0;Te.pos=0,Te.addToken=_s,xi(oe.display.measure)&&(Pt=dt(at,oe.doc.direction))&&(Te.addToken=Ji(Te.addToken,Pt)),Te.map=[];var Bt=de!=oe.display.externalMeasured&&Yt(at);ga(at,Te,qr(oe,at,Bt)),at.styleClasses&&(at.styleClasses.bgClass&&(Te.bgClass=st(at.styleClasses.bgClass,Te.bgClass||"")),at.styleClasses.textClass&&(Te.textClass=st(at.styleClasses.textClass,Te.textClass||""))),Te.map.length==0&&Te.map.push(0,0,Te.content.appendChild(li(oe.display.measure))),Be==0?(de.measure.map=Te.map,de.measure.cache={}):((de.measure.maps||(de.measure.maps=[])).push(Te.map),(de.measure.caches||(de.measure.caches=[])).push({}))}if(ce){var Dt=Te.content.lastChild;(/\bcm-tab\b/.test(Dt.className)||Dt.querySelector&&Dt.querySelector(".cm-tab"))&&(Te.content.className="cm-tab-wrap-hack")}return kt(oe,"renderLine",oe,de.line,Te.pre),Te.pre.className&&(Te.textClass=st(Te.pre.className,Te.textClass||"")),Te}function Fa(oe){var de=Oe("span","\u2022","cm-invalidchar");return de.title="\\u"+oe.charCodeAt(0).toString(16),de.setAttribute("aria-label",de.title),de}function _s(oe,de,Me,Te,Be,at,Pt){if(de){var Bt=oe.splitSpaces?Il(de,oe.trailingSpace):de,Dt=oe.cm.state.specialChars,Vt=!1,yn;if(!Dt.test(de))oe.col+=de.length,yn=document.createTextNode(Bt),oe.map.push(oe.pos,oe.pos+de.length,yn),je&&ve<9&&(Vt=!0),oe.pos+=de.length;else{yn=document.createDocumentFragment();for(var Jt=0;;){Dt.lastIndex=Jt;var Hn=Dt.exec(de),Bn=Hn?Hn.index-Jt:de.length-Jt;if(Bn){var fr=document.createTextNode(Bt.slice(Jt,Jt+Bn));je&&ve<9?yn.appendChild(Oe("span",[fr])):yn.appendChild(fr),oe.map.push(oe.pos,oe.pos+Bn,fr),oe.col+=Bn,oe.pos+=Bn}if(!Hn)break;Jt+=Bn+1;var wr=void 0;if(Hn[0]==" "){var _r=oe.cm.options.tabSize,oi=_r-oe.col%_r;wr=yn.appendChild(Oe("span",Kt(oi),"cm-tab")),wr.setAttribute("role","presentation"),wr.setAttribute("cm-text"," "),oe.col+=oi}else Hn[0]=="\r"||Hn[0]==`
`?(wr=yn.appendChild(Oe("span",Hn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),wr.setAttribute("cm-text",Hn[0]),oe.col+=1):(wr=oe.cm.options.specialCharPlaceholder(Hn[0]),wr.setAttribute("cm-text",Hn[0]),je&&ve<9?yn.appendChild(Oe("span",[wr])):yn.appendChild(wr),oe.col+=1);oe.map.push(oe.pos,oe.pos+1,wr),oe.pos++}}if(oe.trailingSpace=Bt.charCodeAt(de.length-1)==32,Me||Te||Be||Vt||at||Pt){var Ti=Me||"";Te&&(Ti+=Te),Be&&(Ti+=Be);var vi=Oe("span",[yn],Ti,at);if(Pt)for(var Bi in Pt)Pt.hasOwnProperty(Bi)&&Bi!="style"&&Bi!="class"&&vi.setAttribute(Bi,Pt[Bi]);return oe.content.appendChild(vi)}oe.content.appendChild(yn)}}function Il(oe,de){if(oe.length>1&&!/ /.test(oe))return oe;for(var Me=de,Te="",Be=0;Be<oe.length;Be++){var at=oe.charAt(Be);at==" "&&Me&&(Be==oe.length-1||oe.charCodeAt(Be+1)==32)&&(at="\xA0"),Te+=at,Me=at==" "}return Te}function Ji(oe,de){return function(Me,Te,Be,at,Pt,Bt,Dt){Be=Be?Be+" cm-force-border":"cm-force-border";for(var Vt=Me.pos,yn=Vt+Te.length;;){for(var Jt=void 0,Hn=0;Hn<de.length&&(Jt=de[Hn],!(Jt.to>Vt&&Jt.from<=Vt));Hn++);if(Jt.to>=yn)return oe(Me,Te,Be,at,Pt,Bt,Dt);oe(Me,Te.slice(0,Jt.to-Vt),Be,at,null,Bt,Dt),at=null,Te=Te.slice(Jt.to-Vt),Vt=Jt.to}}}function jo(oe,de,Me,Te){var Be=!Te&&Me.widgetNode;Be&&oe.map.push(oe.pos,oe.pos+de,Be),!Te&&oe.cm.display.input.needsContentAttribute&&(Be||(Be=oe.content.appendChild(document.createElement("span"))),Be.setAttribute("cm-marker",Me.id)),Be&&(oe.cm.display.input.setUneditable(Be),oe.content.appendChild(Be)),oe.pos+=de,oe.trailingSpace=!1}function ga(oe,de,Me){var Te=oe.markedSpans,Be=oe.text,at=0;if(!Te){for(var Pt=1;Pt<Me.length;Pt+=2)de.addToken(de,Be.slice(at,at=Me[Pt]),es(Me[Pt+1],de.cm.options));return}for(var Bt=Be.length,Dt=0,Vt=1,yn="",Jt,Hn,Bn=0,fr,wr,_r,oi,Ti;;){if(Bn==Dt){fr=wr=_r=Hn="",Ti=null,oi=null,Bn=1/0;for(var vi=[],Bi=void 0,fo=0;fo<Te.length;++fo){var pi=Te[fo],ko=pi.marker;if(ko.type=="bookmark"&&pi.from==Dt&&ko.widgetNode)vi.push(ko);else if(pi.from<=Dt&&(pi.to==null||pi.to>Dt||ko.collapsed&&pi.to==Dt&&pi.from==Dt)){if(pi.to!=null&&pi.to!=Dt&&Bn>pi.to&&(Bn=pi.to,wr=""),ko.className&&(fr+=" "+ko.className),ko.css&&(Hn=(Hn?Hn+";":"")+ko.css),ko.startStyle&&pi.from==Dt&&(_r+=" "+ko.startStyle),ko.endStyle&&pi.to==Bn&&(Bi||(Bi=[])).push(ko.endStyle,pi.to),ko.title&&((Ti||(Ti={})).title=ko.title),ko.attributes)for(var Ja in ko.attributes)(Ti||(Ti={}))[Ja]=ko.attributes[Ja];ko.collapsed&&(!oi||Nr(oi.marker,ko)<0)&&(oi=pi)}else pi.from>Dt&&Bn>pi.from&&(Bn=pi.from)}if(Bi)for(var Ds=0;Ds<Bi.length;Ds+=2)Bi[Ds+1]==Bn&&(wr+=" "+Bi[Ds]);if(!oi||oi.from==Dt)for(var os=0;os<vi.length;++os)jo(de,0,vi[os]);if(oi&&(oi.from||0)==Dt){if(jo(de,(oi.to==null?Bt+1:oi.to)-Dt,oi.marker,oi.from==null),oi.to==null)return;oi.to==Dt&&(oi=!1)}}if(Dt>=Bt)break;for(var Vl=Math.min(Bt,Bn);;){if(yn){var vl=Dt+yn.length;if(!oi){var ks=vl>Vl?yn.slice(0,Vl-Dt):yn;de.addToken(de,ks,Jt?Jt+fr:fr,_r,Dt+ks.length==Bn?wr:"",Hn,Ti)}if(vl>=Vl){yn=yn.slice(Vl-Dt),Dt=Vl;break}Dt=vl,_r=""}yn=Be.slice(at,at=Me[Vt++]),Jt=es(Me[Vt++],de.cm.options)}}}function Oo(oe,de,Me){this.line=de,this.rest=Ar(de),this.size=this.rest?Yt(Ct(this.rest))-Me+1:1,this.node=this.text=null,this.hidden=Zn(oe,de)}function no(oe,de,Me){for(var Te=[],Be,at=de;at<Me;at=Be){var Pt=new Oo(oe.doc,Cn(oe.doc,at),at);Be=at+Pt.size,Te.push(Pt)}return Te}var Mo=null;function Wa(oe){Mo?Mo.ops.push(oe):oe.ownsGroup=Mo={ops:[oe],delayedCallbacks:[]}}function ki(oe){var de=oe.delayedCallbacks,Me=0;do{for(;Me<de.length;Me++)de[Me].call(null);for(var Te=0;Te<oe.ops.length;Te++){var Be=oe.ops[Te];if(Be.cursorActivityHandlers)for(;Be.cursorActivityCalled<Be.cursorActivityHandlers.length;)Be.cursorActivityHandlers[Be.cursorActivityCalled++].call(null,Be.cm)}}while(Me<de.length)}function ao(oe,de){var Me=oe.ownsGroup;if(Me)try{ki(Me)}finally{Mo=null,de(Me)}}var io=null;function kr(oe,de){var Me=_t(oe,de);if(Me.length){var Te=Array.prototype.slice.call(arguments,2),Be;Mo?Be=Mo.delayedCallbacks:io?Be=io:(Be=io=[],setTimeout(Ba,0));for(var at=function(Bt){Be.push(function(){return Me[Bt].apply(null,Te)})},Pt=0;Pt<Me.length;++Pt)at(Pt)}}function Ba(){var oe=io;io=null;for(var de=0;de<oe.length;++de)oe[de]()}function Ra(oe,de,Me,Te){for(var Be=0;Be<de.changes.length;Be++){var at=de.changes[Be];at=="text"?yr(oe,de):at=="gutter"?Ka(oe,de,Me,Te):at=="class"?oa(oe,de):at=="widget"&&Pl(oe,de,Te)}de.changes=null}function Cs(oe){return oe.node==oe.text&&(oe.node=Oe("div",null,null,"position: relative"),oe.text.parentNode&&oe.text.parentNode.replaceChild(oe.node,oe.text),oe.node.appendChild(oe.text),je&&ve<8&&(oe.node.style.zIndex=2)),oe.node}function Dl(oe,de){var Me=de.bgClass?de.bgClass+" "+(de.line.bgClass||""):de.line.bgClass;if(Me&&(Me+=" CodeMirror-linebackground"),de.background)Me?de.background.className=Me:(de.background.parentNode.removeChild(de.background),de.background=null);else if(Me){var Te=Cs(de);de.background=Te.insertBefore(Oe("div",null,Me),Te.firstChild),oe.display.input.setUneditable(de.background)}}function ql(oe,de){var Me=oe.display.externalMeasured;return Me&&Me.line==de.line?(oe.display.externalMeasured=null,de.measure=Me.measure,Me.built):wn(oe,de)}function yr(oe,de){var Me=de.text.className,Te=ql(oe,de);de.text==de.node&&(de.node=Te.pre),de.text.parentNode.replaceChild(Te.pre,de.text),de.text=Te.pre,Te.bgClass!=de.bgClass||Te.textClass!=de.textClass?(de.bgClass=Te.bgClass,de.textClass=Te.textClass,oa(oe,de)):Me&&(de.text.className=Me)}function oa(oe,de){Dl(oe,de),de.line.wrapClass?Cs(de).className=de.line.wrapClass:de.node!=de.text&&(de.node.className="");var Me=de.textClass?de.textClass+" "+(de.line.textClass||""):de.line.textClass;de.text.className=Me||""}function Ka(oe,de,Me,Te){if(de.gutter&&(de.node.removeChild(de.gutter),de.gutter=null),de.gutterBackground&&(de.node.removeChild(de.gutterBackground),de.gutterBackground=null),de.line.gutterClass){var Be=Cs(de);de.gutterBackground=Oe("div",null,"CodeMirror-gutter-background "+de.line.gutterClass,"left: "+(oe.options.fixedGutter?Te.fixedPos:-Te.gutterTotalWidth)+"px; width: "+Te.gutterTotalWidth+"px"),oe.display.input.setUneditable(de.gutterBackground),Be.insertBefore(de.gutterBackground,de.text)}var at=de.line.gutterMarkers;if(oe.options.lineNumbers||at){var Pt=Cs(de),Bt=de.gutter=Oe("div",null,"CodeMirror-gutter-wrapper","left: "+(oe.options.fixedGutter?Te.fixedPos:-Te.gutterTotalWidth)+"px");if(oe.display.input.setUneditable(Bt),Pt.insertBefore(Bt,de.text),de.line.gutterClass&&(Bt.className+=" "+de.line.gutterClass),oe.options.lineNumbers&&(!at||!at["CodeMirror-linenumbers"])&&(de.lineNumber=Bt.appendChild(Oe("div",or(oe.options,Me),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+Te.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+oe.display.lineNumInnerWidth+"px"))),at)for(var Dt=0;Dt<oe.display.gutterSpecs.length;++Dt){var Vt=oe.display.gutterSpecs[Dt].className,yn=at.hasOwnProperty(Vt)&&at[Vt];yn&&Bt.appendChild(Oe("div",[yn],"CodeMirror-gutter-elt","left: "+Te.gutterLeft[Vt]+"px; width: "+Te.gutterWidth[Vt]+"px"))}}}function Pl(oe,de,Me){de.alignable&&(de.alignable=null);for(var Te=Pe("CodeMirror-linewidget"),Be=de.node.firstChild,at=void 0;Be;Be=at)at=Be.nextSibling,Te.test(Be.className)&&de.node.removeChild(Be);Bl(oe,de,Me)}function Fl(oe,de,Me,Te){var Be=ql(oe,de);return de.text=de.node=Be.pre,Be.bgClass&&(de.bgClass=Be.bgClass),Be.textClass&&(de.textClass=Be.textClass),oa(oe,de),Ka(oe,de,Me,Te),Bl(oe,de,Te),de.node}function Bl(oe,de,Me){if(Di(oe,de.line,de,Me,!0),de.rest)for(var Te=0;Te<de.rest.length;Te++)Di(oe,de.rest[Te],de,Me,!1)}function Di(oe,de,Me,Te,Be){if(de.widgets)for(var at=Cs(Me),Pt=0,Bt=de.widgets;Pt<Bt.length;++Pt){var Dt=Bt[Pt],Vt=Oe("div",[Dt.node],"CodeMirror-linewidget"+(Dt.className?" "+Dt.className:""));Dt.handleMouseEvents||Vt.setAttribute("cm-ignore-events","true"),mc(Dt,Vt,Me,Te),oe.display.input.setUneditable(Vt),Be&&Dt.above?at.insertBefore(Vt,Me.gutter||Me.text):at.appendChild(Vt),kr(Dt,"redraw")}}function mc(oe,de,Me,Te){if(oe.noHScroll){(Me.alignable||(Me.alignable=[])).push(de);var Be=Te.wrapperWidth;de.style.left=Te.fixedPos+"px",oe.coverGutter||(Be-=Te.gutterTotalWidth,de.style.paddingLeft=Te.gutterTotalWidth+"px"),de.style.width=Be+"px"}oe.coverGutter&&(de.style.zIndex=5,de.style.position="relative",oe.noHScroll||(de.style.marginLeft=-Te.gutterTotalWidth+"px"))}function tl(oe){if(oe.height!=null)return oe.height;var de=oe.doc.cm;if(!de)return 0;if(!Ye(document.body,oe.node)){var Me="position: relative;";oe.coverGutter&&(Me+="margin-left: -"+de.display.gutters.offsetWidth+"px;"),oe.noHScroll&&(Me+="width: "+de.display.wrapper.clientWidth+"px;"),Ae(de.display.measure,Oe("div",[oe.node],null,Me))}return oe.height=oe.node.parentNode.offsetHeight}function nl(oe,de){for(var Me=dr(de);Me!=oe.wrapper;Me=Me.parentNode)if(!Me||Me.nodeType==1&&Me.getAttribute("cm-ignore-events")=="true"||Me.parentNode==oe.sizer&&Me!=oe.mover)return!0}function As(oe){return oe.lineSpace.offsetTop}function Eu(oe){return oe.mover.offsetHeight-oe.lineSpace.offsetHeight}function Ru(oe){if(oe.cachedPaddingH)return oe.cachedPaddingH;var de=Ae(oe.measure,Oe("pre","x","CodeMirror-line-like")),Me=window.getComputedStyle?window.getComputedStyle(de):de.currentStyle,Te={left:parseInt(Me.paddingLeft),right:parseInt(Me.paddingRight)};return!isNaN(Te.left)&&!isNaN(Te.right)&&(oe.cachedPaddingH=Te),Te}function zs(oe){return Et-oe.display.nativeBarWidth}function dl(oe){return oe.display.scroller.clientWidth-zs(oe)-oe.display.barWidth}function $c(oe){return oe.display.scroller.clientHeight-zs(oe)-oe.display.barHeight}function hh(oe,de,Me){var Te=oe.options.lineWrapping,Be=Te&&dl(oe);if(!de.measure.heights||Te&&de.measure.width!=Be){var at=de.measure.heights=[];if(Te){de.measure.width=Be;for(var Pt=de.text.firstChild.getClientRects(),Bt=0;Bt<Pt.length-1;Bt++){var Dt=Pt[Bt],Vt=Pt[Bt+1];Math.abs(Dt.bottom-Vt.bottom)>2&&at.push((Dt.bottom+Vt.top)/2-Me.top)}}at.push(Me.bottom-Me.top)}}function Gc(oe,de,Me){if(oe.line==de)return{map:oe.measure.map,cache:oe.measure.cache};for(var Te=0;Te<oe.rest.length;Te++)if(oe.rest[Te]==de)return{map:oe.measure.maps[Te],cache:oe.measure.caches[Te]};for(var Be=0;Be<oe.rest.length;Be++)if(Yt(oe.rest[Be])>Me)return{map:oe.measure.maps[Be],cache:oe.measure.caches[Be],before:!0}}function Hh(oe,de){de=bi(de);var Me=Yt(de),Te=oe.display.externalMeasured=new Oo(oe.doc,de,Me);Te.lineN=Me;var Be=Te.built=wn(oe,Te);return Te.text=Be.pre,Ae(oe.display.lineMeasure,Be.pre),Te}function Hc(oe,de,Me,Te){return Rl(oe,_u(oe,de),Me,Te)}function vc(oe,de){if(de>=oe.display.viewFrom&&de<oe.display.viewTo)return oe.display.view[$s(oe,de)];var Me=oe.display.externalMeasured;if(Me&&de>=Me.lineN&&de<Me.lineN+Me.size)return Me}function _u(oe,de){var Me=Yt(de),Te=vc(oe,Me);Te&&!Te.text?Te=null:Te&&Te.changes&&(Ra(oe,Te,Me,Cd(oe)),oe.curOp.forceUpdate=!0),Te||(Te=Hh(oe,de));var Be=Gc(Te,de,Me);return{line:de,view:Te,rect:null,map:Be.map,cache:Be.cache,before:Be.before,hasHeights:!1}}function Rl(oe,de,Me,Te,Be){de.before&&(Me=-1);var at=Me+(Te||""),Pt;return de.cache.hasOwnProperty(at)?Pt=de.cache[at]:(de.rect||(de.rect=de.view.text.getBoundingClientRect()),de.hasHeights||(hh(oe,de.view,de.rect),de.hasHeights=!0),Pt=ro(oe,de,Me,Te),Pt.bogus||(de.cache[at]=Pt)),{left:Pt.left,right:Pt.right,top:Be?Pt.rtop:Pt.top,bottom:Be?Pt.rbottom:Pt.bottom}}var dh={left:0,right:0,top:0,bottom:0};function Uc(oe,de,Me){for(var Te,Be,at,Pt,Bt,Dt,Vt=0;Vt<oe.length;Vt+=3)if(Bt=oe[Vt],Dt=oe[Vt+1],de<Bt?(Be=0,at=1,Pt="left"):de<Dt?(Be=de-Bt,at=Be+1):(Vt==oe.length-3||de==Dt&&oe[Vt+3]>de)&&(at=Dt-Bt,Be=at-1,de>=Dt&&(Pt="right")),Be!=null){if(Te=oe[Vt+2],Bt==Dt&&Me==(Te.insertLeft?"left":"right")&&(Pt=Me),Me=="left"&&Be==0)for(;Vt&&oe[Vt-2]==oe[Vt-3]&&oe[Vt-1].insertLeft;)Te=oe[(Vt-=3)+2],Pt="left";if(Me=="right"&&Be==Dt-Bt)for(;Vt<oe.length-3&&oe[Vt+3]==oe[Vt+4]&&!oe[Vt+5].insertLeft;)Te=oe[(Vt+=3)+2],Pt="right";break}return{node:Te,start:Be,end:at,collapse:Pt,coverStart:Bt,coverEnd:Dt}}function yc(oe,de){var Me=dh;if(de=="left")for(var Te=0;Te<oe.length&&(Me=oe[Te]).left==Me.right;Te++);else for(var Be=oe.length-1;Be>=0&&(Me=oe[Be]).left==Me.right;Be--);return Me}function ro(oe,de,Me,Te){var Be=Uc(de.map,Me,Te),at=Be.node,Pt=Be.start,Bt=Be.end,Dt=Be.collapse,Vt;if(at.nodeType==3){for(var yn=0;yn<4;yn++){for(;Pt&&We(de.line.text.charAt(Be.coverStart+Pt));)--Pt;for(;Be.coverStart+Bt<Be.coverEnd&&We(de.line.text.charAt(Be.coverStart+Bt));)++Bt;if(je&&ve<9&&Pt==0&&Bt==Be.coverEnd-Be.coverStart?Vt=at.parentNode.getBoundingClientRect():Vt=yc(_e(at,Pt,Bt).getClientRects(),Te),Vt.left||Vt.right||Pt==0)break;Bt=Pt,Pt=Pt-1,Dt="right"}je&&ve<11&&(Vt=Io(oe.display.measure,Vt))}else{Pt>0&&(Dt=Te="right");var Jt;oe.options.lineWrapping&&(Jt=at.getClientRects()).length>1?Vt=Jt[Te=="right"?Jt.length-1:0]:Vt=at.getBoundingClientRect()}if(je&&ve<9&&!Pt&&(!Vt||!Vt.left&&!Vt.right)){var Hn=at.parentNode.getClientRects()[0];Hn?Vt={left:Hn.left,right:Hn.left+ic(oe.display),top:Hn.top,bottom:Hn.bottom}:Vt=dh}for(var Bn=Vt.top-de.rect.top,fr=Vt.bottom-de.rect.top,wr=(Bn+fr)/2,_r=de.view.measure.heights,oi=0;oi<_r.length-1&&!(wr<_r[oi]);oi++);var Ti=oi?_r[oi-1]:0,vi=_r[oi],Bi={left:(Dt=="right"?Vt.right:Vt.left)-de.rect.left,right:(Dt=="left"?Vt.left:Vt.right)-de.rect.left,top:Ti,bottom:vi};return!Vt.left&&!Vt.right&&(Bi.bogus=!0),oe.options.singleCursorHeightPerLine||(Bi.rtop=Bn,Bi.rbottom=fr),Bi}function Io(oe,de){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ri(oe))return de;var Me=screen.logicalXDPI/screen.deviceXDPI,Te=screen.logicalYDPI/screen.deviceYDPI;return{left:de.left*Me,right:de.right*Me,top:de.top*Te,bottom:de.bottom*Te}}function Es(oe){if(oe.measure&&(oe.measure.cache={},oe.measure.heights=null,oe.rest))for(var de=0;de<oe.rest.length;de++)oe.measure.caches[de]={}}function Ya(oe){oe.display.externalMeasure=null,ke(oe.display.lineMeasure);for(var de=0;de<oe.display.view.length;de++)Es(oe.display.view[de])}function _a(oe){Ya(oe),oe.display.cachedCharWidth=oe.display.cachedTextHeight=oe.display.cachedPaddingH=null,oe.options.lineWrapping||(oe.display.maxLineChanged=!0),oe.display.lineNumChars=null}function ca(){return Ce&&z?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Ca(){return Ce&&z?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Va(oe){var de=0;if(oe.widgets)for(var Me=0;Me<oe.widgets.length;++Me)oe.widgets[Me].above&&(de+=tl(oe.widgets[Me]));return de}function za(oe,de,Me,Te,Be){if(!Be){var at=Va(de);Me.top+=at,Me.bottom+=at}if(Te=="line")return Me;Te||(Te="local");var Pt=yo(de);if(Te=="local"?Pt+=As(oe.display):Pt-=oe.display.viewOffset,Te=="page"||Te=="window"){var Bt=oe.display.lineSpace.getBoundingClientRect();Pt+=Bt.top+(Te=="window"?0:Ca());var Dt=Bt.left+(Te=="window"?0:ca());Me.left+=Dt,Me.right+=Dt}return Me.top+=Pt,Me.bottom+=Pt,Me}function zu(oe,de,Me){if(Me=="div")return de;var Te=de.left,Be=de.top;if(Me=="page")Te-=ca(),Be-=Ca();else if(Me=="local"||!Me){var at=oe.display.sizer.getBoundingClientRect();Te+=at.left,Be+=at.top}var Pt=oe.display.lineSpace.getBoundingClientRect();return{left:Te-Pt.left,top:Be-Pt.top}}function _l(oe,de,Me,Te,Be){return Te||(Te=Cn(oe.doc,de.line)),za(oe,Te,Hc(oe,Te,de.ch,Be),Me)}function Ma(oe,de,Me,Te,Be,at){Te=Te||Cn(oe.doc,de.line),Be||(Be=_u(oe,Te));function Pt(fr,wr){var _r=Rl(oe,Be,fr,wr?"right":"left",at);return wr?_r.left=_r.right:_r.right=_r.left,za(oe,Te,_r,Me)}var Bt=dt(Te,oe.doc.direction),Dt=de.ch,Vt=de.sticky;if(Dt>=Te.text.length?(Dt=Te.text.length,Vt="before"):Dt<=0&&(Dt=0,Vt="after"),!Bt)return Pt(Vt=="before"?Dt-1:Dt,Vt=="before");function yn(fr,wr,_r){var oi=Bt[wr],Ti=oi.level==1;return Pt(_r?fr-1:fr,Ti!=_r)}var Jt=Le(Bt,Dt,Vt),Hn=De,Bn=yn(Dt,Jt,Vt=="before");return Hn!=null&&(Bn.other=yn(Dt,Hn,Vt!="before")),Bn}function wd(oe,de){var Me=0;de=Dn(oe.doc,de),oe.options.lineWrapping||(Me=ic(oe.display)*de.ch);var Te=Cn(oe.doc,de.line),Be=yo(Te)+As(oe.display);return{left:Me,right:Me,top:Be,bottom:Be+Te.height}}function bd(oe,de,Me,Te,Be){var at=rn(oe,de,Me);return at.xRel=Be,Te&&(at.outside=Te),at}function Wc(oe,de,Me){var Te=oe.doc;if(Me+=oe.display.viewOffset,Me<0)return bd(Te.first,0,null,-1,-1);var Be=zn(Te,Me),at=Te.first+Te.size-1;if(Be>at)return bd(Te.first+Te.size-1,Cn(Te,at).text.length,null,1,1);de<0&&(de=0);for(var Pt=Cn(Te,Be);;){var Bt=Jn(oe,Pt,Be,de,Me),Dt=wi(Pt,Bt.ch+(Bt.xRel>0||Bt.outside>0?1:0));if(!Dt)return Bt;var Vt=Dt.find(1);if(Vt.line==Be)return Vt;Pt=Cn(Te,Be=Vt.line)}}function fi(oe,de,Me,Te){Te-=Va(de);var Be=de.text.length,at=qe(function(Pt){return Rl(oe,Me,Pt-1).bottom<=Te},Be,0);return Be=qe(function(Pt){return Rl(oe,Me,Pt).top>Te},at,Be),{begin:at,end:Be}}function fh(oe,de,Me,Te){Me||(Me=_u(oe,de));var Be=za(oe,de,Rl(oe,Me,Te),"line").top;return fi(oe,de,Me,Be)}function qt(oe,de,Me,Te){return oe.bottom<=Me?!1:oe.top>Me?!0:(Te?oe.left:oe.right)>de}function Jn(oe,de,Me,Te,Be){Be-=yo(de);var at=_u(oe,de),Pt=Va(de),Bt=0,Dt=de.text.length,Vt=!0,yn=dt(de,oe.doc.direction);if(yn){var Jt=(oe.options.lineWrapping?af:Pd)(oe,de,Me,at,yn,Te,Be);Vt=Jt.level!=1,Bt=Vt?Jt.from:Jt.to-1,Dt=Vt?Jt.to:Jt.from-1}var Hn=null,Bn=null,fr=qe(function(fo){var pi=Rl(oe,at,fo);return pi.top+=Pt,pi.bottom+=Pt,qt(pi,Te,Be,!1)?(pi.top<=Be&&pi.left<=Te&&(Hn=fo,Bn=pi),!0):!1},Bt,Dt),wr,_r,oi=!1;if(Bn){var Ti=Te-Bn.left<Bn.right-Te,vi=Ti==Vt;fr=Hn+(vi?0:1),_r=vi?"after":"before",wr=Ti?Bn.left:Bn.right}else{!Vt&&(fr==Dt||fr==Bt)&&fr++,_r=fr==0?"after":fr==de.text.length?"before":Rl(oe,at,fr-(Vt?1:0)).bottom+Pt<=Be==Vt?"after":"before";var Bi=Ma(oe,rn(Me,fr,_r),"line",de,at);wr=Bi.left,oi=Be<Bi.top?-1:Be>=Bi.bottom?1:0}return fr=Ue(de.text,fr,1),bd(Me,fr,_r,oi,Te-wr)}function Pd(oe,de,Me,Te,Be,at,Pt){var Bt=qe(function(Jt){var Hn=Be[Jt],Bn=Hn.level!=1;return qt(Ma(oe,rn(Me,Bn?Hn.to:Hn.from,Bn?"before":"after"),"line",de,Te),at,Pt,!0)},0,Be.length-1),Dt=Be[Bt];if(Bt>0){var Vt=Dt.level!=1,yn=Ma(oe,rn(Me,Vt?Dt.from:Dt.to,Vt?"after":"before"),"line",de,Te);qt(yn,at,Pt,!0)&&yn.top>Pt&&(Dt=Be[Bt-1])}return Dt}function af(oe,de,Me,Te,Be,at,Pt){var Bt=fi(oe,de,Te,Pt),Dt=Bt.begin,Vt=Bt.end;/\s/.test(de.text.charAt(Vt-1))&&Vt--;for(var yn=null,Jt=null,Hn=0;Hn<Be.length;Hn++){var Bn=Be[Hn];if(!(Bn.from>=Vt||Bn.to<=Dt)){var fr=Bn.level!=1,wr=Rl(oe,Te,fr?Math.min(Vt,Bn.to)-1:Math.max(Dt,Bn.from)).right,_r=wr<at?at-wr+1e9:wr-at;(!yn||Jt>_r)&&(yn=Bn,Jt=_r)}}return yn||(yn=Be[Be.length-1]),yn.from<Dt&&(yn={from:Dt,to:yn.to,level:yn.level}),yn.to>Vt&&(yn={from:yn.from,to:Vt,level:yn.level}),yn}var $u;function Gu(oe){if(oe.cachedTextHeight!=null)return oe.cachedTextHeight;if($u==null){$u=Oe("pre",null,"CodeMirror-line-like");for(var de=0;de<49;++de)$u.appendChild(document.createTextNode("x")),$u.appendChild(Oe("br"));$u.appendChild(document.createTextNode("x"))}Ae(oe.measure,$u);var Me=$u.offsetHeight/50;return Me>3&&(oe.cachedTextHeight=Me),ke(oe.measure),Me||1}function ic(oe){if(oe.cachedCharWidth!=null)return oe.cachedCharWidth;var de=Oe("span","xxxxxxxxxx"),Me=Oe("pre",[de],"CodeMirror-line-like");Ae(oe.measure,Me);var Te=de.getBoundingClientRect(),Be=(Te.right-Te.left)/10;return Be>2&&(oe.cachedCharWidth=Be),Be||10}function Cd(oe){for(var de=oe.display,Me={},Te={},Be=de.gutters.clientLeft,at=de.gutters.firstChild,Pt=0;at;at=at.nextSibling,++Pt){var Bt=oe.display.gutterSpecs[Pt].className;Me[Bt]=at.offsetLeft+at.clientLeft+Be,Te[Bt]=at.clientWidth}return{fixedPos:ph(de),gutterTotalWidth:de.gutters.offsetWidth,gutterLeft:Me,gutterWidth:Te,wrapperWidth:de.wrapper.clientWidth}}function ph(oe){return oe.scroller.getBoundingClientRect().left-oe.sizer.getBoundingClientRect().left}function $a(oe){var de=Gu(oe.display),Me=oe.options.lineWrapping,Te=Me&&Math.max(5,oe.display.scroller.clientWidth/ic(oe.display)-3);return function(Be){if(Zn(oe.doc,Be))return 0;var at=0;if(Be.widgets)for(var Pt=0;Pt<Be.widgets.length;Pt++)Be.widgets[Pt].height&&(at+=Be.widgets[Pt].height);return Me?at+(Math.ceil(Be.text.length/Te)||1)*de:at+de}}function Gi(oe){var de=oe.doc,Me=$a(oe);de.iter(function(Te){var Be=Me(Te);Be!=Te.height&&Pn(Te,Be)})}function rl(oe,de,Me,Te){var Be=oe.display;if(!Me&&dr(de).getAttribute("cm-not-content")=="true")return null;var at,Pt,Bt=Be.lineSpace.getBoundingClientRect();try{at=de.clientX-Bt.left,Pt=de.clientY-Bt.top}catch(Jt){return null}var Dt=Wc(oe,at,Pt),Vt;if(Te&&Dt.xRel>0&&(Vt=Cn(oe.doc,Dt.line).text).length==Dt.ch){var yn=et(Vt,Vt.length,oe.options.tabSize)-Vt.length;Dt=rn(Dt.line,Math.max(0,Math.round((at-Ru(oe.display).left)/ic(oe.display))-yn))}return Dt}function $s(oe,de){if(de>=oe.display.viewTo||(de-=oe.display.viewFrom,de<0))return null;for(var Me=oe.display.view,Te=0;Te<Me.length;Te++)if(de-=Me[Te].size,de<0)return Te}function ma(oe,de,Me,Te){de==null&&(de=oe.doc.first),Me==null&&(Me=oe.doc.first+oe.doc.size),Te||(Te=0);var Be=oe.display;if(Te&&Me<Be.viewTo&&(Be.updateLineNumbers==null||Be.updateLineNumbers>de)&&(Be.updateLineNumbers=de),oe.curOp.viewChanged=!0,de>=Be.viewTo)Ln&&Dr(oe.doc,de)<Be.viewTo&&ss(oe);else if(Me<=Be.viewFrom)Ln&&zr(oe.doc,Me+Te)>Be.viewFrom?ss(oe):(Be.viewFrom+=Te,Be.viewTo+=Te);else if(de<=Be.viewFrom&&Me>=Be.viewTo)ss(oe);else if(de<=Be.viewFrom){var at=Cl(oe,Me,Me+Te,1);at?(Be.view=Be.view.slice(at.index),Be.viewFrom=at.lineN,Be.viewTo+=Te):ss(oe)}else if(Me>=Be.viewTo){var Pt=Cl(oe,de,de,-1);Pt?(Be.view=Be.view.slice(0,Pt.index),Be.viewTo=Pt.lineN):ss(oe)}else{var Bt=Cl(oe,de,de,-1),Dt=Cl(oe,Me,Me+Te,1);Bt&&Dt?(Be.view=Be.view.slice(0,Bt.index).concat(no(oe,Bt.lineN,Dt.lineN)).concat(Be.view.slice(Dt.index)),Be.viewTo+=Te):ss(oe)}var Vt=Be.externalMeasured;Vt&&(Me<Vt.lineN?Vt.lineN+=Te:de<Vt.lineN+Vt.size&&(Be.externalMeasured=null))}function Po(oe,de,Me){oe.curOp.viewChanged=!0;var Te=oe.display,Be=oe.display.externalMeasured;if(Be&&de>=Be.lineN&&de<Be.lineN+Be.size&&(Te.externalMeasured=null),!(de<Te.viewFrom||de>=Te.viewTo)){var at=Te.view[$s(oe,de)];if(at.node!=null){var Pt=at.changes||(at.changes=[]);xt(Pt,Me)==-1&&Pt.push(Me)}}}function ss(oe){oe.display.viewFrom=oe.display.viewTo=oe.doc.first,oe.display.view=[],oe.display.viewOffset=0}function Cl(oe,de,Me,Te){var Be=$s(oe,de),at,Pt=oe.display.view;if(!Ln||Me==oe.doc.first+oe.doc.size)return{index:Be,lineN:Me};for(var Bt=oe.display.viewFrom,Dt=0;Dt<Be;Dt++)Bt+=Pt[Dt].size;if(Bt!=de){if(Te>0){if(Be==Pt.length-1)return null;at=Bt+Pt[Be].size-de,Be++}else at=Bt-de;de+=at,Me+=at}for(;Dr(oe.doc,Me)!=Me;){if(Be==(Te<0?0:Pt.length-1))return null;Me+=Te*Pt[Be-(Te<0?1:0)].size,Be+=Te}return{index:Be,lineN:Me}}function ha(oe,de,Me){var Te=oe.display,Be=Te.view;Be.length==0||de>=Te.viewTo||Me<=Te.viewFrom?(Te.view=no(oe,de,Me),Te.viewFrom=de):(Te.viewFrom>de?Te.view=no(oe,de,Te.viewFrom).concat(Te.view):Te.viewFrom<de&&(Te.view=Te.view.slice($s(oe,de))),Te.viewFrom=de,Te.viewTo<Me?Te.view=Te.view.concat(no(oe,Te.viewTo,Me)):Te.viewTo>Me&&(Te.view=Te.view.slice(0,$s(oe,Me)))),Te.viewTo=Me}function zl(oe){for(var de=oe.display.view,Me=0,Te=0;Te<de.length;Te++){var Be=de[Te];!Be.hidden&&(!Be.node||Be.changes)&&++Me}return Me}function ws(oe){oe.display.input.showSelection(oe.display.input.prepareSelection())}function Kc(oe,de){de===void 0&&(de=!0);for(var Me=oe.doc,Te={},Be=Te.cursors=document.createDocumentFragment(),at=Te.selection=document.createDocumentFragment(),Pt=0;Pt<Me.sel.ranges.length;Pt++)if(!(!de&&Pt==Me.sel.primIndex)){var Bt=Me.sel.ranges[Pt];if(!(Bt.from().line>=oe.display.viewTo||Bt.to().line<oe.display.viewFrom)){var Dt=Bt.empty();(Dt||oe.options.showCursorWhenSelecting)&&_o(oe,Bt.head,Be),Dt||zo(oe,Bt,at)}}return Te}function _o(oe,de,Me){var Te=Ma(oe,de,"div",null,null,!oe.options.singleCursorHeightPerLine),Be=Me.appendChild(Oe("div","\xA0","CodeMirror-cursor"));if(Be.style.left=Te.left+"px",Be.style.top=Te.top+"px",Be.style.height=Math.max(0,Te.bottom-Te.top)*oe.options.cursorHeight+"px",Te.other){var at=Me.appendChild(Oe("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));at.style.display="",at.style.left=Te.other.left+"px",at.style.top=Te.other.top+"px",at.style.height=(Te.other.bottom-Te.other.top)*.85+"px"}}function il(oe,de){return oe.top-de.top||oe.left-de.left}function zo(oe,de,Me){var Te=oe.display,Be=oe.doc,at=document.createDocumentFragment(),Pt=Ru(oe.display),Bt=Pt.left,Dt=Math.max(Te.sizerWidth,dl(oe)-Te.sizer.offsetLeft)-Pt.right,Vt=Be.direction=="ltr";function yn(vi,Bi,fo,pi){Bi<0&&(Bi=0),Bi=Math.round(Bi),pi=Math.round(pi),at.appendChild(Oe("div",null,"CodeMirror-selected","position: absolute; left: "+vi+`px;
top: `+Bi+"px; width: "+(fo==null?Dt-vi:fo)+`px;
height: `+(pi-Bi)+"px"))}function Jt(vi,Bi,fo){var pi=Cn(Be,vi),ko=pi.text.length,Ja,Ds;function os(ks,ou){return _l(oe,rn(vi,ks),"div",pi,ou)}function Vl(ks,ou,al){var Os=fh(oe,pi,null,ks),ia=ou=="ltr"==(al=="after")?"left":"right",hs=al=="after"?Os.begin:Os.end-(/\s/.test(pi.text.charAt(Os.end-1))?2:1);return os(hs,ia)[ia]}var vl=dt(pi,Be.direction);return He(vl,Bi||0,fo==null?ko:fo,function(ks,ou,al,Os){var ia=al=="ltr",hs=os(ks,ia?"left":"right"),Hs=os(ou-1,ia?"right":"left"),sl=Bi==null&&ks==0,Zu=fo==null&&ou==ko,as=Os==0,ku=!vl||Os==vl.length-1;if(Hs.top-hs.top<=3){var ys=(Vt?sl:Zu)&&as,xf=(Vt?Zu:sl)&&ku,vu=ys?Bt:(ia?hs:Hs).left,au=xf?Dt:(ia?Hs:hs).right;yn(vu,hs.top,au-vu,hs.bottom)}else{var Zl,Aa,Us,Mc;ia?(Zl=Vt&&sl&&as?Bt:hs.left,Aa=Vt?Dt:Vl(ks,al,"before"),Us=Vt?Bt:Vl(ou,al,"after"),Mc=Vt&&Zu&&ku?Dt:Hs.right):(Zl=Vt?Vl(ks,al,"before"):Bt,Aa=!Vt&&sl&&as?Dt:hs.right,Us=!Vt&&Zu&&ku?Bt:Hs.left,Mc=Vt?Vl(ou,al,"after"):Dt),yn(Zl,hs.top,Aa-Zl,hs.bottom),hs.bottom<Hs.top&&yn(Bt,hs.bottom,null,Hs.top),yn(Us,Hs.top,Mc-Us,Hs.bottom)}(!Ja||il(hs,Ja)<0)&&(Ja=hs),il(Hs,Ja)<0&&(Ja=Hs),(!Ds||il(hs,Ds)<0)&&(Ds=hs),il(Hs,Ds)<0&&(Ds=Hs)}),{start:Ja,end:Ds}}var Hn=de.from(),Bn=de.to();if(Hn.line==Bn.line)Jt(Hn.line,Hn.ch,Bn.ch);else{var fr=Cn(Be,Hn.line),wr=Cn(Be,Bn.line),_r=bi(fr)==bi(wr),oi=Jt(Hn.line,Hn.ch,_r?fr.text.length+1:null).end,Ti=Jt(Bn.line,_r?0:null,Bn.ch).start;_r&&(oi.top<Ti.top-2?(yn(oi.right,oi.top,null,oi.bottom),yn(Bt,Ti.top,Ti.left,Ti.bottom)):yn(oi.right,oi.top,Ti.left-oi.right,oi.bottom)),oi.bottom<Ti.top&&yn(Bt,oi.bottom,null,Ti.top)}Me.appendChild(at)}function sa(oe){if(oe.state.focused){var de=oe.display;clearInterval(de.blinker);var Me=!0;de.cursorDiv.style.visibility="",oe.options.cursorBlinkRate>0?de.blinker=setInterval(function(){oe.hasFocus()||Vc(oe),de.cursorDiv.style.visibility=(Me=!Me)?"":"hidden"},oe.options.cursorBlinkRate):oe.options.cursorBlinkRate<0&&(de.cursorDiv.style.visibility="hidden")}}function La(oe){oe.state.focused||(oe.display.input.focus(),Uo(oe))}function Za(oe){oe.state.delayingBlurEvent=!0,setTimeout(function(){oe.state.delayingBlurEvent&&(oe.state.delayingBlurEvent=!1,Vc(oe))},100)}function Uo(oe,de){oe.state.delayingBlurEvent&&(oe.state.delayingBlurEvent=!1),oe.options.readOnly!="nocursor"&&(oe.state.focused||(kt(oe,"focus",oe,de),oe.state.focused=!0,Xe(oe.display.wrapper,"CodeMirror-focused"),!oe.curOp&&oe.display.selForContextMenu!=oe.doc.sel&&(oe.display.input.reset(),ce&&setTimeout(function(){return oe.display.input.reset(!0)},20)),oe.display.input.receivedFocus()),sa(oe))}function Vc(oe,de){oe.state.delayingBlurEvent||(oe.state.focused&&(kt(oe,"blur",oe,de),oe.state.focused=!1,Ie(oe.display.wrapper,"CodeMirror-focused")),clearInterval(oe.display.blinker),setTimeout(function(){oe.state.focused||(oe.display.shift=!1)},150))}function zi(oe){for(var de=oe.display,Me=de.lineDiv.offsetTop,Te=0;Te<de.view.length;Te++){var Be=de.view[Te],at=oe.options.lineWrapping,Pt=void 0,Bt=0;if(!Be.hidden){if(je&&ve<8){var Dt=Be.node.offsetTop+Be.node.offsetHeight;Pt=Dt-Me,Me=Dt}else{var Vt=Be.node.getBoundingClientRect();Pt=Vt.bottom-Vt.top,!at&&Be.text.firstChild&&(Bt=Be.text.firstChild.getBoundingClientRect().right-Vt.left-1)}var yn=Be.line.height-Pt;if((yn>.005||yn<-.005)&&(Pn(Be.line,Pt),Hf(Be.line),Be.rest))for(var Jt=0;Jt<Be.rest.length;Jt++)Hf(Be.rest[Jt]);if(Bt>oe.display.sizerWidth){var Hn=Math.ceil(Bt/ic(oe.display));Hn>oe.display.maxLineLength&&(oe.display.maxLineLength=Hn,oe.display.maxLine=Be.line,oe.display.maxLineChanged=!0)}}}}function Hf(oe){if(oe.widgets)for(var de=0;de<oe.widgets.length;++de){var Me=oe.widgets[de],Te=Me.node.parentNode;Te&&(Me.height=Te.offsetHeight)}}function Do(oe,de,Me){var Te=Me&&Me.top!=null?Math.max(0,Me.top):oe.scroller.scrollTop;Te=Math.floor(Te-As(oe));var Be=Me&&Me.bottom!=null?Me.bottom:Te+oe.wrapper.clientHeight,at=zn(de,Te),Pt=zn(de,Be);if(Me&&Me.ensure){var Bt=Me.ensure.from.line,Dt=Me.ensure.to.line;Bt<at?(at=Bt,Pt=zn(de,yo(Cn(de,Bt))+oe.wrapper.clientHeight)):Math.min(Dt,de.lastLine())>=Pt&&(at=zn(de,yo(Cn(de,Dt))-oe.wrapper.clientHeight),Pt=Dt)}return{from:at,to:Math.max(Pt,at+1)}}function Uf(oe,de){if(!Nt(oe,"scrollCursorIntoView")){var Me=oe.display,Te=Me.sizer.getBoundingClientRect(),Be=null;if(de.top+Te.top<0?Be=!0:de.bottom+Te.top>(window.innerHeight||document.documentElement.clientHeight)&&(Be=!1),Be!=null&&!xe){var at=Oe("div","\u200B",null,`position: absolute;
top: `+(de.top-Me.viewOffset-As(oe.display))+`px;
height: `+(de.bottom-de.top+zs(oe)+Me.barHeight)+`px;
left: `+de.left+"px; width: "+Math.max(2,de.right-de.left)+"px;");oe.display.lineSpace.appendChild(at),at.scrollIntoView(Be),oe.display.lineSpace.removeChild(at)}}}function Uh(oe,de,Me,Te){Te==null&&(Te=0);var Be;!oe.options.lineWrapping&&de==Me&&(de=de.ch?rn(de.line,de.sticky=="before"?de.ch-1:de.ch,"after"):de,Me=de.sticky=="before"?rn(de.line,de.ch+1,"before"):de);for(var at=0;at<5;at++){var Pt=!1,Bt=Ma(oe,de),Dt=!Me||Me==de?Bt:Ma(oe,Me);Be={left:Math.min(Bt.left,Dt.left),top:Math.min(Bt.top,Dt.top)-Te,right:Math.max(Bt.left,Dt.left),bottom:Math.max(Bt.bottom,Dt.bottom)+Te};var Vt=Wf(oe,Be),yn=oe.doc.scrollTop,Jt=oe.doc.scrollLeft;if(Vt.scrollTop!=null&&(Xc(oe,Vt.scrollTop),Math.abs(oe.doc.scrollTop-yn)>1&&(Pt=!0)),Vt.scrollLeft!=null&&(Uu(oe,Vt.scrollLeft),Math.abs(oe.doc.scrollLeft-Jt)>1&&(Pt=!0)),!Pt)break}return Be}function Wh(oe,de){var Me=Wf(oe,de);Me.scrollTop!=null&&Xc(oe,Me.scrollTop),Me.scrollLeft!=null&&Uu(oe,Me.scrollLeft)}function Wf(oe,de){var Me=oe.display,Te=Gu(oe.display);de.top<0&&(de.top=0);var Be=oe.curOp&&oe.curOp.scrollTop!=null?oe.curOp.scrollTop:Me.scroller.scrollTop,at=$c(oe),Pt={};de.bottom-de.top>at&&(de.bottom=de.top+at);var Bt=oe.doc.height+Eu(Me),Dt=de.top<Te,Vt=de.bottom>Bt-Te;if(de.top<Be)Pt.scrollTop=Dt?0:de.top;else if(de.bottom>Be+at){var yn=Math.min(de.top,(Vt?Bt:de.bottom)-at);yn!=Be&&(Pt.scrollTop=yn)}var Jt=oe.options.fixedGutter?0:Me.gutters.offsetWidth,Hn=oe.curOp&&oe.curOp.scrollLeft!=null?oe.curOp.scrollLeft:Me.scroller.scrollLeft-Jt,Bn=dl(oe)-Me.gutters.offsetWidth,fr=de.right-de.left>Bn;return fr&&(de.right=de.left+Bn),de.left<10?Pt.scrollLeft=0:de.left<Hn?Pt.scrollLeft=Math.max(0,de.left+Jt-(fr?0:10)):de.right>Bn+Hn-3&&(Pt.scrollLeft=de.right+(fr?0:10)-Bn),Pt}function Ed(oe,de){de!=null&&(Hu(oe),oe.curOp.scrollTop=(oe.curOp.scrollTop==null?oe.doc.scrollTop:oe.curOp.scrollTop)+de)}function Sc(oe){Hu(oe);var de=oe.getCursor();oe.curOp.scrollToPos={from:de,to:de,margin:oe.options.cursorScrollMargin}}function Zc(oe,de,Me){(de!=null||Me!=null)&&Hu(oe),de!=null&&(oe.curOp.scrollLeft=de),Me!=null&&(oe.curOp.scrollTop=Me)}function Wo(oe,de){Hu(oe),oe.curOp.scrollToPos=de}function Hu(oe){var de=oe.curOp.scrollToPos;if(de){oe.curOp.scrollToPos=null;var Me=wd(oe,de.from),Te=wd(oe,de.to);sf(oe,Me,Te,de.margin)}}function sf(oe,de,Me,Te){var Be=Wf(oe,{left:Math.min(de.left,Me.left),top:Math.min(de.top,Me.top)-Te,right:Math.max(de.right,Me.right),bottom:Math.max(de.bottom,Me.bottom)+Te});Zc(oe,Be.scrollLeft,Be.scrollTop)}function Xc(oe,de){Math.abs(oe.doc.scrollTop-de)<2||(rt||Jr(oe,{top:de}),Kf(oe,de,!0),rt&&Jr(oe),qn(oe,100))}function Kf(oe,de,Me){de=Math.max(0,Math.min(oe.display.scroller.scrollHeight-oe.display.scroller.clientHeight,de)),!(oe.display.scroller.scrollTop==de&&!Me)&&(oe.doc.scrollTop=de,oe.display.scrollbars.setScrollTop(de),oe.display.scroller.scrollTop!=de&&(oe.display.scroller.scrollTop=de))}function Uu(oe,de,Me,Te){de=Math.max(0,Math.min(de,oe.display.scroller.scrollWidth-oe.display.scroller.clientWidth)),!((Me?de==oe.doc.scrollLeft:Math.abs(oe.doc.scrollLeft-de)<2)&&!Te)&&(oe.doc.scrollLeft=de,Hi(oe),oe.display.scroller.scrollLeft!=de&&(oe.display.scroller.scrollLeft=de),oe.display.scrollbars.setScrollLeft(de))}function pu(oe){var de=oe.display,Me=de.gutters.offsetWidth,Te=Math.round(oe.doc.height+Eu(oe.display));return{clientHeight:de.scroller.clientHeight,viewHeight:de.wrapper.clientHeight,scrollWidth:de.scroller.scrollWidth,clientWidth:de.scroller.clientWidth,viewWidth:de.wrapper.clientWidth,barLeft:oe.options.fixedGutter?Me:0,docHeight:Te,scrollHeight:Te+zs(oe)+de.barHeight,nativeBarWidth:de.nativeBarWidth,gutterWidth:Me}}var xc=function(oe,de,Me){this.cm=Me;var Te=this.vert=Oe("div",[Oe("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),Be=this.horiz=Oe("div",[Oe("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");Te.tabIndex=Be.tabIndex=-1,oe(Te),oe(Be),Tt(Te,"scroll",function(){Te.clientHeight&&de(Te.scrollTop,"vertical")}),Tt(Be,"scroll",function(){Be.clientWidth&&de(Be.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,je&&ve<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};xc.prototype.update=function(oe){var de=oe.scrollWidth>oe.clientWidth+1,Me=oe.scrollHeight>oe.clientHeight+1,Te=oe.nativeBarWidth;if(Me){this.vert.style.display="block",this.vert.style.bottom=de?Te+"px":"0";var Be=oe.viewHeight-(de?Te:0);this.vert.firstChild.style.height=Math.max(0,oe.scrollHeight-oe.clientHeight+Be)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(de){this.horiz.style.display="block",this.horiz.style.right=Me?Te+"px":"0",this.horiz.style.left=oe.barLeft+"px";var at=oe.viewWidth-oe.barLeft-(Me?Te:0);this.horiz.firstChild.style.width=Math.max(0,oe.scrollWidth-oe.clientWidth+at)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&oe.clientHeight>0&&(Te==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:Me?Te:0,bottom:de?Te:0}},xc.prototype.setScrollLeft=function(oe){this.horiz.scrollLeft!=oe&&(this.horiz.scrollLeft=oe),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},xc.prototype.setScrollTop=function(oe){this.vert.scrollTop!=oe&&(this.vert.scrollTop=oe),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},xc.prototype.zeroWidthHack=function(){var oe=ae&&!me?"12px":"18px";this.horiz.style.height=this.vert.style.width=oe,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new it,this.disableVert=new it},xc.prototype.enableZeroWidthBar=function(oe,de,Me){oe.style.pointerEvents="auto";function Te(){var Be=oe.getBoundingClientRect(),at=Me=="vert"?document.elementFromPoint(Be.right-1,(Be.top+Be.bottom)/2):document.elementFromPoint((Be.right+Be.left)/2,Be.bottom-1);at!=oe?oe.style.pointerEvents="none":de.set(1e3,Te)}de.set(1e3,Te)},xc.prototype.clear=function(){var oe=this.horiz.parentNode;oe.removeChild(this.horiz),oe.removeChild(this.vert)};var Tu=function(){};Tu.prototype.update=function(){return{bottom:0,right:0}},Tu.prototype.setScrollLeft=function(){},Tu.prototype.setScrollTop=function(){},Tu.prototype.clear=function(){};function wc(oe,de){de||(de=pu(oe));var Me=oe.display.barWidth,Te=oe.display.barHeight;Td(oe,de);for(var Be=0;Be<4&&Me!=oe.display.barWidth||Te!=oe.display.barHeight;Be++)Me!=oe.display.barWidth&&oe.options.lineWrapping&&zi(oe),Td(oe,pu(oe)),Me=oe.display.barWidth,Te=oe.display.barHeight}function Td(oe,de){var Me=oe.display,Te=Me.scrollbars.update(de);Me.sizer.style.paddingRight=(Me.barWidth=Te.right)+"px",Me.sizer.style.paddingBottom=(Me.barHeight=Te.bottom)+"px",Me.heightForcer.style.borderBottom=Te.bottom+"px solid transparent",Te.right&&Te.bottom?(Me.scrollbarFiller.style.display="block",Me.scrollbarFiller.style.height=Te.bottom+"px",Me.scrollbarFiller.style.width=Te.right+"px"):Me.scrollbarFiller.style.display="",Te.bottom&&oe.options.coverGutterNextToScrollbar&&oe.options.fixedGutter?(Me.gutterFiller.style.display="block",Me.gutterFiller.style.height=Te.bottom+"px",Me.gutterFiller.style.width=de.gutterWidth+"px"):Me.gutterFiller.style.display=""}var lf={native:xc,null:Tu};function uf(oe){oe.display.scrollbars&&(oe.display.scrollbars.clear(),oe.display.scrollbars.addClass&&Ie(oe.display.wrapper,oe.display.scrollbars.addClass)),oe.display.scrollbars=new lf[oe.options.scrollbarStyle](function(de){oe.display.wrapper.insertBefore(de,oe.display.scrollbarFiller),Tt(de,"mousedown",function(){oe.state.focused&&setTimeout(function(){return oe.display.input.focus()},0)}),de.setAttribute("cm-not-content","true")},function(de,Me){Me=="horizontal"?Uu(oe,de):Xc(oe,de)},oe),oe.display.scrollbars.addClass&&Xe(oe.display.wrapper,oe.display.scrollbars.addClass)}var Vf=0;function fl(oe){oe.curOp={cm:oe,viewChanged:!1,startHeight:oe.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:++Vf},Wa(oe.curOp)}function bc(oe){var de=oe.curOp;de&&ao(de,function(Me){for(var Te=0;Te<Me.ops.length;Te++)Me.ops[Te].cm.curOp=null;Wp(Me)})}function Wp(oe){for(var de=oe.ops,Me=0;Me<de.length;Me++)Rt(de[Me]);for(var Te=0;Te<de.length;Te++)$t(de[Te]);for(var Be=0;Be<de.length;Be++)nn(de[Be]);for(var at=0;at<de.length;at++)sn(de[at]);for(var Pt=0;Pt<de.length;Pt++)Sn(de[Pt])}function Rt(oe){var de=oe.cm,Me=de.display;Or(de),oe.updateMaxLine&&wo(de),oe.mustUpdate=oe.viewChanged||oe.forceUpdate||oe.scrollTop!=null||oe.scrollToPos&&(oe.scrollToPos.from.line<Me.viewFrom||oe.scrollToPos.to.line>=Me.viewTo)||Me.maxLineChanged&&de.options.lineWrapping,oe.update=oe.mustUpdate&&new tr(de,oe.mustUpdate&&{top:oe.scrollTop,ensure:oe.scrollToPos},oe.forceUpdate)}function $t(oe){oe.updatedDisplay=oe.mustUpdate&&ti(oe.cm,oe.update)}function nn(oe){var de=oe.cm,Me=de.display;oe.updatedDisplay&&zi(de),oe.barMeasure=pu(de),Me.maxLineChanged&&!de.options.lineWrapping&&(oe.adjustWidthTo=Hc(de,Me.maxLine,Me.maxLine.text.length).left+3,de.display.sizerWidth=oe.adjustWidthTo,oe.barMeasure.scrollWidth=Math.max(Me.scroller.clientWidth,Me.sizer.offsetLeft+oe.adjustWidthTo+zs(de)+de.display.barWidth),oe.maxScrollLeft=Math.max(0,Me.sizer.offsetLeft+oe.adjustWidthTo-dl(de))),(oe.updatedDisplay||oe.selectionChanged)&&(oe.preparedSelection=Me.input.prepareSelection())}function sn(oe){var de=oe.cm;oe.adjustWidthTo!=null&&(de.display.sizer.style.minWidth=oe.adjustWidthTo+"px",oe.maxScrollLeft<de.doc.scrollLeft&&Uu(de,Math.min(de.display.scroller.scrollLeft,oe.maxScrollLeft),!0),de.display.maxLineChanged=!1);var Me=oe.focus&&oe.focus==ze();oe.preparedSelection&&de.display.input.showSelection(oe.preparedSelection,Me),(oe.updatedDisplay||oe.startHeight!=de.doc.height)&&wc(de,oe.barMeasure),oe.updatedDisplay&&Ni(de,oe.barMeasure),oe.selectionChanged&&sa(de),de.state.focused&&oe.updateInput&&de.display.input.reset(oe.typing),Me&&La(oe.cm)}function Sn(oe){var de=oe.cm,Me=de.display,Te=de.doc;if(oe.updatedDisplay&&xr(de,oe.update),Me.wheelStartX!=null&&(oe.scrollTop!=null||oe.scrollLeft!=null||oe.scrollToPos)&&(Me.wheelStartX=Me.wheelStartY=null),oe.scrollTop!=null&&Kf(de,oe.scrollTop,oe.forceScroll),oe.scrollLeft!=null&&Uu(de,oe.scrollLeft,!0,!0),oe.scrollToPos){var Be=Uh(de,Dn(Te,oe.scrollToPos.from),Dn(Te,oe.scrollToPos.to),oe.scrollToPos.margin);Uf(de,Be)}var at=oe.maybeHiddenMarkers,Pt=oe.maybeUnhiddenMarkers;if(at)for(var Bt=0;Bt<at.length;++Bt)at[Bt].lines.length||kt(at[Bt],"hide");if(Pt)for(var Dt=0;Dt<Pt.length;++Dt)Pt[Dt].lines.length&&kt(Pt[Dt],"unhide");Me.wrapper.offsetHeight&&(Te.scrollTop=de.display.scroller.scrollTop),oe.changeObjs&&kt(de,"changes",de,oe.changeObjs),oe.update&&oe.update.finish()}function fn(oe,de){if(oe.curOp)return de();fl(oe);try{return de()}finally{bc(oe)}}function Rn(oe,de){return function(){if(oe.curOp)return de.apply(oe,arguments);fl(oe);try{return de.apply(oe,arguments)}finally{bc(oe)}}}function _n(oe){return function(){if(this.curOp)return oe.apply(this,arguments);fl(this);try{return oe.apply(this,arguments)}finally{bc(this)}}}function In(oe){return function(){var de=this.cm;if(!de||de.curOp)return oe.apply(this,arguments);fl(de);try{return oe.apply(this,arguments)}finally{bc(de)}}}function qn(oe,de){oe.doc.highlightFrontier<oe.display.viewTo&&oe.state.highlight.set(de,ft(rr,oe))}function rr(oe){var de=oe.doc;if(!(de.highlightFrontier>=oe.display.viewTo)){var Me=+new Date+oe.options.workTime,Te=Br(oe,de.highlightFrontier),Be=[];de.iter(Te.line,Math.min(de.first+de.size,oe.display.viewTo+500),function(at){if(Te.line>=oe.display.viewFrom){var Pt=at.styles,Bt=at.text.length>oe.options.maxHighlightLength?xn(de.mode,Te.state):null,Dt=Lr(oe,at,Te,!0);Bt&&(Te.state=Bt),at.styles=Dt.styles;var Vt=at.styleClasses,yn=Dt.classes;yn?at.styleClasses=yn:Vt&&(at.styleClasses=null);for(var Jt=!Pt||Pt.length!=at.styles.length||Vt!=yn&&(!Vt||!yn||Vt.bgClass!=yn.bgClass||Vt.textClass!=yn.textClass),Hn=0;!Jt&&Hn<Pt.length;++Hn)Jt=Pt[Hn]!=at.styles[Hn];Jt&&Be.push(Te.line),at.stateAfter=Te.save(),Te.nextLine()}else at.text.length<=oe.options.maxHighlightLength&&tn(oe,at.text,Te),at.stateAfter=Te.line%5==0?Te.save():null,Te.nextLine();if(+new Date>Me)return qn(oe,oe.options.workDelay),!0}),de.highlightFrontier=Te.line,de.modeFrontier=Math.max(de.modeFrontier,Te.line),Be.length&&fn(oe,function(){for(var at=0;at<Be.length;at++)Po(oe,Be[at],"text")})}}var tr=function(oe,de,Me){var Te=oe.display;this.viewport=de,this.visible=Do(Te,oe.doc,de),this.editorIsHidden=!Te.wrapper.offsetWidth,this.wrapperHeight=Te.wrapper.clientHeight,this.wrapperWidth=Te.wrapper.clientWidth,this.oldDisplayWidth=dl(oe),this.force=Me,this.dims=Cd(oe),this.events=[]};tr.prototype.signal=function(oe,de){on(oe,de)&&this.events.push(arguments)},tr.prototype.finish=function(){for(var oe=0;oe<this.events.length;oe++)kt.apply(null,this.events[oe])};function Or(oe){var de=oe.display;!de.scrollbarsClipped&&de.scroller.offsetWidth&&(de.nativeBarWidth=de.scroller.offsetWidth-de.scroller.clientWidth,de.heightForcer.style.height=zs(oe)+"px",de.sizer.style.marginBottom=-de.nativeBarWidth+"px",de.sizer.style.borderRightWidth=zs(oe)+"px",de.scrollbarsClipped=!0)}function Pr(oe){if(oe.hasFocus())return null;var de=ze();if(!de||!Ye(oe.display.lineDiv,de))return null;var Me={activeElt:de};if(window.getSelection){var Te=window.getSelection();Te.anchorNode&&Te.extend&&Ye(oe.display.lineDiv,Te.anchorNode)&&(Me.anchorNode=Te.anchorNode,Me.anchorOffset=Te.anchorOffset,Me.focusNode=Te.focusNode,Me.focusOffset=Te.focusOffset)}return Me}function gr(oe){if(!(!oe||!oe.activeElt||oe.activeElt==ze())&&(oe.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(oe.activeElt.nodeName)&&oe.anchorNode&&Ye(document.body,oe.anchorNode)&&Ye(document.body,oe.focusNode))){var de=window.getSelection(),Me=document.createRange();Me.setEnd(oe.anchorNode,oe.anchorOffset),Me.collapse(!1),de.removeAllRanges(),de.addRange(Me),de.extend(oe.focusNode,oe.focusOffset)}}function ti(oe,de){var Me=oe.display,Te=oe.doc;if(de.editorIsHidden)return ss(oe),!1;if(!de.force&&de.visible.from>=Me.viewFrom&&de.visible.to<=Me.viewTo&&(Me.updateLineNumbers==null||Me.updateLineNumbers>=Me.viewTo)&&Me.renderedView==Me.view&&zl(oe)==0)return!1;ri(oe)&&(ss(oe),de.dims=Cd(oe));var Be=Te.first+Te.size,at=Math.max(de.visible.from-oe.options.viewportMargin,Te.first),Pt=Math.min(Be,de.visible.to+oe.options.viewportMargin);Me.viewFrom<at&&at-Me.viewFrom<20&&(at=Math.max(Te.first,Me.viewFrom)),Me.viewTo>Pt&&Me.viewTo-Pt<20&&(Pt=Math.min(Be,Me.viewTo)),Ln&&(at=Dr(oe.doc,at),Pt=zr(oe.doc,Pt));var Bt=at!=Me.viewFrom||Pt!=Me.viewTo||Me.lastWrapHeight!=de.wrapperHeight||Me.lastWrapWidth!=de.wrapperWidth;ha(oe,at,Pt),Me.viewOffset=yo(Cn(oe.doc,Me.viewFrom)),oe.display.mover.style.top=Me.viewOffset+"px";var Dt=zl(oe);if(!Bt&&Dt==0&&!de.force&&Me.renderedView==Me.view&&(Me.updateLineNumbers==null||Me.updateLineNumbers>=Me.viewTo))return!1;var Vt=Pr(oe);return Dt>4&&(Me.lineDiv.style.display="none"),Zr(oe,Me.updateLineNumbers,de.dims),Dt>4&&(Me.lineDiv.style.display=""),Me.renderedView=Me.view,gr(Vt),ke(Me.cursorDiv),ke(Me.selectionDiv),Me.gutters.style.height=Me.sizer.style.minHeight=0,Bt&&(Me.lastWrapHeight=de.wrapperHeight,Me.lastWrapWidth=de.wrapperWidth,qn(oe,400)),Me.updateLineNumbers=null,!0}function xr(oe,de){for(var Me=de.viewport,Te=!0;;Te=!1){if(!Te||!oe.options.lineWrapping||de.oldDisplayWidth==dl(oe)){if(Me&&Me.top!=null&&(Me={top:Math.min(oe.doc.height+Eu(oe.display)-$c(oe),Me.top)}),de.visible=Do(oe.display,oe.doc,Me),de.visible.from>=oe.display.viewFrom&&de.visible.to<=oe.display.viewTo)break}else Te&&(de.visible=Do(oe.display,oe.doc,Me));if(!ti(oe,de))break;zi(oe);var Be=pu(oe);ws(oe),wc(oe,Be),Ni(oe,Be),de.force=!1}de.signal(oe,"update",oe),(oe.display.viewFrom!=oe.display.reportedViewFrom||oe.display.viewTo!=oe.display.reportedViewTo)&&(de.signal(oe,"viewportChange",oe,oe.display.viewFrom,oe.display.viewTo),oe.display.reportedViewFrom=oe.display.viewFrom,oe.display.reportedViewTo=oe.display.viewTo)}function Jr(oe,de){var Me=new tr(oe,de);if(ti(oe,Me)){zi(oe),xr(oe,Me);var Te=pu(oe);ws(oe),wc(oe,Te),Ni(oe,Te),Me.finish()}}function Zr(oe,de,Me){var Te=oe.display,Be=oe.options.lineNumbers,at=Te.lineDiv,Pt=at.firstChild;function Bt(fr){var wr=fr.nextSibling;return ce&&ae&&oe.display.currentWheelTarget==fr?fr.style.display="none":fr.parentNode.removeChild(fr),wr}for(var Dt=Te.view,Vt=Te.viewFrom,yn=0;yn<Dt.length;yn++){var Jt=Dt[yn];if(!Jt.hidden)if(!Jt.node||Jt.node.parentNode!=at){var Hn=Fl(oe,Jt,Vt,Me);at.insertBefore(Hn,Pt)}else{for(;Pt!=Jt.node;)Pt=Bt(Pt);var Bn=Be&&de!=null&&de<=Vt&&Jt.lineNumber;Jt.changes&&(xt(Jt.changes,"gutter")>-1&&(Bn=!1),Ra(oe,Jt,Vt,Me)),Bn&&(ke(Jt.lineNumber),Jt.lineNumber.appendChild(document.createTextNode(or(oe.options,Vt)))),Pt=Jt.node.nextSibling}Vt+=Jt.size}for(;Pt;)Pt=Bt(Pt)}function ui(oe){var de=oe.gutters.offsetWidth;oe.sizer.style.marginLeft=de+"px"}function Ni(oe,de){oe.display.sizer.style.minHeight=de.docHeight+"px",oe.display.heightForcer.style.top=de.docHeight+"px",oe.display.gutters.style.height=de.docHeight+oe.display.barHeight+zs(oe)+"px"}function Hi(oe){var de=oe.display,Me=de.view;if(!(!de.alignWidgets&&(!de.gutters.firstChild||!oe.options.fixedGutter))){for(var Te=ph(de)-de.scroller.scrollLeft+oe.doc.scrollLeft,Be=de.gutters.offsetWidth,at=Te+"px",Pt=0;Pt<Me.length;Pt++)if(!Me[Pt].hidden){oe.options.fixedGutter&&(Me[Pt].gutter&&(Me[Pt].gutter.style.left=at),Me[Pt].gutterBackground&&(Me[Pt].gutterBackground.style.left=at));var Bt=Me[Pt].alignable;if(Bt)for(var Dt=0;Dt<Bt.length;Dt++)Bt[Dt].style.left=at}oe.options.fixedGutter&&(de.gutters.style.left=Te+Be+"px")}}function ri(oe){if(!oe.options.lineNumbers)return!1;var de=oe.doc,Me=or(oe.options,de.first+de.size-1),Te=oe.display;if(Me.length!=Te.lineNumChars){var Be=Te.measure.appendChild(Oe("div",[Oe("div",Me)],"CodeMirror-linenumber CodeMirror-gutter-elt")),at=Be.firstChild.offsetWidth,Pt=Be.offsetWidth-at;return Te.lineGutter.style.width="",Te.lineNumInnerWidth=Math.max(at,Te.lineGutter.offsetWidth-Pt)+1,Te.lineNumWidth=Te.lineNumInnerWidth+Pt,Te.lineNumChars=Te.lineNumInnerWidth?Me.length:-1,Te.lineGutter.style.width=Te.lineNumWidth+"px",ui(oe.display),!0}return!1}function Oi(oe,de){for(var Me=[],Te=!1,Be=0;Be<oe.length;Be++){var at=oe[Be],Pt=null;if(typeof at!="string"&&(Pt=at.style,at=at.className),at=="CodeMirror-linenumbers")if(de)Te=!0;else continue;Me.push({className:at,style:Pt})}return de&&!Te&&Me.push({className:"CodeMirror-linenumbers",style:null}),Me}function uo(oe){var de=oe.gutters,Me=oe.gutterSpecs;ke(de),oe.lineGutter=null;for(var Te=0;Te<Me.length;++Te){var Be=Me[Te],at=Be.className,Pt=Be.style,Bt=de.appendChild(Oe("div",null,"CodeMirror-gutter "+at));Pt&&(Bt.style.cssText=Pt),at=="CodeMirror-linenumbers"&&(oe.lineGutter=Bt,Bt.style.width=(oe.lineNumWidth||1)+"px")}de.style.display=Me.length?"":"none",ui(oe)}function si(oe){uo(oe.display),ma(oe),Hi(oe)}function Pi(oe,de,Me,Te){var Be=this;this.input=Me,Be.scrollbarFiller=Oe("div",null,"CodeMirror-scrollbar-filler"),Be.scrollbarFiller.setAttribute("cm-not-content","true"),Be.gutterFiller=Oe("div",null,"CodeMirror-gutter-filler"),Be.gutterFiller.setAttribute("cm-not-content","true"),Be.lineDiv=Fe("div",null,"CodeMirror-code"),Be.selectionDiv=Oe("div",null,null,"position: relative; z-index: 1"),Be.cursorDiv=Oe("div",null,"CodeMirror-cursors"),Be.measure=Oe("div",null,"CodeMirror-measure"),Be.lineMeasure=Oe("div",null,"CodeMirror-measure"),Be.lineSpace=Fe("div",[Be.measure,Be.lineMeasure,Be.selectionDiv,Be.cursorDiv,Be.lineDiv],null,"position: relative; outline: none");var at=Fe("div",[Be.lineSpace],"CodeMirror-lines");Be.mover=Oe("div",[at],null,"position: relative"),Be.sizer=Oe("div",[Be.mover],"CodeMirror-sizer"),Be.sizerWidth=null,Be.heightForcer=Oe("div",null,null,"position: absolute; height: "+Et+"px; width: 1px;"),Be.gutters=Oe("div",null,"CodeMirror-gutters"),Be.lineGutter=null,Be.scroller=Oe("div",[Be.sizer,Be.heightForcer,Be.gutters],"CodeMirror-scroll"),Be.scroller.setAttribute("tabIndex","-1"),Be.wrapper=Oe("div",[Be.scrollbarFiller,Be.gutterFiller,Be.scroller],"CodeMirror"),je&&ve<8&&(Be.gutters.style.zIndex=-1,Be.scroller.style.paddingRight=0),!ce&&!(rt&&ee)&&(Be.scroller.draggable=!0),oe&&(oe.appendChild?oe.appendChild(Be.wrapper):oe(Be.wrapper)),Be.viewFrom=Be.viewTo=de.first,Be.reportedViewFrom=Be.reportedViewTo=de.first,Be.view=[],Be.renderedView=null,Be.externalMeasured=null,Be.viewOffset=0,Be.lastWrapHeight=Be.lastWrapWidth=0,Be.updateLineNumbers=null,Be.nativeBarWidth=Be.barHeight=Be.barWidth=0,Be.scrollbarsClipped=!1,Be.lineNumWidth=Be.lineNumInnerWidth=Be.lineNumChars=null,Be.alignWidgets=!1,Be.cachedCharWidth=Be.cachedTextHeight=Be.cachedPaddingH=null,Be.maxLine=null,Be.maxLineLength=0,Be.maxLineChanged=!1,Be.wheelDX=Be.wheelDY=Be.wheelStartX=Be.wheelStartY=null,Be.shift=!1,Be.selForContextMenu=null,Be.activeTouch=null,Be.gutterSpecs=Oi(Te.gutters,Te.lineNumbers),uo(Be),Me.init(Be)}var ai=0,$r=null;je?$r=-.53:rt?$r=15:Ce?$r=-.7:we&&($r=-1/3);function mi(oe){var de=oe.wheelDeltaX,Me=oe.wheelDeltaY;return de==null&&oe.detail&&oe.axis==oe.HORIZONTAL_AXIS&&(de=oe.detail),Me==null&&oe.detail&&oe.axis==oe.VERTICAL_AXIS?Me=oe.detail:Me==null&&(Me=oe.wheelDelta),{x:de,y:Me}}function Fi(oe){var de=mi(oe);return de.x*=$r,de.y*=$r,de}function Yi(oe,de){var Me=mi(de),Te=Me.x,Be=Me.y,at=oe.display,Pt=at.scroller,Bt=Pt.scrollWidth>Pt.clientWidth,Dt=Pt.scrollHeight>Pt.clientHeight;if(Te&&Bt||Be&&Dt){if(Be&&ae&&ce){e:for(var Vt=de.target,yn=at.view;Vt!=Pt;Vt=Vt.parentNode)for(var Jt=0;Jt<yn.length;Jt++)if(yn[Jt].node==Vt){oe.display.currentWheelTarget=Vt;break e}}if(Te&&!rt&&!ye&&$r!=null){Be&&Dt&&Xc(oe,Math.max(0,Pt.scrollTop+Be*$r)),Uu(oe,Math.max(0,Pt.scrollLeft+Te*$r)),(!Be||Be&&Dt)&&kn(de),at.wheelStartX=null;return}if(Be&&$r!=null){var Hn=Be*$r,Bn=oe.doc.scrollTop,fr=Bn+at.wrapper.clientHeight;Hn<0?Bn=Math.max(0,Bn+Hn-50):fr=Math.min(oe.doc.height,fr+Hn+50),Jr(oe,{top:Bn,bottom:fr})}ai<20&&(at.wheelStartX==null?(at.wheelStartX=Pt.scrollLeft,at.wheelStartY=Pt.scrollTop,at.wheelDX=Te,at.wheelDY=Be,setTimeout(function(){if(at.wheelStartX!=null){var wr=Pt.scrollLeft-at.wheelStartX,_r=Pt.scrollTop-at.wheelStartY,oi=_r&&at.wheelDY&&_r/at.wheelDY||wr&&at.wheelDX&&wr/at.wheelDX;at.wheelStartX=at.wheelStartY=null,oi&&($r=($r*ai+oi)/(ai+1),++ai)}},200)):(at.wheelDX+=Te,at.wheelDY+=Be))}}var Qi=function(oe,de){this.ranges=oe,this.primIndex=de};Qi.prototype.primary=function(){return this.ranges[this.primIndex]},Qi.prototype.equals=function(oe){if(oe==this)return!0;if(oe.primIndex!=this.primIndex||oe.ranges.length!=this.ranges.length)return!1;for(var de=0;de<this.ranges.length;de++){var Me=this.ranges[de],Te=oe.ranges[de];if(!an(Me.anchor,Te.anchor)||!an(Me.head,Te.head))return!1}return!0},Qi.prototype.deepCopy=function(){for(var oe=[],de=0;de<this.ranges.length;de++)oe[de]=new ii(gn(this.ranges[de].anchor),gn(this.ranges[de].head));return new Qi(oe,this.primIndex)},Qi.prototype.somethingSelected=function(){for(var oe=0;oe<this.ranges.length;oe++)if(!this.ranges[oe].empty())return!0;return!1},Qi.prototype.contains=function(oe,de){de||(de=oe);for(var Me=0;Me<this.ranges.length;Me++){var Te=this.ranges[Me];if(Mn(de,Te.from())>=0&&Mn(oe,Te.to())<=0)return Me}return-1};var ii=function(oe,de){this.anchor=oe,this.head=de};ii.prototype.from=function(){return pn(this.anchor,this.head)},ii.prototype.to=function(){return En(this.anchor,this.head)},ii.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function ho(oe,de,Me){var Te=oe&&oe.options.selectionsMayTouch,Be=de[Me];de.sort(function(Hn,Bn){return Mn(Hn.from(),Bn.from())}),Me=xt(de,Be);for(var at=1;at<de.length;at++){var Pt=de[at],Bt=de[at-1],Dt=Mn(Bt.to(),Pt.from());if(Te&&!Pt.empty()?Dt>0:Dt>=0){var Vt=pn(Bt.from(),Pt.from()),yn=En(Bt.to(),Pt.to()),Jt=Bt.empty()?Pt.from()==Pt.head:Bt.from()==Bt.head;at<=Me&&--Me,de.splice(--at,2,new ii(Jt?yn:Vt,Jt?Vt:yn))}}return new Qi(de,Me)}function So(oe,de){return new Qi([new ii(oe,de||oe)],0)}function Yo(oe){return oe.text?rn(oe.from.line+oe.text.length-1,Ct(oe.text).length+(oe.text.length==1?oe.from.ch:0)):oe.to}function No(oe,de){if(Mn(oe,de.from)<0)return oe;if(Mn(oe,de.to)<=0)return Yo(de);var Me=oe.line+de.text.length-(de.to.line-de.from.line)-1,Te=oe.ch;return oe.line==de.to.line&&(Te+=Yo(de).ch-de.to.ch),rn(Me,Te)}function ka(oe,de){for(var Me=[],Te=0;Te<oe.sel.ranges.length;Te++){var Be=oe.sel.ranges[Te];Me.push(new ii(No(Be.anchor,de),No(Be.head,de)))}return ho(oe.cm,Me,oe.sel.primIndex)}function Ea(oe,de,Me){return oe.line==de.line?rn(Me.line,oe.ch-de.ch+Me.ch):rn(Me.line+(oe.line-de.line),oe.ch)}function mo(oe,de,Me){for(var Te=[],Be=rn(oe.first,0),at=Be,Pt=0;Pt<de.length;Pt++){var Bt=de[Pt],Dt=Ea(Bt.from,Be,at),Vt=Ea(Yo(Bt),Be,at);if(Be=Bt.to,at=Vt,Me=="around"){var yn=oe.sel.ranges[Pt],Jt=Mn(yn.head,yn.anchor)<0;Te[Pt]=new ii(Jt?Vt:Dt,Jt?Dt:Vt)}else Te[Pt]=new ii(Dt,Dt)}return new Qi(Te,oe.sel.primIndex)}function $i(oe){oe.doc.mode=mn(oe.options,oe.doc.modeOption),Ho(oe)}function Ho(oe){oe.doc.iter(function(de){de.stateAfter&&(de.stateAfter=null),de.styles&&(de.styles=null)}),oe.doc.modeFrontier=oe.doc.highlightFrontier=oe.doc.first,qn(oe,100),oe.state.modeGen++,oe.curOp&&ma(oe)}function Oa(oe,de){return de.from.ch==0&&de.to.ch==0&&Ct(de.text)==""&&(!oe.cm||oe.cm.options.wholeLineUpdateBefore)}function va(oe,de,Me,Te){function Be(Ti){return Me?Me[Ti]:null}function at(Ti,vi,Bi){ua(Ti,vi,Bi,Te),kr(Ti,"change",Ti,de)}function Pt(Ti,vi){for(var Bi=[],fo=Ti;fo<vi;++fo)Bi.push(new Zo(Vt[fo],Be(fo),Te));return Bi}var Bt=de.from,Dt=de.to,Vt=de.text,yn=Cn(oe,Bt.line),Jt=Cn(oe,Dt.line),Hn=Ct(Vt),Bn=Be(Vt.length-1),fr=Dt.line-Bt.line;if(de.full)oe.insert(0,Pt(0,Vt.length)),oe.remove(Vt.length,oe.size-Vt.length);else if(Oa(oe,de)){var wr=Pt(0,Vt.length-1);at(Jt,Jt.text,Bn),fr&&oe.remove(Bt.line,fr),wr.length&&oe.insert(Bt.line,wr)}else if(yn==Jt)if(Vt.length==1)at(yn,yn.text.slice(0,Bt.ch)+Hn+yn.text.slice(Dt.ch),Bn);else{var _r=Pt(1,Vt.length-1);_r.push(new Zo(Hn+yn.text.slice(Dt.ch),Bn,Te)),at(yn,yn.text.slice(0,Bt.ch)+Vt[0],Be(0)),oe.insert(Bt.line+1,_r)}else if(Vt.length==1)at(yn,yn.text.slice(0,Bt.ch)+Vt[0]+Jt.text.slice(Dt.ch),Be(0)),oe.remove(Bt.line+1,fr);else{at(yn,yn.text.slice(0,Bt.ch)+Vt[0],Be(0)),at(Jt,Hn+Jt.text.slice(Dt.ch),Bn);var oi=Pt(1,Vt.length-1);fr>1&&oe.remove(Bt.line+1,fr-1),oe.insert(Bt.line+1,oi)}kr(oe,"change",oe,de)}function is(oe,de,Me){function Te(Be,at,Pt){if(Be.linked)for(var Bt=0;Bt<Be.linked.length;++Bt){var Dt=Be.linked[Bt];if(Dt.doc!=at){var Vt=Pt&&Dt.sharedHist;Me&&!Vt||(de(Dt.doc,Vt),Te(Dt.doc,Be,Vt))}}}Te(oe,null,!0)}function qi(oe,de){if(de.cm)throw new Error("This document is already in use.");oe.doc=de,de.cm=oe,Gi(oe),$i(oe),Zi(oe),oe.options.lineWrapping||wo(oe),oe.options.mode=de.modeOption,ma(oe)}function Zi(oe){(oe.doc.direction=="rtl"?Xe:Ie)(oe.display.lineDiv,"CodeMirror-rtl")}function eo(oe){fn(oe,function(){Zi(oe),ma(oe)})}function Ai(oe){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=oe||1}function Ko(oe,de){var Me={from:gn(de.from),to:Yo(de),text:Gn(oe,de.from,de.to)};return Gs(oe,Me,de.from.line,de.to.line+1),is(oe,function(Te){return Gs(Te,Me,de.from.line,de.to.line+1)},!0),Me}function ji(oe){for(;oe.length;){var de=Ct(oe);if(de.ranges)oe.pop();else break}}function co(oe,de){if(de)return ji(oe.done),Ct(oe.done);if(oe.done.length&&!Ct(oe.done).ranges)return Ct(oe.done);if(oe.done.length>1&&!oe.done[oe.done.length-2].ranges)return oe.done.pop(),Ct(oe.done)}function Fo(oe,de,Me,Te){var Be=oe.history;Be.undone.length=0;var at=+new Date,Pt,Bt;if((Be.lastOp==Te||Be.lastOrigin==de.origin&&de.origin&&(de.origin.charAt(0)=="+"&&Be.lastModTime>at-(oe.cm?oe.cm.options.historyEventDelay:500)||de.origin.charAt(0)=="*"))&&(Pt=co(Be,Be.lastOp==Te)))Bt=Ct(Pt.changes),Mn(de.from,de.to)==0&&Mn(de.from,Bt.to)==0?Bt.to=Yo(de):Pt.changes.push(Ko(oe,de));else{var Dt=Ct(Be.done);for((!Dt||!Dt.ranges)&&ls(oe.sel,Be.done),Pt={changes:[Ko(oe,de)],generation:Be.generation},Be.done.push(Pt);Be.done.length>Be.undoDepth;)Be.done.shift(),Be.done[0].ranges||Be.done.shift()}Be.done.push(Me),Be.generation=++Be.maxGeneration,Be.lastModTime=Be.lastSelTime=at,Be.lastOp=Be.lastSelOp=Te,Be.lastOrigin=Be.lastSelOrigin=de.origin,Bt||kt(oe,"historyAdded")}function Bo(oe,de,Me,Te){var Be=de.charAt(0);return Be=="*"||Be=="+"&&Me.ranges.length==Te.ranges.length&&Me.somethingSelected()==Te.somethingSelected()&&new Date-oe.history.lastSelTime<=(oe.cm?oe.cm.options.historyEventDelay:500)}function bs(oe,de,Me,Te){var Be=oe.history,at=Te&&Te.origin;Me==Be.lastSelOp||at&&Be.lastSelOrigin==at&&(Be.lastModTime==Be.lastSelTime&&Be.lastOrigin==at||Bo(oe,at,Ct(Be.done),de))?Be.done[Be.done.length-1]=de:ls(de,Be.done),Be.lastSelTime=+new Date,Be.lastSelOrigin=at,Be.lastSelOp=Me,Te&&Te.clearRedo!==!1&&ji(Be.undone)}function ls(oe,de){var Me=Ct(de);Me&&Me.ranges&&Me.equals(oe)||de.push(oe)}function Gs(oe,de,Me,Te){var Be=de["spans_"+oe.id],at=0;oe.iter(Math.max(oe.first,Me),Math.min(oe.first+oe.size,Te),function(Pt){Pt.markedSpans&&((Be||(Be=de["spans_"+oe.id]={}))[at]=Pt.markedSpans),++at})}function Jo(oe){if(!oe)return null;for(var de,Me=0;Me<oe.length;++Me)oe[Me].marker.explicitlyCleared?de||(de=oe.slice(0,Me)):de&&de.push(oe[Me]);return de?de.length?de:null:oe}function Ps(oe,de){var Me=de["spans_"+oe.id];if(!Me)return null;for(var Te=[],Be=0;Be<de.text.length;++Be)Te.push(Jo(Me[Be]));return Te}function ts(oe,de){var Me=Ps(oe,de),Te=Hr(oe,de);if(!Me)return Te;if(!Te)return Me;for(var Be=0;Be<Me.length;++Be){var at=Me[Be],Pt=Te[Be];if(at&&Pt)e:for(var Bt=0;Bt<Pt.length;++Bt){for(var Dt=Pt[Bt],Vt=0;Vt<at.length;++Vt)if(at[Vt].marker==Dt.marker)continue e;at.push(Dt)}else Pt&&(Me[Be]=Pt)}return Me}function ps(oe,de,Me){for(var Te=[],Be=0;Be<oe.length;++Be){var at=oe[Be];if(at.ranges){Te.push(Me?Qi.prototype.deepCopy.call(at):at);continue}var Pt=at.changes,Bt=[];Te.push({changes:Bt});for(var Dt=0;Dt<Pt.length;++Dt){var Vt=Pt[Dt],yn=void 0;if(Bt.push({from:Vt.from,to:Vt.to,text:Vt.text}),de)for(var Jt in Vt)(yn=Jt.match(/^spans_(\d+)$/))&&xt(de,Number(yn[1]))>-1&&(Ct(Bt)[Jt]=Vt[Jt],delete Vt[Jt])}}return Te}function Wu(oe,de,Me,Te){if(Te){var Be=oe.anchor;if(Me){var at=Mn(de,Be)<0;at!=Mn(Me,Be)<0?(Be=de,de=Me):at!=Mn(de,Me)<0&&(de=Me)}return new ii(Be,de)}else return new ii(Me||de,de)}function Qo(oe,de,Me,Te,Be){Be==null&&(Be=oe.cm&&(oe.cm.display.shift||oe.extend)),da(oe,new Qi([Wu(oe.sel.primary(),de,Me,Be)],0),Te)}function ra(oe,de,Me){for(var Te=[],Be=oe.cm&&(oe.cm.display.shift||oe.extend),at=0;at<oe.sel.ranges.length;at++)Te[at]=Wu(oe.sel.ranges[at],de[at],null,Be);var Pt=ho(oe.cm,Te,oe.sel.primIndex);da(oe,Pt,Me)}function la(oe,de,Me,Te){var Be=oe.sel.ranges.slice(0);Be[de]=Me,da(oe,ho(oe.cm,Be,oe.sel.primIndex),Te)}function Xa(oe,de,Me,Te){da(oe,So(de,Me),Te)}function gs(oe,de,Me){var Te={ranges:de.ranges,update:function(Be){this.ranges=[];for(var at=0;at<Be.length;at++)this.ranges[at]=new ii(Dn(oe,Be[at].anchor),Dn(oe,Be[at].head))},origin:Me&&Me.origin};return kt(oe,"beforeSelectionChange",oe,Te),oe.cm&&kt(oe.cm,"beforeSelectionChange",oe.cm,Te),Te.ranges!=de.ranges?ho(oe.cm,Te.ranges,Te.ranges.length-1):de}function Lo(oe,de,Me){var Te=oe.history.done,Be=Ct(Te);Be&&Be.ranges?(Te[Te.length-1]=de,ms(oe,de,Me)):da(oe,de,Me)}function da(oe,de,Me){ms(oe,de,Me),bs(oe,oe.sel,oe.cm?oe.cm.curOp.id:NaN,Me)}function ms(oe,de,Me){(on(oe,"beforeSelectionChange")||oe.cm&&on(oe.cm,"beforeSelectionChange"))&&(de=gs(oe,de,Me));var Te=Me&&Me.bias||(Mn(de.primary().head,oe.sel.primary().head)<0?-1:1);pl(oe,El(oe,de,Te,!0)),!(Me&&Me.scroll===!1)&&oe.cm&&Sc(oe.cm)}function pl(oe,de){de.equals(oe.sel)||(oe.sel=de,oe.cm&&(oe.cm.curOp.updateInput=1,oe.cm.curOp.selectionChanged=!0,Zt(oe.cm)),kr(oe,"cursorActivity",oe))}function $l(oe){pl(oe,El(oe,oe.sel,null,!1))}function El(oe,de,Me,Te){for(var Be,at=0;at<de.ranges.length;at++){var Pt=de.ranges[at],Bt=de.ranges.length==oe.sel.ranges.length&&oe.sel.ranges[at],Dt=tu(oe,Pt.anchor,Bt&&Bt.anchor,Me,Te),Vt=tu(oe,Pt.head,Bt&&Bt.head,Me,Te);(Be||Dt!=Pt.anchor||Vt!=Pt.head)&&(Be||(Be=de.ranges.slice(0,at)),Be[at]=new ii(Dt,Vt))}return Be?ho(oe.cm,Be,de.primIndex):de}function eu(oe,de,Me,Te,Be){var at=Cn(oe,de.line);if(at.markedSpans)for(var Pt=0;Pt<at.markedSpans.length;++Pt){var Bt=at.markedSpans[Pt],Dt=Bt.marker,Vt="selectLeft"in Dt?!Dt.selectLeft:Dt.inclusiveLeft,yn="selectRight"in Dt?!Dt.selectRight:Dt.inclusiveRight;if((Bt.from==null||(Vt?Bt.from<=de.ch:Bt.from<de.ch))&&(Bt.to==null||(yn?Bt.to>=de.ch:Bt.to>de.ch))){if(Be&&(kt(Dt,"beforeCursorEnter"),Dt.explicitlyCleared))if(at.markedSpans){--Pt;continue}else break;if(!Dt.atomic)continue;if(Me){var Jt=Dt.find(Te<0?1:-1),Hn=void 0;if((Te<0?yn:Vt)&&(Jt=Gl(oe,Jt,-Te,Jt&&Jt.line==de.line?at:null)),Jt&&Jt.line==de.line&&(Hn=Mn(Jt,Me))&&(Te<0?Hn<0:Hn>0))return eu(oe,Jt,de,Te,Be)}var Bn=Dt.find(Te<0?-1:1);return(Te<0?Vt:yn)&&(Bn=Gl(oe,Bn,Te,Bn.line==de.line?at:null)),Bn?eu(oe,Bn,de,Te,Be):null}}return de}function tu(oe,de,Me,Te,Be){var at=Te||1,Pt=eu(oe,de,Me,at,Be)||!Be&&eu(oe,de,Me,at,!0)||eu(oe,de,Me,-at,Be)||!Be&&eu(oe,de,Me,-at,!0);return Pt||(oe.cantEdit=!0,rn(oe.first,0))}function Gl(oe,de,Me,Te){return Me<0&&de.ch==0?de.line>oe.first?Dn(oe,rn(de.line-1)):null:Me>0&&de.ch==(Te||Cn(oe,de.line)).text.length?de.line<oe.first+oe.size-1?rn(de.line+1,0):null:new rn(de.line,de.ch+Me)}function ea(oe){oe.setSelection(rn(oe.firstLine(),0),rn(oe.lastLine()),mt)}function Ts(oe,de,Me){var Te={canceled:!1,from:de.from,to:de.to,text:de.text,origin:de.origin,cancel:function(){return Te.canceled=!0}};return Me&&(Te.update=function(Be,at,Pt,Bt){Be&&(Te.from=Dn(oe,Be)),at&&(Te.to=Dn(oe,at)),Pt&&(Te.text=Pt),Bt!==void 0&&(Te.origin=Bt)}),kt(oe,"beforeChange",oe,Te),oe.cm&&kt(oe.cm,"beforeChange",oe.cm,Te),Te.canceled?(oe.cm&&(oe.cm.curOp.updateInput=2),null):{from:Te.from,to:Te.to,text:Te.text,origin:Te.origin}}function Ga(oe,de,Me){if(oe.cm){if(!oe.cm.curOp)return Rn(oe.cm,Ga)(oe,de,Me);if(oe.cm.state.suppressEdits)return}if(!((on(oe,"beforeChange")||oe.cm&&on(oe.cm,"beforeChange"))&&(de=Ts(oe,de,!0),!de))){var Te=Si&&!Me&&_i(oe,de.from,de.to);if(Te)for(var Be=Te.length-1;Be>=0;--Be)fa(oe,{from:Te[Be].from,to:Te[Be].to,text:Be?[""]:de.text,origin:de.origin});else fa(oe,de)}}function fa(oe,de){if(!(de.text.length==1&&de.text[0]==""&&Mn(de.from,de.to)==0)){var Me=ka(oe,de);Fo(oe,de,Me,oe.cm?oe.cm.curOp.id:NaN),nu(oe,de,Me,Hr(oe,de));var Te=[];is(oe,function(Be,at){!at&&xt(Te,Be.history)==-1&&(ya(Be.history,de),Te.push(Be.history)),nu(Be,de,null,Hr(Be,de))})}}function Hl(oe,de,Me){var Te=oe.cm&&oe.cm.state.suppressEdits;if(!(Te&&!Me)){for(var Be=oe.history,at,Pt=oe.sel,Bt=de=="undo"?Be.done:Be.undone,Dt=de=="undo"?Be.undone:Be.done,Vt=0;Vt<Bt.length&&(at=Bt[Vt],!(Me?at.ranges&&!at.equals(oe.sel):!at.ranges));Vt++);if(Vt!=Bt.length){for(Be.lastOrigin=Be.lastSelOrigin=null;;)if(at=Bt.pop(),at.ranges){if(ls(at,Dt),Me&&!at.equals(oe.sel)){da(oe,at,{clearRedo:!1});return}Pt=at}else if(Te){Bt.push(at);return}else break;var yn=[];ls(Pt,Dt),Dt.push({changes:yn,generation:Be.generation}),Be.generation=at.generation||++Be.maxGeneration;for(var Jt=on(oe,"beforeChange")||oe.cm&&on(oe.cm,"beforeChange"),Hn=function(wr){var _r=at.changes[wr];if(_r.origin=de,Jt&&!Ts(oe,_r,!1))return Bt.length=0,{};yn.push(Ko(oe,_r));var oi=wr?ka(oe,_r):Ct(Bt);nu(oe,_r,oi,ts(oe,_r)),!wr&&oe.cm&&oe.cm.scrollIntoView({from:_r.from,to:Yo(_r)});var Ti=[];is(oe,function(vi,Bi){!Bi&&xt(Ti,vi.history)==-1&&(ya(vi.history,_r),Ti.push(vi.history)),nu(vi,_r,null,ts(vi,_r))})},Bn=at.changes.length-1;Bn>=0;--Bn){var fr=Hn(Bn);if(fr)return fr.v}}}}function oc(oe,de){if(de!=0&&(oe.first+=de,oe.sel=new Qi(gt(oe.sel.ranges,function(Be){return new ii(rn(Be.anchor.line+de,Be.anchor.ch),rn(Be.head.line+de,Be.head.ch))}),oe.sel.primIndex),oe.cm)){ma(oe.cm,oe.first,oe.first-de,de);for(var Me=oe.cm.display,Te=Me.viewFrom;Te<Me.viewTo;Te++)Po(oe.cm,Te,"gutter")}}function nu(oe,de,Me,Te){if(oe.cm&&!oe.cm.curOp)return Rn(oe.cm,nu)(oe,de,Me,Te);if(de.to.line<oe.first){oc(oe,de.text.length-1-(de.to.line-de.from.line));return}if(!(de.from.line>oe.lastLine())){if(de.from.line<oe.first){var Be=de.text.length-1-(oe.first-de.from.line);oc(oe,Be),de={from:rn(oe.first,0),to:rn(de.to.line+Be,de.to.ch),text:[Ct(de.text)],origin:de.origin}}var at=oe.lastLine();de.to.line>at&&(de={from:de.from,to:rn(at,Cn(oe,at).text.length),text:[de.text[0]],origin:de.origin}),de.removed=Gn(oe,de.from,de.to),Me||(Me=ka(oe,de)),oe.cm?Mu(oe.cm,de,Te):va(oe,de,Te),ms(oe,Me,mt),oe.cantEdit&&tu(oe,rn(oe.firstLine(),0))&&(oe.cantEdit=!1)}}function Mu(oe,de,Me){var Te=oe.doc,Be=oe.display,at=de.from,Pt=de.to,Bt=!1,Dt=at.line;oe.options.lineWrapping||(Dt=Yt(bi(Cn(Te,at.line))),Te.iter(Dt,Pt.line+1,function(Bn){if(Bn==Be.maxLine)return Bt=!0,!0})),Te.sel.contains(de.from,de.to)>-1&&Zt(oe),va(Te,de,Me,$a(oe)),oe.options.lineWrapping||(Te.iter(Dt,at.line+de.text.length,function(Bn){var fr=ta(Bn);fr>Be.maxLineLength&&(Be.maxLine=Bn,Be.maxLineLength=fr,Be.maxLineChanged=!0,Bt=!1)}),Bt&&(oe.curOp.updateMaxLine=!0)),Tr(Te,at.line),qn(oe,400);var Vt=de.text.length-(Pt.line-at.line)-1;de.full?ma(oe):at.line==Pt.line&&de.text.length==1&&!Oa(oe.doc,de)?Po(oe,at.line,"text"):ma(oe,at.line,Pt.line+1,Vt);var yn=on(oe,"changes"),Jt=on(oe,"change");if(Jt||yn){var Hn={from:at,to:Pt,text:de.text,removed:de.removed,origin:de.origin};Jt&&kr(oe,"change",oe,Hn),yn&&(oe.curOp.changeObjs||(oe.curOp.changeObjs=[])).push(Hn)}oe.display.selForContextMenu=null}function Ku(oe,de,Me,Te,Be){var at;Te||(Te=Me),Mn(Te,Me)<0&&(at=[Te,Me],Me=at[0],Te=at[1]),typeof de=="string"&&(de=oe.splitLines(de)),Ga(oe,{from:Me,to:Te,text:de,origin:Be})}function Tl(oe,de,Me,Te){Me<oe.line?oe.line+=Te:de<oe.line&&(oe.line=de,oe.ch=0)}function Vo(oe,de,Me,Te){for(var Be=0;Be<oe.length;++Be){var at=oe[Be],Pt=!0;if(at.ranges){at.copied||(at=oe[Be]=at.deepCopy(),at.copied=!0);for(var Bt=0;Bt<at.ranges.length;Bt++)Tl(at.ranges[Bt].anchor,de,Me,Te),Tl(at.ranges[Bt].head,de,Me,Te);continue}for(var Dt=0;Dt<at.changes.length;++Dt){var Vt=at.changes[Dt];if(Me<Vt.from.line)Vt.from=rn(Vt.from.line+Te,Vt.from.ch),Vt.to=rn(Vt.to.line+Te,Vt.to.ch);else if(de<=Vt.to.line){Pt=!1;break}}Pt||(oe.splice(0,Be+1),Be=0)}}function ya(oe,de){var Me=de.from.line,Te=de.to.line,Be=de.text.length-(Te-Me)-1;Vo(oe.done,Me,Te,Be),Vo(oe.undone,Me,Te,Be)}function us(oe,de,Me,Te){var Be=de,at=de;return typeof de=="number"?at=Cn(oe,On(oe,de)):Be=Yt(de),Be==null?null:(Te(at,Be)&&oe.cm&&Po(oe.cm,Be,Me),at)}function Sa(oe){this.lines=oe,this.parent=null;for(var de=0,Me=0;Me<oe.length;++Me)oe[Me].parent=this,de+=oe[Me].height;this.height=de}Sa.prototype={chunkSize:function(){return this.lines.length},removeInner:function(oe,de){for(var Me=oe,Te=oe+de;Me<Te;++Me){var Be=this.lines[Me];this.height-=Be.height,Pa(Be),kr(Be,"delete")}this.lines.splice(oe,de)},collapse:function(oe){oe.push.apply(oe,this.lines)},insertInner:function(oe,de,Me){this.height+=Me,this.lines=this.lines.slice(0,oe).concat(de).concat(this.lines.slice(oe));for(var Te=0;Te<de.length;++Te)de[Te].parent=this},iterN:function(oe,de,Me){for(var Te=oe+de;oe<Te;++oe)if(Me(this.lines[oe]))return!0}};function $o(oe){this.children=oe;for(var de=0,Me=0,Te=0;Te<oe.length;++Te){var Be=oe[Te];de+=Be.chunkSize(),Me+=Be.height,Be.parent=this}this.size=de,this.height=Me,this.parent=null}$o.prototype={chunkSize:function(){return this.size},removeInner:function(oe,de){this.size-=de;for(var Me=0;Me<this.children.length;++Me){var Te=this.children[Me],Be=Te.chunkSize();if(oe<Be){var at=Math.min(de,Be-oe),Pt=Te.height;if(Te.removeInner(oe,at),this.height-=Pt-Te.height,Be==at&&(this.children.splice(Me--,1),Te.parent=null),(de-=at)==0)break;oe=0}else oe-=Be}if(this.size-de<25&&(this.children.length>1||!(this.children[0]instanceof Sa))){var Bt=[];this.collapse(Bt),this.children=[new Sa(Bt)],this.children[0].parent=this}},collapse:function(oe){for(var de=0;de<this.children.length;++de)this.children[de].collapse(oe)},insertInner:function(oe,de,Me){this.size+=de.length,this.height+=Me;for(var Te=0;Te<this.children.length;++Te){var Be=this.children[Te],at=Be.chunkSize();if(oe<=at){if(Be.insertInner(oe,de,Me),Be.lines&&Be.lines.length>50){for(var Pt=Be.lines.length%25+25,Bt=Pt;Bt<Be.lines.length;){var Dt=new Sa(Be.lines.slice(Bt,Bt+=25));Be.height-=Dt.height,this.children.splice(++Te,0,Dt),Dt.parent=this}Be.lines=Be.lines.slice(0,Pt),this.maybeSpill()}break}oe-=at}},maybeSpill:function(){if(!(this.children.length<=10)){var oe=this;do{var de=oe.children.splice(oe.children.length-5,5),Me=new $o(de);if(oe.parent){oe.size-=Me.size,oe.height-=Me.height;var Be=xt(oe.parent.children,oe);oe.parent.children.splice(Be+1,0,Me)}else{var Te=new $o(oe.children);Te.parent=oe,oe.children=[Te,Me],oe=Te}Me.parent=oe.parent}while(oe.children.length>10);oe.parent.maybeSpill()}},iterN:function(oe,de,Me){for(var Te=0;Te<this.children.length;++Te){var Be=this.children[Te],at=Be.chunkSize();if(oe<at){var Pt=Math.min(de,at-oe);if(Be.iterN(oe,Pt,Me))return!0;if((de-=Pt)==0)break;oe=0}else oe-=at}}};var vs=function(oe,de,Me){if(Me)for(var Te in Me)Me.hasOwnProperty(Te)&&(this[Te]=Me[Te]);this.doc=oe,this.node=de};vs.prototype.clear=function(){var oe=this.doc.cm,de=this.line.widgets,Me=this.line,Te=Yt(Me);if(!(Te==null||!de)){for(var Be=0;Be<de.length;++Be)de[Be]==this&&de.splice(Be--,1);de.length||(Me.widgets=null);var at=tl(this);Pn(Me,Math.max(0,Me.height-at)),oe&&(fn(oe,function(){gl(oe,Me,-at),Po(oe,Te,"widget")}),kr(oe,"lineWidgetCleared",oe,this,Te))}},vs.prototype.changed=function(){var oe=this,de=this.height,Me=this.doc.cm,Te=this.line;this.height=null;var Be=tl(this)-de;Be&&(Zn(this.doc,Te)||Pn(Te,Te.height+Be),Me&&fn(Me,function(){Me.curOp.forceUpdate=!0,gl(Me,Te,Be),kr(Me,"lineWidgetChanged",Me,oe,Yt(Te))}))},vn(vs);function gl(oe,de,Me){yo(de)<(oe.curOp&&oe.curOp.scrollTop||oe.doc.scrollTop)&&Ed(oe,Me)}function gu(oe,de,Me,Te){var Be=new vs(oe,Me,Te),at=oe.cm;return at&&Be.noHScroll&&(at.display.alignWidgets=!0),us(oe,de,"widget",function(Pt){var Bt=Pt.widgets||(Pt.widgets=[]);if(Be.insertAt==null?Bt.push(Be):Bt.splice(Math.min(Bt.length-1,Math.max(0,Be.insertAt)),0,Be),Be.line=Pt,at&&!Zn(oe,Pt)){var Dt=yo(Pt)<oe.scrollTop;Pn(Pt,Pt.height+tl(Be)),Dt&&Ed(at,Be.height),at.curOp.forceUpdate=!0}return!0}),at&&kr(at,"lineWidgetAdded",at,Be,typeof de=="number"?de:Yt(de)),Be}var cf=0,cn=function(oe,de){this.lines=[],this.type=de,this.doc=oe,this.id=++cf};cn.prototype.clear=function(){if(!this.explicitlyCleared){var oe=this.doc.cm,de=oe&&!oe.curOp;if(de&&fl(oe),on(this,"clear")){var Me=this.find();Me&&kr(this,"clear",Me.from,Me.to)}for(var Te=null,Be=null,at=0;at<this.lines.length;++at){var Pt=this.lines[at],Bt=xo(Pt.markedSpans,this);oe&&!this.collapsed?Po(oe,Yt(Pt),"text"):oe&&(Bt.to!=null&&(Be=Yt(Pt)),Bt.from!=null&&(Te=Yt(Pt))),Pt.markedSpans=Mi(Pt.markedSpans,Bt),Bt.from==null&&this.collapsed&&!Zn(this.doc,Pt)&&oe&&Pn(Pt,Gu(oe.display))}if(oe&&this.collapsed&&!oe.options.lineWrapping)for(var Dt=0;Dt<this.lines.length;++Dt){var Vt=bi(this.lines[Dt]),yn=ta(Vt);yn>oe.display.maxLineLength&&(oe.display.maxLine=Vt,oe.display.maxLineLength=yn,oe.display.maxLineChanged=!0)}Te!=null&&oe&&this.collapsed&&ma(oe,Te,Be+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,oe&&$l(oe.doc)),oe&&kr(oe,"markerCleared",oe,this,Te,Be),de&&bc(oe),this.parent&&this.parent.clear()}},cn.prototype.find=function(oe,de){oe==null&&this.type=="bookmark"&&(oe=1);for(var Me,Te,Be=0;Be<this.lines.length;++Be){var at=this.lines[Be],Pt=xo(at.markedSpans,this);if(Pt.from!=null&&(Me=rn(de?at:Yt(at),Pt.from),oe==-1))return Me;if(Pt.to!=null&&(Te=rn(de?at:Yt(at),Pt.to),oe==1))return Te}return Me&&{from:Me,to:Te}},cn.prototype.changed=function(){var oe=this,de=this.find(-1,!0),Me=this,Te=this.doc.cm;!de||!Te||fn(Te,function(){var Be=de.line,at=Yt(de.line),Pt=vc(Te,at);if(Pt&&(Es(Pt),Te.curOp.selectionChanged=Te.curOp.forceUpdate=!0),Te.curOp.updateMaxLine=!0,!Zn(Me.doc,Be)&&Me.height!=null){var Bt=Me.height;Me.height=null;var Dt=tl(Me)-Bt;Dt&&Pn(Be,Be.height+Dt)}kr(Te,"markerChanged",Te,oe)})},cn.prototype.attachLine=function(oe){if(!this.lines.length&&this.doc.cm){var de=this.doc.cm.curOp;(!de.maybeHiddenMarkers||xt(de.maybeHiddenMarkers,this)==-1)&&(de.maybeUnhiddenMarkers||(de.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(oe)},cn.prototype.detachLine=function(oe){if(this.lines.splice(xt(this.lines,oe),1),!this.lines.length&&this.doc.cm){var de=this.doc.cm.curOp;(de.maybeHiddenMarkers||(de.maybeHiddenMarkers=[])).push(this)}},vn(cn);function Pc(oe,de,Me,Te,Be){if(Te&&Te.shared)return hf(oe,de,Me,Te,Be);if(oe.cm&&!oe.cm.curOp)return Rn(oe.cm,Pc)(oe,de,Me,Te,Be);var at=new cn(oe,Be),Pt=Mn(de,Me);if(Te&&Lt(Te,at,!1),Pt>0||Pt==0&&at.clearWhenEmpty!==!1)return at;if(at.replacedWith&&(at.collapsed=!0,at.widgetNode=Fe("span",[at.replacedWith],"CodeMirror-widget"),Te.handleMouseEvents||at.widgetNode.setAttribute("cm-ignore-events","true"),Te.insertLeft&&(at.widgetNode.insertLeft=!0)),at.collapsed){if(Vi(oe,de.line,de,Me,at)||de.line!=Me.line&&Vi(oe,Me.line,de,Me,at))throw new Error("Inserting collapsed marker partially overlapping an existing one");Nn()}at.addToHistory&&Fo(oe,{from:de,to:Me,origin:"markText"},oe.sel,NaN);var Bt=de.line,Dt=oe.cm,Vt;if(oe.iter(Bt,Me.line+1,function(Jt){Dt&&at.collapsed&&!Dt.options.lineWrapping&&bi(Jt)==Dt.display.maxLine&&(Vt=!0),at.collapsed&&Bt!=de.line&&Pn(Jt,0),Go(Jt,new gi(at,Bt==de.line?de.ch:null,Bt==Me.line?Me.ch:null)),++Bt}),at.collapsed&&oe.iter(de.line,Me.line+1,function(Jt){Zn(oe,Jt)&&Pn(Jt,0)}),at.clearOnEnter&&Tt(at,"beforeCursorEnter",function(){return at.clear()}),at.readOnly&&(Ki(),(oe.history.done.length||oe.history.undone.length)&&oe.clearHistory()),at.collapsed&&(at.id=++cf,at.atomic=!0),Dt){if(Vt&&(Dt.curOp.updateMaxLine=!0),at.collapsed)ma(Dt,de.line,Me.line+1);else if(at.className||at.startStyle||at.endStyle||at.css||at.attributes||at.title)for(var yn=de.line;yn<=Me.line;yn++)Po(Dt,yn,"text");at.atomic&&$l(Dt.doc),kr(Dt,"markerAdded",Dt,at)}return at}var Vu=function(oe,de){this.markers=oe,this.primary=de;for(var Me=0;Me<oe.length;++Me)oe[Me].parent=this};Vu.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var oe=0;oe<this.markers.length;++oe)this.markers[oe].clear();kr(this,"clear")}},Vu.prototype.find=function(oe,de){return this.primary.find(oe,de)},vn(Vu);function hf(oe,de,Me,Te,Be){Te=Lt(Te),Te.shared=!1;var at=[Pc(oe,de,Me,Te,Be)],Pt=at[0],Bt=Te.widgetNode;return is(oe,function(Dt){Bt&&(Te.widgetNode=Bt.cloneNode(!0)),at.push(Pc(Dt,Dn(Dt,de),Dn(Dt,Me),Te,Be));for(var Vt=0;Vt<Dt.linked.length;++Vt)if(Dt.linked[Vt].isParent)return;Pt=Ct(at)}),new Vu(at,Pt)}function gh(oe){return oe.findMarks(rn(oe.first,0),oe.clipPos(rn(oe.lastLine())),function(de){return de.parent})}function Yc(oe,de){for(var Me=0;Me<de.length;Me++){var Te=de[Me],Be=Te.find(),at=oe.clipPos(Be.from),Pt=oe.clipPos(Be.to);if(Mn(at,Pt)){var Bt=Pc(oe,at,Pt,Te.primary,Te.primary.type);Te.markers.push(Bt),Bt.parent=Te}}}function Md(oe){for(var de=function(Te){var Be=oe[Te],at=[Be.primary.doc];is(Be.primary.doc,function(Dt){return at.push(Dt)});for(var Pt=0;Pt<Be.markers.length;Pt++){var Bt=Be.markers[Pt];xt(at,Bt.doc)==-1&&(Bt.parent=null,Be.markers.splice(Pt--,1))}},Me=0;Me<oe.length;Me++)de(Me)}var Kp=0,Ms=function(oe,de,Me,Te,Be){if(!(this instanceof Ms))return new Ms(oe,de,Me,Te,Be);Me==null&&(Me=0),$o.call(this,[new Sa([new Zo("",null)])]),this.first=Me,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=Me;var at=rn(Me,0);this.sel=So(at),this.history=new Ai(null),this.id=++Kp,this.modeOption=de,this.lineSep=Te,this.direction=Be=="rtl"?"rtl":"ltr",this.extend=!1,typeof oe=="string"&&(oe=this.splitLines(oe)),va(this,{from:at,to:at,text:oe}),da(this,So(at),mt)};Ms.prototype=Ke($o.prototype,{constructor:Ms,iter:function(oe,de,Me){Me?this.iterN(oe-this.first,de-oe,Me):this.iterN(this.first,this.first+this.size,oe)},insert:function(oe,de){for(var Me=0,Te=0;Te<de.length;++Te)Me+=de[Te].height;this.insertInner(oe-this.first,de,Me)},remove:function(oe,de){this.removeInner(oe-this.first,de)},getValue:function(oe){var de=ir(this,this.first,this.first+this.size);return oe===!1?de:de.join(oe||this.lineSeparator())},setValue:In(function(oe){var de=rn(this.first,0),Me=this.first+this.size-1;Ga(this,{from:de,to:rn(Me,Cn(this,Me).text.length),text:this.splitLines(oe),origin:"setValue",full:!0},!0),this.cm&&Zc(this.cm,0,0),da(this,So(de),mt)}),replaceRange:function(oe,de,Me,Te){de=Dn(this,de),Me=Me?Dn(this,Me):de,Ku(this,oe,de,Me,Te)},getRange:function(oe,de,Me){var Te=Gn(this,Dn(this,oe),Dn(this,de));return Me===!1?Te:Te.join(Me||this.lineSeparator())},getLine:function(oe){var de=this.getLineHandle(oe);return de&&de.text},getLineHandle:function(oe){if(Qn(this,oe))return Cn(this,oe)},getLineNumber:function(oe){return Yt(oe)},getLineHandleVisualStart:function(oe){return typeof oe=="number"&&(oe=Cn(this,oe)),bi(oe)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(oe){return Dn(this,oe)},getCursor:function(oe){var de=this.sel.primary(),Me;return oe==null||oe=="head"?Me=de.head:oe=="anchor"?Me=de.anchor:oe=="end"||oe=="to"||oe===!1?Me=de.to():Me=de.from(),Me},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:In(function(oe,de,Me){Xa(this,Dn(this,typeof oe=="number"?rn(oe,de||0):oe),null,Me)}),setSelection:In(function(oe,de,Me){Xa(this,Dn(this,oe),Dn(this,de||oe),Me)}),extendSelection:In(function(oe,de,Me){Qo(this,Dn(this,oe),de&&Dn(this,de),Me)}),extendSelections:In(function(oe,de){ra(this,Fn(this,oe),de)}),extendSelectionsBy:In(function(oe,de){var Me=gt(this.sel.ranges,oe);ra(this,Fn(this,Me),de)}),setSelections:In(function(oe,de,Me){if(oe.length){for(var Te=[],Be=0;Be<oe.length;Be++)Te[Be]=new ii(Dn(this,oe[Be].anchor),Dn(this,oe[Be].head));de==null&&(de=Math.min(oe.length-1,this.sel.primIndex)),da(this,ho(this.cm,Te,de),Me)}}),addSelection:In(function(oe,de,Me){var Te=this.sel.ranges.slice(0);Te.push(new ii(Dn(this,oe),Dn(this,de||oe))),da(this,ho(this.cm,Te,Te.length-1),Me)}),getSelection:function(oe){for(var de=this.sel.ranges,Me,Te=0;Te<de.length;Te++){var Be=Gn(this,de[Te].from(),de[Te].to());Me=Me?Me.concat(Be):Be}return oe===!1?Me:Me.join(oe||this.lineSeparator())},getSelections:function(oe){for(var de=[],Me=this.sel.ranges,Te=0;Te<Me.length;Te++){var Be=Gn(this,Me[Te].from(),Me[Te].to());oe!==!1&&(Be=Be.join(oe||this.lineSeparator())),de[Te]=Be}return de},replaceSelection:function(oe,de,Me){for(var Te=[],Be=0;Be<this.sel.ranges.length;Be++)Te[Be]=oe;this.replaceSelections(Te,de,Me||"+input")},replaceSelections:In(function(oe,de,Me){for(var Te=[],Be=this.sel,at=0;at<Be.ranges.length;at++){var Pt=Be.ranges[at];Te[at]={from:Pt.from(),to:Pt.to(),text:this.splitLines(oe[at]),origin:Me}}for(var Bt=de&&de!="end"&&mo(this,Te,de),Dt=Te.length-1;Dt>=0;Dt--)Ga(this,Te[Dt]);Bt?Lo(this,Bt):this.cm&&Sc(this.cm)}),undo:In(function(){Hl(this,"undo")}),redo:In(function(){Hl(this,"redo")}),undoSelection:In(function(){Hl(this,"undo",!0)}),redoSelection:In(function(){Hl(this,"redo",!0)}),setExtending:function(oe){this.extend=oe},getExtending:function(){return this.extend},historySize:function(){for(var oe=this.history,de=0,Me=0,Te=0;Te<oe.done.length;Te++)oe.done[Te].ranges||++de;for(var Be=0;Be<oe.undone.length;Be++)oe.undone[Be].ranges||++Me;return{undo:de,redo:Me}},clearHistory:function(){var oe=this;this.history=new Ai(this.history.maxGeneration),is(this,function(de){return de.history=oe.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(oe){return oe&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(oe){return this.history.generation==(oe||this.cleanGeneration)},getHistory:function(){return{done:ps(this.history.done),undone:ps(this.history.undone)}},setHistory:function(oe){var de=this.history=new Ai(this.history.maxGeneration);de.done=ps(oe.done.slice(0),null,!0),de.undone=ps(oe.undone.slice(0),null,!0)},setGutterMarker:In(function(oe,de,Me){return us(this,oe,"gutter",function(Te){var Be=Te.gutterMarkers||(Te.gutterMarkers={});return Be[de]=Me,!Me&&lt(Be)&&(Te.gutterMarkers=null),!0})}),clearGutter:In(function(oe){var de=this;this.iter(function(Me){Me.gutterMarkers&&Me.gutterMarkers[oe]&&us(de,Me,"gutter",function(){return Me.gutterMarkers[oe]=null,lt(Me.gutterMarkers)&&(Me.gutterMarkers=null),!0})})}),lineInfo:function(oe){var de;if(typeof oe=="number"){if(!Qn(this,oe)||(de=oe,oe=Cn(this,oe),!oe))return null}else if(de=Yt(oe),de==null)return null;return{line:de,handle:oe,text:oe.text,gutterMarkers:oe.gutterMarkers,textClass:oe.textClass,bgClass:oe.bgClass,wrapClass:oe.wrapClass,widgets:oe.widgets}},addLineClass:In(function(oe,de,Me){return us(this,oe,de=="gutter"?"gutter":"class",function(Te){var Be=de=="text"?"textClass":de=="background"?"bgClass":de=="gutter"?"gutterClass":"wrapClass";if(!Te[Be])Te[Be]=Me;else{if(Pe(Me).test(Te[Be]))return!1;Te[Be]+=" "+Me}return!0})}),removeLineClass:In(function(oe,de,Me){return us(this,oe,de=="gutter"?"gutter":"class",function(Te){var Be=de=="text"?"textClass":de=="background"?"bgClass":de=="gutter"?"gutterClass":"wrapClass",at=Te[Be];if(at)if(Me==null)Te[Be]=null;else{var Pt=at.match(Pe(Me));if(!Pt)return!1;var Bt=Pt.index+Pt[0].length;Te[Be]=at.slice(0,Pt.index)+(!Pt.index||Bt==at.length?"":" ")+at.slice(Bt)||null}else return!1;return!0})}),addLineWidget:In(function(oe,de,Me){return gu(this,oe,de,Me)}),removeLineWidget:function(oe){oe.clear()},markText:function(oe,de,Me){return Pc(this,Dn(this,oe),Dn(this,de),Me,Me&&Me.type||"range")},setBookmark:function(oe,de){var Me={replacedWith:de&&(de.nodeType==null?de.widget:de),insertLeft:de&&de.insertLeft,clearWhenEmpty:!1,shared:de&&de.shared,handleMouseEvents:de&&de.handleMouseEvents};return oe=Dn(this,oe),Pc(this,oe,oe,Me,"bookmark")},findMarksAt:function(oe){oe=Dn(this,oe);var de=[],Me=Cn(this,oe.line).markedSpans;if(Me)for(var Te=0;Te<Me.length;++Te){var Be=Me[Te];(Be.from==null||Be.from<=oe.ch)&&(Be.to==null||Be.to>=oe.ch)&&de.push(Be.marker.parent||Be.marker)}return de},findMarks:function(oe,de,Me){oe=Dn(this,oe),de=Dn(this,de);var Te=[],Be=oe.line;return this.iter(oe.line,de.line+1,function(at){var Pt=at.markedSpans;if(Pt)for(var Bt=0;Bt<Pt.length;Bt++){var Dt=Pt[Bt];!(Dt.to!=null&&Be==oe.line&&oe.ch>=Dt.to||Dt.from==null&&Be!=oe.line||Dt.from!=null&&Be==de.line&&Dt.from>=de.ch)&&(!Me||Me(Dt.marker))&&Te.push(Dt.marker.parent||Dt.marker)}++Be}),Te},getAllMarks:function(){var oe=[];return this.iter(function(de){var Me=de.markedSpans;if(Me)for(var Te=0;Te<Me.length;++Te)Me[Te].from!=null&&oe.push(Me[Te].marker)}),oe},posFromIndex:function(oe){var de,Me=this.first,Te=this.lineSeparator().length;return this.iter(function(Be){var at=Be.text.length+Te;if(at>oe)return de=oe,!0;oe-=at,++Me}),Dn(this,rn(Me,de))},indexFromPos:function(oe){oe=Dn(this,oe);var de=oe.ch;if(oe.line<this.first||oe.ch<0)return 0;var Me=this.lineSeparator().length;return this.iter(this.first,oe.line,function(Te){de+=Te.text.length+Me}),de},copy:function(oe){var de=new Ms(ir(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return de.scrollTop=this.scrollTop,de.scrollLeft=this.scrollLeft,de.sel=this.sel,de.extend=!1,oe&&(de.history.undoDepth=this.history.undoDepth,de.setHistory(this.getHistory())),de},linkedDoc:function(oe){oe||(oe={});var de=this.first,Me=this.first+this.size;oe.from!=null&&oe.from>de&&(de=oe.from),oe.to!=null&&oe.to<Me&&(Me=oe.to);var Te=new Ms(ir(this,de,Me),oe.mode||this.modeOption,de,this.lineSep,this.direction);return oe.sharedHist&&(Te.history=this.history),(this.linked||(this.linked=[])).push({doc:Te,sharedHist:oe.sharedHist}),Te.linked=[{doc:this,isParent:!0,sharedHist:oe.sharedHist}],Yc(Te,gh(this)),Te},unlinkDoc:function(oe){if(oe instanceof na&&(oe=oe.doc),this.linked)for(var de=0;de<this.linked.length;++de){var Me=this.linked[de];if(Me.doc==oe){this.linked.splice(de,1),oe.unlinkDoc(this),Md(gh(this));break}}if(oe.history==this.history){var Te=[oe.id];is(oe,function(Be){return Te.push(Be.id)},!0),oe.history=new Ai(null),oe.history.done=ps(this.history.done,Te),oe.history.undone=ps(this.history.undone,Te)}},iterLinkedDocs:function(oe){is(this,oe)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(oe){return this.lineSep?oe.split(this.lineSep):Cr(oe)},lineSeparator:function(){return this.lineSep||`
`},setDirection:In(function(oe){oe!="rtl"&&(oe="ltr"),oe!=this.direction&&(this.direction=oe,this.iter(function(de){return de.order=null}),this.cm&&eo(this.cm))})}),Ms.prototype.eachLine=Ms.prototype.iter;var Kh=0;function Ld(oe){var de=this;if(Zf(de),!(Nt(de,oe)||nl(de.display,oe))){kn(oe),je&&(Kh=+new Date);var Me=rl(de,oe,!0),Te=oe.dataTransfer.files;if(!(!Me||de.isReadOnly()))if(Te&&Te.length&&window.FileReader&&window.File)for(var Be=Te.length,at=Array(Be),Pt=0,Bt=function(){++Pt==Be&&Rn(de,function(){Me=Dn(de.doc,Me);var Bn={from:Me,to:Me,text:de.doc.splitLines(at.filter(function(fr){return fr!=null}).join(de.doc.lineSeparator())),origin:"paste"};Ga(de.doc,Bn),Lo(de.doc,So(Dn(de.doc,Me),Dn(de.doc,Yo(Bn))))})()},Dt=function(Bn,fr){if(de.options.allowDropFileTypes&&xt(de.options.allowDropFileTypes,Bn.type)==-1){Bt();return}var wr=new FileReader;wr.onerror=function(){return Bt()},wr.onload=function(){var _r=wr.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(_r)){Bt();return}at[fr]=_r,Bt()},wr.readAsText(Bn)},Vt=0;Vt<Te.length;Vt++)Dt(Te[Vt],Vt);else{if(de.state.draggingText&&de.doc.sel.contains(Me)>-1){de.state.draggingText(oe),setTimeout(function(){return de.display.input.focus()},20);return}try{var yn=oe.dataTransfer.getData("Text");if(yn){var Jt;if(de.state.draggingText&&!de.state.draggingText.copy&&(Jt=de.listSelections()),ms(de.doc,So(Me,Me)),Jt)for(var Hn=0;Hn<Jt.length;++Hn)Ku(de.doc,"",Jt[Hn].anchor,Jt[Hn].head,"drag");de.replaceSelection(yn,"around","paste"),de.display.input.focus()}}catch(Bn){}}}}function Vh(oe,de){if(je&&(!oe.state.draggingText||+new Date-Kh<100)){pr(de);return}if(!(Nt(oe,de)||nl(oe.display,de))&&(de.dataTransfer.setData("Text",oe.getSelection()),de.dataTransfer.effectAllowed="copyMove",de.dataTransfer.setDragImage&&!we)){var Me=Oe("img",null,null,"position: fixed; left: 0; top: 0;");Me.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",ye&&(Me.width=Me.height=1,oe.display.wrapper.appendChild(Me),Me._top=Me.offsetTop),de.dataTransfer.setDragImage(Me,0,0),ye&&Me.parentNode.removeChild(Me)}}function df(oe,de){var Me=rl(oe,de);if(Me){var Te=document.createDocumentFragment();_o(oe,Me,Te),oe.display.dragCursor||(oe.display.dragCursor=Oe("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),oe.display.lineSpace.insertBefore(oe.display.dragCursor,oe.display.cursorDiv)),Ae(oe.display.dragCursor,Te)}}function Zf(oe){oe.display.dragCursor&&(oe.display.lineSpace.removeChild(oe.display.dragCursor),oe.display.dragCursor=null)}function ff(oe){if(document.getElementsByClassName){for(var de=document.getElementsByClassName("CodeMirror"),Me=[],Te=0;Te<de.length;Te++){var Be=de[Te].CodeMirror;Be&&Me.push(Be)}Me.length&&Me[0].operation(function(){for(var at=0;at<Me.length;at++)oe(Me[at])})}}var kd=!1;function Ul(){kd||(mh(),kd=!0)}function mh(){var oe;Tt(window,"resize",function(){oe==null&&(oe=setTimeout(function(){oe=null,ff(pf)},100))}),Tt(window,"blur",function(){return ff(Vc)})}function pf(oe){var de=oe.display;de.cachedCharWidth=de.cachedTextHeight=de.cachedPaddingH=null,de.scrollbarsClipped=!1,oe.setSize()}for(var Lu={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"},Cc=0;Cc<10;Cc++)Lu[Cc+48]=Lu[Cc+96]=String(Cc);for(var vh=65;vh<=90;vh++)Lu[vh]=String.fromCharCode(vh);for(var Jc=1;Jc<=12;Jc++)Lu[Jc+111]=Lu[Jc+63235]="F"+Jc;var ml={};ml.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"},ml.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"},ml.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"},ml.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"]},ml.default=ae?ml.macDefault:ml.pcDefault;function Od(oe){var de=oe.split(/-(?!$)/);oe=de[de.length-1];for(var Me,Te,Be,at,Pt=0;Pt<de.length-1;Pt++){var Bt=de[Pt];if(/^(cmd|meta|m)$/i.test(Bt))at=!0;else if(/^a(lt)?$/i.test(Bt))Me=!0;else if(/^(c|ctrl|control)$/i.test(Bt))Te=!0;else if(/^s(hift)?$/i.test(Bt))Be=!0;else throw new Error("Unrecognized modifier name: "+Bt)}return Me&&(oe="Alt-"+oe),Te&&(oe="Ctrl-"+oe),at&&(oe="Cmd-"+oe),Be&&(oe="Shift-"+oe),oe}function Nd(oe){var de={};for(var Me in oe)if(oe.hasOwnProperty(Me)){var Te=oe[Me];if(/^(name|fallthrough|(de|at)tach)$/.test(Me))continue;if(Te=="..."){delete oe[Me];continue}for(var Be=gt(Me.split(" "),Od),at=0;at<Be.length;at++){var Pt=void 0,Bt=void 0;at==Be.length-1?(Bt=Be.join(" "),Pt=Te):(Bt=Be.slice(0,at+1).join(" "),Pt="...");var Dt=de[Bt];if(!Dt)de[Bt]=Pt;else if(Dt!=Pt)throw new Error("Inconsistent bindings for "+Bt)}delete oe[Me]}for(var Vt in de)oe[Vt]=de[Vt];return oe}function Wl(oe,de,Me,Te){de=Ec(de);var Be=de.call?de.call(oe,Te):de[oe];if(Be===!1)return"nothing";if(Be==="...")return"multi";if(Be!=null&&Me(Be))return"handled";if(de.fallthrough){if(Object.prototype.toString.call(de.fallthrough)!="[object Array]")return Wl(oe,de.fallthrough,Me,Te);for(var at=0;at<de.fallthrough.length;at++){var Pt=Wl(oe,de.fallthrough[at],Me,Te);if(Pt)return Pt}}}function yh(oe){var de=typeof oe=="string"?oe:Lu[oe.keyCode];return de=="Ctrl"||de=="Alt"||de=="Shift"||de=="Mod"}function Ad(oe,de,Me){var Te=oe;return de.altKey&&Te!="Alt"&&(oe="Alt-"+oe),(pe?de.metaKey:de.ctrlKey)&&Te!="Ctrl"&&(oe="Ctrl-"+oe),(pe?de.ctrlKey:de.metaKey)&&Te!="Mod"&&(oe="Cmd-"+oe),!Me&&de.shiftKey&&Te!="Shift"&&(oe="Shift-"+oe),oe}function jd(oe,de){if(ye&&oe.keyCode==34&&oe.char)return!1;var Me=Lu[oe.keyCode];return Me==null||oe.altGraphKey?!1:(oe.keyCode==3&&oe.code&&(Me=oe.code),Ad(Me,oe,de))}function Ec(oe){return typeof oe=="string"?ml[oe]:oe}function ol(oe,de){for(var Me=oe.doc.sel.ranges,Te=[],Be=0;Be<Me.length;Be++){for(var at=de(Me[Be]);Te.length&&Mn(at.from,Ct(Te).to)<=0;){var Pt=Te.pop();if(Mn(Pt.from,at.from)<0){at.from=Pt.from;break}}Te.push(at)}fn(oe,function(){for(var Bt=Te.length-1;Bt>=0;Bt--)Ku(oe.doc,"",Te[Bt].from,Te[Bt].to,"+delete");Sc(oe)})}function Id(oe,de,Me){var Te=Ue(oe.text,de+Me,Me);return Te<0||Te>oe.text.length?null:Te}function cs(oe,de,Me){var Te=Id(oe,de.ch,Me);return Te==null?null:new rn(de.line,Te,Me<0?"after":"before")}function qo(oe,de,Me,Te,Be){if(oe){de.doc.direction=="rtl"&&(Be=-Be);var at=dt(Me,de.doc.direction);if(at){var Pt=Be<0?Ct(at):at[0],Bt=Be<0==(Pt.level==1),Dt=Bt?"after":"before",Vt;if(Pt.level>0||de.doc.direction=="rtl"){var yn=_u(de,Me);Vt=Be<0?Me.text.length-1:0;var Jt=Rl(de,yn,Vt).top;Vt=qe(function(Hn){return Rl(de,yn,Hn).top==Jt},Be<0==(Pt.level==1)?Pt.from:Pt.to-1,Vt),Dt=="before"&&(Vt=Id(Me,Vt,1))}else Vt=Be<0?Pt.to:Pt.from;return new rn(Te,Vt,Dt)}}return new rn(Te,Be<0?Me.text.length:0,Be<0?"before":"after")}function Ta(oe,de,Me,Te){var Be=dt(de,oe.doc.direction);if(!Be)return cs(de,Me,Te);Me.ch>=de.text.length?(Me.ch=de.text.length,Me.sticky="before"):Me.ch<=0&&(Me.ch=0,Me.sticky="after");var at=Le(Be,Me.ch,Me.sticky),Pt=Be[at];if(oe.doc.direction=="ltr"&&Pt.level%2==0&&(Te>0?Pt.to>Me.ch:Pt.from<Me.ch))return cs(de,Me,Te);var Bt=function(oi,Ti){return Id(de,oi instanceof rn?oi.ch:oi,Ti)},Dt,Vt=function(oi){return oe.options.lineWrapping?(Dt=Dt||_u(oe,de),fh(oe,de,Dt,oi)):{begin:0,end:de.text.length}},yn=Vt(Me.sticky=="before"?Bt(Me,-1):Me.ch);if(oe.doc.direction=="rtl"||Pt.level==1){var Jt=Pt.level==1==Te<0,Hn=Bt(Me,Jt?1:-1);if(Hn!=null&&(Jt?Hn<=Pt.to&&Hn<=yn.end:Hn>=Pt.from&&Hn>=yn.begin)){var Bn=Jt?"before":"after";return new rn(Me.line,Hn,Bn)}}var fr=function(oi,Ti,vi){for(var Bi=function(Ja,Ds){return Ds?new rn(Me.line,Bt(Ja,1),"before"):new rn(Me.line,Ja,"after")};oi>=0&&oi<Be.length;oi+=Ti){var fo=Be[oi],pi=Ti>0==(fo.level!=1),ko=pi?vi.begin:Bt(vi.end,-1);if(fo.from<=ko&&ko<fo.to||(ko=pi?fo.from:Bt(fo.to,-1),vi.begin<=ko&&ko<vi.end))return Bi(ko,pi)}},wr=fr(at+Te,Te,yn);if(wr)return wr;var _r=Te>0?yn.end:Bt(yn.begin,-1);return _r!=null&&!(Te>0&&_r==de.text.length)&&(wr=fr(Te>0?0:Be.length-1,Te,Vt(_r)),wr)?wr:null}var js={selectAll:ea,singleSelection:function(oe){return oe.setSelection(oe.getCursor("anchor"),oe.getCursor("head"),mt)},killLine:function(oe){return ol(oe,function(de){if(de.empty()){var Me=Cn(oe.doc,de.head.line).text.length;return de.head.ch==Me&&de.head.line<oe.lastLine()?{from:de.head,to:rn(de.head.line+1,0)}:{from:de.head,to:rn(de.head.line,Me)}}else return{from:de.from(),to:de.to()}})},deleteLine:function(oe){return ol(oe,function(de){return{from:rn(de.from().line,0),to:Dn(oe.doc,rn(de.to().line+1,0))}})},delLineLeft:function(oe){return ol(oe,function(de){return{from:rn(de.from().line,0),to:de.from()}})},delWrappedLineLeft:function(oe){return ol(oe,function(de){var Me=oe.charCoords(de.head,"div").top+5,Te=oe.coordsChar({left:0,top:Me},"div");return{from:Te,to:de.from()}})},delWrappedLineRight:function(oe){return ol(oe,function(de){var Me=oe.charCoords(de.head,"div").top+5,Te=oe.coordsChar({left:oe.display.lineDiv.offsetWidth+100,top:Me},"div");return{from:de.from(),to:Te}})},undo:function(oe){return oe.undo()},redo:function(oe){return oe.redo()},undoSelection:function(oe){return oe.undoSelection()},redoSelection:function(oe){return oe.redoSelection()},goDocStart:function(oe){return oe.extendSelection(rn(oe.firstLine(),0))},goDocEnd:function(oe){return oe.extendSelection(rn(oe.lastLine()))},goLineStart:function(oe){return oe.extendSelectionsBy(function(de){return ru(oe,de.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(oe){return oe.extendSelectionsBy(function(de){return Dd(oe,de.head)},{origin:"+move",bias:1})},goLineEnd:function(oe){return oe.extendSelectionsBy(function(de){return iu(oe,de.head.line)},{origin:"+move",bias:-1})},goLineRight:function(oe){return oe.extendSelectionsBy(function(de){var Me=oe.cursorCoords(de.head,"div").top+5;return oe.coordsChar({left:oe.display.lineDiv.offsetWidth+100,top:Me},"div")},vt)},goLineLeft:function(oe){return oe.extendSelectionsBy(function(de){var Me=oe.cursorCoords(de.head,"div").top+5;return oe.coordsChar({left:0,top:Me},"div")},vt)},goLineLeftSmart:function(oe){return oe.extendSelectionsBy(function(de){var Me=oe.cursorCoords(de.head,"div").top+5,Te=oe.coordsChar({left:0,top:Me},"div");return Te.ch<oe.getLine(Te.line).search(/\S/)?Dd(oe,de.head):Te},vt)},goLineUp:function(oe){return oe.moveV(-1,"line")},goLineDown:function(oe){return oe.moveV(1,"line")},goPageUp:function(oe){return oe.moveV(-1,"page")},goPageDown:function(oe){return oe.moveV(1,"page")},goCharLeft:function(oe){return oe.moveH(-1,"char")},goCharRight:function(oe){return oe.moveH(1,"char")},goColumnLeft:function(oe){return oe.moveH(-1,"column")},goColumnRight:function(oe){return oe.moveH(1,"column")},goWordLeft:function(oe){return oe.moveH(-1,"word")},goGroupRight:function(oe){return oe.moveH(1,"group")},goGroupLeft:function(oe){return oe.moveH(-1,"group")},goWordRight:function(oe){return oe.moveH(1,"word")},delCharBefore:function(oe){return oe.deleteH(-1,"codepoint")},delCharAfter:function(oe){return oe.deleteH(1,"char")},delWordBefore:function(oe){return oe.deleteH(-1,"word")},delWordAfter:function(oe){return oe.deleteH(1,"word")},delGroupBefore:function(oe){return oe.deleteH(-1,"group")},delGroupAfter:function(oe){return oe.deleteH(1,"group")},indentAuto:function(oe){return oe.indentSelection("smart")},indentMore:function(oe){return oe.indentSelection("add")},indentLess:function(oe){return oe.indentSelection("subtract")},insertTab:function(oe){return oe.replaceSelection(" ")},insertSoftTab:function(oe){for(var de=[],Me=oe.listSelections(),Te=oe.options.tabSize,Be=0;Be<Me.length;Be++){var at=Me[Be].from(),Pt=et(oe.getLine(at.line),at.ch,Te);de.push(Kt(Te-Pt%Te))}oe.replaceSelections(de)},defaultTab:function(oe){oe.somethingSelected()?oe.indentSelection("add"):oe.execCommand("insertTab")},transposeChars:function(oe){return fn(oe,function(){for(var de=oe.listSelections(),Me=[],Te=0;Te<de.length;Te++)if(de[Te].empty()){var Be=de[Te].head,at=Cn(oe.doc,Be.line).text;if(at){if(Be.ch==at.length&&(Be=new rn(Be.line,Be.ch-1)),Be.ch>0)Be=new rn(Be.line,Be.ch+1),oe.replaceRange(at.charAt(Be.ch-1)+at.charAt(Be.ch-2),rn(Be.line,Be.ch-2),Be,"+transpose");else if(Be.line>oe.doc.first){var Pt=Cn(oe.doc,Be.line-1).text;Pt&&(Be=new rn(Be.line,1),oe.replaceRange(at.charAt(0)+oe.doc.lineSeparator()+Pt.charAt(Pt.length-1),rn(Be.line-1,Pt.length-1),Be,"+transpose"))}}Me.push(new ii(Be,Be))}oe.setSelections(Me)})},newlineAndIndent:function(oe){return fn(oe,function(){for(var de=oe.listSelections(),Me=de.length-1;Me>=0;Me--)oe.replaceRange(oe.doc.lineSeparator(),de[Me].anchor,de[Me].head,"+input");de=oe.listSelections();for(var Te=0;Te<de.length;Te++)oe.indentLine(de[Te].from().line,null,!0);Sc(oe)})},openLine:function(oe){return oe.replaceSelection(`
`,"start")},toggleOverwrite:function(oe){return oe.toggleOverwrite()}};function ru(oe,de){var Me=Cn(oe.doc,de),Te=bi(Me);return Te!=Me&&(de=Yt(Te)),qo(!0,oe,Te,de,1)}function iu(oe,de){var Me=Cn(oe.doc,de),Te=vo(Me);return Te!=Me&&(de=Yt(Te)),qo(!0,oe,Me,de,-1)}function Dd(oe,de){var Me=ru(oe,de.line),Te=Cn(oe.doc,Me.line),Be=dt(Te,oe.doc.direction);if(!Be||Be[0].level==0){var at=Math.max(Me.ch,Te.text.search(/\S/)),Pt=de.line==Me.line&&de.ch<=at&&de.ch;return rn(Me.line,Pt?0:at,Me.sticky)}return Me}function Tc(oe,de,Me){if(typeof de=="string"&&(de=js[de],!de))return!1;oe.display.input.ensurePolled();var Te=oe.display.shift,Be=!1;try{oe.isReadOnly()&&(oe.state.suppressEdits=!0),Me&&(oe.display.shift=!1),Be=de(oe)!=Mt}finally{oe.display.shift=Te,oe.state.suppressEdits=!1}return Be}function Zh(oe,de,Me){for(var Te=0;Te<oe.state.keyMaps.length;Te++){var Be=Wl(de,oe.state.keyMaps[Te],Me,oe);if(Be)return Be}return oe.options.extraKeys&&Wl(de,oe.options.extraKeys,Me,oe)||Wl(de,oe.options.keyMap,Me,oe)}var mu=new it;function ac(oe,de,Me,Te){var Be=oe.state.keySeq;if(Be){if(yh(de))return"handled";if(/\'$/.test(de)?oe.state.keySeq=null:mu.set(50,function(){oe.state.keySeq==Be&&(oe.state.keySeq=null,oe.display.input.reset())}),Xf(oe,Be+" "+de,Me,Te))return!0}return Xf(oe,de,Me,Te)}function Xf(oe,de,Me,Te){var Be=Zh(oe,de,Te);return Be=="multi"&&(oe.state.keySeq=de),Be=="handled"&&kr(oe,"keyHandled",oe,de,Me),(Be=="handled"||Be=="multi")&&(kn(Me),sa(oe)),!!Be}function Yf(oe,de){var Me=jd(de,!0);return Me?de.shiftKey&&!oe.state.keySeq?ac(oe,"Shift-"+Me,de,function(Te){return Tc(oe,Te,!0)})||ac(oe,Me,de,function(Te){if(typeof Te=="string"?/^go[A-Z]/.test(Te):Te.motion)return Tc(oe,Te)}):ac(oe,Me,de,function(Te){return Tc(oe,Te)}):!1}function Jf(oe,de,Me){return ac(oe,"'"+Me+"'",de,function(Te){return Tc(oe,Te,!0)})}var Xh=null;function Vp(oe){var de=this;if(!(oe.target&&oe.target!=de.display.input.getField())&&(de.curOp.focus=ze(),!Nt(de,oe))){je&&ve<11&&oe.keyCode==27&&(oe.returnValue=!1);var Me=oe.keyCode;de.display.shift=Me==16||oe.shiftKey;var Te=Yf(de,oe);ye&&(Xh=Te?Me:null,!Te&&Me==88&&!di&&(ae?oe.metaKey:oe.ctrlKey)&&de.replaceSelection("",null,"cut")),rt&&!ae&&!Te&&Me==46&&oe.shiftKey&&!oe.ctrlKey&&document.execCommand&&document.execCommand("cut"),Me==18&&!/\bCodeMirror-crosshair\b/.test(de.display.lineDiv.className)&&Zp(de)}}function Zp(oe){var de=oe.display.lineDiv;Xe(de,"CodeMirror-crosshair");function Me(Te){(Te.keyCode==18||!Te.altKey)&&(Ie(de,"CodeMirror-crosshair"),Qt(document,"keyup",Me),Qt(document,"mouseover",Me))}Tt(document,"keyup",Me),Tt(document,"mouseover",Me)}function Xp(oe){oe.keyCode==16&&(this.doc.sel.shift=!1),Nt(this,oe)}function sc(oe){var de=this;if(!(oe.target&&oe.target!=de.display.input.getField())&&!(nl(de.display,oe)||Nt(de,oe)||oe.ctrlKey&&!oe.altKey||ae&&oe.metaKey)){var Me=oe.keyCode,Te=oe.charCode;if(ye&&Me==Xh){Xh=null,kn(oe);return}if(!(ye&&(!oe.which||oe.which<10)&&Yf(de,oe))){var Be=String.fromCharCode(Te==null?Me:Te);Be!="\b"&&(Jf(de,oe,Be)||de.display.input.onKeyPress(oe))}}}var om=400,Yp=function(oe,de,Me){this.time=oe,this.pos=de,this.button=Me};Yp.prototype.compare=function(oe,de,Me){return this.time+om>oe&&Mn(de,this.pos)==0&&Me==this.button};var Fd,Yh;function Jp(oe,de){var Me=+new Date;return Yh&&Yh.compare(Me,oe,de)?(Fd=Yh=null,"triple"):Fd&&Fd.compare(Me,oe,de)?(Yh=new Yp(Me,oe,de),Fd=null,"double"):(Fd=new Yp(Me,oe,de),Yh=null,"single")}function lc(oe){var de=this,Me=de.display;if(!(Nt(de,oe)||Me.activeTouch&&Me.input.supportsTouch())){if(Me.input.ensurePolled(),Me.shift=oe.shiftKey,nl(Me,oe)){ce||(Me.scroller.draggable=!1,setTimeout(function(){return Me.scroller.draggable=!0},100));return}if(!ep(de,oe)){var Te=rl(de,oe),Be=vr(oe),at=Te?Jp(Te,Be):"single";window.focus(),Be==1&&de.state.selectingText&&de.state.selectingText(oe),!(Te&&Qp(de,Be,Te,at,oe))&&(Be==1?Te?am(de,Te,at,oe):dr(oe)==Me.scroller&&kn(oe):Be==2?(Te&&Qo(de.doc,Te),setTimeout(function(){return Me.input.focus()},20)):Be==3&&(Ee?de.display.input.onContextMenu(oe):Za(de)))}}}function Qp(oe,de,Me,Te,Be){var at="Click";return Te=="double"?at="Double"+at:Te=="triple"&&(at="Triple"+at),at=(de==1?"Left":de==2?"Middle":"Right")+at,ac(oe,Ad(at,Be),Be,function(Pt){if(typeof Pt=="string"&&(Pt=js[Pt]),!Pt)return!1;var Bt=!1;try{oe.isReadOnly()&&(oe.state.suppressEdits=!0),Bt=Pt(oe,Me)!=Mt}finally{oe.state.suppressEdits=!1}return Bt})}function Qf(oe,de,Me){var Te=oe.getOption("configureMouse"),Be=Te?Te(oe,de,Me):{};if(Be.unit==null){var at=re?Me.shiftKey&&Me.metaKey:Me.altKey;Be.unit=at?"rectangle":de=="single"?"char":de=="double"?"word":"line"}return(Be.extend==null||oe.doc.extend)&&(Be.extend=oe.doc.extend||Me.shiftKey),Be.addNew==null&&(Be.addNew=ae?Me.metaKey:Me.ctrlKey),Be.moveOnDrag==null&&(Be.moveOnDrag=!(ae?Me.altKey:Me.ctrlKey)),Be}function am(oe,de,Me,Te){je?setTimeout(ft(La,oe),0):oe.curOp.focus=ze();var Be=Qf(oe,Me,Te),at=oe.doc.sel,Pt;oe.options.dragDrop&&Sr&&!oe.isReadOnly()&&Me=="single"&&(Pt=at.contains(de))>-1&&(Mn((Pt=at.ranges[Pt]).from(),de)<0||de.xRel>0)&&(Mn(Pt.to(),de)>0||de.xRel<0)?qp(oe,Te,de,Be):nv(oe,Te,de,Be)}function qp(oe,de,Me,Te){var Be=oe.display,at=!1,Pt=Rn(oe,function(Vt){ce&&(Be.scroller.draggable=!1),oe.state.draggingText=!1,Qt(Be.wrapper.ownerDocument,"mouseup",Pt),Qt(Be.wrapper.ownerDocument,"mousemove",Bt),Qt(Be.scroller,"dragstart",Dt),Qt(Be.scroller,"drop",Pt),at||(kn(Vt),Te.addNew||Qo(oe.doc,Me,null,null,Te.extend),ce&&!we||je&&ve==9?setTimeout(function(){Be.wrapper.ownerDocument.body.focus({preventScroll:!0}),Be.input.focus()},20):Be.input.focus())}),Bt=function(Vt){at=at||Math.abs(de.clientX-Vt.clientX)+Math.abs(de.clientY-Vt.clientY)>=10},Dt=function(){return at=!0};ce&&(Be.scroller.draggable=!0),oe.state.draggingText=Pt,Pt.copy=!Te.moveOnDrag,Be.scroller.dragDrop&&Be.scroller.dragDrop(),Tt(Be.wrapper.ownerDocument,"mouseup",Pt),Tt(Be.wrapper.ownerDocument,"mousemove",Bt),Tt(Be.scroller,"dragstart",Dt),Tt(Be.scroller,"drop",Pt),Za(oe),setTimeout(function(){return Be.input.focus()},20)}function eg(oe,de,Me){if(Me=="char")return new ii(de,de);if(Me=="word")return oe.findWordAt(de);if(Me=="line")return new ii(rn(de.line,0),Dn(oe.doc,rn(de.line+1,0)));var Te=Me(oe,de);return new ii(Te.from,Te.to)}function nv(oe,de,Me,Te){var Be=oe.display,at=oe.doc;kn(de);var Pt,Bt,Dt=at.sel,Vt=Dt.ranges;if(Te.addNew&&!Te.extend?(Bt=at.sel.contains(Me),Bt>-1?Pt=Vt[Bt]:Pt=new ii(Me,Me)):(Pt=at.sel.primary(),Bt=at.sel.primIndex),Te.unit=="rectangle")Te.addNew||(Pt=new ii(Me,Me)),Me=rl(oe,de,!0,!0),Bt=-1;else{var yn=eg(oe,Me,Te.unit);Te.extend?Pt=Wu(Pt,yn.anchor,yn.head,Te.extend):Pt=yn}Te.addNew?Bt==-1?(Bt=Vt.length,da(at,ho(oe,Vt.concat([Pt]),Bt),{scroll:!1,origin:"*mouse"})):Vt.length>1&&Vt[Bt].empty()&&Te.unit=="char"&&!Te.extend?(da(at,ho(oe,Vt.slice(0,Bt).concat(Vt.slice(Bt+1)),0),{scroll:!1,origin:"*mouse"}),Dt=at.sel):la(at,Bt,Pt,pt):(Bt=0,da(at,new Qi([Pt],0),pt),Dt=at.sel);var Jt=Me;function Hn(vi){if(Mn(Jt,vi)!=0)if(Jt=vi,Te.unit=="rectangle"){for(var Bi=[],fo=oe.options.tabSize,pi=et(Cn(at,Me.line).text,Me.ch,fo),ko=et(Cn(at,vi.line).text,vi.ch,fo),Ja=Math.min(pi,ko),Ds=Math.max(pi,ko),os=Math.min(Me.line,vi.line),Vl=Math.min(oe.lastLine(),Math.max(Me.line,vi.line));os<=Vl;os++){var vl=Cn(at,os).text,ks=jt(vl,Ja,fo);Ja==Ds?Bi.push(new ii(rn(os,ks),rn(os,ks))):vl.length>ks&&Bi.push(new ii(rn(os,ks),rn(os,jt(vl,Ds,fo))))}Bi.length||Bi.push(new ii(Me,Me)),da(at,ho(oe,Dt.ranges.slice(0,Bt).concat(Bi),Bt),{origin:"*mouse",scroll:!1}),oe.scrollIntoView(vi)}else{var ou=Pt,al=eg(oe,vi,Te.unit),Os=ou.anchor,ia;Mn(al.anchor,Os)>0?(ia=al.head,Os=pn(ou.from(),al.anchor)):(ia=al.anchor,Os=En(ou.to(),al.head));var hs=Dt.ranges.slice(0);hs[Bt]=sm(oe,new ii(Dn(at,Os),ia)),da(at,ho(oe,hs,Bt),pt)}}var Bn=Be.wrapper.getBoundingClientRect(),fr=0;function wr(vi){var Bi=++fr,fo=rl(oe,vi,!0,Te.unit=="rectangle");if(fo)if(Mn(fo,Jt)!=0){oe.curOp.focus=ze(),Hn(fo);var pi=Do(Be,at);(fo.line>=pi.to||fo.line<pi.from)&&setTimeout(Rn(oe,function(){fr==Bi&&wr(vi)}),150)}else{var ko=vi.clientY<Bn.top?-20:vi.clientY>Bn.bottom?20:0;ko&&setTimeout(Rn(oe,function(){fr==Bi&&(Be.scroller.scrollTop+=ko,wr(vi))}),50)}}function _r(vi){oe.state.selectingText=!1,fr=1/0,vi&&(kn(vi),Be.input.focus()),Qt(Be.wrapper.ownerDocument,"mousemove",oi),Qt(Be.wrapper.ownerDocument,"mouseup",Ti),at.history.lastSelOrigin=null}var oi=Rn(oe,function(vi){vi.buttons===0||!vr(vi)?_r(vi):wr(vi)}),Ti=Rn(oe,_r);oe.state.selectingText=Ti,Tt(Be.wrapper.ownerDocument,"mousemove",oi),Tt(Be.wrapper.ownerDocument,"mouseup",Ti)}function sm(oe,de){var Me=de.anchor,Te=de.head,Be=Cn(oe.doc,Me.line);if(Mn(Me,Te)==0&&Me.sticky==Te.sticky)return de;var at=dt(Be);if(!at)return de;var Pt=Le(at,Me.ch,Me.sticky),Bt=at[Pt];if(Bt.from!=Me.ch&&Bt.to!=Me.ch)return de;var Dt=Pt+(Bt.from==Me.ch==(Bt.level!=1)?0:1);if(Dt==0||Dt==at.length)return de;var Vt;if(Te.line!=Me.line)Vt=(Te.line-Me.line)*(oe.doc.direction=="ltr"?1:-1)>0;else{var yn=Le(at,Te.ch,Te.sticky),Jt=yn-Pt||(Te.ch-Me.ch)*(Bt.level==1?-1:1);yn==Dt-1||yn==Dt?Vt=Jt<0:Vt=Jt>0}var Hn=at[Dt+(Vt?-1:0)],Bn=Vt==(Hn.level==1),fr=Bn?Hn.from:Hn.to,wr=Bn?"after":"before";return Me.ch==fr&&Me.sticky==wr?de:new ii(new rn(Me.line,fr,wr),Te)}function qf(oe,de,Me,Te){var Be,at;if(de.touches)Be=de.touches[0].clientX,at=de.touches[0].clientY;else try{Be=de.clientX,at=de.clientY}catch(Hn){return!1}if(Be>=Math.floor(oe.display.gutters.getBoundingClientRect().right))return!1;Te&&kn(de);var Pt=oe.display,Bt=Pt.lineDiv.getBoundingClientRect();if(at>Bt.bottom||!on(oe,Me))return Xn(de);at-=Bt.top-Pt.viewOffset;for(var Dt=0;Dt<oe.display.gutterSpecs.length;++Dt){var Vt=Pt.gutters.childNodes[Dt];if(Vt&&Vt.getBoundingClientRect().right>=Be){var yn=zn(oe.doc,at),Jt=oe.display.gutterSpecs[Dt];return kt(oe,Me,oe,yn,Jt.className,de),Xn(de)}}}function ep(oe,de){return qf(oe,de,"gutterClick",!0)}function tp(oe,de){nl(oe.display,de)||lm(oe,de)||Nt(oe,de,"contextmenu")||Ee||oe.display.input.onContextMenu(de)}function lm(oe,de){return on(oe,"gutterContextMenu")?qf(oe,de,"gutterContextMenu",!1):!1}function np(oe){oe.display.wrapper.className=oe.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+oe.options.theme.replace(/(^|\s)\s*/g," cm-s-"),_a(oe)}var Sh={toString:function(){return"CodeMirror.Init"}},tg={},gf={};function um(oe){var de=oe.optionHandlers;function Me(Te,Be,at,Pt){oe.defaults[Te]=Be,at&&(de[Te]=Pt?function(Bt,Dt,Vt){Vt!=Sh&&at(Bt,Dt,Vt)}:at)}oe.defineOption=Me,oe.Init=Sh,Me("value","",function(Te,Be){return Te.setValue(Be)},!0),Me("mode",null,function(Te,Be){Te.doc.modeOption=Be,$i(Te)},!0),Me("indentUnit",2,$i,!0),Me("indentWithTabs",!1),Me("smartIndent",!0),Me("tabSize",4,function(Te){Ho(Te),_a(Te),ma(Te)},!0),Me("lineSeparator",null,function(Te,Be){if(Te.doc.lineSep=Be,!!Be){var at=[],Pt=Te.doc.first;Te.doc.iter(function(Dt){for(var Vt=0;;){var yn=Dt.text.indexOf(Be,Vt);if(yn==-1)break;Vt=yn+Be.length,at.push(rn(Pt,yn))}Pt++});for(var Bt=at.length-1;Bt>=0;Bt--)Ku(Te.doc,Be,at[Bt],rn(at[Bt].line,at[Bt].ch+Be.length))}}),Me("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(Te,Be,at){Te.state.specialChars=new RegExp(Be.source+(Be.test(" ")?"":"| "),"g"),at!=Sh&&Te.refresh()}),Me("specialCharPlaceholder",Fa,function(Te){return Te.refresh()},!0),Me("electricChars",!0),Me("inputStyle",ee?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Me("spellcheck",!1,function(Te,Be){return Te.getInputField().spellcheck=Be},!0),Me("autocorrect",!1,function(Te,Be){return Te.getInputField().autocorrect=Be},!0),Me("autocapitalize",!1,function(Te,Be){return Te.getInputField().autocapitalize=Be},!0),Me("rtlMoveVisually",!le),Me("wholeLineUpdateBefore",!0),Me("theme","default",function(Te){np(Te),si(Te)},!0),Me("keyMap","default",function(Te,Be,at){var Pt=Ec(Be),Bt=at!=Sh&&Ec(at);Bt&&Bt.detach&&Bt.detach(Te,Pt),Pt.attach&&Pt.attach(Te,Bt||null)}),Me("extraKeys",null),Me("configureMouse",null),Me("lineWrapping",!1,cm,!0),Me("gutters",[],function(Te,Be){Te.display.gutterSpecs=Oi(Be,Te.options.lineNumbers),si(Te)},!0),Me("fixedGutter",!0,function(Te,Be){Te.display.gutters.style.left=Be?ph(Te.display)+"px":"0",Te.refresh()},!0),Me("coverGutterNextToScrollbar",!1,function(Te){return wc(Te)},!0),Me("scrollbarStyle","native",function(Te){uf(Te),wc(Te),Te.display.scrollbars.setScrollTop(Te.doc.scrollTop),Te.display.scrollbars.setScrollLeft(Te.doc.scrollLeft)},!0),Me("lineNumbers",!1,function(Te,Be){Te.display.gutterSpecs=Oi(Te.options.gutters,Be),si(Te)},!0),Me("firstLineNumber",1,si,!0),Me("lineNumberFormatter",function(Te){return Te},si,!0),Me("showCursorWhenSelecting",!1,ws,!0),Me("resetSelectionOnContextMenu",!0),Me("lineWiseCopyCut",!0),Me("pasteLinesPerSelection",!0),Me("selectionsMayTouch",!1),Me("readOnly",!1,function(Te,Be){Be=="nocursor"&&(Vc(Te),Te.display.input.blur()),Te.display.input.readOnlyChanged(Be)}),Me("screenReaderLabel",null,function(Te,Be){Be=Be===""?null:Be,Te.display.input.screenReaderLabelChanged(Be)}),Me("disableInput",!1,function(Te,Be){Be||Te.display.input.reset()},!0),Me("dragDrop",!0,rp),Me("allowDropFileTypes",null),Me("cursorBlinkRate",530),Me("cursorScrollMargin",0),Me("cursorHeight",1,ws,!0),Me("singleCursorHeightPerLine",!0,ws,!0),Me("workTime",100),Me("workDelay",100),Me("flattenSpans",!0,Ho,!0),Me("addModeClass",!1,Ho,!0),Me("pollInterval",100),Me("undoDepth",200,function(Te,Be){return Te.doc.history.undoDepth=Be}),Me("historyEventDelay",1250),Me("viewportMargin",10,function(Te){return Te.refresh()},!0),Me("maxHighlightLength",1e4,Ho,!0),Me("moveInputWithCursor",!0,function(Te,Be){Be||Te.display.input.resetPosition()}),Me("tabindex",null,function(Te,Be){return Te.display.input.getField().tabIndex=Be||""}),Me("autofocus",null),Me("direction","ltr",function(Te,Be){return Te.doc.setDirection(Be)},!0),Me("phrases",null)}function rp(oe,de,Me){var Te=Me&&Me!=Sh;if(!de!=!Te){var Be=oe.display.dragFunctions,at=de?Tt:Qt;at(oe.display.scroller,"dragstart",Be.start),at(oe.display.scroller,"dragenter",Be.enter),at(oe.display.scroller,"dragover",Be.over),at(oe.display.scroller,"dragleave",Be.leave),at(oe.display.scroller,"drop",Be.drop)}}function cm(oe){oe.options.lineWrapping?(Xe(oe.display.wrapper,"CodeMirror-wrap"),oe.display.sizer.style.minWidth="",oe.display.sizerWidth=null):(Ie(oe.display.wrapper,"CodeMirror-wrap"),wo(oe)),Gi(oe),ma(oe),_a(oe),setTimeout(function(){return wc(oe)},100)}function na(oe,de){var Me=this;if(!(this instanceof na))return new na(oe,de);this.options=de=de?Lt(de):{},Lt(tg,de,!1);var Te=de.value;typeof Te=="string"?Te=new Ms(Te,de.mode,null,de.lineSeparator,de.direction):de.mode&&(Te.modeOption=de.mode),this.doc=Te;var Be=new na.inputStyles[de.inputStyle](this),at=this.display=new Pi(oe,Te,Be,de);at.wrapper.CodeMirror=this,np(this),de.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),uf(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},de.autofocus&&!ee&&at.input.focus(),je&&ve<11&&setTimeout(function(){return Me.display.input.reset(!0)},20),Bd(this),Ul(),fl(this),this.curOp.forceUpdate=!0,qi(this,Te),de.autofocus&&!ee||this.hasFocus()?setTimeout(function(){Me.hasFocus()&&!Me.state.focused&&Uo(Me)},20):Vc(this);for(var Pt in gf)gf.hasOwnProperty(Pt)&&gf[Pt](this,de[Pt],Sh);ri(this),de.finishInit&&de.finishInit(this);for(var Bt=0;Bt<Jh.length;++Bt)Jh[Bt](this);bc(this),ce&&de.lineWrapping&&getComputedStyle(at.lineDiv).textRendering=="optimizelegibility"&&(at.lineDiv.style.textRendering="auto")}na.defaults=tg,na.optionHandlers=gf;function Bd(oe){var de=oe.display;Tt(de.scroller,"mousedown",Rn(oe,lc)),je&&ve<11?Tt(de.scroller,"dblclick",Rn(oe,function(Dt){if(!Nt(oe,Dt)){var Vt=rl(oe,Dt);if(!(!Vt||ep(oe,Dt)||nl(oe.display,Dt))){kn(Dt);var yn=oe.findWordAt(Vt);Qo(oe.doc,yn.anchor,yn.head)}}})):Tt(de.scroller,"dblclick",function(Dt){return Nt(oe,Dt)||kn(Dt)}),Tt(de.scroller,"contextmenu",function(Dt){return tp(oe,Dt)}),Tt(de.input.getField(),"contextmenu",function(Dt){de.scroller.contains(Dt.target)||tp(oe,Dt)});var Me,Te={end:0};function Be(){de.activeTouch&&(Me=setTimeout(function(){return de.activeTouch=null},1e3),Te=de.activeTouch,Te.end=+new Date)}function at(Dt){if(Dt.touches.length!=1)return!1;var Vt=Dt.touches[0];return Vt.radiusX<=1&&Vt.radiusY<=1}function Pt(Dt,Vt){if(Vt.left==null)return!0;var yn=Vt.left-Dt.left,Jt=Vt.top-Dt.top;return yn*yn+Jt*Jt>20*20}Tt(de.scroller,"touchstart",function(Dt){if(!Nt(oe,Dt)&&!at(Dt)&&!ep(oe,Dt)){de.input.ensurePolled(),clearTimeout(Me);var Vt=+new Date;de.activeTouch={start:Vt,moved:!1,prev:Vt-Te.end<=300?Te:null},Dt.touches.length==1&&(de.activeTouch.left=Dt.touches[0].pageX,de.activeTouch.top=Dt.touches[0].pageY)}}),Tt(de.scroller,"touchmove",function(){de.activeTouch&&(de.activeTouch.moved=!0)}),Tt(de.scroller,"touchend",function(Dt){var Vt=de.activeTouch;if(Vt&&!nl(de,Dt)&&Vt.left!=null&&!Vt.moved&&new Date-Vt.start<300){var yn=oe.coordsChar(de.activeTouch,"page"),Jt;!Vt.prev||Pt(Vt,Vt.prev)?Jt=new ii(yn,yn):!Vt.prev.prev||Pt(Vt,Vt.prev.prev)?Jt=oe.findWordAt(yn):Jt=new ii(rn(yn.line,0),Dn(oe.doc,rn(yn.line+1,0))),oe.setSelection(Jt.anchor,Jt.head),oe.focus(),kn(Dt)}Be()}),Tt(de.scroller,"touchcancel",Be),Tt(de.scroller,"scroll",function(){de.scroller.clientHeight&&(Xc(oe,de.scroller.scrollTop),Uu(oe,de.scroller.scrollLeft,!0),kt(oe,"scroll",oe))}),Tt(de.scroller,"mousewheel",function(Dt){return Yi(oe,Dt)}),Tt(de.scroller,"DOMMouseScroll",function(Dt){return Yi(oe,Dt)}),Tt(de.wrapper,"scroll",function(){return de.wrapper.scrollTop=de.wrapper.scrollLeft=0}),de.dragFunctions={enter:function(Dt){Nt(oe,Dt)||pr(Dt)},over:function(Dt){Nt(oe,Dt)||(df(oe,Dt),pr(Dt))},start:function(Dt){return Vh(oe,Dt)},drop:Rn(oe,Ld),leave:function(Dt){Nt(oe,Dt)||Zf(oe)}};var Bt=de.input.getField();Tt(Bt,"keyup",function(Dt){return Xp.call(oe,Dt)}),Tt(Bt,"keydown",Rn(oe,Vp)),Tt(Bt,"keypress",Rn(oe,sc)),Tt(Bt,"focus",function(Dt){return Uo(oe,Dt)}),Tt(Bt,"blur",function(Dt){return Vc(oe,Dt)})}var Jh=[];na.defineInitHook=function(oe){return Jh.push(oe)};function Is(oe,de,Me,Te){var Be=oe.doc,at;Me==null&&(Me="add"),Me=="smart"&&(Be.mode.indent?at=Br(oe,de).state:Me="prev");var Pt=oe.options.tabSize,Bt=Cn(Be,de),Dt=et(Bt.text,null,Pt);Bt.stateAfter&&(Bt.stateAfter=null);var Vt=Bt.text.match(/^\s*/)[0],yn;if(!Te&&!/\S/.test(Bt.text))yn=0,Me="not";else if(Me=="smart"&&(yn=Be.mode.indent(at,Bt.text.slice(Vt.length),Bt.text),yn==Mt||yn>150)){if(!Te)return;Me="prev"}Me=="prev"?de>Be.first?yn=et(Cn(Be,de-1).text,null,Pt):yn=0:Me=="add"?yn=Dt+oe.options.indentUnit:Me=="subtract"?yn=Dt-oe.options.indentUnit:typeof Me=="number"&&(yn=Dt+Me),yn=Math.max(0,yn);var Jt="",Hn=0;if(oe.options.indentWithTabs)for(var Bn=Math.floor(yn/Pt);Bn;--Bn)Hn+=Pt,Jt+=" ";if(Hn<yn&&(Jt+=Kt(yn-Hn)),Jt!=Vt)return Ku(Be,Jt,rn(de,0),rn(de,Vt.length),"+input"),Bt.stateAfter=null,!0;for(var fr=0;fr<Be.sel.ranges.length;fr++){var wr=Be.sel.ranges[fr];if(wr.head.line==de&&wr.head.ch<Vt.length){var _r=rn(de,Vt.length);la(Be,fr,new ii(_r,_r));break}}}var Kl=null;function Qh(oe){Kl=oe}function mf(oe,de,Me,Te,Be){var at=oe.doc;oe.display.shift=!1,Te||(Te=at.sel);var Pt=+new Date-200,Bt=Be=="paste"||oe.state.pasteIncoming>Pt,Dt=Cr(de),Vt=null;if(Bt&&Te.ranges.length>1)if(Kl&&Kl.text.join(`
`)==de){if(Te.ranges.length%Kl.text.length==0){Vt=[];for(var yn=0;yn<Kl.text.length;yn++)Vt.push(at.splitLines(Kl.text[yn]))}}else Dt.length==Te.ranges.length&&oe.options.pasteLinesPerSelection&&(Vt=gt(Dt,function(oi){return[oi]}));for(var Jt=oe.curOp.updateInput,Hn=Te.ranges.length-1;Hn>=0;Hn--){var Bn=Te.ranges[Hn],fr=Bn.from(),wr=Bn.to();Bn.empty()&&(Me&&Me>0?fr=rn(fr.line,fr.ch-Me):oe.state.overwrite&&!Bt?wr=rn(wr.line,Math.min(Cn(at,wr.line).text.length,wr.ch+Ct(Dt).length)):Bt&&Kl&&Kl.lineWise&&Kl.text.join(`
`)==Dt.join(`
`)&&(fr=wr=rn(fr.line,0)));var _r={from:fr,to:wr,text:Vt?Vt[Hn%Vt.length]:Dt,origin:Be||(Bt?"paste":oe.state.cutIncoming>Pt?"cut":"+input")};Ga(oe.doc,_r),kr(oe,"inputRead",oe,_r)}de&&!Bt&&rg(oe,de),Sc(oe),oe.curOp.updateInput<2&&(oe.curOp.updateInput=Jt),oe.curOp.typing=!0,oe.state.pasteIncoming=oe.state.cutIncoming=-1}function ng(oe,de){var Me=oe.clipboardData&&oe.clipboardData.getData("Text");if(Me)return oe.preventDefault(),!de.isReadOnly()&&!de.options.disableInput&&fn(de,function(){return mf(de,Me,0,null,"paste")}),!0}function rg(oe,de){if(!(!oe.options.electricChars||!oe.options.smartIndent))for(var Me=oe.doc.sel,Te=Me.ranges.length-1;Te>=0;Te--){var Be=Me.ranges[Te];if(!(Be.head.ch>100||Te&&Me.ranges[Te-1].head.line==Be.head.line)){var at=oe.getModeAt(Be.head),Pt=!1;if(at.electricChars){for(var Bt=0;Bt<at.electricChars.length;Bt++)if(de.indexOf(at.electricChars.charAt(Bt))>-1){Pt=Is(oe,Be.head.line,"smart");break}}else at.electricInput&&at.electricInput.test(Cn(oe.doc,Be.head.line).text.slice(0,Be.head.ch))&&(Pt=Is(oe,Be.head.line,"smart"));Pt&&kr(oe,"electricInput",oe,Be.head.line)}}}function ig(oe){for(var de=[],Me=[],Te=0;Te<oe.doc.sel.ranges.length;Te++){var Be=oe.doc.sel.ranges[Te].head.line,at={anchor:rn(Be,0),head:rn(Be+1,0)};Me.push(at),de.push(oe.getRange(at.anchor,at.head))}return{text:de,ranges:Me}}function og(oe,de,Me,Te){oe.setAttribute("autocorrect",Me?"":"off"),oe.setAttribute("autocapitalize",Te?"":"off"),oe.setAttribute("spellcheck",!!de)}function ag(){var oe=Oe("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),de=Oe("div",[oe],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return ce?oe.style.width="1000px":oe.setAttribute("wrap","off"),fe&&(oe.style.border="1px solid black"),og(oe),de}function xh(oe){var de=oe.optionHandlers,Me=oe.helpers={};oe.prototype={constructor:oe,focus:function(){window.focus(),this.display.input.focus()},setOption:function(Te,Be){var at=this.options,Pt=at[Te];at[Te]==Be&&Te!="mode"||(at[Te]=Be,de.hasOwnProperty(Te)&&Rn(this,de[Te])(this,Be,Pt),kt(this,"optionChange",this,Te))},getOption:function(Te){return this.options[Te]},getDoc:function(){return this.doc},addKeyMap:function(Te,Be){this.state.keyMaps[Be?"push":"unshift"](Ec(Te))},removeKeyMap:function(Te){for(var Be=this.state.keyMaps,at=0;at<Be.length;++at)if(Be[at]==Te||Be[at].name==Te)return Be.splice(at,1),!0},addOverlay:_n(function(Te,Be){var at=Te.token?Te:oe.getMode(this.options,Te);if(at.startState)throw new Error("Overlays may not be stateful.");tt(this.state.overlays,{mode:at,modeSpec:Te,opaque:Be&&Be.opaque,priority:Be&&Be.priority||0},function(Pt){return Pt.priority}),this.state.modeGen++,ma(this)}),removeOverlay:_n(function(Te){for(var Be=this.state.overlays,at=0;at<Be.length;++at){var Pt=Be[at].modeSpec;if(Pt==Te||typeof Te=="string"&&Pt.name==Te){Be.splice(at,1),this.state.modeGen++,ma(this);return}}}),indentLine:_n(function(Te,Be,at){typeof Be!="string"&&typeof Be!="number"&&(Be==null?Be=this.options.smartIndent?"smart":"prev":Be=Be?"add":"subtract"),Qn(this.doc,Te)&&Is(this,Te,Be,at)}),indentSelection:_n(function(Te){for(var Be=this.doc.sel.ranges,at=-1,Pt=0;Pt<Be.length;Pt++){var Bt=Be[Pt];if(Bt.empty())Bt.head.line>at&&(Is(this,Bt.head.line,Te,!0),at=Bt.head.line,Pt==this.doc.sel.primIndex&&Sc(this));else{var Dt=Bt.from(),Vt=Bt.to(),yn=Math.max(at,Dt.line);at=Math.min(this.lastLine(),Vt.line-(Vt.ch?0:1))+1;for(var Jt=yn;Jt<at;++Jt)Is(this,Jt,Te);var Hn=this.doc.sel.ranges;Dt.ch==0&&Be.length==Hn.length&&Hn[Pt].from().ch>0&&la(this.doc,Pt,new ii(Dt,Hn[Pt].to()),mt)}}}),getTokenAt:function(Te,Be){return Qr(this,Te,Be)},getLineTokens:function(Te,Be){return Qr(this,rn(Te),Be,!0)},getTokenTypeAt:function(Te){Te=Dn(this.doc,Te);var Be=qr(this,Cn(this.doc,Te.line)),at=0,Pt=(Be.length-1)/2,Bt=Te.ch,Dt;if(Bt==0)Dt=Be[2];else for(;;){var Vt=at+Pt>>1;if((Vt?Be[Vt*2-1]:0)>=Bt)Pt=Vt;else if(Be[Vt*2+1]<Bt)at=Vt+1;else{Dt=Be[Vt*2+2];break}}var yn=Dt?Dt.indexOf("overlay "):-1;return yn<0?Dt:yn==0?null:Dt.slice(0,yn-1)},getModeAt:function(Te){var Be=this.doc.mode;return Be.innerMode?oe.innerMode(Be,this.getTokenAt(Te).state).mode:Be},getHelper:function(Te,Be){return this.getHelpers(Te,Be)[0]},getHelpers:function(Te,Be){var at=[];if(!Me.hasOwnProperty(Be))return at;var Pt=Me[Be],Bt=this.getModeAt(Te);if(typeof Bt[Be]=="string")Pt[Bt[Be]]&&at.push(Pt[Bt[Be]]);else if(Bt[Be])for(var Dt=0;Dt<Bt[Be].length;Dt++){var Vt=Pt[Bt[Be][Dt]];Vt&&at.push(Vt)}else Bt.helperType&&Pt[Bt.helperType]?at.push(Pt[Bt.helperType]):Pt[Bt.name]&&at.push(Pt[Bt.name]);for(var yn=0;yn<Pt._global.length;yn++){var Jt=Pt._global[yn];Jt.pred(Bt,this)&&xt(at,Jt.val)==-1&&at.push(Jt.val)}return at},getStateAfter:function(Te,Be){var at=this.doc;return Te=On(at,Te==null?at.first+at.size-1:Te),Br(this,Te+1,Be).state},cursorCoords:function(Te,Be){var at,Pt=this.doc.sel.primary();return Te==null?at=Pt.head:typeof Te=="object"?at=Dn(this.doc,Te):at=Te?Pt.from():Pt.to(),Ma(this,at,Be||"page")},charCoords:function(Te,Be){return _l(this,Dn(this.doc,Te),Be||"page")},coordsChar:function(Te,Be){return Te=zu(this,Te,Be||"page"),Wc(this,Te.left,Te.top)},lineAtHeight:function(Te,Be){return Te=zu(this,{top:Te,left:0},Be||"page").top,zn(this.doc,Te+this.display.viewOffset)},heightAtLine:function(Te,Be,at){var Pt=!1,Bt;if(typeof Te=="number"){var Dt=this.doc.first+this.doc.size-1;Te<this.doc.first?Te=this.doc.first:Te>Dt&&(Te=Dt,Pt=!0),Bt=Cn(this.doc,Te)}else Bt=Te;return za(this,Bt,{top:0,left:0},Be||"page",at||Pt).top+(Pt?this.doc.height-yo(Bt):0)},defaultTextHeight:function(){return Gu(this.display)},defaultCharWidth:function(){return ic(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(Te,Be,at,Pt,Bt){var Dt=this.display;Te=Ma(this,Dn(this.doc,Te));var Vt=Te.bottom,yn=Te.left;if(Be.style.position="absolute",Be.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(Be),Dt.sizer.appendChild(Be),Pt=="over")Vt=Te.top;else if(Pt=="above"||Pt=="near"){var Jt=Math.max(Dt.wrapper.clientHeight,this.doc.height),Hn=Math.max(Dt.sizer.clientWidth,Dt.lineSpace.clientWidth);(Pt=="above"||Te.bottom+Be.offsetHeight>Jt)&&Te.top>Be.offsetHeight?Vt=Te.top-Be.offsetHeight:Te.bottom+Be.offsetHeight<=Jt&&(Vt=Te.bottom),yn+Be.offsetWidth>Hn&&(yn=Hn-Be.offsetWidth)}Be.style.top=Vt+"px",Be.style.left=Be.style.right="",Bt=="right"?(yn=Dt.sizer.clientWidth-Be.offsetWidth,Be.style.right="0px"):(Bt=="left"?yn=0:Bt=="middle"&&(yn=(Dt.sizer.clientWidth-Be.offsetWidth)/2),Be.style.left=yn+"px"),at&&Wh(this,{left:yn,top:Vt,right:yn+Be.offsetWidth,bottom:Vt+Be.offsetHeight})},triggerOnKeyDown:_n(Vp),triggerOnKeyPress:_n(sc),triggerOnKeyUp:Xp,triggerOnMouseDown:_n(lc),execCommand:function(Te){if(js.hasOwnProperty(Te))return js[Te].call(null,this)},triggerElectric:_n(function(Te){rg(this,Te)}),findPosH:function(Te,Be,at,Pt){var Bt=1;Be<0&&(Bt=-1,Be=-Be);for(var Dt=Dn(this.doc,Te),Vt=0;Vt<Be&&(Dt=vf(this.doc,Dt,Bt,at,Pt),!Dt.hitSide);++Vt);return Dt},moveH:_n(function(Te,Be){var at=this;this.extendSelectionsBy(function(Pt){return at.display.shift||at.doc.extend||Pt.empty()?vf(at.doc,Pt.head,Te,Be,at.options.rtlMoveVisually):Te<0?Pt.from():Pt.to()},vt)}),deleteH:_n(function(Te,Be){var at=this.doc.sel,Pt=this.doc;at.somethingSelected()?Pt.replaceSelection("",null,"+delete"):ol(this,function(Bt){var Dt=vf(Pt,Bt.head,Te,Be,!1);return Te<0?{from:Dt,to:Bt.head}:{from:Bt.head,to:Dt}})}),findPosV:function(Te,Be,at,Pt){var Bt=1,Dt=Pt;Be<0&&(Bt=-1,Be=-Be);for(var Vt=Dn(this.doc,Te),yn=0;yn<Be;++yn){var Jt=Ma(this,Vt,"div");if(Dt==null?Dt=Jt.left:Jt.left=Dt,Vt=wh(this,Jt,Bt,at),Vt.hitSide)break}return Vt},moveV:_n(function(Te,Be){var at=this,Pt=this.doc,Bt=[],Dt=!this.display.shift&&!Pt.extend&&Pt.sel.somethingSelected();if(Pt.extendSelectionsBy(function(yn){if(Dt)return Te<0?yn.from():yn.to();var Jt=Ma(at,yn.head,"div");yn.goalColumn!=null&&(Jt.left=yn.goalColumn),Bt.push(Jt.left);var Hn=wh(at,Jt,Te,Be);return Be=="page"&&yn==Pt.sel.primary()&&Ed(at,_l(at,Hn,"div").top-Jt.top),Hn},vt),Bt.length)for(var Vt=0;Vt<Pt.sel.ranges.length;Vt++)Pt.sel.ranges[Vt].goalColumn=Bt[Vt]}),findWordAt:function(Te){var Be=this.doc,at=Cn(Be,Te.line).text,Pt=Te.ch,Bt=Te.ch;if(at){var Dt=this.getHelper(Te,"wordChars");(Te.sticky=="before"||Bt==at.length)&&Pt?--Pt:++Bt;for(var Vt=at.charAt(Pt),yn=yt(Vt,Dt)?function(Jt){return yt(Jt,Dt)}:/\s/.test(Vt)?function(Jt){return/\s/.test(Jt)}:function(Jt){return!/\s/.test(Jt)&&!yt(Jt)};Pt>0&&yn(at.charAt(Pt-1));)--Pt;for(;Bt<at.length&&yn(at.charAt(Bt));)++Bt}return new ii(rn(Te.line,Pt),rn(Te.line,Bt))},toggleOverwrite:function(Te){Te!=null&&Te==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Xe(this.display.cursorDiv,"CodeMirror-overwrite"):Ie(this.display.cursorDiv,"CodeMirror-overwrite"),kt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==ze()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:_n(function(Te,Be){Zc(this,Te,Be)}),getScrollInfo:function(){var Te=this.display.scroller;return{left:Te.scrollLeft,top:Te.scrollTop,height:Te.scrollHeight-zs(this)-this.display.barHeight,width:Te.scrollWidth-zs(this)-this.display.barWidth,clientHeight:$c(this),clientWidth:dl(this)}},scrollIntoView:_n(function(Te,Be){Te==null?(Te={from:this.doc.sel.primary().head,to:null},Be==null&&(Be=this.options.cursorScrollMargin)):typeof Te=="number"?Te={from:rn(Te,0),to:null}:Te.from==null&&(Te={from:Te,to:null}),Te.to||(Te.to=Te.from),Te.margin=Be||0,Te.from.line!=null?Wo(this,Te):sf(this,Te.from,Te.to,Te.margin)}),setSize:_n(function(Te,Be){var at=this,Pt=function(Dt){return typeof Dt=="number"||/^\d+$/.test(String(Dt))?Dt+"px":Dt};Te!=null&&(this.display.wrapper.style.width=Pt(Te)),Be!=null&&(this.display.wrapper.style.height=Pt(Be)),this.options.lineWrapping&&Ya(this);var Bt=this.display.viewFrom;this.doc.iter(Bt,this.display.viewTo,function(Dt){if(Dt.widgets){for(var Vt=0;Vt<Dt.widgets.length;Vt++)if(Dt.widgets[Vt].noHScroll){Po(at,Bt,"widget");break}}++Bt}),this.curOp.forceUpdate=!0,kt(this,"refresh",this)}),operation:function(Te){return fn(this,Te)},startOperation:function(){return fl(this)},endOperation:function(){return bc(this)},refresh:_n(function(){var Te=this.display.cachedTextHeight;ma(this),this.curOp.forceUpdate=!0,_a(this),Zc(this,this.doc.scrollLeft,this.doc.scrollTop),ui(this.display),(Te==null||Math.abs(Te-Gu(this.display))>.5||this.options.lineWrapping)&&Gi(this),kt(this,"refresh",this)}),swapDoc:_n(function(Te){var Be=this.doc;return Be.cm=null,this.state.selectingText&&this.state.selectingText(),qi(this,Te),_a(this),this.display.input.reset(),Zc(this,Te.scrollLeft,Te.scrollTop),this.curOp.forceScroll=!0,kr(this,"swapDoc",this,Be),Be}),phrase:function(Te){var Be=this.options.phrases;return Be&&Object.prototype.hasOwnProperty.call(Be,Te)?Be[Te]:Te},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},vn(oe),oe.registerHelper=function(Te,Be,at){Me.hasOwnProperty(Te)||(Me[Te]=oe[Te]={_global:[]}),Me[Te][Be]=at},oe.registerGlobalHelper=function(Te,Be,at,Pt){oe.registerHelper(Te,Be,Pt),Me[Te]._global.push({pred:at,val:Pt})}}function vf(oe,de,Me,Te,Be){var at=de,Pt=Me,Bt=Cn(oe,de.line),Dt=Be&&oe.direction=="rtl"?-Me:Me;function Vt(){var Ti=de.line+Dt;return Ti<oe.first||Ti>=oe.first+oe.size?!1:(de=new rn(Ti,de.ch,de.sticky),Bt=Cn(oe,Ti))}function yn(Ti){var vi;if(Te=="codepoint"){var Bi=Bt.text.charCodeAt(de.ch+(Te>0?0:-1));isNaN(Bi)?vi=null:vi=new rn(de.line,Math.max(0,Math.min(Bt.text.length,de.ch+Me*(Bi>=55296&&Bi<56320?2:1))),-Me)}else Be?vi=Ta(oe.cm,Bt,de,Me):vi=cs(Bt,de,Me);if(vi==null)if(!Ti&&Vt())de=qo(Be,oe.cm,Bt,de.line,Dt);else return!1;else de=vi;return!0}if(Te=="char"||Te=="codepoint")yn();else if(Te=="column")yn(!0);else if(Te=="word"||Te=="group")for(var Jt=null,Hn=Te=="group",Bn=oe.cm&&oe.cm.getHelper(de,"wordChars"),fr=!0;!(Me<0&&!yn(!fr));fr=!1){var wr=Bt.text.charAt(de.ch)||`
`,_r=yt(wr,Bn)?"w":Hn&&wr==`
`?"n":!Hn||/\s/.test(wr)?null:"p";if(Hn&&!fr&&!_r&&(_r="s"),Jt&&Jt!=_r){Me<0&&(Me=1,yn(),de.sticky="after");break}if(_r&&(Jt=_r),Me>0&&!yn(!fr))break}var oi=tu(oe,de,at,Pt,!0);return an(at,oi)&&(oi.hitSide=!0),oi}function wh(oe,de,Me,Te){var Be=oe.doc,at=de.left,Pt;if(Te=="page"){var Bt=Math.min(oe.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Dt=Math.max(Bt-.5*Gu(oe.display),3);Pt=(Me>0?de.bottom:de.top)+Me*Dt}else Te=="line"&&(Pt=Me>0?de.bottom+3:de.top-3);for(var Vt;Vt=Wc(oe,at,Pt),!!Vt.outside;){if(Me<0?Pt<=0:Pt>=Be.height){Vt.hitSide=!0;break}Pt+=Me*5}return Vt}var Na=function(oe){this.cm=oe,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new it,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Na.prototype.init=function(oe){var de=this,Me=this,Te=Me.cm,Be=Me.div=oe.lineDiv;og(Be,Te.options.spellcheck,Te.options.autocorrect,Te.options.autocapitalize);function at(Bt){for(var Dt=Bt.target;Dt;Dt=Dt.parentNode){if(Dt==Be)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Dt.className))break}return!1}Tt(Be,"paste",function(Bt){!at(Bt)||Nt(Te,Bt)||ng(Bt,Te)||ve<=11&&setTimeout(Rn(Te,function(){return de.updateFromDOM()}),20)}),Tt(Be,"compositionstart",function(Bt){de.composing={data:Bt.data,done:!1}}),Tt(Be,"compositionupdate",function(Bt){de.composing||(de.composing={data:Bt.data,done:!1})}),Tt(Be,"compositionend",function(Bt){de.composing&&(Bt.data!=de.composing.data&&de.readFromDOMSoon(),de.composing.done=!0)}),Tt(Be,"touchstart",function(){return Me.forceCompositionEnd()}),Tt(Be,"input",function(){de.composing||de.readFromDOMSoon()});function Pt(Bt){if(!(!at(Bt)||Nt(Te,Bt))){if(Te.somethingSelected())Qh({lineWise:!1,text:Te.getSelections()}),Bt.type=="cut"&&Te.replaceSelection("",null,"cut");else if(Te.options.lineWiseCopyCut){var Dt=ig(Te);Qh({lineWise:!0,text:Dt.text}),Bt.type=="cut"&&Te.operation(function(){Te.setSelections(Dt.ranges,0,mt),Te.replaceSelection("",null,"cut")})}else return;if(Bt.clipboardData){Bt.clipboardData.clearData();var Vt=Kl.text.join(`
`);if(Bt.clipboardData.setData("Text",Vt),Bt.clipboardData.getData("Text")==Vt){Bt.preventDefault();return}}var yn=ag(),Jt=yn.firstChild;Te.display.lineSpace.insertBefore(yn,Te.display.lineSpace.firstChild),Jt.value=Kl.text.join(`
`);var Hn=document.activeElement;ht(Jt),setTimeout(function(){Te.display.lineSpace.removeChild(yn),Hn.focus(),Hn==Be&&Me.showPrimarySelection()},50)}}Tt(Be,"copy",Pt),Tt(Be,"cut",Pt)},Na.prototype.screenReaderLabelChanged=function(oe){oe?this.div.setAttribute("aria-label",oe):this.div.removeAttribute("aria-label")},Na.prototype.prepareSelection=function(){var oe=Kc(this.cm,!1);return oe.focus=document.activeElement==this.div,oe},Na.prototype.showSelection=function(oe,de){!oe||!this.cm.display.view.length||((oe.focus||de)&&this.showPrimarySelection(),this.showMultipleSelections(oe))},Na.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Na.prototype.showPrimarySelection=function(){var oe=this.getSelection(),de=this.cm,Me=de.doc.sel.primary(),Te=Me.from(),Be=Me.to();if(de.display.viewTo==de.display.viewFrom||Te.line>=de.display.viewTo||Be.line<de.display.viewFrom){oe.removeAllRanges();return}var at=yf(de,oe.anchorNode,oe.anchorOffset),Pt=yf(de,oe.focusNode,oe.focusOffset);if(!(at&&!at.bad&&Pt&&!Pt.bad&&Mn(pn(at,Pt),Te)==0&&Mn(En(at,Pt),Be)==0)){var Bt=de.display.view,Dt=Te.line>=de.display.viewFrom&&ip(de,Te)||{node:Bt[0].measure.map[2],offset:0},Vt=Be.line<de.display.viewTo&&ip(de,Be);if(!Vt){var yn=Bt[Bt.length-1].measure,Jt=yn.maps?yn.maps[yn.maps.length-1]:yn.map;Vt={node:Jt[Jt.length-1],offset:Jt[Jt.length-2]-Jt[Jt.length-3]}}if(!Dt||!Vt){oe.removeAllRanges();return}var Hn=oe.rangeCount&&oe.getRangeAt(0),Bn;try{Bn=_e(Dt.node,Dt.offset,Vt.offset,Vt.node)}catch(fr){}Bn&&(!rt&&de.state.focused?(oe.collapse(Dt.node,Dt.offset),Bn.collapsed||(oe.removeAllRanges(),oe.addRange(Bn))):(oe.removeAllRanges(),oe.addRange(Bn)),Hn&&oe.anchorNode==null?oe.addRange(Hn):rt&&this.startGracePeriod()),this.rememberSelection()}},Na.prototype.startGracePeriod=function(){var oe=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){oe.gracePeriod=!1,oe.selectionChanged()&&oe.cm.operation(function(){return oe.cm.curOp.selectionChanged=!0})},20)},Na.prototype.showMultipleSelections=function(oe){Ae(this.cm.display.cursorDiv,oe.cursors),Ae(this.cm.display.selectionDiv,oe.selection)},Na.prototype.rememberSelection=function(){var oe=this.getSelection();this.lastAnchorNode=oe.anchorNode,this.lastAnchorOffset=oe.anchorOffset,this.lastFocusNode=oe.focusNode,this.lastFocusOffset=oe.focusOffset},Na.prototype.selectionInEditor=function(){var oe=this.getSelection();if(!oe.rangeCount)return!1;var de=oe.getRangeAt(0).commonAncestorContainer;return Ye(this.div,de)},Na.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Na.prototype.blur=function(){this.div.blur()},Na.prototype.getField=function(){return this.div},Na.prototype.supportsTouch=function(){return!0},Na.prototype.receivedFocus=function(){var oe=this;this.selectionInEditor()?this.pollSelection():fn(this.cm,function(){return oe.cm.curOp.selectionChanged=!0});function de(){oe.cm.state.focused&&(oe.pollSelection(),oe.polling.set(oe.cm.options.pollInterval,de))}this.polling.set(this.cm.options.pollInterval,de)},Na.prototype.selectionChanged=function(){var oe=this.getSelection();return oe.anchorNode!=this.lastAnchorNode||oe.anchorOffset!=this.lastAnchorOffset||oe.focusNode!=this.lastFocusNode||oe.focusOffset!=this.lastFocusOffset},Na.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var oe=this.getSelection(),de=this.cm;if(z&&Ce&&this.cm.display.gutterSpecs.length&&sg(oe.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var Me=yf(de,oe.anchorNode,oe.anchorOffset),Te=yf(de,oe.focusNode,oe.focusOffset);Me&&Te&&fn(de,function(){da(de.doc,So(Me,Te),mt),(Me.bad||Te.bad)&&(de.curOp.selectionChanged=!0)})}}},Na.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var oe=this.cm,de=oe.display,Me=oe.doc.sel.primary(),Te=Me.from(),Be=Me.to();if(Te.ch==0&&Te.line>oe.firstLine()&&(Te=rn(Te.line-1,Cn(oe.doc,Te.line-1).length)),Be.ch==Cn(oe.doc,Be.line).text.length&&Be.line<oe.lastLine()&&(Be=rn(Be.line+1,0)),Te.line<de.viewFrom||Be.line>de.viewTo-1)return!1;var at,Pt,Bt;Te.line==de.viewFrom||(at=$s(oe,Te.line))==0?(Pt=Yt(de.view[0].line),Bt=de.view[0].node):(Pt=Yt(de.view[at].line),Bt=de.view[at-1].node.nextSibling);var Dt=$s(oe,Be.line),Vt,yn;if(Dt==de.view.length-1?(Vt=de.viewTo-1,yn=de.lineDiv.lastChild):(Vt=Yt(de.view[Dt+1].line)-1,yn=de.view[Dt+1].node.previousSibling),!Bt)return!1;for(var Jt=oe.doc.splitLines(_d(oe,Bt,yn,Pt,Vt)),Hn=Gn(oe.doc,rn(Pt,0),rn(Vt,Cn(oe.doc,Vt).text.length));Jt.length>1&&Hn.length>1;)if(Ct(Jt)==Ct(Hn))Jt.pop(),Hn.pop(),Vt--;else if(Jt[0]==Hn[0])Jt.shift(),Hn.shift(),Pt++;else break;for(var Bn=0,fr=0,wr=Jt[0],_r=Hn[0],oi=Math.min(wr.length,_r.length);Bn<oi&&wr.charCodeAt(Bn)==_r.charCodeAt(Bn);)++Bn;for(var Ti=Ct(Jt),vi=Ct(Hn),Bi=Math.min(Ti.length-(Jt.length==1?Bn:0),vi.length-(Hn.length==1?Bn:0));fr<Bi&&Ti.charCodeAt(Ti.length-fr-1)==vi.charCodeAt(vi.length-fr-1);)++fr;if(Jt.length==1&&Hn.length==1&&Pt==Te.line)for(;Bn&&Bn>Te.ch&&Ti.charCodeAt(Ti.length-fr-1)==vi.charCodeAt(vi.length-fr-1);)Bn--,fr++;Jt[Jt.length-1]=Ti.slice(0,Ti.length-fr).replace(/^\u200b+/,""),Jt[0]=Jt[0].slice(Bn).replace(/\u200b+$/,"");var fo=rn(Pt,Bn),pi=rn(Vt,Hn.length?Ct(Hn).length-fr:0);if(Jt.length>1||Jt[0]||Mn(fo,pi))return Ku(oe.doc,Jt,fo,pi,"+input"),!0},Na.prototype.ensurePolled=function(){this.forceCompositionEnd()},Na.prototype.reset=function(){this.forceCompositionEnd()},Na.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Na.prototype.readFromDOMSoon=function(){var oe=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(oe.readDOMTimeout=null,oe.composing)if(oe.composing.done)oe.composing=null;else return;oe.updateFromDOM()},80))},Na.prototype.updateFromDOM=function(){var oe=this;(this.cm.isReadOnly()||!this.pollContent())&&fn(this.cm,function(){return ma(oe.cm)})},Na.prototype.setUneditable=function(oe){oe.contentEditable="false"},Na.prototype.onKeyPress=function(oe){oe.charCode==0||this.composing||(oe.preventDefault(),this.cm.isReadOnly()||Rn(this.cm,mf)(this.cm,String.fromCharCode(oe.charCode==null?oe.keyCode:oe.charCode),0))},Na.prototype.readOnlyChanged=function(oe){this.div.contentEditable=String(oe!="nocursor")},Na.prototype.onContextMenu=function(){},Na.prototype.resetPosition=function(){},Na.prototype.needsContentAttribute=!0;function ip(oe,de){var Me=vc(oe,de.line);if(!Me||Me.hidden)return null;var Te=Cn(oe.doc,de.line),Be=Gc(Me,Te,de.line),at=dt(Te,oe.doc.direction),Pt="left";if(at){var Bt=Le(at,de.ch);Pt=Bt%2?"right":"left"}var Dt=Uc(Be.map,de.ch,Pt);return Dt.offset=Dt.collapse=="right"?Dt.end:Dt.start,Dt}function sg(oe){for(var de=oe;de;de=de.parentNode)if(/CodeMirror-gutter-wrapper/.test(de.className))return!0;return!1}function Rd(oe,de){return de&&(oe.bad=!0),oe}function _d(oe,de,Me,Te,Be){var at="",Pt=!1,Bt=oe.doc.lineSeparator(),Dt=!1;function Vt(Bn){return function(fr){return fr.id==Bn}}function yn(){Pt&&(at+=Bt,Dt&&(at+=Bt),Pt=Dt=!1)}function Jt(Bn){Bn&&(yn(),at+=Bn)}function Hn(Bn){if(Bn.nodeType==1){var fr=Bn.getAttribute("cm-text");if(fr){Jt(fr);return}var wr=Bn.getAttribute("cm-marker"),_r;if(wr){var oi=oe.findMarks(rn(Te,0),rn(Be+1,0),Vt(+wr));oi.length&&(_r=oi[0].find(0))&&Jt(Gn(oe.doc,_r.from,_r.to).join(Bt));return}if(Bn.getAttribute("contenteditable")=="false")return;var Ti=/^(pre|div|p|li|table|br)$/i.test(Bn.nodeName);if(!/^br$/i.test(Bn.nodeName)&&Bn.textContent.length==0)return;Ti&&yn();for(var vi=0;vi<Bn.childNodes.length;vi++)Hn(Bn.childNodes[vi]);/^(pre|p)$/i.test(Bn.nodeName)&&(Dt=!0),Ti&&(Pt=!0)}else Bn.nodeType==3&&Jt(Bn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Hn(de),de!=Me;)de=de.nextSibling,Dt=!1;return at}function yf(oe,de,Me){var Te;if(de==oe.display.lineDiv){if(Te=oe.display.lineDiv.childNodes[Me],!Te)return Rd(oe.clipPos(rn(oe.display.viewTo-1)),!0);de=null,Me=0}else for(Te=de;;Te=Te.parentNode){if(!Te||Te==oe.display.lineDiv)return null;if(Te.parentNode&&Te.parentNode==oe.display.lineDiv)break}for(var Be=0;Be<oe.display.view.length;Be++){var at=oe.display.view[Be];if(at.node==Te)return hm(at,de,Me)}}function hm(oe,de,Me){var Te=oe.text.firstChild,Be=!1;if(!de||!Ye(Te,de))return Rd(rn(Yt(oe.line),0),!0);if(de==Te&&(Be=!0,de=Te.childNodes[Me],Me=0,!de)){var at=oe.rest?Ct(oe.rest):oe.line;return Rd(rn(Yt(at),at.text.length),Be)}var Pt=de.nodeType==3?de:null,Bt=de;for(!Pt&&de.childNodes.length==1&&de.firstChild.nodeType==3&&(Pt=de.firstChild,Me&&(Me=Pt.nodeValue.length));Bt.parentNode!=Te;)Bt=Bt.parentNode;var Dt=oe.measure,Vt=Dt.maps;function yn(_r,oi,Ti){for(var vi=-1;vi<(Vt?Vt.length:0);vi++)for(var Bi=vi<0?Dt.map:Vt[vi],fo=0;fo<Bi.length;fo+=3){var pi=Bi[fo+2];if(pi==_r||pi==oi){var ko=Yt(vi<0?oe.line:oe.rest[vi]),Ja=Bi[fo]+Ti;return(Ti<0||pi!=_r)&&(Ja=Bi[fo+(Ti?1:0)]),rn(ko,Ja)}}}var Jt=yn(Pt,Bt,Me);if(Jt)return Rd(Jt,Be);for(var Hn=Bt.nextSibling,Bn=Pt?Pt.nodeValue.length-Me:0;Hn;Hn=Hn.nextSibling){if(Jt=yn(Hn,Hn.firstChild,0),Jt)return Rd(rn(Jt.line,Jt.ch-Bn),Be);Bn+=Hn.textContent.length}for(var fr=Bt.previousSibling,wr=Me;fr;fr=fr.previousSibling){if(Jt=yn(fr,fr.firstChild,-1),Jt)return Rd(rn(Jt.line,Jt.ch+wr),Be);wr+=fr.textContent.length}}var Ls=function(oe){this.cm=oe,this.prevInput="",this.pollingFast=!1,this.polling=new it,this.hasSelection=!1,this.composing=null};Ls.prototype.init=function(oe){var de=this,Me=this,Te=this.cm;this.createField(oe);var Be=this.textarea;oe.wrapper.insertBefore(this.wrapper,oe.wrapper.firstChild),fe&&(Be.style.width="0px"),Tt(Be,"input",function(){je&&ve>=9&&de.hasSelection&&(de.hasSelection=null),Me.poll()}),Tt(Be,"paste",function(Pt){Nt(Te,Pt)||ng(Pt,Te)||(Te.state.pasteIncoming=+new Date,Me.fastPoll())});function at(Pt){if(!Nt(Te,Pt)){if(Te.somethingSelected())Qh({lineWise:!1,text:Te.getSelections()});else if(Te.options.lineWiseCopyCut){var Bt=ig(Te);Qh({lineWise:!0,text:Bt.text}),Pt.type=="cut"?Te.setSelections(Bt.ranges,null,mt):(Me.prevInput="",Be.value=Bt.text.join(`
`),ht(Be))}else return;Pt.type=="cut"&&(Te.state.cutIncoming=+new Date)}}Tt(Be,"cut",at),Tt(Be,"copy",at),Tt(oe.scroller,"paste",function(Pt){if(!(nl(oe,Pt)||Nt(Te,Pt))){if(!Be.dispatchEvent){Te.state.pasteIncoming=+new Date,Me.focus();return}var Bt=new Event("paste");Bt.clipboardData=Pt.clipboardData,Be.dispatchEvent(Bt)}}),Tt(oe.lineSpace,"selectstart",function(Pt){nl(oe,Pt)||kn(Pt)}),Tt(Be,"compositionstart",function(){var Pt=Te.getCursor("from");Me.composing&&Me.composing.range.clear(),Me.composing={start:Pt,range:Te.markText(Pt,Te.getCursor("to"),{className:"CodeMirror-composing"})}}),Tt(Be,"compositionend",function(){Me.composing&&(Me.poll(),Me.composing.range.clear(),Me.composing=null)})},Ls.prototype.createField=function(oe){this.wrapper=ag(),this.textarea=this.wrapper.firstChild},Ls.prototype.screenReaderLabelChanged=function(oe){oe?this.textarea.setAttribute("aria-label",oe):this.textarea.removeAttribute("aria-label")},Ls.prototype.prepareSelection=function(){var oe=this.cm,de=oe.display,Me=oe.doc,Te=Kc(oe);if(oe.options.moveInputWithCursor){var Be=Ma(oe,Me.sel.primary().head,"div"),at=de.wrapper.getBoundingClientRect(),Pt=de.lineDiv.getBoundingClientRect();Te.teTop=Math.max(0,Math.min(de.wrapper.clientHeight-10,Be.top+Pt.top-at.top)),Te.teLeft=Math.max(0,Math.min(de.wrapper.clientWidth-10,Be.left+Pt.left-at.left))}return Te},Ls.prototype.showSelection=function(oe){var de=this.cm,Me=de.display;Ae(Me.cursorDiv,oe.cursors),Ae(Me.selectionDiv,oe.selection),oe.teTop!=null&&(this.wrapper.style.top=oe.teTop+"px",this.wrapper.style.left=oe.teLeft+"px")},Ls.prototype.reset=function(oe){if(!(this.contextMenuPending||this.composing)){var de=this.cm;if(de.somethingSelected()){this.prevInput="";var Me=de.getSelection();this.textarea.value=Me,de.state.focused&&ht(this.textarea),je&&ve>=9&&(this.hasSelection=Me)}else oe||(this.prevInput=this.textarea.value="",je&&ve>=9&&(this.hasSelection=null))}},Ls.prototype.getField=function(){return this.textarea},Ls.prototype.supportsTouch=function(){return!1},Ls.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ee||ze()!=this.textarea))try{this.textarea.focus()}catch(oe){}},Ls.prototype.blur=function(){this.textarea.blur()},Ls.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ls.prototype.receivedFocus=function(){this.slowPoll()},Ls.prototype.slowPoll=function(){var oe=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){oe.poll(),oe.cm.state.focused&&oe.slowPoll()})},Ls.prototype.fastPoll=function(){var oe=!1,de=this;de.pollingFast=!0;function Me(){var Te=de.poll();!Te&&!oe?(oe=!0,de.polling.set(60,Me)):(de.pollingFast=!1,de.slowPoll())}de.polling.set(20,Me)},Ls.prototype.poll=function(){var oe=this,de=this.cm,Me=this.textarea,Te=this.prevInput;if(this.contextMenuPending||!de.state.focused||ot(Me)&&!Te&&!this.composing||de.isReadOnly()||de.options.disableInput||de.state.keySeq)return!1;var Be=Me.value;if(Be==Te&&!de.somethingSelected())return!1;if(je&&ve>=9&&this.hasSelection===Be||ae&&/[\uf700-\uf7ff]/.test(Be))return de.display.input.reset(),!1;if(de.doc.sel==de.display.selForContextMenu){var at=Be.charCodeAt(0);if(at==8203&&!Te&&(Te="\u200B"),at==8666)return this.reset(),this.cm.execCommand("undo")}for(var Pt=0,Bt=Math.min(Te.length,Be.length);Pt<Bt&&Te.charCodeAt(Pt)==Be.charCodeAt(Pt);)++Pt;return fn(de,function(){mf(de,Be.slice(Pt),Te.length-Pt,null,oe.composing?"*compose":null),Be.length>1e3||Be.indexOf(`
`)>-1?Me.value=oe.prevInput="":oe.prevInput=Be,oe.composing&&(oe.composing.range.clear(),oe.composing.range=de.markText(oe.composing.start,de.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ls.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ls.prototype.onKeyPress=function(){je&&ve>=9&&(this.hasSelection=null),this.fastPoll()},Ls.prototype.onContextMenu=function(oe){var de=this,Me=de.cm,Te=Me.display,Be=de.textarea;de.contextMenuPending&&de.contextMenuPending();var at=rl(Me,oe),Pt=Te.scroller.scrollTop;if(!at||ye)return;var Bt=Me.options.resetSelectionOnContextMenu;Bt&&Me.doc.sel.contains(at)==-1&&Rn(Me,da)(Me.doc,So(at),mt);var Dt=Be.style.cssText,Vt=de.wrapper.style.cssText,yn=de.wrapper.offsetParent.getBoundingClientRect();de.wrapper.style.cssText="position: static",Be.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(oe.clientY-yn.top-5)+"px; left: "+(oe.clientX-yn.left-5)+`px;
z-index: 1000; background: `+(je?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Jt;ce&&(Jt=window.scrollY),Te.input.focus(),ce&&window.scrollTo(null,Jt),Te.input.reset(),Me.somethingSelected()||(Be.value=de.prevInput=" "),de.contextMenuPending=Bn,Te.selForContextMenu=Me.doc.sel,clearTimeout(Te.detectingSelectAll);function Hn(){if(Be.selectionStart!=null){var wr=Me.somethingSelected(),_r="\u200B"+(wr?Be.value:"");Be.value="\u21DA",Be.value=_r,de.prevInput=wr?"":"\u200B",Be.selectionStart=1,Be.selectionEnd=_r.length,Te.selForContextMenu=Me.doc.sel}}function Bn(){if(de.contextMenuPending==Bn&&(de.contextMenuPending=!1,de.wrapper.style.cssText=Vt,Be.style.cssText=Dt,je&&ve<9&&Te.scrollbars.setScrollTop(Te.scroller.scrollTop=Pt),Be.selectionStart!=null)){(!je||je&&ve<9)&&Hn();var wr=0,_r=function(){Te.selForContextMenu==Me.doc.sel&&Be.selectionStart==0&&Be.selectionEnd>0&&de.prevInput=="\u200B"?Rn(Me,ea)(Me):wr++<10?Te.detectingSelectAll=setTimeout(_r,500):(Te.selForContextMenu=null,Te.input.reset())};Te.detectingSelectAll=setTimeout(_r,200)}}if(je&&ve>=9&&Hn(),Ee){pr(oe);var fr=function(){Qt(window,"mouseup",fr),setTimeout(Bn,20)};Tt(window,"mouseup",fr)}else setTimeout(Bn,50)},Ls.prototype.readOnlyChanged=function(oe){oe||this.reset(),this.textarea.disabled=oe=="nocursor",this.textarea.readOnly=!!oe},Ls.prototype.setUneditable=function(){},Ls.prototype.needsContentAttribute=!1;function dm(oe,de){if(de=de?Lt(de):{},de.value=oe.value,!de.tabindex&&oe.tabIndex&&(de.tabindex=oe.tabIndex),!de.placeholder&&oe.placeholder&&(de.placeholder=oe.placeholder),de.autofocus==null){var Me=ze();de.autofocus=Me==oe||oe.getAttribute("autofocus")!=null&&Me==document.body}function Te(){oe.value=Bt.getValue()}var Be;if(oe.form&&(Tt(oe.form,"submit",Te),!de.leaveSubmitMethodAlone)){var at=oe.form;Be=at.submit;try{var Pt=at.submit=function(){Te(),at.submit=Be,at.submit(),at.submit=Pt}}catch(Dt){}}de.finishInit=function(Dt){Dt.save=Te,Dt.getTextArea=function(){return oe},Dt.toTextArea=function(){Dt.toTextArea=isNaN,Te(),oe.parentNode.removeChild(Dt.getWrapperElement()),oe.style.display="",oe.form&&(Qt(oe.form,"submit",Te),!de.leaveSubmitMethodAlone&&typeof oe.form.submit=="function"&&(oe.form.submit=Be))}},oe.style.display="none";var Bt=na(function(Dt){return oe.parentNode.insertBefore(Dt,oe.nextSibling)},de);return Bt}function zd(oe){oe.off=Qt,oe.on=Tt,oe.wheelEventPixels=Fi,oe.Doc=Ms,oe.splitLines=Cr,oe.countColumn=et,oe.findColumn=jt,oe.isWordChar=wt,oe.Pass=Mt,oe.signal=kt,oe.Line=Zo,oe.changeEnd=Yo,oe.scrollbarModel=lf,oe.Pos=rn,oe.cmpPos=Mn,oe.modes=hr,oe.mimeModes=Ir,oe.resolveMode=dn,oe.getMode=mn,oe.modeExtensions=un,oe.extendMode=Ut,oe.copyState=xn,oe.startState=en,oe.innerMode=jn,oe.commands=js,oe.keyMap=ml,oe.keyName=jd,oe.isModifierKey=yh,oe.lookupKey=Wl,oe.normalizeKeyMap=Nd,oe.StringStream=Gt,oe.SharedTextMarker=Vu,oe.TextMarker=cn,oe.LineWidget=vs,oe.e_preventDefault=kn,oe.e_stopPropagation=Kn,oe.e_stop=pr,oe.addClass=Xe,oe.contains=Ye,oe.rmClass=Ie,oe.keyNames=Lu}um(na),xh(na);var Qc="iter insert remove copy getEditor constructor".split(" ");for(var Sf in Ms.prototype)Ms.prototype.hasOwnProperty(Sf)&&xt(Qc,Sf)<0&&(na.prototype[Sf]=function(oe){return function(){return oe.apply(this.doc,arguments)}}(Ms.prototype[Sf]));return vn(Ms),na.inputStyles={textarea:Ls,contenteditable:Na},na.defineMode=function(oe){!na.defaults.mode&&oe!="null"&&(na.defaults.mode=oe),Rr.apply(this,arguments)},na.defineMIME=yi,na.defineMode("null",function(){return{token:function(oe){return oe.skipToEnd()}}}),na.defineMIME("text/plain","null"),na.defineExtension=function(oe,de){na.prototype[oe]=de},na.defineDocExtension=function(oe,de){Ms.prototype[oe]=de},na.fromTextArea=dm,zd(na),na.version="5.58.2",na})},25419:function(bn,ln,$e){(function(rt){rt($e(89780),$e(15525),$e(98101))})(function(rt){"use strict";rt.defineMode("markdown",function(St,ie){var Re=rt.getMode(St,"text/html"),je=Re.name=="null";function ve(et){if(rt.findModeByName){var it=rt.findModeByName(et);it&&(et=it.mime||it.mimes[0])}var xt=rt.getMode(St,et);return xt.name=="null"?null:xt}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 ce={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var be in ce)ce.hasOwnProperty(be)&&ie.tokenTypeOverrides[be]&&(ce[be]=ie.tokenTypeOverrides[be]);var Ce=/^([*\-_])(?:\s*\1){2,}\s*$/,ye=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,we=/^\[(x| )\](?=\s)/i,me=ie.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,xe=/^ {0,3}(?:\={1,}|-{2,})\s*$/,fe=/^[^#!\[\]*_\\<>` "'(~:]+/,z=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,ee=/^\s*\[[^\]]+?\]:.*$/,ae=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,re=" ";function le(et,it,xt){return it.f=it.inline=xt,xt(et,it)}function ue(et,it,xt){return it.f=it.block=xt,xt(et,it)}function pe(et){return!et||!/\S/.test(et.string)}function Ee(et){if(et.linkTitle=!1,et.linkHref=!1,et.linkText=!1,et.em=!1,et.strong=!1,et.strikethrough=!1,et.quote=0,et.indentedCode=!1,et.f==Ie){var it=je;if(!it){var xt=rt.innerMode(Re,et.htmlState);it=xt.mode.name=="xml"&&xt.state.tagStart===null&&!xt.state.context&&xt.state.tokenize.isInText}it&&(et.f=Fe,et.block=Pe,et.htmlState=null)}return et.trailingSpace=0,et.trailingSpaceNewLine=!1,et.prevLine=et.thisLine,et.thisLine={stream:null},null}function Pe(et,it){var xt=et.column()===it.indentation,Et=pe(it.prevLine.stream),Mt=it.indentedCode,mt=it.prevLine.hr,pt=it.list!==!1,vt=(it.listStack[it.listStack.length-1]||0)+3;it.indentedCode=!1;var jt=it.indentation;if(it.indentationDiff===null&&(it.indentationDiff=it.indentation,pt)){for(it.list=null;jt<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=jt-it.listStack[it.listStack.length-1])}var At=!Et&&!mt&&!it.prevLine.header&&(!pt||!Mt)&&!it.prevLine.fencedCodeEnd,Kt=(it.list===!1||mt||Et)&&it.indentation<=vt&&et.match(Ce),Ct=null;if(it.indentationDiff>=4&&(Mt||it.prevLine.fencedCodeEnd||it.prevLine.header||Et))return et.skipToEnd(),it.indentedCode=!0,ce.code;if(et.eatSpace())return null;if(xt&&it.indentation<=vt&&(Ct=et.match(me))&&Ct[1].length<=6)return it.quote=0,it.header=Ct[1].length,it.thisLine.header=!0,ie.highlightFormatting&&(it.formatting="header"),it.f=it.inline,Ae(it);if(it.indentation<=vt&&et.eat(">"))return it.quote=xt?1:it.quote+1,ie.highlightFormatting&&(it.formatting="quote"),et.eatSpace(),Ae(it);if(!Kt&&!it.setext&&xt&&it.indentation<=vt&&(Ct=et.match(ye))){var gt=Ct[1]?"ol":"ul";return it.indentation=jt+et.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&&et.match(we,!1)&&(it.taskList=!0),it.f=it.inline,ie.highlightFormatting&&(it.formatting=["list","list-"+gt]),Ae(it)}else{if(xt&&it.indentation<=vt&&(Ct=et.match(z,!0)))return it.quote=0,it.fencedEndRE=new RegExp(Ct[1]+"+ *$"),it.localMode=ie.fencedCodeBlockHighlighting&&ve(Ct[2]||ie.fencedCodeBlockDefaultMode),it.localMode&&(it.localState=rt.startState(it.localMode)),it.f=it.block=ke,ie.highlightFormatting&&(it.formatting="code-block"),it.code=-1,Ae(it);if(it.setext||(!At||!pt)&&!it.quote&&it.list===!1&&!it.code&&!Kt&&!ee.test(et.string)&&(Ct=et.lookAhead(1))&&(Ct=Ct.match(xe)))return it.setext?(it.header=it.setext,it.setext=0,et.skipToEnd(),ie.highlightFormatting&&(it.formatting="header")):(it.header=Ct[0].charAt(0)=="="?1:2,it.setext=it.header),it.thisLine.header=!0,it.f=it.inline,Ae(it);if(Kt)return et.skipToEnd(),it.hr=!0,it.thisLine.hr=!0,ce.hr;if(et.peek()==="[")return le(et,it,st)}return le(et,it,it.inline)}function Ie(et,it){var xt=Re.token(et,it.htmlState);if(!je){var Et=rt.innerMode(Re,it.htmlState);(Et.mode.name=="xml"&&Et.state.tagStart===null&&!Et.state.context&&Et.state.tokenize.isInText||it.md_inside&&et.current().indexOf(">")>-1)&&(it.f=Fe,it.block=Pe,it.htmlState=null)}return xt}function ke(et,it){var xt=it.listStack[it.listStack.length-1]||0,Et=it.indentation<xt,Mt=xt+3;if(it.fencedEndRE&&it.indentation<=Mt&&(Et||et.match(it.fencedEndRE))){ie.highlightFormatting&&(it.formatting="code-block");var mt;return Et||(mt=Ae(it)),it.localMode=it.localState=null,it.block=Pe,it.f=Fe,it.fencedEndRE=null,it.code=0,it.thisLine.fencedCodeEnd=!0,Et?ue(et,it,it.block):mt}else return it.localMode?it.localMode.token(et,it.localState):(et.skipToEnd(),ce.code)}function Ae(et){var it=[];if(et.formatting){it.push(ce.formatting),typeof et.formatting=="string"&&(et.formatting=[et.formatting]);for(var xt=0;xt<et.formatting.length;xt++)it.push(ce.formatting+"-"+et.formatting[xt]),et.formatting[xt]==="header"&&it.push(ce.formatting+"-"+et.formatting[xt]+"-"+et.header),et.formatting[xt]==="quote"&&(!ie.maxBlockquoteDepth||ie.maxBlockquoteDepth>=et.quote?it.push(ce.formatting+"-"+et.formatting[xt]+"-"+et.quote):it.push("error"))}if(et.taskOpen)return it.push("meta"),it.length?it.join(" "):null;if(et.taskClosed)return it.push("property"),it.length?it.join(" "):null;if(et.linkHref?it.push(ce.linkHref,"url"):(et.strong&&it.push(ce.strong),et.em&&it.push(ce.em),et.strikethrough&&it.push(ce.strikethrough),et.emoji&&it.push(ce.emoji),et.linkText&&it.push(ce.linkText),et.code&&it.push(ce.code),et.image&&it.push(ce.image),et.imageAltText&&it.push(ce.imageAltText,"link"),et.imageMarker&&it.push(ce.imageMarker)),et.header&&it.push(ce.header,ce.header+"-"+et.header),et.quote&&(it.push(ce.quote),!ie.maxBlockquoteDepth||ie.maxBlockquoteDepth>=et.quote?it.push(ce.quote+"-"+et.quote):it.push(ce.quote+"-"+ie.maxBlockquoteDepth)),et.list!==!1){var Et=(et.listStack.length-1)%3;Et?Et===1?it.push(ce.list2):it.push(ce.list3):it.push(ce.list1)}return et.trailingSpaceNewLine?it.push("trailing-space-new-line"):et.trailingSpace&&it.push("trailing-space-"+(et.trailingSpace%2?"a":"b")),it.length?it.join(" "):null}function Oe(et,it){if(et.match(fe,!0))return Ae(it)}function Fe(et,it){var xt=it.text(et,it);if(typeof xt!="undefined")return xt;if(it.list)return it.list=null,Ae(it);if(it.taskList){var Et=et.match(we,!0)[1]===" ";return Et?it.taskOpen=!0:it.taskClosed=!0,ie.highlightFormatting&&(it.formatting="task"),it.taskList=!1,Ae(it)}if(it.taskOpen=!1,it.taskClosed=!1,it.header&&et.match(/^#+$/,!0))return ie.highlightFormatting&&(it.formatting="header"),Ae(it);var Mt=et.next();if(it.linkTitle){it.linkTitle=!1;var mt=Mt;Mt==="("&&(mt=")"),mt=(mt+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var pt="^\\s*(?:[^"+mt+"\\\\]+|\\\\\\\\|\\\\.)"+mt;if(et.match(new RegExp(pt),!0))return ce.linkHref}if(Mt==="`"){var vt=it.formatting;ie.highlightFormatting&&(it.formatting="code"),et.eatWhile("`");var jt=et.current().length;if(it.code==0&&(!it.quote||jt==1))return it.code=jt,Ae(it);if(jt==it.code){var At=Ae(it);return it.code=0,At}else return it.formatting=vt,Ae(it)}else if(it.code)return Ae(it);if(Mt==="\\"&&(et.next(),ie.highlightFormatting)){var Kt=Ae(it),Ct=ce.formatting+"-escape";return Kt?Kt+" "+Ct:Ct}if(Mt==="!"&&et.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return it.imageMarker=!0,it.image=!0,ie.highlightFormatting&&(it.formatting="image"),Ae(it);if(Mt==="["&&it.imageMarker&&et.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return it.imageMarker=!1,it.imageAltText=!0,ie.highlightFormatting&&(it.formatting="image"),Ae(it);if(Mt==="]"&&it.imageAltText){ie.highlightFormatting&&(it.formatting="image");var Kt=Ae(it);return it.imageAltText=!1,it.image=!1,it.inline=it.f=Ye,Kt}if(Mt==="["&&!it.image)return it.linkText&&et.match(/^.*?\]/)||(it.linkText=!0,ie.highlightFormatting&&(it.formatting="link")),Ae(it);if(Mt==="]"&&it.linkText){ie.highlightFormatting&&(it.formatting="link");var Kt=Ae(it);return it.linkText=!1,it.inline=it.f=et.match(/\(.*?\)| ?\[.*?\]/,!1)?Ye:Fe,Kt}if(Mt==="<"&&et.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){it.f=it.inline=_e,ie.highlightFormatting&&(it.formatting="link");var Kt=Ae(it);return Kt?Kt+=" ":Kt="",Kt+ce.linkInline}if(Mt==="<"&&et.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){it.f=it.inline=_e,ie.highlightFormatting&&(it.formatting="link");var Kt=Ae(it);return Kt?Kt+=" ":Kt="",Kt+ce.linkEmail}if(ie.xml&&Mt==="<"&&et.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var gt=et.string.indexOf(">",et.pos);if(gt!=-1){var tt=et.string.substring(et.start,gt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(tt)&&(it.md_inside=!0)}return et.backUp(1),it.htmlState=rt.startState(Re),ue(et,it,Ie)}if(ie.xml&&Mt==="<"&&et.match(/^\/\w*?>/))return it.md_inside=!1,"tag";if(Mt==="*"||Mt==="_"){for(var bt=1,Ke=et.pos==1?" ":et.string.charAt(et.pos-2);bt<3&&et.eat(Mt);)bt++;var ut=et.peek()||" ",wt=!/\s/.test(ut)&&(!ae.test(ut)||/\s/.test(Ke)||ae.test(Ke)),yt=!/\s/.test(Ke)&&(!ae.test(Ke)||/\s/.test(ut)||ae.test(ut)),lt=null,Qe=null;if(bt%2&&(!it.em&&wt&&(Mt==="*"||!yt||ae.test(Ke))?lt=!0:it.em==Mt&&yt&&(Mt==="*"||!wt||ae.test(ut))&&(lt=!1)),bt>1&&(!it.strong&&wt&&(Mt==="*"||!yt||ae.test(Ke))?Qe=!0:it.strong==Mt&&yt&&(Mt==="*"||!wt||ae.test(ut))&&(Qe=!1)),Qe!=null||lt!=null){ie.highlightFormatting&&(it.formatting=lt==null?"strong":Qe==null?"em":"strong em"),lt===!0&&(it.em=Mt),Qe===!0&&(it.strong=Mt);var At=Ae(it);return lt===!1&&(it.em=!1),Qe===!1&&(it.strong=!1),At}}else if(Mt===" "&&(et.eat("*")||et.eat("_"))){if(et.peek()===" ")return Ae(it);et.backUp(1)}if(ie.strikethrough){if(Mt==="~"&&et.eatWhile(Mt)){if(it.strikethrough){ie.highlightFormatting&&(it.formatting="strikethrough");var At=Ae(it);return it.strikethrough=!1,At}else if(et.match(/^[^\s]/,!1))return it.strikethrough=!0,ie.highlightFormatting&&(it.formatting="strikethrough"),Ae(it)}else if(Mt===" "&&et.match(/^~~/,!0)){if(et.peek()===" ")return Ae(it);et.backUp(2)}}if(ie.emoji&&Mt===":"&&et.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){it.emoji=!0,ie.highlightFormatting&&(it.formatting="emoji");var We=Ae(it);return it.emoji=!1,We}return Mt===" "&&(et.match(/^ +$/,!1)?it.trailingSpace++:it.trailingSpace&&(it.trailingSpaceNewLine=!0)),Ae(it)}function _e(et,it){var xt=et.next();if(xt===">"){it.f=it.inline=Fe,ie.highlightFormatting&&(it.formatting="link");var Et=Ae(it);return Et?Et+=" ":Et="",Et+ce.linkInline}return et.match(/^[^>]+/,!0),ce.linkInline}function Ye(et,it){if(et.eatSpace())return null;var xt=et.next();return xt==="("||xt==="["?(it.f=it.inline=Xe(xt==="("?")":"]"),ie.highlightFormatting&&(it.formatting="link-string"),it.linkHref=!0,Ae(it)):"error"}var ze={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Xe(et){return function(it,xt){var Et=it.next();if(Et===et){xt.f=xt.inline=Fe,ie.highlightFormatting&&(xt.formatting="link-string");var Mt=Ae(xt);return xt.linkHref=!1,Mt}return it.match(ze[et]),xt.linkHref=!0,Ae(xt)}}function st(et,it){return et.match(/^([^\]\\]|\\.)*\]:/,!1)?(it.f=ht,et.next(),ie.highlightFormatting&&(it.formatting="link"),it.linkText=!0,Ae(it)):le(et,it,Fe)}function ht(et,it){if(et.match(/^\]:/,!0)){it.f=it.inline=ft,ie.highlightFormatting&&(it.formatting="link");var xt=Ae(it);return it.linkText=!1,xt}return et.match(/^([^\]\\]|\\.)+/,!0),ce.linkText}function ft(et,it){return et.eatSpace()?null:(et.match(/^[^\s]+/,!0),et.peek()===void 0?it.linkTitle=!0:et.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),it.f=it.inline=Fe,ce.linkHref+" url")}var Lt={startState:function(){return{f:Pe,prevLine:{stream:null},thisLine:{stream:null},block:Pe,htmlState:null,indentation:0,inline:Fe,text:Oe,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(et){return{f:et.f,prevLine:et.prevLine,thisLine:et.thisLine,block:et.block,htmlState:et.htmlState&&rt.copyState(Re,et.htmlState),indentation:et.indentation,localMode:et.localMode,localState:et.localMode?rt.copyState(et.localMode,et.localState):null,inline:et.inline,text:et.text,formatting:!1,linkText:et.linkText,linkTitle:et.linkTitle,linkHref:et.linkHref,code:et.code,em:et.em,strong:et.strong,strikethrough:et.strikethrough,emoji:et.emoji,header:et.header,setext:et.setext,hr:et.hr,taskList:et.taskList,list:et.list,listStack:et.listStack.slice(0),quote:et.quote,indentedCode:et.indentedCode,trailingSpace:et.trailingSpace,trailingSpaceNewLine:et.trailingSpaceNewLine,md_inside:et.md_inside,fencedEndRE:et.fencedEndRE}},token:function(et,it){if(it.formatting=!1,et!=it.thisLine.stream){if(it.header=0,it.hr=!1,et.match(/^\s*$/,!0))return Ee(it),null;if(it.prevLine=it.thisLine,it.thisLine={stream:et},it.taskList=!1,it.trailingSpace=0,it.trailingSpaceNewLine=!1,!it.localState&&(it.f=it.block,it.f!=Ie)){var xt=et.match(/^\s*/,!0)[0].replace(/\t/g,re).length;if(it.indentation=xt,it.indentationDiff=null,xt>0)return null}}return it.f(et,it)},innerMode:function(et){return et.block==Ie?{state:et.htmlState,mode:Re}:et.localState?{state:et.localState,mode:et.localMode}:{state:et,mode:Lt}},indent:function(et,it,xt){return et.block==Ie&&Re.indent?Re.indent(et.htmlState,it,xt):et.localState&&et.localMode.indent?et.localMode.indent(et.localState,it,xt):rt.Pass},blankLine:Ee,getType:Ae,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Lt},"xml"),rt.defineMIME("text/markdown","markdown"),rt.defineMIME("text/x-markdown","markdown")})},98101:function(bn,ln,$e){(function(rt){rt($e(89780))})(function(rt){"use strict";rt.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 St=0;St<rt.modeInfo.length;St++){var ie=rt.modeInfo[St];ie.mimes&&(ie.mime=ie.mimes[0])}rt.findModeByMIME=function(Re){Re=Re.toLowerCase();for(var je=0;je<rt.modeInfo.length;je++){var ve=rt.modeInfo[je];if(ve.mime==Re)return ve;if(ve.mimes){for(var ce=0;ce<ve.mimes.length;ce++)if(ve.mimes[ce]==Re)return ve}}if(/\+xml$/.test(Re))return rt.findModeByMIME("application/xml");if(/\+json$/.test(Re))return rt.findModeByMIME("application/json")},rt.findModeByExtension=function(Re){Re=Re.toLowerCase();for(var je=0;je<rt.modeInfo.length;je++){var ve=rt.modeInfo[je];if(ve.ext){for(var ce=0;ce<ve.ext.length;ce++)if(ve.ext[ce]==Re)return ve}}},rt.findModeByFileName=function(Re){for(var je=0;je<rt.modeInfo.length;je++){var ve=rt.modeInfo[je];if(ve.file&&ve.file.test(Re))return ve}var ce=Re.lastIndexOf("."),be=ce>-1&&Re.substring(ce+1,Re.length);if(be)return rt.findModeByExtension(be)},rt.findModeByName=function(Re){Re=Re.toLowerCase();for(var je=0;je<rt.modeInfo.length;je++){var ve=rt.modeInfo[je];if(ve.name.toLowerCase()==Re)return ve;if(ve.alias){for(var ce=0;ce<ve.alias.length;ce++)if(ve.alias[ce].toLowerCase()==Re)return ve}}}})},67549:function(bn,ln,$e){(function(rt){rt($e(89780))})(function(rt){"use strict";rt.defineMode("stex",function(St,ie){"use strict";function Re(fe,z){fe.cmdState.push(z)}function je(fe){return fe.cmdState.length>0?fe.cmdState[fe.cmdState.length-1]:null}function ve(fe){var z=fe.cmdState.pop();z&&z.closeBracket()}function ce(fe){for(var z=fe.cmdState,ee=z.length-1;ee>=0;ee--){var ae=z[ee];if(ae.name!="DEFAULT")return ae}return{styleIdentifier:function(){return null}}}function be(fe,z,ee){return function(){this.name=fe,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 Ce={};Ce.importmodule=be("importmodule","tag",["string","builtin"]),Ce.documentclass=be("documentclass","tag",["","atom"]),Ce.usepackage=be("usepackage","tag",["atom"]),Ce.begin=be("begin","tag",["atom"]),Ce.end=be("end","tag",["atom"]),Ce.label=be("label","tag",["atom"]),Ce.ref=be("ref","tag",["atom"]),Ce.eqref=be("eqref","tag",["atom"]),Ce.cite=be("cite","tag",["atom"]),Ce.bibitem=be("bibitem","tag",["atom"]),Ce.Bibitem=be("Bibitem","tag",["atom"]),Ce.RBibitem=be("RBibitem","tag",["atom"]),Ce.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function ye(fe,z){fe.f=z}function we(fe,z){var ee;if(fe.match(/^\\[a-zA-Z@]+/)){var ae=fe.current().slice(1);return ee=Ce.hasOwnProperty(ae)?Ce[ae]:Ce.DEFAULT,ee=new ee,Re(z,ee),ye(z,xe),ee.style}if(fe.match(/^\\[$&%#{}_]/)||fe.match(/^\\[,;!\/\\]/))return"tag";if(fe.match("\\["))return ye(z,function(le,ue){return me(le,ue,"\\]")}),"keyword";if(fe.match("\\("))return ye(z,function(le,ue){return me(le,ue,"\\)")}),"keyword";if(fe.match("$$"))return ye(z,function(le,ue){return me(le,ue,"$$")}),"keyword";if(fe.match("$"))return ye(z,function(le,ue){return me(le,ue,"$")}),"keyword";var re=fe.next();if(re=="%")return fe.skipToEnd(),"comment";if(re=="}"||re=="]"){if(ee=je(z),ee)ee.closeBracket(re),ye(z,xe);else return"error";return"bracket"}else return re=="{"||re=="["?(ee=Ce.DEFAULT,ee=new ee,Re(z,ee),"bracket"):/\d/.test(re)?(fe.eatWhile(/[\w.%]/),"atom"):(fe.eatWhile(/[\w\-_]/),ee=ce(z),ee.name=="begin"&&(ee.argument=fe.current()),ee.styleIdentifier())}function me(fe,z,ee){if(fe.eatSpace())return null;if(ee&&fe.match(ee))return ye(z,we),"keyword";if(fe.match(/^\\[a-zA-Z@]+/))return"tag";if(fe.match(/^[a-zA-Z]+/))return"variable-2";if(fe.match(/^\\[$&%#{}_]/)||fe.match(/^\\[,;!\/]/)||fe.match(/^[\^_&]/))return"tag";if(fe.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(fe.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ae=fe.next();return ae=="{"||ae=="}"||ae=="["||ae=="]"||ae=="("||ae==")"?"bracket":ae=="%"?(fe.skipToEnd(),"comment"):"error"}function xe(fe,z){var ee=fe.peek(),ae;return ee=="{"||ee=="["?(ae=je(z),ae.openBracket(ee),fe.eat(ee),ye(z,we),"bracket"):/[ \t\r]/.test(ee)?(fe.eat(ee),null):(ye(z,we),ve(z),we(fe,z))}return{startState:function(){var fe=ie.inMathMode?function(z,ee){return me(z,ee)}:we;return{cmdState:[],f:fe}},copyState:function(fe){return{cmdState:fe.cmdState.slice(),f:fe.f}},token:function(fe,z){return z.f(fe,z)},blankLine:function(fe){fe.f=we,fe.cmdState.length=0},lineComment:"%"}}),rt.defineMIME("text/x-stex","stex"),rt.defineMIME("text/x-latex","stex")})},15525:function(bn,ln,$e){(function(rt){rt($e(89780))})(function(rt){"use strict";var St={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};rt.defineMode("xml",function(Re,je){var ve=Re.indentUnit,ce={},be=je.htmlMode?St:ie;for(var Ce in be)ce[Ce]=be[Ce];for(var Ce in je)ce[Ce]=je[Ce];var ye,we;function me(_e,Ye){function ze(ht){return Ye.tokenize=ht,ht(_e,Ye)}var Xe=_e.next();if(Xe=="<")return _e.eat("!")?_e.eat("[")?_e.match("CDATA[")?ze(z("atom","]]>")):null:_e.match("--")?ze(z("comment","-->")):_e.match("DOCTYPE",!0,!0)?(_e.eatWhile(/[\w\._\-]/),ze(ee(1))):null:_e.eat("?")?(_e.eatWhile(/[\w\._\-]/),Ye.tokenize=z("meta","?>"),"meta"):(ye=_e.eat("/")?"closeTag":"openTag",Ye.tokenize=xe,"tag bracket");if(Xe=="&"){var st;return _e.eat("#")?_e.eat("x")?st=_e.eatWhile(/[a-fA-F\d]/)&&_e.eat(";"):st=_e.eatWhile(/[\d]/)&&_e.eat(";"):st=_e.eatWhile(/[\w\.\-:]/)&&_e.eat(";"),st?"atom":"error"}else return _e.eatWhile(/[^&<]/),null}me.isInText=!0;function xe(_e,Ye){var ze=_e.next();if(ze==">"||ze=="/"&&_e.eat(">"))return Ye.tokenize=me,ye=ze==">"?"endTag":"selfcloseTag","tag bracket";if(ze=="=")return ye="equals",null;if(ze=="<"){Ye.tokenize=me,Ye.state=ue,Ye.tagName=Ye.tagStart=null;var Xe=Ye.tokenize(_e,Ye);return Xe?Xe+" tag error":"tag error"}else return/[\'\"]/.test(ze)?(Ye.tokenize=fe(ze),Ye.stringStartCol=_e.column(),Ye.tokenize(_e,Ye)):(_e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function fe(_e){var Ye=function(ze,Xe){for(;!ze.eol();)if(ze.next()==_e){Xe.tokenize=xe;break}return"string"};return Ye.isInAttribute=!0,Ye}function z(_e,Ye){return function(ze,Xe){for(;!ze.eol();){if(ze.match(Ye)){Xe.tokenize=me;break}ze.next()}return _e}}function ee(_e){return function(Ye,ze){for(var Xe;(Xe=Ye.next())!=null;){if(Xe=="<")return ze.tokenize=ee(_e+1),ze.tokenize(Ye,ze);if(Xe==">")if(_e==1){ze.tokenize=me;break}else return ze.tokenize=ee(_e-1),ze.tokenize(Ye,ze)}return"meta"}}function ae(_e,Ye,ze){this.prev=_e.context,this.tagName=Ye,this.indent=_e.indented,this.startOfLine=ze,(ce.doNotIndent.hasOwnProperty(Ye)||_e.context&&_e.context.noIndent)&&(this.noIndent=!0)}function re(_e){_e.context&&(_e.context=_e.context.prev)}function le(_e,Ye){for(var ze;;){if(!_e.context||(ze=_e.context.tagName,!ce.contextGrabbers.hasOwnProperty(ze)||!ce.contextGrabbers[ze].hasOwnProperty(Ye)))return;re(_e)}}function ue(_e,Ye,ze){return _e=="openTag"?(ze.tagStart=Ye.column(),pe):_e=="closeTag"?Ee:ue}function pe(_e,Ye,ze){return _e=="word"?(ze.tagName=Ye.current(),we="tag",ke):ce.allowMissingTagName&&_e=="endTag"?(we="tag bracket",ke(_e,Ye,ze)):(we="error",pe)}function Ee(_e,Ye,ze){if(_e=="word"){var Xe=Ye.current();return ze.context&&ze.context.tagName!=Xe&&ce.implicitlyClosed.hasOwnProperty(ze.context.tagName)&&re(ze),ze.context&&ze.context.tagName==Xe||ce.matchClosing===!1?(we="tag",Pe):(we="tag error",Ie)}else return ce.allowMissingTagName&&_e=="endTag"?(we="tag bracket",Pe(_e,Ye,ze)):(we="error",Ie)}function Pe(_e,Ye,ze){return _e!="endTag"?(we="error",Pe):(re(ze),ue)}function Ie(_e,Ye,ze){return we="error",Pe(_e,Ye,ze)}function ke(_e,Ye,ze){if(_e=="word")return we="attribute",Ae;if(_e=="endTag"||_e=="selfcloseTag"){var Xe=ze.tagName,st=ze.tagStart;return ze.tagName=ze.tagStart=null,_e=="selfcloseTag"||ce.autoSelfClosers.hasOwnProperty(Xe)?le(ze,Xe):(le(ze,Xe),ze.context=new ae(ze,Xe,st==ze.indented)),ue}return we="error",ke}function Ae(_e,Ye,ze){return _e=="equals"?Oe:(ce.allowMissing||(we="error"),ke(_e,Ye,ze))}function Oe(_e,Ye,ze){return _e=="string"?Fe:_e=="word"&&ce.allowUnquoted?(we="string",ke):(we="error",ke(_e,Ye,ze))}function Fe(_e,Ye,ze){return _e=="string"?Fe:ke(_e,Ye,ze)}return{startState:function(_e){var Ye={tokenize:me,state:ue,indented:_e||0,tagName:null,tagStart:null,context:null};return _e!=null&&(Ye.baseIndent=_e),Ye},token:function(_e,Ye){if(!Ye.tagName&&_e.sol()&&(Ye.indented=_e.indentation()),_e.eatSpace())return null;ye=null;var ze=Ye.tokenize(_e,Ye);return(ze||ye)&&ze!="comment"&&(we=null,Ye.state=Ye.state(ye||ze,_e,Ye),we&&(ze=we=="error"?ze+" error":we)),ze},indent:function(_e,Ye,ze){var Xe=_e.context;if(_e.tokenize.isInAttribute)return _e.tagStart==_e.indented?_e.stringStartCol+1:_e.indented+ve;if(Xe&&Xe.noIndent)return rt.Pass;if(_e.tokenize!=xe&&_e.tokenize!=me)return ze?ze.match(/^(\s*)/)[0].length:0;if(_e.tagName)return ce.multilineTagIndentPastTag!==!1?_e.tagStart+_e.tagName.length+2:_e.tagStart+ve*(ce.multilineTagIndentFactor||1);if(ce.alignCDATA&&/<!\[CDATA\[/.test(Ye))return 0;var st=Ye&&/^<(\/)?([\w_:\.-]*)/.exec(Ye);if(st&&st[1])for(;Xe;)if(Xe.tagName==st[2]){Xe=Xe.prev;break}else if(ce.implicitlyClosed.hasOwnProperty(Xe.tagName))Xe=Xe.prev;else break;else if(st)for(;Xe;){var ht=ce.contextGrabbers[Xe.tagName];if(ht&&ht.hasOwnProperty(st[2]))Xe=Xe.prev;else break}for(;Xe&&Xe.prev&&!Xe.startOfLine;)Xe=Xe.prev;return Xe?Xe.indent+ve:_e.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:ce.htmlMode?"html":"xml",helperType:ce.htmlMode?"html":"xml",skipAttribute:function(_e){_e.state==Oe&&(_e.state=ke)},xmlCurrentTag:function(_e){return _e.tagName?{name:_e.tagName,close:_e.type=="closeTag"}:null},xmlCurrentContext:function(_e){for(var Ye=[],ze=_e.context;ze;ze=ze.prev)ze.tagName&&Ye.push(ze.tagName);return Ye.reverse()}}}),rt.defineMIME("text/xml","xml"),rt.defineMIME("application/xml","xml"),rt.mimeModes.hasOwnProperty("text/html")||rt.defineMIME("text/html",{name:"xml",htmlMode:!0})})},12378:function(bn,ln,$e){"use strict";$e.d(ln,{$u:function(){return Ce},BD:function(){return bt},E9:function(){return be},FF:function(){return Fr},FJ:function(){return ue},Hn:function(){return le},KX:function(){return Ee},NB:function(){return He},S0:function(){return Ct},UL:function(){return ye},Vk:function(){return re},Vm:function(){return Le},YI:function(){return gt},ZA:function(){return ie},Zt:function(){return we},al:function(){return lt},bn:function(){return yt},bx:function(){return Ke},g2:function(){return tt},h1:function(){return Oe},hD:function(){return vn},l4:function(){return ve},rU:function(){return De},s_:function(){return ut},uz:function(){return qe},z6:function(){return me}}),bn=$e.hmd(bn),function(){var ot;function di(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Yr(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:di(a)}}function Ri(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var hr=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},Ir;if(typeof Object.setPrototypeOf=="function")Ir=Object.setPrototypeOf;else{var Rr;e:{var yi={a:!0},dn={};try{dn.__proto__=yi,Rr=dn.a;break e}catch(a){}Rr=!1}Ir=Rr?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var mn=Ir;function un(a,y){if(a.prototype=hr(y.prototype),a.prototype.constructor=a,mn)mn(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 Ut=typeof $e.g!="undefined"&&$e.g!=null?$e.g:self,xn=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},jn=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function en(a,y){if(y){var x=Ut;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&&jn(x,a,{writable:!0,value:y})}}en("Object.assign",function(a){return a||xn}),en("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 Gt=typeof globalThis=="object"&&globalThis||typeof $e.g=="object"&&$e.g.global===$e.g&&$e.g||typeof self=="object"&&self.self===self&&self||{};Gt.requestAnimationFrame===void 0&&(Gt.setImmediate===void 0?Gt.requestAnimationFrame=function(a){Gt.setTimeout(a,0)}:Gt.requestAnimationFrame=Gt.setImmediate);function Cn(){}function Gn(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&Gt.clearTimeout(x),x=ir(function(){x=-1,a.apply(b,E)},y)}}function ir(a,y){return Gt.setTimeout(a,y)}function Pn(a){return Gt.document.createElement(a)}function Yt(a){throw Error(a)}function zn(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),Yt(a)}function Qn(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),Yt(x+" is not in the range "+y+": "+a)}function or(a){Gt.console&&Gt.console.log(a)}function rn(a){return typeof a=="object"&&a!==null}function Mn(a){return Array.isArray(a)||Gt.NodeList&&a instanceof Gt.NodeList||Gt.HTMLCollection&&a instanceof Gt.HTMLCollection}function an(a){return Array.prototype.slice.call(a)}function gn(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):Yt("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function En(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):Yt("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function pn(){var a=Br.pop();return a===void 0?[]:a}function On(a){a.length=0,Br.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(rn(a)&&a.constructor)return Dn(a.constructor);return typeof a}function $n(a){var y=a;return rn(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 Fn(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 Tn(a,y,x){Object.defineProperty(Do.prototype,a,{get:y,set:x})}function Yn(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 Lr=Gt.navigator!==void 0&&0<Gt.navigator.userAgent.indexOf("Trident/7"),qr=Gt.navigator!==void 0&&Gt.navigator.platform!==void 0&&Gt.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,Br=[];Object.freeze([]),Cn.className="Util",Cn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",Cn.adym="gojs.net",Cn.vfo="28e645fdb266",Cn.className="Util";function tn(a,y,x){gi(this),this.j=a,this.xa=y,this.o=x}tn.prototype.toString=function(){return"EnumValue."+this.xa};function lr(a,y){return y==null||y===""?null:a[y]}Ut.Object.defineProperties(tn.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),tn.className="EnumValue";function br(){this.ew=[]}br.prototype.toString=function(){return this.ew.join("")},br.prototype.add=function(a){a!==""&&this.ew.push(a)},br.className="StringBuilder";function ar(){}ar.className="PropertyCollection";var Qr={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){Gt.console&&Gt.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,se){return function(){throw Error("Property "+ne.Zl[se.Tj]+" of "+ne.x+" is read-only.")}}(y,E)})}}}y={Zl:y.Zl,x:y.x}}}};function Xr(){}Xr.prototype.reset=function(){},Xr.prototype.next=function(){return!1},Xr.prototype.Ad=function(){return!1},Xr.prototype.first=function(){return null},Xr.prototype.any=function(){return!1},Xr.prototype.all=function(){return!0},Xr.prototype.each=function(){return this},Xr.prototype.map=function(){return this},Xr.prototype.filter=function(){return this},Xr.prototype.de=function(){},Xr.prototype.toString=function(){return"EmptyIterator"},Ut.Object.defineProperties(Xr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Xr.prototype.first=Xr.prototype.first,Xr.prototype.hasNext=Xr.prototype.Ad,Xr.prototype.next=Xr.prototype.next,Xr.prototype.reset=Xr.prototype.reset;var hi=null;Xr.className="EmptyIterator",hi=new Xr;function Gr(a){this.key=-1,this.value=a}Gr.prototype.reset=function(){this.key=-1},Gr.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},Gr.prototype.Ad=function(){return this.next()},Gr.prototype.first=function(){return this.key=0,this.value},Gr.prototype.any=function(a){return this.key=-1,a(this.value)},Gr.prototype.all=function(a){return this.key=-1,a(this.value)},Gr.prototype.each=function(a){return this.key=-1,a(this.value),this},Gr.prototype.map=function(a){return new Gr(a(this.value))},Gr.prototype.filter=function(a){return a(this.value)?new Gr(this.value):hi},Gr.prototype.de=function(){this.value=null},Gr.prototype.toString=function(){return"SingletonIterator("+this.value+")"},Ut.Object.defineProperties(Gr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),Gr.prototype.first=Gr.prototype.first,Gr.prototype.hasNext=Gr.prototype.Ad,Gr.prototype.next=Gr.prototype.next,Gr.prototype.reset=Gr.prototype.reset,Gr.className="SingletonIterator";function Tr(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}Tr.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},Tr.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},Tr.prototype.Ad=function(){return this.next()},Tr.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},Tr.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},Tr.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},Tr.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},Tr.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 Ln,a.s=x,a.xb(),a.iterator},Tr.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 Ln,a.s=x,a.xb(),a.iterator},Tr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},Tr.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},Ut.Object.defineProperties(Tr.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}}}),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="ListIterator";function Si(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}Si.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},Si.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)},Si.prototype.Ad=function(){return this.next()},Si.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},Si.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},Si.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},Si.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},Si.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 Ln,a.s=x,a.xb(),a.iterator},Si.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 Ln,a.s=x,a.xb(),a.iterator},Si.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},Si.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},Ut.Object.defineProperties(Si.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),Si.prototype.first=Si.prototype.first,Si.prototype.hasNext=Si.prototype.Ad,Si.prototype.next=Si.prototype.next,Si.prototype.reset=Si.prototype.reset,Si.className="ListIteratorBackwards";function Ln(a){gi(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&Yt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}ot=Ln.prototype,ot.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},ot.freeze=function(){return this._isFrozen=!0,this},ot.ka=function(){return this._isFrozen=!1,this},ot.toString=function(){return"List()#"+Mi(this)},ot.add=function(a){return a===null?this:(this._isFrozen&&zn(this,a),this.s.push(a),this.xb(),this)},ot.push=function(a){this.add(a)},ot.addAll=function(a){if(a===null)return this;this._isFrozen&&zn(this);var y=this.s;if(Mn(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},ot.clear=function(){this._isFrozen&&zn(this),this.s.length=0,this.xb()},ot.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},ot.has=function(a){return this.contains(a)},ot.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},ot.M=function(a){var y=this.s;return(0>a||a>=y.length)&&Qn(a,"0 <= i < length",Ln,"elt:i"),y[a]},ot.get=function(a){return this.M(a)},ot.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&Qn(a,"0 <= i < length",Ln,"setElt:i"),this._isFrozen&&zn(this,a),x[a]=y},ot.set=function(a,y){this.cd(a,y)},ot.first=function(){var a=this.s;return a.length===0?null:a[0]},ot.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},ot.pop=function(){this._isFrozen&&zn(this);var a=this.s;return 0<a.length?a.pop():null},Ln.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},Ln.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},Ln.prototype.each=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)a(y[b]);return this},Ln.prototype.map=function(a){for(var y=new Ln,x=[],b=this.s,E=b.length,te=0;te<E;te++)x.push(a(b[te]));return y.s=x,y.xb(),y},Ln.prototype.filter=function(a){for(var y=new Ln,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},ot=Ln.prototype,ot.Gb=function(a,y){0>a&&Qn(a,">= 0",Ln,"insertAt:i"),this._isFrozen&&zn(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},ot.remove=function(a){if(a===null)return!1;this._isFrozen&&zn(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)},ot.delete=function(a){return this.remove(a)},ot.mb=function(a){var y=this.s;(0>a||a>=y.length)&&Qn(a,"0 <= i < length",Ln,"removeAt:i"),this._isFrozen&&zn(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},ot.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&&zn(this);for(var E=a,te=y+1;te<b;)x[E++]=x[te++];return x.length=b-(y-a+1),this.xb(),this},Ln.prototype.copy=function(){var a=new Ln,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},ot=Ln.prototype,ot.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),b=0;b<y;b++)x[b]=a[b];return x},ot.Iv=function(){for(var a=new Nn,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},ot.sort=function(a){return this._isFrozen&&zn(this),this.s.sort(a),this.xb(),this},ot.zi=function(a,y,x){var b=this.s,E=b.length;y===void 0&&(y=0),x===void 0&&(x=E),this._isFrozen&&zn(this);var te=x-y;if(1>=te)return this;if((0>y||y>=E-1)&&Qn(y,"0 <= from < length",Ln,"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},ot.reverse=function(){return this._isFrozen&&zn(this),this.s.reverse(),this.xb(),this},Ut.Object.defineProperties(Ln.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 hi;var a=this.Sa;return a!==null?(a.reset(),a):new Tr(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return hi;var a=this.Hg;return a!==null?(a.reset(),a):new Si(this)}}}),Ln.prototype.reverse=Ln.prototype.reverse,Ln.prototype.sortRange=Ln.prototype.zi,Ln.prototype.sort=Ln.prototype.sort,Ln.prototype.toSet=Ln.prototype.Iv,Ln.prototype.toArray=Ln.prototype.Fa,Ln.prototype.removeRange=Ln.prototype.removeRange,Ln.prototype.removeAt=Ln.prototype.mb,Ln.prototype.delete=Ln.prototype.delete,Ln.prototype.remove=Ln.prototype.remove,Ln.prototype.insertAt=Ln.prototype.Gb,Ln.prototype.pop=Ln.prototype.pop,Ln.prototype.last=Ln.prototype.jc,Ln.prototype.first=Ln.prototype.first,Ln.prototype.set=Ln.prototype.set,Ln.prototype.setElt=Ln.prototype.cd,Ln.prototype.get=Ln.prototype.get,Ln.prototype.elt=Ln.prototype.M,Ln.prototype.indexOf=Ln.prototype.indexOf,Ln.prototype.has=Ln.prototype.has,Ln.prototype.contains=Ln.prototype.contains,Ln.prototype.clear=Ln.prototype.clear,Ln.prototype.addAll=Ln.prototype.addAll,Ln.prototype.push=Ln.prototype.push,Ln.prototype.add=Ln.prototype.add,Ln.prototype.thaw=Ln.prototype.ka,Ln.prototype.freeze=Ln.prototype.freeze,Ln.className="List";function Ki(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Ki.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Ki.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)},Ki.prototype.Ad=function(){return this.next()},Ki.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},Ki.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},Ki.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},Ki.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},Ki.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new Ln;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Ki.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new Ln;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Ki.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Ki.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},Ut.Object.defineProperties(Ki.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),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="SetIterator";function Nn(a){gi(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Yt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}ot=Nn.prototype,ot.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},ot.freeze=function(){return this._isFrozen=!0,this},ot.ka=function(){return this._isFrozen=!1,this},ot.toString=function(){return"Set()#"+Mi(this)},ot.add=function(a){if(a===null)return this;this._isFrozen&&zn(this,a);var y=a;return rn(a)&&(y=xo(a)),this.Tb[y]===void 0&&(this.Sb++,a=new Li(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},ot.addAll=function(a){if(a===null)return this;if(this._isFrozen&&zn(this),Mn(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},ot.contains=function(a){if(a===null)return!1;var y=a;return rn(a)&&(y=Mi(a),y===void 0)?!1:this.Tb[y]!==void 0},ot.has=function(a){return this.contains(a)},ot.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},ot.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},ot.first=function(){var a=this.ea;return a===null?null:a.value},Nn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Nn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Nn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},Nn.prototype.map=function(a){for(var y=new Nn,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},Nn.prototype.filter=function(a){for(var y=new Nn,x=this.ea;x!==null;){var b=x.value;a(b)&&y.add(b),x=x.va}return y},ot=Nn.prototype,ot.remove=function(a){if(a===null)return!1;this._isFrozen&&zn(this,a);var y=a;if(rn(a)&&(y=Mi(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},ot.delete=function(a){return this.remove(a)},ot.hp=function(a){if(a===null)return this;if(this._isFrozen&&zn(this),Mn(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},ot.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&zn(this);var y=new Nn;y.addAll(a),a=[];for(var x=this.iterator;x.next();){var b=x.value;y.contains(b)||a.push(b)}return this.hp(a),this},ot.clear=function(){this._isFrozen&&zn(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},Nn.prototype.copy=function(){var a=new Nn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},Nn.prototype.Fa=function(){var a=Array(this.Sb),y=this.Tb,x=0,b;for(b in y)a[x]=y[b].value,x++;return a},Nn.prototype.Hv=function(){var a=new Ln,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function gi(a){a.__gohashid=Go++}function xo(a){var y=a.__gohashid;return y===void 0&&(y=Go++,a.__gohashid=y),y}function Mi(a){return a.__gohashid}Ut.Object.defineProperties(Nn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return hi;var a=this.Sa;return a!==null?(a.reset(),a):new Ki(this)}}}),Nn.prototype.toList=Nn.prototype.Hv,Nn.prototype.toArray=Nn.prototype.Fa,Nn.prototype.clear=Nn.prototype.clear,Nn.prototype.retainAll=Nn.prototype.pA,Nn.prototype.removeAll=Nn.prototype.hp,Nn.prototype.delete=Nn.prototype.delete,Nn.prototype.remove=Nn.prototype.remove,Nn.prototype.first=Nn.prototype.first,Nn.prototype.containsAny=Nn.prototype.Ty,Nn.prototype.containsAll=Nn.prototype.Sy,Nn.prototype.has=Nn.prototype.has,Nn.prototype.contains=Nn.prototype.contains,Nn.prototype.addAll=Nn.prototype.addAll,Nn.prototype.add=Nn.prototype.add,Nn.prototype.thaw=Nn.prototype.ka,Nn.prototype.freeze=Nn.prototype.freeze;var Go=1;Nn.className="Set",Nn.uniqueHash=gi,Nn.hashIdUnique=xo,Nn.hashId=Mi;function po(a){this.ma=a,this.qa=a.Ja,this.sa=null}po.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},po.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)},po.prototype.Ad=function(){return this.next()},po.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},po.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},po.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},po.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},po.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new Ln;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},po.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new Ln;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},po.prototype.de=function(){this.value=this.key=null,this.qa=-1},po.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},Ut.Object.defineProperties(po.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),po.prototype.first=po.prototype.first,po.prototype.hasNext=po.prototype.Ad,po.prototype.next=po.prototype.next,po.prototype.reset=po.prototype.reset,po.className="MapKeySetIterator";function Wr(a){Nn.call(this),gi(this),this._isFrozen=!0,this.ma=a}un(Wr,Nn),ot=Wr.prototype,ot.freeze=function(){return this},ot.ka=function(){return this},ot.toString=function(){return"MapKeySet("+this.ma.toString()+")"},ot.add=function(){Yt("This Set is read-only: "+this.toString())},ot.contains=function(a){return this.ma.contains(a)},ot.has=function(a){return this.contains(a)},ot.remove=function(){Yt("This Set is read-only: "+this.toString())},ot.delete=function(a){return this.remove(a)},ot.clear=function(){Yt("This Set is read-only: "+this.toString())},ot.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Wr.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Wr.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Wr.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Wr.prototype.map=function(a){for(var y=new Nn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Wr.prototype.filter=function(a){for(var y=new Nn,x=this.ma.ea;x!==null;){var b=x.key;a(b)&&y.add(b),x=x.va}return y},Wr.prototype.copy=function(){return new Wr(this.ma)},Wr.prototype.Iv=function(){var a=new Nn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Wr.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},Wr.prototype.Hv=function(){var a=new Ln,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Ut.Object.defineProperties(Wr.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?hi:new po(this.ma)}}}),Wr.prototype.toList=Wr.prototype.Hv,Wr.prototype.toArray=Wr.prototype.Fa,Wr.prototype.toSet=Wr.prototype.Iv,Wr.prototype.first=Wr.prototype.first,Wr.prototype.clear=Wr.prototype.clear,Wr.prototype.delete=Wr.prototype.delete,Wr.prototype.remove=Wr.prototype.remove,Wr.prototype.has=Wr.prototype.has,Wr.prototype.contains=Wr.prototype.contains,Wr.prototype.add=Wr.prototype.add,Wr.prototype.thaw=Wr.prototype.ka,Wr.prototype.freeze=Wr.prototype.freeze,Wr.className="MapKeySet";function Hr(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}Hr.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},Hr.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)},Hr.prototype.Ad=function(){return this.next()},Hr.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},Hr.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},Hr.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},Hr.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},Hr.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Ln;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Hr.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Ln;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Hr.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},Hr.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},Ut.Object.defineProperties(Hr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Hr.prototype.first=Hr.prototype.first,Hr.prototype.hasNext=Hr.prototype.Ad,Hr.prototype.next=Hr.prototype.next,Hr.prototype.reset=Hr.prototype.reset,Hr.className="MapValueSetIterator";function Li(a,y){this.key=a,this.value=y,this.ll=this.va=null}Li.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},Li.className="KeyValuePair";function _i(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}_i.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},_i.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)},_i.prototype.Ad=function(){return this.next()},_i.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},_i.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},_i.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},_i.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},_i.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Ln;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},_i.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Ln;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},_i.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},_i.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},Ut.Object.defineProperties(_i.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),_i.prototype.first=_i.prototype.first,_i.prototype.hasNext=_i.prototype.Ad,_i.prototype.next=_i.prototype.next,_i.prototype.reset=_i.prototype.reset,_i.className="MapIterator";function ur(a){gi(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"&&Yt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}ot=ur.prototype,ot.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},ot.freeze=function(){return this._isFrozen=!0,this},ot.ka=function(){return this._isFrozen=!1,this},ot.toString=function(){return"Map()#"+Mi(this)},ot.add=function(a,y){this._isFrozen&&zn(this,a);var x=a;rn(a)&&(x=xo(a));var b=this.Tb[x];return b===void 0?(this.Sb++,a=new Li(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},ot.set=function(a,y){return this.add(a,y)},ot.addAll=function(a){if(a===null)return this;if(Mn(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 ur)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},ot.first=function(){return this.ea},ur.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},ur.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},ur.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},ur.prototype.map=function(a){for(var y=new ur,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},ur.prototype.filter=function(a){for(var y=new ur,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},ot=ur.prototype,ot.contains=function(a){var y=a;return rn(a)&&(y=Mi(a),y===void 0)?!1:this.Tb[y]!==void 0},ot.has=function(a){return this.contains(a)},ot.I=function(a){var y=a;return rn(a)&&(y=Mi(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},ot.get=function(a){return this.I(a)},ot.remove=function(a){if(a===null)return!1;this._isFrozen&&zn(this,a);var y=a;if(rn(a)&&(y=Mi(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},ot.delete=function(a){return this.remove(a)},ot.clear=function(){this._isFrozen&&zn(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()},ur.prototype.copy=function(){var a=new ur,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},ur.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 Li(E.key,E.value),x++}return y},ur.prototype.Lf=function(){return new Wr(this)},Ut.Object.defineProperties(ur.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return hi;var a=this.Sa;return a!==null?(a.reset(),a):new _i(this)}},iteratorKeys:{get:function(){return 0>=this.count?hi:new po(this)}},iteratorValues:{get:function(){if(0>=this.count)return hi;var a=this.jf;return a!==null?(a.reset(),a):new Hr(this)}}}),ur.prototype.toKeySet=ur.prototype.Lf,ur.prototype.toArray=ur.prototype.Fa,ur.prototype.clear=ur.prototype.clear,ur.prototype.delete=ur.prototype.delete,ur.prototype.remove=ur.prototype.remove,ur.prototype.get=ur.prototype.get,ur.prototype.getValue=ur.prototype.I,ur.prototype.has=ur.prototype.has,ur.prototype.contains=ur.prototype.contains,ur.prototype.first=ur.prototype.first,ur.prototype.addAll=ur.prototype.addAll,ur.prototype.set=ur.prototype.set,ur.prototype.add=ur.prototype.add,ur.prototype.thaw=ur.prototype.ka,ur.prototype.freeze=ur.prototype.freeze,ur.className="Map";function It(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):Yt("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var Ei,Kr,Nr,Wi,Ur;It.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},It.prototype.h=function(a,y){return this.x=a,this.y=y,this},It.prototype.sg=function(a,y){return this.x=a,this.y=y,this},It.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},It.prototype.copy=function(){var a=new It;return a.x=this.x,a.y=this.y,a},ot=It.prototype,ot.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},ot.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},ot.freeze=function(){return this._isFrozen=!0,this},ot.ka=function(){return Object.isFrozen(this)&&Yt("cannot thaw constant: "+this),this._isFrozen=!1,this};function jr(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 It(x,E)}return new It}function wi(a){return a.x.toString()+" "+a.y.toString()}ot.toString=function(){return"Point("+this.x+","+this.y+")"},ot.D=function(a){return a instanceof It?this.x===a.x&&this.y===a.y:!1},ot.hi=function(a,y){return this.x===a&&this.y===y},ot.Xa=function(a){return qt.B(this.x,a.x)&&qt.B(this.y,a.y)},ot.add=function(a){return this.x+=a.x,this.y+=a.y,this},ot.re=function(a){return this.x-=a.x,this.y-=a.y,this},ot.offset=function(a,y){return this.x+=a,this.y+=y,this},It.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},ot=It.prototype,ot.scale=function(a,y){return this.x*=a,this.y*=y,this},ot.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},ot.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},ot.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},ot.ab=function(a){return Vi(a.x-this.x,a.y-this.y)},ot.direction=function(a,y){return Vi(a-this.x,y-this.y)};function Vi(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}ot.Ry=function(a,y){return qt.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},ot.fA=function(a,y,x,b){return qt.qh(a,y,x,b,this.x,this.y,this),this},ot.gA=function(a,y){return qt.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},ot.uA=function(a,y,x,b){return qt.No(this.x,this.y,a,y,x,b,this),this},ot.vA=function(a,y){return qt.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},ot.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},ot.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},ot.transform=function(a){return a.Ga(this),this};function bi(a,y){return y.Cd(a),a}function vo(a,y,x,b,E,te){var ne=E-x,se=te-b,he=ne*ne+se*se;x-=a,b-=y;var ge=-x*ne-b*se;return 0>=ge||ge>=he?(ne=E-a,se=te-y,Math.min(x*x+b*b,ne*ne+se*se)):(a=ne*b-se*x,a*a/he)}function Ar(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function Dr(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)}ot.w=function(){return isFinite(this.x)&&isFinite(this.y)},It.alloc=function(){var a=zr.pop();return a===void 0?new It:a},It.allocAt=function(a,y){var x=zr.pop();return x===void 0?new It(a,y):(x.x=a,x.y=y,x)},It.free=function(a){zr.push(a)},It.prototype.isReal=It.prototype.w,It.prototype.setSpot=It.prototype.yi,It.prototype.setRectSpot=It.prototype.xi,It.prototype.snapToGridPoint=It.prototype.vA,It.prototype.snapToGrid=It.prototype.uA,It.prototype.projectOntoLineSegmentPoint=It.prototype.gA,It.prototype.projectOntoLineSegment=It.prototype.fA,It.intersectingLineSegments=function(a,y,x,b,E,te,ne,se){return qt.Rl(a,y,x,b,E,te,ne,se)},It.prototype.compareWithLineSegmentPoint=It.prototype.Ry,It.compareWithLineSegment=function(a,y,x,b,E,te){return qt.Fl(a,y,x,b,E,te)},It.prototype.direction=It.prototype.direction,It.prototype.directionPoint=It.prototype.ab,It.prototype.normalize=It.prototype.normalize,It.prototype.distanceSquared=It.prototype.zd,It.prototype.distanceSquaredPoint=It.prototype.Bf,It.prototype.scale=It.prototype.scale,It.prototype.rotate=It.prototype.rotate,It.prototype.offset=It.prototype.offset,It.prototype.subtract=It.prototype.re,It.prototype.add=It.prototype.add,It.prototype.equalsApprox=It.prototype.Xa,It.prototype.equalTo=It.prototype.hi,It.prototype.equals=It.prototype.D,It.prototype.set=It.prototype.set,It.prototype.setTo=It.prototype.sg;var zr=[];It.className="Point",It.parse=jr,It.stringify=wi,It.distanceLineSegmentSquared=vo,It.distanceSquared=Ar,It.direction=Dr,It.Origin=Ei=new It(0,0).ja(),It.InfiniteTopLeft=Kr=new It(-1/0,-1/0).ja(),It.InfiniteBottomRight=Nr=new It(1/0,1/0).ja(),It.SixPoint=Wi=new It(6,6).ja(),It.NoPoint=Ur=new It(NaN,NaN).ja(),It.parse=jr,It.stringify=wi,It.distanceLineSegmentSquared=vo,It.distanceSquared=Ar,It.direction=Dr;function Zn(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):Yt("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var to,yo,ta,wo,Zo,ua,Pa;Zn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},Zn.prototype.h=function(a,y){return this.width=a,this.height=y,this},Zn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},Zn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},Zn.prototype.copy=function(){var a=new Zn;return a.width=this.width,a.height=this.height,a},ot=Zn.prototype,ot.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},ot.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},ot.freeze=function(){return this._isFrozen=!0,this},ot.ka=function(){return Object.isFrozen(this)&&Yt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Da(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 Zn(x,E)}return new Zn}function Ss(a){return a.width.toString()+" "+a.height.toString()}ot.toString=function(){return"Size("+this.width+","+this.height+")"},ot.D=function(a){return a instanceof Zn?this.width===a.width&&this.height===a.height:!1},ot.hi=function(a,y){return this.width===a&&this.height===y},ot.Xa=function(a){return qt.B(this.width,a.width)&&qt.B(this.height,a.height)},ot.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},ot.w=function(){return isFinite(this.width)&&isFinite(this.height)},Zn.alloc=function(){var a=es.pop();return a===void 0?new Zn:a},Zn.free=function(a){es.push(a)},Zn.prototype.isReal=Zn.prototype.w,Zn.prototype.inflate=Zn.prototype.Bc,Zn.prototype.equalsApprox=Zn.prototype.Xa,Zn.prototype.equalTo=Zn.prototype.hi,Zn.prototype.equals=Zn.prototype.D,Zn.prototype.set=Zn.prototype.set,Zn.prototype.setTo=Zn.prototype.sg;var es=[];Zn.className="Size",Zn.parse=Da,Zn.stringify=Ss,Zn.ZeroSize=to=new Zn(0,0).ja(),Zn.OneSize=yo=new Zn(1,1).ja(),Zn.SixSize=ta=new Zn(6,6).ja(),Zn.EightSize=wo=new Zn(8,8).ja(),Zn.TenSize=Zo=new Zn(10,10).ja(),Zn.InfiniteSize=ua=new Zn(1/0,1/0).ja(),Zn.NoSize=Pa=new Zn(NaN,NaN).ja(),Zn.parse=Da,Zn.stringify=Ss;function wn(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 It?(x=a.x,a=a.y,y instanceof It?(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 Zn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):Yt("Incorrect second argument supplied to Rect constructor "+y)):Yt("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}ot=wn.prototype,ot.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},ot.h=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function Fa(a,y,x){a.width=y,a.height=x}ot.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this},ot.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},ot.dd=function(a){return this.x=a.x,this.y=a.y,this},ot.tA=function(a){return this.width=a.width,this.height=a.height,this},wn.prototype.copy=function(){var a=new wn;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},ot=wn.prototype,ot.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},ot.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},ot.freeze=function(){return this._isFrozen=!0,this},ot.ka=function(){return Object.isFrozen(this)&&Yt("cannot thaw constant: "+this),this._isFrozen=!1,this};function _s(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 wn(x,E,te,ne)}return new wn}function Il(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}ot.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},ot.D=function(a){return a instanceof wn?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},ot.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},ot.Xa=function(a){return qt.B(this.x,a.x)&&qt.B(this.y,a.y)&&qt.B(this.width,a.width)&&qt.B(this.height,a.height)};function Ji(a,y){return qt.$(a.x,y.x)&&qt.$(a.y,y.y)&&qt.$(a.width,y.width)&&qt.$(a.height,y.height)}ot.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},ot.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},ot.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},ot.offset=function(a,y){return this.x+=a,this.y+=y,this},ot.Bc=function(a,y){return jo(this,y,a,y,a)},ot.Co=function(a){return jo(this,a.top,a.right,a.bottom,a.left)},ot.Fv=function(a){return jo(this,-a.top,-a.right,-a.bottom,-a.left)},ot.Hz=function(a,y,x,b){return jo(this,a,y,x,b)};function jo(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}ot.Ex=function(a){return ga(this,a.x,a.y,a.width,a.height)},ot.Uu=function(a,y,x,b){return ga(this,a,y,x,b)};function ga(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}ot.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},ot.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 Oo(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))}ot.Ye=function(a){return no(this,a.x,a.y,0,0)},ot.ed=function(a){return no(this,a.x,a.y,a.width,a.height)},ot.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),no(this,a,y,x,b)};function no(a,y,x,b,E){var te=Math.min(a.x,y),ne=Math.min(a.y,x);return y=Math.max(a.x+a.width,y+b),x=Math.max(a.y+a.height,x+E),a.x=te,a.y=ne,a.width=y-te,a.height=x-ne,a}ot.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 Mo(a,y,x,b,E,te,ne,se){return ne===void 0&&(ne=0),se===void 0&&(se=0),a<=E&&E+ne<=a+x&&y<=te&&te+se<=y+b}function Wa(a,y,x,b,E,te,ne,se){return a>ne+E||E>x+a?!1:!(y>se+te||te>b+y)}ot.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},ot.Mz=function(){return this.width===0&&this.height===0},wn.alloc=function(){var a=io.pop();return a===void 0?new wn:a},wn.allocAt=function(a,y,x,b){var E=io.pop();return E===void 0?new wn(a,y,x,b):E.h(a,y,x,b)},wn.free=function(a){io.push(a)},Ut.Object.defineProperties(wn.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 It(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new Zn(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new It(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}}}),wn.prototype.isEmpty=wn.prototype.Mz,wn.prototype.isReal=wn.prototype.w,wn.intersectsLineSegment=function(a,y,x,b,E,te,ne,se){return qt.Fx(a,y,x,b,E,te,ne,se)},wn.prototype.setSpot=wn.prototype.yi,wn.prototype.union=wn.prototype.Kv,wn.prototype.unionRect=wn.prototype.ed,wn.prototype.unionPoint=wn.prototype.Ye,wn.prototype.intersects=wn.prototype.Vu,wn.prototype.intersectsRect=wn.prototype.Yc,wn.prototype.intersect=wn.prototype.Uu,wn.prototype.intersectRect=wn.prototype.Ex,wn.prototype.grow=wn.prototype.Hz,wn.prototype.subtractMargin=wn.prototype.Fv,wn.prototype.addMargin=wn.prototype.Co,wn.prototype.inflate=wn.prototype.Bc,wn.prototype.offset=wn.prototype.offset,wn.prototype.contains=wn.prototype.contains,wn.prototype.containsRect=wn.prototype.Re,wn.prototype.containsPoint=wn.prototype.ca,wn.prototype.equalsApprox=wn.prototype.Xa,wn.prototype.equalTo=wn.prototype.hi,wn.prototype.equals=wn.prototype.D,wn.prototype.setSize=wn.prototype.tA,wn.prototype.setPoint=wn.prototype.dd,wn.prototype.set=wn.prototype.set,wn.prototype.setTo=wn.prototype.sg;var ki=null,ao=null,io=[];wn.className="Rect",wn.parse=_s,wn.stringify=Il,wn.contains=Mo,wn.intersects=Wa,wn.ZeroRect=ki=new wn(0,0,0,0).ja(),wn.NoRect=ao=new wn(NaN,NaN,NaN,NaN).ja(),wn.parse=_s,wn.stringify=Il,wn.contains=Mo,wn.intersects=Wa;function kr(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):Yt("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}kr.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},kr.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},kr.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},kr.prototype.copy=function(){var a=new kr;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},ot=kr.prototype,ot.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},ot.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},ot.freeze=function(){return this._isFrozen=!0,this},ot.ka=function(){return Object.isFrozen(this)&&Yt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ba(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 kr;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new kr(x);for(var te=NaN;a[y]==="";)y++;if((b=a[y++])&&(te=parseFloat(b)),isNaN(te))return new kr(x,E);for(var ne=NaN;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),isNaN(ne)?new kr(x,E):new kr(x,E,te,ne)}return new kr}function Ra(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}ot.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},ot.D=function(a){return a instanceof kr?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},ot.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},ot.Xa=function(a){return qt.B(this.top,a.top)&&qt.B(this.right,a.right)&&qt.B(this.bottom,a.bottom)&&qt.B(this.left,a.left)},ot.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},kr.alloc=function(){var a=ql.pop();return a===void 0?new kr:a},kr.free=function(a){ql.push(a)},kr.prototype.isReal=kr.prototype.w,kr.prototype.equalsApprox=kr.prototype.Xa,kr.prototype.equalTo=kr.prototype.hi,kr.prototype.equals=kr.prototype.D,kr.prototype.set=kr.prototype.set,kr.prototype.setTo=kr.prototype.sg;var Cs=null,Dl=null,ql=[];kr.className="Margin",kr.parse=Ba,kr.stringify=Ra,kr.ZeroMargin=Cs=new kr(0,0,0,0).ja(),kr.TwoMargin=Dl=new kr(2,2,2,2).ja(),kr.parse=Ba,kr.stringify=Ra;function yr(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 oa,Ka,Pl,Fl,Bl,Di,mc,tl,nl,As,Eu,Ru,zs,dl,$c,hh,Gc,Hh,Hc,vc,_u,Rl,dh,Uc,yc,ro,Io,Es,Ya,_a,ca,Ca,Va,za,zu,_l;yr.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},yr.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},yr.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},yr.prototype.copy=function(){var a=new yr;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},ot=yr.prototype,ot.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},ot.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},ot.freeze=function(){return this._isFrozen=!0,this},ot.ka=function(){return Object.isFrozen(this)&&Yt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ma(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function wd(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return oa;if(a==="TopLeft")return Ka;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return Pl;if(a==="TopRight")return Fl;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return Bl;if(a==="Center")return Di;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return mc;if(a==="BottomLeft")return tl;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return nl;if(a==="BottomRight")return As;if(a==="TopSide")return Eu;if(a==="LeftSide")return Ru;if(a==="RightSide")return zs;if(a==="BottomSide")return dl;if(a==="TopBottomSides")return $c;if(a==="LeftRightSides")return hh;if(a==="TopLeftSides")return Gc;if(a==="TopRightSides")return Hh;if(a==="BottomLeftSides")return Hc;if(a==="BottomRightSides")return vc;if(a==="NotTopSide")return _u;if(a==="NotLeftSide")return Rl;if(a==="NotRightSide")return dh;if(a==="NotBottomSide")return Uc;if(a==="AllSides")return yc;if(a==="Default")return ro;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 yr(x,E,te,ne)}return new yr}function bd(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}ot.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(oa)?"None":this.D(Ka)?"TopLeft":this.D(Pl)?"Top":this.D(Fl)?"TopRight":this.D(Bl)?"Left":this.D(Di)?"Center":this.D(mc)?"Right":this.D(tl)?"BottomLeft":this.D(nl)?"Bottom":this.D(As)?"BottomRight":this.D(Eu)?"TopSide":this.D(Ru)?"LeftSide":this.D(zs)?"RightSide":this.D(dl)?"BottomSide":this.D($c)?"TopBottomSides":this.D(hh)?"LeftRightSides":this.D(Gc)?"TopLeftSides":this.D(Hh)?"TopRightSides":this.D(Hc)?"BottomLeftSides":this.D(vc)?"BottomRightSides":this.D(_u)?"NotTopSide":this.D(Rl)?"NotLeftSide":this.D(dh)?"NotRightSide":this.D(Uc)?"NotBottomSide":this.D(yc)?"AllSides":this.D(ro)?"Default":"None"},ot.D=function(a){return a instanceof yr?(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},ot.gv=function(){return new yr(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},ot.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(Io))a=Ru;else if(a.D(Es))a=zs;else if(a.D(Ya))a=Eu;else if(a.D(_a))a=dl;else return!1;return a=a.offsetY,(this.offsetY&a)===a},ot.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},ot.Mc=function(){return isNaN(this.x)||isNaN(this.y)},ot.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},ot.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},ot.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},yr.alloc=function(){var a=Wc.pop();return a===void 0?new yr:a},yr.free=function(a){Wc.push(a)},yr.prototype.isDefault=yr.prototype.Xb,yr.prototype.isNone=yr.prototype.ys,yr.prototype.isSide=yr.prototype.$c,yr.prototype.isNoSpot=yr.prototype.Mc,yr.prototype.isSpot=yr.prototype.sb,yr.prototype.includesSide=yr.prototype.Hf,yr.prototype.opposite=yr.prototype.gv,yr.prototype.equals=yr.prototype.D,yr.prototype.set=yr.prototype.set,yr.prototype.setTo=yr.prototype.sg;var Wc=[];yr.className="Spot",yr.parse=wd,yr.stringify=bd,yr.None=oa=Ma(new yr(0,0,0,0),0).ja(),yr.Default=ro=Ma(new yr(0,0,-1,0),-1).ja(),yr.TopLeft=Ka=new yr(0,0,0,0).ja(),yr.TopCenter=Pl=new yr(.5,0,0,0).ja(),yr.TopRight=Fl=new yr(1,0,0,0).ja(),yr.LeftCenter=Bl=new yr(0,.5,0,0).ja(),yr.Center=Di=new yr(.5,.5,0,0).ja(),yr.RightCenter=mc=new yr(1,.5,0,0).ja(),yr.BottomLeft=tl=new yr(0,1,0,0).ja(),yr.BottomCenter=nl=new yr(.5,1,0,0).ja(),yr.BottomRight=As=new yr(1,1,0,0).ja(),yr.MiddleTop=ca=Pl,yr.MiddleLeft=Ca=Bl,yr.MiddleRight=Va=mc,yr.MiddleBottom=za=nl,yr.Top=Ya=Pl,yr.Left=Io=Bl,yr.Right=Es=mc,yr.Bottom=_a=nl,yr.TopSide=Eu=Ma(new yr(0,0,1,1),1).ja(),yr.LeftSide=Ru=Ma(new yr(0,0,1,2),1).ja(),yr.RightSide=zs=Ma(new yr(0,0,1,4),1).ja(),yr.BottomSide=dl=Ma(new yr(0,0,1,8),1).ja(),yr.TopBottomSides=$c=Ma(new yr(0,0,1,9),1).ja(),yr.LeftRightSides=hh=Ma(new yr(0,0,1,6),1).ja(),yr.TopLeftSides=Gc=Ma(new yr(0,0,1,3),1).ja(),yr.TopRightSides=Hh=Ma(new yr(0,0,1,5),1).ja(),yr.BottomLeftSides=Hc=Ma(new yr(0,0,1,10),1).ja(),yr.BottomRightSides=vc=Ma(new yr(0,0,1,12),1).ja(),yr.NotTopSide=_u=Ma(new yr(0,0,1,14),1).ja(),yr.NotLeftSide=Rl=Ma(new yr(0,0,1,13),1).ja(),yr.NotRightSide=dh=Ma(new yr(0,0,1,11),1).ja(),yr.NotBottomSide=Uc=Ma(new yr(0,0,1,7),1).ja(),yr.AllSides=yc=Ma(new yr(0,0,1,15),1).ja(),zu=new yr(.156,.156).ja(),_l=new yr(.844,.844).ja(),yr.parse=wd,yr.stringify=bd;function fi(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}fi.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},fi.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},fi.prototype.copy=function(){var a=new fi;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},fi.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},fi.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},fi.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},fi.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},fi.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},fi.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},fi.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},fi.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},ot=fi.prototype,ot.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},ot.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},ot.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)},ot.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))},ot.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))},ot.pp=function(a){var y=a.x,x=a.y,b=y+a.width,E=x+a.height,te=this.m11,ne=this.m12,se=this.m21,he=this.m22,ge=this.dx,Se=this.dy,Ne=y*te+x*se+ge,Ge=y*ne+x*he+Se,Je=b*te+x*se+ge,nt=b*ne+x*he+Se;return x=y*te+E*se+ge,y=y*ne+E*he+Se,te=b*te+E*se+ge,b=b*ne+E*he+Se,E=Math.min(Ne,Je),Ne=Math.max(Ne,Je),Je=Math.min(Ge,nt),Ge=Math.max(Ge,nt),E=Math.min(E,x),Ne=Math.max(Ne,x),Je=Math.min(Je,y),Ge=Math.max(Ge,y),E=Math.min(E,te),Ne=Math.max(Ne,te),Je=Math.min(Je,b),Ge=Math.max(Ge,b),a.h(E,Je,Ne-E,Ge-Je),a},fi.alloc=function(){var a=fh.pop();return a===void 0?new fi:a},fi.free=function(a){fh.push(a)},fi.prototype.transformRect=fi.prototype.pp,fi.prototype.transformPoint=fi.prototype.Ga,fi.prototype.scale=fi.prototype.scale,fi.prototype.translate=fi.prototype.translate,fi.prototype.rotate=fi.prototype.rotate,fi.prototype.invert=fi.prototype.Vj,fi.prototype.multiplyInverted=fi.prototype.bv,fi.prototype.multiply=fi.prototype.multiply,fi.prototype.reset=fi.prototype.reset,fi.prototype.isIdentity=fi.prototype.ws,fi.prototype.equals=fi.prototype.D,fi.prototype.setTransform=fi.prototype.setTransform,fi.prototype.set=fi.prototype.set;var fh=[];fi.className="Transform",fi.xF="54a702f3e53909c447824c6706603faf4c";var qt={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=qt.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);qt.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 se=a,he=x;else se=x,he=a;if(y<b)var ge=y,Se=b;else ge=b,Se=y;if(a===x)return ge<=ne&&ne<=Se&&a-E<=te&&te<=a+E;if(y===b)return se<=te&&te<=he&&y-E<=ne&&ne<=y+E;if(he+=E,se-=E,se<=te&&te<=he&&(Se+=E,ge-=E,ge<=ne&&ne<=Se))if(he-se>Se-ge)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,se,he,ge,Se,Ne){if(qt.Yb(a,y,ne,se,Ne,x,b)&&qt.Yb(a,y,ne,se,Ne,E,te))return qt.Yb(a,y,ne,se,Ne,ge,Se);var Ge=(a+x)/2,Je=(y+b)/2,nt=(x+E)/2,ct=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(Ge+nt)/2,x=(Je+ct)/2,nt=(nt+E)/2,ct=(ct+te)/2;var Ft=(b+nt)/2,Ot=(x+ct)/2;return qt.cs(a,y,Ge,Je,b,x,Ft,Ot,he,ge,Se,Ne)||qt.cs(Ft,Ot,nt,ct,E,te,ne,se,he,ge,Se,Ne)},ax:function(a,y,x,b,E,te,ne,se,he){var ge=(x+E)/2,Se=(b+te)/2;return he.h((((a+x)/2+ge)/2+(ge+(E+ne)/2)/2)/2,(((y+b)/2+Se)/2+(Se+(te+se)/2)/2)/2),he},My:function(a,y,x,b,E,te,ne,se){var he=(x+E)/2,ge=(b+te)/2;return Dr(((a+x)/2+he)/2,((y+b)/2+ge)/2,(he+(E+ne)/2)/2,(ge+(te+se)/2)/2)},Dl:function(a,y,x,b,E,te,ne,se,he,ge){if(qt.Yb(a,y,ne,se,he,x,b)&&qt.Yb(a,y,ne,se,he,E,te))no(ge,a,y,0,0),no(ge,ne,se,0,0);else{var Se=(a+x)/2,Ne=(y+b)/2,Ge=(x+E)/2,Je=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(Se+Ge)/2,x=(Ne+Je)/2,Ge=(Ge+E)/2,Je=(Je+te)/2;var nt=(b+Ge)/2,ct=(x+Je)/2;qt.Dl(a,y,Se,Ne,b,x,nt,ct,he,ge),qt.Dl(nt,ct,Ge,Je,E,te,ne,se,he,ge)}return ge},Qe:function(a,y,x,b,E,te,ne,se,he,ge){if(qt.Yb(a,y,ne,se,he,x,b)&&qt.Yb(a,y,ne,se,he,E,te))ge.length===0&&(ge.push(a),ge.push(y)),ge.push(ne),ge.push(se);else{var Se=(a+x)/2,Ne=(y+b)/2,Ge=(x+E)/2,Je=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(Se+Ge)/2,x=(Ne+Je)/2,Ge=(Ge+E)/2,Je=(Je+te)/2;var nt=(b+Ge)/2,ct=(x+Je)/2;qt.Qe(a,y,Se,Ne,b,x,nt,ct,he,ge),qt.Qe(nt,ct,Ge,Je,E,te,ne,se,he,ge)}return ge},jv:function(a,y,x,b,E,te,ne,se,he,ge){if(qt.Yb(a,y,E,te,ge,x,b))return qt.Yb(a,y,E,te,ge,se,he);var Se=(a+x)/2,Ne=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var Ge=(Se+x)/2,Je=(Ne+b)/2;return qt.jv(a,y,Se,Ne,Ge,Je,ne,se,he,ge)||qt.jv(Ge,Je,x,b,E,te,ne,se,he,ge)},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,se){if(qt.Yb(a,y,E,te,ne,x,b))no(se,a,y,0,0),no(se,E,te,0,0);else{var he=(a+x)/2,ge=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var Se=(he+x)/2,Ne=(ge+b)/2;qt.iv(a,y,he,ge,Se,Ne,ne,se),qt.iv(Se,Ne,x,b,E,te,ne,se)}return se},ep:function(a,y,x,b,E,te,ne,se){if(qt.Yb(a,y,E,te,ne,x,b))se.length===0&&(se.push(a),se.push(y)),se.push(E),se.push(te);else{var he=(a+x)/2,ge=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var Se=(he+x)/2,Ne=(ge+b)/2;qt.ep(a,y,he,ge,Se,Ne,ne,se),qt.ep(Se,Ne,x,b,E,te,ne,se)}return se},Eo:function(a,y,x,b,E,te,ne,se,he,ge,Se,Ne,Ge,Je){if(qt.Yb(a,y,ne,se,Ge,x,b)&&qt.Yb(a,y,ne,se,Ge,E,te))return!qt.Rl(a,y,ne,se,he,ge,Se,Ne)||(Ge=(a-ne)*(ge-Ne)-(y-se)*(he-Se),Ge===0)?!1:(Je.h(((a*se-y*ne)*(he-Se)-(a-ne)*(he*Ne-ge*Se))/Ge,((a*se-y*ne)*(ge-Ne)-(y-se)*(he*Ne-ge*Se))/Ge),!0);var nt=(a+x)/2,ct=(y+b)/2,Ft=(x+E)/2,Ot=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(nt+Ft)/2,x=(ct+Ot)/2,Ft=(Ft+E)/2,Ot=(Ot+te)/2;var zt=(b+Ft)/2,Ht=(x+Ot)/2,Wt=1/0,Xt=!1,hn=0,er=0;return qt.Eo(a,y,nt,ct,b,x,zt,Ht,he,ge,Se,Ne,Ge,Je)&&(a=(Je.x-he)*(Je.x-he)+(Je.y-ge)*(Je.y-ge),a<Wt&&(Wt=a,Xt=!0,hn=Je.x,er=Je.y)),qt.Eo(zt,Ht,Ft,Ot,E,te,ne,se,he,ge,Se,Ne,Ge,Je)&&(Je.x-he)*(Je.x-he)+(Je.y-ge)*(Je.y-ge)<Wt&&(Xt=!0,hn=Je.x,er=Je.y),Xt&&(Je.x=hn,Je.y=er),Xt},Fo:function(a,y,x,b,E,te,ne,se,he,ge,Se,Ne,Ge){var Je=0;if(qt.Yb(a,y,ne,se,Ge,x,b)&&qt.Yb(a,y,ne,se,Ge,E,te)){if(Ge=(a-ne)*(ge-Ne)-(y-se)*(he-Se),Ge===0)return Je;var nt=((a*se-y*ne)*(he-Se)-(a-ne)*(he*Ne-ge*Se))/Ge,ct=((a*se-y*ne)*(ge-Ne)-(y-se)*(he*Ne-ge*Se))/Ge;if(nt>=Se)return Je;if((he>Se?he-Se:Se-he)<(ge>Ne?ge-Ne:Ne-ge)){if(y<se?(he=y,a=se):(he=se,a=y),ct<he||ct>a)return Je}else if(a<ne?(he=a,a=ne):he=ne,nt<he||nt>a)return Je;0<Ge?Je++:0>Ge&&Je--}else{nt=(a+x)/2,ct=(y+b)/2;var Ft=(x+E)/2,Ot=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(nt+Ft)/2,x=(ct+Ot)/2,Ft=(Ft+E)/2,Ot=(Ot+te)/2;var zt=(b+Ft)/2,Ht=(x+Ot)/2;Je+=qt.Fo(a,y,nt,ct,b,x,zt,Ht,he,ge,Se,Ne,Ge),Je+=qt.Fo(zt,Ht,Ft,Ot,E,te,ne,se,he,ge,Se,Ne,Ge)}return Je},qh:function(a,y,x,b,E,te,ne){return qt.$(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)):qt.$(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,se,he){return qt.B(a,x)&&qt.B(y,b)?(he.h(a,y),!1):qt.$(E,ne)?qt.$(a,x)?(qt.qh(a,y,x,b,E,te,he),!1):qt.qh(a,y,x,b,E,(b-y)/(x-a)*(E-a)+y,he):(se=(se-te)/(ne-E),qt.$(a,x)?(x=se*(a-E)+te,y<b?(E=y,y=b):E=b,x<E?(he.h(a,E),!1):x>y?(he.h(a,y),!1):(he.h(a,x),!0)):(ne=(b-y)/(x-a),qt.$(se,ne)?(qt.qh(a,y,x,b,E,te,he),!1):(E=(ne*a-se*E+te-y)/(ne-se),qt.$(ne,0)?(a<x?(b=a,a=x):b=x,E<b?(he.h(b,y),!1):E>a?(he.h(a,y),!1):(he.h(E,y),!0)):qt.qh(a,y,x,b,E,ne*(E-a)+y,he))))},MA:function(a,y,x,b,E){return qt.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,se,he,ge){function Se(Ft,Ot){var zt=(Ft-a)*(Ft-a)+(Ot-y)*(Ot-y);zt<Ne&&(Ne=zt,he.h(Ft,Ot))}var Ne=1/0;Se(he.x,he.y);var Ge=0,Je=0,nt=0,ct=0;if(E<ne?(Ge=E,Je=ne):(Ge=ne,Je=E),te<se?(nt=E,ct=ne):(nt=ne,ct=E),Ge=(Je-Ge)/2+ge,ge=(ct-nt)/2+ge,E=(E+ne)/2,te=(te+se)/2,Ge===0||ge===0)return he;if(.5>(x>a?x-a:a-x)){if(Ge=1-(x-E)*(x-E)/(Ge*Ge),0>Ge)return he;Ge=Math.sqrt(Ge),b=-ge*Ge+te,Se(x,ge*Ge+te),Se(x,b)}else{if(x=(b-y)/(x-a),b=1/(Ge*Ge)+x*x/(ge*ge),se=2*x*(y-x*a)/(ge*ge)-2*x*te/(ge*ge)-2*E/(Ge*Ge),Ge=se*se-4*b*(2*x*a*te/(ge*ge)-2*y*te/(ge*ge)+te*te/(ge*ge)+E*E/(Ge*Ge)-1+(y-x*a)*(y-x*a)/(ge*ge)),0>Ge)return he;Ge=Math.sqrt(Ge),ge=(-se+Ge)/(2*b),Se(ge,x*ge-x*a+y),Ge=(-se-Ge)/(2*b),Se(Ge,x*Ge-x*a+y)}return he},Ff:function(a,y,x,b,E,te,ne,se,he){var ge=1e21,Se=a,Ne=y;if(qt.Ve(a,y,a,b,E,te,ne,se,he)){var Ge=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te);Ge<ge&&(ge=Ge,Se=he.x,Ne=he.y)}return qt.Ve(x,y,x,b,E,te,ne,se,he)&&(Ge=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te),Ge<ge&&(ge=Ge,Se=he.x,Ne=he.y)),qt.Ve(a,y,x,y,E,te,ne,se,he)&&(y=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te),y<ge&&(ge=y,Se=he.x,Ne=he.y)),qt.Ve(a,b,x,b,E,te,ne,se,he)&&(a=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te),a<ge&&(ge=a,Se=he.x,Ne=he.y)),he.h(Se,Ne),1e21>ge},us:function(a,y,x){return qt.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,se){var he=a+x,ge=y+b;return E===ne?(te<se?(ne=te,te=se):ne=se,a<=E&&E<=he&&ne<=ge&&te>=y):te===se?(E<ne?(se=E,E=ne):se=ne,y<=te&&te<=ge&&se<=he&&E>=a):!!(Mo(a,y,x,b,E,te)||Mo(a,y,x,b,ne,se)||qt.Rl(a,y,he,y,E,te,ne,se)||qt.Rl(he,y,he,ge,E,te,ne,se)||qt.Rl(he,ge,a,ge,E,te,ne,se)||qt.Rl(a,ge,a,y,E,te,ne,se))},Rl:function(a,y,x,b,E,te,ne,se){return a===x&&y===b&&E===ne&&te===se?a===E&&y===te:0>=qt.Fl(a,y,x,b,E,te)*qt.Fl(a,y,x,b,ne,se)&&0>=qt.Fl(E,te,ne,se,a,y)*qt.Fl(E,te,ne,se,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 se=b>E?-1:1;te=[];var he=ne/2,ge=b;if(b=Math.min(2*ne,Math.abs(E-b)),1e-5>b)return he=ge+se*Math.min(b,he),se=a+x*Math.cos(ge),ge=y+x*Math.sin(ge),a+=x*Math.cos(he),y+=x*Math.sin(he),x=(se+a)/2,he=(ge+y)/2,te.push([se,ge,x,he,x,he,a,y]),te;for(;1e-5<b;)E=ge+se*Math.min(b,he),te.push(qt.Vy(x,ge,E,a,y)),b-=Math.abs(E-ge),ge=E;return te},Vy:function(a,y,x,b,E){var te=(x-y)/2,ne=a*Math.cos(te),se=a*Math.sin(te),he=-se,ge=ne*ne+he*he,Se=ge+ne*ne+he*se;return ge=4/3*(Math.sqrt(2*ge*Se)-Se)/(ne*se-he*ne),se=ne-ge*he,ne=he+ge*ne,he=-ne,ge=te+y,te=Math.cos(ge),ge=Math.sin(ge),[b+a*Math.cos(y),E+a*Math.sin(y),b+se*te-ne*ge,E+se*ge+ne*te,b+se*te-he*ge,E+se*ge+he*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 se=x;return x+E-a<E/2&&(se=x+E),a=b,b+te-y<te/2&&(a=b+te),ne.h(se,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,se=0;else ne=0,se=1;var he=ne===0?a:y,ge=ne===0?x:b;return(ne===0?E:te)&&(ge=-ge),ne=se,x=ne===0?x:b,(ne===0?E:te)&&(x=-x),qt.az(he,ne===0?a:y,ge,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,se=-te+ne,he=-te+Math.sqrt(a*a+ne*ne);y=se;for(var ge=0;9999999999>ge&&(y=.5*(se+he),!(y===se||y===he));++ge){var Se=a/(y+E),Ne=ne/(y+te);if(Se=Se*Se+Ne*Ne-1,0<Se)se=y;else if(0>Se)he=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 ar,um:new ar,Mf:new ar,Nf:0,vm:100};qt.za=qt.AA;function Jn(a){gi(this),this.l=2,a===void 0&&(a=Jn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===Jn.o?this.ee=new Ln:(Jn.V===null&&(Jn.V=new Ln().freeze()),this.ee=Jn.V),this.aq=this.ee.Ja,this.Ip=new wn().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=Ka,this.gg=As,this.Rk=this.Sk=NaN,this.Uf=Hn}Jn.prototype.copy=function(){var a=new Jn;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===Jn.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},Jn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},Jn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==Jn.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},Jn.prototype.ka=function(){if(Object.isFrozen(this)&&Yt("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==Jn.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},Jn.prototype.Xa=function(a){if(!(a instanceof Jn))return!1;if(this.type!==a.type)return this.type===Jn.j&&a.type===Jn.o?Pd(this,a):a.type===Jn.j&&this.type===Jn.o?Pd(a,this):!1;if(this.type===Jn.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 qt.B(this.startX,a.startX)&&qt.B(this.startY,a.startY)&&qt.B(this.endX,a.endX)&&qt.B(this.endY,a.endY)};function Pd(a,y){return a.type!==Jn.j||y.type!==Jn.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&qt.B(a.startX,y.startX)&&qt.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===Po&&qt.B(a.endX,y.endX)&&qt.B(a.endY,y.endY))))}Jn.ia=function(a){return a.toString()},Jn.prototype.qb=function(a){a.classType===Jn&&(this.type=a)},Jn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Jn.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 Jn.u:var y=new wn(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 Jn.F:if(y=new wn(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 Jn.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()}},Jn.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},Jn.parse=function(a,y){function x(){return ct>=Wt-1?!0:ge[ct+1].match(Xt)!==null}function b(){return ct++,ge[ct]}function E(ei){var Vr=parseFloat(b()),Xi=parseFloat(b());Ft===Ft.toLowerCase()&&(Vr=Ht.x+Vr,Xi=Ht.y+Xi),ei.h(Vr,Xi)}function te(){return E(Ht),Ht}function ne(){return E(zt),zt}function se(){var ei=Ot.toLowerCase();return ei!=="c"&&ei!=="s"&&ei!=="q"&&ei!=="t"?Ht:new It(2*Ht.x-zt.x,2*Ht.y-zt.y)}y===void 0&&(y=!1);var he=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(he,"$1 $2"),a=a.replace(he,"$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 ge=a.split(" ");for(a=0;a<ge.length;a++){var Se=ge[a];if(Se.match(/(\.[0-9]*)(\.)/gm)!==null){he=pn();for(var Ne="",Ge=!1,Je=0;Je<Se.length;Je++){var nt=Se[Je];nt!=="."||Ge?nt==="."?(he.push(Ne),Ne="."):Ne+=nt:(Ge=!0,Ne+=nt)}for(he.push(Ne),ge.splice(a,1),Se=0;Se<he.length;Se++)ge.splice(a+Se,0,he[Se]);a+=he.length-1,On(he)}}var ct=-1,Ft="",Ot="";he=new It(0,0);var zt=new It(0,0),Ht=new It(0,0),Wt=ge.length;a=N1(null),Ge=Ne=Se=!1,Je=!0,nt=null;for(var Xt=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(ct>=Wt-1);)if(Ot=Ft,Ft=b(),Ft!=="")switch(Ft.toUpperCase()){case"X":Je=!0,Ne=Se=!1;break;case"M":for(nt=te(),a.mc===null||Je===!0?(yp(a,nt.x,nt.y,Se,!Ne,Ge),Je=!1):a.moveTo(nt.x,nt.y),he.assign(Ht);!x();)nt=te(),a.lineTo(nt.x,nt.y);break;case"L":for(;!x();)nt=te(),a.lineTo(nt.x,nt.y);break;case"H":for(;!x();)Ht=new It((Ft===Ft.toLowerCase()?Ht.x:0)+parseFloat(b()),Ht.y),a.lineTo(Ht.x,Ht.y);break;case"V":for(;!x();)Ht=new It(Ht.x,(Ft===Ft.toLowerCase()?Ht.y:0)+parseFloat(b())),a.lineTo(Ht.x,Ht.y);break;case"C":for(;!x();){nt=new It,E(nt);var hn=ne(),er=te();Eh(a,nt.x,nt.y,hn.x,hn.y,er.x,er.y)}break;case"S":for(;!x();)nt=se(),hn=ne(),er=te(),Eh(a,nt.x,nt.y,hn.x,hn.y,er.x,er.y);break;case"Q":for(;!x();)nt=ne(),hn=te(),Gm(a,nt.x,nt.y,hn.x,hn.y);break;case"T":for(;!x();)zt=nt=se(),hn=te(),Gm(a,nt.x,nt.y,hn.x,hn.y);break;case"B":for(;!x();){nt=parseFloat(b()),hn=parseFloat(b()),er=parseFloat(b());var cr=parseFloat(b()),sr=parseFloat(b()),Wn=sr,An=!1;x()||(Wn=parseFloat(b()),x()||(An=parseFloat(b())!==0)),Ft===Ft.toLowerCase()&&(er+=Ht.x,cr+=Ht.y),a.arcTo(nt,hn,er,cr,sr,Wn,An)}break;case"A":for(;!x();)nt=Math.abs(parseFloat(b())),hn=Math.abs(parseFloat(b())),er=parseFloat(b()),sr=cr=!1,An=Wn=0,Wn=b(),Wn.length===1?(cr=!!parseFloat(Wn),sr=!!parseFloat(b()),Wn=parseFloat(b())):Wn.length===2?(cr=!!parseFloat(Wn[0]),sr=!!parseFloat(Wn[1]),Wn=parseFloat(b())):(cr=!!parseFloat(Wn[0]),sr=!!parseFloat(Wn[1]),Wn=parseFloat(Wn.slice(2))),An=parseFloat(b()),Ft===Ft.toLowerCase()&&(Wn=Ht.x+Wn,An=Ht.y+An),Ht.h(Wn,An),Px(a,nt,hn,er,cr,sr,Wn,An);break;case"Z":bx(a),Ht.assign(he);break;case"F":for(nt="",hn=1;ge[ct+hn];)if(ge[ct+hn]==="0")Ge=!0,hn++;else if(ge[ct+hn].match(/[Uu]/)!==null)hn++;else if(ge[ct+hn].match(Xt)===null)hn++;else{nt=ge[ct+hn];break}nt.match(/[Mm]/)?Se=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(nt="",hn=1;ge[ct+hn];)if(ge[ct+hn].match(/[Ff]/)!==null)hn++;else if(ge[ct+hn].match(Xt)===null)hn++;else{nt=ge[ct+hn];break}nt.match(/[Mm]/)?Ne=!0:a.mc.isShadowed=!1}if(he=a.os,Hm=a,y)for(y=he.figures.iterator;y.next();)y.value.isFilled=!0;return he},Jn.Ha=function(a,y){for(var x=a.length,b=It.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}It.free(b)},Jn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===Jn.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},Jn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===Jn.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),af(this,a,!1),no(a,0,0,0,0),a.freeze()},Jn.prototype.ix=function(){var a=new wn;return af(this,a,!0),a};function af(a,y,x){switch(a.type){case Jn.j:case Jn.u:case Jn.F:x?y.h(a.od,a.pd,0,0):no(y,a.od,a.pd,0,0),no(y,a.Dc,a.Ec,0,0);break;case Jn.o:var b=a.figures;a=b.s,b=b.length;for(var E=0;E<b;E++){var te=a[E];x&&E===0?y.h(te.startX,te.startY,0,0):no(y,te.startX,te.startY,0,0);for(var ne=te.segments.s,se=ne.length,he=te.startX,ge=te.startY,Se=0;Se<se;Se++){var Ne=ne[Se];switch(Ne.type){case Po:case ma:he=Ne.endX,ge=Ne.endY,no(y,he,ge,0,0);break;case ss:qt.Dl(he,ge,Ne.point1X,Ne.point1Y,Ne.point2X,Ne.point2Y,Ne.endX,Ne.endY,.5,y),he=Ne.endX,ge=Ne.endY;break;case Cl:qt.iv(he,ge,Ne.point1X,Ne.point1Y,Ne.endX,Ne.endY,.5,y),he=Ne.endX,ge=Ne.endY;break;case ha:case zl:var Ge=Ne.type===ha?rl(Ne,te):$s(Ne,te,he,ge),Je=Ge.length;if(Je===0){he=Ne.type===ha?Ne.centerX:Ne.endX,ge=Ne.type===ha?Ne.centerY:Ne.endY,no(y,he,ge,0,0);break}Ne=null;for(var nt=0;nt<Je;nt++)Ne=Ge[nt],qt.Dl(Ne[0],Ne[1],Ne[2],Ne[3],Ne[4],Ne[5],Ne[6],Ne[7],.5,y);Ne!==null&&(he=Ne[6],ge=Ne[7]);break;default:Yt("Unknown Segment type: "+Ne.type)}}}break;default:Yt("Unknown Geometry type: "+a.type)}}Jn.prototype.normalize=function(){this._isFrozen&&zn(this);var a=this.ix();return this.offset(-a.x,-a.y),new It(-a.x,-a.y)},Jn.prototype.offset=function(a,y){return this._isFrozen&&zn(this),this.transform(1,0,0,1,a,y),this},Jn.prototype.scale=function(a,y){return this._isFrozen&&zn(this),this.transform(a,0,0,y,0,0),this},Jn.prototype.rotate=function(a,y,x){this._isFrozen&&zn(this),y===void 0&&(y=0),x===void 0&&(x=0);var b=fi.alloc();return b.reset(),b.rotate(a,y,x),this.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),fi.free(b),this},ot=Jn.prototype,ot.transform=function(a,y,x,b,E,te){switch(this.type){case Jn.j:case Jn.u:case Jn.F:var ne=this.od,se=this.pd;this.od=ne*a+se*x+E,this.pd=ne*y+se*b+te,ne=this.Dc,se=this.Ec,this.Dc=ne*a+se*x+E,this.Ec=ne*y+se*b+te;break;case Jn.o:for(var he=this.figures.s,ge=he.length,Se=0;Se<ge;Se++){var Ne=he[Se];ne=Ne.startX,se=Ne.startY,Ne.startX=ne*a+se*x+E,Ne.startY=ne*y+se*b+te,Ne=Ne.segments.s;for(var Ge=Ne.length,Je=0;Je<Ge;Je++){var nt=Ne[Je];switch(nt.type){case Po:case ma:ne=nt.endX,se=nt.endY,nt.endX=ne*a+se*x+E,nt.endY=ne*y+se*b+te;break;case ss:ne=nt.point1X,se=nt.point1Y,nt.point1X=ne*a+se*x+E,nt.point1Y=ne*y+se*b+te,ne=nt.point2X,se=nt.point2Y,nt.point2X=ne*a+se*x+E,nt.point2Y=ne*y+se*b+te,ne=nt.endX,se=nt.endY,nt.endX=ne*a+se*x+E,nt.endY=ne*y+se*b+te;break;case Cl:ne=nt.point1X,se=nt.point1Y,nt.point1X=ne*a+se*x+E,nt.point1Y=ne*y+se*b+te,ne=nt.endX,se=nt.endY,nt.endX=ne*a+se*x+E,nt.endY=ne*y+se*b+te;break;case ha:ne=nt.centerX,se=nt.centerY,nt.centerX=ne*a+se*x+E,nt.centerY=ne*y+se*b+te,y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),nt.startAngle+=ne),0>a&&(nt.startAngle=180-nt.startAngle,nt.sweepAngle=-nt.sweepAngle),0>b&&(nt.startAngle=-nt.startAngle,nt.sweepAngle=-nt.sweepAngle),nt.radiusX*=Math.sqrt(a*a+x*x),nt.radiusY!==void 0&&(nt.radiusY*=Math.sqrt(y*y+b*b));break;case zl:if(ne=nt.endX,se=nt.endY,nt.endX=ne*a+se*x+E,nt.endY=ne*y+se*b+te,nt.radiusX===0||nt.radiusY===0)break;y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),nt.xAxisRotation+=ne),0>a&&(nt.xAxisRotation=180-nt.xAxisRotation,nt.isClockwiseArc=!nt.isClockwiseArc),0>b&&(nt.xAxisRotation=-nt.xAxisRotation,nt.isClockwiseArc=!nt.isClockwiseArc),nt.radiusX*=Math.sqrt(a*a+x*x),nt.radiusY*=Math.sqrt(y*y+b*b);break;default:Yt("Unknown Segment type: "+nt.type)}}}}return this._isInvalidBounds=!0,this},ot.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 Jn.j:return qt.Yb(x,b,E,te,y,a.x,a.y);case Jn.u:var ne=wn.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),wn.free(ne),a;case Jn.F:ne=Math.min(x,E)-y;var se=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),se=a.y-(se+y),1>=ne*ne/(x*x)+se*se/(y*y));case Jn.o:return $u(this,a,y,!0,!1);default:return!1}};function $u(a,y,x,b,E){var te=y.x;y=y.y;for(var ne=a.bounds.x-20,se=0,he,ge,Se,Ne,Ge=a.figures.s,Je=Ge.length,nt=0;nt<Je;nt++){var ct=Ge[nt],Ft=!ct.isEvenOdd;if(ct.isFilled){if(b&&ct.ca(te,y,x))return!0;var Ot=ct.segments;he=ct.startX,ge=ct.startY;for(var zt=he,Ht=ge,Wt=Ot.s,Xt=0;Xt<=Ot.length;Xt++){var hn=void 0;if(Xt!==Ot.length){hn=Wt[Xt];var er=hn.type;a=hn.endX,Ne=hn.endY}else er=Po,a=zt,Ne=Ht;switch(er){case ma:if(zt=Gu(te,y,ne,y,he,ge,zt,Ht),isNaN(zt))return!0;se+=zt,zt=a,Ht=Ne;break;case Po:if(he=Gu(te,y,ne,y,he,ge,a,Ne),isNaN(he))return!0;se+=he;break;case ss:Se=qt.Fo(he,ge,hn.point1X,hn.point1Y,hn.point2X,hn.point2Y,a,Ne,ne,y,te,y,.5),se+=Se;break;case Cl:Se=qt.Fo(he,ge,(he+2*hn.point1X)/3,(ge+2*hn.point1Y)/3,(2*hn.point1X+a)/3,(2*hn.point1Y+Ne)/3,a,Ne,ne,y,te,y,.5),se+=Se;break;case ha:case zl:er=hn.type===ha?rl(hn,ct):$s(hn,ct,he,ge);var cr=er.length;if(cr===0){if(he=Gu(te,y,ne,y,he,ge,hn.type===ha?hn.centerX:hn.endX,hn.type===ha?hn.centerY:hn.endY),isNaN(he))return!0;se+=he;break}hn=null;for(var sr=0;sr<cr;sr++){if(hn=er[sr],sr===0){if(Se=Gu(te,y,ne,y,he,ge,hn[0],hn[1]),isNaN(Se))return!0;se+=Se}Se=qt.Fo(hn[0],hn[1],hn[2],hn[3],hn[4],hn[5],hn[6],hn[7],ne,y,te,y,.5),se+=Se}hn!==null&&(a=hn[6],Ne=hn[7]);break;default:Yt("Unknown Segment type: "+hn.type)}he=a,ge=Ne}if(Ft){if(se!==0)return!0}else if(se%2!==0)return!0;se=0}else if(ct.ca(te,y,E?x:x+2))return!0}return!1}function Gu(a,y,x,b,E,te,ne,se){if(qt.Yb(E,te,ne,se,.05,a,y))return NaN;var he=(a-x)*(te-se);if(he===0)return 0;var ge=((a*b-y*x)*(E-ne)-(a-x)*(E*se-te*ne))/he;if(y=(a*b-y*x)*(te-se)/he,ge>=a)return 0;if((E>ne?E-ne:ne-E)<(te>se?te-se:se-te)){if(te<se){if(y<te||y>se)return 0}else if(y<se||y>te)return 0}else if(E<ne){if(ge<E||ge>ne)return 0}else if(ge<ne||ge>E)return 0;return 0<he?1:-1}function ic(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}ot.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new It),this.type===Jn.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,se=0;se<E;se++){var he=b[se],ge=he.length;for(a=0;a<ge;a++){var Se=he[a];if(ne+Se>=te)return b=te-ne,b=Se===0?0:b/Se,x=x[se],se=x[2*a],E=x[2*a+1],y.h(se+(x[2*a+2]-se)*b,E+(x[2*a+3]-E)*b),y;ne+=Se}}return y},ot.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===Jn.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 se=x[ne],he=se.length;for(a=0;a<he;a++){var ge=se[a];if(te+ge>=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+=ge}}return NaN},ot.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===Jn.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,se=0;se<E;se++){var he=b[se],ge=he.length;for(a=0;a<ge;a++){var Se=he[a];if(ne+Se>=te)return b=te-ne,b=Se===0?0:b/Se,Se=x[se],x=Se[2*a],se=Se[2*a+1],E=Se[2*a+2],a=Se[2*a+3],y[0]=x+(E-x)*b,y[1]=se+(a-se)*b,y[2]=1>Math.abs(E-x)&&1>Math.abs(a-se)?0:1>Math.abs(E-x)?0<=a-se?90:270:1>Math.abs(a-se)?0<=E-x?0:180:180*Math.atan2(a-se,E-x)/Math.PI,y;ne+=Se}}return y},ot.xx=function(a){if(this.type===Jn.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 se=It.alloc();return qt.qh(y,x,b,E,te,a,se),a=se.x,te=se.y,It.free(se),Math.sqrt(((a-y)*(a-y)+(te-x)*(te-x))/ne)}}else if(this.type===Jn.u){ne=this.startX,se=this.startY;var he=this.endX;if(E=this.endY,ne!==he||se!==E){y=he-ne,x=E-se,te=2*y+2*x,b=a.x,a=a.y,b=Math.min(Math.max(b,ne),he),a=Math.min(Math.max(a,se),E),ne=Math.abs(b-ne),he=Math.abs(b-he),se=Math.abs(a-se),E=Math.abs(a-E);var ge=Math.min(ne,he,se,E);if(ge===se)return b/te;if(ge===he)return(y+a)/te;if(ge===E)return(2*y+x-b)/te;if(ge===ne)return(2*y+2*x-a)/te}}else{y=this.flattenedSegments,x=this.flattenedLengths,te=this.flattenedTotalLength,b=It.alloc(),E=1/0,se=ne=0,he=y.length;for(var Se=ge=0,Ne=0;Ne<he;Ne++)for(var Ge=y[Ne],Je=x[Ne],nt=Ge.length,ct=0;ct<nt;ct+=2){var Ft=Ge[ct],Ot=Ge[ct+1];if(ct!==0){qt.qh(ge,Se,Ft,Ot,a.x,a.y,b);var zt=(b.x-a.x)*(b.x-a.x)+(b.y-a.y)*(b.y-a.y);zt<E&&(E=zt,ne=se,ne+=Math.sqrt((b.x-ge)*(b.x-ge)+(b.y-Se)*(b.y-Se))),se+=Je[(ct-2)/2]}ge=Ft,Se=Ot}return It.free(b),a=ne/te,0>a?0:1<a?1:a}return 0};function Cd(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],b=[],E=[];if(a.type===Jn.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===Jn.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===Jn.F){var te=new $a;te.startX=a.endX,te.startY=(a.startY+a.endY)/2;var ne=new Gi(ha);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=rl(ne,te),E=a.length,E===0)b.push(ne.centerX),b.push(ne.centerY);else{ne=te.startX,te=te.startY;for(var se=0;se<E;se++){var he=a[se];qt.Qe(ne,te,he[2],he[3],he[4],he[5],he[6],he[7],.5,b),ne=he[6],te=he[7]}}y.push(b),x.push(ph(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,se=ne,he=te;for(var ge=E.segments.s,Se=ge.length,Ne=0;Ne<Se;Ne++){var Ge=ge[Ne];switch(Ge.type){case ma:4<=b.length&&(y.push(b),x.push(ph(b))),b=[],b.push(Ge.endX),b.push(Ge.endY),ne=Ge.endX,te=Ge.endY,se=ne,he=te;break;case Po:b.push(Ge.endX),b.push(Ge.endY),ne=Ge.endX,te=Ge.endY;break;case ss:qt.Qe(ne,te,Ge.point1X,Ge.point1Y,Ge.point2X,Ge.point2Y,Ge.endX,Ge.endY,.5,b),ne=Ge.endX,te=Ge.endY;break;case Cl:qt.ep(ne,te,Ge.point1X,Ge.point1Y,Ge.endX,Ge.endY,.5,b),ne=Ge.endX,te=Ge.endY;break;case ha:var Je=rl(Ge,E),nt=Je.length;if(nt===0){b.push(Ge.centerX),b.push(Ge.centerY),ne=Ge.centerX,te=Ge.centerY;break}for(var ct=0;ct<nt;ct++){var Ft=Je[ct];qt.Qe(ne,te,Ft[2],Ft[3],Ft[4],Ft[5],Ft[6],Ft[7],.5,b),ne=Ft[6],te=Ft[7]}break;case zl:if(Je=$s(Ge,E,ne,te),nt=Je.length,ct=Ge.endX,Ft=Ge.endY,nt===0){b.push(ct),b.push(Ft),ne=ct,te=Ft;break}for(ct=0;ct<nt;ct++)Ft=Je[ct],qt.Qe(ne,te,Ft[2],Ft[3],Ft[4],Ft[5],Ft[6],Ft[7],.5,b),ne=Ft[6],te=Ft[7];break;default:Yt("Segment not of valid type: "+Ge.type)}Ge.isClosed&&(b.push(se),b.push(he))}4<=b.length&&(y.push(b),x.push(ph(b)))}}}function ph(a){for(var y=[],x=0,b=0,E=a.length,te=0;te<E;te+=2){var ne=a[te],se=a[te+1];te!==0&&y.push(Math.sqrt(Ar(x,b,ne,se))),x=ne,b=se}return y}ot.add=function(a){return this.ee.add(a),this},ot.pm=function(a,y,x,b,E,te,ne,se){return this._isFrozen&&zn(this),this.fg=new yr(a,y,E,te).freeze(),this.gg=new yr(x,b,ne,se).freeze(),this},Ut.Object.defineProperties(Jn.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 Cd(this),this.tk}},flattenedLengths:{get:function(){return Cd(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===Jn.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===Jn.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&&zn(this,a),this.na=a,a===Jn.o?this.ee=new Ln:(Jn.V===null&&(Jn.V=new Ln().freeze()),this.ee=Jn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&zn(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&zn(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&zn(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&zn(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&zn(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&zn(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&zn(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&zn(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),Jn.prototype.setSpots=Jn.prototype.pm,Jn.prototype.add=Jn.prototype.add,Jn.prototype.getFractionForPoint=Jn.prototype.xx,Jn.prototype.getPointAndAngleAlongPath=Jn.prototype.Qu,Jn.prototype.getAngleAlongPath=Jn.prototype.wx,Jn.prototype.getPointAlongPath=Jn.prototype.Pu,Jn.prototype.containsPoint=Jn.prototype.ca,Jn.prototype.transform=Jn.prototype.transform,Jn.prototype.rotate=Jn.prototype.rotate,Jn.prototype.scale=Jn.prototype.scale,Jn.prototype.offset=Jn.prototype.offset,Jn.prototype.normalize=Jn.prototype.normalize,Jn.prototype.computeBoundsWithoutOrigin=Jn.prototype.ix,Jn.prototype.equalsApprox=Jn.prototype.Xa,Jn.className="Geometry",Jn.j=new tn(Jn,"Line",0),Jn.u=new tn(Jn,"Rectangle",1),Jn.F=new tn(Jn,"Ellipse",2),Jn.o=new tn(Jn,"Path",3),Jn.V=null,Jn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",Jn.className="Geometry",Jn.stringify=Jn.ia,Jn.fillPath=Jn.nb,Jn.parse=Jn.parse,Jn.Line=Jn.j,Jn.Rectangle=Jn.u,Jn.Ellipse=Jn.F,Jn.Path=Jn.o;function $a(a,y,x,b,E){gi(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 Ln,this.sr=this.pl.Ja,this.fw=null}$a.prototype.copy=function(){var a=new $a;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},ot=$a.prototype,ot.Xa=function(a){if(!(a instanceof $a&&qt.B(this.startX,a.startX)&&qt.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},ot.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},ot.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},ot.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},ot.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},ot.add=function(a){return this.pl.add(a),this},ot.ca=function(a,y,x){for(var b=this.startX,E=this.startY,te=b,ne=E,se=this.segments.s,he=se.length,ge=0;ge<he;ge++){var Se=se[ge];switch(Se.type){case ma:te=Se.endX,ne=Se.endY,b=Se.endX,E=Se.endY;break;case Po:if(qt.Yb(b,E,Se.endX,Se.endY,x,a,y))return!0;b=Se.endX,E=Se.endY;break;case ss:if(qt.cs(b,E,Se.point1X,Se.point1Y,Se.point2X,Se.point2Y,Se.endX,Se.endY,.5,a,y,x))return!0;b=Se.endX,E=Se.endY;break;case Cl:if(qt.jv(b,E,Se.point1X,Se.point1Y,Se.endX,Se.endY,.5,a,y,x))return!0;b=Se.endX,E=Se.endY;break;case ha:case zl:var Ne=Se.type===ha?rl(Se,this):$s(Se,this,b,E),Ge=Ne.length,Je=Se.type===ha?Se.centerX:Se.endX,nt=Se.type===ha?Se.centerY:Se.endY;if(Ge===0){if(qt.Yb(b,E,Je,nt,x,a,y))return!0;b=Je,E=nt;break}for(Je=null,nt=0;nt<Ge;nt++)if(Je=Ne[nt],nt===0&&qt.Yb(b,E,Je[0],Je[1],x,a,y)||qt.cs(Je[0],Je[1],Je[2],Je[3],Je[4],Je[5],Je[6],Je[7],.5,a,y,x))return!0;Je!==null&&(b=Je[6],E=Je[7]);break;default:Yt("Unknown Segment type: "+Se.type)}if(Se.isClosed&&(b!==te||E!==ne)&&qt.Yb(b,E,te,ne,x,a,y))return!0}return!1},Ut.Object.defineProperties($a.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&&zn(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&zn(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&zn(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&zn(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&zn(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&zn(this,a),this.pl=a,this._isInvalidBounds=!0}}}),$a.prototype.add=$a.prototype.add,$a.prototype.equalsApprox=$a.prototype.Xa,$a.className="PathFigure";function Gi(a,y,x,b,E,te,ne,se){gi(this),a===void 0&&(a=Po),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===zl?(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),se&&(this.isClockwiseArc=!0)):(this.Ne=b,this.Vh=E,a===ha&&(te=Math.max(te,0)),this.Wh=te,typeof ne=="number"?(a===ha&&(ne=Math.max(ne,0)),this.Pg=ne):this.Pg=0),this.ae=null}Gi.prototype.copy=function(){var a=new Gi;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},ot=Gi.prototype,ot.Xa=function(a){if(!(a instanceof Gi)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case ma:case Po:return qt.B(this.endX,a.endX)&&qt.B(this.endY,a.endY);case ss:return qt.B(this.endX,a.endX)&&qt.B(this.endY,a.endY)&&qt.B(this.point1X,a.point1X)&&qt.B(this.point1Y,a.point1Y)&&qt.B(this.point2X,a.point2X)&&qt.B(this.point2Y,a.point2Y);case Cl:return qt.B(this.endX,a.endX)&&qt.B(this.endY,a.endY)&&qt.B(this.point1X,a.point1X)&&qt.B(this.point1Y,a.point1Y);case ha:return qt.B(this.startAngle,a.startAngle)&&qt.B(this.sweepAngle,a.sweepAngle)&&qt.B(this.centerX,a.centerX)&&qt.B(this.centerY,a.centerY)&&qt.B(this.radiusX,a.radiusX)&&qt.B(this.radiusY,a.radiusY);case zl:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&qt.B(this.xAxisRotation,a.xAxisRotation)&&qt.B(this.endX,a.endX)&&qt.B(this.endY,a.endY)&&qt.B(this.radiusX,a.radiusX)&&qt.B(this.radiusY,a.radiusY);default:return!1}},ot.qb=function(a){a.classType===Gi&&(this.type=a)},ot.toString=function(a){switch(a===void 0&&(a=-1),this.type){case ma:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Po:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case ss: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 Cl: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 ha: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 zl: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":"")},ot.freeze=function(){return this._isFrozen=!0,this},ot.ka=function(){return this._isFrozen=!1,this},ot.close=function(){return this.isClosed=!0,this};function rl(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=qt.jx(0,0,x<b?x:b,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==b){var ne=fi.alloc();ne.reset(),x<b?ne.scale(1,b/x):ne.scale(x/b,1),Jn.Ha(te,ne),fi.free(ne)}for(x=te.length,b=0;b<x;b++)ne=te[b],ne[0]+=y,ne[1]+=E,ne[2]+=y,ne[3]+=E,ne[4]+=y,ne[5]+=E,ne[6]+=y,ne[7]+=E;return a.ae=te,a.ae}function $s(a,y,x,b){function E(ct,Ft,Ot,zt){return(ct*zt<Ft*Ot?-1:1)*Math.acos((ct*Ot+Ft*zt)/(Math.sqrt(ct*ct+Ft*Ft)*Math.sqrt(Ot*Ot+zt*zt)))}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,se=a.isLargeArc,he=a.isClockwiseArc,ge=a.Dc,Se=a.Ec,Ne=Math.cos(ne),Ge=Math.sin(ne),Je=Ne*(x-ge)/2+Ge*(b-Se)/2;ne=-Ge*(x-ge)/2+Ne*(b-Se)/2;var nt=Je*Je/(y*y)+ne*ne/(te*te);return 1<nt&&(y*=Math.sqrt(nt),te*=Math.sqrt(nt)),nt=(se===he?-1:1)*Math.sqrt((y*y*te*te-y*y*ne*ne-te*te*Je*Je)/(y*y*ne*ne+te*te*Je*Je)),isNaN(nt)&&(nt=0),se=nt*y*ne/te,nt=nt*-te*Je/y,isNaN(se)&&(se=0),isNaN(nt)&&(nt=0),x=(x+ge)/2+Ne*se-Ge*nt,b=(b+Se)/2+Ge*se+Ne*nt,Se=E(1,0,(Je-se)/y,(ne-nt)/te),Ne=(Je-se)/y,ge=(ne-nt)/te,Je=(-Je-se)/y,se=(-ne-nt)/te,ne=E(Ne,ge,Je,se),Je=(Ne*Je+ge*se)/(Math.sqrt(Ne*Ne+ge*ge)*Math.sqrt(Je*Je+se*se)),-1>=Je?ne=Math.PI:1<=Je&&(ne=0),!he&&0<ne&&(ne-=2*Math.PI),he&&0>ne&&(ne+=2*Math.PI),he=y>te?1:y/te,Je=y>te?te/y:1,y=qt.jx(0,0,y>te?y:te,Se,Se+ne,!0),te=fi.alloc(),te.reset(),te.translate(x,b),te.rotate(a.Ne,0,0),te.scale(he,Je),Jn.Ha(y,te),fi.free(te),a.ae=y,a.ae}Ut.Object.defineProperties(Gi.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&&zn(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&zn(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&zn(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&zn(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&zn(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&zn(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&zn(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&zn(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&zn(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Qn(a,">= zero",Gi,"radiusX"),this._isFrozen&&zn(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Qn(a,">= zero",Gi,"radiusY"),this._isFrozen&&zn(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&zn(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&&zn(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&&zn(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&&zn(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&&zn(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),Gi.prototype.equalsApprox=Gi.prototype.Xa;var ma=new tn(Gi,"Move",0),Po=new tn(Gi,"Line",1),ss=new tn(Gi,"Bezier",2),Cl=new tn(Gi,"QuadraticBezier",3),ha=new tn(Gi,"Arc",4),zl=new tn(Gi,"SvgArc",4);Gi.className="PathSegment",Gi.Move=ma,Gi.Line=Po,Gi.Bezier=ss,Gi.QuadraticBezier=Cl,Gi.Arc=ha,Gi.SvgArc=zl;function ws(){this.H=null,this.xu=new It(0,0).freeze(),this.mt=new It(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}ws.prototype.copy=function(){var a=new ws;return this.clone(a)},ws.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},ws.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},ws.prototype.So=function(a,y){var x=this.diagram;return x===null||Ad(x,a,y),y},ws.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(Ad(x,a,y),y.assign(x.Ps(y))),y},Ut.Object.defineProperties(ws.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}}}),ws.prototype.getMultiTouchDocumentPoint=ws.prototype.Bz,ws.prototype.getMultiTouchViewPoint=ws.prototype.So,ws.className="InputEvent";function Kc(){this.H=null,this.xa="",this.ar=this.Lr=null}Kc.prototype.copy=function(){var a=new Kc;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},Kc.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},Ut.Object.defineProperties(Kc.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}}}),Kc.className="DiagramEvent";function _o(){this.Fm=zo,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}_o.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},_o.prototype.copy=function(){var a=new _o;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=rn(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=rn(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=rn(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=rn(y)&&typeof y.J=="function"?y.J():y,a},_o.prototype.qb=function(a){a.classType===_o&&(this.change=a)},_o.prototype.toString=function(){var a="";return a=this.change===il?a+"* ":this.change===zo?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===il?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=$n(this.object)),this.oldValue!==null&&(a+=" old: "+$n(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+$n(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},_o.prototype.I=function(a){return a?this.oldValue:this.newValue},_o.prototype.Dz=function(a){return a?this.oldParam:this.newParam},_o.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},_o.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},_o.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},_o.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},Ut.Object.defineProperties(_o.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===il&&(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}}}),_o.prototype.redo=_o.prototype.redo,_o.prototype.canRedo=_o.prototype.canRedo,_o.prototype.undo=_o.prototype.undo,_o.prototype.canUndo=_o.prototype.canUndo,_o.prototype.getParam=_o.prototype.Dz,_o.prototype.getValue=_o.prototype.I,_o.prototype.clear=_o.prototype.clear;var il=new tn(_o,"Transaction",-1),zo=new tn(_o,"Property",0),sa=new tn(_o,"Insert",1),La=new tn(_o,"Remove",2);_o.className="ChangedEvent",_o.Transaction=il,_o.Property=zo,_o.Insert=sa,_o.Remove=La;function Za(){this.o=new Ln().freeze(),this.xa="",this.j=!1}Za.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},Za.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()},Za.prototype.canUndo=function(){return this.isComplete},Za.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()}},Za.prototype.canRedo=function(){return this.isComplete},Za.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()}},Za.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new ur,x=0;x<a.count;x++){var b=a.M(x);if(b!==null&&b.change===zo&&b.object){var E=y.get(b.object);E||(E=new ur,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()}},Ut.Object.defineProperties(Za.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}}}),Za.prototype.optimize=Za.prototype.ak,Za.prototype.redo=Za.prototype.redo,Za.prototype.canRedo=Za.prototype.canRedo,Za.prototype.undo=Za.prototype.undo,Za.prototype.canUndo=Za.prototype.canUndo,Za.prototype.clear=Za.prototype.clear,Za.className="Transaction";function Uo(){this.Pt=new Nn,this.Jd=!1,this.u=new Ln().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new Ln().freeze(),this.hl=new Ln,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}Uo.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},Uo.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},Uo.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},ot=Uo.prototype,ot.Xw=function(a){this.Pt.add(a)},ot.Rx=function(a){this.Pt.remove(a)},ot.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},ot.eb=function(a){return a===void 0&&(a=""),Vc(this,!0,a)},ot.Kf=function(){return Vc(this,!1,"")};function Vc(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&or("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}ot.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()}},Uo.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},Uo.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){or("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},Uo.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},Uo.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){or("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},Uo.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var b=new _o;for(b.change=il,b.propertyName=a,b.object=x,b.oldValue=y,a=this.models;a.next();)y=a.value,b.model=y,y.ds(b)},Uo.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new Za);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||or("Change not within a transaction: "+x.toString()))}},Uo.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},Ut.Object.defineProperties(Uo.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}}}),Uo.prototype.handleChanged=Uo.prototype.Tu,Uo.prototype.redo=Uo.prototype.redo,Uo.prototype.undo=Uo.prototype.undo,Uo.prototype.canUndo=Uo.prototype.canUndo,Uo.prototype.discardHistoryAfterIndex=Uo.prototype.lx,Uo.prototype.rollbackTransaction=Uo.prototype.Kf,Uo.prototype.commitTransaction=Uo.prototype.eb,Uo.prototype.startTransaction=Uo.prototype.Ea,Uo.prototype.removeModel=Uo.prototype.Rx,Uo.prototype.addModel=Uo.prototype.Xw,Uo.prototype.clear=Uo.prototype.clear,Uo.className="UndoManager";function zi(){gi(this),this.H=Vu,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new ws,this.Zr=-1}zi.prototype.toString=function(){return this.name!==""?this.name+" Tool":Dn(this.constructor)},zi.prototype.updateAdornments=function(){},zi.prototype.canStart=function(){return this.isEnabled},zi.prototype.doStart=function(){},zi.prototype.doActivate=function(){this.isActive=!0},zi.prototype.doDeactivate=function(){this.isActive=!1},zi.prototype.doStop=function(){},zi.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},zi.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},zi.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},zi.prototype.doMouseMove=function(){},zi.prototype.doMouseUp=function(){this.stopTool()},zi.prototype.doMouseWheel=function(){},zi.prototype.canStartMultiTouch=function(){return!0},zi.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,It.allocAt(NaN,NaN)),b=y.So(1,It.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}It.free(x),It.free(b)},zi.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,It.allocAt(NaN,NaN)),b=y.So(1,It.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 It((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 se=a.zoomPoint;a.zoomPoint=E,ne.resetZoom(te),a.zoomPoint=se}y.bubbles=!1}It.free(x),It.free(b)},zi.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},zi.prototype.doKeyUp=function(){},zi.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},zi.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},zi.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(qr?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||(qr?y.meta:y.control)||y.shift||a.clearSelection()}},zi.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,Hf(a,b,x),b.handled};function Hf(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)}}}zi.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 se=te.mouseLeave;if(se!==null&&(b===te||b!==null&&b.rg(te)||(se(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}},zi.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},zi.prototype.doCurrentObjectChanged=function(){},zi.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===Wh&&!y.shift||E===Uh&&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===Wh&&y.shift||E===Uh&&!y.control){b=a.position.copy();var te=y.event;E=te.deltaMode;var ne=te.deltaX;te=te.deltaY;var se="pixel";if(ne===0&&te===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(se,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(se,0<x?"left":"right",Math.abs(x)));else{switch(E){case 0:se="pixel";break;case 1:se="line";break;case 2:se="page"}ne!==0&&a.allowHorizontalScroll&&(ne*=a.scrollHorizontalLineChange/16,a.scroll(se,0<ne?"right":"left",Math.abs(ne))),te!==0&&a.allowVerticalScroll&&(te*=a.scrollVerticalLineChange/16,a.scroll(se,0<te?"down":"up",Math.abs(te)))}this.doWheelChange(a,b,y)}}},zi.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},zi.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,b=y.clone(this.yy);this.Zr=ir(function(){x.doWaitAfter(b)},a)},zi.prototype.cancelWaitAfter=function(){this.Zr!==-1&&Gt.clearTimeout(this.Zr),this.Zr=-1},zi.prototype.doWaitAfter=function(){},zi.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof Ui);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},zi.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},Ut.Object.defineProperties(zi.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof cn&&(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}}}),zi.prototype.startTransaction=zi.prototype.Ea,zi.className="Tool";function Do(){zi.call(this),this.name="ToolManager",this.hb=new Ln,this.ob=new Ln,this.Hb=new Ln,this.F=this.V=850,this.o=new Zn(2,2).ja(),this.Ha=5e3,this.ia=Uh,this.u=Ed,this.Mp=this.j=null,this.zj=-1}un(Do,zi),Do.prototype.initializeStandardTools=function(){},Do.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof Ui&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},Do.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===Sc&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===Zc){y.bubbles=!0;return}if(this.gestureBehavior===Sc)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===Uh?this.mouseWheelBehavior=Wh:this.mouseWheelBehavior===Wh&&(this.mouseWheelBehavior=Uh)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},Do.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===Zc){y.bubbles=!0;return}if(this.gestureBehavior===Sc)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}}Uf(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function Uf(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}Do.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof Ui&&(y===a||y.rg(a))||this.hideToolTip()},Do.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()))},Do.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)},Do.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 Ui)||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()},Do.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof Ui){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 mi&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(Gt.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var E=this;this.zj=ir(function(){E.hideToolTip()},a)}},Do.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}},Do.prototype.hideToolTip=function(){this.zj!==-1&&(Gt.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof Ui?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof mi&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},Do.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()},Do.prototype.doMouseWheel=function(){this.standardMouseWheel()},Do.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},Do.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},Do.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},Do.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},Do.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)},Ut.Object.defineProperties(Do.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 Ui?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}}}),Do.prototype.replaceStandardTool=Do.prototype.gb;var Uh=new tn(Do,"WheelScroll",0),Wh=new tn(Do,"WheelZoom",1),Wf=new tn(Do,"WheelNone",2),Ed=new tn(Do,"GestureZoom",3),Sc=new tn(Do,"GestureCancel",4),Zc=new tn(Do,"GestureNone",5);Do.className="ToolManager",Do.WheelScroll=Uh,Do.WheelZoom=Wh,Do.WheelNone=Wf,Do.GestureZoom=Ed,Do.GestureCancel=Sc,Do.GestureNone=Zc;function Wo(){zi.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 It(NaN,NaN),this.Fr=new It,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new Nn().freeze(),this.ia=new de,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var Hu;un(Wo,zi),Wo.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},Wo.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},Wo.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,(qr?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},Wo.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),sn=null,this.isActive=!0,this.tl.set(a.position),sf(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&&Ms(a),Jf(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,sn=this,Sn=this.diagram,this.doSimulatedDragOut()))};function sf(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof Vn?(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 gr,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}Wo.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},Wo.prototype.Pd=function(a){return a===void 0?new Qc(Ei):this.isGridSnapEnabled?new Qc(new It(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new Qc(a.copy())},Wo.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),Xc(this),Xh(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<Hu.count){for(var y=Hu,x=y.length,b=0;b<x;b++){var E=y.M(b);xc(E),pu(E),Xc(E),E.diagram.ug()}y.clear()}xc(this),this.tl.h(NaN,NaN),Sn!==null&&(Sn.currentCursor=""),sn=Sn=null,pu(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),Kh(a,!0)},Wo.prototype.stopTransaction=function(){var a=this.diagram,y=zi.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function Xc(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,lf(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function Kf(){var a=sn;pu(a),wc(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}Wo.prototype.doCancel=function(){pu(this),wc(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},Wo.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},Wo.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function Uu(a,y){if(a.copiedParts===null){var x=a.diagram;if((!y||!x.isReadOnly&&!x.isModelReadOnly)&&a.draggedParts!==null){var b=x.undoManager;for(b.isEnabled&&b.isInTransaction?b.currentTransaction!==null&&0<b.currentTransaction.changes.count&&(x.undoManager.Kf(),x.Ea("Drag")):wc(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 ur,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 Vn&&b.canCopy()&&x.add(b,a.Pd());a.copiedParts=x,sf(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Lh(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function pu(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 Vn&&(x.value.point=new It(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function xc(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 Tu(a,y,x){var b=a.diagram,E=a.startPoint,te=It.alloc();te.assign(b.lastInput.documentPoint),a.moveParts(y,te.re(E),x),It.free(te),b.Gf("temporaryPixelRatio")===!0&&b.Yh===null&&30<b.$w&&(Ms(b),b.hk())}Wo.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var b=this.diagram;b!==null&&ac(b,a,y,this.dragOptions,x)};function wc(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 Vn&&b.suspendsRouting){var E=x.value.point;a.draggedParts.add(b,a.Pd()),Lh(b,-E.x,-E.y)}y.bd()}}function Td(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),fl(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=lf(a,E,b),!a.isActive&&sn===null)return;var se=b!==null?b.part:null;if(se===null||x.handlesDragDropForTopLevelParts&&se.isTopLevel&&!(se instanceof ni)){var he=x.mouseDragOver;he!==null&&(he(E),ne=!0)}if(!a.isActive&&sn===null||(a.doDragOver(y,b),!a.isActive&&sn===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)}Wo.prototype.findDragOverObject=function(a){var y=this;return Lu(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof Ui||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},Wo.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 lf(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 se=a.Cg[ne],he=se.mouseDragLeave;if(he!==null&&(he(y,se,x),b=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&sn===null||x===null)return b;for(y.handled=!1,E=x;E!==null;)a.Cg.push(E),E=uf(E);for(E=a.Cg.length,x=0;x<E&&(ne=a.Cg[x],se=ne.mouseDragEnter,se===null||(se(y,ne,te),b=!0,!y.handled));x++);return b}function uf(a){var y=a.panel;return y!==null?y:a instanceof Mr&&!(a instanceof ni)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function Vf(a,y,x){var b=a.Oe;if(b===null)return null;var E=a.diagram.og(y,b.portGravity,function(ge){return b.findValidLinkablePort(ge,x)});a=It.alloc();var te=1/0,ne=null;for(E=E.iterator;E.next();){var se=E.value;if(se.part!==null){var he=se.ga(Di,a);he=y.Bf(he),he<te&&(ne=se,te=he)}}return It.free(a),ne}function fl(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=Vf(a,x.i(0),!1),te!==null&&(ne=te.part));var se=null,he=null;x.toNode===null&&(se=Vf(a,x.i(x.pointsCount-1),!0),se!==null&&(he=se.part)),E.isValidLink(ne,te,he,se)?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=he,se!==null&&(x.toPortId=se.portId),x.fromPort!==b.Mx&&b.R("LinkRelinked",x,b.Mx),x.toPort!==b.Nx&&b.R("LinkRelinked",x,b.Nx)):ti(E,ne,te,he,se):ti(E,null,null,null,null)}}}}Wo.prototype.doDragOver=function(){};function bc(a,y){var x=a.diagram;a.dragsLink&&fl(a,!0),Xc(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;Wp(a,E,te),te=uf(te)}}else te=x.mouseDrop,te!==null&&te(E);if(a.isActive||sn!==null){for(E=(a.copiedParts||a.draggedParts).iterator;E.next();)te=E.key,te instanceof nr&&te.linksConnected.each(function(se){se.suspendsRouting=!1});if(a.doDropOnto(y,b),a.isActive||sn!==null){for(a=wn.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof nr&&Rt(x,b,a);wn.free(a)}}}function Wp(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof ni||(x=a.mouseDrop,x!==null&&x(y))}function Rt(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 Vn},!0,function(E){return E instanceof Vn},b),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}Wo.prototype.doDropOnto=function(){},Wo.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,y=a.lastInput;this.simulatedMouseMove(y.event,y.documentPoint,y.targetDiagram)||this.currentPart===null||this.draggedParts===null||(this.mayCopy()?(Uu(this,!1),Jf(a,this.copiedParts),Tu(this,this.copiedParts,!1),Xh(a,this.copiedParts)):this.mayMove()?(pu(this),Tu(this,this.draggedParts,!0)):this.mayDragOut()?(Uu(this,!1),Tu(this,this.copiedParts,!1)):pu(this),Td(this,a.lastInput.documentPoint))}},Wo.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?(pu(this),Uu(this,!0),Jf(a,this.copiedParts),Tu(this,this.copiedParts,!1),Xh(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,pu(this),this.mayMove()&&(Tu(this,this.draggedParts,!0),Td(this,a.lastInput.documentPoint))),this.Ym=!0,bc(this,a.lastInput.documentPoint),this.isActive){var b=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&$t(this),a.Ya(),Xh(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",b)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},Wo.prototype.simulatedMouseMove=function(a,y,x){if(sn===null)return!1;var b=sn.diagram;x instanceof cn||(x=null);var E=Sn;return x!==E&&(E!==null&&E!==b&&(E.ug(),sn.isDragOutStarted=!1,E=E.toolManager.findTool("Dragging"),E!==null&&E.doSimulatedDragLeave()),Sn=x,x!==null&&x!==b&&(Kf(),E=x.toolManager.findTool("Dragging"),E!==null&&(Hu.contains(E)||Hu.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)},Wo.prototype.simulatedMouseUp=function(a,y,x){if(sn===null)return!1;var b=Sn,E=sn.diagram;if(x===null)return sn.doCancel(),!0;if(x!==b){var te=b.toolManager.findTool("Dragging");if(b!==null&&b!==E&&te!==null)return b.ug(),sn.isDragOutStarted=!1,te.doSimulatedDragLeave(),!1;Sn=x,b=x.toolManager.findTool("Dragging"),b!==null&&(Kf(),Hu.contains(b)||Hu.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 It),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=sn,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function $t(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof nr&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}Wo.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(qr?!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())},Wo.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())},Wo.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())},Wo.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},Wo.prototype.Az=function(){return sn},Wo.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=sn;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},Wo.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),ol(a),a.animationManager.Cc(),a=sn,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},Wo.prototype.doSimulatedDragLeave=function(){var a=sn;a!==null&&a.doSimulatedDragOut(),this.doCancel()},Wo.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=sn;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;nn(this,y.draggedParts.Lf(),!1,a.firstInput),Tu(this,this.copiedParts,!1),Td(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},Wo.prototype.doSimulatedDrop=function(){var a=this.diagram,y=sn;if(y!==null){var x=y.diagram;if(y.Ym=!0,pu(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),nn(this,y.draggedParts.Lf(),!0,a.lastInput),Tu(this,this.copiedParts,!1);var b=new Nn;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0,b.add(E)})),bc(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 nn(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=wn.alloc();E=b=1/0;for(var ne=-1/0,se=-1/0,he=y.iterator;he.next();){var ge=he.value;if(ge.isVisible()){var Se=ge.location;ge=Se.x,Se=Se.y,isNaN(ge)||isNaN(Se)||(ge<b&&(b=ge),Se<E&&(E=Se),ge>ne&&(ne=ge),Se>se&&(se=Se))}}for(b===1/0?te.h(0,0,0,0):te.h(b,E,ne-b,se-E),b=te.x+te.width/2,E=te.y+te.height/2,wn.free(te),te=a.Fr,ne=new ur,se=It.alloc(),he=y.iterator;he.next();)ge=he.value,ge instanceof Vn&&ge.canCopy()&&(Se=x.I(ge),Se!==null&&(Se.points=ge.points,Lh(Se,te.x-b,te.y-E),Se.suspendsRouting=!0,ne.add(Se,a.Pd())));for(y=y.iterator;y.next();)ge=y.value,ge.Zc()&&ge.canCopy()&&(he=x.I(ge),he!==null&&(ge=ge.location,se.h(te.x-(b-ge.x),te.y-(E-ge.y)),he.location=se,he.Va(),ne.add(he,a.Pd(se))));It.free(se),a.copiedParts=ne,sf(a,ne.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Lh(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}Wo.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},Wo.prototype.computeMove=function(a,y,x,b){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,b):new It},Ut.Object.defineProperties(Wo.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}}}),Wo.prototype.getDraggingSource=Wo.prototype.Az;var sn=null,Sn=null;Wo.className="DraggingTool",Hu=new Ln,Tn("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Do.prototype.doCancel=function(){sn!==null&&sn.doCancel(),zi.prototype.doCancel.call(this)};function fn(){zi.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new Vn,y=new ci;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new ci,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new nr,y=new ci,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=yo,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new nr,y=new ci,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=yo,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 ur,this.Of=this.gj=this.Pf=null}un(fn,zi),fn.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},fn.prototype.copyPortProperties=function(a,y,x,b,E){if(a!==null&&y!==null&&x!==null&&b!==null){var te=y.Df(),ne=Zn.alloc();ne.width=y.naturalBounds.width*te,ne.height=y.naturalBounds.height*te,b.desiredSize=ne,Zn.free(ne),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=Di,te=It.alloc(),x.location=y.ga(Di,te),It.free(te),b.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,b,E)}},fn.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=yo,y.fromSpot=oa,y.toSpot=oa),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},fn.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},fn.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof nr){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)}},fn.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof nr))return null;for(;a!==null;){var b=y?a.toLinkable:a.fromLinkable;if(b===!0&&(a.portId!==null||a instanceof nr)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(b===!1)break;a=a.panel}return null},fn.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(Ne){return E.findValidLinkablePort(Ne,a)},null,!0);for(b=1/0,y=null,te=te.iterator;te.next();){var ne=te.value,se=ne.part;if(se instanceof nr){var he=ne.ga(Di,It.alloc()),ge=x.x-he.x,Se=x.y-he.y;It.free(he),he=ge*ge+Se*Se,he<b&&(ge=this.validPortsCache.I(ne),ge!==null?ge&&(y=ne,b=he):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,se,ne)||!a&&this.isValidLink(se,ne,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(ne,!0),y=ne,b=he):this.validPortsCache.add(ne,!1))}}return y!==null&&(x=y.part,x instanceof nr&&(x.layer===null||x.layer.allowLink))?y:null},fn.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},fn.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},fn.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},fn.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof nr))return!1;a=a.portId,a===null&&(a="");var b=y.part;if(!(b instanceof nr))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},fn.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)},fn.prototype.isLabelDependentOnLink=function(a,y){if(a===null)return!1;var x=a.labeledLink;if(x===null)return!1;if(x===y)return!0;var b=new Nn;return b.add(a),Rn(this,x,y,b)};function Rn(a,y,x,b){if(y===x)return!0;var E=y.fromNode;return E!==null&&E.isLinkLabel&&(b.add(E),Rn(a,E.labeledLink,x,b))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(b.add(y),Rn(a,y.labeledLink,x,b))))}fn.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!==mf){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!_n(this,a,y,x,!0)}if(b===ag){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!_n(this,a,y,x,!0)}if(b===ng)return a===y?a=!0:(b=new Nn,b.add(y),a=In(this,b,a,y,x)),!a;if(b===rg)return!_n(this,a,y,x,!1);if(b===ig)return a===y?a=!0:(b=new Nn,b.add(y),a=qn(this,b,a,y,x)),!a}return!0};function _n(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&&_n(a,ne,x,b,E)))return!0}return!1}function In(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&&In(a,y,ne,b,E)))return!0}return!1}function qn(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 se=ne.fromNode;if(ne=ne.toNode,se=se===x?ne:se,se!==x&&qn(a,y,se,b,E))return!0}}return!1}Ut.Object.defineProperties(fn.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}}}),fn.className="LinkingBaseTool";function rr(){fn.call(this),this.name="Linking",this.V={},this.F=null,this.K=tr,this.Xd=null}un(rr,fn),rr.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},rr.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 nr)))return null;var x=this.direction;if(x===tr||x===Or){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===tr||x===Pr)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},rr.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 nr&&(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 nr&&(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)},rr.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()},rr.prototype.doStop=function(){fn.prototype.doStop.call(this),this.startObject=null},rr.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 se=ne.part;se instanceof nr&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),b=se,E=ne):(y=se,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)}}},rr.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof Vn)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)},rr.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},rr.prototype.doNoLink=function(){},Ut.Object.defineProperties(rr.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 tr=new tn(rr,"Either",0),Or=new tn(rr,"ForwardsOnly",0),Pr=new tn(rr,"BackwardsOnly",0);rr.className="LinkingTool",rr.Either=tr,rr.ForwardsOnly=Or,rr.BackwardsOnly=Pr;function gr(){fn.call(this),this.name="Relinking";var a=new ci;a.figure="Diamond",a.desiredSize=wo,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new ci,a.figure="Diamond",a.desiredSize=wo,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new wn}un(gr,fn),gr.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Vn){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)}},gr.prototype.makeAdornment=function(a,y){var x=new Ui;return x.type=Un.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},gr.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},gr.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 Ui&&x.adornedPart instanceof Vn))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=to),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=to),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},gr.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===wp||x===kh)&&(x=Vs),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}},gr.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()},gr.prototype.doStop=function(){fn.prototype.doStop.call(this),this.handle=null},gr.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 nr&&(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()}}},gr.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},gr.prototype.doNoRelink=function(){};function ti(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)}Ut.Object.defineProperties(gr.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 Ui))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),gr.className="RelinkingTool",Tn("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),Tn("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function xr(){zi.call(this),this.name="LinkReshaping";var a=new ci;a.figure="Rectangle",a.desiredSize=ta,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new ci,a.figure="Diamond",a.desiredSize=wo,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new It,this.Yq=new Ln}un(xr,zi),xr.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:Zr},xr.prototype.om=function(a,y){a.reshapingBehavior=y},xr.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Vn){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)}},xr.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,b=y.isOrthogonal,E=null;if(y.points!==null&&1<x){E=new Ui,E.type=Un.Link,x=y.firstPickIndex;var te=y.lastPickIndex,ne=b?1:0;if(y.resegmentable&&y.computeCurve()!==Yl)for(var se=x+ne;se<te-ne;se++){var he=this.makeResegmentHandle(a,se);he!==null&&(he.segmentIndex=se,he.segmentFraction=.5,he.fromMaxLinks=999,E.add(he))}for(ne=x+1;ne<te;ne++)if(se=this.makeHandle(a,ne),se!==null){if(se.segmentIndex=ne,ne!==x)if(ne===x+1&&b){he=y.i(x);var ge=y.i(x+1);qt.B(he.x,ge.x)&&qt.B(he.y,ge.y)&&(ge=y.i(x-1)),qt.B(he.x,ge.x)?(this.om(se,Ni),se.cursor="n-resize"):qt.B(he.y,ge.y)&&(this.om(se,ui),se.cursor="w-resize")}else ne===te-1&&b?(he=y.i(te-1),ge=y.i(te),qt.B(he.x,ge.x)&&qt.B(he.y,ge.y)&&(he=y.i(te+1)),qt.B(he.x,ge.x)?(this.om(se,Ni),se.cursor="n-resize"):qt.B(he.y,ge.y)&&(this.om(se,ui),se.cursor="w-resize")):ne!==te&&(this.om(se,Hi),se.cursor="move");E.add(se)}E.adornedObject=a}return E},xr.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},xr.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},xr.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},xr.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 Vn){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}}},xr.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},xr.prototype.stopTransaction=function(){var a=this.diagram,y=zi.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},xr.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},xr.prototype.getResegmentingPoint=function(){return this.handle.ga(Di)},xr.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},xr.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&&(Jr(this,ne,b,E,te,!0)||Jr(this,ne,b,E,te,!1))){var se=y.points.copy();Jr(this,ne,b,E,te,!0)?(se.cd(x-2,new It(ne.x,(te.y+ne.y)/2)),se.cd(x+1,new It(te.x,(te.y+ne.y)/2))):(se.cd(x-2,new It((te.x+ne.x)/2,ne.y)),se.cd(x+1,new It((te.x+ne.x)/2,te.y))),se.mb(x),se.mb(x-1),y.points=se,y.Wb()}else ne=y.i(x+2),Math.abs(E.x-te.x)<this.resegmentingDistance&&Math.abs(E.y-te.y)<this.resegmentingDistance&&(Jr(this,b,E,te,ne,!0)||Jr(this,b,E,te,ne,!1))&&(se=y.points.copy(),Jr(this,b,E,te,ne,!0)?(se.cd(x-1,new It(b.x,(b.y+ne.y)/2)),se.cd(x+2,new It(ne.x,(b.y+ne.y)/2))):(se.cd(x-1,new It((b.x+ne.x)/2,b.y)),se.cd(x+2,new It((b.x+ne.x)/2,ne.y))),se.mb(x+1),se.mb(x),y.points=se,y.Wb())}}else ne=It.alloc(),qt.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()),It.free(ne)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function Jr(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}xr.prototype.reshape=function(a){var y=this.adornedLink;y.uh();var x=this.handle.segmentIndex,b=this.Ru(this.handle);if(y.isOrthogonal)if(x===y.firstPickIndex+1)x=y.firstPickIndex+1,b===Ni?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):b===ui&&(y.L(x,a.x,y.i(x-1).y),y.L(x+1,a.x,y.i(x+2).y));else if(x===y.lastPickIndex-1)x=y.lastPickIndex-1,b===Ni?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):b===ui&&(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);qt.B(te.x,E.x)&&qt.B(E.y,ne.y)?(qt.B(te.x,y.i(b-2).x)&&!qt.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),qt.B(ne.y,y.i(b+2).y)&&!qt.B(ne.x,y.i(b+2).x)?y.m(b+1,ne.x,a.y):y.L(b+1,ne.x,a.y)):qt.B(te.y,E.y)&&qt.B(E.x,ne.x)?(qt.B(te.y,y.i(b-2).y)&&!qt.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),qt.B(ne.x,y.i(b+2).x)&&!qt.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):qt.B(te.x,E.x)&&qt.B(E.x,ne.x)?(qt.B(te.x,y.i(b-2).x)&&!qt.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),qt.B(ne.x,y.i(b+2).x)&&!qt.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):qt.B(te.y,E.y)&&qt.B(E.y,ne.y)&&(qt.B(te.y,y.i(b-2).y)&&!qt.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),qt.B(ne.y,y.i(b+2).y)&&!qt.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(Di,It.alloc()),b=y.getLinkPointFromPoint(b,E,te,a,!0,It.alloc()),y.L(0,b.x,b.y),It.free(te),It.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(Di,It.alloc()),a=y.getLinkPointFromPoint(b,E,x,a,!1,It.alloc()),y.L(y.pointsCount-1,a.x,a.y),It.free(x),It.free(a));y.zf()},xr.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case Hi:return a;case Ni:return new It(y.i(x).x,a.y);case ui:return new It(a.x,y.i(x).y);default:case Zr:return y.i(x)}},Ut.Object.defineProperties(xr.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 Ui))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}}}),xr.prototype.setReshapingBehavior=xr.prototype.om,xr.prototype.getReshapingBehavior=xr.prototype.Ru;var Zr=new tn(xr,"None",0),ui=new tn(xr,"Horizontal",1),Ni=new tn(xr,"Vertical",2),Hi=new tn(xr,"All",3);xr.className="LinkReshapingTool",xr.None=Zr,xr.Horizontal=ui,xr.Vertical=Ni,xr.All=Hi,Tn("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function ri(){zi.call(this),this.name="Resizing",this.o=new Zn(1,1).freeze(),this.j=new Zn(9999,9999).freeze(),this.yg=new Zn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new ci;a.alignmentFocus=Di,a.figure="Rectangle",a.desiredSize=ta,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new It,this.Dw=new Zn,this.Tn=new It,this.rt=new Zn(0,0),this.qt=new Zn(1/0,1/0),this.pt=new Zn(1,1)}un(ri,zi),ri.prototype.updateAdornments=function(a){if(!(a===null||a instanceof Vn)){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(),td(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},ri.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new Ui,y.type=Un.Spot,y.locationSpot=Di;var x=new Ks;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,Ka)),y.add(this.makeHandle(a,Fl)),y.add(this.makeHandle(a,As)),y.add(this.makeHandle(a,tl)),y.add(this.makeHandle(a,ca)),y.add(this.makeHandle(a,Va)),y.add(this.makeHandle(a,za)),y.add(this.makeHandle(a,Ca))}else if(Su(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},ri.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},ri.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=Di),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 Un)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},ri.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},ri.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))},ri.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},ri.prototype.stopTransaction=function(){var a=this.diagram,y=zi.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},ri.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},ri.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,It.alloc()),te=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,te),this.resize(y),a.bd(),It.free(E)}},ri.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,It.alloc()),te=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,te),this.resize(y),It.free(E),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},ri.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 ni){var b=new Ln;if(b.add(a),!this.dragsMembers&&a.placeholder===null){var E=new de;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()}},ri.prototype.computeResize=function(a,y,x,b,E,te){y.Mc()&&(y=Di);var ne=this.adornedObject.naturalBounds,se=ne.x,he=ne.y,ge=ne.x+ne.width,Se=ne.y+ne.height,Ne=1;if(!te){Ne=ne.width;var Ge=ne.height;0>=Ne&&(Ne=1),0>=Ge&&(Ge=1),Ne=Ge/Ne}return Ge=It.alloc(),qt.No(a.x,a.y,se,he,E.width,E.height,Ge),a=ne.copy(),0>=y.x?0>=y.y?(a.x=Math.max(Ge.x,ge-b.width),a.x=Math.min(a.x,ge-x.width),a.width=Math.max(ge-a.x,x.width),a.y=Math.max(Ge.y,Se-b.height),a.y=Math.min(a.y,Se-x.height),a.height=Math.max(Se-a.y,x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Ne*a.width,b.height),x.height),a.width=a.height/Ne):(a.width=Math.max(Math.min(a.height/Ne,b.width),x.width),a.height=Ne*a.width),a.x=ge-a.width,a.y=Se-a.height)):1<=y.y?(a.x=Math.max(Ge.x,ge-b.width),a.x=Math.min(a.x,ge-x.width),a.width=Math.max(ge-a.x,x.width),a.height=Math.max(Math.min(Ge.y-he,b.height),x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Ne*a.width,b.height),x.height),a.width=a.height/Ne):(a.width=Math.max(Math.min(a.height/Ne,b.width),x.width),a.height=Ne*a.width),a.x=ge-a.width)):(a.x=Math.max(Ge.x,ge-b.width),a.x=Math.min(a.x,ge-x.width),a.width=ge-a.x,te||(a.height=Math.max(Math.min(Ne*a.width,b.height),x.height),a.width=a.height/Ne,a.y=he+.5*(Se-he-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(Ge.x-se,b.width),x.width),a.y=Math.max(Ge.y,Se-b.height),a.y=Math.min(a.y,Se-x.height),a.height=Math.max(Se-a.y,x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Ne*a.width,b.height),x.height),a.width=a.height/Ne):(a.width=Math.max(Math.min(a.height/Ne,b.width),x.width),a.height=Ne*a.width),a.y=Se-a.height)):1<=y.y?(a.width=Math.max(Math.min(Ge.x-se,b.width),x.width),a.height=Math.max(Math.min(Ge.y-he,b.height),x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Ne*a.width,b.height),x.height),a.width=a.height/Ne):(a.width=Math.max(Math.min(a.height/Ne,b.width),x.width),a.height=Ne*a.width))):(a.width=Math.max(Math.min(Ge.x-se,b.width),x.width),te||(a.height=Math.max(Math.min(Ne*a.width,b.height),x.height),a.width=a.height/Ne,a.y=he+.5*(Se-he-a.height))):0>=y.y?(a.y=Math.max(Ge.y,Se-b.height),a.y=Math.min(a.y,Se-x.height),a.height=Se-a.y,te||(a.width=Math.max(Math.min(a.height/Ne,b.width),x.width),a.height=Ne*a.width,a.x=se+.5*(ge-se-a.width))):1<=y.y&&(a.height=Math.max(Math.min(Ge.y-he,b.height),x.height),te||(a.width=Math.max(Math.min(a.height/Ne,b.width),x.width),a.height=Ne*a.width,a.x=se+.5*(ge-se-a.width))),It.free(Ge),a},ri.prototype.computeReshape=function(){var a=Bn;return this.adornedObject instanceof ci&&(a=Ev(this.adornedObject)),!(a===fr||this.diagram.lastInput.shift)},ri.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},ri.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},ri.prototype.computeCellSize=function(){var a=new Zn(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},Ut.Object.defineProperties(ri.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 Ui))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 Ui)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}}}),ri.className="ResizingTool",Tn("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Oi(){zi.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new It,this.ue=null;var a=new ci;a.figure="Ellipse",a.desiredSize=wo,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new It(NaN,NaN),this.u=0,this.F=50}un(Oi,zi),Oi.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)}},Oi.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new Ui,y.type=Un.Position,y.locationSpot=Di;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(Su(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Oi.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},Oi.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)},Oi.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(Di)},Oi.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)},Oi.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new It(NaN,NaN),this.isActive=a.isMouseCaptured=!1},Oi.prototype.stopTransaction=function(){var a=this.diagram,y=zi.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Oi.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Oi.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},Oi.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()},Oi.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()}},Oi.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},Ut.Object.defineProperties(Oi.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 Ui))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 Ui)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}}}),Oi.className="RotatingTool",Tn("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function uo(){zi.call(this),this.name="ClickSelecting"}un(uo,zi),uo.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},uo.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},uo.className="ClickSelectingTool";function si(){zi.call(this),this.name="Action",this.pk=null}un(si,zi),si.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},si.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()},si.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))}},si.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()},si.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())},si.prototype.doStop=function(){this.pk=null},si.className="ActionTool";function Pi(){zi.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new It(0,0)}un(Pi,zi),Pi.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)},Pi.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},Pi.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 Mr)x.Zc()&&(Su(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);rn(E)&&(y.model.xf(E),b=y.Lc(E))}if(b!==null){var te=It.allocAt(a.x,a.y);this.isGridSnapEnabled&&Yf(this.diagram,b,a,te),b.location=te,y.allowSelect&&(y.clearSelection(!0),b.isSelected=!0),It.free(te)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",b)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return b},Ut.Object.defineProperties(Pi.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}}}),Pi.className="ClickCreatingTool";function ai(){zi.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new Mr;a.layerName="Tool",a.selectable=!1;var y=new ci;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}un(ai,zi),ai.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))},ai.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},ai.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},ai.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=Zn.alloc().h(y.width,y.height);x.desiredSize=b,this.box.mm(y.x,y.y,!1),Zn.free(b),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},ai.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()},ai.prototype.computeBoxBounds=function(){var a=this.diagram;return new wn(a.firstInput.documentPoint,a.lastInput.documentPoint)},ai.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),qr?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 Ln,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)}},Ut.Object.defineProperties(ai.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}}}),ai.className="DragSelectingTool";function $r(){zi.call(this),this.name="Panning",this.Xt=new It,this.xy=new It,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(Gt.document,"scroll",a.Kw,!1),a.stopTool()}}un($r,zi),$r.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())},$r.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(Gt.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},$r.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},$r.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},$r.prototype.doMouseMove=function(){this.move()},$r.prototype.doMouseUp=function(){this.move(),this.stopTool()},$r.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)}},Ut.Object.defineProperties($r.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),$r.className="PanningTool",Tn("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),Tn("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),Tn("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),Tn("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),Tn("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function mi(){this.F=this.u=this.j=this.o=null}Ut.Object.defineProperties(mi.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}}}),mi.className="HTMLInfo";function Fi(a,y,x){this.text=a,this.hx=y,this.visible=x}Fi.className="ContextMenuButtonInfo";function Yi(){zi.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new It,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}un(Yi,zi);function Qi(a){var y=new mi;y.show=function(E,te,ne){ne.showDefaultContextMenu()},y.hide=function(E,te){te.hideDefaultContextMenu()},No=y,a.tu=function(){a.stopTool()},y=Pn("div");var x=Pn("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=Pn("style");Gt.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",ii,!1),b.addEventListener(y,"selectstart",ii,!1),b.addEventListener(x,"contextmenu",ii,!1)),y.className="goCXforeground",x.className="goCXbackground",Gt.document.body&&(Gt.document.body.appendChild(y),Gt.document.body.appendChild(x)),mo=y,Ea=x,ka=!0}function ii(a){return a.preventDefault(),!1}Yi.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)},Yi.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},Yi.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},Yi.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,b=null;if(a instanceof cn||(a instanceof Jt?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},Yi.prototype.doActivate=function(){},Yi.prototype.doMouseDown=function(){if(zi.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof Ui){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&ho(this)},Yi.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof Ui){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}ho(this)};function ho(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var b=null;x instanceof mi||(b=y.ic(y.lastInput.documentPoint,null,null),b!==null&&b.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(b)}}else a.canStart()&&(So(a,!0),a.isActive||a.stopTool())}Yi.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function So(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=No,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var b=x.contextMenu;b!==null?(a.currentObject=x instanceof Jt?x:null,a.showContextMenu(b,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof Ui&&!a.currentContextMenu.visible&&a.stopTool()}}Yi.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},Yi.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof Ui){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 mi&&a.show(y,x,this);this.currentContextMenu=a},Yi.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}},Yi.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof Ui?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof mi&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function Yo(a){var y=new Ln;return y.add(new Fi("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new Fi("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new Fi("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new Fi("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new Fi("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new Fi("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new Fi("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new Fi("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new Fi("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new Fi("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new Fi("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new Fi("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new Fi("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}Yi.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=Yo(this)),mo.innerHTML="",Ea.addEventListener("pointerdown",this.tu,!1);var y=this,x=Pn("ul");x.className="goCXul",mo.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=Pn("li"),te.className="goCXli";var ne=Pn("a");ne.className="goCXa",ne.href="#",ne.ky=E.hx,ne.addEventListener("pointerdown",function(se){return this.ky(a),y.stopTool(),se.preventDefault(),!1},!1),ne.textContent=E.text,te.appendChild(ne),x.appendChild(te)}}mo.style.display="block",Ea.style.display="block"},Yi.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===No){mo.style.display="none",Ea.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(Ea,"pointerdown",this.tu,!1),this.currentContextMenu=null}},Ut.Object.defineProperties(Yi.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof Ui?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return ka===!1&&No===null&&na&&Qi(this),No},set:function(a){a===null&&(ka=!0),No=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var No=null,ka=!1,Ea=null,mo=null;Yi.className="ContextMenuTool",Tn("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function $i(){zi.call(this),this.name="TextEditing",this.Zh=new Co,this.ia=null,this.V=Ai,this.vj=null,this.qa=ji,this.u=1,this.F=!0,this.o=null,this.j=new mi,this.kt=null,Ho(this,this.j)}un($i,zi);function Ho(a,y){if(na){var x=Pn("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(Zi)):E==="Tab"?(a.acceptText(qi),b.preventDefault()):E==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==ji){var b=a.kt;a.qa===co&&(a.qa=Fo),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==ji){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 Co&&te instanceof $i)if(te.state===bs)x.style.border="3px solid red",x.focus();else{var ne=b.ga(Di),se=E.position,he=E.scale,ge=b.Df()*he;ge<te.minimumEditorScale&&(ge=te.minimumEditorScale);var Se=b.naturalBounds.width*ge+6,Ne=b.naturalBounds.height*ge+2,Ge=(ne.x-se.x)*he;ne=(ne.y-se.y)*he,se=b.verticalAlignment,he=(b.lineHeight+b.spacingAbove+b.spacingBelow)*b.lineCount*ge,Ne=se.y*Ne-se.y*he+se.offsetY-(.5*Ne-.5*he)-he/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*ge+"%",x.style.lineHeight="normal",x.style.width=Se+"px",x.style.left=(Ge-Se/2|0)-1+"px",x.style.top=(ne+Ne|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=ge,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)}}}$i.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||Gs&&Gs!==this&&(Gs.acceptText(is),Gs&&Gs!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Co&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===Ai&&!y.isSelected||this.starting===Ko&&2>a.lastInput.clickCount)):!1},$i.prototype.doStart=function(){Gs=this,this.textBlock!==null&&this.doActivate()},$i.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 Co&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=co;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var b=new wn(this.textBlock.ga(Ka),this.textBlock.ga(As));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},$i.prototype.doCancel=function(){this.stopTool()},$i.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},$i.prototype.doMouseDown=function(){this.isActive&&this.acceptText(is)},$i.prototype.acceptText=function(a){switch(a){case is:this.qa===ls?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===co||this.qa===bs||this.qa===Fo)&&(this.qa=Bo,Oa(this));break;case va:case Zi:case qi:(Zi!==a||this.textBlock.isMultiline!==!0)&&(this.qa===co||this.qa===bs||this.qa===Fo)&&(this.qa=Bo,Oa(this))}};function Oa(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=ls,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=bs,a.doError(E,te))}}$i.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)},$i.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},$i.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=ji,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},$i.prototype.doStop=function(){Gs=null},$i.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)))},$i.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},Ut.Object.defineProperties($i.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)}}}),$i.prototype.measureTemporaryTextBlock=$i.prototype.Lx;var va=new tn($i,"LostFocus",0),is=new tn($i,"MouseDown",1),qi=new tn($i,"Tab",2),Zi=new tn($i,"Enter",3),eo=new tn($i,"SingleClick",0),Ai=new tn($i,"SingleClickSelected",1),Ko=new tn($i,"DoubleClick",2),ji=new tn($i,"StateNone",0),co=new tn($i,"StateActive",1),Fo=new tn($i,"StateEditing",2),Bo=new tn($i,"StateValidating",3),bs=new tn($i,"StateInvalid",4),ls=new tn($i,"StateValidated",5),Gs=null;$i.className="TextEditingTool",$i.LostFocus=va,$i.MouseDown=is,$i.Tab=qi,$i.Enter=Zi,$i.SingleClick=eo,$i.SingleClickSelected=Ai,$i.DoubleClick=Ko,$i.StateNone=ji,$i.StateActive=co,$i.StateEditing=Fo,$i.StateValidating=Bo,$i.StateInvalid=bs,$i.StateValidated=ls,Tn("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function Jo(a){El||(pl(),El=!0),this.H=Vu,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=eu,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new Nn,this.ce=new ea,this.ce.Yd=this,this.Ei=new Nn,this.pu=new Nn,this.Sr=new Nn,this.pr=new Nn,a&&Object.assign(this,a)}Jo.prototype.Xe=function(a){this.H=a},Jo.prototype.canStart=function(){return!0};function Ps(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),cs(a.H),a.zb=!0)}function ts(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,b=a.Zd.contains("Model");b&&(a.Ok=!0,a.Pk===eu?(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===Gl&&y.vc.clear(),a.Qw=!!(a.Pk===tu&&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(),Ts(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,b=y.vc.get(x),x.autoScale!==Is&&b!==null&&(delete b.start.scale,delete b.end.scale),Gt.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Ms(x),Ld(x),a.zb=!1,y.start(),y.bc&&(la(a),x.Ya(),oc(y,0),ol(x,!0),Xa(a),x.R("AnimationStarting",a)))}))}}function ps(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function Wu(a,y,x,b){a.isTicking||ps(a)||y instanceof Vn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}ot=Jo.prototype,ot.fv=function(a){return this.ce.fv(a)},ot.Xu=function(a){return this.ce.Xu(a)};function Qo(a,y){function x(){if(0<E.Sr.count&&(b.addAll(E.Sr),E.Sr.clear(),E.bc=!0),E.bc!==!1&&b.count!==0){E.pu.addAll(b);for(var te=E.pu.iterator;te.next();){var ne=te.value;if(ne.bc!==!1){e:if(0<ne.yl.count)var se=!0;else{for(se=ne.vc.iterator;se.next();){var he=se.key;if(he instanceof Jt&&he.diagram!==null||he instanceof cn){se=!0;break e}}se=!1}se?Hl(ne,!1):ne.Xk=!0}}E.pu.clear(),E.bc!==!1&&(la(E),ol(E.H),Xa(E)),Gt.requestAnimationFrame(x)}}var b=a.Ei,E=a;a.bc?a.Sr.add(y):(a.bc=!0,b.add(y),Gt.requestAnimationFrame(function(){x()}))}function ra(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function la(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 Xa(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}ot.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(),Ts(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),Ts(y,this.H)},ot.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))},ot.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),da(this,a))},ot.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),Ga(this.ce,y,"position",y.position,y.position),da(this,a))};function gs(a,y,x){!a.zb||y.D(x)||ps(a)||(a.H.pi||(y=x.copy()),Ga(a.ce,a.H,"position",y,x))}function Lo(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function da(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function ms(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],se=a[2];a=a[3];var he=y[0],ge=y[1],Se=y[2];return y=y[3],se===0||se===100?(te=he,ne=ge):(Se===0||Se===100)&&(he=te,ge=ne),180<Math.abs(he-te)&&(he>te?te+=360:he+=360),te=E(x,te,he-te,b)%360,ne=E(x,ne,ge-ne,b),se=E(x,se,Se-se,b),x=E(x,a,y-a,b),"hsla("+te+", "+ne+"%, "+se+"%, "+x+")"}function pl(){function a(x,b,E,te,ne,se){x.position=new It(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se))}var y=new ur;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,b,E,te,ne,se){ne<se?x.mm(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se),!1):x.position=new It(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se))}),y.add("location",function(x,b,E,te,ne,se){ne<se?x.mm(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se),!0):x.location=new It(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se))}),y.add("position:placeholder",function(x,b,E,te,ne,se){ne<se?x.mm(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se),!1):x.position=new It(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se))}),y.add("position:nodeCollapse",function(x,b,E,te,ne,se){var he=x.actualBounds,ge=E.actualBounds;E=ge.x+ge.width/2-he.width/2,he=ge.y+ge.height/2-he.height/2,ne<se?x.mm(te(ne,b.x,E-b.x,se),te(ne,b.y,he-b.y,se),!1):x.position=new It(te(ne,b.x,E-b.x,se),te(ne,b.y,he-b.y,se))}),y.add("desiredSize",function(x,b,E,te,ne,se){x.desiredSize=new wn(te(ne,b.width,E.width-b.width,se),te(ne,b.height,E.height-b.height,se))}),y.add("width",function(x,b,E,te,ne,se){x.width=te(ne,b,E-b,se)}),y.add("height",function(x,b,E,te,ne,se){x.height=te(ne,b,E-b,se)}),y.add("fill",function(x,b,E,te,ne,se){x.fill=ms(b,E,ne,se,te)}),y.add("stroke",function(x,b,E,te,ne,se){x.stroke=ms(b,E,ne,se,te)}),y.add("strokeWidth",function(x,b,E,te,ne,se){x.strokeWidth=te(ne,b,E-b,se)}),y.add("strokeDashOffset",function(x,b,E,te,ne,se){x.strokeDashOffset=te(ne,b,E-b,se)}),y.add("background",function(x,b,E,te,ne,se){x.background=ms(b,E,ne,se,te)}),y.add("areaBackground",function(x,b,E,te,ne,se){x.areaBackground=ms(b,E,ne,se,te)}),y.add("opacity",function(x,b,E,te,ne,se){x.opacity=te(ne,b,E-b,se)}),y.add("scale",function(x,b,E,te,ne,se){x.scale=te(ne,b,E-b,se)}),y.add("angle",function(x,b,E,te,ne,se){x.angle=te(ne,b,E-b,se)}),$l=y}Ut.Object.defineProperties(Jo.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&&Qn(a,">= 1",Jo,"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}}}),Jo.prototype.stopAnimation=Jo.prototype.Cc;var $l=null,El=!1,eu=new tn(Jo,"Default",1),tu=new tn(Jo,"AnimateLocations",2),Gl=new tn(Jo,"None",3);Jo.className="AnimationManager",Jo.defineAnimationEffect=function(a,y){El||(pl(),El=!0),$l.add(a,y)},Jo.Default=eu,Jo.AnimateLocations=tu,Jo.None=Gl;function ea(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=nu,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=Ei,this.vc=new ur,this.Tt=new ur,this.yl=new Nn,this.Ut=new Nn,this.dw=xh,a&&Object.assign(this,a)}ea.prototype.suspend=function(){this.Xk=!0},ea.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,Hl(this,!0),la(this.Yd),ol(this.H),Xa(this.Yd),this.H.redraw()};function Ts(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}ot=ea.prototype,ot.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 cn?a=x:x instanceof Jt&&(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===eu&&this===y.defaultAnimation&&(this.Lp=Mu,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=vf),la(y),this.yl.each(function(b){b.data=null,a.add(b)}),Xa(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,Qo(y,this),this)},ot.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},ot.add=function(a,y,x,b,E){if(y==="position"&&x.Xa(b))return this;if(this.H===null&&(a instanceof cn?this.H=a:a instanceof Jt&&a.diagram!==null&&(this.H=a.diagram)),a instanceof Mr){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return Ga(this,a,y,x,b,E),this};function Ga(a,y,x,b,E,te){var ne=a.vc;if(y instanceof cn&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(eh(b),sv(),b=[Xl.j,Xl.u,Xl.o,Xl.F],eh(E),sv(),E=[Xl.j,Xl.u,Xl.o,Xl.F]),ne.contains(y)){var se=ne.I(y),he=se.start,ge=se.end;he[x]===void 0&&(he[x]=fa(b)),ge[x]=fa(E)}else he={},ge={},he[x]=fa(b),ge[x]=fa(E),se=he.position,y instanceof Jt&&se instanceof It&&!se.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&se.assign(ge.position),se=new Ku(he,ge,te),ne.add(y,se);ne=he[x],ne instanceof It&&!ne.w()&&ne.assign(a.o),te&&x.indexOf("position:")===0&&y instanceof Mr?se.Ku.location=fa(y.location):te&&(se.Ku[x]=fa(b))}function fa(a){return a instanceof It||a instanceof Zn?a.copy():a}ot.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},ot.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function Hl(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),la(x),oc(a,E),ol(a.H,!0),Xa(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 oc(a,y){for(var x=a.Gd,b=a.vc.iterator,E=a.Wk;b.next();){var te=b.key;if(!(te instanceof Jt&&te.diagram===null)){var ne=b.value,se=E?ne.end:ne.start;ne=E?ne.start:ne.end;var he=$l,ge;for(ge in ne)ge==="position"&&(ne["position:placeholder"]||ne["position:nodeCollapse"])||he.get(ge)===null||he.get(ge)(te,se[ge],ne[ge],a.Lp,y,x,a)}}}ot.stop=function(){return this.bc?(this.Ml(!0),this):this},ot.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,la(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=$l;b.next();){var ne=b.key,se=b.value,he=E?se.end:se.start,ge=E?se.start:se.end,Se=se.Ku,Ne;for(Ne in ge)if(te.get(Ne)!==null){var Ge=Ne;!se.Hu||Ge!=="position:nodeCollapse"&&Ge!=="position:placeholder"||(Ge="position"),te.get(Ge)(ne,he[Ne],Se[Ne]!==void 0?Se[Ne]:se.Hu?he[Ne]:ge[Ne],this.Lp,this.Gd,this.Gd,this)}se.Hu&&Se.location!==void 0&&ne instanceof Mr&&(ne.location=Se.location),se.nv&&ne instanceof Mr&&ne.Zb(!1)}if(y.As.clear(),Kh(y,!1),y.Ya(),y.N(),ol(y,!0),x.defaultAnimation===this){for(Ne=x.pr.iterator;Ne.next();)E=Ne.value,E.Tg!==null&&(E.points=E.Tg,E.Tg=null);x.pr.clear()}ol(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),Xa(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),Ts(this,null),x.Ml(this),y.$b())}},ot.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof ni&&(b=y.placeholder),b!==null?(x=b.ga(Ka),b=b.padding,x.x+=b.left,x.y+=b.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new It(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof ni)for(a=a.memberParts;a.next();)b=a.value,b instanceof nr&&this.Cj(b,y)},ot.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof ni&&(x=y.placeholder),x!==null){var b=x.ga(Ka);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 ni)for(a=a.memberParts;a.next();)b=a.value,b instanceof nr&&this.Aj(b,y)}},ot.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},Ut.Object.defineProperties(ea.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Qn(a,">= 1",ea,"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:Yt("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}}}),ea.prototype.getTemporaryState=ea.prototype.Ez,ea.prototype.stop=ea.prototype.stop,ea.prototype.add=ea.prototype.add,ea.prototype.addTemporaryPart=ea.prototype.Iy;function nu(a,y,x,b){return a/=b/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function Mu(a,y,x,b){return a===b?y+x:x*(-Math.pow(2,-10*a/b)+1)+y}ea.className="Animation",ea.EaseLinear=function(a,y,x,b){return x*a/b+y},ea.EaseInOutQuad=nu,ea.EaseInQuad=function(a,y,x,b){return x*(a/=b)*a+y},ea.EaseOutQuad=function(a,y,x,b){return-x*(a/=b)*(a-2)+y},ea.EaseInExpo=function(a,y,x,b){return a===0?y:x*Math.pow(2,10*(a/b-1))+y},ea.EaseOutExpo=Mu;function Ku(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}Ku.className="AnimationState";function Tl(a,y,x){this.xd=null,this.rf=a,this.so=x||ya,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=us))}Tl.prototype.copy=function(){var a=new Tl(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 Vo(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))}Ut.Object.defineProperties(Tl.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 ya=new tn(Tl,"Default",1),us=new tn(Tl,"Immediate",2),Sa=new tn(Tl,"Bundled",3);Tl.className="AnimationTrigger",Tl.Default=ya,Tl.Immediate=us,Tl.Bundled=Sa;function $o(a){gi(this),this.H=null,this.Pa=new Ln,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)}ot=$o.prototype,ot.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,Os(x)}a.clear(),this.Zq.length=0},ot.Xe=function(a){this.H=a},ot.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,se=this.Pa.iterator;se.next();){var he=se.value;he instanceof ni?E++:he instanceof nr?b++:he instanceof Vn?te++:he instanceof Ui?ne++:x++}if(se="",0<x&&(se+=x+" Parts "),0<b&&(se+=b+" Nodes "),0<E&&(se+=E+" Groups "),0<te&&(se+=te+" Links "),0<ne&&(se+=ne+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,se+=`
`+x.toString(),b=x.data,b!==null&&Mi(b)&&(se+=" #"+Mi(b)),x instanceof nr?se+=" "+$n(b):x instanceof Vn&&(se+=" "+$n(x.fromNode)+" "+$n(x.toNode));return y+" "+this.Pa.count+": "+se},ot.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=It.alloc(),te=this.Pa.s,ne=te.length;ne--;){var se=te[ne];if((b!==!0||td(se)!==!1)&&se.isVisible()&&(E.assign(a),bi(E,se.oe),se=se.ic(E,y,x),se!==null&&(y!==null&&(se=y(se)),se!==null&&(x===null||x(se)))))return It.free(E),se}return It.free(E),null},ot.ji=function(a,y,x,b){if(y===void 0&&(y=null),x===void 0&&(x=null),b instanceof Ln||b instanceof Nn||(b=new Nn),this.Uh===!1)return b;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var te=It.alloc(),ne=this.Pa.s,se=ne.length;se--;){var he=ne[se];if((E!==!0||td(he)!==!1)&&he.isVisible()){te.assign(a),bi(te,he.oe);var ge=he;he.ji(te,y,x,b)&&(y!==null&&(ge=y(ge)),ge===null||x!==null&&!x(ge)||b.add(ge))}}return It.free(te),b},ot.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 Ln||E instanceof Nn||(E=new Nn),this.Uh===!1)return E;var te=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(te=!0);for(var ne=this.Pa.s,se=ne.length;se--;){var he=ne[se];if((te!==!0||td(he)!==!1)&&he.isVisible()){var ge=he;he.Cf(a,y,x,b,E)&&(y!==null&&(ge=y(ge)),ge===null||x!==null&&!x(ge)||E.add(ge))}}return E},ot.Nu=function(a,y,x,b,E,te,ne){if(this.Uh===!1)return E;for(var se=this.Pa.s,he=se.length;he--;){var ge=se[he];if((ne!==!0||td(ge)!==!1)&&te(ge)&&ge.isVisible()){var Se=ge;ge.Cf(a,y,x,b,E)&&(y!==null&&(Se=y(Se)),Se===null||x!==null&&!x(Se)||E.add(Se))}}return E},ot.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 Ln||E instanceof Nn)&&(te=E),E=!0),te instanceof Ln||te instanceof Nn||(te=new Nn),this.Uh===!1)return te;var ne=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(ne=!0);for(var se=It.alloc(),he=It.alloc(),ge=this.Pa.s,Se=ge.length;Se--;){var Ne=ge[Se];if((ne!==!0||td(Ne)!==!1)&&Ne.isVisible()){se.assign(a),bi(se,Ne.oe),he.h(a.x+y,a.y),bi(he,Ne.oe);var Ge=Ne;Ne.og(se,he,x,b,E,te)&&(x!==null&&(Ge=x(Ge)),Ge===null||b!==null&&!b(Ge)||te.add(Ge))}}return It.free(se),It.free(he),te},ot.Fd=function(a,y){if(this.visible){var x=this.Pa.s,b=x.length;if(b!==0){a=pn();for(var E=pn(),te=0;te<b;te++){var ne=x[te];if(ne.vw=te,ne instanceof Vn){if(ne.fd===!1)continue}else if(ne instanceof Ui&&ne.adornedPart!==null)continue;var se=ne.actualBounds;ne.isVisible()&&Oo(se,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],Fv(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++)Fv(E[y]);On(a),On(E)}}};function vs(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}ot.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=vs(this,a);var te=this.Zq;te.length=0;for(var ne=y.scale,se=wn.alloc(),he=0;he<b;he++)this.Oj(a,x[he],y,te,ne,se,!0);if(wn.free(se),a.isTemporary)for(y=0;y<b;y++)x[y].Gj();a.globalAlpha=E}}};function gl(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=vs(a,y),se=a.Zq;se.length=0;for(var he=x.scale,ge=wn.alloc(),Se=0;Se<te;Se++){var Ne=E[Se];b.contains(Ne)&&a.Oj(y,Ne,x,se,he,ge,!1)}wn.free(ge),y.globalAlpha=ne}}}ot.Oj=function(a,y,x,b,E,te,ne){if(ne&&!td(y))a.Hs(y);else{if(b!==null&&y instanceof Vn&&(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 se=y.actualBounds;if(b=!1,ne&&y.isVisible()){if(!te.Yc(se)){a.Hs(y);return}b=!te.Re(se)}b&&(a.save(),a instanceof Ml?a.bk=te.copy():(a.beginPath(),a.rect(te.x,te.y,te.width,te.height),a.clip())),se.width*E>x.Oq||se.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&&(ia(y,a,y.areaBackground,!0,!0,te,E),a.fillRect(E.x,E.y,E.width,E.height)),y.areaBackground===null&&y.background===null&&(ia(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),ia(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))}},ot.g=function(a,y,x,b,E){var te=this.diagram;te!==null&&te.cb(zo,a,this,y,x,b,E)},ot.oi=function(a,y,x){var b=this.Pa;if(y.Ig=this,this===null&&Os(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)),gu(this,a,y),a},ot.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,Os(y),a};function gu(a,y,x){if(y=cf(a,y,x),x instanceof ni&&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 se=E[ne];if(se===x&&(y=ne,0<=b)||0>b&&se.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&&gu(a,-1,y)}x.svg!==null&&x.svg.remove()}function cf(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 se=y+1,he=NaN;se<E&&(he=a.M(se).zOrder,!!isNaN(he));)se++;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(he)&&he<b)for(;;){if(se===E||he>=b){if(se--,se===y)break;return a.mb(y),a.Gb(se,x),se}for(he=NaN;++se<E&&(he=a.M(se).zOrder,isNaN(he)););}return y}Ut.Object.defineProperties($o.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===""&&Yt("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&Yt("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)&&Qn(a,"0 <= value <= 1",$o,"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))}}}),$o.prototype.findObjectsNear=$o.prototype.og,$o.prototype.findObjectsIn=$o.prototype.Cf,$o.prototype.findObjectsAt=$o.prototype.ji,$o.prototype.findObjectAt=$o.prototype.ic,$o.className="Layer";function cn(a,y){if(hm||(Ls(),hm=!0),gi(this),Vu=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,na){var x=this,b=function(){x.removeEventListener(Gt.document,"DOMContentLoaded",b,!1),x.setRTL()};Gt.document.body!==null?this.setRTL():x.addEventListener(Gt.document,"DOMContentLoaded",b,!1)}this.ol=null,rp.add("Model",so);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 se=te.change;te.modelChange===""&&se===zo&&ne.updateDataBindings(te.object,te.propertyName)}finally{ne.diagram.aa=!0}}},this.Oc=function(te){E.partManager.doModelChanged(te)},this.hu=this.ku=null,hf(this),this.model=hy(),this.Wg=!0,Vh(this),this.layout=new Ro,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"||Gt.Element&&a instanceof Element?Md(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var Pc,Vu;function hf(a){a.Yd=new Jo,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new Ln,a.pj=new ur,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new It(NaN,NaN).freeze(),a.du=new It(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new It(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new fi,a.zu=new It(NaN,NaN).freeze(),a.ut=new wn(NaN,NaN,NaN,NaN).freeze(),a.rj=new kr(0,0,0,0).freeze(),a.sj=xh,a.nu=!1,a.Zt=null,a.fu=null,a.yh=Is,a.zk=ro,a.Fg=Is,a.pq=ro,a.yt=Ka,a.Bt=Ka,a.Fc=!0,a.pn=!1,a.De=new Nn,a.Eh=new ur,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new kr(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new ws,a.bq.diagram=a,a.Qg=new ws,a.Qg.diagram=a,a.cj=new ws,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,nv(a),a.ai=new Nn,a.Ht=!0,a.uu=wh,a.pw=!1,a.wu=mf,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 ur,a.Xn=new Ln,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 kr(5).freeze(),a.Hw=new Nn().freeze(),a.Nt=999999999,a.nw=new Nn().freeze(),a.Zi=!0,a.Ee=!0,a.vd=!0,a.Be=!1,a.gf=!1,a.xh=!0,a.hf=!1,a.sy=new Nn,a.ow=new Nn,a.Xh=null,a.aw=new Zn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new It,bounds:new wn,Py:new Zn,bA:new Zn,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new wn(NaN,NaN,NaN,NaN).freeze(),a.wo=new Zn(NaN,NaN).freeze(),a.Sp=new wn(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new ur;var y=new nr,x=new Co;x.bind(new xa("text","",$n)),y.add(x),a.ny=y,a.Lg.add("",y),y=new nr,x=new Co,x.stroke="brown",x.bind(new xa("text","",$n)),y.add(x),a.Lg.add("Comment",y),y=new nr,y.selectable=!1,y.avoidable=!1,x=new ci,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new Zn(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new ur,y=new ni,y.selectionObjectName="GROUPPANEL",y.type=Un.Vertical,x=new Co,x.font="bold 12pt sans-serif",x.bind(new xa("text","",$n)),y.add(x),x=new Un(Un.Auto),x.name="GROUPPANEL";var b=new ci;b.figure="Rectangle",b.fill="rgba(128,128,128,0.2)",b.stroke="black",x.add(b),b=new Ks,b.padding=new kr(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new ur,y=new Vn,x=new ci,x.isPanelMain=!0,y.add(x),x=new ci,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new Vn,x=new ci,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new Ui,y.type=Un.Auto,x=new ci,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Ks,x.margin=new kr(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new Ui,y.type=Un.Link,x=new ci,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 so,a.toolManager=new Do,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new de,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=Yc(),a.eq=null,a.fq=Ur,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 It,a.zy=500,a.wp=new It,a.wq=!1}cn.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),Bd=null,Jh="",gh(this,!1),this.Xn.clear(),mp(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function gh(a,y){a.animationManager.Cc(!0),a.Hw=new Nn().freeze(),a.nw=new Nn().freeze();var x=a.skipsUndoManager,b=a.cc!==null&&a.cc!==void 0;b&&(a.skipsUndoManager=!0);var E=null;a.fe!==null&&(E=a.fe.part,E!==null&&a.remove(E));var te=[],ne=a.Wa.length;if(y){for(y=0;y<ne;y++)for(var se=a.Wa.s[y].parts;se.next();){var he=se.value;he!==E&&he.data===null&&te.push(he)}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(),mp(),a.Og.clear(),Br=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),te}function Yc(){return null}cn.prototype.reset=function(){this.clear(),this.vb=!0,hf(this),lc(this),this.Wg=!0,Vh(this),this.layout=new Ro,this.Wg=!1,this.model=hy(),this.model.undoManager=new Uo,this.vb=this.rn=!1,this.N()},cn.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=Gt.document.body);var y=Pn("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},cn.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=Gt.document.body);var y=0;if(na){var x=cm;y=Pc,x===null&&(x=cm=Pn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Pc=Pn("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||qr||(y=11)}this.Db=y,this.Gw=!0},cn.prototype.qb=function(a){a.classType===cn&&(this.autoScale=a)},cn.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 Md(a,y){if(na){if(y!=null||Yt("Diagram setup requires an argument DIV."),a.Ka!==null&&Yt("Diagram has already completed setup."),typeof y=="string"?a.Ka=Gt.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:Yt("No DIV or DIV id supplied: "+y),a.Ka===null&&Yt("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&Yt("Invalid div id; div already has a Diagram associated with it."),!a.ol&&Gt.ResizeObserver){var x=Gn(function(){a.$b()},250);a.ol=new Gt.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}Gt.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=Gt.go;var E=new yu(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",Gt.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),Dd(a,a.Aa,a.ya),a.Ka.insertBefore(E.Oa,a.Ka.firstChild),E=new yu(null),E.width=1,E.height=1,a.jw=E,a.oy=E.context,na){E=Pn("div");var te=Pn("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=Zf,E.addEventListener("pointerdown",ff),E.H=a,E.uy=!0,E.vy=!0,a.ku=E,a.hu=te}a.hk=Gn(function(){a.Yh=null,a.N()},300),a.Ov=Gn(function(){Ld(a)},250),a.preventDefault=function(ne){return ne.preventDefault(),!1},a.$j=function(ne){if(a.isEnabled){var se=ml(a,ne,!0);se.bubbles=!0;var he=0,ge=0;se.delta=0,ne.deltaX!==void 0?(ne.deltaX!==0&&(he=0<ne.deltaX?1:-1),ne.deltaY!==0&&(ge=0<ne.deltaY?1:-1),se.delta=Math.abs(ne.deltaX)>Math.abs(ne.deltaY)?-he:-ge):ne.wheelDeltaX!==void 0?(ne.wheelDeltaX!==0&&(he=0<ne.wheelDeltaX?-1:1),ne.wheelDeltaY!==0&&(ge=0<ne.wheelDeltaY?-1:1),se.delta=Math.abs(ne.wheelDeltaX)>Math.abs(ne.wheelDeltaY)?-he:-ge):ne.wheelDelta!==void 0&&ne.wheelDelta!==0&&(se.delta=0<ne.wheelDelta?1:-1),a.doMouseWheel(),Wl(se,ne)}},a.aA=function(ne){a.isEnabled&&(a.Vk=!1,ml(a,ne,!0),ne=a.currentTool,ne.cancelWaitAfter(),ne.standardMouseOver())},a.ui=function(ne){if(a.isEnabled){a.Vk=!0;var se=a.Yt;se[ne.pointerId]===void 0&&(se[ne.pointerId]=ne),se=a.oj;var he=!1;if(se[0]===null||se[0].pointerId!==ne.pointerId&&se[0].pointerType===ne.pointerType)if(se[1]!==null&&se[1].pointerId===ne.pointerId)se[1]=ne,he=!0;else if(se[0]===null)se[0]=ne;else if(se[1]===null)se[1]=ne,he=!0;else{ne.preventDefault();return}else se[0]=ne;(se=ne.pointerType==="touch"||ne.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var ge=he;he=Nd(a,ne,!0,!1,!0,ge),yh(a,ne,he),he.targetDiagram=Od(ne,ne.target),he.targetObject=null,ge||he.clone(a.bq),ge=a.uw,se=se?25:10,ne.timeStamp-a.tw<a.zy&&!(Math.abs(ge.x-ne.screenX)>se||Math.abs(ge.y-ne.screenY)>se)?a.yq++:a.yq=1,he.clickCount=a.yq,a.tw=ne.timeStamp,a.uw.sg(ne.screenX,ne.screenY),a.doMouseDown(),ne.button===1?ne.preventDefault():Wl(he,ne)}},a.dk=function(ne){if(a.isEnabled){a.Vk=!0;var se=a.oj;if(se[0]===null||se[0].pointerId!==ne.pointerId&&se[0].pointerType===ne.pointerType){if(se[1]!==null&&se[1].pointerId===ne.pointerId){se[1]=ne;return}if(se[0]===null)se[0]=ne;else return}else se[0]=ne;if(se[0].pointerId===ne.pointerId){se=Nd(a,ne,!1,!1,!1,se[1]!==null);var he=Gt.document.elementFromPoint(ne.clientX,ne.clientY)||null;he!==null&&he.shadowRoot!==void 0&&he.shadowRoot!==null&&(he=he.shadowRoot.elementFromPoint(ne.clientX,ne.clientY));var ge=a,Se=ne;he&&he.H&&(Se=ne,ge=he.H),se.targetDiagram=ge,yh(a,Se,se),se.targetObject=null,a.doMouseMove(),Wl(se,ne)}}},a.fk=function(ne){if(a.isEnabled){a.Vk=!0;var se=ne.pointerType==="touch"||ne.pointerType==="pen",he=a.Yt;if(se&&a.qu)delete he[ne.pointerId],ne.preventDefault();else if(he=a.oj,he[0]===null||he[0].pointerId!==ne.pointerId&&he[0].pointerType===ne.pointerType)he[1]!==null&&he[1].pointerId===ne.pointerId&&(he[1]=null);else{he[0]=null,he=Nd(a,ne,!1,!0,!0,!1);var ge=Gt.document.elementFromPoint(ne.clientX,ne.clientY)||null;ge!==null&&ge.shadowRoot!==void 0&&ge.shadowRoot!==null&&(ge=ge.shadowRoot.elementFromPoint(ne.clientX,ne.clientY)),ge!==null&&ge.H instanceof cn&&ge.H!==a&&yh(ge.H,ne,he),ge===null&&(ge=ne.target),yh(a,ne,he),he.clickCount=a.yq,he.targetDiagram=Od(ne,ge),he.targetObject=null,a.doMouseUp(),Wl(he,ne),se&&(a.wq=!1)}}},a.ek=function(ne){if(a.isEnabled){a.Vk=!1;var se=a.Yt;se[ne.pointerId]&&delete se[ne.pointerId],se=a.oj,se[0]!==null&&se[0].pointerId===ne.pointerId&&(se[0]=null),se[1]!==null&&se[1].pointerId===ne.pointerId&&(se[1]=null),ne.pointerType!=="touch"&&ne.pointerType!=="pen"&&(ne=a.currentTool,ne.cancelWaitAfter(),ne.standardMouseOver())}},a.ck=function(ne){var se=a.oj;se[0]!==null&&se[0].pointerId===ne.pointerId?(se[0]=null,a.wq=!1):se[1]!==null&&se[1].pointerId===ne.pointerId&&(se[1]=null)},a.Vp=b.Z["d"+Sf[1]+Sf[2]+"wI"+_d.slice(1,5)]["b"+jx.slice(1,y)](b.Z,yf,y,y),b.Vc(!0),Kp(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}cn.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},cn.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(Gt,"resize",a.Ov,!1)}function Ms(a){30<a.Sq&&(a.Yh=1)}function Kh(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),Qr&&Qr.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}cn.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:Gt.devicePixelRatio||1},cn.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},cn.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},cn.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},cn.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},cn.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},cn.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},cn.prototype.doFocus=function(){this.focus()},cn.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=Gt.scrollX||Gt.pageXOffset,y=Gt.scrollY||Gt.pageYOffset;this.ta.focus(),Gt.scrollTo(a,y)}},cn.prototype.Oy=function(){this.H.R("GainedFocus")},cn.prototype.Ny=function(){this.H.R("LostFocus")};function Ld(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===Is&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function Vh(a){var y=new $o;y.name="Background",a.Al(y),y=new $o,y.name="",a.Al(y),y=new $o,y.name="Foreground",a.Al(y),y=new $o,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new $o,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new $o,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function df(a){var y=new Un(Un.Grid);y.name="GRID";var x=new ci;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new ci,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new ci,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new ci,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new ci,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new ci,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Mr,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 Zf(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):Tc(this.H)}function ff(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):Tc(this.H)}cn.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,se=b.y-te.top,he=b.width+te.left+te.right,ge=b.height+te.top+te.bottom,Se=b.right+te.right;te=b.bottom+te.bottom;var Ne=E.x;b=E.y;var Ge=E.width,Je=E.height,nt=E.right,ct=E.bottom;E=this.scale;var Ft=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Ft=Ft+a.scrollWidth-a.clientWidth;break;case"reverse":Ft=a.scrollWidth-Ft-a.clientWidth}var Ot=Ft;Ge<he||Je<ge?(Ft=It.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==Ot&&(Ft.x=Ot/E+ne,this.ju=Ot),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Ft.y=a.scrollTop/E+se,this.lu=a.scrollTop),this.position=Ft,It.free(Ft),this.Ee=this.qr=!1):(Ft=It.alloc(),a.uy&&this.allowHorizontalScroll&&(ne<Ne&&(this.position=Ft.h(Ot+ne,this.position.y)),Se>nt&&(this.position=Ft.h(-(y.scrollWidth-this.Aa)+Ot-this.Aa/E+Se,this.position.y))),a.vy&&this.allowVerticalScroll&&(se<b&&(this.position=Ft.h(this.position.x,a.scrollTop+se)),te>ct&&(this.position=Ft.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/E+te))),It.free(Ft),this.vd=!0,this.Ee=this.qr=!1,b=this.documentBounds,E=this.viewportBounds,Se=b.right,nt=E.right,te=b.bottom,ct=E.bottom,ne=b.x,Ne=E.x,se=b.y,b=E.y,Ge>=he&&ne>=Ne&&Se<=nt&&(x.style.width="1px"),Je>=ge&&se>=b&&te<=ct&&(x.style.height="1px"))}},cn.prototype.computeBounds=function(a){return a===void 0&&(a=new wn),cs(this),kd(this,a)};function kd(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 se=ne.length,he=0;he<se;he++){var ge=ne[he];ge.isInDocumentBounds&&ge.isVisible()&&(ge=ge.actualBounds,ge.w()&&(x?(x=!1,y.assign(ge)):y.ed(ge)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}cn.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(Mn(a))for(var b=0;b<a.length;b++){var E=a[b];!y&&E instanceof Vn||(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 Vn||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds));return x===null?new wn(NaN,NaN,0,0):x};function Ul(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=It.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var b=a.viewportBounds;b=wn.allocAt(0,0,b.width,b.height);var E=It.alloc();E.xi(b,a.initialViewportSpot),E.h(x.x-E.x,x.y-E.y),a.position=E,wn.free(b),It.free(E),It.free(x)}x=a.yh,y&&a.Fg!==Is&&(x=a.Fg);var te=x!==Is?mh(a,x):a.scale;x=a.pa.x,b=a.pa.y,E=a.Aa/te;var ne=a.ya/te,se=a.zk,he=a.pq;y&&!se.sb()&&(he.sb()||he.Xb())&&(se=he.Xb()?Di:he),pf(a,a.documentBounds,E,ne,se,y),y=a.scale,a.scale=te,a.vb=!1,te=a.viewportBounds,qt.B(te.x,x)&&qt.B(te.y,b)&&qt.B(te.width,E)&&qt.B(te.height,ne)||a.onViewportBoundsChanged(new wn(x,b,E,ne),te,y,!1)}}function mh(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),se=te/E,he=ne/b;return y===Kl?(y=Math.min(he,se),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===Qh?(y=he>se?(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}cn.prototype.zoomToFit=function(){var a=this.sj;this.sj=xh,this.scale=mh(this,Kl),a!==xh&&(Ul(this,!1),pf(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},ot=cn.prototype,ot.BA=function(a,y){y===void 0&&(y=Kl);var x=a.width,b=a.height;if(!(x===0||b===0||isNaN(x)&&isNaN(b))){var E=1;if(y===Kl||y===Qh)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===Qh?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 It(a.x,a.y)}},ot.Jy=function(a,y){this.Va();var x=this.documentBounds,b=this.viewportBounds;this.position=new It(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))},ot.zz=function(a){if(a instanceof Jt){this.eq=a;var y=It.alloc();this.fq=this.op(a.ga(Ka,y)),It.free(y)}else this.eq=null,this.fq=Ur};function pf(a,y,x,b,E,te){var ne=It.allocAt(a.pa.x,a.pa.y),se=ne.x,he=ne.y;if(a.eq!==null){var ge=It.alloc();ge=a.eq.ga(Ka,ge),se=ge.x-a.fq.x/a.scale,he=ge.y-a.fq.y/a.scale,E=oa,It.free(ge)}(te||a.scrollMode===xh)&&(E.sb()&&(x>y.width&&(se=y.x+(E.x*y.width+E.offsetX)-(E.x*x-E.offsetX)),b>y.height&&(he=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?(se=Math.min(se+x/2,y.right+Math.max(te,E.right)-x/2),se=Math.max(se,y.left-Math.max(te,E.left)+x/2),se-=x/2):se>y.left?se=y.left:se<y.right-x&&(se=y.right-x),x=b-y.height,b<y.height+E.top+E.bottom?(he=Math.min(he+b/2,y.bottom+Math.max(x,E.bottom)-b/2),he=Math.max(he,y.top-Math.max(x,E.top)+b/2),he-=b/2):he>y.top?he=y.top:he<y.bottom-b&&(he=y.bottom-b)),ne.x=isFinite(se)?se:-a.yb.left,ne.y=isFinite(he)?he:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,ne),ne.x=y.x,ne.y=y.y),gs(a.Yd,a.pa,ne),a.pa.h(ne.x,ne.y),lc(a),It.free(ne)}ot.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=Lu(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof Mr)return a}else if(a=Lu(this,a,function(x){return x.part}),a instanceof Mr)return a;return null},ot.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),cs(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 Lu(a,y,x,b){for(x===void 0&&(x=null),b===void 0&&(b=null),cs(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}ot.lz=function(a,y,x){return y===void 0&&(y=!0),Cc(this,a,function(b){return b.part},y?function(b){return b instanceof Mr&&b.canSelect()}:null,x)};function Cc(a,y,x,b,E){for(x===void 0&&(x=null),b===void 0&&(b=null),E instanceof Ln||E instanceof Nn||(E=new Nn),cs(a),a=a.Wa.iteratorBackwards;a.next();){var te=a.value;te.visible&&!te.isTemporary&&te.ji(y,x,b,E)}return E}ot.ji=function(a,y,x,b){y===void 0&&(y=null),x===void 0&&(x=null),b instanceof Ln||b instanceof Nn||(b=new Nn),cs(this);for(var E=this.Wa.iteratorBackwards;E.next();){var te=E.value;te.visible&&te.ji(a,y,x,b)}return b},ot.ux=function(a,y,x,b){return y===void 0&&(y=!1),x===void 0&&(x=!0),vh(this,a,function(E){return E instanceof Mr&&(!x||E.canSelect())},y,b)},ot.Cf=function(a,y,x,b,E){y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof Ln||E instanceof Nn||(E=new Nn),cs(this);for(var te=this.Wa.iteratorBackwards;te.next();){var ne=te.value;ne.visible&&ne.Cf(a,y,x,b,E)}return E},ot.Nu=function(a,y,x,b,E,te){var ne=new Nn;cs(this);for(var se=this.Wa.iteratorBackwards;se.next();){var he=se.value;he.visible&&he.Nu(a,y,x,b,ne,E,te)}return ne};function vh(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 Ln||E instanceof Nn||(E=new Nn),cs(a),a=a.Wa.iteratorBackwards;a.next();){var ne=a.value;ne.visible&&!ne.isTemporary&&ne.Cf(y,te,x,b,E)}return E}ot.mz=function(a,y,x,b,E){return x===void 0&&(x=!0),b===void 0&&(b=!0),Jc(this,a,y,function(te){return te instanceof Mr&&(!b||te.canSelect())},x,E)},ot.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 Ln||E instanceof Nn)&&(te=E),E=!0),te instanceof Ln||te instanceof Nn||(te=new Nn),cs(this);for(var ne=this.Wa.iteratorBackwards;ne.next();){var se=ne.value;se.visible&&se.og(a,y,x,b,E,te)}return te};function Jc(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 Ln||E instanceof Nn)&&(te=E),E=!0),te instanceof Ln||te instanceof Nn||(te=new Nn),cs(a),a=a.Wa.iteratorBackwards;a.next();){var se=a.value;se.visible&&!se.isTemporary&&se.og(y,x,ne,b,E,te)}return te}cn.prototype.acceptEvent=function(a){return ml(this,a,a instanceof MouseEvent)};function ml(a,y,x){var b=a.Qg;return a.Qg=a.cj,a.cj=b,b.diagram=a,b.event=y,x?yh(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),qr&&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=Od(y,y.target),b.targetObject=null,b}function Od(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 Nd(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,qr&&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 Wl(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}cn.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=ml(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(),Wl(x,a)},cn.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=ml(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(),Wl(x,a)},cn.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=ml(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),Wl(x,a)},cn.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=ml(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),Wl(x,a)},cn.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new It(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?bi(new It(y,a),this.Ab):new It(y,a)};function yh(a,y,x){var b=a.ta,E=a.Aa,te=a.ya,ne=0,se=0;b!==null&&(b=b.getBoundingClientRect(),ne=y.clientX-E/b.width*b.left,se=y.clientY-te/b.height*b.top),x.viewPoint.h(ne,se),a.Ab!==null?(y=It.allocAt(ne,se),a.Ab.Cd(y),x.documentPoint.assign(y),It.free(y)):x.documentPoint.h(ne,se)}function Ad(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))}}cn.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function jd(a){a.ld||cs(a),a.Va()}cn.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},ot=cn.prototype,ot.Pz=function(){return this.kg},ot.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,ol(this),this.hf=!1,this.du=new It(NaN,NaN),y.isEnabled=x,this.ld=!0;var b=this;a!==null&&ir(function(){b.ld=!1,Ps(y,"Model"),a(b)},1)},ot.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;Gt.requestAnimationFrame(function(){y.kg&&y.bd()})}},ot.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),ol(this))};function Ec(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||Tc(a)||(y&&cs(a),x&&Ul(a,!1))}function ol(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 se=E[ne];Aa(se,!1),se.v()}b.clear()}b=a.ow,0<b.count&&(b.each(function(he){he.Nv()}),b.clear()),E=b=!1,x.defaultAnimation.isAnimating&&(E=!0,b=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||Ld(a),Ec(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(sc(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),cs(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,cs(a),a.ou||jd(a),Ec(a,!0,!1),ne=!1,te?(x=wn.alloc(),x.assign(a.viewportBounds),a.hf||(ne=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,Id(a)),a.R("LayoutCompleted"),Ec(a,!0,!1),wn.free(x)):x.Ok&&x.Qw&&(a.Fg!==Is?a.scale=mh(a,a.Fg):a.yh!==Is?a.scale=mh(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),Ul(a,!0)),te&&ne&&a.eb("Initial Layout"),cs(a),y||a.gc(a.ib),E&&(a.skipsUndoManager=b),a.ld=!1}}function Id(a){if(a.Fg!==Is)a.scale=mh(a,a.Fg);else if(a.yh!==Is)a.scale=mh(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}Ul(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),sc(a)}function cs(a){if(a.De.count!==0&&(a.ld||!a.animationManager.isTicking)){for(var y=0;23>y;y++){var x=a.De.iterator;if(x===null||a.De.count===0)break;a.De=new Nn,a.Nv(x,a.De)}a.nodes.each(function(b){b instanceof ni&&b.U&65536&&(b.U=b.U^65536)})}}ot.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof ni||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof ni&&x.isVisible()&&qo(this,x);for(a.reset();a.next();)x=a.value,x instanceof Vn&&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 Ui&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function qo(a,y){for(var x=pn(),b=pn(),E=y.memberParts;E.next();){var te=E.value;te.isVisible()&&(te instanceof ni?(Zl(te)||Us(te)||ed(te))&&qo(a,te):te instanceof Vn?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(On(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();On(b)}ot.Fd=function(a,y,x,b){if(this.vd||this.animationManager.isAnimating)for(var E=0;E<y;E++)a[E].Fd(x,b)},ot.gc=function(a){if(this.Ka!==null){if(this.ta===null&&Yt("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){iu(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,se=this.Ab;for(se.reset(),E!==1&&se.scale(E),y.x===0&&y.y===0||se.translate(-te,-ne),a.ti=null,Xy(a,se.m11,se.m12,se.m21,se.m22,se.dx,se.dy),this.pb!==1&&(a.globalAlpha=this.pb),js(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?zd(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(fi.prototype.Cd=fi.prototype.Eu),this.Fc=this.vd=!1}}}}else e:if(te=this.animationManager,!te.zb&&(!te.isAnimating||te.isTicking)&&(x=new Date,iu(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,se=this.pa;var he=this.Ca,ge=Math.round(se.x*he)/he,Se=Math.round(se.y*he)/he;for(he!==1&&te.scale(he),se.x===0&&se.y===0||te.translate(-ge,-Se),a.setTransform(ne,0,0,ne,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),js(this,a),se=0;se<E;se++)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[se].gc(a,this);if(y=!1,this.Yf?zd(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(fi.prototype.Cd=fi.prototype.Eu),b?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,b=Qr&&Qr.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 Ta(a,y,x,b,E,te,ne,se,he,ge){if(a.Ka!==null){a.ta===null&&Yt("No canvas specified"),ne===void 0&&(ne=null),se===void 0&&(se=null),he===void 0&&(he=!1),ge===void 0&&(ge=!1),iu(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var Se=a.Ca;a.Ca=E;var Ne=a.Wa.s,Ge=Ne.length;try{var Je=new wn(te.x,te.y,b.width/E,b.height/E),nt=Je.copy();nt.Co(x),sc(a,nt),cs(a),a.Fd(Ne,Ge,a,Je),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,b.width,b.height),se!==null&&se!==""&&(y.fillStyle=se,y.ox(0,0,b.width,b.height));var ct=a.Mb;y.scale(ct,ct);var Ft=fi.alloc();Ft.reset(),Ft.translate(x.left,x.top),Ft.scale(E),te.x===0&&te.y===0||Ft.translate(-te.x,-te.y),y.setTransform(Ft.m11,Ft.m12,Ft.m21,Ft.m22,Ft.dx,Ft.dy),y.yc(),y instanceof Ml&&Xy(y,Ft.m11,Ft.m12,Ft.m21,Ft.m22,Ft.dx,Ft.dy),fi.free(Ft),js(a,y),y.globalAlpha=a.pb;var Ot=a.Qj("Grid");if(ne){var zt=new Nn,Ht=ne.iterator;for(Ht.reset();Ht.next();){var Wt=Ht.value;Wt instanceof Mr&&(ge||Wt.layer!==Ot)&&(Wt.Gj(),zt.add(Wt))}for(ge=0;ge<Ge;ge++)gl(Ne[ge],y,a,zt,he);zt.each(function(hn){return hn.Gj()})}else for(zt=0;zt<Ge;zt++){var Xt=Ne[zt];Xt===Ot?ge&&Xt.gc(y,a,!0):Xt.gc(y,a,he)}a.$i=!1,a.Yf&&zd(a.Yf,a)&&a.Vp()}finally{a.Ca=Se,a.ib.Vc(!0),a.vd=!0,a.Fd(Ne,Ge,a,a.viewportBounds),sc(a),a.ib instanceof Ml&&(a.ib.Nj.PA(),a.redraw())}}}ot.Gf=function(a){return this.Rg[a]},ot.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},ot.Tx=function(){this.Rg=new ar,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(qr||Lr),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function js(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}ot.Ql=function(a){return this.on[a]},ot.sA=function(a,y){this.on[a]=y},ot.Sx=function(){this.on=new ar,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},ot.set=function(a){return Object.assign(this,a),this},ot.Du=function(a){return this.nm(a)},ot.nm=function(a){return ru(this,a),this};function ru(a,y){var x=a instanceof Un,b=a instanceof cn,E;for(E in y){E===""&&Yt("Setting properties requires non-empty property names");var te=a,ne=E;if(x||b){var se=E.indexOf(".");if(0<se){var he=E.substring(0,se);x?te=a.fb(he):(te=a[he],te==null&&(te=a.toolManager[he])),rn(te)?ne=E.substr(se+1):Yt("Unable to find object named: "+he+" in "+a.toString()+" when trying to set property: "+E)}}if(ne[0]!=="_"&&!Fn(te,ne))if(b&&ne==="ModelChanged"){a.Yw(y[ne]);continue}else if(b&&ne==="Changed"){a.Pe(y[ne]);continue}else if(b&&Fn(a.toolManager,ne))te=a.toolManager;else if(b&&sm(a,ne)){a.Bj(ne,y[ne]);continue}else if(a instanceof mr&&ne==="Changed"){a.Pe(y[ne]);continue}else Yt('Trying to set undefined property "'+ne+'" on object: '+te.toString());te[ne]=y[E],ne[0]==="_"&&te instanceof Jt&&te.Vw(ne)}}ot.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new ur,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},ot.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")},cn.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!==vf&&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=wn.alloc(),Qp(this,this.computeBounds(b)),wn.free(b)),b=this.ta,b===null||b instanceof uc)))){var ne=this.Mb;E=this.Aa*ne;var se=this.ya*ne,he=this.scale*ne;te=Math.round(Math.round(y.x*he)-Math.round(a.x*he)),y=Math.round(Math.round(y.y*he)-Math.round(a.y*he)),he=this.jw,a=this.oy,he.width!==E&&(he.width=E),he.height!==se&&(he.height=se),a.clearRect(0,0,E,se),he=190*ne;var ge=70*ne,Se=Math.max(te,0),Ne=Math.max(y,0),Ge=Math.floor(E-Se),Je=Math.floor(se-Ne);a.drawImage(b.Oa,Se,Ne,Ge,Je,0,0,Ge,Je),zd(this.Yf,this)&&a.clearRect(0,0,he,ge),b=pn(),a=pn(),Je=Math.abs(te),Ge=Math.abs(y);var nt=Se===0?0:E-Je;Se=It.allocAt(nt,0),Je=It.allocAt(Je+nt,se),a.push(new wn(Math.min(Se.x,Je.x),Math.min(Se.y,Je.y),Math.abs(Se.x-Je.x),Math.abs(Se.y-Je.y)));var ct=this.Ab;if(ct.reset(),ct.scale(ne,ne),this.Ca!==1&&ct.scale(this.Ca),ne=this.pa,(ne.x!==0||ne.y!==0)&&isFinite(ne.x)&&isFinite(ne.y)&&ct.translate(-ne.x,-ne.y),bi(Se,ct),bi(Je,ct),b.push(new wn(Math.min(Se.x,Je.x),Math.min(Se.y,Je.y),Math.abs(Se.x-Je.x),Math.abs(Se.y-Je.y))),nt=Ne===0?0:se-Ge,Se.h(0,nt),Je.h(E,Ge+nt),a.push(new wn(Math.min(Se.x,Je.x),Math.min(Se.y,Je.y),Math.abs(Se.x-Je.x),Math.abs(Se.y-Je.y))),bi(Se,ct),bi(Je,ct),b.push(new wn(Math.min(Se.x,Je.x),Math.min(Se.y,Je.y),Math.abs(Se.x-Je.x),Math.abs(Se.y-Je.y))),zd(this.Yf,this)&&(E=0<te?0:-te,se=0<y?0:-y,Se.h(E,se),Je.h(he+E,ge+se),a.push(new wn(Math.min(Se.x,Je.x),Math.min(Se.y,Je.y),Math.abs(Se.x-Je.x),Math.abs(Se.y-Je.y))),bi(Se,ct),bi(Je,ct),b.push(new wn(Math.min(Se.x,Je.x),Math.min(Se.y,Je.y),Math.abs(Se.x-Je.x),Math.abs(Se.y-Je.y)))),It.free(Se),It.free(Je),Ec(this,!1,!0),this.Ka===null&&Yt("No div specified"),this.ta===null&&Yt("No canvas specified"),!this.animationManager.zb&&(E=this.ib,this.Fc)){for(iu(this),se=this.Mb,E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,this.Aa*se,this.ya*se),E.drawImage(this.jw.Oa,0<te?0:Math.round(-te),0<y?0:Math.round(-y)),te=this.pa,ne=this.Ca,he=Math.round(te.x*ne)/ne,ge=Math.round(te.y*ne)/ne,y=this.Ab,y.reset(),ne!==1&&y.scale(ne),te.x===0&&te.y===0||y.translate(-he,-ge),E.save(),E.beginPath(),te=a.length,ne=0;ne<te;ne++)he=a[ne],he.width!==0&&he.height!==0&&E.rect(Math.floor(he.x),Math.floor(he.y),Math.ceil(he.width),Math.ceil(he.height));for(E.clip(),E.setTransform(se,0,0,se,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),js(this,E),E.globalAlpha=this.pb,se=0;se<te;se++)if(ne=y[se],he=b,ne.visible&&ne.pb!==0){ge=vs(ne,E),Ne=ne.Zq,Ne.length=0,Se=this.scale,Ge=wn.alloc(),Je=ne.Pa.s,ct=Je.length,nt=he.length;for(var Ft=0;Ft<ct;Ft++){var Ot=Je[Ft],zt=Vd(Ot,Ot.actualBounds);e:{for(var Ht=2/Se,Wt=4/Se,Xt=0;Xt<nt;Xt++){var hn=he[Xt];if(hn.width!==0&&hn.height!==0&&zt.Vu(hn.x-Ht,hn.y-Ht,hn.width+Wt,hn.height+Wt)){zt=!0;break e}}zt=!1}zt&&ne.Oj(E,Ot,this,Ne,Se,Ge,!0)}wn.free(Ge),E.globalAlpha=ge}E.restore(),E.Vc(!0),this.Yf&&zd(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}On(b),On(a),this.ld=!1}}else this.bd();x&&(Ms(this),this.bd(),Kh(this,!0))}else x?(Ms(this),this.bd(),Kh(this,!0)):this.bd()}};function iu(a){a.pn!==!1&&(a.pn=!1,Dd(a,a.Aa,a.ya))}function Dd(a,y,x){lc(a);var b=a.Mb;a.ta.resize(y*b,x*b,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function Tc(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,se=a.Be?a.Db:0,he=E.clientWidth||x+ne,ge=E.clientHeight||b+se,Se=a.viewportBounds;E=Se.x;var Ne=Se.y,Ge=Se.width,Je=Se.height;if((he!==x+ne||ge!==b+se)&&(a.gf=!1,a.Be=!1,se=ne=0,a.Aa=he,a.ya=ge,te=a.pn=!0,lc(a)),!a.hf||!a.viewportBounds.w())return!0;var nt=a.ku,ct=a.hu;if(a.Ee=!1,!(te||a.gf||a.Be||a.mn||a.nn))return!0;var Ft=a.documentBounds,Ot=0,zt=0,Ht=0,Wt=0,Xt=Se.width,hn=Se.height,er=a.rj;a.contentAlignment.sb()?(Ft.width>Xt&&(Ot=er.left,zt=er.right),Ft.height>hn&&(Ht=er.top,Wt=er.bottom)):(Ot=er.left,zt=er.right,Ht=er.top,Wt=er.bottom);var cr=Ft.width+Ot+zt,sr=Ft.height+Ht+Wt;er=a.scale;var Wn=cr>he/er,An=sr>ge/er;if(!(te||a.gf||a.Be||Wn||An))return!0;Ot=Ft.x-Ot,he=Se.x,zt=Ft.right+zt,ge=Se.right+ne,Ht=Ft.y-Ht;var ei=Se.y;Ft=Ft.bottom+Wt,Se=Se.bottom+se;var Vr="1px";if(Wt="1px",a.scrollMode===xh&&(Wn||An)&&(Wn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Wn=1,Ot+1<he&&(Wn=Math.max((he-Ot)*er+a.Aa,Wn)),zt>ge+1&&(Wn=Math.max((zt-ge)*er+a.Aa,Wn)),Xt+ne+1<cr&&(Wn=Math.max((cr-Xt)*er+a.Aa,Wn)),Vr=Wn.toString()+"px"),An&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Wn=1,Ht+1<ei&&(Wn=Math.max((ei-Ht)*er+a.ya,Wn)),Ft>Se+1&&(Wn=Math.max((Ft-Se)*er+a.ya,Wn)),hn+se+1<sr&&(Wn=Math.max((sr-hn)*er+a.ya,Wn)),Wt=Wn.toString()+"px")),Wn=Vr!=="1px",An=Wt!=="1px",Wn&&An||!Wn&&!An||(An&&(ge-=a.Db),Wn&&(Se-=a.Db),cr<Xt+ne||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ne=1,Ot+1<he&&(ne=Math.max((he-Ot)*er+a.Aa,ne)),zt>ge+1&&(ne=Math.max((zt-ge)*er+a.Aa,ne)),Xt+1<cr&&(ne=Math.max((cr-Xt)*er+a.Aa,ne)),Vr=ne.toString()+"px"),Wn=Vr!=="1px",ne=a.ya,Wn!==a.Be&&(ne=Wn?a.ya-a.Db:a.ya+a.Db),sr<hn+se||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(se=1,Ht+1<ei&&(se=Math.max((ei-Ht)*er+ne,se)),Ft>Se+1&&(se=Math.max((Ft-Se)*er+ne,se)),hn+1<sr&&(se=Math.max((sr-hn)*er+ne,se)),Wt=se.toString()+"px"),An=Wt!=="1px"),a.qr&&Wn===a.Be&&An===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if(Wn!==a.Be&&(Vr==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),te=!0),a.Be=Wn,ct.style.width=Vr,An!==a.gf&&(Wt==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),te=!0,a.tn&&(se=It.alloc(),An?(y.style.left=a.Db+"px",a.position=se.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=se.h(a.pa.x-a.Db/a.scale,a.pa.y)),It.free(se))),te&&lc(a),a.gf=An,ct.style.height=Wt,a.gu=!0,te&&(a.pn=!0),y=nt.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Xt+1<cr?y=(a.position.x-Ot)*er:Ot+1<he?y=nt.scrollWidth-nt.clientWidth:zt>ge+1&&(y=a.position.x*er)),a.tn)switch(a.bu){case"negative":y=-(nt.scrollWidth-y-nt.clientWidth);break;case"reverse":y=nt.scrollWidth-y-nt.clientWidth}return nt.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(hn+1<sr?nt.scrollTop=(a.position.y-Ht)*er:Ht+1<ei?nt.scrollTop=nt.scrollHeight-nt.clientHeight:Ft>Se+1&&(nt.scrollTop=a.position.y*er)),he=a.Aa,ge=a.ya,nt.style.width=he+(a.gf?a.Db:0)+"px",nt.style.height=ge+(a.Be?a.Db:0)+"px",x!==he||b!==ge||a.animationManager.zb?(x=wn.allocAt(E,Ne,Ge,Je),a.onViewportBoundsChanged(x,a.viewportBounds,er,te),wn.free(x),!1):!0}ot=cn.prototype,ot.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&Yt("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&&Yt('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(sa,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},ot.oi=function(a){this.partManager.oi(a);var y=this;Ud(a,function(x){Fd(y,x)}),(a instanceof Ui||a instanceof ni&&a.placeholder!==null)&&a.v(),a.data!==null&&Ud(a,function(x){ly(y.partManager,x)}),Us(a)!==!0&&ed(a)!==!0||this.De.add(a),R1(a,!0,this),z1(a)?(a.actualBounds.w()&&this.N(Vd(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Vd(a,a.actualBounds)),this.$b()},ot.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&Ud(a,function(x){uy(y.partManager,x,y)}),this.De.remove(a),z1(a)?(a.actualBounds.w()&&this.N(Vd(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Vd(a,a.actualBounds)),this.$b()},ot.remove=function(a){Zh(this,a,!0)};function Zh(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(La,"parts",b,y,null,x,null),a=y.layerChanged,a!==null&&a(y,b,null))}ot.Is=function(a,y){if(y===void 0&&(y=!1),Mn(a))for(var x=a.length,b=0;b<x;b++){var E=a[b];y&&!E.canDelete()||this.remove(E)}else for(x=new Nn,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},ot.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},cn.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 ur;if(a!==null)if(Mn(a))for(var te=0;te<a.length;te++)mu(this,E,a[te],x,b);else for(a=a.iterator;a.next();)mu(this,E,a.value,x,b);else{for(a=this.parts;a.next();)mu(this,E,a.value,x,b);for(a=this.nodes;a.next();)mu(this,E,a.value,x,b);for(a=this.links;a.next();)mu(this,E,a.value,x,b)}ac(this,E,y,b,x)}};function mu(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 nr){if(y.add(x,a.Pd(E,x,x.location)),x instanceof ni&&(x.placeholder!==null||E.dragsMembers))for(te=x.memberParts;te.next();)mu(a,y,te.value,b,E,E.groupsAlwaysMove);for(te=x.linksConnected;te.next();){var ne=te.value;if(!y.contains(ne)){var se=ne.fromNode,he=ne.toNode;se!==null&&y.contains(se)&&he!==null&&y.contains(he)&&mu(a,y,ne,b,E)}}if(E.dragsTree)for(x=x.Ou();x.next();)mu(a,y,x.value,b,E)}else if(x instanceof Vn)for(y.add(x,a.Pd(E,x)),x=x.labelNodes;x.next();)mu(a,y,x.value,b,E);else x instanceof Ui||y.add(x,a.Pd(E,x,x.location))}function ac(a,y,x,b,E){if(y!==null&&y.count!==0){var te=It.alloc(),ne=It.alloc();ne.assign(x),isNaN(ne.x)&&(ne.x=0),isNaN(ne.y)&&(ne.y=0),(x=a.Mr)||Jf(a,y);for(var se=pn(),he=pn(),ge=y.iterator,Se=It.alloc();ge.next();){var Ne=ge.key,Ge=ge.value;if(Ne.Zc()){var Je=Vp(a,Ne,y);Je!==null?se.push(new oe(Ne,Ge,Je)):(!E||Ne.canMove())&&(Je=Ge.point,te.assign(Je),a.computeMove(Ne,te.add(ne),b,Se),Ne.location=Se,Ge.shifted===void 0&&(Ge.shifted=new It),Ge.shifted.assign(Se.re(Je)))}else ge.key instanceof Vn&&he.push(ge.sa)}for(It.free(Se),E=se.length,ge=0;ge<E;ge++)Ne=se[ge],te.assign(Ne.info.point),Ne.Su.shifted===void 0&&(Ne.Su.shifted=new It),Ne.node.location=te.add(Ne.Su.shifted);for(E=It.alloc(),ge=It.alloc(),Ne=he.length,Ge=0;Ge<Ne;Ge++){var nt=he[Ge];if(Je=nt.key,Je instanceof Vn)if(Je.suspendsRouting){Je.Tg=null,Se=Je.fromNode;var ct=Je.toNode;if(a.draggedLink!==null&&b.dragsLink)if(ct=nt.value.point,Je.dragComputation===null)y.add(Je,a.Pd(b,Je,ne)),Lh(Je,ne.x-ct.x,ne.y-ct.y);else{nt=It.allocAt(0,0),(Se=Je.i(0))&&Se.w()&&nt.assign(Se);var Ft=Se=It.alloc().assign(nt).add(ne);b.isGridSnapEnabled&&(b.isGridSnapRealtime||a.lastInput.up)&&(Ft=It.alloc(),Yf(a,Je,Se,Ft,b)),Se.assign(Je.dragComputation(Je,Se,Ft)).re(nt),y.add(Je,a.Pd(b,Je,Se)),Lh(Je,Se.x-ct.x,Se.y-ct.y),It.free(nt),It.free(Se),Ft!==Se&&It.free(Ft)}else Se!==null&&(E.assign(Se.location),Ft=y.I(Se),Ft!==null&&E.re(Ft.point)),ct!==null&&(ge.assign(ct.location),Ft=y.I(ct),Ft!==null&&ge.re(Ft.point)),Se!==null&&ct!==null?E.Xa(ge)?(Se=nt.value.point,ct=te,ct.assign(E),ct.re(Se),y.add(Je,a.Pd(b,Je,E)),Lh(Je,ct.x,ct.y)):(Je.suspendsRouting=!1,Je.bb()):(nt=nt.value.point,Se=Se!==null?E:ct!==null?ge:ne,y.add(Je,a.Pd(b,Je,Se)),Lh(Je,Se.x-nt.x,Se.y-nt.y))}else(Je.fromNode===null||Je.toNode===null)&&(Se=nt.value.point,y.add(Je,a.Pd(b,Je,ne)),Lh(Je,ne.x-Se.x,ne.y-Se.y))}It.free(te),It.free(ne),It.free(E),It.free(ge),On(se),On(he),x||(cs(a),Xh(a,y))}}cn.prototype.computeMove=function(a,y,x,b){if(b===void 0&&(b=new It),b.assign(y),a===null)return b;var E=y,te=x.isGridSnapEnabled;te&&(x.isGridSnapRealtime||this.lastInput.up)&&(E=It.alloc(),Yf(this,a,y,E,x)),x=a.dragComputation!==null?a.dragComputation(a,y,E):E;var ne=a.minLocation,se=ne.x;isNaN(se)&&(se=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 he=a.maxLocation,ge=he.x;return isNaN(ge)&&(ge=te?Math.round(1e3*a.location.x)/1e3:a.location.x),he=he.y,isNaN(he)&&(he=te?Math.round(1e3*a.location.y)/1e3:a.location.y),b.h(Math.max(se,Math.min(x.x,ge)),Math.max(ne,Math.min(x.y,he))),E!==y&&It.free(E),b};function Xf(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function Yf(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,se=ne.x;if(ne=ne.y,E=E.gridSnapCellSpot,te!==null){var he=te.gridCellSize;isNaN(a)&&(a=he.width),isNaN(y)&&(y=he.height),te=te.gridOrigin,isNaN(se)&&(se=te.x),isNaN(ne)&&(ne=te.y)}te=It.allocAt(0,0),te.yi(0,0,a,y,E),qt.No(x.x,x.y,se+te.x,ne+te.y,a,y,b),It.free(te)}}function Jf(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof Vn&&(y.suspendsRouting=!0)}function Xh(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof Vn&&(x.suspendsRouting=!1,Zv(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}ot=cn.prototype,ot.Pd=function(a,y,x){if(x===void 0)return new Qc(Ei);var b=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(b=!1),b?new Qc(new It(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new Qc(x.copy())};function Zp(a,y,x){if(y.diagram!==null&&y.diagram!==a&&Yt("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&Yt("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&Yt("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&Yt("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&&Yt("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}ot.Al=function(a){Zp(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(sa,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},ot.Ww=function(a,y){Zp(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(La,"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(sa,"layers",this,null,a,null,te),this.N(),0>b&&this.Ya(),this},ot.Cy=function(a,y){Zp(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(La,"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(sa,"layers",this,null,a,null,te+1),this.N(),0>b&&this.Ya(),this},ot.kA=function(a){if(a.diagram!==this&&Yt("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(La,"layers",this,a,null,x,null),this.N(),this.Ya()}}},ot.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},ot.Yw=function(a){return this.pf===null&&(this.pf=new Ln),this.pf.add(a),this.model.Pe(a),this},ot.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},ot.Pe=function(a){return this.zg===null&&(this.zg=new Ln),this.zg.add(a),this},ot.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},ot.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==il&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,b=0;b<x;b++)y.M(b)(a)},ot.cb=function(a,y,x,b,E,te,ne){te===void 0&&(te=null),ne===void 0&&(ne=null);var se=new _o;se.diagram=this,se.change=a,se.propertyName=y,se.object=x,se.oldValue=b,se.oldParam=te,se.newValue=E,se.newParam=ne,this.ds(se)},ot.g=function(a,y,x,b,E){this.cb(zo,a,this,y,x,b,E)},cn.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===zo){var E=a.object;if(Ao(E,a.propertyName,a.I(y)),E instanceof Jt){var te=E.part;te!==null&&te.Wb()}this.isModified=!0}else if(b===sa){var ne=a.object,se=a.newParam,he=a.newValue;if(ne instanceof Un)if(typeof se=="number"&&he instanceof Jt){y?ne.pc(se):ne.Gb(se,he);var ge=ne.part;ge!==null&&ge.Wb()}else typeof se=="number"&&he instanceof ja&&(he.isRow?h1(ne,se,y?void 0:he):d1(ne,se,y?void 0:he));else if(ne instanceof $o){var Se=a.oldParam===!0;typeof se=="number"&&he instanceof Mr&&(y?(he.isSelected=!1,he.isHighlighted=!1,he.Wb(),ne.pc(Se?se:-1,he,Se)):ne.oi(se,he,Se))}else ne instanceof cn?typeof se=="number"&&he instanceof $o&&(y?this.Wa.mb(se):(he.Xe(this),this.Wa.Gb(se,he))):Yt("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(b===La){var Ne=a.object,Ge=a.oldParam,Je=a.oldValue;if(Ne instanceof Un)typeof Ge=="number"&&Je instanceof Jt?y?Ne.Gb(Ge,Je):Ne.pc(Ge):typeof Ge=="number"&&Je instanceof ja&&(Je.isRow?h1(Ne,Ge,y?Je:void 0):d1(Ne,Ge,y?Je:void 0));else if(Ne instanceof $o){var nt=a.newParam===!0;typeof Ge=="number"&&Je instanceof Mr&&(y?0>Ne.Pa.indexOf(Je)&&Ne.oi(Ge,Je,nt):(Je.isSelected=!1,Je.isHighlighted=!1,Je.Wb(),Ne.pc(nt?Ge:-1,Je,nt)))}else Ne instanceof cn?typeof Ge=="number"&&Je instanceof $o&&(y?(Je.Xe(this),this.Wa.Gb(Ge,Je)):this.Wa.mb(Ge)):Yt("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==il&&Yt("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},cn.prototype.Ea=function(a){return this.undoManager.Ea(a)},cn.prototype.eb=function(a){return this.undoManager.eb(a)},cn.prototype.Kf=function(){return this.undoManager.Kf()},cn.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}},cn.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},cn.prototype.rp=function(){this.partManager.rp()};function Xp(a,y,x){var b=a.animationManager;if(a.vb||a.ld)a.Ca=x,lc(a),a.N(),a.Ee=!0,b.zb&&(ps(b)||b.ce.add(b.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,lc(a);else{a.vb=!0;var E=a.viewportBounds.copy(),te=a.Aa,ne=a.ya,se=a.zoomPoint.x,he=a.zoomPoint.y,ge=a.contentAlignment;isNaN(se)&&(ge.$c()?ge.Hf(Ru)?se=0:ge.Hf(zs)&&(se=te-1):se=ge.sb()?ge.x*(te-1):te/2),isNaN(he)&&(ge.$c()?ge.Hf(Eu)?he=0:ge.Hf(dl)&&(he=ne-1):he=ge.sb()?ge.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=It.allocAt(a.pa.x+se/y-se/x,a.pa.y+he/y-he/x),a.position=te,It.free(te),a.Ca=x,lc(a),a.vb=!1,a.onViewportBoundsChanged(E,a.viewportBounds,y,!1),Ul(a,!1),b.zb&&(ps(b)||b.ce.add(b.H,"scale",y,a.Ca))}}cn.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!==Is||a.width===y.width&&a.height===y.height||E.C(),E=this.currentTool,this.Vk===!0&&E instanceof Do&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Uf(E,this)),this.vb||this.invalidateViewport(a,y),sc(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 sc(a,y){var x=a.fe;if(x!==null&&x.visible){for(var b=Zn.alloc(),E=1,te=1,ne=x.O.s,se=ne.length,he=0;he<se;he++){var ge=ne[he],Se=Math.abs(ge.interval);2>Se||(mv(ge.figure)?te=te*Se/qt.vx(te,Se):E=E*Se/qt.vx(E,Se))}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=wn.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){wn.free(y);return}E=y.width,te=y.height,a=y.x,ne=y.y,wn.free(y)}x.width=E+2*b.width,x.height=te+2*b.height,y=It.alloc(),qt.No(a,ne,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),Zn.free(b),x.part.location=y,It.free(y)}}cn.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)}},cn.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))},cn.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),Mn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];b instanceof Mr||Yt("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 Mr||Yt("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},cn.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()}},ot=cn.prototype,ot.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},ot.Jz=function(a){a=new Nn().addAll(a);for(var y=this.highlighteds.copy().hp(a).iterator;y.next();)y.value.isHighlighted=!1;for(a=a.iterator;a.next();)y=a.value,y instanceof Mr||Yt("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},ot.scroll=function(a,y,x){x===void 0&&(x=1);var b=y==="up"||y==="down",E=0,te=It.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)),It.free(te);return}Yt("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):Yt("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),It.free(te)},ot.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)},ot.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},ot.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)},ot.zA=function(a){var y=this.Ab,x=a.x,b=a.y,E=x+a.width,te=b+a.height,ne=y.m11,se=y.m12,he=y.m21,ge=y.m22,Se=y.dx,Ne=y.dy,Ge=x*ne+b*he+Se;y=x*se+b*ge+Ne;var Je=E*ne+b*he+Se;return a=E*se+b*ge+Ne,b=x*ne+te*he+Se,x=x*se+te*ge+Ne,ne=E*ne+te*he+Se,E=E*se+te*ge+Ne,te=Math.min(Ge,Je),Ge=Math.max(Ge,Je),Je=Math.min(y,a),y=Math.max(y,a),te=Math.min(te,b),Ge=Math.max(Ge,b),Je=Math.min(Je,x),y=Math.max(y,x),te=Math.min(te,ne),Ge=Math.max(Ge,ne),Je=Math.min(Je,E),y=Math.max(y,E),new wn(te,Je,Ge-te,y-Je)},ot.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),bi(a.copy(),this.Ab)};function om(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function Yp(a){return a=rp.get(a),a!==null?new a:new so}cn.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,b=a.propertyName;if(x===il&&b[0]==="S")if(b==="StartingFirstTransaction"){var E=this;a=this.toolManager,a.mouseDownTools.each(function(he){return he.diagram=E}),a.mouseMoveTools.each(function(he){return he.diagram=E}),a.mouseUpTools.each(function(he){return he.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===il){(b==="FinishedUndo"||b==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),cs(this));var te=this.animationManager;b==="RolledBackTransaction"&&te.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||ts(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(),ra(this.animationManager)),!this.Rt&&ne&&this.lastInput.targetDiagram){this.Rt=!0;var se=this;ir(function(){se.currentTool.standardMouseOver(),se.Rt=!1},10)}}}finally{this.aa=!0}}}};function Fd(a,y){y=y.O.s;for(var x=y.length,b=0;b<x;b++)Yh(a,y[b])}function Yh(a,y){if(y instanceof ul){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof Nn&&x.Bg.add(a);var b=y.Eg;if(b!==null&&b.sq===!0&&y.diagram!==null&&y.diagram.Xn.add(y),x.hn)if(x=x.getAttribute("src")||"",b=a.Og.I(x),b===null)b=[],b.push(y),a.Og.add(x,b);else{for(a=0;a<b.length;a++)if(b[a]===y)return;b.push(y)}}}}function Jp(a,y){if(y instanceof ul){var x=y.element;if(x!==null&&x instanceof HTMLImageElement&&x.hn){var b=x.getAttribute("src")||"",E=a.Og.I(b);if(E!==null){for(var te=0;te<E.length;te++)if(E[te]===y){E.splice(te,1),E.length===0&&(a.Og.remove(b),x.Fq&&x.removeEventListener("load",x.Fq),x.Yp&&x.removeEventListener("error",x.Yp),delete x.Fq,delete x.Yp,x.Bg instanceof Nn&&x.Bg.remove(a),mp(b));break}}}}}cn.prototype.Wd=function(){this.partManager.Wd()},cn.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},cn.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},cn.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},cn.prototype.Vb=function(a){return this.partManager.Vb(a)},cn.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},ot=cn.prototype,ot.Lc=function(a){return this.partManager.Lc(a)},ot.ii=function(a){return this.partManager.ii(a)},ot.Kc=function(a){return this.partManager.Kc(a)},ot.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:Ri(Yr(y)))},ot.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:Ri(Yr(y)))};function lc(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),Ul(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}ot.Va=function(){if(this.Zi){var a=wn.alloc();Qp(this,this.computeBounds(a)),wn.free(a)}},ot.rz=function(){for(var a=new Nn,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&a.add(x)}for(y=this.links;y.next();)x=y.value,x.isTopLevel&&a.add(x);return a.iterator},ot.qz=function(){return this.ai.iterator},ot.Uz=function(a){cs(this),a&&Qf(this,!0),this.ld?qp(this,!1):(this.Jk=!0,ol(this))};function Qf(a,y){for(var x=a.ai.iterator;x.next();)am(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function am(a,y,x){if(y!==null){for(var b=y.gl.iterator;b.next();)am(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||Ps(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),cs(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||ts(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),qo(a,y),E.isValidLayout=!0):a.xh=!0)}}ot.yz=function(){for(var a=new Ln,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 Ln;x.add(E,ne),x.add(te,ne),b.add(E,E),b.add(te,E)}var x=new ur,b=new ur;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 sm(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function qf(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;Yt("Unknown DiagramEvent name: "+y)}ot.Bj=function(a,y){return a=qf(this,a),a!==null&&a.add(y),this},ot.am=function(a,y){a=qf(this,a),a!==null&&a.remove(y)},ot.R=function(a,y,x){var b=qf(this,a),E=new Kc;if(E.diagram=this,a=sm(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 ep(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}ot.Yj=function(a,y){return tp(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},cn.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?kd(this,a):a.assign(this.documentBounds)};function tp(a,y,x,b){var E=a.Xh;if(E===null&&(a.Xh=E=new kg(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=wn.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),E.initialize(y);for(var te=a.nodes;te.next();){var ne=te.value,se=ne.layer;se!==null&&se.visible&&!se.isTemporary&&np(a,ne,b,y)}wn.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),E.initialize(y)),y=wn.alloc(),te=x.memberParts;te.next();)ne=te.value,ne instanceof nr&&np(a,ne,b,y);wn.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 np(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(bp(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(Oh,x,y+1);else for(var ne=x;ne<=y;ne++)te[ne]=Oh}else if(y instanceof ni)for(y=y.memberParts;y.next();)E=y.value,E instanceof nr&&np(a,E,x,b)}}function Sh(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}cn.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=ir(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=wn.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Qp(a,y),wn.free(y),a.Fc=!0,a.bd(),tg(a))}},a.vp))}cn.prototype.ug=function(){this.vk!==-1&&(Gt.clearTimeout(this.vk),this.vk=-1)},cn.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=wn.allocAt(0,0,b.width*E,b.height*E);var te=It.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(Ei)||(y=new It(y.x+te.x/E,y.y+te.y/E)),wn.free(b),It.free(te),y},ot=cn.prototype,ot.Cs=function(){return null},ot.av=function(){return null},ot.bs=function(a,y){this.pj.add(a,y)},ot.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof ni&&(y.$p=null)})};function gf(a,y,x){function b(){var Se=+new Date;for(te=!0,ne.reset();ne.next();)if(!ne.value[0].al){te=!1;break}te||Se-ge>he?y(x,E,se):Gt.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 se=a,he=x.callbackTimeout||300,ge=+new Date;return Gt.requestAnimationFrame(function(){b()}),null}ot.Wz=function(a){return na?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},ot.Jx=function(a){return a===void 0&&(a={}),gf(this,this.Xz,a)},ot.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"&&Yt('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"&&Yt("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 Zn(1/0,1/0):new Zn(2e3,2e3));var se=y.position||null,he=y.parts||null,ge=y.padding===void 0?1:y.padding,Se=y.background||null,Ne=y.omitTemporary;Ne===void 0&&(Ne=!0);var Ge=y.document||document,Je=y.elementFinished||null,nt=y.showTemporary;nt===void 0&&(nt=!Ne),y=y.showGrid,y===void 0&&(y=nt),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof ge=="number"?ge=new kr(ge):ge instanceof kr||Yt("MakeImage padding must be a Margin or a number."),ge.left=Math.max(ge.left,0),ge.right=Math.max(ge.right,0),ge.top=Math.max(ge.top,0),ge.bottom=Math.max(ge.bottom,0),a.ib.Vc(!0),Ne=new yu(null,Ge,void 0,!0);var ct=Ne.context;if(!(E||te||he||se))return Ne.width=a.Aa+Math.ceil(ge.left+ge.right),Ne.height=a.ya+Math.ceil(ge.top+ge.bottom),x==="SVG"?b===null?null:(b.resize(Ne.width,Ne.height,Ne.width,Ne.height),b.ownerDocument=Ge,b.hs=Je,Ta(a,b.context,ge,new Zn(Ne.width,Ne.height),a.Ca,a.pa,he,Se,nt,y),b.context):(a.Xm=!1,Ta(a,ct,ge,new Zn(Ne.width,Ne.height),a.Ca,a.pa,he,Se,nt,y),a.Xm=!0,Ne.context);var Ft=a.Pp,Ot=a.documentBounds.copy();if(Ot.Fv(a.yb),nt)for(var zt=a.Wa.s,Ht=zt.length,Wt=0;Wt<Ht;Wt++){var Xt=zt[Wt];if(Xt.visible&&Xt.isTemporary){Xt=Xt.Pa.s;for(var hn=Xt.length,er=0;er<hn;er++){var cr=Xt[er];cr.isInDocumentBounds&&cr.isVisible()&&(cr=cr.actualBounds,cr.w()&&Ot.ed(cr))}}}if(zt=new It(Ot.x,Ot.y),he!==null){for(Ht=new wn(0,0,0,0),Wt=!0,Xt=he.iterator,Xt.reset();Xt.next();)hn=Xt.value,hn instanceof Mr&&(er=hn.layer,er!==null&&!er.visible||er!==null&&!nt&&er.isTemporary||!hn.isVisible()||(hn=hn.actualBounds,hn.w()&&(Wt?(Wt=!1,Ht.assign(hn)):Ht.ed(hn))));Ot.width=Ht.width,Ot.height=Ht.height,zt.x=Ht.x,zt.y=Ht.y}return se!==null&&se.w()&&(zt=se,te||(te=Ft)),Ht=se=0,ge!==null&&(se=ge.left+ge.right,Ht=ge.top+ge.bottom),Wt=Xt=0,E!==null&&(Xt=E.width,Wt=E.height,isFinite(Xt)&&(Xt=Math.max(0,Xt-se)),isFinite(Wt)&&(Wt=Math.max(0,Wt-Ht))),E!==null&&te!==null?(te==="NaN"&&(te=Ft),E.w()?(E=Xt,Ot=Wt):isNaN(Wt)?(E=Xt,Ot=Ot.height*te):(E=Ot.width*te,Ot=Wt)):E!==null?E.w()?(te=Math.min(Xt/Ot.width,Wt/Ot.height),E=Xt,Ot=Wt):isNaN(Wt)?(te=Xt/Ot.width,E=Xt,Ot=Ot.height*te):(te=Wt/Ot.height,E=Ot.width*te,Ot=Wt):te!==null?te==="NaN"&&ne.w()?(te=Math.min((ne.width-se)/Ot.width,(ne.height-Ht)/Ot.height),te>Ft?(te=Ft,E=Ot.width,Ot=Ot.height):(E=ne.width,Ot=ne.height)):(E=Ot.width*te,Ot=Ot.height*te):(te=Ft,E=Ot.width,Ot=Ot.height),ge!==null?(E+=se,Ot+=Ht):ge=new kr(0),ne!==null&&(Ft=ne.width,ne=ne.height,isNaN(Ft)&&(Ft=2e3),isNaN(ne)&&(ne=2e3),isFinite(Ft)&&(E=Math.min(E,Ft)),isFinite(ne)&&(Ot=Math.min(Ot,ne))),Ne.width=Math.ceil(E),Ne.height=Math.ceil(Ot),x==="SVG"?b===null?null:(b.resize(Ne.width,Ne.height,Ne.width,Ne.height),b.ownerDocument=Ge,b.hs=Je,Ta(a,b.context,ge,new Zn(Math.ceil(E),Math.ceil(Ot)),te,zt,he,Se,nt,y),b.context):(a.Xm=!1,Ta(a,ct,ge,new Zn(Math.ceil(E),Math.ceil(Ot)),te,zt,he,Se,nt,y),a.Xm=!0,Ne.context)}Ut.Object.defineProperties(cn.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof Be||(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 uc(this,Gt.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 uc(this,Gt.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(Gt,"resize",this.Ov,!1),this.removeEventListener(Gt,"wheel",this.$j,!0),Vu===this&&(Vu=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),Md(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)&&Qn(a,"0 <= value <= 1",cn,"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),Ul(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),Ul(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),Ul(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),Ul(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&Qn(a,">= 0",cn,"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&&Qn(a,">= 0",cn,"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 Qn(a,">= 0",cn,"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&&Yt("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=gh(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var b=this.vb;this.vb=!0,Ps(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=Yp(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(Gt,"pointermove",this.dk,!0),this.addEventListener(Gt,"pointerdown",this.ui,!0),this.addEventListener(Gt,"pointerup",this.fk,!0),this.addEventListener(Gt,"pointerout",this.ek,!0),this.addEventListener(Gt,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(Gt,"wheel",this.$j,!0),this.addEventListener(Gt,"selectstart",this.preventDefault,!1)):(this.removeEventListener(Gt,"pointermove",this.dk,!0),this.removeEventListener(Gt,"pointerdown",this.ui,!0),this.removeEventListener(Gt,"pointerup",this.fk,!0),this.removeEventListener(Gt,"pointerout",this.ek,!0),this.removeEventListener(Gt,"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(Gt,"wheel",this.$j,!0),this.removeEventListener(Gt,"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=It.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),gs(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?lc(this):(this.vb=!0,a=this.scale,pf(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)}It.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=df(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=df(this)),a.type!==Un.Grid&&Yt("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),sc(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),lc(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||Yt("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 kr(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===xh&&Ul(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,Ul(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,Xp(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&&Xp(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!==Is&&Ul(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()||Yt("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()||Yt("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)):Qn(a,"> 0",cn,"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)):Qn(a,"> 0",cn,"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),Ul(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 kr(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&&Yt("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!==wh&&a!==Na&&a!==ip&&Yt("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 Zn(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 kr(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),Ut.Object.defineProperties(cn,{licenseKey:{get:function(){return sg.jc()},set:function(a){sg.add(a.replace(/\s/g,""))}},version:{get:function(){return Rd}}}),cn.prototype.makeImageData=cn.prototype.Jx,cn.prototype.makeImage=cn.prototype.Wz,cn.prototype.cacheGroupExternalLinks=cn.prototype.Fu,cn.prototype.addRenderer=cn.prototype.bs,cn.prototype.makeSVG=cn.prototype.av,cn.prototype.makeSvg=cn.prototype.Cs,cn.prototype.stopAutoScroll=cn.prototype.ug,cn.prototype.doAutoScroll=cn.prototype.gs,cn.prototype.isUnoccupied=cn.prototype.Yj,cn.prototype.raiseDiagramEvent=cn.prototype.R,cn.prototype.removeDiagramListener=cn.prototype.am,cn.prototype.addDiagramListener=cn.prototype.Bj,cn.prototype.findTreeRoots=cn.prototype.yz,cn.prototype.layoutDiagram=cn.prototype.Uz,cn.prototype.findTopLevelGroups=cn.prototype.qz,cn.prototype.findTopLevelNodesAndLinks=cn.prototype.rz,cn.prototype.ensureBounds=cn.prototype.Va,cn.prototype.findLinksByExample=cn.prototype.ls,cn.prototype.findNodesByExample=cn.prototype.ms,cn.prototype.findLinkForData=cn.prototype.Kc,cn.prototype.findNodeForData=cn.prototype.ii,cn.prototype.findPartForData=cn.prototype.Lc,cn.prototype.findLinkForKey=cn.prototype.findLinkForKey,cn.prototype.findNodeForKey=cn.prototype.Vb,cn.prototype.findPartForKey=cn.prototype.findPartForKey,cn.prototype.rebuildParts=cn.prototype.Wd,cn.prototype.transformViewToDoc=cn.prototype.Ps,cn.prototype.transformRectDocToView=cn.prototype.zA,cn.prototype.transformDocToView=cn.prototype.op,cn.prototype.centerRect=cn.prototype.es,cn.prototype.scrollToRect=cn.prototype.tv,cn.prototype.scroll=cn.prototype.scroll,cn.prototype.highlightCollection=cn.prototype.Jz,cn.prototype.highlight=cn.prototype.Iz,cn.prototype.selectCollection=cn.prototype.rA,cn.prototype.select=cn.prototype.select,cn.prototype.updateAllRelationshipsFromData=cn.prototype.rp,cn.prototype.updateAllTargetBindings=cn.prototype.updateAllTargetBindings,cn.prototype.commit=cn.prototype.commit,cn.prototype.rollbackTransaction=cn.prototype.Kf,cn.prototype.commitTransaction=cn.prototype.eb,cn.prototype.startTransaction=cn.prototype.Ea,cn.prototype.raiseChanged=cn.prototype.g,cn.prototype.raiseChangedEvent=cn.prototype.cb,cn.prototype.removeChangedListener=cn.prototype.ik,cn.prototype.addChangedListener=cn.prototype.Pe,cn.prototype.removeModelChangedListener=cn.prototype.mA,cn.prototype.addModelChangedListener=cn.prototype.Yw,cn.prototype.findLayer=cn.prototype.Qj,cn.prototype.removeLayer=cn.prototype.kA,cn.prototype.addLayerAfter=cn.prototype.Cy,cn.prototype.addLayerBefore=cn.prototype.Ww,cn.prototype.addLayer=cn.prototype.Al,cn.prototype.moveParts=cn.prototype.moveParts,cn.prototype.copyParts=cn.prototype.Kj,cn.prototype.removeParts=cn.prototype.Is,cn.prototype.remove=cn.prototype.remove,cn.prototype.add=cn.prototype.add,cn.prototype.clearDelayedGeometries=cn.prototype.bx,cn.prototype.setProperties=cn.prototype.nm,cn.prototype.attach=cn.prototype.Du,cn.prototype.set=cn.prototype.set,cn.prototype.resetInputOptions=cn.prototype.Sx,cn.prototype.setInputOption=cn.prototype.sA,cn.prototype.getInputOption=cn.prototype.Ql,cn.prototype.resetRenderingHints=cn.prototype.Tx,cn.prototype.setRenderingHint=cn.prototype.Xx,cn.prototype.getRenderingHint=cn.prototype.Gf,cn.prototype.maybeUpdate=cn.prototype.bd,cn.prototype.requestUpdate=cn.prototype.$b,cn.prototype.delayInitialization=cn.prototype.Xy,cn.prototype.isUpdateRequested=cn.prototype.Pz,cn.prototype.invalidateDocumentBounds=cn.prototype.Ya,cn.prototype.findObjectsNear=cn.prototype.og,cn.prototype.findPartsNear=cn.prototype.mz,cn.prototype.findObjectsIn=cn.prototype.Cf,cn.prototype.findPartsIn=cn.prototype.ux,cn.prototype.findObjectsAt=cn.prototype.ji,cn.prototype.findPartsAt=cn.prototype.lz,cn.prototype.findObjectAt=cn.prototype.ic,cn.prototype.findPartAt=cn.prototype.Ol,cn.prototype.focusObject=cn.prototype.zz,cn.prototype.alignDocument=cn.prototype.Jy,cn.prototype.zoomToRect=cn.prototype.BA,cn.prototype.zoomToFit=cn.prototype.zoomToFit,cn.prototype.diagramScroll=cn.prototype.kx,cn.prototype.focus=cn.prototype.focus;var rp=new ur,cm=null,na=Gt.document!==void 0,Bd=null,Jh="",Is=new tn(cn,"None",0),Kl=new tn(cn,"Uniform",1),Qh=new tn(cn,"UniformToFill",2),mf=new tn(cn,"CycleAll",10),ng=new tn(cn,"CycleNotDirected",11),rg=new tn(cn,"CycleNotDirectedFast",12),ig=new tn(cn,"CycleNotUndirected",13),og=new tn(cn,"CycleDestinationTree",14),ag=new tn(cn,"CycleSourceTree",15),xh=new tn(cn,"DocumentScroll",1),vf=new tn(cn,"InfiniteScroll",2),wh=new tn(cn,"TreeParentCollapsed",21),Na=new tn(cn,"AllParentsCollapsed",22),ip=new tn(cn,"AnyParentsCollapsed",23),sg=new Ln,Rd="2.3.10",_d="image",yf=null,hm=!1;function Ls(){if(na){var a=Gt.document.createElement("canvas"),y=a.getContext("2d"),x=Yn("7ca11abfd022028846");y[x]=Yn("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",Cn.Dx+"4ae6247590da4bb21c324ba3a84e385776",fi.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",qt.za],E=1;5>E;E++)y[Yn("7ca11abfd7330390")](Yn(b[E-1]),10,15*E);for(y[x]=Yn("39f046ebb36e4b"),x=1;5>x;x++)y[Yn("7ca11abfd7330390")](Yn(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(fi.prototype.Cd=fi.prototype.Eu),yf=a}}cn.className="Diagram",cn.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=Gt.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof cn?y.H:null},cn.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},cn.useDOM=function(a){na=a?Gt.document!==void 0:!1},cn.isUsingDOM=function(){return na},cn.None=Is,cn.Uniform=Kl,cn.UniformToFill=Qh,cn.CycleAll=mf,cn.CycleNotDirected=ng,cn.CycleNotDirectedFast=rg,cn.CycleNotUndirected=ig,cn.CycleDestinationTree=og,cn.CycleSourceTree=ag,cn.DocumentScroll=xh,cn.InfiniteScroll=vf,cn.TreeParentCollapsed=wh,cn.AllParentsCollapsed=Na,cn.AnyParentsCollapsed=ip;function dm(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function zd(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=Gt[Yn("76a715b2f73f148a")][Yn("72ba13b5")]||"";if(a.Rc=!0,na){var b=cn[Yn("76a115b6ed251eaf4692")];if(b)for(var E=sg.iterator;E.next()&&(b=E.value,b=Yn(b).split(Yn("39e9")),!(6>b.length));){var te=Yn(b[1]).split(".");if(b[4]!=="7da71ca0")break;var ne=Yn(Cn[Yn("6cae19")]).split(".");if(te[0]>ne[0]||te[0]===ne[0]&&te[1]>=ne[1]){var se=Gt[Yn("74a900bae4370f8b51")][Yn("6fbb13a1c2311e8a57")].toLowerCase();if(ne=se[Yn("73a612b6fb191d")](Yn("3aad1ab6e022098b4dc4")),te=Yn(b[2]),-1<ne&&(se=se[Yn("73a612b6fb191d")](te.toLowerCase()+"/"),a.Rc=!(-1<se&&se<ne),!a.Rc))break;for(ne=x[Yn("76ad18b4f73e")],se=x[Yn("73a612b6fb191d")](Yn("35e7"))+2;se<ne;se++)y+=x[se];if(ne=y[Yn("73a612b6fb191d")](te),0>ne&&te!==Yn("7da71ca0ad381e90")&&(ne=y[Yn("73a612b6fb191d")](Yn("76a715b2ef3e149757"))),0>ne&&(ne=y[Yn("73a612b6fb191d")](Yn("76a715b2ef3e149757"))),0>ne&&(ne=y[Yn("73a612b6fb191d")](Yn("2bfa41fdb3784bca12"))),0>ne&&(ne=x[Yn("73a612b6fb191d")](Yn("7baa19a6f76c1988428554"))),a.Rc=!(0<=ne&&ne<y[Yn("73a612b6fb191d")](Yn("35"))||y[Yn("73a612b6fb191d")](Yn("35"))===-1),!a.Rc||x[Yn("73a612b6fb191d")](Yn("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[Yn("73a612b6fb191d")](te)),!a.Rc)||(ne=Gt[Yn("76a715b2f73f148a")][Yn("69ad17a1e03e")],se=ne[Yn("73a612b6fb191d")](Yn("7fb002b6ed25128b4da25b2e")),-1<se&&(a.Rc=!(ne[Yn("73a612b6fb191d")](te)>se),!a.Rc)))break;if(te[0]==="#"){ne=Gt.document.createElement("div");for(var he=b[0].replace(/[A-Za-z]/g,"");4>he.length;)he+="9";if(se=he,he=he.substr(he.length-4),b="",b+=["gsh","gsf"][parseInt(he.substr(0,1),10)%2],b+=["Header","Background","Display","Feedback"][parseInt(he.substr(0,1),10)%4],ne[Yn("79a417a0f0181a8946")]=b,Gt.document[Yn("78a712aa")]){Gt.document[Yn("78a712aa")][Yn("7bb806b6ed32388c4a875b")](ne),he=Gt.getComputedStyle(ne).getPropertyValue(Yn("78a704b7e62456904c9b12701b6532a8"));var ge=Gt.getComputedStyle(ne).getPropertyValue(Yn("75b817b0ea2202"));if(Gt.document[Yn("78a712aa")][Yn("68ad1bbcf533388c4a875b")](ne),he){if(ne=Gt[Yn("77a902b0eb1b1e804a8a")],ge==="0."+parseInt(se,10)%100||he.indexOf(parseInt(te[1]+te[2],16))!==-1&&he.indexOf(parseInt(te[3]+te[4],16))!==-1){a.Rc=!1;break}else if(ne&&ne(Yn("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(b="."+b,te=0;te<document.styleSheets.length;te++){ne=document.styleSheets[te].rules||document.styleSheets[te].cssRules;for(var Se in ne)if(b===ne[Se].selectorText){a.Rc=!1;break e}}}}else a.Rc=null,a.Rc=!1}}}else{for(Se=x[Yn("76ad18b4f73e")],E=x[Yn("73a612b6fb191d")](Yn("35e7"))+2;E<Se;E++)y+=x[E];x=y[Yn("73a612b6fb191d")](Yn("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[Yn("73a612b6fb191d")](Yn("35")))}}}return 0<a.Rc&&a!==a.wy}dm.className="DiagramHelper";function Qc(a){this.j=a===void 0?new It:a,this.o=new It}Ut.Object.defineProperties(Qc.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 Sf="DraggingInfo";Qc.className="DraggingInfo";function oe(a,y,x){this.node=a,this.info=y,this.Su=x}oe.className="DraggingNodeInfoPair";function de(){this.reset()}de.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new Zn(NaN,NaN).freeze(),this.gridSnapCellSpot=Ka,this.gridSnapOrigin=new It(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},de.className="DraggingOptions";function Me(a,y){if(typeof a=="string"||Gt.Element&&a instanceof Element)var x=cn.call(this,a)||this;else x=cn.call(this)||this,y=a;return Te(x),y&&x.nm(y),x}un(Me,cn);function Te(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=Pl,a.layout=new ds}Me.prototype.reset=function(){cn.prototype.reset.call(this),Te(this)},Me.className="Palette";function Be(a,y){if(typeof a=="string"||Gt.Element&&a instanceof Element)var x=cn.call(this,a)||this;else x=cn.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 Mr;var E=new ci;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 kr(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new Bt,x.toolManager.mouseMoveTools),x.click=function(){var te=b.observed;if(te!==null){var ne=te.viewportBounds,se=b.lastInput.documentPoint;te.position=new It(se.x-ne.width/2,se.y-ne.height/2)}},x.Pf=function(){b.Ya(),Pt(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&&Pt(b)},x.autoScale=Kl,x.vb=!1,y&&Object.assign(x,y),x}un(Be,cn),Be.prototype.computePixelRatio=function(){return 1},Be.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(iu(this),this.ql===null){var x=new yu(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),at(this)}finally{this.ta=a,this.ib=y}}}cn.prototype.redraw.call(this)},Be.prototype.gc=function(){if(this.Ka===null&&Yt("No div specified"),this.ta===null&&Yt("No canvas specified"),!(this.ta instanceof uc)&&(Fv(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){iu(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?at(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 at(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=wn.alloc().assign(a.viewportBounds).ed(y.viewportBounds),sc(y,E),wn.free(E),cs(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 se=y[ne],he=a;if(se.visible&&se.opacity!==0){var ge=se.diagram.grid.part;if(!x&&se.isTemporary)b&&ge.layer===se&&(se=vs(se,E),ge.gc(E,he),E.globalAlpha=se);else{for(var Se=vs(se,E),Ne=he.scale,Ge=wn.alloc(),Je=se.Pa.s,nt=Je.length,ct=0;ct<nt;ct++){var Ft=Je[ct];(b||Ft!==ge)&&se.Oj(E,Ft,he,null,Ne,Ge,!1)}wn.free(Ge),E.globalAlpha=Se}}}}}function Pt(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=Zn.alloc();E.h(x.width,x.height),b.desiredSize=E,Zn.free(E),a=2/a.scale,b instanceof ci&&(b.strokeWidth=a),y.location=new It(x.x-a/2,x.y-a/2),y.isSelected=!0}}}Be.prototype.computeBounds=function(){var a=this.observed;if(a===null)return ki;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},Be.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},Be.prototype.onViewportBoundsChanged=function(a,y,x,b){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),Pt(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))},Ut.Object.defineProperties(Be.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof Be&&Yt("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),Pt(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),Pt(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)}}}),Be.className="Overview";function Bt(){Wo.call(this),this.j=null}un(Bt,Wo),Bt.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 It(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new It(a.x-this.j.x,a.y-this.j.y)),!0)},Bt.prototype.doActivate=function(){this.j=null,Wo.prototype.doActivate.call(this)},Bt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},Bt.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 It(b.x-x.x,b.y-x.y)}a=a.lastInput.documentPoint,y.position=new It(a.x-this.j.x,a.y-this.j.y)}}},Bt.className="OverviewDraggingTool";function Dt(){gi(this),this.H=Vu,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=ki,this.hb=!0,this.cg=null,this.ob=200}Dt.prototype.toString=function(){return"CommandHandler"},Dt.prototype.Xe=function(a){this.H=a},Dt.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=qr?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()},Dt.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},Dt.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof Do&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},Dt.prototype.canStopCommand=function(){return!0},Dt.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=""}},Dt.prototype.canSelectAll=function(){return this.diagram.allowSelect},Dt.prototype.deleteSelection=function(){var a=this.diagram;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Delete"),a.R("SelectionDeleting",a.selection);for(var y=new Nn,x=a.selection.iterator;x.next();)nd(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=""}},Dt.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},Dt.prototype.copySelection=function(){var a=this.diagram,y=new Nn;for(a=a.selection.iterator;a.next();)nd(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},Dt.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},Dt.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},Dt.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},Dt.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)Bd=null,Jh="";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 Ln,x.addAll(te),Bd=x,Jh=y.model.dataFormat}}y.R("ClipboardChanged",x)},Dt.prototype.pasteFromClipboard=function(){var a=new Nn,y=Bd;if(y===null)return a;var x=this.diagram;if(Jh!==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},Dt.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);ac(y,te,new It(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=""}},Dt.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||Bd===null||Bd.count===0||Jh!==a.model.dataFormat)},Dt.prototype.undo=function(){this.diagram.undoManager.undo()},Dt.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},Dt.prototype.redo=function(){this.diagram.undoManager.redo()},Dt.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},Dt.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===Is&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Dt.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==Is?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Dt.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===Is&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Dt.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==Is?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Dt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},Dt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},Dt.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,b=a.scale;Ps(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=ki):(this.Jt=b,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),ts(y)},Dt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},Dt.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(he){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;Ps(x,"Scroll To Part");var b=this.scrollToPartPause;if(0<b){var E=Vt(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 he=E.pop();0<E.length&&he instanceof nr&&he.isTreeExpanded&&(!(he instanceof ni)||he.isSubGraphExpanded);)he=E.pop();0<E.length?(he instanceof Mr&&y.tv(he.actualBounds),he instanceof nr&&!he.isTreeExpanded&&(he.isTreeExpanded=!0),he instanceof ni&&!he.isSubGraphExpanded&&(he.isSubGraphExpanded=!0)):(he instanceof Mr&&y.es(he.actualBounds),y.am("LayoutCompleted",ne)),y.eb("Scroll To Part")},ne=function(){ir(te,(x.isEnabled?x.duration:0)+b)};y.Bj("LayoutCompleted",ne),te()}}else{var se=y.position.copy();y.es(a.actualBounds),se.Xa(y.position)&&x.Cc()}}};function Vt(a,y,x){if(y.isVisible())return x;if(y instanceof Ui)Vt(a,y.adornedPart,x);else if(y instanceof Vn){var b=y.fromNode;b!==null&&Vt(a,b,x),y=y.toNode,y!==null&&Vt(a,y,x)}else y instanceof nr&&(b=y.labeledLink,b!==null&&Vt(a,b,x),b=y.pg(),b!==null&&(b.isTreeExpanded||b.wasTreeExpanded||x.push(b),Vt(a,b,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),Vt(a,y,x));return x}Dt.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof Mr)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},Dt.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),Ps(y.animationManager,"Collapse Tree");var x=new Ln;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 nr&&E.isTreeExpanded&&(E.collapseTree(),x.add(E))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},Dt.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof nr&&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 nr&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Dt.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),Ps(y.animationManager,"Expand Tree");var x=new Ln;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 nr&&!E.isTreeExpanded&&(E.expandTree(),x.add(E))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},Dt.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof nr)||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 nr&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Dt.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 Ln,te=a.selection.iterator;te.next();){var ne=te.value;ne.Zc()&&ne.canGroup()&&E.add(ne)}for(var se=new Ln,he=E.iterator;he.next();){var ge=he.value;te=!1;for(var Se=E.iterator;Se.next();)if(ge.Td(Se.value)){te=!0;break}te||se.add(ge)}if(0<se.count){var Ne=se.first().containingGroup;if(Ne!==null)for(;Ne!==null;){E=!1;for(var Ge=se.iterator;Ge.next();)if(!Ge.value.Td(Ne)){E=!0;break}if(E)Ne=Ne.containingGroup;else break}if(x instanceof ni)Su(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var Je=y.copyNodeData(x);rn(Je)&&(y.xf(Je),b=a.ii(Je))}if(b!==null){Ne!==null&&this.isValidMember(Ne,b)&&(b.containingGroup=Ne);for(var nt=se.iterator;nt.next();){var ct=nt.value;this.isValidMember(b,ct)&&(ct.containingGroup=b)}a.clearSelection(!0),b.isSelected=!0}}a.R("SelectionGrouped",b)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},Dt.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 yn(a){var y=pn();for(a=a.iterator;a.next();){var x=a.value;x instanceof Vn||y.push(x)}a=new Nn,x=y.length;for(var b=0;b<x;b++){for(var E=y[b],te=!0,ne=0;ne<x;ne++)if(E.Td(y[ne])){te=!1;break}te&&a.add(E)}return On(y),a}Dt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof Vn)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},Dt.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 Ln;if(a!==null)b.add(a);else for(var E=y.selection.iterator;E.next();){var te=E.value;te instanceof ni&&te.canUngroup()&&b.add(te)}var ne=new Ln;if(0<b.count){y.clearSelection(!0);for(var se=b.iterator;se.next();){var he=se.value;he.expandSubGraph();var ge=he.containingGroup,Se=ge!==null&&ge.data!==null?x.wa(ge.data):void 0;ne.addAll(he.memberParts);for(var Ne=ne.iterator;Ne.next();){var Ge=Ne.value;if(Ge.isSelected=!0,!(Ge instanceof Vn)){var Je=Ge.data;Je!==null?x.mp(Je,Se):Ge.containingGroup=ge}}y.remove(he)}}y.R("SelectionUngrouped",b,ne)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Dt.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 ni))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof ni&&y.canUngroup())return!0;return!1},Dt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=yn(a).iterator;a.next();){var b=a.value;b.containingGroup!==null&&(!y||this.isValidMember(null,b)?b.containingGroup=null:x=!1)}return x},Dt.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),Ps(y.animationManager,"Collapse SubGraph");var x=new Ln;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 ni&&E.isSubGraphExpanded&&(E.collapseSubGraph(),x.add(E))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},Dt.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof ni&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof ni&&y.isSubGraphExpanded)return!0;return!1},Dt.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),Ps(y.animationManager,"Expand SubGraph");var x=new Ln;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 ni&&!E.isSubGraphExpanded&&(E.expandSubGraph(),x.add(E))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},Dt.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof ni&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof ni&&!y.isSubGraphExpanded)return!0;return!1},Dt.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 Co&&te.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},Dt.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 Co))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 Co&&x.editable}),a!==null))return!0;return!1},Dt.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 Jt?E=a.ga(Di):y.viewportBounds.ca(b.documentPoint)||(E=y.viewportBounds,E=new It(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,So(x,!1,a)}},Dt.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)},Dt.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 ur,a===null)return b;for(var te=a.iterator;te.next();)mu(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 Vn&&(y=a.fromNode,y===null||b.contains(y)?(y=a.toNode,y===null||b.contains(y)||b.remove(a)):b.remove(a));return b},Ut.Object.defineProperties(Dt.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||Yt("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}}}),Dt.className="CommandHandler",Yc=function(){return new Dt};function Jt(){gi(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new It(NaN,NaN).freeze(),this.jd=Pa,this.Ab=new fi,this.wh=new fi,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=Cs,this.uc=new wn(NaN,NaN,NaN,NaN).freeze(),this.Ib=new wn(NaN,NaN,NaN,NaN).freeze(),this.dc=new wn(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=ro,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 Hn,Bn,fr,wr,_r,oi,Ti,vi,Bi,fo;Jt.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=an(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},Jt.prototype.Vw=function(a){var y=this.Dh;if(Mn(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},Jt.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},Jt.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},Jt.prototype.copy=function(){return this.clone()},ot=Jt.prototype,ot.qb=function(a){a.classType===Vn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:Yt("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===Jt&&(this.stretch=a)},ot.toString=function(){return Dn(this.constructor)+"#"+Mi(this)},ot.th=function(){this.A!==null&&(this.A.nc=!0)};function pi(a){a.A===null?a.A=new wf:a.A.nc&&(a.A=a.A.copy())}ot.Xc=function(){if(this.ba===null){var a=new lg;a.Xi=oa,a.yj=oa,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},ot.cb=function(a,y,x,b,E,te,ne){var se=this.part;if(se!==null&&(se.gk(a,y,x,b,E,te,ne),x===this&&a===zo&&ys(this)&&ko(this,se,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 ur),ne=te.undoManager.transactionLevel===0,a.startCondition===us?ne=!0:a.startCondition===Sa&&(ne=!1),ne?(te=new ea,Vo(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()):(Ps(te.animationManager,"Trigger"),te.animationManager.defaultAnimation.add(this,y,b,E)))),this instanceof Un&&x===se&&(se.l&16777216)!==0&&se.data!==null))for(x=this.O.s,b=x.length,E=0;E<b;E++)se=x[E],se instanceof Un&&Ud(se,function(he){he.data!==null&&he.l&16777216&&he.La(y)})};function ko(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=MS(te,b,a),ne===null)continue;te.sp(a,ne,x,null)}else if(te.isToModel){var se=y.diagram;se===null||se.skipsModelSourceBindings||te.sp(a,se.model.modelData,x,b)}else{if(se=b.data,se===null)continue;var he=y.diagram;he===null||he.skipsModelSourceBindings||te.sp(a,se,x,b)}ne===a&&(se=b.ks(te.Ai),se!==null&&te.Mv(se,ne,x))}}ot.ks=function(a){return this.bindingId===a?this:null},ot.g=function(a,y,x){this.cb(zo,a,this,y,x)},ot.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 fi);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),te.pp(E)}};function Ja(a,y,x,b){return a.pickable===!1?!1:(b.multiply(a.transform),x?a.Yc(y,b):a.fh(y,b))}ot.tx=function(a,y,x){if(this.pickable===!1)return!1;var b=this.naturalBounds;return y=a.Bf(y),x?vo(a.x,a.y,0,0,0,b.height)<=y||vo(a.x,a.y,0,b.height,b.width,b.height)<=y||vo(a.x,a.y,b.width,b.height,b.width,0)<=y||vo(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},ot.se=function(){return!0},ot.ca=function(a){var y=It.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return It.free(y),!1;var b=this.diagram;if(b!==null&&b.wq){var E=b.Ql("extraTouchThreshold"),te=b.Ql("extraTouchArea"),ne=te/2,se=this.naturalBounds;b=this.Df()*b.scale;var he=1/b;if(se.width*b<E&&se.height*b<E)return a=Mo(x.x-ne*he,x.y-ne*he,x.width+te*he,x.height+te*he,y.x,y.y),It.free(y),a}return E=!1,(this instanceof Ui||this instanceof ci?Mo(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)),It.free(y),E},ot.gh=function(a){var y=this.naturalBounds;return Mo(0,0,y.width,y.height,a.x,a.y)},ot.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=wn.allocAt(0,0,y.width,y.height);var x=this.transform,b=!1,E=It.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)))),It.free(E),wn.free(y),b},ot.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,b=!1,E=It.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)))),It.free(E),b},ot.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,b=It.allocAt(0,0),E=It.allocAt(0,x.height),te=It.allocAt(x.width,x.height),ne=It.allocAt(x.width,0),se=!1;if(a.ca(y.Ga(b))||a.ca(y.Ga(E))||a.ca(y.Ga(te))||a.ca(y.Ga(ne)))se=!0;else{x=wn.allocAt(0,0,x.width,x.height);var he=It.allocAt(a.x,a.y);x.ca(y.Cd(he))?se=!0:(he.h(a.x,a.bottom),x.ca(y.Cd(he))?se=!0:(he.h(a.right,a.bottom),x.ca(y.Cd(he))?se=!0:(he.h(a.right,a.y),x.ca(y.Cd(he))&&(se=!0)))),It.free(he),wn.free(x),!se&&(qt.us(a,b,E)||qt.us(a,E,te)||qt.us(a,te,ne)||qt.us(a,ne,b))&&(se=!0)}return It.free(b),It.free(E),It.free(te),It.free(ne),se},ot.ga=function(a,y){if(y===void 0&&(y=new It),a instanceof yr){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},ot.mi=function(a){a===void 0&&(a=new wn);var y=this.naturalBounds,x=this.oe,b=It.allocAt(0,0).transform(x);return a.h(b.x,b.y,0,0),b.h(y.width,0).transform(x),no(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),no(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),no(a,b.x,b.y,0,0),It.free(b),a},ot.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},ot.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},ot.qs=function(a,y){return y===void 0&&(y=new It),y.assign(a),this.oe.Cd(y),y},ot.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},ot.Sj=function(a,y,x,b,E){var te=this.transform,ne=1/(te.m11*te.m22-te.m12*te.m21),se=te.m22*ne,he=-te.m12*ne,ge=-te.m21*ne,Se=te.m11*ne,Ne=ne*(te.m21*te.dy-te.m22*te.dx),Ge=ne*(te.m12*te.dx-te.m11*te.dy);return this.areaBackground!==null?(te=this.actualBounds,qt.Ff(te.left,te.top,te.right,te.bottom,a,y,x,b,E)):(ne=a*se+y*ge+Ne,a=a*he+y*Se+Ge,y=x*se+b*ge+Ne,x=x*he+b*Se+Ge,E.h(0,0),b=this.naturalBounds,x=qt.Ff(0,0,b.width,b.height,ne,a,y,x,E),E.transform(te),x)},Jt.prototype.measure=function(a,y,x,b){if(Zl(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 se=this instanceof Un;switch(sl(this,!0)){case Bn:ne=E=0,se&&(y=a=1/0);break;case Hn:isFinite(a)&&a>x&&(E=a),isFinite(y)&&y>b&&(ne=y);break;case wr:isFinite(a)&&a>x&&(E=a),ne=0,se&&(y=1/0);break;case _r:isFinite(y)&&y>b&&(ne=y),E=0,se&&(a=1/0)}se=this.maxSize;var he=this.minSize;E>se.width&&he.width<se.width&&(E=se.width),ne>se.height&&he.height<se.height&&(ne=se.height),x=Math.max(E,he.width),b=Math.max(ne,he.height),se.width<x&&(x=Math.min(he.width,x)),se.height<b&&(b=Math.min(he.height,b)),a=Math.min(se.width,a),y=Math.min(se.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()||Yt("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),Aa(this,!1)}},Jt.prototype.Wl=function(){},Jt.prototype.Dd=function(){return!1},Jt.prototype.arrange=function(a,y,x,b,E){this.Uk();var te=wn.alloc();te.assign(this.Ib),this.Ib.ka(),Us(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&&Ch(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 Co&&(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()||Yt("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(te,this.Ib),Mc(this,!1),wn.free(te)},ot=Jt.prototype,ot.eh=function(){};function Ds(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=sl(a,!0),x===b&&te===E&&(y=Bn),y){case Bn:(x>b||te>E)&&(Aa(a,!0),a.measure(x>b?b:x,te>E?E:te,0,0));break;case Hn:Aa(a,!0),a.measure(b,E,0,0);break;case wr:Aa(a,!0),a.measure(b,te,0,0);break;case _r:Aa(a,!0),a.measure(x,E,0,0)}}}ot.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||_v(x,!0),this.N(),Ji(a,y)||(x.oh(),this.Pn(x)))},ot.Pn=function(a){this.portId!==null&&(_v(a,!0),a instanceof nr&&U1(a,this))},ot.gc=function(a,y){if(!ou(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 Un&&Ch(this),ne=this.Ib;if(te){var se=this.Ib,he=this.dc,ge=this.areaBackground,Se=this.Ma;ge===null&&Se===null||a.yc(),ge!==null&&(ia(this,a,ge,!0,!0,he,se),ge instanceof oo&&ge.type===lu?(a.beginPath(),a.rect(se.x,se.y,se.width,se.height),a.ng(ge)):a.fillRect(se.x,se.y,se.width,se.height)),Se!==null&&(ia(this,a,Se,!0,!1,he,se),Se instanceof oo&&Se.type===lu?(a.beginPath(),a.rect(se.x,se.y,se.width,se.height),a.ng(Se)):a.fillRect(se.x,se.y,se.width,se.height)),this.hh(a,y)}if(!te&&(te||ne.width!==0&&ne.height!==0&&!isNaN(ne.x)&&!isNaN(ne.y))){te=this.transform,se=this.panel,this.l&4096&&hs(this),ge=this.part,he=!1;var Ne=0;ge&&y.Gf("drawShadows")&&(he=ge.isShadowed)&&(Se=ge.shadowOffset,Ne=Math.max(Se.y,Se.x)*y.scale*y.Mb),Se=this.Dd();var Ge;if(!(Ge=y.$i||!Se)){var Je=this.naturalBounds;Ge=this.wh;var nt=Ge.m11,ct=Ge.m21,Ft=Ge.dx,Ot=Ge.m12,zt=Ge.m22,Ht=Ge.dy,Wt,Xt=Wt=0;Ge=Wt*nt+Xt*ct+Ft;var hn=Wt*Ot+Xt*zt+Ht;Wt=Je.width+Ne,Xt=0;var er=Wt*nt+Xt*ct+Ft;Wt=Wt*Ot+Xt*zt+Ht,Xt=Math.min(Ge,er);var cr=Math.min(hn,Wt),sr=Math.max(Ge+0,er)-Xt,Wn=Math.max(hn+0,Wt)-cr;Ge=Xt,hn=cr,Wt=Je.width+Ne,Xt=Je.height+Ne,er=Wt*nt+Xt*ct+Ft,Wt=Wt*Ot+Xt*zt+Ht,Xt=Math.min(Ge,er),cr=Math.min(hn,Wt),sr=Math.max(Ge+sr,er)-Xt,Wn=Math.max(hn+Wn,Wt)-cr,Ge=Xt,hn=cr,Wt=0,Xt=Je.height+Ne,er=Wt*nt+Xt*ct+Ft,Wt=Wt*Ot+Xt*zt+Ht,Xt=Math.min(Ge,er),cr=Math.min(hn,Wt),sr=Math.max(Ge+sr,er)-Xt,Wn=Math.max(hn+Wn,Wt)-cr,Ge=Xt,hn=cr,Ne=y.viewportBounds,Je=Ne.x,nt=Ne.y,Ge=!(Ge>Ne.width+Je||Je>sr+Ge||hn>Ne.height+nt||nt>Wn+hn)}if(Ge){if(Ge=(this.l&256)!==0,a.clipInsteadOfFill&&(Ge=!1),this instanceof Co&&(a.font=this.font),Ge){if(hn=se.se()?se.naturalBounds:se.actualBounds,sr=Math.max(ne.x,hn.x),Wn=Math.max(ne.y,hn.y),Ne=Math.min(ne.right,hn.right)-sr,Je=Math.min(ne.bottom,hn.bottom)-Wn,nt=this.tb,nt!==null&&(sr=nt.x,Wn=nt.y,Ne=nt.width,Je=nt.height),sr>ne.width+ne.x||ne.x>hn.width+hn.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect(sr,Wn,Ne,Je),a.clip()}if(Se){if(!ge.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}he&&(hn=ge.shadowOffset,a.Ev(hn.x*y.scale*this.scale*y.Mb,hn.y*y.scale*this.scale*y.Mb,ge.shadowBlur),qc(a),a.shadowColor=ge.shadowColor)}he&&this.shadowVisible===!0?qc(a):he&&this.shadowVisible===!1&&Lc(a),ge=this.naturalBounds,this.areaBackground!==null&&(a.yc(),Vl(this,a,ge,ne)),a.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),he&&os(this,se)&&this.shadowVisible===null&&Lc(a),this.Ma!==null&&(a.yc(),vl(this,a,ge,ne)),he&&(this.Ma!==null||this.areaBackground!==null||os(this,se))?(ku(this,!0),this.shadowVisible===null&&Lc(a)):ku(this,!1),this.hh(a,y),he&&this.l&512&&qc(a),Se&&he&&Lc(a),Ge&&(a.restore(),a.Vc(this instanceof Un)),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 os(a,y){return y===null?!1:(Ch(y)&&(y=y.panel),(y.l&512)!==0||(y.type===Un.Auto||y.type===Un.Spot)&&y.Pb()!==a)}ot.Dv=function(){};function Vl(a,y,x,b){ia(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof oo&&a.areaBackground.type===lu?(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 vl(a,y,x,b){var E=a.kq(),te=x.x,ne=x.y,se=x.width+E,he=x.height+E;ia(a,y,a.Ma,!0,!1,x,b),a.Ma instanceof oo&&a.Ma.type===lu?(y.beginPath(),y.rect(te-E/2,ne-E/2,se,he),y.ng(a.Ma)):y.fillRect(te-E/2,ne-E/2,se,he)}function ks(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===Un.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 ou(a,y,x){if(!(y instanceof Ml))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&&ks(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),qc(y),y.shadowColor=a.shadowColor}a instanceof Co&&(y.font=a.font),y.yd=null;var ne=a.transform;te=a instanceof Un;var se=a instanceof Un?Ch(a):!1;a.l&4096&&hs(a);var he=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,E&&(y.o=!0,te&&se?(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 ge=ne.copy().Vj();y.rb.ha=[ge.m11,ge.m12,ge.m21,ge.m22,ge.dx,ge.dy],Vl(a,y,E,he),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?(se&&(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy]),vl(a,y,E,he),se&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy],vl(a,y,E,he)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),ne=y.yd,E=a.part,se=!1,E&&x.Gf("drawShadows")&&(se=E.isShadowed),y.clipInsteadOfFill&&(se=!1),a.Dd()&&se&&qc(y),se&&a.shadowVisible===!0?qc(y):se&&a.shadowVisible===!1&&Lc(y),E=a.panel,se&&os(a,E)&&a.shadowVisible===null&&Lc(y),y.Il&&(ge=x.computePixelRatio(),ge="drop-shadow("+y.shadowOffsetX/ge+"px "+y.shadowOffsetY/ge+"px "+y.shadowBlur/ge/2+"px "+y.shadowColor+")",a.background!==null&&ne.Ma.setAttributeNS(null,"filter",ge),a.areaBackground!==null&&ne.gd.setAttributeNS(null,"filter",ge)),se&&(a.Ma!==null||a.areaBackground!==null||os(a,E))?(ku(a,!0),a.shadowVisible===null&&Lc(y)):ku(a,!1),E=se,a.hh(y,x),te&&y.nh.pop(),y.o&&y.nh.pop(),ne=y.Gv.hs,se=te?a.svg:y.yd,ge=a.svg,!te&&ge!==null&&se!==ge&&ge.parentNode===a.panel.svg?(a.svg.replaceWith(se),a.svg=se,se!==null&&a.$o(y,b,he,se),al(y,ge),!0):(a.svg=se,ne!==null&&se===null&&(pm(y),y.nh.pop()),se===null||(a.$o(y,b,he,se),y.Il&&(x=x.computePixelRatio(),a.Dv(se,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),E&&a.l&512&&qc(y),a.Dd()&&Lc(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&se.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&se.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(se):y.Nj.prepend(se),y.ti=se):b!==null&&ks(a,b,se),ne!==null&&ne(a,se)),!0)}ot.$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 se=null;te!==null&&(se=a.svg.getElementById(te.split("#")[1].slice(0,-1))),se===null?(te="CLIP"+Go++,se=a.Ud("clipPath",{id:te}),y=a.Ud("rect",{x:y,y:E,width:ne,height:x}),this instanceof Un&&(E=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")),se.appendChild(y),a.svg.appendChild(se),b.setAttributeNS(null,"clip-path","url(#"+te+")")):(a=se.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"),al(a,b)};function al(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function Os(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=Yr(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()}}ot.hh=function(){},ot.lv=function(){this.Uc=!0},ot.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 Un?Ch(this):!1;if(!(this instanceof Un&&E))if(this instanceof ul){var te=this.bt;a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy],te!==null&&Yy(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 Un)y.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");else if(this instanceof ci){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],Vl(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 Un))&&(a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy]),vl(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},ot.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 ia(a,y,x,b,E,te,ne){if(x!==null){var se=1,he=1;if(typeof x=="string")b?y.fillStyle=x:y.strokeStyle=x;else if(x.type===Ph)b?y.fillStyle=x.color:y.strokeStyle=x.color;else{var ge=a.kq();if(se=te.width,he=te.height,E?(se=ne.width,he=ne.height):b||(se+=ge,he+=ge),(te=y instanceof Hd)&&x.xe&&(x.type===hp||x.yk===se&&x.ft===he))var Se=x.xe;else{var Ne=0,Ge=0,Je=0,nt=0,ct=0,Ft=0;if(Ft=ct=0,E?(ct=ne.x,Ft=ne.y):b||(ct-=ge/2,Ft-=ge/2),Ne=x.start.x*se+x.start.offsetX,Ge=x.start.y*he+x.start.offsetY,Je=x.end.x*se+x.end.offsetX,nt=x.end.y*he+x.end.offsetY,Ne+=ct,Je+=ct,Ge+=Ft,nt+=Ft,x.type===th)Se=y.createLinearGradient(Ne,Ge,Je,nt);else if(x.type===lu)Ft=isNaN(x.endRadius)?Math.max(se,he)/2:x.endRadius,isNaN(x.startRadius)?(ct=0,Ft=Math.max(se,he)/2):ct=x.startRadius,Se=y.createRadialGradient(Ne,Ge,ct,Je,nt,Ft);else if(x.type===hp)try{Se=y.createPattern(x.pattern,"repeat")}catch(zt){Se=null}if(x.type!==hp&&(E=x.colorStops,E!==null))for(E=E.iterator;E.next();)Se.addColorStop(E.key,E.value);if(te&&(x.xe=Se,Se!==null&&(x.yk=se,x.ft=he),Se===null&&x.type===hp&&x.yk!==-1)){x.yk=-1;var Ot=a.diagram;Ot!==null&&x.yk===-1&&ir(function(){Ot.redraw()},600)}}b?y.fillStyle=Se:y.strokeStyle=Se}}}ot.rg=function(a){if(a instanceof Un)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},ot.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},ot.If=function(){for(var a=this instanceof Un?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function hs(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){vu(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)}vu(a,!1),au(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,au(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,au(a,!1)))}ot.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var te=It.alloc();te.yi(y,x,b,E,Di),a.rotate(this.Kb,te.x,te.y),It.free(te)}},ot.v=function(a){if(!Zl(this)){a===void 0&&(a=!1),Aa(this,!0),Mc(this,!0);var y=this.panel;y===null||a||y.v()}},ot.Uj=function(){Zl(this)||(Aa(this,!0),Mc(this,!0))};function Hs(a){if(!Us(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof nr&&a.Bd(),y.$b())),Mc(a,!0)}}ot.Uk=function(){!(this.l&2048)&&(vu(this,!0),au(this,!0))},ot.Wu=function(){au(this,!0)},ot.N=function(){var a=this.part;a!==null&&a.N()};function sl(a,y){var x=a.stretch,b=a.panel;return b!==null&&b.type===Un.Table?Zu(a,b.Fb(a.row),b.Eb(a.column),y):b!==null&&b.type===Un.Auto&&b.Pb()===a?as(a,Hn,y):x===oi?b!==null?b.type===Un.Spot&&b.Pb()===a?as(a,Hn,y):(x=b.defaultStretch,x===oi?as(a,Bn,y):as(a,x,y)):as(a,Bn,y):as(a,x,y)}function Zu(a,y,x,b){var E=a.stretch;if(E!==oi)return as(a,E,b);var te=E=null;switch(y.stretch){case _r:te=!0;break;case Hn:te=!0}switch(x.stretch){case wr:E=!0;break;case Hn:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===wr||y===Hn),te===null&&(te=y===_r||y===Hn),E===!0&&te===!0?as(a,Hn,b):E===!0?as(a,wr,b):te===!0?as(a,_r,b):as(a,Bn,b)}function as(a,y,x){if(x)return y;if(y===Bn||(x=a.desiredSize,x.w()))return Bn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===wr)return Bn;if(y===Hn)return _r}else{if(y===_r)return Bn;if(y===Hn)return wr}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===_r)return Bn;if(y===Hn)return wr}else{if(y===wr)return Bn;if(y===Hn)return _r}return y}function ku(a,y){a.l=y?a.l|512:a.l&-513}function ys(a){return(a.l&1024)!==0}function xf(a,y){a.l=y?a.l|1024:a.l&-1025}function vu(a,y){a.l=y?a.l|2048:a.l&-2049}function au(a,y){a.l=y?a.l|4096:a.l&-4097}function Zl(a){return(a.l&8192)!==0}function Aa(a,y){a.l=y?a.l|8192:a.l&-8193}function Us(a){return(a.l&16384)!==0}function Mc(a,y){a.l=y?a.l|16384:a.l&-16385}ot.Gj=function(){this.svg=null},ot.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},ot.Av=function(){},ot.zv=function(a){return this.pa=a,Hs(this),!0},ot.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},ot.kq=function(){return 0};function $d(a){var y=a.part;if(y instanceof nr&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||U1(y,a)}}function Zy(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof Un?a instanceof nr?a.Bd():a.qm(a,function(x){$d(x)}):$d(a))}ot.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new xa(a,y,x,b):E=a,E.xd=this,a=this.ih(),a!==null&&f1(a)&&Yt("Cannot add a Binding to a template that has already been copied: "+E),this.localBindings===null&&(this.localBindings=new Ln),this.localBindings.add(E),this},ot.set=function(a){return Object.assign(this,a),this},ot.Du=function(a){return rv(this,a),this},ot.apply=function(a){return a(this),this},ot.nm=function(a){return ru(this,a),this},ot.pz=function(){return this.ih()},ot.ih=function(){for(var a=this instanceof Un?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},ot.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new ur),this.animationTriggers.add(a.propertyName,a),this};function su(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=op.I(a);typeof te=="function"?(x=an(arguments),b=te(x),rn(b)||Yt('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=Gt.go[a]}if(b===null&&(E!=null&&E.constructor||Yt("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 cn&&1<x.length){te=b;var ne=x[1];(typeof ne=="string"||ne instanceof HTMLDivElement)&&(Md(te,ne),E++)}for(;E<x.length;E++)te=x[E],te===void 0?Yt("Undefined value at argument "+E+" for object being constructed by GraphObject.make: "+b):rv(b,te);return b}function rv(a,y){if(typeof y=="string")if(a instanceof Co)a.text=y;else if(a instanceof ci)a.figure=y;else if(a instanceof ul)a.source=y;else if(a instanceof Un)y=Ou.I(y),y!==null&&(a.type=y);else if(a instanceof oo){var x=lr(oo,y);x!==null?a.type=x:Yt("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof Jn?(y=lr(Jn,y),y!==null&&(a.type=y)):a instanceof Gi&&(y=lr(Gi,y),y!==null&&(a.type=y));else if(y instanceof Jt)a instanceof Un||Yt("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof ja){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 ja?Nm(b,y):Yt("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof tn)typeof a.qb=="function"&&a.qb(y);else if(y instanceof Ha)a.type=y;else if(y instanceof xa)a instanceof Jt||a instanceof ja?a.bind(y):Yt("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof Tl)a instanceof Jt?a.Jv(y):Yt("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof $a)a instanceof Jn&&a.type===Jn.o?a.figures.add(y):Yt("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof Gi)a instanceof $a?a.segments.add(y):Yt("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof Ro)a instanceof cn||a instanceof ni?a.layout=y:Yt("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++)rv(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof oo){x=new ar;for(var E in y)b=parseFloat(E),isNaN(b)?x[E]=y[E]:a.addColorStop(b,y[E]);ru(a,x)}else if(a instanceof ja){y.row!==void 0?(E=y.row,(E==null||E===1/0||isNaN(E)||0>E)&&Yt("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)&&Yt("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new ar;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);ru(a,E)}else ru(a,y);else Yt('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function bh(a,y){op.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}Ut.Object.defineProperties(Jt.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new wf),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 wf),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 wf),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(pi(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&&(pi(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:Vs},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new qh),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===Vs&&(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 qh),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 qh),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:Ei},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new qh),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:oi},set:function(a){var y=this.stretch;y!==a&&(pi(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&&(pi(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)&&Qn(a,"0 <= value <= 1",Jt,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(Vd(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(Vd(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(),Zy(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&&Pf(a,"GraphObject.areaBackground"),a instanceof oo&&a.freeze(),pi(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&&Pf(a,"GraphObject.background"),a instanceof oo&&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 Mr)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 It(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&&Yt("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,Zy(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 ci&&this.qc(),this.g("desiredSize",b,a),ys(this)&&(a=this.part,a!==null&&(ko(this,a,"width"),ko(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 Zn(a,this.jd.height).freeze(),this.v(),this instanceof ci&&this.qc(),this.g("desiredSize",y,a),ys(this)&&(a=this.part,a!==null&&ko(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 Zn(this.jd.width,a).freeze(),this.v(),this instanceof ci&&this.qc(),this.g("desiredSize",y,a),ys(this)&&(a=this.part,a!==null&&ko(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:to},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(),pi(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:ua},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(),pi(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 kr(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&&hs(this),this.Ab}},oe:{get:function(){return this.l&4096&&hs(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(pi(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:Bn},set:function(a){this.reshapingBehavior!==a&&(pi(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()&&Yt("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),Hs(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&&Qn(a,">= 0",Jt,"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&&Qn(a,">= 1",Jt,"columnSpan"),pi(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&&Qn(a,">= 0",Jt,"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&&Qn(a,">= 1",Jt,"rowSpan"),pi(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&&(pi(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 nr||Yt("Cannot set portID on a Link: "+a),y!==null&&x!==null&&Hv(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:oa},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),$d(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&Qn(a,">= 0",Jt,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),$d(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),$d(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&&Qn(a,">= 0",Jt,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:oa},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),$d(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&Qn(a,">= 0",Jt,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),$d(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),$d(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&&Qn(a,">= 0",Jt,"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&&(pi(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&&(pi(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&&(pi(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&&(pi(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&&(pi(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&&(pi(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&&(pi(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&&(pi(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&&(pi(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&&(pi(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&&(pi(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&&(pi(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&&(pi(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&&(pi(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&&(pi(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&&(pi(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&&(pi(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&&(pi(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),Jt.prototype.trigger=Jt.prototype.Jv,Jt.prototype.findBindingPanel=Jt.prototype.ih,Jt.prototype.findTemplateBinder=Jt.prototype.pz,Jt.prototype.setProperties=Jt.prototype.nm,Jt.prototype.apply=Jt.prototype.apply,Jt.prototype.attach=Jt.prototype.Du,Jt.prototype.set=Jt.prototype.set,Jt.prototype.isEnabledObject=Jt.prototype.If,Jt.prototype.isVisibleObject=Jt.prototype.Ed,Jt.prototype.isContainedBy=Jt.prototype.rg,Jt.prototype.getNearestIntersectionPoint=Jt.prototype.rs,Jt.prototype.getLocalPoint=Jt.prototype.qs,Jt.prototype.getDocumentScale=Jt.prototype.Df,Jt.prototype.getDocumentAngle=Jt.prototype.li,Jt.prototype.getDocumentBounds=Jt.prototype.mi,Jt.prototype.getDocumentPoint=Jt.prototype.ga,Jt.prototype.intersectsRect=Jt.prototype.Yc,Jt.prototype.containedInRect=Jt.prototype.fh,Jt.prototype.containsRect=Jt.prototype.Re,Jt.prototype.containsPoint=Jt.prototype.ca,Jt.prototype.raiseChanged=Jt.prototype.g,Jt.prototype.raiseChangedEvent=Jt.prototype.cb,Jt.prototype.addCopyProperty=Jt.prototype.Vw;var op=null;Jt.className="GraphObject",op=new ur,bh("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=su(Un,Un.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof Un){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"},su(ci,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new yr(0,0,2.76142374915397,2.761423749153969),spot2:new yr(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 Un&&(x=b.fb("ButtonBorder"),x instanceof ci)){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 Un&&(x=b.fb("ButtonBorder"),x instanceof ci&&(x.fill=b._buttonFillNormal,x.stroke=b._buttonStrokeNormal))},y.actionDown=function(x,b){if(b.If()&&b instanceof Un&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof ci){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 Un&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof ci){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 Un&&b._buttonFillPressed!==null){var E=b.fb("ButtonBorder");if(E instanceof ci){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 Un&&b._buttonFillPressed!==null){var E=x.diagram;if(E.firstInput.button===0&&(E.currentTool.standardMouseOver(),a(x,b)&&(x=b.fb("ButtonBorder"),x instanceof ci))){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}),bh("TreeExpanderButton",function(){var a=su("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},su(ci,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:wo},new xa("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new xa("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof Ui&&(x=x.adornedPart),x instanceof nr){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}),bh("SubGraphExpanderButton",function(){var a=su("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},su(ci,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:wo},new xa("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 Ui&&(x=x.adornedPart),x instanceof ni){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}),bh("ToolTip",function(){return su(Ui,Un.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new It(0,3),shadowBlur:5},su(ci,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new yr(0,0,4,6),spot2:new yr(1,1,-4,-4)}))}),bh("ContextMenu",function(){return su(Ui,Un.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new It(0,3),shadowBlur:5},new xa("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),bh("ContextMenuButton",function(){var a=su("Button");a.stretch=wr;var y=a.fb("ButtonBorder");return y instanceof ci&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new yr(0,0,2,3),y.spot2=new yr(1,1,-2,-2)),a}),bh("PanelExpanderButton",function(a){var y=fm(a,"COLLAPSIBLE"),x=su("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},su(ci,{name:"ButtonIcon",strokeWidth:2},new xa("geometryString","visible",function(b){return b?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof ci&&(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}),bh("CheckBoxButton",function(a){var y=fm(a);return a=su("Button",{desiredSize:new Zn(14,14)},su(ci,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Hn,geometryStretch:fr,visible:!1},y!==""?new xa("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof Un){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}),bh("CheckBox",function(a){a=fm(a),a=su("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new kr(0,1,0,0)});var y=su(Un,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new kr(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}),Jt.None=Bn=new tn(Jt,"None",0),Jt.Default=oi=new tn(Jt,"Default",0),Jt.Vertical=_r=new tn(Jt,"Vertical",4),Jt.Horizontal=wr=new tn(Jt,"Horizontal",5),Jt.Fill=Hn=new tn(Jt,"Fill",3),Jt.Uniform=fr=new tn(Jt,"Uniform",1),Jt.UniformToFill=Ti=new tn(Jt,"UniformToFill",2),Jt.FlipVertical=vi=new tn(Jt,"FlipVertical",1),Jt.FlipHorizontal=Bi=new tn(Jt,"FlipHorizontal",2),Jt.FlipBoth=fo=new tn(Jt,"FlipBoth",3),Jt.make=su,Jt.getBuilders=function(){var a=new ur,y;for(y in op)if(y!==y.toLowerCase()){var x=op.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},Jt.defineBuilder=bh,Jt.build=function(a,y,x){for(var b=[],E=2;E<arguments.length;++E)b[E-2]=arguments[E];if(E=op.I(a),typeof E=="function"&&(b=E([a].concat(b)),b instanceof Jt))return y&&b.set(y),b;Yt('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},Jt.takeBuilderArgument=fm;function wf(){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=to,this.o=ua,this.hg=oi,this.ob=this.Bi=1,this.Pf=Bn,this.Pc=this.Ci=this.gd=null,this.Oc="category"}wf.prototype.copy=function(){var a=new wf;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 qh(){this.u=-1/0,this.o=0,this.F=Ei,this.rr=Vs,this.j=this.V="None"}qh.prototype.copy=function(){var a=new qh;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},qh.className="LinkElementSettings";function lg(){this.yj=this.Xi=ro,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 Gd(){this.ha=[1,0,0,1,0,0]}Gd.prototype.copy=function(){var a=new Gd;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},Gd.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},Gd.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},Gd.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)}},Gd.className="STransform";function bf(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}bf.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},bf.className="SGradient";function uc(a,y,x){this.ownerDocument=a=y===void 0?Gt.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 Ml(this,x)}uc.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},uc.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),rn(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},uc.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},uc.prototype.focus=function(){this.Oa.focus()},uc.prototype.mx=function(){this.ownerDocument=null},Ut.Object.defineProperties(uc.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}}}),uc.className="SVGSurface";function Ml(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 Gd,this.j=pm(this),this.Nj=pm(this,"gojs-diagram"),this.Hl=this.ti=null;var x=Go++,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 Xy(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+")")}ot=Ml.prototype,ot.arc=function(a,y,x,b,E,te,ne,se){var he=2*Math.PI,ge=he-1e-6,Se=x*Math.cos(b),Ne=x*Math.sin(b),Ge=a+Se,Je=y+Ne,nt=te?0:1;b=te?b-E:E-b,(1e-6<Math.abs(ne-Ge)||1e-6<Math.abs(se-Je))&&this.path.push(["L",Ge,+Je]),0>b&&(b=b%he+he),b>ge?(this.path.push(["A",x,x,0,1,nt,a-Se,y-Ne]),this.path.push(["A",x,x,0,1,nt,Ge,Je])):1e-6<b&&this.path.push(["A",x,x,0,+(b>=Math.PI),nt,a+x*Math.cos(E),y+x*Math.sin(E)])},ot.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},ot.Se=function(a){this.addPath(this.path,this.rb,a||0)},ot.bezierCurveTo=function(a,y,x,b,E,te){this.path.push(["C",a,y,x,b,E,te])},ot.clearRect=function(){},ot.clip=function(){this.Yl.clipPath=!0},ot.closePath=function(){this.path.push(["z"])},ot.createLinearGradient=function(a,y,x,b){var E=new bf("linear");return E.x1=a,E.y1=y,E.x2=x,E.y2=b,E},ot.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"+Go++,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+")"},ot.createRadialGradient=function(a,y,x,b,E,te){var ne=new bf("radial");return ne.x1=a,ne.y1=y,ne.r1=x,ne.x2=b,ne.y2=E,ne.r2=te,ne};function Yy(a,y,x,b,E,te,ne,se,he){b=se/b,E=he/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)}ot.drawImage=function(a,y,x,b,E,te,ne,se,he){var ge="";a instanceof HTMLCanvasElement&&(ge=a.toDataURL()),a instanceof HTMLImageElement&&(ge=a.getAttribute("src"));var Se=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,b===void 0&&(te=y,ne=x,se=b=Se,he=E=a),b=b||0,E=E||0,se=se||0,he=he||0,Yy(this,y,x,b,E,te||0,ne||0,se,he),te={x:0,y:0,width:Se||b,height:a||E,href:ge},qt.$(b,se)&&qt.$(E,he)?ge.toLowerCase().indexOf(".svg")===-1&&ge.toLowerCase().indexOf("data:image/svg")===-1&&(te.preserveAspectRatio="xMidYMid slice"):te.preserveAspectRatio="none",(y!==0||x!==0||b!==Se||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)},ot.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),iv(this,this.Yl)},ot.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},ot.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)},ot.ox=function(a,y,x,b){a={x:a,y,width:x,height:b},ap(this,"fill",a,this.rb),iv(this,a),this.svg.prepend(this.Ud("rect",a))},ot.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])},ot.lineTo=function(a,y){this.path.push(["L",a,y])},ot.moveTo=function(a,y){this.path.push(["M",a,y])},ot.quadraticCurveTo=function(a,y,x,b){this.path.push(["Q",a,y,x,b])},ot.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"])},ot.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},ot.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())},ot.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]+")"}ot.scale=function(a,y){this.rb.scale(a,y)},ot.translate=function(a,y){this.rb.translate(a,y)},ot.transform=function(){},ot.yc=function(){},ot.stroke=function(){qy(this,this.Yl)},ot.jk=function(){this.clipInsteadOfFill||this.stroke()},ot.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},ot.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"?iv(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 iv(a,y){a.fillStyle instanceof bf?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 bf?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 bf)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"+Go++,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 se=E[ne],he=se.color;se={offset:se.offset,"stop-color":he},/^rgba\(/.test(he)&&(he=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(he),se["stop-color"]="rgb("+he[1]+","+he[2]+","+he[3]+")",se["stop-opacity"]=he[4]),te.push(se)}for(te.sort(function(ge,Se){return ge.offset>Se.offset?1:-1}),E=0;E<y;E++)x.appendChild(a.Ud("stop",te[E]));return a.svg.appendChild(x),"url(#"+b+")"}ot.addPath=function(a,y,x){for(var b=[],E=0;E<a.length;E++){var te=an(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 se in a)se!=="transform"&&y.setAttributeNS(null,se,a[se]);else{se=y.getElementsByTagName("path");for(var he in a)he!=="transform"&&se[x].setAttributeNS(null,he,a[he])}else this.addElement("path",a)};function ug(a,y,x,b,E,te,ne){var se=new Gd;se.ha=[y,x,b,E,te,ne],y={},ap(a,"g",y,se),se=a.addElement("g",y),a.nh.push(se)}function pm(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}ot.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function Lc(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function qc(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}ot.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},ot.fs=function(){this.Ct=!1},ot.Vc=function(){},ot.Wx=function(){},Ml.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},Ml.prototype.getImageData=function(){return null},Ml.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()))}Ml.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},Ml.className="SVGContext",cn.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new uc(this,Gt.document));var y=new uc(this,Gt.document,!0);a===void 0&&(a=new ar);var x=this;return gf(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)},cn.prototype.makeSvg=cn.prototype.Cs,cn.prototype.av=function(a){return this.Cs(a)},cn.prototype.makeSVG=cn.prototype.av;function yu(a,y,x,b){this.ownerDocument=y=y===void 0?Gt.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new Hd(y,x,b),y.H=a}yu.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},yu.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},yu.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},yu.prototype.focus=function(){this.Oa.focus()},yu.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},Ut.Object.defineProperties(yu.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}}}),yu.className="CanvasSurface";function Hd(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&Yt("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 fi,this.isTemporary=!!x}ot=Hd.prototype,ot.Wx=function(a){this.Z.imageSmoothingEnabled=a},ot.arc=function(a,y,x,b,E,te){this.Z.arc(a,y,x,b,E,te)},ot.beginPath=function(){this.Z.beginPath()},ot.Se=function(){},ot.bezierCurveTo=function(a,y,x,b,E,te){this.Z.bezierCurveTo(a,y,x,b,E,te)},ot.clearRect=function(a,y,x,b){this.yc(),this.Z.clearRect(a,y,x,b)},ot.clip=function(){this.Z.clip()},ot.closePath=function(){this.Z.closePath()},ot.createLinearGradient=function(a,y,x,b){return this.Z.createLinearGradient(a,y,x,b)},ot.createPattern=function(a,y){return this.Z.createPattern(a,y)},ot.createRadialGradient=function(a,y,x,b,E,te){return this.Z.createRadialGradient(a,y,x,b,E,te)},ot.drawImage=function(a,y,x,b,E,te,ne,se,he){b===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,b,E,te,ne,se,he)},ot.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},ot.fillRect=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},ot.ox=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},ot.fillText=function(a,y,x){this.Z.fillText(a,y,x)},ot.getImageData=function(a,y,x,b){return this.Z.getImageData(a,y,x,b)},ot.lineTo=function(a,y){this.Z.lineTo(a,y)},ot.measureText=function(a){return this.Z.measureText(a)},ot.moveTo=function(a,y){this.Z.moveTo(a,y)},ot.quadraticCurveTo=function(a,y,x,b){this.Z.quadraticCurveTo(a,y,x,b)},ot.rect=function(a,y,x,b){this.Z.rect(a,y,x,b)},ot.restore=function(){this.Z.restore()},ot.save=function(){this.yc(),this.Z.save()},Hd.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},ot=Hd.prototype,ot.setTransform=function(a,y,x,b,E,te){this.El.setTransform(a,y,x,b,E,te)},ot.scale=function(a,y){this.El.scale(a,y)},ot.translate=function(a,y){this.El.translate(a,y)},ot.stroke=function(){this.Z.stroke()},ot.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,se=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=se,ne.m12=a,ne.m21=y,ne.m22=x}},ot.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},ot.ng=function(a,y){if(a instanceof oo&&a.type===lu){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)},ot.jk=function(){this.Hm||this.stroke()},ot.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},ot.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},ot.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(vx),a.lineDashOffset=0)},ot.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},ot.Hs=function(){},Ut.Object.defineProperties(Hd.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([]);Hd.className="CanvasSurfaceContext";function cg(){this.F=this.o=this.u=this.j=0}cg.className="ColorNumbers";function oo(a,y){cp||(hv(),cp=!0),gi(this),this._isFrozen=!1,a===void 0?(this.na=Ph,this.xk="black"):typeof a=="string"?(this.na=Ph,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===th?(this.Qd=Pl,this.Lk=nl):this.Lk=a===lu?this.Qd=Di:this.Qd=oa,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}oo.prototype.copy=function(){var a=new oo;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},ot=oo.prototype,ot.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},ot.ka=function(){return Object.isFrozen(this)&&Yt("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},ot.qb=function(a){a.classType===oo&&(this.type=a)},ot.toString=function(){var a="Brush(";if(this.type===Ph)a+=this.color;else if(a=this.type===th?a+"Linear ":this.type===lu?a+"Radial ":this.type===hp?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+")"},ot.addColorStop=function(a,y){return this._isFrozen&&zn(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&Qn(a,"0 <= loc <= 1",oo,"addColorStop:loc"),this.we===null&&(this.we=new ur),this.we.add(a,y),this.na===Ph&&(this.type=th),this.xe=null,this},ot.Vz=function(a,y){if(this._isFrozen&&zn(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?dp:y,this.type===Ph)eh(this.color),this.color=lp(a,y);else if((this.type===th||this.type===lu)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)eh(x.value),this.addColorStop(x.key,lp(a,y));return this};function e1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?dp:x,eh(a),lp(y,x)}ot.Wy=function(a,y){if(this._isFrozen&&zn(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?dp:y,this.type===Ph)eh(this.color),this.color=lp(-a,y);else if((this.type===th||this.type===lu)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)eh(x.value),this.addColorStop(x.key,lp(-a,y));return this};function t1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?dp:x,eh(a),lp(-y,x)}function av(a,y,x){eh(a),a=To.j;var b=To.u,E=To.o,te=To.F;return eh(y),x===void 0&&(x=.5),"rgba("+Math.round((To.j-a)*x+a)+", "+Math.round((To.u-b)*x+b)+", "+Math.round((To.o-E)*x+E)+", "+Math.round((To.F-te)*x+te)+")"}ot.Gx=function(){if(this.type===Ph)return sp(this.color);if((this.type===th||this.type===lu)&&this.colorStops!==null){var a=this.colorStops;if(this.type===lu)return sp(a.first().value);if(a.get(.5)!==null)return sp(a.get(.5));if(a.count===2)return a=a.Fa(),sp(av(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,se=Math.abs(.5-y.key);E>te&&se<E?(x=ne,E=se):te>=E&&se<te&&(b=ne,te=se)}return x>b&&(te=x,x=b,b=te,te=E),E=b-x,sp(av(a.get(x),a.get(b),1-te/E))}return!1};function sp(a){return a?a instanceof oo?a.Gx():(eh(a),128>(299*To.j+587*To.u+114*To.o)/1e3):!1}function lp(a,y){switch(y){case dp:y=100*lv(To.j);var x=100*lv(To.u),b=100*lv(To.o);return Ws.j=.4124564*y+.3575761*x+.1804375*b,Ws.u=.2126729*y+.7151522*x+.072175*b,Ws.o=.0193339*y+.119192*x+.9503041*b,Ws.F=To.F,y=cv(Ws.j/up[0]),x=cv(Ws.u/up[1]),b=cv(Ws.o/up[2]),kc.j=116*x-16,kc.u=500*(y-x),kc.o=200*(x-b),kc.F=Ws.F,kc.j=Math.min(100,Math.max(0,kc.j+100*a)),a=(kc.j+16)/116,y=a-kc.o/200,Ws.j=up[0]*n1(kc.u/500+a),Ws.u=up[1]*(kc.j>mm*dv?Math.pow(a,3):kc.j/mm),Ws.o=up[2]*n1(y),Ws.F=kc.F,a=-.969266*Ws.j+1.8760108*Ws.u+.041556*Ws.o,y=.0556434*Ws.j+-.2040259*Ws.u+1.0572252*Ws.o,To.j=255*uv((3.2404542*Ws.j+-1.5371385*Ws.u+-.4985314*Ws.o)/100),To.u=255*uv(a/100),To.o=255*uv(y/100),To.F=Ws.F,To.j=Math.round(To.j),255<To.j?To.j=255:0>To.j&&(To.j=0),To.u=Math.round(To.u),255<To.u?To.u=255:0>To.u&&(To.u=0),To.o=Math.round(To.o),255<To.o?To.o=255:0>To.o&&(To.o=0),"rgba("+To.j+", "+To.u+", "+To.o+", "+To.F+")";case r1:return sv(),Xl.o=Math.min(100,Math.max(0,Xl.o+100*a)),"hsla("+Xl.j+", "+Xl.u+"%, "+Xl.o+"%, "+Xl.F+")";default:Yt("Unknown color space: "+y)}}function eh(a){cp||(hv(),cp=!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,To.j=a[0],To.u=a[1],To.o=a[2],To.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,To.j=0,To.u=0,To.o=0,To.F=1)}}function sv(){var a=To.j/255,y=To.u/255,x=To.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))}Xl.j=Math.round(ne),Xl.u=Math.round(100*a),Xl.o=Math.round(100*E),Xl.F=To.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 Pf(a,y){typeof a!="string"&&(a instanceof oo||Yt("Value for "+y+" must be a color string or a Brush, not "+a))}function hv(){fv=na?new yu(null,void 0,{willReadFrequently:!0}).context:null}Ut.Object.defineProperties(oo.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&zn(this,a),this.na=a,this.start.Mc()&&(a===th?this.start=Pl:a===lu&&(this.start=Di)),this.end.Mc()&&(a===th?this.end=nl:a===lu&&(this.end=Di)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&zn(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&zn(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&zn(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&zn(this,a),0>a&&Qn(a,">= zero",oo,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&zn(this,a),0>a&&Qn(a,">= zero",oo,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&zn(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&zn(this,a),this.cr=a,this.xe=null}}}),oo.prototype.isDark=oo.prototype.Gx,oo.prototype.darkenBy=oo.prototype.Wy,oo.prototype.lightenBy=oo.prototype.Vz,oo.prototype.addColorStop=oo.prototype.addColorStop;var dv=216/24389,mm=24389/27,up=[95.047,100,108.883],fv=null,To=new cg,Xl=new cg,Ws=new cg,kc=new cg,cp=!1;oo.className="Brush";var Ph;oo.Solid=Ph=new tn(oo,"Solid",0);var th;oo.Linear=th=new tn(oo,"Linear",1);var lu;oo.Radial=lu=new tn(oo,"Radial",2);var hp;oo.Pattern=hp=new tn(oo,"Pattern",4);var dp;oo.Lab=dp=new tn(oo,"Lab",5);var r1;oo.HSL=r1=new tn(oo,"HSL",6),oo.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},oo.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;cp||(hv(),cp=!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)},oo.lighten=function(a){return e1(a)},oo.lightenBy=e1,oo.darken=function(a){return t1(a)},oo.darkenBy=t1,oo.mix=av,oo.isDark=sp;function Ha(){this.xa="Base"}Ha.prototype.measure=function(){},Ha.prototype.Yz=function(a,y,x,b,E){a.measure(y,x,b,E)},Ha.prototype.arrange=function(){},Ha.prototype.Ly=function(a,y,x,b,E,te){a.arrange(y,x,b,E,te)},Ha.prototype.iA=function(a){a.Uj()},Ha.prototype.gc=function(){},Ut.Object.defineProperties(Ha.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return Un}}}),Ha.prototype.remeasureObject=Ha.prototype.iA,Ha.prototype.arrangeElement=Ha.prototype.Ly,Ha.prototype.measureElement=Ha.prototype.Yz,Ha.className="PanelLayout";function vm(){this.xa="Base"}un(vm,Ha),vm.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length;a=nh(a);for(var he=0;he<se;he++){var ge=b[he];if(ge.visible||ge===a){var Se=ge.margin,Ne=Se.right+Se.left;Se=Se.top+Se.bottom,ge.measure(y,x,te,ne);var Ge=ge.measuredBounds;Ne=Math.max(Ge.width+Ne,0),Se=Math.max(Ge.height+Se,0),Ge=ge.position.x;var Je=ge.position.y;isFinite(Ge)||(Ge=0),isFinite(Je)||(Je=0),ge instanceof ci&&ge.isGeometryPositioned&&(ge=ge.strokeWidth/2,Ge-=ge,Je-=ge),no(E,Ge,Je,Ne,Se)}}},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,se=te.margin,he=te.position.x,ge=te.position.y;if(he=isNaN(he)?-a:he-a,ge=isNaN(ge)?-x:ge-x,te instanceof ci&&te.isGeometryPositioned){var Se=te.strokeWidth/2;he-=Se,ge-=Se}te.visible&&te.arrange(he+se.left,ge+se.top,ne.width,ne.height)}};function ym(){this.xa="Base"}un(ym,Ha),ym.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length;y=pn(),te=nh(a);for(var he=0;he<se;he++){var ge=b[he];if(ge.visible||ge===te){var Se=sl(ge,!1);if(Se!==Bn&&Se!==wr)y.push(ge);else{ge.measure(1/0,x,0,ne),Se=ge.margin,ge=ge.measuredBounds;var Ne=Math.max(ge.height+Se.top+Se.bottom,0);E.width+=Math.max(ge.width+Se.right+Se.left,0),E.height=Math.max(E.height,Ne)}}}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++)he=y[a],(he.visible||he===te)&&(Se=he.margin,se=Se.right+Se.left,Se=Se.top+Se.bottom,he.measure(1/0,x,0,ne),he=he.measuredBounds,Se=Math.max(he.height+Se,0),E.width+=Math.max(he.width+se,0),E.height=Math.max(E.height,Se));On(y)},ym.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,te=E.top,ne=a.isOpposite,se=ne?x.width:E.left,he=0;he<b;he++){var ge=te,Se=y[he];if(Se.visible){var Ne=Se.measuredBounds,Ge=Se.margin,Je=Ge.top+Ge.bottom,nt=te+E.bottom,ct=Ne.height,Ft=sl(Se,!1);(isNaN(Se.desiredSize.height)&&Ft===Hn||Ft===_r)&&(ct=Math.max(x.height-Je-nt,0)),Je=ct+Je+nt,nt=Se.alignment,nt.Xb()&&(nt=a.defaultAlignment),nt.sb()||(nt=Di),ne&&(se-=Ne.width+Ge.left+Ge.right),Se.arrange(se+nt.offsetX+Ge.left,ge+nt.offsetY+Ge.top+(x.height*nt.y-Je*nt.y),Ne.width,ct),ne||(se+=Ne.width+Ge.left+Ge.right)}}};function Sm(){this.xa="Base"}un(Sm,Ha),Sm.prototype.measure=function(a,y,x,b,E,te){var ne=b.length;x=pn();for(var se=nh(a),he=0;he<ne;he++){var ge=b[he];if(ge.visible||ge===se){var Se=sl(ge,!1);if(Se!==Bn&&Se!==_r)x.push(ge);else{var Ne=ge.margin;Se=Ne.right+Ne.left,Ne=Ne.top+Ne.bottom,ge.measure(y,1/0,te,0),ge=ge.measuredBounds,Fa(E,Math.max(E.width,Math.max(ge.width+Se,0)),E.height+Math.max(ge.height+Ne,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++)he=x[a],(he.visible||he===se)&&(ge=he.margin,ne=ge.right+ge.left,ge=ge.top+ge.bottom,he.measure(y,1/0,te,0),he=he.measuredBounds,ge=Math.max(he.height+ge,0),E.width=Math.max(E.width,Math.max(he.width+ne,0)),E.height+=ge);On(x)}},Sm.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,te=E.left,ne=a.isOpposite,se=ne?x.height:E.top,he=0;he<b;he++){var ge=te,Se=y[he];if(Se.visible){var Ne=Se.measuredBounds,Ge=Se.margin,Je=Ge.left+Ge.right,nt=te+E.right,ct=Ne.width,Ft=sl(Se,!1);(isNaN(Se.desiredSize.width)&&Ft===Hn||Ft===wr)&&(ct=Math.max(x.width-Je-nt,0)),Je=ct+Je+nt,nt=Se.alignment,nt.Xb()&&(nt=a.defaultAlignment),nt.sb()||(nt=Di),ne&&(se-=Ne.height+Ge.bottom+Ge.top),Se.arrange(ge+nt.offsetX+Ge.left+(x.width*nt.x-Je*nt.x),se+nt.offsetY+Ge.top,ct,Ne.height),ne||(se+=Ne.height+Ge.bottom+Ge.top)}}};function xm(){this.xa="Base"}un(xm,Ha),xm.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length,he=a.Pb(),ge=he.margin,Se=ge.right+ge.left,Ne=ge.top+ge.bottom;he.measure(y,x,te,ne);var Ge=he.measuredBounds;te=Ge.width,ne=Ge.height;var Je=Math.max(te+Se,0),nt=Math.max(ne+Ne,0),ct=a.isClipping,Ft=wn.allocAt(-ge.left,-ge.top,Je,nt),Ot=wn.allocAt(0,0,te,ne);pv(he,Ot,!0),te=Ot.width,ne=Ot.height;for(var zt=!0,Ht=nh(a),Wt=0;Wt<se;Wt++){var Xt=b[Wt];Ge=y;var hn=x;if(Xt!==he&&(Xt.visible||Xt===Ht)){ge=Xt.margin;var er=ge.left,cr=ge.top;switch(Je=ge.right+ge.left,nt=ge.top+ge.bottom,ge=sl(Xt,!1),ge){case Hn:Ge=te,hn=ne,cr=er=nt=Je=0;break;case wr:Ge=te,er=Je=0;break;case _r:hn=ne,cr=nt=0}Xt.measure(Ge,hn,0,0),Ge=Xt.measuredBounds,Je=Math.max(Ge.width+Je,0),nt=Math.max(Ge.height+nt,0),ge=Xt.alignment,ge.Xb()&&(ge=a.defaultAlignment),ge.sb()||(ge=Di);var sr=Xt.alignmentFocus;if(sr.Xb()&&(sr=Di),hn=null,Xt instanceof Un&&Xt.$e!==""&&(hn=Xt.fb(Xt.$e),hn===Xt&&(hn=null)),er=Ot.x-er,cr=Ot.y-cr,hn!==null){for(Xt.arrange(0,0,Ge.width,Ge.height),Ge=hn.actualBounds,Ge=It.allocAt(Ge.x+(sr.x*Ge.width-sr.offsetX),Ge.y+(sr.y*Ge.height-sr.offsetY)),hn=hn.panel;hn!==Xt;)hn.transform.Ga(Ge),hn=hn.panel;er+=ge.x*te+ge.offsetX-Ge.x,cr+=ge.y*ne+ge.offsetY-Ge.y,It.free(Ge)}else er+=ge.x*te+ge.offsetX-(sr.x*Ge.width+sr.offsetX),cr+=ge.y*ne+ge.offsetY-(sr.y*Ge.height+sr.offsetY);zt?(zt=!1,E.h(er,cr,Je,nt)):no(E,er,cr,Je,nt)}}switch(zt?E.assign(Ft):ct?E.Uu(Ot.x,Ot.y,Ot.width,Ot.height):no(E,Ft.x,Ft.y,Ft.width,Ft.height),wn.free(Ft),wn.free(Ot),ge=he.stretch,ge===oi&&(ge=sl(he,!1)),ge){case Bn:return;case Hn:if(!isFinite(y)&&!isFinite(x))return;break;case wr:if(!isFinite(y))return;break;case _r:if(!isFinite(x))return}for(Ge=he.measuredBounds,te=Ge.width,ne=Ge.height,Je=Math.max(te+Se,0),nt=Math.max(ne+Ne,0),ge=he.margin,Ot=wn.allocAt(-ge.left,-ge.top,Je,nt),pv(he,Ot,!0),te=Ot.width,ne=Ot.height,y=0;y<se;y++)x=b[y],x===he||!x.visible&&x!==Ht||(ge=x.margin,Je=ge.right+ge.left,nt=ge.top+ge.bottom,Ge=x.measuredBounds,Je=Math.max(Ge.width+Je,0),nt=Math.max(Ge.height+nt,0),Se=x.alignment,Se.Xb()&&(Se=a.defaultAlignment),Se.sb()||(Se=Di),x=x.alignmentFocus,x.Xb()&&(x=Di),zt?(zt=!1,E.h(Se.x*te+Se.offsetX-(x.x*Ge.width+x.offsetX)-ge.left,Se.y*ne+Se.offsetY-(x.y*Ge.height+x.offsetY)-ge.top,Je,nt)):no(E,Se.x*te+Se.offsetX-(x.x*Ge.width+x.offsetX)-ge.left,Se.y*ne+Se.offsetY-(x.y*Ge.height+x.offsetY)-ge.top,Je,nt));zt?E.assign(Ft):ct?E.Uu(Ot.x,Ot.y,Ot.width,Ot.height):no(E,Ft.x,Ft.y,Ft.width,Ft.height),wn.free(Ot)},xm.prototype.arrange=function(a,y,x){var b=y.length,E=a.Pb(),te=E.measuredBounds,ne=te.width,se=te.height,he=a.padding;te=he.left,he=he.top;var ge=te-x.x,Se=he-x.y;for(E.arrange(ge,Se,ne,se),ne=wn.allocAt(0,0,ne,se),pv(E,ne,!1),se=0;se<b;se++){var Ne=y[se];if(Ne!==E){ge=Ne.measuredBounds;var Ge=ge.width,Je=ge.height;Se=Ne.alignment,Se.Xb()&&(Se=a.defaultAlignment),Se.sb()||(Se=Di);var nt=Ne.alignmentFocus;if(nt.Xb()&&(nt=Di),ge=null,Ne instanceof Un&&Ne.$e!==""&&(ge=Ne.fb(Ne.$e),ge===Ne&&(ge=null)),ge!==null){var ct=ge.actualBounds;for(nt=It.allocAt(ct.x+(nt.x*ct.width-nt.offsetX),ct.y+(nt.y*ct.height-nt.offsetY)),ge=ge.panel;ge!==Ne;)ge.transform.Ga(nt),ge=ge.panel;ge=Se.x*ne.width+Se.offsetX-nt.x,Se=Se.y*ne.height+Se.offsetY-nt.y,It.free(nt)}else ge=Se.x*ne.width+Se.offsetX-(nt.x*Ge+nt.offsetX),Se=Se.y*ne.height+Se.offsetY-(nt.y*Je+nt.offsetY);ge+=ne.x-x.x,Se+=ne.y-x.y,Ne.visible&&Ne.arrange(te+ge,he+Se,Ge,Je)}}wn.free(ne)};function pv(a,y,x){var b=null;if(a instanceof Un&&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"}un(wm,Ha),wm.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length,he=a.Pb(),ge=he.margin,Se=y,Ne=x,Ge=ge.right+ge.left,Je=ge.top+ge.bottom;he.measure(y,x,te,ne),ge=he.measuredBounds;var nt=0,ct=null;he instanceof ci&&(ct=he,nt=ct.strokeWidth*ct.scale);var Ft=Math.max(ge.width+Ge,0);ge=Math.max(ge.height+Je,0);var Ot=yv(he),zt=Ot.x*Ft+Ot.offsetX;Ot=Ot.y*ge+Ot.offsetY;var Ht=Sv(he),Wt=Ht.x*Ft+Ht.offsetX;for(Ht=Ht.y*ge+Ht.offsetY,isFinite(y)&&(Se=Math.max(Math.abs(zt-Wt)-nt,0)),isFinite(x)&&(Ne=Math.max(Math.abs(Ot-Ht)-nt,0)),nt=Zn.alloc(),nt.h(0,0),a=nh(a),Ht=0;Ht<se;Ht++)Ot=b[Ht],Ot===he||!Ot.visible&&Ot!==a||(ge=Ot.margin,Ft=ge.right+ge.left,zt=ge.top+ge.bottom,Ot.measure(Se,Ne,0,0),ge=Ot.measuredBounds,Ft=Math.max(ge.width+Ft,0),ge=Math.max(ge.height+zt,0),nt.h(Math.max(Ft,nt.width),Math.max(ge,nt.height)));if(se===1)E.width=Ft,E.height=ge,Zn.free(nt);else{switch(Ot=yv(he),Ht=Sv(he),se=b=0,Ht.x!==Ot.x&&Ht.y!==Ot.y&&(b=nt.width/Math.abs(Ht.x-Ot.x),se=nt.height/Math.abs(Ht.y-Ot.y)),Zn.free(nt),nt=0,ct!==null&&(nt=ct.strokeWidth*ct.scale,Ev(ct)===fr&&(b=se=Math.max(b,se))),b+=Math.abs(Ot.offsetX)+Math.abs(Ht.offsetX)+nt,se+=Math.abs(Ot.offsetY)+Math.abs(Ht.offsetY)+nt,ct=he.stretch,ct===oi&&(ct=sl(he,!1)),ct){case Bn:ne=te=0;break;case Hn:isFinite(y)&&(b=y),isFinite(x)&&(se=x);break;case wr:isFinite(y)&&(b=y),ne=0;break;case _r:te=0,isFinite(x)&&(se=x)}he.Uj(),he.measure(b,se,te,ne),E.width=he.measuredBounds.width+Ge,E.height=he.measuredBounds.height+Je}},wm.prototype.arrange=function(a,y){var x=y.length,b=a.Pb(),E=b.measuredBounds,te=wn.alloc();te.h(0,0,1,1);var ne=b.margin,se=ne.left;ne=ne.top;var he=a.padding,ge=he.left;he=he.top,b.arrange(ge+se,he+ne,E.width,E.height);var Se=yv(b),Ne=Sv(b),Ge=Se.y*E.height+Se.offsetY,Je=Ne.x*E.width+Ne.offsetX;for(Ne=Ne.y*E.height+Ne.offsetY,te.x=Se.x*E.width+Se.offsetX,te.y=Ge,no(te,Je,Ne,0,0),te.x+=se+ge,te.y+=ne+he,E=0;E<x;E++)se=y[E],se!==b&&(ge=se.measuredBounds,ne=se.margin,he=Math.max(ge.width+ne.right+ne.left,0),Se=Math.max(ge.height+ne.top+ne.bottom,0),Ge=se.alignment,Ge.Xb()&&(Ge=a.defaultAlignment),Ge.sb()||(Ge=Di),he=te.width*Ge.x+Ge.offsetX-he*Ge.x+ne.left+te.x,ne=te.height*Ge.y+Ge.offsetY-Se*Ge.y+ne.top+te.y,se.visible&&(Mo(te.x,te.y,te.width,te.height,he,ne,ge.width,ge.height)?se.arrange(he,ne,ge.width,ge.height):se.arrange(he,ne,ge.width,ge.height,new wn(te.x,te.y,te.width,te.height))));wn.free(te)};function bm(){this.xa="Base",this.name="Table"}un(bm,Ha),bm.prototype.measure=function(a,y,x,b,E){for(var te=b.length,ne=pn(),se=pn(),he=0;he<te;he++){var ge=b[he],Se=ge instanceof Un?ge:null;if(Se!==null&&Ch(Se)&&ge.visible){se.push(Se);for(var Ne=Se.O.s,Ge=Ne.length,Je=0;Je<Ge;Je++){var nt=Ne[Je];Se.type===Un.TableRow?nt.row=ge.row:Se.type===Un.TableColumn&&(nt.column=ge.column),ne.push(nt)}}else ne.push(ge)}te=ne.length,te===0&&(a.Fb(0),a.Eb(0));for(var ct=[],Ft=0;Ft<te;Ft++){var Ot=ne[Ft];Ot.visible&&(Aa(Ot,!0),Mc(Ot,!0),ct[Ot.row]||(ct[Ot.row]=[]),ct[Ot.row][Ot.column]||(ct[Ot.row][Ot.column]=[]),ct[Ot.row][Ot.column].push(Ot))}On(ne);var zt=pn(),Ht=pn(),Wt=pn(),Xt={count:0},hn={count:0},er=y,cr=x,sr=a.rowDefs,Wn=a.colDefs,An=null;te=sr.length;for(var ei=0;ei<te;ei++)An=sr[ei],An!==void 0&&(An.actual=0);te=Wn.length;for(var Vr=0;Vr<te;Vr++)An=Wn[Vr],An!==void 0&&(An.actual=0);for(var Xi=ct.length,bo=0,Qa=0;Qa<Xi;Qa++)ct[Qa]&&(bo=Math.max(bo,ct[Qa].length));var rs=Math.min(a.topIndex,Xi-1),Fs=Math.min(a.leftIndex,bo-1),qa=0;Xi=ct.length;for(var Ih=nh(a),wa=0;wa<Xi;wa++)if(ct[wa]){bo=ct[wa].length;var qu=a.Fb(wa);qu.actual=0;for(var Bs=qu.oc=0;Bs<bo;Bs++)if(ct[wa][Bs]){var Dh=a.Eb(Bs);zt[Bs]===void 0&&(Dh.actual=0,Dh.oc=0,zt[Bs]=!0);for(var Ql=ct[wa][Bs],bu=Ql.length,Ol=0;Ol<bu;Ol++){var Sl=Ql[Ol];if(Sl.visible||Sl===Ih){var fd=1<Sl.rowSpan||1<Sl.columnSpan;fd&&(wa<rs||Bs<Fs||Ht.push(Sl));var ec=Sl.margin,Dp=ec.right+ec.left,Nl=ec.top+ec.bottom,Rs=Zu(Sl,qu,Dh,!1),Jg=Sl.desiredSize,Df=!isNaN(Jg.height),dc=!isNaN(Jg.width)&&Df;if(fd||Rs===Bn||dc||wa<rs||Bs<Fs||(Xt[Bs]!==void 0||Rs!==Hn&&Rs!==wr||(Xt[Bs]=-1,Xt.count++),hn[wa]!==void 0||Rs!==Hn&&Rs!==_r||(hn[wa]=-1,hn.count++),Wt.push(Sl)),Sl.measure(1/0,1/0,0,0),!(wa<rs||Bs<Fs)){var xl=Sl.measuredBounds,Qd=Math.max(xl.width+Dp,0),Al=Math.max(xl.height+Nl,0);if(Sl.rowSpan===1&&(Rs===Bn||Rs===wr)){An=a.Fb(wa);var pd=An.Wc();qa=Math.max(Al-An.actual,0),qa+pd>cr&&(qa=Math.max(cr-pd,0));var W0=An.oa===0;An.oc=An.oc+qa,An.actual=An.oa+qa,cr=Math.max(cr-(qa+(W0?pd:0)),0)}if(Sl.columnSpan===1&&(Rs===Bn||Rs===_r)){An=a.Eb(Bs);var Qg=An.Wc();qa=Math.max(Qd-An.actual,0),qa+Qg>er&&(qa=Math.max(er-Qg,0));var $y=An.oa===0;An.oc=An.oc+qa,An.actual=An.oa+qa,er=Math.max(er-(qa+($y?Qg:0)),0)}fd&&Sl.Uj()}}}}}On(zt);var Rc=0,oh=0;te=a.columnCount;for(var Ff=0;Ff<te;Ff++){var gd=Wn[Ff];gd!==void 0&&(Rc+=isNaN(gd.Hc)?gd.oc:gd.Hc,gd.oc!==0&&(Rc+=gd.Wc()))}te=a.rowCount;for(var Fp=0;Fp<te;Fp++){var md=sr[Fp];md!==void 0&&(oh+=isNaN(md.Hc)?md.oc:md.Hc,md.oc!==0&&(oh+=md.Wc()))}er=Math.max(y-Rc,0);var _c=cr=Math.max(x-oh,0),Fh=er;te=Wt.length;for(var wl=0;wl<te;wl++){var fc=Wt[wl],K0=a.Fb(fc.row),ah=a.Eb(fc.column),Bp=fc.measuredBounds,tc=fc.margin,qd=tc.right+tc.left,pc=tc.top+tc.bottom;Xt[fc.column]=ah.oc===0&&Xt[fc.column]!==void 0?Math.max(Bp.width+qd,Xt[fc.column]):null,hn[fc.row]=K0.oc===0&&hn[fc.row]!==void 0?Math.max(Bp.height+pc,hn[fc.row]):null}var Bf=0,Rp=0,Fu;for(Fu in hn)Fu!=="count"&&(Bf+=hn[Fu]);for(Fu in Xt)Fu!=="count"&&(Rp+=Xt[Fu]);for(var fs=Zn.alloc(),qg=0;qg<te;qg++){var Qs=Wt[qg];if(Qs.visible||Qs===Ih){var ba=a.Fb(Qs.row),el=a.Eb(Qs.column),sh=0;isFinite(el.width)?sh=el.width:(isFinite(er)&&Xt[Qs.column]!==null?Rp===0?sh=el.actual+er:sh=Xt[Qs.column]/Rp*Fh:Xt[Qs.column]!==null?sh=er:sh=el.actual||er,sh=Math.max(0,sh-el.Wc()));var Bh=0;switch(isFinite(ba.height)?Bh=ba.height:(isFinite(cr)&&hn[Qs.row]!==null?Bf===0?Bh=ba.actual+cr:Bh=hn[Qs.row]/Bf*_c:hn[Qs.row]!==null?Bh=cr:Bh=ba.actual||cr,Bh=Math.max(0,Bh-ba.Wc())),fs.h(Math.max(el.minimum,Math.min(sh,el.maximum)),Math.max(ba.minimum,Math.min(Bh,ba.maximum))),Rs=Zu(Qs,ba,el,!1),Rs){case wr:fs.height=Math.max(fs.height,ba.actual+cr);break;case _r:fs.width=Math.max(fs.width,el.actual+er)}var ef=Qs.margin,Gy=ef.right+ef.left,V0=ef.top+ef.bottom;Qs.Uj(),Qs.measure(fs.width,fs.height,el.minimum,ba.minimum);var _p=Qs.measuredBounds,tf=Math.max(_p.width+Gy,0),Rf=Math.max(_p.height+V0,0);isFinite(er)&&(tf=Math.min(tf,fs.width)),isFinite(cr)&&(Rf=Math.min(Rf,fs.height));var bl=0;bl=ba.actual,ba.actual=Math.max(ba.actual,Rf),ba.oc=Math.max(ba.oc,Rf),qa=ba.actual-bl,cr=Math.max(cr-qa,0),hn[Qs.row]===null&&(_c=Math.max(_c-qa,0)),bl=el.actual,el.actual=Math.max(el.actual,tf),el.oc=Math.max(el.oc,tf),qa=el.actual-bl,er=Math.max(er-qa,0),Xt[Qs.column]===null&&(Fh=Math.max(Fh-qa,0))}}On(Wt);var lh=Zn.alloc(),nc=pn(),fu=pn();if(te=Ht.length,te!==0){for(var vd=0;vd<Xi;vd++)if(ct[vd]){bo=ct[vd].length;var zp=a.Fb(vd);nc[vd]=zp.actual;for(var yd=0;yd<bo;yd++)if(ct[vd][yd]){var Z0=a.Eb(yd);fu[yd]=Z0.actual}}}for(var $p=0;$p<te;$p++){var aa=Ht[$p];if(aa.visible||aa===Ih){var Bu=a.Fb(aa.row),Pu=a.Eb(aa.column);switch(fs.h(Math.max(Pu.minimum,Math.min(y,Pu.maximum)),Math.max(Bu.minimum,Math.min(x,Bu.maximum))),Rs=Zu(aa,Bu,Pu,!1),Rs){case Hn:fu[Pu.index]!==0&&(fs.width=Math.min(fs.width,fu[Pu.index])),nc[Bu.index]!==0&&(fs.height=Math.min(fs.height,nc[Bu.index]));break;case wr:fu[Pu.index]!==0&&(fs.width=Math.min(fs.width,fu[Pu.index]));break;case _r:nc[Bu.index]!==0&&(fs.height=Math.min(fs.height,nc[Bu.index]))}isFinite(Pu.width)&&(fs.width=Pu.width),isFinite(Bu.height)&&(fs.height=Bu.height),lh.h(0,0);for(var X0=Pu.minimum,jl=Bu.minimum,Rh=1;Rh<aa.rowSpan&&!(aa.row+Rh>=a.rowCount);Rh++)An=a.Fb(aa.row+Rh),qa=0,qa=Rs===Hn||Rs===_r?Math.max(An.minimum,nc[aa.row+Rh]===0?An.maximum:Math.min(nc[aa.row+Rh],An.maximum)):Math.max(An.minimum,isNaN(An.Hc)?An.maximum:Math.min(An.Hc,An.maximum)),lh.height+=qa,jl+=An.minimum;for(var Cu=1;Cu<aa.columnSpan&&!(aa.column+Cu>=a.columnCount);Cu++)An=a.Eb(aa.column+Cu),qa=0,qa=Rs===Hn||Rs===wr?Math.max(An.minimum,fu[aa.column+Cu]===0?An.maximum:Math.min(fu[aa.column+Cu],An.maximum)):Math.max(An.minimum,isNaN(An.Hc)?An.maximum:Math.min(An.Hc,An.maximum)),lh.width+=qa,X0+=An.minimum;fs.width+=lh.width,fs.height+=lh.height;var Gp=aa.margin,Sd=Gp.right+Gp.left,em=Gp.top+Gp.bottom;aa.measure(fs.width,fs.height,X0,jl);for(var Hp=aa.measuredBounds,gc=Math.max(Hp.width+Sd,0),nf=Math.max(Hp.height+em,0),xd=0,Up=0;Up<aa.rowSpan&&!(aa.row+Up>=a.rowCount);Up++)An=a.Fb(aa.row+Up),xd+=An.total||0;if(xd<nf){var _h=nf-xd,zc=nf-xd;if(aa.spanAllocation!==null)for(var zh=aa.spanAllocation,uh=0;uh<aa.rowSpan&&!(0>=_h)&&!(aa.row+uh>=a.rowCount);uh++){An=a.Fb(aa.row+uh);var $h=An.oa||0,rf=zh(aa,An,zc);An.actual=Math.min(An.maximum,$h+rf),An.oa!==$h&&(_h-=An.oa-$h)}for(;0<_h;){var rc=An.oa||0;if(isNaN(An.height)&&An.maximum>rc&&(An.actual=Math.min(An.maximum,rc+_h),An.oa!==rc&&(_h-=An.oa-rc)),An.index===0)break;An=a.Fb(An.index-1)}}for(var _f=0,Gh=0;Gh<aa.columnSpan&&!(aa.column+Gh>=a.columnCount);Gh++)An=a.Eb(aa.column+Gh),_f+=An.total||0;if(_f<gc){var zf=gc-_f,Hy=gc-_f;if(aa.spanAllocation!==null)for(var ch=aa.spanAllocation,of=0;of<aa.columnSpan&&!(0>=zf)&&!(aa.column+of>=a.columnCount);of++){An=a.Eb(aa.column+of);var tm=An.oa||0,Uy=ch(aa,An,Hy);An.actual=Math.min(An.maximum,tm+Uy),An.oa!==tm&&(zf-=An.oa-tm)}for(;0<zf;){var Y0=An.oa||0;if(isNaN(An.width)&&An.maximum>Y0&&(An.actual=Math.min(An.maximum,Y0+zf),An.oa!==Y0&&(zf-=An.oa-Y0)),An.index===0)break;An=a.Eb(An.index-1)}}}}On(Ht),Zn.free(lh),Zn.free(fs),nc!==void 0&&On(nc),fu!==void 0&&On(fu);var $f=0,Gf=0,J0=a.desiredSize,gx=a.maxSize;Rs=sl(a,!0);var nm=oh=Rc=0,rm=0;te=a.columnCount;for(var Q0=0;Q0<te;Q0++)Wn[Q0]!==void 0&&(An=a.Eb(Q0),isFinite(An.width)?(nm+=An.width,nm+=An.Wc()):Am(An)===pg?(nm+=An.oa,nm+=An.Wc()):An.oa!==0&&(Rc+=An.oa,Rc+=An.Wc()));isFinite(J0.width)?$f=Math.min(J0.width,gx.width):$f=Rs!==Bn&&isFinite(y)?y:Rc,$f=Math.max($f,a.minSize.width),$f=Math.max($f-nm,0);for(var Qx=Rc===0?1:Math.max($f/Rc,1),q0=0;q0<te;q0++)Wn[q0]!==void 0&&(An=a.Eb(q0),isFinite(An.width)||Am(An)===pg||(An.actual=An.oa*Qx),An.position=E.width,An.oa!==0&&(E.width+=An.oa,E.width+=An.Wc()));te=a.rowCount;for(var ev=0;ev<te;ev++)sr[ev]!==void 0&&(An=a.Fb(ev),isFinite(An.height)?(rm+=An.height,rm+=An.Wc()):Am(An)===pg?(rm+=An.oa,rm+=An.Wc()):An.oa!==0&&(oh+=An.oa,oh+=An.Wc()));isFinite(J0.height)?Gf=Math.min(J0.height,gx.height):Gf=Rs!==Bn&&isFinite(x)?x:oh,Gf=Math.max(Gf,a.minSize.height),Gf=Math.max(Gf-rm,0);for(var qx=oh===0?1:Math.max(Gf/oh,1),tv=0;tv<te;tv++)sr[tv]!==void 0&&(An=a.Fb(tv),isFinite(An.height)||Am(An)===pg||(An.actual=An.oa*qx),An.position=E.height,An.oa!==0&&(E.height+=An.oa,E.height+=An.Wc()));te=se.length;for(var Wy=0;Wy<te;Wy++){var im=se[Wy],Ky=0,Vy=0;im.type===Un.TableRow?(Ky=E.width,An=a.Fb(im.row),Vy=An.actual):(An=a.Eb(im.column),Ky=An.actual,Vy=E.height),im.measuredBounds.h(0,0,Ky,Vy),Aa(im,!1)}On(se),a.inRowsCols=ct},bm.prototype.arrange=function(a,y,x){var b=y.length,E=a.padding,te=E.left;E=E.top;var ne=a.inRowsCols;if(ne!==null){for(var se,he,ge=ne.length,Se=0,Ne=0;Ne<ge;Ne++)ne[Ne]&&(Se=Math.max(Se,ne[Ne].length));he=a.rowDefs,se=a.colDefs;var Ge=Ne=0,Je=Math.min(a.topIndex,ge-1);if(0<he.length){for(;Je!==ge&&(he[Je]===void 0||he[Je].oa===0);)Je++;Je=Math.max(Math.min(Je,ge-1),0),Ne=-he[Je].position}var nt=Math.min(a.leftIndex,Se-1);if(0<se.length){for(;nt!==Se&&(se[nt]===void 0||se[nt].oa===0);)nt++;nt=Math.max(Math.min(nt,Se-1),0),Ge=-se[nt].position}for(var ct=0,Ft=0;ct!==ge&&he[ct]===void 0;)ct++;for(;Ft!==ge&&se[Ft]===void 0;)Ft++;Se=a.part,a.Fb(ct),a.Eb(Ft);for(var Ot=0;Ot<y.length;Ot++){var zt=y[Ot];if(zt instanceof Un&&zt.visible&&Ch(zt)){if(zt.type===Un.TableRow){se=a.Fb(zt.row);var Ht=a.Eb(Ft)}else se=a.Fb(ct),Ht=a.Eb(zt.column);he=se.position+Ne+E,se.oa!==0&&(he+=se.Io(Math.max(ct,Je))),se=Ht.position+Ge+te,Ht.oa!==0&&(se+=Ht.Io(Math.max(Ft,nt))),Ht=zt.measuredBounds,zt.Uk(),zt.actualBounds.ka();var Wt=zt.actualBounds,Xt=wn.allocAt(Wt.x,Wt.y,Wt.width,Wt.height);Wt.x=zt.type===Un.TableRow?te:se,Wt.y=zt.type===Un.TableColumn?E:he,Wt.width=Ht.width,Wt.height=Ht.height,zt.actualBounds.freeze(),Mc(zt,!1),Ji(Xt,Wt)||Se===null||(Se.oh(),zt.Pn(Se)),wn.free(Xt)}}for(Ot=Zn.alloc(),zt=0;zt<ge;zt++)if(ne[zt]){for(Se=ne[zt].length,Ht=a.Fb(zt),he=Ht.position+Ne+E,Ht.oa!==0&&(he+=Ht.Io(Math.max(ct,Je))),Wt=0;Wt<Se;Wt++)if(ne[zt][Wt]){Xt=a.Eb(Wt),se=Xt.position+Ge+te,Xt.oa!==0&&(se+=Xt.Io(Math.max(Ft,nt)));for(var hn=ne[zt][Wt],er=hn.length,cr=0;cr<er;cr++){var sr=hn[cr],Wn=sr.measuredBounds;Ot.h(0,0);for(var An=1;An<sr.rowSpan&&!(zt+An>=a.rowCount);An++){var ei=a.Fb(zt+An);ei.oa!==0&&(Ot.height+=ei.total)}for(An=1;An<sr.columnSpan&&!(Wt+An>=a.columnCount);An++)ei=a.Eb(Wt+An),ei.oa!==0&&(Ot.width+=ei.total);var Vr=Xt.oa+Ot.width,Xi=Ht.oa+Ot.height;An=se,ei=he;var bo=Vr,Qa=Xi,rs=se,Fs=he,qa=Vr,Ih=Xi;se+Vr>x.width&&(qa=Math.max(x.width-se,0)),he+Xi>x.height&&(Ih=Math.max(x.height-he,0));var wa=sr.alignment;if(wa.Xb()){wa=a.defaultAlignment,wa.sb()||(wa=Di);var qu=wa.x,Bs=wa.y,Dh=wa.offsetX;wa=wa.offsetY;var Ql=Xt.alignment,bu=Ht.alignment;Ql.sb()&&(qu=Ql.x,Dh=Ql.offsetX),bu.sb()&&(Bs=bu.y,wa=bu.offsetY)}else qu=wa.x,Bs=wa.y,Dh=wa.offsetX,wa=wa.offsetY;(isNaN(qu)||isNaN(Bs))&&(Bs=qu=.5,wa=Dh=0),Ql=Wn.width,bu=Wn.height;var Ol=sr.margin,Sl=Ol.left+Ol.right,fd=Ol.top+Ol.bottom,ec=Zu(sr,Ht,Xt,!1);!isNaN(sr.desiredSize.width)||ec!==Hn&&ec!==wr||(Ql=Math.max(Vr-Sl,0)),!isNaN(sr.desiredSize.height)||ec!==Hn&&ec!==_r||(bu=Math.max(Xi-fd,0)),Vr=sr.maxSize,Xi=sr.minSize,Ql=Math.min(Vr.width,Ql),bu=Math.min(Vr.height,bu),Ql=Math.max(Xi.width,Ql),bu=Math.max(Xi.height,bu),Vr=bu+fd,An+=bo*qu-(Ql+Sl)*qu+Dh+Ol.left,ei+=Qa*Bs-Vr*Bs+wa+Ol.top,sr.visible&&(Mo(rs,Fs,qa,Ih,An,ei,Wn.width,Wn.height)?sr.arrange(An,ei,Ql,bu):sr.arrange(An,ei,Ql,bu,new wn(rs,Fs,qa,Ih)))}}}for(Zn.free(Ot),a=0;a<b;a++)x=y[a],te=x instanceof Un?x:null,te!==null&&Ch(te)&&(te=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,te.width,te.height),x.naturalBounds.freeze())}};function Pm(){this.xa="Base"}un(Pm,Ha),Pm.prototype.measure=function(){},Pm.prototype.arrange=function(){};function Cm(){this.xa="Base"}un(Cm,Ha),Cm.prototype.measure=function(){},Cm.prototype.arrange=function(){};function Em(){this.xa="Base"}un(Em,Ha),Em.prototype.measure=function(a,y,x,b,E,te,ne){1<b.length&&Yt("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 se=b.measuredBounds,he=b.margin,ge=he.right+he.left;if(he=he.top+he.bottom,isFinite(y)||isFinite(x)){var Se=b.scale,Ne=se.width;se=se.height;var Ge=Math.max(y-ge,0),Je=Math.max(x-he,0),nt=1;a.viewboxStretch===fr?Ne!==0&&se!==0&&(nt=Math.min(Ge/Ne,Je/se)):Ne!==0&&se!==0&&(nt=Math.max(Ge/Ne,Je/se)),nt===0&&(nt=1e-4),b.Ca*=nt,Se!==b.scale&&(Aa(b,!0),b.measure(1/0,1/0,te,ne))}se=b.measuredBounds,E.width=isFinite(y)?y:Math.max(se.width+ge,0),E.height=isFinite(x)?x:Math.max(se.height+he,0)},Em.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=Di),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"}un(hg,Ha),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,se=te.width,he=te.height,ge=Math.ceil(se/E),Se=Math.ceil(he/b),Ne=a.gridOrigin,Ge=Ne.x;Ne=Ne.y,y.save(),y.beginPath(),y.rect(0,0,se,he),y.clip(),y.Se();for(var Je=[],nt=a.O.s,ct=nt.length,Ft=0;Ft<ct;Ft++){var Ot=nt[Ft],zt=[];if(Je.push(zt),Ot.visible){var Ht=Ot.interval;if(!(0>Ht)){Ot=mv(Ot.figure);for(var Wt=0;Wt<ct;Wt++)if(Wt!==Ft){var Xt=nt[Wt];Xt.visible&&mv(Xt.figure)===Ot&&(Xt=Xt.interval,Xt>Ht&&zt.push(Xt))}}}}for(nt=a.O.s,ct=nt.length,Ft=0;Ft<ct;Ft++){var hn=nt[Ft];if(hn.visible&&(zt=hn.interval||1,Ot=Math.abs(zt),!(2>E*Ot*x))){if(Ht=hn.segmentIndex,(!isFinite(Ht)||isNaN(Ht))&&(Ht=0),0>Ht&&(Ht=Ot-Math.min(-Ht,Ot)),Ht=Math.round(Ht%Ot),Ot=hn.opacity,Wt=1,Ot!==1){if(Ot===0)continue;Wt=y.globalAlpha,y.globalAlpha=Wt*Ot}Xt=Je[Ft];var er=!1,cr=hn.strokeDashArray;if(cr!==null&&(er=!0,y.js(cr,hn.strokeDashOffset)),hn.figure==="LineV"&&hn.stroke!==null&&0<hn.strokeWidth){for(y.lineWidth=hn.strokeWidth,ia(a,y,hn.stroke,!1,!1,te,ne),y.beginPath(),cr=hn=Math.floor((Ge-E)/E);cr<=hn+ge;cr++){var sr=cr*E+Ge;0<=sr&&sr<=se&&Tm(cr,zt,Ht,Xt)&&(y.moveTo(sr,0),y.lineTo(sr,he))}y.stroke(),y.Se()}else if(hn.figure==="LineH"&&hn.stroke!==null&&0<hn.strokeWidth){for(y.lineWidth=hn.strokeWidth,ia(a,y,hn.stroke,!1,!1,te,ne),y.beginPath(),cr=hn=Math.floor((Ne-b)/b);cr<=hn+Se;cr++)sr=cr*b+Ne,0<=sr&&sr<=he&&Tm(cr,zt,Ht,Xt)&&(y.moveTo(0,sr),y.lineTo(se,sr));y.stroke(),y.Se()}else if(hn.figure==="BarV"&&hn.fill!==null)for(ia(a,y,hn.fill,!0,!1,te,ne),hn=hn.width,isNaN(hn)&&(hn=E),sr=cr=Math.floor((Ge-E)/E);sr<=cr+ge;sr++){var Wn=sr*E+Ge;0<=Wn+hn&&Wn<=se&&Tm(sr,zt,Ht,Xt)&&y.fillRect(Wn,0,hn,he)}else if(hn.figure==="BarH"&&hn.fill!==null)for(ia(a,y,hn.fill,!0,!1,te,ne),hn=hn.height,isNaN(hn)&&(hn=b),sr=cr=Math.floor((Ne-b)/b);sr<=cr+Se;sr++)Wn=sr*b+Ne,0<=Wn+hn&&Wn<=he&&Tm(sr,zt,Ht,Xt)&&y.fillRect(0,Wn,se,hn);er&&y.fs(),Ot!==1&&(y.globalAlpha=Wt)}}y.restore(),y.Vc(!1)};function Tm(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 Mm(){this.xa="Base"}un(Mm,Ha),Mm.prototype.measure=function(a,y,x,b,E){var te=b.length;if(a instanceof Ui||a instanceof Vn){var ne=null,se=null;if(a instanceof Vn&&(ne=a),a instanceof Ui&&(se=a,ne=se.adornedPart,a.j===null&&(a.j=[])),ne instanceof Vn){var he=ne;if(te===0)Fa(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var ge=a instanceof Ui?null:ne.path;y=ne.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var Se=he.points,Ne=ne.pointsCount;se!==null?se.Ul(!1):ne!==null&&ne.Ul(!1),se=y.width;var Ge=y.height,Je=a.j;if(Je.length=0,ge!==null){i1(a,se,Ge,ge);var nt=ge.measuredBounds;x.ed(nt),Je.push(nt)}nt=fi.alloc();for(var ct=It.alloc(),Ft=It.alloc(),Ot=0;Ot<te;Ot++){var zt=b[Ot];if(zt!==ge)if(zt.isPanelMain&&zt instanceof ci){i1(a,se,Ge,zt);var Ht=zt.measuredBounds;x.ed(Ht),Je.push(Ht)}else if(2>Ne)zt.measure(1/0,1/0,0,0),Ht=zt.measuredBounds,x.ed(Ht),Je.push(Ht);else{var Wt=zt.segmentIndex,Xt=zt.segmentFraction,hn=zt.alignmentFocus;hn.Mc()&&(hn=Di);var er=zt.segmentOrientation,cr=zt.segmentOffset;if(isNaN(Wt)){var sr=he.ua;Ht=pn(),sr.Qu(Xt,Ht);var Wn=It.allocAt(Ht[0],Ht[1]);if(Wn.add(he.i(0)),sr.type===Jn.j?Wn.offset(-sr.startX,-sr.startY):(sr=sr.figures.first(),sr!==null&&Wn.offset(-sr.startX,-sr.startY)),sr=Ht[2],er!==Vs){var An=he.computeAngle(zt,er,sr);zt.Kb=An}An=Wn.x-y.x;var ei=Wn.y-y.y;It.free(Wn),On(Ht)}else if(Wt<-Ne||Wt>=Ne)Ht=It.alloc(),he.vg(),he.computeMidPoint(Ht),sr=he.midAngle,er!==Vs&&(An=he.computeAngle(zt,er,sr),zt.Kb=An),An=Ht.x-y.x,ei=Ht.y-y.y,It.free(Ht);else{if(An=0,0<=Wt?(ei=Se.M(Wt),Ht=Wt<Ne-1?Se.M(Wt+1):ei):(An=Ne+Wt,ei=Se.M(An),Ht=0<An?Se.M(An-1):ei),ei.Xa(Ht)){0<=Wt?(sr=0<Wt?Se.M(Wt-1):ei,An=Wt<Ne-2?Se.M(Wt+2):Ht):(sr=An<Ne-1?Se.M(An+1):ei,An=1<An?Se.M(An-2):Ht),Wn=sr.Bf(ei);var Vr=Ht.Bf(An);sr=Wn>Vr+10?0<=Wt?sr.ab(ei):ei.ab(sr):Vr>Wn+10?0<=Wt?Ht.ab(An):An.ab(Ht):0<=Wt?sr.ab(An):An.ab(sr)}else sr=0<=Wt?ei.ab(Ht):Ht.ab(ei);er!==Vs&&(An=he.computeAngle(zt,er,sr),zt.Kb=An),An=ei.x+(Ht.x-ei.x)*Xt-y.x,ei=ei.y+(Ht.y-ei.y)*Xt-y.y}zt.measure(1/0,1/0,0,0),Ht=zt.measuredBounds,Wn=zt.naturalBounds;var Xi=0;zt instanceof ci&&(Xi=zt.strokeWidth),Vr=Wn.width+Xi;var bo=Wn.height+Xi;nt.reset(),nt.translate(-Ht.x,-Ht.y),nt.scale(zt.scale,zt.scale),nt.rotate(er===Vs?zt.angle:sr,Vr/2,bo/2),er!==Cg&&er!==Tg||nt.rotate(90,Vr/2,bo/2),er!==Eg&&er!==Mg||nt.rotate(-90,Vr/2,bo/2),er===r0&&(45<sr&&135>sr||225<sr&&315>sr)&&nt.rotate(-sr,Vr/2,bo/2),Wn=new wn(0,0,Vr,bo),ct.xi(Wn,hn),nt.Ga(ct),hn=-ct.x+Xi/2*zt.scale,zt=-ct.y+Xi/2*zt.scale,Ft.assign(cr),Xi=isNaN(cr.x);var Qa=isNaN(cr.y);if(Xi||Qa){Vr=Vr/2+3,bo=bo/2+3;var rs=45<=sr&&135>=sr,Fs=225<=sr&&315>=sr;er===Vs&&(rs||Fs)?(Ft.x=Qa?Vr:cr.y,Ft.y=Xi?bo:cr.x,rs?0<=Wt||isNaN(Wt)&&.5>Xt||!Xi||(Ft.y=-bo):Fs&&((0<=Wt||isNaN(Wt)&&.5>Xt)&&Xi&&(Ft.y=-bo),Qa&&(Ft.x=-Vr))):(Xi&&(Ft.x=0<=Wt||isNaN(Wt)&&.5>Xt?Vr:-Vr),Qa&&(Ft.y=-bo),Ft.rotate(sr))}else Ft.rotate(sr);An+=Ft.x,ei+=Ft.y,Wn.set(Ht),Wn.h(An+hn,ei+zt,Ht.width,Ht.height),Je.push(Wn),x.ed(Wn)}}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),Fa(E,x.width||0,x.height||0),fi.free(nt),It.free(ct),It.free(Ft)}}}},Mm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof Ui||a instanceof Vn){var b=a,E=null;a instanceof Ui&&(E=a,b=E.adornedPart);var te=a instanceof Ui?null:b.path,ne=a.j;if(ne.length!==0){var se=0;if(te!==null&&se<ne.length){var he=ne[se];se++,te.arrange(he.x-a.jg.x,he.y-a.jg.y,he.width,he.height)}for(he=0;he<x;he++){var ge=y[he];if(ge!==te&&se<ne.length){var Se=ne[se];se++,ge.arrange(Se.x-a.jg.x,Se.y-a.jg.y,Se.width,Se.height)}}}if(y=b.points,x=y.count,2<=x&&a instanceof Vn)for(te=a.labelNodes;te.next();){var Ne=a;ne=te.value,se=ne.segmentIndex,he=ne.segmentFraction;var Ge=ne.alignmentFocus;if(ge=ne.segmentOrientation,Se=ne.segmentOffset,isNaN(se)){var Je=Ne.ua,nt=pn();Je.Qu(he,nt);var ct=It.allocAt(nt[0],nt[1]);ct.add(Ne.i(0)),Je.type===Jn.j||(Je=Je.figures.first()),ct.offset(-Je.startX,-Je.startY),Je=nt[2],ge!==Vs&&(Ne=Ne.computeAngle(ne,ge,Je),ne.angle=Ne),Ne=ct.x;var Ft=ct.y;It.free(ct),On(nt)}else if(se<-x||se>=x)nt=It.alloc(),Je=Ne,Ft=nt,Je.vg(),Je.computeMidPoint(Ft),Je=Ne.midAngle,ge!==Vs&&(Ne=Ne.computeAngle(ne,ge,Je),ne.angle=Ne),Ne=nt.x,Ft=nt.y,It.free(nt);else{if(ct=0,0<=se?(nt=y.s[se],Ft=se<x-1?y.s[se+1]:nt):(ct=x+se,nt=y.s[ct],Ft=0<ct?y.s[ct-1]:nt),nt.Xa(Ft)){0<=se?(Je=0<se?y.s[se-1]:nt,ct=se<x-2?y.s[se+2]:Ft):(Je=ct<x-1?y.s[ct+1]:nt,ct=1<ct?y.s[ct-2]:Ft);var Ot=Je.Bf(nt),zt=Ft.Bf(ct);Je=Ot>zt+10?0<=se?Je.ab(nt):nt.ab(Je):zt>Ot+10?0<=se?Ft.ab(ct):ct.ab(Ft):0<=se?Je.ab(ct):ct.ab(Je)}else Je=0<=se?nt.ab(Ft):Ft.ab(nt);ge!==Vs&&(Ne=Ne.computeAngle(ne,ge,Je),ne.angle=Ne),Ne=nt.x+(Ft.x-nt.x)*he,Ft=nt.y+(Ft.y-nt.y)*he}if(Ge.ys())ne.location=new It(Ne,Ft);else{Ge.Mc()&&(Ge=Di),nt=fi.alloc(),nt.reset(),nt.scale(ne.scale,ne.scale),nt.rotate(ne.angle,0,0);var Ht=ne.naturalBounds;ct=wn.allocAt(0,0,Ht.width,Ht.height),Ot=It.alloc(),Ot.xi(ct,Ge),nt.Ga(Ot),Ge=-Ot.x,zt=-Ot.y;var Wt=Ht.width,Xt=Ht.height;Ht=It.alloc(),Ht.assign(Se);var hn=isNaN(Se.x),er=isNaN(Se.y);if(hn||er){Wt=Wt/2+3,Xt=Xt/2+3;var cr=45<=Je&&135>=Je,sr=225<=Je&&315>=Je;ge===Vs&&(cr||sr)?(Ht.x=er?Wt:Se.y,Ht.y=hn?Xt:Se.x,cr?0<=se||isNaN(se)&&.5>he||!hn||(Ht.y=-Xt):sr&&((0<=se||isNaN(se)&&.5>he)&&hn&&(Ht.y=-Xt),er&&(Ht.x=-Wt))):(hn&&(Ht.x=0<=se||isNaN(se)&&.5>he?Wt:-Wt),er&&(Ht.y=-Xt),Ht.rotate(Je))}else Ht.rotate(Je);Ne+=Ht.x,Ft+=Ht.y,nt.pp(ct),Ge+=ct.x,zt+=ct.y,se=It.allocAt(Ne+Ge,Ft+zt),ne.move(se),It.free(se),It.free(Ht),It.free(Ot),wn.free(ct),fi.free(nt)}}E!==null?E.Ul(!1):b.Ul(!1),b=j1(a),a.location.h(a.position.x+b.x,a.position.y+b.y),It.free(b)}};function i1(a,y,x,b){if(Zl(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof Ui&&a.type===Un.Link&&a.adornedObject instanceof ci&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof Vn&&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 Ui&&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),Aa(b,!1)}}function dg(){this.xa="Base"}un(dg,Ha),dg.prototype.measure=function(a,y,x,b,E,te,ne){var se=a.Pb();a.graduatedBounds=[];var he=se.margin,ge=he.right+he.left,Se=he.top+he.bottom;se.measure(y,x,te,ne);var Ne=se.measuredBounds,Ge=new wn(-he.left,-he.top,Math.max(Ne.width+ge,0),Math.max(Ne.height+Se,0));a.graduatedBounds.push(Ge),E.assign(Ge);for(var Je=se.geometry,nt=se.strokeWidth,ct=Je.flattenedSegments,Ft=Je.flattenedLengths,Ot=Je.flattenedTotalLength,zt=ct.length,Ht=0,Wt=0,Xt=pn(),hn=0;hn<zt;hn++){var er=ct[hn],cr=[];Wt=Ht=0;for(var sr=er.length,Wn=0;Wn<sr;Wn+=2){var An=er[Wn],ei=er[Wn+1];if(Wn!==0){var Vr=180*Math.atan2(ei-Wt,An-Ht)/Math.PI;0>Vr&&(Vr+=360),cr.push(Vr)}Ht=An,Wt=ei}Xt.push(cr)}if(a.graduatedIntervals===null){for(var Xi=[],bo=a.O.s,Qa=bo.length,rs=0;rs<Qa;rs++){var Fs=bo[rs],qa=[];if(Xi.push(qa),Fs.visible){var Ih=Fs.interval;if(!(0>Ih)){for(var wa=0;wa<Qa;wa++)if(wa!==rs){var qu=bo[wa];if(qu.visible&&Fs.constructor===qu.constructor){var Bs=qu.interval;Bs>Ih&&qa.push(Bs)}}}}}a.graduatedIntervals=Xi}var Dh=a.graduatedIntervals,Ql=a.O.s,bu=Ql.length,Ol=0,Sl=0,fd=Ot;a.graduatedMarks=[];for(var ec,Dp=0;Dp<bu;Dp++){var Nl=Ql[Dp];if(ec=[],Nl.visible&&Nl!==se){var Rs=Math.abs(Nl.interval),Jg=a.graduatedTickUnit;if(!(2>Jg*Rs*Ot/a.graduatedRange&&Nl.graduatedSkip===null)){var Df=Ft[0][0],dc=0,xl=0;Sl=Ot*Nl.graduatedStart-1e-4,fd=Ot*Nl.graduatedEnd+1e-4;var Qd=Jg*Rs,Al=a.graduatedTickBase;if(Al<a.graduatedMin){var pd=(a.graduatedMin-Al)/Qd;pd=pd%1===0?pd:Math.floor(pd+1),Al+=pd*Qd}else Al>a.graduatedMin+Qd&&(Al-=Math.floor((Al-a.graduatedMin)/Qd)*Qd);for(var W0=Dh[Dp],Qg=Al,$y=1e-6*a.graduatedMax,Rc=1;Al<=a.graduatedMax+$y;Rc++){e:{for(var oh=W0.length,Ff=0;Ff<oh;Ff++){var gd=(Al-a.graduatedTickBase)%(W0[Ff]*a.graduatedTickUnit),Fp=1e-6*a.graduatedTickUnit;if(gd<Fp&&gd>-Fp){var md=!1;break e}}md=!0}if(md&&(Al>a.graduatedMax&&(Al=a.graduatedMax),Nl.graduatedSkip===null||Nl instanceof Co&&!Nl.graduatedSkip(Al,Nl)||Nl instanceof ci&&!Nl.graduatedSkip(Al,Nl))&&(Ol=(Al-a.graduatedMin)*Ot/a.graduatedRange,Ol>Ot&&(Ol=Ot),Sl<=Ol&&Ol<=fd)){for(var _c=Xt[dc][xl],Fh=Ft[dc][xl];dc<Ft.length;){for(;Ol>Df&&xl<Ft[dc].length-1;)xl++,_c=Xt[dc][xl],Fh=Ft[dc][xl],Df+=Fh;if(Ol<=Df)break;dc++,xl=0,_c=Xt[dc][xl],Fh=Ft[dc][xl],Df+=Fh}var wl=ct[dc],fc=wl[2*xl],K0=wl[2*xl+1],ah=(Ol-(Df-Fh))/Fh,Bp=new It(fc+(wl[2*xl+2]-fc)*ah+nt/2-Je.bounds.x,K0+(wl[2*xl+3]-K0)*ah+nt/2-Je.bounds.y);Bp.scale(se.scale,se.scale);e:{var tc=_c,qd=Xt[dc];if(!(.5005>ah&&.4995<ah)){var pc=tc;if(.5>ah?0<xl?pc=qd[xl-1]:qt.$(wl[0],wl[wl.length-2])&&qt.$(wl[1],wl[wl.length-1])&&(pc=qd[qd.length-1]):.5<ah&&(xl+1<qd.length?pc=qd[xl+1]:qt.$(wl[0],wl[wl.length-2])&&qt.$(wl[1],wl[wl.length-1])&&(pc=qd[0])),tc!==pc){var Bf=Math.abs(tc-pc);if(180<Bf&&(tc<pc?tc+=360:pc+=360,Bf=Math.abs(tc-pc)),5e-4>ah||.9995<ah){_c=(tc+pc)/2%360;break e}if(10>Bf){var Rp=1-Math.abs(.5-ah);_c=(tc*Rp+pc*(1-Rp))%360;break e}}}_c=tc}if(Nl instanceof Co){var Fu="";Nl.graduatedFunction!==null?(Fu=Nl.graduatedFunction(Al,Nl),Fu=Fu!=null?Fu.toString():""):Fu=(+Al.toFixed(2)).toString(),Fu!==""&&ec.push({$l:Bp,angle:_c,text:Fu})}else ec.push({$l:Bp,angle:_c})}Al=Qg+Rc*Qd}}}a.graduatedMarks.push(ec)}On(Xt);var fs=a.graduatedMarks;if(fs!==null)for(var qg=b.length,Qs=0;Qs<qg;Qs++){var ba=b[Qs],el=fs[Qs];if(ba.visible&&ba!==se&&el.length!==0){if(ba instanceof ci){var sh=a,Bh=E,ef=ba.alignmentFocus;ef.Mc()&&(ef=Pl);var Gy=ba.angle;ba.Kb=0,ba.measure(1/0,1/0,0,0),ba.Kb=Gy;var V0=ba.measuredBounds,_p=V0.width,tf=V0.height,Rf=wn.allocAt(0,0,_p,tf),bl=It.alloc();bl.xi(Rf,ef),wn.free(Rf);for(var lh=-bl.x,nc=-bl.y,fu=new wn,vd=el.length,zp=0;zp<vd;zp++)for(var yd=el[zp],Z0=yd.$l.x,$p=yd.$l.y,aa=yd.angle,Bu=0;4>Bu;Bu++){switch(Bu){case 0:bl.h(lh,nc);break;case 1:bl.h(lh+_p,nc);break;case 2:bl.h(lh,nc+tf);break;case 3:bl.h(lh+_p,nc+tf)}bl.rotate(aa+ba.angle),bl.offset(Z0,$p),zp===0&&Bu===0?fu.h(bl.x,bl.y,0,0):fu.Ye(bl),bl.offset(-Z0,-$p),bl.rotate(-aa-ba.angle)}It.free(bl),sh.graduatedBounds!==null&&sh.graduatedBounds.push(fu),no(Bh,fu.x,fu.y,fu.width,fu.height)}else if(ba instanceof Co){var Pu=a,X0=E;Pu.temporaryTextBlock===null&&(Pu.temporaryTextBlock=new Co);var jl=Pu.temporaryTextBlock;S1(jl,ba);var Rh=ba.alignmentFocus;Rh.Mc()&&(Rh=Pl);for(var Cu=ba.segmentOrientation,Gp=ba.segmentOffset,Sd=new wn,em=0,Hp=0,gc=0,nf=0,xd=0,Up=el.length,_h=0;_h<Up;_h++){var zc=el[_h];em=zc.$l.x,Hp=zc.$l.y,gc=zc.angle,xd=nf=ba.angle,Cu!==Vs&&(xd=Cu===Pg||Cu===n0?gc+ba.angle:gc,nf=Vn.computeAngle(Cu,xd)),jl.Kb=nf,jl.text=zc.text||"",jl.measure(1/0,1/0,0,0);var zh=jl.measuredBounds,uh=jl.naturalBounds,$h=uh.width,rf=uh.height,rc=fi.alloc();rc.reset(),rc.translate(-zh.x,-zh.y),rc.scale(jl.scale,jl.scale),rc.rotate(xd,$h/2,rf/2),Cu!==Cg&&Cu!==Tg||rc.rotate(90,$h/2,rf/2),Cu!==Eg&&Cu!==Mg||rc.rotate(-90,$h/2,rf/2),Cu===r0&&(45<gc&&135>gc||225<gc&&315>gc)&&rc.rotate(-gc,$h/2,rf/2);var _f=wn.allocAt(0,0,$h,rf),Gh=It.alloc();Gh.xi(_f,Rh),rc.Ga(Gh);var zf=-Gh.x,Hy=-Gh.y,ch=It.alloc();ch.assign(Gp),isNaN(ch.x)&&(ch.x=$h/2+3),isNaN(ch.y)&&(ch.y=-(rf/2+3)),ch.rotate(gc),em+=ch.x+zf,Hp+=ch.y+Hy;var of=new wn(em,Hp,zh.width,zh.height),tm=new wn(zh.x,zh.y,zh.width,zh.height),Uy=new wn(uh.x,uh.y,uh.width,uh.height);zc.Sz=nf,zc.lineCount=jl.lineCount,zc.lines=[jl.Cb,jl.Ih,jl.df,jl.Le,jl.Qc,jl.Qb,jl.ze],zc.actualBounds=of,zc.measuredBounds=tm,zc.naturalBounds=Uy,_h===0?Sd.assign(of):Sd.ed(of),It.free(ch),It.free(Gh),wn.free(_f),fi.free(rc)}Pu.graduatedBounds!==null&&Pu.graduatedBounds.push(Sd),no(X0,Sd.x,Sd.y,Sd.width,Sd.height)}Aa(ba,!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,se=te[ne];ne++,b!==null&&b.arrange(se.x-x.x,se.y-x.y,se.width,se.height);for(var he=y.length,ge=0;ge<he;ge++){var Se=y[ge];se=E[ge],Se.visible&&Se!==b&&se.length!==0&&(se=te[ne],ne++,Se.arrange(se.x-x.x,se.y-x.y,se.width,se.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 Ml,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 se=te.actualBounds,he=a.O.s,ge=a.graduatedMarks,Se=he.length,Ne=0;Ne<Se;Ne++){var Ge=he[Ne],Je=ge[Ne],nt=Je.length;if(Ge.visible&&Ge!==te&&Je.length!==0){if(Ge instanceof ci){if(!(2>a.graduatedTickUnit*Ge.interval*te.geometry.flattenedTotalLength/a.graduatedRange*ne&&Ge.graduatedSkip===null)){var ct=Ge.measuredBounds,Ft=Ge.strokeWidth*Ge.scale,Ot=Ge.alignmentFocus;Ot.Mc()&&(Ot=Pl);for(var zt=0;zt<nt;zt++){var Ht=Je[zt].$l,Wt=Je[zt].angle,Xt=Ot,hn=Ge.Ab;hn.reset(),hn.translate(Ht.x+se.x,Ht.y+se.y),hn.rotate(Wt+Ge.angle,0,0),hn.translate(-ct.width*Xt.x+Xt.offsetX+Ft/2,-ct.height*Xt.y+Xt.offsetY+Ft/2),hn.scale(Ge.scale,Ge.scale),vu(Ge,!1),Ge.wh.set(Ge.Ab),Ge.Kk=Ge.scale,au(Ge,!1),Ge.gc(y,x),E&&(a.svg.appendChild(Ge.svg),Ge.svg=null),Ge.Ab.reset()}}}else if(Ge instanceof Co)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Co),ct=a.temporaryTextBlock,S1(ct,Ge),Ft=0;Ft<nt;Ft++)Ot=Je[Ft],Ot.actualBounds&&Ot.measuredBounds&&Ot.naturalBounds&&(ct.ec=Ot.text||"",ct.Kb=Ot.Sz||0,ct.Gc=Ot.lineCount||0,zt=Ot.lines,zt!==void 0&&(ct.Cb=zt[0],ct.Ih=zt[1],ct.df=zt[2],ct.Le=zt[3],ct.Qc=zt[4],ct.Qb=zt[5],ct.ze=zt[6]),Ot.naturalBounds&&(ct.dc=Ot.naturalBounds),Ot.actualBounds&&(zt=Ot.actualBounds,ct.arrange(zt.x,zt.y,zt.width,zt.height)),zt=Ot.actualBounds,ct.arrange(zt.x,zt.y,zt.width,zt.height),Ht=Ot.measuredBounds,Ot=Ot.naturalBounds,Wt=ct.Ab,Wt.reset(),Wt.translate(zt.x+se.x,zt.y+se.y),Wt.translate(-Ht.x,-Ht.y),ct.no(Wt,Ot.x,Ot.y,Ot.width,Ot.height),vu(ct,!1),ct.wh.set(ct.Ab),ct.Kk=ct.scale,au(ct,!1),ct.Ng=Ge.part,ct.Me=Ge.panel,ct.gc(y,x),ct.Me=null,ct.Ng=null,E&&(a.svg.appendChild(ct.svg),ct.svg=null))}}x.$i=b,y.restore(),y.Vc(!0)};function Un(a,y){if(Jt.call(this),this.na=null,a===void 0)this.na=Un.Position;else if(typeof a=="string"){var x=Ou.I(a);x!==null&&(this.na=x)}else a instanceof Ha?this.na=a:a&&(this.na=Un.Position,y=a);this.na===null&&Yt("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===Un.Grid?1048576:0),this.O=new Ln,this.yb=Cs,this.Tm=ro,this.Uf=oi,this.$g=null,this.$e="",this.jg=new wn(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=fr,this.jn=Zo,this.kn=Ei,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}un(Un,Jt),Un.prototype.cloneProtected=function(a){Jt.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},Un.prototype.Af=function(a){Jt.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},Un.prototype.copy=function(){var a=Jt.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 nr&&(te.Te=!0);var se=a.diagram;se!==null&&se.undoManager.isUndoingRedoing||te.cb(sa,"elements",a,null,E,null,ne)}}return a}return null},ot=Un.prototype,ot.toString=function(){return"Panel("+this.type.name+")#"+Mi(this)},ot.Pn=function(a){Jt.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,b=0;b<x;b++)y[b].Pn(a)},ot.hh=function(a,y){if(this.na===Un.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===Un.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===Un.Table)if(a.yc(),a instanceof Ml){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===Un.Spot)&&a.save();for(var b=this.Pb(),E=this.O.s,te=E.length,ne=0;ne<te;ne++){var se=E[ne];x&&se===b&&(a.clipInsteadOfFill=!0),se.gc(a,y),x&&se===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&&Lm(a,y,!0,x,!0),b!==null&&Lm(a,y,!1,b,!0),x!==null&&o1(a,y,!0,x),b!==null&&o1(a,y,!1,b),x!==null&&Lm(a,y,!0,x,!1),b!==null&&Lm(a,y,!1,b,!1)}function o1(a,y,x,b){for(var E=b.length,te=a.actualBounds,ne=a.naturalBounds,se=!0,he=0;he<E;he++){var ge=b[he];if(ge!==void 0&&ge.actual!==0)if(se)se=!1;else{if(x){if(ge.position>ne.height)continue}else if(ge.position>ne.width)continue;var Se=ge.separatorStrokeWidth;isNaN(Se)&&(Se=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Ne=ge.separatorStroke;if(Ne===null&&(Ne=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),Se!==0&&Ne!==null){ia(a,y,Ne,!1,!1,ne,te),Ne=!1;var Ge=ge.separatorDashArray;Ge===null&&(Ge=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),Ge!==null&&(Ne=!0,y.js(Ge,0)),y.beginPath(),Ge=ge.position+Se,x?Ge>ne.height&&(Se-=Ge-ne.height):Ge>ne.width&&(Se-=Ge-ne.width),ge=ge.position+Se/2,y.lineWidth=Se,Se=a.yb,x?(ge+=Se.top,Ge=ne.width-Se.right,y.moveTo(Se.left,ge),y.lineTo(Ge,ge)):(ge+=Se.left,Ge=ne.height-Se.bottom,y.moveTo(ge,Se.top),y.lineTo(ge,Ge)),y.stroke(),y.Se(),Ne&&y.fs()}}}}function Lm(a,y,x,b,E){for(var te=b.length,ne=a.actualBounds,se=a.naturalBounds,he=a1(a,!0),ge=a1(a,!1),Se=0;Se<te;Se++){var Ne=b[Se];if(Ne!==void 0&&Ne.background!==null&&Ne.coversSeparators!==E&&Ne.actual!==0){var Ge=x?ne.height:ne.width;if(!(Ne.position>Ge)){var Je=Ne.Wc(),nt=Ne.separatorStrokeWidth;isNaN(nt)&&(nt=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var ct=Ne.separatorStroke;ct===null&&(ct=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(ct===null||Ne.index===(x?he:ge))&&(nt=0),Je-=nt,nt=Ne.position+nt,Je+=Ne.actual,nt+Je>Ge&&(Je=Ge-nt),0>=Je||(Ge=a.yb,ia(a,y,Ne.background,!0,!1,se,ne),x?y.fillRect(Ge.left,nt+Ge.top,ne.width-(Ge.left+Ge.right),Je):y.fillRect(nt+Ge.left,Ge.top,Je,ne.height-(Ge.top+Ge.bottom)))}}}}function a1(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"}ot.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},ot.kk=function(a,y,x){if(!Jt.prototype.kk.call(this,a,y,x))return!1;if(this.type===Un.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===Un.Grid||this.na===Un.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},ot.nk=function(){return!0},ot.$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 se=y[ne].actualBounds;E=ne===0?se.x:Math.min(se.x,E),te=ne===0?se.y:Math.min(se.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 Jt.prototype.$o.call(this,a,y,x,b)},ot.Sj=function(a,y,x,b,E){var te=this.se(),ne=this.transform,se=1/(ne.m11*ne.m22-ne.m12*ne.m21),he=ne.m22*se,ge=-ne.m12*se,Se=-ne.m21*se,Ne=ne.m11*se,Ge=se*(ne.m21*ne.dy-ne.m22*ne.dx),Je=se*(ne.m12*ne.dx-ne.m11*ne.dy);if(this.areaBackground!==null)return ne=this.actualBounds,qt.Ff(ne.left,ne.top,ne.right,ne.bottom,a,y,x,b,E);if(this.background!==null)return te=a*he+y*Se+Ge,se=a*ge+y*Ne+Je,a=x*he+b*Se+Ge,he=x*ge+b*Ne+Je,E.h(0,0),x=this.naturalBounds,te=qt.Ff(0,0,x.width,x.height,te,se,a,he,E),E.transform(ne),te;te||(he=1,Se=ge=0,Ne=1,Je=Ge=0),se=a*he+y*Se+Ge,a=a*ge+y*Ne+Je,he=x*he+b*Se+Ge,x=x*ge+b*Ne+Je,E.h(he,x),b=(he-se)*(he-se)+(x-a)*(x-a),ge=!1,Ne=this.O.s,Je=Ne.length,Se=It.alloc(),Ge=null,y=1/0;var nt=null,ct=this.isClipping&&this.na===Un.Spot;ct&&(nt=It.alloc(),Ge=this.Pb(),(ge=Ge.Sj(se,a,he,x,nt))&&(y=(se-nt.x)*(se-nt.x)+(a-nt.y)*(a-nt.y)));for(var Ft=0;Ft<Je;Ft++){var Ot=Ne[Ft];Ot.visible&&Ot!==Ge&&Ot.Sj(se,a,he,x,Se)&&(ge=!0,Ot=(se-Se.x)*(se-Se.x)+(a-Se.y)*(a-Se.y),Ot<b&&(b=Ot,E.set(Se)))}return ct&&(y>b&&E.set(nt),It.free(nt)),It.free(Se),te&&E.transform(ne),ge},ot.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();Jt.prototype.Gj.call(this)},ot.v=function(a){if(!Zl(this)){Jt.prototype.v.call(this,a),a=null,(this.na===Un.Auto||this.na===Un.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=sl(E,!1);(E instanceof Ks||E instanceof Un||E instanceof Co||te!==Bn)&&E.v(!0)}}}},ot.Uj=function(){if(!Zl(this)){Aa(this,!0),Mc(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},ot.Uk=function(){if(!(this.l&2048)){vu(this,!0),au(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},ot.Wu=function(){au(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},ot.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 se=this.maxSize;isNaN(te.width)||(a=Math.min(te.width,se.width)),isNaN(te.height)||(y=Math.min(te.height,se.height)),a=Math.max(x,a),y=Math.max(b,y);var he=this.yb;a=Math.max(a-he.left-he.right,0),y=Math.max(y-he.top-he.bottom,0);var ge=this.O.s;ge.length!==0&&this.na.measure(this,a,y,ge,E,x,b),a=E.width+he.left+he.right,he=E.height+he.top+he.bottom,isFinite(te.width)&&(a=te.width),isFinite(te.height)&&(he=te.height),a=Math.min(se.width,a),he=Math.min(se.height,he),a=Math.max(ne.width,a),he=Math.max(ne.height,he),a=Math.max(x,a),he=Math.max(b,he),Fa(E,a,he),Fa(this.naturalBounds,a,he),this.Ge(0,0,a,he)},ot.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 nh(a){return a.part!==null?a.part.locationObject:null}ot.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=sl(this,!0);var te=this.measuredBounds;y=te.width,te=te.height;var ne=this.Kg,se=ne.left+ne.right;switch(ne=ne.top+ne.bottom,y===x&&te===b&&(a=Bn),a){case Bn:(y>x||te>b)&&(this.v(),this.measure(y>x?x:y,te>b?b:te,0,0));break;case Hn:this.v(!0),this.measure(x+se,b+ne,0,0);break;case wr:this.v(!0),this.measure(x+se,te+ne,0,0);break;case _r:this.v(!0),this.measure(y+se,b+ne,0,0)}}this.na.arrange(this,E,this.jg)}},ot.gh=function(a){var y=this.naturalBounds,x=nh(this);if(Mo(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var b=y.length,E=It.allocAt(0,0);b--;){var te=y[b];if((te.visible||te===x)&&(bi(E.set(a),te.transform),te.ca(E)))return It.free(E),!0}return It.free(E),!(this.Ma===null&&this.areaBackground===null)}return!1},ot.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},ot.qm=function(a,y){if(y(this,a),a instanceof Un){a=a.O.s;for(var x=a.length,b=0;b<x;b++)this.qm(a[b],y)}};function Ud(a,y){s1(a,a,y)}function s1(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 Un&&s1(a,te,x)}}function yx(a,y){l1(a,a,y)}function l1(a,y,x){if(x(y),y instanceof Un){y=y.O.s;for(var b=y.length,E=0;E<b;E++)l1(a,y[E],x)}}ot.Nl=function(a){return u1(this,this,a)};function u1(a,y,x){if(x(y))return y;if(y instanceof Un){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}ot.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 Un){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 Un?x=Math.max(x,c1(E)):E instanceof ci&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}ot.se=function(){return!(this.type===Un.TableRow||this.type===Un.TableColumn)};function Ch(a){return a.type===Un.TableRow||a.type===Un.TableColumn}ot.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),Us(this)))return null;var b=this.naturalBounds,E=1/this.Df(),te=this.se(),ne=te?a:bi(It.allocAt(a.x,a.y),this.transform),se=this.diagram,he=10,ge=5;if(se!==null&&(he=se.Ql("extraTouchArea"),ge=he/2),Mo(-(ge*E),-(ge*E),b.width+he*E,b.height+he*E,ne.x,ne.y)){if(!this.isAtomic){E=this.O.s;var Se=E.length;if(se=It.alloc(),ge=(he=this.isClipping&&this.na===Un.Spot)?this.Pb():null,he&&(ge.se()?bi(se.set(a),ge.transform):se.set(a),!ge.ca(se)))return It.free(se),te||It.free(ne),null;for(var Ne=nh(this);Se--;){var Ge=E[Se];if((Ge.visible||Ge===Ne)&&(Ge.se()?bi(se.set(a),Ge.transform):se.set(a),!he||Ge!==ge)){var Je=null;if(Ge instanceof Un?Je=Ge.ic(se,y,x):Ge.pickable===!0&&Ge.ca(se)&&(Je=Ge),Je!==null&&(y!==null&&(Je=y(Je)),Je!==null&&(x===null||x(Je))))return It.free(se),te||It.free(ne),Je}}It.free(se)}return this.background===null&&this.areaBackground===null?(te||It.free(ne),null):(a=Mo(0,0,b.width,b.height,ne.x,ne.y)?this:null,te||It.free(ne),a)}return te||It.free(ne),null},ot.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:bi(It.allocAt(a.x,a.y),this.transform);if(E=Mo(0,0,E.width,E.height,ne.x,ne.y),Ch(this)||E){if(!this.isAtomic){for(var se=this.O.s,he=se.length,ge=It.alloc(),Se=nh(this);he--;){var Ne=se[he];if(Ne.visible||Ne===Se){Ne.se()?bi(ge.set(a),Ne.transform):ge.set(a);var Ge=Ne;Ne=Ne instanceof Un?Ne:null,(Ne!==null?Ne.ji(ge,y,x,b):Ge.ca(ge))&&Ge.pickable!==!1&&(y!==null&&(Ge=y(Ge)),Ge===null||x!==null&&!x(Ge)||b.add(Ge))}}It.free(ge)}return te||It.free(ne),E&&(this.background!==null||this.areaBackground!==null)}return te||It.free(ne),!1},ot.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=fi.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&fi.free(ne),!0;if(this.Yc(a,ne)){if(!this.isAtomic)for(var se=nh(this),he=this.O.s,ge=he.length;ge--;){var Se=he[ge];if(Se.visible||Se===se){var Ne=Se.actualBounds,Ge=this.naturalBounds;Ne.x>Ge.width||Ne.y>Ge.height||0>Ne.x+Ne.width||0>Ne.y+Ne.height||(Ne=Se,Se=Se instanceof Un?Se:null,Ge=fi.alloc(),Ge.set(ne),(Se!==null?Se.Cf(a,y,x,b,E,Ge):Ja(Ne,a,b,Ge))&&(y!==null&&(Ne=y(Ne)),Ne===null||x!==null&&!x(Ne)||E.add(Ne)),fi.free(Ge))}}return te===void 0&&fi.free(ne),b}return te===void 0&&fi.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 se=ne.actualBounds,he=a.naturalBounds;se.x>he.width||se.y>he.height||0>se.x+se.width||0>se.y+se.height||(ne instanceof Un&&vv(ne,y,x,b),y!==null&&(ne=y(ne)),ne===null||x!==null&&!x(ne)||b.add(ne))}}}ot.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,se=this.se(),he=se?a:bi(It.allocAt(a.x,a.y),this.transform),ge=se?y:bi(It.allocAt(y.x,y.y),this.transform),Se=he.Bf(ge),Ne=0<he.x&&he.x<ne.width&&0<he.y&&he.y<ne.height||vo(he.x,he.y,0,0,0,ne.height)<=Se||vo(he.x,he.y,0,ne.height,ne.width,ne.height)<=Se||vo(he.x,he.y,ne.width,ne.height,ne.width,0)<=Se||vo(he.x,he.y,ne.width,0,0,0)<=Se;if(ne=he.zd(0,0)<=Se&&he.zd(0,ne.height)<=Se&&he.zd(ne.width,0)<=Se&&he.zd(ne.width,ne.height)<=Se,se||(It.free(he),It.free(ge)),Ne){if(!this.isAtomic){he=It.alloc(),ge=It.alloc(),Se=nh(this);for(var Ge=this.O.s,Je=Ge.length;Je--;){var nt=Ge[Je];if(nt.visible||nt===Se){var ct=nt.actualBounds,Ft=this.naturalBounds;(!se||!(ct.x>Ft.width||ct.y>Ft.height||0>ct.x+ct.width||0>ct.y+ct.height))&&(nt.se()?(ct=nt.transform,bi(he.set(a),ct),bi(ge.set(y),ct)):(he.set(a),ge.set(y)),ct=nt,nt=nt instanceof Un?nt:null,(nt!==null?nt.og(he,ge,x,b,E,te):ct.tx(he,ge,E))&&(x!==null&&(ct=x(ct)),ct===null||b!==null&&!b(ct)||te.add(ct)))}}It.free(he),It.free(ge)}return E?Ne:ne}return!1};function yv(a){var y=null;return a instanceof ci&&(y=a.spot1,y===ro&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=Ka),y}function Sv(a){var y=null;return a instanceof ci&&(y=a.spot2,y===ro&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=As),y}ot.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},ot.M=function(a){return this.O.M(a)},ot.Gb=function(a,y){y instanceof Mr&&Yt("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&Yt("Cannot make a Panel contain itself: "+this.toString()),Yt("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&Yt("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!==Un.Grid||y instanceof ci||Yt("Can only add Shapes to a Grid Panel, not: "+y),this.na!==Un.Graduated||y instanceof ci||y instanceof Co||Yt("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 ur),this.ge.add(b,y))}var E=this.O;if(b=-1,x===this){for(var te=-1,ne=this.O.s,se=ne.length,he=0;he<se;he++)if(ne[he]===y){te=he;break}if(te!==-1){if(te===a||te+1>=E.count&&a>=E.count)return;E.mb(te),b=te}else Yt("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),Zl(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof Un&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||Om(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof nr&&(x.Te=!0),x.Te&&x instanceof nr&&(x.wc=null),E=this.diagram,E!==null&&E.undoManager.isUndoingRedoing||(b!==-1&&x.cb(La,"elements",this,y,null,b,null),x.cb(sa,"elements",this,null,y,null,a)))};function xv(a,y){a.l=y?a.l|16777216:a.l&-16777217}ot.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)},ot.mb=function(a){0<=a&&this.pc(a,!0)},ot.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),Aa(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 nr&&(b instanceof Un?b.qm(b,function(ne,se){Hv(te,se,y)}):Hv(te,b,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||te.cb(La,"elements",this,b,null,a,null))},ot.Fb=function(a){0>a&&Qn(a,">= 0",Un,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new ja;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(sa,"rowdefs",this,null,x,null,a)}return y[a]},ot.oA=function(a){if(0>a&&Qn(a,">= 0",Un,"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(La,"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 ja?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}ot.Eb=function(a){0>a&&Qn(a,">= 0",Un,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new ja;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(sa,"coldefs",this,null,x,null,a)}return y[a]},ot.jA=function(a){if(0>a&&Qn(a,">= 0",Un,"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(La,"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 ja?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}ot.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&Nm(y,a),this},ot.Hy=function(a,y){return(a=this.Fb(a))&&Nm(a,new ja(y)),this},ot.By=function(a,y){return(a=this.Eb(a))&&Nm(a,new ja(y)),this},ot.nz=function(a){if(0>a||this.type!==Un.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},ot.fz=function(a){if(0>a||this.type!==Un.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},ot.Fz=function(a,y){if(y===void 0&&(y=new It(NaN,NaN)),this.type!==Un.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)},ot.Gz=function(a){if(this.type!==Un.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 Su(a){var y=a.allBindings;if(y===null)a.data!==null&&Yt("Template cannot have .data be non-null: "+a),a.allBindings=y=new Ln;else if(y._isFrozen)return;var x=new Ln;xv(a,!1),a.qm(a,function(ge,Se){Se.th();var Ne=Se.localBindings;if(Ne!==null)for(xf(Se,!1),Ne=Ne.iterator;Ne.next();){var Ge=Ne.value;Ge.mode===Dg&&xf(Se,!0);var Je=Ge.sourceName;Je!==null&&(Je==="/"&&xv(ge,!0),Je=MS(Ge,ge,Se),Je!==null&&(x.add(Je),Je.srcBindings===null&&(Je.srcBindings=new Ln),Je.srcBindings.add(Ge))),y.add(Ge)}if(Se instanceof Un&&Se.type===Un.Table){if(0<Se.rowCount){for(ge=Se.rowDefs,Ne=ge.length,Ge=0;Ge<Ne;Ge++)if(Je=ge[Ge],Je!==void 0&&Je.be!==null)for(var nt=Je.be.iterator;nt.next();){var ct=nt.value;ct.xd=Je,ct.to=2,ct.wl=Je.index,y.add(ct)}}if(0<Se.columnCount){for(Se=Se.colDefs,ge=Se.length,Ne=0;Ne<ge;Ne++)if(Ge=Se[Ne],Ge!==void 0&&Ge.be!==null)for(Je=Ge.be.iterator;Je.next();)nt=Je.value,nt.xd=Ge,nt.to=1,nt.wl=Ge.index,y.add(nt)}}});for(var b=x.iterator;b.next();){var E=b.value;if(E.srcBindings!==null){xf(E,!0);for(var te=E.srcBindings.iterator;te.next();){var ne=te.value;E.localBindings===null&&(E.localBindings=new Ln),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 se=E.targetProperty,he=se.indexOf(".");0<he&&te instanceof Un&&(ne=se.substring(0,he),se=se.substr(he+1),he=te.fb(ne),he!==null?(te=he,E.targetProperty=se):or('Warning: unable to find GraphObject named "'+ne+'" for Binding: '+E.toString())),te instanceof ja?(ne=Mi(te.panel),E.Ai=ne===void 0?-1:ne,te.panel.bindingId=E.Ai):te instanceof Jt?(ne=Mi(te),E.Ai=ne===void 0?-1:ne,te.bindingId=E.Ai):Yt("Unknown type of binding target: "+te)}y.freeze(),a instanceof Mr&&a.Zc()&&a.Va()}ot.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return yx(y,function(x){x instanceof Un&&(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&&Su(y),y},ot.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 Un))continue;E===1?te=te.Eb(x.wl):E===2&&(te=te.Fb(x.wl))}te!==void 0&&x.Mv(te,b)}}},ot.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 Un&&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 Un)||te.data!==y[ne])return!0;E++,ne++}return!1}function fg(a){if(a.type===Un.Spot||a.type===Un.Auto)return Math.min(a.O.length,1);if(a.type===Un.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var b=a.M(x);if(!(b instanceof ci&&b.isPanelMain))break}return x}return a.type===Un.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof Un&&Ch(a))?1:0}ot.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++)km(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 Un){if(ne.data!==te){var se=bv(a,ne.data),he=bv(a,te),ge=he!==se;ge||(se=Pv(a,se),ge=Pv(a,he)!==se),ge?(a.pc(b,!1),km(a,te,E,!1)):ne.data=te}}else km(a,te,E,!1)}for(;b<a.O.length;)a.pc(b,!1);a.$g=null,wv(a,x,0),Zl(a)||a.v(),a.graduatedIntervals=null,a.If()||Om(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof nr&&(y.Te=!0),y.Te&&y instanceof nr&&(y.wc=null))}}function km(a,y,x,b){if(!(y==null||0>x)){var E=bv(a,y);if(E=Pv(a,E),E!==null){if(Su(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 ur),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 Un){var E=y,te=x;b.type===Un.TableRow?b.row=E:b.type===Un.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=pa(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;Yt("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function Pv(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,or('No item template Panel found for category "'+y+'" on '+a),or(" Using default item template."),a=new Un,y=new Co,y.bind(new xa("text","",$n)),a.add(y),m1=a),b=m1)),b}function Om(a,y,x){var b=y.enabledChanged;if(b!==null&&b(y,x),y instanceof Un){y=y.O.s,b=y.length;for(var E=0;E<b;E++){var te=y[E];x&&te instanceof Un&&!te.isEnabled||Om(a,te,x)}}}function cc(a,y){y.name=a,Ou.add(a,y)}Ut.Object.defineProperties(Un.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===Un.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&&Qn(a,">= 0",Un,"padding"),a=new kr(a)):(0>a.left&&Qn(a.left,">= 0",Un,"padding:value.left"),0>a.right&&Qn(a.right,">= 0",Un,"padding:value.right"),0>a.top&&Qn(a.top,">= 0",Un,"padding:value.top"),0>a.bottom&&Qn(a.bottom,">= 0",Un,"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:Cs},set:function(a){typeof a=="number"&&(a=new kr(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new uu),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 oo)&&(a instanceof oo&&a.freeze(),this.T===null&&(this.T=new uu),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 uu),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)||Yt("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 uu),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 oo)&&(a instanceof oo&&a.freeze(),this.T===null&&(this.T=new uu),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 uu),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)||Yt("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 uu),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 uu),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||Yt("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&sc(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()||Yt("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&sc(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 rh),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),ys(this)&&(a=this.part,a!==null&&ko(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 rh),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),ys(this)&&(a=this.part,a!==null&&ko(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 rh),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 rh),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 rh,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 rh,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 rh,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 rh,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 uu),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new uu),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:jm},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new uu),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:jm},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new uu),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)&&Yt("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new uu),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)&&Yt("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new uu),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 Mr&&!(this instanceof Ui);Su(this),this.ub=a;var b=this.diagram;b!==null&&(x?(x=b.partManager,this instanceof Vn?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof Mr&&(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 wf),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 ur}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof Mr||a.isPanelMain)&&Yt("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(););pi(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&&(pi(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 ni&&(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&&Om(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))}}}),Ut.Object.defineProperties(Un,{Position:{get:function(){return Ou.I("Position")}},Horizontal:{get:function(){return Ou.I("Horizontal")}},Vertical:{get:function(){return Ou.I("Vertical")}},Spot:{get:function(){return Ou.I("Spot")}},Auto:{get:function(){return Ou.I("Auto")}},Table:{get:function(){return Ou.I("Table")}},Viewbox:{get:function(){return Ou.I("Viewbox")}},TableRow:{get:function(){return Ou.I("TableRow")}},TableColumn:{get:function(){return Ou.I("TableColumn")}},Link:{get:function(){return Ou.I("Link")}},Grid:{get:function(){return Ou.I("Grid")}},Graduated:{get:function(){return Ou.I("Graduated")}}}),Un.prototype.rebuildItemElements=Un.prototype.mv,Un.prototype.findItemPanelForData=Un.prototype.sx,Un.prototype.updateTargetBindings=Un.prototype.La,Un.prototype.copyTemplate=Un.prototype.Uy,Un.prototype.graduatedValueForPoint=Un.prototype.Gz,Un.prototype.graduatedPointForValue=Un.prototype.Fz,Un.prototype.findColumnForLocalX=Un.prototype.fz,Un.prototype.findRowForLocalY=Un.prototype.nz,Un.prototype.addColumnDefinition=Un.prototype.By,Un.prototype.addRowDefinition=Un.prototype.Hy,Un.prototype.addRowColumnDefinition=Un.prototype.Gy,Un.prototype.removeColumnDefinition=Un.prototype.jA,Un.prototype.getColumnDefinition=Un.prototype.Eb,Un.prototype.removeRowDefinition=Un.prototype.oA,Un.prototype.getRowDefinition=Un.prototype.Fb,Un.prototype.removeAt=Un.prototype.mb,Un.prototype.remove=Un.prototype.remove,Un.prototype.insertAt=Un.prototype.Gb,Un.prototype.elt=Un.prototype.M,Un.prototype.add=Un.prototype.add,Un.prototype.findObject=Un.prototype.fb,Un.prototype.findInVisualTree=Un.prototype.Nl,Un.prototype.walkVisualTreeFrom=Un.prototype.qm,Un.prototype.findMainElement=Un.prototype.Pb;var g1=!1,m1=null,Ou=new ur;Un.className="Panel",Un.definePanelLayout=cc,cc("Position",new vm),cc("Vertical",new Sm),cc("Auto",new wm),cc("Link",new Mm);function rh(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}rh.prototype.copy=function(){var a=new rh;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},rh.className="GradPanelSettings";function uu(){this.Pc=[],this.Oc=[],this.j=this.ob=jm,this.hb=this.Hb=0,this.Qp=Cs,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}uu.prototype.copy=function(a){for(var y=new uu,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},uu.className="TablePanelSettings";function ja(a){gi(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=ro,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Cv,this.hg=oi,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))}ja.prototype.copy=function(){var a=new ja;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=an(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function Nm(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=an(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}ot=ja.prototype,ot.qb=function(a){a.classType===ja&&(this.sizing=a)},ot.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+Mi(this)},ot.wi=function(a){this.Me=a},ot.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)},ot.Wc=function(){var a=0,y=this.Me,x=0,b=this.isRow;if(y!==null&&y.type===Un.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)},ot.Ob=function(a,y,x){var b=this.Me;if(b!==null&&(b.cb(zo,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 Am(a){if(a.sizing===Cv){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}ot.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new xa(a,y,x,b):E=a,E.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&f1(y)&&Yt("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+E+" on "+a)),this.be===null&&(this.be=new Ln),this.be.add(E),this},Ut.Object.defineProperties(ja.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&&Qn(a,">= 0",ja,"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&&Qn(a,">= 0",ja,"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))&&Qn(a,">= 0",ja,"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&&Qn(a,">= 0",ja,"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 kr(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&&Pf(a,"RowColumnDefinition.separatorStroke"),a instanceof oo&&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)||Yt("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&&Pf(a,"RowColumnDefinition.background"),a instanceof oo&&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}}}),ja.prototype.computeEffectiveSpacing=ja.prototype.Wc,ja.prototype.computeEffectiveSpacingTop=ja.prototype.Io;var Cv=new tn(ja,"Default",0),pg=new tn(ja,"None",1),jm=new tn(ja,"ProportionalExtra",2);ja.className="RowColumnDefinition",ja.Default=Cv,ja.None=pg,ja.ProportionalExtra=jm;function ci(a,y){Jt.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)}un(ci,Jt),ci.prototype.cloneProtected=function(a){Jt.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=an(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 Wd(a){a.Na===null?a.Na=new Mv:a.Na.nc&&(a.Na=a.Na.copy())}ot=ci.prototype,ot.th=function(){Jt.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},ot.qb=function(a){a===Bn||a===fr||a===Ti||a===oi?this.geometryStretch=a:Jt.prototype.qb.call(this,a)},ot.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+Mi(this)};function fp(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 se=x[0],he=x[1],ge,Se,Ne,Ge,Je,nt,ct=0,Ft=pn(),Ot=2;Ot<E;Ot+=2)ge=x[Ot],Se=x[Ot+1],Ne=ge-se,se=Se-he,Ne===0&&(Ne=.001),Ge=se/Ne,Je=Math.atan2(se,Ne),nt=Math.sqrt(Ne*Ne+se*se),Ft.push([Ne,Je,Ge,nt]),ct+=nt,se=ge,he=Se;se=x[0],he=x[1],Ne=b.measuredBounds.width,b instanceof ci&&(Ne-=b.strokeWidth),1>Ne&&(Ne=1),E=x=Ne,ge=ne/2,Se=ge!==0,Ot=0,nt=Ft[Ot],Ne=nt[0],Je=nt[1],Ge=nt[2],nt=nt[3];for(var zt=0;.1<=ct;){if(zt===0&&(Se?(E=x,E-=ge,ct-=ge,Se=!1):E=x,E===0&&(E=1)),E>ct){On(Ft);return}E>nt?(zt=E-nt,E=nt):zt=0;var Ht=Math.sqrt(E*E/(1+Ge*Ge));if(0>Ne&&(Ht=-Ht),se+=Ht,he+=Ge*Ht,a.translate(se,he),a.rotate(Je),a.translate(-(ne/2),-(te/2)),zt===0&&b.hh(a,y),a.translate(ne/2,te/2),a.rotate(-Je),a.translate(-se,-he),ct-=E,nt-=E,zt!==0){if(Ot++,Ot===Ft.length){On(Ft);return}nt=Ft[Ot],Ne=nt[0],Je=nt[1],Ge=nt[2],nt=nt[3],E=zt}}On(Ft)}}ot.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&&ia(this,a,b,!0,!1,ne,te);var se=this.part,he=this.ig;if(x===null||he!==0||se===null||!this.isPanelMain&&se.Pb()!==this||(he=se.type===Un.Link&&se instanceof Ui&&se.category==="Selection"&&se.adornedObject instanceof ci&&se.adornedPart.Pb()===se.adornedObject?se.adornedObject.strokeWidth:0),he===0&&(x=null),x!==null&&he!==0&&(ia(this,a,x,!1,!1,ne,te),a.lineWidth=he,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),te=!1,se&&y.Gf("drawShadows")&&(te=se.isShadowed),a.Il===!1&&(te=!1),se=!0,x===null||b!==null&&b!=="transparent"||(se=!1),ne=!1,he=this.strokeDashArray,he!==null&&(ne=!0,a.js(he,this.strokeDashOffset)),E.type===Jn.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===Jn.u){var ge=E.startX;he=E.startY;var Se=E.endX,Ne=E.endY;E=Math.min(ge,Se);var Ge=Math.min(he,Ne);ge=Math.abs(Se-ge),he=Math.abs(Ne-he),a.beginPath(),a.rect(E,Ge,ge,he),b!==null&&a.ng(b),x!==null&&(se&&te&&Lc(a),a.jk(),se&&te&&qc(a)),a.Se()}else if(E.type===Jn.F)ge=E.startX,he=E.startY,Se=E.endX,Ne=E.endY,E=Math.abs(Se-ge)/2,Ge=Math.abs(Ne-he)/2,ge=Math.min(ge,Se)+E,he=Math.min(he,Ne)+Ge,a.beginPath(),a.moveTo(ge,he-Ge),a.bezierCurveTo(ge+qt.wg*E,he-Ge,ge+E,he-qt.wg*Ge,ge+E,he),a.bezierCurveTo(ge+E,he+qt.wg*Ge,ge+qt.wg*E,he+Ge,ge,he+Ge),a.bezierCurveTo(ge-qt.wg*E,he+Ge,ge-E,he+qt.wg*Ge,ge-E,he),a.bezierCurveTo(ge-E,he-qt.wg*Ge,ge-qt.wg*E,he-Ge,ge,he-Ge),a.closePath(),b!==null&&a.ng(b),x!==null&&(se&&te&&Lc(a),a.jk(),se&&te&&qc(a)),a.Se();else if(E.type===Jn.o)for(E=E.figures,he=E.length,Ge=0;Ge<he;Ge++){ge=E.s[Ge],a.beginPath(),a.moveTo(ge.startX,ge.startY),Se=ge.segments.s,Ne=Se.length;for(var Je=null,nt=0;nt<Ne;nt++){var ct=Se[nt];switch(ct.type){case ma:a.moveTo(ct.endX,ct.endY);break;case Po:a.lineTo(ct.endX,ct.endY);break;case ss:a.bezierCurveTo(ct.point1X,ct.point1Y,ct.point2X,ct.point2Y,ct.endX,ct.endY);break;case Cl:a.quadraticCurveTo(ct.point1X,ct.point1Y,ct.endX,ct.endY);break;case ha:if(ct.radiusX===ct.radiusY){var Ft=Math.PI/180;a.arc(ct.point1X,ct.point1Y,ct.radiusX,ct.startAngle*Ft,(ct.startAngle+ct.sweepAngle)*Ft,0>ct.sweepAngle,Je!==null?Je.endX:ge.startX,Je!==null?Je.endY:ge.startY)}else if(Je=rl(ct,ge),Ft=Je.length,Ft===0)a.lineTo(ct.centerX,ct.centerY);else for(var Ot=0;Ot<Ft;Ot++){var zt=Je[Ot];Ot===0&&a.lineTo(zt[0],zt[1]),a.bezierCurveTo(zt[2],zt[3],zt[4],zt[5],zt[6],zt[7])}break;case zl:if(Ot=Ft=0,Je!==null&&Je.type===ha){if(Je=rl(Je,ge),zt=Je.length,zt===0){a.lineTo(ct.endX,ct.endY);break}Je=Je[zt-1]||null,Je!==null&&(Ft=Je[6],Ot=Je[7])}else Ft=Je!==null?Je.endX:ge.startX,Ot=Je!==null?Je.endY:ge.startY;if(Je=$s(ct,ge,Ft,Ot),Ft=Je.length,Ft===0){a.lineTo(ct.endX,ct.endY);break}for(Ot=0;Ot<Ft;Ot++)zt=Je[Ot],a.bezierCurveTo(zt[2],zt[3],zt[4],zt[5],zt[6],zt[7]);break;default:Yt("Segment not of valid type: "+ct.type)}ct.isClosed&&a.closePath(),Je=ct}Se=ge.isFilled,te?ge.isShadowed?(Se===!0&&b!=="transparent"&&b!==null&&a.ng(b,ge.isEvenOdd),x!==null&&(Se&&se&&Lc(a),a.jk(),Se&&se&&qc(a))):(Lc(a),Se&&b!=="transparent"&&b!==null&&a.ng(b,ge.isEvenOdd),x!==null&&a.jk(),qc(a)):(Se&&b!==null&&a.ng(b,ge.isEvenOdd),x!==null&&a.jk()),a.Se(Ge)}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=pn(),te.type===Jn.j)b.push(te.startX),b.push(te.startY),b.push(te.endX),b.push(te.endY),fp(a,y,b,x);else if(te.type===Jn.o)for(te=te.figures.iterator;te.next();){for(se=te.value,b.length=0,b.push(se.startX),b.push(se.startY),ne=se.startX,E=se.startY,he=ne,Ge=E,ge=se.segments.s,Se=ge.length,Ne=0;Ne<Se;Ne++){switch(nt=ge[Ne],nt.type){case ma:fp(a,y,b,x),b.length=0,b.push(nt.endX),b.push(nt.endY),ne=nt.endX,E=nt.endY,he=ne,Ge=E;break;case Po:b.push(nt.endX),b.push(nt.endY),ne=nt.endX,E=nt.endY;break;case ss:qt.Qe(ne,E,nt.point1X,nt.point1Y,nt.point2X,nt.point2Y,nt.endX,nt.endY,.5,b),ne=nt.endX,E=nt.endY;break;case Cl:qt.ep(ne,E,nt.point1X,nt.point1Y,nt.endX,nt.endY,.5,b),ne=nt.endX,E=nt.endY;break;case ha:if(ct=rl(nt,se),Je=ct.length,Je===0){b.push(nt.centerX),b.push(nt.centerY),ne=nt.centerX,E=nt.centerY;break}for(Ft=0;Ft<Je;Ft++)Ot=ct[Ft],qt.Qe(ne,E,Ot[2],Ot[3],Ot[4],Ot[5],Ot[6],Ot[7],.5,b),ne=Ot[6],E=Ot[7];break;case zl:if(ct=$s(nt,se,ne,E),Je=ct.length,Je===0){b.push(nt.endX),b.push(nt.endY),ne=nt.endX,E=nt.endY;break}for(Ft=0;Ft<Je;Ft++)Ot=ct[Ft],qt.Qe(ne,E,Ot[2],Ot[3],Ot[4],Ot[5],Ot[6],Ot[7],.5,b),ne=Ot[6],E=Ot[7];break;default:Yt("Segment not of valid type: "+nt.type)}nt.isClosed&&(b.push(he),b.push(Ge),fp(a,y,b,x))}fp(a,y,b,x)}else if(te.type===Jn.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),fp(a,y,b,x);else if(te.type===Jn.F){if(E=new $a,E.startX=te.endX,E.startY=(te.startY+te.endY)/2,ne=new Gi(ha),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=rl(ne,E),se=te.length,se===0)b.push(ne.centerX),b.push(ne.centerY);else for(ne=E.startX,E=E.startY,he=0;he<se;he++)Ge=te[he],qt.Qe(ne,E,Ge[2],Ge[3],Ge[4],Ge[5],Ge[6],Ge[7],.5,b),ne=Ge[6],E=Ge[7];fp(a,y,b,x)}On(b),a.restore(),a.Vc(!1)}}}},ot.kk=function(a,y,x){return!Jt.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)},ot.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:Jt.prototype.nk.call(this,a)},ot.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)}},ot.ga=function(a,y){if(y===void 0&&(y=new It),a instanceof yr){a.Mc()&&Yt("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},ot.mi=function(a){a===void 0&&(a=new wn);var y=this.naturalBounds,x=this.oe;y=wn.allocAt(y.x,y.y,y.width,y.height);var b=this.strokeWidth;return y.Bc(b/2,b/2),b=It.allocAt(y.x,y.y).transform(x),a.h(b.x,b.y,0,0),b.h(y.right,y.y).transform(x),no(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),no(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),no(a,b.x,b.y,0,0),wn.free(y),It.free(b),a},ot.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!==Jn.j||y||(E+=2);var te=wn.alloc();if(te.assign(b),te.Bc(E+2,E+2),!te.ca(a))return wn.free(te),!1;if(b=E+1e-4,x.type===Jn.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:(wn.free(te),qt.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===Jn.u){y=x.startX;var ne=x.startY,se=x.endX;if(x=x.endY,te.x=Math.min(y,se),te.y=Math.min(ne,x),te.width=Math.abs(se-y),te.height=Math.abs(x-ne),this.fill===null){if(te.Bc(-b,-b),te.ca(a))return wn.free(te),!1;te.Bc(b,b)}return this.stroke!==null&&te.Bc(E,E),a=te.ca(a),wn.free(te),a}if(x.type===Jn.F){ne=x.startX,E=x.startY,se=x.endX;var he=x.endY;if(x=Math.min(ne,se),y=Math.min(E,he),ne=Math.abs(se-ne)/2,E=Math.abs(he-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 wn.free(te),!1;ne+=b,E+=b}return this.stroke!==null&&(ne+=b,E+=b),wn.free(te),0>=ne||0>=E?!1:1>=x*x/(ne*ne)+y*y/(E*E)}if(x.type===Jn.o)return wn.free(te),this.fill===null?ic(x,a.x,a.y,E):$u(x,a,E,1<this.strokeWidth,y);Yt("Unknown Geometry type: "+x.type)},ot.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 se=this.figure,he=Tv[se];if(he===void 0){var ge=qt.Ze[se];typeof ge=="string"&&(ge=qt.Ze[ge]),typeof ge=="function"?(he=ge(null,100,100),Tv[se]=he):Yt("Unsupported Figure: "+se)}ne=he.bounds}se=ne.width,he=ne.height,ge=ne.width;var Se=ne.height;switch(sl(this,!0)){case Bn:b=x=0;break;case Hn:ge=Math.max(a-te,0),Se=Math.max(y-te,0);break;case wr:ge=Math.max(a-te,0),b=0;break;case _r:x=0,Se=Math.max(y-te,0)}isFinite(E.width)&&(ge=E.width),isFinite(E.height)&&(Se=E.height);var Ne=this.maxSize,Ge=this.minSize;switch(x=Math.max(x-te,Ge.width),b=Math.max(b-te,Ge.height),ge=Math.min(Ne.width,ge),Se=Math.min(Ne.height,Se),ge=isFinite(ge)?Math.max(x,ge):Math.max(se,x),Se=isFinite(Se)?Math.max(b,Se):Math.max(he,b),x=Ev(this),x){case Bn:break;case Hn:se=ge,he=Se;break;case fr:x=Math.min(ge/se,Se/he),isFinite(x)||(x=1),se*=x,he*=x;break;default:Yt(x+" is not a valid geometryStretch.")}this.Rd!==null?(se===0&&(se=.001),he===0&&(he=.001),x=this.Rd!==null?this.Rd:this.ua,ne=x.bounds,b=se/ne.width,ne=he/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&&qt.$(this.ua.Sk,a-te)&&qt.$(this.ua.Rk,y-te)||(this.ua=ci.makeGeometry(this,se,he)),ne=this.ua.bounds,a===1/0||y===1/0?this.Ge(ne.x-te/2,ne.y-te/2,a===0&&se===0?0:ne.width+te,y===0&&he===0?0:ne.height+te):this.Ge(-(te/2),-(te/2),ge+te,Se+te),E.w()?(ge=E.width,Se=E.height,ge=Math.min(Ne.width,ge),Se=Math.min(Ne.height,Se),ge=Math.max(Ge.width,ge),Se=Math.max(Ge.height,Se),this.dc.h(0,0,ge,Se)):this.dc.assign(ne)};function Ev(a){var y=a.geometryStretch;return a.Rd!==null?y===oi?Hn:y:y===oi?Tv[a.figure].defaultStretch:y}ot.eh=function(a,y,x,b){Ds(this,a,y,x,b)},ot.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},ot.Sj=function(a,y,x,b,E){var te=this.transform,ne=1/(te.m11*te.m22-te.m12*te.m21),se=te.m22*ne,he=-te.m12*ne,ge=-te.m21*ne,Se=te.m11*ne,Ne=ne*(te.m21*te.dy-te.m22*te.dx),Ge=ne*(te.m12*te.dx-te.m11*te.dy);te=a*se+y*ge+Ne,ne=a*he+y*Se+Ge,se=x*se+b*ge+Ne,he=x*he+b*Se+Ge,Ne=this.ig/2,ge=this.ua,ge===null&&(this.measure(1/0,1/0),ge=this.ua);var Je=ge.bounds;if(Se=!1,ge.type===Jn.j)if(1.5>=this.strokeWidth)Se=qt.Ve(ge.startX,ge.startY,ge.endX,ge.endY,te,ne,se,he,E);else{if(ge.startX===ge.endX?(b=Ne,Se=0):(y=(ge.endY-ge.startY)/(ge.endX-ge.startX),Se=Ne/Math.sqrt(1+y*y),b=Se*y),y=pn(),a=new It,qt.Ve(ge.startX+b,ge.startY+Se,ge.endX+b,ge.endY+Se,te,ne,se,he,a)&&y.push(a),a=new It,qt.Ve(ge.startX-b,ge.startY-Se,ge.endX-b,ge.endY-Se,te,ne,se,he,a)&&y.push(a),a=new It,qt.Ve(ge.startX+b,ge.startY+Se,ge.startX-b,ge.startY-Se,te,ne,se,he,a)&&y.push(a),a=new It,qt.Ve(ge.endX+b,ge.endY+Se,ge.endX-b,ge.endY-Se,te,ne,se,he,a)&&y.push(a),se=y.length,se===0)return On(y),!1;for(Se=!0,he=1/0,b=0;b<se;b++)a=y[b],x=(a.x-te)*(a.x-te)+(a.y-ne)*(a.y-ne),x<he&&(he=x,E.x=a.x,E.y=a.y);On(y)}else if(ge.type===Jn.u)Se=qt.Ff(Je.x-Ne,Je.y-Ne,Je.x+Je.width+Ne,Je.y+Je.height+Ne,te,ne,se,he,E);else if(ge.type===Jn.F){y=wn.allocAt(Je.x,Je.y,Je.width,Je.height).Bc(Ne,Ne);e:if(y.width===0)Se=qt.Ve(y.x,y.y,y.x,y.y+y.height,te,ne,se,he,E);else if(y.height===0)Se=qt.Ve(y.x,y.y,y.x+y.width,y.y,te,ne,se,he,E);else{if(a=y.width/2,ge=y.height/2,b=y.x+a,Se=y.y+ge,x=9999,te!==se&&(x=(ne-he)/(te-se)),9999>Math.abs(x)){if(he=ne-Se-x*(te-b),0>a*a*x*x+ge*ge-he*he){E.x=NaN,E.y=NaN,Se=!1;break e}Ne=Math.sqrt(a*a*x*x+ge*ge-he*he),se=(-(a*a*x*he)+a*ge*Ne)/(ge*ge+a*a*x*x)+b,a=(-(a*a*x*he)-a*ge*Ne)/(ge*ge+a*a*x*x)+b,ge=x*(se-b)+he+Se,he=x*(a-b)+he+Se,Math.abs((te-se)*(te-se))+Math.abs((ne-ge)*(ne-ge))<Math.abs((te-a)*(te-a))+Math.abs((ne-he)*(ne-he))?(E.x=se,E.y=ge):(E.x=a,E.y=he)}else{if(se=ge*ge,he=te-b,se-=se/(a*a)*he*he,0>se){E.x=NaN,E.y=NaN,Se=!1;break e}he=Math.sqrt(se),se=Se+he,he=Se-he,Math.abs(se-ne)<Math.abs(he-ne)?(E.x=te,E.y=se):(E.x=te,E.y=he)}Se=!0}wn.free(y)}else if(ge.type===Jn.o){Ge=It.alloc();var nt=se-te,ct=he-ne,Ft=nt*nt+ct*ct,Ot=te,zt=ne;if(0<Ft&&Je.contains(Ot,zt)&&(Ge.x=Ot,Ge.y=zt,this.ca(Ge)))for(nt!==0&&.5>Math.abs(nt)?(ct*=.5/nt,nt=.5):ct!==0&&.5>Math.abs(ct)&&(nt*=.5/ct,ct=.5),Ot-=nt,zt-=ct;Je.contains(Ot,zt);)Ot-=nt,zt-=ct;for(E.x=se,E.y=he,ct=0;ct<ge.figures.count;ct++){var Ht=ge.figures.s[ct],Wt=Ht.isFilled?Ot:te,Xt=Ht.isFilled?zt:ne,hn=Ht.segments;Je=Ht.startX,nt=Ht.startY;for(var er=Je,cr=nt,sr=0;sr<hn.count;sr++){var Wn=hn.s[sr],An=Wn.type,ei=Wn.endX,Vr=Wn.endY,Xi=!1;switch(An){case ma:er=ei,cr=Vr;break;case Po:Xi=Dm(Je,nt,ei,Vr,Wt,Xt,se,he,Ge);break;case ss:Xi=qt.Eo(Je,nt,Wn.point1X,Wn.point1Y,Wn.point2X,Wn.point2Y,ei,Vr,Wt,Xt,se,he,.6,Ge);break;case Cl:Xi=qt.Eo(Je,nt,Je+2/3*(Wn.point1X-Je),nt+2/3*(Wn.point1Y-nt),ei+2/3*(Wn.point1X-ei),Vr+2/3*(Wn.point1Y-Vr),ei,Vr,Wt,Xt,se,he,.6,Ge);break;case ha:case zl:An=Wn.type===ha?rl(Wn,Ht):$s(Wn,Ht,Je,nt);var bo=An.length;if(bo===0){Xi=Dm(Je,nt,Wn.type===ha?Wn.centerX:Wn.endX,Wn.type===ha?Wn.centerY:Wn.endY,Wt,Xt,se,he,Ge);break}for(Vr=null,ei=0;ei<bo;ei++){if(Vr=An[ei],ei===0&&Dm(Je,nt,Vr[0],Vr[1],Wt,Xt,se,he,Ge)){var Qa=Im(Wt,Xt,Ge,Ft,E);Qa<Ft&&(Ft=Qa,Se=!0)}qt.Eo(Vr[0],Vr[1],Vr[2],Vr[3],Vr[4],Vr[5],Vr[6],Vr[7],Wt,Xt,se,he,.6,Ge)&&(Qa=Im(Wt,Xt,Ge,Ft,E),Qa<Ft&&(Ft=Qa,Se=!0))}ei=Vr[6],Vr=Vr[7];break;default:Yt("Unknown Segment type: "+An)}Je=ei,nt=Vr,Xi&&(Xi=Im(Wt,Xt,Ge,Ft,E),Xi<Ft&&(Ft=Xi,Se=!0)),Wn.isClosed&&(ei=er,Vr=cr,Dm(Je,nt,ei,Vr,Wt,Xt,se,he,Ge)&&(Wn=Im(Wt,Xt,Ge,Ft,E),Wn<Ft&&(Ft=Wn,Se=!0)))}}te=x-a,ne=b-y,se=Math.sqrt(te*te+ne*ne),se!==0&&(te/=se,ne/=se),E.x-=te*Ne,E.y-=ne*Ne,It.free(Ge)}else Yt("Unknown Geometry type: "+ge.type);return Se?(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,se,he){if(qt.$(a,x)&&qt.$(y,b)||qt.$(E,ne)&&qt.$(te,se))return!1;var ge=!1,Se=(E-ne)*(y-b)-(te-se)*(a-x);return Se===0?!1:(he.x=((E*se-te*ne)*(a-x)-(E-ne)*(a*b-y*x))/Se,he.y=((E*se-te*ne)*(y-b)-(te-se)*(a*b-y*x))/Se,(a>x?a-x:x-a)<(y>b?y-b:b-y)?(a=y<b?y:b,y=y<b?b:y,(he.y>a||qt.$(he.y,a))&&(he.y<y||qt.$(he.y,y))&&(ge=!0)):(y=a<x?a:x,a=a<x?x:a,(he.x>y||qt.$(he.x,y))&&(he.x<a||qt.$(he.x,a))&&(ge=!0)),ge)}ot.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=It.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)))),It.free(te),E},ot.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=fi.alloc();x.set(y),x.Vj();var b=a.left,E=a.right,te=a.top;a=a.bottom;var ne=It.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 It.free(ne),!0;var se=It.alloc(),he=It.alloc();return x.set(y),x.bv(this.transform),x.Vj(),se.x=E,se.y=te,se.transform(x),ne.x=b,ne.y=te,ne.transform(x),y=!1,Kd(this,ne,se,he)?y=!0:(ne.x=E,ne.y=a,ne.transform(x),Kd(this,ne,se,he)?y=!0:(se.x=b,se.y=a,se.transform(x),Kd(this,ne,se,he)?y=!0:(ne.x=b,ne.y=te,ne.transform(x),Kd(this,ne,se,he)&&(y=!0)))),It.free(ne),fi.free(x),It.free(se),It.free(he),y};function Kd(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)}ot.tx=function(a,y,x){function b(Ft,Ot){for(var zt=Ft.length,Ht=0;Ht<zt;Ht+=2)if(Ot.zd(Ft[Ht],Ft[Ht+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,se=ne.x,he=ne.y,ge=ne.x+ne.width;if(ne=ne.y+ne.height,Ar(a.x,a.y,se,he)<=E&&Ar(a.x,a.y,ge,he)<=E&&Ar(a.x,a.y,se,ne)<=E&&Ar(a.x,a.y,ge,ne)<=E)return!0}if(se=y.startX,he=y.startY,ge=y.endX,ne=y.endY,y.type===Jn.j){if(x=(se-ge)*(a.x-ge)+(he-ne)*(a.y-ne),vo(a.x,a.y,se,he,ge,ne)<=(0<=(ge-se)*(a.x-se)+(ne-he)*(a.y-he)&&0<=x?E:te))return!0}else{if(y.type===Jn.u)return y=!1,x&&(y=vo(a.x,a.y,se,he,se,ne)<=E||vo(a.x,a.y,se,he,ge,he)<=E||vo(a.x,a.y,ge,he,ge,ne)<=E||vo(a.x,a.y,se,ne,ge,ne)<=E),y;if(y.type===Jn.F){y=a.x-(se+ge)/2,te=a.y-(he+ne)/2;var Se=Math.abs(ge-se)/2,Ne=Math.abs(ne-he)/2;if(Se===0||Ne===0)return vo(a.x,a.y,se,he,ge,ne)<=E;if(x){if(a=qt.$y(Se,Ne,y,te),a*a<=E)return!0}else return!(Ar(y,te,-Se,0)>=E||Ar(y,te,0,-Ne)>=E||Ar(y,te,0,Ne)>=E||Ar(y,te,Se,0)>=E)}else if(y.type===Jn.o){if(ge=y.bounds,te=ge.x,se=ge.y,he=ge.x+ge.width,ge=ge.y+ge.height,a.x>he&&a.x<te&&a.y>ge&&a.y<se&&vo(a.x,a.y,te,se,te,ge)>E&&vo(a.x,a.y,te,se,he,se)>E&&vo(a.x,a.y,he,ge,te,ge)>E&&vo(a.x,a.y,he,ge,he,se)>E)return!1;if(te=Math.sqrt(E),x){if(this.fill===null?ic(y,a.x,a.y,te):$u(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,Se=te.startY,a.zd(ne,Se)>E)return!1;for(se=te.segments.s,he=se.length,ge=0;ge<he;ge++)switch(Ne=se[ge],Ne.type){case ma:case Po:if(ne=Ne.endX,Se=Ne.endY,a.zd(ne,Se)>E)return!1;break;case ss:var Ge=pn();if(qt.Qe(ne,Se,Ne.point1X,Ne.point1Y,Ne.point2X,Ne.point2Y,Ne.endX,Ne.endY,.8,Ge),ne=b(Ge,a),On(Ge),ne||(ne=Ne.endX,Se=Ne.endY,a.zd(ne,Se)>E))return!1;break;case Cl:if(Ge=pn(),qt.ep(ne,Se,Ne.point1X,Ne.point1Y,Ne.endX,Ne.endY,.8,Ge),ne=b(Ge,a),On(Ge),ne||(ne=Ne.endX,Se=Ne.endY,a.zd(ne,Se)>E))return!1;break;case ha:case zl:Ge=Ne.type===ha?rl(Ne,te):$s(Ne,te,ne,Se);var Je=Ge.length;if(Je===0){if(ne=Ne.type===ha?Ne.centerX:Ne.endX,Se=Ne.type===ha?Ne.centerY:Ne.endY,a.zd(ne,Se)>E)return!1;break}Ne=null;for(var nt=pn(),ct=0;ct<Je;ct++)if(Ne=Ge[ct],nt.length=0,qt.Qe(Ne[0],Ne[1],Ne[2],Ne[3],Ne[4],Ne[5],Ne[6],Ne[7],.8,nt),b(nt,a))return On(nt),!1;On(nt),Ne!==null&&(ne=Ne[6],Se=Ne[7]);break;default:Yt("Unknown Segment type: "+Ne.type)}}return!0}}}return!1},ot.qc=function(){this.ua=null},ot.kq=function(){return this.ig};function v1(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=Pg,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=Va):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new yr(1-Va.x,Va.y)))}ci.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var b=Oc[a.toArrow];else a.fromArrow!=="None"?b=Oc[a.fromArrow]:(b=qt.Ze[a.figure],typeof b=="string"&&(b=qt.Ze[b]),b===void 0&&Yt("Unknown Shape.figure: "+a.figure),b=b(a,y,x),b.Sk=y,b.Rk=x);if(b===null){var E=qt.Ze.Rectangle;typeof E=="function"&&(b=E(a,y,x))}return b};function y1(a){var y=Oc[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=Oc[x],y===void 0){var b=null,E;for(E in qt.um)if(E.toLowerCase()===x){b=E;break}if(b!==null)return a=Jn.parse(qt.um[b],!1),Oc[b]=a,x!==b&&(Oc[x]=b),b}}return typeof y=="string"?y:y instanceof Jn?a:null}Ut.Object.defineProperties(ci.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),ys(this)&&(a=this.part,a!==null&&ko(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=Jn.parse(a);var y=a.normalize();this.geometry=a,this.position=a=It.allocAt(-y.x,-y.y),It.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&&Pf(a,"Shape.fill"),a instanceof oo&&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&&Pf(a,"Shape.stroke"),a instanceof oo&&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 Qn(a,"value >= 0",ci,"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"?Qn(a,'"butt", "round", or "square"',ci,"strokeCap"):(Wd(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"?Qn(a,'"miter", "bevel", or "round"',ci,"strokeJoin"):(Wd(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){Wd(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)||Yt("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&&(Wd(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=qt.Ze[a];typeof x=="function"?x=a:(x=qt.Ze[a.toLowerCase()])||Yt("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?Yt("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new qh),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?Yt("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new qh),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:ro},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),Wd(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:ro},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),Wd(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&&(Wd(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:oi},set:function(a){var y=this.geometryStretch;y!==a&&(Wd(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 Nc),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&sc(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 Nc),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 Nc),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 Nc),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),ci.prototype.intersectsRect=ci.prototype.Yc,ci.prototype.containedInRect=ci.prototype.fh,ci.prototype.getNearestIntersectionPoint=ci.prototype.rs,ci.prototype.getDocumentBounds=ci.prototype.mi,ci.prototype.getDocumentPoint=ci.prototype.ga;var Oc=new ar,Tv=new ar;ci.className="Shape",ci.getFigureGenerators=function(){var a=new ur,y;for(y in qt.Ze)y!==y.toLowerCase()&&a.add(y,qt.Ze[y]);return a.freeze(),a},ci.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),b=qt.Ze;b[a]=y,b[x]=a},ci.getArrowheadGeometries=function(){var a=new ur;for(b in qt.um)if(Oc[b]===void 0){var y=Jn.parse(qt.um[b],!1);Oc[b]=y,y=b.toLowerCase(),y!==b&&(Oc[y]=b)}for(var x in Oc)if(x!==x.toLowerCase()){var b=Oc[x];b instanceof Jn&&a.add(x,b)}return a.freeze(),a},ci.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=Jn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||Yt("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var b=Oc;b[a]=x,b[y]=a};function Mv(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=oi,this.gg=this.fg=ro}Mv.prototype.copy=function(){var a=new Mv;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 Co(a,y){return Jt.call(this),zm||(ll=na?new yu(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}un(Co,Jt),Co.prototype.cloneProtected=function(a){Jt.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 hc(a){a.da===null?a.da=new Iv:a.da.nc&&(a.da=a.da.copy())}ot=Co.prototype,ot.th=function(){Jt.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}ot.qb=function(a){a.classType===Co?this.wrap=a:Jt.prototype.qb.call(this,a)},ot.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},ot.v=function(){Jt.prototype.v.call(this)},ot.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),se=a.textAlign=this.textAlign,he=y.tn;se==="start"?se=he?"right":"left":se==="end"&&(se=he?"left":"right"),he=this.isUnderline;var ge=this.isStrikethrough;ia(this,a,this.xc,!0,!1,x,b),(he||ge)&&ia(this,a,this.xc,!1,!1,x,b),b=0,x=!1;var Se=this.oe,Ne=Se.dx-(ne*Se.m21+Se.dx);Se=Se.dy-(ne*Se.m22+Se.dy);var Ge=y.scale;switch(8>(Ne*Ne+Se*Se)*Ge*Ge&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Ml&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,Ne=this.spacingBelow,this.flip){case Bi:a.translate(E,0),a.scale(-1,1);break;case vi:a.translate(0,te),a.scale(1,-1);break;case fo:a.translate(E,te),a.scale(-1,-1)}if(a.yc(),Se=this.Gc,Ge=(y+ne+Ne)*Se,te>Ge&&(b=this.verticalAlignment,b=b.y*te-b.y*Ge+b.offsetY),Se===1&&this.ze!==null)Ne=this.Cb,Ne>E&&(Ne=E),this.Oj(this.ze,a,0,b+y,E,ne,Ne,x,se,he,ge);else if(this.Qc!==null&&this.Qb!==null)for(Ge=0;Ge<Se;Ge++){var Je=this.Qc[Ge];Je>E&&(Je=E),b+=y,this.Oj(this.Qb[Ge],a,0,b,E,ne,Je,x,se,he,ge),b+=ne+Ne}switch(this.flip){case Bi:a.scale(-1,1),a.translate(-E,0);break;case vi:a.scale(1,-1),a.translate(0,-te);break;case fo:a.scale(-1,-1),a.translate(-E,-te)}}},ot.Oj=function(a,y,x,b,E,te,ne,se,he,ge,Se){var Ne=0;if(se)he==="left"?Ne=0:he==="right"?Ne=E-ne:he==="center"&&(Ne=(E-ne)/2),y.fillRect(x+Ne,b+.25*te,ne,1);else{if(he==="left"?Ne=0:he==="right"?Ne=E:he==="center"&&(Ne=E/2),E=Fm!==null?Fm(this,te):.75*te,y.fillText(a,x+Ne,b+E),a=te/20|0,a===0&&(a=1),he==="right"?Ne-=ne:he==="center"&&(Ne-=ne/2),ge){se=Bm!==null?Bm(this,te):.8*te,he=x+Ne,ge=b+se,E=x+Ne+ne,se=b+se;var Ge=a;y.beginPath(),y.lineWidth=Ge,y.moveTo(he,ge),y.lineTo(E,se),y.stroke(),y.Se(),y instanceof Ml&&y.ad.classList.add("gojs-td")}Se&&(Se=b+te-te/2.2|0,a%2!==0&&(Se+=.5),b=x+Ne,te=Se,x=x+Ne+ne,ne=Se,Ne=a,y.beginPath(),y.lineWidth=Ne,y.moveTo(b,te),y.lineTo(x,ne),y.stroke(),y.Se(),y instanceof Ml&&y.ad.classList.add("gojs-td"))}},ot.kk=function(a,y,x){if(!Jt.prototype.kk.call(this,a,y,x))return!1;if(ia(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},ot.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:Jt.prototype.nk.call(this,a)},ot.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)}},ot.Wl=function(a,y,x,b){var E=this.Gc;this.Ih=a,this.l&=-16777217;var te=this.Ae;ll!==null&&T1!==te&&(T1=ll.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 se=ne=0,he=!1;!he;){var ge=te.indexOf(`
`,se);ge===-1&&(ge=te.length,he=!0),se=te.substr(se,ge-se),this.formatting===vg&&(se=se.trim()),ne=Math.max(ne,Nu(se)),se=ge+1}te=ne}else ne=te.indexOf(`
`,0),0<=ne&&(te=te.substr(0,ne)),te=Nu(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,he=ne,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===Rm&&(y=this.Ae,y=this.overflow===Rm?x1(y):0,ge=this.spacingAbove+this.spacingBelow,ge=Math.max(0,mg(this)+ge),he=Math.min(this.maxLines-1,Math.max(Math.floor(he/ge+.01)-1,0)),!(he+1>=this.Qb.length))){for(this.l|=16777216,ge=this.Qb[he],y=Math.max(1,a-y);Nu(ge)>y&&1<ge.length;)ge=ge.substr(0,ge.length-1);ge+=yg,y=Nu(ge),this.Qb[he]=ge,this.Qb=this.Qb.slice(0,he+1),this.Qc[he]=y,this.Qc=this.Qc.slice(0,he+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),Fa(this.dc,te,ne),this.Ge(0,0,te,ne),this.svg!==null&&E!==this.Gc&&(this.Uc=!0)},ot.eh=function(a,y,x,b){Ds(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 Lv(a,y,x,b){var E=a.formatting===vg;E&&(y=y.trim());var te=0,ne=a.Ae,se=a.spacingAbove+a.spacingBelow;se=Math.max(0,mg(a)+se);var he=a.overflow===Rm?x1(ne):0;if(a.Gc>=a.maxLines)b!==null&&b.h(0,se);else if(ne=y,a.wrap===kv){a.Le=1;var ge=Nu(y);if(he===0||ge<=x)a.Cb=Math.max(a.Cb,ge),gg(a,y,a.Cb),b!==null&&b.h(ge,se);else{for(te=pp(a,ne),ne=ne.substr(te.length),y=pp(a,ne),ge=Nu(te+y);0<y.length&&ge<=x;)te+=y,ne=ne.substr(y.length),y=pp(a,ne),ge=te+y,E&&(ge=ge.trim()),ge=Nu(ge);for(E&&(y=y.trim()),te+=y,x=Math.max(1,x-he);Nu(te)>x&&1<te.length;)te=te.substr(0,te.length-1);a.l|=16777216,te+=yg;var Se=Nu(te);a.Cb=Se,gg(a,te,Se),b!==null&&b.h(Se,se)}}else{for(he=0,ne.length===0&&(he=1,gg(a,ne,0));0<ne.length;){for(y=pp(a,ne),ne=ne.substr(y.length);Nu(y)>x;){var Ne=1;for(ge=Nu(y.substr(0,Ne)),Se=0;ge<=x;)Ne++,Se=ge,ge=Nu(y.substr(0,Ne));if(Ne===1){var Ge=ge;te=Math.max(te,ge)}else Ge=Se,te=Math.max(te,Se);if(Ne--,1>Ne&&(Ne=1),gg(a,y.substr(0,Ne),Ge),he++,y=y.substr(Ne),a.Gc+he>a.maxLines)break}for(Se=pp(a,ne),ge=Nu(y+Se);0<Se.length&&ge<=x;)y+=Se,ne=ne.substr(Se.length),Se=pp(a,ne),ge=y+Se,E&&(ge=ge.trim()),ge=Nu(ge);if(E&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),Se.length===0?(Ne=ge,te=Math.max(te,ge)):(Ne=Se=Nu(y),te=Math.max(te,Se)),gg(a,y,Ne),he++,a.Gc+he>a.maxLines))break}a.Le=Math.min(a.maxLines,he),a.Cb=Math.max(a.Cb,te),b!==null&&b.h(a.Cb,se*a.Le)}}function pp(a,y){if(a.wrap===P1)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===C1&&(x=Math.min(x,b+1));b<x&&E.test(y.charAt(b));)b++;return b>=y.length?y:y.substr(0,b)}function Nu(a){return ll===null?8*a.length:ll.measureText(a).width}function mg(a){if(a.df!==null)return a.df;var y=a.Ae;if(ll===null){var x=16;return a.df=x}return Av[y]!==void 0&&5e3>E1?x=Av[y]:(x=1.3*ll.measureText("M").width,Av[y]=x,E1++),a.df=x}function x1(a){if(ll===null)return 6;if(_m[a]!==void 0&&5e3>jv)var y=_m[a];else y=ll.measureText(yg).width,_m[a]=y,jv++;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,se=!1;!se;){if(ne=x.indexOf(`
`,te),ne===-1&&(ne=x.length,se=!0),te<=ne){if(te=x.substr(te,ne-te),a.wrap!==kv){a.Le=0;var he=Zn.alloc();Lv(a,te,y,he),E+=he.height,Zn.free(he),a.Gc+=a.Le}else Lv(a,te,y,null),E+=b,a.Gc++;a.Gc===a.maxLines&&(se=!0)}te=ne+1}return a.Lq=E}Ut.Object.defineProperties(Co.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"||(hc(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:Bn},set:function(a){var y=this.flip;y!==a&&(hc(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:Ya},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),hc(this),this.da.Yr=a,Hs(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=Zn.alloc();Lv(this,this.ec,999999,a);var y=a.width;Zn.free(a),a=w1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Fa(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:Ov},set:function(a){var y=this.wrap;y!==a&&(hc(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:Nv},set:function(a){var y=this.overflow;y!==a&&(hc(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&&Pf(a,"TextBlock.stroke"),a instanceof oo&&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&&(hc(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&&(hc(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 Nc),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 Nc),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 Nc),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 Nc),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 Nc),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&&(hc(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&&(hc(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&&(hc(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&&(hc(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&&(hc(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&&Qn(a,"> 0",Co,"maxLines"),hc(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 Fm=null,Bm=null,kv=new tn(Co,"None",0),b1=new tn(Co,"WrapFit",1),Ov=new tn(Co,"WrapDesiredSize",2),P1=new tn(Co,"WrapBreakAll",3),Nv=new tn(Co,"OverflowClip",0),Rm=new tn(Co,"OverflowEllipsis",1),vg=new tn(Co,"FormatTrim",0),C1=new tn(Co,"FormatNone",0),xx=/[ \u200b\u00ad]/,Av=new ar,E1=0,_m=new ar,jv=0,yg="...",T1="",ll=null,zm=!1;Co.className="TextBlock";function Iv(){this.nc=!1,this.Hd=null,this.Xf=Bn,this.gq=vg,this.Jq=1/0,this.$q=Nv,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=Ya,this.$r=Ov}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},Co.getEllipsis=function(){return yg},Co.setEllipsis=function(a){yg=a,_m=new ar,jv=0},Co.getBaseline=function(){return Fm},Co.setBaseline=function(a){Fm=a},Co.getUnderline=function(){return Bm},Co.setUnderline=function(a){Bm=a},Co.isValidFont=function(a){if(zm||(ll=na?new yu(null).context:null,zm=!0),ll===null)return!0;var y=ll.font;if(a===y||a==="10px sans-serif")return!0;ll.font="10px sans-serif",ll.font=a;var x=ll.font;if(x!=="10px sans-serif")return ll.font=y,!0;ll.font="19px serif";var b=ll.font;return ll.font=a,x=ll.font,ll.font=y,x!==b},Co.FormatNone=C1,Co.FormatTrim=vg,Co.None=kv,Co.OverflowClip=Nv,Co.OverflowEllipsis=Rm,Co.WrapBreakAll=P1,Co.WrapDesiredSize=Ov,Co.WrapFit=b1;function Nc(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}Nc.prototype.copy=function(){var a=new Nc;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},Nc.className="GradElementSettings";function ul(a,y){Jt.call(this),this.Eg=null,this.qo="",this.Xg=ao,this.Nk=Hn,this.Zg=this.Hd=null,this.Mk=Di,this.Xf=Bn,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 gp;un(ul,Jt),ul.prototype.cloneProtected=function(a){Jt.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},ul.prototype.qb=function(a){a===Bn||a===fr||a===Ti?this.imageStretch=a:Jt.prototype.qb.call(this,a)},ul.prototype.toString=function(){return"Picture("+this.source+")#"+Mi(this)};function mp(a){a===void 0&&(a=""),a!==""?gp[a]&&(delete gp[a],$m--):(gp=new ar,$m=0)}function M1(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 se=ne.length,he=0;he<se;he++)te=ne[he],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()||(Aa(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=pn();for(var se=0;se<E;se++)te.push(ne[se]);if(y.hn)for(se=0;se<E;se++)ne=te[se],ne.Hd!==null&&ne.Hd(ne,x);On(te)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}ul.prototype.hA=function(){if(this.source!==""){mp(this.source);var a=this.source;this.source="",this.source=a}},ul.prototype.redraw=function(){this.N(),this.Uc=!0},ul.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 Hd)){var E=a instanceof Ml;b=this.naturalBounds;var te=0,ne=0,se=this.qn,he=se?+x.width:x.naturalWidth;if(se=se?+x.height:x.naturalHeight,he===void 0&&x.videoWidth&&(he=x.videoWidth),se===void 0&&x.videoHeight&&(se=x.videoHeight),he=he||b.width,se=se||b.height,he!==0&&se!==0){var ge=he,Se=se;this.sourceRect.w()&&(te=this.Xg.x,ne=this.Xg.y,he=this.Xg.width,se=this.Xg.height);var Ne=he,Ge=se,Je=this.Nk,nt=this.Mk;switch(Je){case Bn:if(this.sourceRect.w())break;Ne>=b.width&&(te=te+nt.offsetX+(Ne*nt.x-b.width*nt.x)),Ge>=b.height&&(ne=ne+nt.offsetY+(Ge*nt.y-b.height*nt.y)),he=Math.min(b.width,Ne),se=Math.min(b.height,Ge);break;case Hn:Ne=b.width,Ge=b.height;break;case fr:case Ti:Je===fr?(Je=Math.min(b.height/Ge,b.width/Ne),Ne*=Je,Ge*=Je):Je===Ti&&(Je=Math.max(b.height/Ge,b.width/Ne),Ne*=Je,Ge*=Je,Ne>=b.width&&(te=(te+nt.offsetX+(Ne*nt.x-b.width*nt.x)/Ne)*he),Ge>=b.height&&(ne=(ne+nt.offsetY+(Ge*nt.y-b.height*nt.y)/Ge)*se),he*=1/(Ne/b.width),se*=1/(Ge/b.height),Ne=b.width,Ge=b.height)}Je=this.Df()*y.scale;var ct=Ne*Je*Ge*Je,Ft=he*se/ct,Ot=x.__goCache;Je=null;var zt=wx;if(!E){if(x.sq&&Ot!==void 0&&4<ct&&Ft>zt*zt)for(Ot.gi===null&&(k1(Ot,4,ge,Se,x),k1(Ot,16,ge,Se,x)),E=Ot.gi,ge=E.length,Se=0;Se<ge&&E[Se].ratio*E[Se].ratio<Ft;Se++)Je=E[Se];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{E=new yu(null).context;try{E.drawImage(this.Eg,0,0)}catch(Ht){this.en=!1}try{E.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(Ht){this.vl=!0}}if(this.vl)return}}switch(E=Ne<b.width?nt.offsetX+(b.width*nt.x-Ne*nt.x):0,nt=Ge<b.height?nt.offsetY+(b.height*nt.y-Ge*nt.y):0,this.flip){case Bi:a.translate(Math.min(b.width,Ne),0),a.scale(-1,1);break;case vi:a.translate(0,Math.min(b.height,Ge)),a.scale(1,-1);break;case fo:a.translate(Math.min(b.width,Ne),Math.min(b.height,Ge)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&Ot!==void 0&&Je!==null&&Je.ratio!==1){a.save(),y=Je.ratio;try{a.drawImage(Je.source,te/y,ne/y,Math.min(Je.source.width,he/y),Math.min(Je.source.height,se/y),E,nt,Math.min(b.width,Ne),Math.min(b.height,Ge)),a instanceof Ml&&(this.bt=[te/y,ne/y,Math.min(Je.source.width,he/y),Math.min(Je.source.height,se/y),E,nt,Math.min(b.width,Ne),Math.min(b.height,Ge)])}catch(Ht){this.en=!1}a.restore()}else try{a.drawImage(x,te,ne,he,se,E,nt,Math.min(b.width,Ne),Math.min(b.height,Ge)),a instanceof Ml&&(this.bt=[te,ne,he,se,E,nt,Math.min(b.width,Ne),Math.min(b.height,Ge)])}catch(Ht){this.en=!1}switch(this.flip){case Bi:a.scale(-1,1),a.translate(-Math.min(b.width,Ne),0);break;case vi:a.scale(1,-1),a.translate(0,-Math.min(b.height,Ge));break;case fo:a.scale(-1,-1),a.translate(-Math.min(b.width,Ne),-Math.min(b.height,Ge))}}}}},ul.prototype.Wl=function(a,y,x,b){var E=this.desiredSize,te=sl(this,!0),ne=this.Eg,se=this.qn,he=0,ge=0;(se||!this.al&&ne&&ne.complete)&&(this.al=!0),ne===null?(isFinite(E.width)||(a=0),isFinite(E.height)||(y=0)):(he=se?+ne.width:ne.naturalWidth,ge=se?+ne.height:ne.naturalHeight),isFinite(E.width)||te===Hn||te===wr?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:ne!==null&&(a=he)),x=0):ne!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:he),isFinite(E.height)||te===Hn||te===_r?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:ne!==null&&(y=ge)),b=0):ne!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:ge),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)),Fa(this.dc,a,y),this.Ge(0,0,a,y)},ul.prototype.eh=function(a,y,x,b){Ds(this,a,y,x,b)},Ut.Object.defineProperties(ul.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||Yt("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var b=this.diagram;b!==null&&Jp(b,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new Nn),b!==null&&x&&Yh(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()||(Aa(this,!1),this.v())):x&&M1(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=gp;if(na){var b=null;if(x[a]!==void 0)b=x[a];else if(a!==""){30<$m&&(mp(),x=gp),b=Pn("img"),b.hn=!0,M1(this,b);var E=this.rl;E!==null&&(b.crossOrigin=E(this)),b.src=a,x[a]=b,$m++}this.element=b,b!==null&&b.__goCache===void 0&&(b.__goCache=new L1),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}}}),ul.prototype.redraw=ul.prototype.redraw,ul.prototype.reloadSource=ul.prototype.hA;var $m=0,wx=4;ul.className="Picture",gp=new ar,ul.clearCache=mp;function L1(){this.gi=null}function k1(a,y,x,b,E){a.gi===null&&(a.gi=[]);var te=new yu(null),ne=te.context,se=1/y;te.width=x/y,te.height=b/y,te.width!==0&&te.height!==0&&(y=new O1(te.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],E=x.source,x=x.ratio),ne.setTransform(se*x,0,0,se*x,0,0),ne.yc(),ne.drawImage(E,0,0),a.gi.push(y))}L1.className="PictureCacheArray";function O1(a,y){this.source=a,this.ratio=y}O1.className="PictureCacheInstance";function vp(){this.os=new Jn,this.mc=null}vp.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new Jn,this.mc=null};function yp(a,y,x,b,E,te){a.mc=new $a,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()}vp.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var b=new Gi(ma);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)},vp.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var b=new Gi(Po);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)};function Eh(a,y,x,b,E,te,ne){var se;se===void 0&&(se=!1);var he=new Gi(ss);he.point1X=y,he.point1Y=x,he.point2X=b,he.point2Y=E,he.endX=te,he.endY=ne,se&&he.close(),a.mc.segments.add(he)}function Gm(a,y,x,b,E){var te;te===void 0&&(te=!1);var ne=new Gi(Cl);ne.point1X=y,ne.point1Y=x,ne.endX=b,ne.endY=E,te&&ne.close(),a.mc.segments.add(ne)}vp.prototype.arcTo=function(a,y,x,b,E,te,ne){te===void 0&&(te=0),ne===void 0&&(ne=!1);var se=new Gi(ha);se.startAngle=a,se.sweepAngle=y,se.centerX=x,se.centerY=b,se.radiusX=E,se.radiusY=te!==0?te:E,ne&&se.close(),this.mc.segments.add(se)};function Px(a,y,x,b,E,te,ne,se){var he;he===void 0&&(he=!1),y=new Gi(zl,ne,se,y,x,b,E,te),he&&y.close(),a.mc.segments.add(y)}function N1(a){var y=Hm;return y!==null?(Hm=null,y.reset(a),y):(y=new vp,y.reset(a),y)}var Hm=null;vp.className="StreamGeometryContext";function Ns(a,y){var x=a.toLowerCase(),b=qt.Ze;b[a]=y,b[x]=a}Ns("Rectangle",function(a,y,x){a="r"+y+","+x;var b=qt.Mf[a];return b!==void 0||(b=new Jn(Jn.u),b.endX=y,b.endY=x,qt.Nf<qt.vm&&(qt.Mf[a]=b,qt.Nf++)),b}),Ns("Square",function(a,y,x){a="s"+y+","+x;var b=qt.Mf[a];return b!==void 0||(b=new Jn(Jn.u),b.endX=y,b.endY=x,b.defaultStretch=fr,qt.Nf<qt.vm&&(qt.Mf[a]=b,qt.Nf++)),b}),Ns("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=qt.Mf[b];if(E!==void 0)return E;var te=a*qt.wg;return E=new Jn().add(new $a(a,0,!0).add(new Gi(Po,y-a,0)).add(new Gi(ss,y,a,y-te,0,y,te)).add(new Gi(Po,y,x-a)).add(new Gi(ss,y-a,x,y,x-te,y-te,x)).add(new Gi(Po,a,x)).add(new Gi(ss,0,x-a,te,x,0,x-te)).add(new Gi(Po,0,a)).add(new Gi(ss,a,0,0,te,te,0).close())),1<te&&(E.spot1=new yr(0,0,te,te),E.spot2=new yr(1,1,-te,-te)),qt.Nf<qt.vm&&(qt.Mf[b]=E,qt.Nf++),E}),Ns("Border","RoundedRectangle"),Ns("Ellipse",function(a,y,x){a="e"+y+","+x;var b=qt.Mf[a];return b!==void 0||(b=new Jn(Jn.F),b.endX=y,b.endY=x,b.spot1=zu,b.spot2=_l,qt.Nf<qt.vm&&(qt.Mf[a]=b,qt.Nf++)),b}),Ns("Circle",function(a,y,x){a="c"+y+","+x;var b=qt.Mf[a];return b!==void 0||(b=new Jn(Jn.F),b.endX=y,b.endY=x,b.spot1=zu,b.spot2=_l,b.defaultStretch=fr,qt.Nf<qt.vm&&(qt.Mf[a]=b,qt.Nf++)),b}),Ns("TriangleRight",function(a,y,x){return new Jn().add(new $a(0,0).add(new Gi(Po,y,.5*x)).add(new Gi(Po,0,x).close())).pm(0,.25,.5,.75)}),Ns("TriangleDown",function(a,y,x){return new Jn().add(new $a(0,0).add(new Gi(Po,y,0)).add(new Gi(Po,.5*y,x).close())).pm(.25,0,.75,.5)}),Ns("TriangleLeft",function(a,y,x){return new Jn().add(new $a(y,x).add(new Gi(Po,0,.5*x)).add(new Gi(Po,y,0).close())).pm(.5,.25,1,.75)}),Ns("TriangleUp",function(a,y,x){return new Jn().add(new $a(y,x).add(new Gi(Po,0,x)).add(new Gi(Po,.5*y,0).close())).pm(.25,.5,.75,1)}),Ns("Triangle","TriangleUp"),Ns("Diamond",function(a,y,x){return new Jn().add(new $a(.5*y,0).add(new Gi(Po,0,.5*x)).add(new Gi(Po,.5*y,x)).add(new Gi(Po,y,.5*x).close())).pm(.25,.25,.75,.75)}),Ns("LineH",function(a,y,x){return a=new Jn(Jn.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),Ns("LineV",function(a,y,x){return a=new Jn(Jn.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),Ns("None","Rectangle"),Ns("BarH","Rectangle"),Ns("BarV","Rectangle"),Ns("MinusLine","LineH"),Ns("PlusLine",function(a,y,x){return new Jn().add(new $a(0,x/2,!1).add(new Gi(Po,y,x/2)).add(new Gi(ma,y/2,0)).add(new Gi(Po,y/2,x)))}),Ns("XLine",function(a,y,x){return new Jn().add(new $a(0,x,!1).add(new Gi(Po,y,0)).add(new Gi(ma,0,0)).add(new Gi(Po,y,x)))}),Ns("LineRight",function(a,y,x){return new Jn().add(new $a(.25*y,0,!1).add(new Gi(Po,.75*y,.5*x)).add(new Gi(Po,.25*y,x)))}),Ns("LineDown",function(a,y,x){return new Jn().add(new $a(0,.25*x,!1).add(new Gi(Po,.5*y,.75*x)).add(new Gi(Po,y,.25*x)))}),Ns("LineLeft",function(a,y,x){return new Jn().add(new $a(.75*y,0,!1).add(new Gi(Po,.25*y,.5*x)).add(new Gi(Po,.75*y,x)))}),Ns("LineUp",function(a,y,x){return new Jn().add(new $a(0,.75*x,!1).add(new Gi(Po,.5*y,.25*x)).add(new Gi(Po,y,.75*x)))}),qt.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=Pa,this.ir=null,this.jr="",this.lr=ro,this.Gq="",this.Hq=Ka,this.Pq=Kr,this.Kq=Nr,this.Up=null,this.Cq=127,this.zr=Wi,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 Mr(a,y){a===void 0||a instanceof Ha||typeof a=="string"?Un.call(this,a):(Un.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 It(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new wn,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}un(Mr,Un),Mr.prototype.cloneProtected=function(a){Un.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},ot=Mr.prototype,ot.Af=function(a){Un.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},ot.toString=function(){var a=Dn(this.constructor)+"#"+Mi(this);return this.data!==null&&(a+="("+$n(this.data)+")"),a};function cl(a){a.P===null?a.P=new Dv:a.P.nc&&(a.P=a.P.copy())}ot.th=function(){Un.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},ot.gk=function(a,y,x,b,E,te,ne){var se=this.diagram;se!==null&&(a===sa&&y==="elements"?E instanceof Un?Ud(E,function(he){ly(se.partManager,he),Fd(se,he)}):Yh(se,E):a===La&&y==="elements"&&(E instanceof Un?Ud(E,function(he){uy(se.partManager,he,se)}):Jp(se,E)),se.cb(a,y,x,b,E,te,ne))},ot.La=function(a){if(Un.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 Un&&Ud(E,function(te){te.data!==null&&te.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},Mr.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},Mr.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},Mr.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 ur),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)))}}},Mr.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)}},Mr.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=pn();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);On(y)}},Mr.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 ni?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof Ui))break e;Su(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=Un.Link),x.adornedObject=y)}if(x!==null){x.type===Un.Link&&x.v(),this.bh("Selection",x);break e}}this.Jf("Selection")}for(Cx(this,a),y=this.adornments;y.next();)y.value.La()}},Mr.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function Fv(a){a.G&16384&&(a.updateAdornments(),a.G&=-16385)}function Cx(a,y){y.toolManager.mouseDownTools.each(function(x){x.isEnabled&&x.updateAdornments(a)}),y.toolManager.updateAdornments(a)}function Um(a){if(ed(a)===!1){Rv(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function A1(a){if(a.G|=2097152,ed(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||D1(a,y,x),x=a.Ib;var b=wn.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(b,x),wn.free(b),Rv(a,!1)}}Mr.prototype.Ge=function(a,y,x,b){var E=this.uc;E.h(a,y,x,b),this.Lb===null&&(this.Lb=new fi);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),this.Lb=te,te.ws()||te.pp(E)},Mr.prototype.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var te=Di;this.locationSpot.sb()&&(te=this.locationSpot);var ne=It.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),It.free(ne)}},Mr.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},Mr.prototype.moveTo=function(a,y,x){a=It.allocAt(a,y),this.move(a,x),It.free(a)},Mr.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())},Mr.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())},Mr.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new ur),y.I(a)!==null)return y.I(a);var x=Un.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function Th(a,y,x,b){b===void 0&&(b=new It),x=x.Mc()?Di: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}Mr.prototype.mi=function(a){return a===void 0&&(a=new wn),a.assign(this.actualBounds)},Mr.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function j1(a){var y=It.alloc(),x=a.locationObject,b=x.naturalBounds,E=x instanceof ci?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 Vd(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}Mr.prototype.arrange=function(){if(Us(this)===!1)A1(this);else{Mc(this,!1);var a=this.Ib,y=wn.alloc();y.assign(a);var x=td(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()||qt.B(y.width,a.width)&&qt.B(y.height,a.height)||0<=this.vw&&this.C(16),wn.free(y),Rv(this,!1)}},ot=Mr.prototype,ot.Xl=function(a,y){var x=this.diagram;if(x!==null){var b=!1;if(x.Zi===!1&&a.w()){var E=wn.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),wn.free(E)}!(this.G&65536)&&a.D(y)||R1(this,b,x),x.N(),!a.w()&&!y.w()||Ji(a,y)||(this instanceof nr&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},ot.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 It(b.x+(a.x-y),b.y+(a.y-x)),this.g("location",b,this.ke.copy())),ed(this)===!1&&Us(this)===!1&&(Um(this),A1(this)),!0};function I1(a,y,x,b,E){y===null||a instanceof Ui||(y=y.animationManager,y.zb&&Wu(y,a,new It(b,E),x))}ot.mm=function(a,y,x){var b=this.ke,E=this.pa;if(x){if(b.x===a&&b.y===y)return;ed(this)||Us(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)}Um(this)},ot.Av=function(){this.G&=-2097153,Um(this)};function D1(a,y,x){var b=j1(a),E=a.diagram,te=x.w(),ne=y.w();te&&ne?a.G&2097152?F1(a,y,x,E,b):B1(a,y,x,E,b):te?F1(a,y,x,E,b):ne&&B1(a,y,x,E,b),a.G|=2097152,It.free(b),a.Uk()}function F1(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 Ui||Wu(x,a,new It(te,ne),y),b||y.x===te&&y.y===ne||a.g("position",new It(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 R1(a,y,x){_v(a,!1),a instanceof nr&&Sh(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var b=x.viewportBounds;b.w()?td(a)?(Oo(y,b)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(b)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}ot.si=function(){return!0},ot.Zc=function(){return!0},ot.ph=function(){return!1},ot.Dd=function(){return!0};function Bv(a,y,x,b){y.constructor===a.constructor||$1||($1=!0,or('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),or(" 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,se=!0,he=!0,ge=!1;a instanceof nr&&(se=a.isTreeLeaf,he=a.isTreeExpanded,ge=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 nr&&(a.U=se?a.U|4:a.U&-5,a.U=he?a.U|1:a.U&-2,a.U=ge?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)}Mr.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},Mr.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},Mr.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},Mr.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},Mr.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},Mr.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},Mr.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},Mr.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},Mr.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 ed(a){return(a.G&32768)!==0}function Rv(a,y){a.G=y?a.G|32768:a.G&-32769}function _v(a,y){a.G=y?a.G|65536:a.G&-65537}function td(a){return(a.G&131072)!==0}ot=Mr.prototype,ot.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function Wm(a,y){a.G=y?a.G|1048576:a.G&-1048577}ot.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},ot.N=function(){var a=this.diagram;a!==null&&!Us(this)&&!ed(this)&&this.isVisible()&&this.Ib.w()&&a.N(Vd(this,this.Ib))},ot.v=function(){Un.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof nr&&this.labeledLink!==null&&Hs(this.labeledLink),a.$b(!0))},ot.Vo=function(a){a||(a=this.Ah,a!==null&&Wv(a,this))},ot.Wo=function(a){a||(a=this.Ah,a!==null&&Kv(a,this))},ot.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},ot.oz=function(){return zv(this,this)};function zv(a,y){var x=y.containingGroup;return x!==null?1+zv(a,x):y instanceof nr&&(y=y.labeledLink,y!==null)?zv(a,y):0}ot.sz=function(){return _1(this,this)};function _1(a,y){var x=y.containingGroup;return x!==null||y instanceof nr&&(x=y.labeledLink,x!==null)?_1(a,x):y}ot.Td=function(a){return a instanceof ni?$v(this,this,a):!1};function $v(a,y,x){if(y===x||x===null)return!1;var b=y.containingGroup;return b===null||b!==x&&!$v(a,b,x)?y instanceof nr&&(y=y.labeledLink,y!==null)?$v(a,y,x):!1:!0}ot.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof ni&&Wm(y,!0),y instanceof nr){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 nr&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof ni&&Wm(y,!1),y instanceof nr&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},Mr.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof nr&&this.isLinkLabel)},Mr.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 nr&&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 nd(a,y,x,b,E,te){if(te===void 0&&(te=null),!(a.contains(y)||te!==null&&!te(y)||y instanceof Ui)){if(a.add(y),y instanceof nr){if(x&&y instanceof ni)for(var ne=y.memberParts;ne.next();)nd(a,ne.value,x,b,E,te);if(E!==!1)for(ne=y.linksConnected;ne.next();){var se=ne.value;if(!a.contains(se)){var he=se.fromNode,ge=se.toNode;he=he===null||a.contains(he),ge=ge===null||a.contains(ge),(E?he&&ge:he||ge)&&nd(a,se,x,b,E,te)}}if(1<b)for(y=y.Ou();y.next();)nd(a,y.value,x,b-1,E,te)}else if(y instanceof Vn)for(y=y.labelNodes;y.next();)nd(a,y.value,x,b,E,te)}}Ut.Object.defineProperties(Mr.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?hi: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(La,"parts",y,this,null,b,!0),b=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=b&&x.cb(sa,"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&&(cl(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&&gu(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 Ui?this.type!==Un.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:Kr},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),cl(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:Nr},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),cl(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&&(cl(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:Ka},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),cl(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,Us(this)===!1&&(Um(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 Ui)){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 Ui?this instanceof Ui&&(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&&(Su(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&&(Su(x),x=x.copy(),x===null||x instanceof Vn||(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&&(cl(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&&(cl(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&&(cl(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 Vn?(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&&(cl(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&&(cl(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&&(cl(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:Pa},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),cl(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&&(cl(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&&(cl(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:ro},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),cl(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&&Yt("Cannot make a Group a member of itself: "+this.toString()),Yt("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 ni&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?Wv(a,this):this instanceof ni&&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 ni){for(x=new Nn,nd(x,this,!0,0,!0),x=x.iterator;x.next();)if(b=x.value,b instanceof nr)for(b=b.linksConnected;b.next();)Sp(b.value)}if(this instanceof nr){for(x=this.linksConnected;x.next();)Sp(x.value);x=this.labeledLink,x!==null&&Sp(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&gu(y,-1,a))}}else Yt("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&&(cl(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof nr&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(cl(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&&(cl(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:Wi},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),cl(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&&(cl(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&&(cl(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),Mr.prototype.invalidateLayout=Mr.prototype.C,Mr.prototype.findCommonContainingGroup=Mr.prototype.px,Mr.prototype.isMemberOf=Mr.prototype.Td,Mr.prototype.findTopLevelPart=Mr.prototype.sz,Mr.prototype.findSubGraphLevel=Mr.prototype.oz,Mr.prototype.ensureBounds=Mr.prototype.Va,Mr.prototype.getDocumentBounds=Mr.prototype.mi,Mr.prototype.findObject=Mr.prototype.fb,Mr.prototype.moveTo=Mr.prototype.moveTo,Mr.prototype.invalidateAdornments=Mr.prototype.Wb,Mr.prototype.clearAdornments=Mr.prototype.Ej,Mr.prototype.removeAdornment=Mr.prototype.Jf,Mr.prototype.addAdornment=Mr.prototype.bh,Mr.prototype.findAdornment=Mr.prototype.Pj,Mr.prototype.updateTargetBindings=Mr.prototype.La;var $1=!1;Mr.className="Part",Mr.LayoutNone=0,Mr.LayoutAdded=1,Mr.LayoutRemoved=2,Mr.LayoutShown=4,Mr.LayoutHidden=8,Mr.LayoutNodeSized=16,Mr.LayoutGroupLayout=32,Mr.LayoutNodeReplaced=64,Mr.LayoutStandard=127,Mr.LayoutAll=16777215;function Ui(a,y){a===void 0||a instanceof Ha||typeof a=="string"?Mr.call(this,a):(Mr.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)}un(Ui,Mr),Ui.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},Ui.prototype.updateRelationshipsFromData=function(){},Ui.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof Vn&&y instanceof ci){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 ci&&(E.ua=a)}}},Ui.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!Us(a))},Ui.prototype.Zc=function(){return!1},Ui.prototype.gk=function(a,y,x,b,E,te,ne){if(a===sa&&y==="elements"){if(E instanceof Ks)this.$a===null&&(this.$a=E);else if(E instanceof Un){var se=E.Nl(function(he){return he instanceof Ks});se instanceof Ks&&this.$a===null&&(this.$a=se)}}else a===La&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Un&&this.$a.rg(b)&&(this.$a=null));Mr.prototype.gk.call(this,a,y,x,b,E,te,ne)},Ui.prototype.updateAdornments=function(){},Ui.prototype.Lj=function(){},Ut.Object.defineProperties(Ui.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}}}),Ui.className="Adornment";function Gv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=Dl,this.er=Zm,this.Kr=this.ij=this.Nq=this.Mq=null}Gv.prototype.copy=function(){var a=new Gv;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 nr(a,y){a===void 0||a instanceof Ha||typeof a=="string"?Mr.call(this,a):(Mr.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new Ln,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}un(nr,Mr),nr.prototype.cloneProtected=function(a){Mr.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},ot=nr.prototype,ot.Af=function(a){Mr.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function Mh(a){a.Ba===null?a.Ba=new Gv:a.Ba.nc&&(a.Ba=a.Ba.copy())}ot.th=function(){Mr.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function G1(a,y){y!==null&&(a.af===null&&(a.af=new Nn),a.af.add(y))}function H1(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}ot.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=H1(this,a,y,x),a!==null&&a.Sl()},ot.gk=function(a,y,x,b,E,te,ne){a===sa&&y==="elements"?this.wc=null:a===La&&y==="elements"&&(this.wc=null),Mr.prototype.gk.call(this,a,y,x,b,E,te,ne)},ot.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(Ll(x.fromPort),Ll(x.toPort),x.bb())}};function U1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(Ll(x.fromPort),Ll(x.toPort),x.bb())}}function Ll(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||Ll(y.port)}}ot.si=function(){return!0},nr.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},nr.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},nr.prototype.isVisible=function(){if(!Mr.prototype.isVisible.call(this))return!1;var a=!0,y=wh,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===wh){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===Na){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(b){return!b.isTreeExpanded}))return!1}else if(y===ip&&(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},nr.prototype.Zb=function(a){Mr.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)}},nr.prototype.qx=function(){var a=new Nn,y=new Nn;return W1(this,this,a,y),y.iterator};function W1(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)&&W1(a,E?ne.toNode:ne.fromNode,x,b):b.add(ne)})}}nr.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new Tr(this.jb),x=this;return y.predicate=function(b){return b.fromNode===x&&b.fromPortId===a||b.toNode===x&&b.toPortId===a},y},ot=nr.prototype,ot.Mo=function(a){a===void 0&&(a=null);var y=new Tr(this.jb),x=this;return y.predicate=function(b){return b.fromNode!==x?!1:a===null?!0:b.fromPortId===a},y},ot.Sd=function(a){a===void 0&&(a=null);var y=new Tr(this.jb),x=this;return y.predicate=function(b){return b.toNode!==x?!1:a===null?!0:b.toPortId===a},y},ot.Mu=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.fromNode===this?(a===null||E.fromPortId===a)&&(E=E.toNode,y!==null?y.add(E):x!==null&&x!==E?(y=new Nn,y.add(x),y.add(E)):x=E):E.toNode!==this||a!==null&&E.toPortId!==a||(E=E.fromNode,y!==null?y.add(E):x!==null&&x!==E?(y=new Nn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Gr(x):hi},ot.Po=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.fromNode!==this||a!==null&&E.fromPortId!==a||(E=E.toNode,y!==null?y.add(E):x!==null&&x!==E?(y=new Nn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Gr(x):hi},ot.Oo=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.toNode!==this||a!==null&&E.toPortId!==a||(E=E.fromNode,y!==null?y.add(E):x!==null&&x!==E?(y=new Nn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Gr(x):hi},ot.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new Tr(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},ot.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new Tr(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){Ll(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){Ll(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}}}nr.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},ot=nr.prototype,ot.Vo=function(a){Mr.prototype.Vo.call(this,a),a||(Sg(this),a=this.Yk,a!==null&&eS(a,this))},ot.Wo=function(a){Mr.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},ot.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,Mr.prototype.Lj.call(this)},ot.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 ur: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 Hv(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=pn()),x.push(b);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);On(x)}}}ot.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},ot.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}},ot.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)Wm(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;)Wm(y,!1),y=y.pg();return x},ot.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},ot.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof nr)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},ot.vz=function(){function a(x,b){b.add(x);var E=x.kh();E!==null&&(b.add(E),x=x.pg(),x!==null&&a(x,b))}var y=new Nn;return a(this,y),y},ot.uz=function(){return Z1(this,this)};function Z1(a,y){return y=y.pg(),y===null?0:1+Z1(a,y)}ot.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new Tr(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},ot.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 Ln,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 Ln,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new Gr(x):hi},ot.wz=function(a){a===void 0&&(a=1/0);var y=new Nn;return nd(y,this,!1,a,!0),y},nr.prototype.collapseTree=function(a){a===void 0&&(a=1),1>a&&(a=1);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new Nn;x.add(this),X1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===wh),y.Ue=!1}};function X1(a,y,x,b,E,te,ne){if(1<b)for(var se=x?a.Mo():a.Sd();se.next();){var he=se.value;he.isTreeLink&&(he=he.To(a),he===null||he===a||y.contains(he)||(y.add(he),X1(he,y,x,b-1,E,te,ne)))}else Y1(a,y,x,E,te,ne)}function Y1(a,y,x,b,E,te){for(var ne=E===a?!0:a.isTreeExpanded,se=x?a.Mo():a.Sd(),he={};se.next();){var ge=se.value;if(ge.isTreeLink&&(ge=ge.To(a),ge!==null&&ge!==a)){var Se=y.contains(ge);if(Se||y.add(ge),ne){var Ne=x?ge.Oo():ge.Po();he.uv=a,Ne.all(function(Ge){return function(Je){return Je===Ge.uv||!Je.isTreeExpanded}}(he))&&b.Aj(ge,E),ge.oh(),ge.Zb(!1)}ge.isTreeExpanded&&(ge.wasTreeExpanded=ge.isTreeExpanded,Se||Y1(ge,y,x,b,E,te))}he={uv:he.uv}}a.isTreeExpanded=!1}nr.prototype.expandTree=function(a){a===void 0&&(a=2),2>a&&(a=2);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new Nn;x.add(this),J1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===wh),y.Ue=!1}};function J1(a,y,x,b,E,te,ne){for(var se=te===a?!1:a.isTreeExpanded,he=x?a.Mo():a.Sd(),ge={};he.next();){var Se=he.value;if(Se.isTreeLink&&(se||Se.fd||Se.bb(),Se=Se.To(a),Se!==null&&Se!==a&&!y.contains(Se))){if(y.add(Se),!se){Se.Zb(!0),Se.oh();var Ne=x?Se.Oo():Se.Po();ge.vv=a,Ne.all(function(Ge){return function(Je){return Je===Ge.vv||!Je.isTreeExpanded}}(ge))&&E.Cj(Se,te)}(2<b||Se.wasTreeExpanded)&&(Se.wasTreeExpanded=!1,J1(Se,y,x,b-1,E,te,ne))}ge={vv:ge.vv}}a.isTreeExpanded=!0}Ut.Object.defineProperties(nr.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:Zm},set:function(a){var y=this.portSpreading;y!==a&&(Mh(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&&Sh(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:Dl},set:function(a){typeof a=="number"&&(a=new kr(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),Mh(this),this.Ba.yp=a;var x=this.diagram;x!==null&&Sh(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&&(Mh(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&&(Mh(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&&(Mh(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),Hs(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&&(Mh(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))}}}),nr.prototype.expandTree=nr.prototype.expandTree,nr.prototype.collapseTree=nr.prototype.collapseTree,nr.prototype.findTreeParts=nr.prototype.wz,nr.prototype.findTreeChildrenNodes=nr.prototype.Ou,nr.prototype.findTreeChildrenLinks=nr.prototype.Qo,nr.prototype.findTreeLevel=nr.prototype.uz,nr.prototype.findTreeParentChain=nr.prototype.vz,nr.prototype.findTreeParentNode=nr.prototype.pg,nr.prototype.findTreeParentLink=nr.prototype.kh,nr.prototype.findCommonTreeParent=nr.prototype.gz,nr.prototype.findTreeRoot=nr.prototype.xz,nr.prototype.isInTreeOf=nr.prototype.Nz,nr.prototype.findPort=nr.prototype.ns,nr.prototype.findLinksTo=nr.prototype.kz,nr.prototype.findLinksBetween=nr.prototype.jz,nr.prototype.findNodesInto=nr.prototype.Oo,nr.prototype.findNodesOutOf=nr.prototype.Po,nr.prototype.findNodesConnected=nr.prototype.Mu,nr.prototype.findLinksInto=nr.prototype.Sd,nr.prototype.findLinksOutOf=nr.prototype.Mo,nr.prototype.findExternalTreeLinksConnected=nr.prototype.qx,nr.prototype.invalidateConnectedLinks=nr.prototype.Bd,nr.prototype.invalidateLinkBundle=nr.prototype.Lz;var Ex=new tn(nr,"SpreadingNone",10),Zm=new tn(nr,"SpreadingEvenly",11),Uv=new tn(nr,"SpreadingPacked",12);nr.className="Node",nr.SpreadingNone=Ex,nr.SpreadingEvenly=Zm,nr.SpreadingPacked=Uv;function ni(a,y){a===void 0||a instanceof Ha||typeof a=="string"?nr.call(this,a):(nr.call(this),a&&(y=a)),this.U|=4608,this.Gn=new Nn,this.$a=null,this.Sc=new Ro,this.Sc.group=this,this.gl=new Nn,this.tb=this.$p=null,y&&Object.assign(this,y)}un(ni,nr),ni.prototype.cloneProtected=function(a){nr.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof Ks});y instanceof Ks?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())},ot=ni.prototype,ot.Af=function(a){nr.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 nr)x.Bd(y);else if(x instanceof Vn)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},ot.gk=function(a,y,x,b,E,te,ne){if(a===sa&&y==="elements"){if(E instanceof Ks)this.$a===null?this.$a=E:this.$a!==E&&Yt("Cannot insert a second Placeholder into the visual tree of a Group.");else if(E instanceof Un){var se=E.Nl(function(he){return he instanceof Ks});se instanceof Ks&&(this.$a===null?this.$a=se:this.$a!==se&&Yt("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===La&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Un&&this.$a.rg(b)&&(this.$a=null));nr.prototype.gk.call(this,a,y,x,b,E,te,ne)},ot.Xl=function(a,y){nr.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==Un.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof Un&&(a=a.Pb()),this.tb===null&&(this.tb=new wn),a.mi(this.tb),a instanceof ci&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},ot.eh=function(a,y,x,b){this.nf=this.$a,nr.prototype.eh.call(this,a,y,x,b)},ot.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof Vn||y.Va()}),nr.prototype.Va.call(this)},ot.si=function(){if(!nr.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof nr){if(y.isVisible()&&Us(y))return!1}else if(y instanceof Vn&&y.isVisible()&&Us(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function Wv(a,y){if(a.Gn.add(y)){y instanceof ni&&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 Vn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function Kv(a,y){if(a.Gn.remove(y)){y instanceof ni&&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 Vn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}ot.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)}nr.prototype.Lj.call(this)},ni.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=yn(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},ni.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var b=!0;for(a=yn(a).iterator;a.next();){var E=a.value;!y||x.isValidMember(this,E)?E.containingGroup=this:b=!1}return b},ni.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))},ot=ni.prototype,ot.Bd=function(a){var y=(this.U&65536)!==0;if(nr.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()?(Ll(x.fromPort),Ll(x.toPort),x.bb()):(b=x.toNode,b!==null&&b!==this&&b.Td(this)&&!b.isVisible()&&(Ll(x.fromPort),Ll(x.toPort),x.bb()))}}},ot.Lu=function(){var a=this.diagram!==null&&this.diagram.Pw;if(a&&this.$p!==null)return this.$p.iterator;var y=this.Rj();y.add(this);for(var x=new Nn,b=y.iterator;b.next();){var E=b.value;if(E instanceof nr)for(E=E.linksConnected;E.next();){var te=E.value;y.contains(te)||x.add(te)}}return a&&(this.$p=x),x.iterator},ot.iz=function(){var a=this.Rj();a.add(this);for(var y=new Nn,x=a.iterator;x.next();){var b=x.value;if(b instanceof nr)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},ot.hz=function(){function a(x,b){x!==null&&(b.add(x),a(x.containingGroup,b))}var y=new Nn;return a(this,y),y},ot.Rj=function(){var a=new Nn;return nd(a,this,!0,0,!0),a.remove(this),a},ot.Zb=function(a){nr.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},ni.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 ni&&te.isSubGraphExpanded&&(te.wasSubGraphExpanded=te.isSubGraphExpanded,Q1(te,y,x,b)),te instanceof nr)te.Bd(y),x.Aj(te,b);else if(te instanceof Vn)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!1}ni.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 ni&&te.wasSubGraphExpanded&&(te.wasSubGraphExpanded=!1,q1(te,y,x,b)),te instanceof nr)te.Bd(y),x.Cj(te,b);else if(te instanceof Vn)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!0}ni.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=It.alloc(),nr.prototype.move.call(this,a,y),a=new Nn,y=this.Rj().iterator;y.next();)E=y.value,E instanceof Vn&&(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 nr&&E.isLinkLabel)){var ne=E.position,se=E.location;ne.w()?(te.x=ne.x+b,te.y=ne.y+x,E.position=te):se.w()&&(te.x=se.x+b,te.y=se.y+x,E.location=te)}for(y.reset();y.next();)E=y.value,E instanceof Vn&&(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(),Zv(E)&&E.bb());It.free(te)}},Ut.Object.defineProperties(ni.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&&Yt("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&&(Mh(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&&(Mh(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&&(Mh(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&&(Mh(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)}}}),ni.prototype.expandSubGraph=ni.prototype.expandSubGraph,ni.prototype.collapseSubGraph=ni.prototype.collapseSubGraph,ni.prototype.findSubGraphParts=ni.prototype.Rj,ni.prototype.findContainingGroupChain=ni.prototype.hz,ni.prototype.findExternalNodesConnected=ni.prototype.iz,ni.prototype.findExternalLinksConnected=ni.prototype.Lu,ni.prototype.ensureBounds=ni.prototype.Va,ni.className="Group";function Ks(a){Jt.call(this),this.yb=Cs,this.ko=new wn(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}un(Ks,Jt),Ks.prototype.cloneProtected=function(a){Jt.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},Ks.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return Mo(0,0,y.width,y.height,a.x,a.y)},Ks.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof ni||a instanceof Ui)||Yt("Placeholder is not inside a Group or Adornment."),a instanceof ni){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(Fa(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=It.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),It.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 ci&&(ne=te.strokeWidth);var se=te.Df(),he=te.naturalBounds,ge=(he.width+ne)*se;ne=(he.height+ne)*se,a.type!==Un.Link&&(se=te.ga(a.category==="Selection"?Ka:a.locationSpot,It.alloc()),a.location=se,It.free(se)),isNaN(ge)||isNaN(ne)?(a=te.ga(Ka,It.alloc()),ge=wn.allocAt(a.x,a.y,0,0),ge.Ye(te.ga(As,a)),ge.Ye(te.ga(Fl,a)),ge.Ye(te.ga(tl,a)),Fa(y,ge.width+b||0,ge.height+E||0),this.Ge(-x.left,-x.top,y.width,y.height),It.free(a),wn.free(ge)):(Fa(y,ge+b||0,ne+E||0),this.Ge(-x.left,-x.top,y.width,y.height))}},Ks.prototype.eh=function(a,y,x,b){this.actualBounds.h(a,y,x,b)},Ks.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,b=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof ni&&!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=wn.alloc(),E=this.computeMemberBounds(x);var te=this.yb;return y instanceof ni&&!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)),wn.free(x),b&&y instanceof ni&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Ks.prototype.computeMemberBounds=function(a){if(!(this.part instanceof ni))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 se=ne.value;if(se.isVisible()){if(se instanceof Vn&&(!y.computesBoundsIncludingLinks||Zl(se)||se.fromNode===y||se.toNode===y))continue;se=se.actualBounds,se.left<x&&(x=se.left),se.top<b&&(b=se.top),se.right>E&&(E=se.right),se.bottom>te&&(te=se.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},Ut.Object.defineProperties(Ks.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new kr(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Ks.className="Placeholder";function Vn(a){Mr.call(this,Un.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=Vs,this.Om=0,this.Qm=Vs,this.Rm=NaN,this.qj=Jv,this.po=.5,this.wd=null,this.Nb=new Ln().freeze(),this.Tg=this.Mg=null,this.ml=new wn,this.ua=new Jn,this.u=this.o=this.Sf=this.Wf=null,this.su=new It,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}un(Vn,Mr),Vn.prototype.cloneProtected=function(a){Mr.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())},ot=Vn.prototype,ot.Af=function(a){Mr.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&&Ll(y),a=a.toPort,a!==null&&Ll(a)},ot.qb=function(a){a.classType===Vn?(a.value&2)===2?this.routing=a:a===Yl||a===kh||a===wp?this.curve=a:a===bg||a===e0||a===t0?this.adjusting=a:a!==Jv&&a!==Vs&&Yt("Unknown Link enum value for a Link property: "+a):Mr.prototype.qb.call(this,a)},ot.Xc=function(){this.ba===null&&(this.ba=new lg)},ot.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),Us(a)||ed(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),Us(a)||ed(a)))},ot.zv=function(){return!1},ot.Av=function(){},ot.Zc=function(){return!1},Vn.prototype.computeAngle=function(a,y,x){return Vn.computeAngle(y,x)},Vn.computeAngle=function(a,y){switch(a){default:case Vs:a=0;break;case Pg:a=y;break;case Cg:a=y+90;break;case Eg:a=y-90;break;case Qv:a=y+180;break;case n0:a=qt.bp(y),90<a&&270>a&&(a-=180);break;case Tg:a=qt.bp(y+90),90<a&&270>a&&(a-=180);break;case Mg:a=qt.bp(y-90),90<a&&270>a&&(a-=180);break;case r0:if(a=qt.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return qt.bp(a)};function Sp(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&&Wv(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}ot=Vn.prototype,ot.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Mr.prototype.oh.call(this)},ot.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},ot.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function eS(a,y){a.wd===null&&(a.wd=new Nn),a.wd.add(y),a.v()}ot.Vo=function(a){if(Mr.prototype.Vo.call(this,a),Zd(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)}},ot.Wo=function(a){if(Mr.prototype.Wo.call(this,a),Zd(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)}},ot.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))},Vn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},Vn.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?Mr.prototype.move.call(this,a,!1):(a=It.allocAt(x.x+b,x.y+E),Mr.prototype.move.call(this,a,!1),It.free(a)),Lh(this,b,E),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+b,x.y+E)},Vn.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},Vn.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},Vn.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(Ur),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()===Yl))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()===Yl){if(y===3){x=this.i(0),b=this.i(1);var E=this.i(2);return qt.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),qt.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},Vn.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()===Yl))return this.ua.wx(.5);if(this.computeCurve()===Yl&&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),qt.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)},ot=Vn.prototype,ot.i=function(a){return this.Nb.s[a]},ot.dd=function(a,y){this.Nb.cd(a,y)},ot.L=function(a,y,x){this.Nb.cd(a,new It(y,x))},ot.Kz=function(a,y){this.Nb.Gb(a,y)},ot.m=function(a,y,x){this.Nb.Gb(a,new It(y,x))},ot.ne=function(a){this.Nb.add(a)},ot.yf=function(a,y){this.Nb.add(new It(a,y))},ot.pv=function(a){this.Nb.mb(a)},ot.Fj=function(){this.Nb.clear()};function Lh(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 Ln,te=a.Nb.iterator;te.next();){var ne=te.value;E.add(new It(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),Hs(a)),b?Xm(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),ne!==null&&ne.animationManager.zb&&Lo(ne.animationManager,a,E),a.g("points",te,E)}}ot.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},ot.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 se=E[ne];x=Math.min(se.x,x),b=Math.min(se.y,b)}se=ne=1/0;for(var he=y.s,ge=he.length,Se=0;Se<ge;Se++){var Ne=he[Se];ne=Math.min(Ne.x,ne),se=Math.min(Ne.y,se),Ne.freeze()}if(y.freeze(),ge===te){for(te=0;te<ge;te++)if(Se=E[te],Ne=he[te],Se.x-x!==Ne.x-ne||Se.y-b!==Ne.y-se){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&Lo(x.animationManager,this,y),Xm(this),this.g("points",a,y)}},ot.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function Xm(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))}ot.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())}},ot.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()}}},Vn.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Tf||(Tf=new nr,Tf.desiredSize=to,Tf.Va()),this.defaultFromPoint&&(Tf.location=this.defaultFromPoint,Tf.Va(),y=a=Tf)):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?(Mf||(Mf=new nr,Mf.desiredSize=to,Mf.Va()),this.defaultToPoint&&(Mf.location=this.defaultToPoint,Mf.Va(),E=b=Mf)):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 se=xp(ne),he=xp(x),ge=y===E&&y!==null,Se=this.isOrthogonal,Ne=this.curve===Yl;this.Wf=ge&&!Se?Ne=!0:!1;var Ge=this.computeAdjusting()===Vs||ge;if(!Se&&!ge&&se&&he){if(se=!1,!Ge&&3<=te&&(Ge=this.getLinkPoint(a,y,ne,!0,!1,b,E),he=this.getLinkPoint(b,E,x,!1,!1,a,y),se=this.adjustPoints(0,Ge,te-1,he))&&(Ge=this.getLinkPoint(a,y,ne,!0,!1,b,E),he=this.getLinkPoint(b,E,x,!1,!1,a,y),this.adjustPoints(0,Ge,te-1,he)),!se)if(this.Fj(),Ne){te=this.getLinkPoint(a,y,ne,!0,!1,b,E),Ge=this.getLinkPoint(b,E,x,!1,!1,a,y),se=Ge.x-te.x,he=Ge.y-te.y,ge=this.computeCurviness(),Ne=Se=0;var Je=te.x+se/3,nt=te.y+he/3,ct=Je,Ft=nt;qt.B(he,0)?Ft=0<se?Ft-ge:Ft+ge:(Se=-se/he,Ne=Math.sqrt(ge*ge/(Se*Se+1)),0>ge&&(Ne=-Ne),ct=(0>he?-1:1)*Ne+Je,Ft=Se*(ct-Je)+nt),Je=te.x+2*se/3,nt=te.y+2*he/3;var Ot=Je,zt=nt;qt.B(he,0)?zt=0<se?zt-ge:zt+ge:(Ot=(0>he?-1:1)*Ne+Je,zt=Se*(Ot-Je)+nt),this.Fj(),this.ne(te),this.yf(ct,Ft),this.yf(Ot,zt),this.ne(Ge),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,Ge=E,b=this.getLinkPoint(a,y,ne,!0,!1,te,Ge),E=this.getLinkPoint(te,Ge,x,!1,!1,a,y),this.hasCurviness()?(Ge=E.x-b.x,x=E.y-b.y,ne=this.computeCurviness(),a=b.x+Ge/2,y=b.y+x/2,te=a,se=y,qt.B(x,0)?se=0<Ge?se-ne:se+ne:(Ge=-Ge/x,te=Math.sqrt(ne*ne/(Ge*Ge+1)),0>ne&&(te=-te),te=(0>x?-1:1)*te+a,se=Ge*(te-a)+y),this.ne(b),this.yf(te,se),this.ne(E)):(this.ne(b),this.ne(E),se=wn.alloc(),y.mi(se),he=se.ca(E),Ge.mi(se),ge=se.ca(b),(he||ge)&&(ne=y.ga(Jm(ne),new It),this.dd(0,this.getLinkPointFromPoint(a,y,ne,E,!0,ne)),x=Ge.ga(Jm(x),new It),this.dd(1,this.getLinkPointFromPoint(te,Ge,x,b,!1,x))),wn.free(se))}else{Ne=this.isAvoiding,Ge&&(Se&&Ne||ge)&&this.Fj();var Ht=ge?this.computeCurviness():0;Ne=this.getLinkPoint(a,y,ne,!0,Se,b,E),Je=ct=nt=0,(Se||!se||ge)&&(Ft=this.computeEndSegmentLength(a,y,ne,!0),Je=this.getLinkDirection(a,y,Ne,ne,!0,Se,b,E),ge&&(se||ne.D(x)||!Se&&ne.x+x.x===1&&ne.y+x.y===1)&&(Je-=Se?90:30,0>Ht&&(Je-=180)),0>Je?Je+=360:360<=Je&&(Je-=360),ge&&(Ft+=Math.abs(Ht)*(Se?1:2)),Je===0?nt=Ft:Je===90?ct=Ft:Je===180?nt=-Ft:Je===270?ct=-Ft:(nt=Ft*Math.cos(Je*Math.PI/180),ct=Ft*Math.sin(Je*Math.PI/180)),ne.Mc()&&ge&&(Ft=y.ga(Di,It.alloc()),Ot=It.allocAt(Ft.x+1e3*nt,Ft.y+1e3*ct),this.getLinkPointFromPoint(a,y,Ft,Ot,!0,Ne),It.free(Ft),It.free(Ot))),Ft=this.getLinkPoint(b,E,x,!1,Se,a,y);var Wt=zt=Ot=0;if(Se||!he||ge){var Xt=this.computeEndSegmentLength(b,E,x,!1);Wt=this.getLinkDirection(b,E,Ft,x,!1,Se,a,y),ge&&(he||ne.D(x)||!Se&&ne.x+x.x===1&&ne.y+x.y===1)&&(Wt+=Se?0:30,0>Ht&&(Wt+=180)),0>Wt?Wt+=360:360<=Wt&&(Wt-=360),ge&&(Xt+=Math.abs(Ht)*(Se?1:2)),Wt===0?Ot=Xt:Wt===90?zt=Xt:Wt===180?Ot=-Xt:Wt===270?zt=-Xt:(Ot=Xt*Math.cos(Wt*Math.PI/180),zt=Xt*Math.sin(Wt*Math.PI/180)),x.Mc()&&ge&&(x=E.ga(Di,It.alloc()),ne=It.allocAt(x.x+1e3*Ot,x.y+1e3*zt),this.getLinkPointFromPoint(b,E,x,ne,!1,Ft),It.free(x),It.free(ne))}x=Ne,(Se||!se||ge)&&(x=new It(Ne.x+nt,Ne.y+ct)),ne=Ft,(Se||!he||ge)&&(ne=new It(Ft.x+Ot,Ft.y+zt)),!Ge&&!Se&&se&&3<te&&this.adjustPoints(0,Ne,te-2,ne)?this.dd(te-1,Ft):!Ge&&!Se&&he&&3<te&&this.adjustPoints(1,x,te-1,Ft)?this.dd(0,Ne):!Ge&&(Se?6<=te:4<te)&&this.adjustPoints(1,x,te-2,ne)?(this.dd(0,Ne),this.dd(te-1,Ft)):(this.Fj(),this.ne(Ne),(Se||!se||ge)&&this.ne(x),Se&&this.addOrthoPoints(x,Je,ne,Wt,a,b),(Se||!he||ge)&&this.ne(ne),this.ne(Ft))}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}Vn.prototype.getLinkPointFromPoint=function(a,y,x,b,E,te){if(te===void 0&&(te=new It),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 se=-a.m12*E,he=-a.m21*E,ge=a.m11*E,Se=E*(a.m21*a.dy-a.m22*a.dx),Ne=E*(a.m12*a.dx-a.m11*a.dy);E=b.x*ne+b.y*he+Se,b=b.x*se+b.y*ge+Ne,ne=x.x*ne+x.y*he+Se,x=x.x*se+x.y*ge+Ne}return y.Sj(E,b,ne,x,te),a!==null&&te.transform(a),te};function Ym(a,y){var x=y.Zn;return x===null&&(x=new Lf,x.port=y,x.node=y.part,y.Zn=x),lS(x,a)}Vn.prototype.getLinkPoint=function(a,y,x,b,E,te,ne,se){if(se===void 0&&(se=new It),x.sb()&&!xp(x))return y.ga(x,se),se;if(x.$c()){var he=Ym(this,y);if(he!==null){if(se.assign(he.Zo),E&&this.routing===nS){var ge=Ym(this,ne);if(ge!==null&&he.Gl<ge.Gl){he=It.alloc(),ge=It.alloc();var Se=new wn(y.ga(Ka,he),y.ga(As,ge)),Ne=this.computeSpot(!b,ne);a=this.getLinkPoint(te,ne,Ne,!b,E,a,y,ge),(x.Hf(Ru)||x.Hf(zs))&&a.y>=Se.y&&a.y<=Se.y+Se.height?se.y=a.y:(x.Hf(Eu)||x.Hf(dl))&&a.x>=Se.x&&a.x<=Se.x+Se.width&&(se.x=a.x),It.free(he),It.free(ge)}}return se}}return x=y.ga(Jm(x),It.alloc()),this.pointsCount>(E?6:2)?(ne=b?this.i(1):this.i(this.pointsCount-2),E&&(ne=Vv(x,ne.copy()))):(he=this.computeSpot(!b,ne),te=It.alloc(),ne=ne.ga(Jm(he),te),E&&(ne=Vv(x,ne)),It.free(te)),this.getLinkPointFromPoint(a,y,x,ne,b,se),It.free(x),se},Vn.prototype.getLinkDirection=function(a,y,x,b,E,te,ne,se){e:if(b.sb())var he=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()&&(he=Ym(this,y),he!==null))switch(he.Nc){case 1:he=270;break e;case 2:he=180;break e;default:case 4:he=0;break e;case 8:he=90;break e}he=y.ga(Di,It.alloc()),this.pointsCount>(te?6:2)?(se=E?this.i(1):this.i(this.pointsCount-2),se=te?Vv(he,se.copy()):x):(x=It.alloc(),se=se.ga(Di,x),It.free(x)),x=Math.abs(se.x-he.x)>Math.abs(se.y-he.y)?se.x>=he.x?0:180:se.y>=he.y?90:270,It.free(he),he=x}return b.Mc()&&ne.Td(a)&&(he+=180,360<=he&&(he-=360)),xp(b)||(a=y.li(),a===0)||(45<=a&&135>a?he+=90:135<=a&&225>a?he+=180:225<=a&&315>a&&(he+=270),360<=he&&(he-=360)),he},Vn.prototype.computeEndSegmentLength=function(a,y,x,b){return y!==null&&x.$c()&&(a=Ym(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)},Vn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=Di:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===ro?oa:y)):(a=y||this.toPort,a===null?a=Di:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===ro?oa:y)),a};function xp(a){return a===oa||a.x===.5&&a.y===.5}function Jm(a){return a.x===.5&&a.y===.5?a:Di}Vn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Vs&&4<this.pointsCount?this.computeMidPoint(new It):(a=y.Zn,a=a!==null?lS(a,this):null,a!==null?a.Zo:y.ga(Di))},Vn.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},Vn.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=fi.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&fi.free(ne),!0;if(this.Yc(a,ne)){var se=!1;if(!this.isAtomic)for(var he=this.O.s,ge=he.length;ge--;){var Se=he[ge];if(Se.visible||Se===this.locationObject){var Ne=Se.actualBounds,Ge=this.naturalBounds;if(!(Ne.x>Ge.width||Ne.y>Ge.height||0>Ne.x+Ne.width||0>Ne.y+Ne.height)){if(Ne=fi.alloc(),Ne.set(ne),Se instanceof Un)se=Se.Cf(a,y,x,b,E,Ne);else if(this.path===Se){if(Se instanceof ci)if(se=a,Ge=b,Se.pickable===!1)se=!1;else if(Ne.multiply(Se.transform),Ge)e:{var Je=se,nt=Ne;if(Se.fh(Je,nt))se=!0;else{if(nt===void 0&&(nt=Se.transform,Je.Re(Se.actualBounds))){se=!0;break e}se=Je.left,Ge=Je.right;var ct=Je.top;Je=Je.bottom;var Ft=It.alloc(),Ot=It.alloc(),zt=It.alloc(),Ht=fi.alloc();Ht.set(nt),Ht.bv(Se.transform),Ht.Vj(),Ot.x=Ge,Ot.y=ct,Ot.transform(Ht),Ft.x=se,Ft.y=ct,Ft.transform(Ht),nt=!1,Kd(Se,Ft,Ot,zt)?nt=!0:(Ft.x=Ge,Ft.y=Je,Ft.transform(Ht),Kd(Se,Ft,Ot,zt)?nt=!0:(Ot.x=se,Ot.y=Je,Ot.transform(Ht),Kd(Se,Ft,Ot,zt)?nt=!0:(Ft.x=se,Ft.y=ct,Ft.transform(Ht),Kd(Se,Ft,Ot,zt)&&(nt=!0)))),fi.free(Ht),It.free(Ft),It.free(Ot),It.free(zt),se=nt}}else se=Se.fh(se,Ne)}else se=Ja(Se,a,b,Ne);se&&(Ge=Se,y!==null&&(Ge=y(Se)),Ge&&(x===null||x(Ge))&&E.add(Ge)),fi.free(Ne)}}}return te===void 0&&fi.free(ne),se||this.background!==null||this.areaBackground!==null}return te===void 0&&fi.free(ne),!1},Vn.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?Yl:this.curve},Vn.prototype.computeCorner=function(){if(this.curve===Yl)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},Vn.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},Vn.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=iS;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===Pg||b===n0||b===Qv?a=Math.max(a,E):b===Eg||b===Mg||b===Cg||b===Tg?a=Math.max(a,ne):(y=y.ga(Di).ab(x.ga(Di))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*ne)+Math.abs(Math.cos(y)*E)+1)),this.curve===Yl&&(a*=1.333)}}return a},Vn.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===Vs&&x.bb()}},Vn.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=rS;var y=this.Sf;if(y!==null){for(var x=pn(),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),On(x)}}return a},Vn.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},Vn.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},Vn.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 se=ne.x-E,he=ne.y-te,ge=Math.sqrt(se*se+he*he);if(!qt.$(ge,0)){if(qt.$(se,0))var Se=0>he?-Math.PI/2:Math.PI/2;else Se=Math.atan(he/Math.abs(se)),0>se&&(Se=Math.PI-Se);ne=y.x;var Ne=y.y;se=b.x-ne;var Ge=b.y-Ne;for(he=Math.sqrt(se*se+Ge*Ge),qt.$(se,0)?Ge=0>Ge?-Math.PI/2:Math.PI/2:(Ge=Math.atan(Ge/Math.abs(se)),0>se&&(Ge=Math.PI-Ge)),ge=he/ge,Se=Ge-Se,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),se=y.x-E,he=y.y-te,y=Math.sqrt(se*se+he*he),qt.$(y,0)||(qt.$(se,0)?he=0>he?-Math.PI/2:Math.PI/2:(he=Math.atan(he/Math.abs(se)),0>se&&(he=Math.PI-he)),se=he+Se,y*=ge,this.L(a,ne+y*Math.cos(se),Ne+y*Math.sin(se)));this.dd(x,b)}}return!0;case t0:if(te=this.i(a),Ne=this.i(x),!te.Xa(y)||!Ne.Xa(b)){E=te.x,te=te.y,ne=Ne.x,Ne=Ne.y,ge=(ne-E)*(ne-E)+(Ne-te)*(Ne-te),se=y.x,Se=y.y,he=b.x,Ge=b.y;var Je=1;if(he-se!==0){var nt=(Ge-Se)/(he-se);Je=Math.sqrt(1+1/(nt*nt))}else nt=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var ct=y.x,Ft=y.y,Ot=.5;ge!==0&&(Ot=((E-ct)*(E-ne)+(te-Ft)*(te-Ne))/ge);var zt=E+Ot*(ne-E),Ht=te+Ot*(Ne-te);y=Math.sqrt((ct-zt)*(ct-zt)+(Ft-Ht)*(Ft-Ht)),Ft<nt*(ct-zt)+Ht&&(y=-y),0<nt&&(y=-y),ct=se+Ot*(he-se),Ot=Se+Ot*(Ge-Se),nt!==0?(y=ct+y/Je,this.L(a,y,Ot-(y-ct)/nt)):this.L(a,ct,Ot+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),se=te.x,Se=te.y,Ne=se,ge=Se,qt.B(E.y,te.y)?qt.B(te.x,ne.x)?Se=y.y:qt.B(te.y,ne.y)&&(se=y.x):qt.B(E.x,te.x)&&(qt.B(te.y,ne.y)?se=y.x:qt.B(te.x,ne.x)&&(Se=y.y)),this.L(a+1,se,Se),E=this.i(x),te=this.i(x-1),ne=this.i(x-2),se=te.x,Se=te.y,he=se,Ge=Se,qt.B(E.y,te.y)?qt.B(te.x,ne.x)?Se=b.y:qt.B(te.y,ne.y)&&(se=b.x):qt.B(E.x,te.x)&&(qt.B(te.y,ne.y)?se=b.x:qt.B(te.x,ne.x)&&(Se=b.y)),this.L(x-1,se,Se),Zv(this))){this.L(a+1,Ne,ge),this.L(x-1,he,Ge),x=!1;break e}this.dd(a,y),this.dd(x,b),x=!0}return x;default:return!1}},Vn.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 se=E.actualBounds.copy(),he=te.actualBounds.copy();if(se.w()&&he.w()){se.Bc(Lg,Lg),he.Bc(Lg,Lg),se.Ye(a),he.Ye(x);var ge=It.alloc(),Se=It.alloc();y===0?x.x>a.x||b===270&&x.y<a.y&&he.right>a.x||b===90&&x.y>a.y&&he.right>a.x?(ge.h(x.x,a.y),Se.h(x.x,(a.y+x.y)/2),b===180?(ge.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),Se.x=ge.x,Se.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(ge.x=a.x<he.left?this.computeMidOrthoPosition(a.x,a.y,he.left,x.y,!1):a.x<he.right&&(b===270&&a.y<he.top||b===90&&a.y>he.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):he.right,Se.x=ge.x,Se.y=x.y):b===0&&a.x<he.left&&a.y>he.top&&a.y<he.bottom&&(ge.x=a.x,ge.y=a.y<x.y?Math.min(x.y,he.top):Math.max(x.y,he.bottom),Se.y=ge.y)):(ge.h(a.x,x.y),Se.h((a.x+x.x)/2,x.y),(b===180||b===90&&x.y<se.top||b===270&&x.y>se.bottom)&&(b===180&&(he.ca(a)||se.ca(x))?ge.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===180||b===90)?ge.y=this.computeMidOrthoPosition(a.x,se.top,x.x,Math.max(x.y,he.bottom),!0):x.y>a.y&&(b===180||b===270)&&(ge.y=this.computeMidOrthoPosition(a.x,se.bottom,x.x,Math.min(x.y,he.top),!0)),Se.x=x.x,Se.y=ge.y),ge.y>se.top&&ge.y<se.bottom&&(x.x>=se.left&&x.x<=a.x||a.x<=he.right&&a.x>=x.x?(b===90||b===270)&&(ge.h(Math.max((a.x+x.x)/2,a.x),a.y),Se.h(ge.x,x.y)):(ge.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===0?se.top:Math.min(se.top,he.top)):Math.max(x.y,b===0?se.bottom:Math.max(se.bottom,he.bottom)),Se.x=x.x,Se.y=ge.y))):y===180?x.x<a.x||b===270&&x.y<a.y&&he.left<a.x||b===90&&x.y>a.y&&he.left<a.x?(ge.h(x.x,a.y),Se.h(x.x,(a.y+x.y)/2),b===0?(ge.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),Se.x=ge.x,Se.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(ge.x=a.x>he.right?this.computeMidOrthoPosition(a.x,a.y,he.right,x.y,!1):a.x>he.left&&(b===270&&a.y<he.top||b===90&&a.y>he.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):he.left,Se.x=ge.x,Se.y=x.y):b===180&&a.x>he.right&&a.y>he.top&&a.y<he.bottom&&(ge.x=a.x,ge.y=a.y<x.y?Math.min(x.y,he.top):Math.max(x.y,he.bottom),Se.y=ge.y)):(ge.h(a.x,x.y),Se.h((a.x+x.x)/2,x.y),(b===0||b===90&&x.y<se.top||b===270&&x.y>se.bottom)&&(b===0&&(he.ca(a)||se.ca(x))?ge.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===0||b===90)?ge.y=this.computeMidOrthoPosition(a.x,se.top,x.x,Math.max(x.y,he.bottom),!0):x.y>a.y&&(b===0||b===270)&&(ge.y=this.computeMidOrthoPosition(a.x,se.bottom,x.x,Math.min(x.y,he.top),!0)),Se.x=x.x,Se.y=ge.y),ge.y>se.top&&ge.y<se.bottom&&(x.x<=se.right&&x.x>=a.x||a.x>=he.left&&a.x<=x.x?(b===90||b===270)&&(ge.h(Math.min((a.x+x.x)/2,a.x),a.y),Se.h(ge.x,x.y)):(ge.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===180?se.top:Math.min(se.top,he.top)):Math.max(x.y,b===180?se.bottom:Math.max(se.bottom,he.bottom)),Se.x=x.x,Se.y=ge.y))):y===90?x.y>a.y||b===180&&x.x<a.x&&he.bottom>a.y||b===0&&x.x>a.x&&he.bottom>a.y?(ge.h(a.x,x.y),Se.h((a.x+x.x)/2,x.y),b===270?(ge.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),Se.x=x.x,Se.y=ge.y):b===180&&x.x<a.x||b===0&&x.x>a.x?(ge.y=a.y<he.top?this.computeMidOrthoPosition(a.x,a.y,x.x,he.top,!0):a.y<he.bottom&&(b===180&&a.x<he.left||b===0&&a.x>he.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):he.bottom,Se.x=x.x,Se.y=ge.y):b===90&&a.y<he.top&&a.x>he.left&&a.x<he.right&&(ge.x=a.x<x.x?Math.min(x.x,he.left):Math.max(x.x,he.right),ge.y=a.y,Se.x=ge.x)):(ge.h(x.x,a.y),Se.h(x.x,(a.y+x.y)/2),(b===270||b===0&&x.x<se.left||b===180&&x.x>se.right)&&(b===270&&(he.ca(a)||se.ca(x))?ge.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===270||b===0)?ge.x=this.computeMidOrthoPosition(se.left,a.y,Math.max(x.x,he.right),x.y,!1):x.x>a.x&&(b===270||b===180)&&(ge.x=this.computeMidOrthoPosition(se.right,a.y,Math.min(x.x,he.left),x.y,!1)),Se.x=ge.x,Se.y=x.y),ge.x>se.left&&ge.x<se.right&&(x.y>=se.top&&x.y<=a.y||a.y<=he.bottom&&a.y>=x.y?(b===0||b===180)&&(ge.h(a.x,Math.max((a.y+x.y)/2,a.y)),Se.h(x.x,ge.y)):(ge.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===90?se.left:Math.min(se.left,he.left)):Math.max(x.x,b===90?se.right:Math.max(se.right,he.right)),Se.x=ge.x,Se.y=x.y))):x.y<a.y||b===180&&x.x<a.x&&he.top<a.y||b===0&&x.x>a.x&&he.top<a.y?(ge.h(a.x,x.y),Se.h((a.x+x.x)/2,x.y),b===90?(ge.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),Se.x=x.x,Se.y=ge.y):b===180&&x.x<a.x||b===0&&x.x>=a.x?(ge.y=a.y>he.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,he.bottom,!0):a.y>he.top&&(b===180&&a.x<he.left||b===0&&a.x>he.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):he.top,Se.x=x.x,Se.y=ge.y):b===270&&a.y>he.bottom&&a.x>he.left&&a.x<he.right&&(ge.x=a.x<x.x?Math.min(x.x,he.left):Math.max(x.x,he.right),ge.y=a.y,Se.x=ge.x)):(ge.h(x.x,a.y),Se.h(x.x,(a.y+x.y)/2),(b===90||b===0&&x.x<se.left||b===180&&x.x>se.right)&&(b===90&&(he.ca(a)||se.ca(x))?ge.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===90||b===0)?ge.x=this.computeMidOrthoPosition(se.left,a.y,Math.max(x.x,he.right),x.y,!1):x.x>a.x&&(b===90||b===180)&&(ge.x=this.computeMidOrthoPosition(se.right,a.y,Math.min(x.x,he.left),x.y,!1)),Se.x=ge.x,Se.y=x.y),ge.x>se.left&&ge.x<se.right&&(x.y<=se.bottom&&x.y>=a.y||a.y>=he.top&&a.y<=x.y?(b===0||b===180)&&(ge.h(a.x,Math.min((a.y+x.y)/2,a.y)),Se.h(x.x,ge.y)):(ge.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===270?se.left:Math.min(se.left,he.left)):Math.max(x.x,b===270?se.right:Math.max(se.right,he.right)),Se.x=ge.x,Se.y=x.y)));var Ne=x;if(this.isAvoiding){var Ge=this.diagram;if(Ge===null||E===te||this.layer.isTemporary||!ep(Ge)||se.ca(Ne)&&!te.Td(E)||he.ca(a)&&!E.Td(te))y=!1;else{var Je=tp(Ge,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Je.Yj(Math.min(a.x,ge.x),Math.min(a.y,ge.y),Math.abs(a.x-ge.x),Math.abs(a.y-ge.y))&&Je.Yj(Math.min(ge.x,Se.x),Math.min(ge.y,Se.y),Math.abs(ge.x-Se.x),Math.abs(ge.y-Se.y))&&Je.Yj(Math.min(Se.x,Ne.x),Math.min(Se.y,Ne.y),Math.abs(Se.x-Ne.x),Math.abs(Se.y-Ne.y)))y=!1;else{E=a,te=Ne;var nt=x=null;if(Ge.isVirtualized){Ge=Je.bounds.copy(),Ge.Bc(-Je.Ho,-Je.Go);var ct=It.alloc();bp(Je,a.x,a.y)||(qt.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,a.x,a.y,ge.x,ge.y,ct)?(x=a=ct.copy(),y=ct.ab(ge)):qt.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,ge.x,ge.y,Se.x,Se.y,ct)?(x=a=ct.copy(),y=ct.ab(Se)):qt.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,Se.x,Se.y,Ne.x,Ne.y,ct)&&(x=a=ct.copy(),y=ct.ab(Ne))),bp(Je,Ne.x,Ne.y)||(qt.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,Ne.x,Ne.y,Se.x,Se.y,ct)?(nt=Ne=ct.copy(),b=Se.ab(ct)):qt.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,Se.x,Se.y,ge.x,ge.y,ct)?(nt=Ne=ct.copy(),b=ge.ab(ct)):qt.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,ge.x,ge.y,a.x,a.y,ct)&&(nt=Ne=ct.copy(),b=a.ab(ct))),It.free(ct)}se=se.copy().ed(he),se.Bc(Je.Ho*Je.Os,Je.Go*Je.Os),aS(Je,a,y,Ne,b,se,!0),he=Ac(Je,Ne.x,Ne.y),!Je.abort&&he>=Pp&&(oS(Je),se.Bc(Je.Ho*Je.Hx,Je.Go*Je.Ix),aS(Je,a,y,Ne,b,se,!1),he=Ac(Je,Ne.x,Ne.y)),!Je.abort&&he<Pp&&Ac(Je,Ne.x,Ne.y)!==Oh?(Xv(this,Je,Ne.x,Ne.y,b,!0,ne),se=this.i(2),4>this.pointsCount?(y===0||y===180?(se.x=a.x,se.y=Ne.y):(se.x=Ne.x,se.y=a.y),this.L(2,se.x,se.y),this.m(3,se.x,se.y)):(ne=this.i(3),y===0||y===180?qt.B(se.x,ne.x)?(se=y===0?Math.max(se.x,a.x):Math.min(se.x,a.x),this.L(2,se,a.y),this.L(3,se,ne.y)):qt.B(se.y,ne.y)?(Math.abs(a.y-se.y)<=Je.Go/2&&(this.L(2,se.x,a.y),this.L(3,ne.x,a.y)),this.m(2,se.x,a.y)):this.L(2,a.x,se.y):(y===90||y===270)&&(qt.B(se.y,ne.y)?(se=y===90?Math.max(se.y,a.y):Math.min(se.y,a.y),this.L(2,a.x,se),this.L(3,ne.x,se)):qt.B(se.x,ne.x)?(Math.abs(a.x-se.x)<=Je.Ho/2&&(this.L(2,a.x,se.y),this.L(3,a.x,ne.y)),this.m(2,a.x,se.y)):this.L(2,se.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)),nt!==null&&(b===0||b===180?this.yf(te.x,nt.y):this.yf(nt.x,te.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(ge.copy()),this.ne(Se.copy())),It.free(ge),It.free(Se)}},Vn.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 Zv(a){if(a.diagram===null||!a.isAvoiding||!ep(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=tp(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 Xv(a,y,x,b,E,te,ne){var se=y.Ho,he=y.Go,ge=Ac(y,x,b),Se=x,Ne=b;for(E===0?Se+=se:E===90?Ne+=he:E===180?Se-=se:Ne-=he,E!==ne&&ge>Xd&&Ac(y,Se,Ne)!==ge-1&&(Ac(y,x-se,b)===ge-1?(E=180,Se=x-se,Ne=b):Ac(y,x+se,b)===ge-1?(E=0,Se=x+se,Ne=b):Ac(y,x,b-he)===ge-1?(E=270,Se=x,Ne=b-he):Ac(y,x,b+he)===ge-1&&(E=90,Se=x,Ne=b+he));ge>Xd&&Ac(y,Se,Ne)===ge-1;)x=Se,b=Ne,E===0?Se+=se:E===90?Ne+=he:E===180?Se-=se:Ne-=he,--ge;te?ge>Xd&&(E===180||E===0?x=Math.floor(x/se)*se+se/2:(E===90||E===270)&&(b=Math.floor(b/he)*he+he/2)):(x=Math.floor(x/se)*se+se/2,b=Math.floor(b/he)*he+he/2),ge>Xd&&(te=E,ne=x,Se=b,E===0?(te=90,Se+=he):E===90?(te=180,ne-=se):E===180?(te=270,Se-=he):E===270&&(te=0,ne+=se),Ac(y,ne,Se)===ge-1?Xv(a,y,ne,Se,te,!1,te):(ne=x,Se=b,E===0?(te=270,Se-=he):E===90?(te=0,ne+=se):E===180?(te=90,Se+=he):E===270&&(te=180,ne-=se),Ac(y,ne,Se)===ge-1&&Xv(a,y,ne,Se,te,!1,te))),a.yf(x,b)}Vn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),b=this.i(1),E=vo(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 se=vo(y,a,b.x,b.y,x.x,x.y);b=x,se<E&&(te=ne,E=se)}return te},Vn.prototype.qc=function(){this.lk=!1,this.v()},Vn.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 ci&&(E.ua=this.ua)}}},Vn.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,b=this.diagram;b!==null&&Zd(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===Yl&&3<=y&&!qt.$(this.smoothness,0))if(y===3){var se=this.i(1);b=Math.min(E.x,se.x);var he=Math.min(E.y,se.y);se=this.i(2),b=Math.min(b,se.x),he=Math.min(he,se.y)}else{if(this.isOrthogonal)for(he=0;he<y;he++)se=b[he],te.x=Math.min(se.x,te.x),te.y=Math.min(se.y,te.y);else for(b=3;b<y;b+=3)b+3>=y&&(b=y-1),he=this.i(b),te.x=Math.min(he.x,te.x),te.y=Math.min(he.y,te.y);b=te.x,he=te.y}else{for(he=0;he<y;he++)se=b[he],te.x=Math.min(se.x,te.x),te.y=Math.min(se.y,te.y);b=te.x,he=te.y}if(b-=this.su.x,he-=this.su.y,E.x-=b,E.y-=he,y!==2||Zd(this)){if(a.type=Jn.o,se=N1(a),this.computeShortLength(!0)!==0&&(E=Cf(this,E,!0,te)),yp(se,E.x,E.y,!1),ne===Yl&&3<=y&&!qt.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-b,x=x.y-he,E=this.i(2).copy(),E.x-=b,E.y-=he,this.computeShortLength(!1)!==0&&(E=Cf(this,E,!1,te)),Eh(se,y,x,y,x,E.x,E.y);else if(this.isOrthogonal){y=It.allocAt(b,he),x=It.alloc(),x.assign(this.i(1)),te=It.allocAt(b,he),E=It.allocAt(b,he),ne=this.i(0);for(var ge,Se=this.smoothness/3,Ne=1;Ne<this.pointsCount-1;Ne++){ge=this.i(Ne);var Ge=ne,Je=ge,nt=this.i(Yv(this,ge,Ne,!1));if((!qt.$(Ge.x,Je.x)||!qt.$(Je.x,nt.x))&&(!qt.$(Ge.y,Je.y)||!qt.$(Je.y,nt.y))){var ct=Se;isNaN(ct)&&(ct=this.smoothness/3);var Ft=Ge.x;Ge=Ge.y;var Ot=Je.x;Je=Je.y;var zt=nt.x;nt=nt.y;var Ht=ct*Qm(Ft,Ge,Ot,Je);ct*=Qm(Ot,Je,zt,nt),qt.$(Ge,Je)&&qt.$(Ot,zt)&&(Ot>Ft?nt>Je?(te.x=Ot-Ht,te.y=Je-Ht,E.x=Ot+ct,E.y=Je+ct):(te.x=Ot-Ht,te.y=Je+Ht,E.x=Ot+ct,E.y=Je-ct):nt>Je?(te.x=Ot+Ht,te.y=Je-Ht,E.x=Ot-ct,E.y=Je+ct):(te.x=Ot+Ht,te.y=Je+Ht,E.x=Ot-ct,E.y=Je-ct)),qt.$(Ft,Ot)&&qt.$(Je,nt)&&(Je>Ge?(zt>Ot?(te.x=Ot-Ht,te.y=Je-Ht,E.x=Ot+ct):(te.x=Ot+Ht,te.y=Je-Ht,E.x=Ot-ct),E.y=Je+ct):(zt>Ot?(te.x=Ot-Ht,te.y=Je+Ht,E.x=Ot+ct):(te.x=Ot+Ht,te.y=Je+Ht,E.x=Ot-ct),E.y=Je-ct)),(qt.$(Ft,Ot)&&qt.$(Ot,zt)||qt.$(Ge,Je)&&qt.$(Je,nt))&&(Ft=.5*(Ft+zt),Ge=.5*(Ge+nt),te.x=Ft,te.y=Ge,E.x=Ft,E.y=Ge),(Ne===1||Ne===2&&qt.$(ne.x,this.i(0).x)&&qt.$(ne.y,this.i(0).y))&&(x.x=.5*(ne.x+ge.x),x.y=.5*(ne.y+ge.y)),Eh(se,x.x-b,x.y-he,te.x-b,te.y-he,ge.x-b,ge.y-he),y.set(te),x.set(E),ne=ge}}ge=ne.x,ne=ne.y,Se=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(Se=Cf(this,Se.copy(),!1,Ei)),ge=.5*(ge+Se.x),ne=.5*(ne+Se.y),Eh(se,E.x-b,E.y-he,ge-b,ne-he,Se.x-b,Se.y-he),It.free(y),It.free(x),It.free(te),It.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=Cf(this,ne.copy(),!1,Ei)),Eh(se,te.x-b,te.y-he,E.x-b,E.y-he,ne.x-b,ne.y-he);else{for(te=It.alloc(),te.assign(this.i(0)),E=It.alloc(),E.assign(te),ne=this.computeCorner(),Ne=1,ge=0;Ne<y;){if(Ne=Yv(this,te,Ne,1<Ne),Se=this.i(Ne),Ne>=y-1){if(!te.D(Se))this.computeShortLength(!1)!==0&&(Se=Cf(this,Se.copy(),!1,Ei)),Ef(this,se,-b,-he,te,Se,x);else if(ge===0)for(Ne=1;Ne<y;)E.assign(te),Se=this.i(Ne++),Ef(this,se,-b,-he,te,Se,x),te.assign(Se);break}if(ge=Yv(this,Se,Ne+1,Ne<y-3),Ne=-b,Ft=-he,Ge=Se,Ot=this.i(ge),ct=x,qt.B(te.y,Ge.y)&&qt.B(Ge.x,Ot.x))if(nt=Math.min(ne,Math.abs(Ge.x-E.x)/2),nt=Ht=Math.min(nt,Math.abs(Ot.y-Ge.y)/2),qt.B(nt,0))Ef(this,se,Ne,Ft,te,Ge,ct),te.assign(Ge);else{var Wt=Ge.x,Xt=Ge.y;Je=Wt,zt=Xt,Ge.x>te.x?Wt=Ge.x-nt:Wt=Ge.x+nt,Ot.y>Ge.y?zt=Ge.y+Ht:zt=Ge.y-Ht,Ot=It.allocAt(Wt,Xt),Ef(this,se,Ne,Ft,te,Ot,ct),It.free(Ot),Gm(se,Ge.x+Ne,Ge.y+Ft,Je+Ne,zt+Ft),te.h(Je,zt)}else qt.B(te.x,Ge.x)&&qt.B(Ge.y,Ot.y)?(nt=Math.min(ne,Math.abs(Ge.y-E.y)/2),nt=Ht=Math.min(nt,Math.abs(Ot.x-Ge.x)/2),qt.B(Ht,0)?(Ef(this,se,Ne,Ft,te,Ge,ct),te.assign(Ge)):(Wt=Ge.x,Xt=Ge.y,Je=Wt,zt=Xt,Ge.y>te.y?Xt=Ge.y-nt:Xt=Ge.y+nt,Ot.x>Ge.x?Je=Ge.x+Ht:Je=Ge.x-Ht,Ot=It.allocAt(Wt,Xt),Ef(this,se,Ne,Ft,te,Ot,ct),It.free(Ot),Gm(se,Ge.x+Ne,Ge.y+Ft,Je+Ne,zt+Ft),te.h(Je,zt))):(Ef(this,se,Ne,Ft,te,Ge,ct),te.assign(Ge));E.assign(Se),Ne=ge}It.free(te)}Hm=se}else se=this.i(1).copy(),se.x-=b,se.y-=he,this.computeShortLength(!0)!==0&&(E=Cf(this,E,!0,te)),this.computeShortLength(!1)!==0&&(se=Cf(this,se,!1,te)),a.type=Jn.j,a.startX=E.x,a.startY=E.y,a.endX=se.x,a.endY=se.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),qt.$(a,0)?y:qt.$(y,0)?a:Math.sqrt(a*a+y*y)))}function Cf(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 Yv(a,y,x,b){for(var E=a.pointsCount,te=y;qt.$(y.x,te.x)&&qt.$(y.y,te.y);){if(x>=E)return E-1;te=a.i(x++)}if(!qt.$(y.x,te.x)&&!qt.$(y.y,te.y))return x-1;for(var ne=te;qt.$(y.x,te.x)&&qt.$(te.x,ne.x)&&(!b||(y.y>=te.y?te.y>=ne.y:te.y<=ne.y))||qt.$(y.y,te.y)&&qt.$(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}Vn.prototype.computeJumpLength=function(){return 10};function Ef(a,y,x,b,E,te,ne){if(!ne&&Zd(a)){ne=a.computeJumpLength();var se=ne/2,he=[],ge=0;if(a.isVisible()&&(ge=Tx(a,E,te,he)),0<ge){if(qt.B(E.y,te.y))if(E.x<te.x)for(var Se=0;Se<ge;){var Ne=Math.max(E.x,Math.min(he[Se++]-se,te.x-ne));y.lineTo(Ne+x,te.y+b);for(var Ge=Ne+x,Je=Math.min(Ne+ne,te.x);Se<ge&&(Ne=he[Se],Ne<Je+ne);)Se++,Je=Math.min(Ne+se,te.x);Ne=te.y-ne+b,Je+=x;var nt=te.y+b;a.curve===kh?yp(y,Je,nt,!1):Eh(y,Ge,Ne,Je,Ne,Je,nt)}else for(--ge;0<=ge;){for(Se=Math.min(E.x,Math.max(he[ge--]+se,te.x+ne)),y.lineTo(Se+x,te.y+b),Ge=Se+x,Ne=Math.max(Se-ne,te.x);0<=ge&&(Se=he[ge],Se>Ne-ne);)ge--,Ne=Math.max(Se-se,te.x);Se=te.y-ne+b,Ne+=x,Je=te.y+b,a.curve===kh?yp(y,Ne,Je,!1):Eh(y,Ge,Se,Ne,Se,Ne,Je)}else if(qt.B(E.x,te.x))if(E.y<te.y)for(Se=0;Se<ge;){for(Ne=Math.max(E.y,Math.min(he[Se++]-se,te.y-ne)),y.lineTo(te.x+x,Ne+b),Ge=Ne+b,Ne=Math.min(Ne+ne,te.y);Se<ge&&(Je=he[Se],Je<Ne+ne);)Se++,Ne=Math.min(Je+se,te.y);Je=te.x-ne+x,nt=te.x+x,Ne+=b,a.curve===kh?yp(y,nt,Ne,!1):Eh(y,Je,Ge,Je,Ne,nt,Ne)}else for(--ge;0<=ge;){for(Se=Math.min(E.y,Math.max(he[ge--]+se,te.y+ne)),y.lineTo(te.x+x,Se+b),Ge=Se+b,Se=Math.max(Se-ne,te.y);0<=ge&&(Ne=he[ge],Ne>Se-ne);)ge--,Se=Math.max(Ne-se,te.y);Ne=te.x-ne+x,Je=te.x+x,Se+=b,a.curve===kh?yp(y,Je,Se,!1):Eh(y,Ne,Ge,Ne,Se,Je,Se)}}}y.lineTo(te.x+x,te.y+b)}function Tx(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,se=0;se<ne;se++){var he=te[se];if(he instanceof Vn){if(he===a)return 0<b.length&&b.sort(function(Se,Ne){return Se-Ne}),b.length;if(he.isVisible()&&Zd(he)){var ge=he.routeBounds;ge.w()&&a.routeBounds.Yc(ge)&&!a.usesSamePort(he)&&(ge=he.path,ge!==null&&ge.Ed()&&Mx(y,x,b,he))}}}}}return 0<b.length&&b.sort(function(Se,Ne){return Se-Ne}),b.length}function Mx(a,y,x,b){for(var E=qt.B(a.y,y.y),te=b.pointsCount,ne=b.i(0),se=It.alloc(),he=1;he<te;he++){var ge=b.i(he);if(he<te-1){var Se=b.i(he+1);if(ne.y===ge.y&&ge.y===Se.y){if(ge.x>ne.x&&Se.x>=ge.x||ge.x<ne.x&&Se.x<=ge.x)continue}else if(ne.x===ge.x&&ge.x===Se.x&&(ge.y>ne.y&&Se.y>=ge.y||ge.y<ne.y&&Se.y<=ge.y))continue}e:{Se=a.x;var Ne=a.y,Ge=y.x,Je=y.y,nt=ne.x;ne=ne.y;var ct=ge.x,Ft=ge.y;if(qt.B(Se,Ge)){if(!qt.B(Ne,Je)&&qt.B(ne,Ft)&&Math.min(Ne,Je)<ne&&Math.max(Ne,Je)>ne&&Math.min(nt,ct)<Se&&Math.max(nt,ct)>Se&&!qt.B(nt,ct)){se.x=Se,se.y=ne,Se=!0;break e}}else if(qt.B(Ne,Je)&&qt.B(nt,ct)&&Math.min(Se,Ge)<nt&&Math.max(Se,Ge)>nt&&Math.min(ne,Ft)<Ne&&Math.max(ne,Ft)>Ne&&!qt.B(ne,Ft)){se.x=nt,se.y=Ne,Se=!0;break e}se.x=0,se.y=0,Se=!1}Se&&(E?x.push(se.x):x.push(se.y)),ne=ge}It.free(se)}function Zd(a){return a=a.curve,a===wp||a===kh}function qm(a,y){(y||Zd(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()))}Vn.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,se=0;se<ne;se++){var he=E[se];he instanceof Vn&&(he===this?te=!0:te&&tS(this,he,a))}}else if(b)for(te=E.Pa.s,E=te.length,ne=0;ne<E;ne++)se=te[ne],se instanceof Vn&&tS(this,se,a)}}}}};function tS(a,y,x){if(y!==null&&y.lk&&y.fd&&Zd(y)){var b=y.routeBounds;b.w()&&(a.routeBounds.Yc(b)||x.Yc(b))&&(a.usesSamePort(y)||y.qc())}}Vn.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},Vn.prototype.isVisible=function(){if(!Mr.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},Vn.prototype.Zb=function(a){if(Mr.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)},Vn.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,se=ne.length,he=0;he<se;he++){var ge=ne[he];(ge.ef===y&&ge.ff===b&&ge.uf===x&&ge.vf===E||ge.ef===x&&ge.ff===E&&ge.uf===y&&ge.vf===b)&&(te===null?te=ge:(a===null&&(a=[],a.push(te)),a.push(ge)))}if(a!==null){for(te=H1(y,x,b,E),te===null&&(te=new i0(y,b,x,E),G1(y,te),G1(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&&(En(y.links,a),y.Sl()))}Vn.prototype.ph=function(){return!0},Ut.Object.defineProperties(Vn.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),Sp(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&Ll(x),wg(this),this.ff=a;var b=this.fromPort;b!==null&&Ll(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),Sp(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&Ll(x),wg(this),this.vf=a;var b=this.toPort;b!==null&&Ll(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:ro},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&&Ll(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&&Qn(a,">= 0",Vn,"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:ro},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&&Ll(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&&Qn(a,">= 0",Vn,"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?hi: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 ci?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()===Yl&&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),qt.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 se=this.i(te-1),he=this.i(te);qt.Dl(E.x,E.y,ne.x,ne.y,se.x,se.y,he.x,he.y,.5,a),y=Math.min(he.x,y),x=Math.min(he.y,x),E=he}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 It)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||Xm(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);qt.$(b.x,E.x)?(b=E.y-b.y,0>b&&(b=-b)):qt.$(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 Ln,b=0;b<a.length/2;b++)E=new It(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(!rn(te)||typeof te.x!="number"||isNaN(te.x)||typeof te.y!="number"||isNaN(te.y)){b=!1;break}}if(b)for(x=new Ln,b=0;b<a.length;b++)E=a[b],x.add(new It(E.x,E.y).freeze())}}else if(a instanceof Ln)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else Yt("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),Xm(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&Lo(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||!xp(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!xp(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===kh||y===wp||a===kh||a===wp),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)}}}),Vn.prototype.invalidateOtherJumpOvers=Vn.prototype.Xo,Vn.prototype.findClosestSegment=Vn.prototype.ez,Vn.prototype.updateRoute=Vn.prototype.vg,Vn.prototype.invalidateRoute=Vn.prototype.bb,Vn.prototype.rollbackRoute=Vn.prototype.rv,Vn.prototype.commitRoute=Vn.prototype.zf,Vn.prototype.startRoute=Vn.prototype.uh,Vn.prototype.clearPoints=Vn.prototype.Fj,Vn.prototype.removePoint=Vn.prototype.pv,Vn.prototype.addPointAt=Vn.prototype.yf,Vn.prototype.addPoint=Vn.prototype.ne,Vn.prototype.insertPointAt=Vn.prototype.m,Vn.prototype.insertPoint=Vn.prototype.Kz,Vn.prototype.setPointAt=Vn.prototype.L,Vn.prototype.setPoint=Vn.prototype.dd,Vn.prototype.getPoint=Vn.prototype.i,Vn.prototype.getOtherPort=Vn.prototype.Cz,Vn.prototype.getOtherNode=Vn.prototype.To;var Tf=null,Mf=null,Jv=new tn(Vn,"Normal",1),Lx=new tn(Vn,"Orthogonal",2),kx=new tn(Vn,"AvoidsNodes",6),nS=new tn(Vn,"AvoidsNodesStraight",7),Vs=new tn(Vn,"None",0),Yl=new tn(Vn,"Bezier",9),kh=new tn(Vn,"JumpGap",10),wp=new tn(Vn,"JumpOver",11),bg=new tn(Vn,"End",17),e0=new tn(Vn,"Scale",18),t0=new tn(Vn,"Stretch",19),Pg=new tn(Vn,"OrientAlong",21),Cg=new tn(Vn,"OrientPlus90",22),Eg=new tn(Vn,"OrientMinus90",23),Qv=new tn(Vn,"OrientOpposite",24),n0=new tn(Vn,"OrientUpright",25),Tg=new tn(Vn,"OrientPlus90Upright",26),Mg=new tn(Vn,"OrientMinus90Upright",27),r0=new tn(Vn,"OrientUpright45",28),rS=16,iS=14,Lg=8;Vn.className="Link",Vn.Normal=Jv,Vn.Orthogonal=Lx,Vn.AvoidsNodes=kx,Vn.AvoidsNodesStraight=nS,Vn.None=Vs,Vn.Bezier=Yl,Vn.JumpGap=kh,Vn.JumpOver=wp,Vn.End=bg,Vn.Scale=e0,Vn.Stretch=t0,Vn.OrientAlong=Pg,Vn.OrientPlus90=Cg,Vn.OrientMinus90=Eg,Vn.OrientOpposite=Qv,Vn.OrientUpright=n0,Vn.OrientPlus90Upright=Tg,Vn.OrientMinus90Upright=Mg,Vn.OrientUpright45=r0,Vn.EndSegmentStep=8,Vn.CurvinessStart=rS,Vn.SpacingMin=iS,Vn.OrthoShortCut=Lg;function i0(a,y,x,b){gi(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=b,this.links=[]}i0.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},i0.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))}},i0.className="LinkBundle";function kg(a){gi(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}kg.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 bp(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function Ac(a,y,x){return bp(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]>=Xd&&(x[b]=qv)}kg.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]===Oh)return!1}return!0};function jc(a,y,x,b,E,te,ne,se,he){if(!(y<te||y>ne||x<se||x>he)){var ge=y|0,Se=x|0,Ne=a.ac[ge][Se];if(Ne>=Xd&&Ne<Pp)for(E?Se+=b:ge+=b,Ne+=1;te<=ge&&ge<=ne&&se<=Se&&Se<=he&&!(Ne>=a.ac[ge][Se]);)a.ac[ge][Se]=Ne,Ne+=1,E?Se+=b:ge+=b;if(ge=E?Se:ge,E)if(0<b)for(x+=b;x<ge;x+=b)jc(a,y,x,1,!E,te,ne,se,he),jc(a,y,x,-1,!E,te,ne,se,he);else for(x+=b;x>ge;x+=b)jc(a,y,x,1,!E,te,ne,se,he),jc(a,y,x,-1,!E,te,ne,se,he);else if(0<b)for(y+=b;y<ge;y+=b)jc(a,y,x,1,!E,te,ne,se,he),jc(a,y,x,-1,!E,te,ne,se,he);else for(y+=b;y>ge;y+=b)jc(a,y,x,1,!E,te,ne,se,he),jc(a,y,x,-1,!E,te,ne,se,he)}}function o0(a,y,x,b,E,te,ne,se,he){y|=0,x|=0;var ge=Oh,Se=Xd;for(a.ac[y][x]=Se;ge===Oh&&y>te&&y<ne&&x>se&&x<he;)Se+=1,a.ac[y][x]=Se,E?x+=b:y+=b,ge=a.ac[y][x]}function a0(a,y,x,b,E,te,ne,se,he){y|=0,x|=0;var ge=Oh,Se=Pp;for(a.ac[y][x]=Se;ge===Oh&&y>te&&y<ne&&x>se&&x<he;)a.ac[y][x]=Se,E?x+=b:y+=b,ge=a.ac[y][x]}function aS(a,y,x,b,E,te,ne){if(a.ac!==null){a.abort=!1;var se=y.x,he=y.y;if(bp(a,se,he)){se-=a.Nd,se/=a.rc,he-=a.Od,he/=a.sc;var ge=b.x,Se=b.y;if(bp(a,ge,Se))if(ge-=a.Nd,ge/=a.rc,Se-=a.Od,Se/=a.sc,1>=Math.abs(se-ge)&&1>=Math.abs(he-Se))a.abort=!0;else{var Ne=te.x;b=te.y,y=te.x+te.width;var Ge=te.y+te.height;Ne-=a.Nd,Ne/=a.rc,b-=a.Od,b/=a.sc,y-=a.Nd,y/=a.rc,Ge-=a.Od,Ge/=a.sc,te=Math.max(0,Math.min(a.di,Ne|0)),y=Math.min(a.di,Math.max(0,y|0)),Ne=Math.max(0,Math.min(a.ei,b|0)),Ge=Math.min(a.ei,Math.max(0,Ge|0)),b=a.ac,se|=0,he|=0,ge|=0,Se|=0;var Je=x===0||x===90?1:-1;if(x=x===90||x===270,b[se][he]===Oh?(o0(a,se,he,Je,x,te,y,Ne,Ge),o0(a,se,he,1,!x,te,y,Ne,Ge),o0(a,se,he,-1,!x,te,y,Ne,Ge)):o0(a,se,he,Je,x,se,he,se,he),b[ge][Se]===Oh?(a0(a,ge,Se,E===0||E===90?1:-1,E===90||E===270,te,y,Ne,Ge),a0(a,ge,Se,1,!(E===90||E===270),te,y,Ne,Ge),a0(a,ge,Se,-1,!(E===90||E===270),te,y,Ne,Ge)):a0(a,ge,Se,Je,x,ge,Se,ge,Se),x=pn(),ne&&sS(a,ge,Se,E,se,he,x))for((x[0]!==ge||x[1]!==Se)&&(x.unshift(Se),x.unshift(ge)),(x[x.length-2]!==se||x[x.length-1]!==he)&&(x.push(se),x.push(he)),a=Xd,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],ge=x[te+1];y>E?E++:y<E?E--:ge>ne?ne++:ge<ne&&ne--,b[E][ne]=a++,E!==y||ne!==ge;);else jc(a,se,he,1,!1,te,y,Ne,Ge),jc(a,se,he,-1,!1,te,y,Ne,Ge),jc(a,se,he,1,!0,te,y,Ne,Ge),jc(a,se,he,-1,!0,te,y,Ne,Ge);On(x)}}}}function sS(a,y,x,b,E,te,ne){for(var se=a.ac,he=y,ge=x;;){if(he===E&&ge===te)return!0;var Se=he,Ne=ge;if(b===0)if(Se<E)Se++;else break;else if(b===90)if(Ne<te)Ne++;else break;else if(b===180)if(Se>E)Se--;else break;else if(Ne>te)Ne--;else break;var Ge=se[Se][Ne];if(Ge===0||Ge===ey)break;he=Se,ge=Ne}for(;;){if(Se=b,Ne=he,Ge=ge,b===0?Ge<te?(Se=90,Ge++):Ge>te&&(Se=270,Ge--):b===90?Ne<E?(Se=0,Ne++):Ne>E&&(Se=180,Ne--):b===180?Ge<te?(Se=90,Ge++):Ge>te&&(Se=270,Ge--):Ne<E?(Se=0,Ne++):Ne>E&&(Se=180,Ne--),Ne=se[Ne][Ge],Se!==b&&Ne!==0&&Ne!==ey){if(ne.push(he),ne.push(ge),sS(a,he,ge,Se,E,te,ne))return!0;ne.pop(),ne.pop()}if(se[he][ge]=ey,b===0){if(he===y)return!1;he--}else if(b===90){if(ge===x)return!1;ge--}else if(b===180){if(he===y)return!1;he++}else{if(ge===x)return!1;ge++}}}Ut.Object.defineProperties(kg.prototype,{bounds:{get:function(){return new wn(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 Oh=0,Xd=1,Pp=999999,qv=Pp+1,ey=Pp+2;kg.className="PositionArray";function Lf(){gi(this),this.port=this.node=null,this.pe=[],this.ap=!1}Lf.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 Ox(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}Lf.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 ni?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 se=a.port.ga(Ka,It.alloc()),he=a.port.ga(As,It.alloc());for(E=wn.allocAt(se.x,se.y,0,0),E.Ye(he),It.free(se),It.free(he),se=It.allocAt(E.x+E.width/2,E.y+E.height/2),he=a.port.li(),ne=ne.iterator;ne.next();){var ge=ne.value;if(ge.isVisible()&&ge.fromPort!==ge.toPort){var Se=ge.fromPort===a.port||ge.fromNode!==null&&ge.fromNode.Td(b),Ne=ge.computeSpot(Se,a.port);if(Ne.$c()&&(Se=Se?ge.toPort:ge.fromPort,Se!==null)){var Ge=Se.part;if(Ge!==null){var Je=Ge.findVisibleNode();Je!==null&&Je!==Ge&&(Ge=Je,Se=Ge.port),Se=ge.computeOtherPoint(Ge,Se),Ge=se.ab(Se),Ge-=he,0>Ge?Ge+=360:360<=Ge&&(Ge-=360),Ne=Ox(E,Ne,Ge,ge.isOrthogonal),Ne===0?(Ne=4,180<Ge&&(Ge-=360)):Ne===90?(Ne=8,270<Ge&&(Ge-=360)):Ne===180?Ne=2:(Ne=1,90>Ge&&(Ge+=360)),Je=a.pe[te],Je===void 0?(Je=new ty(ge,Ge,Ne),a.pe[te]=Je):(Je.link=ge,Je.angle=Ge,Je.Nc=Ne),Je.hv.set(Se),te++}}}}for(It.free(se),a.pe.sort(Lf.prototype.j),he=a.pe.length,b=-1,te=se=0;te<he;te++)ne=a.pe[te],ne!==void 0&&(ne.Nc!==b&&(b=ne.Nc,se=0),ne.Uo=se,se++);for(b=-1,se=0,te=he-1;0<=te;te--)he=a.pe[te],he!==void 0&&(he.Nc!==b&&(b=he.Nc,se=he.Uo+1),he.Gl=se);if(te=a.pe,Ne=a.port,b=a.node.portSpreading,se=It.alloc(),he=It.alloc(),ne=It.alloc(),ge=It.alloc(),Ne.ga(Ka,se),Ne.ga(Fl,he),Ne.ga(As,ne),Ne.ga(tl,ge),Je=Ge=Se=Ne=0,b===Uv)for(var nt=0;nt<te.length;nt++){var ct=te[nt];if(ct!==null){var Ft=ct.link.computeThickness();switch(ct.Nc){case 8:Ge+=Ft;break;case 2:Je+=Ft;break;case 1:Ne+=Ft;break;default:case 4:Se+=Ft}}}var Ot=nt=0,zt=1,Ht=ct=0;for(Ft=0;Ft<te.length;Ft++){var Wt=te[Ft];if(Wt!==null){if(nt!==Wt.Nc){switch(nt=Wt.Nc,nt){case 8:var Xt=ne;Ot=ge;break;case 2:Xt=ge,Ot=se;break;case 1:Xt=se,Ot=he;break;default:case 4:Xt=he,Ot=ne}switch(ct=Ot.x-Xt.x,Ht=Ot.y-Xt.y,nt){case 8:Ge>Math.abs(ct)?(zt=Math.abs(ct)/Ge,Ge=Math.abs(ct)):zt=1;break;case 2:Je>Math.abs(Ht)?(zt=Math.abs(Ht)/Je,Je=Math.abs(Ht)):zt=1;break;case 1:Ne>Math.abs(ct)?(zt=Math.abs(ct)/Ne,Ne=Math.abs(ct)):zt=1;break;default:case 4:Se>Math.abs(Ht)?(zt=Math.abs(Ht)/Se,Se=Math.abs(Ht)):zt=1}Ot=0}var hn=Wt.Zo;if(b===Uv){switch(Wt=Wt.link.computeThickness(),Wt*=zt,hn.set(Xt),nt){case 8:hn.x=Xt.x+ct/2+Ge/2-Ot-Wt/2;break;case 2:hn.y=Xt.y+Ht/2+Je/2-Ot-Wt/2;break;case 1:hn.x=Xt.x+ct/2-Ne/2+Ot+Wt/2;break;default:case 4:hn.y=Xt.y+Ht/2-Se/2+Ot+Wt/2}Ot+=Wt}else{var er=.5;b===Zm&&(er=(Wt.Uo+1)/(Wt.Gl+1)),hn.x=Xt.x+ct*er,hn.y=Xt.y+Ht*er}}}for(It.free(se),It.free(he),It.free(ne),It.free(ge),Xt=a.pe,te=0;te<Xt.length;te++)b=Xt[te],b!==null&&(b.Ju=a.computeEndSegmentLength(b));a.ap=x,wn.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}Lf.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},Lf.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,oa,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)},Lf.className="Knot";function ty(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new It,this.Gl=this.Uo=0,this.Zo=new It,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 Ro(a){gi(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new It(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}Ro.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},Ro.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Ro.prototype.qb=function(){},Ro.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+")"},Ro.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())}}},Ro.prototype.createNetwork=function(){return new Eo(this)},Ro.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof cn?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof ni?y.lg(a.memberParts):y.lg(a.iterator),y},Ro.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")}},Ro.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()}},Ro.prototype.doLayout=function(a){var y=new Nn;a instanceof cn?(rd(this,y,a.nodes,!0,this.rh,!0,!1,!0),rd(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof ni?rd(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},Ro.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 se=a.value;Og(se);var he=se.measuredBounds,ge=he.width;he=he.height,se.moveTo(b,E),se instanceof ni&&(se.rh=!1),b+=Math.max(ge,50)+20,ne=Math.max(ne,Math.max(he,50)),te>=y-1?(te=0,b=x,E+=ne+20,ne=0):te++}},Ro.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 se=ne.value.node;if(!(se===null||se instanceof Vn)&&(Og(se),this.rh(se))){var he=se.measuredBounds,ge=he.width;he=he.height,se.moveTo(x,b),se instanceof ni&&(se.rh=!1),x+=Math.max(ge,50)+20,te=Math.max(te,Math.max(he,50)),E>=a-1?(E=0,x=y,b+=te+20,te=0):E++}}},Ro.prototype.rh=function(a){return!!(!a.location.w()||a instanceof ni&&a.rh)};function rd(a,y,x,b,E,te,ne,se){for(x=x.iterator;x.next();){var he=x.value;b&&!he.isTopLevel||E!==null&&!E(he)||!he.canLayout()||(te&&he instanceof nr?he.isLinkLabel||(he instanceof ni&&he.layout===null?rd(a,y,he.memberParts,!1,E,te,ne,se):(Og(he),y.add(he))):ne&&he instanceof Vn?y.add(he):!se||!he.Zc()||he instanceof nr||(Og(he),y.add(he)))}}function Og(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}Ro.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new wn),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},Ro.prototype.ex=function(a){var y=new Nn;return a instanceof cn?(rd(this,y,a.nodes,!0,null,!0,!0,!0),rd(this,y,a.links,!0,null,!0,!0,!0),rd(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof ni?rd(this,y,a.memberParts,!1,null,!0,!0,!0):rd(this,y,a.iterator,!1,null,!0,!0,!0),y},Ro.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(Ka),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},Ut.Object.defineProperties(Ro.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())}}}),Ro.prototype.collectParts=Ro.prototype.ex,Ro.prototype.getLayoutBounds=Ro.prototype.ni,Ro.prototype.invalidateLayout=Ro.prototype.C,Ro.className="Layout";function Eo(a){gi(this),this.Sc=a,this.wf=new Nn,this.ye=new Nn,this.Es=new ur,this.zs=new ur}Eo.prototype.clear=function(){if(this.wf)for(var a=this.wf.iterator;a.next();)a.value.clear();if(this.ye)for(a=this.ye.iterator;a.next();)a.value.clear();this.wf=new Nn,this.ye=new Nn,this.Es=new ur,this.zs=new ur},Eo.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},Eo.prototype.createVertex=function(){return new Ua(this)},Eo.prototype.createEdge=function(){return new kl(this)},Eo.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 nr)return!ne.isLinkLabel;if(ne instanceof Vn){var se=ne.fromNode;return se===null||se.isLinkLabel?!1:(ne=ne.toNode,!(ne===null||ne.isLinkLabel))}return!1}),a=a.iterator;a.next();){var b=a.value;if(b instanceof nr&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)){if(b instanceof ni&&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 Vn&&(!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))}}},Eo.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},ot=Eo.prototype,ot.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},ot.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},ot.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}ot.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},ot.ki=function(a){return a===null?null:this.Es.I(a)},ot.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}}ot.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},ot.Mj=function(a){if(a!==null){var y=a.toVertex;y!==null&&y.Kl(a),y=a.fromVertex,y!==null&&y.Jl(a),ry(this,a)}};function ry(a,y){y!==null&&a.ye.remove(y)&&(y=y.link,y!==null&&a.zs.remove(y))}ot.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},ot.Lo=function(a){return a===null?null:this.zs.I(a)},ot.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},ot.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))}},ot.Ko=function(){for(var a=pn(),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]);On(a)},Eo.prototype.deleteArtificialVertexes=function(){for(var a=pn(),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=pn(),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]);On(a),On(y)};function Nx(a){for(var y=pn(),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]);On(y)}Eo.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Nx(this),this.Ko()),a=new Ln;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),iy(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 iy(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&&(ry(a,E),ny(y,E),iy(a,y,E.fromVertex))}for(b=x.destinationEdges;b.next();)x=b.value,x.network!==y&&(ry(a,x),ny(y,x),iy(a,y,x.toVertex))}}Eo.prototype.dz=function(){for(var a=new Nn,y=this.wf.iterator;y.next();)a.add(y.value.node);for(y=this.ye.iterator;y.next();)a.add(y.value.link);return a},Ut.Object.defineProperties(Eo.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}}}),Eo.prototype.findAllParts=Eo.prototype.dz,Eo.prototype.splitIntoSubNetworks=Eo.prototype.Zx,Eo.prototype.deleteSelfEdges=Eo.prototype.Ko,Eo.prototype.reverseEdge=Eo.prototype.gm,Eo.prototype.linkVertexes=Eo.prototype.Zj,Eo.prototype.findEdge=Eo.prototype.Lo,Eo.prototype.deleteLink=Eo.prototype.Yy,Eo.prototype.deleteEdge=Eo.prototype.Mj,Eo.prototype.addLink=Eo.prototype.Dy,Eo.prototype.addEdge=Eo.prototype.Bo,Eo.prototype.findVertex=Eo.prototype.ki,Eo.prototype.deleteNode=Eo.prototype.Zy,Eo.prototype.deleteVertex=Eo.prototype.Iu,Eo.prototype.addNode=Eo.prototype.Bl,Eo.prototype.addVertex=Eo.prototype.dh,Eo.prototype.addParts=Eo.prototype.lg,Eo.className="LayoutNetwork";function Ua(a){gi(this),this.ob=a,this.j=new wn(0,0,10,10).freeze(),this.o=new It(5,5).freeze(),this.Sh=this.ub=null,this.tg=new Ln,this.mg=new Ln}Ua.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new Ln,this.mg=new Ln},Ua.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+Mi(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},Ua.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;rn(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 ni)){x=wn.alloc(),a.Va();var b=this.network.layout.ni(a,x),E=a.locationObject.ga(Di);if(b.w()&&E.w()){a.moveTo(y.x+this.focusX-(E.x-b.x),y.y+this.focusY-(E.y-b.y)),wn.free(x);return}wn.free(x)}a.moveTo(y.x,y.y)}},Ua.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},Ua.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},Ua.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},Ua.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}Ut.Object.defineProperties(Ua.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=wn.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),wn.free(x),!(a instanceof ni)&&(a=a.locationObject.ga(Di),a.w())){this.o.h(a.x-y,a.y-E);return}this.o.h(te/2,b/2)}}},bounds:{get:function(){return this.j},set:function(a){this.j.D(a)||this.j.assign(a)}},focus:{get:function(){return this.o},set:function(a){this.o.D(a)||this.o.assign(a)}},centerX:{get:function(){return this.j.x+this.o.x},set:function(a){var y=this.j;y.x+this.o.x!==a&&(y.ka(),y.x=a-this.o.x,y.freeze())}},centerY:{get:function(){return this.j.y+this.o.y},set:function(a){var y=this.j;y.y+this.o.y!==a&&(y.ka(),y.y=a-this.o.y,y.freeze())}},focusX:{get:function(){return this.o.x},set:function(a){var y=this.o;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},focusY:{get:function(){return this.o.y},set:function(a){var y=this.o;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},x:{get:function(){return this.j.x},set:function(a){var y=this.j;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},y:{get:function(){return this.j.y},set:function(a){var y=this.j;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},width:{get:function(){return this.j.width},set:function(a){var y=this.j;y.width!==a&&(y.ka(),y.width=a,y.freeze())}},height:{get:function(){return this.j.height},set:function(a){var y=this.j;y.height!==a&&(y.ka(),y.height=a,y.freeze())}},network:{get:function(){return this.ob},set:function(a){this.ob=a}},sourceVertexes:{get:function(){for(var a=new Nn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new Nn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new Nn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);for(y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},sourceEdges:{get:function(){return this.tg.iterator}},destinationEdges:{get:function(){return this.mg.iterator}},edges:{get:function(){for(var a=new Ln,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}}}),Ua.prototype.deleteDestinationEdge=Ua.prototype.Jl,Ua.prototype.addDestinationEdge=Ua.prototype.zl,Ua.prototype.deleteSourceEdge=Ua.prototype.Kl,Ua.prototype.addSourceEdge=Ua.prototype.Cl,Ua.className="LayoutVertex",Ua.standardComparer=oy,Ua.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 kl(a){gi(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}kl.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},kl.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+Mi(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},kl.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},kl.prototype.commit=function(){},kl.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},Ut.Object.defineProperties(kl.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)}}}),kl.prototype.getOtherVertex=kl.prototype.Ax,kl.className="LayoutEdge";function ds(a){Ro.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new Zn(NaN,NaN).freeze(),this.tf=new Zn(10,10).freeze(),this.Jb=Ng,this.Rb=l0,this.nd=Ag,this.hd=cS,a&&Object.assign(this,a)}un(ds,Ro),ds.prototype.cloneProtected=function(a){Ro.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},ds.prototype.qb=function(a){a.classType===ds?a===Ag||a===c0||a===ay||a===u0?this.sorting=a:a===l0||a===Xu?this.arrangement=a:a===Ng||a===s0?this.alignment=a:Yt("Unknown enum value: "+a):Ro.prototype.qb.call(this,a)},ds.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 ni)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 Ag: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 s0:var se=y,he=x,ge=wn.alloc(),Se=Math.max(this.cellSize.width,1);if(!isFinite(Se))for(var Ne=Se=0;Ne<E.length;Ne++){var Ge=this.ni(E[Ne],ge);Se=Math.max(Se,Ge.width)}if(Se=Math.max(Se+se,1),Ne=Math.max(this.cellSize.height,1),!isFinite(Ne))for(Ge=Ne=0;Ge<E.length;Ge++){var Je=this.ni(E[Ge],ge);Ne=Math.max(Ne,Je.height)}Ne=Math.max(Ne+he,1),Ge=this.arrangement;for(var nt=Je=this.arrangementOrigin.x,ct=this.arrangementOrigin.y,Ft=0,Ot=0,zt=0;zt<E.length;zt++){var Ht=E[zt],Wt=this.ni(Ht,ge),Xt=Math.ceil((Wt.width+se)/Se)*Se,hn=Math.ceil((Wt.height+he)/Ne)*Ne;switch(Ge){case Xu:var er=Math.abs(nt-Wt.width);break;default:er=nt+Wt.width}switch((0<te&&Ft>te-1||0<ne&&0<Ft&&er-Je>ne)&&(b.push(new wn(0,ct,ne+se,Ot)),Ft=0,nt=Je,ct+=Ot,Ot=0),Ot=Math.max(Ot,hn),Ge){case Xu:Wt=-Wt.width;break;default:Wt=0}switch(Ht.moveTo(nt+Wt,ct),Ge){case Xu:nt-=Xt;break;default:nt+=Xt}Ft++}b.push(new wn(0,ct,ne+se,Ot)),wn.free(ge);break;case Ng:for(he=ne,Se=te,Ne=y,Ge=x,ne=wn.alloc(),Je=Math.max(this.cellSize.width,1),te=ct=ge=0,se=It.alloc(),nt=0;nt<E.length;nt++)Ot=E[nt],Ft=this.ni(Ot,ne),Ot=Th(Ot,Ot.locationObject,Ot.locationSpot,se),ge=Math.max(ge,Ot.x),ct=Math.max(ct,Ft.width-Ot.x),te=Math.max(te,Ot.y);switch(nt=this.arrangement,nt){case Xu:ge+=Ne;break;default:ct+=Ne}Je=isFinite(Je)?Math.max(Je+Ne,1):Math.max(ge+ct,1);var cr=Ot=this.arrangementOrigin.x;for(zt=this.arrangementOrigin.y,ct=0,he>=ge&&(he-=ge),ge=Ht=0,Xt=Math.max(this.cellSize.height,1),Wt=te=0,hn=!0,Ft=It.alloc(),er=0;er<E.length;er++){var sr=E[er],Wn=this.ni(sr,ne),An=Th(sr,sr.locationObject,sr.locationSpot,se);if(0<ct)switch(nt){case Xu:cr=(cr-Ot-(Wn.width-An.x))/Je,cr=qt.$(Math.round(cr),cr)?Math.round(cr):Math.floor(cr),cr=cr*Je+Ot;break;default:cr=(cr-Ot+An.x)/Je,cr=qt.$(Math.round(cr),cr)?Math.round(cr):Math.ceil(cr),cr=cr*Je+Ot}else switch(nt){case Xu:Ht=cr+An.x+Wn.width;break;default:Ht=cr-An.x}switch(nt){case Xu:var ei=-(cr+An.x)+Ht;break;default:ei=cr+Wn.width-An.x-Ht}if(0<Se&&ct>Se-1||0<he&&0<ct&&ei>he){for(b.push(new wn(0,hn?zt-te:zt,he+Ne,Wt+te+Ge)),cr=0;cr<ct&&er!==ct;cr++){ei=E[er-ct+cr];var Vr=Th(ei,ei.locationObject,ei.locationSpot,Ft);ei.moveTo(ei.position.x,ei.position.y+te-Vr.y)}Wt+=Ge,zt=hn?zt+Wt:zt+(Wt+te),ct=Wt=te=0,cr=Ot,hn=!1}switch(cr===Ot&&(ge=nt===Xu?Math.max(ge,Wn.width-An.x):Math.min(ge,-An.x)),te=Math.max(te,An.y),Wt=Math.max(Wt,Wn.height-An.y),isFinite(Xt)&&(Wt=Math.max(Wt,Math.max(Wn.height,Xt)-An.y)),hn?sr.moveTo(cr-An.x,zt-An.y):sr.moveTo(cr-An.x,zt),nt){case Xu:cr-=An.x+Ne;break;default:cr+=Wn.width-An.x+Ne}ct++}if(b.push(new wn(0,zt,he+Ne,(hn?Wt:Wt+te)+Ge)),E.length!==ct)for(he=0;he<ct;he++)Se=E[E.length-ct+he],Ne=Th(Se,Se.locationObject,Se.locationSpot,se),Se.moveTo(Se.position.x,Se.position.y+te-Ne.y);if(It.free(se),It.free(Ft),nt===Xu)for(E=0;E<b.length;E++)te=b[E],te.width+=ge,te.x-=ge;else for(E=0;E<b.length;E++)te=b[E],te.x>ge&&(te.width+=te.x-ge,te.x=ge);wn.free(ne)}for(se=te=ne=E=0;se<b.length;se++)he=b[se],E=Math.min(E,he.x),ne=Math.min(ne,he.y),te=Math.max(te,he.x+he.width);this.arrangement===Xu?this.commitLayers(b,new It(E+y/2-(te+E),ne-x/2)):this.commitLayers(b,new It(E-y/2,ne-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},ds.prototype.commitLayers=function(){};function cS(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}Ut.Object.defineProperties(ds.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!==Ng&&a!==s0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==l0&&a!==Xu||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==ay&&a!==u0&&a!==Ag&&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 s0=new tn(ds,"Position",0),Ng=new tn(ds,"Location",1),l0=new tn(ds,"LeftToRight",2),Xu=new tn(ds,"RightToLeft",3),ay=new tn(ds,"Forward",4),u0=new tn(ds,"Reverse",5),Ag=new tn(ds,"Ascending",6),c0=new tn(ds,"Descending",7);ds.className="GridLayout",ds.standardComparer=cS,ds.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},ds.Position=s0,ds.Location=Ng,ds.LeftToRight=l0,ds.RightToLeft=Xu,ds.Forward=ay,ds.Reverse=u0,ds.Ascending=Ag,ds.Descending=c0;function so(){this.On=new Nn,this.Dn=new Nn,this.Pa=new Nn,this.cf=new ur,this.bf=new ur,this.aj=new ur,this.H=null,this.tp=!1}ot=so.prototype,ot.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},ot.Xe=function(a){this.H=a},ot.oi=function(a){if(a instanceof nr){if(this.On.add(a),a instanceof ni){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 Vn?this.Dn.add(a):a instanceof Ui||this.Pa.add(a);y=a.data,y===null||a instanceof Ui||(a instanceof Vn?this.bf.add(y,a):this.cf.add(y,a))},ot.pc=function(a){if(a.Ej(),a instanceof nr){if(this.On.remove(a),a instanceof ni){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 Vn?this.Dn.remove(a):a instanceof Ui||this.Pa.remove(a);y=a.data,y===null||a instanceof Ui||(a instanceof Vn?this.bf.remove(y):this.cf.remove(y))},ot.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 ni)&&Yt('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 ni||Yt('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 Vn||Yt('Invalid link template in Diagram.linkTemplateMap: template for "'+b+'" must be a Link, not a normal Node or simple Part: '+x);for(y=pn(),x=a.selection.iterator;x.next();)(b=x.value.data)&&y.push(b);for(x=pn(),a=a.highlighteds.iterator;a.next();)(b=a.value.data)&&x.push(b);for(a=pn(),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]);On(y),On(x),On(a)}},so.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},so.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&&(Su(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)}}so.prototype.insertLink=function(){return null},so.prototype.resolveReferencesForData=function(){},so.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,or('No Group template found for category "'+x+'"'),or(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(pS||(pS=!0,or('No Node template found for category "'+x+'"'),or(" Using default node template")),y=a.ny))),y}so.prototype.getLinkCategoryForData=function(){return""},so.prototype.setLinkCategoryForData=function(){},so.prototype.setFromNodeForLink=function(){},so.prototype.setToNodeForLink=function(){},so.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,or('No Link template found for category "'+a+'"'),or(" Using default link template")),x=y.my)),x},so.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},so.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},so.prototype.ip=function(a){a=this.Lc(a),a!==null&&(Zh(this.diagram,a,!1),this.unresolveReferencesForPart(a))},so.prototype.unresolveReferencesForPart=function(){},so.prototype.removeDataForLink=function(){},so.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},so.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof nr?a:null)},so.prototype.findLinkForKey=function(){return null},ot=so.prototype,ot.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},ot.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof nr?a:null)},ot.Kc=function(a){return a===null?null:this.bf.I(a)},ot.ms=function(a){for(var y=0;y<arguments.length;++y);y=new Nn;for(var x=this.On.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var te=0;te<arguments.length;te++){var ne=arguments[te];if(rn(ne)&&sy(this,E,ne)){y.add(b);break}}}return y.iterator},ot.ls=function(a){for(var y=0;y<arguments.length;++y);y=new Nn;for(var x=this.Dn.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var te=0;te<arguments.length;te++){var ne=arguments[te];if(rn(ne)&&sy(this,E,ne)){y.add(b);break}}}return y.iterator};function sy(a,y,x){for(var b in x){var E=y[b],te=x[b];if(Mn(te)){if(!Mn(E)||E.length<te.length)return!1;for(var ne=0;ne<E.length;ne++){var se=te[ne];if(se!==void 0&&!fS(a,E[ne],se))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(rn(y)&&rn(x)){if(!sy(a,y,x))return!1}else if(y!==x)return!1;return!0}so.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===zo){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===sa){var ne=a.newValue;b==="nodeDataArray"&&rn(ne)&&hS(this,ne),y.isModified=!0}else if(x===La){var se=a.oldValue;b==="nodeDataArray"&&rn(se)&&this.ip(se),y.isModified=!0}else x===il&&(b==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):b==="ModelDisplaced"&&this.Wd());else if(x===zo){var he=a.propertyName,ge=a.object;ge===y.model?(he==="nodeKeyProperty"||he==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(ge,he),y.isModified=!0}else if(x===sa||x===La){var Se=a.change===sa,Ne=Se?a.newParam:a.oldParam,Ge=Se?a.newValue:a.oldValue,Je=this.aj.I(a.object);if(Array.isArray(Je))for(a=0;a<Je.length;a++){var nt=Je[a];if(Se)km(nt,Ge,Ne,!0);else if(!(0>Ne)){var ct=Ne+fg(nt);nt.pc(ct,!0),wv(nt,ct,Ne)}}y.isModified=!0}}finally{y.aa=!0}}}}},so.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)},so.prototype.rp=function(){for(var a=this.H.model,y=new Nn,x=a.nodeDataArray,b=0;b<x.length;b++)y.add(x[b]);var E=[];for(this.nodes.each(function(ne){ne.data===null||y.contains(ne.data)||E.push(ne.data)}),this.parts.each(function(ne){ne.data===null||y.contains(ne.data)||E.push(ne.data)}),E.forEach(function(ne){ES(a,ne,!1)}),b=0;b<x.length;b++){var te=x[b];this.Lc(te)===null&&CS(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()},so.prototype.refreshDataBoundLinks=function(){},so.prototype.updateRelationshipsFromData=function(){},so.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=pn()),x.push(ne))}if(x!==null)break}if(x!==null){for(b=0;b<x.length;b++)x[b].La(y);On(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function ly(a,y){var x=y.Hh;if(Mn(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){Ud(y,function(ne){ne=ne.O.s;for(var se=ne.length,he=0;he<se;he++)Jp(x,ne[he])});var b=y.Hh;if(Mn(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}}}}so.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var b=new ur;if(Mn(a))for(var E=0;E<a.length;E++)h0(this,a[E],y,b,x);else for(a=a.iterator;a.next();)h0(this,a.value,y,b,x);if(y!==null){x=y.model,a=y.toolManager.findTool("Dragging"),a=a!==null?a.dragOptions.dragsLink:y.Wm.dragsLink,E=new Nn;for(var te=new ur,ne=b.iterator;ne.next();){var se=ne.value;if(se instanceof Vn)a||se.fromNode!==null&&se.toNode!==null||E.add(se);else if(se instanceof nr&&se.data!==null&&x.Tl()){var he=se;se=ne.key;var ge=se.pg();ge!==null&&(ge=b.I(ge),ge!==null?(x.qe(he.data,x.wa(ge.data)),he=y.Kc(he.data),se=se.kh(),se!==null&&he!==null&&te.add(se,he)):x.qe(he.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 Se=new ur;b.each(function(Ne){Ne.key.data!==null&&Se.add(Ne.key.data,Ne.value.data)}),x(Se,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 Mr))return null;if(te.isSelected=!1,te.isHighlighted=!1,b.add(y,te),y instanceof nr){for(var ne=y.linksConnected;ne.next();){var se=ne.value;if(se.fromNode===y){var he=b.I(se);he!==null&&(he.fromNode=te)}se.toNode===y&&(se=b.I(se),se!==null&&(se.toNode=te))}if(y instanceof ni&&te instanceof ni)for(y=y.memberParts;y.next();)ne=h0(a,y.value,x,b,E),ne instanceof Vn||ne===null||(ne.containingGroup=te)}else if(y instanceof Vn&&te instanceof Vn)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 nr&&(ne.labeledLink=te);return te}so.prototype.copyPartData=function(a,y){var x=null,b=a.data;if(b!==null&&y!==null){var E=y.model;a instanceof Vn||(b=E.copyNodeData(b),rn(b)&&(E.xf(b),x=y.Lc(b)))}else Su(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 Vn||(E=y.copyNodeData(b)),rn(E)&&(x.data=E)));return x},Ut.Object.defineProperties(so.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}}}),so.prototype.updateAllRelationshipsFromData=so.prototype.rp,so.prototype.findLinksByExample=so.prototype.ls,so.prototype.findNodesByExample=so.prototype.ms,so.prototype.findLinkForData=so.prototype.Kc,so.prototype.findNodeForData=so.prototype.ii,so.prototype.findPartForData=so.prototype.Lc,so.prototype.findNodeForKey=so.prototype.Vb,so.prototype.removeModeledPart=so.prototype.ip,so.prototype.removeModeledParts=so.prototype.Gs,so.prototype.rebuildParts=so.prototype.Wd;var pS=!1,gS=!1,mS=!1;so.className="PartManager";function ns(a){so.apply(this,arguments)}un(ns,so),ns.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vS(this,a.linkDataArray)},ns.prototype.addModeledParts=function(a){for(so.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)Sp(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){Su(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=Jl(x,y,!0),te!==void 0&&(te=a.Vb(te),te instanceof nr&&(E.fromNode=te)),te=g0(x,y,!1),te!==""&&(E.toPortId=te),te=Jl(x,y,!1),te!==void 0&&(te=a.Vb(te),te instanceof nr&&(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}}}}ns.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)})}ns.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},ns.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},ns.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},ns.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},ns.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},ns.prototype.findPartForKey=function(a){var y=so.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},ns.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},ns.prototype.doModelChanged=function(a){var y=this;if(so.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===zo){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 se=this.Kc(a.object);if(se!==null){var he=this.Vb(a.newValue);se.toNode=he}}else if(E==="linkFromPortId"){var ge=this.Kc(a.object);if(ge!==null){var Se=a.newValue;typeof Se=="string"&&(ge.fromPortId=Se)}}else if(E==="linkToPortId"){var Ne=this.Kc(a.object);if(Ne!==null){var Ge=a.newValue;typeof Ge=="string"&&(Ne.toPortId=Ge)}}else if(E==="nodeGroupKey"){var Je=this.Lc(a.object);if(Je!==null){var nt=a.newValue;if(nt!==void 0){var ct=this.Vb(nt);ct instanceof ni?Je.containingGroup=ct:Je.containingGroup=null}else Je.containingGroup=null}}else if(E==="linkLabelKeys"){var Ft=this.Kc(a.object);if(Ft!==null){var Ot=a.oldValue,zt=a.newValue;Array.isArray(Ot)&&Ot.forEach(function(An){0<=zt.indexOf(An)||(An=y.Vb(An),An!==null&&(An.labeledLink=null))}),Array.isArray(zt)&&zt.forEach(function(An){An=y.Vb(An),An!==null&&(An.labeledLink=Ft)})}}else if(E==="linkCategory"){var Ht=this.Kc(a.object),Wt=a.newValue;Ht!==null&&typeof Wt=="string"&&(Ht.category=Wt)}else E==="linkDataArray"&&(SS(this,a.oldValue),vS(this,a.newValue));x.isModified=!0}else if(b===sa){var Xt=a.newValue;if(E==="linkDataArray"&&typeof Xt=="object"&&Xt!==null)yS(this,Xt);else if(E==="linkLabelKeys"&&od(Xt)){var hn=this.Kc(a.object),er=this.Vb(Xt);hn!==null&&er!==null&&(er.labeledLink=hn)}x.isModified=!0}else if(b===La){var cr=a.oldValue;if(E==="linkDataArray"&&typeof cr=="object"&&cr!==null)this.ip(cr);else if(E==="linkLabelKeys"&&od(cr)){var sr=this.Vb(cr);sr!==null&&(sr.labeledLink=null)}x.isModified=!0}}else if(b===zo){var Wn=a.propertyName;a.object!==x.model||Wn!=="linkFromKeyProperty"&&Wn!=="linkToKeyProperty"&&Wn!=="linkFromPortIdProperty"&&Wn!=="linkToPortIdProperty"&&Wn!=="linkLabelKeysProperty"&&Wn!=="nodeIsGroupProperty"&&Wn!=="nodeGroupKeyProperty"&&Wn!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},ns.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new Nn,b=y.linkDataArray;b.forEach(function(te){x.add(te)});var E=[];this.links.each(function(te){te.data===null||x.contains(te.data)||E.push(te.data)}),E.forEach(function(te){NS(y,te,!1)}),b.forEach(function(te){a.Kc(te)===null&&OS(y,te,!1)})},ns.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 Vn){var E=Jl(b,y,!0);if(E=x.Vb(E),a.fromNode=E,E=Jl(b,y,!1),E=x.Vb(E),a.toNode=E,y=b.Ef(y),0<y.length||0<a.labelNodes.count){if(y.length===1&&a.labelNodes.count===1){E=y[0];var te=a.labelNodes.first();if(b.wa(te.data)===E)return}E=new Nn().addAll(y);var ne=new Nn;a.labelNodes.each(function(se){se.data!==null&&(se=b.wa(se.data),se!==void 0&&ne.add(se))}),y=ne.copy(),y.hp(E),E=E.copy(),E.hp(ne),(0<y.count||0<E.count)&&(y.each(function(se){se=x.Vb(se),se!==null&&se.labeledLink===a&&(se.labeledLink=null)}),E.each(function(se){se=x.Vb(se),se!==null&&se.labeledLink!==a&&(se.labeledLink=a)}))}}else!(a instanceof Ui)&&(y=b.lh(y),y=x.findPartForKey(y),y===null||y instanceof ni)&&(a.containingGroup=y)}}},ns.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=jg(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 ni&&y.lh(ne)===x&&(ne=this.Lc(ne),ne!==null&&(ne.containingGroup=E)):(te.link=this.Kc(ne),te.link!==null&&E instanceof nr&&(Jl(y,ne,!0)===x&&(te.link.fromNode=E),Jl(y,ne,!1)===x&&(te.link.toNode=E),ne=y.Ef(ne),Array.isArray(ne)&&ne.some(function(se){return function(he){return he===x?(E.labeledLink=se.link,!0):!1}}(te)))),te={link:te.link}}Ju(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof ni&&(E.containingGroup=a))}},ns.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof nr){var x=y.wa(a.data);if(x!==void 0){for(var b=a.linksConnected;b.next();)Yu(y,x,b.value.data);if(a.isLinkLabel&&(b=a.labeledLink,b!==null&&Yu(y,x,b.data)),a instanceof ni)for(a=a.memberParts;a.next();)b=a.value.data,y.lb(b)&&Yu(y,x,b)}}},ns.prototype.copyPartData=function(a,y){var x=so.prototype.copyPartData.call(this,a,y);if(a instanceof Vn)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},ns.prototype.insertLink=function(a,y,x,b){var E=this.diagram,te=E.model,ne=E.toolManager.findTool("Linking"),se="";if(a!==null&&(y===null&&(y=a),se=y.portId,se===null&&(se="")),y="",x!==null&&(b===null&&(b=x),y=b.portId,y===null&&(y="")),b=ne.archetypeLinkData,b instanceof Vn){if(Su(b),te=b.copy(),te!==null)return te.fromNode=a,te.fromPortId=se,te.toNode=x,te.toPortId=y,E.add(te),a=ne.archetypeLabelNodeData,a instanceof nr&&(Su(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),Tp(te,b,se,!0),x!==null&&Ep(te,b,te.wa(x.data),!1),Tp(te,b,y,!1),te.fi(b),a=ne.archetypeLabelNodeData,a===null||a instanceof nr||(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},ns.prototype.findLinkForKey=ns.prototype.findLinkForKey,ns.prototype.findPartForKey=ns.prototype.findPartForKey,ns.prototype.removeAllModeledParts=ns.prototype.removeAllModeledParts,ns.prototype.addModeledParts=ns.prototype.addModeledParts,ns.prototype.addAllModeledParts=ns.prototype.addAllModeledParts,ns.className="GraphLinksPartManager";function cu(){so.apply(this,arguments),this.Sg=null}un(cu,so);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||!_n(b,E,te,null,!0))&&(y=a.getLinkCategoryForData(x.data),b=a.findLinkTemplateForCategory(y),b!==null&&(Su(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}}}cu.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},cu.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},cu.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}},cu.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))},cu.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},cu.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},cu.prototype.doModelChanged=function(a){if(so.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===zo){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 se=ne.kh();se!==null?te===null?y.remove(se):y.isTreePathToChildren?se.fromNode=te:se.toNode=te:d0(this,te,ne)}}else if(b==="parentLinkCategory"){var he=this.ii(a.object),ge=a.newValue;if(he!==null&&typeof ge=="string"){var Se=he.kh();Se!==null&&(Se.category=ge)}}y.isModified=!0}}else if(x===zo){var Ne=a.propertyName;a.object===y.model&&Ne==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},cu.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;a instanceof nr&&(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&&Zh(x,b,!1)))}}},cu.prototype.updateDataBindings=function(a,y){so.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},cu.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=jg(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 nr&&y.mh(te)===x&&d0(this,E,this.ii(te))}Ju(y,x)}a=y.mh(a),a!==void 0&&E instanceof nr&&(a=this.Vb(a),d0(this,a,E))}},cu.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof nr){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(La,"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)&&Yu(y,x,E)}},cu.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},cu.prototype.findLinkForKey=cu.prototype.findLinkForKey,cu.className="TreePartManager";function mr(a,y){this.kl=new Nn,this.il=new Nn,this.Wv=`,
"insertedNodeKeys": `,this.jy=`,
"modifiedNodeData": `,this.Yv=`,
"removedNodeKeys": `,this.vh=null,gi(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new ur,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 ur,this.Lt=new Ln,this.Wg=!1,this.o=null,this.undoManager=new Uo,a!==void 0&&(Mn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}mr.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},mr.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},mr.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},mr.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)+":"+$n(E)}}return y},mr.prototype.xA=function(a){a.change!==il&&Yt("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof Za?(wS(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},mr.prototype.Qv=function(a,y){var x=this,b=!1,E=new Nn,te=new Nn,ne=new Nn,se=this.vh;a.changes.each(function(Ne){Ne.model===x&&(Ne.modelChange==="nodeDataArray"?Ne.change===sa?E.add(Ne.newValue):Ne.change===La&&ne.add(Ne.oldValue):x.lb(Ne.object)?te.add(Ne.object):Ne.change!==zo||x.modelData!==Ne.object&&Ne.propertyName!=="modelData"?Ne.object!==null&&(se&&se.contains(Ne.object)?se.get(Ne.object).each(function(Ge){x.lb(Ge)&&te.add(Ge)}):Ne.object instanceof mr||x.ri()&&x.Jc(Ne.object)||bS(x,Ne.object).each(function(Ge){te.add(Ge)})):b=!0)});var he=this.il;he.clear(),E.each(function(Ne){he.add(x.wa(Ne)),y||te.add(Ne)});var ge=this.kl;ge.clear(),ne.each(function(Ne){ge.add(x.wa(Ne)),y&&te.add(Ne)}),a=x.cloneDeep(te.Fa());var Se=null;return b&&(Se===null&&(Se={}),Se.modelData=this.cloneDeep(this.modelData)),0<he.count&&(Se===null&&(Se={}),y?Se.removedNodeKeys=he.Fa():Se.insertedNodeKeys=he.Fa()),0<a.length&&(Se===null&&(Se={}),Se.modifiedNodeData=a),0<ge.count&&(Se===null&&(Se={}),y?Se.insertedNodeKeys=ge.Fa():Se.removedNodeKeys=ge.Fa()),ge.clear(),he.clear(),Se},mr.prototype.cloneDeep=function(a){return Cp(this,a,!0)};function Cp(a,y,x,b,E,te){function ne(Ne,Ge){se?(Ne.__gohashid===void 0&&te.push(Ne),b.set(Ne,Ge)):(Ne=Go++,b.set(Ne,Ge),E.set(Ne,y))}if(!rn(y))return y;te||(te=[]);var se=Object.isExtensible(y);if(b||(b=new ur),se){var he=b.get(y);if(he)return he}else for(E||(E=new ur),he=E.iterator;he.next();){var ge=he.key;if(he.value===y&&(ge=b.get(ge)))return ge}if(Array.isArray(y)){he=[],ne(y,he);for(var Se=0;Se<y.length;Se++)he.push(Cp(a,y[Se],!1,b,E,te))}else if(y instanceof It||y instanceof Zn||y instanceof wn||y instanceof kr||y instanceof yr)he=y.copy(),ne(y,he);else{if(y instanceof oo||y instanceof Jn||y instanceof tn)return y;if(y instanceof Ln)he=new Ln().addAll(Cp(a,y.Fa(),!1,b,E,te)),ne(y,he);else if(y instanceof Nn)he=new Nn().addAll(Cp(a,y.Fa(),!1,b,E,te)),ne(y,he);else if(y instanceof ur)he=new ur().addAll(Cp(a,y.Fa(),!1,b,E,te)),ne(y,he);else if(y instanceof Date)he=new Date(y.getTime()),ne(y,he);else if(y instanceof RegExp)he=new RegExp(y),ne(y,he),he.lastIndex=y.lastIndex;else if(typeof y.copy=="function")he=y.copy(),ne(y,he);else for(Se in he={},ne(y,he),y)Se!=="__gohashid"&&(he[Se]=Cp(a,y[Se],!1,b,E,te))}return x&&te.forEach(function(Ne){delete Ne.__gohashid}),he}ot=mr.prototype,ot.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},ot.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},ot.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,rn(y)&&(a.dm(y),a.modelData=y)}ot.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!PS(x,a[x])){y=!0;break}return a="",y&&(a=`,
"modelData": `+cy(this,this.modelData)),a+`,
"nodeDataArray": `+id(this,this.nodeDataArray,!0)},ot.kv=function(a){xS(this,a),a=a.nodeDataArray,Mn(a)&&(this.dm(a),this.nodeDataArray=a)};function wS(a,y){function x(E,te){if((te=te.part)&&(te=te.data,E!==te)){var ne=b.get(E);ne===null?(ne=new Nn,ne.add(te),b.add(E,ne)):ne.add(te)}}var b=a.vh;b===null&&(b=new ur,y.changes.each(function(E){if(E.diagram!==null){var te=E.change;te===zo?(E=E.object.panel)&&(te=E.data)&&x(te,E):(te===sa||te===La)&&(E=E.object,(te=E.itemArray)&&x(te,E))}}),a.vh=b)}function bS(a,y){for(var x=new Nn,b=0;b<a.nodeDataArray.length;b++){var E=a.nodeDataArray[b];f0(a,y,E,E,x)}return x}function f0(a,y,x,b,E){if(Array.isArray(x))for(var te=0;te<x.length;te++){var ne=x[te];if(ne===y)return E.add(b),!0;if(f0(a,y,ne,b,E))return!0}else if(rn(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}ot.Pv=function(a,y){var x=this,b=!1,E=new Nn,te=new Nn,ne=new Nn,se=this.vh;a.changes.each(function(Se){Se.model===x&&(Se.modelChange==="nodeDataArray"?Se.change===sa?E.add(Se.newValue):Se.change===La&&ne.add(Se.oldValue):x.lb(Se.object)?te.add(Se.object):Se.change!==zo||x.modelData!==Se.object&&Se.propertyName!=="modelData"?Se.object!==null&&(se&&se.contains(Se.object)?se.get(Se.object).each(function(Ne){x.lb(Ne)&&te.add(Ne)}):Se.object instanceof mr||x.ri()&&x.Jc(Se.object)||bS(x,Se.object).each(function(Ne){te.add(Ne)})):b=!0)});var he=this.il;he.clear(),E.each(function(Se){he.add(x.wa(Se)),y||te.add(Se)});var ge=this.kl;return ge.clear(),ne.each(function(Se){ge.add(x.wa(Se)),y&&te.add(Se)}),a="",b&&(a+=`,
"modelData": `+cy(this,this.modelData)),0<he.count&&(a+=(y?this.Yv:this.Wv)+id(this,he.Fa(),!0)),0<te.count&&(a+=this.jy+id(this,te.Fa(),!0)),0<ge.count&&(a+=(y?this.Wv:this.Yv)+id(this,ge.Fa(),!0)),ge.clear(),he.clear(),a},ot.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)&&Yt("applyIncrementalJson cannot change Model properties"),xS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new ur;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 se=this.hc(ne);se===null&&(se=(se=b.get(ne))?se:this.copyNodeData({}),this.km(se,ne),this.xf(se))}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 he in E)he==="__gohashid"||he===this.nodeKeyProperty||this.Wj()&&he===this.nodeIsGroupProperty||this.setDataProperty(te,he,E[he]);this.lm(E,te)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,he=0;he<x;he++)y=this.hc(a[he]),y!==null&&this.cm(y)},ot.$x=function(a,y){a.change!==il&&Yt("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof Za?(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 }'},ot.yA=function(a,y){return this.$x(a,y)},ot.np=function(a){return a===void 0&&(a=Ig(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},ot.toJSON=function(a){return this.np(a)},ot.Zw=function(a){var y=null;if(typeof a=="string")try{y=Gt.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:Yt("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&Yt("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},ot.Ky=function(a){return this.Zw(a)},mr.constructGraphLinksModel=function(){return new mr},ot=mr.prototype,ot.dm=function(a){if(Mn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if(rn(b)){var E=x;b=this.dm(b),Array.isArray(a)?a[E]=b:Yt("Cannot replace an object in an HTMLCollection or NodeList at "+E)}}else if(rn(a)){for(y in a)if(x=a[y],rn(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 Ln,b=0;b<x.length/2;b++)E.add(new It(x[2*b],x[2*b+1]));E.freeze(),a[y]=E}}return Ax(a)}return a},ot.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()):Mn(a)?id(this,a):rn(a)?cy(this,a):typeof a=="function"?"null":a.toString()};function id(a,y,x){x===void 0&&(x=!1);var b=y.length;if(0>=b)return"[]";var E=new br;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 PS(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function Zs(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function cy(a,y){var x=y;if(x instanceof It)y={class:"go.Point",x:Zs(x.x),y:Zs(x.y)};else if(x instanceof Zn)y={class:"go.Size",width:Zs(x.width),height:Zs(x.height)};else if(x instanceof wn)y={class:"go.Rect",x:Zs(x.x),y:Zs(x.y),width:Zs(x.width),height:Zs(x.height)};else if(x instanceof kr)y={class:"go.Margin",top:Zs(x.top),right:Zs(x.right),bottom:Zs(x.bottom),left:Zs(x.left)};else if(x instanceof yr)x.sb()?y={class:"go.Spot",x:Zs(x.x),y:Zs(x.y),offsetX:Zs(x.offsetX),offsetY:Zs(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof oo){if(y={class:"go.Brush",type:x.type.name},x.type===Ph?y.color=x.color:(x.type===th||x.type===lu)&&(y.start=x.start,y.end=x.end,x.type===lu&&(x.startRadius!==0&&(y.startRadius=Zs(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=Zs(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 Jn?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=Zs(x.startX)),x.startY!==0&&(y.startY=Zs(x.startY)),x.endX!==0&&(y.endX=Zs(x.endX)),x.endY!==0&&(y.endY=Zs(x.endY)),x.spot1.D(Ka)||(y.spot1=x.spot1),x.spot2.D(As)||(y.spot2=x.spot2),x.type===Jn.o&&(y.path=Jn.ia(x))):x instanceof tn&&(y={class:"go.EnumValue",classType:Ig(a,x.classType),name:x.name});b="{",x=!0;for(var E in y){var te=pa(y,E);if(!PS(E,te))if(x?x=!1:b+=",",b+=a.quote(E)+":",E==="points"&&te instanceof Ln){var ne="[";for(te=te.iterator;te.next();){var se=te.value;1<ne.length&&(ne+=","),ne+=a.sm(se.x),ne+=",",ne+=a.sm(se.y)}ne+="]",b+=ne}else b+=a.sm(te)}return b+"}"}function Xs(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function Ax(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 It(Xs(a.x),Xs(a.y));else if(y==="Size")x=new Zn(Xs(a.width),Xs(a.height));else if(y==="Rect")x=new wn(Xs(a.x),Xs(a.y),Xs(a.width),Xs(a.height));else if(y==="Margin")x=new kr(Xs(a.top),Xs(a.right),Xs(a.bottom),Xs(a.left));else if(y==="Spot")typeof a.enum=="string"?x=wd(a.enum):x=new yr(Xs(a.x),Xs(a.y),Xs(a.offsetX),Xs(a.offsetY));else if(y==="Brush"){if(x=new oo,x.type=lr(oo,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof yr&&(x.start=a.start),a.end instanceof yr&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=Xs(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=Xs(a.endRadius)),a=a.colorStops,rn(a))for(var b in a)x.addColorStop(parseFloat(b),a[b])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=Jn.parse(a.path):x=new Jn,x.type=lr(Jn,a.type),typeof a.startX=="number"&&(x.startX=Xs(a.startX)),typeof a.startY=="number"&&(x.startY=Xs(a.startY)),typeof a.endX=="number"&&(x.endX=Xs(a.endX)),typeof a.endY=="number"&&(x.endY=Xs(a.endY)),a.spot1 instanceof yr&&(x.spot1=a.spot1),a.spot2 instanceof yr&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=dy(b),typeof b=="function"&&(x=lr(b,a.name)));return x}ot.Pe=function(a){return this.Lt.add(a),this},ot.ik=function(a){this.Lt.remove(a)},ot.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)},ot.cb=function(a,y,x,b,E,te,ne){Ia(this,"",a,y,x,b,E,te,ne)},ot.g=function(a,y,x,b,E){Ia(this,"",zo,a,this,y,x,b,E)},ot.Fs=function(a,y,x,b,E,te){Ia(this,"",zo,y,a,x,b,E,te)};function Ia(a,y,x,b,E,te,ne,se,he){se===void 0&&(se=null),he===void 0&&(he=null);var ge=new _o;ge.model=a,ge.change=x,ge.modelChange=y,ge.propertyName=b,ge.object=E,ge.oldValue=te,ge.oldParam=se,ge.newValue=ne,ge.newParam=he,a.ds(ge)}mr.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===zo){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)),Ao(x,b,E)}else a.change===sa?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,rn(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]===a&&En(this.Tc,x),b!==void 0&&this.kb.remove(b)):(this.Tc[x]!==a&&gn(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!Mn(b)&&a.propertyName&&(b=pa(a.object,a.propertyName)),Mn(b)&&typeof x=="number"&&(a=a.newValue,y?En(b,x):gn(b,x,a))):Yt("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===La?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,rn(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&gn(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)):(this.Tc[x]===a&&En(this.Tc,x),b!==void 0&&this.kb.remove(b)))):a.modelChange===""?((b=a.object)&&!Mn(b)&&a.propertyName&&(b=pa(a.object,a.propertyName)),Mn(b)&&typeof x=="number"&&(a=a.oldValue,y?gn(b,x,a):En(b,x))):Yt("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==il&&Yt("unknown ChangedEvent: "+a.toString())},mr.prototype.Ea=function(a){return this.undoManager.Ea(a)},mr.prototype.eb=function(a){return this.undoManager.eb(a)},mr.prototype.Kf=function(){return this.undoManager.Kf()},mr.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}},ot=mr.prototype,ot.La=function(a,y){y===void 0&&(y=""),Ia(this,"SourceChanged",il,y,a,null,null)},ot.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=pa(a,y),y!==void 0)){if(od(y))return y;Yt("Key value for node data "+a+" is not a number or a string: "+y)}}},ot.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var b=pa(a,x);b!==y&&this.hc(y)===null&&(Ao(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),Ia(this,"nodeKey",zo,x,a,b,y),typeof x=="string"&&this.La(a,x),this.jp(b,y))}else Ao(a,x,y)}};function od(a){return typeof a=="number"||typeof a=="string"}ot.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},ot.hc=function(a){return a===null&&Yt("Model.findNodeDataForKey:key must not be null"),a!==void 0&&od(a)?this.kb.I(a):null},ot.$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))){Ao(a,y,x);return}if(typeof x=="string"){for(b=2;this.kb.contains(x+b);)b++;Ao(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;Ao(a,y,x)}}}}},ot.xf=function(a){a!==null&&(xo(a),this.lb(a)||CS(this,a,!0))};function CS(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&&Yt("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,gn(a.Tc,b,y)),Ia(a,"nodeDataArray",sa,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}ot.Fy=function(a){if(Mn(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)},ot.cm=function(a){a!==null&&ES(this,a,!0)};function ES(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;En(a.Tc,b)}Ia(a,"nodeDataArray",La,"nodeDataArray",a,y,null,b,null),a.qp(y)}ot.nA=function(a){if(Mn(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)},ot.$z=function(a){if(a!==this.nodeDataArray&&Mn(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 se=this.hc(ne);se!==te&&(se!==null?(this.Do(se,te),this.lm(te,se)):(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()}},ot.jp=function(a,y){y!==void 0&&(a=jg(this,a),a instanceof Nn&&this.Vf.add(y,a))},ot.Lv=function(){},ot.fm=function(){},ot.em=function(){},ot.qp=function(){};function Yu(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b===null&&(b=new Nn,a.Vf.add(y,b)),b.add(x)}}function Ju(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b instanceof Nn&&(x==null?a.Vf.remove(y):(b.remove(x),b.count===0&&a.Vf.remove(y)))}}function jg(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof Nn?a:null)}ot.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},mr.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):p0(this,a,!0),rn(a)&&gi(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 gi(b),b}if(x&&rn(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=pa(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 mr||te instanceof Uo||te instanceof Za||te instanceof _o||(te=p0(a,te,!1)),Ao(x,b,te)}return gi(x),x}return y instanceof It||y instanceof Zn||y instanceof wn||y instanceof yr||y instanceof kr?y.copy():y}mr.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!TS&&a instanceof Jt&&(TS=!0,or('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),or(" Is that really your intent?"));var b=pa(a,y);b!==x&&(Ao(a,y,x),this.Fs(a,y,b,x))},ot=mr.prototype,ot.set=function(a,y,x){this.setDataProperty(a,y,x)},ot.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])}},ot.Ay=function(a,y){this.ts(a,-1,y)},ot.ts=function(a,y,x){0>y&&(y=a.length),gn(a,y,x),Ia(this,"",sa,"",a,null,x,null,y)},ot.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&Yt("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];En(a,y),Ia(this,"",La,"",a,x,null,y,null)},ot.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=pa(a,y),y===void 0))return"";if(typeof y=="string")return y;Yt("getCategoryForNodeData found a non-string category for "+a+": "+y)},ot.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var b=pa(a,x);b===void 0&&(b=""),b!==y&&(Ao(a,x,y),Ia(this,"nodeCategory",zo,x,a,b,y))}else Ao(a,x,y)}},ot.lm=function(a,y){this.jm(y,this.Ro(a))},ot.Tl=function(){return!1},ot.Wj=function(){return!1},ot.ri=function(){return!1},ot.xs=function(){return!1},ot.Xj=function(){return!1};function hy(){return new mr}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 Au[a]?Au[a]:Gt.go!==void 0&&Gt.go[a]?Gt.go[a]:null}function pa(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 Ao(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){}}Ut.Object.defineProperties(mr.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===""&&Yt("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&Yt("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];rn(E)||Yt("Model.nodeDataArray must only contain Objects, not: "+E),xo(E)}for(this.Tc=a,b=new Ln,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(Ia(this,"nodeDataArray",zo,"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"}}}),mr.prototype.setCategoryForNodeData=mr.prototype.jm,mr.prototype.getCategoryForNodeData=mr.prototype.Ro,mr.prototype.removeArrayItem=mr.prototype.ov,mr.prototype.insertArrayItem=mr.prototype.ts,mr.prototype.addArrayItem=mr.prototype.Ay,mr.prototype.assignAllDataProperties=mr.prototype.Do,mr.prototype.set=mr.prototype.set,mr.prototype.clearUnresolvedReferences=mr.prototype.Qy,mr.prototype.mergeNodeDataArray=mr.prototype.$z,mr.prototype.removeNodeDataCollection=mr.prototype.nA,mr.prototype.removeNodeData=mr.prototype.cm,mr.prototype.addNodeDataCollection=mr.prototype.Fy,mr.prototype.addNodeData=mr.prototype.xf,mr.prototype.makeNodeDataKeyUnique=mr.prototype.$u,mr.prototype.findNodeDataForKey=mr.prototype.hc,mr.prototype.containsNodeData=mr.prototype.lb,mr.prototype.setKeyForNodeData=mr.prototype.km,mr.prototype.getKeyForNodeData=mr.prototype.wa,mr.prototype.updateTargetBindings=mr.prototype.La,mr.prototype.commit=mr.prototype.commit,mr.prototype.rollbackTransaction=mr.prototype.Kf,mr.prototype.commitTransaction=mr.prototype.eb,mr.prototype.startTransaction=mr.prototype.Ea,mr.prototype.raiseDataChanged=mr.prototype.Fs,mr.prototype.raiseChanged=mr.prototype.g,mr.prototype.raiseChangedEvent=mr.prototype.cb,mr.prototype.removeChangedListener=mr.prototype.ik,mr.prototype.addChangedListener=mr.prototype.Pe,mr.prototype.writeJsonValue=mr.prototype.sm,mr.prototype.replaceJsonObjects=mr.prototype.dm,mr.prototype.applyIncrementalJSON=mr.prototype.Ky,mr.prototype.applyIncrementalJson=mr.prototype.Zw,mr.prototype.toJSON=mr.prototype.toJSON,mr.prototype.toJson=mr.prototype.np,mr.prototype.toIncrementalJSON=mr.prototype.yA,mr.prototype.toIncrementalJson=mr.prototype.$x,mr.prototype.toIncrementalData=mr.prototype.xA,mr.prototype.clear=mr.prototype.clear;var TS=!1,Au={};mr.className="Model",mr.fromJSON=mr.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=Gt.JSON.parse(a)}catch(te){}else typeof a=="object"?x=a:Yt("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=Gt[b])),typeof E=="function"&&(a=new E)}catch(te){}a===null||a instanceof mr?y=a:Yt("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=mr.constructGraphLinksModel()),y.gp(x),y.kv(x),y},mr.safePropertyValue=pa,mr.safePropertySet=Ao,Au.Brush=oo,Au.ChangedEvent=_o,Au.Geometry=Jn,Au.Margin=kr,Au.Panel=Un,Au.Point=It,Au.Rect=wn,Au.Size=Zn,Au.Spot=yr,Au.Transaction=Za,Au.UndoManager=Uo;function xa(a,y,x,b){gi(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=LS,this.wk=null):(this.el=Dg,this.wk=b),this.st=new Nn}xa.prototype.copy=function(){var a=new xa;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},ot=xa.prototype,ot.qb=function(a){a.classType===xa&&(this.mode=a)},ot.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},ot.freeze=function(){return this._isFrozen=!0,this},ot.ka=function(){return this._isFrozen=!1,this},ot.Kx=function(a){return a===void 0&&(a=null),this.mode=Dg,this.backConverter=a,this},ot.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},ot.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function MS(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}ot.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==="")or("Binding error: target property is the empty string: "+this.toString());else{var te=y;if(b!==""&&(te=pa(y,b)),te!==void 0)if(E===null)x!==""&&Ao(a,x,te);else try{if(x!==""){var ne=E(te,a);Ao(a,x,ne)}else E(te,a)}catch(se){}}}},ot.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=pa(a,E)),ne!==void 0&&!this.st.contains(a))try{this.st.add(a);var se=b!==null?b.diagram:null,he=se!==null?se.model:null;if(te===null){if(x!=="")he!==null?he.setDataProperty(y,x,ne):Ao(y,x,ne);else if(he!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var ge=b.itemIndex,Se=b.panel.itemArray;he.ov(Se,ge),he.ts(Se,ge,ne)}}else try{if(x!==""){var Ne=te(ne,y,he);he!==null?he.setDataProperty(y,x,Ne):Ao(y,x,Ne)}else{var Ge=te(ne,y,he);if(Ge!==void 0&&he!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var Je=b.itemIndex,nt=b.panel.itemArray;he.ov(nt,Je),he.ts(nt,Je,Ge)}}}catch(ct){}}finally{this.st.remove(a)}}}},Ut.Object.defineProperties(xa.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&zn(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&zn(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&zn(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&zn(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&zn(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&zn(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&zn(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&zn(this),this.el=a}}}),xa.prototype.updateSource=xa.prototype.sp,xa.prototype.updateTarget=xa.prototype.Mv,xa.prototype.ofModel=xa.prototype.dA,xa.prototype.ofObject=xa.prototype.cp,xa.prototype.makeTwoWay=xa.prototype.Kx;var jx="Binding",LS=new tn(xa,"OneWay",1),Dg=new tn(xa,"TwoWay",2);xa.className="Binding",xa.parseEnum=function(a,y){return function(x){return x=lr(a,x),x===null?y:x}},xa.toString=$n,xa.OneWay=LS,xa.TwoWay=Dg;function Ii(a,y,x){mr.call(this),this.Vv=`,
"insertedLinkKeys": `,this.iy=`,
"modifiedLinkData": `,this.Xv=`,
"removedLinkKeys": `,this.md=[],this.$f=new Nn,this.wb=new ur,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&&(Mn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}un(Ii,mr),Ii.constructGraphLinksModel=mr.constructGraphLinksModel,Ii.prototype.cloneProtected=function(a){mr.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},ot=Ii.prototype,ot.clear=function(){mr.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},ot.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)+":"+$n(E)}for(y+=`
link data:`,a=this.linkDataArray,x=a.length,b=0;b<x;b++)E=a[b],y+=" "+Jl(this,E,!0)+"-->"+Jl(this,E,!1)}return y},ot.Qv=function(a,y){this.linkKeyProperty===""&&Yt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=mr.prototype.Qv.call(this,a,y),b=this,E=new Nn,te=new Nn,ne=new Nn,se=this.vh;a.changes.each(function(Se){Se.model===b&&(Se.modelChange==="linkDataArray"?Se.change===sa?E.add(Se.newValue):Se.change===La&&ne.add(Se.oldValue):b.Jc(Se.object)?te.add(Se.object):Se.object!==null&&(Se.object!==null&&se&&se.contains(Se.object)?se.get(Se.object).each(function(Ne){b.Jc(Ne)&&te.add(Ne)}):Se.object instanceof mr||b.lb(Se.object)||kS(b,Se.object).each(function(Ne){te.add(Ne)})))});var he=this.il;he.clear(),E.each(function(Se){he.add(b.Ac(Se)),y||te.add(Se)});var ge=this.kl;return ge.clear(),ne.each(function(Se){ge.add(b.Ac(Se)),y&&te.add(Se)}),a=b.cloneDeep(te.Fa()),0<he.count&&(x===null&&(x={}),y?x.removedLinkKeys=he.Fa():x.insertedLinkKeys=he.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<ge.count&&(x===null&&(x={}),y?x.insertedLinkKeys=ge.Fa():x.removedLinkKeys=ge.Fa()),ge.clear(),he.clear(),x},ot.rm=function(){var a=mr.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},ot.gp=function(a){mr.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)},ot.Rv=function(){var a=mr.prototype.Rv.call(this),y=`,
"linkDataArray": `+id(this,this.linkDataArray,!0);return a+y},ot.kv=function(a){mr.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function kS(a,y){for(var x=new Nn,b=0;b<a.linkDataArray.length;b++){var E=a.linkDataArray[b];f0(a,y,E,E,x)}return x}ot.Pv=function(a,y){this.linkKeyProperty===""&&Yt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=mr.prototype.Pv.call(this,a,y),b=this,E=new Nn,te=new Nn,ne=new Nn,se=this.vh;a.changes.each(function(Se){Se.model===b&&(Se.modelChange==="linkDataArray"?Se.change===sa?E.add(Se.newValue):Se.change===La&&ne.add(Se.oldValue):b.Jc(Se.object)?te.add(Se.object):Se.object!==null&&(Se.object!==null&&se&&se.contains(Se.object)?se.get(Se.object).each(function(Ne){b.Jc(Ne)&&te.add(Ne)}):Se.object instanceof mr||b.lb(Se.object)||kS(b,Se.object).each(function(Ne){te.add(Ne)})))});var he=this.il;he.clear(),E.each(function(Se){he.add(b.Ac(Se)),y||te.add(Se)});var ge=this.kl;return ge.clear(),ne.each(function(Se){ge.add(b.Ac(Se)),y&&te.add(Se)}),a=x,0<he.count&&(a+=(y?this.Xv:this.Vv)+id(this,he.Fa(),!0)),0<te.count&&(a+=this.iy+id(this,te.Fa(),!0)),0<ge.count&&(a+=(y?this.Vv:this.Xv)+id(this,ge.Fa(),!0)),ge.clear(),he.clear(),a},ot.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)&&Yt("applyIncrementalJson cannot change Model properties"),mr.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]);AS(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)},Ii.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===zo){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),Ao(x,b,E);return}}else if(a.change===sa){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,rn(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===La){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,rn(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}}mr.prototype.changeState.call(this,a,y)}},ot=Ii.prototype,ot.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),Ao(x,this.nodeKeyProperty,a),this.xf(x))}return a}},ot.yx=function(a){return Jl(this,a,!0)},ot.wv=function(a,y){Ep(this,a,y,!0)},ot.Bx=function(a){return Jl(this,a,!1)},ot.Bv=function(a,y){Ep(this,a,y,!1)};function Jl(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=pa(y,a),a!==void 0))){if(od(a))return a;Yt((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=pa(y,E);te!==x&&(Ju(a,te,y),Ao(y,E,x),a.hc(x)===null&&Yu(a,x,y),Ia(a,b?"linkFromKey":"linkToKey",zo,E,y,te,x),typeof E=="string"&&a.La(y,E))}else Ao(y,E,x)}}ot.zx=function(a){return g0(this,a,!0)},ot.xv=function(a,y){Tp(this,a,y,!0)},ot.Cx=function(a){return g0(this,a,!1)},ot.Cv=function(a,y){Tp(this,a,y,!1)};function g0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=pa(y,a),y===void 0?"":y)}function Tp(a,y,x,b){if(y!==null){var E=b?a.ej:a.fj;if(E!=="")if(a.Jc(y)){var te=pa(y,E);te===void 0&&(te=""),te!==x&&(Ao(y,E,x),Ia(a,b?"linkFromPortId":"linkToPortId",zo,E,y,te,x),typeof E=="string"&&a.La(y,E))}else Ao(y,E,x)}}ot.Ef=function(a){if(a===null)return m0;var y=this.je;return y===""?m0:(a=pa(a,y),a===void 0?m0:a)},ot.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var b=pa(a,x);if(b===void 0&&(b=m0),b!==y){if(Array.isArray(b))for(var E=b.length,te=0;te<E;te++)Ju(this,b[te],a);for(Ao(a,x,y),E=y.length,te=0;te<E;te++){var ne=y[te];this.hc(ne)===null&&Yu(this,ne,a)}Ia(this,"linkLabelKeys",zo,x,a,b,y),typeof x=="string"&&this.La(a,x)}}else Ao(a,x,y)}},ot.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=pa(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&&Yu(this,y,a),Ia(this,"linkLabelKeys",sa,x,a,null,y,null,E)))}else Yt(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},ot.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=pa(a,x);if(Array.isArray(b)){var E=b.indexOf(y);0>E||(b.splice(E,1),this.Jc(a)&&(Ju(this,y,a),Ia(this,"linkLabelKeys",La,x,a,y,null,E,null)))}else b!==void 0&&Yt(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},ot.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=pa(a,y),y!==void 0)){if(od(y))return y;Yt("Key value for link data "+a+" is not a number or a string: "+y)}}},ot.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var b=pa(a,x);b!==y&&this.jh(y)===null&&(Ao(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),Ia(this,"linkKey",zo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Ao(a,x,y)}},ot.jh=function(a){return a===null&&Yt("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&od(a)?this.wb.I(a):null},ot.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))){Ao(a,y,x);return}if(typeof x=="string"){for(b=2;this.wb.contains(x+b);)b++;Ao(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;Ao(a,y,x)}}}}},ot.Jc=function(a){return a===null?!1:this.$f.contains(a)},ot.fi=function(a){a!==null&&(xo(a),this.Jc(a)||OS(this,a,!0))};function OS(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&&Yt("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)),Ia(a,"linkDataArray",sa,"linkDataArray",a,null,y,null,b),fy(a,y)}ot.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)},ot.bm=function(a){a!==null&&NS(this,a,!0)};function NS(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(Ia(a,"linkDataArray",La,"linkDataArray",a,y,null,b,null),x=Jl(a,y,!0),Ju(a,x,y),x=Jl(a,y,!1),Ju(a,x,y),b=a.Ef(y),Array.isArray(b))for(var E=b.length,te=0;te<E;te++)x=b[te],Ju(a,x,y)}ot.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)},ot.Zz=function(a){if(this.linkKeyProperty===""&&Yt("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&Mn(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 se=this.jh(ne);se!==te&&(se!==null?(this.Do(se,te),AS(this,te,se)):(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=Jl(a,y,!0);x=a.Vl(x),a.hc(x)===null&&Yu(a,x,y),x=Jl(a,y,!1),x=a.Vl(x),a.hc(x)===null&&Yu(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&&Yu(a,x,y)}ot.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):p0(this,a,!0),rn(a)&&(gi(a),this.lf!==""&&Ao(a,this.lf,void 0),this.mf!==""&&Ao(a,this.mf,void 0),this.je!==""&&Ao(a,this.je,[])),a},ot.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!pa(a,y)},ot.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=pa(a,y),y!==void 0)){if(od(y))return y;Yt("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},ot.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var b=pa(a,x);b!==y&&(Ju(this,b,a),Ao(a,x,y),this.hc(y)===null&&Yu(this,y,a),Ia(this,"nodeGroupKey",zo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Ao(a,x,y)}},Ii.prototype.copyNodeData=function(a){return a===null?null:(a=mr.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||pa(a,this.Je)===void 0||Ao(a,this.Je,void 0),a)},Ii.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){Tp(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Tp(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=pa(a,y);b!==x&&(Ao(a,y,x),this.Fs(a,y,b,x))},ot=Ii.prototype,ot.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&&pa(a,E)===y[E]||b&&E===this.linkKeyProperty||this.setDataProperty(a,E,y[E])}},ot.jp=function(a,y){mr.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(Jl(this,b,!0)===E){var ne=this.lf;Ao(b,ne,te),Ia(this,"linkFromKey",zo,ne,b,E,te),typeof ne=="string"&&this.La(b,ne)}if(Jl(this,b,!1)===E&&(ne=this.mf,Ao(b,ne,te),Ia(this,"linkToKey",zo,ne,b,E,te),typeof ne=="string"&&this.La(b,ne)),ne=this.Ef(b),Array.isArray(ne))for(var se=ne.length,he=this.je,ge=0;ge<se;ge++)ne[ge]===E&&(ne[ge]=te,Ia(this,"linkLabelKeys",sa,he,b,E,te,ge,ge))}},ot.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;Ao(a,b,x),Ia(this,"nodeGroupKey",zo,b,a,y,x),typeof b=="string"&&this.La(a,b)}},ot.Lv=function(){mr.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)fy(this,a[x])},ot.fm=function(a){mr.prototype.fm.call(this,a),a=this.wa(a);var y=jg(this,a);if(y!==null){var x=pn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)){if(this.lh(b)===a){var E=this.Je;Ia(this,"nodeGroupKey",zo,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}else if(Jl(this,b,!0)===a&&(E=this.lf,Ia(this,"linkFromKey",zo,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),Jl(this,b,!1)===a&&(E=this.mf,Ia(this,"linkToKey",zo,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,se=0;se<te;se++)E[se]===a&&(Ia(this,"linkLabelKeys",sa,ne,b,a,a,se,se),x.push(b))}for(y=0;y<x.length;y++)Ju(this,a,x[y]);On(x)}},ot.em=function(a){mr.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&Yu(this,y,a)},ot.qp=function(a){mr.prototype.qp.call(this,a);var y=this.lh(a);Ju(this,y,a)},ot.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=pa(a,y),y===void 0))return"";if(typeof y=="string")return y;Yt("getCategoryForLinkData found a non-string category for "+a+": "+y)},Ii.prototype.getLinkCategoryForData=function(a){return this.ps(a)},Ii.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var b=pa(a,x);b===void 0&&(b=""),b!==y&&(Ao(a,x,y),Ia(this,"linkCategory",zo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Ao(a,x,y)}},Ii.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},ot=Ii.prototype,ot.lm=function(a,y){mr.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function AS(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))}ot.Wj=function(){return!0},ot.ri=function(){return!0},ot.xs=function(){return!0},ot.Xj=function(){return!0},Ut.Object.defineProperties(Ii.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];rn(E)||Yt("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),xo(E)}if(this.md=a,this.linkKeyProperty!==""){for(b=new Ln,E=0;E<x;E++){var te=a[E],ne=this.Ac(te);ne===void 0||this.wb.I(ne)!==null?b.add(te):this.wb.add(ne,te)}for(b=b.iterator;b.next();)E=b.value,this.Bs(E),te=this.Ac(E),te!==void 0&&this.wb.add(te,E)}for(b=new Nn,E=0;E<x;E++)b.add(a[E]);for(this.$f=b,Ia(this,"linkDataArray",zo,"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"}}}),Ii.prototype.setCategoryForLinkData=Ii.prototype.lp,Ii.prototype.getCategoryForLinkData=Ii.prototype.ps,Ii.prototype.assignAllDataProperties=Ii.prototype.Do,Ii.prototype.setGroupKeyForNodeData=Ii.prototype.mp,Ii.prototype.getGroupKeyForNodeData=Ii.prototype.lh,Ii.prototype.isGroupForNodeData=Ii.prototype.Yu,Ii.prototype.copyLinkData=Ii.prototype.Jo,Ii.prototype.mergeLinkDataArray=Ii.prototype.Zz,Ii.prototype.removeLinkDataCollection=Ii.prototype.lA,Ii.prototype.removeLinkData=Ii.prototype.bm,Ii.prototype.addLinkDataCollection=Ii.prototype.Ey,Ii.prototype.addLinkData=Ii.prototype.fi,Ii.prototype.containsLinkData=Ii.prototype.Jc,Ii.prototype.makeLinkDataKeyUnique=Ii.prototype.Bs,Ii.prototype.findLinkDataForKey=Ii.prototype.jh,Ii.prototype.setKeyForLinkData=Ii.prototype.Ks,Ii.prototype.getKeyForLinkData=Ii.prototype.Ac,Ii.prototype.removeLabelKeyForLinkData=Ii.prototype.Qx,Ii.prototype.addLabelKeyForLinkData=Ii.prototype.Bu,Ii.prototype.setLabelKeysForLinkData=Ii.prototype.Ls,Ii.prototype.getLabelKeysForLinkData=Ii.prototype.Ef,Ii.prototype.setToPortIdForLinkData=Ii.prototype.Cv,Ii.prototype.getToPortIdForLinkData=Ii.prototype.Cx,Ii.prototype.setFromPortIdForLinkData=Ii.prototype.xv,Ii.prototype.getFromPortIdForLinkData=Ii.prototype.zx,Ii.prototype.setToKeyForLinkData=Ii.prototype.Bv,Ii.prototype.getToKeyForLinkData=Ii.prototype.Bx,Ii.prototype.setFromKeyForLinkData=Ii.prototype.wv,Ii.prototype.getFromKeyForLinkData=Ii.prototype.yx,Ii.prototype.clear=Ii.prototype.clear;var m0=Object.freeze([]);Ii.className="GraphLinksModel",Au.GraphLinksModel=Ii,mr.constructGraphLinksModel=mr.constructGraphLinksModel=function(){return new Ii},mr.initDiagramModel=hy=function(){return new Ii};function Ys(a,y){mr.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(Mn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}un(Ys,mr),Ys.constructGraphLinksModel=mr.constructGraphLinksModel,Ys.prototype.cloneProtected=function(a){mr.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},ot=Ys.prototype,ot.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)+":"+$n(E)}}return y},ot.rm=function(){var a=mr.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},ot.gp=function(a){mr.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},ot.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&Yt("applyIncrementalJson cannot change Model properties"),mr.prototype.fp.call(this,a)},ot.Vl=function(a){return a},ot.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=pa(a,y),y!==void 0)){if(od(y))return y;Yt("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},ot.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=pa(a,x);b!==y&&(Ju(this,b,a),Ao(a,x,y),this.hc(y)===null&&Yu(this,y,a),Ia(this,"nodeParentKey",zo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Ao(a,x,y)}},ot.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=pa(a,y),y===void 0)?"":typeof y=="string"?y:(Yt("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},Ys.prototype.getLinkCategoryForData=function(a){return this.ss(a)},Ys.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var b=pa(a,x);b===void 0&&(b=""),b!==y&&(Ao(a,x,y),Ia(this,"parentLinkCategory",zo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Ao(a,x,y)}},Ys.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},Ys.prototype.copyNodeData=function(a){return a===null?null:(a=mr.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||pa(a,this.Ke)===void 0||Ao(a,this.Ke,void 0),a)},Ys.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=pa(a,y);b!==x&&(Ao(a,y,x),this.Fs(a,y,b,x))},ot=Ys.prototype,ot.jp=function(a,y){mr.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},ot.qv=function(a,y,x){if(this.mh(a)===y){var b=this.Ke;Ao(a,b,x),Ia(this,"nodeParentKey",zo,b,a,y,x),typeof b=="string"&&this.La(a,b)}},ot.fm=function(a){mr.prototype.fm.call(this,a),a=this.wa(a);var y=jg(this,a);if(y!==null){var x=pn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)&&this.mh(b)===a){var E=this.Ke;Ia(this,"nodeParentKey",zo,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}for(y=0;y<x.length;y++)Ju(this,a,x[y]);On(x)}},ot.em=function(a){mr.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&Yu(this,y,a)},ot.qp=function(a){mr.prototype.qp.call(this,a);var y=this.mh(a);Ju(this,y,a)},ot.lm=function(a,y){mr.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},ot.Tl=function(){return!0},ot.xs=function(){return!0},Ut.Object.defineProperties(Ys.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"}}}),Ys.prototype.setParentLinkCategoryForNodeData=Ys.prototype.Ms,Ys.prototype.getParentLinkCategoryForNodeData=Ys.prototype.ss,Ys.prototype.setParentKeyForNodeData=Ys.prototype.qe,Ys.prototype.getParentKeyForNodeData=Ys.prototype.mh,Ys.className="TreeModel",Au.TreeModel=Ys;function Xo(a){Ro.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=ju,this.Ti=0,this.Zv=new It,this.Jp=this.me=0,this.Xr=new _g,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=Js,this.nd=Lp,this.hd=oy,this.tf=6,this.Nn=P0,a&&Object.assign(this,a)}un(Xo,Ro),Xo.prototype.cloneProtected=function(a){Ro.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},Xo.prototype.qb=function(a){a.classType===Xo?a===w0||a===b0||a===S0||a===x0||a===Lp?this.sorting=a:a===Yd||a===Mp||a===Js||a===sd?this.direction=a:a===Nh||a===ad||a===ju||a===Iu?this.arrangement=a:(a===kf||a===P0)&&(this.nodeDiameterFormula=a):Ro.prototype.qb.call(this,a)},Xo.prototype.createNetwork=function(){return new kp(this)},Xo.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 Ln;y.addAll(a.iterator),a=new Ln;var x=new Ln,b=this.sort(y),E,te,ne=this.Jp,se=this.arrangement,he=this.nodeDiameterFormula,ge=this.radius;(!isFinite(ge)||0>=ge)&&(ge=NaN);var Se=this.aspectRatio;(!isFinite(Se)||0>=Se)&&(Se=1);var Ne=this.startAngle;isFinite(Ne)||(Ne=0);var Ge=this.sweepAngle;if((!isFinite(Ge)||360<Ge||1>Ge)&&(Ge=360),y=this.spacing,isFinite(y)||(y=NaN),se===Iu&&he===kf?se=ju:se===Iu&&he!==kf&&(se=this.arrangement),(this.direction===Yd||this.direction===Mp)&&this.sorting!==Lp){for(he=0;!(he>=b.length)&&(a.add(b.M(he)),!(he+1>=b.length));he+=2)x.add(b.M(he+1));this.direction===Yd?(this.arrangement===Iu&&a.reverse(),b=new Ln,b.addAll(a),b.addAll(x)):(this.arrangement===Iu&&x.reverse(),b=new Ln,b.addAll(x),b.addAll(a))}he=b.length;for(var Je=te=E=0;Je<b.length;Je++){var nt=Ne+Ge*te*(this.direction===Js?1:-1)/he,ct=b.M(Je).diameter;isNaN(ct)&&(ct=ld(b.M(Je),nt)),360>Ge&&(Je===0||Je===b.length-1)&&(ct/=2),E+=ct,te++}if(isNaN(ge)||se===Iu){if(isNaN(y)&&(y=6),se!==ju&&se!==Iu){for(te=-1/0,ne=0;ne<he;ne++)Je=b.M(ne),E=b.M(ne===he-1?0:ne+1),isNaN(Je.diameter)&&ld(Je,0),isNaN(E.diameter)&&ld(E,0),te=Math.max(te,(Je.diameter+E.diameter)/2);ne=te+y,se===Nh?ge=(te+y)/(2*Math.PI/he):ge=v0(this,ne*(360<=Ge?he:he-1),Se,Ne*Math.PI/180,Ge*Math.PI/180)}else ge=v0(this,E+(360<=Ge?he:he-1)*(se!==Iu?y:1.6*y),Se,Ne*Math.PI/180,Ge*Math.PI/180);te=ge*Se}else if(te=ge*Se,Je=py(this,ge,te,Ne*Math.PI/180,Ge*Math.PI/180),isNaN(y))(se===ju||se===Iu)&&(y=(Je-E)/(360<=Ge?he:he-1));else if(se===ju||se===Iu)Je=(Je-E)/(360<=Ge?he:he-1),Je<y?(ge=v0(this,E+y*(360<=Ge?he:he-1),Se,Ne*Math.PI/180,Ge*Math.PI/180),te=ge*Se):y=Je;else{for(ne=-1/0,E=0;E<he;E++)nt=b.M(E),ct=b.M(E===he-1?0:E+1),isNaN(nt.diameter)&&ld(nt,0),isNaN(ct.diameter)&&ld(ct,0),ne=Math.max(ne,(nt.diameter+ct.diameter)/2);ne+=y,E=v0(this,ne*(360<=Ge?he:he-1),Se,Ne*Math.PI/180,Ge*Math.PI/180),E>ge?(ge=E,te=ge*Se):ne=Je/(360<=Ge?he:he-1)}if(this.kw=se,this.lc=ge,this.Zm=Se,this.lw=Ne,this.Wp=Ge,this.Ti=y,this.me=te,this.Jp=ne,y=b,b=this.kw,se=this.lc,ge=this.lw,Se=this.Wp,Ne=this.Ti,Ge=this.me,he=this.Jp,this.direction!==Yd&&this.direction!==Mp||b!==Iu)if(this.direction===Yd||this.direction===Mp){switch(ne=0,b){case ad:ne=180*y0(this,se,Ge,ge,he)/Math.PI;break;case ju:he=y=0,ne=a.first(),ne!==null&&(y=ld(ne,Math.PI/2)),ne=x.first(),ne!==null&&(he=ld(ne,Math.PI/2)),ne=180*y0(this,se,Ge,ge,Ne+(y+he)/2)/Math.PI;break;case Nh:ne=Se/y.length}if(this.direction===Yd){switch(b){case ad:Rg(this,a,ge,sd);break;case ju:Bg(this,a,ge,sd);break;case Nh:Fg(this,a,Se/2,ge,sd)}switch(b){case ad:Rg(this,x,ge+ne,Js);break;case ju:Bg(this,x,ge+ne,Js);break;case Nh:Fg(this,x,Se/2,ge+ne,Js)}}else{switch(b){case ad:Rg(this,x,ge,sd);break;case ju:Bg(this,x,ge,sd);break;case Nh:Fg(this,x,Se/2,ge,sd)}switch(b){case ad:Rg(this,a,ge+ne,Js);break;case ju:Bg(this,a,ge+ne,Js);break;case Nh:Fg(this,a,Se/2,ge+ne,Js)}}}else switch(b){case ad:Rg(this,y,ge,this.direction);break;case ju:Bg(this,y,ge,this.direction);break;case Nh:Fg(this,y,Se,ge,this.direction);break;case Iu:jS(this,y,Se,ge,this.direction)}else jS(this,y,Se,ge-Se/2,Js)}this.updateParts(),this.network=null,this.isValidLayout=!0};function Fg(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 se=y.length,he=0;he<se;he++){var ge=b+(E===Js?he*x/(360<=te?se:se-1):-(he*x)/se),Se=y.M(he),Ne=ne*Math.tan(ge)/a;Ne=Math.sqrt((ne*ne+a*a*Ne*Ne)/(1+Ne*Ne)),Se.centerX=Ne*Math.cos(ge),Se.centerY=Ne*Math.sin(ge),Se.actualAngle=180*ge/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 se=y.length,he=0;he<se;he++){var ge=y.M(he),Se=y.M(he===se-1?0:he+1),Ne=te*Math.sin(x);ge.centerX=E*Math.cos(x),ge.centerY=Ne,ge.actualAngle=180*x/Math.PI,isNaN(ge.diameter)&&ld(ge,0),isNaN(Se.diameter)&&ld(Se,0),ge=y0(a,E,te,b===Js?x:-x,(ge.diameter+Se.diameter)/2+ne),x+=b===Js?ge:-ge}}function Rg(a,y,x,b){var E=a.lc,te=a.me,ne=a.Jp;x=x*Math.PI/180;for(var se=y.length,he=0;he<se;he++){var ge=y.M(he);ge.centerX=E*Math.cos(x),ge.centerY=te*Math.sin(x),ge.actualAngle=180*x/Math.PI,ge=y0(a,E,te,b===Js?x:-x,ne),x+=b===Js?ge:-ge}}function jS(a,y,x,b,E){var te=a.Wp;if(a.mj=0,a.Xr=new _g,360>x){for(te=b+(E===Js?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,se=a.Zm,he=te*Math.cos(b*Math.PI/180),ge=a.me*Math.sin(b*Math.PI/180),Se=y.Fa();if(Se.length===3)Se[0].centerX=te,Se[0].centerY=0,Se[1].centerX=Se[0].centerX-Se[0].width/2-Se[1].width/2-ne,Se[1].y=Se[0].y,Se[2].centerX=(Se[0].centerX+Se[1].centerX)/2,Se[2].y=Se[0].y-Se[2].height-ne;else if(Se.length===4)Se[0].centerX=te,Se[0].centerY=0,Se[2].centerX=-Se[0].centerX,Se[2].centerY=Se[0].centerY,Se[1].centerX=0,Se[1].y=Math.min(Se[0].y,Se[2].y)-Se[1].height-ne,Se[3].centerX=0,Se[3].y=Math.max(Se[0].y+Se[0].height+ne,Se[2].y+Se[2].height+ne);else{te=It.alloc();for(var Ne=0;Ne<Se.length&&(Se[Ne].centerX=he,Se[Ne].centerY=ge,!(Ne>=Se.length-1));Ne++)FS(a,he,ge,Se,Ne,E,te)||BS(a,he,ge,Se,Ne,E,te),he=te.x,ge=te.y;if(It.free(te),a.mj++,!(23<a.mj)){he=Se[0].centerX,ge=Se[0].centerY,te=Se[Se.length-1].centerX,Ne=Se[Se.length-1].centerY;var Ge=Math.abs(he-te)-((Se[0].width+Se[Se.length-1].width)/2+ne),Je=Math.abs(ge-Ne)-((Se[0].height+Se[Se.length-1].height)/2+ne);ne=0,1>Math.abs(Je)?Math.abs(he-te)<(Se[0].width+Se[Se.length-1].width)/2&&(ne=0):ne=0<Je?Je:1>Math.abs(Ge)?0:Ge,he=Math.abs(te)>Math.abs(Ne)?0<te!=ge>Ne:0<Ne!=he<te,(he=E===Js?he:!he)&&(ne=-Math.abs(ne),ne=Math.min(ne,-Se[Se.length-1].width),ne=Math.min(ne,-Se[Se.length-1].height)),a.Xr.compare(ne,Se),1<Math.abs(ne)&&(a.lc=8>a.mj?a.lc-ne/(2*Math.PI):5>Se.length&&10<ne?a.lc/2:a.lc-(0<ne?1.7:-2.3),a.me=a.lc*se,IS(a,y,x,b,E))}}}function DS(a,y,x,b,E){for(var te=a.lc,ne=a.me,se=a.Zm,he=te*Math.cos(b*Math.PI/180),ge=ne*Math.sin(b*Math.PI/180),Se=It.alloc(),Ne=y.Fa(),Ge=0;Ge<Ne.length&&(Ne[Ge].centerX=he,Ne[Ge].centerY=ge,!(Ge>=Ne.length-1));Ge++)FS(a,he,ge,Ne,Ge,E,Se)||BS(a,he,ge,Ne,Ge,E,Se),he=Se.x,ge=Se.y;if(It.free(Se),a.mj++,!(23<a.mj)){if(he=Math.atan2(ge,he),he=E===Js?a.gt-he:he-a.gt,he=Math.abs(he)<Math.abs(he-2*Math.PI)?he:he-2*Math.PI,te=he*(te+ne)/2,ne=a.Xr,Math.abs(te)<Math.abs(ne.Pl))for(ne.Pl=te,ne.mk=[],ne.tm=[],he=0;he<Ne.length;he++)ne.mk[he]=Ne[he].bounds.x,ne.tm[he]=Ne[he].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*se,DS(a,y,x,b,E))}}function FS(a,y,x,b,E,te,ne){var se=a.lc,he=a.me,ge=0;a=(b[E].width+b[E+1].width)/2+a.Ti;var Se=!1;if(0<=x!=(te===Js)){if(te=y+a,te>se){if(te=y-a,te<-se)return ne.x=te,ne.y=ge,!1;Se=!0}}else if(te=y-a,te<-se){if(te=y+a,te>se)return ne.x=te,ne.y=ge,!1;Se=!0}return ge=Math.sqrt(1-Math.min(1,te*te/(se*se)))*he,0>x!==Se&&(ge=-ge),Math.abs(x-ge)>(b[E].height+b[E+1].height)/2?(ne.x=te,ne.y=ge,!1):(ne.x=te,ne.y=ge,!0)}function BS(a,y,x,b,E,te,ne){var se=a.lc,he=a.me,ge=0;if(a=(b[E].height+b[E+1].height)/2+a.Ti,b=!1,0<=y!=(te===Js)){if(te=x-a,te<-he){if(te=x+a,te>he){ne.x=ge,ne.y=te;return}b=!0}}else if(te=x+a,te>he){if(te=x-a,te<-he){ne.x=ge,ne.y=te;return}b=!0}ge=Math.sqrt(1-Math.min(1,te*te/(he*he)))*se,0>y!==b&&(ge=-ge),ne.x=ge,ne.y=te}Xo.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},Xo.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 It(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))},Xo.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,se=b!==void 0&&E!==void 0?E/(te+1):Math.PI/(2*(te+1)),he=0,ge=0;ge<=te;ge++){b!==void 0&&E!==void 0?he=b+ge*E/te:he=ge*Math.PI/(2*te);var Se=Math.sin(he);ne+=Math.sqrt(1-a*a*Se*Se)*se}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 se=0;;se++){var he=Math.sin(b+se*a);if(ne+=(y>x?y:x)*Math.sqrt(1-te*te*he*he)*a,ne>=E)return se*a}}Xo.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 Lp:return this.ak(Ix(a));default:Yt("Invalid sorting type.")}return a};function Ix(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new Ln;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 se=a.M(ne).edgesCount;se>E&&(E=se,te=ne)}else for(ne=0;ne<a.length;ne++)se=y[ne],se>E&&(E=se,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}Xo.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=[],se=[];b=[],E=new Ln;for(var he=0,ge=0;ge<y.length;ge++){var Se=y[ge].length;if(Se===1)b.push(ge);else if(Se===0)E.add(a.M(ge));else{if(he===0)x.push(ge);else{for(var Ne=Se=1/0,Ge=-1,Je=[],nt=0;nt<x.length;nt++)0>y[x[nt]].indexOf(x[nt===x.length-1?0:nt+1])&&Je.push(nt===x.length-1?0:nt+1);if(Je.length===0)for(nt=0;nt<x.length;nt++)Je.push(nt);for(nt=0;nt<Je.length;nt++){for(var ct=Je[nt],Ft=y[ge],Ot=0,zt=0;zt<ne.length;zt++){var Ht=te[ne[zt]],Wt=te[se[zt]];if(Ht<Wt){var Xt=Ht;Ht=Wt}else Xt=Wt;if(Xt<ct&&ct<=Ht)for(Wt=0;Wt<Ft.length;Wt++){var hn=Ft[Wt];0>x.indexOf(hn)||Xt<te[hn]&&te[hn]<Ht||Xt===te[hn]||Ht===te[hn]||Ot++}else for(Wt=0;Wt<Ft.length;Wt++)hn=Ft[Wt],0>x.indexOf(hn)||Xt<te[hn]&&te[hn]<Ht&&Xt!==te[hn]&&Ht!==te[hn]&&Ot++}for(Ft=Ot,zt=Ot=0;zt<y[ge].length;zt++)Xt=x.indexOf(y[ge][zt]),0<=Xt&&(Xt=Math.abs(ct-(Xt>=ct?Xt+1:Xt)),Ot+=Xt<x.length+1-Xt?Xt:x.length+1-Xt);for(zt=0;zt<ne.length;zt++)Xt=te[ne[zt]],Ht=te[se[zt]],Xt>=ct&&Xt++,Ht>=ct&&Ht++,Xt>Ht&&(Wt=Ht,Ht=Xt,Xt=Wt),Ht-Xt<(x.length+2)/2==(Xt<ct&&ct<=Ht)&&Ot++;(Ft<Se||Ft===Se&&Ot<Ne)&&(Se=Ft,Ne=Ot,Ge=ct)}for(x.splice(Ge,0,ge),Se=0;Se<x.length;Se++)te[x[Se]]=Se;for(Se=0;Se<y[ge].length;Se++)Ne=y[ge][Se],0<=x.indexOf(Ne)&&(ne.push(ge),se.push(Ne))}he++}}for(ne=x.length;;){for(te=!0,se=0;se<b.length;se++)if(he=b[se],ge=y[he][0],Se=x.indexOf(ge),0<=Se){for(Ge=Ne=0;Ge<y[ge].length;Ge++)Je=x.indexOf(y[ge][Ge]),0>Je||Je===Se||(nt=Je>Se?Je-Se:Se-Je,Ne+=Je<Se!=nt>ne-nt?1:-1);x.splice(0>Ne?Se:Se+1,0,he),b.splice(se,1),se--}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},Ut.Object.defineProperties(Xo.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!==Iu&&a!==ju&&a!==ad&&a!==Nh||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==Js&&a!==sd&&a!==Yd&&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!==Lp||(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!==P0&&a!==kf||(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 tn(Xo,"ConstantSpacing",0),ad=new tn(Xo,"ConstantDistance",1),Nh=new tn(Xo,"ConstantAngle",2),Iu=new tn(Xo,"Packed",3),Js=new tn(Xo,"Clockwise",4),sd=new tn(Xo,"Counterclockwise",5),Yd=new tn(Xo,"BidirectionalLeft",6),Mp=new tn(Xo,"BidirectionalRight",7),S0=new tn(Xo,"Forwards",8),x0=new tn(Xo,"Reverse",9),w0=new tn(Xo,"Ascending",10),b0=new tn(Xo,"Descending",11),Lp=new tn(Xo,"Optimized",12),P0=new tn(Xo,"Pythagorean",13),kf=new tn(Xo,"Circular",14);Xo.className="CircularLayout",Xo.ConstantSpacing=ju,Xo.ConstantDistance=ad,Xo.ConstantAngle=Nh,Xo.Packed=Iu,Xo.Clockwise=Js,Xo.Counterclockwise=sd,Xo.BidirectionalLeft=Yd,Xo.BidirectionalRight=Mp,Xo.Forwards=S0,Xo.Reverse=x0,Xo.Ascending=w0,Xo.Descending=b0,Xo.Optimized=Lp,Xo.Pythagorean=P0,Xo.Circular=kf;function _g(){this.Pl=-1/0,this.tm=this.mk=null}_g.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},_g.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]}},_g.className="VertexArrangement";function kp(a){Eo.call(this,a)}un(kp,Eo),kp.prototype.createVertex=function(){return new zg(this)},kp.prototype.createEdge=function(){return new C0(this)},kp.className="CircularNetwork";function zg(a){Ua.call(this,a),this.u=this.Si=NaN}un(zg,Ua);function ld(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===Iu)if(x.nodeDiameterFormula===kf)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===kf?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}Ut.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 C0(a){kl.call(this,a)}un(C0,kl),C0.className="CircularEdge";function xs(a){Ro.call(this),this.ah=null,this.An=0,this.$d=new Zn(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)}un(xs,Ro),xs.prototype.cloneProtected=function(a){Ro.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},xs.prototype.createNetwork=function(){return new Of(this)},xs.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}RS(this,0,a)}this.network=y;var ne=b=x.iterator;b=this.arrangementSpacing;var se=ne.count,he=!0;te=E=0;for(var ge=pn(),Se=0;Se<se+y.vertexes.count+2;Se++)ge[Se]=null;se=0,ne.reset();for(var Ne=wn.alloc();ne.next();)if(Se=ne.value,this.computeBounds(Se,Ne),he)he=!1,E=Ne.x+Ne.width/2,te=Ne.y+Ne.height/2,ge[0]=new It(Ne.x+Ne.width+b.width,Ne.y),ge[1]=new It(Ne.x,Ne.y+Ne.height+b.height),se=2;else{var Ge=_S(ge,se,E,te,Ne.width,Ne.height,b),Je=ge[Ge],nt=new It(Je.x+Ne.width+b.width,Je.y),ct=new It(Je.x,Je.y+Ne.height+b.height);for(Ge+1<se&&ge.splice(Ge+1,0,null),ge[Ge]=nt,ge[Ge+1]=ct,se++,Ge=Je.x-Ne.x,Je=Je.y-Ne.y,Se=Se.vertexes.iterator;Se.next();)nt=Se.value,nt.centerX+=Ge,nt.centerY+=Je}for(wn.free(Ne),Se=y.vertexes.iterator;Se.next();)ne=Se.value,Ge=ne.bounds,2>se?(E=Ge.x+Ge.width/2,te=Ge.y+Ge.height/2,ge[0]=new It(Ge.x+Ge.width+b.width,Ge.y),ge[1]=new It(Ge.x,Ge.y+Ge.height+b.height),se=2):(he=_S(ge,se,E,te,Ge.width,Ge.height,b),Ne=ge[he],Je=new It(Ne.x+Ge.width+b.width,Ne.y),Ge=new It(Ne.x,Ne.y+Ge.height+b.height),he+1<se&&ge.splice(he+1,0,null),ge[he]=Je,ge[he+1]=Ge,se++,ne.centerX=Ne.x+ne.width/2,ne.centerY=Ne.y+ne.height/2);for(On(ge),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)}}$S(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},xs.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},xs.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 RS(a,y,x){if(Dx(a,y)){var b=a.Zf;a.Zf*=1+1/(y+1);var E=Fx(a,y),te=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=te,RS(a,y+1,x),$S(a,te),Bx(a,E),y=E.vertexes.Fa(),y.sort(function(ne,se){return ne===null||se===null||ne===se?0:se.Vd-ne.Vd}),x=0;x<y.length;x++)Rx(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 Fx(a,y){for(var x=a.network,b=new Of(a),E=0;E<a.ah.length;E++){var te=a.ah[E];if(1<te.Vd){b.dh(te);var ne=new GS;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 Ln),te.We.add(ne),te.sv=te.We.count-1}else break}for(te=x.edges.iterator;te.next();){var se=te.value;E=se.fromVertex,ne=se.toVertex,E.network===b&&ne.network===b?b.Bo(se):E.network===b?(se=E.Hj,se===null&&(se=new Ln,E.Hj=se),se.add(ne),E.Vd--,E.sh+=ne.sh):ne.network===b&&(se=ne.Hj,se===null&&(se=new Ln,ne.Hj=se),se.add(E),ne.Vd--,ne.sh+=E.sh)}for(E=b.edges.iterator;E.next();)te=E.value,te.length*=Math.max(1,qt.sqrt((te.fromVertex.sh+te.toVertex.sh)/(4*y+1)));for(y=b.vertexes.iterator;y.next();){E=y.value;var he=E.Hj;if(he!==null&&0<he.count&&(ne=E.We.M(E.We.count-1).Rs-E.Vd,!(0>=ne))){for(var ge=se=0,Se=he.count-ne;Se<he.count;Se++){var Ne=he.M(Se),Ge=null;for(te=Ne.edges.iterator;te.next();){var Je=te.value;if(Je.Ax(Ne)===E){Ge=Je;break}}Ge!==null&&(ge+=Ge.length,se+=Ne.width*Ne.height)}te=E.centerX,he=E.centerY,Se=E.width,Ne=E.height,Ge=E.focus,Je=Se*Ne,1>Je&&(Je=1),se=qt.sqrt((se+Je+ge*ge*4/(ne*ne))/Je),ne=(se-1)*Se/2,se=(se-1)*Ne/2,E.bounds=new wn(te-Ge.x-ne,he-Ge.y-se,Se+2*ne,Ne+2*se),E.focus=new It(Ge.x+ne,Ge.y+se)}}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 wn(b.centerX-te,b.centerY-ne,E.Ss,E.Qs),b.focus=new It(te,ne),b.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function Rx(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=qt.sqrt(te*te+ne*ne)/2;for(var se=!1,he=ne=0,ge=0,Se=y.vertexes.iterator;Se.next();){var Ne=Se.value;1>=Ne.Vd?he++:(se=!0,ge++,ne+=Math.atan2(y.centerY-Ne.centerY,y.centerX-Ne.centerX))}if(he!==0){for(0<ge&&(ne/=ge),ge=y=0,y=se?2*Math.PI/(he+1):2*Math.PI/he,he%2===0&&(ge=y/2),1<x.count&&x.sort(function(Je,nt){return Je===null||nt===null||Je===nt?0:nt.width*nt.height-Je.width*Je.height}),se=he%2===0?0:1,x=x.iterator;x.next();)if(he=x.value,!(1<he.Vd||a.isFixed(he))){for(Se=null,Ne=he.edges.iterator;Ne.next();){Se=Ne.value;break}Ne=he.width;var Ge=he.height;Ne=qt.sqrt(Ne*Ne+Ge*Ge)/2,Se=te+Se.length+Ne,Ne=ne+(y*(se/2>>1)+ge)*(se%2===0?1:-1),he.centerX=b+Se*Math.cos(Ne),he.centerY=E+Se*Math.sin(Ne),se++}}}}function _S(a,y,x,b,E,te,ne){var se=9e19,he=-1,ge=0;e:for(;ge<y;ge++){var Se=a[ge],Ne=Se.x-x,Ge=Se.y-b;if(Ne=Ne*Ne+Ge*Ge,Ne<se){for(Ge=ge-1;0<=Ge;Ge--)if(a[Ge].y>Se.y&&a[Ge].x-Se.x<E+ne.width)continue e;for(Ge=ge+1;Ge<y;Ge++)if(a[Ge].x>Se.x&&a[Ge].y-Se.y<te+ne.height)continue e;he=ge,se=Ne}}return he}xs.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},xs.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 se=te.width;return te=te.height,b+E<ne?a>y+te?(x=b+E-ne,a=a-y-te,qt.sqrt(x*x+a*a)):a+x<y?(b=b+E-ne,a=a+x-y,qt.sqrt(b*b+a*a)):ne-(b+E):b>ne+se?a>y+te?(x=b-ne-se,a=a-y-te,qt.sqrt(x*x+a*a)):a+x<y?(b=b-ne-se,a=a+x-y,qt.sqrt(b*b+a*a)):b-(ne+se):a>y+te?a-(y+te):a+x<y?y-(a+x):.1}function $S(a,y){for(a.ah=null,y=a.An+y;a.An<y&&(a.An++,_x(a)););a.ah=null}function _x(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 se=y[ne];se.forceX=0,se.forceY=0;var he=se.centerX;se=se.centerY,b=Math.min(b,he),E=Math.max(E,he),x=Math.min(x,se),te=Math.max(te,se)}(E=E-b>te-x)?y.sort(function(ct,Ft){return ct===null||Ft===null||ct===Ft?0:ct.centerX-Ft.centerX}):y.sort(function(ct,Ft){return ct===null||Ft===null||ct===Ft?0:ct.centerY-Ft.centerY}),x=a.Zf;var ge=b=se=0;for(te=0;te<y.length;te++){ne=y[te],b=ne.bounds,se=ne.focus,he=b.x+se.x;var Se=b.y+se.y;b=ne.charge*a.electricalFieldX(he,Se),ge=ne.charge*a.electricalFieldY(he,Se),b+=ne.mass*a.gravitationalFieldX(he,Se),ge+=ne.mass*a.gravitationalFieldY(he,Se),ne.forceX+=b,ne.forceY+=ge;for(var Ne=te+1;Ne<y.length;Ne++){var Ge=y[Ne];if(Ge!==ne){b=Ge.bounds,se=Ge.focus,ge=b.x+se.x;var Je=b.y+se.y;if(he-ge>x||ge-he>x){if(E)break}else if(Se-Je>x||Je-Se>x){if(!E)break}else{var nt=zS(ne,Ge);1>nt?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new E0),nt=b.random(),se=b.random(),he>ge?(b=Math.abs(Ge.bounds.right-ne.bounds.x),b=(1+b)*nt):he<ge?(b=Math.abs(Ge.bounds.x-ne.bounds.right),b=-(1+b)*nt):(b=Math.max(Ge.width,ne.width),b=(1+b)*nt-b/2),Se>Je?(ge=Math.abs(Ge.bounds.bottom-ne.bounds.y),ge=(1+ge)*se):he<ge?(ge=Math.abs(Ge.bounds.y-ne.bounds.bottom),ge=-(1+ge)*se):(ge=Math.max(Ge.height,ne.height),ge=(1+ge)*se-ge/2)):(se=-(ne.charge*Ge.charge)/(nt*nt),b=(ge-he)/nt*se,ge=(Je-Se)/nt*se),ne.forceX+=b,ne.forceY+=ge,Ge.forceX-=b,Ge.forceY-=ge}}}}for(E=a.network.edges.iterator;E.next();)se=E.value,x=se.fromVertex,te=se.toVertex,ne=x.bounds,he=x.focus,b=ne.x+he.x,ne=ne.y+he.y,Se=te.bounds,Ne=te.focus,he=Se.x+Ne.x,Se=Se.y+Ne.y,Ne=zS(x,te),1>Ne?(Ne=a.randomNumberGenerator,Ne===null&&(a.randomNumberGenerator=Ne=new E0),se=Ne.random(),Ne=Ne.random(),b=(b>he?1:-1)*(1+(te.width>x.width?te.width:x.width))*se,ge=(ne>Se?1:-1)*(1+(te.height>x.height?te.height:x.height))*Ne):(se=se.stiffness*(Ne-se.length),b=(he-b)/Ne*se,ge=(Se-ne)/Ne*se),x.forceX+=b,x.forceY+=ge,te.forceX-=b,te.forceY-=ge;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}xs.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},xs.prototype.moveFixedVertex=function(){},xs.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},xs.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=ro,y.toSpot=ro)}},xs.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=wn.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,wn.free(x)}x=wn.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()}wn.free(x)},xs.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},xs.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},xs.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},xs.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},xs.prototype.electricalFieldX=function(){return 0},xs.prototype.electricalFieldY=function(){return 0},xs.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},xs.prototype.gravitationalFieldX=function(){return 0},xs.prototype.gravitationalFieldY=function(){return 0},xs.prototype.isFixed=function(a){return a.isFixed},Ut.Object.defineProperties(xs.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"&&Yt('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())}}}),xs.className="ForceDirectedLayout";function GS(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}GS.className="ForceDirectedSubnet";function Of(a){Eo.call(this,a)}un(Of,Eo),Of.prototype.createVertex=function(){return new $g(this)},Of.prototype.createEdge=function(){return new Gg(this)},Of.className="ForceDirectedNetwork";function $g(a){Ua.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}un($g,Ua),Ut.Object.defineProperties($g.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)}}}),$g.className="ForceDirectedVertex";function Gg(a){kl.call(this,a),this.j=this.o=NaN}un(Gg,kl),Ut.Object.defineProperties(Gg.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)}}}),Gg.className="ForceDirectedEdge";function E0(){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()}E0.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},E0.className="RandomNumberGenerator";function lo(a){Ro.call(this),this.kc=this.ie=25,this.K=0,this.Dk=O0,this.Zk=N0,this.Qk=A0,this.bj=4,this.rk=j0,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 It,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}un(lo,Ro),lo.prototype.cloneProtected=function(a){Ro.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},lo.prototype.qb=function(a){a.classType===lo?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:Yt("Unknown enum value: "+a):Ro.prototype.qb.call(this,a)},lo.prototype.createNetwork=function(){return new Np(this)},lo.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!==Ug&&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===Ug&&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,se=0,he=0,ge=0;if(b.link!==null){if(se=b.link,se===null)continue;var Se=E.node;if(ne=te.node,Se===null||ne===null)continue;var Ne=se.fromNode;he=se.toNode;for(var Ge=se.fromPort;Ge!==null&&!Ge.Ed();)Ge=Ge.panel;for(se=se.toPort;se!==null&&!se.Ed();)se=se.panel;if(b.rev){ge=Ne;var Je=Ge;Ne=he,Ge=se,he=ge,se=Je}var nt=E.focus;ge=te.focus;var ct=b.rev?te.bounds:E.bounds;Je=It.alloc(),Se!==Ne?ct.w()&&Ne.isVisible()?Ne.actualBounds.w()?(Th(Ne,Ge,Di,Je),Je.x+=Ne.actualBounds.x-ct.x,Je.y+=Ne.actualBounds.y-ct.y):(Th(Ne,Ge,Di,Je),Je.w()||Je.assign(nt)):Je.assign(nt):ct.w()?(Th(Ne,Ge,Di,Je),Je.w()||Je.assign(nt)):Je.assign(nt),Ne=b.rev?E.bounds:te.bounds,Se=It.alloc(),ne!==he?Ne.w()&&he.isVisible()?he.actualBounds.w()?(Th(he,se,Di,Se),Se.x+=he.actualBounds.x-Ne.x,Se.y+=he.actualBounds.y-Ne.y):(Th(he,se,Di,Se),Se.w()||Se.assign(ge)):Se.assign(ge):Ne.w()?(Th(he,se,Di,Se),Se.w()||Se.assign(ge)):Se.assign(ge),this.K===90||this.K===270?(ne=Math.round((Je.x-nt.x)/this.kc),he=Je.x,se=Math.round((Se.x-ge.x)/this.kc),ge=Se.x):(ne=Math.round((Je.y-nt.y)/this.kc),he=Je.y,se=Math.round((Se.y-ge.y)/this.kc),ge=Se.y),It.free(Je),It.free(Se),b.portFromColOffset=ne,b.portFromPos=he,b.portToColOffset=se,b.portToPos=ge}else b.portFromColOffset=0,b.portFromPos=0,b.portToColOffset=0,b.portToPos=0;if(Je=E.layer,Se=te.layer,Ne=0,ct=b.link,ct!==null){var Ft=ct.fromPort,Ot=ct.toPort;if(Ft!==null&&Ot!==null){var zt=ct.fromNode;if(Ge=ct.toNode,zt!==null&&Ge!==null){var Ht=k0(this,!0),Wt=k0(this,!1),Xt=this.setsPortSpots?Ht:ct.computeSpot(!0,Ft);nt=this.setsPortSpots?Wt:ct.computeSpot(!1,Ot);var hn=ct.isOrthogonal;Xt.$c()&&Xt.Hf(Wt)&&nt.$c()&&nt.Hf(Ht)?Ne=0:(Ht=ct.getLinkPoint(zt,Ft,Xt,!0,hn,Ge,Ot,It.alloc()),Wt=ct.getLinkDirection(zt,Ft,Ht,Xt,!0,hn,Ge,Ot),It.free(Ht),Xt.ys()||Wt!==JS(this,b,!0)?this.setsPortSpots&&zt!==null&&zt.ports.count===1&&b.rev&&(Ne+=1):Ne+=1,Xt=ct.getLinkPoint(Ge,Ot,nt,!1,hn,zt,Ft,It.alloc()),ct=ct.getLinkDirection(Ge,Ot,Xt,nt,!1,hn,zt,Ft),It.free(Xt),nt.ys()||ct!==JS(this,b,!1)?this.setsPortSpots&&Ge!==null&&Ge.ports.count===1&&b.rev&&(Ne+=2):Ne+=2)}}}if(Ge=Ne,Ne=Ge===1||Ge===3,(Ge=Ge===2||Ge===3)&&(nt=a.createVertex(),nt.node=null,nt.Dj=1,nt.layer=Je,nt.near=E,a.dh(nt),E=a.Zj(E,nt,b.link),E.valid=!1,E.rev=b.rev,E.portFromColOffset=ne,E.portToColOffset=0,E.portFromPos=he,E.portToPos=0,E=nt),ct=1,Ne&&ct--,Je-Se>ct&&0<Je){for(b.valid=!1,nt=a.createVertex(),nt.node=null,nt.Dj=2,nt.layer=Je-1,a.dh(nt),E=a.Zj(E,nt,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=Ge?0:ne,E.portToColOffset=0,E.portFromPos=Ge?0:he,E.portToPos=0,E=nt,Je--;Je-Se>ct&&0<Je;)nt=a.createVertex(),nt.node=null,nt.Dj=3,nt.layer=Je-1,a.dh(nt),E=a.Zj(E,nt,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=0,E.portFromPos=0,E.portToPos=0,E=nt,Je--;E=a.Zj(nt,te,b.link),E.valid=!Ne,Ne&&(nt.near=te),E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=se,E.portFromPos=0,E.portToPos=ge}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=ud(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),cd(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},lo.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}lo.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},lo.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 hl(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 hu(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 HS(a,y,x){var b=ud(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 se=0,he=b[ne],ge=he.near;if(ge!==null&&ge.layer===he.layer)if(he=ge.index,he>ne)for(var Se=ne+1;Se<he;Se++){var Ne=b[Se];Ne.near===ge&&Ne.Dj===ge.Dj||se++}else for(Se=ne-1;Se>he;Se--)Ne=b[Se],Ne.near===ge&&Ne.Dj===ge.Dj||se++;var Ge;if(0<=x)for(he=b[ne].sourceEdgesArrayAccess,ge=0;ge<he.length;ge++){var Je=he[ge];if(Je.valid&&Je.fromVertex.layer!==y)for(Ne=Je.fromVertex.index,Se=Je.portToPos,Je=Je.portFromPos,Ge=ge+1;Ge<he.length;Ge++){var nt=he[Ge];if(nt.valid&&nt.fromVertex.layer!==y){var ct=nt.fromVertex.index,Ft=nt.portToPos;nt=nt.portFromPos,Se<Ft&&(Ne>ct||Ne===ct&&Je>nt)&&se++,Ft<Se&&(ct>Ne||ct===Ne&&nt>Je)&&se++}}}if(0>=x){for(he=b[ne].destinationEdgesArrayAccess,ge=0;ge<he.length;ge++)if(Je=he[ge],Je.valid&&Je.toVertex.layer!==y)for(Ne=Je.toVertex.index,Se=Je.portToPos,Je=Je.portFromPos,Ge=ge+1;Ge<he.length;Ge++)nt=he[Ge],nt.valid&&nt.toVertex.layer!==y&&(ct=nt.toVertex.index,Ft=nt.portToPos,nt=nt.portFromPos,Je<nt&&(Ne>ct||Ne===ct&&Se>Ft)&&se++,nt<Je&&(ct>Ne||ct===Ne&&Ft>Se)&&se++)}for(te[ne*E+ne]=se,he=ne+1;he<E;he++){var Ot=0,zt=0;if(0<=x){se=b[ne].sourceEdgesArrayAccess;var Ht=b[he].sourceEdgesArrayAccess;for(ge=0;ge<se.length;ge++)if(Je=se[ge],Je.valid&&Je.fromVertex.layer!==y)for(Ne=Je.fromVertex.index,Je=Je.portFromPos,Ge=0;Ge<Ht.length;Ge++)nt=Ht[Ge],nt.valid&&nt.fromVertex.layer!==y&&(ct=nt.fromVertex.index,nt=nt.portFromPos,(Ne<ct||Ne===ct&&Je<nt)&&zt++,(ct<Ne||ct===Ne&&nt<Je)&&Ot++)}if(0>=x){for(se=b[ne].destinationEdgesArrayAccess,Ht=b[he].destinationEdgesArrayAccess,ge=0;ge<se.length;ge++)if(Je=se[ge],Je.valid&&Je.toVertex.layer!==y)for(Ne=Je.toVertex.index,Se=Je.portToPos,Ge=0;Ge<Ht.length;Ge++)nt=Ht[Ge],nt.valid&&nt.toVertex.layer!==y&&(ct=nt.toVertex.index,Ft=nt.portToPos,(Ne<ct||Ne===ct&&Se<Ft)&&zt++,(ct<Ne||ct===Ne&&Ft<Se)&&Ot++)}te[ne*E+he]=Ot,te[he*E+ne]=zt}}return cd(a,y,b),te}lo.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=HS(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 T0(a){for(var y=0,x=0;x<=a.Ia;x++){for(var b=a,E=x,te=ud(b,E),ne=b.tc[E],se=0,he=0;he<ne;he++){var ge=te[he].destinationEdgesArrayAccess;if(ge!==null)for(var Se=0;Se<ge.length;Se++){var Ne=ge[Se];if(Ne.valid&&Ne.toVertex.layer!==E){var Ge=Ne.fromVertex.column+Ne.portFromColOffset,Je=Ne.toVertex.column+Ne.portToColOffset;se+=(Math.abs(Ge-Je)+1)*gy(Ne)}}}cd(b,E,te),y+=se}return y}lo.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=ud(a,y),E=a.tc[y],te=[],ne=0;ne<E;ne++){var se=b[ne],he=null;0>=x&&(he=se.sourceEdgesArrayAccess);var ge=null;0<=x&&(ge=se.destinationEdgesArrayAccess);var Se=0,Ne=0,Ge=se.near;if(Ge!==null&&Ge.layer===se.layer&&(Se+=Ge.column-1,Ne++),he!==null)for(Ge=0;Ge<he.length;Ge++){se=he[Ge];var Je=se.fromVertex;se.valid&&!se.rev&&Je.layer!==y&&(Se+=Je.column,Ne++)}if(ge!==null)for(he=0;he<ge.length;he++)se=ge[he],Ge=se.toVertex,se.valid&&!se.rev&&Ge.layer!==y&&(Se+=Ge.column,Ne++);te[ne]=Ne===0?-1:Se/Ne}return cd(a,y,b),te}function US(a,y,x){for(var b=ud(a,y),E=a.tc[y],te=[],ne=0;ne<E;ne++){var se=b[ne],he=null;0>=x&&(he=se.sourceEdgesArrayAccess);var ge=null;0<=x&&(ge=se.destinationEdgesArrayAccess);var Se=0,Ne=[],Ge=se.near;if(Ge!==null&&Ge.layer===se.layer&&(Ne[Se]=Ge.column-1,Se++),se=void 0,he!==null)for(Ge=0;Ge<he.length;Ge++){se=he[Ge];var Je=se.fromVertex;se.valid&&!se.rev&&Je.layer!==y&&(Ne[Se]=Je.column+se.portFromColOffset,Se++)}if(ge!==null)for(he=0;he<ge.length;he++)se=ge[he],Ge=se.toVertex,se.valid&&!se.rev&&Ge.layer!==y&&(Ne[Se]=Ge.column+se.portToColOffset,Se++);Se===0?te[ne]=-1:(Ne.sort(function(nt,ct){return nt-ct}),ge=Se>>1,te[ne]=Se&1?Ne[ge]:Ne[ge-1]+Ne[ge]>>1)}return cd(a,y,b),te}function Hg(a,y,x,b,E,te){if(y.component===b){if(y.component=x,E)for(var ne=y.destinationEdges;ne.next();){var se=ne.value,he=se.toVertex,ge=y.layer-he.layer;se=a.linkMinLength(se),ge===se&&Hg(a,he,x,b,E,te)}if(te)for(ne=y.sourceEdges;ne.next();)se=ne.value,he=se.fromVertex,ge=he.layer-y.layer,se=a.linkMinLength(se),ge===se&&Hg(a,he,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)}}lo.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=WS(a);E!==null;)b[x]=E,x--,E.valid=!1,E=WS(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 se=ne.value;if(se.valid){for(var he=0,ge=se.destinationEdges;ge.next();)ge.value.toVertex.valid&&he++;ge=0;for(var Se=se.sourceEdges;Se.next();)Se.value.fromVertex.valid&&ge++;(E===null||te<he-ge)&&(E=se,te=he-ge)}}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 O0: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 Ug: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 WS(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++}lo.prototype.assignLayers=function(){switch(this.Zk){case wy:VS(this);break;case by:for(var a,y=this.network.vertexes.iterator;y.next();)a=XS(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 N0: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&&YS(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=ZS(a,y.value);a.Ia=Math.max(x,a.Ia)}}function ZS(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,ZS(a,te)+E)}y.layer=x}else x=y.layer;return x}function XS(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,XS(a,te)+E)}y.layer=x}else x=y.layer;return x}function YS(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)YS(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],se=ne.fromVertex,he=ne.toVertex;ne=a.linkMinLength(ne),se.layer-he.layer>ne&&Hg(a,se,0,-1,!0,!1)}for(Hg(a,y,1,-1,!0,!0);y.component!==0;){for(te=0,b=1/0,se=0,he=null,ne=a.network.vertexes.iterator;ne.next();){var ge=ne.value;if(ge.component===1){var Se=0,Ne=!1,Ge=ge.sourceEdgesArrayAccess;E=Ge.length;for(var Je=0;Je<E;Je++){var nt=Ge[Je],ct=nt.fromVertex;Se+=1,ct.component!==1&&(te+=1,ct=ct.layer-ge.layer,nt=a.linkMinLength(nt),b=Math.min(b,ct-nt))}for(Ge=ge.destinationEdgesArrayAccess,E=Ge.length,Je=0;Je<E;Je++)nt=Ge[Je].toVertex,--Se,nt.component!==1?--te:Ne=!0;(he===null||Se<se)&&!Ne&&(he=ge,se=Se)}}if(0<te){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer+=b);y.component=0}else he.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(Hg(a,y,1,-1,!0,!1);y.component!==0;){for(b=0,E=1/0,te=0,se=null,he=a.network.vertexes.iterator;he.next();)if(ne=he.value,ne.component===1){for(ge=0,Se=!1,Ge=ne.sourceEdgesArrayAccess,Ne=Ge.length,Je=0;Je<Ne;Je++)nt=Ge[Je].fromVertex,ge+=1,nt.component!==1?b+=1:Se=!0;for(Ge=ne.destinationEdgesArrayAccess,Ne=Ge.length,Je=0;Je<Ne;Je++)nt=Ge[Je],ct=nt.toVertex,--ge,ct.component!==1&&(--b,ct=ne.layer-ct.layer,nt=a.linkMinLength(nt),E=Math.min(E,ct-nt));(se===null||ge>te)&&!Se&&(se=ne,te=ge)}if(0>b){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer-=E);y.component=0}else se.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}lo.prototype.initializeIndices=function(){switch(this.Qk){default:case Cy: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 A0: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 Py: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))}lo.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=hl(this),x,b;for(x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)M0(this,b,1),xu(this,b,1);var E=this.countCrossings();for(E<a&&(a=E,y=hl(this)),b=this.Ia;0<=b;b--)M0(this,b,-1),xu(this,b,-1);E=this.countCrossings(),E<a&&(a=E,y=hl(this))}for(hu(this,y),x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)M0(this,b,0),xu(this,b,0);for(E=this.countCrossings(),E<a&&(a=E,y=hl(this)),b=this.Ia;0<=b;b--)M0(this,b,0),xu(this,b,0);E=this.countCrossings(),E<a&&(a=E,y=hl(this))}hu(this,y);var te,ne,se;switch(this.rk){case Ey:break;case Ty:for(se=a+1;(b=this.countCrossings())<se;)for(se=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=xu(this,b,-1)||te;for(E=this.countCrossings(),E>=a?hu(this,y):(a=E,y=hl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=xu(this,b,1)||te;for(E=this.countCrossings(),E>=a?hu(this,y):(a=E,y=hl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=xu(this,b,1)||te;for(E>=a?hu(this,y):(a=E,y=hl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=xu(this,b,-1)||te;for(E>=a?hu(this,y):(a=E,y=hl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=xu(this,b,0)||te;for(E>=a?hu(this,y):(a=E,y=hl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=xu(this,b,0)||te;E>=a?hu(this,y):(a=E,y=hl(this))}break;default:case j0:for(x=this.Ia,ne=0,se=a+1;(b=this.countCrossings())<se;){for(se=b,te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=xu(this,b,-1)||te;for(E=this.countCrossings(),E>=a?hu(this,y):(a=E,y=hl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=xu(this,b,1)||te;for(E=this.countCrossings(),E>=a?hu(this,y):(a=E,y=hl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=xu(this,b,1)||te;for(E>=a?hu(this,y):(a=E,y=hl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=xu(this,b,-1)||te;for(E>=a?hu(this,y):(a=E,y=hl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=xu(this,b,0)||te;for(E>=a?hu(this,y):(a=E,y=hl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=xu(this,b,0)||te;E>=a?hu(this,y):(a=E,y=hl(this))}}hu(this,y)};function M0(a,y,x){var b=ud(a,y),E=a.tc[y],te=US(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 se=!0,he;se;)for(se=!1,x=0;x<E-1;x++)(te[x+1]<te[x]||te[x+1]===te[x]&&ne[x+1]<ne[x])&&(se=!0,he=te[x],te[x]=te[x+1],te[x+1]=he,he=ne[x],ne[x]=ne[x+1],ne[x+1]=he,he=b[x],b[x]=b[x+1],b[x+1]=he);for(x=te=0;x<E;x++)he=b[x],he.index=x,te+=a.nodeMinColumnSpace(he,!0),he.column=te,te+=1,te+=a.nodeMinColumnSpace(he,!1);cd(a,y,b)}function xu(a,y,x){var b=ud(a,y),E=a.tc[y];x=HS(a,y,x);var te,ne=[];for(te=0;te<E;te++)ne[te]=-1;var se=[];for(te=0;te<E;te++)se[te]=-1;for(var he=!1,ge=!0;ge;)for(ge=!1,te=0;te<E-1;te++){var Se=x[b[te].index*E+b[te+1].index],Ne=x[b[te+1].index*E+b[te].index],Ge=0,Je=0,nt=b[te].column,ct=b[te+1].column,Ft=a.nodeMinColumnSpace(b[te],!0),Ot=a.nodeMinColumnSpace(b[te],!1),zt=a.nodeMinColumnSpace(b[te+1],!0),Ht=a.nodeMinColumnSpace(b[te+1],!1);Ft=nt-Ft+zt,Ot=ct-Ot+Ht;var Wt=b[te].sourceEdges.iterator;for(Wt.reset();Wt.next();)if(zt=Wt.value,Ht=zt.fromVertex,zt.valid&&Ht.layer===y){for(zt=0;b[zt]!==Ht;)zt++;zt<te&&(Ge+=2*(te-zt),Je+=2*(te+1-zt)),zt===te+1&&(Ge+=1),zt>te+1&&(Ge+=4*(zt-te),Je+=4*(zt-(te+1)))}for(Wt=b[te].destinationEdges.iterator,Wt.reset();Wt.next();)if(zt=Wt.value,Ht=zt.toVertex,zt.valid&&Ht.layer===y){for(zt=0;b[zt]!==Ht;)zt++;zt===te+1&&(Je+=1)}for(Wt=b[te+1].sourceEdges.iterator,Wt.reset();Wt.next();)if(zt=Wt.value,Ht=zt.fromVertex,zt.valid&&Ht.layer===y){for(zt=0;b[zt]!==Ht;)zt++;zt<te&&(Ge+=2*(te+1-zt),Je+=2*(te-zt)),zt===te&&(Je+=1),zt>te+1&&(Ge+=4*(zt-(te+1)),Je+=4*(zt-te))}for(Wt=b[te+1].destinationEdges.iterator,Wt.reset();Wt.next();)if(zt=Wt.value,Ht=zt.toVertex,zt.valid&&Ht.layer===y){for(zt=0;b[zt]!==Ht;)zt++;zt===te&&(Ge+=1)}zt=Ht=0,Wt=ne[b[te].index];var Xt=se[b[te].index],hn=ne[b[te+1].index],er=se[b[te+1].index];Wt!==-1&&(Ht+=Math.abs(Wt-nt),zt+=Math.abs(Wt-Ot)),Xt!==-1&&(Ht+=Math.abs(Xt-nt),zt+=Math.abs(Xt-Ot)),hn!==-1&&(Ht+=Math.abs(hn-ct),zt+=Math.abs(hn-Ft)),er!==-1&&(Ht+=Math.abs(er-ct),zt+=Math.abs(er-Ft)),(Je<Ge-.5||Je===Ge&&Ne<Se-.5||Je===Ge&&Ne===Se&&zt<Ht-.5)&&(ge=he=!0,b[te].column=Ot,b[te+1].column=Ft,Se=b[te],b[te]=b[te+1],b[te+1]=Se)}for(te=0;te<E;te++)b[te].index=te;return cd(a,y,b),he}lo.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&Zx)!==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=Op(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Op(this,y,-1)||x;x=Op(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=Op(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Op(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Op(this,y,0)||x}}else Ux(this)};function Op(a,y,x){for(var b=!1;$x(a,y,x);)b=!0;return b}function $x(a,y,x){var b,E=ud(a,y),te=a.tc[y],ne=my(a,y,-1);if(0<x)for(b=0;b<te;b++)ne[b]=-1;var se=my(a,y,1);if(0>x)for(b=0;b<te;b++)se[b]=-1;for(var he=!1,ge=!0;ge;)for(ge=!1,b=0;b<te;b++){var Se=E[b].column,Ne=a.nodeMinColumnSpace(E[b],!0),Ge=a.nodeMinColumnSpace(E[b],!1),Je=0;0>b-1||Se-E[b-1].column-1>Ne+a.nodeMinColumnSpace(E[b-1],!1)?Je=Se-1:Je=Se,Ne=b+1>=te||E[b+1].column-Se-1>Ge+a.nodeMinColumnSpace(E[b+1],!0)?Se+1:Se;var nt=Ge=0,ct=0;if(0>=x)for(var Ft=E[b].sourceEdges.iterator;Ft.next();){var Ot=Ft.value,zt=Ot.fromVertex;if(Ot.valid&&zt.layer!==y){var Ht=gy(Ot),Wt=Ot.portFromColOffset;Ot=Ot.portToColOffset,zt=zt.column,Ge+=(Math.abs(Se+Ot-(zt+Wt))+1)*Ht,nt+=(Math.abs(Je+Ot-(zt+Wt))+1)*Ht,ct+=(Math.abs(Ne+Ot-(zt+Wt))+1)*Ht}}if(0<=x)for(Ft=E[b].destinationEdges.iterator;Ft.next();)Ot=Ft.value,zt=Ot.toVertex,Ot.valid&&zt.layer!==y&&(Ht=gy(Ot),Wt=Ot.portFromColOffset,Ot=Ot.portToColOffset,zt=zt.column,Ge+=(Math.abs(Se+Wt-(zt+Ot))+1)*Ht,nt+=(Math.abs(Je+Wt-(zt+Ot))+1)*Ht,ct+=(Math.abs(Ne+Wt-(zt+Ot))+1)*Ht);Ot=Wt=Ht=0,Ft=ne[E[b].index],zt=se[E[b].index],Ft!==-1&&(Ht+=Math.abs(Ft-Se),Wt+=Math.abs(Ft-Je),Ot+=Math.abs(Ft-Ne)),zt!==-1&&(Ht+=Math.abs(zt-Se),Wt+=Math.abs(zt-Je),Ot+=Math.abs(zt-Ne)),nt<Ge||nt===Ge&&Wt<Ht?(ge=he=!0,E[b].column=Je):(ct<Ge||ct===Ge&&Ot<Ht)&&(ge=he=!0,E[b].column=Ne)}return cd(a,y,E),a.normalize(),he}function Sy(a,y,x){var b=ud(a,y),E=a.tc[y],te=US(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 se=b[x].column,he=a.nodeMinColumnSpace(b[x],!0),ge=a.nodeMinColumnSpace(b[x],!1),Se=0;if(ne[x]===-1)if(x===0&&x===E-1)Se=se;else if(x===0){var Ne=b[x+1].column;Ne-se===ge+a.nodeMinColumnSpace(b[x+1],!0)?Se=se-1:Se=se}else x===E-1?(Ne=b[x-1].column,Se=se-Ne===he+a.nodeMinColumnSpace(b[x-1],!1)?se+1:se):(Ne=b[x-1].column,he=Ne+a.nodeMinColumnSpace(b[x-1],!1)+he+1,Ne=b[x+1].column,ge=Ne-a.nodeMinColumnSpace(b[x+1],!0)-ge-1,Se=(he+ge)/2|0);else x===0&&x===E-1?Se=ne[x]:x===0?(Ne=b[x+1].column,ge=Ne-a.nodeMinColumnSpace(b[x+1],!0)-ge-1,Se=Math.min(ne[x],ge)):x===E-1?(Ne=b[x-1].column,he=Ne+a.nodeMinColumnSpace(b[x-1],!1)+he+1,Se=Math.max(ne[x],he)):(Ne=b[x-1].column,he=Ne+a.nodeMinColumnSpace(b[x-1],!1)+he+1,Ne=b[x+1].column,ge=Ne-a.nodeMinColumnSpace(b[x+1],!0)-ge-1,he<ne[x]&&ne[x]<ge?Se=ne[x]:he>=ne[x]?Se=he:ge<=ne[x]&&(Se=ge));Se!==se&&(te=!0,b[x].column=Se)}cd(a,y,b),a.normalize()}function Gx(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 Hx(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 se=b.column-a.nodeMinColumnSpace(b,!0),he=b.column+a.nodeMinColumnSpace(b,!1);se<=y&&he>=y&&(E[b.layer]=!0),se<=x&&he>=x&&(te[b.layer]=!0)}for(se=!0,x=!1,b=0;b<=a.Ia;b++)se=se&&!(E[b]&&te[b]);if(se)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(;Gx(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;Hx(a,x););a.normalize();var b;if(0<y)for(x=0;x<=a.Ra;x++){var E=hl(a),te=T0(a);for(b=te+1;te<b;){b=te,tx(a,x,1);var ne=T0(a);ne>te?hu(a,E):ne<te&&(te=ne,E=hl(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(E=hl(a),te=T0(a),b=te+1;te<b;)b=te,tx(a,x,-1),ne=T0(a),ne>te?hu(a,E):ne<te&&(te=ne,E=hl(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,se=Math.max(0,te.column-a.nodeMinColumnSpace(te,!0)),he=Math.min(a.Ra,te.column+a.nodeMinColumnSpace(te,!1));se<=he;se++)E[ne*(a.Ra+1)+se]=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(he=ne[ne.length-1],ne.pop(),E[he])for(E[he]=!1,te=0;te<a.le;te++)y[he*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 Ux(a){for(var y=pn(),x=a.fl.length,b=0;b<=x;b++)y[b]=[];for(b=a.network.vertexes.iterator;b.next();){var E=b.value;y[x-E.layer][E.index]=E}x=new Nn,Wx(y,x);var te=null,ne=null,se=null,he=null,ge=(a.ve&1)!==0,Se=(a.ve&2)!==0,Ne=(a.ve&4)!==0,Ge=(a.ve&8)!==0;for(ge&&(a.verticalAlignment(y,x,!0),te=L0(a,y,!0,!1)),y.reverse(),Ne&&(a.verticalAlignment(y,x,!1),se=L0(a,y,!1,!1)),b=Yr(y),E=b.next();!E.done;E=b.next())E.value.reverse();Ge&&(a.verticalAlignment(y,x,!1),he=L0(a,y,!1,!0)),y.reverse(),Se&&(a.verticalAlignment(y,x,!0),ne=L0(a,y,!0,!0)),On(y),a.u(te,ne,se,he),a.network.vertexes.each(function(Je){var nt=pn();ge&&nt.push(te.get(Je)),Se&&nt.push(ne.get(Je)),Ne&&nt.push(se.get(Je)),Ge&&nt.push(he.get(Je)),nt.sort(function(Ft,Ot){return Ft-Ot});var ct=nt.length;ct=(nt[Math.floor((ct-1)/2)]+nt[Math.ceil((ct-1)/2)])/2,On(nt),Je.zc=ct})}function Wx(a,y){for(var x=a.length,b=1;b<x-1;b++)for(var E=0,te=0,ne=a[b],se=a[b+1],he=0;te<se.length;he++){var ge=se[he];e:{if(ge.node===null){var Se=My(ge);if(0<Se.length){Se=Se[0].node===null;break e}}Se=!1}var Ne=Se;if(he===se.length-1||Ne){for(Se=ne.length-1,Ne&&(Se=My(ge)[0].index);te<=he;){if(ge=se[te],!ge.bo){Ne=[];for(var Ge=Yr(ge.sourceEdgesArrayAccess),Je=Ge.next();!Je.done;Je=Ge.next())Je=Je.value,Je.valid&&Ne.push(Je);ge.bo=Ne}for(ge=Yr(ge.bo),Ne=ge.next();!Ne.done;Ne=ge.next())Ne=Ne.value,Ge=Ne.fromVertex.index,(Ge<E||Ge>Se)&&y.add(Ne);te++}E=Se}}}lo.prototype.verticalAlignment=function(a,y,x){Kx(a),a=Yr(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=Yr(b.value);for(var te=b.next();!te.done;te=b.next()){te=te.value;var ne=x?My(te):Xx(te),se=ne.length;if(0<se){ne.sort(function(Ne,Ge){return Ne.vi-Ge.vi});var he=(se-1)/2;for(se=Math.floor(he),he=Math.ceil(he);se<=he;se++)if(te.align===te){var ge=ne[se],Se=void 0;Se=x?I0(ge,te):I0(te,ge),!y.contains(Se)&&E<ge.vi&&(ge.align=te,te.root=ge.root,te.align=ge.root,E=ge.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 L0(a,y,x,b){for(var E=a.K===90||a.K===270,te=Yr(y),ne=te.next();!ne.done;ne=te.next()){var se=Yr(ne.value);for(ne=se.next();!ne.done;ne=se.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=Yr(y),se=te.next();!se.done;se=te.next()){se=Yr(se.value);for(var he=se.next();!he.done;he=se.next())if(he=he.value,he.root===he){for(var ge=0,Se=he;Se.align!==he;){var Ne=Se.align,Ge=ne?Se.width:Se.height,Je=ne?Ne.width:Ne.height;if(x){var nt=I0(Se,Ne),ct=nt.portFromPos,Ft=nt.portToPos;nt.link!==null&&(Se.node&&Se.node!==nt.link.fromNode&&(ct=ne?Se.focusX:Se.focusY),Ne.node&&Ne.node!==nt.link.toNode&&(Ft=ne?Ne.focusX:Ne.focusY))}else nt=I0(Ne,Se),ct=nt.portToPos,Ft=nt.portFromPos,nt.link!==null&&(Se.node&&Se.node!==nt.link.toNode&&(ct=ne?Se.focusX:Se.focusY),Ne.node&&Ne.node!==nt.link.fromNode&&(Ft=ne?Ne.focusX:Ne.focusY));Ge=b?Se.qg+(Ge-ct)-(Je-Ft):Se.qg+ct-Ft,Ne.qg=Ge,ge=Math.min(ge,Ge),Se=Se.align}Se=he;do Se.qg=Se.qg-ge,Se=Se.align;while(Se!==he)}}for(x=Yr(y),ne=x.next();!ne.done;ne=x.next())for(te=Yr(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,se=0;do{for(te=y[ne][se];te.align!==te.root;)te=te.align,ne++,0<te.vi&&(se=rx(te,y),se.sd.shift=Math.min(se.sd.shift,te.sd.shift+te.zc+te.qg-(se.zc+se.qg+(E?se.width:se.height)+a.columnSpacing)));se=te.vi+1}while(ne<y.length&&se<y[ne].length&&te.sd===y[ne][se].sd)}for(a=new ur,y=Yr(y),ne=y.next();!ne.done;ne=y.next())for(x=Yr(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=rx(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 rx(a,y){var x=a.Tz;return a=a.vi,1>a&&Yt("Could not determine previous vertex in layer"),y[x][a-1]}lo.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var b=pn(),E=pn(),te=1/0,ne=0;4>ne;ne++)if(y[ne]){var se=Vx(this,y[ne],b,E,ne);se<te&&(x=ne,te=se)}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(he){return function(ge){ge.value+=he.delta}}(te)));On(b),On(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(se){var he=se.key;se=se.value,he=a.K===90||a.K===270?he.width:he.height,se<te&&(te=se),se+he>ne&&(ne=se+he)}),x[E]=te,b[E]=ne,ne-te}lo.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=k0(this,!0),y=k0(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 k0(a,y){return a.K===270?y?ca:za:a.K===90?y?za:ca:a.K===180?y?Ca:Va:y?Va:Ca}lo.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,se=-1/0;a.next();){var he=a.value,ge=he.layer,Se=he.column|0;b?(ne=y.x+this.kc*Se,ge=this.Kd[ge]):(ne=this.Kd[ge],ge=y.y+this.kc*Se),he.centerX=ne,he.centerY=ge,x&&isFinite(he.zc)&&(b?he.node?he.x=y.x+he.zc:he.centerX=y.x+he.zc:he.node?he.y=y.y+he.zc:he.centerY=y.y+he.zc),te=Math.min(he.x,te),E=Math.min(he.y,E),b?(ne=te,se=Math.max(se,he.bounds.right)):(ne=E,se=Math.max(se,he.bounds.bottom))}for(this.xw=se-ne,te=y.x-te,y=y.y-E,this.Rf=new It(x&&b?0:te,x&&!b?0:y),a.reset();a.next();)x=a.value,x.x+=te,x.y+=y,x.commit()},lo.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 wn(0,0,x,Math.abs(this.Ta[0]))):y.push(new wn(0,this.Ta[b-1],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===90?b===0?y.push(new wn(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new wn(0,this.Ta[b],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===180?b===0?y.push(new wn(0,0,Math.abs(this.Ta[0]),x)):y.push(new wn(this.Ta[b-1],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x)):b===0?y.push(new wn(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new wn(this.Ta[b],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x));this.commitLayers(y,this.Rf)},lo.prototype.commitLayers=function(){},lo.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,se=b.toPort;if(E!==null){var he=E.findVisibleNode();he!==null&&he!==E&&(E=he,ne=he.port)}te!==null&&(he=te.findVisibleNode(),he!==null&&he!==te&&(te=he,se=he.port));var ge=y.computeSpot(!0,ne);he=y.computeSpot(!1,se);var Se=x.fromVertex,Ne=x.toVertex;if(x.valid)y.curve===Yl&&y.pointsCount===4&&(Se.column===Ne.column&&this.alignOption===0?(x=y.getLinkPoint(E,ne,ge,!0,!1,te,se),se=y.getLinkPoint(te,se,he,!1,!1,E,ne),x.w()||x.set(E.actualBounds.center),se.w()||se.set(te.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+se.x)/3,(2*x.y+se.y)/3),y.yf((x.x+2*se.x)/3,(x.y+2*se.y)/3),y.yf(se.x,se.y)):(x=b=!1,ne!==null&&ge===oa&&(b=!0),se!==null&&he===oa&&(x=!0),(b||x)&&(he=null,b&&(he=y.getLinkPointFromPoint(E,ne,ne.ga(Di),y.i(3),!0),he.w()||he.set(E.actualBounds.center),y.L(0,he.x,he.y)),E=null,x&&(E=y.getLinkPointFromPoint(te,se,se.ga(Di),y.i(0),!1),E.w()||E.set(te.actualBounds.center),y.L(3,E.x,E.y)),he&&(te=y.i(2),y.L(1,(2*he.x+te.x)/3,(2*he.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(Se.layer===Ne.layer)y.zf();else{var Ge=!1,Je=!1,nt=this.ie,ct=y.firstPickIndex+1;if(y.isOrthogonal){Je=!0;var Ft=y.pointsCount;4<Ft&&y.points.removeRange(2,Ft-3)}else if(y.curve===Yl)Ge=!0,Ft=y.pointsCount,4<Ft&&y.points.removeRange(2,Ft-3),Ft===4&&(ct=2);else{Ft=y.pointsCount;var Ot=ge===oa,zt=he===oa;2<Ft&&Ot&&zt?y.points.removeRange(1,Ft-2):3<Ft&&Ot&&!zt?y.points.removeRange(1,Ft-3):3<Ft&&!Ot&&zt?y.points.removeRange(2,Ft-2):4<Ft&&!Ot&&!zt&&y.points.removeRange(2,Ft-3)}if(x.rev){for(;Ne!==null&&Se!==Ne;){var Ht=Ft=null;for(Ot=Ne.sourceEdges.iterator;Ot.next()&&(zt=Ot.value,zt.link!==x.link||(Ft=zt.fromVertex,Ht=zt.toVertex,Ft.node!==null)););if(Ft===null)break;if(Ft!==Se){Ot=y.i(ct-1).x,zt=y.i(ct-1).y;var Wt=Ft.centerX,Xt=Ft.centerY;if(Je)this.K===180||this.K===0?ct===y.firstPickIndex+1?(y.m(ct++,Ot,zt),y.m(ct++,Ot,Xt)):(Ht!==null?Ht.centerY:zt)!==Xt&&(Ht=this.Ta[Ft.layer-1]+this.Rf.x,y.m(ct++,Ht,zt),y.m(ct++,Ht,Xt)):ct===y.firstPickIndex+1?(y.m(ct++,Ot,zt),y.m(ct++,Wt,zt)):(Ht!==null?Ht.centerX:Ot)!==Wt&&(Ht=this.Ta[Ft.layer-1]+this.Rf.y,y.m(ct++,Ot,Ht),y.m(ct++,Wt,Ht));else if(ct===y.firstPickIndex+1){Ht=Math.max(10,this.he[Ne.layer]);var hn=Math.max(10,this.Ld[Ne.layer]);if(Ge)this.K===180?Wt<=Ne.bounds.x?(Ne=Ne.bounds.x,y.m(ct++,Ne-Ht,Xt),y.m(ct++,Ne,Xt),y.m(ct++,Ne+hn,Xt)):(y.m(ct++,Wt-Ht,Xt),y.m(ct++,Wt,Xt),y.m(ct++,Wt+hn,Xt)):this.K===90?Xt>=Ne.bounds.bottom?(Ne=Ne.bounds.y+Ne.bounds.height,y.m(ct++,Wt,Ne+hn),y.m(ct++,Wt,Ne),y.m(ct++,Wt,Ne-Ht)):(y.m(ct++,Wt,Xt+hn),y.m(ct++,Wt,Xt),y.m(ct++,Wt,Xt-Ht)):this.K===270?Xt<=Ne.bounds.y?(Ne=Ne.bounds.y,y.m(ct++,Wt,Ne-Ht),y.m(ct++,Wt,Ne),y.m(ct++,Wt,Ne+hn)):(y.m(ct++,Wt,Xt-Ht),y.m(ct++,Wt,Xt),y.m(ct++,Wt,Xt+hn)):this.K===0&&(Wt>=Ne.bounds.right?(Ne=Ne.bounds.x+Ne.bounds.width,y.m(ct++,Ne+hn,Xt),y.m(ct++,Ne,Xt),y.m(ct++,Ne-Ht,Xt)):(y.m(ct++,Wt+hn,Xt),y.m(ct++,Wt,Xt),y.m(ct++,Wt-Ht,Xt)));else{y.m(ct++,Ot,zt);var er=0;this.K===180||this.K===0?((this.K===180?Wt>=Ne.bounds.right:Wt<=Ne.bounds.x)&&(er=(this.K===0?-Ht:hn)/2),y.m(ct++,Ot+er,Xt)):((this.K===270?Xt>=Ne.bounds.bottom:Xt<=Ne.bounds.y)&&(er=(this.K===90?-Ht:hn)/2),y.m(ct++,Wt,zt+er)),y.m(ct++,Wt,Xt)}}else Ht=Math.max(10,this.he[Ft.layer]),hn=Math.max(10,this.Ld[Ft.layer]),Ge?this.K===180?(y.m(ct++,Wt-Ht-nt,Xt),y.m(ct++,Math.min(Wt-Ht+nt/2,Wt),Xt),y.m(ct++,Wt,Xt),y.m(ct++,Wt,Xt),y.m(ct++,Math.max(Wt+hn-nt/2,Wt),Xt),y.m(ct++,Wt+hn+nt,Xt)):this.K===90?(y.m(ct++,Wt,Xt+hn+nt),y.m(ct++,Wt,Math.max(Xt+hn-nt/2,Xt)),y.m(ct++,Wt,Xt),y.m(ct++,Wt,Xt),y.m(ct++,Wt,Math.min(Xt-Ht+nt/2,Xt)),y.m(ct++,Wt,Xt-Ht-nt)):this.K===270?(y.m(ct++,Wt,Xt-Ht-nt),y.m(ct++,Wt,Math.min(Xt-Ht+nt/2,Xt)),y.m(ct++,Wt,Xt),y.m(ct++,Wt,Xt),y.m(ct++,Wt,Math.max(Xt+hn-nt/2,Xt)),y.m(ct++,Wt,Xt+hn+nt)):(y.m(ct++,Wt+hn+nt,Xt),y.m(ct++,Math.max(Wt+hn-nt/2,Wt),Xt),y.m(ct++,Wt,Xt),y.m(ct++,Wt,Xt),y.m(ct++,Math.min(Wt-Ht+nt/2,Wt),Xt),y.m(ct++,Wt-Ht-nt,Xt)):y.m(ct++,Wt,Xt)}Ne=Ft}(se===null||ge!==oa||Je)&&(Ot=y.i(ct-1).x,zt=y.i(ct-1).y,Wt=y.i(ct).x,Xt=y.i(ct).y,Je?(nt=this.Ld[Se.layer],this.K===180||this.K===0?(Je=zt,Je>=Se.bounds.y&&Je<=Se.bounds.bottom&&(this.K===180?Wt>=Se.bounds.x:Wt<=Se.bounds.right)&&(Ne=Se.centerX+(this.K===180?-nt:nt),Je<Se.bounds.y+Se.bounds.height/2?Je=Se.bounds.y-this.kc/2:Je=Se.bounds.bottom+this.kc/2,y.m(ct++,Ne,zt),y.m(ct++,Ne,Je)),y.m(ct++,Wt,Je)):(Je=Ot,Je>=Se.bounds.x&&Je<=Se.bounds.right&&(this.K===270?Xt>=Se.bounds.y:Xt<=Se.bounds.bottom)&&(Ne=Se.centerY+(this.K===270?-nt:nt),Je<Se.bounds.x+Se.bounds.width/2?Je=Se.bounds.x-this.kc/2:Je=Se.bounds.right+this.kc/2,y.m(ct++,Ot,Ne),y.m(ct++,Je,Ne)),y.m(ct++,Je,Xt)),y.m(ct++,Wt,Xt)):Ge?(Ht=Math.max(10,this.he[Se.layer]),hn=Math.max(10,this.Ld[Se.layer]),this.K===180&&Wt>=Se.bounds.x?(Ne=Se.bounds.x+Se.bounds.width,y.L(ct-2,Ne,zt),y.L(ct-1,Ne+hn,zt)):this.K===90&&Xt<=Se.bounds.bottom?(Ne=Se.bounds.y,y.L(ct-2,Ot,Ne),y.L(ct-1,Ot,Ne-Ht)):this.K===270&&Xt>=Se.bounds.y?(Ne=Se.bounds.y+Se.bounds.height,y.L(ct-2,Ot,Ne),y.L(ct-1,Ot,Ne+hn)):this.K===0&&Wt<=Se.bounds.right&&(Ne=Se.bounds.x,y.L(ct-2,Ne,zt),y.L(ct-1,Ne-Ht,zt))):(Ht=Math.max(10,this.he[Se.layer]),hn=Math.max(10,this.Ld[Se.layer]),Je=0,this.K===180||this.K===0?((this.K===180?Wt<=Se.bounds.x:Wt>=Se.bounds.right)&&(Je=(this.K===0?hn:-Ht)/2),y.m(ct++,Wt+Je,zt)):((this.K===270?Xt<=Se.bounds.y:Xt>=Se.bounds.bottom)&&(Je=(this.K===90?hn:-Ht)/2),y.m(ct++,Ot,Xt+Je)),y.m(ct++,Wt,Xt)))}else{for(;Se!==null&&Se!==Ne;){for(Ht=Ft=null,Se=Se.destinationEdges.iterator;Se.next()&&(Ot=Se.value,Ot.link!==x.link||(Ft=Ot.toVertex,Ht=Ot.fromVertex,Ht.node!==null&&(Ht=null),Ft.node!==null)););if(Ft===null)break;Ft!==Ne&&(Ot=y.i(ct-1).x,zt=y.i(ct-1).y,Wt=Ft.centerX,Xt=Ft.centerY,Je?this.K===180||this.K===0?(Ht!==null?Ht.centerY:zt)!==Xt&&(Ht=this.Ta[Ft.layer]+this.Rf.x,ct===y.firstPickIndex+1&&(Ht=this.K===0?Math.max(Ht,Ot):Math.min(Ht,Ot)),y.m(ct++,Ht,zt),y.m(ct++,Ht,Xt)):(Ht!==null?Ht.centerX:Ot)!==Wt&&(Ht=this.Ta[Ft.layer]+this.Rf.y,ct===y.firstPickIndex+1&&(Ht=this.K===90?Math.max(Ht,zt):Math.min(Ht,zt)),y.m(ct++,Ot,Ht),y.m(ct++,Wt,Ht)):(Ht=Math.max(10,this.he[Ft.layer]),hn=Math.max(10,this.Ld[Ft.layer]),Ge?this.K===180?(y.m(ct++,Wt+hn+nt,Xt),y.m(ct++,Math.max(Wt+hn-nt/2,Wt),Xt),y.m(ct++,Wt,Xt),y.m(ct++,Wt,Xt),y.m(ct++,Math.min(Wt-Ht+nt/2,Wt),Xt),y.m(ct++,Wt-Ht-nt,Xt)):this.K===90?(y.m(ct++,Wt,Xt-Ht-nt),y.m(ct++,Wt,Math.min(Xt-Ht+nt/2,Xt)),y.m(ct++,Wt,Xt),y.m(ct++,Wt,Xt),y.m(ct++,Wt,Math.max(Xt+hn-nt/2,Xt)),y.m(ct++,Wt,Xt+hn+nt)):this.K===270?(y.m(ct++,Wt,Xt+hn+nt),y.m(ct++,Wt,Math.max(Xt+hn-nt/2,Xt)),y.m(ct++,Wt,Xt),y.m(ct++,Wt,Xt),y.m(ct++,Wt,Math.min(Xt-Ht+nt/2,Xt)),y.m(ct++,Wt,Xt-Ht-nt)):(y.m(ct++,Wt-Ht-nt,Xt),y.m(ct++,Math.min(Wt-Ht+nt/2,Wt),Xt),y.m(ct++,Wt,Xt),y.m(ct++,Wt,Xt),y.m(ct++,Math.max(Wt+hn-nt/2,Wt),Xt),y.m(ct++,Wt+hn+nt,Xt)):this.K===180?(y.m(ct++,Wt+hn,Xt),y.m(ct++,Wt-Ht,Xt)):this.K===90?(y.m(ct++,Wt,Xt-Ht),y.m(ct++,Wt,Xt+hn)):this.K===270?(y.m(ct++,Wt,Xt+hn),y.m(ct++,Wt,Xt-Ht)):(y.m(ct++,Wt-Ht,Xt),y.m(ct++,Wt+hn,Xt)))),Se=Ft}Je&&(Ot=y.i(ct-1).x,zt=y.i(ct-1).y,Wt=y.i(ct).x,Xt=y.i(ct).y,this.K===180||this.K===0?zt!==Xt&&(Ht=this.K===0?Math.min(Math.max((Wt+Ot)/2,this.Ta[Ne.layer]+this.Rf.x),Wt):Math.max(Math.min((Wt+Ot)/2,this.Ta[Ne.layer]+this.Rf.x),Wt),y.m(ct++,Ht,zt),y.m(ct++,Ht,Xt)):Ot!==Wt&&(Ht=this.K===90?Math.min(Math.max((Xt+zt)/2,this.Ta[Ne.layer]+this.Rf.y),Xt):Math.max(Math.min((Xt+zt)/2,this.Ta[Ne.layer]+this.Rf.y),Xt),y.m(ct++,Ot,Ht),y.m(ct++,Wt,Ht)))}b!==null&&Ge&&4<=y.pointsCount&&(ne!==null&&(ne=ge===oa?y.getLinkPointFromPoint(E,ne,ne.ga(Di),y.i(3),!0):y.i(0),ge===oa&&(ge=y.i(2),b=y.i(3),this.direction===90||this.direction===270?(y.L(1,(ne.x+ge.x)/2,ge.y),y.L(2,b.x,(ge.y+b.y)/2)):(y.L(1,ge.x,(ne.y+ge.y)/2),y.L(2,(ge.x+b.x)/2,b.y))),ne.w()||ne.set(E.actualBounds.center),y.L(0,ne.x,ne.y)),se!==null&&(E=he===oa?y.getLinkPointFromPoint(te,se,se.ga(Di),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),he===oa&&(se=y.i(y.pointsCount-3),he=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(E.x+se.x)/2,se.y),y.L(y.pointsCount-2,he.x,(se.y+he.y)/2)):(y.L(y.pointsCount-2,se.x,(E.y+se.y)/2),y.L(y.pointsCount-3,(se.x+he.x)/2,he.y))),E.w()||E.set(te.actualBounds.center),y.L(y.pointsCount-1,E.x,E.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},lo.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new Ln,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 se=new hd;se.layer=Math.floor(te.y/2);var he=b.i(0),ge=b.i(b.pointsCount-1);if(se.first=he.x*he.x+he.y,se.jc=ge.x*ge.x+ge.y,se.rd=Math.min(te.x,ne.x),se.Ic=Math.max(te.x,ne.x),se.index=E,se.link=b,E+2<b.pointsCount){he=b.i(E-1),ge=b.i(E+2);var Se=0;he.y<te.y?Se=ge.y<te.y?3:te.x<ne.x?2:1:he.y>te.y&&(Se=ge.y>te.y?0:ne.x<te.x?2:1),se.j=Se}x.push(se)}}}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),Se=1,se=x[te].jc,he=te;he<E;he++)ge=x[he],ge.jc!==se&&(Se++,se=ge.jc);this.zi(x,this.Ux,te,te+ne);var Ne=1;for(se=x[te].first,he=te;he<E;he++)ge=x[he],ge.first!==se&&(Ne++,se=ge.first);for(he=!0,ge=Ne,Se<Ne?(he=!1,ge=Se,se=x[te].jc,this.zi(x,this.Js,te,te+ne)):se=x[te].first,Se=0,Ne=te;Ne<E;Ne++){var Ge=x[Ne];(he?Ge.first:Ge.jc)!==se&&(Se++,se=he?Ge.first:Ge.jc);var Je=Ge.link;te=Je.i(Ge.index),ne=Je.i(Ge.index+1);var nt=this.linkSpacing*(Se-(ge-1)/2);y++,Je.uh(),Je.L(Ge.index,te.x,te.y+nt),Je.L(Ge.index+1,ne.x,ne.y+nt),Je.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)&&(se=new hd,se.layer=Math.floor(te.x/2),he=b.i(0),ge=b.i(b.pointsCount-1),se.first=he.x+he.y*he.y,se.jc=ge.x+ge.y*ge.y,se.rd=Math.min(te.y,ne.y),se.Ic=Math.max(te.y,ne.y),se.index=E,se.link=b,E+2<b.pointsCount&&(he=b.i(E-1),ge=b.i(E+2),Se=0,he.x<te.x?Se=ge.x<te.x?3:te.y<ne.y?2:1:he.x>te.x&&(Se=ge.x>te.x?0:ne.y<te.y?2:1),se.j=Se),x.push(se));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),Se=1,se=x[te].jc,he=te;he<E;he++)ge=x[he],ge.jc!==se&&(Se++,se=ge.jc);for(this.zi(x,this.Ux,te,te+ne),Ne=1,se=x[te].first,he=te;he<E;he++)ge=x[he],ge.first!==se&&(Ne++,se=ge.first);for(he=!0,ge=Ne,Se<Ne?(he=!1,ge=Se,se=x[te].jc,this.zi(x,this.Js,te,te+ne)):se=x[te].first,Se=0,Ne=te;Ne<E;Ne++)Ge=x[Ne],(he?Ge.first:Ge.jc)!==se&&(Se++,se=he?Ge.first:Ge.jc),Je=Ge.link,te=Je.i(Ge.index),ne=Je.i(Ge.index+1),nt=this.linkSpacing*(Se-(ge-1)/2),y++,Je.uh(),Je.L(Ge.index,te.x+nt,te.y),Je.L(Ge.index+1,ne.x+nt,ne.y),Je.zf()}te=E}a=b}}}},ot=lo.prototype,ot.Vx=function(a,y){return a instanceof hd&&y instanceof hd&&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},ot.Ux=function(a,y){return a instanceof hd&&y instanceof hd&&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},ot.Js=function(a,y){return a instanceof hd&&y instanceof hd&&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},ot.B=function(a,y){return a-=y,-1<a&&1>a},ot.zi=function(a,y,x,b){var E=a.length,te=b-x;if(!(1>=te))if((0>x||x>=E-1)&&Yt("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 ud(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 cd(a,y,x){a.He[a.tc[y]]=x}Ut.Object.defineProperties(lo.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()):Yt("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==xy&&a!==O0&&a!==Ug||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==N0&&a!==wy&&a!==by||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==A0&&a!==Py&&a!==Cy||(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!==Ey&&a!==j0&&a!==Ty||(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 O0=new tn(lo,"CycleDepthFirst",0),xy=new tn(lo,"CycleGreedy",1),Ug=new tn(lo,"CycleFromLayers",2),N0=new tn(lo,"LayerOptimalLinkLength",0),wy=new tn(lo,"LayerLongestPathSink",1),by=new tn(lo,"LayerLongestPathSource",2),A0=new tn(lo,"InitDepthFirstOut",0),Py=new tn(lo,"InitDepthFirstIn",1),Cy=new tn(lo,"InitNaive",2),Ey=new tn(lo,"AggressiveNone",0),j0=new tn(lo,"AggressiveLess",1),Ty=new tn(lo,"AggressiveMore",2),Zx=8;lo.className="LayeredDigraphLayout",lo.CycleDepthFirst=O0,lo.CycleGreedy=xy,lo.CycleFromLayers=Ug,lo.LayerOptimalLinkLength=N0,lo.LayerLongestPathSink=wy,lo.LayerLongestPathSource=by,lo.InitDepthFirstOut=A0,lo.InitDepthFirstIn=Py,lo.InitNaive=Cy,lo.AggressiveNone=Ey,lo.AggressiveLess=j0,lo.AggressiveMore=Ty,lo.PackNone=0,lo.PackExpand=1,lo.PackStraighten=2,lo.PackMedian=4,lo.PackAll=15,lo.AlignNone=0,lo.AlignUpperLeft=1,lo.AlignUpperRight=2,lo.AlignLowerLeft=4,lo.AlignLowerRight=8,lo.AlignAll=15;function hd(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}hd.className="SegInfo";function Np(a){Eo.call(this,a)}un(Np,Eo),Np.prototype.createVertex=function(){return new du(this)},Np.prototype.createEdge=function(){return new Wg(this)},Np.className="LayeredDigraphNetwork";function du(a){Ua.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}un(du,Ua);function ix(a,y){return a.index-y.index}function I0(a,y){if(!a.$n){for(var x=[],b=Yr(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=Yr(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;Yt("Unable to find destination edge to given vertex")}function My(a){if(!a.co){for(var y=[],x=Yr(a.sourceEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.fromVertex);y.sort(ix),a.co=y}return a.co}function Xx(a){if(!a.ao){for(var y=[],x=Yr(a.destinationEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.toVertex);y.sort(ix),a.ao=y}return a.ao}du.prototype.Cl=function(a){Ua.prototype.Cl.call(this,a),this.bo=this.co=null},du.prototype.Kl=function(a){Ua.prototype.Kl.call(this,a),this.bo=this.co=null},du.prototype.zl=function(a){Ua.prototype.zl.call(this,a),this.$n=this.ao=null},du.prototype.Jl=function(a){Ua.prototype.Jl.call(this,a),this.$n=this.ao=null},Ut.Object.defineProperties(du.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)}}}),du.prototype.deleteDestinationEdge=du.prototype.Jl,du.prototype.addDestinationEdge=du.prototype.zl,du.prototype.deleteSourceEdge=du.prototype.Kl,du.prototype.addSourceEdge=du.prototype.Cl,du.className="LayeredDigraphVertex";function Wg(a){kl.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}un(Wg,kl),Ut.Object.defineProperties(Wg.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)}}}),Wg.className="LayeredDigraphEdge";function Ci(a){Ro.call(this),this.Ub=new Nn,this.Wn=R0,this.ud=Ic,this.vo=z0,this.Bq=Ry,this.$v=[],this.td=!0,this.Rb=$0,this.$d=new Zn(10,10).freeze();var y=new If(this);this.W=new wu(y),this.Y=new wu(y),this.ru=[],a&&Object.assign(this,a)}un(Ci,Ro),Ci.prototype.cloneProtected=function(a){Ro.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)},Ci.prototype.qb=function(a){a.classType===Ci?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:Yt("Unknown enum value: "+a):Ro.prototype.qb.call(this,a)},Ci.prototype.createNetwork=function(){return new If(this)},Ci.prototype.makeNetwork=function(a){function y(b){if(b instanceof nr)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof Vn){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 cn?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof ni?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},Ci.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==G0&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof cn&&(y=a),this.path===R0&&y!==null?this.ud=y.isTreePathToChildren?Ic:Af:this.ud=this.path===R0?Ic:this.path,0<this.network.vertexes.count){for(this.network.Ko(),a=this.network.vertexes.iterator;a.next();)y=a.value,y.initialized=!1,y.level=0,y.parent=null,y.children=[];if(0<this.Ub.count){for(a=new Nn,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof nr?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof wu&&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,Ly(this,y));for(y=this.network.vertexes,a=null;a=Yx(y),0<a.count;)y=ox(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,Ly(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof wu&&sx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof wu&&lx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof wu&&ux(this,y);if(this.Cu(),this.layerStyle===H0){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===_y)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 wu&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new Nn,this.isValidLayout=!0};function Yx(a){var y=new Nn;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}Ci.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case Ic:x.sourceEdges.count===0&&this.Ub.add(x);break;case Af:x.destinationEdges.count===0&&this.Ub.add(x);break;default:Yt("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 Ic:E.sourceEdges.count<x&&(x=E.sourceEdges.count,b=E);break;case Af:E.destinationEdges.count<x&&(x=E.destinationEdges.count,b=E);break;default:Yt("Unhandled path value "+a.ud.toString())}}return b}function Ly(a,y){if(y!==null){switch(a.ud){case Ic:if(0<y.destinationEdges.count){for(var x=new Ln,b=y.destinationVertexes;b.next();){var E=b.value;ax(a,y,E)&&x.add(E)}0<x.count&&(y.children=x.Fa())}break;case Af:if(0<y.sourceEdges.count){for(x=new Ln,b=y.sourceVertexes;b.next();)E=b.value,ax(a,y,E)&&x.add(E);0<x.count&&(y.children=x.Fa())}break;default:Yt("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++)Ly(a,x[y])}}function ax(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}Ci.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 sx(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===Bc&&a.sortTreeVertexChildren(y);for(var x=0,b=y.childrenCount,E=0,te=y.children,ne=te.length,se=0;se<ne;se++){var he=te[se];sx(a,he),x+=he.descendantCount+1,b=Math.max(b,he.maxChildrenCount),E=Math.max(E,he.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 Fy: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}}Ci.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(Jx(this,a)),a.parent!==null&&a.parent.alignment===Bc){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])}}Ci.prototype.assignTreeVertexValues=function(){};function ux(a,y){if(y!==null){y.alignment!==Bc&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,b=0;b<x;b++)ux(a,y[b])}}Ci.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Ap:break;case Vg:a.children.reverse();break;case Zg:a.children.sort(a.comparer);break;case Xg:a.children.sort(a.comparer),a.children.reverse();break;default:Yt("Unhandled sorting value "+a.sorting.toString())}},Ci.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Ci.prototype.addComments=function(a){var y=a.angle,x=a.parent,b=0,E=!1;x!==null&&(b=x.angle,E=x.alignment,E=dd(E)),y=y===90||y===270,b=b===90||b===270,x=a.childrenCount===0;var te=0,ne=0,se=0,he=a.commentSpacing;if(a.node!==null)for(var ge=a.node.Mu();ge.next();){var Se=ge.value;Se.category==="Comment"&&Se.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(Se),Se.Va(),Se=Se.measuredBounds,y&&!x||!E&&!b&&x||E&&b&&x?(te=Math.max(te,Se.width),ne+=Se.height+Math.abs(se)):(te+=Se.width+Math.abs(se),ne=Math.max(ne,Se.height)),se=he)}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=wn.allocAt(0,0,a.bounds.width+te,a.bounds.height+ne),a.bounds=E,wn.free(E))};function dd(a){return a===Ah||a===Bc||a===jh||a===ih}function Kg(a){return a===Ah||a===Bc}function ky(a){var y=a.parent;if(y!==null){var x=y.alignment;if(dd(x)){if(Kg(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===jh)return!0}}return!1}Ci.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=dd(te)),b=b===90||b===270,x=E===90||E===270;for(var ne=a.childrenCount===0,se=ky(a),he=0,ge=a.comments,Se=ge.length,Ne=It.alloc(),Ge=0;Ge<Se;Ge++){var Je=ge[Ge],nt=Je.measuredBounds;if(b&&!ne||!te&&!x&&ne||te&&x&&ne){if(135<E&&!te||x&&se)if(0<=a.commentMargin)for(Ne.h(a.bounds.x-a.commentMargin-nt.width,a.bounds.y+he),Je.move(Ne),Je=Je.Sd();Je.next();){var ct=Je.value;ct.fromSpot=Ca,ct.toSpot=Va}else for(Ne.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+he),Je.move(Ne),Je=Je.Sd();Je.next();)ct=Je.value,ct.fromSpot=Va,ct.toSpot=Ca;else if(0<=a.commentMargin)for(Ne.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+he),Je.move(Ne),Je=Je.Sd();Je.next();)ct=Je.value,ct.fromSpot=Va,ct.toSpot=Ca;else for(Ne.h(a.bounds.x+a.commentMargin-nt.width,a.bounds.y+he),Je.move(Ne),Je=Je.Sd();Je.next();)ct=Je.value,ct.fromSpot=Ca,ct.toSpot=Va;he=0<=a.commentSpacing?he+(nt.height+a.commentSpacing):he+(a.commentSpacing-nt.height)}else{if(135<E&&!te||!x&&se)if(0<=a.commentMargin)for(Ne.h(a.bounds.x+he,a.bounds.y-a.commentMargin-nt.height),Je.move(Ne),Je=Je.Sd();Je.next();)ct=Je.value,ct.fromSpot=ca,ct.toSpot=za;else for(Ne.h(a.bounds.x+he,a.bounds.y+2*a.focus.y-a.commentMargin),Je.move(Ne),Je=Je.Sd();Je.next();)ct=Je.value,ct.fromSpot=za,ct.toSpot=ca;else if(0<=a.commentMargin)for(Ne.h(a.bounds.x+he,a.bounds.y+2*a.focus.y+a.commentMargin),Je.move(Ne),Je=Je.Sd();Je.next();)ct=Je.value,ct.fromSpot=za,ct.toSpot=ca;else for(Ne.h(a.bounds.x+he,a.bounds.y+a.commentMargin-nt.height),Je.move(Ne),Je=Je.Sd();Je.next();)ct=Je.value,ct.fromSpot=ca,ct.toSpot=za;he=0<=a.commentSpacing?he+(nt.width+a.commentSpacing):he+(a.commentSpacing-nt.width)}}if(It.free(Ne),y=he-a.commentSpacing-(b?y.height:y.width),this.ud===Ic)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)}},Ci.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 _0:cx(this,a);break;case Yg:if(a.alignment===Bc)cx(this,a);else if(a.childrenCount===0)b=a.parent,x=!1,y=0,b!==null&&(y=b.angle,x=b.alignment,x=dd(x)),b=ky(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=Du(a);y=E===90||E===270;var te=0,ne=a.children,se=ne.length;for(x=0;x<se;x++)b=ne[x],te=Math.max(te,y?b.Da.width:b.Da.height);var he=a.alignment;b=he===Dc;var ge=he===Fc,Se=dd(he),Ne=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var Ge=a.nodeSpacing,Je=this.computeNodeIndent(a),nt=a.rowSpacing,ct=0;(b||ge||a.hm||a.im&&a.maxGenerationCount===1)&&(ct=Math.max(0,a.rowIndent)),b=a.width;var Ft=a.height,Ot=0,zt=0,Ht=0,Wt=null,Xt=null,hn=0,er=0,cr=0,sr=0,Wn=0,An=0,ei=0,Vr=0;if(Se&&!Kg(he)&&135<E&&ne.reverse(),Kg(he))if(1<se)for(var Xi=0;Xi<se;Xi++)Xi%2===0&&Xi!==se-1&&(Vr=Math.max(Vr,y?ne[Xi].Da.width:ne[Xi].Da.height));else se===1&&(Vr=y?ne[0].Da.width:ne[0].Da.height);if(Se){switch(he){case Ah:zt=135>E?hx(this,a,ne,Vr,Ot,zt):dx(this,a,ne,Vr,Ot,zt),Vr=zt.x,Ot=zt.width,zt=zt.height;break;case jh:for(Wt=0;Wt<se;Wt++)Xt=ne[Wt],Ne=Xt.Da,Ht=An===0?0:nt,y?(Xt.S.h(te-Ne.width,sr+Ht),Ot=Math.max(Ot,Ne.width),zt=Math.max(zt,sr+Ht+Ne.height),sr+=Ht+Ne.height):(Xt.S.h(cr+Ht,te-Ne.height),Ot=Math.max(Ot,cr+Ht+Ne.width),zt=Math.max(zt,Ne.height),cr+=Ht+Ne.width),An++;break;case ih:for(Wt=0;Wt<se;Wt++)Xt=ne[Wt],te=Xt.Da,Ne=An===0?0:nt,y?(Xt.S.h(Ge/2+a.focus.x,sr+Ne),Ot=Math.max(Ot,te.width),zt=Math.max(zt,sr+Ne+te.height),sr+=Ne+te.height):(Xt.S.h(cr+Ne,Ge/2+a.focus.y),Ot=Math.max(Ot,cr+Ne+te.width),zt=Math.max(zt,te.height),cr+=Ne+te.width),An++}Wt=yl(this,2),Xt=yl(this,2),y?(Wt[0].h(0,0),Wt[1].h(0,zt),Xt[0].h(Ot,0)):(Wt[0].h(0,0),Wt[1].h(Ot,0),Xt[0].h(0,zt)),Xt[1].h(Ot,zt)}else for(Xi=0;Xi<se;Xi++){var bo=ne[Xi],Qa=bo.Da;if(y){0<Ne&&0<An&&cr+Ge+Qa.width>Ne&&(cr<te&&Jd(a,he,te-cr,0,ei,Xi-1),Wn++,An=0,ei=Xi,Ht=zt,cr=0,sr=135<E?-zt-nt:zt+nt),F0(this,bo,0,sr);var rs=0;if(An===0)Wt=bo.Yo,Xt=bo.kp,hn=Qa.width,er=Qa.height,(Wt===null||Xt===null||E!==Du(bo))&&(Wt=yl(this,2),Xt=yl(this,2),Wt[0].h(0,0),Wt[1].h(0,er),Xt[0].h(hn,0),Xt[1].h(hn,er));else{var Fs=pn();er=fx(this,a,bo,Wt,Xt,hn,er,Fs),rs=er.x,Wt=Fs[0],Xt=Fs[1],hn=er.width,er=er.height,On(Fs),cr<Qa.width&&0>rs&&(Nf(a,-rs,0,ei,Xi-1),B0(Wt,-rs,0),B0(Xt,-rs,0),rs=0)}bo.S.h(rs,sr),Ot=Math.max(Ot,hn),zt=Math.max(zt,Ht+(Wn===0?0:nt)+Qa.height),cr=hn}else 0<Ne&&0<An&&sr+Ge+Qa.height>Ne&&(sr<te&&Jd(a,he,0,te-sr,ei,Xi-1),Wn++,An=0,ei=Xi,Ht=Ot,sr=0,cr=135<E?-Ot-nt:Ot+nt),F0(this,bo,cr,0),rs=0,An===0?(Wt=bo.Yo,Xt=bo.kp,hn=Qa.width,er=Qa.height,(Wt===null||Xt===null||E!==Du(bo))&&(Wt=yl(this,2),Xt=yl(this,2),Wt[0].h(0,0),Wt[1].h(hn,0),Xt[0].h(0,er),Xt[1].h(hn,er))):(Fs=pn(),er=fx(this,a,bo,Wt,Xt,hn,er,Fs),rs=er.x,Wt=Fs[0],Xt=Fs[1],hn=er.width,er=er.height,On(Fs),sr<Qa.height&&0>rs&&(Nf(a,0,-rs,ei,Xi-1),B0(Wt,0,-rs),B0(Xt,0,-rs),rs=0)),bo.S.h(cr,rs),zt=Math.max(zt,er),Ot=Math.max(Ot,Ht+(Wn===0?0:nt)+Qa.width),sr=er;An++}switch(0<Wn&&(y?(zt+=Math.max(0,x),cr<Ot&&Jd(a,he,Ot-cr,0,ei,se-1),0<ct&&(ge||Nf(a,ct,0,0,se-1),Ot+=ct)):(Ot+=Math.max(0,x),sr<zt&&Jd(a,he,0,zt-sr,ei,se-1),0<ct&&(ge||Nf(a,0,ct,0,se-1),zt+=ct))),ct=ge=0,he){case jp:y?ge+=Ot/2-a.focus.x-Je/2:ct+=zt/2-a.focus.y-Je/2;break;case jf:0<Wn?y?ge+=Ot/2-a.focus.x-Je/2:ct+=zt/2-a.focus.y-Je/2:y?(Vr=ne[0].S.x+ne[0].la.x,ge+=Vr+(ne[se-1].S.x+ne[se-1].la.x+2*ne[se-1].focus.x-Vr)/2-a.focus.x-Je/2):(Vr=ne[0].S.y+ne[0].la.y,ct+=Vr+(ne[se-1].S.y+ne[se-1].la.y+2*ne[se-1].focus.y-Vr)/2-a.focus.y-Je/2);break;case Dc:y?(ge-=Je,Ot+=Je):(ct-=Je,zt+=Je);break;case Fc:y?(ge+=Ot-a.width+Je,Ot+=Je):(ct+=zt-a.height+Je,zt+=Je);break;case Ah:y?1<se?ge+=Vr+Ge/2-a.focus.x:ge+=ne[0].focus.x-a.focus.x+ne[0].la.x:1<se?ct+=Vr+Ge/2-a.focus.y:ct+=ne[0].focus.y-a.focus.y+ne[0].la.y;break;case jh:y?ge+=Ot+Ge/2-a.focus.x:ct+=zt+Ge/2-a.focus.y;break;case ih:break;default:zt=this.customAlignment(a,ge,ct,Ot,zt),ge=zt[0],ct=zt[1],Ot=zt[2],zt=zt[3]}for(Je=0;Je<se;Je++)Vr=ne[Je],y?Vr.S.h(Vr.S.x+Vr.la.x-ge,Vr.S.y+(135<E?(Se?-zt:-Vr.Da.height)+Vr.la.y-x:Ft+x+Vr.la.y)):Vr.S.h(Vr.S.x+(135<E?(Se?-Ot:-Vr.Da.width)+Vr.la.x-x:b+x+Vr.la.x),Vr.S.y+Vr.la.y-ct);if(se=ne=0,Se?y?(Ot=Oy(a,Ot,ge),0>ge&&(ge=0),135<E&&(ct+=zt+x),zt+=Ft+x,he===ih&&(ne+=Ge/2+a.focus.x),se+=Ft+x):(135<E&&(ge+=Ot+x),Ot+=b+x,zt=Ny(a,zt,ct),0>ct&&(ct=0),he===ih&&(se+=Ge/2+a.focus.y),ne+=b+x):y?(a.comments===null?b>Ot&&(Ot=Ay(he,b-Ot,0),ne=Ot.x,se=Ot.y,Ot=b,ge=0):Ot=Oy(a,Ot,ge),0>ge&&(ne-=ge,ge=0),135<E&&(ct+=zt+x),zt=Math.max(Math.max(zt,Ft),zt+Ft+x),se+=Ft+x):(135<E&&(ge+=Ot+x),Ot=Math.max(Math.max(Ot,b),Ot+b+x),a.comments===null?Ft>zt&&(zt=Ay(he,0,Ft-zt),ne=zt.x,se=zt.y,zt=Ft,ct=0):zt=Ny(a,zt,ct),0>ct&&(se-=ct,ct=0),ne+=b+x),0<Wn)E=yl(this,4),Wn=yl(this,4),y?(E[2].h(0,Ft+x),E[3].h(E[2].x,zt),Wn[2].h(Ot,E[2].y),Wn[3].h(Wn[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(Ot,E[2].y),Wn[2].h(E[2].x,zt),Wn[3].h(E[3].x,Wn[2].y));else{for(E=yl(this,Wt.length+2),Wn=yl(this,Xt.length+2),he=0;he<Wt.length;he++)Se=Wt[he],E[he+2].h(Se.x+ne,Se.y+se);for(he=0;he<Xt.length;he++)Se=Xt[he],Wn[he+2].h(Se.x+ne,Se.y+se)}y?(E[0].h(ge,0),E[1].h(E[0].x,Ft),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])),Wn[0].h(ge+b,0),Wn[1].h(Wn[0].x,Ft),Wn[2].y<Wn[1].y&&(Wn[2].x<Wn[0].x?Wn[2].assign(Wn[1]):Wn[1].assign(Wn[2])),Wn[3].y<Wn[2].y&&(Wn[3].x<Wn[0].x?Wn[3].assign(Wn[2]):Wn[2].assign(Wn[3])),E[2].y-=x/2,Wn[2].y-=x/2):(E[0].h(0,ct),E[1].h(b,E[0].y),E[2].x<E[1].x&&(E[2].y>E[0].y?E[2].assign(E[1]):E[1].assign(E[2])),E[3].x<E[2].x&&(E[3].y>E[0].y?E[3].assign(E[2]):E[2].assign(E[3])),Wn[0].h(0,ct+Ft),Wn[1].h(b,Wn[0].y),Wn[2].x<Wn[1].x&&(Wn[2].y<Wn[0].y?Wn[2].assign(Wn[1]):Wn[1].assign(Wn[2])),Wn[3].x<Wn[2].x&&(Wn[3].y<Wn[0].y?Wn[3].assign(Wn[2]):Wn[2].assign(Wn[3])),E[2].x-=x/2,Wn[2].x-=x/2),Qu(this,Wt),Qu(this,Xt),a.Yo=E,a.kp=Wn,a.la.h(ge,ct),a.Da.h(Ot,zt)}break;default:Yt("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=dd(x));var E=ky(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=Du(y),x=b===90||b===270;var te=0;E=y.children;for(var ne=E.length,se=0;se<ne;se++){var he=E[se];te=Math.max(te,x?he.Da.width:he.Da.height)}var ge=y.alignment,Se=ge===Dc,Ne=ge===Fc;se=dd(ge);var Ge=Math.max(0,y.breadthLimit);he=a.computeLayerSpacing(y);var Je=y.nodeSpacing,nt=a.computeNodeIndent(y),ct=Se||Ne?0:nt/2,Ft=y.rowSpacing,Ot=0;(Se||Ne||y.hm||y.im&&y.maxGenerationCount===1)&&(Ot=Math.max(0,y.rowIndent)),Se=y.width;var zt=y.height,Ht=0,Wt=0,Xt=0,hn=0,er=0,cr=0,sr=0,Wn=0,An=0,ei=0;if(se&&!Kg(ge)&&135<b&&E.reverse(),Kg(ge))if(1<ne)for(var Vr=0;Vr<ne;Vr++){var Xi=E[Vr],bo=Xi.Da;Vr%2===0&&Vr!==ne-1?An=Math.max(An,(x?bo.width:bo.height)+a.computeBusNodeSpacing(Xi)-Je):Vr%2!==0&&(ei=Math.max(ei,(x?bo.width:bo.height)+a.computeBusNodeSpacing(Xi)-Je))}else ne===1&&(An=x?E[0].Da.width:E[0].Da.height);if(se)switch(ge){case Ah:case Bc:Wt=135>b?hx(a,y,E,An,Ht,Wt):dx(a,y,E,An,Ht,Wt),An=Wt.x,Ht=Wt.width,Wt=Wt.height;break;case jh:for(Ge=0;Ge<ne;Ge++)ct=E[Ge],Xt=ct.Da,ei=sr===0?0:Ft,x?(ct.S.h(te-Xt.width,er+ei),Ht=Math.max(Ht,Xt.width),Wt=Math.max(Wt,er+ei+Xt.height),er+=ei+Xt.height):(ct.S.h(hn+ei,te-Xt.height),Ht=Math.max(Ht,hn+ei+Xt.width),Wt=Math.max(Wt,Xt.height),hn+=ei+Xt.width),sr++;break;case ih:for(te=0;te<ne;te++)Ge=E[te],ct=Ge.Da,Xt=sr===0?0:Ft,x?(Ge.S.h(Je/2+y.focus.x,er+Xt),Ht=Math.max(Ht,ct.width),Wt=Math.max(Wt,er+Xt+ct.height),er+=Xt+ct.height):(Ge.S.h(hn+Xt,Je/2+y.focus.y),Ht=Math.max(Ht,hn+Xt+ct.width),Wt=Math.max(Wt,ct.height),hn+=Xt+ct.width),sr++}else for(ei=0;ei<ne;ei++)Vr=E[ei],Xi=Vr.Da,x?(0<Ge&&0<sr&&hn+Je+Xi.width>Ge&&(hn<te&&Jd(y,ge,te-hn,0,Wn,ei-1),cr++,sr=0,Wn=ei,Xt=Wt,hn=0,er=135<b?-Wt-Ft:Wt+Ft),bo=sr===0?ct:Je,F0(a,Vr,0,er),Vr.S.h(hn+bo,er),Ht=Math.max(Ht,hn+bo+Xi.width),Wt=Math.max(Wt,Xt+(cr===0?0:Ft)+Xi.height),hn+=bo+Xi.width):(0<Ge&&0<sr&&er+Je+Xi.height>Ge&&(er<te&&Jd(y,ge,0,te-er,Wn,ei-1),cr++,sr=0,Wn=ei,Xt=Ht,er=0,hn=135<b?-Ht-Ft:Ht+Ft),bo=sr===0?ct:Je,F0(a,Vr,hn,0),Vr.S.h(hn,er+bo),Wt=Math.max(Wt,er+bo+Xi.height),Ht=Math.max(Ht,Xt+(cr===0?0:Ft)+Xi.width),er+=bo+Xi.height),sr++;switch(0<cr&&(x?(Wt+=Math.max(0,he),hn<Ht&&Jd(y,ge,Ht-hn,0,Wn,ne-1),0<Ot&&(Ne||Nf(y,Ot,0,0,ne-1),Ht+=Ot)):(Ht+=Math.max(0,he),er<Wt&&Jd(y,ge,0,Wt-er,Wn,ne-1),0<Ot&&(Ne||Nf(y,0,Ot,0,ne-1),Wt+=Ot))),Ot=Ne=0,ge){case jp:x?Ne+=Ht/2-y.focus.x-nt/2:Ot+=Wt/2-y.focus.y-nt/2;break;case jf:0<cr?x?Ne+=Ht/2-y.focus.x-nt/2:Ot+=Wt/2-y.focus.y-nt/2:x?(a=E[0].S.x+E[0].la.x,Ne+=a+(E[ne-1].S.x+E[ne-1].la.x+2*E[ne-1].focus.x-a)/2-y.focus.x-nt/2):(a=E[0].S.y+E[0].la.y,Ot+=a+(E[ne-1].S.y+E[ne-1].la.y+2*E[ne-1].focus.y-a)/2-y.focus.y-nt/2);break;case Dc:x?(Ne-=nt,Ht+=nt):(Ot-=nt,Wt+=nt);break;case Fc:x?(Ne+=Ht-y.width+nt,Ht+=nt):(Ot+=Wt-y.height+nt,Wt+=nt);break;case Ah:case Bc:x?1<ne?Ne+=An+Je/2-y.focus.x:Ne+=E[0].focus.x-y.focus.x+E[0].la.x:1<ne?Ot+=An+Je/2-y.focus.y:Ot+=E[0].focus.y-y.focus.y+E[0].la.y;break;case jh:x?Ne+=Ht+Je/2-y.focus.x:Ot+=Wt+Je/2-y.focus.y;break;case ih:break;default:a=a.customAlignment(y,Ne,Ot,Ht,Wt),Ne=a[0],Ot=a[1],Ht=a[2],Wt=a[3]}for(a=0;a<ne;a++)nt=E[a],x?nt.S.h(nt.S.x+nt.la.x-Ne,nt.S.y+(135<b?(se?-Wt:-nt.Da.height)+nt.la.y-he:zt+he+nt.la.y)):nt.S.h(nt.S.x+(135<b?(se?-Ht:-nt.Da.width)+nt.la.x-he:Se+he+nt.la.x),nt.S.y+nt.la.y-Ot);x?(Ht=Oy(y,Ht,Ne),0>Ne&&(Ne=0),135<b&&(Ot+=Wt+he),Wt=Math.max(Math.max(Wt,zt),Wt+zt+he)):(135<b&&(Ne+=Ht+he),Ht=Math.max(Math.max(Ht,Se),Ht+Se+he),Wt=Ny(y,Wt,Ot),0>Ot&&(Ot=0)),y.la.h(Ne,Ot),y.Da.h(Ht,Wt)}}Ci.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 wn(b,0,E,te);if(ne===1)return y=x[0],E=y.Da.width,te=y.Da.height,new wn(b,0,E,te);for(var se=y.nodeSpacing,he=y.rowSpacing,ge=Du(y)===90,Se=0,Ne=0,Ge=0,Je=0;Je<ne;Je++)if(!(Je%2!==0||1<ne&&Je===ne-1)){var nt=x[Je],ct=nt.Da,Ft=Se===0?0:he;if(ge){var Ot=a.computeBusNodeSpacing(nt)-se;nt.S.h(b-(ct.width+Ot),Ge+Ft),E=Math.max(E,ct.width+Ot),te=Math.max(te,Ge+Ft+ct.height),Ge+=Ft+ct.height}else Ot=a.computeBusNodeSpacing(nt)-se,nt.S.h(Ne+Ft,b-(ct.height+Ot)),te=Math.max(te,ct.height+Ot),E=Math.max(E,Ne+Ft+ct.width),Ne+=Ft+ct.width;Se++}for(Se=0,nt=Ne,Je=Ge,ge?(Ne=b+se,Ge=0):(Ne=0,Ge=b+se),ct=0;ct<ne;ct++)if(ct%2!==0){Ft=x[ct],Ot=Ft.Da;var zt=Se===0?0:he;if(ge){var Ht=a.computeBusNodeSpacing(Ft)-se;Ft.S.h(Ne+Ht,Ge+zt),E=Math.max(E,Ne+Ot.width+Ht),te=Math.max(te,Ge+zt+Ot.height),Ge+=zt+Ot.height}else Ht=a.computeBusNodeSpacing(Ft)-se,Ft.S.h(Ne+zt,Ge+Ht),E=Math.max(E,Ne+zt+Ot.width),te=Math.max(te,Ge+Ot.height+Ht),Ne+=zt+Ot.width;Se++}return 1<ne&&ne%2===1&&(x=x[ne-1],ne=x.Da,a=a.computeBusLastRowSpacing(x,ge?Math.max(Math.abs(Je),Math.abs(Ge)):Math.max(Math.abs(nt),Math.abs(Ne))),ge?(x.S.h(b+se/2-x.focus.x-x.la.x,te+a),ge=b+se/2-x.focus.x-x.la.x,E=Math.max(E,ge+ne.width),0>ge&&(E-=ge),te=Math.max(te,Math.max(Je,Ge)+a+ne.height),0>x.S.x&&(b=D0(y,x.S.x,!1,b,se))):(x.S.h(E+a,b+se/2-x.focus.y-x.la.y),E=Math.max(E,Math.max(nt,Ne)+a+ne.width),Ge=b+se/2-x.focus.y-x.la.y,te=Math.max(te,Ge+ne.height),0>Ge&&(te-=Ge),0>x.S.y&&(b=D0(y,x.S.y,!0,b,se)))),new wn(b,0,E,te)}function dx(a,y,x,b,E,te){var ne=x.length;if(ne===0)return new wn(b,0,E,te);if(ne===1)return x=x[0],E=x.Da.width,te=x.Da.height,new wn(b,0,E,te);for(var se=y.nodeSpacing,he=y.rowSpacing,ge=Du(y)===270,Se=0,Ne=0,Ge=0,Je=0;Je<ne;Je++)if(!(Je%2!==0||1<ne&&Je===ne-1)){var nt=x[Je],ct=nt.Da,Ft=Se===0?0:he;if(ge){var Ot=a.computeBusNodeSpacing(nt)-se;Ge-=Ft+ct.height,nt.S.h(b-(ct.width+Ot),Ge),E=Math.max(E,ct.width+Ot),te=Math.max(te,Math.abs(Ge))}else Ot=a.computeBusNodeSpacing(nt)-se,Ne-=Ft+ct.width,nt.S.h(Ne,b-(ct.height+Ot)),te=Math.max(te,ct.height+Ot),E=Math.max(E,Math.abs(Ne));Se++}for(Se=0,nt=Ne,Je=Ge,ge?(Ne=b+se,Ge=0):(Ne=0,Ge=b+se),ct=0;ct<ne;ct++)if(ct%2!==0){Ft=x[ct],Ot=Ft.Da;var zt=Se===0?0:he;if(ge){var Ht=a.computeBusNodeSpacing(Ft)-se;Ge-=zt+Ot.height,Ft.S.h(Ne+Ht,Ge),E=Math.max(E,Ne+Ot.width+Ht),te=Math.max(te,Math.abs(Ge))}else Ht=a.computeBusNodeSpacing(Ft)-se,Ne-=zt+Ot.width,Ft.S.h(Ne,Ge+Ht),te=Math.max(te,Ge+Ot.height+Ht),E=Math.max(E,Math.abs(Ne));Se++}for(1<ne&&ne%2===1&&(he=x[ne-1],Se=he.Da,a=a.computeBusLastRowSpacing(he,ge?Math.max(Math.abs(Je),Math.abs(Ge)):Math.max(Math.abs(nt),Math.abs(Ne))),ge?(he.S.h(b+se/2-he.focus.x-he.la.x,-te-Se.height-a),Ne=b+se/2-he.focus.x-he.la.x,E=Math.max(E,Ne+Se.width),0>Ne&&(E-=Ne),te=Math.max(te,Math.abs(Math.min(Je,Ge))+a+Se.height),0>he.S.x&&(b=D0(y,he.S.x,!1,b,se))):(he.S.h(-E-Se.width-a,b+se/2-he.focus.y-he.la.y),E=Math.max(E,Math.abs(Math.min(nt,Ne))+a+Se.width),Ge=b+se/2-he.focus.y-he.la.y,te=Math.max(te,Ge+Se.height),0>Ge&&(te-=Ge),0>he.S.y&&(b=D0(y,he.S.y,!0,b,se)))),y=0;y<ne;y++)se=x[y],ge?se.S.h(se.S.x,se.S.y+te):se.S.h(se.S.x+E,se.S.y);return new wn(b,0,E,te)}Ci.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},Ci.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 Oy(a,y,x){switch(a.alignment){case jf:case jp:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case Dc:return a.width>y?a.width:y;case Fc:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case Ah:case Bc:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case jh:return a.width-a.focus.x+a.nodeSpacing/2+y;case ih:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Ny(a,y,x){switch(a.alignment){case jf:case jp:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case Dc:return a.height>y?a.height:y;case Fc:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case Ah:case Bc:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case jh:return a.height-a.focus.y+a.nodeSpacing/2+y;case ih:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function Ay(a,y,x){switch(a){case jp:y/=2,x/=2;break;case jf:y/=2,x/=2;break;case Dc:x=y=0;break;case Fc:break;default:Yt("Unhandled alignment value "+a.toString())}return new It(y,x)}function Jd(a,y,x,b,E,te){y=Ay(y,x,b),Nf(a,y.x,y.y,E,te)}function Nf(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 F0(a,y,x,b){var E=y.parent;switch(a.ud){case Ic:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===E&&y.relativePoint.h(x,b);break;case Af:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===E&&y.relativePoint.h(x,b);break;default:Yt("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,se){var he=Du(y),ge=he===90||he===270,Se=y.nodeSpacing;y=b;var Ne=E;b=te;var Ge=ne,Je=x.Yo,nt=x.kp;ne=x.Da;var ct=ge?Math.max(Ge,ne.height):Math.max(b,ne.width);if((Je===null||he!==Du(x))&&(Je=yl(a,2),nt=yl(a,2),ge?(Je[0].h(0,0),Je[1].h(0,ne.height),nt[0].h(ne.width,0),nt[1].h(nt[0].x,Je[1].y)):(Je[0].h(0,0),Je[1].h(ne.width,0),nt[0].h(0,ne.height),nt[1].h(Je[1].x,nt[0].y))),ge){if(Ge=9999999,!(Ne===null||2>Ne.length||Je===null||2>Je.length))for(E=x=0;x<Ne.length&&E<Je.length;){te=Ne[x];var Ft=Je[E];he=Ft.x,ge=Ft.y,he+=b;var Ot=te;x+1<Ne.length&&(Ot=Ne[x+1]);var zt=Ft;Ft=zt.x,zt=zt.y,E+1<Je.length&&(zt=Je[E+1],Ft=zt.x,zt=zt.y,Ft+=b);var Ht=Ge;te.y===ge?Ht=he-te.x:te.y>ge&&te.y<zt?Ht=he+(te.y-ge)/(zt-ge)*(Ft-he)-te.x:ge>te.y&&ge<Ot.y&&(Ht=he-(te.x+(ge-te.y)/(Ot.y-te.y)*(Ot.x-te.x))),Ht<Ge&&(Ge=Ht),Ot.y<=te.y?x++:zt<=ge?E++:(Ot.y<=zt&&x++,zt<=Ot.y&&E++)}if(Ge=b-Ge,Ge+=Se,x=Je,E=Ge,y===null||2>y.length||x===null||2>x.length)b=null;else{for(Se=yl(a,y.length+x.length),b=te=he=0;te<x.length&&x[te].y<y[0].y;)ge=x[te++],Se[b++].h(ge.x+E,ge.y);for(;he<y.length;)ge=y[he++],Se[b++].h(ge.x,ge.y);for(he=y[y.length-1].y;te<x.length&&x[te].y<=he;)te++;for(;te<x.length&&x[te].y>he;)ge=x[te++],Se[b++].h(ge.x+E,ge.y);for(x=yl(a,b),he=0;he<b;he++)x[he].assign(Se[he]);Qu(a,Se),b=x}if(te=nt,he=Ge,Ne===null||2>Ne.length||te===null||2>te.length)E=null;else{for(Se=yl(a,Ne.length+te.length),E=ge=x=0;x<Ne.length&&Ne[x].y<te[0].y;)Ot=Ne[x++],Se[E++].h(Ot.x,Ot.y);for(;ge<te.length;)Ot=te[ge++],Se[E++].h(Ot.x+he,Ot.y);for(te=te[te.length-1].y;x<Ne.length&&Ne[x].y<=te;)x++;for(;x<Ne.length&&Ne[x].y>te;)he=Ne[x++],Se[E++].h(he.x,he.y);for(te=yl(a,E),x=0;x<E;x++)te[x].assign(Se[x]);Qu(a,Se),E=te}return te=Math.max(0,Ge)+ne.width,ne=ct,Qu(a,y),Qu(a,Je),Qu(a,Ne),Qu(a,nt),se[0]=b,se[1]=E,new wn(Ge,0,te,ne)}if(b=9999999,!(Ne===null||2>Ne.length||Je===null||2>Je.length))for(E=x=0;x<Ne.length&&E<Je.length;)te=Ne[x],Ft=Je[E],he=Ft.x,ge=Ft.y,ge+=Ge,Ot=te,x+1<Ne.length&&(Ot=Ne[x+1]),zt=Ft,Ft=zt.x,zt=zt.y,E+1<Je.length&&(zt=Je[E+1],Ft=zt.x,zt=zt.y,zt+=Ge),Ht=b,te.x===he?Ht=ge-te.y:te.x>he&&te.x<Ft?Ht=ge+(te.x-he)/(Ft-he)*(zt-ge)-te.y:he>te.x&&he<Ot.x&&(Ht=ge-(te.y+(he-te.x)/(Ot.x-te.x)*(Ot.y-te.y))),Ht<b&&(b=Ht),Ot.x<=te.x?x++:Ft<=he?E++:(Ot.x<=Ft&&x++,Ft<=Ot.x&&E++);if(Ge-=b,Ge+=Se,x=Je,E=Ge,y===null||2>y.length||x===null||2>x.length)b=null;else{for(Se=yl(a,y.length+x.length),b=te=he=0;te<x.length&&x[te].x<y[0].x;)ge=x[te++],Se[b++].h(ge.x,ge.y+E);for(;he<y.length;)ge=y[he++],Se[b++].h(ge.x,ge.y);for(he=y[y.length-1].x;te<x.length&&x[te].x<=he;)te++;for(;te<x.length&&x[te].x>he;)ge=x[te++],Se[b++].h(ge.x,ge.y+E);for(x=yl(a,b),he=0;he<b;he++)x[he].assign(Se[he]);Qu(a,Se),b=x}if(te=nt,he=Ge,Ne===null||2>Ne.length||te===null||2>te.length)E=null;else{for(Se=yl(a,Ne.length+te.length),E=ge=x=0;x<Ne.length&&Ne[x].x<te[0].x;)Ot=Ne[x++],Se[E++].h(Ot.x,Ot.y);for(;ge<te.length;)Ot=te[ge++],Se[E++].h(Ot.x,Ot.y+he);for(te=te[te.length-1].x;x<Ne.length&&Ne[x].x<=te;)x++;for(;x<Ne.length&&Ne[x].x>te;)he=Ne[x++],Se[E++].h(he.x,he.y);for(te=yl(a,E),x=0;x<E;x++)te[x].assign(Se[x]);Qu(a,Se),E=te}return te=ct,ne=Math.max(0,Ge)+ne.height,Qu(a,y),Qu(a,Je),Qu(a,Ne),Qu(a,nt),se[0]=b,se[1]=E,new wn(Ge,0,te,ne)}function yl(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 It;return a}function Qu(a,y){var x=y.length,b=a.ru[x];b===void 0&&(b=[],a.ru[x]=b),b.push(y)}Ci.prototype.arrangeTrees=function(){if(this.Rb===G0)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof wu){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),jy(this,y,x,b)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof wu&&a.push(x);switch(this.sorting){case Ap:break;case Vg:a.reverse();break;case Zg:a.sort(this.comparer);break;case Xg:a.sort(this.comparer),a.reverse();break;default:Yt("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(jy(this,E,y+E.la.x,x+E.la.y),this.Rb){case $0:x+=E.Da.height+this.$d.height;break;case By:y+=E.Da.width+this.$d.width;break;default:Yt("Unhandled arrangement value "+this.Rb.toString())}}}};function jy(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];jy(a,ne,x+ne.S.x,b+ne.S.y)}}}Ci.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},Ci.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},Ci.prototype.Gu=function(){if(this.layerStyle===H0){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 It(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),b=new It(-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 se=a[ne]+y[ne];this.angle===270?(te-=se,E.push(new wn(0,te,x,se))):this.angle===90?(E.push(new wn(0,te,x,se)),te+=se):this.angle===180?(te-=se,E.push(new wn(te,0,se,x))):(E.push(new wn(te,0,se,x)),te+=se)}this.commitLayers(E,b)}},Ci.prototype.commitLayers=function(){},Ci.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Ci.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof wu&&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])}}Ci.prototype.setPortSpots=function(a){var y=a.alignment;if(dd(y)){var x=this.ud===Ic,b=Du(a);switch(b){case 0:var E=Va;break;case 90:E=za;break;case 180:E=Ca;break;default:E=ca}var te=a.children,ne=te.length;switch(y){case Ah:case Bc:for(y=0;y<ne;y++){var se=te[y];if(se=(x?se.sourceEdges:se.destinationEdges).first(),se!==null&&(se=se.link,se!==null)){var he=b===90||b===270?Ca:ca;if(ne===1||y===ne-1&&ne%2===1)switch(b){case 0:he=Ca;break;case 90:he=ca;break;case 180:he=Va;break;default:he=za}else y%2===0&&(he=b===90||b===270?Va:za);x?(a.setsPortSpot&&(se.fromSpot=E),a.setsChildPortSpot&&(se.toSpot=he)):(a.setsPortSpot&&(se.fromSpot=he),a.setsChildPortSpot&&(se.toSpot=E))}}break;case jh:for(b=b===90||b===270?Va:za,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 ih:for(b=b===90||b===270?Ca:ca,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=Du(a),this.ud===Ic){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=Va;break;case 90:b.fromSpot=za;break;case 180:b.fromSpot=Ca;break;default:b.fromSpot=ca}else b.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.toSpot=Ca;break;case 90:b.toSpot=ca;break;case 180:b.toSpot=Va;break;default:b.toSpot=za}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=Va;break;case 90:b.toSpot=za;break;case 180:b.toSpot=Ca;break;default:b.toSpot=ca}else b.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.fromSpot=Ca;break;case 90:b.fromSpot=ca;break;case 180:b.fromSpot=Va;break;default:b.fromSpot=za}else b.fromSpot=a.childPortSpot}};function Du(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}Ci.prototype.computeLayerSpacing=function(a){var y=Du(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},Ci.prototype.computeNodeIndent=function(a){var y=Du(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)},Ut.Object.defineProperties(Ci.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!==Fy||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==Ry&&a!==_y&&a!==H0||(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!==$0&&a!==By&&a!==G0||(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!==Ap&&a!==Vg&&a!==Zg&&!Xg||(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()):Yt("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!==_0&&a!==Yg||(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!==Ap&&a!==Vg&&a!==Zg&&!Xg||(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!==_0&&a!==Yg||(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 R0=new tn(Ci,"PathDefault",-1),Ic=new tn(Ci,"PathDestination",0),Af=new tn(Ci,"PathSource",1),Ap=new tn(Ci,"SortingForwards",10),Vg=new tn(Ci,"SortingReverse",11),Zg=new tn(Ci,"SortingAscending",12),Xg=new tn(Ci,"SortingDescending",13),jp=new tn(Ci,"AlignmentCenterSubtrees",20),jf=new tn(Ci,"AlignmentCenterChildren",21),Dc=new tn(Ci,"AlignmentStart",22),Fc=new tn(Ci,"AlignmentEnd",23),Ah=new tn(Ci,"AlignmentBus",24),Bc=new tn(Ci,"AlignmentBusBranching",25),jh=new tn(Ci,"AlignmentTopLeftBus",26),ih=new tn(Ci,"AlignmentBottomRightBus",27),_0=new tn(Ci,"CompactionNone",30),Yg=new tn(Ci,"CompactionBlock",31),z0=new tn(Ci,"StyleLayered",40),Iy=new tn(Ci,"StyleLastParents",41),Dy=new tn(Ci,"StyleAlternating",42),Fy=new tn(Ci,"StyleRootOnly",43),$0=new tn(Ci,"ArrangementVertical",50),By=new tn(Ci,"ArrangementHorizontal",51),G0=new tn(Ci,"ArrangementFixedRoots",52),Ry=new tn(Ci,"LayerIndividual",60),_y=new tn(Ci,"LayerSiblings",61),H0=new tn(Ci,"LayerUniform",62);Ci.className="TreeLayout",Ci.PathDefault=R0,Ci.PathDestination=Ic,Ci.PathSource=Af,Ci.SortingForwards=Ap,Ci.SortingReverse=Vg,Ci.SortingAscending=Zg,Ci.SortingDescending=Xg,Ci.AlignmentCenterSubtrees=jp,Ci.AlignmentCenterChildren=jf,Ci.AlignmentStart=Dc,Ci.AlignmentEnd=Fc,Ci.AlignmentBus=Ah,Ci.AlignmentBusBranching=Bc,Ci.AlignmentTopLeftBus=jh,Ci.AlignmentBottomRightBus=ih,Ci.CompactionNone=_0,Ci.CompactionBlock=Yg,Ci.StyleLayered=z0,Ci.StyleLastParents=Iy,Ci.StyleAlternating=Dy,Ci.StyleRootOnly=Fy,Ci.ArrangementVertical=$0,Ci.ArrangementHorizontal=By,Ci.ArrangementFixedRoots=G0,Ci.LayerIndividual=Ry,Ci.LayerSiblings=_y,Ci.LayerUniform=H0;function If(a){Eo.call(this,a)}un(If,Eo),If.prototype.createVertex=function(){return new wu(this)},If.prototype.createEdge=function(){return new Ip(this)},If.className="TreeNetwork";function wu(a){Ua.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 It(0,0),this.Da=new Zn(0,0),this.la=new It(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Ap,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=Yg,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=ro,this.wr=!0,this.Dp=ro}un(wu,Ua),wu.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)},Ut.Object.defineProperties(wu.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)}}}),wu.className="TreeVertex";function Ip(a){kl.call(this,a),this.$t=new It(0,0)}un(Ip,kl),Ip.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 Ic:x=this.fromVertex,b=this.toVertex;break;case Af:x=this.toVertex,b=this.fromVertex;break;default:Yt("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=Du(x),ne=y.computeLayerSpacing(x),se=x.rowSpacing;a.vg();var he=a.curve===Yl,ge=a.isOrthogonal,Se;if(a.uh(),ge||he){for(Se=2;4<a.pointsCount;)a.pv(2);var Ne=a.i(1),Ge=a.i(2)}else{for(Se=1;3<a.pointsCount;)a.pv(1);Ne=a.i(0),Ge=a.i(a.pointsCount-1)}var Je=a.i(a.pointsCount-1);te===0?(x.alignment===Fc?(te=b.bottom+E.y,E.y===0&&Ne.y>Je.y+x.rowIndent&&(te=Math.min(te,Math.max(Ne.y,te-y.computeNodeIndent(x))))):x.alignment===Dc?(te=b.top+E.y,E.y===0&&Ne.y<Je.y-x.rowIndent&&(te=Math.max(te,Math.min(Ne.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,he?(a.m(Se,Ne.x,te),Se++,a.m(Se,b.right+ne,te),Se++,a.m(Se,b.right+ne+(E.x-se)/3,te),Se++,a.m(Se,b.right+ne+2*(E.x-se)/3,te),Se++,a.m(Se,b.right+ne+(E.x-se),te),Se++,a.m(Se,Ge.x,te)):(ge&&(a.m(Se,b.right+ne/2,Ne.y),Se++),a.m(Se,b.right+ne/2,te),Se++,a.m(Se,b.right+ne+E.x-(ge?se/2:se),te),Se++,ge&&a.m(Se,a.i(Se-1).x,Ge.y))):te===90?(x.alignment===Fc?(te=b.right+E.x,E.x===0&&Ne.x>Je.x+x.rowIndent&&(te=Math.min(te,Math.max(Ne.x,te-y.computeNodeIndent(x))))):x.alignment===Dc?(te=b.left+E.x,E.x===0&&Ne.x<Je.x-x.rowIndent&&(te=Math.max(te,Math.min(Ne.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,he?(a.m(Se,te,Ne.y),Se++,a.m(Se,te,b.bottom+ne),Se++,a.m(Se,te,b.bottom+ne+(E.y-se)/3),Se++,a.m(Se,te,b.bottom+ne+2*(E.y-se)/3),Se++,a.m(Se,te,b.bottom+ne+(E.y-se)),Se++,a.m(Se,te,Ge.y)):(ge&&(a.m(Se,Ne.x,b.bottom+ne/2),Se++),a.m(Se,te,b.bottom+ne/2),Se++,a.m(Se,te,b.bottom+ne+E.y-(ge?se/2:se)),Se++,ge&&a.m(Se,Ge.x,a.i(Se-1).y))):te===180?(x.alignment===Fc?(te=b.bottom+E.y,E.y===0&&Ne.y>Je.y+x.rowIndent&&(te=Math.min(te,Math.max(Ne.y,te-y.computeNodeIndent(x))))):x.alignment===Dc?(te=b.top+E.y,E.y===0&&Ne.y<Je.y-x.rowIndent&&(te=Math.max(te,Math.min(Ne.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,he?(a.m(Se,Ne.x,te),Se++,a.m(Se,b.left-ne,te),Se++,a.m(Se,b.left-ne+(E.x+se)/3,te),Se++,a.m(Se,b.left-ne+2*(E.x+se)/3,te),Se++,a.m(Se,b.left-ne+(E.x+se),te),Se++,a.m(Se,Ge.x,te)):(ge&&(a.m(Se,b.left-ne/2,Ne.y),Se++),a.m(Se,b.left-ne/2,te),Se++,a.m(Se,b.left-ne+E.x+(ge?se/2:se),te),Se++,ge&&a.m(Se,a.i(Se-1).x,Ge.y))):te===270?(x.alignment===Fc?(te=b.right+E.x,E.x===0&&Ne.x>Je.x+x.rowIndent&&(te=Math.min(te,Math.max(Ne.x,te-y.computeNodeIndent(x))))):x.alignment===Dc?(te=b.left+E.x,E.x===0&&Ne.x<Je.x-x.rowIndent&&(te=Math.max(te,Math.min(Ne.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,he?(a.m(Se,te,Ne.y),Se++,a.m(Se,te,b.top-ne),Se++,a.m(Se,te,b.top-ne+(E.y+se)/3),Se++,a.m(Se,te,b.top-ne+2*(E.y+se)/3),Se++,a.m(Se,te,b.top-ne+(E.y+se)),Se++,a.m(Se,te,Ge.y)):(ge&&(a.m(Se,Ne.x,b.top-ne/2),Se++),a.m(Se,te,b.top-ne/2),Se++,a.m(Se,te,b.top-ne+E.y+(ge?se/2:se)),Se++,ge&&a.m(Se,Ge.x,a.i(Se-1).y))):Yt("Invalid angle "+te),a.zf()}else E=b,a=this.link,b=this.network.layout,y=Du(x),y!==Du(E)&&(ne=b.computeLayerSpacing(x),se=x.bounds,x=E.bounds,y===0&&x.left-se.right<ne+1||y===90&&x.top-se.bottom<ne+1||y===180&&se.left-x.right<ne+1||y===270&&se.top-x.bottom<ne+1||(a.vg(),x=a.curve===Yl,E=a.isOrthogonal,b=dd(this.fromVertex.alignment),a.uh(),y===0?(y=se.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=se.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=se.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=se.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()))}}},Ut.Object.defineProperties(Ip.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)}}}),Ip.className="TreeEdge",Do.prototype.initializeStandardTools=function(){this.gb("Action",new si,this.mouseDownTools),this.gb("Relinking",new gr,this.mouseDownTools),this.gb("LinkReshaping",new xr,this.mouseDownTools),this.gb("Rotating",new Oi,this.mouseDownTools),this.gb("Resizing",new ri,this.mouseDownTools),this.gb("Linking",new rr,this.mouseMoveTools),this.gb("Dragging",new Wo,this.mouseMoveTools),this.gb("DragSelecting",new ai,this.mouseMoveTools),this.gb("Panning",new $r,this.mouseMoveTools),this.gb("ContextMenu",new Yi,this.mouseUpTools),this.gb("TextEditing",new $i,this.mouseUpTools),this.gb("ClickCreating",new Pi,this.mouseUpTools),this.gb("ClickSelecting",new uo,this.mouseUpTools)},cc("Horizontal",new ym),cc("Spot",new xm),cc("Table",new bm),cc("Viewbox",new Em),cc("TableRow",new Pm),cc("TableColumn",new Cm),cc("Graduated",new dg),cc("Grid",new hg),rp.add("GraphLinksModel",ns),rp.add("TreeModel",cu);var U0=Gt.go,zy={get licenseKey(){return cn.licenseKey},set licenseKey(a){cn.licenseKey=a},get version(){return cn.version},Group:ni,EnumValue:tn,List:Ln,Set:Nn,Map:ur,Point:It,Size:Zn,Rect:wn,Margin:kr,Spot:yr,Geometry:Jn,PathFigure:$a,PathSegment:Gi,InputEvent:ws,DiagramEvent:Kc,ChangedEvent:_o,Model:mr,GraphLinksModel:Ii,TreeModel:Ys,Binding:xa,Transaction:Za,UndoManager:Uo,CommandHandler:Dt,Tool:zi,DraggingTool:Wo,DraggingInfo:Qc,DraggingOptions:de,LinkingBaseTool:fn,LinkingTool:rr,RelinkingTool:gr,LinkReshapingTool:xr,ResizingTool:ri,RotatingTool:Oi,ClickSelectingTool:uo,ActionTool:si,ClickCreatingTool:Pi,HTMLInfo:mi,ContextMenuTool:Yi,DragSelectingTool:ai,PanningTool:$r,TextEditingTool:$i,ToolManager:Do,Animation:ea,AnimationManager:Jo,AnimationTrigger:Tl,Layer:$o,Diagram:cn,Palette:Me,Overview:Be,Brush:oo,GraphObject:Jt,Panel:Un,RowColumnDefinition:ja,Shape:ci,TextBlock:Co,Picture:ul,Part:Mr,Adornment:Ui,Node:nr,Link:Vn,Placeholder:Ks,Layout:Ro,LayoutNetwork:Eo,LayoutVertex:Ua,LayoutEdge:kl,GridLayout:ds,PanelLayout:Ha,CircularLayout:Xo,CircularNetwork:kp,CircularVertex:zg,CircularEdge:C0,ForceDirectedLayout:xs,ForceDirectedNetwork:Of,ForceDirectedVertex:$g,ForceDirectedEdge:Gg,LayeredDigraphLayout:lo,LayeredDigraphNetwork:Np,LayeredDigraphVertex:du,LayeredDigraphEdge:Wg,TreeLayout:Ci,TreeNetwork:If,TreeVertex:wu,TreeEdge:Ip};typeof U0=="object"&&U0.version&&or("WARNING: a `go` object on the root object is already defined. "+("Debug"in U0?"debug ":"")+"version: "+U0.version+", replaced with version: "+zy.version),cn.prototype.go=zy,Gt.go=zy,typeof bn.exports=="object"&&(bn.exports=typeof $e.g!="undefined"?$e.g.go:self.go)}();var rt=typeof $e.g!="undefined"?$e.g.go:self.go;const St=typeof $e.g!="undefined"?$e.g.go:self.go,ie=St.Group,Re=St.EnumValue,je=St.List,ve=St.Set,ce=St.Map,be=St.Point,Ce=St.Size,ye=St.Rect,we=St.Margin,me=St.Spot,xe=St.Geometry,fe=St.PathFigure,z=St.PathSegment,ee=St.InputEvent,ae=St.DiagramEvent,re=St.ChangedEvent,le=St.Model,ue=St.GraphLinksModel,pe=St.TreeModel,Ee=St.Binding,Pe=St.Transaction,Ie=St.UndoManager,ke=St.CommandHandler,Ae=St.Tool,Oe=St.DraggingTool,Fe=St.DraggingInfo,_e=St.LinkingBaseTool,Ye=St.LinkingTool,ze=St.RelinkingTool,Xe=St.LinkReshapingTool,st=St.ResizingTool,ht=St.RotatingTool,ft=St.ClickSelectingTool,Lt=St.ActionTool,et=St.ClickCreatingTool,it=St.HTMLInfo,xt=St.ContextMenuTool,Et=St.DragSelectingTool,Mt=St.PanningTool,mt=St.TextEditingTool,pt=St.ToolManager,vt=St.Animation,jt=St.AnimationManager,At=St.AnimationTrigger,Kt=St.Layer,Ct=St.Diagram,gt=St.Palette,tt=St.Overview,bt=St.Brush,Ke=St.GraphObject,ut=St.Panel,wt=St.RowColumnDefinition,yt=St.Shape,lt=St.TextBlock,Qe=St.TextBlockMetrics,We=St.Picture,Ue=St.Part,qe=St.Adornment,He=St.Node,De=St.Link,Le=St.Placeholder,Ve=St.Layout,dt=St.LayoutNetwork,Ze=St.LayoutVertex,Tt=St.LayoutEdge,_t=St.GridLayout,Qt=St.PanelLayout,kt=St.CircularLayout,Nt=St.CircularNetwork,Zt=St.CircularVertex,on=St.CircularEdge,vn=St.ForceDirectedLayout,kn=St.ForceDirectedNetwork,Kn=St.ForceDirectedVertex,Xn=St.ForceDirectedEdge,pr=St.LayeredDigraphLayout,dr=St.LayeredDigraphNetwork,vr=St.LayeredDigraphVertex,Sr=St.LayeredDigraphEdge,Fr=St.TreeLayout,li=St.TreeNetwork,Er=St.TreeVertex,xi=St.TreeEdge,Cr=St.version},24334:function(bn,ln,$e){var rt,St;(function(ie,Re){bn.exports=Re(ie)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof $e.g!="undefined"?$e.g:this,function(ie){"use strict";ie=ie||{};var Re=ie.Base64,je="2.6.4",ve="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ce=function(ze){for(var Xe={},st=0,ht=ze.length;st<ht;st++)Xe[ze.charAt(st)]=st;return Xe}(ve),be=String.fromCharCode,Ce=function(ze){if(ze.length<2){var Xe=ze.charCodeAt(0);return Xe<128?ze:Xe<2048?be(192|Xe>>>6)+be(128|Xe&63):be(224|Xe>>>12&15)+be(128|Xe>>>6&63)+be(128|Xe&63)}else{var Xe=65536+(ze.charCodeAt(0)-55296)*1024+(ze.charCodeAt(1)-56320);return be(240|Xe>>>18&7)+be(128|Xe>>>12&63)+be(128|Xe>>>6&63)+be(128|Xe&63)}},ye=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,we=function(ze){return ze.replace(ye,Ce)},me=function(ze){var Xe=[0,2,1][ze.length%3],st=ze.charCodeAt(0)<<16|(ze.length>1?ze.charCodeAt(1):0)<<8|(ze.length>2?ze.charCodeAt(2):0),ht=[ve.charAt(st>>>18),ve.charAt(st>>>12&63),Xe>=2?"=":ve.charAt(st>>>6&63),Xe>=1?"=":ve.charAt(st&63)];return ht.join("")},xe=ie.btoa&&typeof ie.btoa=="function"?function(ze){return ie.btoa(ze)}:function(ze){if(ze.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return ze.replace(/[\s\S]{1,3}/g,me)},fe=function(ze){return xe(we(String(ze)))},z=function(ze){return ze.replace(/[+\/]/g,function(Xe){return Xe=="+"?"-":"_"}).replace(/=/g,"")},ee=function(ze,Xe){return Xe?z(fe(ze)):fe(ze)},ae=function(ze){return ee(ze,!0)},re;ie.Uint8Array&&(re=function(ze,Xe){for(var st="",ht=0,ft=ze.length;ht<ft;ht+=3){var Lt=ze[ht],et=ze[ht+1],it=ze[ht+2],xt=Lt<<16|et<<8|it;st+=ve.charAt(xt>>>18)+ve.charAt(xt>>>12&63)+(typeof et!="undefined"?ve.charAt(xt>>>6&63):"=")+(typeof it!="undefined"?ve.charAt(xt&63):"=")}return Xe?z(st):st});var le=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ue=function(ze){switch(ze.length){case 4:var Xe=(7&ze.charCodeAt(0))<<18|(63&ze.charCodeAt(1))<<12|(63&ze.charCodeAt(2))<<6|63&ze.charCodeAt(3),st=Xe-65536;return be((st>>>10)+55296)+be((st&1023)+56320);case 3:return be((15&ze.charCodeAt(0))<<12|(63&ze.charCodeAt(1))<<6|63&ze.charCodeAt(2));default:return be((31&ze.charCodeAt(0))<<6|63&ze.charCodeAt(1))}},pe=function(ze){return ze.replace(le,ue)},Ee=function(ze){var Xe=ze.length,st=Xe%4,ht=(Xe>0?ce[ze.charAt(0)]<<18:0)|(Xe>1?ce[ze.charAt(1)]<<12:0)|(Xe>2?ce[ze.charAt(2)]<<6:0)|(Xe>3?ce[ze.charAt(3)]:0),ft=[be(ht>>>16),be(ht>>>8&255),be(ht&255)];return ft.length-=[0,0,2,1][st],ft.join("")},Pe=ie.atob&&typeof ie.atob=="function"?function(ze){return ie.atob(ze)}:function(ze){return ze.replace(/\S{1,4}/g,Ee)},Ie=function(ze){return Pe(String(ze).replace(/[^A-Za-z0-9\+\/]/g,""))},ke=function(ze){return pe(Pe(ze))},Ae=function(ze){return String(ze).replace(/[-_]/g,function(Xe){return Xe=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Oe=function(ze){return ke(Ae(ze))},Fe;ie.Uint8Array&&(Fe=function(ze){return Uint8Array.from(Ie(Ae(ze)),function(Xe){return Xe.charCodeAt(0)})});var _e=function(){var ze=ie.Base64;return ie.Base64=Re,ze};if(ie.Base64={VERSION:je,atob:Ie,btoa:xe,fromBase64:Oe,toBase64:ee,utob:we,encode:ee,encodeURI:ae,btou:pe,decode:Oe,noConflict:_e,fromUint8Array:re,toUint8Array:Fe},typeof Object.defineProperty=="function"){var Ye=function(ze){return{value:ze,enumerable:!1,writable:!0,configurable:!0}};ie.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",Ye(function(){return Oe(this)})),Object.defineProperty(String.prototype,"toBase64",Ye(function(ze){return ee(this,ze)})),Object.defineProperty(String.prototype,"toBase64URI",Ye(function(){return ee(this,!0)}))}}return ie.Meteor&&(Base64=ie.Base64),bn.exports?bn.exports.Base64=ie.Base64:(rt=[],St=function(){return ie.Base64}.apply(ln,rt),St!==void 0&&(bn.exports=St)),{Base64:ie.Base64}})},17115:function(bn,ln,$e){"use strict";$e.d(ln,{ZP:function(){return ce}});var rt=$e(29043),St=$e(59301),ie=$e(87746),Re=0,je=(0,ie.Z)();function ve(){var be;return je?(be=Re,Re+=1):be="TEST_OR_SSR",be}function ce(be){var Ce=St.useState(),ye=(0,rt.Z)(Ce,2),we=ye[0],me=ye[1];return St.useEffect(function(){me("rc_select_".concat(ve()))},[]),be||we}},77861:function(bn,ln,$e){"use strict";$e.d(ln,{Ac:function(){return Ve},Xo:function(){return Xn},Wx:function(){return dr},ZP:function(){return jn},lk:function(){return pe}});var rt=$e(5891),St=$e(26390),ie=$e(80962),Re=$e(57259),je=$e(29043),ve=$e(19149),ce=$e(80665),be=$e(35788),Ce=$e(51395),ye=$e(59301),we=$e(92310),me=$e.n(we),xe=$e(28800),fe=$e(93144),z=$e(85108),ee=$e(20475),ae=function(Gt){var Cn=Gt.className,Gn=Gt.customizeIcon,ir=Gt.customizeIconProps,Pn=Gt.onMouseDown,Yt=Gt.onClick,zn=Gt.children,Qn;return typeof Gn=="function"?Qn=Gn(ir):Qn=Gn,ye.createElement("span",{className:Cn,onMouseDown:function(rn){rn.preventDefault(),Pn&&Pn(rn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Yt,"aria-hidden":!0},Qn!==void 0?Qn:ye.createElement("span",{className:me()(Cn.split(/\s+/).map(function(or){return"".concat(or,"-icon")}))},zn))},re=ae;function le(en,Gt,Cn,Gn,ir){var Pn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Yt=arguments.length>6?arguments[6]:void 0,zn=arguments.length>7?arguments[7]:void 0,Qn=ye.useMemo(function(){if((0,ce.Z)(Gn)==="object")return Gn.clearIcon;if(ir)return ir},[Gn,ir]),or=ye.useMemo(function(){return!!(!Pn&&Gn&&(Cn.length||Yt)&&!(zn==="combobox"&&Yt===""))},[Gn,Pn,Cn.length,Yt,zn]);return{allowClear:or,clearIcon:ye.createElement(re,{className:"".concat(en,"-clear"),onMouseDown:Gt,customizeIcon:Qn},"\xD7")}}var ue=ye.createContext(null);function pe(){return ye.useContext(ue)}function Ee(){var en=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Gt=ye.useState(!1),Cn=(0,je.Z)(Gt,2),Gn=Cn[0],ir=Cn[1],Pn=ye.useRef(null),Yt=function(){window.clearTimeout(Pn.current)};ye.useEffect(function(){return Yt},[]);var zn=function(or,rn){Yt(),Pn.current=window.setTimeout(function(){ir(or),rn&&rn()},en)};return[Gn,zn,Yt]}function Pe(){var en=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Gt=ye.useRef(null),Cn=ye.useRef(null);ye.useEffect(function(){return function(){window.clearTimeout(Cn.current)}},[]);function Gn(ir){(ir||Gt.current===null)&&(Gt.current=ir),window.clearTimeout(Cn.current),Cn.current=window.setTimeout(function(){Gt.current=null},en)}return[function(){return Gt.current},Gn]}function Ie(en,Gt,Cn,Gn){var ir=ye.useRef(null);ir.current={open:Gt,triggerOpen:Cn,customizedTrigger:Gn},ye.useEffect(function(){function Pn(Yt){var zn;if(!((zn=ir.current)!==null&&zn!==void 0&&zn.customizedTrigger)){var Qn=Yt.target;Qn.shadowRoot&&Yt.composed&&(Qn=Yt.composedPath()[0]||Qn),ir.current.open&&en().filter(function(or){return or}).every(function(or){return!or.contains(Qn)&&or!==Qn})&&ir.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Pn),function(){return window.removeEventListener("mousedown",Pn)}},[])}var ke=$e(36994),Ae=$e(11780),Oe=function(Gt,Cn){var Gn,ir,Pn=Gt.prefixCls,Yt=Gt.id,zn=Gt.inputElement,Qn=Gt.disabled,or=Gt.tabIndex,rn=Gt.autoFocus,Mn=Gt.autoComplete,an=Gt.editable,gn=Gt.activeDescendantId,En=Gt.value,pn=Gt.maxLength,On=Gt.onKeyDown,Dn=Gt.onMouseDown,$n=Gt.onChange,Fn=Gt.onPaste,Tn=Gt.onCompositionStart,Yn=Gt.onCompositionEnd,Lr=Gt.open,qr=Gt.attrs,Br=zn||ye.createElement("input",null),tn=Br,lr=tn.ref,br=tn.props,ar=br.onKeyDown,Qr=br.onChange,Xr=br.onMouseDown,hi=br.onCompositionStart,Gr=br.onCompositionEnd,Tr=br.style;return(0,Ce.Kp)(!("maxLength"in Br.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Br=ye.cloneElement(Br,(0,Re.Z)((0,Re.Z)((0,Re.Z)({type:"search"},br),{},{id:Yt,ref:(0,ee.sQ)(Cn,lr),disabled:Qn,tabIndex:or,autoComplete:Mn||"off",autoFocus:rn,className:me()("".concat(Pn,"-selection-search-input"),(Gn=Br)===null||Gn===void 0||(ir=Gn.props)===null||ir===void 0?void 0:ir.className),role:"combobox","aria-label":"Search","aria-expanded":Lr||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Yt,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Yt,"_list"),"aria-activedescendant":Lr?gn:void 0},qr),{},{value:an?En:"",maxLength:pn,readOnly:!an,unselectable:an?null:"on",style:(0,Re.Z)((0,Re.Z)({},Tr),{},{opacity:an?null:0}),onKeyDown:function(Ln){On(Ln),ar&&ar(Ln)},onMouseDown:function(Ln){Dn(Ln),Xr&&Xr(Ln)},onChange:function(Ln){$n(Ln),Qr&&Qr(Ln)},onCompositionStart:function(Ln){Tn(Ln),hi&&hi(Ln)},onCompositionEnd:function(Ln){Yn(Ln),Gr&&Gr(Ln)},onPaste:Fn})),Br},Fe=ye.forwardRef(Oe);Fe.displayName="Input";var _e=Fe;function Ye(en){return Array.isArray(en)?en:en!==void 0?[en]:[]}var ze=typeof window!="undefined"&&window.document&&window.document.documentElement,Xe=ze;function st(en){return en!=null}function ht(en){return!en&&en!==0}function ft(en){return["string","number"].includes((0,ce.Z)(en))}function Lt(en){var Gt=void 0;return en&&(ft(en.title)?Gt=en.title.toString():ft(en.label)&&(Gt=en.label.toString())),Gt}function et(en,Gt){Xe?ye.useLayoutEffect(en,Gt):ye.useEffect(en,Gt)}function it(en){var Gt;return(Gt=en.key)!==null&&Gt!==void 0?Gt:en.value}var xt=function(Gt){Gt.preventDefault(),Gt.stopPropagation()},Et=function(Gt){var Cn=Gt.id,Gn=Gt.prefixCls,ir=Gt.values,Pn=Gt.open,Yt=Gt.searchValue,zn=Gt.autoClearSearchValue,Qn=Gt.inputRef,or=Gt.placeholder,rn=Gt.disabled,Mn=Gt.mode,an=Gt.showSearch,gn=Gt.autoFocus,En=Gt.autoComplete,pn=Gt.activeDescendantId,On=Gt.tabIndex,Dn=Gt.removeIcon,$n=Gt.maxTagCount,Fn=Gt.maxTagTextLength,Tn=Gt.maxTagPlaceholder,Yn=Tn===void 0?function(Ei){return"+ ".concat(Ei.length," ...")}:Tn,Lr=Gt.tagRender,qr=Gt.onToggleOpen,Br=Gt.onRemove,tn=Gt.onInputChange,lr=Gt.onInputPaste,br=Gt.onInputKeyDown,ar=Gt.onInputMouseDown,Qr=Gt.onInputCompositionStart,Xr=Gt.onInputCompositionEnd,hi=ye.useRef(null),Gr=(0,ye.useState)(0),Tr=(0,je.Z)(Gr,2),Si=Tr[0],Ln=Tr[1],Ki=(0,ye.useState)(!1),Nn=(0,je.Z)(Ki,2),gi=Nn[0],xo=Nn[1],Mi="".concat(Gn,"-selection"),Go=Pn||Mn==="multiple"&&zn===!1||Mn==="tags"?Yt:"",po=Mn==="tags"||Mn==="multiple"&&zn===!1||an&&(Pn||gi);et(function(){Ln(hi.current.scrollWidth)},[Go]);function Wr(Ei,Kr,Nr,Wi,Ur){return ye.createElement("span",{className:me()("".concat(Mi,"-item"),(0,ie.Z)({},"".concat(Mi,"-item-disabled"),Nr)),title:Lt(Ei)},ye.createElement("span",{className:"".concat(Mi,"-item-content")},Kr),Wi&&ye.createElement(re,{className:"".concat(Mi,"-item-remove"),onMouseDown:xt,onClick:Ur,customizeIcon:Dn},"\xD7"))}function Hr(Ei,Kr,Nr,Wi,Ur){var jr=function(Vi){xt(Vi),qr(!Pn)};return ye.createElement("span",{onMouseDown:jr},Lr({label:Kr,value:Ei,disabled:Nr,closable:Wi,onClose:Ur}))}function Li(Ei){var Kr=Ei.disabled,Nr=Ei.label,Wi=Ei.value,Ur=!rn&&!Kr,jr=Nr;if(typeof Fn=="number"&&(typeof Nr=="string"||typeof Nr=="number")){var wi=String(jr);wi.length>Fn&&(jr="".concat(wi.slice(0,Fn),"..."))}var Vi=function(vo){vo&&vo.stopPropagation(),Br(Ei)};return typeof Lr=="function"?Hr(Wi,jr,Kr,Ur,Vi):Wr(Ei,jr,Kr,Ur,Vi)}function _i(Ei){var Kr=typeof Yn=="function"?Yn(Ei):Yn;return Wr({title:Kr},Kr,!1)}var ur=ye.createElement("div",{className:"".concat(Mi,"-search"),style:{width:Si},onFocus:function(){xo(!0)},onBlur:function(){xo(!1)}},ye.createElement(_e,{ref:Qn,open:Pn,prefixCls:Gn,id:Cn,inputElement:null,disabled:rn,autoFocus:gn,autoComplete:En,editable:po,activeDescendantId:pn,value:Go,onKeyDown:br,onMouseDown:ar,onChange:tn,onPaste:lr,onCompositionStart:Qr,onCompositionEnd:Xr,tabIndex:On,attrs:(0,ke.Z)(Gt,!0)}),ye.createElement("span",{ref:hi,className:"".concat(Mi,"-search-mirror"),"aria-hidden":!0},Go,"\xA0")),It=ye.createElement(Ae.Z,{prefixCls:"".concat(Mi,"-overflow"),data:ir,renderItem:Li,renderRest:_i,suffix:ur,itemKey:it,maxCount:$n});return ye.createElement(ye.Fragment,null,It,!ir.length&&!Go&&ye.createElement("span",{className:"".concat(Mi,"-placeholder")},or))},Mt=Et,mt=function(Gt){var Cn=Gt.inputElement,Gn=Gt.prefixCls,ir=Gt.id,Pn=Gt.inputRef,Yt=Gt.disabled,zn=Gt.autoFocus,Qn=Gt.autoComplete,or=Gt.activeDescendantId,rn=Gt.mode,Mn=Gt.open,an=Gt.values,gn=Gt.placeholder,En=Gt.tabIndex,pn=Gt.showSearch,On=Gt.searchValue,Dn=Gt.activeValue,$n=Gt.maxLength,Fn=Gt.onInputKeyDown,Tn=Gt.onInputMouseDown,Yn=Gt.onInputChange,Lr=Gt.onInputPaste,qr=Gt.onInputCompositionStart,Br=Gt.onInputCompositionEnd,tn=Gt.title,lr=ye.useState(!1),br=(0,je.Z)(lr,2),ar=br[0],Qr=br[1],Xr=rn==="combobox",hi=Xr||pn,Gr=an[0],Tr=On||"";Xr&&Dn&&!ar&&(Tr=Dn),ye.useEffect(function(){Xr&&Qr(!1)},[Xr,Dn]);var Si=rn!=="combobox"&&!Mn&&!pn?!1:!!Tr,Ln=tn===void 0?Lt(Gr):tn,Ki=function(){if(Gr)return null;var gi=Si?{visibility:"hidden"}:void 0;return ye.createElement("span",{className:"".concat(Gn,"-selection-placeholder"),style:gi},gn)};return ye.createElement(ye.Fragment,null,ye.createElement("span",{className:"".concat(Gn,"-selection-search")},ye.createElement(_e,{ref:Pn,prefixCls:Gn,id:ir,open:Mn,inputElement:Cn,disabled:Yt,autoFocus:zn,autoComplete:Qn,editable:hi,activeDescendantId:or,value:Tr,onKeyDown:Fn,onMouseDown:Tn,onChange:function(gi){Qr(!0),Yn(gi)},onPaste:Lr,onCompositionStart:qr,onCompositionEnd:Br,tabIndex:En,attrs:(0,ke.Z)(Gt,!0),maxLength:Xr?$n:void 0})),!Xr&&Gr?ye.createElement("span",{className:"".concat(Gn,"-selection-item"),title:Ln,style:Si?{visibility:"hidden"}:void 0},Gr.label):null,Ki())},pt=mt;function vt(en){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(en)}var jt=function(Gt,Cn){var Gn=(0,ye.useRef)(null),ir=(0,ye.useRef)(!1),Pn=Gt.prefixCls,Yt=Gt.open,zn=Gt.mode,Qn=Gt.showSearch,or=Gt.tokenWithEnter,rn=Gt.autoClearSearchValue,Mn=Gt.onSearch,an=Gt.onSearchSubmit,gn=Gt.onToggleOpen,En=Gt.onInputKeyDown,pn=Gt.domRef;ye.useImperativeHandle(Cn,function(){return{focus:function(){Gn.current.focus()},blur:function(){Gn.current.blur()}}});var On=Pe(0),Dn=(0,je.Z)(On,2),$n=Dn[0],Fn=Dn[1],Tn=function(Tr){var Si=Tr.which;(Si===z.Z.UP||Si===z.Z.DOWN)&&Tr.preventDefault(),En&&En(Tr),Si===z.Z.ENTER&&zn==="tags"&&!ir.current&&!Yt&&(an==null||an(Tr.target.value)),vt(Si)&&gn(!0)},Yn=function(){Fn(!0)},Lr=(0,ye.useRef)(null),qr=function(Tr){Mn(Tr,!0,ir.current)!==!1&&gn(!0)},Br=function(){ir.current=!0},tn=function(Tr){ir.current=!1,zn!=="combobox"&&qr(Tr.target.value)},lr=function(Tr){var Si=Tr.target.value;if(or&&Lr.current&&/[\r\n]/.test(Lr.current)){var Ln=Lr.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Si=Si.replace(Ln,Lr.current)}Lr.current=null,qr(Si)},br=function(Tr){var Si=Tr.clipboardData,Ln=Si.getData("text");Lr.current=Ln},ar=function(Tr){var Si=Tr.target;if(Si!==Gn.current){var Ln=document.body.style.msTouchAction!==void 0;Ln?setTimeout(function(){Gn.current.focus()}):Gn.current.focus()}},Qr=function(Tr){var Si=$n();Tr.target!==Gn.current&&!Si&&zn!=="combobox"&&Tr.preventDefault(),(zn!=="combobox"&&(!Qn||!Si)||!Yt)&&(Yt&&rn!==!1&&Mn("",!0,!1),gn())},Xr={inputRef:Gn,onInputKeyDown:Tn,onInputMouseDown:Yn,onInputChange:lr,onInputPaste:br,onInputCompositionStart:Br,onInputCompositionEnd:tn},hi=zn==="multiple"||zn==="tags"?ye.createElement(Mt,(0,rt.Z)({},Gt,Xr)):ye.createElement(pt,(0,rt.Z)({},Gt,Xr));return ye.createElement("div",{ref:pn,className:"".concat(Pn,"-selector"),onClick:ar,onMouseDown:Qr},hi)},At=ye.forwardRef(jt);At.displayName="Selector";var Kt=At,Ct=$e(35593),gt=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],tt=function(Gt){var Cn=Gt===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Cn,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Cn,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Cn,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Cn,adjustY:1},htmlRegion:"scroll"}}},bt=function(Gt,Cn){var Gn=Gt.prefixCls,ir=Gt.disabled,Pn=Gt.visible,Yt=Gt.children,zn=Gt.popupElement,Qn=Gt.animation,or=Gt.transitionName,rn=Gt.dropdownStyle,Mn=Gt.dropdownClassName,an=Gt.direction,gn=an===void 0?"ltr":an,En=Gt.placement,pn=Gt.builtinPlacements,On=Gt.dropdownMatchSelectWidth,Dn=Gt.dropdownRender,$n=Gt.dropdownAlign,Fn=Gt.getPopupContainer,Tn=Gt.empty,Yn=Gt.getTriggerDOMNode,Lr=Gt.onPopupVisibleChange,qr=Gt.onPopupMouseEnter,Br=(0,ve.Z)(Gt,gt),tn="".concat(Gn,"-dropdown"),lr=zn;Dn&&(lr=Dn(zn));var br=ye.useMemo(function(){return pn||tt(On)},[pn,On]),ar=Qn?"".concat(tn,"-").concat(Qn):or,Qr=typeof On=="number",Xr=ye.useMemo(function(){return Qr?null:On===!1?"minWidth":"width"},[On,Qr]),hi=rn;Qr&&(hi=(0,Re.Z)((0,Re.Z)({},hi),{},{width:On}));var Gr=ye.useRef(null);return ye.useImperativeHandle(Cn,function(){return{getPopupElement:function(){return Gr.current}}}),ye.createElement(Ct.Z,(0,rt.Z)({},Br,{showAction:Lr?["click"]:[],hideAction:Lr?["click"]:[],popupPlacement:En||(gn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:br,prefixCls:tn,popupTransitionName:ar,popup:ye.createElement("div",{ref:Gr,onMouseEnter:qr},lr),stretch:Xr,popupAlign:$n,popupVisible:Pn,getPopupContainer:Fn,popupClassName:me()(Mn,(0,ie.Z)({},"".concat(tn,"-empty"),Tn)),popupStyle:hi,getTriggerDOMNode:Yn,onPopupVisibleChange:Lr}),Yt)},Ke=ye.forwardRef(bt);Ke.displayName="SelectTrigger";var ut=Ke,wt=$e(17953);function yt(en,Gt){var Cn=en.key,Gn;return"value"in en&&(Gn=en.value),Cn!=null?Cn:Gn!==void 0?Gn:"rc-index-key-".concat(Gt)}function lt(en,Gt){var Cn=en||{},Gn=Cn.label,ir=Cn.value,Pn=Cn.options,Yt=Cn.groupLabel,zn=Gn||(Gt?"children":"label");return{label:zn,value:ir||"value",options:Pn||"options",groupLabel:Yt||zn}}function Qe(en){var Gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Cn=Gt.fieldNames,Gn=Gt.childrenAsData,ir=[],Pn=lt(Cn,!1),Yt=Pn.label,zn=Pn.value,Qn=Pn.options,or=Pn.groupLabel;function rn(Mn,an){Mn.forEach(function(gn){if(an||!(Qn in gn)){var En=gn[zn];ir.push({key:yt(gn,ir.length),groupOption:an,data:gn,label:gn[Yt],value:En})}else{var pn=gn[or];pn===void 0&&Gn&&(pn=gn.label),ir.push({key:yt(gn,ir.length),group:!0,data:gn,label:pn}),rn(gn[Qn],!0)}})}return rn(en,!1),ir}function We(en){var Gt=(0,Re.Z)({},en);return"props"in Gt||Object.defineProperty(Gt,"props",{get:function(){return(0,Ce.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Gt}}),Gt}function Ue(en,Gt){if(!Gt||!Gt.length)return null;var Cn=!1;function Gn(Pn,Yt){var zn=(0,wt.Z)(Yt),Qn=zn[0],or=zn.slice(1);if(!Qn)return[Pn];var rn=Pn.split(Qn);return Cn=Cn||rn.length>1,rn.reduce(function(Mn,an){return[].concat((0,St.Z)(Mn),(0,St.Z)(Gn(an,or)))},[]).filter(function(Mn){return Mn})}var ir=Gn(en,Gt);return Cn?ir:null}var qe=["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"],He=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function De(en){return en==="tags"||en==="multiple"}var Le=ye.forwardRef(function(en,Gt){var Cn,Gn,ir=en.id,Pn=en.prefixCls,Yt=en.className,zn=en.showSearch,Qn=en.tagRender,or=en.direction,rn=en.omitDomProps,Mn=en.displayValues,an=en.onDisplayValuesChange,gn=en.emptyOptions,En=en.notFoundContent,pn=En===void 0?"Not Found":En,On=en.onClear,Dn=en.mode,$n=en.disabled,Fn=en.loading,Tn=en.getInputElement,Yn=en.getRawInputElement,Lr=en.open,qr=en.defaultOpen,Br=en.onDropdownVisibleChange,tn=en.activeValue,lr=en.onActiveValueChange,br=en.activeDescendantId,ar=en.searchValue,Qr=en.autoClearSearchValue,Xr=en.onSearch,hi=en.onSearchSplit,Gr=en.tokenSeparators,Tr=en.allowClear,Si=en.suffixIcon,Ln=en.clearIcon,Ki=en.OptionList,Nn=en.animation,gi=en.transitionName,xo=en.dropdownStyle,Mi=en.dropdownClassName,Go=en.dropdownMatchSelectWidth,po=en.dropdownRender,Wr=en.dropdownAlign,Hr=en.placement,Li=en.builtinPlacements,_i=en.getPopupContainer,ur=en.showAction,It=ur===void 0?[]:ur,Ei=en.onFocus,Kr=en.onBlur,Nr=en.onKeyUp,Wi=en.onKeyDown,Ur=en.onMouseDown,jr=(0,ve.Z)(en,qe),wi=De(Dn),Vi=(zn!==void 0?zn:wi)||Dn==="combobox",bi=(0,Re.Z)({},jr);He.forEach(function(ro){delete bi[ro]}),rn==null||rn.forEach(function(ro){delete bi[ro]});var vo=ye.useState(!1),Ar=(0,je.Z)(vo,2),Dr=Ar[0],zr=Ar[1];ye.useEffect(function(){zr((0,fe.Z)())},[]);var Zn=ye.useRef(null),to=ye.useRef(null),yo=ye.useRef(null),ta=ye.useRef(null),wo=ye.useRef(null),Zo=Ee(),ua=(0,je.Z)(Zo,3),Pa=ua[0],Da=ua[1],Ss=ua[2];ye.useImperativeHandle(Gt,function(){var ro,Io;return{focus:(ro=ta.current)===null||ro===void 0?void 0:ro.focus,blur:(Io=ta.current)===null||Io===void 0?void 0:Io.blur,scrollTo:function(Ya){var _a;return(_a=wo.current)===null||_a===void 0?void 0:_a.scrollTo(Ya)}}});var es=ye.useMemo(function(){var ro;if(Dn!=="combobox")return ar;var Io=(ro=Mn[0])===null||ro===void 0?void 0:ro.value;return typeof Io=="string"||typeof Io=="number"?String(Io):""},[ar,Dn,Mn]),wn=Dn==="combobox"&&typeof Tn=="function"&&Tn()||null,Fa=typeof Yn=="function"&&Yn(),_s=(0,ee.x1)(to,Fa==null||(Cn=Fa.props)===null||Cn===void 0?void 0:Cn.ref),Il=ye.useState(!1),Ji=(0,je.Z)(Il,2),jo=Ji[0],ga=Ji[1];(0,xe.Z)(function(){ga(!0)},[]);var Oo=(0,be.Z)(!1,{defaultValue:qr,value:Lr}),no=(0,je.Z)(Oo,2),Mo=no[0],Wa=no[1],ki=jo?Mo:!1,ao=!pn&&gn;($n||ao&&ki&&Dn==="combobox")&&(ki=!1);var io=ao?!1:ki,kr=ye.useCallback(function(ro){var Io=ro!==void 0?ro:!ki;$n||(Wa(Io),ki!==Io&&(Br==null||Br(Io)))},[$n,ki,Wa,Br]),Ba=ye.useMemo(function(){return(Gr||[]).some(function(ro){return[`
`,`\r
`].includes(ro)})},[Gr]),Ra=function(Io,Es,Ya){var _a=!0,ca=Io;lr==null||lr(null);var Ca=Ya?null:Ue(Io,Gr);return Dn!=="combobox"&&Ca&&(ca="",hi==null||hi(Ca),kr(!1),_a=!1),Xr&&es!==ca&&Xr(ca,{source:Es?"typing":"effect"}),_a},Cs=function(Io){!Io||!Io.trim()||Xr(Io,{source:"submit"})};ye.useEffect(function(){!ki&&!wi&&Dn!=="combobox"&&Ra("",!1,!1)},[ki]),ye.useEffect(function(){Mo&&$n&&Wa(!1),$n&&Da(!1)},[$n]);var Dl=Pe(),ql=(0,je.Z)(Dl,2),yr=ql[0],oa=ql[1],Ka=function(Io){var Es=yr(),Ya=Io.which;if(Ya===z.Z.ENTER&&(Dn!=="combobox"&&Io.preventDefault(),ki||kr(!0)),oa(!!es),Ya===z.Z.BACKSPACE&&!Es&&wi&&!es&&Mn.length){for(var _a=(0,St.Z)(Mn),ca=null,Ca=_a.length-1;Ca>=0;Ca-=1){var Va=_a[Ca];if(!Va.disabled){_a.splice(Ca,1),ca=Va;break}}ca&&an(_a,{type:"remove",values:[ca]})}for(var za=arguments.length,zu=new Array(za>1?za-1:0),_l=1;_l<za;_l++)zu[_l-1]=arguments[_l];if(ki&&wo.current){var Ma;(Ma=wo.current).onKeyDown.apply(Ma,[Io].concat(zu))}Wi==null||Wi.apply(void 0,[Io].concat(zu))},Pl=function(Io){for(var Es=arguments.length,Ya=new Array(Es>1?Es-1:0),_a=1;_a<Es;_a++)Ya[_a-1]=arguments[_a];if(ki&&wo.current){var ca;(ca=wo.current).onKeyUp.apply(ca,[Io].concat(Ya))}Nr==null||Nr.apply(void 0,[Io].concat(Ya))},Fl=function(Io){var Es=Mn.filter(function(Ya){return Ya!==Io});an(Es,{type:"remove",values:[Io]})},Bl=ye.useRef(!1),Di=function(){Da(!0),$n||(Ei&&!Bl.current&&Ei.apply(void 0,arguments),It.includes("focus")&&kr(!0)),Bl.current=!0},mc=function(){Da(!1,function(){Bl.current=!1,kr(!1)}),!$n&&(es&&(Dn==="tags"?Xr(es,{source:"submit"}):Dn==="multiple"&&Xr("",{source:"blur"})),Kr&&Kr.apply(void 0,arguments))},tl=[];ye.useEffect(function(){return function(){tl.forEach(function(ro){return clearTimeout(ro)}),tl.splice(0,tl.length)}},[]);var nl=function(Io){var Es,Ya=Io.target,_a=(Es=yo.current)===null||Es===void 0?void 0:Es.getPopupElement();if(_a&&_a.contains(Ya)){var ca=setTimeout(function(){var zu=tl.indexOf(ca);if(zu!==-1&&tl.splice(zu,1),Ss(),!Dr&&!_a.contains(document.activeElement)){var _l;(_l=ta.current)===null||_l===void 0||_l.focus()}});tl.push(ca)}for(var Ca=arguments.length,Va=new Array(Ca>1?Ca-1:0),za=1;za<Ca;za++)Va[za-1]=arguments[za];Ur==null||Ur.apply(void 0,[Io].concat(Va))},As=ye.useState({}),Eu=(0,je.Z)(As,2),Ru=Eu[1];function zs(){Ru({})}var dl;Fa&&(dl=function(Io){kr(Io)}),Ie(function(){var ro;return[Zn.current,(ro=yo.current)===null||ro===void 0?void 0:ro.getPopupElement()]},io,kr,!!Fa);var $c=ye.useMemo(function(){return(0,Re.Z)((0,Re.Z)({},en),{},{notFoundContent:pn,open:ki,triggerOpen:io,id:ir,showSearch:Vi,multiple:wi,toggleOpen:kr})},[en,pn,io,ki,ir,Vi,wi,kr]),hh=!!Si||Fn,Gc;hh&&(Gc=ye.createElement(re,{className:me()("".concat(Pn,"-arrow"),(0,ie.Z)({},"".concat(Pn,"-arrow-loading"),Fn)),customizeIcon:Si,customizeIconProps:{loading:Fn,searchValue:es,open:ki,focused:Pa,showSearch:Vi}}));var Hh=function(){var Io;On==null||On(),(Io=ta.current)===null||Io===void 0||Io.focus(),an([],{type:"clear",values:Mn}),Ra("",!1,!1)},Hc=le(Pn,Hh,Mn,Tr,Ln,$n,es,Dn),vc=Hc.allowClear,_u=Hc.clearIcon,Rl=ye.createElement(Ki,{ref:wo}),dh=me()(Pn,Yt,(Gn={},(0,ie.Z)(Gn,"".concat(Pn,"-focused"),Pa),(0,ie.Z)(Gn,"".concat(Pn,"-multiple"),wi),(0,ie.Z)(Gn,"".concat(Pn,"-single"),!wi),(0,ie.Z)(Gn,"".concat(Pn,"-allow-clear"),Tr),(0,ie.Z)(Gn,"".concat(Pn,"-show-arrow"),hh),(0,ie.Z)(Gn,"".concat(Pn,"-disabled"),$n),(0,ie.Z)(Gn,"".concat(Pn,"-loading"),Fn),(0,ie.Z)(Gn,"".concat(Pn,"-open"),ki),(0,ie.Z)(Gn,"".concat(Pn,"-customize-input"),wn),(0,ie.Z)(Gn,"".concat(Pn,"-show-search"),Vi),Gn)),Uc=ye.createElement(ut,{ref:yo,disabled:$n,prefixCls:Pn,visible:io,popupElement:Rl,animation:Nn,transitionName:gi,dropdownStyle:xo,dropdownClassName:Mi,direction:or,dropdownMatchSelectWidth:Go,dropdownRender:po,dropdownAlign:Wr,placement:Hr,builtinPlacements:Li,getPopupContainer:_i,empty:gn,getTriggerDOMNode:function(){return to.current},onPopupVisibleChange:dl,onPopupMouseEnter:zs},Fa?ye.cloneElement(Fa,{ref:_s}):ye.createElement(Kt,(0,rt.Z)({},en,{domRef:to,prefixCls:Pn,inputElement:wn,ref:ta,id:ir,showSearch:Vi,autoClearSearchValue:Qr,mode:Dn,activeDescendantId:br,tagRender:Qn,values:Mn,open:ki,onToggleOpen:kr,activeValue:tn,searchValue:es,onSearch:Ra,onSearchSubmit:Cs,onRemove:Fl,tokenWithEnter:Ba}))),yc;return Fa?yc=Uc:yc=ye.createElement("div",(0,rt.Z)({className:dh},bi,{ref:Zn,onMouseDown:nl,onKeyDown:Ka,onKeyUp:Pl,onFocus:Di,onBlur:mc}),Pa&&!ki&&ye.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(Mn.map(function(ro){var Io=ro.label,Es=ro.value;return["number","string"].includes((0,ce.Z)(Io))?Io:Es}).join(", "))),Uc,Gc,vc&&_u),ye.createElement(ue.Provider,{value:$c},yc)}),Ve=Le,dt=function(en,Gt){var Cn=ye.useRef({values:new Map,options:new Map}),Gn=ye.useMemo(function(){var Pn=Cn.current,Yt=Pn.values,zn=Pn.options,Qn=en.map(function(Mn){if(Mn.label===void 0){var an;return(0,Re.Z)((0,Re.Z)({},Mn),{},{label:(an=Yt.get(Mn.value))===null||an===void 0?void 0:an.label})}return Mn}),or=new Map,rn=new Map;return Qn.forEach(function(Mn){or.set(Mn.value,Mn),rn.set(Mn.value,Gt.get(Mn.value)||zn.get(Mn.value))}),Cn.current.values=or,Cn.current.options=rn,Qn},[en,Gt]),ir=ye.useCallback(function(Pn){return Gt.get(Pn)||Cn.current.options.get(Pn)},[Gt]);return[Gn,ir]};function Ze(en,Gt){return Ye(en).join("").toUpperCase().includes(Gt)}var Tt=function(en,Gt,Cn,Gn,ir){return ye.useMemo(function(){if(!Cn||Gn===!1)return en;var Pn=Gt.options,Yt=Gt.label,zn=Gt.value,Qn=[],or=typeof Gn=="function",rn=Cn.toUpperCase(),Mn=or?Gn:function(gn,En){return ir?Ze(En[ir],rn):En[Pn]?Ze(En[Yt!=="children"?Yt:"label"],rn):Ze(En[zn],rn)},an=or?function(gn){return We(gn)}:function(gn){return gn};return en.forEach(function(gn){if(gn[Pn]){var En=Mn(Cn,an(gn));if(En)Qn.push(gn);else{var pn=gn[Pn].filter(function(On){return Mn(Cn,an(On))});pn.length&&Qn.push((0,Re.Z)((0,Re.Z)({},gn),{},(0,ie.Z)({},Pn,pn)))}return}Mn(Cn,an(gn))&&Qn.push(gn)}),Qn},[en,Gn,ir,Cn,Gt])},_t=$e(17115),Qt=$e(38298),kt=["children","value"],Nt=["children"];function Zt(en){var Gt=en,Cn=Gt.key,Gn=Gt.props,ir=Gn.children,Pn=Gn.value,Yt=(0,ve.Z)(Gn,kt);return(0,Re.Z)({key:Cn,value:Pn!==void 0?Pn:Cn,children:ir},Yt)}function on(en){var Gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Qt.Z)(en).map(function(Cn,Gn){if(!ye.isValidElement(Cn)||!Cn.type)return null;var ir=Cn,Pn=ir.type.isSelectOptGroup,Yt=ir.key,zn=ir.props,Qn=zn.children,or=(0,ve.Z)(zn,Nt);return Gt||!Pn?Zt(Cn):(0,Re.Z)((0,Re.Z)({key:"__RC_SELECT_GRP__".concat(Yt===null?Gn:Yt,"__"),label:Yt},or),{},{options:on(Qn)})}).filter(function(Cn){return Cn})}function vn(en,Gt,Cn,Gn,ir){return ye.useMemo(function(){var Pn=en,Yt=!en;Yt&&(Pn=on(Gt));var zn=new Map,Qn=new Map,or=function(an,gn,En){En&&typeof En=="string"&&an.set(gn[En],gn)};function rn(Mn){for(var an=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,gn=0;gn<Mn.length;gn+=1){var En=Mn[gn];!En[Cn.options]||an?(zn.set(En[Cn.value],En),or(Qn,En,Cn.label),or(Qn,En,Gn),or(Qn,En,ir)):rn(En[Cn.options],!0)}}return rn(Pn),{options:Pn,valueOptions:zn,labelOptions:Qn}},[en,Gt,Cn,Gn,ir])}function kn(en){var Gt=ye.useRef();Gt.current=en;var Cn=ye.useCallback(function(){return Gt.current.apply(Gt,arguments)},[]);return Cn}var Kn=function(){return null};Kn.isSelectOptGroup=!0;var Xn=Kn,pr=function(){return null};pr.isSelectOption=!0;var dr=pr,vr=$e(79722),Sr=$e(64002),Fr=$e(21881),li=ye.createContext(null),Er=li;function xi(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Cr=["disabled","title","children","style","className"];function ot(en){return typeof en=="string"||typeof en=="number"}var di=function(Gt,Cn){var Gn=pe(),ir=Gn.prefixCls,Pn=Gn.id,Yt=Gn.open,zn=Gn.multiple,Qn=Gn.mode,or=Gn.searchValue,rn=Gn.toggleOpen,Mn=Gn.notFoundContent,an=Gn.onPopupScroll,gn=ye.useContext(Er),En=gn.flattenOptions,pn=gn.onActiveValue,On=gn.defaultActiveFirstOption,Dn=gn.onSelect,$n=gn.menuItemSelectedIcon,Fn=gn.rawValues,Tn=gn.fieldNames,Yn=gn.virtual,Lr=gn.direction,qr=gn.listHeight,Br=gn.listItemHeight,tn="".concat(ir,"-item"),lr=(0,vr.Z)(function(){return En},[Yt,En],function(Wr,Hr){return Hr[0]&&Wr[1]!==Hr[1]}),br=ye.useRef(null),ar=function(Hr){Hr.preventDefault()},Qr=function(Hr){br.current&&br.current.scrollTo(typeof Hr=="number"?{index:Hr}:Hr)},Xr=function(Hr){for(var Li=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,_i=lr.length,ur=0;ur<_i;ur+=1){var It=(Hr+ur*Li+_i)%_i,Ei=lr[It],Kr=Ei.group,Nr=Ei.data;if(!Kr&&!Nr.disabled)return It}return-1},hi=ye.useState(function(){return Xr(0)}),Gr=(0,je.Z)(hi,2),Tr=Gr[0],Si=Gr[1],Ln=function(Hr){var Li=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Si(Hr);var _i={source:Li?"keyboard":"mouse"},ur=lr[Hr];if(!ur){pn(null,-1,_i);return}pn(ur.value,Hr,_i)};(0,ye.useEffect)(function(){Ln(On!==!1?Xr(0):-1)},[lr.length,or]);var Ki=ye.useCallback(function(Wr){return Fn.has(Wr)&&Qn!=="combobox"},[Qn,(0,St.Z)(Fn).toString(),Fn.size]);(0,ye.useEffect)(function(){var Wr=setTimeout(function(){if(!zn&&Yt&&Fn.size===1){var Li=Array.from(Fn)[0],_i=lr.findIndex(function(ur){var It=ur.data;return It.value===Li});_i!==-1&&(Ln(_i),Qr(_i))}});if(Yt){var Hr;(Hr=br.current)===null||Hr===void 0||Hr.scrollTo(void 0)}return function(){return clearTimeout(Wr)}},[Yt,or,En.length]);var Nn=function(Hr){Hr!==void 0&&Dn(Hr,{selected:!Fn.has(Hr)}),zn||rn(!1)};if(ye.useImperativeHandle(Cn,function(){return{onKeyDown:function(Hr){var Li=Hr.which,_i=Hr.ctrlKey;switch(Li){case z.Z.N:case z.Z.P:case z.Z.UP:case z.Z.DOWN:{var ur=0;if(Li===z.Z.UP?ur=-1:Li===z.Z.DOWN?ur=1:xi()&&_i&&(Li===z.Z.N?ur=1:Li===z.Z.P&&(ur=-1)),ur!==0){var It=Xr(Tr+ur,ur);Qr(It),Ln(It,!0)}break}case z.Z.ENTER:{var Ei=lr[Tr];Ei&&!Ei.data.disabled?Nn(Ei.value):Nn(void 0),Yt&&Hr.preventDefault();break}case z.Z.ESC:rn(!1),Yt&&Hr.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Hr){Qr(Hr)}}}),lr.length===0)return ye.createElement("div",{role:"listbox",id:"".concat(Pn,"_list"),className:"".concat(tn,"-empty"),onMouseDown:ar},Mn);var gi=Object.keys(Tn).map(function(Wr){return Tn[Wr]}),xo=function(Hr){return Hr.label};function Mi(Wr,Hr){var Li=Wr.group;return{role:Li?"presentation":"option",id:"".concat(Pn,"_list_").concat(Hr)}}var Go=function(Hr){var Li=lr[Hr];if(!Li)return null;var _i=Li.data||{},ur=_i.value,It=Li.group,Ei=(0,ke.Z)(_i,!0),Kr=xo(Li);return Li?ye.createElement("div",(0,rt.Z)({"aria-label":typeof Kr=="string"&&!It?Kr:null},Ei,{key:Hr},Mi(Li,Hr),{"aria-selected":Ki(ur)}),ur):null},po={role:"listbox",id:"".concat(Pn,"_list")};return ye.createElement(ye.Fragment,null,Yn&&ye.createElement("div",(0,rt.Z)({},po,{style:{height:0,width:0,overflow:"hidden"}}),Go(Tr-1),Go(Tr),Go(Tr+1)),ye.createElement(Fr.Z,{itemKey:"key",ref:br,data:lr,height:qr,itemHeight:Br,fullHeight:!1,onMouseDown:ar,onScroll:an,virtual:Yn,direction:Lr,innerProps:Yn?null:po},function(Wr,Hr){var Li,_i=Wr.group,ur=Wr.groupOption,It=Wr.data,Ei=Wr.label,Kr=Wr.value,Nr=It.key;if(_i){var Wi,Ur=(Wi=It.title)!==null&&Wi!==void 0?Wi:ot(Ei)?Ei.toString():void 0;return ye.createElement("div",{className:me()(tn,"".concat(tn,"-group")),title:Ur},Ei!==void 0?Ei:Nr)}var jr=It.disabled,wi=It.title,Vi=It.children,bi=It.style,vo=It.className,Ar=(0,ve.Z)(It,Cr),Dr=(0,Sr.Z)(Ar,gi),zr=Ki(Kr),Zn="".concat(tn,"-option"),to=me()(tn,Zn,vo,(Li={},(0,ie.Z)(Li,"".concat(Zn,"-grouped"),ur),(0,ie.Z)(Li,"".concat(Zn,"-active"),Tr===Hr&&!jr),(0,ie.Z)(Li,"".concat(Zn,"-disabled"),jr),(0,ie.Z)(Li,"".concat(Zn,"-selected"),zr),Li)),yo=xo(Wr),ta=!$n||typeof $n=="function"||zr,wo=typeof yo=="number"?yo:yo||Kr,Zo=ot(wo)?wo.toString():void 0;return wi!==void 0&&(Zo=wi),ye.createElement("div",(0,rt.Z)({},(0,ke.Z)(Dr),Yn?{}:Mi(Wr,Hr),{"aria-selected":zr,className:to,title:Zo,onMouseMove:function(){Tr===Hr||jr||Ln(Hr)},onClick:function(){jr||Nn(Kr)},style:bi}),ye.createElement("div",{className:"".concat(Zn,"-content")},wo),ye.isValidElement($n)||zr,ta&&ye.createElement(re,{className:"".concat(tn,"-option-state"),customizeIcon:$n,customizeIconProps:{isSelected:zr}},zr?"\u2713":null))}))},Yr=ye.forwardRef(di);Yr.displayName="OptionList";var Ri=Yr;function hr(en){var Gt=en.mode,Cn=en.options,Gn=en.children,ir=en.backfill,Pn=en.allowClear,Yt=en.placeholder,zn=en.getInputElement,Qn=en.showSearch,or=en.onSearch,rn=en.defaultOpen,Mn=en.autoFocus,an=en.labelInValue,gn=en.value,En=en.inputValue,pn=en.optionLabelProp,On=isMultiple(Gt),Dn=Qn!==void 0?Qn:On||Gt==="combobox",$n=Cn||convertChildrenToData(Gn);if(warning(Gt!=="tags"||$n.every(function(Lr){return!Lr.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Gt==="tags"||Gt==="combobox"){var Fn=$n.some(function(Lr){return Lr.options?Lr.options.some(function(qr){return typeof("value"in qr?qr.value:qr.key)=="number"}):typeof("value"in Lr?Lr.value:Lr.key)=="number"});warning(!Fn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Gt!=="combobox"||!pn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Gt==="combobox"||!ir,"`backfill` only works with `combobox` mode."),warning(Gt==="combobox"||!zn,"`getInputElement` only work with `combobox` mode."),noteOnce(Gt!=="combobox"||!zn||!Pn||!Yt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),or&&!Dn&&Gt!=="combobox"&&Gt!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!rn||Mn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),gn!=null){var Tn=toArray(gn);warning(!an||Tn.every(function(Lr){return _typeof(Lr)==="object"&&("key"in Lr||"value"in Lr)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!On||Array.isArray(gn),"`value` should be array when `mode` is `multiple` or `tags`")}if(Gn){var Yn=null;toNodeArray(Gn).some(function(Lr){if(!React.isValidElement(Lr)||!Lr.type)return!1;var qr=Lr,Br=qr.type;if(Br.isSelectOption)return!1;if(Br.isSelectOptGroup){var tn=toNodeArray(Lr.props.children).every(function(lr){return!React.isValidElement(lr)||!Lr.type||lr.type.isSelectOption?!0:(Yn=lr.type,!1)});return!tn}return Yn=Br,!0}),Yn&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Yn.displayName||Yn.name||Yn,"`.")),warning(En===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Ir(en,Gt){if(en){var Cn=function Gn(ir){for(var Pn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Yt=0;Yt<ir.length;Yt++){var zn=ir[Yt];if(zn[Gt==null?void 0:Gt.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Pn&&Array.isArray(zn[Gt==null?void 0:Gt.options])&&Gn(zn[Gt==null?void 0:Gt.options],!0))break}};Cn(en)}}var Rr=null,yi=["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"],dn=["inputValue"];function mn(en){return!en||(0,ce.Z)(en)!=="object"}var un=ye.forwardRef(function(en,Gt){var Cn=en.id,Gn=en.mode,ir=en.prefixCls,Pn=ir===void 0?"rc-select":ir,Yt=en.backfill,zn=en.fieldNames,Qn=en.inputValue,or=en.searchValue,rn=en.onSearch,Mn=en.autoClearSearchValue,an=Mn===void 0?!0:Mn,gn=en.onSelect,En=en.onDeselect,pn=en.dropdownMatchSelectWidth,On=pn===void 0?!0:pn,Dn=en.filterOption,$n=en.filterSort,Fn=en.optionFilterProp,Tn=en.optionLabelProp,Yn=en.options,Lr=en.children,qr=en.defaultActiveFirstOption,Br=en.menuItemSelectedIcon,tn=en.virtual,lr=en.direction,br=en.listHeight,ar=br===void 0?200:br,Qr=en.listItemHeight,Xr=Qr===void 0?20:Qr,hi=en.value,Gr=en.defaultValue,Tr=en.labelInValue,Si=en.onChange,Ln=(0,ve.Z)(en,yi),Ki=(0,_t.ZP)(Cn),Nn=De(Gn),gi=!!(!Yn&&Lr),xo=ye.useMemo(function(){return Dn===void 0&&Gn==="combobox"?!1:Dn},[Dn,Gn]),Mi=ye.useMemo(function(){return lt(zn,gi)},[JSON.stringify(zn),gi]),Go=(0,be.Z)("",{value:or!==void 0?or:Qn,postState:function(ao){return ao||""}}),po=(0,je.Z)(Go,2),Wr=po[0],Hr=po[1],Li=vn(Yn,Lr,Mi,Fn,Tn),_i=Li.valueOptions,ur=Li.labelOptions,It=Li.options,Ei=ye.useCallback(function(ki){var ao=Ye(ki);return ao.map(function(io){var kr,Ba,Ra,Cs,Dl;if(mn(io))kr=io;else{var ql;Ra=io.key,Ba=io.label,kr=(ql=io.value)!==null&&ql!==void 0?ql:Ra}var yr=_i.get(kr);if(yr){var oa;if(Ba===void 0&&(Ba=yr==null?void 0:yr[Tn||Mi.label]),Ra===void 0&&(Ra=(oa=yr==null?void 0:yr.key)!==null&&oa!==void 0?oa:kr),Cs=yr==null?void 0:yr.disabled,Dl=yr==null?void 0:yr.title,0)var Ka}return{label:Ba,value:kr,key:Ra,disabled:Cs,title:Dl}})},[Mi,Tn,_i]),Kr=(0,be.Z)(Gr,{value:hi}),Nr=(0,je.Z)(Kr,2),Wi=Nr[0],Ur=Nr[1],jr=ye.useMemo(function(){var ki,ao=Ei(Wi);return Gn==="combobox"&&ht((ki=ao[0])===null||ki===void 0?void 0:ki.value)?[]:ao},[Wi,Ei,Gn]),wi=dt(jr,_i),Vi=(0,je.Z)(wi,2),bi=Vi[0],vo=Vi[1],Ar=ye.useMemo(function(){if(!Gn&&bi.length===1){var ki=bi[0];if(ki.value===null&&(ki.label===null||ki.label===void 0))return[]}return bi.map(function(ao){var io;return(0,Re.Z)((0,Re.Z)({},ao),{},{label:(io=ao.label)!==null&&io!==void 0?io:ao.value})})},[Gn,bi]),Dr=ye.useMemo(function(){return new Set(bi.map(function(ki){return ki.value}))},[bi]);ye.useEffect(function(){if(Gn==="combobox"){var ki,ao=(ki=bi[0])===null||ki===void 0?void 0:ki.value;Hr(st(ao)?String(ao):"")}},[bi]);var zr=kn(function(ki,ao){var io,kr=ao!=null?ao:ki;return io={},(0,ie.Z)(io,Mi.value,ki),(0,ie.Z)(io,Mi.label,kr),io}),Zn=ye.useMemo(function(){if(Gn!=="tags")return It;var ki=(0,St.Z)(It),ao=function(kr){return _i.has(kr)};return(0,St.Z)(bi).sort(function(io,kr){return io.value<kr.value?-1:1}).forEach(function(io){var kr=io.value;ao(kr)||ki.push(zr(kr,io.label))}),ki},[zr,It,_i,bi,Gn]),to=Tt(Zn,Mi,Wr,xo,Fn),yo=ye.useMemo(function(){return Gn!=="tags"||!Wr||to.some(function(ki){return ki[Fn||"value"]===Wr})||to.some(function(ki){return ki[Mi.value]===Wr})?to:[zr(Wr)].concat((0,St.Z)(to))},[zr,Fn,Gn,to,Wr,Mi]),ta=ye.useMemo(function(){return $n?(0,St.Z)(yo).sort(function(ki,ao){return $n(ki,ao)}):yo},[yo,$n]),wo=ye.useMemo(function(){return Qe(ta,{fieldNames:Mi,childrenAsData:gi})},[ta,Mi,gi]),Zo=function(ao){var io=Ei(ao);if(Ur(io),Si&&(io.length!==bi.length||io.some(function(Ra,Cs){var Dl;return((Dl=bi[Cs])===null||Dl===void 0?void 0:Dl.value)!==(Ra==null?void 0:Ra.value)}))){var kr=Tr?io:io.map(function(Ra){return Ra.value}),Ba=io.map(function(Ra){return We(vo(Ra.value))});Si(Nn?kr:kr[0],Nn?Ba:Ba[0])}},ua=ye.useState(null),Pa=(0,je.Z)(ua,2),Da=Pa[0],Ss=Pa[1],es=ye.useState(0),wn=(0,je.Z)(es,2),Fa=wn[0],_s=wn[1],Il=qr!==void 0?qr:Gn!=="combobox",Ji=ye.useCallback(function(ki,ao){var io=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},kr=io.source,Ba=kr===void 0?"keyboard":kr;_s(ao),Yt&&Gn==="combobox"&&ki!==null&&Ba==="keyboard"&&Ss(String(ki))},[Yt,Gn]),jo=function(ao,io,kr){var Ba=function(){var Bl,Di=vo(ao);return[Tr?{label:Di==null?void 0:Di[Mi.label],value:ao,key:(Bl=Di==null?void 0:Di.key)!==null&&Bl!==void 0?Bl:ao}:ao,We(Di)]};if(io&&gn){var Ra=Ba(),Cs=(0,je.Z)(Ra,2),Dl=Cs[0],ql=Cs[1];gn(Dl,ql)}else if(!io&&En&&kr!=="clear"){var yr=Ba(),oa=(0,je.Z)(yr,2),Ka=oa[0],Pl=oa[1];En(Ka,Pl)}},ga=kn(function(ki,ao){var io,kr=Nn?ao.selected:!0;kr?io=Nn?[].concat((0,St.Z)(bi),[ki]):[ki]:io=bi.filter(function(Ba){return Ba.value!==ki}),Zo(io),jo(ki,kr),Gn==="combobox"?Ss(""):(!De||an)&&(Hr(""),Ss(""))}),Oo=function(ao,io){Zo(ao);var kr=io.type,Ba=io.values;(kr==="remove"||kr==="clear")&&Ba.forEach(function(Ra){jo(Ra.value,!1,kr)})},no=function(ao,io){if(Hr(ao),Ss(null),io.source==="submit"){var kr=(ao||"").trim();if(kr){var Ba=Array.from(new Set([].concat((0,St.Z)(Dr),[kr])));Zo(Ba),jo(kr,!0),Hr("")}return}io.source!=="blur"&&(Gn==="combobox"&&Zo(ao),rn==null||rn(ao))},Mo=function(ao){var io=ao;Gn!=="tags"&&(io=ao.map(function(Ba){var Ra=ur.get(Ba);return Ra==null?void 0:Ra.value}).filter(function(Ba){return Ba!==void 0}));var kr=Array.from(new Set([].concat((0,St.Z)(Dr),(0,St.Z)(io))));Zo(kr),kr.forEach(function(Ba){jo(Ba,!0)})},Wa=ye.useMemo(function(){var ki=tn!==!1&&On!==!1;return(0,Re.Z)((0,Re.Z)({},Li),{},{flattenOptions:wo,onActiveValue:Ji,defaultActiveFirstOption:Il,onSelect:ga,menuItemSelectedIcon:Br,rawValues:Dr,fieldNames:Mi,virtual:ki,direction:lr,listHeight:ar,listItemHeight:Xr,childrenAsData:gi})},[Li,wo,Ji,Il,ga,Br,Dr,Mi,tn,On,ar,Xr,gi]);return ye.createElement(Er.Provider,{value:Wa},ye.createElement(Ve,(0,rt.Z)({},Ln,{id:Ki,prefixCls:Pn,ref:Gt,omitDomProps:dn,mode:Gn,displayValues:Ar,onDisplayValuesChange:Oo,direction:lr,searchValue:Wr,onSearch:no,autoClearSearchValue:an,onSearchSplit:Mo,dropdownMatchSelectWidth:On,OptionList:Ri,emptyOptions:!wo.length,activeValue:Da,activeDescendantId:"".concat(Ki,"_list_").concat(Fa)})))}),Ut=un;Ut.Option=dr,Ut.OptGroup=Xn;var xn=Ut,jn=xn},9296:function(bn,ln,$e){"use strict";$e.r(ln),$e.d(ln,{ResizableTextArea:function(){return Fe},default:function(){return ht}});var rt=$e(5891),St=$e(57259),ie=$e(80962),Re=$e(80665),je=$e(29043),ve=$e(19149),ce=$e(26390),be=$e(92310),Ce=$e.n(be),ye=$e(93681),we=$e(5643),me=$e(35788),xe=$e(59301),fe=$e(29301),z=$e(28800),ee=$e(23073),ae=`
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;
`,re=["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"],le={},ue;function pe(ft){var Lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,et=ft.getAttribute("id")||ft.getAttribute("data-reactid")||ft.getAttribute("name");if(Lt&&le[et])return le[et];var it=window.getComputedStyle(ft),xt=it.getPropertyValue("box-sizing")||it.getPropertyValue("-moz-box-sizing")||it.getPropertyValue("-webkit-box-sizing"),Et=parseFloat(it.getPropertyValue("padding-bottom"))+parseFloat(it.getPropertyValue("padding-top")),Mt=parseFloat(it.getPropertyValue("border-bottom-width"))+parseFloat(it.getPropertyValue("border-top-width")),mt=re.map(function(vt){return"".concat(vt,":").concat(it.getPropertyValue(vt))}).join(";"),pt={sizingStyle:mt,paddingSize:Et,borderSize:Mt,boxSizing:xt};return Lt&&et&&(le[et]=pt),pt}function Ee(ft){var Lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,et=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,it=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ue||(ue=document.createElement("textarea"),ue.setAttribute("tab-index","-1"),ue.setAttribute("aria-hidden","true"),document.body.appendChild(ue)),ft.getAttribute("wrap")?ue.setAttribute("wrap",ft.getAttribute("wrap")):ue.removeAttribute("wrap");var xt=pe(ft,Lt),Et=xt.paddingSize,Mt=xt.borderSize,mt=xt.boxSizing,pt=xt.sizingStyle;ue.setAttribute("style","".concat(pt,";").concat(ae)),ue.value=ft.value||ft.placeholder||"";var vt=void 0,jt=void 0,At,Kt=ue.scrollHeight;if(mt==="border-box"?Kt+=Mt:mt==="content-box"&&(Kt-=Et),et!==null||it!==null){ue.value=" ";var Ct=ue.scrollHeight-Et;et!==null&&(vt=Ct*et,mt==="border-box"&&(vt=vt+Et+Mt),Kt=Math.max(vt,Kt)),it!==null&&(jt=Ct*it,mt==="border-box"&&(jt=jt+Et+Mt),At=Kt>jt?"":"hidden",Kt=Math.min(jt,Kt))}var gt={height:Kt,overflowY:At,resize:"none"};return vt&&(gt.minHeight=vt),jt&&(gt.maxHeight=jt),gt}var Pe=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Ie=0,ke=1,Ae=2,Oe=xe.forwardRef(function(ft,Lt){var et=ft,it=et.prefixCls,xt=et.onPressEnter,Et=et.defaultValue,Mt=et.value,mt=et.autoSize,pt=et.onResize,vt=et.className,jt=et.style,At=et.disabled,Kt=et.onChange,Ct=et.onInternalAutoSize,gt=(0,ve.Z)(et,Pe),tt=(0,me.Z)(Et,{value:Mt,postState:function(Xn){return Xn!=null?Xn:""}}),bt=(0,je.Z)(tt,2),Ke=bt[0],ut=bt[1],wt=function(Xn){ut(Xn.target.value),Kt==null||Kt(Xn)},yt=xe.useRef();xe.useImperativeHandle(Lt,function(){return{textArea:yt.current}});var lt=xe.useMemo(function(){return mt&&(0,Re.Z)(mt)==="object"?[mt.minRows,mt.maxRows]:[]},[mt]),Qe=(0,je.Z)(lt,2),We=Qe[0],Ue=Qe[1],qe=!!mt,He=function(){try{if(document.activeElement===yt.current){var Xn=yt.current,pr=Xn.selectionStart,dr=Xn.selectionEnd,vr=Xn.scrollTop;yt.current.setSelectionRange(pr,dr),yt.current.scrollTop=vr}}catch(Sr){}},De=xe.useState(Ae),Le=(0,je.Z)(De,2),Ve=Le[0],dt=Le[1],Ze=xe.useState(),Tt=(0,je.Z)(Ze,2),_t=Tt[0],Qt=Tt[1],kt=function(){dt(Ie)};(0,z.Z)(function(){qe&&kt()},[Mt,We,Ue,qe]),(0,z.Z)(function(){if(Ve===Ie)dt(ke);else if(Ve===ke){var Kn=Ee(yt.current,!1,We,Ue);dt(Ae),Qt(Kn)}else He()},[Ve]);var Nt=xe.useRef(),Zt=function(){ee.Z.cancel(Nt.current)},on=function(Xn){Ve===Ae&&(pt==null||pt(Xn),mt&&(Zt(),Nt.current=(0,ee.Z)(function(){kt()})))};xe.useEffect(function(){return Zt},[]);var vn=qe?_t:null,kn=(0,St.Z)((0,St.Z)({},jt),vn);return(Ve===Ie||Ve===ke)&&(kn.overflowY="hidden",kn.overflowX="hidden"),xe.createElement(fe.Z,{onResize:on,disabled:!(mt||pt)},xe.createElement("textarea",(0,rt.Z)({},gt,{ref:yt,style:kn,className:Ce()(it,vt,(0,ie.Z)({},"".concat(it,"-disabled"),At)),disabled:At,value:Ke,onChange:wt})))}),Fe=Oe,_e=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Ye(ft,Lt){return(0,ce.Z)(ft||"").slice(0,Lt).join("")}function ze(ft,Lt,et,it){var xt=et;return ft?xt=Ye(et,it):(0,ce.Z)(Lt||"").length<et.length&&(0,ce.Z)(et||"").length>it&&(xt=Lt),xt}var Xe=xe.forwardRef(function(ft,Lt){var et,it=ft.defaultValue,xt=ft.value,Et=ft.onFocus,Mt=ft.onBlur,mt=ft.onChange,pt=ft.allowClear,vt=ft.maxLength,jt=ft.onCompositionStart,At=ft.onCompositionEnd,Kt=ft.suffix,Ct=ft.prefixCls,gt=Ct===void 0?"rc-textarea":Ct,tt=ft.classes,bt=ft.showCount,Ke=ft.className,ut=ft.style,wt=ft.disabled,yt=ft.hidden,lt=ft.classNames,Qe=ft.styles,We=ft.onResize,Ue=(0,ve.Z)(ft,_e),qe=(0,me.Z)(it,{value:xt,defaultValue:it}),He=(0,je.Z)(qe,2),De=He[0],Le=He[1],Ve=(0,xe.useRef)(null),dt=xe.useState(!1),Ze=(0,je.Z)(dt,2),Tt=Ze[0],_t=Ze[1],Qt=xe.useState(!1),kt=(0,je.Z)(Qt,2),Nt=kt[0],Zt=kt[1],on=xe.useRef(),vn=xe.useRef(0),kn=xe.useState(null),Kn=(0,je.Z)(kn,2),Xn=Kn[0],pr=Kn[1],dr=function(){var mn;(mn=Ve.current)===null||mn===void 0||mn.textArea.focus()};(0,xe.useImperativeHandle)(Lt,function(){return{resizableTextArea:Ve.current,focus:dr,blur:function(){var mn;(mn=Ve.current)===null||mn===void 0||mn.textArea.blur()}}}),(0,xe.useEffect)(function(){_t(function(dn){return!wt&&dn})},[wt]);var vr=Number(vt)>0,Sr=function(mn){Zt(!0),on.current=De,vn.current=mn.currentTarget.selectionStart,jt==null||jt(mn)},Fr=function(mn){Zt(!1);var un=mn.currentTarget.value;if(vr){var Ut,xn=vn.current>=vt+1||vn.current===((Ut=on.current)===null||Ut===void 0?void 0:Ut.length);un=ze(xn,on.current,un,vt)}un!==De&&(Le(un),(0,we.rJ)(mn.currentTarget,mn,mt,un)),At==null||At(mn)},li=function(mn){var un=mn.target.value;if(!Nt&&vr){var Ut=mn.target.selectionStart>=vt+1||mn.target.selectionStart===un.length||!mn.target.selectionStart;un=ze(Ut,De,un,vt)}Le(un),(0,we.rJ)(mn.currentTarget,mn,mt,un)},Er=function(mn){var un=Ue.onPressEnter,Ut=Ue.onKeyDown;mn.key==="Enter"&&un&&un(mn),Ut==null||Ut(mn)},xi=function(mn){_t(!0),Et==null||Et(mn)},Cr=function(mn){_t(!1),Mt==null||Mt(mn)},ot=function(mn){var un;Le(""),dr(),(0,we.rJ)((un=Ve.current)===null||un===void 0?void 0:un.textArea,mn,mt)},di=(0,we.D7)(De);!Nt&&vr&&xt==null&&(di=Ye(di,vt));var Yr=Kt,Ri;if(bt){var hr=(0,ce.Z)(di).length;(0,Re.Z)(bt)==="object"?Ri=bt.formatter({value:di,count:hr,maxLength:vt}):Ri="".concat(hr).concat(vr?" / ".concat(vt):""),Yr=xe.createElement(xe.Fragment,null,Yr,xe.createElement("span",{className:Ce()("".concat(gt,"-data-count"),lt==null?void 0:lt.count),style:Qe==null?void 0:Qe.count},Ri))}var Ir=function(mn){var un;We==null||We(mn),(un=Ve.current)!==null&&un!==void 0&&un.textArea.style.height&&pr(!0)},Rr=!Ue.autoSize&&!bt&&!pt,yi=xe.createElement(ye.BaseInput,{value:di,allowClear:pt,handleReset:ot,suffix:Yr,prefixCls:gt,classes:{affixWrapper:Ce()(tt==null?void 0:tt.affixWrapper,(et={},(0,ie.Z)(et,"".concat(gt,"-show-count"),bt),(0,ie.Z)(et,"".concat(gt,"-textarea-allow-clear"),pt),et))},disabled:wt,focused:Tt,className:Ke,style:(0,St.Z)((0,St.Z)({},ut),Xn&&!Rr?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Ri=="string"?Ri:void 0}},hidden:yt,inputElement:xe.createElement(Fe,(0,rt.Z)({},Ue,{onKeyDown:Er,onChange:li,onFocus:xi,onBlur:Cr,onCompositionStart:Sr,onCompositionEnd:Fr,className:lt==null?void 0:lt.textarea,style:(0,St.Z)((0,St.Z)({},Qe==null?void 0:Qe.textarea),{},{resize:ut==null?void 0:ut.resize}),disabled:wt,prefixCls:gt,onResize:Ir,ref:Ve}))});return yi}),st=Xe,ht=st},39417:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return ke}});var rt=$e(5891),St=$e(80962),ie=$e(19149),Re=$e(57259),je=$e(79545),ve=$e(68550),ce=$e(21882),be=$e(17928),Ce=$e(7711),ye=$e(92310),we=$e.n(ye),me=$e(36994),xe=$e(59301),fe=$e(39378),z=function(Oe){for(var Fe=Oe.prefixCls,_e=Oe.level,Ye=Oe.isStart,ze=Oe.isEnd,Xe="".concat(Fe,"-indent-unit"),st=[],ht=0;ht<_e;ht+=1){var ft;st.push(xe.createElement("span",{key:ht,className:we()(Xe,(ft={},(0,St.Z)(ft,"".concat(Xe,"-start"),Ye[ht]),(0,St.Z)(ft,"".concat(Xe,"-end"),ze[ht]),ft))}))}return xe.createElement("span",{"aria-hidden":"true",className:"".concat(Fe,"-indent")},st)},ee=xe.memo(z),ae=$e(67841),re=$e(71430),le=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],ue="open",pe="close",Ee="---",Pe=function(Ae){(0,be.Z)(Fe,Ae);var Oe=(0,Ce.Z)(Fe);function Fe(){var _e;(0,je.Z)(this,Fe);for(var Ye=arguments.length,ze=new Array(Ye),Xe=0;Xe<Ye;Xe++)ze[Xe]=arguments[Xe];return _e=Oe.call.apply(Oe,[this].concat(ze)),_e.state={dragNodeHighlight:!1},_e.selectHandle=void 0,_e.cacheIndent=void 0,_e.onSelectorClick=function(st){var ht=_e.props.context.onNodeClick;ht(st,(0,re.F)(_e.props)),_e.isSelectable()?_e.onSelect(st):_e.onCheck(st)},_e.onSelectorDoubleClick=function(st){var ht=_e.props.context.onNodeDoubleClick;ht(st,(0,re.F)(_e.props))},_e.onSelect=function(st){if(!_e.isDisabled()){var ht=_e.props.context.onNodeSelect;ht(st,(0,re.F)(_e.props))}},_e.onCheck=function(st){if(!_e.isDisabled()){var ht=_e.props,ft=ht.disableCheckbox,Lt=ht.checked,et=_e.props.context.onNodeCheck;if(!(!_e.isCheckable()||ft)){var it=!Lt;et(st,(0,re.F)(_e.props),it)}}},_e.onMouseEnter=function(st){var ht=_e.props.context.onNodeMouseEnter;ht(st,(0,re.F)(_e.props))},_e.onMouseLeave=function(st){var ht=_e.props.context.onNodeMouseLeave;ht(st,(0,re.F)(_e.props))},_e.onContextMenu=function(st){var ht=_e.props.context.onNodeContextMenu;ht(st,(0,re.F)(_e.props))},_e.onDragStart=function(st){var ht=_e.props.context.onNodeDragStart;st.stopPropagation(),_e.setState({dragNodeHighlight:!0}),ht(st,(0,ce.Z)(_e));try{st.dataTransfer.setData("text/plain","")}catch(ft){}},_e.onDragEnter=function(st){var ht=_e.props.context.onNodeDragEnter;st.preventDefault(),st.stopPropagation(),ht(st,(0,ce.Z)(_e))},_e.onDragOver=function(st){var ht=_e.props.context.onNodeDragOver;st.preventDefault(),st.stopPropagation(),ht(st,(0,ce.Z)(_e))},_e.onDragLeave=function(st){var ht=_e.props.context.onNodeDragLeave;st.stopPropagation(),ht(st,(0,ce.Z)(_e))},_e.onDragEnd=function(st){var ht=_e.props.context.onNodeDragEnd;st.stopPropagation(),_e.setState({dragNodeHighlight:!1}),ht(st,(0,ce.Z)(_e))},_e.onDrop=function(st){var ht=_e.props.context.onNodeDrop;st.preventDefault(),st.stopPropagation(),_e.setState({dragNodeHighlight:!1}),ht(st,(0,ce.Z)(_e))},_e.onExpand=function(st){var ht=_e.props,ft=ht.loading,Lt=ht.context.onNodeExpand;ft||Lt(st,(0,re.F)(_e.props))},_e.setSelectHandle=function(st){_e.selectHandle=st},_e.getNodeState=function(){var st=_e.props.expanded;return _e.isLeaf()?null:st?ue:pe},_e.hasChildren=function(){var st=_e.props.eventKey,ht=_e.props.context.keyEntities,ft=(0,ae.Z)(ht,st)||{},Lt=ft.children;return!!(Lt||[]).length},_e.isLeaf=function(){var st=_e.props,ht=st.isLeaf,ft=st.loaded,Lt=_e.props.context.loadData,et=_e.hasChildren();return ht===!1?!1:ht||!Lt&&!et||Lt&&ft&&!et},_e.isDisabled=function(){var st=_e.props.disabled,ht=_e.props.context.disabled;return!!(ht||st)},_e.isCheckable=function(){var st=_e.props.checkable,ht=_e.props.context.checkable;return!ht||st===!1?!1:ht},_e.syncLoadData=function(st){var ht=st.expanded,ft=st.loading,Lt=st.loaded,et=_e.props.context,it=et.loadData,xt=et.onNodeLoad;ft||it&&ht&&!_e.isLeaf()&&!_e.hasChildren()&&!Lt&&xt((0,re.F)(_e.props))},_e.isDraggable=function(){var st=_e.props,ht=st.data,ft=st.context.draggable;return!!(ft&&(!ft.nodeDraggable||ft.nodeDraggable(ht)))},_e.renderDragHandler=function(){var st=_e.props.context,ht=st.draggable,ft=st.prefixCls;return ht!=null&&ht.icon?xe.createElement("span",{className:"".concat(ft,"-draggable-icon")},ht.icon):null},_e.renderSwitcherIconDom=function(st){var ht=_e.props.switcherIcon,ft=_e.props.context.switcherIcon,Lt=ht||ft;return typeof Lt=="function"?Lt((0,Re.Z)((0,Re.Z)({},_e.props),{},{isLeaf:st})):Lt},_e.renderSwitcher=function(){var st=_e.props.expanded,ht=_e.props.context.prefixCls;if(_e.isLeaf()){var ft=_e.renderSwitcherIconDom(!0);return ft!==!1?xe.createElement("span",{className:we()("".concat(ht,"-switcher"),"".concat(ht,"-switcher-noop"))},ft):null}var Lt=we()("".concat(ht,"-switcher"),"".concat(ht,"-switcher_").concat(st?ue:pe)),et=_e.renderSwitcherIconDom(!1);return et!==!1?xe.createElement("span",{onClick:_e.onExpand,className:Lt},et):null},_e.renderCheckbox=function(){var st=_e.props,ht=st.checked,ft=st.halfChecked,Lt=st.disableCheckbox,et=_e.props.context.prefixCls,it=_e.isDisabled(),xt=_e.isCheckable();if(!xt)return null;var Et=typeof xt!="boolean"?xt:null;return xe.createElement("span",{className:we()("".concat(et,"-checkbox"),ht&&"".concat(et,"-checkbox-checked"),!ht&&ft&&"".concat(et,"-checkbox-indeterminate"),(it||Lt)&&"".concat(et,"-checkbox-disabled")),onClick:_e.onCheck},Et)},_e.renderIcon=function(){var st=_e.props.loading,ht=_e.props.context.prefixCls;return xe.createElement("span",{className:we()("".concat(ht,"-iconEle"),"".concat(ht,"-icon__").concat(_e.getNodeState()||"docu"),st&&"".concat(ht,"-icon_loading"))})},_e.renderSelector=function(){var st=_e.state.dragNodeHighlight,ht=_e.props,ft=ht.title,Lt=ft===void 0?Ee:ft,et=ht.selected,it=ht.icon,xt=ht.loading,Et=ht.data,Mt=_e.props.context,mt=Mt.prefixCls,pt=Mt.showIcon,vt=Mt.icon,jt=Mt.loadData,At=Mt.titleRender,Kt=_e.isDisabled(),Ct="".concat(mt,"-node-content-wrapper"),gt;if(pt){var tt=it||vt;gt=tt?xe.createElement("span",{className:we()("".concat(mt,"-iconEle"),"".concat(mt,"-icon__customize"))},typeof tt=="function"?tt(_e.props):tt):_e.renderIcon()}else jt&&xt&&(gt=_e.renderIcon());var bt;typeof Lt=="function"?bt=Lt(Et):At?bt=At(Et):bt=Lt;var Ke=xe.createElement("span",{className:"".concat(mt,"-title")},bt);return xe.createElement("span",{ref:_e.setSelectHandle,title:typeof Lt=="string"?Lt:"",className:we()("".concat(Ct),"".concat(Ct,"-").concat(_e.getNodeState()||"normal"),!Kt&&(et||st)&&"".concat(mt,"-node-selected")),onMouseEnter:_e.onMouseEnter,onMouseLeave:_e.onMouseLeave,onContextMenu:_e.onContextMenu,onClick:_e.onSelectorClick,onDoubleClick:_e.onSelectorDoubleClick},gt,Ke,_e.renderDropIndicator())},_e.renderDropIndicator=function(){var st=_e.props,ht=st.disabled,ft=st.eventKey,Lt=_e.props.context,et=Lt.draggable,it=Lt.dropLevelOffset,xt=Lt.dropPosition,Et=Lt.prefixCls,Mt=Lt.indent,mt=Lt.dropIndicatorRender,pt=Lt.dragOverNodeKey,vt=Lt.direction,jt=!!et,At=!ht&&jt&&pt===ft,Kt=Mt!=null?Mt:_e.cacheIndent;return _e.cacheIndent=Mt,At?mt({dropPosition:xt,dropLevelOffset:it,indent:Kt,prefixCls:Et,direction:vt}):null},_e}return(0,ve.Z)(Fe,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var Ye=this.props.selectable,ze=this.props.context.selectable;return typeof Ye=="boolean"?Ye:ze}},{key:"render",value:function(){var Ye,ze=this.props,Xe=ze.eventKey,st=ze.className,ht=ze.style,ft=ze.dragOver,Lt=ze.dragOverGapTop,et=ze.dragOverGapBottom,it=ze.isLeaf,xt=ze.isStart,Et=ze.isEnd,Mt=ze.expanded,mt=ze.selected,pt=ze.checked,vt=ze.halfChecked,jt=ze.loading,At=ze.domRef,Kt=ze.active,Ct=ze.data,gt=ze.onMouseMove,tt=ze.selectable,bt=(0,ie.Z)(ze,le),Ke=this.props.context,ut=Ke.prefixCls,wt=Ke.filterTreeNode,yt=Ke.keyEntities,lt=Ke.dropContainerKey,Qe=Ke.dropTargetKey,We=Ke.draggingNodeKey,Ue=this.isDisabled(),qe=(0,me.Z)(bt,{aria:!0,data:!0}),He=(0,ae.Z)(yt,Xe)||{},De=He.level,Le=Et[Et.length-1],Ve=this.isDraggable(),dt=!Ue&&Ve,Ze=We===Xe,Tt=tt!==void 0?{"aria-selected":!!tt}:void 0;return xe.createElement("div",(0,rt.Z)({ref:At,className:we()(st,"".concat(ut,"-treenode"),(Ye={},(0,St.Z)(Ye,"".concat(ut,"-treenode-disabled"),Ue),(0,St.Z)(Ye,"".concat(ut,"-treenode-switcher-").concat(Mt?"open":"close"),!it),(0,St.Z)(Ye,"".concat(ut,"-treenode-checkbox-checked"),pt),(0,St.Z)(Ye,"".concat(ut,"-treenode-checkbox-indeterminate"),vt),(0,St.Z)(Ye,"".concat(ut,"-treenode-selected"),mt),(0,St.Z)(Ye,"".concat(ut,"-treenode-loading"),jt),(0,St.Z)(Ye,"".concat(ut,"-treenode-active"),Kt),(0,St.Z)(Ye,"".concat(ut,"-treenode-leaf-last"),Le),(0,St.Z)(Ye,"".concat(ut,"-treenode-draggable"),Ve),(0,St.Z)(Ye,"dragging",Ze),(0,St.Z)(Ye,"drop-target",Qe===Xe),(0,St.Z)(Ye,"drop-container",lt===Xe),(0,St.Z)(Ye,"drag-over",!Ue&&ft),(0,St.Z)(Ye,"drag-over-gap-top",!Ue&&Lt),(0,St.Z)(Ye,"drag-over-gap-bottom",!Ue&&et),(0,St.Z)(Ye,"filter-node",wt&&wt((0,re.F)(this.props))),Ye)),style:ht,draggable:dt,"aria-grabbed":Ze,onDragStart:dt?this.onDragStart:void 0,onDragEnter:Ve?this.onDragEnter:void 0,onDragOver:Ve?this.onDragOver:void 0,onDragLeave:Ve?this.onDragLeave:void 0,onDrop:Ve?this.onDrop:void 0,onDragEnd:Ve?this.onDragEnd:void 0,onMouseMove:gt},Tt,qe),xe.createElement(ee,{prefixCls:ut,level:De,isStart:xt,isEnd:Et}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),Fe}(xe.Component),Ie=function(Oe){return xe.createElement(fe.k.Consumer,null,function(Fe){return xe.createElement(Pe,(0,rt.Z)({},Oe,{context:Fe}))})};Ie.displayName="TreeNode",Ie.isTreeNode=1;var ke=Ie},39378:function(bn,ln,$e){"use strict";$e.d(ln,{k:function(){return St}});var rt=$e(59301),St=rt.createContext(null)},99581:function(bn,ln,$e){"use strict";$e.d(ln,{O:function(){return ke.Z},Z:function(){return Ke}});var rt=$e(5891),St=$e(80962),ie=$e(80665),Re=$e(57259),je=$e(26390),ve=$e(79545),ce=$e(68550),be=$e(21882),Ce=$e(17928),ye=$e(7711),we=$e(92310),me=$e.n(we),xe=$e(85108),fe=$e(36994),z=$e(51395),ee=$e(59301),ae=$e(39378);function re(ut){var wt=ut.dropPosition,yt=ut.dropLevelOffset,lt=ut.indent,Qe={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(wt){case-1:Qe.top=0,Qe.left=-yt*lt;break;case 1:Qe.bottom=0,Qe.left=-yt*lt;break;case 0:Qe.bottom=0,Qe.left=lt;break}return ee.createElement("div",{style:Qe})}function le(ut){if(ut==null)throw new TypeError("Cannot destructure "+ut)}var ue=$e(29043),pe=$e(19149),Ee=$e(28800),Pe=$e(21881),Ie=$e(43469),ke=$e(39417);function Ae(ut,wt){var yt=ee.useState(!1),lt=(0,ue.Z)(yt,2),Qe=lt[0],We=lt[1];ee.useLayoutEffect(function(){if(Qe)return ut(),function(){wt()}},[Qe]),ee.useLayoutEffect(function(){return We(!0),function(){We(!1)}},[])}var Oe=$e(71430),Fe=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],_e=function(wt,yt){var lt=wt.className,Qe=wt.style,We=wt.motion,Ue=wt.motionNodes,qe=wt.motionType,He=wt.onMotionStart,De=wt.onMotionEnd,Le=wt.active,Ve=wt.treeNodeRequiredProps,dt=(0,pe.Z)(wt,Fe),Ze=ee.useState(!0),Tt=(0,ue.Z)(Ze,2),_t=Tt[0],Qt=Tt[1],kt=ee.useContext(ae.k),Nt=kt.prefixCls,Zt=Ue&&qe!=="hide";(0,Ee.Z)(function(){Ue&&Zt!==_t&&Qt(Zt)},[Ue]);var on=function(){Ue&&He()},vn=ee.useRef(!1),kn=function(){Ue&&!vn.current&&(vn.current=!0,De())};Ae(on,kn);var Kn=function(pr){Zt===pr&&kn()};return Ue?ee.createElement(Ie.default,(0,rt.Z)({ref:yt,visible:_t},We,{motionAppear:qe==="show",onVisibleChanged:Kn}),function(Xn,pr){var dr=Xn.className,vr=Xn.style;return ee.createElement("div",{ref:pr,className:me()("".concat(Nt,"-treenode-motion"),dr),style:vr},Ue.map(function(Sr){var Fr=(0,rt.Z)({},(le(Sr.data),Sr.data)),li=Sr.title,Er=Sr.key,xi=Sr.isStart,Cr=Sr.isEnd;delete Fr.children;var ot=(0,Oe.H8)(Er,Ve);return ee.createElement(ke.Z,(0,rt.Z)({},Fr,ot,{title:li,active:Le,data:Sr.data,key:Er,isStart:xi,isEnd:Cr}))}))}):ee.createElement(ke.Z,(0,rt.Z)({domRef:yt,className:lt,style:Qe},dt,{active:Le}))};_e.displayName="MotionTreeNode";var Ye=ee.forwardRef(_e),ze=Ye;function Xe(){var ut=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],yt=ut.length,lt=wt.length;if(Math.abs(yt-lt)!==1)return{add:!1,key:null};function Qe(We,Ue){var qe=new Map;We.forEach(function(De){qe.set(De,!0)});var He=Ue.filter(function(De){return!qe.has(De)});return He.length===1?He[0]:null}return yt<lt?{add:!0,key:Qe(ut,wt)}:{add:!1,key:Qe(wt,ut)}}function st(ut,wt,yt){var lt=ut.findIndex(function(qe){return qe.key===yt}),Qe=ut[lt+1],We=wt.findIndex(function(qe){return qe.key===yt});if(Qe){var Ue=wt.findIndex(function(qe){return qe.key===Qe.key});return wt.slice(We+1,Ue)}return wt.slice(We+1)}var ht=["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"],ft={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Lt=function(){},et="RC_TREE_MOTION_".concat(Math.random()),it={key:et},xt={key:et,level:0,index:0,pos:"0",node:it,nodes:[it]},Et={parent:null,children:[],pos:xt.pos,data:it,title:null,key:et,isStart:[],isEnd:[]};function Mt(ut,wt,yt,lt){return wt===!1||!yt?ut:ut.slice(0,Math.ceil(yt/lt)+1)}function mt(ut){var wt=ut.key,yt=ut.pos;return(0,Oe.km)(wt,yt)}function pt(ut){for(var wt=String(ut.data.key),yt=ut;yt.parent;)yt=yt.parent,wt="".concat(yt.data.key," > ").concat(wt);return wt}var vt=ee.forwardRef(function(ut,wt){var yt=ut.prefixCls,lt=ut.data,Qe=ut.selectable,We=ut.checkable,Ue=ut.expandedKeys,qe=ut.selectedKeys,He=ut.checkedKeys,De=ut.loadedKeys,Le=ut.loadingKeys,Ve=ut.halfCheckedKeys,dt=ut.keyEntities,Ze=ut.disabled,Tt=ut.dragging,_t=ut.dragOverNodeKey,Qt=ut.dropPosition,kt=ut.motion,Nt=ut.height,Zt=ut.itemHeight,on=ut.virtual,vn=ut.focusable,kn=ut.activeItem,Kn=ut.focused,Xn=ut.tabIndex,pr=ut.onKeyDown,dr=ut.onFocus,vr=ut.onBlur,Sr=ut.onActiveChange,Fr=ut.onListChangeStart,li=ut.onListChangeEnd,Er=(0,pe.Z)(ut,ht),xi=ee.useRef(null),Cr=ee.useRef(null);ee.useImperativeHandle(wt,function(){return{scrollTo:function(Mn){xi.current.scrollTo(Mn)},getIndentWidth:function(){return Cr.current.offsetWidth}}});var ot=ee.useState(Ue),di=(0,ue.Z)(ot,2),Yr=di[0],Ri=di[1],hr=ee.useState(lt),Ir=(0,ue.Z)(hr,2),Rr=Ir[0],yi=Ir[1],dn=ee.useState(lt),mn=(0,ue.Z)(dn,2),un=mn[0],Ut=mn[1],xn=ee.useState([]),jn=(0,ue.Z)(xn,2),en=jn[0],Gt=jn[1],Cn=ee.useState(null),Gn=(0,ue.Z)(Cn,2),ir=Gn[0],Pn=Gn[1],Yt=ee.useRef(lt);Yt.current=lt;function zn(){var rn=Yt.current;yi(rn),Ut(rn),Gt([]),Pn(null),li()}(0,Ee.Z)(function(){Ri(Ue);var rn=Xe(Yr,Ue);if(rn.key!==null)if(rn.add){var Mn=Rr.findIndex(function(Dn){var $n=Dn.key;return $n===rn.key}),an=Mt(st(Rr,lt,rn.key),on,Nt,Zt),gn=Rr.slice();gn.splice(Mn+1,0,Et),Ut(gn),Gt(an),Pn("show")}else{var En=lt.findIndex(function(Dn){var $n=Dn.key;return $n===rn.key}),pn=Mt(st(lt,Rr,rn.key),on,Nt,Zt),On=lt.slice();On.splice(En+1,0,Et),Ut(On),Gt(pn),Pn("hide")}else Rr!==lt&&(yi(lt),Ut(lt))},[Ue,lt]),ee.useEffect(function(){Tt||zn()},[Tt]);var Qn=kt?un:lt,or={expandedKeys:Ue,selectedKeys:qe,loadedKeys:De,loadingKeys:Le,checkedKeys:He,halfCheckedKeys:Ve,dragOverNodeKey:_t,dropPosition:Qt,keyEntities:dt};return ee.createElement(ee.Fragment,null,Kn&&kn&&ee.createElement("span",{style:ft,"aria-live":"assertive"},pt(kn)),ee.createElement("div",null,ee.createElement("input",{style:ft,disabled:vn===!1||Ze,tabIndex:vn!==!1?Xn:null,onKeyDown:pr,onFocus:dr,onBlur:vr,value:"",onChange:Lt,"aria-label":"for screen reader"})),ee.createElement("div",{className:"".concat(yt,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},ee.createElement("div",{className:"".concat(yt,"-indent")},ee.createElement("div",{ref:Cr,className:"".concat(yt,"-indent-unit")}))),ee.createElement(Pe.Z,(0,rt.Z)({},Er,{data:Qn,itemKey:mt,height:Nt,fullHeight:!1,virtual:on,itemHeight:Zt,prefixCls:"".concat(yt,"-list"),ref:xi,onVisibleChange:function(Mn,an){var gn=new Set(Mn),En=an.filter(function(pn){return!gn.has(pn)});En.some(function(pn){return mt(pn)===et})&&zn()}}),function(rn){var Mn=rn.pos,an=(0,rt.Z)({},(le(rn.data),rn.data)),gn=rn.title,En=rn.key,pn=rn.isStart,On=rn.isEnd,Dn=(0,Oe.km)(En,Mn);delete an.key,delete an.children;var $n=(0,Oe.H8)(Dn,or);return ee.createElement(ze,(0,rt.Z)({},an,$n,{title:gn,active:!!kn&&En===kn.key,pos:Mn,data:rn.data,isStart:pn,isEnd:On,motion:kt,motionNodes:En===et?en:null,motionType:ir,onMotionStart:Fr,onMotionEnd:zn,treeNodeRequiredProps:or,onMouseMove:function(){Sr(null)}}))}))});vt.displayName="NodeList";var jt=vt,At=$e(35654),Kt=$e(90782),Ct=$e(67841),gt=10,tt=function(ut){(0,Ce.Z)(yt,ut);var wt=(0,ye.Z)(yt);function yt(){var lt;(0,ve.Z)(this,yt);for(var Qe=arguments.length,We=new Array(Qe),Ue=0;Ue<Qe;Ue++)We[Ue]=arguments[Ue];return lt=wt.call.apply(wt,[this].concat(We)),lt.destroyed=!1,lt.delayedDragEnterLogic=void 0,lt.loadingRetryTimes={},lt.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,Oe.w$)()},lt.dragStartMousePosition=null,lt.dragNode=void 0,lt.currentMouseOverDroppableNodeKey=null,lt.listRef=ee.createRef(),lt.onNodeDragStart=function(qe,He){var De=lt.state,Le=De.expandedKeys,Ve=De.keyEntities,dt=lt.props.onDragStart,Ze=He.props.eventKey;lt.dragNode=He,lt.dragStartMousePosition={x:qe.clientX,y:qe.clientY};var Tt=(0,At._5)(Le,Ze);lt.setState({draggingNodeKey:Ze,dragChildrenKeys:(0,At.wA)(Ze,Ve),indent:lt.listRef.current.getIndentWidth()}),lt.setExpandedKeys(Tt),window.addEventListener("dragend",lt.onWindowDragEnd),dt==null||dt({event:qe,node:(0,Oe.F)(He.props)})},lt.onNodeDragEnter=function(qe,He){var De=lt.state,Le=De.expandedKeys,Ve=De.keyEntities,dt=De.dragChildrenKeys,Ze=De.flattenNodes,Tt=De.indent,_t=lt.props,Qt=_t.onDragEnter,kt=_t.onExpand,Nt=_t.allowDrop,Zt=_t.direction,on=He.props,vn=on.pos,kn=on.eventKey,Kn=(0,be.Z)(lt),Xn=Kn.dragNode;if(lt.currentMouseOverDroppableNodeKey!==kn&&(lt.currentMouseOverDroppableNodeKey=kn),!Xn){lt.resetDragState();return}var pr=(0,At.OM)(qe,Xn,He,Tt,lt.dragStartMousePosition,Nt,Ze,Ve,Le,Zt),dr=pr.dropPosition,vr=pr.dropLevelOffset,Sr=pr.dropTargetKey,Fr=pr.dropContainerKey,li=pr.dropTargetPos,Er=pr.dropAllowed,xi=pr.dragOverNodeKey;if(dt.indexOf(Sr)!==-1||!Er){lt.resetDragState();return}if(lt.delayedDragEnterLogic||(lt.delayedDragEnterLogic={}),Object.keys(lt.delayedDragEnterLogic).forEach(function(Cr){clearTimeout(lt.delayedDragEnterLogic[Cr])}),Xn.props.eventKey!==He.props.eventKey&&(qe.persist(),lt.delayedDragEnterLogic[vn]=window.setTimeout(function(){if(lt.state.draggingNodeKey!==null){var Cr=(0,je.Z)(Le),ot=(0,Ct.Z)(Ve,He.props.eventKey);ot&&(ot.children||[]).length&&(Cr=(0,At.L0)(Le,He.props.eventKey)),"expandedKeys"in lt.props||lt.setExpandedKeys(Cr),kt==null||kt(Cr,{node:(0,Oe.F)(He.props),expanded:!0,nativeEvent:qe.nativeEvent})}},800)),Xn.props.eventKey===Sr&&vr===0){lt.resetDragState();return}lt.setState({dragOverNodeKey:xi,dropPosition:dr,dropLevelOffset:vr,dropTargetKey:Sr,dropContainerKey:Fr,dropTargetPos:li,dropAllowed:Er}),Qt==null||Qt({event:qe,node:(0,Oe.F)(He.props),expandedKeys:Le})},lt.onNodeDragOver=function(qe,He){var De=lt.state,Le=De.dragChildrenKeys,Ve=De.flattenNodes,dt=De.keyEntities,Ze=De.expandedKeys,Tt=De.indent,_t=lt.props,Qt=_t.onDragOver,kt=_t.allowDrop,Nt=_t.direction,Zt=(0,be.Z)(lt),on=Zt.dragNode;if(on){var vn=(0,At.OM)(qe,on,He,Tt,lt.dragStartMousePosition,kt,Ve,dt,Ze,Nt),kn=vn.dropPosition,Kn=vn.dropLevelOffset,Xn=vn.dropTargetKey,pr=vn.dropContainerKey,dr=vn.dropAllowed,vr=vn.dropTargetPos,Sr=vn.dragOverNodeKey;Le.indexOf(Xn)!==-1||!dr||(on.props.eventKey===Xn&&Kn===0?lt.state.dropPosition===null&&lt.state.dropLevelOffset===null&&lt.state.dropTargetKey===null&&lt.state.dropContainerKey===null&&lt.state.dropTargetPos===null&&lt.state.dropAllowed===!1&&lt.state.dragOverNodeKey===null||lt.resetDragState():kn===lt.state.dropPosition&&Kn===lt.state.dropLevelOffset&&Xn===lt.state.dropTargetKey&&pr===lt.state.dropContainerKey&&vr===lt.state.dropTargetPos&&dr===lt.state.dropAllowed&&Sr===lt.state.dragOverNodeKey||lt.setState({dropPosition:kn,dropLevelOffset:Kn,dropTargetKey:Xn,dropContainerKey:pr,dropTargetPos:vr,dropAllowed:dr,dragOverNodeKey:Sr}),Qt==null||Qt({event:qe,node:(0,Oe.F)(He.props)}))}},lt.onNodeDragLeave=function(qe,He){lt.currentMouseOverDroppableNodeKey===He.props.eventKey&&!qe.currentTarget.contains(qe.relatedTarget)&&(lt.resetDragState(),lt.currentMouseOverDroppableNodeKey=null);var De=lt.props.onDragLeave;De==null||De({event:qe,node:(0,Oe.F)(He.props)})},lt.onWindowDragEnd=function(qe){lt.onNodeDragEnd(qe,null,!0),window.removeEventListener("dragend",lt.onWindowDragEnd)},lt.onNodeDragEnd=function(qe,He){var De=lt.props.onDragEnd;lt.setState({dragOverNodeKey:null}),lt.cleanDragState(),De==null||De({event:qe,node:(0,Oe.F)(He.props)}),lt.dragNode=null,window.removeEventListener("dragend",lt.onWindowDragEnd)},lt.onNodeDrop=function(qe,He){var De,Le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Ve=lt.state,dt=Ve.dragChildrenKeys,Ze=Ve.dropPosition,Tt=Ve.dropTargetKey,_t=Ve.dropTargetPos,Qt=Ve.dropAllowed;if(Qt){var kt=lt.props.onDrop;if(lt.setState({dragOverNodeKey:null}),lt.cleanDragState(),Tt!==null){var Nt=(0,Re.Z)((0,Re.Z)({},(0,Oe.H8)(Tt,lt.getTreeNodeRequiredProps())),{},{active:((De=lt.getActiveItem())===null||De===void 0?void 0:De.key)===Tt,data:(0,Ct.Z)(lt.state.keyEntities,Tt).node}),Zt=dt.indexOf(Tt)!==-1;(0,z.ZP)(!Zt,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var on=(0,At.yx)(_t),vn={event:qe,node:(0,Oe.F)(Nt),dragNode:lt.dragNode?(0,Oe.F)(lt.dragNode.props):null,dragNodesKeys:[lt.dragNode.props.eventKey].concat(dt),dropToGap:Ze!==0,dropPosition:Ze+Number(on[on.length-1])};Le||kt==null||kt(vn),lt.dragNode=null}}},lt.cleanDragState=function(){var qe=lt.state.draggingNodeKey;qe!==null&&lt.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),lt.dragStartMousePosition=null,lt.currentMouseOverDroppableNodeKey=null},lt.triggerExpandActionExpand=function(qe,He){var De=lt.state,Le=De.expandedKeys,Ve=De.flattenNodes,dt=He.expanded,Ze=He.key,Tt=He.isLeaf;if(!(Tt||qe.shiftKey||qe.metaKey||qe.ctrlKey)){var _t=Ve.filter(function(kt){return kt.key===Ze})[0],Qt=(0,Oe.F)((0,Re.Z)((0,Re.Z)({},(0,Oe.H8)(Ze,lt.getTreeNodeRequiredProps())),{},{data:_t.data}));lt.setExpandedKeys(dt?(0,At._5)(Le,Ze):(0,At.L0)(Le,Ze)),lt.onNodeExpand(qe,Qt)}},lt.onNodeClick=function(qe,He){var De=lt.props,Le=De.onClick,Ve=De.expandAction;Ve==="click"&&lt.triggerExpandActionExpand(qe,He),Le==null||Le(qe,He)},lt.onNodeDoubleClick=function(qe,He){var De=lt.props,Le=De.onDoubleClick,Ve=De.expandAction;Ve==="doubleClick"&&lt.triggerExpandActionExpand(qe,He),Le==null||Le(qe,He)},lt.onNodeSelect=function(qe,He){var De=lt.state.selectedKeys,Le=lt.state,Ve=Le.keyEntities,dt=Le.fieldNames,Ze=lt.props,Tt=Ze.onSelect,_t=Ze.multiple,Qt=He.selected,kt=He[dt.key],Nt=!Qt;Nt?_t?De=(0,At.L0)(De,kt):De=[kt]:De=(0,At._5)(De,kt);var Zt=De.map(function(on){var vn=(0,Ct.Z)(Ve,on);return vn?vn.node:null}).filter(function(on){return on});lt.setUncontrolledState({selectedKeys:De}),Tt==null||Tt(De,{event:"select",selected:Nt,node:He,selectedNodes:Zt,nativeEvent:qe.nativeEvent})},lt.onNodeCheck=function(qe,He,De){var Le=lt.state,Ve=Le.keyEntities,dt=Le.checkedKeys,Ze=Le.halfCheckedKeys,Tt=lt.props,_t=Tt.checkStrictly,Qt=Tt.onCheck,kt=He.key,Nt,Zt={event:"check",node:He,checked:De,nativeEvent:qe.nativeEvent};if(_t){var on=De?(0,At.L0)(dt,kt):(0,At._5)(dt,kt),vn=(0,At._5)(Ze,kt);Nt={checked:on,halfChecked:vn},Zt.checkedNodes=on.map(function(vr){return(0,Ct.Z)(Ve,vr)}).filter(function(vr){return vr}).map(function(vr){return vr.node}),lt.setUncontrolledState({checkedKeys:on})}else{var kn=(0,Kt.S)([].concat((0,je.Z)(dt),[kt]),!0,Ve),Kn=kn.checkedKeys,Xn=kn.halfCheckedKeys;if(!De){var pr=new Set(Kn);pr.delete(kt);var dr=(0,Kt.S)(Array.from(pr),{checked:!1,halfCheckedKeys:Xn},Ve);Kn=dr.checkedKeys,Xn=dr.halfCheckedKeys}Nt=Kn,Zt.checkedNodes=[],Zt.checkedNodesPositions=[],Zt.halfCheckedKeys=Xn,Kn.forEach(function(vr){var Sr=(0,Ct.Z)(Ve,vr);if(Sr){var Fr=Sr.node,li=Sr.pos;Zt.checkedNodes.push(Fr),Zt.checkedNodesPositions.push({node:Fr,pos:li})}}),lt.setUncontrolledState({checkedKeys:Kn},!1,{halfCheckedKeys:Xn})}Qt==null||Qt(Nt,Zt)},lt.onNodeLoad=function(qe){var He=qe.key,De=new Promise(function(Le,Ve){lt.setState(function(dt){var Ze=dt.loadedKeys,Tt=Ze===void 0?[]:Ze,_t=dt.loadingKeys,Qt=_t===void 0?[]:_t,kt=lt.props,Nt=kt.loadData,Zt=kt.onLoad;if(!Nt||Tt.indexOf(He)!==-1||Qt.indexOf(He)!==-1)return null;var on=Nt(qe);return on.then(function(){var vn=lt.state.loadedKeys,kn=(0,At.L0)(vn,He);Zt==null||Zt(kn,{event:"load",node:qe}),lt.setUncontrolledState({loadedKeys:kn}),lt.setState(function(Kn){return{loadingKeys:(0,At._5)(Kn.loadingKeys,He)}}),Le()}).catch(function(vn){if(lt.setState(function(Kn){return{loadingKeys:(0,At._5)(Kn.loadingKeys,He)}}),lt.loadingRetryTimes[He]=(lt.loadingRetryTimes[He]||0)+1,lt.loadingRetryTimes[He]>=gt){var kn=lt.state.loadedKeys;(0,z.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),lt.setUncontrolledState({loadedKeys:(0,At.L0)(kn,He)}),Le()}Ve(vn)}),{loadingKeys:(0,At.L0)(Qt,He)}})});return De.catch(function(){}),De},lt.onNodeMouseEnter=function(qe,He){var De=lt.props.onMouseEnter;De==null||De({event:qe,node:He})},lt.onNodeMouseLeave=function(qe,He){var De=lt.props.onMouseLeave;De==null||De({event:qe,node:He})},lt.onNodeContextMenu=function(qe,He){var De=lt.props.onRightClick;De&&(qe.preventDefault(),De({event:qe,node:He}))},lt.onFocus=function(){var qe=lt.props.onFocus;lt.setState({focused:!0});for(var He=arguments.length,De=new Array(He),Le=0;Le<He;Le++)De[Le]=arguments[Le];qe==null||qe.apply(void 0,De)},lt.onBlur=function(){var qe=lt.props.onBlur;lt.setState({focused:!1}),lt.onActiveChange(null);for(var He=arguments.length,De=new Array(He),Le=0;Le<He;Le++)De[Le]=arguments[Le];qe==null||qe.apply(void 0,De)},lt.getTreeNodeRequiredProps=function(){var qe=lt.state,He=qe.expandedKeys,De=qe.selectedKeys,Le=qe.loadedKeys,Ve=qe.loadingKeys,dt=qe.checkedKeys,Ze=qe.halfCheckedKeys,Tt=qe.dragOverNodeKey,_t=qe.dropPosition,Qt=qe.keyEntities;return{expandedKeys:He||[],selectedKeys:De||[],loadedKeys:Le||[],loadingKeys:Ve||[],checkedKeys:dt||[],halfCheckedKeys:Ze||[],dragOverNodeKey:Tt,dropPosition:_t,keyEntities:Qt}},lt.setExpandedKeys=function(qe){var He=lt.state,De=He.treeData,Le=He.fieldNames,Ve=(0,Oe.oH)(De,qe,Le);lt.setUncontrolledState({expandedKeys:qe,flattenNodes:Ve},!0)},lt.onNodeExpand=function(qe,He){var De=lt.state.expandedKeys,Le=lt.state,Ve=Le.listChanging,dt=Le.fieldNames,Ze=lt.props,Tt=Ze.onExpand,_t=Ze.loadData,Qt=He.expanded,kt=He[dt.key];if(!Ve){var Nt=De.indexOf(kt),Zt=!Qt;if((0,z.ZP)(Qt&&Nt!==-1||!Qt&&Nt===-1,"Expand state not sync with index check"),Zt?De=(0,At.L0)(De,kt):De=(0,At._5)(De,kt),lt.setExpandedKeys(De),Tt==null||Tt(De,{node:He,expanded:Zt,nativeEvent:qe.nativeEvent}),Zt&&_t){var on=lt.onNodeLoad(He);on&&on.then(function(){var vn=(0,Oe.oH)(lt.state.treeData,De,dt);lt.setUncontrolledState({flattenNodes:vn})}).catch(function(){var vn=lt.state.expandedKeys,kn=(0,At._5)(vn,kt);lt.setExpandedKeys(kn)})}}},lt.onListChangeStart=function(){lt.setUncontrolledState({listChanging:!0})},lt.onListChangeEnd=function(){setTimeout(function(){lt.setUncontrolledState({listChanging:!1})})},lt.onActiveChange=function(qe){var He=lt.state.activeKey,De=lt.props.onActiveChange;He!==qe&&(lt.setState({activeKey:qe}),qe!==null&&lt.scrollTo({key:qe}),De==null||De(qe))},lt.getActiveItem=function(){var qe=lt.state,He=qe.activeKey,De=qe.flattenNodes;return He===null?null:De.find(function(Le){var Ve=Le.key;return Ve===He})||null},lt.offsetActiveKey=function(qe){var He=lt.state,De=He.flattenNodes,Le=He.activeKey,Ve=De.findIndex(function(Tt){var _t=Tt.key;return _t===Le});Ve===-1&&qe<0&&(Ve=De.length),Ve=(Ve+qe+De.length)%De.length;var dt=De[Ve];if(dt){var Ze=dt.key;lt.onActiveChange(Ze)}else lt.onActiveChange(null)},lt.onKeyDown=function(qe){var He=lt.state,De=He.activeKey,Le=He.expandedKeys,Ve=He.checkedKeys,dt=He.fieldNames,Ze=lt.props,Tt=Ze.onKeyDown,_t=Ze.checkable,Qt=Ze.selectable;switch(qe.which){case xe.Z.UP:{lt.offsetActiveKey(-1),qe.preventDefault();break}case xe.Z.DOWN:{lt.offsetActiveKey(1),qe.preventDefault();break}}var kt=lt.getActiveItem();if(kt&&kt.data){var Nt=lt.getTreeNodeRequiredProps(),Zt=kt.data.isLeaf===!1||!!(kt.data[dt.children]||[]).length,on=(0,Oe.F)((0,Re.Z)((0,Re.Z)({},(0,Oe.H8)(De,Nt)),{},{data:kt.data,active:!0}));switch(qe.which){case xe.Z.LEFT:{Zt&&Le.includes(De)?lt.onNodeExpand({},on):kt.parent&&lt.onActiveChange(kt.parent.key),qe.preventDefault();break}case xe.Z.RIGHT:{Zt&&!Le.includes(De)?lt.onNodeExpand({},on):kt.children&&kt.children.length&&lt.onActiveChange(kt.children[0].key),qe.preventDefault();break}case xe.Z.ENTER:case xe.Z.SPACE:{_t&&!on.disabled&&on.checkable!==!1&&!on.disableCheckbox?lt.onNodeCheck({},on,!Ve.includes(De)):!_t&&Qt&&!on.disabled&&on.selectable!==!1&&lt.onNodeSelect({},on);break}}}Tt==null||Tt(qe)},lt.setUncontrolledState=function(qe){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,De=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!lt.destroyed){var Le=!1,Ve=!0,dt={};Object.keys(qe).forEach(function(Ze){if(Ze in lt.props){Ve=!1;return}Le=!0,dt[Ze]=qe[Ze]}),Le&&(!He||Ve)&&lt.setState((0,Re.Z)((0,Re.Z)({},dt),De))}},lt.scrollTo=function(qe){lt.listRef.current.scrollTo(qe)},lt}return(0,ce.Z)(yt,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var Qe=this.props.activeKey;Qe!==void 0&&Qe!==this.state.activeKey&&(this.setState({activeKey:Qe}),Qe!==null&&this.scrollTo({key:Qe}))}},{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 Qe,We=this.state,Ue=We.focused,qe=We.flattenNodes,He=We.keyEntities,De=We.draggingNodeKey,Le=We.activeKey,Ve=We.dropLevelOffset,dt=We.dropContainerKey,Ze=We.dropTargetKey,Tt=We.dropPosition,_t=We.dragOverNodeKey,Qt=We.indent,kt=this.props,Nt=kt.prefixCls,Zt=kt.className,on=kt.style,vn=kt.showLine,kn=kt.focusable,Kn=kt.tabIndex,Xn=Kn===void 0?0:Kn,pr=kt.selectable,dr=kt.showIcon,vr=kt.icon,Sr=kt.switcherIcon,Fr=kt.draggable,li=kt.checkable,Er=kt.checkStrictly,xi=kt.disabled,Cr=kt.motion,ot=kt.loadData,di=kt.filterTreeNode,Yr=kt.height,Ri=kt.itemHeight,hr=kt.virtual,Ir=kt.titleRender,Rr=kt.dropIndicatorRender,yi=kt.onContextMenu,dn=kt.onScroll,mn=kt.direction,un=kt.rootClassName,Ut=kt.rootStyle,xn=(0,fe.Z)(this.props,{aria:!0,data:!0}),jn;return Fr&&((0,ie.Z)(Fr)==="object"?jn=Fr:typeof Fr=="function"?jn={nodeDraggable:Fr}:jn={}),ee.createElement(ae.k.Provider,{value:{prefixCls:Nt,selectable:pr,showIcon:dr,icon:vr,switcherIcon:Sr,draggable:jn,draggingNodeKey:De,checkable:li,checkStrictly:Er,disabled:xi,keyEntities:He,dropLevelOffset:Ve,dropContainerKey:dt,dropTargetKey:Ze,dropPosition:Tt,dragOverNodeKey:_t,indent:Qt,direction:mn,dropIndicatorRender:Rr,loadData:ot,filterTreeNode:di,titleRender:Ir,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:me()(Nt,Zt,un,(Qe={},(0,St.Z)(Qe,"".concat(Nt,"-show-line"),vn),(0,St.Z)(Qe,"".concat(Nt,"-focused"),Ue),(0,St.Z)(Qe,"".concat(Nt,"-active-focused"),Le!==null),Qe)),style:Ut},ee.createElement(jt,(0,rt.Z)({ref:this.listRef,prefixCls:Nt,style:on,data:qe,disabled:xi,selectable:pr,checkable:!!li,motion:Cr,dragging:De!==null,height:Yr,itemHeight:Ri,virtual:hr,focusable:kn,focused:Ue,tabIndex:Xn,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:yi,onScroll:dn},this.getTreeNodeRequiredProps(),xn))))}}],[{key:"getDerivedStateFromProps",value:function(Qe,We){var Ue=We.prevProps,qe={prevProps:Qe};function He(kn){return!Ue&&kn in Qe||Ue&&Ue[kn]!==Qe[kn]}var De,Le=We.fieldNames;if(He("fieldNames")&&(Le=(0,Oe.w$)(Qe.fieldNames),qe.fieldNames=Le),He("treeData")?De=Qe.treeData:He("children")&&((0,z.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),De=(0,Oe.zn)(Qe.children)),De){qe.treeData=De;var Ve=(0,Oe.I8)(De,{fieldNames:Le});qe.keyEntities=(0,Re.Z)((0,St.Z)({},et,xt),Ve.keyEntities)}var dt=qe.keyEntities||We.keyEntities;if(He("expandedKeys")||Ue&&He("autoExpandParent"))qe.expandedKeys=Qe.autoExpandParent||!Ue&&Qe.defaultExpandParent?(0,At.r7)(Qe.expandedKeys,dt):Qe.expandedKeys;else if(!Ue&&Qe.defaultExpandAll){var Ze=(0,Re.Z)({},dt);delete Ze[et],qe.expandedKeys=Object.keys(Ze).map(function(kn){return Ze[kn].key})}else!Ue&&Qe.defaultExpandedKeys&&(qe.expandedKeys=Qe.autoExpandParent||Qe.defaultExpandParent?(0,At.r7)(Qe.defaultExpandedKeys,dt):Qe.defaultExpandedKeys);if(qe.expandedKeys||delete qe.expandedKeys,De||qe.expandedKeys){var Tt=(0,Oe.oH)(De||We.treeData,qe.expandedKeys||We.expandedKeys,Le);qe.flattenNodes=Tt}if(Qe.selectable&&(He("selectedKeys")?qe.selectedKeys=(0,At.BT)(Qe.selectedKeys,Qe):!Ue&&Qe.defaultSelectedKeys&&(qe.selectedKeys=(0,At.BT)(Qe.defaultSelectedKeys,Qe))),Qe.checkable){var _t;if(He("checkedKeys")?_t=(0,At.E6)(Qe.checkedKeys)||{}:!Ue&&Qe.defaultCheckedKeys?_t=(0,At.E6)(Qe.defaultCheckedKeys)||{}:De&&(_t=(0,At.E6)(Qe.checkedKeys)||{checkedKeys:We.checkedKeys,halfCheckedKeys:We.halfCheckedKeys}),_t){var Qt=_t,kt=Qt.checkedKeys,Nt=kt===void 0?[]:kt,Zt=Qt.halfCheckedKeys,on=Zt===void 0?[]:Zt;if(!Qe.checkStrictly){var vn=(0,Kt.S)(Nt,!0,dt);Nt=vn.checkedKeys,on=vn.halfCheckedKeys}qe.checkedKeys=Nt,qe.halfCheckedKeys=on}}return He("loadedKeys")&&(qe.loadedKeys=Qe.loadedKeys),qe}}]),yt}(ee.Component);tt.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:re,allowDrop:function(){return!0},expandAction:!1},tt.TreeNode=ke.Z;var bt=tt,Ke=bt},35654:function(bn,ln,$e){"use strict";$e.d(ln,{BT:function(){return ee},E6:function(){return le},L0:function(){return ye},OM:function(){return z},_5:function(){return Ce},r7:function(){return ue},wA:function(){return me},yx:function(){return we}});var rt=$e(26390),St=$e(80665),ie=$e(51395),Re=$e(59301),je=$e(39417),ve=$e(67841),ce=$e(71430),be=null;function Ce(pe,Ee){if(!pe)return[];var Pe=pe.slice(),Ie=Pe.indexOf(Ee);return Ie>=0&&Pe.splice(Ie,1),Pe}function ye(pe,Ee){var Pe=(pe||[]).slice();return Pe.indexOf(Ee)===-1&&Pe.push(Ee),Pe}function we(pe){return pe.split("-")}function me(pe,Ee){var Pe=[],Ie=(0,ve.Z)(Ee,pe);function ke(){var Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Ae.forEach(function(Oe){var Fe=Oe.key,_e=Oe.children;Pe.push(Fe),ke(_e)})}return ke(Ie.children),Pe}function xe(pe){if(pe.parent){var Ee=we(pe.pos);return Number(Ee[Ee.length-1])===pe.parent.children.length-1}return!1}function fe(pe){var Ee=we(pe.pos);return Number(Ee[Ee.length-1])===0}function z(pe,Ee,Pe,Ie,ke,Ae,Oe,Fe,_e,Ye){var ze,Xe=pe.clientX,st=pe.clientY,ht=pe.target.getBoundingClientRect(),ft=ht.top,Lt=ht.height,et=(Ye==="rtl"?-1:1)*(((ke==null?void 0:ke.x)||0)-Xe),it=(et-12)/Ie,xt=(0,ve.Z)(Fe,Pe.props.eventKey);if(st<ft+Lt/2){var Et=Oe.findIndex(function(Ke){return Ke.key===xt.key}),Mt=Et<=0?0:Et-1,mt=Oe[Mt].key;xt=(0,ve.Z)(Fe,mt)}var pt=xt.key,vt=xt,jt=xt.key,At=0,Kt=0;if(!_e.includes(pt))for(var Ct=0;Ct<it&&xe(xt);Ct+=1)xt=xt.parent,Kt+=1;var gt=Ee.props.data,tt=xt.node,bt=!0;return fe(xt)&&xt.level===0&&st<ft+Lt/2&&Ae({dragNode:gt,dropNode:tt,dropPosition:-1})&&xt.key===Pe.props.eventKey?At=-1:(vt.children||[]).length&&_e.includes(jt)?Ae({dragNode:gt,dropNode:tt,dropPosition:0})?At=0:bt=!1:Kt===0?it>-1.5?Ae({dragNode:gt,dropNode:tt,dropPosition:1})?At=1:bt=!1:Ae({dragNode:gt,dropNode:tt,dropPosition:0})?At=0:Ae({dragNode:gt,dropNode:tt,dropPosition:1})?At=1:bt=!1:Ae({dragNode:gt,dropNode:tt,dropPosition:1})?At=1:bt=!1,{dropPosition:At,dropLevelOffset:Kt,dropTargetKey:xt.key,dropTargetPos:xt.pos,dragOverNodeKey:jt,dropContainerKey:At===0?null:((ze=xt.parent)===null||ze===void 0?void 0:ze.key)||null,dropAllowed:bt}}function ee(pe,Ee){if(pe){var Pe=Ee.multiple;return Pe?pe.slice():pe.length?[pe[0]]:pe}}var ae=function(Ee){return Ee};function re(pe,Ee){if(!pe)return[];var Pe=Ee||{},Ie=Pe.processProps,ke=Ie===void 0?ae:Ie,Ae=Array.isArray(pe)?pe:[pe];return Ae.map(function(Oe){var Fe=Oe.children,_e=_objectWithoutProperties(Oe,be),Ye=re(Fe,Ee);return React.createElement(TreeNode,_extends({key:_e.key},ke(_e)),Ye)})}function le(pe){if(!pe)return null;var Ee;if(Array.isArray(pe))Ee={checkedKeys:pe,halfCheckedKeys:void 0};else if((0,St.Z)(pe)==="object")Ee={checkedKeys:pe.checked||void 0,halfCheckedKeys:pe.halfChecked||void 0};else return(0,ie.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return Ee}function ue(pe,Ee){var Pe=new Set;function Ie(ke){if(!Pe.has(ke)){var Ae=(0,ve.Z)(Ee,ke);if(Ae){Pe.add(ke);var Oe=Ae.parent,Fe=Ae.node;Fe.disabled||Oe&&Ie(Oe.key)}}}return(pe||[]).forEach(function(ke){Ie(ke)}),(0,rt.Z)(Pe)}},90782:function(bn,ln,$e){"use strict";$e.d(ln,{S:function(){return ce}});var rt=$e(51395),St=$e(67841);function ie(be,Ce){var ye=new Set;return be.forEach(function(we){Ce.has(we)||ye.add(we)}),ye}function Re(be){var Ce=be||{},ye=Ce.disabled,we=Ce.disableCheckbox,me=Ce.checkable;return!!(ye||we)||me===!1}function je(be,Ce,ye,we){for(var me=new Set(be),xe=new Set,fe=0;fe<=ye;fe+=1){var z=Ce.get(fe)||new Set;z.forEach(function(le){var ue=le.key,pe=le.node,Ee=le.children,Pe=Ee===void 0?[]:Ee;me.has(ue)&&!we(pe)&&Pe.filter(function(Ie){return!we(Ie.node)}).forEach(function(Ie){me.add(Ie.key)})})}for(var ee=new Set,ae=ye;ae>=0;ae-=1){var re=Ce.get(ae)||new Set;re.forEach(function(le){var ue=le.parent,pe=le.node;if(!(we(pe)||!le.parent||ee.has(le.parent.key))){if(we(le.parent.node)){ee.add(ue.key);return}var Ee=!0,Pe=!1;(ue.children||[]).filter(function(Ie){return!we(Ie.node)}).forEach(function(Ie){var ke=Ie.key,Ae=me.has(ke);Ee&&!Ae&&(Ee=!1),!Pe&&(Ae||xe.has(ke))&&(Pe=!0)}),Ee&&me.add(ue.key),Pe&&xe.add(ue.key),ee.add(ue.key)}})}return{checkedKeys:Array.from(me),halfCheckedKeys:Array.from(ie(xe,me))}}function ve(be,Ce,ye,we,me){for(var xe=new Set(be),fe=new Set(Ce),z=0;z<=we;z+=1){var ee=ye.get(z)||new Set;ee.forEach(function(ue){var pe=ue.key,Ee=ue.node,Pe=ue.children,Ie=Pe===void 0?[]:Pe;!xe.has(pe)&&!fe.has(pe)&&!me(Ee)&&Ie.filter(function(ke){return!me(ke.node)}).forEach(function(ke){xe.delete(ke.key)})})}fe=new Set;for(var ae=new Set,re=we;re>=0;re-=1){var le=ye.get(re)||new Set;le.forEach(function(ue){var pe=ue.parent,Ee=ue.node;if(!(me(Ee)||!ue.parent||ae.has(ue.parent.key))){if(me(ue.parent.node)){ae.add(pe.key);return}var Pe=!0,Ie=!1;(pe.children||[]).filter(function(ke){return!me(ke.node)}).forEach(function(ke){var Ae=ke.key,Oe=xe.has(Ae);Pe&&!Oe&&(Pe=!1),!Ie&&(Oe||fe.has(Ae))&&(Ie=!0)}),Pe||xe.delete(pe.key),Ie&&fe.add(pe.key),ae.add(pe.key)}})}return{checkedKeys:Array.from(xe),halfCheckedKeys:Array.from(ie(fe,xe))}}function ce(be,Ce,ye,we){var me=[],xe;we?xe=we:xe=Re;var fe=new Set(be.filter(function(re){var le=!!(0,St.Z)(ye,re);return le||me.push(re),le})),z=new Map,ee=0;Object.keys(ye).forEach(function(re){var le=ye[re],ue=le.level,pe=z.get(ue);pe||(pe=new Set,z.set(ue,pe)),pe.add(le),ee=Math.max(ee,ue)}),(0,rt.ZP)(!me.length,"Tree missing follow keys: ".concat(me.slice(0,100).map(function(re){return"'".concat(re,"'")}).join(", ")));var ae;return Ce===!0?ae=je(fe,z,ee,xe):ae=ve(fe,Ce.halfCheckedKeys,z,ee,xe),ae}},67841:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return rt}});function rt(St,ie){return St[ie]}},71430:function(bn,ln,$e){"use strict";$e.d(ln,{F:function(){return ue},H8:function(){return le},I8:function(){return re},km:function(){return me},oH:function(){return ee},w$:function(){return xe},zn:function(){return z}});var rt=$e(80665),St=$e(26390),ie=$e(57259),Re=$e(19149),je=$e(38298),ve=$e(64002),ce=$e(51395),be=$e(67841),Ce=["children"];function ye(pe,Ee){return"".concat(pe,"-").concat(Ee)}function we(pe){return pe&&pe.type&&pe.type.isTreeNode}function me(pe,Ee){return pe!=null?pe:Ee}function xe(pe){var Ee=pe||{},Pe=Ee.title,Ie=Ee._title,ke=Ee.key,Ae=Ee.children,Oe=Pe||"title";return{title:Oe,_title:Ie||[Oe],key:ke||"key",children:Ae||"children"}}function fe(pe,Ee){var Pe=new Map;function Ie(ke){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(ke||[]).forEach(function(Oe){var Fe=Oe[Ee.key],_e=Oe[Ee.children];warning(Fe!=null,"Tree node must have a certain key: [".concat(Ae).concat(Fe,"]"));var Ye=String(Fe);warning(!Pe.has(Ye)||Fe===null||Fe===void 0,"Same 'key' exist in the Tree: ".concat(Ye)),Pe.set(Ye,!0),Ie(_e,"".concat(Ae).concat(Ye," > "))})}Ie(pe)}function z(pe){function Ee(Pe){var Ie=(0,je.Z)(Pe);return Ie.map(function(ke){if(!we(ke))return(0,ce.ZP)(!ke,"Tree/TreeNode can only accept TreeNode as children."),null;var Ae=ke.key,Oe=ke.props,Fe=Oe.children,_e=(0,Re.Z)(Oe,Ce),Ye=(0,ie.Z)({key:Ae},_e),ze=Ee(Fe);return ze.length&&(Ye.children=ze),Ye}).filter(function(ke){return ke})}return Ee(pe)}function ee(pe,Ee,Pe){var Ie=xe(Pe),ke=Ie._title,Ae=Ie.key,Oe=Ie.children,Fe=new Set(Ee===!0?[]:Ee),_e=[];function Ye(ze){var Xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return ze.map(function(st,ht){for(var ft=ye(Xe?Xe.pos:"0",ht),Lt=me(st[Ae],ft),et,it=0;it<ke.length;it+=1){var xt=ke[it];if(st[xt]!==void 0){et=st[xt];break}}var Et=(0,ie.Z)((0,ie.Z)({},(0,ve.Z)(st,[].concat((0,St.Z)(ke),[Ae,Oe]))),{},{title:et,key:Lt,parent:Xe,pos:ft,children:null,data:st,isStart:[].concat((0,St.Z)(Xe?Xe.isStart:[]),[ht===0]),isEnd:[].concat((0,St.Z)(Xe?Xe.isEnd:[]),[ht===ze.length-1])});return _e.push(Et),Ee===!0||Fe.has(Lt)?Et.children=Ye(st[Oe]||[],Et):Et.children=[],Et})}return Ye(pe),_e}function ae(pe,Ee,Pe){var Ie={};(0,rt.Z)(Pe)==="object"?Ie=Pe:Ie={externalGetKey:Pe},Ie=Ie||{};var ke=Ie,Ae=ke.childrenPropName,Oe=ke.externalGetKey,Fe=ke.fieldNames,_e=xe(Fe),Ye=_e.key,ze=_e.children,Xe=Ae||ze,st;Oe?typeof Oe=="string"?st=function(Lt){return Lt[Oe]}:typeof Oe=="function"&&(st=function(Lt){return Oe(Lt)}):st=function(Lt,et){return me(Lt[Ye],et)};function ht(ft,Lt,et,it){var xt=ft?ft[Xe]:pe,Et=ft?ye(et.pos,Lt):"0",Mt=ft?[].concat((0,St.Z)(it),[ft]):[];if(ft){var mt=st(ft,Et),pt={node:ft,index:Lt,pos:Et,key:mt,parentPos:et.node?et.pos:null,level:et.level+1,nodes:Mt};Ee(pt)}xt&&xt.forEach(function(vt,jt){ht(vt,jt,{node:ft,pos:Et,level:et?et.level+1:-1},Mt)})}ht(null)}function re(pe){var Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Pe=Ee.initWrapper,Ie=Ee.processEntity,ke=Ee.onProcessFinished,Ae=Ee.externalGetKey,Oe=Ee.childrenPropName,Fe=Ee.fieldNames,_e=arguments.length>2?arguments[2]:void 0,Ye=Ae||_e,ze={},Xe={},st={posEntities:ze,keyEntities:Xe};return Pe&&(st=Pe(st)||st),ae(pe,function(ht){var ft=ht.node,Lt=ht.index,et=ht.pos,it=ht.key,xt=ht.parentPos,Et=ht.level,Mt=ht.nodes,mt={node:ft,nodes:Mt,index:Lt,key:it,pos:et,level:Et},pt=me(it,et);ze[et]=mt,Xe[pt]=mt,mt.parent=ze[xt],mt.parent&&(mt.parent.children=mt.parent.children||[],mt.parent.children.push(mt)),Ie&&Ie(mt,st)},{externalGetKey:Ye,childrenPropName:Oe,fieldNames:Fe}),ke&&ke(st),st}function le(pe,Ee){var Pe=Ee.expandedKeys,Ie=Ee.selectedKeys,ke=Ee.loadedKeys,Ae=Ee.loadingKeys,Oe=Ee.checkedKeys,Fe=Ee.halfCheckedKeys,_e=Ee.dragOverNodeKey,Ye=Ee.dropPosition,ze=Ee.keyEntities,Xe=(0,be.Z)(ze,pe),st={eventKey:pe,expanded:Pe.indexOf(pe)!==-1,selected:Ie.indexOf(pe)!==-1,loaded:ke.indexOf(pe)!==-1,loading:Ae.indexOf(pe)!==-1,checked:Oe.indexOf(pe)!==-1,halfChecked:Fe.indexOf(pe)!==-1,pos:String(Xe?Xe.pos:""),dragOver:_e===pe&&Ye===0,dragOverGapTop:_e===pe&&Ye===-1,dragOverGapBottom:_e===pe&&Ye===1};return st}function ue(pe){var Ee=pe.data,Pe=pe.expanded,Ie=pe.selected,ke=pe.checked,Ae=pe.loaded,Oe=pe.loading,Fe=pe.halfChecked,_e=pe.dragOver,Ye=pe.dragOverGapTop,ze=pe.dragOverGapBottom,Xe=pe.pos,st=pe.active,ht=pe.eventKey,ft=(0,ie.Z)((0,ie.Z)({},Ee),{},{expanded:Pe,selected:Ie,checked:ke,loaded:Ae,loading:Oe,halfChecked:Fe,dragOver:_e,dragOverGapTop:Ye,dragOverGapBottom:ze,pos:Xe,active:st,key:ht});return"props"in ft||Object.defineProperty(ft,"props",{get:function(){return(0,ce.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),pe}}),ft}},8178:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return St}});var rt=$e(4676);function St(ie,Re,je,ve){var ce=rt.unstable_batchedUpdates?function(Ce){rt.unstable_batchedUpdates(je,Ce)}:je;return ie!=null&&ie.addEventListener&&ie.addEventListener(Re,ce,ve),{remove:function(){ie!=null&&ie.removeEventListener&&ie.removeEventListener(Re,ce,ve)}}}},21783:function(bn,ln,$e){"use strict";$e.d(ln,{g1:function(){return we},os:function(){return xe}});var rt=/margin|padding|width|height|max|min|offset/,St={left:!0,top:!0},ie={cssFloat:1,styleFloat:1,float:1};function Re(fe){return fe.nodeType===1?fe.ownerDocument.defaultView.getComputedStyle(fe,null):{}}function je(fe,z,ee){if(z=z.toLowerCase(),ee==="auto"){if(z==="height")return fe.offsetHeight;if(z==="width")return fe.offsetWidth}return z in St||(St[z]=rt.test(z)),St[z]?parseFloat(ee)||0:ee}function ve(fe,z){var ee=arguments.length,ae=Re(fe);return z=ie[z]?"cssFloat"in fe.style?"cssFloat":"styleFloat":z,ee===1?ae:je(fe,z,ae[z]||fe.style[z])}function ce(fe,z,ee){var ae=arguments.length;if(z=ie[z]?"cssFloat"in fe.style?"cssFloat":"styleFloat":z,ae===3)return typeof ee=="number"&&rt.test(z)&&(ee="".concat(ee,"px")),fe.style[z]=ee,ee;for(var re in z)z.hasOwnProperty(re)&&ce(fe,re,z[re]);return Re(fe)}function be(fe){return fe===document.body?document.documentElement.clientWidth:fe.offsetWidth}function Ce(fe){return fe===document.body?window.innerHeight||document.documentElement.clientHeight:fe.offsetHeight}function ye(){var fe=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),z=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:fe,height:z}}function we(){var fe=document.documentElement.clientWidth,z=window.innerHeight||document.documentElement.clientHeight;return{width:fe,height:z}}function me(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function xe(fe){var z=fe.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)}}},24387:function(bn,ln,$e){"use strict";$e.d(ln,{G:function(){return Re}});var rt=$e(87746),St=function(ve){if((0,rt.Z)()&&window.document.documentElement){var ce=Array.isArray(ve)?ve:[ve],be=window.document.documentElement;return ce.some(function(Ce){return Ce in be.style})}return!1},ie=function(ve,ce){if(!St(ve))return!1;var be=document.createElement("div"),Ce=be.style[ve];return be.style[ve]=ce,be.style[ve]!==Ce};function Re(je,ve){return!Array.isArray(je)&&ve!==void 0?ie(je,ve):St(je)}},21881:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return bt}});var rt=$e(5891),St=$e(80665),ie=$e(57259),Re=$e(80962),je=$e(29043),ve=$e(19149),ce=$e(92310),be=$e.n(ce),Ce=$e(29301),ye=$e(80764),we=$e(28800),me=$e(59301),xe=$e(4676),fe=me.forwardRef(function(Ke,ut){var wt=Ke.height,yt=Ke.offsetY,lt=Ke.offsetX,Qe=Ke.children,We=Ke.prefixCls,Ue=Ke.onInnerResize,qe=Ke.innerProps,He=Ke.rtl,De=Ke.extra,Le={},Ve={display:"flex",flexDirection:"column"};return yt!==void 0&&(Le={height:wt,position:"relative",overflow:"hidden"},Ve=(0,ie.Z)((0,ie.Z)({},Ve),{},(0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)({transform:"translateY(".concat(yt,"px)")},He?"marginRight":"marginLeft",-lt),"position","absolute"),"left",0),"right",0),"top",0))),me.createElement("div",{style:Le},me.createElement(Ce.Z,{onResize:function(Ze){var Tt=Ze.offsetHeight;Tt&&Ue&&Ue()}},me.createElement("div",(0,rt.Z)({style:Ve,className:be()((0,Re.Z)({},"".concat(We,"-holder-inner"),We)),ref:ut},qe),Qe,De)))});fe.displayName="Filler";var z=fe;function ee(Ke){var ut=Ke.children,wt=Ke.setRef,yt=me.useCallback(function(lt){wt(lt)},[]);return me.cloneElement(ut,{ref:yt})}function ae(Ke,ut,wt,yt,lt,Qe,We,Ue){var qe=Ue.getKey;return Ke.slice(ut,wt+1).map(function(He,De){var Le=ut+De,Ve=We(He,Le,{style:{width:yt},offsetX:lt}),dt=qe(He);return me.createElement(ee,{key:dt,setRef:function(Tt){return Qe(He,Tt)}},Ve)})}function re(Ke,ut,wt,yt){var lt=wt-Ke,Qe=ut-wt,We=Math.min(lt,Qe)*2;if(yt<=We){var Ue=Math.floor(yt/2);return yt%2?wt+Ue+1:wt-Ue}return lt>Qe?wt-(yt-Qe):wt+(yt-lt)}function le(Ke,ut,wt){var yt=Ke.length,lt=ut.length,Qe,We;if(yt===0&&lt===0)return null;yt<lt?(Qe=Ke,We=ut):(Qe=ut,We=Ke);var Ue={__EMPTY_ITEM__:!0};function qe(Ze){return Ze!==void 0?wt(Ze):Ue}for(var He=null,De=Math.abs(yt-lt)!==1,Le=0;Le<We.length;Le+=1){var Ve=qe(Qe[Le]),dt=qe(We[Le]);if(Ve!==dt){He=Le,De=De||Ve!==qe(We[Le+1]);break}}return He===null?null:{index:He,multiple:De}}function ue(Ke,ut,wt){var yt=me.useState(Ke),lt=(0,je.Z)(yt,2),Qe=lt[0],We=lt[1],Ue=me.useState(null),qe=(0,je.Z)(Ue,2),He=qe[0],De=qe[1];return me.useEffect(function(){var Le=le(Qe||[],Ke||[],ut);(Le==null?void 0:Le.index)!==void 0&&(wt==null||wt(Le.index),De(Ke[Le.index])),We(Ke)},[Ke]),[He]}var pe=$e(23073),Ee=(typeof navigator=="undefined"?"undefined":(0,St.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Pe=Ee,Ie=function(Ke,ut,wt,yt){var lt=(0,me.useRef)(!1),Qe=(0,me.useRef)(null);function We(){clearTimeout(Qe.current),lt.current=!0,Qe.current=setTimeout(function(){lt.current=!1},50)}var Ue=(0,me.useRef)({top:Ke,bottom:ut,left:wt,right:yt});return Ue.current.top=Ke,Ue.current.bottom=ut,Ue.current.left=wt,Ue.current.right=yt,function(qe,He){var De=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Le=qe?He<0&&Ue.current.left||He>0&&Ue.current.right:He<0&&Ue.current.top||He>0&&Ue.current.bottom;return De&&Le?(clearTimeout(Qe.current),lt.current=!1):(!Le||lt.current)&&We(),!lt.current&&Le}};function ke(Ke,ut,wt,yt,lt,Qe,We){var Ue=(0,me.useRef)(0),qe=(0,me.useRef)(null),He=(0,me.useRef)(null),De=(0,me.useRef)(!1),Le=Ie(ut,wt,yt,lt);function Ve(kt,Nt){if(pe.Z.cancel(qe.current),!Le(!1,Nt)){var Zt=kt;if(!Zt._virtualHandled)Zt._virtualHandled=!0;else return;Ue.current+=Nt,He.current=Nt,Pe||Zt.preventDefault(),qe.current=(0,pe.Z)(function(){var on=De.current?10:1;We(Ue.current*on,!1),Ue.current=0})}}function dt(kt,Nt){We(Nt,!0),Pe||kt.preventDefault()}var Ze=(0,me.useRef)(null),Tt=(0,me.useRef)(null);function _t(kt){if(Ke){pe.Z.cancel(Tt.current),Tt.current=(0,pe.Z)(function(){Ze.current=null},2);var Nt=kt.deltaX,Zt=kt.deltaY,on=kt.shiftKey,vn=Nt,kn=Zt;(Ze.current==="sx"||!Ze.current&&on&&Zt&&!Nt)&&(vn=Zt,kn=0,Ze.current="sx");var Kn=Math.abs(vn),Xn=Math.abs(kn);Ze.current===null&&(Ze.current=Qe&&Kn>Xn?"x":"y"),Ze.current==="y"?Ve(kt,kn):dt(kt,vn)}}function Qt(kt){Ke&&(De.current=kt.detail===He.current)}return[_t,Qt]}function Ae(Ke,ut,wt,yt){var lt=me.useMemo(function(){return[new Map,[]]},[Ke,wt.id,yt]),Qe=(0,je.Z)(lt,2),We=Qe[0],Ue=Qe[1],qe=function(De){var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:De,Ve=We.get(De),dt=We.get(Le);if(Ve===void 0||dt===void 0)for(var Ze=Ke.length,Tt=Ue.length;Tt<Ze;Tt+=1){var _t,Qt=Ke[Tt],kt=ut(Qt);We.set(kt,Tt);var Nt=(_t=wt.get(kt))!==null&&_t!==void 0?_t:yt;if(Ue[Tt]=(Ue[Tt-1]||0)+Nt,kt===De&&(Ve=Tt),kt===Le&&(dt=Tt),Ve!==void 0&&dt!==void 0)break}return{top:Ue[Ve-1]||0,bottom:Ue[dt]}};return qe}var Oe=$e(85899),Fe=$e(79545),_e=$e(68550),Ye=function(){function Ke(){(0,Fe.Z)(this,Ke),(0,Re.Z)(this,"maps",void 0),(0,Re.Z)(this,"id",0),(0,Re.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,_e.Z)(Ke,[{key:"set",value:function(wt,yt){this.maps[wt]=yt,this.id+=1,this.diffKeys.add(wt)}},{key:"get",value:function(wt){return this.maps[wt]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),Ke}(),ze=Ye;function Xe(Ke){var ut=parseFloat(Ke);return isNaN(ut)?0:ut}function st(Ke,ut,wt){var yt=me.useState(0),lt=(0,je.Z)(yt,2),Qe=lt[0],We=lt[1],Ue=(0,me.useRef)(new Map),qe=(0,me.useRef)(new ze),He=(0,me.useRef)(0);function De(){He.current+=1}function Le(){var dt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;De();var Ze=function(){var Qt=!1;Ue.current.forEach(function(kt,Nt){if(kt&&kt.offsetParent){var Zt=(0,Oe.ZP)(kt),on=Zt.offsetHeight,vn=getComputedStyle(Zt),kn=vn.marginTop,Kn=vn.marginBottom,Xn=Xe(kn),pr=Xe(Kn),dr=on+Xn+pr;qe.current.get(Nt)!==dr&&(qe.current.set(Nt,dr),Qt=!0)}}),Qt&&We(function(kt){return kt+1})};if(dt)Ze();else{He.current+=1;var Tt=He.current;Promise.resolve().then(function(){Tt===He.current&&Ze()})}}function Ve(dt,Ze){var Tt=Ke(dt),_t=Ue.current.get(Tt);Ze?(Ue.current.set(Tt,Ze),Le()):Ue.current.delete(Tt),!_t!=!Ze&&(Ze?ut==null||ut(dt):wt==null||wt(dt))}return(0,me.useEffect)(function(){return De},[]),[Ve,Le,qe.current,Qe]}var ht=14/15;function ft(Ke,ut,wt){var yt=(0,me.useRef)(!1),lt=(0,me.useRef)(0),Qe=(0,me.useRef)(0),We=(0,me.useRef)(null),Ue=(0,me.useRef)(null),qe,He=function(dt){if(yt.current){var Ze=Math.ceil(dt.touches[0].pageX),Tt=Math.ceil(dt.touches[0].pageY),_t=lt.current-Ze,Qt=Qe.current-Tt,kt=Math.abs(_t)>Math.abs(Qt);kt?lt.current=Ze:Qe.current=Tt;var Nt=wt(kt,kt?_t:Qt,!1,dt);Nt&&dt.preventDefault(),clearInterval(Ue.current),Nt&&(Ue.current=setInterval(function(){kt?_t*=ht:Qt*=ht;var Zt=Math.floor(kt?_t:Qt);(!wt(kt,Zt,!0)||Math.abs(Zt)<=.1)&&clearInterval(Ue.current)},16))}},De=function(){yt.current=!1,qe()},Le=function(dt){qe(),dt.touches.length===1&&!yt.current&&(yt.current=!0,lt.current=Math.ceil(dt.touches[0].pageX),Qe.current=Math.ceil(dt.touches[0].pageY),We.current=dt.target,We.current.addEventListener("touchmove",He,{passive:!1}),We.current.addEventListener("touchend",De,{passive:!0}))};qe=function(){We.current&&(We.current.removeEventListener("touchmove",He),We.current.removeEventListener("touchend",De))},(0,we.Z)(function(){return Ke&&ut.current.addEventListener("touchstart",Le,{passive:!0}),function(){var Ve;(Ve=ut.current)===null||Ve===void 0||Ve.removeEventListener("touchstart",Le),qe(),clearInterval(Ue.current)}},[Ke])}function Lt(Ke){return Math.floor(Math.pow(Ke,.5))}function et(Ke,ut){var wt="touches"in Ke?Ke.touches[0]:Ke;return wt[ut?"pageX":"pageY"]-window[ut?"scrollX":"scrollY"]}function it(Ke,ut,wt){me.useEffect(function(){var yt=ut.current;if(Ke&&yt){var lt=!1,Qe,We,Ue=function(){pe.Z.cancel(Qe)},qe=function Ve(){Ue(),Qe=(0,pe.Z)(function(){wt(We),Ve()})},He=function(dt){var Ze=dt;Ze._virtualHandled||(Ze._virtualHandled=!0,lt=!0)},De=function(){lt=!1,Ue()},Le=function(dt){if(lt){var Ze=et(dt,!1),Tt=yt.getBoundingClientRect(),_t=Tt.top,Qt=Tt.bottom;if(Ze<=_t){var kt=_t-Ze;We=-Lt(kt),qe()}else if(Ze>=Qt){var Nt=Ze-Qt;We=Lt(Nt),qe()}else Ue()}};return yt.addEventListener("mousedown",He),yt.ownerDocument.addEventListener("mouseup",De),yt.ownerDocument.addEventListener("mousemove",Le),function(){yt.removeEventListener("mousedown",He),yt.ownerDocument.removeEventListener("mouseup",De),yt.ownerDocument.removeEventListener("mousemove",Le),Ue()}}},[Ke])}var xt=10;function Et(Ke,ut,wt,yt,lt,Qe,We,Ue){var qe=me.useRef(),He=me.useState(null),De=(0,je.Z)(He,2),Le=De[0],Ve=De[1];return(0,we.Z)(function(){if(Le&&Le.times<xt){if(!Ke.current){Ve(function(ot){return(0,ie.Z)({},ot)});return}Qe();var dt=Le.targetAlign,Ze=Le.originAlign,Tt=Le.index,_t=Le.offset,Qt=Ke.current.clientHeight,kt=!1,Nt=dt,Zt=null;if(Qt){for(var on=dt||Ze,vn=0,kn=0,Kn=0,Xn=Math.min(ut.length-1,Tt),pr=0;pr<=Xn;pr+=1){var dr=lt(ut[pr]);kn=vn;var vr=wt.get(dr);Kn=kn+(vr===void 0?yt:vr),vn=Kn}for(var Sr=on==="top"?_t:Qt-_t,Fr=Xn;Fr>=0;Fr-=1){var li=lt(ut[Fr]),Er=wt.get(li);if(Er===void 0){kt=!0;break}if(Sr-=Er,Sr<=0)break}switch(on){case"top":Zt=kn-_t;break;case"bottom":Zt=Kn-Qt+_t;break;default:{var xi=Ke.current.scrollTop,Cr=xi+Qt;kn<xi?Nt="top":Kn>Cr&&(Nt="bottom")}}Zt!==null&&We(Zt),Zt!==Le.lastTop&&(kt=!0)}kt&&Ve((0,ie.Z)((0,ie.Z)({},Le),{},{times:Le.times+1,targetAlign:Nt,lastTop:Zt}))}},[Le,Ke.current]),function(dt){if(dt==null){Ue();return}if(pe.Z.cancel(qe.current),typeof dt=="number")We(dt);else if(dt&&(0,St.Z)(dt)==="object"){var Ze,Tt=dt.align;"index"in dt?Ze=dt.index:Ze=ut.findIndex(function(kt){return lt(kt)===dt.key});var _t=dt.offset,Qt=_t===void 0?0:_t;Ve({times:0,index:Ze,offset:Qt,originAlign:Tt})}}}var Mt=me.forwardRef(function(Ke,ut){var wt=Ke.prefixCls,yt=Ke.rtl,lt=Ke.scrollOffset,Qe=Ke.scrollRange,We=Ke.onStartMove,Ue=Ke.onStopMove,qe=Ke.onScroll,He=Ke.horizontal,De=Ke.spinSize,Le=Ke.containerSize,Ve=Ke.style,dt=Ke.thumbStyle,Ze=me.useState(!1),Tt=(0,je.Z)(Ze,2),_t=Tt[0],Qt=Tt[1],kt=me.useState(null),Nt=(0,je.Z)(kt,2),Zt=Nt[0],on=Nt[1],vn=me.useState(null),kn=(0,je.Z)(vn,2),Kn=kn[0],Xn=kn[1],pr=!yt,dr=me.useRef(),vr=me.useRef(),Sr=me.useState(!1),Fr=(0,je.Z)(Sr,2),li=Fr[0],Er=Fr[1],xi=me.useRef(),Cr=function(){clearTimeout(xi.current),Er(!0),xi.current=setTimeout(function(){Er(!1)},3e3)},ot=Qe-Le||0,di=Le-De||0,Yr=me.useMemo(function(){if(lt===0||ot===0)return 0;var Ut=lt/ot;return Ut*di},[lt,ot,di]),Ri=function(xn){xn.stopPropagation(),xn.preventDefault()},hr=me.useRef({top:Yr,dragging:_t,pageY:Zt,startTop:Kn});hr.current={top:Yr,dragging:_t,pageY:Zt,startTop:Kn};var Ir=function(xn){Qt(!0),on(et(xn,He)),Xn(hr.current.top),We(),xn.stopPropagation(),xn.preventDefault()};me.useEffect(function(){var Ut=function(Gt){Gt.preventDefault()},xn=dr.current,jn=vr.current;return xn.addEventListener("touchstart",Ut,{passive:!1}),jn.addEventListener("touchstart",Ir,{passive:!1}),function(){xn.removeEventListener("touchstart",Ut),jn.removeEventListener("touchstart",Ir)}},[]);var Rr=me.useRef();Rr.current=ot;var yi=me.useRef();yi.current=di,me.useEffect(function(){if(_t){var Ut,xn=function(Gt){var Cn=hr.current,Gn=Cn.dragging,ir=Cn.pageY,Pn=Cn.startTop;pe.Z.cancel(Ut);var Yt=dr.current.getBoundingClientRect(),zn=Le/(He?Yt.width:Yt.height);if(Gn){var Qn=(et(Gt,He)-ir)*zn,or=Pn;!pr&&He?or-=Qn:or+=Qn;var rn=Rr.current,Mn=yi.current,an=Mn?or/Mn:0,gn=Math.ceil(an*rn);gn=Math.max(gn,0),gn=Math.min(gn,rn),Ut=(0,pe.Z)(function(){qe(gn,He)})}},jn=function(){Qt(!1),Ue()};return window.addEventListener("mousemove",xn,{passive:!0}),window.addEventListener("touchmove",xn,{passive:!0}),window.addEventListener("mouseup",jn,{passive:!0}),window.addEventListener("touchend",jn,{passive:!0}),function(){window.removeEventListener("mousemove",xn),window.removeEventListener("touchmove",xn),window.removeEventListener("mouseup",jn),window.removeEventListener("touchend",jn),pe.Z.cancel(Ut)}}},[_t]),me.useEffect(function(){return Cr(),function(){clearTimeout(xi.current)}},[lt]),me.useImperativeHandle(ut,function(){return{delayHidden:Cr}});var dn="".concat(wt,"-scrollbar"),mn={position:"absolute",visibility:li?null:"hidden"},un={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return He?(mn.height=8,mn.left=0,mn.right=0,mn.bottom=0,un.height="100%",un.width=De,pr?un.left=Yr:un.right=Yr):(mn.width=8,mn.top=0,mn.bottom=0,pr?mn.right=0:mn.left=0,un.width="100%",un.height=De,un.top=Yr),me.createElement("div",{ref:dr,className:be()(dn,(0,Re.Z)((0,Re.Z)((0,Re.Z)({},"".concat(dn,"-horizontal"),He),"".concat(dn,"-vertical"),!He),"".concat(dn,"-visible"),li)),style:(0,ie.Z)((0,ie.Z)({},mn),Ve),onMouseDown:Ri,onMouseMove:Cr},me.createElement("div",{ref:vr,className:be()("".concat(dn,"-thumb"),(0,Re.Z)({},"".concat(dn,"-thumb-moving"),_t)),style:(0,ie.Z)((0,ie.Z)({},un),dt),onMouseDown:Ir}))}),mt=Mt,pt=20;function vt(){var Ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,wt=Ke/ut*Ke;return isNaN(wt)&&(wt=0),wt=Math.max(wt,pt),Math.floor(wt)}var jt=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],At=[],Kt={overflowY:"auto",overflowAnchor:"none"};function Ct(Ke,ut){var wt=Ke.prefixCls,yt=wt===void 0?"rc-virtual-list":wt,lt=Ke.className,Qe=Ke.height,We=Ke.itemHeight,Ue=Ke.fullHeight,qe=Ue===void 0?!0:Ue,He=Ke.style,De=Ke.data,Le=Ke.children,Ve=Ke.itemKey,dt=Ke.virtual,Ze=Ke.direction,Tt=Ke.scrollWidth,_t=Ke.component,Qt=_t===void 0?"div":_t,kt=Ke.onScroll,Nt=Ke.onVirtualScroll,Zt=Ke.onVisibleChange,on=Ke.innerProps,vn=Ke.extraRender,kn=Ke.styles,Kn=(0,ve.Z)(Ke,jt),Xn=me.useCallback(function(Ur){return typeof Ve=="function"?Ve(Ur):Ur==null?void 0:Ur[Ve]},[Ve]),pr=st(Xn,null,null),dr=(0,je.Z)(pr,4),vr=dr[0],Sr=dr[1],Fr=dr[2],li=dr[3],Er=!!(dt!==!1&&Qe&&We),xi=me.useMemo(function(){return Object.values(Fr.maps).reduce(function(Ur,jr){return Ur+jr},0)},[Fr.id,Fr.maps]),Cr=Er&&De&&(Math.max(We*De.length,xi)>Qe||!!Tt),ot=Ze==="rtl",di=be()(yt,(0,Re.Z)({},"".concat(yt,"-rtl"),ot),lt),Yr=De||At,Ri=(0,me.useRef)(),hr=(0,me.useRef)(),Ir=(0,me.useRef)(),Rr=(0,me.useState)(0),yi=(0,je.Z)(Rr,2),dn=yi[0],mn=yi[1],un=(0,me.useState)(0),Ut=(0,je.Z)(un,2),xn=Ut[0],jn=Ut[1],en=(0,me.useState)(!1),Gt=(0,je.Z)(en,2),Cn=Gt[0],Gn=Gt[1],ir=function(){Gn(!0)},Pn=function(){Gn(!1)},Yt={getKey:Xn};function zn(Ur){mn(function(jr){var wi;typeof Ur=="function"?wi=Ur(jr):wi=Ur;var Vi=Qr(wi);return Ri.current.scrollTop=Vi,Vi})}var Qn=(0,me.useRef)({start:0,end:Yr.length}),or=(0,me.useRef)(),rn=ue(Yr,Xn),Mn=(0,je.Z)(rn,1),an=Mn[0];or.current=an;var gn=me.useMemo(function(){if(!Er)return{scrollHeight:void 0,start:0,end:Yr.length-1,offset:void 0};if(!Cr){var Ur;return{scrollHeight:((Ur=hr.current)===null||Ur===void 0?void 0:Ur.offsetHeight)||0,start:0,end:Yr.length-1,offset:void 0}}for(var jr=0,wi,Vi,bi,vo=Yr.length,Ar=0;Ar<vo;Ar+=1){var Dr=Yr[Ar],zr=Xn(Dr),Zn=Fr.get(zr),to=jr+(Zn===void 0?We:Zn);to>=dn&&wi===void 0&&(wi=Ar,Vi=jr),to>dn+Qe&&bi===void 0&&(bi=Ar),jr=to}return wi===void 0&&(wi=0,Vi=0,bi=Math.ceil(Qe/We)),bi===void 0&&(bi=Yr.length-1),bi=Math.min(bi+1,Yr.length-1),{scrollHeight:jr,start:wi,end:bi,offset:Vi}},[Cr,Er,dn,Yr,li,Qe]),En=gn.scrollHeight,pn=gn.start,On=gn.end,Dn=gn.offset;Qn.current.start=pn,Qn.current.end=On,me.useLayoutEffect(function(){var Ur=Fr.getRecord();if(Ur.size===1){var jr=Array.from(Ur)[0],wi=Xn(Yr[pn]);if(wi===jr){var Vi=Fr.get(jr),bi=Vi-We;zn(function(vo){return vo+bi})}}Fr.resetRecord()},[En]);var $n=me.useState({width:0,height:Qe}),Fn=(0,je.Z)($n,2),Tn=Fn[0],Yn=Fn[1],Lr=function(jr){Yn({width:jr.offsetWidth,height:jr.offsetHeight})},qr=(0,me.useRef)(),Br=(0,me.useRef)(),tn=me.useMemo(function(){return vt(Tn.width,Tt)},[Tn.width,Tt]),lr=me.useMemo(function(){return vt(Tn.height,En)},[Tn.height,En]),br=En-Qe,ar=(0,me.useRef)(br);ar.current=br;function Qr(Ur){var jr=Ur;return Number.isNaN(ar.current)||(jr=Math.min(jr,ar.current)),jr=Math.max(jr,0),jr}var Xr=dn<=0,hi=dn>=br,Gr=xn<=0,Tr=xn>=Tt,Si=Ie(Xr,hi,Gr,Tr),Ln=function(){return{x:ot?-xn:xn,y:dn}},Ki=(0,me.useRef)(Ln()),Nn=(0,ye.useEvent)(function(Ur){if(Nt){var jr=(0,ie.Z)((0,ie.Z)({},Ln()),Ur);(Ki.current.x!==jr.x||Ki.current.y!==jr.y)&&(Nt(jr),Ki.current=jr)}});function gi(Ur,jr){var wi=Ur;jr?((0,xe.flushSync)(function(){jn(wi)}),Nn()):zn(wi)}function xo(Ur){var jr=Ur.currentTarget.scrollTop;jr!==dn&&zn(jr),kt==null||kt(Ur),Nn()}var Mi=function(jr){var wi=jr,Vi=Tt?Tt-Tn.width:0;return wi=Math.max(wi,0),wi=Math.min(wi,Vi),wi},Go=(0,ye.useEvent)(function(Ur,jr){jr?((0,xe.flushSync)(function(){jn(function(wi){var Vi=wi+(ot?-Ur:Ur);return Mi(Vi)})}),Nn()):zn(function(wi){var Vi=wi+Ur;return Vi})}),po=ke(Er,Xr,hi,Gr,Tr,!!Tt,Go),Wr=(0,je.Z)(po,2),Hr=Wr[0],Li=Wr[1];ft(Er,Ri,function(Ur,jr,wi,Vi){var bi=Vi;return Si(Ur,jr,wi)?!1:!bi||!bi._virtualHandled?(bi&&(bi._virtualHandled=!0),Hr({preventDefault:function(){},deltaX:Ur?jr:0,deltaY:Ur?0:jr}),!0):!1}),it(Cr,Ri,function(Ur){zn(function(jr){return jr+Ur})}),(0,we.Z)(function(){function Ur(wi){var Vi=Xr&&wi.detail<0,bi=hi&&wi.detail>0;Er&&!Vi&&!bi&&wi.preventDefault()}var jr=Ri.current;return jr.addEventListener("wheel",Hr,{passive:!1}),jr.addEventListener("DOMMouseScroll",Li,{passive:!0}),jr.addEventListener("MozMousePixelScroll",Ur,{passive:!1}),function(){jr.removeEventListener("wheel",Hr),jr.removeEventListener("DOMMouseScroll",Li),jr.removeEventListener("MozMousePixelScroll",Ur)}},[Er,Xr,hi]),(0,we.Z)(function(){if(Tt){var Ur=Mi(xn);jn(Ur),Nn({x:Ur})}},[Tn.width,Tt]);var _i=function(){var jr,wi;(jr=qr.current)===null||jr===void 0||jr.delayHidden(),(wi=Br.current)===null||wi===void 0||wi.delayHidden()},ur=Et(Ri,Yr,Fr,We,Xn,function(){return Sr(!0)},zn,_i);me.useImperativeHandle(ut,function(){return{nativeElement:Ir.current,getScrollInfo:Ln,scrollTo:function(jr){function wi(Vi){return Vi&&(0,St.Z)(Vi)==="object"&&("left"in Vi||"top"in Vi)}wi(jr)?(jr.left!==void 0&&jn(Mi(jr.left)),ur(jr.top)):ur(jr)}}}),(0,we.Z)(function(){if(Zt){var Ur=Yr.slice(pn,On+1);Zt(Ur,Yr)}},[pn,On,Yr]);var It=Ae(Yr,Xn,Fr,We),Ei=vn==null?void 0:vn({start:pn,end:On,virtual:Cr,offsetX:xn,offsetY:Dn,rtl:ot,getSize:It}),Kr=ae(Yr,pn,On,Tt,xn,vr,Le,Yt),Nr=null;Qe&&(Nr=(0,ie.Z)((0,Re.Z)({},qe?"height":"maxHeight",Qe),Kt),Er&&(Nr.overflowY="hidden",Tt&&(Nr.overflowX="hidden"),Cn&&(Nr.pointerEvents="none")));var Wi={};return ot&&(Wi.dir="rtl"),me.createElement("div",(0,rt.Z)({ref:Ir,style:(0,ie.Z)((0,ie.Z)({},He),{},{position:"relative"}),className:di},Wi,Kn),me.createElement(Ce.Z,{onResize:Lr},me.createElement(Qt,{className:"".concat(yt,"-holder"),style:Nr,ref:Ri,onScroll:xo,onMouseEnter:_i},me.createElement(z,{prefixCls:yt,height:En,offsetX:xn,offsetY:Dn,scrollWidth:Tt,onInnerResize:Sr,ref:hr,innerProps:on,rtl:ot,extra:Ei},Kr))),Cr&&En>Qe&&me.createElement(mt,{ref:qr,prefixCls:yt,scrollOffset:dn,scrollRange:En,rtl:ot,onScroll:gi,onStartMove:ir,onStopMove:Pn,spinSize:lr,containerSize:Tn.height,style:kn==null?void 0:kn.verticalScrollBar,thumbStyle:kn==null?void 0:kn.verticalScrollBarThumb}),Cr&&Tt>Tn.width&&me.createElement(mt,{ref:Br,prefixCls:yt,scrollOffset:xn,scrollRange:Tt,rtl:ot,onScroll:gi,onStartMove:ir,onStopMove:Pn,spinSize:tn,containerSize:Tn.width,horizontal:!0,style:kn==null?void 0:kn.horizontalScrollBar,thumbStyle:kn==null?void 0:kn.horizontalScrollBarThumb}))}var gt=me.forwardRef(Ct);gt.displayName="List";var tt=gt,bt=tt},7062:function(bn,ln,$e){var rt=$e(19637),St=$e(97573),ie=[$e(96627)];bn.exports=rt.createStore(St,ie)},96627:function(bn,ln,$e){bn.exports=rt;function rt(){return $e(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(bn){return bn<10?"0"+bn:bn}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(bn){return rx_escapable.lastIndex=0,rx_escapable.test(bn)?'"'+bn.replace(rx_escapable,function(ln){var $e=meta[ln];return typeof $e=="string"?$e:"\\u"+("0000"+ln.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+bn+'"'}function str(bn,ln){var $e,rt,St,ie,Re=gap,je,ve=ln[bn];switch(ve&&typeof ve=="object"&&typeof ve.toJSON=="function"&&(ve=ve.toJSON(bn)),typeof rep=="function"&&(ve=rep.call(ln,bn,ve)),typeof ve){case"string":return quote(ve);case"number":return isFinite(ve)?String(ve):"null";case"boolean":case"null":return String(ve);case"object":if(!ve)return"null";if(gap+=indent,je=[],Object.prototype.toString.apply(ve)==="[object Array]"){for(ie=ve.length,$e=0;$e<ie;$e+=1)je[$e]=str($e,ve)||"null";return St=je.length===0?"[]":gap?`[
`+gap+je.join(`,
`+gap)+`
`+Re+"]":"["+je.join(",")+"]",gap=Re,St}if(rep&&typeof rep=="object")for(ie=rep.length,$e=0;$e<ie;$e+=1)typeof rep[$e]=="string"&&(rt=rep[$e],St=str(rt,ve),St&&je.push(quote(rt)+(gap?": ":":")+St));else for(rt in ve)Object.prototype.hasOwnProperty.call(ve,rt)&&(St=str(rt,ve),St&&je.push(quote(rt)+(gap?": ":":")+St));return St=je.length===0?"{}":gap?`{
`+gap+je.join(`,
`+gap)+`
`+Re+"}":"{"+je.join(",")+"}",gap=Re,St}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(bn,ln,$e){var rt;if(gap="",indent="",typeof $e=="number")for(rt=0;rt<$e;rt+=1)indent+=" ";else typeof $e=="string"&&(indent=$e);if(rep=ln,ln&&typeof ln!="function"&&(typeof ln!="object"||typeof ln.length!="number"))throw new Error("JSON.stringify");return str("",{"":bn})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(bn,ln){var $e,rt,St=bn[ln];if(St&&typeof St=="object")for($e in St)Object.prototype.hasOwnProperty.call(St,$e)&&(rt=walk(St,$e),rt!==void 0?St[$e]=rt:delete St[$e]);return reviver.call(bn,ln,St)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(bn){return"\\u"+("0000"+bn.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(bn,ln,$e){var rt=$e(67039),St=rt.slice,ie=rt.pluck,Re=rt.each,je=rt.bind,ve=rt.create,ce=rt.isList,be=rt.isFunction,Ce=rt.isObject;bn.exports={createStore:me};var ye={version:"2.0.12",enabled:!1,get:function(xe,fe){var z=this.storage.read(this._namespacePrefix+xe);return this._deserialize(z,fe)},set:function(xe,fe){return fe===void 0?this.remove(xe):(this.storage.write(this._namespacePrefix+xe,this._serialize(fe)),fe)},remove:function(xe){this.storage.remove(this._namespacePrefix+xe)},each:function(xe){var fe=this;this.storage.each(function(z,ee){xe.call(fe,fe._deserialize(z),(ee||"").replace(fe._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(xe){return this._namespacePrefix=="__storejs_"+xe+"_"},createStore:function(){return me.apply(this,arguments)},addPlugin:function(xe){this._addPlugin(xe)},namespace:function(xe){return me(this.storage,this.plugins,xe)}};function we(){var xe=typeof console=="undefined"?null:console;if(xe){var fe=xe.warn?xe.warn:xe.log;fe.apply(xe,arguments)}}function me(xe,fe,z){z||(z=""),xe&&!ce(xe)&&(xe=[xe]),fe&&!ce(fe)&&(fe=[fe]);var ee=z?"__storejs_"+z+"_":"",ae=z?new RegExp("^"+ee):null,re=/^[a-zA-Z0-9_\-]*$/;if(!re.test(z))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var le={_namespacePrefix:ee,_namespaceRegexp:ae,_testStorage:function(pe){try{var Ee="__storejs__test__";pe.write(Ee,Ee);var Pe=pe.read(Ee)===Ee;return pe.remove(Ee),Pe}catch(Ie){return!1}},_assignPluginFnProp:function(pe,Ee){var Pe=this[Ee];this[Ee]=function(){var ke=St(arguments,0),Ae=this;function Oe(){if(Pe)return Re(arguments,function(_e,Ye){ke[Ye]=_e}),Pe.apply(Ae,ke)}var Fe=[Oe].concat(ke);return pe.apply(Ae,Fe)}},_serialize:function(pe){return JSON.stringify(pe)},_deserialize:function(pe,Ee){if(!pe)return Ee;var Pe="";try{Pe=JSON.parse(pe)}catch(Ie){Pe=pe}return Pe!==void 0?Pe:Ee},_addStorage:function(pe){this.enabled||this._testStorage(pe)&&(this.storage=pe,this.enabled=!0)},_addPlugin:function(pe){var Ee=this;if(ce(pe)){Re(pe,function(ke){Ee._addPlugin(ke)});return}var Pe=ie(this.plugins,function(ke){return pe===ke});if(!Pe){if(this.plugins.push(pe),!be(pe))throw new Error("Plugins must be function values that return objects");var Ie=pe.call(this);if(!Ce(Ie))throw new Error("Plugins must return an object of function properties");Re(Ie,function(ke,Ae){if(!be(ke))throw new Error("Bad plugin property: "+Ae+" from plugin "+pe.name+". Plugins should only return functions.");Ee._assignPluginFnProp(ke,Ae)})}},addStorage:function(pe){we("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(pe)}},ue=ve(le,ye,{plugins:[]});return ue.raw={},Re(ue,function(pe,Ee){be(pe)&&(ue.raw[Ee]=je(ue,pe))}),Re(xe,function(pe){ue._addStorage(pe)}),Re(fe,function(pe){ue._addPlugin(pe)}),ue}},67039:function(bn,ln,$e){var rt=je(),St=ve(),ie=ce(),Re=typeof window!="undefined"?window:$e.g;bn.exports={assign:rt,create:St,trim:ie,bind:be,slice:Ce,each:ye,map:we,pluck:me,isList:xe,isFunction:fe,isObject:z,Global:Re};function je(){return Object.assign?Object.assign:function(ae,re,le,ue){for(var pe=1;pe<arguments.length;pe++)ye(Object(arguments[pe]),function(Ee,Pe){ae[Pe]=Ee});return ae}}function ve(){if(Object.create)return function(re,le,ue,pe){var Ee=Ce(arguments,1);return rt.apply(this,[Object.create(re)].concat(Ee))};{let ae=function(){};var ee=ae;return function(le,ue,pe,Ee){var Pe=Ce(arguments,1);return ae.prototype=le,rt.apply(this,[new ae].concat(Pe))}}}function ce(){return String.prototype.trim?function(ae){return String.prototype.trim.call(ae)}:function(ae){return ae.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function be(ee,ae){return function(){return ae.apply(ee,Array.prototype.slice.call(arguments,0))}}function Ce(ee,ae){return Array.prototype.slice.call(ee,ae||0)}function ye(ee,ae){me(ee,function(re,le){return ae(re,le),!1})}function we(ee,ae){var re=xe(ee)?[]:{};return me(ee,function(le,ue){return re[ue]=ae(le,ue),!1}),re}function me(ee,ae){if(xe(ee)){for(var re=0;re<ee.length;re++)if(ae(ee[re],re))return ee[re]}else for(var le in ee)if(ee.hasOwnProperty(le)&&ae(ee[le],le))return ee[le]}function xe(ee){return ee!=null&&typeof ee!="function"&&typeof ee.length=="number"}function fe(ee){return ee&&{}.toString.call(ee)==="[object Function]"}function z(ee){return ee&&{}.toString.call(ee)==="[object Object]"}},97573:function(bn,ln,$e){bn.exports=[$e(52496),$e(16436),$e(76673),$e(35701),$e(65578),$e(65300)]},35701:function(bn,ln,$e){var rt=$e(67039),St=rt.Global,ie=rt.trim;bn.exports={name:"cookieStorage",read:je,write:ce,each:ve,remove:be,clearAll:Ce};var Re=St.document;function je(we){if(!we||!ye(we))return null;var me="(?:^|.*;\\s*)"+escape(we).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(Re.cookie.replace(new RegExp(me),"$1"))}function ve(we){for(var me=Re.cookie.split(/; ?/g),xe=me.length-1;xe>=0;xe--)if(ie(me[xe])){var fe=me[xe].split("="),z=unescape(fe[0]),ee=unescape(fe[1]);we(ee,z)}}function ce(we,me){we&&(Re.cookie=escape(we)+"="+escape(me)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")}function be(we){!we||!ye(we)||(Re.cookie=escape(we)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function Ce(){ve(function(we,me){be(me)})}function ye(we){return new RegExp("(?:^|;\\s*)"+escape(we).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(Re.cookie)}},52496:function(bn,ln,$e){var rt=$e(67039),St=rt.Global;bn.exports={name:"localStorage",read:Re,write:je,each:ve,remove:ce,clearAll:be};function ie(){return St.localStorage}function Re(Ce){return ie().getItem(Ce)}function je(Ce,ye){return ie().setItem(Ce,ye)}function ve(Ce){for(var ye=ie().length-1;ye>=0;ye--){var we=ie().key(ye);Ce(Re(we),we)}}function ce(Ce){return ie().removeItem(Ce)}function be(){return ie().clear()}},65300:function(bn){bn.exports={name:"memoryStorage",read:$e,write:rt,each:St,remove:ie,clearAll:Re};var ln={};function $e(je){return ln[je]}function rt(je,ve){ln[je]=ve}function St(je){for(var ve in ln)ln.hasOwnProperty(ve)&&je(ln[ve],ve)}function ie(je){delete ln[je]}function Re(je){ln={}}},16436:function(bn,ln,$e){var rt=$e(67039),St=rt.Global;bn.exports={name:"oldFF-globalStorage",read:Re,write:je,each:ve,remove:ce,clearAll:be};var ie=St.globalStorage;function Re(Ce){return ie[Ce]}function je(Ce,ye){ie[Ce]=ye}function ve(Ce){for(var ye=ie.length-1;ye>=0;ye--){var we=ie.key(ye);Ce(ie[we],we)}}function ce(Ce){return ie.removeItem(Ce)}function be(){ve(function(Ce,ye){delete ie[Ce]})}},76673:function(bn,ln,$e){var rt=$e(67039),St=rt.Global;bn.exports={name:"oldIE-userDataStorage",write:ce,read:be,each:Ce,remove:ye,clearAll:we};var ie="storejs",Re=St.document,je=fe(),ve=(St.navigator?St.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function ce(z,ee){if(!ve){var ae=xe(z);je(function(re){re.setAttribute(ae,ee),re.save(ie)})}}function be(z){if(!ve){var ee=xe(z),ae=null;return je(function(re){ae=re.getAttribute(ee)}),ae}}function Ce(z){je(function(ee){for(var ae=ee.XMLDocument.documentElement.attributes,re=ae.length-1;re>=0;re--){var le=ae[re];z(ee.getAttribute(le.name),le.name)}})}function ye(z){var ee=xe(z);je(function(ae){ae.removeAttribute(ee),ae.save(ie)})}function we(){je(function(z){var ee=z.XMLDocument.documentElement.attributes;z.load(ie);for(var ae=ee.length-1;ae>=0;ae--)z.removeAttribute(ee[ae].name);z.save(ie)})}var me=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function xe(z){return z.replace(/^\d/,"___$&").replace(me,"___")}function fe(){if(!Re||!Re.documentElement||!Re.documentElement.addBehavior)return null;var z="script",ee,ae,re;try{ae=new ActiveXObject("htmlfile"),ae.open(),ae.write("<"+z+">document.w=window</"+z+'><iframe src="/favicon.ico"></iframe>'),ae.close(),ee=ae.w.frames[0].document,re=ee.createElement("div")}catch(le){re=Re.createElement("div"),ee=Re.body}return function(le){var ue=[].slice.call(arguments,0);ue.unshift(re),ee.appendChild(re),re.addBehavior("#default#userData"),re.load(ie),le.apply(this,ue),ee.removeChild(re)}}},65578:function(bn,ln,$e){var rt=$e(67039),St=rt.Global;bn.exports={name:"sessionStorage",read:Re,write:je,each:ve,remove:ce,clearAll:be};function ie(){return St.sessionStorage}function Re(Ce){return ie().getItem(Ce)}function je(Ce,ye){return ie().setItem(Ce,ye)}function ve(Ce){for(var ye=ie().length-1;ye>=0;ye--){var we=ie().key(ye);Ce(Re(we),we)}}function ce(Ce){return ie().removeItem(Ce)}function be(){return ie().clear()}},93314:function(bn){"use strict";bn.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=="},16722:function(bn,ln,$e){"use strict";$e.d(ln,{Z:function(){return be}});const rt=Ce=>typeof Ce=="object"&&Ce!=null&&Ce.nodeType===1,St=(Ce,ye)=>(!ye||Ce!=="hidden")&&Ce!=="visible"&&Ce!=="clip",ie=(Ce,ye)=>{if(Ce.clientHeight<Ce.scrollHeight||Ce.clientWidth<Ce.scrollWidth){const we=getComputedStyle(Ce,null);return St(we.overflowY,ye)||St(we.overflowX,ye)||(me=>{const xe=(fe=>{if(!fe.ownerDocument||!fe.ownerDocument.defaultView)return null;try{return fe.ownerDocument.defaultView.frameElement}catch(z){return null}})(me);return!!xe&&(xe.clientHeight<me.scrollHeight||xe.clientWidth<me.scrollWidth)})(Ce)}return!1},Re=(Ce,ye,we,me,xe,fe,z,ee)=>fe<Ce&&z>ye||fe>Ce&&z<ye?0:fe<=Ce&&ee<=we||z>=ye&&ee>=we?fe-Ce-me:z>ye&&ee<we||fe<Ce&&ee>we?z-ye+xe:0,je=Ce=>{const ye=Ce.parentElement;return ye==null?Ce.getRootNode().host||null:ye},ve=(Ce,ye)=>{var we,me,xe,fe;if(typeof document=="undefined")return[];const{scrollMode:z,block:ee,inline:ae,boundary:re,skipOverflowHiddenElements:le}=ye,ue=typeof re=="function"?re:Mt=>Mt!==re;if(!rt(Ce))throw new TypeError("Invalid target");const pe=document.scrollingElement||document.documentElement,Ee=[];let Pe=Ce;for(;rt(Pe)&&ue(Pe);){if(Pe=je(Pe),Pe===pe){Ee.push(Pe);break}Pe!=null&&Pe===document.body&&ie(Pe)&&!ie(document.documentElement)||Pe!=null&&ie(Pe,le)&&Ee.push(Pe)}const Ie=(me=(we=window.visualViewport)==null?void 0:we.width)!=null?me:innerWidth,ke=(fe=(xe=window.visualViewport)==null?void 0:xe.height)!=null?fe:innerHeight,{scrollX:Ae,scrollY:Oe}=window,{height:Fe,width:_e,top:Ye,right:ze,bottom:Xe,left:st}=Ce.getBoundingClientRect(),{top:ht,right:ft,bottom:Lt,left:et}=(Mt=>{const mt=window.getComputedStyle(Mt);return{top:parseFloat(mt.scrollMarginTop)||0,right:parseFloat(mt.scrollMarginRight)||0,bottom:parseFloat(mt.scrollMarginBottom)||0,left:parseFloat(mt.scrollMarginLeft)||0}})(Ce);let it=ee==="start"||ee==="nearest"?Ye-ht:ee==="end"?Xe+Lt:Ye+Fe/2-ht+Lt,xt=ae==="center"?st+_e/2-et+ft:ae==="end"?ze+ft:st-et;const Et=[];for(let Mt=0;Mt<Ee.length;Mt++){const mt=Ee[Mt],{height:pt,width:vt,top:jt,right:At,bottom:Kt,left:Ct}=mt.getBoundingClientRect();if(z==="if-needed"&&Ye>=0&&st>=0&&Xe<=ke&&ze<=Ie&&(mt===pe&&!ie(mt)||Ye>=jt&&Xe<=Kt&&st>=Ct&&ze<=At))return Et;const gt=getComputedStyle(mt),tt=parseInt(gt.borderLeftWidth,10),bt=parseInt(gt.borderTopWidth,10),Ke=parseInt(gt.borderRightWidth,10),ut=parseInt(gt.borderBottomWidth,10);let wt=0,yt=0;const lt="offsetWidth"in mt?mt.offsetWidth-mt.clientWidth-tt-Ke:0,Qe="offsetHeight"in mt?mt.offsetHeight-mt.clientHeight-bt-ut:0,We="offsetWidth"in mt?mt.offsetWidth===0?0:vt/mt.offsetWidth:0,Ue="offsetHeight"in mt?mt.offsetHeight===0?0:pt/mt.offsetHeight:0;if(pe===mt)wt=ee==="start"?it:ee==="end"?it-ke:ee==="nearest"?Re(Oe,Oe+ke,ke,bt,ut,Oe+it,Oe+it+Fe,Fe):it-ke/2,yt=ae==="start"?xt:ae==="center"?xt-Ie/2:ae==="end"?xt-Ie:Re(Ae,Ae+Ie,Ie,tt,Ke,Ae+xt,Ae+xt+_e,_e),wt=Math.max(0,wt+Oe),yt=Math.max(0,yt+Ae);else{wt=ee==="start"?it-jt-bt:ee==="end"?it-Kt+ut+Qe:ee==="nearest"?Re(jt,Kt,pt,bt,ut+Qe,it,it+Fe,Fe):it-(jt+pt/2)+Qe/2,yt=ae==="start"?xt-Ct-tt:ae==="center"?xt-(Ct+vt/2)+lt/2:ae==="end"?xt-At+Ke+lt:Re(Ct,At,vt,tt,Ke+lt,xt,xt+_e,_e);const{scrollLeft:qe,scrollTop:He}=mt;wt=Ue===0?0:Math.max(0,Math.min(He+wt/Ue,mt.scrollHeight-pt/Ue+Qe)),yt=We===0?0:Math.max(0,Math.min(qe+yt/We,mt.scrollWidth-vt/We+lt)),it+=He-wt,xt+=qe-yt}Et.push({el:mt,top:wt,left:yt})}return Et},ce=Ce=>Ce===!1?{block:"end",inline:"nearest"}:(ye=>ye===Object(ye)&&Object.keys(ye).length!==0)(Ce)?Ce:{block:"start",inline:"nearest"};function be(Ce,ye){if(!Ce.isConnected||!(xe=>{let fe=xe;for(;fe&&fe.parentNode;){if(fe.parentNode===document)return!0;fe=fe.parentNode instanceof ShadowRoot?fe.parentNode.host:fe.parentNode}return!1})(Ce))return;const we=(xe=>{const fe=window.getComputedStyle(xe);return{top:parseFloat(fe.scrollMarginTop)||0,right:parseFloat(fe.scrollMarginRight)||0,bottom:parseFloat(fe.scrollMarginBottom)||0,left:parseFloat(fe.scrollMarginLeft)||0}})(Ce);if((xe=>typeof xe=="object"&&typeof xe.behavior=="function")(ye))return ye.behavior(ve(Ce,ye));const me=typeof ye=="boolean"||ye==null?void 0:ye.behavior;for(const{el:xe,top:fe,left:z}of ve(Ce,ce(ye))){const ee=fe-we.top+we.bottom,ae=z-we.left+we.right;xe.scroll({top:ee,left:ae,behavior:me})}}}}]);