|
|
(self.webpackChunk=self.webpackChunk||[]).push([[6913],{89489:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return be}});var it=$e(72308),xt=$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"},_e=ie,je=$e(7657),ve=function(ye,we){return xt.createElement(je.Z,(0,it.Z)({},ye,{ref:we,icon:_e}))},ce=xt.forwardRef(ve),be=ce},59477:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return be}});var it=$e(72308),xt=$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"},_e=ie,je=$e(7657),ve=function(ye,we){return xt.createElement(je.Z,(0,it.Z)({},ye,{ref:we,icon:_e}))},ce=xt.forwardRef(ve),be=ce},40001:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return be}});var it=$e(72308),xt=$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"},_e=ie,je=$e(7657),ve=function(ye,we){return xt.createElement(je.Z,(0,it.Z)({},ye,{ref:we,icon:_e}))},ce=xt.forwardRef(ve),be=ce},65363:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return be}});var it=$e(72308),xt=$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"},_e=ie,je=$e(7657),ve=function(ye,we){return xt.createElement(je.Z,(0,it.Z)({},ye,{ref:we,icon:_e}))},ce=xt.forwardRef(ve),be=ce},26227:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return be}});var it=$e(72308),xt=$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"},_e=ie,je=$e(7657),ve=function(ye,we){return xt.createElement(je.Z,(0,it.Z)({},ye,{ref:we,icon:_e}))},ce=xt.forwardRef(ve),be=ce},49198:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return be}});var it=$e(72308),xt=$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"},_e=ie,je=$e(7657),ve=function(ye,we){return xt.createElement(je.Z,(0,it.Z)({},ye,{ref:we,icon:_e}))},ce=xt.forwardRef(ve),be=ce},41464:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return be}});var it=$e(72308),xt=$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"},_e=ie,je=$e(7657),ve=function(ye,we){return xt.createElement(je.Z,(0,it.Z)({},ye,{ref:we,icon:_e}))},ce=xt.forwardRef(ve),be=ce},73331:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return be}});var it=$e(72308),xt=$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"},_e=ie,je=$e(7657),ve=function(ye,we){return xt.createElement(je.Z,(0,it.Z)({},ye,{ref:we,icon:_e}))},ce=xt.forwardRef(ve),be=ce},15277:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return be}});var it=$e(72308),xt=$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"},_e=ie,je=$e(7657),ve=function(ye,we){return xt.createElement(je.Z,(0,it.Z)({},ye,{ref:we,icon:_e}))},ce=xt.forwardRef(ve),be=ce},52671:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return be}});var it=$e(72308),xt=$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"},_e=ie,je=$e(7657),ve=function(ye,we){return xt.createElement(je.Z,(0,it.Z)({},ye,{ref:we,icon:_e}))},ce=xt.forwardRef(ve),be=ce},8657:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return be}});var it=$e(72308),xt=$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"},_e=ie,je=$e(7657),ve=function(ye,we){return xt.createElement(je.Z,(0,it.Z)({},ye,{ref:we,icon:_e}))},ce=xt.forwardRef(ve),be=ce},56082:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return be}});var it=$e(72308),xt=$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"},_e=ie,je=$e(7657),ve=function(ye,we){return xt.createElement(je.Z,(0,it.Z)({},ye,{ref:we,icon:_e}))},ce=xt.forwardRef(ve),be=ce},33853:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return be}});var it=$e(72308),xt=$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"},_e=ie,je=$e(7657),ve=function(ye,we){return xt.createElement(je.Z,(0,it.Z)({},ye,{ref:we,icon:_e}))},ce=xt.forwardRef(ve),be=ce},15075:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return be}});var it=$e(72308),xt=$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"},_e=ie,je=$e(7657),ve=function(ye,we){return xt.createElement(je.Z,(0,it.Z)({},ye,{ref:we,icon:_e}))},ce=xt.forwardRef(ve),be=ce},43531:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return be}});var it=$e(72308),xt=$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"},_e=ie,je=$e(7657),ve=function(ye,we){return xt.createElement(je.Z,(0,it.Z)({},ye,{ref:we,icon:_e}))},ce=xt.forwardRef(ve),be=ce},76618:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return be}});var it=$e(72308),xt=$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"},_e=ie,je=$e(7657),ve=function(ye,we){return xt.createElement(je.Z,(0,it.Z)({},ye,{ref:we,icon:_e}))},ce=xt.forwardRef(ve),be=ce},61485:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return be}});var it=$e(72308),xt=$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"},_e=ie,je=$e(7657),ve=function(ye,we){return xt.createElement(je.Z,(0,it.Z)({},ye,{ref:we,icon:_e}))},ce=xt.forwardRef(ve),be=ce},38819:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return be}});var it=$e(72308),xt=$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"},_e=ie,je=$e(7657),ve=function(ye,we){return xt.createElement(je.Z,(0,it.Z)({},ye,{ref:we,icon:_e}))},ce=xt.forwardRef(ve),be=ce},47472:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return be}});var it=$e(72308),xt=$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"},_e=ie,je=$e(7657),ve=function(ye,we){return xt.createElement(je.Z,(0,it.Z)({},ye,{ref:we,icon:_e}))},ce=xt.forwardRef(ve),be=ce},37036:function(){"use strict"},88010:function(Pn,an){"use strict";an.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},38476:function(){"use strict"},74413:function(){"use strict";function Pn(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(Pn.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(Pn.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(Pn.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(Pn.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 Pn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+ee);if(ee.defaultValue<ee.minimum||ee.defaultValue>ee.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+ee.defaultValue);var ae=go.Shape._FigureParameters[fe];ae||(ae=[],go.Shape._FigureParameters[fe]=ae),ae[z]=ee};var an=[];function $e(fe,z){var ee=an.pop();return ee===void 0?new go.Point(fe,z):(ee.x=fe,ee.y=z,ee)}function it(){var fe=an.pop();return fe===void 0?new go.Point:fe}function xt(fe){an.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,Ne=NaN;if(Pe===0)if(Ie===0)fe===ee&&(ke=fe,Ne=z);else{var Oe=(le-pe)/Ie,Fe=le-Oe*re;ke=fe,Ne=Oe*ke+Fe}else if(Ie===0){var Re=(z-ae)/Pe,Ye=z-Re*fe;ke=re,Ne=Re*ke+Ye}else{var Re=(z-ae)/Pe,Oe=(le-pe)/Ie,Ye=z-Re*fe,Fe=le-Oe*re;ke=(Fe-Ye)/(Re-Oe),Ne=Re*ke+Ye}return Ee.x=ke,Ee.y=Ne,Ee}function _e(fe,z,ee,ae,re,le,ue,pe,Ee,Pe,Ie,ke,Ne,Oe){var Fe=1-Ee,Re=Ee,Ye=fe*Fe+ee*Re,ze=z*Fe+ae*Re,Ze=ee*Fe+re*Re,at=ae*Fe+le*Re,ht=re*Fe+ue*Re,pt=le*Fe+pe*Re,Mt=Ye*Fe+Ze*Re,et=ze*Fe+at*Re,ot=Ze*Fe+ht*Re,wt=at*Fe+pt*Re,Et=Mt*Fe+ot*Re,Tt=et*Fe+wt*Re;Pe.x=Ye,Pe.y=ze,Ie.x=Mt,Ie.y=et,ke.x=Et,ke.y=Tt,Ne.x=ot,Ne.y=wt,Oe.x=ht,Oe.y=pt}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 Pn("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 Pn("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 Pn("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 Pn("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 Pn("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 Pn("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 Pn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new Pn("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 Pn("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 Pn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new Pn("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 Pn("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 Pn("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 Pn("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 Pn("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 Pn("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 Pn("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=it(),Ie=it(),ke=it(),Ne=it();_e(ue,pe-le,ue+re,pe-le,ue+le,pe-re,ue+le,pe,.42,Pe,Ie,ke,Ne,Ne);var Oe=it(),Fe=it(),Re=it();_e(ue,pe-le,ue+re,pe-le,ue+le,pe-re,ue+le,pe,.58,Ne,Ne,Re,Oe,Fe);var Ye=it(),ze=it(),Ze=it();_e(ue,pe+le,ue-re,pe+le,ue-le,pe+re,ue-le,pe,.42,Ye,ze,Ze,Ne,Ne);var at=it(),ht=it(),pt=it();return _e(ue,pe+le,ue-re,pe+le,ue-le,pe+re,ue-le,pe,.58,Ne,Ne,pt,at,ht),Ee.add(new go.PathSegment(go.PathSegment.Move,pt.x*z,pt.y*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,pe*ee,at.x*z,at.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,pt.x*z,pt.y*ee).close()),Ee.add(new go.PathSegment(go.PathSegment.Move,Ze.x*z,Ze.y*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,Re.x*z,Re.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,Ze.x*z,Ze.y*ee,Ye.x*z,Ye.y*ee,ze.x*z,ze.y*ee).close()),xt(Pe),xt(Ie),xt(ke),xt(Ne),xt(Oe),xt(Fe),xt(Re),xt(Ye),xt(ze),xt(Ze),xt(at),xt(ht),xt(pt),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 Pn("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=it(),Pe=it(),Ie=it(),ke=it(),Ne=new go.PathFigure((ue-le)*z,pe*ee,!1);ae.add(Ne),Ne.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(ue,pe-le,ue+re,pe-le,ue+le,pe-re,ue+le,pe,.44,Ie,ke,Pe,Ee,Ee),Ne.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);_e(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);Ne.add(new go.PathSegment(go.PathSegment.Line,(Oe.x*.1+.95*.9)*z,Oe.y*.1*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.85*z,Oe.y*.1*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.85*z,0)),Ne.add(new go.PathSegment(go.PathSegment.Line,z,0)),Ne.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,(Fe.x*.1+.9)*z,.15*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,(Fe.x*.1+.9)*z,(Fe.y*.1+.05*.9)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,Fe.x*z,Fe.y*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,pe*ee,Ie.x*z,Ie.y*ee,ke.x*z,ke.y*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+le)*ee,(ue+le)*z,(pe+re)*ee,(ue+re)*z,(pe+le)*ee)),Ne.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 Re=new go.PathFigure(ue*z,(pe-le)*ee,!1);ae.add(Re),Re.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.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.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.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),xt(Ee),xt(Pe),xt(Ie),xt(ke),xt(Oe),xt(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 Pn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new Pn("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,it());return Ee.spot2=new go.Spot(Ie.x,Ie.y),xt(Ie),Ee}),go.Shape.setFigureParameter("Arrow2",0,new Pn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new Pn("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,it());return Ee.spot2=new go.Spot(Ie.x,Ie.y),xt(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 Pn("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,it());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),xt(Ee),ue}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new Pn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new Pn("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,it());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),xt(ke),Pe}),go.Shape.setFigureParameter("IBeamArrow",0,new Pn("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,it());return ue.spot2=new go.Spot(Ee.x,Ee.y),xt(Ee),ue}),go.Shape.setFigureParameter("IBeamArrow2",0,new Pn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new Pn("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,it());return Pe.spot2=new go.Spot(ke.x,ke.y),xt(ke),Pe}),go.Shape.setFigureParameter("Pointer",0,new Pn("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,it());return re.spot2=new go.Spot(ue.x,ue.y),xt(ue),re}),go.Shape.setFigureParameter("RoundedPointer",0,new Pn("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,it());return re.spot2=new go.Spot(ue.x,ue.y),xt(ue),re}),go.Shape.setFigureParameter("SplitEndArrow",0,new Pn("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,it());return ue.spot2=new go.Spot(Ee.x,Ee.y),xt(Ee),ue}),go.Shape.setFigureParameter("SplitEndArrow2",0,new Pn("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,it());return ue.spot2=new go.Spot(Ee.x,Ee.y),xt(Ee),ue}),go.Shape.setFigureParameter("SquareArrow",0,new Pn("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,Ne=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+Ne)*z,(Pe-ke)*ee,(Ee+ke)*z,(Pe-Ne)*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,Ne=ce*ke,Ee=.825,Pe=.35,Oe.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z,(Pe-ke)*ee,(Ee+ke)*z,(Pe-Ne)*ee,(Ee+Ne)*z,(Pe-ke)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Ee-ke)*z,Pe*ee,(Ee-Ne)*z,(Pe-ke)*ee,(Ee-ke)*z,(Pe-Ne)*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,Ne=ce*ke,Ee=.5,Pe=.7,Oe.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z,(Pe-ke)*ee,(Ee+ke)*z,(Pe-Ne)*ee,(Ee+Ne)*z,(Pe-ke)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Ee-ke)*z,Pe*ee,(Ee-Ne)*z,(Pe-ke)*ee,(Ee-ke)*z,(Pe-Ne)*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,Ne=ce*ke,Ee=.175,Pe=.35,Oe.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z,(Pe-ke)*ee,(Ee+ke)*z,(Pe-Ne)*ee,(Ee+Ne)*z,(Pe-ke)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Ee-ke)*z,Pe*ee,(Ee-Ne)*z,(Pe-ke)*ee,(Ee-ke)*z,(Pe-Ne)*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,Ne=ce*ke,Ee=.05,Pe=.25,Oe.add(new go.PathSegment(go.PathSegment.Bezier,Ee*z,(Pe-ke)*ee,(Ee-ke)*z,(Pe-Ne)*ee,(Ee-Ne)*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 Pn("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,Ne=new go.PathFigure(Ee*z+Ie,(Pe+pe)*ee+ke,!0);ae.add(Ne),Ne.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)),Ne.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)),Ne.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)),Ne.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 Re=new go.PathFigure(Ee*z+Ie,(Pe-pe)*ee+ke,!0);ae.add(Re),Re.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)),Re.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)),Re.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)),Re.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=it(),Pe=it(),Ie=it(),ke=it();_e(ue,pe-le,ue+re,pe-le,ue+le,pe-re,ue+le,pe,.5,Ee,Ee,Pe,Ie,ke);var Ne=$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)),_e(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,_e(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)),_e(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()),xt(Ee),xt(Pe),xt(Ie),xt(ke),xt(Ne),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,Ne=.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,(Ne+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,Ne=ue,Oe=ue,Fe=Ie*Ne,Re=Ie*Oe;le.add(new go.PathSegment(go.PathSegment.Bezier,(pe-Ne)*z,Ee*ee,(pe-(Fe+Ne)/2)*z,(Ee+(Oe+Re)/2)*ee,(pe-Ne)*z,(Ee+Re)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,pe*z,(Ee-Oe)*ee,(pe-Ne)*z,(Ee-Re)*ee,(pe-Fe)*z,(Ee-Oe)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,(pe+Ne)*z,Ee*ee,(pe+Fe)*z,(Ee-Oe)*ee,(pe+Ne)*z,(Ee-Re)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*z,(1-.595)*ee,(pe+Ne)*z,(Ee+Re)*ee,(pe+(Fe+Ne)/2)*z,(Ee+(Oe+Re)/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,Ne=new go.PathFigure((Ie-Ee)*z,ke*ee,!0);ae.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Ie*z,(ke-Ee)*ee,(Ie-Ee)*z,(ke-Pe)*ee,(Ie-Pe)*z,(ke-Ee)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(Ie+Ee)*z,ke*ee,(Ie+Pe)*z,(ke-Ee)*ee,(Ie+Ee)*z,(ke-Pe)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Ie*z,(ke+Ee)*ee,(Ie+Ee)*z,(ke+Pe)*ee,(Ie+Pe)*z,(ke+Ee)*ee)),Ne.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,Ne=.175,Oe=.95,pe=new go.PathFigure((Ne-Ie)*z,Oe*ee,!0);ae.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Oe-Ie)*ee,(Ne-Ie)*z,(Oe-ke)*ee,(Ne-ke)*z,(Oe-Ie)*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+Ie)*z,Oe*ee,(Ne+ke)*z,(Oe-Ie)*ee,(Ne+Ie)*z,(Oe-ke)*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Oe+Ie)*ee,(Ne+Ie)*z,(Oe+ke)*ee,(Ne+ke)*z,(Oe+Ie)*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-Ie)*z,Oe*ee,(Ne-ke)*z,(Oe+Ie)*ee,(Ne-Ie)*z,(Oe+ke)*ee));var Ie=.05,ke=ce*.05,Ne=.375,Oe=.95,Ee=new go.PathFigure((Ne-Ie)*z,Oe*ee,!0);ae.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Oe-Ie)*ee,(Ne-Ie)*z,(Oe-ke)*ee,(Ne-ke)*z,(Oe-Ie)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+Ie)*z,Oe*ee,(Ne+ke)*z,(Oe-Ie)*ee,(Ne+Ie)*z,(Oe-ke)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Oe+Ie)*ee,(Ne+Ie)*z,(Oe+ke)*ee,(Ne+ke)*z,(Oe+Ie)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-Ie)*z,Oe*ee,(Ne-ke)*z,(Oe+Ie)*ee,(Ne-Ie)*z,(Oe+ke)*ee));var Ie=.05,ke=ce*.05,Ne=.625,Oe=.95,Pe=new go.PathFigure((Ne-Ie)*z,Oe*ee,!0);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Oe-Ie)*ee,(Ne-Ie)*z,(Oe-ke)*ee,(Ne-ke)*z,(Oe-Ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+Ie)*z,Oe*ee,(Ne+ke)*z,(Oe-Ie)*ee,(Ne+Ie)*z,(Oe-ke)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Oe+Ie)*ee,(Ne+Ie)*z,(Oe+ke)*ee,(Ne+ke)*z,(Oe+Ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-Ie)*z,Oe*ee,(Ne-ke)*z,(Oe+Ie)*ee,(Ne-Ie)*z,(Oe+ke)*ee));var Ie=.05,ke=ce*.05,Ne=.825,Oe=.95,Fe=new go.PathFigure((Ne-Ie)*z,Oe*ee,!0);ae.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Oe-Ie)*ee,(Ne-Ie)*z,(Oe-ke)*ee,(Ne-ke)*z,(Oe-Ie)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+Ie)*z,Oe*ee,(Ne+ke)*z,(Oe-Ie)*ee,(Ne+Ie)*z,(Oe-ke)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Oe+Ie)*ee,(Ne+Ie)*z,(Oe+ke)*ee,(Ne+ke)*z,(Oe+Ie)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-Ie)*z,Oe*ee,(Ne-ke)*z,(Oe+Ie)*ee,(Ne-Ie)*z,(Oe+ke)*ee).close());var Re=new go.PathFigure(0,ee,!1);return ae.add(Re),Re.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")},80727:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var Pn={},an="5.0",$e={},it=null,xt=!1,ie=!1,_e=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":an=Ce.toFixed(1);break;case"string":Ce.match(new RegExp("^[0-9]\\.[0-9]+$"))?an=Ce:_e=Ce;break;case"object":typeof Ce.is3D!="undefined"?it=Ce:$e=Ce;break;case"boolean":xt=Ce,ie=!0;break}}it===null&&(it={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&&(xt=!0)),_e!==null&&$e.id===void 0&&($e.id=_e);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(vt){return parseFloat(vt)>4?parseFloat(vt):5};Pn.setHTML5Codebase=function(vt,gt){ce=vt,wt(vt,gt)},Pn.setJavaCodebase=Pn.setJavaCodebaseVersion=Pn.isCompiledInstalled=Pn.setPreCompiledScriptPath=Pn.setPreCompiledResourcePath=function(){},Pn.setHTML5CodebaseVersion=function(vt,gt){var yt=parseFloat(vt);if(yt!==NaN&&yt<5){console.log("The GeoGebra HTML5 codebase version "+yt+" is deprecated. Using version latest instead.");return}ve=vt,ot(vt,gt)},Pn.getHTML5CodebaseVersion=function(){return fe},Pn.getParameters=function(){return $e},Pn.setFontsCSSURL=function(vt){ue=vt},Pn.setGiacJSURL=function(vt){},Pn.setJNLPFile=function(vt){ye=vt},Pn.setJNLPBaseDir=function(vt){},Pn.inject=function(){function vt(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var gt="auto",yt=$e.id,It,Ot=!1,Vt=0;Vt<arguments.length;Vt++){var Ct=arguments[Vt];typeof Ct=="string"?(Ct=Ct.toLowerCase(),Ct.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?gt=Ct:yt=arguments[Vt]):typeof Ct=="boolean"?Ot=Ct:Ct instanceof HTMLElement&&(It=Ct)}mt();function mt(){if(!je){setTimeout(mt,200);return}gt=Mt(gt);var nt=It||document.getElementById(yt);if(!nt){console.log("possibly bug on ajax loading? ");return}if(Pn.removeExistingApplet(nt,!1),$e.width===void 0&&nt.clientWidth&&($e.width=nt.clientWidth),$e.height===void 0&&nt.clientHeight&&($e.height=nt.clientHeight),!($e.width&&$e.height)&>==="html5"&&(delete $e.width,delete $e.height),xe=gt,gt==="screenshot")ze(nt,$e);else{var ft=!1;$e.hasOwnProperty("playButton")&&$e.playButton||$e.hasOwnProperty("clickToLoad")&&$e.clickToLoad?ft=!0:$e.hasOwnProperty("playButtonAutoDecide")&&$e.playButtonAutoDecide&&(ft=(!Pe()||vt())&&Ie()),ft?(xe="screenshot",at(nt,$e,Ot,gt)):Ye(nt,$e,Ot)}}};function Pe(){try{return window.self!==window.top}catch(vt){return!0}}function Ie(){return $e.hasOwnProperty("screenshotGenerator")&&$e.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Pn.getViews=function(){return it},Pn.isJavaInstalled=function(){return!1};var ke=function(vt){var gt=function(Vt){var Ct=JSON.parse(Vt),mt=function(Xe){return Xe.type=="G"||Xe.type=="E"},nt=Ct.elements?Ct.elements.filter(mt)[0]:Ct;if(!nt||!nt.url){yt();return}$e.fileName=nt.url,Ne(nt.settings||{}),it.is3D=!0;var ft="https://www.geogebra.org/images/";Pn.setPreviewImage(ae||nt.previewUrl,ft+"GeoGebra_loading.png",ft+"applet_play.png"),vt()},yt=function(){$e.onError&&$e.onError(),Et("Error: Fetching material (id "+$e.material_id+") failed.",$e)},It=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Ot="/materials/"+$e.material_id+"?scope=basic";Oe("https://"+It+"/api/proxy.php?path="+encodeURIComponent(Ot),gt,yt)};function Ne(vt){var gt=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(yt){vt[yt]=!!vt[yt]}),gt.forEach(function(yt){$e[yt]===void 0&&vt[yt]!==void 0&&($e[yt]=vt[yt])}),$e.showToolBarHelp===void 0&&($e.showToolBarHelp=$e.showToolBar)}function Oe(vt,gt,yt){var It=new XMLHttpRequest;It.open("GET",vt),It.onload=function(){gt(It.responseText)},It.onerror=yt,It.send()}Pn.isHTML5Installed=function(){return!0},Pn.getLoadedAppletType=function(){return xe},Pn.setPreviewImage=function(vt,gt,yt){ae=vt,re=gt,le=yt},Pn.removeExistingApplet=function(vt,gt){var yt;typeof vt=="string"&&(vt=document.getElementById(vt)),xe=null;var It=null;for(yt=0;yt<vt.childNodes.length;yt++){var Ot=vt.childNodes[yt],Vt=Ot.className;Vt==="applet_screenshot"?gt?(Ot.style.display="block",xe="screenshot"):Ot.style.display="none":Vt!=="applet_scaler prerender"&&(vt.removeChild(Ot),It=Vt&&Vt.indexOf("appletParameters")!=-1?Ot.id:null,yt--)}var Ct=$e.id!==void 0?$e.id:It,mt=window[Ct];mt&&typeof mt.getBase64=="function"&&(mt.remove(),window[Ct]=null)},Pn.refreshHitPoints=function(){if(Ee(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var vt=Pn.getAppletObject();return vt&&typeof vt.recalculateEnvironments=="function"?(vt.recalculateEnvironments(),!0):!1},Pn.startAnimation=function(){var vt=Pn.getAppletObject();return vt&&typeof vt.startAnimation=="function"?(vt.startAnimation(),!0):!1},Pn.stopAnimation=function(){var vt=Pn.getAppletObject();return vt&&typeof vt.stopAnimation=="function"?(vt.stopAnimation(),!0):!1},Pn.getAppletObject=function(){var vt=$e.id!==void 0?$e.id:"ggbApplet";return window[vt]},Pn.resize=function(){};var Fe=function(vt,gt,yt){var It=document.createElement("param");It.setAttribute("name",gt),It.setAttribute("value",yt),vt.appendChild(It)},Re=function(vt){return vt&&vt!=="false"},Ye=function(vt,gt,yt){Ee(fe)<=4.2&&(yt=!0);var It=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==fe||ggbHTML5LoadedCodebaseIsWebSimple&&!ee)&&(It=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Ot=document.createElement("div");Ot.classList.add("appletParameters","notranslate");var Vt=gt.width,Ct=gt.height;if(gt.disableAutoScale=gt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():gt.disableAutoScale,gt.width!==void 0)if(Ee(fe)<=4.4)Re(gt.showToolBar)&&(gt.height-=7),Re(gt.showAlgebraInput)&&(gt.height-=37),gt.width<605&&Re(gt.showToolBar)&&(gt.width=605,Vt=605);else{var mt=100;(Re(gt.showToolBar)||Re(gt.showMenuBar))&&(gt.hasOwnProperty("customToolBar")&&(gt.customToolbar=gt.customToolBar),mt=Re(gt.showMenuBar)?245:155),Vt<mt&&(gt.width=mt,Vt=mt)}Ot.style.border="none",Ot.style.display="inline-block";for(var nt in gt)gt.hasOwnProperty(nt)&&nt!=="appletOnLoad"&&Ot.setAttribute("data-param-"+nt,gt[nt]);ue&&Ot.setAttribute("data-param-fontscssurl",ue),Pn.resize=function(){GGBAppletUtils.responsiveResize(vt,gt)},window.addEventListener("resize",function(Le){Pn.resize()});var ft=typeof gt.appletOnLoad=="function"?gt.appletOnLoad:function(){};if(!yt&>.width!==void 0){gt.hasOwnProperty("showSplash")||Ot.setAttribute("data-param-showSplash","false");var Xe=vt.querySelector(".applet_scaler.prerender"),ut=Xe!==null;if(ut)var bt=Xe.querySelector(".ggb_preview");else{var bt=pt(Vt,Ct,gt.borderColor,!1);Xe=document.createElement("div"),Xe.className="applet_scaler",Xe.style.position="relative",Xe.style.display="block",Xe.style.width=Vt+"px",Xe.style.height=Ct+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Xe,"66%"),Ee(fe)>=5?(gt.appletOnLoad=function(Le){var Ke=vt.querySelector(".ggb_preview");Ke&&Ke.parentNode.removeChild(Ke),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Xe),window.GGBT_wsf_view&&$(window).trigger("resize"),ft(Le)},ut||Xe.appendChild(bt)):Ot.appendChild(bt),Xe.appendChild(Ot),ut||vt.appendChild(Xe),setTimeout(function(){Pn.resize()},1)}else{var St=document.createElement("div");St.className="applet_scaler",St.style.position="relative",St.style.display="block",St.appendChild(Ot),vt.appendChild(St),gt.appletOnLoad=function(Le){Pn.resize(),ft(Le)}}function lt(Le,Ke){Ke&&typeof Ke.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Le,Ke.appletOnLoad):renderGGBElement(Le),Et("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Ke)}function Qe(Le,Ke){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Le,params:Ke}),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,Ke)}if(It){scriptLoadStarted=!0;for(var Ue=0;Ue<Ot.childNodes.length;Ue++){var We=Ot.childNodes[Ue].tagName;We==="TABLE"&&(Ot.removeChild(Ot.childNodes[Ue]),Ue--)}if(ggbHTML5LoadedScript!==null){var qe=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');qe!=null&&qe.parentNode.removeChild(qe)}var He=document.createElement("script"),De=function(){Qe(Ot,gt)};He.src=we+z,ggbHTML5LoadedCodebaseIsWebSimple=ee,ggbHTML5LoadedCodebaseVersion=fe,ggbHTML5LoadedScript=He.src,Et("GeoGebra HTML5 codebase loaded: '"+we+"'.",gt),!ce&&(!ve||ve=="5.0")?(ee?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),De()):we.requirejs?__webpack_require__.e(4184).then(function(){var Le=[__webpack_require__(74620)];De.apply(null,Le)}.bind(this)).catch(__webpack_require__.oe):(He.onload=De,vt.appendChild(He))}else Qe(Ot,gt);gt.height=Ct,gt.width=Vt},ze=function(vt,gt,yt){var It=pt(gt.width,gt.height,gt.borderColor,yt),Ot=document.createElement("div");Ot.style.position="relative",Ot.style.display="block",Ot.style.width=gt.width+"px",Ot.style.height=gt.height+"px",Ot.className="applet_screenshot applet_scaler"+(yt?" applet_screenshot_play":""),Ot.appendChild(It);var Vt=GGBAppletUtils.getScale(gt,vt,yt);yt?(vt.appendChild(ht()),window.GGBT_wsf_view||(vt.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Ot,"66%"),vt.appendChild(Ot),Vt!==1&&!isNaN(Vt)&&(GGBAppletUtils.scaleElement(Ot,Vt),Ot.style.width=gt.width+"px",Ot.style.height=gt.height+"px",Ot.parentNode.style.width=gt.width*Vt+"px",Ot.parentNode.style.height=gt.height*Vt+"px"),Pn.resize=function(){Ze(vt,It,Ot,yt)},window.addEventListener("resize",function(Ct){Pn.resize()}),Pn.resize()};function Ze(vt,gt,yt,It){if(vt.contains(gt)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(vt.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(vt)}var Ot=GGBAppletUtils.getScale($e,vt,It);yt.parentNode!==null&&(!isNaN(Ot)&&Ot!==1?(GGBAppletUtils.scaleElement(yt,Ot),yt.parentNode.style.width=$e.width*Ot+"px",yt.parentNode.style.height=$e.height*Ot+"px"):(GGBAppletUtils.scaleElement(yt,1),yt.parentNode.style.width=$e.width+"px",yt.parentNode.style.height=$e.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(vt),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Pn.onExitFullscreen=function(vt,gt){gt.appendChild(vt)};var at=function(vt,gt,yt,It){ze(vt,gt,!0);for(var Ot=function(){var mt=[];for(Ct=0;Ct<vt.childNodes.length;Ct++)mt.push(vt.childNodes[Ct]);if(window.GGBT_wsf_view){var nt=window.GGBT_wsf_view.renderFullScreen(vt,gt.id),ft=document.getElementById("fullscreencontainer"),Xe=jQuery(vt).find(".fullscreencontent");Xe.length>0?(nt.remove(),Xe.attr("id","fullscreencontent").show(),jQuery(ft).append(Xe),window.dispatchEvent(new Event("resize"))):Ye(nt,gt,!1),window.GGBT_wsf_view.launchFullScreen(ft)}else xe=It,Ye(vt,gt,!1);if(!window.GGBT_wsf_view)for(Ct=0;Ct<mt.length;Ct++)vt.removeChild(mt[Ct])},Vt=vt.getElementsByClassName("ggb_preview_play"),Ct=0;Ct<Vt.length;Ct++)Vt[Ct].addEventListener("click",Ot,!1),Vt[Ct].addEventListener("ontouchstart",Ot,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(vt),Ie()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},ht=function(){var vt=document.createElement("div");if(vt.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var gt='.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");}',yt=document.createElement("style");yt.styleSheet?yt.styleSheet.cssText=gt:yt.appendChild(document.createTextNode(gt)),document.getElementsByTagName("head")[0].appendChild(yt)}return vt},pt=function(vt,gt,yt,It){var Ot=document.createElement("div");Ot.className="ggb_preview",Ot.style.position="absolute",Ot.style.zIndex="90",Ot.style.width=vt-2+"px",Ot.style.height=gt-2+"px",Ot.style.top="0px",Ot.style.left="0px",Ot.style.overflow="hidden",Ot.style.backgroundColor="white";var Vt="lightgrey";yt!==void 0&&(yt==="none"?Vt="transparent":Vt=yt),Ot.style.border="1px solid "+Vt;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 mt,nt,ft;if(!It){mt=document.createElement("img"),mt.style.position="absolute",mt.style.zIndex="1001",mt.style.opacity=1,Ct.style.opacity=.3,nt=360,nt>vt/4*3&&(nt=vt/4*3),ft=nt/5.8,mt.setAttribute("src",re),mt.setAttribute("width",nt),mt.setAttribute("height",ft);var Xe=(vt-nt)/2,ut=(gt-ft)/2;mt.style.left=Xe+"px",mt.style.top=ut+"px",Ot.appendChild(mt)}}return Ot.appendChild(Ct),Ot},Mt=function(vt){return vt=vt.toLowerCase(),vt==="html5"||vt==="screenshot"?vt:"html5"},et=["web","webSimple","web3d","tablet","tablet3d","phone"],ot=function(vt,gt){if(fe=vt,gt){wt(fe,!0);return}var yt=!xt;if(yt){var It=Ee(fe);!isNaN(It)&&It<4.4&&(yt=!1)}var Ot,Vt;window.location.protocol.substr(0,4)==="http"?Ot=window.location.protocol:Ot="http:";var Ct=fe.indexOf("//");Ct>0?Vt=fe:Ct===0?Vt=Ot+fe:Vt="https://www.geogebra.org/apps/5.2.814.0/";for(var mt in et)if(fe.slice(et[mt].length*-1)===et[mt]||fe.slice((et[mt].length+1)*-1)===et[mt]+"/"){wt(Vt,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&yt&&!it.is3D&&!it.AV&&!it.SV&&!it.CV&&!it.EV2&&!it.CP&&!it.PC&&!it.DA&&!it.FI&&!it.PV&&!Re($e.showToolBar)&&!Re($e.showMenuBar)&&!Re($e.showAlgebraInput)&&!Re($e.enableRightClick)&&(!$e.appName||$e.appName=="classic")?Vt+="webSimple/":Vt+="web3d/",wt(Vt,!1)},wt=function(vt,gt){if(vt.requirejs){we=vt;return}vt.slice(-1)!=="/"&&(vt+="/"),we=vt,gt===null&&(gt=vt.indexOf("http")===-1),me=gt,z="web.nocache.js",ee=!1;var yt=we.split("/");yt.length>1&&(!gt&&yt[yt.length-2]==="webSimple"?(z="webSimple.nocache.js",ee=!0):et.indexOf(yt[yt.length-2])>=0&&(z=yt[yt.length-2]+".nocache.js")),yt=vt.split("/"),fe=yt[yt.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 It=parseFloat(fe);It!==NaN&&It<5&&vt.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+It+" is deprecated. Using version latest instead."),ot("5.0",gt))},Et=function(vt,gt){window.console&&window.console.log&&(!gt||typeof gt.showLogging=="undefined"||gt.showLogging&>.showLogging!=="false")&&console.log(vt)};$e.material_id!==void 0?ke(Tt):Tt();function Tt(){var vt=an;ve!==null?vt=ve:parseFloat(vt)<5&&(vt="5.0"),ot(vt,!1),ce!==null&&wt(ce,me),je=!0}return Pn},GGBAppletUtils=function(){"use strict";function Pn(){return window.GGBT_wsf_edit!==void 0}function an(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 it(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 xt(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=it(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 _e(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=xt(ve,je);Pn()&&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",an(Ce,be)):(an(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:_e,isFlexibleWorksheetEditor:Pn,positionCenter:ie,getScale:xt,scaleElement:an}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var Pn=n.location.search;return Pn.indexOf(J)!=-1||Pn.indexOf(K)!=-1}function q(Pn,an){}webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{};s[L]={moduleName:L},webModule.__moduleStartupDone=function(Pn){var an=s[L].bindings;s[L].bindings=function(){for(var $e=an?an():{},it=Pn[webModule.__softPermutationId],xt=O;xt<it.length;xt++){var ie=it[xt];$e[ie[O]]=ie[P]}return $e}};var t;function u(){return v(),t}function v(){if(!t){var Pn=o.createElement(Q);if(Pn.id=L,Pn.style.cssText=R+S,Pn.tabIndex=-1,o.body.appendChild(Pn),t=Pn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var an=document.compatMode==U?V:W;t.write(an+X),t.close()}}}function w(Pn){function an(it){function xt(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var ie=xt();if(ie){it();return}function _e(){if(!ie){if(!xt())return;ie=!0,it(),o.removeEventListener&&o.removeEventListener(Z,_e,!1),je&&clearInterval(je)}}o.addEventListener&&o.addEventListener(Z,_e,!1);var je=setInterval(function(){_e()},$)}function $e(it){var xt=u(),ie=xt.body,_e=xt.createElement(_);_e.language=ab,_e.crossOrigin=W,_e.src=it,webModule.__errFn&&(_e.onerror=function(){webModule.__errFn(L,new Error(bb+it))}),ie.appendChild(_e)}an(function(){$e(Pn)})}webModule.__startLoadingFragment=function(Pn){return C(Pn)},webModule.__installRunAsyncCode=function(Pn){var an=u(),$e=an.body,it=an.createElement(_);it.language=ab,it.text=Pn,$e.appendChild(it),$e.removeChild(it)};function A(){for(var c={},d,e,f=o.getElementsByTagName(fb),g=O,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(gb),k;if(j){if(j=j.replace(hb,W),j.indexOf(ib)>=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(Pn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Pn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Pn){var an=c[Pn];return an==null?null:an},r=d,webModule.__errFn=e}function B(){function Pn(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 an(je){if(!je.match(/^\w+:\/\//)){var ve=o.createElement(ub);ve.src=je+vb,je=Pn(ve.src)}return je}function $e(){var je=__gwt_getMetaProperty(wb);return je!=null?je:W}function it(){for(var je=o.getElementsByTagName(_),ve=O;ve<je.length;++ve)if(je[ve].src.indexOf(xb)!=-1)return Pn(je[ve].src);return W}function xt(){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 _e=$e();return _e==W&&(_e=it()),_e==W&&(_e=xt()),_e==W&&ie()&&(_e=Pn(o.location.href)),_e=an(_e),_e}function C(Pn){return Pn.match(/^\//)||Pn.match(/^[a-zA-Z]+:\/\//)?Pn:webModule.__moduleBase+Pn}function D(){var Pn=[],an=O,$e=[],it=[];function xt(je){var ve=it[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]=xt(ve));return je},webModule.__computePropValue=xt,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var ie;try{ie=Cb;var _e=ie.indexOf(Db);_e!=-1&&(an=parseInt(ie.substring(_e+P),$),ie=ie.substring(O,_e))}catch(je){}return webModule.__softPermutationId=an,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})()},77903:function(Pn,an,$e){"use strict";$e.d(an,{Ax:function(){return _e},Ds:function(){return je},KI:function(){return ce},SI:function(){return ie},f1:function(){return xt}});var it=$e(3294);function xt(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 _e(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&&_e(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=it.Z.API_SERVER},16406:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return qe}});var it=$e(59301),xt={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},ie=$e(92310),_e=$e.n(ie),je=$e(71418);var ve=function(He,De){return(ve=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Le,Ke){Le.__proto__=Ke}||function(Le,Ke){for(var dt in Ke)Object.prototype.hasOwnProperty.call(Ke,dt)&&(Le[dt]=Ke[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,Ke){return new(Le||(Le=Promise))(function(dt,Ve){function kt(At){try{Xt(Ke.next(At))}catch(Nt){Ve(Nt)}}function zt(At){try{Xt(Ke.throw(At))}catch(Nt){Ve(Nt)}}function Xt(At){var Nt;At.done?dt(At.value):(Nt=At.value,Nt instanceof Le?Nt:new Le(function(qt){qt(Nt)})).then(kt,zt)}Xt((Ke=Ke.apply(He,De||[])).next())})}function Ce(He,De){var Le,Ke,dt,Ve,kt={label:0,sent:function(){if(1&dt[0])throw dt[1];return dt[1]},trys:[],ops:[]};return Ve={next:zt(0),throw:zt(1),return:zt(2)},typeof Symbol=="function"&&(Ve[Symbol.iterator]=function(){return this}),Ve;function zt(Xt){return function(At){return function(Nt){if(Le)throw new TypeError("Generator is already executing.");for(;kt;)try{if(Le=1,Ke&&(dt=2&Nt[0]?Ke.return:Nt[0]?Ke.throw||((dt=Ke.return)&&dt.call(Ke),0):Ke.next)&&!(dt=dt.call(Ke,Nt[1])).done)return dt;switch(Ke=0,dt&&(Nt=[2&Nt[0],dt.value]),Nt[0]){case 0:case 1:dt=Nt;break;case 4:return kt.label++,{value:Nt[1],done:!1};case 5:kt.label++,Ke=Nt[1],Nt=[0];continue;case 7:Nt=kt.ops.pop(),kt.trys.pop();continue;default:if(dt=kt.trys,!((dt=dt.length>0&&dt[dt.length-1])||Nt[0]!==6&&Nt[0]!==2)){kt=0;continue}if(Nt[0]===3&&(!dt||Nt[1]>dt[0]&&Nt[1]<dt[3])){kt.label=Nt[1];break}if(Nt[0]===6&&kt.label<dt[1]){kt.label=dt[1],dt=Nt;break}if(dt&&kt.label<dt[2]){kt.label=dt[2],kt.ops.push(Nt);break}dt[2]&&kt.ops.pop(),kt.trys.pop();continue}Nt=De.call(He,kt)}catch(qt){Nt=[6,qt],Ke=0}finally{Le=dt=0}if(5&Nt[0])throw Nt[1];return{value:Nt[0]?Nt[1]:void 0,done:!0}}([Xt,At])}}}function ye(){for(var He=0,De=0,Le=arguments.length;De<Le;De++)He+=arguments[De].length;var Ke=Array(He),dt=0;for(De=0;De<Le;De++)for(var Ve=arguments[De],kt=0,zt=Ve.length;kt<zt;kt++,dt++)Ke[dt]=Ve[kt];return Ke}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 Ke=0,dt=Le;Ke<dt.length;Ke++){var Ve=dt[Ke],kt=Ve[0],zt=Ve[1];De.setAttribute(kt,zt)}},He.createRect=function(De,Le,Ke){var dt=document.createElementNS("http://www.w3.org/2000/svg","rect");return dt.setAttribute("width",De.toString()),dt.setAttribute("height",Le.toString()),Ke&&He.setAttributes(dt,Ke),dt},He.createLine=function(De,Le,Ke,dt,Ve){var kt=document.createElementNS("http://www.w3.org/2000/svg","line");return kt.setAttribute("x1",De.toString()),kt.setAttribute("y1",Le.toString()),kt.setAttribute("x2",Ke.toString()),kt.setAttribute("y2",dt.toString()),Ve&&He.setAttributes(kt,Ve),kt},He.createPolygon=function(De,Le){var Ke=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Ke.setAttribute("points",De),Le&&He.setAttributes(Ke,Le),Ke},He.createCircle=function(De,Le){var Ke=document.createElementNS("http://www.w3.org/2000/svg","circle");return Ke.setAttribute("cx",(De/2).toString()),Ke.setAttribute("cy",(De/2).toString()),Ke.setAttribute("r",De.toString()),Le&&He.setAttributes(Ke,Le),Ke},He.createEllipse=function(De,Le,Ke){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()),Ke&&He.setAttributes(dt,Ke),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,Ke,dt,Ve,kt,zt){var Xt=document.createElementNS("http://www.w3.org/2000/svg","marker");return He.setAttributes(Xt,[["id",De],["orient",Le],["markerWidth",Ke.toString()],["markerHeight",dt.toString()],["refX",Ve.toString()],["refY",kt.toString()]]),Xt.appendChild(zt),Xt},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 Ke=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Ke.textContent=De,Le&&He.setAttributes(Ke,Le),Ke},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 Ke=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Ke.x=De,Ke.y=Le,Ke},He.createPath=function(De,Le){var Ke=document.createElementNS("http://www.w3.org/2000/svg","path");return Ke.setAttribute("d",De),Le&&He.setAttributes(Ke,Le),Ke},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,Ke){var dt=this;return new Promise(function(Ve){var kt=Ke!==void 0?Ke:document.createElement("canvas");De===null&&(dt.markersOnly=!0,dt.naturalSize=!1);var zt=document.createElementNS("http://www.w3.org/2000/svg","svg");zt.setAttribute("xmlns","http://www.w3.org/2000/svg"),zt.setAttribute("width",Le.width.baseVal.valueAsString),zt.setAttribute("height",Le.height.baseVal.valueAsString),zt.setAttribute("viewBox","0 0 "+Le.viewBox.baseVal.width.toString()+" "+Le.viewBox.baseVal.height.toString()),zt.innerHTML=Le.innerHTML,dt.naturalSize===!0?(zt.width.baseVal.value=De.naturalWidth,zt.height.baseVal.value=De.naturalHeight):dt.width!==void 0&&dt.height!==void 0&&(zt.width.baseVal.value=dt.width,zt.height.baseVal.value=dt.height),kt.width=zt.width.baseVal.value,kt.height=zt.height.baseVal.value;var Xt=zt.outerHTML,At=kt.getContext("2d");dt.markersOnly!==!0&&At.drawImage(De,0,0,kt.width,kt.height);var Nt=window.URL,qt=new Image(kt.width,kt.height);qt.setAttribute("crossOrigin","anonymous");var on=new Blob([Xt],{type:"image/svg+xml"}),gn=Nt.createObjectURL(on);qt.onload=function(){At.drawImage(qt,0,0),Nt.revokeObjectURL(gn);var kn=kt.toDataURL(dt.imageType,dt.imageQuality);Ve(kn)},qt.src=gn})},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,Ke,dt,Ve){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=De,this.displayMode=Le,this.markerItems=Ke,this.uiStyleSettings=dt,this.styles=Ve,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 Ke=document.createElement("div");Ke.className=this.toolbarBlockStyleClass.name,Ke.style.whiteSpace="nowrap",this.uiContainer.appendChild(Ke),this.addActionButton(Ke,'<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(Ke,'<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(Ke,'<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(Ke,'<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(Ke,'<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(Ke,'<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(Ke,'<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(Ke,'<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(Ve){var kt=document.createElement("div");kt.className=""+Le.toolbarButtonStyleClass.name,kt.setAttribute("data-type-name",Ve.typeName),kt.innerHTML=Ve.icon,kt.addEventListener("click",function(){Le.markerToolbarButtonClicked(kt,Ve)}),Le.buttons.push(kt),Le.markerButtons.push(kt)}),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,Ke){var dt=this,Ve=document.createElement("div");switch(Ve.className=""+this.toolbarButtonStyleClass.name,Ve.innerHTML=Le,Ve.setAttribute("data-action",Ke),Ve.addEventListener("click",function(){dt.actionToolbarButtonClicked(Ve,Ke)}),Ke){case"select":Ve.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Ve.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Ve.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Ve.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Ve.style.fill=this.uiStyleSettings.closeButtonColor}De.appendChild(Ve),this.buttons.push(Ve)},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(Ke){return Ke("marker",Le)}),this.markerButtonOverflowBlock.style.display="none"},He.prototype.actionToolbarButtonClicked=function(De,Le){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Ke){return Ke("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(Ke){return Ke.getAttribute("data-type-name")===De});Le&&this.setActiveButton(Le)},He.prototype.setCurrentMarker=function(De){var Le=this;this.currentMarker=De,this.buttons.filter(function(Ke){return/delete|notes/.test(Ke.getAttribute("data-action"))}).forEach(function(Ke){Le.currentMarker===void 0?(Ke.style.fillOpacity="0.4",Ke.style.pointerEvents="none"):(Ke.style.fillOpacity="1",Ke.style.pointerEvents="all")})},He}(),le=function(){function He(De,Le,Ke,dt){this.panels=[],this.panelButtons=[],this.markerjsContainer=De,this.displayMode=Le,this.uiStyleSettings=Ke,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,Ke,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+" "+((Ke=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Ke!==void 0?Ke:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Ve){var kt;Ve.uiStyleSettings=dt.uiStyleSettings;var zt=document.createElement("div");zt.className=dt.toolboxButtonStyleClass.name+" "+((kt=dt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&kt!==void 0?kt:dt.toolboxButtonStyleColorsClass.name),zt.innerHTML=Ve.icon,zt.title=Ve.title,zt.addEventListener("click",function(){dt.panelButtonClick(Ve)}),dt.panelButtons.push(zt),dt.buttonRow.appendChild(zt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},He.prototype.panelButtonClick=function(De){var Le=this,Ke=-1;if(De!==this.activePanel){Ke=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(Ve,kt){var zt,Xt;Ve.className=Le.toolboxButtonStyleClass.name+" "+(kt===Ke?""+((zt=Le.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&zt!==void 0?zt:Le.toolboxActiveButtonStyleColorsClass.name):""+((Xt=Le.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Xt!==void 0?Xt:Le.toolboxButtonStyleColorsClass.name))})},He}(),ue=function(He,De){this.title=He,this.icon=De},pe=function(He){function De(Le,Ke,dt,Ve){var kt=He.call(this,Le,Ve||'<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 kt.colors=[],kt.addTransparent=!1,kt.colorBoxes=[],kt.colors=Ke,kt.currentColor=dt,kt.setCurrentColor=kt.setCurrentColor.bind(kt),kt.getColorBox=kt.getColorBox.bind(kt),kt}return ce(De,He),De.prototype.getUi=function(){var Le=this,Ke=document.createElement("div");return Ke.style.overflow="hidden",Ke.style.whiteSpace="nowrap",this.colors.forEach(function(dt){var Ve=Le.getColorBox(dt);Ke.appendChild(Ve),Le.colorBoxes.push(Ve)}),Ke},De.prototype.getColorBox=function(Le){var Ke=this,dt=this.uiStyleSettings.toolbarHeight/4,Ve=this.uiStyleSettings.toolbarHeight-dt,kt=document.createElement("div");kt.style.display="inline-block",kt.style.boxSizing="content-box",kt.style.width=Ve-2+"px",kt.style.height=Ve-2+"px",kt.style.padding="1px",kt.style.marginRight="2px",kt.style.marginBottom="2px",kt.style.borderWidth="2px",kt.style.borderStyle="solid",kt.style.borderRadius=(Ve+2)/2+"px",kt.style.borderColor=Le===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){Ke.setCurrentColor(Le,kt)});var zt=document.createElement("div");return zt.style.display="inline-block",zt.style.width=Ve-2+"px",zt.style.height=Ve-2+"px",zt.style.backgroundColor=Le,zt.style.borderRadius=Ve/2+"px",Le==="transparent"&&(zt.style.fill=this.uiStyleSettings.toolboxAccentColor,zt.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>`),kt.appendChild(zt),kt},De.prototype.setCurrentColor=function(Le,Ke){var dt=this;this.currentColor=Le,this.colorBoxes.forEach(function(Ve){Ve.style.borderColor=Ve===Ke?dt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Le)},De}(ue),Ee=function(){function He(De,Le,Ke){this._state="new",this._isSelected=!1,this._container=De,this._overlayContainer=Le,this.globalSettings=Ke,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}(),Ne=function(He){function De(Le,Ke,dt){var Ve=He.call(this,Le,Ke,dt)||this;return Ve.left=0,Ve.top=0,Ve.width=0,Ve.height=0,Ve.defaultSize={x:50,y:20},Ve.offsetX=0,Ve.offsetY=0,Ve.rotationAngle=0,Ve.CB_DISTANCE=10,Ve._suppressMarkerCreateEvent=!1,Ve.container.transform.baseVal.appendItem(we.createTransform()),Ve.setupControlBox(),Ve}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 Ke=we.createTransform();this._visual.transform.baseVal.appendItem(Ke)},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,Ke){He.prototype.pointerDown.call(this,Le,Ke),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(Ke),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Ke)){this.activeGrip=this.rotatorGrip;var Ve=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Ve.x-this.width/2,this.top=Ve.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var kt=this.container.transform.baseVal.getItem(0);kt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(kt,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},De.prototype.pointerUp=function(Le){var Ke=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",Ke==="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 Ke=this.unrotatePoint(Le);this.state==="creating"?this.resize(Le):this.state==="move"?(this.left=this.manipulationStartLeft+(Ke.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Ke.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Ke):this.state==="rotate"&&this.rotate(Le)},De.prototype.resize=function(Le){var Ke=this.manipulationStartLeft,dt=this.manipulationStartWidth,Ve=this.manipulationStartTop,kt=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Ke=this.manipulationStartLeft+Le.x-this.manipulationStartX,dt=this.manipulationStartWidth+this.manipulationStartLeft-Ke;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:Ve=this.manipulationStartTop+Le.y-this.manipulationStartY,kt=this.manipulationStartHeight+this.manipulationStartTop-Ve;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:kt=this.manipulationStartHeight+Le.y-this.manipulationStartY}dt>=0?(this.left=Ke,this.width=dt):(this.left=Ke+dt,this.width=-dt),kt>=0?(this.top=Ve,this.height=kt):(this.top=Ve+kt,this.height=-kt),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 Ke=Math.sign(Le.x-this.centerX);this.rotationAngle=180*Math.atan((Le.y-this.centerY)/(Le.x-this.centerX))/Math.PI+90*Ke,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 Ke=this.container.getCTM(),dt=we.createPoint(Le.x,Le.y);return{x:(dt=dt.matrixTransform(Ke)).x,y:dt.y}},De.prototype.unrotatePoint=function(Le){if(this.rotationAngle===0)return Le;var Ke=this.container.getCTM();Ke=Ke.inverse();var dt=we.createPoint(Le.x,Le.y);return{x:(dt=dt.matrixTransform(Ke)).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,Ke=-Le/2,dt=Ke,Ve=(this.width+this.CB_DISTANCE)/2-Le/2,kt=(this.height+this.CB_DISTANCE)/2-Le/2,zt=this.height+this.CB_DISTANCE-Le/2,Xt=this.width+this.CB_DISTANCE-Le/2;this.positionGrip(this.controlGrips.topLeft.visual,Ke,dt),this.positionGrip(this.controlGrips.topCenter.visual,Ve,dt),this.positionGrip(this.controlGrips.topRight.visual,Xt,dt),this.positionGrip(this.controlGrips.centerLeft.visual,Ke,kt),this.positionGrip(this.controlGrips.centerRight.visual,Xt,kt),this.positionGrip(this.controlGrips.bottomLeft.visual,Ke,zt),this.positionGrip(this.controlGrips.bottomCenter.visual,Ve,zt),this.positionGrip(this.controlGrips.bottomRight.visual,Xt,zt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Ve,dt-3*this.CB_DISTANCE)},De.prototype.positionGrip=function(Le,Ke,dt){var Ve=Le.transform.baseVal.getItem(0);Ve.setTranslate(Ke,dt),Le.transform.baseVal.replaceItem(Ve,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 Ke=Le;this.left=Ke.left,this.top=Ke.top,this.width=Ke.width,this.height=Ke.height,this.rotationAngle=Ke.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ke.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Ke.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ke.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Ke.containerTransformMatrix))},De.prototype.scale=function(Le,Ke){He.prototype.scale.call(this,Le,Ke);var dt=this.rotatePoint({x:this.left,y:this.top}),Ve=this.unrotatePoint({x:dt.x*Le,y:dt.y*Ke});this.left=Ve.x,this.top=Ve.y,this.width=this.width*Le,this.height=this.height*Ke,this.adjustControlBox()},De}(Ee),Oe=function(He){function De(Le,Ke,dt){var Ve=He.call(this,Le,Ke,dt)||this;return Ve.fillColor="transparent",Ve.strokeColor="transparent",Ve.strokeWidth=0,Ve.strokeDasharray="",Ve.opacity=1,Ve.setStrokeColor=Ve.setStrokeColor.bind(Ve),Ve.setFillColor=Ve.setFillColor.bind(Ve),Ve.setStrokeWidth=Ve.setStrokeWidth.bind(Ve),Ve.setStrokeDasharray=Ve.setStrokeDasharray.bind(Ve),Ve.createVisual=Ve.createVisual.bind(Ve),Ve}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,Ke){He.prototype.pointerDown.call(this,Le,Ke),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 Ke=Le;this.fillColor=Ke.fillColor,this.strokeColor=Ke.strokeColor,this.strokeWidth=Ke.strokeWidth,this.strokeDasharray=Ke.strokeDasharray,this.opacity=Ke.opacity,this.createVisual(),He.prototype.restoreState.call(this,Le),this.setSize()},De.prototype.scale=function(Le,Ke){He.prototype.scale.call(this,Le,Ke),this.setSize()},De.title="Rectangle marker",De}(Ne),Fe=function(He){function De(Le,Ke,dt,Ve){var kt=He.call(this,Le,Ve||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return kt.widths=[],kt.widthBoxes=[],kt.widths=Ke,kt.currentWidth=dt,kt.setCurrentWidth=kt.setCurrentWidth.bind(kt),kt}return ce(De,He),De.prototype.getUi=function(){var Le=this,Ke=document.createElement("div");return Ke.style.display="flex",Ke.style.overflow="hidden",Ke.style.flexGrow="2",this.widths.forEach(function(dt){var Ve=document.createElement("div");Ve.style.display="flex",Ve.style.flexGrow="2",Ve.style.alignItems="center",Ve.style.justifyContent="space-between",Ve.style.padding="5px",Ve.style.borderWidth="2px",Ve.style.borderStyle="solid",Ve.style.borderColor=dt===Le.currentWidth?Le.uiStyleSettings.toolboxAccentColor:"transparent",Ve.addEventListener("click",function(){Le.setCurrentWidth(dt,Ve)}),Ke.appendChild(Ve);var kt=document.createElement("div");kt.innerText=dt.toString(),kt.style.marginRight="5px",Ve.appendChild(kt);var zt=document.createElement("div");zt.style.minHeight="20px",zt.style.flexGrow="2",zt.style.display="flex",zt.style.alignItems="center";var Xt=document.createElement("hr");Xt.style.minWidth="20px",Xt.style.border="0px",Xt.style.borderTop=dt+"px solid "+Le.uiStyleSettings.toolboxColor,Xt.style.flexGrow="2",zt.appendChild(Xt),Ve.appendChild(zt),Le.widthBoxes.push(Ve)}),Ke},De.prototype.setCurrentWidth=function(Le,Ke){var dt=this;this.currentWidth=Le,this.widthBoxes.forEach(function(Ve){Ve.style.borderColor=Ve===Ke?dt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},De}(ue),Re=function(He){function De(Le,Ke,dt,Ve){var kt=He.call(this,Le,Ve||'<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 kt.styles=[],kt.styleBoxes=[],kt.styles=Ke,kt.currentStyle=dt,kt.setCurrentStyle=kt.setCurrentStyle.bind(kt),kt}return ce(De,He),De.prototype.getUi=function(){var Le=this,Ke=document.createElement("div");return Ke.style.display="flex",Ke.style.overflow="hidden",Ke.style.flexGrow="2",this.styles.forEach(function(dt){var Ve=document.createElement("div");Ve.style.display="flex",Ve.style.alignItems="center",Ve.style.justifyContent="space-between",Ve.style.padding="5px",Ve.style.borderWidth="2px",Ve.style.borderStyle="solid",Ve.style.overflow="hidden",Ve.style.maxWidth=100/Le.styles.length-5+"%",Ve.style.borderColor=dt===Le.currentStyle?Le.uiStyleSettings.toolboxAccentColor:"transparent",Ve.addEventListener("click",function(){Le.setCurrentStyle(dt,Ve)}),Ke.appendChild(Ve);var kt=document.createElement("div");kt.style.minHeight="20px",kt.style.flexGrow="2",kt.style.overflow="hidden";var zt=`<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>`;kt.innerHTML=zt,Ve.appendChild(kt),Le.styleBoxes.push(Ve)}),Ke},De.prototype.setCurrentStyle=function(Le,Ke){var dt=this;this.currentStyle=Le,this.styleBoxes.forEach(function(Ve){Ve.style.borderColor=Ve===Ke?dt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},De}(ue),Ye=function(He){function De(Le,Ke,dt){var Ve=He.call(this,Le,Ke,dt)||this;return Ve.strokeColor=dt.defaultColor,Ve.strokeWidth=dt.defaultStrokeWidth,Ve.strokeDasharray=dt.defaultStrokeDasharray,Ve.strokePanel=new pe("Line color",dt.defaultColorSet,dt.defaultColor),Ve.strokePanel.onColorChanged=Ve.setStrokeColor,Ve.strokeWidthPanel=new Fe("Line width",dt.defaultStrokeWidths,dt.defaultStrokeWidth),Ve.strokeWidthPanel.onWidthChanged=Ve.setStrokeWidth,Ve.strokeStylePanel=new Re("Line style",dt.defaultStrokeDasharrays,dt.defaultStrokeDasharray),Ve.strokeStylePanel.onStyleChanged=Ve.setStrokeDasharray,Ve}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"},Ze=function(He){function De(Le,Ke,dt){var Ve=He.call(this,Le,Ke,dt)||this;return Ve.x1=0,Ve.y1=0,Ve.x2=0,Ve.y2=0,Ve.defaultLength=50,Ve.manipulationStartX=0,Ve.manipulationStartY=0,Ve.manipulationStartX1=0,Ve.manipulationStartY1=0,Ve.manipulationStartX2=0,Ve.manipulationStartY2=0,Ve.setupControlBox(),Ve}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,Ke){He.prototype.pointerDown.call(this,Le,Ke),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(Ke)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Ke)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},De.prototype.pointerUp=function(Le){var Ke=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",Ke==="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,Ke,dt){var Ve=Le.transform.baseVal.getItem(0);Ve.setTranslate(Ke,dt),Le.transform.baseVal.replaceItem(Ve,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 Ke=Le;this.x1=Ke.x1,this.y1=Ke.y1,this.x2=Ke.x2,this.y2=Ke.y2},De.prototype.scale=function(Le,Ke){He.prototype.scale.call(this,Le,Ke),this.x1=this.x1*Le,this.y1=this.y1*Ke,this.x2=this.x2*Le,this.y2=this.y2*Ke,this.adjustVisual(),this.adjustControlBox()},De}(Ee),at=function(He){function De(Le,Ke,dt){var Ve=He.call(this,Le,Ke,dt)||this;return Ve.strokeColor="transparent",Ve.strokeWidth=0,Ve.strokeDasharray="",Ve.setStrokeColor=Ve.setStrokeColor.bind(Ve),Ve.setStrokeWidth=Ve.setStrokeWidth.bind(Ve),Ve.setStrokeDasharray=Ve.setStrokeDasharray.bind(Ve),Ve.strokeColor=dt.defaultColor,Ve.strokeWidth=dt.defaultStrokeWidth,Ve.strokeDasharray=dt.defaultStrokeDasharray,Ve.strokePanel=new pe("Line color",dt.defaultColorSet,dt.defaultColor),Ve.strokePanel.onColorChanged=Ve.setStrokeColor,Ve.strokeWidthPanel=new Fe("Line width",dt.defaultStrokeWidths,dt.defaultStrokeWidth),Ve.strokeWidthPanel.onWidthChanged=Ve.setStrokeWidth,Ve.strokeStylePanel=new Re("Line style",dt.defaultStrokeDasharrays,dt.defaultStrokeDasharray),Ve.strokeStylePanel.onStyleChanged=Ve.setStrokeDasharray,Ve}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,Ke){He.prototype.pointerDown.call(this,Le,Ke),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 Ke=Le;this.strokeColor=Ke.strokeColor,this.strokeWidth=Ke.strokeWidth,this.strokeDasharray=Ke.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}(Ze),ht=function(He){function De(Le,Ke,dt,Ve){var kt=He.call(this,Le,Ve||'<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 kt.fonts=[],kt.fontBoxes=[],kt.fonts=Ke,kt.currentFont=dt,kt.setCurrentFont=kt.setCurrentFont.bind(kt),kt}return ce(De,He),De.prototype.getUi=function(){var Le=this,Ke=document.createElement("div");return Ke.style.overflow="hidden",Ke.style.flexGrow="2",this.fonts.forEach(function(dt){var Ve=document.createElement("div");Ve.style.display="inline-block",Ve.style.alignItems="center",Ve.style.justifyContent="space-between",Ve.style.padding="5px",Ve.style.borderWidth="2px",Ve.style.borderStyle="solid",Ve.style.overflow="hidden",Ve.style.maxWidth=100/Le.fonts.length-5+"%",Ve.style.borderColor=dt===Le.currentFont?Le.uiStyleSettings.toolboxAccentColor:"transparent",Ve.addEventListener("click",function(){Le.setCurrentFont(dt,Ve)}),Ke.appendChild(Ve);var kt=document.createElement("div");kt.style.display="flex",kt.style.minHeight="20px",kt.style.flexGrow="2",kt.style.fontFamily=dt,kt.style.overflow="hidden";var zt=document.createElement("div");zt.style.whiteSpace="nowrap",zt.style.overflow="hidden",zt.style.textOverflow="ellipsis",zt.innerHTML="The quick brown fox jumps over the lazy dog",kt.appendChild(zt),Ve.appendChild(kt),Le.fontBoxes.push(Ve)}),Ke},De.prototype.setCurrentFont=function(Le,Ke){var dt=this;this.currentFont=Le,this.fontBoxes.forEach(function(Ve){Ve.style.borderColor=Ve===Ke?dt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},De}(ue),pt=function(He){function De(Le,Ke,dt){var Ve=He.call(this,Le,Ke,dt)||this;return Ve.color="transparent",Ve.padding=5,Ve.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Ve.text=Ve.DEFAULT_TEXT,Ve.isMoved=!1,Ve.color=dt.defaultColor,Ve.fontFamily=dt.defaultFontFamily,Ve.defaultSize={x:100,y:30},Ve.setColor=Ve.setColor.bind(Ve),Ve.setFont=Ve.setFont.bind(Ve),Ve.renderText=Ve.renderText.bind(Ve),Ve.sizeText=Ve.sizeText.bind(Ve),Ve.textEditDivClicked=Ve.textEditDivClicked.bind(Ve),Ve.showTextEditor=Ve.showTextEditor.bind(Ve),Ve.setSize=Ve.setSize.bind(Ve),Ve.positionTextEditor=Ve.positionTextEditor.bind(Ve),Ve.colorPanel=new pe("Color",dt.defaultColorSet,dt.defaultColor),Ve.colorPanel.onColorChanged=Ve.setColor,Ve.fontFamilyPanel=new ht("Font",dt.defaultFontFamilies,dt.defaultFontFamily),Ve.fontFamilyPanel.onFontChanged=Ve.setFont,Ve}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 Ke=!1;return this.textElement.childNodes.forEach(function(dt){dt===Le&&(Ke=!0)}),Ke},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,Ke){He.prototype.pointerDown.call(this,Le,Ke),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(Ke){Le.textElement.appendChild(we.createTSpan(Ke.trim()===""?" ":Ke.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},De.prototype.getTextScale=function(){var Le=this.textElement.getBBox(),Ke=1;if(Le.width>0&&Le.height>0){var dt=(1*this.width-this.width*this.padding*2/100)/Le.width,Ve=(1*this.height-this.height*this.padding*2/100)/Le.height;Ke=Math.min(dt,Ve)}return Ke},De.prototype.getTextPosition=function(Le){var Ke=this.textElement.getBBox(),dt=0,Ve=0;return Ke.width>0&&Ke.height>0&&(dt=(this.width-Ke.width*Le)/2,Ve=this.height/2-Ke.height*Le/2),{x:dt,y:Ve}},De.prototype.sizeText=function(){var Le=this.textElement.getBBox(),Ke=this.getTextScale(),dt=this.getTextPosition(Ke);dt.y-=Le.y*Ke,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+dt.x+"px, "+dt.y+"px) scale("+Ke+", "+Ke+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(dt.x,dt.y),this.textElement.transform.baseVal.getItem(1).setScale(Ke,Ke))},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 Ke=this.state;Ke==="creating"&&(this._suppressMarkerCreateEvent=!0),He.prototype.pointerUp.call(this,Le),this.setSize(),(Ke==="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(Ke){Ke.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Ke=Number.parseFloat(Le.textEditor.style.fontSize);Le.textEditor.clientWidth>=Number.parseInt(Le.textEditor.style.maxWidth)&&Ke>.9;)Ke-=.1,Le.textEditor.style.fontSize=Math.max(Ke,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Ke){Ke.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Ke){if(Ke.clipboardData){var dt=Ke.clipboardData.getData("text"),Ve=window.getSelection();if(!Ve.rangeCount)return!1;Ve.deleteFromDocument(),Ve.getRangeAt(0).insertNode(document.createTextNode(dt)),Ke.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(),Ke=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),dt=this.textElement.getBBox(),Ve={x:dt.width*Le,y:dt.height*Le};Ke.x-=Ve.x/2,Ke.y-=Ve.y/2,this.textEditor.style.top=Ke.y+"px",this.textEditor.style.left=Ke.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Ke.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,Ke){He.prototype.dblClick.call(this,Le,Ke),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 Ke=Le;this.color=Ke.color,this.fontFamily=Ke.fontFamily,this.padding=Ke.padding,this.text=Ke.text,this.createVisual(),He.prototype.restoreState.call(this,Le),this.setSize()},De.prototype.scale=function(Le,Ke){He.prototype.scale.call(this,Le,Ke),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}(Ne),Mt=function(He){function De(Le,Ke,dt){var Ve=He.call(this,Le,Ke,dt)||this;return Ve.color="transparent",Ve.lineWidth=3,Ve.drawing=!1,Ve.pixelRatio=1,Ve.color=dt.defaultColor,Ve.lineWidth=dt.defaultStrokeWidth,Ve.pixelRatio=dt.freehandPixelRatio,Ve.setColor=Ve.setColor.bind(Ve),Ve.addCanvas=Ve.addCanvas.bind(Ve),Ve.finishCreation=Ve.finishCreation.bind(Ve),Ve.setLineWidth=Ve.setLineWidth.bind(Ve),Ve.colorPanel=new pe("Color",dt.defaultColorSet,dt.defaultColor),Ve.colorPanel.onColorChanged=Ve.setColor,Ve.lineWidthPanel=new Fe("Line width",dt.defaultStrokeWidths,dt.defaultStrokeWidth),Ve.lineWidthPanel.onWidthChanged=Ve.setLineWidth,Ve}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,Ke){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,Ke)},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),Ke=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],dt=Ke[0],Ve=Ke[1],kt=Ke[2],zt=Ke[3],Xt=!1,At=0;At<this.canvasElement.height;At++)for(var Nt=0;Nt<this.canvasElement.width;Nt++)Le.data[At*this.canvasElement.width*4+4*Nt+3]>0&&(Xt=!0,At<Ve&&(Ve=At),Nt<dt&&(dt=Nt),At>zt&&(zt=At),Nt>kt&&(kt=Nt));if(Xt){this.left=dt/this.pixelRatio,this.top=Ve/this.pixelRatio,this.width=(kt-dt)/this.pixelRatio,this.height=(zt-Ve)/this.pixelRatio;var qt=document.createElement("canvas");qt.width=kt-dt,qt.height=zt-Ve,qt.getContext("2d").putImageData(this.canvasContext.getImageData(dt,Ve,kt-dt,zt-Ve),0,0),this.drawingImgUrl=qt.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,Ke){He.prototype.scale.call(this,Le,Ke),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}(Ne),et=function(He){function De(Le,Ke,dt){var Ve=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 Ve.typeBoxes=[],Ve.currentType=Ke,Ve.setCurrentType=Ve.setCurrentType.bind(Ve),Ve}return ce(De,He),De.prototype.getUi=function(){var Le=this,Ke=document.createElement("div");Ke.style.display="flex",Ke.style.overflow="hidden",Ke.style.flexGrow="2";for(var dt=function(zt){var Xt="both";switch(zt){case 0:Xt="both";break;case 1:Xt="start";break;case 2:Xt="end";break;case 3:Xt="none"}var At=document.createElement("div");if(At.style.display="flex",At.style.flexGrow="2",At.style.alignItems="center",At.style.justifyContent="space-between",At.style.padding="5px",At.style.borderWidth="2px",At.style.borderStyle="solid",At.style.borderColor=Xt===Ve.currentType?Ve.uiStyleSettings.toolboxAccentColor:"transparent",At.addEventListener("click",function(){Le.setCurrentType(Xt,At)}),Ke.appendChild(At),Xt==="both"||Xt==="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="`+(Ve.uiStyleSettings!==void 0?Ve.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Nt.style.marginLeft="5px",At.appendChild(Nt)}var qt=document.createElement("div");qt.style.display="flex",qt.style.alignItems="center",qt.style.minHeight="20px",qt.style.flexGrow="2";var on=document.createElement("hr");if(on.style.minWidth="20px",on.style.border="0px",on.style.borderTop="3px solid "+(Ve.uiStyleSettings!==void 0?Ve.uiStyleSettings.toolboxColor:"#eeeeee"),on.style.flexGrow="2",qt.appendChild(on),At.appendChild(qt),Xt==="both"||Xt==="end"){var gn=document.createElement("div");gn.style.display="flex",gn.style.alignItems="center",gn.style.minHeight="20px",gn.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,0 10,5 0,10" fill="`+(Ve.uiStyleSettings!==void 0?Ve.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,gn.style.marginRight="5px",At.appendChild(gn)}Ve.typeBoxes.push(At)},Ve=this,kt=0;kt<4;kt++)dt(kt);return Ke},De.prototype.setCurrentType=function(Le,Ke){var dt=this;this.currentType=Le,this.typeBoxes.forEach(function(Ve){Ve.style.borderColor=Ve===Ke?dt.uiStyleSettings!==void 0?dt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},De}(ue),ot=function(He){function De(Le,Ke,dt){var Ve=He.call(this,Le,Ke,dt)||this;return Ve.arrowType="end",Ve.arrowBaseHeight=10,Ve.arrowBaseWidth=10,Ve.getArrowPoints=Ve.getArrowPoints.bind(Ve),Ve.setArrowType=Ve.setArrowType.bind(Ve),Ve.arrowTypePanel=new et("Arrow type","end"),Ve.arrowTypePanel.onArrowTypeChanged=Ve.setArrowType,Ve}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,Ke){var dt=this.arrowBaseWidth+2*this.strokeWidth,Ve=this.arrowBaseHeight+2*this.strokeWidth;return Le-dt/2+","+(Ke+Ve/2)+" "+Le+","+(Ke-Ve/2)+" "+(Le+dt/2)+","+(Ke+Ve/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,Ke){He.prototype.pointerDown.call(this,Le,Ke),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 Ke=this.arrow1.transform.baseVal.getItem(0);Ke.setRotate(Le,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Ke,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 Ke=Le;this.arrowType=Ke.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}(at),wt=function(He){function De(Le,Ke,dt){var Ve=He.call(this,Le,Ke,dt)||this;return Ve.fillColor=dt.defaultFillColor,Ve.strokeWidth=0,Ve.fillPanel=new pe("Color",dt.defaultColorSet,dt.defaultFillColor),Ve.fillPanel.onColorChanged=Ve.setFillColor,Ve}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,Ke,dt,Ve){var kt=He.call(this,Le,Ve||'<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 kt.opacities=[],kt.opacityBoxes=[],kt.opacities=Ke,kt.currentOpacity=dt,kt.setCurrentOpacity=kt.setCurrentOpacity.bind(kt),kt}return ce(De,He),De.prototype.getUi=function(){var Le=this,Ke=document.createElement("div");return Ke.style.display="flex",Ke.style.overflow="hidden",Ke.style.flexGrow="2",Ke.style.justifyContent="space-between",this.opacities.forEach(function(dt){var Ve=document.createElement("div");Ve.style.display="flex",Ve.style.alignItems="center",Ve.style.justifyContent="center",Ve.style.padding="5px",Ve.style.borderWidth="2px",Ve.style.borderStyle="solid",Ve.style.borderColor=dt===Le.currentOpacity?Le.uiStyleSettings.toolboxAccentColor:"transparent",Ve.addEventListener("click",function(){Le.setCurrentOpacity(dt,Ve)}),Ke.appendChild(Ve);var kt=document.createElement("div");kt.innerText=100*dt+"%",Ve.appendChild(kt),Le.opacityBoxes.push(Ve)}),Ke},De.prototype.setCurrentOpacity=function(Le,Ke){var dt=this;this.currentOpacity=Le,this.opacityBoxes.forEach(function(Ve){Ve.style.borderColor=Ve===Ke?dt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},De}(ue),Tt=function(He){function De(Le,Ke,dt){var Ve=He.call(this,Le,Ke,dt)||this;return Ve.setOpacity=Ve.setOpacity.bind(Ve),Ve.fillColor=dt.defaultHighlightColor,Ve.strokeWidth=0,Ve.opacity=dt.defaultHighlightOpacity,Ve.fillPanel=new pe("Color",dt.defaultColorSet,Ve.fillColor),Ve.fillPanel.onColorChanged=Ve.setFillColor,Ve.opacityPanel=new Et("Opacity",dt.defaultOpacitySteps,Ve.opacity),Ve.opacityPanel.onOpacityChanged=Ve.setOpacity,Ve}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}(wt),vt='<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>',gt='<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>',yt=function(He){function De(Le,Ke,dt){var Ve=He.call(this,Le,Ke,dt)||this;return Ve.bgColor="transparent",Ve.tipPosition={x:0,y:0},Ve.tipBase1Position={x:0,y:0},Ve.tipBase2Position={x:0,y:0},Ve.tipMoving=!1,Ve.color=dt.defaultStrokeColor,Ve.bgColor=dt.defaultFillColor,Ve.fontFamily=dt.defaultFontFamily,Ve.defaultSize={x:100,y:30},Ve.setBgColor=Ve.setBgColor.bind(Ve),Ve.getTipPoints=Ve.getTipPoints.bind(Ve),Ve.positionTip=Ve.positionTip.bind(Ve),Ve.setTipPoints=Ve.setTipPoints.bind(Ve),Ve.colorPanel=new pe("Text color",dt.defaultColorSet,Ve.color,vt),Ve.colorPanel.onColorChanged=Ve.setColor,Ve.bgColorPanel=new pe("Fill color",dt.defaultColorSet,Ve.bgColor,gt),Ve.bgColorPanel.onColorChanged=Ve.setBgColor,Ve.fontFamilyPanel=new ht("Font",dt.defaultFontFamilies,dt.defaultFontFamily),Ve.fontFamilyPanel.onFontChanged=Ve.setFont,Ve.tipGrip=new Ie,Ve.tipGrip.visual.transform.baseVal.appendItem(we.createTransform()),Ve.controlBox.appendChild(Ve.tipGrip.visual),Ve}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,Ke){this.state==="new"&&He.prototype.pointerDown.call(this,Le,Ke),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Ke)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):He.prototype.pointerDown.call(this,Le,Ke)},De.prototype.pointerUp=function(Le){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,He.prototype.pointerUp.call(this,Le);else{var Ke=this.state==="creating";He.prototype.pointerUp.call(this,Le),this.setTipPoints(Ke),this.positionTip()}},De.prototype.manipulate=function(Le){if(this.tipMoving){var Ke=this.unrotatePoint(Le);this.tipPosition={x:Ke.x-this.manipulationStartLeft,y:Ke.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 Ke=Math.min(this.height/2,15),dt=this.height/5;Le&&(this.tipPosition={x:Ke+dt/2,y:this.height+20});var Ve=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Ve<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(dt=this.width/5,Ke=Math.min(this.width/2,15),this.tipBase1Position={x:Ke,y:0},this.tipBase2Position={x:Ke+dt,y:0}):(this.tipBase1Position={x:0,y:Ke},this.tipBase2Position={x:0,y:Ke+dt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Ve<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(dt=this.width/5,Ke=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Ke-dt,y:0},this.tipBase2Position={x:this.width-Ke,y:0}):(this.tipBase1Position={x:this.width,y:Ke},this.tipBase2Position={x:this.width,y:Ke+dt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Ve<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(dt=this.width/5,Ke=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Ke-dt,y:this.height},this.tipBase2Position={x:this.width-Ke,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Ke-dt},this.tipBase2Position={x:this.width,y:this.height-Ke}):Ve<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(dt=this.width/5,Ke=Math.min(this.width/2,15),this.tipBase1Position={x:Ke,y:this.height},this.tipBase2Position={x:Ke+dt,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Ke},this.tipBase2Position={x:0,y:this.height-Ke-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 Ke=Le;this.bgColor=Ke.bgColor,this.tipPosition=Ke.tipPosition,He.prototype.restoreState.call(this,Le),this.createTip(),this.setTipPoints()},De.prototype.scale=function(Le,Ke){He.prototype.scale.call(this,Le,Ke),this.tipPosition={x:this.tipPosition.x*Le,y:this.tipPosition.y*Ke},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}(pt),It=function(He){function De(Le,Ke,dt){var Ve=He.call(this,Le,Ke,dt)||this;return Ve.fillColor="transparent",Ve.strokeColor="transparent",Ve.strokeWidth=0,Ve.strokeDasharray="",Ve.opacity=1,Ve.strokeColor=dt.defaultColor,Ve.strokeWidth=dt.defaultStrokeWidth,Ve.strokeDasharray=dt.defaultStrokeDasharray,Ve.fillColor=dt.defaultFillColor,Ve.setStrokeColor=Ve.setStrokeColor.bind(Ve),Ve.setFillColor=Ve.setFillColor.bind(Ve),Ve.setStrokeWidth=Ve.setStrokeWidth.bind(Ve),Ve.setStrokeDasharray=Ve.setStrokeDasharray.bind(Ve),Ve.setOpacity=Ve.setOpacity.bind(Ve),Ve.createVisual=Ve.createVisual.bind(Ve),Ve.strokePanel=new pe("Line color",ye(dt.defaultColorSet,["transparent"]),dt.defaultColor),Ve.strokePanel.onColorChanged=Ve.setStrokeColor,Ve.fillPanel=new pe("Fill color",ye(dt.defaultColorSet,["transparent"]),Ve.fillColor,gt),Ve.fillPanel.onColorChanged=Ve.setFillColor,Ve.strokeWidthPanel=new Fe("Line width",dt.defaultStrokeWidths,dt.defaultStrokeWidth),Ve.strokeWidthPanel.onWidthChanged=Ve.setStrokeWidth,Ve.strokeStylePanel=new Re("Line style",dt.defaultStrokeDasharrays,dt.defaultStrokeDasharray),Ve.strokeStylePanel.onStyleChanged=Ve.setStrokeDasharray,Ve.opacityPanel=new Et("Opacity",dt.defaultOpacitySteps,Ve.opacity),Ve.opacityPanel.onOpacityChanged=Ve.setOpacity,Ve}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,Ke){He.prototype.pointerDown.call(this,Le,Ke),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 Ke=Le;this.fillColor=Ke.fillColor,this.strokeColor=Ke.strokeColor,this.strokeWidth=Ke.strokeWidth,this.strokeDasharray=Ke.strokeDasharray,this.opacity=Ke.opacity,this.createVisual(),He.prototype.restoreState.call(this,Le),this.setSize()},De.prototype.scale=function(Le,Ke){He.prototype.scale.call(this,Le,Ke),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}(Ne),Ot=function(He){function De(Le,Ke,dt){return He.call(this,Le,Ke,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,Ke){He.prototype.pointerDown.call(this,Le,Ke),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),Ke=this.tip1.transform.baseVal.getItem(0);Ke.setRotate(Le,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Ke,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}(at),Vt=function(He){function De(Le,Ke,dt){var Ve=He.call(this,Le,Ke,dt)||this;return Ve.strokePanel.colors=dt.defaultColorSet,Ve.fillColor="transparent",Ve}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}(It),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}(),mt=function(He){function De(Le,Ke,dt){var Ve=He.call(this,Le,Ke,dt)||this;return Ve.strokeColor="transparent",Ve.strokeWidth=0,Ve.strokeDasharray="",Ve.curveX=0,Ve.curveY=0,Ve.manipulationStartCurveX=0,Ve.manipulationStartCurveY=0,Ve.setStrokeColor=Ve.setStrokeColor.bind(Ve),Ve.setStrokeWidth=Ve.setStrokeWidth.bind(Ve),Ve.setStrokeDasharray=Ve.setStrokeDasharray.bind(Ve),Ve.positionGrips=Ve.positionGrips.bind(Ve),Ve.addControlGrips=Ve.addControlGrips.bind(Ve),Ve.adjustVisual=Ve.adjustVisual.bind(Ve),Ve.setupControlBox=Ve.setupControlBox.bind(Ve),Ve.resize=Ve.resize.bind(Ve),Ve.strokeColor=dt.defaultColor,Ve.strokeWidth=dt.defaultStrokeWidth,Ve.strokeDasharray=dt.defaultStrokeDasharray,Ve.strokePanel=new pe("Line color",dt.defaultColorSet,dt.defaultColor),Ve.strokePanel.onColorChanged=Ve.setStrokeColor,Ve.strokeWidthPanel=new Fe("Line width",dt.defaultStrokeWidths,dt.defaultStrokeWidth),Ve.strokeWidthPanel.onWidthChanged=Ve.setStrokeWidth,Ve.strokeStylePanel=new Re("Line style",dt.defaultStrokeDasharrays,dt.defaultStrokeDasharray),Ve.strokeStylePanel.onStyleChanged=Ve.setStrokeDasharray,Ve}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,Ke){He.prototype.pointerDown.call(this,Le,Ke),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(Ke)&&(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,Ke){this.curveX=this.curveX*Le,this.curveY=this.curveY*Ke,He.prototype.scale.call(this,Le,Ke)},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 Ke=Le;this.strokeColor=Ke.strokeColor,this.strokeWidth=Ke.strokeWidth,this.strokeDasharray=Ke.strokeDasharray,this.curveX=Ke.curveX,this.curveY=Ke.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}(Ze),nt=function(He){function De(Le,Ke,dt){var Ve=He.call(this,Le,Ke,dt)||this;return Ve.fillColor="transparent",Ve.strokeColor="transparent",Ve.strokeWidth=0,Ve.strokeDasharray="",Ve.textColor="transparent",Ve.fontSize="1rem",Ve.isMoved=!1,Ve.captionText="Caption",Ve.PADDING=5,Ve.captionBoxWidth=0,Ve.captionBoxHeight=0,Ve.strokeColor=dt.defaultColor,Ve.strokeWidth=dt.defaultStrokeWidth,Ve.strokeDasharray=dt.defaultStrokeDasharray,Ve.fillColor=dt.defaultFillColor,Ve.textColor=dt.defaultStrokeColor,Ve.fontFamily=dt.defaultFontFamily,Ve.fontSize=dt.defaultCaptionFontSize,Ve.captionText=dt.defaultCaptionText,Ve.setStrokeColor=Ve.setStrokeColor.bind(Ve),Ve.setFillColor=Ve.setFillColor.bind(Ve),Ve.setStrokeWidth=Ve.setStrokeWidth.bind(Ve),Ve.setStrokeDasharray=Ve.setStrokeDasharray.bind(Ve),Ve.createVisual=Ve.createVisual.bind(Ve),Ve.sizeCaption=Ve.sizeCaption.bind(Ve),Ve.setCaptionText=Ve.setCaptionText.bind(Ve),Ve.showTextEditor=Ve.showTextEditor.bind(Ve),Ve.positionTextEditor=Ve.positionTextEditor.bind(Ve),Ve.finishTextEditing=Ve.finishTextEditing.bind(Ve),Ve.setFont=Ve.setFont.bind(Ve),Ve.setTextColor=Ve.setTextColor.bind(Ve),Ve.strokePanel=new pe("Line color",ye(dt.defaultColorSet,["transparent"]),Ve.strokeColor),Ve.strokePanel.onColorChanged=Ve.setStrokeColor,Ve.fillPanel=new pe("Fill color",ye(dt.defaultColorSet,["transparent"]),Ve.fillColor,gt),Ve.fillPanel.onColorChanged=Ve.setFillColor,Ve.strokeWidthPanel=new Fe("Line width",dt.defaultStrokeWidths,dt.defaultStrokeWidth),Ve.strokeWidthPanel.onWidthChanged=Ve.setStrokeWidth,Ve.strokeStylePanel=new Re("Line style",dt.defaultStrokeDasharrays,dt.defaultStrokeDasharray),Ve.strokeStylePanel.onStyleChanged=Ve.setStrokeDasharray,Ve.fontFamilyPanel=new ht("Font",dt.defaultFontFamilies,dt.defaultFontFamily),Ve.fontFamilyPanel.onFontChanged=Ve.setFont,Ve.textColorPanel=new pe("Text color",dt.defaultColorSet,Ve.textColor,vt),Ve.textColorPanel.onColorChanged=Ve.setTextColor,Ve}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,Ke){He.prototype.pointerDown.call(this,Le,Ke),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(Ke){Ke.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Ke){Ke.key==="Enter"&&Le.finishTextEditing(Le.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Ke){Ke.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,Ke){He.prototype.dblClick.call(this,Le,Ke),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 Ke=Le;this.fillColor=Ke.fillColor,this.strokeColor=Ke.strokeColor,this.strokeWidth=Ke.strokeWidth,this.strokeDasharray=Ke.strokeDasharray,this.textColor=Ke.textColor,this.fontFamily=Ke.fontFamily,this.captionText=Ke.captionText,this.fontSize=Ke.fontSize,this.createVisual(),He.prototype.restoreState.call(this,Le),this.setSize()},De.prototype.scale=function(Le,Ke){He.prototype.scale.call(this,Le,Ke),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}(Ne),ft=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}(),Xe=function(He){function De(Le,Ke,dt){var Ve=He.call(this,Le,!1)||this;return Ve.dataUrl=Ke,Ve.state=dt,Ve}return ce(De,He),De}(ft),ut=function(He){function De(Le,Ke,dt){dt===void 0&&(dt=!1);var Ve=He.call(this,Le,dt)||this;return Ve.marker=Ke,Ve}return ce(De,He),De}(ft),bt=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 Ke=this[De].indexOf(Le);Ke>-1&&this[De].splice(Ke,1)},He}(),St=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 bt,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,Mt,ot,pt,Vt,It,Tt,yt,Ot,wt,at,mt,nt]},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ye,Mt,ot,pt,It,Tt,yt]},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ye,Mt,ot,pt,Tt]},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(Ke){if(typeof Ke=="string"){var dt=Le.ALL_MARKER_TYPES.find(function(Ve){return Ve.typeName===Ke});dt!==void 0&&Le._availableMarkerTypes.push(dt)}else Le._availableMarkerTypes.push(Ke)})},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 ft(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 Ke=!1;De||this.eventListeners.beforeclose.forEach(function(dt){var Ve=new ft(Le,!0);dt(Ve),Ve.defaultPrevented&&(Ke=!0)}),Ke||(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 ft(Le))}),this.detachEvents(),this._isOpen=!1)}},He.prototype.addMarkersToToolbar=function(){for(var De,Le=[],Ke=0;Ke<arguments.length;Ke++)Le[Ke]=arguments[Ke];(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,Ke=Le<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/De;this.resize(Le,Ke)},He.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},He.prototype.resize=function(De,Le){this._isResizing=!0;var Ke=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(Ke,dt),this._isResizing=!1},He.prototype.scaleMarkers=function(De,Le){var Ke,dt=this;this._currentMarker&&this._currentMarker instanceof pt?this._currentMarker.scale(De,Le):(Ke=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Ve){Ve!==dt._currentMarker&&Ve.scale(De,Le)}),Ke!==void 0&&this.setCurrentMarker(Ke)},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=[],Ke=0;Ke<arguments.length;Ke++)Le[Ke]=arguments[Ke];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 Ve=new ut(De,De._currentMarker,!0);dt(Ve),Ve.defaultPrevented&&(Le=!0)}),!Le){var Ke=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,Ke))})}}},He.prototype.clear=function(){var De=this,Le=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(kt){var zt=new ut(De,void 0,!0);kt(zt),zt.defaultPrevented&&(Le=!0)}),!Le)){this.setCurrentMarker();for(var Ke=function(kt){var zt=dt.markers[kt];dt.setCurrentMarker(dt.markers[kt]),dt._currentMarker.dispose(),dt.markerImage.removeChild(dt._currentMarker.container),dt.markers.splice(dt.markers.indexOf(dt._currentMarker),1),dt.eventListeners.markerdelete.forEach(function(Xt){return Xt(new ut(De,zt))})},dt=this,Ve=this.markers.length-1;Ve>=0;Ve--)Ke(Ve);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(),Ke=this.undoRedoManager.getLastUndoStep();if(!Ke||Ke.width===Le.width&&Ke.height===Le.height){var dt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Le),dt<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Ve){return Ve(new ft(De))})}else this.undoRedoManager.replaceLastUndoStep(Le),this.eventListeners.statechange.forEach(function(Ve){return Ve(new ft(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(Ke){return Ke(new ft(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(Ke){return Ke(new ft(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,Ke=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(Ve){return Ve(new Xe(Ke,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(Ke){return Le.markers.push(Ke.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(Ke){var dt=Le._availableMarkerTypes.find(function(kt){return kt.typeName===Ke.typeName});if(dt!==void 0){var Ve=Le.addNewMarker(dt);Ve.restoreState(Ke),Le.markers.push(Ve)}}),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(Ke){return Ke(new ft(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,Ke=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(Ke,Ke._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 Mt&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Mt):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Ke){return Ke(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(Ke){return Ke(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(Ke){return Ke(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(Ke){return Ke(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(Ke){return Ke.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(Ke){return Ke.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 Ke=this.markerImage.getBoundingClientRect();return{x:(De-Ke.left)/this.zoomLevel,y:(Le-Ke.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 ft(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 ft(De))}))},He.instanceCounter=0,He}(),lt=$e(99064),Qe=$e(955),Ue=(He,De,Le)=>new Promise((Ke,dt)=>{var Ve=Xt=>{try{zt(Le.next(Xt))}catch(At){dt(At)}},kt=Xt=>{try{zt(Le.throw(Xt))}catch(At){dt(At)}},zt=Xt=>Xt.done?Ke(Xt.value):Promise.resolve(Xt.value).then(Ve,kt);zt((Le=Le.apply(He,De)).next())}),qe=({data:He,className:De,fullWidth:Le,style:Ke={},onClose:dt,onOk:Ve,showFullTools:kt,noAssociationId:zt})=>{const Xt=(0,it.useRef)(null),At=(0,it.useRef)(null),Nt=(0,it.useRef)(null),qt=(0,it.useRef)(null),[on,gn]=(0,it.useState)(!1),[kn,Kn]=(0,it.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,it.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)),()=>{document.body.removeAttribute("data-custom"),Nt.current&&(document.head.removeChild(Nt.current),Nt.current=null)}),[He==null?void 0:He.visible]);const Xn=()=>Ue(void 0,null,function*(){gn(!0),Kn("\u6B63\u5728\u52A0\u8F7D\u4E2D");const xr=yield(0,Qe.ZJ)(He==null?void 0:He.src);Xt.current.src="",Xt.current.src=xr,Xt.current.onload=function(){fr()},gn(!1),Kn("")}),hr=xr=>Ue(void 0,null,function*(){gn(!0),Kn("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Hr=yield(0,lt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:He.title,file:xr.dataUrl}});Hr!=null&&Hr.id&&!zt?(yield(0,lt.ZP)(`/api/attachments/${He.id}/add_subitem.json`,{method:"post",body:{subitem_id:Hr==null?void 0:Hr.id,settings:JSON.stringify(xr.state)}})).status===0&&Ve():Hr!=null&&Hr.id&&Ve(Hr),gn(!1),Kn("")}),dr=()=>{const xr=document.querySelector('a[href="https://markerjs.com/"]');xr&&xr.parentNode&&(xr.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(Yr=>{const Or=document.querySelector(Yr.name);Or&&Or.setAttribute("title",Yr.title)})},fr=()=>{At.current=new St(Xt.current),At.current.targetRoot=qt.current,At.current.addEventListener("render",hr),At.current.addEventListener("beforeclose",dt),kt&&(At.current.availableMarkerTypes=At.current.ALL_MARKER_TYPES,At.current.uiStyleSettings.redoButtonVisible=!0,At.current.uiStyleSettings.notesButtonVisible=!0,At.current.uiStyleSettings.zoomButtonVisible=!0,At.current.uiStyleSettings.zoomOutButtonVisible=!0,At.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=At.current.uiStyleSettings,At.current.show(),He!=null&&He.snapshotData&&At.current.restoreState(He.snapshotData),setTimeout(()=>{window.scrollTo(0,0),dr()},300)};return it.createElement(it.Fragment,null,(He==null?void 0:He.visible)&&it.createElement(je.Z,{spinning:on,tip:kn,style:{position:"absolute",width:"100vw"}},it.createElement("div",{ref:qt,className:_e()(xt.imageDimensions,De,Le?xt.fullWidth:""),style:Ke},it.createElement("img",{className:xt.img,ref:Xt}))))}},41588:function(Pn,an,$e){"use strict";var it=$e(59301),xt=$e(95237),ie=$e(43604),_e=$e(99313),je=$e(3113),ve=$e(85149),ce=$e(88010),be=$e(48136),Ce=$e(59301);const ye=(0,it.forwardRef)(({callback:we,showSaveButton:me,value:xe=""},fe)=>{const z=(0,it.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(xt.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(xt.Z,{gutter:[10,10]},Pe.data.map((ke,Ne)=>Ce.createElement(ie.Z,{key:Ne,onClick:()=>re(ke),className:ce.Z.diamond},Ce.createElement(ve.Z,{value:"`$$"+ke.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Ce.createElement(xt.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(xt.Z,{gutter:[10,10]},Pe.data.map((ke,Ne)=>Ce.createElement(ie.Z,{key:Ne,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,it.useImperativeHandle)(fe,()=>({getData:ue})),Ce.createElement("div",{className:ce.Z.mathWrap},Ce.createElement(_e.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")))});an.Z=ye},8797:function(Pn,an,$e){"use strict";var it=$e(59301),xt=$e(93314),ie=$e(3113),_e=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?_e(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,className:Ie=""})=>it.createElement("section",{className:`tc animated fadeIn ${Ie}`,style:we({color:"#999",margin:"100px auto",visibility:Pe?"hidden":"visible"},ee)},it.createElement("img",{src:fe||xt,style:me(we({},Ee),{pointerEvents:"none",userSelect:"none"})}),it.createElement("p",{className:"mt20 font14"},ae||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),re&&it.createElement(ie.ZP,we({className:ue,onClick:le},z),re),pe&&pe);an.Z=xe},23210:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return ue}});var it=$e(59301),xt={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},ie=$e(3113),_e=$e(70557),je=$e(23954),ve=$e(6848),ce=$e(955),be=$e(94941),Ce=$e(8797),ye=$e(3294),we=$e(19381),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 Ne=Re=>{try{Fe(Pe.next(Re))}catch(Ye){ke(Ye)}},Oe=Re=>{try{Fe(Pe.throw(Re))}catch(Ye){ke(Ye)}},Fe=Re=>Re.done?Ie(Re.value):Promise.resolve(Re.value).then(Ne,Oe);Fe((Pe=Pe.apply(pe,Ee)).next())}),ue=({editOffice:pe="view",data:Ee,theme:Pe,type:Ie,filename:ke,monacoEditor:Ne,className:Oe,style:Fe,close:Re,onClose:Ye,hasMask:ze,disabledDownload:Ze,onImgDimensions:at,showNodata:ht,recordInfo:pt})=>{const[Mt,et]=(0,it.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[ot,wt]=(0,it.useState)(""),[Et,Tt]=(0,it.useState)(),vt=window.ENV==="build"?"/react/build":"",gt=location.host.startsWith("localhost")?ye.Z.PROXY_SERVER:ye.Z.API_SERVER,It=10*(1024*1024),Ot=(0,it.useRef)();Ee!=null&&Ee.startsWith("/api")&&Ie!=="txt"&&(Ee=ye.Z.API_SERVER+Ee);const Vt=ft=>ft.substring(ft.lastIndexOf("/")+1).split(".").pop();ke&&Ne&&(Ne.filename=ke),(0,it.useEffect)(()=>{var ft,Xe;const ut=(Xe=(ft=document.cookie)==null?void 0:ft.replace(/\s/g,""))==null?void 0:Xe.split(";");ut==null||ut.map(bt=>{let St=bt.split("=");St[0]==="_educoder_session"&&wt(St[1])})},[]),(0,it.useEffect)(()=>{Ie==="office"&&(Ee.indexOf("bigfilescdn.")>-1||Ee.indexOf("bigfiles1")>-1?Tt({url:Ee,fileType:Vt(Ee),model:Ee.indexOf("model=edit")?"edit":"view"}):Ct())},[Ie,Ee]);const Ct=()=>le(void 0,null,function*(){console.log("data:",Ee);let ft=Ee;Ee.startsWith("http")||(ft=location.origin+ft);let Xe=new URL(ft).pathname.split("/").pop();const ut=yield(0,be.gJ)({attachment_id:Xe});ut.url=gt+ut.url,Tt(ut)}),mt=()=>{if(Ee.startsWith("http")||Ee.startsWith("blob:")){nt();return}(0,ce.Sv)(ke||"educoder",Ee,ke)},nt=()=>{pt&&(0,we.fc)({id:pt==null?void 0:pt.id,watch_type:1,course_id:pt==null?void 0:pt.course_id}),(0,ce.Nd)(ke||"educoder",decodeURIComponent(Ee))};return me.createElement("div",{style:re({},Fe||{}),className:`${ze&&xt.bgBlack} ${Ie?xt.wrp:"hide"}`},Re&&me.createElement("div",{className:xt.close,ref:Ot},!!at&&me.createElement(ve.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Ot.current},me.createElement("span",{onClick:()=>{Ye(),at()}},me.createElement("i",{className:"icon-yulanpizhu"}))),!Ze&&me.createElement(ve.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Ot.current},me.createElement("span",{onClick:nt},me.createElement("i",{className:"icon-quxiaozhiding"}))),me.createElement(ve.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Ot.current},me.createElement("span",{className:"",onClick:Ye},me.createElement("i",{className:"icon-guanbi1"})))),me.createElement("div",{className:`${xt[Oe]} ${Oe} ${xt.monaco} ${Ie==="txt"?"show":"hide"}`},Ie==="txt"&&me.createElement(me.Fragment,null,me.createElement(je.ZP,re({},Ne)))),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:`${vt}/office.html?key=${Et.key}&url=${btoa(Et.url)}&callbackUrl=${gt+(Et.callbackUrl||"")}&fileType=${Et.fileType}&title=${Et.title||""}&model=${pe}&officeServer=${ye.Z.ONLYOFFICE}&disabledDownload=${!!Ze}`}),Ie==="html"&&me.createElement("iframe",{src:Ee+"&disposition=inline"}),Ie==="pdf"&&me.createElement("iframe",{src:`${vt}/js/pdfview/index.html?filename=${ke||"educoder.pdf"}&url=${encodeURIComponent(Ee)}&disabledDownload=${!!Ze}`}),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:mt,disabled:Ze},"\u4E0B\u8F7D")}):me.createElement(ie.ZP,{type:"primary",size:"middle",onClick:mt,disabled:Ze},me.createElement(_e.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},85149:function(Pn,an,$e){"use strict";$e.d(an,{z:function(){return Ie},Z:function(){return ke}});var it=$e(59301),xt=$e(50304),ie=$e(24768),_e=$e(64018),je=$e(65157),ve=$e(3294),ce=$e(955),be=$e(15342),Ce=$e(1012),ye=$e(23210),we=$e(59301),xe=({html:Ne})=>{const Oe=(0,it.useRef)(null),Fe=(0,it.useRef)(null),Re=`.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,it.useEffect)(()=>{const Ye=Oe.current.attachShadow({mode:"open"});Fe.current=document.createElement("div"),Fe.current.className="markdown-body",Fe.current.innerHTML=Ne,Ye.appendChild(Fe.current);const ze=document.createElement("style");return ze.textContent=Re,Ye.appendChild(ze),()=>{Ye.innerHTML=""}},[]),(0,it.useEffect)(()=>{Fe.current&&(Fe.current.innerHTML=Ne)},[Ne]),we.createElement("div",{ref:Oe})},fe=Object.defineProperty,z=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable,re=(Ne,Oe,Fe)=>Oe in Ne?fe(Ne,Oe,{enumerable:!0,configurable:!0,writable:!0,value:Fe}):Ne[Oe]=Fe,le=(Ne,Oe)=>{for(var Fe in Oe||(Oe={}))ee.call(Oe,Fe)&&re(Ne,Fe,Oe[Fe]);if(z)for(var Fe of z(Oe))ae.call(Oe,Fe)&&re(Ne,Fe,Oe[Fe]);return Ne};const ue="@\u2581\u2581@",pe="@\u2581@",Ee=/<pre[^>]*>/g;function Pe(Ne){let Oe=document.createElement("div");return Oe.innerHTML=Ne,Oe.childNodes.length===0?"":Oe.childNodes[0].nodeValue}const Ie=(Ne,Oe)=>{Ne=Ne||"";const Fe=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Re=/\"(?: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?Ne.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Fe,(Ze,at,ht,pt,Mt,et,ot)=>{const wt=at||pt||et,Et=ht||Mt||ot||"?";return ve.Z.API_SERVER+"/api/attachments/"+wt+Et+"&t="+(0,ce.Jn)(wt,Date.now())+(Ze.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Ne=Ne.replace(ze,(Ze,at,ht,pt,Mt,et,ot)=>{const wt=at||pt||et,Et=ht||Mt||ot||"?";return ve.Z.API_SERVER+"/attachments/download/"+wt+Et+"&t="+(0,ce.Jn)(wt,Date.now())+(Ze.indexOf(")")>-1?")":"&")}).replace(Fe,(Ze,at,ht,pt,Mt,et,ot)=>{const wt=at||pt||et,Et=ht||Mt||ot||"?";return ve.Z.API_SERVER+"/api/attachments/"+wt+Et+"&t="+(0,ce.Jn)(wt,Date.now())+(Ze.indexOf(")")>-1?")":"&")}).replace(Re,(Ze,at,ht,pt,Mt)=>{const et=at||pt,ot=ht||Mt||"";return'"'+ve.Z.API_SERVER+"/api/attachments/"+et+ot+et+ot+"&t="+(0,ce.Jn)(et,Date.now())}).replace(Ye,(Ze,at,ht,pt,Mt)=>{const et=at||pt,ot=ht||Mt||"";return"("+ve.Z.API_SERVER+"/files/uploads/"+et+ot+et+ot+"&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,`
|
|
|
`),Ne)};var ke=({value:Ne="",className:Oe,showTextOnly:Fe,showLines:Re,style:Ye={},stylesPrev:ze={},highlightKeywords:Ze,showProgramFill:at,isProgramFill:ht,disabledFill:pt=!1,programFillValue:Mt,onFillChange:et=Et=>{},onFillBlur:ot=()=>{},onFillFocus:wt=()=>{}})=>{let Et=String(Ne);const[Tt,vt]=(0,it.useState)(""),[gt,yt]=(0,it.useState)("office"),[It,Ot]=(0,it.useState)([]),Vt=(0,it.useRef)("a"+(0,Ce.Z)()),Ct={},mt=(He,De,Le)=>{const Ke=document.createElement(He===pe?"input":"textarea");Ke.style.width="100%",Ke.style.height=He===pe?"40px":"151px",Ke.rows=5,Ke.spellcheck=!1,Ke.name="edu-program-fill",Ke.placeholder="\u8BF7\u8F93\u5165",Ke.dataset.id=De;const dt=Object.keys(Ct).length;return Ct[dt]=Ke,`<span class="edu-program-fill-wrap ${He===pe?"":"show"}" style="width:${He===pe?"400px":"100%"}" title=${Le||""}><span>${Ke.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function nt(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 ft=He=>He.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(De,Le){let Ke=Le.replace(/(\n|\r)/g,"").split("}"),dt=[];return Ke.map(Ve=>{Ve!=""&&dt.push(`.${Vt.current} ${Ve}`)}),`<style>${dt.join("}")}</style>`}),Xe=(0,it.useMemo)(()=>{try{const Ke=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,dt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Ve=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,kt=/\(\/attachments\/download\//g;Et=Et.replace(kt,"("+ve.Z.API_SERVER+"/attachments/download/").replace(Ke,"("+ve.Z.API_SERVER+"/api/attachments/").replace(dt,'"'+ve.Z.API_SERVER+"/api/attachments/").replace(Ve,'"'+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(Ke){}if(at){let Ke=-1;return Et=Et.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(dt,Ve,kt){var zt;return++Ke,mt(dt,Ke,(zt=Mt==null?void 0:Mt[Ke])==null?void 0:zt.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${ft(Et||"")}</pre>`}let He=ft(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,(Ke,dt)=>{const{type:Ve,expression:kt}=De[dt];return(0,be.renderToString)(Pe(kt)||"",{displayMode:Ve==="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(Ze){const Ke=Ze.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return lt(Le,Ke),Le.innerHTML}return setTimeout(()=>We(),500),Le.innerHTML},[Et,Ze]);(0,it.useEffect)(()=>{Qe.current&&Qe.current.querySelectorAll(["input","textarea"]).forEach(De=>{De.oninput=ut,De.onblur=bt,De.onfocus=St})},[It]),(0,it.useEffect)(()=>{var He,De,Le,Ke,dt;if(Mt!=null&&Mt.length)try{const Ve=Qe.current.querySelectorAll(".edu-program-fill-score"),kt=Qe.current.querySelectorAll('[name="edu-program-fill"]');for(const[zt,Xt]of kt.entries())Xt.value=((He=Mt==null?void 0:Mt[zt])==null?void 0:He.value)||"",((De=Mt==null?void 0:Mt[zt])==null?void 0:De.type)==="warning"?Xt.className="program-fill-warning":((Le=Mt==null?void 0:Mt[zt])==null?void 0:Le.type)==="success"?Xt.className="program-fill-success":Xt.className="";for(const[zt,Xt]of Ve.entries())Xt.innerHTML=(Ke=Mt==null?void 0:Mt[zt])!=null&&Ke.score?`${(dt=Mt==null?void 0:Mt[zt])==null?void 0:dt.score}\u5206`:"";Ot(Mt)}catch(Ve){console.log(Ve,"error")}},[Mt]);const ut=He=>{It[He.target.dataset.id]=It[He.target.dataset.id]||{},It[He.target.dataset.id].value=He.target.value,Ot([...It]),et(It,He.target.dataset.id)},bt=He=>{It[He.target.dataset.id]=It[He.target.dataset.id]||{},It[He.target.dataset.id].value=He.target.value,Ot([...It]),ot(It,He.target.dataset.id)},St=He=>{It[He.target.dataset.id]=It[He.target.dataset.id]||{},It[He.target.dataset.id].value=He.target.value,Ot([...It]),wt(It,He.target.dataset.id)};function lt(He,De){return He.childNodes.forEach(Le=>{var Ke;if(Le.childNodes.length>0)lt(Le,De);else if(Le.nodeName!=="IMG")if(Le.innerHTML)Le.innerHTML=(Ke=Le.innerHTML)==null?void 0:Ke.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,it.useRef)();ie.jb.WebkitLineClamp=Re,Re&&(Ye=le(le({},Ye),ie.jb));function Ue(He){let De=He.target;if(De.tagName.toUpperCase()==="A"){let Le=De.getAttribute("href");if(Le.indexOf("office")>-1)He.preventDefault(),vt(Le),yt("office");else if(Le.indexOf("application/pdf")>-1)He.preventDefault(),vt(Le),yt("pdf");else if(Le.indexOf("text/html")>-1)He.preventDefault(),vt(Le),yt("html");else if(Le.startsWith("#")){He.preventDefault();let Ke=document.getElementById(Le.replace("#",""));Ke&&Ke.scrollIntoView(!0)}}}const We=()=>{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 Ke=new je.ZP;Ke.loadSource(Le.src),Ke.attachMedia(Le)}}})};(0,it.useEffect)(()=>{if(Qe.current&&Xe&&Xe.match(Ee)&&window.PR.prettyPrint(),Qe.current)return Qe.current.addEventListener("click",Ue),()=>{var He;(He=Qe.current)==null||He.removeEventListener("click",Ue),(0,ie.AL)(),(0,ie.Iy)()}},[Xe,Qe.current,Ue]),(0,it.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 it.createElement(it.Fragment,null,Fe&&it.createElement("div",{ref:Qe},Xe),!Fe&&!qe(Xe)&&it.createElement("div",{ref:Qe,style:le({},Ye),className:`${Oe||""} ${pt?"disabled-fill":""} markdown-body ${Vt.current}`,dangerouslySetInnerHTML:{__html:Xe}}),!Fe&&qe(Xe)&&it.createElement(xe,{html:Xe}),it.createElement(ye.Z,{close:!0,data:Tt,type:Tt!=null&&Tt.length?gt:"",style:le({},ze),onClose:()=>vt("")}))}},17064:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return _e}});var it=$e(59301),xt=$e(34604),ie=$e(59301),_e=({defaultX:je="40%",leftChild:ve,rightChild:ce,className:be,hideResize:Ce=!1})=>{const[ye,we]=(0,it.useState)(je),me=(0,it.useRef)();function xe(){me.current=!0}(0,it.useEffect)(()=>{function ee(re){me.current&&(xt.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))}},81939:function(Pn,an,$e){"use strict";$e.d(an,{cT:function(){return Ne},pe:function(){return Pe}});var it=$e(59301),xt=$e(54580),ie=$e(8591),_e=$e(99064),je=$e(28209),ve=$e.n(je),ce=$e(1012),be=$e(89070),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,Re,Ye)=>Re in Fe?we(Fe,Re,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):Fe[Re]=Ye,re=(Fe,Re)=>{for(var Ye in Re||(Re={}))z.call(Re,Ye)&&ae(Fe,Ye,Re[Ye]);if(fe)for(var Ye of fe(Re))ee.call(Re,Ye)&&ae(Fe,Ye,Re[Ye]);return Fe},le=(Fe,Re)=>me(Fe,xe(Re)),ue=(Fe,Re)=>{var Ye={};for(var ze in Fe)z.call(Fe,ze)&&Re.indexOf(ze)<0&&(Ye[ze]=Fe[ze]);if(Fe!=null&&fe)for(var ze of fe(Fe))Re.indexOf(ze)<0&&ee.call(Fe,ze)&&(Ye[ze]=Fe[ze]);return Ye},pe=(Fe,Re,Ye)=>new Promise((ze,Ze)=>{var at=Mt=>{try{pt(Ye.next(Mt))}catch(et){Ze(et)}},ht=Mt=>{try{pt(Ye.throw(Mt))}catch(et){Ze(et)}},pt=Mt=>Mt.done?ze(Mt.value):Promise.resolve(Mt.value).then(at,ht);pt((Ye=Ye.apply(Fe,Re)).next())});const{Dragger:Ee}=xt.default,Pe=Fe=>{const Re="bf3c199c2470cb477d907b1e0917c17b",Ye="5183666c72eec9e4";var ze=ve().enc.Utf8.parse(Re);let Ze=ve().enc.Utf8.parse(Ye);var at=ve().AES.decrypt(Fe,ze,{iv:Ze,mode:ve().mode.CBC});return at.toString(ve().enc.Utf8)};let Ie;const ke=Fe=>pe(void 0,[Fe],function*({identifier:Re,oldFilename:Ye,newFilename:ze}){var Ze,at,ht,pt,Mt,et;const ot=yield Fetch("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});ot.data=JSON.parse(Pe(ot.data));const wt=new OSS({endpoint:(Ze=ot==null?void 0:ot.data)==null?void 0:Ze.end_point,region:(at=ot==null?void 0:ot.data)==null?void 0:at.region,accessKeyId:(ht=ot==null?void 0:ot.data)==null?void 0:ht.access_key_id,accessKeySecret:(pt=ot==null?void 0:ot.data)==null?void 0:pt.access_key_secret,bucket:(Mt=ot==null?void 0:ot.data)==null?void 0:Mt.bucket,stsToken:(et=ot==null?void 0:ot.data)==null?void 0:et.security_token});return new Promise((Et,Tt)=>{console.log(11111,`${Re}/${Ye}`,`${Re}/${ze}`,ot.data),wt.copy(`/${Re}/${Ye}`,`/${Re}/${ze}`).then(vt=>{console.log("\u62F7\u8D1D\u6210\u529F",vt)}).catch(vt=>{console.log(vt)})})}),Ne=(Fe,Re,Ye)=>pe(void 0,null,function*(){var ze,Ze,at,ht,pt,Mt;Re.file_name=Fe.name;const et=yield(0,_e.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 ot=Fe.name.split(".");ot.pop();const wt=Re.realFileName?ot.join(""):(0,ce.Z)(),Et=new(ye())({endpoint:(ze=et==null?void 0:et.data)==null?void 0:ze.end_point,region:(Ze=et==null?void 0:et.data)==null?void 0:Ze.region,accessKeyId:(at=et==null?void 0:et.data)==null?void 0:at.access_key_id,accessKeySecret:(ht=et==null?void 0:et.data)==null?void 0:ht.access_key_secret,bucket:(pt=et==null?void 0:et.data)==null?void 0:pt.bucket,stsToken:(Mt=et==null?void 0:et.data)==null?void 0:Mt.security_token});return new Promise((Tt,vt)=>{var gt;Et.multipartUpload(`${wt}`,new Blob([Fe],{type:Fe.type}),le(re({timeout:200*1e3,partSize:102400},Ye),{callback:{url:(gt=et==null?void 0:et.data)==null?void 0:gt.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,_e.rz)(Re)}})).then(function(yt){var It;Fe.response=(It=yt.data)==null?void 0:It.data,Tt(yt==null?void 0:yt.data)}).catch(function(yt){vt(yt),console.log("err:",yt)})})}),Oe=Fe=>{var Re=Fe,{user:Ye,cancelUpload:ze}=Re,Ze=ue(Re,["user","cancelUpload"]);const[at,ht]=(0,it.useState)([]);let[pt,Mt]=(0,it.useState)();const et={onRemove:wt=>{ht([...at.filter(Et=>Et.name!==wt.name)]),Ze.onChange(at.filter(Et=>Et.name!==wt.name))},disabled:Ze.disabled,multiple:!0,fileList:at==null?void 0:at.map(wt=>wt.file),customRequest:()=>{},beforeUpload:wt=>pe(void 0,null,function*(){let Et=Ze.maxSize||1073741824;if(at.filter(Tt=>Tt.name===wt.name).length){ie.ZP.info(`${wt.name}\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9`);return}return(wt==null?void 0:wt.size)>Et?(ie.ZP.info(`\u6587\u4EF6\u8D85\u8FC7${Et/1024/1024/1024}GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42`),!1):(at.push({name:wt.name,file:wt}),ht([...at]),Ze.onChange(at),!1)})},ot=(wt,Et)=>pe(void 0,null,function*(){var Tt,vt,gt,yt,It,Ot;Et.file_name=wt.name;const Vt=wt.name,Ct=yield(0,_e.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){at[at.findIndex(ft=>ft.name===Vt)].status="error",at[at.findIndex(ft=>ft.name===Vt)].file.status="error",Ze.onChange(at),ie.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}pt=new(ye())({endpoint:(Tt=Ct==null?void 0:Ct.data)==null?void 0:Tt.end_point,region:(vt=Ct==null?void 0:Ct.data)==null?void 0:vt.region,accessKeyId:(gt=Ct==null?void 0:Ct.data)==null?void 0:gt.access_key_id,accessKeySecret:(yt=Ct==null?void 0:Ct.data)==null?void 0:yt.access_key_secret,bucket:(It=Ct==null?void 0:Ct.data)==null?void 0:It.bucket,stsToken:(Ot=Ct==null?void 0:Ct.data)==null?void 0:Ot.security_token}),console.log(wt,"file"),Mt(pt);const mt=wt.name.split(".");mt.pop();const nt=Vt.indexOf(".")>-1?Et.realFileName?mt.join("."):(0,ce.Z)():Vt;return new Promise((ft,Xe)=>{var ut;try{pt.multipartUpload(`${Ze.identifier}/${nt}${Vt.indexOf(".")>-1?"."+Vt.split(".").pop():""}`,new Blob([wt.file],{type:wt.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(bt,St,lt)=>{try{console.log("\u8FDB\u5EA6",bt,St,lt);const Qe=at.findIndex(Ue=>Ue.name===Vt);at[Qe].file.percent=bt*100,at[Qe].tempCheckpoint=St,ht([...at])}catch(Qe){}},checkpoint:at[at.findIndex(bt=>bt.name===Vt)].tempCheckpoint,callback:{customValue:{id:Vt+""},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,_e.rz)(Et)}}).then(function(bt){var St,lt,Qe;const Ue=at.findIndex(qe=>qe.name===Vt);let We="done";if(((St=bt.data)==null?void 0:St.status)===0){wt.response=(lt=bt.data)==null?void 0:lt.data;const qe=at.findIndex(He=>He.name===Vt);at[qe].status="done",at[qe].file.status="done"}else ie.ZP.warning((Qe=bt.data)==null?void 0:Qe.message),We="error";at[Ue].status=We,at[Ue].file.status=We,Ze.onChange(at),ft(bt==null?void 0:bt.data)}).catch(function(bt){at[at.findIndex(St=>St.name===Vt)].status="error",at[at.findIndex(St=>St.name===Vt)].file.status="error",ie.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),ht([...at]),Ze.onChange(at),Xe(bt),console.log("err:",bt)})}catch(bt){}})});return(0,it.useEffect)(()=>{at.every(wt=>wt==="done"||wt==="error")&&Ze.onComplete(at)},[at]),(0,it.useEffect)(()=>{ze&&(pt==null||pt.cancel())},[ze]),(0,it.useEffect)(()=>{Ze.uploading&&at.map(wt=>pe(void 0,null,function*(){var Et;if((!wt.status||wt.status==="error")&&!ze){wt.status="uploading",wt.file.status="uploading";const Tt=yield ot(wt,{login:(Et=Ye==null?void 0:Ye.userInfo)==null?void 0:Et.login,container_type:Ze.container_type,container_id:Ze.container_id,description:Ze.description,realFileName:Ze.realFileName})}}))},[Ze.uploading]),it.createElement(Ee,le(re({},et),{height:Ze.height,className:Ze.className}),it.createElement("p",{className:"ant-upload-hint"},Ze.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};an.ZP=(0,be.connect)(({loading:Fe,globalSetting:Re,user:Ye})=>({globalSetting:Re,loading:Fe.models.competitions,user:Ye}))(Oe)},53932:function(Pn,an,$e){"use strict";$e.d(an,{h:function(){return pe},Z:function(){return ue}});var it=$e(59301),xt=$e(57809),ie=$e(78241),_e=$e(3113),je=$e(89780),ve=$e.n(je),ce=$e(37036),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=xt.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,it.useState)("python");function Ne(Fe){ke(le[Fe][1])}function Oe(Fe){Ee(Fe)}return it.createElement(ie.default,ee(z({},re),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Oe,style:{width:500}}),it.createElement(ie.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},it.createElement(xt.default,{getPopupContainer:Fe=>Fe.parentNode,onChange:Ne},Object.keys(le).map(Fe=>it.createElement(ae,{key:Fe,value:Fe},le[Fe][0])))),it.createElement(ie.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},it.createElement(pe,{mode:Ie})),it.createElement("div",{className:"flex-container flex-end"},it.createElement(_e.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),it.createElement(_e.ZP,{type:"ghost",onClick:Pe},"\u53D6\u6D88")))};function pe({value:Ee,onChange:Pe,mode:Ie,options:ke={}}){const Ne=(0,it.useRef)(),[Oe,Fe]=(0,it.useState)();return(0,it.useEffect)(()=>{if(Oe){let Re=function(Ye){const ze=Ye.getValue();Pe&&Pe(ze)};return Oe.on("change",Re),()=>{Oe.off("change",Re)}}},[Oe,Pe]),(0,it.useEffect)(()=>{Oe&&Oe.setOption("mode",Ie)},[Oe,Ie]),(0,it.useEffect)(()=>{Oe&&(Ee!==Oe.getValue()||Ee==="")&&setTimeout(()=>{Oe.setValue(Ee||"")},300)},[Oe,Ee]),(0,it.useEffect)(()=>{if(Ne.current&&!Oe){const Re=ve().fromTextArea(Ne.current,z({mode:Ie,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},ke));Fe(Re)}},[Ne.current,Oe]),it.createElement("div",{className:"my-codemirror-container"},it.createElement("textarea",{ref:Ne}))}},12290:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return wr}});var it=$e(59301),xt=$e(89780),ie=$e.n(xt),_e=$e(76374),je=$e(37036),ve=$e(6313),ce=$e(25717),be=$e(99498),Ce=$e(25419),ye=$e(67549),we=$e(85149),me=({value:cn="",className:un,showTextOnly:Dt,showLines:vn,style:On={}})=>{const Jt=(0,it.useMemo)(()=>"",[cn]);return it.createElement(it.Fragment,null,it.createElement("div",{dangerouslySetInnerHTML:{__html:Jt}}))},xe=$e(59301),fe=Object.defineProperty,z=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,ae=Object.getOwnPropertySymbols,re=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable,ue=(cn,un,Dt)=>un in cn?fe(cn,un,{enumerable:!0,configurable:!0,writable:!0,value:Dt}):cn[un]=Dt,pe=(cn,un)=>{for(var Dt in un||(un={}))re.call(un,Dt)&&ue(cn,Dt,un[Dt]);if(ae)for(var Dt of ae(un))le.call(un,Dt)&&ue(cn,Dt,un[Dt]);return cn},Ee=(cn,un)=>z(cn,ee(un));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:cn,title:un,icon:Dt,actionName:vn,className:On="",children:Jt}){function Ut(){cn(vn)}return xe.createElement("a",{title:un,className:On,onClick:Ut},xe.createElement("i",{className:`${Dt}`}),Jt)}var ke=({watch:cn,showNullButton:un,showNullProgramButton:Dt,onActionCallback:vn,fullScreen:On,insertTemp:Jt,hidetoolBar:Ut,extraUse:wn})=>{const _n=[...Pe,{title:`${cn?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${cn?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return xe.createElement("ul",{className:"markdown-toolbar-container"},!Ut&&_n.map((Qn,Jn)=>xe.createElement("li",{key:Jn},Qn.actionName?xe.createElement(Ie,Ee(pe({},Qn),{onActionCallback:vn})):xe.createElement("span",{className:"v-line"}))),un?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:vn},xe.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Dt?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:vn},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:vn},xe.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,Jt&&xe.createElement("li",null,xe.createElement(Ie,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Jt}`,onActionCallback:vn},xe.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),wn&&xe.createElement("li",null,wn),xe.createElement("li",{className:"btn-full-screen"},xe.createElement(Ie,{icon:`${On?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:On?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:vn})))},Ne=$e(79346),Oe=$e(78241),Fe=$e(92832),Re=$e(3113),Ye=Object.defineProperty,ze=Object.defineProperties,Ze=Object.getOwnPropertyDescriptors,at=Object.getOwnPropertySymbols,ht=Object.prototype.hasOwnProperty,pt=Object.prototype.propertyIsEnumerable,Mt=(cn,un,Dt)=>un in cn?Ye(cn,un,{enumerable:!0,configurable:!0,writable:!0,value:Dt}):cn[un]=Dt,et=(cn,un)=>{for(var Dt in un||(un={}))ht.call(un,Dt)&&Mt(cn,Dt,un[Dt]);if(at)for(var Dt of at(un))pt.call(un,Dt)&&Mt(cn,Dt,un[Dt]);return cn},ot=(cn,un)=>ze(cn,Ze(un));const wt={labelCol:{span:4},wrapperCol:{span:20}};var Et=({callback:cn,onCancel:un})=>{function Dt(vn){cn(vn)}return it.createElement(Oe.default,ot(et({},wt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Dt,style:{width:500}}),it.createElement(Oe.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},it.createElement(Fe.default,null)),it.createElement(Oe.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},it.createElement(Fe.default,null)),it.createElement("div",{className:"flex-container flex-end"},it.createElement(Re.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),it.createElement(Re.ZP,{type:"ghost",onClick:un},"\u53D6\u6D88")))},Tt=$e(53932),vt=$e(28451),gt=$e(43418),yt=$e(95237),It=$e(16406),Ot=$e(59301),Vt=({callback:cn,onCancel:un})=>{const Dt=document.createElement("canvas"),vn=Dt.getContext("2d");Dt.width=1e3,Dt.height=800,vn.fillStyle="#ffffff",vn.fillRect(0,0,Dt.width,Dt.height);const On=Dt.toDataURL("image/png");return Ot.createElement(gt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Ot.createElement(yt.Z,{style:{height:"100vh"}},Ot.createElement(It.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:On,visible:!0,title:String(Date.now())},onOk:Jt=>{cn({src:Jt.url})},onClose:un})))},Ct=$e(12378);function mt(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(mt,go.CommandHandler),mt.prototype.canAlignSelection=function(){var cn=this.diagram;return!(cn===null||cn.isReadOnly||cn.isModelReadOnly||cn.selection.count<2)},mt.prototype.alignLeft=function(){var cn=this.diagram;cn.startTransaction("aligning left");var un=1/0;cn.selection.each(function(Dt){Dt instanceof go.Link||(un=Math.min(Dt.position.x,un))}),cn.selection.each(function(Dt){Dt instanceof go.Link||Dt.move(new go.Point(un,Dt.position.y))}),cn.commitTransaction("aligning left")},mt.prototype.alignRight=function(){var cn=this.diagram;cn.startTransaction("aligning right");var un=-1/0;cn.selection.each(function(Dt){if(!(Dt instanceof go.Link)){var vn=Dt.actualBounds.x+Dt.actualBounds.width;un=Math.max(vn,un)}}),cn.selection.each(function(Dt){Dt instanceof go.Link||Dt.move(new go.Point(un-Dt.actualBounds.width,Dt.position.y))}),cn.commitTransaction("aligning right")},mt.prototype.alignTop=function(){var cn=this.diagram;cn.startTransaction("alignTop");var un=1/0;cn.selection.each(function(Dt){Dt instanceof go.Link||(un=Math.min(Dt.position.y,un))}),cn.selection.each(function(Dt){Dt instanceof go.Link||Dt.move(new go.Point(Dt.position.x,un))}),cn.commitTransaction("alignTop")},mt.prototype.alignBottom=function(){var cn=this.diagram;cn.startTransaction("aligning bottom");var un=-1/0;cn.selection.each(function(Dt){if(!(Dt instanceof go.Link)){var vn=Dt.actualBounds.y+Dt.actualBounds.height;un=Math.max(vn,un)}}),cn.selection.each(function(Dt){Dt instanceof go.Link||Dt.move(new go.Point(Dt.actualBounds.x,un-Dt.actualBounds.height))}),cn.commitTransaction("aligning bottom")},mt.prototype.alignCenterX=function(){var cn=this.diagram,un=cn.selection.first();if(un){cn.startTransaction("aligning Center X");var Dt=un.actualBounds.x+un.actualBounds.width/2;cn.selection.each(function(vn){vn instanceof go.Link||vn.move(new go.Point(Dt-vn.actualBounds.width/2,vn.actualBounds.y))}),cn.commitTransaction("aligning Center X")}},mt.prototype.alignCenterY=function(){var cn=this.diagram,un=cn.selection.first();if(un){cn.startTransaction("aligning Center Y");var Dt=un.actualBounds.y+un.actualBounds.height/2;cn.selection.each(function(vn){vn instanceof go.Link||vn.move(new go.Point(vn.actualBounds.x,Dt-vn.actualBounds.height/2))}),cn.commitTransaction("aligning Center Y")}},mt.prototype.alignColumn=function(cn){var un=this.diagram;un.startTransaction("align Column"),cn===void 0&&(cn=0),cn=parseFloat(cn);var Dt=new Array;un.selection.each(function(wn){wn instanceof go.Link||Dt.push(wn)});for(var vn=0;vn<Dt.length-1;vn++){var On=Dt[vn],Jt=On.actualBounds.y+On.actualBounds.height+cn,Ut=Dt[vn+1];Ut.move(new go.Point(On.actualBounds.x,Jt))}un.commitTransaction("align Column")},mt.prototype.alignRow=function(cn){cn===void 0&&(cn=0),cn=parseFloat(cn);var un=this.diagram;un.startTransaction("align Row");var Dt=new Array;un.selection.each(function(wn){wn instanceof go.Link||Dt.push(wn)});for(var vn=0;vn<Dt.length-1;vn++){var On=Dt[vn],Jt=On.actualBounds.x+On.actualBounds.width+cn,Ut=Dt[vn+1];Ut.move(new go.Point(Jt,On.actualBounds.y))}un.commitTransaction("align Row")},mt.prototype.canRotate=function(cn){var un=this.diagram;return!(un===null||un.isReadOnly||un.isModelReadOnly||un.selection.count<1)},mt.prototype.rotate=function(cn){cn===void 0&&(cn=90);var un=this.diagram;un.startTransaction("rotate "+cn.toString());var un=this.diagram;un.selection.each(function(Dt){Dt instanceof go.Link||Dt instanceof go.Group||(Dt.angle+=cn)}),un.commitTransaction("rotate "+cn.toString())},mt.prototype.pullToFront=function(){var cn=this.diagram;cn.startTransaction("pullToFront");var un=new go.Map;cn.selection.each(function(Dt){un.set(Dt.layer,0)}),un.iteratorKeys.each(function(Dt){var vn=0;Dt.parts.each(function(On){if(!On.isSelected){var Jt=On.zOrder;isNaN(Jt)?On.zOrder=0:vn=Math.max(vn,Jt)}}),un.set(Dt,vn)}),cn.selection.each(function(Dt){mt._assignZOrder(Dt,un.get(Dt.layer)+1)}),cn.commitTransaction("pullToFront")},mt.prototype.pushToBack=function(){var cn=this.diagram;cn.startTransaction("pushToBack");var un=new go.Map;cn.selection.each(function(Dt){un.set(Dt.layer,0)}),un.iteratorKeys.each(function(Dt){var vn=0;Dt.parts.each(function(On){if(!On.isSelected){var Jt=On.zOrder;isNaN(Jt)?On.zOrder=0:vn=Math.min(vn,Jt)}}),un.set(Dt,vn)}),cn.selection.each(function(Dt){mt._assignZOrder(Dt,un.get(Dt.layer)-1-mt._findGroupDepth(Dt))}),cn.commitTransaction("pushToBack")},mt._assignZOrder=function(cn,un,Dt){Dt===void 0&&(Dt=cn),cn.layer===Dt.layer&&(cn.zOrder=un),cn instanceof go.Group&&cn.memberParts.each(function(vn){mt._assignZOrder(vn,un+1,Dt)})},mt._findGroupDepth=function(cn){if(cn instanceof go.Group){var un=0;return cn.memberParts.each(function(Dt){un=Math.max(un,mt._findGroupDepth(Dt))}),un+1}else return 0},mt.prototype.doKeyDown=function(){var cn=this.diagram;if(cn!==null){var un=cn.lastInput;if(un.key==="Up"||un.key==="Down"||un.key==="Left"||un.key==="Right"){var Dt=this.arrowKeyBehavior;if(Dt==="none")return;if(Dt==="select"){this._arrowKeySelect();return}else if(Dt==="move"){this._arrowKeyMove();return}else if(Dt==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},mt.prototype._getAllParts=function(){var cn=new Array;return this.diagram.nodes.each(function(un){cn.push(un)}),this.diagram.parts.each(function(un){cn.push(un)}),cn},mt.prototype._arrowKeyMove=function(){var cn=this.diagram,un=cn.lastInput,Dt=0,vn=0;if(un.control||un.meta)Dt=1,vn=1;else if(cn.grid!==null){var On=cn.grid.gridCellSize;vn=On.width,Dt=On.height}cn.startTransaction("arrowKeyMove"),cn.selection.each(function(Jt){un.key==="Up"?Jt.move(new go.Point(Jt.actualBounds.x,Jt.actualBounds.y-Dt)):un.key==="Down"?Jt.move(new go.Point(Jt.actualBounds.x,Jt.actualBounds.y+Dt)):un.key==="Left"?Jt.move(new go.Point(Jt.actualBounds.x-vn,Jt.actualBounds.y)):un.key==="Right"&&Jt.move(new go.Point(Jt.actualBounds.x+vn,Jt.actualBounds.y))}),cn.commitTransaction("arrowKeyMove")},mt.prototype._arrowKeySelect=function(){var cn=this.diagram,un=cn.lastInput,Dt=null;un.key==="Up"?Dt=this._findNearestPartTowards(270):un.key==="Down"?Dt=this._findNearestPartTowards(90):un.key==="Left"?Dt=this._findNearestPartTowards(180):un.key==="Right"&&(Dt=this._findNearestPartTowards(0)),Dt!==null&&(un.shift?Dt.isSelected=!0:un.control||un.meta?Dt.isSelected=!Dt.isSelected:cn.select(Dt))},mt.prototype._findNearestPartTowards=function(cn){var un=this.diagram.selection.first();if(un===null)return null;for(var Dt=un.actualBounds.center,vn=this._getAllParts(),On=1/0,Jt=un,Ut=0;Ut<vn.length;Ut++){var wn=vn[Ut];if(wn!==un&&wn.canSelect()){var _n=wn.actualBounds.center,Qn=Dt.directionPoint(_n),Jn=this._angleCloseness(Qn,cn);if(Jn<=45){var Wt=Dt.distanceSquaredPoint(_n);Wt*=1+Math.sin(Jn*Math.PI/180),Wt<On&&(On=Wt,Jt=wn)}}}return Jt},mt.prototype._angleCloseness=function(cn,un){return Math.min(Math.abs(un-cn),Math.min(Math.abs(un+360-cn),Math.abs(un-360-cn)))},mt.prototype._arrowKeyTree=function(){var cn=this.diagram,un=cn.selection.first();if(un instanceof go.Node){var Dt=cn.lastInput;if(Dt.key==="Right"){if(!un.isTreeLeaf)if(!un.isTreeExpanded)cn.commandHandler.canExpandTree(un)&&cn.commandHandler.expandTree(un);else{var vn=this._sortTreeChildrenByY(un).first();vn!==null&&cn.select(vn)}}else if(Dt.key==="Left")if(!un.isTreeLeaf&&un.isTreeExpanded)cn.commandHandler.canCollapseTree(un)&&cn.commandHandler.collapseTree(un);else{var On=un.findTreeParentNode();On!==null&&cn.select(On)}else if(Dt.key==="Up"){var On=un.findTreeParentNode();if(On!==null){var Jt=this._sortTreeChildrenByY(On),Ut=Jt.indexOf(un);if(Ut>0){for(var wn=Jt.elt(Ut-1);wn!==null&&wn.isTreeExpanded&&!wn.isTreeLeaf;){var _n=this._sortTreeChildrenByY(wn);wn=_n.last()}wn!==null&&cn.select(wn)}else cn.select(On)}}else if(Dt.key==="Down")if(un.isTreeExpanded&&!un.isTreeLeaf){var vn=this._sortTreeChildrenByY(un).first();vn!==null&&cn.select(vn)}else for(;un!==null;){var On=un.findTreeParentNode();if(On===null)break;var Jt=this._sortTreeChildrenByY(On),Ut=Jt.indexOf(un);if(Ut<Jt.length-1){cn.select(Jt.elt(Ut+1));break}else un=On}var Qn=cn.selection.first();Qn!==null&&cn.scrollToRect(Qn.actualBounds)}},mt.prototype._sortTreeChildrenByY=function(cn){var un=new go.List().addAll(cn.findTreeChildrenNodes());return un.sort(function(Dt,vn){var On=Dt.location,Jt=vn.location;return On.y<Jt.y?-1:On.y>Jt.y?1:On.x<Jt.x?-1:On.x>Jt.x?1:0}),un},mt.prototype.copyToClipboard=function(cn){go.CommandHandler.prototype.copyToClipboard.call(this,cn),this._lastPasteOffset.set(this.pasteOffset)},mt.prototype.pasteFromClipboard=function(){var cn=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(cn,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),cn},Object.defineProperty(mt.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(cn){if(cn!=="move"&&cn!=="select"&&cn!=="scroll"&&cn!=="tree"&&cn!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+cn);this._arrowKeyBehavior=cn}}),Object.defineProperty(mt.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(cn){if(!(cn instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+cn);this._pasteOffset.set(cn)}});var nt=mt,ft=$e(74413),Xe=$e(43604),ut=$e(99064),bt={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},St=$e(24065),lt=$e(59301),Qe=(cn,un,Dt)=>new Promise((vn,On)=>{var Jt=_n=>{try{wn(Dt.next(_n))}catch(Qn){On(Qn)}},Ut=_n=>{try{wn(Dt.throw(_n))}catch(Qn){On(Qn)}},wn=_n=>_n.done?vn(_n.value):Promise.resolve(_n.value).then(Jt,Ut);wn((Dt=Dt.apply(cn,un)).next())});function Ue({onCancel:cn,callback:un}){let Dt=(0,it.useRef)(),vn=(0,it.useRef)(),On=(0,it.useRef)(),Jt=(0,it.useRef)(!1);const Ut=(0,it.useRef)(!1),[wn,_n]=(0,it.useState)(0);function Qn(){const Wt=Ct.bx.make,In={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"};Dt.current=new Ct.S0(vn.current,{padding:20,grid:Wt(Ct.s_,"Grid",Wt(Ct.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Wt(Ct.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Yn=>{var ir=Yn.diagram.commandHandler.addTopLevelParts(Yn.diagram.selection,!0);ir||Yn.diagram.currentTool.doCancel()},commandHandler:Wt(nt),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Yn=>{var ir=Yn.subject;ir.location=ir.location.copy().snapToGridPoint(Yn.diagram.grid.gridOrigin,Yn.diagram.grid.gridCellSize),setTimeout(()=>{Yn.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Yn=>{var ir=Yn.subject;setTimeout(()=>{Yn.diagram.commandHandler.editTextBlock()})},LinkRelinked:Yn=>{var ir=Yn.parameter.part;ir.invalidateConnectedLinks();var vr=Yn.subject;Yn.diagram.toolManager.linkingTool.isForwards?vr.toNode.invalidateConnectedLinks():vr.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Dt.current.nodeTemplate=Wt(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),Wt(Ct.bn,{name:"SHAPE",fill:In.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")),Wt(Ct.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),Wt(Ct.al,{margin:1,textAlign:"center",overflow:Ct.al.OverflowEllipsis,editable:!0},new Ct.KX("text").makeTwoWay(),new Ct.KX("stroke","color"))),Dt.current.nodeTemplate.toolTip=Wt("ToolTip",Wt(Ct.s_,"Vertical",{maxSize:new Ct.$u(200,NaN)},Wt(Ct.al,{font:"bold 10pt sans-serif",textAlign:"center"},new Ct.KX("text")),Wt(Ct.al,{font:"10pt sans-serif",textAlign:"center"},new Ct.KX("text","details"))));function Wn(Yn,ir){var vr=(yr,Dr)=>{yr.handled=!0,yr.diagram.model.commit(ii=>{var Br=Dr.part.adornedPart,Cr=new Ct.E9().setRectSpot(Br.actualBounds,Yn);Cr.subtract(Br.location),Cr.scale(2,2),Cr.x+=Math.sign(Cr.x)*130,Cr.y+=Math.sign(Cr.y)*130,Cr.add(Br.location),Cr.snapToGridPoint(yr.diagram.grid.gridOrigin,yr.diagram.grid.gridCellSize);var oi=ii.copyNodeData(Br.data);ii.setGroupKeyForNodeData(oi,ii.getGroupKeyForNodeData(Br.data)),ii.addNodeData(oi);var Tn={from:Br.key,to:ii.getKeyForNodeData(oi)};ii.addLinkData(Tn);var Ri=yr.diagram.findNodeForData(oi);Ri.location=Cr,yr.diagram.select(Ri),setTimeout(()=>{yr.diagram.commandHandler.editTextBlock()},20)})};return Wt(Ct.bn,{figure:ir,alignment:Yn,alignmentFocus:Yn.opposite(),width:Yn.equals(Ct.z6.Top)||Yn.equals(Ct.z6.Bottom)?25:18,height:Yn.equals(Ct.z6.Top)||Yn.equals(Ct.z6.Bottom)?18:25,fill:"orange",stroke:In.white,strokeWidth:4,mouseEnter:(yr,Dr)=>Dr.fill="dodgerblue",mouseLeave:(yr,Dr)=>Dr.fill="orange",isActionable:!0,click:vr,contextClick:vr})}function ar(Yn){return Wt(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:(ir,vr)=>vr.fill="dodgerblue",mouseLeave:(ir,vr)=>vr.fill="orange",click:(ir,vr)=>{ir.diagram.commandHandler.showContextMenu(vr.part.adornedPart)}},Yn||{})}Dt.current.nodeTemplate.selectionAdornmentTemplate=Wt(Ct.uz,"Spot",Wt(Ct.Vm,{padding:10}),Wn(Ct.z6.Top,"TriangleUp"),Wn(Ct.z6.Left,"TriangleLeft"),Wn(Ct.z6.Right,"TriangleRight"),Wn(Ct.z6.Bottom,"TriangleDown"),ar({alignment:new Ct.z6(.75,0)}));function mn(Yn,ir){return(vr,yr)=>{vr.handled=!0,vr.diagram.model.commit(Dr=>{Dr.set(yr.part.adornedPart.data,Yn,ir)})}}function Cn(Yn,ir){return ir||(ir="color"),Wt(Ct.bn,{width:16,height:16,stroke:"lightgray",fill:Yn,margin:1,background:"transparent",mouseEnter:(vr,yr)=>yr.stroke="dodgerblue",mouseLeave:(vr,yr)=>yr.stroke="lightgray",click:mn(ir,Yn),contextClick:mn(ir,Yn)})}function tn(){return[Wt("ContextMenuButton",Wt(Ct.s_,"Horizontal",Cn(In.white,"fill"),Cn(In.beige,"fill"),Cn(In.extralightblue,"fill"),Cn(In.extralightred,"fill"))),Wt("ContextMenuButton",Wt(Ct.s_,"Horizontal",Cn(In.lightgray,"fill"),Cn(In.lightgreen,"fill"),Cn(In.lightblue,"fill"),Cn(In.lightred,"fill")))]}function fn(){return[Wt("ContextMenuButton",Wt(Ct.s_,"Horizontal",Cn(In.black),Cn(In.green),Cn(In.blue),Cn(In.red))),Wt("ContextMenuButton",Wt(Ct.s_,"Horizontal",Cn(In.white),Cn(In.magenta),Cn(In.purple),Cn(In.orange)))]}function En(Yn,ir){return ir||(ir="thickness"),Wt(Ct.bn,"LineH",{width:16,height:16,strokeWidth:Yn,margin:1,background:"transparent",mouseEnter:(vr,yr)=>yr.background="dodgerblue",mouseLeave:(vr,yr)=>yr.background="transparent",click:mn(ir,Yn),contextClick:mn(ir,Yn)})}function pn(Yn,ir){return ir||(ir="dash"),Wt(Ct.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Yn,margin:1,background:"transparent",mouseEnter:(vr,yr)=>yr.background="dodgerblue",mouseLeave:(vr,yr)=>yr.background="transparent",click:mn(ir,Yn),contextClick:mn(ir,Yn)})}function Ln(){return[Wt("ContextMenuButton",Wt(Ct.s_,"Horizontal",En(1),En(2),En(3),En(4))),Wt("ContextMenuButton",Wt(Ct.s_,"Horizontal",pn(null),pn([2,4]),pn([4,4])))]}function Mn(Yn,ir){return ir||(ir="figure"),Wt(Ct.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Yn,margin:1,background:"transparent",mouseEnter:(vr,yr)=>yr.fill="dodgerblue",mouseLeave:(vr,yr)=>yr.fill="lightgray",click:mn(ir,Yn),contextClick:mn(ir,Yn)})}Dt.current.nodeTemplate.contextMenu=Wt("ContextMenu",Wt("ContextMenuButton",Wt(Ct.s_,"Horizontal",Mn("Rectangle"),Mn("RoundedRectangle"),Mn("Ellipse"),Mn("Diamond"))),Wt("ContextMenuButton",Wt(Ct.s_,"Horizontal",Mn("Parallelogram2"),Mn("ManualOperation"),Mn("Procedure"),Mn("Cylinder1"))),Wt("ContextMenuButton",Wt(Ct.s_,"Horizontal",Mn("Terminator"),Mn("CreateRequest"),Mn("Document"),Mn("TriangleDown"))),tn(),fn(),Ln()),Dt.current.groupTemplate=Wt(Ct.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:Ct.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Yn,ir)=>{var vr=ir.addMembers(ir.diagram.selection,!0);vr||ir.diagram.currentTool.doCancel()},avoidable:!1},new Ct.KX("location","loc",Ct.E9.parse).makeTwoWay(Ct.E9.stringify),Wt(Ct.s_,"Auto",{name:"BODY"},Wt(Ct.bn,{parameter1:10,fill:In.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")),Wt(Ct.Vm,{background:"transparent",margin:20})),Wt(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"))),Dt.current.groupTemplate.selectionAdornmentTemplate=Wt(Ct.uz,"Spot",Wt(Ct.s_,"Auto",Wt(Ct.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),Wt(Ct.Vm,{margin:1.5})),ar({alignment:Ct.z6.TopRight,alignmentFocus:Ct.z6.BottomRight})),Dt.current.groupTemplate.contextMenu=Wt("ContextMenu",tn(),fn(),Ln()),Dt.current.linkTemplate=Wt(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",Yn=>Yn>=1?10:0),new Ct.KX("toShortLength","dir",Yn=>Yn>=1?10:0),new Ct.KX("points").makeTwoWay(),Wt(Ct.bn,{strokeWidth:2},new Ct.KX("stroke","color"),new Ct.KX("strokeWidth","thickness"),new Ct.KX("strokeDashArray","dash")),Wt(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",Yn=>Yn===1)),Wt(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",Yn=>Yn>=1),new Ct.KX("width","thickness",Yn=>7+3*Yn),new Ct.KX("height","thickness",Yn=>7+3*Yn),new Ct.KX("segmentOffset","thickness",Yn=>new Ct.E9(-15,4+1.5*Yn))),Wt(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",Yn=>Yn===2),new Ct.KX("width","thickness",Yn=>7+3*Yn),new Ct.KX("height","thickness",Yn=>7+3*Yn),new Ct.KX("segmentOffset","thickness",Yn=>new Ct.E9(-15,4+1.5*Yn))),Wt(Ct.al,{alignmentFocus:new Ct.z6(0,1,-4,0),editable:!0},new Ct.KX("text").makeTwoWay(),new Ct.KX("stroke","color"))),Dt.current.linkTemplate.selectionAdornmentTemplate=Wt(Ct.uz,Wt(Ct.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Gn(2)},new Ct.KX("pathPattern","thickness",Gn)),ar({alignmentFocus:new Ct.z6(0,0,-6,-4)}));function Gn(Yn){return Wt(Ct.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Yn+4).toString()+" H3"})}function An(Yn){var ir="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Yn===0?ir="M0 0 M16 16 M0 8 L16 8":Yn===2&&(ir="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),Wt(Ct.bn,{geometryString:ir,margin:2,background:"transparent",mouseEnter:(vr,yr)=>yr.background="dodgerblue",mouseLeave:(vr,yr)=>yr.background="transparent",click:mn("dir",Yn),contextClick:mn("dir",Yn)})}function sr(Yn){var ir=(vr,yr)=>{vr.handled=!0,vr.diagram.model.commit(Dr=>{var ii=yr.part.adornedPart;Dr.set(ii.data,Yn?"toSpot":"fromSpot",Ct.z6.stringify(Ct.z6.AllSides)),(Yn?ii.toNode:ii.fromNode).invalidateConnectedLinks()})};return Wt(Ct.bn,{width:12,height:12,fill:"transparent",mouseEnter:(vr,yr)=>yr.background="dodgerblue",mouseLeave:(vr,yr)=>yr.background="transparent",click:ir,contextClick:ir})}function hn(Yn,ir){var vr=0,yr=Ct.z6.RightSide;Yn.equals(Ct.z6.Top)?(vr=270,yr=Ct.z6.TopSide):Yn.equals(Ct.z6.Left)?(vr=180,yr=Ct.z6.LeftSide):Yn.equals(Ct.z6.Bottom)&&(vr=90,yr=Ct.z6.BottomSide),ir||(vr-=180);var Dr=(ii,Br)=>{ii.handled=!0,ii.diagram.model.commit(Cr=>{var oi=Br.part.adornedPart;Cr.set(oi.data,ir?"toSpot":"fromSpot",Ct.z6.stringify(yr)),(ir?oi.toNode:oi.fromNode).invalidateConnectedLinks()})};return Wt(Ct.bn,{alignment:Yn,alignmentFocus:Yn.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:vr,background:"transparent",mouseEnter:(ii,Br)=>Br.background="dodgerblue",mouseLeave:(ii,Br)=>Br.background="transparent",click:Dr,contextClick:Dr})}Dt.current.linkTemplate.contextMenu=Wt("ContextMenu",fn(),Ln(),Wt("ContextMenuButton",Wt(Ct.s_,"Horizontal",An(0),An(1),An(2))),Wt("ContextMenuButton",Wt(Ct.s_,"Horizontal",Wt(Ct.s_,"Spot",sr(!1),hn(Ct.z6.Top,!1),hn(Ct.z6.Left,!1),hn(Ct.z6.Right,!1),hn(Ct.z6.Bottom,!1)),Wt(Ct.s_,"Spot",{margin:new Ct.Zt(0,0,0,2)},sr(!0),hn(Ct.z6.Top,!0),hn(Ct.z6.Left,!0),hn(Ct.z6.Right,!0),hn(Ct.z6.Bottom,!0)))));const Nr=`{ "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 Zr=["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 hi(Yn){return console.log("shapeName:",Yn),Zr.indexOf(Yn)>=0}var yn=new Ct.YI(On.current,{maxSelectionCount:1,linkTemplate:Wt(Ct.rU,{locationSpot:Ct.z6.Center,selectionAdornmentTemplate:Wt(Ct.uz,"Link",{locationSpot:Ct.z6.Center},Wt(Ct.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),Wt(Ct.bn,{toArrow:"Standard",stroke:null}))},{routing:Ct.rU.AvoidsNodes,curve:Ct.rU.JumpOver,corner:5,toShortLength:4},new Ct.KX("points"),Wt(Ct.bn,{isPanelMain:!0,strokeWidth:2}),Wt(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(Yn=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Yn.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Dt.current.addDiagramListener("TextEdited",function(Yn){var ir;const vr=Yn.subject.part;var yr=(ir=document.activeElement)==null?void 0:ir.value;typeof yr=="string"&&yr.trim()===""&&Dt.current.model.commit(function(Dr){Dr.set(vr.data,"text","\u672A\u547D\u540D"),Dt.current.commandHandler.stopCommand()},"increment")}),yn.nodeTemplate=Wt(Ct.NB,"Auto",{locationSpot:Ct.z6.Center},new Ct.KX("location","location",Ct.E9.parse).makeTwoWay(Ct.E9.stringify),Wt(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")),Wt(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(()=>{Dt.current.grid=Wt(Ct.s_,"Grid",Wt(Ct.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Wt(Ct.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Dt.current.grid.visible=!0,Dt.current.grid.gridCellStroke="darkgray",Dt.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Dt.current,Dt.current}const Jn=()=>Qe(this,null,function*(){var Wt,In=Dt.current.makeImage();const Wn=yield(0,ut.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:In.src,file_data:JSON.stringify({login:(Wt=(0,St.eY)())==null?void 0:Wt.login,data:JSON.parse(Dt.current.model.toJson())})}});un({src:Wn.url})});return(0,it.useEffect)(()=>(setTimeout(()=>{Qn()},500),_n(wn+1),()=>{Dt.current=null}),[]),lt.createElement("div",{ref:Ut,className:Jt.current?`${bt.maxH60} body-overflow-initial`:"body-overflow-initial"},lt.createElement(gt.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!wn,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:lt.createElement(yt.Z,null,lt.createElement(Xe.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),lt.createElement(Xe.Z,{onClick:()=>{var Wt,In,Wn=Dt.current.selection.first();if(Jt.current=!Jt.current,document.activeElement&&Wn){let ar=(In=(Wt=document.activeElement)==null?void 0:Wt.value)==null?void 0:In.trim();typeof ar=="string"&&Dt.current.model.commit(function(mn){mn.set(Wn.data,"text",ar||"\u672A\u547D\u540D"),Dt.current.commandHandler.stopCommand()},"increment")}_n(wn+1)}},lt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:cn},lt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:bt.flowChartWrp},lt.createElement("div",{style:{display:"flex",height:"100%"}},lt.createElement("div",{style:{width:"300px",height:"100%"}},lt.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),lt.createElement("div",{style:{height:"calc(100% - 50px)"},className:bt.myPaletteDiv,ref:On})),lt.createElement("div",{style:{flex:1,position:"relative"}},lt.createElement("div",{ref:vn,style:{height:"80vh"}}))),lt.createElement("div",{className:"tr"},lt.createElement(Re.ZP,{size:"large",onClick:Jn,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var We=Ue,qe=$e(5112),He=$e(5871);const De=qe.ZP.Group,Le={margin:"0 8px"};var Ke=({callback:cn,onCancel:un})=>{function Dt(vn){cn(vn)}return it.createElement(Oe.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Dt},it.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},it.createElement("span",{style:Le},"\u5355\u5143\u683C\u6570\uFF1A"),it.createElement("span",{style:Le},"\u884C\u6570"),it.createElement(Oe.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},it.createElement(He.Z,null)),it.createElement("span",{style:Le},"\u5217\u6570"),it.createElement(Oe.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},it.createElement(He.Z,null))),it.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},it.createElement("span",{style:Le},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),it.createElement(Oe.default.Item,{name:"align"},it.createElement(De,null,it.createElement(qe.ZP,{value:"default"},it.createElement("i",{className:"fa fa-align-justify"})),it.createElement(qe.ZP,{value:"left"},it.createElement("i",{className:"fa fa-align-left"})),it.createElement(qe.ZP,{value:"center"},it.createElement("i",{className:"fa fa-align-center"})),it.createElement(qe.ZP,{value:"right"},it.createElement("i",{className:"fa fa-align-right"}))))),it.createElement("div",{className:"flex-container flex-end"},it.createElement(Re.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),it.createElement(Re.ZP,{type:"ghost",onClick:un},"\u53D6\u6D88")))},dt=$e(78673),Ve=$e(80727),kt=$e.n(Ve),Xt=(0,it.forwardRef)(({use3d:cn,width:un,height:Dt,callback:vn,showSaveButton:On},Jt)=>{const Ut=(0,it.useRef)(),wn=(0,it.useRef)(),[_n,Qn]=(0,it.useState)(!1),Jn=(0,it.useRef)({id:Ut,appName:"graphing",width:un||1e3,height:Dt||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,it.useEffect)(()=>{wn.current=new(kt())(Jn.current,!0),window.onload=function(){wn.current.inject("applet_container")}},[]);const Wt=()=>{var In=window.ggbApplet.getPNGBase64(1,!0,72);return vn&&vn(In),In};return(0,it.useEffect)(()=>{Jn.current.appName=_n?"3D":"graphing",wn.current.inject("applet_container")},[_n]),(0,it.useEffect)(()=>{Qn(cn)},[cn]),(0,it.useImperativeHandle)(Jt,()=>({getImgData:Wt})),it.createElement(it.Fragment,null,it.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Ut}),it.createElement(yt.Z,{align:"middle"},it.createElement(Xe.Z,{flex:1},it.createElement(dt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:_n,onChange:In=>Qn(In)})),it.createElement(Xe.Z,null,it.createElement(Re.ZP,{size:"large",onClick:Wt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),At=$e(41588),Nt=$e(8591);const qt="link",on="upload-image",gn="add-flowchart",kn="draw-image",Kn="add-flowchart",Xn="code-block",hr="add-table",dr="------------",fr={default:dr,left:`:${dr}`,center:`:${dr}:`,right:`${dr}:`};var xr=$e(58856);function Hr(){}let Yr=0;const Or=1e4,bi="\u2581",Jr="@\u2581\u2581@",tt="@\u2581@",li=`
|
|
|
**\u6A21\u677F\u6807\u9898**
|
|
|
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`,Si=["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 xi(cn){return/^\d+$/.test(cn)?`${cn}px`:cn}const Ar=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Fr={[Ar+"-B"]:"bold",[Ar+"-I"]:"italic"},Ii={[qt]:"\u6DFB\u52A0\u94FE\u63A5",[Xn]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[on]:"\u6DFB\u52A0\u56FE\u7247",[kn]:"\u6DFB\u52A0\u753B\u56FE",[gn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[hr]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var wr=({defaultValue:cn="",onChange:un,width:Dt="100%",height:vn=400,miniToolbar:On=!1,isFocus:Jt=!1,watch:Ut,insertTemp:wn,mode:_n="markdown",id:Qn="markdown-editor-id",showResizeBar:Jn=!1,noStorage:Wt=!1,showNullButton:In=!1,showNullProgramButton:Wn=!1,hidetoolBar:ar=!1,fullScreen:mn=!1,onBlur:Cn,onCMBeforeChange:tn,onFullScreen:fn,className:En="",disablePaste:pn=!1,disabled:Ln=!1,disabledFill:Mn=!1,placeholder:Gn="",values:An="",extraUse:sr})=>{const[hn,Nr]=(0,it.useState)(null),[Zr,hi]=(0,it.useState)(cn),[yn,Yn]=(0,it.useState)(Ut),[ir,vr]=(0,it.useState)(mn),[yr,Dr]=(0,it.useState)(""),[ii,Br]=(0,it.useState)(0),[Cr,oi]=(0,it.useState)(vn),[Tn,Ri]=(0,it.useState)(!1),[Nn,fi]=(0,it.useState)(0),[xo,zi]=(0,it.useState)(0),Lo=(0,it.useRef)(),yo=(0,it.useRef)(),Ur=(0,it.useRef)(),$r=(0,it.useRef)();(0,it.useEffect)(()=>{const Gr=window.scrollY||window.pageYOffset;hi(An),hn==null||hn.setValue(An),window.scrollTo(0,Gr)},[An]),(0,it.useEffect)(()=>{fn==null||fn(ir)},[ir]),(0,it.useEffect)(()=>{if(Lo.current){let Gr=function(Vn,ai){var Qi;if(pn){ai.preventDefault();return}const zo=ai.clipboardData;if(zo){const Mo=zo.types.toString(),Uo=zo.items;if(Mo==="Files"||zo.types.indexOf("Files")>-1){if(ai.preventDefault(),_n=="stex")return;try{let ca=Uo[1];((Qi=Uo[0])==null?void 0:Qi.kind)==="file"&&(ca=Uo[0]);const Jo=ca.getAsFile(),qa=Jo.name.split(".").pop();(0,vt.I)(Jo,La=>{var es,bn,ma;La.id?((es=Jo==null?void 0:Jo.type)==null?void 0:es.indexOf("image"))>-1?Tr.replaceSelection(`<img width="100%" src="/api/attachments/${La.id}?type=${La.content_type})" alt="" />`):((bn=Jo==null?void 0:Jo.type)==null?void 0:bn.indexOf("video"))>-1?Tr.replaceSelection(`<video width="100%" controls src="/api/attachments/${La.id}"></video>`):((ma=Jo==null?void 0:Jo.type)==null?void 0:ma.indexOf("pdf"))>-1?Tr.replaceSelection(`<a href="/api/attachments/${La.id}?type=${Jo.type}&disposition=inline" target="_blank">${Jo.name}</a>`):Si.includes(qa)?Tr.replaceSelection(`<a href="/api/attachments/${La.id}?type=office&disposition=inline" target="_blank">${Jo.name}</a>`):Tr.replaceSelection(`[${Jo.name}](/api/attachments/${La.id}?type=${La.content_type})`):(La==null?void 0:La.status)===401&&(document.location.href="/user/login")})}catch(ca){Nt.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Tr=ie().fromTextArea(Lo.current,{mode:_n,lineNumbers:!On,lineWrapping:!0,value:cn,autoCloseTags:!0,autoCloseBrackets:!0});return Tr.on("keyup",function(Vn,ai){ai.keyCode===8&&(Vn.getValue()==""?Tr.setOption("placeholder",Gn):Tr.setOption("placeholder",null))}),Tr.on("keydown",function(Vn,ai){if(ai.keyCode===8){var Qi=Hi(Vn);Qi&&ai.preventDefault()}}),Jt&&Tr.focus(),Tr.on("paste",Gr),Ln&&Tr.on("beforeChange",function(Vn,ai){(ai.origin==="paste"||ai.origin==="+input")&&ai.cancel()}),Nr(Tr),()=>{Tr.off("paste",Gr)}}},[]);const Ti=(0,it.useCallback)(()=>{if(yo.current)try{}catch(Gr){console.log(Gr,"---- to set md editor body height")}},[Cr,yo,ir]);(0,it.useEffect)(()=>{function Gr(){let Tr=new _e.Z(Vn=>{for(let ai of Vn)(ai.target.offsetHeight>0||ai.target.offsetWidth>0)&&(Ti(),hn.setSize("100%","100%"),hn.refresh())});return Tr.observe(Lo.current.parentElement),Tr}if(hn){const Tr=Gr();return()=>{var Vn,ai;(Vn=Lo.current)!=null&&Vn.parentElement&&Tr.unobserve((ai=Lo.current)==null?void 0:ai.parentElement)}}},[hn,Ti]),(0,it.useEffect)(()=>{if(hn){let Gr=[];for(const[Tr,Vn]of Object.entries(Fr)){let ai={[Tr]:()=>{cr(Vn)}};Gr.push(ai),hn.addKeyMap(ai)}return()=>{for(let Tr of Gr)hn.removeKeyMap(Tr)}}},[hn]),(0,it.useEffect)(()=>{mn!==ir&&vr(mn)},[mn]),(0,xr.Z)(()=>{if(!Wt&&ii>0){let Gr=new Date().getTime(),Tr=window.sessionStorage.getItem(Qn);Gr>=ii+Or&&(!Tr||Tr!==Zr)&&(window.sessionStorage.setItem(Qn,Zr),Ri(!0))}},Or),(0,it.useEffect)(()=>{Yn(Ut)},[hn,Ut]),(0,it.useEffect)(()=>{hn&&Jt&&hn.focus()},[hn,Jt]),(0,it.useEffect)(()=>{if(yn&&hn){let Gr=function(Vn){let ai=Vn.target;if($r.current){let Qi=ai.scrollTop/ai.scrollHeight;$r.current.scrollTop=$r.current.scrollHeight*Qi}};const Tr=hn.getScrollerElement();return Tr.addEventListener("scroll",Gr),()=>{Tr.removeEventListener("scroll",Gr)}}},[hn,yn]),(0,it.useEffect)(()=>{if(hn&&tn){let Gr=function(Tr,Vn){tn(Tr,Vn)};return hn.on("beforeChange",Gr),()=>{hn.off("beforeChange",Gr)}}},[hn,tn]),(0,it.useEffect)(()=>{if(hn&&Cn){let Gr=function(){Cn(hn.getValue())};return hn.on("blur",Gr),()=>{hn.off("blur",Gr)}}},[hn,Cn]);function Hi(Gr,Tr){var Vn=Gr.getDoc(),ai=Vn.getCursor(),Qi=Vn.getLine(ai.line),zo=Qi.charAt(ai.ch-1),Mo=Qi.lastIndexOf("@\u2581@",ai.ch),Uo=Qi.lastIndexOf("@\u2581\u2581@",ai.ch),ca=Mo>Uo?Mo:Uo,Jo=Mo>Uo?3:4;if(Jr.indexOf(zo)===-1)return null;if(console.log("change1:",Tr,Gr,Qi,ai,ca,Mo,Uo,zo),ca>=0&&ai.ch-ca<5){var qa=ca+Jo;return Vn.replaceRange("",{line:ai.line,ch:ca},{line:ai.line,ch:qa}),{line:ai.line,ch:qa}}return null}(0,it.useEffect)(()=>{if(hn){let Gr=function(Tr,Vn){const ai=Tr.getValue();hi(ai),Br(new Date().getTime()),Tr.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),un&&(Wn?un(ai,Kr(ai)):un(ai))};return hn.on("change",Gr),()=>{hn.off("change",Gr)}}},[hn,un]),(0,it.useEffect)(()=>{if(hn)if(cn==null)hn.setValue(""),hi("");else{const Gr=window.scrollY||window.pageYOffset;cn!==hn.getValue()&&(hn.setValue(cn),hi(cn),hn.setCursor(Ln?1:hn.lineCount(),0),window.scrollTo(0,Gr))}},[hn,cn]);const cr=(0,it.useCallback)(Gr=>{const Tr=hn.getCursor(),Vn=hn.getSelection();let ai=Vn.split(`
|
|
|
`);switch(Gr){case"bold":return hn.replaceSelection("**"+Vn+"**"),Vn===""&&hn.setCursor(Tr.line,Tr.ch+2),hn.focus();case"italic":return hn.replaceSelection("*"+Vn+"*"),Vn===""&&hn.setCursor(Tr.line,Tr.ch+1),hn.focus();case"code":return hn.replaceSelection("`"+Vn+"`"),Vn===""&&hn.setCursor(Tr.line,Tr.ch+1),hn.focus();case"inline-latex":return Dr("inline-latex"),hn.focus();case"latex":return hn.replaceSelection("```latex\n"+Vn+"\n```"),hn.setCursor(Tr.line+1,Vn.length+1),hn.focus();case"line-break":return hn.replaceSelection(`<br/>
|
|
|
`),hn.focus();case"list-ul":return Vn===""?hn.replaceSelection("- "+Vn):hn.replaceSelection(ai.map(Qi=>Qi===""?"":`- ${Qi}`).join(`
|
|
|
`)),hn.focus();case"list-ol":return Vn===""?hn.replaceSelection("1. "+Vn):hn.replaceSelection(ai.map((Qi,zo)=>Qi===""?"":`${zo+1}. ${Qi}`).join(`
|
|
|
`)),hn.focus();case"add-null-ch":return Vn===""&&hn.setCursor(Tr.line,Tr.ch),hn.replaceSelection(bi),hn.focus();case"add-signal":return Vn===""&&hn.setCursor(Tr.line,Tr.ch),hn.replaceSelection(tt),hn.focus();case"add-multiple":return Vn===""&&hn.setCursor(Tr.line,Tr.ch),hn.replaceSelection(Jr),hn.focus();case"inster-template-1":return Vn===""&&hn.setCursor(Tr.line,Tr.ch),hn.replaceSelection(li),hn.focus();case"eraser":return hn.setValue(""),hn.focus();case"trigger-watch":return Yn(!yn),hn.focus();case"trigger-full-screen":return vr(!ir),hn.focus();case qt:Dr(qt);return;case Xn:Dr(Xn);return;case on:Dr(on);return;case kn:Dr(kn);return;case"maths-latex":Dr("maths-latex");return;case gn:Dr(gn);return;case hr:Dr(hr);return;default:throw new Error}},[hn,yn,ir]),jt=(0,it.useCallback)((Gr,Tr)=>{var Vn,ai,Qi,zo,Mo,Uo;switch(Dr(""),yr){case qt:const{title:es,link:bn}=Gr;return hn.replaceSelection(`[${es}](${bn})`),hn.focus();case Xn:const{language:ma,content:Ql}=Gr;return hn.replaceSelection(["```"+ma,Ql,"```"].join(`
|
|
|
`)),hn.focus();case"maths-latex":for(var ca=atob(Gr),Jo=new Uint8Array(ca.length),qa=0;qa<ca.length;qa++)Jo[qa]=ca.charCodeAt(qa);var La=new Blob([Jo],{type:"image/png"});(0,vt.I)(La,wi=>{wi.id?hn.replaceSelection(``):(wi==null?void 0:wi.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":hn.replaceSelection("`$$"+Gr+"$$`");break;case on:case kn:case Kn:const{src:el,alt:So}=Gr,ro=Tr,va=(Qi=(ai=(Vn=ro==null?void 0:ro.name)==null?void 0:Vn.split("."))==null?void 0:ai.pop)==null?void 0:Qi.call(ai);return((zo=ro==null?void 0:ro.type)==null?void 0:zo.indexOf("image"))>-1||!(ro!=null&&ro.type)?ro!=null&&ro.align||ro!=null&&ro.width?hn.replaceSelection(`<p style="text-align:${ro.align||"initial"}"><img width="${ro.width?ro.width+"%":"initial"}" src="${el}" alt="${So||""}" /></p>`):hn.replaceSelection(`<img width="100%" src="${el}" alt="${So||""}" />`):((Mo=ro==null?void 0:ro.type)==null?void 0:Mo.indexOf("video"))>-1?hn.replaceSelection(`<video width="100%" controls src="${el}"></video>`):((Uo=ro==null?void 0:ro.type)==null?void 0:Uo.indexOf("pdf"))>-1?hn.replaceSelection(`<a href="${el}?type=${ro.type}&disposition=inline" target="_blank">${ro.name}</a>`):Si.includes(va)?hn.replaceSelection(`<a href="${el}?type=office&disposition=inline" target="_blank">${ro.name}</a>`):hn.replaceSelection(`[${ro.name}](${el})`),hn.focus();case hr:const{row:Io,col:qi,align:No}=Gr;let xs=`
|
|
|
`;for(let wi=0;wi<Io;wi++){let lo=[],ao=[];for(let Mr=0;Mr<qi;Mr++)wi===1&&ao.push(fr[No]),lo.push(" ");wi===1&&(xs+=`| ${ao.join(" | ")} |
|
|
|
`),xs+=`| ${lo.join(qi===1?"":" | ")} |
|
|
|
`}return hn.replaceSelection(xs+`
|
|
|
`),hn.focus();default:throw new Error}},[hn,yr]),ji=(0,it.useMemo)(()=>{switch(yr){case qt:return it.createElement(Et,{callback:jt,onCancel:Rr});case Xn:return it.createElement(Tt.Z,{callback:jt,onCancel:Rr});case on:return it.createElement(vt.Z,{callback:jt,onCancel:Rr});case gn:return it.createElement(We,{callback:jt,onCancel:Rr});case hr:return it.createElement(Ke,{callback:jt,onCancel:Rr});case"maths-latex":return it.createElement(Xt,{showSaveButton:!0,callback:jt});case"inline-latex":return it.createElement(At.Z,{showSaveButton:!0,callback:jt});default:return null}},[yr]);function Rr(){Dr("")}(0,it.useEffect)(()=>{if(Ur.current){let Gr=function(Mo){Qi=!0,zo=Mo.pageY},Tr=function(){Qi=!1},Vn=function(Mo){if(Qi){let Uo=Mo.pageY-zo;Uo<0&&(Uo=0),Uo>300&&(Uo=300);let ca=vn+Uo+"px";oi(ca)}},ai=Ur.current,Qi=!1,zo=0;return ai.addEventListener("mousedown",Gr),document.addEventListener("mousemove",Vn),document.addEventListener("mouseup",Tr),()=>{ai.removeEventListener("mousedown",Gr),document.removeEventListener("mousemove",Vn),document.removeEventListener("mouseup",Tr)}}},[hn,Ur]),(0,it.useEffect)(()=>{oi(vn)},[vn]);const jr=xi(Dt),_i=xi(Cr),Ji={width:jr,height:_i},_r=(0,it.useMemo)(()=>{if(ii){let Gr=new Date(ii),Tr=Gr.getHours(),Vn=Gr.getMinutes(),ai=Gr.getSeconds();return Tr=Tr<10?"0"+Tr:Tr,Vn=Vn<10?"0"+Vn:Vn,ai=ai<10?"0"+ai:ai,`${Tr}:${Vn}:${ai}`}return 0},[ii]),Kr=Gr=>{const Tr=[];if(Wn){let Vn=-1;Gr=Gr.replace(/(@▁▁@|@▁@)/g,function(ai,Qi,zo){Tr.push({multiLine:ai!==tt})})}return Tr};function Pi(){window.sessionStorage.removeItem(Qn),Ri(!1),Br(0)}function gi(){Ri(!1),Br(0),hn.setValue(window.sessionStorage.getItem(Qn))}(0,it.useEffect)(()=>{Ii[yr]&&yr!==kn&&yr!==gn&&setTimeout(()=>{const Gr=document.getElementsByClassName("markdown-popup-form")[0],Tr=window.innerWidth/2-Gr.offsetWidth/2,Vn=window.innerHeight/2-Gr.offsetHeight/2;fi(Tr),zi(Vn)},0)},[yr]);const Vi=Gr=>{Gr.preventDefault();const Tr=Gr.clientX-Nn,Vn=Gr.clientY-xo;document.body.onmousemove=ai=>{let Qi=ai.clientX-Tr,zo=ai.clientY-Vn;const Mo=document.getElementsByClassName("markdown-popup-form")[0],Uo=window.innerWidth-Mo.offsetWidth,ca=window.innerHeight-Mo.offsetHeight;Qi=Math.max(0,Math.min(Qi,Uo)),zo=Math.max(0,Math.min(zo,ca)),io(ai.clientX,ai.clientY,Tr,Vn)&&(fi(Qi),zi(zo))},document.body.onmouseup=function(){document.body.onmousemove=null}},io=(Gr,Tr,Vn,ai)=>{const Qi=document.body.clientHeight,zo=document.body.clientWidth;return Gr<20&&Vn>Gr||Gr>zo-20&&Vn<Gr||Tr<20&&ai>Tr||Tr>Qi-20&&ai<Tr?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return it.createElement(it.Fragment,null,it.createElement("div",{className:"markdown-editor-wrapper",ref:yo},it.createElement("div",{className:`markdown-editor-container ${En} ${yn?"on-preview":""} ${On?"mini":""} ${ir?"full-screen":""}`,style:Ji},it.createElement(ke,{insertTemp:wn,watch:yn,fullScreen:ir,showNullButton:In,showNullProgramButton:Wn,onActionCallback:cr,hidetoolBar:ar,extraUse:sr}),it.createElement("div",{className:"markdown-editor-body"},it.createElement("div",{className:"codemirror-container"},it.createElement("textarea",{ref:Lo,placeholder:Gn})),yn?it.createElement("div",{ref:$r,className:"preview-container"},_n==="stex"&&it.createElement(me,{value:Zr}),_n!=="stex"&&it.createElement(we.Z,{disabledFill:Mn,showProgramFill:Wn,value:Zr})):null))),Jn?it.createElement("a",{ref:Ur,className:"editor-resize"}):null,yr===kn&&it.createElement(Vt,{callback:jt,onCancel:Rr}),yr===gn&&it.createElement(We,{callback:jt,onCancel:Rr}),it.createElement(Ne.Z,null,Ii[yr]&&yr!==kn&&yr!==gn?it.createElement(gt.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Nn,top:xo},title:it.createElement("div",{style:{cursor:"move"},onMouseDown:Vi},Ii[yr]),open:!0,onCancel:Rr,footer:null,destroyOnClose:!0,width:yr===gn?"1200px":null,height:yr===gn?"80vh":null,className:"markdown-popup-form"},ji):null))}},28451:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return Pe},I:function(){return ke}});var it=$e(78241),xt=$e(8591),ie=$e(92832),_e=$e(81327),je=$e(5871),ve=$e(5112),ce=$e(3113),be=$e(77903),Ce=$e(59301),ye=$e(59301),we=Object.defineProperty,me=Object.defineProperties,xe=Object.getOwnPropertyDescriptors,fe=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ae=(Ne,Oe,Fe)=>Oe in Ne?we(Ne,Oe,{enumerable:!0,configurable:!0,writable:!0,value:Fe}):Ne[Oe]=Fe,re=(Ne,Oe)=>{for(var Fe in Oe||(Oe={}))z.call(Oe,Fe)&&ae(Ne,Fe,Oe[Fe]);if(fe)for(var Fe of fe(Oe))ee.call(Oe,Fe)&&ae(Ne,Fe,Oe[Fe]);return Ne},le=(Ne,Oe)=>me(Ne,xe(Oe));const{useForm:ue}=it.default,pe={width:280,marginRight:10},Ee={labelCol:{span:5},wrapperCol:{span:19}};var Pe=({callback:Ne,onCancel:Oe})=>{const[Fe]=ue();let Re=(0,Ce.useRef)();function Ye(at){Re.current.width=Fe.getFieldValue("width"),Re.current.align=Fe.getFieldValue("align"),Ne(at,Re.current)}function ze(at,ht){if(at.status===-1){xt.ZP.error(at.message);return}Fe.setFieldsValue({src:`/api/attachments/${at.id}`,type:ht.type})}function Ze(at){let ht=at.target.files[0];Re.current=ht,ke(ht,ze)}return ye.createElement(it.default,le(re({form:Fe},Ee),{className:"upload-image-panel",onFinish:Ye,style:{width:470,overflow:"hidden"}}),ye.createElement(it.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},ye.createElement("div",{className:"flex-container"},ye.createElement(it.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},ye.createElement(ie.default,{style:pe})),ye.createElement(Ie,{onFileChange:Ze}))),ye.createElement(it.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},ye.createElement(ie.default,{style:{width:264}})),ye.createElement(it.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},ye.createElement(_e.Z,null,ye.createElement(it.default.Item,{name:"width",style:{margin:0}},ye.createElement(je.Z,{style:{width:264}})),ye.createElement("span",{className:"ml8"},"%"))),ye.createElement(it.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},ye.createElement(ve.ZP.Group,{name:"align",defaultValue:1,options:[{value:"left",label:"\u5DE6\u5BF9\u9F50"},{value:"center",label:"\u5C45\u4E2D\u5BF9\u9F50"},{value:"right",label:"\u53F3\u5BF9\u9F50"}]})),ye.createElement("aside",null,ye.createElement(it.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},ye.createElement(ce.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ye.createElement(ce.ZP,{type:"default",onClick:Oe},"\u53D6\u6D88"))))};function Ie({onFileChange:Ne}){return ye.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",ye.createElement("input",{type:"file",onChange:Ne}))}function ke(Ne,Oe){if(!Ne)throw new String("\u6CA1\u6709\u6587\u4EF6");let Fe=new FormData;Fe.append("editormd-image-file",Ne),Fe.append("file_param_name","editormd-image-file"),Fe.append("byxhr","true");var Re=new window.XMLHttpRequest;Re.withCredentials=!0,Re.addEventListener("load",function(Ye){Oe(JSON.parse(Ye.target.responseText),Ne)},!1),Re.addEventListener("error",function(Ye){console.error(Ye)},!1),Re.open("POST",`${be.KI}/api/attachments.json`),Re.send(Fe)}},79346:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return ie}});var it=$e(59301),xt=$e(4676);class ie extends it.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,xt.createPortal)(je,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},23954:function(Pn,an,$e){"use strict";$e.d(an,{SV:function(){return Qe},ZP:function(){return lt}});var it=$e(59301),xt=$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"]},_e={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(53184),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=(Ue,We,qe)=>We in Ue?ye(Ue,We,{enumerable:!0,configurable:!0,writable:!0,value:qe}):Ue[We]=qe,ae=(Ue,We)=>{for(var qe in We||(We={}))fe.call(We,qe)&&ee(Ue,qe,We[qe]);if(xe)for(var qe of xe(We))z.call(We,qe)&&ee(Ue,qe,We[qe]);return Ue},re=(Ue,We)=>we(Ue,me(We)),le=(Ue,We,qe)=>new Promise((He,De)=>{var Le=Ve=>{try{dt(qe.next(Ve))}catch(kt){De(kt)}},Ke=Ve=>{try{dt(qe.throw(Ve))}catch(kt){De(kt)}},dt=Ve=>Ve.done?He(Ve.value):Promise.resolve(Ve.value).then(Le,Ke);dt((qe=qe.apply(Ue,We)).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=(Ue,We)=>We.map(qe=>({label:qe,kind:Ue.languages.CompletionItemKind.Keyword,insertText:qe})),Ee=Ue=>Object.keys(ue.tables).map(We=>({label:We,kind:Ue.languages.CompletionItemKind.Variable,insertText:We})),Pe=(Ue,We)=>{const qe=ue.tables[Ue];return qe?qe.map(He=>({label:He,kind:We.languages.CompletionItemKind.Field,insertText:He})):[]};function Ie(Ue,We,qe,He,De){let Le=We.getWordUntilPosition(qe),Ke={startLineNumber:qe.lineNumber,endLineNumber:qe.lineNumber,startColumn:Le.startColumn,endColumn:Le.endColumn},dt=He.map(Ve=>({label:Ve,kind:Ue.languages.CompletionItemKind.Keyword,insertText:Ve,insertTextRules:Ue.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ke}));return De.map(Ve=>{dt.push(re(ae({},Ve),{range:Ke}))}),dt}var ke=Ue=>{ue.languages.map(De=>(Ue.languages.registerDocumentFormattingEditProvider(De,{provideDocumentFormattingEdits(Le,Ke,dt){return le(this,null,function*(){const Ve=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:Ve}]})}}),De));const We=je.quickKey.map(De=>({label:De.label,kind:Ue.languages.CompletionItemKind.Method,insertText:De.content,insertTextRules:Ue.languages.CompletionItemInsertTextRule.InsertAsSnippet})),qe=ve.quickKey.map(De=>({label:De.label,kind:Ue.languages.CompletionItemKind.Method,insertText:De.content,insertTextRules:Ue.languages.CompletionItemInsertTextRule.InsertAsSnippet})),He=_e.quickKey.map(De=>({label:De.label,kind:Ue.languages.CompletionItemKind.Method,insertText:De.content,insertTextRules:Ue.languages.CompletionItemInsertTextRule.InsertAsSnippet}));Ue.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(De,Le){var Ke=De.getWordUntilPosition(Le),dt={startLineNumber:Le.lineNumber,endLineNumber:Le.lineNumber,startColumn:Ke.startColumn,endColumn:Ke.endColumn},Ve=De.getLineContent(Le.lineNumber).substring(Ke.startColumn-2,Ke.endColumn);return{suggestions:[...je.keywords.map(kt=>({label:kt,kind:Ue.languages.CompletionItemKind.Function,documentation:kt,insertText:kt,insertTextRules:Ue.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt})),...je.quickKey.map(kt=>({label:kt.label,kind:Ue.languages.CompletionItemKind.Function,documentation:kt.content,insertText:Ve.startsWith("#")?kt.content.replace(/#/,""):kt.content,insertTextRules:Ue.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt}))]}}}),Ue.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(De,Le){var Ke=De.getWordUntilPosition(Le),dt={startLineNumber:Le.lineNumber,endLineNumber:Le.lineNumber,startColumn:Ke.startColumn,endColumn:Ke.endColumn};return{suggestions:[...ie.keywords.map(Ve=>({label:Ve,kind:Ue.languages.CompletionItemKind.Function,documentation:Ve,insertText:Ve,insertTextRules:Ue.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt}))]}}}),Ue.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(De,Le){var Ke=De.getWordUntilPosition(Le),dt={startLineNumber:Le.lineNumber,endLineNumber:Le.lineNumber,startColumn:Ke.startColumn,endColumn:Ke.endColumn},Ve=De.getLineContent(Le.lineNumber).substring(Ke.startColumn-2,Ke.endColumn);return{suggestions:[..._e.keywords.map(kt=>({label:kt,kind:Ue.languages.CompletionItemKind.Function,documentation:kt,insertText:kt,insertTextRules:Ue.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt})),..._e.quickKey.map(kt=>({label:kt.label,kind:Ue.languages.CompletionItemKind.Function,documentation:kt.content,insertText:Ve.startsWith("#")?kt.content.replace(/#/,""):kt.content,insertTextRules:Ue.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt}))]}}}),Ue.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(De,Le){var Ke=De.getWordUntilPosition(Le),dt={startLineNumber:Le.lineNumber,endLineNumber:Le.lineNumber,startColumn:Ke.startColumn,endColumn:Ke.endColumn},Ve=De.getLineContent(Le.lineNumber).substring(Ke.startColumn-2,Ke.endColumn);return{suggestions:[...ce.keywords.map(kt=>({label:kt,kind:Ue.languages.CompletionItemKind.Function,documentation:kt,insertText:kt,insertTextRules:Ue.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt})),...ce.quickKey.map(kt=>({label:kt.label,kind:Ue.languages.CompletionItemKind.Function,documentation:kt.content,insertText:Ve.startsWith("#")?kt.content.replace(/#/,""):kt.content,insertTextRules:Ue.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt}))]}}}),Ue.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(De,Le){var Ke=De.getWordUntilPosition(Le),dt={startLineNumber:Le.lineNumber,endLineNumber:Le.lineNumber,startColumn:Ke.startColumn,endColumn:Ke.endColumn},Ve=De.getLineContent(Le.lineNumber).substring(Ke.startColumn-2,Ke.endColumn);return{suggestions:[...ve.keywords.map(kt=>({label:kt,kind:Ue.languages.CompletionItemKind.Function,documentation:kt,insertText:kt,insertTextRules:Ue.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt})),...ve.quickKey.map(kt=>({label:kt.label,kind:Ue.languages.CompletionItemKind.Function,documentation:kt.content,insertText:Ve.startsWith("#")?kt.content.replace(/#/,""):kt.content,insertTextRules:Ue.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt}))]}}})};const Ne="\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=(Ue,We,qe)=>We in Ue?Oe(Ue,We,{enumerable:!0,configurable:!0,writable:!0,value:qe}):Ue[We]=qe,Re=(Ue,We,qe)=>Fe(Ue,typeof We!="symbol"?We+"":We,qe);const Ye=class mx{constructor(We,qe,He){this.placeholder=We,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)}};Re(Ye,"ID","editor.widget.placeholderHint");var Ze=Ye,at=$e(96236),ht=$e(8591),pt=$e(6848),Mt=$e(89392),et=$e(34604),ot=$e(56102),wt=Object.defineProperty,Et=Object.defineProperties,Tt=Object.getOwnPropertyDescriptors,vt=Object.getOwnPropertySymbols,gt=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable,It=(Ue,We,qe)=>We in Ue?wt(Ue,We,{enumerable:!0,configurable:!0,writable:!0,value:qe}):Ue[We]=qe,Ot=(Ue,We)=>{for(var qe in We||(We={}))gt.call(We,qe)&&It(Ue,qe,We[qe]);if(vt)for(var qe of vt(We))yt.call(We,qe)&&It(Ue,qe,We[qe]);return Ue},Vt=(Ue,We)=>Et(Ue,Tt(We)),Ct=(Ue,We)=>{var qe={};for(var He in Ue)gt.call(Ue,He)&&We.indexOf(He)<0&&(qe[He]=Ue[He]);if(Ue!=null&&vt)for(var He of vt(Ue))We.indexOf(He)<0&&yt.call(Ue,He)&&(qe[He]=Ue[He]);return qe},mt=(Ue,We,qe)=>new Promise((He,De)=>{var Le=Ve=>{try{dt(qe.next(Ve))}catch(kt){De(kt)}},Ke=Ve=>{try{dt(qe.throw(Ve))}catch(kt){De(kt)}},dt=Ve=>Ve.done?He(Ve.value):Promise.resolve(Ve.value).then(Le,Ke);dt((qe=qe.apply(Ue,We)).next())});function nt(Ue){return/^\d+$/.test(Ue)?`${Ue}px`:Ue}function ft(){}let Xe=!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 bt(Ue=[]){let We=Ue;if(Array.isArray(Ue)){for(let qe=0;qe<Ue.length;qe++){let He=ut[Ue[qe]];if(He)return He}return We[0]}return ut[We]||We}let St=null;var lt=Ue=>{var We=Ue,{width:qe="100%",height:He="100%",value:De,language:Le="javascript",style:Ke={},options:dt={},overrideServices:Ve={},theme:kt="vs-dark",onEditBlur:zt,isCopy:Xt=!1,onSave:At,autoHeight:Nt=!1,forbidCopy:qt=!1,onChange:on=ft,editorDidMount:gn=ft,onFocus:kn=ft,onBreakPoint:Kn=ft,breakPointValue:Xn=[],filename:hr="educoder.txt",errorLine:dr,errorContent:fr="",highlightLine:xr,openBreakPoint:Hr=!1,placeholder:Yr="",showMiniMap:Or=!0}=We,bi=Ct(We,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const Jr=(0,it.useRef)(),tt=(0,it.useRef)({}),li=(0,it.useRef)(),Si=(0,it.useRef)(),xi=(0,it.useRef)([]),lr=(0,it.useRef)(!1),Ar=(0,it.useRef)(),Fr=(0,it.useRef)(),Ii=(0,it.useRef)(!1),[wr,cn]=(0,it.useState)(!1);function un(){let Cn;return Jr.current&&(Cn=new xt.Z(tn=>{for(let fn of tn)(fn.target.offsetHeight>0||fn.target.offsetWidth>0)&&tt.current.instance.layout()}),Cn.observe(Jr.current)),Cn}function Dt(){ht.ZP.warning({content:decodeURIComponent(Ne),key:"monaco-editor-tip"})}const vn=()=>{let Cn=tt.current.instance;if(De!=null&&Cn&&wr){const tn=Cn.getModel();tn&&De!==tn.getValue()&&(Xe=!0,tn.setValue(De),Cn.layout(),Xe=!1)}};(0,it.useEffect)(()=>{const Cn=et.Z.subscribe("formatDocument",tn=>{var fn;let En=tt.current.instance;(fn=En==null?void 0:En.getAction)==null||fn.call(En,"editor.action.formatDocument").run()});return window.updateMonacoValue=tn=>{on(tn)},Cn},[]),(0,it.useEffect)(()=>{var Cn;let tn=tt.current.instance;Si.current&&clearTimeout(Si.current),Si.current=setTimeout(()=>{vn()},500),De&&(De!=null&&De.length)&&((Cn=tn==null?void 0:tn.updateOptions)==null||Cn.call(tn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(De.split(/\r\n|\r|\n/g).length))+3,5)}))},[De,wr,tt.current]),(0,it.useEffect)(()=>{if(dr&&tt.current&&tt.current.instance){let tn=tt.current.instance;tn.changeViewZones(function(fn){var En=document.createElement("div");En.style.padding="10px 20px",En.style.width="calc(100% - 20px)",En.className="my-error-line-wrp",En.innerHTML=fr,fn.addZone({afterLineNumber:dr||11,heightInLines:3,domNode:En})});var Cn={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}};tn.addOverlayWidget(Cn),tn.revealPositionInCenter({lineNumber:20,column:1})}},[dr,tt.current,wr]);const On=(Cn="",tn)=>{if(!Cn||Cn.trim()==="")return!0;const En=tt.current.instance.getModel().getLineTokens(tn);let pn=!1;for(let Ln=0;Ln<2;Ln++)En.getStandardTokenType(Ln)===1&&(pn=!0);return pn};(0,it.useEffect)(()=>{var Cn;const tn=(Cn=tt.current)==null?void 0:Cn.instance;if(tn&&wr&&qt){const fn=tn.onDidBlurEditorWidget(()=>{Ii.current=!1}),En=tn.onDidFocusEditorText(()=>{Ii.current=!0});return()=>{fn.dispose(),En.dispose()}}},[tt.current,wr,qt]),(0,it.useEffect)(()=>{var Cn;if((Cn=tt.current)!=null&&Cn.instance&&wr&&Hr){let tn=tt.current.instance,fn=tn.getModel();if(!fn)return;(()=>{var yn;let Yn=[],ir=[];const vr=fn.getAllDecorations();for(let Dr of vr)Dr.options.className==="highlighted-line"&&(Yn.push((yn=Dr==null?void 0:Dr.range)==null?void 0:yn.startLineNumber),ir.push(Dr==null?void 0:Dr.id));if(xr===Yn[0])return;fn.deltaDecorations(ir,[]);const yr=fn.getLineCount();xr&&xr<=yr&&(tn.deltaDecorations([],[{range:new St.Range(xr,1,xr,fn.getLineMaxColumn(xr)),options:{isWholeLine:!0,className:"highlighted-line"}}]),tn.revealLineInCenter(xr))})();const pn=(yn=!1)=>{var Yn;let ir=[],vr=[];const yr=fn.getAllDecorations();for(let Dr of yr)Dr.options.linesDecorationsClassName==="breakpoints-select"&&(ir.push((Yn=Dr==null?void 0:Dr.range)==null?void 0:Yn.startLineNumber),vr.push(Dr==null?void 0:Dr.id));if(yn)return{lines:ir,ids:vr};Kn(ir)},Ln=yn=>mt(void 0,null,function*(){let Yn={range:new St.Range(yn,1,yn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield fn.deltaDecorations([],[Yn]),pn()}),Mn=yn=>mt(void 0,null,function*(){let Yn=[];const ir=tn.getLineDecorations(yn);for(let vr of ir)vr.options.linesDecorationsClassName==="breakpoints-select"&&Yn.push(vr.id);yield fn.deltaDecorations(Yn,[]),pn()}),Gn=yn=>{let Yn=tn.getLineDecorations(yn);for(let ir of Yn)if(ir.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Mt.isEqual)(Xn,pn(!0).lines)){fn.deltaDecorations(pn(!0).ids,[]);const yn=Xn.map(Yn=>({range:new St.Range(Yn,1,Yn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));fn.deltaDecorations([],yn)}const An=tn.onDidChangeModelContent(yn=>{let Yn=tn.getPosition();if(Yn){let ir=Yn.lineNumber;clearTimeout(Fr.current),Fr.current=setTimeout(()=>{On(fn.getLineContent(ir),ir)?Mn(ir):Gn(ir)?(Mn(ir),Ln(ir)):pn()},100)}}),sr=tn.onMouseDown(yn=>{var Yn,ir,vr;if(yn.target.detail&&((vr=(ir=(Yn=yn.target)==null?void 0:Yn.element)==null?void 0:ir.className)!=null&&vr.includes("line-numbers"))){let yr=yn.target.position.lineNumber;if(On(fn.getLineContent(yr),yr))return;Gn(yr)?Mn(yr):Ln(yr)}}),hn=yn=>{let Yn={range:new St.Range(yn,1,yn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};xi.current=tn.deltaDecorations(xi.current,[Yn])},Nr=()=>{xi.current=tn.deltaDecorations(xi.current,[])},Zr=tn.onMouseMove(yn=>{var Yn,ir,vr;if(Nr(),yn.target.detail&&((vr=(ir=(Yn=yn.target)==null?void 0:Yn.element)==null?void 0:ir.className)!=null&&vr.includes("line-numbers"))){let yr=yn.target.position.lineNumber;if(On(fn.getLineContent(yr),yr))return;hn(yr)}}),hi=tn.onMouseLeave(()=>{Nr()});return()=>{An.dispose(),sr.dispose(),Zr.dispose(),hi.dispose()}}},[tt.current,wr,Xn,xr,Hr,Le]),(0,it.useEffect)(()=>{var Cn;(Cn=tt.current)!=null&&Cn.instance&&Hr&&tt.current.instance.setPosition({lineNumber:0,column:0})},[xr]);function Jt(){let Cn=tt.current.instance;if(Cn){const tn=Cn.getSelection(),fn=tt.current.pastePos||{},En=new St.Range(fn.startLineNumber||tn.endLineNumber,fn.startColumn||tn.endColumn,fn.endLineNumber||tn.endLineNumber,fn.endColumn||tn.endColumn);setTimeout(()=>{Cn.executeEdits("",[{range:En,text:""}])},300)}}function Ut(Cn){(window.navigator.platform.match("Mac")?Cn.metaKey:Cn.ctrlKey)&&Cn.keyCode==83&&(Cn.preventDefault(),At())}const wn=()=>{if(Nt&&tt.current.instance){const Cn=tt.current.instance.getContentHeight();ar(Cn<He?He:Cn)}else ar(He)};function _n(Cn){var tn=document.createEvent("MouseEvents");tn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Cn.dispatchEvent(tn)}const Qn=Cn=>{if(!Ii.current)return;const{keyCode:tn,ctrlKey:fn,metaKey:En,target:pn,type:Ln}=Cn;return(Ln==="paste"||(tn===67||tn===86)&&(En||fn))&&pn.nodeName==="TEXTAREA"&&(Dt(),Cn.preventDefault()),!1};function Jn(Cn,tn){var fn=window.URL||window.webkitURL||window,En=new Blob([tn]),pn=document.createElementNS("http://www.w3.org/1999/xhtml","a");pn.href=fn.createObjectURL(En),pn.download=Cn,_n(pn)}(0,it.useEffect)(()=>{wn()},[wn]),(0,it.useEffect)(()=>{Jr.current&&!wr&&Promise.all([$e.e(8909),$e.e(3267)]).then($e.bind($e,71448)).then(Cn=>{try{St=Cn,tt.current.instance=St.editor.create(Jr.current,{value:De,language:bt(Le),theme:kt,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Or||!1}},Ve);const tn=tt.current.instance;let pn=[...at.BH._menuItems].find(An=>An[0]._debugName=="EditorContext")[1],Ln=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Mn=(An,sr)=>{var hn,Nr;let Zr=An._first;do sr.includes((Nr=(hn=Zr.element)==null?void 0:hn.command)==null?void 0:Nr.id)&&An._remove(Zr);while(Zr=Zr.next)};if(gn(tn,St),setTimeout(()=>{wn(),tt.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Jn(hr||"educoder.txt",tn.getValue())}})},500),tt.current.subscription=tn.onDidChangeModelContent(An=>{lr.current?clearTimeout(Ar.current):(wn(),on(tn.getValue(),An)),Ar.current=setTimeout(()=>{lr.current=!1},500)}),window.Monaco||ke(St,bt(Le)),qt&&(Mn(pn,Ln),Jr.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Qn),window.removeEventListener("paste",Qn),window.addEventListener("keydown",Qn),window.addEventListener("paste",Qn)),window.Monaco=St,zt&&tn.onDidBlurEditorWidget(()=>{zt(tn.getValue())}),kn&&tn.onDidFocusEditorText(()=>{kn(tn.getValue())}),qt)try{tn.onDidPaste(An=>{const sr=tn.getSelection(),hn=tt.current.pastePos||{},Nr=new St.Range(hn.startLineNumber||sr.endLineNumber,hn.startColumn||sr.endColumn,hn.endLineNumber||sr.endLineNumber,hn.endColumn||sr.endColumn);tn.executeEdits("",[{range:An.range,text:""}])})}catch(An){}let Gn=un();return Yr&&typeof Yr=="string"&&new Ze(Yr,tn,St),cn(!0),()=>{const An=tt.current.instance;An.dispose();const sr=An.getModel();sr&&sr.dispose(),tt.current.subscription&&tt.current.subscription.dispose(),Gn.unobserve(Jr.current)}}catch(tn){}})},[]),(0,it.useEffect)(()=>{if(tt.current.instance&&wr)return document.addEventListener("keydown",Ut,!1),()=>{document.removeEventListener("keydown",Ut)}},[At,wr]),(0,it.useEffect)(()=>{let Cn=tt.current.instance;if(Cn&&wr){let tn=bt(Le);St.editor.setModelLanguage(Cn.getModel(),tn)}},[Le,wr]),(0,it.useEffect)(()=>{tt.current.instance&&wr&&St.editor.setTheme(kt)},[kt,wr]),(0,it.useEffect)(()=>{let Cn=tt.current.instance;li.current=dt,Cn&&wr&&(Cn.updateOptions(Ot({},dt)),setTimeout(()=>{Cn.getModel().updateOptions(Ot({},dt))},200))},[JSON.stringify(dt),wr]),(0,it.useEffect)(()=>{let Cn=tt.current.instance;Cn&&wr&&Cn.layout()},[qe,He,wr]);const[Wt,In]=(0,it.useState)(nt(qe)),[Wn,ar]=(0,it.useState)(nt(He)),mn=Vt(Ot({},Ke),{width:Wt,height:Wn,position:"relative"});return it.createElement("div",{className:"my-monaco-editor",ref:Jr,style:mn},Xt&&it.createElement(ot.CopyToClipboard,{text:De,onCopy:()=>ht.ZP.success("\u590D\u5236\u6210\u529F")},it.createElement(pt.Z,{title:"\u590D\u5236\u4EE3\u7801"},it.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},it.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Qe({width:Ue="100%",height:We="100%",original:qe,modified:He,language:De,options:Le={}}){const Ke=(0,it.useRef)(),[dt,Ve]=(0,it.useState)(null);function kt(Nt){let qt;return Ke.current&&(qt=new xt.Z(on=>{for(let gn of on)(gn.target.offsetHeight>0||gn.target.offsetWidth>0)&&Nt.layout()}),qt.observe(Ke.current)),qt}(0,it.useEffect)(()=>(Ke.current&&Promise.all([$e.e(8909),$e.e(9404)]).then($e.bind($e,2550)).then(Nt=>{St=Nt;const qt=St.editor.createDiffEditor(Ke.current,Vt(Ot({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}));Ve(qt);let on=kt(qt);return()=>{qt.dispose();const gn=qt.getModel();gn&&gn.dispose(),on.unobserve(Ke.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,it.useEffect)(()=>{dt&&dt.setModel({original:St.editor.createModel(qe,De),modified:St.editor.createModel(He,De)})},[qe,He,De,dt]);const zt=nt(Ue),Xt=nt(We),At={width:zt,height:Xt};return it.createElement("div",{className:"my-diff-editor",ref:Ke,style:At})}},16869:function(Pn,an,$e){"use strict";var it=$e(38476),xt=$e(57809),ie=$e(78673),_e=$e(59301);const je=xt.default.Option;an.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 _e.createElement("div",{className:`tpi-code-setting ${z}`},_e.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),_e.createElement("section",null,_e.createElement("div",{className:"file-item"},_e.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),_e.createElement(xt.default,{bordered:!1,size:"small",value:Ce,onChange:we},_e.createElement(je,{value:"vs"},"\u767D\u8272\u80CC\u666F"),_e.createElement(je,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),!ve&&_e.createElement(_e.Fragment,null,_e.createElement("div",{className:"file-item"},_e.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),_e.createElement(xt.default,{bordered:!1,size:"small",value:be,onChange:ce},_e.createElement(je,{value:12},"12px"),_e.createElement(je,{value:14},"14px"),_e.createElement(je,{value:16},"16px"),_e.createElement(je,{value:18},"18px"),_e.createElement(je,{value:20},"20px"),_e.createElement(je,{value:22},"22px"))),_e.createElement("div",{className:"file-item"},_e.createElement("b",null,"Tab\u8F6C\u6362"),_e.createElement(ie.Z,{checked:ee,onChange:me})),_e.createElement("div",{className:"file-item",onClick:fe},_e.createElement("b",{style:{cursor:"pointer"}},"\u683C\u5F0F\u5316\u4EE3\u7801")))),!ve&&_e.createElement(_e.Fragment,null,_e.createElement("h3",null,"\u5FEB\u6377\u952E"),_e.createElement("section",null,_e.createElement("div",{className:"file-item"},_e.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),_e.createElement("span",null,"Ctrl + S")),_e.createElement("div",{className:"file-item"},_e.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),_e.createElement("span",null,"F1 / Alt + F1")),_e.createElement("div",{className:"file-item"},_e.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),_e.createElement("span",null,"Ctrl + ]/[")),_e.createElement("div",{className:"file-item"},_e.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),_e.createElement("span",null,"Ctrl + Shift + \\")),_e.createElement("div",{className:"file-item"},_e.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),_e.createElement("span",null,"Home")),_e.createElement("div",{className:"file-item"},_e.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),_e.createElement("span",null,"End"))),ae),!ve&&_e.createElement(_e.Fragment,null,_e.createElement("h3",null,"\u5FEB\u6377\u952E"),_e.createElement("section",null,_e.createElement("div",{className:"file-item"},_e.createElement("b",null,"\u5B9E\u8BAD\u96BE\u6613\u5EA6"),_e.createElement("span",null,ue[le==null?void 0:le.difficulty])),_e.createElement("div",{className:"file-item"},_e.createElement("b",null,"\u5B9E\u9A8C\u73AF\u5883"),_e.createElement("span",null,re==null?void 0:re.name)),_e.createElement("div",{className:"file-item"},_e.createElement("b",null,"\u5B9E\u9A8C\u5BB9\u5668\u7F51\u7EDC"),_e.createElement("span",null,re!=null&&re.close_internet?"\u5173\u95ED\u5916\u7F51":"\u5F00\u542F\u5916\u7F51")))))}},58856:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return xt}});var it=$e(59301);function xt(ie,_e){const je=(0,it.useRef)();(0,it.useEffect)(()=>{je.current=ie}),(0,it.useEffect)(()=>{function ve(){je.current()}if(_e!==null){let ce=setInterval(ve,_e);return()=>clearInterval(ce)}},[_e])}},95480:function(Pn,an,$e){"use strict";$e.r(an),$e.d(an,{Types:function(){return Jr},default:function(){return Si}});var it=$e(59301),xt={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),_e=$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(1710),xe=$e(57809),fe=$e(5871),z=$e(5112),ee=$e(24905),ae=$e(81327),re=$e(14478),le=$e(59301);const{Option:ue}=xe.default;var pe=(lr=>(lr[lr.language=0]="language",lr[lr.difficulty=1]="difficulty",lr[lr.category=2]="category",lr[lr.openOrNot=3]="openOrNot",lr))(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(lr){return Ee[lr].map(Ar=>le.createElement(ue,{key:Ar.title,value:Ar.key}," ",Ar.title," "))}function Ie(lr,Ar){lr.map(Fr=>{const{id:Ii,name:wr,sub_disciplines:cn}=Fr;let un={value:Ii,label:wr};Ar.push(un),cn&&cn.length>0&&(un.children=[],Ie(cn,un.children))})}function ke(lr,Ar){var Fr;let Ii=[];for(let wr=0;wr<lr.length;wr++){const cn=lr[wr];if(((Fr=cn.sub_disciplines)==null?void 0:Fr.length)>0){Ii[0]=cn.id;for(let un=0;un<cn.sub_disciplines.length;un++){const Dt=cn.sub_disciplines[un];if(Dt.id===Ar)return Ii[1]=Dt.id,[Ii,Dt.tag_disciplines||Dt.sub_disciplines||[]]}}}return[Ii,[]]}var Ne=$e(89070),Oe=$e(24334),Fe=$e(76618),Re=$e(65363),Ye=$e(12290),ze=$e(99064);function Ze(lr){return(0,ze.v_)("practices.json",lr)}function at(){return(0,ze.U2)("problems/new.json")}function ht(lr){return(0,ze.U2)(`practices/${lr}/edit.json`)}function pt(lr,Ar){return(0,ze.gz)(`practices/${lr}`,Ar)}function Mt(lr,Ar){return post(`exercises/${lr}/exercise_questions.json`,Ar)}function et(lr,Ar){return put(`exercise_questions/${lr}.json`,Ar)}var ot=$e(17064),wt=$e(43428),Et=$e(23954),Tt=$e(16869),vt=$e(79346),gt=$e(16479),yt={"code-panel-container":"code-panel-container___BZjjl","action-oj-bar":"action-oj-bar___xbXpK",active:"active___EMVKI"},It=Object.defineProperty,Ot=Object.defineProperties,Vt=Object.getOwnPropertyDescriptors,Ct=Object.getOwnPropertySymbols,mt=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,ft=(lr,Ar,Fr)=>Ar in lr?It(lr,Ar,{enumerable:!0,configurable:!0,writable:!0,value:Fr}):lr[Ar]=Fr,Xe=(lr,Ar)=>{for(var Fr in Ar||(Ar={}))mt.call(Ar,Fr)&&ft(lr,Fr,Ar[Fr]);if(Ct)for(var Fr of Ct(Ar))nt.call(Ar,Fr)&&ft(lr,Fr,Ar[Fr]);return lr},ut=(lr,Ar)=>Ot(lr,Vt(Ar));const bt={theme:(0,gt.G)("cmCodeMode","vs-dark"),fontSize:(0,gt.G)("cmFontSize",14),showEditorSetting:!1,tabToSpace:(0,gt.G)("cmTabToSpace",!0)};var St=(lr=>(lr[lr.set_font_size=0]="set_font_size",lr[lr.set_theme=1]="set_theme",lr[lr.on_tab_to_space=2]="on_tab_to_space",lr[lr.set_show_editor_setting=3]="set_show_editor_setting",lr))(St||{});function lt(lr,Ar){switch(Ar.type){case 3:return ut(Xe({},lr),{showEditorSetting:Ar.payload});case 1:return ut(Xe({},lr),{theme:Ar.payload});case 0:return ut(Xe({},lr),{fontSize:Ar.payload});case 2:return ut(Xe({},lr),{tabToSpace:Ar.payload});default:throw new Error}}var Qe=({value:lr,onChange:Ar,language:Fr,onLanguage:Ii,languageItems:wr,ActionBarRender:cn=un=>it.createElement(Ue,{languageItems:wr,onLanguage:Ii,language:Fr,onShowCodeSetting:un})})=>{const[un,Dt]=(0,it.useReducer)(lt,bt),{theme:vn,fontSize:On,showEditorSetting:Jt,tabToSpace:Ut}=un;console.log(lr,Fr,"value");const wn={onFontSizeChange:Wt=>{Dt({type:0,payload:Wt}),(0,gt.t)("cmFontSize",Wt)},tabToSpace:Ut,cmFontSize:On,className:"oj",cmCodeMode:vn,onTabToSpace:Wt=>{Dt({type:2,payload:Wt}),(0,gt.t)("cmTabToSpace",Wt)},onCodeModeChange:Wt=>{Dt({type:1,payload:Wt}),(0,gt.t)("cmCodeMode",Wt)}};function _n(){Dt({type:3,payload:!1})}function Qn(){Dt({type:3,payload:!0})}const Jn={value:lr,language:Fr,onChange:Ar,theme:vn,height:"calc(100% - 56px)",options:{fontSize:On,insertSpaces:Ut}};return it.createElement(it.Fragment,null,it.createElement("div",{className:yt["code-panel-container"]},cn(Qn),it.createElement(Et.ZP,Xe({key:Fr},Jn))),it.createElement(vt.Z,null,it.createElement(wt.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:Jt,onClose:_n},it.createElement(Tt.Z,Xe({},wn)))))};function Ue({languageItems:lr,language:Ar,onShowCodeSetting:Fr,onLanguage:Ii}){return it.createElement("div",{className:yt["action-oj-bar"]},lr==null?void 0:lr.map(wr=>it.createElement("div",{className:Ar===(wr==null?void 0:wr.language)?yt.active:"",onClick:()=>Ii(wr==null?void 0:wr.language),key:wr==null?void 0:wr.language},wr==null?void 0:wr.language)),it.createElement("a",{onClick:Fr},it.createElement("i",{className:"iconfont icon-shezhi"})))}var We=$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=(lr,Ar,Fr)=>new Promise((Ii,wr)=>{var cn=vn=>{try{Dt(Fr.next(vn))}catch(On){wr(On)}},un=vn=>{try{Dt(Fr.throw(vn))}catch(On){wr(On)}},Dt=vn=>vn.done?Ii(vn.value):Promise.resolve(vn.value).then(cn,un);Dt((Fr=Fr.apply(lr,Ar)).next())}),Le=({visible:lr,onOK:Ar,onCancel:Fr})=>{const[Ii,wr]=(0,it.useState)(!1),[cn,un]=(0,it.useState)(!1),[Dt,vn]=(0,it.useState)("1"),[On,Jt]=(0,it.useState)(""),[Ut,wn]=(0,it.useState)([]),_n=()=>He(void 0,null,function*(){if(!On){ce.ZP.warning(`\u9898\u76EE${Wn}\u4E0D\u80FD\u4E3A\u7A7A`);return}un(!0);const ar=yield(0,ze.ZP)("/api/tag_disciplines.json",{method:"post",body:{target:lr,name:On}});if((ar==null?void 0:ar.status)===0){Ar();return}un(!1)}),Qn=(ar="")=>He(void 0,null,function*(){wr(!0);let mn=yield(0,ze.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:lr,search:ar}});wn(mn.tag_disciplines||[]),wr(!1)}),Jn=ar=>{let mn=ar.name;_e.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u91CD\u547D\u540D",content:it.createElement("div",null,it.createElement(ie.default,{defaultValue:mn,placeholder:`\u8BF7\u8F93\u5165${Wn}\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57`,maxLength:20,onChange:Cn=>{mn=Cn.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>He(void 0,null,function*(){if(!mn)return ce.ZP.warning(`\u9898\u76EE${Wn}\u4E0D\u80FD\u4E3A\u7A7A`),Promise.reject();const Cn=yield(0,ze.ZP)(`/api/tag_disciplines/${ar.id}/rename.json`,{method:"post",body:{id:ar.id,name:mn}});(Cn==null?void 0:Cn.status)===0&&Qn()})})},Wt=ar=>{_e.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,width:570,title:"\u5220\u9664",content:lr==="practice"?it.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u6765\u6E90\u201C",it.createElement("span",{className:"c-light-primary"},ar.name),"\u201D\u5220\u9664\u5417\uFF1F",it.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u6765\u6E90\u8FDB\u884C\u6E05\u9664\u3002"):it.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u77E5\u8BC6\u70B9\u201C",it.createElement("span",{className:"c-light-primary"},ar.name),"\u201D\u5220\u9664\u5417\uFF1F",it.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 mn=yield(0,ze.ZP)(`/api/tag_disciplines/${ar.id}.json`,{method:"delete",body:{id:ar.id}});(mn==null?void 0:mn.status)===0&&Qn()})})},In=ar=>{Qn(ar)},Wn=lr==="practice"?"\u77E5\u8BC6\u70B9":"\u6765\u6E90";return it.createElement(_e.default,{afterClose:()=>{un(!1),wr(!1),Jt(""),vn("1"),wn([])},centered:!0,keyboard:!1,width:600,title:`${Wn}\u7BA1\u7406`,open:!!lr,className:qe.customModal,footer:null,onCancel:Fr},it.createElement("section",{className:qe.wrap},it.createElement(We.default,{activeKey:Dt,onChange:ar=>{Jt(""),vn(ar),Qn()}},it.createElement(We.default.TabPane,{tab:`\u65B0\u589E${Wn}`,key:"1"},it.createElement(ie.default,{value:On,onChange:ar=>Jt(ar.target.value),className:qe.in,placeholder:`\u8F93\u5165${Wn}\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57`,maxLength:20}),it.createElement("div",{className:qe.btns},it.createElement(we.ZP,{onClick:Fr,className:"mr20"},"\u53D6\u6D88 "),it.createElement(we.ZP,{loading:cn,onClick:_n,type:"primary"},"\u786E\u8BA4\u65B0\u5EFA"))),it.createElement(We.default.TabPane,{tab:`\u5DF2\u6709${Wn}`,key:"2"},it.createElement(ie.default.Search,{allowClear:!0,onSearch:In,value:On,onChange:ar=>Jt(ar.target.value),className:qe.in,placeholder:`\u8F93\u5165${Wn}\u540D\u79F0\u8FDB\u884C\u67E5\u8BE2`}),it.createElement(me.default,{dataSource:Ut,bordered:!1,loading:Ii,scroll:Ut.length>7?{y:300}:{},style:{padding:"0 0px 20px 0px"},columns:[{title:`${Wn}\u540D\u79F0`,dataIndex:"name",ellipsis:!0},{title:"\u64CD\u4F5C",dataIndex:"action",width:120,render:(ar,mn)=>it.createElement("span",null,it.createElement("span",{onClick:()=>Jn(mn),className:"current mr10 c-light-primary"},"\u91CD\u547D\u540D"),it.createElement("span",{onClick:()=>Wt(mn),className:"current c-grey-666"},"\u5220\u9664"))}],pagination:!1})))))},Ke=$e(3294),dt=$e(72161),Ve=$e(61186),kt=$e.n(Ve),zt=$e(955),Xt=$e(85149),At=$e(24065),Nt=$e(59301),qt=Object.defineProperty,on=Object.defineProperties,gn=Object.getOwnPropertyDescriptors,kn=Object.getOwnPropertySymbols,Kn=Object.prototype.hasOwnProperty,Xn=Object.prototype.propertyIsEnumerable,hr=(lr,Ar,Fr)=>Ar in lr?qt(lr,Ar,{enumerable:!0,configurable:!0,writable:!0,value:Fr}):lr[Ar]=Fr,dr=(lr,Ar)=>{for(var Fr in Ar||(Ar={}))Kn.call(Ar,Fr)&&hr(lr,Fr,Ar[Fr]);if(kn)for(var Fr of kn(Ar))Xn.call(Ar,Fr)&&hr(lr,Fr,Ar[Fr]);return lr},fr=(lr,Ar)=>on(lr,gn(Ar)),xr=(lr,Ar,Fr)=>new Promise((Ii,wr)=>{var cn=vn=>{try{Dt(Fr.next(vn))}catch(On){wr(On)}},un=vn=>{try{Dt(Fr.throw(vn))}catch(On){wr(On)}},Dt=vn=>vn.done?Ii(vn.value):Promise.resolve(vn.value).then(cn,un);Dt((Fr=Fr.apply(lr,Ar)).next())});const{TextArea:Hr}=ie.default,{confirm:Yr}=_e.default,{Panel:Or}=je.default,bi={loading:!0,user:null,status:0,data:void 0,lastedUpdateTime:0};var Jr=(lr=>(lr[lr.SET_INITAL_DATA=0]="SET_INITAL_DATA",lr[lr.SET_LOADING=1]="SET_LOADING",lr[lr.SET_STATUS=2]="SET_STATUS",lr))(Jr||{});const tt="#### \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 li(lr,Ar){switch(Ar.type){case 0:return dr(dr({},lr),Ar.payload);case 1:return fr(dr({},lr),{loading:Ar.payload});case 2:return fr(dr({},lr),{status:Ar.payload});default:throw new Error}}var Si=()=>{var lr,Ar,Fr;const Ii=(0,Ne.useLocation)(),{id:wr}=(0,Ne.useParams)(),[cn]=ve.default.useForm(),[un,Dt]=(0,it.useState)(),[vn,On]=(0,it.useState)(!1),[Jt,Ut]=(0,it.useState)([]),[wn,_n]=(0,it.useState)([]),[Qn,Jn]=(0,it.useState)([]),[Wt,In]=(0,it.useState)([]),[Wn,ar]=(0,it.useState)([]),[mn,Cn]=(0,it.useState)("C"),[tn,fn]=(0,it.useReducer)(li,bi),{loading:En,data:pn,user:Ln,status:Mn}=tn,Gn=pn==null?void 0:pn.hack_sets,An=(lr=pn==null?void 0:pn.hack)==null?void 0:lr.test_set_average,[sr,hn]=(0,it.useState)(!1),Nr=(0,it.useRef)([]),[Zr,hi]=(0,it.useState)(!1),[yn,Yn]=(0,it.useState)(!1),ir=(0,it.useRef)(!0),[vr,yr]=(0,it.useState)({});(0,it.useEffect)(()=>((0,Ne.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),(0,Ne.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),()=>{(0,Ne.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),(0,Ne.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}),[]),(0,it.useEffect)(()=>{setTimeout(()=>{document.title="\u5728\u7EBF\u5237\u9898"},400)});const Dr=()=>xr(void 0,null,function*(){const Rr=yield(0,ze.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice"}}),jr=yield(0,ze.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice_source"}});_n(Rr.tag_disciplines||[]),Jn(jr.tag_disciplines||[])});var ii=[{language:"C",code:""},{language:"C++",code:""},{language:"Java",code:""},{language:"Python",code:""}];const Br=(0,it.useCallback)(()=>xr(void 0,null,function*(){if(fn({type:1,payload:!0}),wr){const Rr=yield ht(wr),{user:jr,language:_i,practice_sets:Ji,practice_codes:_r,description:Kr,difficulty:Pi,name:gi,open_or_not:Vi,time_limit:io,test_set_average:Gr,test_set_score:Tr,status:Vn,tag_discipline_ids:ai,source_discipline_ids:Qi,item_banks_group_id:zo,is_file:Mo=!1,hide_actual_output:Uo,review_privilege:ca,review_description:Jo,submit_rule:qa}=Rr;yr({review_privilege:ca,status:Vn,review_description:Jo,name:gi}),hn(Uo);const es=Mo?[{input:"",output:"",score:100,position:1}]:Ji;Mo?(Ut(Ji),cn.setFieldsValue({hack_sets:es})):Ut([]),fn({type:0,payload:{loading:!0,user:jr,status:Vn,data:{hack:{difficulty:Pi,name:gi,description:Kr,open_or_not:Vi,time_limit:io,test_set_average:Gr,test_set_score:Tr,tag_discipline_ids:ai,source_discipline_ids:Qi,is_file:Mo,submit_rule:qa},hack_sets:es}}}),Dt({hack:{difficulty:Pi,name:gi,description:Kr,open_or_not:Vi,time_limit:io,test_set_average:Gr,test_set_score:Tr,tag_discipline_ids:ai,source_discipline_ids:Qi,is_file:Mo}});const ma=_r==null?void 0:_r.map(Ql=>fr(dr({},Ql),{code:Oe.Base64.decode(Ql==null?void 0:Ql.code)}));ar(ma),Nr.current=ma}else{const{user:Rr}=yield at();fn({type:0,payload:{loading:!0,status:0,user:Rr,data:{hack:{difficulty:"",time_limit:3,description:tt,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}]}}}),Dt({hack:{difficulty:"",time_limit:3,description:"",test_set_average:!0,open_or_not:!0,name:"",is_file:!1}}),ar(ii),Nr.current=ii}fn({type:1,payload:!1})}),[wr]);(0,it.useEffect)(()=>{try{Br(),Dr()}catch(Rr){console.log(Rr,"----")}},[]);function Cr(Rr,jr){return xr(this,null,function*(){var _i;const{hack_sets:Ji,hack:_r}=dr({},Rr);_r.hide_actual_output=sr;let Kr=[],Pi=[],gi=0;const Vi=_r!=null&&_r.is_file?Jt.map((Tr,Vn)=>fr(dr({},Tr),{position:Vn+1})):Ji.map(Tr=>fr(dr({},Tr),{is_file:!1}));for(let Tr of Vi)gi+=Tr.score,Tr.id&&Tr.id>=0?Kr.push(Tr):Pi.push(Tr);if(!(Vi!=null&&Vi.length)){ce.ZP.error("\u6D4B\u8BD5\u96C6\u4E0D\u80FD\u4E3A\u7A7A");return}if(gi!==100&&!_r.test_set_score){ce.ZP.error("\u6D4B\u8BD5\u96C6\u7684\u8BC4\u5206\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E100");return}if(Vi!=null&&Vi.some(Tr=>!Tr.output)){ce.ZP.error("\u6D4B\u8BD5\u96C6\u8F93\u51FA\u4E0D\u80FD\u4E3A\u7A7A");return}ir.current?hi(!0):Yn(!0);let io;const Gr=Wn==null?void 0:Wn.map(Tr=>fr(dr({},Tr),{code:Oe.Base64.encode(Tr==null?void 0:Tr.code)}));if(wr?io=yield pt(wr,{practice:_r,practice_codes:Gr,practice_sets:Pi,update_practice_sets:Kr}):io=yield Ze({practice:_r,practice_codes:Gr,practice_sets:Vi,publish:!ir.current}),hi(!1),Yn(!1),(io==null?void 0:io.status)===0){if((_i=io==null?void 0:io.similar_practice)!=null&&_i.length){On(!0),In(io==null?void 0:io.similar_practice);return}if(wr){if(ce.ZP.success("\u4FDD\u5B58\u6210\u529F"),!ir.current){const Tr=yield(0,ze.ZP)(`/api/practices/${wr}/start`,{method:"get"});(Tr==null?void 0:Tr.status)===0&&Ne.history.push(`/problems/${Tr==null?void 0:Tr.identifier}/oj/${wr}`)}}else ce.ZP.success("\u65B0\u5EFA\u6210\u529F"),Ne.history.replace(`/problems/${io==null?void 0:io.identifier}/ojedit`)}})}function oi(){Ne.history.replace("/problems")}const Tn=Rr=>{const jr=Math.floor(100/Rr.length),_i=jr+100%Rr.length;Rr=Rr.map((Ji,_r)=>_r===Rr.length-1?fr(dr({},Ji),{score:_i}):fr(dr({},Ji),{score:jr})),Ut(Rr)};function Ri(Rr){Rr.target.value||Tn(Jt),fn({type:0,payload:{data:fr(dr({},pn),{hack:fr(dr({},pn.hack),{test_set_score:Rr.target.value})})}})}function Nn(Rr){fn({type:0,payload:{data:fr(dr({},pn),{hack:fr(dr({},pn.hack),{is_file:Rr.target.value})})}})}function fi(Rr){hn(Rr.target.checked)}function xo(Rr){const jr=Rr.target.value;jr&&Tn(Jt),fn({type:0,payload:{data:fr(dr({},pn),{hack:fr(dr({},pn.hack),{test_set_average:jr})})}})}function zi(){let Rr=cn.getFieldValue("hack_sets");const jr=Rr.length+1,_i=Math.floor(100/jr),Ji=100%jr;Rr.map((_r,Kr)=>(An&&(_r.score=_i),_r.position=Kr+1,_r)),Rr.push({input:"",output:"",position:jr,score:An?_i+Ji:0}),cn.setFieldsValue({hack_sets:Rr}),fn({type:0,payload:{data:fr(dr({},pn),{hack_sets:Rr})}})}(0,it.useEffect)(()=>{if(An){const Rr=Gn==null?void 0:Gn.length,jr=Math.floor(100/Rr),_i=100%Rr;Gn==null||Gn.map((Ji,_r)=>(Ji.score=jr,Ji.position=_r+1,_r===Rr-1&&(Ji.score=jr+_i),Ji)),fn({type:0,payload:{data:fr(dr({},pn),{hack_sets:Gn})}}),cn.setFieldsValue({hack_sets:Gn})}},[An]);function Lo(Rr){let jr=cn.getFieldValue("hack_sets");const _i=(jr==null?void 0:jr.length)-1,Ji=Math.ceil(100/_i),_r=100%_i;jr.splice(Rr,1),jr==null||jr.map((Kr,Pi)=>(An&&(Kr.score=Ji,Pi===_i-1&&(Kr.score=Ji+_r)),Kr.position=Pi+1,Kr)),fn({type:0,payload:{data:fr(dr({},pn),{hack_sets:jr})}}),cn.setFieldsValue({hack_sets:jr})}function yo(Rr){Cn(Rr)}const Ur=Rr=>{var jr;const _i=(jr=Nr.current)==null?void 0:jr.findIndex(Ji=>Ji.language===mn);Nr.current[_i].code=Rr,ar(Nr.current)},$r=Rr=>{Dt(dr({},cn.getFieldsValue()))},Ti=Rr=>xr(void 0,null,function*(){const jr=yield(0,ze.ZP)(`/api/practices/${Rr}/start`,{method:"get"});(jr==null?void 0:jr.status)===0&&(0,zt.xg)(`/problems/${jr==null?void 0:jr.identifier}/oj/${Rr}`)}),Hi=()=>xr(void 0,null,function*(){const Rr=yield ht(wr),{name:jr,status:_i,review_privilege:Ji,review_description:_r}=Rr;yr({review_privilege:Ji,status:_i,review_description:_r,name:jr})}),cr=()=>{let Rr="";_e.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:xt.MdEditor,defaultValue:Rr,onChange:jr=>{Rr=jr}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>xr(void 0,null,function*(){if(!Rr)return ce.ZP.warning("\u4E0D\u901A\u8FC7\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A"),Promise.reject();const jr=yield(0,ze.ZP)(`/api/practices/${wr}/review.json`,{method:"post",body:{op:"fail",description:Rr}});(jr==null?void 0:jr.status)===0&&(ce.ZP.success("\u63D0\u4EA4\u6210\u529F"),Hi())})})},jt=()=>xr(void 0,null,function*(){_e.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u63D0\u793A",content:`\u786E\u8BA4\u5C06\u9898\u76EE\u300A${vr==null?void 0:vr.name}\u300B\u7684\u5BA1\u6838\u901A\u8FC7\u5417\uFF1F`,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>xr(void 0,null,function*(){const Rr=yield(0,ze.ZP)(`/api/practices/${wr}/review.json`,{method:"post",body:{op:"pass"}});(Rr==null?void 0:Rr.status)===0&&(ce.ZP.success("\u63D0\u4EA4\u6210\u529F"),Hi())})})}),ji=()=>{const Rr=_e.default.confirm({icon:null,width:700,className:`${xt.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:()=>Rr.destroy()}))),content:Nt.createElement("div",null,Nt.createElement(Xt.Z,{className:"mt20",value:(vr==null?void 0:vr.review_description)||""}))})};return Nt.createElement(ye.Z,{spinning:En,size:"large",className:xt["oj-custom-large-spin"]},pn?Nt.createElement(it.Fragment,null,Nt.createElement("header",{className:xt.header},Nt.createElement("div",null,Nt.createElement("img",{src:`${Ke.Z.IMG_SERVER}/images/${Ln==null?void 0:Ln.image_url}`,alt:"user",width:30}),Nt.createElement("span",null,Ln==null?void 0:Ln.name)),Nt.createElement("h2",null," ",(Ar=pn==null?void 0:pn.hack)==null?void 0:Ar.name," "),wr?Nt.createElement("a",{className:xt.btn_back,onClick:oi}," ",Nt.createElement(Fe.Z,null),"\u9000\u51FA"):null),Nt.createElement(ve.default,{form:cn,initialValues:pn,layout:"vertical",className:xt["oj-form-container"],onValuesChange:$r,onFinish:Cr},Nt.createElement(ot.Z,{hideResize:!0,className:xt["oj-problems"],leftChild:Nt.createElement(xi,{formValue:un,onRemoveTestCase:Lo,onAddTestCase:zi,hack:pn.hack,onChangeScore:Ri,onChangehide:fi,onChangeAverage:xo,onChangeFile:Nn,uploadData:Jt,setUploadData:Ut,handleUploadRatio:Tn,ischecked:sr,pointData:wn,sourceData:Qn,getPointData:Dr}),rightChild:Nt.createElement(Qe,{value:(Fr=Wn==null?void 0:Wn.find(Rr=>Rr.language===mn))==null?void 0:Fr.code,onChange:Ur,onLanguage:yo,languageItems:Wn,language:mn})}),Nt.createElement("div",{className:xt.footer},!!wr&&Nt.createElement("div",{className:xt.result},Nt.createElement("span",null,"\u5BA1\u6838\u7ED3\u679C:"),vr!=null&&vr.review_privilege?Nt.createElement(Nt.Fragment,null,Nt.createElement("div",{onClick:jt,className:xt.pass},"\u901A\u8FC7"),Nt.createElement("div",{onClick:cr,className:xt.noPass},"\u4E0D\u901A\u8FC7")):Nt.createElement(Nt.Fragment,null,(vr==null?void 0:vr.status)===0&&Nt.createElement("div",{className:xt.passText},Nt.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u53D1\u5E03"),(vr==null?void 0:vr.status)===1&&Nt.createElement("div",{className:xt.passText},Nt.createElement("i",{className:"iconfont icon-tongguo"}),"\u5DF2\u516C\u5F00"),(vr==null?void 0:vr.status)===2&&Nt.createElement("div",{className:xt.passText},Nt.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u5BA1\u6279"),(vr==null?void 0:vr.status)===3&&Nt.createElement("div",{className:xt.passText},Nt.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u4E2D"),(vr==null?void 0:vr.status)===4&&Nt.createElement("div",{className:xt.passText},Nt.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u5B8C\u6210\u5F85\u516C\u5F00"),(vr==null?void 0:vr.status)===5&&Nt.createElement("div",{className:xt.noPassText},Nt.createElement("i",{className:"iconfont icon-weitongguo1"}),"\u5BA1\u6838\u4E0D\u901A\u8FC7",Nt.createElement("span",{onClick:ji},"\u67E5\u770B\u539F\u56E0")))),Nt.createElement(we.ZP,{type:"primary",ghost:!0,onClick:oi},"\u9000\u51FA\u7F16\u8F91"),Nt.createElement(we.ZP,{disabled:yn,loading:Zr,type:"primary",onClick:()=>{ir.current=!0,cn.submit()}},"\u4FDD\u5B58 "),wr?Nt.createElement(we.ZP,{disabled:Zr,loading:yn,style:{background:"#2FC25B",border:0},type:"primary",onClick:()=>{ir.current=!1,cn.submit()}},"\u7ACB\u5373\u4F53\u9A8C"):Nt.createElement(we.ZP,{disabled:Zr,loading:yn,type:"primary",onClick:()=>{ir.current=!1,cn.submit()}},"\u4FDD\u5B58\u5E76\u53D1\u5E03\u5BA1\u6838")))):null,Nt.createElement(_e.default,{centered:!0,destroyOnClose:!0,footer:null,open:vn,onCancel:()=>On(!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:Wt,bordered:!1,scroll:Wt.length>7?{y:300}:{},columns:[{title:"\u76F8\u4F3C\u9898\u9898\u76EE",dataIndex:"name",ellipsis:!0,render:(Rr,jr)=>Nt.createElement("span",{onClick:()=>Ti(jr==null?void 0:jr.identifier),style:{textDecorationLine:"underline"},className:"current c-light-primary"},Rr)},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"create_time",width:170,render:Rr=>{var jr;return(jr=kt()(Rr))==null?void 0:jr.format("YYYY-MM-DD HH:mm")}}],pagination:!1}))))};function xi({ischecked:lr,formValue:Ar,hack:Fr,onChangeAverage:Ii,onChangeScore:wr,onChangehide:cn,onChangeFile:un,onAddTestCase:Dt,onRemoveTestCase:vn,uploadData:On,setUploadData:Jt,handleUploadRatio:Ut,pointData:wn,sourceData:_n,getPointData:Qn}){var Jn,Wt;const{test_set_average:In,test_set_score:Wn}=Fr,[ar,mn]=(0,it.useState)(!1),[Cn,tn]=(0,it.useState)(!1),fn=(An,sr)=>{const hn=[...On];hn.splice(sr,1),In?Ut(hn):Jt(hn)},En=(An,sr)=>{console.log(An,sr);const hn=On.map((Nr,Zr)=>Zr===sr?fr(dr({},Nr),{score:An.target.value?Number(An.target.value):0}):Nr);Jt(hn)},pn=An=>{const sr=On.concat(An);Fr.test_set_average?Ut(sr):Jt(sr)};function Ln(An){An.stopPropagation()}function Mn(){if((0,At.Ny)()){tn("practice");return}let An="";_e.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:sr=>{An=sr.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>xr(this,null,function*(){const sr=yield(0,ze.ZP)("/api/tag_disciplines.json",{method:"post",body:{target:"practice",name:An}});(sr==null?void 0:sr.status)===0&&Qn()})})}function Gn(){if((0,At.Ny)()){tn("practice_source");return}let An="";_e.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:sr=>{An=sr.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>xr(this,null,function*(){const sr=yield(0,ze.ZP)("/api/tag_disciplines.json",{method:"post",body:{target:"practice_source",name:An}});(sr==null?void 0:sr.status)===0&&Qn()})})}return Nt.createElement("div",{className:xt["oj-left-panel"]},Nt.createElement("div",{className:xt["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:xt.inputOne},Nt.createElement(ie.default,{bordered:!1,maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0",suffix:Nt.createElement("span",null,((Wt=(Jn=Ar==null?void 0:Ar.hack)==null?void 0:Jn.name)==null?void 0:Wt.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:xt.row},Nt.createElement("div",{className:xt.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:xt.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:An=>An.parentNode},_n.map(An=>Nt.createElement(xe.default.Option,{key:An.id,value:An.id},An.name)))),Nt.createElement(we.ZP,{style:{padding:"0 18px"},type:"primary",ghost:!0,onClick:()=>Gn()},(0,At.Ny)()?"\u6765\u6E90\u7BA1\u7406":"\u65B0\u5EFA\u6765\u6E90"))),Nt.createElement("div",{className:xt.row},Nt.createElement("div",{className:xt.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:An=>An.parentNode},wn.map(An=>Nt.createElement(xe.default.Option,{key:An.id,value:An.id},An.name)))),Nt.createElement(we.ZP,{type:"primary",ghost:!0,onClick:()=>Mn()},(0,At.Ny)()?"\u77E5\u8BC6\u70B9\u7BA1\u7406":"\u65B0\u5EFA\u77E5\u8BC6\u70B9"))),Nt.createElement("div",{className:xt.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:xt.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",!Fr.is_file&&Nt.createElement(we.ZP,{style:{height:40},type:"primary",ghost:!0,onClick:Dt},"\u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B")),Nt.createElement(ve.default.Item,{name:["hack","test_set_score"]},Nt.createElement(z.ZP.Group,{onChange:wr},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:lr,onChange:cn},"\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:xt.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"))),!Fr.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:Ii},Nt.createElement(z.ZP,{value:!0},"\u5747\u5206\u6BD4\u4F8B"),Nt.createElement(z.ZP,{value:!1},"\u81EA\u5B9A\u4E49\u6BD4\u4F8B"))),Fr.is_file&&Nt.createElement("div",{className:xt.upBtn},Nt.createElement(we.ZP,{ghost:!0,type:"primary",className:"mb20",onClick:()=>mn(!0)},"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"),Nt.createElement(dt.Y2,{disabled:Fr==null?void 0:Fr.test_set_average,inputChange:En,showScore:!Fr.test_set_score,data:On,onRemove:fn})),!Fr.is_file&&Nt.createElement(ve.default.List,{name:"hack_sets"},(An,{})=>Nt.createElement(je.default,{accordion:!0},An.map((sr,hn)=>Nt.createElement(Or,{key:`${sr.key}--${hn}`,header:Nt.createElement("a",{className:xt["test-case-name"]},Nt.createElement("span",null,"\u6D4B\u8BD5\u7528\u4F8B",hn+1),Wn?null:Nt.createElement(Nt.Fragment,null,Nt.createElement(ve.default.Item,{name:[sr.name,"score"],fieldKey:[sr.fieldKey,"score"],rules:[{required:!0,message:`\u8BF7\u8F93\u5165\u6D4B\u8BD5\u96C6${hn+1}\u8BC4\u5206`}]},Nt.createElement(fe.Z,{onClick:Ln,min:0,max:100,disabled:In})),Nt.createElement("span",null,"%"))),extra:hn>0?Nt.createElement("div",{onClick:Ln},Nt.createElement(re.Z,{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u5B9A\u5220\u9664\u6D4B\u8BD5\u96C6\b"+(hn+1),onConfirm:()=>{vn(hn)}},Nt.createElement(Re.Z,{className:xt["btn-remove-case"]}))):null},Nt.createElement(ve.default.Item,{label:"\u8F93\u5165",name:[sr.name,"input"],fieldKey:[sr.fieldKey,"input"]},Nt.createElement(Hr,null)),Nt.createElement(ve.default.Item,{label:"\u8F93\u51FA",name:[sr.name,"output"],fieldKey:[sr.fieldKey,"output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},Nt.createElement(Hr,null)))))))),Nt.createElement(dt.ZP,{rootIdentifier:null,visible:ar,onClose:()=>mn(!1),onOK:pn}),Nt.createElement(Le,{visible:Cn,onCancel:()=>{tn(!1),Qn()},onOK:()=>{tn(!1),Qn()}}))}},72161:function(Pn,an,$e){"use strict";$e.d(an,{Y2:function(){return ht},ZP:function(){return pt}});var it=$e(59301),xt=$e(54580),ie=$e(8591),_e=$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(81939),ee=$e(99064),ae=$e(1012),re=$e(955),le=$e(23210),ue=$e(59301),pe=Object.defineProperty,Ee=Object.defineProperties,Pe=Object.getOwnPropertyDescriptors,Ie=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable,Oe=(Mt,et,ot)=>et in Mt?pe(Mt,et,{enumerable:!0,configurable:!0,writable:!0,value:ot}):Mt[et]=ot,Fe=(Mt,et)=>{for(var ot in et||(et={}))ke.call(et,ot)&&Oe(Mt,ot,et[ot]);if(Ie)for(var ot of Ie(et))Ne.call(et,ot)&&Oe(Mt,ot,et[ot]);return Mt},Re=(Mt,et)=>Ee(Mt,Pe(et)),Ye=(Mt,et,ot)=>new Promise((wt,Et)=>{var Tt=yt=>{try{gt(ot.next(yt))}catch(It){Et(It)}},vt=yt=>{try{gt(ot.throw(yt))}catch(It){Et(It)}},gt=yt=>yt.done?wt(yt.value):Promise.resolve(yt.value).then(Tt,vt);gt((ot=ot.apply(Mt,et)).next())});const{Dragger:ze}=xt.default,Ze=Mt=>{const et=It=>It&&It.substring(0,It.lastIndexOf("."));for(var ot=[...Mt],wt=0,Et=[],Tt=0;Tt<ot.length;Tt++){for(var vt="",gt=0;gt<Et.length;gt++)if(et(Et[gt][0].name)==et(ot[Tt].name)){wt=1,vt=gt;break}if(wt==1)Et[vt].push(ot[Tt]),wt=0;else if(wt==0){let It=new Array;It.push(ot[Tt]),Et.push(It)}}return Et.map(It=>{if(It.forEach(Ot=>{let Vt=Ot.name.split(/\.(?=[^\.]+$)/);Ot.name=`${Vt[0]}.${Vt[1].toLowerCase()}`}),It[0].name.includes(".in"))return It.length===2?It:[It[0],{}];if(It[0].name.includes(".out"))return It.length===2?It.reverse():[{},It[0]]})},at=({onClose:Mt,onOK:et,visible:ot,wrapClassName:wt,rootIdentifier:Et,multiple:Tt=!1,defaultMultipleValue:vt=!0})=>{const[gt,yt]=(0,it.useState)([]),[It,Ot]=(0,it.useState)({}),[Vt,Ct]=(0,it.useState)(!1),[mt,nt]=(0,it.useState)(!0),ft=(0,it.useRef)([]),Xe=(0,it.useRef)(0),ut=()=>{Mt()};(0,it.useEffect)(()=>{bt()},[]),(0,it.useEffect)(()=>{ot&&(ft.current=[],Xe.current=0,yt([]),nt(vt))},[ot]);const bt=()=>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));Ot(Le)}catch(De){}}),St=De=>De&&De.substring(0,De.lastIndexOf(".")),lt=De=>{var Le,Ke;const dt=St((Le=De[0])==null?void 0:Le.name)||St((Ke=De[1])==null?void 0:Ke.name),Ve=gt.filter(kt=>St(kt.name)!==dt);ft.current=[...Ve],yt([...Ve])},Qe=De=>{if(!mt){const zt=new FormData;zt.append("file",De.file),(0,ee.ZP)("/api/attachments/get_file_content.json",{method:"post",body:zt},!0).then(At=>{if(At.status===0){Xe.current=Xe.current+1;const Nt=ft.current.map(qt=>{var on;if(qt.name===De.name){const gn=Fe({},qt);return(on=De==null?void 0:De.name)!=null&&on.includes(".in")?gn.input=At==null?void 0:At.content:gn.output=At==null?void 0:At.content,gn}return qt});if(ft.current=[...Nt],yt([...Nt]),Xe.current>0&&Xe.current===gt.length){Ct(!1);let qt=Ze(Nt);qt=qt.filter(on=>{var gn,kn;return!!((gn=on[0])!=null&&gn.name&&((kn=on[1])!=null&&kn.name))}),qt=qt.map(on=>Re(Fe(Fe({},on[0]),on[1]),{is_file:!1})),et(qt),Mt()}}else Ct(!1),Mt()});return}const Le=new(fe())({endpoint:It.end_point,region:It.region,accessKeyId:It.access_key_id,accessKeySecret:It.access_key_secret,bucket:It.bucket,stsToken:It.security_token}),Ke=De.name,dt={container_type:"TestSet",file_name:Ke},Ve=(0,ae.Z)();let kt=`testsets/${Et}/${Ve}${Ke.indexOf(".")>-1?"."+Ke.split(".").pop():""}`;Et===null&&(kt=`testsets/${Ve}${Ke.indexOf(".")>-1?"."+Ke.split(".").pop():""}`),Le.multipartUpload(kt,new Blob([De.file],{type:De.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:Ke+""},url:It==null?void 0:It.callback_url,host:It==null?void 0:It.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,ee.rz)(dt)}}).then(function(zt){if(zt.data.status===0){Xe.current=Xe.current+1;const Xt=ft.current.map(At=>{var Nt,qt,on,gn,kn,Kn,Xn,hr,dr,fr,xr,Hr,Yr,Or,bi,Jr,tt;if(At.name===((qt=(Nt=zt.data)==null?void 0:Nt.data)==null?void 0:qt.file_name)){const li=Fe({},At);return(kn=(gn=(on=zt.data)==null?void 0:on.data)==null?void 0:gn.file_name)!=null&&kn.includes(".in")?(li.in_object_key=(Xn=(Kn=zt.data)==null?void 0:Kn.data)==null?void 0:Xn.object,li.in_object_size=(dr=(hr=zt.data)==null?void 0:hr.data)==null?void 0:dr.size,li.input=(xr=(fr=zt.data)==null?void 0:fr.data)==null?void 0:xr.file_name,li.in_file=De):(li.out_object_key=(Yr=(Hr=zt.data)==null?void 0:Hr.data)==null?void 0:Yr.object,li.out_object_size=(bi=(Or=zt.data)==null?void 0:Or.data)==null?void 0:bi.size,li.output=(tt=(Jr=zt.data)==null?void 0:Jr.data)==null?void 0:tt.file_name,li.out_file=De),li}return At});if(ft.current=[...Xt],yt([...Xt]),Xe.current>0&&Xe.current===gt.length){Ct(!1);let At=Ze(Xt);At=At.filter(Nt=>{var qt,on;return!!((qt=Nt[0])!=null&&qt.name&&((on=Nt[1])!=null&&on.name))}),At=At.map(Nt=>Re(Fe(Fe({},Nt[0]),Nt[1]),{is_file:!0})),et(At),Mt()}}})},Ue=De=>new Promise((Le,Ke)=>{let dt=0,Ve=[];for(let kt=0;kt<De.length;kt++)De[kt].file.slice(0,1).arrayBuffer().then(()=>{dt++,dt===De.length&&(Ve.length?(ie.ZP.warning(`${Ve.join("\uFF0C")}\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01`),Ke()):Le(De))}).catch(zt=>{console.log("\u9519\u8BEF\u4FE1\u606F\uFF1A",zt),dt++,Ve.push(De[kt].name),dt===De.length&&(Ve.length?(ie.ZP.warning(`${Ve.join("\uFF0C")}\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01`),Ke()):Le(De))})}),We=()=>Ye(void 0,null,function*(){if(gt.length===0){ie.ZP.warning("\u8BF7\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6");return}if(yield Ue(gt),Ct(!0),Ze(gt).some(Le=>{var Ke,dt;return!((Ke=Le[0])!=null&&Ke.name&&((dt=Le[1])!=null&&dt.name))})){_e.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*(){gt.map(Le=>Ye(void 0,null,function*(){Qe(Le)}))}),onCancel:()=>{Ct(!1)}});return}gt.map(Le=>Ye(void 0,null,function*(){Qe(Le)}))}),qe={name:"file",fileList:gt,multiple:!0,accept:".in, .out",showUploadList:!1,beforeUpload:De=>{if(gt!=null&>.some(Ke=>Ke.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 gt.push(Le),ft.current=[...gt],yt([...gt]),!1}},He=Ze(gt);return console.log(gt,He,"fileList"),ue.createElement(_e.default,{open:ot,wrapClassName:wt,onOk:We,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:Vt},onCancel:ut,width:730,title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},ue.createElement("div",{className:we.wrap},gt.length?ue.createElement("div",null,ue.createElement(je.Z,{justify:"space-between",align:"middle",style:{marginBottom:40}},ue.createElement("div",{style:{visibility:Tt?"visible":"hidden"}},ue.createElement("span",{className:we.greyText},"\u7528\u4F8B\u7C7B\u578B"),ue.createElement(ve.ZP.Group,{className:`ml20 ${we.testCaseRadio}`,optionType:"button",value:mt,onChange:De=>nt(De.target.value)},ue.createElement(ve.ZP,{value:!1},"\u6587\u672C"),ue.createElement(ve.ZP,{value:!0},"\u6587\u4EF6"))),ue.createElement(xt.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(xt.default.Dragger,Re(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:Mt=[],onRemove:et,width:ot="auto",showScore:wt=!1,disabled:Et=!1,inputChange:Tt,onEvaluatingChange:vt,onSelectAll:gt,checkAll1:yt,checkAll2:It,checkAll3:Ot,checkAll4:Vt,checkAll5:Ct,showEvaluatingSetting:mt=!1,className:nt="",isProgramHomework:ft=!1})=>{const Xe={value:"",filename:"",dataUrl:""},[ut,bt]=(0,it.useState)(Fe({},Xe)),St=Ue=>{let We=document.createElement("a");document.body.appendChild(We);let qe=URL.createObjectURL(Ue.file);We.href=qe,We.download=Ue.name,We.click(),URL.revokeObjectURL(qe),document.body.removeChild(We)},lt=(Ue,We)=>{(0,re.LR)(Ue,We)},Qe=(Ue,We)=>{_e.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(Ue,We)},onCancel:()=>{}})};return Mt.length?ue.createElement("div",{className:nt,style:{width:ot}},ue.createElement("div",{className:`${ft?we.headProgram:we.head}`},mt&&ue.createElement("div",{style:{width:"15%",display:"flex",alignItems:"center"}},ue.createElement(be.default,{checked:yt,onChange:Ue=>{gt(Ue.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:ft?"25%":"15%"}},"\u7528\u4F8B"),ue.createElement("div",{style:{width:wt?ft?"20%":"15%":"25%",padding:"0 12px"}},"\u8F93\u5165"),ue.createElement("div",{style:{width:wt?ft?"20%":"15%":"25%",padding:"0 12px"}},"\u8F93\u51FA"),wt&&ue.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),mt&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(be.default,{checked:Vt,onChange:Ue=>{gt(Ue.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"}))),mt&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(be.default,{checked:It,onChange:Ue=>{gt(Ue.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"}))),mt&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(be.default,{checked:Ct,onChange:Ue=>{gt(Ue.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"}))),mt&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(be.default,{checked:Ot,onChange:Ue=>{gt(Ue.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:ft?{flex:1,textAlign:"right"}:{width:"10%"}},"\u64CD\u4F5C")),ue.createElement("div",{className:we.listWrapper,style:{boxShadow:ft?"0px 2px 4px 0px #EAEEF4":"unset"}},Mt.map((Ue,We)=>{var qe,He,De,Le;return ue.createElement("div",{key:We,className:we.list,style:ft?{marginBottom:"0px",height:"66px",borderBottom:"1px solid #F6F7F8"}:{}},mt&&ue.createElement("div",{style:{width:"15%"}},ue.createElement(be.default,{checked:!!Ue.hidden,onChange:Ke=>{vt(Ke.target.checked,We,"hidden")}})),ue.createElement("div",{style:{width:ft?"25%":"15%",paddingLeft:ft?"5px":"0px",paddingRight:ft?"5px":"0px"}},"\u6D4B\u8BD5\u7528\u4F8B",We+1),ue.createElement("div",{className:we.info,style:{width:wt?ft?"20%":"15%":"25%"}},ue.createElement("span",{title:Ue.input||((qe=Ue[0])==null?void 0:qe.name),onClick:()=>Ye(void 0,null,function*(){let Ke;Ue.input?Ue.input_file_url?Ke=Ue.input_file_url:Ke=Ue.in_file:Ke=Ue[0];let dt;typeof Ke=="string"?(dt=yield fetch(Ke,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}}),bt({value:yield dt.text(),filename:"",dataUrl:Ke})):(dt=yield(0,re.db)(Ke.file),bt({value:dt.text,filename:Ke.name,dataUrl:dt.link}))})},Ue.input||((He=Ue[0])==null?void 0:He.name))),ue.createElement("div",{className:we.info,style:{width:wt?ft?"20%":"15%":"25%"}},ue.createElement("span",{title:Ue.output||((De=Ue[1])==null?void 0:De.name),onClick:()=>Ye(void 0,null,function*(){let Ke;Ue.input?Ue.output_file_url?Ke=Ue.output_file_url:Ke=Ue.out_file:Ke=Ue[1];let dt;typeof Ke=="string"?(dt=yield fetch(Ke,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}}),bt({value:yield dt.text(),filename:"",dataUrl:Ke})):(dt=yield(0,re.db)(Ke.file),bt({value:dt.text,filename:Ke.name,dataUrl:dt.link}))})},Ue.output||((Le=Ue[1])==null?void 0:Le.name))),wt&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(ye.default,{size:"large",addonAfter:ft?"%":null,disabled:Et,style:{width:"80%"},onChange:Ke=>Tt(Ke,We),value:Ue.score}),!ft&&ue.createElement("span",null,"\xA0%")),mt&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(be.default,{checked:Ue.input_visible||!1,onChange:Ke=>{vt(Ke.target.checked,We,"input_visible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),mt&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(be.default,{checked:Ue.is_invisible||!1,onChange:Ke=>{vt(Ke.target.checked,We,"is_invisible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),mt&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(be.default,{checked:Ue.actual_output_visible||!1,onChange:Ke=>{vt(Ke.target.checked,We,"actual_output_visible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),mt&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(be.default,{checked:Ue.last_match_rule||!1,onChange:Ke=>{vt(Ke.target.checked,We,"last_match_rule")},className:"font14"},"\u672B\u5C3E\u5339\u914D")),ue.createElement("div",{onClick:()=>Qe(Ue,We),style:ft?{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:()=>bt(Fe({},Xe)),monacoEditor:{value:ut.value,language:"txt",onChange:()=>{},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}})):ue.createElement(ue.Fragment,null)};var pt=at},24768:function(Pn,an,$e){"use strict";$e.d(an,{AL:function(){return pe},Iy:function(){return we},Qv:function(){return fe},ez:function(){return ue},jb:function(){return me}});var it=$e(32834),xt=$e.n(it),ie=$e(11690),_e=$e.n(ie);let je=1;function ve(Ne,Oe){const Fe=Ne.match(/^(\s+)(?:```)/);if(Fe===null)return Oe;const Re=Fe[1];return Oe.split(`
|
|
|
`).map(Ye=>{const ze=Ye.match(/^\s+/);if(ze===null)return Ye;const[Ze]=ze;return Ze.length>=Re.length?Ye.slice(Re.length):Ye}).join(`
|
|
|
`)}let ce=[],be=["<ul>"];const Ce=new(xt()).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(Ne,Oe,Fe,Re){if(Oe>=Ne.length||Ne[Oe].level<=Fe)return Oe;var Ye=Ne[Oe];Re.push("<li><a href='#"+je+Ye.anchor+"'>"+Ye.text+"</a>"),Oe++;var ze=[];return Oe=xe(Ne,Oe,Ye.level,ze),ze.length>0&&(Re.push("<ul>"),ze.forEach(function(Ze){Re.push(Ze)}),Re.push("</ul>")),Re.push("</li>"),Oe=xe(Ne,Oe,Fe,Re),Oe}function fe(){return xe(ce,0,0,be),be.push("</ul>"),be.join("")}const z={heading(Ne){const Oe=ye.exec(Ne);if(je+=1,Oe)return{type:"heading",raw:Oe[0],depth:Oe[1].length,text:Oe[2]}},fences(Ne){const Oe=this.rules.block.fences.exec(Ne);if(Oe){const Fe=Oe[0];let Re=ve(Fe,Oe[3]||"");const Ye=Oe[2]?Oe[2].trim():Oe[2];if(["latex","katex","math"].indexOf(Ye)>=0){const ze=re(),Ze=Re;Re=ze,le[ze]={type:"block",expression:Ze}}return{type:"code",raw:Fe,lang:Ye,text:Re}}}},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(Ne){return Ne=Ne.replace(ee,(Oe,Fe)=>{const Re=re();return le[Re]={type:"inline",expression:Fe},Re}),Ne}const Pe=Ce.listitem;Ce.listitem=function(Ne){return Pe(Ee(Ne))};const Ie=Ce.paragraph;Ce.paragraph=function(Ne){return Ie(Ee(Ne))};const ke=Ce.tablecell;Ce.tablecell=function(Ne,Oe){return ke(Ee(Ne),Oe)},Ce.code=function(Ne,Oe,Fe){const Re=(Oe||"").match(/\S*/)[0];return Re?["latex","katex","math"].indexOf(Re)>=0?`<p class='editormd-tex'>${Ne}</p>`:`<pre class="prettyprint linenums"><code class="language-${Oe}">${Fe?Ne:(0,ie.escape)(Ne,!0)}</code></pre>
|
|
|
`:'<pre class="prettyprint linenums"><code>'+(Fe?Ne:(0,ie.escape)(Ne,!0))+"</code></pre>"},Ce.heading=function(Ne,Oe,Fe){let Re=this.options.headerPrefix+Fe.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ce.push({anchor:Re,level:Oe,text:Ne}),"<h"+Oe+' id="'+je+Re+'">'+Ne+"</h"+Oe+">"},xt().setOptions({silent:!0,gfm:!0,pedantic:!1}),xt().use({tokenizer:z,renderer:Ce}),an.ZP=xt()},16479:function(Pn,an,$e){"use strict";$e.d(an,{G:function(){return je},t:function(){return _e}});var it=$e(7062),xt=$e.n(it);const ie=null;function _e(ve,ce){let be=xt().get("__ec");be||(be={}),be[ve]=ce,xt().set("__ec",be)}function je(ve,ce){let be=xt().get("__ec");return be?be[ve]===void 0?ce:be[ve]:ce}},47257:function(Pn){(function(an){(function($e){if(1)Pn.exports=$e();else var it})(function(){var $e,it,xt;return function(){function ie(_e,je,ve){function ce(ye,we){if(!je[ye]){if(!_e[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:{}};_e[ye][0].call(fe.exports,function(z){var ee=_e[ye][1][z];return ce(ee||z)},fe,fe.exports,ie,_e,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,_e,je){"use strict";var ve=ie("./browser/client");ve.Buffer=ie("buffer").Buffer,ve.urllib=ie("../shims/xhr"),ve.version=ie("./browser/version").version,_e.exports=ve},{"../shims/xhr":475,"./browser/client":3,"./browser/version":6,buffer:90}],2:[function(ie,_e,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,Ne,Oe,Fe,Re,Ye;return ce.default.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:for(le=le||[],Ce(le.length,"rules is required"),le.forEach(function(at){Ce(at.allowedOrigin,"allowedOrigin is required"),Ce(at.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>")},Ne=function(ht){Ee+="<ExposeHeader>".concat(ht,"</ExposeHeader>")},Oe=0,Fe=le.length;Oe<Fe;Oe++)Re=le[Oe],Ee+="<CORSRule>",fe(Re.allowedOrigin).forEach(Pe),fe(Re.allowedMethod).forEach(Ie),fe(Re.allowedHeader).forEach(ke),fe(Re.exposeHeader).forEach(Ne),Re.maxAgeSeconds&&(Ee+="<MaxAgeSeconds>".concat(Re.maxAgeSeconds,"</MaxAgeSeconds>")),Ee+="</CORSRule>";return Ee+="</CORSConfiguration>",pe.content=Ee,pe.mime="xml",pe.successStatuses=[200],Ze.next=16,this.request(pe);case 16:return Ye=Ze.sent,Ze.abrupt("return",{res:Ye.res});case 18:case"end":return Ze.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(Ne){var Oe={};Object.keys(Ne).forEach(function(Fe){Oe[Fe.slice(0,1).toLowerCase()+Fe.slice(1,Fe.length)]=Ne[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,_e,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,Ne=ie("../common/client/getReqUrl"),Oe=Ne.getReqUrl,Fe=ie("../common/utils/setSTSToken"),Re=Fe.setSTSToken,Ye=ie("../common/utils/retry"),ze=Ye.retry,Ze=ie("../common/utils/isFunction"),at=Ze.isFunction,ht=new xe;function pt(){var Tt=z.name,vt=z.version;Tt&&Tt.toLowerCase&&Tt.toLowerCase()==="ie"&&vt.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function Mt(){return location&&location.protocol==="https:"}function et(Tt,vt){if(pt(),!(this instanceof et))return new et(Tt,vt);Tt&&Tt.inited?this.options=Tt:this.options=et.initOptions(Tt),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=ae,this.agent=this.options.agent||ht),this.ctx=vt,this.userAgent=this._getUserAgent(),this.stsTokenFreshTime=new Date,this.options.amendTimeSkewed=0}_e.exports=et,et.initOptions=function(vt){vt.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var gt=Object.assign({secure:Mt(),useFetch:!1},vt);return pe(gt)};var ot=et.prototype;ot.debug=we,fe(ot,ie("./object")),fe(ot,ie("./bucket")),fe(ot,ie("../common/bucket/getBucketWebsite")),fe(ot,ie("../common/bucket/putBucketWebsite")),fe(ot,ie("../common/bucket/deleteBucketWebsite")),fe(ot,ie("../common/bucket/getBucketLifecycle")),fe(ot,ie("../common/bucket/putBucketLifecycle")),fe(ot,ie("../common/bucket/deleteBucketLifecycle")),fe(ot,ie("../common/bucket/putBucketVersioning")),fe(ot,ie("../common/bucket/getBucketVersioning")),fe(ot,ie("../common/bucket/getBucketInventory")),fe(ot,ie("../common/bucket/deleteBucketInventory")),fe(ot,ie("../common/bucket/listBucketInventory")),fe(ot,ie("../common/bucket/putBucketInventory")),fe(ot,ie("../common/bucket/abortBucketWorm")),fe(ot,ie("../common/bucket/completeBucketWorm")),fe(ot,ie("../common/bucket/extendBucketWorm")),fe(ot,ie("../common/bucket/getBucketWorm")),fe(ot,ie("../common/bucket/initiateBucketWorm")),fe(ot,ie("./managed-upload")),fe(ot,ie("../common/multipart-copy")),fe(ot,ie("../common/multipart")),fe(ot,ie("../common/parallel")),ot.signature=function(vt){return this.debug("authorization stringToSign: %s",vt,"info"),ue.computeSignature(this.options.accessKeySecret,vt,this.options.headerEncoding)},ot._getReqUrl=Oe,ot.authorization=function(vt,gt,yt,It){var Ot=ue.buildCanonicalString(vt.toUpperCase(),gt,{headers:It,parameters:yt});return ue.authorization(this.options.accessKeyId,this.options.accessKeySecret,Ot,this.options.headerEncoding)},ot.request=function(){var Tt=(0,ye.default)(Ce.default.mark(function vt(gt){var yt=this;return Ce.default.wrap(function(Ot){for(;;)switch(Ot.prev=Ot.next){case 0:if(!this.options.retryMax){Ot.next=6;break}return Ot.next=3,ze(wt.bind(this),this.options.retryMax,{errorHandler:function(Ct){var mt=function(ft){if(gt.stream)return!1;var Xe=[-1,-2].includes(ft.status),ut=yt.options.requestErrorRetryHandle||function(){return!0};return Xe&&ut(ft)};return!!mt(Ct)}})(gt);case 3:return Ot.abrupt("return",Ot.sent);case 6:return Ot.abrupt("return",wt.call(this,gt));case 7:case"end":return Ot.stop()}},vt,this)}));return function(vt){return Tt.apply(this,arguments)}}();function wt(Tt){return Et.apply(this,arguments)}function Et(){return Et=(0,ye.default)(Ce.default.mark(function Tt(vt){var gt,yt,It,Ot,Vt,Ct;return Ce.default.wrap(function(nt){for(;;)switch(nt.prev=nt.next){case 0:if(!(this.options.stsToken&&at(this.options.refreshSTSToken))){nt.next=3;break}return nt.next=3,Re.call(this);case 3:return gt=Pe.call(this,vt),this.options.useFetch||(gt.params.mode="disable-fetch"),Ot=!!vt.stream,nt.prev=6,nt.next=9,this.urllib.request(gt.url,gt.params);case 9:yt=nt.sent,this.debug("response %s %s, got %s, headers: %j",vt.method,gt.url,yt.status,yt.headers,"info"),nt.next=16;break;case 13:nt.prev=13,nt.t0=nt.catch(6),It=nt.t0;case 16:if(!(yt&&vt.successStatuses&&vt.successStatuses.indexOf(yt.status)===-1)){nt.next=28;break}return nt.next=19,this.requestError(yt);case 19:if(Vt=nt.sent,!(Vt.code==="RequestTimeTooSkewed"&&!Ot)){nt.next=25;break}return this.options.amendTimeSkewed=+new Date(Vt.serverTime)-new Date,nt.next=24,this.request(vt);case 24:return nt.abrupt("return",nt.sent);case 25:Vt.params=vt,nt.next=32;break;case 28:if(!It){nt.next=32;break}return nt.next=31,this.requestError(It);case 31:Vt=nt.sent;case 32:if(!Vt){nt.next=34;break}throw Vt;case 34:if(!vt.xmlResponse){nt.next=39;break}return nt.next=37,this.parseXML(yt.data);case 37:Ct=nt.sent,yt.data=Ct;case 39:return nt.abrupt("return",yt);case 40:case"end":return nt.stop()}},Tt,this,[[6,13]])})),Et.apply(this,arguments)}ot._getResource=function(vt){var gt="/";return vt.bucket&&(gt+="".concat(vt.bucket,"/")),vt.object&&(gt+=ke(vt.object,this.options.headerEncoding)),gt},ot._escape=function(vt){return ee.encodeURIComponent(vt).replace(/%2F/g,"/")},ot._getUserAgent=function(){var vt=ce&&ce.browser?"js":"nodejs",gt="aliyun-sdk-".concat(vt,"/").concat(re.version),yt=z.description;return!yt&&ce&&(yt="Node.js ".concat(ce.version.slice(1)," on ").concat(ce.platform," ").concat(ce.arch)),this._checkUserAgent("".concat(gt," ").concat(yt))},ot._checkUserAgent=function(vt){var gt=vt.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return gt},ot.checkBrowserAndVersion=function(vt,gt){return le.name===vt&&le.version.split(".")[0]===gt},ot.parseXML=function(vt){return new Promise(function(gt,yt){ve.isBuffer(vt)&&(vt=vt.toString()),me.parseString(vt,{explicitRoot:!1,explicitArray:!1},function(It,Ot){It?yt(It):gt(Ot)})})},ot.requestError=function(){var Tt=(0,ye.default)(Ce.default.mark(function gt(yt){var It,Ot,Vt,Ct;return Ce.default.wrap(function(nt){for(;;)switch(nt.prev=nt.next){case 0:if(It=null,!(!yt.data||!yt.data.length)){nt.next=5;break}yt.status===-1||yt.status===-2?(It=new Error(yt.message),It.name=yt.name,It.status=yt.status,It.code=yt.name):(yt.status===404?(It=new Error("Object not exists"),It.name="NoSuchKeyError",It.status=404,It.code="NoSuchKey"):yt.status===412?(It=new Error("Pre condition failed"),It.name="PreconditionFailedError",It.status=412,It.code="PreconditionFailed"):(It=new Error("Unknow error, status: ".concat(yt.status)),It.name="UnknownError",It.status=yt.status),It.requestId=yt.headers["x-oss-request-id"],It.host=""),nt.next=32;break;case 5:return Ot=String(yt.data),this.debug("request response error data: %s",Ot,"error"),nt.prev=7,nt.next=10,this.parseXML(Ot);case 10:if(nt.t0=nt.sent,nt.t0){nt.next=13;break}nt.t0={};case 13:Vt=nt.t0,nt.next=23;break;case 16:return nt.prev=16,nt.t1=nt.catch(7),this.debug(Ot,"error"),nt.t1.message+=`
|
|
|
raw xml: `.concat(Ot),nt.t1.status=yt.status,nt.t1.requestId=yt.headers["x-oss-request-id"],nt.abrupt("return",nt.t1);case 23:Ct=Vt.Message||"unknow request error, status: ".concat(yt.status),Vt.Condition&&(Ct+=" (condition: ".concat(Vt.Condition,")")),It=new Error(Ct),It.name=Vt.Code?"".concat(Vt.Code,"Error"):"UnknownError",It.status=yt.status,It.code=Vt.Code,It.requestId=Vt.RequestId,It.hostId=Vt.HostId,It.serverTime=Vt.ServerTime;case 32:return this.debug("generate error %j",It,"error"),nt.abrupt("return",It);case 34:case"end":return nt.stop()}},gt,this,[[7,16]])}));function vt(gt){return Tt.apply(this,arguments)}return vt}()}).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,_e,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,Re){var Ye,ze,Ze,at,ht,pt,Mt,et,ot,wt=arguments;return be.default.wrap(function(Tt){for(;;)switch(Tt.prev=Tt.next){case 0:if(Ye=wt.length>2&&wt[2]!==void 0?wt[2]:{},this.resetCancelFlag(),Ye.disabledMD5=Ye.disabledMD5===void 0?!0:!!Ye.disabledMD5,!(Ye.checkpoint&&Ye.checkpoint.uploadId)){Tt.next=8;break}return Re&&ae(Re)&&(Ye.checkpoint.file=Re),Tt.next=7,this._resumeMultipart(Ye.checkpoint,Ye);case 7:return Tt.abrupt("return",Tt.sent);case 8:return ze=102400,Ye.mime||(ae(Re)?Ye.mime=me.getType(we.extname(Re.name)):z(Re)?Ye.mime=Re.type:le(Re)?Ye.mime="":Ye.mime=me.getType(we.extname(Re))),Ye.headers=Ye.headers||{},this._convertMetaToHeaders(Ye.meta,Ye.headers),Tt.next=14,this._getFileSize(Re);case 14:if(Ze=Tt.sent,!(Ze<ze)){Tt.next=26;break}return Ye.contentLength=Ze,Tt.next=19,this.put(Fe,Re,Ye);case 19:if(at=Tt.sent,!(Ye&&Ye.progress)){Tt.next=23;break}return Tt.next=23,Ye.progress(1);case 23:return ht={res:at.res,bucket:this.options.bucket,name:Fe,etag:at.res.headers.etag},(Ye.headers&&Ye.headers["x-oss-callback"]||Ye.callback)&&(ht.data=at.data),Tt.abrupt("return",ht);case 26:if(!(Ye.partSize&&parseInt(Ye.partSize,10)!==Ye.partSize)){Tt.next=28;break}throw new Error("partSize must be int number");case 28:if(!(Ye.partSize&&Ye.partSize<ze)){Tt.next=30;break}throw new Error("partSize must not be smaller than ".concat(ze));case 30:return Tt.next=32,this.initMultipartUpload(Fe,Ye);case 32:if(pt=Tt.sent,Mt=pt.uploadId,et=this._getPartSize(Ze,Ye.partSize),ot={file:Re,name:Fe,fileSize:Ze,partSize:et,uploadId:Mt,doneParts:[]},!(Ye&&Ye.progress)){Tt.next=39;break}return Tt.next=39,Ye.progress(0,ot,pt.res);case 39:return Tt.next=41,this._resumeMultipart(ot,Ye);case 41:return Tt.abrupt("return",Tt.sent);case 42:case"end":return Tt.stop()}},Oe,this)}));function Ne(Oe,Fe){return ke.apply(this,arguments)}return Ne}(),ue._resumeMultipart=function(){var ke=(0,Ce.default)(be.default.mark(function Oe(Fe,Re){var Ye,ze,Ze,at,ht,pt,Mt,et,ot,wt,Et,Tt,vt,gt,yt,It,Ot,Vt,Ct;return be.default.wrap(function(nt){for(;;)switch(nt.prev=nt.next){case 0:if(Ye=this,!this.isCancel()){nt.next=3;break}throw this._makeCancelEvent();case 3:return ze=Fe.file,Ze=Fe.fileSize,at=Fe.partSize,ht=Fe.uploadId,pt=Fe.doneParts,Mt=Fe.name,et=[],pt.length>0&&xe(pt).to(et),ot=this._divideParts(Ze,at),wt=ot.length,Et=!1,Tt=function(Xe,ut){return new Promise(function(){var bt=(0,Ce.default)(be.default.mark(function St(lt,Qe){var Ue,We,qe,He,De;return be.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:if(Ke.prev=0,Xe.isCancel()){Ke.next=29;break}return Ue=ot[ut-1],Ke.next=5,Xe._createBuffer(ze,Ue.start,Ue.end);case 5:return We=Ke.sent,qe={content:We,size:Ue.end-Ue.start},Ke.prev=7,Ke.next=10,Xe._uploadPart(Mt,ht,ut,qe,Re);case 10:He=Ke.sent,Ke.next=18;break;case 13:if(Ke.prev=13,Ke.t0=Ke.catch(7),Ke.t0.status!==404){Ke.next=17;break}throw Xe._makeAbortEvent();case 17:throw Ke.t0;case 18:if(!(!Xe.isCancel()&&!Et)){Ke.next=26;break}if(Fe.doneParts.push({number:ut,etag:He.res.headers.etag}),!Re.progress){Ke.next=23;break}return Ke.next=23,Re.progress(pt.length/(wt+1),Fe,He.res);case 23:lt({number:ut,etag:He.res.headers.etag}),Ke.next=27;break;case 26:lt();case 27:Ke.next=30;break;case 29:lt();case 30:Ke.next=41;break;case 32:Ke.prev=32,Ke.t1=Ke.catch(0),De=new Error,De.name=Ke.t1.name,De.message=Ke.t1.message,De.stack=Ke.t1.stack,De.partNum=ut,xe(Ke.t1).to(De),Qe(De);case 41:case"end":return Ke.stop()}},St,null,[[0,32],[7,13]])}));return function(St,lt){return bt.apply(this,arguments)}}())},vt=Array.from(new Array(wt),function(ft,Xe){return Xe+1}),gt=et.map(function(ft){return ft.number}),yt=vt.filter(function(ft){return gt.indexOf(ft)<0}),It=5,Ot=Re.parallel||It,nt.next=17,this._parallel(yt,Ot,function(ft){return new Promise(function(Xe,ut){Tt(Ye,ft).then(function(bt){bt&&et.push(bt),Xe()}).catch(function(bt){ut(bt)})})});case 17:if(Vt=nt.sent,Et=!0,Ct=Vt.find(function(ft){return ft.name==="abort"}),!Ct){nt.next=22;break}throw Ct;case 22:if(!this.isCancel()){nt.next=25;break}throw Tt=null,this._makeCancelEvent();case 25:if(!(Vt&&Vt.length>0)){nt.next=28;break}throw Vt[0].message="Failed to upload some parts with error: ".concat(Vt[0].toString()," part_num: ").concat(Vt[0].partNum),Vt[0];case 28:return nt.next=30,this.completeMultipartUpload(Mt,ht,et,Re);case 30:return nt.abrupt("return",nt.sent);case 31:case"end":return nt.stop()}},Oe,this)}));function Ne(Oe,Fe){return ke.apply(this,arguments)}return Ne}(),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 Ne(Oe){return ke.apply(this,arguments)}return Ne}();var pe=ie("stream"),Ee=pe.Readable;function Pe(ke,Ne){if(!(this instanceof Pe))return new Pe(ke,Ne);Ee.call(this,Ne),this.file=ke,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}ye.inherits(Pe,Ee),Pe.prototype.readFileAndPush=function(Ne){if(this.fileBuffer)for(var Oe=!0;Oe&&this.fileBuffer&&this.start<this.fileBuffer.length;){var Fe=this.start,Re=Fe+Ne;Re=Re>this.fileBuffer.length?this.fileBuffer.length:Re,this.start=Re,Oe=this.push(this.fileBuffer.slice(Fe,Re))}},Pe.prototype._read=function(Ne){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;Ne=Ne||Oe;var Fe=this;this.reader.onload=function(Ye){Fe.fileBuffer=ve.from(new Uint8Array(Ye.target.result)),Fe.file=null,Fe.readFileAndPush(Ne)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(Ne)};function Ie(ke){return ke.arrayBuffer?ke.arrayBuffer():new Promise(function(Ne,Oe){var Fe=new FileReader;Fe.onload=function(Re){Ne(Re.target.result)},Fe.onerror=function(Re){Oe(Re)},Fe.readAsArrayBuffer(ke)})}ue._createBuffer=function(){var ke=(0,Ce.default)(be.default.mark(function Oe(Fe,Re,Ye){var ze,Ze;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(Re,Ye),ht.next=4,Ie(ze);case 4:return Ze=ht.sent,ht.abrupt("return",ve.from(Ze));case 8:if(!le(Fe)){ht.next=12;break}return ht.abrupt("return",Fe.subarray(Re,Ye));case 12:throw new Error("_createBuffer requires File/Blob/Buffer.");case 13:case"end":return ht.stop()}},Oe)}));function Ne(Oe,Fe,Re){return ke.apply(this,arguments)}return Ne}(),ue._getPartSize=function(Ne,Oe){var Fe=1e4,Re=1*1024*1024;Oe||(Oe=Re);var Ye=Math.ceil(Ne/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(Ne,Oe){for(var Fe=Math.ceil(Ne/Oe),Re=[],Ye=0;Ye<Fe;Ye++){var ze=Oe*Ye,Ze=Math.min(ze+Oe,Ne);Re.push({start:ze,end:Ze})}return Re}}).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,_e,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 Ne(Oe,Fe,Re){var Ye;return ce.default.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:return Re=Re||{},Re.position===void 0&&(Re.position="0"),Re.subres={append:"",position:Re.position},Re.method="POST",Ze.next=6,this.put(Oe,Fe,Re);case 6:return Ye=Ze.sent,Ye.nextAppendPosition=Ye.res.headers["x-oss-next-append-position"],Ze.abrupt("return",Ye);case 9:case"end":return Ze.stop()}},Ne,this)}));function ke(Ne,Oe,Fe){return Ie.apply(this,arguments)}return ke}(),Pe.put=function(){var Ie=(0,be.default)(ce.default.mark(function Ne(Oe,Fe,Re){var Ye,ze,Ze,at,ht;return ce.default.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:if(Re=Re||{},Re.disabledMD5=Re.disabledMD5===void 0?!0:!!Re.disabledMD5,Re.headers=Re.headers||{},Oe=this._objectName(Oe),!ue(Fe)){Mt.next=8;break}Ye=Fe,Mt.next=19;break;case 8:if(!(ee(Fe)||re(Fe))){Mt.next=18;break}return Re.mime||(re(Fe)?Re.mime=me.getType(we.extname(Fe.name)):Re.mime=Fe.type),Mt.next=12,this._createBuffer(Fe,0,Fe.size);case 12:return Ye=Mt.sent,Mt.next=15,this._getFileSize(Fe);case 15:Re.contentLength=Mt.sent,Mt.next=19;break;case 18:throw new TypeError("Must provide Buffer/Blob/File for put.");case 19:return this._convertMetaToHeaders(Re.meta,Re.headers),ze=Re.method||"PUT",Ze=this._objectRequestParams(ze,Oe,Re),xe.encodeCallback(Ze,Re),Ze.mime=Re.mime,Ze.disabledMD5=Re.disabledMD5,Ze.content=Ye,Ze.successStatuses=[200],Mt.next=29,this.request(Ze);case 29:return at=Mt.sent,ht={name:Oe,url:this._objectUrl(Oe),res:at.res},Ze.headers&&Ze.headers["x-oss-callback"]&&(ht.data=JSON.parse(at.data.toString())),Mt.abrupt("return",ht);case 33:case"end":return Mt.stop()}},Ne,this)}));function ke(Ne,Oe,Fe){return Ie.apply(this,arguments)}return ke}(),Pe.putStream=function(){var Ie=(0,be.default)(ce.default.mark(function Ne(Oe,Fe,Re){var Ye,ze,Ze,at;return ce.default.wrap(function(pt){for(;;)switch(pt.prev=pt.next){case 0:return Re=Re||{},Re.headers=Re.headers||{},Oe=this._objectName(Oe),Re.contentLength?Re.headers["Content-Length"]=Re.contentLength:Re.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(Re.meta,Re.headers),Ye=Re.method||"PUT",ze=this._objectRequestParams(Ye,Oe,Re),xe.encodeCallback(ze,Re),ze.mime=Re.mime,ze.stream=Fe,ze.successStatuses=[200],pt.next=13,this.request(ze);case 13:return Ze=pt.sent,at={name:Oe,url:this._objectUrl(Oe),res:Ze.res},ze.headers&&ze.headers["x-oss-callback"]&&(at.data=JSON.parse(Ze.data.toString())),pt.abrupt("return",at);case 17:case"end":return pt.stop()}},Ne,this)}));function ke(Ne,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 Ne(Oe,Fe,Re){var Ye;return ce.default.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:return Ze.next=2,this.copy(Oe,Oe,{meta:Fe||{},timeout:Re&&Re.timeout,ctx:Re&&Re.ctx});case 2:return Ye=Ze.sent,Ze.abrupt("return",Ye);case 4:case"end":return Ze.stop()}},Ne,this)}));function ke(Ne,Oe,Fe){return Ie.apply(this,arguments)}return ke}(),Pe.list=function(){var Ie=(0,be.default)(ce.default.mark(function Ne(Oe,Fe){var Re,Ye,ze,Ze,at;return ce.default.wrap(function(pt){for(;;)switch(pt.prev=pt.next){case 0:return Re=this._objectRequestParams("GET","",Fe),Re.query=Oe,Re.xmlResponse=!0,Re.successStatuses=[200],pt.next=6,this.request(Re);case 6:return Ye=pt.sent,ze=Ye.data.Contents||[],Ze=this,ze&&(Array.isArray(ze)||(ze=[ze]),ze=ze.map(function(Mt){return{name:Mt.Key,url:Ze._objectUrl(Mt.Key),lastModified:Mt.LastModified,etag:Mt.ETag,type:Mt.Type,size:Number(Mt.Size),storageClass:Mt.StorageClass,owner:{id:Mt.Owner.ID,displayName:Mt.Owner.DisplayName}}})),at=Ye.data.CommonPrefixes||null,at&&(Array.isArray(at)||(at=[at]),at=at.map(function(Mt){return Mt.Prefix})),pt.abrupt("return",{res:Ye.res,objects:ze,prefixes:at,nextMarker:Ye.data.NextMarker||null,isTruncated:Ye.data.IsTruncated==="true"});case 13:case"end":return pt.stop()}},Ne,this)}));function ke(Ne,Oe){return Ie.apply(this,arguments)}return ke}(),Pe.listV2=function(){var Ie=(0,be.default)(ce.default.mark(function Ne(Oe){var Fe,Re,Ye,ze,Ze,at,ht,pt=arguments;return ce.default.wrap(function(et){for(;;)switch(et.prev=et.next){case 0:return Fe=pt.length>1&&pt[1]!==void 0?pt[1]:{},Re=Oe["continuation-token"]||Oe.continuationToken,Re&&(Fe.subres=Object.assign({"continuation-token":Re},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,Ze=ze.data.Contents||[],at=this,Ze&&(Array.isArray(Ze)||(Ze=[Ze]),Ze=Ze.map(function(ot){var wt=null;return ot.Owner&&(wt={id:ot.Owner.ID,displayName:ot.Owner.DisplayName}),{name:ot.Key,url:at._objectUrl(ot.Key),lastModified:ot.LastModified,etag:ot.ETag,type:ot.Type,size:Number(ot.Size),storageClass:ot.StorageClass,owner:wt}})),ht=ze.data.CommonPrefixes||null,ht&&(Array.isArray(ht)||(ht=[ht]),ht=ht.map(function(ot){return ot.Prefix})),et.abrupt("return",{res:ze.res,objects:Ze,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()}},Ne,this)}));function ke(Ne){return Ie.apply(this,arguments)}return ke}(),Pe.restore=function(){var Ie=(0,be.default)(ce.default.mark(function Ne(Oe){var Fe,Re,Ye,ze,Ze=arguments;return ce.default.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:return Fe=Ze.length>1&&Ze[1]!==void 0?Ze[1]:{type:"Archive"},Fe=Fe||{},Fe.subres=Object.assign({restore:""},Fe.subres),Fe.versionId&&(Fe.subres.versionId=Fe.versionId),Re=this._objectRequestParams("POST",Oe,Fe),Fe.type==="ColdArchive"&&(Ye={RestoreRequest:{Days:Fe.Days?Fe.Days:2,JobParameters:{Tier:Fe.JobParameters?Fe.JobParameters:"Standard"}}},Re.content=Ee(Ye,{headers:!0}),Re.mime="xml"),Re.successStatuses=[202],ht.next=9,this.request(Re);case 9:return ze=ht.sent,ht.abrupt("return",{res:ze.res});case 11:case"end":return ht.stop()}},Ne,this)}));function ke(Ne){return Ie.apply(this,arguments)}return ke}(),Pe._objectUrl=function(ke){return this._getReqUrl({bucket:this.options.bucket,object:ke})},Pe._objectRequestParams=function(ke,Ne,Oe){if(!this.options.bucket&&!this.options.cname)throw new Error("Please create a bucket first");Oe=Oe||{},Ne=this._objectName(Ne);var Fe={object:Ne,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,Ne){ke&&Object.keys(ke).forEach(function(Oe){Ne["x-oss-meta-".concat(Oe)]=ke[Oe]})},Pe._deleteFileSafe=function(ke){var Ne=this;return new Promise(function(Oe){Ce.exists(ke,function(Fe){Fe?Ce.unlink(ke,function(Re){Re&&Ne.debug("unlink %j error: %s",ke,Re,"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,_e,je){"use strict";je.version="6.18.1"},{}],7:[function(ie,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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(Ne){return Ne.ID&&(Ne.id=Ne.ID,delete Ne.ID),Ne.Tag&&!me(Ne.Tag)&&(Ne.Tag=[Ne.Tag]),fe(Ne,"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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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,Ne,Oe=arguments;return ce.default.wrap(function(Re){for(;;)switch(Re.prev=Re.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,Re.next=14,this.request(ke);case 14:return Ne=Re.sent,Re.abrupt("return",{status:Ne.status,res:Ne.res});case 16:case"end":return Re.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,_e,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,Ze,at){var ht,pt,Mt,et,ot;return ce.default.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:if(ye(ze),me(Ze)){Et.next=3;break}throw new Error("rules must be Array");case 3:return ht=this._bucketRequestParams("PUT",ze,"lifecycle",at),pt=[],Mt={LifecycleConfiguration:{Rule:pt}},Ze.forEach(function(Tt){Ie(Tt),Oe(Tt),Tt.id&&(Tt.ID=Tt.id,delete Tt.id),pt.push(Tt)}),et=re(Mt,{headers:!0,firstUpperCase:!0}),ht.content=et,ht.mime="xml",ht.successStatuses=[200],Et.next=13,this.request(ht);case 13:return ot=Et.sent,Et.abrupt("return",{res:ot.res});case 15:case"end":return Et.stop()}},Ye,this)}));function Re(Ye,ze,Ze){return Fe.apply(this,arguments)}return Re}();function Ie(Fe){Fe.days&&(Fe.expiration={days:Fe.days}),Fe.date&&(Fe.expiration={createdBeforeDate:Fe.date})}function ke(Fe,Re){var Ye=Fe.days,ze=Fe.createdBeforeDate;if(!Ye&&!ze)throw new Error("".concat(Re," 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 Ne(Fe){if(!me(Fe)&&!ee(Fe))throw new Error("tag must be Object or Array");Fe=ee(Fe)?[Fe]:Fe;var Re={},Ye=fe(Fe);Ye.forEach(function(ze){Re[ze.key]=ze.value}),ue(Re)}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");Ne(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,_e,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,_e,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,Ne,Oe=arguments;return ce.default.wrap(function(Re){for(;;)switch(Re.prev=Re.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){Re.next=14;break}if(fe(ue.routingRules)){Re.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],Re.next=20,this.request(Ee);case 20:return Ne=Re.sent,Re.abrupt("return",{res:Ne.res});case 22:case"end":return Re.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,_e,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,_e,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,_e,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}_e.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,_e,je){"use strict";var ve=ie("merge-descriptors"),ce=je;ve(ce,ie("./processObjectSave"))},{"./processObjectSave":28,"merge-descriptors":372}],28:[function(ie,_e,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,Ne;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 Ne=Fe.sent,Fe.abrupt("return",{res:Ne.res,status:Ne.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,_e,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,Ne,Oe,Fe,Re=arguments;return ce.default.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:return ae=Re.length>2&&Re[2]!==void 0?Re[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,Ne=ke.uploadId,Oe=this._getPartSize(Ie,ae.partSize),Fe={name:z,copySize:Ie,partSize:Oe,uploadId:Ne,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,Ne,Oe,Fe,Re,Ye,ze,Ze,at,ht,pt,Mt,et,ot;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,Ne=this._divideMultipartCopyParts(pe,Ee,ee.startOffset),Oe=Ne.length,Fe={headers:{}},ae.copyheaders&&ye(ae.copyheaders).to(Fe.headers),le&&ye(ue).to(Fe),Re=function(vt,gt,yt){return new Promise(function(){var It=(0,be.default)(ce.default.mark(function Ot(Vt,Ct){var mt,nt,ft;return ce.default.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:if(ut.prev=0,vt.isCancel()){ut.next=22;break}return mt=Ne[gt-1],nt="".concat(mt.start,"-").concat(mt.end-1),ut.prev=4,ut.next=7,vt.uploadPartCopy(ke,Pe,gt,nt,yt,Fe);case 7:ft=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 vt._makeAbortEvent();case 14:throw ut.t0;case 15:if(vt.isCancel()){ut.next=22;break}if(Ce("content-range ".concat(ft.res.headers["content-range"])),Ie.push({number:gt,etag:ft.res.headers.etag}),z.doneParts=Ie,!(ae&&ae.progress)){ut.next=22;break}return ut.next=22,ae.progress(Ie.length/Oe,z,ft.res);case 22:Vt(),ut.next=29;break;case 25:ut.prev=25,ut.t1=ut.catch(0),ut.t1.partNum=gt,Ct(ut.t1);case 29:case"end":return ut.stop()}},Ot,null,[[0,25],[4,10]])}));return function(Ot,Vt){return It.apply(this,arguments)}}())},Ye=Array.from(new Array(Oe),function(Tt,vt){return vt+1}),ze=Ie.map(function(Tt){return Tt.number}),Ze=Ye.filter(function(Tt){return ze.indexOf(Tt)<0}),at=5,ht=ae.parallel||at,!(this.checkBrowserAndVersion("Internet Explorer","10")||ht===1)){Et.next=28;break}pt=0;case 18:if(!(pt<Ze.length)){Et.next=26;break}if(!this.isCancel()){Et.next=21;break}throw this._makeCancelEvent();case 21:return Et.next=23,Re(this,Ze[pt],ee);case 23:pt++,Et.next=18;break;case 26:Et.next=40;break;case 28:return Et.next=30,this._parallelNode(Ze,ht,Re,ee);case 30:if(Mt=Et.sent,et=Mt.find(function(Tt){return Tt.name==="abort"}),!et){Et.next=34;break}throw et;case 34:if(!this.isCancel()){Et.next=36;break}throw this._makeCancelEvent();case 36:if(!(Mt&&Mt.length>0)){Et.next=40;break}throw ot=Mt[0],ot.message="Failed to copy some parts with error: ".concat(ot.toString()," part_num: ").concat(ot.partNum),ot;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,_e,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,Ne,Oe;return be.default.wrap(function(Re){for(;;)switch(Re.prev=Re.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],Re.next=10,this.request(ke);case 10:return Ne=Re.sent,Oe=Ne.data.Upload||[],Array.isArray(Oe)||(Oe=[Oe]),Oe=Oe.map(function(Ye){return{name:Ye.Key,uploadId:Ye.UploadId,initiated:Ye.Initiated}}),Re.abrupt("return",{res:Ne.res,uploads:Oe,bucket:Ne.data.Bucket,nextKeyMarker:Ne.data.NextKeyMarker,nextUploadIdMarker:Ne.data.NextUploadIdMarker,isTruncated:Ne.data.IsTruncated==="true"});case 15:case"end":return Re.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 Ne,Oe,Fe;return be.default.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:return ke=ke||{},Ne={},ye(ke).to(Ne),Ne.subres={uploadId:Pe},Oe=this._objectRequestParams("GET",Ee,Ne),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,Ne,Oe;return be.default.wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:return this._stop(),Ie=Ie||{},ke={},ye(Ie).to(ke),ke.subres={uploadId:Pe},Ne=this._objectRequestParams("DELETE",Ee,ke),Ne.successStatuses=[204],Re.next=9,this.request(Ne);case 9:return Oe=Re.sent,Re.abrupt("return",{res:Oe.res});case 11:case"end":return Re.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,Ne;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 Ne=Fe.sent,Fe.abrupt("return",{res:Ne.res,bucket:Ne.data.Bucket,name:Ne.data.Key,uploadId:Ne.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,Ne,Oe,Fe){var Re,Ye;return be.default.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:if(Re={size:Oe-Ne},Ye=ve&&ve.browser,!Ye){Ze.next=8;break}return Ze.next=5,this._createBuffer(ke,Ne,Oe);case 5:Re.content=Ze.sent,Ze.next=11;break;case 8:return Ze.next=10,this._createStream(ke,Ne,Oe);case 10:Re.stream=Ze.sent;case 11:return Ze.next=13,this._uploadPart(Ee,Pe,Ie,Re,Fe);case 13:return Ze.abrupt("return",Ze.sent);case 14:case"end":return Ze.stop()}},pe,this)}));function ue(pe,Ee,Pe,Ie,ke,Ne,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 Ne,Oe,Fe,Re,Ye,ze,Ze,at;return be.default.wrap(function(pt){for(;;)switch(pt.prev=pt.next){case 0:for(Ne=Ie.concat().sort(function(Mt,et){return Mt.number-et.number}).filter(function(Mt,et,ot){return!et||Mt.number!==ot[et-1].number}),Oe=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<CompleteMultipartUpload>
|
|
|
`,Fe=0;Fe<Ne.length;Fe++)Re=Ne[Fe],Oe+=`<Part>
|
|
|
`,Oe+="<PartNumber>".concat(Re.number,`</PartNumber>
|
|
|
`),Oe+="<ETag>".concat(Re.etag,`</ETag>
|
|
|
`),Oe+=`</Part>
|
|
|
`;return Oe+="</CompleteMultipartUpload>",ke=ke||{},Ye={},Ye=xe(ke,function(Mt){if(z(Mt))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],pt.next=17,this.request(ze);case 17:if(Ze=pt.sent,!ke.progress){pt.next=21;break}return pt.next=21,ke.progress(1,null,Ze.res);case 21:return at={res:Ze.res,bucket:ze.bucket,name:Ee,etag:Ze.res.headers.etag},ze.headers&&ze.headers["x-oss-callback"]&&(at.data=JSON.parse(Ze.data.toString())),pt.abrupt("return",at);case 24:case"end":return pt.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,Ne){var Oe,Fe,Re,Ye;return be.default.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:return Ne=Ne||{},Oe={},ye(Ne).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,Re=ve&&ve.browser,Re?Fe.content=ke.content:Fe.stream=ke.stream,Fe.successStatuses=[200],Fe.disabledMD5=Ne.disabledMD5,Ze.next=15,this.request(Fe);case 15:if(Ye=Ze.sent,Ye.res.headers.etag){Ze.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),Ze.abrupt("return",{name:Ee,etag:Ye.res.headers.etag,res:Ye.res});case 20:case"end":return Ze.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,_e,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,Ne,Oe,Fe,Re;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),Ne={bucket:this.options.bucket,object:Pe},Oe=this._getResource(Ne),!(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),Re=Ce.parse(this._getReqUrl(Ne)),Re.query={OSSAccessKeyId:this.options.accessKeyId,Expires:ke,Signature:Fe.Signature},we(Fe.subResource).to(Re.query),ze.abrupt("return",Re.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,_e,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(Ne){ue.headers["x-oss-copy-source-".concat(Ne.toLowerCase())]=ue.headers[Ne]}),(ue.meta||Object.keys(ue.headers).find(function(Ne){return xe.includes(Ne.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,_e,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,_e,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,Ne,Oe,Fe,Re,Ye=arguments;return ce.default.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:if(ae=Ye.length>1&&Ye[1]!==void 0?Ye[1]:{},re=[],!(!ee||!ee.length)){Ze.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),Ne=this._objectRequestParams("POST","",ae),Ne.mime="xml",Ne.content=ke,Ne.xmlResponse=!0,Ne.successStatuses=[200],Ze.next=16,this.request(Ne);case 16:return Oe=Ze.sent,Fe=Oe.data,Re=Fe&&Fe.Deleted||null,Re&&(Array.isArray(Re)||(Re=[Re])),Ze.abrupt("return",{res:Oe.res,deleted:Re||[]});case 21:case"end":return Ze.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,_e,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,_e,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,_e,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,Ne=arguments;return be.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return re=Ne.length>2&&Ne[2]!==void 0?Ne[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,_e,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,_e,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,Ne,Oe=arguments;return ce.default.wrap(function(Re){for(;;)switch(Re.prev=Re.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)){Re.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),Re.next=12,this.request(pe);case 12:return Ee=Re.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}}})),Ne=Ee.data.CommonPrefixes||null,Ne&&(xe(Ne)||(Ne=[Ne]),Ne=Ne.map(function(Ye){return Ye.Prefix})),Re.abrupt("return",{res:Ee.res,objects:Pe,deleteMarker:Ie,prefixes:Ne,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 Re.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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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(Ne){return{Key:Ne,Value:re[Ne]}}),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,_e,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,_e,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,_e,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,Ne;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,Ne=0;case 8:if(!(Ne<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[Ne],re)):pe.push(ae(le,z[Ne])),!(pe.length===ee||ke===Ie&&Ne===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:Ne++,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 Re=Fe;Fe=null;for(var Ye=arguments.length,ze=new Array(Ye),Ze=0;Ze<Ye;Ze++)ze[Ze]=arguments[Ze];Re.apply(this,ze)}}function ue(Fe){var Re=-1,Ye=Fe.length;return function(){return++Re<Ye&&!ee.isCancel()?{value:Fe[Re],key:Re}: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 Ne(Fe,Re){z(Fe).then(function(Ye){Re(null,Ye)}).catch(function(Ye){Re(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,Ne(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,_e,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 Ne="response-".concat(ke.toLowerCase());le[Ne]=xe.response[ke]}),Object.keys(xe).forEach(function(ke){var Ne=ke.toLowerCase(),Oe=xe[ke];Ne.indexOf("x-oss-")===0?ae[Ne]=Oe:(Ne.indexOf("content-md5")===0||Ne.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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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(Ne,Oe){return Ne[Oe]||Ne[Oe.toLowerCase()]}function Ie(Ne,Oe){delete Ne[Oe],delete Ne[Oe.toLowerCase()]}function ke(Ne){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(Ne.headers).to(Fe),Pe(Fe,"Content-Type")||(Ne.mime&&Ne.mime.indexOf("/")>0?Fe["Content-Type"]=Ne.mime:Ee()?Fe["Content-Type"]="application/octet-stream":Fe["Content-Type"]=Ce.getType(Ne.mime||me.extname(Ne.object||""))),Pe(Fe,"Content-Type")||Ie(Fe,"Content-Type"),Ne.content&&(Ne.disabledMD5||(!Ne.headers||!Ne.headers["Content-MD5"]?Fe["Content-MD5"]=ce.createHash("md5").update(ve.from(Ne.content,"utf8")).digest("base64"):Fe["Content-MD5"]=Ne.headers["Content-MD5"]),Fe["Content-Length"]||(Fe["Content-Length"]=Ne.content.length));var Re=Object.prototype.hasOwnProperty;for(var Ye in Fe)Fe[Ye]&&Re.call(Fe,Ye)&&(Fe[Ye]=fe(String(Fe[Ye]),this.options.headerEncoding));var ze=this._getResource(Ne);if(Fe.authorization=this.authorization(Ne.method,ze,Ne.subres,Fe,this.options.headerEncoding),ee(this.options.endpoint.hostname)){var Ze=this.options,at=Ze.region,ht=Ze.internal,pt=Ze.secure,Mt=re(at,ht,pt);Fe.host="".concat(Ne.bucket,".").concat(Mt.host)}var et=ue.bind(this)(Ne);be("request %s %s, with headers %j, !!stream: %s",Ne.method,et,Fe,!!Ne.stream);var ot=Ne.timeout||this.options.timeout,wt={method:Ne.method,content:Ne.content,stream:Ne.stream,headers:Fe,timeout:ot,writeStream:Ne.writeStream,customResponse:Ne.customResponse,ctx:Ne.ctx||this.ctx};return this.agent&&(wt.agent=this.agent),this.httpsAgent&&(wt.httpsAgent=this.httpsAgent),wt.enableProxy=!!this.options.enableProxy,wt.proxy=this.options.proxy?this.options.proxy:null,{url:et,params:wt}}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,_e,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 Ne=ke.replace(/^(.)/,function(Oe){return Oe.toLowerCase()}).replace(/-(\w)/g,function(Oe,Fe){return Fe.toUpperCase()});me[Ne]||(me[Ne]=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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,je){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.isFunction=void 0,je.isFunction=function(ve){return typeof ve=="function"}},{}],69:[function(ie,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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)})}}_e.exports=ce,_e.exports.__esModule=!0,_e.exports.default=_e.exports},{}],78:[function(ie,_e,je){function ve(ce){return ce&&ce.__esModule?ce:{default:ce}}_e.exports=ve,_e.exports.__esModule=!0,_e.exports.default=_e.exports},{}],79:[function(ie,_e,je){function ve(ce){"@babel/helpers - typeof";return _e.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},_e.exports.__esModule=!0,_e.exports.default=_e.exports,ve(ce)}_e.exports=ve,_e.exports.__esModule=!0,_e.exports.default=_e.exports},{}],80:[function(ie,_e,je){_e.exports=ie("regenerator-runtime")},{"regenerator-runtime":395}],81:[function(ie,_e,je){_e.exports=ve,_e.exports.HttpsAgent=ve;function ve(){}},{}],82:[function(ie,_e,je){(function(ve){(function(){"use strict";var ce=ie("object-assign");function be(at,ht){if(at===ht)return 0;for(var pt=at.length,Mt=ht.length,et=0,ot=Math.min(pt,Mt);et<ot;++et)if(at[et]!==ht[et]){pt=at[et],Mt=ht[et];break}return pt<Mt?-1:Mt<pt?1:0}function Ce(at){return ve.Buffer&&typeof ve.Buffer.isBuffer=="function"?ve.Buffer.isBuffer(at):!!(at!=null&&at._isBuffer)}var ye=ie("util/"),we=Object.prototype.hasOwnProperty,me=Array.prototype.slice,xe=function(){return function(){}.name==="foo"}();function fe(at){return Object.prototype.toString.call(at)}function z(at){return Ce(at)||typeof ve.ArrayBuffer!="function"?!1:typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(at):at?!!(at instanceof DataView||at.buffer&&at.buffer instanceof ArrayBuffer):!1}var ee=_e.exports=Pe,ae=/\s*function\s+([^\(\s]*)\s*/;function re(at){if(ye.isFunction(at)){if(xe)return at.name;var ht=at.toString(),pt=ht.match(ae);return pt&&pt[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 pt=ht.stackStartFunction||Ee;if(Error.captureStackTrace)Error.captureStackTrace(this,pt);else{var Mt=new Error;if(Mt.stack){var et=Mt.stack,ot=re(pt),wt=et.indexOf(`
|
|
|
`+ot);if(wt>=0){var Et=et.indexOf(`
|
|
|
`,wt+1);et=et.substring(Et+1)}this.stack=et}}},ye.inherits(ee.AssertionError,Error);function le(at,ht){return typeof at=="string"?at.length<ht?at:at.slice(0,ht):at}function ue(at){if(xe||!ye.isFunction(at))return ye.inspect(at);var ht=re(at),pt=ht?": "+ht:"";return"[Function"+pt+"]"}function pe(at){return le(ue(at.actual),128)+" "+at.operator+" "+le(ue(at.expected),128)}function Ee(at,ht,pt,Mt,et){throw new ee.AssertionError({message:pt,actual:at,expected:ht,operator:Mt,stackStartFunction:et})}ee.fail=Ee;function Pe(at,ht){at||Ee(at,!0,ht,"==",ee.ok)}ee.ok=Pe,ee.equal=function(ht,pt,Mt){ht!=pt&&Ee(ht,pt,Mt,"==",ee.equal)},ee.notEqual=function(ht,pt,Mt){ht==pt&&Ee(ht,pt,Mt,"!=",ee.notEqual)},ee.deepEqual=function(ht,pt,Mt){Ie(ht,pt,!1)||Ee(ht,pt,Mt,"deepEqual",ee.deepEqual)},ee.deepStrictEqual=function(ht,pt,Mt){Ie(ht,pt,!0)||Ee(ht,pt,Mt,"deepStrictEqual",ee.deepStrictEqual)};function Ie(at,ht,pt,Mt){if(at===ht)return!0;if(Ce(at)&&Ce(ht))return be(at,ht)===0;if(ye.isDate(at)&&ye.isDate(ht))return at.getTime()===ht.getTime();if(ye.isRegExp(at)&&ye.isRegExp(ht))return at.source===ht.source&&at.global===ht.global&&at.multiline===ht.multiline&&at.lastIndex===ht.lastIndex&&at.ignoreCase===ht.ignoreCase;if((at===null||typeof at!="object")&&(ht===null||typeof ht!="object"))return pt?at===ht:at==ht;if(z(at)&&z(ht)&&fe(at)===fe(ht)&&!(at instanceof Float32Array||at instanceof Float64Array))return be(new Uint8Array(at.buffer),new Uint8Array(ht.buffer))===0;if(Ce(at)!==Ce(ht))return!1;Mt=Mt||{actual:[],expected:[]};var et=Mt.actual.indexOf(at);return et!==-1&&et===Mt.expected.indexOf(ht)?!0:(Mt.actual.push(at),Mt.expected.push(ht),Ne(at,ht,pt,Mt))}function ke(at){return Object.prototype.toString.call(at)=="[object Arguments]"}function Ne(at,ht,pt,Mt){if(at==null||ht===null||ht===void 0)return!1;if(ye.isPrimitive(at)||ye.isPrimitive(ht))return at===ht;if(pt&&Object.getPrototypeOf(at)!==Object.getPrototypeOf(ht))return!1;var et=ke(at),ot=ke(ht);if(et&&!ot||!et&&ot)return!1;if(et)return at=me.call(at),ht=me.call(ht),Ie(at,ht,pt);var wt=Ze(at),Et=Ze(ht),Tt,vt;if(wt.length!==Et.length)return!1;for(wt.sort(),Et.sort(),vt=wt.length-1;vt>=0;vt--)if(wt[vt]!==Et[vt])return!1;for(vt=wt.length-1;vt>=0;vt--)if(Tt=wt[vt],!Ie(at[Tt],ht[Tt],pt,Mt))return!1;return!0}ee.notDeepEqual=function(ht,pt,Mt){Ie(ht,pt,!1)&&Ee(ht,pt,Mt,"notDeepEqual",ee.notDeepEqual)},ee.notDeepStrictEqual=Oe;function Oe(at,ht,pt){Ie(at,ht,!0)&&Ee(at,ht,pt,"notDeepStrictEqual",Oe)}ee.strictEqual=function(ht,pt,Mt){ht!==pt&&Ee(ht,pt,Mt,"===",ee.strictEqual)},ee.notStrictEqual=function(ht,pt,Mt){ht===pt&&Ee(ht,pt,Mt,"!==",ee.notStrictEqual)};function Fe(at,ht){if(!at||!ht)return!1;if(Object.prototype.toString.call(ht)=="[object RegExp]")return ht.test(at);try{if(at instanceof ht)return!0}catch(pt){}return Error.isPrototypeOf(ht)?!1:ht.call({},at)===!0}function Re(at){var ht;try{at()}catch(pt){ht=pt}return ht}function Ye(at,ht,pt,Mt){var et;if(typeof ht!="function")throw new TypeError('"block" argument must be a function');typeof pt=="string"&&(Mt=pt,pt=null),et=Re(ht),Mt=(pt&&pt.name?" ("+pt.name+").":".")+(Mt?" "+Mt:"."),at&&!et&&Ee(et,pt,"Missing expected exception"+Mt);var ot=typeof Mt=="string",wt=!at&&ye.isError(et),Et=!at&&et&&!pt;if((wt&&ot&&Fe(et,pt)||Et)&&Ee(et,pt,"Got unwanted exception"+Mt),at&&et&&pt&&!Fe(et,pt)||!at&&et)throw et}ee.throws=function(at,ht,pt){Ye(!0,at,ht,pt)},ee.doesNotThrow=function(at,ht,pt){Ye(!1,at,ht,pt)},ee.ifError=function(at){if(at)throw at};function ze(at,ht){at||Ee(at,!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 Ze=Object.keys||function(at){var ht=[];for(var pt in at)we.call(at,pt)&&ht.push(pt);return ht}}).call(this)}).call(this,typeof an!="undefined"?an:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"object-assign":377,"util/":85}],83:[function(ie,_e,je){typeof Object.create=="function"?_e.exports=function(ce,be){ce.super_=be,ce.prototype=Object.create(be.prototype,{constructor:{value:ce,enumerable:!1,writable:!0,configurable:!0}})}:_e.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,_e,je){_e.exports=function(ce){return ce&&typeof ce=="object"&&typeof ce.copy=="function"&&typeof ce.fill=="function"&&typeof ce.readUInt8=="function"}},{}],85:[function(ie,_e,je){(function(ve,ce){(function(){var be=/%[sdj%]/g;je.format=function(Et){if(!Ne(Et)){for(var Tt=[],vt=0;vt<arguments.length;vt++)Tt.push(we(arguments[vt]));return Tt.join(" ")}for(var vt=1,gt=arguments,yt=gt.length,It=String(Et).replace(be,function(Vt){if(Vt==="%%")return"%";if(vt>=yt)return Vt;switch(Vt){case"%s":return String(gt[vt++]);case"%d":return Number(gt[vt++]);case"%j":try{return JSON.stringify(gt[vt++])}catch(Ct){return"[Circular]"}default:return Vt}}),Ot=gt[vt];vt<yt;Ot=gt[++vt])Pe(Ot)||!Ye(Ot)?It+=" "+Ot:It+=" "+we(Ot);return It},je.deprecate=function(Et,Tt){if(Fe(ce.process))return function(){return je.deprecate(Et,Tt).apply(this,arguments)};if(ve.noDeprecation===!0)return Et;var vt=!1;function gt(){if(!vt){if(ve.throwDeprecation)throw new Error(Tt);ve.traceDeprecation?console.trace(Tt):console.error(Tt),vt=!0}return Et.apply(this,arguments)}return gt};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 Tt=ve.pid;Ce[Et]=function(){var vt=je.format.apply(je,arguments);console.error("%s %d: %s",Et,Tt,vt)}}else Ce[Et]=function(){};return Ce[Et]};function we(Et,Tt){var vt={seen:[],stylize:xe};return arguments.length>=3&&(vt.depth=arguments[2]),arguments.length>=4&&(vt.colors=arguments[3]),Ee(Tt)?vt.showHidden=Tt:Tt&&je._extend(vt,Tt),Fe(vt.showHidden)&&(vt.showHidden=!1),Fe(vt.depth)&&(vt.depth=2),Fe(vt.colors)&&(vt.colors=!1),Fe(vt.customInspect)&&(vt.customInspect=!0),vt.colors&&(vt.stylize=me),z(vt,Et,vt.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,Tt){var vt=we.styles[Tt];return vt?"\x1B["+we.colors[vt][0]+"m"+Et+"\x1B["+we.colors[vt][1]+"m":Et}function xe(Et,Tt){return Et}function fe(Et){var Tt={};return Et.forEach(function(vt,gt){Tt[vt]=!0}),Tt}function z(Et,Tt,vt){if(Et.customInspect&&Tt&&at(Tt.inspect)&&Tt.inspect!==je.inspect&&!(Tt.constructor&&Tt.constructor.prototype===Tt)){var gt=Tt.inspect(vt,Et);return Ne(gt)||(gt=z(Et,gt,vt)),gt}var yt=ee(Et,Tt);if(yt)return yt;var It=Object.keys(Tt),Ot=fe(It);if(Et.showHidden&&(It=Object.getOwnPropertyNames(Tt)),Ze(Tt)&&(It.indexOf("message")>=0||It.indexOf("description")>=0))return ae(Tt);if(It.length===0){if(at(Tt)){var Vt=Tt.name?": "+Tt.name:"";return Et.stylize("[Function"+Vt+"]","special")}if(Re(Tt))return Et.stylize(RegExp.prototype.toString.call(Tt),"regexp");if(ze(Tt))return Et.stylize(Date.prototype.toString.call(Tt),"date");if(Ze(Tt))return ae(Tt)}var Ct="",mt=!1,nt=["{","}"];if(pe(Tt)&&(mt=!0,nt=["[","]"]),at(Tt)){var ft=Tt.name?": "+Tt.name:"";Ct=" [Function"+ft+"]"}if(Re(Tt)&&(Ct=" "+RegExp.prototype.toString.call(Tt)),ze(Tt)&&(Ct=" "+Date.prototype.toUTCString.call(Tt)),Ze(Tt)&&(Ct=" "+ae(Tt)),It.length===0&&(!mt||Tt.length==0))return nt[0]+Ct+nt[1];if(vt<0)return Re(Tt)?Et.stylize(RegExp.prototype.toString.call(Tt),"regexp"):Et.stylize("[Object]","special");Et.seen.push(Tt);var Xe;return mt?Xe=re(Et,Tt,vt,Ot,It):Xe=It.map(function(ut){return le(Et,Tt,vt,Ot,ut,mt)}),Et.seen.pop(),ue(Xe,Ct,nt)}function ee(Et,Tt){if(Fe(Tt))return Et.stylize("undefined","undefined");if(Ne(Tt)){var vt="'"+JSON.stringify(Tt).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return Et.stylize(vt,"string")}if(ke(Tt))return Et.stylize(""+Tt,"number");if(Ee(Tt))return Et.stylize(""+Tt,"boolean");if(Pe(Tt))return Et.stylize("null","null")}function ae(Et){return"["+Error.prototype.toString.call(Et)+"]"}function re(Et,Tt,vt,gt,yt){for(var It=[],Ot=0,Vt=Tt.length;Ot<Vt;++Ot)wt(Tt,String(Ot))?It.push(le(Et,Tt,vt,gt,String(Ot),!0)):It.push("");return yt.forEach(function(Ct){Ct.match(/^\d+$/)||It.push(le(Et,Tt,vt,gt,Ct,!0))}),It}function le(Et,Tt,vt,gt,yt,It){var Ot,Vt,Ct;if(Ct=Object.getOwnPropertyDescriptor(Tt,yt)||{value:Tt[yt]},Ct.get?Ct.set?Vt=Et.stylize("[Getter/Setter]","special"):Vt=Et.stylize("[Getter]","special"):Ct.set&&(Vt=Et.stylize("[Setter]","special")),wt(gt,yt)||(Ot="["+yt+"]"),Vt||(Et.seen.indexOf(Ct.value)<0?(Pe(vt)?Vt=z(Et,Ct.value,null):Vt=z(Et,Ct.value,vt-1),Vt.indexOf(`
|
|
|
`)>-1&&(It?Vt=Vt.split(`
|
|
|
`).map(function(mt){return" "+mt}).join(`
|
|
|
`).substr(2):Vt=`
|
|
|
`+Vt.split(`
|
|
|
`).map(function(mt){return" "+mt}).join(`
|
|
|
`))):Vt=Et.stylize("[Circular]","special")),Fe(Ot)){if(It&&yt.match(/^\d+$/))return Vt;Ot=JSON.stringify(""+yt),Ot.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Ot=Ot.substr(1,Ot.length-2),Ot=Et.stylize(Ot,"name")):(Ot=Ot.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Ot=Et.stylize(Ot,"string"))}return Ot+": "+Vt}function ue(Et,Tt,vt){var gt=0,yt=Et.reduce(function(It,Ot){return gt++,Ot.indexOf(`
|
|
|
`)>=0&>++,It+Ot.replace(/\u001b\[\d\d?m/g,"").length+1},0);return yt>60?vt[0]+(Tt===""?"":Tt+`
|
|
|
`)+" "+Et.join(`,
|
|
|
`)+" "+vt[1]:vt[0]+Tt+" "+Et.join(", ")+" "+vt[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 Ne(Et){return typeof Et=="string"}je.isString=Ne;function Oe(Et){return typeof Et=="symbol"}je.isSymbol=Oe;function Fe(Et){return Et===void 0}je.isUndefined=Fe;function Re(Et){return Ye(Et)&&pt(Et)==="[object RegExp]"}je.isRegExp=Re;function Ye(Et){return typeof Et=="object"&&Et!==null}je.isObject=Ye;function ze(Et){return Ye(Et)&&pt(Et)==="[object Date]"}je.isDate=ze;function Ze(Et){return Ye(Et)&&(pt(Et)==="[object Error]"||Et instanceof Error)}je.isError=Ze;function at(Et){return typeof Et=="function"}je.isFunction=at;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 pt(Et){return Object.prototype.toString.call(Et)}function Mt(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 ot(){var Et=new Date,Tt=[Mt(Et.getHours()),Mt(Et.getMinutes()),Mt(Et.getSeconds())].join(":");return[Et.getDate(),et[Et.getMonth()],Tt].join(" ")}je.log=function(){console.log("%s - %s",ot(),je.format.apply(je,arguments))},je.inherits=ie("inherits"),je._extend=function(Et,Tt){if(!Tt||!Ye(Tt))return Et;for(var vt=Object.keys(Tt),gt=vt.length;gt--;)Et[vt[gt]]=Tt[vt[gt]];return Et};function wt(Et,Tt){return Object.prototype.hasOwnProperty.call(Et,Tt)}}).call(this)}).call(this,ie("_process"),typeof an!="undefined"?an:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":84,_process:467,inherits:83}],86:[function(ie,_e,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;_e.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 an!="undefined"?an:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],87:[function(ie,_e,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,Ne=Pe>0?Ee-4:Ee,Oe;for(Oe=0;Oe<Ne;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,Ne=pe-Ee;ke<Ne;ke+=Ie)Pe.push(ae(le,ke,ke+Ie>Ne?Ne: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,_e,je){(function(ve,ce,be){typeof _e!="undefined"&&_e.exports?_e.exports=be():typeof $e=="function"&&$e.amd?$e(ce,be):ve[ce]=be()})(this,"bowser",function(){var ve=!0;function ce(fe){function z(Tt){var vt=fe.match(Tt);return vt&&vt.length>1&&vt[1]||""}function ee(Tt){var vt=fe.match(Tt);return vt&&vt.length>1&&vt[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),Ne=/(web|hpw)(o|0)s/i.test(fe),Oe=/windows phone/i.test(fe),Fe=/SamsungBrowser/i.test(fe),Re=!Oe&&/windows/i.test(fe),Ye=!ae&&!Pe&&/macintosh/i.test(fe),ze=!le&&!Ie&&!ke&&!Ne&&/linux/i.test(fe),Ze=ee(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),at=z(/version\/(\d+(\.\d+)?)/i),ht=/tablet/i.test(fe)&&!/tablet pc/i.test(fe),pt=!ht&&/[^-]mobi/i.test(fe),Mt=/xbox/i.test(fe),et;/opera/i.test(fe)?et={name:"Opera",opera:ve,version:at||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)||at}:/SamsungBrowser/i.test(fe)?et={name:"Samsung Internet for Android",samsungBrowser:ve,version:at||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:at||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:at||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},Ze?(et.msedge=ve,et.version=Ze):(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:Ze}:/vivaldi/i.test(fe)?et={name:"Vivaldi",vivaldi:ve,version:z(/vivaldi\/(\d+(\.\d+)?)/i)||at}: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:at||z(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:Ne?(et={name:"WebOS",osname:"WebOS",webos:ve,version:at||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)||at}:/qupzilla/i.test(fe)?et={name:"QupZilla",qupzilla:ve,version:z(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||at}:/chromium/i.test(fe)?et={name:"Chromium",chromium:ve,version:z(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||at}:/chrome|crios|crmo/i.test(fe)?et={name:"Chrome",chrome:ve,version:z(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:le?et={name:"Android",version:at}:/safari|applewebkit/i.test(fe)?(et={name:"Safari",safari:ve},at&&(et.version=at)):ae?(et={name:ae=="iphone"?"iPhone":ae=="ipad"?"iPad":"iPod"},at&&(et.version=at)):/googlebot/i.test(fe)?et={name:"Googlebot",googlebot:ve,version:z(/googlebot\/(\d+(\.\d+))/i)||at}: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&&at&&(et.version=at)):!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"):Mt?(et.xbox=ve,et.osname="Xbox"):Re?(et.windows=ve,et.osname="Windows"):ze&&(et.linux=ve,et.osname="Linux");function ot(Tt){switch(Tt){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}var wt="";et.windows?wt=ot(z(/Windows ((NT|XP)( \d\d?.\d)?)/i)):et.windowsphone?wt=z(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):et.mac?(wt=z(/Mac OS X (\d+([_\.\s]\d+)*)/i),wt=wt.replace(/[_\s]/g,".")):ae?(wt=z(/os (\d+([_\s]\d+)*) like mac os x/i),wt=wt.replace(/[_\s]/g,".")):le?wt=z(/android[ \/-](\d+(\.\d+)*)/i):et.webos?wt=z(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):et.blackberry?wt=z(/rim\stablet\sos\s(\d+(\.\d+)*)/i):et.bada?wt=z(/bada\/(\d+(\.\d+)*)/i):et.tizen&&(wt=z(/tizen[\/\s](\d+(\.\d+)*)/i)),wt&&(et.osversion=wt);var Et=!et.windows&&wt.split(".")[0];return ht||pe||ae=="ipad"||le&&(Et==3||Et>=4&&!pt)||et.silk?et.tablet=ve:(pt||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,_e,je){},{}],90:[function(ie,_e,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(Ue){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 Ue=new Uint8Array(Qe);return Ue.__proto__=me.prototype,Ue}function me(Qe,Ue,We){if(typeof Qe=="number"){if(typeof Ue=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return ee(Qe)}return xe(Qe,Ue,We)}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,Ue,We){if(typeof Qe=="string")return ae(Qe,Ue);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(St(Qe,ArrayBuffer)||Qe&&St(Qe.buffer,ArrayBuffer))return le(Qe,Ue,We);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,Ue,We);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"),Ue,We);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,Ue,We){return xe(Qe,Ue,We)},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,Ue,We){return fe(Qe),Qe<=0?we(Qe):Ue!==void 0?typeof We=="string"?we(Qe).fill(Ue,We):we(Qe).fill(Ue):we(Qe)}me.alloc=function(Qe,Ue,We){return z(Qe,Ue,We)};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,Ue){if((typeof Ue!="string"||Ue==="")&&(Ue="utf8"),!me.isEncoding(Ue))throw new TypeError("Unknown encoding: "+Ue);var We=Pe(Qe,Ue)|0,qe=we(We),He=qe.write(Qe,Ue);return He!==We&&(qe=qe.slice(0,He)),qe}function re(Qe){for(var Ue=Qe.length<0?0:pe(Qe.length)|0,We=we(Ue),qe=0;qe<Ue;qe+=1)We[qe]=Qe[qe]&255;return We}function le(Qe,Ue,We){if(Ue<0||Qe.byteLength<Ue)throw new RangeError('"offset" is outside of buffer bounds');if(Qe.byteLength<Ue+(We||0))throw new RangeError('"length" is outside of buffer bounds');var qe;return Ue===void 0&&We===void 0?qe=new Uint8Array(Qe):We===void 0?qe=new Uint8Array(Qe,Ue):qe=new Uint8Array(Qe,Ue,We),qe.__proto__=me.prototype,qe}function ue(Qe){if(me.isBuffer(Qe)){var Ue=pe(Qe.length)|0,We=we(Ue);return We.length===0||Qe.copy(We,0,0,Ue),We}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(Ue){return Ue!=null&&Ue._isBuffer===!0&&Ue!==me.prototype},me.compare=function(Ue,We){if(St(Ue,Uint8Array)&&(Ue=me.from(Ue,Ue.offset,Ue.byteLength)),St(We,Uint8Array)&&(We=me.from(We,We.offset,We.byteLength)),!me.isBuffer(Ue)||!me.isBuffer(We))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Ue===We)return 0;for(var qe=Ue.length,He=We.length,De=0,Le=Math.min(qe,He);De<Le;++De)if(Ue[De]!==We[De]){qe=Ue[De],He=We[De];break}return qe<He?-1:He<qe?1:0},me.isEncoding=function(Ue){switch(String(Ue).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(Ue,We){if(!Array.isArray(Ue))throw new TypeError('"list" argument must be an Array of Buffers');if(Ue.length===0)return me.alloc(0);var qe;if(We===void 0)for(We=0,qe=0;qe<Ue.length;++qe)We+=Ue[qe].length;var He=me.allocUnsafe(We),De=0;for(qe=0;qe<Ue.length;++qe){var Le=Ue[qe];if(St(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,Ue){if(me.isBuffer(Qe))return Qe.length;if(ArrayBuffer.isView(Qe)||St(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 We=Qe.length,qe=arguments.length>2&&arguments[2]===!0;if(!qe&&We===0)return 0;for(var He=!1;;)switch(Ue){case"ascii":case"latin1":case"binary":return We;case"utf8":case"utf-8":return nt(Qe).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return We*2;case"hex":return We>>>1;case"base64":return ut(Qe).length;default:if(He)return qe?-1:nt(Qe).length;Ue=(""+Ue).toLowerCase(),He=!0}}me.byteLength=Pe;function Ie(Qe,Ue,We){var qe=!1;if((Ue===void 0||Ue<0)&&(Ue=0),Ue>this.length||((We===void 0||We>this.length)&&(We=this.length),We<=0)||(We>>>=0,Ue>>>=0,We<=Ue))return"";for(Qe||(Qe="utf8");;)switch(Qe){case"hex":return Et(this,Ue,We);case"utf8":case"utf-8":return pt(this,Ue,We);case"ascii":return ot(this,Ue,We);case"latin1":case"binary":return wt(this,Ue,We);case"base64":return ht(this,Ue,We);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Tt(this,Ue,We);default:if(qe)throw new TypeError("Unknown encoding: "+Qe);Qe=(Qe+"").toLowerCase(),qe=!0}}me.prototype._isBuffer=!0;function ke(Qe,Ue,We){var qe=Qe[Ue];Qe[Ue]=Qe[We],Qe[We]=qe}me.prototype.swap16=function(){var Ue=this.length;if(Ue%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var We=0;We<Ue;We+=2)ke(this,We,We+1);return this},me.prototype.swap32=function(){var Ue=this.length;if(Ue%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var We=0;We<Ue;We+=4)ke(this,We,We+3),ke(this,We+1,We+2);return this},me.prototype.swap64=function(){var Ue=this.length;if(Ue%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var We=0;We<Ue;We+=8)ke(this,We,We+7),ke(this,We+1,We+6),ke(this,We+2,We+5),ke(this,We+3,We+4);return this},me.prototype.toString=function(){var Ue=this.length;return Ue===0?"":arguments.length===0?pt(this,0,Ue):Ie.apply(this,arguments)},me.prototype.toLocaleString=me.prototype.toString,me.prototype.equals=function(Ue){if(!me.isBuffer(Ue))throw new TypeError("Argument must be a Buffer");return this===Ue?!0:me.compare(this,Ue)===0},me.prototype.inspect=function(){var Ue="",We=je.INSPECT_MAX_BYTES;return Ue=this.toString("hex",0,We).replace(/(.{2})/g,"$1 ").trim(),this.length>We&&(Ue+=" ... "),"<Buffer "+Ue+">"},me.prototype.compare=function(Ue,We,qe,He,De){if(St(Ue,Uint8Array)&&(Ue=me.from(Ue,Ue.offset,Ue.byteLength)),!me.isBuffer(Ue))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Ue);if(We===void 0&&(We=0),qe===void 0&&(qe=Ue?Ue.length:0),He===void 0&&(He=0),De===void 0&&(De=this.length),We<0||qe>Ue.length||He<0||De>this.length)throw new RangeError("out of range index");if(He>=De&&We>=qe)return 0;if(He>=De)return-1;if(We>=qe)return 1;if(We>>>=0,qe>>>=0,He>>>=0,De>>>=0,this===Ue)return 0;for(var Le=De-He,Ke=qe-We,dt=Math.min(Le,Ke),Ve=this.slice(He,De),kt=Ue.slice(We,qe),zt=0;zt<dt;++zt)if(Ve[zt]!==kt[zt]){Le=Ve[zt],Ke=kt[zt];break}return Le<Ke?-1:Ke<Le?1:0};function Ne(Qe,Ue,We,qe,He){if(Qe.length===0)return-1;if(typeof We=="string"?(qe=We,We=0):We>2147483647?We=2147483647:We<-2147483648&&(We=-2147483648),We=+We,lt(We)&&(We=He?0:Qe.length-1),We<0&&(We=Qe.length+We),We>=Qe.length){if(He)return-1;We=Qe.length-1}else if(We<0)if(He)We=0;else return-1;if(typeof Ue=="string"&&(Ue=me.from(Ue,qe)),me.isBuffer(Ue))return Ue.length===0?-1:Oe(Qe,Ue,We,qe,He);if(typeof Ue=="number")return Ue=Ue&255,typeof Uint8Array.prototype.indexOf=="function"?He?Uint8Array.prototype.indexOf.call(Qe,Ue,We):Uint8Array.prototype.lastIndexOf.call(Qe,Ue,We):Oe(Qe,[Ue],We,qe,He);throw new TypeError("val must be string, number or Buffer")}function Oe(Qe,Ue,We,qe,He){var De=1,Le=Qe.length,Ke=Ue.length;if(qe!==void 0&&(qe=String(qe).toLowerCase(),qe==="ucs2"||qe==="ucs-2"||qe==="utf16le"||qe==="utf-16le")){if(Qe.length<2||Ue.length<2)return-1;De=2,Le/=2,Ke/=2,We/=2}function dt(At,Nt){return De===1?At[Nt]:At.readUInt16BE(Nt*De)}var Ve;if(He){var kt=-1;for(Ve=We;Ve<Le;Ve++)if(dt(Qe,Ve)===dt(Ue,kt===-1?0:Ve-kt)){if(kt===-1&&(kt=Ve),Ve-kt+1===Ke)return kt*De}else kt!==-1&&(Ve-=Ve-kt),kt=-1}else for(We+Ke>Le&&(We=Le-Ke),Ve=We;Ve>=0;Ve--){for(var zt=!0,Xt=0;Xt<Ke;Xt++)if(dt(Qe,Ve+Xt)!==dt(Ue,Xt)){zt=!1;break}if(zt)return Ve}return-1}me.prototype.includes=function(Ue,We,qe){return this.indexOf(Ue,We,qe)!==-1},me.prototype.indexOf=function(Ue,We,qe){return Ne(this,Ue,We,qe,!0)},me.prototype.lastIndexOf=function(Ue,We,qe){return Ne(this,Ue,We,qe,!1)};function Fe(Qe,Ue,We,qe){We=Number(We)||0;var He=Qe.length-We;qe?(qe=Number(qe),qe>He&&(qe=He)):qe=He;var De=Ue.length;qe>De/2&&(qe=De/2);for(var Le=0;Le<qe;++Le){var Ke=parseInt(Ue.substr(Le*2,2),16);if(lt(Ke))return Le;Qe[We+Le]=Ke}return Le}function Re(Qe,Ue,We,qe){return bt(nt(Ue,Qe.length-We),Qe,We,qe)}function Ye(Qe,Ue,We,qe){return bt(ft(Ue),Qe,We,qe)}function ze(Qe,Ue,We,qe){return Ye(Qe,Ue,We,qe)}function Ze(Qe,Ue,We,qe){return bt(ut(Ue),Qe,We,qe)}function at(Qe,Ue,We,qe){return bt(Xe(Ue,Qe.length-We),Qe,We,qe)}me.prototype.write=function(Ue,We,qe,He){if(We===void 0)He="utf8",qe=this.length,We=0;else if(qe===void 0&&typeof We=="string")He=We,qe=this.length,We=0;else if(isFinite(We))We=We>>>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-We;if((qe===void 0||qe>De)&&(qe=De),Ue.length>0&&(qe<0||We<0)||We>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,Ue,We,qe);case"utf8":case"utf-8":return Re(this,Ue,We,qe);case"ascii":return Ye(this,Ue,We,qe);case"latin1":case"binary":return ze(this,Ue,We,qe);case"base64":return Ze(this,Ue,We,qe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return at(this,Ue,We,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,Ue,We){return Ue===0&&We===Qe.length?ce.fromByteArray(Qe):ce.fromByteArray(Qe.slice(Ue,We))}function pt(Qe,Ue,We){We=Math.min(Qe.length,We);for(var qe=[],He=Ue;He<We;){var De=Qe[He],Le=null,Ke=De>239?4:De>223?3:De>191?2:1;if(He+Ke<=We){var dt,Ve,kt,zt;switch(Ke){case 1:De<128&&(Le=De);break;case 2:dt=Qe[He+1],(dt&192)===128&&(zt=(De&31)<<6|dt&63,zt>127&&(Le=zt));break;case 3:dt=Qe[He+1],Ve=Qe[He+2],(dt&192)===128&&(Ve&192)===128&&(zt=(De&15)<<12|(dt&63)<<6|Ve&63,zt>2047&&(zt<55296||zt>57343)&&(Le=zt));break;case 4:dt=Qe[He+1],Ve=Qe[He+2],kt=Qe[He+3],(dt&192)===128&&(Ve&192)===128&&(kt&192)===128&&(zt=(De&15)<<18|(dt&63)<<12|(Ve&63)<<6|kt&63,zt>65535&&zt<1114112&&(Le=zt))}}Le===null?(Le=65533,Ke=1):Le>65535&&(Le-=65536,qe.push(Le>>>10&1023|55296),Le=56320|Le&1023),qe.push(Le),He+=Ke}return et(qe)}var Mt=4096;function et(Qe){var Ue=Qe.length;if(Ue<=Mt)return String.fromCharCode.apply(String,Qe);for(var We="",qe=0;qe<Ue;)We+=String.fromCharCode.apply(String,Qe.slice(qe,qe+=Mt));return We}function ot(Qe,Ue,We){var qe="";We=Math.min(Qe.length,We);for(var He=Ue;He<We;++He)qe+=String.fromCharCode(Qe[He]&127);return qe}function wt(Qe,Ue,We){var qe="";We=Math.min(Qe.length,We);for(var He=Ue;He<We;++He)qe+=String.fromCharCode(Qe[He]);return qe}function Et(Qe,Ue,We){var qe=Qe.length;(!Ue||Ue<0)&&(Ue=0),(!We||We<0||We>qe)&&(We=qe);for(var He="",De=Ue;De<We;++De)He+=mt(Qe[De]);return He}function Tt(Qe,Ue,We){for(var qe=Qe.slice(Ue,We),He="",De=0;De<qe.length;De+=2)He+=String.fromCharCode(qe[De]+qe[De+1]*256);return He}me.prototype.slice=function(Ue,We){var qe=this.length;Ue=~~Ue,We=We===void 0?qe:~~We,Ue<0?(Ue+=qe,Ue<0&&(Ue=0)):Ue>qe&&(Ue=qe),We<0?(We+=qe,We<0&&(We=0)):We>qe&&(We=qe),We<Ue&&(We=Ue);var He=this.subarray(Ue,We);return He.__proto__=me.prototype,He};function vt(Qe,Ue,We){if(Qe%1!==0||Qe<0)throw new RangeError("offset is not uint");if(Qe+Ue>We)throw new RangeError("Trying to access beyond buffer length")}me.prototype.readUIntLE=function(Ue,We,qe){Ue=Ue>>>0,We=We>>>0,qe||vt(Ue,We,this.length);for(var He=this[Ue],De=1,Le=0;++Le<We&&(De*=256);)He+=this[Ue+Le]*De;return He},me.prototype.readUIntBE=function(Ue,We,qe){Ue=Ue>>>0,We=We>>>0,qe||vt(Ue,We,this.length);for(var He=this[Ue+--We],De=1;We>0&&(De*=256);)He+=this[Ue+--We]*De;return He},me.prototype.readUInt8=function(Ue,We){return Ue=Ue>>>0,We||vt(Ue,1,this.length),this[Ue]},me.prototype.readUInt16LE=function(Ue,We){return Ue=Ue>>>0,We||vt(Ue,2,this.length),this[Ue]|this[Ue+1]<<8},me.prototype.readUInt16BE=function(Ue,We){return Ue=Ue>>>0,We||vt(Ue,2,this.length),this[Ue]<<8|this[Ue+1]},me.prototype.readUInt32LE=function(Ue,We){return Ue=Ue>>>0,We||vt(Ue,4,this.length),(this[Ue]|this[Ue+1]<<8|this[Ue+2]<<16)+this[Ue+3]*16777216},me.prototype.readUInt32BE=function(Ue,We){return Ue=Ue>>>0,We||vt(Ue,4,this.length),this[Ue]*16777216+(this[Ue+1]<<16|this[Ue+2]<<8|this[Ue+3])},me.prototype.readIntLE=function(Ue,We,qe){Ue=Ue>>>0,We=We>>>0,qe||vt(Ue,We,this.length);for(var He=this[Ue],De=1,Le=0;++Le<We&&(De*=256);)He+=this[Ue+Le]*De;return De*=128,He>=De&&(He-=Math.pow(2,8*We)),He},me.prototype.readIntBE=function(Ue,We,qe){Ue=Ue>>>0,We=We>>>0,qe||vt(Ue,We,this.length);for(var He=We,De=1,Le=this[Ue+--He];He>0&&(De*=256);)Le+=this[Ue+--He]*De;return De*=128,Le>=De&&(Le-=Math.pow(2,8*We)),Le},me.prototype.readInt8=function(Ue,We){return Ue=Ue>>>0,We||vt(Ue,1,this.length),this[Ue]&128?(255-this[Ue]+1)*-1:this[Ue]},me.prototype.readInt16LE=function(Ue,We){Ue=Ue>>>0,We||vt(Ue,2,this.length);var qe=this[Ue]|this[Ue+1]<<8;return qe&32768?qe|4294901760:qe},me.prototype.readInt16BE=function(Ue,We){Ue=Ue>>>0,We||vt(Ue,2,this.length);var qe=this[Ue+1]|this[Ue]<<8;return qe&32768?qe|4294901760:qe},me.prototype.readInt32LE=function(Ue,We){return Ue=Ue>>>0,We||vt(Ue,4,this.length),this[Ue]|this[Ue+1]<<8|this[Ue+2]<<16|this[Ue+3]<<24},me.prototype.readInt32BE=function(Ue,We){return Ue=Ue>>>0,We||vt(Ue,4,this.length),this[Ue]<<24|this[Ue+1]<<16|this[Ue+2]<<8|this[Ue+3]},me.prototype.readFloatLE=function(Ue,We){return Ue=Ue>>>0,We||vt(Ue,4,this.length),be.read(this,Ue,!0,23,4)},me.prototype.readFloatBE=function(Ue,We){return Ue=Ue>>>0,We||vt(Ue,4,this.length),be.read(this,Ue,!1,23,4)},me.prototype.readDoubleLE=function(Ue,We){return Ue=Ue>>>0,We||vt(Ue,8,this.length),be.read(this,Ue,!0,52,8)},me.prototype.readDoubleBE=function(Ue,We){return Ue=Ue>>>0,We||vt(Ue,8,this.length),be.read(this,Ue,!1,52,8)};function gt(Qe,Ue,We,qe,He,De){if(!me.isBuffer(Qe))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ue>He||Ue<De)throw new RangeError('"value" argument is out of bounds');if(We+qe>Qe.length)throw new RangeError("Index out of range")}me.prototype.writeUIntLE=function(Ue,We,qe,He){if(Ue=+Ue,We=We>>>0,qe=qe>>>0,!He){var De=Math.pow(2,8*qe)-1;gt(this,Ue,We,qe,De,0)}var Le=1,Ke=0;for(this[We]=Ue&255;++Ke<qe&&(Le*=256);)this[We+Ke]=Ue/Le&255;return We+qe},me.prototype.writeUIntBE=function(Ue,We,qe,He){if(Ue=+Ue,We=We>>>0,qe=qe>>>0,!He){var De=Math.pow(2,8*qe)-1;gt(this,Ue,We,qe,De,0)}var Le=qe-1,Ke=1;for(this[We+Le]=Ue&255;--Le>=0&&(Ke*=256);)this[We+Le]=Ue/Ke&255;return We+qe},me.prototype.writeUInt8=function(Ue,We,qe){return Ue=+Ue,We=We>>>0,qe||gt(this,Ue,We,1,255,0),this[We]=Ue&255,We+1},me.prototype.writeUInt16LE=function(Ue,We,qe){return Ue=+Ue,We=We>>>0,qe||gt(this,Ue,We,2,65535,0),this[We]=Ue&255,this[We+1]=Ue>>>8,We+2},me.prototype.writeUInt16BE=function(Ue,We,qe){return Ue=+Ue,We=We>>>0,qe||gt(this,Ue,We,2,65535,0),this[We]=Ue>>>8,this[We+1]=Ue&255,We+2},me.prototype.writeUInt32LE=function(Ue,We,qe){return Ue=+Ue,We=We>>>0,qe||gt(this,Ue,We,4,4294967295,0),this[We+3]=Ue>>>24,this[We+2]=Ue>>>16,this[We+1]=Ue>>>8,this[We]=Ue&255,We+4},me.prototype.writeUInt32BE=function(Ue,We,qe){return Ue=+Ue,We=We>>>0,qe||gt(this,Ue,We,4,4294967295,0),this[We]=Ue>>>24,this[We+1]=Ue>>>16,this[We+2]=Ue>>>8,this[We+3]=Ue&255,We+4},me.prototype.writeIntLE=function(Ue,We,qe,He){if(Ue=+Ue,We=We>>>0,!He){var De=Math.pow(2,8*qe-1);gt(this,Ue,We,qe,De-1,-De)}var Le=0,Ke=1,dt=0;for(this[We]=Ue&255;++Le<qe&&(Ke*=256);)Ue<0&&dt===0&&this[We+Le-1]!==0&&(dt=1),this[We+Le]=(Ue/Ke>>0)-dt&255;return We+qe},me.prototype.writeIntBE=function(Ue,We,qe,He){if(Ue=+Ue,We=We>>>0,!He){var De=Math.pow(2,8*qe-1);gt(this,Ue,We,qe,De-1,-De)}var Le=qe-1,Ke=1,dt=0;for(this[We+Le]=Ue&255;--Le>=0&&(Ke*=256);)Ue<0&&dt===0&&this[We+Le+1]!==0&&(dt=1),this[We+Le]=(Ue/Ke>>0)-dt&255;return We+qe},me.prototype.writeInt8=function(Ue,We,qe){return Ue=+Ue,We=We>>>0,qe||gt(this,Ue,We,1,127,-128),Ue<0&&(Ue=255+Ue+1),this[We]=Ue&255,We+1},me.prototype.writeInt16LE=function(Ue,We,qe){return Ue=+Ue,We=We>>>0,qe||gt(this,Ue,We,2,32767,-32768),this[We]=Ue&255,this[We+1]=Ue>>>8,We+2},me.prototype.writeInt16BE=function(Ue,We,qe){return Ue=+Ue,We=We>>>0,qe||gt(this,Ue,We,2,32767,-32768),this[We]=Ue>>>8,this[We+1]=Ue&255,We+2},me.prototype.writeInt32LE=function(Ue,We,qe){return Ue=+Ue,We=We>>>0,qe||gt(this,Ue,We,4,2147483647,-2147483648),this[We]=Ue&255,this[We+1]=Ue>>>8,this[We+2]=Ue>>>16,this[We+3]=Ue>>>24,We+4},me.prototype.writeInt32BE=function(Ue,We,qe){return Ue=+Ue,We=We>>>0,qe||gt(this,Ue,We,4,2147483647,-2147483648),Ue<0&&(Ue=4294967295+Ue+1),this[We]=Ue>>>24,this[We+1]=Ue>>>16,this[We+2]=Ue>>>8,this[We+3]=Ue&255,We+4};function yt(Qe,Ue,We,qe,He,De){if(We+qe>Qe.length)throw new RangeError("Index out of range");if(We<0)throw new RangeError("Index out of range")}function It(Qe,Ue,We,qe,He){return Ue=+Ue,We=We>>>0,He||yt(Qe,Ue,We,4,34028234663852886e22,-34028234663852886e22),be.write(Qe,Ue,We,qe,23,4),We+4}me.prototype.writeFloatLE=function(Ue,We,qe){return It(this,Ue,We,!0,qe)},me.prototype.writeFloatBE=function(Ue,We,qe){return It(this,Ue,We,!1,qe)};function Ot(Qe,Ue,We,qe,He){return Ue=+Ue,We=We>>>0,He||yt(Qe,Ue,We,8,17976931348623157e292,-17976931348623157e292),be.write(Qe,Ue,We,qe,52,8),We+8}me.prototype.writeDoubleLE=function(Ue,We,qe){return Ot(this,Ue,We,!0,qe)},me.prototype.writeDoubleBE=function(Ue,We,qe){return Ot(this,Ue,We,!1,qe)},me.prototype.copy=function(Ue,We,qe,He){if(!me.isBuffer(Ue))throw new TypeError("argument should be a Buffer");if(qe||(qe=0),!He&&He!==0&&(He=this.length),We>=Ue.length&&(We=Ue.length),We||(We=0),He>0&&He<qe&&(He=qe),He===qe||Ue.length===0||this.length===0)return 0;if(We<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),Ue.length-We<He-qe&&(He=Ue.length-We+qe);var De=He-qe;if(this===Ue&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(We,qe,He);else if(this===Ue&&qe<We&&We<He)for(var Le=De-1;Le>=0;--Le)Ue[Le+We]=this[Le+qe];else Uint8Array.prototype.set.call(Ue,this.subarray(qe,He),We);return De},me.prototype.fill=function(Ue,We,qe,He){if(typeof Ue=="string"){if(typeof We=="string"?(He=We,We=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(Ue.length===1){var De=Ue.charCodeAt(0);(He==="utf8"&&De<128||He==="latin1")&&(Ue=De)}}else typeof Ue=="number"&&(Ue=Ue&255);if(We<0||this.length<We||this.length<qe)throw new RangeError("Out of range index");if(qe<=We)return this;We=We>>>0,qe=qe===void 0?this.length:qe>>>0,Ue||(Ue=0);var Le;if(typeof Ue=="number")for(Le=We;Le<qe;++Le)this[Le]=Ue;else{var Ke=me.isBuffer(Ue)?Ue:me.from(Ue,He),dt=Ke.length;if(dt===0)throw new TypeError('The value "'+Ue+'" is invalid for argument "value"');for(Le=0;Le<qe-We;++Le)this[Le+We]=Ke[Le%dt]}return this};var Vt=/[^+/0-9A-Za-z-_]/g;function Ct(Qe){if(Qe=Qe.split("=")[0],Qe=Qe.trim().replace(Vt,""),Qe.length<2)return"";for(;Qe.length%4!==0;)Qe=Qe+"=";return Qe}function mt(Qe){return Qe<16?"0"+Qe.toString(16):Qe.toString(16)}function nt(Qe,Ue){Ue=Ue||1/0;for(var We,qe=Qe.length,He=null,De=[],Le=0;Le<qe;++Le){if(We=Qe.charCodeAt(Le),We>55295&&We<57344){if(!He){if(We>56319){(Ue-=3)>-1&&De.push(239,191,189);continue}else if(Le+1===qe){(Ue-=3)>-1&&De.push(239,191,189);continue}He=We;continue}if(We<56320){(Ue-=3)>-1&&De.push(239,191,189),He=We;continue}We=(He-55296<<10|We-56320)+65536}else He&&(Ue-=3)>-1&&De.push(239,191,189);if(He=null,We<128){if((Ue-=1)<0)break;De.push(We)}else if(We<2048){if((Ue-=2)<0)break;De.push(We>>6|192,We&63|128)}else if(We<65536){if((Ue-=3)<0)break;De.push(We>>12|224,We>>6&63|128,We&63|128)}else if(We<1114112){if((Ue-=4)<0)break;De.push(We>>18|240,We>>12&63|128,We>>6&63|128,We&63|128)}else throw new Error("Invalid code point")}return De}function ft(Qe){for(var Ue=[],We=0;We<Qe.length;++We)Ue.push(Qe.charCodeAt(We)&255);return Ue}function Xe(Qe,Ue){for(var We,qe,He,De=[],Le=0;Le<Qe.length&&!((Ue-=2)<0);++Le)We=Qe.charCodeAt(Le),qe=We>>8,He=We%256,De.push(He),De.push(qe);return De}function ut(Qe){return ce.toByteArray(Ct(Qe))}function bt(Qe,Ue,We,qe){for(var He=0;He<qe&&!(He+We>=Ue.length||He>=Qe.length);++He)Ue[He+We]=Qe[He];return He}function St(Qe,Ue){return Qe instanceof Ue||Qe!=null&&Qe.constructor!=null&&Qe.constructor.name!=null&&Qe.constructor.name===Ue.name}function lt(Qe){return Qe!==Qe}}).call(this)}).call(this,ie("buffer").Buffer)},{"base64-js":87,buffer:90,ieee754:357}],91:[function(ie,_e,je){_e.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,_e,je){"use strict";var ve=ie("get-intrinsic"),ce=ie("./"),be=ce(ve("String.prototype.indexOf"));_e.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,_e,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}_e.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(_e.exports,"apply",{value:fe}):_e.exports.apply=fe},{"function-bind":347,"get-intrinsic":348}],94:[function(ie,_e,je){"use strict";var ve=Array.prototype.slice;_e.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,_e,je){var ve=ie("../internals/global"),ce=ie("../internals/is-callable"),be=ie("../internals/try-to-string"),Ce=ve.TypeError;_e.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,_e,je){var ve=ie("../internals/global"),ce=ie("../internals/is-constructor"),be=ie("../internals/try-to-string"),Ce=ve.TypeError;_e.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,_e,je){var ve=ie("../internals/global"),ce=ie("../internals/is-callable"),be=ve.String,Ce=ve.TypeError;_e.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,_e,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)}),_e.exports=function(we){ye[Ce][we]=!0}},{"../internals/object-create":196,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],99:[function(ie,_e,je){"use strict";var ve=ie("../internals/string-multibyte").charAt;_e.exports=function(ce,be,Ce){return be+(Ce?ve(ce,be).length:1)}},{"../internals/string-multibyte":239}],100:[function(ie,_e,je){var ve=ie("../internals/global"),ce=ie("../internals/object-is-prototype-of"),be=ve.TypeError;_e.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,_e,je){var ve=ie("../internals/global"),ce=ie("../internals/is-object"),be=ve.String,Ce=ve.TypeError;_e.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,_e,je){_e.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"},{}],103:[function(ie,_e,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,Ne=Ee&&re(Ee),Oe=Pe&&re(Pe),Fe=Object.prototype,Re=be.TypeError,Ye=ue("toStringTag"),ze=pe("TYPED_ARRAY_TAG"),Ze=pe("TYPED_ARRAY_CONSTRUCTOR"),at=ve&&!!le&&me(be.opera)!=="Opera",ht=!1,pt,Mt,et,ot={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},wt={BigInt64Array:8,BigUint64Array:8},Et=function(Vt){if(!ye(Vt))return!1;var Ct=me(Vt);return Ct==="DataView"||we(ot,Ct)||we(wt,Ct)},Tt=function(Ot){if(!ye(Ot))return!1;var Vt=me(Ot);return we(ot,Vt)||we(wt,Vt)},vt=function(Ot){if(Tt(Ot))return Ot;throw Re("Target is not a typed array")},gt=function(Ot){if(Ce(Ot)&&(!le||ae(Ne,Ot)))return Ot;throw Re(xe(Ot)+" is not a typed array constructor")},yt=function(Ot,Vt,Ct,mt){if(ce){if(Ct)for(var nt in ot){var ft=be[nt];if(ft&&we(ft.prototype,Ot))try{delete ft.prototype[Ot]}catch(Xe){try{ft.prototype[Ot]=Vt}catch(ut){}}}(!Oe[Ot]||Ct)&&z(Oe,Ot,Ct?Vt:at&&Pe[Ot]||Vt,mt)}},It=function(Ot,Vt,Ct){var mt,nt;if(ce){if(le){if(Ct){for(mt in ot)if(nt=be[mt],nt&&we(nt,Ot))try{delete nt[Ot]}catch(ft){}}if(!Ne[Ot]||Ct)try{return z(Ne,Ot,Ct?Vt:at&&Ne[Ot]||Vt)}catch(ft){}else return}for(mt in ot)nt=be[mt],nt&&(!nt[Ot]||Ct)&&z(nt,Ot,Vt)}};for(pt in ot)Mt=be[pt],et=Mt&&Mt.prototype,et?fe(et,Ze,Mt):at=!1;for(pt in wt)Mt=be[pt],et=Mt&&Mt.prototype,et&&fe(et,Ze,Mt);if((!at||!Ce(Ne)||Ne===Function.prototype)&&(Ne=function(){throw Re("Incorrect invocation")},at))for(pt in ot)be[pt]&&le(be[pt],Ne);if((!at||!Oe||Oe===Fe)&&(Oe=Ne.prototype,at))for(pt in ot)be[pt]&&le(be[pt].prototype,Oe);if(at&&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(pt in ot)be[pt]&&fe(be[pt],ze,pt)}_e.exports={NATIVE_ARRAY_BUFFER_VIEWS:at,TYPED_ARRAY_CONSTRUCTOR:Ze,TYPED_ARRAY_TAG:ht&&ze,aTypedArray:vt,aTypedArrayConstructor:gt,exportTypedArrayMethod:yt,exportTypedArrayStaticMethod:It,isView:Et,isTypedArray:Tt,TypedArray:Ne,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,_e,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"),Ne=ie("../internals/internal-state"),Oe=ye.PROPER,Fe=ye.CONFIGURABLE,Re=Ne.get,Ye=Ne.set,ze="ArrayBuffer",Ze="DataView",at="prototype",ht="Wrong length",pt="Wrong index",Mt=ve[ze],et=Mt,ot=et&&et[at],wt=ve[Ze],Et=wt&&wt[at],Tt=Object.prototype,vt=ve.Array,gt=ve.RangeError,yt=ce(Pe),It=ce([].reverse),Ot=re.pack,Vt=re.unpack,Ct=function(Le){return[Le&255]},mt=function(Le){return[Le&255,Le>>8&255]},nt=function(Le){return[Le&255,Le>>8&255,Le>>16&255,Le>>24&255]},ft=function(Le){return Le[3]<<24|Le[2]<<16|Le[1]<<8|Le[0]},Xe=function(Le){return Ot(Le,23,4)},ut=function(Le){return Ot(Le,52,8)},bt=function(Le,Ke){Ee(Le[at],Ke,{get:function(){return Re(this)[Ke]}})},St=function(Le,Ke,dt,Ve){var kt=ae(dt),zt=Re(Le);if(kt+Ke>zt.byteLength)throw gt(pt);var Xt=Re(zt.buffer).bytes,At=kt+zt.byteOffset,Nt=Ie(Xt,At,At+Ke);return Ve?Nt:It(Nt)},lt=function(Le,Ke,dt,Ve,kt,zt){var Xt=ae(dt),At=Re(Le);if(Xt+Ke>At.byteLength)throw gt(pt);for(var Nt=Re(At.buffer).bytes,qt=Xt+At.byteOffset,on=Ve(+kt),gn=0;gn<Ke;gn++)Nt[qt+gn]=on[zt?gn:Ke-gn-1]};if(!Ce)et=function(Ke){fe(this,ot);var dt=ae(Ke);Ye(this,{bytes:yt(vt(dt),0),byteLength:dt}),be||(this.byteLength=dt)},ot=et[at],wt=function(Ke,dt,Ve){fe(this,Et),fe(Ke,ot);var kt=Re(Ke).byteLength,zt=z(dt);if(zt<0||zt>kt)throw gt("Wrong offset");if(Ve=Ve===void 0?kt-zt:ee(Ve),zt+Ve>kt)throw gt(ht);Ye(this,{buffer:Ke,byteLength:Ve,byteOffset:zt}),be||(this.buffer=Ke,this.byteLength=Ve,this.byteOffset=zt)},Et=wt[at],be&&(bt(et,"byteLength"),bt(wt,"buffer"),bt(wt,"byteLength"),bt(wt,"byteOffset")),me(Et,{getInt8:function(Ke){return St(this,1,Ke)[0]<<24>>24},getUint8:function(Ke){return St(this,1,Ke)[0]},getInt16:function(Ke){var dt=St(this,2,Ke,arguments.length>1?arguments[1]:void 0);return(dt[1]<<8|dt[0])<<16>>16},getUint16:function(Ke){var dt=St(this,2,Ke,arguments.length>1?arguments[1]:void 0);return dt[1]<<8|dt[0]},getInt32:function(Ke){return ft(St(this,4,Ke,arguments.length>1?arguments[1]:void 0))},getUint32:function(Ke){return ft(St(this,4,Ke,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(Ke){return Vt(St(this,4,Ke,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(Ke){return Vt(St(this,8,Ke,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(Ke,dt){lt(this,1,Ke,Ct,dt)},setUint8:function(Ke,dt){lt(this,1,Ke,Ct,dt)},setInt16:function(Ke,dt){lt(this,2,Ke,mt,dt,arguments.length>2?arguments[2]:void 0)},setUint16:function(Ke,dt){lt(this,2,Ke,mt,dt,arguments.length>2?arguments[2]:void 0)},setInt32:function(Ke,dt){lt(this,4,Ke,nt,dt,arguments.length>2?arguments[2]:void 0)},setUint32:function(Ke,dt){lt(this,4,Ke,nt,dt,arguments.length>2?arguments[2]:void 0)},setFloat32:function(Ke,dt){lt(this,4,Ke,Xe,dt,arguments.length>2?arguments[2]:void 0)},setFloat64:function(Ke,dt){lt(this,8,Ke,ut,dt,arguments.length>2?arguments[2]:void 0)}});else{var Qe=Oe&&Mt.name!==ze;if(!xe(function(){Mt(1)})||!xe(function(){new Mt(-1)})||xe(function(){return new Mt,new Mt(1.5),new Mt(NaN),Qe&&!Fe})){et=function(Ke){return fe(this,ot),new Mt(ae(Ke))},et[at]=ot;for(var Ue=pe(Mt),We=0,qe;Ue.length>We;)(qe=Ue[We++])in et||we(et,qe,Mt[qe]);ot.constructor=et}else Qe&&Fe&&we(Mt,"name",ze);ue&&le(Et)!==Tt&&ue(Et,Tt);var He=new wt(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(Ke,dt){De(this,Ke,dt<<24>>24)},setUint8:function(Ke,dt){De(this,Ke,dt<<24>>24)}},{unsafe:!0})}ke(et,ze),ke(wt,Ze),_e.exports={ArrayBuffer:et,DataView:wt}},{"../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,_e,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;_e.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,_e,je){"use strict";var ve=ie("../internals/to-object"),ce=ie("../internals/to-absolute-index"),be=ie("../internals/length-of-array-like");_e.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,_e,je){"use strict";var ve=ie("../internals/array-iteration").forEach,ce=ie("../internals/array-method-is-strict"),be=ce("forEach");_e.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,_e,je){var ve=ie("../internals/length-of-array-like");_e.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,_e,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;_e.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),Ne=0,Oe,Fe,Re,Ye,ze,Ze;if(ke&&!(this==ae&&we(ke)))for(Ye=z(ue,ke),ze=Ye.next,Fe=pe?new this:[];!(Re=be(ze,Ye)).done;Ne++)Ze=Ie?ye(Ye,Pe,[Re.value,Ne],!0):Re.value,fe(Fe,Ne,Ze);else for(Oe=xe(ue),Fe=pe?new this(Oe):ae(Oe);Oe>Ne;Ne++)Ze=Ie?Pe(ue[Ne],Ne):ue[Ne],fe(Fe,Ne,Ze);return Fe.length=Ne,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,_e,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}};_e.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,_e,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 Ne=Ce(Ee),Oe=be(Ne),Fe=ve(Pe,Ie),Re=ye(Oe),Ye=0,ze=ke||we,Ze=z?ze(Ee,Re):ee||ue?ze(Ee,0):void 0,at,ht;Re>Ye;Ye++)if((pe||Ye in Oe)&&(at=Oe[Ye],ht=Fe(at,Ye,Ne),fe))if(z)Ze[Ye]=ht;else if(ht)switch(fe){case 3:return!0;case 5:return at;case 6:return Ye;case 2:me(Ze,at)}else switch(fe){case 4:return!1;case 7:me(Ze,at)}return le?-1:ae||re?re:Ze}};_e.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,_e,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;_e.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,_e,je){var ve=ie("../internals/fails"),ce=ie("../internals/well-known-symbol"),be=ie("../internals/engine-v8-version"),Ce=ce("species");_e.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,_e,je){"use strict";var ve=ie("../internals/fails");_e.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,_e,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}};_e.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,_e,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;_e.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,_e,je){var ve=ie("../internals/function-uncurry-this");_e.exports=ve([].slice)},{"../internals/function-uncurry-this":157}],118:[function(ie,_e,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};_e.exports=be},{"../internals/array-slice-simple":116}],119:[function(ie,_e,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;_e.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,_e,je){var ve=ie("../internals/array-species-constructor");_e.exports=function(ce,be){return new(ve(ce))(be===0?0:be)}},{"../internals/array-species-constructor":119}],121:[function(ie,_e,je){var ve=ie("../internals/an-object"),ce=ie("../internals/iterator-close");_e.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,_e,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){}_e.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,_e,je){var ve=ie("../internals/function-uncurry-this"),ce=ve({}.toString),be=ve("".slice);_e.exports=function(Ce){return be(ce(Ce),8,-1)}},{"../internals/function-uncurry-this":157}],124:[function(ie,_e,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){}};_e.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,_e,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");_e.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,_e,je){var ve=ie("../internals/well-known-symbol"),ce=ve("match");_e.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,_e,je){var ve=ie("../internals/fails");_e.exports=!ve(function(){function ce(){}return ce.prototype.constructor=null,Object.getPrototypeOf(new ce)!==ce.prototype})},{"../internals/fails":150}],128:[function(ie,_e,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};_e.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,_e,je){var ve=ie("../internals/descriptors"),ce=ie("../internals/object-define-property"),be=ie("../internals/create-property-descriptor");_e.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,_e,je){_e.exports=function(ve,ce){return{enumerable:!(ve&1),configurable:!(ve&2),writable:!(ve&4),value:ce}}},{}],131:[function(ie,_e,je){"use strict";var ve=ie("../internals/to-property-key"),ce=ie("../internals/object-define-property"),be=ie("../internals/create-property-descriptor");_e.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,_e,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",Ne="values",Oe="entries",Fe=function(){return this};_e.exports=function(Re,Ye,ze,Ze,at,ht,pt){we(ze,Ye,Ze);var Mt=function(Ot){if(Ot===at&&Tt)return Tt;if(!Pe&&Ot in wt)return wt[Ot];switch(Ot){case ke:return function(){return new ze(this,Ot)};case Ne:return function(){return new ze(this,Ot)};case Oe:return function(){return new ze(this,Ot)}}return function(){return new ze(this)}},et=Ye+" Iterator",ot=!1,wt=Re.prototype,Et=wt[Ie]||wt["@@iterator"]||at&&wt[at],Tt=!Pe&&Et||Mt(at),vt=Ye=="Array"&&wt.entries||Et,gt,yt,It;if(vt&&(gt=me(vt.call(new Re)),gt!==Object.prototype&>.next&&(!be&&me(gt)!==Ee&&(xe?xe(gt,Ee):ye(gt[Ie])||ee(gt,Ie,Fe)),fe(gt,et,!0,!0),be&&(re[et]=Fe))),ue&&at==Ne&&Et&&Et.name!==Ne&&(!be&&pe?z(wt,"name",Ne):(ot=!0,Tt=function(){return ce(Et,this)})),at)if(yt={values:Mt(Ne),keys:ht?Tt:Mt(ke),entries:Mt(Oe)},pt)for(It in yt)(Pe||ot||!(It in wt))&&ee(wt,It,yt[It]);else ve({target:Ye,proto:!0,forced:Pe||ot},yt);return(!be||pt)&&wt[Ie]!==Tt&&ee(wt,Ie,Tt,{name:at}),re[Ye]=Tt,yt}},{"../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,_e,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;_e.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,_e,je){var ve=ie("../internals/fails");_e.exports=!ve(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},{"../internals/fails":150}],135:[function(ie,_e,je){var ve=ie("../internals/global"),ce=ie("../internals/is-object"),be=ve.document,Ce=ce(be)&&ce(be.createElement);_e.exports=function(ye){return Ce?be.createElement(ye):{}}},{"../internals/global":163,"../internals/is-object":180}],136:[function(ie,_e,je){_e.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,_e,je){var ve=ie("../internals/document-create-element"),ce=ve("span").classList,be=ce&&ce.constructor&&ce.constructor.prototype;_e.exports=be===Object.prototype?void 0:be},{"../internals/document-create-element":135}],138:[function(ie,_e,je){var ve=ie("../internals/engine-user-agent"),ce=ve.match(/firefox\/(\d+)/i);_e.exports=!!ce&&+ce[1]},{"../internals/engine-user-agent":145}],139:[function(ie,_e,je){_e.exports=typeof window=="object"&&typeof Deno!="object"},{}],140:[function(ie,_e,je){var ve=ie("../internals/engine-user-agent");_e.exports=/MSIE|Trident/.test(ve)},{"../internals/engine-user-agent":145}],141:[function(ie,_e,je){var ve=ie("../internals/engine-user-agent"),ce=ie("../internals/global");_e.exports=/ipad|iphone|ipod/i.test(ve)&&ce.Pebble!==void 0},{"../internals/engine-user-agent":145,"../internals/global":163}],142:[function(ie,_e,je){var ve=ie("../internals/engine-user-agent");_e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(ve)},{"../internals/engine-user-agent":145}],143:[function(ie,_e,je){var ve=ie("../internals/classof-raw"),ce=ie("../internals/global");_e.exports=ve(ce.process)=="process"},{"../internals/classof-raw":123,"../internals/global":163}],144:[function(ie,_e,je){var ve=ie("../internals/engine-user-agent");_e.exports=/web0s(?!.*chrome)/i.test(ve)},{"../internals/engine-user-agent":145}],145:[function(ie,_e,je){var ve=ie("../internals/get-built-in");_e.exports=ve("navigator","userAgent")||""},{"../internals/get-built-in":158}],146:[function(ie,_e,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]))),_e.exports=xe},{"../internals/engine-user-agent":145,"../internals/global":163}],147:[function(ie,_e,je){var ve=ie("../internals/engine-user-agent"),ce=ve.match(/AppleWebKit\/(\d+)\./);_e.exports=!!ce&&+ce[1]},{"../internals/engine-user-agent":145}],148:[function(ie,_e,je){_e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],149:[function(ie,_e,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");_e.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,_e,je){_e.exports=function(ve){try{return!!ve()}catch(ce){return!0}}},{}],151:[function(ie,_e,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;_e.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,Ne,Oe){var Fe=ve(Pe),Re=Ie.exec;return Re===be||Re===xe.exec?le&&!Oe?{done:!0,value:pe(Ie,ke,Ne)}:{done:!0,value:Fe(ke,Ie,Ne)}:{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,_e,je){var ve=ie("../internals/function-bind-native"),ce=Function.prototype,be=ce.apply,Ce=ce.call;_e.exports=typeof Reflect=="object"&&Reflect.apply||(ve?Ce.bind(be):function(){return Ce.apply(be,arguments)})},{"../internals/function-bind-native":154}],153:[function(ie,_e,je){var ve=ie("../internals/function-uncurry-this"),ce=ie("../internals/a-callable"),be=ie("../internals/function-bind-native"),Ce=ve(ve.bind);_e.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,_e,je){var ve=ie("../internals/fails");_e.exports=!ve(function(){var ce=function(){}.bind();return typeof ce!="function"||ce.hasOwnProperty("prototype")})},{"../internals/fails":150}],155:[function(ie,_e,je){var ve=ie("../internals/function-bind-native"),ce=Function.prototype.call;_e.exports=ve?ce.bind(ce):function(){return ce.apply(ce,arguments)}},{"../internals/function-bind-native":154}],156:[function(ie,_e,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);_e.exports={EXISTS:ye,PROPER:we,CONFIGURABLE:me}},{"../internals/descriptors":134,"../internals/has-own-property":164}],157:[function(ie,_e,je){var ve=ie("../internals/function-bind-native"),ce=Function.prototype,be=ce.bind,Ce=ce.call,ye=ve&&be.bind(Ce,Ce);_e.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,_e,je){var ve=ie("../internals/global"),ce=ie("../internals/is-callable"),be=function(Ce){return ce(Ce)?Ce:void 0};_e.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,_e,je){var ve=ie("../internals/classof"),ce=ie("../internals/get-method"),be=ie("../internals/iterators"),Ce=ie("../internals/well-known-symbol"),ye=Ce("iterator");_e.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,_e,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;_e.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,_e,je){var ve=ie("../internals/a-callable");_e.exports=function(ce,be){var Ce=ce[be];return Ce==null?void 0:ve(Ce)}},{"../internals/a-callable":95}],162:[function(ie,_e,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;_e.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 Ne=+Ie;if(Ne===0)return Pe;if(Ne>pe){var Oe=be(Ne/10);return Oe===0?Pe:Oe<=pe?ae[Oe-1]===void 0?Ce(Ie,1):ae[Oe-1]+Ce(Ie,1):Pe}ke=ae[Ne-1]}return ke===void 0?"":ke})}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],163:[function(ie,_e,je){(function(ve){(function(){var ce=function(be){return be&&be.Math==Math&&be};_e.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 an!="undefined"?an:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],164:[function(ie,_e,je){var ve=ie("../internals/function-uncurry-this"),ce=ie("../internals/to-object"),be=ve({}.hasOwnProperty);_e.exports=Object.hasOwn||function(ye,we){return be(ce(ye),we)}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],165:[function(ie,_e,je){_e.exports={}},{}],166:[function(ie,_e,je){var ve=ie("../internals/global");_e.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,_e,je){var ve=ie("../internals/get-built-in");_e.exports=ve("document","documentElement")},{"../internals/get-built-in":158}],168:[function(ie,_e,je){var ve=ie("../internals/descriptors"),ce=ie("../internals/fails"),be=ie("../internals/document-create-element");_e.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,_e,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,Ne,Oe;for(z=be(z),z!=z||z===1/0?(Ne=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?(Ne=0,ke=ue):ke+pe>=1?(Ne=(z*Oe-1)*Ce(2,ee),ke=ke+pe):(Ne=z*Ce(2,pe-1)*Ce(2,ee),ke=0));ee>=8;)re[Ie++]=Ne&255,Ne/=256,ee-=8;for(ke=ke<<ee|Ne,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)};_e.exports={pack:xe,unpack:fe}},{"../internals/global":163}],170:[function(ie,_e,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);_e.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,_e,je){var ve=ie("../internals/is-callable"),ce=ie("../internals/is-object"),be=ie("../internals/object-set-prototype-of");_e.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,_e,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)}),_e.exports=be.inspectSource},{"../internals/function-uncurry-this":157,"../internals/is-callable":176,"../internals/shared-store":236}],173:[function(ie,_e,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(Re){var Ye;if(!Ce(Re)||(Ye=le(Re)).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),Ne=be(Pe.set);re=function(Fe,Re){if(ke(Pe,Fe))throw new ee(z);return Re.facade=Fe,Ne(Pe,Fe,Re),Re},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,Re){if(we(Fe,Oe))throw new ee(z);return Re.facade=Fe,ye(Fe,Oe,Re),Re},le=function(Fe){return we(Fe,Oe)?Fe[Oe]:{}},ue=function(Fe){return we(Fe,Oe)}}_e.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,_e,je){var ve=ie("../internals/well-known-symbol"),ce=ie("../internals/iterators"),be=ve("iterator"),Ce=Array.prototype;_e.exports=function(ye){return ye!==void 0&&(ce.Array===ye||Ce[be]===ye)}},{"../internals/iterators":187,"../internals/well-known-symbol":268}],175:[function(ie,_e,je){var ve=ie("../internals/classof-raw");_e.exports=Array.isArray||function(be){return ve(be)=="Array"}},{"../internals/classof-raw":123}],176:[function(ie,_e,je){_e.exports=function(ve){return typeof ve=="function"}},{}],177:[function(ie,_e,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,_e.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,_e,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";_e.exports=Ce},{"../internals/fails":150,"../internals/is-callable":176}],179:[function(ie,_e,je){var ve=ie("../internals/is-object"),ce=Math.floor;_e.exports=Number.isInteger||function(Ce){return!ve(Ce)&&isFinite(Ce)&&ce(Ce)===Ce}},{"../internals/is-object":180}],180:[function(ie,_e,je){var ve=ie("../internals/is-callable");_e.exports=function(ce){return typeof ce=="object"?ce!==null:ve(ce)}},{"../internals/is-callable":176}],181:[function(ie,_e,je){_e.exports=!1},{}],182:[function(ie,_e,je){var ve=ie("../internals/is-object"),ce=ie("../internals/classof-raw"),be=ie("../internals/well-known-symbol"),Ce=be("match");_e.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,_e,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;_e.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,_e,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;_e.exports=function(ue,pe,Ee){var Pe=Ee&&Ee.that,Ie=!!(Ee&&Ee.AS_ENTRIES),ke=!!(Ee&&Ee.IS_ITERATOR),Ne=!!(Ee&&Ee.INTERRUPTED),Oe=ce(pe,Pe),Fe,Re,Ye,ze,Ze,at,ht,pt=function(et){return Fe&&ee(Fe,"normal",et),new re(!0,et)},Mt=function(et){return Ie?(Ce(et),Ne?Oe(et[0],et[1],pt):Oe(et[0],et[1])):Ne?Oe(et,pt):Oe(et)};if(ke)Fe=ue;else{if(Re=z(ue),!Re)throw ae(ye(ue)+" is not iterable");if(we(Re)){for(Ye=0,ze=me(ue);ze>Ye;Ye++)if(Ze=Mt(ue[Ye]),Ze&&xe(le,Ze))return Ze;return new re(!1)}Fe=fe(ue,Re)}for(at=Fe.next;!(ht=be(at,Fe)).done;){try{Ze=Mt(ht.value)}catch(et){ee(Fe,"throw",et)}if(typeof Ze=="object"&&Ze&&xe(le,Ze))return Ze}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,_e,je){var ve=ie("../internals/function-call"),ce=ie("../internals/an-object"),be=ie("../internals/get-method");_e.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,_e,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}),_e.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,_e,je){arguments[4][165][0].apply(je,arguments)},{dup:165}],188:[function(ie,_e,je){var ve=ie("../internals/to-length");_e.exports=function(ce){return ve(ce.length)}},{"../internals/to-length":249}],189:[function(ie,_e,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,Ne,Oe;le||(ue=function(){var Fe,Re;for(xe&&(Fe=ee.domain)&&Fe.exit();pe;){Re=pe.fn,pe=pe.next;try{Re()}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?(Ne=ae.resolve(void 0),Ne.constructor=ae,Oe=ce(Ne.then,Ne),Pe=function(){Oe(ue)}):xe?Pe=function(){ee.nextTick(ue)}:(Ce=ce(Ce,ve),Pe=function(){Ce(ue)})),_e.exports=le||function(Fe){var Re={fn:Fe,next:void 0};Ee&&(Ee.next=Re),pe||(pe=Re,Pe()),Ee=Re}},{"../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,_e,je){var ve=ie("../internals/native-symbol");_e.exports=ve&&!!Symbol.for&&!!Symbol.keyFor},{"../internals/native-symbol":191}],191:[function(ie,_e,je){var ve=ie("../internals/engine-v8-version"),ce=ie("../internals/fails");_e.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,_e,je){var ve=ie("../internals/global"),ce=ie("../internals/is-callable"),be=ie("../internals/inspect-source"),Ce=ve.WeakMap;_e.exports=ce(Ce)&&/native code/.test(be(Ce))},{"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176}],193:[function(ie,_e,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)};_e.exports.f=function(be){return new ce(be)}},{"../internals/a-callable":95}],194:[function(ie,_e,je){var ve=ie("../internals/global"),ce=ie("../internals/is-regexp"),be=ve.TypeError;_e.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,_e,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);_e.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 Ne=fe(arguments[Pe++]),Oe=Ie?ae(ye(Ne),Ie(Ne)):ye(Ne),Fe=Oe.length,Re=0,Ye;Fe>Re;)Ye=Oe[Re++],(!ve||be(ke,Ne,Ye))&&(pe[Ye]=Ne[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,_e,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+":",Ne;return Ie.style.display="none",ye.appendChild(Ie),Ie.src=String(ke),Ne=Ie.contentWindow.document,Ne.open(),Ne.write(le("document.F=Object")),Ne.close(),Ne.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,_e.exports=Object.create||function(ke,Ne){var Oe;return ke!==null?(re[z]=ve(ke),Oe=new re,re[z]=null,Oe[ae]=ke):Oe=Pe(),Ne===void 0?Oe:ce.f(Oe,Ne)}},{"../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,_e,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,_e,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,_e,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,_e,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)}};_e.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,_e,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,_e,je){je.f=Object.getOwnPropertySymbols},{}],203:[function(ie,_e,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;_e.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,_e,je){var ve=ie("../internals/function-uncurry-this");_e.exports=ve({}.isPrototypeOf)},{"../internals/function-uncurry-this":157}],205:[function(ie,_e,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);_e.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,_e,je){var ve=ie("../internals/object-keys-internal"),ce=ie("../internals/enum-bug-keys");_e.exports=Object.keys||function(Ce){return ve(Ce,ce)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],207:[function(ie,_e,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,_e,je){var ve=ie("../internals/function-uncurry-this"),ce=ie("../internals/an-object"),be=ie("../internals/a-possible-prototype");_e.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,_e,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}};_e.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,_e,je){"use strict";var ve=ie("../internals/to-string-tag-support"),ce=ie("../internals/classof");_e.exports=ve?{}.toString:function(){return"[object "+ce(this)+"]"}},{"../internals/classof":124,"../internals/to-string-tag-support":255}],211:[function(ie,_e,je){var ve=ie("../internals/global"),ce=ie("../internals/function-call"),be=ie("../internals/is-callable"),Ce=ie("../internals/is-object"),ye=ve.TypeError;_e.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,_e,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);_e.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,_e,je){var ve=ie("../internals/global");_e.exports=ve},{"../internals/global":163}],214:[function(ie,_e,je){_e.exports=function(ve){try{return{error:!1,value:ve()}}catch(ce){return{error:!0,value:ce}}}},{}],215:[function(ie,_e,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});_e.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,_e,je){var ve=ie("../internals/global");_e.exports=ve.Promise},{"../internals/global":163}],217:[function(ie,_e,je){var ve=ie("../internals/an-object"),ce=ie("../internals/is-object"),be=ie("../internals/new-promise-capability");_e.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,_e,je){var ve=ie("../internals/promise-native-constructor"),ce=ie("../internals/check-correctness-of-iteration"),be=ie("../internals/promise-constructor-detection").CONSTRUCTOR;_e.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,_e,je){var ve=ie("../internals/object-define-property").f;_e.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,_e,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}},_e.exports=ve},{}],221:[function(ie,_e,je){var ve=ie("../internals/redefine");_e.exports=function(ce,be,Ce){for(var ye in be)ve(ce,ye,be[ye],Ce);return ce}},{"../internals/redefine":222}],222:[function(ie,_e,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");(_e.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,_e,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;_e.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,_e,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,Ne=Pe||ke||Ie||fe||z;Ne&&(re=function(Fe){var Re=this,Ye=xe(Re),ze=be(Fe),Ze=Ye.raw,at,ht,pt,Mt,et,ot,wt;if(Ze)return Ze.lastIndex=Re.lastIndex,at=ve(re,Ze,ze),Re.lastIndex=Ze.lastIndex,at;var Et=Ye.groups,Tt=Ie&&Re.sticky,vt=ve(Ce,Re),gt=Re.source,yt=0,It=ze;if(Tt&&(vt=pe(vt,"y",""),ue(vt,"g")===-1&&(vt+="g"),It=Ee(ze,Re.lastIndex),Re.lastIndex>0&&(!Re.multiline||Re.multiline&&le(ze,Re.lastIndex-1)!==`
|
|
|
`)&&(gt="(?: "+gt+")",It=" "+It,yt++),ht=new RegExp("^(?:"+gt+")",vt)),ke&&(ht=new RegExp("^"+gt+"$(?!\\s)",vt)),Pe&&(pt=Re.lastIndex),Mt=ve(ae,Tt?ht:Re,It),Tt?Mt?(Mt.input=Ee(Mt.input,yt),Mt[0]=Ee(Mt[0],yt),Mt.index=Re.lastIndex,Re.lastIndex+=Mt[0].length):Re.lastIndex=0:Pe&&Mt&&(Re.lastIndex=Re.global?Mt.index+Mt[0].length:pt),ke&&Mt&&Mt.length>1&&ve(ee,Mt[0],ht,function(){for(et=1;et<arguments.length-2;et++)arguments[et]===void 0&&(Mt[et]=void 0)}),Mt&&Et)for(Mt.groups=ot=me(null),et=0;et<Et.length;et++)wt=Et[et],ot[wt[0]]=Mt[wt[1]];return Mt}),_e.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,_e,je){"use strict";var ve=ie("../internals/an-object");_e.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,_e,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;_e.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,_e,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});_e.exports={BROKEN_CARET:we,MISSED_STICKY:ye,UNSUPPORTED_Y:Ce}},{"../internals/fails":150,"../internals/global":163}],228:[function(ie,_e,je){var ve=ie("../internals/fails"),ce=ie("../internals/global"),be=ce.RegExp;_e.exports=ve(function(){var Ce=be(".","s");return!(Ce.dotAll&&Ce.exec(`
|
|
|
`)&&Ce.flags==="s")})},{"../internals/fails":150,"../internals/global":163}],229:[function(ie,_e,je){var ve=ie("../internals/fails"),ce=ie("../internals/global"),be=ce.RegExp;_e.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,_e,je){var ve=ie("../internals/global"),ce=ve.TypeError;_e.exports=function(be){if(be==null)throw ce("Can't call method on "+be);return be}},{"../internals/global":163}],231:[function(ie,_e,je){_e.exports=Object.is||function(ce,be){return ce===be?ce!==0||1/ce===1/be:ce!=ce&&be!=be}},{}],232:[function(ie,_e,je){var ve=ie("../internals/global"),ce=Object.defineProperty;_e.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,_e,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");_e.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,_e,je){var ve=ie("../internals/object-define-property").f,ce=ie("../internals/has-own-property"),be=ie("../internals/well-known-symbol"),Ce=be("toStringTag");_e.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,_e,je){var ve=ie("../internals/shared"),ce=ie("../internals/uid"),be=ve("keys");_e.exports=function(Ce){return be[Ce]||(be[Ce]=ce(Ce))}},{"../internals/shared":237,"../internals/uid":263}],236:[function(ie,_e,je){var ve=ie("../internals/global"),ce=ie("../internals/set-global"),be="__core-js_shared__",Ce=ve[be]||ce(be,{});_e.exports=Ce},{"../internals/global":163,"../internals/set-global":232}],237:[function(ie,_e,je){var ve=ie("../internals/is-pure"),ce=ie("../internals/shared-store");(_e.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,_e,je){var ve=ie("../internals/an-object"),ce=ie("../internals/a-constructor"),be=ie("../internals/well-known-symbol"),Ce=be("species");_e.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,_e,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)}};_e.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,_e,je){var ve=ie("../internals/function-name").PROPER,ce=ie("../internals/fails"),be=ie("../internals/whitespaces"),Ce="\u200B\x85\u180E";_e.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,_e,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}};_e.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,_e,je){var ve=ie("../internals/function-call"),ce=ie("../internals/get-built-in"),be=ie("../internals/well-known-symbol"),Ce=ie("../internals/redefine");_e.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,_e,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,Ne={},Oe="onreadystatechange",Fe,Re,Ye,ze;try{Fe=ve.location}catch(Mt){}var Ze=function(Mt){if(ye(Ne,Mt)){var et=Ne[Mt];delete Ne[Mt],et()}},at=function(Mt){return function(){Ze(Mt)}},ht=function(Mt){Ze(Mt.data)},pt=function(Mt){ve.postMessage(Ie(Mt),Fe.protocol+"//"+Fe.host)};(!re||!le)&&(re=function(et){z(arguments.length,1);var ot=Ce(et)?et:Ee(et),wt=xe(arguments,1);return Ne[++ke]=function(){ce(ot,void 0,wt)},Re(ke),ke},le=function(et){delete Ne[et]},ae?Re=function(Mt){ue.nextTick(at(Mt))}:pe&&pe.now?Re=function(Mt){pe.now(at(Mt))}:Pe&&!ee?(Ye=new Pe,ze=Ye.port2,Ye.port1.onmessage=ht,Re=be(ze.postMessage,ze)):ve.addEventListener&&Ce(ve.postMessage)&&!ve.importScripts&&Fe&&Fe.protocol!=="file:"&&!we(pt)?(Re=pt,ve.addEventListener("message",ht,!1)):Oe in fe("script")?Re=function(Mt){me.appendChild(fe("script"))[Oe]=function(){me.removeChild(this),Ze(Mt)}}:Re=function(Mt){setTimeout(at(Mt),0)}),_e.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,_e,je){var ve=ie("../internals/function-uncurry-this");_e.exports=ve(1 .valueOf)},{"../internals/function-uncurry-this":157}],245:[function(ie,_e,je){var ve=ie("../internals/to-integer-or-infinity"),ce=Math.max,be=Math.min;_e.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,_e,je){var ve=ie("../internals/global"),ce=ie("../internals/to-integer-or-infinity"),be=ie("../internals/to-length"),Ce=ve.RangeError;_e.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,_e,je){var ve=ie("../internals/indexed-object"),ce=ie("../internals/require-object-coercible");_e.exports=function(be){return ve(ce(be))}},{"../internals/indexed-object":170,"../internals/require-object-coercible":230}],248:[function(ie,_e,je){var ve=Math.ceil,ce=Math.floor;_e.exports=function(be){var Ce=+be;return Ce!==Ce||Ce===0?0:(Ce>0?ce:ve)(Ce)}},{}],249:[function(ie,_e,je){var ve=ie("../internals/to-integer-or-infinity"),ce=Math.min;_e.exports=function(be){return be>0?ce(ve(be),9007199254740991):0}},{"../internals/to-integer-or-infinity":248}],250:[function(ie,_e,je){var ve=ie("../internals/global"),ce=ie("../internals/require-object-coercible"),be=ve.Object;_e.exports=function(Ce){return be(ce(Ce))}},{"../internals/global":163,"../internals/require-object-coercible":230}],251:[function(ie,_e,je){var ve=ie("../internals/global"),ce=ie("../internals/to-positive-integer"),be=ve.RangeError;_e.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,_e,je){var ve=ie("../internals/global"),ce=ie("../internals/to-integer-or-infinity"),be=ve.RangeError;_e.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,_e,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");_e.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,_e,je){var ve=ie("../internals/to-primitive"),ce=ie("../internals/is-symbol");_e.exports=function(be){var Ce=ve(be,"string");return ce(Ce)?Ce:Ce+""}},{"../internals/is-symbol":183,"../internals/to-primitive":253}],255:[function(ie,_e,je){var ve=ie("../internals/well-known-symbol"),ce=ve("toStringTag"),be={};be[ce]="z",_e.exports=String(be)==="[object z]"},{"../internals/well-known-symbol":268}],256:[function(ie,_e,je){var ve=ie("../internals/global"),ce=ie("../internals/classof"),be=ve.String;_e.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,_e,je){var ve=ie("../internals/global"),ce=ve.String;_e.exports=function(be){try{return ce(be)}catch(Ce){return"Object"}}},{"../internals/global":163}],258:[function(ie,_e,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"),Ne=ie("../internals/object-is-prototype-of"),Oe=ie("../internals/object-set-prototype-of"),Fe=ie("../internals/object-get-own-property-names").f,Re=ie("../internals/typed-array-from"),Ye=ie("../internals/array-iteration").forEach,ze=ie("../internals/set-species"),Ze=ie("../internals/object-define-property"),at=ie("../internals/object-get-own-property-descriptor"),ht=ie("../internals/internal-state"),pt=ie("../internals/inherit-if-required"),Mt=ht.get,et=ht.set,ot=Ze.f,wt=at.f,Et=Math.round,Tt=ce.RangeError,vt=me.ArrayBuffer,gt=vt.prototype,yt=me.DataView,It=we.NATIVE_ARRAY_BUFFER_VIEWS,Ot=we.TYPED_ARRAY_CONSTRUCTOR,Vt=we.TYPED_ARRAY_TAG,Ct=we.TypedArray,mt=we.TypedArrayPrototype,nt=we.aTypedArrayConstructor,ft=we.isTypedArray,Xe="BYTES_PER_ELEMENT",ut="Wrong length",bt=function(qe,He){nt(qe);for(var De=0,Le=He.length,Ke=new qe(Le);Le>De;)Ke[De]=He[De++];return Ke},St=function(qe,He){ot(qe,He,{get:function(){return Mt(this)[He]}})},lt=function(qe){var He;return Ne(gt,qe)||(He=Ee(qe))=="ArrayBuffer"||He=="SharedArrayBuffer"},Qe=function(qe,He){return ft(qe)&&!Ie(He)&&He in qe&&ee(+He)&&He>=0},Ue=function(He,De){return De=ue(De),Qe(He,De)?fe(2,He[De]):wt(He,De)},We=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):ot(He,De,Le)};Ce?(It||(at.f=Ue,Ze.f=We,St(mt,"buffer"),St(mt,"byteOffset"),St(mt,"byteLength"),St(mt,"length")),ve({target:"Object",stat:!0,forced:!It},{getOwnPropertyDescriptor:Ue,defineProperty:We}),_e.exports=function(qe,He,De){var Le=qe.match(/\d+$/)[0]/8,Ke=qe+(De?"Clamped":"")+"Array",dt="get"+qe,Ve="set"+qe,kt=ce[Ke],zt=kt,Xt=zt&&zt.prototype,At={},Nt=function(gn,kn){var Kn=Mt(gn);return Kn.view[dt](kn*Le+Kn.byteOffset,!0)},qt=function(gn,kn,Kn){var Xn=Mt(gn);De&&(Kn=(Kn=Et(Kn))<0?0:Kn>255?255:Kn&255),Xn.view[Ve](kn*Le+Xn.byteOffset,Kn,!0)},on=function(gn,kn){ot(gn,kn,{get:function(){return Nt(this,kn)},set:function(Kn){return qt(this,kn,Kn)},enumerable:!0})};It?ye&&(zt=He(function(gn,kn,Kn,Xn){return xe(gn,Xt),pt(function(){return Pe(kn)?lt(kn)?Xn!==void 0?new kt(kn,le(Kn,Le),Xn):Kn!==void 0?new kt(kn,le(Kn,Le)):new kt(kn):ft(kn)?bt(zt,kn):be(Re,zt,kn):new kt(re(kn))}(),gn,zt)}),Oe&&Oe(zt,Ct),Ye(Fe(kt),function(gn){gn in zt||z(zt,gn,kt[gn])}),zt.prototype=Xt):(zt=He(function(gn,kn,Kn,Xn){xe(gn,Xt);var hr=0,dr=0,fr,xr,Hr;if(!Pe(kn))Hr=re(kn),xr=Hr*Le,fr=new vt(xr);else if(lt(kn)){fr=kn,dr=le(Kn,Le);var Yr=kn.byteLength;if(Xn===void 0){if(Yr%Le||(xr=Yr-dr,xr<0))throw Tt(ut)}else if(xr=ae(Xn)*Le,xr+dr>Yr)throw Tt(ut);Hr=xr/Le}else return ft(kn)?bt(zt,kn):be(Re,zt,kn);for(et(gn,{buffer:fr,byteOffset:dr,byteLength:xr,length:Hr,view:new yt(fr)});hr<Hr;)on(gn,hr++)}),Oe&&Oe(zt,Ct),Xt=zt.prototype=ke(mt)),Xt.constructor!==zt&&z(Xt,"constructor",zt),z(Xt,Ot,zt),Vt&&z(Xt,Vt,Ke),At[Ke]=zt,ve({global:!0,forced:zt!=kt,sham:!It},At),Xe in zt||z(zt,Xe,Le),Xe in Xt||z(Xt,Xe,Le),ze(Ke)}):_e.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,_e,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;_e.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,_e,je){var ve=ie("../internals/array-from-constructor-and-list"),ce=ie("../internals/typed-array-species-constructor");_e.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,_e,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;_e.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,Ne,Oe,Fe;if(Ee&&!xe(Ee))for(Oe=we(re,Ee),Fe=Oe.next,re=[];!(Ne=ce(Fe,Oe)).done;)re.push(Ne.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,_e,je){var ve=ie("../internals/array-buffer-view-core"),ce=ie("../internals/species-constructor"),be=ve.TYPED_ARRAY_CONSTRUCTOR,Ce=ve.aTypedArrayConstructor;_e.exports=function(ye){return Ce(ce(ye,ye[be]))}},{"../internals/array-buffer-view-core":103,"../internals/species-constructor":238}],263:[function(ie,_e,je){var ve=ie("../internals/function-uncurry-this"),ce=0,be=Math.random(),Ce=ve(1 .toString);_e.exports=function(ye){return"Symbol("+(ye===void 0?"":ye)+")_"+Ce(++ce+be,36)}},{"../internals/function-uncurry-this":157}],264:[function(ie,_e,je){var ve=ie("../internals/native-symbol");_e.exports=ve&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},{"../internals/native-symbol":191}],265:[function(ie,_e,je){var ve=ie("../internals/descriptors"),ce=ie("../internals/fails");_e.exports=ve&&ce(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},{"../internals/descriptors":134,"../internals/fails":150}],266:[function(ie,_e,je){var ve=ie("../internals/global"),ce=ve.TypeError;_e.exports=function(be,Ce){if(be<Ce)throw ce("Not enough arguments");return be}},{"../internals/global":163}],267:[function(ie,_e,je){var ve=ie("../internals/well-known-symbol");je.f=ve},{"../internals/well-known-symbol":268}],268:[function(ie,_e,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;_e.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,_e,je){_e.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,_e,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,_e,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),Ne=we(Pe===void 0?Ie:Pe,Ie),Oe=new(xe(this,fe))(me(Ne-ke)),Fe=new z(this),Re=new z(Oe),Ye=0;ke<Ne;)le(Re,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,_e,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 Ne=[];return Ne[re]=!1,Ne.concat()[0]!==Ne}),Pe=z("concat"),Ie=function(Ne){if(!ye(Ne))return!1;var Oe=Ne[re];return Oe!==void 0?!!Oe:Ce(Ne)},ke=!Ee||!Pe;ve({target:"Array",proto:!0,forced:ke},{concat:function(Oe){var Fe=we(this),Re=fe(Fe,0),Ye=0,ze,Ze,at,ht,pt;for(ze=-1,at=arguments.length;ze<at;ze++)if(pt=ze===-1?Fe:arguments[ze],Ie(pt)){if(ht=me(pt),Ye+ht>le)throw pe(ue);for(Ze=0;Ze<ht;Ze++,Ye++)Ze in pt&&xe(Re,Ye,pt[Ze])}else{if(Ye>=le)throw pe(ue);xe(Re,Ye++,pt)}return Re.length=Ye,Re}})},{"../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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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);_e.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,_e,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,_e,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,_e,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),Ne=me(ke),Oe=we(Pe,Ne),Fe=we(Ie===void 0?Ne:Ie,Ne),Re,Ye,ze;if(be(ke)&&(Re=ke.constructor,Ce(Re)&&(Re===ue||be(Re.prototype))?Re=void 0:ye(Re)&&(Re=Re[le],Re===null&&(Re=void 0)),Re===ue||Re===void 0))return ae(ke,Oe,Fe);for(Ye=new(Re===void 0?ue:Re)(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,_e,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="",Re,Ye,ze,Ze;for(Re=65;Re<76;Re++){switch(Ye=String.fromCharCode(Re),Re){case 66:case 69:case 70:case 72:ze=3;break;case 68:case 71:ze=4;break;default:ze=2}for(Ze=0;Ze<47;Ze++)le.push({k:Ye+Ze,v:ze})}for(le.sort(function(at,ht){return ht.v-at.v}),Ze=0;Ze<le.length;Ze++)Ye=le[Ze].k.charAt(0),Fe.charAt(Fe.length-1)!==Ye&&(Fe+=Ye);return Fe!=="DGBEFHACIJK"}}),Ne=Ee||!Pe||!Ie||!ke,Oe=function(Fe){return function(Re,Ye){return Ye===void 0?-1:Re===void 0?1:Fe!==void 0?+Fe(Re,Ye)||0:we(Re)>we(Ye)?1:-1}};ve({target:"Array",proto:!0,forced:Ne},{sort:function(Re){Re!==void 0&&be(Re);var Ye=Ce(this);if(ke)return Re===void 0?ue(Ye):ue(Ye,Re);var ze=[],Ze=ye(Ye),at,ht;for(ht=0;ht<Ze;ht++)ht in Ye&&pe(ze,Ye[ht]);for(xe(ze,Oe(Re)),at=ze.length,ht=0;ht<at;)Ye[ht]=ze[ht++];for(;ht<Ze;)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,_e,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),Ne=be(Ee,ke),Oe=arguments.length,Fe,Re,Ye,ze,Ze,at;if(Oe===0?Fe=Re=0:Oe===1?(Fe=0,Re=ke-Ne):(Fe=Oe-2,Re=re(ae(Ce(Pe),0),ke-Ne)),ke+Fe-Re>le)throw ee(ue);for(Ye=me(Ie,Re),ze=0;ze<Re;ze++)Ze=Ne+ze,Ze in Ie&&xe(Ye,ze,Ie[Ze]);if(Ye.length=Re,Fe<Re){for(ze=Ne;ze<ke-Re;ze++)Ze=ze+Re,at=ze+Fe,Ze in Ie?Ie[at]=Ie[Ze]:delete Ie[at];for(ze=ke;ze>ke-Re+Fe;ze--)delete Ie[ze-1]}else if(Fe>Re)for(ze=ke-Re;ze>Ne;ze--)Ze=ze+Re-1,at=ze+Fe-1,Ze in Ie?Ie[at]=Ie[Ze]:delete Ie[at];for(ze=0;ze<Fe;ze++)Ie[ze+Ne]=arguments[ze+2];return Ie.length=ke-Re+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,_e,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,_e,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]$/,Ne=/^[\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"'}),Re=function(ze,Ze){var at=ee(arguments),ht=Ze;if(!(!fe(Ze)&&ze===void 0||z(ze)))return me(Ze)||(Ze=function(pt,Mt){if(xe(ht)&&(Mt=Ce(ht,this,pt,Mt)),!z(Mt))return Mt}),at[1]=Ze,be(re,null,at)},Ye=function(ze,Ze,at){var ht=ue(at,Ze-1),pt=ue(at,Ze+1);return le(ke,ze)&&!le(Ne,pt)||le(Ne,ze)&&!le(ke,ht)?"\\u"+Pe(pe(ze,0),16):ze};re&&ve({target:"JSON",stat:!0,forced:Oe||Fe},{stringify:function(Ze,at,ht){var pt=ee(arguments),Mt=be(Oe?Re:re,null,pt);return Fe&&typeof Mt=="string"?Ee(Mt,Ie,Ye):Mt}})},{"../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,_e,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,Ne=be("".slice),Oe=be("".charCodeAt),Fe=function(ht){var pt=z(ht,"number");return typeof pt=="bigint"?pt:Re(pt)},Re=function(ht){var pt=z(ht,"number"),Mt,et,ot,wt,Et,Tt,vt,gt;if(fe(pt))throw ke("Cannot convert a Symbol value to a number");if(typeof pt=="string"&&pt.length>2){if(pt=pe(pt),Mt=Oe(pt,0),Mt===43||Mt===45){if(et=Oe(pt,2),et===88||et===120)return NaN}else if(Mt===48){switch(Oe(pt,1)){case 66:case 98:ot=2,wt=49;break;case 79:case 111:ot=8,wt=55;break;default:return+pt}for(Et=Ne(pt,2),Tt=Et.length,vt=0;vt<Tt;vt++)if(gt=Oe(Et,vt),gt<48||gt>wt)return NaN;return parseInt(Et,ot)}}return+pt};if(Ce(Ee,!Pe(" 0o1")||!Pe("0b1")||Pe("+0x1"))){for(var Ye=function(pt){var Mt=arguments.length<1?0:Pe(Fe(pt)),et=this;return xe(Ie,et)&&ee(function(){ue(et)})?me(Object(Mt),et,Ye):Mt},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(","),Ze=0,at;ze.length>Ze;Ze++)we(Pe,at=ze[Ze])&&!we(Ye,at)&&le(Ye,at,re(Pe,at));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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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++,Ne=!1;Pe++,ce(ue,z,Ie).then(function(Oe){Ne||(Ne=!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,_e,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,_e,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"),Ne=ie("../internals/internal-state"),Oe=ie("../internals/promise-native-constructor"),Fe=ie("../internals/promise-constructor-detection"),Re=ie("../internals/new-promise-capability"),Ye="Promise",ze=Fe.CONSTRUCTOR,Ze=Fe.REJECTION_EVENT,at=Fe.SUBCLASSING,ht=Ne.getterFor(Ye),pt=Ne.set,Mt=Oe&&Oe.prototype,et=Oe,ot=Mt,wt=Ce.TypeError,Et=Ce.document,Tt=Ce.process,vt=Re.f,gt=vt,yt=!!(Et&&Et.createEvent&&Ce.dispatchEvent),It="unhandledrejection",Ot="rejectionhandled",Vt=0,Ct=1,mt=2,nt=1,ft=2,Xe,ut,bt,St,lt=function(Ve){var kt;return re(Ve)&&ae(kt=Ve.then)?kt:!1},Qe=function(Ve,kt){var zt=kt.value,Xt=kt.state==Ct,At=Xt?Ve.ok:Ve.fail,Nt=Ve.resolve,qt=Ve.reject,on=Ve.domain,gn,kn,Kn;try{At?(Xt||(kt.rejection===ft&&De(kt),kt.rejection=nt),At===!0?gn=zt:(on&&on.enter(),gn=At(zt),on&&(on.exit(),Kn=!0)),gn===Ve.promise?qt(wt("Promise-chain cycle")):(kn=lt(gn))?ye(kn,gn,Nt,qt):Nt(gn)):qt(zt)}catch(Xn){on&&!Kn&&on.exit(),qt(Xn)}},Ue=function(Ve,kt){Ve.notified||(Ve.notified=!0,Ee(function(){for(var zt=Ve.reactions,Xt;Xt=zt.get();)Qe(Xt,Ve);Ve.notified=!1,kt&&!Ve.rejection&&qe(Ve)}))},We=function(Ve,kt,zt){var Xt,At;yt?(Xt=Et.createEvent("Event"),Xt.promise=kt,Xt.reason=zt,Xt.initEvent(Ve,!1,!0),Ce.dispatchEvent(Xt)):Xt={promise:kt,reason:zt},!Ze&&(At=Ce["on"+Ve])?At(Xt):Ve===It&&Pe("Unhandled promise rejection",zt)},qe=function(Ve){ye(pe,Ce,function(){var kt=Ve.facade,zt=Ve.value,Xt=He(Ve),At;if(Xt&&(At=Ie(function(){be?Tt.emit("unhandledRejection",zt,kt):We(It,kt,zt)}),Ve.rejection=be||He(Ve)?ft:nt,At.error))throw At.value})},He=function(Ve){return Ve.rejection!==nt&&!Ve.parent},De=function(Ve){ye(pe,Ce,function(){var kt=Ve.facade;be?Tt.emit("rejectionHandled",kt):We(Ot,kt,Ve.value)})},Le=function(Ve,kt,zt){return function(Xt){Ve(kt,Xt,zt)}},Ke=function(Ve,kt,zt){Ve.done||(Ve.done=!0,zt&&(Ve=zt),Ve.value=kt,Ve.state=mt,Ue(Ve,!0))},dt=function(Ve,kt,zt){if(!Ve.done){Ve.done=!0,zt&&(Ve=zt);try{if(Ve.facade===kt)throw wt("Promise can't be resolved itself");var Xt=lt(kt);Xt?Ee(function(){var At={done:!1};try{ye(Xt,kt,Le(dt,At,Ve),Le(Ke,At,Ve))}catch(Nt){Ke(At,Nt,Ve)}}):(Ve.value=kt,Ve.state=Ct,Ue(Ve,!1))}catch(At){Ke({done:!1},At,Ve)}}};if(ze&&(et=function(kt){le(this,ot),ee(kt),ye(Xe,this);var zt=ht(this);try{kt(Le(dt,zt),Le(Ke,zt))}catch(Xt){Ke(zt,Xt)}},ot=et.prototype,Xe=function(kt){pt(this,{type:Ye,done:!1,notified:!1,parent:!1,reactions:new ke,rejection:!1,state:Vt,value:void 0})},Xe.prototype=me(ot,{then:function(kt,zt){var Xt=ht(this),At=vt(ue(this,et));return Xt.parent=!0,At.ok=ae(kt)?kt:!0,At.fail=ae(zt)&&zt,At.domain=be?Tt.domain:void 0,Xt.state==Vt?Xt.reactions.add(At):Ee(function(){Qe(At,Xt)}),At.promise}}),ut=function(){var Ve=new Xe,kt=ht(Ve);this.promise=Ve,this.resolve=Le(dt,kt),this.reject=Le(Ke,kt)},Re.f=vt=function(Ve){return Ve===et||Ve===bt?new ut(Ve):gt(Ve)},!ce&&ae(Oe)&&Mt!==Object.prototype)){St=Mt.then,at||we(Mt,"then",function(kt,zt){var Xt=this;return new et(function(At,Nt){ye(St,Xt,At,Nt)}).then(kt,zt)},{unsafe:!0});try{delete Mt.constructor}catch(Ve){}xe&&xe(Mt,ot)}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,_e,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,_e,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,_e,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,_e,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,_e,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"),Ne=ie("../internals/regexp-unsupported-ncg"),Oe=Ie("match"),Fe=ce.RegExp,Re=Fe.prototype,Ye=ce.SyntaxError,ze=be(Re.exec),Ze=be("".charAt),at=be("".replace),ht=be("".indexOf),pt=be("".slice),Mt=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,et=/a/g,ot=/a/g,wt=new Fe(et)!==et,Et=ae.MISSED_STICKY,Tt=ae.UNSUPPORTED_Y,vt=ve&&(!wt||Et||ke||Ne||ue(function(){return ot[Oe]=!1,Fe(et)!=et||Fe(ot)==ot||Fe(et,"i")!="/a/i"})),gt=function(Ct){for(var mt=Ct.length,nt=0,ft="",Xe=!1,ut;nt<=mt;nt++){if(ut=Ze(Ct,nt),ut==="\\"){ft+=ut+Ze(Ct,++nt);continue}!Xe&&ut==="."?ft+="[\\s\\S]":(ut==="["?Xe=!0:ut==="]"&&(Xe=!1),ft+=ut)}return ft},yt=function(Ct){for(var mt=Ct.length,nt=0,ft="",Xe=[],ut={},bt=!1,St=!1,lt=0,Qe="",Ue;nt<=mt;nt++){if(Ue=Ze(Ct,nt),Ue==="\\")Ue=Ue+Ze(Ct,++nt);else if(Ue==="]")bt=!1;else if(!bt)switch(!0){case Ue==="[":bt=!0;break;case Ue==="(":ze(Mt,pt(Ct,nt+1))&&(nt+=2,St=!0),ft+=Ue,lt++;continue;case(Ue===">"&&St):if(Qe===""||pe(ut,Qe))throw new Ye("Invalid capture group name");ut[Qe]=!0,Xe[Xe.length]=[Qe,lt],St=!1,Qe="";continue}St?Qe+=Ue:ft+=Ue}return[ft,Xe]};if(Ce("RegExp",vt)){for(var It=function(mt,nt){var ft=xe(Re,this),Xe=fe(mt),ut=nt===void 0,bt=[],St=mt,lt,Qe,Ue,We,qe,He;if(!ft&&Xe&&ut&&mt.constructor===It)return mt;if((Xe||xe(Re,mt))&&(mt=mt.source,ut&&(nt=ee(St))),mt=mt===void 0?"":z(mt),nt=nt===void 0?"":z(nt),St=mt,ke&&"dotAll"in et&&(Qe=!!nt&&ht(nt,"s")>-1,Qe&&(nt=at(nt,/s/g,""))),lt=nt,Et&&"sticky"in et&&(Ue=!!nt&&ht(nt,"y")>-1,Ue&&Tt&&(nt=at(nt,/y/g,""))),Ne&&(We=yt(mt),mt=We[0],bt=We[1]),qe=ye(Fe(mt,nt),ft?this:Re,It),(Qe||Ue||bt.length)&&(He=Ee(qe),Qe&&(He.dotAll=!0,He.raw=It(gt(mt),lt)),Ue&&(He.sticky=!0),bt.length&&(He.groups=bt)),mt!==St)try{we(qe,"source",St===""?"(?:)":St)}catch(De){}return qe},Ot=me(Fe),Vt=0;Ot.length>Vt;)re(It,Fe,Ot[Vt++]);Re.constructor=It,It.prototype=Re,le(ce,"RegExp",It)}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,_e,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,_e,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,_e,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,_e,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,_e,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 Ne=ye(ke[0]);Pe[Ie]=Ne,Ne===""&&(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,_e,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),Ne=be([].push),Oe=be("".indexOf),Fe=be("".slice),Re=function(at){return at===void 0?at:String(at)},Ye=function(){return"a".replace(/./,"$0")==="$0"}(),ze=function(){return/./[Ee]?/./[Ee]("a","$0")==="":!1}(),Ze=!ye(function(){var at=/./;return at.exec=function(){var ht=[];return ht.groups={a:"7"},ht},"".replace(at,"$<a>")!=="7"});Ce("replace",function(at,ht,pt){var Mt=ze?"$":"$0";return[function(ot,wt){var Et=ee(this),Tt=ot==null?void 0:re(ot,Ee);return Tt?ce(Tt,ot,Et,wt):ce(ht,z(Et),ot,wt)},function(et,ot){var wt=we(this),Et=z(et);if(typeof ot=="string"&&Oe(ot,Mt)===-1&&Oe(ot,"$<")===-1){var Tt=pt(ht,wt,Et,ot);if(Tt.done)return Tt.value}var vt=me(ot);vt||(ot=z(ot));var gt=wt.global;if(gt){var yt=wt.unicode;wt.lastIndex=0}for(var It=[];;){var Ot=ue(wt,Et);if(Ot===null||(Ne(It,Ot),!gt))break;var Vt=z(Ot[0]);Vt===""&&(wt.lastIndex=ae(Et,fe(wt.lastIndex),yt))}for(var Ct="",mt=0,nt=0;nt<It.length;nt++){Ot=It[nt];for(var ft=z(Ot[0]),Xe=Pe(Ie(xe(Ot.index),Et.length),0),ut=[],bt=1;bt<Ot.length;bt++)Ne(ut,Re(Ot[bt]));var St=Ot.groups;if(vt){var lt=ke([ft],ut,Xe,Et);St!==void 0&&Ne(lt,St);var Qe=z(ve(ot,void 0,lt))}else Qe=le(ft,Et,Xe,ut,St,ot);Xe>=mt&&(Ct+=Fe(Et,mt,Xe)+Qe,mt=Xe+ft.length)}return Ct+Fe(Et,mt)}]},!Ze||!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,_e,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,_e,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,Ne=[].push,Oe=be(/./.exec),Fe=be(Ne),Re=be("".slice),Ye=!Ee(function(){var ze=/(?:)/,Ze=ze.exec;ze.exec=function(){return Ze.apply(this,arguments)};var at="ab".split(ze);return at.length!==2||at[0]!=="a"||at[1]!=="b"});Ce("split",function(ze,Ze,at){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(pt,Mt){var et=ee(me(this)),ot=Mt===void 0?Ie:Mt>>>0;if(ot===0)return[];if(pt===void 0)return[et];if(!ye(pt))return ce(Ze,et,pt,ot);for(var wt=[],Et=(pt.ignoreCase?"i":"")+(pt.multiline?"m":"")+(pt.unicode?"u":"")+(pt.sticky?"y":""),Tt=0,vt=new RegExp(pt.source,Et+"g"),gt,yt,It;(gt=ce(ue,vt,et))&&(yt=vt.lastIndex,!(yt>Tt&&(Fe(wt,Re(et,Tt,gt.index)),gt.length>1&>.index<et.length&&ve(Ne,wt,re(gt,1)),It=gt[0].length,Tt=yt,wt.length>=ot)));)vt.lastIndex===gt.index&&vt.lastIndex++;return Tt===et.length?(It||!Oe(vt,""))&&Fe(wt,""):Fe(wt,Re(et,Tt)),wt.length>ot?re(wt,0,ot):wt}:"0".split(void 0,0).length?ht=function(pt,Mt){return pt===void 0&&Mt===0?[]:ce(Ze,this,pt,Mt)}:ht=Ze,[function(Mt,et){var ot=me(this),wt=Mt==null?void 0:ae(Mt,ze);return wt?ce(wt,Mt,ot,et):ce(ht,ee(ot),Mt,et)},function(pt,Mt){var et=we(this),ot=ee(pt),wt=at(ht,et,ot,Mt,ht!==Ze);if(wt.done)return wt.value;var Et=xe(et,RegExp),Tt=et.unicode,vt=(et.ignoreCase?"i":"")+(et.multiline?"m":"")+(et.unicode?"u":"")+(Pe?"g":"y"),gt=new Et(Pe?"^(?:"+et.source+")":et,vt),yt=Mt===void 0?Ie:Mt>>>0;if(yt===0)return[];if(ot.length===0)return le(gt,ot)===null?[ot]:[];for(var It=0,Ot=0,Vt=[];Ot<ot.length;){gt.lastIndex=Pe?0:Ot;var Ct=le(gt,Pe?Re(ot,Ot):ot),mt;if(Ct===null||(mt=ke(z(gt.lastIndex+(Pe?Ot:0)),ot.length))===It)Ot=fe(ot,Ot,Tt);else{if(Fe(Vt,Re(ot,It,Ot)),Vt.length===yt)return Vt;for(var nt=1;nt<=Ct.length-1;nt++)if(Fe(Vt,Ct[nt]),Vt.length===yt)return Vt;Ot=It=mt}}return Fe(Vt,Re(ot,It)),Vt}]},!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,_e,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,_e,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"),Ne=ie("../internals/object-get-own-property-descriptor"),Oe=ie("../internals/object-define-property"),Fe=ie("../internals/object-define-properties"),Re=ie("../internals/object-property-is-enumerable"),Ye=ie("../internals/redefine"),ze=ie("../internals/shared"),Ze=ie("../internals/shared-key"),at=ie("../internals/hidden-keys"),ht=ie("../internals/uid"),pt=ie("../internals/well-known-symbol"),Mt=ie("../internals/well-known-symbol-wrapped"),et=ie("../internals/define-well-known-symbol"),ot=ie("../internals/symbol-define-to-primitive"),wt=ie("../internals/set-to-string-tag"),Et=ie("../internals/internal-state"),Tt=ie("../internals/array-iteration").forEach,vt=Ze("hidden"),gt="Symbol",yt="prototype",It=Et.set,Ot=Et.getterFor(gt),Vt=Object[yt],Ct=ce.Symbol,mt=Ct&&Ct[yt],nt=ce.TypeError,ft=ce.QObject,Xe=Ne.f,ut=Oe.f,bt=Ie.f,St=Re.f,lt=Ce([].push),Qe=ze("symbols"),Ue=ze("op-symbols"),We=ze("wks"),qe=!ft||!ft[yt]||!ft[yt].findChild,He=we&&xe(function(){return pe(ut({},"a",{get:function(){return ut(this,"a",{value:7}).a}})).a!=7})?function(At,Nt,qt){var on=Xe(Vt,Nt);on&&delete Vt[Nt],ut(At,Nt,qt),on&&At!==Vt&&ut(Vt,Nt,on)}:ut,De=function(At,Nt){var qt=Qe[At]=pe(mt);return It(qt,{type:gt,tag:At,description:Nt}),we||(qt.description=Nt),qt},Le=function(Nt,qt,on){Nt===Vt&&Le(Ue,qt,on),ee(Nt);var gn=re(qt);return ee(on),fe(Qe,gn)?(on.enumerable?(fe(Nt,vt)&&Nt[vt][gn]&&(Nt[vt][gn]=!1),on=pe(on,{enumerable:ue(0,!1)})):(fe(Nt,vt)||ut(Nt,vt,ue(1,{})),Nt[vt][gn]=!0),He(Nt,gn,on)):ut(Nt,gn,on)},Ke=function(Nt,qt){ee(Nt);var on=ae(qt),gn=Ee(on).concat(Xt(on));return Tt(gn,function(kn){(!we||be(Ve,on,kn))&&Le(Nt,kn,on[kn])}),Nt},dt=function(Nt,qt){return qt===void 0?pe(Nt):Ke(pe(Nt),qt)},Ve=function(Nt){var qt=re(Nt),on=be(St,this,qt);return this===Vt&&fe(Qe,qt)&&!fe(Ue,qt)?!1:on||!fe(this,qt)||!fe(Qe,qt)||fe(this,vt)&&this[vt][qt]?on:!0},kt=function(Nt,qt){var on=ae(Nt),gn=re(qt);if(!(on===Vt&&fe(Qe,gn)&&!fe(Ue,gn))){var kn=Xe(on,gn);return kn&&fe(Qe,gn)&&!(fe(on,vt)&&on[vt][gn])&&(kn.enumerable=!0),kn}},zt=function(Nt){var qt=bt(ae(Nt)),on=[];return Tt(qt,function(gn){!fe(Qe,gn)&&!fe(at,gn)&<(on,gn)}),on},Xt=function(At){var Nt=At===Vt,qt=bt(Nt?Ue:ae(At)),on=[];return Tt(qt,function(gn){fe(Qe,gn)&&(!Nt||fe(Vt,gn))&<(on,Qe[gn])}),on};me||(Ct=function(){if(z(mt,this))throw nt("Symbol is not a constructor");var Nt=!arguments.length||arguments[0]===void 0?void 0:le(arguments[0]),qt=ht(Nt),on=function(gn){this===Vt&&be(on,Ue,gn),fe(this,vt)&&fe(this[vt],qt)&&(this[vt][qt]=!1),He(this,qt,ue(1,gn))};return we&&qe&&He(Vt,qt,{configurable:!0,set:on}),De(qt,Nt)},mt=Ct[yt],Ye(mt,"toString",function(){return Ot(this).tag}),Ye(Ct,"withoutSetter",function(At){return De(ht(At),At)}),Re.f=Ve,Oe.f=Le,Fe.f=Ke,Ne.f=kt,Pe.f=Ie.f=zt,ke.f=Xt,Mt.f=function(At){return De(pt(At),At)},we&&(ut(mt,"description",{configurable:!0,get:function(){return Ot(this).description}}),ye||Ye(Vt,"propertyIsEnumerable",Ve,{unsafe:!0}))),ve({global:!0,wrap:!0,forced:!me,sham:!me},{Symbol:Ct}),Tt(Ee(We),function(At){et(At)}),ve({target:gt,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:Ke,getOwnPropertyDescriptor:kt}),ve({target:"Object",stat:!0,forced:!me},{getOwnPropertyNames:zt}),ot(),wt(Ct,gt),at[vt]=!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,_e,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 Re=ue?ke(Fe,7,-1):Ie(Fe,Pe,"$1");return Re===""?void 0:Re}}),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,_e,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,_e,je){var ve=ie("../internals/define-well-known-symbol");ve("iterator")},{"../internals/define-well-known-symbol":133}],313:[function(ie,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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,Ne=Ce(Ie),Oe=0;if(Ne+Pe>ke)throw xe("Wrong length");for(;Oe<Ne;)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,_e,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,_e,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,_e,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,Ne;for(ke=0;ke<516;ke++)Ne=ke%4,Pe[ke]=515-ke,Ie[ke]=ke-2*Ne+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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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,_e,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"](),Ne=z[ue+"Minutes"](),Oe=z[ue+"Seconds"](),Fe=z[ue+"Milliseconds"](),Re=ae?0:z.getTimezoneOffset(),Ye=Ce(z),ze=ye(z),Ze={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:Ne,MM:be(Ne),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:(Re>0?"-":"+")+be(Math.floor(Math.abs(Re)/60)*100+Math.abs(Re)%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(at){return at in Ze?Ze[at]:at.slice(1,at.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"?_e.exports=ce:ve.dateFormat=ce})(this)},{}],343:[function(ie,_e,je){"use strict";var ve=/["'&<>]/;_e.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=""";break;case 38:we="&";break;case 39:we="'";break;case 60:we="<";break;case 62:we=">";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,_e,je){"use strict";var ve=typeof Reflect=="object"?Reflect:null,ce=ve&&typeof ve.apply=="function"?ve.apply:function(Oe,Fe,Re){return Function.prototype.apply.call(Oe,Fe,Re)},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(Ne){console&&console.warn&&console.warn(Ne)}var ye=Number.isNaN||function(Oe){return Oe!==Oe};function we(){we.init.call(this)}_e.exports=we,_e.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(Ne){if(typeof Ne!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof Ne)}Object.defineProperty(we,"defaultMaxListeners",{enumerable:!0,get:function(){return me},set:function(Ne){if(typeof Ne!="number"||Ne<0||ye(Ne))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+Ne+".");me=Ne}}),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(Ne){return Ne._maxListeners===void 0?we.defaultMaxListeners:Ne._maxListeners}we.prototype.getMaxListeners=function(){return fe(this)},we.prototype.emit=function(Oe){for(var Fe=[],Re=1;Re<arguments.length;Re++)Fe.push(arguments[Re]);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 Ze;if(Fe.length>0&&(Ze=Fe[0]),Ze instanceof Error)throw Ze;var at=new Error("Unhandled error."+(Ze?" ("+Ze.message+")":""));throw at.context=Ze,at}var ht=ze[Oe];if(ht===void 0)return!1;if(typeof ht=="function")ce(ht,this,Fe);else for(var pt=ht.length,Mt=ue(ht,pt),Re=0;Re<pt;++Re)ce(Mt[Re],this,Fe);return!0};function z(Ne,Oe,Fe,Re){var Ye,ze,Ze;if(xe(Fe),ze=Ne._events,ze===void 0?(ze=Ne._events=Object.create(null),Ne._eventsCount=0):(ze.newListener!==void 0&&(Ne.emit("newListener",Oe,Fe.listener?Fe.listener:Fe),ze=Ne._events),Ze=ze[Oe]),Ze===void 0)Ze=ze[Oe]=Fe,++Ne._eventsCount;else if(typeof Ze=="function"?Ze=ze[Oe]=Re?[Fe,Ze]:[Ze,Fe]:Re?Ze.unshift(Fe):Ze.push(Fe),Ye=fe(Ne),Ye>0&&Ze.length>Ye&&!Ze.warned){Ze.warned=!0;var at=new Error("Possible EventEmitter memory leak detected. "+Ze.length+" "+String(Oe)+" listeners added. Use emitter.setMaxListeners() to increase limit");at.name="MaxListenersExceededWarning",at.emitter=Ne,at.type=Oe,at.count=Ze.length,Ce(at)}return Ne}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(Ne,Oe,Fe){var Re={fired:!1,wrapFn:void 0,target:Ne,type:Oe,listener:Fe},Ye=ee.bind(Re);return Ye.listener=Fe,Re.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 Re,Ye,ze,Ze,at;if(xe(Fe),Ye=this._events,Ye===void 0)return this;if(Re=Ye[Oe],Re===void 0)return this;if(Re===Fe||Re.listener===Fe)--this._eventsCount===0?this._events=Object.create(null):(delete Ye[Oe],Ye.removeListener&&this.emit("removeListener",Oe,Re.listener||Fe));else if(typeof Re!="function"){for(ze=-1,Ze=Re.length-1;Ze>=0;Ze--)if(Re[Ze]===Fe||Re[Ze].listener===Fe){at=Re[Ze].listener,ze=Ze;break}if(ze<0)return this;ze===0?Re.shift():pe(Re,ze),Re.length===1&&(Ye[Oe]=Re[0]),Ye.removeListener!==void 0&&this.emit("removeListener",Oe,at||Fe)}return this},we.prototype.off=we.prototype.removeListener,we.prototype.removeAllListeners=function(Oe){var Fe,Re,Ye;if(Re=this._events,Re===void 0)return this;if(Re.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):Re[Oe]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete Re[Oe]),this;if(arguments.length===0){var ze=Object.keys(Re),Ze;for(Ye=0;Ye<ze.length;++Ye)Ze=ze[Ye],Ze!=="removeListener"&&this.removeAllListeners(Ze);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(Fe=Re[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(Ne,Oe,Fe){var Re=Ne._events;if(Re===void 0)return[];var Ye=Re[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(Ne,Oe){return typeof Ne.listenerCount=="function"?Ne.listenerCount(Oe):le.call(Ne,Oe)},we.prototype.listenerCount=le;function le(Ne){var Oe=this._events;if(Oe!==void 0){var Fe=Oe[Ne];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(Ne,Oe){for(var Fe=new Array(Oe),Re=0;Re<Oe;++Re)Fe[Re]=Ne[Re];return Fe}function pe(Ne,Oe){for(;Oe+1<Ne.length;Oe++)Ne[Oe]=Ne[Oe+1];Ne.pop()}function Ee(Ne){for(var Oe=new Array(Ne.length),Fe=0;Fe<Oe.length;++Fe)Oe[Fe]=Ne[Fe].listener||Ne[Fe];return Oe}function Pe(Ne,Oe){return new Promise(function(Fe,Re){function Ye(Ze){Ne.removeListener(Oe,ze),Re(Ze)}function ze(){typeof Ne.removeListener=="function"&&Ne.removeListener("error",Ye),Fe([].slice.call(arguments))}ke(Ne,Oe,ze,{once:!0}),Oe!=="error"&&Ie(Ne,Ye,{once:!0})})}function Ie(Ne,Oe,Fe){typeof Ne.on=="function"&&ke(Ne,"error",Oe,Fe)}function ke(Ne,Oe,Fe,Re){if(typeof Ne.on=="function")Re.once?Ne.once(Oe,Fe):Ne.on(Oe,Fe);else if(typeof Ne.addEventListener=="function")Ne.addEventListener(Oe,function Ye(ze){Re.once&&Ne.removeEventListener(Oe,Ye),Fe(ze)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof Ne)}},{}],345:[function(ie,_e,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)};_e.exports=me},{"is-callable":367}],346:[function(ie,_e,je){"use strict";var ve="Function.prototype.bind called on incompatible ",ce=Array.prototype.slice,be=Object.prototype.toString,Ce="[object Function]";_e.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,_e,je){"use strict";var ve=ie("./implementation");_e.exports=Function.prototype.bind||ve},{"./implementation":346}],348:[function(ie,_e,je){"use strict";var ve,ce=SyntaxError,be=Function,Ce=TypeError,ye=function(ht){try{return be('"use strict"; return ('+ht+").constructor;")()}catch(pt){}},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(pt){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(pt){var Mt;if(pt==="%AsyncFunction%")Mt=ye("async function () {}");else if(pt==="%GeneratorFunction%")Mt=ye("function* () {}");else if(pt==="%AsyncGeneratorFunction%")Mt=ye("async function* () {}");else if(pt==="%AsyncGenerator%"){var et=ht("%AsyncGeneratorFunction%");et&&(Mt=et.prototype)}else if(pt==="%AsyncIteratorPrototype%"){var ot=ht("%AsyncGenerator%");ot&&ee&&(Mt=ee(ot.prototype))}return le[pt]=Mt,Mt},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),Ne=Pe.call(Function.apply,Array.prototype.splice),Oe=Pe.call(Function.call,String.prototype.replace),Fe=Pe.call(Function.call,String.prototype.slice),Re=Pe.call(Function.call,RegExp.prototype.exec),Ye=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ze=/\\(\\)?/g,Ze=function(pt){var Mt=Fe(pt,0,1),et=Fe(pt,-1);if(Mt==="%"&&et!=="%")throw new ce("invalid intrinsic syntax, expected closing `%`");if(et==="%"&&Mt!=="%")throw new ce("invalid intrinsic syntax, expected opening `%`");var ot=[];return Oe(pt,Ye,function(wt,Et,Tt,vt){ot[ot.length]=Tt?Oe(vt,ze,"$1"):Et||wt}),ot},at=function(pt,Mt){var et=pt,ot;if(Ie(Ee,et)&&(ot=Ee[et],et="%"+ot[0]+"%"),Ie(le,et)){var wt=le[et];if(wt===ae&&(wt=pe(et)),typeof wt=="undefined"&&!Mt)throw new Ce("intrinsic "+pt+" exists, but is not available. Please file an issue!");return{alias:ot,name:et,value:wt}}throw new ce("intrinsic "+pt+" does not exist!")};_e.exports=function(pt,Mt){if(typeof pt!="string"||pt.length===0)throw new Ce("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Mt!="boolean")throw new Ce('"allowMissing" argument must be a boolean');if(Re(/^%?[^%]*%?$/,pt)===null)throw new ce("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var et=Ze(pt),ot=et.length>0?et[0]:"",wt=at("%"+ot+"%",Mt),Et=wt.name,Tt=wt.value,vt=!1,gt=wt.alias;gt&&(ot=gt[0],Ne(et,ke([0,1],gt)));for(var yt=1,It=!0;yt<et.length;yt+=1){var Ot=et[yt],Vt=Fe(Ot,0,1),Ct=Fe(Ot,-1);if((Vt==='"'||Vt==="'"||Vt==="`"||Ct==='"'||Ct==="'"||Ct==="`")&&Vt!==Ct)throw new ce("property names with quotes must have matching quotes");if((Ot==="constructor"||!It)&&(vt=!0),ot+="."+Ot,Et="%"+ot+"%",Ie(le,Et))Tt=le[Et];else if(Tt!=null){if(!(Ot in Tt)){if(!Mt)throw new Ce("base intrinsic for "+pt+" exists, but the property is not available.");return}if(we&&yt+1>=et.length){var mt=we(Tt,Ot);It=!!mt,It&&"get"in mt&&!("originalValue"in mt.get)?Tt=mt.get:Tt=Tt[Ot]}else It=Ie(Tt,Ot),Tt=Tt[Ot];It&&!vt&&(le[Et]=Tt)}}return Tt}},{"function-bind":347,has:354,"has-proto":350,"has-symbols":351}],349:[function(ie,_e,je){"use strict";var ve=ie("get-intrinsic"),ce=ve("%Object.getOwnPropertyDescriptor%",!0);if(ce)try{ce([],"length")}catch(be){ce=null}_e.exports=ce},{"get-intrinsic":348}],350:[function(ie,_e,je){"use strict";var ve={foo:{}},ce=Object;_e.exports=function(){return{__proto__:ve}.foo===ve.foo&&!({__proto__:null}instanceof ce)}},{}],351:[function(ie,_e,je){"use strict";var ve=typeof Symbol!="undefined"&&Symbol,ce=ie("./shams");_e.exports=function(){return typeof ve!="function"||typeof Symbol!="function"||typeof ve("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:ce()}},{"./shams":352}],352:[function(ie,_e,je){"use strict";_e.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,_e,je){"use strict";var ve=ie("has-symbols/shams");_e.exports=function(){return ve()&&!!Symbol.toStringTag}},{"has-symbols/shams":352}],354:[function(ie,_e,je){"use strict";var ve=ie("function-bind");_e.exports=ve.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":347}],355:[function(ie,_e,je){var ve=ie("http"),ce=ie("url"),be=_e.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,_e,je){"use strict";var ve=ie("util"),ce=ie("ms");_e.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,_e,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,_e,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)}},_e.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,_e,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 an!="undefined"?an:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],360:[function(ie,_e,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 an!="undefined"?an:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],361:[function(ie,_e,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 an!="undefined"?an:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],362:[function(ie,_e,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 an!="undefined"?an:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],363:[function(ie,_e,je){"use strict";je.test=function(){return!0},je.install=function(ve){return function(){setTimeout(ve,0)}}},{}],364:[function(ie,_e,je){typeof Object.create=="function"?_e.exports=function(ce,be){be&&(ce.super_=be,ce.prototype=Object.create(be.prototype,{constructor:{value:ce,enumerable:!1,writable:!0,configurable:!0}}))}:_e.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,_e,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,_e.exports=we?Ce:ye},{"call-bind/callBound":92,"has-tostringtag/shams":353}],366:[function(ie,_e,je){_e.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,_e,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 Ne=ve.call(ke);return ye.test(Ne)}catch(Oe){return!1}},me=function(ke){try{return we(ke)?!1:(ve.call(ke),!0)}catch(Ne){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 Ne=xe.call(ke);return(Ne===ae||Ne===re||Ne===le||Ne===fe)&&ke("")==null}catch(Oe){}return!1})}_e.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(Ne){if(Ne!==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 Ne=xe.call(ke);return Ne!==z&&Ne!==ee&&!/^\[object HTML/.test(Ne)?!1:me(ke)}},{}],368:[function(ie,_e,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;_e.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,_e,je){"use strict";var ve=ie("which-typed-array");_e.exports=function(be){return!!ve(be)}},{"which-typed-array":420}],370:[function(ie,_e,je){var ve={}.toString;_e.exports=Array.isArray||function(ce){return ve.call(ce)=="[object Array]"}},{}],371:[function(ie,_e,je){(function(ve){(function(){(function(ce,be){typeof je=="object"&&typeof _e!="undefined"?_e.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(pt){for(var Mt={},et=0,ot=pt.length;et<ot;et++)Mt[pt.charAt(et)]=et;return Mt}(ye),me=String.fromCharCode,xe=function(pt){if(pt.length<2){var Mt=pt.charCodeAt(0);return Mt<128?pt:Mt<2048?me(192|Mt>>>6)+me(128|Mt&63):me(224|Mt>>>12&15)+me(128|Mt>>>6&63)+me(128|Mt&63)}else{var Mt=65536+(pt.charCodeAt(0)-55296)*1024+(pt.charCodeAt(1)-56320);return me(240|Mt>>>18&7)+me(128|Mt>>>12&63)+me(128|Mt>>>6&63)+me(128|Mt&63)}},fe=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,z=function(pt){return pt.replace(fe,xe)},ee=function(pt){var Mt=[0,2,1][pt.length%3],et=pt.charCodeAt(0)<<16|(pt.length>1?pt.charCodeAt(1):0)<<8|(pt.length>2?pt.charCodeAt(2):0),ot=[ye.charAt(et>>>18),ye.charAt(et>>>12&63),Mt>=2?"=":ye.charAt(et>>>6&63),Mt>=1?"=":ye.charAt(et&63)];return ot.join("")},ae=ce.btoa&&typeof ce.btoa=="function"?function(pt){return ce.btoa(pt)}:function(pt){if(pt.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return pt.replace(/[\s\S]{1,3}/g,ee)},re=function(pt){return ae(z(String(pt)))},le=function(pt){return pt.replace(/[+\/]/g,function(Mt){return Mt=="+"?"-":"_"}).replace(/=/g,"")},ue=function(pt,Mt){return Mt?le(re(pt)):re(pt)},pe=function(pt){return ue(pt,!0)},Ee;ce.Uint8Array&&(Ee=function(pt,Mt){for(var et="",ot=0,wt=pt.length;ot<wt;ot+=3){var Et=pt[ot],Tt=pt[ot+1],vt=pt[ot+2],gt=Et<<16|Tt<<8|vt;et+=ye.charAt(gt>>>18)+ye.charAt(gt>>>12&63)+(typeof Tt!="undefined"?ye.charAt(gt>>>6&63):"=")+(typeof vt!="undefined"?ye.charAt(gt&63):"=")}return Mt?le(et):et});var Pe=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Ie=function(pt){switch(pt.length){case 4:var Mt=(7&pt.charCodeAt(0))<<18|(63&pt.charCodeAt(1))<<12|(63&pt.charCodeAt(2))<<6|63&pt.charCodeAt(3),et=Mt-65536;return me((et>>>10)+55296)+me((et&1023)+56320);case 3:return me((15&pt.charCodeAt(0))<<12|(63&pt.charCodeAt(1))<<6|63&pt.charCodeAt(2));default:return me((31&pt.charCodeAt(0))<<6|63&pt.charCodeAt(1))}},ke=function(pt){return pt.replace(Pe,Ie)},Ne=function(pt){var Mt=pt.length,et=Mt%4,ot=(Mt>0?we[pt.charAt(0)]<<18:0)|(Mt>1?we[pt.charAt(1)]<<12:0)|(Mt>2?we[pt.charAt(2)]<<6:0)|(Mt>3?we[pt.charAt(3)]:0),wt=[me(ot>>>16),me(ot>>>8&255),me(ot&255)];return wt.length-=[0,0,2,1][et],wt.join("")},Oe=ce.atob&&typeof ce.atob=="function"?function(pt){return ce.atob(pt)}:function(pt){return pt.replace(/\S{1,4}/g,Ne)},Fe=function(pt){return Oe(String(pt).replace(/[^A-Za-z0-9\+\/]/g,""))},Re=function(pt){return ke(Oe(pt))},Ye=function(pt){return String(pt).replace(/[-_]/g,function(Mt){return Mt=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},ze=function(pt){return Re(Ye(pt))},Ze;ce.Uint8Array&&(Ze=function(pt){return Uint8Array.from(Fe(Ye(pt)),function(Mt){return Mt.charCodeAt(0)})});var at=function(){var pt=ce.Base64;return ce.Base64=be,pt};if(ce.Base64={VERSION:Ce,atob:Fe,btoa:ae,fromBase64:ze,toBase64:ue,utob:z,encode:ue,encodeURI:pe,btou:ke,decode:ze,noConflict:at,fromUint8Array:Ee,toUint8Array:Ze},typeof Object.defineProperty=="function"){var ht=function(pt){return{value:pt,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(pt){return ue(this,pt)})),Object.defineProperty(String.prototype,"toBase64URI",ht(function(){return ue(this,!0)}))}}return ce.Meteor&&(Base64=ce.Base64),typeof _e!="undefined"&&_e.exports?_e.exports.Base64=ce.Base64:typeof $e=="function"&&$e.amd&&$e([],function(){return ce.Base64}),{Base64:ce.Base64}})}).call(this)}).call(this,typeof an!="undefined"?an:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],372:[function(ie,_e,je){"use strict";_e.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,_e,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},_e.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,_e,je){"use strict";var ve=ie("./Mime");_e.exports=new ve(ie("./types/standard"))},{"./Mime":373,"./types/standard":375}],375:[function(ie,_e,je){"use strict";_e.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,_e,je){var ve=1e3,ce=ve*60,be=ce*60,Ce=be*24,ye=Ce*7,we=Ce*365.25;_e.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,_e,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}}_e.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,_e,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,_e.exports=ye}).call(this)}).call(this,ie("_process"))},{_process:467}],379:[function(ie,_e,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 _e]&&_e&&!_e.nodeType&&_e,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,Ze,at){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 Ze&&at&&/^Win/i.test(ze)&&!/^Windows Phone /i.test(ze)&&(ht=ht[/[\d.]+$/.exec(ze)])&&(ze="Windows "+ht),ze=String(ze),Ze&&at&&(ze=ze.replace(RegExp(Ze,"i"),at)),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,Ze){var at=-1,ht=ze?ze.length:0;if(typeof ht=="number"&&ht>-1&&ht<=xe)for(;++at<ht;)Ze(ze[at],at,ze);else Pe(ze,Ze)}function Ee(ze){return ze=Fe(ze),/^(?:webOS|i(?:OS|P))/.test(ze)?ze:le(ze)}function Pe(ze,Ze){for(var at in ze)ae.call(ze,at)&&Ze(ze[at],at,ze)}function Ie(ze){return ze==null?le(ze):re.call(ze).slice(8,-1)}function ke(ze,Ze){var at=ze!=null?typeof ze[Ze]:"number";return!/^(?:boolean|number|string|undefined)$/.test(at)&&(at=="object"?!!ze[Ze]:!0)}function Ne(ze){return String(ze).replace(/([ -])(?!$)/g,"$1?")}function Oe(ze,Ze){var at=null;return pe(ze,function(ht,pt){at=Ze(at,ht,pt,ze)}),at}function Fe(ze){return String(ze).replace(/^ +| +$/g,"")}function Re(ze){var Ze=be,at=ze&&typeof ze=="object"&&Ie(ze)!="String";at&&(Ze=ze,ze=null);var ht=Ze.navigator||{},pt=ht.userAgent||"";ze||(ze=pt);var Mt=at||z==Ce,et=at?!!ht.likeChrome:/\bChrome\b/.test(ze)&&!/internal|\n/i.test(re.toString()),ot="Object",wt=at?ot:"ScriptBridgingProxyObject",Et=at?ot:"Environment",Tt=at&&Ze.java?"JavaPackage":Ie(Ze.java),vt=at?ot:"RuntimeObject",gt=/\bJava/.test(Tt)&&Ze.java,yt=gt&&Ie(Ze.environment)==Et,It=gt?"a":"\u03B1",Ot=gt?"b":"\u03B2",Vt=Ze.document||{},Ct=Ze.operamini||Ze.opera,mt=fe.test(mt=at&&Ct?Ct["[[Class]]"]:Ie(Ct))?mt:Ct=null,nt,ft=ze,Xe=[],ut=null,bt=ze==pt,St=bt&&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"]),Ue=Ke(["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"]),We=Ve([{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(At){return Oe(At,function(Nt,qt){return Nt||RegExp("\\b"+(qt.pattern||Ne(qt))+"\\b","i").exec(ze)&&(qt.label||qt)})}function Le(At){return Oe(At,function(Nt,qt,on){return Nt||(qt[We]||qt[/^[a-z]+(?: +[a-z]+\b)*/i.exec(We)]||RegExp("\\b"+Ne(on)+"(?:\\b|\\w*\\d)","i").exec(ze))&&on})}function Ke(At){return Oe(At,function(Nt,qt){return Nt||RegExp("\\b"+(qt.pattern||Ne(qt))+"\\b","i").exec(ze)&&(qt.label||qt)})}function dt(At){return Oe(At,function(Nt,qt){var on=qt.pattern||Ne(qt);return!Nt&&(Nt=RegExp("\\b"+on+"(?:/[\\d.]+|[ \\w.]*)","i").exec(ze))&&(Nt=ue(Nt,on,qt.label||qt)),Nt})}function Ve(At){return Oe(At,function(Nt,qt){var on=qt.pattern||Ne(qt);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(qt.label&&!RegExp(on,"i").test(qt.label)?qt.label:Nt).split("/"))[1]&&!/[\d.]+/.test(Nt[0])&&(Nt[0]+=" "+Nt[1]),qt=qt.label||qt,Nt=Ee(Nt[0].replace(RegExp(on,"i"),qt).replace(RegExp("; *(?:"+qt+"[_-])?","i")," ").replace(RegExp("("+qt+")[-_.]?(\\w)","i"),"$1 $2"))),Nt})}function kt(At){return Oe(At,function(Nt,qt){return Nt||(RegExp(qt+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(ze)||0)[1]||null})}function zt(){return this.description||""}if(Qe&&(Qe=[Qe]),/\bAndroid\b/.test(He)&&!We&&(nt=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(ze))&&(We=Fe(nt[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),qe&&!We?We=Ve([qe]):qe&&We&&(We=We.replace(RegExp("^("+Ne(qe)+")[-_.\\s]","i"),qe+" ").replace(RegExp("^("+Ne(qe)+")[-_.]?(\\w)","i"),qe+" $2")),(nt=/\bGoogle TV\b/.exec(We))&&(We=nt[0]),/\bSimulator\b/i.test(ze)&&(We=(We?We+" ":"")+"Simulator"),Ue=="Opera Mini"&&/\bOPiOS\b/.test(ze)&&Xe.push("running in Turbo/Uncompressed mode"),Ue=="IE"&&/\blike iPhone OS\b/.test(ze)?(nt=Re(ze.replace(/like iPhone OS/,"")),qe=nt.manufacturer,We=nt.product):/^iP/.test(We)?(Ue||(Ue="Safari"),He="iOS"+((nt=/ OS ([\d_]+)/i.exec(ze))?" "+nt[1].replace(/_/g,"."):"")):Ue=="Konqueror"&&/^Linux\b/i.test(He)?He="Kubuntu":qe&&qe!="Google"&&(/Chrome/.test(Ue)&&!/\bMobile Safari\b/i.test(ze)||/\bVita\b/.test(We))||/\bAndroid\b/.test(He)&&/^Chrome/.test(Ue)&&/\bVersion\//i.test(ze)?(Ue="Android Browser",He=/\bAndroid\b/.test(He)?He:"Android"):Ue=="Silk"?(/\bMobi/i.test(ze)||(He="Android",Xe.unshift("desktop mode")),/Accelerated *= *true/i.test(ze)&&Xe.unshift("accelerated")):Ue=="UC Browser"&&/\bUCWEB\b/.test(ze)?Xe.push("speed mode"):Ue=="PaleMoon"&&(nt=/\bFirefox\/([\d.]+)\b/.exec(ze))?Xe.push("identifying as Firefox "+nt[1]):Ue=="Firefox"&&(nt=/\b(Mobile|Tablet|TV)\b/i.exec(ze))?(He||(He="Firefox OS"),We||(We=nt[1])):!Ue||(nt=!/\bMinefield\b/i.test(ze)&&/\b(?:Firefox|Safari)\b/.exec(Ue))?(Ue&&!We&&/[\/,]|^[^(]+?\)/.test(ze.slice(ze.indexOf(nt+"/")+8))&&(Ue=null),(nt=We||qe||He)&&(We||qe||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(He))&&(Ue=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(He)?He:nt)+" Browser")):Ue=="Electron"&&(nt=(/\bChrome\/([\d.]+)\b/.exec(ze)||0)[1])&&Xe.push("Chromium "+nt),St||(St=kt(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",Ne(Ue),"(?:Firefox|Minefield|NetFront)"])),(nt=Qe=="iCab"&&parseFloat(St)>3&&"WebKit"||/\bOpera\b/.test(Ue)&&(/\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(Ue)&&"NetFront")&&(Qe=[nt]),Ue=="IE"&&(nt=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(ze)||0)[1])?(Ue+=" Mobile",He="Windows Phone "+(/\+$/.test(nt)?nt:nt+".x"),Xe.unshift("desktop mode")):/\bWPDesktop\b/i.test(ze)?(Ue="IE Mobile",He="Windows Phone 8.x",Xe.unshift("desktop mode"),St||(St=(/\brv:([\d.]+)/.exec(ze)||0)[1])):Ue!="IE"&&Qe=="Trident"&&(nt=/\brv:([\d.]+)/.exec(ze))&&(Ue&&Xe.push("identifying as "+Ue+(St?" "+St:"")),Ue="IE",St=nt[1]),bt){if(ke(Ze,"global"))if(gt&&(nt=gt.lang.System,ft=nt.getProperty("os.arch"),He=He||nt.getProperty("os.name")+" "+nt.getProperty("os.version")),yt){try{St=Ze.require("ringo/engine").version.join("."),Ue="RingoJS"}catch(At){(nt=Ze.system)&&nt.global.system==Ze.system&&(Ue="Narwhal",He||(He=nt[0].os||null))}Ue||(Ue="Rhino")}else typeof Ze.process=="object"&&!Ze.process.browser&&(nt=Ze.process)&&(typeof nt.versions=="object"&&(typeof nt.versions.electron=="string"?(Xe.push("Node "+nt.versions.node),Ue="Electron",St=nt.versions.electron):typeof nt.versions.nw=="string"&&(Xe.push("Chromium "+St,"Node "+nt.versions.node),Ue="NW.js",St=nt.versions.nw)),Ue||(Ue="Node.js",ft=nt.arch,He=nt.platform,St=/[\d.]+/.exec(nt.version),St=St?St[0]:null));else Ie(nt=Ze.runtime)==wt?(Ue="Adobe AIR",He=nt.flash.system.Capabilities.os):Ie(nt=Ze.phantom)==vt?(Ue="PhantomJS",St=(nt=nt.version||null)&&nt.major+"."+nt.minor+"."+nt.patch):typeof Vt.documentMode=="number"&&(nt=/\bTrident\/(\d+)/i.exec(ze))?(St=[St,Vt.documentMode],(nt=+nt[1]+4)!=St[1]&&(Xe.push("IE "+St[1]+" mode"),Qe&&(Qe[1]=""),St[1]=nt),St=Ue=="IE"?String(St[1].toFixed(1)):St[0]):typeof Vt.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Ue)&&(Xe.push("masking as "+Ue+" "+St),Ue="IE",St="11.0",Qe=["Trident"],He="Windows");He=He&&Ee(He)}if(St&&(nt=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(St)||/(?:alpha|beta)(?: ?\d)?/i.exec(ze+";"+(bt&&ht.appMinorVersion))||/\bMinefield\b/i.test(ze)&&"a")&&(ut=/b/i.test(nt)?"beta":"alpha",St=St.replace(RegExp(nt+"\\+?$"),"")+(ut=="beta"?Ot:It)+(/\d+\+?/.exec(nt)||"")),Ue=="Fennec"||Ue=="Firefox"&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(He))Ue="Firefox Mobile";else if(Ue=="Maxthon"&&St)St=St.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(We))We=="Xbox 360"&&(He=null),We=="Xbox 360"&&/\bIEMobile\b/.test(ze)&&Xe.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(Ue)||Ue&&!We&&!/Browser|Mobi/.test(Ue))&&(He=="Windows CE"||/Mobi/i.test(ze)))Ue+=" Mobile";else if(Ue=="IE"&&bt)try{Ze.external===null&&Xe.unshift("platform preview")}catch(At){Xe.unshift("embedded")}else(/\bBlackBerry\b/.test(We)||/\bBB10\b/.test(ze))&&(nt=(RegExp(We.replace(/ +/g," *")+"/([.\\d]+)","i").exec(ze)||0)[1]||St)?(nt=[nt,/BB10/.test(ze)],He=(nt[1]?(We=null,qe="BlackBerry"):"Device Software")+" "+nt[0],St=null):this!=Pe&&We!="Wii"&&(bt&&Ct||/Opera/.test(Ue)&&/\b(?:MSIE|Firefox)\b/i.test(ze)||Ue=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(He)||Ue=="IE"&&(He&&!/^Win/.test(He)&&St>5.5||/\bWindows XP\b/.test(He)&&St>8||St==8&&!/\bTrident\b/.test(ze)))&&!fe.test(nt=Re.call(Pe,ze.replace(fe,"")+";"))&&nt.name&&(nt="ing as "+nt.name+((nt=nt.version)?" "+nt:""),fe.test(Ue)?(/\bIE\b/.test(nt)&&He=="Mac OS"&&(He=null),nt="identify"+nt):(nt="mask"+nt,mt?Ue=Ee(mt.replace(/([a-z])([A-Z])/g,"$1 $2")):Ue="Opera",/\bIE\b/.test(nt)&&(He=null),bt||(St=null)),Qe=["Presto"],Xe.push(nt));(nt=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(ze)||0)[1])&&(nt=[parseFloat(nt.replace(/\.(\d)$/,".0$1")),nt],Ue=="Safari"&&nt[1].slice(-1)=="+"?(Ue="WebKit Nightly",ut="alpha",St=nt[1].slice(0,-1)):(St==nt[1]||St==(nt[2]=(/\bSafari\/([\d.]+\+?)/i.exec(ze)||0)[1]))&&(St=null),nt[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(ze)||0)[1],nt[0]==537.36&&nt[2]==537.36&&parseFloat(nt[1])>=28&&Qe=="WebKit"&&(Qe=["Blink"]),!bt||!et&&!nt[1]?(Qe&&(Qe[1]="like Safari"),nt=(nt=nt[0],nt<400?1:nt<500?2:nt<526?3:nt<533?4:nt<534?"4+":nt<535?5:nt<537?6:nt<538?7:nt<601?8:nt<602?9:nt<604?10:nt<606?11:nt<608?12:"12")):(Qe&&(Qe[1]="like Chrome"),nt=nt[1]||(nt=nt[0],nt<530?1:nt<532?2:nt<532.05?3:nt<533?4:nt<534.03?5:nt<534.07?6:nt<534.1?7:nt<534.13?8:nt<534.16?9:nt<534.24?10:nt<534.3?11:nt<535.01?12:nt<535.02?"13+":nt<535.07?15:nt<535.11?16:nt<535.19?17:nt<536.05?18:nt<536.1?19:nt<537.01?20:nt<537.11?"21+":nt<537.13?23:nt<537.18?24:nt<537.24?25:nt<537.36?26:Qe!="Blink"?"27":"28")),Qe&&(Qe[1]+=" "+(nt+=typeof nt=="number"?".x":/[.+]/.test(nt)?"":"+")),Ue=="Safari"&&(!St||parseInt(St)>45)?St=nt:Ue=="Chrome"&&/\bHeadlessChrome/i.test(ze)&&Xe.unshift("headless")),Ue=="Opera"&&(nt=/\bzbov|zvav$/.exec(He))?(Ue+=" ",Xe.unshift("desktop mode"),nt=="zvav"?(Ue+="Mini",St=null):Ue+="Mobile",He=He.replace(RegExp(" *"+nt+"$"),"")):Ue=="Safari"&&/\bChrome\b/.exec(Qe&&Qe[1])?(Xe.unshift("desktop mode"),Ue="Chrome Mobile",St=null,/\bOS X\b/.test(He)?(qe="Apple",He="iOS 4.3+"):He=null):/\bSRWare Iron\b/.test(Ue)&&!St&&(St=kt("Chrome")),St&&St.indexOf(nt=/[\d.]+$/.exec(He))==0&&ze.indexOf("/"+nt+"-")>-1&&(He=Fe(He.replace(nt,""))),He&&He.indexOf(Ue)!=-1&&!RegExp(Ue+" OS").test(He)&&(He=He.replace(RegExp(" *"+Ne(Ue)+" *"),"")),Qe&&!/\b(?:Avant|Nook)\b/.test(Ue)&&(/Browser|Lunascape|Maxthon/.test(Ue)||Ue!="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(Ue)&&Qe[1])&&(nt=Qe[Qe.length-1])&&Xe.push(nt),Xe.length&&(Xe=["("+Xe.join("; ")+")"]),qe&&We&&We.indexOf(qe)<0&&Xe.push("on "+qe),We&&Xe.push((/^on /.test(Xe[Xe.length-1])?"":"on ")+We),He&&(nt=/ ([\d.+]+)$/.exec(He),lt=nt&&He.charAt(He.length-nt[0].length-1)=="/",He={architecture:32,family:nt&&!lt?He.replace(nt[0],""):He,version:nt?nt[1]:null,toString:function(){var At=this.version;return this.family+(At&&!lt?" "+At:"")+(this.architecture==64?" 64-bit":"")}}),(nt=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(ft))&&!/\bi686\b/i.test(ft)?(He&&(He.architecture=64,He.family=He.family.replace(RegExp(" *"+nt),"")),Ue&&(/\bWOW64\b/i.test(ze)||bt&&/\w(?:86|32)$/.test(ht.cpuClass||ht.platform)&&!/\bWin64; x64\b/i.test(ze))&&Xe.unshift("32-bit")):He&&/^OS X/.test(He.family)&&Ue=="Chrome"&&parseFloat(St)>=39&&(He.architecture=64),ze||(ze=null);var Xt={};return Xt.description=ze,Xt.layout=Qe&&Qe[0],Xt.manufacturer=qe,Xt.name=Ue,Xt.prerelease=ut,Xt.product=We,Xt.ua=ze,Xt.version=Ue&&St,Xt.os=He||{architecture:null,family:null,version:null,toString:function(){return"null"}},Xt.parse=Re,Xt.toString=zt,Xt.version&&Xe.unshift(St),Xt.name&&Xe.unshift(Ue),He&&Ue&&!(He==String(He).split(" ")[0]&&(He==Ue.split(" ")[0]||We))&&Xe.push(We?"("+He+")":"on "+He),Xe.length&&(Xt.description=Xe.join(" ")),Xt}var Ye=Re();typeof $e=="function"&&typeof $e.amd=="object"&&$e.amd?(be.platform=Ye,$e(function(){return Ye})):ye&&we?Pe(Ye,function(ze,Ze){ye[Ze]=ze}):be.platform=Ye}).call(this)}).call(this)}).call(this,typeof an!="undefined"?an:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],380:[function(ie,_e,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?_e.exports={nextTick:ce}:_e.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,_e,je){var ve=_e.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,_e,je){(function(ve){(function(){(function(ce){var be=typeof je=="object"&&je&&!je.nodeType&&je,Ce=typeof _e=="object"&&_e&&!_e.nodeType&&_e,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,Ne=Math.floor,Oe=String.fromCharCode,Fe;function Re(Tt){throw new RangeError(Ie[Tt])}function Ye(Tt,vt){for(var gt=Tt.length,yt=[];gt--;)yt[gt]=vt(Tt[gt]);return yt}function ze(Tt,vt){var gt=Tt.split("@"),yt="";gt.length>1&&(yt=gt[0]+"@",Tt=gt[1]),Tt=Tt.replace(Pe,".");var It=Tt.split("."),Ot=Ye(It,vt).join(".");return yt+Ot}function Ze(Tt){for(var vt=[],gt=0,yt=Tt.length,It,Ot;gt<yt;)It=Tt.charCodeAt(gt++),It>=55296&&It<=56319&><yt?(Ot=Tt.charCodeAt(gt++),(Ot&64512)==56320?vt.push(((It&1023)<<10)+(Ot&1023)+65536):(vt.push(It),gt--)):vt.push(It);return vt}function at(Tt){return Ye(Tt,function(vt){var gt="";return vt>65535&&(vt-=65536,gt+=Oe(vt>>>10&1023|55296),vt=56320|vt&1023),gt+=Oe(vt),gt}).join("")}function ht(Tt){return Tt-48<10?Tt-22:Tt-65<26?Tt-65:Tt-97<26?Tt-97:xe}function pt(Tt,vt){return Tt+22+75*(Tt<26)-((vt!=0)<<5)}function Mt(Tt,vt,gt){var yt=0;for(Tt=gt?Ne(Tt/ae):Tt>>1,Tt+=Ne(Tt/vt);Tt>ke*z>>1;yt+=xe)Tt=Ne(Tt/ke);return Ne(yt+(ke+1)*Tt/(Tt+ee))}function et(Tt){var vt=[],gt=Tt.length,yt,It=0,Ot=le,Vt=re,Ct,mt,nt,ft,Xe,ut,bt,St,lt;for(Ct=Tt.lastIndexOf(ue),Ct<0&&(Ct=0),mt=0;mt<Ct;++mt)Tt.charCodeAt(mt)>=128&&Re("not-basic"),vt.push(Tt.charCodeAt(mt));for(nt=Ct>0?Ct+1:0;nt<gt;){for(ft=It,Xe=1,ut=xe;nt>=gt&&Re("invalid-input"),bt=ht(Tt.charCodeAt(nt++)),(bt>=xe||bt>Ne((me-It)/Xe))&&Re("overflow"),It+=bt*Xe,St=ut<=Vt?fe:ut>=Vt+z?z:ut-Vt,!(bt<St);ut+=xe)lt=xe-St,Xe>Ne(me/lt)&&Re("overflow"),Xe*=lt;yt=vt.length+1,Vt=Mt(It-ft,yt,ft==0),Ne(It/yt)>me-Ot&&Re("overflow"),Ot+=Ne(It/yt),It%=yt,vt.splice(It++,0,Ot)}return at(vt)}function ot(Tt){var vt,gt,yt,It,Ot,Vt,Ct,mt,nt,ft,Xe,ut=[],bt,St,lt,Qe;for(Tt=Ze(Tt),bt=Tt.length,vt=le,gt=0,Ot=re,Vt=0;Vt<bt;++Vt)Xe=Tt[Vt],Xe<128&&ut.push(Oe(Xe));for(yt=It=ut.length,It&&ut.push(ue);yt<bt;){for(Ct=me,Vt=0;Vt<bt;++Vt)Xe=Tt[Vt],Xe>=vt&&Xe<Ct&&(Ct=Xe);for(St=yt+1,Ct-vt>Ne((me-gt)/St)&&Re("overflow"),gt+=(Ct-vt)*St,vt=Ct,Vt=0;Vt<bt;++Vt)if(Xe=Tt[Vt],Xe<vt&&++gt>me&&Re("overflow"),Xe==vt){for(mt=gt,nt=xe;ft=nt<=Ot?fe:nt>=Ot+z?z:nt-Ot,!(mt<ft);nt+=xe)Qe=mt-ft,lt=xe-ft,ut.push(Oe(pt(ft+Qe%lt,0))),mt=Ne(Qe/lt);ut.push(Oe(pt(mt,0))),Ot=Mt(gt,St,yt==It),gt=0,++yt}++gt,++vt}return ut.join("")}function wt(Tt){return ze(Tt,function(vt){return pe.test(vt)?et(vt.slice(4).toLowerCase()):vt})}function Et(Tt){return ze(Tt,function(vt){return Ee.test(vt)?"xn--"+ot(vt):vt})}if(we={version:"1.4.1",ucs2:{decode:Ze,encode:at},decode:et,encode:ot,toASCII:Et,toUnicode:wt},typeof $e=="function"&&typeof $e.amd=="object"&&$e.amd)$e("punycode",function(){return we});else if(be&&Ce)if(_e.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 an!="undefined"?an:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],383:[function(ie,_e,je){"use strict";function ve(be,Ce){return Object.prototype.hasOwnProperty.call(be,Ce)}_e.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,_e,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""}};_e.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,_e,je){"use strict";je.decode=je.parse=ie("./decode"),je.encode=je.stringify=ie("./encode")},{"./decode":383,"./encode":384}],386:[function(ie,_e,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};_e.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,_e,je){"use strict";_e.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,_e,je){(function(ve,ce){(function(){"use strict";var be=ie("process-nextick-args");_e.exports=Oe;var Ce=ie("isarray"),ye;Oe.ReadableState=Ne;var we=ie("events").EventEmitter,me=function(Xe,ut){return Xe.listeners(ut).length},xe=ie("./internal/streams/stream"),fe=ie("safe-buffer").Buffer,z=ce.Uint8Array||function(){};function ee(Xe){return fe.from(Xe)}function ae(Xe){return fe.isBuffer(Xe)||Xe 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(Xe,ut,bt){if(typeof Xe.prependListener=="function")return Xe.prependListener(ut,bt);!Xe._events||!Xe._events[ut]?Xe.on(ut,bt):Ce(Xe._events[ut])?Xe._events[ut].unshift(bt):Xe._events[ut]=[bt,Xe._events[ut]]}function Ne(Xe,ut){ye=ye||ie("./_stream_duplex"),Xe=Xe||{};var bt=ut instanceof ye;this.objectMode=!!Xe.objectMode,bt&&(this.objectMode=this.objectMode||!!Xe.readableObjectMode);var St=Xe.highWaterMark,lt=Xe.readableHighWaterMark,Qe=this.objectMode?16:16*1024;St||St===0?this.highWaterMark=St:bt&&(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=Xe.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Xe.encoding&&(Pe||(Pe=ie("string_decoder/").StringDecoder),this.decoder=new Pe(Xe.encoding),this.encoding=Xe.encoding)}function Oe(Xe){if(ye=ye||ie("./_stream_duplex"),!(this instanceof Oe))return new Oe(Xe);this._readableState=new Ne(Xe,this),this.readable=!0,Xe&&(typeof Xe.read=="function"&&(this._read=Xe.read),typeof Xe.destroy=="function"&&(this._destroy=Xe.destroy)),xe.call(this)}Object.defineProperty(Oe.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(Xe){this._readableState&&(this._readableState.destroyed=Xe)}}),Oe.prototype.destroy=Ee.destroy,Oe.prototype._undestroy=Ee.undestroy,Oe.prototype._destroy=function(Xe,ut){this.push(null),ut(Xe)},Oe.prototype.push=function(Xe,ut){var bt=this._readableState,St;return bt.objectMode?St=!0:typeof Xe=="string"&&(ut=ut||bt.defaultEncoding,ut!==bt.encoding&&(Xe=fe.from(Xe,ut),ut=""),St=!0),Fe(this,Xe,ut,!1,St)},Oe.prototype.unshift=function(Xe){return Fe(this,Xe,null,!0,!1)};function Fe(Xe,ut,bt,St,lt){var Qe=Xe._readableState;if(ut===null)Qe.reading=!1,pt(Xe,Qe);else{var Ue;lt||(Ue=Ye(Qe,ut)),Ue?Xe.emit("error",Ue):Qe.objectMode||ut&&ut.length>0?(typeof ut!="string"&&!Qe.objectMode&&Object.getPrototypeOf(ut)!==fe.prototype&&(ut=ee(ut)),St?Qe.endEmitted?Xe.emit("error",new Error("stream.unshift() after end event")):Re(Xe,Qe,ut,!0):Qe.ended?Xe.emit("error",new Error("stream.push() after EOF")):(Qe.reading=!1,Qe.decoder&&!bt?(ut=Qe.decoder.write(ut),Qe.objectMode||ut.length!==0?Re(Xe,Qe,ut,!1):ot(Xe,Qe)):Re(Xe,Qe,ut,!1))):St||(Qe.reading=!1)}return ze(Qe)}function Re(Xe,ut,bt,St){ut.flowing&&ut.length===0&&!ut.sync?(Xe.emit("data",bt),Xe.read(0)):(ut.length+=ut.objectMode?1:bt.length,St?ut.buffer.unshift(bt):ut.buffer.push(bt),ut.needReadable&&Mt(Xe)),ot(Xe,ut)}function Ye(Xe,ut){var bt;return!ae(ut)&&typeof ut!="string"&&ut!==void 0&&!Xe.objectMode&&(bt=new TypeError("Invalid non-string/buffer chunk")),bt}function ze(Xe){return!Xe.ended&&(Xe.needReadable||Xe.length<Xe.highWaterMark||Xe.length===0)}Oe.prototype.isPaused=function(){return this._readableState.flowing===!1},Oe.prototype.setEncoding=function(Xe){return Pe||(Pe=ie("string_decoder/").StringDecoder),this._readableState.decoder=new Pe(Xe),this._readableState.encoding=Xe,this};var Ze=8388608;function at(Xe){return Xe>=Ze?Xe=Ze:(Xe--,Xe|=Xe>>>1,Xe|=Xe>>>2,Xe|=Xe>>>4,Xe|=Xe>>>8,Xe|=Xe>>>16,Xe++),Xe}function ht(Xe,ut){return Xe<=0||ut.length===0&&ut.ended?0:ut.objectMode?1:Xe!==Xe?ut.flowing&&ut.length?ut.buffer.head.data.length:ut.length:(Xe>ut.highWaterMark&&(ut.highWaterMark=at(Xe)),Xe<=ut.length?Xe:ut.ended?ut.length:(ut.needReadable=!0,0))}Oe.prototype.read=function(Xe){ue("read",Xe),Xe=parseInt(Xe,10);var ut=this._readableState,bt=Xe;if(Xe!==0&&(ut.emittedReadable=!1),Xe===0&&ut.needReadable&&(ut.length>=ut.highWaterMark||ut.ended))return ue("read: emitReadable",ut.length,ut.ended),ut.length===0&&ut.ended?mt(this):Mt(this),null;if(Xe=ht(Xe,ut),Xe===0&&ut.ended)return ut.length===0&&mt(this),null;var St=ut.needReadable;ue("need readable",St),(ut.length===0||ut.length-Xe<ut.highWaterMark)&&(St=!0,ue("length less than watermark",St)),ut.ended||ut.reading?(St=!1,ue("reading or ended",St)):St&&(ue("do read"),ut.reading=!0,ut.sync=!0,ut.length===0&&(ut.needReadable=!0),this._read(ut.highWaterMark),ut.sync=!1,ut.reading||(Xe=ht(bt,ut)));var lt;return Xe>0?lt=It(Xe,ut):lt=null,lt===null?(ut.needReadable=!0,Xe=0):ut.length-=Xe,ut.length===0&&(ut.ended||(ut.needReadable=!0),bt!==Xe&&ut.ended&&mt(this)),lt!==null&&this.emit("data",lt),lt};function pt(Xe,ut){if(!ut.ended){if(ut.decoder){var bt=ut.decoder.end();bt&&bt.length&&(ut.buffer.push(bt),ut.length+=ut.objectMode?1:bt.length)}ut.ended=!0,Mt(Xe)}}function Mt(Xe){var ut=Xe._readableState;ut.needReadable=!1,ut.emittedReadable||(ue("emitReadable",ut.flowing),ut.emittedReadable=!0,ut.sync?be.nextTick(et,Xe):et(Xe))}function et(Xe){ue("emit readable"),Xe.emit("readable"),yt(Xe)}function ot(Xe,ut){ut.readingMore||(ut.readingMore=!0,be.nextTick(wt,Xe,ut))}function wt(Xe,ut){for(var bt=ut.length;!ut.reading&&!ut.flowing&&!ut.ended&&ut.length<ut.highWaterMark&&(ue("maybeReadMore read 0"),Xe.read(0),bt!==ut.length);)bt=ut.length;ut.readingMore=!1}Oe.prototype._read=function(Xe){this.emit("error",new Error("_read() is not implemented"))},Oe.prototype.pipe=function(Xe,ut){var bt=this,St=this._readableState;switch(St.pipesCount){case 0:St.pipes=Xe;break;case 1:St.pipes=[St.pipes,Xe];break;default:St.pipes.push(Xe);break}St.pipesCount+=1,ue("pipe count=%d opts=%j",St.pipesCount,ut);var lt=(!ut||ut.end!==!1)&&Xe!==ve.stdout&&Xe!==ve.stderr,Qe=lt?We:zt;St.endEmitted?be.nextTick(Qe):bt.once("end",Qe),Xe.on("unpipe",Ue);function Ue(Xt,At){ue("onunpipe"),Xt===bt&&At&&At.hasUnpiped===!1&&(At.hasUnpiped=!0,De())}function We(){ue("onend"),Xe.end()}var qe=Et(bt);Xe.on("drain",qe);var He=!1;function De(){ue("cleanup"),Xe.removeListener("close",Ve),Xe.removeListener("finish",kt),Xe.removeListener("drain",qe),Xe.removeListener("error",dt),Xe.removeListener("unpipe",Ue),bt.removeListener("end",We),bt.removeListener("end",zt),bt.removeListener("data",Ke),He=!0,St.awaitDrain&&(!Xe._writableState||Xe._writableState.needDrain)&&qe()}var Le=!1;bt.on("data",Ke);function Ke(Xt){ue("ondata"),Le=!1;var At=Xe.write(Xt);At===!1&&!Le&&((St.pipesCount===1&&St.pipes===Xe||St.pipesCount>1&&ft(St.pipes,Xe)!==-1)&&!He&&(ue("false write response, pause",bt._readableState.awaitDrain),bt._readableState.awaitDrain++,Le=!0),bt.pause())}function dt(Xt){ue("onerror",Xt),zt(),Xe.removeListener("error",dt),me(Xe,"error")===0&&Xe.emit("error",Xt)}ke(Xe,"error",dt);function Ve(){Xe.removeListener("finish",kt),zt()}Xe.once("close",Ve);function kt(){ue("onfinish"),Xe.removeListener("close",Ve),zt()}Xe.once("finish",kt);function zt(){ue("unpipe"),bt.unpipe(Xe)}return Xe.emit("pipe",bt),St.flowing||(ue("pipe resume"),bt.resume()),Xe};function Et(Xe){return function(){var ut=Xe._readableState;ue("pipeOnDrain",ut.awaitDrain),ut.awaitDrain&&ut.awaitDrain--,ut.awaitDrain===0&&me(Xe,"data")&&(ut.flowing=!0,yt(Xe))}}Oe.prototype.unpipe=function(Xe){var ut=this._readableState,bt={hasUnpiped:!1};if(ut.pipesCount===0)return this;if(ut.pipesCount===1)return Xe&&Xe!==ut.pipes?this:(Xe||(Xe=ut.pipes),ut.pipes=null,ut.pipesCount=0,ut.flowing=!1,Xe&&Xe.emit("unpipe",this,bt),this);if(!Xe){var St=ut.pipes,lt=ut.pipesCount;ut.pipes=null,ut.pipesCount=0,ut.flowing=!1;for(var Qe=0;Qe<lt;Qe++)St[Qe].emit("unpipe",this,bt);return this}var Ue=ft(ut.pipes,Xe);return Ue===-1?this:(ut.pipes.splice(Ue,1),ut.pipesCount-=1,ut.pipesCount===1&&(ut.pipes=ut.pipes[0]),Xe.emit("unpipe",this,bt),this)},Oe.prototype.on=function(Xe,ut){var bt=xe.prototype.on.call(this,Xe,ut);if(Xe==="data")this._readableState.flowing!==!1&&this.resume();else if(Xe==="readable"){var St=this._readableState;!St.endEmitted&&!St.readableListening&&(St.readableListening=St.needReadable=!0,St.emittedReadable=!1,St.reading?St.length&&Mt(this):be.nextTick(Tt,this))}return bt},Oe.prototype.addListener=Oe.prototype.on;function Tt(Xe){ue("readable nexttick read 0"),Xe.read(0)}Oe.prototype.resume=function(){var Xe=this._readableState;return Xe.flowing||(ue("resume"),Xe.flowing=!0,vt(this,Xe)),this};function vt(Xe,ut){ut.resumeScheduled||(ut.resumeScheduled=!0,be.nextTick(gt,Xe,ut))}function gt(Xe,ut){ut.reading||(ue("resume read 0"),Xe.read(0)),ut.resumeScheduled=!1,ut.awaitDrain=0,Xe.emit("resume"),yt(Xe),ut.flowing&&!ut.reading&&Xe.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 yt(Xe){var ut=Xe._readableState;for(ue("flow",ut.flowing);ut.flowing&&Xe.read()!==null;);}Oe.prototype.wrap=function(Xe){var ut=this,bt=this._readableState,St=!1;Xe.on("end",function(){if(ue("wrapped end"),bt.decoder&&!bt.ended){var Ue=bt.decoder.end();Ue&&Ue.length&&ut.push(Ue)}ut.push(null)}),Xe.on("data",function(Ue){if(ue("wrapped data"),bt.decoder&&(Ue=bt.decoder.write(Ue)),!(bt.objectMode&&Ue==null)&&!(!bt.objectMode&&(!Ue||!Ue.length))){var We=ut.push(Ue);We||(St=!0,Xe.pause())}});for(var lt in Xe)this[lt]===void 0&&typeof Xe[lt]=="function"&&(this[lt]=function(Ue){return function(){return Xe[Ue].apply(Xe,arguments)}}(lt));for(var Qe=0;Qe<Ie.length;Qe++)Xe.on(Ie[Qe],this.emit.bind(this,Ie[Qe]));return this._read=function(Ue){ue("wrapped _read",Ue),St&&(St=!1,Xe.resume())},this},Object.defineProperty(Oe.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Oe._fromList=It;function It(Xe,ut){if(ut.length===0)return null;var bt;return ut.objectMode?bt=ut.buffer.shift():!Xe||Xe>=ut.length?(ut.decoder?bt=ut.buffer.join(""):ut.buffer.length===1?bt=ut.buffer.head.data:bt=ut.buffer.concat(ut.length),ut.buffer.clear()):bt=Ot(Xe,ut.buffer,ut.decoder),bt}function Ot(Xe,ut,bt){var St;return Xe<ut.head.data.length?(St=ut.head.data.slice(0,Xe),ut.head.data=ut.head.data.slice(Xe)):Xe===ut.head.data.length?St=ut.shift():St=bt?Vt(Xe,ut):Ct(Xe,ut),St}function Vt(Xe,ut){var bt=ut.head,St=1,lt=bt.data;for(Xe-=lt.length;bt=bt.next;){var Qe=bt.data,Ue=Xe>Qe.length?Qe.length:Xe;if(Ue===Qe.length?lt+=Qe:lt+=Qe.slice(0,Xe),Xe-=Ue,Xe===0){Ue===Qe.length?(++St,bt.next?ut.head=bt.next:ut.head=ut.tail=null):(ut.head=bt,bt.data=Qe.slice(Ue));break}++St}return ut.length-=St,lt}function Ct(Xe,ut){var bt=fe.allocUnsafe(Xe),St=ut.head,lt=1;for(St.data.copy(bt),Xe-=St.data.length;St=St.next;){var Qe=St.data,Ue=Xe>Qe.length?Qe.length:Xe;if(Qe.copy(bt,bt.length-Xe,0,Ue),Xe-=Ue,Xe===0){Ue===Qe.length?(++lt,St.next?ut.head=St.next:ut.head=ut.tail=null):(ut.head=St,St.data=Qe.slice(Ue));break}++lt}return ut.length-=lt,bt}function mt(Xe){var ut=Xe._readableState;if(ut.length>0)throw new Error('"endReadable()" called on non-empty stream');ut.endEmitted||(ut.ended=!0,be.nextTick(nt,ut,Xe))}function nt(Xe,ut){!Xe.endEmitted&&Xe.length===0&&(Xe.endEmitted=!0,ut.readable=!1,ut.emit("end"))}function ft(Xe,ut){for(var bt=0,St=Xe.length;bt<St;bt++)if(Xe[bt]===ut)return bt;return-1}}).call(this)}).call(this,ie("_process"),typeof an!="undefined"?an: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,_e,je){"use strict";_e.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,_e,je){(function(ve,ce,be){(function(){"use strict";var Ce=ie("process-nextick-args");_e.exports=ke;function ye(gt,yt,It){this.chunk=gt,this.encoding=yt,this.callback=It,this.next=null}function we(gt){var yt=this;this.next=null,this.entry=null,this.finish=function(){vt(yt,gt)}}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(gt){return ae.from(gt)}function ue(gt){return ae.isBuffer(gt)||gt instanceof re}var pe=ie("./internal/streams/destroy");fe.inherits(ke,ee);function Ee(){}function Pe(gt,yt){xe=xe||ie("./_stream_duplex"),gt=gt||{};var It=yt instanceof xe;this.objectMode=!!gt.objectMode,It&&(this.objectMode=this.objectMode||!!gt.writableObjectMode);var Ot=gt.highWaterMark,Vt=gt.writableHighWaterMark,Ct=this.objectMode?16:16*1024;Ot||Ot===0?this.highWaterMark=Ot:It&&(Vt||Vt===0)?this.highWaterMark=Vt: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 mt=gt.decodeStrings===!1;this.decodeStrings=!mt,this.defaultEncoding=gt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(nt){at(yt,nt)},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 yt=this.bufferedRequest,It=[];yt;)It.push(yt),yt=yt.next;return It},function(){try{Object.defineProperty(Pe.prototype,"buffer",{get:z.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(gt){}}();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(gt){return Ie.call(this,gt)?!0:this!==ke?!1:gt&>._writableState instanceof Pe}})):Ie=function(gt){return gt instanceof this};function ke(gt){if(xe=xe||ie("./_stream_duplex"),!Ie.call(ke,this)&&!(this instanceof xe))return new ke(gt);this._writableState=new Pe(gt,this),this.writable=!0,gt&&(typeof gt.write=="function"&&(this._write=gt.write),typeof gt.writev=="function"&&(this._writev=gt.writev),typeof gt.destroy=="function"&&(this._destroy=gt.destroy),typeof gt.final=="function"&&(this._final=gt.final)),ee.call(this)}ke.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function Ne(gt,yt){var It=new Error("write after end");gt.emit("error",It),Ce.nextTick(yt,It)}function Oe(gt,yt,It,Ot){var Vt=!0,Ct=!1;return It===null?Ct=new TypeError("May not write null values to stream"):typeof It!="string"&&It!==void 0&&!yt.objectMode&&(Ct=new TypeError("Invalid non-string/buffer chunk")),Ct&&(gt.emit("error",Ct),Ce.nextTick(Ot,Ct),Vt=!1),Vt}ke.prototype.write=function(gt,yt,It){var Ot=this._writableState,Vt=!1,Ct=!Ot.objectMode&&ue(gt);return Ct&&!ae.isBuffer(gt)&&(gt=le(gt)),typeof yt=="function"&&(It=yt,yt=null),Ct?yt="buffer":yt||(yt=Ot.defaultEncoding),typeof It!="function"&&(It=Ee),Ot.ended?Ne(this,It):(Ct||Oe(this,Ot,gt,It))&&(Ot.pendingcb++,Vt=Re(this,Ot,Ct,gt,yt,It)),Vt},ke.prototype.cork=function(){var gt=this._writableState;gt.corked++},ke.prototype.uncork=function(){var gt=this._writableState;gt.corked&&(gt.corked--,!gt.writing&&!gt.corked&&!gt.finished&&!gt.bufferProcessing&>.bufferedRequest&&Mt(this,gt))},ke.prototype.setDefaultEncoding=function(yt){if(typeof yt=="string"&&(yt=yt.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((yt+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+yt);return this._writableState.defaultEncoding=yt,this};function Fe(gt,yt,It){return!gt.objectMode&>.decodeStrings!==!1&&typeof yt=="string"&&(yt=ae.from(yt,It)),yt}Object.defineProperty(ke.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Re(gt,yt,It,Ot,Vt,Ct){if(!It){var mt=Fe(yt,Ot,Vt);Ot!==mt&&(It=!0,Vt="buffer",Ot=mt)}var nt=yt.objectMode?1:Ot.length;yt.length+=nt;var ft=yt.length<yt.highWaterMark;if(ft||(yt.needDrain=!0),yt.writing||yt.corked){var Xe=yt.lastBufferedRequest;yt.lastBufferedRequest={chunk:Ot,encoding:Vt,isBuf:It,callback:Ct,next:null},Xe?Xe.next=yt.lastBufferedRequest:yt.bufferedRequest=yt.lastBufferedRequest,yt.bufferedRequestCount+=1}else Ye(gt,yt,!1,nt,Ot,Vt,Ct);return ft}function Ye(gt,yt,It,Ot,Vt,Ct,mt){yt.writelen=Ot,yt.writecb=mt,yt.writing=!0,yt.sync=!0,It?gt._writev(Vt,yt.onwrite):gt._write(Vt,Ct,yt.onwrite),yt.sync=!1}function ze(gt,yt,It,Ot,Vt){--yt.pendingcb,It?(Ce.nextTick(Vt,Ot),Ce.nextTick(Et,gt,yt),gt._writableState.errorEmitted=!0,gt.emit("error",Ot)):(Vt(Ot),gt._writableState.errorEmitted=!0,gt.emit("error",Ot),Et(gt,yt))}function Ze(gt){gt.writing=!1,gt.writecb=null,gt.length-=gt.writelen,gt.writelen=0}function at(gt,yt){var It=gt._writableState,Ot=It.sync,Vt=It.writecb;if(Ze(It),yt)ze(gt,It,Ot,yt,Vt);else{var Ct=et(It);!Ct&&!It.corked&&!It.bufferProcessing&&It.bufferedRequest&&Mt(gt,It),Ot?me(ht,gt,It,Ct,Vt):ht(gt,It,Ct,Vt)}}function ht(gt,yt,It,Ot){It||pt(gt,yt),yt.pendingcb--,Ot(),Et(gt,yt)}function pt(gt,yt){yt.length===0&&yt.needDrain&&(yt.needDrain=!1,gt.emit("drain"))}function Mt(gt,yt){yt.bufferProcessing=!0;var It=yt.bufferedRequest;if(gt._writev&&It&&It.next){var Ot=yt.bufferedRequestCount,Vt=new Array(Ot),Ct=yt.corkedRequestsFree;Ct.entry=It;for(var mt=0,nt=!0;It;)Vt[mt]=It,It.isBuf||(nt=!1),It=It.next,mt+=1;Vt.allBuffers=nt,Ye(gt,yt,!0,yt.length,Vt,"",Ct.finish),yt.pendingcb++,yt.lastBufferedRequest=null,Ct.next?(yt.corkedRequestsFree=Ct.next,Ct.next=null):yt.corkedRequestsFree=new we(yt),yt.bufferedRequestCount=0}else{for(;It;){var ft=It.chunk,Xe=It.encoding,ut=It.callback,bt=yt.objectMode?1:ft.length;if(Ye(gt,yt,!1,bt,ft,Xe,ut),It=It.next,yt.bufferedRequestCount--,yt.writing)break}It===null&&(yt.lastBufferedRequest=null)}yt.bufferedRequest=It,yt.bufferProcessing=!1}ke.prototype._write=function(gt,yt,It){It(new Error("_write() is not implemented"))},ke.prototype._writev=null,ke.prototype.end=function(gt,yt,It){var Ot=this._writableState;typeof gt=="function"?(It=gt,gt=null,yt=null):typeof yt=="function"&&(It=yt,yt=null),gt!=null&&this.write(gt,yt),Ot.corked&&(Ot.corked=1,this.uncork()),!Ot.ending&&!Ot.finished&&Tt(this,Ot,It)};function et(gt){return gt.ending&>.length===0&>.bufferedRequest===null&&!gt.finished&&!gt.writing}function ot(gt,yt){gt._final(function(It){yt.pendingcb--,It&>.emit("error",It),yt.prefinished=!0,gt.emit("prefinish"),Et(gt,yt)})}function wt(gt,yt){!yt.prefinished&&!yt.finalCalled&&(typeof gt._final=="function"?(yt.pendingcb++,yt.finalCalled=!0,Ce.nextTick(ot,gt,yt)):(yt.prefinished=!0,gt.emit("prefinish")))}function Et(gt,yt){var It=et(yt);return It&&(wt(gt,yt),yt.pendingcb===0&&(yt.finished=!0,gt.emit("finish"))),It}function Tt(gt,yt,It){yt.ending=!0,Et(gt,yt),It&&(yt.finished?Ce.nextTick(It):gt.once("finish",It)),yt.ended=!0,gt.writable=!1}function vt(gt,yt,It){var Ot=gt.entry;for(gt.entry=null;Ot;){var Vt=Ot.callback;yt.pendingcb--,Vt(It),Ot=Ot.next}yt.corkedRequestsFree?yt.corkedRequestsFree.next=gt:yt.corkedRequestsFree=gt}Object.defineProperty(ke.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(gt){this._writableState&&(this._writableState.destroyed=gt)}}),ke.prototype.destroy=pe.destroy,ke.prototype._undestroy=pe.undestroy,ke.prototype._destroy=function(gt,yt){this.end(),yt(gt)}}).call(this)}).call(this,ie("_process"),typeof an!="undefined"?an: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,_e,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)}_e.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&&(_e.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,_e,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)}_e.exports={destroy:ce,undestroy:be}},{"process-nextick-args":380}],393:[function(ie,_e,je){_e.exports=ie("events").EventEmitter},{events:344}],394:[function(ie,_e,je){je=_e.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,_e,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(wt,Et,Tt){return Object.defineProperty(wt,Et,{value:Tt,enumerable:!0,configurable:!0,writable:!0}),wt[Et]}try{z({},"")}catch(wt){z=function(Et,Tt,vt){return Et[Tt]=vt}}function ee(wt,Et,Tt,vt){var gt=Et&&Et.prototype instanceof Pe?Et:Pe,yt=Object.create(gt.prototype),It=new Mt(vt||[]);return yt._invoke=Ze(wt,Tt,It),yt}ce.wrap=ee;function ae(wt,Et,Tt){try{return{type:"normal",arg:wt.call(Et,Tt)}}catch(vt){return{type:"throw",arg:vt}}}var re="suspendedStart",le="suspendedYield",ue="executing",pe="completed",Ee={};function Pe(){}function Ie(){}function ke(){}var Ne={};z(Ne,me,function(){return this});var Oe=Object.getPrototypeOf,Fe=Oe&&Oe(Oe(et([])));Fe&&Fe!==be&&Ce.call(Fe,me)&&(Ne=Fe);var Re=ke.prototype=Pe.prototype=Object.create(Ne);Ie.prototype=ke,z(Re,"constructor",ke),z(ke,"constructor",Ie),Ie.displayName=z(ke,fe,"GeneratorFunction");function Ye(wt){["next","throw","return"].forEach(function(Et){z(wt,Et,function(Tt){return this._invoke(Et,Tt)})})}ce.isGeneratorFunction=function(wt){var Et=typeof wt=="function"&&wt.constructor;return Et?Et===Ie||(Et.displayName||Et.name)==="GeneratorFunction":!1},ce.mark=function(wt){return Object.setPrototypeOf?Object.setPrototypeOf(wt,ke):(wt.__proto__=ke,z(wt,fe,"GeneratorFunction")),wt.prototype=Object.create(Re),wt},ce.awrap=function(wt){return{__await:wt}};function ze(wt,Et){function Tt(yt,It,Ot,Vt){var Ct=ae(wt[yt],wt,It);if(Ct.type==="throw")Vt(Ct.arg);else{var mt=Ct.arg,nt=mt.value;return nt&&typeof nt=="object"&&Ce.call(nt,"__await")?Et.resolve(nt.__await).then(function(ft){Tt("next",ft,Ot,Vt)},function(ft){Tt("throw",ft,Ot,Vt)}):Et.resolve(nt).then(function(ft){mt.value=ft,Ot(mt)},function(ft){return Tt("throw",ft,Ot,Vt)})}}var vt;function gt(yt,It){function Ot(){return new Et(function(Vt,Ct){Tt(yt,It,Vt,Ct)})}return vt=vt?vt.then(Ot,Ot):Ot()}this._invoke=gt}Ye(ze.prototype),z(ze.prototype,xe,function(){return this}),ce.AsyncIterator=ze,ce.async=function(wt,Et,Tt,vt,gt){gt===void 0&&(gt=Promise);var yt=new ze(ee(wt,Et,Tt,vt),gt);return ce.isGeneratorFunction(Et)?yt:yt.next().then(function(It){return It.done?It.value:yt.next()})};function Ze(wt,Et,Tt){var vt=re;return function(yt,It){if(vt===ue)throw new Error("Generator is already running");if(vt===pe){if(yt==="throw")throw It;return ot()}for(Tt.method=yt,Tt.arg=It;;){var Ot=Tt.delegate;if(Ot){var Vt=at(Ot,Tt);if(Vt){if(Vt===Ee)continue;return Vt}}if(Tt.method==="next")Tt.sent=Tt._sent=Tt.arg;else if(Tt.method==="throw"){if(vt===re)throw vt=pe,Tt.arg;Tt.dispatchException(Tt.arg)}else Tt.method==="return"&&Tt.abrupt("return",Tt.arg);vt=ue;var Ct=ae(wt,Et,Tt);if(Ct.type==="normal"){if(vt=Tt.done?pe:le,Ct.arg===Ee)continue;return{value:Ct.arg,done:Tt.done}}else Ct.type==="throw"&&(vt=pe,Tt.method="throw",Tt.arg=Ct.arg)}}}function at(wt,Et){var Tt=wt.iterator[Et.method];if(Tt===ye){if(Et.delegate=null,Et.method==="throw"){if(wt.iterator.return&&(Et.method="return",Et.arg=ye,at(wt,Et),Et.method==="throw"))return Ee;Et.method="throw",Et.arg=new TypeError("The iterator does not provide a 'throw' method")}return Ee}var vt=ae(Tt,wt.iterator,Et.arg);if(vt.type==="throw")return Et.method="throw",Et.arg=vt.arg,Et.delegate=null,Ee;var gt=vt.arg;if(!gt)return Et.method="throw",Et.arg=new TypeError("iterator result is not an object"),Et.delegate=null,Ee;if(gt.done)Et[wt.resultName]=gt.value,Et.next=wt.nextLoc,Et.method!=="return"&&(Et.method="next",Et.arg=ye);else return gt;return Et.delegate=null,Ee}Ye(Re),z(Re,fe,"Generator"),z(Re,me,function(){return this}),z(Re,"toString",function(){return"[object Generator]"});function ht(wt){var Et={tryLoc:wt[0]};1 in wt&&(Et.catchLoc=wt[1]),2 in wt&&(Et.finallyLoc=wt[2],Et.afterLoc=wt[3]),this.tryEntries.push(Et)}function pt(wt){var Et=wt.completion||{};Et.type="normal",delete Et.arg,wt.completion=Et}function Mt(wt){this.tryEntries=[{tryLoc:"root"}],wt.forEach(ht,this),this.reset(!0)}ce.keys=function(wt){var Et=[];for(var Tt in wt)Et.push(Tt);return Et.reverse(),function vt(){for(;Et.length;){var gt=Et.pop();if(gt in wt)return vt.value=gt,vt.done=!1,vt}return vt.done=!0,vt}};function et(wt){if(wt){var Et=wt[me];if(Et)return Et.call(wt);if(typeof wt.next=="function")return wt;if(!isNaN(wt.length)){var Tt=-1,vt=function gt(){for(;++Tt<wt.length;)if(Ce.call(wt,Tt))return gt.value=wt[Tt],gt.done=!1,gt;return gt.value=ye,gt.done=!0,gt};return vt.next=vt}}return{next:ot}}ce.values=et;function ot(){return{value:ye,done:!0}}return Mt.prototype={constructor:Mt,reset:function(wt){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(pt),!wt)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 wt=this.tryEntries[0],Et=wt.completion;if(Et.type==="throw")throw Et.arg;return this.rval},dispatchException:function(wt){if(this.done)throw wt;var Et=this;function Tt(Vt,Ct){return yt.type="throw",yt.arg=wt,Et.next=Vt,Ct&&(Et.method="next",Et.arg=ye),!!Ct}for(var vt=this.tryEntries.length-1;vt>=0;--vt){var gt=this.tryEntries[vt],yt=gt.completion;if(gt.tryLoc==="root")return Tt("end");if(gt.tryLoc<=this.prev){var It=Ce.call(gt,"catchLoc"),Ot=Ce.call(gt,"finallyLoc");if(It&&Ot){if(this.prev<gt.catchLoc)return Tt(gt.catchLoc,!0);if(this.prev<gt.finallyLoc)return Tt(gt.finallyLoc)}else if(It){if(this.prev<gt.catchLoc)return Tt(gt.catchLoc,!0)}else if(Ot){if(this.prev<gt.finallyLoc)return Tt(gt.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(wt,Et){for(var Tt=this.tryEntries.length-1;Tt>=0;--Tt){var vt=this.tryEntries[Tt];if(vt.tryLoc<=this.prev&&Ce.call(vt,"finallyLoc")&&this.prev<vt.finallyLoc){var gt=vt;break}}gt&&(wt==="break"||wt==="continue")&>.tryLoc<=Et&&Et<=gt.finallyLoc&&(gt=null);var yt=gt?gt.completion:{};return yt.type=wt,yt.arg=Et,gt?(this.method="next",this.next=gt.finallyLoc,Ee):this.complete(yt)},complete:function(wt,Et){if(wt.type==="throw")throw wt.arg;return wt.type==="break"||wt.type==="continue"?this.next=wt.arg:wt.type==="return"?(this.rval=this.arg=wt.arg,this.method="return",this.next="end"):wt.type==="normal"&&Et&&(this.next=Et),Ee},finish:function(wt){for(var Et=this.tryEntries.length-1;Et>=0;--Et){var Tt=this.tryEntries[Et];if(Tt.finallyLoc===wt)return this.complete(Tt.completion,Tt.afterLoc),pt(Tt),Ee}},catch:function(wt){for(var Et=this.tryEntries.length-1;Et>=0;--Et){var Tt=this.tryEntries[Et];if(Tt.tryLoc===wt){var vt=Tt.completion;if(vt.type==="throw"){var gt=vt.arg;pt(Tt)}return gt}}throw new Error("illegal catch attempt")},delegateYield:function(wt,Et,Tt){return this.delegate={iterator:et(wt),resultName:Et,nextLoc:Tt},this.method==="next"&&(this.arg=ye),Ee}},ce}(typeof _e=="object"?_e.exports:{});try{regeneratorRuntime=ve}catch(ce){typeof globalThis=="object"?globalThis.regeneratorRuntime=ve:Function("r","regeneratorRuntime = r")(ve)}},{}],396:[function(ie,_e,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?_e.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,_e,je){(function(ve){(function(){(function(ce){ce.parser=function(mt,nt){return new Ce(mt,nt)},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(mt,nt){if(!(this instanceof Ce))return new Ce(mt,nt);var ft=this;we(ft),ft.q=ft.c="",ft.bufferCheckPosition=ce.MAX_BUFFER_LENGTH,ft.opt=nt||{},ft.opt.lowercase=ft.opt.lowercase||ft.opt.lowercasetags,ft.looseCase=ft.opt.lowercase?"toLowerCase":"toUpperCase",ft.tags=[],ft.closed=ft.closedRoot=ft.sawRoot=!1,ft.tag=ft.error=null,ft.strict=!!mt,ft.noscript=!!(mt||ft.opt.noscript),ft.state=ze.BEGIN,ft.strictEntities=ft.opt.strictEntities,ft.ENTITIES=ft.strictEntities?Object.create(ce.XML_ENTITIES):Object.create(ce.ENTITIES),ft.attribList=[],ft.opt.xmlns&&(ft.ns=Object.create(pe)),ft.trackPosition=ft.opt.position!==!1,ft.trackPosition&&(ft.position=ft.line=ft.column=0),at(ft,"onready")}Object.create||(Object.create=function(mt){function nt(){}nt.prototype=mt;var ft=new nt;return ft}),Object.keys||(Object.keys=function(mt){var nt=[];for(var ft in mt)mt.hasOwnProperty(ft)&&nt.push(ft);return nt});function ye(mt){for(var nt=Math.max(ce.MAX_BUFFER_LENGTH,10),ft=0,Xe=0,ut=be.length;Xe<ut;Xe++){var bt=mt[be[Xe]].length;if(bt>nt)switch(be[Xe]){case"textNode":pt(mt);break;case"cdata":ht(mt,"oncdata",mt.cdata),mt.cdata="";break;case"script":ht(mt,"onscript",mt.script),mt.script="";break;default:et(mt,"Max buffer length exceeded: "+be[Xe])}ft=Math.max(ft,bt)}var St=ce.MAX_BUFFER_LENGTH-ft;mt.bufferCheckPosition=St+mt.position}function we(mt){for(var nt=0,ft=be.length;nt<ft;nt++)mt[be[nt]]=""}function me(mt){pt(mt),mt.cdata!==""&&(ht(mt,"oncdata",mt.cdata),mt.cdata=""),mt.script!==""&&(ht(mt,"onscript",mt.script),mt.script="")}Ce.prototype={end:function(){ot(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(mt){xe=function(){}}var fe=ce.EVENTS.filter(function(mt){return mt!=="error"&&mt!=="end"});function z(mt,nt){return new ee(mt,nt)}function ee(mt,nt){if(!(this instanceof ee))return new ee(mt,nt);xe.apply(this),this._parser=new Ce(mt,nt),this.writable=!0,this.readable=!0;var ft=this;this._parser.onend=function(){ft.emit("end")},this._parser.onerror=function(Xe){ft.emit("error",Xe),ft._parser.error=null},this._decoder=null,fe.forEach(function(Xe){Object.defineProperty(ft,"on"+Xe,{get:function(){return ft._parser["on"+Xe]},set:function(ut){if(!ut)return ft.removeAllListeners(Xe),ft._parser["on"+Xe]=ut,ut;ft.on(Xe,ut)},enumerable:!0,configurable:!1})})}ee.prototype=Object.create(xe.prototype,{constructor:{value:ee}}),ee.prototype.write=function(mt){if(typeof ve=="function"&&typeof ve.isBuffer=="function"&&ve.isBuffer(mt)){if(!this._decoder){var nt=ie("string_decoder").StringDecoder;this._decoder=new nt("utf8")}mt=this._decoder.write(mt)}return this._parser.write(mt.toString()),this.emit("data",mt),!0},ee.prototype.end=function(mt){return mt&&mt.length&&this.write(mt),this._parser.end(),!0},ee.prototype.on=function(mt,nt){var ft=this;return!ft._parser["on"+mt]&&fe.indexOf(mt)!==-1&&(ft._parser["on"+mt]=function(){var Xe=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);Xe.splice(0,0,mt),ft.emit.apply(ft,Xe)}),xe.prototype.on.call(ft,mt,nt)};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 Ne(mt){return mt===" "||mt===`
|
|
|
`||mt==="\r"||mt===" "}function Oe(mt){return mt==='"'||mt==="'"}function Fe(mt){return mt===">"||Ne(mt)}function Re(mt,nt){return mt.test(nt)}function Ye(mt,nt){return!Re(mt,nt)}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(mt){var nt=ce.ENTITIES[mt],ft=typeof nt=="number"?String.fromCharCode(nt):nt;ce.ENTITIES[mt]=ft});for(var Ze in ce.STATE)ce.STATE[ce.STATE[Ze]]=Ze;ze=ce.STATE;function at(mt,nt,ft){mt[nt]&&mt[nt](ft)}function ht(mt,nt,ft){mt.textNode&&pt(mt),at(mt,nt,ft)}function pt(mt){mt.textNode=Mt(mt.opt,mt.textNode),mt.textNode&&at(mt,"ontext",mt.textNode),mt.textNode=""}function Mt(mt,nt){return mt.trim&&(nt=nt.trim()),mt.normalize&&(nt=nt.replace(/\s+/g," ")),nt}function et(mt,nt){return pt(mt),mt.trackPosition&&(nt+=`
|
|
|
Line: `+mt.line+`
|
|
|
Column: `+mt.column+`
|
|
|
Char: `+mt.c),nt=new Error(nt),mt.error=nt,at(mt,"onerror",nt),mt}function ot(mt){return mt.sawRoot&&!mt.closedRoot&&wt(mt,"Unclosed root tag"),mt.state!==ze.BEGIN&&mt.state!==ze.BEGIN_WHITESPACE&&mt.state!==ze.TEXT&&et(mt,"Unexpected end"),pt(mt),mt.c="",mt.closed=!0,at(mt,"onend"),Ce.call(mt,mt.strict,mt.opt),mt}function wt(mt,nt){if(typeof mt!="object"||!(mt instanceof Ce))throw new Error("bad call to strictFail");mt.strict&&et(mt,nt)}function Et(mt){mt.strict||(mt.tagName=mt.tagName[mt.looseCase]());var nt=mt.tags[mt.tags.length-1]||mt,ft=mt.tag={name:mt.tagName,attributes:{}};mt.opt.xmlns&&(ft.ns=nt.ns),mt.attribList.length=0,ht(mt,"onopentagstart",ft)}function Tt(mt,nt){var ft=mt.indexOf(":"),Xe=ft<0?["",mt]:mt.split(":"),ut=Xe[0],bt=Xe[1];return nt&&mt==="xmlns"&&(ut="xmlns",bt=""),{prefix:ut,local:bt}}function vt(mt){if(mt.strict||(mt.attribName=mt.attribName[mt.looseCase]()),mt.attribList.indexOf(mt.attribName)!==-1||mt.tag.attributes.hasOwnProperty(mt.attribName)){mt.attribName=mt.attribValue="";return}if(mt.opt.xmlns){var nt=Tt(mt.attribName,!0),ft=nt.prefix,Xe=nt.local;if(ft==="xmlns")if(Xe==="xml"&&mt.attribValue!==le)wt(mt,"xml: prefix must be bound to "+le+`
|
|
|
Actual: `+mt.attribValue);else if(Xe==="xmlns"&&mt.attribValue!==ue)wt(mt,"xmlns: prefix must be bound to "+ue+`
|
|
|
Actual: `+mt.attribValue);else{var ut=mt.tag,bt=mt.tags[mt.tags.length-1]||mt;ut.ns===bt.ns&&(ut.ns=Object.create(bt.ns)),ut.ns[Xe]=mt.attribValue}mt.attribList.push([mt.attribName,mt.attribValue])}else mt.tag.attributes[mt.attribName]=mt.attribValue,ht(mt,"onattribute",{name:mt.attribName,value:mt.attribValue});mt.attribName=mt.attribValue=""}function gt(mt,nt){if(mt.opt.xmlns){var ft=mt.tag,Xe=Tt(mt.tagName);ft.prefix=Xe.prefix,ft.local=Xe.local,ft.uri=ft.ns[Xe.prefix]||"",ft.prefix&&!ft.uri&&(wt(mt,"Unbound namespace prefix: "+JSON.stringify(mt.tagName)),ft.uri=Xe.prefix);var ut=mt.tags[mt.tags.length-1]||mt;ft.ns&&ut.ns!==ft.ns&&Object.keys(ft.ns).forEach(function(Ke){ht(mt,"onopennamespace",{prefix:Ke,uri:ft.ns[Ke]})});for(var bt=0,St=mt.attribList.length;bt<St;bt++){var lt=mt.attribList[bt],Qe=lt[0],Ue=lt[1],We=Tt(Qe,!0),qe=We.prefix,He=We.local,De=qe===""?"":ft.ns[qe]||"",Le={name:Qe,value:Ue,prefix:qe,local:He,uri:De};qe&&qe!=="xmlns"&&!De&&(wt(mt,"Unbound namespace prefix: "+JSON.stringify(qe)),Le.uri=qe),mt.tag.attributes[Qe]=Le,ht(mt,"onattribute",Le)}mt.attribList.length=0}mt.tag.isSelfClosing=!!nt,mt.sawRoot=!0,mt.tags.push(mt.tag),ht(mt,"onopentag",mt.tag),nt||(!mt.noscript&&mt.tagName.toLowerCase()==="script"?mt.state=ze.SCRIPT:mt.state=ze.TEXT,mt.tag=null,mt.tagName=""),mt.attribName=mt.attribValue="",mt.attribList.length=0}function yt(mt){if(!mt.tagName){wt(mt,"Weird empty close tag."),mt.textNode+="</>",mt.state=ze.TEXT;return}if(mt.script){if(mt.tagName!=="script"){mt.script+="</"+mt.tagName+">",mt.tagName="",mt.state=ze.SCRIPT;return}ht(mt,"onscript",mt.script),mt.script=""}var nt=mt.tags.length,ft=mt.tagName;mt.strict||(ft=ft[mt.looseCase]());for(var Xe=ft;nt--;){var ut=mt.tags[nt];if(ut.name!==Xe)wt(mt,"Unexpected close tag");else break}if(nt<0){wt(mt,"Unmatched closing tag: "+mt.tagName),mt.textNode+="</"+mt.tagName+">",mt.state=ze.TEXT;return}mt.tagName=ft;for(var bt=mt.tags.length;bt-- >nt;){var St=mt.tag=mt.tags.pop();mt.tagName=mt.tag.name,ht(mt,"onclosetag",mt.tagName);var lt={};for(var Qe in St.ns)lt[Qe]=St.ns[Qe];var Ue=mt.tags[mt.tags.length-1]||mt;mt.opt.xmlns&&St.ns!==Ue.ns&&Object.keys(St.ns).forEach(function(We){var qe=St.ns[We];ht(mt,"onclosenamespace",{prefix:We,uri:qe})})}nt===0&&(mt.closedRoot=!0),mt.tagName=mt.attribValue=mt.attribName="",mt.attribList.length=0,mt.state=ze.TEXT}function It(mt){var nt=mt.entity,ft=nt.toLowerCase(),Xe,ut="";return mt.ENTITIES[nt]?mt.ENTITIES[nt]:mt.ENTITIES[ft]?mt.ENTITIES[ft]:(nt=ft,nt.charAt(0)==="#"&&(nt.charAt(1)==="x"?(nt=nt.slice(2),Xe=parseInt(nt,16),ut=Xe.toString(16)):(nt=nt.slice(1),Xe=parseInt(nt,10),ut=Xe.toString(10))),nt=nt.replace(/^0+/,""),isNaN(Xe)||ut.toLowerCase()!==nt?(wt(mt,"Invalid character entity"),"&"+mt.entity+";"):String.fromCodePoint(Xe))}function Ot(mt,nt){nt==="<"?(mt.state=ze.OPEN_WAKA,mt.startTagPosition=mt.position):Ne(nt)||(wt(mt,"Non-whitespace before first tag."),mt.textNode=nt,mt.state=ze.TEXT)}function Vt(mt,nt){var ft="";return nt<mt.length&&(ft=mt.charAt(nt)),ft}function Ct(mt){var nt=this;if(this.error)throw this.error;if(nt.closed)return et(nt,"Cannot write after close. Assign an onready handler.");if(mt===null)return ot(nt);typeof mt=="object"&&(mt=mt.toString());for(var ft=0,Xe="";Xe=Vt(mt,ft++),nt.c=Xe,!!Xe;)switch(nt.trackPosition&&(nt.position++,Xe===`
|
|
|
`?(nt.line++,nt.column=0):nt.column++),nt.state){case ze.BEGIN:if(nt.state=ze.BEGIN_WHITESPACE,Xe==="\uFEFF")continue;Ot(nt,Xe);continue;case ze.BEGIN_WHITESPACE:Ot(nt,Xe);continue;case ze.TEXT:if(nt.sawRoot&&!nt.closedRoot){for(var ut=ft-1;Xe&&Xe!=="<"&&Xe!=="&";)Xe=Vt(mt,ft++),Xe&&nt.trackPosition&&(nt.position++,Xe===`
|
|
|
`?(nt.line++,nt.column=0):nt.column++);nt.textNode+=mt.substring(ut,ft-1)}Xe==="<"&&!(nt.sawRoot&&nt.closedRoot&&!nt.strict)?(nt.state=ze.OPEN_WAKA,nt.startTagPosition=nt.position):(!Ne(Xe)&&(!nt.sawRoot||nt.closedRoot)&&wt(nt,"Text data outside of root node."),Xe==="&"?nt.state=ze.TEXT_ENTITY:nt.textNode+=Xe);continue;case ze.SCRIPT:Xe==="<"?nt.state=ze.SCRIPT_ENDING:nt.script+=Xe;continue;case ze.SCRIPT_ENDING:Xe==="/"?nt.state=ze.CLOSE_TAG:(nt.script+="<"+Xe,nt.state=ze.SCRIPT);continue;case ze.OPEN_WAKA:if(Xe==="!")nt.state=ze.SGML_DECL,nt.sgmlDecl="";else if(!Ne(Xe))if(Re(Ee,Xe))nt.state=ze.OPEN_TAG,nt.tagName=Xe;else if(Xe==="/")nt.state=ze.CLOSE_TAG,nt.tagName="";else if(Xe==="?")nt.state=ze.PROC_INST,nt.procInstName=nt.procInstBody="";else{if(wt(nt,"Unencoded <"),nt.startTagPosition+1<nt.position){var bt=nt.position-nt.startTagPosition;Xe=new Array(bt).join(" ")+Xe}nt.textNode+="<"+Xe,nt.state=ze.TEXT}continue;case ze.SGML_DECL:(nt.sgmlDecl+Xe).toUpperCase()===ae?(ht(nt,"onopencdata"),nt.state=ze.CDATA,nt.sgmlDecl="",nt.cdata=""):nt.sgmlDecl+Xe==="--"?(nt.state=ze.COMMENT,nt.comment="",nt.sgmlDecl=""):(nt.sgmlDecl+Xe).toUpperCase()===re?(nt.state=ze.DOCTYPE,(nt.doctype||nt.sawRoot)&&wt(nt,"Inappropriately located doctype declaration"),nt.doctype="",nt.sgmlDecl=""):Xe===">"?(ht(nt,"onsgmldeclaration",nt.sgmlDecl),nt.sgmlDecl="",nt.state=ze.TEXT):(Oe(Xe)&&(nt.state=ze.SGML_DECL_QUOTED),nt.sgmlDecl+=Xe);continue;case ze.SGML_DECL_QUOTED:Xe===nt.q&&(nt.state=ze.SGML_DECL,nt.q=""),nt.sgmlDecl+=Xe;continue;case ze.DOCTYPE:Xe===">"?(nt.state=ze.TEXT,ht(nt,"ondoctype",nt.doctype),nt.doctype=!0):(nt.doctype+=Xe,Xe==="["?nt.state=ze.DOCTYPE_DTD:Oe(Xe)&&(nt.state=ze.DOCTYPE_QUOTED,nt.q=Xe));continue;case ze.DOCTYPE_QUOTED:nt.doctype+=Xe,Xe===nt.q&&(nt.q="",nt.state=ze.DOCTYPE);continue;case ze.DOCTYPE_DTD:nt.doctype+=Xe,Xe==="]"?nt.state=ze.DOCTYPE:Oe(Xe)&&(nt.state=ze.DOCTYPE_DTD_QUOTED,nt.q=Xe);continue;case ze.DOCTYPE_DTD_QUOTED:nt.doctype+=Xe,Xe===nt.q&&(nt.state=ze.DOCTYPE_DTD,nt.q="");continue;case ze.COMMENT:Xe==="-"?nt.state=ze.COMMENT_ENDING:nt.comment+=Xe;continue;case ze.COMMENT_ENDING:Xe==="-"?(nt.state=ze.COMMENT_ENDED,nt.comment=Mt(nt.opt,nt.comment),nt.comment&&ht(nt,"oncomment",nt.comment),nt.comment=""):(nt.comment+="-"+Xe,nt.state=ze.COMMENT);continue;case ze.COMMENT_ENDED:Xe!==">"?(wt(nt,"Malformed comment"),nt.comment+="--"+Xe,nt.state=ze.COMMENT):nt.state=ze.TEXT;continue;case ze.CDATA:Xe==="]"?nt.state=ze.CDATA_ENDING:nt.cdata+=Xe;continue;case ze.CDATA_ENDING:Xe==="]"?nt.state=ze.CDATA_ENDING_2:(nt.cdata+="]"+Xe,nt.state=ze.CDATA);continue;case ze.CDATA_ENDING_2:Xe===">"?(nt.cdata&&ht(nt,"oncdata",nt.cdata),ht(nt,"onclosecdata"),nt.cdata="",nt.state=ze.TEXT):Xe==="]"?nt.cdata+="]":(nt.cdata+="]]"+Xe,nt.state=ze.CDATA);continue;case ze.PROC_INST:Xe==="?"?nt.state=ze.PROC_INST_ENDING:Ne(Xe)?nt.state=ze.PROC_INST_BODY:nt.procInstName+=Xe;continue;case ze.PROC_INST_BODY:if(!nt.procInstBody&&Ne(Xe))continue;Xe==="?"?nt.state=ze.PROC_INST_ENDING:nt.procInstBody+=Xe;continue;case ze.PROC_INST_ENDING:Xe===">"?(ht(nt,"onprocessinginstruction",{name:nt.procInstName,body:nt.procInstBody}),nt.procInstName=nt.procInstBody="",nt.state=ze.TEXT):(nt.procInstBody+="?"+Xe,nt.state=ze.PROC_INST_BODY);continue;case ze.OPEN_TAG:Re(Pe,Xe)?nt.tagName+=Xe:(Et(nt),Xe===">"?gt(nt):Xe==="/"?nt.state=ze.OPEN_TAG_SLASH:(Ne(Xe)||wt(nt,"Invalid character in tag name"),nt.state=ze.ATTRIB));continue;case ze.OPEN_TAG_SLASH:Xe===">"?(gt(nt,!0),yt(nt)):(wt(nt,"Forward-slash in opening tag not followed by >"),nt.state=ze.ATTRIB);continue;case ze.ATTRIB:if(Ne(Xe))continue;Xe===">"?gt(nt):Xe==="/"?nt.state=ze.OPEN_TAG_SLASH:Re(Ee,Xe)?(nt.attribName=Xe,nt.attribValue="",nt.state=ze.ATTRIB_NAME):wt(nt,"Invalid attribute name");continue;case ze.ATTRIB_NAME:Xe==="="?nt.state=ze.ATTRIB_VALUE:Xe===">"?(wt(nt,"Attribute without value"),nt.attribValue=nt.attribName,vt(nt),gt(nt)):Ne(Xe)?nt.state=ze.ATTRIB_NAME_SAW_WHITE:Re(Pe,Xe)?nt.attribName+=Xe:wt(nt,"Invalid attribute name");continue;case ze.ATTRIB_NAME_SAW_WHITE:if(Xe==="=")nt.state=ze.ATTRIB_VALUE;else{if(Ne(Xe))continue;wt(nt,"Attribute without value"),nt.tag.attributes[nt.attribName]="",nt.attribValue="",ht(nt,"onattribute",{name:nt.attribName,value:""}),nt.attribName="",Xe===">"?gt(nt):Re(Ee,Xe)?(nt.attribName=Xe,nt.state=ze.ATTRIB_NAME):(wt(nt,"Invalid attribute name"),nt.state=ze.ATTRIB)}continue;case ze.ATTRIB_VALUE:if(Ne(Xe))continue;Oe(Xe)?(nt.q=Xe,nt.state=ze.ATTRIB_VALUE_QUOTED):(wt(nt,"Unquoted attribute value"),nt.state=ze.ATTRIB_VALUE_UNQUOTED,nt.attribValue=Xe);continue;case ze.ATTRIB_VALUE_QUOTED:if(Xe!==nt.q){Xe==="&"?nt.state=ze.ATTRIB_VALUE_ENTITY_Q:nt.attribValue+=Xe;continue}vt(nt),nt.q="",nt.state=ze.ATTRIB_VALUE_CLOSED;continue;case ze.ATTRIB_VALUE_CLOSED:Ne(Xe)?nt.state=ze.ATTRIB:Xe===">"?gt(nt):Xe==="/"?nt.state=ze.OPEN_TAG_SLASH:Re(Ee,Xe)?(wt(nt,"No whitespace between attributes"),nt.attribName=Xe,nt.attribValue="",nt.state=ze.ATTRIB_NAME):wt(nt,"Invalid attribute name");continue;case ze.ATTRIB_VALUE_UNQUOTED:if(!Fe(Xe)){Xe==="&"?nt.state=ze.ATTRIB_VALUE_ENTITY_U:nt.attribValue+=Xe;continue}vt(nt),Xe===">"?gt(nt):nt.state=ze.ATTRIB;continue;case ze.CLOSE_TAG:if(nt.tagName)Xe===">"?yt(nt):Re(Pe,Xe)?nt.tagName+=Xe:nt.script?(nt.script+="</"+nt.tagName,nt.tagName="",nt.state=ze.SCRIPT):(Ne(Xe)||wt(nt,"Invalid tagname in closing tag"),nt.state=ze.CLOSE_TAG_SAW_WHITE);else{if(Ne(Xe))continue;Ye(Ee,Xe)?nt.script?(nt.script+="</"+Xe,nt.state=ze.SCRIPT):wt(nt,"Invalid tagname in closing tag."):nt.tagName=Xe}continue;case ze.CLOSE_TAG_SAW_WHITE:if(Ne(Xe))continue;Xe===">"?yt(nt):wt(nt,"Invalid characters in closing tag");continue;case ze.TEXT_ENTITY:case ze.ATTRIB_VALUE_ENTITY_Q:case ze.ATTRIB_VALUE_ENTITY_U:var St,lt;switch(nt.state){case ze.TEXT_ENTITY:St=ze.TEXT,lt="textNode";break;case ze.ATTRIB_VALUE_ENTITY_Q:St=ze.ATTRIB_VALUE_QUOTED,lt="attribValue";break;case ze.ATTRIB_VALUE_ENTITY_U:St=ze.ATTRIB_VALUE_UNQUOTED,lt="attribValue";break}Xe===";"?(nt[lt]+=It(nt),nt.entity="",nt.state=St):Re(nt.entity.length?ke:Ie,Xe)?nt.entity+=Xe:(wt(nt,"Invalid character in entity name"),nt[lt]+="&"+nt.entity+Xe,nt.entity="",nt.state=St);continue;default:throw new Error(nt,"Unknown state: "+nt.state)}return nt.position>=nt.bufferCheckPosition&&ye(nt),nt}String.fromCodePoint||function(){var mt=String.fromCharCode,nt=Math.floor,ft=function(){var Xe=16384,ut=[],bt,St,lt=-1,Qe=arguments.length;if(!Qe)return"";for(var Ue="";++lt<Qe;){var We=Number(arguments[lt]);if(!isFinite(We)||We<0||We>1114111||nt(We)!==We)throw RangeError("Invalid code point: "+We);We<=65535?ut.push(We):(We-=65536,bt=(We>>10)+55296,St=We%1024+56320,ut.push(bt,St)),(lt+1===Qe||ut.length>Xe)&&(Ue+=mt.apply(null,ut),ut.length=0)}return Ue};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:ft,configurable:!0,writable:!0}):String.fromCodePoint=ft}()})(typeof je=="undefined"?this.sax={}:je)}).call(this)}).call(this,ie("buffer").Buffer)},{buffer:90,stream:398,string_decoder:413}],398:[function(ie,_e,je){_e.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,_e,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"),_e.exports.codes=ce},{}],400:[function(ie,_e,je){(function(ve){(function(){"use strict";var ce=Object.keys||function(ee){var ae=[];for(var re in ee)ae.push(re);return ae};_e.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,_e,je){"use strict";_e.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,_e,je){(function(ve,ce){(function(){"use strict";_e.exports=ht;var be;ht.ReadableState=at;var Ce=ie("events").EventEmitter,ye=function(Qe,Ue){return Qe.listeners(Ue).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,Ne=Ee.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Oe,Fe,Re;ie("inherits")(ht,we);var Ye=le.errorOrDestroy,ze=["error","close","destroy","pause","resume"];function Ze(lt,Qe,Ue){if(typeof lt.prependListener=="function")return lt.prependListener(Qe,Ue);!lt._events||!lt._events[Qe]?lt.on(Qe,Ue):Array.isArray(lt._events[Qe])?lt._events[Qe].unshift(Ue):lt._events[Qe]=[Ue,lt._events[Qe]]}function at(lt,Qe,Ue){be=be||ie("./_stream_duplex"),lt=lt||{},typeof Ue!="boolean"&&(Ue=Qe instanceof be),this.objectMode=!!lt.objectMode,Ue&&(this.objectMode=this.objectMode||!!lt.readableObjectMode),this.highWaterMark=pe(this,lt,"readableHighWaterMark",Ue),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 at(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 Ue=this._readableState,We;return Ue.objectMode?We=!0:typeof lt=="string"&&(Qe=Qe||Ue.defaultEncoding,Qe!==Ue.encoding&&(lt=me.from(lt,Qe),Qe=""),We=!0),pt(this,lt,Qe,!1,We)},ht.prototype.unshift=function(lt){return pt(this,lt,null,!0,!1)};function pt(lt,Qe,Ue,We,qe){ae("readableAddChunk",Qe);var He=lt._readableState;if(Qe===null)He.reading=!1,Tt(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)),We)He.endEmitted?Ye(lt,new Ne):Mt(lt,He,Qe,!0);else if(He.ended)Ye(lt,new Ie);else{if(He.destroyed)return!1;He.reading=!1,He.decoder&&!Ue?(Qe=He.decoder.write(Qe),He.objectMode||Qe.length!==0?Mt(lt,He,Qe,!1):yt(lt,He)):Mt(lt,He,Qe,!1)}else We||(He.reading=!1,yt(lt,He))}return!He.ended&&(He.length<He.highWaterMark||He.length===0)}function Mt(lt,Qe,Ue,We){Qe.flowing&&Qe.length===0&&!Qe.sync?(Qe.awaitDrain=0,lt.emit("data",Ue)):(Qe.length+=Qe.objectMode?1:Ue.length,We?Qe.buffer.unshift(Ue):Qe.buffer.push(Ue),Qe.needReadable&&vt(lt)),yt(lt,Qe)}function et(lt,Qe){var Ue;return!z(Qe)&&typeof Qe!="string"&&Qe!==void 0&&!lt.objectMode&&(Ue=new Pe("chunk",["string","Buffer","Uint8Array"],Qe)),Ue}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 Ue=this._readableState.buffer.head,We="";Ue!==null;)We+=Qe.write(Ue.data),Ue=Ue.next;return this._readableState.buffer.clear(),We!==""&&this._readableState.buffer.push(We),this._readableState.length=We.length,this};var ot=1073741824;function wt(lt){return lt>=ot?lt=ot:(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=wt(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,Ue=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):vt(this),null;if(lt=Et(lt,Qe),lt===0&&Qe.ended)return Qe.length===0&&ut(this),null;var We=Qe.needReadable;ae("need readable",We),(Qe.length===0||Qe.length-lt<Qe.highWaterMark)&&(We=!0,ae("length less than watermark",We)),Qe.ended||Qe.reading?(We=!1,ae("reading or ended",We)):We&&(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(Ue,Qe)));var qe;return lt>0?qe=Xe(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),Ue!==lt&&Qe.ended&&ut(this)),qe!==null&&this.emit("data",qe),qe};function Tt(lt,Qe){if(ae("onEofChunk"),!Qe.ended){if(Qe.decoder){var Ue=Qe.decoder.end();Ue&&Ue.length&&(Qe.buffer.push(Ue),Qe.length+=Qe.objectMode?1:Ue.length)}Qe.ended=!0,Qe.sync?vt(lt):(Qe.needReadable=!1,Qe.emittedReadable||(Qe.emittedReadable=!0,gt(lt)))}}function vt(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(gt,lt))}function gt(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,ft(lt)}function yt(lt,Qe){Qe.readingMore||(Qe.readingMore=!0,ve.nextTick(It,lt,Qe))}function It(lt,Qe){for(;!Qe.reading&&!Qe.ended&&(Qe.length<Qe.highWaterMark||Qe.flowing&&Qe.length===0);){var Ue=Qe.length;if(ae("maybeReadMore read 0"),lt.read(0),Ue===Qe.length)break}Qe.readingMore=!1}ht.prototype._read=function(lt){Ye(this,new ke("_read()"))},ht.prototype.pipe=function(lt,Qe){var Ue=this,We=this._readableState;switch(We.pipesCount){case 0:We.pipes=lt;break;case 1:We.pipes=[We.pipes,lt];break;default:We.pipes.push(lt);break}We.pipesCount+=1,ae("pipe count=%d opts=%j",We.pipesCount,Qe);var qe=(!Qe||Qe.end!==!1)&<!==ve.stdout&<!==ve.stderr,He=qe?Le:Nt;We.endEmitted?ve.nextTick(He):Ue.once("end",He),lt.on("unpipe",De);function De(qt,on){ae("onunpipe"),qt===Ue&&on&&on.hasUnpiped===!1&&(on.hasUnpiped=!0,Ve())}function Le(){ae("onend"),lt.end()}var Ke=Ot(Ue);lt.on("drain",Ke);var dt=!1;function Ve(){ae("cleanup"),lt.removeListener("close",Xt),lt.removeListener("finish",At),lt.removeListener("drain",Ke),lt.removeListener("error",zt),lt.removeListener("unpipe",De),Ue.removeListener("end",Le),Ue.removeListener("end",Nt),Ue.removeListener("data",kt),dt=!0,We.awaitDrain&&(!lt._writableState||lt._writableState.needDrain)&&Ke()}Ue.on("data",kt);function kt(qt){ae("ondata");var on=lt.write(qt);ae("dest.write",on),on===!1&&((We.pipesCount===1&&We.pipes===lt||We.pipesCount>1&&St(We.pipes,lt)!==-1)&&!dt&&(ae("false write response, pause",We.awaitDrain),We.awaitDrain++),Ue.pause())}function zt(qt){ae("onerror",qt),Nt(),lt.removeListener("error",zt),ye(lt,"error")===0&&Ye(lt,qt)}Ze(lt,"error",zt);function Xt(){lt.removeListener("finish",At),Nt()}lt.once("close",Xt);function At(){ae("onfinish"),lt.removeListener("close",Xt),Nt()}lt.once("finish",At);function Nt(){ae("unpipe"),Ue.unpipe(lt)}return lt.emit("pipe",Ue),We.flowing||(ae("pipe resume"),Ue.resume()),lt};function Ot(lt){return function(){var Ue=lt._readableState;ae("pipeOnDrain",Ue.awaitDrain),Ue.awaitDrain&&Ue.awaitDrain--,Ue.awaitDrain===0&&ye(lt,"data")&&(Ue.flowing=!0,ft(lt))}}ht.prototype.unpipe=function(lt){var Qe=this._readableState,Ue={hasUnpiped:!1};if(Qe.pipesCount===0)return this;if(Qe.pipesCount===1)return lt&<!==Qe.pipes?this:(lt||(lt=Qe.pipes),Qe.pipes=null,Qe.pipesCount=0,Qe.flowing=!1,lt&<.emit("unpipe",this,Ue),this);if(!lt){var We=Qe.pipes,qe=Qe.pipesCount;Qe.pipes=null,Qe.pipesCount=0,Qe.flowing=!1;for(var He=0;He<qe;He++)We[He].emit("unpipe",this,{hasUnpiped:!1});return this}var De=St(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,Ue),this)},ht.prototype.on=function(lt,Qe){var Ue=we.prototype.on.call(this,lt,Qe),We=this._readableState;return lt==="data"?(We.readableListening=this.listenerCount("readable")>0,We.flowing!==!1&&this.resume()):lt==="readable"&&!We.endEmitted&&!We.readableListening&&(We.readableListening=We.needReadable=!0,We.flowing=!1,We.emittedReadable=!1,ae("on readable",We.length,We.reading),We.length?vt(this):We.reading||ve.nextTick(Ct,this)),Ue},ht.prototype.addListener=ht.prototype.on,ht.prototype.removeListener=function(lt,Qe){var Ue=we.prototype.removeListener.call(this,lt,Qe);return lt==="readable"&&ve.nextTick(Vt,this),Ue},ht.prototype.removeAllListeners=function(lt){var Qe=we.prototype.removeAllListeners.apply(this,arguments);return(lt==="readable"||lt===void 0)&&ve.nextTick(Vt,this),Qe};function Vt(lt){var Qe=lt._readableState;Qe.readableListening=lt.listenerCount("readable")>0,Qe.resumeScheduled&&!Qe.paused?Qe.flowing=!0:lt.listenerCount("data")>0&<.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,mt(this,lt)),lt.paused=!1,this};function mt(lt,Qe){Qe.resumeScheduled||(Qe.resumeScheduled=!0,ve.nextTick(nt,lt,Qe))}function nt(lt,Qe){ae("resume",Qe.reading),Qe.reading||lt.read(0),Qe.resumeScheduled=!1,lt.emit("resume"),ft(lt),Qe.flowing&&!Qe.reading&<.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 ft(lt){var Qe=lt._readableState;for(ae("flow",Qe.flowing);Qe.flowing&<.read()!==null;);}ht.prototype.wrap=function(lt){var Qe=this,Ue=this._readableState,We=!1;lt.on("end",function(){if(ae("wrapped end"),Ue.decoder&&!Ue.ended){var De=Ue.decoder.end();De&&De.length&&Qe.push(De)}Qe.push(null)}),lt.on("data",function(De){if(ae("wrapped data"),Ue.decoder&&(De=Ue.decoder.write(De)),!(Ue.objectMode&&De==null)&&!(!Ue.objectMode&&(!De||!De.length))){var Le=Qe.push(De);Le||(We=!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),We&&(We=!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=Xe,Object.defineProperty(ht.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Xe(lt,Qe){if(Qe.length===0)return null;var Ue;return Qe.objectMode?Ue=Qe.buffer.shift():!lt||lt>=Qe.length?(Qe.decoder?Ue=Qe.buffer.join(""):Qe.buffer.length===1?Ue=Qe.buffer.first():Ue=Qe.buffer.concat(Qe.length),Qe.buffer.clear()):Ue=Qe.buffer.consume(lt,Qe.decoder),Ue}function ut(lt){var Qe=lt._readableState;ae("endReadable",Qe.endEmitted),Qe.endEmitted||(Qe.ended=!0,ve.nextTick(bt,Qe,lt))}function bt(lt,Qe){if(ae("endReadableNT",lt.endEmitted,lt.length),!lt.endEmitted&<.length===0&&(lt.endEmitted=!0,Qe.readable=!1,Qe.emit("end"),lt.autoDestroy)){var Ue=Qe._writableState;(!Ue||Ue.autoDestroy&&Ue.finished)&&Qe.destroy()}}typeof Symbol=="function"&&(ht.from=function(lt,Qe){return Re===void 0&&(Re=ie("./internal/streams/from")),Re(ht,lt,Qe)});function St(lt,Qe){for(var Ue=0,We=lt.length;Ue<We;Ue++)if(lt[Ue]===Qe)return Ue;return-1}}).call(this)}).call(this,ie("_process"),typeof an!="undefined"?an: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,_e,je){"use strict";_e.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,_e,je){(function(ve,ce){(function(){"use strict";_e.exports=at;function be(ft,Xe,ut){this.chunk=ft,this.encoding=Xe,this.callback=ut,this.next=null}function Ce(ft){var Xe=this;this.next=null,this.entry=null,this.finish=function(){nt(Xe,ft)}}var ye;at.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(ft){return xe.from(ft)}function ee(ft){return xe.isBuffer(ft)||ft 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,Ne=ue.ERR_STREAM_NULL_VALUES,Oe=ue.ERR_STREAM_WRITE_AFTER_END,Fe=ue.ERR_UNKNOWN_ENCODING,Re=ae.errorOrDestroy;ie("inherits")(at,me);function Ye(){}function ze(ft,Xe,ut){ye=ye||ie("./_stream_duplex"),ft=ft||{},typeof ut!="boolean"&&(ut=Xe instanceof ye),this.objectMode=!!ft.objectMode,ut&&(this.objectMode=this.objectMode||!!ft.writableObjectMode),this.highWaterMark=le(this,ft,"writableHighWaterMark",ut),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var bt=ft.decodeStrings===!1;this.decodeStrings=!bt,this.defaultEncoding=ft.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(St){Tt(Xe,St)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=ft.emitClose!==!1,this.autoDestroy=!!ft.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Ce(this)}ze.prototype.getBuffer=function(){for(var Xe=this.bufferedRequest,ut=[];Xe;)ut.push(Xe),Xe=Xe.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(ft){}}();var Ze;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Ze=Function.prototype[Symbol.hasInstance],Object.defineProperty(at,Symbol.hasInstance,{value:function(Xe){return Ze.call(this,Xe)?!0:this!==at?!1:Xe&&Xe._writableState instanceof ze}})):Ze=function(Xe){return Xe instanceof this};function at(ft){ye=ye||ie("./_stream_duplex");var Xe=this instanceof ye;if(!Xe&&!Ze.call(at,this))return new at(ft);this._writableState=new ze(ft,this,Xe),this.writable=!0,ft&&(typeof ft.write=="function"&&(this._write=ft.write),typeof ft.writev=="function"&&(this._writev=ft.writev),typeof ft.destroy=="function"&&(this._destroy=ft.destroy),typeof ft.final=="function"&&(this._final=ft.final)),me.call(this)}at.prototype.pipe=function(){Re(this,new Ie)};function ht(ft,Xe){var ut=new Oe;Re(ft,ut),ve.nextTick(Xe,ut)}function pt(ft,Xe,ut,bt){var St;return ut===null?St=new Ne:typeof ut!="string"&&!Xe.objectMode&&(St=new pe("chunk",["string","Buffer"],ut)),St?(Re(ft,St),ve.nextTick(bt,St),!1):!0}at.prototype.write=function(ft,Xe,ut){var bt=this._writableState,St=!1,lt=!bt.objectMode&&ee(ft);return lt&&!xe.isBuffer(ft)&&(ft=z(ft)),typeof Xe=="function"&&(ut=Xe,Xe=null),lt?Xe="buffer":Xe||(Xe=bt.defaultEncoding),typeof ut!="function"&&(ut=Ye),bt.ending?ht(this,ut):(lt||pt(this,bt,ft,ut))&&(bt.pendingcb++,St=et(this,bt,lt,ft,Xe,ut)),St},at.prototype.cork=function(){this._writableState.corked++},at.prototype.uncork=function(){var ft=this._writableState;ft.corked&&(ft.corked--,!ft.writing&&!ft.corked&&!ft.bufferProcessing&&ft.bufferedRequest&&yt(this,ft))},at.prototype.setDefaultEncoding=function(Xe){if(typeof Xe=="string"&&(Xe=Xe.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Xe+"").toLowerCase())>-1))throw new Fe(Xe);return this._writableState.defaultEncoding=Xe,this},Object.defineProperty(at.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Mt(ft,Xe,ut){return!ft.objectMode&&ft.decodeStrings!==!1&&typeof Xe=="string"&&(Xe=xe.from(Xe,ut)),Xe}Object.defineProperty(at.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function et(ft,Xe,ut,bt,St,lt){if(!ut){var Qe=Mt(Xe,bt,St);bt!==Qe&&(ut=!0,St="buffer",bt=Qe)}var Ue=Xe.objectMode?1:bt.length;Xe.length+=Ue;var We=Xe.length<Xe.highWaterMark;if(We||(Xe.needDrain=!0),Xe.writing||Xe.corked){var qe=Xe.lastBufferedRequest;Xe.lastBufferedRequest={chunk:bt,encoding:St,isBuf:ut,callback:lt,next:null},qe?qe.next=Xe.lastBufferedRequest:Xe.bufferedRequest=Xe.lastBufferedRequest,Xe.bufferedRequestCount+=1}else ot(ft,Xe,!1,Ue,bt,St,lt);return We}function ot(ft,Xe,ut,bt,St,lt,Qe){Xe.writelen=bt,Xe.writecb=Qe,Xe.writing=!0,Xe.sync=!0,Xe.destroyed?Xe.onwrite(new ke("write")):ut?ft._writev(St,Xe.onwrite):ft._write(St,lt,Xe.onwrite),Xe.sync=!1}function wt(ft,Xe,ut,bt,St){--Xe.pendingcb,ut?(ve.nextTick(St,bt),ve.nextTick(Ct,ft,Xe),ft._writableState.errorEmitted=!0,Re(ft,bt)):(St(bt),ft._writableState.errorEmitted=!0,Re(ft,bt),Ct(ft,Xe))}function Et(ft){ft.writing=!1,ft.writecb=null,ft.length-=ft.writelen,ft.writelen=0}function Tt(ft,Xe){var ut=ft._writableState,bt=ut.sync,St=ut.writecb;if(typeof St!="function")throw new Pe;if(Et(ut),Xe)wt(ft,ut,bt,Xe,St);else{var lt=It(ut)||ft.destroyed;!lt&&!ut.corked&&!ut.bufferProcessing&&ut.bufferedRequest&&yt(ft,ut),bt?ve.nextTick(vt,ft,ut,lt,St):vt(ft,ut,lt,St)}}function vt(ft,Xe,ut,bt){ut||gt(ft,Xe),Xe.pendingcb--,bt(),Ct(ft,Xe)}function gt(ft,Xe){Xe.length===0&&Xe.needDrain&&(Xe.needDrain=!1,ft.emit("drain"))}function yt(ft,Xe){Xe.bufferProcessing=!0;var ut=Xe.bufferedRequest;if(ft._writev&&ut&&ut.next){var bt=Xe.bufferedRequestCount,St=new Array(bt),lt=Xe.corkedRequestsFree;lt.entry=ut;for(var Qe=0,Ue=!0;ut;)St[Qe]=ut,ut.isBuf||(Ue=!1),ut=ut.next,Qe+=1;St.allBuffers=Ue,ot(ft,Xe,!0,Xe.length,St,"",lt.finish),Xe.pendingcb++,Xe.lastBufferedRequest=null,lt.next?(Xe.corkedRequestsFree=lt.next,lt.next=null):Xe.corkedRequestsFree=new Ce(Xe),Xe.bufferedRequestCount=0}else{for(;ut;){var We=ut.chunk,qe=ut.encoding,He=ut.callback,De=Xe.objectMode?1:We.length;if(ot(ft,Xe,!1,De,We,qe,He),ut=ut.next,Xe.bufferedRequestCount--,Xe.writing)break}ut===null&&(Xe.lastBufferedRequest=null)}Xe.bufferedRequest=ut,Xe.bufferProcessing=!1}at.prototype._write=function(ft,Xe,ut){ut(new Ee("_write()"))},at.prototype._writev=null,at.prototype.end=function(ft,Xe,ut){var bt=this._writableState;return typeof ft=="function"?(ut=ft,ft=null,Xe=null):typeof Xe=="function"&&(ut=Xe,Xe=null),ft!=null&&this.write(ft,Xe),bt.corked&&(bt.corked=1,this.uncork()),bt.ending||mt(this,bt,ut),this},Object.defineProperty(at.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function It(ft){return ft.ending&&ft.length===0&&ft.bufferedRequest===null&&!ft.finished&&!ft.writing}function Ot(ft,Xe){ft._final(function(ut){Xe.pendingcb--,ut&&Re(ft,ut),Xe.prefinished=!0,ft.emit("prefinish"),Ct(ft,Xe)})}function Vt(ft,Xe){!Xe.prefinished&&!Xe.finalCalled&&(typeof ft._final=="function"&&!Xe.destroyed?(Xe.pendingcb++,Xe.finalCalled=!0,ve.nextTick(Ot,ft,Xe)):(Xe.prefinished=!0,ft.emit("prefinish")))}function Ct(ft,Xe){var ut=It(Xe);if(ut&&(Vt(ft,Xe),Xe.pendingcb===0&&(Xe.finished=!0,ft.emit("finish"),Xe.autoDestroy))){var bt=ft._readableState;(!bt||bt.autoDestroy&&bt.endEmitted)&&ft.destroy()}return ut}function mt(ft,Xe,ut){Xe.ending=!0,Ct(ft,Xe),ut&&(Xe.finished?ve.nextTick(ut):ft.once("finish",ut)),Xe.ended=!0,ft.writable=!1}function nt(ft,Xe,ut){var bt=ft.entry;for(ft.entry=null;bt;){var St=bt.callback;Xe.pendingcb--,St(ut),bt=bt.next}Xe.corkedRequestsFree.next=ft}Object.defineProperty(at.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(Xe){this._writableState&&(this._writableState.destroyed=Xe)}}),at.prototype.destroy=ae.destroy,at.prototype._undestroy=ae.undestroy,at.prototype._destroy=function(ft,Xe){Xe(ft)}}).call(this)}).call(this,ie("_process"),typeof an!="undefined"?an: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,_e,je){(function(ve){(function(){"use strict";var ce;function be(Ne,Oe,Fe){return Oe=Ce(Oe),Oe in Ne?Object.defineProperty(Ne,Oe,{value:Fe,enumerable:!0,configurable:!0,writable:!0}):Ne[Oe]=Fe,Ne}function Ce(Ne){var Oe=ye(Ne,"string");return typeof Oe=="symbol"?Oe:String(Oe)}function ye(Ne,Oe){if(typeof Ne!="object"||Ne===null)return Ne;var Fe=Ne[Symbol.toPrimitive];if(Fe!==void 0){var Re=Fe.call(Ne,Oe||"default");if(typeof Re!="object")return Re;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Oe==="string"?String:Number)(Ne)}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(Ne,Oe){return{value:Ne,done:Oe}}function ue(Ne){var Oe=Ne[me];if(Oe!==null){var Fe=Ne[re].read();Fe!==null&&(Ne[ee]=null,Ne[me]=null,Ne[xe]=null,Oe(le(Fe,!1)))}}function pe(Ne){ve.nextTick(ue,Ne)}function Ee(Ne,Oe){return function(Fe,Re){Ne.then(function(){if(Oe[z]){Fe(le(void 0,!0));return}Oe[ae](Fe,Re)},Re)}}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(Ze,at){ve.nextTick(function(){Oe[fe]?at(Oe[fe]):Ze(le(void 0,!0))})});var Re=this[ee],Ye;if(Re)Ye=new Promise(Ee(Re,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,Re){Oe[re].destroy(null,function(Ye){if(Ye){Re(Ye);return}Fe(le(void 0,!0))})})}),ce),Pe),ke=function(Oe){var Fe,Re=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,Ze){var at=Re[re].read();at?(Re[ee]=null,Re[me]=null,Re[xe]=null,ze(le(at,!1))):(Re[me]=ze,Re[xe]=Ze)},writable:!0}),Fe));return Re[ee]=null,we(Oe,function(Ye){if(Ye&&Ye.code!=="ERR_STREAM_PREMATURE_CLOSE"){var ze=Re[xe];ze!==null&&(Re[ee]=null,Re[me]=null,Re[xe]=null,ze(Ye)),Re[fe]=Ye;return}var Ze=Re[me];Ze!==null&&(Re[ee]=null,Re[me]=null,Re[xe]=null,Ze(le(void 0,!0))),Re[z]=!0}),Oe.on("readable",pe.bind(null,Re)),Re};_e.exports=ke}).call(this)}).call(this,ie("_process"))},{"./end-of-stream":408,_process:467}],406:[function(ie,_e,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)}_e.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 Ne=Pe.data,Oe=Ee>Ne.length?Ne.length:Ee;if(Oe===Ne.length?ke+=Ne:ke+=Ne.slice(0,Ee),Ee-=Oe,Ee===0){Oe===Ne.length?(++Ie,Pe.next?this.head=Pe.next:this.head=this.tail=null):(this.head=Pe,Pe.data=Ne.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 Ne=Ie.data,Oe=Ee>Ne.length?Ne.length:Ee;if(Ne.copy(Pe,Pe.length-Ee,0,Oe),Ee-=Oe,Ee===0){Oe===Ne.length?(++ke,Ie.next?this.head=Ie.next:this.head=this.tail=null):(this.head=Ie,Ie.data=Ne.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,_e,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)}_e.exports={destroy:ce,undestroy:ye,errorOrDestroy:me}}).call(this)}).call(this,ie("_process"))},{_process:467}],408:[function(ie,_e,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)}}_e.exports=ye},{"../../../errors":399}],409:[function(ie,_e,je){_e.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],410:[function(ie,_e,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 Ne=ke<le.length-1,Oe=ke>0;return xe(Ie,Ne,Oe,function(Fe){Ee||(Ee=Fe),Fe&&Pe.forEach(fe),!Ne&&(Pe.forEach(fe),pe(Ee))})});return le.reduce(z)}_e.exports=ae},{"../../../errors":399,"./end-of-stream":408}],411:[function(ie,_e,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}_e.exports={getHighWaterMark:be}},{"../../../errors":399}],412:[function(ie,_e,je){arguments[4][393][0].apply(je,arguments)},{dup:393,events:344}],413:[function(ie,_e,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 Ne=Ie.length-1;if(Ne<ke)return 0;var Oe=we(Ie[Ne]);return Oe>=0?(Oe>0&&(Pe.lastNeed=Oe-1),Oe):--Ne<ke||Oe===-2?0:(Oe=we(Ie[Ne]),Oe>=0?(Oe>0&&(Pe.lastNeed=Oe-2),Oe):--Ne<ke||Oe===-2?0:(Oe=we(Ie[Ne]),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 Ne=Pe.length-(ke-this.lastNeed);return Pe.copy(this.lastChar,0,Ne),Pe.toString("utf8",Ie,Ne)}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 Ne=ke.charCodeAt(ke.length-1);if(Ne>=55296&&Ne<=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,_e,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,_e,je){var ve=ie("buffer").Buffer;_e.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,_e,je){(function(ve){(function(){_e.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 an!="undefined"?an:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],417:[function(ie,_e,je){arguments[4][84][0].apply(je,arguments)},{dup:84}],418:[function(ie,_e,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)||yt(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 Ne(qe){return be(qe)==="Int8Array"}je.isInt8Array=Ne;function Oe(qe){return be(qe)==="Int16Array"}je.isInt16Array=Oe;function Fe(qe){return be(qe)==="Int32Array"}je.isInt32Array=Fe;function Re(qe){return be(qe)==="Float32Array"}je.isFloat32Array=Re;function Ye(qe){return be(qe)==="Float64Array"}je.isFloat64Array=Ye;function ze(qe){return be(qe)==="BigInt64Array"}je.isBigInt64Array=ze;function Ze(qe){return be(qe)==="BigUint64Array"}je.isBigUint64Array=Ze;function at(qe){return xe(qe)==="[object Map]"}at.working=typeof Map!="undefined"&&at(new Map);function ht(qe){return typeof Map=="undefined"?!1:at.working?at(qe):qe instanceof Map}je.isMap=ht;function pt(qe){return xe(qe)==="[object Set]"}pt.working=typeof Set!="undefined"&&pt(new Set);function Mt(qe){return typeof Set=="undefined"?!1:pt.working?pt(qe):qe instanceof Set}je.isSet=Mt;function et(qe){return xe(qe)==="[object WeakMap]"}et.working=typeof WeakMap!="undefined"&&et(new WeakMap);function ot(qe){return typeof WeakMap=="undefined"?!1:et.working?et(qe):qe instanceof WeakMap}je.isWeakMap=ot;function wt(qe){return xe(qe)==="[object WeakSet]"}wt.working=typeof WeakSet!="undefined"&&wt(new WeakSet);function Et(qe){return wt(qe)}je.isWeakSet=Et;function Tt(qe){return xe(qe)==="[object ArrayBuffer]"}Tt.working=typeof ArrayBuffer!="undefined"&&Tt(new ArrayBuffer);function vt(qe){return typeof ArrayBuffer=="undefined"?!1:Tt.working?Tt(qe):qe instanceof ArrayBuffer}je.isArrayBuffer=vt;function gt(qe){return xe(qe)==="[object DataView]"}gt.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&>(new DataView(new ArrayBuffer(1),0,1));function yt(qe){return typeof DataView=="undefined"?!1:gt.working?gt(qe):qe instanceof DataView}je.isDataView=yt;var It=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function Ot(qe){return xe(qe)==="[object SharedArrayBuffer]"}function Vt(qe){return typeof It=="undefined"?!1:(typeof Ot.working=="undefined"&&(Ot.working=Ot(new It)),Ot.working?Ot(qe):qe instanceof It)}je.isSharedArrayBuffer=Vt;function Ct(qe){return xe(qe)==="[object AsyncFunction]"}je.isAsyncFunction=Ct;function mt(qe){return xe(qe)==="[object Map Iterator]"}je.isMapIterator=mt;function nt(qe){return xe(qe)==="[object Set Iterator]"}je.isSetIterator=nt;function ft(qe){return xe(qe)==="[object Generator]"}je.isGeneratorObject=ft;function Xe(qe){return xe(qe)==="[object WebAssembly.Module]"}je.isWebAssemblyCompiledModule=Xe;function ut(qe){return le(qe,fe)}je.isNumberObject=ut;function bt(qe){return le(qe,z)}je.isStringObject=bt;function St(qe){return le(qe,ee)}je.isBooleanObject=St;function lt(qe){return we&&le(qe,ae)}je.isBigIntObject=lt;function Qe(qe){return me&&le(qe,re)}je.isSymbolObject=Qe;function Ue(qe){return ut(qe)||bt(qe)||St(qe)||lt(qe)||Qe(qe)}je.isBoxedPrimitive=Ue;function We(qe){return typeof Uint8Array!="undefined"&&(vt(qe)||Vt(qe))}je.isAnyArrayBuffer=We,["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,_e,je){(function(ve){(function(){var ce=Object.getOwnPropertyDescriptors||function(It){for(var Ot=Object.keys(It),Vt={},Ct=0;Ct<Ot.length;Ct++)Vt[Ot[Ct]]=Object.getOwnPropertyDescriptor(It,Ot[Ct]);return Vt},be=/%[sdj%]/g;je.format=function(yt){if(!Oe(yt)){for(var It=[],Ot=0;Ot<arguments.length;Ot++)It.push(me(arguments[Ot]));return It.join(" ")}for(var Ot=1,Vt=arguments,Ct=Vt.length,mt=String(yt).replace(be,function(ft){if(ft==="%%")return"%";if(Ot>=Ct)return ft;switch(ft){case"%s":return String(Vt[Ot++]);case"%d":return Number(Vt[Ot++]);case"%j":try{return JSON.stringify(Vt[Ot++])}catch(Xe){return"[Circular]"}default:return ft}}),nt=Vt[Ot];Ot<Ct;nt=Vt[++Ot])Ie(nt)||!ze(nt)?mt+=" "+nt:mt+=" "+me(nt);return mt},je.deprecate=function(yt,It){if(typeof ve!="undefined"&&ve.noDeprecation===!0)return yt;if(typeof ve=="undefined")return function(){return je.deprecate(yt,It).apply(this,arguments)};var Ot=!1;function Vt(){if(!Ot){if(ve.throwDeprecation)throw new Error(It);ve.traceDeprecation?console.trace(It):console.error(It),Ot=!0}return yt.apply(this,arguments)}return Vt};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(yt){if(yt=yt.toUpperCase(),!Ce[yt])if(ye.test(yt)){var It=ve.pid;Ce[yt]=function(){var Ot=je.format.apply(je,arguments);console.error("%s %d: %s",yt,It,Ot)}}else Ce[yt]=function(){};return Ce[yt]};function me(yt,It){var Ot={seen:[],stylize:fe};return arguments.length>=3&&(Ot.depth=arguments[2]),arguments.length>=4&&(Ot.colors=arguments[3]),Pe(It)?Ot.showHidden=It:It&&je._extend(Ot,It),Re(Ot.showHidden)&&(Ot.showHidden=!1),Re(Ot.depth)&&(Ot.depth=2),Re(Ot.colors)&&(Ot.colors=!1),Re(Ot.customInspect)&&(Ot.customInspect=!0),Ot.colors&&(Ot.stylize=xe),ee(Ot,yt,Ot.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(yt,It){var Ot=me.styles[It];return Ot?"\x1B["+me.colors[Ot][0]+"m"+yt+"\x1B["+me.colors[Ot][1]+"m":yt}function fe(yt,It){return yt}function z(yt){var It={};return yt.forEach(function(Ot,Vt){It[Ot]=!0}),It}function ee(yt,It,Ot){if(yt.customInspect&&It&&ht(It.inspect)&&It.inspect!==je.inspect&&!(It.constructor&&It.constructor.prototype===It)){var Vt=It.inspect(Ot,yt);return Oe(Vt)||(Vt=ee(yt,Vt,Ot)),Vt}var Ct=ae(yt,It);if(Ct)return Ct;var mt=Object.keys(It),nt=z(mt);if(yt.showHidden&&(mt=Object.getOwnPropertyNames(It)),at(It)&&(mt.indexOf("message")>=0||mt.indexOf("description")>=0))return re(It);if(mt.length===0){if(ht(It)){var ft=It.name?": "+It.name:"";return yt.stylize("[Function"+ft+"]","special")}if(Ye(It))return yt.stylize(RegExp.prototype.toString.call(It),"regexp");if(Ze(It))return yt.stylize(Date.prototype.toString.call(It),"date");if(at(It))return re(It)}var Xe="",ut=!1,bt=["{","}"];if(Ee(It)&&(ut=!0,bt=["[","]"]),ht(It)){var St=It.name?": "+It.name:"";Xe=" [Function"+St+"]"}if(Ye(It)&&(Xe=" "+RegExp.prototype.toString.call(It)),Ze(It)&&(Xe=" "+Date.prototype.toUTCString.call(It)),at(It)&&(Xe=" "+re(It)),mt.length===0&&(!ut||It.length==0))return bt[0]+Xe+bt[1];if(Ot<0)return Ye(It)?yt.stylize(RegExp.prototype.toString.call(It),"regexp"):yt.stylize("[Object]","special");yt.seen.push(It);var lt;return ut?lt=le(yt,It,Ot,nt,mt):lt=mt.map(function(Qe){return ue(yt,It,Ot,nt,Qe,ut)}),yt.seen.pop(),pe(lt,Xe,bt)}function ae(yt,It){if(Re(It))return yt.stylize("undefined","undefined");if(Oe(It)){var Ot="'"+JSON.stringify(It).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return yt.stylize(Ot,"string")}if(Ne(It))return yt.stylize(""+It,"number");if(Pe(It))return yt.stylize(""+It,"boolean");if(Ie(It))return yt.stylize("null","null")}function re(yt){return"["+Error.prototype.toString.call(yt)+"]"}function le(yt,It,Ot,Vt,Ct){for(var mt=[],nt=0,ft=It.length;nt<ft;++nt)Et(It,String(nt))?mt.push(ue(yt,It,Ot,Vt,String(nt),!0)):mt.push("");return Ct.forEach(function(Xe){Xe.match(/^\d+$/)||mt.push(ue(yt,It,Ot,Vt,Xe,!0))}),mt}function ue(yt,It,Ot,Vt,Ct,mt){var nt,ft,Xe;if(Xe=Object.getOwnPropertyDescriptor(It,Ct)||{value:It[Ct]},Xe.get?Xe.set?ft=yt.stylize("[Getter/Setter]","special"):ft=yt.stylize("[Getter]","special"):Xe.set&&(ft=yt.stylize("[Setter]","special")),Et(Vt,Ct)||(nt="["+Ct+"]"),ft||(yt.seen.indexOf(Xe.value)<0?(Ie(Ot)?ft=ee(yt,Xe.value,null):ft=ee(yt,Xe.value,Ot-1),ft.indexOf(`
|
|
|
`)>-1&&(mt?ft=ft.split(`
|
|
|
`).map(function(ut){return" "+ut}).join(`
|
|
|
`).slice(2):ft=`
|
|
|
`+ft.split(`
|
|
|
`).map(function(ut){return" "+ut}).join(`
|
|
|
`))):ft=yt.stylize("[Circular]","special")),Re(nt)){if(mt&&Ct.match(/^\d+$/))return ft;nt=JSON.stringify(""+Ct),nt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(nt=nt.slice(1,-1),nt=yt.stylize(nt,"name")):(nt=nt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),nt=yt.stylize(nt,"string"))}return nt+": "+ft}function pe(yt,It,Ot){var Vt=0,Ct=yt.reduce(function(mt,nt){return Vt++,nt.indexOf(`
|
|
|
`)>=0&&Vt++,mt+nt.replace(/\u001b\[\d\d?m/g,"").length+1},0);return Ct>60?Ot[0]+(It===""?"":It+`
|
|
|
`)+" "+yt.join(`,
|
|
|
`)+" "+Ot[1]:Ot[0]+It+" "+yt.join(", ")+" "+Ot[1]}je.types=ie("./support/types");function Ee(yt){return Array.isArray(yt)}je.isArray=Ee;function Pe(yt){return typeof yt=="boolean"}je.isBoolean=Pe;function Ie(yt){return yt===null}je.isNull=Ie;function ke(yt){return yt==null}je.isNullOrUndefined=ke;function Ne(yt){return typeof yt=="number"}je.isNumber=Ne;function Oe(yt){return typeof yt=="string"}je.isString=Oe;function Fe(yt){return typeof yt=="symbol"}je.isSymbol=Fe;function Re(yt){return yt===void 0}je.isUndefined=Re;function Ye(yt){return ze(yt)&&Mt(yt)==="[object RegExp]"}je.isRegExp=Ye,je.types.isRegExp=Ye;function ze(yt){return typeof yt=="object"&&yt!==null}je.isObject=ze;function Ze(yt){return ze(yt)&&Mt(yt)==="[object Date]"}je.isDate=Ze,je.types.isDate=Ze;function at(yt){return ze(yt)&&(Mt(yt)==="[object Error]"||yt instanceof Error)}je.isError=at,je.types.isNativeError=at;function ht(yt){return typeof yt=="function"}je.isFunction=ht;function pt(yt){return yt===null||typeof yt=="boolean"||typeof yt=="number"||typeof yt=="string"||typeof yt=="symbol"||typeof yt=="undefined"}je.isPrimitive=pt,je.isBuffer=ie("./support/isBuffer");function Mt(yt){return Object.prototype.toString.call(yt)}function et(yt){return yt<10?"0"+yt.toString(10):yt.toString(10)}var ot=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function wt(){var yt=new Date,It=[et(yt.getHours()),et(yt.getMinutes()),et(yt.getSeconds())].join(":");return[yt.getDate(),ot[yt.getMonth()],It].join(" ")}je.log=function(){console.log("%s - %s",wt(),je.format.apply(je,arguments))},je.inherits=ie("inherits"),je._extend=function(yt,It){if(!It||!ze(It))return yt;for(var Ot=Object.keys(It),Vt=Ot.length;Vt--;)yt[Ot[Vt]]=It[Ot[Vt]];return yt};function Et(yt,It){return Object.prototype.hasOwnProperty.call(yt,It)}var Tt=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;je.promisify=function(It){if(typeof It!="function")throw new TypeError('The "original" argument must be of type Function');if(Tt&&It[Tt]){var Ot=It[Tt];if(typeof Ot!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Ot,Tt,{value:Ot,enumerable:!1,writable:!1,configurable:!0}),Ot}function Ot(){for(var Vt,Ct,mt=new Promise(function(Xe,ut){Vt=Xe,Ct=ut}),nt=[],ft=0;ft<arguments.length;ft++)nt.push(arguments[ft]);nt.push(function(Xe,ut){Xe?Ct(Xe):Vt(ut)});try{It.apply(this,nt)}catch(Xe){Ct(Xe)}return mt}return Object.setPrototypeOf(Ot,Object.getPrototypeOf(It)),Tt&&Object.defineProperty(Ot,Tt,{value:Ot,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(Ot,ce(It))},je.promisify.custom=Tt;function vt(yt,It){if(!yt){var Ot=new Error("Promise was rejected with a falsy value");Ot.reason=yt,yt=Ot}return It(yt)}function gt(yt){if(typeof yt!="function")throw new TypeError('The "original" argument must be of type Function');function It(){for(var Ot=[],Vt=0;Vt<arguments.length;Vt++)Ot.push(arguments[Vt]);var Ct=Ot.pop();if(typeof Ct!="function")throw new TypeError("The last argument must be of type Function");var mt=this,nt=function(){return Ct.apply(mt,arguments)};yt.apply(this,Ot).then(function(ft){ve.nextTick(nt.bind(null,null,ft))},function(ft){ve.nextTick(vt.bind(null,ft,nt))})}return Object.setPrototypeOf(It,Object.getPrototypeOf(yt)),Object.defineProperties(It,ce(yt)),It}je.callbackify=gt}).call(this)}).call(this,ie("_process"))},{"./support/isBuffer":417,"./support/types":418,_process:467,inherits:364}],420:[function(ie,_e,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 Ne=ae(Ie);ke=we(Ne,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,Ne){if(!Ie)try{"$"+ke(Pe)===Ne&&(Ie=ee(Ne,1))}catch(Oe){}}),Ie},pe=function(Pe){var Ie=!1;return ce(le,function(ke,Ne){if(!Ie)try{ke(Pe),Ie=ee(Ne,1)}catch(Oe){}}),Ie};_e.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 an!="undefined"?an: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,_e,je){(function(){"use strict";je.stripBOM=function(ve){return ve[0]==="\uFEFF"?ve.substring(1):ve}}).call(this)},{}],422:[function(ie,_e,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,Ne,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(Ne in Pe)Ie=Pe[Ne],ue=ee(ue.ele(Ne),Ie).up()}}else for(Ne in pe)if(we.call(pe,Ne))if(Pe=pe[Ne],Ne===fe){if(typeof Pe=="object")for(Ee in Pe)Oe=Pe[Ee],ue=ue.att(Ee,Oe)}else if(Ne===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(Ne).raw(ye(Ie)).up():ue=ue.ele(Ne,Ie).up():ue=ee(ue.ele(Ne),Ie).up());else typeof Pe=="object"?ue=ee(ue.ele(Ne),Pe).up():typeof Pe=="string"&&le.options.cdata&&Ce(Pe)?ue=ue.ele(Ne).raw(ye(Pe)).up():(Pe==null&&(Pe=""),ue=ue.ele(Ne,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,_e,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,_e,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 Ne,Oe,Fe,Re,Ye;if(Fe={},Fe[pe]="",!Ie.options.ignoreAttrs){Ye=ke.attributes;for(Ne in Ye)ae.call(Ye,Ne)&&(!(ue in Fe)&&!Ie.options.mergeAttrs&&(Fe[ue]={}),Oe=Ie.options.attrValueProcessors?we(Ie.options.attrValueProcessors,ke.attributes[Ne],Ne):ke.attributes[Ne],Re=Ie.options.attrNameProcessors?we(Ie.options.attrNameProcessors,Ne):Ne,Ie.options.mergeAttrs?Ie.assignOrPush(Fe,Re,Oe):be(Fe[ue],Re,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,Ne,Oe,Fe,Re,Ye,ze,Ze,at,ht;if(Ye=Pe.pop(),Re=Ye["#name"],(!Ie.options.explicitChildren||!Ie.options.preserveChildrenOrder)&&delete Ye["#name"],Ye.cdata===!0&&(ke=Ye.cdata,delete Ye.cdata),at=Pe[Pe.length-1],Ye[pe].match(/^\s*$/)&&!ke?(Ne=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],Re):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:Ne),Ie.options.validator!=null&&(ht="/"+function(){var pt,Mt,et;for(et=[],pt=0,Mt=Pe.length;pt<Mt;pt++)Fe=Pe[pt],et.push(Fe["#name"]);return et}().concat(Re).join("/"),function(){var pt;try{return Ye=Ie.options.validator(ht,at&&at[Re],Ye)}catch(Mt){return pt=Mt,Ie.emit("error",pt)}}()),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(at){at[Ie.options.childkey]=at[Ie.options.childkey]||[],ze={};for(Oe in Ye)ae.call(Ye,Oe)&&be(ze,Oe,Ye[Oe]);at[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(at,Re,Ye):(Ie.options.explicitRoot&&(Ze=Ye,Ye={},be(Ye,Re,Ze)),Ie.resultObject=Ye,Ie.saxParser.ended=!0,Ie.emit("end",Ie.resultObject))}}(this),Ee=function(Ie){return function(ke){var Ne,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]||[],Ne={"#name":"__text__"},Ne[pe]=ke,Ie.options.normalize&&(Ne[pe]=Ne[pe].replace(/\s{2,}/g," ").trim()),Oe[Ie.options.childkey].push(Ne)),Oe}}(this),this.saxParser.ontext=Ee,this.saxParser.oncdata=function(Ie){return function(ke){var Ne;if(Ne=Ee(ke),Ne)return Ne.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,_e,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,_e,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,_e,je){(function(){_e.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},{}],428:[function(ie,_e,je){(function(){_e.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,_e,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},_e.exports.assign=ve,_e.exports.isFunction=ye,_e.exports.isObject=we,_e.exports.isArray=be,_e.exports.isEmpty=Ce,_e.exports.isPlainObject=me,_e.exports.getValue=ce}).call(this)},{}],430:[function(ie,_e,je){(function(){_e.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},{}],431:[function(ie,_e,je){(function(){var ve,ce,be;ve=ie("./NodeType"),be=ie("./XMLNode"),_e.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,_e,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"),_e.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,_e,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"),_e.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,_e,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"),_e.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,_e,je){(function(){var ve,ce,be;ce=ie("./XMLDOMErrorHandler"),be=ie("./XMLDOMStringList"),_e.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,_e,je){(function(){var ve;_e.exports=ve=function(){function ce(){}return ce.prototype.handleError=function(be){throw new Error(be)},ce}()}).call(this)},{}],437:[function(ie,_e,je){(function(){var ve;_e.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,_e,je){(function(){var ve;_e.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,_e,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"),_e.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,_e,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"),_e.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,_e,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"),_e.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,_e,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"),_e.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,_e,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"),_e.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,_e,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"),_e.exports=we=function(ae){z(re,ae);function re(le,ue,pe){var Ee,Pe,Ie,ke,Ne,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)&&(Ne=ue,ue=Ne.pubID,pe=Ne.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,_e,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"),_e.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,_e,je){(function(){var ve,ce,be,Ce,ye,we,me,xe,fe,z,ee,ae,re,le,ue,pe,Ee,Pe,Ie,ke,Ne,Oe,Fe,Re,Ye={}.hasOwnProperty;Re=ie("./Utility"),Oe=Re.isObject,Ne=Re.isFunction,Fe=Re.isPlainObject,ke=Re.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"),_e.exports=re=function(){function ze(Ze,at,ht){var pt;this.name="?xml",this.type=ve.Document,Ze||(Ze={}),pt={},Ze.writer?Fe(Ze.writer)&&(pt=Ze.writer,Ze.writer=new Ee):Ze.writer=new Ee,this.options=Ze,this.writer=Ze.writer,this.writerOptions=this.writer.filterOptions(pt),this.stringify=new Pe(Ze),this.onDataCallback=at||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(Ze){var at,ht,pt,Mt,et,ot,wt,Et;switch(Ze.type){case ve.CData:this.cdata(Ze.value);break;case ve.Comment:this.comment(Ze.value);break;case ve.Element:pt={},wt=Ze.attribs;for(ht in wt)Ye.call(wt,ht)&&(at=wt[ht],pt[ht]=at.value);this.node(Ze.name,pt);break;case ve.Dummy:this.dummy();break;case ve.Raw:this.raw(Ze.value);break;case ve.Text:this.text(Ze.value);break;case ve.ProcessingInstruction:this.instruction(Ze.target,Ze.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+Ze.constructor.name)}for(Et=Ze.children,et=0,ot=Et.length;et<ot;et++)Mt=Et[et],this.createChildNode(Mt),Mt.type===ve.Element&&this.up();return this},ze.prototype.dummy=function(){return this},ze.prototype.node=function(Ze,at,ht){var pt;if(Ze==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(Ze));return this.openCurrent(),Ze=ke(Ze),at==null&&(at={}),at=ke(at),Oe(at)||(pt=[at,ht],ht=pt[0],at=pt[1]),this.currentNode=new le(this,Ze,at),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,ht!=null&&this.text(ht),this},ze.prototype.element=function(Ze,at,ht){var pt,Mt,et,ot,wt,Et;if(this.currentNode&&this.currentNode.type===ve.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(Ze)||Oe(Ze)||Ne(Ze))for(ot=this.options.noValidation,this.options.noValidation=!0,Et=new ae(this.options).element("TEMP_ROOT"),Et.element(Ze),this.options.noValidation=ot,wt=Et.children,Mt=0,et=wt.length;Mt<et;Mt++)pt=wt[Mt],this.createChildNode(pt),pt.type===ve.Element&&this.up();else this.node(Ze,at,ht);return this},ze.prototype.attribute=function(Ze,at){var ht,pt;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(Ze));if(Ze!=null&&(Ze=ke(Ze)),Oe(Ze))for(ht in Ze)Ye.call(Ze,ht)&&(pt=Ze[ht],this.attribute(ht,pt));else Ne(at)&&(at=at.apply()),this.options.keepNullAttributes&&at==null?this.currentNode.attribs[Ze]=new be(this,Ze,""):at!=null&&(this.currentNode.attribs[Ze]=new be(this,Ze,at));return this},ze.prototype.text=function(Ze){var at;return this.openCurrent(),at=new Ie(this,Ze),this.onData(this.writer.text(at,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},ze.prototype.cdata=function(Ze){var at;return this.openCurrent(),at=new Ce(this,Ze),this.onData(this.writer.cdata(at,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},ze.prototype.comment=function(Ze){var at;return this.openCurrent(),at=new ye(this,Ze),this.onData(this.writer.comment(at,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},ze.prototype.raw=function(Ze){var at;return this.openCurrent(),at=new pe(this,Ze),this.onData(this.writer.raw(at,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},ze.prototype.instruction=function(Ze,at){var ht,pt,Mt,et,ot;if(this.openCurrent(),Ze!=null&&(Ze=ke(Ze)),at!=null&&(at=ke(at)),Array.isArray(Ze))for(ht=0,et=Ze.length;ht<et;ht++)pt=Ze[ht],this.instruction(pt);else if(Oe(Ze))for(pt in Ze)Ye.call(Ze,pt)&&(Mt=Ze[pt],this.instruction(pt,Mt));else Ne(at)&&(at=at.apply()),ot=new ue(this,Ze,at),this.onData(this.writer.processingInstruction(ot,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},ze.prototype.declaration=function(Ze,at,ht){var pt;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return pt=new z(this,Ze,at,ht),this.onData(this.writer.declaration(pt,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},ze.prototype.doctype=function(Ze,at,ht){if(this.openCurrent(),Ze==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new ee(this,at,ht),this.currentNode.rootNodeName=Ze,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},ze.prototype.dtdElement=function(Ze,at){var ht;return this.openCurrent(),ht=new me(this,Ze,at),this.onData(this.writer.dtdElement(ht,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},ze.prototype.attList=function(Ze,at,ht,pt,Mt){var et;return this.openCurrent(),et=new we(this,Ze,at,ht,pt,Mt),this.onData(this.writer.dtdAttList(et,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},ze.prototype.entity=function(Ze,at){var ht;return this.openCurrent(),ht=new xe(this,!1,Ze,at),this.onData(this.writer.dtdEntity(ht,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},ze.prototype.pEntity=function(Ze,at){var ht;return this.openCurrent(),ht=new xe(this,!0,Ze,at),this.onData(this.writer.dtdEntity(ht,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},ze.prototype.notation=function(Ze,at){var ht;return this.openCurrent(),ht=new fe(this,Ze,at),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(Ze){var at,ht,pt,Mt;if(!Ze.isOpen){if(!this.root&&this.currentLevel===0&&Ze.type===ve.Element&&(this.root=Ze),ht="",Ze.type===ve.Element){this.writerOptions.state=ce.OpenTag,ht=this.writer.indent(Ze,this.writerOptions,this.currentLevel)+"<"+Ze.name,Mt=Ze.attribs;for(pt in Mt)Ye.call(Mt,pt)&&(at=Mt[pt],ht+=this.writer.attribute(at,this.writerOptions,this.currentLevel));ht+=(Ze.children?">":"/>")+this.writer.endline(Ze,this.writerOptions,this.currentLevel),this.writerOptions.state=ce.InsideTag}else this.writerOptions.state=ce.OpenTag,ht=this.writer.indent(Ze,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+Ze.rootNodeName,Ze.pubID&&Ze.sysID?ht+=' PUBLIC "'+Ze.pubID+'" "'+Ze.sysID+'"':Ze.sysID&&(ht+=' SYSTEM "'+Ze.sysID+'"'),Ze.children?(ht+=" [",this.writerOptions.state=ce.InsideTag):(this.writerOptions.state=ce.CloseTag,ht+=">"),ht+=this.writer.endline(Ze,this.writerOptions,this.currentLevel);return this.onData(ht,this.currentLevel),Ze.isOpen=!0}},ze.prototype.closeNode=function(Ze){var at;if(!Ze.isClosed)return at="",this.writerOptions.state=ce.CloseTag,Ze.type===ve.Element?at=this.writer.indent(Ze,this.writerOptions,this.currentLevel)+"</"+Ze.name+">"+this.writer.endline(Ze,this.writerOptions,this.currentLevel):at=this.writer.indent(Ze,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(Ze,this.writerOptions,this.currentLevel),this.writerOptions.state=ce.None,this.onData(at,this.currentLevel),Ze.isClosed=!0},ze.prototype.onData=function(Ze,at){return this.documentStarted=!0,this.onDataCallback(Ze,at+1)},ze.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},ze.prototype.debugInfo=function(Ze){return Ze==null?"":"node: <"+Ze+">"},ze.prototype.ele=function(){return this.element.apply(this,arguments)},ze.prototype.nod=function(Ze,at,ht){return this.node(Ze,at,ht)},ze.prototype.txt=function(Ze){return this.text(Ze)},ze.prototype.dat=function(Ze){return this.cdata(Ze)},ze.prototype.com=function(Ze){return this.comment(Ze)},ze.prototype.ins=function(Ze,at){return this.instruction(Ze,at)},ze.prototype.dec=function(Ze,at,ht){return this.declaration(Ze,at,ht)},ze.prototype.dtd=function(Ze,at,ht){return this.doctype(Ze,at,ht)},ze.prototype.e=function(Ze,at,ht){return this.element(Ze,at,ht)},ze.prototype.n=function(Ze,at,ht){return this.node(Ze,at,ht)},ze.prototype.t=function(Ze){return this.text(Ze)},ze.prototype.d=function(Ze){return this.cdata(Ze)},ze.prototype.c=function(Ze){return this.comment(Ze)},ze.prototype.r=function(Ze){return this.raw(Ze)},ze.prototype.i=function(Ze,at){return this.instruction(Ze,at)},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(Ze,at){return this.entity(Ze,at)},ze.prototype.pent=function(Ze,at){return this.pEntity(Ze,at)},ze.prototype.not=function(Ze,at){return this.notation(Ze,at)},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,_e,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"),_e.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,_e,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"),_e.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,_e,je){(function(){var ve;_e.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,_e,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,_e.exports=z=function(){function Ne(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(Ne.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(Ne.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(Ne.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(Ne.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(Ne.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new ee(this.children)),this.childNodeList}}),Object.defineProperty(Ne.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(Ne.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(Ne.prototype,"previousSibling",{get:function(){var Oe;return Oe=this.parent.children.indexOf(this),this.parent.children[Oe-1]||null}}),Object.defineProperty(Ne.prototype,"nextSibling",{get:function(){var Oe;return Oe=this.parent.children.indexOf(this),this.parent.children[Oe+1]||null}}),Object.defineProperty(Ne.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(Ne.prototype,"textContent",{get:function(){var Oe,Fe,Re,Ye,ze;if(this.nodeType===ce.Element||this.nodeType===ce.DocumentFragment){for(ze="",Ye=this.children,Fe=0,Re=Ye.length;Fe<Re;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())}}),Ne.prototype.setParent=function(Oe){var Fe,Re,Ye,ze,Ze;for(this.parent=Oe,Oe&&(this.options=Oe.options,this.stringify=Oe.stringify),ze=this.children,Ze=[],Re=0,Ye=ze.length;Re<Ye;Re++)Fe=ze[Re],Ze.push(Fe.setParent(this));return Ze},Ne.prototype.element=function(Oe,Fe,Re){var Ye,ze,Ze,at,ht,pt,Mt,et,ot,wt,Et;if(pt=null,Fe===null&&Re==null&&(ot=[{},null],Fe=ot[0],Re=ot[1]),Fe==null&&(Fe={}),Fe=ue(Fe),Pe(Fe)||(wt=[Fe,Re],Re=wt[0],Fe=wt[1]),Oe!=null&&(Oe=ue(Oe)),Array.isArray(Oe))for(Ze=0,Mt=Oe.length;Ze<Mt;Ze++)ze=Oe[Ze],pt=this.element(ze);else if(Ee(Oe))pt=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)pt=this.attribute(ht.substr(this.stringify.convertAttKey.length),Et);else if(!this.options.separateArrayItems&&Array.isArray(Et)&&pe(Et))pt=this.dummy();else if(Pe(Et)&&pe(Et))pt=this.element(ht);else if(!this.options.keepNullNodes&&Et==null)pt=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(Et))for(at=0,et=Et.length;at<et;at++)ze=Et[at],Ye={},Ye[ht]=ze,pt=this.element(Ye);else Pe(Et)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&ht.indexOf(this.stringify.convertTextKey)===0?pt=this.element(Et):(pt=this.element(ht),pt.element(Et)):pt=this.element(ht,Et)}else!this.options.keepNullNodes&&Re===null?pt=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&Oe.indexOf(this.stringify.convertTextKey)===0?pt=this.text(Re):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&Oe.indexOf(this.stringify.convertCDataKey)===0?pt=this.cdata(Re):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&Oe.indexOf(this.stringify.convertCommentKey)===0?pt=this.comment(Re):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&Oe.indexOf(this.stringify.convertRawKey)===0?pt=this.raw(Re):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&Oe.indexOf(this.stringify.convertPIKey)===0?pt=this.instruction(Oe.substr(this.stringify.convertPIKey.length),Re):pt=this.node(Oe,Fe,Re);if(pt==null)throw new Error("Could not create any elements with: "+Oe+". "+this.debugInfo());return pt},Ne.prototype.insertBefore=function(Oe,Fe,Re){var Ye,ze,Ze,at,ht;if(Oe!=null&&Oe.type)return Ze=Oe,at=Fe,Ze.setParent(this),at?(ze=children.indexOf(at),ht=children.splice(ze),children.push(Ze),Array.prototype.push.apply(children,ht)):children.push(Ze),Ze;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,Re),Array.prototype.push.apply(this.parent.children,ht),Ye},Ne.prototype.insertAfter=function(Oe,Fe,Re){var Ye,ze,Ze;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(Oe));return ze=this.parent.children.indexOf(this),Ze=this.parent.children.splice(ze+1),Ye=this.parent.element(Oe,Fe,Re),Array.prototype.push.apply(this.parent.children,Ze),Ye},Ne.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},Ne.prototype.node=function(Oe,Fe,Re){var Ye,ze;return Oe!=null&&(Oe=ue(Oe)),Fe||(Fe={}),Fe=ue(Fe),Pe(Fe)||(ze=[Fe,Re],Re=ze[0],Fe=ze[1]),Ye=new xe(this,Oe,Fe),Re!=null&&Ye.text(Re),this.children.push(Ye),Ye},Ne.prototype.text=function(Oe){var Fe;return Pe(Oe)&&this.element(Oe),Fe=new le(this,Oe),this.children.push(Fe),this},Ne.prototype.cdata=function(Oe){var Fe;return Fe=new be(this,Oe),this.children.push(Fe),this},Ne.prototype.comment=function(Oe){var Fe;return Fe=new Ce(this,Oe),this.children.push(Fe),this},Ne.prototype.commentBefore=function(Oe){var Fe,Re,Ye;return Re=this.parent.children.indexOf(this),Ye=this.parent.children.splice(Re),Fe=this.parent.comment(Oe),Array.prototype.push.apply(this.parent.children,Ye),this},Ne.prototype.commentAfter=function(Oe){var Fe,Re,Ye;return Re=this.parent.children.indexOf(this),Ye=this.parent.children.splice(Re+1),Fe=this.parent.comment(Oe),Array.prototype.push.apply(this.parent.children,Ye),this},Ne.prototype.raw=function(Oe){var Fe;return Fe=new re(this,Oe),this.children.push(Fe),this},Ne.prototype.dummy=function(){var Oe;return Oe=new me(this),Oe},Ne.prototype.instruction=function(Oe,Fe){var Re,Ye,ze,Ze,at;if(Oe!=null&&(Oe=ue(Oe)),Fe!=null&&(Fe=ue(Fe)),Array.isArray(Oe))for(Ze=0,at=Oe.length;Ze<at;Ze++)Re=Oe[Ze],this.instruction(Re);else if(Pe(Oe))for(Re in Oe)ke.call(Oe,Re)&&(Ye=Oe[Re],this.instruction(Re,Ye));else Ee(Fe)&&(Fe=Fe.apply()),ze=new ae(this,Oe,Fe),this.children.push(ze);return this},Ne.prototype.instructionBefore=function(Oe,Fe){var Re,Ye,ze;return Ye=this.parent.children.indexOf(this),ze=this.parent.children.splice(Ye),Re=this.parent.instruction(Oe,Fe),Array.prototype.push.apply(this.parent.children,ze),this},Ne.prototype.instructionAfter=function(Oe,Fe){var Re,Ye,ze;return Ye=this.parent.children.indexOf(this),ze=this.parent.children.splice(Ye+1),Re=this.parent.instruction(Oe,Fe),Array.prototype.push.apply(this.parent.children,ze),this},Ne.prototype.declaration=function(Oe,Fe,Re){var Ye,ze;return Ye=this.document(),ze=new ye(Ye,Oe,Fe,Re),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},Ne.prototype.dtd=function(Oe,Fe){var Re,Ye,ze,Ze,at,ht,pt,Mt,et,ot;for(Ye=this.document(),ze=new we(Ye,Oe,Fe),et=Ye.children,Ze=at=0,pt=et.length;at<pt;Ze=++at)if(Re=et[Ze],Re.type===ce.DocType)return Ye.children[Ze]=ze,ze;for(ot=Ye.children,Ze=ht=0,Mt=ot.length;ht<Mt;Ze=++ht)if(Re=ot[Ze],Re.isRoot)return Ye.children.splice(Ze,0,ze),ze;return Ye.children.push(ze),ze},Ne.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},Ne.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}},Ne.prototype.document=function(){var Oe;for(Oe=this;Oe;){if(Oe.type===ce.Document)return Oe;Oe=Oe.parent}},Ne.prototype.end=function(Oe){return this.document().end(Oe)},Ne.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]},Ne.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]},Ne.prototype.importDocument=function(Oe){var Fe;return Fe=Oe.root().clone(),Fe.parent=this,Fe.isRoot=!1,this.children.push(Fe),this},Ne.prototype.debugInfo=function(Oe){var Fe,Re;return Oe=Oe||this.name,Oe==null&&!((Fe=this.parent)!=null&&Fe.name)?"":Oe==null?"parent: <"+this.parent.name+">":(Re=this.parent)!=null&&Re.name?"node: <"+Oe+">, parent: <"+this.parent.name+">":"node: <"+Oe+">"},Ne.prototype.ele=function(Oe,Fe,Re){return this.element(Oe,Fe,Re)},Ne.prototype.nod=function(Oe,Fe,Re){return this.node(Oe,Fe,Re)},Ne.prototype.txt=function(Oe){return this.text(Oe)},Ne.prototype.dat=function(Oe){return this.cdata(Oe)},Ne.prototype.com=function(Oe){return this.comment(Oe)},Ne.prototype.ins=function(Oe,Fe){return this.instruction(Oe,Fe)},Ne.prototype.doc=function(){return this.document()},Ne.prototype.dec=function(Oe,Fe,Re){return this.declaration(Oe,Fe,Re)},Ne.prototype.e=function(Oe,Fe,Re){return this.element(Oe,Fe,Re)},Ne.prototype.n=function(Oe,Fe,Re){return this.node(Oe,Fe,Re)},Ne.prototype.t=function(Oe){return this.text(Oe)},Ne.prototype.d=function(Oe){return this.cdata(Oe)},Ne.prototype.c=function(Oe){return this.comment(Oe)},Ne.prototype.r=function(Oe){return this.raw(Oe)},Ne.prototype.i=function(Oe,Fe){return this.instruction(Oe,Fe)},Ne.prototype.u=function(){return this.up()},Ne.prototype.importXMLBuilder=function(Oe){return this.importDocument(Oe)},Ne.prototype.replaceChild=function(Oe,Fe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.removeChild=function(Oe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.appendChild=function(Oe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.hasChildNodes=function(){return this.children.length!==0},Ne.prototype.cloneNode=function(Oe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.isSupported=function(Oe,Fe){return!0},Ne.prototype.hasAttributes=function(){return this.attribs.length!==0},Ne.prototype.compareDocumentPosition=function(Oe){var Fe,Re;return Fe=this,Fe===Oe?0:this.document()!==Oe.document()?(Re=ve.Disconnected|ve.ImplementationSpecific,Math.random()<.5?Re|=ve.Preceding:Re|=ve.Following,Re):Fe.isAncestor(Oe)?ve.Contains|ve.Preceding:Fe.isDescendant(Oe)?ve.Contains|ve.Following:Fe.isPreceding(Oe)?ve.Preceding:ve.Following},Ne.prototype.isSameNode=function(Oe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.lookupPrefix=function(Oe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.isDefaultNamespace=function(Oe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.lookupNamespaceURI=function(Oe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.isEqualNode=function(Oe){var Fe,Re,Ye;if(Oe.nodeType!==this.nodeType||Oe.children.length!==this.children.length)return!1;for(Fe=Re=0,Ye=this.children.length-1;0<=Ye?Re<=Ye:Re>=Ye;Fe=0<=Ye?++Re:--Re)if(!this.children[Fe].isEqualNode(Oe.children[Fe]))return!1;return!0},Ne.prototype.getFeature=function(Oe,Fe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.setUserData=function(Oe,Fe,Re){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.getUserData=function(Oe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.contains=function(Oe){return Oe?Oe===this||this.isDescendant(Oe):!1},Ne.prototype.isDescendant=function(Oe){var Fe,Re,Ye,ze,Ze;for(Ze=this.children,Ye=0,ze=Ze.length;Ye<ze;Ye++)if(Fe=Ze[Ye],Oe===Fe||(Re=Fe.isDescendant(Oe),Re))return!0;return!1},Ne.prototype.isAncestor=function(Oe){return Oe.isDescendant(this)},Ne.prototype.isPreceding=function(Oe){var Fe,Re;return Fe=this.treePosition(Oe),Re=this.treePosition(this),Fe===-1||Re===-1?!1:Fe<Re},Ne.prototype.isFollowing=function(Oe){var Fe,Re;return Fe=this.treePosition(Oe),Re=this.treePosition(this),Fe===-1||Re===-1?!1:Fe>Re},Ne.prototype.treePosition=function(Oe){var Fe,Re;return Re=0,Fe=!1,this.foreachTreeNode(this.document(),function(Ye){if(Re++,!Fe&&Ye===Oe)return Fe=!0}),Fe?Re:-1},Ne.prototype.foreachTreeNode=function(Oe,Fe){var Re,Ye,ze,Ze,at;for(Oe||(Oe=this.document()),Ze=Oe.children,Ye=0,ze=Ze.length;Ye<ze;Ye++){if(Re=Ze[Ye],at=Fe(Re))return at;if(at=this.foreachTreeNode(Re,Fe),at)return at}},Ne}()}).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,_e,je){(function(){var ve;_e.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,_e,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"),_e.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,_e,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"),_e.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,_e,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"),_e.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,Ne;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,Ne=fe.children,pe=0,Ee=Ne.length;pe<Ee;pe++)re=Ne[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,_e,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"),_e.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,_e,je){(function(){var ve,ce=function(Ce,ye){return function(){return Ce.apply(ye,arguments)}},be={}.hasOwnProperty;_e.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,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},Ce.prototype.attEscape=function(ye){var we;return this.options.noValidation?ye:(we=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,ye.replace(we,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},Ce}()}).call(this)},{}],457:[function(ie,_e,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"),_e.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,_e,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"),_e.exports=pe=function(){function Ie(ke){var Ne,Oe,Fe;ke||(ke={}),this.options=ke,Oe=ke.writer||{};for(Ne in Oe)Pe.call(Oe,Ne)&&(Fe=Oe[Ne],this["_"+Ne]=this[Ne],this[Ne]=Fe)}return Ie.prototype.filterOptions=function(ke){var Ne,Oe,Fe,Re,Ye,ze,Ze,at;return ke||(ke={}),ke=Ee({},this.options,ke),Ne={writer:this},Ne.pretty=ke.pretty||!1,Ne.allowEmpty=ke.allowEmpty||!1,Ne.indent=(Oe=ke.indent)!=null?Oe:" ",Ne.newline=(Fe=ke.newline)!=null?Fe:`
|
|
|
`,Ne.offset=(Re=ke.offset)!=null?Re:0,Ne.dontPrettyTextNodes=(Ye=(ze=ke.dontPrettyTextNodes)!=null?ze:ke.dontprettytextnodes)!=null?Ye:0,Ne.spaceBeforeSlash=(Ze=(at=ke.spaceBeforeSlash)!=null?at:ke.spacebeforeslash)!=null?Ze:"",Ne.spaceBeforeSlash===!0&&(Ne.spaceBeforeSlash=" "),Ne.suppressPrettyCount=0,Ne.user={},Ne.state=ce.None,Ne},Ie.prototype.indent=function(ke,Ne,Oe){var Fe;return!Ne.pretty||Ne.suppressPrettyCount?"":Ne.pretty&&(Fe=(Oe||0)+Ne.offset+1,Fe>0)?new Array(Fe).join(Ne.indent):""},Ie.prototype.endline=function(ke,Ne,Oe){return!Ne.pretty||Ne.suppressPrettyCount?"":Ne.newline},Ie.prototype.attribute=function(ke,Ne,Oe){var Fe;return this.openAttribute(ke,Ne,Oe),Fe=" "+ke.name+'="'+ke.value+'"',this.closeAttribute(ke,Ne,Oe),Fe},Ie.prototype.cdata=function(ke,Ne,Oe){var Fe;return this.openNode(ke,Ne,Oe),Ne.state=ce.OpenTag,Fe=this.indent(ke,Ne,Oe)+"<![CDATA[",Ne.state=ce.InsideTag,Fe+=ke.value,Ne.state=ce.CloseTag,Fe+="]]>"+this.endline(ke,Ne,Oe),Ne.state=ce.None,this.closeNode(ke,Ne,Oe),Fe},Ie.prototype.comment=function(ke,Ne,Oe){var Fe;return this.openNode(ke,Ne,Oe),Ne.state=ce.OpenTag,Fe=this.indent(ke,Ne,Oe)+"<!-- ",Ne.state=ce.InsideTag,Fe+=ke.value,Ne.state=ce.CloseTag,Fe+=" -->"+this.endline(ke,Ne,Oe),Ne.state=ce.None,this.closeNode(ke,Ne,Oe),Fe},Ie.prototype.declaration=function(ke,Ne,Oe){var Fe;return this.openNode(ke,Ne,Oe),Ne.state=ce.OpenTag,Fe=this.indent(ke,Ne,Oe)+"<?xml",Ne.state=ce.InsideTag,Fe+=' version="'+ke.version+'"',ke.encoding!=null&&(Fe+=' encoding="'+ke.encoding+'"'),ke.standalone!=null&&(Fe+=' standalone="'+ke.standalone+'"'),Ne.state=ce.CloseTag,Fe+=Ne.spaceBeforeSlash+"?>",Fe+=this.endline(ke,Ne,Oe),Ne.state=ce.None,this.closeNode(ke,Ne,Oe),Fe},Ie.prototype.docType=function(ke,Ne,Oe){var Fe,Re,Ye,ze,Ze;if(Oe||(Oe=0),this.openNode(ke,Ne,Oe),Ne.state=ce.OpenTag,ze=this.indent(ke,Ne,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,Ne,Oe),Ne.state=ce.InsideTag,Ze=ke.children,Re=0,Ye=Ze.length;Re<Ye;Re++)Fe=Ze[Re],ze+=this.writeChildNode(Fe,Ne,Oe+1);Ne.state=ce.CloseTag,ze+="]"}return Ne.state=ce.CloseTag,ze+=Ne.spaceBeforeSlash+">",ze+=this.endline(ke,Ne,Oe),Ne.state=ce.None,this.closeNode(ke,Ne,Oe),ze},Ie.prototype.element=function(ke,Ne,Oe){var Fe,Re,Ye,ze,Ze,at,ht,pt,Mt,et,ot,wt,Et,Tt;Oe||(Oe=0),et=!1,ot="",this.openNode(ke,Ne,Oe),Ne.state=ce.OpenTag,ot+=this.indent(ke,Ne,Oe)+"<"+ke.name,wt=ke.attribs;for(Mt in wt)Pe.call(wt,Mt)&&(Fe=wt[Mt],ot+=this.attribute(Fe,Ne,Oe));if(Ye=ke.children.length,ze=Ye===0?null:ke.children[0],Ye===0||ke.children.every(function(vt){return(vt.type===ve.Text||vt.type===ve.Raw)&&vt.value===""}))Ne.allowEmpty?(ot+=">",Ne.state=ce.CloseTag,ot+="</"+ke.name+">"+this.endline(ke,Ne,Oe)):(Ne.state=ce.CloseTag,ot+=Ne.spaceBeforeSlash+"/>"+this.endline(ke,Ne,Oe));else if(Ne.pretty&&Ye===1&&(ze.type===ve.Text||ze.type===ve.Raw)&&ze.value!=null)ot+=">",Ne.state=ce.InsideTag,Ne.suppressPrettyCount++,et=!0,ot+=this.writeChildNode(ze,Ne,Oe+1),Ne.suppressPrettyCount--,et=!1,Ne.state=ce.CloseTag,ot+="</"+ke.name+">"+this.endline(ke,Ne,Oe);else{if(Ne.dontPrettyTextNodes){for(Et=ke.children,Ze=0,ht=Et.length;Ze<ht;Ze++)if(Re=Et[Ze],(Re.type===ve.Text||Re.type===ve.Raw)&&Re.value!=null){Ne.suppressPrettyCount++,et=!0;break}}for(ot+=">"+this.endline(ke,Ne,Oe),Ne.state=ce.InsideTag,Tt=ke.children,at=0,pt=Tt.length;at<pt;at++)Re=Tt[at],ot+=this.writeChildNode(Re,Ne,Oe+1);Ne.state=ce.CloseTag,ot+=this.indent(ke,Ne,Oe)+"</"+ke.name+">",et&&Ne.suppressPrettyCount--,ot+=this.endline(ke,Ne,Oe),Ne.state=ce.None}return this.closeNode(ke,Ne,Oe),ot},Ie.prototype.writeChildNode=function(ke,Ne,Oe){switch(ke.type){case ve.CData:return this.cdata(ke,Ne,Oe);case ve.Comment:return this.comment(ke,Ne,Oe);case ve.Element:return this.element(ke,Ne,Oe);case ve.Raw:return this.raw(ke,Ne,Oe);case ve.Text:return this.text(ke,Ne,Oe);case ve.ProcessingInstruction:return this.processingInstruction(ke,Ne,Oe);case ve.Dummy:return"";case ve.Declaration:return this.declaration(ke,Ne,Oe);case ve.DocType:return this.docType(ke,Ne,Oe);case ve.AttributeDeclaration:return this.dtdAttList(ke,Ne,Oe);case ve.ElementDeclaration:return this.dtdElement(ke,Ne,Oe);case ve.EntityDeclaration:return this.dtdEntity(ke,Ne,Oe);case ve.NotationDeclaration:return this.dtdNotation(ke,Ne,Oe);default:throw new Error("Unknown XML node type: "+ke.constructor.name)}},Ie.prototype.processingInstruction=function(ke,Ne,Oe){var Fe;return this.openNode(ke,Ne,Oe),Ne.state=ce.OpenTag,Fe=this.indent(ke,Ne,Oe)+"<?",Ne.state=ce.InsideTag,Fe+=ke.target,ke.value&&(Fe+=" "+ke.value),Ne.state=ce.CloseTag,Fe+=Ne.spaceBeforeSlash+"?>",Fe+=this.endline(ke,Ne,Oe),Ne.state=ce.None,this.closeNode(ke,Ne,Oe),Fe},Ie.prototype.raw=function(ke,Ne,Oe){var Fe;return this.openNode(ke,Ne,Oe),Ne.state=ce.OpenTag,Fe=this.indent(ke,Ne,Oe),Ne.state=ce.InsideTag,Fe+=ke.value,Ne.state=ce.CloseTag,Fe+=this.endline(ke,Ne,Oe),Ne.state=ce.None,this.closeNode(ke,Ne,Oe),Fe},Ie.prototype.text=function(ke,Ne,Oe){var Fe;return this.openNode(ke,Ne,Oe),Ne.state=ce.OpenTag,Fe=this.indent(ke,Ne,Oe),Ne.state=ce.InsideTag,Fe+=ke.value,Ne.state=ce.CloseTag,Fe+=this.endline(ke,Ne,Oe),Ne.state=ce.None,this.closeNode(ke,Ne,Oe),Fe},Ie.prototype.dtdAttList=function(ke,Ne,Oe){var Fe;return this.openNode(ke,Ne,Oe),Ne.state=ce.OpenTag,Fe=this.indent(ke,Ne,Oe)+"<!ATTLIST",Ne.state=ce.InsideTag,Fe+=" "+ke.elementName+" "+ke.attributeName+" "+ke.attributeType,ke.defaultValueType!=="#DEFAULT"&&(Fe+=" "+ke.defaultValueType),ke.defaultValue&&(Fe+=' "'+ke.defaultValue+'"'),Ne.state=ce.CloseTag,Fe+=Ne.spaceBeforeSlash+">"+this.endline(ke,Ne,Oe),Ne.state=ce.None,this.closeNode(ke,Ne,Oe),Fe},Ie.prototype.dtdElement=function(ke,Ne,Oe){var Fe;return this.openNode(ke,Ne,Oe),Ne.state=ce.OpenTag,Fe=this.indent(ke,Ne,Oe)+"<!ELEMENT",Ne.state=ce.InsideTag,Fe+=" "+ke.name+" "+ke.value,Ne.state=ce.CloseTag,Fe+=Ne.spaceBeforeSlash+">"+this.endline(ke,Ne,Oe),Ne.state=ce.None,this.closeNode(ke,Ne,Oe),Fe},Ie.prototype.dtdEntity=function(ke,Ne,Oe){var Fe;return this.openNode(ke,Ne,Oe),Ne.state=ce.OpenTag,Fe=this.indent(ke,Ne,Oe)+"<!ENTITY",Ne.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)),Ne.state=ce.CloseTag,Fe+=Ne.spaceBeforeSlash+">"+this.endline(ke,Ne,Oe),Ne.state=ce.None,this.closeNode(ke,Ne,Oe),Fe},Ie.prototype.dtdNotation=function(ke,Ne,Oe){var Fe;return this.openNode(ke,Ne,Oe),Ne.state=ce.OpenTag,Fe=this.indent(ke,Ne,Oe)+"<!NOTATION",Ne.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+'"'),Ne.state=ce.CloseTag,Fe+=Ne.spaceBeforeSlash+">"+this.endline(ke,Ne,Oe),Ne.state=ce.None,this.closeNode(ke,Ne,Oe),Fe},Ie.prototype.openNode=function(ke,Ne,Oe){},Ie.prototype.closeNode=function(ke,Ne,Oe){},Ie.prototype.openAttribute=function(ke,Ne,Oe){},Ie.prototype.closeAttribute=function(ke,Ne,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,_e,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"),_e.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},_e.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)},_e.exports.stringWriter=function(ee){return new me(ee)},_e.exports.streamWriter=function(ee,ae){return new we(ee,ae)},_e.exports.implementation=new be,_e.exports.nodeType=ve,_e.exports.writerState=ce}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLDOMImplementation":437,"./XMLDocument":445,"./XMLDocumentCB":446,"./XMLStreamWriter":454,"./XMLStringWriter":455}],460:[function(ie,_e,je){_e.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,_e,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,_e,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)}_e.exports={hash:me}},{buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.fill.js":273}],463:[function(ie,_e,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,Ne=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,Ne)}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}_e.exports=function(ae){return ve.hash(ae,be,16)}},{"./helpers":462}],464:[function(ie,_e,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,Ne=0;Ne<80;Ne++){Ne<16?fe[Ne]=me[ue+Ne]:fe[Ne]=we(fe[Ne-3]^fe[Ne-8]^fe[Ne-14]^fe[Ne-16],1);var Oe=ye(ye(we(z,5),be(Ne,ee,ae,re)),ye(ye(le,fe[Ne]),Ce(Ne)));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}_e.exports=function(xe){return ve.hash(xe,ce,20,!0)}},{"./helpers":462}],465:[function(ie,_e,je){"use strict";_e.exports=function(){return function(){}}},{}],466:[function(ie,_e,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;_e.exports.string=function(z){return typeof z=="string"},_e.exports.array=me,_e.exports.buffer=ve.isBuffer;function xe(fe){return fe instanceof ye}_e.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,_e,je){"use strict";var ve=ie("immediate"),ce=_e.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,_e,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 an!="undefined"?an: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,_e,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 an!="undefined"?an: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,_e,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=_e.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(Re){return xe(Re)}),{type:(Ee["content-type"]||{}).value||""}):Pe=be.concat(ue._body).toString());var Ie=[];if(Object.keys(Ee).forEach(function(Re){var Ye=Ee[Re].name,ze=Ee[Re].value;Array.isArray(ze)?ze.forEach(function(Ze){Ie.push([Ye,Ze])}):Ie.push([Ye,ze])}),ue._mode==="fetch"){var ke=null,Ne=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(Re){ue._fetchResponse=Re,ue._connect()},function(Re){ce.clearTimeout(ue._fetchTimer),ue._destroyed||ue.emit("error",Re)})}else{var Fe=ue._xhr=new ce.XMLHttpRequest;try{Fe.open(ue._opts.method,ue._opts.url,!0)}catch(Re){ve.nextTick(function(){ue.emit("error",Re)});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(Re){Fe.setRequestHeader(Re[0],Re[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(Re){ve.nextTick(function(){ue.emit("error",Re)});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 an!="undefined"?an: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,_e,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(Ne){if(!re._destroyed){if(Ne.done){ce.clearTimeout(ae),re.push(null);return}re.push(new be(Ne.value)),ke()}}).catch(function(Ne){ce.clearTimeout(ae),re._destroyed||re.emit("error",Ne)})};if(re._fetchResponse=z,re.url=z.url,re.statusCode=z.status,re.statusMessage=z.statusText,z.headers.forEach(function(ke,Ne){re.headers[Ne.toLowerCase()]=ke,re.rawHeaders.push(Ne,ke)}),Ce.writableStream){var ue=new WritableStream({write:function(Ne){return new Promise(function(Oe,Fe){re._destroyed?Fe():re.push(new be(Ne))?Oe():re._resumeFetch=Oe})},close:function(){ce.clearTimeout(ae),re._destroyed||re.push(null)},abort:function(Ne){re._destroyed||re.emit("error",Ne)}});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 Ne=ke.match(/^([^:]+):\s*(.*)/);if(Ne){var Oe=Ne[1].toLowerCase();Oe==="set-cookie"?(re.headers[Oe]===void 0&&(re.headers[Oe]=[]),re.headers[Oe].push(Ne[2])):re.headers[Oe]!==void 0?re.headers[Oe]+=", "+Ne[2]:re.headers[Oe]=Ne[2],re.rawHeaders.push(Ne[1],Ne[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 an!="undefined"?an: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,_e,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=Ne,je.resolve=Fe,je.resolveObject=Re,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 Ne(Ye,ze,Ze){if(Ye&&Ce.isObject(Ye)&&Ye instanceof ye)return Ye;var at=new ye;return at.parse(Ye,ze,Ze),at}ye.prototype.parse=function(Ye,ze,Ze){if(!Ce.isString(Ye))throw new TypeError("Parameter 'url' must be a string, not "+(0,ce.default)(Ye));var at=Ye.indexOf("?"),ht=at!==-1&&at<Ye.indexOf("#")?"?":"#",pt=Ye.split(ht),Mt=/\\/g;pt[0]=pt[0].replace(Mt,"/"),Ye=pt.join(ht);var et=Ye;if(et=et.trim(),!Ze&&Ye.split("#").length===1){var ot=xe.exec(et);if(ot)return this.path=et,this.href=et,this.pathname=ot[1],ot[2]?(this.search=ot[2],ze?this.query=ke.parse(this.search.substr(1)):this.query=this.search.substr(1)):ze&&(this.search="",this.query={}),this}var wt=we.exec(et);if(wt){wt=wt[0];var Et=wt.toLowerCase();this.protocol=Et,et=et.substr(wt.length)}if(Ze||wt||et.match(/^\/\/[^@\/]+@[^@\/]+/)){var Tt=et.substr(0,2)==="//";Tt&&!(wt&&Pe[wt])&&(et=et.substr(2),this.slashes=!0)}if(!Pe[wt]&&(Tt||wt&&!Ie[wt])){for(var vt=-1,gt=0;gt<re.length;gt++){var yt=et.indexOf(re[gt]);yt!==-1&&(vt===-1||yt<vt)&&(vt=yt)}var It,Ot;vt===-1?Ot=et.lastIndexOf("@"):Ot=et.lastIndexOf("@",vt),Ot!==-1&&(It=et.slice(0,Ot),et=et.slice(Ot+1),this.auth=decodeURIComponent(It)),vt=-1;for(var gt=0;gt<ae.length;gt++){var yt=et.indexOf(ae[gt]);yt!==-1&&(vt===-1||yt<vt)&&(vt=yt)}vt===-1&&(vt=et.length),this.host=et.slice(0,vt),et=et.slice(vt),this.parseHost(),this.hostname=this.hostname||"";var Vt=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Vt)for(var Ct=this.hostname.split("."),gt=0,mt=Ct.length;gt<mt;gt++){var nt=Ct[gt];if(nt&&!nt.match(ue)){for(var ft="",Xe=0,ut=nt.length;Xe<ut;Xe++)nt.charCodeAt(Xe)>127?ft+="x":ft+=nt[Xe];if(!ft.match(ue)){var bt=Ct.slice(0,gt),St=Ct.slice(gt+1),lt=nt.match(pe);lt&&(bt.push(lt[1]),St.unshift(lt[2])),St.length&&(et="/"+St.join(".")+et),this.hostname=bt.join(".");break}}}this.hostname.length>le?this.hostname="":this.hostname=this.hostname.toLowerCase(),Vt||(this.hostname=be.toASCII(this.hostname));var Qe=this.port?":"+this.port:"",Ue=this.hostname||"";this.host=Ue+Qe,this.href+=this.host,Vt&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),et[0]!=="/"&&(et="/"+et))}if(!Ee[Et])for(var gt=0,mt=ee.length;gt<mt;gt++){var We=ee[gt];if(et.indexOf(We)!==-1){var qe=encodeURIComponent(We);qe===We&&(qe=escape(We)),et=et.split(We).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=Ne(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||"",Ze=this.pathname||"",at=this.hash||"",ht=!1,pt="";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&&(pt=ke.stringify(this.query));var Mt=this.search||pt&&"?"+pt||"";return ze&&ze.substr(-1)!==":"&&(ze+=":"),this.slashes||(!ze||Ie[ze])&&ht!==!1?(ht="//"+(ht||""),Ze&&Ze.charAt(0)!=="/"&&(Ze="/"+Ze)):ht||(ht=""),at&&at.charAt(0)!=="#"&&(at="#"+at),Mt&&Mt.charAt(0)!=="?"&&(Mt="?"+Mt),Ze=Ze.replace(/[?#]/g,function(et){return encodeURIComponent(et)}),Mt=Mt.replace("#","%23"),ze+ht+Ze+Mt+at};function Fe(Ye,ze){return Ne(Ye,!1,!0).resolve(ze)}ye.prototype.resolve=function(Ye){return this.resolveObject(Ne(Ye,!1,!0)).format()};function Re(Ye,ze){return Ye?Ne(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 Ze=new ye,at=Object.keys(this),ht=0;ht<at.length;ht++){var pt=at[ht];Ze[pt]=this[pt]}if(Ze.hash=Ye.hash,Ye.href==="")return Ze.href=Ze.format(),Ze;if(Ye.slashes&&!Ye.protocol){for(var Mt=Object.keys(Ye),et=0;et<Mt.length;et++){var ot=Mt[et];ot!=="protocol"&&(Ze[ot]=Ye[ot])}return Ie[Ze.protocol]&&Ze.hostname&&!Ze.pathname&&(Ze.path=Ze.pathname="/"),Ze.href=Ze.format(),Ze}if(Ye.protocol&&Ye.protocol!==Ze.protocol){if(!Ie[Ye.protocol]){for(var wt=Object.keys(Ye),Et=0;Et<wt.length;Et++){var Tt=wt[Et];Ze[Tt]=Ye[Tt]}return Ze.href=Ze.format(),Ze}if(Ze.protocol=Ye.protocol,!Ye.host&&!Pe[Ye.protocol]){for(var mt=(Ye.pathname||"").split("/");mt.length&&!(Ye.host=mt.shift()););Ye.host||(Ye.host=""),Ye.hostname||(Ye.hostname=""),mt[0]!==""&&mt.unshift(""),mt.length<2&&mt.unshift(""),Ze.pathname=mt.join("/")}else Ze.pathname=Ye.pathname;if(Ze.search=Ye.search,Ze.query=Ye.query,Ze.host=Ye.host||"",Ze.auth=Ye.auth,Ze.hostname=Ye.hostname||Ye.host,Ze.port=Ye.port,Ze.pathname||Ze.search){var vt=Ze.pathname||"",gt=Ze.search||"";Ze.path=vt+gt}return Ze.slashes=Ze.slashes||Ye.slashes,Ze.href=Ze.format(),Ze}var yt=Ze.pathname&&Ze.pathname.charAt(0)==="/",It=Ye.host||Ye.pathname&&Ye.pathname.charAt(0)==="/",Ot=It||yt||Ze.host&&Ye.pathname,Vt=Ot,Ct=Ze.pathname&&Ze.pathname.split("/")||[],mt=Ye.pathname&&Ye.pathname.split("/")||[],nt=Ze.protocol&&!Ie[Ze.protocol];if(nt&&(Ze.hostname="",Ze.port=null,Ze.host&&(Ct[0]===""?Ct[0]=Ze.host:Ct.unshift(Ze.host)),Ze.host="",Ye.protocol&&(Ye.hostname=null,Ye.port=null,Ye.host&&(mt[0]===""?mt[0]=Ye.host:mt.unshift(Ye.host)),Ye.host=null),Ot=Ot&&(mt[0]===""||Ct[0]==="")),It)Ze.host=Ye.host||Ye.host===""?Ye.host:Ze.host,Ze.hostname=Ye.hostname||Ye.hostname===""?Ye.hostname:Ze.hostname,Ze.search=Ye.search,Ze.query=Ye.query,Ct=mt;else if(mt.length)Ct||(Ct=[]),Ct.pop(),Ct=Ct.concat(mt),Ze.search=Ye.search,Ze.query=Ye.query;else if(!Ce.isNullOrUndefined(Ye.search)){if(nt){Ze.hostname=Ze.host=Ct.shift();var ft=Ze.host&&Ze.host.indexOf("@")>0?Ze.host.split("@"):!1;ft&&(Ze.auth=ft.shift(),Ze.host=Ze.hostname=ft.shift())}return Ze.search=Ye.search,Ze.query=Ye.query,(!Ce.isNull(Ze.pathname)||!Ce.isNull(Ze.search))&&(Ze.path=(Ze.pathname?Ze.pathname:"")+(Ze.search?Ze.search:"")),Ze.href=Ze.format(),Ze}if(!Ct.length)return Ze.pathname=null,Ze.search?Ze.path="/"+Ze.search:Ze.path=null,Ze.href=Ze.format(),Ze;for(var Xe=Ct.slice(-1)[0],ut=(Ze.host||Ye.host||Ct.length>1)&&(Xe==="."||Xe==="..")||Xe==="",bt=0,St=Ct.length;St>=0;St--)Xe=Ct[St],Xe==="."?Ct.splice(St,1):Xe===".."?(Ct.splice(St,1),bt++):bt&&(Ct.splice(St,1),bt--);if(!Ot&&!Vt)for(;bt--;bt)Ct.unshift("..");Ot&&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(nt){Ze.hostname=Ze.host=lt?"":Ct.length?Ct.shift():"";var ft=Ze.host&&Ze.host.indexOf("@")>0?Ze.host.split("@"):!1;ft&&(Ze.auth=ft.shift(),Ze.host=Ze.hostname=ft.shift())}return Ot=Ot||Ze.host&&Ct.length,Ot&&!lt&&Ct.unshift(""),Ct.length?Ze.pathname=Ct.join("/"):(Ze.pathname=null,Ze.path=null),(!Ce.isNull(Ze.pathname)||!Ce.isNull(Ze.search))&&(Ze.path=(Ze.pathname?Ze.pathname:"")+(Ze.search?Ze.search:"")),Ze.auth=Ye.auth||Ze.auth,Ze.slashes=Ze.slashes||Ye.slashes,Ze.href=Ze.format(),Ze},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,_e,je){"use strict";var ve=ie("@babel/runtime/helpers/interopRequireDefault"),ce=ve(ie("@babel/runtime/helpers/typeof"));_e.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,_e,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,_e,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,Ne,Oe){if(ke)return Ie(ke);Pe({data:Ne,status:Oe.statusCode,headers:Oe.headers,res:Oe})}}je.TIMEOUTS=[z("300s"),z("300s")];var Ee=["json","text"];je.request=function(Ie,ke,Ne){return arguments.length===2&&typeof ke=="function"&&(Ne=ke,ke=null),typeof Ne=="function"?je.requestWithCallback(Ie,ke,Ne):new Promise(function(Oe,Fe){je.requestWithCallback(Ie,ke,pe(Oe,Fe))})},je.requestWithCallback=function(Ie,ke,Ne){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"&&(Ne=ke,ke=null),ke=ke||{},ee>=ae&&(ee=0);var Fe=++ee;ke.requestUrls=ke.requestUrls||[];var Re={requestId:Fe,url:Ie,args:ke,ctx:ke.ctx};ke.emitter&&ke.emitter.emit("request",Re),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 Ze=(ke.type||ke.method||ze.method||"GET").toUpperCase(),at=ze.port||80,ht=me,pt=le(ke.agent,je.agent),Mt=ke.fixJSONCtlChars;ze.protocol==="https:"&&(ht=xe,pt=le(ke.httpsAgent,je.httpsAgent),ze.port||(at=443));var et={host:ze.hostname||ze.host||"localhost",path:ze.path||"/",method:Ze,port:at,agent:pt,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 ot=ke.auth||ze.auth;ot&&(et.auth=ot);var wt=ke.content||ke.data,Et=Ze==="GET"||Ze==="HEAD"||ke.dataAsQueryString;if(!ke.content&&wt&&!(typeof wt=="string"||ce.isBuffer(wt)))if(Et)wt=ke.nestedQuerystring?qs.stringify(wt):querystring.stringify(wt);else{var Tt=et.headers["Content-Type"]||et.headers["content-type"];Tt||(ke.contentType==="json"?Tt="application/json":Tt="application/x-www-form-urlencoded",et.headers["Content-Type"]=Tt),ue(Tt)==="application/json"?wt=JSON.stringify(wt):wt=ke.nestedQuerystring?qs.stringify(wt):querystring.stringify(wt)}Et&&wt&&(et.path+=(ze.query?"&":"?")+wt,wt=null);var vt=0;if(wt){var gt=wt.length;ce.isBuffer(wt)||(gt=ce.byteLength(wt)),vt=et.headers["Content-Length"]=gt}ke.dataType==="json"&&(et.headers.Accept="application/json"),typeof ke.beforeRequest=="function"&&ke.beforeRequest(et);var yt=null,It=null,Ot=null,Vt=!1,Ct=!1,mt=0,nt=-1,ft=!1,Xe="",ut="",bt=null;ke.timing&&(bt={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function St(){yt&&(clearTimeout(yt),yt=null)}function lt(){It&&(clearTimeout(It),It=null)}function Qe(zt,Xt,At){if(lt(),!Ne){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),Fe,ve.pid,et.method,Ie),zt&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
|
stack: %s`,Date(),Fe,ve.pid,zt.name,zt.message,zt.stack);return}var Nt=Ne;Ne=null;var qt={};At&&(nt=At.statusCode,qt=At.headers);var on=Date.now()-Ye;bt&&(bt.contentDownload=on),fe("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",on,mt,nt,et.method,et.host,et.path,Ct,bt);var gn={status:nt,statusCode:nt,headers:qt,size:mt,aborted:ft,rt:on,keepAliveSocket:Ct,data:Xt,requestUrls:ke.requestUrls,timing:bt,remoteAddress:Xe,remotePort:ut};if(zt){var kn="";pt&&typeof pt.getCurrentStatus=="function"&&(kn=", agent status: "+JSON.stringify(pt.getCurrentStatus())),zt.message+=", "+et.method+" "+Ie+" "+nt+" (connected: "+Vt+", keepalive socket: "+Ct+kn+`)
|
|
|
headers: `+JSON.stringify(qt),zt.data=Xt,zt.path=et.path,zt.status=nt,zt.headers=qt,zt.res=gn}Nt(zt,Xt,ke.streaming?At:gn),ke.emitter&&(Re.url=Ie,Re.socket=Ve&&Ve.connection,Re.options=et,Re.size=vt,ke.emitter.emit("response",{requestId:Fe,error:zt,ctx:ke.ctx,req:Re,res:gn}))}function Ue(zt){var Xt=null;if(ke.followRedirect&&statuses.redirect[zt.statusCode]){ke._followRedirectCount=(ke._followRedirectCount||0)+1;var At=zt.headers.location;if(!At)Xt=new Error("Got statusCode "+zt.statusCode+" but cannot resolve next location from headers"),Xt.name="FollowRedirectError";else if(ke._followRedirectCount>ke.maxRedirects)Xt=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+Ie),Xt.name="MaxRedirectError";else{var Nt=ke.formatRedirectUrl?ke.formatRedirectUrl(Ie,At):we.resolve(Ie,At);fe("Request#%d %s: `redirected` from %s to %s",Fe,et.path,Ie,Nt),lt(),ke.headers&&ke.headers.Host&&re.test(At)&&(ke.headers.Host=null);var qt=Ne;return Ne=null,je.requestWithCallback(Nt,ke,qt),{redirect:!0,error:null}}}return{redirect:!1,error:Xt}}ke.gzip&&!et.headers["Accept-Encoding"]&&!et.headers["accept-encoding"]&&(et.headers["Accept-Encoding"]="gzip");function We(zt,Xt,At){var Nt=zt.headers["content-encoding"];return At(null,Xt,Nt)}var qe=ke.writeStream;fe("Request#%d %s %s with headers %j, options.path: %s",Fe,Ze,Ie,et.headers,et.path),ke.requestUrls.push(Ie);function He(zt){if(bt&&(bt.waiting=Date.now()-Ye),fe("Request#%d %s `req response` event emit: status %d, headers: %j",Fe,Ie,zt.statusCode,zt.headers),ke.streaming){var Xt=Ue(zt);if(Xt.redirect){zt.resume();return}return Xt.error?(zt.resume(),Qe(Xt.error,null,zt)):Qe(null,null,zt)}if(zt.on("close",function(){fe("Request#%d %s: `res close` event emit, total size %d",Fe,Ie,mt)}),zt.on("error",function(){fe("Request#%d %s: `res error` event emit, total size %d",Fe,Ie,mt)}),zt.on("aborted",function(){ft=!0,fe("Request#%d %s: `res aborted` event emit, total size %d",Fe,Ie,mt)}),qe){var At=Ue(zt);if(At.redirect){zt.resume();return}return At.error?(zt.resume(),qe.end(),Qe(At.error,null,zt)):(ke.consumeWriteStream===!1?zt.on("end",Qe.bind(null,null,null,zt)):qe.on("close",function(){fe("Request#%d %s: writeStream close event emitted",Fe,Ie),Qe(Ot||null,null,zt)}),zt.pipe(qe))}var Nt=[];zt.on("data",function(qt){fe("Request#%d %s: `res data` event emit, size %d",Fe,Ie,qt.length),mt+=qt.length,Nt.push(qt)}),zt.on("end",function(){var qt=ce.concat(Nt,mt);if(fe("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",Fe,Ie,mt,zt._dumped),Ot)return Qe(Ot,qt,zt);var on=Ue(zt);if(on.error)return Qe(on.error,qt,zt);on.redirect||We(zt,qt,function(gn,kn,Kn){if(gn)return Qe(gn,qt,zt);if(!Kn&&Ee.indexOf(ke.dataType)>=0){try{kn=decodeBodyByCharset(kn,zt)}catch(hr){return fe("decodeBodyByCharset error: %s",hr),Qe(null,kn,zt)}if(ke.dataType==="json")if(mt===0)kn=null;else{var Xn=parseJSON(kn,Mt);Xn.error?gn=Xn.error:kn=Xn.data}}ft&&fe("Request#%d %s: Remote socket was terminated before `response.end()` was called",Fe,Ie),Qe(gn,kn,zt)})})}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 Ke(){fe("Connect timer ticking, timeout: %d",De),yt=setTimeout(function(){yt=null,nt===-1&&(nt=-2);var zt="Connect timeout for "+De+"ms",Xt="ConnectionTimeoutError";Ve.socket||(Xt="SocketAssignTimeoutError",zt+=", working sockets is full"),Ot=new Error(zt),Ot.name=Xt,Ot.requestId=Fe,fe("ConnectTimeout: Request#%d %s %s: %s, connected: %s",Fe,Ie,Ot.name,zt,Vt),kt()},De)}function dt(){fe("Response timer ticking, timeout: %d",Le),It=setTimeout(function(){It=null;var zt="Response timeout for "+Le+"ms",Xt="ResponseTimeoutError";Ot=new Error(zt),Ot.name=Xt,Ot.requestId=Fe,fe("ResponseTimeout: Request#%d %s %s: %s, connected: %s",Fe,Ie,Ot.name,zt,Vt),kt()},Le)}var Ve;et.mode=ke.mode?ke.mode:"";try{Ve=ht.request(et,He)}catch(zt){return Qe(zt)}typeof window=="undefined"?Ke():Ve.on("requestTimeout",function(){nt===-1&&(nt=-2);var zt="Connect timeout for "+De+"ms",Xt="ConnectionTimeoutError";Ot=new Error(zt),Ot.name=Xt,Ot.requestId=Fe,kt()});function kt(){fe("Request#%d %s abort, connected: %s",Fe,Ie,Vt),Ve.socket||(Ot.noSocket=!0,Qe(Ot)),Ve.abort()}return bt&&Ve.on("finish",function(){bt.requestSent=Date.now()-Ye}),Ve.once("socket",function(zt){bt&&(bt.queuing=Date.now()-Ye);var Xt=zt.readyState;if(Xt==="opening"){zt.once("lookup",function(At,Nt,qt){fe("Request#%d %s lookup: %s, %s, %s",Fe,Ie,At,Nt,qt),bt&&(bt.dnslookup=Date.now()-Ye),Nt&&(Xe=Nt)}),zt.once("connect",function(){bt&&(bt.connected=Date.now()-Ye),St(),dt(),fe("Request#%d %s new socket connected",Fe,Ie),Vt=!0,Xe||(Xe=zt.remoteAddress),ut=zt.remotePort});return}fe("Request#%d %s reuse socket connected, readyState: %s",Fe,Ie,Xt),Vt=!0,Ct=!0,Xe||(Xe=zt.remoteAddress),ut=zt.remotePort,St(),dt()}),Ve.on("error",function(zt){(zt.name==="Error"||zt.name==="TypeError")&&(zt.name=Vt?"ResponseError":"RequestError"),zt.message+=' (req "error")',fe("Request#%d %s `req error` event emit, %s: %s",Fe,Ie,zt.name,zt.message),Qe(Ot||zt)}),qe&&qe.once("error",function(zt){zt.message+=' (writeStream "error")',Ot=zt,fe("Request#%d %s `writeStream error` event emit, %s: %s",Fe,Ie,zt.name,zt.message),kt()}),ke.stream?(ke.stream.pipe(Ve),ke.stream.once("error",function(zt){zt.message+=' (stream "error")',Ot=zt,fe("Request#%d %s `readStream error` event emit, %s: %s",Fe,Ie,zt.name,zt.message),kt()})):Ve.end(wt),Ve.requestId=Fe,Ve}}).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(Pn,an){"use strict";function $e(){const it=Object.assign({},arguments.length<=0?void 0:arguments[0]);for(let xt=1;xt<arguments.length;xt++){const ie=xt<0||arguments.length<=xt?void 0:arguments[xt];ie&&Object.keys(ie).forEach(_e=>{const je=ie[_e];je!==void 0&&(it[_e]=je)})}return it}an.Z=$e},77578:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return it}});const it=xt=>xt?typeof xt=="function"?xt():xt:null},13845:function(Pn,an,$e){"use strict";$e.d(an,{F:function(){return it},Z:function(){return xt}});function it(ie){return ie!=null&&ie===ie.window}function xt(ie,_e){var je,ve;if(typeof window=="undefined")return 0;const ce=_e?"scrollTop":"scrollLeft";let be=0;return it(ie)?be=ie[_e?"pageYOffset":"pageXOffset"]:ie instanceof Document?be=ie.documentElement[ce]:(ie instanceof HTMLElement||ie)&&(be=ie[ce]),ie&&!it(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(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return xt}});var it=$e(59301);function xt(){const[,ie]=it.useReducer(_e=>_e+1,0);return ie}},68031:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return _e}});var it=$e(16089);function xt(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 _e(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=xt(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,it.Z)(xe):typeof be=="function"&&be()};(0,it.Z)(xe)}},24905:function(Pn,an,$e){"use strict";$e.d(an,{default:function(){return Ie}});var it=$e(92310),xt=$e.n(it),ie=$e(5630),_e=$e(59301),je=$e(36355),ve=$e(1684),ce=$e(32441),Ce=_e.createContext(null),ye=$e(98447),we=$e(14088),me=$e(4572),xe=function(ke,Ne){var Oe={};for(var Fe in ke)Object.prototype.hasOwnProperty.call(ke,Fe)&&Ne.indexOf(Fe)<0&&(Oe[Fe]=ke[Fe]);if(ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Re=0,Fe=Object.getOwnPropertySymbols(ke);Re<Fe.length;Re++)Ne.indexOf(Fe[Re])<0&&Object.prototype.propertyIsEnumerable.call(ke,Fe[Re])&&(Oe[Fe[Re]]=ke[Fe[Re]]);return Oe};const fe=(ke,Ne)=>{var Oe;const{prefixCls:Fe,className:Re,rootClassName:Ye,children:ze,indeterminate:Ze=!1,style:at,onMouseEnter:ht,onMouseLeave:pt,skipGroup:Mt=!1,disabled:et}=ke,ot=xe(ke,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:wt,direction:Et,checkbox:Tt}=_e.useContext(je.E_),vt=_e.useContext(Ce),{isFormItemInput:gt}=_e.useContext(ce.aM),yt=_e.useContext(ve.Z),It=(Oe=(vt==null?void 0:vt.disabled)||et)!==null&&Oe!==void 0?Oe:yt,Ot=_e.useRef(ot.value);_e.useEffect(()=>{vt==null||vt.registerValue(ot.value)},[]),_e.useEffect(()=>{if(!Mt)return ot.value!==Ot.current&&(vt==null||vt.cancelValue(Ot.current),vt==null||vt.registerValue(ot.value),Ot.current=ot.value),()=>vt==null?void 0:vt.cancelValue(ot.value)},[ot.value]);const Vt=wt("checkbox",Fe),[Ct,mt]=(0,ye.ZP)(Vt),nt=Object.assign({},ot);vt&&!Mt&&(nt.onChange=function(){ot.onChange&&ot.onChange.apply(ot,arguments),vt.toggleOption&&vt.toggleOption({label:ze,value:ot.value})},nt.name=vt.name,nt.checked=vt.value.includes(ot.value));const ft=xt()(`${Vt}-wrapper`,{[`${Vt}-rtl`]:Et==="rtl",[`${Vt}-wrapper-checked`]:nt.checked,[`${Vt}-wrapper-disabled`]:It,[`${Vt}-wrapper-in-form-item`]:gt},Tt==null?void 0:Tt.className,Re,Ye,mt),Xe=xt()({[`${Vt}-indeterminate`]:Ze},me.A,mt),ut=Ze?"mixed":void 0;return Ct(_e.createElement(we.Z,{component:"Checkbox",disabled:It},_e.createElement("label",{className:ft,style:Object.assign(Object.assign({},Tt==null?void 0:Tt.style),at),onMouseEnter:ht,onMouseLeave:pt},_e.createElement(ie.Z,Object.assign({"aria-checked":ut},nt,{prefixCls:Vt,className:Xe,disabled:It,ref:Ne})),ze!==void 0&&_e.createElement("span",null,ze))))};var ee=_e.forwardRef(fe),ae=$e(80702),re=$e(2738),le=function(ke,Ne){var Oe={};for(var Fe in ke)Object.prototype.hasOwnProperty.call(ke,Fe)&&Ne.indexOf(Fe)<0&&(Oe[Fe]=ke[Fe]);if(ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Re=0,Fe=Object.getOwnPropertySymbols(ke);Re<Fe.length;Re++)Ne.indexOf(Fe[Re])<0&&Object.prototype.propertyIsEnumerable.call(ke,Fe[Re])&&(Oe[Fe[Re]]=ke[Fe[Re]]);return Oe};const ue=(ke,Ne)=>{const{defaultValue:Oe,children:Fe,options:Re=[],prefixCls:Ye,className:ze,rootClassName:Ze,style:at,onChange:ht}=ke,pt=le(ke,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:Mt,direction:et}=_e.useContext(je.E_),[ot,wt]=_e.useState(pt.value||Oe||[]),[Et,Tt]=_e.useState([]);_e.useEffect(()=>{"value"in pt&&wt(pt.value||[])},[pt.value]);const vt=_e.useMemo(()=>Re.map(bt=>typeof bt=="string"||typeof bt=="number"?{label:bt,value:bt}:bt),[Re]),gt=bt=>{Tt(St=>St.filter(lt=>lt!==bt))},yt=bt=>{Tt(St=>[].concat((0,ae.Z)(St),[bt]))},It=bt=>{const St=ot.indexOf(bt.value),lt=(0,ae.Z)(ot);St===-1?lt.push(bt.value):lt.splice(St,1),"value"in pt||wt(lt),ht==null||ht(lt.filter(Qe=>Et.includes(Qe)).sort((Qe,Ue)=>{const We=vt.findIndex(He=>He.value===Qe),qe=vt.findIndex(He=>He.value===Ue);return We-qe}))},Ot=Mt("checkbox",Ye),Vt=`${Ot}-group`,[Ct,mt]=(0,ye.ZP)(Ot),nt=(0,re.Z)(pt,["value","disabled"]),ft=Re.length?vt.map(bt=>_e.createElement(ee,{prefixCls:Ot,key:bt.value.toString(),disabled:"disabled"in bt?bt.disabled:pt.disabled,value:bt.value,checked:ot.includes(bt.value),onChange:bt.onChange,className:`${Vt}-item`,style:bt.style,title:bt.title},bt.label)):Fe,Xe={toggleOption:It,value:ot,disabled:pt.disabled,name:pt.name,registerValue:yt,cancelValue:gt},ut=xt()(Vt,{[`${Vt}-rtl`]:et==="rtl"},ze,Ze,mt);return Ct(_e.createElement("div",Object.assign({className:ut,style:at},nt,{ref:Ne}),_e.createElement(Ce.Provider,{value:Xe},ft)))},pe=_e.forwardRef(ue);var Ee=_e.memo(pe);const Pe=ee;Pe.Group=Ee,Pe.__ANT_CHECKBOX=!0;var Ie=Pe},98447:function(Pn,an,$e){"use strict";$e.d(an,{C2:function(){return je}});var it=$e(17313),xt=$e(37613),ie=$e(83116);const _e=ve=>{const{checkboxCls:ce}=ve,be=`${ce}-wrapper`;return[{[`${ce}-group`]:Object.assign(Object.assign({},(0,it.Wf)(ve)),{display:"inline-flex",flexWrap:"wrap",columnGap:ve.marginXS,[`> ${ve.antCls}-row`]:{flex:1}}),[be]:Object.assign(Object.assign({},(0,it.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,it.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,it.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,xt.TS)(ce,{checkboxCls:`.${ve}`,checkboxSize:ce.controlInteractiveSize});return[_e(be)]}an.ZP=(0,ie.Z)("Checkbox",(ve,ce)=>{let{prefixCls:be}=ce;return[je(be,ve)]})},36381:function(Pn,an,$e){"use strict";$e.d(an,{default:function(){return nt}});var it=$e(38819),xt=$e(92310),ie=$e.n(xt),_e=$e(72308),je=$e(80702),ve=$e(52487),ce=$e(62853),be=$e(18929),Ce=$e(48736),ye=$e(59301),we=$e(74416),me=$e(11592),xe=$e(49618),fe=$e(77900),z=$e(10228),ee=ye.forwardRef(function(ft,Xe){var ut=ft.prefixCls,bt=ft.forceRender,St=ft.className,lt=ft.style,Qe=ft.children,Ue=ft.isActive,We=ft.role,qe=ye.useState(Ue||bt),He=(0,ve.Z)(qe,2),De=He[0],Le=He[1];return ye.useEffect(function(){(bt||Ue)&&Le(!0)},[bt,Ue]),De?ye.createElement("div",{ref:Xe,className:ie()("".concat(ut,"-content"),(0,xe.Z)((0,xe.Z)({},"".concat(ut,"-content-active"),Ue),"".concat(ut,"-content-inactive"),!Ue),St),style:lt,role:We},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(ft,Xe){var ut=ft.showArrow,bt=ut===void 0?!0:ut,St=ft.headerClass,lt=ft.isActive,Qe=ft.onItemClick,Ue=ft.forceRender,We=ft.className,qe=ft.prefixCls,He=ft.collapsible,De=ft.accordion,Le=ft.panelKey,Ke=ft.extra,dt=ft.header,Ve=ft.expandIcon,kt=ft.openMotion,zt=ft.destroyInactivePanel,Xt=ft.children,At=(0,we.Z)(ft,re),Nt=He==="disabled",qt=He==="header",on=He==="icon",gn=Ke!=null&&typeof Ke!="boolean",kn=function(){Qe==null||Qe(Le)},Kn=function(Hr){(Hr.key==="Enter"||Hr.keyCode===z.Z.ENTER||Hr.which===z.Z.ENTER)&&kn()},Xn=typeof Ve=="function"?Ve(ft):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 hr=ie()((0,xe.Z)((0,xe.Z)((0,xe.Z)({},"".concat(qe,"-item"),!0),"".concat(qe,"-item-active"),lt),"".concat(qe,"-item-disabled"),Nt),We),dr=ie()(St,(0,xe.Z)((0,xe.Z)((0,xe.Z)({},"".concat(qe,"-header"),!0),"".concat(qe,"-header-collapsible-only"),qt),"".concat(qe,"-icon-collapsible-only"),on)),fr={className:dr,"aria-expanded":lt,"aria-disabled":Nt,onKeyDown:Kn};return!qt&&!on&&(fr.onClick=kn,fr.role=De?"tab":"button",fr.tabIndex=Nt?-1:0),ye.createElement("div",(0,_e.Z)({},At,{ref:Xe,className:hr}),ye.createElement("div",fr,bt&&Xn,ye.createElement("span",{className:"".concat(qe,"-header-text"),onClick:He==="header"?kn:void 0},dt),gn&&ye.createElement("div",{className:"".concat(qe,"-extra")},Ke)),ye.createElement(fe.default,(0,_e.Z)({visible:lt,leavedClassName:"".concat(qe,"-content-hidden")},kt,{forceRender:Ue,removeOnLeave:zt}),function(xr,Hr){var Yr=xr.className,Or=xr.style;return ye.createElement(ae,{ref:Hr,prefixCls:qe,className:Yr,style:Or,isActive:lt,forceRender:Ue,role:De?"tabpanel":void 0},Xt)}))}),ue=le,pe=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],Ee=function(Xe,ut){var bt=ut.prefixCls,St=ut.accordion,lt=ut.collapsible,Qe=ut.destroyInactivePanel,Ue=ut.onItemClick,We=ut.activeKey,qe=ut.openMotion,He=ut.expandIcon;return Xe.map(function(De,Le){var Ke=De.children,dt=De.label,Ve=De.key,kt=De.collapsible,zt=De.onItemClick,Xt=De.destroyInactivePanel,At=(0,we.Z)(De,pe),Nt=String(Ve!=null?Ve:Le),qt=kt!=null?kt:lt,on=Xt!=null?Xt:Qe,gn=function(Xn){qt!=="disabled"&&(Ue(Xn),zt==null||zt(Xn))},kn=!1;return St?kn=We[0]===Nt:kn=We.indexOf(Nt)>-1,ye.createElement(ue,(0,_e.Z)({},At,{prefixCls:bt,key:Nt,panelKey:Nt,isActive:kn,accordion:St,openMotion:qe,expandIcon:He,header:dt,collapsible:qt,onItemClick:gn,destroyInactivePanel:on}),Ke)})},Pe=function(Xe,ut,bt){if(!Xe)return null;var St=bt.prefixCls,lt=bt.accordion,Qe=bt.collapsible,Ue=bt.destroyInactivePanel,We=bt.onItemClick,qe=bt.activeKey,He=bt.openMotion,De=bt.expandIcon,Le=Xe.key||String(ut),Ke=Xe.props,dt=Ke.header,Ve=Ke.headerClass,kt=Ke.destroyInactivePanel,zt=Ke.collapsible,Xt=Ke.onItemClick,At=!1;lt?At=qe[0]===Le:At=qe.indexOf(Le)>-1;var Nt=zt!=null?zt:Qe,qt=function(kn){Nt!=="disabled"&&(We(kn),Xt==null||Xt(kn))},on={key:Le,panelKey:Le,header:dt,headerClass:Ve,isActive:At,prefixCls:St,destroyInactivePanel:kt!=null?kt:Ue,openMotion:He,accordion:lt,children:Xe.props.children,onItemClick:qt,expandIcon:De,collapsible:Nt};return typeof Xe.type=="string"?Xe:(Object.keys(on).forEach(function(gn){typeof on[gn]=="undefined"&&delete on[gn]}),ye.cloneElement(Xe,on))};function Ie(ft,Xe,ut){return Array.isArray(ft)?Ee(ft,ut):(0,me.Z)(Xe).map(function(bt,St){return Pe(bt,St,ut)})}var ke=Ie,Ne=$e(26112);function Oe(ft){var Xe=ft;if(!Array.isArray(Xe)){var ut=(0,ce.Z)(Xe);Xe=ut==="number"||ut==="string"?[Xe]:[]}return Xe.map(function(bt){return String(bt)})}var Fe=ye.forwardRef(function(ft,Xe){var ut=ft.prefixCls,bt=ut===void 0?"rc-collapse":ut,St=ft.destroyInactivePanel,lt=St===void 0?!1:St,Qe=ft.style,Ue=ft.accordion,We=ft.className,qe=ft.children,He=ft.collapsible,De=ft.openMotion,Le=ft.expandIcon,Ke=ft.activeKey,dt=ft.defaultActiveKey,Ve=ft.onChange,kt=ft.items,zt=ie()(bt,We),Xt=(0,be.Z)([],{value:Ke,onChange:function(Kn){return Ve==null?void 0:Ve(Kn)},defaultValue:dt,postState:Oe}),At=(0,ve.Z)(Xt,2),Nt=At[0],qt=At[1],on=function(Kn){return qt(function(){if(Ue)return Nt[0]===Kn?[]:[Kn];var Xn=Nt.indexOf(Kn),hr=Xn>-1;return hr?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 gn=ke(kt,qe,{prefixCls:bt,accordion:Ue,openMotion:De,expandIcon:Le,collapsible:He,destroyInactivePanel:lt,onItemClick:on,activeKey:Nt});return ye.createElement("div",(0,_e.Z)({ref:Xe,className:zt,style:Qe,role:Ue?"tablist":void 0},(0,Ne.Z)(ft,{aria:!0,data:!0})),gn)}),Re=Object.assign(Fe,{Panel:ue}),Ye=Re,ze=Re.Panel,Ze=$e(2738),at=$e(62892),ht=$e(92343),pt=$e(36355),Mt=$e(19716),ot=ye.forwardRef((ft,Xe)=>{const{getPrefixCls:ut}=ye.useContext(pt.E_),{prefixCls:bt,className:St,showArrow:lt=!0}=ft,Qe=ut("collapse",bt),Ue=ie()({[`${Qe}-no-arrow`]:!lt},St);return ye.createElement(Ye.Panel,Object.assign({ref:Xe},ft,{prefixCls:Qe,className:Ue}))}),wt=$e(17313),Et=$e(8378),Tt=$e(83116),vt=$e(37613);const gt=ft=>{const{componentCls:Xe,contentBg:ut,padding:bt,headerBg:St,headerPadding:lt,collapseHeaderPaddingSM:Qe,collapseHeaderPaddingLG:Ue,collapsePanelBorderRadius:We,lineWidth:qe,lineType:He,colorBorder:De,colorText:Le,colorTextHeading:Ke,colorTextDisabled:dt,fontSize:Ve,fontSizeLG:kt,lineHeight:zt,marginSM:Xt,paddingSM:At,paddingLG:Nt,paddingXS:qt,motionDurationSlow:on,fontSizeIcon:gn,contentPadding:kn}=ft,Kn=`${qe}px ${He} ${De}`;return{[Xe]:Object.assign(Object.assign({},(0,wt.Wf)(ft)),{backgroundColor:St,border:Kn,borderBottom:0,borderRadius:`${We}px`,"&-rtl":{direction:"rtl"},[`& > ${Xe}-item`]:{borderBottom:Kn,"&:last-child":{[`
|
|
|
&,
|
|
|
& > ${Xe}-header`]:{borderRadius:`0 0 ${We}px ${We}px`}},[`> ${Xe}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:lt,color:Ke,lineHeight:zt,cursor:"pointer",transition:`all ${on}, visibility 0s`,[`> ${Xe}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${Xe}-expand-icon`]:{height:Ve*zt,display:"flex",alignItems:"center",paddingInlineEnd:Xt},[`${Xe}-arrow`]:Object.assign(Object.assign({},(0,wt.Ro)()),{fontSize:gn,svg:{transition:`transform ${on}`}}),[`${Xe}-header-text`]:{marginInlineEnd:"auto"}},[`${Xe}-header-collapsible-only`]:{cursor:"default",[`${Xe}-header-text`]:{flex:"none",cursor:"pointer"}},[`${Xe}-icon-collapsible-only`]:{cursor:"default",[`${Xe}-expand-icon`]:{cursor:"pointer"}}},[`${Xe}-content`]:{color:Le,backgroundColor:ut,borderTop:Kn,[`& > ${Xe}-content-box`]:{padding:kn},"&-hidden":{display:"none"}},"&-small":{[`> ${Xe}-item`]:{[`> ${Xe}-header`]:{padding:Qe,paddingInlineStart:qt,[`> ${Xe}-expand-icon`]:{marginInlineStart:At-qt}},[`> ${Xe}-content > ${Xe}-content-box`]:{padding:At}}},"&-large":{[`> ${Xe}-item`]:{fontSize:kt,[`> ${Xe}-header`]:{padding:Ue,paddingInlineStart:bt,[`> ${Xe}-expand-icon`]:{height:kt*zt,marginInlineStart:Nt-bt}},[`> ${Xe}-content > ${Xe}-content-box`]:{padding:Nt}}},[`${Xe}-item:last-child`]:{[`> ${Xe}-content`]:{borderRadius:`0 0 ${We}px ${We}px`}},[`& ${Xe}-item-disabled > ${Xe}-header`]:{"\n &,\n & > .arrow\n ":{color:dt,cursor:"not-allowed"}},[`&${Xe}-icon-position-end`]:{[`& > ${Xe}-item`]:{[`> ${Xe}-header`]:{[`${Xe}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:Xt}}}}})}},yt=ft=>{const{componentCls:Xe}=ft,ut=`> ${Xe}-item > ${Xe}-header ${Xe}-arrow svg`;return{[`${Xe}-rtl`]:{[ut]:{transform:"rotate(180deg)"}}}},It=ft=>{const{componentCls:Xe,headerBg:ut,paddingXXS:bt,colorBorder:St}=ft;return{[`${Xe}-borderless`]:{backgroundColor:ut,border:0,[`> ${Xe}-item`]:{borderBottom:`1px solid ${St}`},[`
|
|
|
> ${Xe}-item:last-child,
|
|
|
> ${Xe}-item:last-child ${Xe}-header
|
|
|
`]:{borderRadius:0},[`> ${Xe}-item:last-child`]:{borderBottom:0},[`> ${Xe}-item > ${Xe}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${Xe}-item > ${Xe}-content > ${Xe}-content-box`]:{paddingTop:bt}}}},Ot=ft=>{const{componentCls:Xe,paddingSM:ut}=ft;return{[`${Xe}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${Xe}-item`]:{borderBottom:0,[`> ${Xe}-content`]:{backgroundColor:"transparent",border:0,[`> ${Xe}-content-box`]:{paddingBlock:ut}}}}}};var Vt=(0,Tt.Z)("Collapse",ft=>{const Xe=(0,vt.TS)(ft,{collapseHeaderPaddingSM:`${ft.paddingXS}px ${ft.paddingSM}px`,collapseHeaderPaddingLG:`${ft.padding}px ${ft.paddingLG}px`,collapsePanelBorderRadius:ft.borderRadiusLG});return[gt(Xe),It(Xe),Ot(Xe),yt(Xe),(0,Et.Z)(Xe)]},ft=>({headerPadding:`${ft.paddingSM}px ${ft.padding}px`,headerBg:ft.colorFillAlter,contentPadding:`${ft.padding}px 16px`,contentBg:ft.colorBgContainer})),mt=Object.assign(ye.forwardRef((ft,Xe)=>{const{getPrefixCls:ut,direction:bt,collapse:St}=ye.useContext(pt.E_),{prefixCls:lt,className:Qe,rootClassName:Ue,style:We,bordered:qe=!0,ghost:He,size:De,expandIconPosition:Le="start",children:Ke,expandIcon:dt}=ft,Ve=(0,Mt.Z)(Kn=>{var Xn;return(Xn=De!=null?De:Kn)!==null&&Xn!==void 0?Xn:"middle"}),kt=ut("collapse",lt),zt=ut(),[Xt,At]=Vt(kt),Nt=ye.useMemo(()=>Le==="left"?"start":Le==="right"?"end":Le,[Le]),qt=function(){let Kn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const Xn=dt?dt(Kn):ye.createElement(it.Z,{rotate:Kn.isActive?90:void 0});return(0,ht.Tm)(Xn,()=>({className:ie()(Xn.props.className,`${kt}-arrow`)}))},on=ie()(`${kt}-icon-position-${Nt}`,{[`${kt}-borderless`]:!qe,[`${kt}-rtl`]:bt==="rtl",[`${kt}-ghost`]:!!He,[`${kt}-${Ve}`]:Ve!=="middle"},St==null?void 0:St.className,Qe,Ue,At),gn=Object.assign(Object.assign({},(0,at.Z)(zt)),{motionAppear:!1,leavedClassName:`${kt}-content-hidden`}),kn=ye.useMemo(()=>Ke?(0,me.Z)(Ke).map((Kn,Xn)=>{var hr,dr;if(!((hr=Kn.props)===null||hr===void 0)&&hr.disabled){const fr=(dr=Kn.key)!==null&&dr!==void 0?dr:String(Xn),{disabled:xr,collapsible:Hr}=Kn.props,Yr=Object.assign(Object.assign({},(0,Ze.Z)(Kn.props,["disabled"])),{key:fr,collapsible:Hr!=null?Hr:xr?"disabled":void 0});return(0,ht.Tm)(Kn,Yr)}return Kn}):null,[Ke]);return Xt(ye.createElement(Ye,Object.assign({ref:Xe,openMotion:gn},(0,Ze.Z)(ft,["rootClassName"]),{expandIcon:qt,prefixCls:kt,className:on,style:Object.assign(Object.assign({},St==null?void 0:St.style),We)}),kn))}),{Panel:ot}),nt=mt},93891:function(Pn,an,$e){"use strict";var it=$e(59301),xt=$e(36355),ie=$e(64165);const _e=je=>{const{componentName:ve}=je,{getPrefixCls:ce}=(0,it.useContext)(xt.E_),be=ce("empty");switch(ve){case"Table":case"List":return it.createElement(ie.Z,{image:ie.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return it.createElement(ie.Z,{image:ie.Z.PRESENTED_IMAGE_SIMPLE,className:`${be}-small`});default:return it.createElement(ie.Z,null)}};an.Z=_e},43428:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return Ct}});var it=$e(92310),xt=$e.n(it),ie=$e(77321),_e=$e(52487),je=$e(43403),ve=$e(34280),ce=$e(59301),be=ce.createContext(null),Ce=ce.createContext({}),ye=be,we=$e(49618),me=$e(72308),xe=$e(77900),fe=$e(10228),z=$e(26112),ee=$e(70425),ae=function(nt){var ft=nt.prefixCls,Xe=nt.className,ut=nt.style,bt=nt.children,St=nt.containerRef,lt=nt.id,Qe=nt.onMouseEnter,Ue=nt.onMouseOver,We=nt.onMouseLeave,qe=nt.onClick,He=nt.onKeyDown,De=nt.onKeyUp,Le={onMouseEnter:Qe,onMouseOver:Ue,onMouseLeave:We,onClick:qe,onKeyDown:He,onKeyUp:De},Ke=ce.useContext(Ce),dt=Ke.panel,Ve=(0,ee.useComposeRef)(dt,St);return ce.createElement(ce.Fragment,null,ce.createElement("div",(0,me.Z)({id:lt,className:xt()("".concat(ft,"-content"),Xe),style:(0,ie.Z)({},ut),"aria-modal":"true",role:"dialog",ref:Ve},Le),bt))},re=ae,le=$e(48736);function ue(mt){return typeof mt=="string"&&String(Number(mt))===mt?((0,le.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(mt)):mt}function pe(mt){warning(!("wrapperClassName"in mt),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!mt.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(mt,nt){var ft,Xe,ut,bt,St=mt.prefixCls,lt=mt.open,Qe=mt.placement,Ue=mt.inline,We=mt.push,qe=mt.forceRender,He=mt.autoFocus,De=mt.keyboard,Le=mt.rootClassName,Ke=mt.rootStyle,dt=mt.zIndex,Ve=mt.className,kt=mt.id,zt=mt.style,Xt=mt.motion,At=mt.width,Nt=mt.height,qt=mt.children,on=mt.contentWrapperStyle,gn=mt.mask,kn=mt.maskClosable,Kn=mt.maskMotion,Xn=mt.maskClassName,hr=mt.maskStyle,dr=mt.afterOpenChange,fr=mt.onClose,xr=mt.onMouseEnter,Hr=mt.onMouseOver,Yr=mt.onMouseLeave,Or=mt.onClick,bi=mt.onKeyDown,Jr=mt.onKeyUp,tt=ce.useRef(),li=ce.useRef(),Si=ce.useRef();ce.useImperativeHandle(nt,function(){return tt.current});var xi=function(Jn){var Wt=Jn.keyCode,In=Jn.shiftKey;switch(Wt){case fe.Z.TAB:{if(Wt===fe.Z.TAB){if(!In&&document.activeElement===Si.current){var Wn;(Wn=li.current)===null||Wn===void 0||Wn.focus({preventScroll:!0})}else if(In&&document.activeElement===li.current){var ar;(ar=Si.current)===null||ar===void 0||ar.focus({preventScroll:!0})}}break}case fe.Z.ESC:{fr&&De&&(Jn.stopPropagation(),fr(Jn));break}}};ce.useEffect(function(){if(lt&&He){var Qn;(Qn=tt.current)===null||Qn===void 0||Qn.focus({preventScroll:!0})}},[lt]);var lr=ce.useState(!1),Ar=(0,_e.Z)(lr,2),Fr=Ar[0],Ii=Ar[1],wr=ce.useContext(ye),cn;We===!1?cn={distance:0}:We===!0?cn={}:cn=We||{};var un=(ft=(Xe=(ut=cn)===null||ut===void 0?void 0:ut.distance)!==null&&Xe!==void 0?Xe:wr==null?void 0:wr.pushDistance)!==null&&ft!==void 0?ft:180,Dt=ce.useMemo(function(){return{pushDistance:un,push:function(){Ii(!0)},pull:function(){Ii(!1)}}},[un]);ce.useEffect(function(){if(lt){var Qn;wr==null||(Qn=wr.push)===null||Qn===void 0||Qn.call(wr)}else{var Jn;wr==null||(Jn=wr.pull)===null||Jn===void 0||Jn.call(wr)}},[lt]),ce.useEffect(function(){return function(){var Qn;wr==null||(Qn=wr.pull)===null||Qn===void 0||Qn.call(wr)}},[]);var vn=gn&&ce.createElement(xe.default,(0,me.Z)({key:"mask"},Kn,{visible:lt}),function(Qn,Jn){var Wt=Qn.className,In=Qn.style;return ce.createElement("div",{className:xt()("".concat(St,"-mask"),Wt,Xn),style:(0,ie.Z)((0,ie.Z)({},In),hr),onClick:kn&<?fr:void 0,ref:Jn})}),On=typeof Xt=="function"?Xt(Qe):Xt,Jt={};if(Fr&&un)switch(Qe){case"top":Jt.transform="translateY(".concat(un,"px)");break;case"bottom":Jt.transform="translateY(".concat(-un,"px)");break;case"left":Jt.transform="translateX(".concat(un,"px)");break;default:Jt.transform="translateX(".concat(-un,"px)");break}Qe==="left"||Qe==="right"?Jt.width=ue(At):Jt.height=ue(Nt);var Ut={onMouseEnter:xr,onMouseOver:Hr,onMouseLeave:Yr,onClick:Or,onKeyDown:bi,onKeyUp:Jr},wn=ce.createElement(xe.default,(0,me.Z)({key:"panel"},On,{visible:lt,forceRender:qe,onVisibleChanged:function(Jn){dr==null||dr(Jn)},removeOnLeave:!1,leavedClassName:"".concat(St,"-content-wrapper-hidden")}),function(Qn,Jn){var Wt=Qn.className,In=Qn.style;return ce.createElement("div",(0,me.Z)({className:xt()("".concat(St,"-content-wrapper"),Wt),style:(0,ie.Z)((0,ie.Z)((0,ie.Z)({},Jt),In),on)},(0,z.Z)(mt,{data:!0})),ce.createElement(re,(0,me.Z)({id:kt,containerRef:Jn,prefixCls:St,className:Ve,style:zt},Ut),qt))}),_n=(0,ie.Z)({},Ke);return dt&&(_n.zIndex=dt),ce.createElement(ye.Provider,{value:Dt},ce.createElement("div",{className:xt()(St,"".concat(St,"-").concat(Qe),Le,(bt={},(0,we.Z)(bt,"".concat(St,"-open"),lt),(0,we.Z)(bt,"".concat(St,"-inline"),Ue),bt)),style:_n,tabIndex:-1,ref:tt,onKeyDown:xi},vn,ce.createElement("div",{tabIndex:0,ref:li,style:Ee,"aria-hidden":"true","data-sentinel":"start"}),wn,ce.createElement("div",{tabIndex:0,ref:Si,style:Ee,"aria-hidden":"true","data-sentinel":"end"})))}var Ie=ce.forwardRef(Pe),ke=Ie,Ne=function(nt){var ft=nt.open,Xe=ft===void 0?!1:ft,ut=nt.prefixCls,bt=ut===void 0?"rc-drawer":ut,St=nt.placement,lt=St===void 0?"right":St,Qe=nt.autoFocus,Ue=Qe===void 0?!0:Qe,We=nt.keyboard,qe=We===void 0?!0:We,He=nt.width,De=He===void 0?378:He,Le=nt.mask,Ke=Le===void 0?!0:Le,dt=nt.maskClosable,Ve=dt===void 0?!0:dt,kt=nt.getContainer,zt=nt.forceRender,Xt=nt.afterOpenChange,At=nt.destroyOnClose,Nt=nt.onMouseEnter,qt=nt.onMouseOver,on=nt.onMouseLeave,gn=nt.onClick,kn=nt.onKeyDown,Kn=nt.onKeyUp,Xn=nt.panelRef,hr=ce.useState(!1),dr=(0,_e.Z)(hr,2),fr=dr[0],xr=dr[1],Hr=ce.useState(!1),Yr=(0,_e.Z)(Hr,2),Or=Yr[0],bi=Yr[1];(0,ve.Z)(function(){bi(!0)},[]);var Jr=Or?Xe:!1,tt=ce.useRef(),li=ce.useRef();(0,ve.Z)(function(){Jr&&(li.current=document.activeElement)},[Jr]);var Si=function(Ii){var wr;if(xr(Ii),Xt==null||Xt(Ii),!Ii&&li.current&&!((wr=tt.current)!==null&&wr!==void 0&&wr.contains(li.current))){var cn;(cn=li.current)===null||cn===void 0||cn.focus({preventScroll:!0})}},xi=ce.useMemo(function(){return{panel:Xn}},[Xn]);if(!zt&&!fr&&!Jr&&At)return null;var lr={onMouseEnter:Nt,onMouseOver:qt,onMouseLeave:on,onClick:gn,onKeyDown:kn,onKeyUp:Kn},Ar=(0,ie.Z)((0,ie.Z)({},nt),{},{open:Jr,prefixCls:bt,placement:lt,autoFocus:Ue,keyboard:qe,width:De,mask:Ke,maskClosable:Ve,inline:kt===!1,afterOpenChange:Si,ref:tt},lr);return ce.createElement(Ce.Provider,{value:xi},ce.createElement(je.Z,{open:Jr||zt||fr,autoDestroy:!1,getContainer:kt,autoLock:Ke&&(Jr||fr)},ce.createElement(ke,Ar)))},Oe=Ne,Fe=Oe,Re=$e(62892),Ye=$e(36355),ze=$e(32441),Ze=$e(47729),ht=mt=>{const{prefixCls:nt,title:ft,footer:Xe,extra:ut,closeIcon:bt,closable:St,onClose:lt,headerStyle:Qe,drawerStyle:Ue,bodyStyle:We,footerStyle:qe,children:He}=mt,De=ce.useCallback(kt=>ce.createElement("button",{type:"button",onClick:lt,"aria-label":"Close",className:`${nt}-close`},kt),[lt]),[Le,Ke]=(0,Ze.Z)(St,bt,De,void 0,!0),dt=ce.useMemo(()=>!ft&&!Le?null:ce.createElement("div",{style:Qe,className:xt()(`${nt}-header`,{[`${nt}-header-close-only`]:Le&&!ft&&!ut})},ce.createElement("div",{className:`${nt}-header-title`},Ke,ft&&ce.createElement("div",{className:`${nt}-title`},ft)),ut&&ce.createElement("div",{className:`${nt}-extra`},ut)),[Le,Ke,ut,Qe,nt,ft]),Ve=ce.useMemo(()=>{if(!Xe)return null;const kt=`${nt}-footer`;return ce.createElement("div",{className:kt,style:qe},Xe)},[Xe,qe,nt]);return ce.createElement("div",{className:`${nt}-wrapper-body`,style:Ue},dt,ce.createElement("div",{className:`${nt}-body`,style:We},He),Ve)},pt=$e(33234),Mt=$e(83116),et=$e(37613),wt=mt=>{const{componentCls:nt,motionDurationSlow:ft}=mt,Xe={"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${ft}`}}};return{[nt]:{[`${nt}-mask-motion`]:{"&-enter, &-appear, &-leave":{"&-active":{transition:`all ${ft}`}},"&-enter, &-appear":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}},[`${nt}-panel-motion`]:{"&-left":[Xe,{"&-enter, &-appear":{"&-start":{transform:"translateX(-100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(-100%)"}}}],"&-right":[Xe,{"&-enter, &-appear":{"&-start":{transform:"translateX(100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(100%)"}}}],"&-top":[Xe,{"&-enter, &-appear":{"&-start":{transform:"translateY(-100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(-100%)"}}}],"&-bottom":[Xe,{"&-enter, &-appear":{"&-start":{transform:"translateY(100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(100%)"}}}]}}}};const Et=mt=>{const{componentCls:nt,zIndexPopup:ft,colorBgMask:Xe,colorBgElevated:ut,motionDurationSlow:bt,motionDurationMid:St,padding:lt,paddingLG:Qe,fontSizeLG:Ue,lineHeightLG:We,lineWidth:qe,lineType:He,colorSplit:De,marginSM:Le,colorIcon:Ke,colorIconHover:dt,colorText:Ve,fontWeightStrong:kt,footerPaddingBlock:zt,footerPaddingInline:Xt}=mt,At=`${nt}-content-wrapper`;return{[nt]:{position:"fixed",inset:0,zIndex:ft,pointerEvents:"none","&-pure":{position:"relative",background:ut,[`&${nt}-left`]:{boxShadow:mt.boxShadowDrawerLeft},[`&${nt}-right`]:{boxShadow:mt.boxShadowDrawerRight},[`&${nt}-top`]:{boxShadow:mt.boxShadowDrawerUp},[`&${nt}-bottom`]:{boxShadow:mt.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${nt}-mask`]:{position:"absolute",inset:0,zIndex:ft,background:Xe,pointerEvents:"auto"},[At]:{position:"absolute",zIndex:ft,maxWidth:"100vw",transition:`all ${bt}`,"&-hidden":{display:"none"}},[`&-left > ${At}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:mt.boxShadowDrawerLeft},[`&-right > ${At}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:mt.boxShadowDrawerRight},[`&-top > ${At}`]:{top:0,insetInline:0,boxShadow:mt.boxShadowDrawerUp},[`&-bottom > ${At}`]:{bottom:0,insetInline:0,boxShadow:mt.boxShadowDrawerDown},[`${nt}-content`]:{width:"100%",height:"100%",overflow:"auto",background:ut,pointerEvents:"auto"},[`${nt}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${nt}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${lt}px ${Qe}px`,fontSize:Ue,lineHeight:We,borderBottom:`${qe}px ${He} ${De}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${nt}-extra`]:{flex:"none"},[`${nt}-close`]:{display:"inline-block",marginInlineEnd:Le,color:Ke,fontWeight:kt,fontSize:Ue,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${St}`,textRendering:"auto","&:focus, &:hover":{color:dt,textDecoration:"none"}},[`${nt}-title`]:{flex:1,margin:0,color:Ve,fontWeight:mt.fontWeightStrong,fontSize:Ue,lineHeight:We},[`${nt}-body`]:{flex:1,minWidth:0,minHeight:0,padding:Qe,overflow:"auto"},[`${nt}-footer`]:{flexShrink:0,padding:`${zt}px ${Xt}px`,borderTop:`${qe}px ${He} ${De}`},"&-rtl":{direction:"rtl"}}}};var Tt=(0,Mt.Z)("Drawer",mt=>{const nt=(0,et.TS)(mt,{});return[Et(nt),wt(nt)]},mt=>({zIndexPopup:mt.zIndexPopupBase,footerPaddingBlock:mt.paddingXS,footerPaddingInline:mt.padding})),vt=$e(11575),gt=function(mt,nt){var ft={};for(var Xe in mt)Object.prototype.hasOwnProperty.call(mt,Xe)&&nt.indexOf(Xe)<0&&(ft[Xe]=mt[Xe]);if(mt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,Xe=Object.getOwnPropertySymbols(mt);ut<Xe.length;ut++)nt.indexOf(Xe[ut])<0&&Object.prototype.propertyIsEnumerable.call(mt,Xe[ut])&&(ft[Xe[ut]]=mt[Xe[ut]]);return ft};const yt=null,It={distance:180},Ot=mt=>{var nt;const{rootClassName:ft,width:Xe,height:ut,size:bt="default",mask:St=!0,push:lt=It,open:Qe,afterOpenChange:Ue,onClose:We,prefixCls:qe,getContainer:He,style:De,className:Le,visible:Ke,afterVisibleChange:dt}=mt,Ve=gt(mt,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange"]),{getPopupContainer:kt,getPrefixCls:zt,direction:Xt,drawer:At}=ce.useContext(Ye.E_),Nt=zt("drawer",qe),[qt,on]=Tt(Nt),gn=He===void 0&&kt?()=>kt(document.body):He,kn=xt()({"no-mask":!St,[`${Nt}-rtl`]:Xt==="rtl"},ft,on),Kn=ce.useMemo(()=>Xe!=null?Xe:bt==="large"?736:378,[Xe,bt]),Xn=ce.useMemo(()=>ut!=null?ut:bt==="large"?736:378,[ut,bt]),hr={motionName:(0,Re.m)(Nt,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},dr=xr=>({motionName:(0,Re.m)(Nt,`panel-motion-${xr}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),fr=(0,vt.H)();return qt(ce.createElement(pt.BR,null,ce.createElement(ze.Ux,{status:!0,override:!0},ce.createElement(Fe,Object.assign({prefixCls:Nt,onClose:We,maskMotion:hr,motion:dr},Ve,{open:Qe!=null?Qe:Ke,mask:St,push:lt,width:Kn,height:Xn,style:Object.assign(Object.assign({},At==null?void 0:At.style),De),className:xt()(At==null?void 0:At.className,Le),rootClassName:kn,getContainer:gn,afterOpenChange:Ue!=null?Ue:dt,panelRef:fr}),ce.createElement(ht,Object.assign({prefixCls:Nt},Ve,{onClose:We}))))))},Vt=mt=>{const{prefixCls:nt,style:ft,className:Xe,placement:ut="right"}=mt,bt=gt(mt,["prefixCls","style","className","placement"]),{getPrefixCls:St}=ce.useContext(Ye.E_),lt=St("drawer",nt),[Qe,Ue]=Tt(lt),We=xt()(lt,`${lt}-pure`,`${lt}-${ut}`,Ue,Xe);return Qe(ce.createElement("div",{className:We,style:ft},ce.createElement(ht,Object.assign({prefixCls:lt},bt))))};Ot._InternalPanelDoNotUseOrYouWillBeFired=Vt;var Ct=Ot},91857:function(Pn,an,$e){"use strict";var it=$e(59301),xt=$e(38819),ie=$e(92310),_e=$e.n(ie),je=$e(31561),ve=$e(70425),ce=$e(18929),be=$e(2738),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:Ne,trigger:Oe,disabled:Fe,dropdownRender:Re,getPopupContainer:Ye,overlayClassName:ze,rootClassName:Ze,open:at,onOpenChange:ht,visible:pt,onVisibleChange:Mt,mouseEnterDelay:et=.15,mouseLeaveDelay:ot=.1,autoAdjustOverflow:wt=!0,placement:Et="",overlay:Tt,transitionName:vt}=Ee,{getPopupContainer:gt,getPrefixCls:yt,direction:It}=it.useContext(me.E_),Ot=it.useMemo(()=>{const Le=yt();return vt!==void 0?vt:Et.includes("top")?`${Le}-slide-down`:`${Le}-slide-up`},[yt,Et,vt]),Vt=it.useMemo(()=>Et?Et.includes("Center")?Et.slice(0,Et.indexOf("Center")):Et:It==="rtl"?"bottomRight":"bottomLeft",[Et,It]),Ct=yt("dropdown",ke),[mt,nt]=(0,ee.Z)(Ct),[,ft]=(0,z.Z)(),Xe=it.Children.only(Ne),ut=(0,we.Tm)(Xe,{className:_e()(`${Ct}-trigger`,{[`${Ct}-rtl`]:It==="rtl"},Xe.props.className),disabled:Fe}),bt=Fe?[]:Oe;let St;bt&&bt.includes("contextMenu")&&(St=!0);const[lt,Qe]=(0,ce.Z)(!1,{value:at!=null?at:pt}),Ue=(0,ve.useEvent)(Le=>{ht==null||ht(Le),Mt==null||Mt(Le),Qe(Le)}),We=_e()(ze,Ze,nt,{[`${Ct}-rtl`]:It==="rtl"}),qe=(0,Ce.Z)({arrowPointAtCenter:typeof Ie=="object"&&Ie.pointAtCenter,autoAdjustOverflow:wt,offset:ft.marginXXS,arrowWidth:Ie?ft.sizePopupArrow:0,borderRadius:ft.borderRadius}),He=it.useCallback(()=>{Qe(!1)},[]),De=()=>{let Le;return Pe!=null&&Pe.items?Le=it.createElement(xe.default,Object.assign({},Pe)):typeof Tt=="function"?Le=Tt():Le=Tt,Re&&(Le=Re(Le)),Le=it.Children.only(typeof Le=="string"?it.createElement("span",null,Le):Le),it.createElement(fe.J,{prefixCls:`${Ct}-menu`,expandIcon:it.createElement("span",{className:`${Ct}-menu-submenu-arrow`},it.createElement(xt.Z,{className:`${Ct}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:He,validator:Ke=>{let{mode:dt}=Ke}},Le)};return mt(it.createElement(je.Z,Object.assign({alignPoint:St},(0,be.Z)(Ee,["rootClassName"]),{mouseEnterDelay:et,mouseLeaveDelay:ot,visible:lt,builtinPlacements:qe,arrow:!!Ie,overlayClassName:We,prefixCls:Ct,getPopupContainer:Ye||gt,transitionName:Ot,trigger:bt,overlay:De,placement:Vt,onVisibleChange:Ue}),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=>it.createElement(ue,Object.assign({},Ee),it.createElement("span",null));re._InternalPanelDoNotUseOrYouWillBeFired=pe,an.Z=re},38854:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return z}});var it=$e(91857),xt=$e(92310),ie=$e.n(xt),_e=$e(59301),je=$e(18785),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}=_e.useContext(ce.E_),{prefixCls:ue,type:pe="default",danger:Ee,disabled:Pe,loading:Ie,onClick:ke,htmlType:Ne,children:Oe,className:Fe,menu:Re,arrow:Ye,autoFocus:ze,overlay:Ze,trigger:at,align:ht,open:pt,onOpenChange:Mt,placement:et,getPopupContainer:ot,href:wt,icon:Et=_e.createElement(je.Z,null),title:Tt,buttonsRender:vt=De=>De,mouseEnterDelay:gt,mouseLeaveDelay:yt,overlayClassName:It,overlayStyle:Ot,destroyPopupOnHide:Vt,dropdownRender:Ct}=ee,mt=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"]),nt=re("dropdown",ue),ft=`${nt}-button`,[Xe,ut]=(0,ye.Z)(nt),bt={menu:Re,arrow:Ye,autoFocus:ze,align:ht,disabled:Pe,trigger:Pe?[]:at,onOpenChange:Mt,getPopupContainer:ot||ae,mouseEnterDelay:gt,mouseLeaveDelay:yt,overlayClassName:It,overlayStyle:Ot,destroyPopupOnHide:Vt,dropdownRender:Ct},{compactSize:St,compactItemClassnames:lt}=(0,Ce.ri)(nt,le),Qe=ie()(ft,lt,Fe,ut);"overlay"in ee&&(bt.overlay=Ze),"open"in ee&&(bt.open=pt),"placement"in ee?bt.placement=et:bt.placement=le==="rtl"?"bottomLeft":"bottomRight";const Ue=_e.createElement(ve.ZP,{type:pe,danger:Ee,disabled:Pe,loading:Ie,onClick:ke,htmlType:Ne,href:wt,title:Tt},Oe),We=_e.createElement(ve.ZP,{type:pe,danger:Ee,icon:Et}),[qe,He]=vt([Ue,We]);return Xe(_e.createElement(be.Z.Compact,Object.assign({className:Qe,size:St,block:!0},mt),qe,_e.createElement(it.Z,Object.assign({},bt),He)))};me.__ANT_BUTTON=!0;var xe=me;const fe=it.Z;fe.Button=xe;var z=fe},47211:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return we}});var it=$e(17313),xt=$e(13826),ie=$e(92899),_e=$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:Ne,colorBgElevated:Oe}=me;return[{[xe]:Object.assign(Object.assign({},(0,it.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:xt.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:xt.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:xt.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:xt.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,it.Qy)(me)),{[`${fe}-item-group-title`]:{padding:`${pe}px ${Ne}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 ${Ne}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,it.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:Ne+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,xt.oN)(me,"slide-up"),(0,xt.oN)(me,"slide-down"),(0,ie.Fm)(me,"move-up"),(0,ie.Fm)(me,"move-down"),(0,_e._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(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return ue}});var it=$e(92310),xt=$e.n(it),ie=$e(59301),_e=$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:Ne,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:Ne},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:Ne,lineHeight:Oe}=pe;return{[Ee]:{marginInline:Ie,fontSize:Ne,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:Ne,children:Oe,imageStyle:Fe,style:Re}=pe,Ye=ee(pe,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:ze,direction:Ze,empty:at}=ie.useContext(_e.E_),ht=ze("empty",Ie),[pt,Mt]=z(ht),[et]=(0,je.Z)("Empty"),ot=typeof Ne!="undefined"?Ne:et==null?void 0:et.description,wt=typeof ot=="string"?ot:"empty";let Et=null;return typeof ke=="string"?Et=ie.createElement("img",{alt:wt,src:ke}):Et=ke,pt(ie.createElement("div",Object.assign({className:xt()(Mt,ht,at==null?void 0:at.className,{[`${ht}-normal`]:ke===re,[`${ht}-rtl`]:Ze==="rtl"},Ee,Pe),style:Object.assign(Object.assign({},at==null?void 0:at.style),Re)},Ye),ie.createElement("div",{className:`${ht}-image`,style:Fe},Et),ot&&ie.createElement("div",{className:`${ht}-description`},ot),Oe&&ie.createElement("div",{className:`${ht}-footer`},Oe)))};le.PRESENTED_IMAGE_DEFAULT=ae,le.PRESENTED_IMAGE_SIMPLE=re;var ue=le},78241:function(Pn,an,$e){"use strict";$e.d(an,{default:function(){return un}});var it=$e(80702),xt=$e(92310),ie=$e.n(xt),_e=$e(77900),je=$e(59301),ve=$e(62892),ce=$e(32441);function be(Dt){const[vn,On]=je.useState(Dt);return je.useEffect(()=>{const Jt=setTimeout(()=>{On(Dt)},Dt.length?0:10);return()=>{clearTimeout(Jt)}},[Dt]),vn}var Ce=$e(17313),ye=$e(29878),we=$e(8378),me=$e(37613),xe=$e(83116),z=Dt=>{const{componentCls:vn}=Dt,On=`${vn}-show-help`,Jt=`${vn}-show-help-item`;return{[On]:{transition:`opacity ${Dt.motionDurationSlow} ${Dt.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[Jt]:{overflow:"hidden",transition:`height ${Dt.motionDurationSlow} ${Dt.motionEaseInOut},
|
|
|
opacity ${Dt.motionDurationSlow} ${Dt.motionEaseInOut},
|
|
|
transform ${Dt.motionDurationSlow} ${Dt.motionEaseInOut} !important`,[`&${Jt}-appear, &${Jt}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${Jt}-leave-active`]:{transform:"translateY(-5px)"}}}}};const ee=Dt=>({legend:{display:"block",width:"100%",marginBottom:Dt.marginLG,padding:0,color:Dt.colorTextDescription,fontSize:Dt.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${Dt.lineWidth}px ${Dt.lineType} ${Dt.colorBorder}`},label:{fontSize:Dt.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 ${Dt.controlOutlineWidth}px ${Dt.controlOutline}`},output:{display:"block",paddingTop:15,color:Dt.colorText,fontSize:Dt.fontSize,lineHeight:Dt.lineHeight}}),ae=(Dt,vn)=>{const{formItemCls:On}=Dt;return{[On]:{[`${On}-label > label`]:{height:vn},[`${On}-control-input`]:{minHeight:vn}}}},re=Dt=>{const{componentCls:vn}=Dt;return{[Dt.componentCls]:Object.assign(Object.assign(Object.assign({},(0,Ce.Wf)(Dt)),ee(Dt)),{[`${vn}-text`]:{display:"inline-block",paddingInlineEnd:Dt.paddingSM},"&-small":Object.assign({},ae(Dt,Dt.controlHeightSM)),"&-large":Object.assign({},ae(Dt,Dt.controlHeightLG))})}},le=Dt=>{const{formItemCls:vn,iconCls:On,componentCls:Jt,rootPrefixCls:Ut,labelRequiredMarkColor:wn,labelColor:_n,labelFontSize:Qn,labelHeight:Jn,labelColonMarginInlineStart:Wt,labelColonMarginInlineEnd:In,itemMarginBottom:Wn}=Dt;return{[vn]:Object.assign(Object.assign({},(0,Ce.Wf)(Dt)),{marginBottom:Wn,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${Ut}-row`]:{display:"none"},"&-has-warning":{[`${vn}-split`]:{color:Dt.colorError}},"&-has-error":{[`${vn}-split`]:{color:Dt.colorWarning}},[`${vn}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${Dt.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:Jn,color:_n,fontSize:Qn,[`> ${On}`]:{fontSize:Dt.fontSize,verticalAlign:"top"},[`&${vn}-required:not(${vn}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:Dt.marginXXS,color:wn,fontSize:Dt.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${Jt}-hide-required-mark &`]:{display:"none"}},[`${vn}-optional`]:{display:"inline-block",marginInlineStart:Dt.marginXXS,color:Dt.colorTextDescription,[`${Jt}-hide-required-mark &`]:{display:"none"}},[`${vn}-tooltip`]:{color:Dt.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:Dt.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:Wt,marginInlineEnd:In},[`&${vn}-no-colon::after`]:{content:'"\\a0"'}}},[`${vn}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${Ut}-col-'"]):not([class*="' ${Ut}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:Dt.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[vn]:{"&-explain, &-extra":{clear:"both",color:Dt.colorTextDescription,fontSize:Dt.fontSize,lineHeight:Dt.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:Dt.controlHeightSM,transition:`color ${Dt.motionDurationMid} ${Dt.motionEaseOut}`},"&-explain":{"&-error":{color:Dt.colorError},"&-warning":{color:Dt.colorWarning}}},[`&-with-help ${vn}-explain`]:{height:"auto",opacity:1},[`${vn}-feedback-icon`]:{fontSize:Dt.fontSize,textAlign:"center",visibility:"visible",animationName:ye.kr,animationDuration:Dt.motionDurationMid,animationTimingFunction:Dt.motionEaseOutBack,pointerEvents:"none","&-success":{color:Dt.colorSuccess},"&-error":{color:Dt.colorError},"&-warning":{color:Dt.colorWarning},"&-validating":{color:Dt.colorPrimary}}})}},ue=Dt=>{const{componentCls:vn,formItemCls:On}=Dt;return{[`${vn}-horizontal`]:{[`${On}-label`]:{flexGrow:0},[`${On}-control`]:{flex:"1 1 0",minWidth:0},[`${On}-label[class$='-24'], ${On}-label[class*='-24 ']`]:{[`& + ${On}-control`]:{minWidth:"unset"}}}}},pe=Dt=>{const{componentCls:vn,formItemCls:On}=Dt;return{[`${vn}-inline`]:{display:"flex",flexWrap:"wrap",[On]:{flex:"none",marginInlineEnd:Dt.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${On}-label,
|
|
|
> ${On}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${On}-label`]:{flex:"none"},[`${vn}-text`]:{display:"inline-block"},[`${On}-has-feedback`]:{display:"inline-block"}}}}},Ee=Dt=>({padding:Dt.verticalLabelPadding,margin:Dt.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),Pe=Dt=>{const{componentCls:vn,formItemCls:On,rootPrefixCls:Jt}=Dt;return{[`${On} ${On}-label`]:Ee(Dt),[vn]:{[On]:{flexWrap:"wrap",[`${On}-label, ${On}-control`]:{[`&:not([class*=" ${Jt}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},Ie=Dt=>{const{componentCls:vn,formItemCls:On,rootPrefixCls:Jt}=Dt;return{[`${vn}-vertical`]:{[On]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${vn}-item-control`]:{width:"100%"}}},[`${vn}-vertical ${On}-label,
|
|
|
.${Jt}-col-24${On}-label,
|
|
|
.${Jt}-col-xl-24${On}-label`]:Ee(Dt),[`@media (max-width: ${Dt.screenXSMax}px)`]:[Pe(Dt),{[vn]:{[`.${Jt}-col-xs-24${On}-label`]:Ee(Dt)}}],[`@media (max-width: ${Dt.screenSMMax}px)`]:{[vn]:{[`.${Jt}-col-sm-24${On}-label`]:Ee(Dt)}},[`@media (max-width: ${Dt.screenMDMax}px)`]:{[vn]:{[`.${Jt}-col-md-24${On}-label`]:Ee(Dt)}},[`@media (max-width: ${Dt.screenLGMax}px)`]:{[vn]:{[`.${Jt}-col-lg-24${On}-label`]:Ee(Dt)}}}},ke=(Dt,vn)=>(0,me.TS)(Dt,{formItemCls:`${Dt.componentCls}-item`,rootPrefixCls:vn});var Ne=(0,xe.Z)("Form",(Dt,vn)=>{let{rootPrefixCls:On}=vn;const Jt=ke(Dt,On);return[re(Jt),le(Jt),z(Jt),ue(Jt),pe(Jt),Ie(Jt),(0,we.Z)(Jt),ye.kr]},Dt=>({labelRequiredMarkColor:Dt.colorError,labelColor:Dt.colorTextHeading,labelFontSize:Dt.fontSize,labelHeight:Dt.controlHeight,labelColonMarginInlineStart:Dt.marginXXS/2,labelColonMarginInlineEnd:Dt.marginXS,itemMarginBottom:Dt.marginLG,verticalLabelPadding:`0 0 ${Dt.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const Oe=[];function Fe(Dt,vn,On){let Jt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof Dt=="string"?Dt:`${vn}-${Jt}`,error:Dt,errorStatus:On}}var Ye=Dt=>{let{help:vn,helpStatus:On,errors:Jt=Oe,warnings:Ut=Oe,className:wn,fieldId:_n,onVisibleChanged:Qn}=Dt;const{prefixCls:Jn}=je.useContext(ce.Rk),Wt=`${Jn}-item-explain`,[,In]=Ne(Jn),Wn=(0,je.useMemo)(()=>(0,ve.Z)(Jn),[Jn]),ar=be(Jt),mn=be(Ut),Cn=je.useMemo(()=>vn!=null?[Fe(vn,"help",On)]:[].concat((0,it.Z)(ar.map((fn,En)=>Fe(fn,"error","error",En))),(0,it.Z)(mn.map((fn,En)=>Fe(fn,"warning","warning",En)))),[vn,On,ar,mn]),tn={};return _n&&(tn.id=`${_n}_help`),je.createElement(_e.default,{motionDeadline:Wn.motionDeadline,motionName:`${Jn}-show-help`,visible:!!Cn.length,onVisibleChanged:Qn},fn=>{const{className:En,style:pn}=fn;return je.createElement("div",Object.assign({},tn,{className:ie()(Wt,En,wn,In),style:pn,role:"alert"}),je.createElement(_e.CSSMotionList,Object.assign({keys:Cn},(0,ve.Z)(Jn),{motionName:`${Jn}-show-help-item`,component:!1}),Ln=>{const{key:Mn,error:Gn,errorStatus:An,className:sr,style:hn}=Ln;return je.createElement("div",{key:Mn,className:ie()(sr,{[`${Wt}-${An}`]:An}),style:hn},Gn)}))})},ze=$e(95013),Ze=$e(36355),at=$e(1684),ht=$e(52946),pt=$e(19716),Mt=$e(16722);const et=["parentNode"],ot="form_item";function wt(Dt){return Dt===void 0||Dt===!1?[]:Array.isArray(Dt)?Dt:[Dt]}function Et(Dt,vn){if(!Dt.length)return;const On=Dt.join("_");return vn?`${vn}_${On}`:et.includes(On)?`${ot}_${On}`:On}function Tt(Dt,vn,On,Jt,Ut,wn){let _n=Jt;return wn!==void 0?_n=wn:On.validating?_n="validating":Dt.length?_n="error":vn.length?_n="warning":(On.touched||Ut&&On.validated)&&(_n="success"),_n}function vt(Dt){return wt(Dt).join("_")}function gt(Dt){const[vn]=(0,ze.useForm)(),On=je.useRef({}),Jt=je.useMemo(()=>Dt!=null?Dt:Object.assign(Object.assign({},vn),{__INTERNAL__:{itemRef:Ut=>wn=>{const _n=vt(Ut);wn?On.current[_n]=wn:delete On.current[_n]}},scrollToField:function(Ut){let wn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const _n=wt(Ut),Qn=Et(_n,Jt.__INTERNAL__.name),Jn=Qn?document.getElementById(Qn):null;Jn&&(0,Mt.Z)(Jn,Object.assign({scrollMode:"if-needed",block:"nearest"},wn))},getFieldInstance:Ut=>{const wn=vt(Ut);return On.current[wn]}}),[Dt,vn]);return[Jt]}var yt=$e(28726),It=function(Dt,vn){var On={};for(var Jt in Dt)Object.prototype.hasOwnProperty.call(Dt,Jt)&&vn.indexOf(Jt)<0&&(On[Jt]=Dt[Jt]);if(Dt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ut=0,Jt=Object.getOwnPropertySymbols(Dt);Ut<Jt.length;Ut++)vn.indexOf(Jt[Ut])<0&&Object.prototype.propertyIsEnumerable.call(Dt,Jt[Ut])&&(On[Jt[Ut]]=Dt[Jt[Ut]]);return On};const Ot=(Dt,vn)=>{const On=je.useContext(at.Z),{getPrefixCls:Jt,direction:Ut,form:wn}=je.useContext(Ze.E_),{prefixCls:_n,className:Qn,rootClassName:Jn,size:Wt,disabled:In=On,form:Wn,colon:ar,labelAlign:mn,labelWrap:Cn,labelCol:tn,wrapperCol:fn,hideRequiredMark:En,layout:pn="horizontal",scrollToFirstError:Ln,requiredMark:Mn,onFinishFailed:Gn,name:An,style:sr,feedbackIcons:hn}=Dt,Nr=It(Dt,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),Zr=(0,pt.Z)(Wt),hi=je.useContext(yt.Z),yn=(0,je.useMemo)(()=>Mn!==void 0?Mn:wn&&wn.requiredMark!==void 0?wn.requiredMark:!En,[En,Mn,wn]),Yn=ar!=null?ar:wn==null?void 0:wn.colon,ir=Jt("form",_n),[vr,yr]=Ne(ir),Dr=ie()(ir,`${ir}-${pn}`,{[`${ir}-hide-required-mark`]:yn===!1,[`${ir}-rtl`]:Ut==="rtl",[`${ir}-${Zr}`]:Zr},yr,wn==null?void 0:wn.className,Qn,Jn),[ii]=gt(Wn),{__INTERNAL__:Br}=ii;Br.name=An;const Cr=(0,je.useMemo)(()=>({name:An,labelAlign:mn,labelCol:tn,labelWrap:Cn,wrapperCol:fn,vertical:pn==="vertical",colon:Yn,requiredMark:yn,itemRef:Br.itemRef,form:ii,feedbackIcons:hn}),[An,mn,tn,fn,pn,Yn,yn,ii,hn]);je.useImperativeHandle(vn,()=>ii);const oi=(Ri,Nn)=>{if(Ri){let fi={block:"nearest"};typeof Ri=="object"&&(fi=Ri),ii.scrollToField(Nn,fi)}},Tn=Ri=>{if(Gn==null||Gn(Ri),Ri.errorFields.length){const Nn=Ri.errorFields[0].name;if(Ln!==void 0){oi(Ln,Nn);return}wn&&wn.scrollToFirstError!==void 0&&oi(wn.scrollToFirstError,Nn)}};return vr(je.createElement(at.n,{disabled:In},je.createElement(ht.q,{size:Zr},je.createElement(ce.RV,Object.assign({},{validateMessages:hi}),je.createElement(ce.q3.Provider,{value:Cr},je.createElement(ze.default,Object.assign({id:An},Nr,{name:An,onFinishFailed:Tn,form:ii,style:Object.assign(Object.assign({},wn==null?void 0:wn.style),sr),className:Dr})))))))};var Ct=je.forwardRef(Ot),mt=$e(41799),nt=$e(8654),ft=$e(92343),Xe=$e(11592);function ut(Dt){if(typeof Dt=="function")return Dt;const vn=(0,Xe.Z)(Dt);return vn.length<=1?vn[0]:vn}const bt=()=>{const{status:Dt,errors:vn=[],warnings:On=[]}=(0,je.useContext)(ce.aM);return{status:Dt,errors:vn,warnings:On}};bt.Context=ce.aM;var St=bt,lt=$e(16089);function Qe(Dt){const[vn,On]=je.useState(Dt),Jt=(0,je.useRef)(null),Ut=(0,je.useRef)([]),wn=(0,je.useRef)(!1);je.useEffect(()=>(wn.current=!1,()=>{wn.current=!0,lt.Z.cancel(Jt.current),Jt.current=null}),[]);function _n(Qn){wn.current||(Jt.current===null&&(Ut.current=[],Jt.current=(0,lt.Z)(()=>{Jt.current=null,On(Jn=>{let Wt=Jn;return Ut.current.forEach(In=>{Wt=In(Wt)}),Wt})})),Ut.current.push(Qn))}return[vn,_n]}function Ue(){const{itemRef:Dt}=je.useContext(ce.q3),vn=je.useRef({});function On(Jt,Ut){const wn=Ut&&typeof Ut=="object"&&Ut.ref,_n=Jt.join("_");return(vn.current.name!==_n||vn.current.originRef!==wn)&&(vn.current.name=_n,vn.current.originRef=wn,vn.current.ref=(0,nt.sQ)(Dt(Jt),wn)),vn.current.ref}return On}var We=$e(29194),qe=$e(34280),He=$e(2738),De=$e(27382),Le=$e(37028);const Ke=Dt=>{const{formItemCls:vn}=Dt;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${vn}-control`]:{display:"flex"}}}};var dt=(0,xe.b)(["Form","item-item"],(Dt,vn)=>{let{rootPrefixCls:On}=vn;const Jt=ke(Dt,On);return[Ke(Jt)]}),kt=Dt=>{const{prefixCls:vn,status:On,wrapperCol:Jt,children:Ut,errors:wn,warnings:_n,_internalItemRender:Qn,extra:Jn,help:Wt,fieldId:In,marginBottom:Wn,onErrorVisibleChanged:ar}=Dt,mn=`${vn}-item`,Cn=je.useContext(ce.q3),tn=Jt||Cn.wrapperCol||{},fn=ie()(`${mn}-control`,tn.className),En=je.useMemo(()=>Object.assign({},Cn),[Cn]);delete En.labelCol,delete En.wrapperCol;const pn=je.createElement("div",{className:`${mn}-control-input`},je.createElement("div",{className:`${mn}-control-input-content`},Ut)),Ln=je.useMemo(()=>({prefixCls:vn,status:On}),[vn,On]),Mn=Wn!==null||wn.length||_n.length?je.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},je.createElement(ce.Rk.Provider,{value:Ln},je.createElement(Ye,{fieldId:In,errors:wn,warnings:_n,help:Wt,helpStatus:On,className:`${mn}-explain-connected`,onVisibleChanged:ar})),!!Wn&&je.createElement("div",{style:{width:0,height:Wn}})):null,Gn={};In&&(Gn.id=`${In}_extra`);const An=Jn?je.createElement("div",Object.assign({},Gn,{className:`${mn}-extra`}),Jn):null,sr=Qn&&Qn.mark==="pro_table_render"&&Qn.render?Qn.render(Dt,{input:pn,errorList:Mn,extra:An}):je.createElement(je.Fragment,null,pn,Mn,An);return je.createElement(ce.q3.Provider,{value:En},je.createElement(Le.Z,Object.assign({},tn,{className:fn}),sr),je.createElement(dt,{prefixCls:vn}))},zt=$e(61485),Xt=$e(31724),At=$e(9763),Nt=$e(6848),qt=function(Dt,vn){var On={};for(var Jt in Dt)Object.prototype.hasOwnProperty.call(Dt,Jt)&&vn.indexOf(Jt)<0&&(On[Jt]=Dt[Jt]);if(Dt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ut=0,Jt=Object.getOwnPropertySymbols(Dt);Ut<Jt.length;Ut++)vn.indexOf(Jt[Ut])<0&&Object.prototype.propertyIsEnumerable.call(Dt,Jt[Ut])&&(On[Jt[Ut]]=Dt[Jt[Ut]]);return On};function on(Dt){return Dt?typeof Dt=="object"&&!je.isValidElement(Dt)?Dt:{title:Dt}:null}var kn=Dt=>{let{prefixCls:vn,label:On,htmlFor:Jt,labelCol:Ut,labelAlign:wn,colon:_n,required:Qn,requiredMark:Jn,tooltip:Wt}=Dt;var In;const[Wn]=(0,At.Z)("Form"),{vertical:ar,labelAlign:mn,labelCol:Cn,labelWrap:tn,colon:fn}=je.useContext(ce.q3);if(!On)return null;const En=Ut||Cn||{},pn=wn||mn,Ln=`${vn}-item-label`,Mn=ie()(Ln,pn==="left"&&`${Ln}-left`,En.className,{[`${Ln}-wrap`]:!!tn});let Gn=On;const An=_n===!0||fn!==!1&&_n!==!1;An&&!ar&&typeof On=="string"&&On.trim()!==""&&(Gn=On.replace(/[:|:]\s*$/,""));const hn=on(Wt);if(hn){const{icon:yn=je.createElement(zt.Z,null)}=hn,Yn=qt(hn,["icon"]),ir=je.createElement(Nt.Z,Object.assign({},Yn),je.cloneElement(yn,{className:`${vn}-item-tooltip`,title:""}));Gn=je.createElement(je.Fragment,null,Gn,ir)}const Nr=Jn==="optional",Zr=typeof Jn=="function";Zr?Gn=Jn(Gn,{required:!!Qn}):Nr&&!Qn&&(Gn=je.createElement(je.Fragment,null,Gn,je.createElement("span",{className:`${vn}-item-optional`,title:""},(Wn==null?void 0:Wn.optional)||((In=Xt.Z.Form)===null||In===void 0?void 0:In.optional))));const hi=ie()({[`${vn}-item-required`]:Qn,[`${vn}-item-required-mark-optional`]:Nr||Zr,[`${vn}-item-no-colon`]:!An});return je.createElement(Le.Z,Object.assign({},En,{className:Mn}),je.createElement("label",{htmlFor:Jt,className:hi,title:typeof On=="string"?On:""},Gn))},Kn=$e(29679),Xn=$e(19248),hr=$e(96512),dr=$e(58617);const fr={success:Kn.Z,warning:hr.Z,error:Xn.Z,validating:dr.Z};function xr(Dt){let{children:vn,errors:On,warnings:Jt,hasFeedback:Ut,validateStatus:wn,prefixCls:_n,meta:Qn,noStyle:Jn}=Dt;const Wt=`${_n}-item`,{feedbackIcons:In}=je.useContext(ce.q3),Wn=Tt(On,Jt,Qn,null,!!Ut,wn),{isFormItemInput:ar,status:mn}=je.useContext(ce.aM),Cn=je.useMemo(()=>{var tn;let fn;if(Ut){const Ln=Ut!==!0&&Ut.icons||In,Mn=Wn&&((tn=Ln==null?void 0:Ln({status:Wn,errors:On,warnings:Jt}))===null||tn===void 0?void 0:tn[Wn]),Gn=Wn&&fr[Wn];fn=Mn!==!1&&Gn?je.createElement("span",{className:ie()(`${Wt}-feedback-icon`,`${Wt}-feedback-icon-${Wn}`)},Mn||je.createElement(Gn,null)):null}let En=!0,pn=Wn||"";return Jn&&(En=ar,pn=(Wn!=null?Wn:mn)||""),{status:pn,errors:On,warnings:Jt,hasFeedback:!!Ut,feedbackIcon:fn,isFormItemInput:En}},[Wn,Ut,Jn,ar,mn]);return je.createElement(ce.aM.Provider,{value:Cn},vn)}var Hr=function(Dt,vn){var On={};for(var Jt in Dt)Object.prototype.hasOwnProperty.call(Dt,Jt)&&vn.indexOf(Jt)<0&&(On[Jt]=Dt[Jt]);if(Dt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ut=0,Jt=Object.getOwnPropertySymbols(Dt);Ut<Jt.length;Ut++)vn.indexOf(Jt[Ut])<0&&Object.prototype.propertyIsEnumerable.call(Dt,Jt[Ut])&&(On[Jt[Ut]]=Dt[Jt[Ut]]);return On};function Yr(Dt){const{prefixCls:vn,className:On,rootClassName:Jt,style:Ut,help:wn,errors:_n,warnings:Qn,validateStatus:Jn,meta:Wt,hasFeedback:In,hidden:Wn,children:ar,fieldId:mn,required:Cn,isRequired:tn,onSubItemMetaChange:fn}=Dt,En=Hr(Dt,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),pn=`${vn}-item`,{requiredMark:Ln}=je.useContext(ce.q3),Mn=je.useRef(null),Gn=be(_n),An=be(Qn),sr=wn!=null,hn=!!(sr||_n.length||Qn.length),Nr=!!Mn.current&&(0,We.Z)(Mn.current),[Zr,hi]=je.useState(null);(0,qe.Z)(()=>{if(hn&&Mn.current){const yr=getComputedStyle(Mn.current);hi(parseInt(yr.marginBottom,10))}},[hn,Nr]);const yn=yr=>{yr||hi(null)},ir=function(){let yr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Dr=yr?Gn:Wt.errors,ii=yr?An:Wt.warnings;return Tt(Dr,ii,Wt,"",!!In,Jn)}(),vr=ie()(pn,On,Jt,{[`${pn}-with-help`]:sr||Gn.length||An.length,[`${pn}-has-feedback`]:ir&&In,[`${pn}-has-success`]:ir==="success",[`${pn}-has-warning`]:ir==="warning",[`${pn}-has-error`]:ir==="error",[`${pn}-is-validating`]:ir==="validating",[`${pn}-hidden`]:Wn});return je.createElement("div",{className:vr,style:Ut,ref:Mn},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:mn},Dt,{requiredMark:Ln,required:Cn!=null?Cn:tn,prefixCls:vn})),je.createElement(kt,Object.assign({},Dt,Wt,{errors:Gn,warnings:An,prefixCls:vn,status:ir,help:wn,marginBottom:Zr,onErrorVisibleChanged:yn}),je.createElement(ce.qI.Provider,{value:fn},je.createElement(xr,{prefixCls:vn,meta:Wt,errors:Wt.errors,warnings:Wt.warnings,hasFeedback:In,validateStatus:ir},ar)))),!!Zr&&je.createElement("div",{className:`${pn}-margin-offset`,style:{marginBottom:-Zr}}))}const Or="__SPLIT__",bi=null,Jr=je.memo(Dt=>{let{children:vn}=Dt;return vn},(Dt,vn)=>Dt.value===vn.value&&Dt.update===vn.update&&Dt.childProps.length===vn.childProps.length&&Dt.childProps.every((On,Jt)=>On===vn.childProps[Jt]));function tt(Dt){return Dt!=null}function li(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Si(Dt){const{name:vn,noStyle:On,className:Jt,dependencies:Ut,prefixCls:wn,shouldUpdate:_n,rules:Qn,children:Jn,required:Wt,label:In,messageVariables:Wn,trigger:ar="onChange",validateTrigger:mn,hidden:Cn,help:tn}=Dt,{getPrefixCls:fn}=je.useContext(Ze.E_),{name:En}=je.useContext(ce.q3),pn=ut(Jn),Ln=typeof pn=="function",Mn=je.useContext(ce.qI),{validateTrigger:Gn}=je.useContext(ze.FieldContext),An=mn!==void 0?mn:Gn,sr=tt(vn),hn=fn("form",wn),[Nr,Zr]=Ne(hn),hi=je.useContext(ze.ListContext),yn=je.useRef(),[Yn,ir]=Qe({}),[vr,yr]=(0,mt.Z)(()=>li()),Dr=Nn=>{const fi=hi==null?void 0:hi.getKey(Nn.name);if(yr(Nn.destroy?li():Nn,!0),On&&tn!==!1&&Mn){let xo=Nn.name;if(Nn.destroy)xo=yn.current||xo;else if(fi!==void 0){const[zi,Lo]=fi;xo=[zi].concat((0,it.Z)(Lo)),yn.current=xo}Mn(Nn,xo)}},ii=(Nn,fi)=>{ir(xo=>{const zi=Object.assign({},xo),yo=[].concat((0,it.Z)(Nn.name.slice(0,-1)),(0,it.Z)(fi)).join(Or);return Nn.destroy?delete zi[yo]:zi[yo]=Nn,zi})},[Br,Cr]=je.useMemo(()=>{const Nn=(0,it.Z)(vr.errors),fi=(0,it.Z)(vr.warnings);return Object.values(Yn).forEach(xo=>{Nn.push.apply(Nn,(0,it.Z)(xo.errors||[])),fi.push.apply(fi,(0,it.Z)(xo.warnings||[]))}),[Nn,fi]},[Yn,vr.errors,vr.warnings]),oi=Ue();function Tn(Nn,fi,xo){return On&&!Cn?je.createElement(xr,{prefixCls:hn,hasFeedback:Dt.hasFeedback,validateStatus:Dt.validateStatus,meta:vr,errors:Br,warnings:Cr,noStyle:!0},Nn):je.createElement(Yr,Object.assign({key:"row"},Dt,{className:ie()(Jt,Zr),prefixCls:hn,fieldId:fi,isRequired:xo,errors:Br,warnings:Cr,meta:vr,onSubItemMetaChange:ii}),Nn)}if(!sr&&!Ln&&!Ut)return Nr(Tn(pn));let Ri={};return typeof In=="string"?Ri.label=In:vn&&(Ri.label=String(vn)),Wn&&(Ri=Object.assign(Object.assign({},Ri),Wn)),Nr(je.createElement(ze.Field,Object.assign({},Dt,{messageVariables:Ri,trigger:ar,validateTrigger:An,onMetaChange:Dr}),(Nn,fi,xo)=>{const zi=wt(vn).length&&fi?fi.name:[],Lo=Et(zi,En),yo=Wt!==void 0?Wt:!!(Qn&&Qn.some(Ti=>{if(Ti&&typeof Ti=="object"&&Ti.required&&!Ti.warningOnly)return!0;if(typeof Ti=="function"){const Hi=Ti(xo);return Hi&&Hi.required&&!Hi.warningOnly}return!1})),Ur=Object.assign({},Nn);let $r=null;if(Array.isArray(pn)&&sr)$r=pn;else if(!(Ln&&(!(_n||Ut)||sr))){if(!(Ut&&!Ln&&!sr))if((0,ft.l$)(pn)){const Ti=Object.assign(Object.assign({},pn.props),Ur);if(Ti.id||(Ti.id=Lo),tn||Br.length>0||Cr.length>0||Dt.extra){const jt=[];(tn||Br.length>0)&&jt.push(`${Lo}_help`),Dt.extra&&jt.push(`${Lo}_extra`),Ti["aria-describedby"]=jt.join(" ")}Br.length>0&&(Ti["aria-invalid"]="true"),yo&&(Ti["aria-required"]="true"),(0,nt.Yr)(pn)&&(Ti.ref=oi(zi,pn)),new Set([].concat((0,it.Z)(wt(ar)),(0,it.Z)(wt(An)))).forEach(jt=>{Ti[jt]=function(){for(var ji,Rr,jr,_i,Ji,_r=arguments.length,Kr=new Array(_r),Pi=0;Pi<_r;Pi++)Kr[Pi]=arguments[Pi];(jr=Ur[jt])===null||jr===void 0||(ji=jr).call.apply(ji,[Ur].concat(Kr)),(Ji=(_i=pn.props)[jt])===null||Ji===void 0||(Rr=Ji).call.apply(Rr,[_i].concat(Kr))}});const cr=[Ti["aria-required"],Ti["aria-invalid"],Ti["aria-describedby"]];$r=je.createElement(Jr,{value:Ur[Dt.valuePropName||"value"],update:pn,childProps:cr},(0,ft.Tm)(pn,Ti))}else Ln&&(_n||Ut)&&!sr?$r=pn(xo):$r=pn}return Tn($r,Lo,yo)}))}const xi=Si;xi.useStatus=St;var lr=xi,Ar=function(Dt,vn){var On={};for(var Jt in Dt)Object.prototype.hasOwnProperty.call(Dt,Jt)&&vn.indexOf(Jt)<0&&(On[Jt]=Dt[Jt]);if(Dt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ut=0,Jt=Object.getOwnPropertySymbols(Dt);Ut<Jt.length;Ut++)vn.indexOf(Jt[Ut])<0&&Object.prototype.propertyIsEnumerable.call(Dt,Jt[Ut])&&(On[Jt[Ut]]=Dt[Jt[Ut]]);return On},Ii=Dt=>{var{prefixCls:vn,children:On}=Dt,Jt=Ar(Dt,["prefixCls","children"]);const{getPrefixCls:Ut}=je.useContext(Ze.E_),wn=Ut("form",vn),_n=je.useMemo(()=>({prefixCls:wn,status:"error"}),[wn]);return je.createElement(ze.List,Object.assign({},Jt),(Qn,Jn,Wt)=>je.createElement(ce.Rk.Provider,{value:_n},On(Qn.map(In=>Object.assign(Object.assign({},In),{fieldKey:In.key})),Jn,{errors:Wt.errors,warnings:Wt.warnings})))};function wr(){const{form:Dt}=(0,je.useContext)(ce.q3);return Dt}const cn=Ct;cn.Item=lr,cn.List=Ii,cn.ErrorList=Ye,cn.useForm=gt,cn.useFormInstance=wr,cn.useWatch=ze.useWatch,cn.Provider=ce.RV,cn.create=()=>{};var un=cn},8628:function(Pn,an,$e){"use strict";var it=$e(59301),xt=$e(34280),ie=$e(56762),_e=$e(69507);function je(){let ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const ce=(0,it.useRef)({}),be=(0,ie.Z)(),Ce=(0,_e.ZP)();return(0,xt.Z)(()=>{const ye=Ce.subscribe(we=>{ce.current=we,ve&&be()});return()=>Ce.unsubscribe(ye)},[]),ce.current}an.Z=je},9432:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return le},n:function(){return ae}});var it=$e(19248),xt=$e(92310),ie=$e.n(xt),_e=$e(93681),je=$e(8654),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:Ne,disabled:Oe,onBlur:Fe,onFocus:Re,suffix:Ye,allowClear:ze,addonAfter:Ze,addonBefore:at,className:ht,style:pt,styles:Mt,rootClassName:et,onChange:ot,classNames:wt}=ue,Et=ee(ue,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:Tt,direction:vt,input:gt}=ve.useContext(be.E_),yt=Tt("input",Pe),It=(0,ve.useRef)(null),[Ot,Vt]=(0,fe.ZP)(yt),{compactSize:Ct,compactItemClassnames:mt}=(0,me.ri)(yt,vt),nt=(0,ye.Z)(dt=>{var Ve;return(Ve=Ne!=null?Ne:Ct)!==null&&Ve!==void 0?Ve:dt}),ft=ve.useContext(Ce.Z),Xe=Oe!=null?Oe:ft,{status:ut,hasFeedback:bt,feedbackIcon:St}=(0,ve.useContext)(we.aM),lt=(0,ce.F)(ut,ke),Qe=z(ue)||!!bt,Ue=(0,ve.useRef)(Qe);(0,ve.useEffect)(()=>{var dt;Qe&&Ue.current,Ue.current=Qe},[Qe]);const We=(0,xe.Z)(It,!0),qe=dt=>{We(),Fe==null||Fe(dt)},He=dt=>{We(),Re==null||Re(dt)},De=dt=>{We(),ot==null||ot(dt)},Le=(bt||Ye)&&ve.createElement(ve.Fragment,null,Ye,bt&&St);let Ke;return typeof ze=="object"&&(ze!=null&&ze.clearIcon)?Ke=ze:ze&&(Ke={clearIcon:ve.createElement(it.Z,null)}),Ot(ve.createElement(_e.default,Object.assign({ref:(0,je.sQ)(pe,It),prefixCls:yt,autoComplete:gt==null?void 0:gt.autoComplete},Et,{disabled:Xe,onBlur:qe,onFocus:He,style:Object.assign(Object.assign({},gt==null?void 0:gt.style),pt),styles:Object.assign(Object.assign({},gt==null?void 0:gt.styles),Mt),suffix:Le,allowClear:Ke,className:ie()(ht,et,mt,gt==null?void 0:gt.className),onChange:De,addonAfter:Ze&&ve.createElement(me.BR,null,ve.createElement(we.Ux,{override:!0,status:!0},Ze)),addonBefore:at&&ve.createElement(me.BR,null,ve.createElement(we.Ux,{override:!0,status:!0},at)),classNames:Object.assign(Object.assign(Object.assign({},wt),gt==null?void 0:gt.classNames),{input:ie()({[`${yt}-sm`]:nt==="small",[`${yt}-lg`]:nt==="large",[`${yt}-rtl`]:vt==="rtl",[`${yt}-borderless`]:!Ie},!Qe&&(0,ce.Z)(yt,lt),wt==null?void 0:wt.input,(Ee=gt==null?void 0:gt.classNames)===null||Ee===void 0?void 0:Ee.input,Vt)}),classes:{affixWrapper:ie()({[`${yt}-affix-wrapper-sm`]:nt==="small",[`${yt}-affix-wrapper-lg`]:nt==="large",[`${yt}-affix-wrapper-rtl`]:vt==="rtl",[`${yt}-affix-wrapper-borderless`]:!Ie},(0,ce.Z)(`${yt}-affix-wrapper`,lt,bt),Vt),wrapper:ie()({[`${yt}-group-rtl`]:vt==="rtl"},Vt),group:ie()({[`${yt}-group-wrapper-sm`]:nt==="small",[`${yt}-group-wrapper-lg`]:nt==="large",[`${yt}-group-wrapper-rtl`]:vt==="rtl",[`${yt}-group-wrapper-disabled`]:Xe},(0,ce.Z)(`${yt}-group-wrapper`,lt,bt),Vt)}})))})},1643:function(Pn,an,$e){"use strict";var it=$e(19248),xt=$e(92310),ie=$e.n(xt),_e=$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:Ne}=z,Oe=xe(z,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:Fe,direction:Re}=je.useContext(ce.E_),Ye=(0,Ce.Z)(le),ze=je.useContext(be.Z),Ze=ue!=null?ue:ze,{status:at,hasFeedback:ht,feedbackIcon:pt}=je.useContext(ye.aM),Mt=(0,ve.F)(at,pe),et=je.useRef(null);je.useImperativeHandle(ee,()=>{var vt;return{resizableTextArea:(vt=et.current)===null||vt===void 0?void 0:vt.resizableTextArea,focus:gt=>{var yt,It;(0,we.n)((It=(yt=et.current)===null||yt===void 0?void 0:yt.resizableTextArea)===null||It===void 0?void 0:It.textArea,gt)},blur:()=>{var gt;return(gt=et.current)===null||gt===void 0?void 0:gt.blur()}}});const ot=Fe("input",ae);let wt;typeof Ee=="object"&&(Ee!=null&&Ee.clearIcon)?wt=Ee:Ee&&(wt={clearIcon:je.createElement(it.Z,null)});const[Et,Tt]=(0,me.ZP)(ot);return Et(je.createElement(_e.default,Object.assign({},Oe,{disabled:Ze,allowClear:wt,className:ie()(Ne,ke),classes:{affixWrapper:ie()(`${ot}-textarea-affix-wrapper`,{[`${ot}-affix-wrapper-rtl`]:Re==="rtl",[`${ot}-affix-wrapper-borderless`]:!re,[`${ot}-affix-wrapper-sm`]:Ye==="small",[`${ot}-affix-wrapper-lg`]:Ye==="large",[`${ot}-textarea-show-count`]:Pe},(0,ve.Z)(`${ot}-affix-wrapper`,Mt),Tt)},classNames:Object.assign(Object.assign({},Ie),{textarea:ie()({[`${ot}-borderless`]:!re,[`${ot}-sm`]:Ye==="small",[`${ot}-lg`]:Ye==="large"},(0,ve.Z)(ot,Mt),Tt,Ie==null?void 0:Ie.textarea)}),prefixCls:ot,suffix:ht&&je.createElement("span",{className:`${ot}-textarea-suffix`},pt),showCount:Pe,ref:et})))});an.Z=fe},59412:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return xt}});var it=$e(59301);function xt(ie,_e){const je=(0,it.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,it.useEffect)(()=>(_e&&ve(),()=>je.current.forEach(ce=>{ce&&clearTimeout(ce)})),[]),ve}},92832:function(Pn,an,$e){"use strict";$e.d(an,{default:function(){return Ye}});var it=$e(92310),xt=$e.n(it),ie=$e(59301),_e=$e(36355),je=$e(32441),ve=$e(9937),be=ze=>{const{getPrefixCls:Ze,direction:at}=(0,ie.useContext)(_e.E_),{prefixCls:ht,className:pt}=ze,Mt=Ze("input-group",ht),et=Ze("input"),[ot,wt]=(0,ve.ZP)(et),Et=xt()(Mt,{[`${Mt}-lg`]:ze.size==="large",[`${Mt}-sm`]:ze.size==="small",[`${Mt}-compact`]:ze.compact,[`${Mt}-rtl`]:at==="rtl"},wt,pt),Tt=(0,ie.useContext)(je.aM),vt=(0,ie.useMemo)(()=>Object.assign(Object.assign({},Tt),{isFormItemInput:!1}),[Tt]);return ot(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:vt},ze.children)))},Ce=$e(9432),ye=$e(73331),we=$e(15277),me=$e(2738),xe=$e(8654),fe=$e(59412),z=function(ze,Ze){var at={};for(var ht in ze)Object.prototype.hasOwnProperty.call(ze,ht)&&Ze.indexOf(ht)<0&&(at[ht]=ze[ht]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var pt=0,ht=Object.getOwnPropertySymbols(ze);pt<ht.length;pt++)Ze.indexOf(ht[pt])<0&&Object.prototype.propertyIsEnumerable.call(ze,ht[pt])&&(at[ht[pt]]=ze[ht[pt]]);return at};const ee=ze=>ze?ie.createElement(we.Z,null):ie.createElement(ye.Z,null),ae={click:"onClick",hover:"onMouseOver"};var le=ie.forwardRef((ze,Ze)=>{const{visibilityToggle:at=!0}=ze,ht=typeof at=="object"&&at.visible!==void 0,[pt,Mt]=(0,ie.useState)(()=>ht?at.visible:!1),et=(0,ie.useRef)(null);ie.useEffect(()=>{ht&&Mt(at.visible)},[ht,at]);const ot=(0,fe.Z)(et),wt=()=>{const{disabled:Xe}=ze;Xe||(pt&&ot(),Mt(ut=>{var bt;const St=!ut;return typeof at=="object"&&((bt=at.onVisibleChange)===null||bt===void 0||bt.call(at,St)),St}))},Et=Xe=>{const{action:ut="click",iconRender:bt=ee}=ze,St=ae[ut]||"",lt=bt(pt),Qe={[St]:wt,className:`${Xe}-icon`,key:"passwordIcon",onMouseDown:Ue=>{Ue.preventDefault()},onMouseUp:Ue=>{Ue.preventDefault()}};return ie.cloneElement(ie.isValidElement(lt)?lt:ie.createElement("span",null,lt),Qe)},{className:Tt,prefixCls:vt,inputPrefixCls:gt,size:yt}=ze,It=z(ze,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Ot}=ie.useContext(_e.E_),Vt=Ot("input",gt),Ct=Ot("input-password",vt),mt=at&&Et(Ct),nt=xt()(Ct,Tt,{[`${Ct}-${yt}`]:!!yt}),ft=Object.assign(Object.assign({},(0,me.Z)(It,["suffix","iconRender","visibilityToggle"])),{type:pt?"text":"password",className:nt,prefixCls:Vt,suffix:mt});return yt&&(ft.size=yt),ie.createElement(Ce.Z,Object.assign({ref:(0,xe.sQ)(Ze,et)},ft))}),ue=$e(47472),pe=$e(92343),Ee=$e(3113),Pe=$e(19716),Ie=$e(33234),ke=function(ze,Ze){var at={};for(var ht in ze)Object.prototype.hasOwnProperty.call(ze,ht)&&Ze.indexOf(ht)<0&&(at[ht]=ze[ht]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var pt=0,ht=Object.getOwnPropertySymbols(ze);pt<ht.length;pt++)Ze.indexOf(ht[pt])<0&&Object.prototype.propertyIsEnumerable.call(ze,ht[pt])&&(at[ht[pt]]=ze[ht[pt]]);return at},Oe=ie.forwardRef((ze,Ze)=>{const{prefixCls:at,inputPrefixCls:ht,className:pt,size:Mt,suffix:et,enterButton:ot=!1,addonAfter:wt,loading:Et,disabled:Tt,onSearch:vt,onChange:gt,onCompositionStart:yt,onCompositionEnd:It}=ze,Ot=ke(ze,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Vt,direction:Ct}=ie.useContext(_e.E_),mt=ie.useRef(!1),nt=Vt("input-search",at),ft=Vt("input",ht),{compactSize:Xe}=(0,Ie.ri)(nt,Ct),ut=(0,Pe.Z)(kt=>{var zt;return(zt=Mt!=null?Mt:Xe)!==null&&zt!==void 0?zt:kt}),bt=ie.useRef(null),St=kt=>{kt&&kt.target&&kt.type==="click"&&vt&&vt(kt.target.value,kt,{source:"clear"}),gt&>(kt)},lt=kt=>{var zt;document.activeElement===((zt=bt.current)===null||zt===void 0?void 0:zt.input)&&kt.preventDefault()},Qe=kt=>{var zt,Xt;vt&&vt((Xt=(zt=bt.current)===null||zt===void 0?void 0:zt.input)===null||Xt===void 0?void 0:Xt.value,kt,{source:"input"})},Ue=kt=>{mt.current||Et||Qe(kt)},We=typeof ot=="boolean"?ie.createElement(ue.Z,null):null,qe=`${nt}-button`;let He;const De=ot||{},Le=De.type&&De.type.__ANT_BUTTON===!0;Le||De.type==="button"?He=(0,pe.Tm)(De,Object.assign({onMouseDown:lt,onClick:kt=>{var zt,Xt;(Xt=(zt=De==null?void 0:De.props)===null||zt===void 0?void 0:zt.onClick)===null||Xt===void 0||Xt.call(zt,kt),Qe(kt)},key:"enterButton"},Le?{className:qe,size:ut}:{})):He=ie.createElement(Ee.ZP,{className:qe,type:ot?"primary":void 0,size:ut,disabled:Tt,key:"enterButton",onMouseDown:lt,onClick:Qe,loading:Et,icon:We},ot),wt&&(He=[He,(0,pe.Tm)(wt,{key:"addonAfter"})]);const Ke=xt()(nt,{[`${nt}-rtl`]:Ct==="rtl",[`${nt}-${ut}`]:!!ut,[`${nt}-with-button`]:!!ot},pt),dt=kt=>{mt.current=!0,yt==null||yt(kt)},Ve=kt=>{mt.current=!1,It==null||It(kt)};return ie.createElement(Ce.Z,Object.assign({ref:(0,xe.sQ)(bt,Ze),onPressEnter:Ue},Ot,{size:ut,onCompositionStart:dt,onCompositionEnd:Ve,prefixCls:ft,addonAfter:He,suffix:et,onChange:St,className:Ke,disabled:Tt}))}),Fe=$e(1643);const Re=Ce.Z;Re.Group=be,Re.Search=Oe,Re.TextArea=Fe.Z,Re.Password=le;var Ye=Re},45818:function(Pn,an,$e){"use strict";$e.d(an,{D:function(){return ue},Z:function(){return Pe}});var it=$e(72308),xt=$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"},_e=ie,je=$e(7657),ve=function(ke,Ne){return xt.createElement(je.Z,(0,it.Z)({},ke,{ref:Ne,icon:_e}))},ce=xt.forwardRef(ve),be=ce,Ce=$e(33853),ye=$e(38819),we=$e(92310),me=$e.n(we),xe=$e(2738),z=Ie=>!isNaN(parseFloat(Ie))&&isFinite(Ie),ee=$e(36355),ae=$e(84966),re=function(Ie,ke){var Ne={};for(var Oe in Ie)Object.prototype.hasOwnProperty.call(Ie,Oe)&&ke.indexOf(Oe)<0&&(Ne[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])&&(Ne[Oe[Fe]]=Ie[Oe[Fe]]);return Ne};const le={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},ue=xt.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=xt.forwardRef((Ie,ke)=>{const{prefixCls:Ne,className:Oe,trigger:Fe,children:Re,defaultCollapsed:Ye=!1,theme:ze="dark",style:Ze={},collapsible:at=!1,reverseArrow:ht=!1,width:pt=200,collapsedWidth:Mt=80,zeroWidthTriggerStyle:et,breakpoint:ot,onCollapse:wt,onBreakpoint:Et}=Ie,Tt=re(Ie,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:vt}=(0,xt.useContext)(ae.Gs),[gt,yt]=(0,xt.useState)("collapsed"in Ie?Ie.collapsed:Ye),[It,Ot]=(0,xt.useState)(!1);(0,xt.useEffect)(()=>{"collapsed"in Ie&&yt(Ie.collapsed)},[Ie.collapsed]);const Vt=(ut,bt)=>{"collapsed"in Ie||yt(ut),wt==null||wt(ut,bt)},Ct=(0,xt.useRef)();Ct.current=ut=>{Ot(ut.matches),Et==null||Et(ut.matches),gt!==ut.matches&&Vt(ut.matches,"responsive")},(0,xt.useEffect)(()=>{function ut(St){return Ct.current(St)}let bt;if(typeof window!="undefined"){const{matchMedia:St}=window;if(St&&ot&&ot in le){bt=St(`(max-width: ${le[ot]})`);try{bt.addEventListener("change",ut)}catch(lt){bt.addListener(ut)}ut(bt)}}return()=>{try{bt==null||bt.removeEventListener("change",ut)}catch(St){bt==null||bt.removeListener(ut)}}},[ot]),(0,xt.useEffect)(()=>{const ut=pe("ant-sider-");return vt.addSider(ut),()=>vt.removeSider(ut)},[]);const mt=()=>{Vt(!gt,"clickTrigger")},{getPrefixCls:nt}=(0,xt.useContext)(ee.E_),ft=()=>{const ut=nt("layout-sider",Ne),bt=(0,xe.Z)(Tt,["collapsed"]),St=gt?Mt:pt,lt=z(St)?`${St}px`:String(St),Qe=parseFloat(String(Mt||0))===0?xt.createElement("span",{onClick:mt,className:me()(`${ut}-zero-width-trigger`,`${ut}-zero-width-trigger-${ht?"right":"left"}`),style:et},Fe||xt.createElement(be,null)):null,qe={expanded:ht?xt.createElement(ye.Z,null):xt.createElement(Ce.Z,null),collapsed:ht?xt.createElement(Ce.Z,null):xt.createElement(ye.Z,null)}[gt?"collapsed":"expanded"],He=Fe!==null?Qe||xt.createElement("div",{className:`${ut}-trigger`,onClick:mt,style:{width:lt}},Fe||qe):null,De=Object.assign(Object.assign({},Ze),{flex:`0 0 ${lt}`,maxWidth:lt,minWidth:lt,width:lt}),Le=me()(ut,`${ut}-${ze}`,{[`${ut}-collapsed`]:!!gt,[`${ut}-has-trigger`]:at&&Fe!==null&&!Qe,[`${ut}-below`]:!!It,[`${ut}-zero-width`]:parseFloat(lt)===0},Oe);return xt.createElement("aside",Object.assign({className:Le},bt,{style:De,ref:ke}),xt.createElement("div",{className:`${ut}-children`},Re),at||It&&Qe?He:null)},Xe=xt.useMemo(()=>({siderCollapsed:gt}),[gt]);return xt.createElement(ue.Provider,{value:Xe},ft())})},84966:function(Pn,an,$e){"use strict";$e.d(an,{VY:function(){return ue},$_:function(){return le},h4:function(){return re},Gs:function(){return xe},ZP:function(){return pe}});var it=$e(80702),xt=$e(92310),ie=$e.n(xt),_e=$e(2738),je=$e(59301),ve=$e(36355),ce=$e(83116),Ce=Ee=>{const{componentCls:Pe,bodyBg:Ie,lightSiderBg:ke,lightTriggerBg:Ne,lightTriggerColor:Oe}=Ee;return{[`${Pe}-sider-light`]:{background:ke,[`${Pe}-sider-trigger`]:{color:Oe,background:Ne},[`${Pe}-sider-zero-width-trigger`]:{color:Oe,background:Ne,border:`1px solid ${Ie}`,borderInlineStart:0}}}};const ye=Ee=>{const{antCls:Pe,componentCls:Ie,colorText:ke,triggerColor:Ne,footerBg:Oe,triggerBg:Fe,headerHeight:Re,headerPadding:Ye,headerColor:ze,footerPadding:Ze,triggerHeight:at,zeroTriggerHeight:ht,zeroTriggerWidth:pt,motionDurationMid:Mt,motionDurationSlow:et,fontSize:ot,borderRadius:wt,bodyBg:Et,headerBg:Tt,siderBg:vt}=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:vt,transition:`all ${Mt}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${Pe}-menu${Pe}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:at},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:at,color:Ne,lineHeight:`${at}px`,textAlign:"center",background:Fe,cursor:"pointer",transition:`all ${Mt}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:Re,insetInlineEnd:-pt,zIndex:1,width:pt,height:ht,color:Ne,fontSize:Ee.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:vt,borderStartStartRadius:0,borderStartEndRadius:wt,borderEndEndRadius:wt,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:-pt,borderStartStartRadius:wt,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:wt}}}}},Ce(Ee)),{"&-rtl":{direction:"rtl"}}),[`${Ie}-header`]:{height:Re,padding:Ye,color:ze,lineHeight:`${Re}px`,background:Tt,[`${Pe}-menu`]:{lineHeight:"inherit"}},[`${Ie}-footer`]:{padding:Ze,color:ke,fontSize:ot,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:Ne,controlHeightSM:Oe,marginXXS:Fe,colorTextLightSolid:Re,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:Ne,footerPadding:`${Oe}px ${ze}px`,footerBg:Pe,siderBg:"#001529",triggerHeight:ke+Fe*2,triggerBg:"#002140",triggerColor:Re,zeroTriggerWidth:ke,zeroTriggerHeight:ke,lightSiderBg:Ye,lightTriggerBg:Ye,lightTriggerColor:Ne}},{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 Ne=0,ke=Object.getOwnPropertySymbols(Ee);Ne<ke.length;Ne++)Pe.indexOf(ke[Ne])<0&&Object.prototype.propertyIsEnumerable.call(Ee,ke[Ne])&&(Ie[ke[Ne]]=Ee[ke[Ne]]);return Ie};const xe=je.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function fe(Ee){let{suffixCls:Pe,tagName:Ie,displayName:ke}=Ee;return Ne=>je.forwardRef((Fe,Re)=>je.createElement(Ne,Object.assign({ref:Re,suffixCls:Pe,tagName:Ie},Fe)))}const z=je.forwardRef((Ee,Pe)=>{const{prefixCls:Ie,suffixCls:ke,className:Ne,tagName:Oe}=Ee,Fe=me(Ee,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:Re}=je.useContext(ve.E_),Ye=Re("layout",Ie),[ze,Ze]=we(Ye),at=ke?`${Ye}-${ke}`:Ye;return ze(je.createElement(Oe,Object.assign({className:ie()(Ie||at,Ne,Ze),ref:Pe},Fe)))}),ee=je.forwardRef((Ee,Pe)=>{const{direction:Ie}=je.useContext(ve.E_),[ke,Ne]=je.useState([]),{prefixCls:Oe,className:Fe,rootClassName:Re,children:Ye,hasSider:ze,tagName:Ze,style:at}=Ee,ht=me(Ee,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),pt=(0,_e.Z)(ht,["suffixCls"]),{getPrefixCls:Mt,layout:et}=je.useContext(ve.E_),ot=Mt("layout",Oe),[wt,Et]=we(ot),Tt=ie()(ot,{[`${ot}-has-sider`]:typeof ze=="boolean"?ze:ke.length>0,[`${ot}-rtl`]:Ie==="rtl"},et==null?void 0:et.className,Fe,Re,Et),vt=je.useMemo(()=>({siderHook:{addSider:gt=>{Ne(yt=>[].concat((0,it.Z)(yt),[gt]))},removeSider:gt=>{Ne(yt=>yt.filter(It=>It!==gt))}}}),[]);return wt(je.createElement(xe.Provider,{value:vt},je.createElement(Ze,Object.assign({ref:Pe,className:Tt,style:Object.assign(Object.assign({},et==null?void 0:et.style),at)},pt),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(Pn,an,$e){"use strict";$e.d(an,{J:function(){return ve}});var it=$e(59301),xt=$e(33234),ie=$e(70425),_e=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=it.createContext(null),ve=it.forwardRef((ce,be)=>{const{children:Ce}=ce,ye=_e(ce,["children"]),we=it.useContext(je),me=it.useMemo(()=>Object.assign(Object.assign({},we),ye),[we,ye.prefixCls,ye.mode,ye.selectable]);return it.createElement(je.Provider,{value:me},it.createElement(xt.BR,null,(0,ie.supportNodeRef)(Ce)?it.cloneElement(Ce,{ref:be}):Ce))});an.Z=je},20834:function(Pn,an,$e){"use strict";$e.d(an,{default:function(){return Xe}});var it=$e(15285),xt=$e(59301),ie=$e(45818),_e=$e(92310),je=$e.n(_e),ve=$e(36355),ce=function(ut,bt){var St={};for(var lt in ut)Object.prototype.hasOwnProperty.call(ut,lt)&&bt.indexOf(lt)<0&&(St[lt]=ut[lt]);if(ut!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Qe=0,lt=Object.getOwnPropertySymbols(ut);Qe<lt.length;Qe++)bt.indexOf(lt[Qe])<0&&Object.prototype.propertyIsEnumerable.call(ut,lt[Qe])&&(St[lt[Qe]]=ut[lt[Qe]]);return St},Ce=ut=>{const{prefixCls:bt,className:St,dashed:lt}=ut,Qe=ce(ut,["prefixCls","className","dashed"]),{getPrefixCls:Ue}=xt.useContext(ve.E_),We=Ue("menu",bt),qe=je()({[`${We}-item-divider-dashed`]:!!lt},St);return xt.createElement(it.iz,Object.assign({className:qe},Qe))},ye=$e(11592),we=$e(2738),me=$e(6848),xe=$e(92343),z=(0,xt.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),ae=ut=>{var bt;const{className:St,children:lt,icon:Qe,title:Ue,danger:We}=ut,{prefixCls:qe,firstLevel:He,direction:De,disableMenuItemTitleTooltip:Le,inlineCollapsed:Ke}=xt.useContext(z),dt=Nt=>{const qt=xt.createElement("span",{className:`${qe}-title-content`},lt);return(!Qe||(0,xe.l$)(lt)&<.type==="span")&<&&Nt&&He&&typeof lt=="string"?xt.createElement("div",{className:`${qe}-inline-collapsed-noicon`},lt.charAt(0)):qt},{siderCollapsed:Ve}=xt.useContext(ie.D);let kt=Ue;typeof Ue=="undefined"?kt=He?lt:"":Ue===!1&&(kt="");const zt={title:kt};!Ve&&!Ke&&(zt.title=null,zt.open=!1);const Xt=(0,ye.Z)(lt).length;let At=xt.createElement(it.ck,Object.assign({},(0,we.Z)(ut,["title","icon","danger"]),{className:je()({[`${qe}-item-danger`]:We,[`${qe}-item-only-child`]:(Qe?Xt+1:Xt)===1},St),title:typeof Ue=="string"?Ue:void 0}),(0,xe.Tm)(Qe,{className:je()((0,xe.l$)(Qe)?(bt=Qe.props)===null||bt===void 0?void 0:bt.className:"",`${qe}-item-icon`)}),dt(Ke));return Le||(At=xt.createElement(me.Z,Object.assign({},zt,{placement:De==="rtl"?"left":"right",overlayClassName:`${qe}-inline-collapsed-tooltip`}),At)),At},le=ut=>{var bt;const{popupClassName:St,icon:lt,title:Qe,theme:Ue}=ut,We=xt.useContext(z),{prefixCls:qe,inlineCollapsed:He,theme:De}=We,Le=(0,it.Xl)();let Ke;if(!lt)Ke=He&&!Le.length&&Qe&&typeof Qe=="string"?xt.createElement("div",{className:`${qe}-inline-collapsed-noicon`},Qe.charAt(0)):xt.createElement("span",{className:`${qe}-title-content`},Qe);else{const Ve=(0,xe.l$)(Qe)&&Qe.type==="span";Ke=xt.createElement(xt.Fragment,null,(0,xe.Tm)(lt,{className:je()((0,xe.l$)(lt)?(bt=lt.props)===null||bt===void 0?void 0:bt.className:"",`${qe}-item-icon`)}),Ve?Qe:xt.createElement("span",{className:`${qe}-title-content`},Qe))}const dt=xt.useMemo(()=>Object.assign(Object.assign({},We),{firstLevel:!1}),[We]);return xt.createElement(z.Provider,{value:dt},xt.createElement(it.Wd,Object.assign({},(0,we.Z)(ut,["icon"]),{title:Ke,popupClassName:je()(qe,St,`${qe}-${Ue||De}`)})))},ue=$e(18785),pe=$e(70425),Ee=$e(62892),Pe=$e(40875),Ie=function(ut,bt){var St={};for(var lt in ut)Object.prototype.hasOwnProperty.call(ut,lt)&&bt.indexOf(lt)<0&&(St[lt]=ut[lt]);if(ut!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Qe=0,lt=Object.getOwnPropertySymbols(ut);Qe<lt.length;Qe++)bt.indexOf(lt[Qe])<0&&Object.prototype.propertyIsEnumerable.call(ut,lt[Qe])&&(St[lt[Qe]]=ut[lt[Qe]]);return St};function ke(ut){return(ut||[]).map((bt,St)=>{if(bt&&typeof bt=="object"){const lt=bt,{label:Qe,children:Ue,key:We,type:qe}=lt,He=Ie(lt,["label","children","key","type"]),De=We!=null?We:`tmp-${St}`;return Ue||qe==="group"?qe==="group"?xt.createElement(it.BW,Object.assign({key:De},He,{title:Qe}),ke(Ue)):xt.createElement(le,Object.assign({key:De},He,{title:Qe}),ke(Ue)):qe==="divider"?xt.createElement(Ce,Object.assign({key:De},He)):xt.createElement(ae,Object.assign({key:De},He),Qe)}return null}).filter(bt=>bt)}function Ne(ut){return xt.useMemo(()=>ut&&ke(ut),[ut])}var Oe=$e(64993),Fe=$e(17313),Re=$e(8378),Ye=$e(13826),ze=$e(29878),Ze=$e(83116),at=$e(37613),pt=ut=>{const{componentCls:bt,motionDurationSlow:St,horizontalLineHeight:lt,colorSplit:Qe,lineWidth:Ue,lineType:We,itemPaddingInline:qe}=ut;return{[`${bt}-horizontal`]:{lineHeight:lt,border:0,borderBottom:`${Ue}px ${We} ${Qe}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${bt}-item, ${bt}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:qe},[`> ${bt}-item:hover,
|
|
|
> ${bt}-item-active,
|
|
|
> ${bt}-submenu ${bt}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${bt}-item, ${bt}-submenu-title`]:{transition:[`border-color ${St}`,`background ${St}`].join(",")},[`${bt}-submenu-arrow`]:{display:"none"}}}},et=ut=>{let{componentCls:bt,menuArrowOffset:St}=ut;return{[`${bt}-rtl`]:{direction:"rtl"},[`${bt}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${bt}-rtl${bt}-vertical,
|
|
|
${bt}-submenu-rtl ${bt}-vertical`]:{[`${bt}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${St})`},"&::after":{transform:`rotate(45deg) translateY(${St})`}}}}};const ot=ut=>Object.assign({},(0,Fe.oN)(ut));var Et=(ut,bt)=>{const{componentCls:St,itemColor:lt,itemSelectedColor:Qe,groupTitleColor:Ue,itemBg:We,subMenuItemBg:qe,itemSelectedBg:He,activeBarHeight:De,activeBarWidth:Le,activeBarBorderWidth:Ke,motionDurationSlow:dt,motionEaseInOut:Ve,motionEaseOut:kt,itemPaddingInline:zt,motionDurationMid:Xt,itemHoverColor:At,lineType:Nt,colorSplit:qt,itemDisabledColor:on,dangerItemColor:gn,dangerItemHoverColor:kn,dangerItemSelectedColor:Kn,dangerItemActiveBg:Xn,dangerItemSelectedBg:hr,itemHoverBg:dr,itemActiveBg:fr,menuSubMenuBg:xr,horizontalItemSelectedColor:Hr,horizontalItemSelectedBg:Yr,horizontalItemBorderRadius:Or,horizontalItemHoverBg:bi,popupBg:Jr}=ut;return{[`${St}-${bt}, ${St}-${bt} > ${St}`]:{color:lt,background:We,[`&${St}-root:focus-visible`]:Object.assign({},ot(ut)),[`${St}-item-group-title`]:{color:Ue},[`${St}-submenu-selected`]:{[`> ${St}-submenu-title`]:{color:Qe}},[`${St}-item-disabled, ${St}-submenu-disabled`]:{color:`${on} !important`},[`${St}-item:not(${St}-item-selected):not(${St}-submenu-selected)`]:{[`&:hover, > ${St}-submenu-title:hover`]:{color:At}},[`&:not(${St}-horizontal)`]:{[`${St}-item:not(${St}-item-selected)`]:{"&:hover":{backgroundColor:dr},"&:active":{backgroundColor:fr}},[`${St}-submenu-title`]:{"&:hover":{backgroundColor:dr},"&:active":{backgroundColor:fr}}},[`${St}-item-danger`]:{color:gn,[`&${St}-item:hover`]:{[`&:not(${St}-item-selected):not(${St}-submenu-selected)`]:{color:kn}},[`&${St}-item:active`]:{background:Xn}},[`${St}-item a`]:{"&, &:hover":{color:"inherit"}},[`${St}-item-selected`]:{color:Qe,[`&${St}-item-danger`]:{color:Kn},"a, a:hover":{color:"inherit"}},[`& ${St}-item-selected`]:{backgroundColor:He,[`&${St}-item-danger`]:{backgroundColor:hr}},[`${St}-item, ${St}-submenu-title`]:{[`&:not(${St}-item-disabled):focus-visible`]:Object.assign({},ot(ut))},[`&${St}-submenu > ${St}`]:{backgroundColor:xr},[`&${St}-popup > ${St}`]:{backgroundColor:Jr},[`&${St}-horizontal`]:Object.assign(Object.assign({},bt==="dark"?{borderBottom:0}:{}),{[`> ${St}-item, > ${St}-submenu`]:{top:Ke,marginTop:-Ke,marginBottom:0,borderRadius:Or,"&::after":{position:"absolute",insetInline:zt,bottom:0,borderBottom:`${De}px solid transparent`,transition:`border-color ${dt} ${Ve}`,content:'""'},"&:hover, &-active, &-open":{background:bi,"&::after":{borderBottomWidth:De,borderBottomColor:Hr}},"&-selected":{color:Hr,backgroundColor:Yr,"&:hover":{backgroundColor:Yr},"&::after":{borderBottomWidth:De,borderBottomColor:Hr}}}}),[`&${St}-root`]:{[`&${St}-inline, &${St}-vertical`]:{borderInlineEnd:`${Ke}px ${Nt} ${qt}`}},[`&${St}-inline`]:{[`${St}-sub${St}-inline`]:{background:qe},[`${St}-item, ${St}-submenu-title`]:Ke&&Le?{width:`calc(100% + ${Ke}px)`}:{},[`${St}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${Le}px solid ${Qe}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${Xt} ${kt}`,`opacity ${Xt} ${kt}`].join(","),content:'""'},[`&${St}-item-danger`]:{"&::after":{borderInlineEndColor:Kn}}},[`${St}-selected, ${St}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${Xt} ${Ve}`,`opacity ${Xt} ${Ve}`].join(",")}}}}}};const Tt=ut=>{const{componentCls:bt,itemHeight:St,itemMarginInline:lt,padding:Qe,menuArrowSize:Ue,marginXS:We,itemMarginBlock:qe}=ut,He=Qe+Ue+We;return{[`${bt}-item`]:{position:"relative",overflow:"hidden"},[`${bt}-item, ${bt}-submenu-title`]:{height:St,lineHeight:`${St}px`,paddingInline:Qe,overflow:"hidden",textOverflow:"ellipsis",marginInline:lt,marginBlock:qe,width:`calc(100% - ${lt*2}px)`},[`> ${bt}-item,
|
|
|
> ${bt}-submenu > ${bt}-submenu-title`]:{height:St,lineHeight:`${St}px`},[`${bt}-item-group-list ${bt}-submenu-title,
|
|
|
${bt}-submenu-title`]:{paddingInlineEnd:He}}};var gt=ut=>{const{componentCls:bt,iconCls:St,itemHeight:lt,colorTextLightSolid:Qe,dropdownWidth:Ue,controlHeightLG:We,motionDurationMid:qe,motionEaseOut:He,paddingXL:De,itemMarginInline:Le,fontSizeLG:Ke,motionDurationSlow:dt,paddingXS:Ve,boxShadowSecondary:kt,collapsedWidth:zt,collapsedIconSize:Xt}=ut,At={height:lt,lineHeight:`${lt}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[bt]:{"&-inline, &-vertical":Object.assign({[`&${bt}-root`]:{boxShadow:"none"}},Tt(ut))},[`${bt}-submenu-popup`]:{[`${bt}-vertical`]:Object.assign(Object.assign({},Tt(ut)),{boxShadow:kt})}},{[`${bt}-submenu-popup ${bt}-vertical${bt}-sub`]:{minWidth:Ue,maxHeight:`calc(100vh - ${We*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${bt}-inline`]:{width:"100%",[`&${bt}-root`]:{[`${bt}-item, ${bt}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${dt}`,`background ${dt}`,`padding ${qe} ${He}`].join(","),[`> ${bt}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${bt}-sub${bt}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${bt}-submenu > ${bt}-submenu-title`]:At,[`& ${bt}-item-group-title`]:{paddingInlineStart:De}},[`${bt}-item`]:At}},{[`${bt}-inline-collapsed`]:{width:zt,[`&${bt}-root`]:{[`${bt}-item, ${bt}-submenu ${bt}-submenu-title`]:{[`> ${bt}-inline-collapsed-noicon`]:{fontSize:Ke,textAlign:"center"}}},[`> ${bt}-item,
|
|
|
> ${bt}-item-group > ${bt}-item-group-list > ${bt}-item,
|
|
|
> ${bt}-item-group > ${bt}-item-group-list > ${bt}-submenu > ${bt}-submenu-title,
|
|
|
> ${bt}-submenu > ${bt}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${Ke/2}px - ${Le}px)`,textOverflow:"clip",[`
|
|
|
${bt}-submenu-arrow,
|
|
|
${bt}-submenu-expand-icon
|
|
|
`]:{opacity:0},[`${bt}-item-icon, ${St}`]:{margin:0,fontSize:Xt,lineHeight:`${lt}px`,"+ span":{display:"inline-block",opacity:0}}},[`${bt}-item-icon, ${St}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${bt}-item-icon, ${St}`]:{display:"none"},"a, a:hover":{color:Qe}},[`${bt}-item-group-title`]:Object.assign(Object.assign({},Fe.vS),{paddingInline:Ve})}}]};const yt=ut=>{const{componentCls:bt,motionDurationSlow:St,motionDurationMid:lt,motionEaseInOut:Qe,motionEaseOut:Ue,iconCls:We,iconSize:qe,iconMarginInlineEnd:He}=ut;return{[`${bt}-item, ${bt}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${St}`,`background ${St}`,`padding ${St} ${Qe}`].join(","),[`${bt}-item-icon, ${We}`]:{minWidth:qe,fontSize:qe,transition:[`font-size ${lt} ${Ue}`,`margin ${St} ${Qe}`,`color ${St}`].join(","),"+ span":{marginInlineStart:He,opacity:1,transition:[`opacity ${St} ${Qe}`,`margin ${St}`,`color ${St}`].join(",")}},[`${bt}-item-icon`]:Object.assign({},(0,Fe.Ro)()),[`&${bt}-item-only-child`]:{[`> ${We}, > ${bt}-item-icon`]:{marginInlineEnd:0}}},[`${bt}-item-disabled, ${bt}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${bt}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},It=ut=>{const{componentCls:bt,motionDurationSlow:St,motionEaseInOut:lt,borderRadius:Qe,menuArrowSize:Ue,menuArrowOffset:We}=ut;return{[`${bt}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:ut.margin,width:Ue,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${St} ${lt}, opacity ${St}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:Ue*.6,height:Ue*.15,backgroundColor:"currentcolor",borderRadius:Qe,transition:[`background ${St} ${lt}`,`transform ${St} ${lt}`,`top ${St} ${lt}`,`color ${St} ${lt}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${We})`},"&::after":{transform:`rotate(-45deg) translateY(${We})`}}}}},Ot=ut=>{const{antCls:bt,componentCls:St,fontSize:lt,motionDurationSlow:Qe,motionDurationMid:Ue,motionEaseInOut:We,paddingXS:qe,padding:He,colorSplit:De,lineWidth:Le,zIndexPopup:Ke,borderRadiusLG:dt,subMenuItemBorderRadius:Ve,menuArrowSize:kt,menuArrowOffset:zt,lineType:Xt,menuPanelMaskInset:At,groupTitleLineHeight:Nt,groupTitleFontSize:qt}=ut;return[{"":{[`${St}`]:Object.assign(Object.assign({},(0,Fe.dF)()),{"&-hidden":{display:"none"}})},[`${St}-submenu-hidden`]:{display:"none"}},{[St]: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",[`${St}-item`]:{flex:"none"}},[`${St}-item, ${St}-submenu, ${St}-submenu-title`]:{borderRadius:ut.itemBorderRadius},[`${St}-item-group-title`]:{padding:`${qe}px ${He}px`,fontSize:qt,lineHeight:Nt,transition:`all ${Qe}`},[`&-horizontal ${St}-submenu`]:{transition:[`border-color ${Qe} ${We}`,`background ${Qe} ${We}`].join(",")},[`${St}-submenu, ${St}-submenu-inline`]:{transition:[`border-color ${Qe} ${We}`,`background ${Qe} ${We}`,`padding ${Ue} ${We}`].join(",")},[`${St}-submenu ${St}-sub`]:{cursor:"initial",transition:[`background ${Qe} ${We}`,`padding ${Qe} ${We}`].join(",")},[`${St}-title-content`]:{transition:`color ${Qe}`},[`${St}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${St}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:De,borderStyle:Xt,borderWidth:0,borderTopWidth:Le,marginBlock:Le,padding:0,"&-dashed":{borderStyle:"dashed"}}}),yt(ut)),{[`${St}-item-group`]:{[`${St}-item-group-list`]:{margin:0,padding:0,[`${St}-item, ${St}-submenu-title`]:{paddingInline:`${lt*2}px ${He}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:Ke,borderRadius:dt,boxShadow:"none",transformOrigin:"0 0",[`&${St}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${At}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:At},"\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},[`> ${St}`]:Object.assign(Object.assign(Object.assign({borderRadius:dt},yt(ut)),It(ut)),{[`${St}-item, ${St}-submenu > ${St}-submenu-title`]:{borderRadius:Ve},[`${St}-submenu-title::after`]:{transition:`transform ${Qe} ${We}`}})}}),It(ut)),{[`&-inline-collapsed ${St}-submenu-arrow,
|
|
|
&-inline ${St}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${zt})`},"&::after":{transform:`rotate(45deg) translateX(-${zt})`}},[`${St}-submenu-open${St}-submenu-inline > ${St}-submenu-title > ${St}-submenu-arrow`]:{transform:`translateY(-${kt*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${zt})`},"&::before":{transform:`rotate(45deg) translateX(${zt})`}}})},{[`${bt}-layout-header`]:{[St]:{lineHeight:"inherit"}}}]};var Vt=(ut,bt)=>(0,Ze.Z)("Menu",lt=>{if(bt===!1)return[];const{colorBgElevated:Qe,colorPrimary:Ue,colorTextLightSolid:We,controlHeightLG:qe,fontSize:He,darkItemColor:De,darkDangerItemColor:Le,darkItemBg:Ke,darkSubMenuItemBg:dt,darkItemSelectedColor:Ve,darkItemSelectedBg:kt,darkDangerItemSelectedBg:zt,darkItemHoverBg:Xt,darkGroupTitleColor:At,darkItemHoverColor:Nt,darkItemDisabledColor:qt,darkDangerItemHoverColor:on,darkDangerItemSelectedColor:gn,darkDangerItemActiveBg:kn}=lt,Kn=He/7*5,Xn=(0,at.TS)(lt,{menuArrowSize:Kn,menuHorizontalHeight:qe*1.15,menuArrowOffset:`${Kn*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:Qe}),hr=(0,at.TS)(Xn,{itemColor:De,itemHoverColor:Nt,groupTitleColor:At,itemSelectedColor:Ve,itemBg:Ke,popupBg:Ke,subMenuItemBg:dt,itemActiveBg:"transparent",itemSelectedBg:kt,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:Xt,itemDisabledColor:qt,dangerItemColor:Le,dangerItemHoverColor:on,dangerItemSelectedColor:gn,dangerItemActiveBg:kn,dangerItemSelectedBg:zt,menuSubMenuBg:dt,horizontalItemSelectedColor:We,horizontalItemSelectedBg:Ue});return[Ot(Xn),pt(Xn),gt(Xn),Et(Xn,"light"),Et(hr,"dark"),et(Xn),(0,Re.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:Ue,colorTextDisabled:We,colorErrorBg:qe,colorText:He,colorTextDescription:De,colorBgContainer:Le,colorFillAlter:Ke,colorFillContent:dt,lineWidth:Ve,lineWidthBold:kt,controlItemBgActive:zt,colorBgTextHover:Xt,controlHeightLG:At,lineHeight:Nt,colorBgElevated:qt,marginXXS:on,padding:gn,fontSize:kn,controlHeightSM:Kn,fontSizeLG:Xn,colorTextLightSolid:hr,colorErrorHover:dr}=lt,fr=new Oe.C(hr).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:Xt,itemHoverBg:Xt,colorItemBgActive:dt,itemActiveBg:zt,colorSubItemBg:Ke,subMenuItemBg:Ke,colorItemBgSelected:zt,itemSelectedBg:zt,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:kt,activeBarHeight:kt,colorActiveBarBorderSize:Ve,activeBarBorderWidth:Ve,colorItemTextDisabled:We,itemDisabledColor:We,colorDangerItemText:Ue,dangerItemColor:Ue,colorDangerItemTextHover:Ue,dangerItemHoverColor:Ue,colorDangerItemTextSelected:Ue,dangerItemSelectedColor:Ue,colorDangerItemBgActive:qe,dangerItemActiveBg:qe,colorDangerItemBgSelected:qe,dangerItemSelectedBg:qe,itemMarginInline:lt.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:At,groupTitleLineHeight:Nt,collapsedWidth:At*2,popupBg:qt,itemMarginBlock:on,itemPaddingInline:gn,horizontalLineHeight:`${At*1.15}px`,iconSize:kn,iconMarginInlineEnd:Kn-kn,collapsedIconSize:Xn,groupTitleFontSize:kn,darkItemDisabledColor:new Oe.C(hr).setAlpha(.25).toRgbString(),darkItemColor:fr,darkDangerItemColor:Ue,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:hr,darkItemSelectedBg:Qe,darkDangerItemSelectedBg:Ue,darkItemHoverBg:"transparent",darkGroupTitleColor:fr,darkItemHoverColor:hr,darkDangerItemHoverColor:dr,darkDangerItemSelectedColor:hr,darkDangerItemActiveBg:Ue}},{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,bt){var St={};for(var lt in ut)Object.prototype.hasOwnProperty.call(ut,lt)&&bt.indexOf(lt)<0&&(St[lt]=ut[lt]);if(ut!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Qe=0,lt=Object.getOwnPropertySymbols(ut);Qe<lt.length;Qe++)bt.indexOf(lt[Qe])<0&&Object.prototype.propertyIsEnumerable.call(ut,lt[Qe])&&(St[lt[Qe]]=ut[lt[Qe]]);return St},nt=(0,xt.forwardRef)((ut,bt)=>{var St,lt;const Qe=xt.useContext(Pe.Z),Ue=Qe||{},{getPrefixCls:We,getPopupContainer:qe,direction:He,menu:De}=xt.useContext(ve.E_),Le=We(),{prefixCls:Ke,className:dt,style:Ve,theme:kt="light",expandIcon:zt,_internalDisableMenuItemTitleTooltip:Xt,inlineCollapsed:At,siderCollapsed:Nt,items:qt,children:on,rootClassName:gn,mode:kn,selectable:Kn,onClick:Xn,overflowedIndicatorPopupClassName:hr}=ut,dr=Ct(ut,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),fr=(0,we.Z)(dr,["collapsedWidth"]),xr=Ne(qt)||on;(St=Ue.validator)===null||St===void 0||St.call(Ue,{mode:kn});const Hr=(0,pe.useEvent)(function(){var Fr;Xn==null||Xn.apply(void 0,arguments),(Fr=Ue.onClick)===null||Fr===void 0||Fr.call(Ue)}),Yr=Ue.mode||kn,Or=Kn!=null?Kn:Ue.selectable,bi=xt.useMemo(()=>Nt!==void 0?Nt:At,[At,Nt]),Jr={horizontal:{motionName:`${Le}-slide-up`},inline:(0,Ee.Z)(Le),other:{motionName:`${Le}-zoom-big`}},tt=We("menu",Ke||Ue.prefixCls),[li,Si]=Vt(tt,!Qe),xi=je()(`${tt}-${kt}`,De==null?void 0:De.className,dt);let lr;if(typeof zt=="function")lr=zt;else if(zt===null||zt===!1)lr=null;else if(Ue.expandIcon===null||Ue.expandIcon===!1)lr=null;else{const Fr=zt!=null?zt:Ue.expandIcon;lr=(0,xe.Tm)(Fr,{className:je()(`${tt}-submenu-expand-icon`,(0,xe.l$)(Fr)?(lt=Fr.props)===null||lt===void 0?void 0:lt.className:"")})}const Ar=xt.useMemo(()=>({prefixCls:tt,inlineCollapsed:bi||!1,direction:He,firstLevel:!0,theme:kt,mode:Yr,disableMenuItemTitleTooltip:Xt}),[tt,bi,He,Xt,kt]);return li(xt.createElement(Pe.Z.Provider,{value:null},xt.createElement(z.Provider,{value:Ar},xt.createElement(it.ZP,Object.assign({getPopupContainer:qe,overflowedIndicator:xt.createElement(ue.Z,null),overflowedIndicatorPopupClassName:je()(tt,`${tt}-${kt}`,hr),mode:Yr,selectable:Or,onClick:Hr},fr,{inlineCollapsed:bi,style:Object.assign(Object.assign({},De==null?void 0:De.style),Ve),className:xi,prefixCls:tt,direction:He,defaultMotions:Jr,expandIcon:lr,ref:bt,rootClassName:je()(gn,Si)}),xr))))});const ft=(0,xt.forwardRef)((ut,bt)=>{const St=(0,xt.useRef)(null),lt=xt.useContext(ie.D);return(0,xt.useImperativeHandle)(bt,()=>({menu:St.current,focus:Qe=>{var Ue;(Ue=St.current)===null||Ue===void 0||Ue.focus(Qe)}})),xt.createElement(nt,Object.assign({ref:St},ut,lt))});ft.Item=ae,ft.SubMenu=le,ft.Divider=Ce,ft.ItemGroup=it.BW;var Xe=ft},58421:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return Ue}});var it=$e(72308),xt=$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"},_e=ie,je=$e(7657),ve=function(qe,He){return xt.createElement(je.Z,(0,it.Z)({},qe,{ref:He,icon:_e}))},ce=xt.forwardRef(ve),be=ce,Ce=$e(49198),ye=$e(33853),we=$e(38819),me=$e(92310),xe=$e.n(me),fe=$e(49618),z=$e(77321),ee=$e(96949),ae=$e(55090),re=$e(77205),le=$e(38793),ue=$e(26112),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(We){(0,re.Z)(He,We);var qe=(0,le.Z)(He);function He(){var De;(0,ee.Z)(this,He);for(var Le=arguments.length,Ke=new Array(Le),dt=0;dt<Le;dt++)Ke[dt]=arguments[dt];return De=qe.call.apply(qe,[this].concat(Ke)),De.state={goInputText:""},De.getValidValue=function(){var Ve=De.state.goInputText;return!Ve||Number.isNaN(Ve)?void 0:Number(Ve)},De.buildOptionText=function(Ve){return"".concat(Ve," ").concat(De.props.locale.items_per_page)},De.changeSize=function(Ve){De.props.changeSize(Number(Ve))},De.handleChange=function(Ve){De.setState({goInputText:Ve.target.value})},De.handleBlur=function(Ve){var kt=De.props,zt=kt.goButton,Xt=kt.quickGo,At=kt.rootPrefixCls,Nt=De.state.goInputText;zt||Nt===""||(De.setState({goInputText:""}),!(Ve.relatedTarget&&(Ve.relatedTarget.className.indexOf("".concat(At,"-item-link"))>=0||Ve.relatedTarget.className.indexOf("".concat(At,"-item"))>=0))&&Xt(De.getValidValue()))},De.go=function(Ve){var kt=De.state.goInputText;kt!==""&&(Ve.keyCode===Ee.ENTER||Ve.type==="click")&&(De.setState({goInputText:""}),De.props.quickGo(De.getValidValue()))},De}return(0,ae.Z)(He,[{key:"getPageSizeOptions",value:function(){var Le=this.props,Ke=Le.pageSize,dt=Le.pageSizeOptions;return dt.some(function(Ve){return Ve.toString()===Ke.toString()})?dt:dt.concat([Ke.toString()]).sort(function(Ve,kt){var zt=Number.isNaN(Number(Ve))?0:Number(Ve),Xt=Number.isNaN(Number(kt))?0:Number(kt);return zt-Xt})}},{key:"render",value:function(){var Le=this,Ke=this.props,dt=Ke.pageSize,Ve=Ke.locale,kt=Ke.rootPrefixCls,zt=Ke.changeSize,Xt=Ke.quickGo,At=Ke.goButton,Nt=Ke.selectComponentClass,qt=Ke.buildOptionText,on=Ke.selectPrefixCls,gn=Ke.disabled,kn=this.state.goInputText,Kn="".concat(kt,"-options"),Xn=Nt,hr=null,dr=null,fr=null;if(!zt&&!Xt)return null;var xr=this.getPageSizeOptions();if(zt&&Xn){var Hr=xr.map(function(Yr,Or){return xt.createElement(Xn.Option,{key:Or,value:Yr.toString()},(qt||Le.buildOptionText)(Yr))});hr=xt.createElement(Xn,{disabled:gn,prefixCls:on,showSearch:!1,className:"".concat(Kn,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(dt||xr[0]).toString(),onChange:this.changeSize,getPopupContainer:function(Or){return Or.parentNode},"aria-label":Ve.page_size,defaultOpen:!1},Hr)}return Xt&&(At&&(fr=typeof At=="boolean"?xt.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:gn,className:"".concat(Kn,"-quick-jumper-button")},Ve.jump_to_confirm):xt.createElement("span",{onClick:this.go,onKeyUp:this.go},At)),dr=xt.createElement("div",{className:"".concat(Kn,"-quick-jumper")},Ve.jump_to,xt.createElement("input",{disabled:gn,type:"text",value:kn,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":Ve.page}),Ve.page,fr)),xt.createElement("li",{className:"".concat(Kn)},hr,dr)}}]),He}(xt.Component);Ie.defaultProps={pageSizeOptions:["10","20","50","100"]};var ke=Ie,Ne=function(qe){var He,De=qe.rootPrefixCls,Le=qe.page,Ke=qe.active,dt=qe.className,Ve=qe.showTitle,kt=qe.onClick,zt=qe.onKeyPress,Xt=qe.itemRender,At="".concat(De,"-item"),Nt=xe()(At,"".concat(At,"-").concat(Le),(He={},(0,fe.Z)(He,"".concat(At,"-active"),Ke),(0,fe.Z)(He,"".concat(At,"-disabled"),!Le),(0,fe.Z)(He,qe.className,dt),He)),qt=function(){kt(Le)},on=function(Kn){zt(Kn,kt,Le)},gn=Xt(Le,"page",xt.createElement("a",{rel:"nofollow"},Le));return gn?xt.createElement("li",{title:Ve?Le.toString():null,className:Nt,onClick:qt,onKeyPress:on,tabIndex:0},gn):null},Oe=Ne;function Fe(){}function Re(We){var qe=Number(We);return typeof qe=="number"&&!Number.isNaN(qe)&&isFinite(qe)&&Math.floor(qe)===qe}var Ye=function(qe,He,De){return De};function ze(We,qe,He){var De=typeof We=="undefined"?qe.pageSize:We;return Math.floor((He.total-1)/De)+1}var Ze=function(We){(0,re.Z)(He,We);var qe=(0,le.Z)(He);function He(De){var Le;(0,ee.Z)(this,He),Le=qe.call(this,De),Le.paginationNode=xt.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(zt,Xt){var At=Le.props.prefixCls,Nt=zt||xt.createElement("button",{type:"button","aria-label":Xt,className:"".concat(At,"-item-link")});return typeof zt=="function"&&(Nt=xt.createElement(zt,(0,z.Z)({},Le.props))),Nt},Le.isValid=function(zt){var Xt=Le.props.total;return Re(zt)&&zt!==Le.state.current&&Re(Xt)&&Xt>0},Le.shouldDisplayQuickJumper=function(){var zt=Le.props,Xt=zt.showQuickJumper,At=zt.total,Nt=Le.state.pageSize;return At<=Nt?!1:Xt},Le.handleKeyDown=function(zt){(zt.keyCode===Ee.ARROW_UP||zt.keyCode===Ee.ARROW_DOWN)&&zt.preventDefault()},Le.handleKeyUp=function(zt){var Xt=Le.getValidValue(zt),At=Le.state.currentInputValue;Xt!==At&&Le.setState({currentInputValue:Xt}),zt.keyCode===Ee.ENTER?Le.handleChange(Xt):zt.keyCode===Ee.ARROW_UP?Le.handleChange(Xt-1):zt.keyCode===Ee.ARROW_DOWN&&Le.handleChange(Xt+1)},Le.handleBlur=function(zt){var Xt=Le.getValidValue(zt);Le.handleChange(Xt)},Le.changePageSize=function(zt){var Xt=Le.state.current,At=ze(zt,Le.state,Le.props);Xt=Xt>At?At:Xt,At===0&&(Xt=Le.state.current),typeof zt=="number"&&("pageSize"in Le.props||Le.setState({pageSize:zt}),"current"in Le.props||Le.setState({current:Xt,currentInputValue:Xt})),Le.props.onShowSizeChange(Xt,zt),"onChange"in Le.props&&Le.props.onChange&&Le.props.onChange(Xt,zt)},Le.handleChange=function(zt){var Xt=Le.props,At=Xt.disabled,Nt=Xt.onChange,qt=Le.state,on=qt.pageSize,gn=qt.current,kn=qt.currentInputValue;if(Le.isValid(zt)&&!At){var Kn=ze(void 0,Le.state,Le.props),Xn=zt;return zt>Kn?Xn=Kn:zt<1&&(Xn=1),"current"in Le.props||Le.setState({current:Xn}),Xn!==kn&&Le.setState({currentInputValue:Xn}),Nt(Xn,on),Xn}return gn},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(zt,Xt){if(zt.key==="Enter"||zt.charCode===13){for(var At=arguments.length,Nt=new Array(At>2?At-2:0),qt=2;qt<At;qt++)Nt[qt-2]=arguments[qt];Xt.apply(void 0,Nt)}},Le.runIfEnterPrev=function(zt){Le.runIfEnter(zt,Le.prev)},Le.runIfEnterNext=function(zt){Le.runIfEnter(zt,Le.next)},Le.runIfEnterJumpPrev=function(zt){Le.runIfEnter(zt,Le.jumpPrev)},Le.runIfEnterJumpNext=function(zt){Le.runIfEnter(zt,Le.jumpNext)},Le.handleGoTO=function(zt){(zt.keyCode===Ee.ENTER||zt.type==="click")&&Le.handleChange(Le.state.currentInputValue)},Le.renderPrev=function(zt){var Xt=Le.props,At=Xt.prevIcon,Nt=Xt.itemRender,qt=Nt(zt,"prev",Le.getItemIcon(At,"prev page")),on=!Le.hasPrev();return(0,xt.isValidElement)(qt)?(0,xt.cloneElement)(qt,{disabled:on}):qt},Le.renderNext=function(zt){var Xt=Le.props,At=Xt.nextIcon,Nt=Xt.itemRender,qt=Nt(zt,"next",Le.getItemIcon(At,"next page")),on=!Le.hasNext();return(0,xt.isValidElement)(qt)?(0,xt.cloneElement)(qt,{disabled:on}):qt};var Ke=De.onChange!==Fe,dt="current"in De;dt&&!Ke&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var Ve=De.defaultCurrent;"current"in De&&(Ve=De.current);var kt=De.defaultPageSize;return"pageSize"in De&&(kt=De.pageSize),Ve=Math.min(Ve,ze(kt,void 0,De)),Le.state={current:Ve,currentInputValue:Ve,pageSize:kt},Le}return(0,ae.Z)(He,[{key:"componentDidUpdate",value:function(Le,Ke){var dt=this.props.prefixCls;if(Ke.current!==this.state.current&&this.paginationNode.current){var Ve=this.paginationNode.current.querySelector(".".concat(dt,"-item-").concat(Ke.current));if(Ve&&document.activeElement===Ve){var kt;Ve==null||(kt=Ve.blur)===null||kt===void 0||kt.call(Ve)}}}},{key:"getValidValue",value:function(Le){var Ke=Le.target.value,dt=ze(void 0,this.state,this.props),Ve=this.state.currentInputValue,kt;return Ke===""?kt=Ke:Number.isNaN(Number(Ke))?kt=Ve:Ke>=dt?kt=dt:kt=Number(Ke),kt}},{key:"getShowSizeChanger",value:function(){var Le=this.props,Ke=Le.showSizeChanger,dt=Le.total,Ve=Le.totalBoundaryShowSizeChanger;return typeof Ke!="undefined"?Ke:dt>Ve}},{key:"render",value:function(){var Le=this.props,Ke=Le.prefixCls,dt=Le.className,Ve=Le.style,kt=Le.disabled,zt=Le.hideOnSinglePage,Xt=Le.total,At=Le.locale,Nt=Le.showQuickJumper,qt=Le.showLessItems,on=Le.showTitle,gn=Le.showTotal,kn=Le.simple,Kn=Le.itemRender,Xn=Le.showPrevNextJumpers,hr=Le.jumpPrevIcon,dr=Le.jumpNextIcon,fr=Le.selectComponentClass,xr=Le.selectPrefixCls,Hr=Le.pageSizeOptions,Yr=this.state,Or=Yr.current,bi=Yr.pageSize,Jr=Yr.currentInputValue;if(zt===!0&&Xt<=bi)return null;var tt=ze(void 0,this.state,this.props),li=[],Si=null,xi=null,lr=null,Ar=null,Fr=null,Ii=Nt&&Nt.goButton,wr=qt?1:2,cn=Or-1>0?Or-1:0,un=Or+1<tt?Or+1:tt,Dt=(0,ue.Z)(this.props,{aria:!0,data:!0}),vn=gn&&xt.createElement("li",{className:"".concat(Ke,"-total-text")},gn(Xt,[Xt===0?0:(Or-1)*bi+1,Or*bi>Xt?Xt:Or*bi]));if(kn){Ii&&(typeof Ii=="boolean"?Fr=xt.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},At.jump_to_confirm):Fr=xt.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Ii),Fr=xt.createElement("li",{title:on?"".concat(At.jump_to).concat(Or,"/").concat(tt):null,className:"".concat(Ke,"-simple-pager")},Fr));var On=this.renderPrev(cn);return xt.createElement("ul",(0,it.Z)({className:xe()(Ke,"".concat(Ke,"-simple"),(0,fe.Z)({},"".concat(Ke,"-disabled"),kt),dt),style:Ve,ref:this.paginationNode},Dt),vn,On?xt.createElement("li",{title:on?At.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:xe()("".concat(Ke,"-prev"),(0,fe.Z)({},"".concat(Ke,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},On):null,xt.createElement("li",{title:on?"".concat(Or,"/").concat(tt):null,className:"".concat(Ke,"-simple-pager")},xt.createElement("input",{type:"text",value:Jr,disabled:kt,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:3}),xt.createElement("span",{className:"".concat(Ke,"-slash")},"/"),tt),xt.createElement("li",{title:on?At.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:xe()("".concat(Ke,"-next"),(0,fe.Z)({},"".concat(Ke,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(un)),Fr)}if(tt<=3+wr*2){var Jt={locale:At,rootPrefixCls:Ke,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:on,itemRender:Kn};tt||li.push(xt.createElement(Oe,(0,it.Z)({},Jt,{key:"noPager",page:1,className:"".concat(Ke,"-item-disabled")})));for(var Ut=1;Ut<=tt;Ut+=1){var wn=Or===Ut;li.push(xt.createElement(Oe,(0,it.Z)({},Jt,{key:Ut,page:Ut,active:wn})))}}else{var _n=qt?At.prev_3:At.prev_5,Qn=qt?At.next_3:At.next_5,Jn=Kn(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(hr,"prev page")),Wt=Kn(this.getJumpNextPage(),"jump-next",this.getItemIcon(dr,"next page"));Xn&&(Si=Jn?xt.createElement("li",{title:on?_n:null,key:"prev",onClick:this.jumpPrev,tabIndex:0,onKeyPress:this.runIfEnterJumpPrev,className:xe()("".concat(Ke,"-jump-prev"),(0,fe.Z)({},"".concat(Ke,"-jump-prev-custom-icon"),!!hr))},Jn):null,xi=Wt?xt.createElement("li",{title:on?Qn:null,key:"next",tabIndex:0,onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:xe()("".concat(Ke,"-jump-next"),(0,fe.Z)({},"".concat(Ke,"-jump-next-custom-icon"),!!dr))},Wt):null),Ar=xt.createElement(Oe,{locale:At,last:!0,rootPrefixCls:Ke,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:tt,page:tt,active:!1,showTitle:on,itemRender:Kn}),lr=xt.createElement(Oe,{locale:At,rootPrefixCls:Ke,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:on,itemRender:Kn});var In=Math.max(1,Or-wr),Wn=Math.min(Or+wr,tt);Or-1<=wr&&(Wn=1+wr*2),tt-Or<=wr&&(In=tt-wr*2);for(var ar=In;ar<=Wn;ar+=1){var mn=Or===ar;li.push(xt.createElement(Oe,{locale:At,rootPrefixCls:Ke,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:ar,page:ar,active:mn,showTitle:on,itemRender:Kn}))}Or-1>=wr*2&&Or!==3&&(li[0]=(0,xt.cloneElement)(li[0],{className:"".concat(Ke,"-item-after-jump-prev")}),li.unshift(Si)),tt-Or>=wr*2&&Or!==tt-2&&(li[li.length-1]=(0,xt.cloneElement)(li[li.length-1],{className:"".concat(Ke,"-item-before-jump-next")}),li.push(xi)),In!==1&&li.unshift(lr),Wn!==tt&&li.push(Ar)}var Cn=!this.hasPrev()||!tt,tn=!this.hasNext()||!tt,fn=this.renderPrev(cn),En=this.renderNext(un);return xt.createElement("ul",(0,it.Z)({className:xe()(Ke,dt,(0,fe.Z)({},"".concat(Ke,"-disabled"),kt)),style:Ve,ref:this.paginationNode},Dt),vn,fn?xt.createElement("li",{title:on?At.prev_page:null,onClick:this.prev,tabIndex:Cn?null:0,onKeyPress:this.runIfEnterPrev,className:xe()("".concat(Ke,"-prev"),(0,fe.Z)({},"".concat(Ke,"-disabled"),Cn)),"aria-disabled":Cn},fn):null,li,En?xt.createElement("li",{title:on?At.next_page:null,onClick:this.next,tabIndex:tn?null:0,onKeyPress:this.runIfEnterNext,className:xe()("".concat(Ke,"-next"),(0,fe.Z)({},"".concat(Ke,"-disabled"),tn)),"aria-disabled":tn},En):null,xt.createElement(ke,{disabled:kt,locale:At,rootPrefixCls:Ke,selectComponentClass:fr,selectPrefixCls:xr,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Or,pageSize:bi,pageSizeOptions:Hr,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Ii}))}}],[{key:"getDerivedStateFromProps",value:function(Le,Ke){var dt={};if("current"in Le&&(dt.current=Le.current,Le.current!==Ke.current&&(dt.currentInputValue=dt.current)),"pageSize"in Le&&Le.pageSize!==Ke.pageSize){var Ve=Ke.current,kt=ze(Le.pageSize,Ke,Le);Ve=Ve>kt?kt:Ve,"current"in Le||(dt.current=Ve,dt.currentInputValue=Ve),dt.pageSize=Le.pageSize}return dt}}]),He}(xt.Component);Ze.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 at=Ze,ht=$e(22075),pt=$e(36355),Mt=$e(19716),et=$e(8628),ot=$e(9763),wt=$e(57809);const Et=We=>xt.createElement(wt.default,Object.assign({},We,{showSearch:!0,size:"small"})),Tt=We=>xt.createElement(wt.default,Object.assign({},We,{showSearch:!0,size:"middle"}));Et.Option=wt.default.Option,Tt.Option=wt.default.Option;var vt=$e(9937),gt=$e(17313),yt=$e(83116),It=$e(37613);const Ot=We=>{const{componentCls:qe}=We;return{[`${qe}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${qe}-item-link`]:{color:We.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${qe}-item-link`]:{color:We.colorTextDisabled,cursor:"not-allowed"}}},[`&${qe}-disabled`]:{cursor:"not-allowed",[`${qe}-item`]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:We.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:We.colorBorder,backgroundColor:We.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:We.itemActiveBgDisabled},a:{color:We.itemActiveColorDisabled}}},[`${qe}-item-link`]:{color:We.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${qe}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${qe}-simple-pager`]:{color:We.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"}}}}}},Vt=We=>{const{componentCls:qe}=We;return{[`&${qe}-mini ${qe}-total-text, &${qe}-mini ${qe}-simple-pager`]:{height:We.itemSizeSM,lineHeight:`${We.itemSizeSM}px`},[`&${qe}-mini ${qe}-item`]:{minWidth:We.itemSizeSM,height:We.itemSizeSM,margin:0,lineHeight:`${We.itemSizeSM-2}px`},[`&${qe}-mini:not(${qe}-disabled) ${qe}-item:not(${qe}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:We.colorBgTextHover},"&:active":{backgroundColor:We.colorBgTextActive}},[`&${qe}-mini ${qe}-prev, &${qe}-mini ${qe}-next`]:{minWidth:We.itemSizeSM,height:We.itemSizeSM,margin:0,lineHeight:`${We.itemSizeSM}px`},[`&${qe}-mini:not(${qe}-disabled)`]:{[`${qe}-prev, ${qe}-next`]:{[`&:hover ${qe}-item-link`]:{backgroundColor:We.colorBgTextHover},[`&:active ${qe}-item-link`]:{backgroundColor:We.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:We.itemSizeSM,lineHeight:`${We.itemSizeSM}px`}},[`&${qe}-mini ${qe}-jump-prev, &${qe}-mini ${qe}-jump-next`]:{height:We.itemSizeSM,marginInlineEnd:0,lineHeight:`${We.itemSizeSM}px`},[`&${qe}-mini ${qe}-options`]:{marginInlineStart:We.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:We.miniOptionsSizeChangerTop},"&-quick-jumper":{height:We.itemSizeSM,lineHeight:`${We.itemSizeSM}px`,input:Object.assign(Object.assign({},(0,vt.x0)(We)),{width:We.paginationMiniQuickJumperInputWidth,height:We.controlHeightSM})}}}},Ct=We=>{const{componentCls:qe}=We;return{[`
|
|
|
&${qe}-simple ${qe}-prev,
|
|
|
&${qe}-simple ${qe}-next
|
|
|
`]:{height:We.itemSizeSM,lineHeight:`${We.itemSizeSM}px`,verticalAlign:"top",[`${qe}-item-link`]:{height:We.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:We.colorBgTextHover},"&:active":{backgroundColor:We.colorBgTextActive},"&::after":{height:We.itemSizeSM,lineHeight:`${We.itemSizeSM}px`}}},[`&${qe}-simple ${qe}-simple-pager`]:{display:"inline-block",height:We.itemSizeSM,marginInlineEnd:We.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:We.marginXS,padding:`0 ${We.paginationItemPaddingInline}px`,textAlign:"center",backgroundColor:We.itemInputBg,border:`${We.lineWidth}px ${We.lineType} ${We.colorBorder}`,borderRadius:We.borderRadius,outline:"none",transition:`border-color ${We.motionDurationMid}`,color:"inherit","&:hover":{borderColor:We.colorPrimary},"&:focus":{borderColor:We.colorPrimaryHover,boxShadow:`${We.inputOutlineOffset}px 0 ${We.controlOutlineWidth}px ${We.controlOutline}`},"&[disabled]":{color:We.colorTextDisabled,backgroundColor:We.colorBgContainerDisabled,borderColor:We.colorBorder,cursor:"not-allowed"}}}}},mt=We=>{const{componentCls:qe}=We;return{[`${qe}-jump-prev, ${qe}-jump-next`]:{outline:0,[`${qe}-item-container`]:{position:"relative",[`${qe}-item-link-icon`]:{color:We.colorPrimary,fontSize:We.fontSizeSM,opacity:0,transition:`all ${We.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:We.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:We.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:We.paginationEllipsisTextIndent,opacity:1,transition:`all ${We.motionDurationMid}`}},"&:hover":{[`${qe}-item-link-icon`]:{opacity:1},[`${qe}-item-ellipsis`]:{opacity:0}}},[`
|
|
|
${qe}-prev,
|
|
|
${qe}-jump-prev,
|
|
|
${qe}-jump-next
|
|
|
`]:{marginInlineEnd:We.marginXS},[`
|
|
|
${qe}-prev,
|
|
|
${qe}-next,
|
|
|
${qe}-jump-prev,
|
|
|
${qe}-jump-next
|
|
|
`]:{display:"inline-block",minWidth:We.itemSize,height:We.itemSize,color:We.colorText,fontFamily:We.fontFamily,lineHeight:`${We.itemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:We.borderRadius,cursor:"pointer",transition:`all ${We.motionDurationMid}`},[`${qe}-prev, ${qe}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:We.colorText,cursor:"pointer",userSelect:"none"},[`${qe}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:We.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${We.lineWidth}px ${We.lineType} transparent`,borderRadius:We.borderRadius,outline:"none",transition:`all ${We.motionDurationMid}`},[`&:hover ${qe}-item-link`]:{backgroundColor:We.colorBgTextHover},[`&:active ${qe}-item-link`]:{backgroundColor:We.colorBgTextActive},[`&${qe}-disabled:hover`]:{[`${qe}-item-link`]:{backgroundColor:"transparent"}}},[`${qe}-slash`]:{marginInlineEnd:We.paginationSlashMarginInlineEnd,marginInlineStart:We.paginationSlashMarginInlineStart},[`${qe}-options`]:{display:"inline-block",marginInlineStart:We.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:We.controlHeight,marginInlineStart:We.marginXS,lineHeight:`${We.controlHeight}px`,verticalAlign:"top",input:Object.assign(Object.assign({},(0,vt.ik)(We)),{width:We.controlHeightLG*1.25,height:We.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:We.marginXS,marginInlineEnd:We.marginXS})}}}},nt=We=>{const{componentCls:qe}=We;return{[`${qe}-item`]:{display:"inline-block",minWidth:We.itemSize,height:We.itemSize,marginInlineEnd:We.marginXS,fontFamily:We.fontFamily,lineHeight:`${We.itemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${We.lineWidth}px ${We.lineType} transparent`,borderRadius:We.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${We.paginationItemPaddingInline}px`,color:We.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${qe}-item-active)`]:{"&:hover":{transition:`all ${We.motionDurationMid}`,backgroundColor:We.colorBgTextHover},"&:active":{backgroundColor:We.colorBgTextActive}},"&-active":{fontWeight:We.fontWeightStrong,backgroundColor:We.itemActiveBg,borderColor:We.colorPrimary,a:{color:We.colorPrimary},"&:hover":{borderColor:We.colorPrimaryHover},"&:hover a":{color:We.colorPrimaryHover}}}}},ft=We=>{const{componentCls:qe}=We;return{[qe]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,gt.Wf)(We)),{"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:We.itemSize,marginInlineEnd:We.marginXS,lineHeight:`${We.itemSize-2}px`,verticalAlign:"middle"}}),nt(We)),mt(We)),Ct(We)),Vt(We)),Ot(We)),{[`@media only screen and (max-width: ${We.screenLG}px)`]:{[`${qe}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${We.screenSM}px)`]:{[`${qe}-options`]:{display:"none"}}}),[`&${We.componentCls}-rtl`]:{direction:"rtl"}}},Xe=We=>{const{componentCls:qe}=We;return{[`${qe}${qe}-disabled:not(${qe}-mini)`]:{"&, &:hover":{[`${qe}-item-link`]:{borderColor:We.colorBorder}},"&:focus-visible":{[`${qe}-item-link`]:{borderColor:We.colorBorder}},[`${qe}-item, ${qe}-item-link`]:{backgroundColor:We.colorBgContainerDisabled,borderColor:We.colorBorder,[`&:hover:not(${qe}-item-active)`]:{backgroundColor:We.colorBgContainerDisabled,borderColor:We.colorBorder,a:{color:We.colorTextDisabled}},[`&${qe}-item-active`]:{backgroundColor:We.itemActiveBgDisabled}},[`${qe}-prev, ${qe}-next`]:{"&:hover button":{backgroundColor:We.colorBgContainerDisabled,borderColor:We.colorBorder,color:We.colorTextDisabled},[`${qe}-item-link`]:{backgroundColor:We.colorBgContainerDisabled,borderColor:We.colorBorder}}},[`${qe}:not(${qe}-mini)`]:{[`${qe}-prev, ${qe}-next`]:{"&:hover button":{borderColor:We.colorPrimaryHover,backgroundColor:We.itemBg},[`${qe}-item-link`]:{backgroundColor:We.itemLinkBg,borderColor:We.colorBorder},[`&:hover ${qe}-item-link`]:{borderColor:We.colorPrimary,backgroundColor:We.itemBg,color:We.colorPrimary},[`&${qe}-disabled`]:{[`${qe}-item-link`]:{borderColor:We.colorBorder,color:We.colorTextDisabled}}},[`${qe}-item`]:{backgroundColor:We.itemBg,border:`${We.lineWidth}px ${We.lineType} ${We.colorBorder}`,[`&:hover:not(${qe}-item-active)`]:{borderColor:We.colorPrimary,backgroundColor:We.itemBg,a:{color:We.colorPrimary}},"&-active":{borderColor:We.colorPrimary}}}}},ut=We=>{const{componentCls:qe}=We;return{[`${qe}:not(${qe}-disabled)`]:{[`${qe}-item`]:Object.assign({},(0,gt.Qy)(We)),[`${qe}-jump-prev, ${qe}-jump-next`]:{"&:focus-visible":Object.assign({[`${qe}-item-link-icon`]:{opacity:1},[`${qe}-item-ellipsis`]:{opacity:0}},(0,gt.oN)(We))},[`${qe}-prev, ${qe}-next`]:{[`&:focus-visible ${qe}-item-link`]:Object.assign({},(0,gt.oN)(We))}}}};var bt=(0,yt.Z)("Pagination",We=>{const qe=(0,It.TS)(We,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:We.marginXXS/2,paginationMiniQuickJumperInputWidth:We.controlHeightLG*1.1,paginationItemPaddingInline:We.marginXXS*1.5,paginationEllipsisLetterSpacing:We.marginXXS/2,paginationSlashMarginInlineStart:We.marginXXS,paginationSlashMarginInlineEnd:We.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,vt.e5)(We),(0,vt.TM)(We));return[ft(qe),ut(qe),We.wireframe&&Xe(qe)]},We=>({itemBg:We.colorBgContainer,itemSize:We.controlHeight,itemSizeSM:We.controlHeightSM,itemActiveBg:We.colorBgContainer,itemLinkBg:We.colorBgContainer,itemActiveColorDisabled:We.colorTextDisabled,itemActiveBgDisabled:We.controlItemBgActiveDisabled,itemInputBg:We.colorBgContainer,miniOptionsSizeChangerTop:0})),St=function(We,qe){var He={};for(var De in We)Object.prototype.hasOwnProperty.call(We,De)&&qe.indexOf(De)<0&&(He[De]=We[De]);if(We!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Le=0,De=Object.getOwnPropertySymbols(We);Le<De.length;Le++)qe.indexOf(De[Le])<0&&Object.prototype.propertyIsEnumerable.call(We,De[Le])&&(He[De[Le]]=We[De[Le]]);return He},Qe=We=>{const{prefixCls:qe,selectPrefixCls:He,className:De,rootClassName:Le,style:Ke,size:dt,locale:Ve,selectComponentClass:kt,responsive:zt,showSizeChanger:Xt}=We,At=St(We,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:Nt}=(0,et.Z)(zt),{getPrefixCls:qt,direction:on,pagination:gn={}}=xt.useContext(pt.E_),kn=qt("pagination",qe),[Kn,Xn]=bt(kn),hr=Xt!=null?Xt:gn.showSizeChanger,dr=xt.useMemo(()=>{const tt=xt.createElement("span",{className:`${kn}-item-ellipsis`},"\u2022\u2022\u2022"),li=xt.createElement("button",{className:`${kn}-item-link`,type:"button",tabIndex:-1},on==="rtl"?xt.createElement(we.Z,null):xt.createElement(ye.Z,null)),Si=xt.createElement("button",{className:`${kn}-item-link`,type:"button",tabIndex:-1},on==="rtl"?xt.createElement(ye.Z,null):xt.createElement(we.Z,null)),xi=xt.createElement("a",{className:`${kn}-item-link`},xt.createElement("div",{className:`${kn}-item-container`},on==="rtl"?xt.createElement(Ce.Z,{className:`${kn}-item-link-icon`}):xt.createElement(be,{className:`${kn}-item-link-icon`}),tt)),lr=xt.createElement("a",{className:`${kn}-item-link`},xt.createElement("div",{className:`${kn}-item-container`},on==="rtl"?xt.createElement(be,{className:`${kn}-item-link-icon`}):xt.createElement(Ce.Z,{className:`${kn}-item-link-icon`}),tt));return{prevIcon:li,nextIcon:Si,jumpPrevIcon:xi,jumpNextIcon:lr}},[on,kn]),[fr]=(0,ot.Z)("Pagination",ht.Z),xr=Object.assign(Object.assign({},fr),Ve),Hr=(0,Mt.Z)(dt),Yr=Hr==="small"||!!(Nt&&!Hr&&zt),Or=qt("select",He),bi=xe()({[`${kn}-mini`]:Yr,[`${kn}-rtl`]:on==="rtl"},gn==null?void 0:gn.className,De,Le,Xn),Jr=Object.assign(Object.assign({},gn==null?void 0:gn.style),Ke);return Kn(xt.createElement(at,Object.assign({},dr,At,{style:Jr,prefixCls:kn,selectPrefixCls:Or,className:bi,selectComponentClass:kt||(Yr?Et:Tt),locale:xr,showSizeChanger:hr})))},Ue=Qe},14478:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return Oe}});var it=$e(96512),xt=$e(92310),ie=$e.n(xt),_e=$e(10228),je=$e(18929),ve=$e(2738),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:Re,iconCls:Ye,antCls:ze,zIndexPopup:Ze,colorText:at,colorWarning:ht,marginXXS:pt,marginXS:Mt,fontSize:et,fontWeightStrong:ot,colorTextHeading:wt}=Fe;return{[Re]:{zIndex:Ze,[`&${ze}-popover`]:{fontSize:et},[`${Re}-message`]:{marginBottom:Mt,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${Re}-message-icon ${Ye}`]:{color:ht,fontSize:et,lineHeight:1,marginInlineEnd:Mt},[`${Re}-title`]:{fontWeight:ot,color:wt,"&:only-child":{fontWeight:"normal"}},[`${Re}-description`]:{marginTop:pt,color:at}},[`${Re}-buttons`]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:Mt}}}}};var ue=(0,re.Z)("Popconfirm",Fe=>le(Fe),Fe=>{const{zIndexPopupBase:Re}=Fe;return{zIndexPopup:Re+60}},{resetStyle:!1}),pe=function(Fe,Re){var Ye={};for(var ze in Fe)Object.prototype.hasOwnProperty.call(Fe,ze)&&Re.indexOf(ze)<0&&(Ye[ze]=Fe[ze]);if(Fe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,ze=Object.getOwnPropertySymbols(Fe);Ze<ze.length;Ze++)Re.indexOf(ze[Ze])<0&&Object.prototype.propertyIsEnumerable.call(Fe,ze[Ze])&&(Ye[ze[Ze]]=Fe[ze[Ze]]);return Ye};const Ee=Fe=>{const{prefixCls:Re,okButtonProps:Ye,cancelButtonProps:ze,title:Ze,description:at,cancelText:ht,okText:pt,okType:Mt="primary",icon:et=ce.createElement(it.Z,null),showCancel:ot=!0,close:wt,onConfirm:Et,onCancel:Tt,onPopupClick:vt}=Fe,{getPrefixCls:gt}=ce.useContext(Ce.E_),[yt]=(0,z.Z)("Popconfirm",ee.Z.Popconfirm),It=(0,me.Z)(Ze),Ot=(0,me.Z)(at);return ce.createElement("div",{className:`${Re}-inner-content`,onClick:vt},ce.createElement("div",{className:`${Re}-message`},et&&ce.createElement("span",{className:`${Re}-message-icon`},et),ce.createElement("div",{className:`${Re}-message-text`},It&&ce.createElement("div",{className:ie()(`${Re}-title`)},It),Ot&&ce.createElement("div",{className:`${Re}-description`},Ot))),ce.createElement("div",{className:`${Re}-buttons`},ot&&ce.createElement(xe.ZP,Object.assign({onClick:Tt,size:"small"},ze),ht!=null?ht:yt==null?void 0:yt.cancelText),ce.createElement(we.Z,{buttonProps:Object.assign(Object.assign({size:"small"},(0,fe.n)(Mt)),Ye),actionFn:Et,close:wt,prefixCls:gt("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},pt!=null?pt:yt==null?void 0:yt.okText)))};var Ie=Fe=>{const{prefixCls:Re,placement:Ye,className:ze,style:Ze}=Fe,at=pe(Fe,["prefixCls","placement","className","style"]),{getPrefixCls:ht}=ce.useContext(Ce.E_),pt=ht("popconfirm",Re),[Mt]=ue(pt);return Mt(ce.createElement(ae.ZP,{placement:Ye,className:ie()(pt,ze),style:Ze,content:ce.createElement(Ee,Object.assign({prefixCls:pt},at))}))},ke=function(Fe,Re){var Ye={};for(var ze in Fe)Object.prototype.hasOwnProperty.call(Fe,ze)&&Re.indexOf(ze)<0&&(Ye[ze]=Fe[ze]);if(Fe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,ze=Object.getOwnPropertySymbols(Fe);Ze<ze.length;Ze++)Re.indexOf(ze[Ze])<0&&Object.prototype.propertyIsEnumerable.call(Fe,ze[Ze])&&(Ye[ze[Ze]]=Fe[ze[Ze]]);return Ye};const Ne=ce.forwardRef((Fe,Re)=>{const{prefixCls:Ye,placement:ze="top",trigger:Ze="click",okType:at="primary",icon:ht=ce.createElement(it.Z,null),children:pt,overlayClassName:Mt,onOpenChange:et,onVisibleChange:ot}=Fe,wt=ke(Fe,["prefixCls","placement","trigger","okType","icon","children","overlayClassName","onOpenChange","onVisibleChange"]),{getPrefixCls:Et}=ce.useContext(Ce.E_),[Tt,vt]=(0,je.Z)(!1,{value:Fe.open,defaultValue:Fe.defaultOpen}),gt=(Xe,ut)=>{vt(Xe,!0),ot==null||ot(Xe),et==null||et(Xe,ut)},yt=Xe=>{gt(!1,Xe)},It=Xe=>{var ut;return(ut=Fe.onConfirm)===null||ut===void 0?void 0:ut.call(void 0,Xe)},Ot=Xe=>{var ut;gt(!1,Xe),(ut=Fe.onCancel)===null||ut===void 0||ut.call(void 0,Xe)},Vt=Xe=>{Xe.keyCode===_e.Z.ESC&&Tt&>(!1,Xe)},Ct=Xe=>{const{disabled:ut=!1}=Fe;ut||gt(Xe)},mt=Et("popconfirm",Ye),nt=ie()(mt,Mt),[ft]=ue(mt);return ft(ce.createElement(ye.Z,Object.assign({},(0,ve.Z)(wt,["title"]),{trigger:Ze,placement:ze,onOpenChange:Ct,open:Tt,ref:Re,overlayClassName:nt,content:ce.createElement(Ee,Object.assign({okType:at,icon:ht},Fe,{prefixCls:mt,close:yt,onConfirm:It,onCancel:Ot})),"data-popover-inject":!0}),(0,be.Tm)(pt,{onKeyDown:Xe=>{var ut,bt;ce.isValidElement(pt)&&((bt=pt==null?void 0:(ut=pt.props).onKeyDown)===null||bt===void 0||bt.call(ut,Xe)),Vt(Xe)}})))});Ne._InternalPanelDoNotUseOrYouWillBeFired=Ie;var Oe=Ne},39722:function(Pn,an,$e){"use strict";$e.d(an,{t5:function(){return ye}});var it=$e(92310),xt=$e.n(it),ie=$e(55477),_e=$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 _e.createElement(_e.Fragment,null,xe&&_e.createElement("div",{className:`${me}-title`},(0,ve.Z)(xe)),_e.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 _e.createElement("div",{className:xt()(xe,fe,`${fe}-pure`,`${fe}-placement-${ae}`,z),style:ee},_e.createElement("div",{className:`${fe}-arrow`}),_e.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}=_e.useContext(je.E_),ee=z("popover",xe),[ae,re]=(0,ce.Z)(ee);return ae(_e.createElement(ye,Object.assign({},fe,{prefixCls:ee,hashId:re})))};an.ZP=we},60324:function(Pn,an,$e){"use strict";var it=$e(92310),xt=$e.n(it),ie=$e(59301),_e=$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,_e.Z)(fe)),ie.createElement("div",{className:`${ee}-inner-content`},(0,_e.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_),Ne=ke("popover",z),[Oe,Fe]=(0,Ce.Z)(Ne),Re=ke(),Ye=xt()(re,Fe);return Oe(ie.createElement(ce.Z,Object.assign({placement:le,trigger:ue,mouseEnterDelay:pe,mouseLeaveDelay:Ee,overlayStyle:Pe},Ie,{prefixCls:Ne,overlayClassName:Ye,ref:fe,overlay:ee||ae?ie.createElement(we,{prefixCls:Ne,title:ee,content:ae}):null,transitionName:(0,je.m)(Re,"zoom-big",Ie.transitionName),"data-popover-inject":!0})))});me._InternalPanelDoNotUseOrYouWillBeFired=be.ZP,an.Z=me},17356:function(Pn,an,$e){"use strict";var it=$e(17313),xt=$e(29878),ie=$e(19447),_e=$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,it.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]:_e.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`}}}};an.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,xt._y)(fe,"zoom-big")]},ye=>({width:177,minWidth:177,zIndexPopup:ye.zIndexPopupBase+30}),{resetStyle:!1,deprecatedTokens:[["width","minWidth"]]})},93948:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return Xt}});var it=$e(59301),xt=$e(29679),ie=$e(40001),_e=$e(19248),je=$e(99267),ve=$e(92310),ce=$e.n(ve),be=$e(2738),Ce=$e(36355),ye=$e(72308),we=$e(77321),me=$e(74416),xe={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},fe=function(){var Nt=(0,it.useRef)([]),qt=(0,it.useRef)(null);return(0,it.useEffect)(function(){var on=Date.now(),gn=!1;Nt.current.forEach(function(kn){if(kn){gn=!0;var Kn=kn.style;Kn.transitionDuration=".3s, .3s, .3s, .06s",qt.current&&on-qt.current<100&&(Kn.transitionDuration="0s, 0s")}}),gn&&(qt.current=Date.now())}),Nt.current},z=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],ee=function(Nt){var qt=(0,we.Z)((0,we.Z)({},xe),Nt),on=qt.className,gn=qt.percent,kn=qt.prefixCls,Kn=qt.strokeColor,Xn=qt.strokeLinecap,hr=qt.strokeWidth,dr=qt.style,fr=qt.trailColor,xr=qt.trailWidth,Hr=qt.transition,Yr=(0,me.Z)(qt,z);delete Yr.gapPosition;var Or=Array.isArray(gn)?gn:[gn],bi=Array.isArray(Kn)?Kn:[Kn],Jr=fe(),tt=hr/2,li=100-hr/2,Si="M ".concat(Xn==="round"?tt:0,",").concat(tt,`
|
|
|
L `).concat(Xn==="round"?li:100,",").concat(tt),xi="0 0 100 ".concat(hr),lr=0;return it.createElement("svg",(0,ye.Z)({className:ce()("".concat(kn,"-line"),on),viewBox:xi,preserveAspectRatio:"none",style:dr},Yr),it.createElement("path",{className:"".concat(kn,"-line-trail"),d:Si,strokeLinecap:Xn,stroke:fr,strokeWidth:xr||hr,fillOpacity:"0"}),Or.map(function(Ar,Fr){var Ii=1;switch(Xn){case"round":Ii=1-hr/100;break;case"square":Ii=1-hr/2/100;break;default:Ii=1;break}var wr={strokeDasharray:"".concat(Ar*Ii,"px, 100px"),strokeDashoffset:"-".concat(lr,"px"),transition:Hr||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},cn=bi[Fr]||bi[bi.length-1];return lr+=Ar,it.createElement("path",{key:Fr,className:"".concat(kn,"-line-path"),d:Si,strokeLinecap:Xn,stroke:cn,strokeWidth:hr,fillOpacity:"0",ref:function(Dt){Jr[Fr]=Dt},style:wr})}))},ae=ee,re=$e(62853),le=$e(52487),ue=$e(47273),pe=0,Ee=(0,ue.Z)();function Pe(){var At;return Ee?(At=pe,pe+=1):At="TEST_OR_SSR",At}var Ie=function(At){var Nt=it.useState(),qt=(0,le.Z)(Nt,2),on=qt[0],gn=qt[1];return it.useEffect(function(){gn("rc_progress_".concat(Pe()))},[]),At||on},ke=function(Nt){var qt=Nt.bg,on=Nt.children;return it.createElement("div",{style:{width:"100%",height:"100%",background:qt}},on)};function Ne(At,Nt){return Object.keys(At).map(function(qt){var on=parseFloat(qt),gn="".concat(Math.floor(on*Nt),"%");return"".concat(At[qt]," ").concat(gn)})}var Oe=it.forwardRef(function(At,Nt){var qt=At.prefixCls,on=At.color,gn=At.gradientId,kn=At.radius,Kn=At.style,Xn=At.ptg,hr=At.strokeLinecap,dr=At.strokeWidth,fr=At.size,xr=At.gapDegree,Hr=on&&(0,re.Z)(on)==="object",Yr=Hr?"#FFF":void 0,Or=fr/2,bi=it.createElement("circle",{className:"".concat(qt,"-circle-path"),r:kn,cx:Or,cy:Or,stroke:Yr,strokeLinecap:hr,strokeWidth:dr,opacity:Xn===0?0:1,style:Kn,ref:Nt});if(!Hr)return bi;var Jr="".concat(gn,"-conic"),tt=xr?"".concat(180+xr/2,"deg"):"0deg",li=Ne(on,(360-xr)/360),Si=Ne(on,1),xi="conic-gradient(from ".concat(tt,", ").concat(li.join(", "),")"),lr="linear-gradient(to ".concat(xr?"bottom":"top",", ").concat(Si.join(", "),")");return it.createElement(it.Fragment,null,it.createElement("mask",{id:Jr},bi),it.createElement("foreignObject",{x:0,y:0,width:fr,height:fr,mask:"url(#".concat(Jr,")")},it.createElement(ke,{bg:lr},it.createElement(ke,{bg:xi}))))}),Fe=Oe,Re=100,Ye=function(Nt,qt,on,gn,kn,Kn,Xn,hr,dr,fr){var xr=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,Hr=on/100*360*((360-Kn)/360),Yr=Kn===0?0:{bottom:0,top:180,left:90,right:-90}[Xn],Or=(100-gn)/100*qt;dr==="round"&&gn!==100&&(Or+=fr/2,Or>=qt&&(Or=qt-.01));var bi=Re/2;return{stroke:typeof hr=="string"?hr:void 0,strokeDasharray:"".concat(qt,"px ").concat(Nt),strokeDashoffset:Or+xr,transform:"rotate(".concat(kn+Hr+Yr,"deg)"),transformOrigin:"".concat(bi,"px ").concat(bi,"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 Ze(At){var Nt=At!=null?At:[];return Array.isArray(Nt)?Nt:[Nt]}var at=function(Nt){var qt=(0,we.Z)((0,we.Z)({},xe),Nt),on=qt.id,gn=qt.prefixCls,kn=qt.steps,Kn=qt.strokeWidth,Xn=qt.trailWidth,hr=qt.gapDegree,dr=hr===void 0?0:hr,fr=qt.gapPosition,xr=qt.trailColor,Hr=qt.strokeLinecap,Yr=qt.style,Or=qt.className,bi=qt.strokeColor,Jr=qt.percent,tt=(0,me.Z)(qt,ze),li=Re/2,Si=Ie(on),xi="".concat(Si,"-gradient"),lr=li-Kn/2,Ar=Math.PI*2*lr,Fr=dr>0?90+dr/2:-90,Ii=Ar*((360-dr)/360),wr=(0,re.Z)(kn)==="object"?kn:{count:kn,space:2},cn=wr.count,un=wr.space,Dt=Ze(Jr),vn=Ze(bi),On=vn.find(function(Wt){return Wt&&(0,re.Z)(Wt)==="object"}),Jt=On&&(0,re.Z)(On)==="object",Ut=Jt?"butt":Hr,wn=Ye(Ar,Ii,0,100,Fr,dr,fr,xr,Ut,Kn),_n=fe(),Qn=function(){var In=0;return Dt.map(function(Wn,ar){var mn=vn[ar]||vn[vn.length-1],Cn=Ye(Ar,Ii,In,Wn,Fr,dr,fr,mn,Ut,Kn);return In+=Wn,it.createElement(Fe,{key:ar,color:mn,ptg:Wn,radius:lr,prefixCls:gn,gradientId:xi,style:Cn,strokeLinecap:Ut,strokeWidth:Kn,gapDegree:dr,ref:function(fn){_n[ar]=fn},size:Re})}).reverse()},Jn=function(){var In=Math.round(cn*(Dt[0]/100)),Wn=100/cn,ar=0;return new Array(cn).fill(null).map(function(mn,Cn){var tn=Cn<=In-1?vn[0]:xr,fn=tn&&(0,re.Z)(tn)==="object"?"url(#".concat(xi,")"):void 0,En=Ye(Ar,Ii,ar,Wn,Fr,dr,fr,tn,"butt",Kn,un);return ar+=(Ii-En.strokeDashoffset+un)*100/Ii,it.createElement("circle",{key:Cn,className:"".concat(gn,"-circle-path"),r:lr,cx:li,cy:li,stroke:fn,strokeWidth:Kn,opacity:1,style:En,ref:function(Ln){_n[Cn]=Ln}})})};return it.createElement("svg",(0,ye.Z)({className:ce()("".concat(gn,"-circle"),Or),viewBox:"0 0 ".concat(Re," ").concat(Re),style:Yr,id:on,role:"presentation"},tt),!cn&&it.createElement("circle",{className:"".concat(gn,"-circle-trail"),r:lr,cx:li,cy:li,stroke:xr,strokeLinecap:Ut,strokeWidth:Xn||Kn,style:wn}),cn?Jn():Qn())},ht=at,pt={Line:ae,Circle:ht},Mt=$e(6848),et=$e(93398);function ot(At){return!At||At<0?0:At>100?100:At}function wt(At){let{success:Nt,successPercent:qt}=At,on=qt;return Nt&&"progress"in Nt&&(on=Nt.progress),Nt&&"percent"in Nt&&(on=Nt.percent),on}const Et=At=>{let{percent:Nt,success:qt,successPercent:on}=At;const gn=ot(wt({success:qt,successPercent:on}));return[gn,ot(ot(Nt)-gn)]},Tt=At=>{let{success:Nt={},strokeColor:qt}=At;const{strokeColor:on}=Nt;return[on||et.presetPrimaryColors.green,qt||null]},vt=(At,Nt,qt)=>{var on,gn,kn,Kn;let Xn=-1,hr=-1;if(Nt==="step"){const dr=qt.steps,fr=qt.strokeWidth;typeof At=="string"||typeof At=="undefined"?(Xn=At==="small"?2:14,hr=fr!=null?fr:8):typeof At=="number"?[Xn,hr]=[At,At]:[Xn=14,hr=8]=At,Xn*=dr}else if(Nt==="line"){const dr=qt==null?void 0:qt.strokeWidth;typeof At=="string"||typeof At=="undefined"?hr=dr||(At==="small"?6:8):typeof At=="number"?[Xn,hr]=[At,At]:[Xn=-1,hr=8]=At}else(Nt==="circle"||Nt==="dashboard")&&(typeof At=="string"||typeof At=="undefined"?[Xn,hr]=At==="small"?[60,60]:[120,120]:typeof At=="number"?[Xn,hr]=[At,At]:(Xn=(gn=(on=At[0])!==null&&on!==void 0?on:At[1])!==null&&gn!==void 0?gn:120,hr=(Kn=(kn=At[0])!==null&&kn!==void 0?kn:At[1])!==null&&Kn!==void 0?Kn:120));return[Xn,hr]},gt=3,yt=At=>gt/At*100;var Ot=At=>{const{prefixCls:Nt,trailColor:qt=null,strokeLinecap:on="round",gapPosition:gn,gapDegree:kn,width:Kn=120,type:Xn,children:hr,success:dr,size:fr=Kn}=At,[xr,Hr]=vt(fr,"circle");let{strokeWidth:Yr}=At;Yr===void 0&&(Yr=Math.max(yt(xr),6));const Or={width:xr,height:Hr,fontSize:xr*.15+6},bi=it.useMemo(()=>{if(kn||kn===0)return kn;if(Xn==="dashboard")return 75},[kn,Xn]),Jr=gn||Xn==="dashboard"&&"bottom"||void 0,tt=Object.prototype.toString.call(At.strokeColor)==="[object Object]",li=Tt({success:dr,strokeColor:At.strokeColor}),Si=ce()(`${Nt}-inner`,{[`${Nt}-circle-gradient`]:tt}),xi=it.createElement(ht,{percent:Et(At),strokeWidth:Yr,trailWidth:Yr,strokeColor:li,strokeLinecap:on,trailColor:qt,prefixCls:Nt,gapDegree:bi,gapPosition:Jr});return it.createElement("div",{className:Si,style:Or},xr<=20?it.createElement(Mt.Z,{title:hr},it.createElement("span",null,xi)):it.createElement(it.Fragment,null,xi,hr))},Vt=function(At,Nt){var qt={};for(var on in At)Object.prototype.hasOwnProperty.call(At,on)&&Nt.indexOf(on)<0&&(qt[on]=At[on]);if(At!=null&&typeof Object.getOwnPropertySymbols=="function")for(var gn=0,on=Object.getOwnPropertySymbols(At);gn<on.length;gn++)Nt.indexOf(on[gn])<0&&Object.prototype.propertyIsEnumerable.call(At,on[gn])&&(qt[on[gn]]=At[on[gn]]);return qt};const Ct=At=>{let Nt=[];return Object.keys(At).forEach(qt=>{const on=parseFloat(qt.replace(/%/g,""));isNaN(on)||Nt.push({key:on,value:At[qt]})}),Nt=Nt.sort((qt,on)=>qt.key-on.key),Nt.map(qt=>{let{key:on,value:gn}=qt;return`${gn} ${on}%`}).join(", ")},mt=(At,Nt)=>{const{from:qt=et.presetPrimaryColors.blue,to:on=et.presetPrimaryColors.blue,direction:gn=Nt==="rtl"?"to left":"to right"}=At,kn=Vt(At,["from","to","direction"]);if(Object.keys(kn).length!==0){const Kn=Ct(kn);return{backgroundImage:`linear-gradient(${gn}, ${Kn})`}}return{backgroundImage:`linear-gradient(${gn}, ${qt}, ${on})`}};var ft=At=>{const{prefixCls:Nt,direction:qt,percent:on,size:gn,strokeWidth:kn,strokeColor:Kn,strokeLinecap:Xn="round",children:hr,trailColor:dr=null,success:fr}=At,xr=Kn&&typeof Kn!="string"?mt(Kn,qt):{backgroundColor:Kn},Hr=Xn==="square"||Xn==="butt"?0:void 0,Yr={backgroundColor:dr||void 0,borderRadius:Hr},Or=gn!=null?gn:[-1,kn||(gn==="small"?6:8)],[bi,Jr]=vt(Or,"line",{strokeWidth:kn}),tt=Object.assign({width:`${ot(on)}%`,height:Jr,borderRadius:Hr},xr),li=wt(At),Si={width:`${ot(li)}%`,height:Jr,borderRadius:Hr,backgroundColor:fr==null?void 0:fr.strokeColor},xi={width:bi<0?"100%":bi,height:Jr};return it.createElement(it.Fragment,null,it.createElement("div",{className:`${Nt}-outer`,style:xi},it.createElement("div",{className:`${Nt}-inner`,style:Yr},it.createElement("div",{className:`${Nt}-bg`,style:tt}),li!==void 0?it.createElement("div",{className:`${Nt}-success-bg`,style:Si}):null)),hr)},ut=At=>{const{size:Nt,steps:qt,percent:on=0,strokeWidth:gn=8,strokeColor:kn,trailColor:Kn=null,prefixCls:Xn,children:hr}=At,dr=Math.round(qt*(on/100)),fr=Nt==="small"?2:14,xr=Nt!=null?Nt:[fr,gn],[Hr,Yr]=vt(xr,"step",{steps:qt,strokeWidth:gn}),Or=Hr/qt,bi=new Array(qt);for(let Jr=0;Jr<qt;Jr++){const tt=Array.isArray(kn)?kn[Jr]:kn;bi[Jr]=it.createElement("div",{key:Jr,className:ce()(`${Xn}-steps-item`,{[`${Xn}-steps-item-active`]:Jr<=dr-1}),style:{backgroundColor:Jr<=dr-1?tt:Kn,width:Or,height:Yr}})}return it.createElement("div",{className:`${Xn}-steps-outer`},bi,hr)},bt=$e(93083),St=$e(17313),lt=$e(83116),Qe=$e(37613);const Ue=At=>{const Nt=At?"100%":"-100%";return new bt.Keyframes(`antProgress${At?"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}})},We=At=>{const{componentCls:Nt,iconCls:qt}=At;return{[Nt]:Object.assign(Object.assign({},(0,St.Wf)(At)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:At.fontSize,marginInlineEnd:At.marginXS,marginBottom:At.marginXS},[`${Nt}-outer`]:{display:"inline-block",width:"100%"},[`&${Nt}-show-info`]:{[`${Nt}-outer`]:{marginInlineEnd:`calc(-2em - ${At.marginXS}px)`,paddingInlineEnd:`calc(2em + ${At.paddingXS}px)`}},[`${Nt}-inner`]:{position:"relative",display:"inline-block",width:"100%",overflow:"hidden",verticalAlign:"middle",backgroundColor:At.remainingColor,borderRadius:At.lineBorderRadius},[`${Nt}-inner:not(${Nt}-circle-gradient)`]:{[`${Nt}-circle-path`]:{stroke:At.defaultColor}},[`${Nt}-success-bg, ${Nt}-bg`]:{position:"relative",backgroundColor:At.defaultColor,borderRadius:At.lineBorderRadius,transition:`all ${At.motionDurationSlow} ${At.motionEaseInOutCirc}`},[`${Nt}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:At.colorSuccess},[`${Nt}-text`]:{display:"inline-block",width:"2em",marginInlineStart:At.marginXS,color:At.colorText,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[qt]:{fontSize:At.fontSize}},[`&${Nt}-status-active`]:{[`${Nt}-bg::before`]:{position:"absolute",inset:0,backgroundColor:At.colorBgContainer,borderRadius:At.lineBorderRadius,opacity:0,animationName:Ue(),animationDuration:At.progressActiveMotionDuration,animationTimingFunction:At.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${Nt}-rtl${Nt}-status-active`]:{[`${Nt}-bg::before`]:{animationName:Ue(!0)}},[`&${Nt}-status-exception`]:{[`${Nt}-bg`]:{backgroundColor:At.colorError},[`${Nt}-text`]:{color:At.colorError}},[`&${Nt}-status-exception ${Nt}-inner:not(${Nt}-circle-gradient)`]:{[`${Nt}-circle-path`]:{stroke:At.colorError}},[`&${Nt}-status-success`]:{[`${Nt}-bg`]:{backgroundColor:At.colorSuccess},[`${Nt}-text`]:{color:At.colorSuccess}},[`&${Nt}-status-success ${Nt}-inner:not(${Nt}-circle-gradient)`]:{[`${Nt}-circle-path`]:{stroke:At.colorSuccess}}})}},qe=At=>{const{componentCls:Nt,iconCls:qt}=At;return{[Nt]:{[`${Nt}-circle-trail`]:{stroke:At.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:At.circleTextColor,fontSize:At.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[qt]:{fontSize:`${At.fontSize/At.fontSizeSM}em`}},[`${Nt}-circle&-status-exception`]:{[`${Nt}-text`]:{color:At.colorError}},[`${Nt}-circle&-status-success`]:{[`${Nt}-text`]:{color:At.colorSuccess}}},[`${Nt}-inline-circle`]:{lineHeight:1,[`${Nt}-inner`]:{verticalAlign:"bottom"}}}},He=At=>{const{componentCls:Nt}=At;return{[Nt]:{[`${Nt}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:At.progressStepMinWidth,marginInlineEnd:At.progressStepMarginInlineEnd,backgroundColor:At.remainingColor,transition:`all ${At.motionDurationSlow}`,"&-active":{backgroundColor:At.defaultColor}}}}}},De=At=>{const{componentCls:Nt,iconCls:qt}=At;return{[Nt]:{[`${Nt}-small&-line, ${Nt}-small&-line ${Nt}-text ${qt}`]:{fontSize:At.fontSizeSM}}}};var Le=(0,lt.Z)("Progress",At=>{const Nt=At.marginXXS/2,qt=(0,Qe.TS)(At,{progressStepMarginInlineEnd:Nt,progressStepMinWidth:Nt,progressActiveMotionDuration:"2.4s"});return[We(qt),qe(qt),He(qt),De(qt)]},At=>({circleTextColor:At.colorText,defaultColor:At.colorInfo,remainingColor:At.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em"})),Ke=function(At,Nt){var qt={};for(var on in At)Object.prototype.hasOwnProperty.call(At,on)&&Nt.indexOf(on)<0&&(qt[on]=At[on]);if(At!=null&&typeof Object.getOwnPropertySymbols=="function")for(var gn=0,on=Object.getOwnPropertySymbols(At);gn<on.length;gn++)Nt.indexOf(on[gn])<0&&Object.prototype.propertyIsEnumerable.call(At,on[gn])&&(qt[on[gn]]=At[on[gn]]);return qt};const dt=null,Ve=["normal","exception","active","success"];var zt=it.forwardRef((At,Nt)=>{const{prefixCls:qt,className:on,rootClassName:gn,steps:kn,strokeColor:Kn,percent:Xn=0,size:hr="default",showInfo:dr=!0,type:fr="line",status:xr,format:Hr,style:Yr}=At,Or=Ke(At,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style"]),bi=it.useMemo(()=>{var Dt,vn;const On=wt(At);return parseInt(On!==void 0?(Dt=On!=null?On:0)===null||Dt===void 0?void 0:Dt.toString():(vn=Xn!=null?Xn:0)===null||vn===void 0?void 0:vn.toString(),10)},[Xn,At.success,At.successPercent]),Jr=it.useMemo(()=>!Ve.includes(xr)&&bi>=100?"success":xr||"normal",[xr,bi]),{getPrefixCls:tt,direction:li,progress:Si}=it.useContext(Ce.E_),xi=tt("progress",qt),[lr,Ar]=Le(xi),Fr=it.useMemo(()=>{if(!dr)return null;const Dt=wt(At);let vn;const On=Hr||(Ut=>`${Ut}%`),Jt=fr==="line";return Hr||Jr!=="exception"&&Jr!=="success"?vn=On(ot(Xn),ot(Dt)):Jr==="exception"?vn=Jt?it.createElement(_e.Z,null):it.createElement(je.Z,null):Jr==="success"&&(vn=Jt?it.createElement(xt.Z,null):it.createElement(ie.Z,null)),it.createElement("span",{className:`${xi}-text`,title:typeof vn=="string"?vn:void 0},vn)},[dr,Xn,bi,Jr,fr,xi,Hr]),Ii=Array.isArray(Kn)?Kn[0]:Kn,wr=typeof Kn=="string"||Array.isArray(Kn)?Kn:void 0;let cn;fr==="line"?cn=kn?it.createElement(ut,Object.assign({},At,{strokeColor:wr,prefixCls:xi,steps:kn}),Fr):it.createElement(ft,Object.assign({},At,{strokeColor:Ii,prefixCls:xi,direction:li}),Fr):(fr==="circle"||fr==="dashboard")&&(cn=it.createElement(Ot,Object.assign({},At,{strokeColor:Ii,prefixCls:xi,progressStatus:Jr}),Fr));const un=ce()(xi,`${xi}-status-${Jr}`,`${xi}-${fr==="dashboard"&&"circle"||kn&&"steps"||fr}`,{[`${xi}-inline-circle`]:fr==="circle"&&vt(hr,"circle")[0]<=20,[`${xi}-show-info`]:dr,[`${xi}-${hr}`]:typeof hr=="string",[`${xi}-rtl`]:li==="rtl"},Si==null?void 0:Si.className,on,gn,Ar);return lr(it.createElement("div",Object.assign({ref:Nt,style:Object.assign(Object.assign({},Si==null?void 0:Si.style),Yr),className:un,role:"progressbar","aria-valuenow":bi},(0,be.Z)(Or,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),cn))}),Xt=zt},57809:function(Pn,an,$e){"use strict";var it=$e(92310),xt=$e.n(it),ie=$e(77861),_e=$e(2738),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 Ne={};for(var Oe in Ie)Object.prototype.hasOwnProperty.call(Ie,Oe)&&ke.indexOf(Oe)<0&&(Ne[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])&&(Ne[Oe[Fe]]=Ie[Oe[Fe]]);return Ne};const ue="SECRET_COMBOBOX_MODE_DO_NOT_USE",pe=(Ie,ke)=>{var Ne,{prefixCls:Oe,bordered:Fe=!0,className:Re,rootClassName:Ye,getPopupContainer:ze,popupClassName:Ze,dropdownClassName:at,listHeight:ht=256,placement:pt,listItemHeight:Mt=24,size:et,disabled:ot,notFoundContent:wt,status:Et,builtinPlacements:Tt,dropdownMatchSelectWidth:vt,popupMatchSelectWidth:gt,direction:yt,style:It,allowClear:Ot}=Ie,Vt=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:mt,renderEmpty:nt,direction:ft,virtual:Xe,popupMatchSelectWidth:ut,popupOverflow:bt,select:St}=je.useContext(Ce.E_),lt=mt("select",Oe),Qe=mt(),Ue=yt!=null?yt:ft,{compactSize:We,compactItemClassnames:qe}=(0,fe.ri)(lt,Ue),[He,De]=(0,z.Z)(lt),Le=je.useMemo(()=>{const{mode:Jr}=Vt;if(Jr!=="combobox")return Jr===ue?"combobox":Jr},[Vt.mode]),Ke=Le==="multiple"||Le==="tags",dt=(0,ae.Z)(Vt.suffixIcon,Vt.showArrow),Ve=(Ne=gt!=null?gt:vt)!==null&&Ne!==void 0?Ne:ut,{status:kt,hasFeedback:zt,isFormItemInput:Xt,feedbackIcon:At}=je.useContext(xe.aM),Nt=(0,be.F)(kt,Et);let qt;wt!==void 0?qt=wt:Le==="combobox"?qt=null:qt=(nt==null?void 0:nt("Select"))||je.createElement(we.Z,{componentName:"Select"});const{suffixIcon:on,itemIcon:gn,removeIcon:kn,clearIcon:Kn}=(0,re.Z)(Object.assign(Object.assign({},Vt),{multiple:Ke,hasFeedback:zt,feedbackIcon:At,showSuffixIcon:dt,prefixCls:lt,showArrow:Vt.showArrow,componentName:"Select"})),Xn=Ot===!0?{clearIcon:Kn}:Ot,hr=(0,_e.Z)(Vt,["suffixIcon","itemIcon"]),dr=xt()(Ze||at,{[`${lt}-dropdown-${Ue}`]:Ue==="rtl"},Ye,De),fr=(0,me.Z)(Jr=>{var tt;return(tt=et!=null?et:We)!==null&&tt!==void 0?tt:Jr}),xr=je.useContext(ye.Z),Hr=ot!=null?ot:xr,Yr=xt()({[`${lt}-lg`]:fr==="large",[`${lt}-sm`]:fr==="small",[`${lt}-rtl`]:Ue==="rtl",[`${lt}-borderless`]:!Fe,[`${lt}-in-form-item`]:Xt},(0,be.Z)(lt,Nt,zt),qe,St==null?void 0:St.className,Re,Ye,De),Or=je.useMemo(()=>pt!==void 0?pt:Ue==="rtl"?"bottomRight":"bottomLeft",[pt,Ue]),bi=(0,ee.Z)(Tt,bt);return He(je.createElement(ie.ZP,Object.assign({ref:ke,virtual:Xe,showSearch:St==null?void 0:St.showSearch},hr,{style:Object.assign(Object.assign({},St==null?void 0:St.style),It),dropdownMatchSelectWidth:Ve,builtinPlacements:bi,transitionName:(0,ce.m)(Qe,"slide-up",Vt.transitionName),listHeight:ht,listItemHeight:Mt,mode:Le,prefixCls:lt,placement:Or,direction:Ue,suffixIcon:on,menuItemSelectedIcon:gn,removeIcon:kn,allowClear:Xn,notFoundContent:qt,className:Yr,getPopupContainer:ze||Ct,dropdownClassName:dr,disabled:Hr})))},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,an.default=Ee},14154:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return Ee}});var it=$e(17313),xt=$e(74207),ie=$e(37613),_e=$e(83116),je=$e(13826),ve=$e(92899);const ce=Pe=>{const{optionHeight:Ie,optionFontSize:ke,optionLineHeight:Ne,optionPadding:Oe}=Pe;return{position:"relative",display:"block",minHeight:Ie,padding:Oe,color:Pe.colorText,fontWeight:"normal",fontSize:ke,lineHeight:Ne,boxSizing:"border-box"}};var Ce=Pe=>{const{antCls:Ie,componentCls:ke}=Pe,Ne=`${ke}-item`,Oe=`&${Ie}-slide-up-enter${Ie}-slide-up-enter-active`,Fe=`&${Ie}-slide-up-appear${Ie}-slide-up-appear-active`,Re=`&${Ie}-slide-up-leave${Ie}-slide-up-leave-active`,Ye=`${ke}-dropdown-placement-`;return[{[`${ke}-dropdown`]:Object.assign(Object.assign({},(0,it.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},[`${Re}${Ye}bottomLeft`]:{animationName:je.Uw},[`
|
|
|
${Re}${Ye}topLeft,
|
|
|
${Re}${Ye}topRight
|
|
|
`]:{animationName:je.ly},"&-hidden":{display:"none"},[`${Ne}`]: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"},it.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${Ne}-option-disabled)`]:{backgroundColor:Pe.optionActiveBg},[`&-selected:not(${Ne}-option-disabled)`]:{color:Pe.optionSelectedColor,fontWeight:Pe.optionSelectedFontWeight,backgroundColor:Pe.optionSelectedBg,[`${Ne}-option-state`]:{color:Pe.colorPrimary}},"&-disabled":{[`&${Ne}-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:Ne}=Pe;const Oe=(ke-Ie)/2-Ne,Fe=Math.ceil(Oe/2);return[Oe,Fe]};function me(Pe,Ie){const{componentCls:ke,iconCls:Ne}=Pe,Oe=`${ke}-selection-overflow`,Fe=Pe.multipleSelectItemHeight,[Re]=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:`${Re-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,it.Ro)()),{display:"inline-flex",alignItems:"center",color:Pe.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${Ne}`]:{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-Re,"\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}),Ne=(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(Ne,"lg")]};function z(Pe,Ie){const{componentCls:ke,inputPaddingHorizontalBase:Ne,borderRadius:Oe}=Pe,Fe=Pe.controlHeight-Pe.lineWidth*2,Re=Math.ceil(Pe.fontSize*1.25),Ye=Ie?`${ke}-${Ie}`:"";return{[`${ke}-single${Ye}`]:{fontSize:Pe.fontSize,[`${ke}-selector`]:Object.assign(Object.assign({},(0,it.Wf)(Pe)),{display:"flex",borderRadius:Oe,[`${ke}-selection-search`]:{position:"absolute",top:0,insetInlineStart:Ne,insetInlineEnd:Ne,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:Re},[`&${ke}-open ${ke}-selection-item`]:{color:Pe.colorTextPlaceholder},[`&:not(${ke}-customize-input)`]:{[`${ke}-selector`]:{width:"100%",height:Pe.controlHeight,padding:`0 ${Ne}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 ${Ne}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:Ne,borderHoverColor:Oe,outlineColor:Fe,antCls:Re}=Ie,Ye=ke?{[`${Ne}-selector`]:{borderColor:Oe}}:{};return{[Pe]:{[`&:not(${Ne}-disabled):not(${Ne}-customize-input):not(${Re}-pagination-size-changer)`]:Object.assign(Object.assign({},Ye),{[`${Ne}-focused& ${Ne}-selector`]:{borderColor:Oe,boxShadow:`0 0 0 ${Ie.controlOutlineWidth}px ${Fe}`,outline:0},[`&:hover ${Ne}-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:Ne}=Pe;return{[Ie]:Object.assign(Object.assign({},(0,it.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"},it.vS),[`${Ie}-selection-placeholder`]:Object.assign(Object.assign({},it.vS),{flex:1,color:Pe.colorTextPlaceholder,pointerEvents:"none"}),[`${Ie}-arrow`]:Object.assign(Object.assign({},(0,it.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",[Ne]:{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,xt.c)(Pe,{borderElCls:`${Ie}-selector`,focusElCls:`${Ie}-focused`})]};var Ee=(0,_e.Z)("Select",(Pe,Ie)=>{let{rootPrefixCls:ke}=Ie;const Ne=(0,ie.TS)(Pe,{rootPrefixCls:ke,inputPaddingHorizontalBase:Pe.paddingSM-1,multipleSelectItemHeight:Pe.multipleItemHeight});return[pe(Ne)]},Pe=>{const{fontSize:Ie,lineHeight:ke,controlHeight:Ne,controlPaddingHorizontal:Oe,zIndexPopupBase:Fe,colorText:Re,fontWeightStrong:Ye,controlItemBgActive:ze,controlItemBgHover:Ze,colorBgContainer:at,colorFillSecondary:ht,controlHeightLG:pt,controlHeightSM:Mt,colorBgContainerDisabled:et,colorTextDisabled:ot}=Pe;return{zIndexPopup:Fe+50,optionSelectedColor:Re,optionSelectedFontWeight:Ye,optionSelectedBg:ze,optionActiveBg:Ze,optionPadding:`${(Ne-Ie*ke)/2}px ${Oe}px`,optionFontSize:Ie,optionLineHeight:ke,optionHeight:Ne,selectorBg:at,clearBg:at,singleItemHeightLG:pt,multipleItemBg:ht,multipleItemBorderColor:"transparent",multipleItemHeight:Mt,multipleItemHeightLG:Ne,multipleSelectorBgDisabled:et,multipleItemColorDisabled:ot,multipleItemBorderColorDisabled:"transparent"}})},58582:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return xt}});const it=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 xt(ie,_e){return ie||it(_e)}},84443:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return it}});function it(xt,ie){return ie!==void 0?ie:xt!==null}},66339:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return be}});var it=$e(40001),xt=$e(19248),ie=$e(99267),_e=$e(84105),je=$e(58617),ve=$e(47472),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(xt.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:Re,showSearch:Ye}=Fe;return Pe(Re&&Ye?ce.createElement(ve.Z,{className:Oe}):ce.createElement(_e.Z,{className:Oe}))}}let ke=null;me!==void 0?ke=me:z?ke=ce.createElement(it.Z,null):ke=null;let Ne=null;return xe!==void 0?Ne=xe:Ne=ce.createElement(ie.Z,null),{clearIcon:Ee,suffixIcon:Ie,itemIcon:ke,removeIcon:Ne}}},81327:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return ae}});var it=$e(59301),xt=$e(92310),ie=$e.n(xt),_e=$e(11592),je=$e(36355),ve=$e(33234);const ce=it.createContext({latestIndex:0}),be=ce.Provider;var ye=re=>{let{className:le,index:ue,children:pe,split:Ee,style:Pe}=re;const{latestIndex:Ie}=it.useContext(ce);return pe==null?null:it.createElement(it.Fragment,null,it.createElement("div",{className:le,style:Pe},pe),ue<Ie&&Ee&&it.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=it.forwardRef((re,le)=>{var ue,pe;const{getPrefixCls:Ee,space:Pe,direction:Ie}=it.useContext(je.E_),{size:ke=(Pe==null?void 0:Pe.size)||"small",align:Ne,className:Oe,rootClassName:Fe,children:Re,direction:Ye="horizontal",prefixCls:ze,split:Ze,style:at,wrap:ht=!1,classNames:pt,styles:Mt}=re,et=fe(re,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[ot,wt]=Array.isArray(ke)?ke:[ke,ke],Et=me(wt),Tt=me(ot),vt=xe(wt),gt=xe(ot),yt=(0,_e.Z)(Re,{keepEmpty:!0}),It=Ne===void 0&&Ye==="horizontal"?"center":Ne,Ot=Ee("space",ze),[Vt,Ct]=(0,we.Z)(Ot),mt=ie()(Ot,Pe==null?void 0:Pe.className,Ct,`${Ot}-${Ye}`,{[`${Ot}-rtl`]:Ie==="rtl",[`${Ot}-align-${It}`]:It,[`${Ot}-gap-row-${wt}`]:Et,[`${Ot}-gap-col-${ot}`]:Tt},Oe,Fe),nt=ie()(`${Ot}-item`,(ue=pt==null?void 0:pt.item)!==null&&ue!==void 0?ue:(pe=Pe==null?void 0:Pe.classNames)===null||pe===void 0?void 0:pe.item);let ft=0;const Xe=yt.map((St,lt)=>{var Qe,Ue;St!=null&&(ft=lt);const We=St&&St.key||`${nt}-${lt}`;return it.createElement(ye,{className:nt,key:We,index:lt,split:Ze,style:(Qe=Mt==null?void 0:Mt.item)!==null&&Qe!==void 0?Qe:(Ue=Pe==null?void 0:Pe.styles)===null||Ue===void 0?void 0:Ue.item},St)}),ut=it.useMemo(()=>({latestIndex:ft}),[ft]);if(yt.length===0)return null;const bt={};return ht&&(bt.flexWrap="wrap"),!Tt&>&&(bt.columnGap=ot),!Et&&vt&&(bt.rowGap=wt),Vt(it.createElement("div",Object.assign({ref:le,className:mt,style:Object.assign(Object.assign(Object.assign({},bt),Pe==null?void 0:Pe.style),at)},et),it.createElement(be,{value:ut},Xe)))});ee.Compact=ve.ZP;var ae=ee},15969:function(Pn,an,$e){"use strict";$e.d(an,{N:function(){return it}});const it=xt=>({color:xt.colorLink,textDecoration:"none",outline:"none",cursor:"pointer",transition:`color ${xt.motionDurationSlow}`,"&:focus, &:hover":{color:xt.colorLinkHover},"&:active":{color:xt.colorLinkActive}})},78673:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return Ye}});var it=$e(58617),xt=$e(92310),ie=$e.n(xt),_e=$e(72308),je=$e(49618),ve=$e(52487),ce=$e(74416),be=$e(59301),Ce=$e(18929),ye=$e(10228),we=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],me=be.forwardRef(function(ze,Ze){var at,ht=ze.prefixCls,pt=ht===void 0?"rc-switch":ht,Mt=ze.className,et=ze.checked,ot=ze.defaultChecked,wt=ze.disabled,Et=ze.loadingIcon,Tt=ze.checkedChildren,vt=ze.unCheckedChildren,gt=ze.onClick,yt=ze.onChange,It=ze.onKeyDown,Ot=(0,ce.Z)(ze,we),Vt=(0,Ce.Z)(!1,{value:et,defaultValue:ot}),Ct=(0,ve.Z)(Vt,2),mt=Ct[0],nt=Ct[1];function ft(St,lt){var Qe=mt;return wt||(Qe=St,nt(Qe),yt==null||yt(Qe,lt)),Qe}function Xe(St){St.which===ye.Z.LEFT?ft(!1,St):St.which===ye.Z.RIGHT&&ft(!0,St),It==null||It(St)}function ut(St){var lt=ft(!mt,St);gt==null||gt(lt,St)}var bt=ie()(pt,Mt,(at={},(0,je.Z)(at,"".concat(pt,"-checked"),mt),(0,je.Z)(at,"".concat(pt,"-disabled"),wt),at));return be.createElement("button",(0,_e.Z)({},Ot,{type:"button",role:"switch","aria-checked":mt,disabled:wt,className:bt,ref:Ze,onKeyDown:Xe,onClick:ut}),Et,be.createElement("span",{className:"".concat(pt,"-inner")},be.createElement("span",{className:"".concat(pt,"-inner-checked")},Tt),be.createElement("span",{className:"".concat(pt,"-inner-unchecked")},vt)))});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:Ze,trackHeightSM:at,trackPadding:ht,trackMinWidthSM:pt,innerMinMarginSM:Mt,innerMaxMarginSM:et,handleSizeSM:ot}=ze,wt=`${Ze}-inner`;return{[Ze]:{[`&${Ze}-small`]:{minWidth:pt,height:at,lineHeight:`${at}px`,[`${Ze}-inner`]:{paddingInlineStart:et,paddingInlineEnd:Mt,[`${wt}-checked`]:{marginInlineStart:`calc(-100% + ${ot+ht*2}px - ${et*2}px)`,marginInlineEnd:`calc(100% - ${ot+ht*2}px + ${et*2}px)`},[`${wt}-unchecked`]:{marginTop:-at,marginInlineStart:0,marginInlineEnd:0}},[`${Ze}-handle`]:{width:ot,height:ot},[`${Ze}-loading-icon`]:{top:(ot-ze.switchLoadingIconSize)/2,fontSize:ze.switchLoadingIconSize},[`&${Ze}-checked`]:{[`${Ze}-inner`]:{paddingInlineStart:Mt,paddingInlineEnd:et,[`${wt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${wt}-unchecked`]:{marginInlineStart:`calc(100% - ${ot+ht*2}px + ${et*2}px)`,marginInlineEnd:`calc(-100% + ${ot+ht*2}px - ${et*2}px)`}},[`${Ze}-handle`]:{insetInlineStart:`calc(100% - ${ot+ht}px)`}},[`&:not(${Ze}-disabled):active`]:{[`&:not(${Ze}-checked) ${wt}`]:{[`${wt}-unchecked`]:{marginInlineStart:ze.marginXXS/2,marginInlineEnd:-ze.marginXXS/2}},[`&${Ze}-checked ${wt}`]:{[`${wt}-checked`]:{marginInlineStart:-ze.marginXXS/2,marginInlineEnd:ze.marginXXS/2}}}}}}},Pe=ze=>{const{componentCls:Ze,handleSize:at}=ze;return{[Ze]:{[`${Ze}-loading-icon${ze.iconCls}`]:{position:"relative",top:(at-ze.fontSize)/2,color:ze.switchLoadingIconColor,verticalAlign:"top"},[`&${Ze}-checked ${Ze}-loading-icon`]:{color:ze.switchColor}}}},Ie=ze=>{const{componentCls:Ze,motion:at,trackPadding:ht,handleBg:pt,handleShadow:Mt,handleSize:et}=ze,ot=`${Ze}-handle`;return{[Ze]:{[ot]:{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:pt,borderRadius:et/2,boxShadow:Mt,transition:`all ${ze.switchDuration} ease-in-out`,content:'""'}},[`&${Ze}-checked ${ot}`]:{insetInlineStart:`calc(100% - ${et+ht}px)`},[`&:not(${Ze}-disabled):active`]:at?{[`${ot}::before`]:{insetInlineEnd:ze.switchHandleActiveInset,insetInlineStart:0},[`&${Ze}-checked ${ot}::before`]:{insetInlineEnd:0,insetInlineStart:ze.switchHandleActiveInset}}:{}}}},ke=ze=>{const{componentCls:Ze,trackHeight:at,trackPadding:ht,innerMinMargin:pt,innerMaxMargin:Mt,handleSize:et}=ze,ot=`${Ze}-inner`;return{[Ze]:{[ot]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:Mt,paddingInlineEnd:pt,transition:`padding-inline-start ${ze.switchDuration} ease-in-out, padding-inline-end ${ze.switchDuration} ease-in-out`,[`${ot}-checked, ${ot}-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"},[`${ot}-checked`]:{marginInlineStart:`calc(-100% + ${et+ht*2}px - ${Mt*2}px)`,marginInlineEnd:`calc(100% - ${et+ht*2}px + ${Mt*2}px)`},[`${ot}-unchecked`]:{marginTop:-at,marginInlineStart:0,marginInlineEnd:0}},[`&${Ze}-checked ${ot}`]:{paddingInlineStart:pt,paddingInlineEnd:Mt,[`${ot}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${ot}-unchecked`]:{marginInlineStart:`calc(100% - ${et+ht*2}px + ${Mt*2}px)`,marginInlineEnd:`calc(-100% + ${et+ht*2}px - ${Mt*2}px)`}},[`&:not(${Ze}-disabled):active`]:{[`&:not(${Ze}-checked) ${ot}`]:{[`${ot}-unchecked`]:{marginInlineStart:ht*2,marginInlineEnd:-ht*2}},[`&${Ze}-checked ${ot}`]:{[`${ot}-checked`]:{marginInlineStart:-ht*2,marginInlineEnd:ht*2}}}}}},Ne=ze=>{const{componentCls:Ze,trackHeight:at,trackMinWidth:ht}=ze;return{[Ze]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,le.Wf)(ze)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:ht,height:at,lineHeight:`${at}px`,verticalAlign:"middle",background:ze.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${ze.motionDurationMid}`,userSelect:"none",[`&:hover:not(${Ze}-disabled)`]:{background:ze.colorTextTertiary}}),(0,le.Qy)(ze)),{[`&${Ze}-checked`]:{background:ze.switchColor,[`&:hover:not(${Ze}-disabled)`]:{background:ze.colorPrimaryHover}},[`&${Ze}-loading, &${Ze}-disabled`]:{cursor:"not-allowed",opacity:ze.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${Ze}-rtl`]:{direction:"rtl"}})}};var Oe=(0,ue.Z)("Switch",ze=>{const Ze=(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[Ne(Ze),ke(Ze),Ie(Ze),Pe(Ze),Ee(Ze)]},ze=>{const{fontSize:Ze,lineHeight:at,controlHeight:ht,colorWhite:pt}=ze,Mt=Ze*at,et=ht/2,ot=2,wt=Mt-ot*2,Et=et-ot*2;return{trackHeight:Mt,trackHeightSM:et,trackMinWidth:wt*2+ot*4,trackMinWidthSM:Et*2+ot*2,trackPadding:ot,handleBg:pt,handleSize:wt,handleSizeSM:Et,handleShadow:`0 2px 4px 0 ${new re.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:wt/2,innerMaxMargin:wt+ot+ot*2,innerMinMarginSM:Et/2,innerMaxMarginSM:Et+ot+ot*2}}),Fe=function(ze,Ze){var at={};for(var ht in ze)Object.prototype.hasOwnProperty.call(ze,ht)&&Ze.indexOf(ht)<0&&(at[ht]=ze[ht]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var pt=0,ht=Object.getOwnPropertySymbols(ze);pt<ht.length;pt++)Ze.indexOf(ht[pt])<0&&Object.prototype.propertyIsEnumerable.call(ze,ht[pt])&&(at[ht[pt]]=ze[ht[pt]]);return at};const Re=be.forwardRef((ze,Ze)=>{const{prefixCls:at,size:ht,disabled:pt,loading:Mt,className:et,rootClassName:ot,style:wt}=ze,Et=Fe(ze,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:Tt,direction:vt,switch:gt}=be.useContext(z.E_),yt=be.useContext(ee.Z),It=(pt!=null?pt:yt)||Mt,Ot=Tt("switch",at),Vt=be.createElement("div",{className:`${Ot}-handle`},Mt&&be.createElement(it.Z,{className:`${Ot}-loading-icon`})),[Ct,mt]=Oe(Ot),nt=(0,ae.Z)(ht),ft=ie()(gt==null?void 0:gt.className,{[`${Ot}-small`]:nt==="small",[`${Ot}-loading`]:Mt,[`${Ot}-rtl`]:vt==="rtl"},et,ot,mt),Xe=Object.assign(Object.assign({},gt==null?void 0:gt.style),wt);return Ct(be.createElement(fe.Z,{component:"Switch"},be.createElement(xe,Object.assign({},Et,{prefixCls:Ot,className:ft,style:Xe,disabled:It,ref:Ze,loadingIcon:Vt}))))});Re.__ANT_SWITCH=!0;var Ye=Re},1710:function(Pn,an,$e){"use strict";$e.d(an,{default:function(){return Wp}});var it={},xt="rc-table-internal-hook",ie=$e(52487),_e=$e(6089),je=$e(34280),ve=$e(13697),ce=$e(59301),be=$e(4676);function Ce(_t){var Gt=ce.createContext(void 0),nn=function(xn){var dn=xn.value,Bn=xn.children,Rn=ce.useRef(dn);Rn.current=dn;var Dn=ce.useState(function(){return{getValue:function(){return Rn.current},listeners:new Set}}),qn=(0,ie.Z)(Dn,1),rr=qn[0];return(0,je.Z)(function(){(0,be.unstable_batchedUpdates)(function(){rr.listeners.forEach(function(tr){tr(dn)})})},[dn]),ce.createElement(Gt.Provider,{value:rr},Bn)};return{Context:Gt,Provider:nn,defaultValue:_t}}function ye(_t,Gt){var nn=(0,_e.Z)(typeof Gt=="function"?Gt:function(tr){if(Gt===void 0)return tr;if(!Array.isArray(Gt))return tr[Gt];var kr={};return Gt.forEach(function(Er){kr[Er]=tr[Er]}),kr}),rn=ce.useContext(_t==null?void 0:_t.Context),xn=rn||{},dn=xn.listeners,Bn=xn.getValue,Rn=ce.useRef();Rn.current=nn(rn?Bn():_t==null?void 0:_t.defaultValue);var Dn=ce.useState({}),qn=(0,ie.Z)(Dn,2),rr=qn[1];return(0,je.Z)(function(){if(!rn)return;function tr(kr){var Er=nn(kr);(0,ve.Z)(Rn.current,Er,!0)||rr({})}return dn.add(tr),function(){dn.delete(tr)}},[rn]),Rn.current}var we=$e(72308),me=$e(8654);function xe(){var _t=ce.createContext(null);function Gt(){return ce.useContext(_t)}function nn(xn,dn){var Bn=(0,me.Yr)(xn),Rn=function(qn,rr){var tr=Bn?{ref:rr}:{},kr=ce.useRef(0),Er=ce.useRef(qn),gr=Gt();return gr!==null?ce.createElement(xn,(0,we.Z)({},qn,tr)):((!dn||dn(Er.current,qn))&&(kr.current+=1),Er.current=qn,ce.createElement(_t.Provider,{value:kr.current},ce.createElement(xn,(0,we.Z)({},qn,tr))))};return Bn?ce.forwardRef(Rn):Rn}function rn(xn,dn){var Bn=(0,me.Yr)(xn),Rn=function(qn,rr){var tr=Bn?{ref:rr}:{};return Gt(),ce.createElement(xn,(0,we.Z)({},qn,tr))};return Bn?ce.memo(ce.forwardRef(Rn),dn):ce.memo(Rn,dn)}return{makeImmutable:nn,responseImmutable:rn,useImmutableMark:Gt}}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(_t,Gt){var nn=ce.useRef(0);nn.current+=1;var rn=ce.useRef(_t),xn=[];Object.keys(_t||{}).map(function(Bn){var Rn;(_t==null?void 0:_t[Bn])!==((Rn=rn.current)===null||Rn===void 0?void 0:Rn[Bn])&&xn.push(Bn)}),rn.current=_t;var dn=ce.useRef([]);return xn.length&&(dn.current=xn),ce.useDebugValue(nn.current),ce.useDebugValue(dn.current.join(", ")),Gt&&console.log("".concat(Gt,":"),nn.current,dn.current),nn.current}var ke=null,Ne=ce.memo(function(){var _t=Ie();return ce.createElement("h1",null,"Render Times: ",_t)});Ne.displayName="RenderBlock";var Oe=$e(62853),Fe=$e(77321),Re=$e(49618),Ye=$e(92310),ze=$e.n(Ye),Ze=$e(80547),at=$e(97938),ht=$e(48736),pt=ce.createContext({renderWithProps:!1}),Mt=pt,et="RC_TABLE_KEY";function ot(_t){return _t==null?[]:Array.isArray(_t)?_t:[_t]}function wt(_t){var Gt=[],nn={};return _t.forEach(function(rn){for(var xn=rn||{},dn=xn.key,Bn=xn.dataIndex,Rn=dn||ot(Bn).join("-")||et;nn[Rn];)Rn="".concat(Rn,"_next");nn[Rn]=!0,Gt.push(Rn)}),Gt}function Et(_t){return _t!=null}function Tt(_t){return _t&&(0,Oe.Z)(_t)==="object"&&!Array.isArray(_t)&&!ce.isValidElement(_t)}function vt(_t,Gt,nn,rn,xn,dn){var Bn=ce.useContext(Mt),Rn=pe(),Dn=(0,Ze.Z)(function(){if(Et(rn))return[rn];var qn=Gt==null||Gt===""?[]:Array.isArray(Gt)?Gt:[Gt],rr=(0,at.Z)(_t,qn),tr=rr,kr=void 0;if(xn){var Er=xn(rr,_t,nn);Tt(Er)?(tr=Er.children,kr=Er.props,Bn.renderWithProps=!0):tr=Er}return[tr,kr]},[Rn,_t,rn,Gt,xn,nn],function(qn,rr){if(dn){var tr=(0,ie.Z)(qn,2),kr=tr[1],Er=(0,ie.Z)(rr,2),gr=Er[1];return dn(gr,kr)}return Bn.renderWithProps?!0:!(0,ve.Z)(qn,rr,!0)});return Dn}function gt(_t,Gt,nn,rn){var xn=_t+Gt-1;return _t<=rn&&xn>=nn}function yt(_t,Gt){return ye(Pe,function(nn){var rn=gt(_t,Gt||1,nn.hoverStartRow,nn.hoverEndRow);return[rn,nn.onHover]})}var It=function(Gt){var nn=Gt.ellipsis,rn=Gt.rowType,xn=Gt.children,dn,Bn=nn===!0?{showTitle:!0}:nn;return Bn&&(Bn.showTitle||rn==="header")&&(typeof xn=="string"||typeof xn=="number"?dn=xn.toString():ce.isValidElement(xn)&&typeof xn.props.children=="string"&&(dn=xn.props.children)),dn};function Ot(_t){var Gt,nn,rn,xn,dn,Bn,Rn,Dn,qn=_t.component,rr=_t.children,tr=_t.ellipsis,kr=_t.scope,Er=_t.prefixCls,gr=_t.className,qr=_t.align,br=_t.record,Xr=_t.render,Vr=_t.dataIndex,ci=_t.renderIndex,ki=_t.shouldCellUpdate,Wi=_t.index,ti=_t.rowType,Li=_t.colSpan,ho=_t.rowSpan,ui=_t.fixLeft,Ci=_t.fixRight,si=_t.firstFixLeft,zr=_t.lastFixLeft,vi=_t.firstFixRight,Fi=_t.lastFixRight,Yi=_t.appendNode,eo=_t.additionalProps,ni=eo===void 0?{}:eo,po=_t.isSticky,wo="".concat(Er,"-cell"),Qo=ye(Pe,["supportSticky","allColumnsFixedLeft"]),Ao=Qo.supportSticky,Na=Qo.allColumnsFixedLeft,Ta=vt(br,Vr,ci,rr,Xr,ki),vo=(0,ie.Z)(Ta,2),Gi=vo[0],Wo=vo[1],Aa={},Sa=typeof ui=="number"&&Ao,is=typeof Ci=="number"&&Ao;Sa&&(Aa.position="sticky",Aa.left=ui),is&&(Aa.position="sticky",Aa.right=Ci);var to=(Gt=(nn=(rn=Wo==null?void 0:Wo.colSpan)!==null&&rn!==void 0?rn:ni.colSpan)!==null&&nn!==void 0?nn:Li)!==null&&Gt!==void 0?Gt:1,Zi=(xn=(dn=(Bn=Wo==null?void 0:Wo.rowSpan)!==null&&Bn!==void 0?Bn:ni.rowSpan)!==null&&dn!==void 0?dn:ho)!==null&&xn!==void 0?xn:1,no=yt(Wi,Zi),Oi=(0,ie.Z)(no,2),Zo=Oi[0],Ni=Oi[1],fo=function(ts){var ps;br&&Ni(Wi,Wi+Zi-1),ni==null||(ps=ni.onMouseEnter)===null||ps===void 0||ps.call(ni,ts)},Bo=function(ts){var ps;br&&Ni(-1,-1),ni==null||(ps=ni.onMouseLeave)===null||ps===void 0||ps.call(ni,ts)};if(to===0||Zi===0)return null;var Ro=(Rn=ni.title)!==null&&Rn!==void 0?Rn:It({rowType:ti,ellipsis:tr,children:Gi}),bs=ze()(wo,gr,(Dn={},(0,Re.Z)(Dn,"".concat(wo,"-fix-left"),Sa&&Ao),(0,Re.Z)(Dn,"".concat(wo,"-fix-left-first"),si&&Ao),(0,Re.Z)(Dn,"".concat(wo,"-fix-left-last"),zr&&Ao),(0,Re.Z)(Dn,"".concat(wo,"-fix-left-all"),zr&&Na&&Ao),(0,Re.Z)(Dn,"".concat(wo,"-fix-right"),is&&Ao),(0,Re.Z)(Dn,"".concat(wo,"-fix-right-first"),vi&&Ao),(0,Re.Z)(Dn,"".concat(wo,"-fix-right-last"),Fi&&Ao),(0,Re.Z)(Dn,"".concat(wo,"-ellipsis"),tr),(0,Re.Z)(Dn,"".concat(wo,"-with-append"),Yi),(0,Re.Z)(Dn,"".concat(wo,"-fix-sticky"),(Sa||is)&&po&&Ao),(0,Re.Z)(Dn,"".concat(wo,"-row-hover"),!Wo&&Zo),Dn),ni.className,Wo==null?void 0:Wo.className),ls={};qr&&(ls.textAlign=qr);var $s=(0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)({},Aa),ni.style),ls),Wo==null?void 0:Wo.style),qo=Gi;return(0,Oe.Z)(qo)==="object"&&!Array.isArray(qo)&&!ce.isValidElement(qo)&&(qo=null),tr&&(zr||vi)&&(qo=ce.createElement("span",{className:"".concat(wo,"-content")},qo)),ce.createElement(qn,(0,we.Z)({},Wo,ni,{className:bs,style:$s,title:Ro,scope:kr,onMouseEnter:fo,onMouseLeave:Bo,colSpan:to!==1?to:null,rowSpan:Zi!==1?Zi:null}),Yi,qo)}var Vt=ce.memo(Ot);function Ct(_t,Gt,nn,rn,xn,dn){var Bn=nn[_t]||{},Rn=nn[Gt]||{},Dn,qn;Bn.fixed==="left"?Dn=rn.left[xn==="rtl"?Gt:_t]:Rn.fixed==="right"&&(qn=rn.right[xn==="rtl"?_t:Gt]);var rr=!1,tr=!1,kr=!1,Er=!1,gr=nn[Gt+1],qr=nn[_t-1],br=!(dn!=null&&dn.children);if(xn==="rtl"){if(Dn!==void 0){var Xr=qr&&qr.fixed==="left";Er=!Xr&&br}else if(qn!==void 0){var Vr=gr&&gr.fixed==="right";kr=!Vr&&br}}else if(Dn!==void 0){var ci=gr&&gr.fixed==="left";rr=!ci&&br}else if(qn!==void 0){var ki=qr&&qr.fixed==="right";tr=!ki&&br}return{fixLeft:Dn,fixRight:qn,lastFixLeft:rr,firstFixRight:tr,lastFixRight:kr,firstFixLeft:Er,isSticky:rn.isSticky}}var mt=ce.createContext({}),nt=mt;function ft(_t){var Gt=_t.className,nn=_t.index,rn=_t.children,xn=_t.colSpan,dn=xn===void 0?1:xn,Bn=_t.rowSpan,Rn=_t.align,Dn=ye(Pe,["prefixCls","direction"]),qn=Dn.prefixCls,rr=Dn.direction,tr=ce.useContext(nt),kr=tr.scrollColumnIndex,Er=tr.stickyOffsets,gr=tr.flattenColumns,qr=tr.columns,br=nn+dn-1,Xr=br+1===kr?dn+1:dn,Vr=Ct(nn,nn+Xr-1,gr,Er,rr,qr==null?void 0:qr[nn]);return ce.createElement(Vt,(0,we.Z)({className:Gt,index:nn,component:"td",prefixCls:qn,record:null,dataIndex:null,align:Rn,colSpan:Xr,rowSpan:Bn,render:function(){return rn}},Vr))}var Xe=$e(74416),ut=["children"];function bt(_t){var Gt=_t.children,nn=(0,Xe.Z)(_t,ut);return ce.createElement("tr",nn,Gt)}function St(_t){var Gt=_t.children;return Gt}St.Row=bt,St.Cell=ft;var lt=St;function Qe(_t){var Gt=_t.children,nn=_t.stickyOffsets,rn=_t.flattenColumns,xn=_t.columns,dn=ye(Pe,"prefixCls"),Bn=rn.length-1,Rn=rn[Bn],Dn=ce.useMemo(function(){return{stickyOffsets:nn,flattenColumns:rn,scrollColumnIndex:Rn!=null&&Rn.scrollbar?Bn:null,columns:xn}},[Rn,rn,Bn,nn,xn]);return ce.createElement(nt.Provider,{value:Dn},ce.createElement("tfoot",{className:"".concat(dn,"-summary")},Gt))}var Ue=ue(Qe),We=lt,qe=$e(70425),He=$e(29301),De=$e(29194),Le=$e(24514),Ke=$e(75152),dt=$e(26112);function Ve(_t,Gt,nn,rn,xn,dn,Bn){_t.push({record:Gt,indent:nn,index:Bn});var Rn=dn(Gt),Dn=xn==null?void 0:xn.has(Rn);if(Gt&&Array.isArray(Gt[rn])&&Dn)for(var qn=0;qn<Gt[rn].length;qn+=1)Ve(_t,Gt[rn][qn],nn+1,rn,xn,dn,qn)}function kt(_t,Gt,nn,rn){var xn=ce.useMemo(function(){if(nn!=null&&nn.size){for(var dn=[],Bn=0;Bn<(_t==null?void 0:_t.length);Bn+=1){var Rn=_t[Bn];Ve(dn,Rn,0,Gt,nn,rn,Bn)}return dn}return _t==null?void 0:_t.map(function(Dn,qn){return{record:Dn,indent:0,index:qn}})},[_t,Gt,nn,rn]);return xn}function zt(_t){var Gt=_t.prefixCls,nn=_t.children,rn=_t.component,xn=_t.cellComponent,dn=_t.className,Bn=_t.expanded,Rn=_t.colSpan,Dn=_t.isEmpty,qn=ye(Pe,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),rr=qn.scrollbarSize,tr=qn.fixHeader,kr=qn.fixColumn,Er=qn.componentWidth,gr=qn.horizonScroll,qr=nn;return(Dn?gr&&Er:kr)&&(qr=ce.createElement("div",{style:{width:Er-(tr?rr:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Gt,"-expanded-row-fixed")},qr)),ce.createElement(rn,{className:dn,style:{display:Bn?null:"none"}},ce.createElement(Vt,{component:xn,prefixCls:Gt,colSpan:Rn},qr))}var Xt=zt;function At(_t,Gt,nn,rn){var xn=ye(Pe,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),dn=xn.flattenColumns,Bn=xn.expandableType,Rn=xn.expandedKeys,Dn=xn.childrenColumnName,qn=xn.onTriggerExpand,rr=xn.rowExpandable,tr=xn.onRow,kr=xn.expandRowByClick,Er=xn.rowClassName,gr=Bn==="nest",qr=Bn==="row"&&(!rr||rr(_t)),br=qr||gr,Xr=Rn&&Rn.has(Gt),Vr=Dn&&_t&&_t[Dn],ci=(0,qe.useEvent)(qn),ki=tr==null?void 0:tr(_t,nn),Wi=ki==null?void 0:ki.onClick,ti=function(Ci){kr&&br&&qn(_t,Ci);for(var si=arguments.length,zr=new Array(si>1?si-1:0),vi=1;vi<si;vi++)zr[vi-1]=arguments[vi];Wi==null||Wi.apply(void 0,[Ci].concat(zr))},Li;typeof Er=="string"?Li=Er:typeof Er=="function"&&(Li=Er(_t,nn,rn));var ho=wt(dn);return(0,Fe.Z)((0,Fe.Z)({},xn),{},{columnsKey:ho,nestExpandable:gr,expanded:Xr,hasNestChildren:Vr,record:_t,onTriggerExpand:ci,rowSupportExpand:qr,expandable:br,rowProps:(0,Fe.Z)((0,Fe.Z)({},ki),{},{className:ze()(Li,ki==null?void 0:ki.className),onClick:ti})})}function Nt(_t,Gt,nn,rn,xn){var dn=_t.record,Bn=_t.prefixCls,Rn=_t.columnsKey,Dn=_t.fixedInfoList,qn=_t.expandIconColumnIndex,rr=_t.nestExpandable,tr=_t.indentSize,kr=_t.expandIcon,Er=_t.expanded,gr=_t.hasNestChildren,qr=_t.onTriggerExpand,br=Rn[nn],Xr=Dn[nn],Vr;nn===(qn||0)&&rr&&(Vr=ce.createElement(ce.Fragment,null,ce.createElement("span",{style:{paddingLeft:"".concat(tr*rn,"px")},className:"".concat(Bn,"-row-indent indent-level-").concat(rn)}),kr({prefixCls:Bn,expanded:Er,expandable:gr,record:dn,onExpand:qr})));var ci;return Gt.onCell&&(ci=Gt.onCell(dn,xn)),{key:br,fixedInfo:Xr,appendCellNode:Vr,additionalCellProps:ci||{}}}function qt(_t){var Gt=_t.className,nn=_t.style,rn=_t.record,xn=_t.index,dn=_t.renderIndex,Bn=_t.rowKey,Rn=_t.indent,Dn=Rn===void 0?0:Rn,qn=_t.rowComponent,rr=_t.cellComponent,tr=_t.scopeCellComponent,kr=At(rn,Bn,xn,Dn),Er=kr.prefixCls,gr=kr.flattenColumns,qr=kr.expandedRowClassName,br=kr.expandedRowRender,Xr=kr.rowProps,Vr=kr.expanded,ci=kr.rowSupportExpand,ki=ce.useState(!1),Wi=(0,ie.Z)(ki,2),ti=Wi[0],Li=Wi[1];ce.useEffect(function(){Vr&&Li(!0)},[Vr]);var ho=ce.createElement(qn,(0,we.Z)({},Xr,{"data-row-key":Bn,className:ze()(Gt,"".concat(Er,"-row"),"".concat(Er,"-row-level-").concat(Dn),Xr==null?void 0:Xr.className),style:(0,Fe.Z)((0,Fe.Z)({},nn),Xr==null?void 0:Xr.style)}),gr.map(function(zr,vi){var Fi=zr.render,Yi=zr.dataIndex,eo=zr.className,ni=Nt(kr,zr,vi,Dn,xn),po=ni.key,wo=ni.fixedInfo,Qo=ni.appendCellNode,Ao=ni.additionalCellProps;return ce.createElement(Vt,(0,we.Z)({className:eo,ellipsis:zr.ellipsis,align:zr.align,scope:zr.rowScope,component:zr.rowScope?tr:rr,prefixCls:Er,key:po,record:rn,index:xn,renderIndex:dn,dataIndex:Yi,render:Fi,shouldCellUpdate:zr.shouldCellUpdate},wo,{appendNode:Qo,additionalProps:Ao}))})),ui;if(ci&&(ti||Vr)){var Ci=br(rn,xn,Dn+1,Vr),si=qr&&qr(rn,xn,Dn);ui=ce.createElement(Xt,{expanded:Vr,className:ze()("".concat(Er,"-expanded-row"),"".concat(Er,"-expanded-row-level-").concat(Dn+1),si),prefixCls:Er,component:qn,cellComponent:rr,colSpan:gr.length,isEmpty:!1},Ci)}return ce.createElement(ce.Fragment,null,ho,ui)}qt.displayName="BodyRow";var on=ue(qt);function gn(_t){var Gt=_t.columnKey,nn=_t.onColumnResize,rn=ce.useRef();return ce.useEffect(function(){rn.current&&nn(Gt,rn.current.offsetWidth)},[]),ce.createElement(He.Z,{data:Gt},ce.createElement("td",{ref:rn,style:{padding:0,border:0,height:0}},ce.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function kn(_t){var Gt=_t.prefixCls,nn=_t.columnsKey,rn=_t.onColumnResize;return ce.createElement("tr",{"aria-hidden":"true",className:"".concat(Gt,"-measure-row"),style:{height:0,fontSize:0}},ce.createElement(He.Z.Collection,{onBatchResize:function(dn){dn.forEach(function(Bn){var Rn=Bn.data,Dn=Bn.size;rn(Rn,Dn.offsetWidth)})}},nn.map(function(xn){return ce.createElement(gn,{key:xn,columnKey:xn,onColumnResize:rn})})))}function Kn(_t){var Gt=_t.data,nn=_t.measureColumnWidth,rn=ye(Pe,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),xn=rn.prefixCls,dn=rn.getComponent,Bn=rn.onColumnResize,Rn=rn.flattenColumns,Dn=rn.getRowKey,qn=rn.expandedKeys,rr=rn.childrenColumnName,tr=rn.emptyNode,kr=kt(Gt,rr,qn,Dn),Er=ce.useRef({renderWithProps:!1}),gr=dn(["body","wrapper"],"tbody"),qr=dn(["body","row"],"tr"),br=dn(["body","cell"],"td"),Xr=dn(["body","cell"],"th"),Vr;Gt.length?Vr=kr.map(function(ki,Wi){var ti=ki.record,Li=ki.indent,ho=ki.index,ui=Dn(ti,Wi);return ce.createElement(on,{key:ui,rowKey:ui,record:ti,index:Wi,renderIndex:ho,rowComponent:qr,cellComponent:br,scopeCellComponent:Xr,getRowKey:Dn,indent:Li})}):Vr=ce.createElement(Xt,{expanded:!0,className:"".concat(xn,"-placeholder"),prefixCls:xn,component:qr,cellComponent:br,colSpan:Rn.length,isEmpty:!0},tr);var ci=wt(Rn);return ce.createElement(Mt.Provider,{value:Er.current},ce.createElement(gr,{className:"".concat(xn,"-tbody")},nn&&ce.createElement(kn,{prefixCls:xn,columnsKey:ci,onColumnResize:Bn}),Vr))}Kn.displayName="Body";var Xn=ue(Kn),hr=["expandable"],dr="RC_TABLE_INTERNAL_COL_DEFINE";function fr(_t){var Gt=_t.expandable,nn=(0,Xe.Z)(_t,hr),rn;return"expandable"in _t?rn=(0,Fe.Z)((0,Fe.Z)({},nn),Gt):rn=nn,rn.showExpandColumn===!1&&(rn.expandIconColumnIndex=-1),rn}var xr=["columnType"];function Hr(_t){for(var Gt=_t.colWidths,nn=_t.columns,rn=_t.columCount,xn=[],dn=rn||nn.length,Bn=!1,Rn=dn-1;Rn>=0;Rn-=1){var Dn=Gt[Rn],qn=nn&&nn[Rn],rr=qn&&qn[dr];if(Dn||rr||Bn){var tr=rr||{},kr=tr.columnType,Er=(0,Xe.Z)(tr,xr);xn.unshift(ce.createElement("col",(0,we.Z)({key:Rn,style:{width:Dn}},Er))),Bn=!0}}return ce.createElement("colgroup",null,xn)}var Yr=Hr,Or=$e(80702),bi=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function Jr(_t,Gt){return(0,ce.useMemo)(function(){for(var nn=[],rn=0;rn<Gt;rn+=1){var xn=_t[rn];if(xn!==void 0)nn[rn]=xn;else return null}return nn},[_t.join("_"),Gt])}var tt=ce.forwardRef(function(_t,Gt){var nn=_t.className,rn=_t.noData,xn=_t.columns,dn=_t.flattenColumns,Bn=_t.colWidths,Rn=_t.columCount,Dn=_t.stickyOffsets,qn=_t.direction,rr=_t.fixHeader,tr=_t.stickyTopOffset,kr=_t.stickyBottomOffset,Er=_t.stickyClassName,gr=_t.onScroll,qr=_t.maxContentScroll,br=_t.children,Xr=(0,Xe.Z)(_t,bi),Vr=ye(Pe,["prefixCls","scrollbarSize","isSticky"]),ci=Vr.prefixCls,ki=Vr.scrollbarSize,Wi=Vr.isSticky,ti=Wi&&!rr?0:ki,Li=ce.useRef(null),ho=ce.useCallback(function(eo){(0,me.mH)(Gt,eo),(0,me.mH)(Li,eo)},[]);ce.useEffect(function(){var eo;function ni(po){var wo=po,Qo=wo.currentTarget,Ao=wo.deltaX;Ao&&(gr({currentTarget:Qo,scrollLeft:Qo.scrollLeft+Ao}),po.preventDefault())}return(eo=Li.current)===null||eo===void 0||eo.addEventListener("wheel",ni),function(){var po;(po=Li.current)===null||po===void 0||po.removeEventListener("wheel",ni)}},[]);var ui=ce.useMemo(function(){return dn.every(function(eo){return eo.width})},[dn]),Ci=dn[dn.length-1],si={fixed:Ci?Ci.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(ci,"-cell-scrollbar")}}},zr=(0,ce.useMemo)(function(){return ti?[].concat((0,Or.Z)(xn),[si]):xn},[ti,xn]),vi=(0,ce.useMemo)(function(){return ti?[].concat((0,Or.Z)(dn),[si]):dn},[ti,dn]),Fi=(0,ce.useMemo)(function(){var eo=Dn.right,ni=Dn.left;return(0,Fe.Z)((0,Fe.Z)({},Dn),{},{left:qn==="rtl"?[].concat((0,Or.Z)(ni.map(function(po){return po+ti})),[0]):ni,right:qn==="rtl"?eo:[].concat((0,Or.Z)(eo.map(function(po){return po+ti})),[0]),isSticky:Wi})},[ti,Dn,Wi]),Yi=Jr(Bn,Rn);return ce.createElement("div",{style:(0,Fe.Z)({overflow:"hidden"},Wi?{top:tr,bottom:kr}:{}),ref:ho,className:ze()(nn,(0,Re.Z)({},Er,!!Er))},ce.createElement("table",{style:{tableLayout:"fixed",visibility:rn||Yi?null:"hidden"}},(!rn||!qr||ui)&&ce.createElement(Yr,{colWidths:Yi?[].concat((0,Or.Z)(Yi),[ti]):[],columCount:Rn+1,columns:vi}),br((0,Fe.Z)((0,Fe.Z)({},Xr),{},{stickyOffsets:Fi,columns:zr,flattenColumns:vi}))))});tt.displayName="FixedHolder";var li=ce.memo(tt);function Si(_t){var Gt=_t.cells,nn=_t.stickyOffsets,rn=_t.flattenColumns,xn=_t.rowComponent,dn=_t.cellComponent,Bn=_t.tdCellComponent,Rn=_t.onHeaderRow,Dn=_t.index,qn=ye(Pe,["prefixCls","direction"]),rr=qn.prefixCls,tr=qn.direction,kr;Rn&&(kr=Rn(Gt.map(function(gr){return gr.column}),Dn));var Er=wt(Gt.map(function(gr){return gr.column}));return ce.createElement(xn,kr,Gt.map(function(gr,qr){var br=gr.column,Xr=Ct(gr.colStart,gr.colEnd,rn,nn,tr,br),Vr;return br&&br.onHeaderCell&&(Vr=gr.column.onHeaderCell(br)),ce.createElement(Vt,(0,we.Z)({},gr,{scope:br.title?gr.colSpan>1?"colgroup":"col":null,ellipsis:br.ellipsis,align:br.align,component:br.title?dn:Bn,prefixCls:rr,key:Er[qr]},Xr,{additionalProps:Vr,rowType:"header"}))}))}Si.displayName="HeaderRow";var xi=Si;function lr(_t){var Gt=[];function nn(Bn,Rn){var Dn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Gt[Dn]=Gt[Dn]||[];var qn=Rn,rr=Bn.filter(Boolean).map(function(tr){var kr={key:tr.key,className:tr.className||"",children:tr.title,column:tr,colStart:qn},Er=1,gr=tr.children;return gr&&gr.length>0&&(Er=nn(gr,qn,Dn+1).reduce(function(qr,br){return qr+br},0),kr.hasSubColumns=!0),"colSpan"in tr&&(Er=tr.colSpan),"rowSpan"in tr&&(kr.rowSpan=tr.rowSpan),kr.colSpan=Er,kr.colEnd=kr.colStart+Er-1,Gt[Dn].push(kr),qn+=Er,Er});return rr}nn(_t,0);for(var rn=Gt.length,xn=function(Rn){Gt[Rn].forEach(function(Dn){!("rowSpan"in Dn)&&!Dn.hasSubColumns&&(Dn.rowSpan=rn-Rn)})},dn=0;dn<rn;dn+=1)xn(dn);return Gt}function Ar(_t){var Gt=_t.stickyOffsets,nn=_t.columns,rn=_t.flattenColumns,xn=_t.onHeaderRow,dn=ye(Pe,["prefixCls","getComponent"]),Bn=dn.prefixCls,Rn=dn.getComponent,Dn=ce.useMemo(function(){return lr(nn)},[nn]),qn=Rn(["header","wrapper"],"thead"),rr=Rn(["header","row"],"tr"),tr=Rn(["header","cell"],"th"),kr=Rn(["header","cell"],"td");return ce.createElement(qn,{className:"".concat(Bn,"-thead")},Dn.map(function(Er,gr){var qr=ce.createElement(xi,{key:gr,flattenColumns:rn,cells:Er,stickyOffsets:Gt,rowComponent:rr,cellComponent:tr,tdCellComponent:kr,onHeaderRow:xn,index:gr});return qr}))}var Fr=ue(Ar),Ii=$e(11592);function wr(_t){var Gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof Gt=="number"?Gt:Gt.endsWith("%")?_t*parseFloat(Gt)/100:null}function cn(_t,Gt){return ce.useMemo(function(){if(Gt&&Gt>0){var nn=0,rn=0;_t.forEach(function(qn){var rr=wr(Gt,qn.width);rr?nn+=rr:rn+=1});var xn=Gt-nn,dn=rn,Bn=xn/rn,Rn=0,Dn=_t.map(function(qn){var rr=(0,Fe.Z)({},qn),tr=wr(Gt,rr.width);if(tr)rr.width=tr;else{var kr=Math.floor(Bn);rr.width=dn===1?xn:kr,xn-=kr,dn-=1}return Rn+=rr.width,rr});return[Dn,Rn]}return[_t,Gt]},[_t,Gt])}var un=["children"],Dt=["fixed"];function vn(_t){return(0,Ii.Z)(_t).filter(function(Gt){return ce.isValidElement(Gt)}).map(function(Gt){var nn=Gt.key,rn=Gt.props,xn=rn.children,dn=(0,Xe.Z)(rn,un),Bn=(0,Fe.Z)({key:nn},dn);return xn&&(Bn.children=vn(xn)),Bn})}function On(_t){var Gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return _t.filter(function(nn){return nn&&(0,Oe.Z)(nn)==="object"}).reduce(function(nn,rn,xn){var dn=rn.fixed,Bn=dn===!0?"left":dn,Rn="".concat(Gt,"-").concat(xn),Dn=rn.children;return Dn&&Dn.length>0?[].concat((0,Or.Z)(nn),(0,Or.Z)(On(Dn,Rn).map(function(qn){return(0,Fe.Z)({fixed:Bn},qn)}))):[].concat((0,Or.Z)(nn),[(0,Fe.Z)((0,Fe.Z)({key:Rn},rn),{},{fixed:Bn})])},[])}function Jt(_t){for(var Gt=!0,nn=0;nn<_t.length;nn+=1){var rn=_t[nn];if(Gt&&rn.fixed!=="left")Gt=!1;else if(!Gt&&rn.fixed==="left"){warning(!1,"Index ".concat(nn-1," of `columns` missing `fixed='left'` prop."));break}}for(var xn=!0,dn=_t.length-1;dn>=0;dn-=1){var Bn=_t[dn];if(xn&&Bn.fixed!=="right")xn=!1;else if(!xn&&Bn.fixed==="right"){warning(!1,"Index ".concat(dn+1," of `columns` missing `fixed='right'` prop."));break}}}function Ut(_t){return _t.map(function(Gt){var nn=Gt.fixed,rn=(0,Xe.Z)(Gt,Dt),xn=nn;return nn==="left"?xn="right":nn==="right"&&(xn="left"),(0,Fe.Z)({fixed:xn},rn)})}function wn(_t,Gt){var nn=_t.prefixCls,rn=_t.columns,xn=_t.children,dn=_t.expandable,Bn=_t.expandedKeys,Rn=_t.columnTitle,Dn=_t.getRowKey,qn=_t.onTriggerExpand,rr=_t.expandIcon,tr=_t.rowExpandable,kr=_t.expandIconColumnIndex,Er=_t.direction,gr=_t.expandRowByClick,qr=_t.columnWidth,br=_t.fixed,Xr=_t.scrollWidth,Vr=ce.useMemo(function(){return rn||vn(xn)},[rn,xn]),ci=ce.useMemo(function(){if(dn){var Ci,si=Vr.slice();if(!si.includes(it)){var zr=kr||0;zr>=0&&si.splice(zr,0,it)}var vi=si.indexOf(it);si=si.filter(function(ni,po){return ni!==it||po===vi});var Fi=Vr[vi],Yi;(br==="left"||br)&&!kr?Yi="left":(br==="right"||br)&&kr===Vr.length?Yi="right":Yi=Fi?Fi.fixed:null;var eo=(Ci={},(0,Re.Z)(Ci,dr,{className:"".concat(nn,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),(0,Re.Z)(Ci,"title",Rn),(0,Re.Z)(Ci,"fixed",Yi),(0,Re.Z)(Ci,"className","".concat(nn,"-row-expand-icon-cell")),(0,Re.Z)(Ci,"width",qr),(0,Re.Z)(Ci,"render",function(po,wo,Qo){var Ao=Dn(wo,Qo),Na=Bn.has(Ao),Ta=tr?tr(wo):!0,vo=rr({prefixCls:nn,expanded:Na,expandable:Ta,record:wo,onExpand:qn});return gr?ce.createElement("span",{onClick:function(Wo){return Wo.stopPropagation()}},vo):vo}),Ci);return si.map(function(ni){return ni===it?eo:ni})}return Vr.filter(function(ni){return ni!==it})},[dn,Vr,Dn,Bn,rr,Er]),ki=ce.useMemo(function(){var Ci=ci;return Gt&&(Ci=Gt(Ci)),Ci.length||(Ci=[{render:function(){return null}}]),Ci},[Gt,ci,Er]),Wi=ce.useMemo(function(){return Er==="rtl"?Ut(On(ki)):On(ki)},[ki,Er,Xr]),ti=cn(Wi,Xr),Li=(0,ie.Z)(ti,2),ho=Li[0],ui=Li[1];return[ki,ho,ui]}var _n=wn;function Qn(_t){var Gt,nn=_t.prefixCls,rn=_t.record,xn=_t.onExpand,dn=_t.expanded,Bn=_t.expandable,Rn="".concat(nn,"-row-expand-icon");if(!Bn)return ce.createElement("span",{className:ze()(Rn,"".concat(nn,"-row-spaced"))});var Dn=function(rr){xn(rn,rr),rr.stopPropagation()};return ce.createElement("span",{className:ze()(Rn,(Gt={},(0,Re.Z)(Gt,"".concat(nn,"-row-expanded"),dn),(0,Re.Z)(Gt,"".concat(nn,"-row-collapsed"),!dn),Gt)),onClick:Dn})}function Jn(_t,Gt,nn){var rn=[];function xn(dn){(dn||[]).forEach(function(Bn,Rn){rn.push(Gt(Bn,Rn)),xn(Bn[nn])})}return xn(_t),rn}function Wt(_t,Gt,nn){var rn=fr(_t),xn=rn.expandIcon,dn=rn.expandedRowKeys,Bn=rn.defaultExpandedRowKeys,Rn=rn.defaultExpandAllRows,Dn=rn.expandedRowRender,qn=rn.onExpand,rr=rn.onExpandedRowsChange,tr=rn.childrenColumnName,kr=xn||Qn,Er=tr||"children",gr=ce.useMemo(function(){return Dn?"row":_t.expandable&&_t.internalHooks===xt&&_t.expandable.__PARENT_RENDER_ICON__||Gt.some(function(Wi){return Wi&&(0,Oe.Z)(Wi)==="object"&&Wi[Er]})?"nest":!1},[!!Dn,Gt]),qr=ce.useState(function(){return Bn||(Rn?Jn(Gt,nn,Er):[])}),br=(0,ie.Z)(qr,2),Xr=br[0],Vr=br[1],ci=ce.useMemo(function(){return new Set(dn||Xr||[])},[dn,Xr]),ki=ce.useCallback(function(Wi){var ti=nn(Wi,Gt.indexOf(Wi)),Li,ho=ci.has(ti);ho?(ci.delete(ti),Li=(0,Or.Z)(ci)):Li=[].concat((0,Or.Z)(ci),[ti]),Vr(Li),qn&&qn(!ho,Wi),rr&&rr(Li)},[nn,ci,Gt,qn,rr]);return[rn,gr,ci,kr,Er,ki]}function In(_t,Gt,nn,rn){var xn=_t.map(function(dn,Bn){return Ct(Bn,Bn,_t,Gt,nn,rn==null?void 0:rn[Bn])});return(0,Ze.Z)(function(){return xn},[xn],function(dn,Bn){return!(0,ve.Z)(dn,Bn)})}function Wn(_t){var Gt=(0,ce.useRef)(_t),nn=(0,ce.useState)({}),rn=(0,ie.Z)(nn,2),xn=rn[1],dn=(0,ce.useRef)(null),Bn=(0,ce.useRef)([]);function Rn(Dn){Bn.current.push(Dn);var qn=Promise.resolve();dn.current=qn,qn.then(function(){if(dn.current===qn){var rr=Bn.current,tr=Gt.current;Bn.current=[],rr.forEach(function(kr){Gt.current=kr(Gt.current)}),dn.current=null,tr!==Gt.current&&xn({})}})}return(0,ce.useEffect)(function(){return function(){dn.current=null}},[]),[Gt.current,Rn]}function ar(_t){var Gt=(0,ce.useRef)(_t||null),nn=(0,ce.useRef)();function rn(){window.clearTimeout(nn.current)}function xn(Bn){Gt.current=Bn,rn(),nn.current=window.setTimeout(function(){Gt.current=null,nn.current=void 0},100)}function dn(){return Gt.current}return(0,ce.useEffect)(function(){return rn},[]),[xn,dn]}function mn(){var _t=ce.useState(-1),Gt=(0,ie.Z)(_t,2),nn=Gt[0],rn=Gt[1],xn=ce.useState(-1),dn=(0,ie.Z)(xn,2),Bn=dn[0],Rn=dn[1],Dn=ce.useCallback(function(qn,rr){rn(qn),Rn(rr)},[]);return[nn,Bn,Dn]}var Cn=$e(47273),tn=(0,Cn.Z)()?window:null;function fn(_t,Gt){var nn=(0,Oe.Z)(_t)==="object"?_t:{},rn=nn.offsetHeader,xn=rn===void 0?0:rn,dn=nn.offsetSummary,Bn=dn===void 0?0:dn,Rn=nn.offsetScroll,Dn=Rn===void 0?0:Rn,qn=nn.getContainer,rr=qn===void 0?function(){return tn}:qn,tr=rr()||tn;return ce.useMemo(function(){var kr=!!_t;return{isSticky:kr,stickyClassName:kr?"".concat(Gt,"-sticky-holder"):"",offsetHeader:xn,offsetSummary:Bn,offsetScroll:Dn,container:tr}},[Dn,xn,Bn,Gt,tr])}function En(_t,Gt,nn){var rn=(0,ce.useMemo)(function(){for(var xn=[],dn=[],Bn=0,Rn=0,Dn=0;Dn<Gt;Dn+=1)if(nn==="rtl"){dn[Dn]=Rn,Rn+=_t[Dn]||0;var qn=Gt-Dn-1;xn[qn]=Bn,Bn+=_t[qn]||0}else{xn[Dn]=Bn,Bn+=_t[Dn]||0;var rr=Gt-Dn-1;dn[rr]=Rn,Rn+=_t[rr]||0}return{left:xn,right:dn}},[_t,Gt,nn]);return rn}var pn=En;function Ln(_t){var Gt=_t.className,nn=_t.children;return ce.createElement("div",{className:Gt},nn)}var Mn=Ln,Gn=$e(8224),An=$e(55468),sr=function(Gt,nn){var rn,xn,dn=Gt.scrollBodyRef,Bn=Gt.onScroll,Rn=Gt.offsetScroll,Dn=Gt.container,qn=ye(Pe,"prefixCls"),rr=((rn=dn.current)===null||rn===void 0?void 0:rn.scrollWidth)||0,tr=((xn=dn.current)===null||xn===void 0?void 0:xn.clientWidth)||0,kr=rr&&tr*(tr/rr),Er=ce.useRef(),gr=Wn({scrollLeft:0,isHiddenScrollBar:!1}),qr=(0,ie.Z)(gr,2),br=qr[0],Xr=qr[1],Vr=ce.useRef({delta:0,x:0}),ci=ce.useState(!1),ki=(0,ie.Z)(ci,2),Wi=ki[0],ti=ki[1],Li=function(){ti(!1)},ho=function(vi){vi.persist(),Vr.current.delta=vi.pageX-br.scrollLeft,Vr.current.x=0,ti(!0),vi.preventDefault()},ui=function(vi){var Fi,Yi=vi||((Fi=window)===null||Fi===void 0?void 0:Fi.event),eo=Yi.buttons;if(!Wi||eo===0){Wi&&ti(!1);return}var ni=Vr.current.x+vi.pageX-Vr.current.x-Vr.current.delta;ni<=0&&(ni=0),ni+kr>=tr&&(ni=tr-kr),Bn({scrollLeft:ni/tr*(rr+2)}),Vr.current.x=vi.pageX},Ci=function(){if(dn.current){var vi=(0,An.os)(dn.current).top,Fi=vi+dn.current.offsetHeight,Yi=Dn===window?document.documentElement.scrollTop+window.innerHeight:(0,An.os)(Dn).top+Dn.clientHeight;Fi-(0,Ke.Z)()<=Yi||vi>=Yi-Rn?Xr(function(eo){return(0,Fe.Z)((0,Fe.Z)({},eo),{},{isHiddenScrollBar:!0})}):Xr(function(eo){return(0,Fe.Z)((0,Fe.Z)({},eo),{},{isHiddenScrollBar:!1})})}},si=function(vi){Xr(function(Fi){return(0,Fe.Z)((0,Fe.Z)({},Fi),{},{scrollLeft:vi/rr*tr||0})})};return ce.useImperativeHandle(nn,function(){return{setScrollLeft:si}}),ce.useEffect(function(){var zr=(0,Gn.Z)(document.body,"mouseup",Li,!1),vi=(0,Gn.Z)(document.body,"mousemove",ui,!1);return Ci(),function(){zr.remove(),vi.remove()}},[kr,Wi]),ce.useEffect(function(){var zr=(0,Gn.Z)(Dn,"scroll",Ci,!1),vi=(0,Gn.Z)(window,"resize",Ci,!1);return function(){zr.remove(),vi.remove()}},[Dn]),ce.useEffect(function(){br.isHiddenScrollBar||Xr(function(zr){var vi=dn.current;return vi?(0,Fe.Z)((0,Fe.Z)({},zr),{},{scrollLeft:vi.scrollLeft/vi.scrollWidth*vi.clientWidth}):zr})},[br.isHiddenScrollBar]),rr<=tr||!kr||br.isHiddenScrollBar?null:ce.createElement("div",{style:{height:(0,Ke.Z)(),width:tr,bottom:Rn},className:"".concat(qn,"-sticky-scroll")},ce.createElement("div",{onMouseDown:ho,ref:Er,className:ze()("".concat(qn,"-sticky-scroll-bar"),(0,Re.Z)({},"".concat(qn,"-sticky-scroll-bar-active"),Wi)),style:{width:"".concat(kr,"px"),transform:"translate3d(".concat(br.scrollLeft,"px, 0, 0)")}}))},hn=ce.forwardRef(sr);function Nr(_t){return null}var Zr=Nr;function hi(_t){return null}var yn=hi,Yn="rc-table",ir=[],vr={};function yr(){return"No Data"}function Dr(_t){var Gt,nn=(0,Fe.Z)({rowKey:"key",prefixCls:Yn,emptyText:yr},_t),rn=nn.prefixCls,xn=nn.className,dn=nn.rowClassName,Bn=nn.style,Rn=nn.data,Dn=nn.rowKey,qn=nn.scroll,rr=nn.tableLayout,tr=nn.direction,kr=nn.title,Er=nn.footer,gr=nn.summary,qr=nn.caption,br=nn.id,Xr=nn.showHeader,Vr=nn.components,ci=nn.emptyText,ki=nn.onRow,Wi=nn.onHeaderRow,ti=nn.internalHooks,Li=nn.transformColumns,ho=nn.internalRefs,ui=nn.tailor,Ci=nn.sticky,si=Rn||ir,zr=!!si.length,vi=ti===xt,Fi=ce.useCallback(function(ta,Ma){return(0,at.Z)(Vr,ta)||Ma},[Vr]),Yi=ce.useMemo(function(){return typeof Dn=="function"?Dn:function(ta){var Ma=ta&&ta[Dn];return Ma}},[Dn]),eo=Fi(["body"]),ni=mn(),po=(0,ie.Z)(ni,3),wo=po[0],Qo=po[1],Ao=po[2],Na=Wt(nn,si,Yi),Ta=(0,ie.Z)(Na,6),vo=Ta[0],Gi=Ta[1],Wo=Ta[2],Aa=Ta[3],Sa=Ta[4],is=Ta[5],to=qn==null?void 0:qn.x,Zi=ce.useState(0),no=(0,ie.Z)(Zi,2),Oi=no[0],Zo=no[1],Ni=_n((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)({},nn),vo),{},{expandable:!!vo.expandedRowRender,columnTitle:vo.columnTitle,expandedKeys:Wo,getRowKey:Yi,onTriggerExpand:is,expandIcon:Aa,expandIconColumnIndex:vo.expandIconColumnIndex,direction:tr,scrollWidth:vi&&ui&&typeof to=="number"?to:null}),vi?Li:null),fo=(0,ie.Z)(Ni,3),Bo=fo[0],Ro=fo[1],bs=fo[2],ls=bs!=null?bs:to,$s=ce.useMemo(function(){return{columns:Bo,flattenColumns:Ro}},[Bo,Ro]),qo=ce.useRef(),Ps=ce.useRef(),ts=ce.useRef(),ps=ce.useRef(),Wu=ce.useRef(),ea=ce.useState(!1),ia=(0,ie.Z)(ea,2),ua=ia[0],Za=ia[1],gs=ce.useState(!1),ko=(0,ie.Z)(gs,2),fa=ko[0],ms=ko[1],pl=Wn(new Map),zl=(0,ie.Z)(pl,2),El=zl[0],eu=zl[1],tu=wt(Ro),$l=tu.map(function(ta){return El.get(ta)}),na=ce.useMemo(function(){return $l},[$l.join("_")]),Ts=pn(na,Ro.length,tr),Ga=qn&&Et(qn.y),pa=qn&&Et(ls)||!!vo.fixed,Gl=pa&&Ro.some(function(ta){var Ma=ta.fixed;return Ma}),oc=ce.useRef(),nu=fn(Ci,rn),Mu=nu.isSticky,Ku=nu.offsetHeader,Tl=nu.offsetSummary,Xo=nu.offsetScroll,xa=nu.stickyClassName,us=nu.container,wa=ce.useMemo(function(){return gr==null?void 0:gr(si)},[gr,si]),Ho=(Ga||Mu)&&ce.isValidElement(wa)&&wa.type===lt&&wa.props.fixed,vs,gl,gu;Ga&&(gl={overflowY:"scroll",maxHeight:qn.y}),pa&&(vs={overflowX:"auto"},Ga||(gl={overflowY:"hidden"}),gu={width:ls===!0?"auto":ls,minWidth:"100%"});var cf=ce.useCallback(function(ta,Ma){(0,De.Z)(qo.current)&&eu(function(js){if(js.get(ta)!==Ma){var ru=new Map(js);return ru.set(ta,Ma),ru}return js})},[]),sn=ar(null),Pc=(0,ie.Z)(sn,2),Vu=Pc[0],hf=Pc[1];function gh(ta,Ma){Ma&&(typeof Ma=="function"?Ma(ta):Ma.scrollLeft!==ta&&(Ma.scrollLeft=ta,Ma.scrollLeft!==ta&&setTimeout(function(){Ma.scrollLeft=ta},0)))}var Yc=(0,_e.Z)(function(ta){var Ma=ta.currentTarget,js=ta.scrollLeft,ru=tr==="rtl",iu=typeof js=="number"?js:Ma.scrollLeft,Dd=Ma||vr;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=Ma||Ps.current;if(Zh){var mu=Zh.scrollWidth,ac=Zh.clientWidth;if(mu===ac){Za(!1),ms(!1);return}ru?(Za(-iu<mu-ac),ms(-iu>0)):(Za(iu>0),ms(iu<mu-ac))}}),Md=function(){pa&&ts.current?Yc({currentTarget:ts.current}):(Za(!1),ms(!1))},Kp=function(Ma){var js=Ma.width;js!==Oi&&(Md(),Zo(qo.current?qo.current.offsetWidth:js))},Ms=ce.useRef(!1);ce.useEffect(function(){Ms.current&&Md()},[pa,Rn,Bo.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],Hl=ff[1];ce.useEffect(function(){(!ui||!vi)&&(ts.current instanceof Element?df((0,Ke.o)(ts.current).width):df((0,Ke.o)(ps.current).width)),Hl((0,Le.G)("position","sticky"))},[]),ce.useEffect(function(){vi&&ho&&(ho.body.current=ts.current)});var mh=ce.useCallback(function(ta){return ce.createElement(ce.Fragment,null,ce.createElement(Fr,ta),Ho==="top"&&ce.createElement(Ue,ta,wa))},[Ho,wa]),pf=ce.useCallback(function(ta){return ce.createElement(Ue,ta,wa)},[wa]),Lu=Fi(["table"],"table"),Cc=ce.useMemo(function(){return rr||(Gl?ls==="max-content"?"auto":"fixed":Ga||Mu||Ro.some(function(ta){var Ma=ta.ellipsis;return Ma})?"fixed":"auto")},[Ga,Gl,Ro,rr,Mu]),vh,Jc={colWidths:na,columCount:Ro.length,stickyOffsets:Ts,onHeaderRow:Wi,fixHeader:Ga,scroll:qn},ml=ce.useMemo(function(){return zr?null:typeof ci=="function"?ci():ci},[zr,ci]),Od=ce.createElement(Xn,{data:si,measureColumnWidth:Ga||pa||Mu}),Nd=ce.createElement(Yr,{colWidths:Ro.map(function(ta){var Ma=ta.width;return Ma}),columns:Ro}),Ul=qr!=null?ce.createElement("caption",{className:"".concat(rn,"-caption")},qr):void 0,yh=(0,dt.Z)(nn,{data:!0}),Ad=(0,dt.Z)(nn,{aria:!0});if(Ga||Mu){var jd;typeof eo=="function"?(jd=eo(si,{scrollbarSize:Vh,ref:ts,onScroll:Yc}),Jc.colWidths=Ro.map(function(ta,Ma){var js=ta.width,ru=Ma===Ro.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(rn,"-body"))},ce.createElement(Lu,(0,we.Z)({style:(0,Fe.Z)((0,Fe.Z)({},gu),{},{tableLayout:Cc})},Ad),Ul,Nd,Od,!Ho&&wa&&ce.createElement(Ue,{stickyOffsets:Ts,flattenColumns:Ro,columns:Bo},wa)));var Ec=(0,Fe.Z)((0,Fe.Z)((0,Fe.Z)({noData:!si.length,maxContentScroll:pa&&ls==="max-content"},Jc),$s),{},{direction:tr,stickyClassName:xa,onScroll:Yc});vh=ce.createElement(ce.Fragment,null,Xr!==!1&&ce.createElement(li,(0,we.Z)({},Ec,{stickyTopOffset:Ku,className:"".concat(rn,"-header"),ref:Ps}),mh),jd,Ho&&Ho!=="top"&&ce.createElement(li,(0,we.Z)({},Ec,{stickyBottomOffset:Tl,className:"".concat(rn,"-summary"),ref:Wu}),pf),Mu&&ce.createElement(hn,{ref:oc,offsetScroll:Xo,scrollBodyRef:ts,onScroll:Yc,container:us}))}else vh=ce.createElement("div",{style:(0,Fe.Z)((0,Fe.Z)({},vs),gl),className:ze()("".concat(rn,"-content")),onScroll:Yc,ref:ts},ce.createElement(Lu,(0,we.Z)({style:(0,Fe.Z)((0,Fe.Z)({},gu),{},{tableLayout:Cc})},Ad),Ul,Nd,Xr!==!1&&ce.createElement(Fr,(0,we.Z)({},Jc,$s)),Od,wa&&ce.createElement(Ue,{stickyOffsets:Ts,flattenColumns:Ro,columns:Bo},wa)));var ol=ce.createElement("div",(0,we.Z)({className:ze()(rn,xn,(Gt={},(0,Re.Z)(Gt,"".concat(rn,"-rtl"),tr==="rtl"),(0,Re.Z)(Gt,"".concat(rn,"-ping-left"),ua),(0,Re.Z)(Gt,"".concat(rn,"-ping-right"),fa),(0,Re.Z)(Gt,"".concat(rn,"-layout-fixed"),rr==="fixed"),(0,Re.Z)(Gt,"".concat(rn,"-fixed-header"),Ga),(0,Re.Z)(Gt,"".concat(rn,"-fixed-column"),Gl),(0,Re.Z)(Gt,"".concat(rn,"-scroll-horizontal"),pa),(0,Re.Z)(Gt,"".concat(rn,"-has-fix-left"),Ro[0]&&Ro[0].fixed),(0,Re.Z)(Gt,"".concat(rn,"-has-fix-right"),Ro[Ro.length-1]&&Ro[Ro.length-1].fixed==="right"),Gt)),style:Bn,id:br,ref:qo},yh),kr&&ce.createElement(Mn,{className:"".concat(rn,"-title")},kr(si)),ce.createElement("div",{ref:ps,className:"".concat(rn,"-container")},vh),Er&&ce.createElement(Mn,{className:"".concat(rn,"-footer")},Er(si)));pa&&(ol=ce.createElement(He.Z,{onResize:Kp},ol));var Id=In(Ro,Ts,tr,Bo),cs=ce.useMemo(function(){return{scrollX:ls,prefixCls:rn,getComponent:Fi,scrollbarSize:Vh,direction:tr,fixedInfoList:Id,isSticky:Mu,supportSticky:kd,componentWidth:Oi,fixHeader:Ga,fixColumn:Gl,horizonScroll:pa,tableLayout:Cc,rowClassName:dn,expandedRowClassName:vo.expandedRowClassName,expandIcon:Aa,expandableType:Gi,expandRowByClick:vo.expandRowByClick,expandedRowRender:vo.expandedRowRender,onTriggerExpand:is,expandIconColumnIndex:vo.expandIconColumnIndex,indentSize:vo.indentSize,allColumnsFixedLeft:Ro.every(function(ta){return ta.fixed==="left"}),emptyNode:ml,columns:Bo,flattenColumns:Ro,onColumnResize:cf,hoverStartRow:wo,hoverEndRow:Qo,onHover:Ao,rowExpandable:vo.rowExpandable,onRow:ki,getRowKey:Yi,expandedKeys:Wo,childrenColumnName:Sa}},[ls,rn,Fi,Vh,tr,Id,Mu,kd,Oi,Ga,Gl,pa,Cc,dn,vo.expandedRowClassName,Aa,Gi,vo.expandRowByClick,vo.expandedRowRender,is,vo.expandIconColumnIndex,vo.indentSize,ml,Bo,Ro,cf,wo,Qo,Ao,vo.rowExpandable,ki,Yi,Wo,Sa]);return ce.createElement(Pe.Provider,{value:cs},ol)}function ii(_t){return le(Dr,_t)}var Br=ii();Br.EXPAND_COLUMN=it,Br.INTERNAL_HOOKS=xt,Br.Column=Zr,Br.ColumnGroup=yn,Br.Summary=We;var Cr=Br,oi=$e(45680),Tn=Ce(null),Ri=Ce(null);function Nn(_t,Gt,nn){var rn=Gt||1;return nn[_t+rn]-(nn[_t]||0)}function fi(_t){var Gt=_t.rowInfo,nn=_t.column,rn=_t.colIndex,xn=_t.indent,dn=_t.index,Bn=_t.renderIndex,Rn=_t.record,Dn=_t.style,qn=_t.className,rr=_t.inverse,tr=_t.getHeight,kr=nn.render,Er=nn.dataIndex,gr=nn.className,qr=nn.width,br=ye(Ri,["columnsOffset"]),Xr=br.columnsOffset,Vr=Nt(Gt,nn,rn,xn,dn),ci=Vr.key,ki=Vr.fixedInfo,Wi=Vr.appendCellNode,ti=Vr.additionalCellProps,Li=ti.style,ho=ti.colSpan,ui=ho===void 0?1:ho,Ci=ti.rowSpan,si=Ci===void 0?1:Ci,zr=rn-1,vi=Nn(zr,ui,Xr),Fi=ui>1?qr-vi:0,Yi=(0,Fe.Z)((0,Fe.Z)((0,Fe.Z)({},Li),Dn),{},{flex:"0 0 ".concat(vi,"px"),width:"".concat(vi,"px"),marginRight:Fi,pointerEvents:"auto"}),eo=ce.useMemo(function(){return rr?si<=1:ui===0||si===0||si>1},[si,ui,rr]);eo?Yi.visibility="hidden":rr&&(Yi.height=tr==null?void 0:tr(si));var ni=eo?function(){return null}:kr,po={};return(si===0||ui===0)&&(po.rowSpan=1,po.colSpan=1),ce.createElement(Vt,(0,we.Z)({className:ze()(gr,qn),ellipsis:nn.ellipsis,align:nn.align,scope:nn.rowScope,component:"div",prefixCls:Gt.prefixCls,key:ci,record:Rn,index:dn,renderIndex:Bn,dataIndex:Er,render:ni,shouldCellUpdate:nn.shouldCellUpdate},ki,{appendNode:Wi,additionalProps:(0,Fe.Z)((0,Fe.Z)({},ti),{},{style:Yi},po)}))}var xo=fi,zi=["data","index","className","rowKey","style","extra","getHeight"],Lo=ce.forwardRef(function(_t,Gt){var nn=_t.data,rn=_t.index,xn=_t.className,dn=_t.rowKey,Bn=_t.style,Rn=_t.extra,Dn=_t.getHeight,qn=(0,Xe.Z)(_t,zi),rr=nn.record,tr=nn.indent,kr=nn.index,Er=ye(Pe,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),gr=Er.scrollX,qr=Er.flattenColumns,br=Er.prefixCls,Xr=Er.fixColumn,Vr=Er.componentWidth,ci=At(rr,dn,rn,tr),ki=ci.rowSupportExpand,Wi=ci.expanded,ti=ci.rowProps,Li=ci.expandedRowRender,ho=ci.expandedRowClassName,ui;if(ki&&Wi){var Ci=Li(rr,rn,tr+1,Wi),si=ho==null?void 0:ho(rr,rn,tr),zr={};Xr&&(zr={style:(0,Re.Z)({},"--virtual-width","".concat(Vr,"px"))});var vi="".concat(br,"-expanded-row-cell");ui=ce.createElement("div",{className:ze()("".concat(br,"-expanded-row"),"".concat(br,"-expanded-row-level-").concat(tr+1),si)},ce.createElement(Vt,{component:"div",prefixCls:br,className:ze()(vi,(0,Re.Z)({},"".concat(vi,"-fixed"),Xr)),additionalProps:zr},Ci))}var Fi=(0,Fe.Z)((0,Fe.Z)({},Bn),{},{width:gr});Rn&&(Fi.position="absolute",Fi.pointerEvents="none");var Yi=ce.createElement("div",(0,we.Z)({},ti,qn,{ref:ki?null:Gt,className:ze()(xn,"".concat(br,"-row"),ti==null?void 0:ti.className,(0,Re.Z)({},"".concat(br,"-row-extra"),Rn)),style:(0,Fe.Z)((0,Fe.Z)({},Fi),ti==null?void 0:ti.style)}),qr.map(function(eo,ni){return ce.createElement(xo,{key:ni,rowInfo:ci,column:eo,colIndex:ni,indent:tr,index:rn,renderIndex:kr,record:rr,inverse:Rn,getHeight:Dn})}));return ki?ce.createElement("div",{ref:Gt},Yi,ui):Yi}),yo=ue(Lo),Ur=yo,$r=ce.forwardRef(function(_t,Gt){var nn=_t.data,rn=_t.onScroll,xn=ye(Pe,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","emptyNode","scrollX"]),dn=xn.flattenColumns,Bn=xn.onColumnResize,Rn=xn.getRowKey,Dn=xn.expandedKeys,qn=xn.prefixCls,rr=xn.childrenColumnName,tr=xn.emptyNode,kr=xn.scrollX,Er=ye(Tn),gr=Er.scrollY,qr=Er.listItemHeight,br=ce.useRef(),Xr=kt(nn,rr,Dn,Rn),Vr=ce.useMemo(function(){var ui=0;return dn.map(function(Ci){var si=Ci.width,zr=Ci.key;return ui+=si,[zr,si,ui]})},[dn]),ci=ce.useMemo(function(){return Vr.map(function(ui){return ui[2]})},[Vr]);ce.useEffect(function(){Vr.forEach(function(ui){var Ci=(0,ie.Z)(ui,2),si=Ci[0],zr=Ci[1];Bn(si,zr)})},[Vr]),ce.useImperativeHandle(Gt,function(){var ui={};return Object.defineProperty(ui,"scrollLeft",{get:function(){var si;return((si=br.current)===null||si===void 0?void 0:si.getScrollInfo().x)||0},set:function(si){var zr;(zr=br.current)===null||zr===void 0||zr.scrollTo({left:si})}}),ui});var ki=function(Ci,si){var zr,vi=(zr=Xr[si])===null||zr===void 0?void 0:zr.record,Fi=Ci.onCell;if(Fi){var Yi,eo=Fi(vi,si);return(Yi=eo==null?void 0:eo.rowSpan)!==null&&Yi!==void 0?Yi:1}return 1},Wi=function(Ci){var si=Ci.start,zr=Ci.end,vi=Ci.getSize,Fi=Ci.offsetY;if(zr<0)return null;for(var Yi=dn.filter(function(to){return ki(to,si)===0}),eo=si,ni=function(Zi){if(Yi=Yi.filter(function(no){return ki(no,Zi)===0}),!Yi.length)return eo=Zi,"break"},po=si;po>=0;po-=1){var wo=ni(po);if(wo==="break")break}for(var Qo=dn.filter(function(to){return ki(to,zr)!==1}),Ao=zr,Na=function(Zi){if(Qo=Qo.filter(function(no){return ki(no,Zi)!==1}),!Qo.length)return Ao=Math.max(Zi-1,zr),"break"},Ta=zr;Ta<Xr.length;Ta+=1){var vo=Na(Ta);if(vo==="break")break}for(var Gi=[],Wo=function(Zi){var no=Xr[Zi];if(!no)return"continue";dn.some(function(Oi){return ki(Oi,Zi)>1})&&Gi.push(Zi)},Aa=eo;Aa<=Ao;Aa+=1)var Sa=Wo(Aa);var is=Gi.map(function(to){var Zi=Xr[to],no=Rn(Zi.record,to),Oi=function(fo){var Bo=to+fo-1,Ro=Rn(Xr[Bo].record,Bo),bs=vi(no,Ro);return bs.bottom-bs.top},Zo=vi(no);return ce.createElement(Ur,{key:to,data:Zi,rowKey:no,index:to,style:{top:-Fi+Zo.top},extra:!0,getHeight:Oi})});return is},ti=ce.useMemo(function(){return{columnsOffset:ci}},[ci]),Li="".concat(qn,"-tbody"),ho;return Xr.length?ho=ce.createElement(oi.Z,{fullHeight:!1,ref:br,className:ze()(Li,"".concat(Li,"-virtual")),height:gr,itemHeight:qr||24,data:Xr,itemKey:function(Ci){return Rn(Ci.record)},scrollWidth:kr,onVirtualScroll:function(Ci){var si=Ci.x;rn({scrollLeft:si})},extraRender:Wi},function(ui,Ci,si){var zr=Rn(ui.record,Ci);return ce.createElement(Ur,(0,we.Z)({data:ui,rowKey:zr,index:Ci},si))}):ho=ce.createElement("div",{className:ze()("".concat(qn,"-placeholder"))},ce.createElement(Vt,{component:"div",prefixCls:qn},tr)),ce.createElement(Ri.Provider,{value:ti},ho)}),Ti=ue($r),Hi=Ti,cr=function(Gt,nn){var rn=nn.ref,xn=nn.onScroll;return ce.createElement(Hi,{ref:rn,data:Gt,onScroll:xn})},jt=100;function ji(_t){var Gt=_t.columns,nn=_t.scroll,rn=_t.prefixCls,xn=rn===void 0?Yn:rn,dn=_t.className,Bn=_t.listItemHeight,Rn=nn||{},Dn=Rn.x,qn=Rn.y;typeof Dn!="number"&&(Dn=((Gt||[]).length+1)*jt),typeof qn!="number"&&(qn=500);var rr=ce.useMemo(function(){return{scrollY:qn,listItemHeight:Bn}},[qn,Bn]);return ce.createElement(Tn.Provider,{value:rr},ce.createElement(Cr,(0,we.Z)({},_t,{className:ze()(dn,"".concat(xn,"-virtual")),scroll:(0,Fe.Z)((0,Fe.Z)({},nn),{},{x:Dn}),components:{body:cr},columns:Gt,internalHooks:xt,tailor:!0})))}function Rr(_t){return le(ji,_t)}var jr=Rr(),_i=null;function Ji(_t){return null}var _r=Ji;function Kr(_t){return null}var Pi=Kr,gi=$e(2738),Vi=$e(68031),io=$e(36355),Gr=$e(93891),Tr=$e(19716),Vn=$e(8628),ai=$e(31724),Qi=$e(58421),zo=$e(71418),Mo=$e(88088);function Uo(_t){return function(nn){let{prefixCls:rn,onExpand:xn,record:dn,expanded:Bn,expandable:Rn}=nn;const Dn=`${rn}-row-expand-icon`;return ce.createElement("button",{type:"button",onClick:qn=>{xn(dn,qn),qn.stopPropagation()},className:ze()(Dn,{[`${Dn}-spaced`]:!Rn,[`${Dn}-expanded`]:Rn&&Bn,[`${Dn}-collapsed`]:Rn&&!Bn}),"aria-label":Bn?_t.collapse:_t.expand,"aria-expanded":Bn})}}var ca=Uo;function Jo(_t,Gt){return"key"in _t&&_t.key!==void 0&&_t.key!==null?_t.key:_t.dataIndex?Array.isArray(_t.dataIndex)?_t.dataIndex.join("."):_t.dataIndex:Gt}function qa(_t,Gt){return Gt?`${Gt}-${_t}`:`${_t}`}function La(_t,Gt){return typeof _t=="function"?_t(Gt):_t}function es(_t,Gt){const nn=La(_t,Gt);return Object.prototype.toString.call(nn)==="[object Object]"?"":nn}var bn={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"},ma=bn,Ql=$e(7657),el=function(Gt,nn){return ce.createElement(Ql.Z,(0,we.Z)({},Gt,{ref:nn,icon:ma}))},So=ce.forwardRef(el),ro=So,va=$e(56762);function Io(_t){const Gt=ce.useRef(_t),nn=(0,va.Z)();return[()=>Gt.current,rn=>{Gt.current=rn,nn()}]}var qi=$e(3113),No=$e(24905),xs=$e(38854),wi=$e(64165),lo=$e(20834),ao=$e(40875),Mr=$e(5112),Ba=$e(17574),Ra=$e(47472),Cs=$e(92832);function Il(_t){let{value:Gt,onChange:nn,filterSearch:rn,tablePrefixCls:xn,locale:dn}=_t;return rn?ce.createElement("div",{className:`${xn}-filter-dropdown-search`},ce.createElement(Cs.default,{prefix:ce.createElement(Ra.Z,null),placeholder:dn.filterSearchPlaceholder,onChange:nn,value:Gt,htmlSize:1,className:`${xn}-filter-dropdown-search-input`})):null}var ql=Il,Sr=$e(10228);const aa=_t=>{const{keyCode:Gt}=_t;Gt===Sr.Z.ENTER&&_t.stopPropagation()};var Pl=ce.forwardRef((_t,Gt)=>ce.createElement("div",{className:_t.className,onClick:nn=>nn.stopPropagation(),onKeyDown:aa,ref:Gt},_t.children));function Dl(_t){let Gt=[];return(_t||[]).forEach(nn=>{let{value:rn,children:xn}=nn;Gt.push(rn),xn&&(Gt=[].concat((0,Or.Z)(Gt),(0,Or.Z)(Dl(xn))))}),Gt}function Fl(_t){return _t.some(Gt=>{let{children:nn}=Gt;return nn})}function Di(_t,Gt){return typeof Gt=="string"||typeof Gt=="number"?Gt==null?void 0:Gt.toString().toLowerCase().includes(_t.trim().toLowerCase()):!1}function mc(_t){let{filters:Gt,prefixCls:nn,filteredKeys:rn,filterMultiple:xn,searchValue:dn,filterSearch:Bn}=_t;return Gt.map((Rn,Dn)=>{const qn=String(Rn.value);if(Rn.children)return{key:qn||Dn,label:Rn.text,popupClassName:`${nn}-dropdown-submenu`,children:mc({filters:Rn.children,prefixCls:nn,filteredKeys:rn,filterMultiple:xn,searchValue:dn,filterSearch:Bn})};const rr=xn?No.default:Mr.ZP,tr={key:Rn.value!==void 0?qn:Dn,label:ce.createElement(ce.Fragment,null,ce.createElement(rr,{checked:rn.includes(qn)}),ce.createElement("span",null,Rn.text))};return dn.trim()?typeof Bn=="function"?Bn(dn,Rn)?tr:null:Di(dn,Rn.text)?tr:null:tr})}function tl(_t){var Gt,nn;const{tablePrefixCls:rn,prefixCls:xn,column:dn,dropdownPrefixCls:Bn,columnKey:Rn,filterMultiple:Dn,filterMode:qn="menu",filterSearch:rr=!1,filterState:tr,triggerFilter:kr,locale:Er,children:gr,getPopupContainer:qr}=_t,{filterDropdownOpen:br,onFilterDropdownOpenChange:Xr,filterResetToDefaultFilteredValue:Vr,defaultFilteredValue:ci,filterDropdownVisible:ki,onFilterDropdownVisibleChange:Wi}=dn,[ti,Li]=ce.useState(!1),ho=!!(tr&&(!((Gt=tr.filteredKeys)===null||Gt===void 0)&&Gt.length||tr.forceFiltered)),ui=Ni=>{Li(Ni),Xr==null||Xr(Ni),Wi==null||Wi(Ni)},Ci=(nn=br!=null?br:ki)!==null&&nn!==void 0?nn:ti,si=tr==null?void 0:tr.filteredKeys,[zr,vi]=Io(si||[]),Fi=Ni=>{let{selectedKeys:fo}=Ni;vi(fo)},Yi=(Ni,fo)=>{let{node:Bo,checked:Ro}=fo;Fi(Dn?{selectedKeys:Ni}:{selectedKeys:Ro&&Bo.key?[Bo.key]:[]})};ce.useEffect(()=>{ti&&Fi({selectedKeys:si||[]})},[si]);const[eo,ni]=ce.useState([]),po=Ni=>{ni(Ni)},[wo,Qo]=ce.useState(""),Ao=Ni=>{const{value:fo}=Ni.target;Qo(fo)};ce.useEffect(()=>{ti||Qo("")},[ti]);const Na=Ni=>{const fo=Ni&&Ni.length?Ni:null;if(fo===null&&(!tr||!tr.filteredKeys)||(0,ve.Z)(fo,tr==null?void 0:tr.filteredKeys,!0))return null;kr({column:dn,key:Rn,filteredKeys:fo})},Ta=()=>{ui(!1),Na(zr())},vo=function(){let{confirm:Ni,closeDropdown:fo}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};Ni&&Na([]),fo&&ui(!1),Qo(""),vi(Vr?(ci||[]).map(Bo=>String(Bo)):[])},Gi=function(){let{closeDropdown:Ni}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};Ni&&ui(!1),Na(zr())},Wo=Ni=>{Ni&&si!==void 0&&vi(si||[]),ui(Ni),!Ni&&!dn.filterDropdown&&Ta()},Aa=ze()({[`${Bn}-menu-without-submenu`]:!Fl(dn.filters||[])}),Sa=Ni=>{if(Ni.target.checked){const fo=Dl(dn==null?void 0:dn.filters).map(Bo=>String(Bo));vi(fo)}else vi([])},is=Ni=>{let{filters:fo}=Ni;return(fo||[]).map((Bo,Ro)=>{const bs=String(Bo.value),ls={title:Bo.text,key:Bo.value!==void 0?bs:Ro};return Bo.children&&(ls.children=is({filters:Bo.children})),ls})},to=Ni=>{var fo;return Object.assign(Object.assign({},Ni),{text:Ni.title,value:Ni.key,children:((fo=Ni.children)===null||fo===void 0?void 0:fo.map(Bo=>to(Bo)))||[]})};let Zi;if(typeof dn.filterDropdown=="function")Zi=dn.filterDropdown({prefixCls:`${Bn}-custom`,setSelectedKeys:Ni=>Fi({selectedKeys:Ni}),selectedKeys:zr(),confirm:Gi,clearFilters:vo,filters:dn.filters,visible:Ci,close:()=>{ui(!1)}});else if(dn.filterDropdown)Zi=dn.filterDropdown;else{const Ni=zr()||[],fo=()=>(dn.filters||[]).length===0?ce.createElement(wi.Z,{image:wi.Z.PRESENTED_IMAGE_SIMPLE,description:Er.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):qn==="tree"?ce.createElement(ce.Fragment,null,ce.createElement(ql,{filterSearch:rr,value:wo,onChange:Ao,tablePrefixCls:rn,locale:Er}),ce.createElement("div",{className:`${rn}-filter-dropdown-tree`},Dn?ce.createElement(No.default,{checked:Ni.length===Dl(dn.filters).length,indeterminate:Ni.length>0&&Ni.length<Dl(dn.filters).length,className:`${rn}-filter-dropdown-checkall`,onChange:Sa},Er.filterCheckall):null,ce.createElement(Ba.default,{checkable:!0,selectable:!1,blockNode:!0,multiple:Dn,checkStrictly:!Dn,className:`${Bn}-menu`,onCheck:Yi,checkedKeys:Ni,selectedKeys:Ni,showIcon:!1,treeData:is({filters:dn.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:wo.trim()?Ro=>typeof rr=="function"?rr(wo,to(Ro)):Di(wo,Ro.title):void 0}))):ce.createElement(ce.Fragment,null,ce.createElement(ql,{filterSearch:rr,value:wo,onChange:Ao,tablePrefixCls:rn,locale:Er}),ce.createElement(lo.default,{selectable:!0,multiple:Dn,prefixCls:`${Bn}-menu`,className:Aa,onSelect:Fi,onDeselect:Fi,selectedKeys:Ni,getPopupContainer:qr,openKeys:eo,onOpenChange:po,items:mc({filters:dn.filters||[],filterSearch:rr,prefixCls:xn,filteredKeys:zr(),filterMultiple:Dn,searchValue:wo})})),Bo=()=>Vr?(0,ve.Z)((ci||[]).map(Ro=>String(Ro)),Ni,!0):Ni.length===0;Zi=ce.createElement(ce.Fragment,null,fo(),ce.createElement("div",{className:`${xn}-dropdown-btns`},ce.createElement(qi.ZP,{type:"link",size:"small",disabled:Bo(),onClick:()=>vo()},Er.filterReset),ce.createElement(qi.ZP,{type:"primary",size:"small",onClick:Ta},Er.filterConfirm)))}dn.filterDropdown&&(Zi=ce.createElement(ao.J,{selectable:void 0},Zi));const no=()=>ce.createElement(Pl,{className:`${xn}-dropdown`},Zi);let Oi;typeof dn.filterIcon=="function"?Oi=dn.filterIcon(ho):dn.filterIcon?Oi=dn.filterIcon:Oi=ce.createElement(ro,null);const{direction:Zo}=ce.useContext(io.E_);return ce.createElement("div",{className:`${xn}-column`},ce.createElement("span",{className:`${rn}-column-title`},gr),ce.createElement(xs.Z,{dropdownRender:no,trigger:["click"],open:Ci,onOpenChange:Wo,getPopupContainer:qr,placement:Zo==="rtl"?"bottomLeft":"bottomRight"},ce.createElement("span",{role:"button",tabIndex:-1,className:ze()(`${xn}-trigger`,{active:ho}),onClick:Ni=>{Ni.stopPropagation()}},Oi)))}var nl=tl;function As(_t,Gt,nn){let rn=[];return(_t||[]).forEach((xn,dn)=>{var Bn;const Rn=qa(dn,nn);if(xn.filters||"filterDropdown"in xn||"onFilter"in xn)if("filteredValue"in xn){let Dn=xn.filteredValue;"filterDropdown"in xn||(Dn=(Bn=Dn==null?void 0:Dn.map(String))!==null&&Bn!==void 0?Bn:Dn),rn.push({column:xn,key:Jo(xn,Rn),filteredKeys:Dn,forceFiltered:xn.filtered})}else rn.push({column:xn,key:Jo(xn,Rn),filteredKeys:Gt&&xn.defaultFilteredValue?xn.defaultFilteredValue:void 0,forceFiltered:xn.filtered});"children"in xn&&(rn=[].concat((0,Or.Z)(rn),(0,Or.Z)(As(xn.children,Gt,Rn))))}),rn}function Eu(_t,Gt,nn,rn,xn,dn,Bn,Rn){return nn.map((Dn,qn)=>{const rr=qa(qn,Rn),{filterMultiple:tr=!0,filterMode:kr,filterSearch:Er}=Dn;let gr=Dn;if(gr.filters||gr.filterDropdown){const qr=Jo(gr,rr),br=rn.find(Xr=>{let{key:Vr}=Xr;return qr===Vr});gr=Object.assign(Object.assign({},gr),{title:Xr=>ce.createElement(nl,{tablePrefixCls:_t,prefixCls:`${_t}-filter`,dropdownPrefixCls:Gt,column:gr,columnKey:qr,filterState:br,filterMultiple:tr,filterMode:kr,filterSearch:Er,triggerFilter:dn,locale:xn,getPopupContainer:Bn},La(Dn.title,Xr))})}return"children"in gr&&(gr=Object.assign(Object.assign({},gr),{children:Eu(_t,Gt,gr.children,rn,xn,dn,Bn,rr)})),gr})}function Ru(_t){const Gt={};return _t.forEach(nn=>{let{key:rn,filteredKeys:xn,column:dn}=nn;const{filters:Bn,filterDropdown:Rn}=dn;if(Rn)Gt[rn]=xn||null;else if(Array.isArray(xn)){const Dn=Dl(Bn);Gt[rn]=Dn.filter(qn=>xn.includes(String(qn)))}else Gt[rn]=null}),Gt}function _s(_t,Gt){return Gt.reduce((nn,rn)=>{const{column:{onFilter:xn,filters:dn},filteredKeys:Bn}=rn;return xn&&Bn&&Bn.length?nn.filter(Rn=>Bn.some(Dn=>{const qn=Dl(dn),rr=qn.findIndex(kr=>String(kr)===String(Dn)),tr=rr!==-1?qn[rr]:Dn;return xn(tr,Rn)})):nn},_t)}const dl=_t=>_t.flatMap(Gt=>"children"in Gt?[Gt].concat((0,Or.Z)(dl(Gt.children||[]))):[Gt]);function $c(_t){let{prefixCls:Gt,dropdownPrefixCls:nn,mergedColumns:rn,onFilterChange:xn,getPopupContainer:dn,locale:Bn}=_t;const Rn=ce.useMemo(()=>dl(rn||[]),[rn]),[Dn,qn]=ce.useState(()=>As(Rn,!0)),rr=ce.useMemo(()=>{const gr=As(Rn,!1);if(gr.length===0)return gr;let qr=!0,br=!0;if(gr.forEach(Xr=>{let{filteredKeys:Vr}=Xr;Vr!==void 0?qr=!1:br=!1}),qr){const Xr=(Rn||[]).map((Vr,ci)=>Jo(Vr,qa(ci)));return Dn.filter(Vr=>{let{key:ci}=Vr;return Xr.includes(ci)}).map(Vr=>{const ci=Rn[Xr.findIndex(ki=>ki===Vr.key)];return Object.assign(Object.assign({},Vr),{column:Object.assign(Object.assign({},Vr.column),ci),forceFiltered:ci.filtered})})}return gr},[Rn,Dn]),tr=ce.useMemo(()=>Ru(rr),[rr]),kr=gr=>{const qr=rr.filter(br=>{let{key:Xr}=br;return Xr!==gr.key});qr.push(gr),qn(qr),xn(Ru(qr),qr)};return[gr=>Eu(Gt,nn,gr,rr,Bn,kr,dn),rr,tr]}var hh=$c;function Gc(_t,Gt,nn){const rn=ce.useRef({});function xn(dn){if(!rn.current||rn.current.data!==_t||rn.current.childrenColumnName!==Gt||rn.current.getRowKey!==nn){let Rn=function(Dn){Dn.forEach((qn,rr)=>{const tr=nn(qn,rr);Bn.set(tr,qn),qn&&typeof qn=="object"&&Gt in qn&&Rn(qn[Gt]||[])})};const Bn=new Map;Rn(_t),rn.current={data:_t,childrenColumnName:Gt,kvMap:Bn,getRowKey:nn}}return rn.current.kvMap.get(dn)}return[xn]}var Hh=$e(50371),Hc=function(_t,Gt){var nn={};for(var rn in _t)Object.prototype.hasOwnProperty.call(_t,rn)&&Gt.indexOf(rn)<0&&(nn[rn]=_t[rn]);if(_t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var xn=0,rn=Object.getOwnPropertySymbols(_t);xn<rn.length;xn++)Gt.indexOf(rn[xn])<0&&Object.prototype.propertyIsEnumerable.call(_t,rn[xn])&&(nn[rn[xn]]=_t[rn[xn]]);return nn};const vc=10;function _u(_t,Gt){const nn={current:_t.current,pageSize:_t.pageSize};return Object.keys(Gt&&typeof Gt=="object"?Gt:{}).forEach(xn=>{const dn=_t[xn];typeof dn!="function"&&(nn[xn]=dn)}),nn}function Bl(_t,Gt,nn){const rn=nn&&typeof nn=="object"?nn:{},{total:xn=0}=rn,dn=Hc(rn,["total"]),[Bn,Rn]=(0,ce.useState)(()=>({current:"defaultCurrent"in dn?dn.defaultCurrent:1,pageSize:"defaultPageSize"in dn?dn.defaultPageSize:vc})),Dn=(0,Hh.Z)(Bn,dn,{total:xn>0?xn:_t}),qn=Math.ceil((xn||_t)/Dn.pageSize);Dn.current>qn&&(Dn.current=qn||1);const rr=(kr,Er)=>{Rn({current:kr!=null?kr:1,pageSize:Er||Dn.pageSize})},tr=(kr,Er)=>{var gr;nn&&((gr=nn.onChange)===null||gr===void 0||gr.call(nn,kr,Er)),rr(kr,Er),Gt(kr,Er||(Dn==null?void 0:Dn.pageSize))};return nn===!1?[{},()=>{}]:[Object.assign(Object.assign({},Dn),{onChange:tr}),rr]}var dh=Bl,Uc=$e(84105),yc=$e(35654),oo=$e(90782),Do=$e(71430),Es=$e(18929);const Xa={},_a="SELECT_ALL",ha="SELECT_INVERT",Ea="SELECT_NONE",Ka=[],za=(_t,Gt)=>{let nn=[];return(Gt||[]).forEach(rn=>{nn.push(rn),rn&&typeof rn=="object"&&_t in rn&&(nn=[].concat((0,Or.Z)(nn),(0,Or.Z)(za(_t,rn[_t]))))}),nn};var Rl=(_t,Gt)=>{const{preserveSelectedRowKeys:nn,selectedRowKeys:rn,defaultSelectedRowKeys:xn,getCheckboxProps:dn,onChange:Bn,onSelect:Rn,onSelectAll:Dn,onSelectInvert:qn,onSelectNone:rr,onSelectMultiple:tr,columnWidth:kr,type:Er,selections:gr,fixed:qr,renderCell:br,hideSelectAll:Xr,checkStrictly:Vr=!0}=Gt||{},{prefixCls:ci,data:ki,pageData:Wi,getRecordByKey:ti,getRowKey:Li,expandType:ho,childrenColumnName:ui,locale:Ci,getPopupContainer:si}=_t,[zr,vi]=(0,Es.Z)(rn||xn||Ka,{value:rn}),Fi=ce.useRef(new Map),Yi=(0,ce.useCallback)(to=>{if(nn){const Zi=new Map;to.forEach(no=>{let Oi=ti(no);!Oi&&Fi.current.has(no)&&(Oi=Fi.current.get(no)),Zi.set(no,Oi)}),Fi.current=Zi}},[ti,nn]);ce.useEffect(()=>{Yi(zr)},[zr]);const{keyEntities:eo}=(0,ce.useMemo)(()=>{if(Vr)return{keyEntities:null};let to=ki;if(nn){const Zi=new Set(ki.map((Oi,Zo)=>Li(Oi,Zo))),no=Array.from(Fi.current).reduce((Oi,Zo)=>{let[Ni,fo]=Zo;return Zi.has(Ni)?Oi:Oi.concat(fo)},[]);to=[].concat((0,Or.Z)(to),(0,Or.Z)(no))}return(0,Do.I8)(to,{externalGetKey:Li,childrenPropName:ui})},[ki,Li,Vr,ui,nn]),ni=(0,ce.useMemo)(()=>za(ui,Wi),[ui,Wi]),po=(0,ce.useMemo)(()=>{const to=new Map;return ni.forEach((Zi,no)=>{const Oi=Li(Zi,no),Zo=(dn?dn(Zi):null)||{};to.set(Oi,Zo)}),to},[ni,Li,dn]),wo=(0,ce.useCallback)(to=>{var Zi;return!!(!((Zi=po.get(Li(to)))===null||Zi===void 0)&&Zi.disabled)},[po,Li]),[Qo,Ao]=(0,ce.useMemo)(()=>{if(Vr)return[zr||[],[]];const{checkedKeys:to,halfCheckedKeys:Zi}=(0,oo.S)(zr,!0,eo,wo);return[to||[],Zi]},[zr,Vr,eo,wo]),Na=(0,ce.useMemo)(()=>{const to=Er==="radio"?Qo.slice(0,1):Qo;return new Set(to)},[Qo,Er]),Ta=(0,ce.useMemo)(()=>Er==="radio"?new Set:new Set(Ao),[Ao,Er]),[vo,Gi]=(0,ce.useState)(null);ce.useEffect(()=>{Gt||vi(Ka)},[!!Gt]);const Wo=(0,ce.useCallback)((to,Zi)=>{let no,Oi;Yi(to),nn?(no=to,Oi=to.map(Zo=>Fi.current.get(Zo))):(no=[],Oi=[],to.forEach(Zo=>{const Ni=ti(Zo);Ni!==void 0&&(no.push(Zo),Oi.push(Ni))})),vi(no),Bn==null||Bn(no,Oi,{type:Zi})},[vi,ti,Bn,nn]),Aa=(0,ce.useCallback)((to,Zi,no,Oi)=>{if(Rn){const Zo=no.map(Ni=>ti(Ni));Rn(ti(to),Zi,Zo,Oi)}Wo(no,"single")},[Rn,ti,Wo]),Sa=(0,ce.useMemo)(()=>!gr||Xr?null:(gr===!0?[_a,ha,Ea]:gr).map(Zi=>Zi===_a?{key:"all",text:Ci.selectionAll,onSelect(){Wo(ki.map((no,Oi)=>Li(no,Oi)).filter(no=>{const Oi=po.get(no);return!(Oi!=null&&Oi.disabled)||Na.has(no)}),"all")}}:Zi===ha?{key:"invert",text:Ci.selectInvert,onSelect(){const no=new Set(Na);Wi.forEach((Zo,Ni)=>{const fo=Li(Zo,Ni),Bo=po.get(fo);Bo!=null&&Bo.disabled||(no.has(fo)?no.delete(fo):no.add(fo))});const Oi=Array.from(no);qn&&qn(Oi),Wo(Oi,"invert")}}:Zi===Ea?{key:"none",text:Ci.selectNone,onSelect(){rr==null||rr(),Wo(Array.from(Na).filter(no=>{const Oi=po.get(no);return Oi==null?void 0:Oi.disabled}),"none")}}:Zi).map(Zi=>Object.assign(Object.assign({},Zi),{onSelect:function(){for(var no,Oi,Zo=arguments.length,Ni=new Array(Zo),fo=0;fo<Zo;fo++)Ni[fo]=arguments[fo];(Oi=Zi.onSelect)===null||Oi===void 0||(no=Oi).call.apply(no,[Zi].concat(Ni)),Gi(null)}})),[gr,Na,Wi,Li,qn,Wo]);return[(0,ce.useCallback)(to=>{var Zi;if(!Gt)return to.filter(ea=>ea!==Xa);let no=(0,Or.Z)(to);const Oi=new Set(Na),Zo=ni.map(Li).filter(ea=>!po.get(ea).disabled),Ni=Zo.every(ea=>Oi.has(ea)),fo=Zo.some(ea=>Oi.has(ea)),Bo=()=>{const ea=[];Ni?Zo.forEach(ua=>{Oi.delete(ua),ea.push(ua)}):Zo.forEach(ua=>{Oi.has(ua)||(Oi.add(ua),ea.push(ua))});const ia=Array.from(Oi);Dn==null||Dn(!Ni,ia.map(ua=>ti(ua)),ea.map(ua=>ti(ua))),Wo(ia,"all"),Gi(null)};let Ro;if(Er!=="radio"){let ea;if(Sa){const ko={getPopupContainer:si,items:Sa.map((fa,ms)=>{const{key:pl,text:zl,onSelect:El}=fa;return{key:pl!=null?pl:ms,onClick:()=>{El==null||El(Zo)},label:zl}})};ea=ce.createElement("div",{className:`${ci}-selection-extra`},ce.createElement(xs.Z,{menu:ko,getPopupContainer:si},ce.createElement("span",null,ce.createElement(Uc.Z,null))))}const ia=ni.map((ko,fa)=>{const ms=Li(ko,fa),pl=po.get(ms)||{};return Object.assign({checked:Oi.has(ms)},pl)}).filter(ko=>{let{disabled:fa}=ko;return fa}),ua=!!ia.length&&ia.length===ni.length,Za=ua&&ia.every(ko=>{let{checked:fa}=ko;return fa}),gs=ua&&ia.some(ko=>{let{checked:fa}=ko;return fa});Ro=!Xr&&ce.createElement("div",{className:`${ci}-selection`},ce.createElement(No.default,{checked:ua?Za:!!ni.length&&Ni,indeterminate:ua?!Za&&gs:!Ni&&fo,onChange:Bo,disabled:ni.length===0||ua,"aria-label":ea?"Custom selection":"Select all",skipGroup:!0}),ea)}let bs;Er==="radio"?bs=(ea,ia,ua)=>{const Za=Li(ia,ua),gs=Oi.has(Za);return{node:ce.createElement(Mr.ZP,Object.assign({},po.get(Za),{checked:gs,onClick:ko=>ko.stopPropagation(),onChange:ko=>{Oi.has(Za)||Aa(Za,!0,[Za],ko.nativeEvent)}})),checked:gs}}:bs=(ea,ia,ua)=>{var Za;const gs=Li(ia,ua),ko=Oi.has(gs),fa=Ta.has(gs),ms=po.get(gs);let pl;return ho==="nest"?pl=fa:pl=(Za=ms==null?void 0:ms.indeterminate)!==null&&Za!==void 0?Za:fa,{node:ce.createElement(No.default,Object.assign({},ms,{indeterminate:pl,checked:ko,skipGroup:!0,onClick:zl=>zl.stopPropagation(),onChange:zl=>{let{nativeEvent:El}=zl;const{shiftKey:eu}=El;let tu=-1,$l=-1;if(eu&&Vr){const na=new Set([vo,gs]);Zo.some((Ts,Ga)=>{if(na.has(Ts))if(tu===-1)tu=Ga;else return $l=Ga,!0;return!1})}if($l!==-1&&tu!==$l&&Vr){const na=Zo.slice(tu,$l+1),Ts=[];ko?na.forEach(pa=>{Oi.has(pa)&&(Ts.push(pa),Oi.delete(pa))}):na.forEach(pa=>{Oi.has(pa)||(Ts.push(pa),Oi.add(pa))});const Ga=Array.from(Oi);tr==null||tr(!ko,Ga.map(pa=>ti(pa)),Ts.map(pa=>ti(pa))),Wo(Ga,"multiple")}else{const na=Qo;if(Vr){const Ts=ko?(0,yc._5)(na,gs):(0,yc.L0)(na,gs);Aa(gs,!ko,Ts,El)}else{const Ts=(0,oo.S)([].concat((0,Or.Z)(na),[gs]),!0,eo,wo),{checkedKeys:Ga,halfCheckedKeys:pa}=Ts;let Gl=Ga;if(ko){const oc=new Set(Ga);oc.delete(gs),Gl=(0,oo.S)(Array.from(oc),{checked:!1,halfCheckedKeys:pa},eo,wo).checkedKeys}Aa(gs,!ko,Gl,El)}}Gi(ko?null:gs)}})),checked:ko}};const ls=(ea,ia,ua)=>{const{node:Za,checked:gs}=bs(ea,ia,ua);return br?br(gs,ia,ua,Za):Za};if(!no.includes(Xa))if(no.findIndex(ea=>{var ia;return((ia=ea[dr])===null||ia===void 0?void 0:ia.columnType)==="EXPAND_COLUMN"})===0){const[ea,...ia]=no;no=[ea,Xa].concat((0,Or.Z)(ia))}else no=[Xa].concat((0,Or.Z)(no));const $s=no.indexOf(Xa);no=no.filter((ea,ia)=>ea!==Xa||ia===$s);const qo=no[$s-1],Ps=no[$s+1];let ts=qr;ts===void 0&&((Ps==null?void 0:Ps.fixed)!==void 0?ts=Ps.fixed:(qo==null?void 0:qo.fixed)!==void 0&&(ts=qo.fixed)),ts&&qo&&((Zi=qo[dr])===null||Zi===void 0?void 0:Zi.columnType)==="EXPAND_COLUMN"&&qo.fixed===void 0&&(qo.fixed=ts);const ps=ze()(`${ci}-selection-col`,{[`${ci}-selection-col-with-dropdown`]:gr&&Er==="checkbox"}),Wu={fixed:ts,width:kr,className:`${ci}-selection-column`,title:Gt.columnTitle||Ro,render:ls,onCell:Gt.onCell,[dr]:{className:ps}};return no.map(ea=>ea===Xa?Wu:ea)},[Li,ni,Gt,Qo,Na,Ta,kr,Sa,ho,vo,po,tr,Aa,wo]),Na]},ka=$e(89489),wd=$e(59477),bd=$e(6848);const Wc="ascend",pi="descend";function fh(_t){return typeof _t.sorter=="object"&&typeof _t.sorter.multiple=="number"?_t.sorter.multiple:!1}function en(_t){return typeof _t=="function"?_t:_t&&typeof _t=="object"&&_t.compare?_t.compare:!1}function Zn(_t,Gt){return Gt?_t[_t.indexOf(Gt)+1]:_t[0]}function Pd(_t,Gt,nn){let rn=[];function xn(dn,Bn){rn.push({column:dn,key:Jo(dn,Bn),multiplePriority:fh(dn),sortOrder:dn.sortOrder})}return(_t||[]).forEach((dn,Bn)=>{const Rn=qa(Bn,nn);dn.children?("sortOrder"in dn&&xn(dn,Rn),rn=[].concat((0,Or.Z)(rn),(0,Or.Z)(Pd(dn.children,Gt,Rn)))):dn.sorter&&("sortOrder"in dn?xn(dn,Rn):Gt&&dn.defaultSortOrder&&rn.push({column:dn,key:Jo(dn,Rn),multiplePriority:fh(dn),sortOrder:dn.defaultSortOrder}))}),rn}function af(_t,Gt,nn,rn,xn,dn,Bn,Rn){return(Gt||[]).map((Dn,qn)=>{const rr=qa(qn,Rn);let tr=Dn;if(tr.sorter){const kr=tr.sortDirections||xn,Er=tr.showSorterTooltip===void 0?Bn:tr.showSorterTooltip,gr=Jo(tr,rr),qr=nn.find(ho=>{let{key:ui}=ho;return ui===gr}),br=qr?qr.sortOrder:null,Xr=Zn(kr,br);let Vr;if(Dn.sortIcon)Vr=Dn.sortIcon({sortOrder:br});else{const ho=kr.includes(Wc)&&ce.createElement(wd.Z,{className:ze()(`${_t}-column-sorter-up`,{active:br===Wc})}),ui=kr.includes(pi)&&ce.createElement(ka.Z,{className:ze()(`${_t}-column-sorter-down`,{active:br===pi})});Vr=ce.createElement("span",{className:ze()(`${_t}-column-sorter`,{[`${_t}-column-sorter-full`]:!!(ho&&ui)})},ce.createElement("span",{className:`${_t}-column-sorter-inner`,"aria-hidden":"true"},ho,ui))}const{cancelSort:ci,triggerAsc:ki,triggerDesc:Wi}=dn||{};let ti=ci;Xr===pi?ti=Wi:Xr===Wc&&(ti=ki);const Li=typeof Er=="object"?Er:{title:ti};tr=Object.assign(Object.assign({},tr),{className:ze()(tr.className,{[`${_t}-column-sort`]:br}),title:ho=>{const ui=ce.createElement("div",{className:`${_t}-column-sorters`},ce.createElement("span",{className:`${_t}-column-title`},La(Dn.title,ho)),Vr);return Er?ce.createElement(bd.Z,Object.assign({},Li),ui):ui},onHeaderCell:ho=>{const ui=Dn.onHeaderCell&&Dn.onHeaderCell(ho)||{},Ci=ui.onClick,si=ui.onKeyDown;ui.onClick=Fi=>{rn({column:Dn,key:gr,sortOrder:Xr,multiplePriority:fh(Dn)}),Ci==null||Ci(Fi)},ui.onKeyDown=Fi=>{Fi.keyCode===Sr.Z.ENTER&&(rn({column:Dn,key:gr,sortOrder:Xr,multiplePriority:fh(Dn)}),si==null||si(Fi))};const zr=es(Dn.title,{}),vi=zr==null?void 0:zr.toString();return br?ui["aria-sort"]=br==="ascend"?"ascending":"descending":ui["aria-label"]=vi||"",ui.className=ze()(ui.className,`${_t}-column-has-sorters`),ui.tabIndex=0,Dn.ellipsis&&(ui.title=(zr!=null?zr:"").toString()),ui}})}return"children"in tr&&(tr=Object.assign(Object.assign({},tr),{children:af(_t,tr.children,nn,rn,xn,dn,Bn,rr)})),tr})}function $u(_t){const{column:Gt,sortOrder:nn}=_t;return{column:Gt,order:nn,field:Gt.dataIndex,columnKey:Gt.key}}function Gu(_t){const Gt=_t.filter(nn=>{let{sortOrder:rn}=nn;return rn}).map($u);return Gt.length===0&&_t.length?Object.assign(Object.assign({},$u(_t[_t.length-1])),{column:void 0}):Gt.length<=1?Gt[0]||{}:Gt}function ic(_t,Gt,nn){const rn=Gt.slice().sort((Bn,Rn)=>Rn.multiplePriority-Bn.multiplePriority),xn=_t.slice(),dn=rn.filter(Bn=>{let{column:{sorter:Rn},sortOrder:Dn}=Bn;return en(Rn)&&Dn});return dn.length?xn.sort((Bn,Rn)=>{for(let Dn=0;Dn<dn.length;Dn+=1){const qn=dn[Dn],{column:{sorter:rr},sortOrder:tr}=qn,kr=en(rr);if(kr&&tr){const Er=kr(Bn,Rn,tr);if(Er!==0)return tr===Wc?Er:-Er}}return 0}).map(Bn=>{const Rn=Bn[nn];return Rn?Object.assign(Object.assign({},Bn),{[nn]:ic(Rn,Gt,nn)}):Bn}):xn}function Cd(_t){let{prefixCls:Gt,mergedColumns:nn,onSorterChange:rn,sortDirections:xn,tableLocale:dn,showSorterTooltip:Bn}=_t;const[Rn,Dn]=ce.useState(Pd(nn,!0)),qn=ce.useMemo(()=>{let gr=!0;const qr=Pd(nn,!1);if(!qr.length)return Rn;const br=[];function Xr(ci){gr?br.push(ci):br.push(Object.assign(Object.assign({},ci),{sortOrder:null}))}let Vr=null;return qr.forEach(ci=>{Vr===null?(Xr(ci),ci.sortOrder&&(ci.multiplePriority===!1?gr=!1:Vr=!0)):(Vr&&ci.multiplePriority!==!1||(gr=!1),Xr(ci))}),br},[nn,Rn]),rr=ce.useMemo(()=>{const gr=qn.map(qr=>{let{column:br,sortOrder:Xr}=qr;return{column:br,order:Xr}});return{sortColumns:gr,sortColumn:gr[0]&&gr[0].column,sortOrder:gr[0]&&gr[0].order}},[qn]);function tr(gr){let qr;gr.multiplePriority===!1||!qn.length||qn[0].multiplePriority===!1?qr=[gr]:qr=[].concat((0,Or.Z)(qn.filter(br=>{let{key:Xr}=br;return Xr!==gr.key})),[gr]),Dn(qr),rn(Gu(qr),qr)}return[gr=>af(Gt,gr,qn,tr,xn,dn,Bn),qn,rr,()=>Gu(qn)]}function ph(_t,Gt){return _t.map(nn=>{const rn=Object.assign({},nn);return rn.title=La(nn.title,Gt),"children"in rn&&(rn.children=ph(rn.children,Gt)),rn})}function $a(_t){return[ce.useCallback(nn=>ph(nn,_t),[_t])]}var Ui=ii((_t,Gt)=>{const{_renderTimes:nn}=_t,{_renderTimes:rn}=Gt;return nn!==rn}),rl=Rr((_t,Gt)=>{const{_renderTimes:nn}=_t,{_renderTimes:rn}=Gt;return nn!==rn}),zs=$e(64993),ya=$e(17313),Po=$e(83116),ss=$e(37613),da=_t=>{const{componentCls:Gt}=_t,nn=`${_t.lineWidth}px ${_t.lineType} ${_t.tableBorderColor}`,rn=(xn,dn,Bn)=>({[`&${Gt}-${xn}`]:{[`> ${Gt}-container`]:{[`> ${Gt}-content, > ${Gt}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${Gt}-expanded-row-fixed`]:{margin:`-${dn}px -${Bn+_t.lineWidth}px`}}}}}});return{[`${Gt}-wrapper`]:{[`${Gt}${Gt}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${Gt}-title`]:{border:nn,borderBottom:0},[`> ${Gt}-container`]:{borderInlineStart:nn,borderTop:nn,[`
|
|
|
> ${Gt}-content,
|
|
|
> ${Gt}-header,
|
|
|
> ${Gt}-body,
|
|
|
> ${Gt}-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 ":{[`> ${Gt}-cell-fix-right-first::after`]:{borderInlineEnd:nn}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${Gt}-expanded-row-fixed`]:{margin:`-${_t.tablePaddingVertical}px -${_t.tablePaddingHorizontal+_t.lineWidth}px`,"&::after":{position:"absolute",top:0,insetInlineEnd:_t.lineWidth,bottom:0,borderInlineEnd:nn,content:'""'}}}}}},[`&${Gt}-scroll-horizontal`]:{[`> ${Gt}-container > ${Gt}-body`]:{"> table > tbody":{[`
|
|
|
> tr${Gt}-expanded-row,
|
|
|
> tr${Gt}-placeholder
|
|
|
`]:{"> th, > td":{borderInlineEnd:0}}}}}},rn("middle",_t.tablePaddingVerticalMiddle,_t.tablePaddingHorizontalMiddle)),rn("small",_t.tablePaddingVerticalSmall,_t.tablePaddingHorizontalSmall)),{[`> ${Gt}-footer`]:{border:nn,borderTop:0}}),[`${Gt}-cell`]:{[`${Gt}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${_t.lineWidth}px 0 ${_t.lineWidth}px ${_t.tableHeaderBg}`}},[`${Gt}-bordered ${Gt}-cell-scrollbar`]:{borderInlineEnd:nn}}}},ws=_t=>{const{componentCls:Gt}=_t;return{[`${Gt}-wrapper`]:{[`${Gt}-cell-ellipsis`]:Object.assign(Object.assign({},ya.vS),{wordBreak:"keep-all",[`
|
|
|
&${Gt}-cell-fix-left-last,
|
|
|
&${Gt}-cell-fix-right-first
|
|
|
`]:{overflow:"visible",[`${Gt}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${Gt}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},$o=_t=>{const{componentCls:Gt}=_t;return{[`${Gt}-wrapper`]:{[`${Gt}-tbody > tr${Gt}-placeholder`]:{textAlign:"center",color:_t.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:_t.colorBgContainer}}}}},il=$e(15969),la=_t=>{const{componentCls:Gt,antCls:nn,controlInteractiveSize:rn,motionDurationSlow:xn,lineWidth:dn,paddingXS:Bn,lineType:Rn,tableBorderColor:Dn,tableExpandIconBg:qn,tableExpandColumnWidth:rr,borderRadius:tr,fontSize:kr,fontSizeSM:Er,lineHeight:gr,tablePaddingVertical:qr,tablePaddingHorizontal:br,tableExpandedRowBg:Xr,paddingXXS:Vr}=_t,ci=rn/2-dn,ki=ci*2+dn*3,Wi=`${dn}px ${Rn} ${Dn}`,ti=Vr-dn;return{[`${Gt}-wrapper`]:{[`${Gt}-expand-icon-col`]:{width:rr},[`${Gt}-row-expand-icon-cell`]:{textAlign:"center",[`${Gt}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${Gt}-row-indent`]:{height:1,float:"left"},[`${Gt}-row-expand-icon`]:Object.assign(Object.assign({},(0,il.N)(_t)),{position:"relative",float:"left",boxSizing:"border-box",width:ki,height:ki,padding:0,color:"inherit",lineHeight:`${ki}px`,background:qn,border:Wi,borderRadius:tr,transform:`scale(${rn/ki})`,transition:`all ${xn}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${xn} ease-out`,content:'""'},"&::before":{top:ci,insetInlineEnd:ti,insetInlineStart:ti,height:dn},"&::after":{top:ti,bottom:ti,insetInlineStart:ci,width:dn,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"}}),[`${Gt}-row-indent + ${Gt}-row-expand-icon`]:{marginTop:(kr*gr-dn*3)/2-Math.ceil((Er*1.4-dn*3)/2),marginInlineEnd:Bn},[`tr${Gt}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:Xr}},[`${nn}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${Gt}-expanded-row-fixed`]:{position:"relative",margin:`-${qr}px -${br}px`,padding:`${qr}px ${br}px`}}}},Va=_t=>{const{componentCls:Gt,antCls:nn,iconCls:rn,tableFilterDropdownWidth:xn,tableFilterDropdownSearchWidth:dn,paddingXXS:Bn,paddingXS:Rn,colorText:Dn,lineWidth:qn,lineType:rr,tableBorderColor:tr,tableHeaderIconColor:kr,fontSizeSM:Er,tablePaddingHorizontal:gr,borderRadius:qr,motionDurationSlow:br,colorTextDescription:Xr,colorPrimary:Vr,tableHeaderFilterActiveBg:ci,colorTextDisabled:ki,tableFilterDropdownBg:Wi,tableFilterDropdownHeight:ti,controlItemBgHover:Li,controlItemBgActive:ho,boxShadowSecondary:ui,filterDropdownMenuBg:Ci}=_t,si=`${nn}-dropdown`,zr=`${Gt}-filter-dropdown`,vi=`${nn}-tree`,Fi=`${qn}px ${rr} ${tr}`;return[{[`${Gt}-wrapper`]:{[`${Gt}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${Gt}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:-Bn,marginInline:`${Bn}px ${-gr/2}px`,padding:`0 ${Bn}px`,color:kr,fontSize:Er,borderRadius:qr,cursor:"pointer",transition:`all ${br}`,"&:hover":{color:Xr,background:ci},"&.active":{color:Vr}}}},{[`${nn}-dropdown`]:{[zr]:Object.assign(Object.assign({},(0,ya.Wf)(_t)),{minWidth:xn,backgroundColor:Wi,borderRadius:qr,boxShadow:ui,overflow:"hidden",[`${si}-menu`]:{maxHeight:ti,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:Ci,"&:empty::after":{display:"block",padding:`${Rn}px 0`,color:ki,fontSize:Er,textAlign:"center",content:'"Not Found"'}},[`${zr}-tree`]:{paddingBlock:`${Rn}px 0`,paddingInline:Rn,[vi]:{padding:0},[`${vi}-treenode ${vi}-node-content-wrapper:hover`]:{backgroundColor:Li},[`${vi}-treenode-checkbox-checked ${vi}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:ho}}},[`${zr}-search`]:{padding:Rn,borderBottom:Fi,"&-input":{input:{minWidth:dn},[rn]:{color:ki}}},[`${zr}-checkall`]:{width:"100%",marginBottom:Bn,marginInlineStart:Bn},[`${zr}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${Rn-qn}px ${Rn}px`,overflow:"hidden",borderTop:Fi}})}},{[`${nn}-dropdown ${zr}, ${zr}-submenu`]:{[`${nn}-checkbox-wrapper + span`]:{paddingInlineStart:Rn,color:Dn},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},Vc=_t=>{const{componentCls:Gt,lineWidth:nn,colorSplit:rn,motionDurationSlow:xn,zIndexTableFixed:dn,tableBg:Bn,zIndexTableSticky:Rn}=_t,Dn=rn;return{[`${Gt}-wrapper`]:{[`
|
|
|
${Gt}-cell-fix-left,
|
|
|
${Gt}-cell-fix-right
|
|
|
`]:{position:"sticky !important",zIndex:dn,background:Bn},[`
|
|
|
${Gt}-cell-fix-left-first::after,
|
|
|
${Gt}-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 ${xn}`,content:'""',pointerEvents:"none"},[`${Gt}-cell-fix-left-all::after`]:{display:"none"},[`
|
|
|
${Gt}-cell-fix-right-first::after,
|
|
|
${Gt}-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 ${xn}`,content:'""',pointerEvents:"none"},[`${Gt}-container`]:{"&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:Rn+1,width:30,transition:`box-shadow ${xn}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${Gt}-ping-left`]:{[`&:not(${Gt}-has-fix-left) ${Gt}-container`]:{position:"relative","&::before":{boxShadow:`inset 10px 0 8px -8px ${Dn}`}},[`
|
|
|
${Gt}-cell-fix-left-first::after,
|
|
|
${Gt}-cell-fix-left-last::after
|
|
|
`]:{boxShadow:`inset 10px 0 8px -8px ${Dn}`},[`${Gt}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${Gt}-ping-right`]:{[`&:not(${Gt}-has-fix-right) ${Gt}-container`]:{position:"relative","&::after":{boxShadow:`inset -10px 0 8px -8px ${Dn}`}},[`
|
|
|
${Gt}-cell-fix-right-first::after,
|
|
|
${Gt}-cell-fix-right-last::after
|
|
|
`]:{boxShadow:`inset -10px 0 8px -8px ${Dn}`}}}}},Hf=_t=>{const{componentCls:Gt,antCls:nn}=_t;return{[`${Gt}-wrapper`]:{[`${Gt}-pagination${nn}-pagination`]:{margin:`${_t.margin}px 0`},[`${Gt}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:_t.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},Uf=_t=>{const{componentCls:Gt,tableRadius:nn}=_t;return{[`${Gt}-wrapper`]:{[Gt]:{[`${Gt}-title, ${Gt}-header`]:{borderRadius:`${nn}px ${nn}px 0 0`},[`${Gt}-title + ${Gt}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${Gt}-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=_t=>{const{componentCls:Gt}=_t;return{[`${Gt}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${Gt}-pagination-left`]:{justifyContent:"flex-end"},[`${Gt}-pagination-right`]:{justifyContent:"flex-start"},[`${Gt}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${Gt}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${Gt}-row-indent`]:{float:"right"}}}}},Ed=_t=>{const{componentCls:Gt,antCls:nn,iconCls:rn,fontSizeIcon:xn,padding:dn,paddingXS:Bn,tableHeaderIconColor:Rn,tableHeaderIconColorHover:Dn,tableSelectionColumnWidth:qn}=_t;return{[`${Gt}-wrapper`]:{[`${Gt}-selection-col`]:{width:qn,[`&${Gt}-selection-col-with-dropdown`]:{width:qn+xn+dn/4}},[`${Gt}-bordered ${Gt}-selection-col`]:{width:qn+Bn*2,[`&${Gt}-selection-col-with-dropdown`]:{width:qn+xn+dn/4+Bn*2}},[`
|
|
|
table tr th${Gt}-selection-column,
|
|
|
table tr td${Gt}-selection-column
|
|
|
`]:{paddingInlineEnd:_t.paddingXS,paddingInlineStart:_t.paddingXS,textAlign:"center",[`${nn}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${Gt}-selection-column${Gt}-cell-fix-left`]:{zIndex:_t.zIndexTableFixed+1},[`table tr th${Gt}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${Gt}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${Gt}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${_t.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:`${_t.tablePaddingHorizontal/4}px`,[rn]:{color:Rn,fontSize:xn,verticalAlign:"baseline","&:hover":{color:Dn}}}}}},Zc=_t=>{const{componentCls:Gt}=_t,nn=(rn,xn,dn,Bn)=>({[`${Gt}${Gt}-${rn}`]:{fontSize:Bn,[`
|
|
|
${Gt}-title,
|
|
|
${Gt}-footer,
|
|
|
${Gt}-cell,
|
|
|
${Gt}-thead > tr > th,
|
|
|
${Gt}-tbody > tr > th,
|
|
|
${Gt}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{padding:`${xn}px ${dn}px`},[`${Gt}-filter-trigger`]:{marginInlineEnd:`-${dn/2}px`},[`${Gt}-expanded-row-fixed`]:{margin:`-${xn}px -${dn}px`},[`${Gt}-tbody`]:{[`${Gt}-wrapper:only-child ${Gt}`]:{marginBlock:`-${xn}px`,marginInline:`${_t.tableExpandColumnWidth-dn}px -${dn}px`}},[`${Gt}-selection-column`]:{paddingInlineStart:`${dn/4}px`}}});return{[`${Gt}-wrapper`]:Object.assign(Object.assign({},nn("middle",_t.tablePaddingVerticalMiddle,_t.tablePaddingHorizontalMiddle,_t.tableFontSizeMiddle)),nn("small",_t.tablePaddingVerticalSmall,_t.tablePaddingHorizontalSmall,_t.tableFontSizeSmall))}},Hu=_t=>{const{componentCls:Gt,marginXXS:nn,fontSizeIcon:rn,tableHeaderIconColor:xn,tableHeaderIconColorHover:dn}=_t;return{[`${Gt}-wrapper`]:{[`${Gt}-thead th${Gt}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${_t.motionDurationSlow}`,"&:hover":{background:_t.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:_t.colorPrimary},[`
|
|
|
&${Gt}-cell-fix-left:hover,
|
|
|
&${Gt}-cell-fix-right:hover
|
|
|
`]:{background:_t.tableFixedHeaderSortActiveBg}},[`${Gt}-thead th${Gt}-column-sort`]:{background:_t.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${Gt}-column-sort`]:{background:_t.tableBodySortBg},[`${Gt}-column-title`]:{position:"relative",zIndex:1,flex:1},[`${Gt}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${Gt}-column-sorter`]:{marginInlineStart:nn,color:xn,fontSize:0,transition:`color ${_t.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:rn,"&.active":{color:_t.colorPrimary}},[`${Gt}-column-sorter-up + ${Gt}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${Gt}-column-sorters:hover ${Gt}-column-sorter`]:{color:dn}}}},Xc=_t=>{const{componentCls:Gt,opacityLoading:nn,tableScrollThumbBg:rn,tableScrollThumbBgHover:xn,tableScrollThumbSize:dn,tableScrollBg:Bn,zIndexTableSticky:Rn,stickyScrollBarBorderRadius:Dn}=_t,qn=`${_t.lineWidth}px ${_t.lineType} ${_t.tableBorderColor}`;return{[`${Gt}-wrapper`]:{[`${Gt}-sticky`]:{"&-holder":{position:"sticky",zIndex:Rn,background:_t.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${dn}px !important`,zIndex:Rn,display:"flex",alignItems:"center",background:Bn,borderTop:qn,opacity:nn,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:dn,backgroundColor:rn,borderRadius:Dn,transition:`all ${_t.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:xn}}}}}}},Uu=_t=>{const{componentCls:Gt,lineWidth:nn,tableBorderColor:rn}=_t,xn=`${nn}px ${_t.lineType} ${rn}`;return{[`${Gt}-wrapper`]:{[`${Gt}-summary`]:{position:"relative",zIndex:_t.zIndexTableFixed,background:_t.tableBg,"> tr":{"> th, > td":{borderBottom:xn}}},[`div${Gt}-summary`]:{boxShadow:`0 -${nn}px 0 ${rn}`}}}},xc=_t=>{const{componentCls:Gt}=_t,nn=`${_t.lineWidth}px ${_t.lineType} ${_t.tableBorderColor}`,rn=`${Gt}-expanded-row-cell`;return{[`${Gt}-wrapper`]:{[`${Gt}-tbody-virtual`]:{[`${Gt}-row`]:{display:"flex",boxSizing:"border-box",width:"100%"},[`${Gt}-cell`]:{borderBottom:nn},[`${Gt}-expanded-row`]:{[`${rn}${rn}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${_t.lineWidth}px)`,borderInlineEnd:"none"}}},[`${Gt}-bordered`]:{[`${Gt}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:nn,position:"absolute"},[`${Gt}-cell`]:{borderInlineEnd:nn,[`&${Gt}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:-_t.lineWidth,borderInlineStart:nn}}}}}}};const Tu=_t=>{const{componentCls:Gt,fontWeightStrong:nn,tablePaddingVertical:rn,tablePaddingHorizontal:xn,lineWidth:dn,lineType:Bn,tableBorderColor:Rn,tableFontSize:Dn,tableBg:qn,tableRadius:rr,tableHeaderTextColor:tr,motionDurationMid:kr,tableHeaderBg:Er,tableHeaderCellSplitColor:gr,tableRowHoverBg:qr,tableSelectedRowBg:br,tableSelectedRowHoverBg:Xr,tableFooterTextColor:Vr,tableFooterBg:ci,paddingContentVerticalLG:ki}=_t,Wi=`${dn}px ${Bn} ${Rn}`;return{[`${Gt}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},(0,ya.dF)()),{[Gt]:Object.assign(Object.assign({},(0,ya.Wf)(_t)),{fontSize:Dn,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},[`
|
|
|
${Gt}-cell,
|
|
|
${Gt}-thead > tr > th,
|
|
|
${Gt}-tbody > tr > th,
|
|
|
${Gt}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{position:"relative",padding:`${ki}px ${xn}px`,overflowWrap:"break-word"},[`${Gt}-title`]:{padding:`${rn}px ${xn}px`},[`${Gt}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:tr,fontWeight:nn,textAlign:"start",background:Er,borderBottom:Wi,transition:`background ${kr} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${Gt}-selection-column):not(${Gt}-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 ${kr}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${Gt}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${kr}, border-color ${kr}`,borderBottom:Wi,[`
|
|
|
> ${Gt}-wrapper:only-child,
|
|
|
> ${Gt}-expanded-row-fixed > ${Gt}-wrapper:only-child
|
|
|
`]:{[Gt]:{marginBlock:`-${rn}px`,marginInline:`${_t.tableExpandColumnWidth-xn}px -${xn}px`,[`${Gt}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:tr,fontWeight:nn,textAlign:"start",background:Er,borderBottom:Wi,transition:`background ${kr} ease`},[`
|
|
|
&${Gt}-row:hover > th,
|
|
|
&${Gt}-row:hover > td,
|
|
|
> th${Gt}-cell-row-hover,
|
|
|
> td${Gt}-cell-row-hover
|
|
|
`]:{background:qr},[`&${Gt}-row-selected`]:{"> th, > td":{background:br},"&:hover > th, &:hover > td":{background:Xr}}}},[`${Gt}-footer`]:{padding:`${rn}px ${xn}px`,color:Vr,background:ci}})}};var wc=(0,Po.Z)("Table",_t=>{const{colorTextHeading:Gt,colorSplit:nn,colorIcon:rn,colorIconHover:xn,opacityLoading:dn,colorBgContainer:Bn,controlInteractiveSize:Rn,headerBg:Dn,headerColor:qn,headerSortActiveBg:rr,headerSortHoverBg:tr,bodySortBg:kr,rowHoverBg:Er,rowSelectedBg:gr,rowSelectedHoverBg:qr,rowExpandedBg:br,cellPaddingBlock:Xr,cellPaddingInline:Vr,cellPaddingBlockMD:ci,cellPaddingInlineMD:ki,cellPaddingBlockSM:Wi,cellPaddingInlineSM:ti,borderColor:Li,footerBg:ho,footerColor:ui,headerBorderRadius:Ci,cellFontSize:si,cellFontSizeMD:zr,cellFontSizeSM:vi,headerSplitColor:Fi,fixedHeaderSortActiveBg:Yi,headerFilterHoverBg:eo,filterDropdownBg:ni,expandIconBg:po,selectionColumnWidth:wo,stickyScrollBarBg:Qo}=_t,Ao=new zs.C(rn),Na=new zs.C(xn),Ta=2,vo=(0,ss.TS)(_t,{tableFontSize:si,tableBg:Bn,tableRadius:Ci,tablePaddingVertical:Xr,tablePaddingHorizontal:Vr,tablePaddingVerticalMiddle:ci,tablePaddingHorizontalMiddle:ki,tablePaddingVerticalSmall:Wi,tablePaddingHorizontalSmall:ti,tableBorderColor:Li,tableHeaderTextColor:qn,tableHeaderBg:Dn,tableFooterTextColor:ui,tableFooterBg:ho,tableHeaderCellSplitColor:Fi,tableHeaderSortBg:rr,tableHeaderSortHoverBg:tr,tableHeaderIconColor:Ao.clone().setAlpha(Ao.getAlpha()*dn).toRgbString(),tableHeaderIconColorHover:Na.clone().setAlpha(Na.getAlpha()*dn).toRgbString(),tableBodySortBg:kr,tableFixedHeaderSortActiveBg:Yi,tableHeaderFilterActiveBg:eo,tableFilterDropdownBg:ni,tableRowHoverBg:Er,tableSelectedRowBg:gr,tableSelectedRowHoverBg:qr,zIndexTableFixed:Ta,zIndexTableSticky:Ta+1,tableFontSizeMiddle:zr,tableFontSizeSmall:vi,tableSelectionColumnWidth:wo,tableExpandIconBg:po,tableExpandColumnWidth:Rn+2*_t.padding,tableExpandedRowBg:br,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:Qo,tableScrollThumbBgHover:Gt,tableScrollBg:nn});return[Tu(vo),Hf(vo),Uu(vo),Hu(vo),Va(vo),da(vo),Uf(vo),la(vo),Uu(vo),$o(vo),Ed(vo),Vc(vo),Xc(vo),ws(vo),Zc(vo),Wh(vo),xc(vo)]},_t=>{const{colorFillAlter:Gt,colorBgContainer:nn,colorTextHeading:rn,colorFillSecondary:xn,colorFillContent:dn,controlItemBgActive:Bn,controlItemBgActiveHover:Rn,padding:Dn,paddingSM:qn,paddingXS:rr,colorBorderSecondary:tr,borderRadiusLG:kr,fontSize:Er,controlHeight:gr,colorTextPlaceholder:qr}=_t,br=new zs.C(xn).onBackground(nn).toHexShortString(),Xr=new zs.C(dn).onBackground(nn).toHexShortString(),Vr=new zs.C(Gt).onBackground(nn).toHexShortString();return{headerBg:Vr,headerColor:rn,headerSortActiveBg:br,headerSortHoverBg:Xr,bodySortBg:Vr,rowHoverBg:Vr,rowSelectedBg:Bn,rowSelectedHoverBg:Rn,rowExpandedBg:Gt,cellPaddingBlock:Dn,cellPaddingInline:Dn,cellPaddingBlockMD:qn,cellPaddingInlineMD:rr,cellPaddingBlockSM:rr,cellPaddingInlineSM:rr,borderColor:tr,headerBorderRadius:kr,footerBg:Vr,footerColor:rn,cellFontSize:Er,cellFontSizeMD:Er,cellFontSizeSM:Er,headerSplitColor:tr,fixedHeaderSortActiveBg:br,headerFilterHoverBg:dn,filterDropdownMenuBg:nn,filterDropdownBg:nn,expandIconBg:nn,selectionColumnWidth:gr,stickyScrollBarBg:qr,stickyScrollBarBorderRadius:100}});const Td=[],lf=(_t,Gt)=>{const{prefixCls:nn,className:rn,rootClassName:xn,style:dn,size:Bn,bordered:Rn,dropdownPrefixCls:Dn,dataSource:qn,pagination:rr,rowSelection:tr,rowKey:kr="key",rowClassName:Er,columns:gr,children:qr,childrenColumnName:br,onChange:Xr,getPopupContainer:Vr,loading:ci,expandIcon:ki,expandable:Wi,expandedRowRender:ti,expandIconColumnIndex:Li,indentSize:ho,scroll:ui,sortDirections:Ci,locale:si,showSorterTooltip:zr=!0,virtual:vi}=_t,Fi=ce.useMemo(()=>gr||vn(qr),[gr,qr]),Yi=ce.useMemo(()=>Fi.some(Xo=>Xo.responsive),[Fi]),eo=(0,Vn.Z)(Yi),ni=ce.useMemo(()=>{const Xo=new Set(Object.keys(eo).filter(xa=>eo[xa]));return Fi.filter(xa=>!xa.responsive||xa.responsive.some(us=>Xo.has(us)))},[Fi,eo]),po=(0,gi.Z)(_t,["className","style","columns"]),{locale:wo=ai.Z,direction:Qo,table:Ao,renderEmpty:Na,getPrefixCls:Ta,getPopupContainer:vo}=ce.useContext(io.E_),Gi=(0,Tr.Z)(Bn),Wo=Object.assign(Object.assign({},wo.Table),si),Aa=qn||Td,Sa=Ta("table",nn),is=Ta("dropdown",Dn),to=Object.assign({childrenColumnName:br,expandIconColumnIndex:Li},Wi),{childrenColumnName:Zi="children"}=to,no=ce.useMemo(()=>Aa.some(Xo=>Xo==null?void 0:Xo[Zi])?"nest":ti||Wi&&Wi.expandedRowRender?"row":null,[Aa]),Oi={body:ce.useRef()},Zo=ce.useMemo(()=>typeof kr=="function"?kr:Xo=>Xo==null?void 0:Xo[kr],[kr]),[Ni]=Gc(Aa,Zi,Zo),fo={},Bo=function(Xo,xa){let us=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var wa,Ho,vs;const gl=Object.assign(Object.assign({},fo),Xo);us&&((wa=fo.resetPagination)===null||wa===void 0||wa.call(fo),!((Ho=gl.pagination)===null||Ho===void 0)&&Ho.current&&(gl.pagination.current=1),rr&&rr.onChange&&rr.onChange(1,(vs=gl.pagination)===null||vs===void 0?void 0:vs.pageSize)),ui&&ui.scrollToFirstRowOnChange!==!1&&Oi.body.current&&(0,Vi.Z)(0,{getContainer:()=>Oi.body.current}),Xr==null||Xr(gl.pagination,gl.filters,gl.sorter,{currentDataSource:_s(ic(Aa,gl.sorterStates,Zi),gl.filterStates),action:xa})},Ro=(Xo,xa)=>{Bo({sorter:Xo,sorterStates:xa},"sort",!1)},[bs,ls,$s,qo]=Cd({prefixCls:Sa,mergedColumns:ni,onSorterChange:Ro,sortDirections:Ci||["ascend","descend"],tableLocale:Wo,showSorterTooltip:zr}),Ps=ce.useMemo(()=>ic(Aa,ls,Zi),[Aa,ls]);fo.sorter=qo(),fo.sorterStates=ls;const ts=(Xo,xa)=>{Bo({filters:Xo,filterStates:xa},"filter",!0)},[ps,Wu,ea]=hh({prefixCls:Sa,locale:Wo,dropdownPrefixCls:is,mergedColumns:ni,onFilterChange:ts,getPopupContainer:Vr||vo}),ia=_s(Ps,Wu);fo.filters=ea,fo.filterStates=Wu;const ua=ce.useMemo(()=>{const Xo={};return Object.keys(ea).forEach(xa=>{ea[xa]!==null&&(Xo[xa]=ea[xa])}),Object.assign(Object.assign({},$s),{filters:Xo})},[$s,ea]),[Za]=$a(ua),gs=(Xo,xa)=>{Bo({pagination:Object.assign(Object.assign({},fo.pagination),{current:Xo,pageSize:xa})},"paginate")},[ko,fa]=dh(ia.length,gs,rr);fo.pagination=rr===!1?{}:_u(ko,rr),fo.resetPagination=fa;const ms=ce.useMemo(()=>{if(rr===!1||!ko.pageSize)return ia;const{current:Xo=1,total:xa,pageSize:us=vc}=ko;return ia.length<xa?ia.length>us?ia.slice((Xo-1)*us,Xo*us):ia:ia.slice((Xo-1)*us,Xo*us)},[!!rr,ia,ko&&ko.current,ko&&ko.pageSize,ko&&ko.total]),[pl,zl]=Rl({prefixCls:Sa,data:ia,pageData:ms,getRowKey:Zo,getRecordByKey:Ni,expandType:no,childrenColumnName:Zi,locale:Wo,getPopupContainer:Vr||vo},tr),El=(Xo,xa,us)=>{let wa;return typeof Er=="function"?wa=ze()(Er(Xo,xa,us)):wa=ze()(Er),ze()({[`${Sa}-row-selected`]:zl.has(Zo(Xo,xa))},wa)};to.__PARENT_RENDER_ICON__=to.expandIcon,to.expandIcon=to.expandIcon||ki||ca(Wo),no==="nest"&&to.expandIconColumnIndex===void 0?to.expandIconColumnIndex=tr?1:0:to.expandIconColumnIndex>0&&tr&&(to.expandIconColumnIndex-=1),typeof to.indentSize!="number"&&(to.indentSize=typeof ho=="number"?ho:15);const eu=ce.useCallback(Xo=>Za(pl(ps(bs(Xo)))),[bs,ps,pl]);let tu,$l;if(rr!==!1&&(ko!=null&&ko.total)){let Xo;ko.size?Xo=ko.size:Xo=Gi==="small"||Gi==="middle"?"small":void 0;const xa=Ho=>ce.createElement(Qi.Z,Object.assign({},ko,{className:ze()(`${Sa}-pagination ${Sa}-pagination-${Ho}`,ko.className),size:Xo})),us=Qo==="rtl"?"left":"right",{position:wa}=ko;if(wa!==null&&Array.isArray(wa)){const Ho=wa.find(gu=>gu.includes("top")),vs=wa.find(gu=>gu.includes("bottom")),gl=wa.every(gu=>`${gu}`=="none");!Ho&&!vs&&!gl&&($l=xa(us)),Ho&&(tu=xa(Ho.toLowerCase().replace("top",""))),vs&&($l=xa(vs.toLowerCase().replace("bottom","")))}else $l=xa(us)}let na;typeof ci=="boolean"?na={spinning:ci}:typeof ci=="object"&&(na=Object.assign({spinning:!0},ci));const[Ts,Ga]=wc(Sa),[,pa]=(0,Mo.Z)(),Gl=ze()(`${Sa}-wrapper`,Ao==null?void 0:Ao.className,{[`${Sa}-wrapper-rtl`]:Qo==="rtl"},rn,xn,Ga),oc=Object.assign(Object.assign({},Ao==null?void 0:Ao.style),dn),nu=si&&si.emptyText||(Na==null?void 0:Na("Table"))||ce.createElement(Gr.Z,{componentName:"Table"}),Mu=vi?rl:Ui,Ku={},Tl=ce.useMemo(()=>{const{fontSize:Xo,lineHeight:xa,padding:us,paddingXS:wa,paddingSM:Ho}=pa,vs=Math.floor(Xo*xa);switch(Gi){case"large":return us*2+vs;case"small":return wa*2+vs;default:return Ho*2+vs}},[pa,Gi]);return vi&&(Ku.listItemHeight=Tl),Ts(ce.createElement("div",{ref:Gt,className:Gl,style:oc},ce.createElement(zo.Z,Object.assign({spinning:!1},na),tu,ce.createElement(Mu,Object.assign({},Ku,po,{columns:ni,direction:Qo,expandable:to,prefixCls:Sa,className:ze()({[`${Sa}-middle`]:Gi==="middle",[`${Sa}-small`]:Gi==="small",[`${Sa}-bordered`]:Rn,[`${Sa}-empty`]:Aa.length===0}),data:ms,rowKey:Zo,rowClassName:El,emptyText:nu,internalHooks:xt,internalRefs:Oi,transformColumns:eu})),$l)))};var uf=ce.forwardRef(lf);const Vf=(_t,Gt)=>{const nn=ce.useRef(0);return nn.current+=1,ce.createElement(uf,Object.assign({},_t,{ref:Gt,_renderTimes:nn.current}))},fl=ce.forwardRef(Vf);fl.SELECTION_COLUMN=Xa,fl.EXPAND_COLUMN=it,fl.SELECTION_ALL=_a,fl.SELECTION_INVERT=ha,fl.SELECTION_NONE=Ea,fl.Column=_r,fl.ColumnGroup=Pi,fl.Summary=We;var bc=fl,Wp=bc},17574:function(Pn,an,$e){"use strict";$e.d(an,{default:function(){return et}});var it=$e(54844),xt=$e(80702),ie=$e(52671),_e=$e(8657),je=$e(72308),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(7657),ye=function(wt,Et){return ve.createElement(Ce.Z,(0,je.Z)({},wt,{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(56082),le=$e(62892),ue=$e(20648);const pe=4;function Ee(ot){const{dropPosition:wt,dropLevelOffset:Et,prefixCls:Tt,indent:vt,direction:gt="ltr"}=ot,yt=gt==="ltr"?"left":"right",It=gt==="ltr"?"right":"left",Ot={[yt]:-Et*vt+pe,[It]:0};switch(wt){case-1:Ot.top=-3;break;case 1:Ot.bottom=-3;break;default:Ot.bottom=-3,Ot[yt]=vt+pe;break}return ve.createElement("div",{style:Ot,className:`${Tt}-drop-indicator`})}var Pe=$e(71997),ke=ve.forwardRef((ot,wt)=>{const{getPrefixCls:Et,direction:Tt,virtual:vt,tree:gt}=ve.useContext(ae.E_),{prefixCls:yt,className:It,showIcon:Ot=!1,showLine:Vt,switcherIcon:Ct,blockNode:mt=!1,children:nt,checkable:ft=!1,selectable:Xe=!0,draggable:ut,motion:bt,style:St}=ot,lt=Et("tree",yt),Qe=Et(),Ue=bt!=null?bt:Object.assign(Object.assign({},(0,le.Z)(Qe)),{motionAppear:!1}),We=Object.assign(Object.assign({},ot),{checkable:ft,selectable:Xe,showIcon:Ot,motion:Ue,blockNode:mt,showLine:!!Vt,dropIndicatorRender:Ee}),[qe,He]=(0,ue.ZP)(lt),De=ve.useMemo(()=>{if(!ut)return!1;let Ke={};switch(typeof ut){case"function":Ke.nodeDraggable=ut;break;case"object":Ke=Object.assign({},ut);break;default:break}return Ke.icon!==!1&&(Ke.icon=Ke.icon||ve.createElement(re.Z,null)),Ke},[ut]),Le=Ke=>ve.createElement(Pe.Z,{prefixCls:lt,switcherIcon:Ct,treeNodeProps:Ke,showLine:Vt});return qe(ve.createElement(it.Z,Object.assign({itemHeight:20,ref:wt,virtual:vt},We,{style:Object.assign(Object.assign({},gt==null?void 0:gt.style),St),prefixCls:lt,className:fe()({[`${lt}-icon-hide`]:!Ot,[`${lt}-block-node`]:mt,[`${lt}-unselectable`]:!Xe,[`${lt}-rtl`]:Tt==="rtl"},gt==null?void 0:gt.className,It,He),direction:Tt,checkable:ft&&ve.createElement("span",{className:`${lt}-checkbox-inner`}),selectable:Xe,switcherIcon:Le,draggable:De}),nt))}),Ne;(function(ot){ot[ot.None=0]="None",ot[ot.Start=1]="Start",ot[ot.End=2]="End"})(Ne||(Ne={}));function Oe(ot,wt){function Et(Tt){const{key:vt,children:gt}=Tt;wt(vt,Tt)!==!1&&Oe(gt||[],wt)}ot.forEach(Et)}function Fe(ot){let{treeData:wt,expandedKeys:Et,startKey:Tt,endKey:vt}=ot;const gt=[];let yt=Ne.None;if(Tt&&Tt===vt)return[Tt];if(!Tt||!vt)return[];function It(Ot){return Ot===Tt||Ot===vt}return Oe(wt,Ot=>{if(yt===Ne.End)return!1;if(It(Ot)){if(gt.push(Ot),yt===Ne.None)yt=Ne.Start;else if(yt===Ne.Start)return yt=Ne.End,!1}else yt===Ne.Start&>.push(Ot);return Et.includes(Ot)}),gt}function Re(ot,wt){const Et=(0,xt.Z)(wt),Tt=[];return Oe(ot,(vt,gt)=>{const yt=Et.indexOf(vt);return yt!==-1&&(Tt.push(gt),Et.splice(yt,1)),!!Et.length}),Tt}var Ye=function(ot,wt){var Et={};for(var Tt in ot)Object.prototype.hasOwnProperty.call(ot,Tt)&&wt.indexOf(Tt)<0&&(Et[Tt]=ot[Tt]);if(ot!=null&&typeof Object.getOwnPropertySymbols=="function")for(var vt=0,Tt=Object.getOwnPropertySymbols(ot);vt<Tt.length;vt++)wt.indexOf(Tt[vt])<0&&Object.prototype.propertyIsEnumerable.call(ot,Tt[vt])&&(Et[Tt[vt]]=ot[Tt[vt]]);return Et};function ze(ot){const{isLeaf:wt,expanded:Et}=ot;return wt?ve.createElement(ie.Z,null):Et?ve.createElement(_e.Z,null):ve.createElement(me,null)}function Ze(ot){let{treeData:wt,children:Et}=ot;return wt||(0,ee.zn)(Et)}const at=(ot,wt)=>{var{defaultExpandAll:Et,defaultExpandParent:Tt,defaultExpandedKeys:vt}=ot,gt=Ye(ot,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const yt=ve.useRef(),It=ve.useRef(),Ot=()=>{const{keyEntities:De}=(0,ee.I8)(Ze(gt));let Le;return Et?Le=Object.keys(De):Tt?Le=(0,z.r7)(gt.expandedKeys||vt||[],De):Le=gt.expandedKeys||vt,Le},[Vt,Ct]=ve.useState(gt.selectedKeys||gt.defaultSelectedKeys||[]),[mt,nt]=ve.useState(()=>Ot());ve.useEffect(()=>{"selectedKeys"in gt&&Ct(gt.selectedKeys)},[gt.selectedKeys]),ve.useEffect(()=>{"expandedKeys"in gt&&nt(gt.expandedKeys)},[gt.expandedKeys]);const ft=(De,Le)=>{var Ke;return"expandedKeys"in gt||nt(De),(Ke=gt.onExpand)===null||Ke===void 0?void 0:Ke.call(gt,De,Le)},Xe=(De,Le)=>{var Ke;const{multiple:dt}=gt,{node:Ve,nativeEvent:kt}=Le,{key:zt=""}=Ve,Xt=Ze(gt),At=Object.assign(Object.assign({},Le),{selected:!0}),Nt=(kt==null?void 0:kt.ctrlKey)||(kt==null?void 0:kt.metaKey),qt=kt==null?void 0:kt.shiftKey;let on;dt&&Nt?(on=De,yt.current=zt,It.current=on,At.selectedNodes=Re(Xt,on)):dt&&qt?(on=Array.from(new Set([].concat((0,xt.Z)(It.current||[]),(0,xt.Z)(Fe({treeData:Xt,expandedKeys:mt,startKey:zt,endKey:yt.current}))))),At.selectedNodes=Re(Xt,on)):(on=[zt],yt.current=zt,It.current=on,At.selectedNodes=Re(Xt,on)),(Ke=gt.onSelect)===null||Ke===void 0||Ke.call(gt,on,At),"selectedKeys"in gt||Ct(on)},{getPrefixCls:ut,direction:bt}=ve.useContext(ae.E_),{prefixCls:St,className:lt,showIcon:Qe=!0,expandAction:Ue="click"}=gt,We=Ye(gt,["prefixCls","className","showIcon","expandAction"]),qe=ut("tree",St),He=fe()(`${qe}-directory`,{[`${qe}-directory-rtl`]:bt==="rtl"},lt);return ve.createElement(ke,Object.assign({icon:ze,ref:wt,blockNode:!0},We,{showIcon:Qe,expandAction:Ue,prefixCls:qe,className:He,expandedKeys:mt,selectedKeys:Vt,onSelect:Xe,onExpand:ft}))};var pt=ve.forwardRef(at);const Mt=ke;Mt.DirectoryTree=pt,Mt.TreeNode=it.O;var et=Mt},20648:function(Pn,an,$e){"use strict";$e.d(an,{TM:function(){return xe},Yk:function(){return me}});var it=$e(93083),xt=$e(98447),ie=$e(17313),_e=$e(8378),je=$e(37613),ve=$e(83116);const ce=new it.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}};an.ZP=(0,ve.Z)("Tree",(fe,z)=>{let{prefixCls:ee}=z;return[{[fe.componentCls]:(0,xt.C2)(`${ee}-checkbox`,fe)},me(ee,fe),(0,_e.Z)(fe)]},fe=>{const{colorTextLightSolid:z,colorPrimary:ee}=fe;return Object.assign(Object.assign({},xe(fe)),{directoryNodeSelectedColor:z,directoryNodeSelectedBg:ee})})},71997:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return ae}});var it=$e(72308),xt=$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"},_e=ie,je=$e(7657),ve=function(le,ue){return xt.createElement(je.Z,(0,it.Z)({},le,{ref:ue,icon:_e}))},ce=xt.forwardRef(ve),be=ce,Ce=$e(52671),ye=$e(58617),we=$e(15075),me=$e(43531),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 xt.createElement(ye.Z,{className:`${le}-switcher-loading-icon`});let Ne;if(Ee&&typeof Ee=="object"&&(Ne=Ee.showLeafIcon),Pe){if(!Ee)return null;if(typeof Ne!="boolean"&&Ne){const Re=typeof Ne=="function"?Ne(pe):Ne,Ye=`${le}-switcher-line-custom-icon`;return(0,z.l$)(Re)?(0,z.Tm)(Re,{className:fe()(Re.props.className||"",Ye)}):Re}return Ne?xt.createElement(Ce.Z,{className:`${le}-switcher-line-icon`}):xt.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?xt.createElement(we.Z,{className:`${le}-switcher-line-icon`}):xt.createElement(me.Z,{className:`${le}-switcher-line-icon`}):xt.createElement(be,{className:Oe})}},54580:function(Pn,an,$e){"use strict";$e.d(an,{default:function(){return Cn}});var it=$e(59301),xt=$e(80702),ie=$e(92310),_e=$e.n(ie),je=$e(72308),ve=$e(96949),ce=$e(55090),be=$e(77205),Ce=$e(38793),ye=$e(49618),we=$e(74416),me=$e(65736),xe=$e(62853),fe=$e(72633),z=$e(26112);function ee(tn,fn){var En="cannot ".concat(tn.method," ").concat(tn.action," ").concat(fn.status,"'"),pn=new Error(En);return pn.status=fn.status,pn.method=tn.method,pn.url=tn.action,pn}function ae(tn){var fn=tn.responseText||tn.response;if(!fn)return fn;try{return JSON.parse(fn)}catch(En){return fn}}function re(tn){var fn=new XMLHttpRequest;tn.onProgress&&fn.upload&&(fn.upload.onprogress=function(Mn){Mn.total>0&&(Mn.percent=Mn.loaded/Mn.total*100),tn.onProgress(Mn)});var En=new FormData;tn.data&&Object.keys(tn.data).forEach(function(Ln){var Mn=tn.data[Ln];if(Array.isArray(Mn)){Mn.forEach(function(Gn){En.append("".concat(Ln,"[]"),Gn)});return}En.append(Ln,Mn)}),tn.file instanceof Blob?En.append(tn.filename,tn.file,tn.file.name):En.append(tn.filename,tn.file),fn.onerror=function(Mn){tn.onError(Mn)},fn.onload=function(){return fn.status<200||fn.status>=300?tn.onError(ee(tn,fn),ae(fn)):tn.onSuccess(ae(fn),fn)},fn.open(tn.method,tn.action,!0),tn.withCredentials&&"withCredentials"in fn&&(fn.withCredentials=!0);var pn=tn.headers||{};return pn["X-Requested-With"]!==null&&fn.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(pn).forEach(function(Ln){pn[Ln]!==null&&fn.setRequestHeader(Ln,pn[Ln])}),fn.send(En),{abort:function(){fn.abort()}}}var le=+new Date,ue=0;function pe(){return"rc-upload-".concat(le,"-").concat(++ue)}var Ee=$e(48736),Pe=function(tn,fn){if(tn&&fn){var En=Array.isArray(fn)?fn:fn.split(","),pn=tn.name||"",Ln=tn.type||"",Mn=Ln.replace(/\/.*$/,"");return En.some(function(Gn){var An=Gn.trim();if(/^\*(\/\*)?$/.test(Gn))return!0;if(An.charAt(0)==="."){var sr=pn.toLowerCase(),hn=An.toLowerCase(),Nr=[hn];return(hn===".jpg"||hn===".jpeg")&&(Nr=[".jpg",".jpeg"]),Nr.some(function(Zr){return sr.endsWith(Zr)})}return/\/\*$/.test(An)?Mn===An.replace(/\/.*$/,""):Ln===An?!0:/^\w+$/.test(An)?((0,Ee.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(An,"'.Skip for check.")),!0):!1})}return!0};function Ie(tn,fn){var En=tn.createReader(),pn=[];function Ln(){En.readEntries(function(Mn){var Gn=Array.prototype.slice.apply(Mn);pn=pn.concat(Gn);var An=!Gn.length;An?fn(pn):Ln()})}Ln()}var ke=function(fn,En,pn){var Ln=function Mn(Gn,An){Gn&&(Gn.path=An||"",Gn.isFile?Gn.file(function(sr){pn(sr)&&(Gn.fullPath&&!sr.webkitRelativePath&&(Object.defineProperties(sr,{webkitRelativePath:{writable:!0}}),sr.webkitRelativePath=Gn.fullPath.replace(/^\//,""),Object.defineProperties(sr,{webkitRelativePath:{writable:!1}})),En([sr]))}):Gn.isDirectory&&Ie(Gn,function(sr){sr.forEach(function(hn){Mn(hn,"".concat(An).concat(Gn.name,"/"))})}))};fn.forEach(function(Mn){Ln(Mn.webkitGetAsEntry())})},Ne=ke,Oe=["component","prefixCls","className","disabled","id","style","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"],Fe=function(tn){(0,be.Z)(En,tn);var fn=(0,Ce.Z)(En);function En(){var pn;(0,ve.Z)(this,En);for(var Ln=arguments.length,Mn=new Array(Ln),Gn=0;Gn<Ln;Gn++)Mn[Gn]=arguments[Gn];return pn=fn.call.apply(fn,[this].concat(Mn)),pn.state={uid:pe()},pn.reqs={},pn.fileInput=void 0,pn._isMounted=void 0,pn.onChange=function(An){var sr=pn.props,hn=sr.accept,Nr=sr.directory,Zr=An.target.files,hi=(0,xt.Z)(Zr).filter(function(yn){return!Nr||Pe(yn,hn)});pn.uploadFiles(hi),pn.reset()},pn.onClick=function(An){var sr=pn.fileInput;if(sr){var hn=An.target,Nr=pn.props.onClick;if(hn&&hn.tagName==="BUTTON"){var Zr=sr.parentNode;Zr.focus(),hn.blur()}sr.click(),Nr&&Nr(An)}},pn.onKeyDown=function(An){An.key==="Enter"&&pn.onClick(An)},pn.onFileDrop=function(An){var sr=pn.props.multiple;if(An.preventDefault(),An.type!=="dragover")if(pn.props.directory)Ne(Array.prototype.slice.call(An.dataTransfer.items),pn.uploadFiles,function(Nr){return Pe(Nr,pn.props.accept)});else{var hn=(0,xt.Z)(An.dataTransfer.files).filter(function(Nr){return Pe(Nr,pn.props.accept)});sr===!1&&(hn=hn.slice(0,1)),pn.uploadFiles(hn)}},pn.uploadFiles=function(An){var sr=(0,xt.Z)(An),hn=sr.map(function(Nr){return Nr.uid=pe(),pn.processFile(Nr,sr)});Promise.all(hn).then(function(Nr){var Zr=pn.props.onBatchStart;Zr==null||Zr(Nr.map(function(hi){var yn=hi.origin,Yn=hi.parsedFile;return{file:yn,parsedFile:Yn}})),Nr.filter(function(hi){return hi.parsedFile!==null}).forEach(function(hi){pn.post(hi)})})},pn.processFile=function(){var An=(0,fe.Z)((0,me.Z)().mark(function sr(hn,Nr){var Zr,hi,yn,Yn,ir,vr,yr,Dr,ii;return(0,me.Z)().wrap(function(Cr){for(;;)switch(Cr.prev=Cr.next){case 0:if(Zr=pn.props.beforeUpload,hi=hn,!Zr){Cr.next=14;break}return Cr.prev=3,Cr.next=6,Zr(hn,Nr);case 6:hi=Cr.sent,Cr.next=12;break;case 9:Cr.prev=9,Cr.t0=Cr.catch(3),hi=!1;case 12:if(hi!==!1){Cr.next=14;break}return Cr.abrupt("return",{origin:hn,parsedFile:null,action:null,data:null});case 14:if(yn=pn.props.action,typeof yn!="function"){Cr.next=21;break}return Cr.next=18,yn(hn);case 18:Yn=Cr.sent,Cr.next=22;break;case 21:Yn=yn;case 22:if(ir=pn.props.data,typeof ir!="function"){Cr.next=29;break}return Cr.next=26,ir(hn);case 26:vr=Cr.sent,Cr.next=30;break;case 29:vr=ir;case 30:return yr=((0,xe.Z)(hi)==="object"||typeof hi=="string")&&hi?hi:hn,yr instanceof File?Dr=yr:Dr=new File([yr],hn.name,{type:hn.type}),ii=Dr,ii.uid=hn.uid,Cr.abrupt("return",{origin:hn,data:vr,parsedFile:ii,action:Yn});case 35:case"end":return Cr.stop()}},sr,null,[[3,9]])}));return function(sr,hn){return An.apply(this,arguments)}}(),pn.saveFileInput=function(An){pn.fileInput=An},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(Ln){var Mn=this,Gn=Ln.data,An=Ln.origin,sr=Ln.action,hn=Ln.parsedFile;if(this._isMounted){var Nr=this.props,Zr=Nr.onStart,hi=Nr.customRequest,yn=Nr.name,Yn=Nr.headers,ir=Nr.withCredentials,vr=Nr.method,yr=An.uid,Dr=hi||re,ii={action:sr,filename:yn,data:Gn,file:hn,headers:Yn,withCredentials:ir,method:vr||"post",onProgress:function(Cr){var oi=Mn.props.onProgress;oi==null||oi(Cr,hn)},onSuccess:function(Cr,oi){var Tn=Mn.props.onSuccess;Tn==null||Tn(Cr,hn,oi),delete Mn.reqs[yr]},onError:function(Cr,oi){var Tn=Mn.props.onError;Tn==null||Tn(Cr,oi,hn),delete Mn.reqs[yr]}};Zr(An),this.reqs[yr]=Dr(ii)}}},{key:"reset",value:function(){this.setState({uid:pe()})}},{key:"abort",value:function(Ln){var Mn=this.reqs;if(Ln){var Gn=Ln.uid?Ln.uid:Ln;Mn[Gn]&&Mn[Gn].abort&&Mn[Gn].abort(),delete Mn[Gn]}else Object.keys(Mn).forEach(function(An){Mn[An]&&Mn[An].abort&&Mn[An].abort(),delete Mn[An]})}},{key:"render",value:function(){var Ln=this.props,Mn=Ln.component,Gn=Ln.prefixCls,An=Ln.className,sr=Ln.disabled,hn=Ln.id,Nr=Ln.style,Zr=Ln.multiple,hi=Ln.accept,yn=Ln.capture,Yn=Ln.children,ir=Ln.directory,vr=Ln.openFileDialogOnClick,yr=Ln.onMouseEnter,Dr=Ln.onMouseLeave,ii=(0,we.Z)(Ln,Oe),Br=_e()((0,ye.Z)((0,ye.Z)((0,ye.Z)({},Gn,!0),"".concat(Gn,"-disabled"),sr),An,An)),Cr=ir?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},oi=sr?{}:{onClick:vr?this.onClick:function(){},onKeyDown:vr?this.onKeyDown:function(){},onMouseEnter:yr,onMouseLeave:Dr,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return it.createElement(Mn,(0,je.Z)({},oi,{className:Br,role:"button",style:Nr}),it.createElement("input",(0,je.Z)({},(0,z.Z)(ii,{aria:!0,data:!0}),{id:hn,disabled:sr,type:"file",ref:this.saveFileInput,onClick:function(Ri){return Ri.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:hi},Cr,{multiple:Zr,onChange:this.onChange},yn!=null?{capture:yn}:{})),Yn)}}]),En}(it.Component),Re=Fe;function Ye(){}var ze=function(tn){(0,be.Z)(En,tn);var fn=(0,Ce.Z)(En);function En(){var pn;(0,ve.Z)(this,En);for(var Ln=arguments.length,Mn=new Array(Ln),Gn=0;Gn<Ln;Gn++)Mn[Gn]=arguments[Gn];return pn=fn.call.apply(fn,[this].concat(Mn)),pn.uploader=void 0,pn.saveUploader=function(An){pn.uploader=An},pn}return(0,ce.Z)(En,[{key:"abort",value:function(Ln){this.uploader.abort(Ln)}},{key:"render",value:function(){return it.createElement(Re,(0,je.Z)({},this.props,{ref:this.saveUploader}))}}]),En}(it.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 Ze=ze,at=Ze,ht=$e(18929),pt=$e(4676),Mt=$e(36355),et=$e(1684),ot=$e(9763),wt=$e(31724),Et={icon:function(fn,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:fn}}]}},name:"file",theme:"twotone"},Tt=Et,vt=$e(7657),gt=function(fn,En){return it.createElement(vt.Z,(0,je.Z)({},fn,{ref:En,icon:Tt}))},yt=it.forwardRef(gt),It=yt,Ot=$e(58617),Vt={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=Vt,mt=function(fn,En){return it.createElement(vt.Z,(0,je.Z)({},fn,{ref:En,icon:Ct}))},nt=it.forwardRef(mt),ft=nt,Xe={icon:function(fn,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:fn}},{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:fn}}]}},name:"picture",theme:"twotone"},ut=Xe,bt=function(fn,En){return it.createElement(vt.Z,(0,je.Z)({},fn,{ref:En,icon:ut}))},St=it.forwardRef(bt),lt=St,Qe=$e(77900),Ue=$e(56762),We=$e(62892),qe=$e(92343),He=$e(3113);function De(tn){return Object.assign(Object.assign({},tn),{lastModified:tn.lastModified,lastModifiedDate:tn.lastModifiedDate,name:tn.name,size:tn.size,type:tn.type,uid:tn.uid,percent:0,originFileObj:tn})}function Le(tn,fn){const En=(0,xt.Z)(fn),pn=En.findIndex(Ln=>{let{uid:Mn}=Ln;return Mn===tn.uid});return pn===-1?En.push(tn):En[pn]=tn,En}function Ke(tn,fn){const En=tn.uid!==void 0?"uid":"name";return fn.filter(pn=>pn[En]===tn[En])[0]}function dt(tn,fn){const En=tn.uid!==void 0?"uid":"name",pn=fn.filter(Ln=>Ln[En]!==tn[En]);return pn.length===fn.length?null:pn}const Ve=function(){const fn=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),pn=fn[fn.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(pn)||[""])[0]},kt=tn=>tn.indexOf("image/")===0,zt=tn=>{if(tn.type&&!tn.thumbUrl)return kt(tn.type);const fn=tn.thumbUrl||tn.url||"",En=Ve(fn);return/^data:image\//.test(fn)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(En)?!0:!(/^data:/.test(fn)||En)},Xt=200;function At(tn){return new Promise(fn=>{if(!tn.type||!kt(tn.type)){fn("");return}const En=document.createElement("canvas");En.width=Xt,En.height=Xt,En.style.cssText=`position: fixed; left: 0; top: 0; width: ${Xt}px; height: ${Xt}px; z-index: 9999; display: none;`,document.body.appendChild(En);const pn=En.getContext("2d"),Ln=new Image;if(Ln.onload=()=>{const{width:Mn,height:Gn}=Ln;let An=Xt,sr=Xt,hn=0,Nr=0;Mn>Gn?(sr=Gn*(Xt/Mn),Nr=-(sr-An)/2):(An=Mn*(Xt/Gn),hn=-(An-sr)/2),pn.drawImage(Ln,hn,Nr,An,sr);const Zr=En.toDataURL();document.body.removeChild(En),window.URL.revokeObjectURL(Ln.src),fn(Zr)},Ln.crossOrigin="anonymous",tn.type.startsWith("image/svg+xml")){const Mn=new FileReader;Mn.onload=()=>{Mn.result&&(Ln.src=Mn.result)},Mn.readAsDataURL(tn)}else if(tn.type.startsWith("image/gif")){const Mn=new FileReader;Mn.onload=()=>{Mn.result&&fn(Mn.result)},Mn.readAsDataURL(tn)}else Ln.src=window.URL.createObjectURL(tn)})}var Nt=$e(26227),qt=$e(41464),on=$e(15277),gn=$e(93948),kn=$e(6848),Xn=it.forwardRef((tn,fn)=>{let{prefixCls:En,className:pn,style:Ln,locale:Mn,listType:Gn,file:An,items:sr,progress:hn,iconRender:Nr,actionIconRender:Zr,itemRender:hi,isImgUrl:yn,showPreviewIcon:Yn,showRemoveIcon:ir,showDownloadIcon:vr,previewIcon:yr,removeIcon:Dr,downloadIcon:ii,onPreview:Br,onDownload:Cr,onClose:oi}=tn;var Tn,Ri;const{status:Nn}=An,[fi,xo]=it.useState(Nn);it.useEffect(()=>{Nn!=="removed"&&xo(Nn)},[Nn]);const[zi,Lo]=it.useState(!1);it.useEffect(()=>{const io=setTimeout(()=>{Lo(!0)},300);return()=>{clearTimeout(io)}},[]);const yo=Nr(An);let Ur=it.createElement("div",{className:`${En}-icon`},yo);if(Gn==="picture"||Gn==="picture-card"||Gn==="picture-circle")if(fi==="uploading"||!An.thumbUrl&&!An.url){const io=_e()(`${En}-list-item-thumbnail`,{[`${En}-list-item-file`]:fi!=="uploading"});Ur=it.createElement("div",{className:io},yo)}else{const io=yn!=null&&yn(An)?it.createElement("img",{src:An.thumbUrl||An.url,alt:An.name,className:`${En}-list-item-image`,crossOrigin:An.crossOrigin}):yo,Gr=_e()(`${En}-list-item-thumbnail`,{[`${En}-list-item-file`]:yn&&!yn(An)});Ur=it.createElement("a",{className:Gr,onClick:Tr=>Br(An,Tr),href:An.url||An.thumbUrl,target:"_blank",rel:"noopener noreferrer"},io)}const $r=_e()(`${En}-list-item`,`${En}-list-item-${fi}`),Ti=typeof An.linkProps=="string"?JSON.parse(An.linkProps):An.linkProps,Hi=ir?Zr((typeof Dr=="function"?Dr(An):Dr)||it.createElement(Nt.Z,null),()=>oi(An),En,Mn.removeFile):null,cr=vr&&fi==="done"?Zr((typeof ii=="function"?ii(An):ii)||it.createElement(qt.Z,null),()=>Cr(An),En,Mn.downloadFile):null,jt=Gn!=="picture-card"&&Gn!=="picture-circle"&&it.createElement("span",{key:"download-delete",className:_e()(`${En}-list-item-actions`,{picture:Gn==="picture"})},cr,Hi),ji=_e()(`${En}-list-item-name`),Rr=An.url?[it.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:ji,title:An.name},Ti,{href:An.url,onClick:io=>Br(An,io)}),An.name),jt]:[it.createElement("span",{key:"view",className:ji,onClick:io=>Br(An,io),title:An.name},An.name),jt],jr={pointerEvents:"none",opacity:.5},_i=Yn?it.createElement("a",{href:An.url||An.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:An.url||An.thumbUrl?void 0:jr,onClick:io=>Br(An,io),title:Mn.previewFile},typeof yr=="function"?yr(An):yr||it.createElement(on.Z,null)):null,Ji=(Gn==="picture-card"||Gn==="picture-circle")&&fi!=="uploading"&&it.createElement("span",{className:`${En}-list-item-actions`},_i,fi==="done"&&cr,Hi),{getPrefixCls:_r}=it.useContext(Mt.E_),Kr=_r(),Pi=it.createElement("div",{className:$r},Ur,Rr,Ji,zi&&it.createElement(Qe.default,{motionName:`${Kr}-fade`,visible:fi==="uploading",motionDeadline:2e3},io=>{let{className:Gr}=io;const Tr="percent"in An?it.createElement(gn.Z,Object.assign({},hn,{type:"line",percent:An.percent,"aria-label":An["aria-label"],"aria-labelledby":An["aria-labelledby"]})):null;return it.createElement("div",{className:_e()(`${En}-list-item-progress`,Gr)},Tr)})),gi=An.response&&typeof An.response=="string"?An.response:((Tn=An.error)===null||Tn===void 0?void 0:Tn.statusText)||((Ri=An.error)===null||Ri===void 0?void 0:Ri.message)||Mn.uploadError,Vi=fi==="error"?it.createElement(kn.Z,{title:gi,getPopupContainer:io=>io.parentNode},Pi):Pi;return it.createElement("div",{className:_e()(`${En}-list-item-container`,pn),style:Ln,ref:fn},hi?hi(Vi,An,sr,{download:Cr.bind(null,An),preview:Br.bind(null,An),remove:oi.bind(null,An)}):Vi)});const hr=(tn,fn)=>{const{listType:En="text",previewFile:pn=At,onPreview:Ln,onDownload:Mn,onRemove:Gn,locale:An,iconRender:sr,isImageUrl:hn=zt,prefixCls:Nr,items:Zr=[],showPreviewIcon:hi=!0,showRemoveIcon:yn=!0,showDownloadIcon:Yn=!1,removeIcon:ir,previewIcon:vr,downloadIcon:yr,progress:Dr={size:[-1,2],showInfo:!1},appendAction:ii,appendActionVisible:Br=!0,itemRender:Cr,disabled:oi}=tn,Tn=(0,Ue.Z)(),[Ri,Nn]=it.useState(!1);it.useEffect(()=>{En!=="picture"&&En!=="picture-card"&&En!=="picture-circle"||(Zr||[]).forEach(jr=>{typeof document=="undefined"||typeof window=="undefined"||!window.FileReader||!window.File||!(jr.originFileObj instanceof File||jr.originFileObj instanceof Blob)||jr.thumbUrl!==void 0||(jr.thumbUrl="",pn&&pn(jr.originFileObj).then(_i=>{jr.thumbUrl=_i||"",Tn()}))})},[En,Zr,pn]),it.useEffect(()=>{Nn(!0)},[]);const fi=(jr,_i)=>{if(Ln)return _i==null||_i.preventDefault(),Ln(jr)},xo=jr=>{typeof Mn=="function"?Mn(jr):jr.url&&window.open(jr.url)},zi=jr=>{Gn==null||Gn(jr)},Lo=jr=>{if(sr)return sr(jr,En);const _i=jr.status==="uploading",Ji=hn&&hn(jr)?it.createElement(lt,null):it.createElement(It,null);let _r=_i?it.createElement(Ot.Z,null):it.createElement(ft,null);return En==="picture"?_r=_i?it.createElement(Ot.Z,null):Ji:(En==="picture-card"||En==="picture-circle")&&(_r=_i?An.uploading:Ji),_r},yo=(jr,_i,Ji,_r)=>{const Kr={type:"text",size:"small",title:_r,onClick:Pi=>{_i(),(0,qe.l$)(jr)&&jr.props.onClick&&jr.props.onClick(Pi)},className:`${Ji}-list-item-action`,disabled:oi};if((0,qe.l$)(jr)){const Pi=(0,qe.Tm)(jr,Object.assign(Object.assign({},jr.props),{onClick:()=>{}}));return it.createElement(He.ZP,Object.assign({},Kr,{icon:Pi}))}return it.createElement(He.ZP,Object.assign({},Kr),it.createElement("span",null,jr))};it.useImperativeHandle(fn,()=>({handlePreview:fi,handleDownload:xo}));const{getPrefixCls:Ur}=it.useContext(Mt.E_),$r=Ur("upload",Nr),Ti=Ur(),Hi=_e()(`${$r}-list`,`${$r}-list-${En}`),cr=(0,xt.Z)(Zr.map(jr=>({key:jr.uid,file:jr})));let ji={motionDeadline:2e3,motionName:`${$r}-${En==="picture-card"||En==="picture-circle"?"animate-inline":"animate"}`,keys:cr,motionAppear:Ri};const Rr=it.useMemo(()=>{const jr=Object.assign({},(0,We.Z)(Ti));return delete jr.onAppearEnd,delete jr.onEnterEnd,delete jr.onLeaveEnd,jr},[Ti]);return En!=="picture-card"&&En!=="picture-circle"&&(ji=Object.assign(Object.assign({},Rr),ji)),it.createElement("div",{className:Hi},it.createElement(Qe.CSSMotionList,Object.assign({},ji,{component:!1}),jr=>{let{key:_i,file:Ji,className:_r,style:Kr}=jr;return it.createElement(Xn,{key:_i,locale:An,prefixCls:$r,className:_r,style:Kr,file:Ji,items:Zr,progress:Dr,listType:En,isImgUrl:hn,showPreviewIcon:hi,showRemoveIcon:yn,showDownloadIcon:Yn,removeIcon:ir,previewIcon:vr,downloadIcon:yr,iconRender:Lo,actionIconRender:yo,itemRender:Cr,onPreview:fi,onDownload:xo,onClose:zi})}),ii&&it.createElement(Qe.default,Object.assign({},ji,{visible:Br,forceRender:!0}),jr=>{let{className:_i,style:Ji}=jr;return(0,qe.Tm)(ii,_r=>({className:_e()(_r.className,_i),style:Object.assign(Object.assign(Object.assign({},Ji),{pointerEvents:_i?"none":void 0}),_r.style)}))}))};var fr=it.forwardRef(hr),xr=$e(17313),Hr=$e(8378),Yr=$e(83116),Or=$e(37613),Jr=tn=>{const{componentCls:fn,iconCls:En}=tn;return{[`${fn}-wrapper`]:{[`${fn}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:tn.colorFillAlter,border:`${tn.lineWidth}px dashed ${tn.colorBorder}`,borderRadius:tn.borderRadiusLG,cursor:"pointer",transition:`border-color ${tn.motionDurationSlow}`,[fn]:{padding:`${tn.padding}px 0`},[`${fn}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none"},[`${fn}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`&:not(${fn}-disabled):hover`]:{borderColor:tn.colorPrimaryHover},[`p${fn}-drag-icon`]:{marginBottom:tn.margin,[En]:{color:tn.colorPrimary,fontSize:tn.uploadThumbnailSize}},[`p${fn}-text`]:{margin:`0 0 ${tn.marginXXS}px`,color:tn.colorTextHeading,fontSize:tn.fontSizeLG},[`p${fn}-hint`]:{color:tn.colorTextDescription,fontSize:tn.fontSize},[`&${fn}-disabled`]:{cursor:"not-allowed",[`p${fn}-drag-icon ${En},
|
|
|
p${fn}-text,
|
|
|
p${fn}-hint
|
|
|
`]:{color:tn.colorTextDisabled}}}}}},li=tn=>{const{componentCls:fn,antCls:En,iconCls:pn,fontSize:Ln,lineHeight:Mn}=tn,Gn=`${fn}-list-item`,An=`${Gn}-actions`,sr=`${Gn}-action`,hn=Math.round(Ln*Mn);return{[`${fn}-wrapper`]:{[`${fn}-list`]:Object.assign(Object.assign({},(0,xr.dF)()),{lineHeight:tn.lineHeight,[Gn]:{position:"relative",height:tn.lineHeight*Ln,marginTop:tn.marginXS,fontSize:Ln,display:"flex",alignItems:"center",transition:`background-color ${tn.motionDurationSlow}`,"&:hover":{backgroundColor:tn.controlItemBgHover},[`${Gn}-name`]:Object.assign(Object.assign({},xr.vS),{padding:`0 ${tn.paddingXS}px`,lineHeight:Mn,flex:"auto",transition:`all ${tn.motionDurationSlow}`}),[An]:{[sr]:{opacity:0},[`${sr}${En}-btn-sm`]:{height:hn,border:0,lineHeight:1,"> span":{transform:"scale(1)"}},[`
|
|
|
${sr}:focus-visible,
|
|
|
&.picture ${sr}
|
|
|
`]:{opacity:1},[pn]:{color:tn.actionsColor,transition:`all ${tn.motionDurationSlow}`},[`&:hover ${pn}`]:{color:tn.colorText}},[`${fn}-icon ${pn}`]:{color:tn.colorTextDescription,fontSize:Ln},[`${Gn}-progress`]:{position:"absolute",bottom:-tn.uploadProgressOffset,width:"100%",paddingInlineStart:Ln+tn.paddingXS,fontSize:Ln,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${Gn}:hover ${sr}`]:{opacity:1,color:tn.colorText},[`${Gn}-error`]:{color:tn.colorError,[`${Gn}-name, ${fn}-icon ${pn}`]:{color:tn.colorError},[An]:{[`${pn}, ${pn}:hover`]:{color:tn.colorError},[sr]:{opacity:1}}},[`${fn}-list-item-container`]:{transition:`opacity ${tn.motionDurationSlow}, height ${tn.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},Si=$e(93083),xi=$e(1950);const lr=new Si.Keyframes("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),Ar=new Si.Keyframes("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}});var Ii=tn=>{const{componentCls:fn}=tn,En=`${fn}-animate-inline`;return[{[`${fn}-wrapper`]:{[`${En}-appear, ${En}-enter, ${En}-leave`]:{animationDuration:tn.motionDurationSlow,animationTimingFunction:tn.motionEaseInOutCirc,animationFillMode:"forwards"},[`${En}-appear, ${En}-enter`]:{animationName:lr},[`${En}-leave`]:{animationName:Ar}}},{[`${fn}-wrapper`]:(0,xi.J$)(tn)},lr,Ar]},wr=$e(93398),cn=$e(64993);const un=tn=>{const{componentCls:fn,iconCls:En,uploadThumbnailSize:pn,uploadProgressOffset:Ln}=tn,Mn=`${fn}-list`,Gn=`${Mn}-item`;return{[`${fn}-wrapper`]:{[`
|
|
|
${Mn}${Mn}-picture,
|
|
|
${Mn}${Mn}-picture-card,
|
|
|
${Mn}${Mn}-picture-circle
|
|
|
`]:{[Gn]:{position:"relative",height:pn+tn.lineWidth*2+tn.paddingXS*2,padding:tn.paddingXS,border:`${tn.lineWidth}px ${tn.lineType} ${tn.colorBorder}`,borderRadius:tn.borderRadiusLG,"&:hover":{background:"transparent"},[`${Gn}-thumbnail`]:Object.assign(Object.assign({},xr.vS),{width:pn,height:pn,lineHeight:`${pn+tn.paddingSM}px`,textAlign:"center",flex:"none",[En]:{fontSize:tn.fontSizeHeading2,color:tn.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${Gn}-progress`]:{bottom:Ln,width:`calc(100% - ${tn.paddingSM*2}px)`,marginTop:0,paddingInlineStart:pn+tn.paddingXS}},[`${Gn}-error`]:{borderColor:tn.colorError,[`${Gn}-thumbnail ${En}`]:{[`svg path[fill='${wr.blue[0]}']`]:{fill:tn.colorErrorBg},[`svg path[fill='${wr.blue.primary}']`]:{fill:tn.colorError}}},[`${Gn}-uploading`]:{borderStyle:"dashed",[`${Gn}-name`]:{marginBottom:Ln}}},[`${Mn}${Mn}-picture-circle ${Gn}`]:{[`&, &::before, ${Gn}-thumbnail`]:{borderRadius:"50%"}}}}},Dt=tn=>{const{componentCls:fn,iconCls:En,fontSizeLG:pn,colorTextLightSolid:Ln}=tn,Mn=`${fn}-list`,Gn=`${Mn}-item`,An=tn.uploadPicCardSize;return{[`
|
|
|
${fn}-wrapper${fn}-picture-card-wrapper,
|
|
|
${fn}-wrapper${fn}-picture-circle-wrapper
|
|
|
`]:Object.assign(Object.assign({},(0,xr.dF)()),{display:"inline-block",width:"100%",[`${fn}${fn}-select`]:{width:An,height:An,marginInlineEnd:tn.marginXS,marginBottom:tn.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:tn.colorFillAlter,border:`${tn.lineWidth}px dashed ${tn.colorBorder}`,borderRadius:tn.borderRadiusLG,cursor:"pointer",transition:`border-color ${tn.motionDurationSlow}`,[`> ${fn}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${fn}-disabled):hover`]:{borderColor:tn.colorPrimary}},[`${Mn}${Mn}-picture-card, ${Mn}${Mn}-picture-circle`]:{[`${Mn}-item-container`]:{display:"inline-block",width:An,height:An,marginBlock:`0 ${tn.marginXS}px`,marginInline:`0 ${tn.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[Gn]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${tn.paddingXS*2}px)`,height:`calc(100% - ${tn.paddingXS*2}px)`,backgroundColor:tn.colorBgMask,opacity:0,transition:`all ${tn.motionDurationSlow}`,content:'" "'}},[`${Gn}:hover`]:{[`&::before, ${Gn}-actions`]:{opacity:1}},[`${Gn}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${tn.motionDurationSlow}`,[`${En}-eye, ${En}-download, ${En}-delete`]:{zIndex:10,width:pn,margin:`0 ${tn.marginXXS}px`,fontSize:pn,cursor:"pointer",transition:`all ${tn.motionDurationSlow}`,svg:{verticalAlign:"baseline"}}},[`${Gn}-actions, ${Gn}-actions:hover`]:{[`${En}-eye, ${En}-download, ${En}-delete`]:{color:new cn.C(Ln).setAlpha(.65).toRgbString(),"&:hover":{color:Ln}}},[`${Gn}-thumbnail, ${Gn}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${Gn}-name`]:{display:"none",textAlign:"center"},[`${Gn}-file + ${Gn}-name`]:{position:"absolute",bottom:tn.margin,display:"block",width:`calc(100% - ${tn.paddingXS*2}px)`},[`${Gn}-uploading`]:{[`&${Gn}`]:{backgroundColor:tn.colorFillAlter},[`&::before, ${En}-eye, ${En}-download, ${En}-delete`]:{display:"none"}},[`${Gn}-progress`]:{bottom:tn.marginXL,width:`calc(100% - ${tn.paddingXS*2}px)`,paddingInlineStart:0}}}),[`${fn}-wrapper${fn}-picture-circle-wrapper`]:{[`${fn}${fn}-select`]:{borderRadius:"50%"}}}};var On=tn=>{const{componentCls:fn}=tn;return{[`${fn}-rtl`]:{direction:"rtl"}}};const Jt=tn=>{const{componentCls:fn,colorTextDisabled:En}=tn;return{[`${fn}-wrapper`]:Object.assign(Object.assign({},(0,xr.Wf)(tn)),{[fn]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${fn}-select`]:{display:"inline-block"},[`${fn}-disabled`]:{color:En,cursor:"not-allowed"}})}};var Ut=(0,Yr.Z)("Upload",tn=>{const{fontSizeHeading3:fn,fontSize:En,lineHeight:pn,lineWidth:Ln,controlHeightLG:Mn}=tn,Gn=Math.round(En*pn),An=(0,Or.TS)(tn,{uploadThumbnailSize:fn*2,uploadProgressOffset:Gn/2+Ln,uploadPicCardSize:Mn*2.55});return[Jt(An),Jr(An),un(An),Dt(An),li(An),Ii(An),On(An),(0,Hr.Z)(An)]},tn=>({actionsColor:tn.colorTextDescription})),wn=function(tn,fn,En,pn){function Ln(Mn){return Mn instanceof En?Mn:new En(function(Gn){Gn(Mn)})}return new(En||(En=Promise))(function(Mn,Gn){function An(Nr){try{hn(pn.next(Nr))}catch(Zr){Gn(Zr)}}function sr(Nr){try{hn(pn.throw(Nr))}catch(Zr){Gn(Zr)}}function hn(Nr){Nr.done?Mn(Nr.value):Ln(Nr.value).then(An,sr)}hn((pn=pn.apply(tn,fn||[])).next())})};const _n=`__LIST_IGNORE_${Date.now()}__`,Qn=(tn,fn)=>{const{fileList:En,defaultFileList:pn,onRemove:Ln,showUploadList:Mn=!0,listType:Gn="text",onPreview:An,onDownload:sr,onChange:hn,onDrop:Nr,previewFile:Zr,disabled:hi,locale:yn,iconRender:Yn,isImageUrl:ir,progress:vr,prefixCls:yr,className:Dr,type:ii="select",children:Br,style:Cr,itemRender:oi,maxCount:Tn,data:Ri={},multiple:Nn=!1,action:fi="",accept:xo="",supportServerRender:zi=!0,rootClassName:Lo}=tn,yo=it.useContext(et.Z),Ur=hi!=null?hi:yo,[$r,Ti]=(0,ht.Z)(pn||[],{value:En,postState:So=>So!=null?So:[]}),[Hi,cr]=it.useState("drop"),jt=it.useRef(null);it.useMemo(()=>{const So=Date.now();(En||[]).forEach((ro,va)=>{!ro.uid&&!Object.isFrozen(ro)&&(ro.uid=`__AUTO__${So}_${va}__`)})},[En]);const ji=(So,ro,va)=>{let Io=(0,xt.Z)(ro),qi=!1;Tn===1?Io=Io.slice(-1):Tn&&(qi=Io.length>Tn,Io=Io.slice(0,Tn)),(0,pt.flushSync)(()=>{Ti(Io)});const No={file:So,fileList:Io};va&&(No.event=va),(!qi||Io.some(xs=>xs.uid===So.uid))&&(0,pt.flushSync)(()=>{hn==null||hn(No)})},Rr=(So,ro)=>wn(void 0,void 0,void 0,function*(){const{beforeUpload:va,transformFile:Io}=tn;let qi=So;if(va){const No=yield va(So,ro);if(No===!1)return!1;if(delete So[_n],No===_n)return Object.defineProperty(So,_n,{value:!0,configurable:!0}),!1;typeof No=="object"&&No&&(qi=No)}return Io&&(qi=yield Io(qi)),qi}),jr=So=>{const ro=So.filter(qi=>!qi.file[_n]);if(!ro.length)return;const va=ro.map(qi=>De(qi.file));let Io=(0,xt.Z)($r);va.forEach(qi=>{Io=Le(qi,Io)}),va.forEach((qi,No)=>{let xs=qi;if(ro[No].parsedFile)qi.status="uploading";else{const{originFileObj:wi}=qi;let lo;try{lo=new File([wi],wi.name,{type:wi.type})}catch(ao){lo=new Blob([wi],{type:wi.type}),lo.name=wi.name,lo.lastModifiedDate=new Date,lo.lastModified=new Date().getTime()}lo.uid=qi.uid,xs=lo}ji(xs,Io)})},_i=(So,ro,va)=>{try{typeof So=="string"&&(So=JSON.parse(So))}catch(No){}if(!Ke(ro,$r))return;const Io=De(ro);Io.status="done",Io.percent=100,Io.response=So,Io.xhr=va;const qi=Le(Io,$r);ji(Io,qi)},Ji=(So,ro)=>{if(!Ke(ro,$r))return;const va=De(ro);va.status="uploading",va.percent=So.percent;const Io=Le(va,$r);ji(va,Io,So)},_r=(So,ro,va)=>{if(!Ke(va,$r))return;const Io=De(va);Io.error=So,Io.response=ro,Io.status="error";const qi=Le(Io,$r);ji(Io,qi)},Kr=So=>{let ro;Promise.resolve(typeof Ln=="function"?Ln(So):Ln).then(va=>{var Io;if(va===!1)return;const qi=dt(So,$r);qi&&(ro=Object.assign(Object.assign({},So),{status:"removed"}),$r==null||$r.forEach(No=>{const xs=ro.uid!==void 0?"uid":"name";No[xs]===ro[xs]&&!Object.isFrozen(No)&&(No.status="removed")}),(Io=jt.current)===null||Io===void 0||Io.abort(ro),ji(ro,qi))})},Pi=So=>{cr(So.type),So.type==="drop"&&(Nr==null||Nr(So))};it.useImperativeHandle(fn,()=>({onBatchStart:jr,onSuccess:_i,onProgress:Ji,onError:_r,fileList:$r,upload:jt.current}));const{getPrefixCls:gi,direction:Vi,upload:io}=it.useContext(Mt.E_),Gr=gi("upload",yr),Tr=Object.assign(Object.assign({onBatchStart:jr,onError:_r,onProgress:Ji,onSuccess:_i},tn),{data:Ri,multiple:Nn,action:fi,accept:xo,supportServerRender:zi,prefixCls:Gr,disabled:Ur,beforeUpload:Rr,onChange:void 0});delete Tr.className,delete Tr.style,(!Br||Ur)&&delete Tr.id;const[Vn,ai]=Ut(Gr),[Qi]=(0,ot.Z)("Upload",wt.Z.Upload),{showRemoveIcon:zo,showPreviewIcon:Mo,showDownloadIcon:Uo,removeIcon:ca,previewIcon:Jo,downloadIcon:qa}=typeof Mn=="boolean"?{}:Mn,La=(So,ro)=>Mn?it.createElement(fr,{prefixCls:Gr,listType:Gn,items:$r,previewFile:Zr,onPreview:An,onDownload:sr,onRemove:Kr,showRemoveIcon:!Ur&&zo,showPreviewIcon:Mo,showDownloadIcon:Uo,removeIcon:ca,previewIcon:Jo,downloadIcon:qa,iconRender:Yn,locale:Object.assign(Object.assign({},Qi),yn),isImageUrl:ir,progress:vr,appendAction:So,appendActionVisible:ro,itemRender:oi,disabled:Ur}):So,es=_e()(`${Gr}-wrapper`,Dr,Lo,ai,io==null?void 0:io.className,{[`${Gr}-rtl`]:Vi==="rtl",[`${Gr}-picture-card-wrapper`]:Gn==="picture-card",[`${Gr}-picture-circle-wrapper`]:Gn==="picture-circle"}),bn=Object.assign(Object.assign({},io==null?void 0:io.style),Cr);if(ii==="drag"){const So=_e()(ai,Gr,`${Gr}-drag`,{[`${Gr}-drag-uploading`]:$r.some(ro=>ro.status==="uploading"),[`${Gr}-drag-hover`]:Hi==="dragover",[`${Gr}-disabled`]:Ur,[`${Gr}-rtl`]:Vi==="rtl"});return Vn(it.createElement("span",{className:es},it.createElement("div",{className:So,style:bn,onDrop:Pi,onDragOver:Pi,onDragLeave:Pi},it.createElement(at,Object.assign({},Tr,{ref:jt,className:`${Gr}-btn`}),it.createElement("div",{className:`${Gr}-drag-container`},Br))),La()))}const ma=_e()(Gr,`${Gr}-select`,{[`${Gr}-disabled`]:Ur}),el=(So=>it.createElement("div",{className:ma,style:So},it.createElement(at,Object.assign({},Tr,{ref:jt}))))(Br?void 0:{display:"none"});return Vn(Gn==="picture-card"||Gn==="picture-circle"?it.createElement("span",{className:es},La(el,!!Br)):it.createElement("span",{className:es},el,La()))};var Wt=it.forwardRef(Qn),In=function(tn,fn){var En={};for(var pn in tn)Object.prototype.hasOwnProperty.call(tn,pn)&&fn.indexOf(pn)<0&&(En[pn]=tn[pn]);if(tn!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ln=0,pn=Object.getOwnPropertySymbols(tn);Ln<pn.length;Ln++)fn.indexOf(pn[Ln])<0&&Object.prototype.propertyIsEnumerable.call(tn,pn[Ln])&&(En[pn[Ln]]=tn[pn[Ln]]);return En},ar=it.forwardRef((tn,fn)=>{var{style:En,height:pn}=tn,Ln=In(tn,["style","height"]);return it.createElement(Wt,Object.assign({ref:fn},Ln,{type:"drag",style:Object.assign(Object.assign({},En),{height:pn})}))});const mn=Wt;mn.Dragger=ar,mn.LIST_IGNORE=_n;var Cn=mn},99498:function(Pn,an,$e){(function(it){it($e(89780))})(function(it){it.defineOption("placeholder","",function(be,Ce,ye){var we=ye&&ye!=it.Init;if(Ce&&!we)be.on("blur",je),be.on("change",ve),be.on("swapDoc",ve),it.on(be.getInputField(),"compositionupdate",be.state.placeholderCompose=function(){_e(be)}),ve(be);else if(!Ce&&we){be.off("blur",je),be.off("change",ve),be.off("swapDoc",ve),it.off(be.getInputField(),"compositionupdate",be.state.placeholderCompose),xt(be);var me=be.getWrapperElement();me.className=me.className.replace(" CodeMirror-empty","")}Ce&&!be.hasFocus()&&je(be)});function xt(be){be.state.placeholder&&(be.state.placeholder.parentNode.removeChild(be.state.placeholder),be.state.placeholder=null)}function ie(be){xt(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 _e(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):xt(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):xt(be)}function ce(be){return be.lineCount()===1&&be.getLine(0)===""}})},25717:function(Pn,an,$e){(function(it){it($e(89780))})(function(it){var xt={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},ie=it.Pos;it.defineOption("autoCloseBrackets",!1,function(z,ee,ae){ae&&ae!=it.Init&&(z.removeKeyMap(je),z.state.closeBrackets=null),ee&&(ve(_e(ee,"pairs")),z.state.closeBrackets=ee,z.addKeyMap(je))});function _e(z,ee){return ee=="pairs"&&typeof z=="string"?z:typeof z=="object"&&z[ee]!=null?z[ee]:xt[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(xt.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 it.Pass;for(var ae=_e(ee,"pairs"),re=z.listSelections(),le=0;le<re.length;le++){if(!re[le].empty())return it.Pass;var ue=xe(z,re[le].head);if(!ue||ae.indexOf(ue)%2!=0)return it.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&&_e(ee,"explode");if(!ae||z.getOption("disableInput"))return it.Pass;for(var re=z.listSelections(),le=0;le<re.length;le++){if(!re[le].empty())return it.Pass;var ue=xe(z,re[le].head);if(!ue||ae.indexOf(ue)%2!=0)return it.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=it.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 it.Pass;var re=_e(ae,"pairs"),le=re.indexOf(ee);if(le==-1)return it.Pass;for(var ue=_e(ae,"closeBefore"),pe=_e(ae,"triples"),Ee=re.charAt(le+1)==ee,Pe=z.listSelections(),Ie=le%2==0,ke,Ne=0;Ne<Pe.length;Ne++){var Oe=Pe[Ne],Fe=Oe.head,Re,Ye=z.getRange(Fe,ie(Fe.line,Fe.ch+1));if(Ie&&!Oe.empty())Re="surround";else if((Ee||!Ie)&&Ye==ee)Ee&&fe(z,Fe)?Re="both":pe.indexOf(ee)>=0&&z.getRange(Fe,ie(Fe.line,Fe.ch+3))==ee+ee+ee?Re="skipThree":Re="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 it.Pass;Re="addFour"}else if(Ee){var ze=Fe.ch==0?" ":z.getRange(ie(Fe.line,Fe.ch-1),Fe);if(!it.isWordChar(Ye)&&ze!=ee&&!it.isWordChar(ze))Re="both";else return it.Pass}else if(Ie&&(Ye.length===0||/\s/.test(Ye)||ue.indexOf(Ye)>-1))Re="both";else return it.Pass;if(!ke)ke=Re;else if(ke!=Re)return it.Pass}var Ze=le%2?re.charAt(le-1):ee,at=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 pt=z.getSelections(),ht=0;ht<pt.length;ht++)pt[ht]=Ze+pt[ht]+at;z.replaceSelections(pt,"around"),pt=z.listSelections().slice();for(var ht=0;ht<pt.length;ht++)pt[ht]=we(pt[ht]);z.setSelections(pt)}else ke=="both"?(z.replaceSelection(Ze+at,null),z.triggerElectric(Ze+at),z.execCommand("goCharLeft")):ke=="addFour"&&(z.replaceSelection(Ze+Ze+Ze+Ze,"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(Pn,an,$e){(function(it){it($e(89780),$e(32855))})(function(it){it.defineOption("autoCloseTags",!1,function(Ce,ye,we){if(we!=it.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 _e(xe)}),Ce.addKeyMap(me)}});var xt=["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 _e(Ce){if(Ce.getOption("disableInput"))return it.Pass;for(var ye=Ce.listSelections(),we=[],me=Ce.getOption("autoCloseTags"),xe=0;xe<ye.length;xe++){if(!ye[xe].empty())return it.Pass;var fe=ye[xe].head,z=Ce.getTokenAt(fe),ee=it.innerMode(Ce.getMode(),z.state),ae=ee.state,re=ee.mode.xmlCurrentTag&&ee.mode.xmlCurrentTag(ae),le=re&&re.name;if(!le)return it.Pass;var ue=ee.mode.configuration=="html",pe=typeof me=="object"&&me.dontCloseTags||ue&&xt,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 it.Pass;var Ie=typeof me=="object"&&me.emptyTags;if(Ie&&ce(Ie,le)>-1){we[xe]={text:"/>",newPos:it.Pos(fe.line,fe.ch+2)};continue}var ke=Ee&&ce(Ee,Pe)>-1;we[xe]={indent:ke,text:">"+(ke?`
|
|
|
|
|
|
`:"")+"</"+le+">",newPos:ke?it.Pos(fe.line+1,0):it.Pos(fe.line,fe.ch+1)}}for(var Ne=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),!Ne&&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 it.Pass;var ae=we[ee].head,re=Ce.getTokenAt(ae),le=it.innerMode(Ce.getMode(),re.state),ue=le.state;if(ye&&(re.type=="string"||re.string.charAt(0)!="<"||re.start!=ae.ch-1))return it.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 it.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")?it.Pass:je(Ce,!0)}it.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(!it.scanForClosingTag)return!1;var fe=Math.min(Ce.lastLine()+1,me.line+500),z=it.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=it.scanForClosingTag(Ce,me,null,fe);if(!re||re.tag!=we)return!1;me=re.to}return!0}})},32855:function(Pn,an,$e){(function(it){it($e(89780))})(function(it){"use strict";var xt=it.Pos;function ie(ae,re){return ae.line-re.line||ae.ch-re.ch}var _e="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=_e+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ve=new RegExp("<(/?)(["+_e+"]["+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(xt(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:xt(Ee,Pe),to:xt(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:xt(ae.line,ae.ch),to:xt(pe,Ee)}}}}it.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=xt(le.line,le.ch),Pe=z(le,ue[2]);return Pe&&ie(Pe.from,Ee)>0?{from:Ee,to:Pe.from}:null}}}),it.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&&xt(ue.line,ue.ch),Pe=pe&&me(ue);if(!(!pe||!Pe||ie(ue,re)>0)){var Ie={from:xt(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"})}}},it.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}}},it.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(Pn){(function(an,$e){Pn.exports=$e()})(this,function(){"use strict";var an=navigator.userAgent,$e=navigator.platform,it=/gecko\/\d/i.test(an),xt=/MSIE \d/.test(an),ie=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(an),_e=/Edge\/(\d+)/.exec(an),je=xt||ie||_e,ve=je&&(xt?document.documentMode||6:+(_e||ie)[1]),ce=!_e&&/WebKit\//.test(an),be=ce&&/Qt\/\d+\.\d+/.test(an),Ce=!_e&&/Chrome\//.test(an),ye=/Opera\//.test(an),we=/Apple Computer/.test(navigator.vendor),me=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(an),xe=/PhantomJS/.test(an),fe=!_e&&/AppleWebKit/.test(an)&&/Mobile\/\w+/.test(an),z=/Android/.test(an),ee=fe||z||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(an),ae=fe||/Mac/.test($e),re=/\bCrOS\b/.test(an),le=/win/i.test($e),ue=ye&&an.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=it||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 Ne(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 st=0;st<de.length;++st)Be.appendChild(de[st]);return Be}function Fe(oe,de,Me,Te){var Be=Oe(oe,de,Me,Te);return Be.setAttribute("role","presentation"),Be}var Re;document.createRange?Re=function(oe,de,Me,Te){var Be=document.createRange();return Be.setEnd(Te||oe,Me),Be.setStart(oe,de),Be}:Re=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 Ze(oe,de){var Me=oe.className;Pe(de).test(Me)||(oe.className+=(Me?" ":"")+de)}function at(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 pt(oe){var de=Array.prototype.slice.call(arguments,1);return function(){return oe.apply(null,de)}}function Mt(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 st=Te||0,Pt=Be||0;;){var Rt=oe.indexOf(" ",st);if(Rt<0||Rt>=de)return Pt+(de-st);Pt+=Rt-st,Pt+=Me-Pt%Me,st=Rt+1}}var ot=function(){this.id=null,this.f=null,this.time=0,this.handler=pt(this.onTimeout,this)};ot.prototype.onTimeout=function(oe){oe.id=0,oe.time<=+new Date?oe.f():setTimeout(oe.handler,oe.time-+new Date)},ot.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 wt(oe,de){for(var Me=0;Me<oe.length;++Me)if(oe[Me]==de)return Me;return-1}var Et=50,Tt={toString:function(){return"CodeMirror.Pass"}},vt={scroll:!1},gt={origin:"*mouse"},yt={origin:"+move"};function It(oe,de,Me){for(var Te=0,Be=0;;){var st=oe.indexOf(" ",Te);st==-1&&(st=oe.length);var Pt=st-Te;if(st==oe.length||Be+Pt>=de)return Te+Math.min(Pt,de-Be);if(Be+=st-Te,Be+=Me-Be%Me,Te=st+1,Be>=de)return Te}}var Ot=[""];function Vt(oe){for(;Ot.length<=oe;)Ot.push(Ct(Ot)+" ");return Ot[oe]}function Ct(oe){return oe[oe.length-1]}function mt(oe,de){for(var Me=[],Te=0;Te<oe.length;Te++)Me[Te]=de(oe[Te],Te);return Me}function nt(oe,de,Me){for(var Te=0,Be=Me(de);Te<oe.length&&Me(oe[Te])<=Be;)Te++;oe.splice(Te,0,de)}function ft(){}function Xe(oe,de){var Me;return Object.create?Me=Object.create(oe):(ft.prototype=oe,Me=new ft),de&&Mt(de,Me),Me}var ut=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function bt(oe){return/\w/.test(oe)||oe>"\x80"&&(oe.toUpperCase()!=oe.toLowerCase()||ut.test(oe))}function St(oe,de){return de?de.source.indexOf("\\w")>-1&&bt(oe)?!0:de.test(oe):bt(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 Ue(oe){return oe.charCodeAt(0)>=768&&Qe.test(oe)}function We(oe,de,Me){for(;(Me<0?de>0:de<oe.length)&&Ue(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,st=Te<0?Math.ceil(Be):Math.floor(Be);if(st==de)return oe(st)?de:Me;oe(st)?Me=st:de=st+Te}}function He(oe,de,Me,Te){if(!oe)return Te(de,Me,"ltr",0);for(var Be=!1,st=0;st<oe.length;++st){var Pt=oe[st];(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",st),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 st=oe[Be];if(st.from<de&&st.to>de)return Be;st.to==de&&(st.from!=st.to&&Me=="before"?Te=Be:De=Be),st.from==de&&(st.from!=st.to&&Me!="before"?Te=Be:De=Be)}return Te!=null?Te:De}var Ke=function(){var oe="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",de="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function Me(Zt){return Zt<=247?oe.charAt(Zt):1424<=Zt&&Zt<=1524?"R":1536<=Zt&&Zt<=1785?de.charAt(Zt-1536):1774<=Zt&&Zt<=2220?"r":8192<=Zt&&Zt<=8203?"w":Zt==8204?"b":"L"}var Te=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,Be=/[stwN]/,st=/[LRr]/,Pt=/[Lb1n]/,Rt=/[1n]/;function Ft(Zt,Sn,Qt){this.level=Zt,this.from=Sn,this.to=Qt}return function(Zt,Sn){var Qt=Sn=="ltr"?"L":"R";if(Zt.length==0||Sn=="ltr"&&!Te.test(Zt))return!1;for(var zn=Zt.length,Fn=[],pr=0;pr<zn;++pr)Fn.push(Me(Zt.charCodeAt(pr)));for(var Pr=0,Ir=Qt;Pr<zn;++Pr){var ri=Fn[Pr];ri=="m"?Fn[Pr]=Ir:Ir=ri}for(var Mi=0,yi=Qt;Mi<zn;++Mi){var Bi=Fn[Mi];Bi=="1"&&yi=="r"?Fn[Mi]="n":st.test(Bi)&&(yi=Bi,Bi=="r"&&(Fn[Mi]="R"))}for(var mo=1,mi=Fn[0];mo<zn-1;++mo){var Oo=Fn[mo];Oo=="+"&&mi=="1"&&Fn[mo+1]=="1"?Fn[mo]="1":Oo==","&&mi==Fn[mo+1]&&(mi=="1"||mi=="n")&&(Fn[mo]=mi),mi=Oo}for(var Ya=0;Ya<zn;++Ya){var Ds=Fn[Ya];if(Ds==",")Fn[Ya]="N";else if(Ds=="%"){var os=void 0;for(os=Ya+1;os<zn&&Fn[os]=="%";++os);for(var Kl=Ya&&Fn[Ya-1]=="!"||os<zn&&Fn[os]=="1"?"1":"N",vl=Ya;vl<os;++vl)Fn[vl]=Kl;Ya=os-1}}for(var ks=0,ou=Qt;ks<zn;++ks){var al=Fn[ks];ou=="L"&&al=="1"?Fn[ks]="L":st.test(al)&&(ou=al)}for(var Os=0;Os<zn;++Os)if(Be.test(Fn[Os])){var oa=void 0;for(oa=Os+1;oa<zn&&Be.test(Fn[oa]);++oa);for(var hs=(Os?Fn[Os-1]:Qt)=="L",Gs=(oa<zn?Fn[oa]:Qt)=="L",sl=hs==Gs?hs?"L":"R":Qt,Zu=Os;Zu<oa;++Zu)Fn[Zu]=sl;Os=oa-1}for(var as=[],ku,ys=0;ys<zn;)if(Pt.test(Fn[ys])){var xf=ys;for(++ys;ys<zn&&Pt.test(Fn[ys]);++ys);as.push(new Ft(0,xf,ys))}else{var vu=ys,au=as.length,Vl=Sn=="rtl"?1:0;for(++ys;ys<zn&&Fn[ys]!="L";++ys);for(var Ia=vu;Ia<ys;)if(Rt.test(Fn[Ia])){vu<Ia&&(as.splice(au,0,new Ft(1,vu,Ia)),au+=Vl);var Hs=Ia;for(++Ia;Ia<ys&&Rt.test(Fn[Ia]);++Ia);as.splice(au,0,new Ft(2,Hs,Ia)),au+=Vl,vu=Ia}else++Ia;vu<ys&&as.splice(au,0,new Ft(1,vu,ys))}return Sn=="ltr"&&(as[0].level==1&&(ku=Zt.match(/^\s+/))&&(as[0].from=ku[0].length,as.unshift(new Ft(0,0,ku[0].length))),Ct(as).level==1&&(ku=Zt.match(/\s+$/))&&(Ct(as).to-=ku[0].length,as.push(new Ft(0,zn-ku[0].length,zn)))),Sn=="rtl"?as.reverse():as}}();function dt(oe,de){var Me=oe.order;return Me==null&&(Me=oe.order=Ke(oe.text,de)),Me}var Ve=[],kt=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]||Ve).concat(Me)}};function zt(oe,de){return oe._handlers&&oe._handlers[de]||Ve}function Xt(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 st=wt(Be,Me);st>-1&&(Te[de]=Be.slice(0,st).concat(Be.slice(st+1)))}}}function At(oe,de){var Me=zt(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}}),At(oe,Me||de.type,oe,de),Xn(de)||de.codemirrorIgnore}function qt(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)wt(Me,de[Te])==-1&&Me.push(de[Te])}function on(oe,de){return zt(oe,de).length>0}function gn(oe){oe.prototype.on=function(de,Me){kt(this,de,Me)},oe.prototype.off=function(de,Me){Xt(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 hr(oe){kn(oe),Kn(oe)}function dr(oe){return oe.target||oe.srcElement}function fr(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 xr=function(){if(je&&ve<9)return!1;var oe=Oe("div");return"draggable"in oe||"dragDrop"in oe}(),Hr;function Yr(oe){if(Hr==null){var de=Oe("span","\u200B");Ne(oe,Oe("span",[de,document.createTextNode("x")])),oe.firstChild.offsetHeight!=0&&(Hr=de.offsetWidth<=1&&de.offsetHeight>2&&!(je&&ve<8))}var Me=Hr?Oe("span","\u200B"):Oe("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return Me.setAttribute("cm-text",""),Me}var Or;function bi(oe){if(Or!=null)return Or;var de=Ne(oe,document.createTextNode("A\u062EA")),Me=Re(de,0,1).getBoundingClientRect(),Te=Re(de,1,2).getBoundingClientRect();return ke(oe),!Me||Me.left==Me.right?!1:Or=Te.right-Me.right<3}var Jr=`
|
|
|
|
|
|
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 st=oe.slice(de,oe.charAt(Be-1)=="\r"?Be-1:Be),Pt=st.indexOf("\r");Pt!=-1?(Me.push(st.slice(0,Pt)),de+=Pt+1):(Me.push(st),de=Be+1)}return Me}:function(oe){return oe.split(/\r\n?|\n/)},tt=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},li=function(){var oe=Oe("div");return"oncopy"in oe?!0:(oe.setAttribute("oncopy","return;"),typeof oe.oncopy=="function")}(),Si=null;function xi(oe){if(Si!=null)return Si;var de=Ne(oe,Oe("span","x")),Me=de.getBoundingClientRect(),Te=Re(de,0,1).getBoundingClientRect();return Si=Math.abs(Me.left-Te.left)>1}var lr={},Ar={};function Fr(oe,de){arguments.length>2&&(de.dependencies=Array.prototype.slice.call(arguments,2)),lr[oe]=de}function Ii(oe,de){Ar[oe]=de}function wr(oe){if(typeof oe=="string"&&Ar.hasOwnProperty(oe))oe=Ar[oe];else if(oe&&typeof oe.name=="string"&&Ar.hasOwnProperty(oe.name)){var de=Ar[oe.name];typeof de=="string"&&(de={name:de}),oe=Xe(de,oe),oe.name=de.name}else{if(typeof oe=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(oe))return wr("application/xml");if(typeof oe=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(oe))return wr("application/json")}return typeof oe=="string"?{name:oe}:oe||{name:"null"}}function cn(oe,de){de=wr(de);var Me=lr[de.name];if(!Me)return cn(oe,"text/plain");var Te=Me(oe,de);if(un.hasOwnProperty(de.name)){var Be=un[de.name];for(var st in Be)Be.hasOwnProperty(st)&&(Te.hasOwnProperty(st)&&(Te["_"+st]=Te[st]),Te[st]=Be[st])}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 Dt(oe,de){var Me=un.hasOwnProperty(oe)?un[oe]:un[oe]={};Mt(de,Me)}function vn(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 On(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 Jt(oe,de,Me){return oe.startState?oe.startState(de,Me):!0}var Ut=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};Ut.prototype.eol=function(){return this.pos>=this.string.length},Ut.prototype.sol=function(){return this.pos==this.lineStart},Ut.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ut.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ut.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},Ut.prototype.eatWhile=function(oe){for(var de=this.pos;this.eat(oe););return this.pos>de},Ut.prototype.eatSpace=function(){for(var oe=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>oe},Ut.prototype.skipToEnd=function(){this.pos=this.string.length},Ut.prototype.skipTo=function(oe){var de=this.string.indexOf(oe,this.pos);if(de>-1)return this.pos=de,!0},Ut.prototype.backUp=function(oe){this.pos-=oe},Ut.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)},Ut.prototype.indentation=function(){return et(this.string,null,this.tabSize)-(this.lineStart?et(this.string,this.lineStart,this.tabSize):0)},Ut.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 st=this.string.slice(this.pos).match(oe);return st&&st.index>0?null:(st&&de!==!1&&(this.pos+=st[0].length),st)}},Ut.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ut.prototype.hideFirstChars=function(oe,de){this.lineStart+=oe;try{return de()}finally{this.lineStart-=oe}},Ut.prototype.lookAhead=function(oe){var de=this.lineOracle;return de&&de.lookAhead(oe)},Ut.prototype.baseToken=function(){var oe=this.lineOracle;return oe&&oe.baseToken(this.pos)};function wn(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],st=Be.chunkSize();if(de<st){Me=Be;break}de-=st}return Me.lines[de]}function _n(oe,de,Me){var Te=[],Be=de.line;return oe.iter(de.line,Me.line+1,function(st){var Pt=st.text;Be==Me.line&&(Pt=Pt.slice(0,Me.ch)),Be==de.line&&(Pt=Pt.slice(de.ch)),Te.push(Pt),++Be}),Te}function Qn(oe,de,Me){var Te=[];return oe.iter(de,Me,function(Be){Te.push(Be.text)}),Te}function Jn(oe,de){var Me=de-oe.height;if(Me)for(var Te=oe;Te;Te=Te.parent)Te.height+=Me}function Wt(oe){if(oe.parent==null)return null;for(var de=oe.parent,Me=wt(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 In(oe,de){var Me=oe.first;e:do{for(var Te=0;Te<oe.children.length;++Te){var Be=oe.children[Te],st=Be.height;if(de<st){oe=Be;continue e}de-=st,Me+=Be.chunkSize()}return Me}while(!oe.lines);for(var Pt=0;Pt<oe.lines.length;++Pt){var Rt=oe.lines[Pt],Ft=Rt.height;if(de<Ft)break;de-=Ft}return Me+Pt}function Wn(oe,de){return de>=oe.first&&de<oe.first+oe.size}function ar(oe,de){return String(oe.lineNumberFormatter(de+oe.firstLineNumber))}function mn(oe,de,Me){if(Me===void 0&&(Me=null),!(this instanceof mn))return new mn(oe,de,Me);this.line=oe,this.ch=de,this.sticky=Me}function Cn(oe,de){return oe.line-de.line||oe.ch-de.ch}function tn(oe,de){return oe.sticky==de.sticky&&Cn(oe,de)==0}function fn(oe){return mn(oe.line,oe.ch)}function En(oe,de){return Cn(oe,de)<0?de:oe}function pn(oe,de){return Cn(oe,de)<0?oe:de}function Ln(oe,de){return Math.max(oe.first,Math.min(de,oe.first+oe.size-1))}function Mn(oe,de){if(de.line<oe.first)return mn(oe.first,0);var Me=oe.first+oe.size-1;return de.line>Me?mn(Me,wn(oe,Me).text.length):Gn(de,wn(oe,de.line).text.length)}function Gn(oe,de){var Me=oe.ch;return Me==null||Me>de?mn(oe.line,de):Me<0?mn(oe.line,0):oe}function An(oe,de){for(var Me=[],Te=0;Te<de.length;Te++)Me[Te]=Mn(oe,de[Te]);return Me}var sr=function(oe,de){this.state=oe,this.lookAhead=de},hn=function(oe,de,Me,Te){this.state=de,this.doc=oe,this.line=Me,this.maxLookAhead=Te||0,this.baseTokens=null,this.baseTokenPos=1};hn.prototype.lookAhead=function(oe){var de=this.doc.getLine(this.line+oe);return de!=null&&oe>this.maxLookAhead&&(this.maxLookAhead=oe),de},hn.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}},hn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},hn.fromSaved=function(oe,de,Me){return de instanceof sr?new hn(oe,vn(oe.mode,de.state),Me,de.lookAhead):new hn(oe,vn(oe.mode,de),Me)},hn.prototype.save=function(oe){var de=oe!==!1?vn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new sr(de,this.maxLookAhead):de};function Nr(oe,de,Me,Te){var Be=[oe.state.modeGen],st={};ii(oe,de.text,oe.doc.mode,Me,function(Zt,Sn){return Be.push(Zt,Sn)},st,Te);for(var Pt=Me.state,Rt=function(Zt){Me.baseTokens=Be;var Sn=oe.state.overlays[Zt],Qt=1,zn=0;Me.state=!0,ii(oe,de.text,Sn.mode,Me,function(Fn,pr){for(var Pr=Qt;zn<Fn;){var Ir=Be[Qt];Ir>Fn&&Be.splice(Qt,1,Fn,Be[Qt+1],Ir),Qt+=2,zn=Math.min(Fn,Ir)}if(pr)if(Sn.opaque)Be.splice(Pr,Qt-Pr,Fn,"overlay "+pr),Qt=Pr+2;else for(;Pr<Qt;Pr+=2){var ri=Be[Pr+1];Be[Pr+1]=(ri?ri+" ":"")+"overlay "+pr}},st),Me.state=Pt,Me.baseTokens=null,Me.baseTokenPos=1},Ft=0;Ft<oe.state.overlays.length;++Ft)Rt(Ft);return{styles:Be,classes:st.bgClass||st.textClass?st:null}}function Zr(oe,de,Me){if(!de.styles||de.styles[0]!=oe.state.modeGen){var Te=hi(oe,Wt(de)),Be=de.text.length>oe.options.maxHighlightLength&&vn(oe.doc.mode,Te.state),st=Nr(oe,de,Te);Be&&(Te.state=Be),de.stateAfter=Te.save(!Be),de.styles=st.styles,st.classes?de.styleClasses=st.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 hi(oe,de,Me){var Te=oe.doc,Be=oe.display;if(!Te.mode.startState)return new hn(Te,!0,de);var st=Br(oe,de,Me),Pt=st>Te.first&&wn(Te,st-1).stateAfter,Rt=Pt?hn.fromSaved(Te,Pt,st):new hn(Te,Jt(Te.mode),st);return Te.iter(st,de,function(Ft){yn(oe,Ft.text,Rt);var Zt=Rt.line;Ft.stateAfter=Zt==de-1||Zt%5==0||Zt>=Be.viewFrom&&Zt<Be.viewTo?Rt.save():null,Rt.nextLine()}),Me&&(Te.modeFrontier=Rt.line),Rt}function yn(oe,de,Me,Te){var Be=oe.doc.mode,st=new Ut(de,oe.options.tabSize,Me);for(st.start=st.pos=Te||0,de==""&&Yn(Be,Me.state);!st.eol();)ir(Be,st,Me.state),st.start=st.pos}function Yn(oe,de){if(oe.blankLine)return oe.blankLine(de);if(oe.innerMode){var Me=On(oe,de);if(Me.mode.blankLine)return Me.mode.blankLine(Me.state)}}function ir(oe,de,Me,Te){for(var Be=0;Be<10;Be++){Te&&(Te[0]=On(oe,Me).mode);var st=oe.token(de,Me);if(de.pos>de.start)return st}throw new Error("Mode "+oe.name+" failed to advance stream.")}var vr=function(oe,de,Me){this.start=oe.start,this.end=oe.pos,this.string=oe.current(),this.type=de||null,this.state=Me};function yr(oe,de,Me,Te){var Be=oe.doc,st=Be.mode,Pt;de=Mn(Be,de);var Rt=wn(Be,de.line),Ft=hi(oe,de.line,Me),Zt=new Ut(Rt.text,oe.options.tabSize,Ft),Sn;for(Te&&(Sn=[]);(Te||Zt.pos<de.ch)&&!Zt.eol();)Zt.start=Zt.pos,Pt=ir(st,Zt,Ft.state),Te&&Sn.push(new vr(Zt,Pt,vn(Be.mode,Ft.state)));return Te?Sn:new vr(Zt,Pt,Ft.state)}function Dr(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 ii(oe,de,Me,Te,Be,st,Pt){var Rt=Me.flattenSpans;Rt==null&&(Rt=oe.options.flattenSpans);var Ft=0,Zt=null,Sn=new Ut(de,oe.options.tabSize,Te),Qt,zn=oe.options.addModeClass&&[null];for(de==""&&Dr(Yn(Me,Te.state),st);!Sn.eol();){if(Sn.pos>oe.options.maxHighlightLength?(Rt=!1,Pt&&yn(oe,de,Te,Sn.pos),Sn.pos=de.length,Qt=null):Qt=Dr(ir(Me,Sn,Te.state,zn),st),zn){var Fn=zn[0].name;Fn&&(Qt="m-"+(Qt?Fn+" "+Qt:Fn))}if(!Rt||Zt!=Qt){for(;Ft<Sn.start;)Ft=Math.min(Sn.start,Ft+5e3),Be(Ft,Zt);Zt=Qt}Sn.start=Sn.pos}for(;Ft<Sn.pos;){var pr=Math.min(Sn.pos,Ft+5e3);Be(pr,Zt),Ft=pr}}function Br(oe,de,Me){for(var Te,Be,st=oe.doc,Pt=Me?-1:de-(oe.doc.mode.innerMode?1e3:100),Rt=de;Rt>Pt;--Rt){if(Rt<=st.first)return st.first;var Ft=wn(st,Rt-1),Zt=Ft.stateAfter;if(Zt&&(!Me||Rt+(Zt instanceof sr?Zt.lookAhead:0)<=st.modeFrontier))return Rt;var Sn=et(Ft.text,null,oe.options.tabSize);(Be==null||Te>Sn)&&(Be=Rt-1,Te=Sn)}return Be}function Cr(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=wn(oe,Te).stateAfter;if(Be&&(!(Be instanceof sr)||Te+Be.lookAhead<de)){Me=Te+1;break}}oe.highlightFrontier=Math.min(oe.highlightFrontier,Me)}}var oi=!1,Tn=!1;function Ri(){oi=!0}function Nn(){Tn=!0}function fi(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 zi(oe,de){for(var Me,Te=0;Te<oe.length;++Te)oe[Te]!=de&&(Me||(Me=[])).push(oe[Te]);return Me}function Lo(oe,de){oe.markedSpans=oe.markedSpans?oe.markedSpans.concat([de]):[de],de.marker.attachLine(oe)}function yo(oe,de,Me){var Te;if(oe)for(var Be=0;Be<oe.length;++Be){var st=oe[Be],Pt=st.marker,Rt=st.from==null||(Pt.inclusiveLeft?st.from<=de:st.from<de);if(Rt||st.from==de&&Pt.type=="bookmark"&&(!Me||!st.marker.insertLeft)){var Ft=st.to==null||(Pt.inclusiveRight?st.to>=de:st.to>de);(Te||(Te=[])).push(new fi(Pt,st.from,Ft?null:st.to))}}return Te}function Ur(oe,de,Me){var Te;if(oe)for(var Be=0;Be<oe.length;++Be){var st=oe[Be],Pt=st.marker,Rt=st.to==null||(Pt.inclusiveRight?st.to>=de:st.to>de);if(Rt||st.from==de&&Pt.type=="bookmark"&&(!Me||st.marker.insertLeft)){var Ft=st.from==null||(Pt.inclusiveLeft?st.from<=de:st.from<de);(Te||(Te=[])).push(new fi(Pt,Ft?null:st.from-de,st.to==null?null:st.to-de))}}return Te}function $r(oe,de){if(de.full)return null;var Me=Wn(oe,de.from.line)&&wn(oe,de.from.line).markedSpans,Te=Wn(oe,de.to.line)&&wn(oe,de.to.line).markedSpans;if(!Me&&!Te)return null;var Be=de.from.ch,st=de.to.ch,Pt=Cn(de.from,de.to)==0,Rt=yo(Me,Be,Pt),Ft=Ur(Te,st,Pt),Zt=de.text.length==1,Sn=Ct(de.text).length+(Zt?Be:0);if(Rt)for(var Qt=0;Qt<Rt.length;++Qt){var zn=Rt[Qt];if(zn.to==null){var Fn=xo(Ft,zn.marker);Fn?Zt&&(zn.to=Fn.to==null?null:Fn.to+Sn):zn.to=Be}}if(Ft)for(var pr=0;pr<Ft.length;++pr){var Pr=Ft[pr];if(Pr.to!=null&&(Pr.to+=Sn),Pr.from==null){var Ir=xo(Rt,Pr.marker);Ir||(Pr.from=Sn,Zt&&(Rt||(Rt=[])).push(Pr))}else Pr.from+=Sn,Zt&&(Rt||(Rt=[])).push(Pr)}Rt&&(Rt=Ti(Rt)),Ft&&Ft!=Rt&&(Ft=Ti(Ft));var ri=[Rt];if(!Zt){var Mi=de.text.length-2,yi;if(Mi>0&&Rt)for(var Bi=0;Bi<Rt.length;++Bi)Rt[Bi].to==null&&(yi||(yi=[])).push(new fi(Rt[Bi].marker,null,null));for(var mo=0;mo<Mi;++mo)ri.push(yi);ri.push(Ft)}return ri}function Ti(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 Hi(oe,de,Me){var Te=null;if(oe.iter(de.line,Me.line+1,function(Fn){if(Fn.markedSpans)for(var pr=0;pr<Fn.markedSpans.length;++pr){var Pr=Fn.markedSpans[pr].marker;Pr.readOnly&&(!Te||wt(Te,Pr)==-1)&&(Te||(Te=[])).push(Pr)}}),!Te)return null;for(var Be=[{from:de,to:Me}],st=0;st<Te.length;++st)for(var Pt=Te[st],Rt=Pt.find(0),Ft=0;Ft<Be.length;++Ft){var Zt=Be[Ft];if(!(Cn(Zt.to,Rt.from)<0||Cn(Zt.from,Rt.to)>0)){var Sn=[Ft,1],Qt=Cn(Zt.from,Rt.from),zn=Cn(Zt.to,Rt.to);(Qt<0||!Pt.inclusiveLeft&&!Qt)&&Sn.push({from:Zt.from,to:Rt.from}),(zn>0||!Pt.inclusiveRight&&!zn)&&Sn.push({from:Rt.to,to:Zt.to}),Be.splice.apply(Be,Sn),Ft+=Sn.length-3}}return Be}function cr(oe){var de=oe.markedSpans;if(de){for(var Me=0;Me<de.length;++Me)de[Me].marker.detachLine(oe);oe.markedSpans=null}}function jt(oe,de){if(de){for(var Me=0;Me<de.length;++Me)de[Me].marker.attachLine(oe);oe.markedSpans=de}}function ji(oe){return oe.inclusiveLeft?-1:0}function Rr(oe){return oe.inclusiveRight?1:0}function jr(oe,de){var Me=oe.lines.length-de.lines.length;if(Me!=0)return Me;var Te=oe.find(),Be=de.find(),st=Cn(Te.from,Be.from)||ji(oe)-ji(de);if(st)return-st;var Pt=Cn(Te.to,Be.to)||Rr(oe)-Rr(de);return Pt||de.id-oe.id}function _i(oe,de){var Me=Tn&&oe.markedSpans,Te;if(Me)for(var Be=void 0,st=0;st<Me.length;++st)Be=Me[st],Be.marker.collapsed&&(de?Be.from:Be.to)==null&&(!Te||jr(Te,Be.marker)<0)&&(Te=Be.marker);return Te}function Ji(oe){return _i(oe,!0)}function _r(oe){return _i(oe,!1)}function Kr(oe,de){var Me=Tn&&oe.markedSpans,Te;if(Me)for(var Be=0;Be<Me.length;++Be){var st=Me[Be];st.marker.collapsed&&(st.from==null||st.from<de)&&(st.to==null||st.to>de)&&(!Te||jr(Te,st.marker)<0)&&(Te=st.marker)}return Te}function Pi(oe,de,Me,Te,Be){var st=wn(oe,de),Pt=Tn&&st.markedSpans;if(Pt)for(var Rt=0;Rt<Pt.length;++Rt){var Ft=Pt[Rt];if(Ft.marker.collapsed){var Zt=Ft.marker.find(0),Sn=Cn(Zt.from,Me)||ji(Ft.marker)-ji(Be),Qt=Cn(Zt.to,Te)||Rr(Ft.marker)-Rr(Be);if(!(Sn>=0&&Qt<=0||Sn<=0&&Qt>=0)&&(Sn<=0&&(Ft.marker.inclusiveRight&&Be.inclusiveLeft?Cn(Zt.to,Me)>=0:Cn(Zt.to,Me)>0)||Sn>=0&&(Ft.marker.inclusiveRight&&Be.inclusiveLeft?Cn(Zt.from,Te)<=0:Cn(Zt.from,Te)<0)))return!0}}}function gi(oe){for(var de;de=Ji(oe);)oe=de.find(-1,!0).line;return oe}function Vi(oe){for(var de;de=_r(oe);)oe=de.find(1,!0).line;return oe}function io(oe){for(var de,Me;de=_r(oe);)oe=de.find(1,!0).line,(Me||(Me=[])).push(oe);return Me}function Gr(oe,de){var Me=wn(oe,de),Te=gi(Me);return Me==Te?de:Wt(Te)}function Tr(oe,de){if(de>oe.lastLine())return de;var Me=wn(oe,de),Te;if(!Vn(oe,Me))return de;for(;Te=_r(Me);)Me=Te.find(1,!0).line;return Wt(Me)+1}function Vn(oe,de){var Me=Tn&&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&&ai(oe,de,Te))return!0}}}function ai(oe,de,Me){if(Me.to==null){var Te=Me.marker.find(1,!0);return ai(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,st=0;st<de.markedSpans.length;++st)if(Be=de.markedSpans[st],Be.marker.collapsed&&!Be.marker.widgetNode&&Be.from==Me.to&&(Be.to==null||Be.to!=Me.from)&&(Be.marker.inclusiveLeft||Me.marker.inclusiveRight)&&ai(oe,de,Be))return!0}function Qi(oe){oe=gi(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 st=Me.parent;st;Me=st,st=Me.parent)for(var Pt=0;Pt<st.children.length;++Pt){var Rt=st.children[Pt];if(Rt==Me)break;de+=Rt.height}return de}function zo(oe){if(oe.height==0)return 0;for(var de=oe.text.length,Me,Te=oe;Me=Ji(Te);){var Be=Me.find(0,!0);Te=Be.from.line,de+=Be.from.ch-Be.to.ch}for(Te=oe;Me=_r(Te);){var st=Me.find(0,!0);de-=Te.text.length-st.from.ch,Te=st.to.line,de+=Te.text.length-st.to.ch}return de}function Mo(oe){var de=oe.display,Me=oe.doc;de.maxLine=wn(Me,Me.first),de.maxLineLength=zo(de.maxLine),de.maxLineChanged=!0,Me.iter(function(Te){var Be=zo(Te);Be>de.maxLineLength&&(de.maxLineLength=Be,de.maxLine=Te)})}var Uo=function(oe,de,Me){this.text=oe,jt(this,de),this.height=Me?Me(this):1};Uo.prototype.lineNo=function(){return Wt(this)},gn(Uo);function ca(oe,de,Me,Te){oe.text=de,oe.stateAfter&&(oe.stateAfter=null),oe.styles&&(oe.styles=null),oe.order!=null&&(oe.order=null),cr(oe),jt(oe,Me);var Be=Te?Te(oe):1;Be!=oe.height&&Jn(oe,Be)}function Jo(oe){oe.parent=null,cr(oe)}var qa={},La={};function es(oe,de){if(!oe||/^\s*$/.test(oe))return null;var Me=de.addModeClass?La:qa;return Me[oe]||(Me[oe]=oe.replace(/\S+/g,"cm-$&"))}function bn(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 st=Be?de.rest[Be-1]:de.line,Pt=void 0;Te.pos=0,Te.addToken=Ql,bi(oe.display.measure)&&(Pt=dt(st,oe.doc.direction))&&(Te.addToken=So(Te.addToken,Pt)),Te.map=[];var Rt=de!=oe.display.externalMeasured&&Wt(st);va(st,Te,Zr(oe,st,Rt)),st.styleClasses&&(st.styleClasses.bgClass&&(Te.bgClass=at(st.styleClasses.bgClass,Te.bgClass||"")),st.styleClasses.textClass&&(Te.textClass=at(st.styleClasses.textClass,Te.textClass||""))),Te.map.length==0&&Te.map.push(0,0,Te.content.appendChild(Yr(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 Ft=Te.content.lastChild;(/\bcm-tab\b/.test(Ft.className)||Ft.querySelector&&Ft.querySelector(".cm-tab"))&&(Te.content.className="cm-tab-wrap-hack")}return At(oe,"renderLine",oe,de.line,Te.pre),Te.pre.className&&(Te.textClass=at(Te.pre.className,Te.textClass||"")),Te}function ma(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 Ql(oe,de,Me,Te,Be,st,Pt){if(de){var Rt=oe.splitSpaces?el(de,oe.trailingSpace):de,Ft=oe.cm.state.specialChars,Zt=!1,Sn;if(!Ft.test(de))oe.col+=de.length,Sn=document.createTextNode(Rt),oe.map.push(oe.pos,oe.pos+de.length,Sn),je&&ve<9&&(Zt=!0),oe.pos+=de.length;else{Sn=document.createDocumentFragment();for(var Qt=0;;){Ft.lastIndex=Qt;var zn=Ft.exec(de),Fn=zn?zn.index-Qt:de.length-Qt;if(Fn){var pr=document.createTextNode(Rt.slice(Qt,Qt+Fn));je&&ve<9?Sn.appendChild(Oe("span",[pr])):Sn.appendChild(pr),oe.map.push(oe.pos,oe.pos+Fn,pr),oe.col+=Fn,oe.pos+=Fn}if(!zn)break;Qt+=Fn+1;var Pr=void 0;if(zn[0]==" "){var Ir=oe.cm.options.tabSize,ri=Ir-oe.col%Ir;Pr=Sn.appendChild(Oe("span",Vt(ri),"cm-tab")),Pr.setAttribute("role","presentation"),Pr.setAttribute("cm-text"," "),oe.col+=ri}else zn[0]=="\r"||zn[0]==`
|
|
|
`?(Pr=Sn.appendChild(Oe("span",zn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Pr.setAttribute("cm-text",zn[0]),oe.col+=1):(Pr=oe.cm.options.specialCharPlaceholder(zn[0]),Pr.setAttribute("cm-text",zn[0]),je&&ve<9?Sn.appendChild(Oe("span",[Pr])):Sn.appendChild(Pr),oe.col+=1);oe.map.push(oe.pos,oe.pos+1,Pr),oe.pos++}}if(oe.trailingSpace=Rt.charCodeAt(de.length-1)==32,Me||Te||Be||Zt||st||Pt){var Mi=Me||"";Te&&(Mi+=Te),Be&&(Mi+=Be);var yi=Oe("span",[Sn],Mi,st);if(Pt)for(var Bi in Pt)Pt.hasOwnProperty(Bi)&&Bi!="style"&&Bi!="class"&&yi.setAttribute(Bi,Pt[Bi]);return oe.content.appendChild(yi)}oe.content.appendChild(Sn)}}function el(oe,de){if(oe.length>1&&!/ /.test(oe))return oe;for(var Me=de,Te="",Be=0;Be<oe.length;Be++){var st=oe.charAt(Be);st==" "&&Me&&(Be==oe.length-1||oe.charCodeAt(Be+1)==32)&&(st="\xA0"),Te+=st,Me=st==" "}return Te}function So(oe,de){return function(Me,Te,Be,st,Pt,Rt,Ft){Be=Be?Be+" cm-force-border":"cm-force-border";for(var Zt=Me.pos,Sn=Zt+Te.length;;){for(var Qt=void 0,zn=0;zn<de.length&&(Qt=de[zn],!(Qt.to>Zt&&Qt.from<=Zt));zn++);if(Qt.to>=Sn)return oe(Me,Te,Be,st,Pt,Rt,Ft);oe(Me,Te.slice(0,Qt.to-Zt),Be,st,null,Rt,Ft),st=null,Te=Te.slice(Qt.to-Zt),Zt=Qt.to}}}function ro(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 va(oe,de,Me){var Te=oe.markedSpans,Be=oe.text,st=0;if(!Te){for(var Pt=1;Pt<Me.length;Pt+=2)de.addToken(de,Be.slice(st,st=Me[Pt]),es(Me[Pt+1],de.cm.options));return}for(var Rt=Be.length,Ft=0,Zt=1,Sn="",Qt,zn,Fn=0,pr,Pr,Ir,ri,Mi;;){if(Fn==Ft){pr=Pr=Ir=zn="",Mi=null,ri=null,Fn=1/0;for(var yi=[],Bi=void 0,mo=0;mo<Te.length;++mo){var mi=Te[mo],Oo=mi.marker;if(Oo.type=="bookmark"&&mi.from==Ft&&Oo.widgetNode)yi.push(Oo);else if(mi.from<=Ft&&(mi.to==null||mi.to>Ft||Oo.collapsed&&mi.to==Ft&&mi.from==Ft)){if(mi.to!=null&&mi.to!=Ft&&Fn>mi.to&&(Fn=mi.to,Pr=""),Oo.className&&(pr+=" "+Oo.className),Oo.css&&(zn=(zn?zn+";":"")+Oo.css),Oo.startStyle&&mi.from==Ft&&(Ir+=" "+Oo.startStyle),Oo.endStyle&&mi.to==Fn&&(Bi||(Bi=[])).push(Oo.endStyle,mi.to),Oo.title&&((Mi||(Mi={})).title=Oo.title),Oo.attributes)for(var Ya in Oo.attributes)(Mi||(Mi={}))[Ya]=Oo.attributes[Ya];Oo.collapsed&&(!ri||jr(ri.marker,Oo)<0)&&(ri=mi)}else mi.from>Ft&&Fn>mi.from&&(Fn=mi.from)}if(Bi)for(var Ds=0;Ds<Bi.length;Ds+=2)Bi[Ds+1]==Fn&&(Pr+=" "+Bi[Ds]);if(!ri||ri.from==Ft)for(var os=0;os<yi.length;++os)ro(de,0,yi[os]);if(ri&&(ri.from||0)==Ft){if(ro(de,(ri.to==null?Rt+1:ri.to)-Ft,ri.marker,ri.from==null),ri.to==null)return;ri.to==Ft&&(ri=!1)}}if(Ft>=Rt)break;for(var Kl=Math.min(Rt,Fn);;){if(Sn){var vl=Ft+Sn.length;if(!ri){var ks=vl>Kl?Sn.slice(0,Kl-Ft):Sn;de.addToken(de,ks,Qt?Qt+pr:pr,Ir,Ft+ks.length==Fn?Pr:"",zn,Mi)}if(vl>=Kl){Sn=Sn.slice(Kl-Ft),Ft=Kl;break}Ft=vl,Ir=""}Sn=Be.slice(st,st=Me[Zt++]),Qt=es(Me[Zt++],de.cm.options)}}}function Io(oe,de,Me){this.line=de,this.rest=io(de),this.size=this.rest?Wt(Ct(this.rest))-Me+1:1,this.node=this.text=null,this.hidden=Vn(oe,de)}function qi(oe,de,Me){for(var Te=[],Be,st=de;st<Me;st=Be){var Pt=new Io(oe.doc,wn(oe.doc,st),st);Be=st+Pt.size,Te.push(Pt)}return Te}var No=null;function xs(oe){No?No.ops.push(oe):oe.ownsGroup=No={ops:[oe],delayedCallbacks:[]}}function wi(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 lo(oe,de){var Me=oe.ownsGroup;if(Me)try{wi(Me)}finally{No=null,de(Me)}}var ao=null;function Mr(oe,de){var Me=zt(oe,de);if(Me.length){var Te=Array.prototype.slice.call(arguments,2),Be;No?Be=No.delayedCallbacks:ao?Be=ao:(Be=ao=[],setTimeout(Ba,0));for(var st=function(Rt){Be.push(function(){return Me[Rt].apply(null,Te)})},Pt=0;Pt<Me.length;++Pt)st(Pt)}}function Ba(){var oe=ao;ao=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 st=de.changes[Be];st=="text"?Sr(oe,de):st=="gutter"?Wa(oe,de,Me,Te):st=="class"?aa(oe,de):st=="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 Il(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):bn(oe,de)}function Sr(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,aa(oe,de)):Me&&(de.text.className=Me)}function aa(oe,de){Il(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 Wa(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 st=de.line.gutterMarkers;if(oe.options.lineNumbers||st){var Pt=Cs(de),Rt=de.gutter=Oe("div",null,"CodeMirror-gutter-wrapper","left: "+(oe.options.fixedGutter?Te.fixedPos:-Te.gutterTotalWidth)+"px");if(oe.display.input.setUneditable(Rt),Pt.insertBefore(Rt,de.text),de.line.gutterClass&&(Rt.className+=" "+de.line.gutterClass),oe.options.lineNumbers&&(!st||!st["CodeMirror-linenumbers"])&&(de.lineNumber=Rt.appendChild(Oe("div",ar(oe.options,Me),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+Te.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+oe.display.lineNumInnerWidth+"px"))),st)for(var Ft=0;Ft<oe.display.gutterSpecs.length;++Ft){var Zt=oe.display.gutterSpecs[Ft].className,Sn=st.hasOwnProperty(Zt)&&st[Zt];Sn&&Rt.appendChild(Oe("div",[Sn],"CodeMirror-gutter-elt","left: "+Te.gutterLeft[Zt]+"px; width: "+Te.gutterWidth[Zt]+"px"))}}}function Pl(oe,de,Me){de.alignable&&(de.alignable=null);for(var Te=Pe("CodeMirror-linewidget"),Be=de.node.firstChild,st=void 0;Be;Be=st)st=Be.nextSibling,Te.test(Be.className)&&de.node.removeChild(Be);Fl(oe,de,Me)}function Dl(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),aa(oe,de),Wa(oe,de,Me,Te),Fl(oe,de,Te),de.node}function Fl(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 st=Cs(Me),Pt=0,Rt=de.widgets;Pt<Rt.length;++Pt){var Ft=Rt[Pt],Zt=Oe("div",[Ft.node],"CodeMirror-linewidget"+(Ft.className?" "+Ft.className:""));Ft.handleMouseEvents||Zt.setAttribute("cm-ignore-events","true"),mc(Ft,Zt,Me,Te),oe.display.input.setUneditable(Zt),Be&&Ft.above?st.insertBefore(Zt,Me.gutter||Me.text):st.appendChild(Zt),Mr(Ft,"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;"),Ne(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=Ne(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 _s(oe){return Et-oe.display.nativeBarWidth}function dl(oe){return oe.display.scroller.clientWidth-_s(oe)-oe.display.barWidth}function $c(oe){return oe.display.scroller.clientHeight-_s(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 st=de.measure.heights=[];if(Te){de.measure.width=Be;for(var Pt=de.text.firstChild.getClientRects(),Rt=0;Rt<Pt.length-1;Rt++){var Ft=Pt[Rt],Zt=Pt[Rt+1];Math.abs(Ft.bottom-Zt.bottom)>2&&st.push((Ft.bottom+Zt.top)/2-Me.top)}}st.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(Wt(oe.rest[Be])>Me)return{map:oe.measure.maps[Be],cache:oe.measure.caches[Be],before:!0}}function Hh(oe,de){de=gi(de);var Me=Wt(de),Te=oe.display.externalMeasured=new Io(oe.doc,de,Me);Te.lineN=Me;var Be=Te.built=bn(oe,Te);return Te.text=Be.pre,Ne(oe.display.lineMeasure,Be.pre),Te}function Hc(oe,de,Me,Te){return Bl(oe,_u(oe,de),Me,Te)}function vc(oe,de){if(de>=oe.display.viewFrom&&de<oe.display.viewTo)return oe.display.view[zs(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=Wt(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 Bl(oe,de,Me,Te,Be){de.before&&(Me=-1);var st=Me+(Te||""),Pt;return de.cache.hasOwnProperty(st)?Pt=de.cache[st]:(de.rect||(de.rect=de.view.text.getBoundingClientRect()),de.hasHeights||(hh(oe,de.view,de.rect),de.hasHeights=!0),Pt=oo(oe,de,Me,Te),Pt.bogus||(de.cache[st]=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,st,Pt,Rt,Ft,Zt=0;Zt<oe.length;Zt+=3)if(Rt=oe[Zt],Ft=oe[Zt+1],de<Rt?(Be=0,st=1,Pt="left"):de<Ft?(Be=de-Rt,st=Be+1):(Zt==oe.length-3||de==Ft&&oe[Zt+3]>de)&&(st=Ft-Rt,Be=st-1,de>=Ft&&(Pt="right")),Be!=null){if(Te=oe[Zt+2],Rt==Ft&&Me==(Te.insertLeft?"left":"right")&&(Pt=Me),Me=="left"&&Be==0)for(;Zt&&oe[Zt-2]==oe[Zt-3]&&oe[Zt-1].insertLeft;)Te=oe[(Zt-=3)+2],Pt="left";if(Me=="right"&&Be==Ft-Rt)for(;Zt<oe.length-3&&oe[Zt+3]==oe[Zt+4]&&!oe[Zt+5].insertLeft;)Te=oe[(Zt+=3)+2],Pt="right";break}return{node:Te,start:Be,end:st,collapse:Pt,coverStart:Rt,coverEnd:Ft}}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 oo(oe,de,Me,Te){var Be=Uc(de.map,Me,Te),st=Be.node,Pt=Be.start,Rt=Be.end,Ft=Be.collapse,Zt;if(st.nodeType==3){for(var Sn=0;Sn<4;Sn++){for(;Pt&&Ue(de.line.text.charAt(Be.coverStart+Pt));)--Pt;for(;Be.coverStart+Rt<Be.coverEnd&&Ue(de.line.text.charAt(Be.coverStart+Rt));)++Rt;if(je&&ve<9&&Pt==0&&Rt==Be.coverEnd-Be.coverStart?Zt=st.parentNode.getBoundingClientRect():Zt=yc(Re(st,Pt,Rt).getClientRects(),Te),Zt.left||Zt.right||Pt==0)break;Rt=Pt,Pt=Pt-1,Ft="right"}je&&ve<11&&(Zt=Do(oe.display.measure,Zt))}else{Pt>0&&(Ft=Te="right");var Qt;oe.options.lineWrapping&&(Qt=st.getClientRects()).length>1?Zt=Qt[Te=="right"?Qt.length-1:0]:Zt=st.getBoundingClientRect()}if(je&&ve<9&&!Pt&&(!Zt||!Zt.left&&!Zt.right)){var zn=st.parentNode.getClientRects()[0];zn?Zt={left:zn.left,right:zn.left+ic(oe.display),top:zn.top,bottom:zn.bottom}:Zt=dh}for(var Fn=Zt.top-de.rect.top,pr=Zt.bottom-de.rect.top,Pr=(Fn+pr)/2,Ir=de.view.measure.heights,ri=0;ri<Ir.length-1&&!(Pr<Ir[ri]);ri++);var Mi=ri?Ir[ri-1]:0,yi=Ir[ri],Bi={left:(Ft=="right"?Zt.right:Zt.left)-de.rect.left,right:(Ft=="left"?Zt.left:Zt.right)-de.rect.left,top:Mi,bottom:yi};return!Zt.left&&!Zt.right&&(Bi.bogus=!0),oe.options.singleCursorHeightPerLine||(Bi.rtop=Fn,Bi.rbottom=pr),Bi}function Do(oe,de){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!xi(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 Xa(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){Xa(oe),oe.display.cachedCharWidth=oe.display.cachedTextHeight=oe.display.cachedPaddingH=null,oe.options.lineWrapping||(oe.display.maxLineChanged=!0),oe.display.lineNumChars=null}function ha(){return Ce&&z?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Ea(){return Ce&&z?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Ka(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 st=Ka(de);Me.top+=st,Me.bottom+=st}if(Te=="line")return Me;Te||(Te="local");var Pt=Qi(de);if(Te=="local"?Pt+=As(oe.display):Pt-=oe.display.viewOffset,Te=="page"||Te=="window"){var Rt=oe.display.lineSpace.getBoundingClientRect();Pt+=Rt.top+(Te=="window"?0:Ea());var Ft=Rt.left+(Te=="window"?0:ha());Me.left+=Ft,Me.right+=Ft}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-=ha(),Be-=Ea();else if(Me=="local"||!Me){var st=oe.display.sizer.getBoundingClientRect();Te+=st.left,Be+=st.top}var Pt=oe.display.lineSpace.getBoundingClientRect();return{left:Te-Pt.left,top:Be-Pt.top}}function Rl(oe,de,Me,Te,Be){return Te||(Te=wn(oe.doc,de.line)),za(oe,Te,Hc(oe,Te,de.ch,Be),Me)}function ka(oe,de,Me,Te,Be,st){Te=Te||wn(oe.doc,de.line),Be||(Be=_u(oe,Te));function Pt(pr,Pr){var Ir=Bl(oe,Be,pr,Pr?"right":"left",st);return Pr?Ir.left=Ir.right:Ir.right=Ir.left,za(oe,Te,Ir,Me)}var Rt=dt(Te,oe.doc.direction),Ft=de.ch,Zt=de.sticky;if(Ft>=Te.text.length?(Ft=Te.text.length,Zt="before"):Ft<=0&&(Ft=0,Zt="after"),!Rt)return Pt(Zt=="before"?Ft-1:Ft,Zt=="before");function Sn(pr,Pr,Ir){var ri=Rt[Pr],Mi=ri.level==1;return Pt(Ir?pr-1:pr,Mi!=Ir)}var Qt=Le(Rt,Ft,Zt),zn=De,Fn=Sn(Ft,Qt,Zt=="before");return zn!=null&&(Fn.other=Sn(Ft,zn,Zt!="before")),Fn}function wd(oe,de){var Me=0;de=Mn(oe.doc,de),oe.options.lineWrapping||(Me=ic(oe.display)*de.ch);var Te=wn(oe.doc,de.line),Be=Qi(Te)+As(oe.display);return{left:Me,right:Me,top:Be,bottom:Be+Te.height}}function bd(oe,de,Me,Te,Be){var st=mn(oe,de,Me);return st.xRel=Be,Te&&(st.outside=Te),st}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=In(Te,Me),st=Te.first+Te.size-1;if(Be>st)return bd(Te.first+Te.size-1,wn(Te,st).text.length,null,1,1);de<0&&(de=0);for(var Pt=wn(Te,Be);;){var Rt=Zn(oe,Pt,Be,de,Me),Ft=Kr(Pt,Rt.ch+(Rt.xRel>0||Rt.outside>0?1:0));if(!Ft)return Rt;var Zt=Ft.find(1);if(Zt.line==Be)return Zt;Pt=wn(Te,Be=Zt.line)}}function pi(oe,de,Me,Te){Te-=Ka(de);var Be=de.text.length,st=qe(function(Pt){return Bl(oe,Me,Pt-1).bottom<=Te},Be,0);return Be=qe(function(Pt){return Bl(oe,Me,Pt).top>Te},st,Be),{begin:st,end:Be}}function fh(oe,de,Me,Te){Me||(Me=_u(oe,de));var Be=za(oe,de,Bl(oe,Me,Te),"line").top;return pi(oe,de,Me,Be)}function en(oe,de,Me,Te){return oe.bottom<=Me?!1:oe.top>Me?!0:(Te?oe.left:oe.right)>de}function Zn(oe,de,Me,Te,Be){Be-=Qi(de);var st=_u(oe,de),Pt=Ka(de),Rt=0,Ft=de.text.length,Zt=!0,Sn=dt(de,oe.doc.direction);if(Sn){var Qt=(oe.options.lineWrapping?af:Pd)(oe,de,Me,st,Sn,Te,Be);Zt=Qt.level!=1,Rt=Zt?Qt.from:Qt.to-1,Ft=Zt?Qt.to:Qt.from-1}var zn=null,Fn=null,pr=qe(function(mo){var mi=Bl(oe,st,mo);return mi.top+=Pt,mi.bottom+=Pt,en(mi,Te,Be,!1)?(mi.top<=Be&&mi.left<=Te&&(zn=mo,Fn=mi),!0):!1},Rt,Ft),Pr,Ir,ri=!1;if(Fn){var Mi=Te-Fn.left<Fn.right-Te,yi=Mi==Zt;pr=zn+(yi?0:1),Ir=yi?"after":"before",Pr=Mi?Fn.left:Fn.right}else{!Zt&&(pr==Ft||pr==Rt)&&pr++,Ir=pr==0?"after":pr==de.text.length?"before":Bl(oe,st,pr-(Zt?1:0)).bottom+Pt<=Be==Zt?"after":"before";var Bi=ka(oe,mn(Me,pr,Ir),"line",de,st);Pr=Bi.left,ri=Be<Bi.top?-1:Be>=Bi.bottom?1:0}return pr=We(de.text,pr,1),bd(Me,pr,Ir,ri,Te-Pr)}function Pd(oe,de,Me,Te,Be,st,Pt){var Rt=qe(function(Qt){var zn=Be[Qt],Fn=zn.level!=1;return en(ka(oe,mn(Me,Fn?zn.to:zn.from,Fn?"before":"after"),"line",de,Te),st,Pt,!0)},0,Be.length-1),Ft=Be[Rt];if(Rt>0){var Zt=Ft.level!=1,Sn=ka(oe,mn(Me,Zt?Ft.from:Ft.to,Zt?"after":"before"),"line",de,Te);en(Sn,st,Pt,!0)&&Sn.top>Pt&&(Ft=Be[Rt-1])}return Ft}function af(oe,de,Me,Te,Be,st,Pt){var Rt=pi(oe,de,Te,Pt),Ft=Rt.begin,Zt=Rt.end;/\s/.test(de.text.charAt(Zt-1))&&Zt--;for(var Sn=null,Qt=null,zn=0;zn<Be.length;zn++){var Fn=Be[zn];if(!(Fn.from>=Zt||Fn.to<=Ft)){var pr=Fn.level!=1,Pr=Bl(oe,Te,pr?Math.min(Zt,Fn.to)-1:Math.max(Ft,Fn.from)).right,Ir=Pr<st?st-Pr+1e9:Pr-st;(!Sn||Qt>Ir)&&(Sn=Fn,Qt=Ir)}}return Sn||(Sn=Be[Be.length-1]),Sn.from<Ft&&(Sn={from:Ft,to:Sn.to,level:Sn.level}),Sn.to>Zt&&(Sn={from:Sn.from,to:Zt,level:Sn.level}),Sn}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"))}Ne(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");Ne(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,st=de.gutters.firstChild,Pt=0;st;st=st.nextSibling,++Pt){var Rt=oe.display.gutterSpecs[Pt].className;Me[Rt]=st.offsetLeft+st.clientLeft+Be,Te[Rt]=st.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(Vn(oe.doc,Be))return 0;var st=0;if(Be.widgets)for(var Pt=0;Pt<Be.widgets.length;Pt++)Be.widgets[Pt].height&&(st+=Be.widgets[Pt].height);return Me?st+(Math.ceil(Be.text.length/Te)||1)*de:st+de}}function Ui(oe){var de=oe.doc,Me=$a(oe);de.iter(function(Te){var Be=Me(Te);Be!=Te.height&&Jn(Te,Be)})}function rl(oe,de,Me,Te){var Be=oe.display;if(!Me&&dr(de).getAttribute("cm-not-content")=="true")return null;var st,Pt,Rt=Be.lineSpace.getBoundingClientRect();try{st=de.clientX-Rt.left,Pt=de.clientY-Rt.top}catch(Qt){return null}var Ft=Wc(oe,st,Pt),Zt;if(Te&&Ft.xRel>0&&(Zt=wn(oe.doc,Ft.line).text).length==Ft.ch){var Sn=et(Zt,Zt.length,oe.options.tabSize)-Zt.length;Ft=mn(Ft.line,Math.max(0,Math.round((st-Ru(oe.display).left)/ic(oe.display))-Sn))}return Ft}function zs(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 ya(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)Tn&&Gr(oe.doc,de)<Be.viewTo&&ss(oe);else if(Me<=Be.viewFrom)Tn&&Tr(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 st=Cl(oe,Me,Me+Te,1);st?(Be.view=Be.view.slice(st.index),Be.viewFrom=st.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 Rt=Cl(oe,de,de,-1),Ft=Cl(oe,Me,Me+Te,1);Rt&&Ft?(Be.view=Be.view.slice(0,Rt.index).concat(qi(oe,Rt.lineN,Ft.lineN)).concat(Be.view.slice(Ft.index)),Be.viewTo+=Te):ss(oe)}var Zt=Be.externalMeasured;Zt&&(Me<Zt.lineN?Zt.lineN+=Te:de<Zt.lineN+Zt.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 st=Te.view[zs(oe,de)];if(st.node!=null){var Pt=st.changes||(st.changes=[]);wt(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=zs(oe,de),st,Pt=oe.display.view;if(!Tn||Me==oe.doc.first+oe.doc.size)return{index:Be,lineN:Me};for(var Rt=oe.display.viewFrom,Ft=0;Ft<Be;Ft++)Rt+=Pt[Ft].size;if(Rt!=de){if(Te>0){if(Be==Pt.length-1)return null;st=Rt+Pt[Be].size-de,Be++}else st=Rt-de;de+=st,Me+=st}for(;Gr(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 da(oe,de,Me){var Te=oe.display,Be=Te.view;Be.length==0||de>=Te.viewTo||Me<=Te.viewFrom?(Te.view=qi(oe,de,Me),Te.viewFrom=de):(Te.viewFrom>de?Te.view=qi(oe,de,Te.viewFrom).concat(Te.view):Te.viewFrom<de&&(Te.view=Te.view.slice(zs(oe,de))),Te.viewFrom=de,Te.viewTo<Me?Te.view=Te.view.concat(qi(oe,Te.viewTo,Me)):Te.viewTo>Me&&(Te.view=Te.view.slice(0,zs(oe,Me)))),Te.viewTo=Me}function _l(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(),st=Te.selection=document.createDocumentFragment(),Pt=0;Pt<Me.sel.ranges.length;Pt++)if(!(!de&&Pt==Me.sel.primIndex)){var Rt=Me.sel.ranges[Pt];if(!(Rt.from().line>=oe.display.viewTo||Rt.to().line<oe.display.viewFrom)){var Ft=Rt.empty();(Ft||oe.options.showCursorWhenSelecting)&&$o(oe,Rt.head,Be),Ft||Go(oe,Rt,st)}}return Te}function $o(oe,de,Me){var Te=ka(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 st=Me.appendChild(Oe("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));st.style.display="",st.style.left=Te.other.left+"px",st.style.top=Te.other.top+"px",st.style.height=(Te.other.bottom-Te.other.top)*.85+"px"}}function il(oe,de){return oe.top-de.top||oe.left-de.left}function Go(oe,de,Me){var Te=oe.display,Be=oe.doc,st=document.createDocumentFragment(),Pt=Ru(oe.display),Rt=Pt.left,Ft=Math.max(Te.sizerWidth,dl(oe)-Te.sizer.offsetLeft)-Pt.right,Zt=Be.direction=="ltr";function Sn(yi,Bi,mo,mi){Bi<0&&(Bi=0),Bi=Math.round(Bi),mi=Math.round(mi),st.appendChild(Oe("div",null,"CodeMirror-selected","position: absolute; left: "+yi+`px;
|
|
|
top: `+Bi+"px; width: "+(mo==null?Ft-yi:mo)+`px;
|
|
|
height: `+(mi-Bi)+"px"))}function Qt(yi,Bi,mo){var mi=wn(Be,yi),Oo=mi.text.length,Ya,Ds;function os(ks,ou){return Rl(oe,mn(yi,ks),"div",mi,ou)}function Kl(ks,ou,al){var Os=fh(oe,mi,null,ks),oa=ou=="ltr"==(al=="after")?"left":"right",hs=al=="after"?Os.begin:Os.end-(/\s/.test(mi.text.charAt(Os.end-1))?2:1);return os(hs,oa)[oa]}var vl=dt(mi,Be.direction);return He(vl,Bi||0,mo==null?Oo:mo,function(ks,ou,al,Os){var oa=al=="ltr",hs=os(ks,oa?"left":"right"),Gs=os(ou-1,oa?"right":"left"),sl=Bi==null&&ks==0,Zu=mo==null&&ou==Oo,as=Os==0,ku=!vl||Os==vl.length-1;if(Gs.top-hs.top<=3){var ys=(Zt?sl:Zu)&&as,xf=(Zt?Zu:sl)&&ku,vu=ys?Rt:(oa?hs:Gs).left,au=xf?Ft:(oa?Gs:hs).right;Sn(vu,hs.top,au-vu,hs.bottom)}else{var Vl,Ia,Hs,Mc;oa?(Vl=Zt&&sl&&as?Rt:hs.left,Ia=Zt?Ft:Kl(ks,al,"before"),Hs=Zt?Rt:Kl(ou,al,"after"),Mc=Zt&&Zu&&ku?Ft:Gs.right):(Vl=Zt?Kl(ks,al,"before"):Rt,Ia=!Zt&&sl&&as?Ft:hs.right,Hs=!Zt&&Zu&&ku?Rt:Gs.left,Mc=Zt?Kl(ou,al,"after"):Ft),Sn(Vl,hs.top,Ia-Vl,hs.bottom),hs.bottom<Gs.top&&Sn(Rt,hs.bottom,null,Gs.top),Sn(Hs,Gs.top,Mc-Hs,Gs.bottom)}(!Ya||il(hs,Ya)<0)&&(Ya=hs),il(Gs,Ya)<0&&(Ya=Gs),(!Ds||il(hs,Ds)<0)&&(Ds=hs),il(Gs,Ds)<0&&(Ds=Gs)}),{start:Ya,end:Ds}}var zn=de.from(),Fn=de.to();if(zn.line==Fn.line)Qt(zn.line,zn.ch,Fn.ch);else{var pr=wn(Be,zn.line),Pr=wn(Be,Fn.line),Ir=gi(pr)==gi(Pr),ri=Qt(zn.line,zn.ch,Ir?pr.text.length+1:null).end,Mi=Qt(Fn.line,Ir?0:null,Fn.ch).start;Ir&&(ri.top<Mi.top-2?(Sn(ri.right,ri.top,null,ri.bottom),Sn(Rt,Mi.top,Mi.left,Mi.bottom)):Sn(ri.right,ri.top,Mi.left-ri.right,ri.bottom)),ri.bottom<Mi.top&&Sn(Rt,ri.bottom,null,Mi.top)}Me.appendChild(st)}function la(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 Oa(oe){oe.state.focused||(oe.display.input.focus(),Ko(oe))}function Va(oe){oe.state.delayingBlurEvent=!0,setTimeout(function(){oe.state.delayingBlurEvent&&(oe.state.delayingBlurEvent=!1,Vc(oe))},100)}function Ko(oe,de){oe.state.delayingBlurEvent&&(oe.state.delayingBlurEvent=!1),oe.options.readOnly!="nocursor"&&(oe.state.focused||(At(oe,"focus",oe,de),oe.state.focused=!0,Ze(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()),la(oe))}function Vc(oe,de){oe.state.delayingBlurEvent||(oe.state.focused&&(At(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 $i(oe){for(var de=oe.display,Me=de.lineDiv.offsetTop,Te=0;Te<de.view.length;Te++){var Be=de.view[Te],st=oe.options.lineWrapping,Pt=void 0,Rt=0;if(!Be.hidden){if(je&&ve<8){var Ft=Be.node.offsetTop+Be.node.offsetHeight;Pt=Ft-Me,Me=Ft}else{var Zt=Be.node.getBoundingClientRect();Pt=Zt.bottom-Zt.top,!st&&Be.text.firstChild&&(Rt=Be.text.firstChild.getBoundingClientRect().right-Zt.left-1)}var Sn=Be.line.height-Pt;if((Sn>.005||Sn<-.005)&&(Jn(Be.line,Pt),Hf(Be.line),Be.rest))for(var Qt=0;Qt<Be.rest.length;Qt++)Hf(Be.rest[Qt]);if(Rt>oe.display.sizerWidth){var zn=Math.ceil(Rt/ic(oe.display));zn>oe.display.maxLineLength&&(oe.display.maxLineLength=zn,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 Fo(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,st=In(de,Te),Pt=In(de,Be);if(Me&&Me.ensure){var Rt=Me.ensure.from.line,Ft=Me.ensure.to.line;Rt<st?(st=Rt,Pt=In(de,Qi(wn(de,Rt))+oe.wrapper.clientHeight)):Math.min(Ft,de.lastLine())>=Pt&&(st=In(de,Qi(wn(de,Ft))-oe.wrapper.clientHeight),Pt=Ft)}return{from:st,to:Math.max(Pt,st+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 st=Oe("div","\u200B",null,`position: absolute;
|
|
|
top: `+(de.top-Me.viewOffset-As(oe.display))+`px;
|
|
|
height: `+(de.bottom-de.top+_s(oe)+Me.barHeight)+`px;
|
|
|
left: `+de.left+"px; width: "+Math.max(2,de.right-de.left)+"px;");oe.display.lineSpace.appendChild(st),st.scrollIntoView(Be),oe.display.lineSpace.removeChild(st)}}}function Uh(oe,de,Me,Te){Te==null&&(Te=0);var Be;!oe.options.lineWrapping&&de==Me&&(de=de.ch?mn(de.line,de.sticky=="before"?de.ch-1:de.ch,"after"):de,Me=de.sticky=="before"?mn(de.line,de.ch+1,"before"):de);for(var st=0;st<5;st++){var Pt=!1,Rt=ka(oe,de),Ft=!Me||Me==de?Rt:ka(oe,Me);Be={left:Math.min(Rt.left,Ft.left),top:Math.min(Rt.top,Ft.top)-Te,right:Math.max(Rt.left,Ft.left),bottom:Math.max(Rt.bottom,Ft.bottom)+Te};var Zt=Wf(oe,Be),Sn=oe.doc.scrollTop,Qt=oe.doc.scrollLeft;if(Zt.scrollTop!=null&&(Xc(oe,Zt.scrollTop),Math.abs(oe.doc.scrollTop-Sn)>1&&(Pt=!0)),Zt.scrollLeft!=null&&(Uu(oe,Zt.scrollLeft),Math.abs(oe.doc.scrollLeft-Qt)>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,st=$c(oe),Pt={};de.bottom-de.top>st&&(de.bottom=de.top+st);var Rt=oe.doc.height+Eu(Me),Ft=de.top<Te,Zt=de.bottom>Rt-Te;if(de.top<Be)Pt.scrollTop=Ft?0:de.top;else if(de.bottom>Be+st){var Sn=Math.min(de.top,(Zt?Rt:de.bottom)-st);Sn!=Be&&(Pt.scrollTop=Sn)}var Qt=oe.options.fixedGutter?0:Me.gutters.offsetWidth,zn=oe.curOp&&oe.curOp.scrollLeft!=null?oe.curOp.scrollLeft:Me.scroller.scrollLeft-Qt,Fn=dl(oe)-Me.gutters.offsetWidth,pr=de.right-de.left>Fn;return pr&&(de.right=de.left+Fn),de.left<10?Pt.scrollLeft=0:de.left<zn?Pt.scrollLeft=Math.max(0,de.left+Qt-(pr?0:10)):de.right>Fn+zn-3&&(Pt.scrollLeft=de.right+(pr?0:10)-Fn),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 Vo(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||(it||Xr(oe,{top:de}),Kf(oe,de,!0),it&&Xr(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,Wi(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+_s(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),kt(Te,"scroll",function(){Te.clientHeight&&de(Te.scrollTop,"vertical")}),kt(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 st=oe.viewWidth-oe.barLeft-(Me?Te:0);this.horiz.firstChild.style.width=Math.max(0,oe.scrollWidth-oe.clientWidth+st)+"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 ot,this.disableVert=new ot},xc.prototype.enableZeroWidthBar=function(oe,de,Me){oe.style.pointerEvents="auto";function Te(){var Be=oe.getBoundingClientRect(),st=Me=="vert"?document.elementFromPoint(Be.right-1,(Be.top+Be.bottom)/2):document.elementFromPoint((Be.right+Be.left)/2,Be.bottom-1);st!=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&&$i(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),kt(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&&Ze(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},xs(oe.curOp)}function bc(oe){var de=oe.curOp;de&&lo(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++)_t(de[Me]);for(var Te=0;Te<de.length;Te++)Gt(de[Te]);for(var Be=0;Be<de.length;Be++)nn(de[Be]);for(var st=0;st<de.length;st++)rn(de[st]);for(var Pt=0;Pt<de.length;Pt++)xn(de[Pt])}function _t(oe){var de=oe.cm,Me=de.display;kr(de),oe.updateMaxLine&&Mo(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 Gt(oe){oe.updatedDisplay=oe.mustUpdate&&qr(oe.cm,oe.update)}function nn(oe){var de=oe.cm,Me=de.display;oe.updatedDisplay&&$i(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+_s(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 rn(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&&ki(de,oe.barMeasure),oe.selectionChanged&&la(de),de.state.focused&&oe.updateInput&&de.display.input.reset(oe.typing),Me&&Oa(oe.cm)}function xn(oe){var de=oe.cm,Me=de.display,Te=de.doc;if(oe.updatedDisplay&&br(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,Mn(Te,oe.scrollToPos.from),Mn(Te,oe.scrollToPos.to),oe.scrollToPos.margin);Uf(de,Be)}var st=oe.maybeHiddenMarkers,Pt=oe.maybeUnhiddenMarkers;if(st)for(var Rt=0;Rt<st.length;++Rt)st[Rt].lines.length||At(st[Rt],"hide");if(Pt)for(var Ft=0;Ft<Pt.length;++Ft)Pt[Ft].lines.length&&At(Pt[Ft],"unhide");Me.wrapper.offsetHeight&&(Te.scrollTop=de.display.scroller.scrollTop),oe.changeObjs&&At(de,"changes",de,oe.changeObjs),oe.update&&oe.update.finish()}function dn(oe,de){if(oe.curOp)return de();fl(oe);try{return de()}finally{bc(oe)}}function Bn(oe,de){return function(){if(oe.curOp)return de.apply(oe,arguments);fl(oe);try{return de.apply(oe,arguments)}finally{bc(oe)}}}function Rn(oe){return function(){if(this.curOp)return oe.apply(this,arguments);fl(this);try{return oe.apply(this,arguments)}finally{bc(this)}}}function Dn(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,pt(rr,oe))}function rr(oe){var de=oe.doc;if(!(de.highlightFrontier>=oe.display.viewTo)){var Me=+new Date+oe.options.workTime,Te=hi(oe,de.highlightFrontier),Be=[];de.iter(Te.line,Math.min(de.first+de.size,oe.display.viewTo+500),function(st){if(Te.line>=oe.display.viewFrom){var Pt=st.styles,Rt=st.text.length>oe.options.maxHighlightLength?vn(de.mode,Te.state):null,Ft=Nr(oe,st,Te,!0);Rt&&(Te.state=Rt),st.styles=Ft.styles;var Zt=st.styleClasses,Sn=Ft.classes;Sn?st.styleClasses=Sn:Zt&&(st.styleClasses=null);for(var Qt=!Pt||Pt.length!=st.styles.length||Zt!=Sn&&(!Zt||!Sn||Zt.bgClass!=Sn.bgClass||Zt.textClass!=Sn.textClass),zn=0;!Qt&&zn<Pt.length;++zn)Qt=Pt[zn]!=st.styles[zn];Qt&&Be.push(Te.line),st.stateAfter=Te.save(),Te.nextLine()}else st.text.length<=oe.options.maxHighlightLength&&yn(oe,st.text,Te),st.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&&dn(oe,function(){for(var st=0;st<Be.length;st++)Po(oe,Be[st],"text")})}}var tr=function(oe,de,Me){var Te=oe.display;this.viewport=de,this.visible=Fo(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++)At.apply(null,this.events[oe])};function kr(oe){var de=oe.display;!de.scrollbarsClipped&&de.scroller.offsetWidth&&(de.nativeBarWidth=de.scroller.offsetWidth-de.scroller.clientWidth,de.heightForcer.style.height=_s(oe)+"px",de.sizer.style.marginBottom=-de.nativeBarWidth+"px",de.sizer.style.borderRightWidth=_s(oe)+"px",de.scrollbarsClipped=!0)}function Er(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 qr(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&&_l(oe)==0)return!1;ti(oe)&&(ss(oe),de.dims=Cd(oe));var Be=Te.first+Te.size,st=Math.max(de.visible.from-oe.options.viewportMargin,Te.first),Pt=Math.min(Be,de.visible.to+oe.options.viewportMargin);Me.viewFrom<st&&st-Me.viewFrom<20&&(st=Math.max(Te.first,Me.viewFrom)),Me.viewTo>Pt&&Me.viewTo-Pt<20&&(Pt=Math.min(Be,Me.viewTo)),Tn&&(st=Gr(oe.doc,st),Pt=Tr(oe.doc,Pt));var Rt=st!=Me.viewFrom||Pt!=Me.viewTo||Me.lastWrapHeight!=de.wrapperHeight||Me.lastWrapWidth!=de.wrapperWidth;da(oe,st,Pt),Me.viewOffset=Qi(wn(oe.doc,Me.viewFrom)),oe.display.mover.style.top=Me.viewOffset+"px";var Ft=_l(oe);if(!Rt&&Ft==0&&!de.force&&Me.renderedView==Me.view&&(Me.updateLineNumbers==null||Me.updateLineNumbers>=Me.viewTo))return!1;var Zt=Er(oe);return Ft>4&&(Me.lineDiv.style.display="none"),Vr(oe,Me.updateLineNumbers,de.dims),Ft>4&&(Me.lineDiv.style.display=""),Me.renderedView=Me.view,gr(Zt),ke(Me.cursorDiv),ke(Me.selectionDiv),Me.gutters.style.height=Me.sizer.style.minHeight=0,Rt&&(Me.lastWrapHeight=de.wrapperHeight,Me.lastWrapWidth=de.wrapperWidth,qn(oe,400)),Me.updateLineNumbers=null,!0}function br(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=Fo(oe.display,oe.doc,Me),de.visible.from>=oe.display.viewFrom&&de.visible.to<=oe.display.viewTo)break}else Te&&(de.visible=Fo(oe.display,oe.doc,Me));if(!qr(oe,de))break;$i(oe);var Be=pu(oe);ws(oe),wc(oe,Be),ki(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 Xr(oe,de){var Me=new tr(oe,de);if(qr(oe,Me)){$i(oe),br(oe,Me);var Te=pu(oe);ws(oe),wc(oe,Te),ki(oe,Te),Me.finish()}}function Vr(oe,de,Me){var Te=oe.display,Be=oe.options.lineNumbers,st=Te.lineDiv,Pt=st.firstChild;function Rt(pr){var Pr=pr.nextSibling;return ce&&ae&&oe.display.currentWheelTarget==pr?pr.style.display="none":pr.parentNode.removeChild(pr),Pr}for(var Ft=Te.view,Zt=Te.viewFrom,Sn=0;Sn<Ft.length;Sn++){var Qt=Ft[Sn];if(!Qt.hidden)if(!Qt.node||Qt.node.parentNode!=st){var zn=Dl(oe,Qt,Zt,Me);st.insertBefore(zn,Pt)}else{for(;Pt!=Qt.node;)Pt=Rt(Pt);var Fn=Be&&de!=null&&de<=Zt&&Qt.lineNumber;Qt.changes&&(wt(Qt.changes,"gutter")>-1&&(Fn=!1),Ra(oe,Qt,Zt,Me)),Fn&&(ke(Qt.lineNumber),Qt.lineNumber.appendChild(document.createTextNode(ar(oe.options,Zt)))),Pt=Qt.node.nextSibling}Zt+=Qt.size}for(;Pt;)Pt=Rt(Pt)}function ci(oe){var de=oe.gutters.offsetWidth;oe.sizer.style.marginLeft=de+"px"}function ki(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+_s(oe)+"px"}function Wi(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,st=Te+"px",Pt=0;Pt<Me.length;Pt++)if(!Me[Pt].hidden){oe.options.fixedGutter&&(Me[Pt].gutter&&(Me[Pt].gutter.style.left=st),Me[Pt].gutterBackground&&(Me[Pt].gutterBackground.style.left=st));var Rt=Me[Pt].alignable;if(Rt)for(var Ft=0;Ft<Rt.length;Ft++)Rt[Ft].style.left=st}oe.options.fixedGutter&&(de.gutters.style.left=Te+Be+"px")}}function ti(oe){if(!oe.options.lineNumbers)return!1;var de=oe.doc,Me=ar(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")),st=Be.firstChild.offsetWidth,Pt=Be.offsetWidth-st;return Te.lineGutter.style.width="",Te.lineNumInnerWidth=Math.max(st,Te.lineGutter.offsetWidth-Pt)+1,Te.lineNumWidth=Te.lineNumInnerWidth+Pt,Te.lineNumChars=Te.lineNumInnerWidth?Me.length:-1,Te.lineGutter.style.width=Te.lineNumWidth+"px",ci(oe.display),!0}return!1}function Li(oe,de){for(var Me=[],Te=!1,Be=0;Be<oe.length;Be++){var st=oe[Be],Pt=null;if(typeof st!="string"&&(Pt=st.style,st=st.className),st=="CodeMirror-linenumbers")if(de)Te=!0;else continue;Me.push({className:st,style:Pt})}return de&&!Te&&Me.push({className:"CodeMirror-linenumbers",style:null}),Me}function ho(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],st=Be.className,Pt=Be.style,Rt=de.appendChild(Oe("div",null,"CodeMirror-gutter "+st));Pt&&(Rt.style.cssText=Pt),st=="CodeMirror-linenumbers"&&(oe.lineGutter=Rt,Rt.style.width=(oe.lineNumWidth||1)+"px")}de.style.display=Me.length?"":"none",ci(oe)}function ui(oe){ho(oe.display),ya(oe),Wi(oe)}function Ci(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 st=Fe("div",[Be.lineSpace],"CodeMirror-lines");Be.mover=Oe("div",[st],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&&!(it&&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=Li(Te.gutters,Te.lineNumbers),ho(Be),Me.init(Be)}var si=0,zr=null;je?zr=-.53:it?zr=15:Ce?zr=-.7:we&&(zr=-1/3);function vi(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=vi(oe);return de.x*=zr,de.y*=zr,de}function Yi(oe,de){var Me=vi(de),Te=Me.x,Be=Me.y,st=oe.display,Pt=st.scroller,Rt=Pt.scrollWidth>Pt.clientWidth,Ft=Pt.scrollHeight>Pt.clientHeight;if(Te&&Rt||Be&&Ft){if(Be&&ae&&ce){e:for(var Zt=de.target,Sn=st.view;Zt!=Pt;Zt=Zt.parentNode)for(var Qt=0;Qt<Sn.length;Qt++)if(Sn[Qt].node==Zt){oe.display.currentWheelTarget=Zt;break e}}if(Te&&!it&&!ye&&zr!=null){Be&&Ft&&Xc(oe,Math.max(0,Pt.scrollTop+Be*zr)),Uu(oe,Math.max(0,Pt.scrollLeft+Te*zr)),(!Be||Be&&Ft)&&kn(de),st.wheelStartX=null;return}if(Be&&zr!=null){var zn=Be*zr,Fn=oe.doc.scrollTop,pr=Fn+st.wrapper.clientHeight;zn<0?Fn=Math.max(0,Fn+zn-50):pr=Math.min(oe.doc.height,pr+zn+50),Xr(oe,{top:Fn,bottom:pr})}si<20&&(st.wheelStartX==null?(st.wheelStartX=Pt.scrollLeft,st.wheelStartY=Pt.scrollTop,st.wheelDX=Te,st.wheelDY=Be,setTimeout(function(){if(st.wheelStartX!=null){var Pr=Pt.scrollLeft-st.wheelStartX,Ir=Pt.scrollTop-st.wheelStartY,ri=Ir&&st.wheelDY&&Ir/st.wheelDY||Pr&&st.wheelDX&&Pr/st.wheelDX;st.wheelStartX=st.wheelStartY=null,ri&&(zr=(zr*si+ri)/(si+1),++si)}},200)):(st.wheelDX+=Te,st.wheelDY+=Be))}}var eo=function(oe,de){this.ranges=oe,this.primIndex=de};eo.prototype.primary=function(){return this.ranges[this.primIndex]},eo.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(!tn(Me.anchor,Te.anchor)||!tn(Me.head,Te.head))return!1}return!0},eo.prototype.deepCopy=function(){for(var oe=[],de=0;de<this.ranges.length;de++)oe[de]=new ni(fn(this.ranges[de].anchor),fn(this.ranges[de].head));return new eo(oe,this.primIndex)},eo.prototype.somethingSelected=function(){for(var oe=0;oe<this.ranges.length;oe++)if(!this.ranges[oe].empty())return!0;return!1},eo.prototype.contains=function(oe,de){de||(de=oe);for(var Me=0;Me<this.ranges.length;Me++){var Te=this.ranges[Me];if(Cn(de,Te.from())>=0&&Cn(oe,Te.to())<=0)return Me}return-1};var ni=function(oe,de){this.anchor=oe,this.head=de};ni.prototype.from=function(){return pn(this.anchor,this.head)},ni.prototype.to=function(){return En(this.anchor,this.head)},ni.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function po(oe,de,Me){var Te=oe&&oe.options.selectionsMayTouch,Be=de[Me];de.sort(function(zn,Fn){return Cn(zn.from(),Fn.from())}),Me=wt(de,Be);for(var st=1;st<de.length;st++){var Pt=de[st],Rt=de[st-1],Ft=Cn(Rt.to(),Pt.from());if(Te&&!Pt.empty()?Ft>0:Ft>=0){var Zt=pn(Rt.from(),Pt.from()),Sn=En(Rt.to(),Pt.to()),Qt=Rt.empty()?Pt.from()==Pt.head:Rt.from()==Rt.head;st<=Me&&--Me,de.splice(--st,2,new ni(Qt?Sn:Zt,Qt?Zt:Sn))}}return new eo(de,Me)}function wo(oe,de){return new eo([new ni(oe,de||oe)],0)}function Qo(oe){return oe.text?mn(oe.from.line+oe.text.length-1,Ct(oe.text).length+(oe.text.length==1?oe.from.ch:0)):oe.to}function Ao(oe,de){if(Cn(oe,de.from)<0)return oe;if(Cn(oe,de.to)<=0)return Qo(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+=Qo(de).ch-de.to.ch),mn(Me,Te)}function Na(oe,de){for(var Me=[],Te=0;Te<oe.sel.ranges.length;Te++){var Be=oe.sel.ranges[Te];Me.push(new ni(Ao(Be.anchor,de),Ao(Be.head,de)))}return po(oe.cm,Me,oe.sel.primIndex)}function Ta(oe,de,Me){return oe.line==de.line?mn(Me.line,oe.ch-de.ch+Me.ch):mn(Me.line+(oe.line-de.line),oe.ch)}function vo(oe,de,Me){for(var Te=[],Be=mn(oe.first,0),st=Be,Pt=0;Pt<de.length;Pt++){var Rt=de[Pt],Ft=Ta(Rt.from,Be,st),Zt=Ta(Qo(Rt),Be,st);if(Be=Rt.to,st=Zt,Me=="around"){var Sn=oe.sel.ranges[Pt],Qt=Cn(Sn.head,Sn.anchor)<0;Te[Pt]=new ni(Qt?Zt:Ft,Qt?Ft:Zt)}else Te[Pt]=new ni(Ft,Ft)}return new eo(Te,oe.sel.primIndex)}function Gi(oe){oe.doc.mode=cn(oe.options,oe.doc.modeOption),Wo(oe)}function Wo(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&&ya(oe)}function Aa(oe,de){return de.from.ch==0&&de.to.ch==0&&Ct(de.text)==""&&(!oe.cm||oe.cm.options.wholeLineUpdateBefore)}function Sa(oe,de,Me,Te){function Be(Mi){return Me?Me[Mi]:null}function st(Mi,yi,Bi){ca(Mi,yi,Bi,Te),Mr(Mi,"change",Mi,de)}function Pt(Mi,yi){for(var Bi=[],mo=Mi;mo<yi;++mo)Bi.push(new Uo(Zt[mo],Be(mo),Te));return Bi}var Rt=de.from,Ft=de.to,Zt=de.text,Sn=wn(oe,Rt.line),Qt=wn(oe,Ft.line),zn=Ct(Zt),Fn=Be(Zt.length-1),pr=Ft.line-Rt.line;if(de.full)oe.insert(0,Pt(0,Zt.length)),oe.remove(Zt.length,oe.size-Zt.length);else if(Aa(oe,de)){var Pr=Pt(0,Zt.length-1);st(Qt,Qt.text,Fn),pr&&oe.remove(Rt.line,pr),Pr.length&&oe.insert(Rt.line,Pr)}else if(Sn==Qt)if(Zt.length==1)st(Sn,Sn.text.slice(0,Rt.ch)+zn+Sn.text.slice(Ft.ch),Fn);else{var Ir=Pt(1,Zt.length-1);Ir.push(new Uo(zn+Sn.text.slice(Ft.ch),Fn,Te)),st(Sn,Sn.text.slice(0,Rt.ch)+Zt[0],Be(0)),oe.insert(Rt.line+1,Ir)}else if(Zt.length==1)st(Sn,Sn.text.slice(0,Rt.ch)+Zt[0]+Qt.text.slice(Ft.ch),Be(0)),oe.remove(Rt.line+1,pr);else{st(Sn,Sn.text.slice(0,Rt.ch)+Zt[0],Be(0)),st(Qt,zn+Qt.text.slice(Ft.ch),Fn);var ri=Pt(1,Zt.length-1);pr>1&&oe.remove(Rt.line+1,pr-1),oe.insert(Rt.line+1,ri)}Mr(oe,"change",oe,de)}function is(oe,de,Me){function Te(Be,st,Pt){if(Be.linked)for(var Rt=0;Rt<Be.linked.length;++Rt){var Ft=Be.linked[Rt];if(Ft.doc!=st){var Zt=Pt&&Ft.sharedHist;Me&&!Zt||(de(Ft.doc,Zt),Te(Ft.doc,Be,Zt))}}}Te(oe,null,!0)}function to(oe,de){if(de.cm)throw new Error("This document is already in use.");oe.doc=de,de.cm=oe,Ui(oe),Gi(oe),Zi(oe),oe.options.lineWrapping||Mo(oe),oe.options.mode=de.modeOption,ya(oe)}function Zi(oe){(oe.doc.direction=="rtl"?Ze:Ie)(oe.display.lineDiv,"CodeMirror-rtl")}function no(oe){dn(oe,function(){Zi(oe),ya(oe)})}function Oi(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 Zo(oe,de){var Me={from:fn(de.from),to:Qo(de),text:_n(oe,de.from,de.to)};return $s(oe,Me,de.from.line,de.to.line+1),is(oe,function(Te){return $s(Te,Me,de.from.line,de.to.line+1)},!0),Me}function Ni(oe){for(;oe.length;){var de=Ct(oe);if(de.ranges)oe.pop();else break}}function fo(oe,de){if(de)return Ni(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 Bo(oe,de,Me,Te){var Be=oe.history;Be.undone.length=0;var st=+new Date,Pt,Rt;if((Be.lastOp==Te||Be.lastOrigin==de.origin&&de.origin&&(de.origin.charAt(0)=="+"&&Be.lastModTime>st-(oe.cm?oe.cm.options.historyEventDelay:500)||de.origin.charAt(0)=="*"))&&(Pt=fo(Be,Be.lastOp==Te)))Rt=Ct(Pt.changes),Cn(de.from,de.to)==0&&Cn(de.from,Rt.to)==0?Rt.to=Qo(de):Pt.changes.push(Zo(oe,de));else{var Ft=Ct(Be.done);for((!Ft||!Ft.ranges)&&ls(oe.sel,Be.done),Pt={changes:[Zo(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=st,Be.lastOp=Be.lastSelOp=Te,Be.lastOrigin=Be.lastSelOrigin=de.origin,Rt||At(oe,"historyAdded")}function Ro(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,st=Te&&Te.origin;Me==Be.lastSelOp||st&&Be.lastSelOrigin==st&&(Be.lastModTime==Be.lastSelTime&&Be.lastOrigin==st||Ro(oe,st,Ct(Be.done),de))?Be.done[Be.done.length-1]=de:ls(de,Be.done),Be.lastSelTime=+new Date,Be.lastSelOrigin=st,Be.lastSelOp=Me,Te&&Te.clearRedo!==!1&&Ni(Be.undone)}function ls(oe,de){var Me=Ct(de);Me&&Me.ranges&&Me.equals(oe)||de.push(oe)}function $s(oe,de,Me,Te){var Be=de["spans_"+oe.id],st=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]={}))[st]=Pt.markedSpans),++st})}function qo(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(qo(Me[Be]));return Te}function ts(oe,de){var Me=Ps(oe,de),Te=$r(oe,de);if(!Me)return Te;if(!Te)return Me;for(var Be=0;Be<Me.length;++Be){var st=Me[Be],Pt=Te[Be];if(st&&Pt)e:for(var Rt=0;Rt<Pt.length;++Rt){for(var Ft=Pt[Rt],Zt=0;Zt<st.length;++Zt)if(st[Zt].marker==Ft.marker)continue e;st.push(Ft)}else Pt&&(Me[Be]=Pt)}return Me}function ps(oe,de,Me){for(var Te=[],Be=0;Be<oe.length;++Be){var st=oe[Be];if(st.ranges){Te.push(Me?eo.prototype.deepCopy.call(st):st);continue}var Pt=st.changes,Rt=[];Te.push({changes:Rt});for(var Ft=0;Ft<Pt.length;++Ft){var Zt=Pt[Ft],Sn=void 0;if(Rt.push({from:Zt.from,to:Zt.to,text:Zt.text}),de)for(var Qt in Zt)(Sn=Qt.match(/^spans_(\d+)$/))&&wt(de,Number(Sn[1]))>-1&&(Ct(Rt)[Qt]=Zt[Qt],delete Zt[Qt])}}return Te}function Wu(oe,de,Me,Te){if(Te){var Be=oe.anchor;if(Me){var st=Cn(de,Be)<0;st!=Cn(Me,Be)<0?(Be=de,de=Me):st!=Cn(de,Me)<0&&(de=Me)}return new ni(Be,de)}else return new ni(Me||de,de)}function ea(oe,de,Me,Te,Be){Be==null&&(Be=oe.cm&&(oe.cm.display.shift||oe.extend)),fa(oe,new eo([Wu(oe.sel.primary(),de,Me,Be)],0),Te)}function ia(oe,de,Me){for(var Te=[],Be=oe.cm&&(oe.cm.display.shift||oe.extend),st=0;st<oe.sel.ranges.length;st++)Te[st]=Wu(oe.sel.ranges[st],de[st],null,Be);var Pt=po(oe.cm,Te,oe.sel.primIndex);fa(oe,Pt,Me)}function ua(oe,de,Me,Te){var Be=oe.sel.ranges.slice(0);Be[de]=Me,fa(oe,po(oe.cm,Be,oe.sel.primIndex),Te)}function Za(oe,de,Me,Te){fa(oe,wo(de,Me),Te)}function gs(oe,de,Me){var Te={ranges:de.ranges,update:function(Be){this.ranges=[];for(var st=0;st<Be.length;st++)this.ranges[st]=new ni(Mn(oe,Be[st].anchor),Mn(oe,Be[st].head))},origin:Me&&Me.origin};return At(oe,"beforeSelectionChange",oe,Te),oe.cm&&At(oe.cm,"beforeSelectionChange",oe.cm,Te),Te.ranges!=de.ranges?po(oe.cm,Te.ranges,Te.ranges.length-1):de}function ko(oe,de,Me){var Te=oe.history.done,Be=Ct(Te);Be&&Be.ranges?(Te[Te.length-1]=de,ms(oe,de,Me)):fa(oe,de,Me)}function fa(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||(Cn(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,qt(oe.cm)),Mr(oe,"cursorActivity",oe))}function zl(oe){pl(oe,El(oe,oe.sel,null,!1))}function El(oe,de,Me,Te){for(var Be,st=0;st<de.ranges.length;st++){var Pt=de.ranges[st],Rt=de.ranges.length==oe.sel.ranges.length&&oe.sel.ranges[st],Ft=tu(oe,Pt.anchor,Rt&&Rt.anchor,Me,Te),Zt=tu(oe,Pt.head,Rt&&Rt.head,Me,Te);(Be||Ft!=Pt.anchor||Zt!=Pt.head)&&(Be||(Be=de.ranges.slice(0,st)),Be[st]=new ni(Ft,Zt))}return Be?po(oe.cm,Be,de.primIndex):de}function eu(oe,de,Me,Te,Be){var st=wn(oe,de.line);if(st.markedSpans)for(var Pt=0;Pt<st.markedSpans.length;++Pt){var Rt=st.markedSpans[Pt],Ft=Rt.marker,Zt="selectLeft"in Ft?!Ft.selectLeft:Ft.inclusiveLeft,Sn="selectRight"in Ft?!Ft.selectRight:Ft.inclusiveRight;if((Rt.from==null||(Zt?Rt.from<=de.ch:Rt.from<de.ch))&&(Rt.to==null||(Sn?Rt.to>=de.ch:Rt.to>de.ch))){if(Be&&(At(Ft,"beforeCursorEnter"),Ft.explicitlyCleared))if(st.markedSpans){--Pt;continue}else break;if(!Ft.atomic)continue;if(Me){var Qt=Ft.find(Te<0?1:-1),zn=void 0;if((Te<0?Sn:Zt)&&(Qt=$l(oe,Qt,-Te,Qt&&Qt.line==de.line?st:null)),Qt&&Qt.line==de.line&&(zn=Cn(Qt,Me))&&(Te<0?zn<0:zn>0))return eu(oe,Qt,de,Te,Be)}var Fn=Ft.find(Te<0?-1:1);return(Te<0?Zt:Sn)&&(Fn=$l(oe,Fn,Te,Fn.line==de.line?st:null)),Fn?eu(oe,Fn,de,Te,Be):null}}return de}function tu(oe,de,Me,Te,Be){var st=Te||1,Pt=eu(oe,de,Me,st,Be)||!Be&&eu(oe,de,Me,st,!0)||eu(oe,de,Me,-st,Be)||!Be&&eu(oe,de,Me,-st,!0);return Pt||(oe.cantEdit=!0,mn(oe.first,0))}function $l(oe,de,Me,Te){return Me<0&&de.ch==0?de.line>oe.first?Mn(oe,mn(de.line-1)):null:Me>0&&de.ch==(Te||wn(oe,de.line)).text.length?de.line<oe.first+oe.size-1?mn(de.line+1,0):null:new mn(de.line,de.ch+Me)}function na(oe){oe.setSelection(mn(oe.firstLine(),0),mn(oe.lastLine()),vt)}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,st,Pt,Rt){Be&&(Te.from=Mn(oe,Be)),st&&(Te.to=Mn(oe,st)),Pt&&(Te.text=Pt),Rt!==void 0&&(Te.origin=Rt)}),At(oe,"beforeChange",oe,Te),oe.cm&&At(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 Bn(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=oi&&!Me&&Hi(oe,de.from,de.to);if(Te)for(var Be=Te.length-1;Be>=0;--Be)pa(oe,{from:Te[Be].from,to:Te[Be].to,text:Be?[""]:de.text,origin:de.origin});else pa(oe,de)}}function pa(oe,de){if(!(de.text.length==1&&de.text[0]==""&&Cn(de.from,de.to)==0)){var Me=Na(oe,de);Bo(oe,de,Me,oe.cm?oe.cm.curOp.id:NaN),nu(oe,de,Me,$r(oe,de));var Te=[];is(oe,function(Be,st){!st&&wt(Te,Be.history)==-1&&(xa(Be.history,de),Te.push(Be.history)),nu(Be,de,null,$r(Be,de))})}}function Gl(oe,de,Me){var Te=oe.cm&&oe.cm.state.suppressEdits;if(!(Te&&!Me)){for(var Be=oe.history,st,Pt=oe.sel,Rt=de=="undo"?Be.done:Be.undone,Ft=de=="undo"?Be.undone:Be.done,Zt=0;Zt<Rt.length&&(st=Rt[Zt],!(Me?st.ranges&&!st.equals(oe.sel):!st.ranges));Zt++);if(Zt!=Rt.length){for(Be.lastOrigin=Be.lastSelOrigin=null;;)if(st=Rt.pop(),st.ranges){if(ls(st,Ft),Me&&!st.equals(oe.sel)){fa(oe,st,{clearRedo:!1});return}Pt=st}else if(Te){Rt.push(st);return}else break;var Sn=[];ls(Pt,Ft),Ft.push({changes:Sn,generation:Be.generation}),Be.generation=st.generation||++Be.maxGeneration;for(var Qt=on(oe,"beforeChange")||oe.cm&&on(oe.cm,"beforeChange"),zn=function(Pr){var Ir=st.changes[Pr];if(Ir.origin=de,Qt&&!Ts(oe,Ir,!1))return Rt.length=0,{};Sn.push(Zo(oe,Ir));var ri=Pr?Na(oe,Ir):Ct(Rt);nu(oe,Ir,ri,ts(oe,Ir)),!Pr&&oe.cm&&oe.cm.scrollIntoView({from:Ir.from,to:Qo(Ir)});var Mi=[];is(oe,function(yi,Bi){!Bi&&wt(Mi,yi.history)==-1&&(xa(yi.history,Ir),Mi.push(yi.history)),nu(yi,Ir,null,ts(yi,Ir))})},Fn=st.changes.length-1;Fn>=0;--Fn){var pr=zn(Fn);if(pr)return pr.v}}}}function oc(oe,de){if(de!=0&&(oe.first+=de,oe.sel=new eo(mt(oe.sel.ranges,function(Be){return new ni(mn(Be.anchor.line+de,Be.anchor.ch),mn(Be.head.line+de,Be.head.ch))}),oe.sel.primIndex),oe.cm)){ya(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 Bn(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:mn(oe.first,0),to:mn(de.to.line+Be,de.to.ch),text:[Ct(de.text)],origin:de.origin}}var st=oe.lastLine();de.to.line>st&&(de={from:de.from,to:mn(st,wn(oe,st).text.length),text:[de.text[0]],origin:de.origin}),de.removed=_n(oe,de.from,de.to),Me||(Me=Na(oe,de)),oe.cm?Mu(oe.cm,de,Te):Sa(oe,de,Te),ms(oe,Me,vt),oe.cantEdit&&tu(oe,mn(oe.firstLine(),0))&&(oe.cantEdit=!1)}}function Mu(oe,de,Me){var Te=oe.doc,Be=oe.display,st=de.from,Pt=de.to,Rt=!1,Ft=st.line;oe.options.lineWrapping||(Ft=Wt(gi(wn(Te,st.line))),Te.iter(Ft,Pt.line+1,function(Fn){if(Fn==Be.maxLine)return Rt=!0,!0})),Te.sel.contains(de.from,de.to)>-1&&qt(oe),Sa(Te,de,Me,$a(oe)),oe.options.lineWrapping||(Te.iter(Ft,st.line+de.text.length,function(Fn){var pr=zo(Fn);pr>Be.maxLineLength&&(Be.maxLine=Fn,Be.maxLineLength=pr,Be.maxLineChanged=!0,Rt=!1)}),Rt&&(oe.curOp.updateMaxLine=!0)),Cr(Te,st.line),qn(oe,400);var Zt=de.text.length-(Pt.line-st.line)-1;de.full?ya(oe):st.line==Pt.line&&de.text.length==1&&!Aa(oe.doc,de)?Po(oe,st.line,"text"):ya(oe,st.line,Pt.line+1,Zt);var Sn=on(oe,"changes"),Qt=on(oe,"change");if(Qt||Sn){var zn={from:st,to:Pt,text:de.text,removed:de.removed,origin:de.origin};Qt&&Mr(oe,"change",oe,zn),Sn&&(oe.curOp.changeObjs||(oe.curOp.changeObjs=[])).push(zn)}oe.display.selForContextMenu=null}function Ku(oe,de,Me,Te,Be){var st;Te||(Te=Me),Cn(Te,Me)<0&&(st=[Te,Me],Me=st[0],Te=st[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 Xo(oe,de,Me,Te){for(var Be=0;Be<oe.length;++Be){var st=oe[Be],Pt=!0;if(st.ranges){st.copied||(st=oe[Be]=st.deepCopy(),st.copied=!0);for(var Rt=0;Rt<st.ranges.length;Rt++)Tl(st.ranges[Rt].anchor,de,Me,Te),Tl(st.ranges[Rt].head,de,Me,Te);continue}for(var Ft=0;Ft<st.changes.length;++Ft){var Zt=st.changes[Ft];if(Me<Zt.from.line)Zt.from=mn(Zt.from.line+Te,Zt.from.ch),Zt.to=mn(Zt.to.line+Te,Zt.to.ch);else if(de<=Zt.to.line){Pt=!1;break}}Pt||(oe.splice(0,Be+1),Be=0)}}function xa(oe,de){var Me=de.from.line,Te=de.to.line,Be=de.text.length-(Te-Me)-1;Xo(oe.done,Me,Te,Be),Xo(oe.undone,Me,Te,Be)}function us(oe,de,Me,Te){var Be=de,st=de;return typeof de=="number"?st=wn(oe,Ln(oe,de)):Be=Wt(de),Be==null?null:(Te(st,Be)&&oe.cm&&Po(oe.cm,Be,Me),st)}function wa(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}wa.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,Jo(Be),Mr(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 Ho(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}Ho.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 st=Math.min(de,Be-oe),Pt=Te.height;if(Te.removeInner(oe,st),this.height-=Pt-Te.height,Be==st&&(this.children.splice(Me--,1),Te.parent=null),(de-=st)==0)break;oe=0}else oe-=Be}if(this.size-de<25&&(this.children.length>1||!(this.children[0]instanceof wa))){var Rt=[];this.collapse(Rt),this.children=[new wa(Rt)],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],st=Be.chunkSize();if(oe<=st){if(Be.insertInner(oe,de,Me),Be.lines&&Be.lines.length>50){for(var Pt=Be.lines.length%25+25,Rt=Pt;Rt<Be.lines.length;){var Ft=new wa(Be.lines.slice(Rt,Rt+=25));Be.height-=Ft.height,this.children.splice(++Te,0,Ft),Ft.parent=this}Be.lines=Be.lines.slice(0,Pt),this.maybeSpill()}break}oe-=st}},maybeSpill:function(){if(!(this.children.length<=10)){var oe=this;do{var de=oe.children.splice(oe.children.length-5,5),Me=new Ho(de);if(oe.parent){oe.size-=Me.size,oe.height-=Me.height;var Be=wt(oe.parent.children,oe);oe.parent.children.splice(Be+1,0,Me)}else{var Te=new Ho(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],st=Be.chunkSize();if(oe<st){var Pt=Math.min(de,st-oe);if(Be.iterN(oe,Pt,Me))return!0;if((de-=Pt)==0)break;oe=0}else oe-=st}}};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=Wt(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 st=tl(this);Jn(Me,Math.max(0,Me.height-st)),oe&&(dn(oe,function(){gl(oe,Me,-st),Po(oe,Te,"widget")}),Mr(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&&(Vn(this.doc,Te)||Jn(Te,Te.height+Be),Me&&dn(Me,function(){Me.curOp.forceUpdate=!0,gl(Me,Te,Be),Mr(Me,"lineWidgetChanged",Me,oe,Wt(Te))}))},gn(vs);function gl(oe,de,Me){Qi(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),st=oe.cm;return st&&Be.noHScroll&&(st.display.alignWidgets=!0),us(oe,de,"widget",function(Pt){var Rt=Pt.widgets||(Pt.widgets=[]);if(Be.insertAt==null?Rt.push(Be):Rt.splice(Math.min(Rt.length-1,Math.max(0,Be.insertAt)),0,Be),Be.line=Pt,st&&!Vn(oe,Pt)){var Ft=Qi(Pt)<oe.scrollTop;Jn(Pt,Pt.height+tl(Be)),Ft&&Ed(st,Be.height),st.curOp.forceUpdate=!0}return!0}),st&&Mr(st,"lineWidgetAdded",st,Be,typeof de=="number"?de:Wt(de)),Be}var cf=0,sn=function(oe,de){this.lines=[],this.type=de,this.doc=oe,this.id=++cf};sn.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&&Mr(this,"clear",Me.from,Me.to)}for(var Te=null,Be=null,st=0;st<this.lines.length;++st){var Pt=this.lines[st],Rt=xo(Pt.markedSpans,this);oe&&!this.collapsed?Po(oe,Wt(Pt),"text"):oe&&(Rt.to!=null&&(Be=Wt(Pt)),Rt.from!=null&&(Te=Wt(Pt))),Pt.markedSpans=zi(Pt.markedSpans,Rt),Rt.from==null&&this.collapsed&&!Vn(this.doc,Pt)&&oe&&Jn(Pt,Gu(oe.display))}if(oe&&this.collapsed&&!oe.options.lineWrapping)for(var Ft=0;Ft<this.lines.length;++Ft){var Zt=gi(this.lines[Ft]),Sn=zo(Zt);Sn>oe.display.maxLineLength&&(oe.display.maxLine=Zt,oe.display.maxLineLength=Sn,oe.display.maxLineChanged=!0)}Te!=null&&oe&&this.collapsed&&ya(oe,Te,Be+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,oe&&zl(oe.doc)),oe&&Mr(oe,"markerCleared",oe,this,Te,Be),de&&bc(oe),this.parent&&this.parent.clear()}},sn.prototype.find=function(oe,de){oe==null&&this.type=="bookmark"&&(oe=1);for(var Me,Te,Be=0;Be<this.lines.length;++Be){var st=this.lines[Be],Pt=xo(st.markedSpans,this);if(Pt.from!=null&&(Me=mn(de?st:Wt(st),Pt.from),oe==-1))return Me;if(Pt.to!=null&&(Te=mn(de?st:Wt(st),Pt.to),oe==1))return Te}return Me&&{from:Me,to:Te}},sn.prototype.changed=function(){var oe=this,de=this.find(-1,!0),Me=this,Te=this.doc.cm;!de||!Te||dn(Te,function(){var Be=de.line,st=Wt(de.line),Pt=vc(Te,st);if(Pt&&(Es(Pt),Te.curOp.selectionChanged=Te.curOp.forceUpdate=!0),Te.curOp.updateMaxLine=!0,!Vn(Me.doc,Be)&&Me.height!=null){var Rt=Me.height;Me.height=null;var Ft=tl(Me)-Rt;Ft&&Jn(Be,Be.height+Ft)}Mr(Te,"markerChanged",Te,oe)})},sn.prototype.attachLine=function(oe){if(!this.lines.length&&this.doc.cm){var de=this.doc.cm.curOp;(!de.maybeHiddenMarkers||wt(de.maybeHiddenMarkers,this)==-1)&&(de.maybeUnhiddenMarkers||(de.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(oe)},sn.prototype.detachLine=function(oe){if(this.lines.splice(wt(this.lines,oe),1),!this.lines.length&&this.doc.cm){var de=this.doc.cm.curOp;(de.maybeHiddenMarkers||(de.maybeHiddenMarkers=[])).push(this)}},gn(sn);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 Bn(oe.cm,Pc)(oe,de,Me,Te,Be);var st=new sn(oe,Be),Pt=Cn(de,Me);if(Te&&Mt(Te,st,!1),Pt>0||Pt==0&&st.clearWhenEmpty!==!1)return st;if(st.replacedWith&&(st.collapsed=!0,st.widgetNode=Fe("span",[st.replacedWith],"CodeMirror-widget"),Te.handleMouseEvents||st.widgetNode.setAttribute("cm-ignore-events","true"),Te.insertLeft&&(st.widgetNode.insertLeft=!0)),st.collapsed){if(Pi(oe,de.line,de,Me,st)||de.line!=Me.line&&Pi(oe,Me.line,de,Me,st))throw new Error("Inserting collapsed marker partially overlapping an existing one");Nn()}st.addToHistory&&Bo(oe,{from:de,to:Me,origin:"markText"},oe.sel,NaN);var Rt=de.line,Ft=oe.cm,Zt;if(oe.iter(Rt,Me.line+1,function(Qt){Ft&&st.collapsed&&!Ft.options.lineWrapping&&gi(Qt)==Ft.display.maxLine&&(Zt=!0),st.collapsed&&Rt!=de.line&&Jn(Qt,0),Lo(Qt,new fi(st,Rt==de.line?de.ch:null,Rt==Me.line?Me.ch:null)),++Rt}),st.collapsed&&oe.iter(de.line,Me.line+1,function(Qt){Vn(oe,Qt)&&Jn(Qt,0)}),st.clearOnEnter&&kt(st,"beforeCursorEnter",function(){return st.clear()}),st.readOnly&&(Ri(),(oe.history.done.length||oe.history.undone.length)&&oe.clearHistory()),st.collapsed&&(st.id=++cf,st.atomic=!0),Ft){if(Zt&&(Ft.curOp.updateMaxLine=!0),st.collapsed)ya(Ft,de.line,Me.line+1);else if(st.className||st.startStyle||st.endStyle||st.css||st.attributes||st.title)for(var Sn=de.line;Sn<=Me.line;Sn++)Po(Ft,Sn,"text");st.atomic&&zl(Ft.doc),Mr(Ft,"markerAdded",Ft,st)}return st}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();Mr(this,"clear")}},Vu.prototype.find=function(oe,de){return this.primary.find(oe,de)},gn(Vu);function hf(oe,de,Me,Te,Be){Te=Mt(Te),Te.shared=!1;var st=[Pc(oe,de,Me,Te,Be)],Pt=st[0],Rt=Te.widgetNode;return is(oe,function(Ft){Rt&&(Te.widgetNode=Rt.cloneNode(!0)),st.push(Pc(Ft,Mn(Ft,de),Mn(Ft,Me),Te,Be));for(var Zt=0;Zt<Ft.linked.length;++Zt)if(Ft.linked[Zt].isParent)return;Pt=Ct(st)}),new Vu(st,Pt)}function gh(oe){return oe.findMarks(mn(oe.first,0),oe.clipPos(mn(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(),st=oe.clipPos(Be.from),Pt=oe.clipPos(Be.to);if(Cn(st,Pt)){var Rt=Pc(oe,st,Pt,Te.primary,Te.primary.type);Te.markers.push(Rt),Rt.parent=Te}}}function Md(oe){for(var de=function(Te){var Be=oe[Te],st=[Be.primary.doc];is(Be.primary.doc,function(Ft){return st.push(Ft)});for(var Pt=0;Pt<Be.markers.length;Pt++){var Rt=Be.markers[Pt];wt(st,Rt.doc)==-1&&(Rt.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),Ho.call(this,[new wa([new Uo("",null)])]),this.first=Me,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=Me;var st=mn(Me,0);this.sel=wo(st),this.history=new Oi(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)),Sa(this,{from:st,to:st,text:oe}),fa(this,wo(st),vt)};Ms.prototype=Xe(Ho.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=Qn(this,this.first,this.first+this.size);return oe===!1?de:de.join(oe||this.lineSeparator())},setValue:Dn(function(oe){var de=mn(this.first,0),Me=this.first+this.size-1;Ga(this,{from:de,to:mn(Me,wn(this,Me).text.length),text:this.splitLines(oe),origin:"setValue",full:!0},!0),this.cm&&Zc(this.cm,0,0),fa(this,wo(de),vt)}),replaceRange:function(oe,de,Me,Te){de=Mn(this,de),Me=Me?Mn(this,Me):de,Ku(this,oe,de,Me,Te)},getRange:function(oe,de,Me){var Te=_n(this,Mn(this,oe),Mn(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(Wn(this,oe))return wn(this,oe)},getLineNumber:function(oe){return Wt(oe)},getLineHandleVisualStart:function(oe){return typeof oe=="number"&&(oe=wn(this,oe)),gi(oe)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(oe){return Mn(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:Dn(function(oe,de,Me){Za(this,Mn(this,typeof oe=="number"?mn(oe,de||0):oe),null,Me)}),setSelection:Dn(function(oe,de,Me){Za(this,Mn(this,oe),Mn(this,de||oe),Me)}),extendSelection:Dn(function(oe,de,Me){ea(this,Mn(this,oe),de&&Mn(this,de),Me)}),extendSelections:Dn(function(oe,de){ia(this,An(this,oe),de)}),extendSelectionsBy:Dn(function(oe,de){var Me=mt(this.sel.ranges,oe);ia(this,An(this,Me),de)}),setSelections:Dn(function(oe,de,Me){if(oe.length){for(var Te=[],Be=0;Be<oe.length;Be++)Te[Be]=new ni(Mn(this,oe[Be].anchor),Mn(this,oe[Be].head));de==null&&(de=Math.min(oe.length-1,this.sel.primIndex)),fa(this,po(this.cm,Te,de),Me)}}),addSelection:Dn(function(oe,de,Me){var Te=this.sel.ranges.slice(0);Te.push(new ni(Mn(this,oe),Mn(this,de||oe))),fa(this,po(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=_n(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=_n(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:Dn(function(oe,de,Me){for(var Te=[],Be=this.sel,st=0;st<Be.ranges.length;st++){var Pt=Be.ranges[st];Te[st]={from:Pt.from(),to:Pt.to(),text:this.splitLines(oe[st]),origin:Me}}for(var Rt=de&&de!="end"&&vo(this,Te,de),Ft=Te.length-1;Ft>=0;Ft--)Ga(this,Te[Ft]);Rt?ko(this,Rt):this.cm&&Sc(this.cm)}),undo:Dn(function(){Gl(this,"undo")}),redo:Dn(function(){Gl(this,"redo")}),undoSelection:Dn(function(){Gl(this,"undo",!0)}),redoSelection:Dn(function(){Gl(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 Oi(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 Oi(this.history.maxGeneration);de.done=ps(oe.done.slice(0),null,!0),de.undone=ps(oe.undone.slice(0),null,!0)},setGutterMarker:Dn(function(oe,de,Me){return us(this,oe,"gutter",function(Te){var Be=Te.gutterMarkers||(Te.gutterMarkers={});return Be[de]=Me,!Me&<(Be)&&(Te.gutterMarkers=null),!0})}),clearGutter:Dn(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(!Wn(this,oe)||(de=oe,oe=wn(this,oe),!oe))return null}else if(de=Wt(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:Dn(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:Dn(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",st=Te[Be];if(st)if(Me==null)Te[Be]=null;else{var Pt=st.match(Pe(Me));if(!Pt)return!1;var Rt=Pt.index+Pt[0].length;Te[Be]=st.slice(0,Pt.index)+(!Pt.index||Rt==st.length?"":" ")+st.slice(Rt)||null}else return!1;return!0})}),addLineWidget:Dn(function(oe,de,Me){return gu(this,oe,de,Me)}),removeLineWidget:function(oe){oe.clear()},markText:function(oe,de,Me){return Pc(this,Mn(this,oe),Mn(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=Mn(this,oe),Pc(this,oe,oe,Me,"bookmark")},findMarksAt:function(oe){oe=Mn(this,oe);var de=[],Me=wn(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=Mn(this,oe),de=Mn(this,de);var Te=[],Be=oe.line;return this.iter(oe.line,de.line+1,function(st){var Pt=st.markedSpans;if(Pt)for(var Rt=0;Rt<Pt.length;Rt++){var Ft=Pt[Rt];!(Ft.to!=null&&Be==oe.line&&oe.ch>=Ft.to||Ft.from==null&&Be!=oe.line||Ft.from!=null&&Be==de.line&&Ft.from>=de.ch)&&(!Me||Me(Ft.marker))&&Te.push(Ft.marker.parent||Ft.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 st=Be.text.length+Te;if(st>oe)return de=oe,!0;oe-=st,++Me}),Mn(this,mn(Me,de))},indexFromPos:function(oe){oe=Mn(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(Qn(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(Qn(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 ra&&(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 Oi(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):Jr(oe)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:Dn(function(oe){oe!="rtl"&&(oe="ltr"),oe!=this.direction&&(this.direction=oe,this.iter(function(de){return de.order=null}),this.cm&&no(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,st=Array(Be),Pt=0,Rt=function(){++Pt==Be&&Bn(de,function(){Me=Mn(de.doc,Me);var Fn={from:Me,to:Me,text:de.doc.splitLines(st.filter(function(pr){return pr!=null}).join(de.doc.lineSeparator())),origin:"paste"};Ga(de.doc,Fn),ko(de.doc,wo(Mn(de.doc,Me),Mn(de.doc,Qo(Fn))))})()},Ft=function(Fn,pr){if(de.options.allowDropFileTypes&&wt(de.options.allowDropFileTypes,Fn.type)==-1){Rt();return}var Pr=new FileReader;Pr.onerror=function(){return Rt()},Pr.onload=function(){var Ir=Pr.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Ir)){Rt();return}st[pr]=Ir,Rt()},Pr.readAsText(Fn)},Zt=0;Zt<Te.length;Zt++)Ft(Te[Zt],Zt);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 Sn=oe.dataTransfer.getData("Text");if(Sn){var Qt;if(de.state.draggingText&&!de.state.draggingText.copy&&(Qt=de.listSelections()),ms(de.doc,wo(Me,Me)),Qt)for(var zn=0;zn<Qt.length;++zn)Ku(de.doc,"",Qt[zn].anchor,Qt[zn].head,"drag");de.replaceSelection(Sn,"around","paste"),de.display.input.focus()}}catch(Fn){}}}}function Vh(oe,de){if(je&&(!oe.state.draggingText||+new Date-Kh<100)){hr(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)),Ne(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 st=0;st<Me.length;st++)oe(Me[st])})}}var kd=!1;function Hl(){kd||(mh(),kd=!0)}function mh(){var oe;kt(window,"resize",function(){oe==null&&(oe=setTimeout(function(){oe=null,ff(pf)},100))}),kt(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,st,Pt=0;Pt<de.length-1;Pt++){var Rt=de[Pt];if(/^(cmd|meta|m)$/i.test(Rt))st=!0;else if(/^a(lt)?$/i.test(Rt))Me=!0;else if(/^(c|ctrl|control)$/i.test(Rt))Te=!0;else if(/^s(hift)?$/i.test(Rt))Be=!0;else throw new Error("Unrecognized modifier name: "+Rt)}return Me&&(oe="Alt-"+oe),Te&&(oe="Ctrl-"+oe),st&&(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=mt(Me.split(" "),Od),st=0;st<Be.length;st++){var Pt=void 0,Rt=void 0;st==Be.length-1?(Rt=Be.join(" "),Pt=Te):(Rt=Be.slice(0,st+1).join(" "),Pt="...");var Ft=de[Rt];if(!Ft)de[Rt]=Pt;else if(Ft!=Pt)throw new Error("Inconsistent bindings for "+Rt)}delete oe[Me]}for(var Zt in de)oe[Zt]=de[Zt];return oe}function Ul(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 Ul(oe,de.fallthrough,Me,Te);for(var st=0;st<de.fallthrough.length;st++){var Pt=Ul(oe,de.fallthrough[st],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 st=de(Me[Be]);Te.length&&Cn(st.from,Ct(Te).to)<=0;){var Pt=Te.pop();if(Cn(Pt.from,st.from)<0){st.from=Pt.from;break}}Te.push(st)}dn(oe,function(){for(var Rt=Te.length-1;Rt>=0;Rt--)Ku(oe.doc,"",Te[Rt].from,Te[Rt].to,"+delete");Sc(oe)})}function Id(oe,de,Me){var Te=We(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 mn(de.line,Te,Me<0?"after":"before")}function ta(oe,de,Me,Te,Be){if(oe){de.doc.direction=="rtl"&&(Be=-Be);var st=dt(Me,de.doc.direction);if(st){var Pt=Be<0?Ct(st):st[0],Rt=Be<0==(Pt.level==1),Ft=Rt?"after":"before",Zt;if(Pt.level>0||de.doc.direction=="rtl"){var Sn=_u(de,Me);Zt=Be<0?Me.text.length-1:0;var Qt=Bl(de,Sn,Zt).top;Zt=qe(function(zn){return Bl(de,Sn,zn).top==Qt},Be<0==(Pt.level==1)?Pt.from:Pt.to-1,Zt),Ft=="before"&&(Zt=Id(Me,Zt,1))}else Zt=Be<0?Pt.to:Pt.from;return new mn(Te,Zt,Ft)}}return new mn(Te,Be<0?Me.text.length:0,Be<0?"before":"after")}function Ma(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 st=Le(Be,Me.ch,Me.sticky),Pt=Be[st];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 Rt=function(ri,Mi){return Id(de,ri instanceof mn?ri.ch:ri,Mi)},Ft,Zt=function(ri){return oe.options.lineWrapping?(Ft=Ft||_u(oe,de),fh(oe,de,Ft,ri)):{begin:0,end:de.text.length}},Sn=Zt(Me.sticky=="before"?Rt(Me,-1):Me.ch);if(oe.doc.direction=="rtl"||Pt.level==1){var Qt=Pt.level==1==Te<0,zn=Rt(Me,Qt?1:-1);if(zn!=null&&(Qt?zn<=Pt.to&&zn<=Sn.end:zn>=Pt.from&&zn>=Sn.begin)){var Fn=Qt?"before":"after";return new mn(Me.line,zn,Fn)}}var pr=function(ri,Mi,yi){for(var Bi=function(Ya,Ds){return Ds?new mn(Me.line,Rt(Ya,1),"before"):new mn(Me.line,Ya,"after")};ri>=0&&ri<Be.length;ri+=Mi){var mo=Be[ri],mi=Mi>0==(mo.level!=1),Oo=mi?yi.begin:Rt(yi.end,-1);if(mo.from<=Oo&&Oo<mo.to||(Oo=mi?mo.from:Rt(mo.to,-1),yi.begin<=Oo&&Oo<yi.end))return Bi(Oo,mi)}},Pr=pr(st+Te,Te,Sn);if(Pr)return Pr;var Ir=Te>0?Sn.end:Rt(Sn.begin,-1);return Ir!=null&&!(Te>0&&Ir==de.text.length)&&(Pr=pr(Te>0?0:Be.length-1,Te,Zt(Ir)),Pr)?Pr:null}var js={selectAll:na,singleSelection:function(oe){return oe.setSelection(oe.getCursor("anchor"),oe.getCursor("head"),vt)},killLine:function(oe){return ol(oe,function(de){if(de.empty()){var Me=wn(oe.doc,de.head.line).text.length;return de.head.ch==Me&&de.head.line<oe.lastLine()?{from:de.head,to:mn(de.head.line+1,0)}:{from:de.head,to:mn(de.head.line,Me)}}else return{from:de.from(),to:de.to()}})},deleteLine:function(oe){return ol(oe,function(de){return{from:mn(de.from().line,0),to:Mn(oe.doc,mn(de.to().line+1,0))}})},delLineLeft:function(oe){return ol(oe,function(de){return{from:mn(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(mn(oe.firstLine(),0))},goDocEnd:function(oe){return oe.extendSelection(mn(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")},yt)},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")},yt)},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},yt)},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 st=Me[Be].from(),Pt=et(oe.getLine(st.line),st.ch,Te);de.push(Vt(Te-Pt%Te))}oe.replaceSelections(de)},defaultTab:function(oe){oe.somethingSelected()?oe.indentSelection("add"):oe.execCommand("insertTab")},transposeChars:function(oe){return dn(oe,function(){for(var de=oe.listSelections(),Me=[],Te=0;Te<de.length;Te++)if(de[Te].empty()){var Be=de[Te].head,st=wn(oe.doc,Be.line).text;if(st){if(Be.ch==st.length&&(Be=new mn(Be.line,Be.ch-1)),Be.ch>0)Be=new mn(Be.line,Be.ch+1),oe.replaceRange(st.charAt(Be.ch-1)+st.charAt(Be.ch-2),mn(Be.line,Be.ch-2),Be,"+transpose");else if(Be.line>oe.doc.first){var Pt=wn(oe.doc,Be.line-1).text;Pt&&(Be=new mn(Be.line,1),oe.replaceRange(st.charAt(0)+oe.doc.lineSeparator()+Pt.charAt(Pt.length-1),mn(Be.line-1,Pt.length-1),Be,"+transpose"))}}Me.push(new ni(Be,Be))}oe.setSelections(Me)})},newlineAndIndent:function(oe){return dn(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=wn(oe.doc,de),Te=gi(Me);return Te!=Me&&(de=Wt(Te)),ta(!0,oe,Te,de,1)}function iu(oe,de){var Me=wn(oe.doc,de),Te=Vi(Me);return Te!=Me&&(de=Wt(Te)),ta(!0,oe,Me,de,-1)}function Dd(oe,de){var Me=ru(oe,de.line),Te=wn(oe.doc,Me.line),Be=dt(Te,oe.doc.direction);if(!Be||Be[0].level==0){var st=Math.max(Me.ch,Te.text.search(/\S/)),Pt=de.line==Me.line&&de.ch<=st&&de.ch;return mn(Me.line,Pt?0:st,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)!=Tt}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=Ul(de,oe.state.keyMaps[Te],Me,oe);if(Be)return Be}return oe.options.extraKeys&&Ul(de,oe.options.extraKeys,Me,oe)||Ul(de,oe.options.keyMap,Me,oe)}var mu=new ot;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"&&Mr(oe,"keyHandled",oe,de,Me),(Be=="handled"||Be=="multi")&&(kn(Me),la(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&&!li&&(ae?oe.metaKey:oe.ctrlKey)&&de.replaceSelection("",null,"cut")),it&&!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;Ze(de,"CodeMirror-crosshair");function Me(Te){(Te.keyCode==18||!Te.altKey)&&(Ie(de,"CodeMirror-crosshair"),Xt(document,"keyup",Me),Xt(document,"mouseover",Me))}kt(document,"keyup",Me),kt(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&&Cn(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=fr(oe),st=Te?Jp(Te,Be):"single";window.focus(),Be==1&&de.state.selectingText&&de.state.selectingText(oe),!(Te&&Qp(de,Be,Te,st,oe))&&(Be==1?Te?am(de,Te,st,oe):dr(oe)==Me.scroller&&kn(oe):Be==2?(Te&&ea(de.doc,Te),setTimeout(function(){return Me.input.focus()},20)):Be==3&&(Ee?de.display.input.onContextMenu(oe):Va(de)))}}}function Qp(oe,de,Me,Te,Be){var st="Click";return Te=="double"?st="Double"+st:Te=="triple"&&(st="Triple"+st),st=(de==1?"Left":de==2?"Middle":"Right")+st,ac(oe,Ad(st,Be),Be,function(Pt){if(typeof Pt=="string"&&(Pt=js[Pt]),!Pt)return!1;var Rt=!1;try{oe.isReadOnly()&&(oe.state.suppressEdits=!0),Rt=Pt(oe,Me)!=Tt}finally{oe.state.suppressEdits=!1}return Rt})}function Qf(oe,de,Me){var Te=oe.getOption("configureMouse"),Be=Te?Te(oe,de,Me):{};if(Be.unit==null){var st=re?Me.shiftKey&&Me.metaKey:Me.altKey;Be.unit=st?"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(pt(Oa,oe),0):oe.curOp.focus=ze();var Be=Qf(oe,Me,Te),st=oe.doc.sel,Pt;oe.options.dragDrop&&xr&&!oe.isReadOnly()&&Me=="single"&&(Pt=st.contains(de))>-1&&(Cn((Pt=st.ranges[Pt]).from(),de)<0||de.xRel>0)&&(Cn(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,st=!1,Pt=Bn(oe,function(Zt){ce&&(Be.scroller.draggable=!1),oe.state.draggingText=!1,Xt(Be.wrapper.ownerDocument,"mouseup",Pt),Xt(Be.wrapper.ownerDocument,"mousemove",Rt),Xt(Be.scroller,"dragstart",Ft),Xt(Be.scroller,"drop",Pt),st||(kn(Zt),Te.addNew||ea(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())}),Rt=function(Zt){st=st||Math.abs(de.clientX-Zt.clientX)+Math.abs(de.clientY-Zt.clientY)>=10},Ft=function(){return st=!0};ce&&(Be.scroller.draggable=!0),oe.state.draggingText=Pt,Pt.copy=!Te.moveOnDrag,Be.scroller.dragDrop&&Be.scroller.dragDrop(),kt(Be.wrapper.ownerDocument,"mouseup",Pt),kt(Be.wrapper.ownerDocument,"mousemove",Rt),kt(Be.scroller,"dragstart",Ft),kt(Be.scroller,"drop",Pt),Va(oe),setTimeout(function(){return Be.input.focus()},20)}function eg(oe,de,Me){if(Me=="char")return new ni(de,de);if(Me=="word")return oe.findWordAt(de);if(Me=="line")return new ni(mn(de.line,0),Mn(oe.doc,mn(de.line+1,0)));var Te=Me(oe,de);return new ni(Te.from,Te.to)}function nv(oe,de,Me,Te){var Be=oe.display,st=oe.doc;kn(de);var Pt,Rt,Ft=st.sel,Zt=Ft.ranges;if(Te.addNew&&!Te.extend?(Rt=st.sel.contains(Me),Rt>-1?Pt=Zt[Rt]:Pt=new ni(Me,Me)):(Pt=st.sel.primary(),Rt=st.sel.primIndex),Te.unit=="rectangle")Te.addNew||(Pt=new ni(Me,Me)),Me=rl(oe,de,!0,!0),Rt=-1;else{var Sn=eg(oe,Me,Te.unit);Te.extend?Pt=Wu(Pt,Sn.anchor,Sn.head,Te.extend):Pt=Sn}Te.addNew?Rt==-1?(Rt=Zt.length,fa(st,po(oe,Zt.concat([Pt]),Rt),{scroll:!1,origin:"*mouse"})):Zt.length>1&&Zt[Rt].empty()&&Te.unit=="char"&&!Te.extend?(fa(st,po(oe,Zt.slice(0,Rt).concat(Zt.slice(Rt+1)),0),{scroll:!1,origin:"*mouse"}),Ft=st.sel):ua(st,Rt,Pt,gt):(Rt=0,fa(st,new eo([Pt],0),gt),Ft=st.sel);var Qt=Me;function zn(yi){if(Cn(Qt,yi)!=0)if(Qt=yi,Te.unit=="rectangle"){for(var Bi=[],mo=oe.options.tabSize,mi=et(wn(st,Me.line).text,Me.ch,mo),Oo=et(wn(st,yi.line).text,yi.ch,mo),Ya=Math.min(mi,Oo),Ds=Math.max(mi,Oo),os=Math.min(Me.line,yi.line),Kl=Math.min(oe.lastLine(),Math.max(Me.line,yi.line));os<=Kl;os++){var vl=wn(st,os).text,ks=It(vl,Ya,mo);Ya==Ds?Bi.push(new ni(mn(os,ks),mn(os,ks))):vl.length>ks&&Bi.push(new ni(mn(os,ks),mn(os,It(vl,Ds,mo))))}Bi.length||Bi.push(new ni(Me,Me)),fa(st,po(oe,Ft.ranges.slice(0,Rt).concat(Bi),Rt),{origin:"*mouse",scroll:!1}),oe.scrollIntoView(yi)}else{var ou=Pt,al=eg(oe,yi,Te.unit),Os=ou.anchor,oa;Cn(al.anchor,Os)>0?(oa=al.head,Os=pn(ou.from(),al.anchor)):(oa=al.anchor,Os=En(ou.to(),al.head));var hs=Ft.ranges.slice(0);hs[Rt]=sm(oe,new ni(Mn(st,Os),oa)),fa(st,po(oe,hs,Rt),gt)}}var Fn=Be.wrapper.getBoundingClientRect(),pr=0;function Pr(yi){var Bi=++pr,mo=rl(oe,yi,!0,Te.unit=="rectangle");if(mo)if(Cn(mo,Qt)!=0){oe.curOp.focus=ze(),zn(mo);var mi=Fo(Be,st);(mo.line>=mi.to||mo.line<mi.from)&&setTimeout(Bn(oe,function(){pr==Bi&&Pr(yi)}),150)}else{var Oo=yi.clientY<Fn.top?-20:yi.clientY>Fn.bottom?20:0;Oo&&setTimeout(Bn(oe,function(){pr==Bi&&(Be.scroller.scrollTop+=Oo,Pr(yi))}),50)}}function Ir(yi){oe.state.selectingText=!1,pr=1/0,yi&&(kn(yi),Be.input.focus()),Xt(Be.wrapper.ownerDocument,"mousemove",ri),Xt(Be.wrapper.ownerDocument,"mouseup",Mi),st.history.lastSelOrigin=null}var ri=Bn(oe,function(yi){yi.buttons===0||!fr(yi)?Ir(yi):Pr(yi)}),Mi=Bn(oe,Ir);oe.state.selectingText=Mi,kt(Be.wrapper.ownerDocument,"mousemove",ri),kt(Be.wrapper.ownerDocument,"mouseup",Mi)}function sm(oe,de){var Me=de.anchor,Te=de.head,Be=wn(oe.doc,Me.line);if(Cn(Me,Te)==0&&Me.sticky==Te.sticky)return de;var st=dt(Be);if(!st)return de;var Pt=Le(st,Me.ch,Me.sticky),Rt=st[Pt];if(Rt.from!=Me.ch&&Rt.to!=Me.ch)return de;var Ft=Pt+(Rt.from==Me.ch==(Rt.level!=1)?0:1);if(Ft==0||Ft==st.length)return de;var Zt;if(Te.line!=Me.line)Zt=(Te.line-Me.line)*(oe.doc.direction=="ltr"?1:-1)>0;else{var Sn=Le(st,Te.ch,Te.sticky),Qt=Sn-Pt||(Te.ch-Me.ch)*(Rt.level==1?-1:1);Sn==Ft-1||Sn==Ft?Zt=Qt<0:Zt=Qt>0}var zn=st[Ft+(Zt?-1:0)],Fn=Zt==(zn.level==1),pr=Fn?zn.from:zn.to,Pr=Fn?"after":"before";return Me.ch==pr&&Me.sticky==Pr?de:new ni(new mn(Me.line,pr,Pr),Te)}function qf(oe,de,Me,Te){var Be,st;if(de.touches)Be=de.touches[0].clientX,st=de.touches[0].clientY;else try{Be=de.clientX,st=de.clientY}catch(zn){return!1}if(Be>=Math.floor(oe.display.gutters.getBoundingClientRect().right))return!1;Te&&kn(de);var Pt=oe.display,Rt=Pt.lineDiv.getBoundingClientRect();if(st>Rt.bottom||!on(oe,Me))return Xn(de);st-=Rt.top-Pt.viewOffset;for(var Ft=0;Ft<oe.display.gutterSpecs.length;++Ft){var Zt=Pt.gutters.childNodes[Ft];if(Zt&&Zt.getBoundingClientRect().right>=Be){var Sn=In(oe.doc,st),Qt=oe.display.gutterSpecs[Ft];return At(oe,Me,oe,Sn,Qt.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,st,Pt){oe.defaults[Te]=Be,st&&(de[Te]=Pt?function(Rt,Ft,Zt){Zt!=Sh&&st(Rt,Ft,Zt)}:st)}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,Gi(Te)},!0),Me("indentUnit",2,Gi,!0),Me("indentWithTabs",!1),Me("smartIndent",!0),Me("tabSize",4,function(Te){Wo(Te),_a(Te),ya(Te)},!0),Me("lineSeparator",null,function(Te,Be){if(Te.doc.lineSep=Be,!!Be){var st=[],Pt=Te.doc.first;Te.doc.iter(function(Ft){for(var Zt=0;;){var Sn=Ft.text.indexOf(Be,Zt);if(Sn==-1)break;Zt=Sn+Be.length,st.push(mn(Pt,Sn))}Pt++});for(var Rt=st.length-1;Rt>=0;Rt--)Ku(Te.doc,Be,st[Rt],mn(st[Rt].line,st[Rt].ch+Be.length))}}),Me("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(Te,Be,st){Te.state.specialChars=new RegExp(Be.source+(Be.test(" ")?"":"| "),"g"),st!=Sh&&Te.refresh()}),Me("specialCharPlaceholder",ma,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),ui(Te)},!0),Me("keyMap","default",function(Te,Be,st){var Pt=Ec(Be),Rt=st!=Sh&&Ec(st);Rt&&Rt.detach&&Rt.detach(Te,Pt),Pt.attach&&Pt.attach(Te,Rt||null)}),Me("extraKeys",null),Me("configureMouse",null),Me("lineWrapping",!1,cm,!0),Me("gutters",[],function(Te,Be){Te.display.gutterSpecs=Li(Be,Te.options.lineNumbers),ui(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=Li(Te.options.gutters,Be),ui(Te)},!0),Me("firstLineNumber",1,ui,!0),Me("lineNumberFormatter",function(Te){return Te},ui,!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,Wo,!0),Me("addModeClass",!1,Wo,!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,Wo,!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,st=de?kt:Xt;st(oe.display.scroller,"dragstart",Be.start),st(oe.display.scroller,"dragenter",Be.enter),st(oe.display.scroller,"dragover",Be.over),st(oe.display.scroller,"dragleave",Be.leave),st(oe.display.scroller,"drop",Be.drop)}}function cm(oe){oe.options.lineWrapping?(Ze(oe.display.wrapper,"CodeMirror-wrap"),oe.display.sizer.style.minWidth="",oe.display.sizerWidth=null):(Ie(oe.display.wrapper,"CodeMirror-wrap"),Mo(oe)),Ui(oe),ya(oe),_a(oe),setTimeout(function(){return wc(oe)},100)}function ra(oe,de){var Me=this;if(!(this instanceof ra))return new ra(oe,de);this.options=de=de?Mt(de):{},Mt(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 ra.inputStyles[de.inputStyle](this),st=this.display=new Ci(oe,Te,Be,de);st.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 ot,keySeq:null,specialChars:null},de.autofocus&&!ee&&st.input.focus(),je&&ve<11&&setTimeout(function(){return Me.display.input.reset(!0)},20),Bd(this),Hl(),fl(this),this.curOp.forceUpdate=!0,to(this,Te),de.autofocus&&!ee||this.hasFocus()?setTimeout(function(){Me.hasFocus()&&!Me.state.focused&&Ko(Me)},20):Vc(this);for(var Pt in gf)gf.hasOwnProperty(Pt)&&gf[Pt](this,de[Pt],Sh);ti(this),de.finishInit&&de.finishInit(this);for(var Rt=0;Rt<Jh.length;++Rt)Jh[Rt](this);bc(this),ce&&de.lineWrapping&&getComputedStyle(st.lineDiv).textRendering=="optimizelegibility"&&(st.lineDiv.style.textRendering="auto")}ra.defaults=tg,ra.optionHandlers=gf;function Bd(oe){var de=oe.display;kt(de.scroller,"mousedown",Bn(oe,lc)),je&&ve<11?kt(de.scroller,"dblclick",Bn(oe,function(Ft){if(!Nt(oe,Ft)){var Zt=rl(oe,Ft);if(!(!Zt||ep(oe,Ft)||nl(oe.display,Ft))){kn(Ft);var Sn=oe.findWordAt(Zt);ea(oe.doc,Sn.anchor,Sn.head)}}})):kt(de.scroller,"dblclick",function(Ft){return Nt(oe,Ft)||kn(Ft)}),kt(de.scroller,"contextmenu",function(Ft){return tp(oe,Ft)}),kt(de.input.getField(),"contextmenu",function(Ft){de.scroller.contains(Ft.target)||tp(oe,Ft)});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 st(Ft){if(Ft.touches.length!=1)return!1;var Zt=Ft.touches[0];return Zt.radiusX<=1&&Zt.radiusY<=1}function Pt(Ft,Zt){if(Zt.left==null)return!0;var Sn=Zt.left-Ft.left,Qt=Zt.top-Ft.top;return Sn*Sn+Qt*Qt>20*20}kt(de.scroller,"touchstart",function(Ft){if(!Nt(oe,Ft)&&!st(Ft)&&!ep(oe,Ft)){de.input.ensurePolled(),clearTimeout(Me);var Zt=+new Date;de.activeTouch={start:Zt,moved:!1,prev:Zt-Te.end<=300?Te:null},Ft.touches.length==1&&(de.activeTouch.left=Ft.touches[0].pageX,de.activeTouch.top=Ft.touches[0].pageY)}}),kt(de.scroller,"touchmove",function(){de.activeTouch&&(de.activeTouch.moved=!0)}),kt(de.scroller,"touchend",function(Ft){var Zt=de.activeTouch;if(Zt&&!nl(de,Ft)&&Zt.left!=null&&!Zt.moved&&new Date-Zt.start<300){var Sn=oe.coordsChar(de.activeTouch,"page"),Qt;!Zt.prev||Pt(Zt,Zt.prev)?Qt=new ni(Sn,Sn):!Zt.prev.prev||Pt(Zt,Zt.prev.prev)?Qt=oe.findWordAt(Sn):Qt=new ni(mn(Sn.line,0),Mn(oe.doc,mn(Sn.line+1,0))),oe.setSelection(Qt.anchor,Qt.head),oe.focus(),kn(Ft)}Be()}),kt(de.scroller,"touchcancel",Be),kt(de.scroller,"scroll",function(){de.scroller.clientHeight&&(Xc(oe,de.scroller.scrollTop),Uu(oe,de.scroller.scrollLeft,!0),At(oe,"scroll",oe))}),kt(de.scroller,"mousewheel",function(Ft){return Yi(oe,Ft)}),kt(de.scroller,"DOMMouseScroll",function(Ft){return Yi(oe,Ft)}),kt(de.wrapper,"scroll",function(){return de.wrapper.scrollTop=de.wrapper.scrollLeft=0}),de.dragFunctions={enter:function(Ft){Nt(oe,Ft)||hr(Ft)},over:function(Ft){Nt(oe,Ft)||(df(oe,Ft),hr(Ft))},start:function(Ft){return Vh(oe,Ft)},drop:Bn(oe,Ld),leave:function(Ft){Nt(oe,Ft)||Zf(oe)}};var Rt=de.input.getField();kt(Rt,"keyup",function(Ft){return Xp.call(oe,Ft)}),kt(Rt,"keydown",Bn(oe,Vp)),kt(Rt,"keypress",Bn(oe,sc)),kt(Rt,"focus",function(Ft){return Ko(oe,Ft)}),kt(Rt,"blur",function(Ft){return Vc(oe,Ft)})}var Jh=[];ra.defineInitHook=function(oe){return Jh.push(oe)};function Is(oe,de,Me,Te){var Be=oe.doc,st;Me==null&&(Me="add"),Me=="smart"&&(Be.mode.indent?st=hi(oe,de).state:Me="prev");var Pt=oe.options.tabSize,Rt=wn(Be,de),Ft=et(Rt.text,null,Pt);Rt.stateAfter&&(Rt.stateAfter=null);var Zt=Rt.text.match(/^\s*/)[0],Sn;if(!Te&&!/\S/.test(Rt.text))Sn=0,Me="not";else if(Me=="smart"&&(Sn=Be.mode.indent(st,Rt.text.slice(Zt.length),Rt.text),Sn==Tt||Sn>150)){if(!Te)return;Me="prev"}Me=="prev"?de>Be.first?Sn=et(wn(Be,de-1).text,null,Pt):Sn=0:Me=="add"?Sn=Ft+oe.options.indentUnit:Me=="subtract"?Sn=Ft-oe.options.indentUnit:typeof Me=="number"&&(Sn=Ft+Me),Sn=Math.max(0,Sn);var Qt="",zn=0;if(oe.options.indentWithTabs)for(var Fn=Math.floor(Sn/Pt);Fn;--Fn)zn+=Pt,Qt+=" ";if(zn<Sn&&(Qt+=Vt(Sn-zn)),Qt!=Zt)return Ku(Be,Qt,mn(de,0),mn(de,Zt.length),"+input"),Rt.stateAfter=null,!0;for(var pr=0;pr<Be.sel.ranges.length;pr++){var Pr=Be.sel.ranges[pr];if(Pr.head.line==de&&Pr.head.ch<Zt.length){var Ir=mn(de,Zt.length);ua(Be,pr,new ni(Ir,Ir));break}}}var Wl=null;function Qh(oe){Wl=oe}function mf(oe,de,Me,Te,Be){var st=oe.doc;oe.display.shift=!1,Te||(Te=st.sel);var Pt=+new Date-200,Rt=Be=="paste"||oe.state.pasteIncoming>Pt,Ft=Jr(de),Zt=null;if(Rt&&Te.ranges.length>1)if(Wl&&Wl.text.join(`
|
|
|
`)==de){if(Te.ranges.length%Wl.text.length==0){Zt=[];for(var Sn=0;Sn<Wl.text.length;Sn++)Zt.push(st.splitLines(Wl.text[Sn]))}}else Ft.length==Te.ranges.length&&oe.options.pasteLinesPerSelection&&(Zt=mt(Ft,function(ri){return[ri]}));for(var Qt=oe.curOp.updateInput,zn=Te.ranges.length-1;zn>=0;zn--){var Fn=Te.ranges[zn],pr=Fn.from(),Pr=Fn.to();Fn.empty()&&(Me&&Me>0?pr=mn(pr.line,pr.ch-Me):oe.state.overwrite&&!Rt?Pr=mn(Pr.line,Math.min(wn(st,Pr.line).text.length,Pr.ch+Ct(Ft).length)):Rt&&Wl&&Wl.lineWise&&Wl.text.join(`
|
|
|
`)==Ft.join(`
|
|
|
`)&&(pr=Pr=mn(pr.line,0)));var Ir={from:pr,to:Pr,text:Zt?Zt[zn%Zt.length]:Ft,origin:Be||(Rt?"paste":oe.state.cutIncoming>Pt?"cut":"+input")};Ga(oe.doc,Ir),Mr(oe,"inputRead",oe,Ir)}de&&!Rt&&rg(oe,de),Sc(oe),oe.curOp.updateInput<2&&(oe.curOp.updateInput=Qt),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&&dn(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 st=oe.getModeAt(Be.head),Pt=!1;if(st.electricChars){for(var Rt=0;Rt<st.electricChars.length;Rt++)if(de.indexOf(st.electricChars.charAt(Rt))>-1){Pt=Is(oe,Be.head.line,"smart");break}}else st.electricInput&&st.electricInput.test(wn(oe.doc,Be.head.line).text.slice(0,Be.head.ch))&&(Pt=Is(oe,Be.head.line,"smart"));Pt&&Mr(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,st={anchor:mn(Be,0),head:mn(Be+1,0)};Me.push(st),de.push(oe.getRange(st.anchor,st.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 st=this.options,Pt=st[Te];st[Te]==Be&&Te!="mode"||(st[Te]=Be,de.hasOwnProperty(Te)&&Bn(this,de[Te])(this,Be,Pt),At(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,st=0;st<Be.length;++st)if(Be[st]==Te||Be[st].name==Te)return Be.splice(st,1),!0},addOverlay:Rn(function(Te,Be){var st=Te.token?Te:oe.getMode(this.options,Te);if(st.startState)throw new Error("Overlays may not be stateful.");nt(this.state.overlays,{mode:st,modeSpec:Te,opaque:Be&&Be.opaque,priority:Be&&Be.priority||0},function(Pt){return Pt.priority}),this.state.modeGen++,ya(this)}),removeOverlay:Rn(function(Te){for(var Be=this.state.overlays,st=0;st<Be.length;++st){var Pt=Be[st].modeSpec;if(Pt==Te||typeof Te=="string"&&Pt.name==Te){Be.splice(st,1),this.state.modeGen++,ya(this);return}}}),indentLine:Rn(function(Te,Be,st){typeof Be!="string"&&typeof Be!="number"&&(Be==null?Be=this.options.smartIndent?"smart":"prev":Be=Be?"add":"subtract"),Wn(this.doc,Te)&&Is(this,Te,Be,st)}),indentSelection:Rn(function(Te){for(var Be=this.doc.sel.ranges,st=-1,Pt=0;Pt<Be.length;Pt++){var Rt=Be[Pt];if(Rt.empty())Rt.head.line>st&&(Is(this,Rt.head.line,Te,!0),st=Rt.head.line,Pt==this.doc.sel.primIndex&&Sc(this));else{var Ft=Rt.from(),Zt=Rt.to(),Sn=Math.max(st,Ft.line);st=Math.min(this.lastLine(),Zt.line-(Zt.ch?0:1))+1;for(var Qt=Sn;Qt<st;++Qt)Is(this,Qt,Te);var zn=this.doc.sel.ranges;Ft.ch==0&&Be.length==zn.length&&zn[Pt].from().ch>0&&ua(this.doc,Pt,new ni(Ft,zn[Pt].to()),vt)}}}),getTokenAt:function(Te,Be){return yr(this,Te,Be)},getLineTokens:function(Te,Be){return yr(this,mn(Te),Be,!0)},getTokenTypeAt:function(Te){Te=Mn(this.doc,Te);var Be=Zr(this,wn(this.doc,Te.line)),st=0,Pt=(Be.length-1)/2,Rt=Te.ch,Ft;if(Rt==0)Ft=Be[2];else for(;;){var Zt=st+Pt>>1;if((Zt?Be[Zt*2-1]:0)>=Rt)Pt=Zt;else if(Be[Zt*2+1]<Rt)st=Zt+1;else{Ft=Be[Zt*2+2];break}}var Sn=Ft?Ft.indexOf("overlay "):-1;return Sn<0?Ft:Sn==0?null:Ft.slice(0,Sn-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 st=[];if(!Me.hasOwnProperty(Be))return st;var Pt=Me[Be],Rt=this.getModeAt(Te);if(typeof Rt[Be]=="string")Pt[Rt[Be]]&&st.push(Pt[Rt[Be]]);else if(Rt[Be])for(var Ft=0;Ft<Rt[Be].length;Ft++){var Zt=Pt[Rt[Be][Ft]];Zt&&st.push(Zt)}else Rt.helperType&&Pt[Rt.helperType]?st.push(Pt[Rt.helperType]):Pt[Rt.name]&&st.push(Pt[Rt.name]);for(var Sn=0;Sn<Pt._global.length;Sn++){var Qt=Pt._global[Sn];Qt.pred(Rt,this)&&wt(st,Qt.val)==-1&&st.push(Qt.val)}return st},getStateAfter:function(Te,Be){var st=this.doc;return Te=Ln(st,Te==null?st.first+st.size-1:Te),hi(this,Te+1,Be).state},cursorCoords:function(Te,Be){var st,Pt=this.doc.sel.primary();return Te==null?st=Pt.head:typeof Te=="object"?st=Mn(this.doc,Te):st=Te?Pt.from():Pt.to(),ka(this,st,Be||"page")},charCoords:function(Te,Be){return Rl(this,Mn(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,In(this.doc,Te+this.display.viewOffset)},heightAtLine:function(Te,Be,st){var Pt=!1,Rt;if(typeof Te=="number"){var Ft=this.doc.first+this.doc.size-1;Te<this.doc.first?Te=this.doc.first:Te>Ft&&(Te=Ft,Pt=!0),Rt=wn(this.doc,Te)}else Rt=Te;return za(this,Rt,{top:0,left:0},Be||"page",st||Pt).top+(Pt?this.doc.height-Qi(Rt):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,st,Pt,Rt){var Ft=this.display;Te=ka(this,Mn(this.doc,Te));var Zt=Te.bottom,Sn=Te.left;if(Be.style.position="absolute",Be.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(Be),Ft.sizer.appendChild(Be),Pt=="over")Zt=Te.top;else if(Pt=="above"||Pt=="near"){var Qt=Math.max(Ft.wrapper.clientHeight,this.doc.height),zn=Math.max(Ft.sizer.clientWidth,Ft.lineSpace.clientWidth);(Pt=="above"||Te.bottom+Be.offsetHeight>Qt)&&Te.top>Be.offsetHeight?Zt=Te.top-Be.offsetHeight:Te.bottom+Be.offsetHeight<=Qt&&(Zt=Te.bottom),Sn+Be.offsetWidth>zn&&(Sn=zn-Be.offsetWidth)}Be.style.top=Zt+"px",Be.style.left=Be.style.right="",Rt=="right"?(Sn=Ft.sizer.clientWidth-Be.offsetWidth,Be.style.right="0px"):(Rt=="left"?Sn=0:Rt=="middle"&&(Sn=(Ft.sizer.clientWidth-Be.offsetWidth)/2),Be.style.left=Sn+"px"),st&&Wh(this,{left:Sn,top:Zt,right:Sn+Be.offsetWidth,bottom:Zt+Be.offsetHeight})},triggerOnKeyDown:Rn(Vp),triggerOnKeyPress:Rn(sc),triggerOnKeyUp:Xp,triggerOnMouseDown:Rn(lc),execCommand:function(Te){if(js.hasOwnProperty(Te))return js[Te].call(null,this)},triggerElectric:Rn(function(Te){rg(this,Te)}),findPosH:function(Te,Be,st,Pt){var Rt=1;Be<0&&(Rt=-1,Be=-Be);for(var Ft=Mn(this.doc,Te),Zt=0;Zt<Be&&(Ft=vf(this.doc,Ft,Rt,st,Pt),!Ft.hitSide);++Zt);return Ft},moveH:Rn(function(Te,Be){var st=this;this.extendSelectionsBy(function(Pt){return st.display.shift||st.doc.extend||Pt.empty()?vf(st.doc,Pt.head,Te,Be,st.options.rtlMoveVisually):Te<0?Pt.from():Pt.to()},yt)}),deleteH:Rn(function(Te,Be){var st=this.doc.sel,Pt=this.doc;st.somethingSelected()?Pt.replaceSelection("",null,"+delete"):ol(this,function(Rt){var Ft=vf(Pt,Rt.head,Te,Be,!1);return Te<0?{from:Ft,to:Rt.head}:{from:Rt.head,to:Ft}})}),findPosV:function(Te,Be,st,Pt){var Rt=1,Ft=Pt;Be<0&&(Rt=-1,Be=-Be);for(var Zt=Mn(this.doc,Te),Sn=0;Sn<Be;++Sn){var Qt=ka(this,Zt,"div");if(Ft==null?Ft=Qt.left:Qt.left=Ft,Zt=wh(this,Qt,Rt,st),Zt.hitSide)break}return Zt},moveV:Rn(function(Te,Be){var st=this,Pt=this.doc,Rt=[],Ft=!this.display.shift&&!Pt.extend&&Pt.sel.somethingSelected();if(Pt.extendSelectionsBy(function(Sn){if(Ft)return Te<0?Sn.from():Sn.to();var Qt=ka(st,Sn.head,"div");Sn.goalColumn!=null&&(Qt.left=Sn.goalColumn),Rt.push(Qt.left);var zn=wh(st,Qt,Te,Be);return Be=="page"&&Sn==Pt.sel.primary()&&Ed(st,Rl(st,zn,"div").top-Qt.top),zn},yt),Rt.length)for(var Zt=0;Zt<Pt.sel.ranges.length;Zt++)Pt.sel.ranges[Zt].goalColumn=Rt[Zt]}),findWordAt:function(Te){var Be=this.doc,st=wn(Be,Te.line).text,Pt=Te.ch,Rt=Te.ch;if(st){var Ft=this.getHelper(Te,"wordChars");(Te.sticky=="before"||Rt==st.length)&&Pt?--Pt:++Rt;for(var Zt=st.charAt(Pt),Sn=St(Zt,Ft)?function(Qt){return St(Qt,Ft)}:/\s/.test(Zt)?function(Qt){return/\s/.test(Qt)}:function(Qt){return!/\s/.test(Qt)&&!St(Qt)};Pt>0&&Sn(st.charAt(Pt-1));)--Pt;for(;Rt<st.length&&Sn(st.charAt(Rt));)++Rt}return new ni(mn(Te.line,Pt),mn(Te.line,Rt))},toggleOverwrite:function(Te){Te!=null&&Te==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ze(this.display.cursorDiv,"CodeMirror-overwrite"):Ie(this.display.cursorDiv,"CodeMirror-overwrite"),At(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==ze()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Rn(function(Te,Be){Zc(this,Te,Be)}),getScrollInfo:function(){var Te=this.display.scroller;return{left:Te.scrollLeft,top:Te.scrollTop,height:Te.scrollHeight-_s(this)-this.display.barHeight,width:Te.scrollWidth-_s(this)-this.display.barWidth,clientHeight:$c(this),clientWidth:dl(this)}},scrollIntoView:Rn(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:mn(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?Vo(this,Te):sf(this,Te.from,Te.to,Te.margin)}),setSize:Rn(function(Te,Be){var st=this,Pt=function(Ft){return typeof Ft=="number"||/^\d+$/.test(String(Ft))?Ft+"px":Ft};Te!=null&&(this.display.wrapper.style.width=Pt(Te)),Be!=null&&(this.display.wrapper.style.height=Pt(Be)),this.options.lineWrapping&&Xa(this);var Rt=this.display.viewFrom;this.doc.iter(Rt,this.display.viewTo,function(Ft){if(Ft.widgets){for(var Zt=0;Zt<Ft.widgets.length;Zt++)if(Ft.widgets[Zt].noHScroll){Po(st,Rt,"widget");break}}++Rt}),this.curOp.forceUpdate=!0,At(this,"refresh",this)}),operation:function(Te){return dn(this,Te)},startOperation:function(){return fl(this)},endOperation:function(){return bc(this)},refresh:Rn(function(){var Te=this.display.cachedTextHeight;ya(this),this.curOp.forceUpdate=!0,_a(this),Zc(this,this.doc.scrollLeft,this.doc.scrollTop),ci(this.display),(Te==null||Math.abs(Te-Gu(this.display))>.5||this.options.lineWrapping)&&Ui(this),At(this,"refresh",this)}),swapDoc:Rn(function(Te){var Be=this.doc;return Be.cm=null,this.state.selectingText&&this.state.selectingText(),to(this,Te),_a(this),this.display.input.reset(),Zc(this,Te.scrollLeft,Te.scrollTop),this.curOp.forceScroll=!0,Mr(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}},gn(oe),oe.registerHelper=function(Te,Be,st){Me.hasOwnProperty(Te)||(Me[Te]=oe[Te]={_global:[]}),Me[Te][Be]=st},oe.registerGlobalHelper=function(Te,Be,st,Pt){oe.registerHelper(Te,Be,Pt),Me[Te]._global.push({pred:st,val:Pt})}}function vf(oe,de,Me,Te,Be){var st=de,Pt=Me,Rt=wn(oe,de.line),Ft=Be&&oe.direction=="rtl"?-Me:Me;function Zt(){var Mi=de.line+Ft;return Mi<oe.first||Mi>=oe.first+oe.size?!1:(de=new mn(Mi,de.ch,de.sticky),Rt=wn(oe,Mi))}function Sn(Mi){var yi;if(Te=="codepoint"){var Bi=Rt.text.charCodeAt(de.ch+(Te>0?0:-1));isNaN(Bi)?yi=null:yi=new mn(de.line,Math.max(0,Math.min(Rt.text.length,de.ch+Me*(Bi>=55296&&Bi<56320?2:1))),-Me)}else Be?yi=Ma(oe.cm,Rt,de,Me):yi=cs(Rt,de,Me);if(yi==null)if(!Mi&&Zt())de=ta(Be,oe.cm,Rt,de.line,Ft);else return!1;else de=yi;return!0}if(Te=="char"||Te=="codepoint")Sn();else if(Te=="column")Sn(!0);else if(Te=="word"||Te=="group")for(var Qt=null,zn=Te=="group",Fn=oe.cm&&oe.cm.getHelper(de,"wordChars"),pr=!0;!(Me<0&&!Sn(!pr));pr=!1){var Pr=Rt.text.charAt(de.ch)||`
|
|
|
`,Ir=St(Pr,Fn)?"w":zn&&Pr==`
|
|
|
`?"n":!zn||/\s/.test(Pr)?null:"p";if(zn&&!pr&&!Ir&&(Ir="s"),Qt&&Qt!=Ir){Me<0&&(Me=1,Sn(),de.sticky="after");break}if(Ir&&(Qt=Ir),Me>0&&!Sn(!pr))break}var ri=tu(oe,de,st,Pt,!0);return tn(st,ri)&&(ri.hitSide=!0),ri}function wh(oe,de,Me,Te){var Be=oe.doc,st=de.left,Pt;if(Te=="page"){var Rt=Math.min(oe.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Ft=Math.max(Rt-.5*Gu(oe.display),3);Pt=(Me>0?de.bottom:de.top)+Me*Ft}else Te=="line"&&(Pt=Me>0?de.bottom+3:de.top-3);for(var Zt;Zt=Wc(oe,st,Pt),!!Zt.outside;){if(Me<0?Pt<=0:Pt>=Be.height){Zt.hitSide=!0;break}Pt+=Me*5}return Zt}var ja=function(oe){this.cm=oe,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ot,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ja.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 st(Rt){for(var Ft=Rt.target;Ft;Ft=Ft.parentNode){if(Ft==Be)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Ft.className))break}return!1}kt(Be,"paste",function(Rt){!st(Rt)||Nt(Te,Rt)||ng(Rt,Te)||ve<=11&&setTimeout(Bn(Te,function(){return de.updateFromDOM()}),20)}),kt(Be,"compositionstart",function(Rt){de.composing={data:Rt.data,done:!1}}),kt(Be,"compositionupdate",function(Rt){de.composing||(de.composing={data:Rt.data,done:!1})}),kt(Be,"compositionend",function(Rt){de.composing&&(Rt.data!=de.composing.data&&de.readFromDOMSoon(),de.composing.done=!0)}),kt(Be,"touchstart",function(){return Me.forceCompositionEnd()}),kt(Be,"input",function(){de.composing||de.readFromDOMSoon()});function Pt(Rt){if(!(!st(Rt)||Nt(Te,Rt))){if(Te.somethingSelected())Qh({lineWise:!1,text:Te.getSelections()}),Rt.type=="cut"&&Te.replaceSelection("",null,"cut");else if(Te.options.lineWiseCopyCut){var Ft=ig(Te);Qh({lineWise:!0,text:Ft.text}),Rt.type=="cut"&&Te.operation(function(){Te.setSelections(Ft.ranges,0,vt),Te.replaceSelection("",null,"cut")})}else return;if(Rt.clipboardData){Rt.clipboardData.clearData();var Zt=Wl.text.join(`
|
|
|
`);if(Rt.clipboardData.setData("Text",Zt),Rt.clipboardData.getData("Text")==Zt){Rt.preventDefault();return}}var Sn=ag(),Qt=Sn.firstChild;Te.display.lineSpace.insertBefore(Sn,Te.display.lineSpace.firstChild),Qt.value=Wl.text.join(`
|
|
|
`);var zn=document.activeElement;ht(Qt),setTimeout(function(){Te.display.lineSpace.removeChild(Sn),zn.focus(),zn==Be&&Me.showPrimarySelection()},50)}}kt(Be,"copy",Pt),kt(Be,"cut",Pt)},ja.prototype.screenReaderLabelChanged=function(oe){oe?this.div.setAttribute("aria-label",oe):this.div.removeAttribute("aria-label")},ja.prototype.prepareSelection=function(){var oe=Kc(this.cm,!1);return oe.focus=document.activeElement==this.div,oe},ja.prototype.showSelection=function(oe,de){!oe||!this.cm.display.view.length||((oe.focus||de)&&this.showPrimarySelection(),this.showMultipleSelections(oe))},ja.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ja.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 st=yf(de,oe.anchorNode,oe.anchorOffset),Pt=yf(de,oe.focusNode,oe.focusOffset);if(!(st&&!st.bad&&Pt&&!Pt.bad&&Cn(pn(st,Pt),Te)==0&&Cn(En(st,Pt),Be)==0)){var Rt=de.display.view,Ft=Te.line>=de.display.viewFrom&&ip(de,Te)||{node:Rt[0].measure.map[2],offset:0},Zt=Be.line<de.display.viewTo&&ip(de,Be);if(!Zt){var Sn=Rt[Rt.length-1].measure,Qt=Sn.maps?Sn.maps[Sn.maps.length-1]:Sn.map;Zt={node:Qt[Qt.length-1],offset:Qt[Qt.length-2]-Qt[Qt.length-3]}}if(!Ft||!Zt){oe.removeAllRanges();return}var zn=oe.rangeCount&&oe.getRangeAt(0),Fn;try{Fn=Re(Ft.node,Ft.offset,Zt.offset,Zt.node)}catch(pr){}Fn&&(!it&&de.state.focused?(oe.collapse(Ft.node,Ft.offset),Fn.collapsed||(oe.removeAllRanges(),oe.addRange(Fn))):(oe.removeAllRanges(),oe.addRange(Fn)),zn&&oe.anchorNode==null?oe.addRange(zn):it&&this.startGracePeriod()),this.rememberSelection()}},ja.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)},ja.prototype.showMultipleSelections=function(oe){Ne(this.cm.display.cursorDiv,oe.cursors),Ne(this.cm.display.selectionDiv,oe.selection)},ja.prototype.rememberSelection=function(){var oe=this.getSelection();this.lastAnchorNode=oe.anchorNode,this.lastAnchorOffset=oe.anchorOffset,this.lastFocusNode=oe.focusNode,this.lastFocusOffset=oe.focusOffset},ja.prototype.selectionInEditor=function(){var oe=this.getSelection();if(!oe.rangeCount)return!1;var de=oe.getRangeAt(0).commonAncestorContainer;return Ye(this.div,de)},ja.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},ja.prototype.blur=function(){this.div.blur()},ja.prototype.getField=function(){return this.div},ja.prototype.supportsTouch=function(){return!0},ja.prototype.receivedFocus=function(){var oe=this;this.selectionInEditor()?this.pollSelection():dn(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)},ja.prototype.selectionChanged=function(){var oe=this.getSelection();return oe.anchorNode!=this.lastAnchorNode||oe.anchorOffset!=this.lastAnchorOffset||oe.focusNode!=this.lastFocusNode||oe.focusOffset!=this.lastFocusOffset},ja.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&&dn(de,function(){fa(de.doc,wo(Me,Te),vt),(Me.bad||Te.bad)&&(de.curOp.selectionChanged=!0)})}}},ja.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=mn(Te.line-1,wn(oe.doc,Te.line-1).length)),Be.ch==wn(oe.doc,Be.line).text.length&&Be.line<oe.lastLine()&&(Be=mn(Be.line+1,0)),Te.line<de.viewFrom||Be.line>de.viewTo-1)return!1;var st,Pt,Rt;Te.line==de.viewFrom||(st=zs(oe,Te.line))==0?(Pt=Wt(de.view[0].line),Rt=de.view[0].node):(Pt=Wt(de.view[st].line),Rt=de.view[st-1].node.nextSibling);var Ft=zs(oe,Be.line),Zt,Sn;if(Ft==de.view.length-1?(Zt=de.viewTo-1,Sn=de.lineDiv.lastChild):(Zt=Wt(de.view[Ft+1].line)-1,Sn=de.view[Ft+1].node.previousSibling),!Rt)return!1;for(var Qt=oe.doc.splitLines(_d(oe,Rt,Sn,Pt,Zt)),zn=_n(oe.doc,mn(Pt,0),mn(Zt,wn(oe.doc,Zt).text.length));Qt.length>1&&zn.length>1;)if(Ct(Qt)==Ct(zn))Qt.pop(),zn.pop(),Zt--;else if(Qt[0]==zn[0])Qt.shift(),zn.shift(),Pt++;else break;for(var Fn=0,pr=0,Pr=Qt[0],Ir=zn[0],ri=Math.min(Pr.length,Ir.length);Fn<ri&&Pr.charCodeAt(Fn)==Ir.charCodeAt(Fn);)++Fn;for(var Mi=Ct(Qt),yi=Ct(zn),Bi=Math.min(Mi.length-(Qt.length==1?Fn:0),yi.length-(zn.length==1?Fn:0));pr<Bi&&Mi.charCodeAt(Mi.length-pr-1)==yi.charCodeAt(yi.length-pr-1);)++pr;if(Qt.length==1&&zn.length==1&&Pt==Te.line)for(;Fn&&Fn>Te.ch&&Mi.charCodeAt(Mi.length-pr-1)==yi.charCodeAt(yi.length-pr-1);)Fn--,pr++;Qt[Qt.length-1]=Mi.slice(0,Mi.length-pr).replace(/^\u200b+/,""),Qt[0]=Qt[0].slice(Fn).replace(/\u200b+$/,"");var mo=mn(Pt,Fn),mi=mn(Zt,zn.length?Ct(zn).length-pr:0);if(Qt.length>1||Qt[0]||Cn(mo,mi))return Ku(oe.doc,Qt,mo,mi,"+input"),!0},ja.prototype.ensurePolled=function(){this.forceCompositionEnd()},ja.prototype.reset=function(){this.forceCompositionEnd()},ja.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ja.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))},ja.prototype.updateFromDOM=function(){var oe=this;(this.cm.isReadOnly()||!this.pollContent())&&dn(this.cm,function(){return ya(oe.cm)})},ja.prototype.setUneditable=function(oe){oe.contentEditable="false"},ja.prototype.onKeyPress=function(oe){oe.charCode==0||this.composing||(oe.preventDefault(),this.cm.isReadOnly()||Bn(this.cm,mf)(this.cm,String.fromCharCode(oe.charCode==null?oe.keyCode:oe.charCode),0))},ja.prototype.readOnlyChanged=function(oe){this.div.contentEditable=String(oe!="nocursor")},ja.prototype.onContextMenu=function(){},ja.prototype.resetPosition=function(){},ja.prototype.needsContentAttribute=!0;function ip(oe,de){var Me=vc(oe,de.line);if(!Me||Me.hidden)return null;var Te=wn(oe.doc,de.line),Be=Gc(Me,Te,de.line),st=dt(Te,oe.doc.direction),Pt="left";if(st){var Rt=Le(st,de.ch);Pt=Rt%2?"right":"left"}var Ft=Uc(Be.map,de.ch,Pt);return Ft.offset=Ft.collapse=="right"?Ft.end:Ft.start,Ft}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 st="",Pt=!1,Rt=oe.doc.lineSeparator(),Ft=!1;function Zt(Fn){return function(pr){return pr.id==Fn}}function Sn(){Pt&&(st+=Rt,Ft&&(st+=Rt),Pt=Ft=!1)}function Qt(Fn){Fn&&(Sn(),st+=Fn)}function zn(Fn){if(Fn.nodeType==1){var pr=Fn.getAttribute("cm-text");if(pr){Qt(pr);return}var Pr=Fn.getAttribute("cm-marker"),Ir;if(Pr){var ri=oe.findMarks(mn(Te,0),mn(Be+1,0),Zt(+Pr));ri.length&&(Ir=ri[0].find(0))&&Qt(_n(oe.doc,Ir.from,Ir.to).join(Rt));return}if(Fn.getAttribute("contenteditable")=="false")return;var Mi=/^(pre|div|p|li|table|br)$/i.test(Fn.nodeName);if(!/^br$/i.test(Fn.nodeName)&&Fn.textContent.length==0)return;Mi&&Sn();for(var yi=0;yi<Fn.childNodes.length;yi++)zn(Fn.childNodes[yi]);/^(pre|p)$/i.test(Fn.nodeName)&&(Ft=!0),Mi&&(Pt=!0)}else Fn.nodeType==3&&Qt(Fn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;zn(de),de!=Me;)de=de.nextSibling,Ft=!1;return st}function yf(oe,de,Me){var Te;if(de==oe.display.lineDiv){if(Te=oe.display.lineDiv.childNodes[Me],!Te)return Rd(oe.clipPos(mn(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 st=oe.display.view[Be];if(st.node==Te)return hm(st,de,Me)}}function hm(oe,de,Me){var Te=oe.text.firstChild,Be=!1;if(!de||!Ye(Te,de))return Rd(mn(Wt(oe.line),0),!0);if(de==Te&&(Be=!0,de=Te.childNodes[Me],Me=0,!de)){var st=oe.rest?Ct(oe.rest):oe.line;return Rd(mn(Wt(st),st.text.length),Be)}var Pt=de.nodeType==3?de:null,Rt=de;for(!Pt&&de.childNodes.length==1&&de.firstChild.nodeType==3&&(Pt=de.firstChild,Me&&(Me=Pt.nodeValue.length));Rt.parentNode!=Te;)Rt=Rt.parentNode;var Ft=oe.measure,Zt=Ft.maps;function Sn(Ir,ri,Mi){for(var yi=-1;yi<(Zt?Zt.length:0);yi++)for(var Bi=yi<0?Ft.map:Zt[yi],mo=0;mo<Bi.length;mo+=3){var mi=Bi[mo+2];if(mi==Ir||mi==ri){var Oo=Wt(yi<0?oe.line:oe.rest[yi]),Ya=Bi[mo]+Mi;return(Mi<0||mi!=Ir)&&(Ya=Bi[mo+(Mi?1:0)]),mn(Oo,Ya)}}}var Qt=Sn(Pt,Rt,Me);if(Qt)return Rd(Qt,Be);for(var zn=Rt.nextSibling,Fn=Pt?Pt.nodeValue.length-Me:0;zn;zn=zn.nextSibling){if(Qt=Sn(zn,zn.firstChild,0),Qt)return Rd(mn(Qt.line,Qt.ch-Fn),Be);Fn+=zn.textContent.length}for(var pr=Rt.previousSibling,Pr=Me;pr;pr=pr.previousSibling){if(Qt=Sn(pr,pr.firstChild,-1),Qt)return Rd(mn(Qt.line,Qt.ch+Pr),Be);Pr+=pr.textContent.length}}var Ls=function(oe){this.cm=oe,this.prevInput="",this.pollingFast=!1,this.polling=new ot,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"),kt(Be,"input",function(){je&&ve>=9&&de.hasSelection&&(de.hasSelection=null),Me.poll()}),kt(Be,"paste",function(Pt){Nt(Te,Pt)||ng(Pt,Te)||(Te.state.pasteIncoming=+new Date,Me.fastPoll())});function st(Pt){if(!Nt(Te,Pt)){if(Te.somethingSelected())Qh({lineWise:!1,text:Te.getSelections()});else if(Te.options.lineWiseCopyCut){var Rt=ig(Te);Qh({lineWise:!0,text:Rt.text}),Pt.type=="cut"?Te.setSelections(Rt.ranges,null,vt):(Me.prevInput="",Be.value=Rt.text.join(`
|
|
|
`),ht(Be))}else return;Pt.type=="cut"&&(Te.state.cutIncoming=+new Date)}}kt(Be,"cut",st),kt(Be,"copy",st),kt(oe.scroller,"paste",function(Pt){if(!(nl(oe,Pt)||Nt(Te,Pt))){if(!Be.dispatchEvent){Te.state.pasteIncoming=+new Date,Me.focus();return}var Rt=new Event("paste");Rt.clipboardData=Pt.clipboardData,Be.dispatchEvent(Rt)}}),kt(oe.lineSpace,"selectstart",function(Pt){nl(oe,Pt)||kn(Pt)}),kt(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"})}}),kt(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=ka(oe,Me.sel.primary().head,"div"),st=de.wrapper.getBoundingClientRect(),Pt=de.lineDiv.getBoundingClientRect();Te.teTop=Math.max(0,Math.min(de.wrapper.clientHeight-10,Be.top+Pt.top-st.top)),Te.teLeft=Math.max(0,Math.min(de.wrapper.clientWidth-10,Be.left+Pt.left-st.left))}return Te},Ls.prototype.showSelection=function(oe){var de=this.cm,Me=de.display;Ne(Me.cursorDiv,oe.cursors),Ne(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||tt(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 st=Be.charCodeAt(0);if(st==8203&&!Te&&(Te="\u200B"),st==8666)return this.reset(),this.cm.execCommand("undo")}for(var Pt=0,Rt=Math.min(Te.length,Be.length);Pt<Rt&&Te.charCodeAt(Pt)==Be.charCodeAt(Pt);)++Pt;return dn(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 st=rl(Me,oe),Pt=Te.scroller.scrollTop;if(!st||ye)return;var Rt=Me.options.resetSelectionOnContextMenu;Rt&&Me.doc.sel.contains(st)==-1&&Bn(Me,fa)(Me.doc,wo(st),vt);var Ft=Be.style.cssText,Zt=de.wrapper.style.cssText,Sn=de.wrapper.offsetParent.getBoundingClientRect();de.wrapper.style.cssText="position: static",Be.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(oe.clientY-Sn.top-5)+"px; left: "+(oe.clientX-Sn.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 Qt;ce&&(Qt=window.scrollY),Te.input.focus(),ce&&window.scrollTo(null,Qt),Te.input.reset(),Me.somethingSelected()||(Be.value=de.prevInput=" "),de.contextMenuPending=Fn,Te.selForContextMenu=Me.doc.sel,clearTimeout(Te.detectingSelectAll);function zn(){if(Be.selectionStart!=null){var Pr=Me.somethingSelected(),Ir="\u200B"+(Pr?Be.value:"");Be.value="\u21DA",Be.value=Ir,de.prevInput=Pr?"":"\u200B",Be.selectionStart=1,Be.selectionEnd=Ir.length,Te.selForContextMenu=Me.doc.sel}}function Fn(){if(de.contextMenuPending==Fn&&(de.contextMenuPending=!1,de.wrapper.style.cssText=Zt,Be.style.cssText=Ft,je&&ve<9&&Te.scrollbars.setScrollTop(Te.scroller.scrollTop=Pt),Be.selectionStart!=null)){(!je||je&&ve<9)&&zn();var Pr=0,Ir=function(){Te.selForContextMenu==Me.doc.sel&&Be.selectionStart==0&&Be.selectionEnd>0&&de.prevInput=="\u200B"?Bn(Me,na)(Me):Pr++<10?Te.detectingSelectAll=setTimeout(Ir,500):(Te.selForContextMenu=null,Te.input.reset())};Te.detectingSelectAll=setTimeout(Ir,200)}}if(je&&ve>=9&&zn(),Ee){hr(oe);var pr=function(){Xt(window,"mouseup",pr),setTimeout(Fn,20)};kt(window,"mouseup",pr)}else setTimeout(Fn,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?Mt(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=Rt.getValue()}var Be;if(oe.form&&(kt(oe.form,"submit",Te),!de.leaveSubmitMethodAlone)){var st=oe.form;Be=st.submit;try{var Pt=st.submit=function(){Te(),st.submit=Be,st.submit(),st.submit=Pt}}catch(Ft){}}de.finishInit=function(Ft){Ft.save=Te,Ft.getTextArea=function(){return oe},Ft.toTextArea=function(){Ft.toTextArea=isNaN,Te(),oe.parentNode.removeChild(Ft.getWrapperElement()),oe.style.display="",oe.form&&(Xt(oe.form,"submit",Te),!de.leaveSubmitMethodAlone&&typeof oe.form.submit=="function"&&(oe.form.submit=Be))}},oe.style.display="none";var Rt=ra(function(Ft){return oe.parentNode.insertBefore(Ft,oe.nextSibling)},de);return Rt}function zd(oe){oe.off=Xt,oe.on=kt,oe.wheelEventPixels=Fi,oe.Doc=Ms,oe.splitLines=Jr,oe.countColumn=et,oe.findColumn=It,oe.isWordChar=bt,oe.Pass=Tt,oe.signal=At,oe.Line=Uo,oe.changeEnd=Qo,oe.scrollbarModel=lf,oe.Pos=mn,oe.cmpPos=Cn,oe.modes=lr,oe.mimeModes=Ar,oe.resolveMode=wr,oe.getMode=cn,oe.modeExtensions=un,oe.extendMode=Dt,oe.copyState=vn,oe.startState=Jt,oe.innerMode=On,oe.commands=js,oe.keyMap=ml,oe.keyName=jd,oe.isModifierKey=yh,oe.lookupKey=Ul,oe.normalizeKeyMap=Nd,oe.StringStream=Ut,oe.SharedTextMarker=Vu,oe.TextMarker=sn,oe.LineWidget=vs,oe.e_preventDefault=kn,oe.e_stopPropagation=Kn,oe.e_stop=hr,oe.addClass=Ze,oe.contains=Ye,oe.rmClass=Ie,oe.keyNames=Lu}um(ra),xh(ra);var Qc="iter insert remove copy getEditor constructor".split(" ");for(var Sf in Ms.prototype)Ms.prototype.hasOwnProperty(Sf)&&wt(Qc,Sf)<0&&(ra.prototype[Sf]=function(oe){return function(){return oe.apply(this.doc,arguments)}}(Ms.prototype[Sf]));return gn(Ms),ra.inputStyles={textarea:Ls,contenteditable:ja},ra.defineMode=function(oe){!ra.defaults.mode&&oe!="null"&&(ra.defaults.mode=oe),Fr.apply(this,arguments)},ra.defineMIME=Ii,ra.defineMode("null",function(){return{token:function(oe){return oe.skipToEnd()}}}),ra.defineMIME("text/plain","null"),ra.defineExtension=function(oe,de){ra.prototype[oe]=de},ra.defineDocExtension=function(oe,de){Ms.prototype[oe]=de},ra.fromTextArea=dm,zd(ra),ra.version="5.58.2",ra})},25419:function(Pn,an,$e){(function(it){it($e(89780),$e(15525),$e(98101))})(function(it){"use strict";it.defineMode("markdown",function(xt,ie){var _e=it.getMode(xt,"text/html"),je=_e.name=="null";function ve(et){if(it.findModeByName){var ot=it.findModeByName(et);ot&&(et=ot.mime||ot.mimes[0])}var wt=it.getMode(xt,et);return wt.name=="null"?null:wt}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,ot,wt){return ot.f=ot.inline=wt,wt(et,ot)}function ue(et,ot,wt){return ot.f=ot.block=wt,wt(et,ot)}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 ot=je;if(!ot){var wt=it.innerMode(_e,et.htmlState);ot=wt.mode.name=="xml"&&wt.state.tagStart===null&&!wt.state.context&&wt.state.tokenize.isInText}ot&&(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,ot){var wt=et.column()===ot.indentation,Et=pe(ot.prevLine.stream),Tt=ot.indentedCode,vt=ot.prevLine.hr,gt=ot.list!==!1,yt=(ot.listStack[ot.listStack.length-1]||0)+3;ot.indentedCode=!1;var It=ot.indentation;if(ot.indentationDiff===null&&(ot.indentationDiff=ot.indentation,gt)){for(ot.list=null;It<ot.listStack[ot.listStack.length-1];)ot.listStack.pop(),ot.listStack.length?ot.indentation=ot.listStack[ot.listStack.length-1]:ot.list=!1;ot.list!==!1&&(ot.indentationDiff=It-ot.listStack[ot.listStack.length-1])}var Ot=!Et&&!vt&&!ot.prevLine.header&&(!gt||!Tt)&&!ot.prevLine.fencedCodeEnd,Vt=(ot.list===!1||vt||Et)&&ot.indentation<=yt&&et.match(Ce),Ct=null;if(ot.indentationDiff>=4&&(Tt||ot.prevLine.fencedCodeEnd||ot.prevLine.header||Et))return et.skipToEnd(),ot.indentedCode=!0,ce.code;if(et.eatSpace())return null;if(wt&&ot.indentation<=yt&&(Ct=et.match(me))&&Ct[1].length<=6)return ot.quote=0,ot.header=Ct[1].length,ot.thisLine.header=!0,ie.highlightFormatting&&(ot.formatting="header"),ot.f=ot.inline,Ne(ot);if(ot.indentation<=yt&&et.eat(">"))return ot.quote=wt?1:ot.quote+1,ie.highlightFormatting&&(ot.formatting="quote"),et.eatSpace(),Ne(ot);if(!Vt&&!ot.setext&&wt&&ot.indentation<=yt&&(Ct=et.match(ye))){var mt=Ct[1]?"ol":"ul";return ot.indentation=It+et.current().length,ot.list=!0,ot.quote=0,ot.listStack.push(ot.indentation),ot.em=!1,ot.strong=!1,ot.code=!1,ot.strikethrough=!1,ie.taskLists&&et.match(we,!1)&&(ot.taskList=!0),ot.f=ot.inline,ie.highlightFormatting&&(ot.formatting=["list","list-"+mt]),Ne(ot)}else{if(wt&&ot.indentation<=yt&&(Ct=et.match(z,!0)))return ot.quote=0,ot.fencedEndRE=new RegExp(Ct[1]+"+ *$"),ot.localMode=ie.fencedCodeBlockHighlighting&&ve(Ct[2]||ie.fencedCodeBlockDefaultMode),ot.localMode&&(ot.localState=it.startState(ot.localMode)),ot.f=ot.block=ke,ie.highlightFormatting&&(ot.formatting="code-block"),ot.code=-1,Ne(ot);if(ot.setext||(!Ot||!gt)&&!ot.quote&&ot.list===!1&&!ot.code&&!Vt&&!ee.test(et.string)&&(Ct=et.lookAhead(1))&&(Ct=Ct.match(xe)))return ot.setext?(ot.header=ot.setext,ot.setext=0,et.skipToEnd(),ie.highlightFormatting&&(ot.formatting="header")):(ot.header=Ct[0].charAt(0)=="="?1:2,ot.setext=ot.header),ot.thisLine.header=!0,ot.f=ot.inline,Ne(ot);if(Vt)return et.skipToEnd(),ot.hr=!0,ot.thisLine.hr=!0,ce.hr;if(et.peek()==="[")return le(et,ot,at)}return le(et,ot,ot.inline)}function Ie(et,ot){var wt=_e.token(et,ot.htmlState);if(!je){var Et=it.innerMode(_e,ot.htmlState);(Et.mode.name=="xml"&&Et.state.tagStart===null&&!Et.state.context&&Et.state.tokenize.isInText||ot.md_inside&&et.current().indexOf(">")>-1)&&(ot.f=Fe,ot.block=Pe,ot.htmlState=null)}return wt}function ke(et,ot){var wt=ot.listStack[ot.listStack.length-1]||0,Et=ot.indentation<wt,Tt=wt+3;if(ot.fencedEndRE&&ot.indentation<=Tt&&(Et||et.match(ot.fencedEndRE))){ie.highlightFormatting&&(ot.formatting="code-block");var vt;return Et||(vt=Ne(ot)),ot.localMode=ot.localState=null,ot.block=Pe,ot.f=Fe,ot.fencedEndRE=null,ot.code=0,ot.thisLine.fencedCodeEnd=!0,Et?ue(et,ot,ot.block):vt}else return ot.localMode?ot.localMode.token(et,ot.localState):(et.skipToEnd(),ce.code)}function Ne(et){var ot=[];if(et.formatting){ot.push(ce.formatting),typeof et.formatting=="string"&&(et.formatting=[et.formatting]);for(var wt=0;wt<et.formatting.length;wt++)ot.push(ce.formatting+"-"+et.formatting[wt]),et.formatting[wt]==="header"&&ot.push(ce.formatting+"-"+et.formatting[wt]+"-"+et.header),et.formatting[wt]==="quote"&&(!ie.maxBlockquoteDepth||ie.maxBlockquoteDepth>=et.quote?ot.push(ce.formatting+"-"+et.formatting[wt]+"-"+et.quote):ot.push("error"))}if(et.taskOpen)return ot.push("meta"),ot.length?ot.join(" "):null;if(et.taskClosed)return ot.push("property"),ot.length?ot.join(" "):null;if(et.linkHref?ot.push(ce.linkHref,"url"):(et.strong&&ot.push(ce.strong),et.em&&ot.push(ce.em),et.strikethrough&&ot.push(ce.strikethrough),et.emoji&&ot.push(ce.emoji),et.linkText&&ot.push(ce.linkText),et.code&&ot.push(ce.code),et.image&&ot.push(ce.image),et.imageAltText&&ot.push(ce.imageAltText,"link"),et.imageMarker&&ot.push(ce.imageMarker)),et.header&&ot.push(ce.header,ce.header+"-"+et.header),et.quote&&(ot.push(ce.quote),!ie.maxBlockquoteDepth||ie.maxBlockquoteDepth>=et.quote?ot.push(ce.quote+"-"+et.quote):ot.push(ce.quote+"-"+ie.maxBlockquoteDepth)),et.list!==!1){var Et=(et.listStack.length-1)%3;Et?Et===1?ot.push(ce.list2):ot.push(ce.list3):ot.push(ce.list1)}return et.trailingSpaceNewLine?ot.push("trailing-space-new-line"):et.trailingSpace&&ot.push("trailing-space-"+(et.trailingSpace%2?"a":"b")),ot.length?ot.join(" "):null}function Oe(et,ot){if(et.match(fe,!0))return Ne(ot)}function Fe(et,ot){var wt=ot.text(et,ot);if(typeof wt!="undefined")return wt;if(ot.list)return ot.list=null,Ne(ot);if(ot.taskList){var Et=et.match(we,!0)[1]===" ";return Et?ot.taskOpen=!0:ot.taskClosed=!0,ie.highlightFormatting&&(ot.formatting="task"),ot.taskList=!1,Ne(ot)}if(ot.taskOpen=!1,ot.taskClosed=!1,ot.header&&et.match(/^#+$/,!0))return ie.highlightFormatting&&(ot.formatting="header"),Ne(ot);var Tt=et.next();if(ot.linkTitle){ot.linkTitle=!1;var vt=Tt;Tt==="("&&(vt=")"),vt=(vt+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var gt="^\\s*(?:[^"+vt+"\\\\]+|\\\\\\\\|\\\\.)"+vt;if(et.match(new RegExp(gt),!0))return ce.linkHref}if(Tt==="`"){var yt=ot.formatting;ie.highlightFormatting&&(ot.formatting="code"),et.eatWhile("`");var It=et.current().length;if(ot.code==0&&(!ot.quote||It==1))return ot.code=It,Ne(ot);if(It==ot.code){var Ot=Ne(ot);return ot.code=0,Ot}else return ot.formatting=yt,Ne(ot)}else if(ot.code)return Ne(ot);if(Tt==="\\"&&(et.next(),ie.highlightFormatting)){var Vt=Ne(ot),Ct=ce.formatting+"-escape";return Vt?Vt+" "+Ct:Ct}if(Tt==="!"&&et.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return ot.imageMarker=!0,ot.image=!0,ie.highlightFormatting&&(ot.formatting="image"),Ne(ot);if(Tt==="["&&ot.imageMarker&&et.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return ot.imageMarker=!1,ot.imageAltText=!0,ie.highlightFormatting&&(ot.formatting="image"),Ne(ot);if(Tt==="]"&&ot.imageAltText){ie.highlightFormatting&&(ot.formatting="image");var Vt=Ne(ot);return ot.imageAltText=!1,ot.image=!1,ot.inline=ot.f=Ye,Vt}if(Tt==="["&&!ot.image)return ot.linkText&&et.match(/^.*?\]/)||(ot.linkText=!0,ie.highlightFormatting&&(ot.formatting="link")),Ne(ot);if(Tt==="]"&&ot.linkText){ie.highlightFormatting&&(ot.formatting="link");var Vt=Ne(ot);return ot.linkText=!1,ot.inline=ot.f=et.match(/\(.*?\)| ?\[.*?\]/,!1)?Ye:Fe,Vt}if(Tt==="<"&&et.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){ot.f=ot.inline=Re,ie.highlightFormatting&&(ot.formatting="link");var Vt=Ne(ot);return Vt?Vt+=" ":Vt="",Vt+ce.linkInline}if(Tt==="<"&&et.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){ot.f=ot.inline=Re,ie.highlightFormatting&&(ot.formatting="link");var Vt=Ne(ot);return Vt?Vt+=" ":Vt="",Vt+ce.linkEmail}if(ie.xml&&Tt==="<"&&et.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var mt=et.string.indexOf(">",et.pos);if(mt!=-1){var nt=et.string.substring(et.start,mt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(nt)&&(ot.md_inside=!0)}return et.backUp(1),ot.htmlState=it.startState(_e),ue(et,ot,Ie)}if(ie.xml&&Tt==="<"&&et.match(/^\/\w*?>/))return ot.md_inside=!1,"tag";if(Tt==="*"||Tt==="_"){for(var ft=1,Xe=et.pos==1?" ":et.string.charAt(et.pos-2);ft<3&&et.eat(Tt);)ft++;var ut=et.peek()||" ",bt=!/\s/.test(ut)&&(!ae.test(ut)||/\s/.test(Xe)||ae.test(Xe)),St=!/\s/.test(Xe)&&(!ae.test(Xe)||/\s/.test(ut)||ae.test(ut)),lt=null,Qe=null;if(ft%2&&(!ot.em&&bt&&(Tt==="*"||!St||ae.test(Xe))?lt=!0:ot.em==Tt&&St&&(Tt==="*"||!bt||ae.test(ut))&&(lt=!1)),ft>1&&(!ot.strong&&bt&&(Tt==="*"||!St||ae.test(Xe))?Qe=!0:ot.strong==Tt&&St&&(Tt==="*"||!bt||ae.test(ut))&&(Qe=!1)),Qe!=null||lt!=null){ie.highlightFormatting&&(ot.formatting=lt==null?"strong":Qe==null?"em":"strong em"),lt===!0&&(ot.em=Tt),Qe===!0&&(ot.strong=Tt);var Ot=Ne(ot);return lt===!1&&(ot.em=!1),Qe===!1&&(ot.strong=!1),Ot}}else if(Tt===" "&&(et.eat("*")||et.eat("_"))){if(et.peek()===" ")return Ne(ot);et.backUp(1)}if(ie.strikethrough){if(Tt==="~"&&et.eatWhile(Tt)){if(ot.strikethrough){ie.highlightFormatting&&(ot.formatting="strikethrough");var Ot=Ne(ot);return ot.strikethrough=!1,Ot}else if(et.match(/^[^\s]/,!1))return ot.strikethrough=!0,ie.highlightFormatting&&(ot.formatting="strikethrough"),Ne(ot)}else if(Tt===" "&&et.match(/^~~/,!0)){if(et.peek()===" ")return Ne(ot);et.backUp(2)}}if(ie.emoji&&Tt===":"&&et.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){ot.emoji=!0,ie.highlightFormatting&&(ot.formatting="emoji");var Ue=Ne(ot);return ot.emoji=!1,Ue}return Tt===" "&&(et.match(/^ +$/,!1)?ot.trailingSpace++:ot.trailingSpace&&(ot.trailingSpaceNewLine=!0)),Ne(ot)}function Re(et,ot){var wt=et.next();if(wt===">"){ot.f=ot.inline=Fe,ie.highlightFormatting&&(ot.formatting="link");var Et=Ne(ot);return Et?Et+=" ":Et="",Et+ce.linkInline}return et.match(/^[^>]+/,!0),ce.linkInline}function Ye(et,ot){if(et.eatSpace())return null;var wt=et.next();return wt==="("||wt==="["?(ot.f=ot.inline=Ze(wt==="("?")":"]"),ie.highlightFormatting&&(ot.formatting="link-string"),ot.linkHref=!0,Ne(ot)):"error"}var ze={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ze(et){return function(ot,wt){var Et=ot.next();if(Et===et){wt.f=wt.inline=Fe,ie.highlightFormatting&&(wt.formatting="link-string");var Tt=Ne(wt);return wt.linkHref=!1,Tt}return ot.match(ze[et]),wt.linkHref=!0,Ne(wt)}}function at(et,ot){return et.match(/^([^\]\\]|\\.)*\]:/,!1)?(ot.f=ht,et.next(),ie.highlightFormatting&&(ot.formatting="link"),ot.linkText=!0,Ne(ot)):le(et,ot,Fe)}function ht(et,ot){if(et.match(/^\]:/,!0)){ot.f=ot.inline=pt,ie.highlightFormatting&&(ot.formatting="link");var wt=Ne(ot);return ot.linkText=!1,wt}return et.match(/^([^\]\\]|\\.)+/,!0),ce.linkText}function pt(et,ot){return et.eatSpace()?null:(et.match(/^[^\s]+/,!0),et.peek()===void 0?ot.linkTitle=!0:et.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),ot.f=ot.inline=Fe,ce.linkHref+" url")}var Mt={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&&it.copyState(_e,et.htmlState),indentation:et.indentation,localMode:et.localMode,localState:et.localMode?it.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,ot){if(ot.formatting=!1,et!=ot.thisLine.stream){if(ot.header=0,ot.hr=!1,et.match(/^\s*$/,!0))return Ee(ot),null;if(ot.prevLine=ot.thisLine,ot.thisLine={stream:et},ot.taskList=!1,ot.trailingSpace=0,ot.trailingSpaceNewLine=!1,!ot.localState&&(ot.f=ot.block,ot.f!=Ie)){var wt=et.match(/^\s*/,!0)[0].replace(/\t/g,re).length;if(ot.indentation=wt,ot.indentationDiff=null,wt>0)return null}}return ot.f(et,ot)},innerMode:function(et){return et.block==Ie?{state:et.htmlState,mode:_e}:et.localState?{state:et.localState,mode:et.localMode}:{state:et,mode:Mt}},indent:function(et,ot,wt){return et.block==Ie&&_e.indent?_e.indent(et.htmlState,ot,wt):et.localState&&et.localMode.indent?et.localMode.indent(et.localState,ot,wt):it.Pass},blankLine:Ee,getType:Ne,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Mt},"xml"),it.defineMIME("text/markdown","markdown"),it.defineMIME("text/x-markdown","markdown")})},98101:function(Pn,an,$e){(function(it){it($e(89780))})(function(it){"use strict";it.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 xt=0;xt<it.modeInfo.length;xt++){var ie=it.modeInfo[xt];ie.mimes&&(ie.mime=ie.mimes[0])}it.findModeByMIME=function(_e){_e=_e.toLowerCase();for(var je=0;je<it.modeInfo.length;je++){var ve=it.modeInfo[je];if(ve.mime==_e)return ve;if(ve.mimes){for(var ce=0;ce<ve.mimes.length;ce++)if(ve.mimes[ce]==_e)return ve}}if(/\+xml$/.test(_e))return it.findModeByMIME("application/xml");if(/\+json$/.test(_e))return it.findModeByMIME("application/json")},it.findModeByExtension=function(_e){_e=_e.toLowerCase();for(var je=0;je<it.modeInfo.length;je++){var ve=it.modeInfo[je];if(ve.ext){for(var ce=0;ce<ve.ext.length;ce++)if(ve.ext[ce]==_e)return ve}}},it.findModeByFileName=function(_e){for(var je=0;je<it.modeInfo.length;je++){var ve=it.modeInfo[je];if(ve.file&&ve.file.test(_e))return ve}var ce=_e.lastIndexOf("."),be=ce>-1&&_e.substring(ce+1,_e.length);if(be)return it.findModeByExtension(be)},it.findModeByName=function(_e){_e=_e.toLowerCase();for(var je=0;je<it.modeInfo.length;je++){var ve=it.modeInfo[je];if(ve.name.toLowerCase()==_e)return ve;if(ve.alias){for(var ce=0;ce<ve.alias.length;ce++)if(ve.alias[ce].toLowerCase()==_e)return ve}}}})},67549:function(Pn,an,$e){(function(it){it($e(89780))})(function(it){"use strict";it.defineMode("stex",function(xt,ie){"use strict";function _e(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,_e(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,_e(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:"%"}}),it.defineMIME("text/x-stex","stex"),it.defineMIME("text/x-latex","stex")})},15525:function(Pn,an,$e){(function(it){it($e(89780))})(function(it){"use strict";var xt={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};it.defineMode("xml",function(_e,je){var ve=_e.indentUnit,ce={},be=je.htmlMode?xt:ie;for(var Ce in be)ce[Ce]=be[Ce];for(var Ce in je)ce[Ce]=je[Ce];var ye,we;function me(Re,Ye){function ze(ht){return Ye.tokenize=ht,ht(Re,Ye)}var Ze=Re.next();if(Ze=="<")return Re.eat("!")?Re.eat("[")?Re.match("CDATA[")?ze(z("atom","]]>")):null:Re.match("--")?ze(z("comment","-->")):Re.match("DOCTYPE",!0,!0)?(Re.eatWhile(/[\w\._\-]/),ze(ee(1))):null:Re.eat("?")?(Re.eatWhile(/[\w\._\-]/),Ye.tokenize=z("meta","?>"),"meta"):(ye=Re.eat("/")?"closeTag":"openTag",Ye.tokenize=xe,"tag bracket");if(Ze=="&"){var at;return Re.eat("#")?Re.eat("x")?at=Re.eatWhile(/[a-fA-F\d]/)&&Re.eat(";"):at=Re.eatWhile(/[\d]/)&&Re.eat(";"):at=Re.eatWhile(/[\w\.\-:]/)&&Re.eat(";"),at?"atom":"error"}else return Re.eatWhile(/[^&<]/),null}me.isInText=!0;function xe(Re,Ye){var ze=Re.next();if(ze==">"||ze=="/"&&Re.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 Ze=Ye.tokenize(Re,Ye);return Ze?Ze+" tag error":"tag error"}else return/[\'\"]/.test(ze)?(Ye.tokenize=fe(ze),Ye.stringStartCol=Re.column(),Ye.tokenize(Re,Ye)):(Re.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function fe(Re){var Ye=function(ze,Ze){for(;!ze.eol();)if(ze.next()==Re){Ze.tokenize=xe;break}return"string"};return Ye.isInAttribute=!0,Ye}function z(Re,Ye){return function(ze,Ze){for(;!ze.eol();){if(ze.match(Ye)){Ze.tokenize=me;break}ze.next()}return Re}}function ee(Re){return function(Ye,ze){for(var Ze;(Ze=Ye.next())!=null;){if(Ze=="<")return ze.tokenize=ee(Re+1),ze.tokenize(Ye,ze);if(Ze==">")if(Re==1){ze.tokenize=me;break}else return ze.tokenize=ee(Re-1),ze.tokenize(Ye,ze)}return"meta"}}function ae(Re,Ye,ze){this.prev=Re.context,this.tagName=Ye,this.indent=Re.indented,this.startOfLine=ze,(ce.doNotIndent.hasOwnProperty(Ye)||Re.context&&Re.context.noIndent)&&(this.noIndent=!0)}function re(Re){Re.context&&(Re.context=Re.context.prev)}function le(Re,Ye){for(var ze;;){if(!Re.context||(ze=Re.context.tagName,!ce.contextGrabbers.hasOwnProperty(ze)||!ce.contextGrabbers[ze].hasOwnProperty(Ye)))return;re(Re)}}function ue(Re,Ye,ze){return Re=="openTag"?(ze.tagStart=Ye.column(),pe):Re=="closeTag"?Ee:ue}function pe(Re,Ye,ze){return Re=="word"?(ze.tagName=Ye.current(),we="tag",ke):ce.allowMissingTagName&&Re=="endTag"?(we="tag bracket",ke(Re,Ye,ze)):(we="error",pe)}function Ee(Re,Ye,ze){if(Re=="word"){var Ze=Ye.current();return ze.context&&ze.context.tagName!=Ze&&ce.implicitlyClosed.hasOwnProperty(ze.context.tagName)&&re(ze),ze.context&&ze.context.tagName==Ze||ce.matchClosing===!1?(we="tag",Pe):(we="tag error",Ie)}else return ce.allowMissingTagName&&Re=="endTag"?(we="tag bracket",Pe(Re,Ye,ze)):(we="error",Ie)}function Pe(Re,Ye,ze){return Re!="endTag"?(we="error",Pe):(re(ze),ue)}function Ie(Re,Ye,ze){return we="error",Pe(Re,Ye,ze)}function ke(Re,Ye,ze){if(Re=="word")return we="attribute",Ne;if(Re=="endTag"||Re=="selfcloseTag"){var Ze=ze.tagName,at=ze.tagStart;return ze.tagName=ze.tagStart=null,Re=="selfcloseTag"||ce.autoSelfClosers.hasOwnProperty(Ze)?le(ze,Ze):(le(ze,Ze),ze.context=new ae(ze,Ze,at==ze.indented)),ue}return we="error",ke}function Ne(Re,Ye,ze){return Re=="equals"?Oe:(ce.allowMissing||(we="error"),ke(Re,Ye,ze))}function Oe(Re,Ye,ze){return Re=="string"?Fe:Re=="word"&&ce.allowUnquoted?(we="string",ke):(we="error",ke(Re,Ye,ze))}function Fe(Re,Ye,ze){return Re=="string"?Fe:ke(Re,Ye,ze)}return{startState:function(Re){var Ye={tokenize:me,state:ue,indented:Re||0,tagName:null,tagStart:null,context:null};return Re!=null&&(Ye.baseIndent=Re),Ye},token:function(Re,Ye){if(!Ye.tagName&&Re.sol()&&(Ye.indented=Re.indentation()),Re.eatSpace())return null;ye=null;var ze=Ye.tokenize(Re,Ye);return(ze||ye)&&ze!="comment"&&(we=null,Ye.state=Ye.state(ye||ze,Re,Ye),we&&(ze=we=="error"?ze+" error":we)),ze},indent:function(Re,Ye,ze){var Ze=Re.context;if(Re.tokenize.isInAttribute)return Re.tagStart==Re.indented?Re.stringStartCol+1:Re.indented+ve;if(Ze&&Ze.noIndent)return it.Pass;if(Re.tokenize!=xe&&Re.tokenize!=me)return ze?ze.match(/^(\s*)/)[0].length:0;if(Re.tagName)return ce.multilineTagIndentPastTag!==!1?Re.tagStart+Re.tagName.length+2:Re.tagStart+ve*(ce.multilineTagIndentFactor||1);if(ce.alignCDATA&&/<!\[CDATA\[/.test(Ye))return 0;var at=Ye&&/^<(\/)?([\w_:\.-]*)/.exec(Ye);if(at&&at[1])for(;Ze;)if(Ze.tagName==at[2]){Ze=Ze.prev;break}else if(ce.implicitlyClosed.hasOwnProperty(Ze.tagName))Ze=Ze.prev;else break;else if(at)for(;Ze;){var ht=ce.contextGrabbers[Ze.tagName];if(ht&&ht.hasOwnProperty(at[2]))Ze=Ze.prev;else break}for(;Ze&&Ze.prev&&!Ze.startOfLine;)Ze=Ze.prev;return Ze?Ze.indent+ve:Re.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:ce.htmlMode?"html":"xml",helperType:ce.htmlMode?"html":"xml",skipAttribute:function(Re){Re.state==Oe&&(Re.state=ke)},xmlCurrentTag:function(Re){return Re.tagName?{name:Re.tagName,close:Re.type=="closeTag"}:null},xmlCurrentContext:function(Re){for(var Ye=[],ze=Re.context;ze;ze=ze.prev)ze.tagName&&Ye.push(ze.tagName);return Ye.reverse()}}}),it.defineMIME("text/xml","xml"),it.defineMIME("application/xml","xml"),it.mimeModes.hasOwnProperty("text/html")||it.defineMIME("text/html",{name:"xml",htmlMode:!0})})},12378:function(Pn,an,$e){"use strict";$e.d(an,{$u:function(){return Ce},BD:function(){return ft},E9:function(){return be},FF:function(){return Hr},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 mt},ZA:function(){return ie},Zt:function(){return we},al:function(){return lt},bn:function(){return St},bx:function(){return Xe},g2:function(){return nt},h1:function(){return Oe},hD:function(){return gn},l4:function(){return ve},rU:function(){return De},s_:function(){return ut},uz:function(){return qe},z6:function(){return me}}),Pn=$e.hmd(Pn),function(){var tt;function li(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Si(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:li(a)}}function xi(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var lr=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},Ar;if(typeof Object.setPrototypeOf=="function")Ar=Object.setPrototypeOf;else{var Fr;e:{var Ii={a:!0},wr={};try{wr.__proto__=Ii,Fr=wr.a;break e}catch(a){}Fr=!1}Ar=Fr?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var cn=Ar;function un(a,y){if(a.prototype=lr(y.prototype),a.prototype.constructor=a,cn)cn(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 Dt=typeof $e.g!="undefined"&&$e.g!=null?$e.g:self,vn=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},On=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function Jt(a,y){if(y){var x=Dt;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&&On(x,a,{writable:!0,value:y})}}Jt("Object.assign",function(a){return a||vn}),Jt("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 Ut=typeof globalThis=="object"&&globalThis||typeof $e.g=="object"&&$e.g.global===$e.g&&$e.g||typeof self=="object"&&self.self===self&&self||{};Ut.requestAnimationFrame===void 0&&(Ut.setImmediate===void 0?Ut.requestAnimationFrame=function(a){Ut.setTimeout(a,0)}:Ut.requestAnimationFrame=Ut.setImmediate);function wn(){}function _n(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&Ut.clearTimeout(x),x=Qn(function(){x=-1,a.apply(b,E)},y)}}function Qn(a,y){return Ut.setTimeout(a,y)}function Jn(a){return Ut.document.createElement(a)}function Wt(a){throw Error(a)}function In(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),Wt(a)}function Wn(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),Wt(x+" is not in the range "+y+": "+a)}function ar(a){Ut.console&&Ut.console.log(a)}function mn(a){return typeof a=="object"&&a!==null}function Cn(a){return Array.isArray(a)||Ut.NodeList&&a instanceof Ut.NodeList||Ut.HTMLCollection&&a instanceof Ut.HTMLCollection}function tn(a){return Array.prototype.slice.call(a)}function fn(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):Wt("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):Wt("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function pn(){var a=hi.pop();return a===void 0?[]:a}function Ln(a){a.length=0,hi.push(a)}function Mn(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(mn(a)&&a.constructor)return Mn(a.constructor);return typeof a}function Gn(a){var y=a;return mn(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 An(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 sr(a,y,x){Object.defineProperty(Fo.prototype,a,{get:y,set:x})}function hn(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 Nr=Ut.navigator!==void 0&&0<Ut.navigator.userAgent.indexOf("Trident/7"),Zr=Ut.navigator!==void 0&&Ut.navigator.platform!==void 0&&Ut.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,hi=[];Object.freeze([]),wn.className="Util",wn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",wn.adym="gojs.net",wn.vfo="28e645fdb266",wn.className="Util";function yn(a,y,x){fi(this),this.j=a,this.xa=y,this.o=x}yn.prototype.toString=function(){return"EnumValue."+this.xa};function Yn(a,y){return y==null||y===""?null:a[y]}Dt.Object.defineProperties(yn.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),yn.className="EnumValue";function ir(){this.ew=[]}ir.prototype.toString=function(){return this.ew.join("")},ir.prototype.add=function(a){a!==""&&this.ew.push(a)},ir.className="StringBuilder";function vr(){}vr.className="PropertyCollection";var yr={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){Ut.console&&Ut.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 Dr(){}Dr.prototype.reset=function(){},Dr.prototype.next=function(){return!1},Dr.prototype.Ad=function(){return!1},Dr.prototype.first=function(){return null},Dr.prototype.any=function(){return!1},Dr.prototype.all=function(){return!0},Dr.prototype.each=function(){return this},Dr.prototype.map=function(){return this},Dr.prototype.filter=function(){return this},Dr.prototype.de=function(){},Dr.prototype.toString=function(){return"EmptyIterator"},Dt.Object.defineProperties(Dr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Dr.prototype.first=Dr.prototype.first,Dr.prototype.hasNext=Dr.prototype.Ad,Dr.prototype.next=Dr.prototype.next,Dr.prototype.reset=Dr.prototype.reset;var ii=null;Dr.className="EmptyIterator",ii=new Dr;function Br(a){this.key=-1,this.value=a}Br.prototype.reset=function(){this.key=-1},Br.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},Br.prototype.Ad=function(){return this.next()},Br.prototype.first=function(){return this.key=0,this.value},Br.prototype.any=function(a){return this.key=-1,a(this.value)},Br.prototype.all=function(a){return this.key=-1,a(this.value)},Br.prototype.each=function(a){return this.key=-1,a(this.value),this},Br.prototype.map=function(a){return new Br(a(this.value))},Br.prototype.filter=function(a){return a(this.value)?new Br(this.value):ii},Br.prototype.de=function(){this.value=null},Br.prototype.toString=function(){return"SingletonIterator("+this.value+")"},Dt.Object.defineProperties(Br.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),Br.prototype.first=Br.prototype.first,Br.prototype.hasNext=Br.prototype.Ad,Br.prototype.next=Br.prototype.next,Br.prototype.reset=Br.prototype.reset,Br.className="SingletonIterator";function Cr(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}Cr.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},Cr.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},Cr.prototype.Ad=function(){return this.next()},Cr.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},Cr.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},Cr.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},Cr.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},Cr.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 Tn,a.s=x,a.xb(),a.iterator},Cr.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 Tn,a.s=x,a.xb(),a.iterator},Cr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},Cr.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},Dt.Object.defineProperties(Cr.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}}}),Cr.prototype.first=Cr.prototype.first,Cr.prototype.hasNext=Cr.prototype.Ad,Cr.prototype.next=Cr.prototype.next,Cr.prototype.reset=Cr.prototype.reset,Cr.className="ListIterator";function oi(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}oi.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},oi.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)},oi.prototype.Ad=function(){return this.next()},oi.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},oi.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},oi.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},oi.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},oi.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 Tn,a.s=x,a.xb(),a.iterator},oi.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 Tn,a.s=x,a.xb(),a.iterator},oi.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},oi.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},Dt.Object.defineProperties(oi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),oi.prototype.first=oi.prototype.first,oi.prototype.hasNext=oi.prototype.Ad,oi.prototype.next=oi.prototype.next,oi.prototype.reset=oi.prototype.reset,oi.className="ListIteratorBackwards";function Tn(a){fi(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&Wt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}tt=Tn.prototype,tt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},tt.freeze=function(){return this._isFrozen=!0,this},tt.ka=function(){return this._isFrozen=!1,this},tt.toString=function(){return"List()#"+zi(this)},tt.add=function(a){return a===null?this:(this._isFrozen&&In(this,a),this.s.push(a),this.xb(),this)},tt.push=function(a){this.add(a)},tt.addAll=function(a){if(a===null)return this;this._isFrozen&&In(this);var y=this.s;if(Cn(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},tt.clear=function(){this._isFrozen&&In(this),this.s.length=0,this.xb()},tt.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},tt.has=function(a){return this.contains(a)},tt.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},tt.M=function(a){var y=this.s;return(0>a||a>=y.length)&&Wn(a,"0 <= i < length",Tn,"elt:i"),y[a]},tt.get=function(a){return this.M(a)},tt.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&Wn(a,"0 <= i < length",Tn,"setElt:i"),this._isFrozen&&In(this,a),x[a]=y},tt.set=function(a,y){this.cd(a,y)},tt.first=function(){var a=this.s;return a.length===0?null:a[0]},tt.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},tt.pop=function(){this._isFrozen&&In(this);var a=this.s;return 0<a.length?a.pop():null},Tn.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},Tn.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},Tn.prototype.each=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)a(y[b]);return this},Tn.prototype.map=function(a){for(var y=new Tn,x=[],b=this.s,E=b.length,te=0;te<E;te++)x.push(a(b[te]));return y.s=x,y.xb(),y},Tn.prototype.filter=function(a){for(var y=new Tn,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},tt=Tn.prototype,tt.Gb=function(a,y){0>a&&Wn(a,">= 0",Tn,"insertAt:i"),this._isFrozen&&In(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},tt.remove=function(a){if(a===null)return!1;this._isFrozen&&In(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)},tt.delete=function(a){return this.remove(a)},tt.mb=function(a){var y=this.s;(0>a||a>=y.length)&&Wn(a,"0 <= i < length",Tn,"removeAt:i"),this._isFrozen&&In(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},tt.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&&In(this);for(var E=a,te=y+1;te<b;)x[E++]=x[te++];return x.length=b-(y-a+1),this.xb(),this},Tn.prototype.copy=function(){var a=new Tn,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},tt=Tn.prototype,tt.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),b=0;b<y;b++)x[b]=a[b];return x},tt.Iv=function(){for(var a=new Nn,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},tt.sort=function(a){return this._isFrozen&&In(this),this.s.sort(a),this.xb(),this},tt.zi=function(a,y,x){var b=this.s,E=b.length;y===void 0&&(y=0),x===void 0&&(x=E),this._isFrozen&&In(this);var te=x-y;if(1>=te)return this;if((0>y||y>=E-1)&&Wn(y,"0 <= from < length",Tn,"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},tt.reverse=function(){return this._isFrozen&&In(this),this.s.reverse(),this.xb(),this},Dt.Object.defineProperties(Tn.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 ii;var a=this.Sa;return a!==null?(a.reset(),a):new Cr(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return ii;var a=this.Hg;return a!==null?(a.reset(),a):new oi(this)}}}),Tn.prototype.reverse=Tn.prototype.reverse,Tn.prototype.sortRange=Tn.prototype.zi,Tn.prototype.sort=Tn.prototype.sort,Tn.prototype.toSet=Tn.prototype.Iv,Tn.prototype.toArray=Tn.prototype.Fa,Tn.prototype.removeRange=Tn.prototype.removeRange,Tn.prototype.removeAt=Tn.prototype.mb,Tn.prototype.delete=Tn.prototype.delete,Tn.prototype.remove=Tn.prototype.remove,Tn.prototype.insertAt=Tn.prototype.Gb,Tn.prototype.pop=Tn.prototype.pop,Tn.prototype.last=Tn.prototype.jc,Tn.prototype.first=Tn.prototype.first,Tn.prototype.set=Tn.prototype.set,Tn.prototype.setElt=Tn.prototype.cd,Tn.prototype.get=Tn.prototype.get,Tn.prototype.elt=Tn.prototype.M,Tn.prototype.indexOf=Tn.prototype.indexOf,Tn.prototype.has=Tn.prototype.has,Tn.prototype.contains=Tn.prototype.contains,Tn.prototype.clear=Tn.prototype.clear,Tn.prototype.addAll=Tn.prototype.addAll,Tn.prototype.push=Tn.prototype.push,Tn.prototype.add=Tn.prototype.add,Tn.prototype.thaw=Tn.prototype.ka,Tn.prototype.freeze=Tn.prototype.freeze,Tn.className="List";function Ri(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Ri.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Ri.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)},Ri.prototype.Ad=function(){return this.next()},Ri.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},Ri.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},Ri.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},Ri.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},Ri.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new Tn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Ri.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new Tn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Ri.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Ri.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},Dt.Object.defineProperties(Ri.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Ri.prototype.first=Ri.prototype.first,Ri.prototype.hasNext=Ri.prototype.Ad,Ri.prototype.next=Ri.prototype.next,Ri.prototype.reset=Ri.prototype.reset,Ri.className="SetIterator";function Nn(a){fi(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Wt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}tt=Nn.prototype,tt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},tt.freeze=function(){return this._isFrozen=!0,this},tt.ka=function(){return this._isFrozen=!1,this},tt.toString=function(){return"Set()#"+zi(this)},tt.add=function(a){if(a===null)return this;this._isFrozen&&In(this,a);var y=a;return mn(a)&&(y=xo(a)),this.Tb[y]===void 0&&(this.Sb++,a=new Ti(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},tt.addAll=function(a){if(a===null)return this;if(this._isFrozen&&In(this),Cn(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},tt.contains=function(a){if(a===null)return!1;var y=a;return mn(a)&&(y=zi(a),y===void 0)?!1:this.Tb[y]!==void 0},tt.has=function(a){return this.contains(a)},tt.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},tt.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},tt.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},tt=Nn.prototype,tt.remove=function(a){if(a===null)return!1;this._isFrozen&&In(this,a);var y=a;if(mn(a)&&(y=zi(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},tt.delete=function(a){return this.remove(a)},tt.hp=function(a){if(a===null)return this;if(this._isFrozen&&In(this),Cn(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},tt.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&In(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},tt.clear=function(){this._isFrozen&&In(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 Tn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function fi(a){a.__gohashid=Lo++}function xo(a){var y=a.__gohashid;return y===void 0&&(y=Lo++,a.__gohashid=y),y}function zi(a){return a.__gohashid}Dt.Object.defineProperties(Nn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return ii;var a=this.Sa;return a!==null?(a.reset(),a):new Ri(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 Lo=1;Nn.className="Set",Nn.uniqueHash=fi,Nn.hashIdUnique=xo,Nn.hashId=zi;function yo(a){this.ma=a,this.qa=a.Ja,this.sa=null}yo.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},yo.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)},yo.prototype.Ad=function(){return this.next()},yo.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},yo.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},yo.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},yo.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},yo.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new Tn;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},yo.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new Tn;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},yo.prototype.de=function(){this.value=this.key=null,this.qa=-1},yo.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},Dt.Object.defineProperties(yo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),yo.prototype.first=yo.prototype.first,yo.prototype.hasNext=yo.prototype.Ad,yo.prototype.next=yo.prototype.next,yo.prototype.reset=yo.prototype.reset,yo.className="MapKeySetIterator";function Ur(a){Nn.call(this),fi(this),this._isFrozen=!0,this.ma=a}un(Ur,Nn),tt=Ur.prototype,tt.freeze=function(){return this},tt.ka=function(){return this},tt.toString=function(){return"MapKeySet("+this.ma.toString()+")"},tt.add=function(){Wt("This Set is read-only: "+this.toString())},tt.contains=function(a){return this.ma.contains(a)},tt.has=function(a){return this.contains(a)},tt.remove=function(){Wt("This Set is read-only: "+this.toString())},tt.delete=function(a){return this.remove(a)},tt.clear=function(){Wt("This Set is read-only: "+this.toString())},tt.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Ur.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Ur.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Ur.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Ur.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},Ur.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},Ur.prototype.copy=function(){return new Ur(this.ma)},Ur.prototype.Iv=function(){var a=new Nn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Ur.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},Ur.prototype.Hv=function(){var a=new Tn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Dt.Object.defineProperties(Ur.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?ii:new yo(this.ma)}}}),Ur.prototype.toList=Ur.prototype.Hv,Ur.prototype.toArray=Ur.prototype.Fa,Ur.prototype.toSet=Ur.prototype.Iv,Ur.prototype.first=Ur.prototype.first,Ur.prototype.clear=Ur.prototype.clear,Ur.prototype.delete=Ur.prototype.delete,Ur.prototype.remove=Ur.prototype.remove,Ur.prototype.has=Ur.prototype.has,Ur.prototype.contains=Ur.prototype.contains,Ur.prototype.add=Ur.prototype.add,Ur.prototype.thaw=Ur.prototype.ka,Ur.prototype.freeze=Ur.prototype.freeze,Ur.className="MapKeySet";function $r(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}$r.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},$r.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)},$r.prototype.Ad=function(){return this.next()},$r.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},$r.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},$r.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},$r.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},$r.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Tn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},$r.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Tn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},$r.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},$r.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},Dt.Object.defineProperties($r.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),$r.prototype.first=$r.prototype.first,$r.prototype.hasNext=$r.prototype.Ad,$r.prototype.next=$r.prototype.next,$r.prototype.reset=$r.prototype.reset,$r.className="MapValueSetIterator";function Ti(a,y){this.key=a,this.value=y,this.ll=this.va=null}Ti.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},Ti.className="KeyValuePair";function Hi(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Hi.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},Hi.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)},Hi.prototype.Ad=function(){return this.next()},Hi.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},Hi.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},Hi.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},Hi.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},Hi.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Tn;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},Hi.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Tn;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},Hi.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},Hi.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},Dt.Object.defineProperties(Hi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Hi.prototype.first=Hi.prototype.first,Hi.prototype.hasNext=Hi.prototype.Ad,Hi.prototype.next=Hi.prototype.next,Hi.prototype.reset=Hi.prototype.reset,Hi.className="MapIterator";function cr(a){fi(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"&&Wt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}tt=cr.prototype,tt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},tt.freeze=function(){return this._isFrozen=!0,this},tt.ka=function(){return this._isFrozen=!1,this},tt.toString=function(){return"Map()#"+zi(this)},tt.add=function(a,y){this._isFrozen&&In(this,a);var x=a;mn(a)&&(x=xo(a));var b=this.Tb[x];return b===void 0?(this.Sb++,a=new Ti(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},tt.set=function(a,y){return this.add(a,y)},tt.addAll=function(a){if(a===null)return this;if(Cn(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 cr)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},tt.first=function(){return this.ea},cr.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},cr.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},cr.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},cr.prototype.map=function(a){for(var y=new cr,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},cr.prototype.filter=function(a){for(var y=new cr,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},tt=cr.prototype,tt.contains=function(a){var y=a;return mn(a)&&(y=zi(a),y===void 0)?!1:this.Tb[y]!==void 0},tt.has=function(a){return this.contains(a)},tt.I=function(a){var y=a;return mn(a)&&(y=zi(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},tt.get=function(a){return this.I(a)},tt.remove=function(a){if(a===null)return!1;this._isFrozen&&In(this,a);var y=a;if(mn(a)&&(y=zi(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},tt.delete=function(a){return this.remove(a)},tt.clear=function(){this._isFrozen&&In(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()},cr.prototype.copy=function(){var a=new cr,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},cr.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 Ti(E.key,E.value),x++}return y},cr.prototype.Lf=function(){return new Ur(this)},Dt.Object.defineProperties(cr.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return ii;var a=this.Sa;return a!==null?(a.reset(),a):new Hi(this)}},iteratorKeys:{get:function(){return 0>=this.count?ii:new yo(this)}},iteratorValues:{get:function(){if(0>=this.count)return ii;var a=this.jf;return a!==null?(a.reset(),a):new $r(this)}}}),cr.prototype.toKeySet=cr.prototype.Lf,cr.prototype.toArray=cr.prototype.Fa,cr.prototype.clear=cr.prototype.clear,cr.prototype.delete=cr.prototype.delete,cr.prototype.remove=cr.prototype.remove,cr.prototype.get=cr.prototype.get,cr.prototype.getValue=cr.prototype.I,cr.prototype.has=cr.prototype.has,cr.prototype.contains=cr.prototype.contains,cr.prototype.first=cr.prototype.first,cr.prototype.addAll=cr.prototype.addAll,cr.prototype.set=cr.prototype.set,cr.prototype.add=cr.prototype.add,cr.prototype.thaw=cr.prototype.ka,cr.prototype.freeze=cr.prototype.freeze,cr.className="Map";function jt(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):Wt("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var ji,Rr,jr,_i,Ji;jt.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},jt.prototype.h=function(a,y){return this.x=a,this.y=y,this},jt.prototype.sg=function(a,y){return this.x=a,this.y=y,this},jt.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},jt.prototype.copy=function(){var a=new jt;return a.x=this.x,a.y=this.y,a},tt=jt.prototype,tt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},tt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},tt.freeze=function(){return this._isFrozen=!0,this},tt.ka=function(){return Object.isFrozen(this)&&Wt("cannot thaw constant: "+this),this._isFrozen=!1,this};function _r(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new jt(x,E)}return new jt}function Kr(a){return a.x.toString()+" "+a.y.toString()}tt.toString=function(){return"Point("+this.x+","+this.y+")"},tt.D=function(a){return a instanceof jt?this.x===a.x&&this.y===a.y:!1},tt.hi=function(a,y){return this.x===a&&this.y===y},tt.Xa=function(a){return en.B(this.x,a.x)&&en.B(this.y,a.y)},tt.add=function(a){return this.x+=a.x,this.y+=a.y,this},tt.re=function(a){return this.x-=a.x,this.y-=a.y,this},tt.offset=function(a,y){return this.x+=a,this.y+=y,this},jt.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},tt=jt.prototype,tt.scale=function(a,y){return this.x*=a,this.y*=y,this},tt.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},tt.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},tt.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},tt.ab=function(a){return Pi(a.x-this.x,a.y-this.y)},tt.direction=function(a,y){return Pi(a-this.x,y-this.y)};function Pi(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}tt.Ry=function(a,y){return en.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},tt.fA=function(a,y,x,b){return en.qh(a,y,x,b,this.x,this.y,this),this},tt.gA=function(a,y){return en.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},tt.uA=function(a,y,x,b){return en.No(this.x,this.y,a,y,x,b,this),this},tt.vA=function(a,y){return en.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},tt.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},tt.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},tt.transform=function(a){return a.Ga(this),this};function gi(a,y){return y.Cd(a),a}function Vi(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 io(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function Gr(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)}tt.w=function(){return isFinite(this.x)&&isFinite(this.y)},jt.alloc=function(){var a=Tr.pop();return a===void 0?new jt:a},jt.allocAt=function(a,y){var x=Tr.pop();return x===void 0?new jt(a,y):(x.x=a,x.y=y,x)},jt.free=function(a){Tr.push(a)},jt.prototype.isReal=jt.prototype.w,jt.prototype.setSpot=jt.prototype.yi,jt.prototype.setRectSpot=jt.prototype.xi,jt.prototype.snapToGridPoint=jt.prototype.vA,jt.prototype.snapToGrid=jt.prototype.uA,jt.prototype.projectOntoLineSegmentPoint=jt.prototype.gA,jt.prototype.projectOntoLineSegment=jt.prototype.fA,jt.intersectingLineSegments=function(a,y,x,b,E,te,ne,se){return en.Rl(a,y,x,b,E,te,ne,se)},jt.prototype.compareWithLineSegmentPoint=jt.prototype.Ry,jt.compareWithLineSegment=function(a,y,x,b,E,te){return en.Fl(a,y,x,b,E,te)},jt.prototype.direction=jt.prototype.direction,jt.prototype.directionPoint=jt.prototype.ab,jt.prototype.normalize=jt.prototype.normalize,jt.prototype.distanceSquared=jt.prototype.zd,jt.prototype.distanceSquaredPoint=jt.prototype.Bf,jt.prototype.scale=jt.prototype.scale,jt.prototype.rotate=jt.prototype.rotate,jt.prototype.offset=jt.prototype.offset,jt.prototype.subtract=jt.prototype.re,jt.prototype.add=jt.prototype.add,jt.prototype.equalsApprox=jt.prototype.Xa,jt.prototype.equalTo=jt.prototype.hi,jt.prototype.equals=jt.prototype.D,jt.prototype.set=jt.prototype.set,jt.prototype.setTo=jt.prototype.sg;var Tr=[];jt.className="Point",jt.parse=_r,jt.stringify=Kr,jt.distanceLineSegmentSquared=Vi,jt.distanceSquared=io,jt.direction=Gr,jt.Origin=ji=new jt(0,0).ja(),jt.InfiniteTopLeft=Rr=new jt(-1/0,-1/0).ja(),jt.InfiniteBottomRight=jr=new jt(1/0,1/0).ja(),jt.SixPoint=_i=new jt(6,6).ja(),jt.NoPoint=Ji=new jt(NaN,NaN).ja(),jt.parse=_r,jt.stringify=Kr,jt.distanceLineSegmentSquared=Vi,jt.distanceSquared=io,jt.direction=Gr;function Vn(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):Wt("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var ai,Qi,zo,Mo,Uo,ca,Jo;Vn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},Vn.prototype.h=function(a,y){return this.width=a,this.height=y,this},Vn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},Vn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},Vn.prototype.copy=function(){var a=new Vn;return a.width=this.width,a.height=this.height,a},tt=Vn.prototype,tt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},tt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},tt.freeze=function(){return this._isFrozen=!0,this},tt.ka=function(){return Object.isFrozen(this)&&Wt("cannot thaw constant: "+this),this._isFrozen=!1,this};function qa(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 Vn(x,E)}return new Vn}function La(a){return a.width.toString()+" "+a.height.toString()}tt.toString=function(){return"Size("+this.width+","+this.height+")"},tt.D=function(a){return a instanceof Vn?this.width===a.width&&this.height===a.height:!1},tt.hi=function(a,y){return this.width===a&&this.height===y},tt.Xa=function(a){return en.B(this.width,a.width)&&en.B(this.height,a.height)},tt.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},tt.w=function(){return isFinite(this.width)&&isFinite(this.height)},Vn.alloc=function(){var a=es.pop();return a===void 0?new Vn:a},Vn.free=function(a){es.push(a)},Vn.prototype.isReal=Vn.prototype.w,Vn.prototype.inflate=Vn.prototype.Bc,Vn.prototype.equalsApprox=Vn.prototype.Xa,Vn.prototype.equalTo=Vn.prototype.hi,Vn.prototype.equals=Vn.prototype.D,Vn.prototype.set=Vn.prototype.set,Vn.prototype.setTo=Vn.prototype.sg;var es=[];Vn.className="Size",Vn.parse=qa,Vn.stringify=La,Vn.ZeroSize=ai=new Vn(0,0).ja(),Vn.OneSize=Qi=new Vn(1,1).ja(),Vn.SixSize=zo=new Vn(6,6).ja(),Vn.EightSize=Mo=new Vn(8,8).ja(),Vn.TenSize=Uo=new Vn(10,10).ja(),Vn.InfiniteSize=ca=new Vn(1/0,1/0).ja(),Vn.NoSize=Jo=new Vn(NaN,NaN).ja(),Vn.parse=qa,Vn.stringify=La;function bn(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 jt?(x=a.x,a=a.y,y instanceof jt?(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 Vn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):Wt("Incorrect second argument supplied to Rect constructor "+y)):Wt("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}tt=bn.prototype,tt.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},tt.h=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function ma(a,y,x){a.width=y,a.height=x}tt.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this},tt.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},tt.dd=function(a){return this.x=a.x,this.y=a.y,this},tt.tA=function(a){return this.width=a.width,this.height=a.height,this},bn.prototype.copy=function(){var a=new bn;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},tt=bn.prototype,tt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},tt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},tt.freeze=function(){return this._isFrozen=!0,this},tt.ka=function(){return Object.isFrozen(this)&&Wt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ql(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 bn(x,E,te,ne)}return new bn}function el(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}tt.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},tt.D=function(a){return a instanceof bn?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},tt.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},tt.Xa=function(a){return en.B(this.x,a.x)&&en.B(this.y,a.y)&&en.B(this.width,a.width)&&en.B(this.height,a.height)};function So(a,y){return en.$(a.x,y.x)&&en.$(a.y,y.y)&&en.$(a.width,y.width)&&en.$(a.height,y.height)}tt.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},tt.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},tt.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},tt.offset=function(a,y){return this.x+=a,this.y+=y,this},tt.Bc=function(a,y){return ro(this,y,a,y,a)},tt.Co=function(a){return ro(this,a.top,a.right,a.bottom,a.left)},tt.Fv=function(a){return ro(this,-a.top,-a.right,-a.bottom,-a.left)},tt.Hz=function(a,y,x,b){return ro(this,a,y,x,b)};function ro(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}tt.Ex=function(a){return va(this,a.x,a.y,a.width,a.height)},tt.Uu=function(a,y,x,b){return va(this,a,y,x,b)};function va(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}tt.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},tt.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 Io(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))}tt.Ye=function(a){return qi(this,a.x,a.y,0,0)},tt.ed=function(a){return qi(this,a.x,a.y,a.width,a.height)},tt.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),qi(this,a,y,x,b)};function qi(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}tt.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 No(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 xs(a,y,x,b,E,te,ne,se){return a>ne+E||E>x+a?!1:!(y>se+te||te>b+y)}tt.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},tt.Mz=function(){return this.width===0&&this.height===0},bn.alloc=function(){var a=ao.pop();return a===void 0?new bn:a},bn.allocAt=function(a,y,x,b){var E=ao.pop();return E===void 0?new bn(a,y,x,b):E.h(a,y,x,b)},bn.free=function(a){ao.push(a)},Dt.Object.defineProperties(bn.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 jt(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new Vn(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new jt(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}}}),bn.prototype.isEmpty=bn.prototype.Mz,bn.prototype.isReal=bn.prototype.w,bn.intersectsLineSegment=function(a,y,x,b,E,te,ne,se){return en.Fx(a,y,x,b,E,te,ne,se)},bn.prototype.setSpot=bn.prototype.yi,bn.prototype.union=bn.prototype.Kv,bn.prototype.unionRect=bn.prototype.ed,bn.prototype.unionPoint=bn.prototype.Ye,bn.prototype.intersects=bn.prototype.Vu,bn.prototype.intersectsRect=bn.prototype.Yc,bn.prototype.intersect=bn.prototype.Uu,bn.prototype.intersectRect=bn.prototype.Ex,bn.prototype.grow=bn.prototype.Hz,bn.prototype.subtractMargin=bn.prototype.Fv,bn.prototype.addMargin=bn.prototype.Co,bn.prototype.inflate=bn.prototype.Bc,bn.prototype.offset=bn.prototype.offset,bn.prototype.contains=bn.prototype.contains,bn.prototype.containsRect=bn.prototype.Re,bn.prototype.containsPoint=bn.prototype.ca,bn.prototype.equalsApprox=bn.prototype.Xa,bn.prototype.equalTo=bn.prototype.hi,bn.prototype.equals=bn.prototype.D,bn.prototype.setSize=bn.prototype.tA,bn.prototype.setPoint=bn.prototype.dd,bn.prototype.set=bn.prototype.set,bn.prototype.setTo=bn.prototype.sg;var wi=null,lo=null,ao=[];bn.className="Rect",bn.parse=Ql,bn.stringify=el,bn.contains=No,bn.intersects=xs,bn.ZeroRect=wi=new bn(0,0,0,0).ja(),bn.NoRect=lo=new bn(NaN,NaN,NaN,NaN).ja(),bn.parse=Ql,bn.stringify=el,bn.contains=No,bn.intersects=xs;function Mr(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):Wt("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Mr.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Mr.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},Mr.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Mr.prototype.copy=function(){var a=new Mr;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},tt=Mr.prototype,tt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},tt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},tt.freeze=function(){return this._isFrozen=!0,this},tt.ka=function(){return Object.isFrozen(this)&&Wt("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 Mr;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new Mr(x);for(var te=NaN;a[y]==="";)y++;if((b=a[y++])&&(te=parseFloat(b)),isNaN(te))return new Mr(x,E);for(var ne=NaN;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),isNaN(ne)?new Mr(x,E):new Mr(x,E,te,ne)}return new Mr}function Ra(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}tt.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},tt.D=function(a){return a instanceof Mr?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},tt.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},tt.Xa=function(a){return en.B(this.top,a.top)&&en.B(this.right,a.right)&&en.B(this.bottom,a.bottom)&&en.B(this.left,a.left)},tt.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Mr.alloc=function(){var a=ql.pop();return a===void 0?new Mr:a},Mr.free=function(a){ql.push(a)},Mr.prototype.isReal=Mr.prototype.w,Mr.prototype.equalsApprox=Mr.prototype.Xa,Mr.prototype.equalTo=Mr.prototype.hi,Mr.prototype.equals=Mr.prototype.D,Mr.prototype.set=Mr.prototype.set,Mr.prototype.setTo=Mr.prototype.sg;var Cs=null,Il=null,ql=[];Mr.className="Margin",Mr.parse=Ba,Mr.stringify=Ra,Mr.ZeroMargin=Cs=new Mr(0,0,0,0).ja(),Mr.TwoMargin=Il=new Mr(2,2,2,2).ja(),Mr.parse=Ba,Mr.stringify=Ra;function Sr(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 aa,Wa,Pl,Dl,Fl,Di,mc,tl,nl,As,Eu,Ru,_s,dl,$c,hh,Gc,Hh,Hc,vc,_u,Bl,dh,Uc,yc,oo,Do,Es,Xa,_a,ha,Ea,Ka,za,zu,Rl;Sr.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Sr.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},Sr.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Sr.prototype.copy=function(){var a=new Sr;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},tt=Sr.prototype,tt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},tt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},tt.freeze=function(){return this._isFrozen=!0,this},tt.ka=function(){return Object.isFrozen(this)&&Wt("cannot thaw constant: "+this),this._isFrozen=!1,this};function ka(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 aa;if(a==="TopLeft")return Wa;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return Pl;if(a==="TopRight")return Dl;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return Fl;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 _s;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 Bl;if(a==="NotRightSide")return dh;if(a==="NotBottomSide")return Uc;if(a==="AllSides")return yc;if(a==="Default")return oo;a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b!==void 0&&0<b.length&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(E=parseFloat(b));for(var te=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(te=parseFloat(b));for(var ne=0;a[y]==="";)y++;return b=a[y++],b!==void 0&&0<b.length&&(ne=parseFloat(b)),new Sr(x,E,te,ne)}return new Sr}function bd(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}tt.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(aa)?"None":this.D(Wa)?"TopLeft":this.D(Pl)?"Top":this.D(Dl)?"TopRight":this.D(Fl)?"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(_s)?"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(Bl)?"NotLeftSide":this.D(dh)?"NotRightSide":this.D(Uc)?"NotBottomSide":this.D(yc)?"AllSides":this.D(oo)?"Default":"None"},tt.D=function(a){return a instanceof Sr?(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},tt.gv=function(){return new Sr(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},tt.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(Do))a=Ru;else if(a.D(Es))a=_s;else if(a.D(Xa))a=Eu;else if(a.D(_a))a=dl;else return!1;return a=a.offsetY,(this.offsetY&a)===a},tt.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},tt.Mc=function(){return isNaN(this.x)||isNaN(this.y)},tt.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},tt.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},tt.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},Sr.alloc=function(){var a=Wc.pop();return a===void 0?new Sr:a},Sr.free=function(a){Wc.push(a)},Sr.prototype.isDefault=Sr.prototype.Xb,Sr.prototype.isNone=Sr.prototype.ys,Sr.prototype.isSide=Sr.prototype.$c,Sr.prototype.isNoSpot=Sr.prototype.Mc,Sr.prototype.isSpot=Sr.prototype.sb,Sr.prototype.includesSide=Sr.prototype.Hf,Sr.prototype.opposite=Sr.prototype.gv,Sr.prototype.equals=Sr.prototype.D,Sr.prototype.set=Sr.prototype.set,Sr.prototype.setTo=Sr.prototype.sg;var Wc=[];Sr.className="Spot",Sr.parse=wd,Sr.stringify=bd,Sr.None=aa=ka(new Sr(0,0,0,0),0).ja(),Sr.Default=oo=ka(new Sr(0,0,-1,0),-1).ja(),Sr.TopLeft=Wa=new Sr(0,0,0,0).ja(),Sr.TopCenter=Pl=new Sr(.5,0,0,0).ja(),Sr.TopRight=Dl=new Sr(1,0,0,0).ja(),Sr.LeftCenter=Fl=new Sr(0,.5,0,0).ja(),Sr.Center=Di=new Sr(.5,.5,0,0).ja(),Sr.RightCenter=mc=new Sr(1,.5,0,0).ja(),Sr.BottomLeft=tl=new Sr(0,1,0,0).ja(),Sr.BottomCenter=nl=new Sr(.5,1,0,0).ja(),Sr.BottomRight=As=new Sr(1,1,0,0).ja(),Sr.MiddleTop=ha=Pl,Sr.MiddleLeft=Ea=Fl,Sr.MiddleRight=Ka=mc,Sr.MiddleBottom=za=nl,Sr.Top=Xa=Pl,Sr.Left=Do=Fl,Sr.Right=Es=mc,Sr.Bottom=_a=nl,Sr.TopSide=Eu=ka(new Sr(0,0,1,1),1).ja(),Sr.LeftSide=Ru=ka(new Sr(0,0,1,2),1).ja(),Sr.RightSide=_s=ka(new Sr(0,0,1,4),1).ja(),Sr.BottomSide=dl=ka(new Sr(0,0,1,8),1).ja(),Sr.TopBottomSides=$c=ka(new Sr(0,0,1,9),1).ja(),Sr.LeftRightSides=hh=ka(new Sr(0,0,1,6),1).ja(),Sr.TopLeftSides=Gc=ka(new Sr(0,0,1,3),1).ja(),Sr.TopRightSides=Hh=ka(new Sr(0,0,1,5),1).ja(),Sr.BottomLeftSides=Hc=ka(new Sr(0,0,1,10),1).ja(),Sr.BottomRightSides=vc=ka(new Sr(0,0,1,12),1).ja(),Sr.NotTopSide=_u=ka(new Sr(0,0,1,14),1).ja(),Sr.NotLeftSide=Bl=ka(new Sr(0,0,1,13),1).ja(),Sr.NotRightSide=dh=ka(new Sr(0,0,1,11),1).ja(),Sr.NotBottomSide=Uc=ka(new Sr(0,0,1,7),1).ja(),Sr.AllSides=yc=ka(new Sr(0,0,1,15),1).ja(),zu=new Sr(.156,.156).ja(),Rl=new Sr(.844,.844).ja(),Sr.parse=wd,Sr.stringify=bd;function pi(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}pi.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},pi.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},pi.prototype.copy=function(){var a=new pi;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},pi.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},pi.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},pi.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},pi.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},pi.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},pi.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},pi.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},pi.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},tt=pi.prototype,tt.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},tt.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},tt.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)},tt.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))},tt.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))},tt.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,Ae=y*te+x*se+ge,Ge=y*ne+x*he+Se,Je=b*te+x*se+ge,rt=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(Ae,Je),Ae=Math.max(Ae,Je),Je=Math.min(Ge,rt),Ge=Math.max(Ge,rt),E=Math.min(E,x),Ae=Math.max(Ae,x),Je=Math.min(Je,y),Ge=Math.max(Ge,y),E=Math.min(E,te),Ae=Math.max(Ae,te),Je=Math.min(Je,b),Ge=Math.max(Ge,b),a.h(E,Je,Ae-E,Ge-Je),a},pi.alloc=function(){var a=fh.pop();return a===void 0?new pi:a},pi.free=function(a){fh.push(a)},pi.prototype.transformRect=pi.prototype.pp,pi.prototype.transformPoint=pi.prototype.Ga,pi.prototype.scale=pi.prototype.scale,pi.prototype.translate=pi.prototype.translate,pi.prototype.rotate=pi.prototype.rotate,pi.prototype.invert=pi.prototype.Vj,pi.prototype.multiplyInverted=pi.prototype.bv,pi.prototype.multiply=pi.prototype.multiply,pi.prototype.reset=pi.prototype.reset,pi.prototype.isIdentity=pi.prototype.ws,pi.prototype.equals=pi.prototype.D,pi.prototype.setTransform=pi.prototype.setTransform,pi.prototype.set=pi.prototype.set;var fh=[];pi.className="Transform",pi.xF="54a702f3e53909c447824c6706603faf4c";var en={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=en.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);en.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,Ae){if(en.Yb(a,y,ne,se,Ae,x,b)&&en.Yb(a,y,ne,se,Ae,E,te))return en.Yb(a,y,ne,se,Ae,ge,Se);var Ge=(a+x)/2,Je=(y+b)/2,rt=(x+E)/2,ct=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(Ge+rt)/2,x=(Je+ct)/2,rt=(rt+E)/2,ct=(ct+te)/2;var Bt=(b+rt)/2,Lt=(x+ct)/2;return en.cs(a,y,Ge,Je,b,x,Bt,Lt,he,ge,Se,Ae)||en.cs(Bt,Lt,rt,ct,E,te,ne,se,he,ge,Se,Ae)},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 Gr(((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(en.Yb(a,y,ne,se,he,x,b)&&en.Yb(a,y,ne,se,he,E,te))qi(ge,a,y,0,0),qi(ge,ne,se,0,0);else{var Se=(a+x)/2,Ae=(y+b)/2,Ge=(x+E)/2,Je=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(Se+Ge)/2,x=(Ae+Je)/2,Ge=(Ge+E)/2,Je=(Je+te)/2;var rt=(b+Ge)/2,ct=(x+Je)/2;en.Dl(a,y,Se,Ae,b,x,rt,ct,he,ge),en.Dl(rt,ct,Ge,Je,E,te,ne,se,he,ge)}return ge},Qe:function(a,y,x,b,E,te,ne,se,he,ge){if(en.Yb(a,y,ne,se,he,x,b)&&en.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,Ae=(y+b)/2,Ge=(x+E)/2,Je=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(Se+Ge)/2,x=(Ae+Je)/2,Ge=(Ge+E)/2,Je=(Je+te)/2;var rt=(b+Ge)/2,ct=(x+Je)/2;en.Qe(a,y,Se,Ae,b,x,rt,ct,he,ge),en.Qe(rt,ct,Ge,Je,E,te,ne,se,he,ge)}return ge},jv:function(a,y,x,b,E,te,ne,se,he,ge){if(en.Yb(a,y,E,te,ge,x,b))return en.Yb(a,y,E,te,ge,se,he);var Se=(a+x)/2,Ae=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var Ge=(Se+x)/2,Je=(Ae+b)/2;return en.jv(a,y,Se,Ae,Ge,Je,ne,se,he,ge)||en.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(en.Yb(a,y,E,te,ne,x,b))qi(se,a,y,0,0),qi(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,Ae=(ge+b)/2;en.iv(a,y,he,ge,Se,Ae,ne,se),en.iv(Se,Ae,x,b,E,te,ne,se)}return se},ep:function(a,y,x,b,E,te,ne,se){if(en.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,Ae=(ge+b)/2;en.ep(a,y,he,ge,Se,Ae,ne,se),en.ep(Se,Ae,x,b,E,te,ne,se)}return se},Eo:function(a,y,x,b,E,te,ne,se,he,ge,Se,Ae,Ge,Je){if(en.Yb(a,y,ne,se,Ge,x,b)&&en.Yb(a,y,ne,se,Ge,E,te))return!en.Rl(a,y,ne,se,he,ge,Se,Ae)||(Ge=(a-ne)*(ge-Ae)-(y-se)*(he-Se),Ge===0)?!1:(Je.h(((a*se-y*ne)*(he-Se)-(a-ne)*(he*Ae-ge*Se))/Ge,((a*se-y*ne)*(ge-Ae)-(y-se)*(he*Ae-ge*Se))/Ge),!0);var rt=(a+x)/2,ct=(y+b)/2,Bt=(x+E)/2,Lt=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(rt+Bt)/2,x=(ct+Lt)/2,Bt=(Bt+E)/2,Lt=(Lt+te)/2;var $t=(b+Bt)/2,Ht=(x+Lt)/2,Kt=1/0,Yt=!1,ln=0,er=0;return en.Eo(a,y,rt,ct,b,x,$t,Ht,he,ge,Se,Ae,Ge,Je)&&(a=(Je.x-he)*(Je.x-he)+(Je.y-ge)*(Je.y-ge),a<Kt&&(Kt=a,Yt=!0,ln=Je.x,er=Je.y)),en.Eo($t,Ht,Bt,Lt,E,te,ne,se,he,ge,Se,Ae,Ge,Je)&&(Je.x-he)*(Je.x-he)+(Je.y-ge)*(Je.y-ge)<Kt&&(Yt=!0,ln=Je.x,er=Je.y),Yt&&(Je.x=ln,Je.y=er),Yt},Fo:function(a,y,x,b,E,te,ne,se,he,ge,Se,Ae,Ge){var Je=0;if(en.Yb(a,y,ne,se,Ge,x,b)&&en.Yb(a,y,ne,se,Ge,E,te)){if(Ge=(a-ne)*(ge-Ae)-(y-se)*(he-Se),Ge===0)return Je;var rt=((a*se-y*ne)*(he-Se)-(a-ne)*(he*Ae-ge*Se))/Ge,ct=((a*se-y*ne)*(ge-Ae)-(y-se)*(he*Ae-ge*Se))/Ge;if(rt>=Se)return Je;if((he>Se?he-Se:Se-he)<(ge>Ae?ge-Ae:Ae-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,rt<he||rt>a)return Je;0<Ge?Je++:0>Ge&&Je--}else{rt=(a+x)/2,ct=(y+b)/2;var Bt=(x+E)/2,Lt=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(rt+Bt)/2,x=(ct+Lt)/2,Bt=(Bt+E)/2,Lt=(Lt+te)/2;var $t=(b+Bt)/2,Ht=(x+Lt)/2;Je+=en.Fo(a,y,rt,ct,b,x,$t,Ht,he,ge,Se,Ae,Ge),Je+=en.Fo($t,Ht,Bt,Lt,E,te,ne,se,he,ge,Se,Ae,Ge)}return Je},qh:function(a,y,x,b,E,te,ne){return en.$(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)):en.$(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 en.B(a,x)&&en.B(y,b)?(he.h(a,y),!1):en.$(E,ne)?en.$(a,x)?(en.qh(a,y,x,b,E,te,he),!1):en.qh(a,y,x,b,E,(b-y)/(x-a)*(E-a)+y,he):(se=(se-te)/(ne-E),en.$(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),en.$(se,ne)?(en.qh(a,y,x,b,E,te,he),!1):(E=(ne*a-se*E+te-y)/(ne-se),en.$(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)):en.qh(a,y,x,b,E,ne*(E-a)+y,he))))},MA:function(a,y,x,b,E){return en.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(Bt,Lt){var $t=(Bt-a)*(Bt-a)+(Lt-y)*(Lt-y);$t<Ae&&(Ae=$t,he.h(Bt,Lt))}var Ae=1/0;Se(he.x,he.y);var Ge=0,Je=0,rt=0,ct=0;if(E<ne?(Ge=E,Je=ne):(Ge=ne,Je=E),te<se?(rt=E,ct=ne):(rt=ne,ct=E),Ge=(Je-Ge)/2+ge,ge=(ct-rt)/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,Ae=y;if(en.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,Ae=he.y)}return en.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,Ae=he.y)),en.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,Ae=he.y)),en.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,Ae=he.y)),he.h(Se,Ae),1e21>ge},us:function(a,y,x){return en.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):!!(No(a,y,x,b,E,te)||No(a,y,x,b,ne,se)||en.Rl(a,y,he,y,E,te,ne,se)||en.Rl(he,y,he,ge,E,te,ne,se)||en.Rl(he,ge,a,ge,E,te,ne,se)||en.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>=en.Fl(a,y,x,b,E,te)*en.Fl(a,y,x,b,ne,se)&&0>=en.Fl(E,te,ne,se,a,y)*en.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(en.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),en.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),Ae=ne/(y+te);if(Se=Se*Se+Ae*Ae-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 vr,um:new vr,Mf:new vr,Nf:0,vm:100};en.za=en.AA;function Zn(a){fi(this),this.l=2,a===void 0&&(a=Zn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===Zn.o?this.ee=new Tn:(Zn.V===null&&(Zn.V=new Tn().freeze()),this.ee=Zn.V),this.aq=this.ee.Ja,this.Ip=new bn().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=Wa,this.gg=As,this.Rk=this.Sk=NaN,this.Uf=zn}Zn.prototype.copy=function(){var a=new Zn;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===Zn.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},Zn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},Zn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==Zn.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},Zn.prototype.ka=function(){if(Object.isFrozen(this)&&Wt("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==Zn.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},Zn.prototype.Xa=function(a){if(!(a instanceof Zn))return!1;if(this.type!==a.type)return this.type===Zn.j&&a.type===Zn.o?Pd(this,a):a.type===Zn.j&&this.type===Zn.o?Pd(a,this):!1;if(this.type===Zn.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 en.B(this.startX,a.startX)&&en.B(this.startY,a.startY)&&en.B(this.endX,a.endX)&&en.B(this.endY,a.endY)};function Pd(a,y){return a.type!==Zn.j||y.type!==Zn.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&en.B(a.startX,y.startX)&&en.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===Po&&en.B(a.endX,y.endX)&&en.B(a.endY,y.endY))))}Zn.ia=function(a){return a.toString()},Zn.prototype.qb=function(a){a.classType===Zn&&(this.type=a)},Zn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Zn.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 Zn.u:var y=new bn(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 Zn.F:if(y=new bn(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 Zn.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()}},Zn.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},Zn.parse=function(a,y){function x(){return ct>=Kt-1?!0:ge[ct+1].match(Yt)!==null}function b(){return ct++,ge[ct]}function E(Qr){var Wr=parseFloat(b()),Xi=parseFloat(b());Bt===Bt.toLowerCase()&&(Wr=Ht.x+Wr,Xi=Ht.y+Xi),Qr.h(Wr,Xi)}function te(){return E(Ht),Ht}function ne(){return E($t),$t}function se(){var Qr=Lt.toLowerCase();return Qr!=="c"&&Qr!=="s"&&Qr!=="q"&&Qr!=="t"?Ht:new jt(2*Ht.x-$t.x,2*Ht.y-$t.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 Ae="",Ge=!1,Je=0;Je<Se.length;Je++){var rt=Se[Je];rt!=="."||Ge?rt==="."?(he.push(Ae),Ae="."):Ae+=rt:(Ge=!0,Ae+=rt)}for(he.push(Ae),ge.splice(a,1),Se=0;Se<he.length;Se++)ge.splice(a+Se,0,he[Se]);a+=he.length-1,Ln(he)}}var ct=-1,Bt="",Lt="";he=new jt(0,0);var $t=new jt(0,0),Ht=new jt(0,0),Kt=ge.length;a=N1(null),Ge=Ae=Se=!1,Je=!0,rt=null;for(var Yt=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(ct>=Kt-1);)if(Lt=Bt,Bt=b(),Bt!=="")switch(Bt.toUpperCase()){case"X":Je=!0,Ae=Se=!1;break;case"M":for(rt=te(),a.mc===null||Je===!0?(yp(a,rt.x,rt.y,Se,!Ae,Ge),Je=!1):a.moveTo(rt.x,rt.y),he.assign(Ht);!x();)rt=te(),a.lineTo(rt.x,rt.y);break;case"L":for(;!x();)rt=te(),a.lineTo(rt.x,rt.y);break;case"H":for(;!x();)Ht=new jt((Bt===Bt.toLowerCase()?Ht.x:0)+parseFloat(b()),Ht.y),a.lineTo(Ht.x,Ht.y);break;case"V":for(;!x();)Ht=new jt(Ht.x,(Bt===Bt.toLowerCase()?Ht.y:0)+parseFloat(b())),a.lineTo(Ht.x,Ht.y);break;case"C":for(;!x();){rt=new jt,E(rt);var ln=ne(),er=te();Eh(a,rt.x,rt.y,ln.x,ln.y,er.x,er.y)}break;case"S":for(;!x();)rt=se(),ln=ne(),er=te(),Eh(a,rt.x,rt.y,ln.x,ln.y,er.x,er.y);break;case"Q":for(;!x();)rt=ne(),ln=te(),Gm(a,rt.x,rt.y,ln.x,ln.y);break;case"T":for(;!x();)$t=rt=se(),ln=te(),Gm(a,rt.x,rt.y,ln.x,ln.y);break;case"B":for(;!x();){rt=parseFloat(b()),ln=parseFloat(b()),er=parseFloat(b());var ur=parseFloat(b()),or=parseFloat(b()),Hn=or,jn=!1;x()||(Hn=parseFloat(b()),x()||(jn=parseFloat(b())!==0)),Bt===Bt.toLowerCase()&&(er+=Ht.x,ur+=Ht.y),a.arcTo(rt,ln,er,ur,or,Hn,jn)}break;case"A":for(;!x();)rt=Math.abs(parseFloat(b())),ln=Math.abs(parseFloat(b())),er=parseFloat(b()),or=ur=!1,jn=Hn=0,Hn=b(),Hn.length===1?(ur=!!parseFloat(Hn),or=!!parseFloat(b()),Hn=parseFloat(b())):Hn.length===2?(ur=!!parseFloat(Hn[0]),or=!!parseFloat(Hn[1]),Hn=parseFloat(b())):(ur=!!parseFloat(Hn[0]),or=!!parseFloat(Hn[1]),Hn=parseFloat(Hn.slice(2))),jn=parseFloat(b()),Bt===Bt.toLowerCase()&&(Hn=Ht.x+Hn,jn=Ht.y+jn),Ht.h(Hn,jn),Px(a,rt,ln,er,ur,or,Hn,jn);break;case"Z":bx(a),Ht.assign(he);break;case"F":for(rt="",ln=1;ge[ct+ln];)if(ge[ct+ln]==="0")Ge=!0,ln++;else if(ge[ct+ln].match(/[Uu]/)!==null)ln++;else if(ge[ct+ln].match(Yt)===null)ln++;else{rt=ge[ct+ln];break}rt.match(/[Mm]/)?Se=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(rt="",ln=1;ge[ct+ln];)if(ge[ct+ln].match(/[Ff]/)!==null)ln++;else if(ge[ct+ln].match(Yt)===null)ln++;else{rt=ge[ct+ln];break}rt.match(/[Mm]/)?Ae=!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},Zn.Ha=function(a,y){for(var x=a.length,b=jt.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}jt.free(b)},Zn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===Zn.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},Zn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===Zn.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),qi(a,0,0,0,0),a.freeze()},Zn.prototype.ix=function(){var a=new bn;return af(this,a,!0),a};function af(a,y,x){switch(a.type){case Zn.j:case Zn.u:case Zn.F:x?y.h(a.od,a.pd,0,0):qi(y,a.od,a.pd,0,0),qi(y,a.Dc,a.Ec,0,0);break;case Zn.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):qi(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 Ae=ne[Se];switch(Ae.type){case Po:case ya:he=Ae.endX,ge=Ae.endY,qi(y,he,ge,0,0);break;case ss:en.Dl(he,ge,Ae.point1X,Ae.point1Y,Ae.point2X,Ae.point2Y,Ae.endX,Ae.endY,.5,y),he=Ae.endX,ge=Ae.endY;break;case Cl:en.iv(he,ge,Ae.point1X,Ae.point1Y,Ae.endX,Ae.endY,.5,y),he=Ae.endX,ge=Ae.endY;break;case da:case _l:var Ge=Ae.type===da?rl(Ae,te):zs(Ae,te,he,ge),Je=Ge.length;if(Je===0){he=Ae.type===da?Ae.centerX:Ae.endX,ge=Ae.type===da?Ae.centerY:Ae.endY,qi(y,he,ge,0,0);break}Ae=null;for(var rt=0;rt<Je;rt++)Ae=Ge[rt],en.Dl(Ae[0],Ae[1],Ae[2],Ae[3],Ae[4],Ae[5],Ae[6],Ae[7],.5,y);Ae!==null&&(he=Ae[6],ge=Ae[7]);break;default:Wt("Unknown Segment type: "+Ae.type)}}}break;default:Wt("Unknown Geometry type: "+a.type)}}Zn.prototype.normalize=function(){this._isFrozen&&In(this);var a=this.ix();return this.offset(-a.x,-a.y),new jt(-a.x,-a.y)},Zn.prototype.offset=function(a,y){return this._isFrozen&&In(this),this.transform(1,0,0,1,a,y),this},Zn.prototype.scale=function(a,y){return this._isFrozen&&In(this),this.transform(a,0,0,y,0,0),this},Zn.prototype.rotate=function(a,y,x){this._isFrozen&&In(this),y===void 0&&(y=0),x===void 0&&(x=0);var b=pi.alloc();return b.reset(),b.rotate(a,y,x),this.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),pi.free(b),this},tt=Zn.prototype,tt.transform=function(a,y,x,b,E,te){switch(this.type){case Zn.j:case Zn.u:case Zn.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 Zn.o:for(var he=this.figures.s,ge=he.length,Se=0;Se<ge;Se++){var Ae=he[Se];ne=Ae.startX,se=Ae.startY,Ae.startX=ne*a+se*x+E,Ae.startY=ne*y+se*b+te,Ae=Ae.segments.s;for(var Ge=Ae.length,Je=0;Je<Ge;Je++){var rt=Ae[Je];switch(rt.type){case Po:case ya:ne=rt.endX,se=rt.endY,rt.endX=ne*a+se*x+E,rt.endY=ne*y+se*b+te;break;case ss:ne=rt.point1X,se=rt.point1Y,rt.point1X=ne*a+se*x+E,rt.point1Y=ne*y+se*b+te,ne=rt.point2X,se=rt.point2Y,rt.point2X=ne*a+se*x+E,rt.point2Y=ne*y+se*b+te,ne=rt.endX,se=rt.endY,rt.endX=ne*a+se*x+E,rt.endY=ne*y+se*b+te;break;case Cl:ne=rt.point1X,se=rt.point1Y,rt.point1X=ne*a+se*x+E,rt.point1Y=ne*y+se*b+te,ne=rt.endX,se=rt.endY,rt.endX=ne*a+se*x+E,rt.endY=ne*y+se*b+te;break;case da:ne=rt.centerX,se=rt.centerY,rt.centerX=ne*a+se*x+E,rt.centerY=ne*y+se*b+te,y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),rt.startAngle+=ne),0>a&&(rt.startAngle=180-rt.startAngle,rt.sweepAngle=-rt.sweepAngle),0>b&&(rt.startAngle=-rt.startAngle,rt.sweepAngle=-rt.sweepAngle),rt.radiusX*=Math.sqrt(a*a+x*x),rt.radiusY!==void 0&&(rt.radiusY*=Math.sqrt(y*y+b*b));break;case _l:if(ne=rt.endX,se=rt.endY,rt.endX=ne*a+se*x+E,rt.endY=ne*y+se*b+te,rt.radiusX===0||rt.radiusY===0)break;y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),rt.xAxisRotation+=ne),0>a&&(rt.xAxisRotation=180-rt.xAxisRotation,rt.isClockwiseArc=!rt.isClockwiseArc),0>b&&(rt.xAxisRotation=-rt.xAxisRotation,rt.isClockwiseArc=!rt.isClockwiseArc),rt.radiusX*=Math.sqrt(a*a+x*x),rt.radiusY*=Math.sqrt(y*y+b*b);break;default:Wt("Unknown Segment type: "+rt.type)}}}}return this._isInvalidBounds=!0,this},tt.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 Zn.j:return en.Yb(x,b,E,te,y,a.x,a.y);case Zn.u:var ne=bn.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),bn.free(ne),a;case Zn.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 Zn.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,Ae,Ge=a.figures.s,Je=Ge.length,rt=0;rt<Je;rt++){var ct=Ge[rt],Bt=!ct.isEvenOdd;if(ct.isFilled){if(b&&ct.ca(te,y,x))return!0;var Lt=ct.segments;he=ct.startX,ge=ct.startY;for(var $t=he,Ht=ge,Kt=Lt.s,Yt=0;Yt<=Lt.length;Yt++){var ln=void 0;if(Yt!==Lt.length){ln=Kt[Yt];var er=ln.type;a=ln.endX,Ae=ln.endY}else er=Po,a=$t,Ae=Ht;switch(er){case ya:if($t=Gu(te,y,ne,y,he,ge,$t,Ht),isNaN($t))return!0;se+=$t,$t=a,Ht=Ae;break;case Po:if(he=Gu(te,y,ne,y,he,ge,a,Ae),isNaN(he))return!0;se+=he;break;case ss:Se=en.Fo(he,ge,ln.point1X,ln.point1Y,ln.point2X,ln.point2Y,a,Ae,ne,y,te,y,.5),se+=Se;break;case Cl:Se=en.Fo(he,ge,(he+2*ln.point1X)/3,(ge+2*ln.point1Y)/3,(2*ln.point1X+a)/3,(2*ln.point1Y+Ae)/3,a,Ae,ne,y,te,y,.5),se+=Se;break;case da:case _l:er=ln.type===da?rl(ln,ct):zs(ln,ct,he,ge);var ur=er.length;if(ur===0){if(he=Gu(te,y,ne,y,he,ge,ln.type===da?ln.centerX:ln.endX,ln.type===da?ln.centerY:ln.endY),isNaN(he))return!0;se+=he;break}ln=null;for(var or=0;or<ur;or++){if(ln=er[or],or===0){if(Se=Gu(te,y,ne,y,he,ge,ln[0],ln[1]),isNaN(Se))return!0;se+=Se}Se=en.Fo(ln[0],ln[1],ln[2],ln[3],ln[4],ln[5],ln[6],ln[7],ne,y,te,y,.5),se+=Se}ln!==null&&(a=ln[6],Ae=ln[7]);break;default:Wt("Unknown Segment type: "+ln.type)}he=a,ge=Ae}if(Bt){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(en.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}tt.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new jt),this.type===Zn.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},tt.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===Zn.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},tt.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===Zn.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},tt.xx=function(a){if(this.type===Zn.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=jt.alloc();return en.qh(y,x,b,E,te,a,se),a=se.x,te=se.y,jt.free(se),Math.sqrt(((a-y)*(a-y)+(te-x)*(te-x))/ne)}}else if(this.type===Zn.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=jt.alloc(),E=1/0,se=ne=0,he=y.length;for(var Se=ge=0,Ae=0;Ae<he;Ae++)for(var Ge=y[Ae],Je=x[Ae],rt=Ge.length,ct=0;ct<rt;ct+=2){var Bt=Ge[ct],Lt=Ge[ct+1];if(ct!==0){en.qh(ge,Se,Bt,Lt,a.x,a.y,b);var $t=(b.x-a.x)*(b.x-a.x)+(b.y-a.y)*(b.y-a.y);$t<E&&(E=$t,ne=se,ne+=Math.sqrt((b.x-ge)*(b.x-ge)+(b.y-Se)*(b.y-Se))),se+=Je[(ct-2)/2]}ge=Bt,Se=Lt}return jt.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===Zn.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===Zn.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===Zn.F){var te=new $a;te.startX=a.endX,te.startY=(a.startY+a.endY)/2;var ne=new Ui(da);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];en.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,Ae=0;Ae<Se;Ae++){var Ge=ge[Ae];switch(Ge.type){case ya: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:en.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:en.ep(ne,te,Ge.point1X,Ge.point1Y,Ge.endX,Ge.endY,.5,b),ne=Ge.endX,te=Ge.endY;break;case da:var Je=rl(Ge,E),rt=Je.length;if(rt===0){b.push(Ge.centerX),b.push(Ge.centerY),ne=Ge.centerX,te=Ge.centerY;break}for(var ct=0;ct<rt;ct++){var Bt=Je[ct];en.Qe(ne,te,Bt[2],Bt[3],Bt[4],Bt[5],Bt[6],Bt[7],.5,b),ne=Bt[6],te=Bt[7]}break;case _l:if(Je=zs(Ge,E,ne,te),rt=Je.length,ct=Ge.endX,Bt=Ge.endY,rt===0){b.push(ct),b.push(Bt),ne=ct,te=Bt;break}for(ct=0;ct<rt;ct++)Bt=Je[ct],en.Qe(ne,te,Bt[2],Bt[3],Bt[4],Bt[5],Bt[6],Bt[7],.5,b),ne=Bt[6],te=Bt[7];break;default:Wt("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(io(x,b,ne,se))),x=ne,b=se}return y}tt.add=function(a){return this.ee.add(a),this},tt.pm=function(a,y,x,b,E,te,ne,se){return this._isFrozen&&In(this),this.fg=new Sr(a,y,E,te).freeze(),this.gg=new Sr(x,b,ne,se).freeze(),this},Dt.Object.defineProperties(Zn.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===Zn.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===Zn.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&&In(this,a),this.na=a,a===Zn.o?this.ee=new Tn:(Zn.V===null&&(Zn.V=new Tn().freeze()),this.ee=Zn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&In(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&In(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&In(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&In(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&In(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&In(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&In(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&In(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),Zn.prototype.setSpots=Zn.prototype.pm,Zn.prototype.add=Zn.prototype.add,Zn.prototype.getFractionForPoint=Zn.prototype.xx,Zn.prototype.getPointAndAngleAlongPath=Zn.prototype.Qu,Zn.prototype.getAngleAlongPath=Zn.prototype.wx,Zn.prototype.getPointAlongPath=Zn.prototype.Pu,Zn.prototype.containsPoint=Zn.prototype.ca,Zn.prototype.transform=Zn.prototype.transform,Zn.prototype.rotate=Zn.prototype.rotate,Zn.prototype.scale=Zn.prototype.scale,Zn.prototype.offset=Zn.prototype.offset,Zn.prototype.normalize=Zn.prototype.normalize,Zn.prototype.computeBoundsWithoutOrigin=Zn.prototype.ix,Zn.prototype.equalsApprox=Zn.prototype.Xa,Zn.className="Geometry",Zn.j=new yn(Zn,"Line",0),Zn.u=new yn(Zn,"Rectangle",1),Zn.F=new yn(Zn,"Ellipse",2),Zn.o=new yn(Zn,"Path",3),Zn.V=null,Zn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",Zn.className="Geometry",Zn.stringify=Zn.ia,Zn.fillPath=Zn.nb,Zn.parse=Zn.parse,Zn.Line=Zn.j,Zn.Rectangle=Zn.u,Zn.Ellipse=Zn.F,Zn.Path=Zn.o;function $a(a,y,x,b,E){fi(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 Tn,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},tt=$a.prototype,tt.Xa=function(a){if(!(a instanceof $a&&en.B(this.startX,a.startX)&&en.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},tt.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},tt.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},tt.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},tt.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},tt.add=function(a){return this.pl.add(a),this},tt.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 ya:te=Se.endX,ne=Se.endY,b=Se.endX,E=Se.endY;break;case Po:if(en.Yb(b,E,Se.endX,Se.endY,x,a,y))return!0;b=Se.endX,E=Se.endY;break;case ss:if(en.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(en.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 da:case _l:var Ae=Se.type===da?rl(Se,this):zs(Se,this,b,E),Ge=Ae.length,Je=Se.type===da?Se.centerX:Se.endX,rt=Se.type===da?Se.centerY:Se.endY;if(Ge===0){if(en.Yb(b,E,Je,rt,x,a,y))return!0;b=Je,E=rt;break}for(Je=null,rt=0;rt<Ge;rt++)if(Je=Ae[rt],rt===0&&en.Yb(b,E,Je[0],Je[1],x,a,y)||en.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:Wt("Unknown Segment type: "+Se.type)}if(Se.isClosed&&(b!==te||E!==ne)&&en.Yb(b,E,te,ne,x,a,y))return!0}return!1},Dt.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&&In(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&In(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&In(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&In(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&In(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&In(this,a),this.pl=a,this._isInvalidBounds=!0}}}),$a.prototype.add=$a.prototype.add,$a.prototype.equalsApprox=$a.prototype.Xa,$a.className="PathFigure";function Ui(a,y,x,b,E,te,ne,se){fi(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===_l?(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===da&&(te=Math.max(te,0)),this.Wh=te,typeof ne=="number"?(a===da&&(ne=Math.max(ne,0)),this.Pg=ne):this.Pg=0),this.ae=null}Ui.prototype.copy=function(){var a=new Ui;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},tt=Ui.prototype,tt.Xa=function(a){if(!(a instanceof Ui)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case ya:case Po:return en.B(this.endX,a.endX)&&en.B(this.endY,a.endY);case ss:return en.B(this.endX,a.endX)&&en.B(this.endY,a.endY)&&en.B(this.point1X,a.point1X)&&en.B(this.point1Y,a.point1Y)&&en.B(this.point2X,a.point2X)&&en.B(this.point2Y,a.point2Y);case Cl:return en.B(this.endX,a.endX)&&en.B(this.endY,a.endY)&&en.B(this.point1X,a.point1X)&&en.B(this.point1Y,a.point1Y);case da:return en.B(this.startAngle,a.startAngle)&&en.B(this.sweepAngle,a.sweepAngle)&&en.B(this.centerX,a.centerX)&&en.B(this.centerY,a.centerY)&&en.B(this.radiusX,a.radiusX)&&en.B(this.radiusY,a.radiusY);case _l:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&en.B(this.xAxisRotation,a.xAxisRotation)&&en.B(this.endX,a.endX)&&en.B(this.endY,a.endY)&&en.B(this.radiusX,a.radiusX)&&en.B(this.radiusY,a.radiusY);default:return!1}},tt.qb=function(a){a.classType===Ui&&(this.type=a)},tt.toString=function(a){switch(a===void 0&&(a=-1),this.type){case ya: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 da: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 _l: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":"")},tt.freeze=function(){return this._isFrozen=!0,this},tt.ka=function(){return this._isFrozen=!1,this},tt.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=en.jx(0,0,x<b?x:b,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==b){var ne=pi.alloc();ne.reset(),x<b?ne.scale(1,b/x):ne.scale(x/b,1),Zn.Ha(te,ne),pi.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 zs(a,y,x,b){function E(ct,Bt,Lt,$t){return(ct*$t<Bt*Lt?-1:1)*Math.acos((ct*Lt+Bt*$t)/(Math.sqrt(ct*ct+Bt*Bt)*Math.sqrt(Lt*Lt+$t*$t)))}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,Ae=Math.cos(ne),Ge=Math.sin(ne),Je=Ae*(x-ge)/2+Ge*(b-Se)/2;ne=-Ge*(x-ge)/2+Ae*(b-Se)/2;var rt=Je*Je/(y*y)+ne*ne/(te*te);return 1<rt&&(y*=Math.sqrt(rt),te*=Math.sqrt(rt)),rt=(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(rt)&&(rt=0),se=rt*y*ne/te,rt=rt*-te*Je/y,isNaN(se)&&(se=0),isNaN(rt)&&(rt=0),x=(x+ge)/2+Ae*se-Ge*rt,b=(b+Se)/2+Ge*se+Ae*rt,Se=E(1,0,(Je-se)/y,(ne-rt)/te),Ae=(Je-se)/y,ge=(ne-rt)/te,Je=(-Je-se)/y,se=(-ne-rt)/te,ne=E(Ae,ge,Je,se),Je=(Ae*Je+ge*se)/(Math.sqrt(Ae*Ae+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=en.jx(0,0,y>te?y:te,Se,Se+ne,!0),te=pi.alloc(),te.reset(),te.translate(x,b),te.rotate(a.Ne,0,0),te.scale(he,Je),Zn.Ha(y,te),pi.free(te),a.ae=y,a.ae}Dt.Object.defineProperties(Ui.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&&In(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&In(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&In(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&In(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&In(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&In(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&In(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&In(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&In(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Wn(a,">= zero",Ui,"radiusX"),this._isFrozen&&In(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Wn(a,">= zero",Ui,"radiusY"),this._isFrozen&&In(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&In(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&&In(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&&In(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&&In(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&&In(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),Ui.prototype.equalsApprox=Ui.prototype.Xa;var ya=new yn(Ui,"Move",0),Po=new yn(Ui,"Line",1),ss=new yn(Ui,"Bezier",2),Cl=new yn(Ui,"QuadraticBezier",3),da=new yn(Ui,"Arc",4),_l=new yn(Ui,"SvgArc",4);Ui.className="PathSegment",Ui.Move=ya,Ui.Line=Po,Ui.Bezier=ss,Ui.QuadraticBezier=Cl,Ui.Arc=da,Ui.SvgArc=_l;function ws(){this.H=null,this.xu=new jt(0,0).freeze(),this.mt=new jt(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},Dt.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},Dt.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=Go,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=mn(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=mn(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=mn(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=mn(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===Go?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+=Gn(this.object)),this.oldValue!==null&&(a+=" old: "+Gn(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+Gn(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))},Dt.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 yn($o,"Transaction",-1),Go=new yn($o,"Property",0),la=new yn($o,"Insert",1),Oa=new yn($o,"Remove",2);$o.className="ChangedEvent",$o.Transaction=il,$o.Property=Go,$o.Insert=la,$o.Remove=Oa;function Va(){this.o=new Tn().freeze(),this.xa="",this.j=!1}Va.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},Va.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()},Va.prototype.canUndo=function(){return this.isComplete},Va.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()}},Va.prototype.canRedo=function(){return this.isComplete},Va.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()}},Va.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new cr,x=0;x<a.count;x++){var b=a.M(x);if(b!==null&&b.change===Go&&b.object){var E=y.get(b.object);E||(E=new cr,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()}},Dt.Object.defineProperties(Va.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}}}),Va.prototype.optimize=Va.prototype.ak,Va.prototype.redo=Va.prototype.redo,Va.prototype.canRedo=Va.prototype.canRedo,Va.prototype.undo=Va.prototype.undo,Va.prototype.canUndo=Va.prototype.canUndo,Va.prototype.clear=Va.prototype.clear,Va.className="Transaction";function Ko(){this.Pt=new Nn,this.Jd=!1,this.u=new Tn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new Tn().freeze(),this.hl=new Tn,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}Ko.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},Ko.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},Ko.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},tt=Ko.prototype,tt.Xw=function(a){this.Pt.add(a)},tt.Rx=function(a){this.Pt.remove(a)},tt.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},tt.eb=function(a){return a===void 0&&(a=""),Vc(this,!0,a)},tt.Kf=function(){return Vc(this,!1,"")};function Vc(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&ar("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}tt.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()}},Ko.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},Ko.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){ar("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},Ko.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},Ko.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){ar("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},Ko.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)},Ko.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new Va);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||ar("Change not within a transaction: "+x.toString()))}},Ko.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},Dt.Object.defineProperties(Ko.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}}}),Ko.prototype.handleChanged=Ko.prototype.Tu,Ko.prototype.redo=Ko.prototype.redo,Ko.prototype.undo=Ko.prototype.undo,Ko.prototype.canUndo=Ko.prototype.canUndo,Ko.prototype.discardHistoryAfterIndex=Ko.prototype.lx,Ko.prototype.rollbackTransaction=Ko.prototype.Kf,Ko.prototype.commitTransaction=Ko.prototype.eb,Ko.prototype.startTransaction=Ko.prototype.Ea,Ko.prototype.removeModel=Ko.prototype.Rx,Ko.prototype.addModel=Ko.prototype.Xw,Ko.prototype.clear=Ko.prototype.clear,Ko.className="UndoManager";function $i(){fi(this),this.H=Vu,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new ws,this.Zr=-1}$i.prototype.toString=function(){return this.name!==""?this.name+" Tool":Mn(this.constructor)},$i.prototype.updateAdornments=function(){},$i.prototype.canStart=function(){return this.isEnabled},$i.prototype.doStart=function(){},$i.prototype.doActivate=function(){this.isActive=!0},$i.prototype.doDeactivate=function(){this.isActive=!1},$i.prototype.doStop=function(){},$i.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},$i.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},$i.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},$i.prototype.doMouseMove=function(){},$i.prototype.doMouseUp=function(){this.stopTool()},$i.prototype.doMouseWheel=function(){},$i.prototype.canStartMultiTouch=function(){return!0},$i.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,jt.allocAt(NaN,NaN)),b=y.So(1,jt.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}jt.free(x),jt.free(b)},$i.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,jt.allocAt(NaN,NaN)),b=y.So(1,jt.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 jt((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}jt.free(x),jt.free(b)},$i.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},$i.prototype.doKeyUp=function(){},$i.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},$i.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},$i.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(Zr?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||(Zr?y.meta:y.control)||y.shift||a.clearSelection()}},$i.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)}}}$i.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}},$i.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},$i.prototype.doCurrentObjectChanged=function(){},$i.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)}}},$i.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},$i.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,b=y.clone(this.yy);this.Zr=Qn(function(){x.doWaitAfter(b)},a)},$i.prototype.cancelWaitAfter=function(){this.Zr!==-1&&Ut.clearTimeout(this.Zr),this.Zr=-1},$i.prototype.doWaitAfter=function(){},$i.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof Ki);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},$i.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},Dt.Object.defineProperties($i.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof sn&&(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}}}),$i.prototype.startTransaction=$i.prototype.Ea,$i.className="Tool";function Fo(){$i.call(this),this.name="ToolManager",this.hb=new Tn,this.ob=new Tn,this.Hb=new Tn,this.F=this.V=850,this.o=new Vn(2,2).ja(),this.Ha=5e3,this.ia=Uh,this.u=Ed,this.Mp=this.j=null,this.zj=-1}un(Fo,$i),Fo.prototype.initializeStandardTools=function(){},Fo.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof Ki&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},Fo.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)},Fo.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)}Fo.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof Ki&&(y===a||y.rg(a))||this.hideToolTip()},Fo.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()))},Fo.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)},Fo.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 Ki)||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()},Fo.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof Ki){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 vi&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(Ut.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var E=this;this.zj=Qn(function(){E.hideToolTip()},a)}},Fo.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}},Fo.prototype.hideToolTip=function(){this.zj!==-1&&(Ut.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof Ki?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof vi&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},Fo.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()},Fo.prototype.doMouseWheel=function(){this.standardMouseWheel()},Fo.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},Fo.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},Fo.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},Fo.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},Fo.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)},Dt.Object.defineProperties(Fo.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 Ki?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}}}),Fo.prototype.replaceStandardTool=Fo.prototype.gb;var Uh=new yn(Fo,"WheelScroll",0),Wh=new yn(Fo,"WheelZoom",1),Wf=new yn(Fo,"WheelNone",2),Ed=new yn(Fo,"GestureZoom",3),Sc=new yn(Fo,"GestureCancel",4),Zc=new yn(Fo,"GestureNone",5);Fo.className="ToolManager",Fo.WheelScroll=Uh,Fo.WheelZoom=Wh,Fo.WheelNone=Wf,Fo.GestureZoom=Ed,Fo.GestureCancel=Sc,Fo.GestureNone=Zc;function Vo(){$i.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 jt(NaN,NaN),this.Fr=new jt,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(Vo,$i),Vo.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},Vo.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},Vo.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,(Zr?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},Vo.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),rn=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,rn=this,xn=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 Un?(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))}}Vo.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},Vo.prototype.Pd=function(a){return a===void 0?new Qc(ji):this.isGridSnapEnabled?new Qc(new jt(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new Qc(a.copy())},Vo.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),xn!==null&&(xn.currentCursor=""),rn=xn=null,pu(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),Kh(a,!0)},Vo.prototype.stopTransaction=function(){var a=this.diagram,y=$i.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=rn;pu(a),wc(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}Vo.prototype.doCancel=function(){pu(this),wc(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},Vo.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},Vo.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 cr,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 Un&&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 Un&&(x.value.point=new jt(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=jt.alloc();te.assign(b.lastInput.documentPoint),a.moveParts(y,te.re(E),x),jt.free(te),b.Gf("temporaryPixelRatio")===!0&&b.Yh===null&&30<b.$w&&(Ms(b),b.hk())}Vo.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 Un&&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&&rn===null)return;var se=b!==null?b.part:null;if(se===null||x.handlesDragDropForTopLevelParts&&se.isTopLevel&&!(se instanceof ei)){var he=x.mouseDragOver;he!==null&&(he(E),ne=!0)}if(!a.isActive&&rn===null||(a.doDragOver(y,b),!a.isActive&&rn===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)}Vo.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 Ki||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},Vo.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&&rn===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 Lr&&!(a instanceof ei)&&(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=jt.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 jt.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)):qr(E,ne,te,he,se):qr(E,null,null,null,null)}}}}Vo.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||rn!==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||rn!==null){for(a=bn.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof nr&&_t(x,b,a);bn.free(a)}}}function Wp(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof ei||(x=a.mouseDrop,x!==null&&x(y))}function _t(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 Un},!0,function(E){return E instanceof Un},b),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}Vo.prototype.doDropOnto=function(){},Vo.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))}},Vo.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&&Gt(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)}}},Vo.prototype.simulatedMouseMove=function(a,y,x){if(rn===null)return!1;var b=rn.diagram;x instanceof sn||(x=null);var E=xn;return x!==E&&(E!==null&&E!==b&&(E.ug(),rn.isDragOutStarted=!1,E=E.toolManager.findTool("Dragging"),E!==null&&E.doSimulatedDragLeave()),xn=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)},Vo.prototype.simulatedMouseUp=function(a,y,x){if(rn===null)return!1;var b=xn,E=rn.diagram;if(x===null)return rn.doCancel(),!0;if(x!==b){var te=b.toolManager.findTool("Dragging");if(b!==null&&b!==E&&te!==null)return b.ug(),rn.isDragOutStarted=!1,te.doSimulatedDragLeave(),!1;xn=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 jt),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=rn,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function Gt(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())}}Vo.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(Zr?!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())},Vo.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())},Vo.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())},Vo.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},Vo.prototype.Az=function(){return rn},Vo.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=rn;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},Vo.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),ol(a),a.animationManager.Cc(),a=rn,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},Vo.prototype.doSimulatedDragLeave=function(){var a=rn;a!==null&&a.doSimulatedDragOut(),this.doCancel()},Vo.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=rn;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},Vo.prototype.doSimulatedDrop=function(){var a=this.diagram,y=rn;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=bn.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,bn.free(te),te=a.Fr,ne=new cr,se=jt.alloc(),he=y.iterator;he.next();)ge=he.value,ge instanceof Un&&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))));jt.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)}}}Vo.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},Vo.prototype.computeMove=function(a,y,x,b){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,b):new jt},Dt.Object.defineProperties(Vo.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}}}),Vo.prototype.getDraggingSource=Vo.prototype.Az;var rn=null,xn=null;Vo.className="DraggingTool",Hu=new Tn,sr("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Fo.prototype.doCancel=function(){rn!==null&&rn.doCancel(),$i.prototype.doCancel.call(this)};function dn(){$i.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new Un,y=new di;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new di,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new nr,y=new di,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Qi,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new nr,y=new di,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Qi,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 cr,this.Of=this.gj=this.Pf=null}un(dn,$i),dn.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},dn.prototype.copyPortProperties=function(a,y,x,b,E){if(a!==null&&y!==null&&x!==null&&b!==null){var te=y.Df(),ne=Vn.alloc();ne.width=y.naturalBounds.width*te,ne.height=y.naturalBounds.height*te,b.desiredSize=ne,Vn.free(ne),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=Di,te=jt.alloc(),x.location=y.ga(Di,te),jt.free(te),b.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,b,E)}},dn.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=Qi,y.fromSpot=aa,y.toSpot=aa),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},dn.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},dn.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)}},dn.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},dn.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(Ae){return E.findValidLinkablePort(Ae,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,jt.alloc()),ge=x.x-he.x,Se=x.y-he.y;jt.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},dn.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},dn.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},dn.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},dn.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},dn.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)},dn.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),Bn(this,x,y,b)};function Bn(a,y,x,b){if(y===x)return!0;var E=y.fromNode;return E!==null&&E.isLinkLabel&&(b.add(E),Bn(a,E.labeledLink,x,b))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(b.add(y),Bn(a,y.labeledLink,x,b))))}dn.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!Rn(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!Rn(this,a,y,x,!0)}if(b===ng)return a===y?a=!0:(b=new Nn,b.add(y),a=Dn(this,b,a,y,x)),!a;if(b===rg)return!Rn(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 Rn(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&&Rn(a,ne,x,b,E)))return!0}return!1}function Dn(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&&Dn(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}Dt.Object.defineProperties(dn.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}}}),dn.className="LinkingBaseTool";function rr(){dn.call(this),this.name="Linking",this.V={},this.F=null,this.K=tr,this.Xd=null}un(rr,dn),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===kr){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===Er)&&(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(){dn.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 Un)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(){},Dt.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 yn(rr,"Either",0),kr=new yn(rr,"ForwardsOnly",0),Er=new yn(rr,"BackwardsOnly",0);rr.className="LinkingTool",rr.Either=tr,rr.ForwardsOnly=kr,rr.BackwardsOnly=Er;function gr(){dn.call(this),this.name="Relinking";var a=new di;a.figure="Diamond",a.desiredSize=Mo,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new di,a.figure="Diamond",a.desiredSize=Mo,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new bn}un(gr,dn),gr.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Un){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 Ki;return x.type=$n.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 Ki&&x.adornedPart instanceof Un))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=ai),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=ai),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=Ks),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(){dn.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 qr(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)}Dt.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 Ki))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),gr.className="RelinkingTool",sr("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),sr("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function br(){$i.call(this),this.name="LinkReshaping";var a=new di;a.figure="Rectangle",a.desiredSize=zo,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new di,a.figure="Diamond",a.desiredSize=Mo,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new jt,this.Yq=new Tn}un(br,$i),br.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:Vr},br.prototype.om=function(a,y){a.reshapingBehavior=y},br.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Un){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)}},br.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,b=y.isOrthogonal,E=null;if(y.points!==null&&1<x){E=new Ki,E.type=$n.Link,x=y.firstPickIndex;var te=y.lastPickIndex,ne=b?1:0;if(y.resegmentable&&y.computeCurve()!==Xl)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);en.B(he.x,ge.x)&&en.B(he.y,ge.y)&&(ge=y.i(x-1)),en.B(he.x,ge.x)?(this.om(se,ki),se.cursor="n-resize"):en.B(he.y,ge.y)&&(this.om(se,ci),se.cursor="w-resize")}else ne===te-1&&b?(he=y.i(te-1),ge=y.i(te),en.B(he.x,ge.x)&&en.B(he.y,ge.y)&&(he=y.i(te+1)),en.B(he.x,ge.x)?(this.om(se,ki),se.cursor="n-resize"):en.B(he.y,ge.y)&&(this.om(se,ci),se.cursor="w-resize")):ne!==te&&(this.om(se,Wi),se.cursor="move");E.add(se)}E.adornedObject=a}return E},br.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},br.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},br.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},br.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 Un){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}}},br.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},br.prototype.stopTransaction=function(){var a=this.diagram,y=$i.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},br.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},br.prototype.getResegmentingPoint=function(){return this.handle.ga(Di)},br.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},br.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&&(Xr(this,ne,b,E,te,!0)||Xr(this,ne,b,E,te,!1))){var se=y.points.copy();Xr(this,ne,b,E,te,!0)?(se.cd(x-2,new jt(ne.x,(te.y+ne.y)/2)),se.cd(x+1,new jt(te.x,(te.y+ne.y)/2))):(se.cd(x-2,new jt((te.x+ne.x)/2,ne.y)),se.cd(x+1,new jt((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&&(Xr(this,b,E,te,ne,!0)||Xr(this,b,E,te,ne,!1))&&(se=y.points.copy(),Xr(this,b,E,te,ne,!0)?(se.cd(x-1,new jt(b.x,(b.y+ne.y)/2)),se.cd(x+2,new jt(ne.x,(b.y+ne.y)/2))):(se.cd(x-1,new jt((b.x+ne.x)/2,b.y)),se.cd(x+2,new jt((b.x+ne.x)/2,ne.y))),se.mb(x+1),se.mb(x),y.points=se,y.Wb())}}else ne=jt.alloc(),en.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()),jt.free(ne)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function Xr(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}br.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===ki?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):b===ci&&(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===ki?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):b===ci&&(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);en.B(te.x,E.x)&&en.B(E.y,ne.y)?(en.B(te.x,y.i(b-2).x)&&!en.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),en.B(ne.y,y.i(b+2).y)&&!en.B(ne.x,y.i(b+2).x)?y.m(b+1,ne.x,a.y):y.L(b+1,ne.x,a.y)):en.B(te.y,E.y)&&en.B(E.x,ne.x)?(en.B(te.y,y.i(b-2).y)&&!en.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),en.B(ne.x,y.i(b+2).x)&&!en.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):en.B(te.x,E.x)&&en.B(E.x,ne.x)?(en.B(te.x,y.i(b-2).x)&&!en.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),en.B(ne.x,y.i(b+2).x)&&!en.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):en.B(te.y,E.y)&&en.B(E.y,ne.y)&&(en.B(te.y,y.i(b-2).y)&&!en.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),en.B(ne.y,y.i(b+2).y)&&!en.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,jt.alloc()),b=y.getLinkPointFromPoint(b,E,te,a,!0,jt.alloc()),y.L(0,b.x,b.y),jt.free(te),jt.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,jt.alloc()),a=y.getLinkPointFromPoint(b,E,x,a,!1,jt.alloc()),y.L(y.pointsCount-1,a.x,a.y),jt.free(x),jt.free(a));y.zf()},br.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case Wi:return a;case ki:return new jt(y.i(x).x,a.y);case ci:return new jt(a.x,y.i(x).y);default:case Vr:return y.i(x)}},Dt.Object.defineProperties(br.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 Ki))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}}}),br.prototype.setReshapingBehavior=br.prototype.om,br.prototype.getReshapingBehavior=br.prototype.Ru;var Vr=new yn(br,"None",0),ci=new yn(br,"Horizontal",1),ki=new yn(br,"Vertical",2),Wi=new yn(br,"All",3);br.className="LinkReshapingTool",br.None=Vr,br.Horizontal=ci,br.Vertical=ki,br.All=Wi,sr("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function ti(){$i.call(this),this.name="Resizing",this.o=new Vn(1,1).freeze(),this.j=new Vn(9999,9999).freeze(),this.yg=new Vn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new di;a.alignmentFocus=Di,a.figure="Rectangle",a.desiredSize=zo,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new jt,this.Dw=new Vn,this.Tn=new jt,this.rt=new Vn(0,0),this.qt=new Vn(1/0,1/0),this.pt=new Vn(1,1)}un(ti,$i),ti.prototype.updateAdornments=function(a){if(!(a===null||a instanceof Un)){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)}},ti.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new Ki,y.type=$n.Spot,y.locationSpot=Di;var x=new Ws;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,Wa)),y.add(this.makeHandle(a,Dl)),y.add(this.makeHandle(a,As)),y.add(this.makeHandle(a,tl)),y.add(this.makeHandle(a,ha)),y.add(this.makeHandle(a,Ka)),y.add(this.makeHandle(a,za)),y.add(this.makeHandle(a,Ea))}else if(Su(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},ti.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},ti.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 $n)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},ti.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},ti.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))},ti.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},ti.prototype.stopTransaction=function(){var a=this.diagram,y=$i.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},ti.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},ti.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,jt.alloc()),te=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,te),this.resize(y),a.bd(),jt.free(E)}},ti.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,jt.alloc()),te=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,te),this.resize(y),jt.free(E),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},ti.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 ei){var b=new Tn;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()}},ti.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,Ae=1;if(!te){Ae=ne.width;var Ge=ne.height;0>=Ae&&(Ae=1),0>=Ge&&(Ge=1),Ae=Ge/Ae}return Ge=jt.alloc(),en.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(Ae*a.width,b.height),x.height),a.width=a.height/Ae):(a.width=Math.max(Math.min(a.height/Ae,b.width),x.width),a.height=Ae*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(Ae*a.width,b.height),x.height),a.width=a.height/Ae):(a.width=Math.max(Math.min(a.height/Ae,b.width),x.width),a.height=Ae*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(Ae*a.width,b.height),x.height),a.width=a.height/Ae,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(Ae*a.width,b.height),x.height),a.width=a.height/Ae):(a.width=Math.max(Math.min(a.height/Ae,b.width),x.width),a.height=Ae*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(Ae*a.width,b.height),x.height),a.width=a.height/Ae):(a.width=Math.max(Math.min(a.height/Ae,b.width),x.width),a.height=Ae*a.width))):(a.width=Math.max(Math.min(Ge.x-se,b.width),x.width),te||(a.height=Math.max(Math.min(Ae*a.width,b.height),x.height),a.width=a.height/Ae,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/Ae,b.width),x.width),a.height=Ae*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/Ae,b.width),x.width),a.height=Ae*a.width,a.x=se+.5*(ge-se-a.width))),jt.free(Ge),a},ti.prototype.computeReshape=function(){var a=Fn;return this.adornedObject instanceof di&&(a=Ev(this.adornedObject)),!(a===pr||this.diagram.lastInput.shift)},ti.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},ti.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},ti.prototype.computeCellSize=function(){var a=new Vn(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},Dt.Object.defineProperties(ti.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 Ki))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 Ki)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}}}),ti.className="ResizingTool",sr("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Li(){$i.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new jt,this.ue=null;var a=new di;a.figure="Ellipse",a.desiredSize=Mo,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new jt(NaN,NaN),this.u=0,this.F=50}un(Li,$i),Li.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)}},Li.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new Ki,y.type=$n.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},Li.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},Li.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)},Li.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)},Li.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)},Li.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new jt(NaN,NaN),this.isActive=a.isMouseCaptured=!1},Li.prototype.stopTransaction=function(){var a=this.diagram,y=$i.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Li.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Li.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},Li.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()},Li.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()}},Li.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},Dt.Object.defineProperties(Li.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 Ki))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 Ki)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}}}),Li.className="RotatingTool",sr("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function ho(){$i.call(this),this.name="ClickSelecting"}un(ho,$i),ho.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},ho.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},ho.className="ClickSelectingTool";function ui(){$i.call(this),this.name="Action",this.pk=null}un(ui,$i),ui.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},ui.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()},ui.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))}},ui.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()},ui.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())},ui.prototype.doStop=function(){this.pk=null},ui.className="ActionTool";function Ci(){$i.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new jt(0,0)}un(Ci,$i),Ci.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)},Ci.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},Ci.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 Lr)x.Zc()&&(Su(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);mn(E)&&(y.model.xf(E),b=y.Lc(E))}if(b!==null){var te=jt.allocAt(a.x,a.y);this.isGridSnapEnabled&&Yf(this.diagram,b,a,te),b.location=te,y.allowSelect&&(y.clearSelection(!0),b.isSelected=!0),jt.free(te)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",b)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return b},Dt.Object.defineProperties(Ci.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}}}),Ci.className="ClickCreatingTool";function si(){$i.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new Lr;a.layerName="Tool",a.selectable=!1;var y=new di;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}un(si,$i),si.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))},si.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},si.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},si.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=Vn.alloc().h(y.width,y.height);x.desiredSize=b,this.box.mm(y.x,y.y,!1),Vn.free(b),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},si.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()},si.prototype.computeBoxBounds=function(){var a=this.diagram;return new bn(a.firstInput.documentPoint,a.lastInput.documentPoint)},si.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),Zr?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 Tn,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)}},Dt.Object.defineProperties(si.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}}}),si.className="DragSelectingTool";function zr(){$i.call(this),this.name="Panning",this.Xt=new jt,this.xy=new jt,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(Ut.document,"scroll",a.Kw,!1),a.stopTool()}}un(zr,$i),zr.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())},zr.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(Ut.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},zr.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},zr.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},zr.prototype.doMouseMove=function(){this.move()},zr.prototype.doMouseUp=function(){this.move(),this.stopTool()},zr.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)}},Dt.Object.defineProperties(zr.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),zr.className="PanningTool",sr("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),sr("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),sr("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),sr("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),sr("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function vi(){this.F=this.u=this.j=this.o=null}Dt.Object.defineProperties(vi.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}}}),vi.className="HTMLInfo";function Fi(a,y,x){this.text=a,this.hx=y,this.visible=x}Fi.className="ContextMenuButtonInfo";function Yi(){$i.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new jt,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}un(Yi,$i);function eo(a){var y=new vi;y.show=function(E,te,ne){ne.showDefaultContextMenu()},y.hide=function(E,te){te.hideDefaultContextMenu()},Ao=y,a.tu=function(){a.stopTool()},y=Jn("div");var x=Jn("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=Jn("style");Ut.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",ni,!1),b.addEventListener(y,"selectstart",ni,!1),b.addEventListener(x,"contextmenu",ni,!1)),y.className="goCXforeground",x.className="goCXbackground",Ut.document.body&&(Ut.document.body.appendChild(y),Ut.document.body.appendChild(x)),vo=y,Ta=x,Na=!0}function ni(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 sn||(a instanceof Qt?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($i.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof Ki){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&po(this)},Yi.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof Ki){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}po(this)};function po(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var b=null;x instanceof vi||(b=y.ic(y.lastInput.documentPoint,null,null),b!==null&&b.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(b)}}else a.canStart()&&(wo(a,!0),a.isActive||a.stopTool())}Yi.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function wo(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=Ao,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var b=x.contextMenu;b!==null?(a.currentObject=x instanceof Qt?x:null,a.showContextMenu(b,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof Ki&&!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 Ki){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 vi&&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 Ki?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof vi&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function Qo(a){var y=new Tn;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=Qo(this)),vo.innerHTML="",Ta.addEventListener("pointerdown",this.tu,!1);var y=this,x=Jn("ul");x.className="goCXul",vo.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=Jn("li"),te.className="goCXli";var ne=Jn("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)}}vo.style.display="block",Ta.style.display="block"},Yi.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===Ao){vo.style.display="none",Ta.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(Ta,"pointerdown",this.tu,!1),this.currentContextMenu=null}},Dt.Object.defineProperties(Yi.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof Ki?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return Na===!1&&Ao===null&&ra&&eo(this),Ao},set:function(a){a===null&&(Na=!0),Ao=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var Ao=null,Na=!1,Ta=null,vo=null;Yi.className="ContextMenuTool",sr("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function Gi(){$i.call(this),this.name="TextEditing",this.Zh=new Co,this.ia=null,this.V=Oi,this.vj=null,this.qa=Ni,this.u=1,this.F=!0,this.o=null,this.j=new vi,this.kt=null,Wo(this,this.j)}un(Gi,$i);function Wo(a,y){if(ra){var x=Jn("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(to),b.preventDefault()):E==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Ni){var b=a.kt;a.qa===fo&&(a.qa=Bo),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Ni){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 Gi)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,Ae=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,Ae=se.y*Ae-se.y*he+se.offsetY-(.5*Ae-.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+Ae|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)}}}Gi.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||$s&&$s!==this&&($s.acceptText(is),$s&&$s!==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===Oi&&!y.isSelected||this.starting===Zo&&2>a.lastInput.clickCount)):!1},Gi.prototype.doStart=function(){$s=this,this.textBlock!==null&&this.doActivate()},Gi.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=fo;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var b=new bn(this.textBlock.ga(Wa),this.textBlock.ga(As));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},Gi.prototype.doCancel=function(){this.stopTool()},Gi.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},Gi.prototype.doMouseDown=function(){this.isActive&&this.acceptText(is)},Gi.prototype.acceptText=function(a){switch(a){case is:this.qa===ls?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===fo||this.qa===bs||this.qa===Bo)&&(this.qa=Ro,Aa(this));break;case Sa:case Zi:case to:(Zi!==a||this.textBlock.isMultiline!==!0)&&(this.qa===fo||this.qa===bs||this.qa===Bo)&&(this.qa=Ro,Aa(this))}};function Aa(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))}}Gi.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)},Gi.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},Gi.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Ni,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},Gi.prototype.doStop=function(){$s=null},Gi.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)))},Gi.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},Dt.Object.defineProperties(Gi.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)}}}),Gi.prototype.measureTemporaryTextBlock=Gi.prototype.Lx;var Sa=new yn(Gi,"LostFocus",0),is=new yn(Gi,"MouseDown",1),to=new yn(Gi,"Tab",2),Zi=new yn(Gi,"Enter",3),no=new yn(Gi,"SingleClick",0),Oi=new yn(Gi,"SingleClickSelected",1),Zo=new yn(Gi,"DoubleClick",2),Ni=new yn(Gi,"StateNone",0),fo=new yn(Gi,"StateActive",1),Bo=new yn(Gi,"StateEditing",2),Ro=new yn(Gi,"StateValidating",3),bs=new yn(Gi,"StateInvalid",4),ls=new yn(Gi,"StateValidated",5),$s=null;Gi.className="TextEditingTool",Gi.LostFocus=Sa,Gi.MouseDown=is,Gi.Tab=to,Gi.Enter=Zi,Gi.SingleClick=no,Gi.SingleClickSelected=Oi,Gi.DoubleClick=Zo,Gi.StateNone=Ni,Gi.StateActive=fo,Gi.StateEditing=Bo,Gi.StateValidating=Ro,Gi.StateInvalid=bs,Gi.StateValidated=ls,sr("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function qo(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 na,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)}qo.prototype.Xe=function(a){this.H=a},qo.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===$l&&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),Ut.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Ms(x),Ld(x),a.zb=!1,y.start(),y.bc&&(ua(a),x.Ya(),oc(y,0),ol(x,!0),Za(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 Un&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}tt=qo.prototype,tt.fv=function(a){return this.ce.fv(a)},tt.Xu=function(a){return this.ce.Xu(a)};function ea(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 Qt&&he.diagram!==null||he instanceof sn){se=!0;break e}}se=!1}se?Gl(ne,!1):ne.Xk=!0}}E.pu.clear(),E.bc!==!1&&(ua(E),ol(E.H),Za(E)),Ut.requestAnimationFrame(x)}}var b=a.Ei,E=a;a.bc?a.Sr.add(y):(a.bc=!0,b.add(y),Ut.requestAnimationFrame(function(){x()}))}function ia(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function ua(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 Za(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}tt.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)},tt.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))},tt.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),fa(this,a))},tt.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),fa(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 ko(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function fa(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 jt(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se))}var y=new cr;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 jt(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 jt(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 jt(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 jt(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 bn(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)}),zl=y}Dt.Object.defineProperties(qo.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&&Wn(a,">= 1",qo,"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}}}),qo.prototype.stopAnimation=qo.prototype.Cc;var zl=null,El=!1,eu=new yn(qo,"Default",1),tu=new yn(qo,"AnimateLocations",2),$l=new yn(qo,"None",3);qo.className="AnimationManager",qo.defineAnimationEffect=function(a,y){El||(pl(),El=!0),zl.add(a,y)},qo.Default=eu,qo.AnimateLocations=tu,qo.None=$l;function na(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=ji,this.vc=new cr,this.Tt=new cr,this.yl=new Nn,this.Ut=new Nn,this.dw=xh,a&&Object.assign(this,a)}na.prototype.suspend=function(){this.Xk=!0},na.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,Gl(this,!0),ua(this.Yd),ol(this.H),Za(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}tt=na.prototype,tt.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 sn?a=x:x instanceof Qt&&(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),ua(y),this.yl.each(function(b){b.data=null,a.add(b)}),Za(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,ea(y,this),this)},tt.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},tt.add=function(a,y,x,b,E){if(y==="position"&&x.Xa(b))return this;if(this.H===null&&(a instanceof sn?this.H=a:a instanceof Qt&&a.diagram!==null&&(this.H=a.diagram)),a instanceof Lr){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 sn&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(eh(b),sv(),b=[Zl.j,Zl.u,Zl.o,Zl.F],eh(E),sv(),E=[Zl.j,Zl.u,Zl.o,Zl.F]),ne.contains(y)){var se=ne.I(y),he=se.start,ge=se.end;he[x]===void 0&&(he[x]=pa(b)),ge[x]=pa(E)}else he={},ge={},he[x]=pa(b),ge[x]=pa(E),se=he.position,y instanceof Qt&&se instanceof jt&&!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 jt&&!ne.w()&&ne.assign(a.o),te&&x.indexOf("position:")===0&&y instanceof Lr?se.Ku.location=pa(y.location):te&&(se.Ku[x]=pa(b))}function pa(a){return a instanceof jt||a instanceof Vn?a.copy():a}tt.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},tt.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function Gl(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),ua(x),oc(a,E),ol(a.H,!0),Za(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 Qt&&te.diagram===null)){var ne=b.value,se=E?ne.end:ne.start;ne=E?ne.start:ne.end;var he=zl,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)}}}tt.stop=function(){return this.bc?(this.Ml(!0),this):this},tt.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,ua(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=zl;b.next();){var ne=b.key,se=b.value,he=E?se.end:se.start,ge=E?se.start:se.end,Se=se.Ku,Ae;for(Ae in ge)if(te.get(Ae)!==null){var Ge=Ae;!se.Hu||Ge!=="position:nodeCollapse"&&Ge!=="position:placeholder"||(Ge="position"),te.get(Ge)(ne,he[Ae],Se[Ae]!==void 0?Se[Ae]:se.Hu?he[Ae]:ge[Ae],this.Lp,this.Gd,this.Gd,this)}se.Hu&&Se.location!==void 0&&ne instanceof Lr&&(ne.location=Se.location),se.nv&&ne instanceof Lr&&ne.Zb(!1)}if(y.As.clear(),Kh(y,!1),y.Ya(),y.N(),ol(y,!0),x.defaultAnimation===this){for(Ae=x.pr.iterator;Ae.next();)E=Ae.value,E.Tg!==null&&(E.points=E.Tg,E.Tg=null);x.pr.clear()}ol(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),Za(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())}},tt.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof ei&&(b=y.placeholder),b!==null?(x=b.ga(Wa),b=b.padding,x.x+=b.left,x.y+=b.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new jt(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof ei)for(a=a.memberParts;a.next();)b=a.value,b instanceof nr&&this.Cj(b,y)},tt.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof ei&&(x=y.placeholder),x!==null){var b=x.ga(Wa);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 ei)for(a=a.memberParts;a.next();)b=a.value,b instanceof nr&&this.Aj(b,y)}},tt.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},Dt.Object.defineProperties(na.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Wn(a,">= 1",na,"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:Wt("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}}}),na.prototype.getTemporaryState=na.prototype.Ez,na.prototype.stop=na.prototype.stop,na.prototype.add=na.prototype.add,na.prototype.addTemporaryPart=na.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}na.className="Animation",na.EaseLinear=function(a,y,x,b){return x*a/b+y},na.EaseInOutQuad=nu,na.EaseInQuad=function(a,y,x,b){return x*(a/=b)*a+y},na.EaseOutQuad=function(a,y,x,b){return-x*(a/=b)*(a-2)+y},na.EaseInExpo=function(a,y,x,b){return a===0?y:x*Math.pow(2,10*(a/b-1))+y},na.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||xa,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 Xo(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))}Dt.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 xa=new yn(Tl,"Default",1),us=new yn(Tl,"Immediate",2),wa=new yn(Tl,"Bundled",3);Tl.className="AnimationTrigger",Tl.Default=xa,Tl.Immediate=us,Tl.Bundled=wa;function Ho(a){fi(this),this.H=null,this.Pa=new Tn,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)}tt=Ho.prototype,tt.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},tt.Xe=function(a){this.H=a},tt.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 ei?E++:he instanceof nr?b++:he instanceof Un?te++:he instanceof Ki?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&&zi(b)&&(se+=" #"+zi(b)),x instanceof nr?se+=" "+Gn(b):x instanceof Un&&(se+=" "+Gn(x.fromNode)+" "+Gn(x.toNode));return y+" "+this.Pa.count+": "+se},tt.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=jt.alloc(),te=this.Pa.s,ne=te.length;ne--;){var se=te[ne];if((b!==!0||td(se)!==!1)&&se.isVisible()&&(E.assign(a),gi(E,se.oe),se=se.ic(E,y,x),se!==null&&(y!==null&&(se=y(se)),se!==null&&(x===null||x(se)))))return jt.free(E),se}return jt.free(E),null},tt.ji=function(a,y,x,b){if(y===void 0&&(y=null),x===void 0&&(x=null),b instanceof Tn||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=jt.alloc(),ne=this.Pa.s,se=ne.length;se--;){var he=ne[se];if((E!==!0||td(he)!==!1)&&he.isVisible()){te.assign(a),gi(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 jt.free(te),b},tt.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 Tn||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},tt.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},tt.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 Tn||E instanceof Nn)&&(te=E),E=!0),te instanceof Tn||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=jt.alloc(),he=jt.alloc(),ge=this.Pa.s,Se=ge.length;Se--;){var Ae=ge[Se];if((ne!==!0||td(Ae)!==!1)&&Ae.isVisible()){se.assign(a),gi(se,Ae.oe),he.h(a.x+y,a.y),gi(he,Ae.oe);var Ge=Ae;Ae.og(se,he,x,b,E,te)&&(x!==null&&(Ge=x(Ge)),Ge===null||b!==null&&!b(Ge)||te.add(Ge))}}return jt.free(se),jt.free(he),te},tt.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 Un){if(ne.fd===!1)continue}else if(ne instanceof Ki&&ne.adornedPart!==null)continue;var se=ne.actualBounds;ne.isVisible()&&Io(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]);Ln(a),Ln(E)}}};function vs(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}tt.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=bn.alloc(),he=0;he<b;he++)this.Oj(a,x[he],y,te,ne,se,!0);if(bn.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=bn.alloc(),Se=0;Se<te;Se++){var Ae=E[Se];b.contains(Ae)&&a.Oj(y,Ae,x,se,he,ge,!1)}bn.free(ge),y.globalAlpha=ne}}}tt.Oj=function(a,y,x,b,E,te,ne){if(ne&&!td(y))a.Hs(y);else{if(b!==null&&y instanceof Un&&(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&&(oa(y,a,y.areaBackground,!0,!0,te,E),a.fillRect(E.x,E.y,E.width,E.height)),y.areaBackground===null&&y.background===null&&(oa(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),oa(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))}},tt.g=function(a,y,x,b,E){var te=this.diagram;te!==null&&te.cb(Go,a,this,y,x,b,E)},tt.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},tt.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 ei&&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}Dt.Object.defineProperties(Ho.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===""&&Wt("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&Wt("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)&&Wn(a,"0 <= value <= 1",Ho,"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))}}}),Ho.prototype.findObjectsNear=Ho.prototype.og,Ho.prototype.findObjectsIn=Ho.prototype.Cf,Ho.prototype.findObjectsAt=Ho.prototype.ji,Ho.prototype.findObjectAt=Ho.prototype.ic,Ho.className="Layer";function sn(a,y){if(hm||(Ls(),hm=!0),fi(this),Vu=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,ra){var x=this,b=function(){x.removeEventListener(Ut.document,"DOMContentLoaded",b,!1),x.setRTL()};Ut.document.body!==null?this.setRTL():x.addEventListener(Ut.document,"DOMContentLoaded",b,!1)}this.ol=null,rp.add("Model",uo);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===Go&&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 _o,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"||Ut.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 qo,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new Tn,a.pj=new cr,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new jt(NaN,NaN).freeze(),a.du=new jt(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new jt(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new pi,a.zu=new jt(NaN,NaN).freeze(),a.ut=new bn(NaN,NaN,NaN,NaN).freeze(),a.rj=new Mr(0,0,0,0).freeze(),a.sj=xh,a.nu=!1,a.Zt=null,a.fu=null,a.yh=Is,a.zk=oo,a.Fg=Is,a.pq=oo,a.yt=Wa,a.Bt=Wa,a.Fc=!0,a.pn=!1,a.De=new Nn,a.Eh=new cr,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Mr(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 cr,a.Xn=new Tn,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 Mr(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 Vn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new jt,bounds:new bn,Py:new Vn,bA:new Vn,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new bn(NaN,NaN,NaN,NaN).freeze(),a.wo=new Vn(NaN,NaN).freeze(),a.Sp=new bn(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new cr;var y=new nr,x=new Co;x.bind(new ba("text","",Gn)),y.add(x),a.ny=y,a.Lg.add("",y),y=new nr,x=new Co,x.stroke="brown",x.bind(new ba("text","",Gn)),y.add(x),a.Lg.add("Comment",y),y=new nr,y.selectable=!1,y.avoidable=!1,x=new di,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new Vn(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new cr,y=new ei,y.selectionObjectName="GROUPPANEL",y.type=$n.Vertical,x=new Co,x.font="bold 12pt sans-serif",x.bind(new ba("text","",Gn)),y.add(x),x=new $n($n.Auto),x.name="GROUPPANEL";var b=new di;b.figure="Rectangle",b.fill="rgba(128,128,128,0.2)",b.stroke="black",x.add(b),b=new Ws,b.padding=new Mr(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new cr,y=new Un,x=new di,x.isPanelMain=!0,y.add(x),x=new di,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new Un,x=new di,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new Ki,y.type=$n.Auto,x=new di,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Ws,x.margin=new Mr(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new Ki,y.type=$n.Link,x=new di,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 uo,a.toolManager=new Fo,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=Ji,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 jt,a.zy=500,a.wp=new jt,a.wq=!1}sn.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(),hi=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),te}function Yc(){return null}sn.prototype.reset=function(){this.clear(),this.vb=!0,hf(this),lc(this),this.Wg=!0,Vh(this),this.layout=new _o,this.Wg=!1,this.model=hy(),this.model.undoManager=new Ko,this.vb=this.rn=!1,this.N()},sn.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=Ut.document.body);var y=Jn("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},sn.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=Ut.document.body);var y=0;if(ra){var x=cm;y=Pc,x===null&&(x=cm=Jn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Pc=Jn("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||Zr||(y=11)}this.Db=y,this.Gw=!0},sn.prototype.qb=function(a){a.classType===sn&&(this.autoScale=a)},sn.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(ra){if(y!=null||Wt("Diagram setup requires an argument DIV."),a.Ka!==null&&Wt("Diagram has already completed setup."),typeof y=="string"?a.Ka=Ut.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:Wt("No DIV or DIV id supplied: "+y),a.Ka===null&&Wt("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&Wt("Invalid div id; div already has a Diagram associated with it."),!a.ol&&Ut.ResizeObserver){var x=_n(function(){a.$b()},250);a.ol=new Ut.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}Ut.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=Ut.go;var E=new yu(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",Ut.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,ra){E=Jn("div");var te=Jn("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=_n(function(){a.Yh=null,a.N()},300),a.Ov=_n(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(),Ul(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():Ul(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=Ut.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(),Ul(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=Ut.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 sn&&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(),Ul(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)}}sn.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},sn.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(Ut,"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(),yr&&yr.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}sn.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:Ut.devicePixelRatio||1},sn.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},sn.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},sn.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},sn.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},sn.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},sn.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},sn.prototype.doFocus=function(){this.focus()},sn.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=Ut.scrollX||Ut.pageXOffset,y=Ut.scrollY||Ut.pageYOffset;this.ta.focus(),Ut.scrollTo(a,y)}},sn.prototype.Oy=function(){this.H.R("GainedFocus")},sn.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 Ho;y.name="Background",a.Al(y),y=new Ho,y.name="",a.Al(y),y=new Ho,y.name="Foreground",a.Al(y),y=new Ho,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new Ho,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new Ho,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 $n($n.Grid);y.name="GRID";var x=new di;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new di,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new di,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new di,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new di,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new di,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Lr,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)}sn.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 Ae=E.x;b=E.y;var Ge=E.width,Je=E.height,rt=E.right,ct=E.bottom;E=this.scale;var Bt=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Bt=Bt+a.scrollWidth-a.clientWidth;break;case"reverse":Bt=a.scrollWidth-Bt-a.clientWidth}var Lt=Bt;Ge<he||Je<ge?(Bt=jt.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==Lt&&(Bt.x=Lt/E+ne,this.ju=Lt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Bt.y=a.scrollTop/E+se,this.lu=a.scrollTop),this.position=Bt,jt.free(Bt),this.Ee=this.qr=!1):(Bt=jt.alloc(),a.uy&&this.allowHorizontalScroll&&(ne<Ae&&(this.position=Bt.h(Lt+ne,this.position.y)),Se>rt&&(this.position=Bt.h(-(y.scrollWidth-this.Aa)+Lt-this.Aa/E+Se,this.position.y))),a.vy&&this.allowVerticalScroll&&(se<b&&(this.position=Bt.h(this.position.x,a.scrollTop+se)),te>ct&&(this.position=Bt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/E+te))),jt.free(Bt),this.vd=!0,this.Ee=this.qr=!1,b=this.documentBounds,E=this.viewportBounds,Se=b.right,rt=E.right,te=b.bottom,ct=E.bottom,ne=b.x,Ae=E.x,se=b.y,b=E.y,Ge>=he&&ne>=Ae&&Se<=rt&&(x.style.width="1px"),Je>=ge&&se>=b&&te<=ct&&(x.style.height="1px"))}},sn.prototype.computeBounds=function(a){return a===void 0&&(a=new bn),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}sn.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(Cn(a))for(var b=0;b<a.length;b++){var E=a[b];!y&&E instanceof Un||(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 Un||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds));return x===null?new bn(NaN,NaN,0,0):x};function Hl(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=jt.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var b=a.viewportBounds;b=bn.allocAt(0,0,b.width,b.height);var E=jt.alloc();E.xi(b,a.initialViewportSpot),E.h(x.x-E.x,x.y-E.y),a.position=E,bn.free(b),jt.free(E),jt.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,en.B(te.x,x)&&en.B(te.y,b)&&en.B(te.width,E)&&en.B(te.height,ne)||a.onViewportBoundsChanged(new bn(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===Wl?(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}sn.prototype.zoomToFit=function(){var a=this.sj;this.sj=xh,this.scale=mh(this,Wl),a!==xh&&(Hl(this,!1),pf(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},tt=sn.prototype,tt.BA=function(a,y){y===void 0&&(y=Wl);var x=a.width,b=a.height;if(!(x===0||b===0||isNaN(x)&&isNaN(b))){var E=1;if(y===Wl||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 jt(a.x,a.y)}},tt.Jy=function(a,y){this.Va();var x=this.documentBounds,b=this.viewportBounds;this.position=new jt(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))},tt.zz=function(a){if(a instanceof Qt){this.eq=a;var y=jt.alloc();this.fq=this.op(a.ga(Wa,y)),jt.free(y)}else this.eq=null,this.fq=Ji};function pf(a,y,x,b,E,te){var ne=jt.allocAt(a.pa.x,a.pa.y),se=ne.x,he=ne.y;if(a.eq!==null){var ge=jt.alloc();ge=a.eq.ga(Wa,ge),se=ge.x-a.fq.x/a.scale,he=ge.y-a.fq.y/a.scale,E=aa,jt.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),jt.free(ne)}tt.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 Lr)return a}else if(a=Lu(this,a,function(x){return x.part}),a instanceof Lr)return a;return null},tt.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}tt.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 Lr&&b.canSelect()}:null,x)};function Cc(a,y,x,b,E){for(x===void 0&&(x=null),b===void 0&&(b=null),E instanceof Tn||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}tt.ji=function(a,y,x,b){y===void 0&&(y=null),x===void 0&&(x=null),b instanceof Tn||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},tt.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 Lr&&(!x||E.canSelect())},y,b)},tt.Cf=function(a,y,x,b,E){y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof Tn||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},tt.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 Tn||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}tt.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 Lr&&(!b||te.canSelect())},x,E)},tt.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 Tn||E instanceof Nn)&&(te=E),E=!0),te instanceof Tn||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 Tn||E instanceof Nn)&&(te=E),E=!0),te instanceof Tn||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}sn.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),Zr&&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,Zr&&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 Ul(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}sn.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(),Ul(x,a)},sn.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(),Ul(x,a)},sn.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(),Ul(x,a)},sn.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),Ul(x,a)},sn.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new jt(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?gi(new jt(y,a),this.Ab):new jt(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=jt.allocAt(ne,se),a.Ab.Cd(y),x.documentPoint.assign(y),jt.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))}}sn.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function jd(a){a.ld||cs(a),a.Va()}sn.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},tt=sn.prototype,tt.Pz=function(){return this.kg},tt.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 jt(NaN,NaN),y.isEnabled=x,this.ld=!0;var b=this;a!==null&&Qn(function(){b.ld=!1,Ps(y,"Model"),a(b)},1)},tt.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;Ut.requestAnimationFrame(function(){y.kg&&y.bd()})}},tt.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&&Hl(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];Ia(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=bn.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),bn.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)),Hl(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)}Hl(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 ei&&b.U&65536&&(b.U=b.U^65536)})}}tt.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof ei||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof ei&&x.isVisible()&&ta(this,x);for(a.reset();a.next();)x=a.value,x instanceof Un&&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 Ki&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function ta(a,y){for(var x=pn(),b=pn(),E=y.memberParts;E.next();){var te=E.value;te.isVisible()&&(te instanceof ei?(Vl(te)||Hs(te)||ed(te))&&ta(a,te):te instanceof Un?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(Ln(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();Ln(b)}tt.Fd=function(a,y,x,b){if(this.vd||this.animationManager.isAnimating)for(var E=0;E<y;E++)a[E].Fd(x,b)},tt.gc=function(a){if(this.Ka!==null){if(this.ta===null&&Wt("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&&(pi.prototype.Cd=pi.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&&(pi.prototype.Cd=pi.prototype.Eu),b?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,b=yr&&yr.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 Ma(a,y,x,b,E,te,ne,se,he,ge){if(a.Ka!==null){a.ta===null&&Wt("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 Ae=a.Wa.s,Ge=Ae.length;try{var Je=new bn(te.x,te.y,b.width/E,b.height/E),rt=Je.copy();rt.Co(x),sc(a,rt),cs(a),a.Fd(Ae,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 Bt=pi.alloc();Bt.reset(),Bt.translate(x.left,x.top),Bt.scale(E),te.x===0&&te.y===0||Bt.translate(-te.x,-te.y),y.setTransform(Bt.m11,Bt.m12,Bt.m21,Bt.m22,Bt.dx,Bt.dy),y.yc(),y instanceof Ml&&Xy(y,Bt.m11,Bt.m12,Bt.m21,Bt.m22,Bt.dx,Bt.dy),pi.free(Bt),js(a,y),y.globalAlpha=a.pb;var Lt=a.Qj("Grid");if(ne){var $t=new Nn,Ht=ne.iterator;for(Ht.reset();Ht.next();){var Kt=Ht.value;Kt instanceof Lr&&(ge||Kt.layer!==Lt)&&(Kt.Gj(),$t.add(Kt))}for(ge=0;ge<Ge;ge++)gl(Ae[ge],y,a,$t,he);$t.each(function(ln){return ln.Gj()})}else for($t=0;$t<Ge;$t++){var Yt=Ae[$t];Yt===Lt?ge&&Yt.gc(y,a,!0):Yt.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(Ae,Ge,a,a.viewportBounds),sc(a),a.ib instanceof Ml&&(a.ib.Nj.PA(),a.redraw())}}}tt.Gf=function(a){return this.Rg[a]},tt.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},tt.Tx=function(){this.Rg=new vr,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(Zr||Nr),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))}tt.Ql=function(a){return this.on[a]},tt.sA=function(a,y){this.on[a]=y},tt.Sx=function(){this.on=new vr,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},tt.set=function(a){return Object.assign(this,a),this},tt.Du=function(a){return this.nm(a)},tt.nm=function(a){return ru(this,a),this};function ru(a,y){var x=a instanceof $n,b=a instanceof sn,E;for(E in y){E===""&&Wt("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])),mn(te)?ne=E.substr(se+1):Wt("Unable to find object named: "+he+" in "+a.toString()+" when trying to set property: "+E)}}if(ne[0]!=="_"&&!An(te,ne))if(b&&ne==="ModelChanged"){a.Yw(y[ne]);continue}else if(b&&ne==="Changed"){a.Pe(y[ne]);continue}else if(b&&An(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 Wt('Trying to set undefined property "'+ne+'" on object: '+te.toString());te[ne]=y[E],ne[0]==="_"&&te instanceof Qt&&te.Vw(ne)}}tt.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new cr,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},tt.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")},sn.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=bn.alloc(),Qp(this,this.computeBounds(b)),bn.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),Ae=Math.max(y,0),Ge=Math.floor(E-Se),Je=Math.floor(se-Ae);a.drawImage(b.Oa,Se,Ae,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 rt=Se===0?0:E-Je;Se=jt.allocAt(rt,0),Je=jt.allocAt(Je+rt,se),a.push(new bn(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),gi(Se,ct),gi(Je,ct),b.push(new bn(Math.min(Se.x,Je.x),Math.min(Se.y,Je.y),Math.abs(Se.x-Je.x),Math.abs(Se.y-Je.y))),rt=Ae===0?0:se-Ge,Se.h(0,rt),Je.h(E,Ge+rt),a.push(new bn(Math.min(Se.x,Je.x),Math.min(Se.y,Je.y),Math.abs(Se.x-Je.x),Math.abs(Se.y-Je.y))),gi(Se,ct),gi(Je,ct),b.push(new bn(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 bn(Math.min(Se.x,Je.x),Math.min(Se.y,Je.y),Math.abs(Se.x-Je.x),Math.abs(Se.y-Je.y))),gi(Se,ct),gi(Je,ct),b.push(new bn(Math.min(Se.x,Je.x),Math.min(Se.y,Je.y),Math.abs(Se.x-Je.x),Math.abs(Se.y-Je.y)))),jt.free(Se),jt.free(Je),Ec(this,!1,!0),this.Ka===null&&Wt("No div specified"),this.ta===null&&Wt("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),Ae=ne.Zq,Ae.length=0,Se=this.scale,Ge=bn.alloc(),Je=ne.Pa.s,ct=Je.length,rt=he.length;for(var Bt=0;Bt<ct;Bt++){var Lt=Je[Bt],$t=Vd(Lt,Lt.actualBounds);e:{for(var Ht=2/Se,Kt=4/Se,Yt=0;Yt<rt;Yt++){var ln=he[Yt];if(ln.width!==0&&ln.height!==0&&$t.Vu(ln.x-Ht,ln.y-Ht,ln.width+Kt,ln.height+Kt)){$t=!0;break e}}$t=!1}$t&&ne.Oj(E,Lt,this,Ae,Se,Ge,!0)}bn.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()}Ln(b),Ln(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 Ae=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 rt=a.ku,ct=a.hu;if(a.Ee=!1,!(te||a.gf||a.Be||a.mn||a.nn))return!0;var Bt=a.documentBounds,Lt=0,$t=0,Ht=0,Kt=0,Yt=Se.width,ln=Se.height,er=a.rj;a.contentAlignment.sb()?(Bt.width>Yt&&(Lt=er.left,$t=er.right),Bt.height>ln&&(Ht=er.top,Kt=er.bottom)):(Lt=er.left,$t=er.right,Ht=er.top,Kt=er.bottom);var ur=Bt.width+Lt+$t,or=Bt.height+Ht+Kt;er=a.scale;var Hn=ur>he/er,jn=or>ge/er;if(!(te||a.gf||a.Be||Hn||jn))return!0;Lt=Bt.x-Lt,he=Se.x,$t=Bt.right+$t,ge=Se.right+ne,Ht=Bt.y-Ht;var Qr=Se.y;Bt=Bt.bottom+Kt,Se=Se.bottom+se;var Wr="1px";if(Kt="1px",a.scrollMode===xh&&(Hn||jn)&&(Hn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Hn=1,Lt+1<he&&(Hn=Math.max((he-Lt)*er+a.Aa,Hn)),$t>ge+1&&(Hn=Math.max(($t-ge)*er+a.Aa,Hn)),Yt+ne+1<ur&&(Hn=Math.max((ur-Yt)*er+a.Aa,Hn)),Wr=Hn.toString()+"px"),jn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Hn=1,Ht+1<Qr&&(Hn=Math.max((Qr-Ht)*er+a.ya,Hn)),Bt>Se+1&&(Hn=Math.max((Bt-Se)*er+a.ya,Hn)),ln+se+1<or&&(Hn=Math.max((or-ln)*er+a.ya,Hn)),Kt=Hn.toString()+"px")),Hn=Wr!=="1px",jn=Kt!=="1px",Hn&&jn||!Hn&&!jn||(jn&&(ge-=a.Db),Hn&&(Se-=a.Db),ur<Yt+ne||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ne=1,Lt+1<he&&(ne=Math.max((he-Lt)*er+a.Aa,ne)),$t>ge+1&&(ne=Math.max(($t-ge)*er+a.Aa,ne)),Yt+1<ur&&(ne=Math.max((ur-Yt)*er+a.Aa,ne)),Wr=ne.toString()+"px"),Hn=Wr!=="1px",ne=a.ya,Hn!==a.Be&&(ne=Hn?a.ya-a.Db:a.ya+a.Db),or<ln+se||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(se=1,Ht+1<Qr&&(se=Math.max((Qr-Ht)*er+ne,se)),Bt>Se+1&&(se=Math.max((Bt-Se)*er+ne,se)),ln+1<or&&(se=Math.max((or-ln)*er+ne,se)),Kt=se.toString()+"px"),jn=Kt!=="1px"),a.qr&&Hn===a.Be&&jn===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if(Hn!==a.Be&&(Wr==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),te=!0),a.Be=Hn,ct.style.width=Wr,jn!==a.gf&&(Kt==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),te=!0,a.tn&&(se=jt.alloc(),jn?(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)),jt.free(se))),te&&lc(a),a.gf=jn,ct.style.height=Kt,a.gu=!0,te&&(a.pn=!0),y=rt.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Yt+1<ur?y=(a.position.x-Lt)*er:Lt+1<he?y=rt.scrollWidth-rt.clientWidth:$t>ge+1&&(y=a.position.x*er)),a.tn)switch(a.bu){case"negative":y=-(rt.scrollWidth-y-rt.clientWidth);break;case"reverse":y=rt.scrollWidth-y-rt.clientWidth}return rt.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(ln+1<or?rt.scrollTop=(a.position.y-Ht)*er:Ht+1<Qr?rt.scrollTop=rt.scrollHeight-rt.clientHeight:Bt>Se+1&&(rt.scrollTop=a.position.y*er)),he=a.Aa,ge=a.ya,rt.style.width=he+(a.gf?a.Db:0)+"px",rt.style.height=ge+(a.Be?a.Db:0)+"px",x!==he||b!==ge||a.animationManager.zb?(x=bn.allocAt(E,Ae,Ge,Je),a.onViewportBoundsChanged(x,a.viewportBounds,er,te),bn.free(x),!1):!0}tt=sn.prototype,tt.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&Wt("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&&Wt('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(la,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},tt.oi=function(a){this.partManager.oi(a);var y=this;Ud(a,function(x){Fd(y,x)}),(a instanceof Ki||a instanceof ei&&a.placeholder!==null)&&a.v(),a.data!==null&&Ud(a,function(x){ly(y.partManager,x)}),Hs(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()},tt.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()},tt.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(Oa,"parts",b,y,null,x,null),a=y.layerChanged,a!==null&&a(y,b,null))}tt.Is=function(a,y){if(y===void 0&&(y=!1),Cn(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)},tt.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},sn.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 cr;if(a!==null)if(Cn(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 ei&&(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 Un)for(y.add(x,a.Pd(E,x)),x=x.labelNodes;x.next();)mu(a,y,x.value,b,E);else x instanceof Ki||y.add(x,a.Pd(E,x,x.location))}function ac(a,y,x,b,E){if(y!==null&&y.count!==0){var te=jt.alloc(),ne=jt.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=jt.alloc();ge.next();){var Ae=ge.key,Ge=ge.value;if(Ae.Zc()){var Je=Vp(a,Ae,y);Je!==null?se.push(new oe(Ae,Ge,Je)):(!E||Ae.canMove())&&(Je=Ge.point,te.assign(Je),a.computeMove(Ae,te.add(ne),b,Se),Ae.location=Se,Ge.shifted===void 0&&(Ge.shifted=new jt),Ge.shifted.assign(Se.re(Je)))}else ge.key instanceof Un&&he.push(ge.sa)}for(jt.free(Se),E=se.length,ge=0;ge<E;ge++)Ae=se[ge],te.assign(Ae.info.point),Ae.Su.shifted===void 0&&(Ae.Su.shifted=new jt),Ae.node.location=te.add(Ae.Su.shifted);for(E=jt.alloc(),ge=jt.alloc(),Ae=he.length,Ge=0;Ge<Ae;Ge++){var rt=he[Ge];if(Je=rt.key,Je instanceof Un)if(Je.suspendsRouting){Je.Tg=null,Se=Je.fromNode;var ct=Je.toNode;if(a.draggedLink!==null&&b.dragsLink)if(ct=rt.value.point,Je.dragComputation===null)y.add(Je,a.Pd(b,Je,ne)),Lh(Je,ne.x-ct.x,ne.y-ct.y);else{rt=jt.allocAt(0,0),(Se=Je.i(0))&&Se.w()&&rt.assign(Se);var Bt=Se=jt.alloc().assign(rt).add(ne);b.isGridSnapEnabled&&(b.isGridSnapRealtime||a.lastInput.up)&&(Bt=jt.alloc(),Yf(a,Je,Se,Bt,b)),Se.assign(Je.dragComputation(Je,Se,Bt)).re(rt),y.add(Je,a.Pd(b,Je,Se)),Lh(Je,Se.x-ct.x,Se.y-ct.y),jt.free(rt),jt.free(Se),Bt!==Se&&jt.free(Bt)}else Se!==null&&(E.assign(Se.location),Bt=y.I(Se),Bt!==null&&E.re(Bt.point)),ct!==null&&(ge.assign(ct.location),Bt=y.I(ct),Bt!==null&&ge.re(Bt.point)),Se!==null&&ct!==null?E.Xa(ge)?(Se=rt.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()):(rt=rt.value.point,Se=Se!==null?E:ct!==null?ge:ne,y.add(Je,a.Pd(b,Je,Se)),Lh(Je,Se.x-rt.x,Se.y-rt.y))}else(Je.fromNode===null||Je.toNode===null)&&(Se=rt.value.point,y.add(Je,a.Pd(b,Je,ne)),Lh(Je,ne.x-Se.x,ne.y-Se.y))}jt.free(te),jt.free(ne),jt.free(E),jt.free(ge),Ln(se),Ln(he),x||(cs(a),Xh(a,y))}}sn.prototype.computeMove=function(a,y,x,b){if(b===void 0&&(b=new jt),b.assign(y),a===null)return b;var E=y,te=x.isGridSnapEnabled;te&&(x.isGridSnapRealtime||this.lastInput.up)&&(E=jt.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&&jt.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=jt.allocAt(0,0),te.yi(0,0,a,y,E),en.No(x.x,x.y,se+te.x,ne+te.y,a,y,b),jt.free(te)}}function Jf(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof Un&&(y.suspendsRouting=!0)}function Xh(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof Un&&(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}tt=sn.prototype,tt.Pd=function(a,y,x){if(x===void 0)return new Qc(ji);var b=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(b=!1),b?new Qc(new jt(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&&Wt("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&Wt("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&Wt("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&Wt("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&&Wt("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}tt.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(la,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},tt.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(Oa,"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(la,"layers",this,null,a,null,te),this.N(),0>b&&this.Ya(),this},tt.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(Oa,"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(la,"layers",this,null,a,null,te+1),this.N(),0>b&&this.Ya(),this},tt.kA=function(a){if(a.diagram!==this&&Wt("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(Oa,"layers",this,a,null,x,null),this.N(),this.Ya()}}},tt.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},tt.Yw=function(a){return this.pf===null&&(this.pf=new Tn),this.pf.add(a),this.model.Pe(a),this},tt.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},tt.Pe=function(a){return this.zg===null&&(this.zg=new Tn),this.zg.add(a),this},tt.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},tt.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)},tt.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)},tt.g=function(a,y,x,b,E){this.cb(Go,a,this,y,x,b,E)},sn.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===Go){var E=a.object;if(jo(E,a.propertyName,a.I(y)),E instanceof Qt){var te=E.part;te!==null&&te.Wb()}this.isModified=!0}else if(b===la){var ne=a.object,se=a.newParam,he=a.newValue;if(ne instanceof $n)if(typeof se=="number"&&he instanceof Qt){y?ne.pc(se):ne.Gb(se,he);var ge=ne.part;ge!==null&&ge.Wb()}else typeof se=="number"&&he instanceof Da&&(he.isRow?h1(ne,se,y?void 0:he):d1(ne,se,y?void 0:he));else if(ne instanceof Ho){var Se=a.oldParam===!0;typeof se=="number"&&he instanceof Lr&&(y?(he.isSelected=!1,he.isHighlighted=!1,he.Wb(),ne.pc(Se?se:-1,he,Se)):ne.oi(se,he,Se))}else ne instanceof sn?typeof se=="number"&&he instanceof Ho&&(y?this.Wa.mb(se):(he.Xe(this),this.Wa.Gb(se,he))):Wt("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(b===Oa){var Ae=a.object,Ge=a.oldParam,Je=a.oldValue;if(Ae instanceof $n)typeof Ge=="number"&&Je instanceof Qt?y?Ae.Gb(Ge,Je):Ae.pc(Ge):typeof Ge=="number"&&Je instanceof Da&&(Je.isRow?h1(Ae,Ge,y?Je:void 0):d1(Ae,Ge,y?Je:void 0));else if(Ae instanceof Ho){var rt=a.newParam===!0;typeof Ge=="number"&&Je instanceof Lr&&(y?0>Ae.Pa.indexOf(Je)&&Ae.oi(Ge,Je,rt):(Je.isSelected=!1,Je.isHighlighted=!1,Je.Wb(),Ae.pc(rt?Ge:-1,Je,rt)))}else Ae instanceof sn?typeof Ge=="number"&&Je instanceof Ho&&(y?(Je.Xe(this),this.Wa.Gb(Ge,Je)):this.Wa.mb(Ge)):Wt("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==il&&Wt("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},sn.prototype.Ea=function(a){return this.undoManager.Ea(a)},sn.prototype.eb=function(a){return this.undoManager.eb(a)},sn.prototype.Kf=function(){return this.undoManager.Kf()},sn.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}},sn.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},sn.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(_s)&&(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=jt.allocAt(a.pa.x+se/y-se/x,a.pa.y+he/y-he/x),a.position=te,jt.free(te),a.Ca=x,lc(a),a.vb=!1,a.onViewportBoundsChanged(E,a.viewportBounds,y,!1),Hl(a,!1),b.zb&&(ps(b)||b.ce.add(b.H,"scale",y,a.Ca))}}sn.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 Fo&&(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=Vn.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/en.vx(te,Se):E=E*Se/en.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=bn.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){bn.free(y);return}E=y.width,te=y.height,a=y.x,ne=y.y,bn.free(y)}x.width=E+2*b.width,x.height=te+2*b.height,y=jt.alloc(),en.No(a,ne,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),Vn.free(b),x.part.location=y,jt.free(y)}}sn.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)}},sn.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))},sn.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),Cn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];b instanceof Lr||Wt("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 Lr||Wt("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},sn.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()}},tt=sn.prototype,tt.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},tt.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 Lr||Wt("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},tt.scroll=function(a,y,x){x===void 0&&(x=1);var b=y==="up"||y==="down",E=0,te=jt.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)),jt.free(te);return}Wt("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):Wt("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),jt.free(te)},tt.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)},tt.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},tt.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)},tt.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,Ae=y.dy,Ge=x*ne+b*he+Se;y=x*se+b*ge+Ae;var Je=E*ne+b*he+Se;return a=E*se+b*ge+Ae,b=x*ne+te*he+Se,x=x*se+te*ge+Ae,ne=E*ne+te*he+Se,E=E*se+te*ge+Ae,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 bn(te,Je,Ge-te,y-Je)},tt.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),gi(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 uo}sn.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(),ia(this.animationManager)),!this.Rt&&ne&&this.lastInput.targetDiagram){this.Rt=!0;var se=this;Qn(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}}}}}sn.prototype.Wd=function(){this.partManager.Wd()},sn.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},sn.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},sn.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},sn.prototype.Vb=function(a){return this.partManager.Vb(a)},sn.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},tt=sn.prototype,tt.Lc=function(a){return this.partManager.Lc(a)},tt.ii=function(a){return this.partManager.ii(a)},tt.Kc=function(a){return this.partManager.Kc(a)},tt.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:xi(Si(y)))},tt.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:xi(Si(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),Hl(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}tt.Va=function(){if(this.Zi){var a=bn.alloc();Qp(this,this.computeBounds(a)),bn.free(a)}},tt.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},tt.qz=function(){return this.ai.iterator},tt.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),ta(a,y),E.isValidLayout=!0):a.xh=!0)}}tt.yz=function(){for(var a=new Tn,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 Tn;x.add(E,ne),x.add(te,ne),b.add(E,E),b.add(te,E)}var x=new cr,b=new cr;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;Wt("Unknown DiagramEvent name: "+y)}tt.Bj=function(a,y){return a=qf(this,a),a!==null&&a.add(y),this},tt.am=function(a,y){a=qf(this,a),a!==null&&a.remove(y)},tt.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}tt.Yj=function(a,y){return tp(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},sn.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=bn.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)}bn.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),E.initialize(y)),y=bn.alloc(),te=x.memberParts;te.next();)ne=te.value,ne instanceof nr&&np(a,ne,b,y);bn.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 ei)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)}sn.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=Qn(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=bn.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Qp(a,y),bn.free(y),a.Fc=!0,a.bd(),tg(a))}},a.vp))}sn.prototype.ug=function(){this.vk!==-1&&(Ut.clearTimeout(this.vk),this.vk=-1)},sn.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=bn.allocAt(0,0,b.width*E,b.height*E);var te=jt.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(ji)||(y=new jt(y.x+te.x/E,y.y+te.y/E)),bn.free(b),jt.free(te),y},tt=sn.prototype,tt.Cs=function(){return null},tt.av=function(){return null},tt.bs=function(a,y){this.pj.add(a,y)},tt.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof ei&&(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):Ut.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 Ut.requestAnimationFrame(function(){b()}),null}tt.Wz=function(a){return ra?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},tt.Jx=function(a){return a===void 0&&(a={}),gf(this,this.Xz,a)},tt.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"&&Wt('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"&&Wt("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 Vn(1/0,1/0):new Vn(2e3,2e3));var se=y.position||null,he=y.parts||null,ge=y.padding===void 0?1:y.padding,Se=y.background||null,Ae=y.omitTemporary;Ae===void 0&&(Ae=!0);var Ge=y.document||document,Je=y.elementFinished||null,rt=y.showTemporary;rt===void 0&&(rt=!Ae),y=y.showGrid,y===void 0&&(y=rt),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof ge=="number"?ge=new Mr(ge):ge instanceof Mr||Wt("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),Ae=new yu(null,Ge,void 0,!0);var ct=Ae.context;if(!(E||te||he||se))return Ae.width=a.Aa+Math.ceil(ge.left+ge.right),Ae.height=a.ya+Math.ceil(ge.top+ge.bottom),x==="SVG"?b===null?null:(b.resize(Ae.width,Ae.height,Ae.width,Ae.height),b.ownerDocument=Ge,b.hs=Je,Ma(a,b.context,ge,new Vn(Ae.width,Ae.height),a.Ca,a.pa,he,Se,rt,y),b.context):(a.Xm=!1,Ma(a,ct,ge,new Vn(Ae.width,Ae.height),a.Ca,a.pa,he,Se,rt,y),a.Xm=!0,Ae.context);var Bt=a.Pp,Lt=a.documentBounds.copy();if(Lt.Fv(a.yb),rt)for(var $t=a.Wa.s,Ht=$t.length,Kt=0;Kt<Ht;Kt++){var Yt=$t[Kt];if(Yt.visible&&Yt.isTemporary){Yt=Yt.Pa.s;for(var ln=Yt.length,er=0;er<ln;er++){var ur=Yt[er];ur.isInDocumentBounds&&ur.isVisible()&&(ur=ur.actualBounds,ur.w()&&Lt.ed(ur))}}}if($t=new jt(Lt.x,Lt.y),he!==null){for(Ht=new bn(0,0,0,0),Kt=!0,Yt=he.iterator,Yt.reset();Yt.next();)ln=Yt.value,ln instanceof Lr&&(er=ln.layer,er!==null&&!er.visible||er!==null&&!rt&&er.isTemporary||!ln.isVisible()||(ln=ln.actualBounds,ln.w()&&(Kt?(Kt=!1,Ht.assign(ln)):Ht.ed(ln))));Lt.width=Ht.width,Lt.height=Ht.height,$t.x=Ht.x,$t.y=Ht.y}return se!==null&&se.w()&&($t=se,te||(te=Bt)),Ht=se=0,ge!==null&&(se=ge.left+ge.right,Ht=ge.top+ge.bottom),Kt=Yt=0,E!==null&&(Yt=E.width,Kt=E.height,isFinite(Yt)&&(Yt=Math.max(0,Yt-se)),isFinite(Kt)&&(Kt=Math.max(0,Kt-Ht))),E!==null&&te!==null?(te==="NaN"&&(te=Bt),E.w()?(E=Yt,Lt=Kt):isNaN(Kt)?(E=Yt,Lt=Lt.height*te):(E=Lt.width*te,Lt=Kt)):E!==null?E.w()?(te=Math.min(Yt/Lt.width,Kt/Lt.height),E=Yt,Lt=Kt):isNaN(Kt)?(te=Yt/Lt.width,E=Yt,Lt=Lt.height*te):(te=Kt/Lt.height,E=Lt.width*te,Lt=Kt):te!==null?te==="NaN"&&ne.w()?(te=Math.min((ne.width-se)/Lt.width,(ne.height-Ht)/Lt.height),te>Bt?(te=Bt,E=Lt.width,Lt=Lt.height):(E=ne.width,Lt=ne.height)):(E=Lt.width*te,Lt=Lt.height*te):(te=Bt,E=Lt.width,Lt=Lt.height),ge!==null?(E+=se,Lt+=Ht):ge=new Mr(0),ne!==null&&(Bt=ne.width,ne=ne.height,isNaN(Bt)&&(Bt=2e3),isNaN(ne)&&(ne=2e3),isFinite(Bt)&&(E=Math.min(E,Bt)),isFinite(ne)&&(Lt=Math.min(Lt,ne))),Ae.width=Math.ceil(E),Ae.height=Math.ceil(Lt),x==="SVG"?b===null?null:(b.resize(Ae.width,Ae.height,Ae.width,Ae.height),b.ownerDocument=Ge,b.hs=Je,Ma(a,b.context,ge,new Vn(Math.ceil(E),Math.ceil(Lt)),te,$t,he,Se,rt,y),b.context):(a.Xm=!1,Ma(a,ct,ge,new Vn(Math.ceil(E),Math.ceil(Lt)),te,$t,he,Se,rt,y),a.Xm=!0,Ae.context)}Dt.Object.defineProperties(sn.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,Ut.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,Ut.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(Ut,"resize",this.Ov,!1),this.removeEventListener(Ut,"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)&&Wn(a,"0 <= value <= 1",sn,"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),Hl(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),Hl(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),Hl(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),Hl(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&Wn(a,">= 0",sn,"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&&Wn(a,">= 0",sn,"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 Wn(a,">= 0",sn,"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&&Wt("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(Ut,"pointermove",this.dk,!0),this.addEventListener(Ut,"pointerdown",this.ui,!0),this.addEventListener(Ut,"pointerup",this.fk,!0),this.addEventListener(Ut,"pointerout",this.ek,!0),this.addEventListener(Ut,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(Ut,"wheel",this.$j,!0),this.addEventListener(Ut,"selectstart",this.preventDefault,!1)):(this.removeEventListener(Ut,"pointermove",this.dk,!0),this.removeEventListener(Ut,"pointerdown",this.ui,!0),this.removeEventListener(Ut,"pointerup",this.fk,!0),this.removeEventListener(Ut,"pointerout",this.ek,!0),this.removeEventListener(Ut,"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(Ut,"wheel",this.$j,!0),this.removeEventListener(Ut,"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=jt.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)}jt.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!==$n.Grid&&Wt("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||Wt("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 Mr(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&&Hl(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,Hl(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&&Hl(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()||Wt("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()||Wt("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)):Wn(a,"> 0",sn,"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)):Wn(a,"> 0",sn,"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),Hl(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 Mr(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&&Wt("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!==ja&&a!==ip&&Wt("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 Vn(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 Mr(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),Dt.Object.defineProperties(sn,{licenseKey:{get:function(){return sg.jc()},set:function(a){sg.add(a.replace(/\s/g,""))}},version:{get:function(){return Rd}}}),sn.prototype.makeImageData=sn.prototype.Jx,sn.prototype.makeImage=sn.prototype.Wz,sn.prototype.cacheGroupExternalLinks=sn.prototype.Fu,sn.prototype.addRenderer=sn.prototype.bs,sn.prototype.makeSVG=sn.prototype.av,sn.prototype.makeSvg=sn.prototype.Cs,sn.prototype.stopAutoScroll=sn.prototype.ug,sn.prototype.doAutoScroll=sn.prototype.gs,sn.prototype.isUnoccupied=sn.prototype.Yj,sn.prototype.raiseDiagramEvent=sn.prototype.R,sn.prototype.removeDiagramListener=sn.prototype.am,sn.prototype.addDiagramListener=sn.prototype.Bj,sn.prototype.findTreeRoots=sn.prototype.yz,sn.prototype.layoutDiagram=sn.prototype.Uz,sn.prototype.findTopLevelGroups=sn.prototype.qz,sn.prototype.findTopLevelNodesAndLinks=sn.prototype.rz,sn.prototype.ensureBounds=sn.prototype.Va,sn.prototype.findLinksByExample=sn.prototype.ls,sn.prototype.findNodesByExample=sn.prototype.ms,sn.prototype.findLinkForData=sn.prototype.Kc,sn.prototype.findNodeForData=sn.prototype.ii,sn.prototype.findPartForData=sn.prototype.Lc,sn.prototype.findLinkForKey=sn.prototype.findLinkForKey,sn.prototype.findNodeForKey=sn.prototype.Vb,sn.prototype.findPartForKey=sn.prototype.findPartForKey,sn.prototype.rebuildParts=sn.prototype.Wd,sn.prototype.transformViewToDoc=sn.prototype.Ps,sn.prototype.transformRectDocToView=sn.prototype.zA,sn.prototype.transformDocToView=sn.prototype.op,sn.prototype.centerRect=sn.prototype.es,sn.prototype.scrollToRect=sn.prototype.tv,sn.prototype.scroll=sn.prototype.scroll,sn.prototype.highlightCollection=sn.prototype.Jz,sn.prototype.highlight=sn.prototype.Iz,sn.prototype.selectCollection=sn.prototype.rA,sn.prototype.select=sn.prototype.select,sn.prototype.updateAllRelationshipsFromData=sn.prototype.rp,sn.prototype.updateAllTargetBindings=sn.prototype.updateAllTargetBindings,sn.prototype.commit=sn.prototype.commit,sn.prototype.rollbackTransaction=sn.prototype.Kf,sn.prototype.commitTransaction=sn.prototype.eb,sn.prototype.startTransaction=sn.prototype.Ea,sn.prototype.raiseChanged=sn.prototype.g,sn.prototype.raiseChangedEvent=sn.prototype.cb,sn.prototype.removeChangedListener=sn.prototype.ik,sn.prototype.addChangedListener=sn.prototype.Pe,sn.prototype.removeModelChangedListener=sn.prototype.mA,sn.prototype.addModelChangedListener=sn.prototype.Yw,sn.prototype.findLayer=sn.prototype.Qj,sn.prototype.removeLayer=sn.prototype.kA,sn.prototype.addLayerAfter=sn.prototype.Cy,sn.prototype.addLayerBefore=sn.prototype.Ww,sn.prototype.addLayer=sn.prototype.Al,sn.prototype.moveParts=sn.prototype.moveParts,sn.prototype.copyParts=sn.prototype.Kj,sn.prototype.removeParts=sn.prototype.Is,sn.prototype.remove=sn.prototype.remove,sn.prototype.add=sn.prototype.add,sn.prototype.clearDelayedGeometries=sn.prototype.bx,sn.prototype.setProperties=sn.prototype.nm,sn.prototype.attach=sn.prototype.Du,sn.prototype.set=sn.prototype.set,sn.prototype.resetInputOptions=sn.prototype.Sx,sn.prototype.setInputOption=sn.prototype.sA,sn.prototype.getInputOption=sn.prototype.Ql,sn.prototype.resetRenderingHints=sn.prototype.Tx,sn.prototype.setRenderingHint=sn.prototype.Xx,sn.prototype.getRenderingHint=sn.prototype.Gf,sn.prototype.maybeUpdate=sn.prototype.bd,sn.prototype.requestUpdate=sn.prototype.$b,sn.prototype.delayInitialization=sn.prototype.Xy,sn.prototype.isUpdateRequested=sn.prototype.Pz,sn.prototype.invalidateDocumentBounds=sn.prototype.Ya,sn.prototype.findObjectsNear=sn.prototype.og,sn.prototype.findPartsNear=sn.prototype.mz,sn.prototype.findObjectsIn=sn.prototype.Cf,sn.prototype.findPartsIn=sn.prototype.ux,sn.prototype.findObjectsAt=sn.prototype.ji,sn.prototype.findPartsAt=sn.prototype.lz,sn.prototype.findObjectAt=sn.prototype.ic,sn.prototype.findPartAt=sn.prototype.Ol,sn.prototype.focusObject=sn.prototype.zz,sn.prototype.alignDocument=sn.prototype.Jy,sn.prototype.zoomToRect=sn.prototype.BA,sn.prototype.zoomToFit=sn.prototype.zoomToFit,sn.prototype.diagramScroll=sn.prototype.kx,sn.prototype.focus=sn.prototype.focus;var rp=new cr,cm=null,ra=Ut.document!==void 0,Bd=null,Jh="",Is=new yn(sn,"None",0),Wl=new yn(sn,"Uniform",1),Qh=new yn(sn,"UniformToFill",2),mf=new yn(sn,"CycleAll",10),ng=new yn(sn,"CycleNotDirected",11),rg=new yn(sn,"CycleNotDirectedFast",12),ig=new yn(sn,"CycleNotUndirected",13),og=new yn(sn,"CycleDestinationTree",14),ag=new yn(sn,"CycleSourceTree",15),xh=new yn(sn,"DocumentScroll",1),vf=new yn(sn,"InfiniteScroll",2),wh=new yn(sn,"TreeParentCollapsed",21),ja=new yn(sn,"AllParentsCollapsed",22),ip=new yn(sn,"AnyParentsCollapsed",23),sg=new Tn,Rd="2.3.10",_d="image",yf=null,hm=!1;function Ls(){if(ra){var a=Ut.document.createElement("canvas"),y=a.getContext("2d"),x=hn("7ca11abfd022028846");y[x]=hn("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",wn.Dx+"4ae6247590da4bb21c324ba3a84e385776",pi.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",en.za],E=1;5>E;E++)y[hn("7ca11abfd7330390")](hn(b[E-1]),10,15*E);for(y[x]=hn("39f046ebb36e4b"),x=1;5>x;x++)y[hn("7ca11abfd7330390")](hn(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(pi.prototype.Cd=pi.prototype.Eu),yf=a}}sn.className="Diagram",sn.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=Ut.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof sn?y.H:null},sn.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},sn.useDOM=function(a){ra=a?Ut.document!==void 0:!1},sn.isUsingDOM=function(){return ra},sn.None=Is,sn.Uniform=Wl,sn.UniformToFill=Qh,sn.CycleAll=mf,sn.CycleNotDirected=ng,sn.CycleNotDirectedFast=rg,sn.CycleNotUndirected=ig,sn.CycleDestinationTree=og,sn.CycleSourceTree=ag,sn.DocumentScroll=xh,sn.InfiniteScroll=vf,sn.TreeParentCollapsed=wh,sn.AllParentsCollapsed=ja,sn.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=Ut[hn("76a715b2f73f148a")][hn("72ba13b5")]||"";if(a.Rc=!0,ra){var b=sn[hn("76a115b6ed251eaf4692")];if(b)for(var E=sg.iterator;E.next()&&(b=E.value,b=hn(b).split(hn("39e9")),!(6>b.length));){var te=hn(b[1]).split(".");if(b[4]!=="7da71ca0")break;var ne=hn(wn[hn("6cae19")]).split(".");if(te[0]>ne[0]||te[0]===ne[0]&&te[1]>=ne[1]){var se=Ut[hn("74a900bae4370f8b51")][hn("6fbb13a1c2311e8a57")].toLowerCase();if(ne=se[hn("73a612b6fb191d")](hn("3aad1ab6e022098b4dc4")),te=hn(b[2]),-1<ne&&(se=se[hn("73a612b6fb191d")](te.toLowerCase()+"/"),a.Rc=!(-1<se&&se<ne),!a.Rc))break;for(ne=x[hn("76ad18b4f73e")],se=x[hn("73a612b6fb191d")](hn("35e7"))+2;se<ne;se++)y+=x[se];if(ne=y[hn("73a612b6fb191d")](te),0>ne&&te!==hn("7da71ca0ad381e90")&&(ne=y[hn("73a612b6fb191d")](hn("76a715b2ef3e149757"))),0>ne&&(ne=y[hn("73a612b6fb191d")](hn("76a715b2ef3e149757"))),0>ne&&(ne=y[hn("73a612b6fb191d")](hn("2bfa41fdb3784bca12"))),0>ne&&(ne=x[hn("73a612b6fb191d")](hn("7baa19a6f76c1988428554"))),a.Rc=!(0<=ne&&ne<y[hn("73a612b6fb191d")](hn("35"))||y[hn("73a612b6fb191d")](hn("35"))===-1),!a.Rc||x[hn("73a612b6fb191d")](hn("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[hn("73a612b6fb191d")](te)),!a.Rc)||(ne=Ut[hn("76a715b2f73f148a")][hn("69ad17a1e03e")],se=ne[hn("73a612b6fb191d")](hn("7fb002b6ed25128b4da25b2e")),-1<se&&(a.Rc=!(ne[hn("73a612b6fb191d")](te)>se),!a.Rc)))break;if(te[0]==="#"){ne=Ut.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[hn("79a417a0f0181a8946")]=b,Ut.document[hn("78a712aa")]){Ut.document[hn("78a712aa")][hn("7bb806b6ed32388c4a875b")](ne),he=Ut.getComputedStyle(ne).getPropertyValue(hn("78a704b7e62456904c9b12701b6532a8"));var ge=Ut.getComputedStyle(ne).getPropertyValue(hn("75b817b0ea2202"));if(Ut.document[hn("78a712aa")][hn("68ad1bbcf533388c4a875b")](ne),he){if(ne=Ut[hn("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(hn("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[hn("76ad18b4f73e")],E=x[hn("73a612b6fb191d")](hn("35e7"))+2;E<Se;E++)y+=x[E];x=y[hn("73a612b6fb191d")](hn("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[hn("73a612b6fb191d")](hn("35")))}}}return 0<a.Rc&&a!==a.wy}dm.className="DiagramHelper";function Qc(a){this.j=a===void 0?new jt:a,this.o=new jt}Dt.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 Vn(NaN,NaN).freeze(),this.gridSnapCellSpot=Wa,this.gridSnapOrigin=new jt(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"||Ut.Element&&a instanceof Element)var x=sn.call(this,a)||this;else x=sn.call(this)||this,y=a;return Te(x),y&&x.nm(y),x}un(Me,sn);function Te(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=Pl,a.layout=new ds}Me.prototype.reset=function(){sn.prototype.reset.call(this),Te(this)},Me.className="Palette";function Be(a,y){if(typeof a=="string"||Ut.Element&&a instanceof Element)var x=sn.call(this,a)||this;else x=sn.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 Lr;var E=new di;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 Mr(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new Rt,x.toolManager.mouseMoveTools),x.click=function(){var te=b.observed;if(te!==null){var ne=te.viewportBounds,se=b.lastInput.documentPoint;te.position=new jt(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=Wl,x.vb=!1,y&&Object.assign(x,y),x}un(Be,sn),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),st(this)}finally{this.ta=a,this.ib=y}}}sn.prototype.redraw.call(this)},Be.prototype.gc=function(){if(this.Ka===null&&Wt("No div specified"),this.ta===null&&Wt("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?st(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 st(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=bn.alloc().assign(a.viewportBounds).ed(y.viewportBounds),sc(y,E),bn.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),Ae=he.scale,Ge=bn.alloc(),Je=se.Pa.s,rt=Je.length,ct=0;ct<rt;ct++){var Bt=Je[ct];(b||Bt!==ge)&&se.Oj(E,Bt,he,null,Ae,Ge,!1)}bn.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=Vn.alloc();E.h(x.width,x.height),b.desiredSize=E,Vn.free(E),a=2/a.scale,b instanceof di&&(b.strokeWidth=a),y.location=new jt(x.x-a/2,x.y-a/2),y.isSelected=!0}}}Be.prototype.computeBounds=function(){var a=this.observed;if(a===null)return wi;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))},Dt.Object.defineProperties(Be.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof Be&&Wt("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 Rt(){Vo.call(this),this.j=null}un(Rt,Vo),Rt.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||!a.allowMove||!a.allowSelect)return!1;var y=a.observed;if(y===null)return!1;var x=a.lastInput;return!x.left||a.currentTool!==this&&(!this.isBeyondDragSize()||x.isTouchEvent&&x.timestamp-a.firstInput.timestamp<this.delay)?!1:(this.findDraggablePart()===null&&(x=y.viewportBounds,this.j=new jt(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new jt(a.x-this.j.x,a.y-this.j.y)),!0)},Rt.prototype.doActivate=function(){this.j=null,Vo.prototype.doActivate.call(this)},Rt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},Rt.prototype.moveParts=function(){var a=this.diagram,y=a.observed;if(y!==null){var x=a.box;if(x!==null){if(this.j===null){var b=a.firstInput.documentPoint;x=x.location,this.j=new jt(b.x-x.x,b.y-x.y)}a=a.lastInput.documentPoint,y.position=new jt(a.x-this.j.x,a.y-this.j.y)}}},Rt.className="OverviewDraggingTool";function Ft(){fi(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=wi,this.hb=!0,this.cg=null,this.ob=200}Ft.prototype.toString=function(){return"CommandHandler"},Ft.prototype.Xe=function(a){this.H=a},Ft.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=Zr?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()},Ft.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},Ft.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof Fo&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},Ft.prototype.canStopCommand=function(){return!0},Ft.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=""}},Ft.prototype.canSelectAll=function(){return this.diagram.allowSelect},Ft.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=""}},Ft.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},Ft.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)},Ft.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},Ft.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},Ft.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},Ft.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 Tn,x.addAll(te),Bd=x,Jh=y.model.dataFormat}}y.R("ClipboardChanged",x)},Ft.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},Ft.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 jt(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=""}},Ft.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)},Ft.prototype.undo=function(){this.diagram.undoManager.undo()},Ft.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},Ft.prototype.redo=function(){this.diagram.undoManager.redo()},Ft.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},Ft.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))},Ft.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)},Ft.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))},Ft.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)},Ft.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},Ft.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},Ft.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=wi):(this.Jt=b,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),ts(y)},Ft.prototype.canZoomToFit=function(){return this.diagram.allowZoom},Ft.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=Zt(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 ei)||he.isSubGraphExpanded);)he=E.pop();0<E.length?(he instanceof Lr&&y.tv(he.actualBounds),he instanceof nr&&!he.isTreeExpanded&&(he.isTreeExpanded=!0),he instanceof ei&&!he.isSubGraphExpanded&&(he.isSubGraphExpanded=!0)):(he instanceof Lr&&y.es(he.actualBounds),y.am("LayoutCompleted",ne)),y.eb("Scroll To Part")},ne=function(){Qn(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 Zt(a,y,x){if(y.isVisible())return x;if(y instanceof Ki)Zt(a,y.adornedPart,x);else if(y instanceof Un){var b=y.fromNode;b!==null&&Zt(a,b,x),y=y.toNode,y!==null&&Zt(a,y,x)}else y instanceof nr&&(b=y.labeledLink,b!==null&&Zt(a,b,x),b=y.pg(),b!==null&&(b.isTreeExpanded||b.wasTreeExpanded||x.push(b),Zt(a,b,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),Zt(a,y,x));return x}Ft.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof Lr)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},Ft.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 Tn;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")}},Ft.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},Ft.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 Tn;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")}},Ft.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},Ft.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 Tn,te=a.selection.iterator;te.next();){var ne=te.value;ne.Zc()&&ne.canGroup()&&E.add(ne)}for(var se=new Tn,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 Ae=se.first().containingGroup;if(Ae!==null)for(;Ae!==null;){E=!1;for(var Ge=se.iterator;Ge.next();)if(!Ge.value.Td(Ae)){E=!0;break}if(E)Ae=Ae.containingGroup;else break}if(x instanceof ei)Su(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var Je=y.copyNodeData(x);mn(Je)&&(y.xf(Je),b=a.ii(Je))}if(b!==null){Ae!==null&&this.isValidMember(Ae,b)&&(b.containingGroup=Ae);for(var rt=se.iterator;rt.next();){var ct=rt.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=""}}}},Ft.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 Sn(a){var y=pn();for(a=a.iterator;a.next();){var x=a.value;x instanceof Un||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 Ln(y),a}Ft.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof Un)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},Ft.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 Tn;if(a!==null)b.add(a);else for(var E=y.selection.iterator;E.next();){var te=E.value;te instanceof ei&&te.canUngroup()&&b.add(te)}var ne=new Tn;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 Ae=ne.iterator;Ae.next();){var Ge=Ae.value;if(Ge.isSelected=!0,!(Ge instanceof Un)){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=""}},Ft.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 ei))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof ei&&y.canUngroup())return!0;return!1},Ft.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=Sn(a).iterator;a.next();){var b=a.value;b.containingGroup!==null&&(!y||this.isValidMember(null,b)?b.containingGroup=null:x=!1)}return x},Ft.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 Tn;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 ei&&E.isSubGraphExpanded&&(E.collapseSubGraph(),x.add(E))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},Ft.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof ei&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof ei&&y.isSubGraphExpanded)return!0;return!1},Ft.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 Tn;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 ei&&!E.isSubGraphExpanded&&(E.expandSubGraph(),x.add(E))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},Ft.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof ei&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof ei&&!y.isSubGraphExpanded)return!0;return!1},Ft.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)}},Ft.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},Ft.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 Qt?E=a.ga(Di):y.viewportBounds.ca(b.documentPoint)||(E=y.viewportBounds,E=new jt(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,wo(x,!1,a)}},Ft.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)},Ft.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 cr,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 Un&&(y=a.fromNode,y===null||b.contains(y)?(y=a.toNode,y===null||b.contains(y)||b.remove(a)):b.remove(a));return b},Dt.Object.defineProperties(Ft.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||Wt("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}}}),Ft.className="CommandHandler",Yc=function(){return new Ft};function Qt(){fi(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new jt(NaN,NaN).freeze(),this.jd=Jo,this.Ab=new pi,this.wh=new pi,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=Cs,this.uc=new bn(NaN,NaN,NaN,NaN).freeze(),this.Ib=new bn(NaN,NaN,NaN,NaN).freeze(),this.dc=new bn(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=oo,this.Ag=this.io=0,this.V=this.tb=this.Dh=this.A=this.Ua=null,this.Uc=!1,this.jo=this.Ng=null}var zn,Fn,pr,Pr,Ir,ri,Mi,yi,Bi,mo;Qt.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=tn(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},Qt.prototype.Vw=function(a){var y=this.Dh;if(Cn(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},Qt.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},Qt.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},Qt.prototype.copy=function(){return this.clone()},tt=Qt.prototype,tt.qb=function(a){a.classType===Un?a.name.indexOf("Orient")===0?this.segmentOrientation=a:Wt("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===Qt&&(this.stretch=a)},tt.toString=function(){return Mn(this.constructor)+"#"+zi(this)},tt.th=function(){this.A!==null&&(this.A.nc=!0)};function mi(a){a.A===null?a.A=new wf:a.A.nc&&(a.A=a.A.copy())}tt.Xc=function(){if(this.ba===null){var a=new lg;a.Xi=aa,a.yj=aa,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},tt.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===Go&&ys(this)&&Oo(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 cr),ne=te.undoManager.transactionLevel===0,a.startCondition===us?ne=!0:a.startCondition===wa&&(ne=!1),ne?(te=new na,Xo(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 $n&&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 $n&&Ud(se,function(he){he.data!==null&&he.l&16777216&&he.La(y)})};function Oo(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))}}tt.ks=function(a){return this.bindingId===a?this:null},tt.g=function(a,y,x){this.cb(Go,a,this,y,x)},tt.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 pi);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),te.pp(E)}};function Ya(a,y,x,b){return a.pickable===!1?!1:(b.multiply(a.transform),x?a.Yc(y,b):a.fh(y,b))}tt.tx=function(a,y,x){if(this.pickable===!1)return!1;var b=this.naturalBounds;return y=a.Bf(y),x?Vi(a.x,a.y,0,0,0,b.height)<=y||Vi(a.x,a.y,0,b.height,b.width,b.height)<=y||Vi(a.x,a.y,b.width,b.height,b.width,0)<=y||Vi(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},tt.se=function(){return!0},tt.ca=function(a){var y=jt.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return jt.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=No(x.x-ne*he,x.y-ne*he,x.width+te*he,x.height+te*he,y.x,y.y),jt.free(y),a}return E=!1,(this instanceof Ki||this instanceof di?No(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)),jt.free(y),E},tt.gh=function(a){var y=this.naturalBounds;return No(0,0,y.width,y.height,a.x,a.y)},tt.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=bn.allocAt(0,0,y.width,y.height);var x=this.transform,b=!1,E=jt.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)))),jt.free(E),bn.free(y),b},tt.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,b=!1,E=jt.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)))),jt.free(E),b},tt.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,b=jt.allocAt(0,0),E=jt.allocAt(0,x.height),te=jt.allocAt(x.width,x.height),ne=jt.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=bn.allocAt(0,0,x.width,x.height);var he=jt.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)))),jt.free(he),bn.free(x),!se&&(en.us(a,b,E)||en.us(a,E,te)||en.us(a,te,ne)||en.us(a,ne,b))&&(se=!0)}return jt.free(b),jt.free(E),jt.free(te),jt.free(ne),se},tt.ga=function(a,y){if(y===void 0&&(y=new jt),a instanceof Sr){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},tt.mi=function(a){a===void 0&&(a=new bn);var y=this.naturalBounds,x=this.oe,b=jt.allocAt(0,0).transform(x);return a.h(b.x,b.y,0,0),b.h(y.width,0).transform(x),qi(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),qi(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),qi(a,b.x,b.y,0,0),jt.free(b),a},tt.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},tt.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},tt.qs=function(a,y){return y===void 0&&(y=new jt),y.assign(a),this.oe.Cd(y),y},tt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},tt.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,Ae=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,en.Ff(te.left,te.top,te.right,te.bottom,a,y,x,b,E)):(ne=a*se+y*ge+Ae,a=a*he+y*Se+Ge,y=x*se+b*ge+Ae,x=x*he+b*Se+Ge,E.h(0,0),b=this.naturalBounds,x=en.Ff(0,0,b.width,b.height,ne,a,y,x,E),E.transform(te),x)},Qt.prototype.measure=function(a,y,x,b){if(Vl(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 $n;switch(sl(this,!0)){case Fn:ne=E=0,se&&(y=a=1/0);break;case zn:isFinite(a)&&a>x&&(E=a),isFinite(y)&&y>b&&(ne=y);break;case Pr:isFinite(a)&&a>x&&(E=a),ne=0,se&&(y=1/0);break;case Ir: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()||Wt("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),Ia(this,!1)}},Qt.prototype.Wl=function(){},Qt.prototype.Dd=function(){return!1},Qt.prototype.arrange=function(a,y,x,b,E){this.Uk();var te=bn.alloc();te.assign(this.Ib),this.Ib.ka(),Hs(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()||Wt("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(te,this.Ib),Mc(this,!1),bn.free(te)},tt=Qt.prototype,tt.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=Fn),y){case Fn:(x>b||te>E)&&(Ia(a,!0),a.measure(x>b?b:x,te>E?E:te,0,0));break;case zn:Ia(a,!0),a.measure(b,E,0,0);break;case Pr:Ia(a,!0),a.measure(b,te,0,0);break;case Ir:Ia(a,!0),a.measure(x,E,0,0)}}}tt.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(),So(a,y)||(x.oh(),this.Pn(x)))},tt.Pn=function(a){this.portId!==null&&(_v(a,!0),a instanceof nr&&U1(a,this))},tt.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 $n&&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&&(oa(this,a,ge,!0,!0,he,se),ge instanceof so&&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&&(oa(this,a,Se,!0,!1,he,se),Se instanceof so&&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 Ae=0;ge&&y.Gf("drawShadows")&&(he=ge.isShadowed)&&(Se=ge.shadowOffset,Ae=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 rt=Ge.m11,ct=Ge.m21,Bt=Ge.dx,Lt=Ge.m12,$t=Ge.m22,Ht=Ge.dy,Kt,Yt=Kt=0;Ge=Kt*rt+Yt*ct+Bt;var ln=Kt*Lt+Yt*$t+Ht;Kt=Je.width+Ae,Yt=0;var er=Kt*rt+Yt*ct+Bt;Kt=Kt*Lt+Yt*$t+Ht,Yt=Math.min(Ge,er);var ur=Math.min(ln,Kt),or=Math.max(Ge+0,er)-Yt,Hn=Math.max(ln+0,Kt)-ur;Ge=Yt,ln=ur,Kt=Je.width+Ae,Yt=Je.height+Ae,er=Kt*rt+Yt*ct+Bt,Kt=Kt*Lt+Yt*$t+Ht,Yt=Math.min(Ge,er),ur=Math.min(ln,Kt),or=Math.max(Ge+or,er)-Yt,Hn=Math.max(ln+Hn,Kt)-ur,Ge=Yt,ln=ur,Kt=0,Yt=Je.height+Ae,er=Kt*rt+Yt*ct+Bt,Kt=Kt*Lt+Yt*$t+Ht,Yt=Math.min(Ge,er),ur=Math.min(ln,Kt),or=Math.max(Ge+or,er)-Yt,Hn=Math.max(ln+Hn,Kt)-ur,Ge=Yt,ln=ur,Ae=y.viewportBounds,Je=Ae.x,rt=Ae.y,Ge=!(Ge>Ae.width+Je||Je>or+Ge||ln>Ae.height+rt||rt>Hn+ln)}if(Ge){if(Ge=(this.l&256)!==0,a.clipInsteadOfFill&&(Ge=!1),this instanceof Co&&(a.font=this.font),Ge){if(ln=se.se()?se.naturalBounds:se.actualBounds,or=Math.max(ne.x,ln.x),Hn=Math.max(ne.y,ln.y),Ae=Math.min(ne.right,ln.right)-or,Je=Math.min(ne.bottom,ln.bottom)-Hn,rt=this.tb,rt!==null&&(or=rt.x,Hn=rt.y,Ae=rt.width,Je=rt.height),or>ne.width+ne.x||ne.x>ln.width+ln.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect(or,Hn,Ae,Je),a.clip()}if(Se){if(!ge.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}he&&(ln=ge.shadowOffset,a.Ev(ln.x*y.scale*this.scale*y.Mb,ln.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(),Kl(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 $n)),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===$n.Auto||y.type===$n.Spot)&&y.Pb()!==a)}tt.Dv=function(){};function Kl(a,y,x,b){oa(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof so&&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;oa(a,y,a.Ma,!0,!1,x,b),a.Ma instanceof so&&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===$n.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 $n;var se=a instanceof $n?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],Kl(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)}tt.$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"+Lo++,se=a.Ud("clipPath",{id:te}),y=a.Ud("rect",{x:y,y:E,width:ne,height:x}),this instanceof $n&&(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=Si(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()}}tt.hh=function(){},tt.lv=function(){this.Uc=!0},tt.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 $n?Ch(this):!1;if(!(this instanceof $n&&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 $n)y.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");else if(this instanceof di){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],Kl(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 $n))&&(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},tt.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 oa(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 Ae=0,Ge=0,Je=0,rt=0,ct=0,Bt=0;if(Bt=ct=0,E?(ct=ne.x,Bt=ne.y):b||(ct-=ge/2,Bt-=ge/2),Ae=x.start.x*se+x.start.offsetX,Ge=x.start.y*he+x.start.offsetY,Je=x.end.x*se+x.end.offsetX,rt=x.end.y*he+x.end.offsetY,Ae+=ct,Je+=ct,Ge+=Bt,rt+=Bt,x.type===th)Se=y.createLinearGradient(Ae,Ge,Je,rt);else if(x.type===lu)Bt=isNaN(x.endRadius)?Math.max(se,he)/2:x.endRadius,isNaN(x.startRadius)?(ct=0,Bt=Math.max(se,he)/2):ct=x.startRadius,Se=y.createRadialGradient(Ae,Ge,ct,Je,rt,Bt);else if(x.type===hp)try{Se=y.createPattern(x.pattern,"repeat")}catch($t){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 Lt=a.diagram;Lt!==null&&x.yk===-1&&Qn(function(){Lt.redraw()},600)}}b?y.fillStyle=Se:y.strokeStyle=Se}}}tt.rg=function(a){if(a instanceof $n)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},tt.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},tt.If=function(){for(var a=this instanceof $n?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)))}tt.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var te=jt.alloc();te.yi(y,x,b,E,Di),a.rotate(this.Kb,te.x,te.y),jt.free(te)}},tt.v=function(a){if(!Vl(this)){a===void 0&&(a=!1),Ia(this,!0),Mc(this,!0);var y=this.panel;y===null||a||y.v()}},tt.Uj=function(){Vl(this)||(Ia(this,!0),Mc(this,!0))};function Gs(a){if(!Hs(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)}}tt.Uk=function(){!(this.l&2048)&&(vu(this,!0),au(this,!0))},tt.Wu=function(){au(this,!0)},tt.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===$n.Table?Zu(a,b.Fb(a.row),b.Eb(a.column),y):b!==null&&b.type===$n.Auto&&b.Pb()===a?as(a,zn,y):x===ri?b!==null?b.type===$n.Spot&&b.Pb()===a?as(a,zn,y):(x=b.defaultStretch,x===ri?as(a,Fn,y):as(a,x,y)):as(a,Fn,y):as(a,x,y)}function Zu(a,y,x,b){var E=a.stretch;if(E!==ri)return as(a,E,b);var te=E=null;switch(y.stretch){case Ir:te=!0;break;case zn:te=!0}switch(x.stretch){case Pr:E=!0;break;case zn:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===Pr||y===zn),te===null&&(te=y===Ir||y===zn),E===!0&&te===!0?as(a,zn,b):E===!0?as(a,Pr,b):te===!0?as(a,Ir,b):as(a,Fn,b)}function as(a,y,x){if(x)return y;if(y===Fn||(x=a.desiredSize,x.w()))return Fn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===Pr)return Fn;if(y===zn)return Ir}else{if(y===Ir)return Fn;if(y===zn)return Pr}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===Ir)return Fn;if(y===zn)return Pr}else{if(y===Pr)return Fn;if(y===zn)return Ir}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 Vl(a){return(a.l&8192)!==0}function Ia(a,y){a.l=y?a.l|8192:a.l&-8193}function Hs(a){return(a.l&16384)!==0}function Mc(a,y){a.l=y?a.l|16384:a.l&-16385}tt.Gj=function(){this.svg=null},tt.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},tt.Av=function(){},tt.zv=function(a){return this.pa=a,Gs(this),!0},tt.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},tt.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 $n?a instanceof nr?a.Bd():a.qm(a,function(x){$d(x)}):$d(a))}tt.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new ba(a,y,x,b):E=a,E.xd=this,a=this.ih(),a!==null&&f1(a)&&Wt("Cannot add a Binding to a template that has already been copied: "+E),this.localBindings===null&&(this.localBindings=new Tn),this.localBindings.add(E),this},tt.set=function(a){return Object.assign(this,a),this},tt.Du=function(a){return rv(this,a),this},tt.apply=function(a){return a(this),this},tt.nm=function(a){return ru(this,a),this},tt.pz=function(){return this.ih()},tt.ih=function(){for(var a=this instanceof $n?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},tt.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new cr),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=tn(arguments),b=te(x),mn(b)||Wt('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=Ut.go[a]}if(b===null&&(E!=null&&E.constructor||Wt("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 sn&&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?Wt("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 di)a.figure=y;else if(a instanceof ul)a.source=y;else if(a instanceof $n)y=Ou.I(y),y!==null&&(a.type=y);else if(a instanceof so){var x=Yn(so,y);x!==null?a.type=x:Wt("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof Zn?(y=Yn(Zn,y),y!==null&&(a.type=y)):a instanceof Ui&&(y=Yn(Ui,y),y!==null&&(a.type=y));else if(y instanceof Qt)a instanceof $n||Wt("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof Da){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 Da?Nm(b,y):Wt("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof yn)typeof a.qb=="function"&&a.qb(y);else if(y instanceof Ha)a.type=y;else if(y instanceof ba)a instanceof Qt||a instanceof Da?a.bind(y):Wt("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof Tl)a instanceof Qt?a.Jv(y):Wt("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof $a)a instanceof Zn&&a.type===Zn.o?a.figures.add(y):Wt("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof Ui)a instanceof $a?a.segments.add(y):Wt("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof _o)a instanceof sn||a instanceof ei?a.layout=y:Wt("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 so){x=new vr;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 Da){y.row!==void 0?(E=y.row,(E==null||E===1/0||isNaN(E)||0>E)&&Wt("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)&&Wt("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new vr;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);ru(a,E)}else ru(a,y);else Wt('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}Dt.Object.defineProperties(Qt.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&&(mi(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&&(mi(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:Ks},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===Ks&&(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:ji},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:ri},set:function(a){var y=this.stretch;y!==a&&(mi(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&&(mi(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)&&Wn(a,"0 <= value <= 1",Qt,"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 so&&a.freeze(),mi(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 so&&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 Lr)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 jt(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&&Wt("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 di&&this.qc(),this.g("desiredSize",b,a),ys(this)&&(a=this.part,a!==null&&(Oo(this,a,"width"),Oo(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 Vn(a,this.jd.height).freeze(),this.v(),this instanceof di&&this.qc(),this.g("desiredSize",y,a),ys(this)&&(a=this.part,a!==null&&Oo(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 Vn(this.jd.width,a).freeze(),this.v(),this instanceof di&&this.qc(),this.g("desiredSize",y,a),ys(this)&&(a=this.part,a!==null&&Oo(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:ai},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(),mi(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:ca},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(),mi(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 Mr(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&&(mi(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:Fn},set:function(a){this.reshapingBehavior!==a&&(mi(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()&&Wt("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),Gs(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&&Wn(a,">= 0",Qt,"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&&Wn(a,">= 1",Qt,"columnSpan"),mi(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&&Wn(a,">= 0",Qt,"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&&Wn(a,">= 1",Qt,"rowSpan"),mi(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&&(mi(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||Wt("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:aa},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&&Wn(a,">= 0",Qt,"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&&Wn(a,">= 0",Qt,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:aa},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&&Wn(a,">= 0",Qt,"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&&Wn(a,">= 0",Qt,"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&&(mi(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&&(mi(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&&(mi(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&&(mi(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&&(mi(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&&(mi(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&&(mi(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&&(mi(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&&(mi(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&&(mi(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&&(mi(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&&(mi(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&&(mi(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&&(mi(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&&(mi(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&&(mi(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&&(mi(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&&(mi(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),Qt.prototype.trigger=Qt.prototype.Jv,Qt.prototype.findBindingPanel=Qt.prototype.ih,Qt.prototype.findTemplateBinder=Qt.prototype.pz,Qt.prototype.setProperties=Qt.prototype.nm,Qt.prototype.apply=Qt.prototype.apply,Qt.prototype.attach=Qt.prototype.Du,Qt.prototype.set=Qt.prototype.set,Qt.prototype.isEnabledObject=Qt.prototype.If,Qt.prototype.isVisibleObject=Qt.prototype.Ed,Qt.prototype.isContainedBy=Qt.prototype.rg,Qt.prototype.getNearestIntersectionPoint=Qt.prototype.rs,Qt.prototype.getLocalPoint=Qt.prototype.qs,Qt.prototype.getDocumentScale=Qt.prototype.Df,Qt.prototype.getDocumentAngle=Qt.prototype.li,Qt.prototype.getDocumentBounds=Qt.prototype.mi,Qt.prototype.getDocumentPoint=Qt.prototype.ga,Qt.prototype.intersectsRect=Qt.prototype.Yc,Qt.prototype.containedInRect=Qt.prototype.fh,Qt.prototype.containsRect=Qt.prototype.Re,Qt.prototype.containsPoint=Qt.prototype.ca,Qt.prototype.raiseChanged=Qt.prototype.g,Qt.prototype.raiseChangedEvent=Qt.prototype.cb,Qt.prototype.addCopyProperty=Qt.prototype.Vw;var op=null;Qt.className="GraphObject",op=new cr,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($n,$n.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof $n){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(di,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Sr(0,0,2.76142374915397,2.761423749153969),spot2:new Sr(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 $n&&(x=b.fb("ButtonBorder"),x instanceof di)){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 $n&&(x=b.fb("ButtonBorder"),x instanceof di&&(x.fill=b._buttonFillNormal,x.stroke=b._buttonStrokeNormal))},y.actionDown=function(x,b){if(b.If()&&b instanceof $n&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof di){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 $n&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof di){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 $n&&b._buttonFillPressed!==null){var E=b.fb("ButtonBorder");if(E instanceof di){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 $n&&b._buttonFillPressed!==null){var E=x.diagram;if(E.firstInput.button===0&&(E.currentTool.standardMouseOver(),a(x,b)&&(x=b.fb("ButtonBorder"),x instanceof di))){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(di,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Mo},new ba("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new ba("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof Ki&&(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(di,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Mo},new ba("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 Ki&&(x=x.adornedPart),x instanceof ei){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(Ki,$n.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new jt(0,3),shadowBlur:5},su(di,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new Sr(0,0,4,6),spot2:new Sr(1,1,-4,-4)}))}),bh("ContextMenu",function(){return su(Ki,$n.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new jt(0,3),shadowBlur:5},new ba("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),bh("ContextMenuButton",function(){var a=su("Button");a.stretch=Pr;var y=a.fb("ButtonBorder");return y instanceof di&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new Sr(0,0,2,3),y.spot2=new Sr(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(di,{name:"ButtonIcon",strokeWidth:2},new ba("geometryString","visible",function(b){return b?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof di&&(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 Vn(14,14)},su(di,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:zn,geometryStretch:pr,visible:!1},y!==""?new ba("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof $n){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 Mr(0,1,0,0)});var y=su($n,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Mr(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}),Qt.None=Fn=new yn(Qt,"None",0),Qt.Default=ri=new yn(Qt,"Default",0),Qt.Vertical=Ir=new yn(Qt,"Vertical",4),Qt.Horizontal=Pr=new yn(Qt,"Horizontal",5),Qt.Fill=zn=new yn(Qt,"Fill",3),Qt.Uniform=pr=new yn(Qt,"Uniform",1),Qt.UniformToFill=Mi=new yn(Qt,"UniformToFill",2),Qt.FlipVertical=yi=new yn(Qt,"FlipVertical",1),Qt.FlipHorizontal=Bi=new yn(Qt,"FlipHorizontal",2),Qt.FlipBoth=mo=new yn(Qt,"FlipBoth",3),Qt.make=su,Qt.getBuilders=function(){var a=new cr,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},Qt.defineBuilder=bh,Qt.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 Qt))return y&&b.set(y),b;Wt('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},Qt.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=ai,this.o=ca,this.hg=ri,this.ob=this.Bi=1,this.Pf=Fn,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=ji,this.rr=Ks,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=oo,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}lg.prototype.copy=function(){var a=new lg;return a.Xi=this.Xi.J(),a.yj=this.yj.J(),a.Vi=this.Vi,a.wj=this.wj,a.Wi=this.Wi,a.xj=this.xj,a.hq=this.hq,a.Tr=this.Tr,a.iq=this.iq,a.Ur=this.Ur,a},lg.className="LinkSettings";function 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?Ut.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),mn(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},Dt.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=Lo++,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+")")}tt=Ml.prototype,tt.arc=function(a,y,x,b,E,te,ne,se){var he=2*Math.PI,ge=he-1e-6,Se=x*Math.cos(b),Ae=x*Math.sin(b),Ge=a+Se,Je=y+Ae,rt=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,rt,a-Se,y-Ae]),this.path.push(["A",x,x,0,1,rt,Ge,Je])):1e-6<b&&this.path.push(["A",x,x,0,+(b>=Math.PI),rt,a+x*Math.cos(E),y+x*Math.sin(E)])},tt.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},tt.Se=function(a){this.addPath(this.path,this.rb,a||0)},tt.bezierCurveTo=function(a,y,x,b,E,te){this.path.push(["C",a,y,x,b,E,te])},tt.clearRect=function(){},tt.clip=function(){this.Yl.clipPath=!0},tt.closePath=function(){this.path.push(["z"])},tt.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},tt.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"+Lo++,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+")"},tt.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)}tt.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},en.$(b,se)&&en.$(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)},tt.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),iv(this,this.Yl)},tt.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},tt.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)},tt.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))},tt.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])},tt.lineTo=function(a,y){this.path.push(["L",a,y])},tt.moveTo=function(a,y){this.path.push(["M",a,y])},tt.quadraticCurveTo=function(a,y,x,b){this.path.push(["Q",a,y,x,b])},tt.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"])},tt.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},tt.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())},tt.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]+")"}tt.scale=function(a,y){this.rb.scale(a,y)},tt.translate=function(a,y){this.rb.translate(a,y)},tt.transform=function(){},tt.yc=function(){},tt.stroke=function(){qy(this,this.Yl)},tt.jk=function(){this.clipInsteadOfFill||this.stroke()},tt.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},tt.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"+Lo++,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+")"}tt.addPath=function(a,y,x){for(var b=[],E=0;E<a.length;E++){var te=tn(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}tt.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}tt.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},tt.fs=function(){this.Ct=!1},tt.Vc=function(){},tt.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",sn.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new uc(this,Ut.document));var y=new uc(this,Ut.document,!0);a===void 0&&(a=new vr);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)},sn.prototype.makeSvg=sn.prototype.Cs,sn.prototype.av=function(a){return this.Cs(a)},sn.prototype.makeSVG=sn.prototype.av;function yu(a,y,x,b){this.ownerDocument=y=y===void 0?Ut.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},Dt.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&&Wt("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 pi,this.isTemporary=!!x}tt=Hd.prototype,tt.Wx=function(a){this.Z.imageSmoothingEnabled=a},tt.arc=function(a,y,x,b,E,te){this.Z.arc(a,y,x,b,E,te)},tt.beginPath=function(){this.Z.beginPath()},tt.Se=function(){},tt.bezierCurveTo=function(a,y,x,b,E,te){this.Z.bezierCurveTo(a,y,x,b,E,te)},tt.clearRect=function(a,y,x,b){this.yc(),this.Z.clearRect(a,y,x,b)},tt.clip=function(){this.Z.clip()},tt.closePath=function(){this.Z.closePath()},tt.createLinearGradient=function(a,y,x,b){return this.Z.createLinearGradient(a,y,x,b)},tt.createPattern=function(a,y){return this.Z.createPattern(a,y)},tt.createRadialGradient=function(a,y,x,b,E,te){return this.Z.createRadialGradient(a,y,x,b,E,te)},tt.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)},tt.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},tt.fillRect=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},tt.ox=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},tt.fillText=function(a,y,x){this.Z.fillText(a,y,x)},tt.getImageData=function(a,y,x,b){return this.Z.getImageData(a,y,x,b)},tt.lineTo=function(a,y){this.Z.lineTo(a,y)},tt.measureText=function(a){return this.Z.measureText(a)},tt.moveTo=function(a,y){this.Z.moveTo(a,y)},tt.quadraticCurveTo=function(a,y,x,b){this.Z.quadraticCurveTo(a,y,x,b)},tt.rect=function(a,y,x,b){this.Z.rect(a,y,x,b)},tt.restore=function(){this.Z.restore()},tt.save=function(){this.yc(),this.Z.save()},Hd.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},tt=Hd.prototype,tt.setTransform=function(a,y,x,b,E,te){this.El.setTransform(a,y,x,b,E,te)},tt.scale=function(a,y){this.El.scale(a,y)},tt.translate=function(a,y){this.El.translate(a,y)},tt.stroke=function(){this.Z.stroke()},tt.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}},tt.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},tt.ng=function(a,y){if(a instanceof so&&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)},tt.jk=function(){this.Hm||this.stroke()},tt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},tt.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},tt.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(vx),a.lineDashOffset=0)},tt.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},tt.Hs=function(){},Dt.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 so(a,y){cp||(hv(),cp=!0),fi(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=aa,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}so.prototype.copy=function(){var a=new so;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},tt=so.prototype,tt.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},tt.ka=function(){return Object.isFrozen(this)&&Wt("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},tt.qb=function(a){a.classType===so&&(this.type=a)},tt.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+")"},tt.addColorStop=function(a,y){return this._isFrozen&&In(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&Wn(a,"0 <= loc <= 1",so,"addColorStop:loc"),this.we===null&&(this.we=new cr),this.we.add(a,y),this.na===Ph&&(this.type=th),this.xe=null,this},tt.Vz=function(a,y){if(this._isFrozen&&In(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)}tt.Wy=function(a,y){if(this._isFrozen&&In(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)+")"}tt.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 so?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 Us.j=.4124564*y+.3575761*x+.1804375*b,Us.u=.2126729*y+.7151522*x+.072175*b,Us.o=.0193339*y+.119192*x+.9503041*b,Us.F=To.F,y=cv(Us.j/up[0]),x=cv(Us.u/up[1]),b=cv(Us.o/up[2]),kc.j=116*x-16,kc.u=500*(y-x),kc.o=200*(x-b),kc.F=Us.F,kc.j=Math.min(100,Math.max(0,kc.j+100*a)),a=(kc.j+16)/116,y=a-kc.o/200,Us.j=up[0]*n1(kc.u/500+a),Us.u=up[1]*(kc.j>mm*dv?Math.pow(a,3):kc.j/mm),Us.o=up[2]*n1(y),Us.F=kc.F,a=-.969266*Us.j+1.8760108*Us.u+.041556*Us.o,y=.0556434*Us.j+-.2040259*Us.u+1.0572252*Us.o,To.j=255*uv((3.2404542*Us.j+-1.5371385*Us.u+-.4985314*Us.o)/100),To.u=255*uv(a/100),To.o=255*uv(y/100),To.F=Us.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(),Zl.o=Math.min(100,Math.max(0,Zl.o+100*a)),"hsla("+Zl.j+", "+Zl.u+"%, "+Zl.o+"%, "+Zl.F+")";default:Wt("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))}Zl.j=Math.round(ne),Zl.u=Math.round(100*a),Zl.o=Math.round(100*E),Zl.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 so||Wt("Value for "+y+" must be a color string or a Brush, not "+a))}function hv(){fv=ra?new yu(null,void 0,{willReadFrequently:!0}).context:null}Dt.Object.defineProperties(so.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&In(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&&In(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&In(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&In(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&In(this,a),0>a&&Wn(a,">= zero",so,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&In(this,a),0>a&&Wn(a,">= zero",so,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&In(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&In(this,a),this.cr=a,this.xe=null}}}),so.prototype.isDark=so.prototype.Gx,so.prototype.darkenBy=so.prototype.Wy,so.prototype.lightenBy=so.prototype.Vz,so.prototype.addColorStop=so.prototype.addColorStop;var dv=216/24389,mm=24389/27,up=[95.047,100,108.883],fv=null,To=new cg,Zl=new cg,Us=new cg,kc=new cg,cp=!1;so.className="Brush";var Ph;so.Solid=Ph=new yn(so,"Solid",0);var th;so.Linear=th=new yn(so,"Linear",1);var lu;so.Radial=lu=new yn(so,"Radial",2);var hp;so.Pattern=hp=new yn(so,"Pattern",4);var dp;so.Lab=dp=new yn(so,"Lab",5);var r1;so.HSL=r1=new yn(so,"HSL",6),so.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},so.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)},so.lighten=function(a){return e1(a)},so.lightenBy=e1,so.darken=function(a){return t1(a)},so.darkenBy=t1,so.mix=av,so.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(){},Dt.Object.defineProperties(Ha.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return $n}}}),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,Ae=Se.right+Se.left;Se=Se.top+Se.bottom,ge.measure(y,x,te,ne);var Ge=ge.measuredBounds;Ae=Math.max(Ge.width+Ae,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 di&&ge.isGeometryPositioned&&(ge=ge.strokeWidth/2,Ge-=ge,Je-=ge),qi(E,Ge,Je,Ae,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 di&&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!==Fn&&Se!==Pr)y.push(ge);else{ge.measure(1/0,x,0,ne),Se=ge.margin,ge=ge.measuredBounds;var Ae=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,Ae)}}}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));Ln(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 Ae=Se.measuredBounds,Ge=Se.margin,Je=Ge.top+Ge.bottom,rt=te+E.bottom,ct=Ae.height,Bt=sl(Se,!1);(isNaN(Se.desiredSize.height)&&Bt===zn||Bt===Ir)&&(ct=Math.max(x.height-Je-rt,0)),Je=ct+Je+rt,rt=Se.alignment,rt.Xb()&&(rt=a.defaultAlignment),rt.sb()||(rt=Di),ne&&(se-=Ae.width+Ge.left+Ge.right),Se.arrange(se+rt.offsetX+Ge.left,ge+rt.offsetY+Ge.top+(x.height*rt.y-Je*rt.y),Ae.width,ct),ne||(se+=Ae.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!==Fn&&Se!==Ir)x.push(ge);else{var Ae=ge.margin;Se=Ae.right+Ae.left,Ae=Ae.top+Ae.bottom,ge.measure(y,1/0,te,0),ge=ge.measuredBounds,ma(E,Math.max(E.width,Math.max(ge.width+Se,0)),E.height+Math.max(ge.height+Ae,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);Ln(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 Ae=Se.measuredBounds,Ge=Se.margin,Je=Ge.left+Ge.right,rt=te+E.right,ct=Ae.width,Bt=sl(Se,!1);(isNaN(Se.desiredSize.width)&&Bt===zn||Bt===Pr)&&(ct=Math.max(x.width-Je-rt,0)),Je=ct+Je+rt,rt=Se.alignment,rt.Xb()&&(rt=a.defaultAlignment),rt.sb()||(rt=Di),ne&&(se-=Ae.height+Ge.bottom+Ge.top),Se.arrange(ge+rt.offsetX+Ge.left+(x.width*rt.x-Je*rt.x),se+rt.offsetY+Ge.top,ct,Ae.height),ne||(se+=Ae.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,Ae=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),rt=Math.max(ne+Ae,0),ct=a.isClipping,Bt=bn.allocAt(-ge.left,-ge.top,Je,rt),Lt=bn.allocAt(0,0,te,ne);pv(he,Lt,!0),te=Lt.width,ne=Lt.height;for(var $t=!0,Ht=nh(a),Kt=0;Kt<se;Kt++){var Yt=b[Kt];Ge=y;var ln=x;if(Yt!==he&&(Yt.visible||Yt===Ht)){ge=Yt.margin;var er=ge.left,ur=ge.top;switch(Je=ge.right+ge.left,rt=ge.top+ge.bottom,ge=sl(Yt,!1),ge){case zn:Ge=te,ln=ne,ur=er=rt=Je=0;break;case Pr:Ge=te,er=Je=0;break;case Ir:ln=ne,ur=rt=0}Yt.measure(Ge,ln,0,0),Ge=Yt.measuredBounds,Je=Math.max(Ge.width+Je,0),rt=Math.max(Ge.height+rt,0),ge=Yt.alignment,ge.Xb()&&(ge=a.defaultAlignment),ge.sb()||(ge=Di);var or=Yt.alignmentFocus;if(or.Xb()&&(or=Di),ln=null,Yt instanceof $n&&Yt.$e!==""&&(ln=Yt.fb(Yt.$e),ln===Yt&&(ln=null)),er=Lt.x-er,ur=Lt.y-ur,ln!==null){for(Yt.arrange(0,0,Ge.width,Ge.height),Ge=ln.actualBounds,Ge=jt.allocAt(Ge.x+(or.x*Ge.width-or.offsetX),Ge.y+(or.y*Ge.height-or.offsetY)),ln=ln.panel;ln!==Yt;)ln.transform.Ga(Ge),ln=ln.panel;er+=ge.x*te+ge.offsetX-Ge.x,ur+=ge.y*ne+ge.offsetY-Ge.y,jt.free(Ge)}else er+=ge.x*te+ge.offsetX-(or.x*Ge.width+or.offsetX),ur+=ge.y*ne+ge.offsetY-(or.y*Ge.height+or.offsetY);$t?($t=!1,E.h(er,ur,Je,rt)):qi(E,er,ur,Je,rt)}}switch($t?E.assign(Bt):ct?E.Uu(Lt.x,Lt.y,Lt.width,Lt.height):qi(E,Bt.x,Bt.y,Bt.width,Bt.height),bn.free(Bt),bn.free(Lt),ge=he.stretch,ge===ri&&(ge=sl(he,!1)),ge){case Fn:return;case zn:if(!isFinite(y)&&!isFinite(x))return;break;case Pr:if(!isFinite(y))return;break;case Ir:if(!isFinite(x))return}for(Ge=he.measuredBounds,te=Ge.width,ne=Ge.height,Je=Math.max(te+Se,0),rt=Math.max(ne+Ae,0),ge=he.margin,Lt=bn.allocAt(-ge.left,-ge.top,Je,rt),pv(he,Lt,!0),te=Lt.width,ne=Lt.height,y=0;y<se;y++)x=b[y],x===he||!x.visible&&x!==Ht||(ge=x.margin,Je=ge.right+ge.left,rt=ge.top+ge.bottom,Ge=x.measuredBounds,Je=Math.max(Ge.width+Je,0),rt=Math.max(Ge.height+rt,0),Se=x.alignment,Se.Xb()&&(Se=a.defaultAlignment),Se.sb()||(Se=Di),x=x.alignmentFocus,x.Xb()&&(x=Di),$t?($t=!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,rt)):qi(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,rt));$t?E.assign(Bt):ct?E.Uu(Lt.x,Lt.y,Lt.width,Lt.height):qi(E,Bt.x,Bt.y,Bt.width,Bt.height),bn.free(Lt)},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=bn.allocAt(0,0,ne,se),pv(E,ne,!1),se=0;se<b;se++){var Ae=y[se];if(Ae!==E){ge=Ae.measuredBounds;var Ge=ge.width,Je=ge.height;Se=Ae.alignment,Se.Xb()&&(Se=a.defaultAlignment),Se.sb()||(Se=Di);var rt=Ae.alignmentFocus;if(rt.Xb()&&(rt=Di),ge=null,Ae instanceof $n&&Ae.$e!==""&&(ge=Ae.fb(Ae.$e),ge===Ae&&(ge=null)),ge!==null){var ct=ge.actualBounds;for(rt=jt.allocAt(ct.x+(rt.x*ct.width-rt.offsetX),ct.y+(rt.y*ct.height-rt.offsetY)),ge=ge.panel;ge!==Ae;)ge.transform.Ga(rt),ge=ge.panel;ge=Se.x*ne.width+Se.offsetX-rt.x,Se=Se.y*ne.height+Se.offsetY-rt.y,jt.free(rt)}else ge=Se.x*ne.width+Se.offsetX-(rt.x*Ge+rt.offsetX),Se=Se.y*ne.height+Se.offsetY-(rt.y*Je+rt.offsetY);ge+=ne.x-x.x,Se+=ne.y-x.y,Ae.visible&&Ae.arrange(te+ge,he+Se,Ge,Je)}}bn.free(ne)};function pv(a,y,x){var b=null;if(a instanceof $n&&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,Ae=x,Ge=ge.right+ge.left,Je=ge.top+ge.bottom;he.measure(y,x,te,ne),ge=he.measuredBounds;var rt=0,ct=null;he instanceof di&&(ct=he,rt=ct.strokeWidth*ct.scale);var Bt=Math.max(ge.width+Ge,0);ge=Math.max(ge.height+Je,0);var Lt=yv(he),$t=Lt.x*Bt+Lt.offsetX;Lt=Lt.y*ge+Lt.offsetY;var Ht=Sv(he),Kt=Ht.x*Bt+Ht.offsetX;for(Ht=Ht.y*ge+Ht.offsetY,isFinite(y)&&(Se=Math.max(Math.abs($t-Kt)-rt,0)),isFinite(x)&&(Ae=Math.max(Math.abs(Lt-Ht)-rt,0)),rt=Vn.alloc(),rt.h(0,0),a=nh(a),Ht=0;Ht<se;Ht++)Lt=b[Ht],Lt===he||!Lt.visible&&Lt!==a||(ge=Lt.margin,Bt=ge.right+ge.left,$t=ge.top+ge.bottom,Lt.measure(Se,Ae,0,0),ge=Lt.measuredBounds,Bt=Math.max(ge.width+Bt,0),ge=Math.max(ge.height+$t,0),rt.h(Math.max(Bt,rt.width),Math.max(ge,rt.height)));if(se===1)E.width=Bt,E.height=ge,Vn.free(rt);else{switch(Lt=yv(he),Ht=Sv(he),se=b=0,Ht.x!==Lt.x&&Ht.y!==Lt.y&&(b=rt.width/Math.abs(Ht.x-Lt.x),se=rt.height/Math.abs(Ht.y-Lt.y)),Vn.free(rt),rt=0,ct!==null&&(rt=ct.strokeWidth*ct.scale,Ev(ct)===pr&&(b=se=Math.max(b,se))),b+=Math.abs(Lt.offsetX)+Math.abs(Ht.offsetX)+rt,se+=Math.abs(Lt.offsetY)+Math.abs(Ht.offsetY)+rt,ct=he.stretch,ct===ri&&(ct=sl(he,!1)),ct){case Fn:ne=te=0;break;case zn:isFinite(y)&&(b=y),isFinite(x)&&(se=x);break;case Pr:isFinite(y)&&(b=y),ne=0;break;case Ir: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=bn.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),Ae=Sv(b),Ge=Se.y*E.height+Se.offsetY,Je=Ae.x*E.width+Ae.offsetX;for(Ae=Ae.y*E.height+Ae.offsetY,te.x=Se.x*E.width+Se.offsetX,te.y=Ge,qi(te,Je,Ae,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&&(No(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 bn(te.x,te.y,te.width,te.height))));bn.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 $n?ge:null;if(Se!==null&&Ch(Se)&&ge.visible){se.push(Se);for(var Ae=Se.O.s,Ge=Ae.length,Je=0;Je<Ge;Je++){var rt=Ae[Je];Se.type===$n.TableRow?rt.row=ge.row:Se.type===$n.TableColumn&&(rt.column=ge.column),ne.push(rt)}}else ne.push(ge)}te=ne.length,te===0&&(a.Fb(0),a.Eb(0));for(var ct=[],Bt=0;Bt<te;Bt++){var Lt=ne[Bt];Lt.visible&&(Ia(Lt,!0),Mc(Lt,!0),ct[Lt.row]||(ct[Lt.row]=[]),ct[Lt.row][Lt.column]||(ct[Lt.row][Lt.column]=[]),ct[Lt.row][Lt.column].push(Lt))}Ln(ne);var $t=pn(),Ht=pn(),Kt=pn(),Yt={count:0},ln={count:0},er=y,ur=x,or=a.rowDefs,Hn=a.colDefs,jn=null;te=or.length;for(var Qr=0;Qr<te;Qr++)jn=or[Qr],jn!==void 0&&(jn.actual=0);te=Hn.length;for(var Wr=0;Wr<te;Wr++)jn=Hn[Wr],jn!==void 0&&(jn.actual=0);for(var Xi=ct.length,bo=0,Ja=0;Ja<Xi;Ja++)ct[Ja]&&(bo=Math.max(bo,ct[Ja].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),Pa=0;Pa<Xi;Pa++)if(ct[Pa]){bo=ct[Pa].length;var qu=a.Fb(Pa);qu.actual=0;for(var Bs=qu.oc=0;Bs<bo;Bs++)if(ct[Pa][Bs]){var Dh=a.Eb(Bs);$t[Bs]===void 0&&(Dh.actual=0,Dh.oc=0,$t[Bs]=!0);for(var Jl=ct[Pa][Bs],bu=Jl.length,Ol=0;Ol<bu;Ol++){var Sl=Jl[Ol];if(Sl.visible||Sl===Ih){var fd=1<Sl.rowSpan||1<Sl.columnSpan;fd&&(Pa<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===Fn||dc||Pa<rs||Bs<Fs||(Yt[Bs]!==void 0||Rs!==zn&&Rs!==Pr||(Yt[Bs]=-1,Yt.count++),ln[Pa]!==void 0||Rs!==zn&&Rs!==Ir||(ln[Pa]=-1,ln.count++),Kt.push(Sl)),Sl.measure(1/0,1/0,0,0),!(Pa<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===Fn||Rs===Pr)){jn=a.Fb(Pa);var pd=jn.Wc();Qa=Math.max(Al-jn.actual,0),Qa+pd>ur&&(Qa=Math.max(ur-pd,0));var W0=jn.oa===0;jn.oc=jn.oc+Qa,jn.actual=jn.oa+Qa,ur=Math.max(ur-(Qa+(W0?pd:0)),0)}if(Sl.columnSpan===1&&(Rs===Fn||Rs===Ir)){jn=a.Eb(Bs);var Qg=jn.Wc();Qa=Math.max(Qd-jn.actual,0),Qa+Qg>er&&(Qa=Math.max(er-Qg,0));var $y=jn.oa===0;jn.oc=jn.oc+Qa,jn.actual=jn.oa+Qa,er=Math.max(er-(Qa+($y?Qg:0)),0)}fd&&Sl.Uj()}}}}}Ln($t);var Rc=0,oh=0;te=a.columnCount;for(var Ff=0;Ff<te;Ff++){var gd=Hn[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=or[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=ur=Math.max(x-oh,0),Fh=er;te=Kt.length;for(var wl=0;wl<te;wl++){var fc=Kt[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;Yt[fc.column]=ah.oc===0&&Yt[fc.column]!==void 0?Math.max(Bp.width+qd,Yt[fc.column]):null,ln[fc.row]=K0.oc===0&&ln[fc.row]!==void 0?Math.max(Bp.height+pc,ln[fc.row]):null}var Bf=0,Rp=0,Fu;for(Fu in ln)Fu!=="count"&&(Bf+=ln[Fu]);for(Fu in Yt)Fu!=="count"&&(Rp+=Yt[Fu]);for(var fs=Vn.alloc(),qg=0;qg<te;qg++){var Js=Kt[qg];if(Js.visible||Js===Ih){var Ca=a.Fb(Js.row),Qs=a.Eb(Js.column),sh=0;isFinite(Qs.width)?sh=Qs.width:(isFinite(er)&&Yt[Js.column]!==null?Rp===0?sh=Qs.actual+er:sh=Yt[Js.column]/Rp*Fh:Yt[Js.column]!==null?sh=er:sh=Qs.actual||er,sh=Math.max(0,sh-Qs.Wc()));var Bh=0;switch(isFinite(Ca.height)?Bh=Ca.height:(isFinite(ur)&&ln[Js.row]!==null?Bf===0?Bh=Ca.actual+ur:Bh=ln[Js.row]/Bf*_c:ln[Js.row]!==null?Bh=ur:Bh=Ca.actual||ur,Bh=Math.max(0,Bh-Ca.Wc())),fs.h(Math.max(Qs.minimum,Math.min(sh,Qs.maximum)),Math.max(Ca.minimum,Math.min(Bh,Ca.maximum))),Rs=Zu(Js,Ca,Qs,!1),Rs){case Pr:fs.height=Math.max(fs.height,Ca.actual+ur);break;case Ir:fs.width=Math.max(fs.width,Qs.actual+er)}var ef=Js.margin,Gy=ef.right+ef.left,V0=ef.top+ef.bottom;Js.Uj(),Js.measure(fs.width,fs.height,Qs.minimum,Ca.minimum);var _p=Js.measuredBounds,tf=Math.max(_p.width+Gy,0),Rf=Math.max(_p.height+V0,0);isFinite(er)&&(tf=Math.min(tf,fs.width)),isFinite(ur)&&(Rf=Math.min(Rf,fs.height));var bl=0;bl=Ca.actual,Ca.actual=Math.max(Ca.actual,Rf),Ca.oc=Math.max(Ca.oc,Rf),Qa=Ca.actual-bl,ur=Math.max(ur-Qa,0),ln[Js.row]===null&&(_c=Math.max(_c-Qa,0)),bl=Qs.actual,Qs.actual=Math.max(Qs.actual,tf),Qs.oc=Math.max(Qs.oc,tf),Qa=Qs.actual-bl,er=Math.max(er-Qa,0),Yt[Js.column]===null&&(Fh=Math.max(Fh-Qa,0))}}Ln(Kt);var lh=Vn.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 sa=Ht[$p];if(sa.visible||sa===Ih){var Bu=a.Fb(sa.row),Pu=a.Eb(sa.column);switch(fs.h(Math.max(Pu.minimum,Math.min(y,Pu.maximum)),Math.max(Bu.minimum,Math.min(x,Bu.maximum))),Rs=Zu(sa,Bu,Pu,!1),Rs){case zn: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 Pr:fu[Pu.index]!==0&&(fs.width=Math.min(fs.width,fu[Pu.index]));break;case Ir: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<sa.rowSpan&&!(sa.row+Rh>=a.rowCount);Rh++)jn=a.Fb(sa.row+Rh),Qa=0,Qa=Rs===zn||Rs===Ir?Math.max(jn.minimum,nc[sa.row+Rh]===0?jn.maximum:Math.min(nc[sa.row+Rh],jn.maximum)):Math.max(jn.minimum,isNaN(jn.Hc)?jn.maximum:Math.min(jn.Hc,jn.maximum)),lh.height+=Qa,jl+=jn.minimum;for(var Cu=1;Cu<sa.columnSpan&&!(sa.column+Cu>=a.columnCount);Cu++)jn=a.Eb(sa.column+Cu),Qa=0,Qa=Rs===zn||Rs===Pr?Math.max(jn.minimum,fu[sa.column+Cu]===0?jn.maximum:Math.min(fu[sa.column+Cu],jn.maximum)):Math.max(jn.minimum,isNaN(jn.Hc)?jn.maximum:Math.min(jn.Hc,jn.maximum)),lh.width+=Qa,X0+=jn.minimum;fs.width+=lh.width,fs.height+=lh.height;var Gp=sa.margin,Sd=Gp.right+Gp.left,em=Gp.top+Gp.bottom;sa.measure(fs.width,fs.height,X0,jl);for(var Hp=sa.measuredBounds,gc=Math.max(Hp.width+Sd,0),nf=Math.max(Hp.height+em,0),xd=0,Up=0;Up<sa.rowSpan&&!(sa.row+Up>=a.rowCount);Up++)jn=a.Fb(sa.row+Up),xd+=jn.total||0;if(xd<nf){var _h=nf-xd,zc=nf-xd;if(sa.spanAllocation!==null)for(var zh=sa.spanAllocation,uh=0;uh<sa.rowSpan&&!(0>=_h)&&!(sa.row+uh>=a.rowCount);uh++){jn=a.Fb(sa.row+uh);var $h=jn.oa||0,rf=zh(sa,jn,zc);jn.actual=Math.min(jn.maximum,$h+rf),jn.oa!==$h&&(_h-=jn.oa-$h)}for(;0<_h;){var rc=jn.oa||0;if(isNaN(jn.height)&&jn.maximum>rc&&(jn.actual=Math.min(jn.maximum,rc+_h),jn.oa!==rc&&(_h-=jn.oa-rc)),jn.index===0)break;jn=a.Fb(jn.index-1)}}for(var _f=0,Gh=0;Gh<sa.columnSpan&&!(sa.column+Gh>=a.columnCount);Gh++)jn=a.Eb(sa.column+Gh),_f+=jn.total||0;if(_f<gc){var zf=gc-_f,Hy=gc-_f;if(sa.spanAllocation!==null)for(var ch=sa.spanAllocation,of=0;of<sa.columnSpan&&!(0>=zf)&&!(sa.column+of>=a.columnCount);of++){jn=a.Eb(sa.column+of);var tm=jn.oa||0,Uy=ch(sa,jn,Hy);jn.actual=Math.min(jn.maximum,tm+Uy),jn.oa!==tm&&(zf-=jn.oa-tm)}for(;0<zf;){var Y0=jn.oa||0;if(isNaN(jn.width)&&jn.maximum>Y0&&(jn.actual=Math.min(jn.maximum,Y0+zf),jn.oa!==Y0&&(zf-=jn.oa-Y0)),jn.index===0)break;jn=a.Eb(jn.index-1)}}}}Ln(Ht),Vn.free(lh),Vn.free(fs),nc!==void 0&&Ln(nc),fu!==void 0&&Ln(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++)Hn[Q0]!==void 0&&(jn=a.Eb(Q0),isFinite(jn.width)?(nm+=jn.width,nm+=jn.Wc()):Am(jn)===pg?(nm+=jn.oa,nm+=jn.Wc()):jn.oa!==0&&(Rc+=jn.oa,Rc+=jn.Wc()));isFinite(J0.width)?$f=Math.min(J0.width,gx.width):$f=Rs!==Fn&&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++)Hn[q0]!==void 0&&(jn=a.Eb(q0),isFinite(jn.width)||Am(jn)===pg||(jn.actual=jn.oa*Qx),jn.position=E.width,jn.oa!==0&&(E.width+=jn.oa,E.width+=jn.Wc()));te=a.rowCount;for(var ev=0;ev<te;ev++)or[ev]!==void 0&&(jn=a.Fb(ev),isFinite(jn.height)?(rm+=jn.height,rm+=jn.Wc()):Am(jn)===pg?(rm+=jn.oa,rm+=jn.Wc()):jn.oa!==0&&(oh+=jn.oa,oh+=jn.Wc()));isFinite(J0.height)?Gf=Math.min(J0.height,gx.height):Gf=Rs!==Fn&&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++)or[tv]!==void 0&&(jn=a.Fb(tv),isFinite(jn.height)||Am(jn)===pg||(jn.actual=jn.oa*qx),jn.position=E.height,jn.oa!==0&&(E.height+=jn.oa,E.height+=jn.Wc()));te=se.length;for(var Wy=0;Wy<te;Wy++){var im=se[Wy],Ky=0,Vy=0;im.type===$n.TableRow?(Ky=E.width,jn=a.Fb(im.row),Vy=jn.actual):(jn=a.Eb(im.column),Ky=jn.actual,Vy=E.height),im.measuredBounds.h(0,0,Ky,Vy),Ia(im,!1)}Ln(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,Ae=0;Ae<ge;Ae++)ne[Ae]&&(Se=Math.max(Se,ne[Ae].length));he=a.rowDefs,se=a.colDefs;var Ge=Ae=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),Ae=-he[Je].position}var rt=Math.min(a.leftIndex,Se-1);if(0<se.length){for(;rt!==Se&&(se[rt]===void 0||se[rt].oa===0);)rt++;rt=Math.max(Math.min(rt,Se-1),0),Ge=-se[rt].position}for(var ct=0,Bt=0;ct!==ge&&he[ct]===void 0;)ct++;for(;Bt!==ge&&se[Bt]===void 0;)Bt++;Se=a.part,a.Fb(ct),a.Eb(Bt);for(var Lt=0;Lt<y.length;Lt++){var $t=y[Lt];if($t instanceof $n&&$t.visible&&Ch($t)){if($t.type===$n.TableRow){se=a.Fb($t.row);var Ht=a.Eb(Bt)}else se=a.Fb(ct),Ht=a.Eb($t.column);he=se.position+Ae+E,se.oa!==0&&(he+=se.Io(Math.max(ct,Je))),se=Ht.position+Ge+te,Ht.oa!==0&&(se+=Ht.Io(Math.max(Bt,rt))),Ht=$t.measuredBounds,$t.Uk(),$t.actualBounds.ka();var Kt=$t.actualBounds,Yt=bn.allocAt(Kt.x,Kt.y,Kt.width,Kt.height);Kt.x=$t.type===$n.TableRow?te:se,Kt.y=$t.type===$n.TableColumn?E:he,Kt.width=Ht.width,Kt.height=Ht.height,$t.actualBounds.freeze(),Mc($t,!1),So(Yt,Kt)||Se===null||(Se.oh(),$t.Pn(Se)),bn.free(Yt)}}for(Lt=Vn.alloc(),$t=0;$t<ge;$t++)if(ne[$t]){for(Se=ne[$t].length,Ht=a.Fb($t),he=Ht.position+Ae+E,Ht.oa!==0&&(he+=Ht.Io(Math.max(ct,Je))),Kt=0;Kt<Se;Kt++)if(ne[$t][Kt]){Yt=a.Eb(Kt),se=Yt.position+Ge+te,Yt.oa!==0&&(se+=Yt.Io(Math.max(Bt,rt)));for(var ln=ne[$t][Kt],er=ln.length,ur=0;ur<er;ur++){var or=ln[ur],Hn=or.measuredBounds;Lt.h(0,0);for(var jn=1;jn<or.rowSpan&&!($t+jn>=a.rowCount);jn++){var Qr=a.Fb($t+jn);Qr.oa!==0&&(Lt.height+=Qr.total)}for(jn=1;jn<or.columnSpan&&!(Kt+jn>=a.columnCount);jn++)Qr=a.Eb(Kt+jn),Qr.oa!==0&&(Lt.width+=Qr.total);var Wr=Yt.oa+Lt.width,Xi=Ht.oa+Lt.height;jn=se,Qr=he;var bo=Wr,Ja=Xi,rs=se,Fs=he,Qa=Wr,Ih=Xi;se+Wr>x.width&&(Qa=Math.max(x.width-se,0)),he+Xi>x.height&&(Ih=Math.max(x.height-he,0));var Pa=or.alignment;if(Pa.Xb()){Pa=a.defaultAlignment,Pa.sb()||(Pa=Di);var qu=Pa.x,Bs=Pa.y,Dh=Pa.offsetX;Pa=Pa.offsetY;var Jl=Yt.alignment,bu=Ht.alignment;Jl.sb()&&(qu=Jl.x,Dh=Jl.offsetX),bu.sb()&&(Bs=bu.y,Pa=bu.offsetY)}else qu=Pa.x,Bs=Pa.y,Dh=Pa.offsetX,Pa=Pa.offsetY;(isNaN(qu)||isNaN(Bs))&&(Bs=qu=.5,Pa=Dh=0),Jl=Hn.width,bu=Hn.height;var Ol=or.margin,Sl=Ol.left+Ol.right,fd=Ol.top+Ol.bottom,ec=Zu(or,Ht,Yt,!1);!isNaN(or.desiredSize.width)||ec!==zn&&ec!==Pr||(Jl=Math.max(Wr-Sl,0)),!isNaN(or.desiredSize.height)||ec!==zn&&ec!==Ir||(bu=Math.max(Xi-fd,0)),Wr=or.maxSize,Xi=or.minSize,Jl=Math.min(Wr.width,Jl),bu=Math.min(Wr.height,bu),Jl=Math.max(Xi.width,Jl),bu=Math.max(Xi.height,bu),Wr=bu+fd,jn+=bo*qu-(Jl+Sl)*qu+Dh+Ol.left,Qr+=Ja*Bs-Wr*Bs+Pa+Ol.top,or.visible&&(No(rs,Fs,Qa,Ih,jn,Qr,Hn.width,Hn.height)?or.arrange(jn,Qr,Jl,bu):or.arrange(jn,Qr,Jl,bu,new bn(rs,Fs,Qa,Ih)))}}}for(Vn.free(Lt),a=0;a<b;a++)x=y[a],te=x instanceof $n?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&&Wt("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,Ae=se.width;se=se.height;var Ge=Math.max(y-ge,0),Je=Math.max(x-he,0),rt=1;a.viewboxStretch===pr?Ae!==0&&se!==0&&(rt=Math.min(Ge/Ae,Je/se)):Ae!==0&&se!==0&&(rt=Math.max(Ge/Ae,Je/se)),rt===0&&(rt=1e-4),b.Ca*=rt,Se!==b.scale&&(Ia(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),Ae=a.gridOrigin,Ge=Ae.x;Ae=Ae.y,y.save(),y.beginPath(),y.rect(0,0,se,he),y.clip(),y.Se();for(var Je=[],rt=a.O.s,ct=rt.length,Bt=0;Bt<ct;Bt++){var Lt=rt[Bt],$t=[];if(Je.push($t),Lt.visible){var Ht=Lt.interval;if(!(0>Ht)){Lt=mv(Lt.figure);for(var Kt=0;Kt<ct;Kt++)if(Kt!==Bt){var Yt=rt[Kt];Yt.visible&&mv(Yt.figure)===Lt&&(Yt=Yt.interval,Yt>Ht&&$t.push(Yt))}}}}for(rt=a.O.s,ct=rt.length,Bt=0;Bt<ct;Bt++){var ln=rt[Bt];if(ln.visible&&($t=ln.interval||1,Lt=Math.abs($t),!(2>E*Lt*x))){if(Ht=ln.segmentIndex,(!isFinite(Ht)||isNaN(Ht))&&(Ht=0),0>Ht&&(Ht=Lt-Math.min(-Ht,Lt)),Ht=Math.round(Ht%Lt),Lt=ln.opacity,Kt=1,Lt!==1){if(Lt===0)continue;Kt=y.globalAlpha,y.globalAlpha=Kt*Lt}Yt=Je[Bt];var er=!1,ur=ln.strokeDashArray;if(ur!==null&&(er=!0,y.js(ur,ln.strokeDashOffset)),ln.figure==="LineV"&&ln.stroke!==null&&0<ln.strokeWidth){for(y.lineWidth=ln.strokeWidth,oa(a,y,ln.stroke,!1,!1,te,ne),y.beginPath(),ur=ln=Math.floor((Ge-E)/E);ur<=ln+ge;ur++){var or=ur*E+Ge;0<=or&&or<=se&&Tm(ur,$t,Ht,Yt)&&(y.moveTo(or,0),y.lineTo(or,he))}y.stroke(),y.Se()}else if(ln.figure==="LineH"&&ln.stroke!==null&&0<ln.strokeWidth){for(y.lineWidth=ln.strokeWidth,oa(a,y,ln.stroke,!1,!1,te,ne),y.beginPath(),ur=ln=Math.floor((Ae-b)/b);ur<=ln+Se;ur++)or=ur*b+Ae,0<=or&&or<=he&&Tm(ur,$t,Ht,Yt)&&(y.moveTo(0,or),y.lineTo(se,or));y.stroke(),y.Se()}else if(ln.figure==="BarV"&&ln.fill!==null)for(oa(a,y,ln.fill,!0,!1,te,ne),ln=ln.width,isNaN(ln)&&(ln=E),or=ur=Math.floor((Ge-E)/E);or<=ur+ge;or++){var Hn=or*E+Ge;0<=Hn+ln&&Hn<=se&&Tm(or,$t,Ht,Yt)&&y.fillRect(Hn,0,ln,he)}else if(ln.figure==="BarH"&&ln.fill!==null)for(oa(a,y,ln.fill,!0,!1,te,ne),ln=ln.height,isNaN(ln)&&(ln=b),or=ur=Math.floor((Ae-b)/b);or<=ur+Se;or++)Hn=or*b+Ae,0<=Hn+ln&&Hn<=he&&Tm(or,$t,Ht,Yt)&&y.fillRect(0,Hn,se,ln);er&&y.fs(),Lt!==1&&(y.globalAlpha=Kt)}}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 Ki||a instanceof Un){var ne=null,se=null;if(a instanceof Un&&(ne=a),a instanceof Ki&&(se=a,ne=se.adornedPart,a.j===null&&(a.j=[])),ne instanceof Un){var he=ne;if(te===0)ma(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var ge=a instanceof Ki?null:ne.path;y=ne.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var Se=he.points,Ae=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 rt=ge.measuredBounds;x.ed(rt),Je.push(rt)}rt=pi.alloc();for(var ct=jt.alloc(),Bt=jt.alloc(),Lt=0;Lt<te;Lt++){var $t=b[Lt];if($t!==ge)if($t.isPanelMain&&$t instanceof di){i1(a,se,Ge,$t);var Ht=$t.measuredBounds;x.ed(Ht),Je.push(Ht)}else if(2>Ae)$t.measure(1/0,1/0,0,0),Ht=$t.measuredBounds,x.ed(Ht),Je.push(Ht);else{var Kt=$t.segmentIndex,Yt=$t.segmentFraction,ln=$t.alignmentFocus;ln.Mc()&&(ln=Di);var er=$t.segmentOrientation,ur=$t.segmentOffset;if(isNaN(Kt)){var or=he.ua;Ht=pn(),or.Qu(Yt,Ht);var Hn=jt.allocAt(Ht[0],Ht[1]);if(Hn.add(he.i(0)),or.type===Zn.j?Hn.offset(-or.startX,-or.startY):(or=or.figures.first(),or!==null&&Hn.offset(-or.startX,-or.startY)),or=Ht[2],er!==Ks){var jn=he.computeAngle($t,er,or);$t.Kb=jn}jn=Hn.x-y.x;var Qr=Hn.y-y.y;jt.free(Hn),Ln(Ht)}else if(Kt<-Ae||Kt>=Ae)Ht=jt.alloc(),he.vg(),he.computeMidPoint(Ht),or=he.midAngle,er!==Ks&&(jn=he.computeAngle($t,er,or),$t.Kb=jn),jn=Ht.x-y.x,Qr=Ht.y-y.y,jt.free(Ht);else{if(jn=0,0<=Kt?(Qr=Se.M(Kt),Ht=Kt<Ae-1?Se.M(Kt+1):Qr):(jn=Ae+Kt,Qr=Se.M(jn),Ht=0<jn?Se.M(jn-1):Qr),Qr.Xa(Ht)){0<=Kt?(or=0<Kt?Se.M(Kt-1):Qr,jn=Kt<Ae-2?Se.M(Kt+2):Ht):(or=jn<Ae-1?Se.M(jn+1):Qr,jn=1<jn?Se.M(jn-2):Ht),Hn=or.Bf(Qr);var Wr=Ht.Bf(jn);or=Hn>Wr+10?0<=Kt?or.ab(Qr):Qr.ab(or):Wr>Hn+10?0<=Kt?Ht.ab(jn):jn.ab(Ht):0<=Kt?or.ab(jn):jn.ab(or)}else or=0<=Kt?Qr.ab(Ht):Ht.ab(Qr);er!==Ks&&(jn=he.computeAngle($t,er,or),$t.Kb=jn),jn=Qr.x+(Ht.x-Qr.x)*Yt-y.x,Qr=Qr.y+(Ht.y-Qr.y)*Yt-y.y}$t.measure(1/0,1/0,0,0),Ht=$t.measuredBounds,Hn=$t.naturalBounds;var Xi=0;$t instanceof di&&(Xi=$t.strokeWidth),Wr=Hn.width+Xi;var bo=Hn.height+Xi;rt.reset(),rt.translate(-Ht.x,-Ht.y),rt.scale($t.scale,$t.scale),rt.rotate(er===Ks?$t.angle:or,Wr/2,bo/2),er!==Cg&&er!==Tg||rt.rotate(90,Wr/2,bo/2),er!==Eg&&er!==Mg||rt.rotate(-90,Wr/2,bo/2),er===r0&&(45<or&&135>or||225<or&&315>or)&&rt.rotate(-or,Wr/2,bo/2),Hn=new bn(0,0,Wr,bo),ct.xi(Hn,ln),rt.Ga(ct),ln=-ct.x+Xi/2*$t.scale,$t=-ct.y+Xi/2*$t.scale,Bt.assign(ur),Xi=isNaN(ur.x);var Ja=isNaN(ur.y);if(Xi||Ja){Wr=Wr/2+3,bo=bo/2+3;var rs=45<=or&&135>=or,Fs=225<=or&&315>=or;er===Ks&&(rs||Fs)?(Bt.x=Ja?Wr:ur.y,Bt.y=Xi?bo:ur.x,rs?0<=Kt||isNaN(Kt)&&.5>Yt||!Xi||(Bt.y=-bo):Fs&&((0<=Kt||isNaN(Kt)&&.5>Yt)&&Xi&&(Bt.y=-bo),Ja&&(Bt.x=-Wr))):(Xi&&(Bt.x=0<=Kt||isNaN(Kt)&&.5>Yt?Wr:-Wr),Ja&&(Bt.y=-bo),Bt.rotate(or))}else Bt.rotate(or);jn+=Bt.x,Qr+=Bt.y,Hn.set(Ht),Hn.h(jn+ln,Qr+$t,Ht.width,Ht.height),Je.push(Hn),x.ed(Hn)}}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),ma(E,x.width||0,x.height||0),pi.free(rt),jt.free(ct),jt.free(Bt)}}}},Mm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof Ki||a instanceof Un){var b=a,E=null;a instanceof Ki&&(E=a,b=E.adornedPart);var te=a instanceof Ki?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 Un)for(te=a.labelNodes;te.next();){var Ae=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=Ae.ua,rt=pn();Je.Qu(he,rt);var ct=jt.allocAt(rt[0],rt[1]);ct.add(Ae.i(0)),Je.type===Zn.j||(Je=Je.figures.first()),ct.offset(-Je.startX,-Je.startY),Je=rt[2],ge!==Ks&&(Ae=Ae.computeAngle(ne,ge,Je),ne.angle=Ae),Ae=ct.x;var Bt=ct.y;jt.free(ct),Ln(rt)}else if(se<-x||se>=x)rt=jt.alloc(),Je=Ae,Bt=rt,Je.vg(),Je.computeMidPoint(Bt),Je=Ae.midAngle,ge!==Ks&&(Ae=Ae.computeAngle(ne,ge,Je),ne.angle=Ae),Ae=rt.x,Bt=rt.y,jt.free(rt);else{if(ct=0,0<=se?(rt=y.s[se],Bt=se<x-1?y.s[se+1]:rt):(ct=x+se,rt=y.s[ct],Bt=0<ct?y.s[ct-1]:rt),rt.Xa(Bt)){0<=se?(Je=0<se?y.s[se-1]:rt,ct=se<x-2?y.s[se+2]:Bt):(Je=ct<x-1?y.s[ct+1]:rt,ct=1<ct?y.s[ct-2]:Bt);var Lt=Je.Bf(rt),$t=Bt.Bf(ct);Je=Lt>$t+10?0<=se?Je.ab(rt):rt.ab(Je):$t>Lt+10?0<=se?Bt.ab(ct):ct.ab(Bt):0<=se?Je.ab(ct):ct.ab(Je)}else Je=0<=se?rt.ab(Bt):Bt.ab(rt);ge!==Ks&&(Ae=Ae.computeAngle(ne,ge,Je),ne.angle=Ae),Ae=rt.x+(Bt.x-rt.x)*he,Bt=rt.y+(Bt.y-rt.y)*he}if(Ge.ys())ne.location=new jt(Ae,Bt);else{Ge.Mc()&&(Ge=Di),rt=pi.alloc(),rt.reset(),rt.scale(ne.scale,ne.scale),rt.rotate(ne.angle,0,0);var Ht=ne.naturalBounds;ct=bn.allocAt(0,0,Ht.width,Ht.height),Lt=jt.alloc(),Lt.xi(ct,Ge),rt.Ga(Lt),Ge=-Lt.x,$t=-Lt.y;var Kt=Ht.width,Yt=Ht.height;Ht=jt.alloc(),Ht.assign(Se);var ln=isNaN(Se.x),er=isNaN(Se.y);if(ln||er){Kt=Kt/2+3,Yt=Yt/2+3;var ur=45<=Je&&135>=Je,or=225<=Je&&315>=Je;ge===Ks&&(ur||or)?(Ht.x=er?Kt:Se.y,Ht.y=ln?Yt:Se.x,ur?0<=se||isNaN(se)&&.5>he||!ln||(Ht.y=-Yt):or&&((0<=se||isNaN(se)&&.5>he)&&ln&&(Ht.y=-Yt),er&&(Ht.x=-Kt))):(ln&&(Ht.x=0<=se||isNaN(se)&&.5>he?Kt:-Kt),er&&(Ht.y=-Yt),Ht.rotate(Je))}else Ht.rotate(Je);Ae+=Ht.x,Bt+=Ht.y,rt.pp(ct),Ge+=ct.x,$t+=ct.y,se=jt.allocAt(Ae+Ge,Bt+$t),ne.move(se),jt.free(se),jt.free(Ht),jt.free(Lt),bn.free(ct),pi.free(rt)}}E!==null?E.Ul(!1):b.Ul(!1),b=j1(a),a.location.h(a.position.x+b.x,a.position.y+b.y),jt.free(b)}};function i1(a,y,x,b){if(Vl(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof Ki&&a.type===$n.Link&&a.adornedObject instanceof di&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof Un&&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 Ki&&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),Ia(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 Ae=se.measuredBounds,Ge=new bn(-he.left,-he.top,Math.max(Ae.width+ge,0),Math.max(Ae.height+Se,0));a.graduatedBounds.push(Ge),E.assign(Ge);for(var Je=se.geometry,rt=se.strokeWidth,ct=Je.flattenedSegments,Bt=Je.flattenedLengths,Lt=Je.flattenedTotalLength,$t=ct.length,Ht=0,Kt=0,Yt=pn(),ln=0;ln<$t;ln++){var er=ct[ln],ur=[];Kt=Ht=0;for(var or=er.length,Hn=0;Hn<or;Hn+=2){var jn=er[Hn],Qr=er[Hn+1];if(Hn!==0){var Wr=180*Math.atan2(Qr-Kt,jn-Ht)/Math.PI;0>Wr&&(Wr+=360),ur.push(Wr)}Ht=jn,Kt=Qr}Yt.push(ur)}if(a.graduatedIntervals===null){for(var Xi=[],bo=a.O.s,Ja=bo.length,rs=0;rs<Ja;rs++){var Fs=bo[rs],Qa=[];if(Xi.push(Qa),Fs.visible){var Ih=Fs.interval;if(!(0>Ih)){for(var Pa=0;Pa<Ja;Pa++)if(Pa!==rs){var qu=bo[Pa];if(qu.visible&&Fs.constructor===qu.constructor){var Bs=qu.interval;Bs>Ih&&Qa.push(Bs)}}}}}a.graduatedIntervals=Xi}var Dh=a.graduatedIntervals,Jl=a.O.s,bu=Jl.length,Ol=0,Sl=0,fd=Lt;a.graduatedMarks=[];for(var ec,Dp=0;Dp<bu;Dp++){var Nl=Jl[Dp];if(ec=[],Nl.visible&&Nl!==se){var Rs=Math.abs(Nl.interval),Jg=a.graduatedTickUnit;if(!(2>Jg*Rs*Lt/a.graduatedRange&&Nl.graduatedSkip===null)){var Df=Bt[0][0],dc=0,xl=0;Sl=Lt*Nl.graduatedStart-1e-4,fd=Lt*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 di&&!Nl.graduatedSkip(Al,Nl))&&(Ol=(Al-a.graduatedMin)*Lt/a.graduatedRange,Ol>Lt&&(Ol=Lt),Sl<=Ol&&Ol<=fd)){for(var _c=Yt[dc][xl],Fh=Bt[dc][xl];dc<Bt.length;){for(;Ol>Df&&xl<Bt[dc].length-1;)xl++,_c=Yt[dc][xl],Fh=Bt[dc][xl],Df+=Fh;if(Ol<=Df)break;dc++,xl=0,_c=Yt[dc][xl],Fh=Bt[dc][xl],Df+=Fh}var wl=ct[dc],fc=wl[2*xl],K0=wl[2*xl+1],ah=(Ol-(Df-Fh))/Fh,Bp=new jt(fc+(wl[2*xl+2]-fc)*ah+rt/2-Je.bounds.x,K0+(wl[2*xl+3]-K0)*ah+rt/2-Je.bounds.y);Bp.scale(se.scale,se.scale);e:{var tc=_c,qd=Yt[dc];if(!(.5005>ah&&.4995<ah)){var pc=tc;if(.5>ah?0<xl?pc=qd[xl-1]:en.$(wl[0],wl[wl.length-2])&&en.$(wl[1],wl[wl.length-1])&&(pc=qd[qd.length-1]):.5<ah&&(xl+1<qd.length?pc=qd[xl+1]:en.$(wl[0],wl[wl.length-2])&&en.$(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)}Ln(Yt);var fs=a.graduatedMarks;if(fs!==null)for(var qg=b.length,Js=0;Js<qg;Js++){var Ca=b[Js],Qs=fs[Js];if(Ca.visible&&Ca!==se&&Qs.length!==0){if(Ca instanceof di){var sh=a,Bh=E,ef=Ca.alignmentFocus;ef.Mc()&&(ef=Pl);var Gy=Ca.angle;Ca.Kb=0,Ca.measure(1/0,1/0,0,0),Ca.Kb=Gy;var V0=Ca.measuredBounds,_p=V0.width,tf=V0.height,Rf=bn.allocAt(0,0,_p,tf),bl=jt.alloc();bl.xi(Rf,ef),bn.free(Rf);for(var lh=-bl.x,nc=-bl.y,fu=new bn,vd=Qs.length,zp=0;zp<vd;zp++)for(var yd=Qs[zp],Z0=yd.$l.x,$p=yd.$l.y,sa=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(sa+Ca.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(-sa-Ca.angle)}jt.free(bl),sh.graduatedBounds!==null&&sh.graduatedBounds.push(fu),qi(Bh,fu.x,fu.y,fu.width,fu.height)}else if(Ca instanceof Co){var Pu=a,X0=E;Pu.temporaryTextBlock===null&&(Pu.temporaryTextBlock=new Co);var jl=Pu.temporaryTextBlock;S1(jl,Ca);var Rh=Ca.alignmentFocus;Rh.Mc()&&(Rh=Pl);for(var Cu=Ca.segmentOrientation,Gp=Ca.segmentOffset,Sd=new bn,em=0,Hp=0,gc=0,nf=0,xd=0,Up=Qs.length,_h=0;_h<Up;_h++){var zc=Qs[_h];em=zc.$l.x,Hp=zc.$l.y,gc=zc.angle,xd=nf=Ca.angle,Cu!==Ks&&(xd=Cu===Pg||Cu===n0?gc+Ca.angle:gc,nf=Un.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=pi.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=bn.allocAt(0,0,$h,rf),Gh=jt.alloc();Gh.xi(_f,Rh),rc.Ga(Gh);var zf=-Gh.x,Hy=-Gh.y,ch=jt.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 bn(em,Hp,zh.width,zh.height),tm=new bn(zh.x,zh.y,zh.width,zh.height),Uy=new bn(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),jt.free(ch),jt.free(Gh),bn.free(_f),pi.free(rc)}Pu.graduatedBounds!==null&&Pu.graduatedBounds.push(Sd),qi(X0,Sd.x,Sd.y,Sd.width,Sd.height)}Ia(Ca,!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,Ae=0;Ae<Se;Ae++){var Ge=he[Ae],Je=ge[Ae],rt=Je.length;if(Ge.visible&&Ge!==te&&Je.length!==0){if(Ge instanceof di){if(!(2>a.graduatedTickUnit*Ge.interval*te.geometry.flattenedTotalLength/a.graduatedRange*ne&&Ge.graduatedSkip===null)){var ct=Ge.measuredBounds,Bt=Ge.strokeWidth*Ge.scale,Lt=Ge.alignmentFocus;Lt.Mc()&&(Lt=Pl);for(var $t=0;$t<rt;$t++){var Ht=Je[$t].$l,Kt=Je[$t].angle,Yt=Lt,ln=Ge.Ab;ln.reset(),ln.translate(Ht.x+se.x,Ht.y+se.y),ln.rotate(Kt+Ge.angle,0,0),ln.translate(-ct.width*Yt.x+Yt.offsetX+Bt/2,-ct.height*Yt.y+Yt.offsetY+Bt/2),ln.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),Bt=0;Bt<rt;Bt++)Lt=Je[Bt],Lt.actualBounds&&Lt.measuredBounds&&Lt.naturalBounds&&(ct.ec=Lt.text||"",ct.Kb=Lt.Sz||0,ct.Gc=Lt.lineCount||0,$t=Lt.lines,$t!==void 0&&(ct.Cb=$t[0],ct.Ih=$t[1],ct.df=$t[2],ct.Le=$t[3],ct.Qc=$t[4],ct.Qb=$t[5],ct.ze=$t[6]),Lt.naturalBounds&&(ct.dc=Lt.naturalBounds),Lt.actualBounds&&($t=Lt.actualBounds,ct.arrange($t.x,$t.y,$t.width,$t.height)),$t=Lt.actualBounds,ct.arrange($t.x,$t.y,$t.width,$t.height),Ht=Lt.measuredBounds,Lt=Lt.naturalBounds,Kt=ct.Ab,Kt.reset(),Kt.translate($t.x+se.x,$t.y+se.y),Kt.translate(-Ht.x,-Ht.y),ct.no(Kt,Lt.x,Lt.y,Lt.width,Lt.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 $n(a,y){if(Qt.call(this),this.na=null,a===void 0)this.na=$n.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=$n.Position,y=a);this.na===null&&Wt("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===$n.Grid?1048576:0),this.O=new Tn,this.yb=Cs,this.Tm=oo,this.Uf=ri,this.$g=null,this.$e="",this.jg=new bn(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=pr,this.jn=Uo,this.kn=ji,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}un($n,Qt),$n.prototype.cloneProtected=function(a){Qt.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},$n.prototype.Af=function(a){Qt.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},$n.prototype.copy=function(){var a=Qt.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(la,"elements",a,null,E,null,ne)}}return a}return null},tt=$n.prototype,tt.toString=function(){return"Panel("+this.type.name+")#"+zi(this)},tt.Pn=function(a){Qt.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,b=0;b<x;b++)y[b].Pn(a)},tt.hh=function(a,y){if(this.na===$n.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===$n.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===$n.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===$n.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 Ae=ge.separatorStroke;if(Ae===null&&(Ae=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),Se!==0&&Ae!==null){oa(a,y,Ae,!1,!1,ne,te),Ae=!1;var Ge=ge.separatorDashArray;Ge===null&&(Ge=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),Ge!==null&&(Ae=!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(),Ae&&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 Ae=b[Se];if(Ae!==void 0&&Ae.background!==null&&Ae.coversSeparators!==E&&Ae.actual!==0){var Ge=x?ne.height:ne.width;if(!(Ae.position>Ge)){var Je=Ae.Wc(),rt=Ae.separatorStrokeWidth;isNaN(rt)&&(rt=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var ct=Ae.separatorStroke;ct===null&&(ct=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(ct===null||Ae.index===(x?he:ge))&&(rt=0),Je-=rt,rt=Ae.position+rt,Je+=Ae.actual,rt+Je>Ge&&(Je=Ge-rt),0>=Je||(Ge=a.yb,oa(a,y,Ae.background,!0,!1,se,ne),x?y.fillRect(Ge.left,rt+Ge.top,ne.width-(Ge.left+Ge.right),Je):y.fillRect(rt+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"}tt.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},tt.kk=function(a,y,x){if(!Qt.prototype.kk.call(this,a,y,x))return!1;if(this.type===$n.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===$n.Grid||this.na===$n.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},tt.nk=function(){return!0},tt.$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 Qt.prototype.$o.call(this,a,y,x,b)},tt.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,Ae=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,en.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*Ae+Je,a=x*he+b*Se+Ge,he=x*ge+b*Ae+Je,E.h(0,0),x=this.naturalBounds,te=en.Ff(0,0,x.width,x.height,te,se,a,he,E),E.transform(ne),te;te||(he=1,Se=ge=0,Ae=1,Je=Ge=0),se=a*he+y*Se+Ge,a=a*ge+y*Ae+Je,he=x*he+b*Se+Ge,x=x*ge+b*Ae+Je,E.h(he,x),b=(he-se)*(he-se)+(x-a)*(x-a),ge=!1,Ae=this.O.s,Je=Ae.length,Se=jt.alloc(),Ge=null,y=1/0;var rt=null,ct=this.isClipping&&this.na===$n.Spot;ct&&(rt=jt.alloc(),Ge=this.Pb(),(ge=Ge.Sj(se,a,he,x,rt))&&(y=(se-rt.x)*(se-rt.x)+(a-rt.y)*(a-rt.y)));for(var Bt=0;Bt<Je;Bt++){var Lt=Ae[Bt];Lt.visible&&Lt!==Ge&&Lt.Sj(se,a,he,x,Se)&&(ge=!0,Lt=(se-Se.x)*(se-Se.x)+(a-Se.y)*(a-Se.y),Lt<b&&(b=Lt,E.set(Se)))}return ct&&(y>b&&E.set(rt),jt.free(rt)),jt.free(Se),te&&E.transform(ne),ge},tt.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();Qt.prototype.Gj.call(this)},tt.v=function(a){if(!Vl(this)){Qt.prototype.v.call(this,a),a=null,(this.na===$n.Auto||this.na===$n.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 Ws||E instanceof $n||E instanceof Co||te!==Fn)&&E.v(!0)}}}},tt.Uj=function(){if(!Vl(this)){Ia(this,!0),Mc(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},tt.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()}},tt.Wu=function(){au(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},tt.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),ma(E,a,he),ma(this.naturalBounds,a,he),this.Ge(0,0,a,he)},tt.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}tt.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=Fn),a){case Fn:(y>x||te>b)&&(this.v(),this.measure(y>x?x:y,te>b?b:te,0,0));break;case zn:this.v(!0),this.measure(x+se,b+ne,0,0);break;case Pr:this.v(!0),this.measure(x+se,te+ne,0,0);break;case Ir:this.v(!0),this.measure(y+se,b+ne,0,0)}}this.na.arrange(this,E,this.jg)}},tt.gh=function(a){var y=this.naturalBounds,x=nh(this);if(No(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var b=y.length,E=jt.allocAt(0,0);b--;){var te=y[b];if((te.visible||te===x)&&(gi(E.set(a),te.transform),te.ca(E)))return jt.free(E),!0}return jt.free(E),!(this.Ma===null&&this.areaBackground===null)}return!1},tt.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},tt.qm=function(a,y){if(y(this,a),a instanceof $n){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 $n&&s1(a,te,x)}}function yx(a,y){l1(a,a,y)}function l1(a,y,x){if(x(y),y instanceof $n){y=y.O.s;for(var b=y.length,E=0;E<b;E++)l1(a,y[E],x)}}tt.Nl=function(a){return u1(this,this,a)};function u1(a,y,x){if(x(y))return y;if(y instanceof $n){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}tt.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 $n){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 $n?x=Math.max(x,c1(E)):E instanceof di&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}tt.se=function(){return!(this.type===$n.TableRow||this.type===$n.TableColumn)};function Ch(a){return a.type===$n.TableRow||a.type===$n.TableColumn}tt.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),Hs(this)))return null;var b=this.naturalBounds,E=1/this.Df(),te=this.se(),ne=te?a:gi(jt.allocAt(a.x,a.y),this.transform),se=this.diagram,he=10,ge=5;if(se!==null&&(he=se.Ql("extraTouchArea"),ge=he/2),No(-(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=jt.alloc(),ge=(he=this.isClipping&&this.na===$n.Spot)?this.Pb():null,he&&(ge.se()?gi(se.set(a),ge.transform):se.set(a),!ge.ca(se)))return jt.free(se),te||jt.free(ne),null;for(var Ae=nh(this);Se--;){var Ge=E[Se];if((Ge.visible||Ge===Ae)&&(Ge.se()?gi(se.set(a),Ge.transform):se.set(a),!he||Ge!==ge)){var Je=null;if(Ge instanceof $n?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 jt.free(se),te||jt.free(ne),Je}}jt.free(se)}return this.background===null&&this.areaBackground===null?(te||jt.free(ne),null):(a=No(0,0,b.width,b.height,ne.x,ne.y)?this:null,te||jt.free(ne),a)}return te||jt.free(ne),null},tt.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:gi(jt.allocAt(a.x,a.y),this.transform);if(E=No(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=jt.alloc(),Se=nh(this);he--;){var Ae=se[he];if(Ae.visible||Ae===Se){Ae.se()?gi(ge.set(a),Ae.transform):ge.set(a);var Ge=Ae;Ae=Ae instanceof $n?Ae:null,(Ae!==null?Ae.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))}}jt.free(ge)}return te||jt.free(ne),E&&(this.background!==null||this.areaBackground!==null)}return te||jt.free(ne),!1},tt.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=pi.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&pi.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 Ae=Se.actualBounds,Ge=this.naturalBounds;Ae.x>Ge.width||Ae.y>Ge.height||0>Ae.x+Ae.width||0>Ae.y+Ae.height||(Ae=Se,Se=Se instanceof $n?Se:null,Ge=pi.alloc(),Ge.set(ne),(Se!==null?Se.Cf(a,y,x,b,E,Ge):Ya(Ae,a,b,Ge))&&(y!==null&&(Ae=y(Ae)),Ae===null||x!==null&&!x(Ae)||E.add(Ae)),pi.free(Ge))}}return te===void 0&&pi.free(ne),b}return te===void 0&&pi.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 $n&&vv(ne,y,x,b),y!==null&&(ne=y(ne)),ne===null||x!==null&&!x(ne)||b.add(ne))}}}tt.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:gi(jt.allocAt(a.x,a.y),this.transform),ge=se?y:gi(jt.allocAt(y.x,y.y),this.transform),Se=he.Bf(ge),Ae=0<he.x&&he.x<ne.width&&0<he.y&&he.y<ne.height||Vi(he.x,he.y,0,0,0,ne.height)<=Se||Vi(he.x,he.y,0,ne.height,ne.width,ne.height)<=Se||Vi(he.x,he.y,ne.width,ne.height,ne.width,0)<=Se||Vi(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||(jt.free(he),jt.free(ge)),Ae){if(!this.isAtomic){he=jt.alloc(),ge=jt.alloc(),Se=nh(this);for(var Ge=this.O.s,Je=Ge.length;Je--;){var rt=Ge[Je];if(rt.visible||rt===Se){var ct=rt.actualBounds,Bt=this.naturalBounds;(!se||!(ct.x>Bt.width||ct.y>Bt.height||0>ct.x+ct.width||0>ct.y+ct.height))&&(rt.se()?(ct=rt.transform,gi(he.set(a),ct),gi(ge.set(y),ct)):(he.set(a),ge.set(y)),ct=rt,rt=rt instanceof $n?rt:null,(rt!==null?rt.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)))}}jt.free(he),jt.free(ge)}return E?Ae:ne}return!1};function yv(a){var y=null;return a instanceof di&&(y=a.spot1,y===oo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=Wa),y}function Sv(a){var y=null;return a instanceof di&&(y=a.spot2,y===oo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=As),y}tt.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},tt.M=function(a){return this.O.M(a)},tt.Gb=function(a,y){y instanceof Lr&&Wt("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&Wt("Cannot make a Panel contain itself: "+this.toString()),Wt("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&Wt("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!==$n.Grid||y instanceof di||Wt("Can only add Shapes to a Grid Panel, not: "+y),this.na!==$n.Graduated||y instanceof di||y instanceof Co||Wt("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 cr),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 Wt("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),Vl(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof $n&&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(Oa,"elements",this,y,null,b,null),x.cb(la,"elements",this,null,y,null,a)))};function xv(a,y){a.l=y?a.l|16777216:a.l&-16777217}tt.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)},tt.mb=function(a){0<=a&&this.pc(a,!0)},tt.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),Ia(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 $n?b.qm(b,function(ne,se){Hv(te,se,y)}):Hv(te,b,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||te.cb(Oa,"elements",this,b,null,a,null))},tt.Fb=function(a){0>a&&Wn(a,">= 0",$n,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Da;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(la,"rowdefs",this,null,x,null,a)}return y[a]},tt.oA=function(a){if(0>a&&Wn(a,">= 0",$n,"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(Oa,"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 Da?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}tt.Eb=function(a){0>a&&Wn(a,">= 0",$n,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Da;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(la,"coldefs",this,null,x,null,a)}return y[a]},tt.jA=function(a){if(0>a&&Wn(a,">= 0",$n,"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(Oa,"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 Da?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}tt.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},tt.Hy=function(a,y){return(a=this.Fb(a))&&Nm(a,new Da(y)),this},tt.By=function(a,y){return(a=this.Eb(a))&&Nm(a,new Da(y)),this},tt.nz=function(a){if(0>a||this.type!==$n.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},tt.fz=function(a){if(0>a||this.type!==$n.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},tt.Fz=function(a,y){if(y===void 0&&(y=new jt(NaN,NaN)),this.type!==$n.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)},tt.Gz=function(a){if(this.type!==$n.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&&Wt("Template cannot have .data be non-null: "+a),a.allBindings=y=new Tn;else if(y._isFrozen)return;var x=new Tn;xv(a,!1),a.qm(a,function(ge,Se){Se.th();var Ae=Se.localBindings;if(Ae!==null)for(xf(Se,!1),Ae=Ae.iterator;Ae.next();){var Ge=Ae.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 Tn),Je.srcBindings.add(Ge))),y.add(Ge)}if(Se instanceof $n&&Se.type===$n.Table){if(0<Se.rowCount){for(ge=Se.rowDefs,Ae=ge.length,Ge=0;Ge<Ae;Ge++)if(Je=ge[Ge],Je!==void 0&&Je.be!==null)for(var rt=Je.be.iterator;rt.next();){var ct=rt.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,Ae=0;Ae<ge;Ae++)if(Ge=Se[Ae],Ge!==void 0&&Ge.be!==null)for(Je=Ge.be.iterator;Je.next();)rt=Je.value,rt.xd=Ge,rt.to=1,rt.wl=Ge.index,y.add(rt)}}});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 Tn),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 $n&&(ne=se.substring(0,he),se=se.substr(he+1),he=te.fb(ne),he!==null?(te=he,E.targetProperty=se):ar('Warning: unable to find GraphObject named "'+ne+'" for Binding: '+E.toString())),te instanceof Da?(ne=zi(te.panel),E.Ai=ne===void 0?-1:ne,te.panel.bindingId=E.Ai):te instanceof Qt?(ne=zi(te),E.Ai=ne===void 0?-1:ne,te.bindingId=E.Ai):Wt("Unknown type of binding target: "+te)}y.freeze(),a instanceof Lr&&a.Zc()&&a.Va()}tt.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return yx(y,function(x){x instanceof $n&&(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},tt.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 $n))continue;E===1?te=te.Eb(x.wl):E===2&&(te=te.Fb(x.wl))}te!==void 0&&x.Mv(te,b)}}},tt.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 $n&&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 $n)||te.data!==y[ne])return!0;E++,ne++}return!1}function fg(a){if(a.type===$n.Spot||a.type===$n.Auto)return Math.min(a.O.length,1);if(a.type===$n.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var b=a.M(x);if(!(b instanceof di&&b.isPanelMain))break}return x}return a.type===$n.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof $n&&Ch(a))?1:0}tt.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 $n){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),Vl(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 cr),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 $n){var E=y,te=x;b.type===$n.TableRow?b.row=E:b.type===$n.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=ga(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;Wt("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,ar('No item template Panel found for category "'+y+'" on '+a),ar(" Using default item template."),a=new $n,y=new Co,y.bind(new ba("text","",Gn)),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 $n){y=y.O.s,b=y.length;for(var E=0;E<b;E++){var te=y[E];x&&te instanceof $n&&!te.isEnabled||Om(a,te,x)}}}function cc(a,y){y.name=a,Ou.add(a,y)}Dt.Object.defineProperties($n.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===$n.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&&Wn(a,">= 0",$n,"padding"),a=new Mr(a)):(0>a.left&&Wn(a.left,">= 0",$n,"padding:value.left"),0>a.right&&Wn(a.right,">= 0",$n,"padding:value.right"),0>a.top&&Wn(a.top,">= 0",$n,"padding:value.top"),0>a.bottom&&Wn(a.bottom,">= 0",$n,"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 Mr(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 so)&&(a instanceof so&&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)||Wt("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 so)&&(a instanceof so&&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)||Wt("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||Wt("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()||Wt("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&&Oo(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&&Oo(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)&&Wt("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)&&Wt("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 Lr&&!(this instanceof Ki);Su(this),this.ub=a;var b=this.diagram;b!==null&&(x?(x=b.partManager,this instanceof Un?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof Lr&&(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 cr}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof Lr||a.isPanelMain)&&Wt("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(););mi(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&&(mi(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 ei&&(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))}}}),Dt.Object.defineProperties($n,{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")}}}),$n.prototype.rebuildItemElements=$n.prototype.mv,$n.prototype.findItemPanelForData=$n.prototype.sx,$n.prototype.updateTargetBindings=$n.prototype.La,$n.prototype.copyTemplate=$n.prototype.Uy,$n.prototype.graduatedValueForPoint=$n.prototype.Gz,$n.prototype.graduatedPointForValue=$n.prototype.Fz,$n.prototype.findColumnForLocalX=$n.prototype.fz,$n.prototype.findRowForLocalY=$n.prototype.nz,$n.prototype.addColumnDefinition=$n.prototype.By,$n.prototype.addRowDefinition=$n.prototype.Hy,$n.prototype.addRowColumnDefinition=$n.prototype.Gy,$n.prototype.removeColumnDefinition=$n.prototype.jA,$n.prototype.getColumnDefinition=$n.prototype.Eb,$n.prototype.removeRowDefinition=$n.prototype.oA,$n.prototype.getRowDefinition=$n.prototype.Fb,$n.prototype.removeAt=$n.prototype.mb,$n.prototype.remove=$n.prototype.remove,$n.prototype.insertAt=$n.prototype.Gb,$n.prototype.elt=$n.prototype.M,$n.prototype.add=$n.prototype.add,$n.prototype.findObject=$n.prototype.fb,$n.prototype.findInVisualTree=$n.prototype.Nl,$n.prototype.walkVisualTreeFrom=$n.prototype.qm,$n.prototype.findMainElement=$n.prototype.Pb;var g1=!1,m1=null,Ou=new cr;$n.className="Panel",$n.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 Da(a){fi(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=oo,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Cv,this.hg=ri,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))}Da.prototype.copy=function(){var a=new Da;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=tn(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=tn(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}tt=Da.prototype,tt.qb=function(a){a.classType===Da&&(this.sizing=a)},tt.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+zi(this)},tt.wi=function(a){this.Me=a},tt.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)},tt.Wc=function(){var a=0,y=this.Me,x=0,b=this.isRow;if(y!==null&&y.type===$n.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)},tt.Ob=function(a,y,x){var b=this.Me;if(b!==null&&(b.cb(Go,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}tt.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new ba(a,y,x,b):E=a,E.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&f1(y)&&Wt("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+E+" on "+a)),this.be===null&&(this.be=new Tn),this.be.add(E),this},Dt.Object.defineProperties(Da.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&&Wn(a,">= 0",Da,"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&&Wn(a,">= 0",Da,"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))&&Wn(a,">= 0",Da,"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&&Wn(a,">= 0",Da,"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 Mr(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 so&&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)||Wt("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 so&&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}}}),Da.prototype.computeEffectiveSpacing=Da.prototype.Wc,Da.prototype.computeEffectiveSpacingTop=Da.prototype.Io;var Cv=new yn(Da,"Default",0),pg=new yn(Da,"None",1),jm=new yn(Da,"ProportionalExtra",2);Da.className="RowColumnDefinition",Da.Default=Cv,Da.None=pg,Da.ProportionalExtra=jm;function di(a,y){Qt.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(di,Qt),di.prototype.cloneProtected=function(a){Qt.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=tn(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())}tt=di.prototype,tt.th=function(){Qt.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},tt.qb=function(a){a===Fn||a===pr||a===Mi||a===ri?this.geometryStretch=a:Qt.prototype.qb.call(this,a)},tt.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+zi(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,Ae,Ge,Je,rt,ct=0,Bt=pn(),Lt=2;Lt<E;Lt+=2)ge=x[Lt],Se=x[Lt+1],Ae=ge-se,se=Se-he,Ae===0&&(Ae=.001),Ge=se/Ae,Je=Math.atan2(se,Ae),rt=Math.sqrt(Ae*Ae+se*se),Bt.push([Ae,Je,Ge,rt]),ct+=rt,se=ge,he=Se;se=x[0],he=x[1],Ae=b.measuredBounds.width,b instanceof di&&(Ae-=b.strokeWidth),1>Ae&&(Ae=1),E=x=Ae,ge=ne/2,Se=ge!==0,Lt=0,rt=Bt[Lt],Ae=rt[0],Je=rt[1],Ge=rt[2],rt=rt[3];for(var $t=0;.1<=ct;){if($t===0&&(Se?(E=x,E-=ge,ct-=ge,Se=!1):E=x,E===0&&(E=1)),E>ct){Ln(Bt);return}E>rt?($t=E-rt,E=rt):$t=0;var Ht=Math.sqrt(E*E/(1+Ge*Ge));if(0>Ae&&(Ht=-Ht),se+=Ht,he+=Ge*Ht,a.translate(se,he),a.rotate(Je),a.translate(-(ne/2),-(te/2)),$t===0&&b.hh(a,y),a.translate(ne/2,te/2),a.rotate(-Je),a.translate(-se,-he),ct-=E,rt-=E,$t!==0){if(Lt++,Lt===Bt.length){Ln(Bt);return}rt=Bt[Lt],Ae=rt[0],Je=rt[1],Ge=rt[2],rt=rt[3],E=$t}}Ln(Bt)}}tt.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&&oa(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===$n.Link&&se instanceof Ki&&se.category==="Selection"&&se.adornedObject instanceof di&&se.adornedPart.Pb()===se.adornedObject?se.adornedObject.strokeWidth:0),he===0&&(x=null),x!==null&&he!==0&&(oa(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===Zn.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===Zn.u){var ge=E.startX;he=E.startY;var Se=E.endX,Ae=E.endY;E=Math.min(ge,Se);var Ge=Math.min(he,Ae);ge=Math.abs(Se-ge),he=Math.abs(Ae-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===Zn.F)ge=E.startX,he=E.startY,Se=E.endX,Ae=E.endY,E=Math.abs(Se-ge)/2,Ge=Math.abs(Ae-he)/2,ge=Math.min(ge,Se)+E,he=Math.min(he,Ae)+Ge,a.beginPath(),a.moveTo(ge,he-Ge),a.bezierCurveTo(ge+en.wg*E,he-Ge,ge+E,he-en.wg*Ge,ge+E,he),a.bezierCurveTo(ge+E,he+en.wg*Ge,ge+en.wg*E,he+Ge,ge,he+Ge),a.bezierCurveTo(ge-en.wg*E,he+Ge,ge-E,he+en.wg*Ge,ge-E,he),a.bezierCurveTo(ge-E,he-en.wg*Ge,ge-en.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===Zn.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,Ae=Se.length;for(var Je=null,rt=0;rt<Ae;rt++){var ct=Se[rt];switch(ct.type){case ya: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 da:if(ct.radiusX===ct.radiusY){var Bt=Math.PI/180;a.arc(ct.point1X,ct.point1Y,ct.radiusX,ct.startAngle*Bt,(ct.startAngle+ct.sweepAngle)*Bt,0>ct.sweepAngle,Je!==null?Je.endX:ge.startX,Je!==null?Je.endY:ge.startY)}else if(Je=rl(ct,ge),Bt=Je.length,Bt===0)a.lineTo(ct.centerX,ct.centerY);else for(var Lt=0;Lt<Bt;Lt++){var $t=Je[Lt];Lt===0&&a.lineTo($t[0],$t[1]),a.bezierCurveTo($t[2],$t[3],$t[4],$t[5],$t[6],$t[7])}break;case _l:if(Lt=Bt=0,Je!==null&&Je.type===da){if(Je=rl(Je,ge),$t=Je.length,$t===0){a.lineTo(ct.endX,ct.endY);break}Je=Je[$t-1]||null,Je!==null&&(Bt=Je[6],Lt=Je[7])}else Bt=Je!==null?Je.endX:ge.startX,Lt=Je!==null?Je.endY:ge.startY;if(Je=zs(ct,ge,Bt,Lt),Bt=Je.length,Bt===0){a.lineTo(ct.endX,ct.endY);break}for(Lt=0;Lt<Bt;Lt++)$t=Je[Lt],a.bezierCurveTo($t[2],$t[3],$t[4],$t[5],$t[6],$t[7]);break;default:Wt("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===Zn.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===Zn.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,Ae=0;Ae<Se;Ae++){switch(rt=ge[Ae],rt.type){case ya:fp(a,y,b,x),b.length=0,b.push(rt.endX),b.push(rt.endY),ne=rt.endX,E=rt.endY,he=ne,Ge=E;break;case Po:b.push(rt.endX),b.push(rt.endY),ne=rt.endX,E=rt.endY;break;case ss:en.Qe(ne,E,rt.point1X,rt.point1Y,rt.point2X,rt.point2Y,rt.endX,rt.endY,.5,b),ne=rt.endX,E=rt.endY;break;case Cl:en.ep(ne,E,rt.point1X,rt.point1Y,rt.endX,rt.endY,.5,b),ne=rt.endX,E=rt.endY;break;case da:if(ct=rl(rt,se),Je=ct.length,Je===0){b.push(rt.centerX),b.push(rt.centerY),ne=rt.centerX,E=rt.centerY;break}for(Bt=0;Bt<Je;Bt++)Lt=ct[Bt],en.Qe(ne,E,Lt[2],Lt[3],Lt[4],Lt[5],Lt[6],Lt[7],.5,b),ne=Lt[6],E=Lt[7];break;case _l:if(ct=zs(rt,se,ne,E),Je=ct.length,Je===0){b.push(rt.endX),b.push(rt.endY),ne=rt.endX,E=rt.endY;break}for(Bt=0;Bt<Je;Bt++)Lt=ct[Bt],en.Qe(ne,E,Lt[2],Lt[3],Lt[4],Lt[5],Lt[6],Lt[7],.5,b),ne=Lt[6],E=Lt[7];break;default:Wt("Segment not of valid type: "+rt.type)}rt.isClosed&&(b.push(he),b.push(Ge),fp(a,y,b,x))}fp(a,y,b,x)}else if(te.type===Zn.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===Zn.F){if(E=new $a,E.startX=te.endX,E.startY=(te.startY+te.endY)/2,ne=new Ui(da),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],en.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)}Ln(b),a.restore(),a.Vc(!1)}}}},tt.kk=function(a,y,x){return!Qt.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)},tt.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:Qt.prototype.nk.call(this,a)},tt.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)}},tt.ga=function(a,y){if(y===void 0&&(y=new jt),a instanceof Sr){a.Mc()&&Wt("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},tt.mi=function(a){a===void 0&&(a=new bn);var y=this.naturalBounds,x=this.oe;y=bn.allocAt(y.x,y.y,y.width,y.height);var b=this.strokeWidth;return y.Bc(b/2,b/2),b=jt.allocAt(y.x,y.y).transform(x),a.h(b.x,b.y,0,0),b.h(y.right,y.y).transform(x),qi(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),qi(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),qi(a,b.x,b.y,0,0),bn.free(y),jt.free(b),a},tt.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!==Zn.j||y||(E+=2);var te=bn.alloc();if(te.assign(b),te.Bc(E+2,E+2),!te.ca(a))return bn.free(te),!1;if(b=E+1e-4,x.type===Zn.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:(bn.free(te),en.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===Zn.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 bn.free(te),!1;te.Bc(b,b)}return this.stroke!==null&&te.Bc(E,E),a=te.ca(a),bn.free(te),a}if(x.type===Zn.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 bn.free(te),!1;ne+=b,E+=b}return this.stroke!==null&&(ne+=b,E+=b),bn.free(te),0>=ne||0>=E?!1:1>=x*x/(ne*ne)+y*y/(E*E)}if(x.type===Zn.o)return bn.free(te),this.fill===null?ic(x,a.x,a.y,E):$u(x,a,E,1<this.strokeWidth,y);Wt("Unknown Geometry type: "+x.type)},tt.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=en.Ze[se];typeof ge=="string"&&(ge=en.Ze[ge]),typeof ge=="function"?(he=ge(null,100,100),Tv[se]=he):Wt("Unsupported Figure: "+se)}ne=he.bounds}se=ne.width,he=ne.height,ge=ne.width;var Se=ne.height;switch(sl(this,!0)){case Fn:b=x=0;break;case zn:ge=Math.max(a-te,0),Se=Math.max(y-te,0);break;case Pr:ge=Math.max(a-te,0),b=0;break;case Ir:x=0,Se=Math.max(y-te,0)}isFinite(E.width)&&(ge=E.width),isFinite(E.height)&&(Se=E.height);var Ae=this.maxSize,Ge=this.minSize;switch(x=Math.max(x-te,Ge.width),b=Math.max(b-te,Ge.height),ge=Math.min(Ae.width,ge),Se=Math.min(Ae.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 Fn:break;case zn:se=ge,he=Se;break;case pr:x=Math.min(ge/se,Se/he),isFinite(x)||(x=1),se*=x,he*=x;break;default:Wt(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&&en.$(this.ua.Sk,a-te)&&en.$(this.ua.Rk,y-te)||(this.ua=di.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(Ae.width,ge),Se=Math.min(Ae.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===ri?zn:y:y===ri?Tv[a.figure].defaultStretch:y}tt.eh=function(a,y,x,b){Ds(this,a,y,x,b)},tt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},tt.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,Ae=ne*(te.m21*te.dy-te.m22*te.dx),Ge=ne*(te.m12*te.dx-te.m11*te.dy);te=a*se+y*ge+Ae,ne=a*he+y*Se+Ge,se=x*se+b*ge+Ae,he=x*he+b*Se+Ge,Ae=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===Zn.j)if(1.5>=this.strokeWidth)Se=en.Ve(ge.startX,ge.startY,ge.endX,ge.endY,te,ne,se,he,E);else{if(ge.startX===ge.endX?(b=Ae,Se=0):(y=(ge.endY-ge.startY)/(ge.endX-ge.startX),Se=Ae/Math.sqrt(1+y*y),b=Se*y),y=pn(),a=new jt,en.Ve(ge.startX+b,ge.startY+Se,ge.endX+b,ge.endY+Se,te,ne,se,he,a)&&y.push(a),a=new jt,en.Ve(ge.startX-b,ge.startY-Se,ge.endX-b,ge.endY-Se,te,ne,se,he,a)&&y.push(a),a=new jt,en.Ve(ge.startX+b,ge.startY+Se,ge.startX-b,ge.startY-Se,te,ne,se,he,a)&&y.push(a),a=new jt,en.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 Ln(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);Ln(y)}else if(ge.type===Zn.u)Se=en.Ff(Je.x-Ae,Je.y-Ae,Je.x+Je.width+Ae,Je.y+Je.height+Ae,te,ne,se,he,E);else if(ge.type===Zn.F){y=bn.allocAt(Je.x,Je.y,Je.width,Je.height).Bc(Ae,Ae);e:if(y.width===0)Se=en.Ve(y.x,y.y,y.x,y.y+y.height,te,ne,se,he,E);else if(y.height===0)Se=en.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}Ae=Math.sqrt(a*a*x*x+ge*ge-he*he),se=(-(a*a*x*he)+a*ge*Ae)/(ge*ge+a*a*x*x)+b,a=(-(a*a*x*he)-a*ge*Ae)/(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}bn.free(y)}else if(ge.type===Zn.o){Ge=jt.alloc();var rt=se-te,ct=he-ne,Bt=rt*rt+ct*ct,Lt=te,$t=ne;if(0<Bt&&Je.contains(Lt,$t)&&(Ge.x=Lt,Ge.y=$t,this.ca(Ge)))for(rt!==0&&.5>Math.abs(rt)?(ct*=.5/rt,rt=.5):ct!==0&&.5>Math.abs(ct)&&(rt*=.5/ct,ct=.5),Lt-=rt,$t-=ct;Je.contains(Lt,$t);)Lt-=rt,$t-=ct;for(E.x=se,E.y=he,ct=0;ct<ge.figures.count;ct++){var Ht=ge.figures.s[ct],Kt=Ht.isFilled?Lt:te,Yt=Ht.isFilled?$t:ne,ln=Ht.segments;Je=Ht.startX,rt=Ht.startY;for(var er=Je,ur=rt,or=0;or<ln.count;or++){var Hn=ln.s[or],jn=Hn.type,Qr=Hn.endX,Wr=Hn.endY,Xi=!1;switch(jn){case ya:er=Qr,ur=Wr;break;case Po:Xi=Dm(Je,rt,Qr,Wr,Kt,Yt,se,he,Ge);break;case ss:Xi=en.Eo(Je,rt,Hn.point1X,Hn.point1Y,Hn.point2X,Hn.point2Y,Qr,Wr,Kt,Yt,se,he,.6,Ge);break;case Cl:Xi=en.Eo(Je,rt,Je+2/3*(Hn.point1X-Je),rt+2/3*(Hn.point1Y-rt),Qr+2/3*(Hn.point1X-Qr),Wr+2/3*(Hn.point1Y-Wr),Qr,Wr,Kt,Yt,se,he,.6,Ge);break;case da:case _l:jn=Hn.type===da?rl(Hn,Ht):zs(Hn,Ht,Je,rt);var bo=jn.length;if(bo===0){Xi=Dm(Je,rt,Hn.type===da?Hn.centerX:Hn.endX,Hn.type===da?Hn.centerY:Hn.endY,Kt,Yt,se,he,Ge);break}for(Wr=null,Qr=0;Qr<bo;Qr++){if(Wr=jn[Qr],Qr===0&&Dm(Je,rt,Wr[0],Wr[1],Kt,Yt,se,he,Ge)){var Ja=Im(Kt,Yt,Ge,Bt,E);Ja<Bt&&(Bt=Ja,Se=!0)}en.Eo(Wr[0],Wr[1],Wr[2],Wr[3],Wr[4],Wr[5],Wr[6],Wr[7],Kt,Yt,se,he,.6,Ge)&&(Ja=Im(Kt,Yt,Ge,Bt,E),Ja<Bt&&(Bt=Ja,Se=!0))}Qr=Wr[6],Wr=Wr[7];break;default:Wt("Unknown Segment type: "+jn)}Je=Qr,rt=Wr,Xi&&(Xi=Im(Kt,Yt,Ge,Bt,E),Xi<Bt&&(Bt=Xi,Se=!0)),Hn.isClosed&&(Qr=er,Wr=ur,Dm(Je,rt,Qr,Wr,Kt,Yt,se,he,Ge)&&(Hn=Im(Kt,Yt,Ge,Bt,E),Hn<Bt&&(Bt=Hn,Se=!0)))}}te=x-a,ne=b-y,se=Math.sqrt(te*te+ne*ne),se!==0&&(te/=se,ne/=se),E.x-=te*Ae,E.y-=ne*Ae,jt.free(Ge)}else Wt("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(en.$(a,x)&&en.$(y,b)||en.$(E,ne)&&en.$(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||en.$(he.y,a))&&(he.y<y||en.$(he.y,y))&&(ge=!0)):(y=a<x?a:x,a=a<x?x:a,(he.x>y||en.$(he.x,y))&&(he.x<a||en.$(he.x,a))&&(ge=!0)),ge)}tt.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=jt.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)))),jt.free(te),E},tt.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=pi.alloc();x.set(y),x.Vj();var b=a.left,E=a.right,te=a.top;a=a.bottom;var ne=jt.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 jt.free(ne),!0;var se=jt.alloc(),he=jt.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)))),jt.free(ne),pi.free(x),jt.free(se),jt.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)}tt.tx=function(a,y,x){function b(Bt,Lt){for(var $t=Bt.length,Ht=0;Ht<$t;Ht+=2)if(Lt.zd(Bt[Ht],Bt[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,io(a.x,a.y,se,he)<=E&&io(a.x,a.y,ge,he)<=E&&io(a.x,a.y,se,ne)<=E&&io(a.x,a.y,ge,ne)<=E)return!0}if(se=y.startX,he=y.startY,ge=y.endX,ne=y.endY,y.type===Zn.j){if(x=(se-ge)*(a.x-ge)+(he-ne)*(a.y-ne),Vi(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===Zn.u)return y=!1,x&&(y=Vi(a.x,a.y,se,he,se,ne)<=E||Vi(a.x,a.y,se,he,ge,he)<=E||Vi(a.x,a.y,ge,he,ge,ne)<=E||Vi(a.x,a.y,se,ne,ge,ne)<=E),y;if(y.type===Zn.F){y=a.x-(se+ge)/2,te=a.y-(he+ne)/2;var Se=Math.abs(ge-se)/2,Ae=Math.abs(ne-he)/2;if(Se===0||Ae===0)return Vi(a.x,a.y,se,he,ge,ne)<=E;if(x){if(a=en.$y(Se,Ae,y,te),a*a<=E)return!0}else return!(io(y,te,-Se,0)>=E||io(y,te,0,-Ae)>=E||io(y,te,0,Ae)>=E||io(y,te,Se,0)>=E)}else if(y.type===Zn.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&&Vi(a.x,a.y,te,se,te,ge)>E&&Vi(a.x,a.y,te,se,he,se)>E&&Vi(a.x,a.y,he,ge,te,ge)>E&&Vi(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(Ae=se[ge],Ae.type){case ya:case Po:if(ne=Ae.endX,Se=Ae.endY,a.zd(ne,Se)>E)return!1;break;case ss:var Ge=pn();if(en.Qe(ne,Se,Ae.point1X,Ae.point1Y,Ae.point2X,Ae.point2Y,Ae.endX,Ae.endY,.8,Ge),ne=b(Ge,a),Ln(Ge),ne||(ne=Ae.endX,Se=Ae.endY,a.zd(ne,Se)>E))return!1;break;case Cl:if(Ge=pn(),en.ep(ne,Se,Ae.point1X,Ae.point1Y,Ae.endX,Ae.endY,.8,Ge),ne=b(Ge,a),Ln(Ge),ne||(ne=Ae.endX,Se=Ae.endY,a.zd(ne,Se)>E))return!1;break;case da:case _l:Ge=Ae.type===da?rl(Ae,te):zs(Ae,te,ne,Se);var Je=Ge.length;if(Je===0){if(ne=Ae.type===da?Ae.centerX:Ae.endX,Se=Ae.type===da?Ae.centerY:Ae.endY,a.zd(ne,Se)>E)return!1;break}Ae=null;for(var rt=pn(),ct=0;ct<Je;ct++)if(Ae=Ge[ct],rt.length=0,en.Qe(Ae[0],Ae[1],Ae[2],Ae[3],Ae[4],Ae[5],Ae[6],Ae[7],.8,rt),b(rt,a))return Ln(rt),!1;Ln(rt),Ae!==null&&(ne=Ae[6],Se=Ae[7]);break;default:Wt("Unknown Segment type: "+Ae.type)}}return!0}}}return!1},tt.qc=function(){this.ua=null},tt.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=Ka):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new Sr(1-Ka.x,Ka.y)))}di.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var b=Oc[a.toArrow];else a.fromArrow!=="None"?b=Oc[a.fromArrow]:(b=en.Ze[a.figure],typeof b=="string"&&(b=en.Ze[b]),b===void 0&&Wt("Unknown Shape.figure: "+a.figure),b=b(a,y,x),b.Sk=y,b.Rk=x);if(b===null){var E=en.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 en.um)if(E.toLowerCase()===x){b=E;break}if(b!==null)return a=Zn.parse(en.um[b],!1),Oc[b]=a,x!==b&&(Oc[x]=b),b}}return typeof y=="string"?y:y instanceof Zn?a:null}Dt.Object.defineProperties(di.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&&Oo(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=Zn.parse(a);var y=a.normalize();this.geometry=a,this.position=a=jt.allocAt(-y.x,-y.y),jt.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 so&&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 so&&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 Wn(a,"value >= 0",di,"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"?Wn(a,'"butt", "round", or "square"',di,"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"?Wn(a,'"miter", "bevel", or "round"',di,"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)||Wt("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=en.Ze[a];typeof x=="function"?x=a:(x=en.Ze[a.toLowerCase()])||Wt("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?Wt("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?Wt("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:oo},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:oo},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:ri},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))}}}),di.prototype.intersectsRect=di.prototype.Yc,di.prototype.containedInRect=di.prototype.fh,di.prototype.getNearestIntersectionPoint=di.prototype.rs,di.prototype.getDocumentBounds=di.prototype.mi,di.prototype.getDocumentPoint=di.prototype.ga;var Oc=new vr,Tv=new vr;di.className="Shape",di.getFigureGenerators=function(){var a=new cr,y;for(y in en.Ze)y!==y.toLowerCase()&&a.add(y,en.Ze[y]);return a.freeze(),a},di.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),b=en.Ze;b[a]=y,b[x]=a},di.getArrowheadGeometries=function(){var a=new cr;for(b in en.um)if(Oc[b]===void 0){var y=Zn.parse(en.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 Zn&&a.add(x,b)}return a.freeze(),a},di.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=Zn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||Wt("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=ri,this.gg=this.fg=oo}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 Qt.call(this),zm||(ll=ra?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,Qt),Co.prototype.cloneProtected=function(a){Qt.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())}tt=Co.prototype,tt.th=function(){Qt.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}tt.qb=function(a){a.classType===Co?this.wrap=a:Qt.prototype.qb.call(this,a)},tt.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},tt.v=function(){Qt.prototype.v.call(this)},tt.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;oa(this,a,this.xc,!0,!1,x,b),(he||ge)&&oa(this,a,this.xc,!1,!1,x,b),b=0,x=!1;var Se=this.oe,Ae=Se.dx-(ne*Se.m21+Se.dx);Se=Se.dy-(ne*Se.m22+Se.dy);var Ge=y.scale;switch(8>(Ae*Ae+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,Ae=this.spacingBelow,this.flip){case Bi:a.translate(E,0),a.scale(-1,1);break;case yi:a.translate(0,te),a.scale(1,-1);break;case mo:a.translate(E,te),a.scale(-1,-1)}if(a.yc(),Se=this.Gc,Ge=(y+ne+Ae)*Se,te>Ge&&(b=this.verticalAlignment,b=b.y*te-b.y*Ge+b.offsetY),Se===1&&this.ze!==null)Ae=this.Cb,Ae>E&&(Ae=E),this.Oj(this.ze,a,0,b+y,E,ne,Ae,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+Ae}switch(this.flip){case Bi:a.scale(-1,1),a.translate(-E,0);break;case yi:a.scale(1,-1),a.translate(0,-te);break;case mo:a.scale(-1,-1),a.translate(-E,-te)}}},tt.Oj=function(a,y,x,b,E,te,ne,se,he,ge,Se){var Ae=0;if(se)he==="left"?Ae=0:he==="right"?Ae=E-ne:he==="center"&&(Ae=(E-ne)/2),y.fillRect(x+Ae,b+.25*te,ne,1);else{if(he==="left"?Ae=0:he==="right"?Ae=E:he==="center"&&(Ae=E/2),E=Fm!==null?Fm(this,te):.75*te,y.fillText(a,x+Ae,b+E),a=te/20|0,a===0&&(a=1),he==="right"?Ae-=ne:he==="center"&&(Ae-=ne/2),ge){se=Bm!==null?Bm(this,te):.8*te,he=x+Ae,ge=b+se,E=x+Ae+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+Ae,te=Se,x=x+Ae+ne,ne=Se,Ae=a,y.beginPath(),y.lineWidth=Ae,y.moveTo(b,te),y.lineTo(x,ne),y.stroke(),y.Se(),y instanceof Ml&&y.ad.classList.add("gojs-td"))}},tt.kk=function(a,y,x){if(!Qt.prototype.kk.call(this,a,y,x))return!1;if(oa(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},tt.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:Qt.prototype.nk.call(this,a)},tt.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)}},tt.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),ma(this.dc,te,ne),this.Ge(0,0,te,ne),this.svg!==null&&E!==this.Gc&&(this.Uc=!0)},tt.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 Ae=1;for(ge=Nu(y.substr(0,Ae)),Se=0;ge<=x;)Ae++,Se=ge,ge=Nu(y.substr(0,Ae));if(Ae===1){var Ge=ge;te=Math.max(te,ge)}else Ge=Se,te=Math.max(te,Se);if(Ae--,1>Ae&&(Ae=1),gg(a,y.substr(0,Ae),Ge),he++,y=y.substr(Ae),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?(Ae=ge,te=Math.max(te,ge)):(Ae=Se=Nu(y),te=Math.max(te,Se)),gg(a,y,Ae),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=Vn.alloc();Lv(a,te,y,he),E+=he.height,Vn.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}Dt.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:Fn},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:Xa},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),hc(this),this.da.Yr=a,Gs(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=Vn.alloc();Lv(this,this.ec,999999,a);var y=a.width;Vn.free(a),a=w1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),ma(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 so&&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&&Wn(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 yn(Co,"None",0),b1=new yn(Co,"WrapFit",1),Ov=new yn(Co,"WrapDesiredSize",2),P1=new yn(Co,"WrapBreakAll",3),Nv=new yn(Co,"OverflowClip",0),Rm=new yn(Co,"OverflowEllipsis",1),vg=new yn(Co,"FormatTrim",0),C1=new yn(Co,"FormatNone",0),xx=/[ \u200b\u00ad]/,Av=new vr,E1=0,_m=new vr,jv=0,yg="...",T1="",ll=null,zm=!1;Co.className="TextBlock";function Iv(){this.nc=!1,this.Hd=null,this.Xf=Fn,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=Xa,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 vr,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=ra?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){Qt.call(this),this.Eg=null,this.qo="",this.Xg=lo,this.Nk=zn,this.Zg=this.Hd=null,this.Mk=Di,this.Xf=Fn,this.vl=null,this.qn=!1,this.en=!0,this.al=!1,this.bt=this.rl=null,typeof a=="string"?this.source=a:a&&Object.assign(this,a),y&&Object.assign(this,y)}var gp;un(ul,Qt),ul.prototype.cloneProtected=function(a){Qt.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===Fn||a===pr||a===Mi?this.imageStretch=a:Qt.prototype.qb.call(this,a)},ul.prototype.toString=function(){return"Picture("+this.source+")#"+zi(this)};function mp(a){a===void 0&&(a=""),a!==""?gp[a]&&(delete gp[a],$m--):(gp=new vr,$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()||(Ia(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);Ln(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 Ae=he,Ge=se,Je=this.Nk,rt=this.Mk;switch(Je){case Fn:if(this.sourceRect.w())break;Ae>=b.width&&(te=te+rt.offsetX+(Ae*rt.x-b.width*rt.x)),Ge>=b.height&&(ne=ne+rt.offsetY+(Ge*rt.y-b.height*rt.y)),he=Math.min(b.width,Ae),se=Math.min(b.height,Ge);break;case zn:Ae=b.width,Ge=b.height;break;case pr:case Mi:Je===pr?(Je=Math.min(b.height/Ge,b.width/Ae),Ae*=Je,Ge*=Je):Je===Mi&&(Je=Math.max(b.height/Ge,b.width/Ae),Ae*=Je,Ge*=Je,Ae>=b.width&&(te=(te+rt.offsetX+(Ae*rt.x-b.width*rt.x)/Ae)*he),Ge>=b.height&&(ne=(ne+rt.offsetY+(Ge*rt.y-b.height*rt.y)/Ge)*se),he*=1/(Ae/b.width),se*=1/(Ge/b.height),Ae=b.width,Ge=b.height)}Je=this.Df()*y.scale;var ct=Ae*Je*Ge*Je,Bt=he*se/ct,Lt=x.__goCache;Je=null;var $t=wx;if(!E){if(x.sq&&Lt!==void 0&&4<ct&&Bt>$t*$t)for(Lt.gi===null&&(k1(Lt,4,ge,Se,x),k1(Lt,16,ge,Se,x)),E=Lt.gi,ge=E.length,Se=0;Se<ge&&E[Se].ratio*E[Se].ratio<Bt;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=Ae<b.width?rt.offsetX+(b.width*rt.x-Ae*rt.x):0,rt=Ge<b.height?rt.offsetY+(b.height*rt.y-Ge*rt.y):0,this.flip){case Bi:a.translate(Math.min(b.width,Ae),0),a.scale(-1,1);break;case yi:a.translate(0,Math.min(b.height,Ge)),a.scale(1,-1);break;case mo:a.translate(Math.min(b.width,Ae),Math.min(b.height,Ge)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&Lt!==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,rt,Math.min(b.width,Ae),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,rt,Math.min(b.width,Ae),Math.min(b.height,Ge)])}catch(Ht){this.en=!1}a.restore()}else try{a.drawImage(x,te,ne,he,se,E,rt,Math.min(b.width,Ae),Math.min(b.height,Ge)),a instanceof Ml&&(this.bt=[te,ne,he,se,E,rt,Math.min(b.width,Ae),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,Ae),0);break;case yi:a.scale(1,-1),a.translate(0,-Math.min(b.height,Ge));break;case mo:a.scale(-1,-1),a.translate(-Math.min(b.width,Ae),-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===zn||te===Pr?(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===zn||te===Ir?(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)),ma(this.dc,a,y),this.Ge(0,0,a,y)},ul.prototype.eh=function(a,y,x,b){Ds(this,a,y,x,b)},Dt.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||Wt("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()||(Ia(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(ra){var b=null;if(x[a]!==void 0)b=x[a];else if(a!==""){30<$m&&(mp(),x=gp),b=Jn("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 vr,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 Zn,this.mc=null}vp.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new Zn,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 Ui(ya);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 Ui(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 Ui(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 Ui(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 Ui(da);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 Ui(_l,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=en.Ze;b[a]=y,b[x]=a}Ns("Rectangle",function(a,y,x){a="r"+y+","+x;var b=en.Mf[a];return b!==void 0||(b=new Zn(Zn.u),b.endX=y,b.endY=x,en.Nf<en.vm&&(en.Mf[a]=b,en.Nf++)),b}),Ns("Square",function(a,y,x){a="s"+y+","+x;var b=en.Mf[a];return b!==void 0||(b=new Zn(Zn.u),b.endX=y,b.endY=x,b.defaultStretch=pr,en.Nf<en.vm&&(en.Mf[a]=b,en.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=en.Mf[b];if(E!==void 0)return E;var te=a*en.wg;return E=new Zn().add(new $a(a,0,!0).add(new Ui(Po,y-a,0)).add(new Ui(ss,y,a,y-te,0,y,te)).add(new Ui(Po,y,x-a)).add(new Ui(ss,y-a,x,y,x-te,y-te,x)).add(new Ui(Po,a,x)).add(new Ui(ss,0,x-a,te,x,0,x-te)).add(new Ui(Po,0,a)).add(new Ui(ss,a,0,0,te,te,0).close())),1<te&&(E.spot1=new Sr(0,0,te,te),E.spot2=new Sr(1,1,-te,-te)),en.Nf<en.vm&&(en.Mf[b]=E,en.Nf++),E}),Ns("Border","RoundedRectangle"),Ns("Ellipse",function(a,y,x){a="e"+y+","+x;var b=en.Mf[a];return b!==void 0||(b=new Zn(Zn.F),b.endX=y,b.endY=x,b.spot1=zu,b.spot2=Rl,en.Nf<en.vm&&(en.Mf[a]=b,en.Nf++)),b}),Ns("Circle",function(a,y,x){a="c"+y+","+x;var b=en.Mf[a];return b!==void 0||(b=new Zn(Zn.F),b.endX=y,b.endY=x,b.spot1=zu,b.spot2=Rl,b.defaultStretch=pr,en.Nf<en.vm&&(en.Mf[a]=b,en.Nf++)),b}),Ns("TriangleRight",function(a,y,x){return new Zn().add(new $a(0,0).add(new Ui(Po,y,.5*x)).add(new Ui(Po,0,x).close())).pm(0,.25,.5,.75)}),Ns("TriangleDown",function(a,y,x){return new Zn().add(new $a(0,0).add(new Ui(Po,y,0)).add(new Ui(Po,.5*y,x).close())).pm(.25,0,.75,.5)}),Ns("TriangleLeft",function(a,y,x){return new Zn().add(new $a(y,x).add(new Ui(Po,0,.5*x)).add(new Ui(Po,y,0).close())).pm(.5,.25,1,.75)}),Ns("TriangleUp",function(a,y,x){return new Zn().add(new $a(y,x).add(new Ui(Po,0,x)).add(new Ui(Po,.5*y,0).close())).pm(.25,.5,.75,1)}),Ns("Triangle","TriangleUp"),Ns("Diamond",function(a,y,x){return new Zn().add(new $a(.5*y,0).add(new Ui(Po,0,.5*x)).add(new Ui(Po,.5*y,x)).add(new Ui(Po,y,.5*x).close())).pm(.25,.25,.75,.75)}),Ns("LineH",function(a,y,x){return a=new Zn(Zn.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 Zn(Zn.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 Zn().add(new $a(0,x/2,!1).add(new Ui(Po,y,x/2)).add(new Ui(ya,y/2,0)).add(new Ui(Po,y/2,x)))}),Ns("XLine",function(a,y,x){return new Zn().add(new $a(0,x,!1).add(new Ui(Po,y,0)).add(new Ui(ya,0,0)).add(new Ui(Po,y,x)))}),Ns("LineRight",function(a,y,x){return new Zn().add(new $a(.25*y,0,!1).add(new Ui(Po,.75*y,.5*x)).add(new Ui(Po,.25*y,x)))}),Ns("LineDown",function(a,y,x){return new Zn().add(new $a(0,.25*x,!1).add(new Ui(Po,.5*y,.75*x)).add(new Ui(Po,y,.25*x)))}),Ns("LineLeft",function(a,y,x){return new Zn().add(new $a(.75*y,0,!1).add(new Ui(Po,.25*y,.5*x)).add(new Ui(Po,.75*y,x)))}),Ns("LineUp",function(a,y,x){return new Zn().add(new $a(0,.75*x,!1).add(new Ui(Po,.5*y,.25*x)).add(new Ui(Po,y,.75*x)))}),en.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=Jo,this.ir=null,this.jr="",this.lr=oo,this.Gq="",this.Hq=Wa,this.Pq=Rr,this.Kq=jr,this.Up=null,this.Cq=127,this.zr=_i,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 Lr(a,y){a===void 0||a instanceof Ha||typeof a=="string"?$n.call(this,a):($n.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 jt(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new bn,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}un(Lr,$n),Lr.prototype.cloneProtected=function(a){$n.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},tt=Lr.prototype,tt.Af=function(a){$n.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},tt.toString=function(){var a=Mn(this.constructor)+"#"+zi(this);return this.data!==null&&(a+="("+Gn(this.data)+")"),a};function cl(a){a.P===null?a.P=new Dv:a.P.nc&&(a.P=a.P.copy())}tt.th=function(){$n.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},tt.gk=function(a,y,x,b,E,te,ne){var se=this.diagram;se!==null&&(a===la&&y==="elements"?E instanceof $n?Ud(E,function(he){ly(se.partManager,he),Fd(se,he)}):Yh(se,E):a===Oa&&y==="elements"&&(E instanceof $n?Ud(E,function(he){uy(se.partManager,he,se)}):Jp(se,E)),se.cb(a,y,x,b,E,te,ne))},tt.La=function(a){if($n.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 $n&&Ud(E,function(te){te.data!==null&&te.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},Lr.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},Lr.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},Lr.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 cr),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)))}}},Lr.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)}},Lr.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]);Ln(y)}},Lr.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 ei?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof Ki))break e;Su(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=$n.Link),x.adornedObject=y)}if(x!==null){x.type===$n.Link&&x.v(),this.bh("Selection",x);break e}}this.Jf("Selection")}for(Cx(this,a),y=this.adornments;y.next();)y.value.La()}},Lr.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=bn.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(b,x),bn.free(b),Rv(a,!1)}}Lr.prototype.Ge=function(a,y,x,b){var E=this.uc;E.h(a,y,x,b),this.Lb===null&&(this.Lb=new pi);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),this.Lb=te,te.ws()||te.pp(E)},Lr.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=jt.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),jt.free(ne)}},Lr.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},Lr.prototype.moveTo=function(a,y,x){a=jt.allocAt(a,y),this.move(a,x),jt.free(a)},Lr.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())},Lr.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())},Lr.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new cr),y.I(a)!==null)return y.I(a);var x=$n.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 jt),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}Lr.prototype.mi=function(a){return a===void 0&&(a=new bn),a.assign(this.actualBounds)},Lr.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function j1(a){var y=jt.alloc(),x=a.locationObject,b=x.naturalBounds,E=x instanceof di?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}Lr.prototype.arrange=function(){if(Hs(this)===!1)A1(this);else{Mc(this,!1);var a=this.Ib,y=bn.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()||en.B(y.width,a.width)&&en.B(y.height,a.height)||0<=this.vw&&this.C(16),bn.free(y),Rv(this,!1)}},tt=Lr.prototype,tt.Xl=function(a,y){var x=this.diagram;if(x!==null){var b=!1;if(x.Zi===!1&&a.w()){var E=bn.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),bn.free(E)}!(this.G&65536)&&a.D(y)||R1(this,b,x),x.N(),!a.w()&&!y.w()||So(a,y)||(this instanceof nr&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},tt.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 jt(b.x+(a.x-y),b.y+(a.y-x)),this.g("location",b,this.ke.copy())),ed(this)===!1&&Hs(this)===!1&&(Um(this),A1(this)),!0};function I1(a,y,x,b,E){y===null||a instanceof Ki||(y=y.animationManager,y.zb&&Wu(y,a,new jt(b,E),x))}tt.mm=function(a,y,x){var b=this.ke,E=this.pa;if(x){if(b.x===a&&b.y===y)return;ed(this)||Hs(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)},tt.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,jt.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 Ki||Wu(x,a,new jt(te,ne),y),b||y.x===te&&y.y===ne||a.g("position",new jt(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)?(Io(y,b)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(b)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}tt.si=function(){return!0},tt.Zc=function(){return!0},tt.ph=function(){return!1},tt.Dd=function(){return!0};function Bv(a,y,x,b){y.constructor===a.constructor||$1||($1=!0,ar('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),ar(" Old class: "+Mn(a.constructor)+", new class: "+Mn(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)}Lr.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},Lr.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},Lr.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},Lr.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},Lr.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},Lr.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},Lr.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},Lr.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},Lr.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}tt=Lr.prototype,tt.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}tt.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},tt.N=function(){var a=this.diagram;a!==null&&!Hs(this)&&!ed(this)&&this.isVisible()&&this.Ib.w()&&a.N(Vd(this,this.Ib))},tt.v=function(){$n.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof nr&&this.labeledLink!==null&&Gs(this.labeledLink),a.$b(!0))},tt.Vo=function(a){a||(a=this.Ah,a!==null&&Wv(a,this))},tt.Wo=function(a){a||(a=this.Ah,a!==null&&Kv(a,this))},tt.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},tt.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}tt.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}tt.Td=function(a){return a instanceof ei?$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}tt.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof ei&&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 ei&&Wm(y,!1),y instanceof nr&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},Lr.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof nr&&this.isLinkLabel)},Lr.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 Ki)){if(a.add(y),y instanceof nr){if(x&&y instanceof ei)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 Un)for(y=y.labelNodes;y.next();)nd(a,y.value,x,b,E,te)}}Dt.Object.defineProperties(Lr.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?ii: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(Oa,"parts",y,this,null,b,!0),b=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=b&&x.cb(la,"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 Ki?this.type!==$n.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:Rr},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:jr},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:Wa},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,Hs(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 Ki)){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 Ki?this instanceof Ki&&(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 Un||(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 Un?(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:Jo},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:oo},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&&Wt("Cannot make a Group a member of itself: "+this.toString()),Wt("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 ei&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?Wv(a,this):this instanceof ei&&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 ei){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 Wt("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:_i},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))}}}),Lr.prototype.invalidateLayout=Lr.prototype.C,Lr.prototype.findCommonContainingGroup=Lr.prototype.px,Lr.prototype.isMemberOf=Lr.prototype.Td,Lr.prototype.findTopLevelPart=Lr.prototype.sz,Lr.prototype.findSubGraphLevel=Lr.prototype.oz,Lr.prototype.ensureBounds=Lr.prototype.Va,Lr.prototype.getDocumentBounds=Lr.prototype.mi,Lr.prototype.findObject=Lr.prototype.fb,Lr.prototype.moveTo=Lr.prototype.moveTo,Lr.prototype.invalidateAdornments=Lr.prototype.Wb,Lr.prototype.clearAdornments=Lr.prototype.Ej,Lr.prototype.removeAdornment=Lr.prototype.Jf,Lr.prototype.addAdornment=Lr.prototype.bh,Lr.prototype.findAdornment=Lr.prototype.Pj,Lr.prototype.updateTargetBindings=Lr.prototype.La;var $1=!1;Lr.className="Part",Lr.LayoutNone=0,Lr.LayoutAdded=1,Lr.LayoutRemoved=2,Lr.LayoutShown=4,Lr.LayoutHidden=8,Lr.LayoutNodeSized=16,Lr.LayoutGroupLayout=32,Lr.LayoutNodeReplaced=64,Lr.LayoutStandard=127,Lr.LayoutAll=16777215;function Ki(a,y){a===void 0||a instanceof Ha||typeof a=="string"?Lr.call(this,a):(Lr.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(Ki,Lr),Ki.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},Ki.prototype.updateRelationshipsFromData=function(){},Ki.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof Un&&y instanceof di){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 di&&(E.ua=a)}}},Ki.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!Hs(a))},Ki.prototype.Zc=function(){return!1},Ki.prototype.gk=function(a,y,x,b,E,te,ne){if(a===la&&y==="elements"){if(E instanceof Ws)this.$a===null&&(this.$a=E);else if(E instanceof $n){var se=E.Nl(function(he){return he instanceof Ws});se instanceof Ws&&this.$a===null&&(this.$a=se)}}else a===Oa&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof $n&&this.$a.rg(b)&&(this.$a=null));Lr.prototype.gk.call(this,a,y,x,b,E,te,ne)},Ki.prototype.updateAdornments=function(){},Ki.prototype.Lj=function(){},Dt.Object.defineProperties(Ki.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}}}),Ki.className="Adornment";function Gv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=Il,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"?Lr.call(this,a):(Lr.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new Tn,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}un(nr,Lr),nr.prototype.cloneProtected=function(a){Lr.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},tt=nr.prototype,tt.Af=function(a){Lr.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())}tt.th=function(){Lr.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}tt.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=H1(this,a,y,x),a!==null&&a.Sl()},tt.gk=function(a,y,x,b,E,te,ne){a===la&&y==="elements"?this.wc=null:a===Oa&&y==="elements"&&(this.wc=null),Lr.prototype.gk.call(this,a,y,x,b,E,te,ne)},tt.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)}}tt.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(!Lr.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===ja){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){Lr.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 Cr(this.jb),x=this;return y.predicate=function(b){return b.fromNode===x&&b.fromPortId===a||b.toNode===x&&b.toPortId===a},y},tt=nr.prototype,tt.Mo=function(a){a===void 0&&(a=null);var y=new Cr(this.jb),x=this;return y.predicate=function(b){return b.fromNode!==x?!1:a===null?!0:b.fromPortId===a},y},tt.Sd=function(a){a===void 0&&(a=null);var y=new Cr(this.jb),x=this;return y.predicate=function(b){return b.toNode!==x?!1:a===null?!0:b.toPortId===a},y},tt.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 Br(x):ii},tt.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 Br(x):ii},tt.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 Br(x):ii},tt.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new Cr(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},tt.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new Cr(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)},tt=nr.prototype,tt.Vo=function(a){Lr.prototype.Vo.call(this,a),a||(Sg(this),a=this.Yk,a!==null&&eS(a,this))},tt.Wo=function(a){Lr.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},tt.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,Lr.prototype.Lj.call(this)},tt.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 cr: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]);Ln(x)}}}tt.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},tt.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}},tt.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},tt.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},tt.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},tt.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},tt.uz=function(){return Z1(this,this)};function Z1(a,y){return y=y.pg(),y===null?0:1+Z1(a,y)}tt.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new Cr(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},tt.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 Tn,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 Tn,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new Br(x):ii},tt.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 Ae=x?ge.Oo():ge.Po();he.uv=a,Ae.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 Ae=x?Se.Oo():Se.Po();ge.vv=a,Ae.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}Dt.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:Il},set:function(a){typeof a=="number"&&(a=new Mr(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),Gs(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 yn(nr,"SpreadingNone",10),Zm=new yn(nr,"SpreadingEvenly",11),Uv=new yn(nr,"SpreadingPacked",12);nr.className="Node",nr.SpreadingNone=Ex,nr.SpreadingEvenly=Zm,nr.SpreadingPacked=Uv;function ei(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 _o,this.Sc.group=this,this.gl=new Nn,this.tb=this.$p=null,y&&Object.assign(this,y)}un(ei,nr),ei.prototype.cloneProtected=function(a){nr.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof Ws});y instanceof Ws?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())},tt=ei.prototype,tt.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 Un)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},tt.gk=function(a,y,x,b,E,te,ne){if(a===la&&y==="elements"){if(E instanceof Ws)this.$a===null?this.$a=E:this.$a!==E&&Wt("Cannot insert a second Placeholder into the visual tree of a Group.");else if(E instanceof $n){var se=E.Nl(function(he){return he instanceof Ws});se instanceof Ws&&(this.$a===null?this.$a=se:this.$a!==se&&Wt("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===Oa&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof $n&&this.$a.rg(b)&&(this.$a=null));nr.prototype.gk.call(this,a,y,x,b,E,te,ne)},tt.Xl=function(a,y){nr.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==$n.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof $n&&(a=a.Pb()),this.tb===null&&(this.tb=new bn),a.mi(this.tb),a instanceof di&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},tt.eh=function(a,y,x,b){this.nf=this.$a,nr.prototype.eh.call(this,a,y,x,b)},tt.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof Un||y.Va()}),nr.prototype.Va.call(this)},tt.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()&&Hs(y))return!1}else if(y instanceof Un&&y.isVisible()&&Hs(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function Wv(a,y){if(a.Gn.add(y)){y instanceof ei&&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 Un&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function Kv(a,y){if(a.Gn.remove(y)){y instanceof ei&&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 Un&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}tt.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)},ei.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=Sn(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},ei.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var b=!0;for(a=Sn(a).iterator;a.next();){var E=a.value;!y||x.isValidMember(this,E)?E.containingGroup=this:b=!1}return b},ei.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))},tt=ei.prototype,tt.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()))}}},tt.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},tt.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},tt.hz=function(){function a(x,b){x!==null&&(b.add(x),a(x.containingGroup,b))}var y=new Nn;return a(this,y),y},tt.Rj=function(){var a=new Nn;return nd(a,this,!0,0,!0),a.remove(this),a},tt.Zb=function(a){nr.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},ei.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 ei&&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 Un)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!1}ei.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 ei&&te.wasSubGraphExpanded&&(te.wasSubGraphExpanded=!1,q1(te,y,x,b)),te instanceof nr)te.Bd(y),x.Cj(te,b);else if(te instanceof Un)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!0}ei.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=jt.alloc(),nr.prototype.move.call(this,a,y),a=new Nn,y=this.Rj().iterator;y.next();)E=y.value,E instanceof Un&&(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 Un&&(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());jt.free(te)}},Dt.Object.defineProperties(ei.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&&Wt("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)}}}),ei.prototype.expandSubGraph=ei.prototype.expandSubGraph,ei.prototype.collapseSubGraph=ei.prototype.collapseSubGraph,ei.prototype.findSubGraphParts=ei.prototype.Rj,ei.prototype.findContainingGroupChain=ei.prototype.hz,ei.prototype.findExternalNodesConnected=ei.prototype.iz,ei.prototype.findExternalLinksConnected=ei.prototype.Lu,ei.prototype.ensureBounds=ei.prototype.Va,ei.className="Group";function Ws(a){Qt.call(this),this.yb=Cs,this.ko=new bn(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}un(Ws,Qt),Ws.prototype.cloneProtected=function(a){Qt.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},Ws.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return No(0,0,y.width,y.height,a.x,a.y)},Ws.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof ei||a instanceof Ki)||Wt("Placeholder is not inside a Group or Adornment."),a instanceof ei){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(ma(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=jt.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),jt.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 di&&(ne=te.strokeWidth);var se=te.Df(),he=te.naturalBounds,ge=(he.width+ne)*se;ne=(he.height+ne)*se,a.type!==$n.Link&&(se=te.ga(a.category==="Selection"?Wa:a.locationSpot,jt.alloc()),a.location=se,jt.free(se)),isNaN(ge)||isNaN(ne)?(a=te.ga(Wa,jt.alloc()),ge=bn.allocAt(a.x,a.y,0,0),ge.Ye(te.ga(As,a)),ge.Ye(te.ga(Dl,a)),ge.Ye(te.ga(tl,a)),ma(y,ge.width+b||0,ge.height+E||0),this.Ge(-x.left,-x.top,y.width,y.height),jt.free(a),bn.free(ge)):(ma(y,ge+b||0,ne+E||0),this.Ge(-x.left,-x.top,y.width,y.height))}},Ws.prototype.eh=function(a,y,x,b){this.actualBounds.h(a,y,x,b)},Ws.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,b=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof ei&&!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=bn.alloc(),E=this.computeMemberBounds(x);var te=this.yb;return y instanceof ei&&!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)),bn.free(x),b&&y instanceof ei&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Ws.prototype.computeMemberBounds=function(a){if(!(this.part instanceof ei))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 Un&&(!y.computesBoundsIncludingLinks||Vl(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},Dt.Object.defineProperties(Ws.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Mr(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Ws.className="Placeholder";function Un(a){Lr.call(this,$n.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=Ks,this.Om=0,this.Qm=Ks,this.Rm=NaN,this.qj=Jv,this.po=.5,this.wd=null,this.Nb=new Tn().freeze(),this.Tg=this.Mg=null,this.ml=new bn,this.ua=new Zn,this.u=this.o=this.Sf=this.Wf=null,this.su=new jt,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}un(Un,Lr),Un.prototype.cloneProtected=function(a){Lr.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())},tt=Un.prototype,tt.Af=function(a){Lr.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)},tt.qb=function(a){a.classType===Un?(a.value&2)===2?this.routing=a:a===Xl||a===kh||a===wp?this.curve=a:a===bg||a===e0||a===t0?this.adjusting=a:a!==Jv&&a!==Ks&&Wt("Unknown Link enum value for a Link property: "+a):Lr.prototype.qb.call(this,a)},tt.Xc=function(){this.ba===null&&(this.ba=new lg)},tt.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),Hs(a)||ed(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),Hs(a)||ed(a)))},tt.zv=function(){return!1},tt.Av=function(){},tt.Zc=function(){return!1},Un.prototype.computeAngle=function(a,y,x){return Un.computeAngle(y,x)},Un.computeAngle=function(a,y){switch(a){default:case Ks: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=en.bp(y),90<a&&270>a&&(a-=180);break;case Tg:a=en.bp(y+90),90<a&&270>a&&(a-=180);break;case Mg:a=en.bp(y-90),90<a&&270>a&&(a-=180);break;case r0:if(a=en.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return en.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}tt=Un.prototype,tt.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Lr.prototype.oh.call(this)},tt.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},tt.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()}tt.Vo=function(a){if(Lr.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)}},tt.Wo=function(a){if(Lr.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)}},tt.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))},Un.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},Un.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?Lr.prototype.move.call(this,a,!1):(a=jt.allocAt(x.x+b,x.y+E),Lr.prototype.move.call(this,a,!1),jt.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)},Un.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},Un.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},Un.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(Ji),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()===Xl))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()===Xl){if(y===3){x=this.i(0),b=this.i(1);var E=this.i(2);return en.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),en.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},Un.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()===Xl))return this.ua.wx(.5);if(this.computeCurve()===Xl&&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),en.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)},tt=Un.prototype,tt.i=function(a){return this.Nb.s[a]},tt.dd=function(a,y){this.Nb.cd(a,y)},tt.L=function(a,y,x){this.Nb.cd(a,new jt(y,x))},tt.Kz=function(a,y){this.Nb.Gb(a,y)},tt.m=function(a,y,x){this.Nb.Gb(a,new jt(y,x))},tt.ne=function(a){this.Nb.add(a)},tt.yf=function(a,y){this.Nb.add(new jt(a,y))},tt.pv=function(a){this.Nb.mb(a)},tt.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 Tn,te=a.Nb.iterator;te.next();){var ne=te.value;E.add(new jt(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),Gs(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&&ko(ne.animationManager,a,E),a.g("points",te,E)}}tt.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},tt.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 Ae=he[Se];ne=Math.min(Ae.x,ne),se=Math.min(Ae.y,se),Ae.freeze()}if(y.freeze(),ge===te){for(te=0;te<ge;te++)if(Se=E[te],Ae=he[te],Se.x-x!==Ae.x-ne||Se.y-b!==Ae.y-se){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&ko(x.animationManager,this,y),Xm(this),this.g("points",a,y)}},tt.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))}tt.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())}},tt.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()}}},Un.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Tf||(Tf=new nr,Tf.desiredSize=ai,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=ai,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,Ae=this.curve===Xl;this.Wf=ge&&!Se?Ae=!0:!1;var Ge=this.computeAdjusting()===Ks||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(),Ae){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(),Ae=Se=0;var Je=te.x+se/3,rt=te.y+he/3,ct=Je,Bt=rt;en.B(he,0)?Bt=0<se?Bt-ge:Bt+ge:(Se=-se/he,Ae=Math.sqrt(ge*ge/(Se*Se+1)),0>ge&&(Ae=-Ae),ct=(0>he?-1:1)*Ae+Je,Bt=Se*(ct-Je)+rt),Je=te.x+2*se/3,rt=te.y+2*he/3;var Lt=Je,$t=rt;en.B(he,0)?$t=0<se?$t-ge:$t+ge:(Lt=(0>he?-1:1)*Ae+Je,$t=Se*(Lt-Je)+rt),this.Fj(),this.ne(te),this.yf(ct,Bt),this.yf(Lt,$t),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,en.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=bn.alloc(),y.mi(se),he=se.ca(E),Ge.mi(se),ge=se.ca(b),(he||ge)&&(ne=y.ga(Jm(ne),new jt),this.dd(0,this.getLinkPointFromPoint(a,y,ne,E,!0,ne)),x=Ge.ga(Jm(x),new jt),this.dd(1,this.getLinkPointFromPoint(te,Ge,x,b,!1,x))),bn.free(se))}else{Ae=this.isAvoiding,Ge&&(Se&&Ae||ge)&&this.Fj();var Ht=ge?this.computeCurviness():0;Ae=this.getLinkPoint(a,y,ne,!0,Se,b,E),Je=ct=rt=0,(Se||!se||ge)&&(Bt=this.computeEndSegmentLength(a,y,ne,!0),Je=this.getLinkDirection(a,y,Ae,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&&(Bt+=Math.abs(Ht)*(Se?1:2)),Je===0?rt=Bt:Je===90?ct=Bt:Je===180?rt=-Bt:Je===270?ct=-Bt:(rt=Bt*Math.cos(Je*Math.PI/180),ct=Bt*Math.sin(Je*Math.PI/180)),ne.Mc()&&ge&&(Bt=y.ga(Di,jt.alloc()),Lt=jt.allocAt(Bt.x+1e3*rt,Bt.y+1e3*ct),this.getLinkPointFromPoint(a,y,Bt,Lt,!0,Ae),jt.free(Bt),jt.free(Lt))),Bt=this.getLinkPoint(b,E,x,!1,Se,a,y);var Kt=$t=Lt=0;if(Se||!he||ge){var Yt=this.computeEndSegmentLength(b,E,x,!1);Kt=this.getLinkDirection(b,E,Bt,x,!1,Se,a,y),ge&&(he||ne.D(x)||!Se&&ne.x+x.x===1&&ne.y+x.y===1)&&(Kt+=Se?0:30,0>Ht&&(Kt+=180)),0>Kt?Kt+=360:360<=Kt&&(Kt-=360),ge&&(Yt+=Math.abs(Ht)*(Se?1:2)),Kt===0?Lt=Yt:Kt===90?$t=Yt:Kt===180?Lt=-Yt:Kt===270?$t=-Yt:(Lt=Yt*Math.cos(Kt*Math.PI/180),$t=Yt*Math.sin(Kt*Math.PI/180)),x.Mc()&&ge&&(x=E.ga(Di,jt.alloc()),ne=jt.allocAt(x.x+1e3*Lt,x.y+1e3*$t),this.getLinkPointFromPoint(b,E,x,ne,!1,Bt),jt.free(x),jt.free(ne))}x=Ae,(Se||!se||ge)&&(x=new jt(Ae.x+rt,Ae.y+ct)),ne=Bt,(Se||!he||ge)&&(ne=new jt(Bt.x+Lt,Bt.y+$t)),!Ge&&!Se&&se&&3<te&&this.adjustPoints(0,Ae,te-2,ne)?this.dd(te-1,Bt):!Ge&&!Se&&he&&3<te&&this.adjustPoints(1,x,te-1,Bt)?this.dd(0,Ae):!Ge&&(Se?6<=te:4<te)&&this.adjustPoints(1,x,te-2,ne)?(this.dd(0,Ae),this.dd(te-1,Bt)):(this.Fj(),this.ne(Ae),(Se||!se||ge)&&this.ne(x),Se&&this.addOrthoPoints(x,Je,ne,Kt,a,b),(Se||!he||ge)&&this.ne(ne),this.ne(Bt))}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}Un.prototype.getLinkPointFromPoint=function(a,y,x,b,E,te){if(te===void 0&&(te=new jt),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),Ae=E*(a.m12*a.dx-a.m11*a.dy);E=b.x*ne+b.y*he+Se,b=b.x*se+b.y*ge+Ae,ne=x.x*ne+x.y*he+Se,x=x.x*se+x.y*ge+Ae}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)}Un.prototype.getLinkPoint=function(a,y,x,b,E,te,ne,se){if(se===void 0&&(se=new jt),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=jt.alloc(),ge=jt.alloc();var Se=new bn(y.ga(Wa,he),y.ga(As,ge)),Ae=this.computeSpot(!b,ne);a=this.getLinkPoint(te,ne,Ae,!b,E,a,y,ge),(x.Hf(Ru)||x.Hf(_s))&&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),jt.free(he),jt.free(ge)}}return se}}return x=y.ga(Jm(x),jt.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=jt.alloc(),ne=ne.ga(Jm(he),te),E&&(ne=Vv(x,ne)),jt.free(te)),this.getLinkPointFromPoint(a,y,x,ne,b,se),jt.free(x),se},Un.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,jt.alloc()),this.pointsCount>(te?6:2)?(se=E?this.i(1):this.i(this.pointsCount-2),se=te?Vv(he,se.copy()):x):(x=jt.alloc(),se=se.ga(Di,x),jt.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,jt.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},Un.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)},Un.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===oo?aa:y)):(a=y||this.toPort,a===null?a=Di:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===oo?aa:y)),a};function xp(a){return a===aa||a.x===.5&&a.y===.5}function Jm(a){return a.x===.5&&a.y===.5?a:Di}Un.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Ks&&4<this.pointsCount?this.computeMidPoint(new jt):(a=y.Zn,a=a!==null?lS(a,this):null,a!==null?a.Zo:y.ga(Di))},Un.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},Un.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=pi.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&pi.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 Ae=Se.actualBounds,Ge=this.naturalBounds;if(!(Ae.x>Ge.width||Ae.y>Ge.height||0>Ae.x+Ae.width||0>Ae.y+Ae.height)){if(Ae=pi.alloc(),Ae.set(ne),Se instanceof $n)se=Se.Cf(a,y,x,b,E,Ae);else if(this.path===Se){if(Se instanceof di)if(se=a,Ge=b,Se.pickable===!1)se=!1;else if(Ae.multiply(Se.transform),Ge)e:{var Je=se,rt=Ae;if(Se.fh(Je,rt))se=!0;else{if(rt===void 0&&(rt=Se.transform,Je.Re(Se.actualBounds))){se=!0;break e}se=Je.left,Ge=Je.right;var ct=Je.top;Je=Je.bottom;var Bt=jt.alloc(),Lt=jt.alloc(),$t=jt.alloc(),Ht=pi.alloc();Ht.set(rt),Ht.bv(Se.transform),Ht.Vj(),Lt.x=Ge,Lt.y=ct,Lt.transform(Ht),Bt.x=se,Bt.y=ct,Bt.transform(Ht),rt=!1,Kd(Se,Bt,Lt,$t)?rt=!0:(Bt.x=Ge,Bt.y=Je,Bt.transform(Ht),Kd(Se,Bt,Lt,$t)?rt=!0:(Lt.x=se,Lt.y=Je,Lt.transform(Ht),Kd(Se,Bt,Lt,$t)?rt=!0:(Bt.x=se,Bt.y=ct,Bt.transform(Ht),Kd(Se,Bt,Lt,$t)&&(rt=!0)))),pi.free(Ht),jt.free(Bt),jt.free(Lt),jt.free($t),se=rt}}else se=Se.fh(se,Ae)}else se=Ya(Se,a,b,Ae);se&&(Ge=Se,y!==null&&(Ge=y(Se)),Ge&&(x===null||x(Ge))&&E.add(Ge)),pi.free(Ae)}}}return te===void 0&&pi.free(ne),se||this.background!==null||this.areaBackground!==null}return te===void 0&&pi.free(ne),!1},Un.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?Xl:this.curve},Un.prototype.computeCorner=function(){if(this.curve===Xl)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},Un.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},Un.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===Xl&&(a*=1.333)}}return a},Un.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===Ks&&x.bb()}},Un.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),Ln(x)}}return a},Un.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},Un.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},Un.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(!en.$(ge,0)){if(en.$(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 Ae=y.y;se=b.x-ne;var Ge=b.y-Ae;for(he=Math.sqrt(se*se+Ge*Ge),en.$(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),en.$(y,0)||(en.$(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),Ae+y*Math.sin(se)));this.dd(x,b)}}return!0;case t0:if(te=this.i(a),Ae=this.i(x),!te.Xa(y)||!Ae.Xa(b)){E=te.x,te=te.y,ne=Ae.x,Ae=Ae.y,ge=(ne-E)*(ne-E)+(Ae-te)*(Ae-te),se=y.x,Se=y.y,he=b.x,Ge=b.y;var Je=1;if(he-se!==0){var rt=(Ge-Se)/(he-se);Je=Math.sqrt(1+1/(rt*rt))}else rt=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var ct=y.x,Bt=y.y,Lt=.5;ge!==0&&(Lt=((E-ct)*(E-ne)+(te-Bt)*(te-Ae))/ge);var $t=E+Lt*(ne-E),Ht=te+Lt*(Ae-te);y=Math.sqrt((ct-$t)*(ct-$t)+(Bt-Ht)*(Bt-Ht)),Bt<rt*(ct-$t)+Ht&&(y=-y),0<rt&&(y=-y),ct=se+Lt*(he-se),Lt=Se+Lt*(Ge-Se),rt!==0?(y=ct+y/Je,this.L(a,y,Lt-(y-ct)/rt)):this.L(a,ct,Lt+y)}this.dd(x,b)}return!0;case bg:e:{if(this.isOrthogonal&&(E=this.i(a),te=this.i(a+1),ne=this.i(a+2),se=te.x,Se=te.y,Ae=se,ge=Se,en.B(E.y,te.y)?en.B(te.x,ne.x)?Se=y.y:en.B(te.y,ne.y)&&(se=y.x):en.B(E.x,te.x)&&(en.B(te.y,ne.y)?se=y.x:en.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,en.B(E.y,te.y)?en.B(te.x,ne.x)?Se=b.y:en.B(te.y,ne.y)&&(se=b.x):en.B(E.x,te.x)&&(en.B(te.y,ne.y)?se=b.x:en.B(te.x,ne.x)&&(Se=b.y)),this.L(x-1,se,Se),Zv(this))){this.L(a+1,Ae,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}},Un.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=jt.alloc(),Se=jt.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 Ae=x;if(this.isAvoiding){var Ge=this.diagram;if(Ge===null||E===te||this.layer.isTemporary||!ep(Ge)||se.ca(Ae)&&!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,Ae.x),Math.min(Se.y,Ae.y),Math.abs(Se.x-Ae.x),Math.abs(Se.y-Ae.y)))y=!1;else{E=a,te=Ae;var rt=x=null;if(Ge.isVirtualized){Ge=Je.bounds.copy(),Ge.Bc(-Je.Ho,-Je.Go);var ct=jt.alloc();bp(Je,a.x,a.y)||(en.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)):en.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)):en.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,Se.x,Se.y,Ae.x,Ae.y,ct)&&(x=a=ct.copy(),y=ct.ab(Ae))),bp(Je,Ae.x,Ae.y)||(en.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,Ae.x,Ae.y,Se.x,Se.y,ct)?(rt=Ae=ct.copy(),b=Se.ab(ct)):en.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,Se.x,Se.y,ge.x,ge.y,ct)?(rt=Ae=ct.copy(),b=ge.ab(ct)):en.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,ge.x,ge.y,a.x,a.y,ct)&&(rt=Ae=ct.copy(),b=a.ab(ct))),jt.free(ct)}se=se.copy().ed(he),se.Bc(Je.Ho*Je.Os,Je.Go*Je.Os),aS(Je,a,y,Ae,b,se,!0),he=Ac(Je,Ae.x,Ae.y),!Je.abort&&he>=Pp&&(oS(Je),se.Bc(Je.Ho*Je.Hx,Je.Go*Je.Ix),aS(Je,a,y,Ae,b,se,!1),he=Ac(Je,Ae.x,Ae.y)),!Je.abort&&he<Pp&&Ac(Je,Ae.x,Ae.y)!==Oh?(Xv(this,Je,Ae.x,Ae.y,b,!0,ne),se=this.i(2),4>this.pointsCount?(y===0||y===180?(se.x=a.x,se.y=Ae.y):(se.x=Ae.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?en.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)):en.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)&&(en.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)):en.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)),rt!==null&&(b===0||b===180?this.yf(te.x,rt.y):this.yf(rt.x,te.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(ge.copy()),this.ne(Se.copy())),jt.free(ge),jt.free(Se)}},Un.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,Ae=b;for(E===0?Se+=se:E===90?Ae+=he:E===180?Se-=se:Ae-=he,E!==ne&&ge>Xd&&Ac(y,Se,Ae)!==ge-1&&(Ac(y,x-se,b)===ge-1?(E=180,Se=x-se,Ae=b):Ac(y,x+se,b)===ge-1?(E=0,Se=x+se,Ae=b):Ac(y,x,b-he)===ge-1?(E=270,Se=x,Ae=b-he):Ac(y,x,b+he)===ge-1&&(E=90,Se=x,Ae=b+he));ge>Xd&&Ac(y,Se,Ae)===ge-1;)x=Se,b=Ae,E===0?Se+=se:E===90?Ae+=he:E===180?Se-=se:Ae-=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)}Un.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),b=this.i(1),E=Vi(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=Vi(y,a,b.x,b.y,x.x,x.y);b=x,se<E&&(te=ne,E=se)}return te},Un.prototype.qc=function(){this.lk=!1,this.v()},Un.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 di&&(E.ua=this.ua)}}},Un.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===Xl&&3<=y&&!en.$(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=Zn.o,se=N1(a),this.computeShortLength(!0)!==0&&(E=Cf(this,E,!0,te)),yp(se,E.x,E.y,!1),ne===Xl&&3<=y&&!en.$(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=jt.allocAt(b,he),x=jt.alloc(),x.assign(this.i(1)),te=jt.allocAt(b,he),E=jt.allocAt(b,he),ne=this.i(0);for(var ge,Se=this.smoothness/3,Ae=1;Ae<this.pointsCount-1;Ae++){ge=this.i(Ae);var Ge=ne,Je=ge,rt=this.i(Yv(this,ge,Ae,!1));if((!en.$(Ge.x,Je.x)||!en.$(Je.x,rt.x))&&(!en.$(Ge.y,Je.y)||!en.$(Je.y,rt.y))){var ct=Se;isNaN(ct)&&(ct=this.smoothness/3);var Bt=Ge.x;Ge=Ge.y;var Lt=Je.x;Je=Je.y;var $t=rt.x;rt=rt.y;var Ht=ct*Qm(Bt,Ge,Lt,Je);ct*=Qm(Lt,Je,$t,rt),en.$(Ge,Je)&&en.$(Lt,$t)&&(Lt>Bt?rt>Je?(te.x=Lt-Ht,te.y=Je-Ht,E.x=Lt+ct,E.y=Je+ct):(te.x=Lt-Ht,te.y=Je+Ht,E.x=Lt+ct,E.y=Je-ct):rt>Je?(te.x=Lt+Ht,te.y=Je-Ht,E.x=Lt-ct,E.y=Je+ct):(te.x=Lt+Ht,te.y=Je+Ht,E.x=Lt-ct,E.y=Je-ct)),en.$(Bt,Lt)&&en.$(Je,rt)&&(Je>Ge?($t>Lt?(te.x=Lt-Ht,te.y=Je-Ht,E.x=Lt+ct):(te.x=Lt+Ht,te.y=Je-Ht,E.x=Lt-ct),E.y=Je+ct):($t>Lt?(te.x=Lt-Ht,te.y=Je+Ht,E.x=Lt+ct):(te.x=Lt+Ht,te.y=Je+Ht,E.x=Lt-ct),E.y=Je-ct)),(en.$(Bt,Lt)&&en.$(Lt,$t)||en.$(Ge,Je)&&en.$(Je,rt))&&(Bt=.5*(Bt+$t),Ge=.5*(Ge+rt),te.x=Bt,te.y=Ge,E.x=Bt,E.y=Ge),(Ae===1||Ae===2&&en.$(ne.x,this.i(0).x)&&en.$(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,ji)),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),jt.free(y),jt.free(x),jt.free(te),jt.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,ji)),Eh(se,te.x-b,te.y-he,E.x-b,E.y-he,ne.x-b,ne.y-he);else{for(te=jt.alloc(),te.assign(this.i(0)),E=jt.alloc(),E.assign(te),ne=this.computeCorner(),Ae=1,ge=0;Ae<y;){if(Ae=Yv(this,te,Ae,1<Ae),Se=this.i(Ae),Ae>=y-1){if(!te.D(Se))this.computeShortLength(!1)!==0&&(Se=Cf(this,Se.copy(),!1,ji)),Ef(this,se,-b,-he,te,Se,x);else if(ge===0)for(Ae=1;Ae<y;)E.assign(te),Se=this.i(Ae++),Ef(this,se,-b,-he,te,Se,x),te.assign(Se);break}if(ge=Yv(this,Se,Ae+1,Ae<y-3),Ae=-b,Bt=-he,Ge=Se,Lt=this.i(ge),ct=x,en.B(te.y,Ge.y)&&en.B(Ge.x,Lt.x))if(rt=Math.min(ne,Math.abs(Ge.x-E.x)/2),rt=Ht=Math.min(rt,Math.abs(Lt.y-Ge.y)/2),en.B(rt,0))Ef(this,se,Ae,Bt,te,Ge,ct),te.assign(Ge);else{var Kt=Ge.x,Yt=Ge.y;Je=Kt,$t=Yt,Ge.x>te.x?Kt=Ge.x-rt:Kt=Ge.x+rt,Lt.y>Ge.y?$t=Ge.y+Ht:$t=Ge.y-Ht,Lt=jt.allocAt(Kt,Yt),Ef(this,se,Ae,Bt,te,Lt,ct),jt.free(Lt),Gm(se,Ge.x+Ae,Ge.y+Bt,Je+Ae,$t+Bt),te.h(Je,$t)}else en.B(te.x,Ge.x)&&en.B(Ge.y,Lt.y)?(rt=Math.min(ne,Math.abs(Ge.y-E.y)/2),rt=Ht=Math.min(rt,Math.abs(Lt.x-Ge.x)/2),en.B(Ht,0)?(Ef(this,se,Ae,Bt,te,Ge,ct),te.assign(Ge)):(Kt=Ge.x,Yt=Ge.y,Je=Kt,$t=Yt,Ge.y>te.y?Yt=Ge.y-rt:Yt=Ge.y+rt,Lt.x>Ge.x?Je=Ge.x+Ht:Je=Ge.x-Ht,Lt=jt.allocAt(Kt,Yt),Ef(this,se,Ae,Bt,te,Lt,ct),jt.free(Lt),Gm(se,Ge.x+Ae,Ge.y+Bt,Je+Ae,$t+Bt),te.h(Je,$t))):(Ef(this,se,Ae,Bt,te,Ge,ct),te.assign(Ge));E.assign(Se),Ae=ge}jt.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=Zn.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),en.$(a,0)?y:en.$(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;en.$(y.x,te.x)&&en.$(y.y,te.y);){if(x>=E)return E-1;te=a.i(x++)}if(!en.$(y.x,te.x)&&!en.$(y.y,te.y))return x-1;for(var ne=te;en.$(y.x,te.x)&&en.$(te.x,ne.x)&&(!b||(y.y>=te.y?te.y>=ne.y:te.y<=ne.y))||en.$(y.y,te.y)&&en.$(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}Un.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(en.B(E.y,te.y))if(E.x<te.x)for(var Se=0;Se<ge;){var Ae=Math.max(E.x,Math.min(he[Se++]-se,te.x-ne));y.lineTo(Ae+x,te.y+b);for(var Ge=Ae+x,Je=Math.min(Ae+ne,te.x);Se<ge&&(Ae=he[Se],Ae<Je+ne);)Se++,Je=Math.min(Ae+se,te.x);Ae=te.y-ne+b,Je+=x;var rt=te.y+b;a.curve===kh?yp(y,Je,rt,!1):Eh(y,Ge,Ae,Je,Ae,Je,rt)}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,Ae=Math.max(Se-ne,te.x);0<=ge&&(Se=he[ge],Se>Ae-ne);)ge--,Ae=Math.max(Se-se,te.x);Se=te.y-ne+b,Ae+=x,Je=te.y+b,a.curve===kh?yp(y,Ae,Je,!1):Eh(y,Ge,Se,Ae,Se,Ae,Je)}else if(en.B(E.x,te.x))if(E.y<te.y)for(Se=0;Se<ge;){for(Ae=Math.max(E.y,Math.min(he[Se++]-se,te.y-ne)),y.lineTo(te.x+x,Ae+b),Ge=Ae+b,Ae=Math.min(Ae+ne,te.y);Se<ge&&(Je=he[Se],Je<Ae+ne);)Se++,Ae=Math.min(Je+se,te.y);Je=te.x-ne+x,rt=te.x+x,Ae+=b,a.curve===kh?yp(y,rt,Ae,!1):Eh(y,Je,Ge,Je,Ae,rt,Ae)}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&&(Ae=he[ge],Ae>Se-ne);)ge--,Se=Math.max(Ae-se,te.y);Ae=te.x-ne+x,Je=te.x+x,Se+=b,a.curve===kh?yp(y,Je,Se,!1):Eh(y,Ae,Ge,Ae,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 Un){if(he===a)return 0<b.length&&b.sort(function(Se,Ae){return Se-Ae}),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,Ae){return Se-Ae}),b.length}function Mx(a,y,x,b){for(var E=en.B(a.y,y.y),te=b.pointsCount,ne=b.i(0),se=jt.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 Ae=a.y,Ge=y.x,Je=y.y,rt=ne.x;ne=ne.y;var ct=ge.x,Bt=ge.y;if(en.B(Se,Ge)){if(!en.B(Ae,Je)&&en.B(ne,Bt)&&Math.min(Ae,Je)<ne&&Math.max(Ae,Je)>ne&&Math.min(rt,ct)<Se&&Math.max(rt,ct)>Se&&!en.B(rt,ct)){se.x=Se,se.y=ne,Se=!0;break e}}else if(en.B(Ae,Je)&&en.B(rt,ct)&&Math.min(Se,Ge)<rt&&Math.max(Se,Ge)>rt&&Math.min(ne,Bt)<Ae&&Math.max(ne,Bt)>Ae&&!en.B(ne,Bt)){se.x=rt,se.y=Ae,Se=!0;break e}se.x=0,se.y=0,Se=!1}Se&&(E?x.push(se.x):x.push(se.y)),ne=ge}jt.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()))}Un.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 Un&&(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 Un&&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())}}Un.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},Un.prototype.isVisible=function(){if(!Lr.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},Un.prototype.Zb=function(a){if(Lr.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)},Un.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()))}Un.prototype.ph=function(){return!0},Dt.Object.defineProperties(Un.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:oo},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),(y.$c()||a.$c())&&this.fromNode!==null&&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&&Wn(a,">= 0",Un,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),this.bb())}},fromShortLength:{get:function(){return this.ba!==null?this.ba.Wi:NaN},set:function(a){var y=this.fromShortLength;y!==a&&(this.Xc(),this.ba.Wi=a,this.qc(),this.g("fromShortLength",y,a))}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:oo},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),(y.$c()||a.$c())&&this.toNode!==null&&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&&Wn(a,">= 0",Un,"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?ii: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 di?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()===Xl&&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),en.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);en.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 jt)}},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);en.$(b.x,E.x)?(b=E.y-b.y,0>b&&(b=-b)):en.$(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 Tn,b=0;b<a.length/2;b++)E=new jt(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(!mn(te)||typeof te.x!="number"||isNaN(te.x)||typeof te.y!="number"||isNaN(te.y)){b=!1;break}}if(b)for(x=new Tn,b=0;b<a.length;b++)E=a[b],x.add(new jt(E.x,E.y).freeze())}}else if(a instanceof Tn)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else Wt("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&&ko(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)}}}),Un.prototype.invalidateOtherJumpOvers=Un.prototype.Xo,Un.prototype.findClosestSegment=Un.prototype.ez,Un.prototype.updateRoute=Un.prototype.vg,Un.prototype.invalidateRoute=Un.prototype.bb,Un.prototype.rollbackRoute=Un.prototype.rv,Un.prototype.commitRoute=Un.prototype.zf,Un.prototype.startRoute=Un.prototype.uh,Un.prototype.clearPoints=Un.prototype.Fj,Un.prototype.removePoint=Un.prototype.pv,Un.prototype.addPointAt=Un.prototype.yf,Un.prototype.addPoint=Un.prototype.ne,Un.prototype.insertPointAt=Un.prototype.m,Un.prototype.insertPoint=Un.prototype.Kz,Un.prototype.setPointAt=Un.prototype.L,Un.prototype.setPoint=Un.prototype.dd,Un.prototype.getPoint=Un.prototype.i,Un.prototype.getOtherPort=Un.prototype.Cz,Un.prototype.getOtherNode=Un.prototype.To;var Tf=null,Mf=null,Jv=new yn(Un,"Normal",1),Lx=new yn(Un,"Orthogonal",2),kx=new yn(Un,"AvoidsNodes",6),nS=new yn(Un,"AvoidsNodesStraight",7),Ks=new yn(Un,"None",0),Xl=new yn(Un,"Bezier",9),kh=new yn(Un,"JumpGap",10),wp=new yn(Un,"JumpOver",11),bg=new yn(Un,"End",17),e0=new yn(Un,"Scale",18),t0=new yn(Un,"Stretch",19),Pg=new yn(Un,"OrientAlong",21),Cg=new yn(Un,"OrientPlus90",22),Eg=new yn(Un,"OrientMinus90",23),Qv=new yn(Un,"OrientOpposite",24),n0=new yn(Un,"OrientUpright",25),Tg=new yn(Un,"OrientPlus90Upright",26),Mg=new yn(Un,"OrientMinus90Upright",27),r0=new yn(Un,"OrientUpright45",28),rS=16,iS=14,Lg=8;Un.className="Link",Un.Normal=Jv,Un.Orthogonal=Lx,Un.AvoidsNodes=kx,Un.AvoidsNodesStraight=nS,Un.None=Ks,Un.Bezier=Xl,Un.JumpGap=kh,Un.JumpOver=wp,Un.End=bg,Un.Scale=e0,Un.Stretch=t0,Un.OrientAlong=Pg,Un.OrientPlus90=Cg,Un.OrientMinus90=Eg,Un.OrientOpposite=Qv,Un.OrientUpright=n0,Un.OrientPlus90Upright=Tg,Un.OrientMinus90Upright=Mg,Un.OrientUpright45=r0,Un.EndSegmentStep=8,Un.CurvinessStart=rS,Un.SpacingMin=iS,Un.OrthoShortCut=Lg;function i0(a,y,x,b){fi(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){fi(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,Ae=a.ac[ge][Se];if(Ae>=Xd&&Ae<Pp)for(E?Se+=b:ge+=b,Ae+=1;te<=ge&&ge<=ne&&se<=Se&&Se<=he&&!(Ae>=a.ac[ge][Se]);)a.ac[ge][Se]=Ae,Ae+=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 Ae=te.x;b=te.y,y=te.x+te.width;var Ge=te.y+te.height;Ae-=a.Nd,Ae/=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,Ae|0)),y=Math.min(a.di,Math.max(0,y|0)),Ae=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,Ae,Ge),o0(a,se,he,1,!x,te,y,Ae,Ge),o0(a,se,he,-1,!x,te,y,Ae,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,Ae,Ge),a0(a,ge,Se,1,!(E===90||E===270),te,y,Ae,Ge),a0(a,ge,Se,-1,!(E===90||E===270),te,y,Ae,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,Ae,Ge),jc(a,se,he,-1,!1,te,y,Ae,Ge),jc(a,se,he,1,!0,te,y,Ae,Ge),jc(a,se,he,-1,!0,te,y,Ae,Ge);Ln(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,Ae=ge;if(b===0)if(Se<E)Se++;else break;else if(b===90)if(Ae<te)Ae++;else break;else if(b===180)if(Se>E)Se--;else break;else if(Ae>te)Ae--;else break;var Ge=se[Se][Ae];if(Ge===0||Ge===ey)break;he=Se,ge=Ae}for(;;){if(Se=b,Ae=he,Ge=ge,b===0?Ge<te?(Se=90,Ge++):Ge>te&&(Se=270,Ge--):b===90?Ae<E?(Se=0,Ae++):Ae>E&&(Se=180,Ae--):b===180?Ge<te?(Se=90,Ge++):Ge>te&&(Se=270,Ge--):Ae<E?(Se=0,Ae++):Ae>E&&(Se=180,Ae--),Ae=se[Ae][Ge],Se!==b&&Ae!==0&&Ae!==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++}}}Dt.Object.defineProperties(kg.prototype,{bounds:{get:function(){return new bn(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(){fi(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 ei?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(Wa,jt.alloc()),he=a.port.ga(As,jt.alloc());for(E=bn.allocAt(se.x,se.y,0,0),E.Ye(he),jt.free(se),jt.free(he),se=jt.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),Ae=ge.computeSpot(Se,a.port);if(Ae.$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),Ae=Ox(E,Ae,Ge,ge.isOrthogonal),Ae===0?(Ae=4,180<Ge&&(Ge-=360)):Ae===90?(Ae=8,270<Ge&&(Ge-=360)):Ae===180?Ae=2:(Ae=1,90>Ge&&(Ge+=360)),Je=a.pe[te],Je===void 0?(Je=new ty(ge,Ge,Ae),a.pe[te]=Je):(Je.link=ge,Je.angle=Ge,Je.Nc=Ae),Je.hv.set(Se),te++}}}}for(jt.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,Ae=a.port,b=a.node.portSpreading,se=jt.alloc(),he=jt.alloc(),ne=jt.alloc(),ge=jt.alloc(),Ae.ga(Wa,se),Ae.ga(Dl,he),Ae.ga(As,ne),Ae.ga(tl,ge),Je=Ge=Se=Ae=0,b===Uv)for(var rt=0;rt<te.length;rt++){var ct=te[rt];if(ct!==null){var Bt=ct.link.computeThickness();switch(ct.Nc){case 8:Ge+=Bt;break;case 2:Je+=Bt;break;case 1:Ae+=Bt;break;default:case 4:Se+=Bt}}}var Lt=rt=0,$t=1,Ht=ct=0;for(Bt=0;Bt<te.length;Bt++){var Kt=te[Bt];if(Kt!==null){if(rt!==Kt.Nc){switch(rt=Kt.Nc,rt){case 8:var Yt=ne;Lt=ge;break;case 2:Yt=ge,Lt=se;break;case 1:Yt=se,Lt=he;break;default:case 4:Yt=he,Lt=ne}switch(ct=Lt.x-Yt.x,Ht=Lt.y-Yt.y,rt){case 8:Ge>Math.abs(ct)?($t=Math.abs(ct)/Ge,Ge=Math.abs(ct)):$t=1;break;case 2:Je>Math.abs(Ht)?($t=Math.abs(Ht)/Je,Je=Math.abs(Ht)):$t=1;break;case 1:Ae>Math.abs(ct)?($t=Math.abs(ct)/Ae,Ae=Math.abs(ct)):$t=1;break;default:case 4:Se>Math.abs(Ht)?($t=Math.abs(Ht)/Se,Se=Math.abs(Ht)):$t=1}Lt=0}var ln=Kt.Zo;if(b===Uv){switch(Kt=Kt.link.computeThickness(),Kt*=$t,ln.set(Yt),rt){case 8:ln.x=Yt.x+ct/2+Ge/2-Lt-Kt/2;break;case 2:ln.y=Yt.y+Ht/2+Je/2-Lt-Kt/2;break;case 1:ln.x=Yt.x+ct/2-Ae/2+Lt+Kt/2;break;default:case 4:ln.y=Yt.y+Ht/2-Se/2+Lt+Kt/2}Lt+=Kt}else{var er=.5;b===Zm&&(er=(Kt.Uo+1)/(Kt.Gl+1)),ln.x=Yt.x+ct*er,ln.y=Yt.y+Ht*er}}}for(jt.free(se),jt.free(he),jt.free(ne),jt.free(ge),Yt=a.pe,te=0;te<Yt.length;te++)b=Yt[te],b!==null&&(b.Ju=a.computeEndSegmentLength(b));a.ap=x,bn.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,aa,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 jt,this.Gl=this.Uo=0,this.Zo=new jt,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 _o(a){fi(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new jt(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}_o.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},_o.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},_o.prototype.qb=function(){},_o.prototype.toString=function(){var a=Mn(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},_o.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())}}},_o.prototype.createNetwork=function(){return new Eo(this)},_o.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof sn?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof ei?y.lg(a.memberParts):y.lg(a.iterator),y},_o.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")}},_o.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()}},_o.prototype.doLayout=function(a){var y=new Nn;a instanceof sn?(rd(this,y,a.nodes,!0,this.rh,!0,!1,!0),rd(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof ei?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},_o.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 ei&&(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++}},_o.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 Un)&&(Og(se),this.rh(se))){var he=se.measuredBounds,ge=he.width;he=he.height,se.moveTo(x,b),se instanceof ei&&(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++}}},_o.prototype.rh=function(a){return!!(!a.location.w()||a instanceof ei&&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 ei&&he.layout===null?rd(a,y,he.memberParts,!1,E,te,ne,se):(Og(he),y.add(he))):ne&&he instanceof Un?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()}_o.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new bn),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},_o.prototype.ex=function(a){var y=new Nn;return a instanceof sn?(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 ei?rd(this,y,a.memberParts,!1,null,!0,!0,!0):rd(this,y,a.iterator,!1,null,!0,!0,!0),y},_o.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(Wa),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},Dt.Object.defineProperties(_o.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())}}}),_o.prototype.collectParts=_o.prototype.ex,_o.prototype.getLayoutBounds=_o.prototype.ni,_o.prototype.invalidateLayout=_o.prototype.C,_o.className="Layout";function Eo(a){fi(this),this.Sc=a,this.wf=new Nn,this.ye=new Nn,this.Es=new cr,this.zs=new cr}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 cr,this.zs=new cr},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 Un){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 ei&&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 Un&&(!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},tt=Eo.prototype,tt.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},tt.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},tt.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}tt.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},tt.ki=function(a){return a===null?null:this.Es.I(a)},tt.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}}tt.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},tt.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))}tt.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},tt.Lo=function(a){return a===null?null:this.zs.I(a)},tt.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},tt.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))}},tt.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]);Ln(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]);Ln(a),Ln(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]);Ln(y)}Eo.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Nx(this),this.Ko()),a=new Tn;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},Dt.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){fi(this),this.ob=a,this.j=new bn(0,0,10,10).freeze(),this.o=new jt(5,5).freeze(),this.Sh=this.ub=null,this.tg=new Tn,this.mg=new Tn}Ua.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new Tn,this.mg=new Tn},Ua.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+zi(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;mn(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 ei)){x=bn.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)),bn.free(x);return}bn.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}Dt.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=bn.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),bn.free(x),!(a instanceof ei)&&(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 Tn,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){fi(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#"+zi(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},Dt.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){_o.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new Vn(NaN,NaN).freeze(),this.tf=new Vn(10,10).freeze(),this.Jb=Ng,this.Rb=l0,this.nd=Ag,this.hd=cS,a&&Object.assign(this,a)}un(ds,_o),ds.prototype.cloneProtected=function(a){_o.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:Wt("Unknown enum value: "+a):_o.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 ei)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=bn.alloc(),Se=Math.max(this.cellSize.width,1);if(!isFinite(Se))for(var Ae=Se=0;Ae<E.length;Ae++){var Ge=this.ni(E[Ae],ge);Se=Math.max(Se,Ge.width)}if(Se=Math.max(Se+se,1),Ae=Math.max(this.cellSize.height,1),!isFinite(Ae))for(Ge=Ae=0;Ge<E.length;Ge++){var Je=this.ni(E[Ge],ge);Ae=Math.max(Ae,Je.height)}Ae=Math.max(Ae+he,1),Ge=this.arrangement;for(var rt=Je=this.arrangementOrigin.x,ct=this.arrangementOrigin.y,Bt=0,Lt=0,$t=0;$t<E.length;$t++){var Ht=E[$t],Kt=this.ni(Ht,ge),Yt=Math.ceil((Kt.width+se)/Se)*Se,ln=Math.ceil((Kt.height+he)/Ae)*Ae;switch(Ge){case Xu:var er=Math.abs(rt-Kt.width);break;default:er=rt+Kt.width}switch((0<te&&Bt>te-1||0<ne&&0<Bt&&er-Je>ne)&&(b.push(new bn(0,ct,ne+se,Lt)),Bt=0,rt=Je,ct+=Lt,Lt=0),Lt=Math.max(Lt,ln),Ge){case Xu:Kt=-Kt.width;break;default:Kt=0}switch(Ht.moveTo(rt+Kt,ct),Ge){case Xu:rt-=Yt;break;default:rt+=Yt}Bt++}b.push(new bn(0,ct,ne+se,Lt)),bn.free(ge);break;case Ng:for(he=ne,Se=te,Ae=y,Ge=x,ne=bn.alloc(),Je=Math.max(this.cellSize.width,1),te=ct=ge=0,se=jt.alloc(),rt=0;rt<E.length;rt++)Lt=E[rt],Bt=this.ni(Lt,ne),Lt=Th(Lt,Lt.locationObject,Lt.locationSpot,se),ge=Math.max(ge,Lt.x),ct=Math.max(ct,Bt.width-Lt.x),te=Math.max(te,Lt.y);switch(rt=this.arrangement,rt){case Xu:ge+=Ae;break;default:ct+=Ae}Je=isFinite(Je)?Math.max(Je+Ae,1):Math.max(ge+ct,1);var ur=Lt=this.arrangementOrigin.x;for($t=this.arrangementOrigin.y,ct=0,he>=ge&&(he-=ge),ge=Ht=0,Yt=Math.max(this.cellSize.height,1),Kt=te=0,ln=!0,Bt=jt.alloc(),er=0;er<E.length;er++){var or=E[er],Hn=this.ni(or,ne),jn=Th(or,or.locationObject,or.locationSpot,se);if(0<ct)switch(rt){case Xu:ur=(ur-Lt-(Hn.width-jn.x))/Je,ur=en.$(Math.round(ur),ur)?Math.round(ur):Math.floor(ur),ur=ur*Je+Lt;break;default:ur=(ur-Lt+jn.x)/Je,ur=en.$(Math.round(ur),ur)?Math.round(ur):Math.ceil(ur),ur=ur*Je+Lt}else switch(rt){case Xu:Ht=ur+jn.x+Hn.width;break;default:Ht=ur-jn.x}switch(rt){case Xu:var Qr=-(ur+jn.x)+Ht;break;default:Qr=ur+Hn.width-jn.x-Ht}if(0<Se&&ct>Se-1||0<he&&0<ct&&Qr>he){for(b.push(new bn(0,ln?$t-te:$t,he+Ae,Kt+te+Ge)),ur=0;ur<ct&&er!==ct;ur++){Qr=E[er-ct+ur];var Wr=Th(Qr,Qr.locationObject,Qr.locationSpot,Bt);Qr.moveTo(Qr.position.x,Qr.position.y+te-Wr.y)}Kt+=Ge,$t=ln?$t+Kt:$t+(Kt+te),ct=Kt=te=0,ur=Lt,ln=!1}switch(ur===Lt&&(ge=rt===Xu?Math.max(ge,Hn.width-jn.x):Math.min(ge,-jn.x)),te=Math.max(te,jn.y),Kt=Math.max(Kt,Hn.height-jn.y),isFinite(Yt)&&(Kt=Math.max(Kt,Math.max(Hn.height,Yt)-jn.y)),ln?or.moveTo(ur-jn.x,$t-jn.y):or.moveTo(ur-jn.x,$t),rt){case Xu:ur-=jn.x+Ae;break;default:ur+=Hn.width-jn.x+Ae}ct++}if(b.push(new bn(0,$t,he+Ae,(ln?Kt:Kt+te)+Ge)),E.length!==ct)for(he=0;he<ct;he++)Se=E[E.length-ct+he],Ae=Th(Se,Se.locationObject,Se.locationSpot,se),Se.moveTo(Se.position.x,Se.position.y+te-Ae.y);if(jt.free(se),jt.free(Bt),rt===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);bn.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 jt(E+y/2-(te+E),ne-x/2)):this.commitLayers(b,new jt(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}Dt.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 yn(ds,"Position",0),Ng=new yn(ds,"Location",1),l0=new yn(ds,"LeftToRight",2),Xu=new yn(ds,"RightToLeft",3),ay=new yn(ds,"Forward",4),u0=new yn(ds,"Reverse",5),Ag=new yn(ds,"Ascending",6),c0=new yn(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 uo(){this.On=new Nn,this.Dn=new Nn,this.Pa=new Nn,this.cf=new cr,this.bf=new cr,this.aj=new cr,this.H=null,this.tp=!1}tt=uo.prototype,tt.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},tt.Xe=function(a){this.H=a},tt.oi=function(a){if(a instanceof nr){if(this.On.add(a),a instanceof ei){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 Un?this.Dn.add(a):a instanceof Ki||this.Pa.add(a);y=a.data,y===null||a instanceof Ki||(a instanceof Un?this.bf.add(y,a):this.cf.add(y,a))},tt.pc=function(a){if(a.Ej(),a instanceof nr){if(this.On.remove(a),a instanceof ei){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 Un?this.Dn.remove(a):a instanceof Ki||this.Pa.remove(a);y=a.data,y===null||a instanceof Ki||(a instanceof Un?this.bf.remove(y):this.cf.remove(y))},tt.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 ei)&&Wt('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 ei||Wt('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 Un||Wt('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]);Ln(y),Ln(x),Ln(a)}},uo.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},uo.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)}}uo.prototype.insertLink=function(){return null},uo.prototype.resolveReferencesForData=function(){},uo.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,ar('No Group template found for category "'+x+'"'),ar(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(pS||(pS=!0,ar('No Node template found for category "'+x+'"'),ar(" Using default node template")),y=a.ny))),y}uo.prototype.getLinkCategoryForData=function(){return""},uo.prototype.setLinkCategoryForData=function(){},uo.prototype.setFromNodeForLink=function(){},uo.prototype.setToNodeForLink=function(){},uo.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,ar('No Link template found for category "'+a+'"'),ar(" Using default link template")),x=y.my)),x},uo.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},uo.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},uo.prototype.ip=function(a){a=this.Lc(a),a!==null&&(Zh(this.diagram,a,!1),this.unresolveReferencesForPart(a))},uo.prototype.unresolveReferencesForPart=function(){},uo.prototype.removeDataForLink=function(){},uo.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},uo.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)},uo.prototype.findLinkForKey=function(){return null},tt=uo.prototype,tt.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},tt.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof nr?a:null)},tt.Kc=function(a){return a===null?null:this.bf.I(a)},tt.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(mn(ne)&&sy(this,E,ne)){y.add(b);break}}}return y.iterator},tt.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(mn(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(Cn(te)){if(!Cn(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(mn(y)&&mn(x)){if(!sy(a,y,x))return!1}else if(y!==x)return!1;return!0}uo.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===Go){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===la){var ne=a.newValue;b==="nodeDataArray"&&mn(ne)&&hS(this,ne),y.isModified=!0}else if(x===Oa){var se=a.oldValue;b==="nodeDataArray"&&mn(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===Go){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===la||x===Oa){var Se=a.change===la,Ae=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 rt=Je[a];if(Se)km(rt,Ge,Ae,!0);else if(!(0>Ae)){var ct=Ae+fg(rt);rt.pc(ct,!0),wv(rt,ct,Ae)}}y.isModified=!0}}finally{y.aa=!0}}}}},uo.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)},uo.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()},uo.prototype.refreshDataBoundLinks=function(){},uo.prototype.updateRelationshipsFromData=function(){},uo.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);Ln(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function ly(a,y){var x=y.Hh;if(Cn(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(Cn(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}}}}uo.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var b=new cr;if(Cn(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 cr,ne=b.iterator;ne.next();){var se=ne.value;if(se instanceof Un)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 cr;b.each(function(Ae){Ae.key.data!==null&&Se.add(Ae.key.data,Ae.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 Lr))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 ei&&te instanceof ei)for(y=y.memberParts;y.next();)ne=h0(a,y.value,x,b,E),ne instanceof Un||ne===null||(ne.containingGroup=te)}else if(y instanceof Un&&te instanceof Un)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}uo.prototype.copyPartData=function(a,y){var x=null,b=a.data;if(b!==null&&y!==null){var E=y.model;a instanceof Un||(b=E.copyNodeData(b),mn(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 Un||(E=y.copyNodeData(b)),mn(E)&&(x.data=E)));return x},Dt.Object.defineProperties(uo.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}}}),uo.prototype.updateAllRelationshipsFromData=uo.prototype.rp,uo.prototype.findLinksByExample=uo.prototype.ls,uo.prototype.findNodesByExample=uo.prototype.ms,uo.prototype.findLinkForData=uo.prototype.Kc,uo.prototype.findNodeForData=uo.prototype.ii,uo.prototype.findPartForData=uo.prototype.Lc,uo.prototype.findNodeForKey=uo.prototype.Vb,uo.prototype.removeModeledPart=uo.prototype.ip,uo.prototype.removeModeledParts=uo.prototype.Gs,uo.prototype.rebuildParts=uo.prototype.Wd;var pS=!1,gS=!1,mS=!1;uo.className="PartManager";function ns(a){uo.apply(this,arguments)}un(ns,uo),ns.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vS(this,a.linkDataArray)},ns.prototype.addModeledParts=function(a){for(uo.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=Yl(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=Yl(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=uo.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(uo.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===Go){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 Ae=this.Kc(a.object);if(Ae!==null){var Ge=a.newValue;typeof Ge=="string"&&(Ae.toPortId=Ge)}}else if(E==="nodeGroupKey"){var Je=this.Lc(a.object);if(Je!==null){var rt=a.newValue;if(rt!==void 0){var ct=this.Vb(rt);ct instanceof ei?Je.containingGroup=ct:Je.containingGroup=null}else Je.containingGroup=null}}else if(E==="linkLabelKeys"){var Bt=this.Kc(a.object);if(Bt!==null){var Lt=a.oldValue,$t=a.newValue;Array.isArray(Lt)&&Lt.forEach(function(jn){0<=$t.indexOf(jn)||(jn=y.Vb(jn),jn!==null&&(jn.labeledLink=null))}),Array.isArray($t)&&$t.forEach(function(jn){jn=y.Vb(jn),jn!==null&&(jn.labeledLink=Bt)})}}else if(E==="linkCategory"){var Ht=this.Kc(a.object),Kt=a.newValue;Ht!==null&&typeof Kt=="string"&&(Ht.category=Kt)}else E==="linkDataArray"&&(SS(this,a.oldValue),vS(this,a.newValue));x.isModified=!0}else if(b===la){var Yt=a.newValue;if(E==="linkDataArray"&&typeof Yt=="object"&&Yt!==null)yS(this,Yt);else if(E==="linkLabelKeys"&&od(Yt)){var ln=this.Kc(a.object),er=this.Vb(Yt);ln!==null&&er!==null&&(er.labeledLink=ln)}x.isModified=!0}else if(b===Oa){var ur=a.oldValue;if(E==="linkDataArray"&&typeof ur=="object"&&ur!==null)this.ip(ur);else if(E==="linkLabelKeys"&&od(ur)){var or=this.Vb(ur);or!==null&&(or.labeledLink=null)}x.isModified=!0}}else if(b===Go){var Hn=a.propertyName;a.object!==x.model||Hn!=="linkFromKeyProperty"&&Hn!=="linkToKeyProperty"&&Hn!=="linkFromPortIdProperty"&&Hn!=="linkToPortIdProperty"&&Hn!=="linkLabelKeysProperty"&&Hn!=="nodeIsGroupProperty"&&Hn!=="nodeGroupKeyProperty"&&Hn!=="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 Un){var E=Yl(b,y,!0);if(E=x.Vb(E),a.fromNode=E,E=Yl(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 Ki)&&(y=b.lh(y),y=x.findPartForKey(y),y===null||y instanceof ei)&&(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 ei&&y.lh(ne)===x&&(ne=this.Lc(ne),ne!==null&&(ne.containingGroup=E)):(te.link=this.Kc(ne),te.link!==null&&E instanceof nr&&(Yl(y,ne,!0)===x&&(te.link.fromNode=E),Yl(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 ei&&(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 ei)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=uo.prototype.copyPartData.call(this,a,y);if(a instanceof Un)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 Un){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(){uo.apply(this,arguments),this.Sg=null}un(cu,uo);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||!Rn(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(uo.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===Go){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===Go){var Ae=a.propertyName;a.object===y.model&&Ae==="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){uo.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(Oa,"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,fi(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new cr,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 cr,this.Lt=new Tn,this.Wg=!1,this.o=null,this.undoManager=new Ko,a!==void 0&&(Cn(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)+":"+Gn(E)}}return y},mr.prototype.xA=function(a){a.change!==il&&Wt("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof Va?(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(Ae){Ae.model===x&&(Ae.modelChange==="nodeDataArray"?Ae.change===la?E.add(Ae.newValue):Ae.change===Oa&&ne.add(Ae.oldValue):x.lb(Ae.object)?te.add(Ae.object):Ae.change!==Go||x.modelData!==Ae.object&&Ae.propertyName!=="modelData"?Ae.object!==null&&(se&&se.contains(Ae.object)?se.get(Ae.object).each(function(Ge){x.lb(Ge)&&te.add(Ge)}):Ae.object instanceof mr||x.ri()&&x.Jc(Ae.object)||bS(x,Ae.object).each(function(Ge){te.add(Ge)})):b=!0)});var he=this.il;he.clear(),E.each(function(Ae){he.add(x.wa(Ae)),y||te.add(Ae)});var ge=this.kl;ge.clear(),ne.each(function(Ae){ge.add(x.wa(Ae)),y&&te.add(Ae)}),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(Ae,Ge){se?(Ae.__gohashid===void 0&&te.push(Ae),b.set(Ae,Ge)):(Ae=Lo++,b.set(Ae,Ge),E.set(Ae,y))}if(!mn(y))return y;te||(te=[]);var se=Object.isExtensible(y);if(b||(b=new cr),se){var he=b.get(y);if(he)return he}else for(E||(E=new cr),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 jt||y instanceof Vn||y instanceof bn||y instanceof Mr||y instanceof Sr)he=y.copy(),ne(y,he);else{if(y instanceof so||y instanceof Zn||y instanceof yn)return y;if(y instanceof Tn)he=new Tn().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 cr)he=new cr().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(Ae){delete Ae.__gohashid}),he}tt=mr.prototype,tt.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},tt.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},tt.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,mn(y)&&(a.dm(y),a.modelData=y)}tt.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)},tt.kv=function(a){xS(this,a),a=a.nodeDataArray,Cn(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 cr,y.changes.each(function(E){if(E.diagram!==null){var te=E.change;te===Go?(E=E.object.panel)&&(te=E.data)&&x(te,E):(te===la||te===Oa)&&(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(mn(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}tt.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===la?E.add(Se.newValue):Se.change===Oa&&ne.add(Se.oldValue):x.lb(Se.object)?te.add(Se.object):Se.change!==Go||x.modelData!==Se.object&&Se.propertyName!=="modelData"?Se.object!==null&&(se&&se.contains(Se.object)?se.get(Se.object).each(function(Ae){x.lb(Ae)&&te.add(Ae)}):Se.object instanceof mr||x.ri()&&x.Jc(Se.object)||bS(x,Se.object).each(function(Ae){te.add(Ae)})):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},tt.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)&&Wt("applyIncrementalJson cannot change Model properties"),xS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new cr;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)},tt.$x=function(a,y){a.change!==il&&Wt("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof Va?(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 }'},tt.yA=function(a,y){return this.$x(a,y)},tt.np=function(a){return a===void 0&&(a=Ig(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},tt.toJSON=function(a){return this.np(a)},tt.Zw=function(a){var y=null;if(typeof a=="string")try{y=Ut.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:Wt("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&Wt("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},tt.Ky=function(a){return this.Zw(a)},mr.constructGraphLinksModel=function(){return new mr},tt=mr.prototype,tt.dm=function(a){if(Cn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if(mn(b)){var E=x;b=this.dm(b),Array.isArray(a)?a[E]=b:Wt("Cannot replace an object in an HTMLCollection or NodeList at "+E)}}else if(mn(a)){for(y in a)if(x=a[y],mn(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 Tn,b=0;b<x.length/2;b++)E.add(new jt(x[2*b],x[2*b+1]));E.freeze(),a[y]=E}}return Ax(a)}return a},tt.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()):Cn(a)?id(this,a):mn(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 ir;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 Vs(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function cy(a,y){var x=y;if(x instanceof jt)y={class:"go.Point",x:Vs(x.x),y:Vs(x.y)};else if(x instanceof Vn)y={class:"go.Size",width:Vs(x.width),height:Vs(x.height)};else if(x instanceof bn)y={class:"go.Rect",x:Vs(x.x),y:Vs(x.y),width:Vs(x.width),height:Vs(x.height)};else if(x instanceof Mr)y={class:"go.Margin",top:Vs(x.top),right:Vs(x.right),bottom:Vs(x.bottom),left:Vs(x.left)};else if(x instanceof Sr)x.sb()?y={class:"go.Spot",x:Vs(x.x),y:Vs(x.y),offsetX:Vs(x.offsetX),offsetY:Vs(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof so){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=Vs(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=Vs(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 Zn?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=Vs(x.startX)),x.startY!==0&&(y.startY=Vs(x.startY)),x.endX!==0&&(y.endX=Vs(x.endX)),x.endY!==0&&(y.endY=Vs(x.endY)),x.spot1.D(Wa)||(y.spot1=x.spot1),x.spot2.D(As)||(y.spot2=x.spot2),x.type===Zn.o&&(y.path=Zn.ia(x))):x instanceof yn&&(y={class:"go.EnumValue",classType:Ig(a,x.classType),name:x.name});b="{",x=!0;for(var E in y){var te=ga(y,E);if(!PS(E,te))if(x?x=!1:b+=",",b+=a.quote(E)+":",E==="points"&&te instanceof Tn){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 Zs(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 jt(Zs(a.x),Zs(a.y));else if(y==="Size")x=new Vn(Zs(a.width),Zs(a.height));else if(y==="Rect")x=new bn(Zs(a.x),Zs(a.y),Zs(a.width),Zs(a.height));else if(y==="Margin")x=new Mr(Zs(a.top),Zs(a.right),Zs(a.bottom),Zs(a.left));else if(y==="Spot")typeof a.enum=="string"?x=wd(a.enum):x=new Sr(Zs(a.x),Zs(a.y),Zs(a.offsetX),Zs(a.offsetY));else if(y==="Brush"){if(x=new so,x.type=Yn(so,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof Sr&&(x.start=a.start),a.end instanceof Sr&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=Zs(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=Zs(a.endRadius)),a=a.colorStops,mn(a))for(var b in a)x.addColorStop(parseFloat(b),a[b])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=Zn.parse(a.path):x=new Zn,x.type=Yn(Zn,a.type),typeof a.startX=="number"&&(x.startX=Zs(a.startX)),typeof a.startY=="number"&&(x.startY=Zs(a.startY)),typeof a.endX=="number"&&(x.endX=Zs(a.endX)),typeof a.endY=="number"&&(x.endY=Zs(a.endY)),a.spot1 instanceof Sr&&(x.spot1=a.spot1),a.spot2 instanceof Sr&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=dy(b),typeof b=="function"&&(x=Yn(b,a.name)));return x}tt.Pe=function(a){return this.Lt.add(a),this},tt.ik=function(a){this.Lt.remove(a)},tt.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)},tt.cb=function(a,y,x,b,E,te,ne){Fa(this,"",a,y,x,b,E,te,ne)},tt.g=function(a,y,x,b,E){Fa(this,"",Go,a,this,y,x,b,E)},tt.Fs=function(a,y,x,b,E,te){Fa(this,"",Go,y,a,x,b,E,te)};function Fa(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===Go){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)),jo(x,b,E)}else a.change===la?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,mn(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&&fn(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!Cn(b)&&a.propertyName&&(b=ga(a.object,a.propertyName)),Cn(b)&&typeof x=="number"&&(a=a.newValue,y?En(b,x):fn(b,x,a))):Wt("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===Oa?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,mn(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&fn(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)&&!Cn(b)&&a.propertyName&&(b=ga(a.object,a.propertyName)),Cn(b)&&typeof x=="number"&&(a=a.oldValue,y?fn(b,x,a):En(b,x))):Wt("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==il&&Wt("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}},tt=mr.prototype,tt.La=function(a,y){y===void 0&&(y=""),Fa(this,"SourceChanged",il,y,a,null,null)},tt.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=ga(a,y),y!==void 0)){if(od(y))return y;Wt("Key value for node data "+a+" is not a number or a string: "+y)}}},tt.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var b=ga(a,x);b!==y&&this.hc(y)===null&&(jo(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),Fa(this,"nodeKey",Go,x,a,b,y),typeof x=="string"&&this.La(a,x),this.jp(b,y))}else jo(a,x,y)}};function od(a){return typeof a=="number"||typeof a=="string"}tt.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},tt.hc=function(a){return a===null&&Wt("Model.findNodeDataForKey:key must not be null"),a!==void 0&&od(a)?this.kb.I(a):null},tt.$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))){jo(a,y,x);return}if(typeof x=="string"){for(b=2;this.kb.contains(x+b);)b++;jo(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;jo(a,y,x)}}}}},tt.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&&Wt("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,fn(a.Tc,b,y)),Fa(a,"nodeDataArray",la,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}tt.Fy=function(a){if(Cn(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)},tt.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)}Fa(a,"nodeDataArray",Oa,"nodeDataArray",a,y,null,b,null),a.qp(y)}tt.nA=function(a){if(Cn(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)},tt.$z=function(a){if(a!==this.nodeDataArray&&Cn(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()}},tt.jp=function(a,y){y!==void 0&&(a=jg(this,a),a instanceof Nn&&this.Vf.add(y,a))},tt.Lv=function(){},tt.fm=function(){},tt.em=function(){},tt.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)}tt.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),mn(a)&&fi(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 fi(b),b}if(x&&mn(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=ga(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 Ko||te instanceof Va||te instanceof $o||(te=p0(a,te,!1)),jo(x,b,te)}return fi(x),x}return y instanceof jt||y instanceof Vn||y instanceof bn||y instanceof Sr||y instanceof Mr?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 Qt&&(TS=!0,ar('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),ar(" Is that really your intent?"));var b=ga(a,y);b!==x&&(jo(a,y,x),this.Fs(a,y,b,x))},tt=mr.prototype,tt.set=function(a,y,x){this.setDataProperty(a,y,x)},tt.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])}},tt.Ay=function(a,y){this.ts(a,-1,y)},tt.ts=function(a,y,x){0>y&&(y=a.length),fn(a,y,x),Fa(this,"",la,"",a,null,x,null,y)},tt.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&Wt("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];En(a,y),Fa(this,"",Oa,"",a,x,null,y,null)},tt.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=ga(a,y),y===void 0))return"";if(typeof y=="string")return y;Wt("getCategoryForNodeData found a non-string category for "+a+": "+y)},tt.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var b=ga(a,x);b===void 0&&(b=""),b!==y&&(jo(a,x,y),Fa(this,"nodeCategory",Go,x,a,b,y))}else jo(a,x,y)}},tt.lm=function(a,y){this.jm(y,this.Ro(a))},tt.Tl=function(){return!1},tt.Wj=function(){return!1},tt.ri=function(){return!1},tt.xs=function(){return!1},tt.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]:Ut.go!==void 0&&Ut.go[a]?Ut.go[a]:null}function ga(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 jo(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){}}Dt.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===""&&Wt("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&Wt("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];mn(E)||Wt("Model.nodeDataArray must only contain Objects, not: "+E),xo(E)}for(this.Tc=a,b=new Tn,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(Fa(this,"nodeDataArray",Go,"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=Ut.JSON.parse(a)}catch(te){}else typeof a=="object"?x=a:Wt("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=Ut[b])),typeof E=="function"&&(a=new E)}catch(te){}a===null||a instanceof mr?y=a:Wt("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=ga,mr.safePropertySet=jo,Au.Brush=so,Au.ChangedEvent=$o,Au.Geometry=Zn,Au.Margin=Mr,Au.Panel=$n,Au.Point=jt,Au.Rect=bn,Au.Size=Vn,Au.Spot=Sr,Au.Transaction=Va,Au.UndoManager=Ko;function ba(a,y,x,b){fi(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}ba.prototype.copy=function(){var a=new ba;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},tt=ba.prototype,tt.qb=function(a){a.classType===ba&&(this.mode=a)},tt.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},tt.freeze=function(){return this._isFrozen=!0,this},tt.ka=function(){return this._isFrozen=!1,this},tt.Kx=function(a){return a===void 0&&(a=null),this.mode=Dg,this.backConverter=a,this},tt.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},tt.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)}tt.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==="")ar("Binding error: target property is the empty string: "+this.toString());else{var te=y;if(b!==""&&(te=ga(y,b)),te!==void 0)if(E===null)x!==""&&jo(a,x,te);else try{if(x!==""){var ne=E(te,a);jo(a,x,ne)}else E(te,a)}catch(se){}}}},tt.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=ga(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):jo(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 Ae=te(ne,y,he);he!==null?he.setDataProperty(y,x,Ae):jo(y,x,Ae)}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,rt=b.panel.itemArray;he.ov(rt,Je),he.ts(rt,Je,Ge)}}}catch(ct){}}finally{this.st.remove(a)}}}},Dt.Object.defineProperties(ba.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&In(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&In(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&In(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&In(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&In(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&In(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&In(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&In(this),this.el=a}}}),ba.prototype.updateSource=ba.prototype.sp,ba.prototype.updateTarget=ba.prototype.Mv,ba.prototype.ofModel=ba.prototype.dA,ba.prototype.ofObject=ba.prototype.cp,ba.prototype.makeTwoWay=ba.prototype.Kx;var jx="Binding",LS=new yn(ba,"OneWay",1),Dg=new yn(ba,"TwoWay",2);ba.className="Binding",ba.parseEnum=function(a,y){return function(x){return x=Yn(a,x),x===null?y:x}},ba.toString=Gn,ba.OneWay=LS,ba.TwoWay=Dg;function Ai(a,y,x){mr.call(this),this.Vv=`,
|
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
|
"removedLinkKeys": `,this.md=[],this.$f=new Nn,this.wb=new cr,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&&(Cn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}un(Ai,mr),Ai.constructGraphLinksModel=mr.constructGraphLinksModel,Ai.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},tt=Ai.prototype,tt.clear=function(){mr.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},tt.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)+":"+Gn(E)}for(y+=`
|
|
|
link data:`,a=this.linkDataArray,x=a.length,b=0;b<x;b++)E=a[b],y+=" "+Yl(this,E,!0)+"-->"+Yl(this,E,!1)}return y},tt.Qv=function(a,y){this.linkKeyProperty===""&&Wt("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===la?E.add(Se.newValue):Se.change===Oa&&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(Ae){b.Jc(Ae)&&te.add(Ae)}):Se.object instanceof mr||b.lb(Se.object)||kS(b,Se.object).each(function(Ae){te.add(Ae)})))});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},tt.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},tt.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)},tt.Rv=function(){var a=mr.prototype.Rv.call(this),y=`,
|
|
|
"linkDataArray": `+id(this,this.linkDataArray,!0);return a+y},tt.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}tt.Pv=function(a,y){this.linkKeyProperty===""&&Wt("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===la?E.add(Se.newValue):Se.change===Oa&&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(Ae){b.Jc(Ae)&&te.add(Ae)}):Se.object instanceof mr||b.lb(Se.object)||kS(b,Se.object).each(function(Ae){te.add(Ae)})))});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},tt.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)&&Wt("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)},Ai.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===Go){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),jo(x,b,E);return}}else if(a.change===la){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,mn(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===Oa){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,mn(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)}},tt=Ai.prototype,tt.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),jo(x,this.nodeKeyProperty,a),this.xf(x))}return a}},tt.yx=function(a){return Yl(this,a,!0)},tt.wv=function(a,y){Ep(this,a,y,!0)},tt.Bx=function(a){return Yl(this,a,!1)},tt.Bv=function(a,y){Ep(this,a,y,!1)};function Yl(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=ga(y,a),a!==void 0))){if(od(a))return a;Wt((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=ga(y,E);te!==x&&(Ju(a,te,y),jo(y,E,x),a.hc(x)===null&&Yu(a,x,y),Fa(a,b?"linkFromKey":"linkToKey",Go,E,y,te,x),typeof E=="string"&&a.La(y,E))}else jo(y,E,x)}}tt.zx=function(a){return g0(this,a,!0)},tt.xv=function(a,y){Tp(this,a,y,!0)},tt.Cx=function(a){return g0(this,a,!1)},tt.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=ga(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=ga(y,E);te===void 0&&(te=""),te!==x&&(jo(y,E,x),Fa(a,b?"linkFromPortId":"linkToPortId",Go,E,y,te,x),typeof E=="string"&&a.La(y,E))}else jo(y,E,x)}}tt.Ef=function(a){if(a===null)return m0;var y=this.je;return y===""?m0:(a=ga(a,y),a===void 0?m0:a)},tt.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var b=ga(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(jo(a,x,y),E=y.length,te=0;te<E;te++){var ne=y[te];this.hc(ne)===null&&Yu(this,ne,a)}Fa(this,"linkLabelKeys",Go,x,a,b,y),typeof x=="string"&&this.La(a,x)}}else jo(a,x,y)}},tt.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=ga(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),Fa(this,"linkLabelKeys",la,x,a,null,y,null,E)))}else Wt(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},tt.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=ga(a,x);if(Array.isArray(b)){var E=b.indexOf(y);0>E||(b.splice(E,1),this.Jc(a)&&(Ju(this,y,a),Fa(this,"linkLabelKeys",Oa,x,a,y,null,E,null)))}else b!==void 0&&Wt(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},tt.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=ga(a,y),y!==void 0)){if(od(y))return y;Wt("Key value for link data "+a+" is not a number or a string: "+y)}}},tt.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var b=ga(a,x);b!==y&&this.jh(y)===null&&(jo(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),Fa(this,"linkKey",Go,x,a,b,y),typeof x=="string"&&this.La(a,x))}else jo(a,x,y)}},tt.jh=function(a){return a===null&&Wt("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&od(a)?this.wb.I(a):null},tt.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))){jo(a,y,x);return}if(typeof x=="string"){for(b=2;this.wb.contains(x+b);)b++;jo(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;jo(a,y,x)}}}}},tt.Jc=function(a){return a===null?!1:this.$f.contains(a)},tt.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&&Wt("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)),Fa(a,"linkDataArray",la,"linkDataArray",a,null,y,null,b),fy(a,y)}tt.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)},tt.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(Fa(a,"linkDataArray",Oa,"linkDataArray",a,y,null,b,null),x=Yl(a,y,!0),Ju(a,x,y),x=Yl(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)}tt.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)},tt.Zz=function(a){if(this.linkKeyProperty===""&&Wt("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&Cn(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=Yl(a,y,!0);x=a.Vl(x),a.hc(x)===null&&Yu(a,x,y),x=Yl(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)}tt.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):p0(this,a,!0),mn(a)&&(fi(a),this.lf!==""&&jo(a,this.lf,void 0),this.mf!==""&&jo(a,this.mf,void 0),this.je!==""&&jo(a,this.je,[])),a},tt.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!ga(a,y)},tt.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=ga(a,y),y!==void 0)){if(od(y))return y;Wt("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},tt.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var b=ga(a,x);b!==y&&(Ju(this,b,a),jo(a,x,y),this.hc(y)===null&&Yu(this,y,a),Fa(this,"nodeGroupKey",Go,x,a,b,y),typeof x=="string"&&this.La(a,x))}else jo(a,x,y)}},Ai.prototype.copyNodeData=function(a){return a===null?null:(a=mr.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||ga(a,this.Je)===void 0||jo(a,this.Je,void 0),a)},Ai.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=ga(a,y);b!==x&&(jo(a,y,x),this.Fs(a,y,b,x))},tt=Ai.prototype,tt.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&&ga(a,E)===y[E]||b&&E===this.linkKeyProperty||this.setDataProperty(a,E,y[E])}},tt.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(Yl(this,b,!0)===E){var ne=this.lf;jo(b,ne,te),Fa(this,"linkFromKey",Go,ne,b,E,te),typeof ne=="string"&&this.La(b,ne)}if(Yl(this,b,!1)===E&&(ne=this.mf,jo(b,ne,te),Fa(this,"linkToKey",Go,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,Fa(this,"linkLabelKeys",la,he,b,E,te,ge,ge))}},tt.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;jo(a,b,x),Fa(this,"nodeGroupKey",Go,b,a,y,x),typeof b=="string"&&this.La(a,b)}},tt.Lv=function(){mr.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)fy(this,a[x])},tt.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;Fa(this,"nodeGroupKey",Go,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}else if(Yl(this,b,!0)===a&&(E=this.lf,Fa(this,"linkFromKey",Go,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),Yl(this,b,!1)===a&&(E=this.mf,Fa(this,"linkToKey",Go,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&&(Fa(this,"linkLabelKeys",la,ne,b,a,a,se,se),x.push(b))}for(y=0;y<x.length;y++)Ju(this,a,x[y]);Ln(x)}},tt.em=function(a){mr.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&Yu(this,y,a)},tt.qp=function(a){mr.prototype.qp.call(this,a);var y=this.lh(a);Ju(this,y,a)},tt.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=ga(a,y),y===void 0))return"";if(typeof y=="string")return y;Wt("getCategoryForLinkData found a non-string category for "+a+": "+y)},Ai.prototype.getLinkCategoryForData=function(a){return this.ps(a)},Ai.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var b=ga(a,x);b===void 0&&(b=""),b!==y&&(jo(a,x,y),Fa(this,"linkCategory",Go,x,a,b,y),typeof x=="string"&&this.La(a,x))}else jo(a,x,y)}},Ai.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},tt=Ai.prototype,tt.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))}tt.Wj=function(){return!0},tt.ri=function(){return!0},tt.xs=function(){return!0},tt.Xj=function(){return!0},Dt.Object.defineProperties(Ai.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];mn(E)||Wt("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),xo(E)}if(this.md=a,this.linkKeyProperty!==""){for(b=new Tn,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,Fa(this,"linkDataArray",Go,"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"}}}),Ai.prototype.setCategoryForLinkData=Ai.prototype.lp,Ai.prototype.getCategoryForLinkData=Ai.prototype.ps,Ai.prototype.assignAllDataProperties=Ai.prototype.Do,Ai.prototype.setGroupKeyForNodeData=Ai.prototype.mp,Ai.prototype.getGroupKeyForNodeData=Ai.prototype.lh,Ai.prototype.isGroupForNodeData=Ai.prototype.Yu,Ai.prototype.copyLinkData=Ai.prototype.Jo,Ai.prototype.mergeLinkDataArray=Ai.prototype.Zz,Ai.prototype.removeLinkDataCollection=Ai.prototype.lA,Ai.prototype.removeLinkData=Ai.prototype.bm,Ai.prototype.addLinkDataCollection=Ai.prototype.Ey,Ai.prototype.addLinkData=Ai.prototype.fi,Ai.prototype.containsLinkData=Ai.prototype.Jc,Ai.prototype.makeLinkDataKeyUnique=Ai.prototype.Bs,Ai.prototype.findLinkDataForKey=Ai.prototype.jh,Ai.prototype.setKeyForLinkData=Ai.prototype.Ks,Ai.prototype.getKeyForLinkData=Ai.prototype.Ac,Ai.prototype.removeLabelKeyForLinkData=Ai.prototype.Qx,Ai.prototype.addLabelKeyForLinkData=Ai.prototype.Bu,Ai.prototype.setLabelKeysForLinkData=Ai.prototype.Ls,Ai.prototype.getLabelKeysForLinkData=Ai.prototype.Ef,Ai.prototype.setToPortIdForLinkData=Ai.prototype.Cv,Ai.prototype.getToPortIdForLinkData=Ai.prototype.Cx,Ai.prototype.setFromPortIdForLinkData=Ai.prototype.xv,Ai.prototype.getFromPortIdForLinkData=Ai.prototype.zx,Ai.prototype.setToKeyForLinkData=Ai.prototype.Bv,Ai.prototype.getToKeyForLinkData=Ai.prototype.Bx,Ai.prototype.setFromKeyForLinkData=Ai.prototype.wv,Ai.prototype.getFromKeyForLinkData=Ai.prototype.yx,Ai.prototype.clear=Ai.prototype.clear;var m0=Object.freeze([]);Ai.className="GraphLinksModel",Au.GraphLinksModel=Ai,mr.constructGraphLinksModel=mr.constructGraphLinksModel=function(){return new Ai},mr.initDiagramModel=hy=function(){return new Ai};function Xs(a,y){mr.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(Cn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}un(Xs,mr),Xs.constructGraphLinksModel=mr.constructGraphLinksModel,Xs.prototype.cloneProtected=function(a){mr.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},tt=Xs.prototype,tt.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)+":"+Gn(E)}}return y},tt.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},tt.gp=function(a){mr.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},tt.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&Wt("applyIncrementalJson cannot change Model properties"),mr.prototype.fp.call(this,a)},tt.Vl=function(a){return a},tt.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=ga(a,y),y!==void 0)){if(od(y))return y;Wt("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},tt.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=ga(a,x);b!==y&&(Ju(this,b,a),jo(a,x,y),this.hc(y)===null&&Yu(this,y,a),Fa(this,"nodeParentKey",Go,x,a,b,y),typeof x=="string"&&this.La(a,x))}else jo(a,x,y)}},tt.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=ga(a,y),y===void 0)?"":typeof y=="string"?y:(Wt("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},Xs.prototype.getLinkCategoryForData=function(a){return this.ss(a)},Xs.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var b=ga(a,x);b===void 0&&(b=""),b!==y&&(jo(a,x,y),Fa(this,"parentLinkCategory",Go,x,a,b,y),typeof x=="string"&&this.La(a,x))}else jo(a,x,y)}},Xs.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},Xs.prototype.copyNodeData=function(a){return a===null?null:(a=mr.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||ga(a,this.Ke)===void 0||jo(a,this.Ke,void 0),a)},Xs.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=ga(a,y);b!==x&&(jo(a,y,x),this.Fs(a,y,b,x))},tt=Xs.prototype,tt.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)},tt.qv=function(a,y,x){if(this.mh(a)===y){var b=this.Ke;jo(a,b,x),Fa(this,"nodeParentKey",Go,b,a,y,x),typeof b=="string"&&this.La(a,b)}},tt.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;Fa(this,"nodeParentKey",Go,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]);Ln(x)}},tt.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)},tt.qp=function(a){mr.prototype.qp.call(this,a);var y=this.mh(a);Ju(this,y,a)},tt.lm=function(a,y){mr.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},tt.Tl=function(){return!0},tt.xs=function(){return!0},Dt.Object.defineProperties(Xs.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"}}}),Xs.prototype.setParentLinkCategoryForNodeData=Xs.prototype.Ms,Xs.prototype.getParentLinkCategoryForNodeData=Xs.prototype.ss,Xs.prototype.setParentKeyForNodeData=Xs.prototype.qe,Xs.prototype.getParentKeyForNodeData=Xs.prototype.mh,Xs.className="TreeModel",Au.TreeModel=Xs;function Yo(a){_o.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=ju,this.Ti=0,this.Zv=new jt,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=Ys,this.nd=Lp,this.hd=oy,this.tf=6,this.Nn=P0,a&&Object.assign(this,a)}un(Yo,_o),Yo.prototype.cloneProtected=function(a){_o.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},Yo.prototype.qb=function(a){a.classType===Yo?a===w0||a===b0||a===S0||a===x0||a===Lp?this.sorting=a:a===Yd||a===Mp||a===Ys||a===sd?this.direction=a:a===Nh||a===ad||a===ju||a===Iu?this.arrangement=a:(a===kf||a===P0)&&(this.nodeDiameterFormula=a):_o.prototype.qb.call(this,a)},Yo.prototype.createNetwork=function(){return new kp(this)},Yo.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 Tn;y.addAll(a.iterator),a=new Tn;var x=new Tn,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 Ae=this.startAngle;isFinite(Ae)||(Ae=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 Tn,b.addAll(a),b.addAll(x)):(this.arrangement===Iu&&x.reverse(),b=new Tn,b.addAll(x),b.addAll(a))}he=b.length;for(var Je=te=E=0;Je<b.length;Je++){var rt=Ae+Ge*te*(this.direction===Ys?1:-1)/he,ct=b.M(Je).diameter;isNaN(ct)&&(ct=ld(b.M(Je),rt)),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,Ae*Math.PI/180,Ge*Math.PI/180)}else ge=v0(this,E+(360<=Ge?he:he-1)*(se!==Iu?y:1.6*y),Se,Ae*Math.PI/180,Ge*Math.PI/180);te=ge*Se}else if(te=ge*Se,Je=py(this,ge,te,Ae*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,Ae*Math.PI/180,Ge*Math.PI/180),te=ge*Se):y=Je;else{for(ne=-1/0,E=0;E<he;E++)rt=b.M(E),ct=b.M(E===he-1?0:E+1),isNaN(rt.diameter)&&ld(rt,0),isNaN(ct.diameter)&&ld(ct,0),ne=Math.max(ne,(rt.diameter+ct.diameter)/2);ne+=y,E=v0(this,ne*(360<=Ge?he:he-1),Se,Ae*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=Ae,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,Ae=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,Ae+(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,Ys);break;case ju:Bg(this,x,ge+ne,Ys);break;case Nh:Fg(this,x,Se/2,ge+ne,Ys)}}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,Ys);break;case ju:Bg(this,a,ge+ne,Ys);break;case Nh:Fg(this,a,Se/2,ge+ne,Ys)}}}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,Ys)}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===Ys?he*x/(360<=te?se:se-1):-(he*x)/se),Se=y.M(he),Ae=ne*Math.tan(ge)/a;Ae=Math.sqrt((ne*ne+a*a*Ae*Ae)/(1+Ae*Ae)),Se.centerX=Ae*Math.cos(ge),Se.centerY=Ae*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),Ae=te*Math.sin(x);ge.centerX=E*Math.cos(x),ge.centerY=Ae,ge.actualAngle=180*x/Math.PI,isNaN(ge.diameter)&&ld(ge,0),isNaN(Se.diameter)&&ld(Se,0),ge=y0(a,E,te,b===Ys?x:-x,(ge.diameter+Se.diameter)/2+ne),x+=b===Ys?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===Ys?x:-x,ne),x+=b===Ys?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===Ys?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=jt.alloc();for(var Ae=0;Ae<Se.length&&(Se[Ae].centerX=he,Se[Ae].centerY=ge,!(Ae>=Se.length-1));Ae++)FS(a,he,ge,Se,Ae,E,te)||BS(a,he,ge,Se,Ae,E,te),he=te.x,ge=te.y;if(jt.free(te),a.mj++,!(23<a.mj)){he=Se[0].centerX,ge=Se[0].centerY,te=Se[Se.length-1].centerX,Ae=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-Ae)-((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(Ae)?0<te!=ge>Ae:0<Ae!=he<te,(he=E===Ys?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=jt.alloc(),Ae=y.Fa(),Ge=0;Ge<Ae.length&&(Ae[Ge].centerX=he,Ae[Ge].centerY=ge,!(Ge>=Ae.length-1));Ge++)FS(a,he,ge,Ae,Ge,E,Se)||BS(a,he,ge,Ae,Ge,E,Se),he=Se.x,ge=Se.y;if(jt.free(Se),a.mj++,!(23<a.mj)){if(he=Math.atan2(ge,he),he=E===Ys?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<Ae.length;he++)ne.mk[he]=Ae[he].bounds.x,ne.tm[he]=Ae[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===Ys)){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===Ys)){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}Yo.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},Yo.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 jt(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))},Yo.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}}Yo.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:Wt("Invalid sorting type.")}return a};function Ix(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new Tn;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}Yo.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 Tn;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 Ae=Se=1/0,Ge=-1,Je=[],rt=0;rt<x.length;rt++)0>y[x[rt]].indexOf(x[rt===x.length-1?0:rt+1])&&Je.push(rt===x.length-1?0:rt+1);if(Je.length===0)for(rt=0;rt<x.length;rt++)Je.push(rt);for(rt=0;rt<Je.length;rt++){for(var ct=Je[rt],Bt=y[ge],Lt=0,$t=0;$t<ne.length;$t++){var Ht=te[ne[$t]],Kt=te[se[$t]];if(Ht<Kt){var Yt=Ht;Ht=Kt}else Yt=Kt;if(Yt<ct&&ct<=Ht)for(Kt=0;Kt<Bt.length;Kt++){var ln=Bt[Kt];0>x.indexOf(ln)||Yt<te[ln]&&te[ln]<Ht||Yt===te[ln]||Ht===te[ln]||Lt++}else for(Kt=0;Kt<Bt.length;Kt++)ln=Bt[Kt],0>x.indexOf(ln)||Yt<te[ln]&&te[ln]<Ht&&Yt!==te[ln]&&Ht!==te[ln]&&Lt++}for(Bt=Lt,$t=Lt=0;$t<y[ge].length;$t++)Yt=x.indexOf(y[ge][$t]),0<=Yt&&(Yt=Math.abs(ct-(Yt>=ct?Yt+1:Yt)),Lt+=Yt<x.length+1-Yt?Yt:x.length+1-Yt);for($t=0;$t<ne.length;$t++)Yt=te[ne[$t]],Ht=te[se[$t]],Yt>=ct&&Yt++,Ht>=ct&&Ht++,Yt>Ht&&(Kt=Ht,Ht=Yt,Yt=Kt),Ht-Yt<(x.length+2)/2==(Yt<ct&&ct<=Ht)&&Lt++;(Bt<Se||Bt===Se&&Lt<Ae)&&(Se=Bt,Ae=Lt,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++)Ae=y[ge][Se],0<=x.indexOf(Ae)&&(ne.push(ge),se.push(Ae))}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=Ae=0;Ge<y[ge].length;Ge++)Je=x.indexOf(y[ge][Ge]),0>Je||Je===Se||(rt=Je>Se?Je-Se:Se-Je,Ae+=Je<Se!=rt>ne-rt?1:-1);x.splice(0>Ae?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},Dt.Object.defineProperties(Yo.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!==Ys&&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 yn(Yo,"ConstantSpacing",0),ad=new yn(Yo,"ConstantDistance",1),Nh=new yn(Yo,"ConstantAngle",2),Iu=new yn(Yo,"Packed",3),Ys=new yn(Yo,"Clockwise",4),sd=new yn(Yo,"Counterclockwise",5),Yd=new yn(Yo,"BidirectionalLeft",6),Mp=new yn(Yo,"BidirectionalRight",7),S0=new yn(Yo,"Forwards",8),x0=new yn(Yo,"Reverse",9),w0=new yn(Yo,"Ascending",10),b0=new yn(Yo,"Descending",11),Lp=new yn(Yo,"Optimized",12),P0=new yn(Yo,"Pythagorean",13),kf=new yn(Yo,"Circular",14);Yo.className="CircularLayout",Yo.ConstantSpacing=ju,Yo.ConstantDistance=ad,Yo.ConstantAngle=Nh,Yo.Packed=Iu,Yo.Clockwise=Ys,Yo.Counterclockwise=sd,Yo.BidirectionalLeft=Yd,Yo.BidirectionalRight=Mp,Yo.Forwards=S0,Yo.Reverse=x0,Yo.Ascending=w0,Yo.Descending=b0,Yo.Optimized=Lp,Yo.Pythagorean=P0,Yo.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}Dt.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 Ss(a){_o.call(this),this.ah=null,this.An=0,this.$d=new Vn(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(Ss,_o),Ss.prototype.cloneProtected=function(a){_o.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},Ss.prototype.createNetwork=function(){return new Of(this)},Ss.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 Ae=bn.alloc();ne.next();)if(Se=ne.value,this.computeBounds(Se,Ae),he)he=!1,E=Ae.x+Ae.width/2,te=Ae.y+Ae.height/2,ge[0]=new jt(Ae.x+Ae.width+b.width,Ae.y),ge[1]=new jt(Ae.x,Ae.y+Ae.height+b.height),se=2;else{var Ge=_S(ge,se,E,te,Ae.width,Ae.height,b),Je=ge[Ge],rt=new jt(Je.x+Ae.width+b.width,Je.y),ct=new jt(Je.x,Je.y+Ae.height+b.height);for(Ge+1<se&&ge.splice(Ge+1,0,null),ge[Ge]=rt,ge[Ge+1]=ct,se++,Ge=Je.x-Ae.x,Je=Je.y-Ae.y,Se=Se.vertexes.iterator;Se.next();)rt=Se.value,rt.centerX+=Ge,rt.centerY+=Je}for(bn.free(Ae),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 jt(Ge.x+Ge.width+b.width,Ge.y),ge[1]=new jt(Ge.x,Ge.y+Ge.height+b.height),se=2):(he=_S(ge,se,E,te,Ge.width,Ge.height,b),Ae=ge[he],Je=new jt(Ae.x+Ge.width+b.width,Ae.y),Ge=new jt(Ae.x,Ae.y+Ge.height+b.height),he+1<se&&ge.splice(he+1,0,null),ge[he]=Je,ge[he+1]=Ge,se++,ne.centerX=Ae.x+ne.width/2,ne.centerY=Ae.y+ne.height/2);for(Ln(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},Ss.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},Ss.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 Tn),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 Tn,E.Hj=se),se.add(ne),E.Vd--,E.sh+=ne.sh):ne.network===b&&(se=ne.Hj,se===null&&(se=new Tn,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,en.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 Ae=he.M(Se),Ge=null;for(te=Ae.edges.iterator;te.next();){var Je=te.value;if(Je.Ax(Ae)===E){Ge=Je;break}}Ge!==null&&(ge+=Ge.length,se+=Ae.width*Ae.height)}te=E.centerX,he=E.centerY,Se=E.width,Ae=E.height,Ge=E.focus,Je=Se*Ae,1>Je&&(Je=1),se=en.sqrt((se+Je+ge*ge*4/(ne*ne))/Je),ne=(se-1)*Se/2,se=(se-1)*Ae/2,E.bounds=new bn(te-Ge.x-ne,he-Ge.y-se,Se+2*ne,Ae+2*se),E.focus=new jt(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 bn(b.centerX-te,b.centerY-ne,E.Ss,E.Qs),b.focus=new jt(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=en.sqrt(te*te+ne*ne)/2;for(var se=!1,he=ne=0,ge=0,Se=y.vertexes.iterator;Se.next();){var Ae=Se.value;1>=Ae.Vd?he++:(se=!0,ge++,ne+=Math.atan2(y.centerY-Ae.centerY,y.centerX-Ae.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,rt){return Je===null||rt===null||Je===rt?0:rt.width*rt.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,Ae=he.edges.iterator;Ae.next();){Se=Ae.value;break}Ae=he.width;var Ge=he.height;Ae=en.sqrt(Ae*Ae+Ge*Ge)/2,Se=te+Se.length+Ae,Ae=ne+(y*(se/2>>1)+ge)*(se%2===0?1:-1),he.centerX=b+Se*Math.cos(Ae),he.centerY=E+Se*Math.sin(Ae),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],Ae=Se.x-x,Ge=Se.y-b;if(Ae=Ae*Ae+Ge*Ge,Ae<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=Ae}}return he}Ss.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Ss.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,en.sqrt(x*x+a*a)):a+x<y?(b=b+E-ne,a=a+x-y,en.sqrt(b*b+a*a)):ne-(b+E):b>ne+se?a>y+te?(x=b-ne-se,a=a-y-te,en.sqrt(x*x+a*a)):a+x<y?(b=b-ne-se,a=a+x-y,en.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,Bt){return ct===null||Bt===null||ct===Bt?0:ct.centerX-Bt.centerX}):y.sort(function(ct,Bt){return ct===null||Bt===null||ct===Bt?0:ct.centerY-Bt.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 Ae=te+1;Ae<y.length;Ae++){var Ge=y[Ae];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 rt=zS(ne,Ge);1>rt?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new E0),rt=b.random(),se=b.random(),he>ge?(b=Math.abs(Ge.bounds.right-ne.bounds.x),b=(1+b)*rt):he<ge?(b=Math.abs(Ge.bounds.x-ne.bounds.right),b=-(1+b)*rt):(b=Math.max(Ge.width,ne.width),b=(1+b)*rt-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)/(rt*rt),b=(ge-he)/rt*se,ge=(Je-Se)/rt*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,Ae=te.focus,he=Se.x+Ae.x,Se=Se.y+Ae.y,Ae=zS(x,te),1>Ae?(Ae=a.randomNumberGenerator,Ae===null&&(a.randomNumberGenerator=Ae=new E0),se=Ae.random(),Ae=Ae.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))*Ae):(se=se.stiffness*(Ae-se.length),b=(he-b)/Ae*se,ge=(Se-ne)/Ae*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}Ss.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},Ss.prototype.moveFixedVertex=function(){},Ss.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},Ss.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=oo,y.toSpot=oo)}},Ss.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=bn.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,bn.free(x)}x=bn.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()}bn.free(x)},Ss.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Ss.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},Ss.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},Ss.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},Ss.prototype.electricalFieldX=function(){return 0},Ss.prototype.electricalFieldY=function(){return 0},Ss.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},Ss.prototype.gravitationalFieldX=function(){return 0},Ss.prototype.gravitationalFieldY=function(){return 0},Ss.prototype.isFixed=function(a){return a.isFixed},Dt.Object.defineProperties(Ss.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"&&Wt('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())}}}),Ss.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),Dt.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),Dt.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 co(a){_o.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 jt,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}un(co,_o),co.prototype.cloneProtected=function(a){_o.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},co.prototype.qb=function(a){a.classType===co?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:Wt("Unknown enum value: "+a):_o.prototype.qb.call(this,a)},co.prototype.createNetwork=function(){return new Np(this)},co.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 Ae=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=Ae;var Je=Ge;Ae=he,Ge=se,he=ge,se=Je}var rt=E.focus;ge=te.focus;var ct=b.rev?te.bounds:E.bounds;Je=jt.alloc(),Se!==Ae?ct.w()&&Ae.isVisible()?Ae.actualBounds.w()?(Th(Ae,Ge,Di,Je),Je.x+=Ae.actualBounds.x-ct.x,Je.y+=Ae.actualBounds.y-ct.y):(Th(Ae,Ge,Di,Je),Je.w()||Je.assign(rt)):Je.assign(rt):ct.w()?(Th(Ae,Ge,Di,Je),Je.w()||Je.assign(rt)):Je.assign(rt),Ae=b.rev?E.bounds:te.bounds,Se=jt.alloc(),ne!==he?Ae.w()&&he.isVisible()?he.actualBounds.w()?(Th(he,se,Di,Se),Se.x+=he.actualBounds.x-Ae.x,Se.y+=he.actualBounds.y-Ae.y):(Th(he,se,Di,Se),Se.w()||Se.assign(ge)):Se.assign(ge):Ae.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-rt.x)/this.kc),he=Je.x,se=Math.round((Se.x-ge.x)/this.kc),ge=Se.x):(ne=Math.round((Je.y-rt.y)/this.kc),he=Je.y,se=Math.round((Se.y-ge.y)/this.kc),ge=Se.y),jt.free(Je),jt.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,Ae=0,ct=b.link,ct!==null){var Bt=ct.fromPort,Lt=ct.toPort;if(Bt!==null&&Lt!==null){var $t=ct.fromNode;if(Ge=ct.toNode,$t!==null&&Ge!==null){var Ht=k0(this,!0),Kt=k0(this,!1),Yt=this.setsPortSpots?Ht:ct.computeSpot(!0,Bt);rt=this.setsPortSpots?Kt:ct.computeSpot(!1,Lt);var ln=ct.isOrthogonal;Yt.$c()&&Yt.Hf(Kt)&&rt.$c()&&rt.Hf(Ht)?Ae=0:(Ht=ct.getLinkPoint($t,Bt,Yt,!0,ln,Ge,Lt,jt.alloc()),Kt=ct.getLinkDirection($t,Bt,Ht,Yt,!0,ln,Ge,Lt),jt.free(Ht),Yt.ys()||Kt!==JS(this,b,!0)?this.setsPortSpots&&$t!==null&&$t.ports.count===1&&b.rev&&(Ae+=1):Ae+=1,Yt=ct.getLinkPoint(Ge,Lt,rt,!1,ln,$t,Bt,jt.alloc()),ct=ct.getLinkDirection(Ge,Lt,Yt,rt,!1,ln,$t,Bt),jt.free(Yt),rt.ys()||ct!==JS(this,b,!1)?this.setsPortSpots&&Ge!==null&&Ge.ports.count===1&&b.rev&&(Ae+=2):Ae+=2)}}}if(Ge=Ae,Ae=Ge===1||Ge===3,(Ge=Ge===2||Ge===3)&&(rt=a.createVertex(),rt.node=null,rt.Dj=1,rt.layer=Je,rt.near=E,a.dh(rt),E=a.Zj(E,rt,b.link),E.valid=!1,E.rev=b.rev,E.portFromColOffset=ne,E.portToColOffset=0,E.portFromPos=he,E.portToPos=0,E=rt),ct=1,Ae&&ct--,Je-Se>ct&&0<Je){for(b.valid=!1,rt=a.createVertex(),rt.node=null,rt.Dj=2,rt.layer=Je-1,a.dh(rt),E=a.Zj(E,rt,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=rt,Je--;Je-Se>ct&&0<Je;)rt=a.createVertex(),rt.node=null,rt.Dj=3,rt.layer=Je-1,a.dh(rt),E=a.Zj(E,rt,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=0,E.portFromPos=0,E.portToPos=0,E=rt,Je--;E=a.Zj(rt,te,b.link),E.valid=!Ae,Ae&&(rt.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},co.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}co.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},co.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 Ae=b[Se];Ae.near===ge&&Ae.Dj===ge.Dj||se++}else for(Se=ne-1;Se>he;Se--)Ae=b[Se],Ae.near===ge&&Ae.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(Ae=Je.fromVertex.index,Se=Je.portToPos,Je=Je.portFromPos,Ge=ge+1;Ge<he.length;Ge++){var rt=he[Ge];if(rt.valid&&rt.fromVertex.layer!==y){var ct=rt.fromVertex.index,Bt=rt.portToPos;rt=rt.portFromPos,Se<Bt&&(Ae>ct||Ae===ct&&Je>rt)&&se++,Bt<Se&&(ct>Ae||ct===Ae&&rt>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(Ae=Je.toVertex.index,Se=Je.portToPos,Je=Je.portFromPos,Ge=ge+1;Ge<he.length;Ge++)rt=he[Ge],rt.valid&&rt.toVertex.layer!==y&&(ct=rt.toVertex.index,Bt=rt.portToPos,rt=rt.portFromPos,Je<rt&&(Ae>ct||Ae===ct&&Se>Bt)&&se++,rt<Je&&(ct>Ae||ct===Ae&&Bt>Se)&&se++)}for(te[ne*E+ne]=se,he=ne+1;he<E;he++){var Lt=0,$t=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(Ae=Je.fromVertex.index,Je=Je.portFromPos,Ge=0;Ge<Ht.length;Ge++)rt=Ht[Ge],rt.valid&&rt.fromVertex.layer!==y&&(ct=rt.fromVertex.index,rt=rt.portFromPos,(Ae<ct||Ae===ct&&Je<rt)&&$t++,(ct<Ae||ct===Ae&&rt<Je)&&Lt++)}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(Ae=Je.toVertex.index,Se=Je.portToPos,Ge=0;Ge<Ht.length;Ge++)rt=Ht[Ge],rt.valid&&rt.toVertex.layer!==y&&(ct=rt.toVertex.index,Bt=rt.portToPos,(Ae<ct||Ae===ct&&Se<Bt)&&$t++,(ct<Ae||ct===Ae&&Bt<Se)&&Lt++)}te[ne*E+he]=Lt,te[he*E+ne]=$t}}return cd(a,y,b),te}co.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 Ae=ge[Se];if(Ae.valid&&Ae.toVertex.layer!==E){var Ge=Ae.fromVertex.column+Ae.portFromColOffset,Je=Ae.toVertex.column+Ae.portToColOffset;se+=(Math.abs(Ge-Je)+1)*gy(Ae)}}}cd(b,E,te),y+=se}return y}co.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,Ae=0,Ge=se.near;if(Ge!==null&&Ge.layer===se.layer&&(Se+=Ge.column-1,Ae++),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,Ae++)}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,Ae++);te[ne]=Ae===0?-1:Se/Ae}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,Ae=[],Ge=se.near;if(Ge!==null&&Ge.layer===se.layer&&(Ae[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&&(Ae[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&&(Ae[Se]=Ge.column+se.portToColOffset,Se++);Se===0?te[ne]=-1:(Ae.sort(function(rt,ct){return rt-ct}),ge=Se>>1,te[ne]=Se&1?Ae[ge]:Ae[ge-1]+Ae[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)}}co.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++}co.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,Ae=!1,Ge=ge.sourceEdgesArrayAccess;E=Ge.length;for(var Je=0;Je<E;Je++){var rt=Ge[Je],ct=rt.fromVertex;Se+=1,ct.component!==1&&(te+=1,ct=ct.layer-ge.layer,rt=a.linkMinLength(rt),b=Math.min(b,ct-rt))}for(Ge=ge.destinationEdgesArrayAccess,E=Ge.length,Je=0;Je<E;Je++)rt=Ge[Je].toVertex,--Se,rt.component!==1?--te:Ae=!0;(he===null||Se<se)&&!Ae&&(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,Ae=Ge.length,Je=0;Je<Ae;Je++)rt=Ge[Je].fromVertex,ge+=1,rt.component!==1?b+=1:Se=!0;for(Ge=ne.destinationEdgesArrayAccess,Ae=Ge.length,Je=0;Je<Ae;Je++)rt=Ge[Je],ct=rt.toVertex,--ge,ct.component!==1&&(--b,ct=ne.layer-ct.layer,rt=a.linkMinLength(rt),E=Math.min(E,ct-rt));(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}co.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))}co.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],Ae=x[b[te+1].index*E+b[te].index],Ge=0,Je=0,rt=b[te].column,ct=b[te+1].column,Bt=a.nodeMinColumnSpace(b[te],!0),Lt=a.nodeMinColumnSpace(b[te],!1),$t=a.nodeMinColumnSpace(b[te+1],!0),Ht=a.nodeMinColumnSpace(b[te+1],!1);Bt=rt-Bt+$t,Lt=ct-Lt+Ht;var Kt=b[te].sourceEdges.iterator;for(Kt.reset();Kt.next();)if($t=Kt.value,Ht=$t.fromVertex,$t.valid&&Ht.layer===y){for($t=0;b[$t]!==Ht;)$t++;$t<te&&(Ge+=2*(te-$t),Je+=2*(te+1-$t)),$t===te+1&&(Ge+=1),$t>te+1&&(Ge+=4*($t-te),Je+=4*($t-(te+1)))}for(Kt=b[te].destinationEdges.iterator,Kt.reset();Kt.next();)if($t=Kt.value,Ht=$t.toVertex,$t.valid&&Ht.layer===y){for($t=0;b[$t]!==Ht;)$t++;$t===te+1&&(Je+=1)}for(Kt=b[te+1].sourceEdges.iterator,Kt.reset();Kt.next();)if($t=Kt.value,Ht=$t.fromVertex,$t.valid&&Ht.layer===y){for($t=0;b[$t]!==Ht;)$t++;$t<te&&(Ge+=2*(te+1-$t),Je+=2*(te-$t)),$t===te&&(Je+=1),$t>te+1&&(Ge+=4*($t-(te+1)),Je+=4*($t-te))}for(Kt=b[te+1].destinationEdges.iterator,Kt.reset();Kt.next();)if($t=Kt.value,Ht=$t.toVertex,$t.valid&&Ht.layer===y){for($t=0;b[$t]!==Ht;)$t++;$t===te&&(Ge+=1)}$t=Ht=0,Kt=ne[b[te].index];var Yt=se[b[te].index],ln=ne[b[te+1].index],er=se[b[te+1].index];Kt!==-1&&(Ht+=Math.abs(Kt-rt),$t+=Math.abs(Kt-Lt)),Yt!==-1&&(Ht+=Math.abs(Yt-rt),$t+=Math.abs(Yt-Lt)),ln!==-1&&(Ht+=Math.abs(ln-ct),$t+=Math.abs(ln-Bt)),er!==-1&&(Ht+=Math.abs(er-ct),$t+=Math.abs(er-Bt)),(Je<Ge-.5||Je===Ge&&Ae<Se-.5||Je===Ge&&Ae===Se&&$t<Ht-.5)&&(ge=he=!0,b[te].column=Lt,b[te+1].column=Bt,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}co.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,Ae=a.nodeMinColumnSpace(E[b],!0),Ge=a.nodeMinColumnSpace(E[b],!1),Je=0;0>b-1||Se-E[b-1].column-1>Ae+a.nodeMinColumnSpace(E[b-1],!1)?Je=Se-1:Je=Se,Ae=b+1>=te||E[b+1].column-Se-1>Ge+a.nodeMinColumnSpace(E[b+1],!0)?Se+1:Se;var rt=Ge=0,ct=0;if(0>=x)for(var Bt=E[b].sourceEdges.iterator;Bt.next();){var Lt=Bt.value,$t=Lt.fromVertex;if(Lt.valid&&$t.layer!==y){var Ht=gy(Lt),Kt=Lt.portFromColOffset;Lt=Lt.portToColOffset,$t=$t.column,Ge+=(Math.abs(Se+Lt-($t+Kt))+1)*Ht,rt+=(Math.abs(Je+Lt-($t+Kt))+1)*Ht,ct+=(Math.abs(Ae+Lt-($t+Kt))+1)*Ht}}if(0<=x)for(Bt=E[b].destinationEdges.iterator;Bt.next();)Lt=Bt.value,$t=Lt.toVertex,Lt.valid&&$t.layer!==y&&(Ht=gy(Lt),Kt=Lt.portFromColOffset,Lt=Lt.portToColOffset,$t=$t.column,Ge+=(Math.abs(Se+Kt-($t+Lt))+1)*Ht,rt+=(Math.abs(Je+Kt-($t+Lt))+1)*Ht,ct+=(Math.abs(Ae+Kt-($t+Lt))+1)*Ht);Lt=Kt=Ht=0,Bt=ne[E[b].index],$t=se[E[b].index],Bt!==-1&&(Ht+=Math.abs(Bt-Se),Kt+=Math.abs(Bt-Je),Lt+=Math.abs(Bt-Ae)),$t!==-1&&(Ht+=Math.abs($t-Se),Kt+=Math.abs($t-Je),Lt+=Math.abs($t-Ae)),rt<Ge||rt===Ge&&Kt<Ht?(ge=he=!0,E[b].column=Je):(ct<Ge||ct===Ge&&Lt<Ht)&&(ge=he=!0,E[b].column=Ae)}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 Ae=b[x+1].column;Ae-se===ge+a.nodeMinColumnSpace(b[x+1],!0)?Se=se-1:Se=se}else x===E-1?(Ae=b[x-1].column,Se=se-Ae===he+a.nodeMinColumnSpace(b[x-1],!1)?se+1:se):(Ae=b[x-1].column,he=Ae+a.nodeMinColumnSpace(b[x-1],!1)+he+1,Ae=b[x+1].column,ge=Ae-a.nodeMinColumnSpace(b[x+1],!0)-ge-1,Se=(he+ge)/2|0);else x===0&&x===E-1?Se=ne[x]:x===0?(Ae=b[x+1].column,ge=Ae-a.nodeMinColumnSpace(b[x+1],!0)-ge-1,Se=Math.min(ne[x],ge)):x===E-1?(Ae=b[x-1].column,he=Ae+a.nodeMinColumnSpace(b[x-1],!1)+he+1,Se=Math.max(ne[x],he)):(Ae=b[x-1].column,he=Ae+a.nodeMinColumnSpace(b[x-1],!1)+he+1,Ae=b[x+1].column,ge=Ae-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,Ae=(a.ve&4)!==0,Ge=(a.ve&8)!==0;for(ge&&(a.verticalAlignment(y,x,!0),te=L0(a,y,!0,!1)),y.reverse(),Ae&&(a.verticalAlignment(y,x,!1),se=L0(a,y,!1,!1)),b=Si(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)),Ln(y),a.u(te,ne,se,he),a.network.vertexes.each(function(Je){var rt=pn();ge&&rt.push(te.get(Je)),Se&&rt.push(ne.get(Je)),Ae&&rt.push(se.get(Je)),Ge&&rt.push(he.get(Je)),rt.sort(function(Bt,Lt){return Bt-Lt});var ct=rt.length;ct=(rt[Math.floor((ct-1)/2)]+rt[Math.ceil((ct-1)/2)])/2,Ln(rt),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 Ae=Se;if(he===se.length-1||Ae){for(Se=ne.length-1,Ae&&(Se=My(ge)[0].index);te<=he;){if(ge=se[te],!ge.bo){Ae=[];for(var Ge=Si(ge.sourceEdgesArrayAccess),Je=Ge.next();!Je.done;Je=Ge.next())Je=Je.value,Je.valid&&Ae.push(Je);ge.bo=Ae}for(ge=Si(ge.bo),Ae=ge.next();!Ae.done;Ae=ge.next())Ae=Ae.value,Ge=Ae.fromVertex.index,(Ge<E||Ge>Se)&&y.add(Ae);te++}E=Se}}}co.prototype.verticalAlignment=function(a,y,x){Kx(a),a=Si(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=Si(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(Ae,Ge){return Ae.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=Si(y),ne=te.next();!ne.done;ne=te.next()){var se=Si(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=Si(y),se=te.next();!se.done;se=te.next()){se=Si(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 Ae=Se.align,Ge=ne?Se.width:Se.height,Je=ne?Ae.width:Ae.height;if(x){var rt=I0(Se,Ae),ct=rt.portFromPos,Bt=rt.portToPos;rt.link!==null&&(Se.node&&Se.node!==rt.link.fromNode&&(ct=ne?Se.focusX:Se.focusY),Ae.node&&Ae.node!==rt.link.toNode&&(Bt=ne?Ae.focusX:Ae.focusY))}else rt=I0(Ae,Se),ct=rt.portToPos,Bt=rt.portFromPos,rt.link!==null&&(Se.node&&Se.node!==rt.link.toNode&&(ct=ne?Se.focusX:Se.focusY),Ae.node&&Ae.node!==rt.link.fromNode&&(Bt=ne?Ae.focusX:Ae.focusY));Ge=b?Se.qg+(Ge-ct)-(Je-Bt):Se.qg+ct-Bt,Ae.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=Si(y),ne=x.next();!ne.done;ne=x.next())for(te=Si(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 cr,y=Si(y),ne=y.next();!ne.done;ne=y.next())for(x=Si(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&&Wt("Could not determine previous vertex in layer"),y[x][a-1]}co.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)));Ln(b),Ln(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}co.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?ha:za:a.K===90?y?za:ha:a.K===180?y?Ea:Ka:y?Ka:Ea}co.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 jt(x&&b?0:te,x&&!b?0:y),a.reset();a.next();)x=a.value,x.x+=te,x.y+=y,x.commit()},co.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 bn(0,0,x,Math.abs(this.Ta[0]))):y.push(new bn(0,this.Ta[b-1],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===90?b===0?y.push(new bn(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new bn(0,this.Ta[b],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===180?b===0?y.push(new bn(0,0,Math.abs(this.Ta[0]),x)):y.push(new bn(this.Ta[b-1],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x)):b===0?y.push(new bn(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new bn(this.Ta[b],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x));this.commitLayers(y,this.Rf)},co.prototype.commitLayers=function(){},co.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,Ae=x.toVertex;if(x.valid)y.curve===Xl&&y.pointsCount===4&&(Se.column===Ae.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===aa&&(b=!0),se!==null&&he===aa&&(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===Ae.layer)y.zf();else{var Ge=!1,Je=!1,rt=this.ie,ct=y.firstPickIndex+1;if(y.isOrthogonal){Je=!0;var Bt=y.pointsCount;4<Bt&&y.points.removeRange(2,Bt-3)}else if(y.curve===Xl)Ge=!0,Bt=y.pointsCount,4<Bt&&y.points.removeRange(2,Bt-3),Bt===4&&(ct=2);else{Bt=y.pointsCount;var Lt=ge===aa,$t=he===aa;2<Bt&&Lt&&$t?y.points.removeRange(1,Bt-2):3<Bt&&Lt&&!$t?y.points.removeRange(1,Bt-3):3<Bt&&!Lt&&$t?y.points.removeRange(2,Bt-2):4<Bt&&!Lt&&!$t&&y.points.removeRange(2,Bt-3)}if(x.rev){for(;Ae!==null&&Se!==Ae;){var Ht=Bt=null;for(Lt=Ae.sourceEdges.iterator;Lt.next()&&($t=Lt.value,$t.link!==x.link||(Bt=$t.fromVertex,Ht=$t.toVertex,Bt.node!==null)););if(Bt===null)break;if(Bt!==Se){Lt=y.i(ct-1).x,$t=y.i(ct-1).y;var Kt=Bt.centerX,Yt=Bt.centerY;if(Je)this.K===180||this.K===0?ct===y.firstPickIndex+1?(y.m(ct++,Lt,$t),y.m(ct++,Lt,Yt)):(Ht!==null?Ht.centerY:$t)!==Yt&&(Ht=this.Ta[Bt.layer-1]+this.Rf.x,y.m(ct++,Ht,$t),y.m(ct++,Ht,Yt)):ct===y.firstPickIndex+1?(y.m(ct++,Lt,$t),y.m(ct++,Kt,$t)):(Ht!==null?Ht.centerX:Lt)!==Kt&&(Ht=this.Ta[Bt.layer-1]+this.Rf.y,y.m(ct++,Lt,Ht),y.m(ct++,Kt,Ht));else if(ct===y.firstPickIndex+1){Ht=Math.max(10,this.he[Ae.layer]);var ln=Math.max(10,this.Ld[Ae.layer]);if(Ge)this.K===180?Kt<=Ae.bounds.x?(Ae=Ae.bounds.x,y.m(ct++,Ae-Ht,Yt),y.m(ct++,Ae,Yt),y.m(ct++,Ae+ln,Yt)):(y.m(ct++,Kt-Ht,Yt),y.m(ct++,Kt,Yt),y.m(ct++,Kt+ln,Yt)):this.K===90?Yt>=Ae.bounds.bottom?(Ae=Ae.bounds.y+Ae.bounds.height,y.m(ct++,Kt,Ae+ln),y.m(ct++,Kt,Ae),y.m(ct++,Kt,Ae-Ht)):(y.m(ct++,Kt,Yt+ln),y.m(ct++,Kt,Yt),y.m(ct++,Kt,Yt-Ht)):this.K===270?Yt<=Ae.bounds.y?(Ae=Ae.bounds.y,y.m(ct++,Kt,Ae-Ht),y.m(ct++,Kt,Ae),y.m(ct++,Kt,Ae+ln)):(y.m(ct++,Kt,Yt-Ht),y.m(ct++,Kt,Yt),y.m(ct++,Kt,Yt+ln)):this.K===0&&(Kt>=Ae.bounds.right?(Ae=Ae.bounds.x+Ae.bounds.width,y.m(ct++,Ae+ln,Yt),y.m(ct++,Ae,Yt),y.m(ct++,Ae-Ht,Yt)):(y.m(ct++,Kt+ln,Yt),y.m(ct++,Kt,Yt),y.m(ct++,Kt-Ht,Yt)));else{y.m(ct++,Lt,$t);var er=0;this.K===180||this.K===0?((this.K===180?Kt>=Ae.bounds.right:Kt<=Ae.bounds.x)&&(er=(this.K===0?-Ht:ln)/2),y.m(ct++,Lt+er,Yt)):((this.K===270?Yt>=Ae.bounds.bottom:Yt<=Ae.bounds.y)&&(er=(this.K===90?-Ht:ln)/2),y.m(ct++,Kt,$t+er)),y.m(ct++,Kt,Yt)}}else Ht=Math.max(10,this.he[Bt.layer]),ln=Math.max(10,this.Ld[Bt.layer]),Ge?this.K===180?(y.m(ct++,Kt-Ht-rt,Yt),y.m(ct++,Math.min(Kt-Ht+rt/2,Kt),Yt),y.m(ct++,Kt,Yt),y.m(ct++,Kt,Yt),y.m(ct++,Math.max(Kt+ln-rt/2,Kt),Yt),y.m(ct++,Kt+ln+rt,Yt)):this.K===90?(y.m(ct++,Kt,Yt+ln+rt),y.m(ct++,Kt,Math.max(Yt+ln-rt/2,Yt)),y.m(ct++,Kt,Yt),y.m(ct++,Kt,Yt),y.m(ct++,Kt,Math.min(Yt-Ht+rt/2,Yt)),y.m(ct++,Kt,Yt-Ht-rt)):this.K===270?(y.m(ct++,Kt,Yt-Ht-rt),y.m(ct++,Kt,Math.min(Yt-Ht+rt/2,Yt)),y.m(ct++,Kt,Yt),y.m(ct++,Kt,Yt),y.m(ct++,Kt,Math.max(Yt+ln-rt/2,Yt)),y.m(ct++,Kt,Yt+ln+rt)):(y.m(ct++,Kt+ln+rt,Yt),y.m(ct++,Math.max(Kt+ln-rt/2,Kt),Yt),y.m(ct++,Kt,Yt),y.m(ct++,Kt,Yt),y.m(ct++,Math.min(Kt-Ht+rt/2,Kt),Yt),y.m(ct++,Kt-Ht-rt,Yt)):y.m(ct++,Kt,Yt)}Ae=Bt}(se===null||ge!==aa||Je)&&(Lt=y.i(ct-1).x,$t=y.i(ct-1).y,Kt=y.i(ct).x,Yt=y.i(ct).y,Je?(rt=this.Ld[Se.layer],this.K===180||this.K===0?(Je=$t,Je>=Se.bounds.y&&Je<=Se.bounds.bottom&&(this.K===180?Kt>=Se.bounds.x:Kt<=Se.bounds.right)&&(Ae=Se.centerX+(this.K===180?-rt:rt),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++,Ae,$t),y.m(ct++,Ae,Je)),y.m(ct++,Kt,Je)):(Je=Lt,Je>=Se.bounds.x&&Je<=Se.bounds.right&&(this.K===270?Yt>=Se.bounds.y:Yt<=Se.bounds.bottom)&&(Ae=Se.centerY+(this.K===270?-rt:rt),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++,Lt,Ae),y.m(ct++,Je,Ae)),y.m(ct++,Je,Yt)),y.m(ct++,Kt,Yt)):Ge?(Ht=Math.max(10,this.he[Se.layer]),ln=Math.max(10,this.Ld[Se.layer]),this.K===180&&Kt>=Se.bounds.x?(Ae=Se.bounds.x+Se.bounds.width,y.L(ct-2,Ae,$t),y.L(ct-1,Ae+ln,$t)):this.K===90&&Yt<=Se.bounds.bottom?(Ae=Se.bounds.y,y.L(ct-2,Lt,Ae),y.L(ct-1,Lt,Ae-Ht)):this.K===270&&Yt>=Se.bounds.y?(Ae=Se.bounds.y+Se.bounds.height,y.L(ct-2,Lt,Ae),y.L(ct-1,Lt,Ae+ln)):this.K===0&&Kt<=Se.bounds.right&&(Ae=Se.bounds.x,y.L(ct-2,Ae,$t),y.L(ct-1,Ae-Ht,$t))):(Ht=Math.max(10,this.he[Se.layer]),ln=Math.max(10,this.Ld[Se.layer]),Je=0,this.K===180||this.K===0?((this.K===180?Kt<=Se.bounds.x:Kt>=Se.bounds.right)&&(Je=(this.K===0?ln:-Ht)/2),y.m(ct++,Kt+Je,$t)):((this.K===270?Yt<=Se.bounds.y:Yt>=Se.bounds.bottom)&&(Je=(this.K===90?ln:-Ht)/2),y.m(ct++,Lt,Yt+Je)),y.m(ct++,Kt,Yt)))}else{for(;Se!==null&&Se!==Ae;){for(Ht=Bt=null,Se=Se.destinationEdges.iterator;Se.next()&&(Lt=Se.value,Lt.link!==x.link||(Bt=Lt.toVertex,Ht=Lt.fromVertex,Ht.node!==null&&(Ht=null),Bt.node!==null)););if(Bt===null)break;Bt!==Ae&&(Lt=y.i(ct-1).x,$t=y.i(ct-1).y,Kt=Bt.centerX,Yt=Bt.centerY,Je?this.K===180||this.K===0?(Ht!==null?Ht.centerY:$t)!==Yt&&(Ht=this.Ta[Bt.layer]+this.Rf.x,ct===y.firstPickIndex+1&&(Ht=this.K===0?Math.max(Ht,Lt):Math.min(Ht,Lt)),y.m(ct++,Ht,$t),y.m(ct++,Ht,Yt)):(Ht!==null?Ht.centerX:Lt)!==Kt&&(Ht=this.Ta[Bt.layer]+this.Rf.y,ct===y.firstPickIndex+1&&(Ht=this.K===90?Math.max(Ht,$t):Math.min(Ht,$t)),y.m(ct++,Lt,Ht),y.m(ct++,Kt,Ht)):(Ht=Math.max(10,this.he[Bt.layer]),ln=Math.max(10,this.Ld[Bt.layer]),Ge?this.K===180?(y.m(ct++,Kt+ln+rt,Yt),y.m(ct++,Math.max(Kt+ln-rt/2,Kt),Yt),y.m(ct++,Kt,Yt),y.m(ct++,Kt,Yt),y.m(ct++,Math.min(Kt-Ht+rt/2,Kt),Yt),y.m(ct++,Kt-Ht-rt,Yt)):this.K===90?(y.m(ct++,Kt,Yt-Ht-rt),y.m(ct++,Kt,Math.min(Yt-Ht+rt/2,Yt)),y.m(ct++,Kt,Yt),y.m(ct++,Kt,Yt),y.m(ct++,Kt,Math.max(Yt+ln-rt/2,Yt)),y.m(ct++,Kt,Yt+ln+rt)):this.K===270?(y.m(ct++,Kt,Yt+ln+rt),y.m(ct++,Kt,Math.max(Yt+ln-rt/2,Yt)),y.m(ct++,Kt,Yt),y.m(ct++,Kt,Yt),y.m(ct++,Kt,Math.min(Yt-Ht+rt/2,Yt)),y.m(ct++,Kt,Yt-Ht-rt)):(y.m(ct++,Kt-Ht-rt,Yt),y.m(ct++,Math.min(Kt-Ht+rt/2,Kt),Yt),y.m(ct++,Kt,Yt),y.m(ct++,Kt,Yt),y.m(ct++,Math.max(Kt+ln-rt/2,Kt),Yt),y.m(ct++,Kt+ln+rt,Yt)):this.K===180?(y.m(ct++,Kt+ln,Yt),y.m(ct++,Kt-Ht,Yt)):this.K===90?(y.m(ct++,Kt,Yt-Ht),y.m(ct++,Kt,Yt+ln)):this.K===270?(y.m(ct++,Kt,Yt+ln),y.m(ct++,Kt,Yt-Ht)):(y.m(ct++,Kt-Ht,Yt),y.m(ct++,Kt+ln,Yt)))),Se=Bt}Je&&(Lt=y.i(ct-1).x,$t=y.i(ct-1).y,Kt=y.i(ct).x,Yt=y.i(ct).y,this.K===180||this.K===0?$t!==Yt&&(Ht=this.K===0?Math.min(Math.max((Kt+Lt)/2,this.Ta[Ae.layer]+this.Rf.x),Kt):Math.max(Math.min((Kt+Lt)/2,this.Ta[Ae.layer]+this.Rf.x),Kt),y.m(ct++,Ht,$t),y.m(ct++,Ht,Yt)):Lt!==Kt&&(Ht=this.K===90?Math.min(Math.max((Yt+$t)/2,this.Ta[Ae.layer]+this.Rf.y),Yt):Math.max(Math.min((Yt+$t)/2,this.Ta[Ae.layer]+this.Rf.y),Yt),y.m(ct++,Lt,Ht),y.m(ct++,Kt,Ht)))}b!==null&&Ge&&4<=y.pointsCount&&(ne!==null&&(ne=ge===aa?y.getLinkPointFromPoint(E,ne,ne.ga(Di),y.i(3),!0):y.i(0),ge===aa&&(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===aa?y.getLinkPointFromPoint(te,se,se.ga(Di),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),he===aa&&(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()},co.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new Tn,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 Ae=1;for(se=x[te].first,he=te;he<E;he++)ge=x[he],ge.first!==se&&(Ae++,se=ge.first);for(he=!0,ge=Ae,Se<Ae?(he=!1,ge=Se,se=x[te].jc,this.zi(x,this.Js,te,te+ne)):se=x[te].first,Se=0,Ae=te;Ae<E;Ae++){var Ge=x[Ae];(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 rt=this.linkSpacing*(Se-(ge-1)/2);y++,Je.uh(),Je.L(Ge.index,te.x,te.y+rt),Je.L(Ge.index+1,ne.x,ne.y+rt),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),Ae=1,se=x[te].first,he=te;he<E;he++)ge=x[he],ge.first!==se&&(Ae++,se=ge.first);for(he=!0,ge=Ae,Se<Ae?(he=!1,ge=Se,se=x[te].jc,this.zi(x,this.Js,te,te+ne)):se=x[te].first,Se=0,Ae=te;Ae<E;Ae++)Ge=x[Ae],(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),rt=this.linkSpacing*(Se-(ge-1)/2),y++,Je.uh(),Je.L(Ge.index,te.x+rt,te.y),Je.L(Ge.index+1,ne.x+rt,ne.y),Je.zf()}te=E}a=b}}}},tt=co.prototype,tt.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},tt.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},tt.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},tt.B=function(a,y){return a-=y,-1<a&&1>a},tt.zi=function(a,y,x,b){var E=a.length,te=b-x;if(!(1>=te))if((0>x||x>=E-1)&&Wt("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}Dt.Object.defineProperties(co.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()):Wt("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 yn(co,"CycleDepthFirst",0),xy=new yn(co,"CycleGreedy",1),Ug=new yn(co,"CycleFromLayers",2),N0=new yn(co,"LayerOptimalLinkLength",0),wy=new yn(co,"LayerLongestPathSink",1),by=new yn(co,"LayerLongestPathSource",2),A0=new yn(co,"InitDepthFirstOut",0),Py=new yn(co,"InitDepthFirstIn",1),Cy=new yn(co,"InitNaive",2),Ey=new yn(co,"AggressiveNone",0),j0=new yn(co,"AggressiveLess",1),Ty=new yn(co,"AggressiveMore",2),Zx=8;co.className="LayeredDigraphLayout",co.CycleDepthFirst=O0,co.CycleGreedy=xy,co.CycleFromLayers=Ug,co.LayerOptimalLinkLength=N0,co.LayerLongestPathSink=wy,co.LayerLongestPathSource=by,co.InitDepthFirstOut=A0,co.InitDepthFirstIn=Py,co.InitNaive=Cy,co.AggressiveNone=Ey,co.AggressiveLess=j0,co.AggressiveMore=Ty,co.PackNone=0,co.PackExpand=1,co.PackStraighten=2,co.PackMedian=4,co.PackAll=15,co.AlignNone=0,co.AlignUpperLeft=1,co.AlignUpperRight=2,co.AlignLowerLeft=4,co.AlignLowerRight=8,co.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=Si(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=Si(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;Wt("Unable to find destination edge to given vertex")}function My(a){if(!a.co){for(var y=[],x=Si(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=Si(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},Dt.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),Dt.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 Ei(a){_o.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 Vn(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(Ei,_o),Ei.prototype.cloneProtected=function(a){_o.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)},Ei.prototype.qb=function(a){a.classType===Ei?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:Wt("Unknown enum value: "+a):_o.prototype.qb.call(this,a)},Ei.prototype.createNetwork=function(){return new If(this)},Ei.prototype.makeNetwork=function(a){function y(b){if(b instanceof nr)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof Un){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 sn?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof ei?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},Ei.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 sn&&(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}Ei.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:Wt("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:Wt("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 Tn,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 Tn,b=y.sourceVertexes;b.next();)E=b.value,ax(a,y,E)&&x.add(E);0<x.count&&(y.children=x.Fa())}break;default:Wt("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}Ei.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}}Ei.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])}}Ei.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])}}Ei.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:Wt("Unhandled sorting value "+a.sorting.toString())}},Ei.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Ei.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=bn.allocAt(0,0,a.bounds.width+te,a.bounds.height+ne),a.bounds=E,bn.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}Ei.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,Ae=jt.alloc(),Ge=0;Ge<Se;Ge++){var Je=ge[Ge],rt=Je.measuredBounds;if(b&&!ne||!te&&!x&&ne||te&&x&&ne){if(135<E&&!te||x&&se)if(0<=a.commentMargin)for(Ae.h(a.bounds.x-a.commentMargin-rt.width,a.bounds.y+he),Je.move(Ae),Je=Je.Sd();Je.next();){var ct=Je.value;ct.fromSpot=Ea,ct.toSpot=Ka}else for(Ae.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+he),Je.move(Ae),Je=Je.Sd();Je.next();)ct=Je.value,ct.fromSpot=Ka,ct.toSpot=Ea;else if(0<=a.commentMargin)for(Ae.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+he),Je.move(Ae),Je=Je.Sd();Je.next();)ct=Je.value,ct.fromSpot=Ka,ct.toSpot=Ea;else for(Ae.h(a.bounds.x+a.commentMargin-rt.width,a.bounds.y+he),Je.move(Ae),Je=Je.Sd();Je.next();)ct=Je.value,ct.fromSpot=Ea,ct.toSpot=Ka;he=0<=a.commentSpacing?he+(rt.height+a.commentSpacing):he+(a.commentSpacing-rt.height)}else{if(135<E&&!te||!x&&se)if(0<=a.commentMargin)for(Ae.h(a.bounds.x+he,a.bounds.y-a.commentMargin-rt.height),Je.move(Ae),Je=Je.Sd();Je.next();)ct=Je.value,ct.fromSpot=ha,ct.toSpot=za;else for(Ae.h(a.bounds.x+he,a.bounds.y+2*a.focus.y-a.commentMargin),Je.move(Ae),Je=Je.Sd();Je.next();)ct=Je.value,ct.fromSpot=za,ct.toSpot=ha;else if(0<=a.commentMargin)for(Ae.h(a.bounds.x+he,a.bounds.y+2*a.focus.y+a.commentMargin),Je.move(Ae),Je=Je.Sd();Je.next();)ct=Je.value,ct.fromSpot=za,ct.toSpot=ha;else for(Ae.h(a.bounds.x+he,a.bounds.y+a.commentMargin-rt.height),Je.move(Ae),Je=Je.Sd();Je.next();)ct=Je.value,ct.fromSpot=ha,ct.toSpot=za;he=0<=a.commentSpacing?he+(rt.width+a.commentSpacing):he+(a.commentSpacing-rt.width)}}if(jt.free(Ae),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)}},Ei.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),Ae=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var Ge=a.nodeSpacing,Je=this.computeNodeIndent(a),rt=a.rowSpacing,ct=0;(b||ge||a.hm||a.im&&a.maxGenerationCount===1)&&(ct=Math.max(0,a.rowIndent)),b=a.width;var Bt=a.height,Lt=0,$t=0,Ht=0,Kt=null,Yt=null,ln=0,er=0,ur=0,or=0,Hn=0,jn=0,Qr=0,Wr=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&&(Wr=Math.max(Wr,y?ne[Xi].Da.width:ne[Xi].Da.height));else se===1&&(Wr=y?ne[0].Da.width:ne[0].Da.height);if(Se){switch(he){case Ah:$t=135>E?hx(this,a,ne,Wr,Lt,$t):dx(this,a,ne,Wr,Lt,$t),Wr=$t.x,Lt=$t.width,$t=$t.height;break;case jh:for(Kt=0;Kt<se;Kt++)Yt=ne[Kt],Ae=Yt.Da,Ht=jn===0?0:rt,y?(Yt.S.h(te-Ae.width,or+Ht),Lt=Math.max(Lt,Ae.width),$t=Math.max($t,or+Ht+Ae.height),or+=Ht+Ae.height):(Yt.S.h(ur+Ht,te-Ae.height),Lt=Math.max(Lt,ur+Ht+Ae.width),$t=Math.max($t,Ae.height),ur+=Ht+Ae.width),jn++;break;case ih:for(Kt=0;Kt<se;Kt++)Yt=ne[Kt],te=Yt.Da,Ae=jn===0?0:rt,y?(Yt.S.h(Ge/2+a.focus.x,or+Ae),Lt=Math.max(Lt,te.width),$t=Math.max($t,or+Ae+te.height),or+=Ae+te.height):(Yt.S.h(ur+Ae,Ge/2+a.focus.y),Lt=Math.max(Lt,ur+Ae+te.width),$t=Math.max($t,te.height),ur+=Ae+te.width),jn++}Kt=yl(this,2),Yt=yl(this,2),y?(Kt[0].h(0,0),Kt[1].h(0,$t),Yt[0].h(Lt,0)):(Kt[0].h(0,0),Kt[1].h(Lt,0),Yt[0].h(0,$t)),Yt[1].h(Lt,$t)}else for(Xi=0;Xi<se;Xi++){var bo=ne[Xi],Ja=bo.Da;if(y){0<Ae&&0<jn&&ur+Ge+Ja.width>Ae&&(ur<te&&Jd(a,he,te-ur,0,Qr,Xi-1),Hn++,jn=0,Qr=Xi,Ht=$t,ur=0,or=135<E?-$t-rt:$t+rt),F0(this,bo,0,or);var rs=0;if(jn===0)Kt=bo.Yo,Yt=bo.kp,ln=Ja.width,er=Ja.height,(Kt===null||Yt===null||E!==Du(bo))&&(Kt=yl(this,2),Yt=yl(this,2),Kt[0].h(0,0),Kt[1].h(0,er),Yt[0].h(ln,0),Yt[1].h(ln,er));else{var Fs=pn();er=fx(this,a,bo,Kt,Yt,ln,er,Fs),rs=er.x,Kt=Fs[0],Yt=Fs[1],ln=er.width,er=er.height,Ln(Fs),ur<Ja.width&&0>rs&&(Nf(a,-rs,0,Qr,Xi-1),B0(Kt,-rs,0),B0(Yt,-rs,0),rs=0)}bo.S.h(rs,or),Lt=Math.max(Lt,ln),$t=Math.max($t,Ht+(Hn===0?0:rt)+Ja.height),ur=ln}else 0<Ae&&0<jn&&or+Ge+Ja.height>Ae&&(or<te&&Jd(a,he,0,te-or,Qr,Xi-1),Hn++,jn=0,Qr=Xi,Ht=Lt,or=0,ur=135<E?-Lt-rt:Lt+rt),F0(this,bo,ur,0),rs=0,jn===0?(Kt=bo.Yo,Yt=bo.kp,ln=Ja.width,er=Ja.height,(Kt===null||Yt===null||E!==Du(bo))&&(Kt=yl(this,2),Yt=yl(this,2),Kt[0].h(0,0),Kt[1].h(ln,0),Yt[0].h(0,er),Yt[1].h(ln,er))):(Fs=pn(),er=fx(this,a,bo,Kt,Yt,ln,er,Fs),rs=er.x,Kt=Fs[0],Yt=Fs[1],ln=er.width,er=er.height,Ln(Fs),or<Ja.height&&0>rs&&(Nf(a,0,-rs,Qr,Xi-1),B0(Kt,0,-rs),B0(Yt,0,-rs),rs=0)),bo.S.h(ur,rs),$t=Math.max($t,er),Lt=Math.max(Lt,Ht+(Hn===0?0:rt)+Ja.width),or=er;jn++}switch(0<Hn&&(y?($t+=Math.max(0,x),ur<Lt&&Jd(a,he,Lt-ur,0,Qr,se-1),0<ct&&(ge||Nf(a,ct,0,0,se-1),Lt+=ct)):(Lt+=Math.max(0,x),or<$t&&Jd(a,he,0,$t-or,Qr,se-1),0<ct&&(ge||Nf(a,0,ct,0,se-1),$t+=ct))),ct=ge=0,he){case jp:y?ge+=Lt/2-a.focus.x-Je/2:ct+=$t/2-a.focus.y-Je/2;break;case jf:0<Hn?y?ge+=Lt/2-a.focus.x-Je/2:ct+=$t/2-a.focus.y-Je/2:y?(Wr=ne[0].S.x+ne[0].la.x,ge+=Wr+(ne[se-1].S.x+ne[se-1].la.x+2*ne[se-1].focus.x-Wr)/2-a.focus.x-Je/2):(Wr=ne[0].S.y+ne[0].la.y,ct+=Wr+(ne[se-1].S.y+ne[se-1].la.y+2*ne[se-1].focus.y-Wr)/2-a.focus.y-Je/2);break;case Dc:y?(ge-=Je,Lt+=Je):(ct-=Je,$t+=Je);break;case Fc:y?(ge+=Lt-a.width+Je,Lt+=Je):(ct+=$t-a.height+Je,$t+=Je);break;case Ah:y?1<se?ge+=Wr+Ge/2-a.focus.x:ge+=ne[0].focus.x-a.focus.x+ne[0].la.x:1<se?ct+=Wr+Ge/2-a.focus.y:ct+=ne[0].focus.y-a.focus.y+ne[0].la.y;break;case jh:y?ge+=Lt+Ge/2-a.focus.x:ct+=$t+Ge/2-a.focus.y;break;case ih:break;default:$t=this.customAlignment(a,ge,ct,Lt,$t),ge=$t[0],ct=$t[1],Lt=$t[2],$t=$t[3]}for(Je=0;Je<se;Je++)Wr=ne[Je],y?Wr.S.h(Wr.S.x+Wr.la.x-ge,Wr.S.y+(135<E?(Se?-$t:-Wr.Da.height)+Wr.la.y-x:Bt+x+Wr.la.y)):Wr.S.h(Wr.S.x+(135<E?(Se?-Lt:-Wr.Da.width)+Wr.la.x-x:b+x+Wr.la.x),Wr.S.y+Wr.la.y-ct);if(se=ne=0,Se?y?(Lt=Oy(a,Lt,ge),0>ge&&(ge=0),135<E&&(ct+=$t+x),$t+=Bt+x,he===ih&&(ne+=Ge/2+a.focus.x),se+=Bt+x):(135<E&&(ge+=Lt+x),Lt+=b+x,$t=Ny(a,$t,ct),0>ct&&(ct=0),he===ih&&(se+=Ge/2+a.focus.y),ne+=b+x):y?(a.comments===null?b>Lt&&(Lt=Ay(he,b-Lt,0),ne=Lt.x,se=Lt.y,Lt=b,ge=0):Lt=Oy(a,Lt,ge),0>ge&&(ne-=ge,ge=0),135<E&&(ct+=$t+x),$t=Math.max(Math.max($t,Bt),$t+Bt+x),se+=Bt+x):(135<E&&(ge+=Lt+x),Lt=Math.max(Math.max(Lt,b),Lt+b+x),a.comments===null?Bt>$t&&($t=Ay(he,0,Bt-$t),ne=$t.x,se=$t.y,$t=Bt,ct=0):$t=Ny(a,$t,ct),0>ct&&(se-=ct,ct=0),ne+=b+x),0<Hn)E=yl(this,4),Hn=yl(this,4),y?(E[2].h(0,Bt+x),E[3].h(E[2].x,$t),Hn[2].h(Lt,E[2].y),Hn[3].h(Hn[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(Lt,E[2].y),Hn[2].h(E[2].x,$t),Hn[3].h(E[3].x,Hn[2].y));else{for(E=yl(this,Kt.length+2),Hn=yl(this,Yt.length+2),he=0;he<Kt.length;he++)Se=Kt[he],E[he+2].h(Se.x+ne,Se.y+se);for(he=0;he<Yt.length;he++)Se=Yt[he],Hn[he+2].h(Se.x+ne,Se.y+se)}y?(E[0].h(ge,0),E[1].h(E[0].x,Bt),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])),Hn[0].h(ge+b,0),Hn[1].h(Hn[0].x,Bt),Hn[2].y<Hn[1].y&&(Hn[2].x<Hn[0].x?Hn[2].assign(Hn[1]):Hn[1].assign(Hn[2])),Hn[3].y<Hn[2].y&&(Hn[3].x<Hn[0].x?Hn[3].assign(Hn[2]):Hn[2].assign(Hn[3])),E[2].y-=x/2,Hn[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])),Hn[0].h(0,ct+Bt),Hn[1].h(b,Hn[0].y),Hn[2].x<Hn[1].x&&(Hn[2].y<Hn[0].y?Hn[2].assign(Hn[1]):Hn[1].assign(Hn[2])),Hn[3].x<Hn[2].x&&(Hn[3].y<Hn[0].y?Hn[3].assign(Hn[2]):Hn[2].assign(Hn[3])),E[2].x-=x/2,Hn[2].x-=x/2),Qu(this,Kt),Qu(this,Yt),a.Yo=E,a.kp=Hn,a.la.h(ge,ct),a.Da.h(Lt,$t)}break;default:Wt("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,Ae=ge===Fc;se=dd(ge);var Ge=Math.max(0,y.breadthLimit);he=a.computeLayerSpacing(y);var Je=y.nodeSpacing,rt=a.computeNodeIndent(y),ct=Se||Ae?0:rt/2,Bt=y.rowSpacing,Lt=0;(Se||Ae||y.hm||y.im&&y.maxGenerationCount===1)&&(Lt=Math.max(0,y.rowIndent)),Se=y.width;var $t=y.height,Ht=0,Kt=0,Yt=0,ln=0,er=0,ur=0,or=0,Hn=0,jn=0,Qr=0;if(se&&!Kg(ge)&&135<b&&E.reverse(),Kg(ge))if(1<ne)for(var Wr=0;Wr<ne;Wr++){var Xi=E[Wr],bo=Xi.Da;Wr%2===0&&Wr!==ne-1?jn=Math.max(jn,(x?bo.width:bo.height)+a.computeBusNodeSpacing(Xi)-Je):Wr%2!==0&&(Qr=Math.max(Qr,(x?bo.width:bo.height)+a.computeBusNodeSpacing(Xi)-Je))}else ne===1&&(jn=x?E[0].Da.width:E[0].Da.height);if(se)switch(ge){case Ah:case Bc:Kt=135>b?hx(a,y,E,jn,Ht,Kt):dx(a,y,E,jn,Ht,Kt),jn=Kt.x,Ht=Kt.width,Kt=Kt.height;break;case jh:for(Ge=0;Ge<ne;Ge++)ct=E[Ge],Yt=ct.Da,Qr=or===0?0:Bt,x?(ct.S.h(te-Yt.width,er+Qr),Ht=Math.max(Ht,Yt.width),Kt=Math.max(Kt,er+Qr+Yt.height),er+=Qr+Yt.height):(ct.S.h(ln+Qr,te-Yt.height),Ht=Math.max(Ht,ln+Qr+Yt.width),Kt=Math.max(Kt,Yt.height),ln+=Qr+Yt.width),or++;break;case ih:for(te=0;te<ne;te++)Ge=E[te],ct=Ge.Da,Yt=or===0?0:Bt,x?(Ge.S.h(Je/2+y.focus.x,er+Yt),Ht=Math.max(Ht,ct.width),Kt=Math.max(Kt,er+Yt+ct.height),er+=Yt+ct.height):(Ge.S.h(ln+Yt,Je/2+y.focus.y),Ht=Math.max(Ht,ln+Yt+ct.width),Kt=Math.max(Kt,ct.height),ln+=Yt+ct.width),or++}else for(Qr=0;Qr<ne;Qr++)Wr=E[Qr],Xi=Wr.Da,x?(0<Ge&&0<or&&ln+Je+Xi.width>Ge&&(ln<te&&Jd(y,ge,te-ln,0,Hn,Qr-1),ur++,or=0,Hn=Qr,Yt=Kt,ln=0,er=135<b?-Kt-Bt:Kt+Bt),bo=or===0?ct:Je,F0(a,Wr,0,er),Wr.S.h(ln+bo,er),Ht=Math.max(Ht,ln+bo+Xi.width),Kt=Math.max(Kt,Yt+(ur===0?0:Bt)+Xi.height),ln+=bo+Xi.width):(0<Ge&&0<or&&er+Je+Xi.height>Ge&&(er<te&&Jd(y,ge,0,te-er,Hn,Qr-1),ur++,or=0,Hn=Qr,Yt=Ht,er=0,ln=135<b?-Ht-Bt:Ht+Bt),bo=or===0?ct:Je,F0(a,Wr,ln,0),Wr.S.h(ln,er+bo),Kt=Math.max(Kt,er+bo+Xi.height),Ht=Math.max(Ht,Yt+(ur===0?0:Bt)+Xi.width),er+=bo+Xi.height),or++;switch(0<ur&&(x?(Kt+=Math.max(0,he),ln<Ht&&Jd(y,ge,Ht-ln,0,Hn,ne-1),0<Lt&&(Ae||Nf(y,Lt,0,0,ne-1),Ht+=Lt)):(Ht+=Math.max(0,he),er<Kt&&Jd(y,ge,0,Kt-er,Hn,ne-1),0<Lt&&(Ae||Nf(y,0,Lt,0,ne-1),Kt+=Lt))),Lt=Ae=0,ge){case jp:x?Ae+=Ht/2-y.focus.x-rt/2:Lt+=Kt/2-y.focus.y-rt/2;break;case jf:0<ur?x?Ae+=Ht/2-y.focus.x-rt/2:Lt+=Kt/2-y.focus.y-rt/2:x?(a=E[0].S.x+E[0].la.x,Ae+=a+(E[ne-1].S.x+E[ne-1].la.x+2*E[ne-1].focus.x-a)/2-y.focus.x-rt/2):(a=E[0].S.y+E[0].la.y,Lt+=a+(E[ne-1].S.y+E[ne-1].la.y+2*E[ne-1].focus.y-a)/2-y.focus.y-rt/2);break;case Dc:x?(Ae-=rt,Ht+=rt):(Lt-=rt,Kt+=rt);break;case Fc:x?(Ae+=Ht-y.width+rt,Ht+=rt):(Lt+=Kt-y.height+rt,Kt+=rt);break;case Ah:case Bc:x?1<ne?Ae+=jn+Je/2-y.focus.x:Ae+=E[0].focus.x-y.focus.x+E[0].la.x:1<ne?Lt+=jn+Je/2-y.focus.y:Lt+=E[0].focus.y-y.focus.y+E[0].la.y;break;case jh:x?Ae+=Ht+Je/2-y.focus.x:Lt+=Kt+Je/2-y.focus.y;break;case ih:break;default:a=a.customAlignment(y,Ae,Lt,Ht,Kt),Ae=a[0],Lt=a[1],Ht=a[2],Kt=a[3]}for(a=0;a<ne;a++)rt=E[a],x?rt.S.h(rt.S.x+rt.la.x-Ae,rt.S.y+(135<b?(se?-Kt:-rt.Da.height)+rt.la.y-he:$t+he+rt.la.y)):rt.S.h(rt.S.x+(135<b?(se?-Ht:-rt.Da.width)+rt.la.x-he:Se+he+rt.la.x),rt.S.y+rt.la.y-Lt);x?(Ht=Oy(y,Ht,Ae),0>Ae&&(Ae=0),135<b&&(Lt+=Kt+he),Kt=Math.max(Math.max(Kt,$t),Kt+$t+he)):(135<b&&(Ae+=Ht+he),Ht=Math.max(Math.max(Ht,Se),Ht+Se+he),Kt=Ny(y,Kt,Lt),0>Lt&&(Lt=0)),y.la.h(Ae,Lt),y.Da.h(Ht,Kt)}}Ei.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 bn(b,0,E,te);if(ne===1)return y=x[0],E=y.Da.width,te=y.Da.height,new bn(b,0,E,te);for(var se=y.nodeSpacing,he=y.rowSpacing,ge=Du(y)===90,Se=0,Ae=0,Ge=0,Je=0;Je<ne;Je++)if(!(Je%2!==0||1<ne&&Je===ne-1)){var rt=x[Je],ct=rt.Da,Bt=Se===0?0:he;if(ge){var Lt=a.computeBusNodeSpacing(rt)-se;rt.S.h(b-(ct.width+Lt),Ge+Bt),E=Math.max(E,ct.width+Lt),te=Math.max(te,Ge+Bt+ct.height),Ge+=Bt+ct.height}else Lt=a.computeBusNodeSpacing(rt)-se,rt.S.h(Ae+Bt,b-(ct.height+Lt)),te=Math.max(te,ct.height+Lt),E=Math.max(E,Ae+Bt+ct.width),Ae+=Bt+ct.width;Se++}for(Se=0,rt=Ae,Je=Ge,ge?(Ae=b+se,Ge=0):(Ae=0,Ge=b+se),ct=0;ct<ne;ct++)if(ct%2!==0){Bt=x[ct],Lt=Bt.Da;var $t=Se===0?0:he;if(ge){var Ht=a.computeBusNodeSpacing(Bt)-se;Bt.S.h(Ae+Ht,Ge+$t),E=Math.max(E,Ae+Lt.width+Ht),te=Math.max(te,Ge+$t+Lt.height),Ge+=$t+Lt.height}else Ht=a.computeBusNodeSpacing(Bt)-se,Bt.S.h(Ae+$t,Ge+Ht),E=Math.max(E,Ae+$t+Lt.width),te=Math.max(te,Ge+Lt.height+Ht),Ae+=$t+Lt.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(rt),Math.abs(Ae))),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(rt,Ae)+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 bn(b,0,E,te)}function dx(a,y,x,b,E,te){var ne=x.length;if(ne===0)return new bn(b,0,E,te);if(ne===1)return x=x[0],E=x.Da.width,te=x.Da.height,new bn(b,0,E,te);for(var se=y.nodeSpacing,he=y.rowSpacing,ge=Du(y)===270,Se=0,Ae=0,Ge=0,Je=0;Je<ne;Je++)if(!(Je%2!==0||1<ne&&Je===ne-1)){var rt=x[Je],ct=rt.Da,Bt=Se===0?0:he;if(ge){var Lt=a.computeBusNodeSpacing(rt)-se;Ge-=Bt+ct.height,rt.S.h(b-(ct.width+Lt),Ge),E=Math.max(E,ct.width+Lt),te=Math.max(te,Math.abs(Ge))}else Lt=a.computeBusNodeSpacing(rt)-se,Ae-=Bt+ct.width,rt.S.h(Ae,b-(ct.height+Lt)),te=Math.max(te,ct.height+Lt),E=Math.max(E,Math.abs(Ae));Se++}for(Se=0,rt=Ae,Je=Ge,ge?(Ae=b+se,Ge=0):(Ae=0,Ge=b+se),ct=0;ct<ne;ct++)if(ct%2!==0){Bt=x[ct],Lt=Bt.Da;var $t=Se===0?0:he;if(ge){var Ht=a.computeBusNodeSpacing(Bt)-se;Ge-=$t+Lt.height,Bt.S.h(Ae+Ht,Ge),E=Math.max(E,Ae+Lt.width+Ht),te=Math.max(te,Math.abs(Ge))}else Ht=a.computeBusNodeSpacing(Bt)-se,Ae-=$t+Lt.width,Bt.S.h(Ae,Ge+Ht),te=Math.max(te,Ge+Lt.height+Ht),E=Math.max(E,Math.abs(Ae));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(rt),Math.abs(Ae))),ge?(he.S.h(b+se/2-he.focus.x-he.la.x,-te-Se.height-a),Ae=b+se/2-he.focus.x-he.la.x,E=Math.max(E,Ae+Se.width),0>Ae&&(E-=Ae),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(rt,Ae))+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 bn(b,0,E,te)}Ei.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},Ei.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:Wt("Unhandled alignment value "+a.toString())}return new jt(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:Wt("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 Ae=E;b=te;var Ge=ne,Je=x.Yo,rt=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),rt=yl(a,2),ge?(Je[0].h(0,0),Je[1].h(0,ne.height),rt[0].h(ne.width,0),rt[1].h(rt[0].x,Je[1].y)):(Je[0].h(0,0),Je[1].h(ne.width,0),rt[0].h(0,ne.height),rt[1].h(Je[1].x,rt[0].y))),ge){if(Ge=9999999,!(Ae===null||2>Ae.length||Je===null||2>Je.length))for(E=x=0;x<Ae.length&&E<Je.length;){te=Ae[x];var Bt=Je[E];he=Bt.x,ge=Bt.y,he+=b;var Lt=te;x+1<Ae.length&&(Lt=Ae[x+1]);var $t=Bt;Bt=$t.x,$t=$t.y,E+1<Je.length&&($t=Je[E+1],Bt=$t.x,$t=$t.y,Bt+=b);var Ht=Ge;te.y===ge?Ht=he-te.x:te.y>ge&&te.y<$t?Ht=he+(te.y-ge)/($t-ge)*(Bt-he)-te.x:ge>te.y&&ge<Lt.y&&(Ht=he-(te.x+(ge-te.y)/(Lt.y-te.y)*(Lt.x-te.x))),Ht<Ge&&(Ge=Ht),Lt.y<=te.y?x++:$t<=ge?E++:(Lt.y<=$t&&x++,$t<=Lt.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=rt,he=Ge,Ae===null||2>Ae.length||te===null||2>te.length)E=null;else{for(Se=yl(a,Ae.length+te.length),E=ge=x=0;x<Ae.length&&Ae[x].y<te[0].y;)Lt=Ae[x++],Se[E++].h(Lt.x,Lt.y);for(;ge<te.length;)Lt=te[ge++],Se[E++].h(Lt.x+he,Lt.y);for(te=te[te.length-1].y;x<Ae.length&&Ae[x].y<=te;)x++;for(;x<Ae.length&&Ae[x].y>te;)he=Ae[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,Ae),Qu(a,rt),se[0]=b,se[1]=E,new bn(Ge,0,te,ne)}if(b=9999999,!(Ae===null||2>Ae.length||Je===null||2>Je.length))for(E=x=0;x<Ae.length&&E<Je.length;)te=Ae[x],Bt=Je[E],he=Bt.x,ge=Bt.y,ge+=Ge,Lt=te,x+1<Ae.length&&(Lt=Ae[x+1]),$t=Bt,Bt=$t.x,$t=$t.y,E+1<Je.length&&($t=Je[E+1],Bt=$t.x,$t=$t.y,$t+=Ge),Ht=b,te.x===he?Ht=ge-te.y:te.x>he&&te.x<Bt?Ht=ge+(te.x-he)/(Bt-he)*($t-ge)-te.y:he>te.x&&he<Lt.x&&(Ht=ge-(te.y+(he-te.x)/(Lt.x-te.x)*(Lt.y-te.y))),Ht<b&&(b=Ht),Lt.x<=te.x?x++:Bt<=he?E++:(Lt.x<=Bt&&x++,Bt<=Lt.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=rt,he=Ge,Ae===null||2>Ae.length||te===null||2>te.length)E=null;else{for(Se=yl(a,Ae.length+te.length),E=ge=x=0;x<Ae.length&&Ae[x].x<te[0].x;)Lt=Ae[x++],Se[E++].h(Lt.x,Lt.y);for(;ge<te.length;)Lt=te[ge++],Se[E++].h(Lt.x,Lt.y+he);for(te=te[te.length-1].x;x<Ae.length&&Ae[x].x<=te;)x++;for(;x<Ae.length&&Ae[x].x>te;)he=Ae[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,Ae),Qu(a,rt),se[0]=b,se[1]=E,new bn(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 jt;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)}Ei.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:Wt("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:Wt("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)}}}Ei.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},Ei.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},Ei.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 jt(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),b=new jt(-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 bn(0,te,x,se))):this.angle===90?(E.push(new bn(0,te,x,se)),te+=se):this.angle===180?(te-=se,E.push(new bn(te,0,se,x))):(E.push(new bn(te,0,se,x)),te+=se)}this.commitLayers(E,b)}},Ei.prototype.commitLayers=function(){},Ei.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Ei.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])}}Ei.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=Ka;break;case 90:E=za;break;case 180:E=Ea;break;default:E=ha}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?Ea:ha;if(ne===1||y===ne-1&&ne%2===1)switch(b){case 0:he=Ea;break;case 90:he=ha;break;case 180:he=Ka;break;default:he=za}else y%2===0&&(he=b===90||b===270?Ka: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?Ka: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?Ea:ha,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=Ka;break;case 90:b.fromSpot=za;break;case 180:b.fromSpot=Ea;break;default:b.fromSpot=ha}else b.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.toSpot=Ea;break;case 90:b.toSpot=ha;break;case 180:b.toSpot=Ka;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=Ka;break;case 90:b.toSpot=za;break;case 180:b.toSpot=Ea;break;default:b.toSpot=ha}else b.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.fromSpot=Ea;break;case 90:b.fromSpot=ha;break;case 180:b.fromSpot=Ka;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}Ei.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},Ei.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)},Dt.Object.defineProperties(Ei.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()):Wt("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 yn(Ei,"PathDefault",-1),Ic=new yn(Ei,"PathDestination",0),Af=new yn(Ei,"PathSource",1),Ap=new yn(Ei,"SortingForwards",10),Vg=new yn(Ei,"SortingReverse",11),Zg=new yn(Ei,"SortingAscending",12),Xg=new yn(Ei,"SortingDescending",13),jp=new yn(Ei,"AlignmentCenterSubtrees",20),jf=new yn(Ei,"AlignmentCenterChildren",21),Dc=new yn(Ei,"AlignmentStart",22),Fc=new yn(Ei,"AlignmentEnd",23),Ah=new yn(Ei,"AlignmentBus",24),Bc=new yn(Ei,"AlignmentBusBranching",25),jh=new yn(Ei,"AlignmentTopLeftBus",26),ih=new yn(Ei,"AlignmentBottomRightBus",27),_0=new yn(Ei,"CompactionNone",30),Yg=new yn(Ei,"CompactionBlock",31),z0=new yn(Ei,"StyleLayered",40),Iy=new yn(Ei,"StyleLastParents",41),Dy=new yn(Ei,"StyleAlternating",42),Fy=new yn(Ei,"StyleRootOnly",43),$0=new yn(Ei,"ArrangementVertical",50),By=new yn(Ei,"ArrangementHorizontal",51),G0=new yn(Ei,"ArrangementFixedRoots",52),Ry=new yn(Ei,"LayerIndividual",60),_y=new yn(Ei,"LayerSiblings",61),H0=new yn(Ei,"LayerUniform",62);Ei.className="TreeLayout",Ei.PathDefault=R0,Ei.PathDestination=Ic,Ei.PathSource=Af,Ei.SortingForwards=Ap,Ei.SortingReverse=Vg,Ei.SortingAscending=Zg,Ei.SortingDescending=Xg,Ei.AlignmentCenterSubtrees=jp,Ei.AlignmentCenterChildren=jf,Ei.AlignmentStart=Dc,Ei.AlignmentEnd=Fc,Ei.AlignmentBus=Ah,Ei.AlignmentBusBranching=Bc,Ei.AlignmentTopLeftBus=jh,Ei.AlignmentBottomRightBus=ih,Ei.CompactionNone=_0,Ei.CompactionBlock=Yg,Ei.StyleLayered=z0,Ei.StyleLastParents=Iy,Ei.StyleAlternating=Dy,Ei.StyleRootOnly=Fy,Ei.ArrangementVertical=$0,Ei.ArrangementHorizontal=By,Ei.ArrangementFixedRoots=G0,Ei.LayerIndividual=Ry,Ei.LayerSiblings=_y,Ei.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 jt(0,0),this.Da=new Vn(0,0),this.la=new jt(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=oo,this.wr=!0,this.Dp=oo}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)},Dt.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 jt(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:Wt("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===Xl,ge=a.isOrthogonal,Se;if(a.uh(),ge||he){for(Se=2;4<a.pointsCount;)a.pv(2);var Ae=a.i(1),Ge=a.i(2)}else{for(Se=1;3<a.pointsCount;)a.pv(1);Ae=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&&Ae.y>Je.y+x.rowIndent&&(te=Math.min(te,Math.max(Ae.y,te-y.computeNodeIndent(x))))):x.alignment===Dc?(te=b.top+E.y,E.y===0&&Ae.y<Je.y-x.rowIndent&&(te=Math.max(te,Math.min(Ae.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,Ae.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,Ae.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&&Ae.x>Je.x+x.rowIndent&&(te=Math.min(te,Math.max(Ae.x,te-y.computeNodeIndent(x))))):x.alignment===Dc?(te=b.left+E.x,E.x===0&&Ae.x<Je.x-x.rowIndent&&(te=Math.max(te,Math.min(Ae.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,Ae.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,Ae.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&&Ae.y>Je.y+x.rowIndent&&(te=Math.min(te,Math.max(Ae.y,te-y.computeNodeIndent(x))))):x.alignment===Dc?(te=b.top+E.y,E.y===0&&Ae.y<Je.y-x.rowIndent&&(te=Math.max(te,Math.min(Ae.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,Ae.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,Ae.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&&Ae.x>Je.x+x.rowIndent&&(te=Math.min(te,Math.max(Ae.x,te-y.computeNodeIndent(x))))):x.alignment===Dc?(te=b.left+E.x,E.x===0&&Ae.x<Je.x-x.rowIndent&&(te=Math.max(te,Math.min(Ae.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,Ae.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,Ae.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))):Wt("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===Xl,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()))}}},Dt.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",Fo.prototype.initializeStandardTools=function(){this.gb("Action",new ui,this.mouseDownTools),this.gb("Relinking",new gr,this.mouseDownTools),this.gb("LinkReshaping",new br,this.mouseDownTools),this.gb("Rotating",new Li,this.mouseDownTools),this.gb("Resizing",new ti,this.mouseDownTools),this.gb("Linking",new rr,this.mouseMoveTools),this.gb("Dragging",new Vo,this.mouseMoveTools),this.gb("DragSelecting",new si,this.mouseMoveTools),this.gb("Panning",new zr,this.mouseMoveTools),this.gb("ContextMenu",new Yi,this.mouseUpTools),this.gb("TextEditing",new Gi,this.mouseUpTools),this.gb("ClickCreating",new Ci,this.mouseUpTools),this.gb("ClickSelecting",new ho,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=Ut.go,zy={get licenseKey(){return sn.licenseKey},set licenseKey(a){sn.licenseKey=a},get version(){return sn.version},Group:ei,EnumValue:yn,List:Tn,Set:Nn,Map:cr,Point:jt,Size:Vn,Rect:bn,Margin:Mr,Spot:Sr,Geometry:Zn,PathFigure:$a,PathSegment:Ui,InputEvent:ws,DiagramEvent:Kc,ChangedEvent:$o,Model:mr,GraphLinksModel:Ai,TreeModel:Xs,Binding:ba,Transaction:Va,UndoManager:Ko,CommandHandler:Ft,Tool:$i,DraggingTool:Vo,DraggingInfo:Qc,DraggingOptions:de,LinkingBaseTool:dn,LinkingTool:rr,RelinkingTool:gr,LinkReshapingTool:br,ResizingTool:ti,RotatingTool:Li,ClickSelectingTool:ho,ActionTool:ui,ClickCreatingTool:Ci,HTMLInfo:vi,ContextMenuTool:Yi,DragSelectingTool:si,PanningTool:zr,TextEditingTool:Gi,ToolManager:Fo,Animation:na,AnimationManager:qo,AnimationTrigger:Tl,Layer:Ho,Diagram:sn,Palette:Me,Overview:Be,Brush:so,GraphObject:Qt,Panel:$n,RowColumnDefinition:Da,Shape:di,TextBlock:Co,Picture:ul,Part:Lr,Adornment:Ki,Node:nr,Link:Un,Placeholder:Ws,Layout:_o,LayoutNetwork:Eo,LayoutVertex:Ua,LayoutEdge:kl,GridLayout:ds,PanelLayout:Ha,CircularLayout:Yo,CircularNetwork:kp,CircularVertex:zg,CircularEdge:C0,ForceDirectedLayout:Ss,ForceDirectedNetwork:Of,ForceDirectedVertex:$g,ForceDirectedEdge:Gg,LayeredDigraphLayout:co,LayeredDigraphNetwork:Np,LayeredDigraphVertex:du,LayeredDigraphEdge:Wg,TreeLayout:Ei,TreeNetwork:If,TreeVertex:wu,TreeEdge:Ip};typeof U0=="object"&&U0.version&&ar("WARNING: a `go` object on the root object is already defined. "+("Debug"in U0?"debug ":"")+"version: "+U0.version+", replaced with version: "+zy.version),sn.prototype.go=zy,Ut.go=zy,typeof Pn.exports=="object"&&(Pn.exports=typeof $e.g!="undefined"?$e.g.go:self.go)}();var it=typeof $e.g!="undefined"?$e.g.go:self.go;const xt=typeof $e.g!="undefined"?$e.g.go:self.go,ie=xt.Group,_e=xt.EnumValue,je=xt.List,ve=xt.Set,ce=xt.Map,be=xt.Point,Ce=xt.Size,ye=xt.Rect,we=xt.Margin,me=xt.Spot,xe=xt.Geometry,fe=xt.PathFigure,z=xt.PathSegment,ee=xt.InputEvent,ae=xt.DiagramEvent,re=xt.ChangedEvent,le=xt.Model,ue=xt.GraphLinksModel,pe=xt.TreeModel,Ee=xt.Binding,Pe=xt.Transaction,Ie=xt.UndoManager,ke=xt.CommandHandler,Ne=xt.Tool,Oe=xt.DraggingTool,Fe=xt.DraggingInfo,Re=xt.LinkingBaseTool,Ye=xt.LinkingTool,ze=xt.RelinkingTool,Ze=xt.LinkReshapingTool,at=xt.ResizingTool,ht=xt.RotatingTool,pt=xt.ClickSelectingTool,Mt=xt.ActionTool,et=xt.ClickCreatingTool,ot=xt.HTMLInfo,wt=xt.ContextMenuTool,Et=xt.DragSelectingTool,Tt=xt.PanningTool,vt=xt.TextEditingTool,gt=xt.ToolManager,yt=xt.Animation,It=xt.AnimationManager,Ot=xt.AnimationTrigger,Vt=xt.Layer,Ct=xt.Diagram,mt=xt.Palette,nt=xt.Overview,ft=xt.Brush,Xe=xt.GraphObject,ut=xt.Panel,bt=xt.RowColumnDefinition,St=xt.Shape,lt=xt.TextBlock,Qe=xt.TextBlockMetrics,Ue=xt.Picture,We=xt.Part,qe=xt.Adornment,He=xt.Node,De=xt.Link,Le=xt.Placeholder,Ke=xt.Layout,dt=xt.LayoutNetwork,Ve=xt.LayoutVertex,kt=xt.LayoutEdge,zt=xt.GridLayout,Xt=xt.PanelLayout,At=xt.CircularLayout,Nt=xt.CircularNetwork,qt=xt.CircularVertex,on=xt.CircularEdge,gn=xt.ForceDirectedLayout,kn=xt.ForceDirectedNetwork,Kn=xt.ForceDirectedVertex,Xn=xt.ForceDirectedEdge,hr=xt.LayeredDigraphLayout,dr=xt.LayeredDigraphNetwork,fr=xt.LayeredDigraphVertex,xr=xt.LayeredDigraphEdge,Hr=xt.TreeLayout,Yr=xt.TreeNetwork,Or=xt.TreeVertex,bi=xt.TreeEdge,Jr=xt.version},24334:function(Pn,an,$e){var it,xt;(function(ie,_e){Pn.exports=_e(ie)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof $e.g!="undefined"?$e.g:this,function(ie){"use strict";ie=ie||{};var _e=ie.Base64,je="2.6.4",ve="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ce=function(ze){for(var Ze={},at=0,ht=ze.length;at<ht;at++)Ze[ze.charAt(at)]=at;return Ze}(ve),be=String.fromCharCode,Ce=function(ze){if(ze.length<2){var Ze=ze.charCodeAt(0);return Ze<128?ze:Ze<2048?be(192|Ze>>>6)+be(128|Ze&63):be(224|Ze>>>12&15)+be(128|Ze>>>6&63)+be(128|Ze&63)}else{var Ze=65536+(ze.charCodeAt(0)-55296)*1024+(ze.charCodeAt(1)-56320);return be(240|Ze>>>18&7)+be(128|Ze>>>12&63)+be(128|Ze>>>6&63)+be(128|Ze&63)}},ye=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,we=function(ze){return ze.replace(ye,Ce)},me=function(ze){var Ze=[0,2,1][ze.length%3],at=ze.charCodeAt(0)<<16|(ze.length>1?ze.charCodeAt(1):0)<<8|(ze.length>2?ze.charCodeAt(2):0),ht=[ve.charAt(at>>>18),ve.charAt(at>>>12&63),Ze>=2?"=":ve.charAt(at>>>6&63),Ze>=1?"=":ve.charAt(at&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(Ze){return Ze=="+"?"-":"_"}).replace(/=/g,"")},ee=function(ze,Ze){return Ze?z(fe(ze)):fe(ze)},ae=function(ze){return ee(ze,!0)},re;ie.Uint8Array&&(re=function(ze,Ze){for(var at="",ht=0,pt=ze.length;ht<pt;ht+=3){var Mt=ze[ht],et=ze[ht+1],ot=ze[ht+2],wt=Mt<<16|et<<8|ot;at+=ve.charAt(wt>>>18)+ve.charAt(wt>>>12&63)+(typeof et!="undefined"?ve.charAt(wt>>>6&63):"=")+(typeof ot!="undefined"?ve.charAt(wt&63):"=")}return Ze?z(at):at});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 Ze=(7&ze.charCodeAt(0))<<18|(63&ze.charCodeAt(1))<<12|(63&ze.charCodeAt(2))<<6|63&ze.charCodeAt(3),at=Ze-65536;return be((at>>>10)+55296)+be((at&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 Ze=ze.length,at=Ze%4,ht=(Ze>0?ce[ze.charAt(0)]<<18:0)|(Ze>1?ce[ze.charAt(1)]<<12:0)|(Ze>2?ce[ze.charAt(2)]<<6:0)|(Ze>3?ce[ze.charAt(3)]:0),pt=[be(ht>>>16),be(ht>>>8&255),be(ht&255)];return pt.length-=[0,0,2,1][at],pt.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))},Ne=function(ze){return String(ze).replace(/[-_]/g,function(Ze){return Ze=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Oe=function(ze){return ke(Ne(ze))},Fe;ie.Uint8Array&&(Fe=function(ze){return Uint8Array.from(Ie(Ne(ze)),function(Ze){return Ze.charCodeAt(0)})});var Re=function(){var ze=ie.Base64;return ie.Base64=_e,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:Re,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),Pn.exports?Pn.exports.Base64=ie.Base64:(it=[],xt=function(){return ie.Base64}.apply(an,it),xt!==void 0&&(Pn.exports=xt)),{Base64:ie.Base64}})},17115:function(Pn,an,$e){"use strict";$e.d(an,{ZP:function(){return ce}});var it=$e(52487),xt=$e(59301),ie=$e(47273),_e=0,je=(0,ie.Z)();function ve(){var be;return je?(be=_e,_e+=1):be="TEST_OR_SSR",be}function ce(be){var Ce=xt.useState(),ye=(0,it.Z)(Ce,2),we=ye[0],me=ye[1];return xt.useEffect(function(){me("rc_select_".concat(ve()))},[]),be||we}},77861:function(Pn,an,$e){"use strict";$e.d(an,{Ac:function(){return Ke},Xo:function(){return Xn},Wx:function(){return dr},ZP:function(){return On},lk:function(){return pe}});var it=$e(72308),xt=$e(80702),ie=$e(49618),_e=$e(77321),je=$e(52487),ve=$e(74416),ce=$e(62853),be=$e(18929),Ce=$e(48736),ye=$e(59301),we=$e(92310),me=$e.n(we),xe=$e(34280),fe=$e(49658),z=$e(10228),ee=$e(8654),ae=function(Ut){var wn=Ut.className,_n=Ut.customizeIcon,Qn=Ut.customizeIconProps,Jn=Ut.onMouseDown,Wt=Ut.onClick,In=Ut.children,Wn;return typeof _n=="function"?Wn=_n(Qn):Wn=_n,ye.createElement("span",{className:wn,onMouseDown:function(mn){mn.preventDefault(),Jn&&Jn(mn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Wt,"aria-hidden":!0},Wn!==void 0?Wn:ye.createElement("span",{className:me()(wn.split(/\s+/).map(function(ar){return"".concat(ar,"-icon")}))},In))},re=ae;function le(Jt,Ut,wn,_n,Qn){var Jn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Wt=arguments.length>6?arguments[6]:void 0,In=arguments.length>7?arguments[7]:void 0,Wn=ye.useMemo(function(){if((0,ce.Z)(_n)==="object")return _n.clearIcon;if(Qn)return Qn},[_n,Qn]),ar=ye.useMemo(function(){return!!(!Jn&&_n&&(wn.length||Wt)&&!(In==="combobox"&&Wt===""))},[_n,Jn,wn.length,Wt,In]);return{allowClear:ar,clearIcon:ye.createElement(re,{className:"".concat(Jt,"-clear"),onMouseDown:Ut,customizeIcon:Wn},"\xD7")}}var ue=ye.createContext(null);function pe(){return ye.useContext(ue)}function Ee(){var Jt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Ut=ye.useState(!1),wn=(0,je.Z)(Ut,2),_n=wn[0],Qn=wn[1],Jn=ye.useRef(null),Wt=function(){window.clearTimeout(Jn.current)};ye.useEffect(function(){return Wt},[]);var In=function(ar,mn){Wt(),Jn.current=window.setTimeout(function(){Qn(ar),mn&&mn()},Jt)};return[_n,In,Wt]}function Pe(){var Jt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Ut=ye.useRef(null),wn=ye.useRef(null);ye.useEffect(function(){return function(){window.clearTimeout(wn.current)}},[]);function _n(Qn){(Qn||Ut.current===null)&&(Ut.current=Qn),window.clearTimeout(wn.current),wn.current=window.setTimeout(function(){Ut.current=null},Jt)}return[function(){return Ut.current},_n]}function Ie(Jt,Ut,wn,_n){var Qn=ye.useRef(null);Qn.current={open:Ut,triggerOpen:wn,customizedTrigger:_n},ye.useEffect(function(){function Jn(Wt){var In;if(!((In=Qn.current)!==null&&In!==void 0&&In.customizedTrigger)){var Wn=Wt.target;Wn.shadowRoot&&Wt.composed&&(Wn=Wt.composedPath()[0]||Wn),Qn.current.open&&Jt().filter(function(ar){return ar}).every(function(ar){return!ar.contains(Wn)&&ar!==Wn})&&Qn.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Jn),function(){return window.removeEventListener("mousedown",Jn)}},[])}var ke=$e(26112),Ne=$e(11780),Oe=function(Ut,wn){var _n,Qn,Jn=Ut.prefixCls,Wt=Ut.id,In=Ut.inputElement,Wn=Ut.disabled,ar=Ut.tabIndex,mn=Ut.autoFocus,Cn=Ut.autoComplete,tn=Ut.editable,fn=Ut.activeDescendantId,En=Ut.value,pn=Ut.maxLength,Ln=Ut.onKeyDown,Mn=Ut.onMouseDown,Gn=Ut.onChange,An=Ut.onPaste,sr=Ut.onCompositionStart,hn=Ut.onCompositionEnd,Nr=Ut.open,Zr=Ut.attrs,hi=In||ye.createElement("input",null),yn=hi,Yn=yn.ref,ir=yn.props,vr=ir.onKeyDown,yr=ir.onChange,Dr=ir.onMouseDown,ii=ir.onCompositionStart,Br=ir.onCompositionEnd,Cr=ir.style;return(0,Ce.Kp)(!("maxLength"in hi.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),hi=ye.cloneElement(hi,(0,_e.Z)((0,_e.Z)((0,_e.Z)({type:"search"},ir),{},{id:Wt,ref:(0,ee.sQ)(wn,Yn),disabled:Wn,tabIndex:ar,autoComplete:Cn||"off",autoFocus:mn,className:me()("".concat(Jn,"-selection-search-input"),(_n=hi)===null||_n===void 0||(Qn=_n.props)===null||Qn===void 0?void 0:Qn.className),role:"combobox","aria-label":"Search","aria-expanded":Nr||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Wt,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Wt,"_list"),"aria-activedescendant":Nr?fn:void 0},Zr),{},{value:tn?En:"",maxLength:pn,readOnly:!tn,unselectable:tn?null:"on",style:(0,_e.Z)((0,_e.Z)({},Cr),{},{opacity:tn?null:0}),onKeyDown:function(Tn){Ln(Tn),vr&&vr(Tn)},onMouseDown:function(Tn){Mn(Tn),Dr&&Dr(Tn)},onChange:function(Tn){Gn(Tn),yr&&yr(Tn)},onCompositionStart:function(Tn){sr(Tn),ii&&ii(Tn)},onCompositionEnd:function(Tn){hn(Tn),Br&&Br(Tn)},onPaste:An})),hi},Fe=ye.forwardRef(Oe);Fe.displayName="Input";var Re=Fe;function Ye(Jt){return Array.isArray(Jt)?Jt:Jt!==void 0?[Jt]:[]}var ze=typeof window!="undefined"&&window.document&&window.document.documentElement,Ze=ze;function at(Jt){return Jt!=null}function ht(Jt){return!Jt&&Jt!==0}function pt(Jt){return["string","number"].includes((0,ce.Z)(Jt))}function Mt(Jt){var Ut=void 0;return Jt&&(pt(Jt.title)?Ut=Jt.title.toString():pt(Jt.label)&&(Ut=Jt.label.toString())),Ut}function et(Jt,Ut){Ze?ye.useLayoutEffect(Jt,Ut):ye.useEffect(Jt,Ut)}function ot(Jt){var Ut;return(Ut=Jt.key)!==null&&Ut!==void 0?Ut:Jt.value}var wt=function(Ut){Ut.preventDefault(),Ut.stopPropagation()},Et=function(Ut){var wn=Ut.id,_n=Ut.prefixCls,Qn=Ut.values,Jn=Ut.open,Wt=Ut.searchValue,In=Ut.autoClearSearchValue,Wn=Ut.inputRef,ar=Ut.placeholder,mn=Ut.disabled,Cn=Ut.mode,tn=Ut.showSearch,fn=Ut.autoFocus,En=Ut.autoComplete,pn=Ut.activeDescendantId,Ln=Ut.tabIndex,Mn=Ut.removeIcon,Gn=Ut.maxTagCount,An=Ut.maxTagTextLength,sr=Ut.maxTagPlaceholder,hn=sr===void 0?function(ji){return"+ ".concat(ji.length," ...")}:sr,Nr=Ut.tagRender,Zr=Ut.onToggleOpen,hi=Ut.onRemove,yn=Ut.onInputChange,Yn=Ut.onInputPaste,ir=Ut.onInputKeyDown,vr=Ut.onInputMouseDown,yr=Ut.onInputCompositionStart,Dr=Ut.onInputCompositionEnd,ii=ye.useRef(null),Br=(0,ye.useState)(0),Cr=(0,je.Z)(Br,2),oi=Cr[0],Tn=Cr[1],Ri=(0,ye.useState)(!1),Nn=(0,je.Z)(Ri,2),fi=Nn[0],xo=Nn[1],zi="".concat(_n,"-selection"),Lo=Jn||Cn==="multiple"&&In===!1||Cn==="tags"?Wt:"",yo=Cn==="tags"||Cn==="multiple"&&In===!1||tn&&(Jn||fi);et(function(){Tn(ii.current.scrollWidth)},[Lo]);function Ur(ji,Rr,jr,_i,Ji){return ye.createElement("span",{className:me()("".concat(zi,"-item"),(0,ie.Z)({},"".concat(zi,"-item-disabled"),jr)),title:Mt(ji)},ye.createElement("span",{className:"".concat(zi,"-item-content")},Rr),_i&&ye.createElement(re,{className:"".concat(zi,"-item-remove"),onMouseDown:wt,onClick:Ji,customizeIcon:Mn},"\xD7"))}function $r(ji,Rr,jr,_i,Ji){var _r=function(Pi){wt(Pi),Zr(!Jn)};return ye.createElement("span",{onMouseDown:_r},Nr({label:Rr,value:ji,disabled:jr,closable:_i,onClose:Ji}))}function Ti(ji){var Rr=ji.disabled,jr=ji.label,_i=ji.value,Ji=!mn&&!Rr,_r=jr;if(typeof An=="number"&&(typeof jr=="string"||typeof jr=="number")){var Kr=String(_r);Kr.length>An&&(_r="".concat(Kr.slice(0,An),"..."))}var Pi=function(Vi){Vi&&Vi.stopPropagation(),hi(ji)};return typeof Nr=="function"?$r(_i,_r,Rr,Ji,Pi):Ur(ji,_r,Rr,Ji,Pi)}function Hi(ji){var Rr=typeof hn=="function"?hn(ji):hn;return Ur({title:Rr},Rr,!1)}var cr=ye.createElement("div",{className:"".concat(zi,"-search"),style:{width:oi},onFocus:function(){xo(!0)},onBlur:function(){xo(!1)}},ye.createElement(Re,{ref:Wn,open:Jn,prefixCls:_n,id:wn,inputElement:null,disabled:mn,autoFocus:fn,autoComplete:En,editable:yo,activeDescendantId:pn,value:Lo,onKeyDown:ir,onMouseDown:vr,onChange:yn,onPaste:Yn,onCompositionStart:yr,onCompositionEnd:Dr,tabIndex:Ln,attrs:(0,ke.Z)(Ut,!0)}),ye.createElement("span",{ref:ii,className:"".concat(zi,"-search-mirror"),"aria-hidden":!0},Lo,"\xA0")),jt=ye.createElement(Ne.Z,{prefixCls:"".concat(zi,"-overflow"),data:Qn,renderItem:Ti,renderRest:Hi,suffix:cr,itemKey:ot,maxCount:Gn});return ye.createElement(ye.Fragment,null,jt,!Qn.length&&!Lo&&ye.createElement("span",{className:"".concat(zi,"-placeholder")},ar))},Tt=Et,vt=function(Ut){var wn=Ut.inputElement,_n=Ut.prefixCls,Qn=Ut.id,Jn=Ut.inputRef,Wt=Ut.disabled,In=Ut.autoFocus,Wn=Ut.autoComplete,ar=Ut.activeDescendantId,mn=Ut.mode,Cn=Ut.open,tn=Ut.values,fn=Ut.placeholder,En=Ut.tabIndex,pn=Ut.showSearch,Ln=Ut.searchValue,Mn=Ut.activeValue,Gn=Ut.maxLength,An=Ut.onInputKeyDown,sr=Ut.onInputMouseDown,hn=Ut.onInputChange,Nr=Ut.onInputPaste,Zr=Ut.onInputCompositionStart,hi=Ut.onInputCompositionEnd,yn=Ut.title,Yn=ye.useState(!1),ir=(0,je.Z)(Yn,2),vr=ir[0],yr=ir[1],Dr=mn==="combobox",ii=Dr||pn,Br=tn[0],Cr=Ln||"";Dr&&Mn&&!vr&&(Cr=Mn),ye.useEffect(function(){Dr&&yr(!1)},[Dr,Mn]);var oi=mn!=="combobox"&&!Cn&&!pn?!1:!!Cr,Tn=yn===void 0?Mt(Br):yn,Ri=function(){if(Br)return null;var fi=oi?{visibility:"hidden"}:void 0;return ye.createElement("span",{className:"".concat(_n,"-selection-placeholder"),style:fi},fn)};return ye.createElement(ye.Fragment,null,ye.createElement("span",{className:"".concat(_n,"-selection-search")},ye.createElement(Re,{ref:Jn,prefixCls:_n,id:Qn,open:Cn,inputElement:wn,disabled:Wt,autoFocus:In,autoComplete:Wn,editable:ii,activeDescendantId:ar,value:Cr,onKeyDown:An,onMouseDown:sr,onChange:function(fi){yr(!0),hn(fi)},onPaste:Nr,onCompositionStart:Zr,onCompositionEnd:hi,tabIndex:En,attrs:(0,ke.Z)(Ut,!0),maxLength:Dr?Gn:void 0})),!Dr&&Br?ye.createElement("span",{className:"".concat(_n,"-selection-item"),title:Tn,style:oi?{visibility:"hidden"}:void 0},Br.label):null,Ri())},gt=vt;function yt(Jt){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(Jt)}var It=function(Ut,wn){var _n=(0,ye.useRef)(null),Qn=(0,ye.useRef)(!1),Jn=Ut.prefixCls,Wt=Ut.open,In=Ut.mode,Wn=Ut.showSearch,ar=Ut.tokenWithEnter,mn=Ut.autoClearSearchValue,Cn=Ut.onSearch,tn=Ut.onSearchSubmit,fn=Ut.onToggleOpen,En=Ut.onInputKeyDown,pn=Ut.domRef;ye.useImperativeHandle(wn,function(){return{focus:function(){_n.current.focus()},blur:function(){_n.current.blur()}}});var Ln=Pe(0),Mn=(0,je.Z)(Ln,2),Gn=Mn[0],An=Mn[1],sr=function(Cr){var oi=Cr.which;(oi===z.Z.UP||oi===z.Z.DOWN)&&Cr.preventDefault(),En&&En(Cr),oi===z.Z.ENTER&&In==="tags"&&!Qn.current&&!Wt&&(tn==null||tn(Cr.target.value)),yt(oi)&&fn(!0)},hn=function(){An(!0)},Nr=(0,ye.useRef)(null),Zr=function(Cr){Cn(Cr,!0,Qn.current)!==!1&&fn(!0)},hi=function(){Qn.current=!0},yn=function(Cr){Qn.current=!1,In!=="combobox"&&Zr(Cr.target.value)},Yn=function(Cr){var oi=Cr.target.value;if(ar&&Nr.current&&/[\r\n]/.test(Nr.current)){var Tn=Nr.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");oi=oi.replace(Tn,Nr.current)}Nr.current=null,Zr(oi)},ir=function(Cr){var oi=Cr.clipboardData,Tn=oi.getData("text");Nr.current=Tn},vr=function(Cr){var oi=Cr.target;if(oi!==_n.current){var Tn=document.body.style.msTouchAction!==void 0;Tn?setTimeout(function(){_n.current.focus()}):_n.current.focus()}},yr=function(Cr){var oi=Gn();Cr.target!==_n.current&&!oi&&In!=="combobox"&&Cr.preventDefault(),(In!=="combobox"&&(!Wn||!oi)||!Wt)&&(Wt&&mn!==!1&&Cn("",!0,!1),fn())},Dr={inputRef:_n,onInputKeyDown:sr,onInputMouseDown:hn,onInputChange:Yn,onInputPaste:ir,onInputCompositionStart:hi,onInputCompositionEnd:yn},ii=In==="multiple"||In==="tags"?ye.createElement(Tt,(0,it.Z)({},Ut,Dr)):ye.createElement(gt,(0,it.Z)({},Ut,Dr));return ye.createElement("div",{ref:pn,className:"".concat(Jn,"-selector"),onClick:vr,onMouseDown:yr},ii)},Ot=ye.forwardRef(It);Ot.displayName="Selector";var Vt=Ot,Ct=$e(35593),mt=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],nt=function(Ut){var wn=Ut===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:wn,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:wn,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:wn,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:wn,adjustY:1},htmlRegion:"scroll"}}},ft=function(Ut,wn){var _n=Ut.prefixCls,Qn=Ut.disabled,Jn=Ut.visible,Wt=Ut.children,In=Ut.popupElement,Wn=Ut.animation,ar=Ut.transitionName,mn=Ut.dropdownStyle,Cn=Ut.dropdownClassName,tn=Ut.direction,fn=tn===void 0?"ltr":tn,En=Ut.placement,pn=Ut.builtinPlacements,Ln=Ut.dropdownMatchSelectWidth,Mn=Ut.dropdownRender,Gn=Ut.dropdownAlign,An=Ut.getPopupContainer,sr=Ut.empty,hn=Ut.getTriggerDOMNode,Nr=Ut.onPopupVisibleChange,Zr=Ut.onPopupMouseEnter,hi=(0,ve.Z)(Ut,mt),yn="".concat(_n,"-dropdown"),Yn=In;Mn&&(Yn=Mn(In));var ir=ye.useMemo(function(){return pn||nt(Ln)},[pn,Ln]),vr=Wn?"".concat(yn,"-").concat(Wn):ar,yr=typeof Ln=="number",Dr=ye.useMemo(function(){return yr?null:Ln===!1?"minWidth":"width"},[Ln,yr]),ii=mn;yr&&(ii=(0,_e.Z)((0,_e.Z)({},ii),{},{width:Ln}));var Br=ye.useRef(null);return ye.useImperativeHandle(wn,function(){return{getPopupElement:function(){return Br.current}}}),ye.createElement(Ct.Z,(0,it.Z)({},hi,{showAction:Nr?["click"]:[],hideAction:Nr?["click"]:[],popupPlacement:En||(fn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:ir,prefixCls:yn,popupTransitionName:vr,popup:ye.createElement("div",{ref:Br,onMouseEnter:Zr},Yn),stretch:Dr,popupAlign:Gn,popupVisible:Jn,getPopupContainer:An,popupClassName:me()(Cn,(0,ie.Z)({},"".concat(yn,"-empty"),sr)),popupStyle:ii,getTriggerDOMNode:hn,onPopupVisibleChange:Nr}),Wt)},Xe=ye.forwardRef(ft);Xe.displayName="SelectTrigger";var ut=Xe,bt=$e(68413);function St(Jt,Ut){var wn=Jt.key,_n;return"value"in Jt&&(_n=Jt.value),wn!=null?wn:_n!==void 0?_n:"rc-index-key-".concat(Ut)}function lt(Jt,Ut){var wn=Jt||{},_n=wn.label,Qn=wn.value,Jn=wn.options,Wt=wn.groupLabel,In=_n||(Ut?"children":"label");return{label:In,value:Qn||"value",options:Jn||"options",groupLabel:Wt||In}}function Qe(Jt){var Ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},wn=Ut.fieldNames,_n=Ut.childrenAsData,Qn=[],Jn=lt(wn,!1),Wt=Jn.label,In=Jn.value,Wn=Jn.options,ar=Jn.groupLabel;function mn(Cn,tn){Cn.forEach(function(fn){if(tn||!(Wn in fn)){var En=fn[In];Qn.push({key:St(fn,Qn.length),groupOption:tn,data:fn,label:fn[Wt],value:En})}else{var pn=fn[ar];pn===void 0&&_n&&(pn=fn.label),Qn.push({key:St(fn,Qn.length),group:!0,data:fn,label:pn}),mn(fn[Wn],!0)}})}return mn(Jt,!1),Qn}function Ue(Jt){var Ut=(0,_e.Z)({},Jt);return"props"in Ut||Object.defineProperty(Ut,"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`."),Ut}}),Ut}function We(Jt,Ut){if(!Ut||!Ut.length)return null;var wn=!1;function _n(Jn,Wt){var In=(0,bt.Z)(Wt),Wn=In[0],ar=In.slice(1);if(!Wn)return[Jn];var mn=Jn.split(Wn);return wn=wn||mn.length>1,mn.reduce(function(Cn,tn){return[].concat((0,xt.Z)(Cn),(0,xt.Z)(_n(tn,ar)))},[]).filter(function(Cn){return Cn})}var Qn=_n(Jt,Ut);return wn?Qn: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(Jt){return Jt==="tags"||Jt==="multiple"}var Le=ye.forwardRef(function(Jt,Ut){var wn,_n,Qn=Jt.id,Jn=Jt.prefixCls,Wt=Jt.className,In=Jt.showSearch,Wn=Jt.tagRender,ar=Jt.direction,mn=Jt.omitDomProps,Cn=Jt.displayValues,tn=Jt.onDisplayValuesChange,fn=Jt.emptyOptions,En=Jt.notFoundContent,pn=En===void 0?"Not Found":En,Ln=Jt.onClear,Mn=Jt.mode,Gn=Jt.disabled,An=Jt.loading,sr=Jt.getInputElement,hn=Jt.getRawInputElement,Nr=Jt.open,Zr=Jt.defaultOpen,hi=Jt.onDropdownVisibleChange,yn=Jt.activeValue,Yn=Jt.onActiveValueChange,ir=Jt.activeDescendantId,vr=Jt.searchValue,yr=Jt.autoClearSearchValue,Dr=Jt.onSearch,ii=Jt.onSearchSplit,Br=Jt.tokenSeparators,Cr=Jt.allowClear,oi=Jt.suffixIcon,Tn=Jt.clearIcon,Ri=Jt.OptionList,Nn=Jt.animation,fi=Jt.transitionName,xo=Jt.dropdownStyle,zi=Jt.dropdownClassName,Lo=Jt.dropdownMatchSelectWidth,yo=Jt.dropdownRender,Ur=Jt.dropdownAlign,$r=Jt.placement,Ti=Jt.builtinPlacements,Hi=Jt.getPopupContainer,cr=Jt.showAction,jt=cr===void 0?[]:cr,ji=Jt.onFocus,Rr=Jt.onBlur,jr=Jt.onKeyUp,_i=Jt.onKeyDown,Ji=Jt.onMouseDown,_r=(0,ve.Z)(Jt,qe),Kr=De(Mn),Pi=(In!==void 0?In:Kr)||Mn==="combobox",gi=(0,_e.Z)({},_r);He.forEach(function(oo){delete gi[oo]}),mn==null||mn.forEach(function(oo){delete gi[oo]});var Vi=ye.useState(!1),io=(0,je.Z)(Vi,2),Gr=io[0],Tr=io[1];ye.useEffect(function(){Tr((0,fe.Z)())},[]);var Vn=ye.useRef(null),ai=ye.useRef(null),Qi=ye.useRef(null),zo=ye.useRef(null),Mo=ye.useRef(null),Uo=Ee(),ca=(0,je.Z)(Uo,3),Jo=ca[0],qa=ca[1],La=ca[2];ye.useImperativeHandle(Ut,function(){var oo,Do;return{focus:(oo=zo.current)===null||oo===void 0?void 0:oo.focus,blur:(Do=zo.current)===null||Do===void 0?void 0:Do.blur,scrollTo:function(Xa){var _a;return(_a=Mo.current)===null||_a===void 0?void 0:_a.scrollTo(Xa)}}});var es=ye.useMemo(function(){var oo;if(Mn!=="combobox")return vr;var Do=(oo=Cn[0])===null||oo===void 0?void 0:oo.value;return typeof Do=="string"||typeof Do=="number"?String(Do):""},[vr,Mn,Cn]),bn=Mn==="combobox"&&typeof sr=="function"&&sr()||null,ma=typeof hn=="function"&&hn(),Ql=(0,ee.x1)(ai,ma==null||(wn=ma.props)===null||wn===void 0?void 0:wn.ref),el=ye.useState(!1),So=(0,je.Z)(el,2),ro=So[0],va=So[1];(0,xe.Z)(function(){va(!0)},[]);var Io=(0,be.Z)(!1,{defaultValue:Zr,value:Nr}),qi=(0,je.Z)(Io,2),No=qi[0],xs=qi[1],wi=ro?No:!1,lo=!pn&&fn;(Gn||lo&&wi&&Mn==="combobox")&&(wi=!1);var ao=lo?!1:wi,Mr=ye.useCallback(function(oo){var Do=oo!==void 0?oo:!wi;Gn||(xs(Do),wi!==Do&&(hi==null||hi(Do)))},[Gn,wi,xs,hi]),Ba=ye.useMemo(function(){return(Br||[]).some(function(oo){return[`
|
|
|
`,`\r
|
|
|
`].includes(oo)})},[Br]),Ra=function(Do,Es,Xa){var _a=!0,ha=Do;Yn==null||Yn(null);var Ea=Xa?null:We(Do,Br);return Mn!=="combobox"&&Ea&&(ha="",ii==null||ii(Ea),Mr(!1),_a=!1),Dr&&es!==ha&&Dr(ha,{source:Es?"typing":"effect"}),_a},Cs=function(Do){!Do||!Do.trim()||Dr(Do,{source:"submit"})};ye.useEffect(function(){!wi&&!Kr&&Mn!=="combobox"&&Ra("",!1,!1)},[wi]),ye.useEffect(function(){No&&Gn&&xs(!1),Gn&&qa(!1)},[Gn]);var Il=Pe(),ql=(0,je.Z)(Il,2),Sr=ql[0],aa=ql[1],Wa=function(Do){var Es=Sr(),Xa=Do.which;if(Xa===z.Z.ENTER&&(Mn!=="combobox"&&Do.preventDefault(),wi||Mr(!0)),aa(!!es),Xa===z.Z.BACKSPACE&&!Es&&Kr&&!es&&Cn.length){for(var _a=(0,xt.Z)(Cn),ha=null,Ea=_a.length-1;Ea>=0;Ea-=1){var Ka=_a[Ea];if(!Ka.disabled){_a.splice(Ea,1),ha=Ka;break}}ha&&tn(_a,{type:"remove",values:[ha]})}for(var za=arguments.length,zu=new Array(za>1?za-1:0),Rl=1;Rl<za;Rl++)zu[Rl-1]=arguments[Rl];if(wi&&Mo.current){var ka;(ka=Mo.current).onKeyDown.apply(ka,[Do].concat(zu))}_i==null||_i.apply(void 0,[Do].concat(zu))},Pl=function(Do){for(var Es=arguments.length,Xa=new Array(Es>1?Es-1:0),_a=1;_a<Es;_a++)Xa[_a-1]=arguments[_a];if(wi&&Mo.current){var ha;(ha=Mo.current).onKeyUp.apply(ha,[Do].concat(Xa))}jr==null||jr.apply(void 0,[Do].concat(Xa))},Dl=function(Do){var Es=Cn.filter(function(Xa){return Xa!==Do});tn(Es,{type:"remove",values:[Do]})},Fl=ye.useRef(!1),Di=function(){qa(!0),Gn||(ji&&!Fl.current&&ji.apply(void 0,arguments),jt.includes("focus")&&Mr(!0)),Fl.current=!0},mc=function(){qa(!1,function(){Fl.current=!1,Mr(!1)}),!Gn&&(es&&(Mn==="tags"?Dr(es,{source:"submit"}):Mn==="multiple"&&Dr("",{source:"blur"})),Rr&&Rr.apply(void 0,arguments))},tl=[];ye.useEffect(function(){return function(){tl.forEach(function(oo){return clearTimeout(oo)}),tl.splice(0,tl.length)}},[]);var nl=function(Do){var Es,Xa=Do.target,_a=(Es=Qi.current)===null||Es===void 0?void 0:Es.getPopupElement();if(_a&&_a.contains(Xa)){var ha=setTimeout(function(){var zu=tl.indexOf(ha);if(zu!==-1&&tl.splice(zu,1),La(),!Gr&&!_a.contains(document.activeElement)){var Rl;(Rl=zo.current)===null||Rl===void 0||Rl.focus()}});tl.push(ha)}for(var Ea=arguments.length,Ka=new Array(Ea>1?Ea-1:0),za=1;za<Ea;za++)Ka[za-1]=arguments[za];Ji==null||Ji.apply(void 0,[Do].concat(Ka))},As=ye.useState({}),Eu=(0,je.Z)(As,2),Ru=Eu[1];function _s(){Ru({})}var dl;ma&&(dl=function(Do){Mr(Do)}),Ie(function(){var oo;return[Vn.current,(oo=Qi.current)===null||oo===void 0?void 0:oo.getPopupElement()]},ao,Mr,!!ma);var $c=ye.useMemo(function(){return(0,_e.Z)((0,_e.Z)({},Jt),{},{notFoundContent:pn,open:wi,triggerOpen:ao,id:Qn,showSearch:Pi,multiple:Kr,toggleOpen:Mr})},[Jt,pn,ao,wi,Qn,Pi,Kr,Mr]),hh=!!oi||An,Gc;hh&&(Gc=ye.createElement(re,{className:me()("".concat(Jn,"-arrow"),(0,ie.Z)({},"".concat(Jn,"-arrow-loading"),An)),customizeIcon:oi,customizeIconProps:{loading:An,searchValue:es,open:wi,focused:Jo,showSearch:Pi}}));var Hh=function(){var Do;Ln==null||Ln(),(Do=zo.current)===null||Do===void 0||Do.focus(),tn([],{type:"clear",values:Cn}),Ra("",!1,!1)},Hc=le(Jn,Hh,Cn,Cr,Tn,Gn,es,Mn),vc=Hc.allowClear,_u=Hc.clearIcon,Bl=ye.createElement(Ri,{ref:Mo}),dh=me()(Jn,Wt,(_n={},(0,ie.Z)(_n,"".concat(Jn,"-focused"),Jo),(0,ie.Z)(_n,"".concat(Jn,"-multiple"),Kr),(0,ie.Z)(_n,"".concat(Jn,"-single"),!Kr),(0,ie.Z)(_n,"".concat(Jn,"-allow-clear"),Cr),(0,ie.Z)(_n,"".concat(Jn,"-show-arrow"),hh),(0,ie.Z)(_n,"".concat(Jn,"-disabled"),Gn),(0,ie.Z)(_n,"".concat(Jn,"-loading"),An),(0,ie.Z)(_n,"".concat(Jn,"-open"),wi),(0,ie.Z)(_n,"".concat(Jn,"-customize-input"),bn),(0,ie.Z)(_n,"".concat(Jn,"-show-search"),Pi),_n)),Uc=ye.createElement(ut,{ref:Qi,disabled:Gn,prefixCls:Jn,visible:ao,popupElement:Bl,animation:Nn,transitionName:fi,dropdownStyle:xo,dropdownClassName:zi,direction:ar,dropdownMatchSelectWidth:Lo,dropdownRender:yo,dropdownAlign:Ur,placement:$r,builtinPlacements:Ti,getPopupContainer:Hi,empty:fn,getTriggerDOMNode:function(){return ai.current},onPopupVisibleChange:dl,onPopupMouseEnter:_s},ma?ye.cloneElement(ma,{ref:Ql}):ye.createElement(Vt,(0,it.Z)({},Jt,{domRef:ai,prefixCls:Jn,inputElement:bn,ref:zo,id:Qn,showSearch:Pi,autoClearSearchValue:yr,mode:Mn,activeDescendantId:ir,tagRender:Wn,values:Cn,open:wi,onToggleOpen:Mr,activeValue:yn,searchValue:es,onSearch:Ra,onSearchSubmit:Cs,onRemove:Dl,tokenWithEnter:Ba}))),yc;return ma?yc=Uc:yc=ye.createElement("div",(0,it.Z)({className:dh},gi,{ref:Vn,onMouseDown:nl,onKeyDown:Wa,onKeyUp:Pl,onFocus:Di,onBlur:mc}),Jo&&!wi&&ye.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(Cn.map(function(oo){var Do=oo.label,Es=oo.value;return["number","string"].includes((0,ce.Z)(Do))?Do:Es}).join(", "))),Uc,Gc,vc&&_u),ye.createElement(ue.Provider,{value:$c},yc)}),Ke=Le,dt=function(Jt,Ut){var wn=ye.useRef({values:new Map,options:new Map}),_n=ye.useMemo(function(){var Jn=wn.current,Wt=Jn.values,In=Jn.options,Wn=Jt.map(function(Cn){if(Cn.label===void 0){var tn;return(0,_e.Z)((0,_e.Z)({},Cn),{},{label:(tn=Wt.get(Cn.value))===null||tn===void 0?void 0:tn.label})}return Cn}),ar=new Map,mn=new Map;return Wn.forEach(function(Cn){ar.set(Cn.value,Cn),mn.set(Cn.value,Ut.get(Cn.value)||In.get(Cn.value))}),wn.current.values=ar,wn.current.options=mn,Wn},[Jt,Ut]),Qn=ye.useCallback(function(Jn){return Ut.get(Jn)||wn.current.options.get(Jn)},[Ut]);return[_n,Qn]};function Ve(Jt,Ut){return Ye(Jt).join("").toUpperCase().includes(Ut)}var kt=function(Jt,Ut,wn,_n,Qn){return ye.useMemo(function(){if(!wn||_n===!1)return Jt;var Jn=Ut.options,Wt=Ut.label,In=Ut.value,Wn=[],ar=typeof _n=="function",mn=wn.toUpperCase(),Cn=ar?_n:function(fn,En){return Qn?Ve(En[Qn],mn):En[Jn]?Ve(En[Wt!=="children"?Wt:"label"],mn):Ve(En[In],mn)},tn=ar?function(fn){return Ue(fn)}:function(fn){return fn};return Jt.forEach(function(fn){if(fn[Jn]){var En=Cn(wn,tn(fn));if(En)Wn.push(fn);else{var pn=fn[Jn].filter(function(Ln){return Cn(wn,tn(Ln))});pn.length&&Wn.push((0,_e.Z)((0,_e.Z)({},fn),{},(0,ie.Z)({},Jn,pn)))}return}Cn(wn,tn(fn))&&Wn.push(fn)}),Wn},[Jt,_n,Qn,wn,Ut])},zt=$e(17115),Xt=$e(11592),At=["children","value"],Nt=["children"];function qt(Jt){var Ut=Jt,wn=Ut.key,_n=Ut.props,Qn=_n.children,Jn=_n.value,Wt=(0,ve.Z)(_n,At);return(0,_e.Z)({key:wn,value:Jn!==void 0?Jn:wn,children:Qn},Wt)}function on(Jt){var Ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Xt.Z)(Jt).map(function(wn,_n){if(!ye.isValidElement(wn)||!wn.type)return null;var Qn=wn,Jn=Qn.type.isSelectOptGroup,Wt=Qn.key,In=Qn.props,Wn=In.children,ar=(0,ve.Z)(In,Nt);return Ut||!Jn?qt(wn):(0,_e.Z)((0,_e.Z)({key:"__RC_SELECT_GRP__".concat(Wt===null?_n:Wt,"__"),label:Wt},ar),{},{options:on(Wn)})}).filter(function(wn){return wn})}function gn(Jt,Ut,wn,_n,Qn){return ye.useMemo(function(){var Jn=Jt,Wt=!Jt;Wt&&(Jn=on(Ut));var In=new Map,Wn=new Map,ar=function(tn,fn,En){En&&typeof En=="string"&&tn.set(fn[En],fn)};function mn(Cn){for(var tn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,fn=0;fn<Cn.length;fn+=1){var En=Cn[fn];!En[wn.options]||tn?(In.set(En[wn.value],En),ar(Wn,En,wn.label),ar(Wn,En,_n),ar(Wn,En,Qn)):mn(En[wn.options],!0)}}return mn(Jn),{options:Jn,valueOptions:In,labelOptions:Wn}},[Jt,Ut,wn,_n,Qn])}function kn(Jt){var Ut=ye.useRef();Ut.current=Jt;var wn=ye.useCallback(function(){return Ut.current.apply(Ut,arguments)},[]);return wn}var Kn=function(){return null};Kn.isSelectOptGroup=!0;var Xn=Kn,hr=function(){return null};hr.isSelectOption=!0;var dr=hr,fr=$e(80547),xr=$e(2738),Hr=$e(45680),Yr=ye.createContext(null),Or=Yr;function bi(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Jr=["disabled","title","children","style","className"];function tt(Jt){return typeof Jt=="string"||typeof Jt=="number"}var li=function(Ut,wn){var _n=pe(),Qn=_n.prefixCls,Jn=_n.id,Wt=_n.open,In=_n.multiple,Wn=_n.mode,ar=_n.searchValue,mn=_n.toggleOpen,Cn=_n.notFoundContent,tn=_n.onPopupScroll,fn=ye.useContext(Or),En=fn.flattenOptions,pn=fn.onActiveValue,Ln=fn.defaultActiveFirstOption,Mn=fn.onSelect,Gn=fn.menuItemSelectedIcon,An=fn.rawValues,sr=fn.fieldNames,hn=fn.virtual,Nr=fn.direction,Zr=fn.listHeight,hi=fn.listItemHeight,yn="".concat(Qn,"-item"),Yn=(0,fr.Z)(function(){return En},[Wt,En],function(Ur,$r){return $r[0]&&Ur[1]!==$r[1]}),ir=ye.useRef(null),vr=function($r){$r.preventDefault()},yr=function($r){ir.current&&ir.current.scrollTo(typeof $r=="number"?{index:$r}:$r)},Dr=function($r){for(var Ti=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Hi=Yn.length,cr=0;cr<Hi;cr+=1){var jt=($r+cr*Ti+Hi)%Hi,ji=Yn[jt],Rr=ji.group,jr=ji.data;if(!Rr&&!jr.disabled)return jt}return-1},ii=ye.useState(function(){return Dr(0)}),Br=(0,je.Z)(ii,2),Cr=Br[0],oi=Br[1],Tn=function($r){var Ti=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;oi($r);var Hi={source:Ti?"keyboard":"mouse"},cr=Yn[$r];if(!cr){pn(null,-1,Hi);return}pn(cr.value,$r,Hi)};(0,ye.useEffect)(function(){Tn(Ln!==!1?Dr(0):-1)},[Yn.length,ar]);var Ri=ye.useCallback(function(Ur){return An.has(Ur)&&Wn!=="combobox"},[Wn,(0,xt.Z)(An).toString(),An.size]);(0,ye.useEffect)(function(){var Ur=setTimeout(function(){if(!In&&Wt&&An.size===1){var Ti=Array.from(An)[0],Hi=Yn.findIndex(function(cr){var jt=cr.data;return jt.value===Ti});Hi!==-1&&(Tn(Hi),yr(Hi))}});if(Wt){var $r;($r=ir.current)===null||$r===void 0||$r.scrollTo(void 0)}return function(){return clearTimeout(Ur)}},[Wt,ar,En.length]);var Nn=function($r){$r!==void 0&&Mn($r,{selected:!An.has($r)}),In||mn(!1)};if(ye.useImperativeHandle(wn,function(){return{onKeyDown:function($r){var Ti=$r.which,Hi=$r.ctrlKey;switch(Ti){case z.Z.N:case z.Z.P:case z.Z.UP:case z.Z.DOWN:{var cr=0;if(Ti===z.Z.UP?cr=-1:Ti===z.Z.DOWN?cr=1:bi()&&Hi&&(Ti===z.Z.N?cr=1:Ti===z.Z.P&&(cr=-1)),cr!==0){var jt=Dr(Cr+cr,cr);yr(jt),Tn(jt,!0)}break}case z.Z.ENTER:{var ji=Yn[Cr];ji&&!ji.data.disabled?Nn(ji.value):Nn(void 0),Wt&&$r.preventDefault();break}case z.Z.ESC:mn(!1),Wt&&$r.stopPropagation()}},onKeyUp:function(){},scrollTo:function($r){yr($r)}}}),Yn.length===0)return ye.createElement("div",{role:"listbox",id:"".concat(Jn,"_list"),className:"".concat(yn,"-empty"),onMouseDown:vr},Cn);var fi=Object.keys(sr).map(function(Ur){return sr[Ur]}),xo=function($r){return $r.label};function zi(Ur,$r){var Ti=Ur.group;return{role:Ti?"presentation":"option",id:"".concat(Jn,"_list_").concat($r)}}var Lo=function($r){var Ti=Yn[$r];if(!Ti)return null;var Hi=Ti.data||{},cr=Hi.value,jt=Ti.group,ji=(0,ke.Z)(Hi,!0),Rr=xo(Ti);return Ti?ye.createElement("div",(0,it.Z)({"aria-label":typeof Rr=="string"&&!jt?Rr:null},ji,{key:$r},zi(Ti,$r),{"aria-selected":Ri(cr)}),cr):null},yo={role:"listbox",id:"".concat(Jn,"_list")};return ye.createElement(ye.Fragment,null,hn&&ye.createElement("div",(0,it.Z)({},yo,{style:{height:0,width:0,overflow:"hidden"}}),Lo(Cr-1),Lo(Cr),Lo(Cr+1)),ye.createElement(Hr.Z,{itemKey:"key",ref:ir,data:Yn,height:Zr,itemHeight:hi,fullHeight:!1,onMouseDown:vr,onScroll:tn,virtual:hn,direction:Nr,innerProps:hn?null:yo},function(Ur,$r){var Ti,Hi=Ur.group,cr=Ur.groupOption,jt=Ur.data,ji=Ur.label,Rr=Ur.value,jr=jt.key;if(Hi){var _i,Ji=(_i=jt.title)!==null&&_i!==void 0?_i:tt(ji)?ji.toString():void 0;return ye.createElement("div",{className:me()(yn,"".concat(yn,"-group")),title:Ji},ji!==void 0?ji:jr)}var _r=jt.disabled,Kr=jt.title,Pi=jt.children,gi=jt.style,Vi=jt.className,io=(0,ve.Z)(jt,Jr),Gr=(0,xr.Z)(io,fi),Tr=Ri(Rr),Vn="".concat(yn,"-option"),ai=me()(yn,Vn,Vi,(Ti={},(0,ie.Z)(Ti,"".concat(Vn,"-grouped"),cr),(0,ie.Z)(Ti,"".concat(Vn,"-active"),Cr===$r&&!_r),(0,ie.Z)(Ti,"".concat(Vn,"-disabled"),_r),(0,ie.Z)(Ti,"".concat(Vn,"-selected"),Tr),Ti)),Qi=xo(Ur),zo=!Gn||typeof Gn=="function"||Tr,Mo=typeof Qi=="number"?Qi:Qi||Rr,Uo=tt(Mo)?Mo.toString():void 0;return Kr!==void 0&&(Uo=Kr),ye.createElement("div",(0,it.Z)({},(0,ke.Z)(Gr),hn?{}:zi(Ur,$r),{"aria-selected":Tr,className:ai,title:Uo,onMouseMove:function(){Cr===$r||_r||Tn($r)},onClick:function(){_r||Nn(Rr)},style:gi}),ye.createElement("div",{className:"".concat(Vn,"-content")},Mo),ye.isValidElement(Gn)||Tr,zo&&ye.createElement(re,{className:"".concat(yn,"-option-state"),customizeIcon:Gn,customizeIconProps:{isSelected:Tr}},Tr?"\u2713":null))}))},Si=ye.forwardRef(li);Si.displayName="OptionList";var xi=Si;function lr(Jt){var Ut=Jt.mode,wn=Jt.options,_n=Jt.children,Qn=Jt.backfill,Jn=Jt.allowClear,Wt=Jt.placeholder,In=Jt.getInputElement,Wn=Jt.showSearch,ar=Jt.onSearch,mn=Jt.defaultOpen,Cn=Jt.autoFocus,tn=Jt.labelInValue,fn=Jt.value,En=Jt.inputValue,pn=Jt.optionLabelProp,Ln=isMultiple(Ut),Mn=Wn!==void 0?Wn:Ln||Ut==="combobox",Gn=wn||convertChildrenToData(_n);if(warning(Ut!=="tags"||Gn.every(function(Nr){return!Nr.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Ut==="tags"||Ut==="combobox"){var An=Gn.some(function(Nr){return Nr.options?Nr.options.some(function(Zr){return typeof("value"in Zr?Zr.value:Zr.key)=="number"}):typeof("value"in Nr?Nr.value:Nr.key)=="number"});warning(!An,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Ut!=="combobox"||!pn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Ut==="combobox"||!Qn,"`backfill` only works with `combobox` mode."),warning(Ut==="combobox"||!In,"`getInputElement` only work with `combobox` mode."),noteOnce(Ut!=="combobox"||!In||!Jn||!Wt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),ar&&!Mn&&Ut!=="combobox"&&Ut!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!mn||Cn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),fn!=null){var sr=toArray(fn);warning(!tn||sr.every(function(Nr){return _typeof(Nr)==="object"&&("key"in Nr||"value"in Nr)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Ln||Array.isArray(fn),"`value` should be array when `mode` is `multiple` or `tags`")}if(_n){var hn=null;toNodeArray(_n).some(function(Nr){if(!React.isValidElement(Nr)||!Nr.type)return!1;var Zr=Nr,hi=Zr.type;if(hi.isSelectOption)return!1;if(hi.isSelectOptGroup){var yn=toNodeArray(Nr.props.children).every(function(Yn){return!React.isValidElement(Yn)||!Nr.type||Yn.type.isSelectOption?!0:(hn=Yn.type,!1)});return!yn}return hn=hi,!0}),hn&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(hn.displayName||hn.name||hn,"`.")),warning(En===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Ar(Jt,Ut){if(Jt){var wn=function _n(Qn){for(var Jn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Wt=0;Wt<Qn.length;Wt++){var In=Qn[Wt];if(In[Ut==null?void 0:Ut.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Jn&&Array.isArray(In[Ut==null?void 0:Ut.options])&&_n(In[Ut==null?void 0:Ut.options],!0))break}};wn(Jt)}}var Fr=null,Ii=["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"],wr=["inputValue"];function cn(Jt){return!Jt||(0,ce.Z)(Jt)!=="object"}var un=ye.forwardRef(function(Jt,Ut){var wn=Jt.id,_n=Jt.mode,Qn=Jt.prefixCls,Jn=Qn===void 0?"rc-select":Qn,Wt=Jt.backfill,In=Jt.fieldNames,Wn=Jt.inputValue,ar=Jt.searchValue,mn=Jt.onSearch,Cn=Jt.autoClearSearchValue,tn=Cn===void 0?!0:Cn,fn=Jt.onSelect,En=Jt.onDeselect,pn=Jt.dropdownMatchSelectWidth,Ln=pn===void 0?!0:pn,Mn=Jt.filterOption,Gn=Jt.filterSort,An=Jt.optionFilterProp,sr=Jt.optionLabelProp,hn=Jt.options,Nr=Jt.children,Zr=Jt.defaultActiveFirstOption,hi=Jt.menuItemSelectedIcon,yn=Jt.virtual,Yn=Jt.direction,ir=Jt.listHeight,vr=ir===void 0?200:ir,yr=Jt.listItemHeight,Dr=yr===void 0?20:yr,ii=Jt.value,Br=Jt.defaultValue,Cr=Jt.labelInValue,oi=Jt.onChange,Tn=(0,ve.Z)(Jt,Ii),Ri=(0,zt.ZP)(wn),Nn=De(_n),fi=!!(!hn&&Nr),xo=ye.useMemo(function(){return Mn===void 0&&_n==="combobox"?!1:Mn},[Mn,_n]),zi=ye.useMemo(function(){return lt(In,fi)},[JSON.stringify(In),fi]),Lo=(0,be.Z)("",{value:ar!==void 0?ar:Wn,postState:function(lo){return lo||""}}),yo=(0,je.Z)(Lo,2),Ur=yo[0],$r=yo[1],Ti=gn(hn,Nr,zi,An,sr),Hi=Ti.valueOptions,cr=Ti.labelOptions,jt=Ti.options,ji=ye.useCallback(function(wi){var lo=Ye(wi);return lo.map(function(ao){var Mr,Ba,Ra,Cs,Il;if(cn(ao))Mr=ao;else{var ql;Ra=ao.key,Ba=ao.label,Mr=(ql=ao.value)!==null&&ql!==void 0?ql:Ra}var Sr=Hi.get(Mr);if(Sr){var aa;if(Ba===void 0&&(Ba=Sr==null?void 0:Sr[sr||zi.label]),Ra===void 0&&(Ra=(aa=Sr==null?void 0:Sr.key)!==null&&aa!==void 0?aa:Mr),Cs=Sr==null?void 0:Sr.disabled,Il=Sr==null?void 0:Sr.title,0)var Wa}return{label:Ba,value:Mr,key:Ra,disabled:Cs,title:Il}})},[zi,sr,Hi]),Rr=(0,be.Z)(Br,{value:ii}),jr=(0,je.Z)(Rr,2),_i=jr[0],Ji=jr[1],_r=ye.useMemo(function(){var wi,lo=ji(_i);return _n==="combobox"&&ht((wi=lo[0])===null||wi===void 0?void 0:wi.value)?[]:lo},[_i,ji,_n]),Kr=dt(_r,Hi),Pi=(0,je.Z)(Kr,2),gi=Pi[0],Vi=Pi[1],io=ye.useMemo(function(){if(!_n&&gi.length===1){var wi=gi[0];if(wi.value===null&&(wi.label===null||wi.label===void 0))return[]}return gi.map(function(lo){var ao;return(0,_e.Z)((0,_e.Z)({},lo),{},{label:(ao=lo.label)!==null&&ao!==void 0?ao:lo.value})})},[_n,gi]),Gr=ye.useMemo(function(){return new Set(gi.map(function(wi){return wi.value}))},[gi]);ye.useEffect(function(){if(_n==="combobox"){var wi,lo=(wi=gi[0])===null||wi===void 0?void 0:wi.value;$r(at(lo)?String(lo):"")}},[gi]);var Tr=kn(function(wi,lo){var ao,Mr=lo!=null?lo:wi;return ao={},(0,ie.Z)(ao,zi.value,wi),(0,ie.Z)(ao,zi.label,Mr),ao}),Vn=ye.useMemo(function(){if(_n!=="tags")return jt;var wi=(0,xt.Z)(jt),lo=function(Mr){return Hi.has(Mr)};return(0,xt.Z)(gi).sort(function(ao,Mr){return ao.value<Mr.value?-1:1}).forEach(function(ao){var Mr=ao.value;lo(Mr)||wi.push(Tr(Mr,ao.label))}),wi},[Tr,jt,Hi,gi,_n]),ai=kt(Vn,zi,Ur,xo,An),Qi=ye.useMemo(function(){return _n!=="tags"||!Ur||ai.some(function(wi){return wi[An||"value"]===Ur})||ai.some(function(wi){return wi[zi.value]===Ur})?ai:[Tr(Ur)].concat((0,xt.Z)(ai))},[Tr,An,_n,ai,Ur,zi]),zo=ye.useMemo(function(){return Gn?(0,xt.Z)(Qi).sort(function(wi,lo){return Gn(wi,lo)}):Qi},[Qi,Gn]),Mo=ye.useMemo(function(){return Qe(zo,{fieldNames:zi,childrenAsData:fi})},[zo,zi,fi]),Uo=function(lo){var ao=ji(lo);if(Ji(ao),oi&&(ao.length!==gi.length||ao.some(function(Ra,Cs){var Il;return((Il=gi[Cs])===null||Il===void 0?void 0:Il.value)!==(Ra==null?void 0:Ra.value)}))){var Mr=Cr?ao:ao.map(function(Ra){return Ra.value}),Ba=ao.map(function(Ra){return Ue(Vi(Ra.value))});oi(Nn?Mr:Mr[0],Nn?Ba:Ba[0])}},ca=ye.useState(null),Jo=(0,je.Z)(ca,2),qa=Jo[0],La=Jo[1],es=ye.useState(0),bn=(0,je.Z)(es,2),ma=bn[0],Ql=bn[1],el=Zr!==void 0?Zr:_n!=="combobox",So=ye.useCallback(function(wi,lo){var ao=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Mr=ao.source,Ba=Mr===void 0?"keyboard":Mr;Ql(lo),Wt&&_n==="combobox"&&wi!==null&&Ba==="keyboard"&&La(String(wi))},[Wt,_n]),ro=function(lo,ao,Mr){var Ba=function(){var Fl,Di=Vi(lo);return[Cr?{label:Di==null?void 0:Di[zi.label],value:lo,key:(Fl=Di==null?void 0:Di.key)!==null&&Fl!==void 0?Fl:lo}:lo,Ue(Di)]};if(ao&&fn){var Ra=Ba(),Cs=(0,je.Z)(Ra,2),Il=Cs[0],ql=Cs[1];fn(Il,ql)}else if(!ao&&En&&Mr!=="clear"){var Sr=Ba(),aa=(0,je.Z)(Sr,2),Wa=aa[0],Pl=aa[1];En(Wa,Pl)}},va=kn(function(wi,lo){var ao,Mr=Nn?lo.selected:!0;Mr?ao=Nn?[].concat((0,xt.Z)(gi),[wi]):[wi]:ao=gi.filter(function(Ba){return Ba.value!==wi}),Uo(ao),ro(wi,Mr),_n==="combobox"?La(""):(!De||tn)&&($r(""),La(""))}),Io=function(lo,ao){Uo(lo);var Mr=ao.type,Ba=ao.values;(Mr==="remove"||Mr==="clear")&&Ba.forEach(function(Ra){ro(Ra.value,!1,Mr)})},qi=function(lo,ao){if($r(lo),La(null),ao.source==="submit"){var Mr=(lo||"").trim();if(Mr){var Ba=Array.from(new Set([].concat((0,xt.Z)(Gr),[Mr])));Uo(Ba),ro(Mr,!0),$r("")}return}ao.source!=="blur"&&(_n==="combobox"&&Uo(lo),mn==null||mn(lo))},No=function(lo){var ao=lo;_n!=="tags"&&(ao=lo.map(function(Ba){var Ra=cr.get(Ba);return Ra==null?void 0:Ra.value}).filter(function(Ba){return Ba!==void 0}));var Mr=Array.from(new Set([].concat((0,xt.Z)(Gr),(0,xt.Z)(ao))));Uo(Mr),Mr.forEach(function(Ba){ro(Ba,!0)})},xs=ye.useMemo(function(){var wi=yn!==!1&&Ln!==!1;return(0,_e.Z)((0,_e.Z)({},Ti),{},{flattenOptions:Mo,onActiveValue:So,defaultActiveFirstOption:el,onSelect:va,menuItemSelectedIcon:hi,rawValues:Gr,fieldNames:zi,virtual:wi,direction:Yn,listHeight:vr,listItemHeight:Dr,childrenAsData:fi})},[Ti,Mo,So,el,va,hi,Gr,zi,yn,Ln,vr,Dr,fi]);return ye.createElement(Or.Provider,{value:xs},ye.createElement(Ke,(0,it.Z)({},Tn,{id:Ri,prefixCls:Jn,ref:Ut,omitDomProps:wr,mode:_n,displayValues:io,onDisplayValuesChange:Io,direction:Yn,searchValue:Ur,onSearch:qi,autoClearSearchValue:tn,onSearchSplit:No,dropdownMatchSelectWidth:Ln,OptionList:xi,emptyOptions:!Mo.length,activeValue:qa,activeDescendantId:"".concat(Ri,"_list_").concat(ma)})))}),Dt=un;Dt.Option=dr,Dt.OptGroup=Xn;var vn=Dt,On=vn},9296:function(Pn,an,$e){"use strict";$e.r(an),$e.d(an,{ResizableTextArea:function(){return Fe},default:function(){return ht}});var it=$e(72308),xt=$e(77321),ie=$e(49618),_e=$e(62853),je=$e(52487),ve=$e(74416),ce=$e(80702),be=$e(92310),Ce=$e.n(be),ye=$e(93681),we=$e(5643),me=$e(18929),xe=$e(59301),fe=$e(29301),z=$e(34280),ee=$e(16089),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(pt){var Mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,et=pt.getAttribute("id")||pt.getAttribute("data-reactid")||pt.getAttribute("name");if(Mt&&le[et])return le[et];var ot=window.getComputedStyle(pt),wt=ot.getPropertyValue("box-sizing")||ot.getPropertyValue("-moz-box-sizing")||ot.getPropertyValue("-webkit-box-sizing"),Et=parseFloat(ot.getPropertyValue("padding-bottom"))+parseFloat(ot.getPropertyValue("padding-top")),Tt=parseFloat(ot.getPropertyValue("border-bottom-width"))+parseFloat(ot.getPropertyValue("border-top-width")),vt=re.map(function(yt){return"".concat(yt,":").concat(ot.getPropertyValue(yt))}).join(";"),gt={sizingStyle:vt,paddingSize:Et,borderSize:Tt,boxSizing:wt};return Mt&&et&&(le[et]=gt),gt}function Ee(pt){var Mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,et=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ot=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)),pt.getAttribute("wrap")?ue.setAttribute("wrap",pt.getAttribute("wrap")):ue.removeAttribute("wrap");var wt=pe(pt,Mt),Et=wt.paddingSize,Tt=wt.borderSize,vt=wt.boxSizing,gt=wt.sizingStyle;ue.setAttribute("style","".concat(gt,";").concat(ae)),ue.value=pt.value||pt.placeholder||"";var yt=void 0,It=void 0,Ot,Vt=ue.scrollHeight;if(vt==="border-box"?Vt+=Tt:vt==="content-box"&&(Vt-=Et),et!==null||ot!==null){ue.value=" ";var Ct=ue.scrollHeight-Et;et!==null&&(yt=Ct*et,vt==="border-box"&&(yt=yt+Et+Tt),Vt=Math.max(yt,Vt)),ot!==null&&(It=Ct*ot,vt==="border-box"&&(It=It+Et+Tt),Ot=Vt>It?"":"hidden",Vt=Math.min(It,Vt))}var mt={height:Vt,overflowY:Ot,resize:"none"};return yt&&(mt.minHeight=yt),It&&(mt.maxHeight=It),mt}var Pe=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Ie=0,ke=1,Ne=2,Oe=xe.forwardRef(function(pt,Mt){var et=pt,ot=et.prefixCls,wt=et.onPressEnter,Et=et.defaultValue,Tt=et.value,vt=et.autoSize,gt=et.onResize,yt=et.className,It=et.style,Ot=et.disabled,Vt=et.onChange,Ct=et.onInternalAutoSize,mt=(0,ve.Z)(et,Pe),nt=(0,me.Z)(Et,{value:Tt,postState:function(Xn){return Xn!=null?Xn:""}}),ft=(0,je.Z)(nt,2),Xe=ft[0],ut=ft[1],bt=function(Xn){ut(Xn.target.value),Vt==null||Vt(Xn)},St=xe.useRef();xe.useImperativeHandle(Mt,function(){return{textArea:St.current}});var lt=xe.useMemo(function(){return vt&&(0,_e.Z)(vt)==="object"?[vt.minRows,vt.maxRows]:[]},[vt]),Qe=(0,je.Z)(lt,2),Ue=Qe[0],We=Qe[1],qe=!!vt,He=function(){try{if(document.activeElement===St.current){var Xn=St.current,hr=Xn.selectionStart,dr=Xn.selectionEnd,fr=Xn.scrollTop;St.current.setSelectionRange(hr,dr),St.current.scrollTop=fr}}catch(xr){}},De=xe.useState(Ne),Le=(0,je.Z)(De,2),Ke=Le[0],dt=Le[1],Ve=xe.useState(),kt=(0,je.Z)(Ve,2),zt=kt[0],Xt=kt[1],At=function(){dt(Ie)};(0,z.Z)(function(){qe&&At()},[Tt,Ue,We,qe]),(0,z.Z)(function(){if(Ke===Ie)dt(ke);else if(Ke===ke){var Kn=Ee(St.current,!1,Ue,We);dt(Ne),Xt(Kn)}else He()},[Ke]);var Nt=xe.useRef(),qt=function(){ee.Z.cancel(Nt.current)},on=function(Xn){Ke===Ne&&(gt==null||gt(Xn),vt&&(qt(),Nt.current=(0,ee.Z)(function(){At()})))};xe.useEffect(function(){return qt},[]);var gn=qe?zt:null,kn=(0,xt.Z)((0,xt.Z)({},It),gn);return(Ke===Ie||Ke===ke)&&(kn.overflowY="hidden",kn.overflowX="hidden"),xe.createElement(fe.Z,{onResize:on,disabled:!(vt||gt)},xe.createElement("textarea",(0,it.Z)({},mt,{ref:St,style:kn,className:Ce()(ot,yt,(0,ie.Z)({},"".concat(ot,"-disabled"),Ot)),disabled:Ot,value:Xe,onChange:bt})))}),Fe=Oe,Re=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Ye(pt,Mt){return(0,ce.Z)(pt||"").slice(0,Mt).join("")}function ze(pt,Mt,et,ot){var wt=et;return pt?wt=Ye(et,ot):(0,ce.Z)(Mt||"").length<et.length&&(0,ce.Z)(et||"").length>ot&&(wt=Mt),wt}var Ze=xe.forwardRef(function(pt,Mt){var et,ot=pt.defaultValue,wt=pt.value,Et=pt.onFocus,Tt=pt.onBlur,vt=pt.onChange,gt=pt.allowClear,yt=pt.maxLength,It=pt.onCompositionStart,Ot=pt.onCompositionEnd,Vt=pt.suffix,Ct=pt.prefixCls,mt=Ct===void 0?"rc-textarea":Ct,nt=pt.classes,ft=pt.showCount,Xe=pt.className,ut=pt.style,bt=pt.disabled,St=pt.hidden,lt=pt.classNames,Qe=pt.styles,Ue=pt.onResize,We=(0,ve.Z)(pt,Re),qe=(0,me.Z)(ot,{value:wt,defaultValue:ot}),He=(0,je.Z)(qe,2),De=He[0],Le=He[1],Ke=(0,xe.useRef)(null),dt=xe.useState(!1),Ve=(0,je.Z)(dt,2),kt=Ve[0],zt=Ve[1],Xt=xe.useState(!1),At=(0,je.Z)(Xt,2),Nt=At[0],qt=At[1],on=xe.useRef(),gn=xe.useRef(0),kn=xe.useState(null),Kn=(0,je.Z)(kn,2),Xn=Kn[0],hr=Kn[1],dr=function(){var cn;(cn=Ke.current)===null||cn===void 0||cn.textArea.focus()};(0,xe.useImperativeHandle)(Mt,function(){return{resizableTextArea:Ke.current,focus:dr,blur:function(){var cn;(cn=Ke.current)===null||cn===void 0||cn.textArea.blur()}}}),(0,xe.useEffect)(function(){zt(function(wr){return!bt&&wr})},[bt]);var fr=Number(yt)>0,xr=function(cn){qt(!0),on.current=De,gn.current=cn.currentTarget.selectionStart,It==null||It(cn)},Hr=function(cn){qt(!1);var un=cn.currentTarget.value;if(fr){var Dt,vn=gn.current>=yt+1||gn.current===((Dt=on.current)===null||Dt===void 0?void 0:Dt.length);un=ze(vn,on.current,un,yt)}un!==De&&(Le(un),(0,we.rJ)(cn.currentTarget,cn,vt,un)),Ot==null||Ot(cn)},Yr=function(cn){var un=cn.target.value;if(!Nt&&fr){var Dt=cn.target.selectionStart>=yt+1||cn.target.selectionStart===un.length||!cn.target.selectionStart;un=ze(Dt,De,un,yt)}Le(un),(0,we.rJ)(cn.currentTarget,cn,vt,un)},Or=function(cn){var un=We.onPressEnter,Dt=We.onKeyDown;cn.key==="Enter"&&un&&un(cn),Dt==null||Dt(cn)},bi=function(cn){zt(!0),Et==null||Et(cn)},Jr=function(cn){zt(!1),Tt==null||Tt(cn)},tt=function(cn){var un;Le(""),dr(),(0,we.rJ)((un=Ke.current)===null||un===void 0?void 0:un.textArea,cn,vt)},li=(0,we.D7)(De);!Nt&&fr&&wt==null&&(li=Ye(li,yt));var Si=Vt,xi;if(ft){var lr=(0,ce.Z)(li).length;(0,_e.Z)(ft)==="object"?xi=ft.formatter({value:li,count:lr,maxLength:yt}):xi="".concat(lr).concat(fr?" / ".concat(yt):""),Si=xe.createElement(xe.Fragment,null,Si,xe.createElement("span",{className:Ce()("".concat(mt,"-data-count"),lt==null?void 0:lt.count),style:Qe==null?void 0:Qe.count},xi))}var Ar=function(cn){var un;Ue==null||Ue(cn),(un=Ke.current)!==null&&un!==void 0&&un.textArea.style.height&&hr(!0)},Fr=!We.autoSize&&!ft&&!gt,Ii=xe.createElement(ye.BaseInput,{value:li,allowClear:gt,handleReset:tt,suffix:Si,prefixCls:mt,classes:{affixWrapper:Ce()(nt==null?void 0:nt.affixWrapper,(et={},(0,ie.Z)(et,"".concat(mt,"-show-count"),ft),(0,ie.Z)(et,"".concat(mt,"-textarea-allow-clear"),gt),et))},disabled:bt,focused:kt,className:Xe,style:(0,xt.Z)((0,xt.Z)({},ut),Xn&&!Fr?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof xi=="string"?xi:void 0}},hidden:St,inputElement:xe.createElement(Fe,(0,it.Z)({},We,{onKeyDown:Or,onChange:Yr,onFocus:bi,onBlur:Jr,onCompositionStart:xr,onCompositionEnd:Hr,className:lt==null?void 0:lt.textarea,style:(0,xt.Z)((0,xt.Z)({},Qe==null?void 0:Qe.textarea),{},{resize:ut==null?void 0:ut.resize}),disabled:bt,prefixCls:mt,onResize:Ar,ref:Ke}))});return Ii}),at=Ze,ht=at},39417:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return ke}});var it=$e(72308),xt=$e(49618),ie=$e(74416),_e=$e(77321),je=$e(96949),ve=$e(55090),ce=$e(80237),be=$e(77205),Ce=$e(38793),ye=$e(92310),we=$e.n(ye),me=$e(26112),xe=$e(59301),fe=$e(39378),z=function(Oe){for(var Fe=Oe.prefixCls,Re=Oe.level,Ye=Oe.isStart,ze=Oe.isEnd,Ze="".concat(Fe,"-indent-unit"),at=[],ht=0;ht<Re;ht+=1){var pt;at.push(xe.createElement("span",{key:ht,className:we()(Ze,(pt={},(0,xt.Z)(pt,"".concat(Ze,"-start"),Ye[ht]),(0,xt.Z)(pt,"".concat(Ze,"-end"),ze[ht]),pt))}))}return xe.createElement("span",{"aria-hidden":"true",className:"".concat(Fe,"-indent")},at)},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(Ne){(0,be.Z)(Fe,Ne);var Oe=(0,Ce.Z)(Fe);function Fe(){var Re;(0,je.Z)(this,Fe);for(var Ye=arguments.length,ze=new Array(Ye),Ze=0;Ze<Ye;Ze++)ze[Ze]=arguments[Ze];return Re=Oe.call.apply(Oe,[this].concat(ze)),Re.state={dragNodeHighlight:!1},Re.selectHandle=void 0,Re.cacheIndent=void 0,Re.onSelectorClick=function(at){var ht=Re.props.context.onNodeClick;ht(at,(0,re.F)(Re.props)),Re.isSelectable()?Re.onSelect(at):Re.onCheck(at)},Re.onSelectorDoubleClick=function(at){var ht=Re.props.context.onNodeDoubleClick;ht(at,(0,re.F)(Re.props))},Re.onSelect=function(at){if(!Re.isDisabled()){var ht=Re.props.context.onNodeSelect;ht(at,(0,re.F)(Re.props))}},Re.onCheck=function(at){if(!Re.isDisabled()){var ht=Re.props,pt=ht.disableCheckbox,Mt=ht.checked,et=Re.props.context.onNodeCheck;if(!(!Re.isCheckable()||pt)){var ot=!Mt;et(at,(0,re.F)(Re.props),ot)}}},Re.onMouseEnter=function(at){var ht=Re.props.context.onNodeMouseEnter;ht(at,(0,re.F)(Re.props))},Re.onMouseLeave=function(at){var ht=Re.props.context.onNodeMouseLeave;ht(at,(0,re.F)(Re.props))},Re.onContextMenu=function(at){var ht=Re.props.context.onNodeContextMenu;ht(at,(0,re.F)(Re.props))},Re.onDragStart=function(at){var ht=Re.props.context.onNodeDragStart;at.stopPropagation(),Re.setState({dragNodeHighlight:!0}),ht(at,(0,ce.Z)(Re));try{at.dataTransfer.setData("text/plain","")}catch(pt){}},Re.onDragEnter=function(at){var ht=Re.props.context.onNodeDragEnter;at.preventDefault(),at.stopPropagation(),ht(at,(0,ce.Z)(Re))},Re.onDragOver=function(at){var ht=Re.props.context.onNodeDragOver;at.preventDefault(),at.stopPropagation(),ht(at,(0,ce.Z)(Re))},Re.onDragLeave=function(at){var ht=Re.props.context.onNodeDragLeave;at.stopPropagation(),ht(at,(0,ce.Z)(Re))},Re.onDragEnd=function(at){var ht=Re.props.context.onNodeDragEnd;at.stopPropagation(),Re.setState({dragNodeHighlight:!1}),ht(at,(0,ce.Z)(Re))},Re.onDrop=function(at){var ht=Re.props.context.onNodeDrop;at.preventDefault(),at.stopPropagation(),Re.setState({dragNodeHighlight:!1}),ht(at,(0,ce.Z)(Re))},Re.onExpand=function(at){var ht=Re.props,pt=ht.loading,Mt=ht.context.onNodeExpand;pt||Mt(at,(0,re.F)(Re.props))},Re.setSelectHandle=function(at){Re.selectHandle=at},Re.getNodeState=function(){var at=Re.props.expanded;return Re.isLeaf()?null:at?ue:pe},Re.hasChildren=function(){var at=Re.props.eventKey,ht=Re.props.context.keyEntities,pt=(0,ae.Z)(ht,at)||{},Mt=pt.children;return!!(Mt||[]).length},Re.isLeaf=function(){var at=Re.props,ht=at.isLeaf,pt=at.loaded,Mt=Re.props.context.loadData,et=Re.hasChildren();return ht===!1?!1:ht||!Mt&&!et||Mt&&pt&&!et},Re.isDisabled=function(){var at=Re.props.disabled,ht=Re.props.context.disabled;return!!(ht||at)},Re.isCheckable=function(){var at=Re.props.checkable,ht=Re.props.context.checkable;return!ht||at===!1?!1:ht},Re.syncLoadData=function(at){var ht=at.expanded,pt=at.loading,Mt=at.loaded,et=Re.props.context,ot=et.loadData,wt=et.onNodeLoad;pt||ot&&ht&&!Re.isLeaf()&&!Re.hasChildren()&&!Mt&&wt((0,re.F)(Re.props))},Re.isDraggable=function(){var at=Re.props,ht=at.data,pt=at.context.draggable;return!!(pt&&(!pt.nodeDraggable||pt.nodeDraggable(ht)))},Re.renderDragHandler=function(){var at=Re.props.context,ht=at.draggable,pt=at.prefixCls;return ht!=null&&ht.icon?xe.createElement("span",{className:"".concat(pt,"-draggable-icon")},ht.icon):null},Re.renderSwitcherIconDom=function(at){var ht=Re.props.switcherIcon,pt=Re.props.context.switcherIcon,Mt=ht||pt;return typeof Mt=="function"?Mt((0,_e.Z)((0,_e.Z)({},Re.props),{},{isLeaf:at})):Mt},Re.renderSwitcher=function(){var at=Re.props.expanded,ht=Re.props.context.prefixCls;if(Re.isLeaf()){var pt=Re.renderSwitcherIconDom(!0);return pt!==!1?xe.createElement("span",{className:we()("".concat(ht,"-switcher"),"".concat(ht,"-switcher-noop"))},pt):null}var Mt=we()("".concat(ht,"-switcher"),"".concat(ht,"-switcher_").concat(at?ue:pe)),et=Re.renderSwitcherIconDom(!1);return et!==!1?xe.createElement("span",{onClick:Re.onExpand,className:Mt},et):null},Re.renderCheckbox=function(){var at=Re.props,ht=at.checked,pt=at.halfChecked,Mt=at.disableCheckbox,et=Re.props.context.prefixCls,ot=Re.isDisabled(),wt=Re.isCheckable();if(!wt)return null;var Et=typeof wt!="boolean"?wt:null;return xe.createElement("span",{className:we()("".concat(et,"-checkbox"),ht&&"".concat(et,"-checkbox-checked"),!ht&&pt&&"".concat(et,"-checkbox-indeterminate"),(ot||Mt)&&"".concat(et,"-checkbox-disabled")),onClick:Re.onCheck},Et)},Re.renderIcon=function(){var at=Re.props.loading,ht=Re.props.context.prefixCls;return xe.createElement("span",{className:we()("".concat(ht,"-iconEle"),"".concat(ht,"-icon__").concat(Re.getNodeState()||"docu"),at&&"".concat(ht,"-icon_loading"))})},Re.renderSelector=function(){var at=Re.state.dragNodeHighlight,ht=Re.props,pt=ht.title,Mt=pt===void 0?Ee:pt,et=ht.selected,ot=ht.icon,wt=ht.loading,Et=ht.data,Tt=Re.props.context,vt=Tt.prefixCls,gt=Tt.showIcon,yt=Tt.icon,It=Tt.loadData,Ot=Tt.titleRender,Vt=Re.isDisabled(),Ct="".concat(vt,"-node-content-wrapper"),mt;if(gt){var nt=ot||yt;mt=nt?xe.createElement("span",{className:we()("".concat(vt,"-iconEle"),"".concat(vt,"-icon__customize"))},typeof nt=="function"?nt(Re.props):nt):Re.renderIcon()}else It&&wt&&(mt=Re.renderIcon());var ft;typeof Mt=="function"?ft=Mt(Et):Ot?ft=Ot(Et):ft=Mt;var Xe=xe.createElement("span",{className:"".concat(vt,"-title")},ft);return xe.createElement("span",{ref:Re.setSelectHandle,title:typeof Mt=="string"?Mt:"",className:we()("".concat(Ct),"".concat(Ct,"-").concat(Re.getNodeState()||"normal"),!Vt&&(et||at)&&"".concat(vt,"-node-selected")),onMouseEnter:Re.onMouseEnter,onMouseLeave:Re.onMouseLeave,onContextMenu:Re.onContextMenu,onClick:Re.onSelectorClick,onDoubleClick:Re.onSelectorDoubleClick},mt,Xe,Re.renderDropIndicator())},Re.renderDropIndicator=function(){var at=Re.props,ht=at.disabled,pt=at.eventKey,Mt=Re.props.context,et=Mt.draggable,ot=Mt.dropLevelOffset,wt=Mt.dropPosition,Et=Mt.prefixCls,Tt=Mt.indent,vt=Mt.dropIndicatorRender,gt=Mt.dragOverNodeKey,yt=Mt.direction,It=!!et,Ot=!ht&&It&>===pt,Vt=Tt!=null?Tt:Re.cacheIndent;return Re.cacheIndent=Tt,Ot?vt({dropPosition:wt,dropLevelOffset:ot,indent:Vt,prefixCls:Et,direction:yt}):null},Re}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,Ze=ze.eventKey,at=ze.className,ht=ze.style,pt=ze.dragOver,Mt=ze.dragOverGapTop,et=ze.dragOverGapBottom,ot=ze.isLeaf,wt=ze.isStart,Et=ze.isEnd,Tt=ze.expanded,vt=ze.selected,gt=ze.checked,yt=ze.halfChecked,It=ze.loading,Ot=ze.domRef,Vt=ze.active,Ct=ze.data,mt=ze.onMouseMove,nt=ze.selectable,ft=(0,ie.Z)(ze,le),Xe=this.props.context,ut=Xe.prefixCls,bt=Xe.filterTreeNode,St=Xe.keyEntities,lt=Xe.dropContainerKey,Qe=Xe.dropTargetKey,Ue=Xe.draggingNodeKey,We=this.isDisabled(),qe=(0,me.Z)(ft,{aria:!0,data:!0}),He=(0,ae.Z)(St,Ze)||{},De=He.level,Le=Et[Et.length-1],Ke=this.isDraggable(),dt=!We&&Ke,Ve=Ue===Ze,kt=nt!==void 0?{"aria-selected":!!nt}:void 0;return xe.createElement("div",(0,it.Z)({ref:Ot,className:we()(at,"".concat(ut,"-treenode"),(Ye={},(0,xt.Z)(Ye,"".concat(ut,"-treenode-disabled"),We),(0,xt.Z)(Ye,"".concat(ut,"-treenode-switcher-").concat(Tt?"open":"close"),!ot),(0,xt.Z)(Ye,"".concat(ut,"-treenode-checkbox-checked"),gt),(0,xt.Z)(Ye,"".concat(ut,"-treenode-checkbox-indeterminate"),yt),(0,xt.Z)(Ye,"".concat(ut,"-treenode-selected"),vt),(0,xt.Z)(Ye,"".concat(ut,"-treenode-loading"),It),(0,xt.Z)(Ye,"".concat(ut,"-treenode-active"),Vt),(0,xt.Z)(Ye,"".concat(ut,"-treenode-leaf-last"),Le),(0,xt.Z)(Ye,"".concat(ut,"-treenode-draggable"),Ke),(0,xt.Z)(Ye,"dragging",Ve),(0,xt.Z)(Ye,"drop-target",Qe===Ze),(0,xt.Z)(Ye,"drop-container",lt===Ze),(0,xt.Z)(Ye,"drag-over",!We&&pt),(0,xt.Z)(Ye,"drag-over-gap-top",!We&&Mt),(0,xt.Z)(Ye,"drag-over-gap-bottom",!We&&et),(0,xt.Z)(Ye,"filter-node",bt&&bt((0,re.F)(this.props))),Ye)),style:ht,draggable:dt,"aria-grabbed":Ve,onDragStart:dt?this.onDragStart:void 0,onDragEnter:Ke?this.onDragEnter:void 0,onDragOver:Ke?this.onDragOver:void 0,onDragLeave:Ke?this.onDragLeave:void 0,onDrop:Ke?this.onDrop:void 0,onDragEnd:Ke?this.onDragEnd:void 0,onMouseMove:mt},kt,qe),xe.createElement(ee,{prefixCls:ut,level:De,isStart:wt,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,it.Z)({},Oe,{context:Fe}))})};Ie.displayName="TreeNode",Ie.isTreeNode=1;var ke=Ie},39378:function(Pn,an,$e){"use strict";$e.d(an,{k:function(){return xt}});var it=$e(59301),xt=it.createContext(null)},54844:function(Pn,an,$e){"use strict";$e.d(an,{O:function(){return ke.Z},Z:function(){return Xe}});var it=$e(72308),xt=$e(49618),ie=$e(62853),_e=$e(77321),je=$e(80702),ve=$e(96949),ce=$e(55090),be=$e(80237),Ce=$e(77205),ye=$e(38793),we=$e(92310),me=$e.n(we),xe=$e(10228),fe=$e(26112),z=$e(48736),ee=$e(59301),ae=$e(39378);function re(ut){var bt=ut.dropPosition,St=ut.dropLevelOffset,lt=ut.indent,Qe={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(bt){case-1:Qe.top=0,Qe.left=-St*lt;break;case 1:Qe.bottom=0,Qe.left=-St*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(52487),pe=$e(74416),Ee=$e(34280),Pe=$e(45680),Ie=$e(77900),ke=$e(39417);function Ne(ut,bt){var St=ee.useState(!1),lt=(0,ue.Z)(St,2),Qe=lt[0],Ue=lt[1];ee.useLayoutEffect(function(){if(Qe)return ut(),function(){bt()}},[Qe]),ee.useLayoutEffect(function(){return Ue(!0),function(){Ue(!1)}},[])}var Oe=$e(71430),Fe=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Re=function(bt,St){var lt=bt.className,Qe=bt.style,Ue=bt.motion,We=bt.motionNodes,qe=bt.motionType,He=bt.onMotionStart,De=bt.onMotionEnd,Le=bt.active,Ke=bt.treeNodeRequiredProps,dt=(0,pe.Z)(bt,Fe),Ve=ee.useState(!0),kt=(0,ue.Z)(Ve,2),zt=kt[0],Xt=kt[1],At=ee.useContext(ae.k),Nt=At.prefixCls,qt=We&&qe!=="hide";(0,Ee.Z)(function(){We&&qt!==zt&&Xt(qt)},[We]);var on=function(){We&&He()},gn=ee.useRef(!1),kn=function(){We&&!gn.current&&(gn.current=!0,De())};Ne(on,kn);var Kn=function(hr){qt===hr&&kn()};return We?ee.createElement(Ie.default,(0,it.Z)({ref:St,visible:zt},Ue,{motionAppear:qe==="show",onVisibleChanged:Kn}),function(Xn,hr){var dr=Xn.className,fr=Xn.style;return ee.createElement("div",{ref:hr,className:me()("".concat(Nt,"-treenode-motion"),dr),style:fr},We.map(function(xr){var Hr=(0,it.Z)({},(le(xr.data),xr.data)),Yr=xr.title,Or=xr.key,bi=xr.isStart,Jr=xr.isEnd;delete Hr.children;var tt=(0,Oe.H8)(Or,Ke);return ee.createElement(ke.Z,(0,it.Z)({},Hr,tt,{title:Yr,active:Le,data:xr.data,key:Or,isStart:bi,isEnd:Jr}))}))}):ee.createElement(ke.Z,(0,it.Z)({domRef:St,className:lt,style:Qe},dt,{active:Le}))};Re.displayName="MotionTreeNode";var Ye=ee.forwardRef(Re),ze=Ye;function Ze(){var ut=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],St=ut.length,lt=bt.length;if(Math.abs(St-lt)!==1)return{add:!1,key:null};function Qe(Ue,We){var qe=new Map;Ue.forEach(function(De){qe.set(De,!0)});var He=We.filter(function(De){return!qe.has(De)});return He.length===1?He[0]:null}return St<lt?{add:!0,key:Qe(ut,bt)}:{add:!1,key:Qe(bt,ut)}}function at(ut,bt,St){var lt=ut.findIndex(function(qe){return qe.key===St}),Qe=ut[lt+1],Ue=bt.findIndex(function(qe){return qe.key===St});if(Qe){var We=bt.findIndex(function(qe){return qe.key===Qe.key});return bt.slice(Ue+1,We)}return bt.slice(Ue+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"],pt={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Mt=function(){},et="RC_TREE_MOTION_".concat(Math.random()),ot={key:et},wt={key:et,level:0,index:0,pos:"0",node:ot,nodes:[ot]},Et={parent:null,children:[],pos:wt.pos,data:ot,title:null,key:et,isStart:[],isEnd:[]};function Tt(ut,bt,St,lt){return bt===!1||!St?ut:ut.slice(0,Math.ceil(St/lt)+1)}function vt(ut){var bt=ut.key,St=ut.pos;return(0,Oe.km)(bt,St)}function gt(ut){for(var bt=String(ut.data.key),St=ut;St.parent;)St=St.parent,bt="".concat(St.data.key," > ").concat(bt);return bt}var yt=ee.forwardRef(function(ut,bt){var St=ut.prefixCls,lt=ut.data,Qe=ut.selectable,Ue=ut.checkable,We=ut.expandedKeys,qe=ut.selectedKeys,He=ut.checkedKeys,De=ut.loadedKeys,Le=ut.loadingKeys,Ke=ut.halfCheckedKeys,dt=ut.keyEntities,Ve=ut.disabled,kt=ut.dragging,zt=ut.dragOverNodeKey,Xt=ut.dropPosition,At=ut.motion,Nt=ut.height,qt=ut.itemHeight,on=ut.virtual,gn=ut.focusable,kn=ut.activeItem,Kn=ut.focused,Xn=ut.tabIndex,hr=ut.onKeyDown,dr=ut.onFocus,fr=ut.onBlur,xr=ut.onActiveChange,Hr=ut.onListChangeStart,Yr=ut.onListChangeEnd,Or=(0,pe.Z)(ut,ht),bi=ee.useRef(null),Jr=ee.useRef(null);ee.useImperativeHandle(bt,function(){return{scrollTo:function(Cn){bi.current.scrollTo(Cn)},getIndentWidth:function(){return Jr.current.offsetWidth}}});var tt=ee.useState(We),li=(0,ue.Z)(tt,2),Si=li[0],xi=li[1],lr=ee.useState(lt),Ar=(0,ue.Z)(lr,2),Fr=Ar[0],Ii=Ar[1],wr=ee.useState(lt),cn=(0,ue.Z)(wr,2),un=cn[0],Dt=cn[1],vn=ee.useState([]),On=(0,ue.Z)(vn,2),Jt=On[0],Ut=On[1],wn=ee.useState(null),_n=(0,ue.Z)(wn,2),Qn=_n[0],Jn=_n[1],Wt=ee.useRef(lt);Wt.current=lt;function In(){var mn=Wt.current;Ii(mn),Dt(mn),Ut([]),Jn(null),Yr()}(0,Ee.Z)(function(){xi(We);var mn=Ze(Si,We);if(mn.key!==null)if(mn.add){var Cn=Fr.findIndex(function(Mn){var Gn=Mn.key;return Gn===mn.key}),tn=Tt(at(Fr,lt,mn.key),on,Nt,qt),fn=Fr.slice();fn.splice(Cn+1,0,Et),Dt(fn),Ut(tn),Jn("show")}else{var En=lt.findIndex(function(Mn){var Gn=Mn.key;return Gn===mn.key}),pn=Tt(at(lt,Fr,mn.key),on,Nt,qt),Ln=lt.slice();Ln.splice(En+1,0,Et),Dt(Ln),Ut(pn),Jn("hide")}else Fr!==lt&&(Ii(lt),Dt(lt))},[We,lt]),ee.useEffect(function(){kt||In()},[kt]);var Wn=At?un:lt,ar={expandedKeys:We,selectedKeys:qe,loadedKeys:De,loadingKeys:Le,checkedKeys:He,halfCheckedKeys:Ke,dragOverNodeKey:zt,dropPosition:Xt,keyEntities:dt};return ee.createElement(ee.Fragment,null,Kn&&kn&&ee.createElement("span",{style:pt,"aria-live":"assertive"},gt(kn)),ee.createElement("div",null,ee.createElement("input",{style:pt,disabled:gn===!1||Ve,tabIndex:gn!==!1?Xn:null,onKeyDown:hr,onFocus:dr,onBlur:fr,value:"",onChange:Mt,"aria-label":"for screen reader"})),ee.createElement("div",{className:"".concat(St,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},ee.createElement("div",{className:"".concat(St,"-indent")},ee.createElement("div",{ref:Jr,className:"".concat(St,"-indent-unit")}))),ee.createElement(Pe.Z,(0,it.Z)({},Or,{data:Wn,itemKey:vt,height:Nt,fullHeight:!1,virtual:on,itemHeight:qt,prefixCls:"".concat(St,"-list"),ref:bi,onVisibleChange:function(Cn,tn){var fn=new Set(Cn),En=tn.filter(function(pn){return!fn.has(pn)});En.some(function(pn){return vt(pn)===et})&&In()}}),function(mn){var Cn=mn.pos,tn=(0,it.Z)({},(le(mn.data),mn.data)),fn=mn.title,En=mn.key,pn=mn.isStart,Ln=mn.isEnd,Mn=(0,Oe.km)(En,Cn);delete tn.key,delete tn.children;var Gn=(0,Oe.H8)(Mn,ar);return ee.createElement(ze,(0,it.Z)({},tn,Gn,{title:fn,active:!!kn&&En===kn.key,pos:Cn,data:mn.data,isStart:pn,isEnd:Ln,motion:At,motionNodes:En===et?Jt:null,motionType:Qn,onMotionStart:Hr,onMotionEnd:In,treeNodeRequiredProps:ar,onMouseMove:function(){xr(null)}}))}))});yt.displayName="NodeList";var It=yt,Ot=$e(35654),Vt=$e(90782),Ct=$e(67841),mt=10,nt=function(ut){(0,Ce.Z)(St,ut);var bt=(0,ye.Z)(St);function St(){var lt;(0,ve.Z)(this,St);for(var Qe=arguments.length,Ue=new Array(Qe),We=0;We<Qe;We++)Ue[We]=arguments[We];return lt=bt.call.apply(bt,[this].concat(Ue)),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,Ke=De.keyEntities,dt=lt.props.onDragStart,Ve=He.props.eventKey;lt.dragNode=He,lt.dragStartMousePosition={x:qe.clientX,y:qe.clientY};var kt=(0,Ot._5)(Le,Ve);lt.setState({draggingNodeKey:Ve,dragChildrenKeys:(0,Ot.wA)(Ve,Ke),indent:lt.listRef.current.getIndentWidth()}),lt.setExpandedKeys(kt),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,Ke=De.keyEntities,dt=De.dragChildrenKeys,Ve=De.flattenNodes,kt=De.indent,zt=lt.props,Xt=zt.onDragEnter,At=zt.onExpand,Nt=zt.allowDrop,qt=zt.direction,on=He.props,gn=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 hr=(0,Ot.OM)(qe,Xn,He,kt,lt.dragStartMousePosition,Nt,Ve,Ke,Le,qt),dr=hr.dropPosition,fr=hr.dropLevelOffset,xr=hr.dropTargetKey,Hr=hr.dropContainerKey,Yr=hr.dropTargetPos,Or=hr.dropAllowed,bi=hr.dragOverNodeKey;if(dt.indexOf(xr)!==-1||!Or){lt.resetDragState();return}if(lt.delayedDragEnterLogic||(lt.delayedDragEnterLogic={}),Object.keys(lt.delayedDragEnterLogic).forEach(function(Jr){clearTimeout(lt.delayedDragEnterLogic[Jr])}),Xn.props.eventKey!==He.props.eventKey&&(qe.persist(),lt.delayedDragEnterLogic[gn]=window.setTimeout(function(){if(lt.state.draggingNodeKey!==null){var Jr=(0,je.Z)(Le),tt=(0,Ct.Z)(Ke,He.props.eventKey);tt&&(tt.children||[]).length&&(Jr=(0,Ot.L0)(Le,He.props.eventKey)),"expandedKeys"in lt.props||lt.setExpandedKeys(Jr),At==null||At(Jr,{node:(0,Oe.F)(He.props),expanded:!0,nativeEvent:qe.nativeEvent})}},800)),Xn.props.eventKey===xr&&fr===0){lt.resetDragState();return}lt.setState({dragOverNodeKey:bi,dropPosition:dr,dropLevelOffset:fr,dropTargetKey:xr,dropContainerKey:Hr,dropTargetPos:Yr,dropAllowed:Or}),Xt==null||Xt({event:qe,node:(0,Oe.F)(He.props),expandedKeys:Le})},lt.onNodeDragOver=function(qe,He){var De=lt.state,Le=De.dragChildrenKeys,Ke=De.flattenNodes,dt=De.keyEntities,Ve=De.expandedKeys,kt=De.indent,zt=lt.props,Xt=zt.onDragOver,At=zt.allowDrop,Nt=zt.direction,qt=(0,be.Z)(lt),on=qt.dragNode;if(on){var gn=(0,Ot.OM)(qe,on,He,kt,lt.dragStartMousePosition,At,Ke,dt,Ve,Nt),kn=gn.dropPosition,Kn=gn.dropLevelOffset,Xn=gn.dropTargetKey,hr=gn.dropContainerKey,dr=gn.dropAllowed,fr=gn.dropTargetPos,xr=gn.dragOverNodeKey;Le.indexOf(Xn)!==-1||!dr||(on.props.eventKey===Xn&&Kn===0?lt.state.dropPosition===null&<.state.dropLevelOffset===null&<.state.dropTargetKey===null&<.state.dropContainerKey===null&<.state.dropTargetPos===null&<.state.dropAllowed===!1&<.state.dragOverNodeKey===null||lt.resetDragState():kn===lt.state.dropPosition&&Kn===lt.state.dropLevelOffset&&Xn===lt.state.dropTargetKey&&hr===lt.state.dropContainerKey&&fr===lt.state.dropTargetPos&&dr===lt.state.dropAllowed&&xr===lt.state.dragOverNodeKey||lt.setState({dropPosition:kn,dropLevelOffset:Kn,dropTargetKey:Xn,dropContainerKey:hr,dropTargetPos:fr,dropAllowed:dr,dragOverNodeKey:xr}),Xt==null||Xt({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,Ke=lt.state,dt=Ke.dragChildrenKeys,Ve=Ke.dropPosition,kt=Ke.dropTargetKey,zt=Ke.dropTargetPos,Xt=Ke.dropAllowed;if(Xt){var At=lt.props.onDrop;if(lt.setState({dragOverNodeKey:null}),lt.cleanDragState(),kt!==null){var Nt=(0,_e.Z)((0,_e.Z)({},(0,Oe.H8)(kt,lt.getTreeNodeRequiredProps())),{},{active:((De=lt.getActiveItem())===null||De===void 0?void 0:De.key)===kt,data:(0,Ct.Z)(lt.state.keyEntities,kt).node}),qt=dt.indexOf(kt)!==-1;(0,z.ZP)(!qt,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var on=(0,Ot.yx)(zt),gn={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:Ve!==0,dropPosition:Ve+Number(on[on.length-1])};Le||At==null||At(gn),lt.dragNode=null}}},lt.cleanDragState=function(){var qe=lt.state.draggingNodeKey;qe!==null&<.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,Ke=De.flattenNodes,dt=He.expanded,Ve=He.key,kt=He.isLeaf;if(!(kt||qe.shiftKey||qe.metaKey||qe.ctrlKey)){var zt=Ke.filter(function(At){return At.key===Ve})[0],Xt=(0,Oe.F)((0,_e.Z)((0,_e.Z)({},(0,Oe.H8)(Ve,lt.getTreeNodeRequiredProps())),{},{data:zt.data}));lt.setExpandedKeys(dt?(0,Ot._5)(Le,Ve):(0,Ot.L0)(Le,Ve)),lt.onNodeExpand(qe,Xt)}},lt.onNodeClick=function(qe,He){var De=lt.props,Le=De.onClick,Ke=De.expandAction;Ke==="click"&<.triggerExpandActionExpand(qe,He),Le==null||Le(qe,He)},lt.onNodeDoubleClick=function(qe,He){var De=lt.props,Le=De.onDoubleClick,Ke=De.expandAction;Ke==="doubleClick"&<.triggerExpandActionExpand(qe,He),Le==null||Le(qe,He)},lt.onNodeSelect=function(qe,He){var De=lt.state.selectedKeys,Le=lt.state,Ke=Le.keyEntities,dt=Le.fieldNames,Ve=lt.props,kt=Ve.onSelect,zt=Ve.multiple,Xt=He.selected,At=He[dt.key],Nt=!Xt;Nt?zt?De=(0,Ot.L0)(De,At):De=[At]:De=(0,Ot._5)(De,At);var qt=De.map(function(on){var gn=(0,Ct.Z)(Ke,on);return gn?gn.node:null}).filter(function(on){return on});lt.setUncontrolledState({selectedKeys:De}),kt==null||kt(De,{event:"select",selected:Nt,node:He,selectedNodes:qt,nativeEvent:qe.nativeEvent})},lt.onNodeCheck=function(qe,He,De){var Le=lt.state,Ke=Le.keyEntities,dt=Le.checkedKeys,Ve=Le.halfCheckedKeys,kt=lt.props,zt=kt.checkStrictly,Xt=kt.onCheck,At=He.key,Nt,qt={event:"check",node:He,checked:De,nativeEvent:qe.nativeEvent};if(zt){var on=De?(0,Ot.L0)(dt,At):(0,Ot._5)(dt,At),gn=(0,Ot._5)(Ve,At);Nt={checked:on,halfChecked:gn},qt.checkedNodes=on.map(function(fr){return(0,Ct.Z)(Ke,fr)}).filter(function(fr){return fr}).map(function(fr){return fr.node}),lt.setUncontrolledState({checkedKeys:on})}else{var kn=(0,Vt.S)([].concat((0,je.Z)(dt),[At]),!0,Ke),Kn=kn.checkedKeys,Xn=kn.halfCheckedKeys;if(!De){var hr=new Set(Kn);hr.delete(At);var dr=(0,Vt.S)(Array.from(hr),{checked:!1,halfCheckedKeys:Xn},Ke);Kn=dr.checkedKeys,Xn=dr.halfCheckedKeys}Nt=Kn,qt.checkedNodes=[],qt.checkedNodesPositions=[],qt.halfCheckedKeys=Xn,Kn.forEach(function(fr){var xr=(0,Ct.Z)(Ke,fr);if(xr){var Hr=xr.node,Yr=xr.pos;qt.checkedNodes.push(Hr),qt.checkedNodesPositions.push({node:Hr,pos:Yr})}}),lt.setUncontrolledState({checkedKeys:Kn},!1,{halfCheckedKeys:Xn})}Xt==null||Xt(Nt,qt)},lt.onNodeLoad=function(qe){var He=qe.key,De=new Promise(function(Le,Ke){lt.setState(function(dt){var Ve=dt.loadedKeys,kt=Ve===void 0?[]:Ve,zt=dt.loadingKeys,Xt=zt===void 0?[]:zt,At=lt.props,Nt=At.loadData,qt=At.onLoad;if(!Nt||kt.indexOf(He)!==-1||Xt.indexOf(He)!==-1)return null;var on=Nt(qe);return on.then(function(){var gn=lt.state.loadedKeys,kn=(0,Ot.L0)(gn,He);qt==null||qt(kn,{event:"load",node:qe}),lt.setUncontrolledState({loadedKeys:kn}),lt.setState(function(Kn){return{loadingKeys:(0,Ot._5)(Kn.loadingKeys,He)}}),Le()}).catch(function(gn){if(lt.setState(function(Kn){return{loadingKeys:(0,Ot._5)(Kn.loadingKeys,He)}}),lt.loadingRetryTimes[He]=(lt.loadingRetryTimes[He]||0)+1,lt.loadingRetryTimes[He]>=mt){var kn=lt.state.loadedKeys;(0,z.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),lt.setUncontrolledState({loadedKeys:(0,Ot.L0)(kn,He)}),Le()}Ke(gn)}),{loadingKeys:(0,Ot.L0)(Xt,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,Ke=qe.loadingKeys,dt=qe.checkedKeys,Ve=qe.halfCheckedKeys,kt=qe.dragOverNodeKey,zt=qe.dropPosition,Xt=qe.keyEntities;return{expandedKeys:He||[],selectedKeys:De||[],loadedKeys:Le||[],loadingKeys:Ke||[],checkedKeys:dt||[],halfCheckedKeys:Ve||[],dragOverNodeKey:kt,dropPosition:zt,keyEntities:Xt}},lt.setExpandedKeys=function(qe){var He=lt.state,De=He.treeData,Le=He.fieldNames,Ke=(0,Oe.oH)(De,qe,Le);lt.setUncontrolledState({expandedKeys:qe,flattenNodes:Ke},!0)},lt.onNodeExpand=function(qe,He){var De=lt.state.expandedKeys,Le=lt.state,Ke=Le.listChanging,dt=Le.fieldNames,Ve=lt.props,kt=Ve.onExpand,zt=Ve.loadData,Xt=He.expanded,At=He[dt.key];if(!Ke){var Nt=De.indexOf(At),qt=!Xt;if((0,z.ZP)(Xt&&Nt!==-1||!Xt&&Nt===-1,"Expand state not sync with index check"),qt?De=(0,Ot.L0)(De,At):De=(0,Ot._5)(De,At),lt.setExpandedKeys(De),kt==null||kt(De,{node:He,expanded:qt,nativeEvent:qe.nativeEvent}),qt&&zt){var on=lt.onNodeLoad(He);on&&on.then(function(){var gn=(0,Oe.oH)(lt.state.treeData,De,dt);lt.setUncontrolledState({flattenNodes:gn})}).catch(function(){var gn=lt.state.expandedKeys,kn=(0,Ot._5)(gn,At);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&<.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 Ke=Le.key;return Ke===He})||null},lt.offsetActiveKey=function(qe){var He=lt.state,De=He.flattenNodes,Le=He.activeKey,Ke=De.findIndex(function(kt){var zt=kt.key;return zt===Le});Ke===-1&&qe<0&&(Ke=De.length),Ke=(Ke+qe+De.length)%De.length;var dt=De[Ke];if(dt){var Ve=dt.key;lt.onActiveChange(Ve)}else lt.onActiveChange(null)},lt.onKeyDown=function(qe){var He=lt.state,De=He.activeKey,Le=He.expandedKeys,Ke=He.checkedKeys,dt=He.fieldNames,Ve=lt.props,kt=Ve.onKeyDown,zt=Ve.checkable,Xt=Ve.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 At=lt.getActiveItem();if(At&&At.data){var Nt=lt.getTreeNodeRequiredProps(),qt=At.data.isLeaf===!1||!!(At.data[dt.children]||[]).length,on=(0,Oe.F)((0,_e.Z)((0,_e.Z)({},(0,Oe.H8)(De,Nt)),{},{data:At.data,active:!0}));switch(qe.which){case xe.Z.LEFT:{qt&&Le.includes(De)?lt.onNodeExpand({},on):At.parent&<.onActiveChange(At.parent.key),qe.preventDefault();break}case xe.Z.RIGHT:{qt&&!Le.includes(De)?lt.onNodeExpand({},on):At.children&&At.children.length&<.onActiveChange(At.children[0].key),qe.preventDefault();break}case xe.Z.ENTER:case xe.Z.SPACE:{zt&&!on.disabled&&on.checkable!==!1&&!on.disableCheckbox?lt.onNodeCheck({},on,!Ke.includes(De)):!zt&&Xt&&!on.disabled&&on.selectable!==!1&<.onNodeSelect({},on);break}}}kt==null||kt(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,Ke=!0,dt={};Object.keys(qe).forEach(function(Ve){if(Ve in lt.props){Ke=!1;return}Le=!0,dt[Ve]=qe[Ve]}),Le&&(!He||Ke)&<.setState((0,_e.Z)((0,_e.Z)({},dt),De))}},lt.scrollTo=function(qe){lt.listRef.current.scrollTo(qe)},lt}return(0,ce.Z)(St,[{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,Ue=this.state,We=Ue.focused,qe=Ue.flattenNodes,He=Ue.keyEntities,De=Ue.draggingNodeKey,Le=Ue.activeKey,Ke=Ue.dropLevelOffset,dt=Ue.dropContainerKey,Ve=Ue.dropTargetKey,kt=Ue.dropPosition,zt=Ue.dragOverNodeKey,Xt=Ue.indent,At=this.props,Nt=At.prefixCls,qt=At.className,on=At.style,gn=At.showLine,kn=At.focusable,Kn=At.tabIndex,Xn=Kn===void 0?0:Kn,hr=At.selectable,dr=At.showIcon,fr=At.icon,xr=At.switcherIcon,Hr=At.draggable,Yr=At.checkable,Or=At.checkStrictly,bi=At.disabled,Jr=At.motion,tt=At.loadData,li=At.filterTreeNode,Si=At.height,xi=At.itemHeight,lr=At.virtual,Ar=At.titleRender,Fr=At.dropIndicatorRender,Ii=At.onContextMenu,wr=At.onScroll,cn=At.direction,un=At.rootClassName,Dt=At.rootStyle,vn=(0,fe.Z)(this.props,{aria:!0,data:!0}),On;return Hr&&((0,ie.Z)(Hr)==="object"?On=Hr:typeof Hr=="function"?On={nodeDraggable:Hr}:On={}),ee.createElement(ae.k.Provider,{value:{prefixCls:Nt,selectable:hr,showIcon:dr,icon:fr,switcherIcon:xr,draggable:On,draggingNodeKey:De,checkable:Yr,checkStrictly:Or,disabled:bi,keyEntities:He,dropLevelOffset:Ke,dropContainerKey:dt,dropTargetKey:Ve,dropPosition:kt,dragOverNodeKey:zt,indent:Xt,direction:cn,dropIndicatorRender:Fr,loadData:tt,filterTreeNode:li,titleRender:Ar,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,qt,un,(Qe={},(0,xt.Z)(Qe,"".concat(Nt,"-show-line"),gn),(0,xt.Z)(Qe,"".concat(Nt,"-focused"),We),(0,xt.Z)(Qe,"".concat(Nt,"-active-focused"),Le!==null),Qe)),style:Dt},ee.createElement(It,(0,it.Z)({ref:this.listRef,prefixCls:Nt,style:on,data:qe,disabled:bi,selectable:hr,checkable:!!Yr,motion:Jr,dragging:De!==null,height:Si,itemHeight:xi,virtual:lr,focusable:kn,focused:We,tabIndex:Xn,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Ii,onScroll:wr},this.getTreeNodeRequiredProps(),vn))))}}],[{key:"getDerivedStateFromProps",value:function(Qe,Ue){var We=Ue.prevProps,qe={prevProps:Qe};function He(kn){return!We&&kn in Qe||We&&We[kn]!==Qe[kn]}var De,Le=Ue.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 Ke=(0,Oe.I8)(De,{fieldNames:Le});qe.keyEntities=(0,_e.Z)((0,xt.Z)({},et,wt),Ke.keyEntities)}var dt=qe.keyEntities||Ue.keyEntities;if(He("expandedKeys")||We&&He("autoExpandParent"))qe.expandedKeys=Qe.autoExpandParent||!We&&Qe.defaultExpandParent?(0,Ot.r7)(Qe.expandedKeys,dt):Qe.expandedKeys;else if(!We&&Qe.defaultExpandAll){var Ve=(0,_e.Z)({},dt);delete Ve[et],qe.expandedKeys=Object.keys(Ve).map(function(kn){return Ve[kn].key})}else!We&&Qe.defaultExpandedKeys&&(qe.expandedKeys=Qe.autoExpandParent||Qe.defaultExpandParent?(0,Ot.r7)(Qe.defaultExpandedKeys,dt):Qe.defaultExpandedKeys);if(qe.expandedKeys||delete qe.expandedKeys,De||qe.expandedKeys){var kt=(0,Oe.oH)(De||Ue.treeData,qe.expandedKeys||Ue.expandedKeys,Le);qe.flattenNodes=kt}if(Qe.selectable&&(He("selectedKeys")?qe.selectedKeys=(0,Ot.BT)(Qe.selectedKeys,Qe):!We&&Qe.defaultSelectedKeys&&(qe.selectedKeys=(0,Ot.BT)(Qe.defaultSelectedKeys,Qe))),Qe.checkable){var zt;if(He("checkedKeys")?zt=(0,Ot.E6)(Qe.checkedKeys)||{}:!We&&Qe.defaultCheckedKeys?zt=(0,Ot.E6)(Qe.defaultCheckedKeys)||{}:De&&(zt=(0,Ot.E6)(Qe.checkedKeys)||{checkedKeys:Ue.checkedKeys,halfCheckedKeys:Ue.halfCheckedKeys}),zt){var Xt=zt,At=Xt.checkedKeys,Nt=At===void 0?[]:At,qt=Xt.halfCheckedKeys,on=qt===void 0?[]:qt;if(!Qe.checkStrictly){var gn=(0,Vt.S)(Nt,!0,dt);Nt=gn.checkedKeys,on=gn.halfCheckedKeys}qe.checkedKeys=Nt,qe.halfCheckedKeys=on}}return He("loadedKeys")&&(qe.loadedKeys=Qe.loadedKeys),qe}}]),St}(ee.Component);nt.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},nt.TreeNode=ke.Z;var ft=nt,Xe=ft},35654:function(Pn,an,$e){"use strict";$e.d(an,{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 it=$e(80702),xt=$e(62853),ie=$e(48736),_e=$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 Ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Ne.forEach(function(Oe){var Fe=Oe.key,Re=Oe.children;Pe.push(Fe),ke(Re)})}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,Ne,Oe,Fe,Re,Ye){var ze,Ze=pe.clientX,at=pe.clientY,ht=pe.target.getBoundingClientRect(),pt=ht.top,Mt=ht.height,et=(Ye==="rtl"?-1:1)*(((ke==null?void 0:ke.x)||0)-Ze),ot=(et-12)/Ie,wt=(0,ve.Z)(Fe,Pe.props.eventKey);if(at<pt+Mt/2){var Et=Oe.findIndex(function(Xe){return Xe.key===wt.key}),Tt=Et<=0?0:Et-1,vt=Oe[Tt].key;wt=(0,ve.Z)(Fe,vt)}var gt=wt.key,yt=wt,It=wt.key,Ot=0,Vt=0;if(!Re.includes(gt))for(var Ct=0;Ct<ot&&xe(wt);Ct+=1)wt=wt.parent,Vt+=1;var mt=Ee.props.data,nt=wt.node,ft=!0;return fe(wt)&&wt.level===0&&at<pt+Mt/2&&Ne({dragNode:mt,dropNode:nt,dropPosition:-1})&&wt.key===Pe.props.eventKey?Ot=-1:(yt.children||[]).length&&Re.includes(It)?Ne({dragNode:mt,dropNode:nt,dropPosition:0})?Ot=0:ft=!1:Vt===0?ot>-1.5?Ne({dragNode:mt,dropNode:nt,dropPosition:1})?Ot=1:ft=!1:Ne({dragNode:mt,dropNode:nt,dropPosition:0})?Ot=0:Ne({dragNode:mt,dropNode:nt,dropPosition:1})?Ot=1:ft=!1:Ne({dragNode:mt,dropNode:nt,dropPosition:1})?Ot=1:ft=!1,{dropPosition:Ot,dropLevelOffset:Vt,dropTargetKey:wt.key,dropTargetPos:wt.pos,dragOverNodeKey:It,dropContainerKey:Ot===0?null:((ze=wt.parent)===null||ze===void 0?void 0:ze.key)||null,dropAllowed:ft}}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,Ne=Array.isArray(pe)?pe:[pe];return Ne.map(function(Oe){var Fe=Oe.children,Re=_objectWithoutProperties(Oe,be),Ye=re(Fe,Ee);return React.createElement(TreeNode,_extends({key:Re.key},ke(Re)),Ye)})}function le(pe){if(!pe)return null;var Ee;if(Array.isArray(pe))Ee={checkedKeys:pe,halfCheckedKeys:void 0};else if((0,xt.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 Ne=(0,ve.Z)(Ee,ke);if(Ne){Pe.add(ke);var Oe=Ne.parent,Fe=Ne.node;Fe.disabled||Oe&&Ie(Oe.key)}}}return(pe||[]).forEach(function(ke){Ie(ke)}),(0,it.Z)(Pe)}},90782:function(Pn,an,$e){"use strict";$e.d(an,{S:function(){return ce}});var it=$e(48736),xt=$e(67841);function ie(be,Ce){var ye=new Set;return be.forEach(function(we){Ce.has(we)||ye.add(we)}),ye}function _e(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,Ne=me.has(ke);Ee&&!Ne&&(Ee=!1),!Pe&&(Ne||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 Ne=ke.key,Oe=xe.has(Ne);Pe&&!Oe&&(Pe=!1),!Ie&&(Oe||fe.has(Ne))&&(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=_e;var fe=new Set(be.filter(function(re){var le=!!(0,xt.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,it.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(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return it}});function it(xt,ie){return xt[ie]}},71430:function(Pn,an,$e){"use strict";$e.d(an,{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 it=$e(62853),xt=$e(80702),ie=$e(77321),_e=$e(74416),je=$e(11592),ve=$e(2738),ce=$e(48736),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,Ne=Ee.children,Oe=Pe||"title";return{title:Oe,_title:Ie||[Oe],key:ke||"key",children:Ne||"children"}}function fe(pe,Ee){var Pe=new Map;function Ie(ke){var Ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(ke||[]).forEach(function(Oe){var Fe=Oe[Ee.key],Re=Oe[Ee.children];warning(Fe!=null,"Tree node must have a certain key: [".concat(Ne).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(Re,"".concat(Ne).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 Ne=ke.key,Oe=ke.props,Fe=Oe.children,Re=(0,_e.Z)(Oe,Ce),Ye=(0,ie.Z)({key:Ne},Re),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,Ne=Ie.key,Oe=Ie.children,Fe=new Set(Ee===!0?[]:Ee),Re=[];function Ye(ze){var Ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return ze.map(function(at,ht){for(var pt=ye(Ze?Ze.pos:"0",ht),Mt=me(at[Ne],pt),et,ot=0;ot<ke.length;ot+=1){var wt=ke[ot];if(at[wt]!==void 0){et=at[wt];break}}var Et=(0,ie.Z)((0,ie.Z)({},(0,ve.Z)(at,[].concat((0,xt.Z)(ke),[Ne,Oe]))),{},{title:et,key:Mt,parent:Ze,pos:pt,children:null,data:at,isStart:[].concat((0,xt.Z)(Ze?Ze.isStart:[]),[ht===0]),isEnd:[].concat((0,xt.Z)(Ze?Ze.isEnd:[]),[ht===ze.length-1])});return Re.push(Et),Ee===!0||Fe.has(Mt)?Et.children=Ye(at[Oe]||[],Et):Et.children=[],Et})}return Ye(pe),Re}function ae(pe,Ee,Pe){var Ie={};(0,it.Z)(Pe)==="object"?Ie=Pe:Ie={externalGetKey:Pe},Ie=Ie||{};var ke=Ie,Ne=ke.childrenPropName,Oe=ke.externalGetKey,Fe=ke.fieldNames,Re=xe(Fe),Ye=Re.key,ze=Re.children,Ze=Ne||ze,at;Oe?typeof Oe=="string"?at=function(Mt){return Mt[Oe]}:typeof Oe=="function"&&(at=function(Mt){return Oe(Mt)}):at=function(Mt,et){return me(Mt[Ye],et)};function ht(pt,Mt,et,ot){var wt=pt?pt[Ze]:pe,Et=pt?ye(et.pos,Mt):"0",Tt=pt?[].concat((0,xt.Z)(ot),[pt]):[];if(pt){var vt=at(pt,Et),gt={node:pt,index:Mt,pos:Et,key:vt,parentPos:et.node?et.pos:null,level:et.level+1,nodes:Tt};Ee(gt)}wt&&wt.forEach(function(yt,It){ht(yt,It,{node:pt,pos:Et,level:et?et.level+1:-1},Tt)})}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,Ne=Ee.externalGetKey,Oe=Ee.childrenPropName,Fe=Ee.fieldNames,Re=arguments.length>2?arguments[2]:void 0,Ye=Ne||Re,ze={},Ze={},at={posEntities:ze,keyEntities:Ze};return Pe&&(at=Pe(at)||at),ae(pe,function(ht){var pt=ht.node,Mt=ht.index,et=ht.pos,ot=ht.key,wt=ht.parentPos,Et=ht.level,Tt=ht.nodes,vt={node:pt,nodes:Tt,index:Mt,key:ot,pos:et,level:Et},gt=me(ot,et);ze[et]=vt,Ze[gt]=vt,vt.parent=ze[wt],vt.parent&&(vt.parent.children=vt.parent.children||[],vt.parent.children.push(vt)),Ie&&Ie(vt,at)},{externalGetKey:Ye,childrenPropName:Oe,fieldNames:Fe}),ke&&ke(at),at}function le(pe,Ee){var Pe=Ee.expandedKeys,Ie=Ee.selectedKeys,ke=Ee.loadedKeys,Ne=Ee.loadingKeys,Oe=Ee.checkedKeys,Fe=Ee.halfCheckedKeys,Re=Ee.dragOverNodeKey,Ye=Ee.dropPosition,ze=Ee.keyEntities,Ze=(0,be.Z)(ze,pe),at={eventKey:pe,expanded:Pe.indexOf(pe)!==-1,selected:Ie.indexOf(pe)!==-1,loaded:ke.indexOf(pe)!==-1,loading:Ne.indexOf(pe)!==-1,checked:Oe.indexOf(pe)!==-1,halfChecked:Fe.indexOf(pe)!==-1,pos:String(Ze?Ze.pos:""),dragOver:Re===pe&&Ye===0,dragOverGapTop:Re===pe&&Ye===-1,dragOverGapBottom:Re===pe&&Ye===1};return at}function ue(pe){var Ee=pe.data,Pe=pe.expanded,Ie=pe.selected,ke=pe.checked,Ne=pe.loaded,Oe=pe.loading,Fe=pe.halfChecked,Re=pe.dragOver,Ye=pe.dragOverGapTop,ze=pe.dragOverGapBottom,Ze=pe.pos,at=pe.active,ht=pe.eventKey,pt=(0,ie.Z)((0,ie.Z)({},Ee),{},{expanded:Pe,selected:Ie,checked:ke,loaded:Ne,loading:Oe,halfChecked:Fe,dragOver:Re,dragOverGapTop:Ye,dragOverGapBottom:ze,pos:Ze,active:at,key:ht});return"props"in pt||Object.defineProperty(pt,"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}}),pt}},8224:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return xt}});var it=$e(4676);function xt(ie,_e,je,ve){var ce=it.unstable_batchedUpdates?function(Ce){it.unstable_batchedUpdates(je,Ce)}:je;return ie!=null&&ie.addEventListener&&ie.addEventListener(_e,ce,ve),{remove:function(){ie!=null&&ie.removeEventListener&&ie.removeEventListener(_e,ce,ve)}}}},55468:function(Pn,an,$e){"use strict";$e.d(an,{g1:function(){return we},os:function(){return xe}});var it=/margin|padding|width|height|max|min|offset/,xt={left:!0,top:!0},ie={cssFloat:1,styleFloat:1,float:1};function _e(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 xt||(xt[z]=it.test(z)),xt[z]?parseFloat(ee)||0:ee}function ve(fe,z){var ee=arguments.length,ae=_e(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"&&it.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 _e(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)}}},24514:function(Pn,an,$e){"use strict";$e.d(an,{G:function(){return _e}});var it=$e(47273),xt=function(ve){if((0,it.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(!xt(ve))return!1;var be=document.createElement("div"),Ce=be.style[ve];return be.style[ve]=ce,be.style[ve]!==Ce};function _e(je,ve){return!Array.isArray(je)&&ve!==void 0?ie(je,ve):xt(je)}},45680:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return nt}});var it=$e(72308),xt=$e(62853),ie=$e(77321),_e=$e(49618),je=$e(52487),ve=$e(74416),ce=$e(92310),be=$e.n(ce),Ce=$e(29301),ye=$e(70425),we=$e(34280),me=$e(59301),xe=$e(4676),fe=me.forwardRef(function(ft,Xe){var ut=ft.height,bt=ft.offsetY,St=ft.offsetX,lt=ft.children,Qe=ft.prefixCls,Ue=ft.onInnerResize,We=ft.innerProps,qe=ft.rtl,He=ft.extra,De={},Le={display:"flex",flexDirection:"column"};return bt!==void 0&&(De={height:ut,position:"relative",overflow:"hidden"},Le=(0,ie.Z)((0,ie.Z)({},Le),{},(0,_e.Z)((0,_e.Z)((0,_e.Z)((0,_e.Z)((0,_e.Z)({transform:"translateY(".concat(bt,"px)")},qe?"marginRight":"marginLeft",-St),"position","absolute"),"left",0),"right",0),"top",0))),me.createElement("div",{style:De},me.createElement(Ce.Z,{onResize:function(dt){var Ve=dt.offsetHeight;Ve&&Ue&&Ue()}},me.createElement("div",(0,it.Z)({style:Le,className:be()((0,_e.Z)({},"".concat(Qe,"-holder-inner"),Qe)),ref:Xe},We),lt,He)))});fe.displayName="Filler";var z=fe;function ee(ft){var Xe=ft.children,ut=ft.setRef,bt=me.useCallback(function(St){ut(St)},[]);return me.cloneElement(Xe,{ref:bt})}function ae(ft,Xe,ut,bt,St,lt,Qe,Ue){var We=Ue.getKey;return ft.slice(Xe,ut+1).map(function(qe,He){var De=Xe+He,Le=Qe(qe,De,{style:{width:bt},offsetX:St}),Ke=We(qe);return me.createElement(ee,{key:Ke,setRef:function(Ve){return lt(qe,Ve)}},Le)})}function re(ft,Xe,ut,bt){var St=ut-ft,lt=Xe-ut,Qe=Math.min(St,lt)*2;if(bt<=Qe){var Ue=Math.floor(bt/2);return bt%2?ut+Ue+1:ut-Ue}return St>lt?ut-(bt-lt):ut+(bt-St)}function le(ft,Xe,ut){var bt=ft.length,St=Xe.length,lt,Qe;if(bt===0&&St===0)return null;bt<St?(lt=ft,Qe=Xe):(lt=Xe,Qe=ft);var Ue={__EMPTY_ITEM__:!0};function We(dt){return dt!==void 0?ut(dt):Ue}for(var qe=null,He=Math.abs(bt-St)!==1,De=0;De<Qe.length;De+=1){var Le=We(lt[De]),Ke=We(Qe[De]);if(Le!==Ke){qe=De,He=He||Le!==We(Qe[De+1]);break}}return qe===null?null:{index:qe,multiple:He}}function ue(ft,Xe,ut){var bt=me.useState(ft),St=(0,je.Z)(bt,2),lt=St[0],Qe=St[1],Ue=me.useState(null),We=(0,je.Z)(Ue,2),qe=We[0],He=We[1];return me.useEffect(function(){var De=le(lt||[],ft||[],Xe);(De==null?void 0:De.index)!==void 0&&(ut==null||ut(De.index),He(ft[De.index])),Qe(ft)},[ft]),[qe]}var pe=$e(16089),Ee=(typeof navigator=="undefined"?"undefined":(0,xt.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Pe=Ee,Ie=function(ft,Xe,ut,bt){var St=(0,me.useRef)(!1),lt=(0,me.useRef)(null);function Qe(){clearTimeout(lt.current),St.current=!0,lt.current=setTimeout(function(){St.current=!1},50)}var Ue=(0,me.useRef)({top:ft,bottom:Xe,left:ut,right:bt});return Ue.current.top=ft,Ue.current.bottom=Xe,Ue.current.left=ut,Ue.current.right=bt,function(We,qe){var He=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,De=We?qe<0&&Ue.current.left||qe>0&&Ue.current.right:qe<0&&Ue.current.top||qe>0&&Ue.current.bottom;return He&&De?(clearTimeout(lt.current),St.current=!1):(!De||St.current)&&Qe(),!St.current&&De}};function ke(ft,Xe,ut,bt,St,lt,Qe){var Ue=(0,me.useRef)(0),We=(0,me.useRef)(null),qe=(0,me.useRef)(null),He=(0,me.useRef)(!1),De=Ie(Xe,ut,bt,St);function Le(Xt,At){if(pe.Z.cancel(We.current),!De(!1,At)){var Nt=Xt;if(!Nt._virtualHandled)Nt._virtualHandled=!0;else return;Ue.current+=At,qe.current=At,Pe||Nt.preventDefault(),We.current=(0,pe.Z)(function(){var qt=He.current?10:1;Qe(Ue.current*qt,!1),Ue.current=0})}}function Ke(Xt,At){Qe(At,!0),Pe||Xt.preventDefault()}var dt=(0,me.useRef)(null),Ve=(0,me.useRef)(null);function kt(Xt){if(ft){pe.Z.cancel(Ve.current),Ve.current=(0,pe.Z)(function(){dt.current=null},2);var At=Xt.deltaX,Nt=Xt.deltaY,qt=Xt.shiftKey,on=At,gn=Nt;(dt.current==="sx"||!dt.current&&qt&&Nt&&!At)&&(on=Nt,gn=0,dt.current="sx");var kn=Math.abs(on),Kn=Math.abs(gn);dt.current===null&&(dt.current=lt&&kn>Kn?"x":"y"),dt.current==="y"?Le(Xt,gn):Ke(Xt,on)}}function zt(Xt){ft&&(He.current=Xt.detail===qe.current)}return[kt,zt]}function Ne(ft,Xe,ut,bt){var St=me.useMemo(function(){return[new Map,[]]},[ft,ut.id,bt]),lt=(0,je.Z)(St,2),Qe=lt[0],Ue=lt[1],We=function(He){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:He,Le=Qe.get(He),Ke=Qe.get(De);if(Le===void 0||Ke===void 0)for(var dt=ft.length,Ve=Ue.length;Ve<dt;Ve+=1){var kt,zt=ft[Ve],Xt=Xe(zt);Qe.set(Xt,Ve);var At=(kt=ut.get(Xt))!==null&&kt!==void 0?kt:bt;if(Ue[Ve]=(Ue[Ve-1]||0)+At,Xt===He&&(Le=Ve),Xt===De&&(Ke=Ve),Le!==void 0&&Ke!==void 0)break}return{top:Ue[Le-1]||0,bottom:Ue[Ke]}};return We}var Oe=$e(96949),Fe=$e(55090),Re=function(){function ft(){(0,Oe.Z)(this,ft),(0,_e.Z)(this,"maps",void 0),(0,_e.Z)(this,"id",0),(0,_e.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,Fe.Z)(ft,[{key:"set",value:function(ut,bt){this.maps[ut]=bt,this.id+=1,this.diffKeys.add(ut)}},{key:"get",value:function(ut){return this.maps[ut]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),ft}(),Ye=Re;function ze(ft){var Xe=parseFloat(ft);return isNaN(Xe)?0:Xe}function Ze(ft,Xe,ut){var bt=me.useState(0),St=(0,je.Z)(bt,2),lt=St[0],Qe=St[1],Ue=(0,me.useRef)(new Map),We=(0,me.useRef)(new Ye),qe=(0,me.useRef)(0);function He(){qe.current+=1}function De(){var Ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;He();var dt=function(){var zt=!1;Ue.current.forEach(function(Xt,At){if(Xt&&Xt.offsetParent){var Nt=Xt.offsetHeight,qt=getComputedStyle(Xt),on=qt.marginTop,gn=qt.marginBottom,kn=ze(on),Kn=ze(gn),Xn=Nt+kn+Kn;We.current.get(At)!==Xn&&(We.current.set(At,Xn),zt=!0)}}),zt&&Qe(function(Xt){return Xt+1})};if(Ke)dt();else{qe.current+=1;var Ve=qe.current;Promise.resolve().then(function(){Ve===qe.current&&dt()})}}function Le(Ke,dt){var Ve=ft(Ke),kt=Ue.current.get(Ve);dt?(Ue.current.set(Ve,dt),De()):Ue.current.delete(Ve),!kt!=!dt&&(dt?Xe==null||Xe(Ke):ut==null||ut(Ke))}return(0,me.useEffect)(function(){return He},[]),[Le,De,We.current,lt]}var at=14/15;function ht(ft,Xe,ut){var bt=(0,me.useRef)(!1),St=(0,me.useRef)(0),lt=(0,me.useRef)(0),Qe=(0,me.useRef)(null),Ue=(0,me.useRef)(null),We,qe=function(Ke){if(bt.current){var dt=Math.ceil(Ke.touches[0].pageX),Ve=Math.ceil(Ke.touches[0].pageY),kt=St.current-dt,zt=lt.current-Ve,Xt=Math.abs(kt)>Math.abs(zt);Xt?St.current=dt:lt.current=Ve;var At=ut(Xt,Xt?kt:zt,!1,Ke);At&&Ke.preventDefault(),clearInterval(Ue.current),At&&(Ue.current=setInterval(function(){Xt?kt*=at:zt*=at;var Nt=Math.floor(Xt?kt:zt);(!ut(Xt,Nt,!0)||Math.abs(Nt)<=.1)&&clearInterval(Ue.current)},16))}},He=function(){bt.current=!1,We()},De=function(Ke){We(),Ke.touches.length===1&&!bt.current&&(bt.current=!0,St.current=Math.ceil(Ke.touches[0].pageX),lt.current=Math.ceil(Ke.touches[0].pageY),Qe.current=Ke.target,Qe.current.addEventListener("touchmove",qe,{passive:!1}),Qe.current.addEventListener("touchend",He,{passive:!0}))};We=function(){Qe.current&&(Qe.current.removeEventListener("touchmove",qe),Qe.current.removeEventListener("touchend",He))},(0,we.Z)(function(){return ft&&Xe.current.addEventListener("touchstart",De,{passive:!0}),function(){var Le;(Le=Xe.current)===null||Le===void 0||Le.removeEventListener("touchstart",De),We(),clearInterval(Ue.current)}},[ft])}function pt(ft){return Math.floor(Math.pow(ft,.5))}function Mt(ft,Xe){var ut="touches"in ft?ft.touches[0]:ft;return ut[Xe?"pageX":"pageY"]-window[Xe?"scrollX":"scrollY"]}function et(ft,Xe,ut){me.useEffect(function(){var bt=Xe.current;if(ft&&bt){var St=!1,lt,Qe,Ue=function(){pe.Z.cancel(lt)},We=function Le(){Ue(),lt=(0,pe.Z)(function(){ut(Qe),Le()})},qe=function(Ke){if(!(Ke.target.draggable||Ke.button!==0)){var dt=Ke;dt._virtualHandled||(dt._virtualHandled=!0,St=!0)}},He=function(){St=!1,Ue()},De=function(Ke){if(St){var dt=Mt(Ke,!1),Ve=bt.getBoundingClientRect(),kt=Ve.top,zt=Ve.bottom;if(dt<=kt){var Xt=kt-dt;Qe=-pt(Xt),We()}else if(dt>=zt){var At=dt-zt;Qe=pt(At),We()}else Ue()}};return bt.addEventListener("mousedown",qe),bt.ownerDocument.addEventListener("mouseup",He),bt.ownerDocument.addEventListener("mousemove",De),function(){bt.removeEventListener("mousedown",qe),bt.ownerDocument.removeEventListener("mouseup",He),bt.ownerDocument.removeEventListener("mousemove",De),Ue()}}},[ft])}var ot=10;function wt(ft,Xe,ut,bt,St,lt,Qe,Ue){var We=me.useRef(),qe=me.useState(null),He=(0,je.Z)(qe,2),De=He[0],Le=He[1];return(0,we.Z)(function(){if(De&&De.times<ot){if(!ft.current){Le(function(Jr){return(0,ie.Z)({},Jr)});return}lt();var Ke=De.targetAlign,dt=De.originAlign,Ve=De.index,kt=De.offset,zt=ft.current.clientHeight,Xt=!1,At=Ke,Nt=null;if(zt){for(var qt=Ke||dt,on=0,gn=0,kn=0,Kn=Math.min(Xe.length-1,Ve),Xn=0;Xn<=Kn;Xn+=1){var hr=St(Xe[Xn]);gn=on;var dr=ut.get(hr);kn=gn+(dr===void 0?bt:dr),on=kn}for(var fr=qt==="top"?kt:zt-kt,xr=Kn;xr>=0;xr-=1){var Hr=St(Xe[xr]),Yr=ut.get(Hr);if(Yr===void 0){Xt=!0;break}if(fr-=Yr,fr<=0)break}switch(qt){case"top":Nt=gn-kt;break;case"bottom":Nt=kn-zt+kt;break;default:{var Or=ft.current.scrollTop,bi=Or+zt;gn<Or?At="top":kn>bi&&(At="bottom")}}Nt!==null&&Qe(Nt),Nt!==De.lastTop&&(Xt=!0)}Xt&&Le((0,ie.Z)((0,ie.Z)({},De),{},{times:De.times+1,targetAlign:At,lastTop:Nt}))}},[De,ft.current]),function(Ke){if(Ke==null){Ue();return}if(pe.Z.cancel(We.current),typeof Ke=="number")Qe(Ke);else if(Ke&&(0,xt.Z)(Ke)==="object"){var dt,Ve=Ke.align;"index"in Ke?dt=Ke.index:dt=Xe.findIndex(function(Xt){return St(Xt)===Ke.key});var kt=Ke.offset,zt=kt===void 0?0:kt;Le({times:0,index:dt,offset:zt,originAlign:Ve})}}}var Et=me.forwardRef(function(ft,Xe){var ut=ft.prefixCls,bt=ft.rtl,St=ft.scrollOffset,lt=ft.scrollRange,Qe=ft.onStartMove,Ue=ft.onStopMove,We=ft.onScroll,qe=ft.horizontal,He=ft.spinSize,De=ft.containerSize,Le=ft.style,Ke=ft.thumbStyle,dt=ft.showScrollBar,Ve=me.useState(!1),kt=(0,je.Z)(Ve,2),zt=kt[0],Xt=kt[1],At=me.useState(null),Nt=(0,je.Z)(At,2),qt=Nt[0],on=Nt[1],gn=me.useState(null),kn=(0,je.Z)(gn,2),Kn=kn[0],Xn=kn[1],hr=!bt,dr=me.useRef(),fr=me.useRef(),xr=me.useState(dt),Hr=(0,je.Z)(xr,2),Yr=Hr[0],Or=Hr[1],bi=me.useRef(),Jr=function(){dt===!0||dt===!1||(clearTimeout(bi.current),Or(!0),bi.current=setTimeout(function(){Or(!1)},3e3))},tt=lt-De||0,li=De-He||0,Si=me.useMemo(function(){if(St===0||tt===0)return 0;var Dt=St/tt;return Dt*li},[St,tt,li]),xi=function(vn){vn.stopPropagation(),vn.preventDefault()},lr=me.useRef({top:Si,dragging:zt,pageY:qt,startTop:Kn});lr.current={top:Si,dragging:zt,pageY:qt,startTop:Kn};var Ar=function(vn){Xt(!0),on(Mt(vn,qe)),Xn(lr.current.top),Qe(),vn.stopPropagation(),vn.preventDefault()};me.useEffect(function(){var Dt=function(Ut){Ut.preventDefault()},vn=dr.current,On=fr.current;return vn.addEventListener("touchstart",Dt,{passive:!1}),On.addEventListener("touchstart",Ar,{passive:!1}),function(){vn.removeEventListener("touchstart",Dt),On.removeEventListener("touchstart",Ar)}},[]);var Fr=me.useRef();Fr.current=tt;var Ii=me.useRef();Ii.current=li,me.useEffect(function(){if(zt){var Dt,vn=function(Ut){var wn=lr.current,_n=wn.dragging,Qn=wn.pageY,Jn=wn.startTop;pe.Z.cancel(Dt);var Wt=dr.current.getBoundingClientRect(),In=De/(qe?Wt.width:Wt.height);if(_n){var Wn=(Mt(Ut,qe)-Qn)*In,ar=Jn;!hr&&qe?ar-=Wn:ar+=Wn;var mn=Fr.current,Cn=Ii.current,tn=Cn?ar/Cn:0,fn=Math.ceil(tn*mn);fn=Math.max(fn,0),fn=Math.min(fn,mn),Dt=(0,pe.Z)(function(){We(fn,qe)})}},On=function(){Xt(!1),Ue()};return window.addEventListener("mousemove",vn,{passive:!0}),window.addEventListener("touchmove",vn,{passive:!0}),window.addEventListener("mouseup",On,{passive:!0}),window.addEventListener("touchend",On,{passive:!0}),function(){window.removeEventListener("mousemove",vn),window.removeEventListener("touchmove",vn),window.removeEventListener("mouseup",On),window.removeEventListener("touchend",On),pe.Z.cancel(Dt)}}},[zt]),me.useEffect(function(){return Jr(),function(){clearTimeout(bi.current)}},[St]),me.useImperativeHandle(Xe,function(){return{delayHidden:Jr}});var wr="".concat(ut,"-scrollbar"),cn={position:"absolute",visibility:Yr?null:"hidden"},un={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return qe?(cn.height=8,cn.left=0,cn.right=0,cn.bottom=0,un.height="100%",un.width=He,hr?un.left=Si:un.right=Si):(cn.width=8,cn.top=0,cn.bottom=0,hr?cn.right=0:cn.left=0,un.width="100%",un.height=He,un.top=Si),me.createElement("div",{ref:dr,className:be()(wr,(0,_e.Z)((0,_e.Z)((0,_e.Z)({},"".concat(wr,"-horizontal"),qe),"".concat(wr,"-vertical"),!qe),"".concat(wr,"-visible"),Yr)),style:(0,ie.Z)((0,ie.Z)({},cn),Le),onMouseDown:xi,onMouseMove:Jr},me.createElement("div",{ref:fr,className:be()("".concat(wr,"-thumb"),(0,_e.Z)({},"".concat(wr,"-thumb-moving"),zt)),style:(0,ie.Z)((0,ie.Z)({},un),Ke),onMouseDown:Ar}))}),Tt=Et,vt=20;function gt(){var ft=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,ut=ft/Xe*ft;return isNaN(ut)&&(ut=0),ut=Math.max(ut,vt),Math.floor(ut)}var yt=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],It=[],Ot={overflowY:"auto",overflowAnchor:"none"};function Vt(ft,Xe){var ut=ft.prefixCls,bt=ut===void 0?"rc-virtual-list":ut,St=ft.className,lt=ft.height,Qe=ft.itemHeight,Ue=ft.fullHeight,We=Ue===void 0?!0:Ue,qe=ft.style,He=ft.data,De=ft.children,Le=ft.itemKey,Ke=ft.virtual,dt=ft.direction,Ve=ft.scrollWidth,kt=ft.component,zt=kt===void 0?"div":kt,Xt=ft.onScroll,At=ft.onVirtualScroll,Nt=ft.onVisibleChange,qt=ft.innerProps,on=ft.extraRender,gn=ft.styles,kn=ft.showScrollBar,Kn=kn===void 0?"optional":kn,Xn=(0,ve.Z)(ft,yt),hr=me.useCallback(function(_r){return typeof Le=="function"?Le(_r):_r==null?void 0:_r[Le]},[Le]),dr=Ze(hr,null,null),fr=(0,je.Z)(dr,4),xr=fr[0],Hr=fr[1],Yr=fr[2],Or=fr[3],bi=!!(Ke!==!1&<&&Qe),Jr=me.useMemo(function(){return Object.values(Yr.maps).reduce(function(_r,Kr){return _r+Kr},0)},[Yr.id,Yr.maps]),tt=bi&&He&&(Math.max(Qe*He.length,Jr)>lt||!!Ve),li=dt==="rtl",Si=be()(bt,(0,_e.Z)({},"".concat(bt,"-rtl"),li),St),xi=He||It,lr=(0,me.useRef)(),Ar=(0,me.useRef)(),Fr=(0,me.useRef)(),Ii=(0,me.useState)(0),wr=(0,je.Z)(Ii,2),cn=wr[0],un=wr[1],Dt=(0,me.useState)(0),vn=(0,je.Z)(Dt,2),On=vn[0],Jt=vn[1],Ut=(0,me.useState)(!1),wn=(0,je.Z)(Ut,2),_n=wn[0],Qn=wn[1],Jn=function(){Qn(!0)},Wt=function(){Qn(!1)},In={getKey:hr};function Wn(_r){un(function(Kr){var Pi;typeof _r=="function"?Pi=_r(Kr):Pi=_r;var gi=Dr(Pi);return lr.current.scrollTop=gi,gi})}var ar=(0,me.useRef)({start:0,end:xi.length}),mn=(0,me.useRef)(),Cn=ue(xi,hr),tn=(0,je.Z)(Cn,1),fn=tn[0];mn.current=fn;var En=me.useMemo(function(){if(!bi)return{scrollHeight:void 0,start:0,end:xi.length-1,offset:void 0};if(!tt){var _r;return{scrollHeight:((_r=Ar.current)===null||_r===void 0?void 0:_r.offsetHeight)||0,start:0,end:xi.length-1,offset:void 0}}for(var Kr=0,Pi,gi,Vi,io=xi.length,Gr=0;Gr<io;Gr+=1){var Tr=xi[Gr],Vn=hr(Tr),ai=Yr.get(Vn),Qi=Kr+(ai===void 0?Qe:ai);Qi>=cn&&Pi===void 0&&(Pi=Gr,gi=Kr),Qi>cn+lt&&Vi===void 0&&(Vi=Gr),Kr=Qi}return Pi===void 0&&(Pi=0,gi=0,Vi=Math.ceil(lt/Qe)),Vi===void 0&&(Vi=xi.length-1),Vi=Math.min(Vi+1,xi.length-1),{scrollHeight:Kr,start:Pi,end:Vi,offset:gi}},[tt,bi,cn,xi,Or,lt]),pn=En.scrollHeight,Ln=En.start,Mn=En.end,Gn=En.offset;ar.current.start=Ln,ar.current.end=Mn,me.useLayoutEffect(function(){var _r=Yr.getRecord();if(_r.size===1){var Kr=Array.from(_r)[0],Pi=xi[Ln];if(Pi){var gi=hr(Pi);if(gi===Kr){var Vi=Yr.get(Kr),io=Vi-Qe;Wn(function(Gr){return Gr+io})}}}Yr.resetRecord()},[pn]);var An=me.useState({width:0,height:lt}),sr=(0,je.Z)(An,2),hn=sr[0],Nr=sr[1],Zr=function(Kr){Nr({width:Kr.offsetWidth,height:Kr.offsetHeight})},hi=(0,me.useRef)(),yn=(0,me.useRef)(),Yn=me.useMemo(function(){return gt(hn.width,Ve)},[hn.width,Ve]),ir=me.useMemo(function(){return gt(hn.height,pn)},[hn.height,pn]),vr=pn-lt,yr=(0,me.useRef)(vr);yr.current=vr;function Dr(_r){var Kr=_r;return Number.isNaN(yr.current)||(Kr=Math.min(Kr,yr.current)),Kr=Math.max(Kr,0),Kr}var ii=cn<=0,Br=cn>=vr,Cr=On<=0,oi=On>=Ve,Tn=Ie(ii,Br,Cr,oi),Ri=function(){return{x:li?-On:On,y:cn}},Nn=(0,me.useRef)(Ri()),fi=(0,ye.useEvent)(function(_r){if(At){var Kr=(0,ie.Z)((0,ie.Z)({},Ri()),_r);(Nn.current.x!==Kr.x||Nn.current.y!==Kr.y)&&(At(Kr),Nn.current=Kr)}});function xo(_r,Kr){var Pi=_r;Kr?((0,xe.flushSync)(function(){Jt(Pi)}),fi()):Wn(Pi)}function zi(_r){var Kr=_r.currentTarget.scrollTop;Kr!==cn&&Wn(Kr),Xt==null||Xt(_r),fi()}var Lo=function(Kr){var Pi=Kr,gi=Ve?Ve-hn.width:0;return Pi=Math.max(Pi,0),Pi=Math.min(Pi,gi),Pi},yo=(0,ye.useEvent)(function(_r,Kr){Kr?((0,xe.flushSync)(function(){Jt(function(Pi){var gi=Pi+(li?-_r:_r);return Lo(gi)})}),fi()):Wn(function(Pi){var gi=Pi+_r;return gi})}),Ur=ke(bi,ii,Br,Cr,oi,!!Ve,yo),$r=(0,je.Z)(Ur,2),Ti=$r[0],Hi=$r[1];ht(bi,lr,function(_r,Kr,Pi,gi){var Vi=gi;return Tn(_r,Kr,Pi)?!1:!Vi||!Vi._virtualHandled?(Vi&&(Vi._virtualHandled=!0),Ti({preventDefault:function(){},deltaX:_r?Kr:0,deltaY:_r?0:Kr}),!0):!1}),et(tt,lr,function(_r){Wn(function(Kr){return Kr+_r})}),(0,we.Z)(function(){function _r(Pi){var gi=ii&&Pi.detail<0,Vi=Br&&Pi.detail>0;bi&&!gi&&!Vi&&Pi.preventDefault()}var Kr=lr.current;return Kr.addEventListener("wheel",Ti,{passive:!1}),Kr.addEventListener("DOMMouseScroll",Hi,{passive:!0}),Kr.addEventListener("MozMousePixelScroll",_r,{passive:!1}),function(){Kr.removeEventListener("wheel",Ti),Kr.removeEventListener("DOMMouseScroll",Hi),Kr.removeEventListener("MozMousePixelScroll",_r)}},[bi,ii,Br]),(0,we.Z)(function(){if(Ve){var _r=Lo(On);Jt(_r),fi({x:_r})}},[hn.width,Ve]);var cr=function(){var Kr,Pi;(Kr=hi.current)===null||Kr===void 0||Kr.delayHidden(),(Pi=yn.current)===null||Pi===void 0||Pi.delayHidden()},jt=wt(lr,xi,Yr,Qe,hr,function(){return Hr(!0)},Wn,cr);me.useImperativeHandle(Xe,function(){return{nativeElement:Fr.current,getScrollInfo:Ri,scrollTo:function(Kr){function Pi(gi){return gi&&(0,xt.Z)(gi)==="object"&&("left"in gi||"top"in gi)}Pi(Kr)?(Kr.left!==void 0&&Jt(Lo(Kr.left)),jt(Kr.top)):jt(Kr)}}}),(0,we.Z)(function(){if(Nt){var _r=xi.slice(Ln,Mn+1);Nt(_r,xi)}},[Ln,Mn,xi]);var ji=Ne(xi,hr,Yr,Qe),Rr=on==null?void 0:on({start:Ln,end:Mn,virtual:tt,offsetX:On,offsetY:Gn,rtl:li,getSize:ji}),jr=ae(xi,Ln,Mn,Ve,On,xr,De,In),_i=null;lt&&(_i=(0,ie.Z)((0,_e.Z)({},We?"height":"maxHeight",lt),Ot),bi&&(_i.overflowY="hidden",Ve&&(_i.overflowX="hidden"),_n&&(_i.pointerEvents="none")));var Ji={};return li&&(Ji.dir="rtl"),me.createElement("div",(0,it.Z)({ref:Fr,style:(0,ie.Z)((0,ie.Z)({},qe),{},{position:"relative"}),className:Si},Ji,Xn),me.createElement(Ce.Z,{onResize:Zr},me.createElement(zt,{className:"".concat(bt,"-holder"),style:_i,ref:lr,onScroll:zi,onMouseEnter:cr},me.createElement(z,{prefixCls:bt,height:pn,offsetX:On,offsetY:Gn,scrollWidth:Ve,onInnerResize:Hr,ref:Ar,innerProps:qt,rtl:li,extra:Rr},jr))),tt&&pn>lt&&me.createElement(Tt,{ref:hi,prefixCls:bt,scrollOffset:cn,scrollRange:pn,rtl:li,onScroll:xo,onStartMove:Jn,onStopMove:Wt,spinSize:ir,containerSize:hn.height,style:gn==null?void 0:gn.verticalScrollBar,thumbStyle:gn==null?void 0:gn.verticalScrollBarThumb,showScrollBar:Kn}),tt&&Ve>hn.width&&me.createElement(Tt,{ref:yn,prefixCls:bt,scrollOffset:On,scrollRange:Ve,rtl:li,onScroll:xo,onStartMove:Jn,onStopMove:Wt,spinSize:Yn,containerSize:hn.width,horizontal:!0,style:gn==null?void 0:gn.horizontalScrollBar,thumbStyle:gn==null?void 0:gn.horizontalScrollBarThumb,showScrollBar:Kn}))}var Ct=me.forwardRef(Vt);Ct.displayName="List";var mt=Ct,nt=mt},7062:function(Pn,an,$e){var it=$e(19637),xt=$e(97573),ie=[$e(96627)];Pn.exports=it.createStore(xt,ie)},96627:function(Pn,an,$e){Pn.exports=it;function it(){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(Pn){return Pn<10?"0"+Pn:Pn}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote(Pn){return rx_escapable.lastIndex=0,rx_escapable.test(Pn)?'"'+Pn.replace(rx_escapable,function(an){var $e=meta[an];return typeof $e=="string"?$e:"\\u"+("0000"+an.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+Pn+'"'}function str(Pn,an){var $e,it,xt,ie,_e=gap,je,ve=an[Pn];switch(ve&&typeof ve=="object"&&typeof ve.toJSON=="function"&&(ve=ve.toJSON(Pn)),typeof rep=="function"&&(ve=rep.call(an,Pn,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 xt=je.length===0?"[]":gap?`[
|
|
|
`+gap+je.join(`,
|
|
|
`+gap)+`
|
|
|
`+_e+"]":"["+je.join(",")+"]",gap=_e,xt}if(rep&&typeof rep=="object")for(ie=rep.length,$e=0;$e<ie;$e+=1)typeof rep[$e]=="string"&&(it=rep[$e],xt=str(it,ve),xt&&je.push(quote(it)+(gap?": ":":")+xt));else for(it in ve)Object.prototype.hasOwnProperty.call(ve,it)&&(xt=str(it,ve),xt&&je.push(quote(it)+(gap?": ":":")+xt));return xt=je.length===0?"{}":gap?`{
|
|
|
`+gap+je.join(`,
|
|
|
`+gap)+`
|
|
|
`+_e+"}":"{"+je.join(",")+"}",gap=_e,xt}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(Pn,an,$e){var it;if(gap="",indent="",typeof $e=="number")for(it=0;it<$e;it+=1)indent+=" ";else typeof $e=="string"&&(indent=$e);if(rep=an,an&&typeof an!="function"&&(typeof an!="object"||typeof an.length!="number"))throw new Error("JSON.stringify");return str("",{"":Pn})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(Pn,an){var $e,it,xt=Pn[an];if(xt&&typeof xt=="object")for($e in xt)Object.prototype.hasOwnProperty.call(xt,$e)&&(it=walk(xt,$e),it!==void 0?xt[$e]=it:delete xt[$e]);return reviver.call(Pn,an,xt)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(Pn){return"\\u"+("0000"+Pn.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},19637:function(Pn,an,$e){var it=$e(67039),xt=it.slice,ie=it.pluck,_e=it.each,je=it.bind,ve=it.create,ce=it.isList,be=it.isFunction,Ce=it.isObject;Pn.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=xt(arguments,0),Ne=this;function Oe(){if(Pe)return _e(arguments,function(Re,Ye){ke[Ye]=Re}),Pe.apply(Ne,ke)}var Fe=[Oe].concat(ke);return pe.apply(Ne,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)){_e(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");_e(Ie,function(ke,Ne){if(!be(ke))throw new Error("Bad plugin property: "+Ne+" from plugin "+pe.name+". Plugins should only return functions.");Ee._assignPluginFnProp(ke,Ne)})}},addStorage:function(pe){we("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(pe)}},ue=ve(le,ye,{plugins:[]});return ue.raw={},_e(ue,function(pe,Ee){be(pe)&&(ue.raw[Ee]=je(ue,pe))}),_e(xe,function(pe){ue._addStorage(pe)}),_e(fe,function(pe){ue._addPlugin(pe)}),ue}},67039:function(Pn,an,$e){var it=je(),xt=ve(),ie=ce(),_e=typeof window!="undefined"?window:$e.g;Pn.exports={assign:it,create:xt,trim:ie,bind:be,slice:Ce,each:ye,map:we,pluck:me,isList:xe,isFunction:fe,isObject:z,Global:_e};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 it.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,it.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(Pn,an,$e){Pn.exports=[$e(52496),$e(16436),$e(76673),$e(35701),$e(65578),$e(65300)]},35701:function(Pn,an,$e){var it=$e(67039),xt=it.Global,ie=it.trim;Pn.exports={name:"cookieStorage",read:je,write:ce,each:ve,remove:be,clearAll:Ce};var _e=xt.document;function je(we){if(!we||!ye(we))return null;var me="(?:^|.*;\\s*)"+escape(we).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(_e.cookie.replace(new RegExp(me),"$1"))}function ve(we){for(var me=_e.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&&(_e.cookie=escape(we)+"="+escape(me)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")}function be(we){!we||!ye(we)||(_e.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(_e.cookie)}},52496:function(Pn,an,$e){var it=$e(67039),xt=it.Global;Pn.exports={name:"localStorage",read:_e,write:je,each:ve,remove:ce,clearAll:be};function ie(){return xt.localStorage}function _e(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(_e(we),we)}}function ce(Ce){return ie().removeItem(Ce)}function be(){return ie().clear()}},65300:function(Pn){Pn.exports={name:"memoryStorage",read:$e,write:it,each:xt,remove:ie,clearAll:_e};var an={};function $e(je){return an[je]}function it(je,ve){an[je]=ve}function xt(je){for(var ve in an)an.hasOwnProperty(ve)&&je(an[ve],ve)}function ie(je){delete an[je]}function _e(je){an={}}},16436:function(Pn,an,$e){var it=$e(67039),xt=it.Global;Pn.exports={name:"oldFF-globalStorage",read:_e,write:je,each:ve,remove:ce,clearAll:be};var ie=xt.globalStorage;function _e(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(Pn,an,$e){var it=$e(67039),xt=it.Global;Pn.exports={name:"oldIE-userDataStorage",write:ce,read:be,each:Ce,remove:ye,clearAll:we};var ie="storejs",_e=xt.document,je=fe(),ve=(xt.navigator?xt.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(!_e||!_e.documentElement||!_e.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=_e.createElement("div"),ee=_e.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(Pn,an,$e){var it=$e(67039),xt=it.Global;Pn.exports={name:"sessionStorage",read:_e,write:je,each:ve,remove:ce,clearAll:be};function ie(){return xt.sessionStorage}function _e(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(_e(we),we)}}function ce(Ce){return ie().removeItem(Ce)}function be(){return ie().clear()}},93314:function(Pn){"use strict";Pn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},16722:function(Pn,an,$e){"use strict";$e.d(an,{Z:function(){return be}});const it=Ce=>typeof Ce=="object"&&Ce!=null&&Ce.nodeType===1,xt=(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 xt(we.overflowY,ye)||xt(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},_e=(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:Tt=>Tt!==re;if(!it(Ce))throw new TypeError("Invalid target");const pe=document.scrollingElement||document.documentElement,Ee=[];let Pe=Ce;for(;it(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:Ne,scrollY:Oe}=window,{height:Fe,width:Re,top:Ye,right:ze,bottom:Ze,left:at}=Ce.getBoundingClientRect(),{top:ht,right:pt,bottom:Mt,left:et}=(Tt=>{const vt=window.getComputedStyle(Tt);return{top:parseFloat(vt.scrollMarginTop)||0,right:parseFloat(vt.scrollMarginRight)||0,bottom:parseFloat(vt.scrollMarginBottom)||0,left:parseFloat(vt.scrollMarginLeft)||0}})(Ce);let ot=ee==="start"||ee==="nearest"?Ye-ht:ee==="end"?Ze+Mt:Ye+Fe/2-ht+Mt,wt=ae==="center"?at+Re/2-et+pt:ae==="end"?ze+pt:at-et;const Et=[];for(let Tt=0;Tt<Ee.length;Tt++){const vt=Ee[Tt],{height:gt,width:yt,top:It,right:Ot,bottom:Vt,left:Ct}=vt.getBoundingClientRect();if(z==="if-needed"&&Ye>=0&&at>=0&&Ze<=ke&&ze<=Ie&&(vt===pe&&!ie(vt)||Ye>=It&&Ze<=Vt&&at>=Ct&&ze<=Ot))return Et;const mt=getComputedStyle(vt),nt=parseInt(mt.borderLeftWidth,10),ft=parseInt(mt.borderTopWidth,10),Xe=parseInt(mt.borderRightWidth,10),ut=parseInt(mt.borderBottomWidth,10);let bt=0,St=0;const lt="offsetWidth"in vt?vt.offsetWidth-vt.clientWidth-nt-Xe:0,Qe="offsetHeight"in vt?vt.offsetHeight-vt.clientHeight-ft-ut:0,Ue="offsetWidth"in vt?vt.offsetWidth===0?0:yt/vt.offsetWidth:0,We="offsetHeight"in vt?vt.offsetHeight===0?0:gt/vt.offsetHeight:0;if(pe===vt)bt=ee==="start"?ot:ee==="end"?ot-ke:ee==="nearest"?_e(Oe,Oe+ke,ke,ft,ut,Oe+ot,Oe+ot+Fe,Fe):ot-ke/2,St=ae==="start"?wt:ae==="center"?wt-Ie/2:ae==="end"?wt-Ie:_e(Ne,Ne+Ie,Ie,nt,Xe,Ne+wt,Ne+wt+Re,Re),bt=Math.max(0,bt+Oe),St=Math.max(0,St+Ne);else{bt=ee==="start"?ot-It-ft:ee==="end"?ot-Vt+ut+Qe:ee==="nearest"?_e(It,Vt,gt,ft,ut+Qe,ot,ot+Fe,Fe):ot-(It+gt/2)+Qe/2,St=ae==="start"?wt-Ct-nt:ae==="center"?wt-(Ct+yt/2)+lt/2:ae==="end"?wt-Ot+Xe+lt:_e(Ct,Ot,yt,nt,Xe+lt,wt,wt+Re,Re);const{scrollLeft:qe,scrollTop:He}=vt;bt=We===0?0:Math.max(0,Math.min(He+bt/We,vt.scrollHeight-gt/We+Qe)),St=Ue===0?0:Math.max(0,Math.min(qe+St/Ue,vt.scrollWidth-yt/Ue+lt)),ot+=He-bt,wt+=qe-St}Et.push({el:vt,top:bt,left:St})}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})}}}}]);
|