|
|
(self.webpackChunk=self.webpackChunk||[]).push([[2080],{89489:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Tt}});var ge=pe(96663),Oe=pe(59301),Ke={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"},ut=Ke,Ge=pe(7657),Xe=function(Ve,Lt){return Oe.createElement(Ge.Z,(0,ge.Z)({},Ve,{ref:Lt,icon:ut}))},Ne=Oe.forwardRef(Xe),Tt=Ne},59477:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Tt}});var ge=pe(96663),Oe=pe(59301),Ke={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"},ut=Ke,Ge=pe(7657),Xe=function(Ve,Lt){return Oe.createElement(Ge.Z,(0,ge.Z)({},Ve,{ref:Lt,icon:ut}))},Ne=Oe.forwardRef(Xe),Tt=Ne},40001:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Tt}});var ge=pe(96663),Oe=pe(59301),Ke={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"},ut=Ke,Ge=pe(7657),Xe=function(Ve,Lt){return Oe.createElement(Ge.Z,(0,ge.Z)({},Ve,{ref:Lt,icon:ut}))},Ne=Oe.forwardRef(Xe),Tt=Ne},26227:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Tt}});var ge=pe(96663),Oe=pe(59301),Ke={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"},ut=Ke,Ge=pe(7657),Xe=function(Ve,Lt){return Oe.createElement(Ge.Z,(0,ge.Z)({},Ve,{ref:Lt,icon:ut}))},Ne=Oe.forwardRef(Xe),Tt=Ne},49198:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Tt}});var ge=pe(96663),Oe=pe(59301),Ke={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"},ut=Ke,Ge=pe(7657),Xe=function(Ve,Lt){return Oe.createElement(Ge.Z,(0,ge.Z)({},Ve,{ref:Lt,icon:ut}))},Ne=Oe.forwardRef(Xe),Tt=Ne},41464:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Tt}});var ge=pe(96663),Oe=pe(59301),Ke={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"},ut=Ke,Ge=pe(7657),Xe=function(Ve,Lt){return Oe.createElement(Ge.Z,(0,ge.Z)({},Ve,{ref:Lt,icon:ut}))},Ne=Oe.forwardRef(Xe),Tt=Ne},87169:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Tt}});var ge=pe(96663),Oe=pe(59301),Ke={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},ut=Ke,Ge=pe(7657),Xe=function(Ve,Lt){return Oe.createElement(Ge.Z,(0,ge.Z)({},Ve,{ref:Lt,icon:ut}))},Ne=Oe.forwardRef(Xe),Tt=Ne},73331:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Tt}});var ge=pe(96663),Oe=pe(59301),Ke={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"},ut=Ke,Ge=pe(7657),Xe=function(Ve,Lt){return Oe.createElement(Ge.Z,(0,ge.Z)({},Ve,{ref:Lt,icon:ut}))},Ne=Oe.forwardRef(Xe),Tt=Ne},15277:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Tt}});var ge=pe(96663),Oe=pe(59301),Ke={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"},ut=Ke,Ge=pe(7657),Xe=function(Ve,Lt){return Oe.createElement(Ge.Z,(0,ge.Z)({},Ve,{ref:Lt,icon:ut}))},Ne=Oe.forwardRef(Xe),Tt=Ne},52671:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Tt}});var ge=pe(96663),Oe=pe(59301),Ke={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"},ut=Ke,Ge=pe(7657),Xe=function(Ve,Lt){return Oe.createElement(Ge.Z,(0,ge.Z)({},Ve,{ref:Lt,icon:ut}))},Ne=Oe.forwardRef(Xe),Tt=Ne},8657:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Tt}});var ge=pe(96663),Oe=pe(59301),Ke={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"},ut=Ke,Ge=pe(7657),Xe=function(Ve,Lt){return Oe.createElement(Ge.Z,(0,ge.Z)({},Ve,{ref:Lt,icon:ut}))},Ne=Oe.forwardRef(Xe),Tt=Ne},56082:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Tt}});var ge=pe(96663),Oe=pe(59301),Ke={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"},ut=Ke,Ge=pe(7657),Xe=function(Ve,Lt){return Oe.createElement(Ge.Z,(0,ge.Z)({},Ve,{ref:Lt,icon:ut}))},Ne=Oe.forwardRef(Xe),Tt=Ne},33853:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Tt}});var ge=pe(96663),Oe=pe(59301),Ke={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"},ut=Ke,Ge=pe(7657),Xe=function(Ve,Lt){return Oe.createElement(Ge.Z,(0,ge.Z)({},Ve,{ref:Lt,icon:ut}))},Ne=Oe.forwardRef(Xe),Tt=Ne},12893:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Tt}});var ge=pe(96663),Oe=pe(59301),Ke={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{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"}}]},name:"minus-circle",theme:"outlined"},ut=Ke,Ge=pe(7657),Xe=function(Ve,Lt){return Oe.createElement(Ge.Z,(0,ge.Z)({},Ve,{ref:Lt,icon:ut}))},Ne=Oe.forwardRef(Xe),Tt=Ne},15075:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Tt}});var ge=pe(96663),Oe=pe(59301),Ke={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"},ut=Ke,Ge=pe(7657),Xe=function(Ve,Lt){return Oe.createElement(Ge.Z,(0,ge.Z)({},Ve,{ref:Lt,icon:ut}))},Ne=Oe.forwardRef(Xe),Tt=Ne},32134:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Tt}});var ge=pe(96663),Oe=pe(59301),Ke={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-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 8h152v152c0 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-8z"}},{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"}}]},name:"plus-circle",theme:"outlined"},ut=Ke,Ge=pe(7657),Xe=function(Ve,Lt){return Oe.createElement(Ge.Z,(0,ge.Z)({},Ve,{ref:Lt,icon:ut}))},Ne=Oe.forwardRef(Xe),Tt=Ne},43531:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Tt}});var ge=pe(96663),Oe=pe(59301),Ke={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"},ut=Ke,Ge=pe(7657),Xe=function(Ve,Lt){return Oe.createElement(Ge.Z,(0,ge.Z)({},Ve,{ref:Lt,icon:ut}))},Ne=Oe.forwardRef(Xe),Tt=Ne},61485:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Tt}});var ge=pe(96663),Oe=pe(59301),Ke={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"},ut=Ke,Ge=pe(7657),Xe=function(Ve,Lt){return Oe.createElement(Ge.Z,(0,ge.Z)({},Ve,{ref:Lt,icon:ut}))},Ne=Oe.forwardRef(Xe),Tt=Ne},38819:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Tt}});var ge=pe(96663),Oe=pe(59301),Ke={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"},ut=Ke,Ge=pe(7657),Xe=function(Ve,Lt){return Oe.createElement(Ge.Z,(0,ge.Z)({},Ve,{ref:Lt,icon:ut}))},Ne=Oe.forwardRef(Xe),Tt=Ne},47472:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Tt}});var ge=pe(96663),Oe=pe(59301),Ke={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"},ut=Ke,Ge=pe(7657),Xe=function(Ve,Lt){return Oe.createElement(Ge.Z,(0,ge.Z)({},Ve,{ref:Lt,icon:ut}))},Ne=Oe.forwardRef(Xe),Tt=Ne},37036:function(){"use strict"},95625:function(){"use strict"},88010:function(Vn,xn){"use strict";xn.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},43809:function(Vn,xn){"use strict";xn.Z={wrap:"wrap___ilWvf",deleteIcon:"deleteIcon___JBDG8",keywordTag:"keywordTag___iieCb",questionTitleEditorWrap:"questionTitleEditorWrap___MHB5s",choiceListWrap:"choiceListWrap___jB8b1",choiceWrap:"choiceWrap___QFkTc",choiceIndex:"choiceIndex___Mr2YO",judgementIndex:"judgementIndex___fUVWK",setAnswerBtn:"setAnswerBtn___Whox5",activeAnswer:"activeAnswer___fGU6Y",activeJudgementAnswer:"activeJudgementAnswer___wJv8P",actionWrapper:"actionWrapper___ERQ7k",addIcon:"addIcon___L9TE0",inputBorder:"inputBorder___Q5tRE",placeholder:"placeholder___p9sFY",blankInputNumberWrapper:"blankInputNumberWrapper___uEHb0",addBtn:"addBtn___WR5ZI",blankIndex:"blankIndex___x9Pny",baseInputWrapper:"baseInputWrapper___eVsG7",collapseWrapper:"collapseWrapper___ZTysU",panelHeader:"panelHeader___QSN9g",open:"open___B6FU9",close:"close___QX19r",hide:"hide___mn25n"}},7761:function(Vn,xn){"use strict";xn.Z={flex_box_center:"flex_box_center___ycN2f",flex_space_between:"flex_space_between___LcS9e",flex_box_vertical_center:"flex_box_vertical_center___uwjPm",flex_box_center_end:"flex_box_center_end___Pc903",flex_box_column:"flex_box_column___AXEdv",bg:"bg___fm2Cw",title:"title___J3MCU",editIcon:"editIcon___i4Zll",titleLeft:"titleLeft___da61c",titleRight:"titleRight___EsdL6",formWrap:"formWrap___YTxC3",baseLineHeight:"baseLineHeight___TprCB",radioBtnWrapper:"radioBtnWrapper___Mt_XG",radiogroup:"radiogroup___EvkWh",easy:"easy___mSxtg",medium:"medium___NIaWN",hard:"hard___mddnD",baseFormItem:"baseFormItem___csbyb",cascaderPopup:"cascaderPopup___BttnF",selectdiv:"selectdiv___TAr4i",divitem:"divitem___iaXB2",bottmodiv:"bottmodiv___bmp6p",cancelBtn:"cancelBtn___Q4ZcL",confirmBtn:"confirmBtn___nRiCD",concat:"concat___jlPR1"}},84287:function(Vn,xn,pe){"use strict";var ge=pe(59301),Oe=Object.defineProperty,Ke=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,Xe=(Ct,Ve,Lt)=>Ve in Ct?Oe(Ct,Ve,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):Ct[Ve]=Lt,Ne=(Ct,Ve)=>{for(var Lt in Ve||(Ve={}))ut.call(Ve,Lt)&&Xe(Ct,Lt,Ve[Lt]);if(Ke)for(var Lt of Ke(Ve))Ge.call(Ve,Lt)&&Xe(Ct,Lt,Ve[Lt]);return Ct};const Tt=Ct=>React.createElement("svg",Ne({className:"jiangxu_svg__icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:32,height:32},Ct),React.createElement("path",{d:"M365.714 73.143H1024v73.143H365.714zm0 292.571H1024v73.143H365.714zm0 292.572H1024v73.143H365.714zm0 292.571H1024V1024H365.714v-73.143z",fill:"#98BDF7"}),React.createElement("path",{d:"m248.686 803.182-65.829 75.922V658.286h-73.143v220.818l-65.828-75.995L0 851.383 146.286 1024 292.57 851.53z",fill:"#145DFF"}),React.createElement("path",{d:"M146.286 0 0 158.72l43.886 55.223 65.828-75.922v227.693h73.143V138.021l65.829 75.922 43.885-55.223z",fill:"#98BDF7"}));xn.Z="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMzIiIGhlaWdodD0iMzIiPjxwYXRoIGQ9Ik0zNjUuNzE0IDczLjE0M0gxMDI0djczLjE0M0gzNjUuNzE0em0wIDI5Mi41NzFIMTAyNHY3My4xNDNIMzY1LjcxNHptMCAyOTIuNTcySDEwMjR2NzMuMTQzSDM2NS43MTR6bTAgMjkyLjU3MUgxMDI0VjEwMjRIMzY1LjcxNHYtNzMuMTQzeiIgZmlsbD0iIzk4QkRGNyIvPjxwYXRoIGQ9Im0yNDguNjg2IDgwMy4xODItNjUuODI5IDc1LjkyMlY2NTguMjg2aC03My4xNDN2MjIwLjgxOGwtNjUuODI4LTc1Ljk5NUwwIDg1MS4zODMgMTQ2LjI4NiAxMDI0IDI5Mi41NyA4NTEuNTN6IiBmaWxsPSIjMTQ1REZGIi8+PHBhdGggZD0iTTE0Ni4yODYgMCAwIDE1OC43Mmw0My44ODYgNTUuMjIzIDY1LjgyOC03NS45MjJ2MjI3LjY5M2g3My4xNDNWMTM4LjAyMWw2NS44MjkgNzUuOTIyIDQzLjg4NS01NS4yMjN6IiBmaWxsPSIjOThCREY3Ii8+PC9zdmc+"},86087:function(Vn,xn,pe){"use strict";var ge=pe(59301),Oe=Object.defineProperty,Ke=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,Xe=(Ct,Ve,Lt)=>Ve in Ct?Oe(Ct,Ve,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):Ct[Ve]=Lt,Ne=(Ct,Ve)=>{for(var Lt in Ve||(Ve={}))ut.call(Ve,Lt)&&Xe(Ct,Lt,Ve[Lt]);if(Ke)for(var Lt of Ke(Ve))Ge.call(Ve,Lt)&&Xe(Ct,Lt,Ve[Lt]);return Ct};const Tt=Ct=>React.createElement("svg",Ne({className:"shengxu_svg__icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:32,height:32},Ct),React.createElement("path",{d:"M365.714 73.143H1024v73.143H365.714zm0 292.571H1024v73.143H365.714zm0 292.572H1024v73.143H365.714zm0 292.571H1024V1024H365.714v-73.143zM248.686 803.182l-65.829 75.922V658.286h-73.143v220.818l-65.828-75.995L0 851.383 146.286 1024 292.57 851.53z",fill:"#98BDF7"}),React.createElement("path",{d:"M146.286 0 0 158.72l43.886 55.223 65.828-75.922v227.693h73.143V138.021l65.829 75.922 43.885-55.223z",fill:"#145DFF"}));xn.Z="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMzIiIGhlaWdodD0iMzIiPjxwYXRoIGQ9Ik0zNjUuNzE0IDczLjE0M0gxMDI0djczLjE0M0gzNjUuNzE0em0wIDI5Mi41NzFIMTAyNHY3My4xNDNIMzY1LjcxNHptMCAyOTIuNTcySDEwMjR2NzMuMTQzSDM2NS43MTR6bTAgMjkyLjU3MUgxMDI0VjEwMjRIMzY1LjcxNHYtNzMuMTQzek0yNDguNjg2IDgwMy4xODJsLTY1LjgyOSA3NS45MjJWNjU4LjI4NmgtNzMuMTQzdjIyMC44MThsLTY1LjgyOC03NS45OTVMMCA4NTEuMzgzIDE0Ni4yODYgMTAyNCAyOTIuNTcgODUxLjUzeiIgZmlsbD0iIzk4QkRGNyIvPjxwYXRoIGQ9Ik0xNDYuMjg2IDAgMCAxNTguNzJsNDMuODg2IDU1LjIyMyA2NS44MjgtNzUuOTIydjIyNy42OTNoNzMuMTQzVjEzOC4wMjFsNjUuODI5IDc1LjkyMiA0My44ODUtNTUuMjIzeiIgZmlsbD0iIzE0NURGRiIvPjwvc3ZnPg=="},74413:function(){"use strict";function Vn(De,ne,ee,ce){ee===void 0&&(ee=0),ce===void 0&&(ce=1/0),this._name=De,this._defaultValue=ne,this._minimum=ee,this._maximum=ce}Object.defineProperty(Vn.prototype,"name",{get:function(){return this._name},set:function(De){if(typeof De!="string"||De==="")throw new Error("Shape name must be a valid string.");this._name=De}}),Object.defineProperty(Vn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(De){if(typeof De!="number"||isNaN(De))throw new Error("The default value must be a real number, not: "+De);this._defaultValue=De}}),Object.defineProperty(Vn.prototype,"minimum",{get:function(){return this._minimum},set:function(De){if(typeof De!="number"||isNaN(De))throw new Error("Minimum must be a real number, not: "+De);this._minimum=De}}),Object.defineProperty(Vn.prototype,"maximum",{get:function(){return this._maximum},set:function(De){if(typeof De!="number"||isNaN(De))throw new Error("Maximum must be a real number, not: "+De);this._maximum=De}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(De,ne){var ee=go.Shape._FigureParameters[De];return ee?ee[ne]:null},go.Shape.setFigureParameter=function(De,ne,ee){if(!(ee instanceof Vn))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 ce=go.Shape._FigureParameters[De];ce||(ce=[],go.Shape._FigureParameters[De]=ce),ce[ne]=ee};var xn=[];function pe(De,ne){var ee=xn.pop();return ee===void 0?new go.Point(De,ne):(ee.x=De,ee.y=ne,ee)}function ge(){var De=xn.pop();return De===void 0?new go.Point:De}function Oe(De){xn.push(De)}function Ke(De,ne,ee,ce,se,he,ve,be,ke){ke||(ke=new go.Point);var Be=De-ee,He=se-ve,We=NaN,rt=NaN;if(Be===0)if(He===0)De===ee&&(We=De,rt=ne);else{var Qe=(he-be)/He,Pt=he-Qe*se;We=De,rt=Qe*We+Pt}else if(He===0){var Ze=(ne-ce)/Be,Et=ne-Ze*De;We=se,rt=Ze*We+Et}else{var Ze=(ne-ce)/Be,Qe=(he-be)/He,Et=ne-Ze*De,Pt=he-Qe*se;We=(Pt-Et)/(Ze-Qe),rt=Ze*We+Et}return ke.x=We,ke.y=rt,ke}function ut(De,ne,ee,ce,se,he,ve,be,ke,Be,He,We,rt,Qe){var Pt=1-ke,Ze=ke,Et=De*Pt+ee*Ze,it=ne*Pt+ce*Ze,Dt=ee*Pt+se*Ze,ht=ce*Pt+he*Ze,Ht=se*Pt+ve*Ze,_t=he*Pt+be*Ze,Vt=Et*Pt+Dt*Ze,ot=it*Pt+ht*Ze,Ue=Dt*Pt+Ht*Ze,Wt=ht*Pt+_t*Ze,Ln=Vt*Pt+Ue*Ze,Fn=ot*Pt+Wt*Ze;Be.x=Et,Be.y=it,He.x=Vt,He.y=ot,We.x=Ln,We.y=Fn,rt.x=Ue,rt.y=Wt,Qe.x=Ht,Qe.y=_t}var Ge=new go.Spot(.156,.156),Xe=new go.Spot(.844,.844),Ne=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new Vn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(De,ne,ee){var ce=De?De.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=5),ce=Math.min(ce,ne/3),ce=Math.min(ce,ee/3);var se=ce*Ne,he=new go.Geometry().add(new go.PathFigure(ce,0,!0).add(new go.PathSegment(go.PathSegment.Line,ne-ce,0)).add(new go.PathSegment(go.PathSegment.Bezier,ne,ce,ne-se,0,ne,se)).add(new go.PathSegment(go.PathSegment.Line,ne,ee-ce)).add(new go.PathSegment(go.PathSegment.Bezier,ne-ce,ee,ne,ee-se,ne-se,ee)).add(new go.PathSegment(go.PathSegment.Line,ce,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ce,se,ee,0,ee-se)).add(new go.PathSegment(go.PathSegment.Line,0,ce)).add(new go.PathSegment(go.PathSegment.Bezier,ce,0,0,se,se,0).close()));return se>1&&(he.spot1=new go.Spot(0,0,se,se),he.spot2=new go.Spot(1,1,-se,-se)),he}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(ne,ee).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,ne,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(ne,ee).add(new go.PathSegment(go.PathSegment.Line,0,ee)).add(new go.PathSegment(go.PathSegment.Line,.5*ne,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(.5*ne,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)).add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(De,ne,ee){var ce=new go.Geometry(go.Geometry.Line);return ce.startX=0,ce.startY=ee/2,ce.endX=ne,ce.endY=ee/2,ce}),go.Shape.defineFigureGenerator("LineV",function(De,ne,ee){var ce=new go.Geometry(go.Geometry.Line);return ce.startX=ne/2,ce.startY=0,ce.endX=ne/2,ce.endY=ee,ce}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(0,ee/2,!1).add(new go.PathSegment(go.PathSegment.Line,ne,ee/2)).add(new go.PathSegment(go.PathSegment.Move,ne/2,0)).add(new go.PathSegment(go.PathSegment.Line,ne/2,ee)))}),go.Shape.defineFigureGenerator("XLine",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,ne,ee)))}),go.Shape.defineFigureGenerator("LineRight",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(.25*ne,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*ne,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.25*ne,ee)))}),go.Shape.defineFigureGenerator("LineDown",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(0,.25*ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ne,.75*ee)).add(new go.PathSegment(go.PathSegment.Line,ne,.25*ee)))}),go.Shape.defineFigureGenerator("LineLeft",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(.75*ne,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*ne,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.75*ne,ee)))}),go.Shape.defineFigureGenerator("LineUp",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(0,.75*ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ne,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,ne,.75*ee)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(De,ne,ee){var ce=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(ce*ne,(1-ce)*ee,!1).add(new go.PathSegment(go.PathSegment.Line,(1-ce)*ne,ce*ee)).add(new go.PathSegment(go.PathSegment.Move,ce*ne,ce*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ce)*ne,(1-ce)*ee)).add(new go.PathSegment(go.PathSegment.Move,0,ee/2)).add(new go.PathSegment(go.PathSegment.Line,ne,ee/2)).add(new go.PathSegment(go.PathSegment.Move,ne/2,0)).add(new go.PathSegment(go.PathSegment.Line,ne/2,ee)))}),go.Shape.defineFigureGenerator("CircleLine",function(De,ne,ee){var ce=ne/2,se=new go.Geometry().add(new go.PathFigure(ne,ne/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,ce,ce,ce,ce).close()));return se.spot1=Ge,se.spot2=Xe,se.defaultStretch=go.GraphObject.Uniform,se}),go.Shape.defineFigureGenerator("Line1",function(De,ne,ee){var ce=new go.Geometry(go.Geometry.Line);return ce.startX=0,ce.startY=0,ce.endX=ne,ce.endY=ee,ce}),go.Shape.defineFigureGenerator("Line2",function(De,ne,ee){var ce=new go.Geometry(go.Geometry.Line);return ce.startX=ne,ce.startY=0,ce.endX=0,ce.endY=ee,ce}),go.Shape.defineFigureGenerator("Curve1",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,ne,ee,Ne*ne,0,ne,(1-Ne)*ee)))}),go.Shape.defineFigureGenerator("Curve2",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,ne,ee,0,Ne*ee,(1-Ne)*ne,ee)))}),go.Shape.defineFigureGenerator("Curve3",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(ne,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,ne,Ne*ee,Ne*ne,ee)))}),go.Shape.defineFigureGenerator("Curve4",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(ne,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,(1-Ne)*ne,0,0,(1-Ne)*ee)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,ne,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(ne,0,!0).add(new go.PathSegment(go.PathSegment.Line,ne,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne,ee).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new Vn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(De,ne,ee){var ce=De?De.parameter1:NaN;isNaN(ce)?ce=.1:ce<-1?ce=-1:ce>1&&(ce=1);var se=Math.abs(ce)*ne;if(ce===0){var he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=ne,he.endY=ee,he}else{var he=new go.Geometry;return ce>0?he.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne-se,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):he.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ne-se,0)).add(new go.PathSegment(go.PathSegment.Line,ne,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<ne/2&&he.setSpots(se/ne,0,(ne-se)/ne,1),he}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new Vn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(De,ne,ee){var ce=De?De.parameter1:NaN;isNaN(ce)?ce=10:ce<-ne?ce=-ne:ce>ne&&(ce=ne);var se=Math.abs(ce);if(ce===0){var he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=ne,he.endY=ee,he}else{var he=new go.Geometry;return ce>0?he.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne-se,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):he.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ne-se,0)).add(new go.PathSegment(go.PathSegment.Line,ne,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<ne/2&&he.setSpots(se/ne,0,(ne-se)/ne,1),he}}),go.Shape.setFigureParameter("Trapezoid1",0,new Vn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(De,ne,ee){var ce=De?De.parameter1:NaN;isNaN(ce)?ce=.2:ce<.5?ce=-.5:ce>.5&&(ce=.5);var se=Math.abs(ce)*ne;if(ce===0){var he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=ne,he.endY=ee,he}else{var he=new go.Geometry;return ce>0?he.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,ne-se,0)).add(new go.PathSegment(go.PathSegment.Line,ne,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):he.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne-se,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<ne/2&&he.setSpots(se/ne,0,(ne-se)/ne,1),he}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new Vn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(De,ne,ee){var ce=De?De.parameter1:NaN;isNaN(ce)?ce=20:ce<-ne?ce=-ne/2:ce>ne&&(ce=ne/2);var se=Math.abs(ce);if(ce===0){var he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=ne,he.endY=ee,he}else{var he=new go.Geometry;return ce>0?he.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,ne-se,0)).add(new go.PathSegment(go.PathSegment.Line,ne,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):he.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne-se,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<ne/2&&he.setSpots(se/ne,0,(ne-se)/ne,1),he}}),go.Shape.setFigureParameter("ManualOperation",0,new Vn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(De,ne,ee){var ce=De?De.parameter1:NaN;isNaN(ce)?ce=10:ce<-ne?ce=-ne/2:ce>ne&&(ce=ne/2);var se=Math.abs(ce);if(ce===0){var he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=ne,he.endY=ee,he}else{var he=new go.Geometry;return ce>0?he.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne-se,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())):he.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,ne-se,0)).add(new go.PathSegment(go.PathSegment.Line,ne,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())),se<ne/2&&he.setSpots(se/ne,0,(ne-se)/ne,1),he}});var Tt=[];function Ct(){var De=Tt.pop();return De===void 0?[]:De}function Ve(De){De.length=0,Tt.push(De)}function Lt(De){for(var ne=Ct(),ee=.5,ce=.5,se=Math.PI*1.5,he=0,ve=0;ve<De;ve++)he=2*Math.PI/De*ve+se,ne[ve]=new go.Point(ce+ee*Math.cos(he),ce+ee*Math.sin(he));return ne.push(ne[0]),ne}function dt(De){var ne=Rt(De),ee=Ct();ee[0]=ne[0];for(var ce=1,se=1;ce<ne.length;ce+=2,se+=3)ee[se]=ne[ce],ee[se+1]=ne[ce],ee[se+2]=ne[ce+1];return Ve(ne),ee}function Rt(De){for(var ne=Lt(De),ee=Ct(),ce=Math.floor(ne.length/2),se=ne.length-1,he=De%2===0?2:1,ve=0;ve<se;ve++){var be=ne[ve],ke=ne[ve+1],Be=ne[(ce+ve-1)%se],He=ne[(ce+ve+he)%se];ee[ve*2]=be,ee[ve*2+1]=Ke(be.x,be.y,Be.x,Be.y,ke.x,ke.y,He.x,He.y,new go.Point)}return ee[ee.length]=ee[0],Ve(ne),ee}go.Shape.defineFigureGenerator("Pentagon",function(De,ne,ee){var ce=Lt(5),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<5;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*ne,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Ve(ce),se.spot1=new go.Spot(.2,.22),se.spot2=new go.Spot(.8,.9),se}),go.Shape.defineFigureGenerator("Hexagon",function(De,ne,ee){var ce=Lt(6),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<6;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*ne,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Ve(ce),se.spot1=new go.Spot(.07,.25),se.spot2=new go.Spot(.93,.75),se}),go.Shape.defineFigureGenerator("Heptagon",function(De,ne,ee){var ce=Lt(7),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<7;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*ne,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Ve(ce),se.spot1=new go.Spot(.2,.15),se.spot2=new go.Spot(.8,.85),se}),go.Shape.defineFigureGenerator("Octagon",function(De,ne,ee){var ce=Lt(8),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<8;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*ne,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Ve(ce),se.spot1=new go.Spot(.15,.15),se.spot2=new go.Spot(.85,.85),se}),go.Shape.defineFigureGenerator("Nonagon",function(De,ne,ee){var ce=Lt(9),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<9;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*ne,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Ve(ce),se.spot1=new go.Spot(.17,.13),se.spot2=new go.Spot(.82,.82),se}),go.Shape.defineFigureGenerator("Decagon",function(De,ne,ee){var ce=Lt(10),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<10;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*ne,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Ve(ce),se.spot1=new go.Spot(.16,.16),se.spot2=new go.Spot(.84,.84),se}),go.Shape.defineFigureGenerator("Dodecagon",function(De,ne,ee){var ce=Lt(12),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<12;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*ne,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Ve(ce),se.spot1=new go.Spot(.16,.16),se.spot2=new go.Spot(.84,.84),se}),go.Shape.defineFigureGenerator("FivePointedStar",function(De,ne,ee){var ce=Rt(5),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<10;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*ne,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Ve(ce),se.spot1=new go.Spot(.266,.333),se.spot2=new go.Spot(.733,.733),se}),go.Shape.defineFigureGenerator("SixPointedStar",function(De,ne,ee){var ce=Rt(6),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<12;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*ne,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Ve(ce),se.spot1=new go.Spot(.17,.25),se.spot2=new go.Spot(.83,.75),se}),go.Shape.defineFigureGenerator("SevenPointedStar",function(De,ne,ee){var ce=Rt(7),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<14;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*ne,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Ve(ce),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.666),se}),go.Shape.defineFigureGenerator("EightPointedStar",function(De,ne,ee){var ce=Rt(8),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<16;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*ne,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Ve(ce),se.spot1=new go.Spot(.25,.25),se.spot2=new go.Spot(.75,.75),se}),go.Shape.defineFigureGenerator("NinePointedStar",function(De,ne,ee){var ce=Rt(9),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<18;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*ne,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Ve(ce),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.666),se}),go.Shape.defineFigureGenerator("TenPointedStar",function(De,ne,ee){var ce=Rt(10),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<20;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*ne,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*ee).close()),Ve(ce),se.spot1=new go.Spot(.281,.261),se.spot2=new go.Spot(.723,.748),se}),go.Shape.defineFigureGenerator("FivePointedBurst",function(De,ne,ee){var ce=dt(5),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<ce.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,ce[ve+2].x*ne,ce[ve+2].y*ee,ce[ve].x*ne,ce[ve].y*ee,ce[ve+1].x*ne,ce[ve+1].y*ee));return he.segments.last().close(),Ve(ce),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("SixPointedBurst",function(De,ne,ee){var ce=dt(6),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<ce.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,ce[ve+2].x*ne,ce[ve+2].y*ee,ce[ve].x*ne,ce[ve].y*ee,ce[ve+1].x*ne,ce[ve+1].y*ee));return he.segments.last().close(),Ve(ce),se.spot1=new go.Spot(.17,.222),se.spot2=new go.Spot(.833,.777),se}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(De,ne,ee){var ce=dt(7),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<ce.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,ce[ve+2].x*ne,ce[ve+2].y*ee,ce[ve].x*ne,ce[ve].y*ee,ce[ve+1].x*ne,ce[ve+1].y*ee));return he.segments.last().close(),Ve(ce),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("EightPointedBurst",function(De,ne,ee){var ce=dt(8),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<ce.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,ce[ve+2].x*ne,ce[ve+2].y*ee,ce[ve].x*ne,ce[ve].y*ee,ce[ve+1].x*ne,ce[ve+1].y*ee));return he.segments.last().close(),Ve(ce),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("NinePointedBurst",function(De,ne,ee){var ce=dt(9),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<ce.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,ce[ve+2].x*ne,ce[ve+2].y*ee,ce[ve].x*ne,ce[ve].y*ee,ce[ve+1].x*ne,ce[ve+1].y*ee));return he.segments.last().close(),Ve(ce),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("TenPointedBurst",function(De,ne,ee){var ce=dt(10),se=new go.Geometry,he=new go.PathFigure(ce[0].x*ne,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<ce.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,ce[ve+2].x*ne,ce[ve+2].y*ee,ce[ve].x*ne,ce[ve].y*ee,ce[ve+1].x*ne,ce[ve+1].y*ee));return he.segments.last().close(),Ve(ce),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.setFigureParameter("FramedRectangle",0,new Vn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new Vn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(De,ne,ee){var ce=De?De.parameter1:NaN,se=De?De.parameter2:NaN;isNaN(ce)&&(ce=8),isNaN(se)&&(se=8);var he=new go.Geometry,ve=new go.PathFigure(0,0,!0);return he.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ce<ne/2&&se<ee/2&&(ve.add(new go.PathSegment(go.PathSegment.Move,ce,se)),ve.add(new go.PathSegment(go.PathSegment.Line,ce,ee-se)),ve.add(new go.PathSegment(go.PathSegment.Line,ne-ce,ee-se)),ve.add(new go.PathSegment(go.PathSegment.Line,ne-ce,se).close())),he.setSpots(0,0,1,1,ce,se,-ce,-se),he}),go.Shape.setFigureParameter("Ring",0,new Vn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(De,ne,ee){var ce=De?De.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=8);var se=ne/2,he=new go.Geometry,ve=new go.PathFigure(ne,ne/2,!0);he.add(ve),ve.add(new go.PathSegment(go.PathSegment.Arc,0,360,se,se,se,se).close());var be=Math.max(se-ce,0);return be>0&&(ve.add(new go.PathSegment(go.PathSegment.Move,ne/2+be,ne/2)),ve.add(new go.PathSegment(go.PathSegment.Arc,0,-360,se,se,be,be).close())),he.spot1=Ge,he.spot2=Xe,he.defaultStretch=go.GraphObject.Uniform,he}),go.Shape.defineFigureGenerator("Cloud",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(.08034461*ne,.1944299*ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*ne,.05349299*ee,-.09239631*ne,.07836421*ee,.1406031*ne,-.0542823*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*ne,.074219*ee,.2450511*ne,-.00697547*ee,.3776197*ne,-.01112067*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*ne,.07004196*ee,.4539471*ne,0,.6066018*ne,-.02526587*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*ne,.08370865*ee,.6914277*ne,-.01904177*ee,.8921095*ne,-.01220843*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*ne,.3194596*ee,1.036446*ne,.04105738*ee,1.020377*ne,.3022052*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*ne,.562044*ee,1.04448*ne,.360238*ee,.992256*ne,.5219009*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*ne,.8217117*ee,1.032337*ne,.5771781*ee,1.018411*ne,.8120651*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*ne,.9156953*ee,1.028411*ne,.9571472*ee,.8556702*ne,1.052487*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*ne,.9310455*ee,.7431877*ne,1.009325*ee,.5624123*ne,1.021761*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*ne,.9344623*ee,.4820677*ne,1.031761*ee,.3030112*ne,1.002796*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*ne,.870098*ee,.2329994*ne,1.01518*ee,.03213784*ne,1.01518*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*ne,.6545475*ee,-.02812061*ne,.9032597*ee,-.01205169*ne,.6835638*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*ne,.4265613*ee,-.01812061*ne,.6089503*ee,-.00606892*ne,.4555777*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*ne,.1944299*ee,-.01606892*ne,.3892545*ee,-.01205169*ne,.1944299*ee))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(De,ne,ee){var ce=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(ce*ne,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-ce)*ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne,ce*ee)).add(new go.PathSegment(go.PathSegment.Line,ne,(1-ce)*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ce)*ne,ee)).add(new go.PathSegment(go.PathSegment.Line,ce*ne,ee)).add(new go.PathSegment(go.PathSegment.Line,0,(1-ce)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ce*ee).close())).setSpots(ce/2,ce/2,1-ce/2,1-ce/2)}),go.Shape.setFigureParameter("Pie",0,new Vn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new Vn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(De,ne,ee){var ce=De?De.parameter1:NaN,se=De?De.parameter2:NaN;isNaN(ce)&&(ce=0),isNaN(se)&&(se=315);var he=ce%360;he<0&&(he+=360);var ve=se%360,be=Math.min(ne,ee)/2;return new go.Geometry().add(new go.PathFigure(be,be).add(new go.PathSegment(go.PathSegment.Arc,he,ve,be,be,be,be).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(De,ne,ee){var ce=Ne/Math.SQRT2*.5,se=Math.SQRT2/2,he=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(ne,ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,se*ne,he*ee,ne,(1-ce)*ee,(se+ce)*ne,(he+ce)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()))}),go.Shape.setFigureParameter("ThickCross",0,new Vn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(De,ne,ee){var ce=De?De.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=30);var se=Math.min(ce,ne)/2,he=ne/2,ve=ee/2;return new go.Geometry().add(new go.PathFigure(he-se,0,!0).add(new go.PathSegment(go.PathSegment.Line,he+se,0)).add(new go.PathSegment(go.PathSegment.Line,he+se,ve-se)).add(new go.PathSegment(go.PathSegment.Line,ne,ve-se)).add(new go.PathSegment(go.PathSegment.Line,ne,ve+se)).add(new go.PathSegment(go.PathSegment.Line,he+se,ve+se)).add(new go.PathSegment(go.PathSegment.Line,he+se,ee)).add(new go.PathSegment(go.PathSegment.Line,he-se,ee)).add(new go.PathSegment(go.PathSegment.Line,he-se,ve+se)).add(new go.PathSegment(go.PathSegment.Line,0,ve+se)).add(new go.PathSegment(go.PathSegment.Line,0,ve-se)).add(new go.PathSegment(go.PathSegment.Line,he-se,ve-se).close()))}),go.Shape.setFigureParameter("ThinCross",0,new Vn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(De,ne,ee){var ce=De?De.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=10);var se=Math.min(ce,ne)/2,he=ne/2,ve=ee/2;return new go.Geometry().add(new go.PathFigure(he-se,0,!0).add(new go.PathSegment(go.PathSegment.Line,he+se,0)).add(new go.PathSegment(go.PathSegment.Line,he+se,ve-se)).add(new go.PathSegment(go.PathSegment.Line,ne,ve-se)).add(new go.PathSegment(go.PathSegment.Line,ne,ve+se)).add(new go.PathSegment(go.PathSegment.Line,he+se,ve+se)).add(new go.PathSegment(go.PathSegment.Line,he+se,ee)).add(new go.PathSegment(go.PathSegment.Line,he-se,ee)).add(new go.PathSegment(go.PathSegment.Line,he-se,ve+se)).add(new go.PathSegment(go.PathSegment.Line,0,ve+se)).add(new go.PathSegment(go.PathSegment.Line,0,ve-se)).add(new go.PathSegment(go.PathSegment.Line,he-se,ve-se).close()))}),go.Shape.setFigureParameter("ThickX",0,new Vn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(De,ne,ee){var ce=De?De.parameter1:NaN;if((isNaN(ce)||ce<0)&&(ce=30),ne===0||ee===0){var se=new go.Geometry(go.Geometry.Rectangle);return se.startX=0,se.startY=0,se.endX=ne,se.endY=ee,se}else{var he=ne/2,ve=ee/2,be=Math.atan2(ee,ne),ke=ce-Math.min(Math.cos(be)*ce/2,he),Be=ce-Math.min(Math.sin(be)*ce/2,ve),se=new go.Geometry,He=new go.PathFigure(ke,0,!0);return se.add(He),He.add(new go.PathSegment(go.PathSegment.Line,he,.2*ee)),He.add(new go.PathSegment(go.PathSegment.Line,ne-ke,0)),He.add(new go.PathSegment(go.PathSegment.Line,ne,Be)),He.add(new go.PathSegment(go.PathSegment.Line,.8*ne,ve)),He.add(new go.PathSegment(go.PathSegment.Line,ne,ee-Be)),He.add(new go.PathSegment(go.PathSegment.Line,ne-ke,ee)),He.add(new go.PathSegment(go.PathSegment.Line,he,.8*ee)),He.add(new go.PathSegment(go.PathSegment.Line,ke,ee)),He.add(new go.PathSegment(go.PathSegment.Line,0,ee-Be)),He.add(new go.PathSegment(go.PathSegment.Line,.2*ne,ve)),He.add(new go.PathSegment(go.PathSegment.Line,0,Be).close()),se}}),go.Shape.setFigureParameter("ThinX",0,new Vn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(De,ne,ee){var ce=De?De.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=10);var se=new go.Geometry,he=new go.PathFigure(.1*ne,0,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*ne,0)),he.add(new go.PathSegment(go.PathSegment.Line,ne,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,ne,.9*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.1*ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee).close()),se}),go.Shape.setFigureParameter("SquareIBeam",0,new Vn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(De,ne,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=.2);var se=new go.Geometry,he=new go.PathFigure(0,0,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,0)),he.add(new go.PathSegment(go.PathSegment.Line,ne,ce*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(.5+ce/2)*ne,ce*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(.5+ce/2)*ne,(1-ce)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,ne,(1-ce)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,(1-ce)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(.5-ce/2)*ne,(1-ce)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(.5-ce/2)*ne,ce*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ce*ee).close()),se}),go.Shape.setFigureParameter("RoundedIBeam",0,new Vn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(De,ne,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=.5);var se=new go.Geometry,he=new go.PathFigure(0,0,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,0)),he.add(new go.PathSegment(go.PathSegment.Bezier,ne,ee,Math.abs(1-ce)*ne,.25*ee,Math.abs(1-ce)*ne,.75*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ce*ne,.75*ee,ce*ne,.25*ee).close()),se}),go.Shape.defineFigureGenerator("HalfEllipse",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*ee,Ne*ne,0,ne,(.5-Ne/2)*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,ne,(.5+Ne/2)*ee,Ne*ne,ee).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,ne,0,ne,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*ne,.75*ee,.5*ne,.25*ee).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(.5*ne,ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,.1*ne,.8*ee,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.3*ee,0,0,.45*ne,0)).add(new go.PathSegment(go.PathSegment.Bezier,ne,.3*ee,.55*ne,0,ne,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,ee,ne,.5*ee,.9*ne,.8*ee).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(.5*ne,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*ne,.01*ee)).add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*ee,.6*ne,.2*ee,ne,.25*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.55*ne,.7*ee,ne,.8*ee,.6*ne,.8*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.75*ne,ee,.5*ne,.75*ee,.55*ne,.95*ee)).add(new go.PathSegment(go.PathSegment.Line,.25*ne,ee)).add(new go.PathSegment(go.PathSegment.Bezier,.45*ne,.7*ee,.45*ne,.95*ee,.5*ne,.75*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.4*ne,.8*ee,0,.8*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.49*ne,.01*ee,0,.25*ee,.4*ne,.2*ee).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.4*ne,.6*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.15*ne,ee,.5*ne,.75*ee,.45*ne,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.6*ne,.6*ee,.55*ne,.95*ee,.5*ne,.75*ee));var he=.2,ve=.3,be=0,ke=he*Ne;return se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*ne,(.5+he+be)*ee,(.5-he+ve)*ne,(.5+ke+be)*ee,(.5-ke+ve)*ne,(.5+he+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+he+ve)*ne,(.5+be)*ee,(.5+ke+ve)*ne,(.5+he+be)*ee,(.5+he+ve)*ne,(.5+ke+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*ne,(.5-he+be)*ee,(1-.5+he+ve)*ne,(.5-ke+be)*ee,(.5+ke+ve)*ne,(.5-he+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.65*ne,.36771243*ee,(.5-ke+ve)*ne,(.5-he+be)*ee,(.5-he+ve+.05)*ne,(.5-ke+be-.02)*ee)),he=.2,ve=0,be=-.3,ke=he*Ne,se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+he+ve)*ne,(.5+be)*ee,(.5+ke+ve)*ne,(.5+he+be)*ee,(.5+he+ve)*ne,(.5+ke+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*ne,(.5-he+be)*ee,(1-.5+he+ve)*ne,(.5-ke+be)*ee,(.5+ke+ve)*ne,(.5-he+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-he+ve)*ne,(.5+be)*ee,(.5-ke+ve)*ne,(.5-he+be)*ee,(.5-he+ve)*ne,(.5-ke+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ke+ve)*ne,(.5+he+be)*ee,(.5-he+ve)*ne,(.5+ke+be)*ee,(.5-ke+ve)*ne,(.5+he+be)*ee)),he=.2,ve=-.3,be=0,ke=he*Ne,se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*ne,(.5-he+be)*ee,(1-.5+he+ve-.05)*ne,(.5-ke+be-.02)*ee,(.5+ke+ve)*ne,(.5-he+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-he+ve)*ne,(.5+be)*ee,(.5-ke+ve)*ne,(.5-he+be)*ee,(.5-he+ve)*ne,(.5-ke+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*ne,(.5+he+be)*ee,(.5-he+ve)*ne,(.5+ke+be)*ee,(.5-ke+ve)*ne,(.5+he+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.4*ne,.6*ee,(.5+ke+ve)*ne,(.5+he+be)*ee,(.5+he+ve)*ne,(.5+ke+be)*ee).close()),ce.setSpots(.06,.33,.93,.68),ce}),go.Shape.defineFigureGenerator("YinYang",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne*.5,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,ne*.5,ne*.5,ne*.5,ne*.5)),se.add(new go.PathSegment(go.PathSegment.Arc,90,-180,ne*.5,ne*.75,ne*.25,ne*.25)),se.add(new go.PathSegment(go.PathSegment.Arc,90,180,ne*.5,ne*.25,ne*.25,ne*.25));var he=.1,ve=.5,be=.25;return se.add(new go.PathSegment(go.PathSegment.Move,(ve+he)*ne,be*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,0,-360,ne*ve,ee*be,he*ne,he*ne).close()),se=new go.PathFigure(ne*.5,0,!1),ce.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,-180,ne*.5,ne*.5,ne*.5,ne*.5)),be=.75,se=new go.PathFigure((ve+he)*ne,be*ee,!0),ce.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,0,360,ne*ve,ee*be,he*ne,he*ne).close()),ce.defaultStretch=go.GraphObject.Uniform,ce}),go.Shape.defineFigureGenerator("Peace",function(De,ne,ee){var ce=.8535533905932737,se=.5*ne,he=.5*ee;return new go.Geometry().add(new go.PathFigure(se,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,se,he,se,he)).add(new go.PathSegment(go.PathSegment.Line,se,ee)).add(new go.PathSegment(go.PathSegment.Move,se,he)).add(new go.PathSegment(go.PathSegment.Line,(1-ce)*ne,ce*ee)).add(new go.PathSegment(go.PathSegment.Move,se,he)).add(new go.PathSegment(go.PathSegment.Line,ce*ne,ce*ee)))}),go.Shape.defineFigureGenerator("NotAllowed",function(De,ne,ee){var ce=new go.Geometry,se=Ne*.5,he=.5,ve=.5,be=.5,ke=new go.PathFigure(ve*ne,(be-he)*ee);ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*ne,be*ee,(ve-se)*ne,(be-he)*ee,(ve-he)*ne,(be-se)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be+he)*ee,(ve-he)*ne,(be+se)*ee,(ve-se)*ne,(be+he)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*ne,be*ee,(ve+se)*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be-he)*ee,(ve+he)*ne,(be-se)*ee,(ve+se)*ne,(be-he)*ee)),he=.4,se=Ne*.4;var Be=ge(),He=ge(),We=ge(),rt=ge();ut(ve,be-he,ve+se,be-he,ve+he,be-se,ve+he,be,.42,Be,He,We,rt,rt);var Qe=ge(),Pt=ge(),Ze=ge();ut(ve,be-he,ve+se,be-he,ve+he,be-se,ve+he,be,.58,rt,rt,Ze,Qe,Pt);var Et=ge(),it=ge(),Dt=ge();ut(ve,be+he,ve-se,be+he,ve-he,be+se,ve-he,be,.42,Et,it,Dt,rt,rt);var ht=ge(),Ht=ge(),_t=ge();return ut(ve,be+he,ve-se,be+he,ve-he,be+se,ve-he,be,.58,rt,rt,_t,ht,Ht),ke.add(new go.PathSegment(go.PathSegment.Move,_t.x*ne,_t.y*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*ne,be*ee,ht.x*ne,ht.y*ee,Ht.x*ne,Ht.y*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be-he)*ee,(ve-he)*ne,(be-se)*ee,(ve-se)*ne,(be-he)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,We.x*ne,We.y*ee,Be.x*ne,Be.y*ee,He.x*ne,He.y*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,_t.x*ne,_t.y*ee).close()),ke.add(new go.PathSegment(go.PathSegment.Move,Dt.x*ne,Dt.y*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,Ze.x*ne,Ze.y*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*ne,be*ee,Qe.x*ne,Qe.y*ee,Pt.x*ne,Pt.y*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee,(ve+se)*ne,(be+he)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,Dt.x*ne,Dt.y*ee,Et.x*ne,Et.y*ee,it.x*ne,it.y*ee).close()),Oe(Be),Oe(He),Oe(We),Oe(rt),Oe(Qe),Oe(Pt),Oe(Ze),Oe(Et),Oe(it),Oe(Dt),Oe(ht),Oe(Ht),Oe(_t),ce.defaultStretch=go.GraphObject.Uniform,ce}),go.Shape.defineFigureGenerator("Fragile",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*ne,0)).add(new go.PathSegment(go.PathSegment.Line,.2*ne,.15*ee)).add(new go.PathSegment(go.PathSegment.Line,.3*ne,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,.29*ne,.33*ee)).add(new go.PathSegment(go.PathSegment.Line,.35*ne,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,.3*ne,.15*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*ne,.5*ee,ne,.25*ee,.75*ne,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.55*ne,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*ne,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*ne,ee)).add(new go.PathSegment(go.PathSegment.Line,.3*ne,ee)).add(new go.PathSegment(go.PathSegment.Line,.3*ne,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.45*ne,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.45*ne,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*ne,.5*ee,0,.25*ee).close()))}),go.Shape.setFigureParameter("HourGlass",0,new Vn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(De,ne,ee){var ce=De?De.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=30),ce>ne&&(ce=ne);var se=(ne-ce)/2,he=se+ce;return new go.Geometry().add(new go.PathFigure(he,.5*ee).add(new go.PathSegment(go.PathSegment.Line,ne,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee)).add(new go.PathSegment(go.PathSegment.Line,se,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,ne,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(0,.55*ee).add(new go.PathSegment(go.PathSegment.Line,.6*ne,0)).add(new go.PathSegment(go.PathSegment.Line,.3*ne,.45*ee)).add(new go.PathSegment(go.PathSegment.Line,ne,.45*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*ne,ee)).add(new go.PathSegment(go.PathSegment.Line,.7*ne,.55*ee).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(De,ne,ee){var ce=new go.Geometry,se=Ne*.4,he=.4,ve=.5,be=.5,ke=ge(),Be=ge(),He=ge(),We=ge(),rt=new go.PathFigure((ve-he)*ne,be*ee,!1);ce.add(rt),rt.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be-he)*ee,(ve-he)*ne,(be-se)*ee,(ve-se)*ne,(be-he)*ee)),ut(ve,be-he,ve+se,be-he,ve+he,be-se,ve+he,be,.44,He,We,Be,ke,ke),rt.add(new go.PathSegment(go.PathSegment.Bezier,Be.x*ne,Be.y*ee,He.x*ne,He.y*ee,We.x*ne,We.y*ee));var Qe=pe(Be.x,Be.y);ut(ve,be-he,ve+se,be-he,ve+he,be-se,ve+he,be,.56,ke,ke,Be,He,We);var Pt=pe(Be.x,Be.y);rt.add(new go.PathSegment(go.PathSegment.Line,(Qe.x*.1+.95*.9)*ne,Qe.y*.1*ee)),rt.add(new go.PathSegment(go.PathSegment.Line,.85*ne,Qe.y*.1*ee)),rt.add(new go.PathSegment(go.PathSegment.Line,.85*ne,0)),rt.add(new go.PathSegment(go.PathSegment.Line,ne,0)),rt.add(new go.PathSegment(go.PathSegment.Line,ne,.15*ee)),rt.add(new go.PathSegment(go.PathSegment.Line,(Pt.x*.1+.9)*ne,.15*ee)),rt.add(new go.PathSegment(go.PathSegment.Line,(Pt.x*.1+.9)*ne,(Pt.y*.1+.05*.9)*ee)),rt.add(new go.PathSegment(go.PathSegment.Line,Pt.x*ne,Pt.y*ee)),rt.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*ne,be*ee,He.x*ne,He.y*ee,We.x*ne,We.y*ee)),rt.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee,(ve+se)*ne,(be+he)*ee)),rt.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*ne,be*ee,(ve-se)*ne,(be+he)*ee,(ve-he)*ne,(be+se)*ee)),he=.35,se=Ne*.35;var Ze=new go.PathFigure(ve*ne,(be-he)*ee,!1);ce.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*ne,be*ee,(ve-se)*ne,(be-he)*ee,(ve-he)*ne,(be-se)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be+he)*ee,(ve-he)*ne,(be+se)*ee,(ve-se)*ne,(be+he)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*ne,be*ee,(ve+se)*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be-he)*ee,(ve+he)*ne,(be-se)*ee,(ve+se)*ne,(be-he)*ee));var Et=new go.PathFigure((ve-he)*ne,be*ee,!1);return ce.add(Et),Oe(ke),Oe(Be),Oe(He),Oe(We),Oe(Qe),Oe(Pt),ce.spot1=new go.Spot(.202,.257),ce.spot2=new go.Spot(.792,.739),ce.defaultStretch=go.GraphObject.Uniform,ce}),go.Shape.defineFigureGenerator("GenderFemale",function(De,ne,ee){var ce=new go.Geometry,se=.375,he=0,ve=-.125,be=se*Ne,ke=new go.PathFigure((.525+he)*ne,(.5+se+ve)*ee,!1);ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+he)*ne,(.5+ve)*ee,(.5+be+he)*ne,(.5+se+ve)*ee,(.5+se+he)*ne,(.5+be+ve)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(.5+he)*ne,(.5-se+ve)*ee,(1-.5+se+he)*ne,(.5-be+ve)*ee,(.5+be+he)*ne,(.5-se+ve)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+he)*ne,(.5+ve)*ee,(.5-be+he)*ne,(.5-se+ve)*ee,(.5-se+he)*ne,(.5-be+ve)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(.475+he)*ne,(.5+se+ve)*ee,(.5-se+he)*ne,(.5+be+ve)*ee,(.5-be+he)*ne,(.5+se+ve)*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.475*ne,.85*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.425*ne,.85*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.425*ne,.9*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.475*ne,.9*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.475*ne,ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.525*ne,ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.525*ne,.9*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.575*ne,.9*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.575*ne,.85*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.525*ne,.85*ee).close()),se=.325,he=0,ve=-.125,be=se*Ne;var ke=new go.PathFigure((1-.5+se+he)*ne,(.5+ve)*ee,!1);ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,(.5+he)*ne,(.5+se+ve)*ee,(.5+se+he)*ne,(.5+be+ve)*ee,(.5+be+he)*ne,(.5+se+ve)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+he)*ne,(.5+ve)*ee,(.5-be+he)*ne,(.5+se+ve)*ee,(.5-se+he)*ne,(.5+be+ve)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(.5+he)*ne,(.5-se+ve)*ee,(.5-se+he)*ne,(.5-be+ve)*ee,(.5-be+he)*ne,(.5-se+ve)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+he)*ne,(.5+ve)*ee,(.5+be+he)*ne,(.5-se+ve)*ee,(1-.5+se+he)*ne,(.5-be+ve)*ee));var ke=new go.PathFigure((.525+he)*ne,(.5+se+ve)*ee,!1);return ce.add(ke),ce.spot1=new go.Spot(.232,.136),ce.spot2=new go.Spot(.682,.611),ce.defaultStretch=go.GraphObject.Uniform,ce}),go.Shape.defineFigureGenerator("LogicImplies",function(De,ne,ee){var ce=De?De.parameter1:NaN;return isNaN(ce)&&(ce=.2),new go.Geometry().add(new go.PathFigure((1-ce)*ne,0,!1).add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ce)*ne,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(De,ne,ee){var ce=De?De.parameter1:NaN;return isNaN(ce)&&(ce=.2),new go.Geometry().add(new go.PathFigure((1-ce)*ne,0,!1).add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ce)*ne,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,ce*ne,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,ce*ne,ee))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne,ee)))}),go.Shape.defineFigureGenerator("LogicAnd",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne,ee))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)).add(new go.PathSegment(go.PathSegment.Line,ne,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(De,ne,ee){var ce=new go.Geometry().add(new go.PathFigure(.5*ne,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*ne,.5*ee,.5*ne,.5*ee)));return ce.defaultStretch=go.GraphObject.Uniform,ce}),go.Shape.defineFigureGenerator("LogicTruth",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Move,.5*ne,0)).add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,ne,ee)).add(new go.PathSegment(go.PathSegment.Move,.5*ne,ee)).add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,ne,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,ne,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee)))}),go.Shape.defineFigureGenerator("LogicForAll",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Move,.25*ne,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.75*ne,.5*ee))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,0,ee)).add(new go.PathSegment(go.PathSegment.Line,ne,ee))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(De,ne,ee){var ce=.5;return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,0,ce*ee)).add(new go.PathSegment(go.PathSegment.Arc,180,180,ce*ne,ce*ee,ce*ne,ce*ee)).add(new go.PathSegment(go.PathSegment.Line,ne,ee))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(De,ne,ee){var ce=.5;return new go.Geometry().add(new go.PathFigure(ne,0,!1).add(new go.PathSegment(go.PathSegment.Line,ne,ce*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,180,ce*ne,ce*ee,ce*ne,ce*ee)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new Vn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new Vn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(De,ne,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=.3);var se=De?De.parameter2:NaN;isNaN(se)&&(se=.3);var he=(1-ce)*ne,ve=(.5-se/2)*ee,be=(.5+se/2)*ee,ke=new go.Geometry,Be=new go.PathFigure(0,ve,!0);ke.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,he,ve)),Be.add(new go.PathSegment(go.PathSegment.Line,he,0)),Be.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,he,ee)),Be.add(new go.PathSegment(go.PathSegment.Line,he,be)),Be.add(new go.PathSegment(go.PathSegment.Line,0,be).close()),ke.spot1=new go.Spot(0,ve/ee);var He=Ke(0,be/ee,1,be/ee,he/ne,1,1,.5,ge());return ke.spot2=new go.Spot(He.x,He.y),Oe(He),ke}),go.Shape.setFigureParameter("Arrow2",0,new Vn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new Vn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(De,ne,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=30),ce>ne&&(ce=ne);var se=De?De.parameter2:NaN;isNaN(se)&&(se=30),se=Math.min(se,ee/2);var he=ne-ce,ve=(ee-se)/2,be=ve+se,ke=new go.Geometry,Be=new go.PathFigure(0,ve,!0);ke.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,he,ve)),Be.add(new go.PathSegment(go.PathSegment.Line,he,0)),Be.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,he,ee)),Be.add(new go.PathSegment(go.PathSegment.Line,he,be)),Be.add(new go.PathSegment(go.PathSegment.Line,0,be).close()),ke.spot1=new go.Spot(0,ve/ee);var He=Ke(0,be/ee,1,be/ee,he/ne,1,1,.5,ge());return ke.spot2=new go.Spot(He.x,He.y),Oe(He),ke}),go.Shape.defineFigureGenerator("Chevron",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*ee).close()),ce}),go.Shape.defineFigureGenerator("DoubleArrow",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,.214*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,1*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,.786*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,1*ee).close()),ce}),go.Shape.setFigureParameter("DoubleEndArrow",0,new Vn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(De,ne,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=.3);var se=(.5-ce/2)*ee,he=(.5+ce/2)*ee,ve=new go.Geometry,be=new go.PathFigure(ne,.5*ee,!0);ve.add(be),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ee)),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,he)),be.add(new go.PathSegment(go.PathSegment.Line,.3*ne,he)),be.add(new go.PathSegment(go.PathSegment.Line,.3*ne,ee)),be.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.3*ne,0)),be.add(new go.PathSegment(go.PathSegment.Line,.3*ne,se)),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,se)),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,0).close());var ke=Ke(0,.5,.3,0,0,se/ee,.1,se/ee,ge());return ve.spot1=new go.Spot(ke.x,ke.y),ke=Ke(.7,1,1,.5,0,he/ee,1,he/ee,ke),ve.spot2=new go.Spot(ke.x,ke.y),Oe(ke),ve}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new Vn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new Vn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(De,ne,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=40);var se=De?De.parameter2:NaN;isNaN(se)&&(se=100);var he=(ee-ce)/2,ve=he+ce,be=(ee-se)/2,ke=be+se;(ce>ee||se>ee)&&(se>ce?(ce=ce*ee/se,he=(ee-ce)/2,ve=he+ce,be=0,ke=ee):(he=0,ve=ee,be=0,ke=ee));var Be=new go.Geometry,He=new go.PathFigure(ne,.5*ee,!0);Be.add(He),He.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ke)),He.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ve)),He.add(new go.PathSegment(go.PathSegment.Line,.3*ne,ve)),He.add(new go.PathSegment(go.PathSegment.Line,.3*ne,ke)),He.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),He.add(new go.PathSegment(go.PathSegment.Line,.3*ne,be)),He.add(new go.PathSegment(go.PathSegment.Line,.3*ne,he)),He.add(new go.PathSegment(go.PathSegment.Line,.7*ne,he)),He.add(new go.PathSegment(go.PathSegment.Line,.7*ne,be).close());var We=Ke(0,.5,.3,be/ee,0,he/ee,1,he/ee,ge());return Be.spot1=new go.Spot(We.x,We.y),We=Ke(.7,ke/ee,1,.5,0,ve/ee,1,ve/ee,We),Be.spot2=new go.Spot(We.x,We.y),Oe(We),Be}),go.Shape.setFigureParameter("IBeamArrow",0,new Vn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(De,ne,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=.3);var se=(.5-ce/2)*ee,he=(.5+ce/2)*ee,ve=new go.Geometry,be=new go.PathFigure(ne,.5*ee,!0);ve.add(be),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ee)),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,he)),be.add(new go.PathSegment(go.PathSegment.Line,.2*ne,he)),be.add(new go.PathSegment(go.PathSegment.Line,.2*ne,ee)),be.add(new go.PathSegment(go.PathSegment.Line,0,ee)),be.add(new go.PathSegment(go.PathSegment.Line,0,0)),be.add(new go.PathSegment(go.PathSegment.Line,.2*ne,0)),be.add(new go.PathSegment(go.PathSegment.Line,.2*ne,se)),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,se)),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,0).close()),ve.spot1=new go.Spot(0,se/ee);var ke=Ke(.7,1,1,.5,0,he/ee,1,he/ee,ge());return ve.spot2=new go.Spot(ke.x,ke.y),Oe(ke),ve}),go.Shape.setFigureParameter("IBeamArrow2",0,new Vn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new Vn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(De,ne,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=40);var se=De?De.parameter2:NaN;isNaN(se)&&(se=100);var he=(ee-ce)/2,ve=he+ce,be=(ee-se)/2,ke=be+se;(ce>ee||se>ee)&&(se>ce?(ce=ce*ee/se,he=(ee-ce)/2,ve=he+ce,be=0,ke=ee):(he=0,ve=ee,be=0,ke=ee));var Be=new go.Geometry,He=new go.PathFigure(ne,.5*ee,!0);Be.add(He),He.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ke)),He.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ve)),He.add(new go.PathSegment(go.PathSegment.Line,.2*ne,ve)),He.add(new go.PathSegment(go.PathSegment.Line,.2*ne,ke)),He.add(new go.PathSegment(go.PathSegment.Line,0,ke)),He.add(new go.PathSegment(go.PathSegment.Line,0,be)),He.add(new go.PathSegment(go.PathSegment.Line,.2*ne,be)),He.add(new go.PathSegment(go.PathSegment.Line,.2*ne,he)),He.add(new go.PathSegment(go.PathSegment.Line,.7*ne,he)),He.add(new go.PathSegment(go.PathSegment.Line,.7*ne,be).close()),Be.spot1=new go.Spot(0,he/ee);var We=Ke(.7,ke/ee,1,.5,0,ve/ee,1,ve/ee,ge());return Be.spot2=new go.Spot(We.x,We.y),Oe(We),Be}),go.Shape.setFigureParameter("Pointer",0,new Vn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(De,ne,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=.1);var se=new go.Geometry,he=new go.PathFigure(ne,.5*ee,!0);se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,ce*ne,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),se.spot1=new go.Spot(ce,.35);var ve=Ke(.2,.65,1,.65,0,1,1,.5,ge());return se.spot2=new go.Spot(ve.x,ve.y),Oe(ve),se}),go.Shape.setFigureParameter("RoundedPointer",0,new Vn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(De,ne,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=.3);var se=new go.Geometry,he=new go.PathFigure(ne,.5*ee,!0);se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ce*ne,.75*ee,ce*ne,.25*ee).close()),se.spot1=new go.Spot(ce,.35);var ve=Ke(0,.65,1,.65,0,1,1,.5,ge());return se.spot2=new go.Spot(ve.x,ve.y),Oe(ve),se}),go.Shape.setFigureParameter("SplitEndArrow",0,new Vn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(De,ne,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=.4);var se=(.5-ce/2)*ee,he=(.5+ce/2)*ee,ve=new go.Geometry,be=new go.PathFigure(ne,.5*ee,!0);ve.add(be),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ee)),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,he)),be.add(new go.PathSegment(go.PathSegment.Line,0,he)),be.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Line,0,se)),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,se)),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,0).close()),ve.spot1=new go.Spot(.2,.3);var ke=Ke(.7,1,1,.5,0,he/ee,1,he/ee,ge());return ve.spot2=new go.Spot(ke.x,ke.y),Oe(ke),ve}),go.Shape.setFigureParameter("SplitEndArrow2",0,new Vn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(De,ne,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=50);var se=(ee-ce)/2,he=se+ce;ce>ee&&(se=0,he=ee);var ve=new go.Geometry,be=new go.PathFigure(ne,.5*ee,!0);ve.add(be),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ee)),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,he)),be.add(new go.PathSegment(go.PathSegment.Line,0,he)),be.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Line,0,se)),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,se)),be.add(new go.PathSegment(go.PathSegment.Line,.7*ne,0).close()),ve.spot1=new go.Spot(.2,se/ee);var ke=Ke(.7,1,1,.5,0,he/ee,1,he/ee,ge());return ve.spot2=new go.Spot(ke.x,ke.y),Oe(ke),ve}),go.Shape.setFigureParameter("SquareArrow",0,new Vn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(De,ne,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=.7);var se=new go.Geometry,he=new go.PathFigure(ne,.5*ee,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ce*ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,0)),he.add(new go.PathSegment(go.PathSegment.Line,ce*ne,0).close()),se.spot1=go.Spot.TopLeft,se.spot2=new go.Spot(ce,1),se}),go.Shape.defineFigureGenerator("Cone1",function(De,ne,ee){var ce=new go.Geometry,se=Ne*.5,he=Ne*.1,ve=new go.PathFigure(0,.9*ee,!0);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,ee,ne,(.9+he)*ee,(.5+se)*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-se)*ne,ee,0,(.9+he)*ee).close()),ce.spot1=new go.Spot(.25,.5),ce.spot2=new go.Spot(.75,.97),ce}),go.Shape.defineFigureGenerator("Cone2",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.9*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,ne,.9*ee,(1-.85/.9)*ne,ee,.85/.9*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee).close());var he=new go.PathFigure(0,.9*ee,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Bezier,ne,.9*ee,(1-.85/.9)*ne,.8*ee,.85/.9*ne,.8*ee)),ce.spot1=new go.Spot(.25,.5),ce.spot2=new go.Spot(.75,.82),ce}),go.Shape.defineFigureGenerator("Cube1",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.5*ne,ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee).close());var he=new go.PathFigure(.5*ne,ee,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.15*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Line,ne,.15*ee)),ce.spot1=new go.Spot(0,.3),ce.spot2=new go.Spot(.5,.85),ce}),go.Shape.defineFigureGenerator("Cube2",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.3*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,0).close());var he=new go.PathFigure(0,.3*ee,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Line,ne,0)),he.add(new go.PathSegment(go.PathSegment.Move,.7*ne,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ee)),ce.spot1=new go.Spot(0,.3),ce.spot2=new go.Spot(.7,1),ce}),go.Shape.defineFigureGenerator("Cylinder1",function(De,ne,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=5),ce=Math.min(ce,ee/3);var se=new go.Geometry,he=Ne*.5,ve=new go.PathFigure(0,ce,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,0,Ne*ce,(.5-he)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,1*ne,ce,(.5+he)*ne,0,1*ne,Ne*ce)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,ee-ce)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,1*ee,1*ne,ee-Ne*ce,(.5+he)*ne,1*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ce,(.5-he)*ne,1*ee,0,ee-Ne*ce)),ve.add(new go.PathSegment(go.PathSegment.Line,0,ce));var be=new go.PathFigure(ne,ce,!1);return se.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,2*ce,1*ne,2*ce-Ne*ce,(.5+he)*ne,2*ce)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,ce,(.5-he)*ne,2*ce,0,2*ce-Ne*ce)),se.spot1=new go.Spot(0,0,0,2*ce),se.spot2=new go.Spot(1,1),se}),go.Shape.defineFigureGenerator("Cylinder2",function(De,ne,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=5),ce=Math.min(ce,ee/3);var se=new go.Geometry,he=Ne*.5,ve=new go.PathFigure(0,ee-ce,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,0,ce)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,0,Ne*ce,(.5-he)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,ce,(.5+he)*ne,0,ne,Ne*ce)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,ee-ce)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,ee,ne,ee-Ne*ce,(.5+he)*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ce,(.5-he)*ne,ee,0,ee-Ne*ce));var be=new go.PathFigure(0,ee-ce,!1);return se.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,ee-2*ce,0,ee-ce-Ne*ce,(.5-he)*ne,ee-2*ce)),be.add(new go.PathSegment(go.PathSegment.Bezier,ne,ee-ce,(.5+he)*ne,ee-2*ce,ne,ee-ce-Ne*ce)),se.spot1=new go.Spot(0,0),se.spot2=new go.Spot(1,1,0,-2*ce),se}),go.Shape.defineFigureGenerator("Cylinder3",function(De,ne,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=5),ce=Math.min(ce,ne/3);var se=new go.Geometry,he=Ne*.5,ve=new go.PathFigure(ce,0,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne-ce,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*ee,ne-Ne*ce,0,ne,(.5-he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne-ce,ee,ne,(.5+he)*ee,ne-Ne*ce,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,ce,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,Ne*ce,ee,0,(.5+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ce,0,0,(.5-he)*ee,Ne*ce,0));var be=new go.PathFigure(ce,0,!1);return se.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,2*ce,.5*ee,ce+Ne*ce,0,2*ce,(.5-he)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,ce,ee,2*ce,(.5+he)*ee,ce+Ne*ce,ee)),se.spot1=new go.Spot(0,0,2*ce,0),se.spot2=new go.Spot(1,1),se}),go.Shape.defineFigureGenerator("Cylinder4",function(De,ne,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=5),ce=Math.min(ce,ne/3);var se=new go.Geometry,he=Ne*.5,ve=new go.PathFigure(ne-ce,0,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*ee,ne-Ne*ce,0,ne,(.5-he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne-ce,ee,ne,(.5+he)*ee,ne-Ne*ce,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,ce,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,Ne*ce,ee,0,(.5+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ce,0,0,(.5-he)*ee,Ne*ce,0)),ve.add(new go.PathSegment(go.PathSegment.Line,ne-ce,0));var be=new go.PathFigure(ne-ce,0,!1);return se.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,ne-2*ce,.5*ee,ne-ce-Ne*ce,0,ne-2*ce,(.5-he)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,ne-ce,ee,ne-2*ce,(.5+he)*ee,ne-ce-Ne*ce,ee)),se.spot1=new go.Spot(0,0),se.spot2=new go.Spot(1,1,-2*ce,0),se}),go.Shape.defineFigureGenerator("Prism1",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.25*ne,.25*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var he=new go.PathFigure(.25*ne,.25*ee,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)),ce.spot1=new go.Spot(.408,.172),ce.spot2=new go.Spot(.833,.662),ce}),go.Shape.defineFigureGenerator("Prism2",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.25*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var he=new go.PathFigure(0,ee,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.25*ne,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,ne,.25*ee)),he.add(new go.PathSegment(go.PathSegment.Move,0,.25*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.25*ne,.5*ee)),ce.spot1=new go.Spot(.25,.5),ce.spot2=new go.Spot(.75,.75),ce}),go.Shape.defineFigureGenerator("Pyramid1",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.5*ne,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee).close());var he=new go.PathFigure(.5*ne,0,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)),ce.spot1=new go.Spot(.25,.367),ce.spot2=new go.Spot(.75,.875),ce}),go.Shape.defineFigureGenerator("Pyramid2",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.5*ne,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee).close());var he=new go.PathFigure(.5*ne,0,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.7*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.7*ee)),he.add(new go.PathSegment(go.PathSegment.Line,ne,.85*ee)),ce.spot1=new go.Spot(.25,.367),ce.spot2=new go.Spot(.75,.875),ce}),go.Shape.defineFigureGenerator("Actor",function(De,ne,ee){var ce=new go.Geometry,se=.2,he=.1,ve=Ne*se,be=Ne*he,ke=.5,Be=.1,He=new go.PathFigure(ke*ne,(Be+he)*ee,!0);ce.add(He),He.add(new go.PathSegment(go.PathSegment.Bezier,(ke-se)*ne,Be*ee,(ke-ve)*ne,(Be+he)*ee,(ke-se)*ne,(Be+be)*ee)),He.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne,(Be-he)*ee,(ke-se)*ne,(Be-be)*ee,(ke-ve)*ne,(Be-he)*ee)),He.add(new go.PathSegment(go.PathSegment.Bezier,(ke+se)*ne,Be*ee,(ke+ve)*ne,(Be-he)*ee,(ke+se)*ne,(Be-be)*ee)),He.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne,(Be+he)*ee,(ke+se)*ne,(Be+be)*ee,(ke+ve)*ne,(Be+he)*ee));var We=.05,rt=Ne*We;ke=.05,Be=.25;var Qe=new go.PathFigure(.5*ne,.2*ee,!0);return ce.add(Qe),Qe.add(new go.PathSegment(go.PathSegment.Line,.95*ne,.2*ee)),ke=.95,Be=.25,Qe.add(new go.PathSegment(go.PathSegment.Bezier,(ke+We)*ne,Be*ee,(ke+rt)*ne,(Be-We)*ee,(ke+We)*ne,(Be-rt)*ee)),Qe.add(new go.PathSegment(go.PathSegment.Line,ne,.6*ee)),Qe.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.6*ee)),Qe.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.35*ee)),We=.025,rt=Ne*We,ke=.825,Be=.35,Qe.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne,(Be-We)*ee,(ke+We)*ne,(Be-rt)*ee,(ke+rt)*ne,(Be-We)*ee)),Qe.add(new go.PathSegment(go.PathSegment.Bezier,(ke-We)*ne,Be*ee,(ke-rt)*ne,(Be-We)*ee,(ke-We)*ne,(Be-rt)*ee)),Qe.add(new go.PathSegment(go.PathSegment.Line,.8*ne,ee)),Qe.add(new go.PathSegment(go.PathSegment.Line,.55*ne,ee)),Qe.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.7*ee)),We=.05,rt=Ne*We,ke=.5,Be=.7,Qe.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne,(Be-We)*ee,(ke+We)*ne,(Be-rt)*ee,(ke+rt)*ne,(Be-We)*ee)),Qe.add(new go.PathSegment(go.PathSegment.Bezier,(ke-We)*ne,Be*ee,(ke-rt)*ne,(Be-We)*ee,(ke-We)*ne,(Be-rt)*ee)),Qe.add(new go.PathSegment(go.PathSegment.Line,.45*ne,ee)),Qe.add(new go.PathSegment(go.PathSegment.Line,.2*ne,ee)),Qe.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.35*ee)),We=.025,rt=Ne*We,ke=.175,Be=.35,Qe.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne,(Be-We)*ee,(ke+We)*ne,(Be-rt)*ee,(ke+rt)*ne,(Be-We)*ee)),Qe.add(new go.PathSegment(go.PathSegment.Bezier,(ke-We)*ne,Be*ee,(ke-rt)*ne,(Be-We)*ee,(ke-We)*ne,(Be-rt)*ee)),Qe.add(new go.PathSegment(go.PathSegment.Line,.15*ne,.6*ee)),Qe.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),Qe.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),We=.05,rt=Ne*We,ke=.05,Be=.25,Qe.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne,(Be-We)*ee,(ke-We)*ne,(Be-rt)*ee,(ke-rt)*ne,(Be-We)*ee)),Qe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.2*ee)),ce.spot1=new go.Spot(.2,.2),ce.spot2=new go.Spot(.8,.65),ce}),go.Shape.setFigureParameter("Card",0,new Vn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(De,ne,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=.2);var se=new go.Geometry,he=new go.PathFigure(ne,0,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ce*ee)),he.add(new go.PathSegment(go.PathSegment.Line,ce*ne,0).close()),se.spot1=new go.Spot(0,ce),se.spot2=go.Spot.BottomRight,se}),go.Shape.defineFigureGenerator("Collate",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.5*ne,.5*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*ee));var he=new go.PathFigure(.5*ne,.5*ee,!0);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*ee)),ce.spot1=new go.Spot(.25,0),ce.spot2=new go.Spot(.75,.25),ce}),go.Shape.defineFigureGenerator("CreateRequest",function(De,ne,ee){var ce=new go.Geometry,se=De?De.parameter1:NaN;isNaN(se)&&(se=.1);var he=new go.PathFigure(0,0,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,0)),he.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ve=new go.PathFigure(0,se*ee,!1);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,se*ee)),ve.add(new go.PathSegment(go.PathSegment.Move,0,(1-se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,(1-se)*ee)),ce}),go.Shape.defineFigureGenerator("Database",function(De,ne,ee){var ce=new go.Geometry,se=Ne*.5,he=Ne*.1,ve=new go.PathFigure(ne,.1*ee,!0);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,ee,ne,(.9+he)*ee,(.5+se)*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-se)*ne,ee,0,(.9+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,0,(.1-he)*ee,(.5-se)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,.1*ee,(.5+se)*ne,0,ne,(.1-he)*ee));var be=new go.PathFigure(ne,.1*ee,!1);return ce.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.2*ee,ne,(.1+he)*ee,(.5+se)*ne,.2*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-se)*ne,.2*ee,0,(.1+he)*ee)),be.add(new go.PathSegment(go.PathSegment.Move,ne,.2*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.3*ee,ne,(.2+he)*ee,(.5+se)*ne,.3*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-se)*ne,.3*ee,0,(.2+he)*ee)),be.add(new go.PathSegment(go.PathSegment.Move,ne,.3*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.4*ee,ne,(.3+he)*ee,(.5+se)*ne,.4*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,(.5-se)*ne,.4*ee,0,(.3+he)*ee)),ce.spot1=new go.Spot(0,.4),ce.spot2=new go.Spot(1,.9),ce}),go.Shape.defineFigureGenerator("DataStorage",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.75*ne,ee,ne,0,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*ne,.9*ee,.25*ne,.1*ee).close()),ce.spot1=new go.Spot(.226,0),ce.spot2=new go.Spot(.81,1),ce}),go.Shape.defineFigureGenerator("DiskStorage",function(De,ne,ee){var ce=new go.Geometry,se=Ne*.5,he=Ne*.1,ve=new go.PathFigure(ne,.1*ee,!0);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,ee,ne,(.9+he)*ee,(.5+se)*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-se)*ne,ee,0,(.9+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,0,(.1-he)*ee,(.5-se)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,.1*ee,(.5+se)*ne,0,ne,(.1-he)*ee));var be=new go.PathFigure(ne,.1*ee,!1);return ce.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.2*ee,ne,(.1+he)*ee,(.5+se)*ne,.2*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-se)*ne,.2*ee,0,(.1+he)*ee)),be.add(new go.PathSegment(go.PathSegment.Move,ne,.2*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.3*ee,ne,(.2+he)*ee,(.5+se)*ne,.3*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-se)*ne,.3*ee,0,(.2+he)*ee)),ce.spot1=new go.Spot(0,.3),ce.spot2=new go.Spot(1,.9),ce}),go.Shape.defineFigureGenerator("Display",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.25*ne,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.75*ne,ee,ne,0,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.25*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close()),ce.spot1=new go.Spot(.25,0),ce.spot2=new go.Spot(.75,1),ce}),go.Shape.defineFigureGenerator("DividedEvent",function(De,ne,ee){var ce=new go.Geometry,se=De?De.parameter1:NaN;isNaN(se)?se=.2:se<.15&&(se=.15);var he=Ne*.2,ve=new go.PathFigure(0,.2*ee,!0);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,.2*ne,0,0,(.2-he)*ee,(.2-he)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Line,.8*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,.2*ee,(.8+he)*ne,0,ne,(.2-he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,.8*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,ee,ne,(.8+he)*ee,(.8+he)*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.2*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*ee,(.2-he)*ne,ee,0,(.8+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee));var be=new go.PathFigure(0,se*ee,!1);return ce.add(be),be.add(new go.PathSegment(go.PathSegment.Line,ne,se*ee)),ce}),go.Shape.defineFigureGenerator("DividedProcess",function(De,ne,ee){var ce=new go.Geometry,se=De?De.parameter1:NaN;(isNaN(se)||se<.1)&&(se=.1);var he=new go.PathFigure(0,0,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,0)),he.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ve=new go.PathFigure(0,se*ee,!1);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,se*ee)),ce}),go.Shape.defineFigureGenerator("Document",function(De,ne,ee){var ce=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(0,.7*ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*ne,.4*ee,.5*ne,ee).close()),ce.spot1=go.Spot.TopLeft,ce.spot2=new go.Spot(1,.6),ce}),go.Shape.defineFigureGenerator("ExternalOrganization",function(De,ne,ee){var ce=new go.Geometry,se=De?De.parameter1:NaN;(isNaN(se)||se<.2)&&(se=.2);var he=new go.PathFigure(0,0,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,0)),he.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ve=new go.PathFigure(se*ne,0,!1);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,0,se*ee)),ve.add(new go.PathSegment(go.PathSegment.Move,ne,se*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(1-se)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Move,0,(1-se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,se*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Move,(1-se)*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,(1-se)*ee)),ce}),go.Shape.defineFigureGenerator("ExternalProcess",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.5*ne,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close());var he=new go.PathFigure(.1*ne,.4*ee,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.9*ne,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.6*ne,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.4*ne,.9*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.9*ee)),ce.spot1=new go.Spot(.25,.25),ce.spot2=new go.Spot(.75,.75),ce}),go.Shape.defineFigureGenerator("File",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var he=new go.PathFigure(.75*ne,0,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.25*ee)),he.add(new go.PathSegment(go.PathSegment.Line,ne,.25*ee)),ce.spot1=new go.Spot(0,.25),ce.spot2=go.Spot.BottomRight,ce}),go.Shape.defineFigureGenerator("Interrupt",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne,.5*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee));var he=new go.PathFigure(ne,.5*ee,!1);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,ee));var ve=new go.PathFigure(ne,.5*ee,!1);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ce.spot1=new go.Spot(0,.25),ce.spot2=new go.Spot(.5,.75),ce}),go.Shape.defineFigureGenerator("InternalStorage",function(De,ne,ee){var ce=new go.Geometry,se=De?De.parameter1:NaN,he=De?De.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(he)&&(he=.1);var ve=new go.PathFigure(0,0,!0);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var be=new go.PathFigure(se*ne,0,!1);return ce.add(be),be.add(new go.PathSegment(go.PathSegment.Line,se*ne,ee)),be.add(new go.PathSegment(go.PathSegment.Move,0,he*ee)),be.add(new go.PathSegment(go.PathSegment.Line,ne,he*ee)),ce}),go.Shape.defineFigureGenerator("Junction",function(De,ne,ee){var ce=new go.Geometry,se=1/Math.SQRT2,he=(1-1/Math.SQRT2)/2,ve=Ne*.5,be=.5,ke=new go.PathFigure(ne,be*ee,!0);ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,be*ne,ee,ne,(be+ve)*ee,(be+ve)*ne,ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,0,be*ee,(be-ve)*ne,ee,0,(be+ve)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,be*ne,0,0,(be-ve)*ee,(be-ve)*ne,0)),ke.add(new go.PathSegment(go.PathSegment.Bezier,ne,be*ee,(be+ve)*ne,0,ne,(be-ve)*ee));var Be=new go.PathFigure((he+se)*ne,(he+se)*ee,!1);return ce.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,he*ne,he*ee)),Be.add(new go.PathSegment(go.PathSegment.Move,he*ne,(he+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,(he+se)*ne,he*ee)),ce}),go.Shape.defineFigureGenerator("LinedDocument",function(De,ne,ee){var ce=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(0,.7*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*ne,.4*ee,.5*ne,ee).close());var he=new go.PathFigure(.1*ne,0,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.75*ee)),ce.spot1=new go.Spot(.1,0),ce.spot2=new go.Spot(1,.6),ce}),go.Shape.defineFigureGenerator("LoopLimit",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.25*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee).close()),ce.spot1=new go.Spot(0,.25),ce.spot2=go.Spot.BottomRight,ce}),go.Shape.defineFigureGenerator("MagneticTape",function(De,ne,ee){var ce=new go.Geometry,se=Ne*.5,he=.5,ve=new go.PathFigure(.5*ne,ee,!0);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,he*ee,(he-se)*ne,ee,0,(he+se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,he*ne,0,0,(he-se)*ee,(he-se)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,he*ee,(he+se)*ne,0,ne,(he-se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(he+.1)*ne,.9*ee,ne,(he+se)*ee,(he+se)*ne,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)),ce.spot1=new go.Spot(.15,.15),ce.spot2=new go.Spot(.85,.8),ce}),go.Shape.defineFigureGenerator("ManualInput",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee).close()),ce.spot1=new go.Spot(0,.25),ce.spot2=go.Spot.BottomRight,ce}),go.Shape.defineFigureGenerator("MessageFromUser",function(De,ne,ee){var ce=new go.Geometry,se=De?De.parameter1:NaN;isNaN(se)&&(se=.7);var he=new go.PathFigure(0,0,!0);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,0)),he.add(new go.PathSegment(go.PathSegment.Line,se*ne,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ce.spot1=go.Spot.TopLeft,ce}),go.Shape.defineFigureGenerator("MicroformProcessing",function(De,ne,ee){var ce=new go.Geometry,se=De?De.parameter1:NaN;isNaN(se)&&(se=.25);var he=new go.PathFigure(0,0,!0);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*ne,se*ee)),he.add(new go.PathSegment(go.PathSegment.Line,ne,0)),he.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*ne,(1-se)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ce}),go.Shape.defineFigureGenerator("MicroformRecording",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ce.spot1=new go.Spot(0,.25),ce.spot2=new go.Spot(1,.75),ce}),go.Shape.defineFigureGenerator("MultiDocument",function(De,ne,ee){var ce=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(ne,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*ne,.44*ee,.96*ne,.47*ee,.93*ne,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.54*ee,.86*ne,.57*ee,.83*ne,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.4*ne,.4*ee,.4*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,0).close());var he=new go.PathFigure(.1*ne,.2*ee,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.2*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.54*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.44*ee)),ce.spot1=new go.Spot(0,.25),ce.spot2=new go.Spot(.8,.77),ce}),go.Shape.defineFigureGenerator("MultiProcess",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.1*ne,.1*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.2*ee).close());var he=new go.PathFigure(.2*ne,.1*ee,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.8*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.1*ne,.2*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.2*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.9*ee)),ce.spot1=new go.Spot(0,.2),ce.spot2=new go.Spot(.8,1),ce}),go.Shape.defineFigureGenerator("OfflineStorage",function(De,ne,ee){var ce=new go.Geometry,se=De?De.parameter1:NaN;isNaN(se)&&(se=.1);var he=1-se,ve=new go.PathFigure(0,0,!0);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ve.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee).close());var be=new go.PathFigure(.5*se*ne,se*ee,!1);return ce.add(be),be.add(new go.PathSegment(go.PathSegment.Line,(1-.5*se)*ne,se*ee)),ce}),go.Shape.defineFigureGenerator("OffPageConnector",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ce.spot1=go.Spot.TopLeft,ce.spot2=new go.Spot(.75,1),ce}),go.Shape.defineFigureGenerator("Or",function(De,ne,ee){var ce=new go.Geometry,se=Ne*.5,he=.5,ve=new go.PathFigure(ne,he*ee,!0);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,he*ne,ee,ne,(he+se)*ee,(he+se)*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,he*ee,(he-se)*ne,ee,0,(he+se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,he*ne,0,0,(he-se)*ee,(he-se)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,he*ee,(he+se)*ne,0,ne,(he-se)*ee));var be=new go.PathFigure(ne,.5*ee,!1);return ce.add(be),be.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Move,.5*ne,ee)),be.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),ce}),go.Shape.defineFigureGenerator("PaperTape",function(De,ne,ee){var ce=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(0,.7*ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,ne,.3*ee,.5*ne,.6*ee,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*ne,.4*ee,.5*ne,ee).close()),ce.spot1=new go.Spot(0,.49),ce.spot2=new go.Spot(1,.75),ce}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(De,ne,ee){var ce=new go.Geometry,se=De?De.parameter1:NaN,he=De?De.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(he)&&(he=.3);var ve=new go.PathFigure(0,0,!0);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ve.add(new go.PathSegment(go.PathSegment.Line,(1-he)*ne,.5*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ce}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(De,ne,ee){var ce=new go.Geometry,se=De?De.parameter1:NaN,he=De?De.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(he)&&(he=.3);var ve=new go.PathFigure(0,0,!0);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,(1-he)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(1-he)*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ce}),go.Shape.defineFigureGenerator("Procedure",function(De,ne,ee){var ce=new go.Geometry,se=De?De.parameter1:NaN;isNaN(se)&&(se=.1);var he=new go.PathFigure(0,0,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,0)),he.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ve=new go.PathFigure((1-se)*ne,0,!1);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,(1-se)*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Move,se*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Line,se*ne,ee)),ce}),go.Shape.defineFigureGenerator("Process",function(De,ne,ee){var ce=new go.Geometry,se=De?De.parameter1:NaN;isNaN(se)&&(se=.1);var he=new go.PathFigure(0,0,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,0)),he.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ve=new go.PathFigure(se*ne,0,!1);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,se*ne,ee)),ce.spot2=go.Spot.BottomRight,ce}),go.Shape.defineFigureGenerator("Sort",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.5*ne,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close());var he=new go.PathFigure(0,.5*ee,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),ce.spot1=new go.Spot(.25,.25),ce.spot2=new go.Spot(.75,.5),ce}),go.Shape.defineFigureGenerator("Start",function(De,ne,ee){var ce=new go.Geometry,se=De?De.parameter1:NaN;isNaN(se)&&(se=.25);var he=new go.PathFigure(se*ne,0,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*ne,.5*ee,.25*ne,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*ne,.5*ee,.25*ne,.5*ee));var ve=new go.PathFigure(se*ne,0,!1);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,se*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Move,(1-se)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Line,(1-se)*ne,ee)),ce.spot1=new go.Spot(se,0),ce.spot2=new go.Spot(1-se,1),ce}),go.Shape.defineFigureGenerator("Terminator",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.25*ne,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*ne,.5*ee,.25*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*ne,.5*ee,.25*ne,.5*ee)),ce.spot1=new go.Spot(.23,0),ce.spot2=new go.Spot(.77,1),ce}),go.Shape.defineFigureGenerator("TransmittalTape",function(De,ne,ee){var ce=new go.Geometry,se=De?De.parameter1:NaN;isNaN(se)&&(se=.1);var he=new go.PathFigure(0,0,!0);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,0)),he.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.75*ne,(1-se)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,(1-se)*ee).close()),ce.spot1=go.Spot.TopLeft,ce}),go.Shape.defineFigureGenerator("AndGate",function(De,ne,ee){var ce=new go.Geometry,se=Ne*.5,he=new go.PathFigure(0,0,!0);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),he.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*ee,(.5+se)*ne,0,ne,(.5-se)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,ee,ne,(.5+se)*ee,(.5+se)*ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ce.spot1=go.Spot.TopLeft,ce.spot2=new go.Spot(.55,1),ce}),go.Shape.defineFigureGenerator("Buffer",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ce.spot1=new go.Spot(0,.25),ce.spot2=new go.Spot(.5,.75),ce}),go.Shape.defineFigureGenerator("Clock",function(De,ne,ee){var ce=new go.Geometry,se=Ne*.5,he=.5,ve=new go.PathFigure(ne,he*ee,!0);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,he*ne,ee,ne,(he+se)*ee,(he+se)*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,he*ee,(he-se)*ne,ee,0,(he+se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,he*ne,0,0,(he-se)*ee,(he-se)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,he*ee,(he+se)*ne,0,ne,(he-se)*ee));var be=new go.PathFigure(ne,he*ee,!1);ce.add(be),be.add(new go.PathSegment(go.PathSegment.Line,ne,he*ee));var ke=new go.PathFigure(.8*ne,.75*ee,!1);return ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.25*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.25*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.75*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.75*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.25*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.25*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.75*ee)),ce}),go.Shape.defineFigureGenerator("Ground",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.5*ne,0,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.3*ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.4*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,ee)),ce}),go.Shape.defineFigureGenerator("Inverter",function(De,ne,ee){var ce=new go.Geometry,se=Ne*.1,he=.1,ve=.9,be=.5,ke=new go.PathFigure(.8*ne,.5*ee,!0);ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ke.add(new go.PathSegment(go.PathSegment.Line,0,0)),ke.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.5*ee));var Be=new go.PathFigure((ve+he)*ne,be*ee,!0);return ce.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee,(ve+se)*ne,(be+he)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*ne,be*ee,(ve-se)*ne,(be+he)*ee,(ve-he)*ne,(be+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be-he)*ee,(ve-he)*ne,(be-se)*ee,(ve-se)*ne,(be-he)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*ne,be*ee,(ve+se)*ne,(be-he)*ee,(ve+he)*ne,(be-se)*ee)),ce.spot1=new go.Spot(0,.25),ce.spot2=new go.Spot(.4,.75),ce}),go.Shape.defineFigureGenerator("NandGate",function(De,ne,ee){var ce=new go.Geometry,se=Ne*.5,he=Ne*.4,ve=Ne*.1,be=.1,ke=.9,Be=.5,He=new go.PathFigure(.8*ne,.5*ee,!0);ce.add(He),He.add(new go.PathSegment(go.PathSegment.Bezier,.4*ne,ee,.8*ne,(.5+he)*ee,(.4+se)*ne,ee)),He.add(new go.PathSegment(go.PathSegment.Line,0,ee)),He.add(new go.PathSegment(go.PathSegment.Line,0,0)),He.add(new go.PathSegment(go.PathSegment.Line,.4*ne,0)),He.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.5*ee,(.4+se)*ne,0,.8*ne,(.5-he)*ee));var We=new go.PathFigure((ke+be)*ne,Be*ee,!0);return ce.add(We),We.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne,(Be+be)*ee,(ke+be)*ne,(Be+ve)*ee,(ke+ve)*ne,(Be+be)*ee)),We.add(new go.PathSegment(go.PathSegment.Bezier,(ke-be)*ne,Be*ee,(ke-ve)*ne,(Be+be)*ee,(ke-be)*ne,(Be+ve)*ee)),We.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne,(Be-be)*ee,(ke-be)*ne,(Be-ve)*ee,(ke-ve)*ne,(Be-be)*ee)),We.add(new go.PathSegment(go.PathSegment.Bezier,(ke+be)*ne,Be*ee,(ke+ve)*ne,(Be-be)*ee,(ke+be)*ne,(Be-ve)*ee)),ce.spot1=new go.Spot(0,.05),ce.spot2=new go.Spot(.55,.95),ce}),go.Shape.defineFigureGenerator("NorGate",function(De,ne,ee){var ce=new go.Geometry,se=.5,he=Ne*se,ve=0,be=.5,ke=new go.PathFigure(.8*ne,.5*ee,!0);ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.7*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*ne,.75*ee,.25*ne,.25*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.5*ee,(ve+he)*ne,(be-se)*ee,.7*ne,(be-he)*ee)),se=.1,he=Ne*.1,ve=.9,be=.5;var Be=new go.PathFigure((ve-se)*ne,be*ee,!0);return ce.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be-se)*ee,(ve-se)*ne,(be-he)*ee,(ve-he)*ne,(be-se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*ne,be*ee,(ve+he)*ne,(be-se)*ee,(ve+se)*ne,(be-he)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be+se)*ee,(ve+se)*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*ne,be*ee,(ve-he)*ne,(be+se)*ee,(ve-se)*ne,(be+he)*ee)),ce.spot1=new go.Spot(.2,.25),ce.spot2=new go.Spot(.6,.75),ce}),go.Shape.defineFigureGenerator("OrGate",function(De,ne,ee){var ce=new go.Geometry,se=.5,he=Ne*se,ve=0,be=.5,ke=new go.PathFigure(0,0,!0);return ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*ee,(ve+he+he)*ne,(be-se)*ee,.8*ne,(be-he)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.8*ne,(be+he)*ee,(ve+he+he)*ne,(be+se)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*ne,.75*ee,.25*ne,.25*ee).close()),ce.spot1=new go.Spot(.2,.25),ce.spot2=new go.Spot(.75,.75),ce}),go.Shape.defineFigureGenerator("XnorGate",function(De,ne,ee){var ce=new go.Geometry,se=.5,he=Ne*se,ve=.2,be=.5,ke=new go.PathFigure(.1*ne,0,!1);ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,.1*ne,ee,.35*ne,.25*ee,.35*ne,.75*ee));var Be=new go.PathFigure(.8*ne,.5*ee,!0);ce.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,.2*ne,ee,.7*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,.2*ne,0,.45*ne,.75*ee,.45*ne,.25*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.5*ee,(ve+he)*ne,(be-se)*ee,.7*ne,(be-he)*ee)),se=.1,he=Ne*.1,ve=.9,be=.5;var He=new go.PathFigure((ve-se)*ne,be*ee,!0);return ce.add(He),He.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be-se)*ee,(ve-se)*ne,(be-he)*ee,(ve-he)*ne,(be-se)*ee)),He.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*ne,be*ee,(ve+he)*ne,(be-se)*ee,(ve+se)*ne,(be-he)*ee)),He.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be+se)*ee,(ve+se)*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee)),He.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*ne,be*ee,(ve-he)*ne,(be+se)*ee,(ve-se)*ne,(be+he)*ee)),ce.spot1=new go.Spot(.4,.25),ce.spot2=new go.Spot(.65,.75),ce}),go.Shape.defineFigureGenerator("XorGate",function(De,ne,ee){var ce=new go.Geometry,se=.5,he=Ne*se,ve=.2,be=.5,ke=new go.PathFigure(.1*ne,0,!1);ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,.1*ne,ee,.35*ne,.25*ee,.35*ne,.75*ee));var Be=new go.PathFigure(.2*ne,0,!0);return ce.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*ee,(ve+he)*ne,(be-se)*ee,.9*ne,(be-he)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,.2*ne,ee,.9*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,.2*ne,0,.45*ne,.75*ee,.45*ne,.25*ee).close()),ce.spot1=new go.Spot(.4,.25),ce.spot2=new go.Spot(.8,.75),ce}),go.Shape.defineFigureGenerator("Capacitor",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),ce}),go.Shape.defineFigureGenerator("Resistor",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.5*ee,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.5*ee)),ce}),go.Shape.defineFigureGenerator("Inductor",function(De,ne,ee){var ce=new go.Geometry,se=Ne*.1,he=.1,ve=.1,be=.5,ke=new go.PathFigure((ve-se*.5)*ne,ee,!1);return ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*ne,0,(ve-se)*ne,ee,(ve-he)*ne,0)),ve=.3,ke.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,ee,(ve+he)*ne,0,(ve+se)*ne,ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*ne,0,(ve-se)*ne,ee,(ve-he)*ne,0)),ve=.5,ke.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,ee,(ve+he)*ne,0,(ve+se)*ne,ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*ne,0,(ve-se)*ne,ee,(ve-he)*ne,0)),ve=.7,ke.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,ee,(ve+he)*ne,0,(ve+se)*ne,ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*ne,0,(ve-se)*ne,ee,(ve-he)*ne,0)),ve=.9,ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se*.5)*ne,ee,(ve+he)*ne,0,(ve+se)*ne,ee)),ce}),go.Shape.defineFigureGenerator("ACvoltageSource",function(De,ne,ee){var ce=new go.Geometry,se=Ne*.5,he=.5,ve=.5,be=.5,ke=new go.PathFigure((ve-he)*ne,be*ee,!1);return ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be-he)*ee,(ve-he)*ne,(be-se)*ee,(ve-se)*ne,(be-he)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*ne,be*ee,(ve+se)*ne,(be-he)*ee,(ve+he)*ne,(be-se)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee,(ve+se)*ne,(be+he)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*ne,be*ee,(ve-se)*ne,(be+he)*ee,(ve-he)*ne,(be+se)*ee)),ke.add(new go.PathSegment(go.PathSegment.Move,(ve-he+.1)*ne,be*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he-.1)*ne,be*ee,ve*ne,(be-he)*ee,ve*ne,(be+he)*ee)),ce}),go.Shape.defineFigureGenerator("DCvoltageSource",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.75*ee,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Move,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),ce}),go.Shape.defineFigureGenerator("Diode",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne,0,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),ce.spot1=new go.Spot(0,.25),ce.spot2=new go.Spot(.5,.75),ce}),go.Shape.defineFigureGenerator("Wifi",function(De,ne,ee){var ce=new go.Geometry,se=ne,he=ee;ne=ne*.38,ee=ee*.6;var ve=Ne*.8,be=.8,ke=0,Be=.5,He=(se-ne)/2,We=(he-ee)/2,rt=new go.PathFigure(ke*ne+He,(Be+be)*ee+We,!0);ce.add(rt),rt.add(new go.PathSegment(go.PathSegment.Bezier,(ke-be)*ne+He,Be*ee+We,(ke-ve)*ne+He,(Be+be)*ee+We,(ke-be)*ne+He,(Be+ve)*ee+We)),rt.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne+He,(Be-be)*ee+We,(ke-be)*ne+He,(Be-ve)*ee+We,(ke-ve)*ne+He,(Be-be)*ee+We)),rt.add(new go.PathSegment(go.PathSegment.Bezier,(ke-be+ve*.5)*ne+He,Be*ee+We,ke*ne+He,(Be-be)*ee+We,(ke-be+ve*.5)*ne+He,(Be-ve)*ee+We)),rt.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne+He,(Be+be)*ee+We,(ke-be+ve*.5)*ne+He,(Be+ve)*ee+We,ke*ne+He,(Be+be)*ee+We).close()),ve=Ne*.4,be=.4,ke=.2,Be=.5;var Qe=new go.PathFigure(ke*ne+He,(Be+be)*ee+We,!0);ce.add(Qe),Qe.add(new go.PathSegment(go.PathSegment.Bezier,(ke-be)*ne+He,Be*ee+We,(ke-ve)*ne+He,(Be+be)*ee+We,(ke-be)*ne+He,(Be+ve)*ee+We)),Qe.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne+He,(Be-be)*ee+We,(ke-be)*ne+He,(Be-ve)*ee+We,(ke-ve)*ne+He,(Be-be)*ee+We)),Qe.add(new go.PathSegment(go.PathSegment.Bezier,(ke-be+ve*.5)*ne+He,Be*ee+We,ke*ne+He,(Be-be)*ee+We,(ke-be+ve*.5)*ne+He,(Be-ve)*ee+We)),Qe.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne+He,(Be+be)*ee+We,(ke-be+ve*.5)*ne+He,(Be+ve)*ee+We,ke*ne+He,(Be+be)*ee+We).close()),ve=Ne*.2,be=.2,ke=.5,Be=.5;var Pt=new go.PathFigure((ke-be)*ne+He,Be*ee+We,!0);ce.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne+He,(Be-be)*ee+We,(ke-be)*ne+He,(Be-ve)*ee+We,(ke-ve)*ne+He,(Be-be)*ee+We)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ke+be)*ne+He,Be*ee+We,(ke+ve)*ne+He,(Be-be)*ee+We,(ke+be)*ne+He,(Be-ve)*ee+We)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne+He,(Be+be)*ee+We,(ke+be)*ne+He,(Be+ve)*ee+We,(ke+ve)*ne+He,(Be+be)*ee+We)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ke-be)*ne+He,Be*ee+We,(ke-ve)*ne+He,(Be+be)*ee+We,(ke-be)*ne+He,(Be+ve)*ee+We)),ve=Ne*.4,be=.4,ke=.8,Be=.5;var Ze=new go.PathFigure(ke*ne+He,(Be-be)*ee+We,!0);ce.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ke+be)*ne+He,Be*ee+We,(ke+ve)*ne+He,(Be-be)*ee+We,(ke+be)*ne+He,(Be-ve)*ee+We)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne+He,(Be+be)*ee+We,(ke+be)*ne+He,(Be+ve)*ee+We,(ke+ve)*ne+He,(Be+be)*ee+We)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ke+be-ve*.5)*ne+He,Be*ee+We,ke*ne+He,(Be+be)*ee+We,(ke+be-ve*.5)*ne+He,(Be+ve)*ee+We)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne+He,(Be-be)*ee+We,(ke+be-ve*.5)*ne+He,(Be-ve)*ee+We,ke*ne+He,(Be-be)*ee+We).close()),ve=Ne*.8,be=.8,ke=1,Be=.5;var Et=new go.PathFigure(ke*ne+He,(Be-be)*ee+We,!0);return ce.add(Et),Et.add(new go.PathSegment(go.PathSegment.Bezier,(ke+be)*ne+He,Be*ee+We,(ke+ve)*ne+He,(Be-be)*ee+We,(ke+be)*ne+He,(Be-ve)*ee+We)),Et.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne+He,(Be+be)*ee+We,(ke+be)*ne+He,(Be+ve)*ee+We,(ke+ve)*ne+He,(Be+be)*ee+We)),Et.add(new go.PathSegment(go.PathSegment.Bezier,(ke+be-ve*.5)*ne+He,Be*ee+We,ke*ne+He,(Be+be)*ee+We,(ke+be-ve*.5)*ne+He,(Be+ve)*ee+We)),Et.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne+He,(Be-be)*ee+We,(ke+be-ve*.5)*ne+He,(Be-ve)*ee+We,ke*ne+He,(Be-be)*ee+We).close()),ce}),go.Shape.defineFigureGenerator("Email",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var he=new go.PathFigure(0,0,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,ne,0)),he.add(new go.PathSegment(go.PathSegment.Move,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.54*ee)),he.add(new go.PathSegment(go.PathSegment.Move,ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.54*ee)),ce}),go.Shape.defineFigureGenerator("Ethernet",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.35*ne,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.65*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*ne,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*ne,0).close());var he=new go.PathFigure(.1*ne,ee,!0,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.4*ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.1*ne,ee).close());var ve=new go.PathFigure(.6*ne,ee,!0,!0);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.9*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.6*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.6*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.6*ne,ee).close());var be=new go.PathFigure(0,.5*ee,!1);return ce.add(be),be.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.4*ee)),be.add(new go.PathSegment(go.PathSegment.Move,.75*ne,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.6*ee)),be.add(new go.PathSegment(go.PathSegment.Move,.25*ne,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.25*ne,.6*ee)),ce}),go.Shape.defineFigureGenerator("Power",function(De,ne,ee){var ce=new go.Geometry,se=Ne*.4,he=.4,ve=.5,be=.5,ke=ge(),Be=ge(),He=ge(),We=ge();ut(ve,be-he,ve+se,be-he,ve+he,be-se,ve+he,be,.5,ke,ke,Be,He,We);var rt=pe(Be.x,Be.y),Qe=new go.PathFigure(Be.x*ne,Be.y*ee,!0);ce.add(Qe),Qe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*ne,be*ee,He.x*ne,He.y*ee,We.x*ne,We.y*ee)),Qe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee,(ve+se)*ne,(be+he)*ee)),Qe.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*ne,be*ee,(ve-se)*ne,(be+he)*ee,(ve-he)*ne,(be+se)*ee)),ut(ve-he,be,ve-he,be-se,ve-se,be-he,ve,be-he,.5,He,We,Be,ke,ke),Qe.add(new go.PathSegment(go.PathSegment.Bezier,Be.x*ne,Be.y*ee,He.x*ne,He.y*ee,We.x*ne,We.y*ee)),se=Ne*.3,he=.3,ut(ve-he,be,ve-he,be-se,ve-se,be-he,ve,be-he,.5,He,We,Be,ke,ke),Qe.add(new go.PathSegment(go.PathSegment.Line,Be.x*ne,Be.y*ee)),Qe.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*ne,be*ee,We.x*ne,We.y*ee,He.x*ne,He.y*ee)),Qe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be+he)*ee,(ve-he)*ne,(be+se)*ee,(ve-se)*ne,(be+he)*ee)),Qe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*ne,be*ee,(ve+se)*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee)),ut(ve,be-he,ve+se,be-he,ve+he,be-se,ve+he,be,.5,ke,ke,Be,He,We),Qe.add(new go.PathSegment(go.PathSegment.Bezier,Be.x*ne,Be.y*ee,We.x*ne,We.y*ee,He.x*ne,He.y*ee).close());var Qe=new go.PathFigure(.45*ne,0,!0);return ce.add(Qe),Qe.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.5*ee)),Qe.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.5*ee)),Qe.add(new go.PathSegment(go.PathSegment.Line,.55*ne,0).close()),Oe(ke),Oe(Be),Oe(He),Oe(We),Oe(rt),ce.spot1=new go.Spot(.25,.45),ce.spot2=new go.Spot(.75,.8),ce}),go.Shape.defineFigureGenerator("Fallout",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,ee/2,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,180,360,ne/2,ee/2,ne/2,ee/2));function he(ve,be,ke){ve.add(new go.PathSegment(go.PathSegment.Move,(.3+be)*ne,(.8+ke)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(.5+be)*ne,(.5+ke)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(.1+be)*ne,(.5+ke)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(.3+be)*ne,(.8+ke)*ee).close())}return he(se,0,0),he(se,.4,0),he(se,.2,-.3),ce}),go.Shape.defineFigureGenerator("IrritationHazard",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.2*ne,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee).close()),ce.spot1=new go.Spot(.3,.3),ce.spot2=new go.Spot(.7,.7),ce}),go.Shape.defineFigureGenerator("ElectricalHazard",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.37*ne,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.11*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.77*ne,.04*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.33*ne,.49*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.37*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.63*ne,.86*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.77*ne,.91*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.34*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.34*ne,.78*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.44*ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.56*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.68*ee).close()),ce}),go.Shape.defineFigureGenerator("FireHazard",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.1*ne,ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.29*ne,0,-.25*ne,.63*ee,.45*ne,.44*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.51*ne,.42*ee,.48*ne,.17*ee,.54*ne,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.59*ne,.18*ee,.59*ne,.29*ee,.58*ne,.28*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.75*ne,.6*ee,.8*ne,.34*ee,.88*ne,.43*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.88*ne,.31*ee,.87*ne,.48*ee,.88*ne,.43*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*ne,ee,1.17*ne,.76*ee,.82*ne,.8*ee).close()),ce.spot1=new go.Spot(.07,.445),ce.spot2=new go.Spot(.884,.958),ce}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(De,ne,ee){var ce=new go.Geometry,se=.5,he=0,ve=0,be=se*Ne,ke=.4*Math.SQRT2/2+.5,Be=.5-.5*Math.SQRT2/2,He=1,We=.5,rt=.5,Qe=0,Pt=new go.PathFigure(ke*ne,(1-Be)*ee,!1);return ce.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,He*ne,We*ee,He*ne,.7*ee,He*ne,We*ee)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(rt+he)*ne,(Qe+he)*ee,(.5+se+he)*ne,(.5-be+he)*ee,(.5+be+he)*ne,(.5-se+he)*ee)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+he)*ne,(.5+ve)*ee,(.5-be+he)*ne,(.5-se+ve)*ee,(.5-se+he)*ne,(.5-be+ve)*ee)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(.35+he)*ne,.9*ee,(.5-se+he)*ne,(.5+be+ve)*ee,(.5-be+he)*ne,.9*ee)),Pt.add(new go.PathSegment(go.PathSegment.Move,(.25+he)*ne,.8*ee)),Pt.add(new go.PathSegment(go.PathSegment.Line,(.35+he)*ne,.9*ee)),Pt.add(new go.PathSegment(go.PathSegment.Line,(.2+he)*ne,.95*ee)),ce}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Move,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),ce}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),ce}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);ce.add(se);var he=new go.PathFigure(ne,ee,!1);ce.add(he);var ve=new go.PathFigure(0,.5*ee,!1);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.5*ee,.2*ne,.35*ee,.3*ne,.35*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*ee,.7*ne,.65*ee,.8*ne,.65*ee)),ce}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee).close()),ce}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.2*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee).close());var se=new go.PathFigure(0,.2*ee,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.2*ee)),ce}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.7*ne,ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*ne,0,.6*ne,.5*ee,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.7*ne,ee,.4*ne,.5*ee,ne,.5*ee).close());var he=new go.PathFigure(.45*ne,.73*ee,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.73*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.38*ne,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.63*ne,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.31*ne,.27*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.56*ne,.27*ee)),ce}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);ce.add(se);var he=new go.PathFigure(.335*ne,(1-.555)*ee,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.335*ne,(1-.405)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ne,(1-.405)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ne,(1-.555)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,ne,.68*ee,(1-.12)*ne,.46*ee,(1-.02)*ne,.54*ee)),he.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.68*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.335*ne,(1-.555)*ee,.02*ne,.54*ee,.12*ne,.46*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.365*ne,(1-.595)*ee));var ve=.5-.285,be=.5,ke=ve,Be=Math.PI/4,He=4*(1-Math.cos(Be))/(3*Math.sin(Be)),We=He*.5,rt=ve,Qe=ve,Pt=He*rt,Ze=He*Qe;he.add(new go.PathSegment(go.PathSegment.Bezier,(be-rt)*ne,ke*ee,(be-(Pt+rt)/2)*ne,(ke+(Qe+Ze)/2)*ee,(be-rt)*ne,(ke+Ze)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,be*ne,(ke-Qe)*ee,(be-rt)*ne,(ke-Ze)*ee,(be-Pt)*ne,(ke-Qe)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,(be+rt)*ne,ke*ee,(be+Pt)*ne,(ke-Qe)*ee,(be+rt)*ne,(ke-Ze)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*ne,(1-.595)*ee,(be+rt)*ne,(ke+Ze)*ee,(be+(Pt+rt)/2)*ne,(ke+(Qe+Ze)/2)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*ne,(1-.595)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ne,(1-.555)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ne,(1-.405)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.335*ne,(1-.405)*ee));var Et=new go.PathFigure(.2*ne,ee,!1);ce.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.8*ee));var it=new go.PathFigure(.8*ne,ee,!1);return ce.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.8*ee)),ce}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.1*ne,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,ee).close());var he=new go.PathFigure(.2*ne,.2*ee,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.2*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.8*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.8*ee)),ce}),go.Shape.defineFigureGenerator("BpmnEventError",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.33*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.66*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.66*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.33*ne,.5*ee).close()),ce}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);ce.add(se);var he=new go.PathFigure(ne,ee,!1);ce.add(he);var ve=new go.PathFigure(.1*ne,ee,!0);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Line,.9*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*ee).close()),ce}),go.Shape.defineFigureGenerator("Caution",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.05*ne,ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.1*ne,.8*ee,0,ee,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.55*ne,.1*ee,.5*ne,0,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.95*ne,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*ne,ee,ne,ee,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.05*ne,ee));var he=.05;return se.add(new go.PathSegment(go.PathSegment.Move,(.5-he)*ne,.875*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*ne,.875*ee,he*ne,he*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.325*ee,.575*ne,.725*ee,.625*ne,.375*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.75*ee,.375*ne,.375*ee,.425*ne,.725*ee)),ce}),go.Shape.defineFigureGenerator("Recycle",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.45*ne,.95*ee,!1);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.185*ne,.85*ee,.17*ne,.95*ee,.15*ne,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.235*ne,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,.625*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*ne,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.275*ne,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.05*ne,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.05*ne,.575*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.1875*ne,.95*ee,0,.675*ee,0,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.45*ne,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.775*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.22*ne,.775*ee));var he=new go.PathFigure(.475*ne,.2*ee,!1);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.225*ne,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.275*ne,.175*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.325*ne,.05*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.4*ne,.05*ee,.35*ne,0,.375*ne,0)),he.add(new go.PathSegment(go.PathSegment.Line,.575*ne,.375*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.525*ne,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.475*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.315*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.32*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.05*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.575*ne,0,.65*ne,.05*ee,.625*ne,0)),he.add(new go.PathSegment(go.PathSegment.Line,.38*ne,.0105*ee));var ve=new go.PathFigure(.675*ne,.575*ee,!1);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.875*ne,.525*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,.775*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.85*ne,.95*ee,ne,.8*ee,ne,.85*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.95*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.65*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.85*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.725*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.775*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.775*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,.775*ee)),ve.add(new go.PathSegment(go.PathSegment.Move,.675*ne,.575*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.775*ne,.775*ee)),ce}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(De,ne,ee){var ce=new go.Geometry,se=.5,he=Ne*.5,ve=new go.PathFigure(ne,se*ee,!0);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,se*ne,ee,ne,(se+he)*ee,(se+he)*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,se*ee,(se-he)*ne,ee,0,(se+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,se*ne,0,0,(se-he)*ee,(se-he)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,se*ee,(se+he)*ne,0,ne,(se-he)*ee));var be=new go.PathFigure(se*ne,0,!1);return ce.add(be),be.add(new go.PathSegment(go.PathSegment.Line,se*ne,.15*ee)),be.add(new go.PathSegment(go.PathSegment.Move,se*ne,ee)),be.add(new go.PathSegment(go.PathSegment.Line,se*ne,.85*ee)),be.add(new go.PathSegment(go.PathSegment.Move,0,se*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.15*ne,se*ee)),be.add(new go.PathSegment(go.PathSegment.Move,ne,se*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.85*ne,se*ee)),be.add(new go.PathSegment(go.PathSegment.Move,se*ne,se*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.58*ne,.1*ee)),be.add(new go.PathSegment(go.PathSegment.Move,se*ne,se*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.78*ne,.54*ee)),ce}),go.Shape.defineFigureGenerator("Package",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.15*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var he=new go.PathFigure(0,.15*ee,!0);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,0,0)),he.add(new go.PathSegment(go.PathSegment.Line,.6*ne,0)),he.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.15*ee).close()),ce.spot1=new go.Spot(0,.1),ce.spot2=new go.Spot(1,1),ce}),go.Shape.defineFigureGenerator("Class",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var he=new go.PathFigure(0,.2*ee,!1);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,.2*ee).close());var ve=new go.PathFigure(0,.5*ee,!1);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee).close()),ce}),go.Shape.defineFigureGenerator("Component",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne,ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.15*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.15*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee).close());var he=new go.PathFigure(0,.2*ee,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.2*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee).close());var ve=new go.PathFigure(0,.6*ee,!0);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.6*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.8*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee).close()),ce}),go.Shape.defineFigureGenerator("Boat Shipment",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.15*ne,.6*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.15*ne,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.15*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.15*ne,.6*ee));var he=new go.PathFigure(.15*ne,.6*ee,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.6*ee)),ce}),go.Shape.defineFigureGenerator("Customer/Supplier",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne,ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.66*ne,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.66*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.33*ne,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.33*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee).close()),ce}),go.Shape.defineFigureGenerator("Workcell",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.65*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*ne,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ce}),go.Shape.defineFigureGenerator("Supermarket",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Move,ne,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.66*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.66*ee)),se.add(new go.PathSegment(go.PathSegment.Move,ne,.66*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ce}),go.Shape.defineFigureGenerator("TruckShipment",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var he=new go.PathFigure(ne,.8*ee,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.8*ee)),he.add(new go.PathSegment(go.PathSegment.Line,ne,.8*ee).close());var ve=.1,be=Ne*.1,ke=.2,Be=.9,He=new go.PathFigure((ke-ve)*ne,Be*ee,!0);ce.add(He),He.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne,(Be-ve)*ee,(ke-ve)*ne,(Be-be)*ee,(ke-be)*ne,(Be-ve)*ee)),He.add(new go.PathSegment(go.PathSegment.Bezier,(ke+ve)*ne,Be*ee,(ke+be)*ne,(Be-ve)*ee,(ke+ve)*ne,(Be-be)*ee)),He.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne,(Be+ve)*ee,(ke+ve)*ne,(Be+be)*ee,(ke+be)*ne,(Be+ve)*ee)),He.add(new go.PathSegment(go.PathSegment.Bezier,(ke-ve)*ne,Be*ee,(ke-be)*ne,(Be+ve)*ee,(ke-ve)*ne,(Be+be)*ee).close()),ve=.1,be=Ne*.1,ke=.8,Be=.9;var We=new go.PathFigure((ke-ve)*ne,Be*ee,!0);return ce.add(We),We.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne,(Be-ve)*ee,(ke-ve)*ne,(Be-be)*ee,(ke-be)*ne,(Be-ve)*ee)),We.add(new go.PathSegment(go.PathSegment.Bezier,(ke+ve)*ne,Be*ee,(ke+be)*ne,(Be-ve)*ee,(ke+ve)*ne,(Be-be)*ee)),We.add(new go.PathSegment(go.PathSegment.Bezier,ke*ne,(Be+ve)*ee,(ke+ve)*ne,(Be+be)*ee,(ke+be)*ne,(Be+ve)*ee)),We.add(new go.PathSegment(go.PathSegment.Bezier,(ke-ve)*ne,Be*ee,(ke-be)*ne,(Be+ve)*ee,(ke-ve)*ne,(Be+be)*ee).close()),ce}),go.Shape.defineFigureGenerator("KanbanPost",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.2*ne,0,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,0)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,ee)),ce}),go.Shape.defineFigureGenerator("Forklift",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,0));var he=new go.PathFigure(0,.5*ee,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.8*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var ve=new go.PathFigure(.5*ne,.8*ee,!0);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.1*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.1*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.8*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.8*ee));var be=new go.PathFigure(.5*ne,.7*ee,!1);ce.add(be),be.add(new go.PathSegment(go.PathSegment.Line,ne,.7*ee));var ke=.1,Be=Ne*.1,He=.1,We=.9,rt=new go.PathFigure((He-ke)*ne,We*ee,!0);ce.add(rt),rt.add(new go.PathSegment(go.PathSegment.Bezier,He*ne,(We-ke)*ee,(He-ke)*ne,(We-Be)*ee,(He-Be)*ne,(We-ke)*ee)),rt.add(new go.PathSegment(go.PathSegment.Bezier,(He+ke)*ne,We*ee,(He+Be)*ne,(We-ke)*ee,(He+ke)*ne,(We-Be)*ee)),rt.add(new go.PathSegment(go.PathSegment.Bezier,He*ne,(We+ke)*ee,(He+ke)*ne,(We+Be)*ee,(He+Be)*ne,(We+ke)*ee)),rt.add(new go.PathSegment(go.PathSegment.Bezier,(He-ke)*ne,We*ee,(He-Be)*ne,(We+ke)*ee,(He-ke)*ne,(We+Be)*ee)),ke=.1,Be=Ne*.1,He=.4,We=.9;var Qe=new go.PathFigure((He-ke)*ne,We*ee,!0);return ce.add(Qe),Qe.add(new go.PathSegment(go.PathSegment.Bezier,He*ne,(We-ke)*ee,(He-ke)*ne,(We-Be)*ee,(He-Be)*ne,(We-ke)*ee)),Qe.add(new go.PathSegment(go.PathSegment.Bezier,(He+ke)*ne,We*ee,(He+Be)*ne,(We-ke)*ee,(He+ke)*ne,(We-Be)*ee)),Qe.add(new go.PathSegment(go.PathSegment.Bezier,He*ne,(We+ke)*ee,(He+ke)*ne,(We+Be)*ee,(He+Be)*ne,(We+ke)*ee)),Qe.add(new go.PathSegment(go.PathSegment.Bezier,(He-ke)*ne,We*ee,(He-Be)*ne,(We+ke)*ee,(He-ke)*ne,(We+Be)*ee)),ce}),go.Shape.defineFigureGenerator("RailShipment",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.1*ne,.4*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.4*ee).close());var he=new go.PathFigure(.45*ne,.7*ee,!1);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.7*ee));var ve=new go.PathFigure(.55*ne,.4*ee,!0);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.4*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.4*ee).close());var He=.05,We=Ne*.05,rt=.175,Qe=.95,be=new go.PathFigure((rt-He)*ne,Qe*ee,!0);ce.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,rt*ne,(Qe-He)*ee,(rt-He)*ne,(Qe-We)*ee,(rt-We)*ne,(Qe-He)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(rt+He)*ne,Qe*ee,(rt+We)*ne,(Qe-He)*ee,(rt+He)*ne,(Qe-We)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,rt*ne,(Qe+He)*ee,(rt+He)*ne,(Qe+We)*ee,(rt+We)*ne,(Qe+He)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(rt-He)*ne,Qe*ee,(rt-We)*ne,(Qe+He)*ee,(rt-He)*ne,(Qe+We)*ee));var He=.05,We=Ne*.05,rt=.375,Qe=.95,ke=new go.PathFigure((rt-He)*ne,Qe*ee,!0);ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,rt*ne,(Qe-He)*ee,(rt-He)*ne,(Qe-We)*ee,(rt-We)*ne,(Qe-He)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(rt+He)*ne,Qe*ee,(rt+We)*ne,(Qe-He)*ee,(rt+He)*ne,(Qe-We)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,rt*ne,(Qe+He)*ee,(rt+He)*ne,(Qe+We)*ee,(rt+We)*ne,(Qe+He)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(rt-He)*ne,Qe*ee,(rt-We)*ne,(Qe+He)*ee,(rt-He)*ne,(Qe+We)*ee));var He=.05,We=Ne*.05,rt=.625,Qe=.95,Be=new go.PathFigure((rt-He)*ne,Qe*ee,!0);ce.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,rt*ne,(Qe-He)*ee,(rt-He)*ne,(Qe-We)*ee,(rt-We)*ne,(Qe-He)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(rt+He)*ne,Qe*ee,(rt+We)*ne,(Qe-He)*ee,(rt+He)*ne,(Qe-We)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,rt*ne,(Qe+He)*ee,(rt+He)*ne,(Qe+We)*ee,(rt+We)*ne,(Qe+He)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(rt-He)*ne,Qe*ee,(rt-We)*ne,(Qe+He)*ee,(rt-He)*ne,(Qe+We)*ee));var He=.05,We=Ne*.05,rt=.825,Qe=.95,Pt=new go.PathFigure((rt-He)*ne,Qe*ee,!0);ce.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,rt*ne,(Qe-He)*ee,(rt-He)*ne,(Qe-We)*ee,(rt-We)*ne,(Qe-He)*ee)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(rt+He)*ne,Qe*ee,(rt+We)*ne,(Qe-He)*ee,(rt+He)*ne,(Qe-We)*ee)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,rt*ne,(Qe+He)*ee,(rt+He)*ne,(Qe+We)*ee,(rt+We)*ne,(Qe+He)*ee)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(rt-He)*ne,Qe*ee,(rt-We)*ne,(Qe+He)*ee,(rt-He)*ne,(Qe+We)*ee).close());var Ze=new go.PathFigure(0,ee,!1);return ce.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Line,ne,ee).close()),ce}),go.Shape.defineFigureGenerator("Warehouse",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var he=new go.PathFigure(0,.2*ee,!1);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,.2*ee).close());var ve=new go.PathFigure(.15*ne,ee,!0);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.15*ne,.5*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.5*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.4*ne,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.15*ne,ee).close());var be=.05,ke=Ne*.05,Be=.35,He=.775,We=new go.PathFigure((Be-be)*ne,He*ee,!0);return ce.add(We),We.add(new go.PathSegment(go.PathSegment.Bezier,Be*ne,(He-be)*ee,(Be-be)*ne,(He-ke)*ee,(Be-ke)*ne,(He-be)*ee)),We.add(new go.PathSegment(go.PathSegment.Bezier,(Be+be)*ne,He*ee,(Be+ke)*ne,(He-be)*ee,(Be+be)*ne,(He-ke)*ee)),We.add(new go.PathSegment(go.PathSegment.Bezier,Be*ne,(He+be)*ee,(Be+be)*ne,(He+ke)*ee,(Be+ke)*ne,(He+be)*ee)),We.add(new go.PathSegment(go.PathSegment.Bezier,(Be-be)*ne,He*ee,(Be-ke)*ne,(He+be)*ee,(Be-be)*ne,(He+ke)*ee).close()),ce}),go.Shape.defineFigureGenerator("ControlCenter",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.1*ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.8*ee).close()),ce}),go.Shape.defineFigureGenerator("Bluetooth",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.75*ee,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),ce}),go.Shape.defineFigureGenerator("Bookmark",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.4*ee)),ce}),go.Shape.defineFigureGenerator("Bookmark",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.4*ee)),ce}),go.Shape.defineFigureGenerator("Globe",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.5*ne,0,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*ee,.75*ne,0,ne,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,ee,ne,.75*ee,.75*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.25*ne,ee,0,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,0,.25*ee,.25*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,ee,.15*ne,.25*ee,.15*ne,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,.85*ne,.75*ee,.85*ne,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.1675*ne,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8325*ne,.15*ee,.35*ne,.3*ee,.65*ne,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.1675*ne,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8325*ne,.85*ee,.35*ne,.7*ee,.65*ne,.7*ee)),ce}),go.Shape.defineFigureGenerator("Wave",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.25*ee,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*ne,.25*ee,.1*ne,0,.2*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.7*ne,.25*ee,.425*ne,.5*ee,.575*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,ne,.25*ee,.8*ne,0,.9*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*ne,.75*ee,.1*ne,.5*ee,.2*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.7*ne,.75*ee,.425*ne,ee,.575*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,ne,.75*ee,.8*ne,.5*ee,.9*ne,.5*ee)),ce}),go.Shape.defineFigureGenerator("Operator",function(De,ne,ee){var ce=new go.Geometry,se=.3,he=Ne*.3,ve=.5,be=.7,ke=new go.PathFigure((ve-se)*ne,be*ee,!0);ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be-se)*ee,(ve-se)*ne,(be-he)*ee,(ve-he)*ne,(be-se)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*ne,be*ee,(ve+he)*ne,(be-se)*ee,(ve+se)*ne,(be-he)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be+se)*ee,(ve+se)*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*ne,be*ee,(ve-he)*ne,(be+se)*ee,(ve-se)*ne,(be+he)*ee));var Be=new go.PathFigure(0,.7*ee,!1);return ce.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,ne,.7*ee,0,0,ne,0)),ce}),go.Shape.defineFigureGenerator("TripleFanBlades",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.5*ne,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.65*ee,.65*ne,.3*ee,.65*ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,.35*ne,.5*ee,.35*ne,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.3*ne,.6*ee,.1*ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.65*ee,.2*ne,ee,.35*ne,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,ne,ee,.7*ne,.6*ee,.9*ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.65*ee,.8*ne,ee,.65*ne,.95*ee)),ce}),go.Shape.defineFigureGenerator("CentrifugalPump",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,0,.075*ee,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.4*ne,ee,0,ee,.4*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.4*ee,.8*ne,ee,.85*ne,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ce}),go.Shape.defineFigureGenerator("Battery",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.4*ne,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.1*ee));var he=new go.PathFigure(0,.6*ee,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Move,0,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,ne,.4*ee)),ce}),go.Shape.defineFigureGenerator("Delete",function(De,ne,ee){var ce=new go.Geometry,se=.5,he=Ne*.5,ve=.5,be=.5,ke=new go.PathFigure((ve-se)*ne,be*ee,!0);ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be-se)*ee,(ve-se)*ne,(be-he)*ee,(ve-he)*ne,(be-se)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*ne,be*ee,(ve+he)*ne,(be-se)*ee,(ve+se)*ne,(be-he)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be+se)*ee,(ve+se)*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*ne,be*ee,(ve-he)*ne,(be+se)*ee,(ve-se)*ne,(be+he)*ee));var Be=new go.PathFigure(.15*ne,.5*ee,!1);return ce.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.5*ee)),ce}),go.Shape.defineFigureGenerator("Flag",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.1*ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.1*ee,.15*ne,0,.35*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,ne,.1*ee,.65*ne,.2*ee,.85*ne,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.5*ee,.85*ne,.6*ee,.65*ne,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.35*ne,.4*ee,.15*ne,.4*ee).close()),ce}),go.Shape.defineFigureGenerator("Help",function(De,ne,ee){var ce=new go.Geometry,se=.5,he=Ne*.5,ve=.5,be=.5,ke=new go.PathFigure((ve-se)*ne,be*ee,!1);ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be-se)*ee,(ve-se)*ne,(be-he)*ee,(ve-he)*ne,(be-se)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*ne,be*ee,(ve+he)*ne,(be-se)*ee,(ve+se)*ne,(be-he)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be+se)*ee,(ve+se)*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*ne,be*ee,(ve-he)*ne,(be+se)*ee,(ve-se)*ne,(be+he)*ee).close()),se=.05,he=Ne*.05,ve=.5,be=.8;var Be=new go.PathFigure((ve-se)*ne,be*ee,!1);return ce.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be-se)*ee,(ve-se)*ne,(be-he)*ee,(ve-he)*ne,(be-se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*ne,be*ee,(ve+he)*ne,(be-se)*ee,(ve+se)*ne,(be-he)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(be+se)*ee,(ve+se)*ne,(be+he)*ee,(ve+he)*ne,(be+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*ne,be*ee,(ve-he)*ne,(be+se)*ee,(ve-se)*ne,(be+he)*ee).close()),Be.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.7*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.2*ee,.75*ne,.475*ee,.75*ne,.225*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,.3*ne,.35*ee,.4*ne,.2*ee,.3*ne,.25*ee)),ce}),go.Shape.defineFigureGenerator("Location",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(.5*ne,ee,!0).add(new go.PathSegment(go.PathSegment.Line,.75*ne,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,.975*ne,.025*ee,.5*ne,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*ne,.5*ee,.5*ne,0,.025*ne,.025*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.5*ne,.2*ee)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*ne,.3*ee,.1*ne,.1*ee).close()))}),go.Shape.defineFigureGenerator("Lock",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var he=new go.PathFigure(.2*ne,.5*ee,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.3*ee,.25*ne,0,.75*ne,0)),he.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.3*ee)),ce}),go.Shape.defineFigureGenerator("Unlocked",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var he=new go.PathFigure(.2*ne,.5*ee,!1);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.3*ee,.25*ne,0,.75*ne,0)),he.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.35*ee)),ce}),go.Shape.defineFigureGenerator("Gear",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(.9375*ne,.56246875*ee,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*ne,.4375*ee)).add(new go.PathSegment(go.PathSegment.Line,.80621875*ne,.4375*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.763*ne,.3316875*ee,.79840625*ne,.39915625*ee,.7834375*ne,.3635*ee)).add(new go.PathSegment(go.PathSegment.Line,.8566875*ne,.23796875*ee)).add(new go.PathSegment(go.PathSegment.Line,.76825*ne,.14959375*ee)).add(new go.PathSegment(go.PathSegment.Line,.67596875*ne,.24184375*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*ne,.19378125*ee,.64228125*ne,.2188125*ee,.603875*ne,.2021875*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*ne,.0625*ee)).add(new go.PathSegment(go.PathSegment.Line,.4375*ne,.0625*ee)).add(new go.PathSegment(go.PathSegment.Line,.4375*ne,.19378125*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*ne,.239375*ee,.39759375*ne,.20190625*ee,.36053125*ne,.2176875*ee)).add(new go.PathSegment(go.PathSegment.Line,.2379375*ne,.14959375*ee)).add(new go.PathSegment(go.PathSegment.Line,.14953125*ne,.2379375*ee)).add(new go.PathSegment(go.PathSegment.Line,.23934375*ne,.3278125*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*ne,.4375*ee,.21765625*ne,.36059375*ee,.201875*ne,.397625*ee)).add(new go.PathSegment(go.PathSegment.Line,.0625*ne,.4375*ee)).add(new go.PathSegment(go.PathSegment.Line,.0625*ne,.5625*ee)).add(new go.PathSegment(go.PathSegment.Line,.1938125*ne,.5625*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*ne,.67596875*ee,.20221875*ne,.603875*ee,.21884375*ne,.64228125*ee)).add(new go.PathSegment(go.PathSegment.Line,.1495625*ne,.76825*ee)).add(new go.PathSegment(go.PathSegment.Line,.238*ne,.8566875*ee)).add(new go.PathSegment(go.PathSegment.Line,.3316875*ne,.76296875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*ne,.80621875*ee,.36353125*ne,.78340625*ee,.3991875*ne,.79840625*ee)).add(new go.PathSegment(go.PathSegment.Line,.43753125*ne,.9375*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*ne,.9375*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*ne,.80621875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*ne,.760625*ee,.602375*ne,.79809375*ee,.63946875*ne,.78234375*ee)).add(new go.PathSegment(go.PathSegment.Line,.76828125*ne,.8566875*ee)).add(new go.PathSegment(go.PathSegment.Line,.85671875*ne,.76825*ee)).add(new go.PathSegment(go.PathSegment.Line,.76065625*ne,.67221875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*ne,.56246875*ee,.78234375*ne,.63940625*ee,.798125*ne,.602375*ee)).add(new go.PathSegment(go.PathSegment.Line,.9375*ne,.56246875*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.5*ne,.6*ee)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*ne,.5*ee,.1*ne,.1*ee).close()))}),go.Shape.defineFigureGenerator("Hand",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.1*ne,.3*ee,0,.375*ee,.05*ne,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.45*ne,.075*ee,.3*ne,.225*ee,.4*ne,.175*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.525*ne,.075*ee,.46*ne,.05*ee,.525*ne,.05*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*ne,.4*ee,.525*ne,.275*ee,.475*ne,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*ne,.55*ee,ne,.4*ee,ne,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.425*ne,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.6*ne,.7*ee,.675*ne,.55*ee,.675*ne,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.575*ne,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.575*ne,.85*ee,.65*ne,.7*ee,.65*ne,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.525*ne,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.535*ne,ee,.61*ne,.85*ee,.61*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,.435*ne,ee,0,ee).close()),ce}),go.Shape.defineFigureGenerator("Map",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.2*ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.25*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.25*ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),se.add(new go.PathSegment(go.PathSegment.Move,.25*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.25*ne,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.8*ee)),ce}),go.Shape.defineFigureGenerator("Eject",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee*.7)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.7).close());var he=new go.PathFigure(0,ee*.6,!0);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0).close()),ce}),go.Shape.defineFigureGenerator("Pencil",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*ne,.1*ee)).add(new go.PathSegment(go.PathSegment.Line,ne,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*ne,ee)).add(new go.PathSegment(go.PathSegment.Line,.1*ne,.2*ee).close()))}),go.Shape.defineFigureGenerator("Building",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne*1,ee*1,!1);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.85)),se.add(new go.PathSegment(go.PathSegment.Line,.046*ne,ee*.85)),se.add(new go.PathSegment(go.PathSegment.Line,.046*ne,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.3)),se.add(new go.PathSegment(go.PathSegment.Line,.046*ne,ee*.3)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*ne,ee*.3)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee*.3)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*ne,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*ne,ee*.85)),se.add(new go.PathSegment(go.PathSegment.Line,ne,ee*.85).close());var he=new go.PathFigure(.126*ne,.85*ee,!1);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.126*ne,.45*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.322*ne,.45*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.322*ne,.85*ee).close());var ve=new go.PathFigure(.402*ne,.85*ee,!1);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.402*ne,.45*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.598*ne,.45*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.598*ne,.85*ee).close());var be=new go.PathFigure(.678*ne,.85*ee,!1);ce.add(be),be.add(new go.PathSegment(go.PathSegment.Line,.678*ne,.45*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.874*ne,.45*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.874*ne,.85*ee).close());var ke=new go.PathFigure(.5*ne,.1*ee,!1);return ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*ne,.3*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*ne,.3*ee).close()),ce}),go.Shape.defineFigureGenerator("Staircase",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,ee*1,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*.2,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.2,ee*.8)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.4,ee*.8)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.4,ee*.6)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.6,ee*.6)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.6,ee*.4)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.8,ee*.4)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.8,ee*.2)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*.2)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*.15)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.75,ee*.15)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.75,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.55,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.55,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.35,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.35,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.15,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.15,ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.95).close()),ce}),go.Shape.defineFigureGenerator("5Bars",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,ee*1,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*.184,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.184,ee*(1-.184)).close());var he=new go.PathFigure(ne*.204,ee,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne*.204,ee*(1-.184))),he.add(new go.PathSegment(go.PathSegment.Line,ne*.388,ee*(1-.184*2))),he.add(new go.PathSegment(go.PathSegment.Line,ne*.388,ee*1).close());var ve=new go.PathFigure(ne*.408,ee,!0);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.408,ee*(1-.184*2))),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.592,ee*(1-.184*3))),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.592,ee*1).close());var be=new go.PathFigure(ne*.612,ee,!0);ce.add(be),be.add(new go.PathSegment(go.PathSegment.Line,ne*.612,ee*(1-.184*3))),be.add(new go.PathSegment(go.PathSegment.Line,ne*.796,ee*(1-.184*4))),be.add(new go.PathSegment(go.PathSegment.Line,ne*.796,ee*1).close());var ke=new go.PathFigure(ne*.816,ee,!0);return ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Line,ne*.816,ee*(1-.184*4))),ke.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*(1-.184*5))),ke.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*1).close()),ce}),go.Shape.defineFigureGenerator("PC",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,0).close());var he=new go.PathFigure(ne*.055,.07*ee,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne*.245,ee*.07)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.245,ee*.1)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.055,ee*.1).close());var ve=new go.PathFigure(ne*.055,.13*ee,!0);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.245,ee*.13)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.245,ee*.16)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.055,ee*.16).close());var be=new go.PathFigure(ne*.055,.18*ee,!0);ce.add(be),be.add(new go.PathSegment(go.PathSegment.Line,ne*.245,ee*.18)),be.add(new go.PathSegment(go.PathSegment.Line,ne*.245,ee*.21)),be.add(new go.PathSegment(go.PathSegment.Line,ne*.055,ee*.21).close());var ke=new go.PathFigure(ne*1,0,!0);return ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Line,ne*.4,0)),ke.add(new go.PathSegment(go.PathSegment.Line,ne*.4,ee*.65)),ke.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*.65).close()),ce}),go.Shape.defineFigureGenerator("Plane",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(.55*ne,ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.475*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.35*ne,.525*ee,0,.4*ee,.225*ne,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.475*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.15*ne,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*ne,.2*ee,.975*ne,0,ne,.08*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.55*ne,ee).close()),ce}),go.Shape.defineFigureGenerator("Key",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne*1,ee*.5,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*.9,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.45,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.15,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.15,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.45,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.6,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.65,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.7,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.75,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.8,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.85,.575*ee)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.9,.6*ee).close()),se.add(new go.PathSegment(go.PathSegment.Move,.17*ne,.425*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*ne,.5*ee,.075*ne,.075*ee).close()),ce}),go.Shape.defineFigureGenerator("FilmTape",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,ne*0,ne*.3,ne*.055)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.08,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.08,ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*1),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*1),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*2),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*2),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*3),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*3),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*4),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*4),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*5),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*5),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*6),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*6),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*7),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*7),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*8),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*8),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*9),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*9),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*10),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*10),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*11),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*11),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*12),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*12),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*13),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*13),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*14),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*14),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*15),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*15),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*1));var he=new go.PathFigure(0,0,!1);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*0)),he.add(new go.PathSegment(go.PathSegment.Arc,270,-180,ne*1,ne*.3,ne*.055)),he.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*1));var ve=new go.PathFigure(ne*.11,ee*.1,!1);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*1+.028*0),ee*.1)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*1+.028*0),ee*.8)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.11,ee*.8).close());var be=new go.PathFigure(ne*(.11+.24133333*1+.028*1),ee*.1,!1);ce.add(be),be.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*2+.028*1),ee*.1)),be.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*2+.028*1),ee*.8)),be.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*1+.028*1),ee*.8).close());var ke=new go.PathFigure(ne*(.11+.24133333*2+.028*2),ee*.1,!1);return ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*3+.028*2),ee*.1)),ke.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*3+.028*2),ee*.8)),ke.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*2+.028*2),ee*.8).close()),ce}),go.Shape.defineFigureGenerator("FloppyDisk",function(De,ne,ee){var ce=new go.Geometry,se=8,he=se*Ne,ve=new go.PathFigure(se,0,!1);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.86,0)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*.14)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,ee-se)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne-se,ee,ne,ee-he,ne-he,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,se,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-se,he,ee,0,ee-he)),ve.add(new go.PathSegment(go.PathSegment.Line,0,se)),ve.add(new go.PathSegment(go.PathSegment.Bezier,se,0,0,he,he,0).close());var be=new go.PathFigure(ne*.83,0,!1);ce.add(be),be.add(new go.PathSegment(go.PathSegment.Line,ne*.83,ee*.3)),be.add(new go.PathSegment(go.PathSegment.Line,ne*.17,ee*.3)),be.add(new go.PathSegment(go.PathSegment.Line,ne*.17,ee*0).close());var ke=new go.PathFigure(ne*.83,ee*1,!1);ce.add(ke),ke.add(new go.PathSegment(go.PathSegment.Line,ne*.83,ee*.5)),ke.add(new go.PathSegment(go.PathSegment.Line,ne*.17,ee*.5)),ke.add(new go.PathSegment(go.PathSegment.Line,ne*.17,ee*1).close());var Be=new go.PathFigure(ne*.78,ee*.05,!1);return ce.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,ne*.66,ee*.05)),Be.add(new go.PathSegment(go.PathSegment.Line,ne*.66,ee*.25)),Be.add(new go.PathSegment(go.PathSegment.Line,ne*.78,ee*.25).close()),ce}),go.Shape.defineFigureGenerator("SpeechBubble",function(De,ne,ee){var ce=De?De.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=15),ce=Math.min(ce,ne/3),ce=Math.min(ce,ee/3);var se=ce*Ne,he=ee*.8,ve=new go.Geometry,be=new go.PathFigure(ce,0,!0);return ve.add(be),be.add(new go.PathSegment(go.PathSegment.Line,ne-ce,0)),be.add(new go.PathSegment(go.PathSegment.Bezier,ne,ce,ne-se,0,ne,se)),be.add(new go.PathSegment(go.PathSegment.Line,ne,he-ce)),be.add(new go.PathSegment(go.PathSegment.Bezier,ne-ce,he,ne,he-se,ne-se,he)),be.add(new go.PathSegment(go.PathSegment.Line,ne*.7,he)),be.add(new go.PathSegment(go.PathSegment.Line,ne*.7,ee)),be.add(new go.PathSegment(go.PathSegment.Line,ne*.55,he)),be.add(new go.PathSegment(go.PathSegment.Line,ce,he)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,he-ce,se,he,0,he-se)),be.add(new go.PathSegment(go.PathSegment.Line,0,ce)),be.add(new go.PathSegment(go.PathSegment.Bezier,ce,0,0,se,se,0).close()),se>1?(ve.spot1=new go.Spot(0,0,se,se),ve.spot2=new go.Spot(1,.8,-se,-se)):(ve.spot1=go.Spot.TopLeft,ve.spot2=new go.Spot(1,.8)),ve}),go.Shape.defineFigureGenerator("Repeat",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne*0,ee*.45,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*.25,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,ee*.9)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.6,ee*.9)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.65,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.2,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.2,ee*.45).close());var he=new go.PathFigure(ne*1,ee*.55,!0);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne*.75,ee*1)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.5,ee*.55)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.7,ee*.55)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.7,ee*.1)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.4,ee*.1)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.35,ee*0)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.8,ee*0)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.8,ee*.55).close()),ce}),go.Shape.defineFigureGenerator("Windows",function(De,ne,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()).add(new go.PathSegment(go.PathSegment.Move,.4*ne,.4*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*ne,.8*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*ne,.8*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*ne,.4*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.2*ne,.1*ee)).add(new go.PathSegment(go.PathSegment.Line,.2*ne,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*ne,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*ne,.1*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.1*ne,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.1*ne,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*ne,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*ne,.6*ee).close()))}),go.Shape.defineFigureGenerator("Terminal",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne*0,ee*.1,!1);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*.1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*.9)),se.add(new go.PathSegment(go.PathSegment.Line,ne*0,ee*.9).close());var he=new go.PathFigure(ne*.1,ee*.2,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne*.1,ee*.25)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.22,ee*.285)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.1,ee*.32)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.1,ee*.37)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.275,ee*.32)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.275,ee*.25).close());var ve=new go.PathFigure(ne*.28,ee*.37,!0);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.45,ee*.37)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.45,ee*.41)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.28,ee*.41).close()),ce}),go.Shape.defineFigureGenerator("Beaker",function(De,ne,ee){var ce=new go.Geometry,se=15,he=se*Ne,ve=new go.PathFigure(ne*.62,ee*.475,!0);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,ee-se)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne-se,ee,ne,ee-he,ne-he,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,se,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-se,he,ee,0,ee-he)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.38,ee*.475)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.38,ee*.03)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.36,ee*0)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.64,ee*0)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.62,ee*.03).close()),he>1?(ce.spot1=new go.Spot(0,0,he,he),ce.spot2=new go.Spot(1,1,-he,-he)):(ce.spot1=go.Spot.TopLeft,ce.spot2=go.Spot.BottomRight),ce}),go.Shape.defineFigureGenerator("Download",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne*0,ee*1,!0);ce.add(se);var he=.1/.3;se.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.8,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.66,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.66,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.755,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.93,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.64,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.61,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.39,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.36,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.07,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.755),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.66),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.66),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.8),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*0,ee*(1-he)).close());var ve=new go.PathFigure(ne*.4,ee*0,!0);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.4,ee*.44)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.26,ee*.44)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.5,ee*.66)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.26),ee*.44)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.6,ee*.44)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.6,ee*0).close()),ce}),go.Shape.defineFigureGenerator("Bin",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne*0,ee*1,!0);ce.add(se);var he=.1/.3;return se.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.8,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.66,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.66,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.755,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.93,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.64,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.61,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.39,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.36,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.07,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.755),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.66),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.66),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.8),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*0,ee*(1-he)).close()),ce}),go.Shape.defineFigureGenerator("Upload",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne*0,ee*1,!0);ce.add(se);var he=.1/.3;se.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.8,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.66,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.66,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.755,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.93,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.64,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.61,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.39,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.36,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.07,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.755),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.66),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.66),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.8),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*0,ee*(1-he)).close());var ve=new go.PathFigure(ne*.5,ee*0,!0);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.26,ee*.25)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.4,ee*.25)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.4,ee*.63)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.6,ee*.63)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.6,ee*.25)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.74,ee*.25).close()),ce}),go.Shape.defineFigureGenerator("EmptyDrink",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne*.15,ee*0,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*.85,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.7,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,ee*1).close()),ce}),go.Shape.defineFigureGenerator("Drink",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne*.15,ee*0,!1);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*.85,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.7,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,ee*1).close());var he=new go.PathFigure(ne*.235,ee*.28,!0);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,ne*.765,ee*.28)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.655,ee*.97)),he.add(new go.PathSegment(go.PathSegment.Line,ne*.345,ee*.97).close()),ce}),go.Shape.defineFigureGenerator("4Arrows",function(De,ne,ee){var ce=new go.Geometry,se=new go.PathFigure(ne*.5,ee*0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*.65,ee*.25)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.55,ee*.25)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.55,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.75,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.75,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,ee*.5)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.75,ee*.65)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.75,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.55,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.55,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.65,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.35,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.45,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.45,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.25,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.25,ee*.65)),se.add(new go.PathSegment(go.PathSegment.Line,ne*0,ee*.5)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.25,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.25,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.45,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.45,ee*.25)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.35,ee*.25).close()),ce}),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 Vn={},xn="5.0",pe={},ge=null,Oe=!1,Ke=!1,ut=null,Ge=!1,Xe=null,Ne=null,Tt=0;Tt<arguments.length;Tt++){var Ct=arguments[Tt];if(Ct!==null)switch(typeof Ct){case"number":xn=Ct.toFixed(1);break;case"string":Ct.match(new RegExp("^[0-9]\\.[0-9]+$"))?xn=Ct:ut=Ct;break;case"object":typeof Ct.is3D!="undefined"?ge=Ct:pe=Ct;break;case"boolean":Oe=Ct,Ke=!0;break}}ge===null&&(ge={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},pe.material_id!==void 0&&!Ke&&(Oe=!0)),ut!==null&&pe.id===void 0&&(pe.id=ut);var Ve="",Lt="",dt=!1,Rt=null,De=null,ne=null,ee=!1,ce=null,se=null,he=null,ve=null,be=null;pe.height!==void 0&&(pe.height=Math.round(pe.height)),pe.width!==void 0&&(pe.width=Math.round(pe.width));var ke=function(Gt){return parseFloat(Gt)>4?parseFloat(Gt):5};Vn.setHTML5Codebase=function(Gt,rn){Ne=Gt,Wt(Gt,rn)},Vn.setJavaCodebase=Vn.setJavaCodebaseVersion=Vn.isCompiledInstalled=Vn.setPreCompiledScriptPath=Vn.setPreCompiledResourcePath=function(){},Vn.setHTML5CodebaseVersion=function(Gt,rn){var An=parseFloat(Gt);if(An!==NaN&&An<5){console.log("The GeoGebra HTML5 codebase version "+An+" is deprecated. Using version latest instead.");return}Xe=Gt,Ue(Gt,rn)},Vn.getHTML5CodebaseVersion=function(){return De},Vn.getParameters=function(){return pe},Vn.setFontsCSSURL=function(Gt){ve=Gt},Vn.setGiacJSURL=function(Gt){},Vn.setJNLPFile=function(Gt){Ve=Gt},Vn.setJNLPBaseDir=function(Gt){},Vn.inject=function(){function Gt(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var rn="auto",An=pe.id,ni,Sn=!1,Yn=0;Yn<arguments.length;Yn++){var It=arguments[Yn];typeof It=="string"?(It=It.toLowerCase(),It.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?rn=It:An=arguments[Yn]):typeof It=="boolean"?Sn=It:It instanceof HTMLElement&&(ni=It)}wn();function wn(){if(!Ge){setTimeout(wn,200);return}rn=Vt(rn);var Gn=ni||document.getElementById(An);if(!Gn){console.log("possibly bug on ajax loading? ");return}if(Vn.removeExistingApplet(Gn,!1),pe.width===void 0&&Gn.clientWidth&&(pe.width=Gn.clientWidth),pe.height===void 0&&Gn.clientHeight&&(pe.height=Gn.clientHeight),!(pe.width&&pe.height)&&rn==="html5"&&(delete pe.width,delete pe.height),Rt=rn,rn==="screenshot")it(Gn,pe);else{var ze=!1;pe.hasOwnProperty("playButton")&&pe.playButton||pe.hasOwnProperty("clickToLoad")&&pe.clickToLoad?ze=!0:pe.hasOwnProperty("playButtonAutoDecide")&&pe.playButtonAutoDecide&&(ze=(!Be()||Gt())&&He()),ze?(Rt="screenshot",ht(Gn,pe,Sn,rn)):Et(Gn,pe,Sn)}}};function Be(){try{return window.self!==window.top}catch(Gt){return!0}}function He(){return pe.hasOwnProperty("screenshotGenerator")&&pe.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Vn.getViews=function(){return ge},Vn.isJavaInstalled=function(){return!1};var We=function(Gt){var rn=function(Yn){var It=JSON.parse(Yn),wn=function(Ee){return Ee.type=="G"||Ee.type=="E"},Gn=It.elements?It.elements.filter(wn)[0]:It;if(!Gn||!Gn.url){An();return}pe.fileName=Gn.url,rt(Gn.settings||{}),ge.is3D=!0;var ze="https://www.geogebra.org/images/";Vn.setPreviewImage(ce||Gn.previewUrl,ze+"GeoGebra_loading.png",ze+"applet_play.png"),Gt()},An=function(){pe.onError&&pe.onError(),Ln("Error: Fetching material (id "+pe.material_id+") failed.",pe)},ni=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Sn="/materials/"+pe.material_id+"?scope=basic";Qe("https://"+ni+"/api/proxy.php?path="+encodeURIComponent(Sn),rn,An)};function rt(Gt){var rn=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(An){Gt[An]=!!Gt[An]}),rn.forEach(function(An){pe[An]===void 0&&Gt[An]!==void 0&&(pe[An]=Gt[An])}),pe.showToolBarHelp===void 0&&(pe.showToolBarHelp=pe.showToolBar)}function Qe(Gt,rn,An){var ni=new XMLHttpRequest;ni.open("GET",Gt),ni.onload=function(){rn(ni.responseText)},ni.onerror=An,ni.send()}Vn.isHTML5Installed=function(){return!0},Vn.getLoadedAppletType=function(){return Rt},Vn.setPreviewImage=function(Gt,rn,An){ce=Gt,se=rn,he=An},Vn.removeExistingApplet=function(Gt,rn){var An;typeof Gt=="string"&&(Gt=document.getElementById(Gt)),Rt=null;var ni=null;for(An=0;An<Gt.childNodes.length;An++){var Sn=Gt.childNodes[An],Yn=Sn.className;Yn==="applet_screenshot"?rn?(Sn.style.display="block",Rt="screenshot"):Sn.style.display="none":Yn!=="applet_scaler prerender"&&(Gt.removeChild(Sn),ni=Yn&&Yn.indexOf("appletParameters")!=-1?Sn.id:null,An--)}var It=pe.id!==void 0?pe.id:ni,wn=window[It];wn&&typeof wn.getBase64=="function"&&(wn.remove(),window[It]=null)},Vn.refreshHitPoints=function(){if(ke(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Gt=Vn.getAppletObject();return Gt&&typeof Gt.recalculateEnvironments=="function"?(Gt.recalculateEnvironments(),!0):!1},Vn.startAnimation=function(){var Gt=Vn.getAppletObject();return Gt&&typeof Gt.startAnimation=="function"?(Gt.startAnimation(),!0):!1},Vn.stopAnimation=function(){var Gt=Vn.getAppletObject();return Gt&&typeof Gt.stopAnimation=="function"?(Gt.stopAnimation(),!0):!1},Vn.getAppletObject=function(){var Gt=pe.id!==void 0?pe.id:"ggbApplet";return window[Gt]},Vn.resize=function(){};var Pt=function(Gt,rn,An){var ni=document.createElement("param");ni.setAttribute("name",rn),ni.setAttribute("value",An),Gt.appendChild(ni)},Ze=function(Gt){return Gt&&Gt!=="false"},Et=function(Gt,rn,An){ke(De)<=4.2&&(An=!0);var ni=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==De||ggbHTML5LoadedCodebaseIsWebSimple&&!ee)&&(ni=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Sn=document.createElement("div");Sn.classList.add("appletParameters","notranslate");var Yn=rn.width,It=rn.height;if(rn.disableAutoScale=rn.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():rn.disableAutoScale,rn.width!==void 0)if(ke(De)<=4.4)Ze(rn.showToolBar)&&(rn.height-=7),Ze(rn.showAlgebraInput)&&(rn.height-=37),rn.width<605&&Ze(rn.showToolBar)&&(rn.width=605,Yn=605);else{var wn=100;(Ze(rn.showToolBar)||Ze(rn.showMenuBar))&&(rn.hasOwnProperty("customToolBar")&&(rn.customToolbar=rn.customToolBar),wn=Ze(rn.showMenuBar)?245:155),Yn<wn&&(rn.width=wn,Yn=wn)}Sn.style.border="none",Sn.style.display="inline-block";for(var Gn in rn)rn.hasOwnProperty(Gn)&&Gn!=="appletOnLoad"&&Sn.setAttribute("data-param-"+Gn,rn[Gn]);ve&&Sn.setAttribute("data-param-fontscssurl",ve),Vn.resize=function(){GGBAppletUtils.responsiveResize(Gt,rn)},window.addEventListener("resize",function(at){Vn.resize()});var ze=typeof rn.appletOnLoad=="function"?rn.appletOnLoad:function(){};if(!An&&rn.width!==void 0){rn.hasOwnProperty("showSplash")||Sn.setAttribute("data-param-showSplash","false");var Ee=Gt.querySelector(".applet_scaler.prerender"),Pe=Ee!==null;if(Pe)var Fe=Ee.querySelector(".ggb_preview");else{var Fe=_t(Yn,It,rn.borderColor,!1);Ee=document.createElement("div"),Ee.className="applet_scaler",Ee.style.position="relative",Ee.style.display="block",Ee.style.width=Yn+"px",Ee.style.height=It+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Ee,"66%"),ke(De)>=5?(rn.appletOnLoad=function(at){var zt=Gt.querySelector(".ggb_preview");zt&&zt.parentNode.removeChild(zt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Ee),window.GGBT_wsf_view&&$(window).trigger("resize"),ze(at)},Pe||Ee.appendChild(Fe)):Sn.appendChild(Fe),Ee.appendChild(Sn),Pe||Gt.appendChild(Ee),setTimeout(function(){Vn.resize()},1)}else{var Ae=document.createElement("div");Ae.className="applet_scaler",Ae.style.position="relative",Ae.style.display="block",Ae.appendChild(Sn),Gt.appendChild(Ae),rn.appletOnLoad=function(at){Vn.resize(),ze(at)}}function ye(at,zt){zt&&typeof zt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(at,zt.appletOnLoad):renderGGBElement(at),Ln("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",zt)}function qe(at,zt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:at,params:zt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(un){ye(un.article,un.params)}),html5AppletsToProcess=null)},ke(De)<5&&(at.className+=" geogebraweb")):ye(at,zt)}if(ni){scriptLoadStarted=!0;for(var vt=0;vt<Sn.childNodes.length;vt++){var et=Sn.childNodes[vt].tagName;et==="TABLE"&&(Sn.removeChild(Sn.childNodes[vt]),vt--)}if(ggbHTML5LoadedScript!==null){var Ye=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Ye!=null&&Ye.parentNode.removeChild(Ye)}var xt=document.createElement("script"),yt=function(){qe(Sn,rn)};xt.src=Lt+ne,ggbHTML5LoadedCodebaseIsWebSimple=ee,ggbHTML5LoadedCodebaseVersion=De,ggbHTML5LoadedScript=xt.src,Ln("GeoGebra HTML5 codebase loaded: '"+Lt+"'.",rn),!Ne&&(!Xe||Xe=="5.0")?(ee?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),yt()):Lt.requirejs?__webpack_require__.e(4184).then(function(){var at=[__webpack_require__(74620)];yt.apply(null,at)}.bind(this)).catch(__webpack_require__.oe):(xt.onload=yt,Gt.appendChild(xt))}else qe(Sn,rn);rn.height=It,rn.width=Yn},it=function(Gt,rn,An){var ni=_t(rn.width,rn.height,rn.borderColor,An),Sn=document.createElement("div");Sn.style.position="relative",Sn.style.display="block",Sn.style.width=rn.width+"px",Sn.style.height=rn.height+"px",Sn.className="applet_screenshot applet_scaler"+(An?" applet_screenshot_play":""),Sn.appendChild(ni);var Yn=GGBAppletUtils.getScale(rn,Gt,An);An?(Gt.appendChild(Ht()),window.GGBT_wsf_view||(Gt.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Sn,"66%"),Gt.appendChild(Sn),Yn!==1&&!isNaN(Yn)&&(GGBAppletUtils.scaleElement(Sn,Yn),Sn.style.width=rn.width+"px",Sn.style.height=rn.height+"px",Sn.parentNode.style.width=rn.width*Yn+"px",Sn.parentNode.style.height=rn.height*Yn+"px"),Vn.resize=function(){Dt(Gt,ni,Sn,An)},window.addEventListener("resize",function(It){Vn.resize()}),Vn.resize()};function Dt(Gt,rn,An,ni){if(Gt.contains(rn)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Gt.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Gt)}var Sn=GGBAppletUtils.getScale(pe,Gt,ni);An.parentNode!==null&&(!isNaN(Sn)&&Sn!==1?(GGBAppletUtils.scaleElement(An,Sn),An.parentNode.style.width=pe.width*Sn+"px",An.parentNode.style.height=pe.height*Sn+"px"):(GGBAppletUtils.scaleElement(An,1),An.parentNode.style.width=pe.width+"px",An.parentNode.style.height=pe.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(Gt),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Vn.onExitFullscreen=function(Gt,rn){rn.appendChild(Gt)};var ht=function(Gt,rn,An,ni){it(Gt,rn,!0);for(var Sn=function(){var wn=[];for(It=0;It<Gt.childNodes.length;It++)wn.push(Gt.childNodes[It]);if(window.GGBT_wsf_view){var Gn=window.GGBT_wsf_view.renderFullScreen(Gt,rn.id),ze=document.getElementById("fullscreencontainer"),Ee=jQuery(Gt).find(".fullscreencontent");Ee.length>0?(Gn.remove(),Ee.attr("id","fullscreencontent").show(),jQuery(ze).append(Ee),window.dispatchEvent(new Event("resize"))):Et(Gn,rn,!1),window.GGBT_wsf_view.launchFullScreen(ze)}else Rt=ni,Et(Gt,rn,!1);if(!window.GGBT_wsf_view)for(It=0;It<wn.length;It++)Gt.removeChild(wn[It])},Yn=Gt.getElementsByClassName("ggb_preview_play"),It=0;It<Yn.length;It++)Yn[It].addEventListener("click",Sn,!1),Yn[It].addEventListener("ontouchstart",Sn,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Gt),He()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},Ht=function(){var Gt=document.createElement("div");if(Gt.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var rn='.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");}',An=document.createElement("style");An.styleSheet?An.styleSheet.cssText=rn:An.appendChild(document.createTextNode(rn)),document.getElementsByTagName("head")[0].appendChild(An)}return Gt},_t=function(Gt,rn,An,ni){var Sn=document.createElement("div");Sn.className="ggb_preview",Sn.style.position="absolute",Sn.style.zIndex="90",Sn.style.width=Gt-2+"px",Sn.style.height=rn-2+"px",Sn.style.top="0px",Sn.style.left="0px",Sn.style.overflow="hidden",Sn.style.backgroundColor="white";var Yn="lightgrey";An!==void 0&&(An==="none"?Yn="transparent":Yn=An),Sn.style.border="1px solid "+Yn;var It=document.createElement("img");if(It.style.position="relative",It.style.zIndex="1000",It.style.top="-1px",It.style.left="-1px",ce!==null&&It.setAttribute("src",ce),It.style.opacity=.7,se!==null){var wn,Gn,ze;if(!ni){wn=document.createElement("img"),wn.style.position="absolute",wn.style.zIndex="1001",wn.style.opacity=1,It.style.opacity=.3,Gn=360,Gn>Gt/4*3&&(Gn=Gt/4*3),ze=Gn/5.8,wn.setAttribute("src",se),wn.setAttribute("width",Gn),wn.setAttribute("height",ze);var Ee=(Gt-Gn)/2,Pe=(rn-ze)/2;wn.style.left=Ee+"px",wn.style.top=Pe+"px",Sn.appendChild(wn)}}return Sn.appendChild(It),Sn},Vt=function(Gt){return Gt=Gt.toLowerCase(),Gt==="html5"||Gt==="screenshot"?Gt:"html5"},ot=["web","webSimple","web3d","tablet","tablet3d","phone"],Ue=function(Gt,rn){if(De=Gt,rn){Wt(De,!0);return}var An=!Oe;if(An){var ni=ke(De);!isNaN(ni)&&ni<4.4&&(An=!1)}var Sn,Yn;window.location.protocol.substr(0,4)==="http"?Sn=window.location.protocol:Sn="http:";var It=De.indexOf("//");It>0?Yn=De:It===0?Yn=Sn+De:Yn="https://www.geogebra.org/apps/5.2.814.0/";for(var wn in ot)if(De.slice(ot[wn].length*-1)===ot[wn]||De.slice((ot[wn].length+1)*-1)===ot[wn]+"/"){Wt(Yn,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&An&&!ge.is3D&&!ge.AV&&!ge.SV&&!ge.CV&&!ge.EV2&&!ge.CP&&!ge.PC&&!ge.DA&&!ge.FI&&!ge.PV&&!Ze(pe.showToolBar)&&!Ze(pe.showMenuBar)&&!Ze(pe.showAlgebraInput)&&!Ze(pe.enableRightClick)&&(!pe.appName||pe.appName=="classic")?Yn+="webSimple/":Yn+="web3d/",Wt(Yn,!1)},Wt=function(Gt,rn){if(Gt.requirejs){Lt=Gt;return}Gt.slice(-1)!=="/"&&(Gt+="/"),Lt=Gt,rn===null&&(rn=Gt.indexOf("http")===-1),dt=rn,ne="web.nocache.js",ee=!1;var An=Lt.split("/");An.length>1&&(!rn&&An[An.length-2]==="webSimple"?(ne="webSimple.nocache.js",ee=!0):ot.indexOf(An[An.length-2])>=0&&(ne=An[An.length-2]+".nocache.js")),An=Gt.split("/"),De=An[An.length-3],De.substr(0,4)==="test"?De=De.substr(4,1)+"."+De.substr(5,1):(De.substr(0,3)==="war"||De.substr(0,4)==="beta")&&(De="5.0");var ni=parseFloat(De);ni!==NaN&&ni<5&&Gt.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+ni+" is deprecated. Using version latest instead."),Ue("5.0",rn))},Ln=function(Gt,rn){window.console&&window.console.log&&(!rn||typeof rn.showLogging=="undefined"||rn.showLogging&&rn.showLogging!=="false")&&console.log(Gt)};pe.material_id!==void 0?We(Fn):Fn();function Fn(){var Gt=xn;Xe!==null?Gt=Xe:parseFloat(Gt)<5&&(Gt="5.0"),Ue(Gt,!1),Ne!==null&&Wt(Ne,dt),Ge=!0}return Vn},GGBAppletUtils=function(){"use strict";function Vn(){return window.GGBT_wsf_edit!==void 0}function xn(Ge,Xe){Xe!=1?(Ge.style.transformOrigin="0% 0% 0px",Ge.style.webkitTransformOrigin="0% 0% 0px",Ge.style.transform="scale("+Xe+","+Xe+")",Ge.style.webkitTransform="scale("+Xe+","+Xe+")",Ge.style.maxWidth="initial",Ge.querySelector(".ggb_preview")!==null&&(Ge.querySelector(".ggb_preview").style.maxWidth="initial"),Ge.querySelectorAll(".ggb_preview img")[0]!==void 0&&(Ge.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),Ge.querySelectorAll(".ggb_preview img")[1]!==void 0&&(Ge.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(Ge.style.transform="none",Ge.style.webkitTransform="none")}function pe(Ge,Xe,Ne,Tt,Ct,Ve){var Lt=null;if(Ve!=null&&Ve!="")for(var dt=Ge.parentNode;dt!=null;)if((" "+dt.className+" ").indexOf(" "+Ve+" ")>-1){Lt=dt;break}else dt=dt.parentNode;var Rt=0,De=0,ne=0,ee=0,ce=0,se=0,he=0;if(Lt)Rt=Lt.offsetWidth,De=Math.max(Tt?Lt.offsetWidth:0,Lt.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(Rt=Math.min(window.innerWidth,document.documentElement.clientWidth),De=Math.min(window.innerHeight,document.documentElement.clientHeight),ne=Rt):(Rt=window.innerWidth,De=window.innerHeight,ne=window.innerWidth),Ge){var ve=Ge.getBoundingClientRect();ve.left>0&&ve.left<=Rt&&(Ct===void 0||!Ct)&&(document.dir==="rtl"?(ce=Rt-ve.width-ve.left,se=ne<=480?10:30):(se=ve.left,ce=ne<=480?10:30),ee=se+ce)}if(Ge&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var be=Ge.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ee=40,he=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ee=0,he=40)}}return Ge&&((Ne===void 0||!Ne)&&Xe>0&&Xe+ee<Rt?Rt=Xe:Rt-=ee,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Ne===void 0||!Ne)&&(De-=he)),{width:Rt,height:De}}function ge(Ge,Xe,Ne,Tt,Ct){if(Ge.isScreenshoGenerator)return 1;var Ve=Tt!==void 0&&Tt,Lt=Ge.noScaleMargin!=null&&Ge.noScaleMargin,dt=function(be){return be&&be!=="false"},Rt=dt(Ge.autoHeight),De=pe(Xe,Ge.width,Ne,Rt,Ve&&window.GGBT_wsf_view||Lt,Ct),ne=parseInt(De.width),ee=Ge.width,ce=Ge.height;if(ee===void 0){var se=Xe.querySelector(".appletParameters");se&&(ee=se.offsetWidth,ce=se.offsetHeight)}var he=ne/ee,ve=Ve?1:De.height/ce;return Ne!==void 0&&!Ne&&(he=Math.min(1,he),ve=Math.min(1,ve)),Math.min(he,ve)}function Oe(Ge,Xe,Ne){var Tt=1,Ct,Ve=!1;if(Ge.hasOwnProperty("allowUpscale")&&(Ve=Ge.allowUpscale),Ge.hasOwnProperty("scale")&&(Tt=parseFloat(Ge.scale),(isNaN(Tt)||Tt===null||Tt===0)&&(Tt=1),Tt>1&&(Ve=!0)),Xe&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Ve=!0),!(Ge.hasOwnProperty("disableAutoScale")&&Ge.disableAutoScale))Ct=ge(Ge,Xe,Ve,Ne,Ge.scaleContainerClass);else return Tt;return Ve&&(!Ge.hasOwnProperty("scale")||Tt===1)?Ct:Math.min(Tt,Ct)}function Ke(Ge){var Xe=Math.min(window.innerWidth,document.documentElement.clientWidth),Ne=Math.min(window.innerHeight,document.documentElement.clientHeight),Tt=Ge.getBoundingClientRect(),Ct=(Xe-Tt.width)/2,Ve=(Ne-Tt.height)/2;Ve<0&&(Ve=0),Ge.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Ct<40?Ge.style.left="40px":Ge.style.left=Ct+"px",Ge.style.top=Ve+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Ve<40?Ge.style.top="40px":Ge.style.top=Ve+"px",Ge.style.left=Ct+"px")}function ut(Ge,Xe){var Ne=Ge.querySelector(".appletParameters");if(Ne){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Xe.id!==Ne.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(Ge)}if(Ne.parentElement&&/fullscreen/.test(Ne.parentElement.className))return;var Tt=Oe(Xe,Ge);Vn()&&Ne.setAttribute("data-param-scale",Tt);for(var Ct=null,Ve=0;Ve<Ge.childNodes.length;Ve++)if(Ge.childNodes[Ve].className!==void 0&&Ge.childNodes[Ve].className.match(/^applet_scaler/)){Ct=Ge.childNodes[Ve];break}if(Ct!==null&&Ct.querySelector(".noscale")!==null)return;var Lt=Xe.id!==void 0?Xe.id:"ggbApplet",dt=window[Lt];(dt==null||!dt.recalculateEnvironments)&&Ct!==null&&!Ct.className.match(/fullscreen/)&&(Ct.parentNode.style.transform="",!isNaN(Tt)&&Tt!==1?(Ct.parentNode.style.width=Xe.width*Tt+"px",Ct.parentNode.style.height=Xe.height*Tt+"px",xn(Ct,Tt)):(xn(Ct,1),Ct.parentNode.style.width=Xe.width+"px",Ct.parentNode.style.height=Xe.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Ke(Ge),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Ne).parents(".content-added-content"))}}return{responsiveResize:ut,isFlexibleWorksheetEditor:Vn,positionCenter:Ke,getScale:Oe,scaleElement:xn}}();__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 Vn=n.location.search;return Vn.indexOf(J)!=-1||Vn.indexOf(K)!=-1}function q(Vn,xn){}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(Vn){var xn=s[L].bindings;s[L].bindings=function(){for(var pe=xn?xn():{},ge=Vn[webModule.__softPermutationId],Oe=O;Oe<ge.length;Oe++){var Ke=ge[Oe];pe[Ke[O]]=Ke[P]}return pe}};var t;function u(){return v(),t}function v(){if(!t){var Vn=o.createElement(Q);if(Vn.id=L,Vn.style.cssText=R+S,Vn.tabIndex=-1,o.body.appendChild(Vn),t=Vn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var xn=document.compatMode==U?V:W;t.write(xn+X),t.close()}}}function w(Vn){function xn(ge){function Oe(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Ke=Oe();if(Ke){ge();return}function ut(){if(!Ke){if(!Oe())return;Ke=!0,ge(),o.removeEventListener&&o.removeEventListener(Z,ut,!1),Ge&&clearInterval(Ge)}}o.addEventListener&&o.addEventListener(Z,ut,!1);var Ge=setInterval(function(){ut()},$)}function pe(ge){var Oe=u(),Ke=Oe.body,ut=Oe.createElement(_);ut.language=ab,ut.crossOrigin=W,ut.src=ge,webModule.__errFn&&(ut.onerror=function(){webModule.__errFn(L,new Error(bb+ge))}),Ke.appendChild(ut)}xn(function(){pe(Vn)})}webModule.__startLoadingFragment=function(Vn){return C(Vn)},webModule.__installRunAsyncCode=function(Vn){var xn=u(),pe=xn.body,ge=xn.createElement(_);ge.language=ab,ge.text=Vn,pe.appendChild(ge),pe.removeChild(ge)};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(Vn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Vn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Vn){var xn=c[Vn];return xn==null?null:xn},r=d,webModule.__errFn=e}function B(){function Vn(Ge){var Xe=Ge.lastIndexOf(rb);Xe==-1&&(Xe=Ge.length);var Ne=Ge.indexOf(sb);Ne==-1&&(Ne=Ge.length);var Tt=Ge.lastIndexOf(tb,Math.min(Ne,Xe));return Tt>=O?Ge.substring(O,Tt+P):W}function xn(Ge){if(!Ge.match(/^\w+:\/\//)){var Xe=o.createElement(ub);Xe.src=Ge+vb,Ge=Vn(Xe.src)}return Ge}function pe(){var Ge=__gwt_getMetaProperty(wb);return Ge!=null?Ge:W}function ge(){for(var Ge=o.getElementsByTagName(_),Xe=O;Xe<Ge.length;++Xe)if(Ge[Xe].src.indexOf(xb)!=-1)return Vn(Ge[Xe].src);return W}function Oe(){var Ge=o.getElementsByTagName(yb);return Ge.length>O?Ge[Ge.length-P].href:W}function Ke(){var Ge=o.location;return Ge.href==Ge.protocol+zb+Ge.host+Ge.pathname+Ge.search+Ge.hash}var ut=pe();return ut==W&&(ut=ge()),ut==W&&(ut=Oe()),ut==W&&Ke()&&(ut=Vn(o.location.href)),ut=xn(ut),ut}function C(Vn){return Vn.match(/^\//)||Vn.match(/^[a-zA-Z]+:\/\//)?Vn:webModule.__moduleBase+Vn}function D(){var Vn=[],xn=O,pe=[],ge=[];function Oe(Ge){var Xe=ge[Ge](),Ne=pe[Ge];if(Xe in Ne)return Xe;var Tt=[];for(var Ct in Ne)Tt[Ne[Ct]]=Ct;throw r&&r(Ge,Tt,Xe),null}if(__gwt_isKnownPropertyValue=function(Ge,Xe){return Xe in pe[Ge]},webModule.__getPropMap=function(){var Ge={};for(var Xe in pe)pe.hasOwnProperty(Xe)&&(Ge[Xe]=Oe(Xe));return Ge},webModule.__computePropValue=Oe,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Ke;try{Ke=Cb;var ut=Ke.indexOf(Db);ut!=-1&&(xn=parseInt(Ke.substring(ut+P),$),Ke=Ke.substring(O,ut))}catch(Ge){}return webModule.__softPermutationId=xn,C(Ke+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(Vn,xn,pe){"use strict";pe.d(xn,{Ax:function(){return ut},Ds:function(){return Ge},KI:function(){return Ne},SI:function(){return Ke},f1:function(){return Oe}});var ge=pe(3294);function Oe(Tt){let Ct=!0;if(Tt.length>0){for(let Ve=0;Ve<Tt.length;Ve++)if(Tt[Ve].compile_success==0||!Tt[Ve].compile_success){Ct=!1;break}}else Ct=!1;return Ct}function Ke(Tt,Ct=""){let Ve=[];for(let Lt=0;Lt<Tt.length;Lt++){let dt=Tt[Lt],Rt=Ct?`${Ct}/${dt.name}`:`${dt.name}`;Ve.push({title:dt.name,type:dt.type,isLeaf:dt.type!=="tree",key:Rt})}return Ve}function ut(Tt,Ct,Ve){for(let Lt=0;Lt<Tt.length;Lt++){let dt=Tt[Lt];if(dt.key===Ct){dt.children=Ve;break}dt.children&&ut(dt.children,Ct,Ve)}return Tt}function Ge(Tt,Ct,Ve){let Lt;return function(){let dt=this,Rt=arguments,De=function(){Lt=null,Ve||Tt.apply(dt,Rt)},ne=Ve&&!Lt;clearTimeout(Lt),Lt=setTimeout(De,Ct),ne&&Tt.apply(dt,Rt)}}const Xe=!0,Ne=ge.Z.API_SERVER},85786:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return ut}});var ge=pe(59301),Oe={digitalLabel:"digitalLabel___tImKs",active:"active___Ck70Q"},ut=({number:Ge,active:Xe,className:Ne})=>ge.createElement("div",{className:`${Oe.digitalLabel} ${Xe?Oe.active:""} ${Ne}`},Ge)},57647:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return se}});var ge=pe(59301),Oe=pe(17574),Ke={folderWrapper:"folderWrapper___G__0a",folderIcon:"folderIcon___oTG6c"},ut=pe(73631),Ge=pe(5623),Xe=pe(16149),Ne=Object.defineProperty,Tt=Object.defineProperties,Ct=Object.getOwnPropertyDescriptors,Ve=Object.getOwnPropertySymbols,Lt=Object.prototype.hasOwnProperty,dt=Object.prototype.propertyIsEnumerable,Rt=(he,ve,be)=>ve in he?Ne(he,ve,{enumerable:!0,configurable:!0,writable:!0,value:be}):he[ve]=be,De=(he,ve)=>{for(var be in ve||(ve={}))Lt.call(ve,be)&&Rt(he,be,ve[be]);if(Ve)for(var be of Ve(ve))dt.call(ve,be)&&Rt(he,be,ve[be]);return he},ne=(he,ve)=>Tt(he,Ct(ve)),ee=(he,ve,be)=>new Promise((ke,Be)=>{var He=Qe=>{try{rt(be.next(Qe))}catch(Pt){Be(Pt)}},We=Qe=>{try{rt(be.throw(Qe))}catch(Pt){Be(Pt)}},rt=Qe=>Qe.done?ke(Qe.value):Promise.resolve(Qe.value).then(He,We);rt((be=be.apply(he,ve)).next())}),se=({value:he,onChange:ve,scrollId:be})=>{const[ke,Be]=(0,ge.useState)([]);(0,ge.useEffect)(()=>{He()},[]);const He=()=>ee(void 0,null,function*(){const Et=yield(0,Xe.NZ)({});if(Et!=null&&Et.data){const it=[{title:"\u6839\u76EE\u5F55",value:0,key:0,icon:ge.createElement("img",{src:ut,className:Ke.folderIcon}),isLeaf:!1,children:We(Et.data||[])}];Be(it)}}),We=Et=>Et.map(it=>({title:it.name,key:it.group_id,icon:ge.createElement("img",{src:ut,className:Ke.folderIcon}),isLeaf:it.children.length===0,children:We(it.children)})),rt=(Et,it,Dt)=>Et.map(ht=>ht.key===it?De(De({},ht),Dt):ht.children?ne(De({},ht),{children:rt(ht.children,it,Dt)}):ht),Qe=(Et,it,Dt)=>Et.map(ht=>{if(ht.key===it)return ne(De({},ht),{icon:Dt?ge.createElement("img",{src:Ge,className:Ke.folderIcon}):ge.createElement("img",{src:ut,className:Ke.folderIcon})});if(ht.children)return ne(De({},ht),{children:Qe(ht.children,it,Dt)})}),Pt=(Et,it)=>{Be(Dt=>Qe(Dt,it.node.key,it.expanded))},Ze=he?{selectedKeys:he,defaultExpandedKeys:he}:{};return ke.length>0&&ge.createElement("div",{id:be||""},ge.createElement(Oe.default,De({showLine:{showLeafIcon:!1},showIcon:!0,treeData:ke,className:Ke.folderWrapper,onSelect:ve,onExpand:Pt},Ze)))}},32570:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Xe}});var ge=pe(60324),Oe={text:"text___FxbAX",wrap:"wrap___UlBQ1",contact:"contact____pUDq",img:"img___BapAv"},Ke=pe(32637),ut=pe(59301),Xe=({type:Ne,style:Tt})=>{const Ct=ut.createElement("div",{className:Oe.wrap,onClick:Ve=>{Ve.preventDefault(),Ve.stopPropagation()}},ut.createElement("p",null,Ne==="shixun"||Ne==="paths"?"\u5F53\u524D\u5B9E\u8DF5\u9879\u76EE\u662F\u9AD8\u6D88\u8017\u7C7B\u578B\u7684\u5B9E\u9A8C\u3002":"\u5F53\u524D\u8BD5\u5377\u5305\u542B\u9AD8\u6D88\u8017\u7C7B\u578B\u7684\u5B9E\u9A8C\u3002",ut.createElement("br",null),"\u6839\u636E\u5E73\u53F0\u4F7F\u7528\u89C4\u5219\uFF0C\u9700\u8981\u6388\u6743\u624D\u80FD\u4F7F\u7528\u3002",Ne==="paths"?"\u53D1\u9001\u5230\u8BFE\u5802":"\u53D1\u5E03","\u4F7F\u7528\u4E4B\u524D\uFF0C\u8BF7\u5148\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u83B7\u53D6\u6388\u6743\u7801\u3002"),ut.createElement("div",{className:Oe.contact},ut.createElement("div",{className:Oe.img},ut.createElement("img",{src:Ke,width:"124px",height:"124px"})),ut.createElement("div",{className:"tc font14 mt10",style:{color:"#777A93"}},"\u626B\u4E00\u626B\uFF0C\u83B7\u53D6\u6388\u6743\u7801")));return ut.createElement(ge.Z,{content:Ct},ut.createElement("span",{className:Oe.text,style:Tt},"\u9AD8\u6D88\u8017"))}},73524:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Lt}});var ge=pe(59301),Oe={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Ke=pe(92310),ut=pe.n(Ke),Ge=pe(71418),Xe=pe(2859),Ne=pe(99064),Tt=pe(955),Ct=(dt,Rt,De)=>new Promise((ne,ee)=>{var ce=ve=>{try{he(De.next(ve))}catch(be){ee(be)}},se=ve=>{try{he(De.throw(ve))}catch(be){ee(be)}},he=ve=>ve.done?ne(ve.value):Promise.resolve(ve.value).then(ce,se);he((De=De.apply(dt,Rt)).next())}),Lt=({data:dt,className:Rt,fullWidth:De,style:ne={},onClose:ee,onOk:ce,showFullTools:se,noAssociationId:he})=>{const ve=(0,ge.useRef)(null),be=(0,ge.useRef)(null),ke=(0,ge.useRef)(null),Be=(0,ge.useRef)(null),[He,We]=(0,ge.useState)(!1),[rt,Qe]=(0,ge.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,ge.useEffect)(()=>(ke.current||(ke.current=document.createElement("style"),document.head.appendChild(ke.current)),dt!=null&&dt.visible?(document.body.setAttribute("data-custom","y-hidden"),ke.current.innerHTML=" html { overflow-y: hidden; }",dt!=null&&dt.src&&Pt()):(document.body.removeAttribute("data-custom"),ke.current&&(document.head.removeChild(ke.current),ke.current=null)),()=>{document.body.removeAttribute("data-custom"),ke.current&&(document.head.removeChild(ke.current),ke.current=null)}),[dt==null?void 0:dt.visible]);const Pt=()=>Ct(void 0,null,function*(){We(!0),Qe("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Dt=yield(0,Tt.ZJ)(dt==null?void 0:dt.src);ve.current.src="",ve.current.src=Dt,ve.current.onload=function(){it()},We(!1),Qe("")}),Ze=Dt=>Ct(void 0,null,function*(){We(!0),Qe("\u6B63\u5728\u4FDD\u5B58\u4E2D");const ht=yield(0,Ne.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:dt.title,file:Dt.dataUrl}});ht!=null&&ht.id&&!he?(yield(0,Ne.ZP)(`/api/attachments/${dt.id}/add_subitem.json`,{method:"post",body:{subitem_id:ht==null?void 0:ht.id,settings:JSON.stringify(Dt.state)}})).status===0&&ce():ht!=null&&ht.id&&ce(ht),We(!1),Qe("")}),Et=()=>{const Dt=document.querySelector('a[href="https://markerjs.com/"]');Dt&&Dt.parentNode&&(Dt.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(Ht=>{const _t=document.querySelector(Ht.name);_t&&_t.setAttribute("title",Ht.title)})},it=()=>{be.current=new Xe.hP(ve.current),be.current.targetRoot=Be.current,be.current.addEventListener("render",Ze),be.current.addEventListener("beforeclose",ee),se&&(be.current.availableMarkerTypes=be.current.ALL_MARKER_TYPES,be.current.uiStyleSettings.redoButtonVisible=!0,be.current.uiStyleSettings.notesButtonVisible=!0,be.current.uiStyleSettings.zoomButtonVisible=!0,be.current.uiStyleSettings.zoomOutButtonVisible=!0,be.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=be.current.uiStyleSettings,be.current.show(),dt!=null&&dt.snapshotData&&be.current.restoreState(dt.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Et()},300)};return ge.createElement(ge.Fragment,null,(dt==null?void 0:dt.visible)&&ge.createElement(Ge.Z,{spinning:He,tip:rt,style:{position:"absolute",width:"100vw"}},ge.createElement("div",{ref:Be,className:ut()(Oe.imageDimensions,Rt,De?Oe.fullWidth:""),style:ne},ge.createElement("img",{className:Oe.img,ref:ve}))))}},14791:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Ae},$:function(){return Fe}});var ge=pe(59301),Oe={flex_box_center:"flex_box_center___ILe3s",flex_space_between:"flex_space_between___c0XhE",flex_box_vertical_center:"flex_box_vertical_center___Iusj1",flex_box_center_end:"flex_box_center_end___DIVMO",flex_box_column:"flex_box_column___x06LA",intelligentBox:"intelligentBox___M5xO7",red:"red___oyEWt",imgBox:"imgBox___DdoNI",underpin:"underpin___fwUex",row:"row___W9MrK",leftLayout:"leftLayout___MMjoZ",rightLayout:"rightLayout___EsxRX",head:"head___Q7Od8",centerBox:"centerBox___j58Ut",title:"title___rMcNx",tip:"tip___gLHFS",leftBox:"leftBox___DJ6lp",question:"question___THjM9",rightBox:"rightBox___CuMdf",error:"error___PHzCG",actionHead:"actionHead___vTHMx",edit:"edit___EaRLy",option:"option___z4UTy",active:"active___o8wNJ",fill:"fill___g760n",text:"text___L_lug",liWrap:"liWrap___LDwxe",li:"li___k4Mcf",buttonFixed:"buttonFixed___QxKdm",buttonWrap:"buttonWrap___OEep5",button:"button___b2y4h",menu:"menu___aQ4xO",tabs:"tabs___QmlP4",dotLoading:"dotLoading___zUYOu",showHide:"showHide___fHrAG"},Ke=pe(92310),ut=pe.n(Ke),Ge=pe(78241),Xe=pe(8591),Ne=pe(43418),Tt=pe(5871),Ct=pe(95237),Ve=pe(24905),Lt=pe(38854),dt=pe(54580),Rt=pe(3113),De=pe(93948),ne=pe(19842),ee=pe(92832),ce=pe(5112),se=pe(6848),he=pe(43604),ve=pe(85057),be=pe(3294),ke="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAAUCAYAAADC1B7dAAAAAXNSR0IArs4c6QAABk1JREFUWEd1lwlsVkUQx3/7ClGMSMSrHCKXHCpQhYhCNB5AYqRQGq1AiKgEEAiokAJFFIoipcVE5EYFyn23IGCJgoTDQimWSJSzCIKIcglUEIGu2bdv3+77vo+XfPl2Z2Zn5z8zuzsjSPDJ0tZV2ftfGog0BG0Q1AbuRABCgJDBvxorWqDE5xkZh+4porNGjRXNyKvlMuCbf2OXDPRIWYHnnQJKqaSQOimFos3s67HmG1NCupzxWDcgD2Qjf0P1qT/fqGAcGh4Yb4x1ZZSsCySy3oAV4LnOCByi9Pl7CQ00HPvIDb0cz8sUqSUFLqgQkJRjPCavzEFUZoaecz2oNjYAjXGJgEQi5Bio1kYiZYDEOEt5z4+ecZ4D2I2kGePl0eWlkUJkVxp/+yvkpOa5IDOtxxIAiE2nuEg5RhjZ2EiFhgYpF6ZfTNq662KzI+TpgOGJPJFaMjwEJCc06YZgtY5AENLMA7HpCcVTYfd0TR/yi+Vvy4F9CyG5BaQviV9nKBeOwNrXoNdOSKqqqSe2wJZ3dfS9JP0LM+MmyJt63iEfaj6m11w5DUWdo+c1yUtX6SfkrNZVOXNpP1I2Cg+qApV1KN6wc+WQ31nTh+63/K05sHc+JLeEjKW3BnT+CKxKh66L4P4WWu7ySVj1sh63GwNN0u36IwVQMk6HPWMHVKmmeceLoOR9exnpFC2nHs2F/LDxqwi5PBIdJTA6ASClbE4XOHsIhjsR3DIByhboCPVYZg2qvAHST21tlA8oA9pnQYuemqwOff5TcPMqpK2Ae5ra9Wd/hvU9ocZDkLbW0ktz4PBynU1+OgZnzhMZQo5quAhBz/DqNQdy7JHEnt4+HbZ+BqMcwJs+gR/nQ62W0EttFHxrB8PR7+xlYq78Zl2h4wQrt6oHnD8MfXaCV8XSb/wL+W2hYUd4fpKlr+sOFw7q58P3VQhosZAjGhwEmkTfE2D8Uavg4GZo+oKenz8O0zrCBw6gb8dD6Xyo3RJ6r7DrDnwD54/a1Di2HU7vhZoNofd6K7fpA7hwFF5ZFO/EpanQJBWe6Kd516/Awvb6bJnLwgQBcUjIofUuI4R+NNVnHrwcB9C3n8Lj6XBvAy0zMw3eLrSbbxwPu+ZBnVbQZ2XiyCrq9xNhz1zNH7wbbquux2Xz4eJJeG6UnitwdzfU46Kh0KwL1H9Oz0/uhA197YWgaPbmrBByyIPSvjuBLSqEnx5zDJ4EwoNOQzVt2xfwTF/L/+Zj2DkP6raCvqtuDWjzRNg1RxvQfR7Uf1rLHi+Gf87AI130mduUDR2yNa9kJjTvCtVr6fnuGbB7mlOduO+YqBByUF2diObKNmGc/Js1bEMe7F0DWdu03MU/ocYDlr/uIyhWgFrCAOfh/mEOnNpnn4LTvwQpKOCFYdCuv9bxzzm4dhlq1oczB6FgIPTbpHmnyqD243avgr5wYoc9N1G7DwnZr450QmbDN/WEY3AefDcVBq+ARk/GR2DtONgxF+qlwCAH0KIBsH9jtO5Tq5XTmnWA12bE6ypbBkUfwjvFcEfNKF9Fb2pbuF4RfYP8gCi93mIh36qVIOWAWb9bZV/nwsYp0K4H9MyNN6JwHGybAw+lwBDnbN24BpU3rfy/lyG3nZ7XSIbMHfG61oyAn1ZD91nwcHARGam/DsDcrvFgTFYleRlCvp4s42oshfZLVdgGX+FEKJoC1apDbhlUvT1qyOps2PIVNEiB95z3Itbcq5cgO8WmYFYx3OWkrpL/vCOc+xWeHQgvBmfW6NmzBDaO0bNInel3AOXUqN5cyN7J0q+Hgqon/M//w5qzeiJsmKyV9J8JbVKjpq4YqwHVT4HMr+O9bihXL8LoVrZIfWM2PNrJyl/5G8a31oAbt4c3F8Q4bhjsW2Ova5O+frpVSRdZ+ws0IPXFgjKqDD3OKzFecpWHVXmg5Fbthks36/1/fzP3OrZVgVtv2v4rT4w5rIvTSIRcEIFO05qEkXPpt6q+jUyiZtA13G0RfFnTbsS0DuZtDPU6fVmSyEP0Gimyg/bBP0Mm3QwgN/3c6CUaxwKMeNptCmPaEZ/ldr5BKiRsJhN0u1COl5QpcsqjDV4IyM3WoESKO1eJjHdTMlGE41LVaVHiuuDA8EiEw7a/AsEpPK8UZCFN7ysU/ffEteD/A0+36M8YCYIrAAAAAElFTkSuQmCC",Be="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAAB4CAYAAAAqs3YmAAAAAXNSR0IArs4c6QAACbJJREFUeF7tnVtMHNcZx79vxruLITZUceNbwEpr8KXAwi6+pm3qKoraqhepVfvWB3sJqKn60Mf2hfLSPvYhquVgcKTmrVIrpbdIURXbTWPMZYHl4osSy7FpiO2QFBuDze7OOdUh3t1hvLczZ2BmzMcbO9853zf/33xnvpk5MwfB5h/nHNs6p2ohZWwH5NUcMWSzq3XZjCEaGvD5Ch64+V7vvpuIyO0IgXYafaPresXd6flWRL7FTntqs1IBxtinNXU1I+e6n3soq400QJF5kdjEYYInK3VxewFx9ExLv2wmSgOMdkzWccMIOxs+9SYUqIDA+IW+/Tdk1JAHeDxxiGvwTMYJ6nAnWLUw3v/7ow9kHK932yO/vLAxuVDVzI2cloAwN9IbfldGG3mAJ8ZeMhcsoc0L/yJ4MpLnbAXEpXtVL2Z+EYXNWG/zP2V6kwYYiSW+Z3Yw0hf+m4xDsl2pgKqeBNDlI4oAugxA1T0BVFXQ5fYE0GUAqu4JoKqCLrcngC4DUHVPAFUVdLk9AXQZgKp7AqiqoMvtCaDLAFTdE0BVBV1uTwBdBqDqngCqKuhyewLoMgBV9wRQVUGX2xNAlwGouieAqgq63N4xgDTP02WSJdwXmke6/ESe5nl6G541OvM8UqR5nv6Cl4k2O4+U5nn6E6CIWswjxahlnueeukr40Qs1sKnSvzv2JEY+vwjw5/NzcPXmYm73EOYwapnn+euf7iB4Hj0CBMTfvjGTjU4UNmgtY3/XucOj4VNYQoFfvZYDKP4ngD47Lgigz4BZwyWABNDnCvg8fMpAAuhzBRwO35oR1ireut3qXrbqpwwkgA4r4PPuKAMJoJQCNIRKyeU9YwLoPSZSERFAKbm8Z0wAvcdEKiICKCWX94wJoPeYSEVEAKXk8p4xAfQeE6mICKCUXN4zJoDeYyIVEQGUkst7xgTQe0ykIiKAUnJ5z5gAeo+JVEQEUEou7xkTQO8xkYrIUYBDVxZh6Ooi3J41IJk2pAJZ78bBDTps3aLDgT2VcGBv+S+iOAJQzNH/0zuz8MFHyfXOwZH9370zCD/55pay3klxBGDf3wmeI+RMnQiIse+WXkdFGaAYNv9yfs7p+Kk/APjhCzUlh1NlgCffnIXpW7mhk9aNsHfs5Vs3onZbEF75QfEsVAbY1Xd7RcFC60bYAyhaWdeNEIVNd2xr0Q6VAVo7oHUj7AMULWXfzySAano73poAOi7p2nZIANdWb8e9EUDHJV3bDgng2urtuDfPA7QG6LQCfq+CCaDPl78jgARw5YKOpV75lb2QpyG0+EnD8xno9DnvSeuPAPqcqDLAlvbx72ic6xkdSn3sTnYI9bm+qx6+DMD8H7trT3wNONRkIi31uUkC6CzTcgEW/Nzk0dilXQ8h1Ww3LL9eh337F++HPllM7meQ3soZpnnQuDF6quUDROR2tbDTTqXIW/7gq/jkcuuJsSOapj1tJwA/AhTP4R7eqzqKACtmE3FufPz92taR7m5kdrSw08YuwOwnl4VT8dHzuZtzETsQ/QawELyM+GsN0Q7AFR89zwXO8fn2y3UPMVXHADeZC5tiR5afAOaDh8AYB00z7+NaQiwXYNFlB2RSX3WhChlfTtrmhafjhwDJK09vDgRn5yBiLubWCqKqnsvrRsj8qTqU8eWUbT54GsD14b7wZMZHtGM4wFng8FpDVNXziQcoqs1bi4tfNRcsVnhuQiSAJdK0LTbVyiD9bMYMdfww3tM8UaiZyERIh45xZKG1KGw8D7Dck3QhQVWLpEgs8S0ACIj+RcECuvF2vKctVRjg+F5u8Hrr9tU6JxLAEhnYenz8RdT4xozZliS88/Yb4YV8zQ6+PNaQZrinUJerAZEAlgDY0nmpXkun9mbNDJjDYOqiNQsjsfhugA37MnYaosG1DaOcpXavZmFDAEsA7Ori2l+nJyOIbHshiG3Hx7/ENP6VzHZxzaVrocF4z57ZQtXpSF9r3Inbbp4H6NSlgEo/AuKbN8aimq5ts0IMaPrOZEprMsMLhgIDg3/Y92mp6tQJiASwTLJ5MxFhAThU5eAxI5hMDgz+8VAW3mpDJIBlAhRmeTPxUXvOMV2B2kB/X+NnxS4xrBf7gDgTP900Ync4JYASAItB5JWVF0dfrf+kVHf5zokqEAlgKcXzbM+Xicj5/zbVhi+e68Z0qS6dhEgAS6ldYLtXIBJAmwALDaduZaLd3Xjib2aXEsYrmVgqzkLb1z3AbCbOjEU1lrtO9EsmEsBHh/ZyJipA7HiNB4aHxlc8T1SpTsvNSAJoUsqPEAmg5VD3G8RVB6j6PNA6lKg+HyxnaPITRAJY7DpR8Zw4NDhxBIFXZ10o3nbLFyoBLJKSTmSiFSLq2qV4T9O1ckaCcmwIYAmVHIeIsBA/3XzW7s1va7irDrCco8jrNp9DnIpqzMg+Tyz3OlG8unCgPdHCALMTqzg34qNnIjNO7DcBLFNFOxAFvIMdY2GDabVmNxqy+aHTLeedyEICWCbA3B2b8jKxELyMO9QDw/Ge/R9LuM9rSgAlFSwnE/PB01Cb1wEupzg7KFxyhvdGX28+L+n+MXMCaEPBYhDP/gYM67Ap4H1xY0X/W6/WL0XaJ5qBs13CrR7Sh4ZONt6yEULuykS2serzK1l/XrUvBFHT+X3zOc8MT+zLj7smg9dm0seAYZAD3h3ta/63yj5SBiqolw/iymIll3nm36Mdk3XcMMLitwBqgwO9TbfthkEA7Sr3qJ2A+I//JtoY4GOf2kW9ol/MLbW6EOfItljieY74BUCYG+kNv2s3DAJoVzlTOwHxrZnE7lRaqzNP4wfGub4hcL1qx/6r1rk20Y7hap4MfB10gIoADFw4Fb5jJxQCaEe1Am2Wq88TQ88aeqjePN8UOV8KBmGq/1TLR+ambbFEIwN4TtwUiJ9p+Y+dUKQBRk+MvcQRs69e0UfPH5ddgDz88vjONOP1HPGpjAXnOFtdoU2cO9l4X/xmfpWt3GmNVm/yAI8nDnENnsl0RMsOFM4bAfLozxI7kkloyIJknIOuX9u8c/b9c93H0q2xkV0IerMG+mfDfY3vyWahPEBTBSXrzE/2Tj53FCAjsavbde1BA+PaJqEDZ/ggqPMrRiBUxZJLDeK3QkVPMd2kAX4ezMRhRF56nRg/EbPE6iTA3BDKsa3z8jaNpxsMxjc/NhzqcCfeEx6QkU0aoOhcfFfm7vR865MMcTUAmkEe/PnU1vQSazA/8EXO78fPtJxddYDLQ4C4lumcqoWUsR2QV5sLG5kAvGq7mgDN+3zglcltfCn1ZcbwKR30S0OvN03LaPJ/jAi5buoQkzIAAAAASUVORK5CYII=",He="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAAB4CAYAAAAqs3YmAAAAAXNSR0IArs4c6QAADGlJREFUeF7tnVlQHMcZx7/umT0AcSjGBonDOmxdgV2Ww0iWIsmxrfIhJ1VJ2W+uilgEjqtclTwmLxQvyYur8uCKYmFQXMmbXUlV4lw+YsmHkBECdhdkSZZlyUJgScEWh7h2d7pTvcUuw2hhp3dm2dmleWPn66+/+f+me7p7vplGkOQfpRTVt56vgJCyARAtpAg5knS1JosRhBQMdMpJbddPd+68jhCiyQiBkil0sO2qc2J4yoMQLU6mvCizVAFCyLdFlUX9p9o3z/Fqww2Qtbxa7+BuAY9X6pXtGcSBEzVneFsiN8C6lqFKqihuc8MX3pgCTrAFurt2fc2jBj/AI/5GiuGBaCVIgtv2vOnAmd89OstT8Vq33fPL7pzgdJ6LKotaAoLx/k73Jzza8ANs8h1SD1gcBdMfCHg8ki/aMojzk3lPRH9hAxtfp+tfPN64AdZ6/c+pK+jvcr/DU6GwXaqAUT0FwDRfUQJgmgEYrV4ANKpgmssLgGkGYLR6AdCogmkuLwCmGYDR6gVAowqmubwAmGYARqsXAI0qmObyAmCaARitXgA0qmCaywuAaQZgtHoB0KiCaS4vAKYZgNHqBUCjCqa5vACYZgBGqxcAjSqY5vKmARR5nmkmmaD65fJII0/kRZ6nteFpo1PnkSKR55lZ8KLRxvJIRZ5nZgJkUbM8UlSnyfPcXpkLPz1QBPm5mXti2Rj51AzAXz4ah0vXZxZPD8E4qtPkef76xY0CnkWvAAbxN38ejUXHBjZIO4z9betGi4YvwmIK/Or4IkD2vwCYYdeFAJhhwLThCoACYIYrkOHhixYoAGa4AiaHr20R2lG89ri2et5Rv2iBAqDJCmS4O9ECBUAuBUQXyiWX9YwFQOsx4YpIAOSSy3rGAqD1mHBFJAByyWU9YwHQeky4IhIAueSynrEAaD0mXBEJgFxyWc9YALQeE66IBEAuuaxnLABajwlXRAIgl1zWMxYArceEKyIBkEsu6xkLgNZjwhWRqQB7L85A76UZuDWmQDCscAWy1o3tsgQlxRI0bM+Fhh36X0QxBSDL0X/rwzH4ciS41jmYcv4PldnhhR8W63onxRSAXf8Q8Ewhp3LCIHoPJ95HxTBA1m3+9aNxs+MX/gDgJweKEnanhgEe+9sYDN9c7DrFvhHJXXvx9o2oKLXDyz9euRUaBtjWdWvJgEXsG5EcQFZKu28EG9i0e0tWdGgYoNaB2DcieYCsJO/7mQKgMb1NLy0Ami7p6joUAFdXb9NrEwBNl3R1HQqAq6u36bVZHqA2QLMVyPRRsACYou3v2CfIeLdDTebiFABNANj4yuWC0MzkA0TB65Ek5SCg7PGADQilCFMKVA4pNHxXxngSETyxqRLderu9ypSVfAEwSYCRVZCp/E2IQAVFhG8LdUIpSGhMUvDIM5VVI+3tiCTT+sREPgnVFtYgd9IQ3QgYcW+Aqa2SAszIDvzF2d9X3Uimy7V8C0xC45QUYfe0xqOBTUEgOzHFktmVUIImc9Fk/+kT+6Z4fBsGWNMceAZTGjuhRB+7y8S10OfbhuyXR0P1mOD74omLgBAE6H8E5O9kp3SnJFQ4OwqjoS13viJfrd/isCtO5xwNOjGR71NAKcUSdi7nx2aD85+97rmmFyIPwPgfu2v2/wAoFEUrTPS5yUwDeOhFf963NukRipR194iKYFoGuPpgmTTCMyg5+IuBoulp2KQQXBEPlE2WrvQcr/pcD0S9AJf93OSj3s8fnIOQS09l8WysPA9j8MZkug8wsqtjp1QJS1S+9Gxl9TUjA5DGVz4rCN/N2Umxai/4hYqQhK6dO149lOi+aGSeHPngK7s3eJp8ezCO370kAmtVgKzb/GoY9t7T8thHUnGor6+jXvXl1ERnufLxSCMgwWrtoAhT+OLcCfellUonCzD2yWXmnH30fPz6eG0yEK0IMHJRtvj2aO95SIKRLXcu+d9++wXTU+jqWs4VUyrXAVna2m0In+3prL61HMRkAC756HnUMTvpvc0XKudQqJIAylcPbFa6gqwIsP5IYAvB9PuabvOb/i5PX6IuzUhbZF3q/Kxjn2aUGyooLzh1qn3zXDzfegGuuO0AT9BGN6rgqSsZWzbPm53KeUwtIqL0zuEKd7eR+53eWBpeHipV5pUGtb2EyXDvGx6fHoC8DYJ7Imt1gHUt/lqqQNliz4LC5XLxR+90bDTtnpcI5iNHfdvCBG1X231PWvfxBx1bJ7RljeqZVQAjy2PjuY+rBxNspNbdtevrRKKbebytjeK/3wg8hgBiKddEITd9b3p6BcAVlK5tHtwJlDwUa30AMz8qd51cja5TG9ael3xl8yFUG/udUFqyLu/9f7/28Lza1vItUO9Nejkueu8Jkb2fvENPqhemkST5+zqqrpvZuvT6YvE0HPUdIBTnL5YJX+jvqvtSAIyjYl3LuUKq2PZHD7HlsfzymndPtaOwXtHNtqtpHXgYh/GOWEyU3uk7UfOpABhH6Vpv30MA8s7oIYLJTd8b995zzIa0kr+9TRfzZ9H8wcWLCpMtkxf+o56Hii50QZ2anw00YAmXRsWy28ggz6JyqsB6vP7H1YMZB0inz3RVfRetz/IAUyWM1q/HG9iPgBZGf5dDc91n/9T47WrVv1w9NUeHGjBRYhcWBSUw0FUbGxULgAvK1Xr9T0XSIBb+tpZL7/I8YUgV6LqWQDVV6KZF/9KF/q6q2EBGAAQANuKraw4cVkN4rtz1z3RMH7QXQk3r5w/jcCg2kKGydGVA9ahJAIy2wCO+w+oJvN7pR6paXtTvI83+zWEKVbGBjIKu9b3pGhT3QI3ydd6BZylgHP3ZKi1Qu6xGZNtF3/FdlwVALcCmwUPqSXzx+pIP33u1dDrVLSyR/3qvv4oAbI7aSQ7s6z1WPSwAapSrOTLwqPp5ptMGPd2vu28nEjjVxz1NgT0I0dhrt2bHlTWL2dorHUnocl+H62KqAa3kf2GD6acQonLUrsAhnTx1rOquWXFlDcCGlwcrlHlSExMGwXh/p/sTs4RKxs++nwfWzwTpvmhZStDswB9dHyTja7kyWQOQ5cBcuR4+pB6JFq+HD9971Z22+2Bt86ALKHkwKj4GuHquyz0kAC6jQG2zfzdQuD+VgukV/2DbSXli+L4n1d0nkpxn+jq2j+n1occua1ogO9mGI4MVCl7sRgkiyoacdf/VPoPTI4xRm/om/3aCYFvMD6HB5yrd75u9uJBygEafB2qFXGmCHu9JOMtE6+tw9xsFwlOeZQaEptY9RlQZ7zKCobOd7qs8fvTYZhXASCvUDmbYAmmC1D49Qum1iZdny16ASVVmQNYBjAzdmwb3I0wLYqM/isL2vJnTPa/tntQLIlk7T+vQLhRWtqrLO2y0/8zrNSPJ+lypXNYBZCe7t+nT/DmUt1+9tMaG8NgW7DYzI1srrKdpsB4hskH9OyJw+9wJ19lU5aOmHGAqrjo9Pne/NLApGMLVS2wJDeY68dlP/+C6o8eHXpvI05CjQzvUCVWsLEF4rqis6mQq0zqyFiATsLF1aFdI051hhBQM9ELPG65rZrSKSCLx3RxP3FfXFACbDAM9ne4bei8GXrusBsjEuPeB6oJECMYdVDqvTm/gEe9gG5VnRv1bQgrZipAUWyq7x0eKIWY9wEh6nzewbcmcbMlNCsYlO75WLDlv65kvsuWxEMEbQmGlUp0BEHXJuk0cJk5QvwOcQohZDzAqbGPzYEmIEk880WOjVUATMlYmqYJn7cg2R2zziIQxCilKDgYpHxAtpAgt+0EENmDJr3T1zY4ESkNh8KwGxDUDkEFir9FNj47vWO7NWp4uVG3L5nm51HHh9Ikdo4sXjL98NSCuKYBRcZ9ouVI4Rie34TAqMfSlCkKDsoS+eLrM9XW8JbLG5tRDXJMAoyCffuWy49bMZAWiUikgqZACiaVkLNcaI/NJCrfA7vjm8IZt3yVa20w1xDUNUA3p+effkm4U7Cqcg2A+AruNymDH80RSHPKcTVLmbITM27E0k8zD2FRCFACTvfFxllsOopQr9fYeq7rJ6S5mzg2wrsl3SD0SEx891y99PIgU0MRAl+tj/V6WWvIDPOJvVH9WQ2w7wCe9FiLTr6/D3cPnZdGaH2DLUCVVFHeyFWZKuVQmBrP36MPzZBtCNFiG7w8Yef2bG+BCptVudapcpkDhiTOVAHniSGTLDTA6IZ4YnvJkM8SsBsggRl5pbj1fASFlQ6IlpkRXkRWPZwrA/wPlJnpuyspBOgAAAABJRU5ErkJggg==",We="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAAAwCAYAAADJuP4nAAAAAXNSR0IArs4c6QAAAz5JREFUeF7tnM9PE0EUx+fN7rKlAQ6EWw3GEMSE8iPSmHjz4kE961Wjif4ZpH8DicZGjYaTclYTT1ysIbEXxYOJLRZMRSUYC0X7Y2dMiyVaKd2Zt+3s4XHtfN+bfD7Zlp2dHWD0hyYwd/P9iFWrxjwhyvZgf2FlYbyILuqzAPgcR8PaELj8RFrZp29n//7YceDTyr2pL72ARgKRlM9dW4sU5c5kaxnbkdsXYtP5ZBIEssWRcRKIpNtOYKOsA3tjMcguJeMVZJu2cRKIJHukQMaYbfFaNMKyy7fju8hWh8ZJIJJqJ4H18sBtyRxrPZOa2EK2+y9OApFE/QhstgCXf3t9d3IDACSy7UGcBCJJqgist+KW3JV2NZdJJarI1o04CURSVBXYgA6swvoq2UwqsYdsTwKxAHUENq5E2xIOk/lX9+PbmDnQFYihxxjTFdhs60p3M/3oZEH3d5EEGha4f7voFUcvzuaWroCnOh0SqEqsZTz2CmyW47YsD3hDH5YfnvilMqWGQCklJG5lbJUgjd0nMGhH3GJJTATBwwLuib7+tUxq7IffenD2xupwlcFxUfO43xCN6y4BcCuFTCrx2U8XOHN9dabmCbr6/NDq4RjO2fdLo1MfOy2Gw+mrb+Z6OC9qpUDA4fzn8ICbfb4wXm4XI4EKQE0MrS+GO8zOvXxwauew/iTQhBWNnhEhN9KLM19boyRQA6apSMS2t84fe7yRTCYPHhKTQFM2NPsCsNKfddTGYjgJ1ARpNCahOiJF9sXiTIkEGjWh3xy4lINS5EigPkPzSQlVEmheg/4MSKA+O9PJ/a/QIfoKNS1Cqz/9E6OFLRQhuo0IhQa9SdCNvB63UKRoKS0UGtQnQYvZ6sxCk/D1OIke6IbG1z8T8f1Al7ZUhE+g0paK+vRpU5O+ROObmvSnTsk6gVBsKyQV+gSCEEgbe/X5o5NYgW6/u5m+Q1vr0SJ0C+gKpJdbdIkHnNMRSK+XBSwBU05VIL3giaHdhayKQHrFugsCsCX9CKRDDrCUu5jvJJCOGeki/CBK00E/QVA0WIOO2jIIP4jW8/OSP8u/m/aksJr16LC7IMj2sEbzuEkBnmdFo+u9PG7yNxidqHC3DAxxAAAAAElFTkSuQmCC",rt=pe(99064),Qe=pe(57647),Pt=pe(5623),Ze=pe(50304),Et=pe(59879),it=pe(28451),Dt=pe(15342),ht=pe.n(Dt),Ht=(ye,qe,vt)=>new Promise((et,Ye)=>{var xt=zt=>{try{at(vt.next(zt))}catch(un){Ye(un)}},yt=zt=>{try{at(vt.throw(zt))}catch(un){Ye(un)}},at=zt=>zt.done?et(zt.value):Promise.resolve(zt.value).then(xt,yt);at((vt=vt.apply(ye,qe)).next())}),Vt=ge.memo(({tagName:ye="div",value:qe="",className:vt,style:et={},onBlur:Ye,id:xt})=>{const yt=(0,ge.useRef)(null);(0,ge.useEffect)(()=>{if(!yt.current)return;Ht(void 0,null,function*(){const un=yt.current;un.innerHTML="";const fn=qe==null?void 0:qe.split(/(`?\$\$[\s\S]*?\$\$`?)/g);for(const Qt of fn)if(Qt.startsWith("$$")&&Qt.endsWith("$$")||Qt.startsWith("`$$")&&Qt.endsWith("$$`")){const Kn=Qt.startsWith("`$$")?Qt.slice(3,-3):Qt.slice(2,-2),On=document.createElement("span");On.setAttribute("contentEditable","false"),On.setAttribute("title",Qt),On.className="edu_latex",un.appendChild(On),ht().render(Kn,On,{throwOnError:!1})}else{const Kn=Qt==null?void 0:Qt.replace(/<[^>]*>/g,On=>On.startsWith("<img")?On:On.replace(/</g,"<"));un.insertAdjacentHTML("beforeend",Kn)}})},[xt]);const at=()=>{var zt,un;if(Ye&&yt.current){const Qt=yt.current.cloneNode(!0),Kn=Qt.querySelectorAll("span.edu_latex");for(let On of Kn){const jt=On.getAttribute("title"),sn=document.createTextNode(jt||""),jn=On;(un=(zt=jn.parentNode)==null?void 0:zt.replaceChild)==null||un.call(zt,sn,jn)}Ye(Qt.innerHTML)}};return ge.createElement(ge.Fragment,null,ge.createElement(ye,{ref:yt,contentEditable:!0,className:vt,style:et,onBlur:at}))}),ot=pe(24065),Ue=pe(34604),Wt=Object.defineProperty,Ln=Object.defineProperties,Fn=Object.getOwnPropertyDescriptors,Gt=Object.getOwnPropertySymbols,rn=Object.prototype.hasOwnProperty,An=Object.prototype.propertyIsEnumerable,ni=(ye,qe,vt)=>qe in ye?Wt(ye,qe,{enumerable:!0,configurable:!0,writable:!0,value:vt}):ye[qe]=vt,Sn=(ye,qe)=>{for(var vt in qe||(qe={}))rn.call(qe,vt)&&ni(ye,vt,qe[vt]);if(Gt)for(var vt of Gt(qe))An.call(qe,vt)&&ni(ye,vt,qe[vt]);return ye},Yn=(ye,qe)=>Ln(ye,Fn(qe)),It=(ye,qe,vt)=>new Promise((et,Ye)=>{var xt=zt=>{try{at(vt.next(zt))}catch(un){Ye(un)}},yt=zt=>{try{at(vt.throw(zt))}catch(un){Ye(un)}},at=zt=>zt.done?et(zt.value):Promise.resolve(zt.value).then(xt,yt);at((vt=vt.apply(ye,qe)).next())});const wn=ye=>{ye.preventDefault();let vt=(ye.clipboardData||window.clipboardData).getData("Text");document.execCommand("insertText",!1,vt)},Gn=ye=>{ye.key==="Enter"&&ye.preventDefault()},ze=({children:ye,style:qe})=>ge.createElement("div",{className:Oe.leftBox,style:qe,onPaste:wn},ye),Ee=({children:ye,style:qe,className:vt})=>ge.createElement("div",{className:ut()(Oe.rightBox,vt),style:qe,onPaste:wn},ye),Pe=({className:ye,style:qe={},width:vt=1200,onCancel:et=()=>{},onSuccess:Ye=()=>{},gather:xt={},mode:yt=1,stickyTop:at=0,subDisciplineId:zt=[],hideWordFeatures:un,dataSource:fn=[],customLeftHeadNode:Qt,customRightHeadNode:Kn,customLeftContent:On,hideRecognition:jt=!1,onExchange:sn,isSingleSelection:jn=!1,underpinBackgroundStyle:dn={},headExtraNode:Pn,isRefreshItemBank:ui=!1,okText:pi="\u786E\u5B9A\u5BFC\u5165"})=>{var gi;const[bi,Xi]=(0,ge.useState)(1),[ar,Ji]=(0,ge.useState)(0),[wr,mr]=(0,ge.useState)(""),[Hi,Er]=(0,ge.useState)(!1),[$n,Le]=(0,ge.useState)([]),[Ei,Ri]=(0,ge.useState)([]),[nn,di]=(0,ge.useState)(!1),[yi,Li]=(0,ge.useState)(!1),[Tn,Un]=(0,ge.useState)(!1),[kt,$t]=(0,ge.useState)(!1),[Je,qt]=(0,ge.useState)([]),[vn,Ft]=(0,ge.useState)(1),[st,on]=(0,ge.useState)(!1),[En,Dn]=(0,ge.useState)(!1),[Jn,St]=(0,ge.useState)(!0),[Nn,qn]=(0,ge.useState)(0),[Si,en]=(0,ge.useState)(1),[Cn,At]=(0,ge.useState)(""),[yn,pn]=(0,ge.useState)([]),[mn,Wn]=(0,ge.useState)(0),[Hn,Qn]=(0,ge.useState)(0),[ii,ji]=(0,ge.useState)(0),[cn,Yi]=(0,ge.useState)(0),[$i,Wi]=(0,ge.useState)(0),[ln]=Ge.default.useForm(),[oi]=Ge.default.useForm(),Bi=(0,ge.useRef)(null),Gi=(0,ge.useRef)(null),Ti=(0,ge.useRef)(),Qi=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],gr=["C","C++","Java","Python","JavaScript","Ruby"];(0,ge.useEffect)(()=>{fn!=null&&fn.length&&aa(fn)},[fn]),(0,ge.useEffect)(()=>{bi===2&&Bi.current.focus()},[bi]),(0,ge.useEffect)(()=>{Tn&&Ki()},[Tn]);const hr=()=>{if(bi===1){Xe.ZP.warning("\u8BF7\u5148\u4E0A\u4F20\u8BD5\u9898\uFF01");return}Ne.default.confirm({centered:!0,icon:null,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u6E05\u7A7A\u64CD\u4F5C\u5C06\u5220\u9664\u8BD5\u9898\u7F16\u8F91\u533A\u57DF\u7684\u5168\u90E8\u5185\u5BB9\uFF0C\u786E\u5B9A\u4E00\u952E\u6E05\u7A7A\u5417\uFF1F",onOk:()=>It(void 0,null,function*(){Xi(1)})})},Ki=()=>It(void 0,null,function*(){const Mt=yield(0,rt.ZP)("/api/disciplines.json",{method:"get",params:{source:yt===1?"new_question":"subject"}});qt(Mt.disciplines||[])}),Sr=Mt=>{const Pi=[],Ut=(Ui,wi)=>{Ui.length>=2&&Pi.push(Ui.join(""));for(let yr=wi;yr<Mt.length;yr++)Ui.push(Mt[yr]),Ut(Ui,yr+1),Ui.pop()};return Ut([],0),Pi},kn=Mt=>(Mt=Mt||"",Mt=String(Mt),Mt=Mt.replace(/\s+/g,""),Mt),Br=Mt=>(Mt=Mt||"",Mt=String(Mt),Mt=Mt.replace(/<div>/g,""),Mt=Mt.replace(/<br>/g,`
|
|
|
`),Mt=Mt.replace(/<\/div>/g,`
|
|
|
`),Mt=Or(Mt),Mt),_n=Mt=>Mt.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),Or=Mt=>Mt.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'"),no=Mt=>{var Pi;const Ut=Mt.clipboardData;if(Ut){const Ui=Ut.types.toString(),wi=Ut.items;if(Ui==="Files"||Ut.types.indexOf("Files")>-1){Mt.preventDefault();try{let yr=wi[1];((Pi=wi[0])==null?void 0:Pi.kind)==="file"&&(yr=wi[0]);const Zi=yr.getAsFile();(0,it.I)(Zi,Ci=>{var nr;if(Ci.id){if(((nr=Zi==null?void 0:Zi.type)==null?void 0:nr.indexOf("image"))>-1){const rr=`<img src='${be.Z.API_SERVER}${Ci.url}'>`;document.execCommand("insertText",!1,rr)}}else(Ci==null?void 0:Ci.status)===401&&(document.location.href="/user/login")})}catch(yr){Xe.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};function br(Mt,Pi){return It(this,null,function*(){if(typeof Mt=="string")return yield Pi(Mt);if(typeof Mt!="object"||Mt===null)return Mt;if(Array.isArray(Mt))return yield Promise.all(Mt.map(wi=>It(this,null,function*(){return yield br(wi,Pi)})));const Ut={};for(const Ui in Mt)if(Object.prototype.hasOwnProperty.call(Mt,Ui)){const wi=Mt[Ui];typeof wi=="string"?Ut[Ui]=yield Pi(wi):typeof wi=="object"?Ut[Ui]=yield br(wi,Pi):Ut[Ui]=wi}return Ut})}const mo=()=>It(void 0,null,function*(){var Mt;Er(!0),mr("\u5904\u7406\u4E2D"),yield new Promise(Ui=>setTimeout(Ui,1e3));let Pi=(Mt=Gi.current)==null?void 0:Mt.querySelectorAll('[data-text="edit"]'),Ut="";try{Pi.forEach(function(Ui){var wi,yr,Zi,Ci;const nr=Ui.cloneNode(!0),rr=nr.querySelectorAll("span.edu_latex");for(let xr of rr){const Gr=xr.getAttribute("title"),vr=document.createTextNode(Gr),kr=xr;(yr=(wi=kr.parentNode)==null?void 0:wi.replaceChild)==null||yr.call(wi,vr,kr)}const cr=nr.querySelectorAll("span[style]");for(let xr of cr)if(xr.style.fontFamily){const Gr=xr.innerHTML,vr=document.createTextNode(Gr),kr=xr;(Ci=(Zi=kr.parentNode)==null?void 0:Zi.replaceChild)==null||Ci.call(Zi,vr,kr)}nr==null||nr.childNodes.forEach(function(xr){xr.nodeType===Node.ELEMENT_NODE&&xr.localName!=="h5"&&xr.localName!=="h4"?Ut+=`<p>${xr.innerHTML}</p>`:xr.nodeType===Node.TEXT_NODE&&(Ut+=`<p>${xr.textContent}</p>`)})}),Ho("/api/intelligent_imports/import.json",{html:Or(Ut)})}catch(Ui){console.error("\u5904\u7406\u8282\u70B9\u9519\u8BEF:",Ui)}}),Jr=Mt=>{let Pi=Mt.filter(Ut=>!!(Ut!=null&&Ut.type));return Pi=Pi.map(Ut=>{var Ui;const wi=(Ui=fi.find(Zi=>Zi.id===(Ut==null?void 0:Ut.type)))==null?void 0:Ui.deal,yr=Yn(Sn({},Ut),{id:String(Math.random()).slice(-6),knowledgePoint:kn(Ut==null?void 0:Ut.knowledgePoint)});return wi?wi(yr):yr}),Pi},ur=()=>{if(bi===1){Xe.ZP.warning("\u672A\u8BC6\u522B\u5230\u8BD5\u9898!");return}Ne.default.confirm({centered:!0,icon:null,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u91CD\u65B0\u8BC6\u522B\u4F1A\u8986\u76D6\u53F3\u4FA7\u5DF2\u8BC6\u522B\u7ED3\u679C\uFF0C\u5305\u62EC\u4EBA\u5DE5\u4FEE\u6539\u7684\u5185\u5BB9\uFF0C\u786E\u5B9A\u91CD\u65B0\u8BC6\u522B\u5417?",onOk:mo})},er=()=>ge.createElement("div",{className:Oe.row},ge.createElement("div",{className:Oe.leftLayout},ge.createElement(ze,{style:{height:675}},bi===1&&ge.createElement("div",{style:{height:"100%",display:"flex",flexDirection:"column",alignItems:"center"},onClick:()=>Xi(2)},ge.createElement("div",{style:{color:"#9096A3",fontSize:12}},"1.\u672C\u529F\u80FD\u652F\u6301\u5BFC\u5165\u7684\u9898\u578B\uFF1A\u5355\u9009\u9898\u3001\u591A\u9009\u9898\u3001\u586B\u7A7A\u9898\u3001\u5224\u65AD\u9898\u3001\u7B80\u7B54\u9898\u3001 \u7EC4\u5408\u9898\u3001\u7F16\u7A0B\u9898\u3001\u7A0B\u5E8F\u586B\u7A7A\u9898\u3002",ge.createElement("br",null),"2.\u82E5\u8981\u5BFC\u5165\u7EC4\u5408\u9898\uFF0C\u8BF7\u5728\u9898\u76EE\u524D\u540E\u4F7F\u7528\u4E00\u5BF9\u201C","{{\u201D\u3001\u201C}}","\u201D\u5C06\u5185\u5BB9\u6807\u51FA\uFF1B\u5927\u9898\u9898\u5E72\u548C\u5C0F\u9898\u9898\u5E72\u4E4B\u95F4\u4E0D\u9700\u8981\u7A7A\u884C\uFF1B\u5927\u9898\u548C\u5C0F\u9898\u9898\u5E72\u90FD\u9700\u6807\u6CE8\u9898\u53F7\uFF1B\u5C0F\u9898\u7B54\u6848\u53EF\u8DDF\u5728\u5C0F\u9898\u9898\u5E72\u540E\uFF0C\u5E76\u7528\u7A7A\u683C\u4E0E\u9898\u5E72\u5185\u5BB9\u9694\u5F00\u3002\u8303\u4F8B\u53EF\u53C2\u8003\u63A8\u8350\u683C\u5F0F\u3002",ge.createElement("br",null),"3.\u5BFC\u5165\u652F\u6301\u6587\u672C\u3001\u56FE\u7247\u3001\u516C\u5F0F\u3002\u9898\u76EE\u7ED3\u6784\u652F\u6301\u8BC6\u522B\u7B54\u6848\u3001\u89E3\u6790\u3001\u96BE\u5EA6\u3001\u77E5\u8BC6\u70B9\u3002",ge.createElement("br",null),"4.\u82E5\u8BC6\u522B\u6709\u8BEF\uFF0C\u53EF\u5728\u5DE6\u4FA7\u4FEE\u6539\u9898\u76EE\u5185\u5BB9\u540E\u91CD\u65B0\u8BC6\u522B\uFF0C\u6216\u4E0B\u8F7D\u63A8\u8350\u683C\u5F0F\uFF0C\u6309\u683C\u5F0F\u4FEE\u6539\u540E\u91CD\u65B0\u5BFC\u5165\u8BC6\u522B\u3002",ge.createElement("br",null)),ge.createElement("div",{className:Oe.imgBox,style:{marginTop:75}},ge.createElement("img",{width:56,src:Be}),ge.createElement("span",null,"\u7F16\u8F91\u533A"))),bi===2&&ge.createElement("div",{"data-text":"edit",onBlur:()=>{Bi.current.innerHTML||Xi(1)},ref:Bi,contentEditable:!0,style:{color:"#9096A3",height:"100%",overflow:"auto"}}))),ge.createElement("div",{className:Oe.rightLayout,style:{display:"flex",alignItems:"start",justifyContent:"center"}},ge.createElement("div",{className:Oe.imgBox,style:{marginTop:240}},ge.createElement("img",{width:56,src:He}),ge.createElement("span",null,"\u9884\u89C8\u533A")))),qi=(Mt,Pi,Ut,Ui)=>{var wi;console.log(Mt,Pi,Ut,Ui,"onDataChange\u4FEE\u6539\u6570\u503C");const yr=JSON.parse(JSON.stringify(Ei));Ui===void 0?yr[Pi][Mt]=Ut:yr[Pi].questions[Ui][Mt]=Ut;const Zi=Sn({},yr[Pi]),Ci=(wi=fi.find(nr=>nr.id===(Zi==null?void 0:Zi.type)))==null?void 0:wi.deal;yr[Pi]=Ci(Zi),Ri(yr)},Rr=(Mt,Pi,Ut)=>{var Ui;const wi=Ut!==void 0,yr=(Ui=fi.find(nr=>nr.id===(Mt==null?void 0:Mt.type)))==null?void 0:Ui.type,Zi=`${Pi+1}.${Ut===void 0?"":Ut+1+"."}`,Ci=`${(Mt==null?void 0:Mt.type)==="7"?"{{":""}${Zi}\u3010${yr}\u3011${(Mt==null?void 0:Mt.question)||""}`;return ge.createElement(ge.Fragment,null,wi&&ge.createElement("h4",{contentEditable:!0}),ge.createElement(Vt,{id:Mt==null?void 0:Mt.id,tagName:"div",value:Ci}))},Ii=(Mt,Pi)=>It(void 0,null,function*(){var Ut;const Ui=yield sn(Mt,Pi),wi=(Ut=Ui==null?void 0:Ui.data)==null?void 0:Ut.content;if(wi!=null&&wi.length){const yr=Jr(wi)[0];$n.splice(Pi,1,yr),Ei.splice(Pi,1,yr),Le([...$n]),Ri([...Ei])}}),tt=(Mt,Pi,Ut)=>{var Ui;const wi=Ut!==void 0,yr=(Ui=fi.find(Ci=>Ci.id===(Mt==null?void 0:Mt.type)))==null?void 0:Ui.type,Zi=`${Pi+1}.${Ut===void 0?"":Ut+1+"."}`;return wi?ge.createElement("div",{style:{padding:"10px 18px"}},`${Zi}\u3010${yr}\u3011`,ge.createElement(Vt,{id:Mt==null?void 0:Mt.id,tagName:"span",className:Oe.edit,onBlur:Ci=>qi("question",Pi,Ci,Ut),value:(Mt==null?void 0:Mt.question)||""})):ge.createElement(ge.Fragment,null,ge.createElement("div",{className:Oe.actionHead},ge.createElement("div",{className:"c-light-primary"},`${Zi}\u3010${yr}\u3011`),yt!==1&&ge.createElement(Tt.Z,{disabled:(Mt==null?void 0:Mt.type)==="7",min:0,max:100,style:{width:100,marginLeft:10},addonAfter:"\u5206",precision:1,size:"middle",onChange:Ci=>qi("score",Pi,Ci,Ut),value:Mt==null?void 0:Mt.score}),ge.createElement(Ct.Z,{align:"middle",style:{marginLeft:"auto"}},!!sn&&ge.createElement("span",{className:"current c-light-primary mr30",onClick:()=>Ii(Mt,Pi)},ge.createElement("i",{className:"iconfont icon-huanyihuan mr5"}),"\u6362\u4E00\u6362"),ge.createElement(Ve.default,{onChange:Ci=>qi("checked",Pi,Ci.target.checked,Ut),checked:!!(Mt!=null&&Mt.checked)},"\u4E0D\u5BFC\u5165\u6B64\u9898"))),ge.createElement(Vt,{id:Mt==null?void 0:Mt.id,tagName:"div",style:{padding:"10px 18px"},className:Oe.edit,onBlur:Ci=>qi("question",Pi,Ci,Ut),value:Mt==null?void 0:Mt.question}))},Qr=(Mt,Pi,Ut)=>ge.createElement(ge.Fragment,null,["0","1","2","4"].includes(Mt==null?void 0:Mt.type)&&ge.createElement(Vt,{id:Mt==null?void 0:Mt.id,value:`\u7B54\u6848\uFF1A${Pi||""}`,tagName:"p"}),!Ut&&ge.createElement(Vt,{id:Mt==null?void 0:Mt.id,value:`\u96BE\u5EA6\uFF1A${(Mt==null?void 0:Mt.difficulty)||""}`,tagName:"p"}),(Mt==null?void 0:Mt.type)!=="7"&&ge.createElement(Vt,{id:Mt==null?void 0:Mt.id,value:`\u89E3\u6790\uFF1A${(Mt==null?void 0:Mt.analyze)||""}`,tagName:"p"}),!Ut&&ge.createElement(Vt,{id:Mt==null?void 0:Mt.id,value:`\u77E5\u8BC6\u70B9\uFF1A${(Mt==null?void 0:Mt.knowledgePoint)||""}`,tagName:"p"})),lo=(Mt,Pi,Ut,Ui)=>{const wi=Ui!==void 0,yr=["\u7B80\u5355","\u9002\u4E2D","\u56F0\u96BE"],Zi=wi&&!Mt.last&&!Mt.errorMsg?{marginBottom:10}:{},Ci=yr.map(nr=>({key:nr,label:nr,onClick:()=>qi("difficulty",Ut,nr,Ui)}));return ge.createElement("div",{className:Oe.liWrap,style:Zi},["4"].includes(Mt==null?void 0:Mt.type)&&ge.createElement("div",{className:Oe.li},ge.createElement("aside",null,"\u7B54\xA0\xA0\xA0\xA0\u6848\uFF1A"),ge.createElement(Vt,{id:Mt==null?void 0:Mt.id,tagName:"div",className:`${Oe.edit} c-black`,onBlur:nr=>qi("answer",Ut,[nr],Ui),value:Pi})),!wi&&ge.createElement("div",{className:Oe.li},ge.createElement("aside",null,"\u96BE\xA0\xA0\xA0\xA0\u5EA6\uFF1A"),ge.createElement("div",{className:"c-black"},ge.createElement(Lt.Z,{menu:{items:Ci}},ge.createElement("span",{className:"c-light-primary"},Mt==null?void 0:Mt.difficulty,ge.createElement("i",{className:"iconfont icon-a-bianzu11 font14 ml4"}))))),(Mt==null?void 0:Mt.type)!=="7"&&ge.createElement("div",{className:Oe.li},ge.createElement("aside",null,"\u89E3\xA0\xA0\xA0\xA0\u6790\uFF1A"),ge.createElement(Vt,{id:Mt==null?void 0:Mt.id,tagName:"div",className:`${Oe.edit} c-grey-333`,onBlur:nr=>qi("analyze",Ut,nr,Ui),value:Mt==null?void 0:Mt.analyze})),!wi&&ge.createElement("div",{onKeyDown:Gn,className:Oe.li},ge.createElement("aside",null,"\u77E5\u8BC6\u70B9\uFF1A"),ge.createElement(Vt,{id:Mt==null?void 0:Mt.id,tagName:"div",value:(Mt==null?void 0:Mt.knowledgePoint)||"",className:`${Oe.edit} c-grey-333`,onBlur:nr=>qi("knowledgePoint",Ut,kn(Br(nr)),Ui)})))},jr=Mt=>ge.createElement(ge.Fragment,null,typeof(Mt==null?void 0:Mt.errorMsg)=="string"&&!!(Mt!=null&&Mt.errorMsg)&&ge.createElement("h5",{contentEditable:!1},ge.createElement("i",{className:"iconfont icon-shanchuhuanjing"}),ge.createElement("div",null,Mt==null?void 0:Mt.errorMsg))),vo=Mt=>ge.createElement(ge.Fragment,null,typeof(Mt==null?void 0:Mt.errorMsg)=="string"&&!!(Mt!=null&&Mt.errorMsg)&&ge.createElement("h5",null,ge.createElement("i",{className:"iconfont icon-shanchuhuanjing"}),ge.createElement("div",null,Mt==null?void 0:Mt.errorMsg))),po=(Mt,Pi,Ut,Ui)=>{let wi="flex";return(jn&&Nn!==Ui||nn&&!(Ut!=null&&Ut.errorMsg))&&(wi="none"),ge.createElement("div",{className:Oe.row,style:{display:wi}},ge.createElement("div",{className:Oe.leftLayout},On||ge.createElement(ze,null,ge.createElement("div",{"data-text":"edit",contentEditable:!0,className:Oe.question},Mt))),ge.createElement("div",{className:Oe.rightLayout},ge.createElement(Ee,{className:Ut!=null&&Ut.errorMsg?Oe.error:""},Pi)))},fi=[{id:"0",type:"\u5355\u9009\u9898",element:(Mt,Pi,Ut)=>{var Ui,wi;const yr=Ut!==void 0;let Zi=(Ui=Mt==null?void 0:Mt.answer)==null?void 0:Ui[0];const Ci=ge.createElement(ge.Fragment,null,Rr(Mt,Pi,Ut),(wi=Mt==null?void 0:Mt.options)==null?void 0:wi.map((xr,Gr)=>ge.createElement(Vt,{id:Mt==null?void 0:Mt.id,key:Gr,value:`${Qi[Gr]}.${xr}`,tagName:"p"})),Qr(Mt,Zi,yr),jr(Mt));let nr=yr?Mt:Ei[Pi];const rr=nr==null?void 0:nr.options,cr=ge.createElement(ge.Fragment,null,tt(nr,Pi,Ut),rr==null?void 0:rr.map((xr,Gr)=>{var vr;return ge.createElement("div",{key:Gr,className:Oe.option},ge.createElement("aside",{className:((vr=nr==null?void 0:nr.answer)==null?void 0:vr[0])===Qi[Gr]?Oe.active:"",onClick:()=>qi("answer",Pi,[Qi[Gr]],Ut)},Qi[Gr]),ge.createElement(Vt,{id:nr==null?void 0:nr.id,tagName:"div",className:`${Oe.text}`,onBlur:kr=>{rr[Gr]=kr,qi("options",Pi,rr,Ut)},value:xr}))}),lo(nr,"",Pi,Ut),vo(nr));return yr?[Ci,cr]:po(Ci,cr,nr,Pi)},deal:Mt=>{var Pi,Ut,Ui;Mt.score=Mt.score===void 0?2:Mt.score;let wi=kn((Pi=Mt==null?void 0:Mt.answer)==null?void 0:Pi[0]).toUpperCase();Mt.answer=wi?[wi]:[];let yr=[];if(!(Mt!=null&&Mt.options))yr.push("\u672A\u8BC6\u522B\u5230\u9009\u9879\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u201C A.\u9009\u9879\u4E00 B.\u9009\u9879\u4E8C C.\u9009\u9879\u4E09 \u201D");else{Mt.options=(Ut=Mt.options)==null?void 0:Ut.slice(0,8);const Zi=Mt.options.map(nr=>nr==null?void 0:nr.trim().replace(/^\s+|\s+$/g,""));new Set(Zi).size!==Zi.length&&yr.push("\u9009\u9879\u5185\u5BB9\u91CD\u590D")}return wi||yr.push("\u672A\u8BC6\u522B\u5230\u7B54\u6848\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u201C \u7B54\u6848\uFF1AA \u201D"),wi&&(Qi.slice(0,((Ui=Mt==null?void 0:Mt.options)==null?void 0:Ui.length)||8).includes(wi)||yr.push("\u6B63\u786E\u7B54\u6848\u8BBE\u7F6E\u6709\u8BEF\uFF0C\u8BF7\u91CD\u65B0\u8BBE\u7F6E\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u201C \u7B54\u6848\uFF1AA \u201D")),kn(Mt==null?void 0:Mt.question)||yr.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),Mt.errorMsg=yr.join(`
|
|
|
`),Mt}},{id:"1",type:"\u591A\u9009\u9898",element:(Mt,Pi,Ut)=>{var Ui,wi;const yr=Ut!==void 0;let Zi=(Ui=Mt==null?void 0:Mt.answer)==null?void 0:Ui[0];const Ci=ge.createElement(ge.Fragment,null,Rr(Mt,Pi,Ut),(wi=Mt==null?void 0:Mt.options)==null?void 0:wi.map((xr,Gr)=>ge.createElement(Vt,{id:Mt==null?void 0:Mt.id,key:Gr,value:`${Qi[Gr]}.${xr}`,tagName:"p"})),Qr(Mt,Zi,yr),jr(Mt));let nr=yr?Mt:Ei[Pi];const rr=nr==null?void 0:nr.options,cr=ge.createElement(ge.Fragment,null,tt(nr,Pi,Ut),rr==null?void 0:rr.map((xr,Gr)=>{var vr,kr;return ge.createElement("div",{key:Gr,className:Oe.option},ge.createElement("aside",{className:(kr=(vr=nr==null?void 0:nr.answer)==null?void 0:vr[0])!=null&&kr.includes(Qi[Gr])?Oe.active:"",onClick:()=>{var Zr;let Oi=((Zr=nr==null?void 0:nr.answer)==null?void 0:Zr[0])||"";const sa=Qi[Gr];Oi.includes(sa)?Oi=Oi.replace(new RegExp(sa,"g"),""):Oi+=sa,Oi=Oi.split("").sort().join(""),qi("answer",Pi,[Oi],Ut)}},Qi[Gr]),ge.createElement(Vt,{id:nr==null?void 0:nr.id,tagName:"div",className:`${Oe.text}`,onBlur:Zr=>{rr[Gr]=Zr,qi("options",Pi,rr,Ut)},value:xr}))}),lo(nr,"",Pi,Ut),vo(nr));return yr?[Ci,cr]:po(Ci,cr,nr,Pi)},deal:Mt=>{var Pi,Ut,Ui;Mt.score=Mt.score===void 0?2:Mt.score;let wi=kn((Pi=Mt==null?void 0:Mt.answer)==null?void 0:Pi[0]).toUpperCase().split("").sort().join("");Mt.answer=wi?[wi]:[];let yr=[];if(!(Mt!=null&&Mt.options))yr.push("\u672A\u8BC6\u522B\u5230\u9009\u9879\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u201C A.\u9009\u9879\u4E00 B.\u9009\u9879\u4E8C C.\u9009\u9879\u4E09 \u201D");else{Mt.options=(Ut=Mt.options)==null?void 0:Ut.slice(0,8);const Zi=Mt.options.map(nr=>nr==null?void 0:nr.trim().replace(/^\s+|\s+$/g,""));new Set(Zi).size!==Zi.length&&yr.push("\u9009\u9879\u5185\u5BB9\u91CD\u590D")}if(wi||yr.push("\u672A\u8BC6\u522B\u5230\u7B54\u6848\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u201C \u7B54\u6848\uFF1AAB \u201D"),wi){const Zi=Qi.slice(0,((Ui=Mt==null?void 0:Mt.options)==null?void 0:Ui.length)||8);Sr(Zi).includes(wi)||yr.push("\u6B63\u786E\u7B54\u6848\u8BBE\u7F6E\u6709\u8BEF\uFF0C\u8BF7\u91CD\u65B0\u8BBE\u7F6E\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u201C \u7B54\u6848\uFF1AAB \u201D")}return kn(Mt==null?void 0:Mt.question)||yr.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),Mt.errorMsg=yr.join(`
|
|
|
`),Mt}},{id:"2",type:"\u5224\u65AD\u9898",element:(Mt,Pi,Ut)=>{var Ui,wi;const yr=Ut!==void 0;let Zi=(Ui=Mt==null?void 0:Mt.answer)==null?void 0:Ui[0];const Ci=ge.createElement(ge.Fragment,null,Rr(Mt,Pi,Ut),Qr(Mt,Zi,yr),jr(Mt));let nr=yr?Mt:Ei[Pi];const rr=["\u6B63\u786E","\u9519\u8BEF"];let cr=((wi=nr==null?void 0:nr.answer)==null?void 0:wi[0])||"";["\u6B63\u786E","\u5BF9","T","True","t","true"].includes(cr)?cr="\u6B63\u786E":["\u9519\u8BEF","\u9519","T","true","t","false"].includes(cr)&&(cr="\u9519\u8BEF");const xr=ge.createElement(ge.Fragment,null,tt(nr,Pi,Ut),rr==null?void 0:rr.map((Gr,vr)=>ge.createElement("div",{key:vr,className:Oe.option},ge.createElement("aside",{style:{borderRadius:2},className:cr===Gr?Oe.active:"",onClick:()=>qi("answer",Pi,[Gr],Ut)},Gr==="\u6B63\u786E"?"T":"F"),ge.createElement("div",{style:{pointerEvents:"none"},className:`${Oe.text}`},Gr))),lo(nr,"",Pi,Ut),vo(nr));return yr?[Ci,xr]:po(Ci,xr,nr,Pi)},deal:Mt=>{var Pi;Mt.score=Mt.score===void 0?2:Mt.score;let Ut=kn((Pi=Mt==null?void 0:Mt.answer)==null?void 0:Pi[0]);Mt.answer=Ut?[Ut]:[];let Ui=[];return Ut||Ui.push("\u672A\u8BC6\u522B\u5230\u7B54\u6848\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u201C \u7B54\u6848\uFF1A\u9519\u8BEF\u201D"),Ut&&!["\u6B63\u786E","\u5BF9","T","True","t","true","\u9519\u8BEF","\u9519","T","true","t","false"].includes(Ut)&&Ui.push("\u6B63\u786E\u7B54\u6848\u8BBE\u7F6E\u6709\u8BEF\uFF0C\u8BF7\u91CD\u65B0\u8BBE\u7F6E\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u201C \u7B54\u6848\uFF1A\u9519\u8BEF\u201D"),kn(Mt==null?void 0:Mt.question)||Ui.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),Mt.errorMsg=Ui.join(`
|
|
|
`),Mt}},{id:"3",type:"\u586B\u7A7A\u9898",element:(Mt,Pi,Ut)=>{var Ui,wi;const yr=Ut!==void 0,Zi=ge.createElement(ge.Fragment,null,Rr(Mt,Pi,Ut),(Ui=Mt==null?void 0:Mt.answer)==null?void 0:Ui.map((rr,cr)=>ge.createElement(Vt,{id:Mt==null?void 0:Mt.id,key:cr,tagName:"p",value:`\u7B54\u6848${cr+1}\uFF1A${rr.text||""}`})),Qr(Mt,"",yr),jr(Mt));let Ci=yr?Mt:Ei[Pi];const nr=ge.createElement(ge.Fragment,null,tt(Ci,Pi,Ut),(wi=Ci==null?void 0:Ci.answer)==null?void 0:wi.map((rr,cr)=>ge.createElement("div",{key:cr,className:Oe.option},ge.createElement("aside",{className:Oe.fill},"\u586B\u7A7A\u9879",cr+1),rr.model===1&&ge.createElement(Vt,{id:Ci==null?void 0:Ci.id,tagName:"div",onBlur:xr=>{Ci.answer[cr].latex=Br(xr),qi("answer",Pi,Ci.answer,Ut)},className:`${Oe.text}`,value:rr.latex}),rr.model===2&&ge.createElement(Et.Z,{value:rr.latex,onChange:xr=>{Ci.answer[cr].latex=xr,qi("answer",Pi,Ci.answer,Ut)}}))),lo(Ci,"",Pi,Ut),vo(Ci));return yr?[Zi,nr]:po(Zi,nr,Ci,Pi)},deal:Mt=>{var Pi,Ut,Ui,wi;Mt.score=Mt.score===void 0?2:Mt.score,Mt.question=(Pi=Mt.question)==null?void 0:Pi.replaceAll("\u2581","_");const yr=(Ut=Mt.answer)==null?void 0:Ut.map(Ci=>{if(Object.prototype.toString.call(Ci)==="[object Object]")return Ci;const nr={model:1,text:Ci,latex:Ci};return Ci.startsWith("$$")&&Ci.endsWith("$$")||Ci.startsWith("`$$")&&Ci.endsWith("$$`")?(nr.model=2,nr.latex=Ci.slice(2,-2)):nr.latex=Br(Ci),nr});Mt.answer=yr;let Zi=[];return yr||Zi.push("\u672A\u8BC6\u522B\u5230\u7B54\u6848\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u7B54\u68481\uFF1A\u4E2D\u56FD\uFF1B\u7B54\u68482\uFF1A\u4E16\u754C"),kn(Mt==null?void 0:Mt.question)?Mt!=null&&Mt.question.includes("_")?(Ui=Mt==null?void 0:Mt.answer)!=null&&Ui.length&&((Mt==null?void 0:Mt.question.match(/_+/g))||[]).length!==((wi=Mt==null?void 0:Mt.answer)==null?void 0:wi.length)&&Zi.push("\u586B\u7A7A\u9879\u4E0E\u7B54\u6848\u4E2A\u6570\u4E0D\u5339\u914D\uFF0C\u8BF7\u8FDB\u884C\u8C03\u6574"):Zi.push("\u586B\u7A7A\u9879\u672A\u8BBE\u7F6E\uFF0C\u8BF7\u4F7F\u7528\u82F1\u6587\u4E0B\u5212\u7EBF\u201C___\u201D\u8868\u793A\u586B\u7A7A\u9879"):Zi.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),Mt.errorMsg=Zi.join(`
|
|
|
`),Mt}},{id:"4",type:"\u7B80\u7B54\u9898",element:(Mt,Pi,Ut)=>{var Ui,wi;const yr=Ut!==void 0;let Zi=(Ui=Mt==null?void 0:Mt.answer)==null?void 0:Ui[0];const Ci=ge.createElement(ge.Fragment,null,Rr(Mt,Pi,Ut),Qr(Mt,Zi,yr),jr(Mt));let nr=yr?Mt:Ei[Pi];const rr=ge.createElement(ge.Fragment,null,tt(nr,Pi,Ut),lo(nr,(wi=nr==null?void 0:nr.answer)==null?void 0:wi[0],Pi,Ut),vo(nr));return yr?[Ci,rr]:po(Ci,rr,nr,Pi)},deal:Mt=>{Mt.score=Mt.score===void 0?5:Mt.score;let Pi=[];return kn(Mt==null?void 0:Mt.question)||Pi.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),Mt.errorMsg=Pi.join(`
|
|
|
`),Mt}},{id:"6",type:"\u7F16\u7A0B\u9898",element:(Mt,Pi)=>{var Ut,Ui;const wi=Ei[Pi],yr=gr.slice(0,4).map(Zi=>({key:Zi,label:Zi,onClick:()=>qi("platform",Pi,Zi)}));return ge.createElement("div",{className:Oe.row,style:{display:nn?wi!=null&&wi.errorMsg?"flex":"none":"flex"}},ge.createElement("div",{className:Oe.leftLayout},ge.createElement(ze,null,ge.createElement("div",{"data-text":"edit",contentEditable:!0,className:Oe.question},Rr(Mt,Pi),ge.createElement(Vt,{id:Mt==null?void 0:Mt.id,value:`\u8BD5\u9898\u63CF\u8FF0\uFF1A${(Mt==null?void 0:Mt.description)||""}`,tagName:"p"}),Qr(Mt),ge.createElement(Vt,{id:Mt==null?void 0:Mt.id,value:`\u65F6\u95F4\u9650\u5236\uFF08\u79D2\uFF09\uFF1A${Mt==null?void 0:Mt.timeLimit}`,tagName:"p"}),ge.createElement(Vt,{id:Mt==null?void 0:Mt.id,value:`\u7F16\u7A0B\u8BED\u8A00\uFF1A${(Mt==null?void 0:Mt.platform)||""}`,tagName:"p"}),ge.createElement("p",{contentEditable:!0},"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\uFF1A"),ge.createElement("h4",null),ge.createElement(Vt,{id:Mt==null?void 0:Mt.id,value:(Mt==null?void 0:Mt.code)||"",tagName:"div"}),(Ut=Mt==null?void 0:Mt.inputs)==null?void 0:Ut.map((Zi,Ci)=>{var nr;return ge.createElement(ge.Fragment,{key:Ci},ge.createElement("h4",null),ge.createElement(Vt,{id:Mt==null?void 0:Mt.id,value:`\u6D4B\u8BD5\u7528\u4F8B(${Ci+1})\u8F93\u5165\uFF1A${Zi||""}`,tagName:"div"}),ge.createElement(Vt,{id:Mt==null?void 0:Mt.id,value:`\u6D4B\u8BD5\u7528\u4F8B(${Ci+1})\u8F93\u51FA\uFF1A${((nr=Mt==null?void 0:Mt.outputs)==null?void 0:nr[Ci])||""}`,tagName:"div"}))}),jr(Mt)))),ge.createElement("div",{className:Oe.rightLayout},ge.createElement(Ee,{className:wi!=null&&wi.errorMsg?Oe.error:""},tt(wi,Pi),ge.createElement("div",{className:Oe.liWrap,style:{background:"transparent",marginBottom:0,padding:0}},ge.createElement("div",{className:Oe.li},ge.createElement("aside",null,"\u8BD5\u9898\u63CF\u8FF0\uFF1A"),ge.createElement(Vt,{className:Oe.edit,id:wi==null?void 0:wi.id,value:wi==null?void 0:wi.description,tagName:"div",onBlur:Zi=>qi("description",Pi,Zi)}))),lo(wi,"",Pi),ge.createElement("div",{className:Oe.liWrap},ge.createElement("div",{className:Oe.li},ge.createElement("aside",null,"\u65F6\u95F4\u9650\u5236\uFF08\u79D2\uFF09\uFF1A"),ge.createElement(Vt,{className:Oe.edit,id:wi==null?void 0:wi.id,value:wi==null?void 0:wi.timeLimit,tagName:"div",onBlur:Zi=>qi("timeLimit",Pi,Br(Zi))})),ge.createElement("div",{className:Oe.li},ge.createElement("aside",null,"\u7F16\u7A0B\u8BED\u8A00\uFF1A"),ge.createElement("div",{className:"c-black"},ge.createElement(Lt.Z,{menu:{items:yr}},ge.createElement("span",{className:"c-light-primary"},wi==null?void 0:wi.platform,ge.createElement("i",{className:"iconfont icon-a-bianzu11 font14 ml4"}))))),ge.createElement("div",{className:Oe.li,style:{flexDirection:"column",alignItems:"start"}},ge.createElement("aside",{className:"mb10"},"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\uFF1A"),ge.createElement(Vt,{className:Oe.edit,id:wi==null?void 0:wi.id,value:(wi==null?void 0:wi.code)||"",onBlur:Zi=>qi("code",Pi,Br(Zi)),tagName:"div"}))),(Ui=wi==null?void 0:wi.inputs)==null?void 0:Ui.map((Zi,Ci)=>{var nr;return ge.createElement("div",{className:Oe.liWrap,key:Ci},ge.createElement("div",{className:Oe.li},ge.createElement("aside",null,"\u6D4B\u8BD5\u7528\u4F8B(",Ci+1,")\u8F93\u5165\uFF1A"),ge.createElement(Vt,{id:wi==null?void 0:wi.id,value:Zi||"",className:Oe.edit,onBlur:rr=>{const cr=[...(wi==null?void 0:wi.inputs)||[]];cr[Ci]=Br(rr),qi("inputs",Pi,cr)},tagName:"div"})),ge.createElement("div",{className:Oe.li},ge.createElement("aside",null,"\u6D4B\u8BD5\u7528\u4F8B(",Ci+1,")\u8F93\u51FA\uFF1A"),ge.createElement(Vt,{id:wi==null?void 0:wi.id,value:((nr=wi==null?void 0:wi.outputs)==null?void 0:nr[Ci])||"",className:Oe.edit,onBlur:rr=>{const cr=[...(wi==null?void 0:wi.outputs)||[]];cr[Ci]=Br(rr),qi("outputs",Pi,cr)},tagName:"div"})))}),vo(wi))))},deal:Mt=>{var Pi,Ut,Ui;Mt.score=Mt.score===void 0?10:Mt.score,Mt.code=(Pi=Mt.code)==null?void 0:Pi.trim();let wi=[];kn(Mt==null?void 0:Mt.question)?((Ut=Mt==null?void 0:Mt.question)==null?void 0:Ut.length)>60&&wi.push("\u7F16\u7A0B\u9898\u540D\u79F0\u9650\u523660\u4E2A\u5B57\u7B26"):wi.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),kn(Mt==null?void 0:Mt.description)||wi.push("\u672A\u8BC6\u522B\u5230\u8BD5\u9898\u63CF\u8FF0");const yr=kn(String((Mt==null?void 0:Mt.timeLimit)||""));if(Mt.timeLimit=yr,(!yr||yr&&!["3","4","5","6","7","8","9","10"].includes(yr))&&wi.push("\u65F6\u95F4\u9650\u5236\u4E3A\u5FC5\u586B\u9879\uFF0C\u53EA\u652F\u63013-10\u7684\u6574\u6570"),Mt.platform=kn(Mt==null?void 0:Mt.platform),Mt!=null&&Mt.platform){const Zi=["c","c++","java","python"],Ci=(Ui=Mt==null?void 0:Mt.platform)==null?void 0:Ui.toLowerCase(),nr=Zi.findIndex(rr=>rr===Ci);nr>-1?Mt.platform=gr[nr]:wi.push("\u7F16\u7A0B\u8BED\u8A00\u4E3A\u5FC5\u586B\u9879\uFF0C\u76EE\u524D\u53EA\u652F\u6301C\u3001C++\u3001Python\u3001Java\u8BED\u8A00")}else wi.push("\u7F16\u7A0B\u8BED\u8A00\u4E3A\u5FC5\u586B\u9879\uFF0C\u76EE\u524D\u53EA\u652F\u6301C\u3001C++\u3001Python\u3001Java\u8BED\u8A00");if(!(Mt!=null&&Mt.inputs)||!(Mt!=null&&Mt.outputs))Mt.inputs=[],Mt.outputs=[],wi.push("\u672A\u8BC6\u522B\u5230\u6D4B\u8BD5\u7528\u4F8B\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u6D4B\u8BD5\u7528\u4F8B(1)\u8F93\u5165\uFF1A1\uFF1B\u6D4B\u8BD5\u7528\u4F8B(1)\u8F93\u51FA\uFF1A2");else{const Zi=Math.min(Mt.inputs.length,Mt.outputs.length);Mt.inputs=Mt.inputs.slice(0,Zi),Mt.outputs=Mt.outputs.slice(0,Zi),Mt.outputs.some(Ci=>!kn(Ci))&&wi.push("\u6D4B\u8BD5\u7528\u4F8B\u8F93\u51FA\u4E3A\u5FC5\u586B\u9879")}return Mt.errorMsg=wi.join(`
|
|
|
`),Mt}},{id:"7",type:"\u7EC4\u5408\u9898",element:(Mt,Pi)=>{var Ut,Ui;const wi=Ei[Pi];return ge.createElement("div",{className:Oe.row,style:{display:nn?wi!=null&&wi.errorMsg?"flex":"none":"flex"}},ge.createElement("div",{className:Oe.leftLayout},ge.createElement(ze,null,ge.createElement("div",{"data-text":"edit",contentEditable:!0,className:Oe.question},Rr(Mt,Pi),Qr(Mt),(Ut=Mt==null?void 0:Mt.questions)==null?void 0:Ut.map((yr,Zi)=>{var Ci;const nr=(Ci=fi.find(rr=>rr.id===(yr==null?void 0:yr.type)))==null?void 0:Ci.element;return ge.createElement(ge.Fragment,{key:`left-${Mt.id}-${Zi}`},nr(yr,Pi,Zi)[0])}),jr(Mt),ge.createElement("p",{contentEditable:!0},"}}")))),ge.createElement("div",{className:Oe.rightLayout},ge.createElement(Ee,{className:wi!=null&&wi.errorMsg?Oe.error:""},tt(wi,Pi),lo(wi,"",Pi),(Ui=wi==null?void 0:wi.questions)==null?void 0:Ui.map((yr,Zi)=>{var Ci;const nr=(Ci=fi.find(rr=>rr.id===(yr==null?void 0:yr.type)))==null?void 0:Ci.element;return ge.createElement(ge.Fragment,{key:`right-${wi.id}-${Zi}`},nr(yr,Pi,Zi)[1])}),vo(wi))))},deal:Mt=>{var Pi,Ut,Ui,wi,yr;const Zi=Jr,Ci=[...fi],nr=Ci.findIndex(Gr=>Gr.id==="0"),rr=Ci.findIndex(Gr=>Gr.id==="1");if(nr!==-1){const Gr=Ci[nr].deal;Ci[nr].deal=vr=>{const kr=Gr(vr);return kr.errorMsg&&(kr.errorMsg=kr.errorMsg.split(`
|
|
|
`).filter(Zr=>Zr!=="\u9009\u9879\u5185\u5BB9\u91CD\u590D").join(`
|
|
|
`)),kr}}if(rr!==-1){const Gr=Ci[rr].deal;Ci[rr].deal=vr=>{const kr=Gr(vr);return kr.errorMsg&&(kr.errorMsg=kr.errorMsg.split(`
|
|
|
`).filter(Zr=>Zr!=="\u9009\u9879\u5185\u5BB9\u91CD\u590D").join(`
|
|
|
`)),kr}}Mt.questions=(Pi=Mt.questions)!=null&&Pi.length?Jr(Mt.questions.slice(0,20)):[],Mt.questions=(Ut=Mt.questions)==null?void 0:Ut.map((Gr,vr)=>{var kr;if(Gr.type==="0"||Gr.type==="1"){const Zr=(kr=Gr.options)==null?void 0:kr.map(Oi=>Oi==null?void 0:Oi.trim().replace(/^\s+|\s+$/g,""));Zr&&new Set(Zr).size!==Zr.length&&(Gr.errorMsg=(Gr.errorMsg?Gr.errorMsg+`
|
|
|
`:"")+"\u9009\u9879\u5185\u5BB9\u91CD\u590D")}return Yn(Sn({},Gr),{last:vr===Mt.questions.length-1})});const cr=(Ui=Mt.questions)==null?void 0:Ui.reduce((Gr,vr)=>{const kr=parseFloat(vr.score);return isNaN(kr)?Gr:Gr+kr},0);Mt.score=cr;let xr=[];return(wi=Mt.questions)!=null&&wi.length?Mt.errorMsg=((yr=Mt.questions)==null?void 0:yr.findIndex(Gr=>!!Gr.errorMsg))>-1:xr.push("\u8BF7\u6DFB\u52A0\u5C0F\u9898"),kn(Mt==null?void 0:Mt.question)||xr.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),xr.length&&(Mt.errorMsg=xr.join(`
|
|
|
`)),Mt}},{id:"8",type:"\u7A0B\u5E8F\u586B\u7A7A\u9898",element:(Mt,Pi)=>{var Ut,Ui;const wi=Ei[Pi],yr=gr.map(Zi=>({key:Zi,label:Zi,onClick:()=>qi("platform",Pi,Zi)}));return ge.createElement("div",{className:Oe.row,style:{display:nn?wi!=null&&wi.errorMsg?"flex":"none":"flex"}},ge.createElement("div",{className:Oe.leftLayout},ge.createElement(ze,null,ge.createElement("div",{"data-text":"edit",contentEditable:!0,className:Oe.question},Rr(Mt,Pi),Qr(Mt),ge.createElement(Vt,{id:Mt==null?void 0:Mt.id,value:`\u65F6\u95F4\u9650\u5236\uFF08\u79D2\uFF09\uFF1A${Mt==null?void 0:Mt.timeLimit}`,tagName:"p"}),ge.createElement(Vt,{id:Mt==null?void 0:Mt.id,value:`\u7F16\u7A0B\u8BED\u8A00\uFF1A${(Mt==null?void 0:Mt.platform)||""}`,tagName:"p"}),ge.createElement("p",{contentEditable:!0},"\u7A0B\u5E8F\u4EE3\u7801\uFF1A"),ge.createElement("h4",null),ge.createElement(Vt,{id:Mt==null?void 0:Mt.id,value:(Mt==null?void 0:Mt.code)||"",tagName:"div"}),ge.createElement("h4",null),ge.createElement(Vt,{id:Mt==null?void 0:Mt.id,value:`\u6D4B\u8BD5\u7528\u4F8B\u8F93\u5165\uFF1A${(Mt==null?void 0:Mt.input)||""}`,tagName:"p"}),ge.createElement(Vt,{id:Mt==null?void 0:Mt.id,value:`\u6D4B\u8BD5\u7528\u4F8B\u8F93\u51FA\uFF1A${(Mt==null?void 0:Mt.output)||""}`,tagName:"p"}),(Ut=Mt==null?void 0:Mt.answer)==null?void 0:Ut.map((Zi,Ci)=>ge.createElement(Vt,{key:Ci,id:Mt==null?void 0:Mt.id,value:`\u7B54\u6848${Ci+1}\uFF1A${Zi||""}`,tagName:"p"})),jr(Mt)))),ge.createElement("div",{className:Oe.rightLayout},ge.createElement(Ee,{className:wi!=null&&wi.errorMsg?Oe.error:""},tt(wi,Pi),lo(wi,"",Pi),ge.createElement("div",{className:Oe.liWrap},ge.createElement("div",{className:Oe.li,onKeyDown:Gn},ge.createElement("aside",null,"\u65F6\u95F4\u9650\u5236\uFF08\u79D2\uFF09\uFF1A"),ge.createElement(Vt,{className:Oe.edit,id:wi==null?void 0:wi.id,value:wi==null?void 0:wi.timeLimit,tagName:"div",onBlur:Zi=>qi("timeLimit",Pi,Br(Zi))})),ge.createElement("div",{className:Oe.li},ge.createElement("aside",null,"\u7F16\u7A0B\u8BED\u8A00\uFF1A"),ge.createElement("div",{className:"c-black"},ge.createElement(Lt.Z,{menu:{items:yr}},ge.createElement("span",{className:"c-light-primary"},wi==null?void 0:wi.platform,ge.createElement("i",{className:"iconfont icon-a-bianzu11 font14 ml4"}))))),ge.createElement("div",{className:Oe.li,style:{flexDirection:"column",alignItems:"start"}},ge.createElement("aside",{className:"mb10"},"\u7A0B\u5E8F\u4EE3\u7801\uFF1A"),ge.createElement(Vt,{className:Oe.edit,id:wi==null?void 0:wi.id,value:(wi==null?void 0:wi.code)||"",onBlur:Zi=>qi("code",Pi,Br(Zi)),tagName:"div"})),ge.createElement("div",{className:Oe.li},ge.createElement("aside",null,"\u6D4B\u8BD5\u7528\u4F8B\u8F93\u5165\uFF1A"),ge.createElement(Vt,{className:Oe.edit,id:wi==null?void 0:wi.id,value:(wi==null?void 0:wi.input)||"",onBlur:Zi=>qi("input",Pi,Br(Zi)),tagName:"div"})),ge.createElement("div",{className:Oe.li},ge.createElement("aside",null,"\u6D4B\u8BD5\u7528\u4F8B\u8F93\u51FA\uFF1A"),ge.createElement(Vt,{className:Oe.edit,id:wi==null?void 0:wi.id,value:(wi==null?void 0:wi.output)||"",onBlur:Zi=>qi("output",Pi,Br(Zi)),tagName:"div"}))),ge.createElement("div",{className:Oe.liWrap},(Ui=wi==null?void 0:wi.answer)==null?void 0:Ui.map((Zi,Ci)=>ge.createElement("div",{className:Oe.li,key:Ci},ge.createElement("aside",null,"\u7B54\u6848",Ci+1,"\uFF1A"),ge.createElement(Vt,{id:wi==null?void 0:wi.id,value:Zi||"",className:Oe.edit,onBlur:nr=>{const rr=[...(wi==null?void 0:wi.answer)||[]];rr[Ci]=Br(nr),qi("output",Pi,rr)},tagName:"div"})))),vo(wi))))},deal:Mt=>{var Pi,Ut,Ui,wi,yr,Zi,Ci,nr;Mt.score=Mt.score===void 0?10:Mt.score,Mt.code=(Ui=(Ut=(Pi=Mt.code)==null?void 0:Pi.trim())==null?void 0:Ut.replace(/@_@/g,"@\u2581@"))==null?void 0:Ui.replace(/@__@/g,"@\u2581\u2581@");let rr=[];if(kn(Mt==null?void 0:Mt.question)||rr.push("\u672A\u8BC6\u522B\u5230\u9898\u5E72"),kn(Mt==null?void 0:Mt.code)?/@▁@|@▁▁@/.test(Mt==null?void 0:Mt.code)?(wi=Mt==null?void 0:Mt.answer)!=null&&wi.length&&((yr=Mt==null?void 0:Mt.code.match(/@▁@|@▁▁@/g))==null?void 0:yr.length)!==((Zi=Mt==null?void 0:Mt.answer)==null?void 0:Zi.length)&&rr.push("\u586B\u7A7A\u9879\u4E0E\u7B54\u6848\u4E2A\u6570\u4E0D\u5339\u914D\uFF0C\u8BF7\u8FDB\u884C\u8C03\u6574"):rr.push("\u7A0B\u5E8F\u4EE3\u7801\u8BBE\u7F6E\u6709\u8BEF\uFF0C\u8BF7\u91CD\u65B0\u8BBE\u7F6E\u3002\u7A0B\u5E8F\u4EE3\u7801\u4E2D\u7684\u586B\u7A7A\u9879\u9700\u8981\u4F7F\u7528 @\u2581@ \u7B26\u53F7\u6807\u8BC6\u51FA\u6765"):rr.push("\u672A\u8BC6\u522B\u5230\u7A0B\u5E8F\u4EE3\u7801"),Mt!=null&&Mt.answer?(Ci=Mt.answer)!=null&&Ci.some(xr=>!kn(xr))&&rr.push("\u7B54\u6848\u4E3A\u5FC5\u586B\u9879"):rr.push("\u672A\u8BC6\u522B\u5230\u7B54\u6848\u3002\u63A8\u8350\u683C\u5F0F\uFF1A\u7B54\u68481\uFF1AHello\uFF1B\u7B54\u68482\uFF1AWorld"),Mt.platform=kn(Mt==null?void 0:Mt.platform),Mt!=null&&Mt.platform){const xr=["c","c++","java","python","javascript","ruby"],Gr=(nr=Mt==null?void 0:Mt.platform)==null?void 0:nr.toLowerCase(),vr=xr.findIndex(kr=>kr===Gr);vr>-1?Mt.platform=gr[vr]:rr.push("\u7F16\u7A0B\u8BED\u8A00\u4E3A\u5FC5\u586B\u9879\uFF0C\u76EE\u524D\u53EA\u652F\u6301C\u3001C++\u3001Python\u3001Java\u3001JavaScript\u3001Ruby\u8BED\u8A00")}else rr.push("\u7F16\u7A0B\u8BED\u8A00\u4E3A\u5FC5\u586B\u9879\uFF0C\u76EE\u524D\u53EA\u652F\u6301C\u3001C++\u3001Python\u3001Java\u3001JavaScript\u3001Ruby\u8BED\u8A00");kn(Mt==null?void 0:Mt.output)||rr.push("\u6D4B\u8BD5\u7528\u4F8B\u8F93\u51FA\u4E3A\u5FC5\u586B\u9879");const cr=kn(String((Mt==null?void 0:Mt.timeLimit)||""));return Mt.timeLimit=cr,(!cr||cr&&!["3","4","5","6","7","8","9","10"].includes(cr))&&rr.push("\u65F6\u95F4\u9650\u5236\u4E3A\u5FC5\u586B\u9879\uFF0C\u53EA\u652F\u63013-10\u7684\u6574\u6570"),Mt.errorMsg=rr.join(`
|
|
|
`),Mt}}],Tr=()=>ge.createElement(ge.Fragment,null,$n.filter(Mt=>{var Pi;return!!((Pi=fi.find(Ui=>Ui.id===(Mt==null?void 0:Mt.type)))==null?void 0:Pi.element)}).map((Mt,Pi)=>{var Ut;const Ui=(Ut=fi.find(wi=>wi.id===(Mt==null?void 0:Mt.type)))==null?void 0:Ut.element;return ge.createElement(ge.Fragment,{key:Mt.id},Ui(Mt,Pi))})),Bo=()=>It(void 0,null,function*(){const Mt=Ei.filter(Pi=>!Pi.checked);if(bi!==3||!Mt.length){Xe.ZP.warning("\u672A\u8BC6\u522B\u5230\u8BD5\u9898\uFF01");return}ln.setFieldsValue({sub_discipline_id:zt}),Un(!0)}),aa=Mt=>It(void 0,null,function*(){const Pi=Jr(Mt);Le(Pi),Ri(JSON.parse(JSON.stringify(Pi))),Xi(3),Er(!1),on(!1),di(!1)});(0,ge.useEffect)(()=>{if(Jn)return;const Mt=()=>{Ji(Pi=>Pi>=90?(clearInterval(Ti.current),90):Pi+1)};return Ti.current=setInterval(Mt,5e4/90),()=>clearInterval(Ti.current)},[Jn]);const Ho=(Mt,Pi)=>{St(!1);const Ut=new FormData;Object.keys(Pi).forEach(wi=>{Ut.append(wi,Pi[wi])});const Ui=new window.XMLHttpRequest;Ui.withCredentials=!0,Ui.addEventListener("load",function(wi){return It(this,null,function*(){var yr,Zi;try{const Ci=JSON.parse((yr=wi==null?void 0:wi.target)==null?void 0:yr.response);if(St(!0),Ji(100),yield new Promise(nr=>setTimeout(()=>nr(),780)),Ci.status===0){if(!((Zi=Ci==null?void 0:Ci.data)!=null&&Zi.length)){Xe.ZP.warning("\u672A\u8BC6\u522B\u5230\u8BD5\u9898!"),Er(!1);return}aa((Ci==null?void 0:Ci.data)||[])}else Er(!1),Xe.ZP.warning(Ci==null?void 0:Ci.message)}catch(Ci){console.log("\u8BF7\u6C42\u9519\u8BEF\uFF1A",Ci)}})}),Ui.addEventListener("error",()=>{Er(!1)}),Ui.open("POST",`${be.Z.API_SERVER}${Mt}`),Ui.send(Ut)},Ao=Mt=>It(void 0,null,function*(){const Pi=Mt.name.split(".").slice(-1)[0].toLowerCase();return["docx"].indexOf(Pi)==-1?(Xe.ZP.error(`${Mt.name}\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\uFF0C\u5F53\u524D\u4EC5\u9650\u652F\u6301\u683C\u5F0F\u4E3Adocx\u6587\u4EF6\uFF08Microsoft Word 2007\u4EE5\u4E0A\u7684\u7248\u672C\uFF09`),Promise.reject()):(Er(!0),mr("\u5904\u7406\u4E2D"),Ho("/api/intelligent_imports/import.json",{file:Mt}),Promise.reject())}),_o=Mt=>It(void 0,null,function*(){const Pi=Mt.name.split(".").slice(-1)[0].toLowerCase();return["docx","doc","pdf","png","jpg"].indexOf(Pi)==-1?(Xe.ZP.warning("\u5355\u6B21\u4EC5\u652F\u6301\u4E0A\u4F201\u4E2A\u6587\u6863\u62161\u5F20\u56FE\u7247\uFF0C\u6587\u6863\u652F\u6301PDF/Word\u683C\u5F0F\uFF0C\u56FE\u7247\u652F\u63011\u5F20\u4E0D\u8D85\u8FC710M\u7684PNG/JPG\u56FE\u7247"),Promise.reject()):Mt.size/1024/1024>200?(Xe.ZP.warning("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E200M"),Promise.reject()):(yn!=null&&yn.length?Ne.default.confirm({centered:!0,icon:null,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u5355\u6B21\u51FA\u9898\u53EA\u652F\u6301\u4E0A\u4F20\u4E00\u4E2A\u6587\u4EF6/\u4E00\u5F20\u56FE\u7247\uFF0C\u518D\u6B21\u4E0A\u4F20\u4F1A\u66FF\u6362\u5F53\u524D\u5DF2\u4E0A\u4F20\u7684\u5185\u5BB9\u3002",onOk:()=>pn([Mt])}):pn([Mt]),Promise.reject())});let ta=[{key:1,label:ge.createElement(dt.default,{showUploadList:!1,accept:".docx",maxCount:1,beforeUpload:Ao},ge.createElement("div",{style:{padding:"0 5px",width:108,height:35,lineHeight:"35px"}},"\u672C\u5730\u5BFC\u5165"))}];((0,ot.Ny)()||(0,ot.$O)())&&ta.push({key:2,label:ge.createElement("div",{style:{padding:"0 5px"}},"\u5927\u6A21\u578B\u667A\u80FD\u51FA\u9898"),onClick:()=>{on(!0)}});const Ea=[Ei.length,(gi=Ei.filter(Mt=>!!(Mt!=null&&Mt.errorMsg)))==null?void 0:gi.length];return ge.createElement("div",{className:ut()(Oe.intelligentBox,"intelligent-body-curb",ye),style:Yn(Sn({},qe),{width:vt}),ref:Gi},ge.createElement("div",{className:Oe.underpin},ge.createElement("b",{style:dn}),ge.createElement("b",{style:dn})),ge.createElement("div",{className:Oe.head,style:{top:at}},ge.createElement("div",{className:Oe.leftLayout},Qt||ge.createElement(ge.Fragment,null,ge.createElement(Ct.Z,{align:"middle"},ge.createElement("div",{className:Oe.title},"\u8BD5\u9898\u7F16\u8F91"),!un&&ge.createElement(ve.op,{href:`${be.Z.API_SERVER}/api/intelligent_imports/download_template`,download:!0,type:"link"},"\u4E0B\u8F7DWord\u6A21\u7248",ge.createElement("i",{className:"iconfont icon-xiazai4 font14 ml10"})),ge.createElement(ve.op,{onClick:hr,shape:"default"},"\u4E00\u952E\u6E05\u7A7A"),!un&&ge.createElement(Lt.Z,{overlayClassName:Oe.menu,menu:{items:ta}},ge.createElement(ve.op,{className:"ml20",type:"primary",shape:"default"},"\u5BFC\u5165\u8BD5\u9898")),!!Pn&&Pn),ge.createElement("div",{className:Oe.tip},ge.createElement("i",{className:"iconfont icon-tishi7 font12 mr10"}),"\u63D0\u793A\uFF1A\u82E5\u8BC6\u522B\u6709\u8BEF\uFF0C\u53EF\u5728\u5DE6\u4FA7\u7F16\u8F91\u533A\u70B9\u51FB\u5BF9\u5E94\u7684\u8BD5\u9898\u6309\u683C\u5F0F\u4FEE\u6539\u540E\u91CD\u65B0\u8BC6\u522B"))),ge.createElement(Ct.Z,{className:Oe.rightLayout,style:{alignItems:"start"}},Kn||ge.createElement(ge.Fragment,null,ge.createElement("div",{className:Oe.title,style:{marginRight:0}},"\u8BD5\u9898\u9884\u89C8"),[3].includes(bi)&&ge.createElement(Ve.default,{className:"ml20",checked:nn,onChange:Mt=>di(Mt.target.checked)},"\u4EC5\u67E5\u770B\u9519\u8BEF\u8BD5\u9898"),[3].includes(bi)&&ge.createElement("div",{style:{color:"#5F6368",marginLeft:"auto"}},"\u5171\u8BC6\u522B",ge.createElement("span",{className:"ml5 mr5 c-light-primary"},Ea[0]),"\u9898\uFF0C\u5176\u4E2D\u8BC6\u522B\u6709\u8BEF",ge.createElement("span",{className:"ml5 mr5 c-red-e53"},Ea[1]),"\u9898")),jn&&ge.createElement("div",{className:Oe.tabs},$n==null?void 0:$n.map((Mt,Pi)=>ge.createElement("div",{onClick:()=>{qn(Pi)},className:Nn===Pi&&Oe.active,key:Pi},"\u65B0\u9898",Pi+1)))),ge.createElement("div",{className:Oe.centerBox},ge.createElement("img",{className:"mb10",src:We,width:56}),!jt&&ge.createElement(ve.op,{onClick:ur},"\u8BC6\u522B"))),[1,2].includes(bi)&&er(),[3].includes(bi)&&Tr(),ge.createElement("div",{className:"pb10"}),ge.createElement("div",{className:Oe.buttonFixed},ge.createElement("div",{className:Oe.buttonWrap},ge.createElement(Rt.ZP,{size:"middle",className:`${Oe.button} mr20`,onClick:et},"\u53D6\u6D88"),ge.createElement(Rt.ZP,{size:"middle",type:"primary",className:`${Oe.button}`,onClick:Bo},pi))),ge.createElement(Ne.default,{centered:!0,closable:!1,destroyOnClose:!0,open:Hi,title:null,footer:null,width:320,afterClose:()=>Ji(0)},ge.createElement(Ct.Z,{align:"middle",style:{flexDirection:"column"}},ge.createElement("b",{style:{color:"#5F6368"},className:"font16 mb5 mt20"},wr,ge.createElement("span",{className:Oe.dotLoading},ge.createElement("span",null,"."),ge.createElement("span",null,"."),ge.createElement("span",null,"."))),ge.createElement(De.Z,{style:{width:"auto"},size:[200,8],showInfo:!1,percent:ar}),ge.createElement("div",{style:{color:"#5F6368"},className:"mb20"},"\u6B63\u5728\u8BC6\u522B\uFF0C\u5DF2\u5B8C\u6210",ge.createElement("span",{className:"ml5 c-light-primary"},ar,"%")))),ge.createElement(Ne.default,{centered:!0,open:Tn,title:"\u8BD5\u9898\u5BFC\u5165\u8BBE\u7F6E",confirmLoading:yi,width:480,onCancel:()=>Un(!1),onOk:()=>ln.submit(),afterClose:()=>{ln.resetFields()}},ge.createElement(Ge.default,{style:{maxHeight:550},form:ln,layout:"horizontal",colon:!1,size:"large",onFinish:Mt=>It(void 0,null,function*(){var Pi,Ut,Ui,wi,yr;const Zi=Ei.filter(rr=>!rr.checked&&!rr.errorMsg);Li(!0);const Ci=()=>It(void 0,null,function*(){var rr,cr;const xr=yield(0,rt.ZP)("/api/intelligent_imports/save.json",{method:"post",body:Yn(Sn(Sn({},xt),Mt),{list:Zi,mode:yt})});xr.status===0&&(ui&&((rr=xr==null?void 0:xr.data)!=null&&rr.success)&&window.location.pathname==="/problemset"&&(Ue.Z.publish("refresh-item-bank",Mt.group_id),yield new Promise(Gr=>setTimeout(()=>Gr(),1500))),Xe.ZP.success(`\u6210\u529F\u5BFC\u5165${(cr=xr==null?void 0:xr.data)==null?void 0:cr.success}\u9053\u8BD5\u9898`,3),Ye(xr),Un(!1)),Li(!1)});if(yt!==1){yield Ci();return}const nr=yield(0,rt.ZP)("/api/intelligent_imports/is_repeated.json",{method:"post",body:{list:Ei,mode:yt}});if(nr.status===0){if(!((Pi=nr==null?void 0:nr.data)!=null&&Pi.error_size)){yield Ci();return}Ne.default.confirm({centered:!0,icon:null,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onCancel:()=>{Li(!1)},title:"\u63D0\u793A",content:ge.createElement("div",{style:{overflow:"auto",maxHeight:500}},"\u5171",ge.createElement("span",{className:"c-light-primary ml5 mr5"},(Ut=nr==null?void 0:nr.data)==null?void 0:Ut.all_size),"\u9053\u8BD5\u9898\uFF0C\u5176\u4E2D",ge.createElement("span",{style:{color:"#FF9D18"},className:"ml5 mr5"},(Ui=nr==null?void 0:nr.data)==null?void 0:Ui.error_size),"\u9053\u8BD5\u9898\u91CD\u590D\uFF08\u7B2C",ge.createElement("span",{className:"ml5 mr5"},(yr=(wi=nr==null?void 0:nr.data)==null?void 0:wi.index)==null?void 0:yr.join("\u3001")),"\u9053\uFF09\uFF0C\u91CD\u590D\u8BD5\u9898\u5C06\u4F1A\u4E3A\u60A8\u81EA\u52A8\u8FC7\u6EE4\uFF0C\u786E\u5B9A\u5BFC\u5165\u5417\uFF1F"),onOk:Ci})}})},ge.createElement("div",{className:"c-grey-999 mb20"},"\u63D0\u793A\uFF1A\u8BC6\u522B\u6709\u8BEF\u7684\u8BD5\u9898\u5C06\u4E0D\u4F1A\u88AB\u5BFC\u5165"),ge.createElement(Ge.default.Item,{label:"\u65B9\u5411&\u8BFE\u7A0B",name:"sub_discipline_id",labelCol:{span:5},wrapperCol:{span:19},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B"}]},ge.createElement(ne.Z,{placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",fieldNames:{label:"name",value:"id",children:"sub_disciplines"},options:Je})),yt===1&&ge.createElement(Ge.default.Item,{label:ge.createElement(Ct.Z,{align:"middle",style:{justifyContent:"space-between"}},ge.createElement("span",null,"\u653E\u5165\u6587\u4EF6\u5939\u76EE\u5F55"),ge.createElement("div",{onClick:()=>$t(!0),style:{marginLeft:211,transform:"translateX(14px)",display:"flex",color:"#5F6368",cursor:"pointer"}},ge.createElement("img",{className:"mr5 primary-hover",src:Pt}),"\u65B0\u5EFA\u6587\u4EF6\u5939")),rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6587\u4EF6\u5939"}],name:"group_id",labelCol:{span:24},wrapperCol:{span:24}},ge.createElement(Qe.Z,{key:vn})))),ge.createElement(Ne.default,{centered:!0,open:kt,title:"\u65B0\u5EFA\u6587\u4EF6\u5939",destroyOnClose:!0,width:480,confirmLoading:En,onCancel:()=>$t(!1),onOk:()=>oi.submit(),afterClose:()=>{oi.resetFields()}},ge.createElement(Ge.default,{style:{maxHeight:550},form:oi,layout:"horizontal",colon:!1,size:"large",onFinish:Mt=>It(void 0,null,function*(){var Pi;Dn(!0),(yield(0,rt.ZP)("/api/item_banks_groups.json",{method:"post",body:{name:Mt.name,parent_id:(Pi=Mt==null?void 0:Mt.parent_id)==null?void 0:Pi[0]}})).status===0?(Ft(vn+1),setTimeout(()=>{Xe.ZP.success("\u64CD\u4F5C\u6210\u529F"),$t(!1),Dn(!1)},1e3)):Dn(!1)})},ge.createElement(Ge.default.Item,{label:"\u6587\u4EF6\u5939\u540D\u79F0",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5939\u540D\u79F0"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},ge.createElement(ee.default,{maxLength:60,showCount:!0,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5939\u540D\u79F0"})),ge.createElement(Ge.default.Item,{label:"\u6587\u4EF6\u5939\u4F4D\u7F6E",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6587\u4EF6\u5939"}],name:"parent_id"},ge.createElement(Qe.Z,null)))),ge.createElement(Ne.default,{centered:!0,open:st,title:"\u5927\u6A21\u578B\u667A\u80FD\u51FA\u9898",width:814,okText:"\u751F\u6210\u8BD5\u9898",onCancel:()=>on(!1),onOk:()=>{if(Si===1&&!kn(Cn)){Xe.ZP.warning("\u8BF7\u5148\u8F93\u5165\u51FA\u9898\u8981\u6C42");return}if(Si===2&&!kn(Cn)&&!(yn!=null&&yn.length)){Xe.ZP.warning("\u8BF7\u4E0A\u4F20\u6750\u6599\u6587\u6863\u6216\u5728\u6587\u672C\u6846\u4E2D\u586B\u5199\u6750\u6599\u5185\u5BB9");return}const Mt=[{name:"\u5355\u9009\u9898",num:mn||0},{name:"\u591A\u9009\u9898",num:Hn||0},{name:"\u5224\u65AD\u9898",num:ii||0},{name:"\u586B\u7A7A\u9898",num:cn||0},{name:"\u7B80\u7B54\u9898",num:$i||0}];if(Mt.reduce((Ui,wi)=>Ui+wi.num,0)===0){Xe.ZP.warning("\u8BF7\u8BBE\u7F6E\u51FA\u9898\u6570\u91CF");return}console.log(Si,mn,Hn),Er(!0),mr("\u5904\u7406\u4E2D");const Ut={type:Si,query:Cn,item_types:JSON.stringify(Mt)};Si===2&&(Ut.file=(yn==null?void 0:yn[0])||null),Ho("/api/intelligent_imports/large_model_intelligent_qa.json",Ut)}},ge.createElement(Ct.Z,{align:"middle",className:"mb10 c-black"},ge.createElement("div",{className:"mr10"},"\u51FA\u9898\u8981\u6C42"),ge.createElement(ce.ZP.Group,{value:Si,onChange:Mt=>en(Mt.target.value)},ge.createElement(ce.ZP,{value:1,className:"c-black"},"\u6839\u636E\u77E5\u8BC6\u70B9\u51FA\u9898"),ge.createElement(ce.ZP,{value:2,className:"ml40 c-black"},"\u6839\u636E\u6750\u6599\u51FA\u9898"))),ge.createElement(ee.default.TextArea,{style:{height:120},className:"mb20",value:Cn,placeholder:Si===1?"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\uFF0C\u591A\u4E2A\u77E5\u8BC6\u70B9\u7528\u201C\u3001\u201D\u5206\u9694\u5F00":"\u8BF7\u5148\u63D0\u4F9B\u60A8\u51FA\u9898\u4F9D\u636E\u7684\u6750\u6599\uFF0C\u53EF\u4EE5\u76F4\u63A5\u590D\u5236\u6750\u6599\u5185\u5BB9\u7C98\u8D34\u5728\u6B64\u533A\u57DF\uFF0C\u4E5F\u53EF\u70B9\u51FB\u4E0B\u65B9\u4E0A\u4F20\u6750\u6599\u6309\u94AE\u4E0A\u4F20\u672C\u5730\u6750\u6599\u6587\u6863",onChange:Mt=>{At(Mt.target.value)}}),Si===2&&ge.createElement(ge.Fragment,null,ge.createElement(dt.default,{accept:".doc,.docx,.pdf,.png,.jpg",maxCount:1,fileList:yn,beforeUpload:_o,className:"mb20",onRemove:()=>pn([])},ge.createElement(se.Z,{title:"\u5355\u6B21\u4EC5\u652F\u6301\u4E0A\u4F201\u4E2A\u6587\u6863\u62161\u5F20\u56FE\u7247\uFF0C\u6587\u6863\u652F\u6301PDF/Word\u683C\u5F0F\uFF0C\u56FE\u7247\u652F\u63011\u5F20\u4E0D\u8D85\u8FC710M\u7684PNG/JPG\u56FE\u7247"},ge.createElement(ve.op,{style:{borderRadius:2}},ge.createElement("i",{className:"icon-shangchuan3 mr5"}),"\u4E0A\u4F20\u6750\u6599"))),ge.createElement("div",{style:{height:20}})),ge.createElement(Ct.Z,{align:"middle",className:"c-black"},ge.createElement("div",{className:"mb10"},"\u51FA\u9898\u6570\u91CF"),ge.createElement(Ct.Z,{gutter:16},ge.createElement(he.Z,null,ge.createElement("label",null,"\u5355\u9009\u9898"),ge.createElement(Tt.Z,{min:0,max:10,value:mn,onChange:Wn,style:{marginLeft:"8px"}})),ge.createElement(he.Z,null,ge.createElement("label",null,"\u591A\u9009\u9898"),ge.createElement(Tt.Z,{min:0,max:10,value:Hn,onChange:Qn,style:{marginLeft:"8px"}})),ge.createElement(he.Z,null,ge.createElement("label",null,"\u5224\u65AD\u9898"),ge.createElement(Tt.Z,{min:0,max:10,value:ii,onChange:ji,style:{marginLeft:"8px"}})),ge.createElement(he.Z,null,ge.createElement("label",null,"\u586B\u7A7A\u9898"),ge.createElement(Tt.Z,{min:0,max:10,value:cn,onChange:Yi,style:{marginLeft:"8px"}})),ge.createElement(he.Z,null,ge.createElement("label",null,"\u7B80\u7B54\u9898"),ge.createElement(Tt.Z,{min:0,max:10,value:$i,onChange:Wi,style:{marginLeft:"8px"}}))))))},Fe=ke;var Ae=Pe},59879:function(Vn,xn,pe){"use strict";var ge=pe(59301),Oe=pe(88010),Ke=pe(48136),ut=pe(41588),Ge=pe(43418),Xe=pe(59301);const Ne=(0,ge.forwardRef)(({callback:Tt,width:Ct,onChange:Ve,disabled:Lt,readOnly:dt,type:Rt="",value:De="",style:ne={}},ee)=>{const ce=(0,ge.useRef)(),se=(0,ge.useRef)(),[he,ve]=(0,ge.useState)(0),[be,ke]=(0,ge.useState)(0),[Be,He]=(0,ge.useState)(!1),We=()=>{var Ze=document.createElement("div");Ze.innerHTML=ce.current.getValue();var Et=Ze.innerText;return Tt&&Tt(Et),Et};(0,ge.useImperativeHandle)(ee,()=>({getData:We}));const rt=Ze=>{Ze.preventDefault();const Et=Ze.clientX-he,it=Ze.clientY-be;document.body.onmousemove=Dt=>{let ht=Dt.clientX-Et,Ht=Dt.clientY-it;const _t=document.getElementsByClassName("markdown-popup-form")[0],Vt=window.innerWidth-_t.offsetWidth,ot=window.innerHeight-_t.offsetHeight;ht=Math.max(0,Math.min(ht,Vt)),Ht=Math.max(0,Math.min(Ht,ot)),Qe(Dt.clientX,Dt.clientY,Et,it)&&(ve(ht),ke(Ht))},document.body.onmouseup=function(){document.body.onmousemove=null}},Qe=(Ze,Et,it,Dt)=>{const ht=document.body.clientHeight,Ht=document.body.clientWidth;return Ze<20&&it>Ze||Ze>Ht-20&&it<Ze||Et<20&&Dt>Et||Et>ht-20&&Dt<Et?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};(0,ge.useEffect)(()=>{Be&&setTimeout(()=>{const Ze=document.getElementsByClassName("markdown-popup-form")[0],Et=window.innerWidth/2-Ze.offsetWidth/2,it=window.innerHeight/2-Ze.offsetHeight/2;ve(Et),ke(it)},0)},[Be]);const Pt=()=>{Lt||dt||He(!0)};return Xe.createElement("div",{style:ne},Xe.createElement("div",{style:{width:Ct||"100%",position:"relative"},className:`${Oe.Z.mathFillWrap} ${Lt||dt?"cursorDefault":""}`,onClick:()=>Pt()},Xe.createElement("math-field",{disabled:Lt,locale:"zh_cn",class:`${Oe.Z.mathField} ${Rt}`,readOnly:dt,placeholder:"\u8BF7\u8F93\u5165\u516C\u5F0F",ref:ce,style:{width:"100%",fontSize:De?18:14},value:De||""})),Xe.createElement(Ge.default,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:he,top:be},title:Xe.createElement("div",{style:{cursor:"move"},onMouseDown:rt},"\u8F93\u5165\u516C\u5F0F"),open:Be,onOk:()=>{const Ze=se.current.getData();ce.current.setValue(Ze),Ve(Ze),He(!1)},onCancel:()=>{He(!1)},destroyOnClose:!0,className:"markdown-popup-form"},Xe.createElement(ut.Z,{value:De,ref:se,onChange:Ve,showSaveButton:!1})))});xn.Z=Ne},41588:function(Vn,xn,pe){"use strict";var ge=pe(59301),Oe=pe(95237),Ke=pe(43604),ut=pe(99313),Ge=pe(3113),Xe=pe(85149),Ne=pe(88010),Tt=pe(48136),Ct=pe(59301);const Ve=(0,ge.forwardRef)(({callback:Lt,showSaveButton:dt,value:Rt=""},De)=>{const ne=(0,ge.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 "}]}]}],ce=[{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}`}]}]}],se=be=>{ne.current.setValue(ne.current.getValue()+" "+be.value+" ")},he=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Ct.createElement(Oe.Z,{className:Ne.Z.lists,gutter:[10,10]},ee.map((be,ke)=>Ct.createElement(Ke.Z,{flex:"110px",className:Ne.Z.item},Ct.createElement("div",null,Ct.createElement(Xe.Z,{value:`$$${be.value}$$`}),be.name),Ct.createElement("div",{className:Ne.Z.children},be.children.map((Be,He)=>Ct.createElement("div",{key:He},Ct.createElement("h1",null,Be.name),Ct.createElement(Oe.Z,{gutter:[10,10]},Be.data.map((We,rt)=>Ct.createElement(Ke.Z,{key:rt,onClick:()=>se(We),className:Ne.Z.diamond},Ct.createElement(Xe.Z,{value:"`$$"+We.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Ct.createElement(Oe.Z,{className:Ne.Z.lists,gutter:[10,10]},ce.map((be,ke)=>Ct.createElement(Ke.Z,{flex:"110px",className:Ne.Z.item},Ct.createElement("div",null,Ct.createElement(Xe.Z,{value:"`$$"+be.value+"$$`"}),be.name),Ct.createElement("div",{className:Ne.Z.children},be.children.map((Be,He)=>Ct.createElement("div",{key:He},Be.name&&Ct.createElement("h1",null,Be.name),Ct.createElement(Oe.Z,{gutter:[10,10]},Be.data.map((We,rt)=>Ct.createElement(Ke.Z,{key:rt,onClick:()=>se(We),className:Ne.Z.diamond},Ct.createElement(Xe.Z,{value:"`$$"+We.value+"$$`"}))))))))))}],ve=()=>{var be=document.createElement("div");be.innerHTML=ne.current.getValue();var ke=be.innerText;return Lt&&Lt(ke),ke};return(0,ge.useImperativeHandle)(De,()=>({getData:ve})),Ct.createElement("div",{className:Ne.Z.mathWrap},Ct.createElement(ut.default,{defaultActiveKey:"1",items:he}),Ct.createElement("math-field",{locale:"zh_cn",className:Ne.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:ne,style:{width:800,marginTop:30,fontSize:18}},Rt||""),dt&&Ct.createElement("div",{className:Ne.Z.button},Ct.createElement(Ge.ZP,{size:"large",onClick:ve,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});xn.Z=Ve},87198:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return dt}});var ge=pe(59301),Oe=pe(78241),Ke=pe(43418),ut=pe(92832),Ge=pe(87169),Xe=pe(99064),Ne={publicQuest:"publicQuest___iYvzo",publicQuestContent:"publicQuestContent___vgbKh",public_tips:"public_tips___UX0Dn",concat:"concat___wOfND"},Tt=pe(86918),Ct=pe(59301),Ve=(Rt,De,ne)=>new Promise((ee,ce)=>{var se=be=>{try{ve(ne.next(be))}catch(ke){ce(ke)}},he=be=>{try{ve(ne.throw(be))}catch(ke){ce(ke)}},ve=be=>be.done?ee(be.value):Promise.resolve(be.value).then(se,he);ve((ne=ne.apply(Rt,De)).next())}),dt=({type:Rt="subject",open:De,onCancel:ne,onOkClick:ee,subDisciplineId:ce})=>{const[se]=Oe.default.useForm(),[he,ve]=(0,ge.useState)([]),[be,ke]=(0,ge.useState)(!1);(0,ge.useEffect)(()=>{},[]);const Be=()=>Ve(void 0,null,function*(){if(Rt){const He=yield(0,Xe.ZP)("/api/disciplines.json",{method:"get",params:{source:Rt}});ve(He.disciplines||[])}});return Ct.createElement(Ke.default,{title:Ct.createElement("div",{style:{fontWeight:"bold"}},"\u65B0\u5EFA\u77E5\u8BC6\u70B9"),open:De,width:558,centered:!0,className:Ne.publicQuest,onCancel:()=>{ne(),se.resetFields()},onOk:()=>{se.validateFields().then(He=>Ve(void 0,null,function*(){const We=yield(0,Xe.ZP)("/api/tag_disciplines.json",{method:"post",body:{name:He==null?void 0:He.name,sub_discipline_id:ce}});(We==null?void 0:We.status)===0&&ee({name:He==null?void 0:He.name,id:We==null?void 0:We.tag_discipline_id,public:!1,type:"personal"}),se.resetFields(),ne()}))}},Ct.createElement("div",{className:Ne.publicQuestContent},Ct.createElement("div",{className:Ne.public_tips},Ct.createElement(Ge.Z,{style:{color:"#FF8C29",marginRight:10,paddingTop:5}}),"\u65B0\u5EFA\u7684\u77E5\u8BC6\u70B9\u4EC5\u672C\u4EBA\u53EF\u89C1\uFF0C\u5E73\u53F0\u5BA1\u6838\u5217\u5165\u516C\u5F00\u77E5\u8BC6\u70B9\u540E\uFF0C\u5BF9\u6240\u6709\u7528\u6237\u53EF\u89C1\u3002 \u5E73\u53F0\u6709\u6743\u5220\u9664\u4E0D\u5408\u9002\u7684\u77E5\u8BC6\u70B9\uFF0C\u8BF7\u8BA4\u771F\u586B\u5199\u77E5\u8BC6\u70B9\u540D\u79F0\u3002"),Ct.createElement(Oe.default,{labelAlign:"left",form:se,colon:!1},Ct.createElement(Oe.default.Item,{label:"\u77E5\u8BC6\u70B9\u540D\u79F0",name:"name",rules:[{required:!0}]},Ct.createElement(ut.default,{showCount:!0,maxLength:20,placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0"}))),Ct.createElement(Tt.Z,{open:be,onCancel:()=>{ke(!1)}})))}},8797:function(Vn,xn,pe){"use strict";var ge=pe(59301),Oe=pe(93314),Ke=pe(3113),ut=Object.defineProperty,Ge=Object.defineProperties,Xe=Object.getOwnPropertyDescriptors,Ne=Object.getOwnPropertySymbols,Tt=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable,Ve=(De,ne,ee)=>ne in De?ut(De,ne,{enumerable:!0,configurable:!0,writable:!0,value:ee}):De[ne]=ee,Lt=(De,ne)=>{for(var ee in ne||(ne={}))Tt.call(ne,ee)&&Ve(De,ee,ne[ee]);if(Ne)for(var ee of Ne(ne))Ct.call(ne,ee)&&Ve(De,ee,ne[ee]);return De},dt=(De,ne)=>Ge(De,Xe(ne));const Rt=({img:De,buttonProps:ne={},styles:ee={},customText:ce,ButtonText:se,ButtonClick:he,Buttonclass:ve,ButtonTwo:be,imgStyles:ke,loading:Be=!1})=>ge.createElement("section",{className:"tc animated fadeIn",style:Lt(Lt({},{color:"#999",margin:"100px auto",visibility:Be?"hidden":"visible"}),ee)},ge.createElement("img",{src:De||Oe,style:dt(Lt({},ke),{pointerEvents:"none",userSelect:"none"})}),ge.createElement("p",{className:"mt20 font14"},ce||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),se&&ge.createElement(Ke.ZP,Lt({className:ve,onClick:he},ne),se),be&&be);xn.Z=Rt},23210:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return ve}});var ge=pe(59301),Oe={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Ke=pe(3113),ut=pe(70557),Ge=pe(23954),Xe=pe(6848),Ne=pe(955),Tt=pe(94941),Ct=pe(8797),Ve=pe(3294),Lt=pe(19381),dt=pe(59301),Rt=Object.defineProperty,De=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ce=(be,ke,Be)=>ke in be?Rt(be,ke,{enumerable:!0,configurable:!0,writable:!0,value:Be}):be[ke]=Be,se=(be,ke)=>{for(var Be in ke||(ke={}))ne.call(ke,Be)&&ce(be,Be,ke[Be]);if(De)for(var Be of De(ke))ee.call(ke,Be)&&ce(be,Be,ke[Be]);return be},he=(be,ke,Be)=>new Promise((He,We)=>{var rt=Ze=>{try{Pt(Be.next(Ze))}catch(Et){We(Et)}},Qe=Ze=>{try{Pt(Be.throw(Ze))}catch(Et){We(Et)}},Pt=Ze=>Ze.done?He(Ze.value):Promise.resolve(Ze.value).then(rt,Qe);Pt((Be=Be.apply(be,ke)).next())}),ve=({editOffice:be="view",data:ke,theme:Be,type:He,filename:We,monacoEditor:rt,className:Qe,style:Pt,close:Ze,onClose:Et,hasMask:it,disabledDownload:Dt,onImgDimensions:ht,showNodata:Ht,recordInfo:_t})=>{const[Vt,ot]=(0,ge.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Ue,Wt]=(0,ge.useState)(""),[Ln,Fn]=(0,ge.useState)(),Gt=window.ENV==="build"?"/react/build":"",rn=location.host.startsWith("localhost")?Ve.Z.PROXY_SERVER:Ve.Z.API_SERVER,ni=10*(1024*1024),Sn=(0,ge.useRef)();ke!=null&&ke.startsWith("/api")&&He!=="txt"&&(ke=Ve.Z.API_SERVER+ke);const Yn=ze=>ze.substring(ze.lastIndexOf("/")+1).split(".").pop();We&&rt&&(rt.filename=We),(0,ge.useEffect)(()=>{var ze,Ee;const Pe=(Ee=(ze=document.cookie)==null?void 0:ze.replace(/\s/g,""))==null?void 0:Ee.split(";");Pe==null||Pe.map(Fe=>{let Ae=Fe.split("=");Ae[0]==="_educoder_session"&&Wt(Ae[1])})},[]),(0,ge.useEffect)(()=>{He==="office"&&(ke.indexOf("bigfilescdn.")>-1||ke.indexOf("bigfiles1")>-1?Fn({url:ke,fileType:Yn(ke),model:ke.indexOf("model=edit")?"edit":"view"}):It())},[He,ke]);const It=()=>he(void 0,null,function*(){console.log("data:",ke);let ze=ke;ke.startsWith("http")||(ze=location.origin+ze);let Ee=new URL(ze).pathname.split("/").pop();const Pe=yield(0,Tt.gJ)({attachment_id:Ee});Pe.url=rn+Pe.url,Fn(Pe)}),wn=()=>{if(ke.startsWith("http")||ke.startsWith("blob:")){Gn();return}(0,Ne.Sv)(We||"educoder",ke,We)},Gn=()=>{_t&&(0,Lt.fc)({id:_t==null?void 0:_t.id,watch_type:1,course_id:_t==null?void 0:_t.course_id}),(0,Ne.Nd)(We||"educoder",decodeURIComponent(ke))};return dt.createElement("div",{style:se({},Pt||{}),className:`${it&&Oe.bgBlack} ${He?Oe.wrp:"hide"}`},Ze&&dt.createElement("div",{className:Oe.close,ref:Sn},!!ht&&dt.createElement(Xe.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Sn.current},dt.createElement("span",{onClick:()=>{Et(),ht()}},dt.createElement("i",{className:"icon-yulanpizhu"}))),!Dt&&dt.createElement(Xe.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Sn.current},dt.createElement("span",{onClick:Gn},dt.createElement("i",{className:"icon-quxiaozhiding"}))),dt.createElement(Xe.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Sn.current},dt.createElement("span",{className:"",onClick:Et},dt.createElement("i",{className:"icon-guanbi1"})))),dt.createElement("div",{className:`${Oe[Qe]} ${Qe} ${Oe.monaco} ${He==="txt"?"show":"hide"}`},He==="txt"&&dt.createElement(dt.Fragment,null,dt.createElement(Ge.ZP,se({},rt)))),He==="audio"&&dt.createElement("audio",{src:`${(ke==null?void 0:ke.indexOf("http://"))>-1||(ke==null?void 0:ke.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${ke}`,autoPlay:!0}),He==="video"&&dt.createElement(dt.Fragment,null,(ke==null?void 0:ke.indexOf("http"))>-1?dt.createElement("video",{controls:!0,src:`${ke}`,autoPlay:!0}):dt.createElement("video",{controls:!0,src:`data:video/mp4;base64,${ke}`,autoPlay:!0})),He==="office"&&Ln&&dt.createElement("iframe",{src:`${Gt}/office.html?key=${Ln.key}&url=${btoa(Ln.url)}&callbackUrl=${rn+(Ln.callbackUrl||"")}&fileType=${Ln.fileType}&title=${Ln.title||""}&model=${be}&officeServer=${Ve.Z.ONLYOFFICE}&disabledDownload=${!!Dt}`}),He==="html"&&dt.createElement("iframe",{src:ke+"&disposition=inline"}),He==="pdf"&&dt.createElement("iframe",{src:`${Gt}/js/pdfview/index.html?filename=${We||"educoder.pdf"}&url=${encodeURIComponent(ke)}&disabledDownload=${!!Dt}`}),He==="image"&&dt.createElement("img",{src:`${(ke==null?void 0:ke.indexOf("http://"))>-1||(ke==null?void 0:ke.indexOf("https://"))>-1?"":"data:image/png;base64,"}${ke}`}),(He==="other"||He==="download")&&dt.createElement(dt.Fragment,null,Ht?dt.createElement(Ct.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:dt.createElement(Ke.ZP,{icon:dt.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:wn,disabled:Dt},"\u4E0B\u8F7D")}):dt.createElement(Ke.ZP,{type:"primary",size:"middle",onClick:wn,disabled:Dt},dt.createElement(ut.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},67248:function(Vn,xn,pe){"use strict";pe.d(xn,{Q:function(){return Ct},Z:function(){return Lt}});var ge=pe(59301),Oe={flex_box_center:"flex_box_center___VcCAZ",flex_space_between:"flex_space_between___I3jjO",flex_box_vertical_center:"flex_box_vertical_center___Rm_54",flex_box_center_end:"flex_box_center_end___nTsdc",flex_box_column:"flex_box_column___UVpzN",tags:"tags___kRRoe",text:"text___IyyEa",tagWrap:"tagWrap___v63mB",tag:"tag___X7wE6",c:"c___mZMPq",cpp:"cpp___eaTie",java:"java___gL98T",python:"python___eNRkk",edit:"edit___tbVu0"},Ke=pe(92310),ut=pe.n(Ke),Ge=pe(43418),Xe=pe(8591),Ne=pe(24905),Tt=(dt,Rt,De)=>new Promise((ne,ee)=>{var ce=ve=>{try{he(De.next(ve))}catch(be){ee(be)}},se=ve=>{try{he(De.throw(ve))}catch(be){ee(be)}},he=ve=>ve.done?ne(ve.value):Promise.resolve(ve.value).then(ce,se);he((De=De.apply(dt,Rt)).next())});const Ct=({title:dt="\u8BBE\u7F6E\u7F16\u7A0B\u8BED\u8A00",dataSource:Rt=[],visible:De,setVisible:ne,tip:ee,onOk:ce})=>{const[se,he]=(0,ge.useState)([]),[ve,be]=(0,ge.useState)(!1);return(0,ge.useEffect)(()=>{De&&he(Rt)},[De]),ge.createElement(Ge.default,{centered:!0,open:De,title:dt,confirmLoading:ve,width:564,onOk:()=>Tt(void 0,null,function*(){if(!se.length){Xe.ZP.warning("\u8BF7\u9009\u62E9\u7F16\u7A0B\u8BED\u8A00");return}be(!0),yield ce(se),be(!1)}),onCancel:()=>ne(!1)},!!ee&&ge.createElement("div",{className:"c-grey-666 font16 mb10"},ee),ge.createElement("div",{style:{background:"#F6F7F9",padding:"20px 20px 20px 26px"}},ge.createElement(Ne.default.Group,{value:se,options:[{label:"C\u8BED\u8A00",value:"C"},{label:"C++\u8BED\u8A00",value:"C++",style:{marginLeft:30}},{label:"Java\u8BED\u8A00",value:"Java",style:{marginLeft:30}},{label:"Python\u8BED\u8A00",value:"Python",style:{marginLeft:30}}],onChange:ke=>{he(ke)}})))};var Lt=({title:dt="\u5141\u8BB8\u7F16\u7A0B\u7684\u8BED\u8A00",className:Rt,style:De={},onEdit:ne,dataSource:ee=[]})=>{const ce={C:ge.createElement("div",{className:Oe.c},"C"),"C++":ge.createElement("div",{className:Oe.cpp},"C++"),Java:ge.createElement("div",{className:Oe.java},"Java"),Python:ge.createElement("div",{className:Oe.python},"Python")};return ge.createElement("div",{className:ut()(Oe.tags,Rt),style:De},!!dt&&ge.createElement("div",{className:Oe.text},dt),ge.createElement("div",{className:Oe.tagWrap},ee==null?void 0:ee.map(se=>ge.createElement(ge.Fragment,{key:se},ce[se]))),!!ne&&ge.createElement("div",{onClick:ne,className:`iconfont icon-bianji_Hover ${Oe.edit}`}))}},90502:function(Vn,xn,pe){"use strict";pe.d(xn,{t:function(){return Pe}});var ge=pe(59301),Oe=pe(92832),Ke=pe(78241),ut=pe(43418),Ge=pe(95237),Xe=pe(43604),Ne=pe(5871),Tt=pe(57809),Ct=pe(5112),Ve=pe(41984),Lt=pe(89070),dt=pe(43809),Rt=pe(8591),De=pe(3113),ne=pe(71418),ee=pe(24334),ce={flex_box_center:"flex_box_center___kOQ8P",flex_space_between:"flex_space_between___fY6jt",flex_box_vertical_center:"flex_box_vertical_center___bDSSI",flex_box_center_end:"flex_box_center_end___mQ6mU",flex_box_column:"flex_box_column___F15G0",result:"result___UYRo8",left:"left___TRaH5",right:"right___twp9s",box:"box___vwndt",li:"li___hRe2d"},se=pe(99064),he=pe(88264),ve=pe(12290),be=pe(56102),ke=pe(74440),Be=pe(59301),He=Object.defineProperty,We=Object.defineProperties,rt=Object.getOwnPropertyDescriptors,Qe=Object.getOwnPropertySymbols,Pt=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable,Et=(Fe,Ae,ye)=>Ae in Fe?He(Fe,Ae,{enumerable:!0,configurable:!0,writable:!0,value:ye}):Fe[Ae]=ye,it=(Fe,Ae)=>{for(var ye in Ae||(Ae={}))Pt.call(Ae,ye)&&Et(Fe,ye,Ae[ye]);if(Qe)for(var ye of Qe(Ae))Ze.call(Ae,ye)&&Et(Fe,ye,Ae[ye]);return Fe},Dt=(Fe,Ae)=>We(Fe,rt(Ae)),ht=(Fe,Ae,ye)=>new Promise((qe,vt)=>{var et=yt=>{try{xt(ye.next(yt))}catch(at){vt(at)}},Ye=yt=>{try{xt(ye.throw(yt))}catch(at){vt(at)}},xt=yt=>yt.done?qe(yt.value):Promise.resolve(yt.value).then(et,Ye);xt((ye=ye.apply(Fe,Ae)).next())}),_t=({buttonProps:Fe,buttonText:Ae,form:ye,hackIdentifier:qe="",answerKey:vt,data:et})=>{const[Ye,xt]=(0,ge.useState)(!1),[yt,at]=(0,ge.useState)(!1),[zt,un]=(0,ge.useState)(!1),[fn,Qt]=(0,ge.useState)({}),[Kn,On]=(0,ge.useState)(""),[jt,sn]=(0,ge.useState)(""),jn=(0,ge.useRef)(qe),dn=(0,ge.useRef)(""),Pn=(0,ge.useRef)(!1);(0,ge.useEffect)(()=>{zt&&bi()},[zt]),(0,ge.useEffect)(()=>()=>{sessionStorage.removeItem("projectFill")},[]);const ui=()=>new Date().getTime(),pi=et==null?void 0:et.code,gi=()=>{var Ji,wr;let mr=pi?et==null?void 0:et.code:(Ji=ye.getFieldValue("hack_codes"))==null?void 0:Ji.code,Hi=pi?et==null?void 0:et.answer_content:ye.getFieldValue(vt),Er=pi?et==null?void 0:et.input:(wr=ye.getFieldValue("hack_sets"))==null?void 0:wr.input;Hi==null||Hi.forEach($n=>{const Le=$n.value||$n.answer_text||"";mr=mr.replace(/(@▁@|@▁▁@)/,Le)}),sn(Er),On(mr),Qt({}),un(!0)},bi=()=>ht(void 0,null,function*(){var Ji,wr,mr,Hi;const Er=ui(),$n=pi?et==null?void 0:et.time_limit:(Ji=ye.getFieldsValue())==null?void 0:Ji.hack.time_limit,Le=pi?(wr=et==null?void 0:et.answer_content)==null?void 0:wr.length:(Hi=(mr=ye.getFieldsValue())==null?void 0:mr.standard_answers)==null?void 0:Hi.length;xt(!0),yield(0,he.bM)(dn.current,{test_hack_code:Kn,test_input:jt});function Ei(){return ht(this,null,function*(){const{status:Ri,data:nn}=yield(0,he.rX)(dn.current,"submit"),yi=ui()-Er>($n+3)*1e3*Le;if(Pn.current){if(yi){Rt.ZP.error("\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"),xt(!1);return}if(Ri===0){xt(!1),Qt(Dt(it({},nn),{showText:!0}));return}setTimeout(Ei,1e3)}})}Ei()}),Xi=()=>ht(void 0,null,function*(){var Ji,wr,mr,Hi,Er,$n,Le;if(!et){try{yield ye.validateFields()}catch(di){(mr=(wr=(Ji=di==null?void 0:di.errorFields)==null?void 0:Ji[0])==null?void 0:wr.name)!=null&&mr.includes("standard_answers")?Rt.ZP.error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"):Rt.ZP.error(di.errorFields[0].errors[0]),ye.scrollToField(di.errorFields[0].name,{behavior:"smooth",block:"center"});return}at(!0);let Ri="";const nn=ye.getFieldsValue();jn.current?Ri=yield(0,se.ZP)(`/api/problems/${jn.current}.json`,{method:"put",body:Dt(it({},nn),{hack:Dt(it({},nn==null?void 0:nn.hack),{sub_discipline_id:(Le=($n=nn==null?void 0:nn.hack)==null?void 0:$n.sub_discipline_id)==null?void 0:Le[1],difficult:nn.difficulty,item_banks_group_id:nn.item_banks_group_id}),hack_codes:Dt(it({},nn.hack_codes),{code:ee.Base64.encode(nn.hack_codes.code)}),update_hack_sets:[it({},nn.hack_sets)],is_blank:!0})}):(Ri=yield(0,se.ZP)("/api/problems.json",{method:"post",body:Dt(it({},nn),{hack:Dt(it({},nn==null?void 0:nn.hack),{sub_discipline_id:(Er=(Hi=nn==null?void 0:nn.hack)==null?void 0:Hi.sub_discipline_id)==null?void 0:Er[1],difficult:nn.difficulty,item_banks_group_id:nn.item_banks_group_id}),hack_codes:Dt(it({},nn.hack_codes),{code:ee.Base64.encode(nn.hack_codes.code)}),hack_sets:[it({},nn.hack_sets)],is_blank:!0})}),jn.current=Ri==null?void 0:Ri.identifier,sessionStorage.projectFill=Ri==null?void 0:Ri.identifier)}const Ei=yield(0,se.ZP)(`/api/problems/${jn.current}/start.json`,{method:"get"});if((Ei==null?void 0:Ei.status)===0){dn.current=Ei==null?void 0:Ei.identifier,Pn.current=!0,at(!1),gi();return}at(!1)}),ar=Ji=>{const{status:wr,error_msg:mr,execute_time:Hi,output:Er,input:$n,expected_output:Le}=Ji;let Ei=null;switch(wr){case ke.h.OK:Ei=Be.createElement(Be.Fragment,null,Be.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",Hi/1e3,"\u79D2"),Be.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A\u8C03\u8BD5\u901A\u8FC7"));break;case ke.h.NOMATCH:Ei=Be.createElement(Be.Fragment,null,Be.createElement("div",null,"\u8F93\u5165\uFF1A"),Be.createElement("pre",{style:{fontFamily:"initial"}},$n),Be.createElement("div",null,"\u8F93\u51FA\uFF1A"),Be.createElement("pre",{style:{fontFamily:"initial"}},Er&&ee.Base64.decode(Er)),Be.createElement("div",null,"\u9884\u671F\u8F93\u51FA\uFF1A"),Be.createElement("pre",{style:{fontFamily:"initial"}},Le&&ee.Base64.decode(Le)));break;case ke.h.EXECUTEFAILURE:Ei=Be.createElement(Be.Fragment,null,Be.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",Be.createElement("pre",null,$n)),Be.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),Be.createElement("pre",{className:"error"},ee.Base64.decode(mr)));break;case ke.h.COMPILEFAILURE:Ei=Be.createElement(Be.Fragment,null,Be.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",Be.createElement("pre",null,$n)),Be.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),Be.createElement("pre",{className:"error"},ee.Base64.decode(mr)));break;case ke.h.PODFAILURE:Ei=Be.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case ke.h.TIMEOUT:Ei=Be.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return Be.createElement(Be.Fragment,null," ",Ei," ")};return Be.createElement("div",null,Be.createElement(De.ZP,Dt(it({loading:yt},Fe),{onClick:Xi}),Ae),Be.createElement(ut.default,{open:zt,title:"\u8C03\u8BD5\u4EE3\u7801",destroyOnClose:!0,width:1200,okText:"\u8FD0\u884C\u6D4B\u8BD5",confirmLoading:Ye,cancelButtonProps:{style:{display:"none"}},onOk:()=>bi(),onCancel:()=>{Pn.current=!1,un(!1)}},Be.createElement("div",{className:ce.result},Be.createElement("div",{className:ce.left},Be.createElement("div",{className:"mb20"},Be.createElement("span",{className:"c-black"},"\u6267\u884C\u4EE3\u7801"),!et&&Be.createElement(be.CopyToClipboard,{text:Kn,onCopy:()=>Rt.ZP.success("\u590D\u5236\u6210\u529F")},Be.createElement("span",{style:{float:"right"},className:"current c-light-primary"},Be.createElement("i",{className:"iconfont icon-fuzhi8 mr5"}),"\u590D\u5236"))),Be.createElement(ve.Z,{height:510,className:"mb0",hidetoolBar:!0,defaultValue:Kn,onChange:Ji=>On(Ji)})),Be.createElement("div",{className:ce.right},Be.createElement("div",{className:"c-black mb20"},"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B"),Be.createElement("div",{className:ce.box},Be.createElement("div",{className:ce.li},Be.createElement(Oe.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165",value:jt,onChange:Ji=>sn(Ji.target.value),bordered:!1,style:{height:180}}))),Be.createElement("div",{className:"c-black mb20 mt30"},"\u4EE3\u7801\u6267\u884C\u7ED3\u679C"),Be.createElement("div",{className:ce.box},Be.createElement(ne.Z,{spinning:Ye,tip:"\u4EE3\u7801\u6267\u884C\u4E2D"},Be.createElement("div",{className:ce.li,style:{height:196,overflow:"auto",padding:10}},ar(fn))))))))},Vt=pe(87169),ot=pe(59301),Ue=Object.defineProperty,Wt=Object.defineProperties,Ln=Object.getOwnPropertyDescriptors,Fn=Object.getOwnPropertySymbols,Gt=Object.prototype.hasOwnProperty,rn=Object.prototype.propertyIsEnumerable,An=(Fe,Ae,ye)=>Ae in Fe?Ue(Fe,Ae,{enumerable:!0,configurable:!0,writable:!0,value:ye}):Fe[Ae]=ye,ni=(Fe,Ae)=>{for(var ye in Ae||(Ae={}))Gt.call(Ae,ye)&&An(Fe,ye,Ae[ye]);if(Fn)for(var ye of Fn(Ae))rn.call(Ae,ye)&&An(Fe,ye,Ae[ye]);return Fe},Sn=(Fe,Ae)=>Wt(Fe,Ln(Ae)),Yn=(Fe,Ae)=>{var ye={};for(var qe in Fe)Gt.call(Fe,qe)&&Ae.indexOf(qe)<0&&(ye[qe]=Fe[qe]);if(Fe!=null&&Fn)for(var qe of Fn(Fe))Ae.indexOf(qe)<0&&rn.call(Fe,qe)&&(ye[qe]=Fe[qe]);return ye};const{TextArea:It}=Oe.default,wn=[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"}],Gn=({value:Fe,onChange:Ae})=>ot.createElement(Switch,{checked:Fe,onChange:ye=>{Ae(ye)}}),ze="@\u2581@",Ee="@\u2581\u2581@",Pe=({questionTitlePlaceholder:Fe,form:Ae,scoreByBlank:ye=!1,hackidentifier:qe,answerKey:vt})=>{const[et,Ye]=(0,ge.useState)(!1),[xt,yt]=(0,ge.useState)(!1),zt=(0,Lt.useParams)().type==="edit",un=(dn,Pn)=>{const ui=Pn.line;let pi=0;for(let bi=0;bi<ui;bi++)pi+=dn.getLine(bi).split(ze).length-1;for(let bi=0;bi<ui;bi++)pi+=dn.getLine(bi).split(Ee).length-1;const gi=dn.getLine(ui).substring(0,Pn.ch);return pi+=gi.split(ze).length-1,pi+=gi.split(Ee).length-1,pi},fn=(dn,Pn,ui,pi)=>{const gi=dn.getRange(Pn.from,Pn.to);let bi=0;if(Pn.text.forEach(Xi=>{bi+=Xi.split(ze).length-1}),Pn.text.forEach(Xi=>{bi+=Xi.split(Ee).length-1}),Pn.origin!=="setValue"){if(gi&&(gi.indexOf(ze)!==-1||gi.indexOf(Ee)!==-1)){const Xi=gi.split(ze).length-1+gi.split(Ee).length-1,ar=un(dn,Pn.from);if(console.log(`\u5220\u9664${Xi}\u4E2A\uFF0C \u524D\u9762\u6709${ar}\u4E2A\uFF0C\u65B0\u589E${bi}\u4E2A`),Xi>1){const Ji=Array.from({length:Xi},(wr,mr)=>ar+mr);pi(Ji)}else pi(ar)}else if(bi>0){const Xi=un(dn,Pn.from);console.log(`\u65B0\u589E${bi}\u4E2A\uFF0C\u4E4B\u524D\u6709${Xi}\u4E2A`),ui(bi,Xi)}}},Qt=()=>{const dn=Ae.getFieldValue(vt);Ae.setFieldsValue({[vt]:dn==null?void 0:dn.map((Pn,ui)=>Sn(ni({},Pn),{position:ui+1}))})},Kn=(0,ge.useRef)(),On=(dn,Pn)=>{for(let ui=0;ui<dn;ui++)Kn.current({position:null,answer_text:""},Pn+ui);Qt()},jt=(0,ge.useRef)(),sn=dn=>{jt.current(dn),Qt()},jn=Ke.default.useWatch(vt,Ae);return ot.createElement("div",{className:dt.Z.wrap},ot.createElement(Ke.default.Item,{label:"\u8BD5\u9898\u63CF\u8FF0",name:["hack","description"],style:{display:"table"},className:"w100",labelCol:{span:24},rules:[{required:!0}]},ot.createElement(Ve.h,{scrollId:"name",watch:!0,height:140})),ot.createElement("div",{className:dt.Z.questionTitleEditorWrap},ot.createElement(Ke.default.Item,{label:"\u7A0B\u5E8F\u4EE3\u7801",name:["hack_codes","code"],labelCol:{span:24},rules:[{required:!0}]},ot.createElement(Ve.h,{scrollId:"name",watch:!0,height:400,showNullProgramButton:!0,onChange:(dn,Pn)=>{const ui=Ae.getFieldValue(vt);console.log("--preAnswerData",ui,Pn),Ae.setFieldsValue({[vt]:ui==null?void 0:ui.map((pi,gi)=>{var bi;return Sn(ni({},pi),{position:gi+1,multi_line:(bi=Pn==null?void 0:Pn[gi])==null?void 0:bi.multiLine})})})},placeholder:Fe,onCMBeforeChange:(dn,Pn)=>{fn(dn,Pn,On,sn)}}))),ot.createElement(Ke.default.List,{name:vt,rules:[{validator(dn,Pn){if(!(Pn!=null&&Pn.length))return Promise.reject(new Error("\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"));for(const ui of Pn){const{answer_text:pi}=ui||{};if((pi==null?void 0:pi.length)===0)return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(dn,{add:Pn,remove:ui},{errors:pi})=>(Kn.current=Pn,jt.current=ui,ot.createElement(ot.Fragment,null,ot.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},ot.createElement(Ke.default.Item,{label:"\u586B\u7A7A\u9879\u7B54\u6848",required:!0,labelCol:{span:24}}),ot.createElement("div",{onClick:()=>{ut.default.warning({title:"\u7ED9\u5206\u8BF4\u660E",icon:null,width:700,centered:!0,content:ot.createElement("div",null,ot.createElement("div",null,"1.\u5B66\u751F\u586B\u5199\u7B54\u6848\u4E4B\u540E\uFF0C\u5FC5\u987B\u63D0\u4EA4\u4EE3\u7801",ot.createElement("span",{style:{color:"#e30000"}},"\u8FDB\u884C\u8BC4\u6D4B"),"\u624D\u80FD\u5F97\u5206\u3002"),ot.createElement("div",{style:{marginTop:10}},"2.\u8BD5\u9898\u7B97\u5206\u65F6\uFF0C\u7CFB\u7EDF\u4F1A\u5C06\u7A0B\u5E8F\u91CC\u9762\u7684\u6240\u6709\u7A7A\u66FF\u6362\u6210\u5B66\u751F\u7684\u7B54\u6848\u8FDB\u884C\u8BC4\u6D4B\u3002\u8F93\u51FA\u7684\u7ED3\u679C\u4E0E\u6D4B\u8BD5\u96C6\u6BD4\u5BF9\uFF0C\u5B8C\u5168\u6B63\u786E\u5219\u5F97\u6EE1\u5206\uFF1B\u82E5\u4E0D\u5B8C\u5168\u6B63\u786E\uFF0C\u5219\u4F9D\u6B21\u5C06\u6BCF\u4E2A\u7A7A\u6362\u6210\u5B66\u751F\u63D0\u4EA4\u7684\u7B54\u6848\uFF0C\u540C\u65F6\u5C06\u5176\u4ED6\u7A7A\u66FF\u6362\u6210\u6807\u51C6\u7B54\u6848\uFF0C\u8FD0\u884C\u7A0B\u5E8F\u3002\u5982\u679C\u8FD9\u4E2A\u7A7A\u7684\u5B66\u751F\u7B54\u6848\u4E0E\u6807\u51C6\u7B54\u6848\u7ED3\u5408\u80FD\u5F97\u5230\u6B63\u786E\u8F93\u51FA\uFF0C\u5219\u8FD9\u4E2A\u7A7A\u5F97\u5230\u8BE5\u7A7A\u7684\u6EE1\u5206\uFF0C\u5426\u5219\u8BE5\u7A7A\u5F970\u5206\u3002"))})},style:{minHeight:32,color:"#3061D0",cursor:"pointer"}},ot.createElement(Vt.Z,{style:{marginRight:3,color:"#3061D0"}}),ot.createElement("span",null," \u7ED9\u5206\u8BF4\u660E"))),dn.map((gi,bi)=>{var Xi=gi,{key:ar,name:Ji}=Xi,wr=Yn(Xi,["key","name"]),mr,Hi;return ot.createElement(Ge.Z,{className:"mb20",key:ar,align:"middle",wrap:!1},ot.createElement(Xe.Z,{flex:"0 0 auto",className:`${dt.Z.blankIndex}`},"\u586B\u7A7A\u9879",bi+1),ot.createElement(Xe.Z,{flex:1},ot.createElement(Ge.Z,{align:"top",justify:"space-between",wrap:!1},ot.createElement(Xe.Z,null,ot.createElement(Ke.default.Item,Sn(ni({},wr),{name:[Ji,"answer_text"],noStyle:!0}),(mr=jn==null?void 0:jn[Ji])!=null&&mr.multi_line||(Hi=jn==null?void 0:jn[Ji])!=null&&Hi.multiLine?ot.createElement(It,{spellCheck:!1,style:{marginLeft:10,width:550}}):ot.createElement(Oe.default,{style:{marginLeft:10,width:550},className:dt.Z.blankInput,size:"large",maxLength:1e3,onBlur:Er=>{}}))),ye&&ot.createElement(Xe.Z,{flex:"224px"},ot.createElement(Ke.default.Item,Sn(ni({},wr),{name:[Ji,"score"],label:"\u5206\u503C",rules:[{required:!0}]}),ot.createElement(Ne.Z,{size:"large",className:dt.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5206\u503C"}))))))})))),ot.createElement("div",{onClick:()=>Ye(!0)},ot.createElement(Ke.default.Item,{name:["hack","analysis"],label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ot.createElement(Ve.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:et}))),ot.createElement(Ke.default.Item,{label:"\u7F16\u7A0B\u8BED\u8A00",style:{marginTop:30},name:["hack_codes","language"],labelCol:{span:24},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u7F16\u7A0B\u8BED\u8A00"}]},ot.createElement(Tt.default,{size:"large"},wn.map(dn=>ot.createElement(Tt.default.Option,{key:dn.title,value:dn.key}," ",dn.title)))),ot.createElement(Ke.default.Item,{label:"\u6700\u5927\u8BC4\u6D4B\u65F6\u957F\uFF08\u79D2\uFF09",style:{marginTop:30},labelCol:{span:24},required:!0},ot.createElement(Ke.default.Item,{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:3,message:"\u6700\u5C0F\u9650\u5236\u65F6\u95F4\u662F3\u79D2"}],noStyle:!0},ot.createElement(Ne.Z,{precision:0,max:10,min:3,size:"large",style:{width:"97%"}})),ot.createElement("span",{className:"ml10 font14"},"\u79D2")),ot.createElement(Ke.default.Item,{label:"\u8BC4\u6D4B\u65F6\u7A7A\u683C\u5904\u7406",style:{marginTop:30},name:["hack","submit_rule"],labelCol:{span:24},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BC4\u6D4B\u65F6\u7A7A\u683C\u5904\u7406"}]},ot.createElement(Ct.ZP.Group,{style:{marginTop:-10}},ot.createElement(Ct.ZP,{value:0},"\u4E0D\u5FFD\u7565\u7A7A\u683C"),ot.createElement(Ct.ZP,{value:1},"\u5FFD\u7565\u9996\u5C3E\u7A7A\u683C"),ot.createElement(Ct.ZP,{value:2},"\u5FFD\u7565\u6240\u6709\u7A7A\u683C"))),ot.createElement(Ke.default.Item,{label:"\u6D4B\u8BD5\u7528\u4F8B",required:!0,style:{marginTop:30}}),ot.createElement("div",{style:{background:"#F6F7F9",padding:15}},ot.createElement(Ke.default.Item,{label:"\u8F93\u5165",labelCol:{span:24},name:["hack_sets","input"]},ot.createElement(It,{rows:4})),ot.createElement(Ke.default.Item,{label:"\u8F93\u51FA",labelCol:{span:24},name:["hack_sets","output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},ot.createElement(It,{rows:4}))),ot.createElement(_t,{form:Ae,answerKey:vt,hackIdentifier:qe,buttonText:"\u8FD0\u884C\u8C03\u8BD5",buttonProps:{ghost:!0,icon:ot.createElement("i",{className:"iconfont icon-ceshi"}),style:{background:"rgba(55,173,131,0.05)",borderRadius:19,border:"1px solid #37AD83",width:116,height:38,display:"inline-flex",fontSize:14,alignItems:"center",justifyContent:"center",marginTop:20,cursor:"pointer",color:"#37AD83"}}}))}},65357:function(Vn,xn,pe){"use strict";pe.d(xn,{u:function(){return Be}});var ge=pe(59301),Oe=pe(95237),Ke=pe(43604),ut=pe(6848),Ge=pe(78241),Xe=pe(43809),Ne=pe(32134),Tt=pe(12893),Ct=pe(41984),Ve=pe(59301),Lt=Object.defineProperty,dt=Object.defineProperties,Rt=Object.getOwnPropertyDescriptors,De=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ce=(He,We,rt)=>We in He?Lt(He,We,{enumerable:!0,configurable:!0,writable:!0,value:rt}):He[We]=rt,se=(He,We)=>{for(var rt in We||(We={}))ne.call(We,rt)&&ce(He,rt,We[rt]);if(De)for(var rt of De(We))ee.call(We,rt)&&ce(He,rt,We[rt]);return He},he=(He,We)=>dt(He,Rt(We)),ve=(He,We)=>{var rt={};for(var Qe in He)ne.call(He,Qe)&&We.indexOf(Qe)<0&&(rt[Qe]=He[Qe]);if(He!=null&&De)for(var Qe of De(He))We.indexOf(Qe)<0&&ee.call(He,Qe)&&(rt[Qe]=He[Qe]);return rt};const be=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],ke=({value:He,onChange:We,choiceTextKey:rt,answerKey:Qe,index:Pt,isEdit:Ze,setInputActive:Et,form:it,choiceOptionsPath:Dt,allowChangeMode:ht,showAddIcon:Ht,addItem:_t,deleteItem:Vt})=>{console.log(He,"value");const ot=(He==null?void 0:He[Qe])===1,Ue=()=>{const Ln=it.getFieldValue(Dt);it.setFieldValue(Dt,Ln.map(Fn=>he(se({},Fn),{[Qe]:0})))},Wt=()=>{ot?We(he(se({},He),{[Qe]:0})):(ht||Ue(),We(he(se({},He),{[Qe]:1})))};return Ve.createElement(Oe.Z,{className:Xe.Z.choiceWrap,align:"middle",wrap:!1},Ve.createElement(Ke.Z,{onClick:Wt,className:`${Xe.Z.choiceIndex} ${ot?Xe.Z.activeAnswer:""}`},be[Pt]),Ve.createElement(Ke.Z,{flex:1,className:`${Xe.Z.editorWrap} ml15`,onClick:Et},Ve.createElement(Ct.x,{height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",isEdit:Ze,value:He==null?void 0:He[rt],onChange:Ln=>{We(he(se({},He),{[rt]:Ln}))}})),Ve.createElement(Ke.Z,{flex:"0 0 auto",className:"ml15"},Ve.createElement("div",{onClick:Wt,className:`${Xe.Z.setAnswerBtn} ${ot?Xe.Z.activeAnswer:""}`},ot?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")),Ve.createElement(Ke.Z,{className:Xe.Z.actionWrapper},Ve.createElement(ut.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},Ve.createElement(Ne.Z,{className:Xe.Z.addIcon,onClick:_t,style:{visibility:Ht?"visible":"hidden"}})),Ve.createElement(ut.Z,{title:"\u5220\u9664"},Ve.createElement(Tt.Z,{className:Xe.Z.deleteIcon,onClick:Vt,style:{visibility:Pt>1?"visible":"hidden"}}))))},Be=({questionTitlePlaceholder:He,titleKey:We,choiceKey:rt,analysisKey:Qe,choiceTextKey:Pt,answerKey:Ze,choiceOptionsPath:Et,allowChangeMode:it=!0,form:Dt,showAnalysis:ht=!0})=>{const[Ht,_t]=(0,ge.useState)(),[Vt,ot]=(0,ge.useState)(!1);return Ve.createElement("div",{className:Xe.Z.wrap},Ve.createElement("div",{className:Xe.Z.questionTitleEditorWrap},Ve.createElement(Ge.default.Item,{label:"\u9898\u5E72",name:We,labelCol:{span:24},rules:[{required:!0}]},Ve.createElement(Ct.h,{scrollId:Array.isArray(We)?We.join("_"):`${We}`,watch:!0,height:140,placeholder:He}))),Ve.createElement(Ge.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),Ve.createElement(Ge.default.List,{name:rt,rules:[{validator(Ue,Wt){const Ln=Wt.some(Gt=>Gt[Ze]===1),Fn=Wt.findIndex(Gt=>{var rn;return((rn=Gt[Pt])==null?void 0:rn.length)<=0});return Fn!==-1?Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${be[Fn]}\u9009\u9879\u7684\u5185\u5BB9`)):Ln?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},(Ue,{add:Wt,remove:Ln})=>Ve.createElement("div",{id:Array.isArray(Et)?Et.join("_"):`${Et}`},Ue.map((Fn,Gt)=>{var rn=Fn,{key:An,name:ni}=rn,Sn=ve(rn,["key","name"]);const Yn=Ht===An,It=()=>{_t(An)},wn=Gt<7&&Gt===Ue.length-1,Gn=()=>Wt({[Pt]:"",[Ze]:0}),ze=()=>Ln(ni);return Ve.createElement(Ge.default.Item,he(se({},Sn),{key:An,name:ni,className:Xe.Z.choiceListWrap,rules:[{validator(Ee,Pe){return Pe!=null&&Pe.choice_text?Promise.resolve():Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${be[Gt]}\u9009\u9879\u7684\u5185\u5BB9`))}}]}),Ve.createElement(ke,{choiceTextKey:Pt,answerKey:Ze,index:Gt,isEdit:Yn,setInputActive:It,form:Dt,choiceOptionsPath:Et,allowChangeMode:it,showAddIcon:wn,addItem:Gn,deleteItem:ze}))}),Ue.length<8&&Ve.createElement("div",{className:`${Xe.Z.addBtn} mb30`,onClick:()=>Wt({[Pt]:"",[Ze]:0})},"\u6DFB\u52A0\u9009\u9879"))),ht&&Ve.createElement("div",{onClick:()=>ot(!0)},Ve.createElement(Ge.default.Item,{name:Qe,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Ve.createElement(Ct.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Vt}))))}},70472:function(Vn,xn,pe){"use strict";pe.d(xn,{u:function(){return it}});var ge=pe(59301),Oe=pe(43418),Ke=pe(95237),ut=pe(43604),Ge=pe(92832),Xe=pe(6848),Ne=pe(78673),Tt=pe(78241),Ct=pe(5112),Ve=pe(5871),Lt=pe(41984),dt=pe(12893),Rt=pe(61485),De=pe(43809),ne=pe(59879),ee=pe(59301),ce=Object.defineProperty,se=Object.defineProperties,he=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,be=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable,Be=(Dt,ht,Ht)=>ht in Dt?ce(Dt,ht,{enumerable:!0,configurable:!0,writable:!0,value:Ht}):Dt[ht]=Ht,He=(Dt,ht)=>{for(var Ht in ht||(ht={}))be.call(ht,Ht)&&Be(Dt,Ht,ht[Ht]);if(ve)for(var Ht of ve(ht))ke.call(ht,Ht)&&Be(Dt,Ht,ht[Ht]);return Dt},We=(Dt,ht)=>se(Dt,he(ht)),rt=(Dt,ht)=>{var Ht={};for(var _t in Dt)be.call(Dt,_t)&&ht.indexOf(_t)<0&&(Ht[_t]=Dt[_t]);if(Dt!=null&&ve)for(var _t of ve(Dt))ht.indexOf(_t)<0&&ke.call(Dt,_t)&&(Ht[_t]=Dt[_t]);return Ht};const Qe=({value:Dt,onChange:ht})=>{const Ht=Vt=>{Oe.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:De.Z.modal,onOk:()=>{const ot=[...Dt];ot.splice(Vt,1),ht(ot)}})},_t=()=>{const Vt=[...Dt];Vt.push(""),ht(Vt)};return ee.createElement(Ke.Z,{className:"ml20"},ee.createElement(ut.Z,{flex:1},Dt==null?void 0:Dt.map((Vt,ot)=>ee.createElement(Ke.Z,{key:`${Vt}_${ot}`,className:"mb20"},ee.createElement(Ge.default.TextArea,{style:{flex:1,minHeight:44},defaultValue:Vt,autoSize:{maxRows:3},maxLength:1e3,onBlur:Ue=>{const Wt=[...Dt],Ln=Ue.target.value.trim();Wt[ot]=Ln,ht(Wt)}}),ee.createElement(Xe.Z,{title:"\u5220\u9664"},ee.createElement(dt.Z,{className:De.Z.deleteIcon,style:{marginLeft:15,visibility:ot>0?"visible":"hidden"},onClick:()=>Ht(ot)}))))),ee.createElement(ut.Z,null,ee.createElement("div",{className:`${De.Z.addBtn}`,onClick:()=>{_t()}},"\u65B0\u589E\u7B54\u6848")))},Pt=({value:Dt,onChange:ht})=>{const Ht=Vt=>{Oe.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:De.Z.modal,onOk:()=>{const ot=[...Dt];ot.splice(Vt,1),ht(ot)}})},_t=()=>{const Vt=[...Dt];Vt.push(""),ht(Vt)};return ee.createElement(Ke.Z,{className:"ml20"},ee.createElement(ut.Z,{flex:1},Dt==null?void 0:Dt.map((Vt,ot)=>ee.createElement(Ke.Z,{key:`${Vt}_${ot}`,align:"middle",className:"mb20"},ee.createElement(ne.Z,{value:Vt,style:{flex:1},onChange:Ue=>{const Wt=[...Dt];Wt[ot]=Ue,ht(Wt)}}),ee.createElement(Xe.Z,{title:"\u5220\u9664"},ee.createElement(dt.Z,{className:De.Z.deleteIcon,style:{marginLeft:15,visibility:ot>0?"visible":"hidden"},onClick:()=>Ht(ot)}))))),ee.createElement(ut.Z,null,ee.createElement("div",{className:`${De.Z.addBtn}`,onClick:()=>{_t()}},"\u65B0\u589E\u7B54\u6848")))},Ze=({value:Dt=!0,onChange:ht})=>ee.createElement(Ne.Z,{checked:!Dt,onChange:Ht=>{ht(!Ht)}}),Et="\u2581",it=({questionTitlePlaceholder:Dt,form:ht,scoreByBlank:Ht=!1,answerKey:_t})=>{const[Vt,ot]=(0,ge.useState)(!1),Ue=(Sn,Yn)=>{const It=Yn.line;let wn=0;for(let ze=0;ze<It;ze++)wn+=Sn.getLine(ze).split(Et).length-1;const Gn=Sn.getLine(It).substring(0,Yn.ch);return wn+=Gn.split(Et).length-1,wn},Wt=(Sn,Yn,It,wn)=>{const Gn=Sn.getRange(Yn.from,Yn.to);let ze=0;if(Yn.text.forEach(Ee=>{ze+=Ee.split(Et).length-1}),Yn.origin!=="setValue"){if(Gn&&Gn.indexOf(Et)!==-1){const Ee=Gn.split(Et).length-1,Pe=Ue(Sn,Yn.from);if(console.log(`\u5220\u9664${Ee}\u4E2A\uFF0C \u524D\u9762\u6709${Pe}\u4E2A\uFF0C\u65B0\u589E${ze}\u4E2A`),Ee>1){const Fe=Array.from({length:Ee},(Ae,ye)=>Pe+ye);wn(Fe)}else wn(Pe)}else if(ze>0){const Ee=Ue(Sn,Yn.from);console.log(`\u65B0\u589E${ze}\u4E2A\uFF0C\u4E4B\u524D\u6709${Ee}\u4E2A`),It(ze,Ee)}}},Ln=()=>{const Sn=ht.getFieldValue(_t);ht.setFieldsValue({[_t]:Sn.map((Yn,It)=>We(He({},Yn),{position:It+1}))})},Fn=(0,ge.useRef)(),Gt=(Sn,Yn)=>{for(let It=0;It<Sn;It++)Fn.current({position:null,answer_text:[""],model:1},Yn+It);Ln()},rn=(0,ge.useRef)(),An=Sn=>{rn.current(Sn),Ln()},ni=Tt.default.useWatch(_t,ht);return ee.createElement("div",{className:De.Z.wrap},ee.createElement("div",{className:De.Z.questionTitleEditorWrap},ee.createElement(Tt.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},ee.createElement(Lt.h,{scrollId:"name",watch:!0,height:140,placeholder:Dt,showNullButton:!0,onCMBeforeChange:(Sn,Yn)=>{Wt(Sn,Yn,Gt,An)}}))),ee.createElement(Tt.default.List,{name:_t,rules:[{validator(Sn,Yn){if(!(Yn!=null&&Yn.length))return Promise.reject(new Error("\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879"));for(const It of Yn){const{answer_text:wn}=It||{};if(wn!=null&&wn.some(Gn=>(Gn==null?void 0:Gn.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(Sn,{add:Yn,remove:It},{errors:wn})=>(Fn.current=Yn,rn.current=It,ee.createElement(ee.Fragment,null,ee.createElement(Tt.default.Item,{label:ee.createElement("span",null,"\u586B\u7A7A\u9879\u7B54\u6848",!(Sn!=null&&Sn.length)&&ee.createElement("span",{style:{color:"#E99237"}},"\uFF08\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879\uFF09")),required:!0,labelCol:{span:24}}),Sn.map((Gn,ze)=>{var Ee=Gn,{key:Pe,name:Fe}=Ee,Ae=rt(Ee,["key","name"]),ye,qe;return ee.createElement("div",{style:{marginBottom:10},key:Pe},ee.createElement(Ke.Z,{className:"mb20",align:"middle",wrap:!1},ee.createElement(ut.Z,{style:{marginRight:10},flex:"0 0 auto",className:`${De.Z.blankIndex}`},"\u586B\u7A7A\u9879",ze+1),ee.createElement(Tt.default.Item,We(He({},Ae),{name:[Fe,"model"],noStyle:!0}),ee.createElement(Ct.ZP.Group,{onChange:()=>{const vt=ht.getFieldValue(_t);ht.setFieldsValue({[_t]:vt.map((et,Ye)=>We(He({},et),{answer_text:Fe===Ye?[""]:et.answer_text}))})}},ee.createElement(Ct.ZP,{value:1},"\u6587\u672C\u6A21\u5F0F ",ee.createElement(Xe.Z,{title:"\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9700\u8981\u5728\u6587\u672C\u6846\u4E2D\u586B\u5199\u6587\u672C\u7B54\u6848"},ee.createElement(Rt.Z,null))),ee.createElement(Ct.ZP,{value:2},"\u6570\u5B66\u516C\u5F0F\u6A21\u5F0F ",ee.createElement(Xe.Z,{title:"\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9700\u8981\u7F16\u5199\u6570\u5B66\u516C\u5F0F\u4F5C\u4E3A\u7B54\u6848"},ee.createElement(Rt.Z,null)))))),ee.createElement(Ke.Z,{style:{marginLeft:20},align:"middle",wrap:!1},ee.createElement(ut.Z,{flex:1},ee.createElement(Ke.Z,{align:"top",justify:"space-between",wrap:!1},ee.createElement(ut.Z,{flex:1},ee.createElement(Tt.default.Item,We(He({},Ae),{name:[Fe,"answer_text"],noStyle:!0}),((qe=(ye=ht.getFieldValue(_t))==null?void 0:ye[Fe])==null?void 0:qe.model)===1?ee.createElement(Qe,null):ee.createElement(Pt,null))),Ht&&ee.createElement(ut.Z,{flex:"224px",style:{margin:"-7px 0 0 20px"}},ee.createElement(Tt.default.Item,We(He({},Ae),{name:[Fe,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:De.Z.blankInputNumberWrapper}),ee.createElement(Ve.Z,{min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5206\u503C"})))),ee.createElement(Tt.default.Item,We(He({},Ae),{name:[Fe,"position"],noStyle:!0}),ee.createElement(Ge.default,{type:"hidden"})))))})))),ee.createElement(Ke.Z,{align:"middle"},ee.createElement(Tt.default.Item,{name:"downcase",valuePropName:"checked"},ee.createElement(Ne.Z,null)),ee.createElement(ut.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),ee.createElement(Ke.Z,{align:"middle"},ee.createElement(Tt.default.Item,{name:"no_space",valuePropName:"checked"},ee.createElement(Ne.Z,null)),ee.createElement(ut.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(ni==null?void 0:ni.length)>1&&ee.createElement(Ke.Z,{align:"middle",className:(ni==null?void 0:ni.length)>1?"mb30":`${De.Z.hide}`},ee.createElement(Tt.default.Item,{name:"is_ordered"},ee.createElement(Ze,null)),ee.createElement(ut.Z,{className:"ml10"},"\u5141\u8BB8\u5B66\u751F\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u4E0E\u6807\u51C6\u7B54\u6848\u7684\u987A\u5E8F\u4E0D\u4E00\u81F4")),ee.createElement("div",{onClick:()=>ot(!0)},ee.createElement(Tt.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ee.createElement(Lt.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Vt}))))}},11832:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return ve}});var ge=pe(59301),Oe=pe(95237),Ke=pe(43604),ut=pe(78241),Ge=pe(43809),Xe=pe(41984),Ne=pe(59301),Tt=Object.defineProperty,Ct=Object.defineProperties,Ve=Object.getOwnPropertyDescriptors,Lt=Object.getOwnPropertySymbols,dt=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable,De=(be,ke,Be)=>ke in be?Tt(be,ke,{enumerable:!0,configurable:!0,writable:!0,value:Be}):be[ke]=Be,ne=(be,ke)=>{for(var Be in ke||(ke={}))dt.call(ke,Be)&&De(be,Be,ke[Be]);if(Lt)for(var Be of Lt(ke))Rt.call(ke,Be)&&De(be,Be,ke[Be]);return be},ee=(be,ke)=>Ct(be,Ve(ke)),ce=(be,ke)=>{var Be={};for(var He in be)dt.call(be,He)&&ke.indexOf(He)<0&&(Be[He]=be[He]);if(be!=null&&Lt)for(var He of Lt(be))ke.indexOf(He)<0&&Rt.call(be,He)&&(Be[He]=be[He]);return Be};const se={\u6B63\u786E:"T",\u9519\u8BEF:"F"},he=({value:be,onChange:ke,form:Be})=>{const He=(be==null?void 0:be.is_answer)===1,We=be==null?void 0:be.choice_text,rt=()=>{const Qe=Be.getFieldsValue().choices.map(Pt=>({choice_text:Pt.choice_text,is_answer:0}));Be.setFieldsValue({choices:Qe}),ke(ee(ne({},be),{is_answer:1}))};return Ne.createElement(Oe.Z,{className:Ge.Z.choiceWrap,align:"middle",wrap:!1,style:{marginBottom:"20px"}},Ne.createElement(Ke.Z,{onClick:rt,className:`${Ge.Z.choiceIndex} ${Ge.Z.judgementIndex} ${He?Ge.Z.activeAnswer:""}`},se[We]),Ne.createElement(Ke.Z,{flex:1,className:`${Ge.Z.editorWrap} ml15`},Ne.createElement("div",{className:`${Ge.Z.inputBorder} ${Ge.Z.placeholder} ${He?Ge.Z.activeJudgementAnswer:""}`},We)),Ne.createElement(Ke.Z,{flex:"0 0 auto",className:"ml15"},Ne.createElement("div",{onClick:rt,className:`${Ge.Z.setAnswerBtn} ${He?Ge.Z.activeAnswer:""}`},He?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},ve=({questionTitlePlaceholder:be,choiceKey:ke,form:Be})=>{const[He,We]=(0,ge.useState)(!1);return Ne.createElement("div",{className:Ge.Z.wrap},Ne.createElement("div",{className:Ge.Z.questionTitleEditorWrap},Ne.createElement(ut.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},Ne.createElement(Xe.h,{scrollId:"name",watch:!0,height:140,placeholder:be}))),Ne.createElement(ut.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},Ne.createElement(ut.default.List,{name:"choices",rules:[{validator(rt,Qe){return Qe.some(Ze=>(Ze==null?void 0:Ze.is_answer)===1)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},rt=>Ne.createElement("div",{id:"choices"},rt.map(Qe=>{var Pt=Qe,{key:Ze,name:Et}=Pt,it=ce(Pt,["key","name"]);return Ne.createElement(ut.default.Item,ee(ne({},it),{key:Ze,name:Et,noStyle:!0}),Ne.createElement(he,{form:Be}))})))),Ne.createElement("div",{onClick:()=>We(!0)},Ne.createElement(ut.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Ne.createElement(Xe.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:He}))))}},41984:function(Vn,xn,pe){"use strict";pe.d(xn,{h:function(){return ne},x:function(){return ee}});var ge=pe(12290),Oe=pe(43809),Ke=pe(85149),ut=pe(59301),Ge=Object.defineProperty,Xe=Object.defineProperties,Ne=Object.getOwnPropertyDescriptors,Tt=Object.getOwnPropertySymbols,Ct=Object.prototype.hasOwnProperty,Ve=Object.prototype.propertyIsEnumerable,Lt=(ce,se,he)=>se in ce?Ge(ce,se,{enumerable:!0,configurable:!0,writable:!0,value:he}):ce[se]=he,dt=(ce,se)=>{for(var he in se||(se={}))Ct.call(se,he)&&Lt(ce,he,se[he]);if(Tt)for(var he of Tt(se))Ve.call(se,he)&&Lt(ce,he,se[he]);return ce},Rt=(ce,se)=>Xe(ce,Ne(se)),De=(ce,se)=>{var he={};for(var ve in ce)Ct.call(ce,ve)&&se.indexOf(ve)<0&&(he[ve]=ce[ve]);if(ce!=null&&Tt)for(var ve of Tt(ce))se.indexOf(ve)<0&&Ve.call(ce,ve)&&(he[ve]=ce[ve]);return he};const ne=ce=>{var se=ce,{value:he,onChange:ve,scrollId:be}=se,ke=De(se,["value","onChange","scrollId"]);return ut.createElement("div",{id:be||""},ut.createElement(ge.Z,Rt(dt({},ke),{defaultValue:he,onChange:(Be,He)=>{He!=null&&He.length?ve(Be,He):ve(Be)}})))},ee=({value:ce,onChange:se,placeholder:he,height:ve=140,isEdit:be,miniToolbar:ke,watch:Be=!0})=>be?ut.createElement(ge.Z,{watch:Be,isFocus:!0,height:ve||void 0,placeholder:he,defaultValue:ce,onChange:se,miniToolbar:ke}):ut.createElement("div",{style:{cursor:"pointer"}},ce?ut.createElement(Ke.Z,{className:Oe.Z.inputBorder,value:ce}):ut.createElement("div",{className:`${Oe.Z.inputBorder} ${Oe.Z.placeholder} inputBorderError`},he))},35173:function(Vn,xn,pe){"use strict";pe.d(xn,{W:function(){return Pt}});var ge=pe(59301),Oe=pe(8591),Ke=pe(12563),ut=pe(78241),Ge=pe(78673),Xe=pe(95237),Ne=pe(43604),Tt=pe(6848),Ct=pe(92832),Ve=pe(5871),Lt=pe(43809),dt=pe(41984),Rt=pe(12290),De=pe(61485),ne=Object.defineProperty,ee=Object.defineProperties,ce=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,he=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,be=(Ze,Et,it)=>Et in Ze?ne(Ze,Et,{enumerable:!0,configurable:!0,writable:!0,value:it}):Ze[Et]=it,ke=(Ze,Et)=>{for(var it in Et||(Et={}))he.call(Et,it)&&be(Ze,it,Et[it]);if(se)for(var it of se(Et))ve.call(Et,it)&&be(Ze,it,Et[it]);return Ze},Be=(Ze,Et)=>ee(Ze,ce(Et)),He=(Ze,Et)=>{var it={};for(var Dt in Ze)he.call(Ze,Dt)&&Et.indexOf(Dt)<0&&(it[Dt]=Ze[Dt]);if(Ze!=null&&se)for(var Dt of se(Ze))Et.indexOf(Dt)<0&&ve.call(Ze,Dt)&&(it[Dt]=Ze[Dt]);return it};const We=Ze=>{var Et=Ze,{value:it,onChange:Dt}=Et,ht=He(Et,["value","onChange"]);const Ht=_t=>{Dt([_t])};return ge.createElement(Rt.Z,Be(ke({},ht),{defaultValue:it==null?void 0:it[0],onChange:Ht}))},rt=Ze=>{if(!Ze)return!1;if(/^s*$/.test(Ze)||Ze.trim()===""){Oe.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u5168\u4E3A\u7A7A\u683C");return}let Et=new RegExp("[ `~!@#$^&*()={}':;,\\[\\].<>/?~\uFF01@#\uFFE5\u2026\u2026&*\uFF08\uFF09\u2014\u3010\u3011\u2018\uFF1B\uFF1A\u201D\u201C\u3002\uFF0C\u3001\uFF1F\u300C\u300D\u300E\u300F_\\+\\-\xB7%\u300A\u300B]|[\\\\/]");return Ze==="|"?(Oe.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},Qe=({value:Ze=[],onClose:Et})=>ge.createElement(Ke.default,{closable:!0,onClose:Et,className:Lt.Z.keywordTag},ge.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},Ze.join(" \u6216 "))),Pt=({questionTitlePlaceholder:Ze,form:Et,showKeywords:it,isMustKeyWords:Dt=it})=>{const[ht,Ht]=(0,ge.useState)(!1),[_t,Vt]=(0,ge.useState)(""),ot=ut.default.useWatch("use_keywords",Et),Ue=ut.default.useWatch("question_score",Et);return ge.createElement("div",{className:Lt.Z.wrap},ge.createElement("div",{className:Lt.Z.questionTitleEditorWrap},ge.createElement(ut.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},ge.createElement(dt.h,{scrollId:"name",watch:!0,height:140,placeholder:Ze}))),ge.createElement(ut.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:"answer_texts",labelCol:{span:24}},ge.createElement(We,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),it&&!Dt&&ge.createElement(ut.default.Item,{hidden:!0,name:"use_keywords",valuePropName:"checked"},ge.createElement(Ge.Z,{defaultChecked:!0})),it&&Dt&&ge.createElement(Xe.Z,{align:"middle",className:"mb30"},ge.createElement(ut.default.Item,{name:"use_keywords",valuePropName:"checked"},ge.createElement(Ge.Z,null)),ge.createElement(Ne.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),ge.createElement(Ne.Z,null,ge.createElement(Tt.Z,{placement:"right",title:"\u9009\u4E2D\u540E\uFF0C\u9700\u8981\u8BBE\u7F6E\u6BCF\u4E2A\u5173\u952E\u8BCD\u7684\u5206\u503C\uFF0C\u7CFB\u7EDF\u4F1A\u6839\u636E\u8BBE\u7F6E\u7684\u5173\u952E\u8BCD\u8FDB\u884C\u81EA\u52A8\u5224\u5206\uFF1B \u6240\u6709\u5173\u952E\u8BCD\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u5C0F\u9898\u5206\u503C\u3002"},ge.createElement(De.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(ot||!Dt)&&ge.createElement(ut.default.List,{name:"keywords",rules:[{validator(Wt,Ln){return Dt?Ln!=null&&Ln.length?(Ln==null?void 0:Ln.reduce((Gt,rn)=>Gt+rn.score,0))>parseFloat(Ue)?Promise.reject(new Error("\u6240\u6709\u5173\u952E\u8BCD\u7684\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u8BE5\u5C0F\u9898\u7684\u5206\u503C")):Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u5224\u5206\u5173\u952E\u8BCD")):Promise.resolve()}}]},(Wt,{add:Ln,remove:Fn})=>ge.createElement(ge.Fragment,null,ge.createElement("div",{className:`${Lt.Z.title} mb10`},Dt?"\u5173\u952E\u8BCD":ge.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),ge.createElement(Xe.Z,{align:"middle",className:"font14 mb30"},ge.createElement(Ne.Z,{flex:1},ge.createElement(Ct.default,{value:_t,onChange:Gt=>{Vt(Gt.target.value)},maxLength:50,allowClear:!0,onPressEnter:Gt=>{var rn,An,ni,Sn;const Yn=`${(rn=Gt.target)==null?void 0:rn.value}`,It=(ni=(An=Yn==null?void 0:Yn.split("|"))==null?void 0:An.filter(ze=>!!ze))==null?void 0:ni.map(ze=>ze==null?void 0:ze.trim()),wn=Et.getFieldValue("keywords"),Gn=((Sn=wn==null?void 0:wn.map(ze=>ze==null?void 0:ze.keyword))==null?void 0:Sn.flat())||[];for(const ze of It)if(Gn.includes(ze)){Oe.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}rt(Yn)&&(Ln({keyword:It,score:1}),Vt(""))},className:Lt.Z.inputBorder,placeholder:"\u652F\u6301\u8BBE\u7F6E\u591A\u4E2A\u5173\u952E\u8BCD\uFF1B\u5E76\u5217\u5173\u952E\u8BCD\uFF08\u6216\u7684\u5173\u7CFB\uFF09\u8BF7\u7528\u201C|\u201D\u5206\u9694\u5F00"})),ge.createElement(Ne.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),Wt.map(Gt=>{var rn=Gt,{key:An,name:ni}=rn,Sn=He(rn,["key","name"]);return ge.createElement(Xe.Z,{key:An,className:"mb20",style:{marginRight:148}},ge.createElement(Ne.Z,{flex:1},ge.createElement(Xe.Z,{align:"middle",justify:"space-between"},ge.createElement(ut.default.Item,Be(ke({},Sn),{name:[ni,"keyword"]}),ge.createElement(Qe,{onClose:()=>Fn(ni)})),Dt&&ge.createElement(ut.default.Item,Be(ke({},Sn),{name:[ni,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:Lt.Z.blankInputNumberWrapper}),ge.createElement(Ve.Z,{className:Lt.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),ge.createElement("div",{onClick:()=>Ht(!0)},ge.createElement(ut.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ge.createElement(dt.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:ht}))))}},27693:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Ge}});var ge={text:"text___bQulM",sup:"sup___rX_Y3"},Oe=pe(78241),Ke=pe(59301),Ge=({text:Xe,name:Ne="question_score"})=>{const Tt=({value:Ct})=>Ke.createElement("div",{className:ge.text},Ke.createElement("span",{className:ge.sup},"*"),Ke.createElement("span",{className:"mr10"},"\u5206\u503C"),Ke.createElement("span",null,Ct||"--"),Ke.createElement("span",{className:"c-grey-999"},Xe));return Ke.createElement(Oe.default.Item,{noStyle:!0,name:Ne},Ke.createElement(Tt,null))}},85149:function(Vn,xn,pe){"use strict";pe.d(xn,{z:function(){return He},Z:function(){return We}});var ge=pe(59301),Oe=pe(50304),Ke=pe(24768),ut=pe(64018),Ge=pe(40846),Xe=pe(3294),Ne=pe(955),Tt=pe(15342),Ct=pe(1012),Ve=pe(23210),Lt=pe(59301),Rt=({html:rt})=>{const Qe=(0,ge.useRef)(null),Pt=(0,ge.useRef)(null),Ze=`.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,ge.useEffect)(()=>{const Et=Qe.current.attachShadow({mode:"open"});Pt.current=document.createElement("div"),Pt.current.className="markdown-body",Pt.current.innerHTML=rt,Et.appendChild(Pt.current);const it=document.createElement("style");return it.textContent=Ze,Et.appendChild(it),()=>{Et.innerHTML=""}},[]),(0,ge.useEffect)(()=>{Pt.current&&(Pt.current.innerHTML=rt)},[rt]),Lt.createElement("div",{ref:Qe})},De=Object.defineProperty,ne=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable,se=(rt,Qe,Pt)=>Qe in rt?De(rt,Qe,{enumerable:!0,configurable:!0,writable:!0,value:Pt}):rt[Qe]=Pt,he=(rt,Qe)=>{for(var Pt in Qe||(Qe={}))ee.call(Qe,Pt)&&se(rt,Pt,Qe[Pt]);if(ne)for(var Pt of ne(Qe))ce.call(Qe,Pt)&&se(rt,Pt,Qe[Pt]);return rt};const ve="@\u2581\u2581@",be="@\u2581@",ke=/<pre[^>]*>/g;function Be(rt){let Qe=document.createElement("div");return Qe.innerHTML=rt,Qe.childNodes.length===0?"":Qe.childNodes[0].nodeValue}const He=(rt,Qe)=>{rt=rt||"";const Pt=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ze=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Et=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,it=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Qe?rt.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Pt,(Dt,ht,Ht,_t,Vt,ot,Ue)=>{const Wt=ht||_t||ot,Ln=Ht||Vt||Ue||"?";return Xe.Z.API_SERVER+"/api/attachments/"+Wt+Ln+"&t="+(0,Ne.Jn)(Wt,Date.now())+(Dt.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(rt=rt.replace(it,(Dt,ht,Ht,_t,Vt,ot,Ue)=>{const Wt=ht||_t||ot,Ln=Ht||Vt||Ue||"?";return Xe.Z.API_SERVER+"/attachments/download/"+Wt+Ln+"&t="+(0,Ne.Jn)(Wt,Date.now())+(Dt.indexOf(")")>-1?")":"&")}).replace(Pt,(Dt,ht,Ht,_t,Vt,ot,Ue)=>{const Wt=ht||_t||ot,Ln=Ht||Vt||Ue||"?";return Xe.Z.API_SERVER+"/api/attachments/"+Wt+Ln+"&t="+(0,Ne.Jn)(Wt,Date.now())+(Dt.indexOf(")")>-1?")":"&")}).replace(Ze,(Dt,ht,Ht,_t,Vt)=>{const ot=ht||_t,Ue=Ht||Vt||"";return'"'+Xe.Z.API_SERVER+"/api/attachments/"+ot+Ue+ot+Ue+"&t="+(0,Ne.Jn)(ot,Date.now())}).replace(Et,(Dt,ht,Ht,_t,Vt)=>{const ot=ht||_t,Ue=Ht||Vt||"";return"("+Xe.Z.API_SERVER+"/files/uploads/"+ot+Ue+ot+Ue+"&t="+(0,Ne.Jn)(ot,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,`
|
|
|
`),rt)};var We=({value:rt="",className:Qe,showTextOnly:Pt,showLines:Ze,style:Et={},stylesPrev:it={},highlightKeywords:Dt,showProgramFill:ht,isProgramFill:Ht,disabledFill:_t=!1,programFillValue:Vt,onFillChange:ot=Ln=>{},onFillBlur:Ue=()=>{},onFillFocus:Wt=()=>{}})=>{let Ln=String(rt);const[Fn,Gt]=(0,ge.useState)(""),[rn,An]=(0,ge.useState)("office"),[ni,Sn]=(0,ge.useState)([]),Yn=(0,ge.useRef)("a"+(0,Ct.Z)()),It={},wn=(xt,yt,at)=>{const zt=document.createElement(xt===be?"input":"textarea");zt.style.width="100%",zt.style.height=xt===be?"40px":"151px",zt.rows=5,zt.spellcheck=!1,zt.name="edu-program-fill",zt.placeholder="\u8BF7\u8F93\u5165",zt.dataset.id=yt;const un=Object.keys(It).length;return It[un]=zt,`<span class="edu-program-fill-wrap ${xt===be?"":"show"}" style="width:${xt===be?"400px":"100%"}" title=${at||""}><span>${zt.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Gn(xt){return xt=xt.replace(/!\[.*?\]\(.*?\)/g,""),xt=xt.replace(/\[.*?\]\(.*?\)/g,""),xt=xt.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),xt=xt.replace(/<embed.*?>/g,""),xt=xt.replace(/<img.*?>/g,""),xt=xt.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),xt=xt.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),xt=xt.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),xt=xt.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),xt}const ze=xt=>xt.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(yt,at){let zt=at.replace(/(\n|\r)/g,"").split("}"),un=[];return zt.map(fn=>{fn!=""&&un.push(`.${Yn.current} ${fn}`)}),`<style>${un.join("}")}</style>`}),Ee=(0,ge.useMemo)(()=>{try{const zt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,un=/\"\/api\/attachments\/|\"\/attachments\/download\//g,fn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Qt=/\(\/attachments\/download\//g;Ln=Ln.replace(Qt,"("+Xe.Z.API_SERVER+"/attachments/download/").replace(zt,"("+Xe.Z.API_SERVER+"/api/attachments/").replace(un,'"'+Xe.Z.API_SERVER+"/api/attachments/").replace(fn,'"'+Xe.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(zt){}if(ht){let zt=-1;return Ln=Ln.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(un,fn,Qt){var Kn;return++zt,wn(un,zt,(Kn=Vt==null?void 0:Vt[zt])==null?void 0:Kn.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${ze(Ln||"")}</pre>`}let xt=ze(Ln);xt=(0,Ke.ZP)(xt);const yt=(0,Ke.ez)();Ln.match(/\[TOC\]/)&&(xt=xt.replace("<p>[TOC]</p>",(0,Ke.Qv)()),(0,Ke.Iy)()),xt=xt.replace(/(__special_katext_id_\d+__)/g,(zt,un)=>{const{type:fn,expression:Qt}=yt[un];return(0,Tt.renderToString)(Be(Qt)||"",{displayMode:fn==="block",throwOnError:!1,output:"html"})}),xt=xt.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Ke.AL)();const at=document.createElement("div");if(at.innerHTML=xt,Pt)return at.innerText;if(Dt){const zt=Dt.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return ye(at,zt),at.innerHTML}return setTimeout(()=>et(),500),at.innerHTML},[Ln,Dt]);(0,ge.useEffect)(()=>{qe.current&&qe.current.querySelectorAll(["input","textarea"]).forEach(yt=>{yt.oninput=Pe,yt.onblur=Fe,yt.onfocus=Ae})},[ni]),(0,ge.useEffect)(()=>{var xt,yt,at,zt,un;if(Vt!=null&&Vt.length)try{const fn=qe.current.querySelectorAll(".edu-program-fill-score"),Qt=qe.current.querySelectorAll('[name="edu-program-fill"]');for(const[Kn,On]of Qt.entries())On.value=((xt=Vt==null?void 0:Vt[Kn])==null?void 0:xt.value)||"",((yt=Vt==null?void 0:Vt[Kn])==null?void 0:yt.type)==="warning"?On.className="program-fill-warning":((at=Vt==null?void 0:Vt[Kn])==null?void 0:at.type)==="success"?On.className="program-fill-success":On.className="";for(const[Kn,On]of fn.entries())On.innerHTML=(zt=Vt==null?void 0:Vt[Kn])!=null&&zt.score?`${(un=Vt==null?void 0:Vt[Kn])==null?void 0:un.score}\u5206`:"";Sn(Vt)}catch(fn){console.log(fn,"error")}},[Vt]);const Pe=xt=>{ni[xt.target.dataset.id]=ni[xt.target.dataset.id]||{},ni[xt.target.dataset.id].value=xt.target.value,Sn([...ni]),ot(ni,xt.target.dataset.id)},Fe=xt=>{ni[xt.target.dataset.id]=ni[xt.target.dataset.id]||{},ni[xt.target.dataset.id].value=xt.target.value,Sn([...ni]),Ue(ni,xt.target.dataset.id)},Ae=xt=>{ni[xt.target.dataset.id]=ni[xt.target.dataset.id]||{},ni[xt.target.dataset.id].value=xt.target.value,Sn([...ni]),Wt(ni,xt.target.dataset.id)};function ye(xt,yt){return xt.childNodes.forEach(at=>{var zt;if(at.childNodes.length>0)ye(at,yt);else if(at.nodeName!=="IMG")if(at.innerHTML)at.innerHTML=(zt=at.innerHTML)==null?void 0:zt.replace(new RegExp(yt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const un=document.createElement("span");un.innerHTML=at.textContent.replace(new RegExp(yt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),at.replaceWith(un)}})}const qe=(0,ge.useRef)();Ke.jb.WebkitLineClamp=Ze,Ze&&(Et=he(he({},Et),Ke.jb));function vt(xt){let yt=xt.target;if(yt.tagName.toUpperCase()==="A"){let at=yt.getAttribute("href");if(at.indexOf("office")>-1)xt.preventDefault(),Gt(at),An("office");else if(at.indexOf("application/pdf")>-1)xt.preventDefault(),Gt(at),An("pdf");else if(at.indexOf("text/html")>-1)xt.preventDefault(),Gt(at),An("html");else if(at.startsWith("#")){xt.preventDefault();let zt=document.getElementById(at.replace("#",""));zt&&zt.scrollIntoView(!0)}}}const et=()=>{var xt;const yt=(xt=qe.current)==null?void 0:xt.querySelectorAll("video");yt==null||yt.forEach(at=>{if(at.oncontextmenu=()=>!1,at.src.indexOf(".m3u8")>-1&&!at.canPlayType("application/vnd.apple.mpegurl")){if(Ge.ZP.isSupported()){var zt=new Ge.ZP;zt.loadSource(at.src),zt.attachMedia(at)}}})};(0,ge.useEffect)(()=>{if(qe.current&&Ee&&Ee.match(ke)&&window.PR.prettyPrint(),qe.current)return qe.current.addEventListener("click",vt),()=>{var xt;(xt=qe.current)==null||xt.removeEventListener("click",vt),(0,Ke.AL)(),(0,Ke.Iy)()}},[Ee,qe.current,vt]),(0,ge.useEffect)(()=>{var xt;const yt=at=>{at.preventDefault(),at.clipboardData.setData("text",window.getSelection().toString())};return(xt=qe.current)==null||xt.addEventListener("copy",yt),()=>{var at;(at=qe.current)==null||at.removeEventListener("copy",yt)}},[qe.current]);const Ye=xt=>/<style[\s\S]*?>/i.test(xt||"");return ge.createElement(ge.Fragment,null,Pt&&ge.createElement("div",{ref:qe},Ee),!Pt&&!Ye(Ee)&&ge.createElement("div",{ref:qe,style:he({},Et),className:`${Qe||""} ${_t?"disabled-fill":""} markdown-body ${Yn.current}`,dangerouslySetInnerHTML:{__html:Ee}}),!Pt&&Ye(Ee)&&ge.createElement(Rt,{html:Ee}),ge.createElement(Ve.Z,{close:!0,data:Fn,type:Fn!=null&&Fn.length?rn:"",style:he({},it),onClose:()=>Gt("")}))}},97692:function(Vn,xn,pe){"use strict";pe.d(xn,{h:function(){return be}});var ge=pe(59301),Oe=pe(57809),Ke=pe(78241),ut=pe(3113),Ge=pe(89780),Xe=pe.n(Ge),Ne=pe(37036),Tt=pe(95625),Ct=Object.defineProperty,Ve=Object.defineProperties,Lt=Object.getOwnPropertyDescriptors,dt=Object.getOwnPropertySymbols,Rt=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable,ne=(ke,Be,He)=>Be in ke?Ct(ke,Be,{enumerable:!0,configurable:!0,writable:!0,value:He}):ke[Be]=He,ee=(ke,Be)=>{for(var He in Be||(Be={}))Rt.call(Be,He)&&ne(ke,He,Be[He]);if(dt)for(var He of dt(Be))De.call(Be,He)&&ne(ke,He,Be[He]);return ke},ce=(ke,Be)=>Ve(ke,Lt(Be));const se=Oe.default.Option,he={labelCol:{span:4},wrapperCol:{span:20}},ve={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"]};xn.Z=({callback:ke,onCancel:Be})=>{const[He,We]=(0,ge.useState)("python");function rt(Pt){We(ve[Pt][1])}function Qe(Pt){ke(Pt)}return ge.createElement(Ke.default,ce(ee({},he),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Qe,style:{width:500}}),ge.createElement(Ke.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},ge.createElement(Oe.default,{getPopupContainer:Pt=>Pt.parentNode,onChange:rt},Object.keys(ve).map(Pt=>ge.createElement(se,{key:Pt,value:Pt},ve[Pt][0])))),ge.createElement(Ke.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},ge.createElement(be,{mode:He})),ge.createElement("div",{className:"flex-container flex-end"},ge.createElement(ut.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ge.createElement(ut.ZP,{type:"ghost",onClick:Be},"\u53D6\u6D88")))};function be({value:ke,onChange:Be,mode:He,options:We={}}){const rt=(0,ge.useRef)(),[Qe,Pt]=(0,ge.useState)();return(0,ge.useEffect)(()=>{if(Qe){let Ze=function(Et){const it=Et.getValue();Be&&Be(it)};return Qe.on("change",Ze),()=>{Qe.off("change",Ze)}}},[Qe,Be]),(0,ge.useEffect)(()=>{Qe&&Qe.setOption("mode",He)},[Qe,He]),(0,ge.useEffect)(()=>{Qe&&(ke!==Qe.getValue()||ke==="")&&setTimeout(()=>{Qe.setValue(ke||"")},300)},[Qe,ke]),(0,ge.useEffect)(()=>{if(rt.current&&!Qe){const Ze=Xe().fromTextArea(rt.current,ee({mode:He,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},We));Pt(Ze)}},[rt.current,Qe]),ge.createElement("div",{className:"my-codemirror-container"},ge.createElement("textarea",{ref:rt}))}},12290:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Un}});var ge=pe(59301),Oe=pe(89780),Ke=pe.n(Oe),ut=pe(76374),Ge=pe(37036),Xe=pe(6313),Ne=pe(25717),Tt=pe(99498),Ct=pe(25419),Ve=pe(67549),Lt=pe(85149),dt=({value:kt="",className:$t,showTextOnly:Je,showLines:qt,style:vn={}})=>{const Ft=(0,ge.useMemo)(()=>"",[kt]);return ge.createElement(ge.Fragment,null,ge.createElement("div",{dangerouslySetInnerHTML:{__html:Ft}}))},Rt=pe(59301),De=Object.defineProperty,ne=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,ce=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable,ve=(kt,$t,Je)=>$t in kt?De(kt,$t,{enumerable:!0,configurable:!0,writable:!0,value:Je}):kt[$t]=Je,be=(kt,$t)=>{for(var Je in $t||($t={}))se.call($t,Je)&&ve(kt,Je,$t[Je]);if(ce)for(var Je of ce($t))he.call($t,Je)&&ve(kt,Je,$t[Je]);return kt},ke=(kt,$t)=>ne(kt,ee($t));let Be=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u56FE\u50CF",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"iconfont icon-jisuan1",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function He({onActionCallback:kt,title:$t,icon:Je,actionName:qt,className:vn="",children:Ft}){function st(){kt(qt)}return Rt.createElement("a",{title:$t,className:vn,onClick:st},Rt.createElement("i",{className:`${Je}`}),Ft)}var We=({watch:kt,showNullButton:$t,showNullProgramButton:Je,onActionCallback:qt,fullScreen:vn,insertTemp:Ft,hidetoolBar:st,extraUse:on})=>{const En=[...Be,{title:`${kt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${kt?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return Rt.createElement("ul",{className:"markdown-toolbar-container"},!st&&En.map((Dn,Jn)=>Rt.createElement("li",{key:Jn},Dn.actionName?Rt.createElement(He,ke(be({},Dn),{onActionCallback:qt})):Rt.createElement("span",{className:"v-line"}))),$t?Rt.createElement("li",null,Rt.createElement(He,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:qt},Rt.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Je?Rt.createElement(Rt.Fragment,null,Rt.createElement("li",null,Rt.createElement(He,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:qt},Rt.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),Rt.createElement("li",null,Rt.createElement(He,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:qt},Rt.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,Ft&&Rt.createElement("li",null,Rt.createElement(He,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Ft}`,onActionCallback:qt},Rt.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),on&&Rt.createElement("li",null,on),Rt.createElement("li",{className:"btn-full-screen"},Rt.createElement(He,{icon:`${vn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:vn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:qt})))},rt=pe(79346),Qe=pe(78241),Pt=pe(92832),Ze=pe(3113),Et=Object.defineProperty,it=Object.defineProperties,Dt=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertySymbols,Ht=Object.prototype.hasOwnProperty,_t=Object.prototype.propertyIsEnumerable,Vt=(kt,$t,Je)=>$t in kt?Et(kt,$t,{enumerable:!0,configurable:!0,writable:!0,value:Je}):kt[$t]=Je,ot=(kt,$t)=>{for(var Je in $t||($t={}))Ht.call($t,Je)&&Vt(kt,Je,$t[Je]);if(ht)for(var Je of ht($t))_t.call($t,Je)&&Vt(kt,Je,$t[Je]);return kt},Ue=(kt,$t)=>it(kt,Dt($t));const Wt={labelCol:{span:4},wrapperCol:{span:20}};var Ln=({callback:kt,onCancel:$t})=>{function Je(qt){kt(qt)}return ge.createElement(Qe.default,Ue(ot({},Wt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Je,style:{width:500}}),ge.createElement(Qe.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},ge.createElement(Pt.default,null)),ge.createElement(Qe.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},ge.createElement(Pt.default,null)),ge.createElement("div",{className:"flex-container flex-end"},ge.createElement(Ze.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ge.createElement(Ze.ZP,{type:"ghost",onClick:$t},"\u53D6\u6D88")))},Fn=pe(97692),Gt=pe(28451),rn=pe(43418),An=pe(95237),ni=pe(73524),Sn=pe(59301),Yn=({callback:kt,onCancel:$t})=>{const Je=document.createElement("canvas"),qt=Je.getContext("2d");Je.width=1e3,Je.height=800,qt.fillStyle="#ffffff",qt.fillRect(0,0,Je.width,Je.height);const vn=Je.toDataURL("image/png");return Sn.createElement(rn.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Sn.createElement(An.Z,{style:{height:"100vh"}},Sn.createElement(ni.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:vn,visible:!0,title:String(Date.now())},onOk:Ft=>{kt({src:Ft.url})},onClose:$t})))},It=pe(12378);function wn(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(wn,go.CommandHandler),wn.prototype.canAlignSelection=function(){var kt=this.diagram;return!(kt===null||kt.isReadOnly||kt.isModelReadOnly||kt.selection.count<2)},wn.prototype.alignLeft=function(){var kt=this.diagram;kt.startTransaction("aligning left");var $t=1/0;kt.selection.each(function(Je){Je instanceof go.Link||($t=Math.min(Je.position.x,$t))}),kt.selection.each(function(Je){Je instanceof go.Link||Je.move(new go.Point($t,Je.position.y))}),kt.commitTransaction("aligning left")},wn.prototype.alignRight=function(){var kt=this.diagram;kt.startTransaction("aligning right");var $t=-1/0;kt.selection.each(function(Je){if(!(Je instanceof go.Link)){var qt=Je.actualBounds.x+Je.actualBounds.width;$t=Math.max(qt,$t)}}),kt.selection.each(function(Je){Je instanceof go.Link||Je.move(new go.Point($t-Je.actualBounds.width,Je.position.y))}),kt.commitTransaction("aligning right")},wn.prototype.alignTop=function(){var kt=this.diagram;kt.startTransaction("alignTop");var $t=1/0;kt.selection.each(function(Je){Je instanceof go.Link||($t=Math.min(Je.position.y,$t))}),kt.selection.each(function(Je){Je instanceof go.Link||Je.move(new go.Point(Je.position.x,$t))}),kt.commitTransaction("alignTop")},wn.prototype.alignBottom=function(){var kt=this.diagram;kt.startTransaction("aligning bottom");var $t=-1/0;kt.selection.each(function(Je){if(!(Je instanceof go.Link)){var qt=Je.actualBounds.y+Je.actualBounds.height;$t=Math.max(qt,$t)}}),kt.selection.each(function(Je){Je instanceof go.Link||Je.move(new go.Point(Je.actualBounds.x,$t-Je.actualBounds.height))}),kt.commitTransaction("aligning bottom")},wn.prototype.alignCenterX=function(){var kt=this.diagram,$t=kt.selection.first();if($t){kt.startTransaction("aligning Center X");var Je=$t.actualBounds.x+$t.actualBounds.width/2;kt.selection.each(function(qt){qt instanceof go.Link||qt.move(new go.Point(Je-qt.actualBounds.width/2,qt.actualBounds.y))}),kt.commitTransaction("aligning Center X")}},wn.prototype.alignCenterY=function(){var kt=this.diagram,$t=kt.selection.first();if($t){kt.startTransaction("aligning Center Y");var Je=$t.actualBounds.y+$t.actualBounds.height/2;kt.selection.each(function(qt){qt instanceof go.Link||qt.move(new go.Point(qt.actualBounds.x,Je-qt.actualBounds.height/2))}),kt.commitTransaction("aligning Center Y")}},wn.prototype.alignColumn=function(kt){var $t=this.diagram;$t.startTransaction("align Column"),kt===void 0&&(kt=0),kt=parseFloat(kt);var Je=new Array;$t.selection.each(function(on){on instanceof go.Link||Je.push(on)});for(var qt=0;qt<Je.length-1;qt++){var vn=Je[qt],Ft=vn.actualBounds.y+vn.actualBounds.height+kt,st=Je[qt+1];st.move(new go.Point(vn.actualBounds.x,Ft))}$t.commitTransaction("align Column")},wn.prototype.alignRow=function(kt){kt===void 0&&(kt=0),kt=parseFloat(kt);var $t=this.diagram;$t.startTransaction("align Row");var Je=new Array;$t.selection.each(function(on){on instanceof go.Link||Je.push(on)});for(var qt=0;qt<Je.length-1;qt++){var vn=Je[qt],Ft=vn.actualBounds.x+vn.actualBounds.width+kt,st=Je[qt+1];st.move(new go.Point(Ft,vn.actualBounds.y))}$t.commitTransaction("align Row")},wn.prototype.canRotate=function(kt){var $t=this.diagram;return!($t===null||$t.isReadOnly||$t.isModelReadOnly||$t.selection.count<1)},wn.prototype.rotate=function(kt){kt===void 0&&(kt=90);var $t=this.diagram;$t.startTransaction("rotate "+kt.toString());var $t=this.diagram;$t.selection.each(function(Je){Je instanceof go.Link||Je instanceof go.Group||(Je.angle+=kt)}),$t.commitTransaction("rotate "+kt.toString())},wn.prototype.pullToFront=function(){var kt=this.diagram;kt.startTransaction("pullToFront");var $t=new go.Map;kt.selection.each(function(Je){$t.set(Je.layer,0)}),$t.iteratorKeys.each(function(Je){var qt=0;Je.parts.each(function(vn){if(!vn.isSelected){var Ft=vn.zOrder;isNaN(Ft)?vn.zOrder=0:qt=Math.max(qt,Ft)}}),$t.set(Je,qt)}),kt.selection.each(function(Je){wn._assignZOrder(Je,$t.get(Je.layer)+1)}),kt.commitTransaction("pullToFront")},wn.prototype.pushToBack=function(){var kt=this.diagram;kt.startTransaction("pushToBack");var $t=new go.Map;kt.selection.each(function(Je){$t.set(Je.layer,0)}),$t.iteratorKeys.each(function(Je){var qt=0;Je.parts.each(function(vn){if(!vn.isSelected){var Ft=vn.zOrder;isNaN(Ft)?vn.zOrder=0:qt=Math.min(qt,Ft)}}),$t.set(Je,qt)}),kt.selection.each(function(Je){wn._assignZOrder(Je,$t.get(Je.layer)-1-wn._findGroupDepth(Je))}),kt.commitTransaction("pushToBack")},wn._assignZOrder=function(kt,$t,Je){Je===void 0&&(Je=kt),kt.layer===Je.layer&&(kt.zOrder=$t),kt instanceof go.Group&&kt.memberParts.each(function(qt){wn._assignZOrder(qt,$t+1,Je)})},wn._findGroupDepth=function(kt){if(kt instanceof go.Group){var $t=0;return kt.memberParts.each(function(Je){$t=Math.max($t,wn._findGroupDepth(Je))}),$t+1}else return 0},wn.prototype.doKeyDown=function(){var kt=this.diagram;if(kt!==null){var $t=kt.lastInput;if($t.key==="Up"||$t.key==="Down"||$t.key==="Left"||$t.key==="Right"){var Je=this.arrowKeyBehavior;if(Je==="none")return;if(Je==="select"){this._arrowKeySelect();return}else if(Je==="move"){this._arrowKeyMove();return}else if(Je==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},wn.prototype._getAllParts=function(){var kt=new Array;return this.diagram.nodes.each(function($t){kt.push($t)}),this.diagram.parts.each(function($t){kt.push($t)}),kt},wn.prototype._arrowKeyMove=function(){var kt=this.diagram,$t=kt.lastInput,Je=0,qt=0;if($t.control||$t.meta)Je=1,qt=1;else if(kt.grid!==null){var vn=kt.grid.gridCellSize;qt=vn.width,Je=vn.height}kt.startTransaction("arrowKeyMove"),kt.selection.each(function(Ft){$t.key==="Up"?Ft.move(new go.Point(Ft.actualBounds.x,Ft.actualBounds.y-Je)):$t.key==="Down"?Ft.move(new go.Point(Ft.actualBounds.x,Ft.actualBounds.y+Je)):$t.key==="Left"?Ft.move(new go.Point(Ft.actualBounds.x-qt,Ft.actualBounds.y)):$t.key==="Right"&&Ft.move(new go.Point(Ft.actualBounds.x+qt,Ft.actualBounds.y))}),kt.commitTransaction("arrowKeyMove")},wn.prototype._arrowKeySelect=function(){var kt=this.diagram,$t=kt.lastInput,Je=null;$t.key==="Up"?Je=this._findNearestPartTowards(270):$t.key==="Down"?Je=this._findNearestPartTowards(90):$t.key==="Left"?Je=this._findNearestPartTowards(180):$t.key==="Right"&&(Je=this._findNearestPartTowards(0)),Je!==null&&($t.shift?Je.isSelected=!0:$t.control||$t.meta?Je.isSelected=!Je.isSelected:kt.select(Je))},wn.prototype._findNearestPartTowards=function(kt){var $t=this.diagram.selection.first();if($t===null)return null;for(var Je=$t.actualBounds.center,qt=this._getAllParts(),vn=1/0,Ft=$t,st=0;st<qt.length;st++){var on=qt[st];if(on!==$t&&on.canSelect()){var En=on.actualBounds.center,Dn=Je.directionPoint(En),Jn=this._angleCloseness(Dn,kt);if(Jn<=45){var St=Je.distanceSquaredPoint(En);St*=1+Math.sin(Jn*Math.PI/180),St<vn&&(vn=St,Ft=on)}}}return Ft},wn.prototype._angleCloseness=function(kt,$t){return Math.min(Math.abs($t-kt),Math.min(Math.abs($t+360-kt),Math.abs($t-360-kt)))},wn.prototype._arrowKeyTree=function(){var kt=this.diagram,$t=kt.selection.first();if($t instanceof go.Node){var Je=kt.lastInput;if(Je.key==="Right"){if(!$t.isTreeLeaf)if(!$t.isTreeExpanded)kt.commandHandler.canExpandTree($t)&&kt.commandHandler.expandTree($t);else{var qt=this._sortTreeChildrenByY($t).first();qt!==null&&kt.select(qt)}}else if(Je.key==="Left")if(!$t.isTreeLeaf&&$t.isTreeExpanded)kt.commandHandler.canCollapseTree($t)&&kt.commandHandler.collapseTree($t);else{var vn=$t.findTreeParentNode();vn!==null&&kt.select(vn)}else if(Je.key==="Up"){var vn=$t.findTreeParentNode();if(vn!==null){var Ft=this._sortTreeChildrenByY(vn),st=Ft.indexOf($t);if(st>0){for(var on=Ft.elt(st-1);on!==null&&on.isTreeExpanded&&!on.isTreeLeaf;){var En=this._sortTreeChildrenByY(on);on=En.last()}on!==null&&kt.select(on)}else kt.select(vn)}}else if(Je.key==="Down")if($t.isTreeExpanded&&!$t.isTreeLeaf){var qt=this._sortTreeChildrenByY($t).first();qt!==null&&kt.select(qt)}else for(;$t!==null;){var vn=$t.findTreeParentNode();if(vn===null)break;var Ft=this._sortTreeChildrenByY(vn),st=Ft.indexOf($t);if(st<Ft.length-1){kt.select(Ft.elt(st+1));break}else $t=vn}var Dn=kt.selection.first();Dn!==null&&kt.scrollToRect(Dn.actualBounds)}},wn.prototype._sortTreeChildrenByY=function(kt){var $t=new go.List().addAll(kt.findTreeChildrenNodes());return $t.sort(function(Je,qt){var vn=Je.location,Ft=qt.location;return vn.y<Ft.y?-1:vn.y>Ft.y?1:vn.x<Ft.x?-1:vn.x>Ft.x?1:0}),$t},wn.prototype.copyToClipboard=function(kt){go.CommandHandler.prototype.copyToClipboard.call(this,kt),this._lastPasteOffset.set(this.pasteOffset)},wn.prototype.pasteFromClipboard=function(){var kt=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(kt,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),kt},Object.defineProperty(wn.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(kt){if(kt!=="move"&&kt!=="select"&&kt!=="scroll"&&kt!=="tree"&&kt!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+kt);this._arrowKeyBehavior=kt}}),Object.defineProperty(wn.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(kt){if(!(kt instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+kt);this._pasteOffset.set(kt)}});var Gn=wn,ze=pe(74413),Ee=pe(43604),Pe=pe(99064),Fe={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},Ae=pe(24065),ye=pe(59301),qe=(kt,$t,Je)=>new Promise((qt,vn)=>{var Ft=En=>{try{on(Je.next(En))}catch(Dn){vn(Dn)}},st=En=>{try{on(Je.throw(En))}catch(Dn){vn(Dn)}},on=En=>En.done?qt(En.value):Promise.resolve(En.value).then(Ft,st);on((Je=Je.apply(kt,$t)).next())});function vt({onCancel:kt,callback:$t}){let Je=(0,ge.useRef)(),qt=(0,ge.useRef)(),vn=(0,ge.useRef)(),Ft=(0,ge.useRef)(!1);const st=(0,ge.useRef)(!1),[on,En]=(0,ge.useState)(0);function Dn(){const St=It.bx.make,Nn={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"};Je.current=new It.S0(qt.current,{padding:20,grid:St(It.s_,"Grid",St(It.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),St(It.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:oi=>{var Bi=oi.diagram.commandHandler.addTopLevelParts(oi.diagram.selection,!0);Bi||oi.diagram.currentTool.doCancel()},commandHandler:St(Gn),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:oi=>{var Bi=oi.subject;Bi.location=Bi.location.copy().snapToGridPoint(oi.diagram.grid.gridOrigin,oi.diagram.grid.gridCellSize),setTimeout(()=>{oi.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:oi=>{var Bi=oi.subject;setTimeout(()=>{oi.diagram.commandHandler.editTextBlock()})},LinkRelinked:oi=>{var Bi=oi.parameter.part;Bi.invalidateConnectedLinks();var Gi=oi.subject;oi.diagram.toolManager.linkingTool.isForwards?Gi.toNode.invalidateConnectedLinks():Gi.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Je.current.nodeTemplate=St(It.NB,"Auto",{locationSpot:It.z6.Center,locationObjectName:"SHAPE",desiredSize:new It.$u(120,60),minSize:new It.$u(40,40),resizable:!0,resizeCellSize:new It.$u(10,10),rotatable:!0},new It.KX("location","loc",It.E9.parse).makeTwoWay(It.E9.stringify),new It.KX("desiredSize","size",It.$u.parse).makeTwoWay(It.$u.stringify),St(It.bn,{name:"SHAPE",fill:Nn.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:It.z6.AllSides,toSpot:It.z6.AllSides},new It.KX("figure"),new It.KX("fill"),new It.KX("stroke","borderColor"),new It.KX("strokeWidth","thickness"),new It.KX("strokeDashArray","dash")),St(It.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),St(It.al,{margin:1,textAlign:"center",overflow:It.al.OverflowEllipsis,editable:!0},new It.KX("text").makeTwoWay(),new It.KX("stroke","color"))),Je.current.nodeTemplate.toolTip=St("ToolTip",St(It.s_,"Vertical",{maxSize:new It.$u(200,NaN)},St(It.al,{font:"bold 10pt sans-serif",textAlign:"center"},new It.KX("text")),St(It.al,{font:"10pt sans-serif",textAlign:"center"},new It.KX("text","details"))));function qn(oi,Bi){var Gi=(Ti,Qi)=>{Ti.handled=!0,Ti.diagram.model.commit(gr=>{var hr=Qi.part.adornedPart,Ki=new It.E9().setRectSpot(hr.actualBounds,oi);Ki.subtract(hr.location),Ki.scale(2,2),Ki.x+=Math.sign(Ki.x)*130,Ki.y+=Math.sign(Ki.y)*130,Ki.add(hr.location),Ki.snapToGridPoint(Ti.diagram.grid.gridOrigin,Ti.diagram.grid.gridCellSize);var Sr=gr.copyNodeData(hr.data);gr.setGroupKeyForNodeData(Sr,gr.getGroupKeyForNodeData(hr.data)),gr.addNodeData(Sr);var kn={from:hr.key,to:gr.getKeyForNodeData(Sr)};gr.addLinkData(kn);var Br=Ti.diagram.findNodeForData(Sr);Br.location=Ki,Ti.diagram.select(Br),setTimeout(()=>{Ti.diagram.commandHandler.editTextBlock()},20)})};return St(It.bn,{figure:Bi,alignment:oi,alignmentFocus:oi.opposite(),width:oi.equals(It.z6.Top)||oi.equals(It.z6.Bottom)?25:18,height:oi.equals(It.z6.Top)||oi.equals(It.z6.Bottom)?18:25,fill:"orange",stroke:Nn.white,strokeWidth:4,mouseEnter:(Ti,Qi)=>Qi.fill="dodgerblue",mouseLeave:(Ti,Qi)=>Qi.fill="orange",isActionable:!0,click:Gi,contextClick:Gi})}function Si(oi){return St(It.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:(Bi,Gi)=>Gi.fill="dodgerblue",mouseLeave:(Bi,Gi)=>Gi.fill="orange",click:(Bi,Gi)=>{Bi.diagram.commandHandler.showContextMenu(Gi.part.adornedPart)}},oi||{})}Je.current.nodeTemplate.selectionAdornmentTemplate=St(It.uz,"Spot",St(It.Vm,{padding:10}),qn(It.z6.Top,"TriangleUp"),qn(It.z6.Left,"TriangleLeft"),qn(It.z6.Right,"TriangleRight"),qn(It.z6.Bottom,"TriangleDown"),Si({alignment:new It.z6(.75,0)}));function en(oi,Bi){return(Gi,Ti)=>{Gi.handled=!0,Gi.diagram.model.commit(Qi=>{Qi.set(Ti.part.adornedPart.data,oi,Bi)})}}function Cn(oi,Bi){return Bi||(Bi="color"),St(It.bn,{width:16,height:16,stroke:"lightgray",fill:oi,margin:1,background:"transparent",mouseEnter:(Gi,Ti)=>Ti.stroke="dodgerblue",mouseLeave:(Gi,Ti)=>Ti.stroke="lightgray",click:en(Bi,oi),contextClick:en(Bi,oi)})}function At(){return[St("ContextMenuButton",St(It.s_,"Horizontal",Cn(Nn.white,"fill"),Cn(Nn.beige,"fill"),Cn(Nn.extralightblue,"fill"),Cn(Nn.extralightred,"fill"))),St("ContextMenuButton",St(It.s_,"Horizontal",Cn(Nn.lightgray,"fill"),Cn(Nn.lightgreen,"fill"),Cn(Nn.lightblue,"fill"),Cn(Nn.lightred,"fill")))]}function yn(){return[St("ContextMenuButton",St(It.s_,"Horizontal",Cn(Nn.black),Cn(Nn.green),Cn(Nn.blue),Cn(Nn.red))),St("ContextMenuButton",St(It.s_,"Horizontal",Cn(Nn.white),Cn(Nn.magenta),Cn(Nn.purple),Cn(Nn.orange)))]}function pn(oi,Bi){return Bi||(Bi="thickness"),St(It.bn,"LineH",{width:16,height:16,strokeWidth:oi,margin:1,background:"transparent",mouseEnter:(Gi,Ti)=>Ti.background="dodgerblue",mouseLeave:(Gi,Ti)=>Ti.background="transparent",click:en(Bi,oi),contextClick:en(Bi,oi)})}function mn(oi,Bi){return Bi||(Bi="dash"),St(It.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:oi,margin:1,background:"transparent",mouseEnter:(Gi,Ti)=>Ti.background="dodgerblue",mouseLeave:(Gi,Ti)=>Ti.background="transparent",click:en(Bi,oi),contextClick:en(Bi,oi)})}function Wn(){return[St("ContextMenuButton",St(It.s_,"Horizontal",pn(1),pn(2),pn(3),pn(4))),St("ContextMenuButton",St(It.s_,"Horizontal",mn(null),mn([2,4]),mn([4,4])))]}function Hn(oi,Bi){return Bi||(Bi="figure"),St(It.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:oi,margin:1,background:"transparent",mouseEnter:(Gi,Ti)=>Ti.fill="dodgerblue",mouseLeave:(Gi,Ti)=>Ti.fill="lightgray",click:en(Bi,oi),contextClick:en(Bi,oi)})}Je.current.nodeTemplate.contextMenu=St("ContextMenu",St("ContextMenuButton",St(It.s_,"Horizontal",Hn("Rectangle"),Hn("RoundedRectangle"),Hn("Ellipse"),Hn("Diamond"))),St("ContextMenuButton",St(It.s_,"Horizontal",Hn("Parallelogram2"),Hn("ManualOperation"),Hn("Procedure"),Hn("Cylinder1"))),St("ContextMenuButton",St(It.s_,"Horizontal",Hn("Terminator"),Hn("CreateRequest"),Hn("Document"),Hn("TriangleDown"))),At(),yn(),Wn()),Je.current.groupTemplate=St(It.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:It.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(oi,Bi)=>{var Gi=Bi.addMembers(Bi.diagram.selection,!0);Gi||Bi.diagram.currentTool.doCancel()},avoidable:!1},new It.KX("location","loc",It.E9.parse).makeTwoWay(It.E9.stringify),St(It.s_,"Auto",{name:"BODY"},St(It.bn,{parameter1:10,fill:Nn.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:It.z6.AllSides,toSpot:It.z6.AllSides},new It.KX("fill"),new It.KX("stroke","color"),new It.KX("strokeWidth","thickness"),new It.KX("strokeDashArray","dash")),St(It.Vm,{background:"transparent",margin:20})),St(It.al,{alignment:It.z6.Top,alignmentFocus:It.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new It.KX("text"),new It.KX("stroke","color"))),Je.current.groupTemplate.selectionAdornmentTemplate=St(It.uz,"Spot",St(It.s_,"Auto",St(It.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),St(It.Vm,{margin:1.5})),Si({alignment:It.z6.TopRight,alignmentFocus:It.z6.BottomRight})),Je.current.groupTemplate.contextMenu=St("ContextMenu",At(),yn(),Wn()),Je.current.linkTemplate=St(It.rU,{layerName:"Foreground",routing:It.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new It.KX("fromSpot","fromSpot",It.z6.parse),new It.KX("toSpot","toSpot",It.z6.parse),new It.KX("fromShortLength","dir",oi=>oi>=1?10:0),new It.KX("toShortLength","dir",oi=>oi>=1?10:0),new It.KX("points").makeTwoWay(),St(It.bn,{strokeWidth:2},new It.KX("stroke","color"),new It.KX("strokeWidth","thickness"),new It.KX("strokeDashArray","dash")),St(It.bn,{segmentIndex:0,segmentOffset:new It.E9(15,0),segmentOrientation:It.rU.OrientAlong,alignmentFocus:It.z6.Right,figure:"circle",width:10,strokeWidth:0},new It.KX("fill","color"),new It.KX("visible","dir",oi=>oi===1)),St(It.bn,{segmentIndex:-1,segmentOffset:new It.E9(-10,6),segmentOrientation:It.rU.OrientPlus90,alignmentFocus:It.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new It.KX("fill","color"),new It.KX("visible","dir",oi=>oi>=1),new It.KX("width","thickness",oi=>7+3*oi),new It.KX("height","thickness",oi=>7+3*oi),new It.KX("segmentOffset","thickness",oi=>new It.E9(-15,4+1.5*oi))),St(It.bn,{segmentIndex:0,segmentOffset:new It.E9(15,-6),segmentOrientation:It.rU.OrientMinus90,alignmentFocus:It.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new It.KX("fill","color"),new It.KX("visible","dir",oi=>oi===2),new It.KX("width","thickness",oi=>7+3*oi),new It.KX("height","thickness",oi=>7+3*oi),new It.KX("segmentOffset","thickness",oi=>new It.E9(-15,4+1.5*oi))),St(It.al,{alignmentFocus:new It.z6(0,1,-4,0),editable:!0},new It.KX("text").makeTwoWay(),new It.KX("stroke","color"))),Je.current.linkTemplate.selectionAdornmentTemplate=St(It.uz,St(It.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Qn(2)},new It.KX("pathPattern","thickness",Qn)),Si({alignmentFocus:new It.z6(0,0,-6,-4)}));function Qn(oi){return St(It.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(oi+4).toString()+" H3"})}function ii(oi){var Bi="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return oi===0?Bi="M0 0 M16 16 M0 8 L16 8":oi===2&&(Bi="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),St(It.bn,{geometryString:Bi,margin:2,background:"transparent",mouseEnter:(Gi,Ti)=>Ti.background="dodgerblue",mouseLeave:(Gi,Ti)=>Ti.background="transparent",click:en("dir",oi),contextClick:en("dir",oi)})}function ji(oi){var Bi=(Gi,Ti)=>{Gi.handled=!0,Gi.diagram.model.commit(Qi=>{var gr=Ti.part.adornedPart;Qi.set(gr.data,oi?"toSpot":"fromSpot",It.z6.stringify(It.z6.AllSides)),(oi?gr.toNode:gr.fromNode).invalidateConnectedLinks()})};return St(It.bn,{width:12,height:12,fill:"transparent",mouseEnter:(Gi,Ti)=>Ti.background="dodgerblue",mouseLeave:(Gi,Ti)=>Ti.background="transparent",click:Bi,contextClick:Bi})}function cn(oi,Bi){var Gi=0,Ti=It.z6.RightSide;oi.equals(It.z6.Top)?(Gi=270,Ti=It.z6.TopSide):oi.equals(It.z6.Left)?(Gi=180,Ti=It.z6.LeftSide):oi.equals(It.z6.Bottom)&&(Gi=90,Ti=It.z6.BottomSide),Bi||(Gi-=180);var Qi=(gr,hr)=>{gr.handled=!0,gr.diagram.model.commit(Ki=>{var Sr=hr.part.adornedPart;Ki.set(Sr.data,Bi?"toSpot":"fromSpot",It.z6.stringify(Ti)),(Bi?Sr.toNode:Sr.fromNode).invalidateConnectedLinks()})};return St(It.bn,{alignment:oi,alignmentFocus:oi.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:Gi,background:"transparent",mouseEnter:(gr,hr)=>hr.background="dodgerblue",mouseLeave:(gr,hr)=>hr.background="transparent",click:Qi,contextClick:Qi})}Je.current.linkTemplate.contextMenu=St("ContextMenu",yn(),Wn(),St("ContextMenuButton",St(It.s_,"Horizontal",ii(0),ii(1),ii(2))),St("ContextMenuButton",St(It.s_,"Horizontal",St(It.s_,"Spot",ji(!1),cn(It.z6.Top,!1),cn(It.z6.Left,!1),cn(It.z6.Right,!1),cn(It.z6.Bottom,!1)),St(It.s_,"Spot",{margin:new It.Zt(0,0,0,2)},ji(!0),cn(It.z6.Top,!0),cn(It.z6.Left,!0),cn(It.z6.Right,!0),cn(It.z6.Bottom,!0)))));const Yi=`{ "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 $i=["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 Wi(oi){return console.log("shapeName:",oi),$i.indexOf(oi)>=0}var ln=new It.YI(vn.current,{maxSelectionCount:1,linkTemplate:St(It.rU,{locationSpot:It.z6.Center,selectionAdornmentTemplate:St(It.uz,"Link",{locationSpot:It.z6.Center},St(It.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),St(It.bn,{toArrow:"Standard",stroke:null}))},{routing:It.rU.AvoidsNodes,curve:It.rU.JumpOver,corner:5,toShortLength:4},new It.KX("points"),St(It.bn,{isPanelMain:!0,strokeWidth:2}),St(It.bn,{toArrow:"Standard",stroke:null})),model:new It.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...It.bn.getFigureGenerators().toArray().map(oi=>({text:"\u672A\u547D\u540D",size:"100 100",figure:oi.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Je.current.addDiagramListener("TextEdited",function(oi){var Bi;const Gi=oi.subject.part;var Ti=(Bi=document.activeElement)==null?void 0:Bi.value;typeof Ti=="string"&&Ti.trim()===""&&Je.current.model.commit(function(Qi){Qi.set(Gi.data,"text","\u672A\u547D\u540D"),Je.current.commandHandler.stopCommand()},"increment")}),ln.nodeTemplate=St(It.NB,"Auto",{locationSpot:It.z6.Center},new It.KX("location","location",It.E9.parse).makeTwoWay(It.E9.stringify),St(It.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 It.KX("stroke").makeTwoWay(),new It.KX("fill").makeTwoWay(),new It.KX("figure")),St(It.al,{margin:new It.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new It.$u(16,16),maxSize:new It.$u(10,NaN),textAlign:"center",editable:!0},new It.KX("key").makeTwoWay())),setTimeout(()=>{Je.current.grid=St(It.s_,"Grid",St(It.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),St(It.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Je.current.grid.visible=!0,Je.current.grid.gridCellStroke="darkgray",Je.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Je.current,Je.current}const Jn=()=>qe(this,null,function*(){var St,Nn=Je.current.makeImage();const qn=yield(0,Pe.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:Nn.src,file_data:JSON.stringify({login:(St=(0,Ae.eY)())==null?void 0:St.login,data:JSON.parse(Je.current.model.toJson())})}});$t({src:qn.url})});return(0,ge.useEffect)(()=>(setTimeout(()=>{Dn()},500),En(on+1),()=>{Je.current=null}),[]),ye.createElement("div",{ref:st,className:Ft.current?`${Fe.maxH60} body-overflow-initial`:"body-overflow-initial"},ye.createElement(rn.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!on,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:ye.createElement(An.Z,null,ye.createElement(Ee.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),ye.createElement(Ee.Z,{onClick:()=>{var St,Nn,qn=Je.current.selection.first();if(Ft.current=!Ft.current,document.activeElement&&qn){let Si=(Nn=(St=document.activeElement)==null?void 0:St.value)==null?void 0:Nn.trim();typeof Si=="string"&&Je.current.model.commit(function(en){en.set(qn.data,"text",Si||"\u672A\u547D\u540D"),Je.current.commandHandler.stopCommand()},"increment")}En(on+1)}},ye.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:kt},ye.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:Fe.flowChartWrp},ye.createElement("div",{style:{display:"flex",height:"100%"}},ye.createElement("div",{style:{width:"300px",height:"100%"}},ye.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),ye.createElement("div",{style:{height:"calc(100% - 50px)"},className:Fe.myPaletteDiv,ref:vn})),ye.createElement("div",{style:{flex:1,position:"relative"}},ye.createElement("div",{ref:qt,style:{height:"80vh"}}))),ye.createElement("div",{className:"tr"},ye.createElement(Ze.ZP,{size:"large",onClick:Jn,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var et=vt,Ye=pe(5112),xt=pe(5871);const yt=Ye.ZP.Group,at={margin:"0 8px"};var zt=({callback:kt,onCancel:$t})=>{function Je(qt){kt(qt)}return ge.createElement(Qe.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Je},ge.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},ge.createElement("span",{style:at},"\u5355\u5143\u683C\u6570\uFF1A"),ge.createElement("span",{style:at},"\u884C\u6570"),ge.createElement(Qe.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},ge.createElement(xt.Z,null)),ge.createElement("span",{style:at},"\u5217\u6570"),ge.createElement(Qe.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},ge.createElement(xt.Z,null))),ge.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},ge.createElement("span",{style:at},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),ge.createElement(Qe.default.Item,{name:"align"},ge.createElement(yt,null,ge.createElement(Ye.ZP,{value:"default"},ge.createElement("i",{className:"fa fa-align-justify"})),ge.createElement(Ye.ZP,{value:"left"},ge.createElement("i",{className:"fa fa-align-left"})),ge.createElement(Ye.ZP,{value:"center"},ge.createElement("i",{className:"fa fa-align-center"})),ge.createElement(Ye.ZP,{value:"right"},ge.createElement("i",{className:"fa fa-align-right"}))))),ge.createElement("div",{className:"flex-container flex-end"},ge.createElement(Ze.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ge.createElement(Ze.ZP,{type:"ghost",onClick:$t},"\u53D6\u6D88")))},un=pe(78673),fn=pe(80727),Qt=pe.n(fn),On=(0,ge.forwardRef)(({use3d:kt,width:$t,height:Je,callback:qt,showSaveButton:vn},Ft)=>{const st=(0,ge.useRef)(),on=(0,ge.useRef)(),[En,Dn]=(0,ge.useState)(!1),Jn=(0,ge.useRef)({id:st,appName:"graphing",width:$t||1e3,height:Je||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,ge.useEffect)(()=>{on.current=new(Qt())(Jn.current,!0),window.onload=function(){on.current.inject("applet_container")}},[]);const St=()=>{var Nn=window.ggbApplet.getPNGBase64(1,!0,72);return qt&&qt(Nn),Nn};return(0,ge.useEffect)(()=>{Jn.current.appName=En?"3D":"graphing",on.current.inject("applet_container")},[En]),(0,ge.useEffect)(()=>{Dn(kt)},[kt]),(0,ge.useImperativeHandle)(Ft,()=>({getImgData:St})),ge.createElement(ge.Fragment,null,ge.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:st}),ge.createElement(An.Z,{align:"middle"},ge.createElement(Ee.Z,{flex:1},ge.createElement(un.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:En,onChange:Nn=>Dn(Nn)})),ge.createElement(Ee.Z,null,ge.createElement(Ze.ZP,{size:"large",onClick:St,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),jt=pe(41588),sn=pe(8591);const jn="link",dn="upload-image",Pn="add-flowchart",ui="draw-image",pi="add-flowchart",gi="code-block",bi="add-table",Xi="------------",ar={default:Xi,left:`:${Xi}`,center:`:${Xi}:`,right:`${Xi}:`};var Ji=pe(58856);function wr(){}let mr=0;const Hi=1e4,Er="\u2581",$n="@\u2581\u2581@",Le="@\u2581@",Ei=`
|
|
|
**\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`,Ri=["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 nn(kt){return/^\d+$/.test(kt)?`${kt}px`:kt}const yi=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Li={[yi+"-B"]:"bold",[yi+"-I"]:"italic"},Tn={[jn]:"\u6DFB\u52A0\u94FE\u63A5",[gi]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[dn]:"\u6DFB\u52A0\u56FE\u7247",[ui]:"\u6DFB\u52A0\u753B\u56FE",[Pn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[bi]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Un=({defaultValue:kt="",onChange:$t,width:Je="100%",height:qt=400,miniToolbar:vn=!1,isFocus:Ft=!1,watch:st,insertTemp:on,mode:En="markdown",id:Dn="markdown-editor-id",showResizeBar:Jn=!1,noStorage:St=!1,showNullButton:Nn=!1,showNullProgramButton:qn=!1,hidetoolBar:Si=!1,fullScreen:en=!1,onBlur:Cn,onCMBeforeChange:At,onFullScreen:yn,className:pn="",disablePaste:mn=!1,disabled:Wn=!1,disabledFill:Hn=!1,placeholder:Qn="",values:ii="",extraUse:ji})=>{const[cn,Yi]=(0,ge.useState)(null),[$i,Wi]=(0,ge.useState)(kt),[ln,oi]=(0,ge.useState)(st),[Bi,Gi]=(0,ge.useState)(en),[Ti,Qi]=(0,ge.useState)(""),[gr,hr]=(0,ge.useState)(0),[Ki,Sr]=(0,ge.useState)(qt),[kn,Br]=(0,ge.useState)(!1),[_n,Or]=(0,ge.useState)(0),[no,br]=(0,ge.useState)(0),mo=(0,ge.useRef)(),Jr=(0,ge.useRef)(),ur=(0,ge.useRef)(),er=(0,ge.useRef)();(0,ge.useEffect)(()=>{const Mr=window.scrollY||window.pageYOffset;Wi(ii),cn==null||cn.setValue(ii),window.scrollTo(0,Mr)},[ii]),(0,ge.useEffect)(()=>{yn==null||yn(Bi)},[Bi]),(0,ge.useEffect)(()=>{if(mo.current){let Mr=function(fi,Tr){var Bo;if(mn){Tr.preventDefault();return}const aa=Tr.clipboardData;if(aa){const Ho=aa.types.toString(),Ao=aa.items;if(Ho==="Files"||aa.types.indexOf("Files")>-1){if(Tr.preventDefault(),En=="stex")return;try{let _o=Ao[1];((Bo=Ao[0])==null?void 0:Bo.kind)==="file"&&(_o=Ao[0]);const ta=_o.getAsFile(),Ea=ta.name.split(".").pop();(0,Gt.I)(ta,Mt=>{var Pi,Ut,Ui;Mt.id?((Pi=ta==null?void 0:ta.type)==null?void 0:Pi.indexOf("image"))>-1?Nr.replaceSelection(`<img width="100%" src="/api/attachments/${Mt.id}?type=${Mt.content_type})" alt="" />`):((Ut=ta==null?void 0:ta.type)==null?void 0:Ut.indexOf("video"))>-1?Nr.replaceSelection(`<video width="100%" controls src="/api/attachments/${Mt.id}"></video>`):((Ui=ta==null?void 0:ta.type)==null?void 0:Ui.indexOf("pdf"))>-1?Nr.replaceSelection(`<a href="/api/attachments/${Mt.id}?type=${ta.type}&disposition=inline" target="_blank">${ta.name}</a>`):Ri.includes(Ea)?Nr.replaceSelection(`<a href="/api/attachments/${Mt.id}?type=office&disposition=inline" target="_blank">${ta.name}</a>`):Nr.replaceSelection(`[${ta.name}](/api/attachments/${Mt.id}?type=${Mt.content_type})`):(Mt==null?void 0:Mt.status)===401&&(document.location.href="/user/login")})}catch(_o){sn.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Nr=Ke().fromTextArea(mo.current,{mode:En,lineNumbers:!vn,lineWrapping:!0,value:kt,autoCloseTags:!0,autoCloseBrackets:!0});return Nr.on("keyup",function(fi,Tr){Tr.keyCode===8&&(fi.getValue()==""?Nr.setOption("placeholder",Qn):Nr.setOption("placeholder",null))}),Nr.on("keydown",function(fi,Tr){if(Tr.keyCode===8){var Bo=Rr(fi);Bo&&Tr.preventDefault()}}),Ft&&Nr.focus(),Nr.on("paste",Mr),Wn&&Nr.on("beforeChange",function(fi,Tr){(Tr.origin==="paste"||Tr.origin==="+input")&&Tr.cancel()}),Yi(Nr),()=>{Nr.off("paste",Mr)}}},[]);const qi=(0,ge.useCallback)(()=>{if(Jr.current)try{}catch(Mr){console.log(Mr,"---- to set md editor body height")}},[Ki,Jr,Bi]);(0,ge.useEffect)(()=>{function Mr(){let Nr=new ut.Z(fi=>{for(let Tr of fi)(Tr.target.offsetHeight>0||Tr.target.offsetWidth>0)&&(qi(),cn.setSize("100%","100%"),cn.refresh())});return Nr.observe(mo.current.parentElement),Nr}if(cn){const Nr=Mr();return()=>{var fi,Tr;(fi=mo.current)!=null&&fi.parentElement&&Nr.unobserve((Tr=mo.current)==null?void 0:Tr.parentElement)}}},[cn,qi]),(0,ge.useEffect)(()=>{if(cn){let Mr=[];for(const[Nr,fi]of Object.entries(Li)){let Tr={[Nr]:()=>{Ii(fi)}};Mr.push(Tr),cn.addKeyMap(Tr)}return()=>{for(let Nr of Mr)cn.removeKeyMap(Nr)}}},[cn]),(0,ge.useEffect)(()=>{en!==Bi&&Gi(en)},[en]),(0,Ji.Z)(()=>{if(!St&&gr>0){let Mr=new Date().getTime(),Nr=window.sessionStorage.getItem(Dn);Mr>=gr+Hi&&(!Nr||Nr!==$i)&&(window.sessionStorage.setItem(Dn,$i),Br(!0))}},Hi),(0,ge.useEffect)(()=>{oi(st)},[cn,st]),(0,ge.useEffect)(()=>{cn&&Ft&&cn.focus()},[cn,Ft]),(0,ge.useEffect)(()=>{if(ln&&cn){let Mr=function(fi){let Tr=fi.target;if(er.current){let Bo=Tr.scrollTop/Tr.scrollHeight;er.current.scrollTop=er.current.scrollHeight*Bo}};const Nr=cn.getScrollerElement();return Nr.addEventListener("scroll",Mr),()=>{Nr.removeEventListener("scroll",Mr)}}},[cn,ln]),(0,ge.useEffect)(()=>{if(cn&&At){let Mr=function(Nr,fi){At(Nr,fi)};return cn.on("beforeChange",Mr),()=>{cn.off("beforeChange",Mr)}}},[cn,At]),(0,ge.useEffect)(()=>{if(cn&&Cn){let Mr=function(){Cn(cn.getValue())};return cn.on("blur",Mr),()=>{cn.off("blur",Mr)}}},[cn,Cn]);function Rr(Mr,Nr){var fi=Mr.getDoc(),Tr=fi.getCursor(),Bo=fi.getLine(Tr.line),aa=Bo.charAt(Tr.ch-1),Ho=Bo.lastIndexOf("@\u2581@",Tr.ch),Ao=Bo.lastIndexOf("@\u2581\u2581@",Tr.ch),_o=Ho>Ao?Ho:Ao,ta=Ho>Ao?3:4;if($n.indexOf(aa)===-1)return null;if(console.log("change1:",Nr,Mr,Bo,Tr,_o,Ho,Ao,aa),_o>=0&&Tr.ch-_o<5){var Ea=_o+ta;return fi.replaceRange("",{line:Tr.line,ch:_o},{line:Tr.line,ch:Ea}),{line:Tr.line,ch:Ea}}return null}(0,ge.useEffect)(()=>{if(cn){let Mr=function(Nr,fi){const Tr=Nr.getValue();Wi(Tr),hr(new Date().getTime()),Nr.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),$t&&(qn?$t(Tr,Fr(Tr)):$t(Tr))};return cn.on("change",Mr),()=>{cn.off("change",Mr)}}},[cn,$t]),(0,ge.useEffect)(()=>{if(cn)if(kt==null)cn.setValue(""),Wi("");else{const Mr=window.scrollY||window.pageYOffset;kt!==cn.getValue()&&(cn.setValue(kt),Wi(kt),cn.setCursor(Wn?1:cn.lineCount(),0),window.scrollTo(0,Mr))}},[cn,kt]);const Ii=(0,ge.useCallback)(Mr=>{const Nr=cn.getCursor(),fi=cn.getSelection();let Tr=fi.split(`
|
|
|
`);switch(Mr){case"bold":return cn.replaceSelection("**"+fi+"**"),fi===""&&cn.setCursor(Nr.line,Nr.ch+2),cn.focus();case"italic":return cn.replaceSelection("*"+fi+"*"),fi===""&&cn.setCursor(Nr.line,Nr.ch+1),cn.focus();case"code":return cn.replaceSelection("`"+fi+"`"),fi===""&&cn.setCursor(Nr.line,Nr.ch+1),cn.focus();case"inline-latex":return Qi("inline-latex"),cn.focus();case"latex":return cn.replaceSelection("```latex\n"+fi+"\n```"),cn.setCursor(Nr.line+1,fi.length+1),cn.focus();case"line-break":return cn.replaceSelection(`<br/>
|
|
|
`),cn.focus();case"list-ul":return fi===""?cn.replaceSelection("- "+fi):cn.replaceSelection(Tr.map(Bo=>Bo===""?"":`- ${Bo}`).join(`
|
|
|
`)),cn.focus();case"list-ol":return fi===""?cn.replaceSelection("1. "+fi):cn.replaceSelection(Tr.map((Bo,aa)=>Bo===""?"":`${aa+1}. ${Bo}`).join(`
|
|
|
`)),cn.focus();case"add-null-ch":return fi===""&&cn.setCursor(Nr.line,Nr.ch),cn.replaceSelection(Er),cn.focus();case"add-signal":return fi===""&&cn.setCursor(Nr.line,Nr.ch),cn.replaceSelection(Le),cn.focus();case"add-multiple":return fi===""&&cn.setCursor(Nr.line,Nr.ch),cn.replaceSelection($n),cn.focus();case"inster-template-1":return fi===""&&cn.setCursor(Nr.line,Nr.ch),cn.replaceSelection(Ei),cn.focus();case"eraser":return cn.setValue(""),cn.focus();case"trigger-watch":return oi(!ln),cn.focus();case"trigger-full-screen":return Gi(!Bi),cn.focus();case jn:Qi(jn);return;case gi:Qi(gi);return;case dn:Qi(dn);return;case ui:Qi(ui);return;case"maths-latex":Qi("maths-latex");return;case Pn:Qi(Pn);return;case bi:Qi(bi);return;default:throw new Error}},[cn,ln,Bi]),tt=(0,ge.useCallback)((Mr,Nr)=>{var fi,Tr,Bo,aa,Ho,Ao;switch(Qi(""),Ti){case jn:const{title:Pi,link:Ut}=Mr;return cn.replaceSelection(`[${Pi}](${Ut})`),cn.focus();case gi:const{language:Ui,content:wi}=Mr;return cn.replaceSelection(["```"+Ui,wi,"```"].join(`
|
|
|
`)),cn.focus();case"maths-latex":for(var _o=atob(Mr),ta=new Uint8Array(_o.length),Ea=0;Ea<_o.length;Ea++)ta[Ea]=_o.charCodeAt(Ea);var Mt=new Blob([ta],{type:"image/png"});(0,Gt.I)(Mt,vr=>{vr.id?cn.replaceSelection(``):(vr==null?void 0:vr.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":cn.replaceSelection("`$$"+Mr+"$$`");break;case dn:case ui:case pi:const{src:yr,alt:Zi}=Mr,Ci=Nr,nr=(Bo=(Tr=(fi=Ci==null?void 0:Ci.name)==null?void 0:fi.split("."))==null?void 0:Tr.pop)==null?void 0:Bo.call(Tr);return((aa=Ci==null?void 0:Ci.type)==null?void 0:aa.indexOf("image"))>-1||!(Ci!=null&&Ci.type)?Ci!=null&&Ci.align||Ci!=null&&Ci.width?cn.replaceSelection(`<p style="text-align:${Ci.align||"initial"}"><img width="${Ci.width?Ci.width+"%":"initial"}" src="${yr}" alt="${Zi||""}" /></p>`):cn.replaceSelection(`<img width="100%" src="${yr}" alt="${Zi||""}" />`):((Ho=Ci==null?void 0:Ci.type)==null?void 0:Ho.indexOf("video"))>-1?cn.replaceSelection(`<video width="100%" controls src="${yr}"></video>`):((Ao=Ci==null?void 0:Ci.type)==null?void 0:Ao.indexOf("pdf"))>-1?cn.replaceSelection(`<a href="${yr}?type=${Ci.type}&disposition=inline" target="_blank">${Ci.name}</a>`):Ri.includes(nr)?cn.replaceSelection(`<a href="${yr}?type=office&disposition=inline" target="_blank">${Ci.name}</a>`):cn.replaceSelection(`[${Ci.name}](${yr})`),cn.focus();case bi:const{row:rr,col:cr,align:xr}=Mr;let Gr=`
|
|
|
`;for(let vr=0;vr<rr;vr++){let kr=[],Zr=[];for(let Oi=0;Oi<cr;Oi++)vr===1&&Zr.push(ar[xr]),kr.push(" ");vr===1&&(Gr+=`| ${Zr.join(" | ")} |
|
|
|
`),Gr+=`| ${kr.join(cr===1?"":" | ")} |
|
|
|
`}return cn.replaceSelection(Gr+`
|
|
|
`),cn.focus();default:throw new Error}},[cn,Ti]),Qr=(0,ge.useMemo)(()=>{switch(Ti){case jn:return ge.createElement(Ln,{callback:tt,onCancel:lo});case gi:return ge.createElement(Fn.Z,{callback:tt,onCancel:lo});case dn:return ge.createElement(Gt.Z,{callback:tt,onCancel:lo});case Pn:return ge.createElement(et,{callback:tt,onCancel:lo});case bi:return ge.createElement(zt,{callback:tt,onCancel:lo});case"maths-latex":return ge.createElement(On,{showSaveButton:!0,callback:tt});case"inline-latex":return ge.createElement(jt.Z,{showSaveButton:!0,callback:tt});default:return null}},[Ti]);function lo(){Qi("")}(0,ge.useEffect)(()=>{if(ur.current){let Mr=function(Ho){Bo=!0,aa=Ho.pageY},Nr=function(){Bo=!1},fi=function(Ho){if(Bo){let Ao=Ho.pageY-aa;Ao<0&&(Ao=0),Ao>300&&(Ao=300);let _o=qt+Ao+"px";Sr(_o)}},Tr=ur.current,Bo=!1,aa=0;return Tr.addEventListener("mousedown",Mr),document.addEventListener("mousemove",fi),document.addEventListener("mouseup",Nr),()=>{Tr.removeEventListener("mousedown",Mr),document.removeEventListener("mousemove",fi),document.removeEventListener("mouseup",Nr)}}},[cn,ur]),(0,ge.useEffect)(()=>{Sr(qt)},[qt]);const jr=nn(Je),vo=nn(Ki),po={width:jr,height:vo},Lr=(0,ge.useMemo)(()=>{if(gr){let Mr=new Date(gr),Nr=Mr.getHours(),fi=Mr.getMinutes(),Tr=Mr.getSeconds();return Nr=Nr<10?"0"+Nr:Nr,fi=fi<10?"0"+fi:fi,Tr=Tr<10?"0"+Tr:Tr,`${Nr}:${fi}:${Tr}`}return 0},[gr]),Fr=Mr=>{const Nr=[];if(qn){let fi=-1;Mr=Mr.replace(/(@▁▁@|@▁@)/g,function(Tr,Bo,aa){Nr.push({multiLine:Tr!==Le})})}return Nr};function uo(){window.sessionStorage.removeItem(Dn),Br(!1),hr(0)}function qr(){Br(!1),hr(0),cn.setValue(window.sessionStorage.getItem(Dn))}(0,ge.useEffect)(()=>{Tn[Ti]&&Ti!==ui&&Ti!==Pn&&setTimeout(()=>{const Mr=document.getElementsByClassName("markdown-popup-form")[0],Nr=window.innerWidth/2-Mr.offsetWidth/2,fi=window.innerHeight/2-Mr.offsetHeight/2;Or(Nr),br(fi)},0)},[Ti]);const zo=Mr=>{Mr.preventDefault();const Nr=Mr.clientX-_n,fi=Mr.clientY-no;document.body.onmousemove=Tr=>{let Bo=Tr.clientX-Nr,aa=Tr.clientY-fi;const Ho=document.getElementsByClassName("markdown-popup-form")[0],Ao=window.innerWidth-Ho.offsetWidth,_o=window.innerHeight-Ho.offsetHeight;Bo=Math.max(0,Math.min(Bo,Ao)),aa=Math.max(0,Math.min(aa,_o)),Ro(Tr.clientX,Tr.clientY,Nr,fi)&&(Or(Bo),br(aa))},document.body.onmouseup=function(){document.body.onmousemove=null}},Ro=(Mr,Nr,fi,Tr)=>{const Bo=document.body.clientHeight,aa=document.body.clientWidth;return Mr<20&&fi>Mr||Mr>aa-20&&fi<Mr||Nr<20&&Tr>Nr||Nr>Bo-20&&Tr<Nr?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return ge.createElement(ge.Fragment,null,ge.createElement("div",{className:"markdown-editor-wrapper",ref:Jr},ge.createElement("div",{className:`markdown-editor-container ${pn} ${ln?"on-preview":""} ${vn?"mini":""} ${Bi?"full-screen":""}`,style:po},ge.createElement(We,{insertTemp:on,watch:ln,fullScreen:Bi,showNullButton:Nn,showNullProgramButton:qn,onActionCallback:Ii,hidetoolBar:Si,extraUse:ji}),ge.createElement("div",{className:"markdown-editor-body"},ge.createElement("div",{className:"codemirror-container"},ge.createElement("textarea",{ref:mo,placeholder:Qn})),ln?ge.createElement("div",{ref:er,className:"preview-container"},En==="stex"&&ge.createElement(dt,{value:$i}),En!=="stex"&&ge.createElement(Lt.Z,{disabledFill:Hn,showProgramFill:qn,value:$i})):null))),Jn?ge.createElement("a",{ref:ur,className:"editor-resize"}):null,Ti===ui&&ge.createElement(Yn,{callback:tt,onCancel:lo}),Ti===Pn&&ge.createElement(et,{callback:tt,onCancel:lo}),ge.createElement(rt.Z,null,Tn[Ti]&&Ti!==ui&&Ti!==Pn?ge.createElement(rn.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:_n,top:no},title:ge.createElement("div",{style:{cursor:"move"},onMouseDown:zo},Tn[Ti]),open:!0,onCancel:lo,footer:null,destroyOnClose:!0,width:Ti===Pn?"1200px":null,height:Ti===Pn?"80vh":null,className:"markdown-popup-form"},Qr):null))}},28451:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Be},I:function(){return We}});var ge=pe(78241),Oe=pe(8591),Ke=pe(92832),ut=pe(81327),Ge=pe(5871),Xe=pe(5112),Ne=pe(3113),Tt=pe(77903),Ct=pe(59301),Ve=pe(59301),Lt=Object.defineProperty,dt=Object.defineProperties,Rt=Object.getOwnPropertyDescriptors,De=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ce=(rt,Qe,Pt)=>Qe in rt?Lt(rt,Qe,{enumerable:!0,configurable:!0,writable:!0,value:Pt}):rt[Qe]=Pt,se=(rt,Qe)=>{for(var Pt in Qe||(Qe={}))ne.call(Qe,Pt)&&ce(rt,Pt,Qe[Pt]);if(De)for(var Pt of De(Qe))ee.call(Qe,Pt)&&ce(rt,Pt,Qe[Pt]);return rt},he=(rt,Qe)=>dt(rt,Rt(Qe));const{useForm:ve}=ge.default,be={width:280,marginRight:10},ke={labelCol:{span:5},wrapperCol:{span:19}};var Be=({callback:rt,onCancel:Qe})=>{const[Pt]=ve();let Ze=(0,Ct.useRef)();function Et(ht){Ze.current.width=Pt.getFieldValue("width"),Ze.current.align=Pt.getFieldValue("align"),rt(ht,Ze.current)}function it(ht,Ht){if(ht.status===-1){Oe.ZP.error(ht.message);return}Pt.setFieldsValue({src:`/api/attachments/${ht.id}`,type:Ht.type})}function Dt(ht){let Ht=ht.target.files[0];Ze.current=Ht,We(Ht,it)}return Ve.createElement(ge.default,he(se({form:Pt},ke),{className:"upload-image-panel",onFinish:Et,style:{width:470,overflow:"hidden"}}),Ve.createElement(ge.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},Ve.createElement("div",{className:"flex-container"},Ve.createElement(ge.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},Ve.createElement(Ke.default,{style:be})),Ve.createElement(He,{onFileChange:Dt}))),Ve.createElement(ge.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},Ve.createElement(Ke.default,{style:{width:264}})),Ve.createElement(ge.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},Ve.createElement(ut.Z,null,Ve.createElement(ge.default.Item,{name:"width",style:{margin:0}},Ve.createElement(Ge.Z,{style:{width:264}})),Ve.createElement("span",{className:"ml8"},"%"))),Ve.createElement(ge.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},Ve.createElement(Xe.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"}]})),Ve.createElement("aside",null,Ve.createElement(ge.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},Ve.createElement(Ne.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Ve.createElement(Ne.ZP,{type:"default",onClick:Qe},"\u53D6\u6D88"))))};function He({onFileChange:rt}){return Ve.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",Ve.createElement("input",{type:"file",onChange:rt}))}function We(rt,Qe){if(!rt)throw new String("\u6CA1\u6709\u6587\u4EF6");let Pt=new FormData;Pt.append("editormd-image-file",rt),Pt.append("file_param_name","editormd-image-file"),Pt.append("byxhr","true");var Ze=new window.XMLHttpRequest;Ze.withCredentials=!0,Ze.addEventListener("load",function(Et){Qe(JSON.parse(Et.target.responseText),rt)},!1),Ze.addEventListener("error",function(Et){console.error(Et)},!1),Ze.open("POST",`${Tt.KI}/api/attachments.json`),Ze.send(Pt)}},79346:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Ke}});var ge=pe(59301),Oe=pe(4676);class Ke extends ge.Component{constructor(Ge){super(Ge);const Xe=window.document;this.node=Xe.createElement("div"),Xe.body.appendChild(this.node)}render(){const{children:Ge}=this.props;return(0,Oe.createPortal)(Ge,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},23954:function(Vn,xn,pe){"use strict";pe.d(xn,{SV:function(){return qe},ZP:function(){return ye}});var ge=pe(59301),Oe=pe(76374);const Ke={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"]},ut={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"]},Ge={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(`
|
|
|
`)}]},Xe={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(`
|
|
|
`)}]},Ne={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 Tt=pe(53184),Ct=pe.n(Tt),Ve=Object.defineProperty,Lt=Object.defineProperties,dt=Object.getOwnPropertyDescriptors,Rt=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable,ee=(vt,et,Ye)=>et in vt?Ve(vt,et,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):vt[et]=Ye,ce=(vt,et)=>{for(var Ye in et||(et={}))De.call(et,Ye)&&ee(vt,Ye,et[Ye]);if(Rt)for(var Ye of Rt(et))ne.call(et,Ye)&&ee(vt,Ye,et[Ye]);return vt},se=(vt,et)=>Lt(vt,dt(et)),he=(vt,et,Ye)=>new Promise((xt,yt)=>{var at=fn=>{try{un(Ye.next(fn))}catch(Qt){yt(Qt)}},zt=fn=>{try{un(Ye.throw(fn))}catch(Qt){yt(Qt)}},un=fn=>fn.done?xt(fn.value):Promise.resolve(fn.value).then(at,zt);un((Ye=Ye.apply(vt,et)).next())});const ve={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"]}},be=(vt,et)=>et.map(Ye=>({label:Ye,kind:vt.languages.CompletionItemKind.Keyword,insertText:Ye})),ke=vt=>Object.keys(ve.tables).map(et=>({label:et,kind:vt.languages.CompletionItemKind.Variable,insertText:et})),Be=(vt,et)=>{const Ye=ve.tables[vt];return Ye?Ye.map(xt=>({label:xt,kind:et.languages.CompletionItemKind.Field,insertText:xt})):[]};function He(vt,et,Ye,xt,yt){let at=et.getWordUntilPosition(Ye),zt={startLineNumber:Ye.lineNumber,endLineNumber:Ye.lineNumber,startColumn:at.startColumn,endColumn:at.endColumn},un=xt.map(fn=>({label:fn,kind:vt.languages.CompletionItemKind.Keyword,insertText:fn,insertTextRules:vt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:zt}));return yt.map(fn=>{un.push(se(ce({},fn),{range:zt}))}),un}var We=vt=>{ve.languages.map(yt=>(vt.languages.registerDocumentFormattingEditProvider(yt,{provideDocumentFormattingEdits(at,zt,un){return he(this,null,function*(){const fn=Ct()(at.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1});return[{range:at.getFullModelRange(),text:fn}]})}}),yt));const et=Ge.quickKey.map(yt=>({label:yt.label,kind:vt.languages.CompletionItemKind.Method,insertText:yt.content,insertTextRules:vt.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Ye=Xe.quickKey.map(yt=>({label:yt.label,kind:vt.languages.CompletionItemKind.Method,insertText:yt.content,insertTextRules:vt.languages.CompletionItemInsertTextRule.InsertAsSnippet})),xt=ut.quickKey.map(yt=>({label:yt.label,kind:vt.languages.CompletionItemKind.Method,insertText:yt.content,insertTextRules:vt.languages.CompletionItemInsertTextRule.InsertAsSnippet}));vt.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(yt,at){var zt=yt.getWordUntilPosition(at),un={startLineNumber:at.lineNumber,endLineNumber:at.lineNumber,startColumn:zt.startColumn,endColumn:zt.endColumn},fn=yt.getLineContent(at.lineNumber).substring(zt.startColumn-2,zt.endColumn);return{suggestions:[...Ge.keywords.map(Qt=>({label:Qt,kind:vt.languages.CompletionItemKind.Function,documentation:Qt,insertText:Qt,insertTextRules:vt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:un})),...Ge.quickKey.map(Qt=>({label:Qt.label,kind:vt.languages.CompletionItemKind.Function,documentation:Qt.content,insertText:fn.startsWith("#")?Qt.content.replace(/#/,""):Qt.content,insertTextRules:vt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:un}))]}}}),vt.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(yt,at){var zt=yt.getWordUntilPosition(at),un={startLineNumber:at.lineNumber,endLineNumber:at.lineNumber,startColumn:zt.startColumn,endColumn:zt.endColumn};return{suggestions:[...Ke.keywords.map(fn=>({label:fn,kind:vt.languages.CompletionItemKind.Function,documentation:fn,insertText:fn,insertTextRules:vt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:un}))]}}}),vt.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(yt,at){var zt=yt.getWordUntilPosition(at),un={startLineNumber:at.lineNumber,endLineNumber:at.lineNumber,startColumn:zt.startColumn,endColumn:zt.endColumn},fn=yt.getLineContent(at.lineNumber).substring(zt.startColumn-2,zt.endColumn);return{suggestions:[...ut.keywords.map(Qt=>({label:Qt,kind:vt.languages.CompletionItemKind.Function,documentation:Qt,insertText:Qt,insertTextRules:vt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:un})),...ut.quickKey.map(Qt=>({label:Qt.label,kind:vt.languages.CompletionItemKind.Function,documentation:Qt.content,insertText:fn.startsWith("#")?Qt.content.replace(/#/,""):Qt.content,insertTextRules:vt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:un}))]}}}),vt.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(yt,at){var zt=yt.getWordUntilPosition(at),un={startLineNumber:at.lineNumber,endLineNumber:at.lineNumber,startColumn:zt.startColumn,endColumn:zt.endColumn},fn=yt.getLineContent(at.lineNumber).substring(zt.startColumn-2,zt.endColumn);return{suggestions:[...Ne.keywords.map(Qt=>({label:Qt,kind:vt.languages.CompletionItemKind.Function,documentation:Qt,insertText:Qt,insertTextRules:vt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:un})),...Ne.quickKey.map(Qt=>({label:Qt.label,kind:vt.languages.CompletionItemKind.Function,documentation:Qt.content,insertText:fn.startsWith("#")?Qt.content.replace(/#/,""):Qt.content,insertTextRules:vt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:un}))]}}}),vt.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(yt,at){var zt=yt.getWordUntilPosition(at),un={startLineNumber:at.lineNumber,endLineNumber:at.lineNumber,startColumn:zt.startColumn,endColumn:zt.endColumn},fn=yt.getLineContent(at.lineNumber).substring(zt.startColumn-2,zt.endColumn);return{suggestions:[...Xe.keywords.map(Qt=>({label:Qt,kind:vt.languages.CompletionItemKind.Function,documentation:Qt,insertText:Qt,insertTextRules:vt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:un})),...Xe.quickKey.map(Qt=>({label:Qt.label,kind:vt.languages.CompletionItemKind.Function,documentation:Qt.content,insertText:fn.startsWith("#")?Qt.content.replace(/#/,""):Qt.content,insertTextRules:vt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:un}))]}}})};const rt="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Qe=Object.defineProperty,Pt=(vt,et,Ye)=>et in vt?Qe(vt,et,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):vt[et]=Ye,Ze=(vt,et,Ye)=>Pt(vt,typeof et!="symbol"?et+"":et,Ye);const Et=class mx{constructor(et,Ye,xt){this.placeholder=et,this.editor=Ye,this.monaco=xt,Ye.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)}};Ze(Et,"ID","editor.widget.placeholderHint");var Dt=Et,ht=pe(96236),Ht=pe(8591),_t=pe(6848),Vt=pe(89392),ot=pe(34604),Ue=pe(56102),Wt=Object.defineProperty,Ln=Object.defineProperties,Fn=Object.getOwnPropertyDescriptors,Gt=Object.getOwnPropertySymbols,rn=Object.prototype.hasOwnProperty,An=Object.prototype.propertyIsEnumerable,ni=(vt,et,Ye)=>et in vt?Wt(vt,et,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):vt[et]=Ye,Sn=(vt,et)=>{for(var Ye in et||(et={}))rn.call(et,Ye)&&ni(vt,Ye,et[Ye]);if(Gt)for(var Ye of Gt(et))An.call(et,Ye)&&ni(vt,Ye,et[Ye]);return vt},Yn=(vt,et)=>Ln(vt,Fn(et)),It=(vt,et)=>{var Ye={};for(var xt in vt)rn.call(vt,xt)&&et.indexOf(xt)<0&&(Ye[xt]=vt[xt]);if(vt!=null&&Gt)for(var xt of Gt(vt))et.indexOf(xt)<0&&An.call(vt,xt)&&(Ye[xt]=vt[xt]);return Ye},wn=(vt,et,Ye)=>new Promise((xt,yt)=>{var at=fn=>{try{un(Ye.next(fn))}catch(Qt){yt(Qt)}},zt=fn=>{try{un(Ye.throw(fn))}catch(Qt){yt(Qt)}},un=fn=>fn.done?xt(fn.value):Promise.resolve(fn.value).then(at,zt);un((Ye=Ye.apply(vt,et)).next())});function Gn(vt){return/^\d+$/.test(vt)?`${vt}px`:vt}function ze(){}let Ee=!1;const Pe={"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 Fe(vt=[]){let et=vt;if(Array.isArray(vt)){for(let Ye=0;Ye<vt.length;Ye++){let xt=Pe[vt[Ye]];if(xt)return xt}return et[0]}return Pe[et]||et}let Ae=null;var ye=vt=>{var et=vt,{width:Ye="100%",height:xt="100%",value:yt,language:at="javascript",style:zt={},options:un={},overrideServices:fn={},theme:Qt="vs-dark",onEditBlur:Kn,isCopy:On=!1,onSave:jt,autoHeight:sn=!1,forbidCopy:jn=!1,onChange:dn=ze,editorDidMount:Pn=ze,onFocus:ui=ze,onBreakPoint:pi=ze,breakPointValue:gi=[],filename:bi="educoder.txt",errorLine:Xi,errorContent:ar="",highlightLine:Ji,openBreakPoint:wr=!1,placeholder:mr=""}=et,Hi=It(et,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder"]);const Er=(0,ge.useRef)(),$n=(0,ge.useRef)({}),Le=(0,ge.useRef)(),Ei=(0,ge.useRef)(),Ri=(0,ge.useRef)([]),nn=(0,ge.useRef)(!1),di=(0,ge.useRef)(),yi=(0,ge.useRef)(),Li=(0,ge.useRef)(!1),[Tn,Un]=(0,ge.useState)(!1);function kt(){let en;return Er.current&&(en=new Oe.Z(Cn=>{for(let At of Cn)(At.target.offsetHeight>0||At.target.offsetWidth>0)&&$n.current.instance.layout()}),en.observe(Er.current)),en}function $t(){Ht.ZP.warning({content:decodeURIComponent(rt),key:"monaco-editor-tip"})}const Je=()=>{let en=$n.current.instance;if(yt!=null&&en&&Tn){const Cn=en.getModel();Cn&&yt!==Cn.getValue()&&(Ee=!0,Cn.setValue(yt),en.layout(),Ee=!1)}};(0,ge.useEffect)(()=>{const en=ot.Z.subscribe("formatDocument",Cn=>{var At;let yn=$n.current.instance;(At=yn==null?void 0:yn.getAction)==null||At.call(yn,"editor.action.formatDocument").run()});return window.updateMonacoValue=Cn=>{dn(Cn)},en},[]),(0,ge.useEffect)(()=>{var en;let Cn=$n.current.instance;Ei.current&&clearTimeout(Ei.current),Ei.current=setTimeout(()=>{Je()},500),yt&&(yt!=null&&yt.length)&&((en=Cn==null?void 0:Cn.updateOptions)==null||en.call(Cn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(yt.split(/\r\n|\r|\n/g).length))+3,5)}))},[yt,Tn,$n.current]),(0,ge.useEffect)(()=>{if(Xi&&$n.current&&$n.current.instance){let Cn=$n.current.instance;Cn.changeViewZones(function(At){var yn=document.createElement("div");yn.style.padding="10px 20px",yn.style.width="calc(100% - 20px)",yn.className="my-error-line-wrp",yn.innerHTML=ar,At.addZone({afterLineNumber:Xi||11,heightInLines:3,domNode:yn})});var en={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}};Cn.addOverlayWidget(en),Cn.revealPositionInCenter({lineNumber:20,column:1})}},[Xi,$n.current,Tn]);const qt=(en="",Cn)=>{if(!en||en.trim()==="")return!0;const yn=$n.current.instance.getModel().getLineTokens(Cn);let pn=!1;for(let mn=0;mn<2;mn++)yn.getStandardTokenType(mn)===1&&(pn=!0);return pn};(0,ge.useEffect)(()=>{var en;const Cn=(en=$n.current)==null?void 0:en.instance;if(Cn&&Tn&&jn){const At=Cn.onDidBlurEditorWidget(()=>{Li.current=!1}),yn=Cn.onDidFocusEditorText(()=>{Li.current=!0});return()=>{At.dispose(),yn.dispose()}}},[$n.current,Tn,jn]),(0,ge.useEffect)(()=>{var en;if((en=$n.current)!=null&&en.instance&&Tn&&wr){let Cn=$n.current.instance,At=Cn.getModel();if(!At)return;(()=>{var Wi;let ln=[],oi=[];const Bi=At.getAllDecorations();for(let Ti of Bi)Ti.options.className==="highlighted-line"&&(ln.push((Wi=Ti==null?void 0:Ti.range)==null?void 0:Wi.startLineNumber),oi.push(Ti==null?void 0:Ti.id));if(Ji===ln[0])return;At.deltaDecorations(oi,[]);const Gi=At.getLineCount();Ji&&Ji<=Gi&&(Cn.deltaDecorations([],[{range:new Ae.Range(Ji,1,Ji,At.getLineMaxColumn(Ji)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Cn.revealLineInCenter(Ji))})();const pn=(Wi=!1)=>{var ln;let oi=[],Bi=[];const Gi=At.getAllDecorations();for(let Ti of Gi)Ti.options.linesDecorationsClassName==="breakpoints-select"&&(oi.push((ln=Ti==null?void 0:Ti.range)==null?void 0:ln.startLineNumber),Bi.push(Ti==null?void 0:Ti.id));if(Wi)return{lines:oi,ids:Bi};pi(oi)},mn=Wi=>wn(void 0,null,function*(){let ln={range:new Ae.Range(Wi,1,Wi,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield At.deltaDecorations([],[ln]),pn()}),Wn=Wi=>wn(void 0,null,function*(){let ln=[];const oi=Cn.getLineDecorations(Wi);for(let Bi of oi)Bi.options.linesDecorationsClassName==="breakpoints-select"&&ln.push(Bi.id);yield At.deltaDecorations(ln,[]),pn()}),Hn=Wi=>{let ln=Cn.getLineDecorations(Wi);for(let oi of ln)if(oi.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Vt.isEqual)(gi,pn(!0).lines)){At.deltaDecorations(pn(!0).ids,[]);const Wi=gi.map(ln=>({range:new Ae.Range(ln,1,ln,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));At.deltaDecorations([],Wi)}const Qn=Cn.onDidChangeModelContent(Wi=>{let ln=Cn.getPosition();if(ln){let oi=ln.lineNumber;clearTimeout(yi.current),yi.current=setTimeout(()=>{qt(At.getLineContent(oi),oi)?Wn(oi):Hn(oi)?(Wn(oi),mn(oi)):pn()},100)}}),ii=Cn.onMouseDown(Wi=>{var ln,oi,Bi;if(Wi.target.detail&&((Bi=(oi=(ln=Wi.target)==null?void 0:ln.element)==null?void 0:oi.className)!=null&&Bi.includes("line-numbers"))){let Gi=Wi.target.position.lineNumber;if(qt(At.getLineContent(Gi),Gi))return;Hn(Gi)?Wn(Gi):mn(Gi)}}),ji=Wi=>{let ln={range:new Ae.Range(Wi,1,Wi,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Ri.current=Cn.deltaDecorations(Ri.current,[ln])},cn=()=>{Ri.current=Cn.deltaDecorations(Ri.current,[])},Yi=Cn.onMouseMove(Wi=>{var ln,oi,Bi;if(cn(),Wi.target.detail&&((Bi=(oi=(ln=Wi.target)==null?void 0:ln.element)==null?void 0:oi.className)!=null&&Bi.includes("line-numbers"))){let Gi=Wi.target.position.lineNumber;if(qt(At.getLineContent(Gi),Gi))return;ji(Gi)}}),$i=Cn.onMouseLeave(()=>{cn()});return()=>{Qn.dispose(),ii.dispose(),Yi.dispose(),$i.dispose()}}},[$n.current,Tn,gi,Ji,wr,at]),(0,ge.useEffect)(()=>{var en;(en=$n.current)!=null&&en.instance&&wr&&$n.current.instance.setPosition({lineNumber:0,column:0})},[Ji]);function vn(){let en=$n.current.instance;if(en){const Cn=en.getSelection(),At=$n.current.pastePos||{},yn=new Ae.Range(At.startLineNumber||Cn.endLineNumber,At.startColumn||Cn.endColumn,At.endLineNumber||Cn.endLineNumber,At.endColumn||Cn.endColumn);setTimeout(()=>{en.executeEdits("",[{range:yn,text:""}])},300)}}function Ft(en){(window.navigator.platform.match("Mac")?en.metaKey:en.ctrlKey)&&en.keyCode==83&&(en.preventDefault(),jt())}const st=()=>{if(sn&&$n.current.instance){const en=$n.current.instance.getContentHeight();qn(en<xt?xt:en)}else qn(xt)};function on(en){var Cn=document.createEvent("MouseEvents");Cn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),en.dispatchEvent(Cn)}const En=en=>{if(!Li.current)return;const{keyCode:Cn,ctrlKey:At,metaKey:yn,target:pn,type:mn}=en;return(mn==="paste"||(Cn===67||Cn===86)&&(yn||At))&&pn.nodeName==="TEXTAREA"&&($t(),en.preventDefault()),!1};function Dn(en,Cn){var At=window.URL||window.webkitURL||window,yn=new Blob([Cn]),pn=document.createElementNS("http://www.w3.org/1999/xhtml","a");pn.href=At.createObjectURL(yn),pn.download=en,on(pn)}(0,ge.useEffect)(()=>{st()},[st]),(0,ge.useEffect)(()=>{Er.current&&!Tn&&Promise.all([pe.e(8909),pe.e(3267)]).then(pe.bind(pe,71448)).then(en=>{try{Ae=en,$n.current.instance=Ae.editor.create(Er.current,{value:yt,language:Fe(at),theme:Qt,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},fn);const Cn=$n.current.instance;let pn=[...ht.BH._menuItems].find(Qn=>Qn[0]._debugName=="EditorContext")[1],mn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Wn=(Qn,ii)=>{var ji,cn;let Yi=Qn._first;do ii.includes((cn=(ji=Yi.element)==null?void 0:ji.command)==null?void 0:cn.id)&&Qn._remove(Yi);while(Yi=Yi.next)};if(Pn(Cn,Ae),setTimeout(()=>{st(),$n.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Dn(bi||"educoder.txt",Cn.getValue())}})},500),$n.current.subscription=Cn.onDidChangeModelContent(Qn=>{nn.current?clearTimeout(di.current):(st(),dn(Cn.getValue(),Qn)),di.current=setTimeout(()=>{nn.current=!1},500)}),window.Monaco||We(Ae,Fe(at)),jn&&(Wn(pn,mn),Er.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",En),window.removeEventListener("paste",En),window.addEventListener("keydown",En),window.addEventListener("paste",En)),window.Monaco=Ae,Kn&&Cn.onDidBlurEditorWidget(()=>{Kn(Cn.getValue())}),ui&&Cn.onDidFocusEditorText(()=>{ui(Cn.getValue())}),jn)try{Cn.onDidPaste(Qn=>{const ii=Cn.getSelection(),ji=$n.current.pastePos||{},cn=new Ae.Range(ji.startLineNumber||ii.endLineNumber,ji.startColumn||ii.endColumn,ji.endLineNumber||ii.endLineNumber,ji.endColumn||ii.endColumn);Cn.executeEdits("",[{range:Qn.range,text:""}])})}catch(Qn){}let Hn=kt();return mr&&typeof mr=="string"&&new Dt(mr,Cn,Ae),Un(!0),()=>{const Qn=$n.current.instance;Qn.dispose();const ii=Qn.getModel();ii&&ii.dispose(),$n.current.subscription&&$n.current.subscription.dispose(),Hn.unobserve(Er.current)}}catch(Cn){}})},[]),(0,ge.useEffect)(()=>{if($n.current.instance&&Tn)return document.addEventListener("keydown",Ft,!1),()=>{document.removeEventListener("keydown",Ft)}},[jt,Tn]),(0,ge.useEffect)(()=>{let en=$n.current.instance;if(en&&Tn){let Cn=Fe(at);Ae.editor.setModelLanguage(en.getModel(),Cn)}},[at,Tn]),(0,ge.useEffect)(()=>{$n.current.instance&&Tn&&Ae.editor.setTheme(Qt)},[Qt,Tn]),(0,ge.useEffect)(()=>{let en=$n.current.instance;Le.current=un,en&&Tn&&(en.updateOptions(Sn({},un)),setTimeout(()=>{en.getModel().updateOptions(Sn({},un))},200))},[JSON.stringify(un),Tn]),(0,ge.useEffect)(()=>{let en=$n.current.instance;en&&Tn&&en.layout()},[Ye,xt,Tn]);const[Jn,St]=(0,ge.useState)(Gn(Ye)),[Nn,qn]=(0,ge.useState)(Gn(xt)),Si=Yn(Sn({},zt),{width:Jn,height:Nn,position:"relative"});return ge.createElement("div",{className:"my-monaco-editor",ref:Er,style:Si},On&&ge.createElement(Ue.CopyToClipboard,{text:yt,onCopy:()=>Ht.ZP.success("\u590D\u5236\u6210\u529F")},ge.createElement(_t.Z,{title:"\u590D\u5236\u4EE3\u7801"},ge.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},ge.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function qe({width:vt="100%",height:et="100%",original:Ye,modified:xt,language:yt,options:at={}}){const zt=(0,ge.useRef)(),[un,fn]=(0,ge.useState)(null);function Qt(sn){let jn;return zt.current&&(jn=new Oe.Z(dn=>{for(let Pn of dn)(Pn.target.offsetHeight>0||Pn.target.offsetWidth>0)&&sn.layout()}),jn.observe(zt.current)),jn}(0,ge.useEffect)(()=>(zt.current&&Promise.all([pe.e(8909),pe.e(9404)]).then(pe.bind(pe,2550)).then(sn=>{Ae=sn;const jn=Ae.editor.createDiffEditor(zt.current,Yn(Sn({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},at),{wordWrap:!0}));fn(jn);let dn=Qt(jn);return()=>{jn.dispose();const Pn=jn.getModel();Pn&&Pn.dispose(),dn.unobserve(zt.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,ge.useEffect)(()=>{un&&un.setModel({original:Ae.editor.createModel(Ye,yt),modified:Ae.editor.createModel(xt,yt)})},[Ye,xt,yt,un]);const Kn=Gn(vt),On=Gn(et),jt={width:Kn,height:On};return ge.createElement("div",{className:"my-diff-editor",ref:zt,style:jt})}},85057:function(Vn,xn,pe){"use strict";pe.d(xn,{jL:function(){return Ge},w9:function(){return rn},QD:function(){return dn},cQ:function(){return Ue},op:function(){return Qt},O5:function(){return Li},_b:function(){return Xi},t7:function(){return se},Gi:function(){return wn},YG:function(){return Yn},qp:function(){return Lt},vr:function(){return pi},qE:function(){return jt},Je:function(){return be},wb:function(){return ht},cq:function(){return Ae},tp:function(){return De}});var ge=pe(59301),Oe={flex_box_center:"flex_box_center___NeSU8",flex_space_between:"flex_space_between___ImTGl",flex_box_vertical_center:"flex_box_vertical_center___BtRd9",flex_box_center_end:"flex_box_center_end___qcLe3",flex_box_column:"flex_box_column___Ze_3q",banner:"banner___PoUBO",content:"content___XoDjy",btns:"btns___Pb35j"},Ke="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAAA0CAYAAAAkEw66AAAAAXNSR0IArs4c6QAAGNVJREFUeF7VmwmwHVWdxr9zuvvu9+3ZXsxCiNkIQZOwEzMgyADjggsWgzPqOAJaMiCjYiGKqDBQAo4iWGAxA+ooMm7gBhSyhBBRIIBSAQlrHuTt7913t97PmfpOd4cXlLAFGO6rW9237719+/z6+6/nPIHX+XHttddaex38nlW2lLO1svq1wJ4aeFMM9CqFnNKoaYVapDAOicfjGEMKqKk2nrx59Lbt5xx6aPR6DEG8Hj/K3xwY0YtjSx2vYnlspLEsX0BRKUBrINtyX+PZp0r3fR+IIgzFSo9EsahFUfSHWIj7Pa919zvf2vlo+rFXdWivObjHJvR8S6vTJORHckV0+4GBAF4InwQlBCAIkEMXgCLA9Mn9WCef4ft8HWkgVIDn6ckwUA/HQfCzoFX71TsP6n/41aL3moHTWotnJnGysPEFx8ZcAtMqGTjh2NmVTL+iDB6BZurjsRSe2SogjhNwMZIngbZbqgXom8N26/KjV3femB7ebRxfE3DbRnW/k8c3LQvv5yCjOFVVqhgCyNnJmAhoxyOFasz1OeCM2lLTJryI4BQQUn1RAhI24Lc1dBjc2K6Nnv2edfP+sLvIvergxqb0vpHA1fk8lre9xBZpZsYKU9sMYiDvAHKaqU4HuANcZrIpcILiezRdo7z0aUw3BoJYI4gELAeI/bjZmBq9+PGNd5x/+unHua8U4KsKbriujxUSV9gW+rwg9WPTfpHgpEgUQgAFJwU6LSDwjSxA8F2jslSBBJaZKwVGJRv1pSAJLyQ8qlwLOA4Q1us31Z58+OTj3rX/E68E3qsGbmhK/6Nt40oIFMJwZ5URFh/cZoGgHQKODeSsaUEiA5iSy6IqYRnfmPq66YojPILbYbqpGXuhRhRrFPMSUaP+6OTAtuPff8ze97xceK8KuJGG/oBl4XsaKMTTsiwDKVXZjm1qsgRBU84TXi5VXqo24/syP5ce2xEg0gBDeAZWFijo79JnpLQxXSo7iICiIyD8qUfdxuQRRx24x5MvB95uBzfW1G+XFn4GoMMojQNOYWUK45b+jG9mW+PvFNAKEkqVYgI583VZcOB7WRrCqGwiaQovU1lAlaXKM/BMQNIGbN0FLGh0lySCVv0OP3aPOnKf2a2XCm+3ghuc1AvzOdwmLSwIwkQlBoxMtgZYCkvwQLafBYo0l2v6gBcCxRxQyifwM9PckRCniXIGbjo8wiI4bgnRRFul0XAZMABbaggVoytvo12vff7Qt/Rc8LqBm5jQndrBr3MFHOwyemaJbGaaAKzMp00zV2O+6VVnSTCPcYCNdrItEGAOcKxpVUQKLjPZ6VHVgEuf3Kf/rLk0Y4ViTpiAEUYKJaEgVDg2OTq1+j3r5w68FHi7TXFDU/El1Yr8VLudDM4IjUpLVWW2Mg0GgubybATNfN/0C5+eqjQ9oO0ngAmR0ZF5X2bKjLRZBUFgNE03AKhcPqk62wJsm+qjvyM4Aa0idFN1zcmvHraq90uvObihqej4YsH6nzCEyHwRB0WFZeZJ05xupsZSp6sty+2mXX2a/5rP0fT8MAHRZpmWph48J38zi6xUF1Vqft9KAg2BES6PmyChGGFTBVJ1kb/dq7XeeuTBs0deLLxXrLhHn2nP6+4s3Gk7Yl6Q5mpZMMjAGWjT0o+dgkR6BVnUzJSW2PpzhpHVqIygdPiEET3rzwiHP2QCSlrjUm1epE0el+R1/E6SmjDa2nGEat5Bu9089bC9O7/1moDT0GJkMv5eR6f1oVY7MRfjp2SiNgOO5pkFBpnkadmD/qflRrAtiUrBhJFdPnauJhI6SU6noXSyb2BmUZUqzYKEqSSSZ6SUSU34WagYVUsg9N27R7DtkONWrmRcf8HHK1Lc4EjrqHJn6ZdxBIsXkXU2MqVZqU/ja5ZU/MyWR5/Bps1/wfD2p+G7TUy1QziWRHfZgVXsREd3H1YtnoW+vl709nSjv7f0V4MwPnRaRUGlxSm8rG7N0pAMlim/CE4Jk+tRbTxmAoYK4Qit/Mhb9/a9eze9ILW/YQwv5jvmM/fcs720YMnMDeWStabtJrmVUVaqtsy3sRqgAm+96yH85qbb4DZqWNjfi57uHlRKJViWjSCM0Wr5aDRaqDebqDeaqLkRLFugp7OIQudMrFn+JvT3z8Ee8+dgVldxp+tkpUB42ZZgqLrEnyUq89MkODkunjVVoREFMao5G367een6lZ2fejEQXrbiBgbbn+qZUbyETcWs2KZ/Ynsoi6aMgEPjLVz6Xz/B1OjT2P8tyzB7Zm/i6IMQYRghDGk2ielkLaKIPiiM4PshGk0XzWYDU40a6m6Ickmi3N2Lt+y1B5a+eQ+sXLIQM7rLxi1QiR47I2l3xPizFFyitsQnmqhq8juNks1go2BrDRG4WwMv3veItT1TLwTvZYH7w0NP9y7sn3NPqSgXMiCYRuNz1MbE9eEnRnDhpVdh1fxu7L1iCYIwghcECKMYUfaMY4Rh8jogxJgQNQjP+CECpUK4H8bwPR8tgmzW0Ao8lEsW+vrn4sA1S7Fs2VKsXDIP1UrO3BymMD7PEwvj6wJjnjTTJFAEsUJOJj4y8iMUWIfE8bp1Kzs2virgtg23PtHTV7os9JI0wASFNPWg4vI54LGBMZz/je/i71YvQv/sWXA9D2EYIooiAzCOYoRxDM/z4Xo+PC+Az2MR31NpkU4fpKGUQKRkoiSCjCSiSCAKVPLddgON9hQsK0TXjA7su3YVDjt0Hdbu82ZzbQYgVZb6OJOW0GQjZW54XtACInTkHXjt5kXr9+r4zG4Hd/bZZ8uTTz1rY7liHxiHiR9h+sFAQHNxJMulCGed/x2jtHlv6ofruogILaZpEl6MIAiML2u1XQRhaIDxeKZGqoEAObgoTkBGkUp7bvRRfC0QRpZRkYqk6SjHcYDQryNXVNj/oLX4yIc/iMULZyVVSFr0GxVmlQWDg0xSFG5j372rV1fXr1wpdhldX7Kpbn2mtbqrs7jRkqLIC6VDzgIBwZUKwGXfuwFjA49g331WoO26CSwDh/BieK6HyakaPM9LTZbv0WQJL0r2o9ioMkhN2gDka0JkDhYpExW1FtCQEMKGlg6gbWhTxjPFaKBvZgUfP/njOHz9WrRS5QXG9AkvzeXoHxXrVw0n9puxEm8+dGVlaFeqe8ngBifiT1Y65aUha7+0+M7Sj0IeeOixYXznO1fiHQfvY1REs4wiBoIAcRQZkBOTk/B9P1GSCRBBoraQn/dTmDxOiATGLV+nioxjA49wINjAY4YtIaQFwX1hQYtkn/AtW+Okfzsdf/+OA9H2Uj+XdoiZltBebaGh2a9DrONYvfdtK8q/2L3gaurXxaI4WqUJJH2ETTPltVsaX73wvzG7IjGrrwce4RhoieKCMMDY+LiBZ2AwGJjAQKg0Sx6jCrWBmQAlTJo3vx+ZvIvOXLBEEAJCMPFNQrkBBwnNfcuGMFAFlIqRyxdw+he/gv1WL0PDTftzSicd41jBYaURa/SUHLTrjc+vX9mxy47JS1LcpoGB4qKOuZvzebFMpyUPT0BoTD023P0wfvWL67DfPsvhut4O80z8Woip+hQma41UWVQRDMwEXIQ43Se4OApSYEAYeAijwADSmp1RghPGt3Kb5MMJxEx9VJ2QNu8mYNlQUYj+hUtx9nnnolIpw83KrrSSMOCURmfOQejWr37bis6P7DbFba/ptZal77SlyPFy6WC5ZedBKYWLLrkKs6oOCvl8AoR+zWwjeL6L4dFRuJ5CEGpTsEeBQBD4iFWMWEWIwjpU6Ca+kNswNll+zCgECSkcKM02CQtS/nK0oxPDFDzRIYFSfYRIcFRfzgDktRz7z5/E8Scci7ar0g4xc0aePen0VaSAiLxHutVTe6/cRfn1khQ3OBEdU6xYv4oZbzjJopJISrX96aFtuOaH12D5ogXw/QABVZQFhCDC5NQ4xienEIQCbijh+RKTvXPhVYrIPTGAXLOOOJ4AwhAxzTKomTTEdHy1l/guc5voWTmXSPWFSVAwf7FRH83YuD5jxgQooS3HqE9Bomf2fJx9wcXo7KjAp3swLSZApjPeJUvDioLBkttYvHZtf/v5VPeSwD09Fp9Z7pDnEhzvD1MEqo2d2ut+swEPbr4fM3p7jIqYbhjlBKHxdcMjQ0ZtXmjDbSsMLFqJx048AWDWv/kvWPjNy2DXB5hXAHEIpZqwZNVct1INSFkyoJRyE1g6hjaFnp2IDyrxezqFaMClHQdjsjljsrzuk8/4Cg46ZF9zPQYc05k0qpYswFH+uCW9VYcsm7F994CbiL5fKlkf4lyC1nSswnRlWcBfftVP0RgZRqGQR2jKKd/4JZrpxOQExicmEIQWvDCHhu9gyz99FN76VQCt0AZmnnUxSg/cAUuGEKoJaBdSZjVpBCk7EnDahxRlKHCfjbccNPMis29mWSGMH6TqNKQxWStJVayccQvrjv4ATj7lRLTcpL1k2kym0GUJJlASvuvo6JADV3RtfsngbtXa3gsoBA3k3Rakb8GtiuiaUtk+xveUqRjoU9gmKuYFLr/yGkwMjSBH5xrQ4dNPBaYiGBwehOu24QUCXuhgSnTjsTPOQDxvRjqjrNB31tdRfvwB5O0cEI9BaA9SVhCpGqA56+NAa/oIC5AER2XlmfdDhT60FLBoxlYAof0UnjLukAo1arPyxhev2vcAnHbWOSaJNmWe6elRCAm4TukrS0XvOGivrt+9aHDba8GaQt56r4A8XADztYIVKgimXH6M7iDUebackzJLIm8LlIsSP/jRz/HU1ieQcywDLnHwAWq1BsbGR5M6lYrzJEZmLsHw5z8LlOm0AWwfQ885X0Ol/oypHRFPwpZF2FYXwngEgoBEHpEaNwpTyJsqROsCgupMtFeshLt8Oap/ug8d998CKQgvgICfRFppm/QEBAdg1oIlOOMrF6BcLsAPlCnHIjPvClQcgW4nhFThPxy8ovPXLwjugaGh8uxyzwXlvPOxsoPC9PUaZpYoLZobHtAMtAEhoVDKSXSUHdy+YSN+d9MGFKm4NK0gwKHhUTSaNZPL+ZEFzwXGVrwNk6edlkDjHMLmrei78DzkLR8W18qoEUiRgxR5xKoJ2+ox4EJVh5B9UDqPel8vWgccAW/Naug5Myk84OkJzDn3FOTbIwacFASXJMSC/XOZhxISHTP6ceZ5F6GzuxNekEb5IKlIOvISvU7AhPiog5ZVbtgluE0DurigHPx4RnfunXQXbNJm8wEZQAYCphDs99c9YMqDKbALtjJNyNGRQVx++dWwtDA5GHMyz/ewfXAYntdE4AfwjFkINHsXY+JzXwPmdptGXunKH6D79uuRzxVhqwBKDSFnzTTRNIrHIQXz+RAxTVF1obFqPcY/ehLQVU2CLG+AApwNGzHjR99GTk0Bqg0pvCQ9sRxIY6o5aGmjWOnCmed/A70zZ8INmCpxbGwoAF0Fgd5cEBVkfNj+Szvu2CW4rUPumTN6C+faCijwxqTTeNmXssV+bM1w9oiqm2wToELgt1AtSHQULVxzzU/w5/u2mKUMcRCg3W7hmeFhBF4rKaPY6WDGJDrQnrcUrdX7wRkcQuXe22HHU7CFgDT+zE/AKR9au7CsPkSqAWWiaieG3nkCvPe9G+DSGQrqwUdRuHUjylvvQS4ahaObELoBAVqFSCsJzto4Jkg4OQdn/sd/ord/Plw/MtAIj5Y1oywxq+DXrThae8CKzq3PC+6ux4dndRZ67uut2nM68sn6jWxtx/QvZebKiWKCq7WAmtm2IZSPGR0FjI9uxxVXfB+tqTokYgNu++AQVOSZ1EErunSWRBXTyYASkLIAbdGnMBhI6Lhu5COlA61Ck39JUTHRVAtO73ej0TMbEyeeBj1vjlGauP8RVL7/A+SDQdiowVF1SN02UVaa2fAkl2NU5TNnC5z+5QswY/5iuG4EN1KmhtWxwNwuBws7w+G85S1ftaBr8nnB3f1Y8/hqtfzDzhzQU0qm0v4WOLam6ecIjl2GWhuYaFF5IcamJtFZtNDX4WDzvZvxv9dej9BzoaIIo+Oj0FEAzSxfhyYSa50W5iAU20RNafIuwmol/k0yGPAGJJ0OZSJqHkqWEcU22vPegua/nAR0dxvVWZv+iI6fXomcrsNRDWhNU9UmAWZoVVYOgsFBOCjlLXzqjC+ia+6eaHsRmp5GMScxu8NCf4eF7qKIRBQ8mnfkz4PQ/83SuX/d2BSbHmne3Fktv72vDHQUEsWxGnjuIwPH3hf93FQbGKnTXDUeGhiCFDFmVHPoKlu49dYN+O1vb4alYozXpqBjggvNBHDyYIHDhJVQ+IiSYolFuXHqBQhGT+VCWiUTGaOYQIuIhYWQ34tLcBeugH/ch4DuXmBkEJXvXoB8ewwWXGiT77GWSBoA9G9cKBcLB92dFZx02umI8r0m9Vszv4QVsx10FYUZu7GuNHeuN1XkB9FN7Xbwmb0XVh/KuIhNWwOvs2Tn+6rCZAecITezU9PWc5i0Ml0JZKbfwsTHDU0Bky6wYcs20w7qrThGeaW8xJ0bN+HW2+5Eo9k0lQT9jWkEMVHl2dnhoNp4VLBc4uI4JrKRAcgEO7HDXFLQE64oGNz0k0pUkvUhCxZDrz4A4tEHkXvwLtgihNSJa0gEQNfAXp0NZTnGVSxeuADHHHcCpJXD+9f0YcUc2zRgn6sXnr9O3yeBlqeGJyfDE1cvKlxvkuvfP6512QF6y8kCFwYHllHZsgSezAwh7ZhyPIRHH/fMJDDWAn72x8dQb7XRVbZNoKgWLBRyAvfe/wBuuf0u1CYnIWVaQ9K5pRMrdNw8v5khM2rjZ2iYVGJWfxJunJbwBGjm0kx6ohj/zQpryyS82lKQpopgI0AnLodmaop9C4rVAwTWH3wgluy9Fh/cbxbWLSqa6idbJfpcS3PNupNkQnuioVrDk976I1eV7xW3b2lvL5eKczoLQKWQrIqk6rIeWwYuWw1kymwFTLaAgQlgsK5xxa1bUGu66ChYqOSpXMss4Ms5EtsGnsatGzahMTaWhutsLWsaug2s7F5nix7S/CKZ/08L+7RlZMqpDJ4hk62JShWbLj805Ve2II9zlCbJQqW7C/sftA4HrZiPUw/vRweD7S7A0a/XXW1SsLYSeGpIbxiZeOpIccufG8dVOys/5r2o5JNVQaw9WUrxhDRbk46k62/5moobbySKu397gK/9ZgsKFlDNSZQJzhHI2xKOJVDISTRbbfzpwS0YePxxxL73rJzNwNJZ62yG2dzydNlOUqVnK4PTdpKRWLqfLe/JPpO9nuZnTFRNyFj5Apbtswr5rpn4wpELcPiyqhHKrhTHsTJ4TLnCWNdgA3Dr/lHiuo2j1XJf7x2VvNiHTbZyBs9OA8U02zcTMjKJrsNTwEgT+NE9ow9864Ytt/dVZVDNW6LsSBT5XUsgZ7P7L5BzbDPX+qeHH8HAlr+YZQeJjSWpwk4P2pdhk05mcHfHa3YyzXKa9GD6mez9hOiOhHjHwjzzOzZ65s3B/D2XolSt7nnh+5a9a0mfZcZLkTz3MrJronVxoQ+ziPEWsL3GXDZ60NjIr/6sjynk8EsHEPRxDBK8E1ztw+k+njhHFTqJCTMl4Qm21eDd/KR7+NePLt35fPnO/8fj592ljz5sPn49rwBUC4mF0bqmp2HZMguKhOC4kpPpF8fNgLEjkPzyz/qzjo3zcwKSyqOfy2avePKuNHgwUjEB3j4FbB1R973/3zfsh9ten/+nerk35RM36MPfswdu2qMDoqOY9BO59jhb6zJdbVneyhSMixPpnphR7BSBr3tAf9i2cH45j9k0Dy58Zreitwr0dSRK5J0YbwJDLfo39eWTDrTOebkDeL2+13e5nnPZfrh/UTdmVvOJb6fq6OsIzziK9H8lCI6RldtMcX46ZbDT9V//oJ6fAz4iBI7VMfYp5SBmEFw1uTNcezFcB56YQPv329qHfPXo8n2vF4BX8rsXbdS/WD0L72ZThfA4NrqiLIdlMGSfjtBYn1Nx9HH1wDQ7Nj9v6/zGB3S5HWCvUlFfvWiGWMYFQpQzzXSoAfxlWD1w0X1y33tPEkyy33CPk6/TBx8yF7f05pDjuIrOzuaaVUoExxKT43a5akFCtVys3+Wcwweu1dbHV+LxN3VhPsEx8jANGfOAh4eiL5x0iHPeG47YtAv+9I3xp9f0yIvLDAw6ySIY/ExSnpkqVcels/x/syLgtXHpx9bhlF2CO/tanVuzHHfPqmJVOf0nNdr5SFP7D02Eb/3iEfkdtdsbFeCXbtYfXlDGueU85iKZsjXZklnpyZdpGmgWFcS4pGsQnzvuOBG/4CzXFX/Qp+zZi28pPzkZHeNIS337X2+Qp+IckWajb1RsyXWffqOeN8tRH+rKyWOhsSBnYyYziiCAa0k8EQKb2kF01acPc3akXS8IbsW1Onf6AnVib16ewqWz21vq9qu2yNPeqL7thW7xZ65391jcV1jE/1qKFcaeCfDwOYeK9D83nv32/wHzrWgvjJ8Q7AAAAABJRU5ErkJggg==",Ge=({dataSource:Tn=[],img:Un,imgWidth:kt=346,title:$t,sunTitle:Je,bannerExtraContent:qt})=>ge.createElement("div",{className:Oe.banner},ge.createElement("div",{className:Oe.content},ge.createElement("aside",null,ge.createElement("p",null,ge.createElement("b",null,$t),ge.createElement("span",null,Je)),Tn.length>0&&ge.createElement("div",{className:Oe.btns},Tn.map((vn,Ft)=>ge.createElement("div",{key:Ft,onClick:vn.click},vn.name,vn.sign?ge.createElement("img",{src:Ke,width:39}):null))),qt),Un&&ge.createElement("img",{style:{marginTop:33,marginRight:38},src:Un,width:kt}))),Xe={flex_box_center:"flex_box_center___hG6RI",flex_space_between:"flex_space_between___ss3Fh",flex_box_vertical_center:"flex_box_vertical_center___K80p9",flex_box_center_end:"flex_box_center_end___qmXX3",flex_box_column:"flex_box_column___GFV8F",row:"row___aXJjm",title:"title___HUKL0",tagsWrap:"tagsWrap___XB2W3",action:"action___VdHb1",bar:"bar___t1kKC",tag:"tag___V7Eft",name:"name___Hk1Ip",num:"num___xQpcH",active:"active___XryTX",tagsBorderWrap:"tagsBorderWrap___OMxjs"},Ne=pe(92310),Tt=pe.n(Ne),Ct=pe(89392),Lt=({dataSource:Tn=[],value:Un,onChange:kt,onTitleChange:$t,className:Je,title:qt,titleWidth:vn=41,style:Ft={},fontColor:st="#6A7283",showCount:on})=>{const[En,Dn]=(0,ge.useState)(0),[Jn,St]=(0,ge.useState)(!1),Nn=(0,ge.useRef)(null),qn=(0,ge.useRef)(null);return(0,ge.useEffect)(()=>{var Si;Tn.length!==0&&(((Si=Nn==null?void 0:Nn.current)==null?void 0:Si.clientHeight)>97?Dn(1):Dn(0)),Tn.length===0&&Dn(0),St(!1)},[Tn]),ge.createElement("div",{className:Tt()(Xe.row,Je),style:Ft},ge.createElement("div",{onClick:(0,Ct.throttle)(()=>$t==null?void 0:$t(),2e3),style:{width:vn,marginTop:Jn?12:4},className:`${Xe.title} ${$t?"current":""}`},qt),ge.createElement("div",{className:Jn?`${Xe.tagsWrap} ${Xe.tagsBorderWrap}`:Xe.tagsWrap},ge.createElement("div",{className:Xe.bar,ref:qn,style:En>0?{height:En===1?97:"auto",overflow:En===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},ge.createElement("div",{className:Xe.tag,ref:Nn},Tn==null?void 0:Tn.map(Si=>ge.createElement("span",{onClick:()=>kt(Si.id),key:Si.id,style:{color:st},className:Un===Si.id?Xe.active:""},ge.createElement("span",{title:Si.name,className:Xe.name},Si.name),!!on&&ge.createElement("span",{className:Xe.num},Si.count))))),!!En&&ge.createElement(ge.Fragment,null,En===1?ge.createElement("div",{onClick:()=>{var Si;Dn(2),((Si=Nn==null?void 0:Nn.current)==null?void 0:Si.clientHeight)>245?St(!0):St(!1)},className:Xe.action},"\u5C55\u5F00",ge.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):ge.createElement("div",{onClick:()=>{qn.current.scrollTop=0,Dn(1),St(!1)},className:Xe.action},"\u6536\u8D77",ge.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},dt={flex_box_center:"flex_box_center___aK2n3",flex_space_between:"flex_space_between___HX0Oh",flex_box_vertical_center:"flex_box_vertical_center___LJOJr",flex_box_center_end:"flex_box_center_end___SCakF",flex_box_column:"flex_box_column___AYv4m",tabs:"tabs___GTqPV",active:"active___F26E8"},De=({dataSource:Tn=[],value:Un,onChange:kt,className:$t,style:Je={}})=>ge.createElement("div",{style:Je,className:Tt()(dt.tabs,$t)},Tn.map(qt=>ge.createElement("span",{onClick:()=>kt(qt.id),className:Un===qt.id?dt.active:"",key:qt.id},qt.name))),ne={flex_box_center:"flex_box_center___yX6Oa",flex_space_between:"flex_space_between___t7oqF",flex_box_vertical_center:"flex_box_vertical_center___dEIHy",flex_box_center_end:"flex_box_center_end___taQDF",flex_box_column:"flex_box_column___xY_Lr",input:"input___PW2zI",dropdown:"dropdown___vSy8B",menu:"menu___NiyBu",text:"text___Grueu",b1:"b1___ZKryM",b2:"b2___aKyGa"},ee=pe(92832),se=({dataSource:Tn=[],value:Un="",onChange:kt,onInputChange:$t=()=>{},className:Je,style:qt={},placeholder:vn,allowClear:Ft=!1})=>{var st;const[on,En]=(0,ge.useState)(""),[Dn,Jn]=(0,ge.useState)("");(0,ge.useEffect)(()=>{var qn;let Si=Un;(qn=JSON.stringify(Un))!=null&&qn.includes("{")&&(En(Un.id),Si=Un.value||"");try{Jn(decodeURIComponent(Si||""))}catch(en){Jn(decodeURIComponent(Si||""))}},[Un]);const St=()=>{kt(encodeURIComponent(Dn),on||null)},Nn=qn=>{qn!==on&&(En(qn),kt(encodeURIComponent(Dn),qn))};return ge.createElement("div",{className:Tt()(ne.input,Je),style:qt},!!Tn.length&&ge.createElement("div",{className:ne.dropdown},ge.createElement("div",{className:ne.text},(st=Tn.find(qn=>qn.id===on))==null?void 0:st.name,ge.createElement("i",{className:"iconfont icon-zhankai4"}),ge.createElement("b",{className:ne.b1}),ge.createElement("b",{className:ne.b2})),ge.createElement("div",{className:ne.menu},Tn.map((qn,Si)=>ge.createElement("div",{key:Si,onClick:()=>Nn(qn.id)},qn.name)))),ge.createElement(ee.default,{onPressEnter:St,value:Dn,onChange:qn=>{Jn(qn.target.value),$t(encodeURIComponent(qn.target.value),on||null)},bordered:!1,placeholder:vn}),ge.createElement("i",{onClick:St,className:"iconfont icon-sousuo9 font14 pl10 current"}))},he={flex_box_center:"flex_box_center___tol8o",flex_space_between:"flex_space_between___Z235C",flex_box_vertical_center:"flex_box_vertical_center___Wq1sZ",flex_box_center_end:"flex_box_center_end___LLxom",flex_box_column:"flex_box_column___DbMSN",quickPager:"quickPager___GM30J",disabled:"disabled___Ozc8I"},be=({value:Tn,onChange:Un,className:kt,total:$t,pageSize:Je,style:qt={}})=>{const vn=Tn<2,Ft=Tn>=Math.ceil($t/Je);return $t<=Je?ge.createElement(ge.Fragment,null):ge.createElement("div",{className:Tt()(he.quickPager,kt),style:qt},ge.createElement("div",{onClick:()=>{vn||Un(Tn-1,"prev")},className:vn?he.disabled:""},"\u4E0A\u4E00\u9875"),ge.createElement("div",{onClick:()=>{Ft||Un(Tn+1,"next")},className:Ft?he.disabled:""},"\u4E0B\u4E00\u9875"))},ke={flex_box_center:"flex_box_center___FO7TP",flex_space_between:"flex_space_between___LotYx",flex_box_vertical_center:"flex_box_vertical_center___bWdaw",flex_box_center_end:"flex_box_center_end___mVJ1o",flex_box_column:"flex_box_column___M83Mm",list:"list___oOsiS",wrap:"wrap___G6T7F",lockWrap:"lockWrap___Rl79E",li:"li___oZZ7l",cover:"cover___b2bYW",img:"img___IQX7w",sign:"sign___HkT6C",name:"name___SsJx8",e:"e___TMqq0",tags:"tags___bcjyo",rate:"rate___YACg7"},Be=pe(71418),He=pe(6848),We=pe(13570),rt=pe(3294),Qe=pe(955),Pt=pe(96908),Ze=pe(57177),Et=pe(81378),it=pe(8797),ht=({className:Tn,dataSource:Un=[],col:kt=4,right:$t,bottom:Je=23,precision:qt=0,wrapWidth:vn=1200,trackEventItems:Ft,loading:st})=>{const on=Math.floor((vn-(kt-1)*$t)/kt);return ge.createElement(Be.Z,{spinning:st},ge.createElement("div",{className:Tt()(ke.list,Tn)},!!Un.length&&Un.map((En,Dn)=>{const{name:Jn,id:St,identifier:Nn,power:qn,cover_image_id:Si,pic:en}=En;return ge.createElement("div",{className:ke.wrap,key:St,style:{width:on,marginRight:(1+Dn)%kt===0?0:$t+qt,marginBottom:Je}},ge.createElement("a",{target:"_blank",href:`/shixuns/${Nn}/challenges`,className:ke.li,onClick:Cn=>{Cn.preventDefault(),Ft&&(0,Qe.L9)([Ft]),qn&&(0,Qe.xg)(`/shixuns/${Nn}/challenges`)}},ge.createElement("div",{className:ke.img},ge.createElement("img",{className:ke.cover,src:`${en}`}),En.is_jupyter&&ge.createElement("img",{className:ke.sign,src:Pt}),En.is_jupyter_lab&&ge.createElement("img",{className:ke.sign,src:Ze}),En.is_unity_3d&&ge.createElement("img",{className:ke.sign,src:Et})),ge.createElement("div",{className:ke.name},ge.createElement(He.Z,{title:Jn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},ge.createElement("span",{className:ke.e},Jn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),ge.createElement("div",{className:ke.tags},ge.createElement(He.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},ge.createElement("span",null,ge.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),ge.createElement("span",null,En.challenges_count))),!!En.myshixuns_count&&ge.createElement(He.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},ge.createElement("span",null,ge.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),ge.createElement("span",null,En.myshixuns_count))),ge.createElement(He.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},ge.createElement("span",null,ge.createElement("span",null,En.level))),ge.createElement("div",{className:ke.rate},ge.createElement(We.Z,{allowHalf:!0,disabled:!0,defaultValue:En.score_info}),ge.createElement("span",null,"\xA0",En.score_info?`${En.score_info}\u5206`:"5\u5206")))),!qn&&ge.createElement("div",{className:ke.lockWrap},ge.createElement("img",{src:`${rt.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),ge.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!Un.length&&ge.createElement(it.Z,null)))},Ht={flex_box_center:"flex_box_center___AQ53o",flex_space_between:"flex_space_between___i2aIa",flex_box_vertical_center:"flex_box_vertical_center___sPEKB",flex_box_center_end:"flex_box_center_end___GhSSH",flex_box_column:"flex_box_column___R9_Hb",list:"list___jb2Ay",wrap:"wrap___VsQDr",lockWrap:"lockWrap___g1k1T",li:"li___IxCLC",cover:"cover___Mu8wr",img:"img___IpFLA",movebq:"movebq___mF7wt",bq:"bq___Bil0T",sign:"sign___DXJ4d",name:"name___l7FoJ",e:"e___pXQUG",unit:"unit___wCIFR",tags:"tags___w_Mil",tag1:"tag1___dxm7r",tag2:"tag2___llZkf"},_t=pe(24065),Vt=pe(59301),Ue=({className:Tn,dataSource:Un=[],col:kt=4,right:$t,bottom:Je=23,precision:qt=0,wrapWidth:vn=1200,trackEventItems:Ft,loading:st,onRemove:on=()=>{},isCurrent:En=!0,showAlias:Dn=!1})=>{const Jn=Math.floor((vn-(kt-1)*$t)/kt),St=[{name:"\u63A8\u8350\u81EA\u5B66",ptimg:"/images/tjzx.png",swimg:"/images/sw_tjzx.png"},{name:"101\u8BA1\u5212",ptimg:"/images/jh.png",swimg:"/images/sw_jh.png"},{name:"\u56FD\u5BB6\u4E00\u6D41",ptimg:"/images/gjyl.png",swimg:"/images/sw_gjyl.png"},{name:"\u7701\u7EA7\u4E00\u6D41",ptimg:"/images/sjyl.png",swimg:"/images/sw_sjyl.png"},{name:"\u7CBE\u54C1\u8BFE\u7A0B",ptimg:"/images/jpkc.png",swimg:"/images/sw_jpkc.png"},{name:"\u519B\u961F\u4E00\u6D41",ptimg:"/images/jdyl.png",swimg:"/images/sw_jdyl.png"},{name:"\u65B0\u578B\u6559\u6750",ptimg:"/images/xxjc.png",swimg:"/images/sw_xxjc.png"}];return Vt.createElement(Be.Z,{spinning:st},Vt.createElement("div",{className:Tt()(Ht.list,Tn)},!!(Un!=null&&Un.length)&&(Un==null?void 0:Un.map((Nn,qn)=>{var Si;const{name:en,id:Cn,identifier:At,featured:yn,school_name:pn,image_url:mn,excellent:Wn,is_plan:Hn}=Nn;return Vt.createElement("div",{key:Cn,className:Ht.wrap,style:{width:Jn,marginRight:(1+qn)%kt===0?0:$t+qt,marginBottom:Je}},Vt.createElement("a",{className:Ht.li,onClick:Qn=>{Qn.preventDefault(),Qn.stopPropagation(),Ft&&(0,Qe.L9)([Ft]),(0,Qe.xg)(`/paths/${At}`)}},Vt.createElement("div",{className:Ht.img},Vt.createElement("img",{className:Ht.cover,src:`${mn}`}),En&&(0,_t.bg)()&&(Nn==null?void 0:Nn.studying)&&Vt.createElement("div",{className:`${Ht.movebq} user-path-items`,onClick:Qn=>{Qn.stopPropagation(),on(Nn)}},Vt.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),Vt.createElement("span",{className:"c-red"},"\u79FB\u9664")),(Si=Nn==null?void 0:Nn.subject_tags)==null?void 0:Si.map((Qn,ii)=>{var ji,cn;if(ii===0){const $i=(ji=St.find(Wi=>Wi.name==Qn))==null?void 0:ji.swimg;return Vt.createElement("img",{className:Ht.sign,src:$i,style:{left:"-4px"}})}const Yi=(cn=St.find($i=>$i.name==Qn))==null?void 0:cn.ptimg;return Vt.createElement("img",{className:Ht.sign,src:Yi,style:{left:`${48+52*(ii-1)+2*ii}px`}})}),Vt.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(Nn==null?void 0:Nn.excellent)&&Vt.createElement("div",{className:Ht.bq},"\u5F00\u653E\u8BFE\u7A0B"))),Vt.createElement("div",{className:Ht.name},Vt.createElement(He.Z,{title:Dn&&(Nn!=null&&Nn.excellent_alias_name)?Vt.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${en}`,Vt.createElement("br",null),Vt.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${Nn==null?void 0:Nn.excellent_alias_name}`)):en},Vt.createElement("span",{className:Ht.e},Dn&&(Nn==null?void 0:Nn.excellent_alias_name)||en))),Vt.createElement(He.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${pn}`},Vt.createElement("div",{className:Ht.unit},Vt.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),pn)),Vt.createElement("div",{className:Ht.tags},Vt.createElement("div",null,Vt.createElement(He.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},Vt.createElement("span",null,Vt.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),Vt.createElement("span",null,Nn.stages_count))),Vt.createElement(He.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},Vt.createElement("span",null,Vt.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),Vt.createElement("span",null,Nn.members_count)))))))})),!Un.length&&Vt.createElement(it.Z,null)))},Wt={flex_box_center:"flex_box_center___eMcr7",flex_space_between:"flex_space_between___HcNca",flex_box_vertical_center:"flex_box_vertical_center___ZnvVN",flex_box_center_end:"flex_box_center_end___fdgDf",flex_box_column:"flex_box_column___SEKvd",list:"list___L1hmU",wrap:"wrap___pKgcW",lockWrap:"lockWrap___SMhkK",top:"top___udHSB",sign:"sign___uwRpq",name:"name___Fpf90",img:"img___AMLhL",text:"text___KiTb7",btns:"btns___i6IuZ",bottom:"bottom____k2sh"},Ln="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXWmQXFd1/s59r3t6nX00o93GluV9AQNxiAkIB0OMISFsFQqSAhOohFR+JKmEQPILClJZfpEfIUAChFQSHIJxnGDiDYwsb8KRLUuWZcmSxqN9pJF6nV7eSZ373u1509Mzvd2eGVt6VV2z9Ht3+9459+yX8Bq4mDmWK2GLqla3MvFWZt4KpjVMSBNzGoQ0M6WJkJbpMiNDxBkwMkyUIUYGxCeJaB8x7fMcZ18yiv1EVHy1Lw+9GicwO8tXlSrlbSB6O4HfANAmZlY250JEHsBHGLQTzA9H3chDfX2012Yfy9HWqwJgZh7NF6vvY/a2gWkbgyeWY3Hq+yDQcRA/RKQeSsSce4jo9EqMo50+Vy3AzNxXKFTv9MAfB/AuZo60M7Fe30tEZQA/UqBvx+POvUQ02+s+O2l/1QGcy5Xe6Cn1SXj8YYAHO5nU8j9DM1D0b8rzvpFMRp9a/v4X73HVAJwplN9GHj7P4NtW0wK1OxYCPcAKX0rHI4+0+2wv7l9xgHPFyrs9j78A5l/sxQRXrE2ix5SiLyZj7v+s2BgArBjA+XzpzR7oq8x880ouQK/7JqKnFfiziUT0iV731aj9ZQeYmYez+fJXiOguZl72/ldkkYmYmb+eSkT+lIjOLOcYlm2BBcx8sfoJz+O/BHhkOSe5evqiaaXoTxIx55tExMsxrmUBOJ/njVVUvgvmW5djUqu+D6JHHbgfTSRostdj7TnAuWLlDq/K37pwqXYxCGlaOfRbyZh7Xy9B7hnAzOzmCpUvA/jDC2WvbReogE3/TTLufo6IKu0+38r9PQE4n+f1VVS+B+ZbWhnEBX8P0Q4H7gcTCZqyvRbWARZHQLlavp8ZG20P9rXcHhEmI07kdtsODasA5/OlX6gy/dfF/bbTV5GmHeL3JBLRxzttof45awCLRYo9vpuZE7YGdyG2Q0R5UvQBWxYwKwBn8pWPEPg7IlhdiKDYnrMIXAz6WDrh/mu3bXcNcEC5P7wIbrdQzH9eQCZF7+2WkrsCWPZcD/TgRbZsF1zTmrBrBX5HN3tyxwD7YTOVRy8KVL0Bd65Vmo667q2dStcdASx6rofyjouqUK/B9dsXFUohcksnenLbAMtemy1UfnrRiLE84NZ6IdqRirtvbdfi1TbA2Xz5r5j5j5Z5ehe705RMf51KRP64ncVoC2BxHLDH9/batlz2gJPnFc7PArNVgvjViABH6Zhm/ZErQoxkH7AmxYhHlsX71s7aWr9XbNek6M52HBQtA6xdflx5pldCVaEMHDuvcK5A8AjI5oB8EShXgEoZKFeBSgVQCohEgKjr/4z3AUP9gCIg7jLWpBn9fa9lsMXa5d7UqquxJYCFYrOFyk964c8V4F44oVCsEs5lgfNZIJcHPMFIk27wU0sbof/V0UcyBgz2AyMDQDQCbBzwXrtAEz2airu/3ErQQEsA5wqVT3qe93WbPKfqAS+eUsiWCWdmgJPTQLVaB2gjw6oB3U9B0azbsGz5XV6KsWFg01pAzGqXjniIua89ilZK3ZWMu99ohklTgP0YqsqLNlnz+SJh7ymF8xkf2JKEkFu+BOx1Y8CGNcBAH2P9gGe5h5VujqZTCfeKZjFeTQHO5EpfA/ApW9N5ZYYweU5h6jhwPlfHcpux5Ha/BxCLAldfBqSijMtHX2sg4x/SyejvLIXNkgAHoa07bEnNe48rnCkQDr8CFBokehh2q1ntIizYsOVG3y/g6AH7dl3gykuAvj4gAkahSihUCCVP9nryJfNgj1dguIrQ5wKJCCMZZaSjjOGEh6jV9LbuSUb2YAW+ZamQ3CUBzubLT9mKW95zTOFkhnDoqC8NL8clL0oqSYgnCSoCVIM92580axAjji+BuyqQ4RgQOq8wUKrK/0jv83Ilo8BQzMO6VBUDseWYQfM+JO46lYi8cbE7FwVYZxxUvf9u3kXzOyZnCIfPKuw/FAhSgcxTz3GbyFQLpOh6Ics877qE9AAQiZEGSyJUI6JGOT5VxlxocEWvdgTcAGQBUtQwWRTDTQTkYhXIlQnZElD2fMBjDmMizdjYX0VkhSlbOepXF/M6LQpwJl/ebiOd5FyR8PxxhQNHgGKP8+9EL04PKU2tAr5LjIQLJB0DJmswDbACpuP41KuBFYDlEwBsKFdz72ClZqvA2SJpI4yALc+PJ6rYPCDSevOXvSd3EG1PJyK/1KjthgBLIhg8frjbwYgq9MRhB5PHgXOZha01k5nq9d4FalEgowk4/UMKTp/fR59iJBX0nqkBo8ASpsGVPdYHVD7yuwY8uLcGcrAyNZCljbopZErAqQKhWPGB3pD2cEl/RUyK3S5d+88renujhLeGI8nmyv9rI8vv+aMKh6cJk8eC8Tbjye1Oi4BEkpDo91lxVDFSjghS/lVjuQZgMXc6DDdgxRrYEAWbl0GDHwC6FMBmuLkycKJAKFUJMQe4YriCwdjy6t6S1ZhKRn6l0TY37386Pxd4st21rr9fWNnTkw72HeyNnit7Z/+YAsn+CUbaBWJ68wzADbFZQ8GaJSuex6INy9ZCVmDvNkBLW2Y/DrPpxdbmTBGYLhCYCBvSVWzury4rNSvgTfX5yQsoOJMr/T2AJXWrVsDfeUThldOEoydbubu9e9wIYWBUFtJnxwPOHPuct28KyHWs1yHWVCsgCgULwAZkDXBA3ealaAdgmYWoXlNZ0vtzfx9wzUhZ97NM19fSyeinw33NA1jKJmTzlePdZtaL40Cod8+BQGq2OLtIFBgcVVrlSTiMtDPXeHgy+ndDgYFkrPfZEBUb9cgA7H8X7M/B3m0o17QXNLvkjGRsx/OkJW+R2q8erWjW3fuLZlIJdyJcTmIewPl85QNV9r7X7UD2nVTYd4wweXTplpoZNuqf7osB6WEFD4xBw5IbdFG/b8rfMlENoKZQn01rISvYg42qNPcSzLFneRH0FWL/razR6QLh7KxvNLl2tLwsUrZD6oOJhHu3Gd88gLP5skRH3tnK4Je6Z/tBBwenGkvOnbYtHqL+Nb5DeFgMFK2wPSNBB9gYdu2zaNZg14QsvZfPl6r1ixH+NFCfms3nfBk4lSdEXcK1Y2X0tTLuZo0u8T0R3ZtKRN67AGApVZQrVI52W81GDANPHnGw64XA5RcaTODsWbSswGJCthguhsYJHjNGWwXXEJ0BSChYfjdsGKzB05Qb/M/swWGVSb8MwbMycNNGeG9uhse5EnC6qLShRUAWga5Xl1T/ScbddabEU42CbbkEX55W2DtFONAg87WZltToBZAFHV4rbBkYiDASLSzOPLYUAtgA6APFvkFD2HQAvBikjSQt1C036BdAKDt4EbSEbQwjIQNIM8BEXz5fJu3Zunqkt7basCuxthbZfOm7zPjNZgNt9v3OSYWXpgjHpxf655sB3Kjt0XEhLyDpMvrrBZVGqmadXlDbPo3QFLJUacOJYuhce+NXDu4z0nRY0hbDiTgu6oWxZmsi30sXIniJk0NUKDGK9Ooiwr+kEtGPhsQGCZEpH7NRQc7sv9PnlgzA0HNrZslKpgnxftKq0FCHZkAjYEl/AkxNWBKngo4aYWxdR7h8Qr5f3AJVKDF2H/FNnZHASSHgmz26FbCkv6kcoQrCVaMVpHsUiCAV+VLJyNoawEHtxz2tDLLZPT894OClI37oTTeXcoHRCaUdBbLvLrH2S3YzT481+CrA84CKJ2oc49feRHA1T176+vlBT8eGxSJ+PJgxc7ZjmRQ9+WiOEHMJ142WemYIibqRqyVYXs8qkyv9HoCvNptgK98/+rKD3S8CxVIrdy9+z8ioguoDBiOMePO1X9hQ6JkwFcuNQkns+UaJSpnx4V8iOC28QY+/6KFSBeIxaJVHuxoDo0k7sz1bIpwrETalq5hI9oxVfzadjP6dD3C+/B9gfn87g1zs3u2HHDz9/CIGjmY8OWhUjBlD4wpR8lWijq6wcyD4XW/ZQTBfqeJHbM5WGB9/W2sA/2yvp6k+0Qckoj6rNlaxdsYoe/8reV/6u3GsBKcdFtBqR0T/kU5EPqABzuZLLzPjklafXeq+n73s4JkXgFIXFDw2IdIMMBbh1vTdRgOqM0roNQwiN8TLpcEtC6dhfPK25gCLivbALtZUm4wDcQFYjCQdbh/ioDg1q3TwwIaUfSomwqFUInqpVOiK5QqVnK16yz854OCFg/LSLBSi6nFopBaJnXlkgtBHjCEb9WVDDgPDmiVao6zBBUR4+sztPsAvHmU89KwvOMn+KuDJfhuLsLZ7y/8kPFc+ArDEZndCwWYdROAShnLjmjKUZSqWetfJuJuk7Cxfx5XyszaoV9rQQtYkMD3TWYsjYwQ3ThgV6u1k7w11G1aRTJy1sEfJnBAOU5DPLOOzd/gA//wA49+3+/ZoAU8C9hIxRqoPSCeAlAG3zwc+2uEebIaYKQPTswqbByoYj9t3L5IbuZ5s2Z/NoB9/WWH/FOHY6QZ6cIM45nAQnbQxsVHpSIzRaGcvSPgpAViANTZvEazEEWDYswB8+QTjnTdKGA7hbJbx7YeBM1mgT8CNCqjsAxuHTpOR/Ve+kxfA2LE7JT6zF8vLcs2wfeOH2KUpVyh/3vP4i90vp9/CnuMKe15pbMlqxqJF700PkdYPJSKjkyvs9dEB8SEjhuy9IgUbAeuWrcC1m+aziVKF8cOngJdPCKA8n3KjQFxYdjRwMYZiuToZqzxzukjIVwnXj5T1S2PzUoq+QNl86dvM+JithjNFwtOTCk8+17zFeqF6fK2CijLWRHyvTzeX5gwBBUs7QrkSzSl6rLDW224A1gws3snOA4xnXvapt541a0NHKOynm3FKQN+JosLGlIeJpKR22LuI8B3K5sr3M/id9pr19+Fn9/sJZK3mFkn/Gy5ROjpj1IJwpfdcAVhin4U1e6ISARMDwLbrhAqbv0FHzzCeeInR5wCpuL/v9sneKy9gyG/czdrJMEVlSrmErcN2UzwI9GPK5MuP2U7mfmZS4YVX/Bjo8LWUGizS85p1hGSdE7+txTP6bqAOCRVrlajqS83XbwbecJnOs2252fwsQ6hZ2pFMRtl/ayG3gamy5cYWufFkUYLwCTeNWbZsEe2gbK70LAPXdTvI8PPTeYKA/OTu4L9GQFzCXzgwAKSGFIYc7spnKtgZdUgAFvelsOZrNwE3X946sOH5VD3Gjn2sbdkxAdmCgBVuX9yJ58oKVw1XkLSY50zAc7IHWzNyhAf96AEH+yehpelWrjVjhGiSMBZlcR51fIUBFoFKqFcMGrddD1w63hnAMpgn93uQUCRRmbQU3aWKFJ5gvgKcLilc2l/FSMye0UOMHZTJlU/bzBw0Az+dIzx3TGHHLn8PbHZt2KSgHMZ4N+qRsVYFrFnSUWXfFYPGO28ELptYCHClyrjnCeCJF32Hxi1XAnfcLFLy/Hu37w0ADqxYhoprHqpmE1zie9HLjxUUxpNVLWzZu2iasvnyLDN3s6yLjuexgw4OHAUOmbjoJUa++RKlY5bFc9TxFQZY2HPZ/+RngXe/Hrh87UKAv79DTJDzA99Fwn7PG+ff+8huD/kS0C/6cNwXtsRUaSNiUnawyRxhKAZcNmBPHyaiUk8Bzs4SnplSePw5P5uwfgsOC12XvE7BdRgjXfDnmr3ZWKvEHBkAfMfrgS3rFgL8Z//M+gUQsIxrUSTmP//Q/Hsf2OXp+/qTvtokurCoSyaeuuOXMnjwlRwhFSVcMWRPktYA94pFmwnvO6EgyWdPPOdLtDUvf92KXHKZ7z3qxLEvL4oSyVli8uTEQckOrPgClrxYuSLjzpsJV6xfCPBf/AvrPVrAMi+gWKw+5/thatf9z3g4XwAGk0DaOBsCn7D2NNZnQrSJ+NG8H30pgpa9S7Po3ghZ4UE+dUjh+DnCzr3zSy6E77lsi9KpJ+0ArM2QoRIe2lsURGr4rkDfW5QtAu97E+HKBgDf97RIyHMAS5ti4br9pvkA3/e0h5k8MBAALGZM0Yd1THUQ01XLoOhAljteJN3ONRbjtbSQ1Qs1qf4NFIqS/fjISWDfoSDZuq6myqVbFGLi/zXSQJ3tPaxpSfvakCFxVAFXEEuV1nsFYDFJGndghZErAO+/hXDVhsZC1oPPAruP+C/LdZuBt1+3UMj6wROM0xnGQMKn4Hk26SDHycRxmQS2dijxaIEQUaQzIWxdWk2ylSbabFCirkim4akZ4NmXfBDCe/DlW5SOvdJOBpNxv0ijJiPfUKuxVA0lgY0jvgAkL4BsCcb+fOm4sNcOSCsYw6GTrL1P2gccfKTfmTxr27b8XwcAhCxcbdhTMCUsOgJcPWSRRRM9JqbKHzH49mYA2fheFuSpIw7OFYCn9wRhPQHKW7YqXdhsIsicr0VfBB2HKdgYMgyI8vKsHwLeek17Viobc2Jm7J1iZIq+AaRmp24zlMcXsoArLAJMoPutOxtaWbTnjymcLRB27YcOr5Vr6xWkY5Q3JedaMKCaMknyjfEQyXeyzwqFFivAnW/ojkJbGfdi92SLjJ0HWbsXta06FAjQChXLnCbzhOE+xusG7TkctLPBtruw1YU6lSHsP62QLQC7DwJrxhWqirFloI5FByjXtuTQPlsTpMrAb79t+anXzFWo+Me7WEd6yN4sTgmTEtMKwBL8d7ygsDZZxXqLhg7tLrTt8G8VYHPfoWmF4znC0TMKmSrwun5PmwH9sjfBj9CebGpVihnSWKlyReBTv9KhA7ndAS9y/z1PeugPoj5MOE+rEZe5ih/ZIUaOIYuJ49rhbztkp5P1kr10+wEXB2cIG/s9DPbNVa+rUYnZi4N4ZpGShTVLPctMAfjM7Z0BfOgE4+cHgfN5YP0ocOtVrbkS6+f5b9s9DKUCCTtg1SbdpdmazJT8tJZrR+xmIOqQHdtBd80ms9j3UtTkP3dHMBpnbOpnQ8C1MoXmOSMxi+QqUq2w+Ewe+My72gf4wV2Me570JV/tpPB8gH7/DmDNYHsS93d/4gNcs3QFOnIrtmrRgUWWuGmNPQm6FnQnC7ccxo5WgL/72QgqHuPGCV4ArBG05Kdmz2UgN+sDfDYL/O672wN4aprxt/fMpaEIECacdt0w8Ad3tgfwPz3kYbQfWk/WwQFBWG0zgEWNFwl6oA/YMmgT4CBsVhY+ky/fDebfaAWEXt7zyAEHR2YUbpjwEHfnDCI1cg4iNLQLMGDPYj48m2kfYKHeR3b7QpGoNgZg8TzJnv4XH5bvWgf5Hx/0MNLvmzLDADdzRuSrUqlH6XoeaxIWPUnhwHebqSvdvABTM8CDByLYMMDYPNA4jNQYLjQQs5J240dBtsuif/A4Y9+UgMFatRGAhTMUSqT39N/eBmwYaR3gbz7oYTQNDKR8Z4REf7TibZJojlmPcMOo9bzhudQVm8ln3QAsz37vWVez5zdvDAEc+tUALM53EbBmAoA//c72WPR9TzFePsma2kR/FR1cABbqPZ8nfPhWYP1wewCPpIHBNgAWs6qwZynWstWigUPWcV7ymd6HLaWPdgvwzikHe04oXD/uYbjBIXnzKLgInAsAvqtNNen+ZxiTp1mrNkJtYkcWwU24grT5628mrG0DYM2iDcChPXgpFi2hOjNlhcstq0cL0kcDQctKAni3AIv/9vu7I7rK683rF7LpBQAXgDMZ4BPvaI+CJc/o2FnW3iHRW8UTJHu7ULAIbe+5mTAx1DoFf+thD8MCcEjIMtV7Gq2JCXqX6gLXj5XbCgRstsYNE8BtlXBo1nkr3+84pPDSGQc3rfMwUkfFJq9XVCRh0YaCP/QWQryFUFjTv0RonJzxU1I0BSs/+kMoeCbruwvHW1SVJL/p7sdYAyxStE5Oa6ImCfWeLYlwVcF4wm7aSsMSDraKsLQCYLN7ciXgnr0RXQfrzZt4XtEWDXCdFC37sGQoXLe5dYr72R4PJ87DZ9GBkGUo+FweeMd1tGRgfHgOzx1mPH+E9f4rAGtX4hIAy94r3iOXCNePlawmni1ahMVn03bKKDUDsJXv/++4g+eOKlw55mHT4NwT2oMU6MEiaIkeLFQsku8Nl0jUhqScNAf68X0eTmXmwm8MixbOIJXof/kawmj/0u3kZhn7p4Bdh31hTbPn4IURgBfLPJR0lUyZsGWwiuG4RdXIP1upcRklWcKVtkuHgfc8xg/3RFGsspaoE0G2gzZ0BA59baoUVSnvmxoF5GyBtIVL9nJxRsglViqxb+uEMskUjPvClXwkPEe8P1pNEs9UYB0TKpb2MtKelA4O0l5M6SVxKMjeLWqWBOJJW8LujbNBUk8bxWsVKuJYIKTlqAGL0Rtm7ZYshGarlGErFNrKPScyhAdecrXA9cYNfhlgk60gYMii66C6or93SuSGRD4KSKUKaVYuFK9LFjoCJOv9Viq362zBIM9Xx2OJqTJg/aYt+SltSx+Vqm9OlMu0pdNLg7YkXlpKOwi7X6x+R1lYc9Yv43PDSFn7j+1eTUoZSme2ipHaGviuowq7TzgYTTJuWucLI8Yebfbi2QBUne8rlBscpCXgGoAFZDE8SByVpj5x64XSQOV7aVf2YT8x3P+ISVTUJ+nLpLqatvTBXAElS1smrSVc+9Ksg6mwU2afNY9YZs26H6X+Ph13PxNe+wWbjK1ywrYAFl/rAy9FcSoHbB5kbBllDZpJKtPpoKGUUJGEBSShNh35EQiopui3T30+0Pr0tKDAmc4hDgQ4kw1hgJW/dX9BrrGpVGteGOEAus0glMcUSgvXddHFSSukzZGXWXTqh9e5pXLCWtiyVBDcFsiywD960UVmlnDNuIe16YCKg2o5RjfWe7MAEQBsYrfmFSM1Vd5DZYRN8W8twAVCnGlT/5T4MX34g++gNtXwxN+rSz0EFfG0V6pW8HRu9lKUVFyCUuXuqhH75Rq0nNFqQXDNpi2V9LcFsLQjqtOPX3Qhhca3jjHWpX1nhA7eC1ixYd36b3koFCigIx39lai5B8Phrvr2IGHcsHbNBYLgwHDYkC6FGDows1Yhvu5QD2nTgCv7vtTFsl2Lo7bG7ZT01yBbOpTDJsiZWeDhgxEtSIlDQth1GBQTqFeLugx1HsSm+1uVsOPQWQ4B7r7TKngpwjU9arFhcxWF5yrBm1LFQQeGLcvzx/KEfIV0wtq1wz0sDE70WDoReUujtV5U0bN5rI5NkCUT75EDEQjYw3HGNeNz0nWAT8jP2KDnYMZm4o1ipswLop9eysgUqsUVbsdUs9NV36OMa0Z7w5bN7Do6VkfvxRYPxrIJsuzJ2w9HcCLrn4N07bicUGazh87bkvpXx3JySAhhPCkCVaV3bNk3bHR2MJZM0fbRdp0vW+Mnxeu055QDqTa1cRDYNMAd17TsdmyyX5+UksEl2eMJW4aqGLPpwG/EjLo92k7vxZYPp+x2Ieufl1NOdr7i4lxRLEuMSwcYo6mFZxzZ7te0J3vtzKwvTMk5iAMxxpXDlR4YMRrOoLvDKX3J0v7xsrYXW3Rl8T7tOen4xUIjrIWwsYSd/N1G4xXVSYA9UyRUPKkeC1w+WMVo74qL1g3D0vGy0upqciUu9XJIwN6+0w4OTit9rI2rWLsb1yQZ6b7OSxKbPkVHlvMLZ2ZJq23i55LDpzcNVrE26fV0r62ft7UDogMq7tkR77apWdqrMuPwjMLhGQdydqI2TijW8dZyVKzYjyWoT2zBi1URFtYrOrcOrq+I98ePwxbmLwYNOdlsfdrDaHx5D7/S62X7iHdf4OKNVa4804t6Hr0A2bQpOvPRjIOTOYWzRd/VOFel3a9ma8yYNcNJrQSir0zJ/RHJXY5D25BFOhYz5cpcNO2Qe1MiQQ1OxVg4ouaO09AzuWLlDvb4XlsHRi/3AklJ4POzCjkpyD0rjgmlvUQV5uBsYXHC+6BHHKF01npsqo+RtFCcrdv5yoHQpOjOZMy9r9W22gJYGs3my3/FzH/UagcX77O3AkT016lE5I/babFtgJnZzRYqP7VdHa+dQV+Q9xLtSMXdtxJRW+kPbQMc7MfrPZR3MGPjBbnYyzxpIkwqRG5JJGiq3a47Alg68YPlK4++2oSudhdo5e+n6ajr3ionqHQylo4B9im59Ase6EFmbhCi3slwLj4TXgEiyivwOxKJ6OOdrkxXAEun4nVij+VQS+sRRp1O6rXwnOy1pOi9yZj7P93Mp2uApfNMvvIRAn/nIsjdQDH3rIDLoI+lE+6/dtuiFYBDlHz3RXbdHSTClknRB7qlXDMKawCbPbnK9F8XBa9OQRYrFb+nmz23vmerABvpulwt339RhWoPZFGFIk7k9k6l5cV6sw6w0ZOrqHzvojGkRZCJdjhwP9iJntush54ALJ2KwJUrVL4M4A9frbbrZovX7fdiWwbwN8m4+7l2LVSt9t0zgM0AxEHhVflbF/flBbvjtHLot9pxHLQK6jxdupOH2n1GuxpR+S6Yb2332dfk/USPOnA/2qrLr5s16DkFm8EJm84Xq5/wPP7LC5eaaVop+pNEzPlmwJ67wa6lZ5cN4BDQw9l8+StEdNeFsjcLmMz89VQi8qdEdKYlZCzdtOwAm3EHIblfZeabLc1lVTYjccsK/NlEIvrESgxwxQAOCWHv9jz+Aph/cSUWoGd9Ej2mFH3RlkWq03GuOMBm4JLwRh4+z+DbOp3ManhOsvxY4UvpeOSR1TGe1TCK0BiC/OS7APoQwKHqHKtsoPOGQzMA/7sCvp5MRp9aTSNdNRRcvyhSTqJQqN7pgT8O4F3MvArC3uZGKdVsAPxIgb4djzv3EtHsagLWjGXVAhxeLCnxlC9W38fsbQPTNgZPrMRiSgU5ED9EpB5KxJx7iKjFkxlXYrR+n68KgOuXJ6ituQ1E2wj8eoA2McuxWPYuqbcM8BEG7QTzw1E38pBtR4C90S7e0qsS4AbsPJYrYYuqVrcy8VZm3gqmcSakiTkFQpqZ0kRIy7PMyBBxBowME2WJkQHxCSLaR0z7PMfZl4xiPxFdXaKvAAAADElEQVQVlwOEXvbx/3Bccpan8cseAAAAAElFTkSuQmCC",Fn=pe(59301),rn=({className:Tn,dataSource:Un=[],col:kt=4,right:$t,bottom:Je=23,precision:qt=0,wrapWidth:vn=1200,trackEventItems:Ft,loading:st,handleVery:on=()=>!0})=>{const En=Math.floor((vn-(kt-1)*$t)/kt);return Fn.createElement(Be.Z,{spinning:st},Fn.createElement("div",{className:Tt()(Wt.list,Tn)},!!Un.length&&Un.map((Dn,Jn)=>{const{subject_identifier:St,id:Nn,identifier:qn,power:Si}=Dn,en=Dn.is_public!=0&&Dn.is_public;return Fn.createElement("div",{className:Wt.wrap,key:Nn,style:{width:En,marginRight:(1+Jn)%kt===0?0:$t+qt,marginBottom:Je}},Fn.createElement("a",{className:Wt.li,onClick:Cn=>{Cn.preventDefault(),on(Dn==null?void 0:Dn.first_category_url)&&(Ft&&(0,Qe.L9)([Ft]),(0,Qe.xg)(Dn.first_category_url))}},Fn.createElement("div",{className:Wt.top},Fn.createElement(He.Z,{title:Dn.name},Fn.createElement("div",{className:Wt.name},Dn.name)),Fn.createElement("img",{className:Wt.img,src:rt.Z.IMG_SERVER+"/images/"+Dn.avatar_url}),Fn.createElement("div",{className:Wt.text,title:Dn.creator},Dn.creator),St&&Fn.createElement("div",{className:Wt.btns},Fn.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),Fn.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),en&&Fn.createElement("div",{className:Wt.sign},"\u516C\u5F00")),Fn.createElement("div",{className:Wt.bottom},Dn.visits>0&&Fn.createElement(He.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},Fn.createElement("span",null,Fn.createElement("i",{className:"iconfont icon-liulanyan"}),Fn.createElement("span",null,Dn.visits))),Dn.course_members_count>0&&Fn.createElement(He.Z,{title:"\u6210\u5458",placement:"bottom"},Fn.createElement("span",null,Fn.createElement("i",{className:"iconfont icon-chengyuan"}),Dn.course_members_count)),Dn.tasks_count>0&&Fn.createElement(He.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},Fn.createElement("span",null,Fn.createElement("i",{className:"iconfont icon-zuoye"}),Dn.tasks_count)),Dn.is_end?Fn.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):Fn.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!Dn.is_accessible&&Fn.createElement("div",{className:Wt.lockWrap},Fn.createElement("img",{src:`${rt.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),Fn.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!Un.length&&Fn.createElement(it.Z,null)))},An={flex_box_center:"flex_box_center___d27mZ",flex_space_between:"flex_space_between___qfRU9",flex_box_vertical_center:"flex_box_vertical_center___fCRld",flex_box_center_end:"flex_box_center_end___ORMV8",flex_box_column:"flex_box_column___PNKtZ",tabs:"tabs___alpa7",tabsWrap:"tabsWrap___aCQjw",tab:"tab___MKLr4",active:"active___nl_4v"},ni=pe(89070),Yn=({dataSource:Tn=[],value:Un,onChange:kt,className:$t,style:Je={},tabBarExtraContent:qt})=>ge.createElement("div",{className:Tt()(An.tabs,$t),style:Je},ge.createElement("div",{className:An.tabsWrap},Tn.map((vn,Ft)=>!(vn!=null&&vn.hide)&&ge.createElement("aside",{className:An.tab,onClick:()=>{kt(vn.id),vn.link&&ni.history.push(vn.link)},key:Ft},ge.createElement("div",{className:Un===vn.id?An.active:""},vn.name),(vn==null?void 0:vn.resetCount)==null&&(vn==null?void 0:vn.total)!==void 0&&ge.createElement("span",null,"\uFF08",vn==null?void 0:vn.total,"\uFF09"),(vn==null?void 0:vn.resetCount)!==void 0&&(vn==null?void 0:vn.total)!==void 0&&ge.createElement(He.Z,{title:(vn==null?void 0:vn.tip)!=null?vn==null?void 0:vn.tip:""},ge.createElement("span",{style:{color:"#9096A3"}},"\uFF08",ge.createElement("span",{style:{color:"#000"}},vn==null?void 0:vn.resetCount),"/",ge.createElement("span",null,vn==null?void 0:vn.total),"\uFF09"))))),ge.createElement("div",{className:An.tabBar},qt)),wn=({className:Tn,style:Un={},children:kt})=>ge.createElement("div",{className:Tt()(Tn),style:Un},kt),Gn={flex_box_center:"flex_box_center___e6HxQ",flex_space_between:"flex_space_between___RnXYe",flex_box_vertical_center:"flex_box_vertical_center___lVxPk",flex_box_center_end:"flex_box_center_end___bu8yv",flex_box_column:"flex_box_column___JczGj",orderWrap:"orderWrap___ZfyGX",orderIconWrap:"orderIconWrap___XTB_O",orderAsc:"orderAsc___KWHmA",orderDesc:"orderDesc___rHdbB",active:"active___a7eSP",cursorPointer:"cursorPointer___gs9kL",orderTextWrap:"orderTextWrap___teAKn"},ze=pe(38854),Ee=pe(20834);const Pe=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var Ae=({sortValue:Tn,dropValue:Un,className:kt,onSort:$t,onDrop:Je,dataSource:qt=Pe})=>{var vn;return ge.createElement("div",{className:Tt()(Gn.orderWrap,kt)},ge.createElement(ze.Z,{dropdownRender:()=>ge.createElement(Ee.default,null,qt.map((Ft,st)=>ge.createElement(Ee.default.Item,{key:st,onClick:()=>Je(Ft.id)},Ft.name)))},ge.createElement("span",{className:Gn.orderTextWrap},(vn=qt.find(Ft=>Un===Ft.id))==null?void 0:vn.name)),ge.createElement("span",{className:Gn.orderIconWrap},ge.createElement("span",{className:Gn.orderAsc},ge.createElement("i",{className:Tn==="asc"?`iconfont icon-sanjiaoxing-up font12 ${Gn.cursorPointer} ${Gn.active}`:`iconfont icon-sanjiaoxing-up font12 ${Gn.cursorPointer}`,onClick:()=>$t(Tn==="asc"?"desc":"asc")})),ge.createElement("span",{className:Gn.orderDesc},ge.createElement("i",{className:Tn==="desc"?`iconfont icon-sanjiaoxing-down font12 ${Gn.cursorPointer} ${Gn.active}`:`iconfont icon-sanjiaoxing-down font12 ${Gn.cursorPointer}`,onClick:()=>$t(Tn==="asc"?"desc":"asc")}))))},ye={flex_box_center:"flex_box_center___LCi0B",flex_space_between:"flex_space_between___hzONe",flex_box_vertical_center:"flex_box_vertical_center___ZyQRE",flex_box_center_end:"flex_box_center_end___XKM74",flex_box_column:"flex_box_column___p8LCU",btn:"btn___In02G","mediacy-round":"mediacy-round___uveEv","mediacy-default":"mediacy-default___dDxsd",default:"default___K791v"},qe=pe(3113),vt=Object.defineProperty,et=Object.getOwnPropertySymbols,Ye=Object.prototype.hasOwnProperty,xt=Object.prototype.propertyIsEnumerable,yt=(Tn,Un,kt)=>Un in Tn?vt(Tn,Un,{enumerable:!0,configurable:!0,writable:!0,value:kt}):Tn[Un]=kt,at=(Tn,Un)=>{for(var kt in Un||(Un={}))Ye.call(Un,kt)&&yt(Tn,kt,Un[kt]);if(et)for(var kt of et(Un))xt.call(Un,kt)&&yt(Tn,kt,Un[kt]);return Tn},zt=(Tn,Un)=>{var kt={};for(var $t in Tn)Ye.call(Tn,$t)&&Un.indexOf($t)<0&&(kt[$t]=Tn[$t]);if(Tn!=null&&et)for(var $t of et(Tn))Un.indexOf($t)<0&&xt.call(Tn,$t)&&(kt[$t]=Tn[$t]);return kt},un=(Tn,Un,kt)=>new Promise(($t,Je)=>{var qt=st=>{try{Ft(kt.next(st))}catch(on){Je(on)}},vn=st=>{try{Ft(kt.throw(st))}catch(on){Je(on)}},Ft=st=>st.done?$t(st.value):Promise.resolve(st.value).then(qt,vn);Ft((kt=kt.apply(Tn,Un)).next())}),Qt=Tn=>{var Un=Tn,{className:kt,style:$t,children:Je,loading:qt=!1,openLoading:vn,onClick:Ft=()=>{},size:st="middle",shape:on="round"}=Un,En=zt(Un,["className","style","children","loading","openLoading","onClick","size","shape"]);const[Dn,Jn]=(0,ge.useState)(!1);return ge.createElement(qe.ZP,at({onClick:(0,Ct.throttle)(St=>un(void 0,null,function*(){vn&&Jn(!0);try{yield Ft(St)}catch(Nn){console.log("error",Nn)}vn&&Jn(!1)}),2e3,{leading:!0,trailing:!1}),className:Tt()(ye.btn,ye[`${st}-${on}`],kt),style:$t,size:st,shape:on,loading:Dn||qt},En),Je)},Kn={flex_box_center:"flex_box_center___TB7bQ",flex_space_between:"flex_space_between___oBlTb",flex_box_vertical_center:"flex_box_vertical_center___b5XbB",flex_box_center_end:"flex_box_center_end___CNhe7",flex_box_column:"flex_box_column___yHXKW",head:"head___ghH72",node:"node___mjPEy"},jt=({className:Tn,style:Un,children:kt=null,onClick:$t,title:Je})=>ge.createElement("div",{className:Tt()(Kn.head,Tn),style:Un},ge.createElement("span",{className:"primary-hover",onClick:$t},ge.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),ge.createElement("b",{title:Je},Je),ge.createElement("div",{className:Kn.node},kt)),sn={flex_box_center:"flex_box_center___AlHuF",flex_space_between:"flex_space_between___vN2LW",flex_box_vertical_center:"flex_box_vertical_center___Ac7D2",flex_box_center_end:"flex_box_center_end___y38I7",flex_box_column:"flex_box_column___iQE6P",btns:"btns___sNgTb",confirm:"confirm___Ozirl",cancel:"cancel___aiq1I"},dn=({confirmShow:Tn=!0,confirmTitle:Un,confirmClick:kt,cancelShow:$t=!0,cancelTitle:Je,cancelClick:qt,className:vn,style:Ft,confirmLoading:st=!1})=>ge.createElement("div",{className:Tt()(sn.btns,vn),style:Ft},Tn&&ge.createElement(qe.ZP,{loading:st,onClick:kt,type:"primary",className:sn.confirm},Un),$t&&ge.createElement(qe.ZP,{onClick:qt,className:sn.cancel},Je)),Pn={flex_box_center:"flex_box_center___jkpdr",flex_space_between:"flex_space_between___OtsL8",flex_box_vertical_center:"flex_box_vertical_center___rbcb_",flex_box_center_end:"flex_box_center_end___zBR21",flex_box_column:"flex_box_column___nS_eP",fixedBottom:"fixedBottom___oJl7m",wrap:"wrap___A3Oq1",center:"center____VL1y"},pi=({className:Tn,style:Un={},LeftContent:kt,children:$t,RightContent:Je})=>ge.createElement("div",{className:Tt()(Pn.fixedBottom,Tn),style:Un},ge.createElement("div",{className:Pn.wrap},ge.createElement("div",{className:Pn.left},kt),ge.createElement("div",{className:Pn.center},$t),ge.createElement("div",{className:Pn.right},Je))),gi={flex_box_center:"flex_box_center___tY8Yn",flex_space_between:"flex_space_between___vHdYA",flex_box_vertical_center:"flex_box_vertical_center___pa61F",flex_box_center_end:"flex_box_center_end___HyDXt",flex_box_column:"flex_box_column___UjZek",crumbs:"crumbs___V41Oe",hover:"hover___bEIVd"},Xi=({className:Tn,style:Un={},dataSource:kt=[]})=>ge.createElement("div",{className:Tt()(gi.crumbs,Tn),style:Un},kt.map(($t,Je)=>Je<kt.length-1?ge.createElement(ge.Fragment,{key:Je},$t.path||$t.onClick?ge.createElement("span",{className:gi.hover,onClick:$t!=null&&$t.onClick?$t.onClick:()=>ni.history.push($t.path)},$t.name):ge.createElement("span",null,$t.name),ge.createElement("span",null,"\xA0",">","\xA0")):ge.createElement("span",{key:Je,style:{color:"#5F6368"}},$t.name))),ar=pe(31797),Ji=Object.defineProperty,wr=Object.defineProperties,mr=Object.getOwnPropertyDescriptors,Hi=Object.getOwnPropertySymbols,Er=Object.prototype.hasOwnProperty,$n=Object.prototype.propertyIsEnumerable,Le=(Tn,Un,kt)=>Un in Tn?Ji(Tn,Un,{enumerable:!0,configurable:!0,writable:!0,value:kt}):Tn[Un]=kt,Ei=(Tn,Un)=>{for(var kt in Un||(Un={}))Er.call(Un,kt)&&Le(Tn,kt,Un[kt]);if(Hi)for(var kt of Hi(Un))$n.call(Un,kt)&&Le(Tn,kt,Un[kt]);return Tn},Ri=(Tn,Un)=>wr(Tn,mr(Un)),nn=(Tn,Un)=>{var kt={};for(var $t in Tn)Er.call(Tn,$t)&&Un.indexOf($t)<0&&(kt[$t]=Tn[$t]);if(Tn!=null&&Hi)for(var $t of Hi(Tn))Un.indexOf($t)<0&&$n.call(Tn,$t)&&(kt[$t]=Tn[$t]);return kt};const{Countdown:di}=ar.default;var Li=Tn=>{var Un=Tn,{onChange:kt}=Un,$t=nn(Un,["onChange"]);const[Je,qt]=(0,ge.useState)(null);(0,ge.useEffect)(()=>{typeof Je=="number"&&Je>=0&&kt(Je)},[Je]);const vn=Ft=>{const st=Math.floor(Ft/1e3);qt(st)};return ge.createElement(di,Ri(Ei({},$t),{onChange:vn}))}},58856:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Oe}});var ge=pe(59301);function Oe(Ke,ut){const Ge=(0,ge.useRef)();(0,ge.useEffect)(()=>{Ge.current=Ke}),(0,ge.useEffect)(()=>{function Xe(){Ge.current()}if(ut!==null){let Ne=setInterval(Xe,ut);return()=>clearInterval(Ne)}},[ut])}},42609:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return ne}});var ge=pe(59301),Oe=pe(8591),Ke=pe(43418),ut=pe(19842),Ge=pe(54580),Xe=pe(3113),Ne=pe(3294),Tt=pe(955),Ct=pe(99064),Ve=pe(89070),Lt={customModal:"customModal___bVzUV",content:"content___oKhZq",upload:"upload___nPxEL",infoText:"infoText___gZEJF",okBtn:"okBtn___CVo2A",fileList:"fileList___tauGN",fileName:"fileName___T_8JX",selectitems:"selectitems___imW2Y"},dt=pe(59301),Rt=(ee,ce,se)=>new Promise((he,ve)=>{var be=He=>{try{Be(se.next(He))}catch(We){ve(We)}},ke=He=>{try{Be(se.throw(He))}catch(We){ve(We)}},Be=He=>He.done?he(He.value):Promise.resolve(He.value).then(be,ke);Be((se=se.apply(ee,ce)).next())}),ne=({visible:ee,onOk:ce,onCancel:se,sub_discipline_id:he=[]})=>{const[ve,be]=(0,ge.useState)([]),[ke,Be]=(0,ge.useState)(!1),He=(0,Ve.useParams)(),[We,rt]=(0,ge.useState)([]),[Qe,Pt]=(0,ge.useState)([]);(0,ge.useEffect)(()=>{ee?Ze():(Pt([]),be([]),Be(!1))},[ee]);const Ze=()=>Rt(void 0,null,function*(){const _t=yield(0,Ct.ZP)("/api/disciplines.json",{method:"get",params:{source:"subject"}});rt(_t.disciplines||[]),Pt((he==null?void 0:he.length)>0?he:[])}),Et=()=>{if((Qe==null?void 0:Qe.length)===0)return Oe.ZP.warning("\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B\uFF01");console.log("subDisciplineId",Qe),Be(!0),ce(ve,Qe[1],()=>{Be(!1)})},it=()=>{se()},Dt=()=>{const _t=`${Ne.Z.API_SERVER}/api/courses/${He.coursesId}/exercises/down_template`;(0,Tt.Nd)(null,_t)},ht=_t=>{const Vt={name:_t.name,uid:_t.uid,file:_t};return be([Vt]),!1},Ht=()=>{be([])};return dt.createElement(Ke.default,{title:"\u5BFC\u5165\u8BD5\u9898",open:ee,onOk:Et,centered:!0,wrapClassName:Lt.customModal,onCancel:it,width:663,okText:"\u786E\u8BA4",okButtonProps:{className:Lt.okBtn},cancelText:"\u53D6\u6D88",confirmLoading:ke},dt.createElement("div",{className:Lt.content},dt.createElement("aside",null,dt.createElement("div",{style:{fontWeight:600}},"\u6B65\u9AA41"),dt.createElement("ul",null,dt.createElement("li",null,dt.createElement("span",{style:{color:"#5F6367"}},"\u6839\u636E\u6A21\u677F\u8981\u6C42\u7F16\u8F91\u9700\u8981\u4E0A\u4F20\u7684\u8BD5\u9898"),dt.createElement("span",{style:{color:"#0152d9",cursor:"pointer",marginLeft:20},onClick:Dt},"\u4E0B\u8F7D\u8003\u8BD5\u8BD5\u9898\u6A21\u677F"),dt.createElement("i",{className:"iconfont icon-xiazai4 ml10",onClick:Dt,style:{fontSize:14,cursor:"pointer",color:"#0152d9"}})),dt.createElement("li",{style:{color:"#FA6400"},className:"mt10"},"\u63D0\u793A"),dt.createElement("li",{className:Lt.infoText},"1\u3001\u76EE\u524D\u4EC5\u652F\u6301Excel\u683C\u5F0F\u6A21\u677F\uFF1B "),dt.createElement("li",{className:Lt.infoText},"2\u3001\u4E0D\u652F\u6301\u7EC4\u5408\u9898\u548C\u5B9E\u8BAD\u9898\u5BFC\u5165\uFF1B"),dt.createElement("li",{className:Lt.infoText},"3\u3001\u6BCF\u6B21\u6700\u591A\u5BFC\u5165300\u9898\uFF1B"),dt.createElement("li",{className:Lt.infoText},"4\u3001\u586B\u7A7A\u9898\u5BFC\u5165\u6700\u591A\u652F\u63018\u4E2A\u586B\u7A7A\u9879\u3002"))),dt.createElement("aside",{style:{marginTop:22}},dt.createElement("div",{style:{fontWeight:600}},"\u6B65\u9AA42"),dt.createElement("ul",{style:{flex:1}},dt.createElement("li",{style:{color:"#5F6367"}},"\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B\uFF0C\u4E0A\u4F20\u7F16\u8F91\u597D\u7684\u8BD5\u9898\u6587\u6863\uFF0C\u786E\u5B9A\u5BFC\u5165"),ee&&dt.createElement(dt.Fragment,null,dt.createElement(ut.Z,{value:Qe,className:Lt.selectitems,expandTrigger:"hover",placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",options:We,fieldNames:{label:"name",value:"id",children:"sub_disciplines"},onChange:(_t,Vt)=>{Pt(_t||[])}}),dt.createElement("br",null),dt.createElement(Ge.default,{action:`${Ne.Z.API_SERVER}/api/attachments.json`,beforeUpload:ht,onRemove:Ht,withCredentials:!0,fileList:ve,accept:".xls,.xlsx",showUploadList:!1},dt.createElement(Xe.ZP,{className:Lt.upload,type:"primary",icon:dt.createElement("i",{className:"iconfont icon-shangchuan3",style:{fontSize:14}})},"\u4E0A\u4F20\u6587\u4EF6"))),ve.map((_t,Vt)=>dt.createElement("div",{key:Vt,className:Lt.fileList},dt.createElement("span",{className:Lt.fileName},_t==null?void 0:_t.name),dt.createElement("i",{className:"iconfont icon-shanchu12",style:{color:"#F65160",fontSize:16,cursor:"pointer"},onClick:Ht})))))))}},74440:function(Vn,xn,pe){"use strict";pe.d(xn,{h:function(){return ge}});var ge=(Oe=>(Oe[Oe.NOMATCH=-1]="NOMATCH",Oe[Oe.OK=0]="OK",Oe[Oe.TIMEOUT=2]="TIMEOUT",Oe[Oe.PODFAILURE=3]="PODFAILURE",Oe[Oe.COMPILEFAILURE=4]="COMPILEFAILURE",Oe[Oe.EXECUTEFAILURE=5]="EXECUTEFAILURE",Oe[Oe.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",Oe))(ge||{})},88264:function(Vn,xn,pe){"use strict";pe.d(xn,{H7:function(){return ne},MK:function(){return De},MU:function(){return Ve},X6:function(){return dt},bM:function(){return Ct},fi:function(){return ee},fu:function(){return Tt},n4:function(){return ce},rX:function(){return Rt},vl:function(){return se},zO:function(){return Lt}});var ge=pe(99064),Oe=Object.defineProperty,Ke=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,Xe=(he,ve,be)=>ve in he?Oe(he,ve,{enumerable:!0,configurable:!0,writable:!0,value:be}):he[ve]=be,Ne=(he,ve)=>{for(var be in ve||(ve={}))ut.call(ve,be)&&Xe(he,be,ve[be]);if(Ke)for(var be of Ke(ve))Ge.call(ve,be)&&Xe(he,be,ve[be]);return he};function Tt(he,ve){return(0,ge.U2)(`myproblems/${he}.json`,Ne({hidePopLogin:!0},ve||{}))}function Ct(he,ve){return(0,ge.v_)(`myproblems/${he}/code_submit.json`,ve)}function Ve(he,ve){return(0,ge.v_)(`myproblems/${he}/code_debug.json`,ve)}function Lt(he,ve){return ve.language&&(ve.language=encodeURIComponent(ve.language)),(0,ge.U2)(`myproblems/${he}/submit_records.json`,ve)}function dt(he){return(0,ge.U2)("myproblems/record_detail.json",{id:he})}function Rt(he,ve){return(0,ge.U2)(`myproblems/${he}/result.json`,{mode:ve})}function De(he,ve){return(0,ge.v_)(`myproblems/${he}/add_notes.json`,ve)}function ne(he,ve){return(0,ge.v_)(`myproblems/${he}/restore_initial_code.json`,ve)}function ee(he){return(0,ge.v_)(`myproblems/${he}/sync_code.json`)}function ce(he,ve){return(0,ge.v_)(`myproblems/${he}/update_code.json`,ve)}function se(he,ve){return(0,ge.v_)(`discusses/${he}/plus.json`,ve)}},15730:function(Vn,xn,pe){"use strict";var ge=pe(59301),Oe=pe(6848),Ke=pe(92832),ut=pe(8591),Ge=pe(7761),Xe=pe(59301),Ne=(Ct,Ve,Lt)=>new Promise((dt,Rt)=>{var De=ce=>{try{ee(Lt.next(ce))}catch(se){Rt(se)}},ne=ce=>{try{ee(Lt.throw(ce))}catch(se){Rt(se)}},ee=ce=>ce.done?dt(ce.value):Promise.resolve(ce.value).then(De,ne);ee((Lt=Lt.apply(Ct,Ve)).next())});const Tt=({defaultValue:Ct,onFinish:Ve})=>{const[Lt,dt]=(0,ge.useState)(!1),[Rt,De]=(0,ge.useState)(Ct);return(0,ge.useEffect)(()=>{De(Ct)},[Ct]),Xe.createElement("div",null,Lt?Xe.createElement(Ke.default,{autoFocus:!0,maxLength:60,style:{textAlign:"center",marginTop:20,marginBottom:20},value:Rt,onChange:ne=>{De(ne.target.value)},onBlur:()=>Ne(void 0,null,function*(){var ne;if(((ne=Rt==null?void 0:Rt.replaceAll(" ",""))==null?void 0:ne.length)<=0){ut.ZP.error("\u8BD5\u5377\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A");return}(yield Ve(Rt))&&dt(!1)}),onPressEnter:()=>Ne(void 0,null,function*(){var ne;if(((ne=Rt==null?void 0:Rt.replaceAll(" ",""))==null?void 0:ne.length)<=0){ut.ZP.error("\u8BD5\u5377\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A");return}(yield Ve(Rt))&&dt(!1)})}):Xe.createElement("div",{className:Ge.Z.title},Rt,Xe.createElement(Oe.Z,{title:"\u7F16\u8F91\u8BD5\u5377\u540D\u79F0"},Xe.createElement("i",{className:`${Ge.Z.editIcon} iconfont icon-bianji_Hover`,onClick:()=>dt(!0)}))))};xn.Z=Tt},86918:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Ve}});var ge=pe(43418),Oe={ul:"ul___TdfYY"},Ke=pe(32637),ut=pe(59301),Ge=Object.getOwnPropertySymbols,Xe=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable,Tt=(Lt,dt)=>{var Rt={};for(var De in Lt)Xe.call(Lt,De)&&dt.indexOf(De)<0&&(Rt[De]=Lt[De]);if(Lt!=null&&Ge)for(var De of Ge(Lt))dt.indexOf(De)<0&&Ne.call(Lt,De)&&(Rt[De]=Lt[De]);return Rt},Ve=Lt=>{var dt=Lt,{open:Rt,onCancel:De}=dt,ne=Tt(dt,["open","onCancel"]);return ut.createElement(ge.default,{centered:!0,open:Rt,title:ut.createElement("div",{style:{fontWeight:"bold"}},"\u8054\u7CFB\u6559\u7814\u52A9\u7406"),width:"696px",onCancel:De,footer:null},ut.createElement("div",null,ut.createElement("div",{className:"tc"},ut.createElement("img",{className:"mt10",src:Ke,width:"182px",height:"181px",style:{borderRadius:"2px",border:"1px solid #D8E3E9"}})),ut.createElement("div",{style:{color:"#191919",fontWeight:"bold"},className:"tc font16 mt10"},"\u514D\u8D39\u6559\u7814\u52A9\u7406"),ut.createElement("div",{style:{color:"#191919",fontWeight:"bold"},className:"tc font16"},"\u5FAE\u4FE1\u626B\u4E00\u626B\u6DFB\u52A0"),ut.createElement("div",{style:{color:"#333"},className:"pt30 font14"},ut.createElement("ul",{className:Oe.ul},ut.createElement("li",null,"1\u3001\u89E3\u7B54\u8001\u5E08\u7591\u60D1\u3001\u5E2E\u52A9\u8001\u5E08\u66F4\u5FEB\u719F\u6089\u548C\u4F7F\u7528\u5E73\u53F0\u6559\u5B66\u3002"),ut.createElement("li",null,"2\u3001\u534F\u52A9\u8001\u5E08\u521B\u5EFA\u8BFE\u5802\u3001\u8BFE\u7A0B\u8BBE\u8BA1\u3001\u505A\u597D\u6559\u5B66\u5DE5\u4F5C\u3002"),ut.createElement("li",null,"3\u3001\u6839\u636E\u8001\u5E08\u6559\u5B66\u65B9\u5411\uFF0C\u5206\u4EAB\u5934\u6B4C\u5E73\u53F0C9\u9662\u6821\u3001985\u9AD8\u6821\u3001211\u9AD8\u6821\u3001\u53CC\u4E00\u6D41\u9AD8\u6821\u8001\u5E08\u7ECF\u5178\u5B9E\u8DF5\u6559\u5B66\u6848\u4F8B\u3002")))))}},88918:function(Vn,xn,pe){"use strict";pe.d(xn,{I:function(){return Oe}});var ge=pe(59301);const Oe=()=>{const[Ke,ut]=(0,ge.useState)("hidden");return{overflow:Ke,handleMouseEnter:()=>ut("auto"),handleMouseLeave:()=>ut("hidden")}}},24768:function(Vn,xn,pe){"use strict";pe.d(xn,{AL:function(){return be},Iy:function(){return Lt},Qv:function(){return De},ez:function(){return ve},jb:function(){return dt}});var ge=pe(32834),Oe=pe.n(ge),Ke=pe(11690),ut=pe.n(Ke);let Ge=1;function Xe(rt,Qe){const Pt=rt.match(/^(\s+)(?:```)/);if(Pt===null)return Qe;const Ze=Pt[1];return Qe.split(`
|
|
|
`).map(Et=>{const it=Et.match(/^\s+/);if(it===null)return Et;const[Dt]=it;return Dt.length>=Ze.length?Et.slice(Ze.length):Et}).join(`
|
|
|
`)}let Ne=[],Tt=["<ul>"];const Ct=new(Oe()).Renderer,Ve=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Lt(){Ne.length=0,Tt=["<ul>"]}const dt={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function Rt(rt,Qe,Pt,Ze){if(Qe>=rt.length||rt[Qe].level<=Pt)return Qe;var Et=rt[Qe];Ze.push("<li><a href='#"+Ge+Et.anchor+"'>"+Et.text+"</a>"),Qe++;var it=[];return Qe=Rt(rt,Qe,Et.level,it),it.length>0&&(Ze.push("<ul>"),it.forEach(function(Dt){Ze.push(Dt)}),Ze.push("</ul>")),Ze.push("</li>"),Qe=Rt(rt,Qe,Pt,Ze),Qe}function De(){return Rt(Ne,0,0,Tt),Tt.push("</ul>"),Tt.join("")}const ne={heading(rt){const Qe=Ve.exec(rt);if(Ge+=1,Qe)return{type:"heading",raw:Qe[0],depth:Qe[1].length,text:Qe[2]}},fences(rt){const Qe=this.rules.block.fences.exec(rt);if(Qe){const Pt=Qe[0];let Ze=Xe(Pt,Qe[3]||"");const Et=Qe[2]?Qe[2].trim():Qe[2];if(["latex","katex","math"].indexOf(Et)>=0){const it=se(),Dt=Ze;Ze=it,he[it]={type:"block",expression:Dt}}return{type:"code",raw:Pt,lang:Et,text:Ze}}}},ee=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ce=0;const se=()=>`__special_katext_id_${ce++}__`;let he={};function ve(){return he}function be(){ce=0,he={}}function ke(rt){return rt=rt.replace(ee,(Qe,Pt)=>{const Ze=se();return he[Ze]={type:"inline",expression:Pt},Ze}),rt}const Be=Ct.listitem;Ct.listitem=function(rt){return Be(ke(rt))};const He=Ct.paragraph;Ct.paragraph=function(rt){return He(ke(rt))};const We=Ct.tablecell;Ct.tablecell=function(rt,Qe){return We(ke(rt),Qe)},Ct.code=function(rt,Qe,Pt){const Ze=(Qe||"").match(/\S*/)[0];return Ze?["latex","katex","math"].indexOf(Ze)>=0?`<p class='editormd-tex'>${rt}</p>`:`<pre class="prettyprint linenums"><code class="language-${Qe}">${Pt?rt:(0,Ke.escape)(rt,!0)}</code></pre>
|
|
|
`:'<pre class="prettyprint linenums"><code>'+(Pt?rt:(0,Ke.escape)(rt,!0))+"</code></pre>"},Ct.heading=function(rt,Qe,Pt){let Ze=this.options.headerPrefix+Pt.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Ne.push({anchor:Ze,level:Qe,text:rt}),"<h"+Qe+' id="'+Ge+Ze+'">'+rt+"</h"+Qe+">"},Oe().setOptions({silent:!0,gfm:!0,pedantic:!1}),Oe().use({tokenizer:ne,renderer:Ct}),xn.ZP=Oe()},50371:function(Vn,xn){"use strict";function pe(){const ge=Object.assign({},arguments.length<=0?void 0:arguments[0]);for(let Oe=1;Oe<arguments.length;Oe++){const Ke=Oe<0||arguments.length<=Oe?void 0:arguments[Oe];Ke&&Object.keys(Ke).forEach(ut=>{const Ge=Ke[ut];Ge!==void 0&&(ge[ut]=Ge)})}return ge}xn.Z=pe},77578:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return ge}});const ge=Oe=>Oe?typeof Oe=="function"?Oe():Oe:null},13845:function(Vn,xn,pe){"use strict";pe.d(xn,{F:function(){return ge},Z:function(){return Oe}});function ge(Ke){return Ke!=null&&Ke===Ke.window}function Oe(Ke,ut){var Ge,Xe;if(typeof window=="undefined")return 0;const Ne=ut?"scrollTop":"scrollLeft";let Tt=0;return ge(Ke)?Tt=Ke[ut?"pageYOffset":"pageXOffset"]:Ke instanceof Document?Tt=Ke.documentElement[Ne]:(Ke instanceof HTMLElement||Ke)&&(Tt=Ke[Ne]),Ke&&!ge(Ke)&&typeof Tt!="number"&&(Tt=(Xe=((Ge=Ke.ownerDocument)!==null&&Ge!==void 0?Ge:Ke).documentElement)===null||Xe===void 0?void 0:Xe[Ne]),Tt}},56762:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Oe}});var ge=pe(59301);function Oe(){const[,Ke]=ge.useReducer(ut=>ut+1,0);return Ke}},68031:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return ut}});var ge=pe(16089);function Oe(Ge,Xe,Ne,Tt){const Ct=Ne-Xe;return Ge/=Tt/2,Ge<1?Ct/2*Ge*Ge*Ge+Xe:Ct/2*((Ge-=2)*Ge*Ge+2)+Xe}var Ke=pe(13845);function ut(Ge){let Xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:Ne=()=>window,callback:Tt,duration:Ct=450}=Xe,Ve=Ne(),Lt=(0,Ke.Z)(Ve,!0),dt=Date.now(),Rt=()=>{const ne=Date.now()-dt,ee=Oe(ne>Ct?Ct:ne,Lt,Ge,Ct);(0,Ke.F)(Ve)?Ve.scrollTo(window.pageXOffset,ee):Ve instanceof Document||Ve.constructor.name==="HTMLDocument"?Ve.documentElement.scrollTop=ee:Ve.scrollTop=ee,ne<Ct?(0,ge.Z)(Rt):typeof Tt=="function"&&Tt()};(0,ge.Z)(Rt)}},66104:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Dt}});var ge=pe(92310),Oe=pe.n(ge),Ke=pe(11592),ut=pe(26112),Ge=pe(59301),Xe=pe(92343),Ne=pe(36355),Tt=pe(84105),Ct=pe(91857);const Ve=ht=>{let{children:Ht}=ht;const{getPrefixCls:_t}=Ge.useContext(Ne.E_),Vt=_t("breadcrumb");return Ge.createElement("li",{className:`${Vt}-separator`,"aria-hidden":"true"},Ht===""?Ht:Ht||"/")};Ve.__ANT_BREADCRUMB_SEPARATOR=!0;var Lt=Ve,dt=function(ht,Ht){var _t={};for(var Vt in ht)Object.prototype.hasOwnProperty.call(ht,Vt)&&Ht.indexOf(Vt)<0&&(_t[Vt]=ht[Vt]);if(ht!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,Vt=Object.getOwnPropertySymbols(ht);ot<Vt.length;ot++)Ht.indexOf(Vt[ot])<0&&Object.prototype.propertyIsEnumerable.call(ht,Vt[ot])&&(_t[Vt[ot]]=ht[Vt[ot]]);return _t};function Rt(ht,Ht){if(ht.title===void 0||ht.title===null)return null;const _t=Object.keys(Ht).join("|");return typeof ht.title=="object"?ht.title:String(ht.title).replace(new RegExp(`:(${_t})`,"g"),(Vt,ot)=>Ht[ot]||Vt)}function De(ht,Ht,_t,Vt){if(_t==null)return null;const{className:ot,onClick:Ue}=Ht,Wt=dt(Ht,["className","onClick"]),Ln=Object.assign(Object.assign({},(0,ut.Z)(Wt,{data:!0,aria:!0})),{onClick:Ue});return Vt!==void 0?Ge.createElement("a",Object.assign({},Ln,{className:Oe()(`${ht}-link`,ot),href:Vt}),_t):Ge.createElement("span",Object.assign({},Ln,{className:Oe()(`${ht}-link`,ot)}),_t)}function ne(ht,Ht){return(Vt,ot,Ue,Wt,Ln)=>{if(Ht)return Ht(Vt,ot,Ue,Wt);const Fn=Rt(Vt,ot);return De(ht,Vt,Fn,Ln)}}var ee=function(ht,Ht){var _t={};for(var Vt in ht)Object.prototype.hasOwnProperty.call(ht,Vt)&&Ht.indexOf(Vt)<0&&(_t[Vt]=ht[Vt]);if(ht!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,Vt=Object.getOwnPropertySymbols(ht);ot<Vt.length;ot++)Ht.indexOf(Vt[ot])<0&&Object.prototype.propertyIsEnumerable.call(ht,Vt[ot])&&(_t[Vt[ot]]=ht[Vt[ot]]);return _t};const ce=ht=>{const{prefixCls:Ht,separator:_t="/",children:Vt,menu:ot,overlay:Ue,dropdownProps:Wt,href:Ln}=ht,Gt=(rn=>{if(ot||Ue){const An=Object.assign({},Wt);if(ot){const ni=ot||{},{items:Sn}=ni,Yn=ee(ni,["items"]);An.menu=Object.assign(Object.assign({},Yn),{items:Sn==null?void 0:Sn.map((It,wn)=>{var{key:Gn,title:ze,label:Ee,path:Pe}=It,Fe=ee(It,["key","title","label","path"]);let Ae=Ee!=null?Ee:ze;return Pe&&(Ae=Ge.createElement("a",{href:`${Ln}${Pe}`},Ae)),Object.assign(Object.assign({},Fe),{key:Gn!=null?Gn:wn,label:Ae})})})}else Ue&&(An.overlay=Ue);return Ge.createElement(Ct.Z,Object.assign({placement:"bottom"},An),Ge.createElement("span",{className:`${Ht}-overlay-link`},rn,Ge.createElement(Tt.Z,null)))}return rn})(Vt);return Gt!=null?Ge.createElement(Ge.Fragment,null,Ge.createElement("li",null,Gt),_t&&Ge.createElement(Lt,null,_t)):null},se=ht=>{const{prefixCls:Ht,children:_t,href:Vt}=ht,ot=ee(ht,["prefixCls","children","href"]),{getPrefixCls:Ue}=Ge.useContext(Ne.E_),Wt=Ue("breadcrumb",Ht);return Ge.createElement(ce,Object.assign({},ot,{prefixCls:Wt}),De(Wt,ot,_t,Vt))};se.__ANT_BREADCRUMB_ITEM=!0;var he=se,ve=pe(17313),be=pe(83116),ke=pe(37613);const Be=ht=>{const{componentCls:Ht,iconCls:_t}=ht;return{[Ht]:Object.assign(Object.assign({},(0,ve.Wf)(ht)),{color:ht.itemColor,fontSize:ht.fontSize,[_t]:{fontSize:ht.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:ht.linkColor,transition:`color ${ht.motionDurationMid}`,padding:`0 ${ht.paddingXXS}px`,borderRadius:ht.borderRadiusSM,height:ht.lineHeight*ht.fontSize,display:"inline-block",marginInline:-ht.marginXXS,"&:hover":{color:ht.linkHoverColor,backgroundColor:ht.colorBgTextHover}},(0,ve.Qy)(ht)),"li:last-child":{color:ht.lastItemColor},[`${Ht}-separator`]:{marginInline:ht.separatorMargin,color:ht.separatorColor},[`${Ht}-link`]:{[`
|
|
|
> ${_t} + span,
|
|
|
> ${_t} + a
|
|
|
`]:{marginInlineStart:ht.marginXXS}},[`${Ht}-overlay-link`]:{borderRadius:ht.borderRadiusSM,height:ht.lineHeight*ht.fontSize,display:"inline-block",padding:`0 ${ht.paddingXXS}px`,marginInline:-ht.marginXXS,[`> ${_t}`]:{marginInlineStart:ht.marginXXS,fontSize:ht.fontSizeIcon},"&:hover":{color:ht.linkHoverColor,backgroundColor:ht.colorBgTextHover,a:{color:ht.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${ht.componentCls}-rtl`]:{direction:"rtl"}})}};var He=(0,be.Z)("Breadcrumb",ht=>{const Ht=(0,ke.TS)(ht,{});return[Be(Ht)]},ht=>({itemColor:ht.colorTextDescription,lastItemColor:ht.colorText,iconFontSize:ht.fontSize,linkColor:ht.colorTextDescription,linkHoverColor:ht.colorText,separatorColor:ht.colorTextDescription,separatorMargin:ht.marginXS})),We=function(ht,Ht){var _t={};for(var Vt in ht)Object.prototype.hasOwnProperty.call(ht,Vt)&&Ht.indexOf(Vt)<0&&(_t[Vt]=ht[Vt]);if(ht!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,Vt=Object.getOwnPropertySymbols(ht);ot<Vt.length;ot++)Ht.indexOf(Vt[ot])<0&&Object.prototype.propertyIsEnumerable.call(ht,Vt[ot])&&(_t[Vt[ot]]=ht[Vt[ot]]);return _t};function rt(ht){const{breadcrumbName:Ht,children:_t}=ht,Vt=We(ht,["breadcrumbName","children"]),ot=Object.assign({title:Ht},Vt);return _t&&(ot.menu={items:_t.map(Ue=>{var{breadcrumbName:Wt}=Ue,Ln=We(Ue,["breadcrumbName"]);return Object.assign(Object.assign({},Ln),{title:Wt})})}),ot}function Qe(ht,Ht){return(0,Ge.useMemo)(()=>ht||(Ht?Ht.map(rt):null),[ht,Ht])}var Pt=function(ht,Ht){var _t={};for(var Vt in ht)Object.prototype.hasOwnProperty.call(ht,Vt)&&Ht.indexOf(Vt)<0&&(_t[Vt]=ht[Vt]);if(ht!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,Vt=Object.getOwnPropertySymbols(ht);ot<Vt.length;ot++)Ht.indexOf(Vt[ot])<0&&Object.prototype.propertyIsEnumerable.call(ht,Vt[ot])&&(_t[Vt[ot]]=ht[Vt[ot]]);return _t};const Ze=(ht,Ht)=>{if(Ht===void 0)return Ht;let _t=(Ht||"").replace(/^\//,"");return Object.keys(ht).forEach(Vt=>{_t=_t.replace(`:${Vt}`,ht[Vt])}),_t},Et=ht=>{const{prefixCls:Ht,separator:_t="/",style:Vt,className:ot,rootClassName:Ue,routes:Wt,items:Ln,children:Fn,itemRender:Gt,params:rn={}}=ht,An=Pt(ht,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:ni,direction:Sn,breadcrumb:Yn}=Ge.useContext(Ne.E_);let It;const wn=ni("breadcrumb",Ht),[Gn,ze]=He(wn),Ee=Qe(Ln,Wt),Pe=ne(wn,Gt);if(Ee&&Ee.length>0){const ye=[],qe=Ln||Wt;It=Ee.map((vt,et)=>{const{path:Ye,key:xt,type:yt,menu:at,overlay:zt,onClick:un,className:fn,separator:Qt,dropdownProps:Kn}=vt,On=Ze(rn,Ye);On!==void 0&&ye.push(On);const jt=xt!=null?xt:et;if(yt==="separator")return Ge.createElement(Lt,{key:jt},Qt);const sn={},jn=et===Ee.length-1;at?sn.menu=at:zt&&(sn.overlay=zt);let{href:dn}=vt;return ye.length&&On!==void 0&&(dn=`#/${ye.join("/")}`),Ge.createElement(ce,Object.assign({key:jt},sn,(0,ut.Z)(vt,{data:!0,aria:!0}),{className:fn,dropdownProps:Kn,href:dn,separator:jn?"":_t,onClick:un,prefixCls:wn}),Pe(vt,rn,qe,ye,dn))})}else if(Fn){const ye=(0,Ke.Z)(Fn).length;It=(0,Ke.Z)(Fn).map((qe,vt)=>{if(!qe)return qe;const et=vt===ye-1;return(0,Xe.Tm)(qe,{separator:et?"":_t,key:vt})})}const Fe=Oe()(wn,Yn==null?void 0:Yn.className,{[`${wn}-rtl`]:Sn==="rtl"},ot,Ue,ze),Ae=Object.assign(Object.assign({},Yn==null?void 0:Yn.style),Vt);return Gn(Ge.createElement("nav",Object.assign({className:Fe,style:Ae},An),Ge.createElement("ol",null,It)))};Et.Item=he,Et.Separator=Lt;var it=Et,Dt=it},19842:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Ri}});var ge=pe(19127),Oe=pe(59301),Ke=pe(33853),ut=pe(58617),Ge=pe(38819),Xe=pe(92310),Ne=pe.n(Xe),Tt=pe(96663),Ct=pe(72071),Ve=pe(6620),Lt=pe(77861),dt=pe(17115),Rt=pe(90782),De=pe(6089),ne=pe(18929),ee=Oe.createContext(null),ce=ee,se=pe(20135),he=pe(90493),ve=pe(44127),be="__rc_cascader_search_mark__",ke=function(di,yi,Li){var Tn=Li.label;return yi.some(function(Un){return String(Un[Tn]).toLowerCase().includes(di.toLowerCase())})},Be=function(di,yi,Li,Tn){return yi.map(function(Un){return Un[Tn.label]}).join(" / ")},He=function(nn,di,yi,Li,Tn,Un){var kt=Tn.filter,$t=kt===void 0?ke:kt,Je=Tn.render,qt=Je===void 0?Be:Je,vn=Tn.limit,Ft=vn===void 0?50:vn,st=Tn.sort;return Oe.useMemo(function(){var on=[];if(!nn)return[];function En(Dn,Jn){var St=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Dn.forEach(function(Nn){if(!(!st&&Ft!==!1&&Ft>0&&on.length>=Ft)){var qn=[].concat((0,ge.Z)(Jn),[Nn]),Si=Nn[yi.children],en=St||Nn.disabled;if((!Si||Si.length===0||Un)&&$t(nn,qn,{label:yi.label})){var Cn;on.push((0,ve.Z)((0,ve.Z)({},Nn),{},(Cn={disabled:en},(0,he.Z)(Cn,yi.label,qt(nn,qn,Li,yi)),(0,he.Z)(Cn,be,qn),(0,he.Z)(Cn,yi.children,void 0),Cn)))}Si&&En(Nn[yi.children],qn,en)}})}return En(di,[]),st&&on.sort(function(Dn,Jn){return st(Dn[be],Jn[be],nn,yi)}),Ft!==!1&&Ft>0?on.slice(0,Ft):on},[nn,di,yi,Li,qt,Un,$t,st,Ft])},We="__RC_CASCADER_SPLIT__",rt="SHOW_PARENT",Qe="SHOW_CHILD";function Pt(nn){return nn.join(We)}function Ze(nn){return nn.map(Pt)}function Et(nn){return nn.split(We)}function it(nn){var di=nn||{},yi=di.label,Li=di.value,Tn=di.children,Un=Li||"value";return{label:yi||"label",value:Un,key:Un,children:Tn||"children"}}function Dt(nn,di){var yi,Li;return(yi=nn.isLeaf)!==null&&yi!==void 0?yi:!((Li=nn[di.children])!==null&&Li!==void 0&&Li.length)}function ht(nn){var di=nn.parentElement;if(di){var yi=nn.offsetTop-di.offsetTop;yi-di.scrollTop<0?di.scrollTo({top:yi}):yi+nn.offsetHeight-di.scrollTop>di.offsetHeight&&di.scrollTo({top:yi+nn.offsetHeight-di.offsetHeight})}}function Ht(nn,di){return nn.map(function(yi){var Li;return(Li=yi[be])===null||Li===void 0?void 0:Li.map(function(Tn){return Tn[di.value]})})}function _t(nn,di,yi){var Li=new Set(nn),Tn=di();return nn.filter(function(Un){var kt=Tn[Un],$t=kt?kt.parent:null,Je=kt?kt.children:null;return kt&&kt.node.disabled?!0:yi===Qe?!(Je&&Je.some(function(qt){return qt.key&&Li.has(qt.key)})):!($t&&!$t.node.disabled&&Li.has($t.key))})}function Vt(nn,di,yi){for(var Li=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,Tn=di,Un=[],kt=function(){var qt,vn,Ft,st=nn[$t],on=(qt=Tn)===null||qt===void 0?void 0:qt.findIndex(function(Dn){var Jn=Dn[yi.value];return Li?String(Jn)===String(st):Jn===st}),En=on!==-1?(vn=Tn)===null||vn===void 0?void 0:vn[on]:null;Un.push({value:(Ft=En==null?void 0:En[yi.value])!==null&&Ft!==void 0?Ft:st,index:on,option:En}),Tn=En==null?void 0:En[yi.children]},$t=0;$t<nn.length;$t+=1)kt();return Un}var ot=function(nn,di,yi,Li,Tn){return Oe.useMemo(function(){var Un=Tn||function(kt){var $t=Li?kt.slice(-1):kt,Je=" / ";return $t.every(function(qt){return["string","number"].includes((0,se.Z)(qt))})?$t.join(Je):$t.reduce(function(qt,vn,Ft){var st=Oe.isValidElement(vn)?Oe.cloneElement(vn,{key:Ft}):vn;return Ft===0?[st]:[].concat((0,ge.Z)(qt),[Je,st])},[])};return nn.map(function(kt){var $t,Je,qt=Vt(kt,di,yi),vn=Un(qt.map(function(st){var on,En=st.option,Dn=st.value;return(on=En==null?void 0:En[yi.label])!==null&&on!==void 0?on:Dn}),qt.map(function(st){var on=st.option;return on})),Ft=Pt(kt);return{label:vn,value:Ft,key:Ft,valueCells:kt,disabled:($t=qt[qt.length-1])===null||$t===void 0||(Je=$t.option)===null||Je===void 0?void 0:Je.disabled}})},[nn,di,yi,Tn,Li])},Ue=pe(71430),Wt=function(nn,di){var yi=Oe.useRef({options:null,info:null}),Li=Oe.useCallback(function(){return yi.current.options!==nn&&(yi.current.options=nn,yi.current.info=(0,Ue.I8)(nn,{fieldNames:di,initWrapper:function(Un){return(0,ve.Z)((0,ve.Z)({},Un),{},{pathKeyEntities:{}})},processEntity:function(Un,kt){var $t=Un.nodes.map(function(Je){return Je[di.value]}).join(We);kt.pathKeyEntities[$t]=Un,Un.key=$t}})),yi.current.info.pathKeyEntities},[di,nn]);return Li},Ln=function(nn,di){return Oe.useCallback(function(yi){var Li=[],Tn=[];return yi.forEach(function(Un){var kt=Vt(Un,nn,di);kt.every(function($t){return $t.option})?Tn.push(Un):Li.push(Un)}),[Tn,Li]},[nn,di])},Fn=pe(48736);function Gt(nn){return Oe.useMemo(function(){if(!nn)return[!1,{}];var di={matchInputWidth:!0,limit:50};return nn&&(0,se.Z)(nn)==="object"&&(di=(0,ve.Z)((0,ve.Z)({},di),nn)),di.limit<=0&&delete di.limit,[!0,di]},[nn])}var rn=Oe.memo(function(nn){var di=nn.children;return di},function(nn,di){return!di.open}),An=rn;function ni(nn){var di,yi=nn.prefixCls,Li=nn.checked,Tn=nn.halfChecked,Un=nn.disabled,kt=nn.onClick,$t=nn.disableCheckbox,Je=Oe.useContext(ce),qt=Je.checkable,vn=typeof qt!="boolean"?qt:null;return Oe.createElement("span",{className:Ne()("".concat(yi),(di={},(0,he.Z)(di,"".concat(yi,"-checked"),Li),(0,he.Z)(di,"".concat(yi,"-indeterminate"),!Li&&Tn),(0,he.Z)(di,"".concat(yi,"-disabled"),Un||$t),di)),onClick:kt},vn)}var Sn="__cascader_fix_label__";function Yn(nn){var di=nn.prefixCls,yi=nn.multiple,Li=nn.options,Tn=nn.activeValue,Un=nn.prevValuePath,kt=nn.onToggleOpen,$t=nn.onSelect,Je=nn.onActive,qt=nn.checkedSet,vn=nn.halfCheckedSet,Ft=nn.loadingKeys,st=nn.isSelectable,on=nn.searchValue,En="".concat(di,"-menu"),Dn="".concat(di,"-menu-item"),Jn=Oe.useContext(ce),St=Jn.fieldNames,Nn=Jn.changeOnSelect,qn=Jn.expandTrigger,Si=Jn.expandIcon,en=Jn.loadingIcon,Cn=Jn.dropdownMenuColumnStyle,At=qn==="hover",yn=Oe.useMemo(function(){return Li.map(function(pn){var mn,Wn=pn.disabled,Hn=pn.disableCheckbox,Qn=pn[be],ii=(mn=pn[Sn])!==null&&mn!==void 0?mn:pn[St.label],ji=pn[St.value],cn=Dt(pn,St),Yi=Qn?Qn.map(function(Bi){return Bi[St.value]}):[].concat((0,ge.Z)(Un),[ji]),$i=Pt(Yi),Wi=Ft.includes($i),ln=qt.has($i),oi=vn.has($i);return{disabled:Wn,label:ii,value:ji,isLeaf:cn,isLoading:Wi,checked:ln,halfChecked:oi,option:pn,disableCheckbox:Hn,fullPath:Yi,fullPathKey:$i}})},[Li,qt,St,vn,Ft,Un]);return Oe.createElement("ul",{className:En,role:"menu"},yn.map(function(pn){var mn,Wn=pn.disabled,Hn=pn.label,Qn=pn.value,ii=pn.isLeaf,ji=pn.isLoading,cn=pn.checked,Yi=pn.halfChecked,$i=pn.option,Wi=pn.fullPath,ln=pn.fullPathKey,oi=pn.disableCheckbox,Bi=function(){if(!(Wn||on)){var gr=(0,ge.Z)(Wi);At&&ii&&gr.pop(),Je(gr)}},Gi=function(){st($i)&&$t(Wi,ii)},Ti;return typeof $i.title=="string"?Ti=$i.title:typeof Hn=="string"&&(Ti=Hn),Oe.createElement("li",{key:ln,className:Ne()(Dn,(mn={},(0,he.Z)(mn,"".concat(Dn,"-expand"),!ii),(0,he.Z)(mn,"".concat(Dn,"-active"),Tn===Qn||Tn===ln),(0,he.Z)(mn,"".concat(Dn,"-disabled"),Wn),(0,he.Z)(mn,"".concat(Dn,"-loading"),ji),mn)),style:Cn,role:"menuitemcheckbox",title:Ti,"aria-checked":cn,"data-path-key":ln,onClick:function(){Bi(),!oi&&(!yi||ii)&&Gi()},onDoubleClick:function(){Nn&&kt(!1)},onMouseEnter:function(){At&&Bi()},onMouseDown:function(gr){gr.preventDefault()}},yi&&Oe.createElement(ni,{prefixCls:"".concat(di,"-checkbox"),checked:cn,halfChecked:Yi,disabled:Wn||oi,disableCheckbox:oi,onClick:function(gr){oi||(gr.stopPropagation(),Gi())}}),Oe.createElement("div",{className:"".concat(Dn,"-content")},Hn),!ji&&Si&&!ii&&Oe.createElement("div",{className:"".concat(Dn,"-expand-icon")},Si),ji&&en&&Oe.createElement("div",{className:"".concat(Dn,"-loading-icon")},en))}))}var It=function(){var nn=(0,Lt.lk)(),di=nn.multiple,yi=nn.open,Li=Oe.useContext(ce),Tn=Li.values,Un=Oe.useState([]),kt=(0,Ct.Z)(Un,2),$t=kt[0],Je=kt[1];return Oe.useEffect(function(){if(yi&&!di){var qt=Tn[0];Je(qt||[])}},[yi]),[$t,Je]},wn=pe(10228),Gn=function(nn,di,yi,Li,Tn,Un){var kt=(0,Lt.lk)(),$t=kt.direction,Je=kt.searchValue,qt=kt.toggleOpen,vn=kt.open,Ft=$t==="rtl",st=Oe.useMemo(function(){for(var Cn=-1,At=di,yn=[],pn=[],mn=Li.length,Wn=Ht(di,yi),Hn=function($i){var Wi=At.findIndex(function(ln,oi){return(Wn[oi]?Pt(Wn[oi]):ln[yi.value])===Li[$i]});if(Wi===-1)return"break";Cn=Wi,yn.push(Cn),pn.push(Li[$i]),At=At[Cn][yi.children]},Qn=0;Qn<mn&&At;Qn+=1){var ii=Hn(Qn);if(ii==="break")break}for(var ji=di,cn=0;cn<yn.length-1;cn+=1)ji=ji[yn[cn]][yi.children];return[pn,Cn,ji,Wn]},[Li,yi,di]),on=(0,Ct.Z)(st,4),En=on[0],Dn=on[1],Jn=on[2],St=on[3],Nn=function(At){Tn(At)},qn=function(At){var yn=Jn.length,pn=Dn;pn===-1&&At<0&&(pn=yn);for(var mn=0;mn<yn;mn+=1){pn=(pn+At+yn)%yn;var Wn=Jn[pn];if(Wn&&!Wn.disabled){var Hn=En.slice(0,-1).concat(St[pn]?Pt(St[pn]):Wn[yi.value]);Nn(Hn);return}}},Si=function(){if(En.length>1){var At=En.slice(0,-1);Nn(At)}else qt(!1)},en=function(){var At,yn=((At=Jn[Dn])===null||At===void 0?void 0:At[yi.children])||[],pn=yn.find(function(Wn){return!Wn.disabled});if(pn){var mn=[].concat((0,ge.Z)(En),[pn[yi.value]]);Nn(mn)}};Oe.useImperativeHandle(nn,function(){return{onKeyDown:function(At){var yn=At.which;switch(yn){case wn.Z.UP:case wn.Z.DOWN:{var pn=0;yn===wn.Z.UP?pn=-1:yn===wn.Z.DOWN&&(pn=1),pn!==0&&qn(pn);break}case wn.Z.LEFT:{if(Je)break;Ft?en():Si();break}case wn.Z.RIGHT:{if(Je)break;Ft?Si():en();break}case wn.Z.BACKSPACE:{Je||Si();break}case wn.Z.ENTER:{if(En.length){var mn=Jn[Dn],Wn=(mn==null?void 0:mn[be])||[];Wn.length?Un(Wn.map(function(Hn){return Hn[yi.value]}),Wn[Wn.length-1]):Un(En,Jn[Dn])}break}case wn.Z.ESC:qt(!1),vn&&At.stopPropagation()}},onKeyUp:function(){}}})},ze=Oe.forwardRef(function(nn,di){var yi,Li,Tn,Un,kt=(0,Lt.lk)(),$t=kt.prefixCls,Je=kt.multiple,qt=kt.searchValue,vn=kt.toggleOpen,Ft=kt.notFoundContent,st=kt.direction,on=kt.open,En=Oe.useRef(),Dn=st==="rtl",Jn=Oe.useContext(ce),St=Jn.options,Nn=Jn.values,qn=Jn.halfValues,Si=Jn.fieldNames,en=Jn.changeOnSelect,Cn=Jn.onSelect,At=Jn.searchOptions,yn=Jn.dropdownPrefixCls,pn=Jn.loadData,mn=Jn.expandTrigger,Wn=yn||$t,Hn=Oe.useState([]),Qn=(0,Ct.Z)(Hn,2),ii=Qn[0],ji=Qn[1],cn=function(br){if(!(!pn||qt)){var mo=Vt(br,St,Si),Jr=mo.map(function(qi){var Rr=qi.option;return Rr}),ur=Jr[Jr.length-1];if(ur&&!Dt(ur,Si)){var er=Pt(br);ji(function(qi){return[].concat((0,ge.Z)(qi),[er])}),pn(Jr)}}};Oe.useEffect(function(){ii.length&&ii.forEach(function(no){var br=Et(no),mo=Vt(br,St,Si,!0).map(function(ur){var er=ur.option;return er}),Jr=mo[mo.length-1];(!Jr||Jr[Si.children]||Dt(Jr,Si))&&ji(function(ur){return ur.filter(function(er){return er!==no})})})},[St,ii,Si]);var Yi=Oe.useMemo(function(){return new Set(Ze(Nn))},[Nn]),$i=Oe.useMemo(function(){return new Set(Ze(qn))},[qn]),Wi=It(),ln=(0,Ct.Z)(Wi,2),oi=ln[0],Bi=ln[1],Gi=function(br){Bi(br),cn(br)},Ti=function(br){var mo=br.disabled,Jr=Dt(br,Si);return!mo&&(Jr||en||Je)},Qi=function(br,mo){var Jr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Cn(br),!Je&&(mo||en&&(mn==="hover"||Jr))&&vn(!1)},gr=Oe.useMemo(function(){return qt?At:St},[qt,At,St]),hr=Oe.useMemo(function(){for(var no=[{options:gr}],br=gr,mo=Ht(br,Si),Jr=function(){var Rr=oi[ur],Ii=br.find(function(Qr,lo){return(mo[lo]?Pt(mo[lo]):Qr[Si.value])===Rr}),tt=Ii==null?void 0:Ii[Si.children];if(!(tt!=null&&tt.length))return"break";br=tt,no.push({options:tt})},ur=0;ur<oi.length;ur+=1){var er=Jr();if(er==="break")break}return no},[gr,oi,Si]),Ki=function(br,mo){Ti(mo)&&Qi(br,Dt(mo,Si),!0)};Gn(di,gr,Si,oi,Gi,Ki),Oe.useEffect(function(){for(var no=0;no<oi.length;no+=1){var br,mo=oi.slice(0,no+1),Jr=Pt(mo),ur=(br=En.current)===null||br===void 0?void 0:br.querySelector('li[data-path-key="'.concat(Jr.replace(/\\{0,2}"/g,'\\"'),'"]'));ur&&ht(ur)}},[oi]);var Sr=!((yi=hr[0])!==null&&yi!==void 0&&(Li=yi.options)!==null&&Li!==void 0&&Li.length),kn=[(Tn={},(0,he.Z)(Tn,Si.value,"__EMPTY__"),(0,he.Z)(Tn,Sn,Ft),(0,he.Z)(Tn,"disabled",!0),Tn)],Br=(0,ve.Z)((0,ve.Z)({},nn),{},{multiple:!Sr&&Je,onSelect:Qi,onActive:Gi,onToggleOpen:vn,checkedSet:Yi,halfCheckedSet:$i,loadingKeys:ii,isSelectable:Ti}),_n=Sr?[{options:kn}]:hr,Or=_n.map(function(no,br){var mo=oi.slice(0,br),Jr=oi[br];return Oe.createElement(Yn,(0,Tt.Z)({key:br},Br,{searchValue:qt,prefixCls:Wn,options:no.options,prevValuePath:mo,activeValue:Jr}))});return Oe.createElement(An,{open:on},Oe.createElement("div",{className:Ne()("".concat(Wn,"-menus"),(Un={},(0,he.Z)(Un,"".concat(Wn,"-menu-empty"),Sr),(0,he.Z)(Un,"".concat(Wn,"-rtl"),Dn),Un)),ref:En},Or))}),Ee=ze;function Pe(nn){var di=nn.onPopupVisibleChange,yi=nn.popupVisible,Li=nn.popupClassName,Tn=nn.popupPlacement;warning(!di,"`onPopupVisibleChange` is deprecated. Please use `onDropdownVisibleChange` instead."),warning(yi===void 0,"`popupVisible` is deprecated. Please use `open` instead."),warning(Li===void 0,"`popupClassName` is deprecated. Please use `dropdownClassName` instead."),warning(Tn===void 0,"`popupPlacement` is deprecated. Please use `placement` instead.")}function Fe(nn,di){if(nn){var yi=function Li(Tn){for(var Un=0;Un<Tn.length;Un++){var kt=Tn[Un];if(kt[di==null?void 0:di.value]===null)return warning(!1,"`value` in Cascader options should not be `null`."),!0;if(Array.isArray(kt[di==null?void 0:di.children])&&Li(kt[di==null?void 0:di.children]))return!0}};yi(nn)}}var Ae=null,ye=["id","prefixCls","fieldNames","defaultValue","value","changeOnSelect","onChange","displayRender","checkable","autoClearSearchValue","searchValue","onSearch","showSearch","expandTrigger","options","dropdownPrefixCls","loadData","popupVisible","open","popupClassName","dropdownClassName","dropdownMenuColumnStyle","popupPlacement","placement","onDropdownVisibleChange","onPopupVisibleChange","expandIcon","loadingIcon","children","dropdownMatchSelectWidth","showCheckedStrategy"];function qe(nn){return Array.isArray(nn)&&Array.isArray(nn[0])}function vt(nn){return nn?qe(nn)?nn:(nn.length===0?[]:[nn]).map(function(di){return Array.isArray(di)?di:[di]}):[]}var et=Oe.forwardRef(function(nn,di){var yi=nn.id,Li=nn.prefixCls,Tn=Li===void 0?"rc-cascader":Li,Un=nn.fieldNames,kt=nn.defaultValue,$t=nn.value,Je=nn.changeOnSelect,qt=nn.onChange,vn=nn.displayRender,Ft=nn.checkable,st=nn.autoClearSearchValue,on=st===void 0?!0:st,En=nn.searchValue,Dn=nn.onSearch,Jn=nn.showSearch,St=nn.expandTrigger,Nn=nn.options,qn=nn.dropdownPrefixCls,Si=nn.loadData,en=nn.popupVisible,Cn=nn.open,At=nn.popupClassName,yn=nn.dropdownClassName,pn=nn.dropdownMenuColumnStyle,mn=nn.popupPlacement,Wn=nn.placement,Hn=nn.onDropdownVisibleChange,Qn=nn.onPopupVisibleChange,ii=nn.expandIcon,ji=ii===void 0?">":ii,cn=nn.loadingIcon,Yi=nn.children,$i=nn.dropdownMatchSelectWidth,Wi=$i===void 0?!1:$i,ln=nn.showCheckedStrategy,oi=ln===void 0?rt:ln,Bi=(0,Ve.Z)(nn,ye),Gi=(0,dt.ZP)(yi),Ti=!!Ft,Qi=(0,ne.Z)(kt,{value:$t,postState:vt}),gr=(0,Ct.Z)(Qi,2),hr=gr[0],Ki=gr[1],Sr=Oe.useMemo(function(){return it(Un)},[JSON.stringify(Un)]),kn=Oe.useMemo(function(){return Nn||[]},[Nn]),Br=Wt(kn,Sr),_n=Oe.useCallback(function(Ho){var Ao=Br();return Ho.map(function(_o){var ta=Ao[_o].nodes;return ta.map(function(Ea){return Ea[Sr.value]})})},[Br,Sr]),Or=(0,ne.Z)("",{value:En,postState:function(Ao){return Ao||""}}),no=(0,Ct.Z)(Or,2),br=no[0],mo=no[1],Jr=function(Ao,_o){mo(Ao),_o.source!=="blur"&&Dn&&Dn(Ao)},ur=Gt(Jn),er=(0,Ct.Z)(ur,2),qi=er[0],Rr=er[1],Ii=He(br,kn,Sr,qn||Tn,Rr,Je),tt=Ln(kn,Sr),Qr=Oe.useMemo(function(){var Ho=tt(hr),Ao=(0,Ct.Z)(Ho,2),_o=Ao[0],ta=Ao[1];if(!Ti||!hr.length)return[_o,[],ta];var Ea=Ze(_o),Mt=Br(),Pi=(0,Rt.S)(Ea,!0,Mt),Ut=Pi.checkedKeys,Ui=Pi.halfCheckedKeys;return[_n(Ut),_n(Ui),ta]},[Ti,hr,Br,_n,tt]),lo=(0,Ct.Z)(Qr,3),jr=lo[0],vo=lo[1],po=lo[2],Lr=Oe.useMemo(function(){var Ho=Ze(jr),Ao=_t(Ho,Br,oi);return[].concat((0,ge.Z)(po),(0,ge.Z)(_n(Ao)))},[jr,Br,_n,po,oi]),Fr=ot(Lr,kn,Sr,Ti,vn),uo=(0,De.Z)(function(Ho){if(Ki(Ho),qt){var Ao=vt(Ho),_o=Ao.map(function(Mt){return Vt(Mt,kn,Sr).map(function(Pi){return Pi.option})}),ta=Ti?Ao:Ao[0],Ea=Ti?_o:_o[0];qt(ta,Ea)}}),qr=(0,De.Z)(function(Ho){if((!Ti||on)&&mo(""),!Ti)uo(Ho);else{var Ao=Pt(Ho),_o=Ze(jr),ta=Ze(vo),Ea=_o.includes(Ao),Mt=po.some(function(rr){return Pt(rr)===Ao}),Pi=jr,Ut=po;if(Mt&&!Ea)Ut=po.filter(function(rr){return Pt(rr)!==Ao});else{var Ui=Ea?_o.filter(function(rr){return rr!==Ao}):[].concat((0,ge.Z)(_o),[Ao]),wi=Br(),yr;if(Ea){var Zi=(0,Rt.S)(Ui,{checked:!1,halfCheckedKeys:ta},wi);yr=Zi.checkedKeys}else{var Ci=(0,Rt.S)(Ui,!0,wi);yr=Ci.checkedKeys}var nr=_t(yr,Br,oi);Pi=_n(nr)}uo([].concat((0,ge.Z)(Ut),(0,ge.Z)(Pi)))}}),zo=function(Ao,_o){if(_o.type==="clear"){uo([]);return}var ta=_o.values[0],Ea=ta.valueCells;qr(Ea)},Ro=Cn!==void 0?Cn:en,Mr=yn||At,Nr=Wn||mn,fi=function(Ao){Hn==null||Hn(Ao),Qn==null||Qn(Ao)},Tr=Oe.useMemo(function(){return{options:kn,fieldNames:Sr,values:jr,halfValues:vo,changeOnSelect:Je,onSelect:qr,checkable:Ft,searchOptions:Ii,dropdownPrefixCls:qn,loadData:Si,expandTrigger:St,expandIcon:ji,loadingIcon:cn,dropdownMenuColumnStyle:pn}},[kn,Sr,jr,vo,Je,qr,Ft,Ii,qn,Si,St,ji,cn,pn]),Bo=!(br?Ii:kn).length,aa=br&&Rr.matchInputWidth||Bo?{}:{minWidth:"auto"};return Oe.createElement(ce.Provider,{value:Tr},Oe.createElement(Lt.Ac,(0,Tt.Z)({},Bi,{ref:di,id:Gi,prefixCls:Tn,autoClearSearchValue:on,dropdownMatchSelectWidth:Wi,dropdownStyle:aa,displayValues:Fr,onDisplayValuesChange:zo,mode:Ti?"multiple":void 0,searchValue:br,onSearch:Jr,showSearch:qi,OptionList:Ee,emptyOptions:Bo,open:Ro,dropdownClassName:Mr,placement:Nr,onDropdownVisibleChange:fi,getRawInputElement:function(){return Yi}})))});et.SHOW_PARENT=rt,et.SHOW_CHILD=Qe;var Ye=et,xt=Ye,yt=pe(2738),at=pe(62892),zt=pe(53487),un=pe(19080),fn=pe(36355),Qt=pe(93891),Kn=pe(1684),On=pe(19716),jt=pe(32441),sn=pe(14154),jn=pe(58582),dn=pe(84443),Pn=pe(66339),ui=pe(33234),pi=pe(98447),gi=pe(17313),bi=pe(74207),Xi=pe(83116);const ar=nn=>{const{prefixCls:di,componentCls:yi,antCls:Li}=nn,Tn=`${yi}-menu-item`,Un=`
|
|
|
&${Tn}-expand ${Tn}-expand-icon,
|
|
|
${Tn}-loading-icon
|
|
|
`;return[{[yi]:{width:nn.controlWidth}},{[`${yi}-dropdown`]:[(0,pi.C2)(`${di}-checkbox`,nn),{[`&${Li}-select-dropdown`]:{padding:0}},{[yi]:{"&-checkbox":{top:0,marginInlineEnd:nn.paddingXS},"&-menus":{display:"flex",flexWrap:"nowrap",alignItems:"flex-start",[`&${yi}-menu-empty`]:{[`${yi}-menu`]:{width:"100%",height:"auto",[Tn]:{color:nn.colorTextDisabled}}}},"&-menu":{flexGrow:1,minWidth:nn.controlItemWidth,height:nn.dropdownHeight,margin:0,padding:nn.menuPadding,overflow:"auto",verticalAlign:"top",listStyle:"none","-ms-overflow-style":"-ms-autohiding-scrollbar","&:not(:last-child)":{borderInlineEnd:`${nn.lineWidth}px ${nn.lineType} ${nn.colorSplit}`},"&-item":Object.assign(Object.assign({},gi.vS),{display:"flex",flexWrap:"nowrap",alignItems:"center",padding:nn.optionPadding,lineHeight:nn.lineHeight,cursor:"pointer",transition:`all ${nn.motionDurationMid}`,borderRadius:nn.borderRadiusSM,"&:hover":{background:nn.controlItemBgHover},"&-disabled":{color:nn.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"},[Un]:{color:nn.colorTextDisabled}},[`&-active:not(${Tn}-disabled)`]:{"&, &:hover":{fontWeight:nn.optionSelectedFontWeight,backgroundColor:nn.optionSelectedBg}},"&-content":{flex:"auto"},[Un]:{marginInlineStart:nn.paddingXXS,color:nn.colorTextDescription,fontSize:nn.fontSizeIcon},"&-keyword":{color:nn.colorHighlight}})}}}]},{[`${yi}-dropdown-rtl`]:{direction:"rtl"}},(0,bi.c)(nn)]};var Ji=(0,Xi.Z)("Cascader",nn=>[ar(nn)],nn=>{const di=Math.round((nn.controlHeight-nn.fontSize*nn.lineHeight)/2);return{controlWidth:184,controlItemWidth:111,dropdownHeight:180,optionSelectedBg:nn.controlItemBgActive,optionSelectedFontWeight:nn.fontWeightStrong,optionPadding:`${di}px ${nn.paddingSM}px`,menuPadding:nn.paddingXXS}}),wr=function(nn,di){var yi={};for(var Li in nn)Object.prototype.hasOwnProperty.call(nn,Li)&&di.indexOf(Li)<0&&(yi[Li]=nn[Li]);if(nn!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Tn=0,Li=Object.getOwnPropertySymbols(nn);Tn<Li.length;Tn++)di.indexOf(Li[Tn])<0&&Object.prototype.propertyIsEnumerable.call(nn,Li[Tn])&&(yi[Li[Tn]]=nn[Li[Tn]]);return yi};const{SHOW_CHILD:mr,SHOW_PARENT:Hi}=xt;function Er(nn,di,yi){const Li=nn.toLowerCase().split(di).reduce((kt,$t,Je)=>Je===0?[$t]:[].concat((0,ge.Z)(kt),[di,$t]),[]),Tn=[];let Un=0;return Li.forEach((kt,$t)=>{const Je=Un+kt.length;let qt=nn.slice(Un,Je);Un=Je,$t%2===1&&(qt=Oe.createElement("span",{className:`${yi}-menu-item-keyword`,key:`separator-${$t}`},qt)),Tn.push(qt)}),Tn}const $n=(nn,di,yi,Li)=>{const Tn=[],Un=nn.toLowerCase();return di.forEach((kt,$t)=>{$t!==0&&Tn.push(" / ");let Je=kt[Li.label];const qt=typeof Je;(qt==="string"||qt==="number")&&(Je=Er(String(Je),Un,yi)),Tn.push(Je)}),Tn},Le=Oe.forwardRef((nn,di)=>{const{prefixCls:yi,size:Li,disabled:Tn,className:Un,rootClassName:kt,multiple:$t,bordered:Je=!0,transitionName:qt,choiceTransitionName:vn="",popupClassName:Ft,dropdownClassName:st,expandIcon:on,placement:En,showSearch:Dn,allowClear:Jn=!0,notFoundContent:St,direction:Nn,getPopupContainer:qn,status:Si,showArrow:en,builtinPlacements:Cn,style:At}=nn,yn=wr(nn,["prefixCls","size","disabled","className","rootClassName","multiple","bordered","transitionName","choiceTransitionName","popupClassName","dropdownClassName","expandIcon","placement","showSearch","allowClear","notFoundContent","direction","getPopupContainer","status","showArrow","builtinPlacements","style"]),pn=(0,yt.Z)(yn,["suffixIcon"]),{getPopupContainer:mn,getPrefixCls:Wn,renderEmpty:Hn,direction:Qn,popupOverflow:ii,cascader:ji}=Oe.useContext(fn.E_),cn=Nn||Qn,Yi=cn==="rtl",{status:$i,hasFeedback:Wi,isFormItemInput:ln,feedbackIcon:oi}=Oe.useContext(jt.aM),Bi=(0,un.F)($i,Si),Gi=St||(Hn==null?void 0:Hn("Cascader"))||Oe.createElement(Qt.Z,{componentName:"Cascader"}),Ti=Wn(),Qi=Wn("select",yi),gr=Wn("cascader",yi),[hr,Ki]=(0,sn.Z)(Qi),[Sr]=Ji(gr),{compactSize:kn,compactItemClassnames:Br}=(0,ui.ri)(Qi,Nn),_n=Ne()(Ft||st,`${gr}-dropdown`,{[`${gr}-dropdown-rtl`]:cn==="rtl"},kt,Ki),Or=Oe.useMemo(()=>{if(!Dn)return Dn;let po={render:$n};return typeof Dn=="object"&&(po=Object.assign(Object.assign({},po),Dn)),po},[Dn]),no=(0,On.Z)(po=>{var Lr;return(Lr=Li!=null?Li:kn)!==null&&Lr!==void 0?Lr:po}),br=Oe.useContext(Kn.Z),mo=Tn!=null?Tn:br;let Jr=on;on||(Jr=Yi?Oe.createElement(Ke.Z,null):Oe.createElement(Ge.Z,null));const ur=Oe.createElement("span",{className:`${Qi}-menu-item-loading-icon`},Oe.createElement(ut.Z,{spin:!0})),er=Oe.useMemo(()=>$t?Oe.createElement("span",{className:`${gr}-checkbox-inner`}):!1,[$t]),qi=(0,dn.Z)(nn.suffixIcon,en),{suffixIcon:Rr,removeIcon:Ii,clearIcon:tt}=(0,Pn.Z)(Object.assign(Object.assign({},nn),{hasFeedback:Wi,feedbackIcon:oi,showSuffixIcon:qi,multiple:$t,prefixCls:Qi,componentName:"Cascader"})),Qr=Oe.useMemo(()=>En!==void 0?En:Yi?"bottomRight":"bottomLeft",[En,Yi]),lo=(0,jn.Z)(Cn,ii),jr=Jn===!0?{clearIcon:tt}:Jn,vo=Oe.createElement(xt,Object.assign({prefixCls:Qi,className:Ne()(!yi&&gr,{[`${Qi}-lg`]:no==="large",[`${Qi}-sm`]:no==="small",[`${Qi}-rtl`]:Yi,[`${Qi}-borderless`]:!Je,[`${Qi}-in-form-item`]:ln},(0,un.Z)(Qi,Bi,Wi),Br,ji==null?void 0:ji.className,Un,kt,Ki),disabled:mo,style:Object.assign(Object.assign({},ji==null?void 0:ji.style),At)},pn,{builtinPlacements:lo,direction:cn,placement:Qr,notFoundContent:Gi,allowClear:jr,showSearch:Or,expandIcon:Jr,suffixIcon:Rr,removeIcon:Ii,loadingIcon:ur,checkable:er,dropdownClassName:_n,dropdownPrefixCls:yi||gr,choiceTransitionName:(0,at.m)(Ti,"",vn),transitionName:(0,at.m)(Ti,"slide-up",qt),getPopupContainer:qn||mn,ref:di}));return Sr(hr(vo))}),Ei=(0,zt.Z)(Le);Le.SHOW_PARENT=Hi,Le.SHOW_CHILD=mr,Le._InternalPanelDoNotUseOrYouWillBeFired=Ei;var Ri=Le},24905:function(Vn,xn,pe){"use strict";pe.d(xn,{default:function(){return He}});var ge=pe(92310),Oe=pe.n(ge),Ke=pe(5630),ut=pe(59301),Ge=pe(36355),Xe=pe(1684),Ne=pe(32441),Ct=ut.createContext(null),Ve=pe(98447),Lt=pe(14088),dt=pe(4572),Rt=function(We,rt){var Qe={};for(var Pt in We)Object.prototype.hasOwnProperty.call(We,Pt)&&rt.indexOf(Pt)<0&&(Qe[Pt]=We[Pt]);if(We!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,Pt=Object.getOwnPropertySymbols(We);Ze<Pt.length;Ze++)rt.indexOf(Pt[Ze])<0&&Object.prototype.propertyIsEnumerable.call(We,Pt[Ze])&&(Qe[Pt[Ze]]=We[Pt[Ze]]);return Qe};const De=(We,rt)=>{var Qe;const{prefixCls:Pt,className:Ze,rootClassName:Et,children:it,indeterminate:Dt=!1,style:ht,onMouseEnter:Ht,onMouseLeave:_t,skipGroup:Vt=!1,disabled:ot}=We,Ue=Rt(We,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:Wt,direction:Ln,checkbox:Fn}=ut.useContext(Ge.E_),Gt=ut.useContext(Ct),{isFormItemInput:rn}=ut.useContext(Ne.aM),An=ut.useContext(Xe.Z),ni=(Qe=(Gt==null?void 0:Gt.disabled)||ot)!==null&&Qe!==void 0?Qe:An,Sn=ut.useRef(Ue.value);ut.useEffect(()=>{Gt==null||Gt.registerValue(Ue.value)},[]),ut.useEffect(()=>{if(!Vt)return Ue.value!==Sn.current&&(Gt==null||Gt.cancelValue(Sn.current),Gt==null||Gt.registerValue(Ue.value),Sn.current=Ue.value),()=>Gt==null?void 0:Gt.cancelValue(Ue.value)},[Ue.value]);const Yn=Wt("checkbox",Pt),[It,wn]=(0,Ve.ZP)(Yn),Gn=Object.assign({},Ue);Gt&&!Vt&&(Gn.onChange=function(){Ue.onChange&&Ue.onChange.apply(Ue,arguments),Gt.toggleOption&&Gt.toggleOption({label:it,value:Ue.value})},Gn.name=Gt.name,Gn.checked=Gt.value.includes(Ue.value));const ze=Oe()(`${Yn}-wrapper`,{[`${Yn}-rtl`]:Ln==="rtl",[`${Yn}-wrapper-checked`]:Gn.checked,[`${Yn}-wrapper-disabled`]:ni,[`${Yn}-wrapper-in-form-item`]:rn},Fn==null?void 0:Fn.className,Ze,Et,wn),Ee=Oe()({[`${Yn}-indeterminate`]:Dt},dt.A,wn),Pe=Dt?"mixed":void 0;return It(ut.createElement(Lt.Z,{component:"Checkbox",disabled:ni},ut.createElement("label",{className:ze,style:Object.assign(Object.assign({},Fn==null?void 0:Fn.style),ht),onMouseEnter:Ht,onMouseLeave:_t},ut.createElement(Ke.Z,Object.assign({"aria-checked":Pe},Gn,{prefixCls:Yn,className:Ee,disabled:ni,ref:rt})),it!==void 0&&ut.createElement("span",null,it))))};var ee=ut.forwardRef(De),ce=pe(19127),se=pe(2738),he=function(We,rt){var Qe={};for(var Pt in We)Object.prototype.hasOwnProperty.call(We,Pt)&&rt.indexOf(Pt)<0&&(Qe[Pt]=We[Pt]);if(We!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,Pt=Object.getOwnPropertySymbols(We);Ze<Pt.length;Ze++)rt.indexOf(Pt[Ze])<0&&Object.prototype.propertyIsEnumerable.call(We,Pt[Ze])&&(Qe[Pt[Ze]]=We[Pt[Ze]]);return Qe};const ve=(We,rt)=>{const{defaultValue:Qe,children:Pt,options:Ze=[],prefixCls:Et,className:it,rootClassName:Dt,style:ht,onChange:Ht}=We,_t=he(We,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:Vt,direction:ot}=ut.useContext(Ge.E_),[Ue,Wt]=ut.useState(_t.value||Qe||[]),[Ln,Fn]=ut.useState([]);ut.useEffect(()=>{"value"in _t&&Wt(_t.value||[])},[_t.value]);const Gt=ut.useMemo(()=>Ze.map(Fe=>typeof Fe=="string"||typeof Fe=="number"?{label:Fe,value:Fe}:Fe),[Ze]),rn=Fe=>{Fn(Ae=>Ae.filter(ye=>ye!==Fe))},An=Fe=>{Fn(Ae=>[].concat((0,ce.Z)(Ae),[Fe]))},ni=Fe=>{const Ae=Ue.indexOf(Fe.value),ye=(0,ce.Z)(Ue);Ae===-1?ye.push(Fe.value):ye.splice(Ae,1),"value"in _t||Wt(ye),Ht==null||Ht(ye.filter(qe=>Ln.includes(qe)).sort((qe,vt)=>{const et=Gt.findIndex(xt=>xt.value===qe),Ye=Gt.findIndex(xt=>xt.value===vt);return et-Ye}))},Sn=Vt("checkbox",Et),Yn=`${Sn}-group`,[It,wn]=(0,Ve.ZP)(Sn),Gn=(0,se.Z)(_t,["value","disabled"]),ze=Ze.length?Gt.map(Fe=>ut.createElement(ee,{prefixCls:Sn,key:Fe.value.toString(),disabled:"disabled"in Fe?Fe.disabled:_t.disabled,value:Fe.value,checked:Ue.includes(Fe.value),onChange:Fe.onChange,className:`${Yn}-item`,style:Fe.style,title:Fe.title},Fe.label)):Pt,Ee={toggleOption:ni,value:Ue,disabled:_t.disabled,name:_t.name,registerValue:An,cancelValue:rn},Pe=Oe()(Yn,{[`${Yn}-rtl`]:ot==="rtl"},it,Dt,wn);return It(ut.createElement("div",Object.assign({className:Pe,style:ht},Gn,{ref:rt}),ut.createElement(Ct.Provider,{value:Ee},ze)))},be=ut.forwardRef(ve);var ke=ut.memo(be);const Be=ee;Be.Group=ke,Be.__ANT_CHECKBOX=!0;var He=Be},98447:function(Vn,xn,pe){"use strict";pe.d(xn,{C2:function(){return Ge}});var ge=pe(17313),Oe=pe(37613),Ke=pe(83116);const ut=Xe=>{const{checkboxCls:Ne}=Xe,Tt=`${Ne}-wrapper`;return[{[`${Ne}-group`]:Object.assign(Object.assign({},(0,ge.Wf)(Xe)),{display:"inline-flex",flexWrap:"wrap",columnGap:Xe.marginXS,[`> ${Xe.antCls}-row`]:{flex:1}}),[Tt]:Object.assign(Object.assign({},(0,ge.Wf)(Xe)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${Tt}`]:{marginInlineStart:0},[`&${Tt}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[Ne]:Object.assign(Object.assign({},(0,ge.Wf)(Xe)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:Xe.borderRadiusSM,alignSelf:"center",[`${Ne}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${Ne}-inner`]:Object.assign({},(0,ge.oN)(Xe))},[`${Ne}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:Xe.checkboxSize,height:Xe.checkboxSize,direction:"ltr",backgroundColor:Xe.colorBgContainer,border:`${Xe.lineWidth}px ${Xe.lineType} ${Xe.colorBorder}`,borderRadius:Xe.borderRadiusSM,borderCollapse:"separate",transition:`all ${Xe.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:Xe.checkboxSize/14*5,height:Xe.checkboxSize/14*8,border:`${Xe.lineWidthBold}px solid ${Xe.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${Xe.motionDurationFast} ${Xe.motionEaseInBack}, opacity ${Xe.motionDurationFast}`}},"& + span":{paddingInlineStart:Xe.paddingXS,paddingInlineEnd:Xe.paddingXS}})},{[`
|
|
|
${Tt}:not(${Tt}-disabled),
|
|
|
${Ne}:not(${Ne}-disabled)
|
|
|
`]:{[`&:hover ${Ne}-inner`]:{borderColor:Xe.colorPrimary}},[`${Tt}:not(${Tt}-disabled)`]:{[`&:hover ${Ne}-checked:not(${Ne}-disabled) ${Ne}-inner`]:{backgroundColor:Xe.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${Ne}-checked:not(${Ne}-disabled):after`]:{borderColor:Xe.colorPrimaryHover}}},{[`${Ne}-checked`]:{[`${Ne}-inner`]:{backgroundColor:Xe.colorPrimary,borderColor:Xe.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${Xe.motionDurationMid} ${Xe.motionEaseOutBack} ${Xe.motionDurationFast}`}}},[`
|
|
|
${Tt}-checked:not(${Tt}-disabled),
|
|
|
${Ne}-checked:not(${Ne}-disabled)
|
|
|
`]:{[`&:hover ${Ne}-inner`]:{backgroundColor:Xe.colorPrimaryHover,borderColor:"transparent"}}},{[Ne]:{"&-indeterminate":{[`${Ne}-inner`]:{backgroundColor:Xe.colorBgContainer,borderColor:Xe.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:Xe.fontSizeLG/2,height:Xe.fontSizeLG/2,backgroundColor:Xe.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${Tt}-disabled`]:{cursor:"not-allowed"},[`${Ne}-disabled`]:{[`&, ${Ne}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${Ne}-inner`]:{background:Xe.colorBgContainerDisabled,borderColor:Xe.colorBorder,"&:after":{borderColor:Xe.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:Xe.colorTextDisabled},[`&${Ne}-indeterminate ${Ne}-inner::after`]:{background:Xe.colorTextDisabled}}}]};function Ge(Xe,Ne){const Tt=(0,Oe.TS)(Ne,{checkboxCls:`.${Xe}`,checkboxSize:Ne.controlInteractiveSize});return[ut(Tt)]}xn.ZP=(0,Ke.Z)("Checkbox",(Xe,Ne)=>{let{prefixCls:Tt}=Ne;return[Ge(Tt,Xe)]})},36381:function(Vn,xn,pe){"use strict";pe.d(xn,{default:function(){return Gn}});var ge=pe(38819),Oe=pe(92310),Ke=pe.n(Oe),ut=pe(96663),Ge=pe(19127),Xe=pe(72071),Ne=pe(20135),Tt=pe(18929),Ct=pe(48736),Ve=pe(59301),Lt=pe(6620),dt=pe(11592),Rt=pe(90493),De=pe(77900),ne=pe(10228),ee=Ve.forwardRef(function(ze,Ee){var Pe=ze.prefixCls,Fe=ze.forceRender,Ae=ze.className,ye=ze.style,qe=ze.children,vt=ze.isActive,et=ze.role,Ye=Ve.useState(vt||Fe),xt=(0,Xe.Z)(Ye,2),yt=xt[0],at=xt[1];return Ve.useEffect(function(){(Fe||vt)&&at(!0)},[Fe,vt]),yt?Ve.createElement("div",{ref:Ee,className:Ke()("".concat(Pe,"-content"),(0,Rt.Z)((0,Rt.Z)({},"".concat(Pe,"-content-active"),vt),"".concat(Pe,"-content-inactive"),!vt),Ae),style:ye,role:et},Ve.createElement("div",{className:"".concat(Pe,"-content-box")},qe)):null});ee.displayName="PanelContent";var ce=ee,se=["showArrow","headerClass","isActive","onItemClick","forceRender","className","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],he=Ve.forwardRef(function(ze,Ee){var Pe=ze.showArrow,Fe=Pe===void 0?!0:Pe,Ae=ze.headerClass,ye=ze.isActive,qe=ze.onItemClick,vt=ze.forceRender,et=ze.className,Ye=ze.prefixCls,xt=ze.collapsible,yt=ze.accordion,at=ze.panelKey,zt=ze.extra,un=ze.header,fn=ze.expandIcon,Qt=ze.openMotion,Kn=ze.destroyInactivePanel,On=ze.children,jt=(0,Lt.Z)(ze,se),sn=xt==="disabled",jn=xt==="header",dn=xt==="icon",Pn=zt!=null&&typeof zt!="boolean",ui=function(){qe==null||qe(at)},pi=function(wr){(wr.key==="Enter"||wr.keyCode===ne.Z.ENTER||wr.which===ne.Z.ENTER)&&ui()},gi=typeof fn=="function"?fn(ze):Ve.createElement("i",{className:"arrow"});gi&&(gi=Ve.createElement("div",{className:"".concat(Ye,"-expand-icon"),onClick:["header","icon"].includes(xt)?ui:void 0},gi));var bi=Ke()((0,Rt.Z)((0,Rt.Z)((0,Rt.Z)({},"".concat(Ye,"-item"),!0),"".concat(Ye,"-item-active"),ye),"".concat(Ye,"-item-disabled"),sn),et),Xi=Ke()(Ae,(0,Rt.Z)((0,Rt.Z)((0,Rt.Z)({},"".concat(Ye,"-header"),!0),"".concat(Ye,"-header-collapsible-only"),jn),"".concat(Ye,"-icon-collapsible-only"),dn)),ar={className:Xi,"aria-expanded":ye,"aria-disabled":sn,onKeyDown:pi};return!jn&&!dn&&(ar.onClick=ui,ar.role=yt?"tab":"button",ar.tabIndex=sn?-1:0),Ve.createElement("div",(0,ut.Z)({},jt,{ref:Ee,className:bi}),Ve.createElement("div",ar,Fe&&gi,Ve.createElement("span",{className:"".concat(Ye,"-header-text"),onClick:xt==="header"?ui:void 0},un),Pn&&Ve.createElement("div",{className:"".concat(Ye,"-extra")},zt)),Ve.createElement(De.default,(0,ut.Z)({visible:ye,leavedClassName:"".concat(Ye,"-content-hidden")},Qt,{forceRender:vt,removeOnLeave:Kn}),function(Ji,wr){var mr=Ji.className,Hi=Ji.style;return Ve.createElement(ce,{ref:wr,prefixCls:Ye,className:mr,style:Hi,isActive:ye,forceRender:vt,role:yt?"tabpanel":void 0},On)}))}),ve=he,be=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],ke=function(Ee,Pe){var Fe=Pe.prefixCls,Ae=Pe.accordion,ye=Pe.collapsible,qe=Pe.destroyInactivePanel,vt=Pe.onItemClick,et=Pe.activeKey,Ye=Pe.openMotion,xt=Pe.expandIcon;return Ee.map(function(yt,at){var zt=yt.children,un=yt.label,fn=yt.key,Qt=yt.collapsible,Kn=yt.onItemClick,On=yt.destroyInactivePanel,jt=(0,Lt.Z)(yt,be),sn=String(fn!=null?fn:at),jn=Qt!=null?Qt:ye,dn=On!=null?On:qe,Pn=function(gi){jn!=="disabled"&&(vt(gi),Kn==null||Kn(gi))},ui=!1;return Ae?ui=et[0]===sn:ui=et.indexOf(sn)>-1,Ve.createElement(ve,(0,ut.Z)({},jt,{prefixCls:Fe,key:sn,panelKey:sn,isActive:ui,accordion:Ae,openMotion:Ye,expandIcon:xt,header:un,collapsible:jn,onItemClick:Pn,destroyInactivePanel:dn}),zt)})},Be=function(Ee,Pe,Fe){if(!Ee)return null;var Ae=Fe.prefixCls,ye=Fe.accordion,qe=Fe.collapsible,vt=Fe.destroyInactivePanel,et=Fe.onItemClick,Ye=Fe.activeKey,xt=Fe.openMotion,yt=Fe.expandIcon,at=Ee.key||String(Pe),zt=Ee.props,un=zt.header,fn=zt.headerClass,Qt=zt.destroyInactivePanel,Kn=zt.collapsible,On=zt.onItemClick,jt=!1;ye?jt=Ye[0]===at:jt=Ye.indexOf(at)>-1;var sn=Kn!=null?Kn:qe,jn=function(ui){sn!=="disabled"&&(et(ui),On==null||On(ui))},dn={key:at,panelKey:at,header:un,headerClass:fn,isActive:jt,prefixCls:Ae,destroyInactivePanel:Qt!=null?Qt:vt,openMotion:xt,accordion:ye,children:Ee.props.children,onItemClick:jn,expandIcon:yt,collapsible:sn};return typeof Ee.type=="string"?Ee:(Object.keys(dn).forEach(function(Pn){typeof dn[Pn]=="undefined"&&delete dn[Pn]}),Ve.cloneElement(Ee,dn))};function He(ze,Ee,Pe){return Array.isArray(ze)?ke(ze,Pe):(0,dt.Z)(Ee).map(function(Fe,Ae){return Be(Fe,Ae,Pe)})}var We=He,rt=pe(26112);function Qe(ze){var Ee=ze;if(!Array.isArray(Ee)){var Pe=(0,Ne.Z)(Ee);Ee=Pe==="number"||Pe==="string"?[Ee]:[]}return Ee.map(function(Fe){return String(Fe)})}var Pt=Ve.forwardRef(function(ze,Ee){var Pe=ze.prefixCls,Fe=Pe===void 0?"rc-collapse":Pe,Ae=ze.destroyInactivePanel,ye=Ae===void 0?!1:Ae,qe=ze.style,vt=ze.accordion,et=ze.className,Ye=ze.children,xt=ze.collapsible,yt=ze.openMotion,at=ze.expandIcon,zt=ze.activeKey,un=ze.defaultActiveKey,fn=ze.onChange,Qt=ze.items,Kn=Ke()(Fe,et),On=(0,Tt.Z)([],{value:zt,onChange:function(pi){return fn==null?void 0:fn(pi)},defaultValue:un,postState:Qe}),jt=(0,Xe.Z)(On,2),sn=jt[0],jn=jt[1],dn=function(pi){return jn(function(){if(vt)return sn[0]===pi?[]:[pi];var gi=sn.indexOf(pi),bi=gi>-1;return bi?sn.filter(function(Xi){return Xi!==pi}):[].concat((0,Ge.Z)(sn),[pi])})};(0,Ct.ZP)(!Ye,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var Pn=We(Qt,Ye,{prefixCls:Fe,accordion:vt,openMotion:yt,expandIcon:at,collapsible:xt,destroyInactivePanel:ye,onItemClick:dn,activeKey:sn});return Ve.createElement("div",(0,ut.Z)({ref:Ee,className:Kn,style:qe,role:vt?"tablist":void 0},(0,rt.Z)(ze,{aria:!0,data:!0})),Pn)}),Ze=Object.assign(Pt,{Panel:ve}),Et=Ze,it=Ze.Panel,Dt=pe(2738),ht=pe(62892),Ht=pe(92343),_t=pe(36355),Vt=pe(19716),Ue=Ve.forwardRef((ze,Ee)=>{const{getPrefixCls:Pe}=Ve.useContext(_t.E_),{prefixCls:Fe,className:Ae,showArrow:ye=!0}=ze,qe=Pe("collapse",Fe),vt=Ke()({[`${qe}-no-arrow`]:!ye},Ae);return Ve.createElement(Et.Panel,Object.assign({ref:Ee},ze,{prefixCls:qe,className:vt}))}),Wt=pe(17313),Ln=pe(8378),Fn=pe(83116),Gt=pe(37613);const rn=ze=>{const{componentCls:Ee,contentBg:Pe,padding:Fe,headerBg:Ae,headerPadding:ye,collapseHeaderPaddingSM:qe,collapseHeaderPaddingLG:vt,collapsePanelBorderRadius:et,lineWidth:Ye,lineType:xt,colorBorder:yt,colorText:at,colorTextHeading:zt,colorTextDisabled:un,fontSize:fn,fontSizeLG:Qt,lineHeight:Kn,marginSM:On,paddingSM:jt,paddingLG:sn,paddingXS:jn,motionDurationSlow:dn,fontSizeIcon:Pn,contentPadding:ui}=ze,pi=`${Ye}px ${xt} ${yt}`;return{[Ee]:Object.assign(Object.assign({},(0,Wt.Wf)(ze)),{backgroundColor:Ae,border:pi,borderBottom:0,borderRadius:`${et}px`,"&-rtl":{direction:"rtl"},[`& > ${Ee}-item`]:{borderBottom:pi,"&:last-child":{[`
|
|
|
&,
|
|
|
& > ${Ee}-header`]:{borderRadius:`0 0 ${et}px ${et}px`}},[`> ${Ee}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:ye,color:zt,lineHeight:Kn,cursor:"pointer",transition:`all ${dn}, visibility 0s`,[`> ${Ee}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${Ee}-expand-icon`]:{height:fn*Kn,display:"flex",alignItems:"center",paddingInlineEnd:On},[`${Ee}-arrow`]:Object.assign(Object.assign({},(0,Wt.Ro)()),{fontSize:Pn,svg:{transition:`transform ${dn}`}}),[`${Ee}-header-text`]:{marginInlineEnd:"auto"}},[`${Ee}-header-collapsible-only`]:{cursor:"default",[`${Ee}-header-text`]:{flex:"none",cursor:"pointer"}},[`${Ee}-icon-collapsible-only`]:{cursor:"default",[`${Ee}-expand-icon`]:{cursor:"pointer"}}},[`${Ee}-content`]:{color:at,backgroundColor:Pe,borderTop:pi,[`& > ${Ee}-content-box`]:{padding:ui},"&-hidden":{display:"none"}},"&-small":{[`> ${Ee}-item`]:{[`> ${Ee}-header`]:{padding:qe,paddingInlineStart:jn,[`> ${Ee}-expand-icon`]:{marginInlineStart:jt-jn}},[`> ${Ee}-content > ${Ee}-content-box`]:{padding:jt}}},"&-large":{[`> ${Ee}-item`]:{fontSize:Qt,[`> ${Ee}-header`]:{padding:vt,paddingInlineStart:Fe,[`> ${Ee}-expand-icon`]:{height:Qt*Kn,marginInlineStart:sn-Fe}},[`> ${Ee}-content > ${Ee}-content-box`]:{padding:sn}}},[`${Ee}-item:last-child`]:{[`> ${Ee}-content`]:{borderRadius:`0 0 ${et}px ${et}px`}},[`& ${Ee}-item-disabled > ${Ee}-header`]:{"\n &,\n & > .arrow\n ":{color:un,cursor:"not-allowed"}},[`&${Ee}-icon-position-end`]:{[`& > ${Ee}-item`]:{[`> ${Ee}-header`]:{[`${Ee}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:On}}}}})}},An=ze=>{const{componentCls:Ee}=ze,Pe=`> ${Ee}-item > ${Ee}-header ${Ee}-arrow svg`;return{[`${Ee}-rtl`]:{[Pe]:{transform:"rotate(180deg)"}}}},ni=ze=>{const{componentCls:Ee,headerBg:Pe,paddingXXS:Fe,colorBorder:Ae}=ze;return{[`${Ee}-borderless`]:{backgroundColor:Pe,border:0,[`> ${Ee}-item`]:{borderBottom:`1px solid ${Ae}`},[`
|
|
|
> ${Ee}-item:last-child,
|
|
|
> ${Ee}-item:last-child ${Ee}-header
|
|
|
`]:{borderRadius:0},[`> ${Ee}-item:last-child`]:{borderBottom:0},[`> ${Ee}-item > ${Ee}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${Ee}-item > ${Ee}-content > ${Ee}-content-box`]:{paddingTop:Fe}}}},Sn=ze=>{const{componentCls:Ee,paddingSM:Pe}=ze;return{[`${Ee}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${Ee}-item`]:{borderBottom:0,[`> ${Ee}-content`]:{backgroundColor:"transparent",border:0,[`> ${Ee}-content-box`]:{paddingBlock:Pe}}}}}};var Yn=(0,Fn.Z)("Collapse",ze=>{const Ee=(0,Gt.TS)(ze,{collapseHeaderPaddingSM:`${ze.paddingXS}px ${ze.paddingSM}px`,collapseHeaderPaddingLG:`${ze.padding}px ${ze.paddingLG}px`,collapsePanelBorderRadius:ze.borderRadiusLG});return[rn(Ee),ni(Ee),Sn(Ee),An(Ee),(0,Ln.Z)(Ee)]},ze=>({headerPadding:`${ze.paddingSM}px ${ze.padding}px`,headerBg:ze.colorFillAlter,contentPadding:`${ze.padding}px 16px`,contentBg:ze.colorBgContainer})),wn=Object.assign(Ve.forwardRef((ze,Ee)=>{const{getPrefixCls:Pe,direction:Fe,collapse:Ae}=Ve.useContext(_t.E_),{prefixCls:ye,className:qe,rootClassName:vt,style:et,bordered:Ye=!0,ghost:xt,size:yt,expandIconPosition:at="start",children:zt,expandIcon:un}=ze,fn=(0,Vt.Z)(pi=>{var gi;return(gi=yt!=null?yt:pi)!==null&&gi!==void 0?gi:"middle"}),Qt=Pe("collapse",ye),Kn=Pe(),[On,jt]=Yn(Qt),sn=Ve.useMemo(()=>at==="left"?"start":at==="right"?"end":at,[at]),jn=function(){let pi=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const gi=un?un(pi):Ve.createElement(ge.Z,{rotate:pi.isActive?90:void 0});return(0,Ht.Tm)(gi,()=>({className:Ke()(gi.props.className,`${Qt}-arrow`)}))},dn=Ke()(`${Qt}-icon-position-${sn}`,{[`${Qt}-borderless`]:!Ye,[`${Qt}-rtl`]:Fe==="rtl",[`${Qt}-ghost`]:!!xt,[`${Qt}-${fn}`]:fn!=="middle"},Ae==null?void 0:Ae.className,qe,vt,jt),Pn=Object.assign(Object.assign({},(0,ht.Z)(Kn)),{motionAppear:!1,leavedClassName:`${Qt}-content-hidden`}),ui=Ve.useMemo(()=>zt?(0,dt.Z)(zt).map((pi,gi)=>{var bi,Xi;if(!((bi=pi.props)===null||bi===void 0)&&bi.disabled){const ar=(Xi=pi.key)!==null&&Xi!==void 0?Xi:String(gi),{disabled:Ji,collapsible:wr}=pi.props,mr=Object.assign(Object.assign({},(0,Dt.Z)(pi.props,["disabled"])),{key:ar,collapsible:wr!=null?wr:Ji?"disabled":void 0});return(0,Ht.Tm)(pi,mr)}return pi}):null,[zt]);return On(Ve.createElement(Et,Object.assign({ref:Ee,openMotion:Pn},(0,Dt.Z)(ze,["rootClassName"]),{expandIcon:jn,prefixCls:Qt,className:dn,style:Object.assign(Object.assign({},Ae==null?void 0:Ae.style),et)}),ui))}),{Panel:Ue}),Gn=wn},93891:function(Vn,xn,pe){"use strict";var ge=pe(59301),Oe=pe(36355),Ke=pe(64165);const ut=Ge=>{const{componentName:Xe}=Ge,{getPrefixCls:Ne}=(0,ge.useContext)(Oe.E_),Tt=Ne("empty");switch(Xe){case"Table":case"List":return ge.createElement(Ke.Z,{image:Ke.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return ge.createElement(Ke.Z,{image:Ke.Z.PRESENTED_IMAGE_SIMPLE,className:`${Tt}-small`});default:return ge.createElement(Ke.Z,null)}};xn.Z=ut},43428:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return It}});var ge=pe(92310),Oe=pe.n(ge),Ke=pe(44127),ut=pe(72071),Ge=pe(43403),Xe=pe(34280),Ne=pe(59301),Tt=Ne.createContext(null),Ct=Ne.createContext({}),Ve=Tt,Lt=pe(90493),dt=pe(96663),Rt=pe(77900),De=pe(10228),ne=pe(26112),ee=pe(70425),ce=function(Gn){var ze=Gn.prefixCls,Ee=Gn.className,Pe=Gn.style,Fe=Gn.children,Ae=Gn.containerRef,ye=Gn.id,qe=Gn.onMouseEnter,vt=Gn.onMouseOver,et=Gn.onMouseLeave,Ye=Gn.onClick,xt=Gn.onKeyDown,yt=Gn.onKeyUp,at={onMouseEnter:qe,onMouseOver:vt,onMouseLeave:et,onClick:Ye,onKeyDown:xt,onKeyUp:yt},zt=Ne.useContext(Ct),un=zt.panel,fn=(0,ee.useComposeRef)(un,Ae);return Ne.createElement(Ne.Fragment,null,Ne.createElement("div",(0,dt.Z)({id:ye,className:Oe()("".concat(ze,"-content"),Ee),style:(0,Ke.Z)({},Pe),"aria-modal":"true",role:"dialog",ref:fn},at),Fe))},se=ce,he=pe(48736);function ve(wn){return typeof wn=="string"&&String(Number(wn))===wn?((0,he.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(wn)):wn}function be(wn){warning(!("wrapperClassName"in wn),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!wn.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var ke={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Be(wn,Gn){var ze,Ee,Pe,Fe,Ae=wn.prefixCls,ye=wn.open,qe=wn.placement,vt=wn.inline,et=wn.push,Ye=wn.forceRender,xt=wn.autoFocus,yt=wn.keyboard,at=wn.rootClassName,zt=wn.rootStyle,un=wn.zIndex,fn=wn.className,Qt=wn.id,Kn=wn.style,On=wn.motion,jt=wn.width,sn=wn.height,jn=wn.children,dn=wn.contentWrapperStyle,Pn=wn.mask,ui=wn.maskClosable,pi=wn.maskMotion,gi=wn.maskClassName,bi=wn.maskStyle,Xi=wn.afterOpenChange,ar=wn.onClose,Ji=wn.onMouseEnter,wr=wn.onMouseOver,mr=wn.onMouseLeave,Hi=wn.onClick,Er=wn.onKeyDown,$n=wn.onKeyUp,Le=Ne.useRef(),Ei=Ne.useRef(),Ri=Ne.useRef();Ne.useImperativeHandle(Gn,function(){return Le.current});var nn=function(Jn){var St=Jn.keyCode,Nn=Jn.shiftKey;switch(St){case De.Z.TAB:{if(St===De.Z.TAB){if(!Nn&&document.activeElement===Ri.current){var qn;(qn=Ei.current)===null||qn===void 0||qn.focus({preventScroll:!0})}else if(Nn&&document.activeElement===Ei.current){var Si;(Si=Ri.current)===null||Si===void 0||Si.focus({preventScroll:!0})}}break}case De.Z.ESC:{ar&&yt&&(Jn.stopPropagation(),ar(Jn));break}}};Ne.useEffect(function(){if(ye&&xt){var Dn;(Dn=Le.current)===null||Dn===void 0||Dn.focus({preventScroll:!0})}},[ye]);var di=Ne.useState(!1),yi=(0,ut.Z)(di,2),Li=yi[0],Tn=yi[1],Un=Ne.useContext(Ve),kt;et===!1?kt={distance:0}:et===!0?kt={}:kt=et||{};var $t=(ze=(Ee=(Pe=kt)===null||Pe===void 0?void 0:Pe.distance)!==null&&Ee!==void 0?Ee:Un==null?void 0:Un.pushDistance)!==null&&ze!==void 0?ze:180,Je=Ne.useMemo(function(){return{pushDistance:$t,push:function(){Tn(!0)},pull:function(){Tn(!1)}}},[$t]);Ne.useEffect(function(){if(ye){var Dn;Un==null||(Dn=Un.push)===null||Dn===void 0||Dn.call(Un)}else{var Jn;Un==null||(Jn=Un.pull)===null||Jn===void 0||Jn.call(Un)}},[ye]),Ne.useEffect(function(){return function(){var Dn;Un==null||(Dn=Un.pull)===null||Dn===void 0||Dn.call(Un)}},[]);var qt=Pn&&Ne.createElement(Rt.default,(0,dt.Z)({key:"mask"},pi,{visible:ye}),function(Dn,Jn){var St=Dn.className,Nn=Dn.style;return Ne.createElement("div",{className:Oe()("".concat(Ae,"-mask"),St,gi),style:(0,Ke.Z)((0,Ke.Z)({},Nn),bi),onClick:ui&&ye?ar:void 0,ref:Jn})}),vn=typeof On=="function"?On(qe):On,Ft={};if(Li&&$t)switch(qe){case"top":Ft.transform="translateY(".concat($t,"px)");break;case"bottom":Ft.transform="translateY(".concat(-$t,"px)");break;case"left":Ft.transform="translateX(".concat($t,"px)");break;default:Ft.transform="translateX(".concat(-$t,"px)");break}qe==="left"||qe==="right"?Ft.width=ve(jt):Ft.height=ve(sn);var st={onMouseEnter:Ji,onMouseOver:wr,onMouseLeave:mr,onClick:Hi,onKeyDown:Er,onKeyUp:$n},on=Ne.createElement(Rt.default,(0,dt.Z)({key:"panel"},vn,{visible:ye,forceRender:Ye,onVisibleChanged:function(Jn){Xi==null||Xi(Jn)},removeOnLeave:!1,leavedClassName:"".concat(Ae,"-content-wrapper-hidden")}),function(Dn,Jn){var St=Dn.className,Nn=Dn.style;return Ne.createElement("div",(0,dt.Z)({className:Oe()("".concat(Ae,"-content-wrapper"),St),style:(0,Ke.Z)((0,Ke.Z)((0,Ke.Z)({},Ft),Nn),dn)},(0,ne.Z)(wn,{data:!0})),Ne.createElement(se,(0,dt.Z)({id:Qt,containerRef:Jn,prefixCls:Ae,className:fn,style:Kn},st),jn))}),En=(0,Ke.Z)({},zt);return un&&(En.zIndex=un),Ne.createElement(Ve.Provider,{value:Je},Ne.createElement("div",{className:Oe()(Ae,"".concat(Ae,"-").concat(qe),at,(Fe={},(0,Lt.Z)(Fe,"".concat(Ae,"-open"),ye),(0,Lt.Z)(Fe,"".concat(Ae,"-inline"),vt),Fe)),style:En,tabIndex:-1,ref:Le,onKeyDown:nn},qt,Ne.createElement("div",{tabIndex:0,ref:Ei,style:ke,"aria-hidden":"true","data-sentinel":"start"}),on,Ne.createElement("div",{tabIndex:0,ref:Ri,style:ke,"aria-hidden":"true","data-sentinel":"end"})))}var He=Ne.forwardRef(Be),We=He,rt=function(Gn){var ze=Gn.open,Ee=ze===void 0?!1:ze,Pe=Gn.prefixCls,Fe=Pe===void 0?"rc-drawer":Pe,Ae=Gn.placement,ye=Ae===void 0?"right":Ae,qe=Gn.autoFocus,vt=qe===void 0?!0:qe,et=Gn.keyboard,Ye=et===void 0?!0:et,xt=Gn.width,yt=xt===void 0?378:xt,at=Gn.mask,zt=at===void 0?!0:at,un=Gn.maskClosable,fn=un===void 0?!0:un,Qt=Gn.getContainer,Kn=Gn.forceRender,On=Gn.afterOpenChange,jt=Gn.destroyOnClose,sn=Gn.onMouseEnter,jn=Gn.onMouseOver,dn=Gn.onMouseLeave,Pn=Gn.onClick,ui=Gn.onKeyDown,pi=Gn.onKeyUp,gi=Gn.panelRef,bi=Ne.useState(!1),Xi=(0,ut.Z)(bi,2),ar=Xi[0],Ji=Xi[1],wr=Ne.useState(!1),mr=(0,ut.Z)(wr,2),Hi=mr[0],Er=mr[1];(0,Xe.Z)(function(){Er(!0)},[]);var $n=Hi?Ee:!1,Le=Ne.useRef(),Ei=Ne.useRef();(0,Xe.Z)(function(){$n&&(Ei.current=document.activeElement)},[$n]);var Ri=function(Tn){var Un;if(Ji(Tn),On==null||On(Tn),!Tn&&Ei.current&&!((Un=Le.current)!==null&&Un!==void 0&&Un.contains(Ei.current))){var kt;(kt=Ei.current)===null||kt===void 0||kt.focus({preventScroll:!0})}},nn=Ne.useMemo(function(){return{panel:gi}},[gi]);if(!Kn&&!ar&&!$n&&jt)return null;var di={onMouseEnter:sn,onMouseOver:jn,onMouseLeave:dn,onClick:Pn,onKeyDown:ui,onKeyUp:pi},yi=(0,Ke.Z)((0,Ke.Z)({},Gn),{},{open:$n,prefixCls:Fe,placement:ye,autoFocus:vt,keyboard:Ye,width:yt,mask:zt,maskClosable:fn,inline:Qt===!1,afterOpenChange:Ri,ref:Le},di);return Ne.createElement(Ct.Provider,{value:nn},Ne.createElement(Ge.Z,{open:$n||Kn||ar,autoDestroy:!1,getContainer:Qt,autoLock:zt&&($n||ar)},Ne.createElement(We,yi)))},Qe=rt,Pt=Qe,Ze=pe(62892),Et=pe(36355),it=pe(32441),Dt=pe(47729),Ht=wn=>{const{prefixCls:Gn,title:ze,footer:Ee,extra:Pe,closeIcon:Fe,closable:Ae,onClose:ye,headerStyle:qe,drawerStyle:vt,bodyStyle:et,footerStyle:Ye,children:xt}=wn,yt=Ne.useCallback(Qt=>Ne.createElement("button",{type:"button",onClick:ye,"aria-label":"Close",className:`${Gn}-close`},Qt),[ye]),[at,zt]=(0,Dt.Z)(Ae,Fe,yt,void 0,!0),un=Ne.useMemo(()=>!ze&&!at?null:Ne.createElement("div",{style:qe,className:Oe()(`${Gn}-header`,{[`${Gn}-header-close-only`]:at&&!ze&&!Pe})},Ne.createElement("div",{className:`${Gn}-header-title`},zt,ze&&Ne.createElement("div",{className:`${Gn}-title`},ze)),Pe&&Ne.createElement("div",{className:`${Gn}-extra`},Pe)),[at,zt,Pe,qe,Gn,ze]),fn=Ne.useMemo(()=>{if(!Ee)return null;const Qt=`${Gn}-footer`;return Ne.createElement("div",{className:Qt,style:Ye},Ee)},[Ee,Ye,Gn]);return Ne.createElement("div",{className:`${Gn}-wrapper-body`,style:vt},un,Ne.createElement("div",{className:`${Gn}-body`,style:et},xt),fn)},_t=pe(33234),Vt=pe(83116),ot=pe(37613),Wt=wn=>{const{componentCls:Gn,motionDurationSlow:ze}=wn,Ee={"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${ze}`}}};return{[Gn]:{[`${Gn}-mask-motion`]:{"&-enter, &-appear, &-leave":{"&-active":{transition:`all ${ze}`}},"&-enter, &-appear":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}},[`${Gn}-panel-motion`]:{"&-left":[Ee,{"&-enter, &-appear":{"&-start":{transform:"translateX(-100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(-100%)"}}}],"&-right":[Ee,{"&-enter, &-appear":{"&-start":{transform:"translateX(100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(100%)"}}}],"&-top":[Ee,{"&-enter, &-appear":{"&-start":{transform:"translateY(-100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(-100%)"}}}],"&-bottom":[Ee,{"&-enter, &-appear":{"&-start":{transform:"translateY(100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(100%)"}}}]}}}};const Ln=wn=>{const{componentCls:Gn,zIndexPopup:ze,colorBgMask:Ee,colorBgElevated:Pe,motionDurationSlow:Fe,motionDurationMid:Ae,padding:ye,paddingLG:qe,fontSizeLG:vt,lineHeightLG:et,lineWidth:Ye,lineType:xt,colorSplit:yt,marginSM:at,colorIcon:zt,colorIconHover:un,colorText:fn,fontWeightStrong:Qt,footerPaddingBlock:Kn,footerPaddingInline:On}=wn,jt=`${Gn}-content-wrapper`;return{[Gn]:{position:"fixed",inset:0,zIndex:ze,pointerEvents:"none","&-pure":{position:"relative",background:Pe,[`&${Gn}-left`]:{boxShadow:wn.boxShadowDrawerLeft},[`&${Gn}-right`]:{boxShadow:wn.boxShadowDrawerRight},[`&${Gn}-top`]:{boxShadow:wn.boxShadowDrawerUp},[`&${Gn}-bottom`]:{boxShadow:wn.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${Gn}-mask`]:{position:"absolute",inset:0,zIndex:ze,background:Ee,pointerEvents:"auto"},[jt]:{position:"absolute",zIndex:ze,maxWidth:"100vw",transition:`all ${Fe}`,"&-hidden":{display:"none"}},[`&-left > ${jt}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:wn.boxShadowDrawerLeft},[`&-right > ${jt}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:wn.boxShadowDrawerRight},[`&-top > ${jt}`]:{top:0,insetInline:0,boxShadow:wn.boxShadowDrawerUp},[`&-bottom > ${jt}`]:{bottom:0,insetInline:0,boxShadow:wn.boxShadowDrawerDown},[`${Gn}-content`]:{width:"100%",height:"100%",overflow:"auto",background:Pe,pointerEvents:"auto"},[`${Gn}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${Gn}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${ye}px ${qe}px`,fontSize:vt,lineHeight:et,borderBottom:`${Ye}px ${xt} ${yt}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${Gn}-extra`]:{flex:"none"},[`${Gn}-close`]:{display:"inline-block",marginInlineEnd:at,color:zt,fontWeight:Qt,fontSize:vt,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${Ae}`,textRendering:"auto","&:focus, &:hover":{color:un,textDecoration:"none"}},[`${Gn}-title`]:{flex:1,margin:0,color:fn,fontWeight:wn.fontWeightStrong,fontSize:vt,lineHeight:et},[`${Gn}-body`]:{flex:1,minWidth:0,minHeight:0,padding:qe,overflow:"auto"},[`${Gn}-footer`]:{flexShrink:0,padding:`${Kn}px ${On}px`,borderTop:`${Ye}px ${xt} ${yt}`},"&-rtl":{direction:"rtl"}}}};var Fn=(0,Vt.Z)("Drawer",wn=>{const Gn=(0,ot.TS)(wn,{});return[Ln(Gn),Wt(Gn)]},wn=>({zIndexPopup:wn.zIndexPopupBase,footerPaddingBlock:wn.paddingXS,footerPaddingInline:wn.padding})),Gt=pe(11575),rn=function(wn,Gn){var ze={};for(var Ee in wn)Object.prototype.hasOwnProperty.call(wn,Ee)&&Gn.indexOf(Ee)<0&&(ze[Ee]=wn[Ee]);if(wn!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Pe=0,Ee=Object.getOwnPropertySymbols(wn);Pe<Ee.length;Pe++)Gn.indexOf(Ee[Pe])<0&&Object.prototype.propertyIsEnumerable.call(wn,Ee[Pe])&&(ze[Ee[Pe]]=wn[Ee[Pe]]);return ze};const An=null,ni={distance:180},Sn=wn=>{var Gn;const{rootClassName:ze,width:Ee,height:Pe,size:Fe="default",mask:Ae=!0,push:ye=ni,open:qe,afterOpenChange:vt,onClose:et,prefixCls:Ye,getContainer:xt,style:yt,className:at,visible:zt,afterVisibleChange:un}=wn,fn=rn(wn,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange"]),{getPopupContainer:Qt,getPrefixCls:Kn,direction:On,drawer:jt}=Ne.useContext(Et.E_),sn=Kn("drawer",Ye),[jn,dn]=Fn(sn),Pn=xt===void 0&&Qt?()=>Qt(document.body):xt,ui=Oe()({"no-mask":!Ae,[`${sn}-rtl`]:On==="rtl"},ze,dn),pi=Ne.useMemo(()=>Ee!=null?Ee:Fe==="large"?736:378,[Ee,Fe]),gi=Ne.useMemo(()=>Pe!=null?Pe:Fe==="large"?736:378,[Pe,Fe]),bi={motionName:(0,Ze.m)(sn,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},Xi=Ji=>({motionName:(0,Ze.m)(sn,`panel-motion-${Ji}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),ar=(0,Gt.H)();return jn(Ne.createElement(_t.BR,null,Ne.createElement(it.Ux,{status:!0,override:!0},Ne.createElement(Pt,Object.assign({prefixCls:sn,onClose:et,maskMotion:bi,motion:Xi},fn,{open:qe!=null?qe:zt,mask:Ae,push:ye,width:pi,height:gi,style:Object.assign(Object.assign({},jt==null?void 0:jt.style),yt),className:Oe()(jt==null?void 0:jt.className,at),rootClassName:ui,getContainer:Pn,afterOpenChange:vt!=null?vt:un,panelRef:ar}),Ne.createElement(Ht,Object.assign({prefixCls:sn},fn,{onClose:et}))))))},Yn=wn=>{const{prefixCls:Gn,style:ze,className:Ee,placement:Pe="right"}=wn,Fe=rn(wn,["prefixCls","style","className","placement"]),{getPrefixCls:Ae}=Ne.useContext(Et.E_),ye=Ae("drawer",Gn),[qe,vt]=Fn(ye),et=Oe()(ye,`${ye}-pure`,`${ye}-${Pe}`,vt,Ee);return qe(Ne.createElement("div",{className:et,style:ze},Ne.createElement(Ht,Object.assign({prefixCls:ye},Fe))))};Sn._InternalPanelDoNotUseOrYouWillBeFired=Yn;var It=Sn},91857:function(Vn,xn,pe){"use strict";var ge=pe(59301),Oe=pe(38819),Ke=pe(92310),ut=pe.n(Ke),Ge=pe(31561),Xe=pe(70425),Ne=pe(18929),Tt=pe(2738),Ct=pe(79676),Ve=pe(53487),Lt=pe(92343),dt=pe(36355),Rt=pe(20834),De=pe(40875),ne=pe(88088),ee=pe(47211);const ce=null,se=ke=>{const{menu:Be,arrow:He,prefixCls:We,children:rt,trigger:Qe,disabled:Pt,dropdownRender:Ze,getPopupContainer:Et,overlayClassName:it,rootClassName:Dt,open:ht,onOpenChange:Ht,visible:_t,onVisibleChange:Vt,mouseEnterDelay:ot=.15,mouseLeaveDelay:Ue=.1,autoAdjustOverflow:Wt=!0,placement:Ln="",overlay:Fn,transitionName:Gt}=ke,{getPopupContainer:rn,getPrefixCls:An,direction:ni}=ge.useContext(dt.E_),Sn=ge.useMemo(()=>{const at=An();return Gt!==void 0?Gt:Ln.includes("top")?`${at}-slide-down`:`${at}-slide-up`},[An,Ln,Gt]),Yn=ge.useMemo(()=>Ln?Ln.includes("Center")?Ln.slice(0,Ln.indexOf("Center")):Ln:ni==="rtl"?"bottomRight":"bottomLeft",[Ln,ni]),It=An("dropdown",We),[wn,Gn]=(0,ee.Z)(It),[,ze]=(0,ne.Z)(),Ee=ge.Children.only(rt),Pe=(0,Lt.Tm)(Ee,{className:ut()(`${It}-trigger`,{[`${It}-rtl`]:ni==="rtl"},Ee.props.className),disabled:Pt}),Fe=Pt?[]:Qe;let Ae;Fe&&Fe.includes("contextMenu")&&(Ae=!0);const[ye,qe]=(0,Ne.Z)(!1,{value:ht!=null?ht:_t}),vt=(0,Xe.useEvent)(at=>{Ht==null||Ht(at),Vt==null||Vt(at),qe(at)}),et=ut()(it,Dt,Gn,{[`${It}-rtl`]:ni==="rtl"}),Ye=(0,Ct.Z)({arrowPointAtCenter:typeof He=="object"&&He.pointAtCenter,autoAdjustOverflow:Wt,offset:ze.marginXXS,arrowWidth:He?ze.sizePopupArrow:0,borderRadius:ze.borderRadius}),xt=ge.useCallback(()=>{qe(!1)},[]),yt=()=>{let at;return Be!=null&&Be.items?at=ge.createElement(Rt.default,Object.assign({},Be)):typeof Fn=="function"?at=Fn():at=Fn,Ze&&(at=Ze(at)),at=ge.Children.only(typeof at=="string"?ge.createElement("span",null,at):at),ge.createElement(De.J,{prefixCls:`${It}-menu`,expandIcon:ge.createElement("span",{className:`${It}-menu-submenu-arrow`},ge.createElement(Oe.Z,{className:`${It}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:xt,validator:zt=>{let{mode:un}=zt}},at)};return wn(ge.createElement(Ge.Z,Object.assign({alignPoint:Ae},(0,Tt.Z)(ke,["rootClassName"]),{mouseEnterDelay:ot,mouseLeaveDelay:Ue,visible:ye,builtinPlacements:Ye,arrow:!!He,overlayClassName:et,prefixCls:It,getPopupContainer:Et||rn,transitionName:Sn,trigger:Fe,overlay:yt,placement:Yn,onVisibleChange:vt}),Pe))};function he(ke){return Object.assign(Object.assign({},ke),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const ve=(0,Ve.Z)(se,"dropdown",ke=>ke,he),be=ke=>ge.createElement(ve,Object.assign({},ke),ge.createElement("span",null));se._InternalPanelDoNotUseOrYouWillBeFired=be,xn.Z=se},38854:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return ne}});var ge=pe(91857),Oe=pe(92310),Ke=pe.n(Oe),ut=pe(59301),Ge=pe(18785),Xe=pe(3113),Ne=pe(36355),Tt=pe(81327),Ct=pe(33234),Ve=pe(47211),Lt=function(ee,ce){var se={};for(var he in ee)Object.prototype.hasOwnProperty.call(ee,he)&&ce.indexOf(he)<0&&(se[he]=ee[he]);if(ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ve=0,he=Object.getOwnPropertySymbols(ee);ve<he.length;ve++)ce.indexOf(he[ve])<0&&Object.prototype.propertyIsEnumerable.call(ee,he[ve])&&(se[he[ve]]=ee[he[ve]]);return se};const dt=ee=>{const{getPopupContainer:ce,getPrefixCls:se,direction:he}=ut.useContext(Ne.E_),{prefixCls:ve,type:be="default",danger:ke,disabled:Be,loading:He,onClick:We,htmlType:rt,children:Qe,className:Pt,menu:Ze,arrow:Et,autoFocus:it,overlay:Dt,trigger:ht,align:Ht,open:_t,onOpenChange:Vt,placement:ot,getPopupContainer:Ue,href:Wt,icon:Ln=ut.createElement(Ge.Z,null),title:Fn,buttonsRender:Gt=yt=>yt,mouseEnterDelay:rn,mouseLeaveDelay:An,overlayClassName:ni,overlayStyle:Sn,destroyPopupOnHide:Yn,dropdownRender:It}=ee,wn=Lt(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"]),Gn=se("dropdown",ve),ze=`${Gn}-button`,[Ee,Pe]=(0,Ve.Z)(Gn),Fe={menu:Ze,arrow:Et,autoFocus:it,align:Ht,disabled:Be,trigger:Be?[]:ht,onOpenChange:Vt,getPopupContainer:Ue||ce,mouseEnterDelay:rn,mouseLeaveDelay:An,overlayClassName:ni,overlayStyle:Sn,destroyPopupOnHide:Yn,dropdownRender:It},{compactSize:Ae,compactItemClassnames:ye}=(0,Ct.ri)(Gn,he),qe=Ke()(ze,ye,Pt,Pe);"overlay"in ee&&(Fe.overlay=Dt),"open"in ee&&(Fe.open=_t),"placement"in ee?Fe.placement=ot:Fe.placement=he==="rtl"?"bottomLeft":"bottomRight";const vt=ut.createElement(Xe.ZP,{type:be,danger:ke,disabled:Be,loading:He,onClick:We,htmlType:rt,href:Wt,title:Fn},Qe),et=ut.createElement(Xe.ZP,{type:be,danger:ke,icon:Ln}),[Ye,xt]=Gt([vt,et]);return Ee(ut.createElement(Tt.Z.Compact,Object.assign({className:qe,size:Ae,block:!0},wn),Ye,ut.createElement(ge.Z,Object.assign({},Fe),xt)))};dt.__ANT_BUTTON=!0;var Rt=dt;const De=ge.Z;De.Button=Rt;var ne=De},47211:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Lt}});var ge=pe(17313),Oe=pe(13826),Ke=pe(92899),ut=pe(29878),Ge=pe(19447),Xe=pe(83116),Ne=pe(37613),Ct=dt=>{const{componentCls:Rt,menuCls:De,colorError:ne,colorTextLightSolid:ee}=dt,ce=`${De}-item`;return{[`${Rt}, ${Rt}-menu-submenu`]:{[`${De} ${ce}`]:{[`&${ce}-danger:not(${ce}-disabled)`]:{color:ne,"&:hover":{color:ee,backgroundColor:ne}}}}}};const Ve=dt=>{const{componentCls:Rt,menuCls:De,zIndexPopup:ne,dropdownArrowDistance:ee,sizePopupArrow:ce,antCls:se,iconCls:he,motionDurationMid:ve,dropdownPaddingVertical:be,fontSize:ke,dropdownEdgeChildPadding:Be,colorTextDisabled:He,fontSizeIcon:We,controlPaddingHorizontal:rt,colorBgElevated:Qe}=dt;return[{[Rt]:Object.assign(Object.assign({},(0,ge.Wf)(dt)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:ne,display:"block","&::before":{position:"absolute",insetBlock:-ee+ce/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${se}-btn`]:{[`& > ${he}-down, & > ${se}-btn-icon > ${he}-down`]:{fontSize:We}},[`${Rt}-wrap`]:{position:"relative",[`${se}-btn > ${he}-down`]:{fontSize:We},[`${he}-down::before`]:{transition:`transform ${ve}`}},[`${Rt}-wrap-open`]:{[`${he}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${se}-slide-down-enter${se}-slide-down-enter-active${Rt}-placement-bottomLeft,
|
|
|
&${se}-slide-down-appear${se}-slide-down-appear-active${Rt}-placement-bottomLeft,
|
|
|
&${se}-slide-down-enter${se}-slide-down-enter-active${Rt}-placement-bottom,
|
|
|
&${se}-slide-down-appear${se}-slide-down-appear-active${Rt}-placement-bottom,
|
|
|
&${se}-slide-down-enter${se}-slide-down-enter-active${Rt}-placement-bottomRight,
|
|
|
&${se}-slide-down-appear${se}-slide-down-appear-active${Rt}-placement-bottomRight`]:{animationName:Oe.fJ},[`&${se}-slide-up-enter${se}-slide-up-enter-active${Rt}-placement-topLeft,
|
|
|
&${se}-slide-up-appear${se}-slide-up-appear-active${Rt}-placement-topLeft,
|
|
|
&${se}-slide-up-enter${se}-slide-up-enter-active${Rt}-placement-top,
|
|
|
&${se}-slide-up-appear${se}-slide-up-appear-active${Rt}-placement-top,
|
|
|
&${se}-slide-up-enter${se}-slide-up-enter-active${Rt}-placement-topRight,
|
|
|
&${se}-slide-up-appear${se}-slide-up-appear-active${Rt}-placement-topRight`]:{animationName:Oe.Qt},[`&${se}-slide-down-leave${se}-slide-down-leave-active${Rt}-placement-bottomLeft,
|
|
|
&${se}-slide-down-leave${se}-slide-down-leave-active${Rt}-placement-bottom,
|
|
|
&${se}-slide-down-leave${se}-slide-down-leave-active${Rt}-placement-bottomRight`]:{animationName:Oe.Uw},[`&${se}-slide-up-leave${se}-slide-up-leave-active${Rt}-placement-topLeft,
|
|
|
&${se}-slide-up-leave${se}-slide-up-leave-active${Rt}-placement-top,
|
|
|
&${se}-slide-up-leave${se}-slide-up-leave-active${Rt}-placement-topRight`]:{animationName:Oe.ly}})},(0,Ge.ZP)(dt,{colorBg:Qe,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${Rt} ${De}`]:{position:"relative",margin:0},[`${De}-submenu-popup`]:{position:"absolute",zIndex:ne,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${Rt}, ${Rt}-menu-submenu`]:{[De]:Object.assign(Object.assign({padding:Be,listStyleType:"none",backgroundColor:Qe,backgroundClip:"padding-box",borderRadius:dt.borderRadiusLG,outline:"none",boxShadow:dt.boxShadowSecondary},(0,ge.Qy)(dt)),{[`${De}-item-group-title`]:{padding:`${be}px ${rt}px`,color:dt.colorTextDescription,transition:`all ${ve}`},[`${De}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${De}-item-icon`]:{minWidth:ke,marginInlineEnd:dt.marginXS,fontSize:dt.fontSizeSM},[`${De}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${ve}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${De}-item, ${De}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${be}px ${rt}px`,color:dt.colorText,fontWeight:"normal",fontSize:ke,lineHeight:dt.lineHeight,cursor:"pointer",transition:`all ${ve}`,borderRadius:dt.borderRadiusSM,"&:hover, &-active":{backgroundColor:dt.controlItemBgHover}},(0,ge.Qy)(dt)),{"&-selected":{color:dt.colorPrimary,backgroundColor:dt.controlItemBgActive,"&:hover, &-active":{backgroundColor:dt.controlItemBgActiveHover}},"&-disabled":{color:He,cursor:"not-allowed","&:hover":{color:He,backgroundColor:Qe,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${dt.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:dt.colorSplit},[`${Rt}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:dt.paddingXS,[`${Rt}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:dt.colorTextDescription,fontSize:We,fontStyle:"normal"}}}),[`${De}-item-group-list`]:{margin:`0 ${dt.marginXS}px`,padding:0,listStyle:"none"},[`${De}-submenu-title`]:{paddingInlineEnd:rt+dt.fontSizeSM},[`${De}-submenu-vertical`]:{position:"relative"},[`${De}-submenu${De}-submenu-disabled ${Rt}-menu-submenu-title`]:{[`&, ${Rt}-menu-submenu-arrow-icon`]:{color:He,backgroundColor:Qe,cursor:"not-allowed"}},[`${De}-submenu-selected ${Rt}-menu-submenu-title`]:{color:dt.colorPrimary}})}},[(0,Oe.oN)(dt,"slide-up"),(0,Oe.oN)(dt,"slide-down"),(0,Ke.Fm)(dt,"move-up"),(0,Ke.Fm)(dt,"move-down"),(0,ut._y)(dt,"zoom-big")]]};var Lt=(0,Xe.Z)("Dropdown",(dt,Rt)=>{let{rootPrefixCls:De}=Rt;const{marginXXS:ne,sizePopupArrow:ee,controlHeight:ce,fontSize:se,lineHeight:he,paddingXXS:ve,componentCls:be,borderRadiusLG:ke}=dt,Be=(ce-se*he)/2,{dropdownArrowOffset:He}=(0,Ge.fS)({contentRadius:ke}),We=(0,Ne.TS)(dt,{menuCls:`${be}-menu`,rootPrefixCls:De,dropdownArrowDistance:ee/2+ne,dropdownArrowOffset:He,dropdownPaddingVertical:Be,dropdownEdgeChildPadding:ve});return[Ve(We),Ct(We)]},dt=>({zIndexPopup:dt.zIndexPopupBase+50}))},64165:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return ve}});var ge=pe(92310),Oe=pe.n(ge),Ke=pe(59301),ut=pe(36355),Ge=pe(9763),Xe=pe(64993),Ne=pe(88088),Ct=()=>{const[,be]=(0,Ne.Z)(),Be=new Xe.C(be.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return Ke.createElement("svg",{style:Be,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},Ke.createElement("g",{fill:"none",fillRule:"evenodd"},Ke.createElement("g",{transform:"translate(24 31.67)"},Ke.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),Ke.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"}),Ke.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)"}),Ke.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"}),Ke.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"})),Ke.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"}),Ke.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},Ke.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),Ke.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},Lt=()=>{const[,be]=(0,Ne.Z)(),{colorFill:ke,colorFillTertiary:Be,colorFillQuaternary:He,colorBgContainer:We}=be,{borderColor:rt,shadowColor:Qe,contentColor:Pt}=(0,Ke.useMemo)(()=>({borderColor:new Xe.C(ke).onBackground(We).toHexShortString(),shadowColor:new Xe.C(Be).onBackground(We).toHexShortString(),contentColor:new Xe.C(He).onBackground(We).toHexShortString()}),[ke,Be,He,We]);return Ke.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},Ke.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},Ke.createElement("ellipse",{fill:Qe,cx:"32",cy:"33",rx:"32",ry:"7"}),Ke.createElement("g",{fillRule:"nonzero",stroke:rt},Ke.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"}),Ke.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:Pt}))))},dt=pe(83116),Rt=pe(37613);const De=be=>{const{componentCls:ke,margin:Be,marginXS:He,marginXL:We,fontSize:rt,lineHeight:Qe}=be;return{[ke]:{marginInline:He,fontSize:rt,lineHeight:Qe,textAlign:"center",[`${ke}-image`]:{height:be.emptyImgHeight,marginBottom:He,opacity:be.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${ke}-description`]:{color:be.colorText},[`${ke}-footer`]:{marginTop:Be},"&-normal":{marginBlock:We,color:be.colorTextDisabled,[`${ke}-description`]:{color:be.colorTextDisabled},[`${ke}-image`]:{height:be.emptyImgHeightMD}},"&-small":{marginBlock:He,color:be.colorTextDisabled,[`${ke}-image`]:{height:be.emptyImgHeightSM}}}}};var ne=(0,dt.Z)("Empty",be=>{const{componentCls:ke,controlHeightLG:Be}=be,He=(0,Rt.TS)(be,{emptyImgCls:`${ke}-img`,emptyImgHeight:Be*2.5,emptyImgHeightMD:Be,emptyImgHeightSM:Be*.875});return[De(He)]}),ee=function(be,ke){var Be={};for(var He in be)Object.prototype.hasOwnProperty.call(be,He)&&ke.indexOf(He)<0&&(Be[He]=be[He]);if(be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var We=0,He=Object.getOwnPropertySymbols(be);We<He.length;We++)ke.indexOf(He[We])<0&&Object.prototype.propertyIsEnumerable.call(be,He[We])&&(Be[He[We]]=be[He[We]]);return Be};const ce=Ke.createElement(Ct,null),se=Ke.createElement(Lt,null),he=be=>{var{className:ke,rootClassName:Be,prefixCls:He,image:We=ce,description:rt,children:Qe,imageStyle:Pt,style:Ze}=be,Et=ee(be,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:it,direction:Dt,empty:ht}=Ke.useContext(ut.E_),Ht=it("empty",He),[_t,Vt]=ne(Ht),[ot]=(0,Ge.Z)("Empty"),Ue=typeof rt!="undefined"?rt:ot==null?void 0:ot.description,Wt=typeof Ue=="string"?Ue:"empty";let Ln=null;return typeof We=="string"?Ln=Ke.createElement("img",{alt:Wt,src:We}):Ln=We,_t(Ke.createElement("div",Object.assign({className:Oe()(Vt,Ht,ht==null?void 0:ht.className,{[`${Ht}-normal`]:We===se,[`${Ht}-rtl`]:Dt==="rtl"},ke,Be),style:Object.assign(Object.assign({},ht==null?void 0:ht.style),Ze)},Et),Ke.createElement("div",{className:`${Ht}-image`,style:Pt},Ln),Ue&&Ke.createElement("div",{className:`${Ht}-description`},Ue),Qe&&Ke.createElement("div",{className:`${Ht}-footer`},Qe)))};he.PRESENTED_IMAGE_DEFAULT=ce,he.PRESENTED_IMAGE_SIMPLE=se;var ve=he},78241:function(Vn,xn,pe){"use strict";pe.d(xn,{default:function(){return $t}});var ge=pe(19127),Oe=pe(92310),Ke=pe.n(Oe),ut=pe(77900),Ge=pe(59301),Xe=pe(62892),Ne=pe(32441);function Tt(Je){const[qt,vn]=Ge.useState(Je);return Ge.useEffect(()=>{const Ft=setTimeout(()=>{vn(Je)},Je.length?0:10);return()=>{clearTimeout(Ft)}},[Je]),qt}var Ct=pe(17313),Ve=pe(29878),Lt=pe(8378),dt=pe(37613),Rt=pe(83116),ne=Je=>{const{componentCls:qt}=Je,vn=`${qt}-show-help`,Ft=`${qt}-show-help-item`;return{[vn]:{transition:`opacity ${Je.motionDurationSlow} ${Je.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[Ft]:{overflow:"hidden",transition:`height ${Je.motionDurationSlow} ${Je.motionEaseInOut},
|
|
|
opacity ${Je.motionDurationSlow} ${Je.motionEaseInOut},
|
|
|
transform ${Je.motionDurationSlow} ${Je.motionEaseInOut} !important`,[`&${Ft}-appear, &${Ft}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${Ft}-leave-active`]:{transform:"translateY(-5px)"}}}}};const ee=Je=>({legend:{display:"block",width:"100%",marginBottom:Je.marginLG,padding:0,color:Je.colorTextDescription,fontSize:Je.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${Je.lineWidth}px ${Je.lineType} ${Je.colorBorder}`},label:{fontSize:Je.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 ${Je.controlOutlineWidth}px ${Je.controlOutline}`},output:{display:"block",paddingTop:15,color:Je.colorText,fontSize:Je.fontSize,lineHeight:Je.lineHeight}}),ce=(Je,qt)=>{const{formItemCls:vn}=Je;return{[vn]:{[`${vn}-label > label`]:{height:qt},[`${vn}-control-input`]:{minHeight:qt}}}},se=Je=>{const{componentCls:qt}=Je;return{[Je.componentCls]:Object.assign(Object.assign(Object.assign({},(0,Ct.Wf)(Je)),ee(Je)),{[`${qt}-text`]:{display:"inline-block",paddingInlineEnd:Je.paddingSM},"&-small":Object.assign({},ce(Je,Je.controlHeightSM)),"&-large":Object.assign({},ce(Je,Je.controlHeightLG))})}},he=Je=>{const{formItemCls:qt,iconCls:vn,componentCls:Ft,rootPrefixCls:st,labelRequiredMarkColor:on,labelColor:En,labelFontSize:Dn,labelHeight:Jn,labelColonMarginInlineStart:St,labelColonMarginInlineEnd:Nn,itemMarginBottom:qn}=Je;return{[qt]:Object.assign(Object.assign({},(0,Ct.Wf)(Je)),{marginBottom:qn,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${st}-row`]:{display:"none"},"&-has-warning":{[`${qt}-split`]:{color:Je.colorError}},"&-has-error":{[`${qt}-split`]:{color:Je.colorWarning}},[`${qt}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${Je.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:Jn,color:En,fontSize:Dn,[`> ${vn}`]:{fontSize:Je.fontSize,verticalAlign:"top"},[`&${qt}-required:not(${qt}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:Je.marginXXS,color:on,fontSize:Je.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${Ft}-hide-required-mark &`]:{display:"none"}},[`${qt}-optional`]:{display:"inline-block",marginInlineStart:Je.marginXXS,color:Je.colorTextDescription,[`${Ft}-hide-required-mark &`]:{display:"none"}},[`${qt}-tooltip`]:{color:Je.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:Je.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:St,marginInlineEnd:Nn},[`&${qt}-no-colon::after`]:{content:'"\\a0"'}}},[`${qt}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${st}-col-'"]):not([class*="' ${st}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:Je.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[qt]:{"&-explain, &-extra":{clear:"both",color:Je.colorTextDescription,fontSize:Je.fontSize,lineHeight:Je.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:Je.controlHeightSM,transition:`color ${Je.motionDurationMid} ${Je.motionEaseOut}`},"&-explain":{"&-error":{color:Je.colorError},"&-warning":{color:Je.colorWarning}}},[`&-with-help ${qt}-explain`]:{height:"auto",opacity:1},[`${qt}-feedback-icon`]:{fontSize:Je.fontSize,textAlign:"center",visibility:"visible",animationName:Ve.kr,animationDuration:Je.motionDurationMid,animationTimingFunction:Je.motionEaseOutBack,pointerEvents:"none","&-success":{color:Je.colorSuccess},"&-error":{color:Je.colorError},"&-warning":{color:Je.colorWarning},"&-validating":{color:Je.colorPrimary}}})}},ve=Je=>{const{componentCls:qt,formItemCls:vn}=Je;return{[`${qt}-horizontal`]:{[`${vn}-label`]:{flexGrow:0},[`${vn}-control`]:{flex:"1 1 0",minWidth:0},[`${vn}-label[class$='-24'], ${vn}-label[class*='-24 ']`]:{[`& + ${vn}-control`]:{minWidth:"unset"}}}}},be=Je=>{const{componentCls:qt,formItemCls:vn}=Je;return{[`${qt}-inline`]:{display:"flex",flexWrap:"wrap",[vn]:{flex:"none",marginInlineEnd:Je.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${vn}-label,
|
|
|
> ${vn}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${vn}-label`]:{flex:"none"},[`${qt}-text`]:{display:"inline-block"},[`${vn}-has-feedback`]:{display:"inline-block"}}}}},ke=Je=>({padding:Je.verticalLabelPadding,margin:Je.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),Be=Je=>{const{componentCls:qt,formItemCls:vn,rootPrefixCls:Ft}=Je;return{[`${vn} ${vn}-label`]:ke(Je),[qt]:{[vn]:{flexWrap:"wrap",[`${vn}-label, ${vn}-control`]:{[`&:not([class*=" ${Ft}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},He=Je=>{const{componentCls:qt,formItemCls:vn,rootPrefixCls:Ft}=Je;return{[`${qt}-vertical`]:{[vn]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${qt}-item-control`]:{width:"100%"}}},[`${qt}-vertical ${vn}-label,
|
|
|
.${Ft}-col-24${vn}-label,
|
|
|
.${Ft}-col-xl-24${vn}-label`]:ke(Je),[`@media (max-width: ${Je.screenXSMax}px)`]:[Be(Je),{[qt]:{[`.${Ft}-col-xs-24${vn}-label`]:ke(Je)}}],[`@media (max-width: ${Je.screenSMMax}px)`]:{[qt]:{[`.${Ft}-col-sm-24${vn}-label`]:ke(Je)}},[`@media (max-width: ${Je.screenMDMax}px)`]:{[qt]:{[`.${Ft}-col-md-24${vn}-label`]:ke(Je)}},[`@media (max-width: ${Je.screenLGMax}px)`]:{[qt]:{[`.${Ft}-col-lg-24${vn}-label`]:ke(Je)}}}},We=(Je,qt)=>(0,dt.TS)(Je,{formItemCls:`${Je.componentCls}-item`,rootPrefixCls:qt});var rt=(0,Rt.Z)("Form",(Je,qt)=>{let{rootPrefixCls:vn}=qt;const Ft=We(Je,vn);return[se(Ft),he(Ft),ne(Ft),ve(Ft),be(Ft),He(Ft),(0,Lt.Z)(Ft),Ve.kr]},Je=>({labelRequiredMarkColor:Je.colorError,labelColor:Je.colorTextHeading,labelFontSize:Je.fontSize,labelHeight:Je.controlHeight,labelColonMarginInlineStart:Je.marginXXS/2,labelColonMarginInlineEnd:Je.marginXS,itemMarginBottom:Je.marginLG,verticalLabelPadding:`0 0 ${Je.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const Qe=[];function Pt(Je,qt,vn){let Ft=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof Je=="string"?Je:`${qt}-${Ft}`,error:Je,errorStatus:vn}}var Et=Je=>{let{help:qt,helpStatus:vn,errors:Ft=Qe,warnings:st=Qe,className:on,fieldId:En,onVisibleChanged:Dn}=Je;const{prefixCls:Jn}=Ge.useContext(Ne.Rk),St=`${Jn}-item-explain`,[,Nn]=rt(Jn),qn=(0,Ge.useMemo)(()=>(0,Xe.Z)(Jn),[Jn]),Si=Tt(Ft),en=Tt(st),Cn=Ge.useMemo(()=>qt!=null?[Pt(qt,"help",vn)]:[].concat((0,ge.Z)(Si.map((yn,pn)=>Pt(yn,"error","error",pn))),(0,ge.Z)(en.map((yn,pn)=>Pt(yn,"warning","warning",pn)))),[qt,vn,Si,en]),At={};return En&&(At.id=`${En}_help`),Ge.createElement(ut.default,{motionDeadline:qn.motionDeadline,motionName:`${Jn}-show-help`,visible:!!Cn.length,onVisibleChanged:Dn},yn=>{const{className:pn,style:mn}=yn;return Ge.createElement("div",Object.assign({},At,{className:Ke()(St,pn,on,Nn),style:mn,role:"alert"}),Ge.createElement(ut.CSSMotionList,Object.assign({keys:Cn},(0,Xe.Z)(Jn),{motionName:`${Jn}-show-help-item`,component:!1}),Wn=>{const{key:Hn,error:Qn,errorStatus:ii,className:ji,style:cn}=Wn;return Ge.createElement("div",{key:Hn,className:Ke()(ji,{[`${St}-${ii}`]:ii}),style:cn},Qn)}))})},it=pe(95013),Dt=pe(36355),ht=pe(1684),Ht=pe(52946),_t=pe(19716),Vt=pe(16722);const ot=["parentNode"],Ue="form_item";function Wt(Je){return Je===void 0||Je===!1?[]:Array.isArray(Je)?Je:[Je]}function Ln(Je,qt){if(!Je.length)return;const vn=Je.join("_");return qt?`${qt}_${vn}`:ot.includes(vn)?`${Ue}_${vn}`:vn}function Fn(Je,qt,vn,Ft,st,on){let En=Ft;return on!==void 0?En=on:vn.validating?En="validating":Je.length?En="error":qt.length?En="warning":(vn.touched||st&&vn.validated)&&(En="success"),En}function Gt(Je){return Wt(Je).join("_")}function rn(Je){const[qt]=(0,it.useForm)(),vn=Ge.useRef({}),Ft=Ge.useMemo(()=>Je!=null?Je:Object.assign(Object.assign({},qt),{__INTERNAL__:{itemRef:st=>on=>{const En=Gt(st);on?vn.current[En]=on:delete vn.current[En]}},scrollToField:function(st){let on=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const En=Wt(st),Dn=Ln(En,Ft.__INTERNAL__.name),Jn=Dn?document.getElementById(Dn):null;Jn&&(0,Vt.Z)(Jn,Object.assign({scrollMode:"if-needed",block:"nearest"},on))},getFieldInstance:st=>{const on=Gt(st);return vn.current[on]}}),[Je,qt]);return[Ft]}var An=pe(28726),ni=function(Je,qt){var vn={};for(var Ft in Je)Object.prototype.hasOwnProperty.call(Je,Ft)&&qt.indexOf(Ft)<0&&(vn[Ft]=Je[Ft]);if(Je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var st=0,Ft=Object.getOwnPropertySymbols(Je);st<Ft.length;st++)qt.indexOf(Ft[st])<0&&Object.prototype.propertyIsEnumerable.call(Je,Ft[st])&&(vn[Ft[st]]=Je[Ft[st]]);return vn};const Sn=(Je,qt)=>{const vn=Ge.useContext(ht.Z),{getPrefixCls:Ft,direction:st,form:on}=Ge.useContext(Dt.E_),{prefixCls:En,className:Dn,rootClassName:Jn,size:St,disabled:Nn=vn,form:qn,colon:Si,labelAlign:en,labelWrap:Cn,labelCol:At,wrapperCol:yn,hideRequiredMark:pn,layout:mn="horizontal",scrollToFirstError:Wn,requiredMark:Hn,onFinishFailed:Qn,name:ii,style:ji,feedbackIcons:cn}=Je,Yi=ni(Je,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),$i=(0,_t.Z)(St),Wi=Ge.useContext(An.Z),ln=(0,Ge.useMemo)(()=>Hn!==void 0?Hn:on&&on.requiredMark!==void 0?on.requiredMark:!pn,[pn,Hn,on]),oi=Si!=null?Si:on==null?void 0:on.colon,Bi=Ft("form",En),[Gi,Ti]=rt(Bi),Qi=Ke()(Bi,`${Bi}-${mn}`,{[`${Bi}-hide-required-mark`]:ln===!1,[`${Bi}-rtl`]:st==="rtl",[`${Bi}-${$i}`]:$i},Ti,on==null?void 0:on.className,Dn,Jn),[gr]=rn(qn),{__INTERNAL__:hr}=gr;hr.name=ii;const Ki=(0,Ge.useMemo)(()=>({name:ii,labelAlign:en,labelCol:At,labelWrap:Cn,wrapperCol:yn,vertical:mn==="vertical",colon:oi,requiredMark:ln,itemRef:hr.itemRef,form:gr,feedbackIcons:cn}),[ii,en,At,yn,mn,oi,ln,gr,cn]);Ge.useImperativeHandle(qt,()=>gr);const Sr=(Br,_n)=>{if(Br){let Or={block:"nearest"};typeof Br=="object"&&(Or=Br),gr.scrollToField(_n,Or)}},kn=Br=>{if(Qn==null||Qn(Br),Br.errorFields.length){const _n=Br.errorFields[0].name;if(Wn!==void 0){Sr(Wn,_n);return}on&&on.scrollToFirstError!==void 0&&Sr(on.scrollToFirstError,_n)}};return Gi(Ge.createElement(ht.n,{disabled:Nn},Ge.createElement(Ht.q,{size:$i},Ge.createElement(Ne.RV,Object.assign({},{validateMessages:Wi}),Ge.createElement(Ne.q3.Provider,{value:Ki},Ge.createElement(it.default,Object.assign({id:ii},Yi,{name:ii,onFinishFailed:kn,form:gr,style:Object.assign(Object.assign({},on==null?void 0:on.style),ji),className:Qi})))))))};var It=Ge.forwardRef(Sn),wn=pe(41799),Gn=pe(8654),ze=pe(92343),Ee=pe(11592);function Pe(Je){if(typeof Je=="function")return Je;const qt=(0,Ee.Z)(Je);return qt.length<=1?qt[0]:qt}const Fe=()=>{const{status:Je,errors:qt=[],warnings:vn=[]}=(0,Ge.useContext)(Ne.aM);return{status:Je,errors:qt,warnings:vn}};Fe.Context=Ne.aM;var Ae=Fe,ye=pe(16089);function qe(Je){const[qt,vn]=Ge.useState(Je),Ft=(0,Ge.useRef)(null),st=(0,Ge.useRef)([]),on=(0,Ge.useRef)(!1);Ge.useEffect(()=>(on.current=!1,()=>{on.current=!0,ye.Z.cancel(Ft.current),Ft.current=null}),[]);function En(Dn){on.current||(Ft.current===null&&(st.current=[],Ft.current=(0,ye.Z)(()=>{Ft.current=null,vn(Jn=>{let St=Jn;return st.current.forEach(Nn=>{St=Nn(St)}),St})})),st.current.push(Dn))}return[qt,En]}function vt(){const{itemRef:Je}=Ge.useContext(Ne.q3),qt=Ge.useRef({});function vn(Ft,st){const on=st&&typeof st=="object"&&st.ref,En=Ft.join("_");return(qt.current.name!==En||qt.current.originRef!==on)&&(qt.current.name=En,qt.current.originRef=on,qt.current.ref=(0,Gn.sQ)(Je(Ft),on)),qt.current.ref}return vn}var et=pe(29194),Ye=pe(34280),xt=pe(2738),yt=pe(27382),at=pe(37028);const zt=Je=>{const{formItemCls:qt}=Je;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${qt}-control`]:{display:"flex"}}}};var un=(0,Rt.b)(["Form","item-item"],(Je,qt)=>{let{rootPrefixCls:vn}=qt;const Ft=We(Je,vn);return[zt(Ft)]}),Qt=Je=>{const{prefixCls:qt,status:vn,wrapperCol:Ft,children:st,errors:on,warnings:En,_internalItemRender:Dn,extra:Jn,help:St,fieldId:Nn,marginBottom:qn,onErrorVisibleChanged:Si}=Je,en=`${qt}-item`,Cn=Ge.useContext(Ne.q3),At=Ft||Cn.wrapperCol||{},yn=Ke()(`${en}-control`,At.className),pn=Ge.useMemo(()=>Object.assign({},Cn),[Cn]);delete pn.labelCol,delete pn.wrapperCol;const mn=Ge.createElement("div",{className:`${en}-control-input`},Ge.createElement("div",{className:`${en}-control-input-content`},st)),Wn=Ge.useMemo(()=>({prefixCls:qt,status:vn}),[qt,vn]),Hn=qn!==null||on.length||En.length?Ge.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},Ge.createElement(Ne.Rk.Provider,{value:Wn},Ge.createElement(Et,{fieldId:Nn,errors:on,warnings:En,help:St,helpStatus:vn,className:`${en}-explain-connected`,onVisibleChanged:Si})),!!qn&&Ge.createElement("div",{style:{width:0,height:qn}})):null,Qn={};Nn&&(Qn.id=`${Nn}_extra`);const ii=Jn?Ge.createElement("div",Object.assign({},Qn,{className:`${en}-extra`}),Jn):null,ji=Dn&&Dn.mark==="pro_table_render"&&Dn.render?Dn.render(Je,{input:mn,errorList:Hn,extra:ii}):Ge.createElement(Ge.Fragment,null,mn,Hn,ii);return Ge.createElement(Ne.q3.Provider,{value:pn},Ge.createElement(at.Z,Object.assign({},At,{className:yn}),ji),Ge.createElement(un,{prefixCls:qt}))},Kn=pe(61485),On=pe(31724),jt=pe(9763),sn=pe(6848),jn=function(Je,qt){var vn={};for(var Ft in Je)Object.prototype.hasOwnProperty.call(Je,Ft)&&qt.indexOf(Ft)<0&&(vn[Ft]=Je[Ft]);if(Je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var st=0,Ft=Object.getOwnPropertySymbols(Je);st<Ft.length;st++)qt.indexOf(Ft[st])<0&&Object.prototype.propertyIsEnumerable.call(Je,Ft[st])&&(vn[Ft[st]]=Je[Ft[st]]);return vn};function dn(Je){return Je?typeof Je=="object"&&!Ge.isValidElement(Je)?Je:{title:Je}:null}var ui=Je=>{let{prefixCls:qt,label:vn,htmlFor:Ft,labelCol:st,labelAlign:on,colon:En,required:Dn,requiredMark:Jn,tooltip:St}=Je;var Nn;const[qn]=(0,jt.Z)("Form"),{vertical:Si,labelAlign:en,labelCol:Cn,labelWrap:At,colon:yn}=Ge.useContext(Ne.q3);if(!vn)return null;const pn=st||Cn||{},mn=on||en,Wn=`${qt}-item-label`,Hn=Ke()(Wn,mn==="left"&&`${Wn}-left`,pn.className,{[`${Wn}-wrap`]:!!At});let Qn=vn;const ii=En===!0||yn!==!1&&En!==!1;ii&&!Si&&typeof vn=="string"&&vn.trim()!==""&&(Qn=vn.replace(/[:|:]\s*$/,""));const cn=dn(St);if(cn){const{icon:ln=Ge.createElement(Kn.Z,null)}=cn,oi=jn(cn,["icon"]),Bi=Ge.createElement(sn.Z,Object.assign({},oi),Ge.cloneElement(ln,{className:`${qt}-item-tooltip`,title:""}));Qn=Ge.createElement(Ge.Fragment,null,Qn,Bi)}const Yi=Jn==="optional",$i=typeof Jn=="function";$i?Qn=Jn(Qn,{required:!!Dn}):Yi&&!Dn&&(Qn=Ge.createElement(Ge.Fragment,null,Qn,Ge.createElement("span",{className:`${qt}-item-optional`,title:""},(qn==null?void 0:qn.optional)||((Nn=On.Z.Form)===null||Nn===void 0?void 0:Nn.optional))));const Wi=Ke()({[`${qt}-item-required`]:Dn,[`${qt}-item-required-mark-optional`]:Yi||$i,[`${qt}-item-no-colon`]:!ii});return Ge.createElement(at.Z,Object.assign({},pn,{className:Hn}),Ge.createElement("label",{htmlFor:Ft,className:Wi,title:typeof vn=="string"?vn:""},Qn))},pi=pe(29679),gi=pe(19248),bi=pe(96512),Xi=pe(58617);const ar={success:pi.Z,warning:bi.Z,error:gi.Z,validating:Xi.Z};function Ji(Je){let{children:qt,errors:vn,warnings:Ft,hasFeedback:st,validateStatus:on,prefixCls:En,meta:Dn,noStyle:Jn}=Je;const St=`${En}-item`,{feedbackIcons:Nn}=Ge.useContext(Ne.q3),qn=Fn(vn,Ft,Dn,null,!!st,on),{isFormItemInput:Si,status:en}=Ge.useContext(Ne.aM),Cn=Ge.useMemo(()=>{var At;let yn;if(st){const Wn=st!==!0&&st.icons||Nn,Hn=qn&&((At=Wn==null?void 0:Wn({status:qn,errors:vn,warnings:Ft}))===null||At===void 0?void 0:At[qn]),Qn=qn&&ar[qn];yn=Hn!==!1&&Qn?Ge.createElement("span",{className:Ke()(`${St}-feedback-icon`,`${St}-feedback-icon-${qn}`)},Hn||Ge.createElement(Qn,null)):null}let pn=!0,mn=qn||"";return Jn&&(pn=Si,mn=(qn!=null?qn:en)||""),{status:mn,errors:vn,warnings:Ft,hasFeedback:!!st,feedbackIcon:yn,isFormItemInput:pn}},[qn,st,Jn,Si,en]);return Ge.createElement(Ne.aM.Provider,{value:Cn},qt)}var wr=function(Je,qt){var vn={};for(var Ft in Je)Object.prototype.hasOwnProperty.call(Je,Ft)&&qt.indexOf(Ft)<0&&(vn[Ft]=Je[Ft]);if(Je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var st=0,Ft=Object.getOwnPropertySymbols(Je);st<Ft.length;st++)qt.indexOf(Ft[st])<0&&Object.prototype.propertyIsEnumerable.call(Je,Ft[st])&&(vn[Ft[st]]=Je[Ft[st]]);return vn};function mr(Je){const{prefixCls:qt,className:vn,rootClassName:Ft,style:st,help:on,errors:En,warnings:Dn,validateStatus:Jn,meta:St,hasFeedback:Nn,hidden:qn,children:Si,fieldId:en,required:Cn,isRequired:At,onSubItemMetaChange:yn}=Je,pn=wr(Je,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),mn=`${qt}-item`,{requiredMark:Wn}=Ge.useContext(Ne.q3),Hn=Ge.useRef(null),Qn=Tt(En),ii=Tt(Dn),ji=on!=null,cn=!!(ji||En.length||Dn.length),Yi=!!Hn.current&&(0,et.Z)(Hn.current),[$i,Wi]=Ge.useState(null);(0,Ye.Z)(()=>{if(cn&&Hn.current){const Ti=getComputedStyle(Hn.current);Wi(parseInt(Ti.marginBottom,10))}},[cn,Yi]);const ln=Ti=>{Ti||Wi(null)},Bi=function(){let Ti=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Qi=Ti?Qn:St.errors,gr=Ti?ii:St.warnings;return Fn(Qi,gr,St,"",!!Nn,Jn)}(),Gi=Ke()(mn,vn,Ft,{[`${mn}-with-help`]:ji||Qn.length||ii.length,[`${mn}-has-feedback`]:Bi&&Nn,[`${mn}-has-success`]:Bi==="success",[`${mn}-has-warning`]:Bi==="warning",[`${mn}-has-error`]:Bi==="error",[`${mn}-is-validating`]:Bi==="validating",[`${mn}-hidden`]:qn});return Ge.createElement("div",{className:Gi,style:st,ref:Hn},Ge.createElement(yt.Z,Object.assign({className:`${mn}-row`},(0,xt.Z)(pn,["_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"])),Ge.createElement(ui,Object.assign({htmlFor:en},Je,{requiredMark:Wn,required:Cn!=null?Cn:At,prefixCls:qt})),Ge.createElement(Qt,Object.assign({},Je,St,{errors:Qn,warnings:ii,prefixCls:qt,status:Bi,help:on,marginBottom:$i,onErrorVisibleChanged:ln}),Ge.createElement(Ne.qI.Provider,{value:yn},Ge.createElement(Ji,{prefixCls:qt,meta:St,errors:St.errors,warnings:St.warnings,hasFeedback:Nn,validateStatus:Bi},Si)))),!!$i&&Ge.createElement("div",{className:`${mn}-margin-offset`,style:{marginBottom:-$i}}))}const Hi="__SPLIT__",Er=null,$n=Ge.memo(Je=>{let{children:qt}=Je;return qt},(Je,qt)=>Je.value===qt.value&&Je.update===qt.update&&Je.childProps.length===qt.childProps.length&&Je.childProps.every((vn,Ft)=>vn===qt.childProps[Ft]));function Le(Je){return Je!=null}function Ei(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Ri(Je){const{name:qt,noStyle:vn,className:Ft,dependencies:st,prefixCls:on,shouldUpdate:En,rules:Dn,children:Jn,required:St,label:Nn,messageVariables:qn,trigger:Si="onChange",validateTrigger:en,hidden:Cn,help:At}=Je,{getPrefixCls:yn}=Ge.useContext(Dt.E_),{name:pn}=Ge.useContext(Ne.q3),mn=Pe(Jn),Wn=typeof mn=="function",Hn=Ge.useContext(Ne.qI),{validateTrigger:Qn}=Ge.useContext(it.FieldContext),ii=en!==void 0?en:Qn,ji=Le(qt),cn=yn("form",on),[Yi,$i]=rt(cn),Wi=Ge.useContext(it.ListContext),ln=Ge.useRef(),[oi,Bi]=qe({}),[Gi,Ti]=(0,wn.Z)(()=>Ei()),Qi=_n=>{const Or=Wi==null?void 0:Wi.getKey(_n.name);if(Ti(_n.destroy?Ei():_n,!0),vn&&At!==!1&&Hn){let no=_n.name;if(_n.destroy)no=ln.current||no;else if(Or!==void 0){const[br,mo]=Or;no=[br].concat((0,ge.Z)(mo)),ln.current=no}Hn(_n,no)}},gr=(_n,Or)=>{Bi(no=>{const br=Object.assign({},no),Jr=[].concat((0,ge.Z)(_n.name.slice(0,-1)),(0,ge.Z)(Or)).join(Hi);return _n.destroy?delete br[Jr]:br[Jr]=_n,br})},[hr,Ki]=Ge.useMemo(()=>{const _n=(0,ge.Z)(Gi.errors),Or=(0,ge.Z)(Gi.warnings);return Object.values(oi).forEach(no=>{_n.push.apply(_n,(0,ge.Z)(no.errors||[])),Or.push.apply(Or,(0,ge.Z)(no.warnings||[]))}),[_n,Or]},[oi,Gi.errors,Gi.warnings]),Sr=vt();function kn(_n,Or,no){return vn&&!Cn?Ge.createElement(Ji,{prefixCls:cn,hasFeedback:Je.hasFeedback,validateStatus:Je.validateStatus,meta:Gi,errors:hr,warnings:Ki,noStyle:!0},_n):Ge.createElement(mr,Object.assign({key:"row"},Je,{className:Ke()(Ft,$i),prefixCls:cn,fieldId:Or,isRequired:no,errors:hr,warnings:Ki,meta:Gi,onSubItemMetaChange:gr}),_n)}if(!ji&&!Wn&&!st)return Yi(kn(mn));let Br={};return typeof Nn=="string"?Br.label=Nn:qt&&(Br.label=String(qt)),qn&&(Br=Object.assign(Object.assign({},Br),qn)),Yi(Ge.createElement(it.Field,Object.assign({},Je,{messageVariables:Br,trigger:Si,validateTrigger:ii,onMetaChange:Qi}),(_n,Or,no)=>{const br=Wt(qt).length&&Or?Or.name:[],mo=Ln(br,pn),Jr=St!==void 0?St:!!(Dn&&Dn.some(qi=>{if(qi&&typeof qi=="object"&&qi.required&&!qi.warningOnly)return!0;if(typeof qi=="function"){const Rr=qi(no);return Rr&&Rr.required&&!Rr.warningOnly}return!1})),ur=Object.assign({},_n);let er=null;if(Array.isArray(mn)&&ji)er=mn;else if(!(Wn&&(!(En||st)||ji))){if(!(st&&!Wn&&!ji))if((0,ze.l$)(mn)){const qi=Object.assign(Object.assign({},mn.props),ur);if(qi.id||(qi.id=mo),At||hr.length>0||Ki.length>0||Je.extra){const tt=[];(At||hr.length>0)&&tt.push(`${mo}_help`),Je.extra&&tt.push(`${mo}_extra`),qi["aria-describedby"]=tt.join(" ")}hr.length>0&&(qi["aria-invalid"]="true"),Jr&&(qi["aria-required"]="true"),(0,Gn.Yr)(mn)&&(qi.ref=Sr(br,mn)),new Set([].concat((0,ge.Z)(Wt(Si)),(0,ge.Z)(Wt(ii)))).forEach(tt=>{qi[tt]=function(){for(var Qr,lo,jr,vo,po,Lr=arguments.length,Fr=new Array(Lr),uo=0;uo<Lr;uo++)Fr[uo]=arguments[uo];(jr=ur[tt])===null||jr===void 0||(Qr=jr).call.apply(Qr,[ur].concat(Fr)),(po=(vo=mn.props)[tt])===null||po===void 0||(lo=po).call.apply(lo,[vo].concat(Fr))}});const Ii=[qi["aria-required"],qi["aria-invalid"],qi["aria-describedby"]];er=Ge.createElement($n,{value:ur[Je.valuePropName||"value"],update:mn,childProps:Ii},(0,ze.Tm)(mn,qi))}else Wn&&(En||st)&&!ji?er=mn(no):er=mn}return kn(er,mo,Jr)}))}const nn=Ri;nn.useStatus=Ae;var di=nn,yi=function(Je,qt){var vn={};for(var Ft in Je)Object.prototype.hasOwnProperty.call(Je,Ft)&&qt.indexOf(Ft)<0&&(vn[Ft]=Je[Ft]);if(Je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var st=0,Ft=Object.getOwnPropertySymbols(Je);st<Ft.length;st++)qt.indexOf(Ft[st])<0&&Object.prototype.propertyIsEnumerable.call(Je,Ft[st])&&(vn[Ft[st]]=Je[Ft[st]]);return vn},Tn=Je=>{var{prefixCls:qt,children:vn}=Je,Ft=yi(Je,["prefixCls","children"]);const{getPrefixCls:st}=Ge.useContext(Dt.E_),on=st("form",qt),En=Ge.useMemo(()=>({prefixCls:on,status:"error"}),[on]);return Ge.createElement(it.List,Object.assign({},Ft),(Dn,Jn,St)=>Ge.createElement(Ne.Rk.Provider,{value:En},vn(Dn.map(Nn=>Object.assign(Object.assign({},Nn),{fieldKey:Nn.key})),Jn,{errors:St.errors,warnings:St.warnings})))};function Un(){const{form:Je}=(0,Ge.useContext)(Ne.q3);return Je}const kt=It;kt.Item=di,kt.List=Tn,kt.ErrorList=Et,kt.useForm=rn,kt.useFormInstance=Un,kt.useWatch=it.useWatch,kt.Provider=Ne.RV,kt.create=()=>{};var $t=kt},8628:function(Vn,xn,pe){"use strict";var ge=pe(59301),Oe=pe(34280),Ke=pe(56762),ut=pe(69507);function Ge(){let Xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const Ne=(0,ge.useRef)({}),Tt=(0,Ke.Z)(),Ct=(0,ut.ZP)();return(0,Oe.Z)(()=>{const Ve=Ct.subscribe(Lt=>{Ne.current=Lt,Xe&&Tt()});return()=>Ct.unsubscribe(Ve)},[]),Ne.current}xn.Z=Ge},9432:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return he},n:function(){return ce}});var ge=pe(19248),Oe=pe(92310),Ke=pe.n(Oe),ut=pe(93681),Ge=pe(8654),Xe=pe(59301),Ne=pe(19080),Tt=pe(36355),Ct=pe(1684),Ve=pe(19716),Lt=pe(32441),dt=pe(33234),Rt=pe(59412),De=pe(9937);function ne(ve){return!!(ve.prefix||ve.suffix||ve.allowClear)}var ee=function(ve,be){var ke={};for(var Be in ve)Object.prototype.hasOwnProperty.call(ve,Be)&&be.indexOf(Be)<0&&(ke[Be]=ve[Be]);if(ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var He=0,Be=Object.getOwnPropertySymbols(ve);He<Be.length;He++)be.indexOf(Be[He])<0&&Object.prototype.propertyIsEnumerable.call(ve,Be[He])&&(ke[Be[He]]=ve[Be[He]]);return ke};function ce(ve,be){if(!ve)return;ve.focus(be);const{cursor:ke}=be||{};if(ke){const Be=ve.value.length;switch(ke){case"start":ve.setSelectionRange(0,0);break;case"end":ve.setSelectionRange(Be,Be);break;default:ve.setSelectionRange(0,Be);break}}}var he=(0,Xe.forwardRef)((ve,be)=>{var ke;const{prefixCls:Be,bordered:He=!0,status:We,size:rt,disabled:Qe,onBlur:Pt,onFocus:Ze,suffix:Et,allowClear:it,addonAfter:Dt,addonBefore:ht,className:Ht,style:_t,styles:Vt,rootClassName:ot,onChange:Ue,classNames:Wt}=ve,Ln=ee(ve,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:Fn,direction:Gt,input:rn}=Xe.useContext(Tt.E_),An=Fn("input",Be),ni=(0,Xe.useRef)(null),[Sn,Yn]=(0,De.ZP)(An),{compactSize:It,compactItemClassnames:wn}=(0,dt.ri)(An,Gt),Gn=(0,Ve.Z)(un=>{var fn;return(fn=rt!=null?rt:It)!==null&&fn!==void 0?fn:un}),ze=Xe.useContext(Ct.Z),Ee=Qe!=null?Qe:ze,{status:Pe,hasFeedback:Fe,feedbackIcon:Ae}=(0,Xe.useContext)(Lt.aM),ye=(0,Ne.F)(Pe,We),qe=ne(ve)||!!Fe,vt=(0,Xe.useRef)(qe);(0,Xe.useEffect)(()=>{var un;qe&&vt.current,vt.current=qe},[qe]);const et=(0,Rt.Z)(ni,!0),Ye=un=>{et(),Pt==null||Pt(un)},xt=un=>{et(),Ze==null||Ze(un)},yt=un=>{et(),Ue==null||Ue(un)},at=(Fe||Et)&&Xe.createElement(Xe.Fragment,null,Et,Fe&&Ae);let zt;return typeof it=="object"&&(it!=null&&it.clearIcon)?zt=it:it&&(zt={clearIcon:Xe.createElement(ge.Z,null)}),Sn(Xe.createElement(ut.default,Object.assign({ref:(0,Ge.sQ)(be,ni),prefixCls:An,autoComplete:rn==null?void 0:rn.autoComplete},Ln,{disabled:Ee,onBlur:Ye,onFocus:xt,style:Object.assign(Object.assign({},rn==null?void 0:rn.style),_t),styles:Object.assign(Object.assign({},rn==null?void 0:rn.styles),Vt),suffix:at,allowClear:zt,className:Ke()(Ht,ot,wn,rn==null?void 0:rn.className),onChange:yt,addonAfter:Dt&&Xe.createElement(dt.BR,null,Xe.createElement(Lt.Ux,{override:!0,status:!0},Dt)),addonBefore:ht&&Xe.createElement(dt.BR,null,Xe.createElement(Lt.Ux,{override:!0,status:!0},ht)),classNames:Object.assign(Object.assign(Object.assign({},Wt),rn==null?void 0:rn.classNames),{input:Ke()({[`${An}-sm`]:Gn==="small",[`${An}-lg`]:Gn==="large",[`${An}-rtl`]:Gt==="rtl",[`${An}-borderless`]:!He},!qe&&(0,Ne.Z)(An,ye),Wt==null?void 0:Wt.input,(ke=rn==null?void 0:rn.classNames)===null||ke===void 0?void 0:ke.input,Yn)}),classes:{affixWrapper:Ke()({[`${An}-affix-wrapper-sm`]:Gn==="small",[`${An}-affix-wrapper-lg`]:Gn==="large",[`${An}-affix-wrapper-rtl`]:Gt==="rtl",[`${An}-affix-wrapper-borderless`]:!He},(0,Ne.Z)(`${An}-affix-wrapper`,ye,Fe),Yn),wrapper:Ke()({[`${An}-group-rtl`]:Gt==="rtl"},Yn),group:Ke()({[`${An}-group-wrapper-sm`]:Gn==="small",[`${An}-group-wrapper-lg`]:Gn==="large",[`${An}-group-wrapper-rtl`]:Gt==="rtl",[`${An}-group-wrapper-disabled`]:Ee},(0,Ne.Z)(`${An}-group-wrapper`,ye,Fe),Yn)}})))})},1643:function(Vn,xn,pe){"use strict";var ge=pe(19248),Oe=pe(92310),Ke=pe.n(Oe),ut=pe(9296),Ge=pe(59301),Xe=pe(19080),Ne=pe(36355),Tt=pe(1684),Ct=pe(19716),Ve=pe(32441),Lt=pe(9432),dt=pe(9937),Rt=function(ne,ee){var ce={};for(var se in ne)Object.prototype.hasOwnProperty.call(ne,se)&&ee.indexOf(se)<0&&(ce[se]=ne[se]);if(ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,se=Object.getOwnPropertySymbols(ne);he<se.length;he++)ee.indexOf(se[he])<0&&Object.prototype.propertyIsEnumerable.call(ne,se[he])&&(ce[se[he]]=ne[se[he]]);return ce};const De=(0,Ge.forwardRef)((ne,ee)=>{const{prefixCls:ce,bordered:se=!0,size:he,disabled:ve,status:be,allowClear:ke,showCount:Be,classNames:He,rootClassName:We,className:rt}=ne,Qe=Rt(ne,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:Pt,direction:Ze}=Ge.useContext(Ne.E_),Et=(0,Ct.Z)(he),it=Ge.useContext(Tt.Z),Dt=ve!=null?ve:it,{status:ht,hasFeedback:Ht,feedbackIcon:_t}=Ge.useContext(Ve.aM),Vt=(0,Xe.F)(ht,be),ot=Ge.useRef(null);Ge.useImperativeHandle(ee,()=>{var Gt;return{resizableTextArea:(Gt=ot.current)===null||Gt===void 0?void 0:Gt.resizableTextArea,focus:rn=>{var An,ni;(0,Lt.n)((ni=(An=ot.current)===null||An===void 0?void 0:An.resizableTextArea)===null||ni===void 0?void 0:ni.textArea,rn)},blur:()=>{var rn;return(rn=ot.current)===null||rn===void 0?void 0:rn.blur()}}});const Ue=Pt("input",ce);let Wt;typeof ke=="object"&&(ke!=null&&ke.clearIcon)?Wt=ke:ke&&(Wt={clearIcon:Ge.createElement(ge.Z,null)});const[Ln,Fn]=(0,dt.ZP)(Ue);return Ln(Ge.createElement(ut.default,Object.assign({},Qe,{disabled:Dt,allowClear:Wt,className:Ke()(rt,We),classes:{affixWrapper:Ke()(`${Ue}-textarea-affix-wrapper`,{[`${Ue}-affix-wrapper-rtl`]:Ze==="rtl",[`${Ue}-affix-wrapper-borderless`]:!se,[`${Ue}-affix-wrapper-sm`]:Et==="small",[`${Ue}-affix-wrapper-lg`]:Et==="large",[`${Ue}-textarea-show-count`]:Be},(0,Xe.Z)(`${Ue}-affix-wrapper`,Vt),Fn)},classNames:Object.assign(Object.assign({},He),{textarea:Ke()({[`${Ue}-borderless`]:!se,[`${Ue}-sm`]:Et==="small",[`${Ue}-lg`]:Et==="large"},(0,Xe.Z)(Ue,Vt),Fn,He==null?void 0:He.textarea)}),prefixCls:Ue,suffix:Ht&&Ge.createElement("span",{className:`${Ue}-textarea-suffix`},_t),showCount:Be,ref:ot})))});xn.Z=De},59412:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Oe}});var ge=pe(59301);function Oe(Ke,ut){const Ge=(0,ge.useRef)([]),Xe=()=>{Ge.current.push(setTimeout(()=>{var Ne,Tt,Ct,Ve;!((Ne=Ke.current)===null||Ne===void 0)&&Ne.input&&((Tt=Ke.current)===null||Tt===void 0?void 0:Tt.input.getAttribute("type"))==="password"&&(!((Ct=Ke.current)===null||Ct===void 0)&&Ct.input.hasAttribute("value"))&&((Ve=Ke.current)===null||Ve===void 0||Ve.input.removeAttribute("value"))}))};return(0,ge.useEffect)(()=>(ut&&Xe(),()=>Ge.current.forEach(Ne=>{Ne&&clearTimeout(Ne)})),[]),Xe}},92832:function(Vn,xn,pe){"use strict";pe.d(xn,{default:function(){return Et}});var ge=pe(92310),Oe=pe.n(ge),Ke=pe(59301),ut=pe(36355),Ge=pe(32441),Xe=pe(9937),Tt=it=>{const{getPrefixCls:Dt,direction:ht}=(0,Ke.useContext)(ut.E_),{prefixCls:Ht,className:_t}=it,Vt=Dt("input-group",Ht),ot=Dt("input"),[Ue,Wt]=(0,Xe.ZP)(ot),Ln=Oe()(Vt,{[`${Vt}-lg`]:it.size==="large",[`${Vt}-sm`]:it.size==="small",[`${Vt}-compact`]:it.compact,[`${Vt}-rtl`]:ht==="rtl"},Wt,_t),Fn=(0,Ke.useContext)(Ge.aM),Gt=(0,Ke.useMemo)(()=>Object.assign(Object.assign({},Fn),{isFormItemInput:!1}),[Fn]);return Ue(Ke.createElement("span",{className:Ln,style:it.style,onMouseEnter:it.onMouseEnter,onMouseLeave:it.onMouseLeave,onFocus:it.onFocus,onBlur:it.onBlur},Ke.createElement(Ge.aM.Provider,{value:Gt},it.children)))},Ct=pe(9432),Ve=pe(73331),Lt=pe(15277),dt=pe(2738),Rt=pe(8654),De=pe(59412),ne=function(it,Dt){var ht={};for(var Ht in it)Object.prototype.hasOwnProperty.call(it,Ht)&&Dt.indexOf(Ht)<0&&(ht[Ht]=it[Ht]);if(it!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _t=0,Ht=Object.getOwnPropertySymbols(it);_t<Ht.length;_t++)Dt.indexOf(Ht[_t])<0&&Object.prototype.propertyIsEnumerable.call(it,Ht[_t])&&(ht[Ht[_t]]=it[Ht[_t]]);return ht};const ee=it=>it?Ke.createElement(Lt.Z,null):Ke.createElement(Ve.Z,null),ce={click:"onClick",hover:"onMouseOver"};var he=Ke.forwardRef((it,Dt)=>{const{visibilityToggle:ht=!0}=it,Ht=typeof ht=="object"&&ht.visible!==void 0,[_t,Vt]=(0,Ke.useState)(()=>Ht?ht.visible:!1),ot=(0,Ke.useRef)(null);Ke.useEffect(()=>{Ht&&Vt(ht.visible)},[Ht,ht]);const Ue=(0,De.Z)(ot),Wt=()=>{const{disabled:Ee}=it;Ee||(_t&&Ue(),Vt(Pe=>{var Fe;const Ae=!Pe;return typeof ht=="object"&&((Fe=ht.onVisibleChange)===null||Fe===void 0||Fe.call(ht,Ae)),Ae}))},Ln=Ee=>{const{action:Pe="click",iconRender:Fe=ee}=it,Ae=ce[Pe]||"",ye=Fe(_t),qe={[Ae]:Wt,className:`${Ee}-icon`,key:"passwordIcon",onMouseDown:vt=>{vt.preventDefault()},onMouseUp:vt=>{vt.preventDefault()}};return Ke.cloneElement(Ke.isValidElement(ye)?ye:Ke.createElement("span",null,ye),qe)},{className:Fn,prefixCls:Gt,inputPrefixCls:rn,size:An}=it,ni=ne(it,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Sn}=Ke.useContext(ut.E_),Yn=Sn("input",rn),It=Sn("input-password",Gt),wn=ht&&Ln(It),Gn=Oe()(It,Fn,{[`${It}-${An}`]:!!An}),ze=Object.assign(Object.assign({},(0,dt.Z)(ni,["suffix","iconRender","visibilityToggle"])),{type:_t?"text":"password",className:Gn,prefixCls:Yn,suffix:wn});return An&&(ze.size=An),Ke.createElement(Ct.Z,Object.assign({ref:(0,Rt.sQ)(Dt,ot)},ze))}),ve=pe(47472),be=pe(92343),ke=pe(3113),Be=pe(19716),He=pe(33234),We=function(it,Dt){var ht={};for(var Ht in it)Object.prototype.hasOwnProperty.call(it,Ht)&&Dt.indexOf(Ht)<0&&(ht[Ht]=it[Ht]);if(it!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _t=0,Ht=Object.getOwnPropertySymbols(it);_t<Ht.length;_t++)Dt.indexOf(Ht[_t])<0&&Object.prototype.propertyIsEnumerable.call(it,Ht[_t])&&(ht[Ht[_t]]=it[Ht[_t]]);return ht},Qe=Ke.forwardRef((it,Dt)=>{const{prefixCls:ht,inputPrefixCls:Ht,className:_t,size:Vt,suffix:ot,enterButton:Ue=!1,addonAfter:Wt,loading:Ln,disabled:Fn,onSearch:Gt,onChange:rn,onCompositionStart:An,onCompositionEnd:ni}=it,Sn=We(it,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Yn,direction:It}=Ke.useContext(ut.E_),wn=Ke.useRef(!1),Gn=Yn("input-search",ht),ze=Yn("input",Ht),{compactSize:Ee}=(0,He.ri)(Gn,It),Pe=(0,Be.Z)(Qt=>{var Kn;return(Kn=Vt!=null?Vt:Ee)!==null&&Kn!==void 0?Kn:Qt}),Fe=Ke.useRef(null),Ae=Qt=>{Qt&&Qt.target&&Qt.type==="click"&&Gt&&Gt(Qt.target.value,Qt,{source:"clear"}),rn&&rn(Qt)},ye=Qt=>{var Kn;document.activeElement===((Kn=Fe.current)===null||Kn===void 0?void 0:Kn.input)&&Qt.preventDefault()},qe=Qt=>{var Kn,On;Gt&&Gt((On=(Kn=Fe.current)===null||Kn===void 0?void 0:Kn.input)===null||On===void 0?void 0:On.value,Qt,{source:"input"})},vt=Qt=>{wn.current||Ln||qe(Qt)},et=typeof Ue=="boolean"?Ke.createElement(ve.Z,null):null,Ye=`${Gn}-button`;let xt;const yt=Ue||{},at=yt.type&&yt.type.__ANT_BUTTON===!0;at||yt.type==="button"?xt=(0,be.Tm)(yt,Object.assign({onMouseDown:ye,onClick:Qt=>{var Kn,On;(On=(Kn=yt==null?void 0:yt.props)===null||Kn===void 0?void 0:Kn.onClick)===null||On===void 0||On.call(Kn,Qt),qe(Qt)},key:"enterButton"},at?{className:Ye,size:Pe}:{})):xt=Ke.createElement(ke.ZP,{className:Ye,type:Ue?"primary":void 0,size:Pe,disabled:Fn,key:"enterButton",onMouseDown:ye,onClick:qe,loading:Ln,icon:et},Ue),Wt&&(xt=[xt,(0,be.Tm)(Wt,{key:"addonAfter"})]);const zt=Oe()(Gn,{[`${Gn}-rtl`]:It==="rtl",[`${Gn}-${Pe}`]:!!Pe,[`${Gn}-with-button`]:!!Ue},_t),un=Qt=>{wn.current=!0,An==null||An(Qt)},fn=Qt=>{wn.current=!1,ni==null||ni(Qt)};return Ke.createElement(Ct.Z,Object.assign({ref:(0,Rt.sQ)(Fe,Dt),onPressEnter:vt},Sn,{size:Pe,onCompositionStart:un,onCompositionEnd:fn,prefixCls:ze,addonAfter:xt,suffix:ot,onChange:Ae,className:zt,disabled:Fn}))}),Pt=pe(1643);const Ze=Ct.Z;Ze.Group=Tt,Ze.Search=Qe,Ze.TextArea=Pt.Z,Ze.Password=he;var Et=Ze},45818:function(Vn,xn,pe){"use strict";pe.d(xn,{D:function(){return ve},Z:function(){return Be}});var ge=pe(96663),Oe=pe(59301),Ke={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"},ut=Ke,Ge=pe(7657),Xe=function(We,rt){return Oe.createElement(Ge.Z,(0,ge.Z)({},We,{ref:rt,icon:ut}))},Ne=Oe.forwardRef(Xe),Tt=Ne,Ct=pe(33853),Ve=pe(38819),Lt=pe(92310),dt=pe.n(Lt),Rt=pe(2738),ne=He=>!isNaN(parseFloat(He))&&isFinite(He),ee=pe(36355),ce=pe(84966),se=function(He,We){var rt={};for(var Qe in He)Object.prototype.hasOwnProperty.call(He,Qe)&&We.indexOf(Qe)<0&&(rt[Qe]=He[Qe]);if(He!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Pt=0,Qe=Object.getOwnPropertySymbols(He);Pt<Qe.length;Pt++)We.indexOf(Qe[Pt])<0&&Object.prototype.propertyIsEnumerable.call(He,Qe[Pt])&&(rt[Qe[Pt]]=He[Qe[Pt]]);return rt};const he={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},ve=Oe.createContext({}),be=(()=>{let He=0;return function(){let We=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return He+=1,`${We}${He}`}})();var Be=Oe.forwardRef((He,We)=>{const{prefixCls:rt,className:Qe,trigger:Pt,children:Ze,defaultCollapsed:Et=!1,theme:it="dark",style:Dt={},collapsible:ht=!1,reverseArrow:Ht=!1,width:_t=200,collapsedWidth:Vt=80,zeroWidthTriggerStyle:ot,breakpoint:Ue,onCollapse:Wt,onBreakpoint:Ln}=He,Fn=se(He,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:Gt}=(0,Oe.useContext)(ce.Gs),[rn,An]=(0,Oe.useState)("collapsed"in He?He.collapsed:Et),[ni,Sn]=(0,Oe.useState)(!1);(0,Oe.useEffect)(()=>{"collapsed"in He&&An(He.collapsed)},[He.collapsed]);const Yn=(Pe,Fe)=>{"collapsed"in He||An(Pe),Wt==null||Wt(Pe,Fe)},It=(0,Oe.useRef)();It.current=Pe=>{Sn(Pe.matches),Ln==null||Ln(Pe.matches),rn!==Pe.matches&&Yn(Pe.matches,"responsive")},(0,Oe.useEffect)(()=>{function Pe(Ae){return It.current(Ae)}let Fe;if(typeof window!="undefined"){const{matchMedia:Ae}=window;if(Ae&&Ue&&Ue in he){Fe=Ae(`(max-width: ${he[Ue]})`);try{Fe.addEventListener("change",Pe)}catch(ye){Fe.addListener(Pe)}Pe(Fe)}}return()=>{try{Fe==null||Fe.removeEventListener("change",Pe)}catch(Ae){Fe==null||Fe.removeListener(Pe)}}},[Ue]),(0,Oe.useEffect)(()=>{const Pe=be("ant-sider-");return Gt.addSider(Pe),()=>Gt.removeSider(Pe)},[]);const wn=()=>{Yn(!rn,"clickTrigger")},{getPrefixCls:Gn}=(0,Oe.useContext)(ee.E_),ze=()=>{const Pe=Gn("layout-sider",rt),Fe=(0,Rt.Z)(Fn,["collapsed"]),Ae=rn?Vt:_t,ye=ne(Ae)?`${Ae}px`:String(Ae),qe=parseFloat(String(Vt||0))===0?Oe.createElement("span",{onClick:wn,className:dt()(`${Pe}-zero-width-trigger`,`${Pe}-zero-width-trigger-${Ht?"right":"left"}`),style:ot},Pt||Oe.createElement(Tt,null)):null,Ye={expanded:Ht?Oe.createElement(Ve.Z,null):Oe.createElement(Ct.Z,null),collapsed:Ht?Oe.createElement(Ct.Z,null):Oe.createElement(Ve.Z,null)}[rn?"collapsed":"expanded"],xt=Pt!==null?qe||Oe.createElement("div",{className:`${Pe}-trigger`,onClick:wn,style:{width:ye}},Pt||Ye):null,yt=Object.assign(Object.assign({},Dt),{flex:`0 0 ${ye}`,maxWidth:ye,minWidth:ye,width:ye}),at=dt()(Pe,`${Pe}-${it}`,{[`${Pe}-collapsed`]:!!rn,[`${Pe}-has-trigger`]:ht&&Pt!==null&&!qe,[`${Pe}-below`]:!!ni,[`${Pe}-zero-width`]:parseFloat(ye)===0},Qe);return Oe.createElement("aside",Object.assign({className:at},Fe,{style:yt,ref:We}),Oe.createElement("div",{className:`${Pe}-children`},Ze),ht||ni&&qe?xt:null)},Ee=Oe.useMemo(()=>({siderCollapsed:rn}),[rn]);return Oe.createElement(ve.Provider,{value:Ee},ze())})},84966:function(Vn,xn,pe){"use strict";pe.d(xn,{VY:function(){return ve},$_:function(){return he},h4:function(){return se},Gs:function(){return Rt},ZP:function(){return be}});var ge=pe(19127),Oe=pe(92310),Ke=pe.n(Oe),ut=pe(2738),Ge=pe(59301),Xe=pe(36355),Ne=pe(83116),Ct=ke=>{const{componentCls:Be,bodyBg:He,lightSiderBg:We,lightTriggerBg:rt,lightTriggerColor:Qe}=ke;return{[`${Be}-sider-light`]:{background:We,[`${Be}-sider-trigger`]:{color:Qe,background:rt},[`${Be}-sider-zero-width-trigger`]:{color:Qe,background:rt,border:`1px solid ${He}`,borderInlineStart:0}}}};const Ve=ke=>{const{antCls:Be,componentCls:He,colorText:We,triggerColor:rt,footerBg:Qe,triggerBg:Pt,headerHeight:Ze,headerPadding:Et,headerColor:it,footerPadding:Dt,triggerHeight:ht,zeroTriggerHeight:Ht,zeroTriggerWidth:_t,motionDurationMid:Vt,motionDurationSlow:ot,fontSize:Ue,borderRadius:Wt,bodyBg:Ln,headerBg:Fn,siderBg:Gt}=ke;return{[He]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:Ln,"&, *":{boxSizing:"border-box"},[`&${He}-has-sider`]:{flexDirection:"row",[`> ${He}, > ${He}-content`]:{width:0}},[`${He}-header, &${He}-footer`]:{flex:"0 0 auto"},[`${He}-sider`]:{position:"relative",minWidth:0,background:Gt,transition:`all ${Vt}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${Be}-menu${Be}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:ht},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:ht,color:rt,lineHeight:`${ht}px`,textAlign:"center",background:Pt,cursor:"pointer",transition:`all ${Vt}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:Ze,insetInlineEnd:-_t,zIndex:1,width:_t,height:Ht,color:rt,fontSize:ke.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:Gt,borderStartStartRadius:0,borderStartEndRadius:Wt,borderEndEndRadius:Wt,borderEndStartRadius:0,cursor:"pointer",transition:`background ${ot} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${ot}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-_t,borderStartStartRadius:Wt,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:Wt}}}}},Ct(ke)),{"&-rtl":{direction:"rtl"}}),[`${He}-header`]:{height:Ze,padding:Et,color:it,lineHeight:`${Ze}px`,background:Fn,[`${Be}-menu`]:{lineHeight:"inherit"}},[`${He}-footer`]:{padding:Dt,color:We,fontSize:Ue,background:Qe},[`${He}-content`]:{flex:"auto",minHeight:0}}};var Lt=(0,Ne.Z)("Layout",ke=>[Ve(ke)],ke=>{const{colorBgLayout:Be,controlHeight:He,controlHeightLG:We,colorText:rt,controlHeightSM:Qe,marginXXS:Pt,colorTextLightSolid:Ze,colorBgContainer:Et}=ke,it=We*1.25;return{colorBgHeader:"#001529",colorBgBody:Be,colorBgTrigger:"#002140",bodyBg:Be,headerBg:"#001529",headerHeight:He*2,headerPadding:`0 ${it}px`,headerColor:rt,footerPadding:`${Qe}px ${it}px`,footerBg:Be,siderBg:"#001529",triggerHeight:We+Pt*2,triggerBg:"#002140",triggerColor:Ze,zeroTriggerWidth:We,zeroTriggerHeight:We,lightSiderBg:Et,lightTriggerBg:Et,lightTriggerColor:rt}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),dt=function(ke,Be){var He={};for(var We in ke)Object.prototype.hasOwnProperty.call(ke,We)&&Be.indexOf(We)<0&&(He[We]=ke[We]);if(ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var rt=0,We=Object.getOwnPropertySymbols(ke);rt<We.length;rt++)Be.indexOf(We[rt])<0&&Object.prototype.propertyIsEnumerable.call(ke,We[rt])&&(He[We[rt]]=ke[We[rt]]);return He};const Rt=Ge.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function De(ke){let{suffixCls:Be,tagName:He,displayName:We}=ke;return rt=>Ge.forwardRef((Pt,Ze)=>Ge.createElement(rt,Object.assign({ref:Ze,suffixCls:Be,tagName:He},Pt)))}const ne=Ge.forwardRef((ke,Be)=>{const{prefixCls:He,suffixCls:We,className:rt,tagName:Qe}=ke,Pt=dt(ke,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:Ze}=Ge.useContext(Xe.E_),Et=Ze("layout",He),[it,Dt]=Lt(Et),ht=We?`${Et}-${We}`:Et;return it(Ge.createElement(Qe,Object.assign({className:Ke()(He||ht,rt,Dt),ref:Be},Pt)))}),ee=Ge.forwardRef((ke,Be)=>{const{direction:He}=Ge.useContext(Xe.E_),[We,rt]=Ge.useState([]),{prefixCls:Qe,className:Pt,rootClassName:Ze,children:Et,hasSider:it,tagName:Dt,style:ht}=ke,Ht=dt(ke,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),_t=(0,ut.Z)(Ht,["suffixCls"]),{getPrefixCls:Vt,layout:ot}=Ge.useContext(Xe.E_),Ue=Vt("layout",Qe),[Wt,Ln]=Lt(Ue),Fn=Ke()(Ue,{[`${Ue}-has-sider`]:typeof it=="boolean"?it:We.length>0,[`${Ue}-rtl`]:He==="rtl"},ot==null?void 0:ot.className,Pt,Ze,Ln),Gt=Ge.useMemo(()=>({siderHook:{addSider:rn=>{rt(An=>[].concat((0,ge.Z)(An),[rn]))},removeSider:rn=>{rt(An=>An.filter(ni=>ni!==rn))}}}),[]);return Wt(Ge.createElement(Rt.Provider,{value:Gt},Ge.createElement(Dt,Object.assign({ref:Be,className:Fn,style:Object.assign(Object.assign({},ot==null?void 0:ot.style),ht)},_t),Et)))}),ce=De({tagName:"div",displayName:"Layout"})(ee),se=De({suffixCls:"header",tagName:"header",displayName:"Header"})(ne),he=De({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(ne),ve=De({suffixCls:"content",tagName:"main",displayName:"Content"})(ne);var be=ce},40875:function(Vn,xn,pe){"use strict";pe.d(xn,{J:function(){return Xe}});var ge=pe(59301),Oe=pe(33234),Ke=pe(70425),ut=function(Ne,Tt){var Ct={};for(var Ve in Ne)Object.prototype.hasOwnProperty.call(Ne,Ve)&&Tt.indexOf(Ve)<0&&(Ct[Ve]=Ne[Ve]);if(Ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Lt=0,Ve=Object.getOwnPropertySymbols(Ne);Lt<Ve.length;Lt++)Tt.indexOf(Ve[Lt])<0&&Object.prototype.propertyIsEnumerable.call(Ne,Ve[Lt])&&(Ct[Ve[Lt]]=Ne[Ve[Lt]]);return Ct};const Ge=ge.createContext(null),Xe=ge.forwardRef((Ne,Tt)=>{const{children:Ct}=Ne,Ve=ut(Ne,["children"]),Lt=ge.useContext(Ge),dt=ge.useMemo(()=>Object.assign(Object.assign({},Lt),Ve),[Lt,Ve.prefixCls,Ve.mode,Ve.selectable]);return ge.createElement(Ge.Provider,{value:dt},ge.createElement(Oe.BR,null,(0,Ke.supportNodeRef)(Ct)?ge.cloneElement(Ct,{ref:Tt}):Ct))});xn.Z=Ge},20834:function(Vn,xn,pe){"use strict";pe.d(xn,{default:function(){return Ee}});var ge=pe(15285),Oe=pe(59301),Ke=pe(45818),ut=pe(92310),Ge=pe.n(ut),Xe=pe(36355),Ne=function(Pe,Fe){var Ae={};for(var ye in Pe)Object.prototype.hasOwnProperty.call(Pe,ye)&&Fe.indexOf(ye)<0&&(Ae[ye]=Pe[ye]);if(Pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qe=0,ye=Object.getOwnPropertySymbols(Pe);qe<ye.length;qe++)Fe.indexOf(ye[qe])<0&&Object.prototype.propertyIsEnumerable.call(Pe,ye[qe])&&(Ae[ye[qe]]=Pe[ye[qe]]);return Ae},Ct=Pe=>{const{prefixCls:Fe,className:Ae,dashed:ye}=Pe,qe=Ne(Pe,["prefixCls","className","dashed"]),{getPrefixCls:vt}=Oe.useContext(Xe.E_),et=vt("menu",Fe),Ye=Ge()({[`${et}-item-divider-dashed`]:!!ye},Ae);return Oe.createElement(ge.iz,Object.assign({className:Ye},qe))},Ve=pe(11592),Lt=pe(2738),dt=pe(6848),Rt=pe(92343),ne=(0,Oe.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),ce=Pe=>{var Fe;const{className:Ae,children:ye,icon:qe,title:vt,danger:et}=Pe,{prefixCls:Ye,firstLevel:xt,direction:yt,disableMenuItemTitleTooltip:at,inlineCollapsed:zt}=Oe.useContext(ne),un=sn=>{const jn=Oe.createElement("span",{className:`${Ye}-title-content`},ye);return(!qe||(0,Rt.l$)(ye)&&ye.type==="span")&&ye&&sn&&xt&&typeof ye=="string"?Oe.createElement("div",{className:`${Ye}-inline-collapsed-noicon`},ye.charAt(0)):jn},{siderCollapsed:fn}=Oe.useContext(Ke.D);let Qt=vt;typeof vt=="undefined"?Qt=xt?ye:"":vt===!1&&(Qt="");const Kn={title:Qt};!fn&&!zt&&(Kn.title=null,Kn.open=!1);const On=(0,Ve.Z)(ye).length;let jt=Oe.createElement(ge.ck,Object.assign({},(0,Lt.Z)(Pe,["title","icon","danger"]),{className:Ge()({[`${Ye}-item-danger`]:et,[`${Ye}-item-only-child`]:(qe?On+1:On)===1},Ae),title:typeof vt=="string"?vt:void 0}),(0,Rt.Tm)(qe,{className:Ge()((0,Rt.l$)(qe)?(Fe=qe.props)===null||Fe===void 0?void 0:Fe.className:"",`${Ye}-item-icon`)}),un(zt));return at||(jt=Oe.createElement(dt.Z,Object.assign({},Kn,{placement:yt==="rtl"?"left":"right",overlayClassName:`${Ye}-inline-collapsed-tooltip`}),jt)),jt},he=Pe=>{var Fe;const{popupClassName:Ae,icon:ye,title:qe,theme:vt}=Pe,et=Oe.useContext(ne),{prefixCls:Ye,inlineCollapsed:xt,theme:yt}=et,at=(0,ge.Xl)();let zt;if(!ye)zt=xt&&!at.length&&qe&&typeof qe=="string"?Oe.createElement("div",{className:`${Ye}-inline-collapsed-noicon`},qe.charAt(0)):Oe.createElement("span",{className:`${Ye}-title-content`},qe);else{const fn=(0,Rt.l$)(qe)&&qe.type==="span";zt=Oe.createElement(Oe.Fragment,null,(0,Rt.Tm)(ye,{className:Ge()((0,Rt.l$)(ye)?(Fe=ye.props)===null||Fe===void 0?void 0:Fe.className:"",`${Ye}-item-icon`)}),fn?qe:Oe.createElement("span",{className:`${Ye}-title-content`},qe))}const un=Oe.useMemo(()=>Object.assign(Object.assign({},et),{firstLevel:!1}),[et]);return Oe.createElement(ne.Provider,{value:un},Oe.createElement(ge.Wd,Object.assign({},(0,Lt.Z)(Pe,["icon"]),{title:zt,popupClassName:Ge()(Ye,Ae,`${Ye}-${vt||yt}`)})))},ve=pe(18785),be=pe(70425),ke=pe(62892),Be=pe(40875),He=function(Pe,Fe){var Ae={};for(var ye in Pe)Object.prototype.hasOwnProperty.call(Pe,ye)&&Fe.indexOf(ye)<0&&(Ae[ye]=Pe[ye]);if(Pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qe=0,ye=Object.getOwnPropertySymbols(Pe);qe<ye.length;qe++)Fe.indexOf(ye[qe])<0&&Object.prototype.propertyIsEnumerable.call(Pe,ye[qe])&&(Ae[ye[qe]]=Pe[ye[qe]]);return Ae};function We(Pe){return(Pe||[]).map((Fe,Ae)=>{if(Fe&&typeof Fe=="object"){const ye=Fe,{label:qe,children:vt,key:et,type:Ye}=ye,xt=He(ye,["label","children","key","type"]),yt=et!=null?et:`tmp-${Ae}`;return vt||Ye==="group"?Ye==="group"?Oe.createElement(ge.BW,Object.assign({key:yt},xt,{title:qe}),We(vt)):Oe.createElement(he,Object.assign({key:yt},xt,{title:qe}),We(vt)):Ye==="divider"?Oe.createElement(Ct,Object.assign({key:yt},xt)):Oe.createElement(ce,Object.assign({key:yt},xt),qe)}return null}).filter(Fe=>Fe)}function rt(Pe){return Oe.useMemo(()=>Pe&&We(Pe),[Pe])}var Qe=pe(64993),Pt=pe(17313),Ze=pe(8378),Et=pe(13826),it=pe(29878),Dt=pe(83116),ht=pe(37613),_t=Pe=>{const{componentCls:Fe,motionDurationSlow:Ae,horizontalLineHeight:ye,colorSplit:qe,lineWidth:vt,lineType:et,itemPaddingInline:Ye}=Pe;return{[`${Fe}-horizontal`]:{lineHeight:ye,border:0,borderBottom:`${vt}px ${et} ${qe}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${Fe}-item, ${Fe}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:Ye},[`> ${Fe}-item:hover,
|
|
|
> ${Fe}-item-active,
|
|
|
> ${Fe}-submenu ${Fe}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${Fe}-item, ${Fe}-submenu-title`]:{transition:[`border-color ${Ae}`,`background ${Ae}`].join(",")},[`${Fe}-submenu-arrow`]:{display:"none"}}}},ot=Pe=>{let{componentCls:Fe,menuArrowOffset:Ae}=Pe;return{[`${Fe}-rtl`]:{direction:"rtl"},[`${Fe}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${Fe}-rtl${Fe}-vertical,
|
|
|
${Fe}-submenu-rtl ${Fe}-vertical`]:{[`${Fe}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${Ae})`},"&::after":{transform:`rotate(45deg) translateY(${Ae})`}}}}};const Ue=Pe=>Object.assign({},(0,Pt.oN)(Pe));var Ln=(Pe,Fe)=>{const{componentCls:Ae,itemColor:ye,itemSelectedColor:qe,groupTitleColor:vt,itemBg:et,subMenuItemBg:Ye,itemSelectedBg:xt,activeBarHeight:yt,activeBarWidth:at,activeBarBorderWidth:zt,motionDurationSlow:un,motionEaseInOut:fn,motionEaseOut:Qt,itemPaddingInline:Kn,motionDurationMid:On,itemHoverColor:jt,lineType:sn,colorSplit:jn,itemDisabledColor:dn,dangerItemColor:Pn,dangerItemHoverColor:ui,dangerItemSelectedColor:pi,dangerItemActiveBg:gi,dangerItemSelectedBg:bi,itemHoverBg:Xi,itemActiveBg:ar,menuSubMenuBg:Ji,horizontalItemSelectedColor:wr,horizontalItemSelectedBg:mr,horizontalItemBorderRadius:Hi,horizontalItemHoverBg:Er,popupBg:$n}=Pe;return{[`${Ae}-${Fe}, ${Ae}-${Fe} > ${Ae}`]:{color:ye,background:et,[`&${Ae}-root:focus-visible`]:Object.assign({},Ue(Pe)),[`${Ae}-item-group-title`]:{color:vt},[`${Ae}-submenu-selected`]:{[`> ${Ae}-submenu-title`]:{color:qe}},[`${Ae}-item-disabled, ${Ae}-submenu-disabled`]:{color:`${dn} !important`},[`${Ae}-item:not(${Ae}-item-selected):not(${Ae}-submenu-selected)`]:{[`&:hover, > ${Ae}-submenu-title:hover`]:{color:jt}},[`&:not(${Ae}-horizontal)`]:{[`${Ae}-item:not(${Ae}-item-selected)`]:{"&:hover":{backgroundColor:Xi},"&:active":{backgroundColor:ar}},[`${Ae}-submenu-title`]:{"&:hover":{backgroundColor:Xi},"&:active":{backgroundColor:ar}}},[`${Ae}-item-danger`]:{color:Pn,[`&${Ae}-item:hover`]:{[`&:not(${Ae}-item-selected):not(${Ae}-submenu-selected)`]:{color:ui}},[`&${Ae}-item:active`]:{background:gi}},[`${Ae}-item a`]:{"&, &:hover":{color:"inherit"}},[`${Ae}-item-selected`]:{color:qe,[`&${Ae}-item-danger`]:{color:pi},"a, a:hover":{color:"inherit"}},[`& ${Ae}-item-selected`]:{backgroundColor:xt,[`&${Ae}-item-danger`]:{backgroundColor:bi}},[`${Ae}-item, ${Ae}-submenu-title`]:{[`&:not(${Ae}-item-disabled):focus-visible`]:Object.assign({},Ue(Pe))},[`&${Ae}-submenu > ${Ae}`]:{backgroundColor:Ji},[`&${Ae}-popup > ${Ae}`]:{backgroundColor:$n},[`&${Ae}-horizontal`]:Object.assign(Object.assign({},Fe==="dark"?{borderBottom:0}:{}),{[`> ${Ae}-item, > ${Ae}-submenu`]:{top:zt,marginTop:-zt,marginBottom:0,borderRadius:Hi,"&::after":{position:"absolute",insetInline:Kn,bottom:0,borderBottom:`${yt}px solid transparent`,transition:`border-color ${un} ${fn}`,content:'""'},"&:hover, &-active, &-open":{background:Er,"&::after":{borderBottomWidth:yt,borderBottomColor:wr}},"&-selected":{color:wr,backgroundColor:mr,"&:hover":{backgroundColor:mr},"&::after":{borderBottomWidth:yt,borderBottomColor:wr}}}}),[`&${Ae}-root`]:{[`&${Ae}-inline, &${Ae}-vertical`]:{borderInlineEnd:`${zt}px ${sn} ${jn}`}},[`&${Ae}-inline`]:{[`${Ae}-sub${Ae}-inline`]:{background:Ye},[`${Ae}-item, ${Ae}-submenu-title`]:zt&&at?{width:`calc(100% + ${zt}px)`}:{},[`${Ae}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${at}px solid ${qe}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${On} ${Qt}`,`opacity ${On} ${Qt}`].join(","),content:'""'},[`&${Ae}-item-danger`]:{"&::after":{borderInlineEndColor:pi}}},[`${Ae}-selected, ${Ae}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${On} ${fn}`,`opacity ${On} ${fn}`].join(",")}}}}}};const Fn=Pe=>{const{componentCls:Fe,itemHeight:Ae,itemMarginInline:ye,padding:qe,menuArrowSize:vt,marginXS:et,itemMarginBlock:Ye}=Pe,xt=qe+vt+et;return{[`${Fe}-item`]:{position:"relative",overflow:"hidden"},[`${Fe}-item, ${Fe}-submenu-title`]:{height:Ae,lineHeight:`${Ae}px`,paddingInline:qe,overflow:"hidden",textOverflow:"ellipsis",marginInline:ye,marginBlock:Ye,width:`calc(100% - ${ye*2}px)`},[`> ${Fe}-item,
|
|
|
> ${Fe}-submenu > ${Fe}-submenu-title`]:{height:Ae,lineHeight:`${Ae}px`},[`${Fe}-item-group-list ${Fe}-submenu-title,
|
|
|
${Fe}-submenu-title`]:{paddingInlineEnd:xt}}};var rn=Pe=>{const{componentCls:Fe,iconCls:Ae,itemHeight:ye,colorTextLightSolid:qe,dropdownWidth:vt,controlHeightLG:et,motionDurationMid:Ye,motionEaseOut:xt,paddingXL:yt,itemMarginInline:at,fontSizeLG:zt,motionDurationSlow:un,paddingXS:fn,boxShadowSecondary:Qt,collapsedWidth:Kn,collapsedIconSize:On}=Pe,jt={height:ye,lineHeight:`${ye}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[Fe]:{"&-inline, &-vertical":Object.assign({[`&${Fe}-root`]:{boxShadow:"none"}},Fn(Pe))},[`${Fe}-submenu-popup`]:{[`${Fe}-vertical`]:Object.assign(Object.assign({},Fn(Pe)),{boxShadow:Qt})}},{[`${Fe}-submenu-popup ${Fe}-vertical${Fe}-sub`]:{minWidth:vt,maxHeight:`calc(100vh - ${et*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${Fe}-inline`]:{width:"100%",[`&${Fe}-root`]:{[`${Fe}-item, ${Fe}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${un}`,`background ${un}`,`padding ${Ye} ${xt}`].join(","),[`> ${Fe}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${Fe}-sub${Fe}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${Fe}-submenu > ${Fe}-submenu-title`]:jt,[`& ${Fe}-item-group-title`]:{paddingInlineStart:yt}},[`${Fe}-item`]:jt}},{[`${Fe}-inline-collapsed`]:{width:Kn,[`&${Fe}-root`]:{[`${Fe}-item, ${Fe}-submenu ${Fe}-submenu-title`]:{[`> ${Fe}-inline-collapsed-noicon`]:{fontSize:zt,textAlign:"center"}}},[`> ${Fe}-item,
|
|
|
> ${Fe}-item-group > ${Fe}-item-group-list > ${Fe}-item,
|
|
|
> ${Fe}-item-group > ${Fe}-item-group-list > ${Fe}-submenu > ${Fe}-submenu-title,
|
|
|
> ${Fe}-submenu > ${Fe}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${zt/2}px - ${at}px)`,textOverflow:"clip",[`
|
|
|
${Fe}-submenu-arrow,
|
|
|
${Fe}-submenu-expand-icon
|
|
|
`]:{opacity:0},[`${Fe}-item-icon, ${Ae}`]:{margin:0,fontSize:On,lineHeight:`${ye}px`,"+ span":{display:"inline-block",opacity:0}}},[`${Fe}-item-icon, ${Ae}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${Fe}-item-icon, ${Ae}`]:{display:"none"},"a, a:hover":{color:qe}},[`${Fe}-item-group-title`]:Object.assign(Object.assign({},Pt.vS),{paddingInline:fn})}}]};const An=Pe=>{const{componentCls:Fe,motionDurationSlow:Ae,motionDurationMid:ye,motionEaseInOut:qe,motionEaseOut:vt,iconCls:et,iconSize:Ye,iconMarginInlineEnd:xt}=Pe;return{[`${Fe}-item, ${Fe}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${Ae}`,`background ${Ae}`,`padding ${Ae} ${qe}`].join(","),[`${Fe}-item-icon, ${et}`]:{minWidth:Ye,fontSize:Ye,transition:[`font-size ${ye} ${vt}`,`margin ${Ae} ${qe}`,`color ${Ae}`].join(","),"+ span":{marginInlineStart:xt,opacity:1,transition:[`opacity ${Ae} ${qe}`,`margin ${Ae}`,`color ${Ae}`].join(",")}},[`${Fe}-item-icon`]:Object.assign({},(0,Pt.Ro)()),[`&${Fe}-item-only-child`]:{[`> ${et}, > ${Fe}-item-icon`]:{marginInlineEnd:0}}},[`${Fe}-item-disabled, ${Fe}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${Fe}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},ni=Pe=>{const{componentCls:Fe,motionDurationSlow:Ae,motionEaseInOut:ye,borderRadius:qe,menuArrowSize:vt,menuArrowOffset:et}=Pe;return{[`${Fe}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:Pe.margin,width:vt,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${Ae} ${ye}, opacity ${Ae}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:vt*.6,height:vt*.15,backgroundColor:"currentcolor",borderRadius:qe,transition:[`background ${Ae} ${ye}`,`transform ${Ae} ${ye}`,`top ${Ae} ${ye}`,`color ${Ae} ${ye}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${et})`},"&::after":{transform:`rotate(-45deg) translateY(${et})`}}}}},Sn=Pe=>{const{antCls:Fe,componentCls:Ae,fontSize:ye,motionDurationSlow:qe,motionDurationMid:vt,motionEaseInOut:et,paddingXS:Ye,padding:xt,colorSplit:yt,lineWidth:at,zIndexPopup:zt,borderRadiusLG:un,subMenuItemBorderRadius:fn,menuArrowSize:Qt,menuArrowOffset:Kn,lineType:On,menuPanelMaskInset:jt,groupTitleLineHeight:sn,groupTitleFontSize:jn}=Pe;return[{"":{[`${Ae}`]:Object.assign(Object.assign({},(0,Pt.dF)()),{"&-hidden":{display:"none"}})},[`${Ae}-submenu-hidden`]:{display:"none"}},{[Ae]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Pt.Wf)(Pe)),(0,Pt.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:ye,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",[`${Ae}-item`]:{flex:"none"}},[`${Ae}-item, ${Ae}-submenu, ${Ae}-submenu-title`]:{borderRadius:Pe.itemBorderRadius},[`${Ae}-item-group-title`]:{padding:`${Ye}px ${xt}px`,fontSize:jn,lineHeight:sn,transition:`all ${qe}`},[`&-horizontal ${Ae}-submenu`]:{transition:[`border-color ${qe} ${et}`,`background ${qe} ${et}`].join(",")},[`${Ae}-submenu, ${Ae}-submenu-inline`]:{transition:[`border-color ${qe} ${et}`,`background ${qe} ${et}`,`padding ${vt} ${et}`].join(",")},[`${Ae}-submenu ${Ae}-sub`]:{cursor:"initial",transition:[`background ${qe} ${et}`,`padding ${qe} ${et}`].join(",")},[`${Ae}-title-content`]:{transition:`color ${qe}`},[`${Ae}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${Ae}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:yt,borderStyle:On,borderWidth:0,borderTopWidth:at,marginBlock:at,padding:0,"&-dashed":{borderStyle:"dashed"}}}),An(Pe)),{[`${Ae}-item-group`]:{[`${Ae}-item-group-list`]:{margin:0,padding:0,[`${Ae}-item, ${Ae}-submenu-title`]:{paddingInline:`${ye*2}px ${xt}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:zt,borderRadius:un,boxShadow:"none",transformOrigin:"0 0",[`&${Ae}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${jt}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:jt},"\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:Pe.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:Pe.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:Pe.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:Pe.paddingXS},[`> ${Ae}`]:Object.assign(Object.assign(Object.assign({borderRadius:un},An(Pe)),ni(Pe)),{[`${Ae}-item, ${Ae}-submenu > ${Ae}-submenu-title`]:{borderRadius:fn},[`${Ae}-submenu-title::after`]:{transition:`transform ${qe} ${et}`}})}}),ni(Pe)),{[`&-inline-collapsed ${Ae}-submenu-arrow,
|
|
|
&-inline ${Ae}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${Kn})`},"&::after":{transform:`rotate(45deg) translateX(-${Kn})`}},[`${Ae}-submenu-open${Ae}-submenu-inline > ${Ae}-submenu-title > ${Ae}-submenu-arrow`]:{transform:`translateY(-${Qt*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${Kn})`},"&::before":{transform:`rotate(45deg) translateX(${Kn})`}}})},{[`${Fe}-layout-header`]:{[Ae]:{lineHeight:"inherit"}}}]};var Yn=(Pe,Fe)=>(0,Dt.Z)("Menu",ye=>{if(Fe===!1)return[];const{colorBgElevated:qe,colorPrimary:vt,colorTextLightSolid:et,controlHeightLG:Ye,fontSize:xt,darkItemColor:yt,darkDangerItemColor:at,darkItemBg:zt,darkSubMenuItemBg:un,darkItemSelectedColor:fn,darkItemSelectedBg:Qt,darkDangerItemSelectedBg:Kn,darkItemHoverBg:On,darkGroupTitleColor:jt,darkItemHoverColor:sn,darkItemDisabledColor:jn,darkDangerItemHoverColor:dn,darkDangerItemSelectedColor:Pn,darkDangerItemActiveBg:ui}=ye,pi=xt/7*5,gi=(0,ht.TS)(ye,{menuArrowSize:pi,menuHorizontalHeight:Ye*1.15,menuArrowOffset:`${pi*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:qe}),bi=(0,ht.TS)(gi,{itemColor:yt,itemHoverColor:sn,groupTitleColor:jt,itemSelectedColor:fn,itemBg:zt,popupBg:zt,subMenuItemBg:un,itemActiveBg:"transparent",itemSelectedBg:Qt,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:On,itemDisabledColor:jn,dangerItemColor:at,dangerItemHoverColor:dn,dangerItemSelectedColor:Pn,dangerItemActiveBg:ui,dangerItemSelectedBg:Kn,menuSubMenuBg:un,horizontalItemSelectedColor:et,horizontalItemSelectedBg:vt});return[Sn(gi),_t(gi),rn(gi),Ln(gi,"light"),Ln(bi,"dark"),ot(gi),(0,Ze.Z)(gi),(0,Et.oN)(gi,"slide-up"),(0,Et.oN)(gi,"slide-down"),(0,it._y)(gi,"zoom-big")]},ye=>{const{colorPrimary:qe,colorError:vt,colorTextDisabled:et,colorErrorBg:Ye,colorText:xt,colorTextDescription:yt,colorBgContainer:at,colorFillAlter:zt,colorFillContent:un,lineWidth:fn,lineWidthBold:Qt,controlItemBgActive:Kn,colorBgTextHover:On,controlHeightLG:jt,lineHeight:sn,colorBgElevated:jn,marginXXS:dn,padding:Pn,fontSize:ui,controlHeightSM:pi,fontSizeLG:gi,colorTextLightSolid:bi,colorErrorHover:Xi}=ye,ar=new Qe.C(bi).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:ye.zIndexPopupBase+50,radiusItem:ye.borderRadiusLG,itemBorderRadius:ye.borderRadiusLG,radiusSubMenuItem:ye.borderRadiusSM,subMenuItemBorderRadius:ye.borderRadiusSM,colorItemText:xt,itemColor:xt,colorItemTextHover:xt,itemHoverColor:xt,colorItemTextHoverHorizontal:qe,horizontalItemHoverColor:qe,colorGroupTitle:yt,groupTitleColor:yt,colorItemTextSelected:qe,itemSelectedColor:qe,colorItemTextSelectedHorizontal:qe,horizontalItemSelectedColor:qe,colorItemBg:at,itemBg:at,colorItemBgHover:On,itemHoverBg:On,colorItemBgActive:un,itemActiveBg:Kn,colorSubItemBg:zt,subMenuItemBg:zt,colorItemBgSelected:Kn,itemSelectedBg:Kn,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:Qt,activeBarHeight:Qt,colorActiveBarBorderSize:fn,activeBarBorderWidth:fn,colorItemTextDisabled:et,itemDisabledColor:et,colorDangerItemText:vt,dangerItemColor:vt,colorDangerItemTextHover:vt,dangerItemHoverColor:vt,colorDangerItemTextSelected:vt,dangerItemSelectedColor:vt,colorDangerItemBgActive:Ye,dangerItemActiveBg:Ye,colorDangerItemBgSelected:Ye,dangerItemSelectedBg:Ye,itemMarginInline:ye.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:jt,groupTitleLineHeight:sn,collapsedWidth:jt*2,popupBg:jn,itemMarginBlock:dn,itemPaddingInline:Pn,horizontalLineHeight:`${jt*1.15}px`,iconSize:ui,iconMarginInlineEnd:pi-ui,collapsedIconSize:gi,groupTitleFontSize:ui,darkItemDisabledColor:new Qe.C(bi).setAlpha(.25).toRgbString(),darkItemColor:ar,darkDangerItemColor:vt,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:bi,darkItemSelectedBg:qe,darkDangerItemSelectedBg:vt,darkItemHoverBg:"transparent",darkGroupTitleColor:ar,darkItemHoverColor:bi,darkDangerItemHoverColor:Xi,darkDangerItemSelectedColor:bi,darkDangerItemActiveBg:vt}},{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"]]})(Pe),It=function(Pe,Fe){var Ae={};for(var ye in Pe)Object.prototype.hasOwnProperty.call(Pe,ye)&&Fe.indexOf(ye)<0&&(Ae[ye]=Pe[ye]);if(Pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qe=0,ye=Object.getOwnPropertySymbols(Pe);qe<ye.length;qe++)Fe.indexOf(ye[qe])<0&&Object.prototype.propertyIsEnumerable.call(Pe,ye[qe])&&(Ae[ye[qe]]=Pe[ye[qe]]);return Ae},Gn=(0,Oe.forwardRef)((Pe,Fe)=>{var Ae,ye;const qe=Oe.useContext(Be.Z),vt=qe||{},{getPrefixCls:et,getPopupContainer:Ye,direction:xt,menu:yt}=Oe.useContext(Xe.E_),at=et(),{prefixCls:zt,className:un,style:fn,theme:Qt="light",expandIcon:Kn,_internalDisableMenuItemTitleTooltip:On,inlineCollapsed:jt,siderCollapsed:sn,items:jn,children:dn,rootClassName:Pn,mode:ui,selectable:pi,onClick:gi,overflowedIndicatorPopupClassName:bi}=Pe,Xi=It(Pe,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),ar=(0,Lt.Z)(Xi,["collapsedWidth"]),Ji=rt(jn)||dn;(Ae=vt.validator)===null||Ae===void 0||Ae.call(vt,{mode:ui});const wr=(0,be.useEvent)(function(){var Li;gi==null||gi.apply(void 0,arguments),(Li=vt.onClick)===null||Li===void 0||Li.call(vt)}),mr=vt.mode||ui,Hi=pi!=null?pi:vt.selectable,Er=Oe.useMemo(()=>sn!==void 0?sn:jt,[jt,sn]),$n={horizontal:{motionName:`${at}-slide-up`},inline:(0,ke.Z)(at),other:{motionName:`${at}-zoom-big`}},Le=et("menu",zt||vt.prefixCls),[Ei,Ri]=Yn(Le,!qe),nn=Ge()(`${Le}-${Qt}`,yt==null?void 0:yt.className,un);let di;if(typeof Kn=="function")di=Kn;else if(Kn===null||Kn===!1)di=null;else if(vt.expandIcon===null||vt.expandIcon===!1)di=null;else{const Li=Kn!=null?Kn:vt.expandIcon;di=(0,Rt.Tm)(Li,{className:Ge()(`${Le}-submenu-expand-icon`,(0,Rt.l$)(Li)?(ye=Li.props)===null||ye===void 0?void 0:ye.className:"")})}const yi=Oe.useMemo(()=>({prefixCls:Le,inlineCollapsed:Er||!1,direction:xt,firstLevel:!0,theme:Qt,mode:mr,disableMenuItemTitleTooltip:On}),[Le,Er,xt,On,Qt]);return Ei(Oe.createElement(Be.Z.Provider,{value:null},Oe.createElement(ne.Provider,{value:yi},Oe.createElement(ge.ZP,Object.assign({getPopupContainer:Ye,overflowedIndicator:Oe.createElement(ve.Z,null),overflowedIndicatorPopupClassName:Ge()(Le,`${Le}-${Qt}`,bi),mode:mr,selectable:Hi,onClick:wr},ar,{inlineCollapsed:Er,style:Object.assign(Object.assign({},yt==null?void 0:yt.style),fn),className:nn,prefixCls:Le,direction:xt,defaultMotions:$n,expandIcon:di,ref:Fe,rootClassName:Ge()(Pn,Ri)}),Ji))))});const ze=(0,Oe.forwardRef)((Pe,Fe)=>{const Ae=(0,Oe.useRef)(null),ye=Oe.useContext(Ke.D);return(0,Oe.useImperativeHandle)(Fe,()=>({menu:Ae.current,focus:qe=>{var vt;(vt=Ae.current)===null||vt===void 0||vt.focus(qe)}})),Oe.createElement(Gn,Object.assign({ref:Ae},Pe,ye))});ze.Item=ce,ze.SubMenu=he,ze.Divider=Ct,ze.ItemGroup=ge.BW;var Ee=ze},58421:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return vt}});var ge=pe(96663),Oe=pe(59301),Ke={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"},ut=Ke,Ge=pe(7657),Xe=function(Ye,xt){return Oe.createElement(Ge.Z,(0,ge.Z)({},Ye,{ref:xt,icon:ut}))},Ne=Oe.forwardRef(Xe),Tt=Ne,Ct=pe(49198),Ve=pe(33853),Lt=pe(38819),dt=pe(92310),Rt=pe.n(dt),De=pe(90493),ne=pe(44127),ee=pe(52884),ce=pe(95727),se=pe(65711),he=pe(85745),ve=pe(26112),be={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},ke=be,Be=pe(91735),He=function(et){(0,se.Z)(xt,et);var Ye=(0,he.Z)(xt);function xt(){var yt;(0,ee.Z)(this,xt);for(var at=arguments.length,zt=new Array(at),un=0;un<at;un++)zt[un]=arguments[un];return yt=Ye.call.apply(Ye,[this].concat(zt)),yt.state={goInputText:""},yt.getValidValue=function(){var fn=yt.state.goInputText;return!fn||Number.isNaN(fn)?void 0:Number(fn)},yt.buildOptionText=function(fn){return"".concat(fn," ").concat(yt.props.locale.items_per_page)},yt.changeSize=function(fn){yt.props.changeSize(Number(fn))},yt.handleChange=function(fn){yt.setState({goInputText:fn.target.value})},yt.handleBlur=function(fn){var Qt=yt.props,Kn=Qt.goButton,On=Qt.quickGo,jt=Qt.rootPrefixCls,sn=yt.state.goInputText;Kn||sn===""||(yt.setState({goInputText:""}),!(fn.relatedTarget&&(fn.relatedTarget.className.indexOf("".concat(jt,"-item-link"))>=0||fn.relatedTarget.className.indexOf("".concat(jt,"-item"))>=0))&&On(yt.getValidValue()))},yt.go=function(fn){var Qt=yt.state.goInputText;Qt!==""&&(fn.keyCode===ke.ENTER||fn.type==="click")&&(yt.setState({goInputText:""}),yt.props.quickGo(yt.getValidValue()))},yt}return(0,ce.Z)(xt,[{key:"getPageSizeOptions",value:function(){var at=this.props,zt=at.pageSize,un=at.pageSizeOptions;return un.some(function(fn){return fn.toString()===zt.toString()})?un:un.concat([zt.toString()]).sort(function(fn,Qt){var Kn=Number.isNaN(Number(fn))?0:Number(fn),On=Number.isNaN(Number(Qt))?0:Number(Qt);return Kn-On})}},{key:"render",value:function(){var at=this,zt=this.props,un=zt.pageSize,fn=zt.locale,Qt=zt.rootPrefixCls,Kn=zt.changeSize,On=zt.quickGo,jt=zt.goButton,sn=zt.selectComponentClass,jn=zt.buildOptionText,dn=zt.selectPrefixCls,Pn=zt.disabled,ui=this.state.goInputText,pi="".concat(Qt,"-options"),gi=sn,bi=null,Xi=null,ar=null;if(!Kn&&!On)return null;var Ji=this.getPageSizeOptions();if(Kn&&gi){var wr=Ji.map(function(mr,Hi){return Oe.createElement(gi.Option,{key:Hi,value:mr.toString()},(jn||at.buildOptionText)(mr))});bi=Oe.createElement(gi,{disabled:Pn,prefixCls:dn,showSearch:!1,className:"".concat(pi,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(un||Ji[0]).toString(),onChange:this.changeSize,getPopupContainer:function(Hi){return Hi.parentNode},"aria-label":fn.page_size,defaultOpen:!1},wr)}return On&&(jt&&(ar=typeof jt=="boolean"?Oe.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:Pn,className:"".concat(pi,"-quick-jumper-button")},fn.jump_to_confirm):Oe.createElement("span",{onClick:this.go,onKeyUp:this.go},jt)),Xi=Oe.createElement("div",{className:"".concat(pi,"-quick-jumper")},fn.jump_to,Oe.createElement("input",{disabled:Pn,type:"text",value:ui,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":fn.page}),fn.page,ar)),Oe.createElement("li",{className:"".concat(pi)},bi,Xi)}}]),xt}(Oe.Component);He.defaultProps={pageSizeOptions:["10","20","50","100"]};var We=He,rt=function(Ye){var xt,yt=Ye.rootPrefixCls,at=Ye.page,zt=Ye.active,un=Ye.className,fn=Ye.showTitle,Qt=Ye.onClick,Kn=Ye.onKeyPress,On=Ye.itemRender,jt="".concat(yt,"-item"),sn=Rt()(jt,"".concat(jt,"-").concat(at),(xt={},(0,De.Z)(xt,"".concat(jt,"-active"),zt),(0,De.Z)(xt,"".concat(jt,"-disabled"),!at),(0,De.Z)(xt,Ye.className,un),xt)),jn=function(){Qt(at)},dn=function(pi){Kn(pi,Qt,at)},Pn=On(at,"page",Oe.createElement("a",{rel:"nofollow"},at));return Pn?Oe.createElement("li",{title:fn?at.toString():null,className:sn,onClick:jn,onKeyPress:dn,tabIndex:0},Pn):null},Qe=rt;function Pt(){}function Ze(et){var Ye=Number(et);return typeof Ye=="number"&&!Number.isNaN(Ye)&&isFinite(Ye)&&Math.floor(Ye)===Ye}var Et=function(Ye,xt,yt){return yt};function it(et,Ye,xt){var yt=typeof et=="undefined"?Ye.pageSize:et;return Math.floor((xt.total-1)/yt)+1}var Dt=function(et){(0,se.Z)(xt,et);var Ye=(0,he.Z)(xt);function xt(yt){var at;(0,ee.Z)(this,xt),at=Ye.call(this,yt),at.paginationNode=Oe.createRef(),at.getJumpPrevPage=function(){return Math.max(1,at.state.current-(at.props.showLessItems?3:5))},at.getJumpNextPage=function(){return Math.min(it(void 0,at.state,at.props),at.state.current+(at.props.showLessItems?3:5))},at.getItemIcon=function(Kn,On){var jt=at.props.prefixCls,sn=Kn||Oe.createElement("button",{type:"button","aria-label":On,className:"".concat(jt,"-item-link")});return typeof Kn=="function"&&(sn=Oe.createElement(Kn,(0,ne.Z)({},at.props))),sn},at.isValid=function(Kn){var On=at.props.total;return Ze(Kn)&&Kn!==at.state.current&&Ze(On)&&On>0},at.shouldDisplayQuickJumper=function(){var Kn=at.props,On=Kn.showQuickJumper,jt=Kn.total,sn=at.state.pageSize;return jt<=sn?!1:On},at.handleKeyDown=function(Kn){(Kn.keyCode===ke.ARROW_UP||Kn.keyCode===ke.ARROW_DOWN)&&Kn.preventDefault()},at.handleKeyUp=function(Kn){var On=at.getValidValue(Kn),jt=at.state.currentInputValue;On!==jt&&at.setState({currentInputValue:On}),Kn.keyCode===ke.ENTER?at.handleChange(On):Kn.keyCode===ke.ARROW_UP?at.handleChange(On-1):Kn.keyCode===ke.ARROW_DOWN&&at.handleChange(On+1)},at.handleBlur=function(Kn){var On=at.getValidValue(Kn);at.handleChange(On)},at.changePageSize=function(Kn){var On=at.state.current,jt=it(Kn,at.state,at.props);On=On>jt?jt:On,jt===0&&(On=at.state.current),typeof Kn=="number"&&("pageSize"in at.props||at.setState({pageSize:Kn}),"current"in at.props||at.setState({current:On,currentInputValue:On})),at.props.onShowSizeChange(On,Kn),"onChange"in at.props&&at.props.onChange&&at.props.onChange(On,Kn)},at.handleChange=function(Kn){var On=at.props,jt=On.disabled,sn=On.onChange,jn=at.state,dn=jn.pageSize,Pn=jn.current,ui=jn.currentInputValue;if(at.isValid(Kn)&&!jt){var pi=it(void 0,at.state,at.props),gi=Kn;return Kn>pi?gi=pi:Kn<1&&(gi=1),"current"in at.props||at.setState({current:gi}),gi!==ui&&at.setState({currentInputValue:gi}),sn(gi,dn),gi}return Pn},at.prev=function(){at.hasPrev()&&at.handleChange(at.state.current-1)},at.next=function(){at.hasNext()&&at.handleChange(at.state.current+1)},at.jumpPrev=function(){at.handleChange(at.getJumpPrevPage())},at.jumpNext=function(){at.handleChange(at.getJumpNextPage())},at.hasPrev=function(){return at.state.current>1},at.hasNext=function(){return at.state.current<it(void 0,at.state,at.props)},at.runIfEnter=function(Kn,On){if(Kn.key==="Enter"||Kn.charCode===13){for(var jt=arguments.length,sn=new Array(jt>2?jt-2:0),jn=2;jn<jt;jn++)sn[jn-2]=arguments[jn];On.apply(void 0,sn)}},at.runIfEnterPrev=function(Kn){at.runIfEnter(Kn,at.prev)},at.runIfEnterNext=function(Kn){at.runIfEnter(Kn,at.next)},at.runIfEnterJumpPrev=function(Kn){at.runIfEnter(Kn,at.jumpPrev)},at.runIfEnterJumpNext=function(Kn){at.runIfEnter(Kn,at.jumpNext)},at.handleGoTO=function(Kn){(Kn.keyCode===ke.ENTER||Kn.type==="click")&&at.handleChange(at.state.currentInputValue)},at.renderPrev=function(Kn){var On=at.props,jt=On.prevIcon,sn=On.itemRender,jn=sn(Kn,"prev",at.getItemIcon(jt,"prev page")),dn=!at.hasPrev();return(0,Oe.isValidElement)(jn)?(0,Oe.cloneElement)(jn,{disabled:dn}):jn},at.renderNext=function(Kn){var On=at.props,jt=On.nextIcon,sn=On.itemRender,jn=sn(Kn,"next",at.getItemIcon(jt,"next page")),dn=!at.hasNext();return(0,Oe.isValidElement)(jn)?(0,Oe.cloneElement)(jn,{disabled:dn}):jn};var zt=yt.onChange!==Pt,un="current"in yt;un&&!zt&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var fn=yt.defaultCurrent;"current"in yt&&(fn=yt.current);var Qt=yt.defaultPageSize;return"pageSize"in yt&&(Qt=yt.pageSize),fn=Math.min(fn,it(Qt,void 0,yt)),at.state={current:fn,currentInputValue:fn,pageSize:Qt},at}return(0,ce.Z)(xt,[{key:"componentDidUpdate",value:function(at,zt){var un=this.props.prefixCls;if(zt.current!==this.state.current&&this.paginationNode.current){var fn=this.paginationNode.current.querySelector(".".concat(un,"-item-").concat(zt.current));if(fn&&document.activeElement===fn){var Qt;fn==null||(Qt=fn.blur)===null||Qt===void 0||Qt.call(fn)}}}},{key:"getValidValue",value:function(at){var zt=at.target.value,un=it(void 0,this.state,this.props),fn=this.state.currentInputValue,Qt;return zt===""?Qt=zt:Number.isNaN(Number(zt))?Qt=fn:zt>=un?Qt=un:Qt=Number(zt),Qt}},{key:"getShowSizeChanger",value:function(){var at=this.props,zt=at.showSizeChanger,un=at.total,fn=at.totalBoundaryShowSizeChanger;return typeof zt!="undefined"?zt:un>fn}},{key:"render",value:function(){var at=this.props,zt=at.prefixCls,un=at.className,fn=at.style,Qt=at.disabled,Kn=at.hideOnSinglePage,On=at.total,jt=at.locale,sn=at.showQuickJumper,jn=at.showLessItems,dn=at.showTitle,Pn=at.showTotal,ui=at.simple,pi=at.itemRender,gi=at.showPrevNextJumpers,bi=at.jumpPrevIcon,Xi=at.jumpNextIcon,ar=at.selectComponentClass,Ji=at.selectPrefixCls,wr=at.pageSizeOptions,mr=this.state,Hi=mr.current,Er=mr.pageSize,$n=mr.currentInputValue;if(Kn===!0&&On<=Er)return null;var Le=it(void 0,this.state,this.props),Ei=[],Ri=null,nn=null,di=null,yi=null,Li=null,Tn=sn&&sn.goButton,Un=jn?1:2,kt=Hi-1>0?Hi-1:0,$t=Hi+1<Le?Hi+1:Le,Je=(0,ve.Z)(this.props,{aria:!0,data:!0}),qt=Pn&&Oe.createElement("li",{className:"".concat(zt,"-total-text")},Pn(On,[On===0?0:(Hi-1)*Er+1,Hi*Er>On?On:Hi*Er]));if(ui){Tn&&(typeof Tn=="boolean"?Li=Oe.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},jt.jump_to_confirm):Li=Oe.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Tn),Li=Oe.createElement("li",{title:dn?"".concat(jt.jump_to).concat(Hi,"/").concat(Le):null,className:"".concat(zt,"-simple-pager")},Li));var vn=this.renderPrev(kt);return Oe.createElement("ul",(0,ge.Z)({className:Rt()(zt,"".concat(zt,"-simple"),(0,De.Z)({},"".concat(zt,"-disabled"),Qt),un),style:fn,ref:this.paginationNode},Je),qt,vn?Oe.createElement("li",{title:dn?jt.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:Rt()("".concat(zt,"-prev"),(0,De.Z)({},"".concat(zt,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},vn):null,Oe.createElement("li",{title:dn?"".concat(Hi,"/").concat(Le):null,className:"".concat(zt,"-simple-pager")},Oe.createElement("input",{type:"text",value:$n,disabled:Qt,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:3}),Oe.createElement("span",{className:"".concat(zt,"-slash")},"/"),Le),Oe.createElement("li",{title:dn?jt.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:Rt()("".concat(zt,"-next"),(0,De.Z)({},"".concat(zt,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext($t)),Li)}if(Le<=3+Un*2){var Ft={locale:jt,rootPrefixCls:zt,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:dn,itemRender:pi};Le||Ei.push(Oe.createElement(Qe,(0,ge.Z)({},Ft,{key:"noPager",page:1,className:"".concat(zt,"-item-disabled")})));for(var st=1;st<=Le;st+=1){var on=Hi===st;Ei.push(Oe.createElement(Qe,(0,ge.Z)({},Ft,{key:st,page:st,active:on})))}}else{var En=jn?jt.prev_3:jt.prev_5,Dn=jn?jt.next_3:jt.next_5,Jn=pi(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(bi,"prev page")),St=pi(this.getJumpNextPage(),"jump-next",this.getItemIcon(Xi,"next page"));gi&&(Ri=Jn?Oe.createElement("li",{title:dn?En:null,key:"prev",onClick:this.jumpPrev,tabIndex:0,onKeyPress:this.runIfEnterJumpPrev,className:Rt()("".concat(zt,"-jump-prev"),(0,De.Z)({},"".concat(zt,"-jump-prev-custom-icon"),!!bi))},Jn):null,nn=St?Oe.createElement("li",{title:dn?Dn:null,key:"next",tabIndex:0,onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:Rt()("".concat(zt,"-jump-next"),(0,De.Z)({},"".concat(zt,"-jump-next-custom-icon"),!!Xi))},St):null),yi=Oe.createElement(Qe,{locale:jt,last:!0,rootPrefixCls:zt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Le,page:Le,active:!1,showTitle:dn,itemRender:pi}),di=Oe.createElement(Qe,{locale:jt,rootPrefixCls:zt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:dn,itemRender:pi});var Nn=Math.max(1,Hi-Un),qn=Math.min(Hi+Un,Le);Hi-1<=Un&&(qn=1+Un*2),Le-Hi<=Un&&(Nn=Le-Un*2);for(var Si=Nn;Si<=qn;Si+=1){var en=Hi===Si;Ei.push(Oe.createElement(Qe,{locale:jt,rootPrefixCls:zt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Si,page:Si,active:en,showTitle:dn,itemRender:pi}))}Hi-1>=Un*2&&Hi!==3&&(Ei[0]=(0,Oe.cloneElement)(Ei[0],{className:"".concat(zt,"-item-after-jump-prev")}),Ei.unshift(Ri)),Le-Hi>=Un*2&&Hi!==Le-2&&(Ei[Ei.length-1]=(0,Oe.cloneElement)(Ei[Ei.length-1],{className:"".concat(zt,"-item-before-jump-next")}),Ei.push(nn)),Nn!==1&&Ei.unshift(di),qn!==Le&&Ei.push(yi)}var Cn=!this.hasPrev()||!Le,At=!this.hasNext()||!Le,yn=this.renderPrev(kt),pn=this.renderNext($t);return Oe.createElement("ul",(0,ge.Z)({className:Rt()(zt,un,(0,De.Z)({},"".concat(zt,"-disabled"),Qt)),style:fn,ref:this.paginationNode},Je),qt,yn?Oe.createElement("li",{title:dn?jt.prev_page:null,onClick:this.prev,tabIndex:Cn?null:0,onKeyPress:this.runIfEnterPrev,className:Rt()("".concat(zt,"-prev"),(0,De.Z)({},"".concat(zt,"-disabled"),Cn)),"aria-disabled":Cn},yn):null,Ei,pn?Oe.createElement("li",{title:dn?jt.next_page:null,onClick:this.next,tabIndex:At?null:0,onKeyPress:this.runIfEnterNext,className:Rt()("".concat(zt,"-next"),(0,De.Z)({},"".concat(zt,"-disabled"),At)),"aria-disabled":At},pn):null,Oe.createElement(We,{disabled:Qt,locale:jt,rootPrefixCls:zt,selectComponentClass:ar,selectPrefixCls:Ji,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Hi,pageSize:Er,pageSizeOptions:wr,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Tn}))}}],[{key:"getDerivedStateFromProps",value:function(at,zt){var un={};if("current"in at&&(un.current=at.current,at.current!==zt.current&&(un.currentInputValue=un.current)),"pageSize"in at&&at.pageSize!==zt.pageSize){var fn=zt.current,Qt=it(at.pageSize,zt,at);fn=fn>Qt?Qt:fn,"current"in at||(un.current=fn,un.currentInputValue=fn),un.pageSize=at.pageSize}return un}}]),xt}(Oe.Component);Dt.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:Pt,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:Pt,locale:Be.Z,style:{},itemRender:Et,totalBoundaryShowSizeChanger:50};var ht=Dt,Ht=pe(22075),_t=pe(36355),Vt=pe(19716),ot=pe(8628),Ue=pe(9763),Wt=pe(57809);const Ln=et=>Oe.createElement(Wt.default,Object.assign({},et,{showSearch:!0,size:"small"})),Fn=et=>Oe.createElement(Wt.default,Object.assign({},et,{showSearch:!0,size:"middle"}));Ln.Option=Wt.default.Option,Fn.Option=Wt.default.Option;var Gt=pe(9937),rn=pe(17313),An=pe(83116),ni=pe(37613);const Sn=et=>{const{componentCls:Ye}=et;return{[`${Ye}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${Ye}-item-link`]:{color:et.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${Ye}-item-link`]:{color:et.colorTextDisabled,cursor:"not-allowed"}}},[`&${Ye}-disabled`]:{cursor:"not-allowed",[`${Ye}-item`]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:et.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:et.colorBorder,backgroundColor:et.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:et.itemActiveBgDisabled},a:{color:et.itemActiveColorDisabled}}},[`${Ye}-item-link`]:{color:et.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${Ye}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${Ye}-simple-pager`]:{color:et.colorTextDisabled},[`${Ye}-jump-prev, ${Ye}-jump-next`]:{[`${Ye}-item-link-icon`]:{opacity:0},[`${Ye}-item-ellipsis`]:{opacity:1}}},[`&${Ye}-simple`]:{[`${Ye}-prev, ${Ye}-next`]:{[`&${Ye}-disabled ${Ye}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},Yn=et=>{const{componentCls:Ye}=et;return{[`&${Ye}-mini ${Ye}-total-text, &${Ye}-mini ${Ye}-simple-pager`]:{height:et.itemSizeSM,lineHeight:`${et.itemSizeSM}px`},[`&${Ye}-mini ${Ye}-item`]:{minWidth:et.itemSizeSM,height:et.itemSizeSM,margin:0,lineHeight:`${et.itemSizeSM-2}px`},[`&${Ye}-mini:not(${Ye}-disabled) ${Ye}-item:not(${Ye}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:et.colorBgTextHover},"&:active":{backgroundColor:et.colorBgTextActive}},[`&${Ye}-mini ${Ye}-prev, &${Ye}-mini ${Ye}-next`]:{minWidth:et.itemSizeSM,height:et.itemSizeSM,margin:0,lineHeight:`${et.itemSizeSM}px`},[`&${Ye}-mini:not(${Ye}-disabled)`]:{[`${Ye}-prev, ${Ye}-next`]:{[`&:hover ${Ye}-item-link`]:{backgroundColor:et.colorBgTextHover},[`&:active ${Ye}-item-link`]:{backgroundColor:et.colorBgTextActive},[`&${Ye}-disabled:hover ${Ye}-item-link`]:{backgroundColor:"transparent"}}},[`
|
|
|
&${Ye}-mini ${Ye}-prev ${Ye}-item-link,
|
|
|
&${Ye}-mini ${Ye}-next ${Ye}-item-link
|
|
|
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:et.itemSizeSM,lineHeight:`${et.itemSizeSM}px`}},[`&${Ye}-mini ${Ye}-jump-prev, &${Ye}-mini ${Ye}-jump-next`]:{height:et.itemSizeSM,marginInlineEnd:0,lineHeight:`${et.itemSizeSM}px`},[`&${Ye}-mini ${Ye}-options`]:{marginInlineStart:et.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:et.miniOptionsSizeChangerTop},"&-quick-jumper":{height:et.itemSizeSM,lineHeight:`${et.itemSizeSM}px`,input:Object.assign(Object.assign({},(0,Gt.x0)(et)),{width:et.paginationMiniQuickJumperInputWidth,height:et.controlHeightSM})}}}},It=et=>{const{componentCls:Ye}=et;return{[`
|
|
|
&${Ye}-simple ${Ye}-prev,
|
|
|
&${Ye}-simple ${Ye}-next
|
|
|
`]:{height:et.itemSizeSM,lineHeight:`${et.itemSizeSM}px`,verticalAlign:"top",[`${Ye}-item-link`]:{height:et.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:et.colorBgTextHover},"&:active":{backgroundColor:et.colorBgTextActive},"&::after":{height:et.itemSizeSM,lineHeight:`${et.itemSizeSM}px`}}},[`&${Ye}-simple ${Ye}-simple-pager`]:{display:"inline-block",height:et.itemSizeSM,marginInlineEnd:et.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:et.marginXS,padding:`0 ${et.paginationItemPaddingInline}px`,textAlign:"center",backgroundColor:et.itemInputBg,border:`${et.lineWidth}px ${et.lineType} ${et.colorBorder}`,borderRadius:et.borderRadius,outline:"none",transition:`border-color ${et.motionDurationMid}`,color:"inherit","&:hover":{borderColor:et.colorPrimary},"&:focus":{borderColor:et.colorPrimaryHover,boxShadow:`${et.inputOutlineOffset}px 0 ${et.controlOutlineWidth}px ${et.controlOutline}`},"&[disabled]":{color:et.colorTextDisabled,backgroundColor:et.colorBgContainerDisabled,borderColor:et.colorBorder,cursor:"not-allowed"}}}}},wn=et=>{const{componentCls:Ye}=et;return{[`${Ye}-jump-prev, ${Ye}-jump-next`]:{outline:0,[`${Ye}-item-container`]:{position:"relative",[`${Ye}-item-link-icon`]:{color:et.colorPrimary,fontSize:et.fontSizeSM,opacity:0,transition:`all ${et.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${Ye}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:et.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:et.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:et.paginationEllipsisTextIndent,opacity:1,transition:`all ${et.motionDurationMid}`}},"&:hover":{[`${Ye}-item-link-icon`]:{opacity:1},[`${Ye}-item-ellipsis`]:{opacity:0}}},[`
|
|
|
${Ye}-prev,
|
|
|
${Ye}-jump-prev,
|
|
|
${Ye}-jump-next
|
|
|
`]:{marginInlineEnd:et.marginXS},[`
|
|
|
${Ye}-prev,
|
|
|
${Ye}-next,
|
|
|
${Ye}-jump-prev,
|
|
|
${Ye}-jump-next
|
|
|
`]:{display:"inline-block",minWidth:et.itemSize,height:et.itemSize,color:et.colorText,fontFamily:et.fontFamily,lineHeight:`${et.itemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:et.borderRadius,cursor:"pointer",transition:`all ${et.motionDurationMid}`},[`${Ye}-prev, ${Ye}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:et.colorText,cursor:"pointer",userSelect:"none"},[`${Ye}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:et.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${et.lineWidth}px ${et.lineType} transparent`,borderRadius:et.borderRadius,outline:"none",transition:`all ${et.motionDurationMid}`},[`&:hover ${Ye}-item-link`]:{backgroundColor:et.colorBgTextHover},[`&:active ${Ye}-item-link`]:{backgroundColor:et.colorBgTextActive},[`&${Ye}-disabled:hover`]:{[`${Ye}-item-link`]:{backgroundColor:"transparent"}}},[`${Ye}-slash`]:{marginInlineEnd:et.paginationSlashMarginInlineEnd,marginInlineStart:et.paginationSlashMarginInlineStart},[`${Ye}-options`]:{display:"inline-block",marginInlineStart:et.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:et.controlHeight,marginInlineStart:et.marginXS,lineHeight:`${et.controlHeight}px`,verticalAlign:"top",input:Object.assign(Object.assign({},(0,Gt.ik)(et)),{width:et.controlHeightLG*1.25,height:et.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:et.marginXS,marginInlineEnd:et.marginXS})}}}},Gn=et=>{const{componentCls:Ye}=et;return{[`${Ye}-item`]:{display:"inline-block",minWidth:et.itemSize,height:et.itemSize,marginInlineEnd:et.marginXS,fontFamily:et.fontFamily,lineHeight:`${et.itemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${et.lineWidth}px ${et.lineType} transparent`,borderRadius:et.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${et.paginationItemPaddingInline}px`,color:et.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${Ye}-item-active)`]:{"&:hover":{transition:`all ${et.motionDurationMid}`,backgroundColor:et.colorBgTextHover},"&:active":{backgroundColor:et.colorBgTextActive}},"&-active":{fontWeight:et.fontWeightStrong,backgroundColor:et.itemActiveBg,borderColor:et.colorPrimary,a:{color:et.colorPrimary},"&:hover":{borderColor:et.colorPrimaryHover},"&:hover a":{color:et.colorPrimaryHover}}}}},ze=et=>{const{componentCls:Ye}=et;return{[Ye]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,rn.Wf)(et)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${Ye}-total-text`]:{display:"inline-block",height:et.itemSize,marginInlineEnd:et.marginXS,lineHeight:`${et.itemSize-2}px`,verticalAlign:"middle"}}),Gn(et)),wn(et)),It(et)),Yn(et)),Sn(et)),{[`@media only screen and (max-width: ${et.screenLG}px)`]:{[`${Ye}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${et.screenSM}px)`]:{[`${Ye}-options`]:{display:"none"}}}),[`&${et.componentCls}-rtl`]:{direction:"rtl"}}},Ee=et=>{const{componentCls:Ye}=et;return{[`${Ye}${Ye}-disabled:not(${Ye}-mini)`]:{"&, &:hover":{[`${Ye}-item-link`]:{borderColor:et.colorBorder}},"&:focus-visible":{[`${Ye}-item-link`]:{borderColor:et.colorBorder}},[`${Ye}-item, ${Ye}-item-link`]:{backgroundColor:et.colorBgContainerDisabled,borderColor:et.colorBorder,[`&:hover:not(${Ye}-item-active)`]:{backgroundColor:et.colorBgContainerDisabled,borderColor:et.colorBorder,a:{color:et.colorTextDisabled}},[`&${Ye}-item-active`]:{backgroundColor:et.itemActiveBgDisabled}},[`${Ye}-prev, ${Ye}-next`]:{"&:hover button":{backgroundColor:et.colorBgContainerDisabled,borderColor:et.colorBorder,color:et.colorTextDisabled},[`${Ye}-item-link`]:{backgroundColor:et.colorBgContainerDisabled,borderColor:et.colorBorder}}},[`${Ye}:not(${Ye}-mini)`]:{[`${Ye}-prev, ${Ye}-next`]:{"&:hover button":{borderColor:et.colorPrimaryHover,backgroundColor:et.itemBg},[`${Ye}-item-link`]:{backgroundColor:et.itemLinkBg,borderColor:et.colorBorder},[`&:hover ${Ye}-item-link`]:{borderColor:et.colorPrimary,backgroundColor:et.itemBg,color:et.colorPrimary},[`&${Ye}-disabled`]:{[`${Ye}-item-link`]:{borderColor:et.colorBorder,color:et.colorTextDisabled}}},[`${Ye}-item`]:{backgroundColor:et.itemBg,border:`${et.lineWidth}px ${et.lineType} ${et.colorBorder}`,[`&:hover:not(${Ye}-item-active)`]:{borderColor:et.colorPrimary,backgroundColor:et.itemBg,a:{color:et.colorPrimary}},"&-active":{borderColor:et.colorPrimary}}}}},Pe=et=>{const{componentCls:Ye}=et;return{[`${Ye}:not(${Ye}-disabled)`]:{[`${Ye}-item`]:Object.assign({},(0,rn.Qy)(et)),[`${Ye}-jump-prev, ${Ye}-jump-next`]:{"&:focus-visible":Object.assign({[`${Ye}-item-link-icon`]:{opacity:1},[`${Ye}-item-ellipsis`]:{opacity:0}},(0,rn.oN)(et))},[`${Ye}-prev, ${Ye}-next`]:{[`&:focus-visible ${Ye}-item-link`]:Object.assign({},(0,rn.oN)(et))}}}};var Fe=(0,An.Z)("Pagination",et=>{const Ye=(0,ni.TS)(et,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:et.marginXXS/2,paginationMiniQuickJumperInputWidth:et.controlHeightLG*1.1,paginationItemPaddingInline:et.marginXXS*1.5,paginationEllipsisLetterSpacing:et.marginXXS/2,paginationSlashMarginInlineStart:et.marginXXS,paginationSlashMarginInlineEnd:et.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,Gt.e5)(et),(0,Gt.TM)(et));return[ze(Ye),Pe(Ye),et.wireframe&&Ee(Ye)]},et=>({itemBg:et.colorBgContainer,itemSize:et.controlHeight,itemSizeSM:et.controlHeightSM,itemActiveBg:et.colorBgContainer,itemLinkBg:et.colorBgContainer,itemActiveColorDisabled:et.colorTextDisabled,itemActiveBgDisabled:et.controlItemBgActiveDisabled,itemInputBg:et.colorBgContainer,miniOptionsSizeChangerTop:0})),Ae=function(et,Ye){var xt={};for(var yt in et)Object.prototype.hasOwnProperty.call(et,yt)&&Ye.indexOf(yt)<0&&(xt[yt]=et[yt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var at=0,yt=Object.getOwnPropertySymbols(et);at<yt.length;at++)Ye.indexOf(yt[at])<0&&Object.prototype.propertyIsEnumerable.call(et,yt[at])&&(xt[yt[at]]=et[yt[at]]);return xt},qe=et=>{const{prefixCls:Ye,selectPrefixCls:xt,className:yt,rootClassName:at,style:zt,size:un,locale:fn,selectComponentClass:Qt,responsive:Kn,showSizeChanger:On}=et,jt=Ae(et,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:sn}=(0,ot.Z)(Kn),{getPrefixCls:jn,direction:dn,pagination:Pn={}}=Oe.useContext(_t.E_),ui=jn("pagination",Ye),[pi,gi]=Fe(ui),bi=On!=null?On:Pn.showSizeChanger,Xi=Oe.useMemo(()=>{const Le=Oe.createElement("span",{className:`${ui}-item-ellipsis`},"\u2022\u2022\u2022"),Ei=Oe.createElement("button",{className:`${ui}-item-link`,type:"button",tabIndex:-1},dn==="rtl"?Oe.createElement(Lt.Z,null):Oe.createElement(Ve.Z,null)),Ri=Oe.createElement("button",{className:`${ui}-item-link`,type:"button",tabIndex:-1},dn==="rtl"?Oe.createElement(Ve.Z,null):Oe.createElement(Lt.Z,null)),nn=Oe.createElement("a",{className:`${ui}-item-link`},Oe.createElement("div",{className:`${ui}-item-container`},dn==="rtl"?Oe.createElement(Ct.Z,{className:`${ui}-item-link-icon`}):Oe.createElement(Tt,{className:`${ui}-item-link-icon`}),Le)),di=Oe.createElement("a",{className:`${ui}-item-link`},Oe.createElement("div",{className:`${ui}-item-container`},dn==="rtl"?Oe.createElement(Tt,{className:`${ui}-item-link-icon`}):Oe.createElement(Ct.Z,{className:`${ui}-item-link-icon`}),Le));return{prevIcon:Ei,nextIcon:Ri,jumpPrevIcon:nn,jumpNextIcon:di}},[dn,ui]),[ar]=(0,Ue.Z)("Pagination",Ht.Z),Ji=Object.assign(Object.assign({},ar),fn),wr=(0,Vt.Z)(un),mr=wr==="small"||!!(sn&&!wr&&Kn),Hi=jn("select",xt),Er=Rt()({[`${ui}-mini`]:mr,[`${ui}-rtl`]:dn==="rtl"},Pn==null?void 0:Pn.className,yt,at,gi),$n=Object.assign(Object.assign({},Pn==null?void 0:Pn.style),zt);return pi(Oe.createElement(ht,Object.assign({},Xi,jt,{style:$n,prefixCls:ui,selectPrefixCls:Hi,className:Er,selectComponentClass:Qt||(mr?Ln:Fn),locale:Ji,showSizeChanger:bi})))},vt=qe},39722:function(Vn,xn,pe){"use strict";pe.d(xn,{t5:function(){return Ve}});var ge=pe(92310),Oe=pe.n(ge),Ke=pe(55477),ut=pe(59301),Ge=pe(36355),Xe=pe(77578),Ne=pe(17356),Tt=function(dt,Rt){var De={};for(var ne in dt)Object.prototype.hasOwnProperty.call(dt,ne)&&Rt.indexOf(ne)<0&&(De[ne]=dt[ne]);if(dt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ee=0,ne=Object.getOwnPropertySymbols(dt);ee<ne.length;ee++)Rt.indexOf(ne[ee])<0&&Object.prototype.propertyIsEnumerable.call(dt,ne[ee])&&(De[ne[ee]]=dt[ne[ee]]);return De};const Ct=(dt,Rt,De)=>{if(!(!Rt&&!De))return ut.createElement(ut.Fragment,null,Rt&&ut.createElement("div",{className:`${dt}-title`},(0,Xe.Z)(Rt)),ut.createElement("div",{className:`${dt}-inner-content`},(0,Xe.Z)(De)))},Ve=dt=>{const{hashId:Rt,prefixCls:De,className:ne,style:ee,placement:ce="top",title:se,content:he,children:ve}=dt;return ut.createElement("div",{className:Oe()(Rt,De,`${De}-pure`,`${De}-placement-${ce}`,ne),style:ee},ut.createElement("div",{className:`${De}-arrow`}),ut.createElement(Ke.G,Object.assign({},dt,{className:Rt,prefixCls:De}),ve||Ct(De,se,he)))},Lt=dt=>{const{prefixCls:Rt}=dt,De=Tt(dt,["prefixCls"]),{getPrefixCls:ne}=ut.useContext(Ge.E_),ee=ne("popover",Rt),[ce,se]=(0,Ne.Z)(ee);return ce(ut.createElement(Ve,Object.assign({},De,{prefixCls:ee,hashId:se})))};xn.ZP=Lt},60324:function(Vn,xn,pe){"use strict";var ge=pe(92310),Oe=pe.n(ge),Ke=pe(59301),ut=pe(77578),Ge=pe(62892),Xe=pe(36355),Ne=pe(6848),Tt=pe(39722),Ct=pe(17356),Ve=function(Rt,De){var ne={};for(var ee in Rt)Object.prototype.hasOwnProperty.call(Rt,ee)&&De.indexOf(ee)<0&&(ne[ee]=Rt[ee]);if(Rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ce=0,ee=Object.getOwnPropertySymbols(Rt);ce<ee.length;ce++)De.indexOf(ee[ce])<0&&Object.prototype.propertyIsEnumerable.call(Rt,ee[ce])&&(ne[ee[ce]]=Rt[ee[ce]]);return ne};const Lt=Rt=>{let{title:De,content:ne,prefixCls:ee}=Rt;return Ke.createElement(Ke.Fragment,null,De&&Ke.createElement("div",{className:`${ee}-title`},(0,ut.Z)(De)),Ke.createElement("div",{className:`${ee}-inner-content`},(0,ut.Z)(ne)))},dt=Ke.forwardRef((Rt,De)=>{const{prefixCls:ne,title:ee,content:ce,overlayClassName:se,placement:he="top",trigger:ve="hover",mouseEnterDelay:be=.1,mouseLeaveDelay:ke=.1,overlayStyle:Be={}}=Rt,He=Ve(Rt,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:We}=Ke.useContext(Xe.E_),rt=We("popover",ne),[Qe,Pt]=(0,Ct.Z)(rt),Ze=We(),Et=Oe()(se,Pt);return Qe(Ke.createElement(Ne.Z,Object.assign({placement:he,trigger:ve,mouseEnterDelay:be,mouseLeaveDelay:ke,overlayStyle:Be},He,{prefixCls:rt,overlayClassName:Et,ref:De,overlay:ee||ce?Ke.createElement(Lt,{prefixCls:rt,title:ee,content:ce}):null,transitionName:(0,Ge.m)(Ze,"zoom-big",He.transitionName),"data-popover-inject":!0})))});dt._InternalPanelDoNotUseOrYouWillBeFired=Tt.ZP,xn.Z=dt},17356:function(Vn,xn,pe){"use strict";var ge=pe(17313),Oe=pe(29878),Ke=pe(19447),ut=pe(33166),Ge=pe(83116),Xe=pe(37613);const Ne=Ve=>{const{componentCls:Lt,popoverColor:dt,minWidth:Rt,fontWeightStrong:De,popoverPadding:ne,boxShadowSecondary:ee,colorTextHeading:ce,borderRadiusLG:se,zIndexPopup:he,marginXS:ve,colorBgElevated:be,popoverBg:ke}=Ve;return[{[Lt]:Object.assign(Object.assign({},(0,ge.Wf)(Ve)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:he,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":be,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${Lt}-content`]:{position:"relative"},[`${Lt}-inner`]:{backgroundColor:ke,backgroundClip:"padding-box",borderRadius:se,boxShadow:ee,padding:ne},[`${Lt}-title`]:{minWidth:Rt,marginBottom:ve,color:ce,fontWeight:De},[`${Lt}-inner-content`]:{color:dt}})},(0,Ke.ZP)(Ve,{colorBg:"var(--antd-arrow-background-color)"}),{[`${Lt}-pure`]:{position:"relative",maxWidth:"none",margin:Ve.sizePopupArrow,display:"inline-block",[`${Lt}-content`]:{display:"inline-block"}}}]},Tt=Ve=>{const{componentCls:Lt}=Ve;return{[Lt]:ut.i.map(dt=>{const Rt=Ve[`${dt}6`];return{[`&${Lt}-${dt}`]:{"--antd-arrow-background-color":Rt,[`${Lt}-inner`]:{backgroundColor:Rt},[`${Lt}-arrow`]:{background:"transparent"}}}})}},Ct=Ve=>{const{componentCls:Lt,lineWidth:dt,lineType:Rt,colorSplit:De,paddingSM:ne,controlHeight:ee,fontSize:ce,lineHeight:se,padding:he}=Ve,ve=ee-Math.round(ce*se),be=ve/2,ke=ve/2-dt,Be=he;return{[Lt]:{[`${Lt}-inner`]:{padding:0},[`${Lt}-title`]:{margin:0,padding:`${be}px ${Be}px ${ke}px`,borderBottom:`${dt}px ${Rt} ${De}`},[`${Lt}-inner-content`]:{padding:`${ne}px ${Be}px`}}}};xn.Z=(0,Ge.Z)("Popover",Ve=>{const{colorBgElevated:Lt,colorText:dt,wireframe:Rt}=Ve,De=(0,Xe.TS)(Ve,{popoverPadding:12,popoverBg:Lt,popoverColor:dt});return[Ne(De),Tt(De),Rt&&Ct(De),(0,Oe._y)(De,"zoom-big")]},Ve=>({width:177,minWidth:177,zIndexPopup:Ve.zIndexPopupBase+30}),{resetStyle:!1,deprecatedTokens:[["width","minWidth"]]})},93948:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return On}});var ge=pe(59301),Oe=pe(29679),Ke=pe(40001),ut=pe(19248),Ge=pe(99267),Xe=pe(92310),Ne=pe.n(Xe),Tt=pe(2738),Ct=pe(36355),Ve=pe(96663),Lt=pe(44127),dt=pe(6620),Rt={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},De=function(){var sn=(0,ge.useRef)([]),jn=(0,ge.useRef)(null);return(0,ge.useEffect)(function(){var dn=Date.now(),Pn=!1;sn.current.forEach(function(ui){if(ui){Pn=!0;var pi=ui.style;pi.transitionDuration=".3s, .3s, .3s, .06s",jn.current&&dn-jn.current<100&&(pi.transitionDuration="0s, 0s")}}),Pn&&(jn.current=Date.now())}),sn.current},ne=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],ee=function(sn){var jn=(0,Lt.Z)((0,Lt.Z)({},Rt),sn),dn=jn.className,Pn=jn.percent,ui=jn.prefixCls,pi=jn.strokeColor,gi=jn.strokeLinecap,bi=jn.strokeWidth,Xi=jn.style,ar=jn.trailColor,Ji=jn.trailWidth,wr=jn.transition,mr=(0,dt.Z)(jn,ne);delete mr.gapPosition;var Hi=Array.isArray(Pn)?Pn:[Pn],Er=Array.isArray(pi)?pi:[pi],$n=De(),Le=bi/2,Ei=100-bi/2,Ri="M ".concat(gi==="round"?Le:0,",").concat(Le,`
|
|
|
L `).concat(gi==="round"?Ei:100,",").concat(Le),nn="0 0 100 ".concat(bi),di=0;return ge.createElement("svg",(0,Ve.Z)({className:Ne()("".concat(ui,"-line"),dn),viewBox:nn,preserveAspectRatio:"none",style:Xi},mr),ge.createElement("path",{className:"".concat(ui,"-line-trail"),d:Ri,strokeLinecap:gi,stroke:ar,strokeWidth:Ji||bi,fillOpacity:"0"}),Hi.map(function(yi,Li){var Tn=1;switch(gi){case"round":Tn=1-bi/100;break;case"square":Tn=1-bi/2/100;break;default:Tn=1;break}var Un={strokeDasharray:"".concat(yi*Tn,"px, 100px"),strokeDashoffset:"-".concat(di,"px"),transition:wr||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},kt=Er[Li]||Er[Er.length-1];return di+=yi,ge.createElement("path",{key:Li,className:"".concat(ui,"-line-path"),d:Ri,strokeLinecap:gi,stroke:kt,strokeWidth:bi,fillOpacity:"0",ref:function(Je){$n[Li]=Je},style:Un})}))},ce=ee,se=pe(20135),he=pe(72071),ve=pe(47273),be=0,ke=(0,ve.Z)();function Be(){var jt;return ke?(jt=be,be+=1):jt="TEST_OR_SSR",jt}var He=function(jt){var sn=ge.useState(),jn=(0,he.Z)(sn,2),dn=jn[0],Pn=jn[1];return ge.useEffect(function(){Pn("rc_progress_".concat(Be()))},[]),jt||dn},We=function(sn){var jn=sn.bg,dn=sn.children;return ge.createElement("div",{style:{width:"100%",height:"100%",background:jn}},dn)};function rt(jt,sn){return Object.keys(jt).map(function(jn){var dn=parseFloat(jn),Pn="".concat(Math.floor(dn*sn),"%");return"".concat(jt[jn]," ").concat(Pn)})}var Qe=ge.forwardRef(function(jt,sn){var jn=jt.prefixCls,dn=jt.color,Pn=jt.gradientId,ui=jt.radius,pi=jt.style,gi=jt.ptg,bi=jt.strokeLinecap,Xi=jt.strokeWidth,ar=jt.size,Ji=jt.gapDegree,wr=dn&&(0,se.Z)(dn)==="object",mr=wr?"#FFF":void 0,Hi=ar/2,Er=ge.createElement("circle",{className:"".concat(jn,"-circle-path"),r:ui,cx:Hi,cy:Hi,stroke:mr,strokeLinecap:bi,strokeWidth:Xi,opacity:gi===0?0:1,style:pi,ref:sn});if(!wr)return Er;var $n="".concat(Pn,"-conic"),Le=Ji?"".concat(180+Ji/2,"deg"):"0deg",Ei=rt(dn,(360-Ji)/360),Ri=rt(dn,1),nn="conic-gradient(from ".concat(Le,", ").concat(Ei.join(", "),")"),di="linear-gradient(to ".concat(Ji?"bottom":"top",", ").concat(Ri.join(", "),")");return ge.createElement(ge.Fragment,null,ge.createElement("mask",{id:$n},Er),ge.createElement("foreignObject",{x:0,y:0,width:ar,height:ar,mask:"url(#".concat($n,")")},ge.createElement(We,{bg:di},ge.createElement(We,{bg:nn}))))}),Pt=Qe,Ze=100,Et=function(sn,jn,dn,Pn,ui,pi,gi,bi,Xi,ar){var Ji=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,wr=dn/100*360*((360-pi)/360),mr=pi===0?0:{bottom:0,top:180,left:90,right:-90}[gi],Hi=(100-Pn)/100*jn;Xi==="round"&&Pn!==100&&(Hi+=ar/2,Hi>=jn&&(Hi=jn-.01));var Er=Ze/2;return{stroke:typeof bi=="string"?bi:void 0,strokeDasharray:"".concat(jn,"px ").concat(sn),strokeDashoffset:Hi+Ji,transform:"rotate(".concat(ui+wr+mr,"deg)"),transformOrigin:"".concat(Er,"px ").concat(Er,"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}},it=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function Dt(jt){var sn=jt!=null?jt:[];return Array.isArray(sn)?sn:[sn]}var ht=function(sn){var jn=(0,Lt.Z)((0,Lt.Z)({},Rt),sn),dn=jn.id,Pn=jn.prefixCls,ui=jn.steps,pi=jn.strokeWidth,gi=jn.trailWidth,bi=jn.gapDegree,Xi=bi===void 0?0:bi,ar=jn.gapPosition,Ji=jn.trailColor,wr=jn.strokeLinecap,mr=jn.style,Hi=jn.className,Er=jn.strokeColor,$n=jn.percent,Le=(0,dt.Z)(jn,it),Ei=Ze/2,Ri=He(dn),nn="".concat(Ri,"-gradient"),di=Ei-pi/2,yi=Math.PI*2*di,Li=Xi>0?90+Xi/2:-90,Tn=yi*((360-Xi)/360),Un=(0,se.Z)(ui)==="object"?ui:{count:ui,space:2},kt=Un.count,$t=Un.space,Je=Dt($n),qt=Dt(Er),vn=qt.find(function(St){return St&&(0,se.Z)(St)==="object"}),Ft=vn&&(0,se.Z)(vn)==="object",st=Ft?"butt":wr,on=Et(yi,Tn,0,100,Li,Xi,ar,Ji,st,pi),En=De(),Dn=function(){var Nn=0;return Je.map(function(qn,Si){var en=qt[Si]||qt[qt.length-1],Cn=Et(yi,Tn,Nn,qn,Li,Xi,ar,en,st,pi);return Nn+=qn,ge.createElement(Pt,{key:Si,color:en,ptg:qn,radius:di,prefixCls:Pn,gradientId:nn,style:Cn,strokeLinecap:st,strokeWidth:pi,gapDegree:Xi,ref:function(yn){En[Si]=yn},size:Ze})}).reverse()},Jn=function(){var Nn=Math.round(kt*(Je[0]/100)),qn=100/kt,Si=0;return new Array(kt).fill(null).map(function(en,Cn){var At=Cn<=Nn-1?qt[0]:Ji,yn=At&&(0,se.Z)(At)==="object"?"url(#".concat(nn,")"):void 0,pn=Et(yi,Tn,Si,qn,Li,Xi,ar,At,"butt",pi,$t);return Si+=(Tn-pn.strokeDashoffset+$t)*100/Tn,ge.createElement("circle",{key:Cn,className:"".concat(Pn,"-circle-path"),r:di,cx:Ei,cy:Ei,stroke:yn,strokeWidth:pi,opacity:1,style:pn,ref:function(Wn){En[Cn]=Wn}})})};return ge.createElement("svg",(0,Ve.Z)({className:Ne()("".concat(Pn,"-circle"),Hi),viewBox:"0 0 ".concat(Ze," ").concat(Ze),style:mr,id:dn,role:"presentation"},Le),!kt&&ge.createElement("circle",{className:"".concat(Pn,"-circle-trail"),r:di,cx:Ei,cy:Ei,stroke:Ji,strokeLinecap:st,strokeWidth:gi||pi,style:on}),kt?Jn():Dn())},Ht=ht,_t={Line:ce,Circle:Ht},Vt=pe(6848),ot=pe(93398);function Ue(jt){return!jt||jt<0?0:jt>100?100:jt}function Wt(jt){let{success:sn,successPercent:jn}=jt,dn=jn;return sn&&"progress"in sn&&(dn=sn.progress),sn&&"percent"in sn&&(dn=sn.percent),dn}const Ln=jt=>{let{percent:sn,success:jn,successPercent:dn}=jt;const Pn=Ue(Wt({success:jn,successPercent:dn}));return[Pn,Ue(Ue(sn)-Pn)]},Fn=jt=>{let{success:sn={},strokeColor:jn}=jt;const{strokeColor:dn}=sn;return[dn||ot.presetPrimaryColors.green,jn||null]},Gt=(jt,sn,jn)=>{var dn,Pn,ui,pi;let gi=-1,bi=-1;if(sn==="step"){const Xi=jn.steps,ar=jn.strokeWidth;typeof jt=="string"||typeof jt=="undefined"?(gi=jt==="small"?2:14,bi=ar!=null?ar:8):typeof jt=="number"?[gi,bi]=[jt,jt]:[gi=14,bi=8]=jt,gi*=Xi}else if(sn==="line"){const Xi=jn==null?void 0:jn.strokeWidth;typeof jt=="string"||typeof jt=="undefined"?bi=Xi||(jt==="small"?6:8):typeof jt=="number"?[gi,bi]=[jt,jt]:[gi=-1,bi=8]=jt}else(sn==="circle"||sn==="dashboard")&&(typeof jt=="string"||typeof jt=="undefined"?[gi,bi]=jt==="small"?[60,60]:[120,120]:typeof jt=="number"?[gi,bi]=[jt,jt]:(gi=(Pn=(dn=jt[0])!==null&&dn!==void 0?dn:jt[1])!==null&&Pn!==void 0?Pn:120,bi=(pi=(ui=jt[0])!==null&&ui!==void 0?ui:jt[1])!==null&&pi!==void 0?pi:120));return[gi,bi]},rn=3,An=jt=>rn/jt*100;var Sn=jt=>{const{prefixCls:sn,trailColor:jn=null,strokeLinecap:dn="round",gapPosition:Pn,gapDegree:ui,width:pi=120,type:gi,children:bi,success:Xi,size:ar=pi}=jt,[Ji,wr]=Gt(ar,"circle");let{strokeWidth:mr}=jt;mr===void 0&&(mr=Math.max(An(Ji),6));const Hi={width:Ji,height:wr,fontSize:Ji*.15+6},Er=ge.useMemo(()=>{if(ui||ui===0)return ui;if(gi==="dashboard")return 75},[ui,gi]),$n=Pn||gi==="dashboard"&&"bottom"||void 0,Le=Object.prototype.toString.call(jt.strokeColor)==="[object Object]",Ei=Fn({success:Xi,strokeColor:jt.strokeColor}),Ri=Ne()(`${sn}-inner`,{[`${sn}-circle-gradient`]:Le}),nn=ge.createElement(Ht,{percent:Ln(jt),strokeWidth:mr,trailWidth:mr,strokeColor:Ei,strokeLinecap:dn,trailColor:jn,prefixCls:sn,gapDegree:Er,gapPosition:$n});return ge.createElement("div",{className:Ri,style:Hi},Ji<=20?ge.createElement(Vt.Z,{title:bi},ge.createElement("span",null,nn)):ge.createElement(ge.Fragment,null,nn,bi))},Yn=function(jt,sn){var jn={};for(var dn in jt)Object.prototype.hasOwnProperty.call(jt,dn)&&sn.indexOf(dn)<0&&(jn[dn]=jt[dn]);if(jt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Pn=0,dn=Object.getOwnPropertySymbols(jt);Pn<dn.length;Pn++)sn.indexOf(dn[Pn])<0&&Object.prototype.propertyIsEnumerable.call(jt,dn[Pn])&&(jn[dn[Pn]]=jt[dn[Pn]]);return jn};const It=jt=>{let sn=[];return Object.keys(jt).forEach(jn=>{const dn=parseFloat(jn.replace(/%/g,""));isNaN(dn)||sn.push({key:dn,value:jt[jn]})}),sn=sn.sort((jn,dn)=>jn.key-dn.key),sn.map(jn=>{let{key:dn,value:Pn}=jn;return`${Pn} ${dn}%`}).join(", ")},wn=(jt,sn)=>{const{from:jn=ot.presetPrimaryColors.blue,to:dn=ot.presetPrimaryColors.blue,direction:Pn=sn==="rtl"?"to left":"to right"}=jt,ui=Yn(jt,["from","to","direction"]);if(Object.keys(ui).length!==0){const pi=It(ui);return{backgroundImage:`linear-gradient(${Pn}, ${pi})`}}return{backgroundImage:`linear-gradient(${Pn}, ${jn}, ${dn})`}};var ze=jt=>{const{prefixCls:sn,direction:jn,percent:dn,size:Pn,strokeWidth:ui,strokeColor:pi,strokeLinecap:gi="round",children:bi,trailColor:Xi=null,success:ar}=jt,Ji=pi&&typeof pi!="string"?wn(pi,jn):{backgroundColor:pi},wr=gi==="square"||gi==="butt"?0:void 0,mr={backgroundColor:Xi||void 0,borderRadius:wr},Hi=Pn!=null?Pn:[-1,ui||(Pn==="small"?6:8)],[Er,$n]=Gt(Hi,"line",{strokeWidth:ui}),Le=Object.assign({width:`${Ue(dn)}%`,height:$n,borderRadius:wr},Ji),Ei=Wt(jt),Ri={width:`${Ue(Ei)}%`,height:$n,borderRadius:wr,backgroundColor:ar==null?void 0:ar.strokeColor},nn={width:Er<0?"100%":Er,height:$n};return ge.createElement(ge.Fragment,null,ge.createElement("div",{className:`${sn}-outer`,style:nn},ge.createElement("div",{className:`${sn}-inner`,style:mr},ge.createElement("div",{className:`${sn}-bg`,style:Le}),Ei!==void 0?ge.createElement("div",{className:`${sn}-success-bg`,style:Ri}):null)),bi)},Pe=jt=>{const{size:sn,steps:jn,percent:dn=0,strokeWidth:Pn=8,strokeColor:ui,trailColor:pi=null,prefixCls:gi,children:bi}=jt,Xi=Math.round(jn*(dn/100)),ar=sn==="small"?2:14,Ji=sn!=null?sn:[ar,Pn],[wr,mr]=Gt(Ji,"step",{steps:jn,strokeWidth:Pn}),Hi=wr/jn,Er=new Array(jn);for(let $n=0;$n<jn;$n++){const Le=Array.isArray(ui)?ui[$n]:ui;Er[$n]=ge.createElement("div",{key:$n,className:Ne()(`${gi}-steps-item`,{[`${gi}-steps-item-active`]:$n<=Xi-1}),style:{backgroundColor:$n<=Xi-1?Le:pi,width:Hi,height:mr}})}return ge.createElement("div",{className:`${gi}-steps-outer`},Er,bi)},Fe=pe(93083),Ae=pe(17313),ye=pe(83116),qe=pe(37613);const vt=jt=>{const sn=jt?"100%":"-100%";return new Fe.Keyframes(`antProgress${jt?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${sn}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${sn}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},et=jt=>{const{componentCls:sn,iconCls:jn}=jt;return{[sn]:Object.assign(Object.assign({},(0,Ae.Wf)(jt)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:jt.fontSize,marginInlineEnd:jt.marginXS,marginBottom:jt.marginXS},[`${sn}-outer`]:{display:"inline-block",width:"100%"},[`&${sn}-show-info`]:{[`${sn}-outer`]:{marginInlineEnd:`calc(-2em - ${jt.marginXS}px)`,paddingInlineEnd:`calc(2em + ${jt.paddingXS}px)`}},[`${sn}-inner`]:{position:"relative",display:"inline-block",width:"100%",overflow:"hidden",verticalAlign:"middle",backgroundColor:jt.remainingColor,borderRadius:jt.lineBorderRadius},[`${sn}-inner:not(${sn}-circle-gradient)`]:{[`${sn}-circle-path`]:{stroke:jt.defaultColor}},[`${sn}-success-bg, ${sn}-bg`]:{position:"relative",backgroundColor:jt.defaultColor,borderRadius:jt.lineBorderRadius,transition:`all ${jt.motionDurationSlow} ${jt.motionEaseInOutCirc}`},[`${sn}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:jt.colorSuccess},[`${sn}-text`]:{display:"inline-block",width:"2em",marginInlineStart:jt.marginXS,color:jt.colorText,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[jn]:{fontSize:jt.fontSize}},[`&${sn}-status-active`]:{[`${sn}-bg::before`]:{position:"absolute",inset:0,backgroundColor:jt.colorBgContainer,borderRadius:jt.lineBorderRadius,opacity:0,animationName:vt(),animationDuration:jt.progressActiveMotionDuration,animationTimingFunction:jt.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${sn}-rtl${sn}-status-active`]:{[`${sn}-bg::before`]:{animationName:vt(!0)}},[`&${sn}-status-exception`]:{[`${sn}-bg`]:{backgroundColor:jt.colorError},[`${sn}-text`]:{color:jt.colorError}},[`&${sn}-status-exception ${sn}-inner:not(${sn}-circle-gradient)`]:{[`${sn}-circle-path`]:{stroke:jt.colorError}},[`&${sn}-status-success`]:{[`${sn}-bg`]:{backgroundColor:jt.colorSuccess},[`${sn}-text`]:{color:jt.colorSuccess}},[`&${sn}-status-success ${sn}-inner:not(${sn}-circle-gradient)`]:{[`${sn}-circle-path`]:{stroke:jt.colorSuccess}}})}},Ye=jt=>{const{componentCls:sn,iconCls:jn}=jt;return{[sn]:{[`${sn}-circle-trail`]:{stroke:jt.remainingColor},[`&${sn}-circle ${sn}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${sn}-circle ${sn}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:jt.circleTextColor,fontSize:jt.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[jn]:{fontSize:`${jt.fontSize/jt.fontSizeSM}em`}},[`${sn}-circle&-status-exception`]:{[`${sn}-text`]:{color:jt.colorError}},[`${sn}-circle&-status-success`]:{[`${sn}-text`]:{color:jt.colorSuccess}}},[`${sn}-inline-circle`]:{lineHeight:1,[`${sn}-inner`]:{verticalAlign:"bottom"}}}},xt=jt=>{const{componentCls:sn}=jt;return{[sn]:{[`${sn}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:jt.progressStepMinWidth,marginInlineEnd:jt.progressStepMarginInlineEnd,backgroundColor:jt.remainingColor,transition:`all ${jt.motionDurationSlow}`,"&-active":{backgroundColor:jt.defaultColor}}}}}},yt=jt=>{const{componentCls:sn,iconCls:jn}=jt;return{[sn]:{[`${sn}-small&-line, ${sn}-small&-line ${sn}-text ${jn}`]:{fontSize:jt.fontSizeSM}}}};var at=(0,ye.Z)("Progress",jt=>{const sn=jt.marginXXS/2,jn=(0,qe.TS)(jt,{progressStepMarginInlineEnd:sn,progressStepMinWidth:sn,progressActiveMotionDuration:"2.4s"});return[et(jn),Ye(jn),xt(jn),yt(jn)]},jt=>({circleTextColor:jt.colorText,defaultColor:jt.colorInfo,remainingColor:jt.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em"})),zt=function(jt,sn){var jn={};for(var dn in jt)Object.prototype.hasOwnProperty.call(jt,dn)&&sn.indexOf(dn)<0&&(jn[dn]=jt[dn]);if(jt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Pn=0,dn=Object.getOwnPropertySymbols(jt);Pn<dn.length;Pn++)sn.indexOf(dn[Pn])<0&&Object.prototype.propertyIsEnumerable.call(jt,dn[Pn])&&(jn[dn[Pn]]=jt[dn[Pn]]);return jn};const un=null,fn=["normal","exception","active","success"];var Kn=ge.forwardRef((jt,sn)=>{const{prefixCls:jn,className:dn,rootClassName:Pn,steps:ui,strokeColor:pi,percent:gi=0,size:bi="default",showInfo:Xi=!0,type:ar="line",status:Ji,format:wr,style:mr}=jt,Hi=zt(jt,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style"]),Er=ge.useMemo(()=>{var Je,qt;const vn=Wt(jt);return parseInt(vn!==void 0?(Je=vn!=null?vn:0)===null||Je===void 0?void 0:Je.toString():(qt=gi!=null?gi:0)===null||qt===void 0?void 0:qt.toString(),10)},[gi,jt.success,jt.successPercent]),$n=ge.useMemo(()=>!fn.includes(Ji)&&Er>=100?"success":Ji||"normal",[Ji,Er]),{getPrefixCls:Le,direction:Ei,progress:Ri}=ge.useContext(Ct.E_),nn=Le("progress",jn),[di,yi]=at(nn),Li=ge.useMemo(()=>{if(!Xi)return null;const Je=Wt(jt);let qt;const vn=wr||(st=>`${st}%`),Ft=ar==="line";return wr||$n!=="exception"&&$n!=="success"?qt=vn(Ue(gi),Ue(Je)):$n==="exception"?qt=Ft?ge.createElement(ut.Z,null):ge.createElement(Ge.Z,null):$n==="success"&&(qt=Ft?ge.createElement(Oe.Z,null):ge.createElement(Ke.Z,null)),ge.createElement("span",{className:`${nn}-text`,title:typeof qt=="string"?qt:void 0},qt)},[Xi,gi,Er,$n,ar,nn,wr]),Tn=Array.isArray(pi)?pi[0]:pi,Un=typeof pi=="string"||Array.isArray(pi)?pi:void 0;let kt;ar==="line"?kt=ui?ge.createElement(Pe,Object.assign({},jt,{strokeColor:Un,prefixCls:nn,steps:ui}),Li):ge.createElement(ze,Object.assign({},jt,{strokeColor:Tn,prefixCls:nn,direction:Ei}),Li):(ar==="circle"||ar==="dashboard")&&(kt=ge.createElement(Sn,Object.assign({},jt,{strokeColor:Tn,prefixCls:nn,progressStatus:$n}),Li));const $t=Ne()(nn,`${nn}-status-${$n}`,`${nn}-${ar==="dashboard"&&"circle"||ui&&"steps"||ar}`,{[`${nn}-inline-circle`]:ar==="circle"&&Gt(bi,"circle")[0]<=20,[`${nn}-show-info`]:Xi,[`${nn}-${bi}`]:typeof bi=="string",[`${nn}-rtl`]:Ei==="rtl"},Ri==null?void 0:Ri.className,dn,Pn,yi);return di(ge.createElement("div",Object.assign({ref:sn,style:Object.assign(Object.assign({},Ri==null?void 0:Ri.style),mr),className:$t,role:"progressbar","aria-valuenow":Er},(0,Tt.Z)(Hi,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),kt))}),On=Kn},13570:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Ue}});var ge=pe(96663),Oe=pe(59301),Ke={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"}}]},name:"star",theme:"filled"},ut=Ke,Ge=pe(7657),Xe=function(Ln,Fn){return Oe.createElement(Ge.Z,(0,ge.Z)({},Ln,{ref:Fn,icon:ut}))},Ne=Oe.forwardRef(Xe),Tt=Ne,Ct=pe(92310),Ve=pe.n(Ct),Lt=pe(90493),dt=pe(72071),Rt=pe(6620),De=pe(18929),ne=pe(10228),ee=pe(26112);function ce(Wt,Ln){var Fn=Wt.disabled,Gt=Wt.prefixCls,rn=Wt.character,An=Wt.characterRender,ni=Wt.index,Sn=Wt.count,Yn=Wt.value,It=Wt.allowHalf,wn=Wt.focused,Gn=Wt.onHover,ze=Wt.onClick,Ee=function(Ye){Gn(Ye,ni)},Pe=function(Ye){ze(Ye,ni)},Fe=function(Ye){Ye.keyCode===ne.Z.ENTER&&ze(Ye,ni)},Ae=ni+1,ye=new Set([Gt]);Yn===0&&ni===0&&wn?ye.add("".concat(Gt,"-focused")):It&&Yn+.5>=Ae&&Yn<Ae?(ye.add("".concat(Gt,"-half")),ye.add("".concat(Gt,"-active")),wn&&ye.add("".concat(Gt,"-focused"))):(Ae<=Yn?ye.add("".concat(Gt,"-full")):ye.add("".concat(Gt,"-zero")),Ae===Yn&&wn&&ye.add("".concat(Gt,"-focused")));var qe=typeof rn=="function"?rn(Wt):rn,vt=Oe.createElement("li",{className:Ve()(Array.from(ye)),ref:Ln},Oe.createElement("div",{onClick:Fn?null:Pe,onKeyDown:Fn?null:Fe,onMouseMove:Fn?null:Ee,role:"radio","aria-checked":Yn>ni?"true":"false","aria-posinset":ni+1,"aria-setsize":Sn,tabIndex:Fn?-1:0},Oe.createElement("div",{className:"".concat(Gt,"-first")},qe),Oe.createElement("div",{className:"".concat(Gt,"-second")},qe)));return An&&(vt=An(vt,Wt)),vt}var se=Oe.forwardRef(ce);function he(){var Wt=Oe.useRef({});function Ln(Gt){return Wt.current[Gt]}function Fn(Gt){return function(rn){Wt.current[Gt]=rn}}return[Ln,Fn]}function ve(Wt){var Ln=Wt.pageXOffset,Fn="scrollLeft";if(typeof Ln!="number"){var Gt=Wt.document;Ln=Gt.documentElement[Fn],typeof Ln!="number"&&(Ln=Gt.body[Fn])}return Ln}function be(Wt){var Ln,Fn,Gt=Wt.ownerDocument,rn=Gt.body,An=Gt&&Gt.documentElement,ni=Wt.getBoundingClientRect();return Ln=ni.left,Fn=ni.top,Ln-=An.clientLeft||rn.clientLeft||0,Fn-=An.clientTop||rn.clientTop||0,{left:Ln,top:Fn}}function ke(Wt){var Ln=be(Wt),Fn=Wt.ownerDocument,Gt=Fn.defaultView||Fn.parentWindow;return Ln.left+=ve(Gt),Ln.left}var Be=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function He(Wt,Ln){var Fn,Gt=Wt.prefixCls,rn=Gt===void 0?"rc-rate":Gt,An=Wt.className,ni=Wt.defaultValue,Sn=Wt.value,Yn=Wt.count,It=Yn===void 0?5:Yn,wn=Wt.allowHalf,Gn=wn===void 0?!1:wn,ze=Wt.allowClear,Ee=ze===void 0?!0:ze,Pe=Wt.character,Fe=Pe===void 0?"\u2605":Pe,Ae=Wt.characterRender,ye=Wt.disabled,qe=Wt.direction,vt=qe===void 0?"ltr":qe,et=Wt.tabIndex,Ye=et===void 0?0:et,xt=Wt.autoFocus,yt=Wt.onHoverChange,at=Wt.onChange,zt=Wt.onFocus,un=Wt.onBlur,fn=Wt.onKeyDown,Qt=Wt.onMouseLeave,Kn=(0,Rt.Z)(Wt,Be),On=he(),jt=(0,dt.Z)(On,2),sn=jt[0],jn=jt[1],dn=Oe.useRef(null),Pn=function(){if(!ye){var st;(st=dn.current)===null||st===void 0||st.focus()}};Oe.useImperativeHandle(Ln,function(){return{focus:Pn,blur:function(){if(!ye){var st;(st=dn.current)===null||st===void 0||st.blur()}}}});var ui=(0,De.Z)(ni||0,{value:Sn}),pi=(0,dt.Z)(ui,2),gi=pi[0],bi=pi[1],Xi=(0,De.Z)(null),ar=(0,dt.Z)(Xi,2),Ji=ar[0],wr=ar[1],mr=function(st,on){var En=vt==="rtl",Dn=st+1;if(Gn){var Jn=sn(st),St=ke(Jn),Nn=Jn.clientWidth;(En&&on-St>Nn/2||!En&&on-St<Nn/2)&&(Dn-=.5)}return Dn},Hi=function(st){bi(st),at==null||at(st)},Er=Oe.useState(!1),$n=(0,dt.Z)(Er,2),Le=$n[0],Ei=$n[1],Ri=function(){Ei(!0),zt==null||zt()},nn=function(){Ei(!1),un==null||un()},di=Oe.useState(null),yi=(0,dt.Z)(di,2),Li=yi[0],Tn=yi[1],Un=function(st,on){var En=mr(on,st.pageX);En!==Ji&&(Tn(En),wr(null)),yt==null||yt(En)},kt=function(st){ye||(Tn(null),wr(null),yt==null||yt(void 0)),st&&(Qt==null||Qt(st))},$t=function(st,on){var En=mr(on,st.pageX),Dn=!1;Ee&&(Dn=En===gi),kt(),Hi(Dn?0:En),wr(Dn?En:null)},Je=function(st){var on=st.keyCode,En=vt==="rtl",Dn=gi;on===ne.Z.RIGHT&&Dn<It&&!En?(Gn?Dn+=.5:Dn+=1,Hi(Dn),st.preventDefault()):on===ne.Z.LEFT&&Dn>0&&!En||on===ne.Z.RIGHT&&Dn>0&&En?(Gn?Dn-=.5:Dn-=1,Hi(Dn),st.preventDefault()):on===ne.Z.LEFT&&Dn<It&&En&&(Gn?Dn+=.5:Dn+=1,Hi(Dn),st.preventDefault()),fn==null||fn(st)};Oe.useEffect(function(){xt&&!ye&&Pn()},[]);var qt=new Array(It).fill(0).map(function(Ft,st){return Oe.createElement(se,{ref:jn(st),index:st,count:It,disabled:ye,prefixCls:"".concat(rn,"-star"),allowHalf:Gn,value:Li===null?gi:Li,onClick:$t,onHover:Un,key:Ft||st,character:Fe,characterRender:Ae,focused:Le})}),vn=Ve()(rn,An,(Fn={},(0,Lt.Z)(Fn,"".concat(rn,"-disabled"),ye),(0,Lt.Z)(Fn,"".concat(rn,"-rtl"),vt==="rtl"),Fn));return Oe.createElement("ul",(0,ge.Z)({className:vn,onMouseLeave:kt,tabIndex:ye?-1:Ye,onFocus:ye?null:Ri,onBlur:ye?null:nn,onKeyDown:ye?null:Je,ref:dn,role:"radiogroup"},(0,ee.Z)(Kn,{aria:!0,data:!0,attr:!0})),qt)}var We=Oe.forwardRef(He),rt=We,Qe=pe(36355),Pt=pe(6848),Ze=pe(17313),Et=pe(83116),it=pe(37613);const Dt=Wt=>{const{componentCls:Ln}=Wt;return{[`${Ln}-star`]:{position:"relative",display:"inline-block",color:"inherit",cursor:"pointer","&:not(:last-child)":{marginInlineEnd:Wt.marginXS},"> div":{transition:`all ${Wt.motionDurationMid}, outline 0s`,"&:hover":{transform:Wt.starHoverScale},"&:focus":{outline:0},"&:focus-visible":{outline:`${Wt.lineWidth}px dashed ${Wt.starColor}`,transform:Wt.starHoverScale}},"&-first, &-second":{color:Wt.starBg,transition:`all ${Wt.motionDurationMid}`,userSelect:"none",[Wt.iconCls]:{verticalAlign:"middle"}},"&-first":{position:"absolute",top:0,insetInlineStart:0,width:"50%",height:"100%",overflow:"hidden",opacity:0},[`&-half ${Ln}-star-first, &-half ${Ln}-star-second`]:{opacity:1},[`&-half ${Ln}-star-first, &-full ${Ln}-star-second`]:{color:"inherit"}}}},ht=Wt=>({[`&-rtl${Wt.componentCls}`]:{direction:"rtl"}}),Ht=Wt=>{const{componentCls:Ln}=Wt;return{[Ln]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Ze.Wf)(Wt)),{display:"inline-block",margin:0,padding:0,color:Wt.starColor,fontSize:Wt.starSize,lineHeight:"unset",listStyle:"none",outline:"none",[`&-disabled${Ln} ${Ln}-star`]:{cursor:"default","> div:hover":{transform:"scale(1)"}}}),Dt(Wt)),{[`+ ${Ln}-text`]:{display:"inline-block",marginInlineStart:Wt.marginXS,fontSize:Wt.fontSize}}),ht(Wt))}};var _t=(0,Et.Z)("Rate",Wt=>{const Ln=(0,it.TS)(Wt,{});return[Ht(Ln)]},Wt=>({starColor:Wt.yellow6,starSize:Wt.controlHeightLG*.5,starHoverScale:"scale(1.1)",starBg:Wt.colorFillContent})),Vt=function(Wt,Ln){var Fn={};for(var Gt in Wt)Object.prototype.hasOwnProperty.call(Wt,Gt)&&Ln.indexOf(Gt)<0&&(Fn[Gt]=Wt[Gt]);if(Wt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var rn=0,Gt=Object.getOwnPropertySymbols(Wt);rn<Gt.length;rn++)Ln.indexOf(Gt[rn])<0&&Object.prototype.propertyIsEnumerable.call(Wt,Gt[rn])&&(Fn[Gt[rn]]=Wt[Gt[rn]]);return Fn},Ue=Oe.forwardRef((Wt,Ln)=>{const{prefixCls:Fn,className:Gt,rootClassName:rn,style:An,tooltips:ni,character:Sn=Oe.createElement(Tt,null)}=Wt,Yn=Vt(Wt,["prefixCls","className","rootClassName","style","tooltips","character"]),It=(ye,qe)=>{let{index:vt}=qe;return ni?Oe.createElement(Pt.Z,{title:ni[vt]},ye):ye},{getPrefixCls:wn,direction:Gn,rate:ze}=Oe.useContext(Qe.E_),Ee=wn("rate",Fn),[Pe,Fe]=_t(Ee),Ae=Object.assign(Object.assign({},ze==null?void 0:ze.style),An);return Pe(Oe.createElement(rt,Object.assign({ref:Ln,character:Sn,characterRender:It},Yn,{className:Ve()(Gt,rn,Fe,ze==null?void 0:ze.className),style:Ae,prefixCls:Ee,direction:Gn})))})},57809:function(Vn,xn,pe){"use strict";var ge=pe(92310),Oe=pe.n(ge),Ke=pe(77861),ut=pe(2738),Ge=pe(59301),Xe=pe(53487),Ne=pe(62892),Tt=pe(19080),Ct=pe(36355),Ve=pe(1684),Lt=pe(93891),dt=pe(19716),Rt=pe(32441),De=pe(33234),ne=pe(14154),ee=pe(58582),ce=pe(84443),se=pe(66339),he=function(He,We){var rt={};for(var Qe in He)Object.prototype.hasOwnProperty.call(He,Qe)&&We.indexOf(Qe)<0&&(rt[Qe]=He[Qe]);if(He!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Pt=0,Qe=Object.getOwnPropertySymbols(He);Pt<Qe.length;Pt++)We.indexOf(Qe[Pt])<0&&Object.prototype.propertyIsEnumerable.call(He,Qe[Pt])&&(rt[Qe[Pt]]=He[Qe[Pt]]);return rt};const ve="SECRET_COMBOBOX_MODE_DO_NOT_USE",be=(He,We)=>{var rt,{prefixCls:Qe,bordered:Pt=!0,className:Ze,rootClassName:Et,getPopupContainer:it,popupClassName:Dt,dropdownClassName:ht,listHeight:Ht=256,placement:_t,listItemHeight:Vt=24,size:ot,disabled:Ue,notFoundContent:Wt,status:Ln,builtinPlacements:Fn,dropdownMatchSelectWidth:Gt,popupMatchSelectWidth:rn,direction:An,style:ni,allowClear:Sn}=He,Yn=he(He,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:It,getPrefixCls:wn,renderEmpty:Gn,direction:ze,virtual:Ee,popupMatchSelectWidth:Pe,popupOverflow:Fe,select:Ae}=Ge.useContext(Ct.E_),ye=wn("select",Qe),qe=wn(),vt=An!=null?An:ze,{compactSize:et,compactItemClassnames:Ye}=(0,De.ri)(ye,vt),[xt,yt]=(0,ne.Z)(ye),at=Ge.useMemo(()=>{const{mode:$n}=Yn;if($n!=="combobox")return $n===ve?"combobox":$n},[Yn.mode]),zt=at==="multiple"||at==="tags",un=(0,ce.Z)(Yn.suffixIcon,Yn.showArrow),fn=(rt=rn!=null?rn:Gt)!==null&&rt!==void 0?rt:Pe,{status:Qt,hasFeedback:Kn,isFormItemInput:On,feedbackIcon:jt}=Ge.useContext(Rt.aM),sn=(0,Tt.F)(Qt,Ln);let jn;Wt!==void 0?jn=Wt:at==="combobox"?jn=null:jn=(Gn==null?void 0:Gn("Select"))||Ge.createElement(Lt.Z,{componentName:"Select"});const{suffixIcon:dn,itemIcon:Pn,removeIcon:ui,clearIcon:pi}=(0,se.Z)(Object.assign(Object.assign({},Yn),{multiple:zt,hasFeedback:Kn,feedbackIcon:jt,showSuffixIcon:un,prefixCls:ye,showArrow:Yn.showArrow,componentName:"Select"})),gi=Sn===!0?{clearIcon:pi}:Sn,bi=(0,ut.Z)(Yn,["suffixIcon","itemIcon"]),Xi=Oe()(Dt||ht,{[`${ye}-dropdown-${vt}`]:vt==="rtl"},Et,yt),ar=(0,dt.Z)($n=>{var Le;return(Le=ot!=null?ot:et)!==null&&Le!==void 0?Le:$n}),Ji=Ge.useContext(Ve.Z),wr=Ue!=null?Ue:Ji,mr=Oe()({[`${ye}-lg`]:ar==="large",[`${ye}-sm`]:ar==="small",[`${ye}-rtl`]:vt==="rtl",[`${ye}-borderless`]:!Pt,[`${ye}-in-form-item`]:On},(0,Tt.Z)(ye,sn,Kn),Ye,Ae==null?void 0:Ae.className,Ze,Et,yt),Hi=Ge.useMemo(()=>_t!==void 0?_t:vt==="rtl"?"bottomRight":"bottomLeft",[_t,vt]),Er=(0,ee.Z)(Fn,Fe);return xt(Ge.createElement(Ke.ZP,Object.assign({ref:We,virtual:Ee,showSearch:Ae==null?void 0:Ae.showSearch},bi,{style:Object.assign(Object.assign({},Ae==null?void 0:Ae.style),ni),dropdownMatchSelectWidth:fn,builtinPlacements:Er,transitionName:(0,Ne.m)(qe,"slide-up",Yn.transitionName),listHeight:Ht,listItemHeight:Vt,mode:at,prefixCls:ye,placement:Hi,direction:vt,suffixIcon:dn,menuItemSelectedIcon:Pn,removeIcon:ui,allowClear:gi,notFoundContent:jn,className:mr,getPopupContainer:it||It,dropdownClassName:Xi,disabled:wr})))},ke=Ge.forwardRef(be),Be=(0,Xe.Z)(ke);ke.SECRET_COMBOBOX_MODE_DO_NOT_USE=ve,ke.Option=Ke.Wx,ke.OptGroup=Ke.Xo,ke._InternalPanelDoNotUseOrYouWillBeFired=Be,xn.default=ke},14154:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return ke}});var ge=pe(17313),Oe=pe(74207),Ke=pe(37613),ut=pe(83116),Ge=pe(13826),Xe=pe(92899);const Ne=Be=>{const{optionHeight:He,optionFontSize:We,optionLineHeight:rt,optionPadding:Qe}=Be;return{position:"relative",display:"block",minHeight:He,padding:Qe,color:Be.colorText,fontWeight:"normal",fontSize:We,lineHeight:rt,boxSizing:"border-box"}};var Ct=Be=>{const{antCls:He,componentCls:We}=Be,rt=`${We}-item`,Qe=`&${He}-slide-up-enter${He}-slide-up-enter-active`,Pt=`&${He}-slide-up-appear${He}-slide-up-appear-active`,Ze=`&${He}-slide-up-leave${He}-slide-up-leave-active`,Et=`${We}-dropdown-placement-`;return[{[`${We}-dropdown`]:Object.assign(Object.assign({},(0,ge.Wf)(Be)),{position:"absolute",top:-9999,zIndex:Be.zIndexPopup,boxSizing:"border-box",padding:Be.paddingXXS,overflow:"hidden",fontSize:Be.fontSize,fontVariant:"initial",backgroundColor:Be.colorBgElevated,borderRadius:Be.borderRadiusLG,outline:"none",boxShadow:Be.boxShadowSecondary,[`
|
|
|
${Qe}${Et}bottomLeft,
|
|
|
${Pt}${Et}bottomLeft
|
|
|
`]:{animationName:Ge.fJ},[`
|
|
|
${Qe}${Et}topLeft,
|
|
|
${Pt}${Et}topLeft,
|
|
|
${Qe}${Et}topRight,
|
|
|
${Pt}${Et}topRight
|
|
|
`]:{animationName:Ge.Qt},[`${Ze}${Et}bottomLeft`]:{animationName:Ge.Uw},[`
|
|
|
${Ze}${Et}topLeft,
|
|
|
${Ze}${Et}topRight
|
|
|
`]:{animationName:Ge.ly},"&-hidden":{display:"none"},[`${rt}`]:Object.assign(Object.assign({},Ne(Be)),{cursor:"pointer",transition:`background ${Be.motionDurationSlow} ease`,borderRadius:Be.borderRadiusSM,"&-group":{color:Be.colorTextDescription,fontSize:Be.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},ge.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${rt}-option-disabled)`]:{backgroundColor:Be.optionActiveBg},[`&-selected:not(${rt}-option-disabled)`]:{color:Be.optionSelectedColor,fontWeight:Be.optionSelectedFontWeight,backgroundColor:Be.optionSelectedBg,[`${rt}-option-state`]:{color:Be.colorPrimary}},"&-disabled":{[`&${rt}-option-selected`]:{backgroundColor:Be.colorBgContainerDisabled},color:Be.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:Be.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,Ge.oN)(Be,"slide-up"),(0,Ge.oN)(Be,"slide-down"),(0,Xe.Fm)(Be,"move-up"),(0,Xe.Fm)(Be,"move-down")]};const Ve=2,Lt=Be=>{let{controlHeightSM:He,controlHeight:We,lineWidth:rt}=Be;const Qe=(We-He)/2-rt,Pt=Math.ceil(Qe/2);return[Qe,Pt]};function dt(Be,He){const{componentCls:We,iconCls:rt}=Be,Qe=`${We}-selection-overflow`,Pt=Be.multipleSelectItemHeight,[Ze]=Lt(Be),Et=He?`${We}-${He}`:"";return{[`${We}-multiple${Et}`]:{fontSize:Be.fontSize,[Qe]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${We}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${Ze-Ve}px ${Ve*2}px`,borderRadius:Be.borderRadius,[`${We}-show-search&`]:{cursor:"text"},[`${We}-disabled&`]:{background:Be.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${Ve}px 0`,lineHeight:`${Pt}px`,visibility:"hidden",content:'"\\a0"'}},[`
|
|
|
&${We}-show-arrow ${We}-selector,
|
|
|
&${We}-allow-clear ${We}-selector
|
|
|
`]:{paddingInlineEnd:Be.fontSizeIcon+Be.controlPaddingHorizontal},[`${We}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:Pt,marginTop:Ve,marginBottom:Ve,lineHeight:`${Pt-Be.lineWidth*2}px`,background:Be.multipleItemBg,border:`${Be.lineWidth}px ${Be.lineType} ${Be.multipleItemBorderColor}`,borderRadius:Be.borderRadiusSM,cursor:"default",transition:`font-size ${Be.motionDurationSlow}, line-height ${Be.motionDurationSlow}, height ${Be.motionDurationSlow}`,userSelect:"none",marginInlineEnd:Ve*2,paddingInlineStart:Be.paddingXS,paddingInlineEnd:Be.paddingXS/2,[`${We}-disabled&`]:{color:Be.multipleItemColorDisabled,borderColor:Be.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:Be.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,ge.Ro)()),{display:"inline-flex",alignItems:"center",color:Be.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${rt}`]:{verticalAlign:"-0.2em"},"&:hover":{color:Be.colorIconHover}})},[`${Qe}-item + ${Qe}-item`]:{[`${We}-selection-search`]:{marginInlineStart:0}},[`${We}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:Be.inputPaddingHorizontalBase-Ze,"\n &-input,\n &-mirror\n ":{height:Pt,fontFamily:Be.fontFamily,lineHeight:`${Pt}px`,transition:`all ${Be.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${We}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:Be.inputPaddingHorizontalBase,insetInlineEnd:Be.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${Be.motionDurationSlow}`}}}}var De=Be=>{const{componentCls:He}=Be,We=(0,Ke.TS)(Be,{controlHeight:Be.controlHeightSM,multipleSelectItemHeight:Be.controlHeightXS,borderRadius:Be.borderRadiusSM,borderRadiusSM:Be.borderRadiusXS}),rt=(0,Ke.TS)(Be,{fontSize:Be.fontSizeLG,controlHeight:Be.controlHeightLG,multipleSelectItemHeight:Be.multipleItemHeightLG,borderRadius:Be.borderRadiusLG,borderRadiusSM:Be.borderRadius}),[,Qe]=Lt(Be);return[dt(Be),dt(We,"sm"),{[`${He}-multiple${He}-sm`]:{[`${He}-selection-placeholder`]:{insetInline:Be.controlPaddingHorizontalSM-Be.lineWidth},[`${He}-selection-search`]:{marginInlineStart:Qe}}},dt(rt,"lg")]};function ne(Be,He){const{componentCls:We,inputPaddingHorizontalBase:rt,borderRadius:Qe}=Be,Pt=Be.controlHeight-Be.lineWidth*2,Ze=Math.ceil(Be.fontSize*1.25),Et=He?`${We}-${He}`:"";return{[`${We}-single${Et}`]:{fontSize:Be.fontSize,[`${We}-selector`]:Object.assign(Object.assign({},(0,ge.Wf)(Be)),{display:"flex",borderRadius:Qe,[`${We}-selection-search`]:{position:"absolute",top:0,insetInlineStart:rt,insetInlineEnd:rt,bottom:0,"&-input":{width:"100%"}},[`
|
|
|
${We}-selection-item,
|
|
|
${We}-selection-placeholder
|
|
|
`]:{padding:0,lineHeight:`${Pt}px`,transition:`all ${Be.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${Pt}px`}},[`${We}-selection-item`]:{position:"relative",userSelect:"none"},[`${We}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${We}-selection-item:after`,`${We}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
|
&${We}-show-arrow ${We}-selection-item,
|
|
|
&${We}-show-arrow ${We}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:Ze},[`&${We}-open ${We}-selection-item`]:{color:Be.colorTextPlaceholder},[`&:not(${We}-customize-input)`]:{[`${We}-selector`]:{width:"100%",height:Be.controlHeight,padding:`0 ${rt}px`,[`${We}-selection-search-input`]:{height:Pt},"&:after":{lineHeight:`${Pt}px`}}},[`&${We}-customize-input`]:{[`${We}-selector`]:{"&:after":{display:"none"},[`${We}-selection-search`]:{position:"static",width:"100%"},[`${We}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${rt}px`,"&:after":{display:"none"}}}}}}}function ee(Be){const{componentCls:He}=Be,We=Be.controlPaddingHorizontalSM-Be.lineWidth;return[ne(Be),ne((0,Ke.TS)(Be,{controlHeight:Be.controlHeightSM,borderRadius:Be.borderRadiusSM}),"sm"),{[`${He}-single${He}-sm`]:{[`&:not(${He}-customize-input)`]:{[`${He}-selection-search`]:{insetInlineStart:We,insetInlineEnd:We},[`${He}-selector`]:{padding:`0 ${We}px`},[`&${He}-show-arrow ${He}-selection-search`]:{insetInlineEnd:We+Be.fontSize*1.5},[`
|
|
|
&${He}-show-arrow ${He}-selection-item,
|
|
|
&${He}-show-arrow ${He}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:Be.fontSize*1.5}}}},ne((0,Ke.TS)(Be,{controlHeight:Be.singleItemHeightLG,fontSize:Be.fontSizeLG,borderRadius:Be.borderRadiusLG}),"lg")]}const ce=Be=>{const{componentCls:He,selectorBg:We}=Be;return{position:"relative",backgroundColor:We,border:`${Be.lineWidth}px ${Be.lineType} ${Be.colorBorder}`,transition:`all ${Be.motionDurationMid} ${Be.motionEaseInOut}`,input:{cursor:"pointer"},[`${He}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${He}-disabled&`]:{color:Be.colorTextDisabled,background:Be.colorBgContainerDisabled,cursor:"not-allowed",[`${He}-multiple&`]:{background:Be.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},se=function(Be,He){let We=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:rt,borderHoverColor:Qe,outlineColor:Pt,antCls:Ze}=He,Et=We?{[`${rt}-selector`]:{borderColor:Qe}}:{};return{[Be]:{[`&:not(${rt}-disabled):not(${rt}-customize-input):not(${Ze}-pagination-size-changer)`]:Object.assign(Object.assign({},Et),{[`${rt}-focused& ${rt}-selector`]:{borderColor:Qe,boxShadow:`0 0 0 ${He.controlOutlineWidth}px ${Pt}`,outline:0},[`&:hover ${rt}-selector`]:{borderColor:Qe}})}}},he=Be=>{const{componentCls:He}=Be;return{[`${He}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},ve=Be=>{const{componentCls:He,inputPaddingHorizontalBase:We,iconCls:rt}=Be;return{[He]:Object.assign(Object.assign({},(0,ge.Wf)(Be)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${He}-customize-input) ${He}-selector`]:Object.assign(Object.assign({},ce(Be)),he(Be)),[`${He}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},ge.vS),[`${He}-selection-placeholder`]:Object.assign(Object.assign({},ge.vS),{flex:1,color:Be.colorTextPlaceholder,pointerEvents:"none"}),[`${He}-arrow`]:Object.assign(Object.assign({},(0,ge.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:We,height:Be.fontSizeIcon,marginTop:-Be.fontSizeIcon/2,color:Be.colorTextQuaternary,fontSize:Be.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[rt]:{verticalAlign:"top",transition:`transform ${Be.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${He}-suffix)`]:{pointerEvents:"auto"}},[`${He}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${He}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:We,zIndex:1,display:"inline-block",width:Be.fontSizeIcon,height:Be.fontSizeIcon,marginTop:-Be.fontSizeIcon/2,color:Be.colorTextQuaternary,fontSize:Be.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:Be.clearBg,cursor:"pointer",opacity:0,transition:`color ${Be.motionDurationMid} ease, opacity ${Be.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:Be.colorTextTertiary}},"&:hover":{[`${He}-clear`]:{opacity:1}}}),[`${He}-has-feedback`]:{[`${He}-clear`]:{insetInlineEnd:We+Be.fontSize+Be.paddingXS}}}},be=Be=>{const{componentCls:He}=Be;return[{[He]:{[`&-borderless ${He}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${He}-in-form-item`]:{width:"100%"}}},ve(Be),ee(Be),De(Be),Ct(Be),{[`${He}-rtl`]:{direction:"rtl"}},se(He,(0,Ke.TS)(Be,{borderHoverColor:Be.colorPrimaryHover,outlineColor:Be.controlOutline})),se(`${He}-status-error`,(0,Ke.TS)(Be,{borderHoverColor:Be.colorErrorHover,outlineColor:Be.colorErrorOutline}),!0),se(`${He}-status-warning`,(0,Ke.TS)(Be,{borderHoverColor:Be.colorWarningHover,outlineColor:Be.colorWarningOutline}),!0),(0,Oe.c)(Be,{borderElCls:`${He}-selector`,focusElCls:`${He}-focused`})]};var ke=(0,ut.Z)("Select",(Be,He)=>{let{rootPrefixCls:We}=He;const rt=(0,Ke.TS)(Be,{rootPrefixCls:We,inputPaddingHorizontalBase:Be.paddingSM-1,multipleSelectItemHeight:Be.multipleItemHeight});return[be(rt)]},Be=>{const{fontSize:He,lineHeight:We,controlHeight:rt,controlPaddingHorizontal:Qe,zIndexPopupBase:Pt,colorText:Ze,fontWeightStrong:Et,controlItemBgActive:it,controlItemBgHover:Dt,colorBgContainer:ht,colorFillSecondary:Ht,controlHeightLG:_t,controlHeightSM:Vt,colorBgContainerDisabled:ot,colorTextDisabled:Ue}=Be;return{zIndexPopup:Pt+50,optionSelectedColor:Ze,optionSelectedFontWeight:Et,optionSelectedBg:it,optionActiveBg:Dt,optionPadding:`${(rt-He*We)/2}px ${Qe}px`,optionFontSize:He,optionLineHeight:We,optionHeight:rt,selectorBg:ht,clearBg:ht,singleItemHeightLG:_t,multipleItemBg:Ht,multipleItemBorderColor:"transparent",multipleItemHeight:Vt,multipleItemHeightLG:rt,multipleSelectorBgDisabled:ot,multipleItemColorDisabled:Ue,multipleItemBorderColorDisabled:"transparent"}})},58582:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Oe}});const ge=Ke=>{const Ge={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:Ke==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},Ge),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},Ge),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},Ge),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},Ge),{points:["br","tr"],offset:[0,-4]})}};function Oe(Ke,ut){return Ke||ge(ut)}},84443:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return ge}});function ge(Oe,Ke){return Ke!==void 0?Ke:Oe!==null}},66339:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Tt}});var ge=pe(40001),Oe=pe(19248),Ke=pe(99267),ut=pe(84105),Ge=pe(58617),Xe=pe(47472),Ne=pe(59301);function Tt(Ct){let{suffixIcon:Ve,clearIcon:Lt,menuItemSelectedIcon:dt,removeIcon:Rt,loading:De,multiple:ne,hasFeedback:ee,prefixCls:ce,showSuffixIcon:se,feedbackIcon:he,showArrow:ve,componentName:be}=Ct;const ke=Lt!=null?Lt:Ne.createElement(Oe.Z,null),Be=Qe=>Ve===null&&!ee&&!ve?null:Ne.createElement(Ne.Fragment,null,se!==!1&&Qe,ee&&he);let He=null;if(Ve!==void 0)He=Be(Ve);else if(De)He=Be(Ne.createElement(Ge.Z,{spin:!0}));else{const Qe=`${ce}-suffix`;He=Pt=>{let{open:Ze,showSearch:Et}=Pt;return Be(Ze&&Et?Ne.createElement(Xe.Z,{className:Qe}):Ne.createElement(ut.Z,{className:Qe}))}}let We=null;dt!==void 0?We=dt:ne?We=Ne.createElement(ge.Z,null):We=null;let rt=null;return Rt!==void 0?rt=Rt:rt=Ne.createElement(Ke.Z,null),{clearIcon:ke,suffixIcon:He,itemIcon:We,removeIcon:rt}}},61621:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Fe}});var ge=pe(92310),Oe=pe.n(ge),Ke=pe(59301),ut=pe(36355),Ge=pe(2738),Ne=Ae=>{const{prefixCls:ye,className:qe,style:vt,size:et,shape:Ye}=Ae,xt=Oe()({[`${ye}-lg`]:et==="large",[`${ye}-sm`]:et==="small"}),yt=Oe()({[`${ye}-circle`]:Ye==="circle",[`${ye}-square`]:Ye==="square",[`${ye}-round`]:Ye==="round"}),at=Ke.useMemo(()=>typeof et=="number"?{width:et,height:et,lineHeight:`${et}px`}:{},[et]);return Ke.createElement("span",{className:Oe()(ye,xt,yt,qe),style:Object.assign(Object.assign({},at),vt)})},Tt=pe(93083),Ct=pe(83116),Ve=pe(37613);const Lt=new Tt.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),dt=Ae=>({height:Ae,lineHeight:`${Ae}px`}),Rt=Ae=>Object.assign({width:Ae},dt(Ae)),De=Ae=>({background:Ae.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:Lt,animationDuration:Ae.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),ne=Ae=>Object.assign({width:Ae*5,minWidth:Ae*5},dt(Ae)),ee=Ae=>{const{skeletonAvatarCls:ye,gradientFromColor:qe,controlHeight:vt,controlHeightLG:et,controlHeightSM:Ye}=Ae;return{[`${ye}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:qe},Rt(vt)),[`${ye}${ye}-circle`]:{borderRadius:"50%"},[`${ye}${ye}-lg`]:Object.assign({},Rt(et)),[`${ye}${ye}-sm`]:Object.assign({},Rt(Ye))}},ce=Ae=>{const{controlHeight:ye,borderRadiusSM:qe,skeletonInputCls:vt,controlHeightLG:et,controlHeightSM:Ye,gradientFromColor:xt}=Ae;return{[`${vt}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:xt,borderRadius:qe},ne(ye)),[`${vt}-lg`]:Object.assign({},ne(et)),[`${vt}-sm`]:Object.assign({},ne(Ye))}},se=Ae=>Object.assign({width:Ae},dt(Ae)),he=Ae=>{const{skeletonImageCls:ye,imageSizeBase:qe,gradientFromColor:vt,borderRadiusSM:et}=Ae;return{[`${ye}`]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:vt,borderRadius:et},se(qe*2)),{[`${ye}-path`]:{fill:"#bfbfbf"},[`${ye}-svg`]:Object.assign(Object.assign({},se(qe)),{maxWidth:qe*4,maxHeight:qe*4}),[`${ye}-svg${ye}-svg-circle`]:{borderRadius:"50%"}}),[`${ye}${ye}-circle`]:{borderRadius:"50%"}}},ve=(Ae,ye,qe)=>{const{skeletonButtonCls:vt}=Ae;return{[`${qe}${vt}-circle`]:{width:ye,minWidth:ye,borderRadius:"50%"},[`${qe}${vt}-round`]:{borderRadius:ye}}},be=Ae=>Object.assign({width:Ae*2,minWidth:Ae*2},dt(Ae)),ke=Ae=>{const{borderRadiusSM:ye,skeletonButtonCls:qe,controlHeight:vt,controlHeightLG:et,controlHeightSM:Ye,gradientFromColor:xt}=Ae;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${qe}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:xt,borderRadius:ye,width:vt*2,minWidth:vt*2},be(vt))},ve(Ae,vt,qe)),{[`${qe}-lg`]:Object.assign({},be(et))}),ve(Ae,et,`${qe}-lg`)),{[`${qe}-sm`]:Object.assign({},be(Ye))}),ve(Ae,Ye,`${qe}-sm`))},Be=Ae=>{const{componentCls:ye,skeletonAvatarCls:qe,skeletonTitleCls:vt,skeletonParagraphCls:et,skeletonButtonCls:Ye,skeletonInputCls:xt,skeletonImageCls:yt,controlHeight:at,controlHeightLG:zt,controlHeightSM:un,gradientFromColor:fn,padding:Qt,marginSM:Kn,borderRadius:On,titleHeight:jt,blockRadius:sn,paragraphLiHeight:jn,controlHeightXS:dn,paragraphMarginTop:Pn}=Ae;return{[`${ye}`]:{display:"table",width:"100%",[`${ye}-header`]:{display:"table-cell",paddingInlineEnd:Qt,verticalAlign:"top",[`${qe}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:fn},Rt(at)),[`${qe}-circle`]:{borderRadius:"50%"},[`${qe}-lg`]:Object.assign({},Rt(zt)),[`${qe}-sm`]:Object.assign({},Rt(un))},[`${ye}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${vt}`]:{width:"100%",height:jt,background:fn,borderRadius:sn,[`+ ${et}`]:{marginBlockStart:un}},[`${et}`]:{padding:0,"> li":{width:"100%",height:jn,listStyle:"none",background:fn,borderRadius:sn,"+ li":{marginBlockStart:dn}}},[`${et}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${ye}-content`]:{[`${vt}, ${et} > li`]:{borderRadius:On}}},[`${ye}-with-avatar ${ye}-content`]:{[`${vt}`]:{marginBlockStart:Kn,[`+ ${et}`]:{marginBlockStart:Pn}}},[`${ye}${ye}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},ke(Ae)),ee(Ae)),ce(Ae)),he(Ae)),[`${ye}${ye}-block`]:{width:"100%",[`${Ye}`]:{width:"100%"},[`${xt}`]:{width:"100%"}},[`${ye}${ye}-active`]:{[`
|
|
|
${vt},
|
|
|
${et} > li,
|
|
|
${qe},
|
|
|
${Ye},
|
|
|
${xt},
|
|
|
${yt}
|
|
|
`]:Object.assign({},De(Ae))}}};var He=(0,Ct.Z)("Skeleton",Ae=>{const{componentCls:ye}=Ae,qe=(0,Ve.TS)(Ae,{skeletonAvatarCls:`${ye}-avatar`,skeletonTitleCls:`${ye}-title`,skeletonParagraphCls:`${ye}-paragraph`,skeletonButtonCls:`${ye}-button`,skeletonInputCls:`${ye}-input`,skeletonImageCls:`${ye}-image`,imageSizeBase:Ae.controlHeight*1.5,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${Ae.gradientFromColor} 25%, ${Ae.gradientToColor} 37%, ${Ae.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[Be(qe)]},Ae=>{const{colorFillContent:ye,colorFill:qe}=Ae,vt=ye,et=qe;return{color:vt,colorGradientEnd:et,gradientFromColor:vt,gradientToColor:et,titleHeight:Ae.controlHeight/2,blockRadius:Ae.borderRadiusSM,paragraphMarginTop:Ae.marginLG+Ae.marginXXS,paragraphLiHeight:Ae.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),rt=Ae=>{const{prefixCls:ye,className:qe,rootClassName:vt,active:et,shape:Ye="circle",size:xt="default"}=Ae,{getPrefixCls:yt}=Ke.useContext(ut.E_),at=yt("skeleton",ye),[zt,un]=He(at),fn=(0,Ge.Z)(Ae,["prefixCls","className"]),Qt=Oe()(at,`${at}-element`,{[`${at}-active`]:et},qe,vt,un);return zt(Ke.createElement("div",{className:Qt},Ke.createElement(Ne,Object.assign({prefixCls:`${at}-avatar`,shape:Ye,size:xt},fn))))},Pt=Ae=>{const{prefixCls:ye,className:qe,rootClassName:vt,active:et,block:Ye=!1,size:xt="default"}=Ae,{getPrefixCls:yt}=Ke.useContext(ut.E_),at=yt("skeleton",ye),[zt,un]=He(at),fn=(0,Ge.Z)(Ae,["prefixCls"]),Qt=Oe()(at,`${at}-element`,{[`${at}-active`]:et,[`${at}-block`]:Ye},qe,vt,un);return zt(Ke.createElement("div",{className:Qt},Ke.createElement(Ne,Object.assign({prefixCls:`${at}-button`,size:xt},fn))))};const Ze="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z";var it=Ae=>{const{prefixCls:ye,className:qe,rootClassName:vt,style:et,active:Ye}=Ae,{getPrefixCls:xt}=Ke.useContext(ut.E_),yt=xt("skeleton",ye),[at,zt]=He(yt),un=Oe()(yt,`${yt}-element`,{[`${yt}-active`]:Ye},qe,vt,zt);return at(Ke.createElement("div",{className:un},Ke.createElement("div",{className:Oe()(`${yt}-image`,qe),style:et},Ke.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${yt}-image-svg`},Ke.createElement("path",{d:Ze,className:`${yt}-image-path`})))))},ht=Ae=>{const{prefixCls:ye,className:qe,rootClassName:vt,active:et,block:Ye,size:xt="default"}=Ae,{getPrefixCls:yt}=Ke.useContext(ut.E_),at=yt("skeleton",ye),[zt,un]=He(at),fn=(0,Ge.Z)(Ae,["prefixCls"]),Qt=Oe()(at,`${at}-element`,{[`${at}-active`]:et,[`${at}-block`]:Ye},qe,vt,un);return zt(Ke.createElement("div",{className:Qt},Ke.createElement(Ne,Object.assign({prefixCls:`${at}-input`,size:xt},fn))))},Ht=pe(96663),_t={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM288 604a64 64 0 10128 0 64 64 0 10-128 0zm118-224a48 48 0 1096 0 48 48 0 10-96 0zm158 228a96 96 0 10192 0 96 96 0 10-192 0zm148-314a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"dot-chart",theme:"outlined"},Vt=_t,ot=pe(7657),Ue=function(ye,qe){return Ke.createElement(ot.Z,(0,Ht.Z)({},ye,{ref:qe,icon:Vt}))},Wt=Ke.forwardRef(Ue),Ln=Wt,Gt=Ae=>{const{prefixCls:ye,className:qe,rootClassName:vt,style:et,active:Ye,children:xt}=Ae,{getPrefixCls:yt}=Ke.useContext(ut.E_),at=yt("skeleton",ye),[zt,un]=He(at),fn=Oe()(at,`${at}-element`,{[`${at}-active`]:Ye},un,qe,vt),Qt=xt!=null?xt:Ke.createElement(Ln,null);return zt(Ke.createElement("div",{className:fn},Ke.createElement("div",{className:Oe()(`${at}-image`,qe),style:et},Qt)))},rn=pe(19127),ni=Ae=>{const ye=yt=>{const{width:at,rows:zt=2}=Ae;if(Array.isArray(at))return at[yt];if(zt-1===yt)return at},{prefixCls:qe,className:vt,style:et,rows:Ye}=Ae,xt=(0,rn.Z)(Array(Ye)).map((yt,at)=>Ke.createElement("li",{key:at,style:{width:ye(at)}}));return Ke.createElement("ul",{className:Oe()(qe,vt),style:et},xt)},Yn=Ae=>{let{prefixCls:ye,className:qe,width:vt,style:et}=Ae;return Ke.createElement("h3",{className:Oe()(ye,qe),style:Object.assign({width:vt},et)})};function It(Ae){return Ae&&typeof Ae=="object"?Ae:{}}function wn(Ae,ye){return Ae&&!ye?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function Gn(Ae,ye){return!Ae&&ye?{width:"38%"}:Ae&&ye?{width:"50%"}:{}}function ze(Ae,ye){const qe={};return(!Ae||!ye)&&(qe.width="61%"),!Ae&&ye?qe.rows=3:qe.rows=2,qe}const Ee=Ae=>{const{prefixCls:ye,loading:qe,className:vt,rootClassName:et,style:Ye,children:xt,avatar:yt=!1,title:at=!0,paragraph:zt=!0,active:un,round:fn}=Ae,{getPrefixCls:Qt,direction:Kn,skeleton:On}=Ke.useContext(ut.E_),jt=Qt("skeleton",ye),[sn,jn]=He(jt);if(qe||!("loading"in Ae)){const dn=!!yt,Pn=!!at,ui=!!zt;let pi;if(dn){const Xi=Object.assign(Object.assign({prefixCls:`${jt}-avatar`},wn(Pn,ui)),It(yt));pi=Ke.createElement("div",{className:`${jt}-header`},Ke.createElement(Ne,Object.assign({},Xi)))}let gi;if(Pn||ui){let Xi;if(Pn){const Ji=Object.assign(Object.assign({prefixCls:`${jt}-title`},Gn(dn,ui)),It(at));Xi=Ke.createElement(Yn,Object.assign({},Ji))}let ar;if(ui){const Ji=Object.assign(Object.assign({prefixCls:`${jt}-paragraph`},ze(dn,Pn)),It(zt));ar=Ke.createElement(ni,Object.assign({},Ji))}gi=Ke.createElement("div",{className:`${jt}-content`},Xi,ar)}const bi=Oe()(jt,{[`${jt}-with-avatar`]:dn,[`${jt}-active`]:un,[`${jt}-rtl`]:Kn==="rtl",[`${jt}-round`]:fn},On==null?void 0:On.className,vt,et,jn);return sn(Ke.createElement("div",{className:bi,style:Object.assign(Object.assign({},On==null?void 0:On.style),Ye)},pi,gi))}return typeof xt!="undefined"?xt:null};Ee.Button=Pt,Ee.Avatar=rt,Ee.Input=ht,Ee.Image=it,Ee.Node=Gt;var Pe=Ee,Fe=Pe},81327:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return ce}});var ge=pe(59301),Oe=pe(92310),Ke=pe.n(Oe),ut=pe(11592),Ge=pe(36355),Xe=pe(33234);const Ne=ge.createContext({latestIndex:0}),Tt=Ne.Provider;var Ve=se=>{let{className:he,index:ve,children:be,split:ke,style:Be}=se;const{latestIndex:He}=ge.useContext(Ne);return be==null?null:ge.createElement(ge.Fragment,null,ge.createElement("div",{className:he,style:Be},be),ve<He&&ke&&ge.createElement("span",{className:`${he}-split`},ke))},Lt=pe(2856);function dt(se){return["small","middle","large"].includes(se)}function Rt(se){return se?typeof se=="number"&&!Number.isNaN(se):!1}var De=function(se,he){var ve={};for(var be in se)Object.prototype.hasOwnProperty.call(se,be)&&he.indexOf(be)<0&&(ve[be]=se[be]);if(se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ke=0,be=Object.getOwnPropertySymbols(se);ke<be.length;ke++)he.indexOf(be[ke])<0&&Object.prototype.propertyIsEnumerable.call(se,be[ke])&&(ve[be[ke]]=se[be[ke]]);return ve};const ee=ge.forwardRef((se,he)=>{var ve,be;const{getPrefixCls:ke,space:Be,direction:He}=ge.useContext(Ge.E_),{size:We=(Be==null?void 0:Be.size)||"small",align:rt,className:Qe,rootClassName:Pt,children:Ze,direction:Et="horizontal",prefixCls:it,split:Dt,style:ht,wrap:Ht=!1,classNames:_t,styles:Vt}=se,ot=De(se,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[Ue,Wt]=Array.isArray(We)?We:[We,We],Ln=dt(Wt),Fn=dt(Ue),Gt=Rt(Wt),rn=Rt(Ue),An=(0,ut.Z)(Ze,{keepEmpty:!0}),ni=rt===void 0&&Et==="horizontal"?"center":rt,Sn=ke("space",it),[Yn,It]=(0,Lt.Z)(Sn),wn=Ke()(Sn,Be==null?void 0:Be.className,It,`${Sn}-${Et}`,{[`${Sn}-rtl`]:He==="rtl",[`${Sn}-align-${ni}`]:ni,[`${Sn}-gap-row-${Wt}`]:Ln,[`${Sn}-gap-col-${Ue}`]:Fn},Qe,Pt),Gn=Ke()(`${Sn}-item`,(ve=_t==null?void 0:_t.item)!==null&&ve!==void 0?ve:(be=Be==null?void 0:Be.classNames)===null||be===void 0?void 0:be.item);let ze=0;const Ee=An.map((Ae,ye)=>{var qe,vt;Ae!=null&&(ze=ye);const et=Ae&&Ae.key||`${Gn}-${ye}`;return ge.createElement(Ve,{className:Gn,key:et,index:ye,split:Dt,style:(qe=Vt==null?void 0:Vt.item)!==null&&qe!==void 0?qe:(vt=Be==null?void 0:Be.styles)===null||vt===void 0?void 0:vt.item},Ae)}),Pe=ge.useMemo(()=>({latestIndex:ze}),[ze]);if(An.length===0)return null;const Fe={};return Ht&&(Fe.flexWrap="wrap"),!Fn&&rn&&(Fe.columnGap=Ue),!Ln&&Gt&&(Fe.rowGap=Wt),Yn(ge.createElement("div",Object.assign({ref:he,className:wn,style:Object.assign(Object.assign(Object.assign({},Fe),Be==null?void 0:Be.style),ht)},ot),ge.createElement(Tt,{value:Pe},Ee)))});ee.Compact=Xe.ZP;var ce=ee},31797:function(Vn,xn,pe){"use strict";pe.d(xn,{default:function(){return He}});var ge=pe(59301),Oe=pe(56762),Ke=pe(92343),ut=pe(92310),Ge=pe.n(ut),Xe=pe(36355),Ne=pe(61621),Ct=We=>{const{value:rt,formatter:Qe,precision:Pt,decimalSeparator:Ze,groupSeparator:Et="",prefixCls:it}=We;let Dt;if(typeof Qe=="function")Dt=Qe(rt);else{const ht=String(rt),Ht=ht.match(/^(-?)(\d*)(\.(\d+))?$/);if(!Ht||ht==="-")Dt=ht;else{const _t=Ht[1];let Vt=Ht[2]||"0",ot=Ht[4]||"";Vt=Vt.replace(/\B(?=(\d{3})+(?!\d))/g,Et),typeof Pt=="number"&&(ot=ot.padEnd(Pt,"0").slice(0,Pt>0?Pt:0)),ot&&(ot=`${Ze}${ot}`),Dt=[ge.createElement("span",{key:"int",className:`${it}-content-value-int`},_t,Vt),ot&&ge.createElement("span",{key:"decimal",className:`${it}-content-value-decimal`},ot)]}}return ge.createElement("span",{className:`${it}-content-value`},Dt)},Ve=pe(17313),Lt=pe(83116),dt=pe(37613);const Rt=We=>{const{componentCls:rt,marginXXS:Qe,padding:Pt,colorTextDescription:Ze,titleFontSize:Et,colorTextHeading:it,contentFontSize:Dt,fontFamily:ht}=We;return{[`${rt}`]:Object.assign(Object.assign({},(0,Ve.Wf)(We)),{[`${rt}-title`]:{marginBottom:Qe,color:Ze,fontSize:Et},[`${rt}-skeleton`]:{paddingTop:Pt},[`${rt}-content`]:{color:it,fontSize:Dt,fontFamily:ht,[`${rt}-content-value`]:{display:"inline-block",direction:"ltr"},[`${rt}-content-prefix, ${rt}-content-suffix`]:{display:"inline-block"},[`${rt}-content-prefix`]:{marginInlineEnd:Qe},[`${rt}-content-suffix`]:{marginInlineStart:Qe}}})}};var De=(0,Lt.Z)("Statistic",We=>{const rt=(0,dt.TS)(We,{});return[Rt(rt)]},We=>{const{fontSizeHeading3:rt,fontSize:Qe}=We;return{titleFontSize:Qe,contentFontSize:rt}}),ee=We=>{const{prefixCls:rt,className:Qe,rootClassName:Pt,style:Ze,valueStyle:Et,value:it=0,title:Dt,valueRender:ht,prefix:Ht,suffix:_t,loading:Vt=!1,onMouseEnter:ot,onMouseLeave:Ue,decimalSeparator:Wt=".",groupSeparator:Ln=","}=We,{getPrefixCls:Fn,direction:Gt,statistic:rn}=ge.useContext(Xe.E_),An=Fn("statistic",rt),[ni,Sn]=De(An),Yn=ge.createElement(Ct,Object.assign({decimalSeparator:Wt,groupSeparator:Ln,prefixCls:An},We,{value:it})),It=Ge()(An,{[`${An}-rtl`]:Gt==="rtl"},rn==null?void 0:rn.className,Qe,Pt,Sn);return ni(ge.createElement("div",{className:It,style:Object.assign(Object.assign({},rn==null?void 0:rn.style),Ze),onMouseEnter:ot,onMouseLeave:Ue},Dt&&ge.createElement("div",{className:`${An}-title`},Dt),ge.createElement(Ne.Z,{paragraph:!1,loading:Vt,className:`${An}-skeleton`},ge.createElement("div",{style:Et,className:`${An}-content`},Ht&&ge.createElement("span",{className:`${An}-content-prefix`},Ht),ht?ht(Yn):Yn,_t&&ge.createElement("span",{className:`${An}-content-suffix`},_t)))))};const ce=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function se(We,rt){let Qe=We;const Pt=/\[[^\]]*]/g,Ze=(rt.match(Pt)||[]).map(ht=>ht.slice(1,-1)),Et=rt.replace(Pt,"[]"),it=ce.reduce((ht,Ht)=>{let[_t,Vt]=Ht;if(ht.includes(_t)){const ot=Math.floor(Qe/Vt);return Qe-=ot*Vt,ht.replace(new RegExp(`${_t}+`,"g"),Ue=>{const Wt=Ue.length;return ot.toString().padStart(Wt,"0")})}return ht},Et);let Dt=0;return it.replace(Pt,()=>{const ht=Ze[Dt];return Dt+=1,ht})}function he(We,rt){const{format:Qe=""}=rt,Pt=new Date(We).getTime(),Ze=Date.now(),Et=Math.max(Pt-Ze,0);return se(Et,Qe)}const ve=1e3/30;function be(We){return new Date(We).getTime()}const ke=We=>{const{value:rt,format:Qe="HH:mm:ss",onChange:Pt,onFinish:Ze}=We,Et=(0,Oe.Z)(),it=ge.useRef(null),Dt=()=>{Ze==null||Ze(),it.current&&(clearInterval(it.current),it.current=null)},ht=()=>{const Vt=be(rt);Vt>=Date.now()&&(it.current=setInterval(()=>{Et(),Pt==null||Pt(Vt-Date.now()),Vt<Date.now()&&Dt()},ve))};ge.useEffect(()=>(ht(),()=>{it.current&&(clearInterval(it.current),it.current=null)}),[rt]);const Ht=(Vt,ot)=>he(Vt,Object.assign(Object.assign({},ot),{format:Qe})),_t=Vt=>(0,Ke.Tm)(Vt,{title:void 0});return ge.createElement(ee,Object.assign({},We,{valueRender:_t,formatter:Ht}))};var Be=ge.memo(ke);ee.Countdown=Be;var He=ee},15969:function(Vn,xn,pe){"use strict";pe.d(xn,{N:function(){return ge}});const ge=Oe=>({color:Oe.colorLink,textDecoration:"none",outline:"none",cursor:"pointer",transition:`color ${Oe.motionDurationSlow}`,"&:focus, &:hover":{color:Oe.colorLinkHover},"&:active":{color:Oe.colorLinkActive}})},78673:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Et}});var ge=pe(58617),Oe=pe(92310),Ke=pe.n(Oe),ut=pe(96663),Ge=pe(90493),Xe=pe(72071),Ne=pe(6620),Tt=pe(59301),Ct=pe(18929),Ve=pe(10228),Lt=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],dt=Tt.forwardRef(function(it,Dt){var ht,Ht=it.prefixCls,_t=Ht===void 0?"rc-switch":Ht,Vt=it.className,ot=it.checked,Ue=it.defaultChecked,Wt=it.disabled,Ln=it.loadingIcon,Fn=it.checkedChildren,Gt=it.unCheckedChildren,rn=it.onClick,An=it.onChange,ni=it.onKeyDown,Sn=(0,Ne.Z)(it,Lt),Yn=(0,Ct.Z)(!1,{value:ot,defaultValue:Ue}),It=(0,Xe.Z)(Yn,2),wn=It[0],Gn=It[1];function ze(Ae,ye){var qe=wn;return Wt||(qe=Ae,Gn(qe),An==null||An(qe,ye)),qe}function Ee(Ae){Ae.which===Ve.Z.LEFT?ze(!1,Ae):Ae.which===Ve.Z.RIGHT&&ze(!0,Ae),ni==null||ni(Ae)}function Pe(Ae){var ye=ze(!wn,Ae);rn==null||rn(ye,Ae)}var Fe=Ke()(_t,Vt,(ht={},(0,Ge.Z)(ht,"".concat(_t,"-checked"),wn),(0,Ge.Z)(ht,"".concat(_t,"-disabled"),Wt),ht));return Tt.createElement("button",(0,ut.Z)({},Sn,{type:"button",role:"switch","aria-checked":wn,disabled:Wt,className:Fe,ref:Dt,onKeyDown:Ee,onClick:Pe}),Ln,Tt.createElement("span",{className:"".concat(_t,"-inner")},Tt.createElement("span",{className:"".concat(_t,"-inner-checked")},Fn),Tt.createElement("span",{className:"".concat(_t,"-inner-unchecked")},Gt)))});dt.displayName="Switch";var Rt=dt,De=pe(14088),ne=pe(36355),ee=pe(1684),ce=pe(19716),se=pe(64993),he=pe(17313),ve=pe(83116),be=pe(37613);const ke=it=>{const{componentCls:Dt,trackHeightSM:ht,trackPadding:Ht,trackMinWidthSM:_t,innerMinMarginSM:Vt,innerMaxMarginSM:ot,handleSizeSM:Ue}=it,Wt=`${Dt}-inner`;return{[Dt]:{[`&${Dt}-small`]:{minWidth:_t,height:ht,lineHeight:`${ht}px`,[`${Dt}-inner`]:{paddingInlineStart:ot,paddingInlineEnd:Vt,[`${Wt}-checked`]:{marginInlineStart:`calc(-100% + ${Ue+Ht*2}px - ${ot*2}px)`,marginInlineEnd:`calc(100% - ${Ue+Ht*2}px + ${ot*2}px)`},[`${Wt}-unchecked`]:{marginTop:-ht,marginInlineStart:0,marginInlineEnd:0}},[`${Dt}-handle`]:{width:Ue,height:Ue},[`${Dt}-loading-icon`]:{top:(Ue-it.switchLoadingIconSize)/2,fontSize:it.switchLoadingIconSize},[`&${Dt}-checked`]:{[`${Dt}-inner`]:{paddingInlineStart:Vt,paddingInlineEnd:ot,[`${Wt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Wt}-unchecked`]:{marginInlineStart:`calc(100% - ${Ue+Ht*2}px + ${ot*2}px)`,marginInlineEnd:`calc(-100% + ${Ue+Ht*2}px - ${ot*2}px)`}},[`${Dt}-handle`]:{insetInlineStart:`calc(100% - ${Ue+Ht}px)`}},[`&:not(${Dt}-disabled):active`]:{[`&:not(${Dt}-checked) ${Wt}`]:{[`${Wt}-unchecked`]:{marginInlineStart:it.marginXXS/2,marginInlineEnd:-it.marginXXS/2}},[`&${Dt}-checked ${Wt}`]:{[`${Wt}-checked`]:{marginInlineStart:-it.marginXXS/2,marginInlineEnd:it.marginXXS/2}}}}}}},Be=it=>{const{componentCls:Dt,handleSize:ht}=it;return{[Dt]:{[`${Dt}-loading-icon${it.iconCls}`]:{position:"relative",top:(ht-it.fontSize)/2,color:it.switchLoadingIconColor,verticalAlign:"top"},[`&${Dt}-checked ${Dt}-loading-icon`]:{color:it.switchColor}}}},He=it=>{const{componentCls:Dt,motion:ht,trackPadding:Ht,handleBg:_t,handleShadow:Vt,handleSize:ot}=it,Ue=`${Dt}-handle`;return{[Dt]:{[Ue]:{position:"absolute",top:Ht,insetInlineStart:Ht,width:ot,height:ot,transition:`all ${it.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:_t,borderRadius:ot/2,boxShadow:Vt,transition:`all ${it.switchDuration} ease-in-out`,content:'""'}},[`&${Dt}-checked ${Ue}`]:{insetInlineStart:`calc(100% - ${ot+Ht}px)`},[`&:not(${Dt}-disabled):active`]:ht?{[`${Ue}::before`]:{insetInlineEnd:it.switchHandleActiveInset,insetInlineStart:0},[`&${Dt}-checked ${Ue}::before`]:{insetInlineEnd:0,insetInlineStart:it.switchHandleActiveInset}}:{}}}},We=it=>{const{componentCls:Dt,trackHeight:ht,trackPadding:Ht,innerMinMargin:_t,innerMaxMargin:Vt,handleSize:ot}=it,Ue=`${Dt}-inner`;return{[Dt]:{[Ue]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:Vt,paddingInlineEnd:_t,transition:`padding-inline-start ${it.switchDuration} ease-in-out, padding-inline-end ${it.switchDuration} ease-in-out`,[`${Ue}-checked, ${Ue}-unchecked`]:{display:"block",color:it.colorTextLightSolid,fontSize:it.fontSizeSM,transition:`margin-inline-start ${it.switchDuration} ease-in-out, margin-inline-end ${it.switchDuration} ease-in-out`,pointerEvents:"none"},[`${Ue}-checked`]:{marginInlineStart:`calc(-100% + ${ot+Ht*2}px - ${Vt*2}px)`,marginInlineEnd:`calc(100% - ${ot+Ht*2}px + ${Vt*2}px)`},[`${Ue}-unchecked`]:{marginTop:-ht,marginInlineStart:0,marginInlineEnd:0}},[`&${Dt}-checked ${Ue}`]:{paddingInlineStart:_t,paddingInlineEnd:Vt,[`${Ue}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Ue}-unchecked`]:{marginInlineStart:`calc(100% - ${ot+Ht*2}px + ${Vt*2}px)`,marginInlineEnd:`calc(-100% + ${ot+Ht*2}px - ${Vt*2}px)`}},[`&:not(${Dt}-disabled):active`]:{[`&:not(${Dt}-checked) ${Ue}`]:{[`${Ue}-unchecked`]:{marginInlineStart:Ht*2,marginInlineEnd:-Ht*2}},[`&${Dt}-checked ${Ue}`]:{[`${Ue}-checked`]:{marginInlineStart:-Ht*2,marginInlineEnd:Ht*2}}}}}},rt=it=>{const{componentCls:Dt,trackHeight:ht,trackMinWidth:Ht}=it;return{[Dt]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,he.Wf)(it)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:Ht,height:ht,lineHeight:`${ht}px`,verticalAlign:"middle",background:it.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${it.motionDurationMid}`,userSelect:"none",[`&:hover:not(${Dt}-disabled)`]:{background:it.colorTextTertiary}}),(0,he.Qy)(it)),{[`&${Dt}-checked`]:{background:it.switchColor,[`&:hover:not(${Dt}-disabled)`]:{background:it.colorPrimaryHover}},[`&${Dt}-loading, &${Dt}-disabled`]:{cursor:"not-allowed",opacity:it.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${Dt}-rtl`]:{direction:"rtl"}})}};var Qe=(0,ve.Z)("Switch",it=>{const Dt=(0,be.TS)(it,{switchDuration:it.motionDurationMid,switchColor:it.colorPrimary,switchDisabledOpacity:it.opacityLoading,switchLoadingIconSize:it.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${it.opacityLoading})`,switchHandleActiveInset:"-30%"});return[rt(Dt),We(Dt),He(Dt),Be(Dt),ke(Dt)]},it=>{const{fontSize:Dt,lineHeight:ht,controlHeight:Ht,colorWhite:_t}=it,Vt=Dt*ht,ot=Ht/2,Ue=2,Wt=Vt-Ue*2,Ln=ot-Ue*2;return{trackHeight:Vt,trackHeightSM:ot,trackMinWidth:Wt*2+Ue*4,trackMinWidthSM:Ln*2+Ue*2,trackPadding:Ue,handleBg:_t,handleSize:Wt,handleSizeSM:Ln,handleShadow:`0 2px 4px 0 ${new se.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:Wt/2,innerMaxMargin:Wt+Ue+Ue*2,innerMinMarginSM:Ln/2,innerMaxMarginSM:Ln+Ue+Ue*2}}),Pt=function(it,Dt){var ht={};for(var Ht in it)Object.prototype.hasOwnProperty.call(it,Ht)&&Dt.indexOf(Ht)<0&&(ht[Ht]=it[Ht]);if(it!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _t=0,Ht=Object.getOwnPropertySymbols(it);_t<Ht.length;_t++)Dt.indexOf(Ht[_t])<0&&Object.prototype.propertyIsEnumerable.call(it,Ht[_t])&&(ht[Ht[_t]]=it[Ht[_t]]);return ht};const Ze=Tt.forwardRef((it,Dt)=>{const{prefixCls:ht,size:Ht,disabled:_t,loading:Vt,className:ot,rootClassName:Ue,style:Wt}=it,Ln=Pt(it,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:Fn,direction:Gt,switch:rn}=Tt.useContext(ne.E_),An=Tt.useContext(ee.Z),ni=(_t!=null?_t:An)||Vt,Sn=Fn("switch",ht),Yn=Tt.createElement("div",{className:`${Sn}-handle`},Vt&&Tt.createElement(ge.Z,{className:`${Sn}-loading-icon`})),[It,wn]=Qe(Sn),Gn=(0,ce.Z)(Ht),ze=Ke()(rn==null?void 0:rn.className,{[`${Sn}-small`]:Gn==="small",[`${Sn}-loading`]:Vt,[`${Sn}-rtl`]:Gt==="rtl"},ot,Ue,wn),Ee=Object.assign(Object.assign({},rn==null?void 0:rn.style),Wt);return It(Tt.createElement(De.Z,{component:"Switch"},Tt.createElement(Rt,Object.assign({},Ln,{prefixCls:Sn,className:ze,style:Ee,disabled:ni,ref:Dt,loadingIcon:Yn}))))});Ze.__ANT_SWITCH=!0;var Et=Ze},1710:function(Vn,xn,pe){"use strict";pe.d(xn,{default:function(){return dg}});var ge={},Oe="rc-table-internal-hook",Ke=pe(72071),ut=pe(6089),Ge=pe(34280),Xe=pe(13697),Ne=pe(59301),Tt=pe(4676);function Ct(pt){var wt=Ne.createContext(void 0),tn=function(zn){var bn=zn.value,si=zn.children,li=Ne.useRef(bn);li.current=bn;var ei=Ne.useState(function(){return{getValue:function(){return li.current},listeners:new Set}}),Mi=(0,Ke.Z)(ei,1),Ai=Mi[0];return(0,Ge.Z)(function(){(0,Tt.unstable_batchedUpdates)(function(){Ai.listeners.forEach(function(Ni){Ni(bn)})})},[bn]),Ne.createElement(wt.Provider,{value:Ai},si)};return{Context:wt,Provider:tn,defaultValue:pt}}function Ve(pt,wt){var tn=(0,ut.Z)(typeof wt=="function"?wt:function(Ni){if(wt===void 0)return Ni;if(!Array.isArray(wt))return Ni[wt];var fr={};return wt.forEach(function(dr){fr[dr]=Ni[dr]}),fr}),an=Ne.useContext(pt==null?void 0:pt.Context),zn=an||{},bn=zn.listeners,si=zn.getValue,li=Ne.useRef();li.current=tn(an?si():pt==null?void 0:pt.defaultValue);var ei=Ne.useState({}),Mi=(0,Ke.Z)(ei,2),Ai=Mi[1];return(0,Ge.Z)(function(){if(!an)return;function Ni(fr){var dr=tn(fr);(0,Xe.Z)(li.current,dr,!0)||Ai({})}return bn.add(Ni),function(){bn.delete(Ni)}},[an]),li.current}var Lt=pe(96663),dt=pe(8654);function Rt(){var pt=Ne.createContext(null);function wt(){return Ne.useContext(pt)}function tn(zn,bn){var si=(0,dt.Yr)(zn),li=function(Mi,Ai){var Ni=si?{ref:Ai}:{},fr=Ne.useRef(0),dr=Ne.useRef(Mi),ir=wt();return ir!==null?Ne.createElement(zn,(0,Lt.Z)({},Mi,Ni)):((!bn||bn(dr.current,Mi))&&(fr.current+=1),dr.current=Mi,Ne.createElement(pt.Provider,{value:fr.current},Ne.createElement(zn,(0,Lt.Z)({},Mi,Ni))))};return si?Ne.forwardRef(li):li}function an(zn,bn){var si=(0,dt.Yr)(zn),li=function(Mi,Ai){var Ni=si?{ref:Ai}:{};return wt(),Ne.createElement(zn,(0,Lt.Z)({},Mi,Ni))};return si?Ne.memo(Ne.forwardRef(li),bn):Ne.memo(li,bn)}return{makeImmutable:tn,responseImmutable:an,useImmutableMark:wt}}var De=Rt(),ne=De.makeImmutable,ee=De.responseImmutable,ce=De.useImmutableMark,se=Rt(),he=se.makeImmutable,ve=se.responseImmutable,be=se.useImmutableMark,ke=Ct(),Be=ke;function He(pt,wt){var tn=Ne.useRef(0);tn.current+=1;var an=Ne.useRef(pt),zn=[];Object.keys(pt||{}).map(function(si){var li;(pt==null?void 0:pt[si])!==((li=an.current)===null||li===void 0?void 0:li[si])&&zn.push(si)}),an.current=pt;var bn=Ne.useRef([]);return zn.length&&(bn.current=zn),Ne.useDebugValue(tn.current),Ne.useDebugValue(bn.current.join(", ")),wt&&console.log("".concat(wt,":"),tn.current,bn.current),tn.current}var We=null,rt=Ne.memo(function(){var pt=He();return Ne.createElement("h1",null,"Render Times: ",pt)});rt.displayName="RenderBlock";var Qe=pe(20135),Pt=pe(44127),Ze=pe(90493),Et=pe(92310),it=pe.n(Et),Dt=pe(80547),ht=pe(97938),Ht=pe(48736),_t=Ne.createContext({renderWithProps:!1}),Vt=_t,ot="RC_TABLE_KEY";function Ue(pt){return pt==null?[]:Array.isArray(pt)?pt:[pt]}function Wt(pt){var wt=[],tn={};return pt.forEach(function(an){for(var zn=an||{},bn=zn.key,si=zn.dataIndex,li=bn||Ue(si).join("-")||ot;tn[li];)li="".concat(li,"_next");tn[li]=!0,wt.push(li)}),wt}function Ln(pt){return pt!=null}function Fn(pt){return pt&&(0,Qe.Z)(pt)==="object"&&!Array.isArray(pt)&&!Ne.isValidElement(pt)}function Gt(pt,wt,tn,an,zn,bn){var si=Ne.useContext(Vt),li=be(),ei=(0,Dt.Z)(function(){if(Ln(an))return[an];var Mi=wt==null||wt===""?[]:Array.isArray(wt)?wt:[wt],Ai=(0,ht.Z)(pt,Mi),Ni=Ai,fr=void 0;if(zn){var dr=zn(Ai,pt,tn);Fn(dr)?(Ni=dr.children,fr=dr.props,si.renderWithProps=!0):Ni=dr}return[Ni,fr]},[li,pt,an,wt,zn,tn],function(Mi,Ai){if(bn){var Ni=(0,Ke.Z)(Mi,2),fr=Ni[1],dr=(0,Ke.Z)(Ai,2),ir=dr[1];return bn(ir,fr)}return si.renderWithProps?!0:!(0,Xe.Z)(Mi,Ai,!0)});return ei}function rn(pt,wt,tn,an){var zn=pt+wt-1;return pt<=an&&zn>=tn}function An(pt,wt){return Ve(Be,function(tn){var an=rn(pt,wt||1,tn.hoverStartRow,tn.hoverEndRow);return[an,tn.onHover]})}var ni=function(wt){var tn=wt.ellipsis,an=wt.rowType,zn=wt.children,bn,si=tn===!0?{showTitle:!0}:tn;return si&&(si.showTitle||an==="header")&&(typeof zn=="string"||typeof zn=="number"?bn=zn.toString():Ne.isValidElement(zn)&&typeof zn.props.children=="string"&&(bn=zn.props.children)),bn};function Sn(pt){var wt,tn,an,zn,bn,si,li,ei,Mi=pt.component,Ai=pt.children,Ni=pt.ellipsis,fr=pt.scope,dr=pt.prefixCls,ir=pt.className,Wr=pt.align,sr=pt.record,zr=pt.render,Ir=pt.dataIndex,eo=pt.renderIndex,xo=pt.shouldCellUpdate,ko=pt.index,$r=pt.rowType,So=pt.colSpan,Xo=pt.rowSpan,_r=pt.fixLeft,co=pt.fixRight,Xr=pt.firstFixLeft,Cr=pt.lastFixLeft,oo=pt.firstFixRight,Mo=pt.lastFixRight,Zo=pt.appendNode,Wo=pt.additionalProps,Kr=Wo===void 0?{}:Wo,Yo=pt.isSticky,ia="".concat(dr,"-cell"),Ta=Ve(Be,["supportSticky","allColumnsFixedLeft"]),pa=Ta.supportSticky,ds=Ta.allColumnsFixedLeft,ja=Gt(sr,Ir,eo,Ai,zr,xo),na=(0,Ke.Z)(ja,2),Fo=na[0],Sa=na[1],hs={},Qa=typeof _r=="number"&&pa,Ns=typeof co=="number"&&pa;Qa&&(hs.position="sticky",hs.left=_r),Ns&&(hs.position="sticky",hs.right=co);var $o=(wt=(tn=(an=Sa==null?void 0:Sa.colSpan)!==null&&an!==void 0?an:Kr.colSpan)!==null&&tn!==void 0?tn:So)!==null&&wt!==void 0?wt:1,Io=(zn=(bn=(si=Sa==null?void 0:Sa.rowSpan)!==null&&si!==void 0?si:Kr.rowSpan)!==null&&bn!==void 0?bn:Xo)!==null&&zn!==void 0?zn:1,Go=An(ko,Io),Co=(0,Ke.Z)(Go,2),Aa=Co[0],Po=Co[1],Jo=function(Fs){var Ws;sr&&Po(ko,ko+Io-1),Kr==null||(Ws=Kr.onMouseEnter)===null||Ws===void 0||Ws.call(Kr,Fs)},ga=function(Fs){var Ws;sr&&Po(-1,-1),Kr==null||(Ws=Kr.onMouseLeave)===null||Ws===void 0||Ws.call(Kr,Fs)};if($o===0||Io===0)return null;var ma=(li=Kr.title)!==null&&li!==void 0?li:ni({rowType:$r,ellipsis:Ni,children:Fo}),Us=it()(ia,ir,(ei={},(0,Ze.Z)(ei,"".concat(ia,"-fix-left"),Qa&&pa),(0,Ze.Z)(ei,"".concat(ia,"-fix-left-first"),Xr&&pa),(0,Ze.Z)(ei,"".concat(ia,"-fix-left-last"),Cr&&pa),(0,Ze.Z)(ei,"".concat(ia,"-fix-left-all"),Cr&&ds&&pa),(0,Ze.Z)(ei,"".concat(ia,"-fix-right"),Ns&&pa),(0,Ze.Z)(ei,"".concat(ia,"-fix-right-first"),oo&&pa),(0,Ze.Z)(ei,"".concat(ia,"-fix-right-last"),Mo&&pa),(0,Ze.Z)(ei,"".concat(ia,"-ellipsis"),Ni),(0,Ze.Z)(ei,"".concat(ia,"-with-append"),Zo),(0,Ze.Z)(ei,"".concat(ia,"-fix-sticky"),(Qa||Ns)&&Yo&&pa),(0,Ze.Z)(ei,"".concat(ia,"-row-hover"),!Sa&&Aa),ei),Kr.className,Sa==null?void 0:Sa.className),Zs={};Wr&&(Zs.textAlign=Wr);var cl=(0,Pt.Z)((0,Pt.Z)((0,Pt.Z)((0,Pt.Z)({},hs),Kr.style),Zs),Sa==null?void 0:Sa.style),ka=Fo;return(0,Qe.Z)(ka)==="object"&&!Array.isArray(ka)&&!Ne.isValidElement(ka)&&(ka=null),Ni&&(Cr||oo)&&(ka=Ne.createElement("span",{className:"".concat(ia,"-content")},ka)),Ne.createElement(Mi,(0,Lt.Z)({},Sa,Kr,{className:Us,style:cl,title:ma,scope:fr,onMouseEnter:Jo,onMouseLeave:ga,colSpan:$o!==1?$o:null,rowSpan:Io!==1?Io:null}),Zo,ka)}var Yn=Ne.memo(Sn);function It(pt,wt,tn,an,zn,bn){var si=tn[pt]||{},li=tn[wt]||{},ei,Mi;si.fixed==="left"?ei=an.left[zn==="rtl"?wt:pt]:li.fixed==="right"&&(Mi=an.right[zn==="rtl"?pt:wt]);var Ai=!1,Ni=!1,fr=!1,dr=!1,ir=tn[wt+1],Wr=tn[pt-1],sr=!(bn!=null&&bn.children);if(zn==="rtl"){if(ei!==void 0){var zr=Wr&&Wr.fixed==="left";dr=!zr&&sr}else if(Mi!==void 0){var Ir=ir&&ir.fixed==="right";fr=!Ir&&sr}}else if(ei!==void 0){var eo=ir&&ir.fixed==="left";Ai=!eo&&sr}else if(Mi!==void 0){var xo=Wr&&Wr.fixed==="right";Ni=!xo&&sr}return{fixLeft:ei,fixRight:Mi,lastFixLeft:Ai,firstFixRight:Ni,lastFixRight:fr,firstFixLeft:dr,isSticky:an.isSticky}}var wn=Ne.createContext({}),Gn=wn;function ze(pt){var wt=pt.className,tn=pt.index,an=pt.children,zn=pt.colSpan,bn=zn===void 0?1:zn,si=pt.rowSpan,li=pt.align,ei=Ve(Be,["prefixCls","direction"]),Mi=ei.prefixCls,Ai=ei.direction,Ni=Ne.useContext(Gn),fr=Ni.scrollColumnIndex,dr=Ni.stickyOffsets,ir=Ni.flattenColumns,Wr=Ni.columns,sr=tn+bn-1,zr=sr+1===fr?bn+1:bn,Ir=It(tn,tn+zr-1,ir,dr,Ai,Wr==null?void 0:Wr[tn]);return Ne.createElement(Yn,(0,Lt.Z)({className:wt,index:tn,component:"td",prefixCls:Mi,record:null,dataIndex:null,align:li,colSpan:zr,rowSpan:si,render:function(){return an}},Ir))}var Ee=pe(6620),Pe=["children"];function Fe(pt){var wt=pt.children,tn=(0,Ee.Z)(pt,Pe);return Ne.createElement("tr",tn,wt)}function Ae(pt){var wt=pt.children;return wt}Ae.Row=Fe,Ae.Cell=ze;var ye=Ae;function qe(pt){var wt=pt.children,tn=pt.stickyOffsets,an=pt.flattenColumns,zn=pt.columns,bn=Ve(Be,"prefixCls"),si=an.length-1,li=an[si],ei=Ne.useMemo(function(){return{stickyOffsets:tn,flattenColumns:an,scrollColumnIndex:li!=null&&li.scrollbar?si:null,columns:zn}},[li,an,si,tn,zn]);return Ne.createElement(Gn.Provider,{value:ei},Ne.createElement("tfoot",{className:"".concat(bn,"-summary")},wt))}var vt=ve(qe),et=ye,Ye=pe(70425),xt=pe(29301),yt=pe(29194),at=pe(24514),zt=pe(75152),un=pe(26112);function fn(pt,wt,tn,an,zn,bn,si){pt.push({record:wt,indent:tn,index:si});var li=bn(wt),ei=zn==null?void 0:zn.has(li);if(wt&&Array.isArray(wt[an])&&ei)for(var Mi=0;Mi<wt[an].length;Mi+=1)fn(pt,wt[an][Mi],tn+1,an,zn,bn,Mi)}function Qt(pt,wt,tn,an){var zn=Ne.useMemo(function(){if(tn!=null&&tn.size){for(var bn=[],si=0;si<(pt==null?void 0:pt.length);si+=1){var li=pt[si];fn(bn,li,0,wt,tn,an,si)}return bn}return pt==null?void 0:pt.map(function(ei,Mi){return{record:ei,indent:0,index:Mi}})},[pt,wt,tn,an]);return zn}function Kn(pt){var wt=pt.prefixCls,tn=pt.children,an=pt.component,zn=pt.cellComponent,bn=pt.className,si=pt.expanded,li=pt.colSpan,ei=pt.isEmpty,Mi=Ve(Be,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),Ai=Mi.scrollbarSize,Ni=Mi.fixHeader,fr=Mi.fixColumn,dr=Mi.componentWidth,ir=Mi.horizonScroll,Wr=tn;return(ei?ir&&dr:fr)&&(Wr=Ne.createElement("div",{style:{width:dr-(Ni?Ai:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(wt,"-expanded-row-fixed")},Wr)),Ne.createElement(an,{className:bn,style:{display:si?null:"none"}},Ne.createElement(Yn,{component:zn,prefixCls:wt,colSpan:li},Wr))}var On=Kn;function jt(pt,wt,tn,an){var zn=Ve(Be,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),bn=zn.flattenColumns,si=zn.expandableType,li=zn.expandedKeys,ei=zn.childrenColumnName,Mi=zn.onTriggerExpand,Ai=zn.rowExpandable,Ni=zn.onRow,fr=zn.expandRowByClick,dr=zn.rowClassName,ir=si==="nest",Wr=si==="row"&&(!Ai||Ai(pt)),sr=Wr||ir,zr=li&&li.has(wt),Ir=ei&&pt&&pt[ei],eo=(0,Ye.useEvent)(Mi),xo=Ni==null?void 0:Ni(pt,tn),ko=xo==null?void 0:xo.onClick,$r=function(co){fr&&sr&&Mi(pt,co);for(var Xr=arguments.length,Cr=new Array(Xr>1?Xr-1:0),oo=1;oo<Xr;oo++)Cr[oo-1]=arguments[oo];ko==null||ko.apply(void 0,[co].concat(Cr))},So;typeof dr=="string"?So=dr:typeof dr=="function"&&(So=dr(pt,tn,an));var Xo=Wt(bn);return(0,Pt.Z)((0,Pt.Z)({},zn),{},{columnsKey:Xo,nestExpandable:ir,expanded:zr,hasNestChildren:Ir,record:pt,onTriggerExpand:eo,rowSupportExpand:Wr,expandable:sr,rowProps:(0,Pt.Z)((0,Pt.Z)({},xo),{},{className:it()(So,xo==null?void 0:xo.className),onClick:$r})})}function sn(pt,wt,tn,an,zn){var bn=pt.record,si=pt.prefixCls,li=pt.columnsKey,ei=pt.fixedInfoList,Mi=pt.expandIconColumnIndex,Ai=pt.nestExpandable,Ni=pt.indentSize,fr=pt.expandIcon,dr=pt.expanded,ir=pt.hasNestChildren,Wr=pt.onTriggerExpand,sr=li[tn],zr=ei[tn],Ir;tn===(Mi||0)&&Ai&&(Ir=Ne.createElement(Ne.Fragment,null,Ne.createElement("span",{style:{paddingLeft:"".concat(Ni*an,"px")},className:"".concat(si,"-row-indent indent-level-").concat(an)}),fr({prefixCls:si,expanded:dr,expandable:ir,record:bn,onExpand:Wr})));var eo;return wt.onCell&&(eo=wt.onCell(bn,zn)),{key:sr,fixedInfo:zr,appendCellNode:Ir,additionalCellProps:eo||{}}}function jn(pt){var wt=pt.className,tn=pt.style,an=pt.record,zn=pt.index,bn=pt.renderIndex,si=pt.rowKey,li=pt.indent,ei=li===void 0?0:li,Mi=pt.rowComponent,Ai=pt.cellComponent,Ni=pt.scopeCellComponent,fr=jt(an,si,zn,ei),dr=fr.prefixCls,ir=fr.flattenColumns,Wr=fr.expandedRowClassName,sr=fr.expandedRowRender,zr=fr.rowProps,Ir=fr.expanded,eo=fr.rowSupportExpand,xo=Ne.useState(!1),ko=(0,Ke.Z)(xo,2),$r=ko[0],So=ko[1];Ne.useEffect(function(){Ir&&So(!0)},[Ir]);var Xo=Ne.createElement(Mi,(0,Lt.Z)({},zr,{"data-row-key":si,className:it()(wt,"".concat(dr,"-row"),"".concat(dr,"-row-level-").concat(ei),zr==null?void 0:zr.className),style:(0,Pt.Z)((0,Pt.Z)({},tn),zr==null?void 0:zr.style)}),ir.map(function(Cr,oo){var Mo=Cr.render,Zo=Cr.dataIndex,Wo=Cr.className,Kr=sn(fr,Cr,oo,ei,zn),Yo=Kr.key,ia=Kr.fixedInfo,Ta=Kr.appendCellNode,pa=Kr.additionalCellProps;return Ne.createElement(Yn,(0,Lt.Z)({className:Wo,ellipsis:Cr.ellipsis,align:Cr.align,scope:Cr.rowScope,component:Cr.rowScope?Ni:Ai,prefixCls:dr,key:Yo,record:an,index:zn,renderIndex:bn,dataIndex:Zo,render:Mo,shouldCellUpdate:Cr.shouldCellUpdate},ia,{appendNode:Ta,additionalProps:pa}))})),_r;if(eo&&($r||Ir)){var co=sr(an,zn,ei+1,Ir),Xr=Wr&&Wr(an,zn,ei);_r=Ne.createElement(On,{expanded:Ir,className:it()("".concat(dr,"-expanded-row"),"".concat(dr,"-expanded-row-level-").concat(ei+1),Xr),prefixCls:dr,component:Mi,cellComponent:Ai,colSpan:ir.length,isEmpty:!1},co)}return Ne.createElement(Ne.Fragment,null,Xo,_r)}jn.displayName="BodyRow";var dn=ve(jn);function Pn(pt){var wt=pt.columnKey,tn=pt.onColumnResize,an=Ne.useRef();return Ne.useEffect(function(){an.current&&tn(wt,an.current.offsetWidth)},[]),Ne.createElement(xt.Z,{data:wt},Ne.createElement("td",{ref:an,style:{padding:0,border:0,height:0}},Ne.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function ui(pt){var wt=pt.prefixCls,tn=pt.columnsKey,an=pt.onColumnResize;return Ne.createElement("tr",{"aria-hidden":"true",className:"".concat(wt,"-measure-row"),style:{height:0,fontSize:0}},Ne.createElement(xt.Z.Collection,{onBatchResize:function(bn){bn.forEach(function(si){var li=si.data,ei=si.size;an(li,ei.offsetWidth)})}},tn.map(function(zn){return Ne.createElement(Pn,{key:zn,columnKey:zn,onColumnResize:an})})))}function pi(pt){var wt=pt.data,tn=pt.measureColumnWidth,an=Ve(Be,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),zn=an.prefixCls,bn=an.getComponent,si=an.onColumnResize,li=an.flattenColumns,ei=an.getRowKey,Mi=an.expandedKeys,Ai=an.childrenColumnName,Ni=an.emptyNode,fr=Qt(wt,Ai,Mi,ei),dr=Ne.useRef({renderWithProps:!1}),ir=bn(["body","wrapper"],"tbody"),Wr=bn(["body","row"],"tr"),sr=bn(["body","cell"],"td"),zr=bn(["body","cell"],"th"),Ir;wt.length?Ir=fr.map(function(xo,ko){var $r=xo.record,So=xo.indent,Xo=xo.index,_r=ei($r,ko);return Ne.createElement(dn,{key:_r,rowKey:_r,record:$r,index:ko,renderIndex:Xo,rowComponent:Wr,cellComponent:sr,scopeCellComponent:zr,getRowKey:ei,indent:So})}):Ir=Ne.createElement(On,{expanded:!0,className:"".concat(zn,"-placeholder"),prefixCls:zn,component:Wr,cellComponent:sr,colSpan:li.length,isEmpty:!0},Ni);var eo=Wt(li);return Ne.createElement(Vt.Provider,{value:dr.current},Ne.createElement(ir,{className:"".concat(zn,"-tbody")},tn&&Ne.createElement(ui,{prefixCls:zn,columnsKey:eo,onColumnResize:si}),Ir))}pi.displayName="Body";var gi=ve(pi),bi=["expandable"],Xi="RC_TABLE_INTERNAL_COL_DEFINE";function ar(pt){var wt=pt.expandable,tn=(0,Ee.Z)(pt,bi),an;return"expandable"in pt?an=(0,Pt.Z)((0,Pt.Z)({},tn),wt):an=tn,an.showExpandColumn===!1&&(an.expandIconColumnIndex=-1),an}var Ji=["columnType"];function wr(pt){for(var wt=pt.colWidths,tn=pt.columns,an=pt.columCount,zn=[],bn=an||tn.length,si=!1,li=bn-1;li>=0;li-=1){var ei=wt[li],Mi=tn&&tn[li],Ai=Mi&&Mi[Xi];if(ei||Ai||si){var Ni=Ai||{},fr=Ni.columnType,dr=(0,Ee.Z)(Ni,Ji);zn.unshift(Ne.createElement("col",(0,Lt.Z)({key:li,style:{width:ei}},dr))),si=!0}}return Ne.createElement("colgroup",null,zn)}var mr=wr,Hi=pe(19127),Er=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function $n(pt,wt){return(0,Ne.useMemo)(function(){for(var tn=[],an=0;an<wt;an+=1){var zn=pt[an];if(zn!==void 0)tn[an]=zn;else return null}return tn},[pt.join("_"),wt])}var Le=Ne.forwardRef(function(pt,wt){var tn=pt.className,an=pt.noData,zn=pt.columns,bn=pt.flattenColumns,si=pt.colWidths,li=pt.columCount,ei=pt.stickyOffsets,Mi=pt.direction,Ai=pt.fixHeader,Ni=pt.stickyTopOffset,fr=pt.stickyBottomOffset,dr=pt.stickyClassName,ir=pt.onScroll,Wr=pt.maxContentScroll,sr=pt.children,zr=(0,Ee.Z)(pt,Er),Ir=Ve(Be,["prefixCls","scrollbarSize","isSticky"]),eo=Ir.prefixCls,xo=Ir.scrollbarSize,ko=Ir.isSticky,$r=ko&&!Ai?0:xo,So=Ne.useRef(null),Xo=Ne.useCallback(function(Wo){(0,dt.mH)(wt,Wo),(0,dt.mH)(So,Wo)},[]);Ne.useEffect(function(){var Wo;function Kr(Yo){var ia=Yo,Ta=ia.currentTarget,pa=ia.deltaX;pa&&(ir({currentTarget:Ta,scrollLeft:Ta.scrollLeft+pa}),Yo.preventDefault())}return(Wo=So.current)===null||Wo===void 0||Wo.addEventListener("wheel",Kr),function(){var Yo;(Yo=So.current)===null||Yo===void 0||Yo.removeEventListener("wheel",Kr)}},[]);var _r=Ne.useMemo(function(){return bn.every(function(Wo){return Wo.width})},[bn]),co=bn[bn.length-1],Xr={fixed:co?co.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(eo,"-cell-scrollbar")}}},Cr=(0,Ne.useMemo)(function(){return $r?[].concat((0,Hi.Z)(zn),[Xr]):zn},[$r,zn]),oo=(0,Ne.useMemo)(function(){return $r?[].concat((0,Hi.Z)(bn),[Xr]):bn},[$r,bn]),Mo=(0,Ne.useMemo)(function(){var Wo=ei.right,Kr=ei.left;return(0,Pt.Z)((0,Pt.Z)({},ei),{},{left:Mi==="rtl"?[].concat((0,Hi.Z)(Kr.map(function(Yo){return Yo+$r})),[0]):Kr,right:Mi==="rtl"?Wo:[].concat((0,Hi.Z)(Wo.map(function(Yo){return Yo+$r})),[0]),isSticky:ko})},[$r,ei,ko]),Zo=$n(si,li);return Ne.createElement("div",{style:(0,Pt.Z)({overflow:"hidden"},ko?{top:Ni,bottom:fr}:{}),ref:Xo,className:it()(tn,(0,Ze.Z)({},dr,!!dr))},Ne.createElement("table",{style:{tableLayout:"fixed",visibility:an||Zo?null:"hidden"}},(!an||!Wr||_r)&&Ne.createElement(mr,{colWidths:Zo?[].concat((0,Hi.Z)(Zo),[$r]):[],columCount:li+1,columns:oo}),sr((0,Pt.Z)((0,Pt.Z)({},zr),{},{stickyOffsets:Mo,columns:Cr,flattenColumns:oo}))))});Le.displayName="FixedHolder";var Ei=Ne.memo(Le);function Ri(pt){var wt=pt.cells,tn=pt.stickyOffsets,an=pt.flattenColumns,zn=pt.rowComponent,bn=pt.cellComponent,si=pt.tdCellComponent,li=pt.onHeaderRow,ei=pt.index,Mi=Ve(Be,["prefixCls","direction"]),Ai=Mi.prefixCls,Ni=Mi.direction,fr;li&&(fr=li(wt.map(function(ir){return ir.column}),ei));var dr=Wt(wt.map(function(ir){return ir.column}));return Ne.createElement(zn,fr,wt.map(function(ir,Wr){var sr=ir.column,zr=It(ir.colStart,ir.colEnd,an,tn,Ni,sr),Ir;return sr&&sr.onHeaderCell&&(Ir=ir.column.onHeaderCell(sr)),Ne.createElement(Yn,(0,Lt.Z)({},ir,{scope:sr.title?ir.colSpan>1?"colgroup":"col":null,ellipsis:sr.ellipsis,align:sr.align,component:sr.title?bn:si,prefixCls:Ai,key:dr[Wr]},zr,{additionalProps:Ir,rowType:"header"}))}))}Ri.displayName="HeaderRow";var nn=Ri;function di(pt){var wt=[];function tn(si,li){var ei=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;wt[ei]=wt[ei]||[];var Mi=li,Ai=si.filter(Boolean).map(function(Ni){var fr={key:Ni.key,className:Ni.className||"",children:Ni.title,column:Ni,colStart:Mi},dr=1,ir=Ni.children;return ir&&ir.length>0&&(dr=tn(ir,Mi,ei+1).reduce(function(Wr,sr){return Wr+sr},0),fr.hasSubColumns=!0),"colSpan"in Ni&&(dr=Ni.colSpan),"rowSpan"in Ni&&(fr.rowSpan=Ni.rowSpan),fr.colSpan=dr,fr.colEnd=fr.colStart+dr-1,wt[ei].push(fr),Mi+=dr,dr});return Ai}tn(pt,0);for(var an=wt.length,zn=function(li){wt[li].forEach(function(ei){!("rowSpan"in ei)&&!ei.hasSubColumns&&(ei.rowSpan=an-li)})},bn=0;bn<an;bn+=1)zn(bn);return wt}function yi(pt){var wt=pt.stickyOffsets,tn=pt.columns,an=pt.flattenColumns,zn=pt.onHeaderRow,bn=Ve(Be,["prefixCls","getComponent"]),si=bn.prefixCls,li=bn.getComponent,ei=Ne.useMemo(function(){return di(tn)},[tn]),Mi=li(["header","wrapper"],"thead"),Ai=li(["header","row"],"tr"),Ni=li(["header","cell"],"th"),fr=li(["header","cell"],"td");return Ne.createElement(Mi,{className:"".concat(si,"-thead")},ei.map(function(dr,ir){var Wr=Ne.createElement(nn,{key:ir,flattenColumns:an,cells:dr,stickyOffsets:wt,rowComponent:Ai,cellComponent:Ni,tdCellComponent:fr,onHeaderRow:zn,index:ir});return Wr}))}var Li=ve(yi),Tn=pe(11592);function Un(pt){var wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof wt=="number"?wt:wt.endsWith("%")?pt*parseFloat(wt)/100:null}function kt(pt,wt){return Ne.useMemo(function(){if(wt&&wt>0){var tn=0,an=0;pt.forEach(function(Mi){var Ai=Un(wt,Mi.width);Ai?tn+=Ai:an+=1});var zn=wt-tn,bn=an,si=zn/an,li=0,ei=pt.map(function(Mi){var Ai=(0,Pt.Z)({},Mi),Ni=Un(wt,Ai.width);if(Ni)Ai.width=Ni;else{var fr=Math.floor(si);Ai.width=bn===1?zn:fr,zn-=fr,bn-=1}return li+=Ai.width,Ai});return[ei,li]}return[pt,wt]},[pt,wt])}var $t=["children"],Je=["fixed"];function qt(pt){return(0,Tn.Z)(pt).filter(function(wt){return Ne.isValidElement(wt)}).map(function(wt){var tn=wt.key,an=wt.props,zn=an.children,bn=(0,Ee.Z)(an,$t),si=(0,Pt.Z)({key:tn},bn);return zn&&(si.children=qt(zn)),si})}function vn(pt){var wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return pt.filter(function(tn){return tn&&(0,Qe.Z)(tn)==="object"}).reduce(function(tn,an,zn){var bn=an.fixed,si=bn===!0?"left":bn,li="".concat(wt,"-").concat(zn),ei=an.children;return ei&&ei.length>0?[].concat((0,Hi.Z)(tn),(0,Hi.Z)(vn(ei,li).map(function(Mi){return(0,Pt.Z)({fixed:si},Mi)}))):[].concat((0,Hi.Z)(tn),[(0,Pt.Z)((0,Pt.Z)({key:li},an),{},{fixed:si})])},[])}function Ft(pt){for(var wt=!0,tn=0;tn<pt.length;tn+=1){var an=pt[tn];if(wt&&an.fixed!=="left")wt=!1;else if(!wt&&an.fixed==="left"){warning(!1,"Index ".concat(tn-1," of `columns` missing `fixed='left'` prop."));break}}for(var zn=!0,bn=pt.length-1;bn>=0;bn-=1){var si=pt[bn];if(zn&&si.fixed!=="right")zn=!1;else if(!zn&&si.fixed==="right"){warning(!1,"Index ".concat(bn+1," of `columns` missing `fixed='right'` prop."));break}}}function st(pt){return pt.map(function(wt){var tn=wt.fixed,an=(0,Ee.Z)(wt,Je),zn=tn;return tn==="left"?zn="right":tn==="right"&&(zn="left"),(0,Pt.Z)({fixed:zn},an)})}function on(pt,wt){var tn=pt.prefixCls,an=pt.columns,zn=pt.children,bn=pt.expandable,si=pt.expandedKeys,li=pt.columnTitle,ei=pt.getRowKey,Mi=pt.onTriggerExpand,Ai=pt.expandIcon,Ni=pt.rowExpandable,fr=pt.expandIconColumnIndex,dr=pt.direction,ir=pt.expandRowByClick,Wr=pt.columnWidth,sr=pt.fixed,zr=pt.scrollWidth,Ir=Ne.useMemo(function(){return an||qt(zn)},[an,zn]),eo=Ne.useMemo(function(){if(bn){var co,Xr=Ir.slice();if(!Xr.includes(ge)){var Cr=fr||0;Cr>=0&&Xr.splice(Cr,0,ge)}var oo=Xr.indexOf(ge);Xr=Xr.filter(function(Kr,Yo){return Kr!==ge||Yo===oo});var Mo=Ir[oo],Zo;(sr==="left"||sr)&&!fr?Zo="left":(sr==="right"||sr)&&fr===Ir.length?Zo="right":Zo=Mo?Mo.fixed:null;var Wo=(co={},(0,Ze.Z)(co,Xi,{className:"".concat(tn,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),(0,Ze.Z)(co,"title",li),(0,Ze.Z)(co,"fixed",Zo),(0,Ze.Z)(co,"className","".concat(tn,"-row-expand-icon-cell")),(0,Ze.Z)(co,"width",Wr),(0,Ze.Z)(co,"render",function(Yo,ia,Ta){var pa=ei(ia,Ta),ds=si.has(pa),ja=Ni?Ni(ia):!0,na=Ai({prefixCls:tn,expanded:ds,expandable:ja,record:ia,onExpand:Mi});return ir?Ne.createElement("span",{onClick:function(Sa){return Sa.stopPropagation()}},na):na}),co);return Xr.map(function(Kr){return Kr===ge?Wo:Kr})}return Ir.filter(function(Kr){return Kr!==ge})},[bn,Ir,ei,si,Ai,dr]),xo=Ne.useMemo(function(){var co=eo;return wt&&(co=wt(co)),co.length||(co=[{render:function(){return null}}]),co},[wt,eo,dr]),ko=Ne.useMemo(function(){return dr==="rtl"?st(vn(xo)):vn(xo)},[xo,dr,zr]),$r=kt(ko,zr),So=(0,Ke.Z)($r,2),Xo=So[0],_r=So[1];return[xo,Xo,_r]}var En=on;function Dn(pt){var wt,tn=pt.prefixCls,an=pt.record,zn=pt.onExpand,bn=pt.expanded,si=pt.expandable,li="".concat(tn,"-row-expand-icon");if(!si)return Ne.createElement("span",{className:it()(li,"".concat(tn,"-row-spaced"))});var ei=function(Ai){zn(an,Ai),Ai.stopPropagation()};return Ne.createElement("span",{className:it()(li,(wt={},(0,Ze.Z)(wt,"".concat(tn,"-row-expanded"),bn),(0,Ze.Z)(wt,"".concat(tn,"-row-collapsed"),!bn),wt)),onClick:ei})}function Jn(pt,wt,tn){var an=[];function zn(bn){(bn||[]).forEach(function(si,li){an.push(wt(si,li)),zn(si[tn])})}return zn(pt),an}function St(pt,wt,tn){var an=ar(pt),zn=an.expandIcon,bn=an.expandedRowKeys,si=an.defaultExpandedRowKeys,li=an.defaultExpandAllRows,ei=an.expandedRowRender,Mi=an.onExpand,Ai=an.onExpandedRowsChange,Ni=an.childrenColumnName,fr=zn||Dn,dr=Ni||"children",ir=Ne.useMemo(function(){return ei?"row":pt.expandable&&pt.internalHooks===Oe&&pt.expandable.__PARENT_RENDER_ICON__||wt.some(function(ko){return ko&&(0,Qe.Z)(ko)==="object"&&ko[dr]})?"nest":!1},[!!ei,wt]),Wr=Ne.useState(function(){return si||(li?Jn(wt,tn,dr):[])}),sr=(0,Ke.Z)(Wr,2),zr=sr[0],Ir=sr[1],eo=Ne.useMemo(function(){return new Set(bn||zr||[])},[bn,zr]),xo=Ne.useCallback(function(ko){var $r=tn(ko,wt.indexOf(ko)),So,Xo=eo.has($r);Xo?(eo.delete($r),So=(0,Hi.Z)(eo)):So=[].concat((0,Hi.Z)(eo),[$r]),Ir(So),Mi&&Mi(!Xo,ko),Ai&&Ai(So)},[tn,eo,wt,Mi,Ai]);return[an,ir,eo,fr,dr,xo]}function Nn(pt,wt,tn,an){var zn=pt.map(function(bn,si){return It(si,si,pt,wt,tn,an==null?void 0:an[si])});return(0,Dt.Z)(function(){return zn},[zn],function(bn,si){return!(0,Xe.Z)(bn,si)})}function qn(pt){var wt=(0,Ne.useRef)(pt),tn=(0,Ne.useState)({}),an=(0,Ke.Z)(tn,2),zn=an[1],bn=(0,Ne.useRef)(null),si=(0,Ne.useRef)([]);function li(ei){si.current.push(ei);var Mi=Promise.resolve();bn.current=Mi,Mi.then(function(){if(bn.current===Mi){var Ai=si.current,Ni=wt.current;si.current=[],Ai.forEach(function(fr){wt.current=fr(wt.current)}),bn.current=null,Ni!==wt.current&&zn({})}})}return(0,Ne.useEffect)(function(){return function(){bn.current=null}},[]),[wt.current,li]}function Si(pt){var wt=(0,Ne.useRef)(pt||null),tn=(0,Ne.useRef)();function an(){window.clearTimeout(tn.current)}function zn(si){wt.current=si,an(),tn.current=window.setTimeout(function(){wt.current=null,tn.current=void 0},100)}function bn(){return wt.current}return(0,Ne.useEffect)(function(){return an},[]),[zn,bn]}function en(){var pt=Ne.useState(-1),wt=(0,Ke.Z)(pt,2),tn=wt[0],an=wt[1],zn=Ne.useState(-1),bn=(0,Ke.Z)(zn,2),si=bn[0],li=bn[1],ei=Ne.useCallback(function(Mi,Ai){an(Mi),li(Ai)},[]);return[tn,si,ei]}var Cn=pe(47273),At=(0,Cn.Z)()?window:null;function yn(pt,wt){var tn=(0,Qe.Z)(pt)==="object"?pt:{},an=tn.offsetHeader,zn=an===void 0?0:an,bn=tn.offsetSummary,si=bn===void 0?0:bn,li=tn.offsetScroll,ei=li===void 0?0:li,Mi=tn.getContainer,Ai=Mi===void 0?function(){return At}:Mi,Ni=Ai()||At;return Ne.useMemo(function(){var fr=!!pt;return{isSticky:fr,stickyClassName:fr?"".concat(wt,"-sticky-holder"):"",offsetHeader:zn,offsetSummary:si,offsetScroll:ei,container:Ni}},[ei,zn,si,wt,Ni])}function pn(pt,wt,tn){var an=(0,Ne.useMemo)(function(){for(var zn=[],bn=[],si=0,li=0,ei=0;ei<wt;ei+=1)if(tn==="rtl"){bn[ei]=li,li+=pt[ei]||0;var Mi=wt-ei-1;zn[Mi]=si,si+=pt[Mi]||0}else{zn[ei]=si,si+=pt[ei]||0;var Ai=wt-ei-1;bn[Ai]=li,li+=pt[Ai]||0}return{left:zn,right:bn}},[pt,wt,tn]);return an}var mn=pn;function Wn(pt){var wt=pt.className,tn=pt.children;return Ne.createElement("div",{className:wt},tn)}var Hn=Wn,Qn=pe(8224),ii=pe(55468),ji=function(wt,tn){var an,zn,bn=wt.scrollBodyRef,si=wt.onScroll,li=wt.offsetScroll,ei=wt.container,Mi=Ve(Be,"prefixCls"),Ai=((an=bn.current)===null||an===void 0?void 0:an.scrollWidth)||0,Ni=((zn=bn.current)===null||zn===void 0?void 0:zn.clientWidth)||0,fr=Ai&&Ni*(Ni/Ai),dr=Ne.useRef(),ir=qn({scrollLeft:0,isHiddenScrollBar:!1}),Wr=(0,Ke.Z)(ir,2),sr=Wr[0],zr=Wr[1],Ir=Ne.useRef({delta:0,x:0}),eo=Ne.useState(!1),xo=(0,Ke.Z)(eo,2),ko=xo[0],$r=xo[1],So=function(){$r(!1)},Xo=function(oo){oo.persist(),Ir.current.delta=oo.pageX-sr.scrollLeft,Ir.current.x=0,$r(!0),oo.preventDefault()},_r=function(oo){var Mo,Zo=oo||((Mo=window)===null||Mo===void 0?void 0:Mo.event),Wo=Zo.buttons;if(!ko||Wo===0){ko&&$r(!1);return}var Kr=Ir.current.x+oo.pageX-Ir.current.x-Ir.current.delta;Kr<=0&&(Kr=0),Kr+fr>=Ni&&(Kr=Ni-fr),si({scrollLeft:Kr/Ni*(Ai+2)}),Ir.current.x=oo.pageX},co=function(){if(bn.current){var oo=(0,ii.os)(bn.current).top,Mo=oo+bn.current.offsetHeight,Zo=ei===window?document.documentElement.scrollTop+window.innerHeight:(0,ii.os)(ei).top+ei.clientHeight;Mo-(0,zt.Z)()<=Zo||oo>=Zo-li?zr(function(Wo){return(0,Pt.Z)((0,Pt.Z)({},Wo),{},{isHiddenScrollBar:!0})}):zr(function(Wo){return(0,Pt.Z)((0,Pt.Z)({},Wo),{},{isHiddenScrollBar:!1})})}},Xr=function(oo){zr(function(Mo){return(0,Pt.Z)((0,Pt.Z)({},Mo),{},{scrollLeft:oo/Ai*Ni||0})})};return Ne.useImperativeHandle(tn,function(){return{setScrollLeft:Xr}}),Ne.useEffect(function(){var Cr=(0,Qn.Z)(document.body,"mouseup",So,!1),oo=(0,Qn.Z)(document.body,"mousemove",_r,!1);return co(),function(){Cr.remove(),oo.remove()}},[fr,ko]),Ne.useEffect(function(){var Cr=(0,Qn.Z)(ei,"scroll",co,!1),oo=(0,Qn.Z)(window,"resize",co,!1);return function(){Cr.remove(),oo.remove()}},[ei]),Ne.useEffect(function(){sr.isHiddenScrollBar||zr(function(Cr){var oo=bn.current;return oo?(0,Pt.Z)((0,Pt.Z)({},Cr),{},{scrollLeft:oo.scrollLeft/oo.scrollWidth*oo.clientWidth}):Cr})},[sr.isHiddenScrollBar]),Ai<=Ni||!fr||sr.isHiddenScrollBar?null:Ne.createElement("div",{style:{height:(0,zt.Z)(),width:Ni,bottom:li},className:"".concat(Mi,"-sticky-scroll")},Ne.createElement("div",{onMouseDown:Xo,ref:dr,className:it()("".concat(Mi,"-sticky-scroll-bar"),(0,Ze.Z)({},"".concat(Mi,"-sticky-scroll-bar-active"),ko)),style:{width:"".concat(fr,"px"),transform:"translate3d(".concat(sr.scrollLeft,"px, 0, 0)")}}))},cn=Ne.forwardRef(ji);function Yi(pt){return null}var $i=Yi;function Wi(pt){return null}var ln=Wi,oi="rc-table",Bi=[],Gi={};function Ti(){return"No Data"}function Qi(pt){var wt,tn=(0,Pt.Z)({rowKey:"key",prefixCls:oi,emptyText:Ti},pt),an=tn.prefixCls,zn=tn.className,bn=tn.rowClassName,si=tn.style,li=tn.data,ei=tn.rowKey,Mi=tn.scroll,Ai=tn.tableLayout,Ni=tn.direction,fr=tn.title,dr=tn.footer,ir=tn.summary,Wr=tn.caption,sr=tn.id,zr=tn.showHeader,Ir=tn.components,eo=tn.emptyText,xo=tn.onRow,ko=tn.onHeaderRow,$r=tn.internalHooks,So=tn.transformColumns,Xo=tn.internalRefs,_r=tn.tailor,co=tn.sticky,Xr=li||Bi,Cr=!!Xr.length,oo=$r===Oe,Mo=Ne.useCallback(function(xa,ls){return(0,ht.Z)(Ir,xa)||ls},[Ir]),Zo=Ne.useMemo(function(){return typeof ei=="function"?ei:function(xa){var ls=xa&&xa[ei];return ls}},[ei]),Wo=Mo(["body"]),Kr=en(),Yo=(0,Ke.Z)(Kr,3),ia=Yo[0],Ta=Yo[1],pa=Yo[2],ds=St(tn,Xr,Zo),ja=(0,Ke.Z)(ds,6),na=ja[0],Fo=ja[1],Sa=ja[2],hs=ja[3],Qa=ja[4],Ns=ja[5],$o=Mi==null?void 0:Mi.x,Io=Ne.useState(0),Go=(0,Ke.Z)(Io,2),Co=Go[0],Aa=Go[1],Po=En((0,Pt.Z)((0,Pt.Z)((0,Pt.Z)({},tn),na),{},{expandable:!!na.expandedRowRender,columnTitle:na.columnTitle,expandedKeys:Sa,getRowKey:Zo,onTriggerExpand:Ns,expandIcon:hs,expandIconColumnIndex:na.expandIconColumnIndex,direction:Ni,scrollWidth:oo&&_r&&typeof $o=="number"?$o:null}),oo?So:null),Jo=(0,Ke.Z)(Po,3),ga=Jo[0],ma=Jo[1],Us=Jo[2],Zs=Us!=null?Us:$o,cl=Ne.useMemo(function(){return{columns:ga,flattenColumns:ma}},[ga,ma]),ka=Ne.useRef(),il=Ne.useRef(),Fs=Ne.useRef(),Ws=Ne.useRef(),uc=Ne.useRef(),Ia=Ne.useState(!1),$a=(0,Ke.Z)(Ia,2),Oa=$a[0],qa=$a[1],As=Ne.useState(!1),da=(0,Ke.Z)(As,2),Xa=da[0],_s=da[1],dl=qn(new Map),hu=(0,Ke.Z)(dl,2),Yl=hu[0],Ds=hu[1],Jl=Wt(ma),Ql=Jl.map(function(xa){return Yl.get(xa)}),za=Ne.useMemo(function(){return Ql},[Ql.join("_")]),rl=mn(za,ma.length,Ni),es=Mi&&Ln(Mi.y),Ya=Mi&&Ln(Zs)||!!na.fixed,fu=Ya&&ma.some(function(xa){var ls=xa.fixed;return ls}),Pc=Ne.useRef(),Nu=yn(co,an),Fu=Nu.isSticky,gu=Nu.offsetHeader,ql=Nu.offsetSummary,Da=Nu.offsetScroll,rs=Nu.stickyClassName,Bs=Nu.container,os=Ne.useMemo(function(){return ir==null?void 0:ir(Xr)},[ir,Xr]),Ca=(es||Fu)&&Ne.isValidElement(os)&&os.type===ye&&os.props.fixed,Ts,Rl,zu;es&&(Rl={overflowY:"scroll",maxHeight:Mi.y}),Ya&&(Ts={overflowX:"auto"},es||(Rl={overflowY:"hidden"}),zu={width:Zs===!0?"auto":Zs,minWidth:"100%"});var Cd=Ne.useCallback(function(xa,ls){(0,yt.Z)(ka.current)&&Ds(function(Sl){if(Sl.get(xa)!==ls){var Au=new Map(Sl);return Au.set(xa,ls),Au}return Sl})},[]),hn=Si(null),Rc=(0,Ke.Z)(hn,2),Xu=Rc[0],af=Rc[1];function bd(xa,ls){ls&&(typeof ls=="function"?ls(xa):ls.scrollLeft!==xa&&(ls.scrollLeft=xa,ls.scrollLeft!==xa&&setTimeout(function(){ls.scrollLeft=xa},0)))}var Ed=(0,ut.Z)(function(xa){var ls=xa.currentTarget,Sl=xa.scrollLeft,Au=Ni==="rtl",Du=typeof Sl=="number"?Sl:ls.scrollLeft,Fd=ls||Gi;if(!af()||af()===Fd){var Hc;Xu(Fd),bd(Du,il.current),bd(Du,Fs.current),bd(Du,uc.current),bd(Du,(Hc=Pc.current)===null||Hc===void 0?void 0:Hc.setScrollLeft)}var rh=ls||il.current;if(rh){var Hu=rh.scrollWidth,Cc=rh.clientWidth;if(Hu===Cc){qa(!1),_s(!1);return}Au?(qa(-Du<Hu-Cc),_s(-Du>0)):(qa(Du>0),_s(Du<Hu-Cc))}}),Dh=function(){Ya&&Fs.current?Ed({currentTarget:Fs.current}):(qa(!1),_s(!1))},Qg=function(ls){var Sl=ls.width;Sl!==Co&&(Dh(),Aa(ka.current?ka.current.offsetWidth:Sl))},Gs=Ne.useRef(!1);Ne.useEffect(function(){Gs.current&&Dh()},[Ya,li,ga.length]),Ne.useEffect(function(){Gs.current=!0},[]);var Qd=Ne.useState(0),Md=(0,Ke.Z)(Qd,2),qd=Md[0],sf=Md[1],Zf=Ne.useState(!0),eh=(0,Ke.Z)(Zf,2),th=eh[0],pu=eh[1];Ne.useEffect(function(){(!_r||!oo)&&(Fs.current instanceof Element?sf((0,zt.o)(Fs.current).width):sf((0,zt.o)(Ws.current).width)),pu((0,at.G)("position","sticky"))},[]),Ne.useEffect(function(){oo&&Xo&&(Xo.body.current=Fs.current)});var Ld=Ne.useCallback(function(xa){return Ne.createElement(Ne.Fragment,null,Ne.createElement(Li,xa),Ca==="top"&&Ne.createElement(vt,xa,os))},[Ca,os]),lf=Ne.useCallback(function(xa){return Ne.createElement(vt,xa,os)},[os]),Yu=Mo(["table"],"table"),jc=Ne.useMemo(function(){return Ai||(fu?Zs==="max-content"?"auto":"fixed":es||Fu||ma.some(function(xa){var ls=xa.ellipsis;return ls})?"fixed":"auto")},[es,fu,ma,Ai,Fu]),Nd,cd={colWidths:za,columCount:ma.length,stickyOffsets:rl,onHeaderRow:ko,fixHeader:es,scroll:Mi},jl=Ne.useMemo(function(){return Cr?null:typeof eo=="function"?eo():eo},[Cr,eo]),dd=Ne.createElement(gi,{data:Xr,measureColumnWidth:es||Ya||Fu}),Bh=Ne.createElement(mr,{colWidths:ma.map(function(xa){var ls=xa.width;return ls}),columns:ma}),eu=Wr!=null?Ne.createElement("caption",{className:"".concat(an,"-caption")},Wr):void 0,wc=(0,un.Z)(tn,{data:!0}),nh=(0,un.Z)(tn,{aria:!0});if(es||Fu){var ih;typeof Wo=="function"?(ih=Wo(Xr,{scrollbarSize:qd,ref:Fs,onScroll:Ed}),cd.colWidths=ma.map(function(xa,ls){var Sl=xa.width,Au=ls===ma.length-1?Sl-qd:Sl;return typeof Au=="number"&&!Number.isNaN(Au)?Au:0})):ih=Ne.createElement("div",{style:(0,Pt.Z)((0,Pt.Z)({},Ts),Rl),onScroll:Ed,ref:Fs,className:it()("".concat(an,"-body"))},Ne.createElement(Yu,(0,Lt.Z)({style:(0,Pt.Z)((0,Pt.Z)({},zu),{},{tableLayout:jc})},nh),eu,Bh,dd,!Ca&&os&&Ne.createElement(vt,{stickyOffsets:rl,flattenColumns:ma,columns:ga},os)));var zc=(0,Pt.Z)((0,Pt.Z)((0,Pt.Z)({noData:!Xr.length,maxContentScroll:Ya&&Zs==="max-content"},cd),cl),{},{direction:Ni,stickyClassName:rs,onScroll:Ed});Nd=Ne.createElement(Ne.Fragment,null,zr!==!1&&Ne.createElement(Ei,(0,Lt.Z)({},zc,{stickyTopOffset:gu,className:"".concat(an,"-header"),ref:il}),Ld),ih,Ca&&Ca!=="top"&&Ne.createElement(Ei,(0,Lt.Z)({},zc,{stickyBottomOffset:ql,className:"".concat(an,"-summary"),ref:uc}),lf),Fu&&Ne.createElement(cn,{ref:Pc,offsetScroll:Da,scrollBodyRef:Fs,onScroll:Ed,container:Bs}))}else Nd=Ne.createElement("div",{style:(0,Pt.Z)((0,Pt.Z)({},Ts),Rl),className:it()("".concat(an,"-content")),onScroll:Ed,ref:Fs},Ne.createElement(Yu,(0,Lt.Z)({style:(0,Pt.Z)((0,Pt.Z)({},zu),{},{tableLayout:jc})},nh),eu,Bh,zr!==!1&&Ne.createElement(Li,(0,Lt.Z)({},cd,cl)),dd,os&&Ne.createElement(vt,{stickyOffsets:rl,flattenColumns:ma,columns:ga},os)));var Cl=Ne.createElement("div",(0,Lt.Z)({className:it()(an,zn,(wt={},(0,Ze.Z)(wt,"".concat(an,"-rtl"),Ni==="rtl"),(0,Ze.Z)(wt,"".concat(an,"-ping-left"),Oa),(0,Ze.Z)(wt,"".concat(an,"-ping-right"),Xa),(0,Ze.Z)(wt,"".concat(an,"-layout-fixed"),Ai==="fixed"),(0,Ze.Z)(wt,"".concat(an,"-fixed-header"),es),(0,Ze.Z)(wt,"".concat(an,"-fixed-column"),fu),(0,Ze.Z)(wt,"".concat(an,"-scroll-horizontal"),Ya),(0,Ze.Z)(wt,"".concat(an,"-has-fix-left"),ma[0]&&ma[0].fixed),(0,Ze.Z)(wt,"".concat(an,"-has-fix-right"),ma[ma.length-1]&&ma[ma.length-1].fixed==="right"),wt)),style:si,id:sr,ref:ka},wc),fr&&Ne.createElement(Hn,{className:"".concat(an,"-title")},fr(Xr)),Ne.createElement("div",{ref:Ws,className:"".concat(an,"-container")},Nd),dr&&Ne.createElement(Hn,{className:"".concat(an,"-footer")},dr(Xr)));Ya&&(Cl=Ne.createElement(xt.Z,{onResize:Qg},Cl));var Th=Nn(ma,rl,Ni,ga),$s=Ne.useMemo(function(){return{scrollX:Zs,prefixCls:an,getComponent:Mo,scrollbarSize:qd,direction:Ni,fixedInfoList:Th,isSticky:Fu,supportSticky:th,componentWidth:Co,fixHeader:es,fixColumn:fu,horizonScroll:Ya,tableLayout:jc,rowClassName:bn,expandedRowClassName:na.expandedRowClassName,expandIcon:hs,expandableType:Fo,expandRowByClick:na.expandRowByClick,expandedRowRender:na.expandedRowRender,onTriggerExpand:Ns,expandIconColumnIndex:na.expandIconColumnIndex,indentSize:na.indentSize,allColumnsFixedLeft:ma.every(function(xa){return xa.fixed==="left"}),emptyNode:jl,columns:ga,flattenColumns:ma,onColumnResize:Cd,hoverStartRow:ia,hoverEndRow:Ta,onHover:pa,rowExpandable:na.rowExpandable,onRow:xo,getRowKey:Zo,expandedKeys:Sa,childrenColumnName:Qa}},[Zs,an,Mo,qd,Ni,Th,Fu,th,Co,es,fu,Ya,jc,bn,na.expandedRowClassName,hs,Fo,na.expandRowByClick,na.expandedRowRender,Ns,na.expandIconColumnIndex,na.indentSize,jl,ga,ma,Cd,ia,Ta,pa,na.rowExpandable,xo,Zo,Sa,Qa]);return Ne.createElement(Be.Provider,{value:$s},Cl)}function gr(pt){return he(Qi,pt)}var hr=gr();hr.EXPAND_COLUMN=ge,hr.INTERNAL_HOOKS=Oe,hr.Column=$i,hr.ColumnGroup=ln,hr.Summary=et;var Ki=hr,Sr=pe(24916),kn=Ct(null),Br=Ct(null);function _n(pt,wt,tn){var an=wt||1;return tn[pt+an]-(tn[pt]||0)}function Or(pt){var wt=pt.rowInfo,tn=pt.column,an=pt.colIndex,zn=pt.indent,bn=pt.index,si=pt.renderIndex,li=pt.record,ei=pt.style,Mi=pt.className,Ai=pt.inverse,Ni=pt.getHeight,fr=tn.render,dr=tn.dataIndex,ir=tn.className,Wr=tn.width,sr=Ve(Br,["columnsOffset"]),zr=sr.columnsOffset,Ir=sn(wt,tn,an,zn,bn),eo=Ir.key,xo=Ir.fixedInfo,ko=Ir.appendCellNode,$r=Ir.additionalCellProps,So=$r.style,Xo=$r.colSpan,_r=Xo===void 0?1:Xo,co=$r.rowSpan,Xr=co===void 0?1:co,Cr=an-1,oo=_n(Cr,_r,zr),Mo=_r>1?Wr-oo:0,Zo=(0,Pt.Z)((0,Pt.Z)((0,Pt.Z)({},So),ei),{},{flex:"0 0 ".concat(oo,"px"),width:"".concat(oo,"px"),marginRight:Mo,pointerEvents:"auto"}),Wo=Ne.useMemo(function(){return Ai?Xr<=1:_r===0||Xr===0||Xr>1},[Xr,_r,Ai]);Wo?Zo.visibility="hidden":Ai&&(Zo.height=Ni==null?void 0:Ni(Xr));var Kr=Wo?function(){return null}:fr,Yo={};return(Xr===0||_r===0)&&(Yo.rowSpan=1,Yo.colSpan=1),Ne.createElement(Yn,(0,Lt.Z)({className:it()(ir,Mi),ellipsis:tn.ellipsis,align:tn.align,scope:tn.rowScope,component:"div",prefixCls:wt.prefixCls,key:eo,record:li,index:bn,renderIndex:si,dataIndex:dr,render:Kr,shouldCellUpdate:tn.shouldCellUpdate},xo,{appendNode:ko,additionalProps:(0,Pt.Z)((0,Pt.Z)({},$r),{},{style:Zo},Yo)}))}var no=Or,br=["data","index","className","rowKey","style","extra","getHeight"],mo=Ne.forwardRef(function(pt,wt){var tn=pt.data,an=pt.index,zn=pt.className,bn=pt.rowKey,si=pt.style,li=pt.extra,ei=pt.getHeight,Mi=(0,Ee.Z)(pt,br),Ai=tn.record,Ni=tn.indent,fr=tn.index,dr=Ve(Be,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),ir=dr.scrollX,Wr=dr.flattenColumns,sr=dr.prefixCls,zr=dr.fixColumn,Ir=dr.componentWidth,eo=jt(Ai,bn,an,Ni),xo=eo.rowSupportExpand,ko=eo.expanded,$r=eo.rowProps,So=eo.expandedRowRender,Xo=eo.expandedRowClassName,_r;if(xo&&ko){var co=So(Ai,an,Ni+1,ko),Xr=Xo==null?void 0:Xo(Ai,an,Ni),Cr={};zr&&(Cr={style:(0,Ze.Z)({},"--virtual-width","".concat(Ir,"px"))});var oo="".concat(sr,"-expanded-row-cell");_r=Ne.createElement("div",{className:it()("".concat(sr,"-expanded-row"),"".concat(sr,"-expanded-row-level-").concat(Ni+1),Xr)},Ne.createElement(Yn,{component:"div",prefixCls:sr,className:it()(oo,(0,Ze.Z)({},"".concat(oo,"-fixed"),zr)),additionalProps:Cr},co))}var Mo=(0,Pt.Z)((0,Pt.Z)({},si),{},{width:ir});li&&(Mo.position="absolute",Mo.pointerEvents="none");var Zo=Ne.createElement("div",(0,Lt.Z)({},$r,Mi,{ref:xo?null:wt,className:it()(zn,"".concat(sr,"-row"),$r==null?void 0:$r.className,(0,Ze.Z)({},"".concat(sr,"-row-extra"),li)),style:(0,Pt.Z)((0,Pt.Z)({},Mo),$r==null?void 0:$r.style)}),Wr.map(function(Wo,Kr){return Ne.createElement(no,{key:Kr,rowInfo:eo,column:Wo,colIndex:Kr,indent:Ni,index:an,renderIndex:fr,record:Ai,inverse:li,getHeight:ei})}));return xo?Ne.createElement("div",{ref:wt},Zo,_r):Zo}),Jr=ve(mo),ur=Jr,er=Ne.forwardRef(function(pt,wt){var tn=pt.data,an=pt.onScroll,zn=Ve(Be,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","emptyNode","scrollX"]),bn=zn.flattenColumns,si=zn.onColumnResize,li=zn.getRowKey,ei=zn.expandedKeys,Mi=zn.prefixCls,Ai=zn.childrenColumnName,Ni=zn.emptyNode,fr=zn.scrollX,dr=Ve(kn),ir=dr.scrollY,Wr=dr.listItemHeight,sr=Ne.useRef(),zr=Qt(tn,Ai,ei,li),Ir=Ne.useMemo(function(){var _r=0;return bn.map(function(co){var Xr=co.width,Cr=co.key;return _r+=Xr,[Cr,Xr,_r]})},[bn]),eo=Ne.useMemo(function(){return Ir.map(function(_r){return _r[2]})},[Ir]);Ne.useEffect(function(){Ir.forEach(function(_r){var co=(0,Ke.Z)(_r,2),Xr=co[0],Cr=co[1];si(Xr,Cr)})},[Ir]),Ne.useImperativeHandle(wt,function(){var _r={};return Object.defineProperty(_r,"scrollLeft",{get:function(){var Xr;return((Xr=sr.current)===null||Xr===void 0?void 0:Xr.getScrollInfo().x)||0},set:function(Xr){var Cr;(Cr=sr.current)===null||Cr===void 0||Cr.scrollTo({left:Xr})}}),_r});var xo=function(co,Xr){var Cr,oo=(Cr=zr[Xr])===null||Cr===void 0?void 0:Cr.record,Mo=co.onCell;if(Mo){var Zo,Wo=Mo(oo,Xr);return(Zo=Wo==null?void 0:Wo.rowSpan)!==null&&Zo!==void 0?Zo:1}return 1},ko=function(co){var Xr=co.start,Cr=co.end,oo=co.getSize,Mo=co.offsetY;if(Cr<0)return null;for(var Zo=bn.filter(function($o){return xo($o,Xr)===0}),Wo=Xr,Kr=function(Io){if(Zo=Zo.filter(function(Go){return xo(Go,Io)===0}),!Zo.length)return Wo=Io,"break"},Yo=Xr;Yo>=0;Yo-=1){var ia=Kr(Yo);if(ia==="break")break}for(var Ta=bn.filter(function($o){return xo($o,Cr)!==1}),pa=Cr,ds=function(Io){if(Ta=Ta.filter(function(Go){return xo(Go,Io)!==1}),!Ta.length)return pa=Math.max(Io-1,Cr),"break"},ja=Cr;ja<zr.length;ja+=1){var na=ds(ja);if(na==="break")break}for(var Fo=[],Sa=function(Io){var Go=zr[Io];if(!Go)return"continue";bn.some(function(Co){return xo(Co,Io)>1})&&Fo.push(Io)},hs=Wo;hs<=pa;hs+=1)var Qa=Sa(hs);var Ns=Fo.map(function($o){var Io=zr[$o],Go=li(Io.record,$o),Co=function(Jo){var ga=$o+Jo-1,ma=li(zr[ga].record,ga),Us=oo(Go,ma);return Us.bottom-Us.top},Aa=oo(Go);return Ne.createElement(ur,{key:$o,data:Io,rowKey:Go,index:$o,style:{top:-Mo+Aa.top},extra:!0,getHeight:Co})});return Ns},$r=Ne.useMemo(function(){return{columnsOffset:eo}},[eo]),So="".concat(Mi,"-tbody"),Xo;return zr.length?Xo=Ne.createElement(Sr.Z,{fullHeight:!1,ref:sr,className:it()(So,"".concat(So,"-virtual")),height:ir,itemHeight:Wr||24,data:zr,itemKey:function(co){return li(co.record)},scrollWidth:fr,onVirtualScroll:function(co){var Xr=co.x;an({scrollLeft:Xr})},extraRender:ko},function(_r,co,Xr){var Cr=li(_r.record,co);return Ne.createElement(ur,(0,Lt.Z)({data:_r,rowKey:Cr,index:co},Xr))}):Xo=Ne.createElement("div",{className:it()("".concat(Mi,"-placeholder"))},Ne.createElement(Yn,{component:"div",prefixCls:Mi},Ni)),Ne.createElement(Br.Provider,{value:$r},Xo)}),qi=ve(er),Rr=qi,Ii=function(wt,tn){var an=tn.ref,zn=tn.onScroll;return Ne.createElement(Rr,{ref:an,data:wt,onScroll:zn})},tt=100;function Qr(pt){var wt=pt.columns,tn=pt.scroll,an=pt.prefixCls,zn=an===void 0?oi:an,bn=pt.className,si=pt.listItemHeight,li=tn||{},ei=li.x,Mi=li.y;typeof ei!="number"&&(ei=((wt||[]).length+1)*tt),typeof Mi!="number"&&(Mi=500);var Ai=Ne.useMemo(function(){return{scrollY:Mi,listItemHeight:si}},[Mi,si]);return Ne.createElement(kn.Provider,{value:Ai},Ne.createElement(Ki,(0,Lt.Z)({},pt,{className:it()(bn,"".concat(zn,"-virtual")),scroll:(0,Pt.Z)((0,Pt.Z)({},tn),{},{x:ei}),components:{body:Ii},columns:wt,internalHooks:Oe,tailor:!0})))}function lo(pt){return he(Qr,pt)}var jr=lo(),vo=null;function po(pt){return null}var Lr=po;function Fr(pt){return null}var uo=Fr,qr=pe(2738),zo=pe(68031),Ro=pe(36355),Mr=pe(93891),Nr=pe(19716),fi=pe(8628),Tr=pe(31724),Bo=pe(58421),aa=pe(71418),Ho=pe(88088);function Ao(pt){return function(tn){let{prefixCls:an,onExpand:zn,record:bn,expanded:si,expandable:li}=tn;const ei=`${an}-row-expand-icon`;return Ne.createElement("button",{type:"button",onClick:Mi=>{zn(bn,Mi),Mi.stopPropagation()},className:it()(ei,{[`${ei}-spaced`]:!li,[`${ei}-expanded`]:li&&si,[`${ei}-collapsed`]:li&&!si}),"aria-label":si?pt.collapse:pt.expand,"aria-expanded":si})}}var _o=Ao;function ta(pt,wt){return"key"in pt&&pt.key!==void 0&&pt.key!==null?pt.key:pt.dataIndex?Array.isArray(pt.dataIndex)?pt.dataIndex.join("."):pt.dataIndex:wt}function Ea(pt,wt){return wt?`${wt}-${pt}`:`${pt}`}function Mt(pt,wt){return typeof pt=="function"?pt(wt):pt}function Pi(pt,wt){const tn=Mt(pt,wt);return Object.prototype.toString.call(tn)==="[object Object]"?"":tn}var Ut={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"},Ui=Ut,wi=pe(7657),yr=function(wt,tn){return Ne.createElement(wi.Z,(0,Lt.Z)({},wt,{ref:tn,icon:Ui}))},Zi=Ne.forwardRef(yr),Ci=Zi,nr=pe(56762);function rr(pt){const wt=Ne.useRef(pt),tn=(0,nr.Z)();return[()=>wt.current,an=>{wt.current=an,tn()}]}var cr=pe(3113),xr=pe(24905),Gr=pe(38854),vr=pe(64165),kr=pe(20834),Zr=pe(40875),Oi=pe(5112),sa=pe(17574),Ra=pe(47472),Ls=pe(92832);function Ys(pt){let{value:wt,onChange:tn,filterSearch:an,tablePrefixCls:zn,locale:bn}=pt;return an?Ne.createElement("div",{className:`${zn}-filter-dropdown-search`},Ne.createElement(Ls.default,{prefix:Ne.createElement(Ra.Z,null),placeholder:bn.filterSearchPlaceholder,onChange:tn,value:wt,htmlSize:1,className:`${zn}-filter-dropdown-search-input`})):null}var tl=Ys,Vi=pe(10228);const La=pt=>{const{keyCode:wt}=pt;wt===Vi.Z.ENTER&&pt.stopPropagation()};var zs=Ne.forwardRef((pt,wt)=>Ne.createElement("div",{className:pt.className,onClick:tn=>tn.stopPropagation(),onKeyDown:La,ref:wt},pt.children));function su(pt){let wt=[];return(pt||[]).forEach(tn=>{let{value:an,children:zn}=tn;wt.push(an),zn&&(wt=[].concat((0,Hi.Z)(wt),(0,Hi.Z)(su(zn))))}),wt}function lu(pt){return pt.some(wt=>{let{children:tn}=wt;return tn})}function wo(pt,wt){return typeof wt=="string"||typeof wt=="number"?wt==null?void 0:wt.toString().toLowerCase().includes(pt.trim().toLowerCase()):!1}function yc(pt){let{filters:wt,prefixCls:tn,filteredKeys:an,filterMultiple:zn,searchValue:bn,filterSearch:si}=pt;return wt.map((li,ei)=>{const Mi=String(li.value);if(li.children)return{key:Mi||ei,label:li.text,popupClassName:`${tn}-dropdown-submenu`,children:yc({filters:li.children,prefixCls:tn,filteredKeys:an,filterMultiple:zn,searchValue:bn,filterSearch:si})};const Ai=zn?xr.default:Oi.ZP,Ni={key:li.value!==void 0?Mi:ei,label:Ne.createElement(Ne.Fragment,null,Ne.createElement(Ai,{checked:an.includes(Mi)}),Ne.createElement("span",null,li.text))};return bn.trim()?typeof si=="function"?si(bn,li)?Ni:null:wo(bn,li.text)?Ni:null:Ni})}function Ml(pt){var wt,tn;const{tablePrefixCls:an,prefixCls:zn,column:bn,dropdownPrefixCls:si,columnKey:li,filterMultiple:ei,filterMode:Mi="menu",filterSearch:Ai=!1,filterState:Ni,triggerFilter:fr,locale:dr,children:ir,getPopupContainer:Wr}=pt,{filterDropdownOpen:sr,onFilterDropdownOpenChange:zr,filterResetToDefaultFilteredValue:Ir,defaultFilteredValue:eo,filterDropdownVisible:xo,onFilterDropdownVisibleChange:ko}=bn,[$r,So]=Ne.useState(!1),Xo=!!(Ni&&(!((wt=Ni.filteredKeys)===null||wt===void 0)&&wt.length||Ni.forceFiltered)),_r=Po=>{So(Po),zr==null||zr(Po),ko==null||ko(Po)},co=(tn=sr!=null?sr:xo)!==null&&tn!==void 0?tn:$r,Xr=Ni==null?void 0:Ni.filteredKeys,[Cr,oo]=rr(Xr||[]),Mo=Po=>{let{selectedKeys:Jo}=Po;oo(Jo)},Zo=(Po,Jo)=>{let{node:ga,checked:ma}=Jo;Mo(ei?{selectedKeys:Po}:{selectedKeys:ma&&ga.key?[ga.key]:[]})};Ne.useEffect(()=>{$r&&Mo({selectedKeys:Xr||[]})},[Xr]);const[Wo,Kr]=Ne.useState([]),Yo=Po=>{Kr(Po)},[ia,Ta]=Ne.useState(""),pa=Po=>{const{value:Jo}=Po.target;Ta(Jo)};Ne.useEffect(()=>{$r||Ta("")},[$r]);const ds=Po=>{const Jo=Po&&Po.length?Po:null;if(Jo===null&&(!Ni||!Ni.filteredKeys)||(0,Xe.Z)(Jo,Ni==null?void 0:Ni.filteredKeys,!0))return null;fr({column:bn,key:li,filteredKeys:Jo})},ja=()=>{_r(!1),ds(Cr())},na=function(){let{confirm:Po,closeDropdown:Jo}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};Po&&ds([]),Jo&&_r(!1),Ta(""),oo(Ir?(eo||[]).map(ga=>String(ga)):[])},Fo=function(){let{closeDropdown:Po}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};Po&&_r(!1),ds(Cr())},Sa=Po=>{Po&&Xr!==void 0&&oo(Xr||[]),_r(Po),!Po&&!bn.filterDropdown&&ja()},hs=it()({[`${si}-menu-without-submenu`]:!lu(bn.filters||[])}),Qa=Po=>{if(Po.target.checked){const Jo=su(bn==null?void 0:bn.filters).map(ga=>String(ga));oo(Jo)}else oo([])},Ns=Po=>{let{filters:Jo}=Po;return(Jo||[]).map((ga,ma)=>{const Us=String(ga.value),Zs={title:ga.text,key:ga.value!==void 0?Us:ma};return ga.children&&(Zs.children=Ns({filters:ga.children})),Zs})},$o=Po=>{var Jo;return Object.assign(Object.assign({},Po),{text:Po.title,value:Po.key,children:((Jo=Po.children)===null||Jo===void 0?void 0:Jo.map(ga=>$o(ga)))||[]})};let Io;if(typeof bn.filterDropdown=="function")Io=bn.filterDropdown({prefixCls:`${si}-custom`,setSelectedKeys:Po=>Mo({selectedKeys:Po}),selectedKeys:Cr(),confirm:Fo,clearFilters:na,filters:bn.filters,visible:co,close:()=>{_r(!1)}});else if(bn.filterDropdown)Io=bn.filterDropdown;else{const Po=Cr()||[],Jo=()=>(bn.filters||[]).length===0?Ne.createElement(vr.Z,{image:vr.Z.PRESENTED_IMAGE_SIMPLE,description:dr.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):Mi==="tree"?Ne.createElement(Ne.Fragment,null,Ne.createElement(tl,{filterSearch:Ai,value:ia,onChange:pa,tablePrefixCls:an,locale:dr}),Ne.createElement("div",{className:`${an}-filter-dropdown-tree`},ei?Ne.createElement(xr.default,{checked:Po.length===su(bn.filters).length,indeterminate:Po.length>0&&Po.length<su(bn.filters).length,className:`${an}-filter-dropdown-checkall`,onChange:Qa},dr.filterCheckall):null,Ne.createElement(sa.default,{checkable:!0,selectable:!1,blockNode:!0,multiple:ei,checkStrictly:!ei,className:`${si}-menu`,onCheck:Zo,checkedKeys:Po,selectedKeys:Po,showIcon:!1,treeData:Ns({filters:bn.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:ia.trim()?ma=>typeof Ai=="function"?Ai(ia,$o(ma)):wo(ia,ma.title):void 0}))):Ne.createElement(Ne.Fragment,null,Ne.createElement(tl,{filterSearch:Ai,value:ia,onChange:pa,tablePrefixCls:an,locale:dr}),Ne.createElement(kr.default,{selectable:!0,multiple:ei,prefixCls:`${si}-menu`,className:hs,onSelect:Mo,onDeselect:Mo,selectedKeys:Po,getPopupContainer:Wr,openKeys:Wo,onOpenChange:Yo,items:yc({filters:bn.filters||[],filterSearch:Ai,prefixCls:zn,filteredKeys:Cr(),filterMultiple:ei,searchValue:ia})})),ga=()=>Ir?(0,Xe.Z)((eo||[]).map(ma=>String(ma)),Po,!0):Po.length===0;Io=Ne.createElement(Ne.Fragment,null,Jo(),Ne.createElement("div",{className:`${zn}-dropdown-btns`},Ne.createElement(cr.ZP,{type:"link",size:"small",disabled:ga(),onClick:()=>na()},dr.filterReset),Ne.createElement(cr.ZP,{type:"primary",size:"small",onClick:ja},dr.filterConfirm)))}bn.filterDropdown&&(Io=Ne.createElement(Zr.J,{selectable:void 0},Io));const Go=()=>Ne.createElement(zs,{className:`${zn}-dropdown`},Io);let Co;typeof bn.filterIcon=="function"?Co=bn.filterIcon(Xo):bn.filterIcon?Co=bn.filterIcon:Co=Ne.createElement(Ci,null);const{direction:Aa}=Ne.useContext(Ro.E_);return Ne.createElement("div",{className:`${zn}-column`},Ne.createElement("span",{className:`${an}-column-title`},ir),Ne.createElement(Gr.Z,{dropdownRender:Go,trigger:["click"],open:co,onOpenChange:Sa,getPopupContainer:Wr,placement:Aa==="rtl"?"bottomLeft":"bottomRight"},Ne.createElement("span",{role:"button",tabIndex:-1,className:it()(`${zn}-trigger`,{active:Xo}),onClick:Po=>{Po.stopPropagation()}},Co)))}var as=Ml;function vl(pt,wt,tn){let an=[];return(pt||[]).forEach((zn,bn)=>{var si;const li=Ea(bn,tn);if(zn.filters||"filterDropdown"in zn||"onFilter"in zn)if("filteredValue"in zn){let ei=zn.filteredValue;"filterDropdown"in zn||(ei=(si=ei==null?void 0:ei.map(String))!==null&&si!==void 0?si:ei),an.push({column:zn,key:ta(zn,li),filteredKeys:ei,forceFiltered:zn.filtered})}else an.push({column:zn,key:ta(zn,li),filteredKeys:wt&&zn.defaultFilteredValue?zn.defaultFilteredValue:void 0,forceFiltered:zn.filtered});"children"in zn&&(an=[].concat((0,Hi.Z)(an),(0,Hi.Z)(vl(zn.children,wt,li))))}),an}function ju(pt,wt,tn,an,zn,bn,si,li){return tn.map((ei,Mi)=>{const Ai=Ea(Mi,li),{filterMultiple:Ni=!0,filterMode:fr,filterSearch:dr}=ei;let ir=ei;if(ir.filters||ir.filterDropdown){const Wr=ta(ir,Ai),sr=an.find(zr=>{let{key:Ir}=zr;return Wr===Ir});ir=Object.assign(Object.assign({},ir),{title:zr=>Ne.createElement(as,{tablePrefixCls:pt,prefixCls:`${pt}-filter`,dropdownPrefixCls:wt,column:ir,columnKey:Wr,filterState:sr,filterMultiple:Ni,filterMode:fr,filterSearch:dr,triggerFilter:bn,locale:zn,getPopupContainer:si},Mt(ei.title,zr))})}return"children"in ir&&(ir=Object.assign(Object.assign({},ir),{children:ju(pt,wt,ir.children,an,zn,bn,si,Ai)})),ir})}function rc(pt){const wt={};return pt.forEach(tn=>{let{key:an,filteredKeys:zn,column:bn}=tn;const{filters:si,filterDropdown:li}=bn;if(li)wt[an]=zn||null;else if(Array.isArray(zn)){const ei=su(si);wt[an]=ei.filter(Mi=>zn.includes(String(Mi)))}else wt[an]=null}),wt}function wl(pt,wt){return wt.reduce((tn,an)=>{const{column:{onFilter:zn,filters:bn},filteredKeys:si}=an;return zn&&si&&si.length?tn.filter(li=>si.some(ei=>{const Mi=su(bn),Ai=Mi.findIndex(fr=>String(fr)===String(ei)),Ni=Ai!==-1?Mi[Ai]:ei;return zn(Ni,li)})):tn},pt)}const sl=pt=>pt.flatMap(wt=>"children"in wt?[wt].concat((0,Hi.Z)(sl(wt.children||[]))):[wt]);function td(pt){let{prefixCls:wt,dropdownPrefixCls:tn,mergedColumns:an,onFilterChange:zn,getPopupContainer:bn,locale:si}=pt;const li=Ne.useMemo(()=>sl(an||[]),[an]),[ei,Mi]=Ne.useState(()=>vl(li,!0)),Ai=Ne.useMemo(()=>{const ir=vl(li,!1);if(ir.length===0)return ir;let Wr=!0,sr=!0;if(ir.forEach(zr=>{let{filteredKeys:Ir}=zr;Ir!==void 0?Wr=!1:sr=!1}),Wr){const zr=(li||[]).map((Ir,eo)=>ta(Ir,Ea(eo)));return ei.filter(Ir=>{let{key:eo}=Ir;return zr.includes(eo)}).map(Ir=>{const eo=li[zr.findIndex(xo=>xo===Ir.key)];return Object.assign(Object.assign({},Ir),{column:Object.assign(Object.assign({},Ir.column),eo),forceFiltered:eo.filtered})})}return ir},[li,ei]),Ni=Ne.useMemo(()=>rc(Ai),[Ai]),fr=ir=>{const Wr=Ai.filter(sr=>{let{key:zr}=sr;return zr!==ir.key});Wr.push(ir),Mi(Wr),zn(rc(Wr),Wr)};return[ir=>ju(wt,tn,ir,Ai,si,fr,bn),Ai,Ni]}var nd=td;function kc(pt,wt,tn){const an=Ne.useRef({});function zn(bn){if(!an.current||an.current.data!==pt||an.current.childrenColumnName!==wt||an.current.getRowKey!==tn){let li=function(ei){ei.forEach((Mi,Ai)=>{const Ni=tn(Mi,Ai);si.set(Ni,Mi),Mi&&typeof Mi=="object"&&wt in Mi&&li(Mi[wt]||[])})};const si=new Map;li(pt),an.current={data:pt,childrenColumnName:wt,kvMap:si,getRowKey:tn}}return an.current.kvMap.get(bn)}return[zn]}var _d=pe(50371),id=function(pt,wt){var tn={};for(var an in pt)Object.prototype.hasOwnProperty.call(pt,an)&&wt.indexOf(an)<0&&(tn[an]=pt[an]);if(pt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var zn=0,an=Object.getOwnPropertySymbols(pt);zn<an.length;zn++)wt.indexOf(an[zn])<0&&Object.prototype.propertyIsEnumerable.call(pt,an[zn])&&(tn[an[zn]]=pt[an[zn]]);return tn};const Ic=10;function Js(pt,wt){const tn={current:pt.current,pageSize:pt.pageSize};return Object.keys(wt&&typeof wt=="object"?wt:{}).forEach(zn=>{const bn=pt[zn];typeof bn!="function"&&(tn[zn]=bn)}),tn}function uu(pt,wt,tn){const an=tn&&typeof tn=="object"?tn:{},{total:zn=0}=an,bn=id(an,["total"]),[si,li]=(0,Ne.useState)(()=>({current:"defaultCurrent"in bn?bn.defaultCurrent:1,pageSize:"defaultPageSize"in bn?bn.defaultPageSize:Ic})),ei=(0,_d.Z)(si,bn,{total:zn>0?zn:pt}),Mi=Math.ceil((zn||pt)/ei.pageSize);ei.current>Mi&&(ei.current=Mi||1);const Ai=(fr,dr)=>{li({current:fr!=null?fr:1,pageSize:dr||ei.pageSize})},Ni=(fr,dr)=>{var ir;tn&&((ir=tn.onChange)===null||ir===void 0||ir.call(tn,fr,dr)),Ai(fr,dr),wt(fr,dr||(ei==null?void 0:ei.pageSize))};return tn===!1?[{},()=>{}]:[Object.assign(Object.assign({},ei),{onChange:Ni}),Ai]}var xd=uu,Eu=pe(84105),Sc=pe(35654),Vo=pe(90782),ya=pe(71430),ll=pe(18929);const Ss={},ms="SELECT_ALL",Ua="SELECT_INVERT",ss="SELECT_NONE",xs=[],vs=(pt,wt)=>{let tn=[];return(wt||[]).forEach(an=>{tn.push(an),an&&typeof an=="object"&&pt in an&&(tn=[].concat((0,Hi.Z)(tn),(0,Hi.Z)(vs(pt,an[pt]))))}),tn};var _l=(pt,wt)=>{const{preserveSelectedRowKeys:tn,selectedRowKeys:an,defaultSelectedRowKeys:zn,getCheckboxProps:bn,onChange:si,onSelect:li,onSelectAll:ei,onSelectInvert:Mi,onSelectNone:Ai,onSelectMultiple:Ni,columnWidth:fr,type:dr,selections:ir,fixed:Wr,renderCell:sr,hideSelectAll:zr,checkStrictly:Ir=!0}=wt||{},{prefixCls:eo,data:xo,pageData:ko,getRecordByKey:$r,getRowKey:So,expandType:Xo,childrenColumnName:_r,locale:co,getPopupContainer:Xr}=pt,[Cr,oo]=(0,ll.Z)(an||zn||xs,{value:an}),Mo=Ne.useRef(new Map),Zo=(0,Ne.useCallback)($o=>{if(tn){const Io=new Map;$o.forEach(Go=>{let Co=$r(Go);!Co&&Mo.current.has(Go)&&(Co=Mo.current.get(Go)),Io.set(Go,Co)}),Mo.current=Io}},[$r,tn]);Ne.useEffect(()=>{Zo(Cr)},[Cr]);const{keyEntities:Wo}=(0,Ne.useMemo)(()=>{if(Ir)return{keyEntities:null};let $o=xo;if(tn){const Io=new Set(xo.map((Co,Aa)=>So(Co,Aa))),Go=Array.from(Mo.current).reduce((Co,Aa)=>{let[Po,Jo]=Aa;return Io.has(Po)?Co:Co.concat(Jo)},[]);$o=[].concat((0,Hi.Z)($o),(0,Hi.Z)(Go))}return(0,ya.I8)($o,{externalGetKey:So,childrenPropName:_r})},[xo,So,Ir,_r,tn]),Kr=(0,Ne.useMemo)(()=>vs(_r,ko),[_r,ko]),Yo=(0,Ne.useMemo)(()=>{const $o=new Map;return Kr.forEach((Io,Go)=>{const Co=So(Io,Go),Aa=(bn?bn(Io):null)||{};$o.set(Co,Aa)}),$o},[Kr,So,bn]),ia=(0,Ne.useCallback)($o=>{var Io;return!!(!((Io=Yo.get(So($o)))===null||Io===void 0)&&Io.disabled)},[Yo,So]),[Ta,pa]=(0,Ne.useMemo)(()=>{if(Ir)return[Cr||[],[]];const{checkedKeys:$o,halfCheckedKeys:Io}=(0,Vo.S)(Cr,!0,Wo,ia);return[$o||[],Io]},[Cr,Ir,Wo,ia]),ds=(0,Ne.useMemo)(()=>{const $o=dr==="radio"?Ta.slice(0,1):Ta;return new Set($o)},[Ta,dr]),ja=(0,Ne.useMemo)(()=>dr==="radio"?new Set:new Set(pa),[pa,dr]),[na,Fo]=(0,Ne.useState)(null);Ne.useEffect(()=>{wt||oo(xs)},[!!wt]);const Sa=(0,Ne.useCallback)(($o,Io)=>{let Go,Co;Zo($o),tn?(Go=$o,Co=$o.map(Aa=>Mo.current.get(Aa))):(Go=[],Co=[],$o.forEach(Aa=>{const Po=$r(Aa);Po!==void 0&&(Go.push(Aa),Co.push(Po))})),oo(Go),si==null||si(Go,Co,{type:Io})},[oo,$r,si,tn]),hs=(0,Ne.useCallback)(($o,Io,Go,Co)=>{if(li){const Aa=Go.map(Po=>$r(Po));li($r($o),Io,Aa,Co)}Sa(Go,"single")},[li,$r,Sa]),Qa=(0,Ne.useMemo)(()=>!ir||zr?null:(ir===!0?[ms,Ua,ss]:ir).map(Io=>Io===ms?{key:"all",text:co.selectionAll,onSelect(){Sa(xo.map((Go,Co)=>So(Go,Co)).filter(Go=>{const Co=Yo.get(Go);return!(Co!=null&&Co.disabled)||ds.has(Go)}),"all")}}:Io===Ua?{key:"invert",text:co.selectInvert,onSelect(){const Go=new Set(ds);ko.forEach((Aa,Po)=>{const Jo=So(Aa,Po),ga=Yo.get(Jo);ga!=null&&ga.disabled||(Go.has(Jo)?Go.delete(Jo):Go.add(Jo))});const Co=Array.from(Go);Mi&&Mi(Co),Sa(Co,"invert")}}:Io===ss?{key:"none",text:co.selectNone,onSelect(){Ai==null||Ai(),Sa(Array.from(ds).filter(Go=>{const Co=Yo.get(Go);return Co==null?void 0:Co.disabled}),"none")}}:Io).map(Io=>Object.assign(Object.assign({},Io),{onSelect:function(){for(var Go,Co,Aa=arguments.length,Po=new Array(Aa),Jo=0;Jo<Aa;Jo++)Po[Jo]=arguments[Jo];(Co=Io.onSelect)===null||Co===void 0||(Go=Co).call.apply(Go,[Io].concat(Po)),Fo(null)}})),[ir,ds,ko,So,Mi,Sa]);return[(0,Ne.useCallback)($o=>{var Io;if(!wt)return $o.filter(Ia=>Ia!==Ss);let Go=(0,Hi.Z)($o);const Co=new Set(ds),Aa=Kr.map(So).filter(Ia=>!Yo.get(Ia).disabled),Po=Aa.every(Ia=>Co.has(Ia)),Jo=Aa.some(Ia=>Co.has(Ia)),ga=()=>{const Ia=[];Po?Aa.forEach(Oa=>{Co.delete(Oa),Ia.push(Oa)}):Aa.forEach(Oa=>{Co.has(Oa)||(Co.add(Oa),Ia.push(Oa))});const $a=Array.from(Co);ei==null||ei(!Po,$a.map(Oa=>$r(Oa)),Ia.map(Oa=>$r(Oa))),Sa($a,"all"),Fo(null)};let ma;if(dr!=="radio"){let Ia;if(Qa){const da={getPopupContainer:Xr,items:Qa.map((Xa,_s)=>{const{key:dl,text:hu,onSelect:Yl}=Xa;return{key:dl!=null?dl:_s,onClick:()=>{Yl==null||Yl(Aa)},label:hu}})};Ia=Ne.createElement("div",{className:`${eo}-selection-extra`},Ne.createElement(Gr.Z,{menu:da,getPopupContainer:Xr},Ne.createElement("span",null,Ne.createElement(Eu.Z,null))))}const $a=Kr.map((da,Xa)=>{const _s=So(da,Xa),dl=Yo.get(_s)||{};return Object.assign({checked:Co.has(_s)},dl)}).filter(da=>{let{disabled:Xa}=da;return Xa}),Oa=!!$a.length&&$a.length===Kr.length,qa=Oa&&$a.every(da=>{let{checked:Xa}=da;return Xa}),As=Oa&&$a.some(da=>{let{checked:Xa}=da;return Xa});ma=!zr&&Ne.createElement("div",{className:`${eo}-selection`},Ne.createElement(xr.default,{checked:Oa?qa:!!Kr.length&&Po,indeterminate:Oa?!qa&&As:!Po&&Jo,onChange:ga,disabled:Kr.length===0||Oa,"aria-label":Ia?"Custom selection":"Select all",skipGroup:!0}),Ia)}let Us;dr==="radio"?Us=(Ia,$a,Oa)=>{const qa=So($a,Oa),As=Co.has(qa);return{node:Ne.createElement(Oi.ZP,Object.assign({},Yo.get(qa),{checked:As,onClick:da=>da.stopPropagation(),onChange:da=>{Co.has(qa)||hs(qa,!0,[qa],da.nativeEvent)}})),checked:As}}:Us=(Ia,$a,Oa)=>{var qa;const As=So($a,Oa),da=Co.has(As),Xa=ja.has(As),_s=Yo.get(As);let dl;return Xo==="nest"?dl=Xa:dl=(qa=_s==null?void 0:_s.indeterminate)!==null&&qa!==void 0?qa:Xa,{node:Ne.createElement(xr.default,Object.assign({},_s,{indeterminate:dl,checked:da,skipGroup:!0,onClick:hu=>hu.stopPropagation(),onChange:hu=>{let{nativeEvent:Yl}=hu;const{shiftKey:Ds}=Yl;let Jl=-1,Ql=-1;if(Ds&&Ir){const za=new Set([na,As]);Aa.some((rl,es)=>{if(za.has(rl))if(Jl===-1)Jl=es;else return Ql=es,!0;return!1})}if(Ql!==-1&&Jl!==Ql&&Ir){const za=Aa.slice(Jl,Ql+1),rl=[];da?za.forEach(Ya=>{Co.has(Ya)&&(rl.push(Ya),Co.delete(Ya))}):za.forEach(Ya=>{Co.has(Ya)||(rl.push(Ya),Co.add(Ya))});const es=Array.from(Co);Ni==null||Ni(!da,es.map(Ya=>$r(Ya)),rl.map(Ya=>$r(Ya))),Sa(es,"multiple")}else{const za=Ta;if(Ir){const rl=da?(0,Sc._5)(za,As):(0,Sc.L0)(za,As);hs(As,!da,rl,Yl)}else{const rl=(0,Vo.S)([].concat((0,Hi.Z)(za),[As]),!0,Wo,ia),{checkedKeys:es,halfCheckedKeys:Ya}=rl;let fu=es;if(da){const Pc=new Set(es);Pc.delete(As),fu=(0,Vo.S)(Array.from(Pc),{checked:!1,halfCheckedKeys:Ya},Wo,ia).checkedKeys}hs(As,!da,fu,Yl)}}Fo(da?null:As)}})),checked:da}};const Zs=(Ia,$a,Oa)=>{const{node:qa,checked:As}=Us(Ia,$a,Oa);return sr?sr(As,$a,Oa,qa):qa};if(!Go.includes(Ss))if(Go.findIndex(Ia=>{var $a;return(($a=Ia[Xi])===null||$a===void 0?void 0:$a.columnType)==="EXPAND_COLUMN"})===0){const[Ia,...$a]=Go;Go=[Ia,Ss].concat((0,Hi.Z)($a))}else Go=[Ss].concat((0,Hi.Z)(Go));const cl=Go.indexOf(Ss);Go=Go.filter((Ia,$a)=>Ia!==Ss||$a===cl);const ka=Go[cl-1],il=Go[cl+1];let Fs=Wr;Fs===void 0&&((il==null?void 0:il.fixed)!==void 0?Fs=il.fixed:(ka==null?void 0:ka.fixed)!==void 0&&(Fs=ka.fixed)),Fs&&ka&&((Io=ka[Xi])===null||Io===void 0?void 0:Io.columnType)==="EXPAND_COLUMN"&&ka.fixed===void 0&&(ka.fixed=Fs);const Ws=it()(`${eo}-selection-col`,{[`${eo}-selection-col-with-dropdown`]:ir&&dr==="checkbox"}),uc={fixed:Fs,width:fr,className:`${eo}-selection-column`,title:wt.columnTitle||ma,render:Zs,onCell:wt.onCell,[Xi]:{className:Ws}};return Go.map(Ia=>Ia===Ss?uc:Ia)},[So,Kr,wt,Ta,ds,ja,fr,Qa,Xo,na,Yo,Ni,hs,ia]),ds]},is=pe(89489),bh=pe(59477),Eh=pe(6848);const Uu="ascend",ro="descend";function rd(pt){return typeof pt.sorter=="object"&&typeof pt.sorter.multiple=="number"?pt.sorter.multiple:!1}function Jt(pt){return typeof pt=="function"?pt:pt&&typeof pt=="object"&&pt.compare?pt.compare:!1}function xi(pt,wt){return wt?pt[pt.indexOf(wt)+1]:pt[0]}function Mh(pt,wt,tn){let an=[];function zn(bn,si){an.push({column:bn,key:ta(bn,si),multiplePriority:rd(bn),sortOrder:bn.sortOrder})}return(pt||[]).forEach((bn,si)=>{const li=Ea(si,tn);bn.children?("sortOrder"in bn&&zn(bn,li),an=[].concat((0,Hi.Z)(an),(0,Hi.Z)(Mh(bn.children,wt,li)))):bn.sorter&&("sortOrder"in bn?zn(bn,li):wt&&bn.defaultSortOrder&&an.push({column:bn,key:ta(bn,li),multiplePriority:rd(bn),sortOrder:bn.defaultSortOrder}))}),an}function Lh(pt,wt,tn,an,zn,bn,si,li){return(wt||[]).map((ei,Mi)=>{const Ai=Ea(Mi,li);let Ni=ei;if(Ni.sorter){const fr=Ni.sortDirections||zn,dr=Ni.showSorterTooltip===void 0?si:Ni.showSorterTooltip,ir=ta(Ni,Ai),Wr=tn.find(Xo=>{let{key:_r}=Xo;return _r===ir}),sr=Wr?Wr.sortOrder:null,zr=xi(fr,sr);let Ir;if(ei.sortIcon)Ir=ei.sortIcon({sortOrder:sr});else{const Xo=fr.includes(Uu)&&Ne.createElement(bh.Z,{className:it()(`${pt}-column-sorter-up`,{active:sr===Uu})}),_r=fr.includes(ro)&&Ne.createElement(is.Z,{className:it()(`${pt}-column-sorter-down`,{active:sr===ro})});Ir=Ne.createElement("span",{className:it()(`${pt}-column-sorter`,{[`${pt}-column-sorter-full`]:!!(Xo&&_r)})},Ne.createElement("span",{className:`${pt}-column-sorter-inner`,"aria-hidden":"true"},Xo,_r))}const{cancelSort:eo,triggerAsc:xo,triggerDesc:ko}=bn||{};let $r=eo;zr===ro?$r=ko:zr===Uu&&($r=xo);const So=typeof dr=="object"?dr:{title:$r};Ni=Object.assign(Object.assign({},Ni),{className:it()(Ni.className,{[`${pt}-column-sort`]:sr}),title:Xo=>{const _r=Ne.createElement("div",{className:`${pt}-column-sorters`},Ne.createElement("span",{className:`${pt}-column-title`},Mt(ei.title,Xo)),Ir);return dr?Ne.createElement(Eh.Z,Object.assign({},So),_r):_r},onHeaderCell:Xo=>{const _r=ei.onHeaderCell&&ei.onHeaderCell(Xo)||{},co=_r.onClick,Xr=_r.onKeyDown;_r.onClick=Mo=>{an({column:ei,key:ir,sortOrder:zr,multiplePriority:rd(ei)}),co==null||co(Mo)},_r.onKeyDown=Mo=>{Mo.keyCode===Vi.Z.ENTER&&(an({column:ei,key:ir,sortOrder:zr,multiplePriority:rd(ei)}),Xr==null||Xr(Mo))};const Cr=Pi(ei.title,{}),oo=Cr==null?void 0:Cr.toString();return sr?_r["aria-sort"]=sr==="ascend"?"ascending":"descending":_r["aria-label"]=oo||"",_r.className=it()(_r.className,`${pt}-column-has-sorters`),_r.tabIndex=0,ei.ellipsis&&(_r.title=(Cr!=null?Cr:"").toString()),_r}})}return"children"in Ni&&(Ni=Object.assign(Object.assign({},Ni),{children:Lh(pt,Ni.children,tn,an,zn,bn,si,Ai)})),Ni})}function ac(pt){const{column:wt,sortOrder:tn}=pt;return{column:wt,order:tn,field:wt.dataIndex,columnKey:wt.key}}function cu(pt){const wt=pt.filter(tn=>{let{sortOrder:an}=tn;return an}).map(ac);return wt.length===0&&pt.length?Object.assign(Object.assign({},ac(pt[pt.length-1])),{column:void 0}):wt.length<=1?wt[0]||{}:wt}function Mu(pt,wt,tn){const an=wt.slice().sort((si,li)=>li.multiplePriority-si.multiplePriority),zn=pt.slice(),bn=an.filter(si=>{let{column:{sorter:li},sortOrder:ei}=si;return Jt(li)&&ei});return bn.length?zn.sort((si,li)=>{for(let ei=0;ei<bn.length;ei+=1){const Mi=bn[ei],{column:{sorter:Ai},sortOrder:Ni}=Mi,fr=Jt(Ai);if(fr&&Ni){const dr=fr(si,li,Ni);if(dr!==0)return Ni===Uu?dr:-dr}}return 0}).map(si=>{const li=si[tn];return li?Object.assign(Object.assign({},si),{[tn]:Mu(li,wt,tn)}):si}):zn}function Nh(pt){let{prefixCls:wt,mergedColumns:tn,onSorterChange:an,sortDirections:zn,tableLocale:bn,showSorterTooltip:si}=pt;const[li,ei]=Ne.useState(Mh(tn,!0)),Mi=Ne.useMemo(()=>{let ir=!0;const Wr=Mh(tn,!1);if(!Wr.length)return li;const sr=[];function zr(eo){ir?sr.push(eo):sr.push(Object.assign(Object.assign({},eo),{sortOrder:null}))}let Ir=null;return Wr.forEach(eo=>{Ir===null?(zr(eo),eo.sortOrder&&(eo.multiplePriority===!1?ir=!1:Ir=!0)):(Ir&&eo.multiplePriority!==!1||(ir=!1),zr(eo))}),sr},[tn,li]),Ai=Ne.useMemo(()=>{const ir=Mi.map(Wr=>{let{column:sr,sortOrder:zr}=Wr;return{column:sr,order:zr}});return{sortColumns:ir,sortColumn:ir[0]&&ir[0].column,sortOrder:ir[0]&&ir[0].order}},[Mi]);function Ni(ir){let Wr;ir.multiplePriority===!1||!Mi.length||Mi[0].multiplePriority===!1?Wr=[ir]:Wr=[].concat((0,Hi.Z)(Mi.filter(sr=>{let{key:zr}=sr;return zr!==ir.key})),[ir]),ei(Wr),an(cu(Wr),Wr)}return[ir=>Lh(wt,ir,Mi,Ni,zn,bn,si),Mi,Ai,()=>cu(Mi)]}function Pd(pt,wt){return pt.map(tn=>{const an=Object.assign({},tn);return an.title=Mt(tn.title,wt),"children"in an&&(an.children=Pd(an.children,wt)),an})}function ys(pt){return[Ne.useCallback(tn=>Pd(tn,pt),[pt])]}var To=gr((pt,wt)=>{const{_renderTimes:tn}=pt,{_renderTimes:an}=wt;return tn!==an}),yl=lo((pt,wt)=>{const{_renderTimes:tn}=pt,{_renderTimes:an}=wt;return tn!==an}),ul=pe(64993),_a=pe(17313),ra=pe(83116),Hs=pe(37613),Ja=pt=>{const{componentCls:wt}=pt,tn=`${pt.lineWidth}px ${pt.lineType} ${pt.tableBorderColor}`,an=(zn,bn,si)=>({[`&${wt}-${zn}`]:{[`> ${wt}-container`]:{[`> ${wt}-content, > ${wt}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${wt}-expanded-row-fixed`]:{margin:`-${bn}px -${si+pt.lineWidth}px`}}}}}});return{[`${wt}-wrapper`]:{[`${wt}${wt}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${wt}-title`]:{border:tn,borderBottom:0},[`> ${wt}-container`]:{borderInlineStart:tn,borderTop:tn,[`
|
|
|
> ${wt}-content,
|
|
|
> ${wt}-header,
|
|
|
> ${wt}-body,
|
|
|
> ${wt}-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:tn},"> thead":{"> tr:not(:last-child) > th":{borderBottom:tn},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${wt}-cell-fix-right-first::after`]:{borderInlineEnd:tn}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${wt}-expanded-row-fixed`]:{margin:`-${pt.tablePaddingVertical}px -${pt.tablePaddingHorizontal+pt.lineWidth}px`,"&::after":{position:"absolute",top:0,insetInlineEnd:pt.lineWidth,bottom:0,borderInlineEnd:tn,content:'""'}}}}}},[`&${wt}-scroll-horizontal`]:{[`> ${wt}-container > ${wt}-body`]:{"> table > tbody":{[`
|
|
|
> tr${wt}-expanded-row,
|
|
|
> tr${wt}-placeholder
|
|
|
`]:{"> th, > td":{borderInlineEnd:0}}}}}},an("middle",pt.tablePaddingVerticalMiddle,pt.tablePaddingHorizontalMiddle)),an("small",pt.tablePaddingVerticalSmall,pt.tablePaddingHorizontalSmall)),{[`> ${wt}-footer`]:{border:tn,borderTop:0}}),[`${wt}-cell`]:{[`${wt}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${pt.lineWidth}px 0 ${pt.lineWidth}px ${pt.tableHeaderBg}`}},[`${wt}-bordered ${wt}-cell-scrollbar`]:{borderInlineEnd:tn}}}},nl=pt=>{const{componentCls:wt}=pt;return{[`${wt}-wrapper`]:{[`${wt}-cell-ellipsis`]:Object.assign(Object.assign({},_a.vS),{wordBreak:"keep-all",[`
|
|
|
&${wt}-cell-fix-left-last,
|
|
|
&${wt}-cell-fix-right-first
|
|
|
`]:{overflow:"visible",[`${wt}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${wt}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},Pa=pt=>{const{componentCls:wt}=pt;return{[`${wt}-wrapper`]:{[`${wt}-tbody > tr${wt}-placeholder`]:{textAlign:"center",color:pt.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:pt.colorBgContainer}}}}},Ll=pe(15969),Va=pt=>{const{componentCls:wt,antCls:tn,controlInteractiveSize:an,motionDurationSlow:zn,lineWidth:bn,paddingXS:si,lineType:li,tableBorderColor:ei,tableExpandIconBg:Mi,tableExpandColumnWidth:Ai,borderRadius:Ni,fontSize:fr,fontSizeSM:dr,lineHeight:ir,tablePaddingVertical:Wr,tablePaddingHorizontal:sr,tableExpandedRowBg:zr,paddingXXS:Ir}=pt,eo=an/2-bn,xo=eo*2+bn*3,ko=`${bn}px ${li} ${ei}`,$r=Ir-bn;return{[`${wt}-wrapper`]:{[`${wt}-expand-icon-col`]:{width:Ai},[`${wt}-row-expand-icon-cell`]:{textAlign:"center",[`${wt}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${wt}-row-indent`]:{height:1,float:"left"},[`${wt}-row-expand-icon`]:Object.assign(Object.assign({},(0,Ll.N)(pt)),{position:"relative",float:"left",boxSizing:"border-box",width:xo,height:xo,padding:0,color:"inherit",lineHeight:`${xo}px`,background:Mi,border:ko,borderRadius:Ni,transform:`scale(${an/xo})`,transition:`all ${zn}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${zn} ease-out`,content:'""'},"&::before":{top:eo,insetInlineEnd:$r,insetInlineStart:$r,height:bn},"&::after":{top:$r,bottom:$r,insetInlineStart:eo,width:bn,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"}}),[`${wt}-row-indent + ${wt}-row-expand-icon`]:{marginTop:(fr*ir-bn*3)/2-Math.ceil((dr*1.4-bn*3)/2),marginInlineEnd:si},[`tr${wt}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:zr}},[`${tn}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${wt}-expanded-row-fixed`]:{position:"relative",margin:`-${Wr}px -${sr}px`,padding:`${Wr}px ${sr}px`}}}},Ps=pt=>{const{componentCls:wt,antCls:tn,iconCls:an,tableFilterDropdownWidth:zn,tableFilterDropdownSearchWidth:bn,paddingXXS:si,paddingXS:li,colorText:ei,lineWidth:Mi,lineType:Ai,tableBorderColor:Ni,tableHeaderIconColor:fr,fontSizeSM:dr,tablePaddingHorizontal:ir,borderRadius:Wr,motionDurationSlow:sr,colorTextDescription:zr,colorPrimary:Ir,tableHeaderFilterActiveBg:eo,colorTextDisabled:xo,tableFilterDropdownBg:ko,tableFilterDropdownHeight:$r,controlItemBgHover:So,controlItemBgActive:Xo,boxShadowSecondary:_r,filterDropdownMenuBg:co}=pt,Xr=`${tn}-dropdown`,Cr=`${wt}-filter-dropdown`,oo=`${tn}-tree`,Mo=`${Mi}px ${Ai} ${Ni}`;return[{[`${wt}-wrapper`]:{[`${wt}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${wt}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:-si,marginInline:`${si}px ${-ir/2}px`,padding:`0 ${si}px`,color:fr,fontSize:dr,borderRadius:Wr,cursor:"pointer",transition:`all ${sr}`,"&:hover":{color:zr,background:eo},"&.active":{color:Ir}}}},{[`${tn}-dropdown`]:{[Cr]:Object.assign(Object.assign({},(0,_a.Wf)(pt)),{minWidth:zn,backgroundColor:ko,borderRadius:Wr,boxShadow:_r,overflow:"hidden",[`${Xr}-menu`]:{maxHeight:$r,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:co,"&:empty::after":{display:"block",padding:`${li}px 0`,color:xo,fontSize:dr,textAlign:"center",content:'"Not Found"'}},[`${Cr}-tree`]:{paddingBlock:`${li}px 0`,paddingInline:li,[oo]:{padding:0},[`${oo}-treenode ${oo}-node-content-wrapper:hover`]:{backgroundColor:So},[`${oo}-treenode-checkbox-checked ${oo}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:Xo}}},[`${Cr}-search`]:{padding:li,borderBottom:Mo,"&-input":{input:{minWidth:bn},[an]:{color:xo}}},[`${Cr}-checkall`]:{width:"100%",marginBottom:si,marginInlineStart:si},[`${Cr}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${li-Mi}px ${li}px`,overflow:"hidden",borderTop:Mo}})}},{[`${tn}-dropdown ${Cr}, ${Cr}-submenu`]:{[`${tn}-checkbox-wrapper + span`]:{paddingInlineStart:li,color:ei},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},ad=pt=>{const{componentCls:wt,lineWidth:tn,colorSplit:an,motionDurationSlow:zn,zIndexTableFixed:bn,tableBg:si,zIndexTableSticky:li}=pt,ei=an;return{[`${wt}-wrapper`]:{[`
|
|
|
${wt}-cell-fix-left,
|
|
|
${wt}-cell-fix-right
|
|
|
`]:{position:"sticky !important",zIndex:bn,background:si},[`
|
|
|
${wt}-cell-fix-left-first::after,
|
|
|
${wt}-cell-fix-left-last::after
|
|
|
`]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:-tn,width:30,transform:"translateX(100%)",transition:`box-shadow ${zn}`,content:'""',pointerEvents:"none"},[`${wt}-cell-fix-left-all::after`]:{display:"none"},[`
|
|
|
${wt}-cell-fix-right-first::after,
|
|
|
${wt}-cell-fix-right-last::after
|
|
|
`]:{position:"absolute",top:0,bottom:-tn,left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${zn}`,content:'""',pointerEvents:"none"},[`${wt}-container`]:{"&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:li+1,width:30,transition:`box-shadow ${zn}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${wt}-ping-left`]:{[`&:not(${wt}-has-fix-left) ${wt}-container`]:{position:"relative","&::before":{boxShadow:`inset 10px 0 8px -8px ${ei}`}},[`
|
|
|
${wt}-cell-fix-left-first::after,
|
|
|
${wt}-cell-fix-left-last::after
|
|
|
`]:{boxShadow:`inset 10px 0 8px -8px ${ei}`},[`${wt}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${wt}-ping-right`]:{[`&:not(${wt}-has-fix-right) ${wt}-container`]:{position:"relative","&::after":{boxShadow:`inset -10px 0 8px -8px ${ei}`}},[`
|
|
|
${wt}-cell-fix-right-first::after,
|
|
|
${wt}-cell-fix-right-last::after
|
|
|
`]:{boxShadow:`inset -10px 0 8px -8px ${ei}`}}}}},Rf=pt=>{const{componentCls:wt,antCls:tn}=pt;return{[`${wt}-wrapper`]:{[`${wt}-pagination${tn}-pagination`]:{margin:`${pt.margin}px 0`},[`${wt}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:pt.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},jf=pt=>{const{componentCls:wt,tableRadius:tn}=pt;return{[`${wt}-wrapper`]:{[wt]:{[`${wt}-title, ${wt}-header`]:{borderRadius:`${tn}px ${tn}px 0 0`},[`${wt}-title + ${wt}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${wt}-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:tn,borderStartEndRadius:tn,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:tn},"> *:last-child":{borderStartEndRadius:tn}}},"&-footer":{borderRadius:`0 0 ${tn}px ${tn}px`}}}}},wd=pt=>{const{componentCls:wt}=pt;return{[`${wt}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${wt}-pagination-left`]:{justifyContent:"flex-end"},[`${wt}-pagination-right`]:{justifyContent:"flex-start"},[`${wt}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${wt}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${wt}-row-indent`]:{float:"right"}}}}},Xd=pt=>{const{componentCls:wt,antCls:tn,iconCls:an,fontSizeIcon:zn,padding:bn,paddingXS:si,tableHeaderIconColor:li,tableHeaderIconColorHover:ei,tableSelectionColumnWidth:Mi}=pt;return{[`${wt}-wrapper`]:{[`${wt}-selection-col`]:{width:Mi,[`&${wt}-selection-col-with-dropdown`]:{width:Mi+zn+bn/4}},[`${wt}-bordered ${wt}-selection-col`]:{width:Mi+si*2,[`&${wt}-selection-col-with-dropdown`]:{width:Mi+zn+bn/4+si*2}},[`
|
|
|
table tr th${wt}-selection-column,
|
|
|
table tr td${wt}-selection-column
|
|
|
`]:{paddingInlineEnd:pt.paddingXS,paddingInlineStart:pt.paddingXS,textAlign:"center",[`${tn}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${wt}-selection-column${wt}-cell-fix-left`]:{zIndex:pt.zIndexTableFixed+1},[`table tr th${wt}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${wt}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${wt}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${pt.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:`${pt.tablePaddingHorizontal/4}px`,[an]:{color:li,fontSize:zn,verticalAlign:"baseline","&:hover":{color:ei}}}}}},ud=pt=>{const{componentCls:wt}=pt,tn=(an,zn,bn,si)=>({[`${wt}${wt}-${an}`]:{fontSize:si,[`
|
|
|
${wt}-title,
|
|
|
${wt}-footer,
|
|
|
${wt}-cell,
|
|
|
${wt}-thead > tr > th,
|
|
|
${wt}-tbody > tr > th,
|
|
|
${wt}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{padding:`${zn}px ${bn}px`},[`${wt}-filter-trigger`]:{marginInlineEnd:`-${bn/2}px`},[`${wt}-expanded-row-fixed`]:{margin:`-${zn}px -${bn}px`},[`${wt}-tbody`]:{[`${wt}-wrapper:only-child ${wt}`]:{marginBlock:`-${zn}px`,marginInline:`${pt.tableExpandColumnWidth-bn}px -${bn}px`}},[`${wt}-selection-column`]:{paddingInlineStart:`${bn/4}px`}}});return{[`${wt}-wrapper`]:Object.assign(Object.assign({},tn("middle",pt.tablePaddingVerticalMiddle,pt.tablePaddingHorizontalMiddle,pt.tableFontSizeMiddle)),tn("small",pt.tablePaddingVerticalSmall,pt.tablePaddingHorizontalSmall,pt.tableFontSizeSmall))}},sc=pt=>{const{componentCls:wt,marginXXS:tn,fontSizeIcon:an,tableHeaderIconColor:zn,tableHeaderIconColorHover:bn}=pt;return{[`${wt}-wrapper`]:{[`${wt}-thead th${wt}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${pt.motionDurationSlow}`,"&:hover":{background:pt.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:pt.colorPrimary},[`
|
|
|
&${wt}-cell-fix-left:hover,
|
|
|
&${wt}-cell-fix-right:hover
|
|
|
`]:{background:pt.tableFixedHeaderSortActiveBg}},[`${wt}-thead th${wt}-column-sort`]:{background:pt.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${wt}-column-sort`]:{background:pt.tableBodySortBg},[`${wt}-column-title`]:{position:"relative",zIndex:1,flex:1},[`${wt}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${wt}-column-sorter`]:{marginInlineStart:tn,color:zn,fontSize:0,transition:`color ${pt.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:an,"&.active":{color:pt.colorPrimary}},[`${wt}-column-sorter-up + ${wt}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${wt}-column-sorters:hover ${wt}-column-sorter`]:{color:bn}}}},_u=pt=>{const{componentCls:wt,opacityLoading:tn,tableScrollThumbBg:an,tableScrollThumbBgHover:zn,tableScrollThumbSize:bn,tableScrollBg:si,zIndexTableSticky:li,stickyScrollBarBorderRadius:ei}=pt,Mi=`${pt.lineWidth}px ${pt.lineType} ${pt.tableBorderColor}`;return{[`${wt}-wrapper`]:{[`${wt}-sticky`]:{"&-holder":{position:"sticky",zIndex:li,background:pt.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${bn}px !important`,zIndex:li,display:"flex",alignItems:"center",background:si,borderTop:Mi,opacity:tn,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:bn,backgroundColor:an,borderRadius:ei,transition:`all ${pt.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:zn}}}}}}},kl=pt=>{const{componentCls:wt,lineWidth:tn,tableBorderColor:an}=pt,zn=`${tn}px ${pt.lineType} ${an}`;return{[`${wt}-wrapper`]:{[`${wt}-summary`]:{position:"relative",zIndex:pt.zIndexTableFixed,background:pt.tableBg,"> tr":{"> th, > td":{borderBottom:zn}}},[`div${wt}-summary`]:{boxShadow:`0 -${tn}px 0 ${an}`}}}},xc=pt=>{const{componentCls:wt}=pt,tn=`${pt.lineWidth}px ${pt.lineType} ${pt.tableBorderColor}`,an=`${wt}-expanded-row-cell`;return{[`${wt}-wrapper`]:{[`${wt}-tbody-virtual`]:{[`${wt}-row`]:{display:"flex",boxSizing:"border-box",width:"100%"},[`${wt}-cell`]:{borderBottom:tn},[`${wt}-expanded-row`]:{[`${an}${an}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${pt.lineWidth}px)`,borderInlineEnd:"none"}}},[`${wt}-bordered`]:{[`${wt}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:tn,position:"absolute"},[`${wt}-cell`]:{borderInlineEnd:tn,[`&${wt}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:-pt.lineWidth,borderInlineStart:tn}}}}}}};const Lu=pt=>{const{componentCls:wt,fontWeightStrong:tn,tablePaddingVertical:an,tablePaddingHorizontal:zn,lineWidth:bn,lineType:si,tableBorderColor:li,tableFontSize:ei,tableBg:Mi,tableRadius:Ai,tableHeaderTextColor:Ni,motionDurationMid:fr,tableHeaderBg:dr,tableHeaderCellSplitColor:ir,tableRowHoverBg:Wr,tableSelectedRowBg:sr,tableSelectedRowHoverBg:zr,tableFooterTextColor:Ir,tableFooterBg:eo,paddingContentVerticalLG:xo}=pt,ko=`${bn}px ${si} ${li}`;return{[`${wt}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},(0,_a.dF)()),{[wt]:Object.assign(Object.assign({},(0,_a.Wf)(pt)),{fontSize:ei,background:Mi,borderRadius:`${Ai}px ${Ai}px 0 0`}),table:{width:"100%",textAlign:"start",borderRadius:`${Ai}px ${Ai}px 0 0`,borderCollapse:"separate",borderSpacing:0},[`
|
|
|
${wt}-cell,
|
|
|
${wt}-thead > tr > th,
|
|
|
${wt}-tbody > tr > th,
|
|
|
${wt}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{position:"relative",padding:`${xo}px ${zn}px`,overflowWrap:"break-word"},[`${wt}-title`]:{padding:`${an}px ${zn}px`},[`${wt}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:Ni,fontWeight:tn,textAlign:"start",background:dr,borderBottom:ko,transition:`background ${fr} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${wt}-selection-column):not(${wt}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:ir,transform:"translateY(-50%)",transition:`background-color ${fr}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${wt}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${fr}, border-color ${fr}`,borderBottom:ko,[`
|
|
|
> ${wt}-wrapper:only-child,
|
|
|
> ${wt}-expanded-row-fixed > ${wt}-wrapper:only-child
|
|
|
`]:{[wt]:{marginBlock:`-${an}px`,marginInline:`${pt.tableExpandColumnWidth-zn}px -${zn}px`,[`${wt}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:Ni,fontWeight:tn,textAlign:"start",background:dr,borderBottom:ko,transition:`background ${fr} ease`},[`
|
|
|
&${wt}-row:hover > th,
|
|
|
&${wt}-row:hover > td,
|
|
|
> th${wt}-cell-row-hover,
|
|
|
> td${wt}-cell-row-hover
|
|
|
`]:{background:Wr},[`&${wt}-row-selected`]:{"> th, > td":{background:sr},"&:hover > th, &:hover > td":{background:zr}}}},[`${wt}-footer`]:{padding:`${an}px ${zn}px`,color:Ir,background:eo}})}};var lc=(0,ra.Z)("Table",pt=>{const{colorTextHeading:wt,colorSplit:tn,colorIcon:an,colorIconHover:zn,opacityLoading:bn,colorBgContainer:si,controlInteractiveSize:li,headerBg:ei,headerColor:Mi,headerSortActiveBg:Ai,headerSortHoverBg:Ni,bodySortBg:fr,rowHoverBg:dr,rowSelectedBg:ir,rowSelectedHoverBg:Wr,rowExpandedBg:sr,cellPaddingBlock:zr,cellPaddingInline:Ir,cellPaddingBlockMD:eo,cellPaddingInlineMD:xo,cellPaddingBlockSM:ko,cellPaddingInlineSM:$r,borderColor:So,footerBg:Xo,footerColor:_r,headerBorderRadius:co,cellFontSize:Xr,cellFontSizeMD:Cr,cellFontSizeSM:oo,headerSplitColor:Mo,fixedHeaderSortActiveBg:Zo,headerFilterHoverBg:Wo,filterDropdownBg:Kr,expandIconBg:Yo,selectionColumnWidth:ia,stickyScrollBarBg:Ta}=pt,pa=new ul.C(an),ds=new ul.C(zn),ja=2,na=(0,Hs.TS)(pt,{tableFontSize:Xr,tableBg:si,tableRadius:co,tablePaddingVertical:zr,tablePaddingHorizontal:Ir,tablePaddingVerticalMiddle:eo,tablePaddingHorizontalMiddle:xo,tablePaddingVerticalSmall:ko,tablePaddingHorizontalSmall:$r,tableBorderColor:So,tableHeaderTextColor:Mi,tableHeaderBg:ei,tableFooterTextColor:_r,tableFooterBg:Xo,tableHeaderCellSplitColor:Mo,tableHeaderSortBg:Ai,tableHeaderSortHoverBg:Ni,tableHeaderIconColor:pa.clone().setAlpha(pa.getAlpha()*bn).toRgbString(),tableHeaderIconColorHover:ds.clone().setAlpha(ds.getAlpha()*bn).toRgbString(),tableBodySortBg:fr,tableFixedHeaderSortActiveBg:Zo,tableHeaderFilterActiveBg:Wo,tableFilterDropdownBg:Kr,tableRowHoverBg:dr,tableSelectedRowBg:ir,tableSelectedRowHoverBg:Wr,zIndexTableFixed:ja,zIndexTableSticky:ja+1,tableFontSizeMiddle:Cr,tableFontSizeSmall:oo,tableSelectionColumnWidth:ia,tableExpandIconBg:Yo,tableExpandColumnWidth:li+2*pt.padding,tableExpandedRowBg:sr,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:Ta,tableScrollThumbBgHover:wt,tableScrollBg:tn});return[Lu(na),Rf(na),kl(na),sc(na),Ps(na),Ja(na),jf(na),Va(na),kl(na),Pa(na),Xd(na),ad(na),_u(na),nl(na),ud(na),wd(na),xc(na)]},pt=>{const{colorFillAlter:wt,colorBgContainer:tn,colorTextHeading:an,colorFillSecondary:zn,colorFillContent:bn,controlItemBgActive:si,controlItemBgActiveHover:li,padding:ei,paddingSM:Mi,paddingXS:Ai,colorBorderSecondary:Ni,borderRadiusLG:fr,fontSize:dr,controlHeight:ir,colorTextPlaceholder:Wr}=pt,sr=new ul.C(zn).onBackground(tn).toHexShortString(),zr=new ul.C(bn).onBackground(tn).toHexShortString(),Ir=new ul.C(wt).onBackground(tn).toHexShortString();return{headerBg:Ir,headerColor:an,headerSortActiveBg:sr,headerSortHoverBg:zr,bodySortBg:Ir,rowHoverBg:Ir,rowSelectedBg:si,rowSelectedHoverBg:li,rowExpandedBg:wt,cellPaddingBlock:ei,cellPaddingInline:ei,cellPaddingBlockMD:Mi,cellPaddingInlineMD:Ai,cellPaddingBlockSM:Ai,cellPaddingInlineSM:Ai,borderColor:Ni,headerBorderRadius:fr,footerBg:Ir,footerColor:an,cellFontSize:dr,cellFontSizeMD:dr,cellFontSizeSM:dr,headerSplitColor:Ni,fixedHeaderSortActiveBg:sr,headerFilterHoverBg:bn,filterDropdownMenuBg:tn,filterDropdownBg:tn,expandIconBg:tn,selectionColumnWidth:ir,stickyScrollBarBg:Wr,stickyScrollBarBorderRadius:100}});const Jd=[],of=(pt,wt)=>{const{prefixCls:tn,className:an,rootClassName:zn,style:bn,size:si,bordered:li,dropdownPrefixCls:ei,dataSource:Mi,pagination:Ai,rowSelection:Ni,rowKey:fr="key",rowClassName:dr,columns:ir,children:Wr,childrenColumnName:sr,onChange:zr,getPopupContainer:Ir,loading:eo,expandIcon:xo,expandable:ko,expandedRowRender:$r,expandIconColumnIndex:So,indentSize:Xo,scroll:_r,sortDirections:co,locale:Xr,showSorterTooltip:Cr=!0,virtual:oo}=pt,Mo=Ne.useMemo(()=>ir||qt(Wr),[ir,Wr]),Zo=Ne.useMemo(()=>Mo.some(Da=>Da.responsive),[Mo]),Wo=(0,fi.Z)(Zo),Kr=Ne.useMemo(()=>{const Da=new Set(Object.keys(Wo).filter(rs=>Wo[rs]));return Mo.filter(rs=>!rs.responsive||rs.responsive.some(Bs=>Da.has(Bs)))},[Mo,Wo]),Yo=(0,qr.Z)(pt,["className","style","columns"]),{locale:ia=Tr.Z,direction:Ta,table:pa,renderEmpty:ds,getPrefixCls:ja,getPopupContainer:na}=Ne.useContext(Ro.E_),Fo=(0,Nr.Z)(si),Sa=Object.assign(Object.assign({},ia.Table),Xr),hs=Mi||Jd,Qa=ja("table",tn),Ns=ja("dropdown",ei),$o=Object.assign({childrenColumnName:sr,expandIconColumnIndex:So},ko),{childrenColumnName:Io="children"}=$o,Go=Ne.useMemo(()=>hs.some(Da=>Da==null?void 0:Da[Io])?"nest":$r||ko&&ko.expandedRowRender?"row":null,[hs]),Co={body:Ne.useRef()},Aa=Ne.useMemo(()=>typeof fr=="function"?fr:Da=>Da==null?void 0:Da[fr],[fr]),[Po]=kc(hs,Io,Aa),Jo={},ga=function(Da,rs){let Bs=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var os,Ca,Ts;const Rl=Object.assign(Object.assign({},Jo),Da);Bs&&((os=Jo.resetPagination)===null||os===void 0||os.call(Jo),!((Ca=Rl.pagination)===null||Ca===void 0)&&Ca.current&&(Rl.pagination.current=1),Ai&&Ai.onChange&&Ai.onChange(1,(Ts=Rl.pagination)===null||Ts===void 0?void 0:Ts.pageSize)),_r&&_r.scrollToFirstRowOnChange!==!1&&Co.body.current&&(0,zo.Z)(0,{getContainer:()=>Co.body.current}),zr==null||zr(Rl.pagination,Rl.filters,Rl.sorter,{currentDataSource:wl(Mu(hs,Rl.sorterStates,Io),Rl.filterStates),action:rs})},ma=(Da,rs)=>{ga({sorter:Da,sorterStates:rs},"sort",!1)},[Us,Zs,cl,ka]=Nh({prefixCls:Qa,mergedColumns:Kr,onSorterChange:ma,sortDirections:co||["ascend","descend"],tableLocale:Sa,showSorterTooltip:Cr}),il=Ne.useMemo(()=>Mu(hs,Zs,Io),[hs,Zs]);Jo.sorter=ka(),Jo.sorterStates=Zs;const Fs=(Da,rs)=>{ga({filters:Da,filterStates:rs},"filter",!0)},[Ws,uc,Ia]=nd({prefixCls:Qa,locale:Sa,dropdownPrefixCls:Ns,mergedColumns:Kr,onFilterChange:Fs,getPopupContainer:Ir||na}),$a=wl(il,uc);Jo.filters=Ia,Jo.filterStates=uc;const Oa=Ne.useMemo(()=>{const Da={};return Object.keys(Ia).forEach(rs=>{Ia[rs]!==null&&(Da[rs]=Ia[rs])}),Object.assign(Object.assign({},cl),{filters:Da})},[cl,Ia]),[qa]=ys(Oa),As=(Da,rs)=>{ga({pagination:Object.assign(Object.assign({},Jo.pagination),{current:Da,pageSize:rs})},"paginate")},[da,Xa]=xd($a.length,As,Ai);Jo.pagination=Ai===!1?{}:Js(da,Ai),Jo.resetPagination=Xa;const _s=Ne.useMemo(()=>{if(Ai===!1||!da.pageSize)return $a;const{current:Da=1,total:rs,pageSize:Bs=Ic}=da;return $a.length<rs?$a.length>Bs?$a.slice((Da-1)*Bs,Da*Bs):$a:$a.slice((Da-1)*Bs,Da*Bs)},[!!Ai,$a,da&&da.current,da&&da.pageSize,da&&da.total]),[dl,hu]=_l({prefixCls:Qa,data:$a,pageData:_s,getRowKey:Aa,getRecordByKey:Po,expandType:Go,childrenColumnName:Io,locale:Sa,getPopupContainer:Ir||na},Ni),Yl=(Da,rs,Bs)=>{let os;return typeof dr=="function"?os=it()(dr(Da,rs,Bs)):os=it()(dr),it()({[`${Qa}-row-selected`]:hu.has(Aa(Da,rs))},os)};$o.__PARENT_RENDER_ICON__=$o.expandIcon,$o.expandIcon=$o.expandIcon||xo||_o(Sa),Go==="nest"&&$o.expandIconColumnIndex===void 0?$o.expandIconColumnIndex=Ni?1:0:$o.expandIconColumnIndex>0&&Ni&&($o.expandIconColumnIndex-=1),typeof $o.indentSize!="number"&&($o.indentSize=typeof Xo=="number"?Xo:15);const Ds=Ne.useCallback(Da=>qa(dl(Ws(Us(Da)))),[Us,Ws,dl]);let Jl,Ql;if(Ai!==!1&&(da!=null&&da.total)){let Da;da.size?Da=da.size:Da=Fo==="small"||Fo==="middle"?"small":void 0;const rs=Ca=>Ne.createElement(Bo.Z,Object.assign({},da,{className:it()(`${Qa}-pagination ${Qa}-pagination-${Ca}`,da.className),size:Da})),Bs=Ta==="rtl"?"left":"right",{position:os}=da;if(os!==null&&Array.isArray(os)){const Ca=os.find(zu=>zu.includes("top")),Ts=os.find(zu=>zu.includes("bottom")),Rl=os.every(zu=>`${zu}`=="none");!Ca&&!Ts&&!Rl&&(Ql=rs(Bs)),Ca&&(Jl=rs(Ca.toLowerCase().replace("top",""))),Ts&&(Ql=rs(Ts.toLowerCase().replace("bottom","")))}else Ql=rs(Bs)}let za;typeof eo=="boolean"?za={spinning:eo}:typeof eo=="object"&&(za=Object.assign({spinning:!0},eo));const[rl,es]=lc(Qa),[,Ya]=(0,Ho.Z)(),fu=it()(`${Qa}-wrapper`,pa==null?void 0:pa.className,{[`${Qa}-wrapper-rtl`]:Ta==="rtl"},an,zn,es),Pc=Object.assign(Object.assign({},pa==null?void 0:pa.style),bn),Nu=Xr&&Xr.emptyText||(ds==null?void 0:ds("Table"))||Ne.createElement(Mr.Z,{componentName:"Table"}),Fu=oo?yl:To,gu={},ql=Ne.useMemo(()=>{const{fontSize:Da,lineHeight:rs,padding:Bs,paddingXS:os,paddingSM:Ca}=Ya,Ts=Math.floor(Da*rs);switch(Fo){case"large":return Bs*2+Ts;case"small":return os*2+Ts;default:return Ca*2+Ts}},[Ya,Fo]);return oo&&(gu.listItemHeight=ql),rl(Ne.createElement("div",{ref:wt,className:fu,style:Pc},Ne.createElement(aa.Z,Object.assign({spinning:!1},za),Jl,Ne.createElement(Fu,Object.assign({},gu,Yo,{columns:Kr,direction:Ta,expandable:$o,prefixCls:Qa,className:it()({[`${Qa}-middle`]:Fo==="middle",[`${Qa}-small`]:Fo==="small",[`${Qa}-bordered`]:li,[`${Qa}-empty`]:hs.length===0}),data:_s,rowKey:Aa,rowClassName:Yl,emptyText:Nu,internalHooks:Oe,internalRefs:Co,transformColumns:Ds})),Ql)))};var Ah=Ne.forwardRef(of);const Hf=(pt,wt)=>{const tn=Ne.useRef(0);return tn.current+=1,Ne.createElement(Ah,Object.assign({},pt,{ref:wt,_renderTimes:tn.current}))},Ol=Ne.forwardRef(Hf);Ol.SELECTION_COLUMN=Ss,Ol.EXPAND_COLUMN=ge,Ol.SELECTION_ALL=ms,Ol.SELECTION_INVERT=Ua,Ol.SELECTION_NONE=ss,Ol.Column=Lr,Ol.ColumnGroup=uo,Ol.Summary=et;var Oc=Ol,dg=Oc},12563:function(Vn,xn,pe){"use strict";pe.d(xn,{default:function(){return Pt}});var ge=pe(59301),Oe=pe(99267),Ke=pe(92310),ut=pe.n(Ke),Ge=pe(36785),Xe=pe(47729),Ne=pe(14088),Tt=pe(36355),Ct=pe(17313),Ve=pe(37613),Lt=pe(83116);const dt=Ze=>{const{paddingXXS:Et,lineWidth:it,tagPaddingHorizontal:Dt,componentCls:ht}=Ze,Ht=Dt-it,_t=Et-it;return{[ht]:Object.assign(Object.assign({},(0,Ct.Wf)(Ze)),{display:"inline-block",height:"auto",marginInlineEnd:Ze.marginXS,paddingInline:Ht,fontSize:Ze.tagFontSize,lineHeight:Ze.tagLineHeight,whiteSpace:"nowrap",background:Ze.defaultBg,border:`${Ze.lineWidth}px ${Ze.lineType} ${Ze.colorBorder}`,borderRadius:Ze.borderRadiusSM,opacity:1,transition:`all ${Ze.motionDurationMid}`,textAlign:"start",position:"relative",[`&${ht}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:Ze.defaultColor},[`${ht}-close-icon`]:{marginInlineStart:_t,color:Ze.colorTextDescription,fontSize:Ze.tagIconSize,cursor:"pointer",transition:`all ${Ze.motionDurationMid}`,"&:hover":{color:Ze.colorTextHeading}},[`&${ht}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${Ze.iconCls}-close, ${Ze.iconCls}-close:hover`]:{color:Ze.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${ht}-checkable-checked):hover`]:{color:Ze.colorPrimary,backgroundColor:Ze.colorFillSecondary},"&:active, &-checked":{color:Ze.colorTextLightSolid},"&-checked":{backgroundColor:Ze.colorPrimary,"&:hover":{backgroundColor:Ze.colorPrimaryHover}},"&:active":{backgroundColor:Ze.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${Ze.iconCls} + span, > span + ${Ze.iconCls}`]:{marginInlineStart:Ht}}),[`${ht}-borderless`]:{borderColor:"transparent",background:Ze.tagBorderlessBg}}},Rt=Ze=>{const{lineWidth:Et,fontSizeIcon:it}=Ze,Dt=Ze.fontSizeSM,ht=`${Ze.lineHeightSM*Dt}px`;return(0,Ve.TS)(Ze,{tagFontSize:Dt,tagLineHeight:ht,tagIconSize:it-2*Et,tagPaddingHorizontal:8,tagBorderlessBg:Ze.colorFillTertiary})},De=Ze=>({defaultBg:Ze.colorFillQuaternary,defaultColor:Ze.colorText});var ne=(0,Lt.Z)("Tag",Ze=>{const Et=Rt(Ze);return dt(Et)},De),ee=function(Ze,Et){var it={};for(var Dt in Ze)Object.prototype.hasOwnProperty.call(Ze,Dt)&&Et.indexOf(Dt)<0&&(it[Dt]=Ze[Dt]);if(Ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ht=0,Dt=Object.getOwnPropertySymbols(Ze);ht<Dt.length;ht++)Et.indexOf(Dt[ht])<0&&Object.prototype.propertyIsEnumerable.call(Ze,Dt[ht])&&(it[Dt[ht]]=Ze[Dt[ht]]);return it},se=Ze=>{const{prefixCls:Et,style:it,className:Dt,checked:ht,onChange:Ht,onClick:_t}=Ze,Vt=ee(Ze,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:ot,tag:Ue}=ge.useContext(Tt.E_),Wt=An=>{Ht==null||Ht(!ht),_t==null||_t(An)},Ln=ot("tag",Et),[Fn,Gt]=ne(Ln),rn=ut()(Ln,`${Ln}-checkable`,{[`${Ln}-checkable-checked`]:ht},Ue==null?void 0:Ue.className,Dt,Gt);return Fn(ge.createElement("span",Object.assign({},Vt,{style:Object.assign(Object.assign({},it),Ue==null?void 0:Ue.style),className:rn,onClick:Wt})))},he=pe(45157);const ve=Ze=>(0,he.Z)(Ze,(Et,it)=>{let{textColor:Dt,lightBorderColor:ht,lightColor:Ht,darkColor:_t}=it;return{[`${Ze.componentCls}-${Et}`]:{color:Dt,background:Ht,borderColor:ht,"&-inverse":{color:Ze.colorTextLightSolid,background:_t,borderColor:_t},[`&${Ze.componentCls}-borderless`]:{borderColor:"transparent"}}}});var be=(0,Lt.b)(["Tag","preset"],Ze=>{const Et=Rt(Ze);return ve(Et)},De);function ke(Ze){return typeof Ze!="string"?Ze:Ze.charAt(0).toUpperCase()+Ze.slice(1)}const Be=(Ze,Et,it)=>{const Dt=ke(it);return{[`${Ze.componentCls}-${Et}`]:{color:Ze[`color${it}`],background:Ze[`color${Dt}Bg`],borderColor:Ze[`color${Dt}Border`],[`&${Ze.componentCls}-borderless`]:{borderColor:"transparent"}}}};var He=(0,Lt.b)(["Tag","status"],Ze=>{const Et=Rt(Ze);return[Be(Et,"success","Success"),Be(Et,"processing","Info"),Be(Et,"error","Error"),Be(Et,"warning","Warning")]},De),We=function(Ze,Et){var it={};for(var Dt in Ze)Object.prototype.hasOwnProperty.call(Ze,Dt)&&Et.indexOf(Dt)<0&&(it[Dt]=Ze[Dt]);if(Ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ht=0,Dt=Object.getOwnPropertySymbols(Ze);ht<Dt.length;ht++)Et.indexOf(Dt[ht])<0&&Object.prototype.propertyIsEnumerable.call(Ze,Dt[ht])&&(it[Dt[ht]]=Ze[Dt[ht]]);return it};const rt=(Ze,Et)=>{const{prefixCls:it,className:Dt,rootClassName:ht,style:Ht,children:_t,icon:Vt,color:ot,onClose:Ue,closeIcon:Wt,closable:Ln,bordered:Fn=!0}=Ze,Gt=We(Ze,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:rn,direction:An,tag:ni}=ge.useContext(Tt.E_),[Sn,Yn]=ge.useState(!0);ge.useEffect(()=>{"visible"in Gt&&Yn(Gt.visible)},[Gt.visible]);const It=(0,Ge.o2)(ot),wn=(0,Ge.yT)(ot),Gn=It||wn,ze=Object.assign(Object.assign({backgroundColor:ot&&!Gn?ot:void 0},ni==null?void 0:ni.style),Ht),Ee=rn("tag",it),[Pe,Fe]=ne(Ee),Ae=ut()(Ee,ni==null?void 0:ni.className,{[`${Ee}-${ot}`]:Gn,[`${Ee}-has-color`]:ot&&!Gn,[`${Ee}-hidden`]:!Sn,[`${Ee}-rtl`]:An==="rtl",[`${Ee}-borderless`]:!Fn},Dt,ht,Fe),ye=yt=>{yt.stopPropagation(),Ue==null||Ue(yt),!yt.defaultPrevented&&Yn(!1)},[,qe]=(0,Xe.Z)(Ln,Wt,yt=>yt===null?ge.createElement(Oe.Z,{className:`${Ee}-close-icon`,onClick:ye}):ge.createElement("span",{className:`${Ee}-close-icon`,onClick:ye},yt),null,!1),vt=typeof Gt.onClick=="function"||_t&&_t.type==="a",et=Vt||null,Ye=et?ge.createElement(ge.Fragment,null,et,_t&&ge.createElement("span",null,_t)):_t,xt=ge.createElement("span",Object.assign({},Gt,{ref:Et,className:Ae,style:ze}),Ye,qe,It&&ge.createElement(be,{key:"preset",prefixCls:Ee}),wn&&ge.createElement(He,{key:"status",prefixCls:Ee}));return Pe(vt?ge.createElement(Ne.Z,{component:"Tag"},xt):xt)},Qe=ge.forwardRef(rt);Qe.CheckableTag=se;var Pt=Qe},98228:function(Vn,xn,pe){"use strict";pe.d(xn,{default:function(){return Er}});var ge=pe(92310),Oe=pe.n(ge),Ke=pe(96663),ut=pe(19127),Ge=pe(44127),Xe=pe(72071),Ne=pe(6620),Tt=pe(20135),Ct=pe(77861),Ve=pe(17115),Lt=pe(90782),dt=pe(18929),Rt=pe(48736),De=pe(59301),ne=function($n){var Le=De.useRef({valueLabels:new Map});return De.useMemo(function(){var Ei=Le.current.valueLabels,Ri=new Map,nn=$n.map(function(di){var yi,Li=di.value,Tn=(yi=di.label)!==null&&yi!==void 0?yi:Ei.get(Li);return Ri.set(Li,Tn),(0,Ge.Z)((0,Ge.Z)({},di),{},{label:Tn})});return Le.current.valueLabels=Ri,[nn]},[$n])},ee=function($n,Le,Ei,Ri){return De.useMemo(function(){var nn=$n.map(function(Tn){var Un=Tn.value;return Un}),di=Le.map(function(Tn){var Un=Tn.value;return Un}),yi=nn.filter(function(Tn){return!Ri[Tn]});if(Ei){var Li=(0,Lt.S)(nn,!0,Ri);nn=Li.checkedKeys,di=Li.halfCheckedKeys}return[Array.from(new Set([].concat((0,ut.Z)(yi),(0,ut.Z)(nn)))),di]},[$n,Le,Ei,Ri])},ce=pe(71430),se=function($n,Le){return De.useMemo(function(){var Ei=(0,ce.I8)($n,{fieldNames:Le,initWrapper:function(nn){return(0,Ge.Z)((0,Ge.Z)({},nn),{},{valueEntities:new Map})},processEntity:function(nn,di){var yi=nn.node[Le.value];if(0)var Li;di.valueEntities.set(yi,nn)}});return Ei},[$n,Le])},he=pe(90493),ve=pe(11592),be=function(){return null},ke=be,Be=["children","value"];function He($n){return(0,ve.Z)($n).map(function(Le){if(!De.isValidElement(Le)||!Le.type)return null;var Ei=Le,Ri=Ei.key,nn=Ei.props,di=nn.children,yi=nn.value,Li=(0,Ne.Z)(nn,Be),Tn=(0,Ge.Z)({key:Ri,value:yi},Li),Un=He(di);return Un.length&&(Tn.children=Un),Tn}).filter(function(Le){return Le})}function We($n){if(!$n)return $n;var Le=(0,Ge.Z)({},$n);return"props"in Le||Object.defineProperty(Le,"props",{get:function(){return(0,Rt.ZP)(!1,"New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."),Le}}),Le}function rt($n,Le,Ei,Ri,nn,di){var yi=null,Li=null;function Tn(){function Un(kt){var $t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"0",Je=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return kt.map(function(qt,vn){var Ft="".concat($t,"-").concat(vn),st=qt[di.value],on=Ei.includes(st),En=Un(qt[di.children]||[],Ft,on),Dn=De.createElement(ke,qt,En.map(function(St){return St.node}));if(Le===st&&(yi=Dn),on){var Jn={pos:Ft,node:Dn,children:En};return Je||Li.push(Jn),Jn}return null}).filter(function(qt){return qt})}Li||(Li=[],Un(Ri),Li.sort(function(kt,$t){var Je=kt.node.props.value,qt=$t.node.props.value,vn=Ei.indexOf(Je),Ft=Ei.indexOf(qt);return vn-Ft}))}Object.defineProperty($n,"triggerNode",{get:function(){return(0,Rt.ZP)(!1,"`triggerNode` is deprecated. Please consider decoupling data with node."),Tn(),yi}}),Object.defineProperty($n,"allCheckedNodes",{get:function(){return(0,Rt.ZP)(!1,"`allCheckedNodes` is deprecated. Please consider decoupling data with node."),Tn(),nn?Li:Li.map(function(kt){var $t=kt.node;return $t})}})}var Qe=function($n,Le,Ei){var Ri=Ei.treeNodeFilterProp,nn=Ei.filterTreeNode,di=Ei.fieldNames,yi=di.children;return De.useMemo(function(){if(!Le||nn===!1)return $n;var Li;if(typeof nn=="function")Li=nn;else{var Tn=Le.toUpperCase();Li=function($t,Je){var qt=Je[Ri];return String(qt).toUpperCase().includes(Tn)}}function Un(kt){var $t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return kt.reduce(function(Je,qt){var vn=qt[yi],Ft=$t||Li(Le,We(qt)),st=Un(vn||[],Ft);return(Ft||st.length)&&Je.push((0,Ge.Z)((0,Ge.Z)({},qt),{},(0,he.Z)({isLeaf:void 0},yi,st))),Je},[])}return Un($n)},[$n,Le,yi,Ri,nn])};function Pt($n){var Le=De.useRef();Le.current=$n;var Ei=De.useCallback(function(){return Le.current.apply(Le,arguments)},[]);return Ei}function Ze($n,Le){var Ei=Le.id,Ri=Le.pId,nn=Le.rootPId,di={},yi=[],Li=$n.map(function(Tn){var Un=(0,Ge.Z)({},Tn),kt=Un[Ei];return di[kt]=Un,Un.key=Un.key||kt,Un});return Li.forEach(function(Tn){var Un=Tn[Ri],kt=di[Un];kt&&(kt.children=kt.children||[],kt.children.push(Tn)),(Un===nn||!kt&&nn===null)&&yi.push(Tn)}),yi}function Et($n,Le,Ei){return De.useMemo(function(){return $n?Ei?Ze($n,(0,Ge.Z)({id:"id",pId:"pId",rootPId:null},Ei!==!0?Ei:{})):$n:He(Le)},[Le,Ei,$n])}var it=De.createContext(null),Dt=it,ht=pe(10228),Ht=pe(80547),_t=pe(43858),Vt=De.createContext(null),ot=Vt;function Ue($n){return Array.isArray($n)?$n:$n!==void 0?[$n]:[]}function Wt($n){var Le=$n||{},Ei=Le.label,Ri=Le.value,nn=Le.children,di=Ri||"value";return{_title:Ei?[Ei]:["title","label"],value:di,key:di,children:nn||"children"}}function Ln($n){return!$n||$n.disabled||$n.disableCheckbox||$n.checkable===!1}function Fn($n,Le){var Ei=[];function Ri(nn){nn.forEach(function(di){var yi=di[Le.children];yi&&(Ei.push(di[Le.value]),Ri(yi))})}return Ri($n),Ei}function Gt($n){return $n==null}var rn={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},An=function(Le,Ei){var Ri=(0,Ct.lk)(),nn=Ri.prefixCls,di=Ri.multiple,yi=Ri.searchValue,Li=Ri.toggleOpen,Tn=Ri.open,Un=Ri.notFoundContent,kt=De.useContext(ot),$t=kt.virtual,Je=kt.listHeight,qt=kt.listItemHeight,vn=kt.treeData,Ft=kt.fieldNames,st=kt.onSelect,on=kt.dropdownMatchSelectWidth,En=kt.treeExpandAction,Dn=De.useContext(Dt),Jn=Dn.checkable,St=Dn.checkedKeys,Nn=Dn.halfCheckedKeys,qn=Dn.treeExpandedKeys,Si=Dn.treeDefaultExpandAll,en=Dn.treeDefaultExpandedKeys,Cn=Dn.onTreeExpand,At=Dn.treeIcon,yn=Dn.showTreeIcon,pn=Dn.switcherIcon,mn=Dn.treeLine,Wn=Dn.treeNodeFilterProp,Hn=Dn.loadData,Qn=Dn.treeLoadedKeys,ii=Dn.treeMotion,ji=Dn.onTreeLoad,cn=Dn.keyEntities,Yi=De.useRef(),$i=(0,Ht.Z)(function(){return vn},[Tn,vn],function(qi,Rr){return Rr[0]&&qi[1]!==Rr[1]}),Wi=De.useState(null),ln=(0,Xe.Z)(Wi,2),oi=ln[0],Bi=ln[1],Gi=cn[oi],Ti=De.useMemo(function(){return Jn?{checked:St,halfChecked:Nn}:null},[Jn,St,Nn]);De.useEffect(function(){if(Tn&&!di&&St.length){var qi;(qi=Yi.current)===null||qi===void 0||qi.scrollTo({key:St[0]}),Bi(St[0])}},[Tn]);var Qi=String(yi).toLowerCase(),gr=function(Rr){return Qi?String(Rr[Wn]).toLowerCase().includes(Qi):!1},hr=De.useState(en),Ki=(0,Xe.Z)(hr,2),Sr=Ki[0],kn=Ki[1],Br=De.useState(null),_n=(0,Xe.Z)(Br,2),Or=_n[0],no=_n[1],br=De.useMemo(function(){return qn?(0,ut.Z)(qn):yi?Or:Sr},[Sr,Or,qn,yi]);De.useEffect(function(){yi&&no(Fn(vn,Ft))},[yi]);var mo=function(Rr){kn(Rr),no(Rr),Cn&&Cn(Rr)},Jr=function(Rr){Rr.preventDefault()},ur=function(Rr,Ii){var tt=Ii.node;Jn&&Ln(tt)||(st(tt.key,{selected:!St.includes(tt.key)}),di||Li(!1))};if(De.useImperativeHandle(Ei,function(){var qi;return{scrollTo:(qi=Yi.current)===null||qi===void 0?void 0:qi.scrollTo,onKeyDown:function(Ii){var tt,Qr=Ii.which;switch(Qr){case ht.Z.UP:case ht.Z.DOWN:case ht.Z.LEFT:case ht.Z.RIGHT:(tt=Yi.current)===null||tt===void 0||tt.onKeyDown(Ii);break;case ht.Z.ENTER:{if(Gi){var lo=(Gi==null?void 0:Gi.node)||{},jr=lo.selectable,vo=lo.value;jr!==!1&&ur(null,{node:{key:oi},selected:!St.includes(vo)})}break}case ht.Z.ESC:Li(!1)}},onKeyUp:function(){}}}),$i.length===0)return De.createElement("div",{role:"listbox",className:"".concat(nn,"-empty"),onMouseDown:Jr},Un);var er={fieldNames:Ft};return Qn&&(er.loadedKeys=Qn),br&&(er.expandedKeys=br),De.createElement("div",{onMouseDown:Jr},Gi&&Tn&&De.createElement("span",{style:rn,"aria-live":"assertive"},Gi.node.value),De.createElement(_t.Z,(0,Ke.Z)({ref:Yi,focusable:!1,prefixCls:"".concat(nn,"-tree"),treeData:$i,height:Je,itemHeight:qt,virtual:$t!==!1&&on!==!1,multiple:di,icon:At,showIcon:yn,switcherIcon:pn,showLine:mn,loadData:yi?null:Hn,motion:ii,activeKey:oi,checkable:Jn,checkStrictly:!0,checkedKeys:Ti,selectedKeys:Jn?[]:St,defaultExpandAll:Si},er,{onActiveChange:Bi,onSelect:ur,onCheck:ur,onExpand:mo,onLoad:ji,filterTreeNode:gr,expandAction:En})))},ni=De.forwardRef(An);ni.displayName="OptionList";var Sn=ni,Yn="SHOW_ALL",It="SHOW_PARENT",wn="SHOW_CHILD";function Gn($n,Le,Ei,Ri){var nn=new Set($n);return Le===wn?$n.filter(function(di){var yi=Ei[di];return!(yi&&yi.children&&yi.children.some(function(Li){var Tn=Li.node;return nn.has(Tn[Ri.value])})&&yi.children.every(function(Li){var Tn=Li.node;return Ln(Tn)||nn.has(Tn[Ri.value])}))}):Le===It?$n.filter(function(di){var yi=Ei[di],Li=yi?yi.parent:null;return!(Li&&!Ln(Li.node)&&nn.has(Li.key))}):$n}function ze($n){var Le=$n.searchPlaceholder,Ei=$n.treeCheckStrictly,Ri=$n.treeCheckable,nn=$n.labelInValue,di=$n.value,yi=$n.multiple;warning(!Le,"`searchPlaceholder` has been removed."),Ei&&nn===!1&&warning(!1,"`treeCheckStrictly` will force set `labelInValue` to `true`."),(nn||Ei)&&warning(toArray(di).every(function(Li){return Li&&_typeof(Li)==="object"&&"value"in Li}),"Invalid prop `value` supplied to `TreeSelect`. You should use { label: string, value: string | number } or [{ label: string, value: string | number }] instead."),Ei||yi||Ri?warning(!di||Array.isArray(di),"`value` should be an array when `TreeSelect` is checkable or multiple."):warning(!Array.isArray(di),"`value` should not be array when `TreeSelect` is single mode.")}var Ee=null,Pe=["id","prefixCls","value","defaultValue","onChange","onSelect","onDeselect","searchValue","inputValue","onSearch","autoClearSearchValue","filterTreeNode","treeNodeFilterProp","showCheckedStrategy","treeNodeLabelProp","multiple","treeCheckable","treeCheckStrictly","labelInValue","fieldNames","treeDataSimpleMode","treeData","children","loadData","treeLoadedKeys","onTreeLoad","treeDefaultExpandAll","treeExpandedKeys","treeDefaultExpandedKeys","onTreeExpand","treeExpandAction","virtual","listHeight","listItemHeight","onDropdownVisibleChange","dropdownMatchSelectWidth","treeLine","treeIcon","showTreeIcon","switcherIcon","treeMotion"];function Fe($n){return!$n||(0,Tt.Z)($n)!=="object"}var Ae=De.forwardRef(function($n,Le){var Ei=$n.id,Ri=$n.prefixCls,nn=Ri===void 0?"rc-tree-select":Ri,di=$n.value,yi=$n.defaultValue,Li=$n.onChange,Tn=$n.onSelect,Un=$n.onDeselect,kt=$n.searchValue,$t=$n.inputValue,Je=$n.onSearch,qt=$n.autoClearSearchValue,vn=qt===void 0?!0:qt,Ft=$n.filterTreeNode,st=$n.treeNodeFilterProp,on=st===void 0?"value":st,En=$n.showCheckedStrategy,Dn=$n.treeNodeLabelProp,Jn=$n.multiple,St=$n.treeCheckable,Nn=$n.treeCheckStrictly,qn=$n.labelInValue,Si=$n.fieldNames,en=$n.treeDataSimpleMode,Cn=$n.treeData,At=$n.children,yn=$n.loadData,pn=$n.treeLoadedKeys,mn=$n.onTreeLoad,Wn=$n.treeDefaultExpandAll,Hn=$n.treeExpandedKeys,Qn=$n.treeDefaultExpandedKeys,ii=$n.onTreeExpand,ji=$n.treeExpandAction,cn=$n.virtual,Yi=$n.listHeight,$i=Yi===void 0?200:Yi,Wi=$n.listItemHeight,ln=Wi===void 0?20:Wi,oi=$n.onDropdownVisibleChange,Bi=$n.dropdownMatchSelectWidth,Gi=Bi===void 0?!0:Bi,Ti=$n.treeLine,Qi=$n.treeIcon,gr=$n.showTreeIcon,hr=$n.switcherIcon,Ki=$n.treeMotion,Sr=(0,Ne.Z)($n,Pe),kn=(0,Ve.ZP)(Ei),Br=St&&!Nn,_n=St||Nn,Or=Nn||qn,no=_n||Jn,br=(0,dt.Z)(yi,{value:di}),mo=(0,Xe.Z)(br,2),Jr=mo[0],ur=mo[1],er=De.useMemo(function(){return St?En||wn:Yn},[En,St]),qi=De.useMemo(function(){return Wt(Si)},[JSON.stringify(Si)]),Rr=(0,dt.Z)("",{value:kt!==void 0?kt:$t,postState:function(cr){return cr||""}}),Ii=(0,Xe.Z)(Rr,2),tt=Ii[0],Qr=Ii[1],lo=function(cr){Qr(cr),Je==null||Je(cr)},jr=Et(Cn,At,en),vo=se(jr,qi),po=vo.keyEntities,Lr=vo.valueEntities,Fr=De.useCallback(function(rr){var cr=[],xr=[];return rr.forEach(function(Gr){Lr.has(Gr)?xr.push(Gr):cr.push(Gr)}),{missingRawValues:cr,existRawValues:xr}},[Lr]),uo=Qe(jr,tt,{fieldNames:qi,treeNodeFilterProp:on,filterTreeNode:Ft}),qr=De.useCallback(function(rr){if(rr){if(Dn)return rr[Dn];for(var cr=qi._title,xr=0;xr<cr.length;xr+=1){var Gr=rr[cr[xr]];if(Gr!==void 0)return Gr}}},[qi,Dn]),zo=De.useCallback(function(rr){var cr=Ue(rr);return cr.map(function(xr){return Fe(xr)?{value:xr}:xr})},[]),Ro=De.useCallback(function(rr){var cr=zo(rr);return cr.map(function(xr){var Gr=xr.label,vr=xr.value,kr=xr.halfChecked,Zr,Oi=Lr.get(vr);if(Oi){var sa;Gr=(sa=Gr)!==null&&sa!==void 0?sa:qr(Oi.node),Zr=Oi.node.disabled}else if(Gr===void 0){var Ra=zo(Jr).find(function(Ls){return Ls.value===vr});Gr=Ra.label}return{label:Gr,value:vr,halfChecked:kr,disabled:Zr}})},[Lr,qr,zo,Jr]),Mr=De.useMemo(function(){return zo(Jr)},[zo,Jr]),Nr=De.useMemo(function(){var rr=[],cr=[];return Mr.forEach(function(xr){xr.halfChecked?cr.push(xr):rr.push(xr)}),[rr,cr]},[Mr]),fi=(0,Xe.Z)(Nr,2),Tr=fi[0],Bo=fi[1],aa=De.useMemo(function(){return Tr.map(function(rr){return rr.value})},[Tr]),Ho=ee(Tr,Bo,Br,po),Ao=(0,Xe.Z)(Ho,2),_o=Ao[0],ta=Ao[1],Ea=De.useMemo(function(){var rr=Gn(_o,er,po,qi),cr=rr.map(function(kr){var Zr,Oi,sa;return(Zr=(Oi=po[kr])===null||Oi===void 0||(sa=Oi.node)===null||sa===void 0?void 0:sa[qi.value])!==null&&Zr!==void 0?Zr:kr}),xr=cr.map(function(kr){var Zr=Tr.find(function(Oi){return Oi.value===kr});return{value:kr,label:Zr==null?void 0:Zr.label}}),Gr=Ro(xr),vr=Gr[0];return!no&&vr&&Gt(vr.value)&&Gt(vr.label)?[]:Gr.map(function(kr){var Zr;return(0,Ge.Z)((0,Ge.Z)({},kr),{},{label:(Zr=kr.label)!==null&&Zr!==void 0?Zr:kr.value})})},[qi,no,_o,Tr,Ro,er,po]),Mt=ne(Ea),Pi=(0,Xe.Z)(Mt,1),Ut=Pi[0],Ui=Pt(function(rr,cr,xr){var Gr=Ro(rr);if(ur(Gr),vn&&Qr(""),Li){var vr=rr;if(Br){var kr=Gn(rr,er,po,qi);vr=kr.map(function(Ba){var zs=Lr.get(Ba);return zs?zs.node[qi.value]:Ba})}var Zr=cr||{triggerValue:void 0,selected:void 0},Oi=Zr.triggerValue,sa=Zr.selected,Ra=vr;if(Nn){var Ls=Bo.filter(function(Ba){return!vr.includes(Ba.value)});Ra=[].concat((0,ut.Z)(Ra),(0,ut.Z)(Ls))}var Ys=Ro(Ra),tl={preValue:Tr,triggerValue:Oi},Vi=!0;(Nn||xr==="selection"&&!sa)&&(Vi=!1),rt(tl,Oi,rr,jr,Vi,qi),_n?tl.checked=sa:tl.selected=sa;var La=Or?Ys:Ys.map(function(Ba){return Ba.value});Li(no?La:La[0],Or?null:Ys.map(function(Ba){return Ba.label}),tl)}}),wi=De.useCallback(function(rr,cr){var xr,Gr=cr.selected,vr=cr.source,kr=po[rr],Zr=kr==null?void 0:kr.node,Oi=(xr=Zr==null?void 0:Zr[qi.value])!==null&&xr!==void 0?xr:rr;if(!no)Ui([Oi],{selected:!0,triggerValue:Oi},"option");else{var sa=Gr?[].concat((0,ut.Z)(aa),[Oi]):_o.filter(function(zs){return zs!==Oi});if(Br){var Ra=Fr(sa),Ls=Ra.missingRawValues,Ys=Ra.existRawValues,tl=Ys.map(function(zs){return Lr.get(zs).key}),Vi;if(Gr){var La=(0,Lt.S)(tl,!0,po);Vi=La.checkedKeys}else{var Ba=(0,Lt.S)(tl,{checked:!1,halfCheckedKeys:ta},po);Vi=Ba.checkedKeys}sa=[].concat((0,ut.Z)(Ls),(0,ut.Z)(Vi.map(function(zs){return po[zs].node[qi.value]})))}Ui(sa,{selected:Gr,triggerValue:Oi},vr||"option")}Gr||!no?Tn==null||Tn(Oi,We(Zr)):Un==null||Un(Oi,We(Zr))},[Fr,Lr,po,qi,no,aa,Ui,Br,Tn,Un,_o,ta]),yr=De.useCallback(function(rr){if(oi){var cr={};Object.defineProperty(cr,"documentClickClose",{get:function(){return(0,Rt.ZP)(!1,"Second param of `onDropdownVisibleChange` has been removed."),!1}}),oi(rr,cr)}},[oi]),Zi=Pt(function(rr,cr){var xr=rr.map(function(Gr){return Gr.value});if(cr.type==="clear"){Ui(xr,{},"selection");return}cr.values.length&&wi(cr.values[0].value,{selected:!1,source:"selection"})}),Ci=De.useMemo(function(){return{virtual:cn,dropdownMatchSelectWidth:Gi,listHeight:$i,listItemHeight:ln,treeData:uo,fieldNames:qi,onSelect:wi,treeExpandAction:ji}},[cn,Gi,$i,ln,uo,qi,wi,ji]),nr=De.useMemo(function(){return{checkable:_n,loadData:yn,treeLoadedKeys:pn,onTreeLoad:mn,checkedKeys:_o,halfCheckedKeys:ta,treeDefaultExpandAll:Wn,treeExpandedKeys:Hn,treeDefaultExpandedKeys:Qn,onTreeExpand:ii,treeIcon:Qi,treeMotion:Ki,showTreeIcon:gr,switcherIcon:hr,treeLine:Ti,treeNodeFilterProp:on,keyEntities:po}},[_n,yn,pn,mn,_o,ta,Wn,Hn,Qn,ii,Qi,Ki,gr,hr,Ti,on,po]);return De.createElement(ot.Provider,{value:Ci},De.createElement(Dt.Provider,{value:nr},De.createElement(Ct.Ac,(0,Ke.Z)({ref:Le},Sr,{id:kn,prefixCls:nn,mode:no?"multiple":void 0,displayValues:Ut,onDisplayValuesChange:Zi,searchValue:tt,onSearch:lo,OptionList:Sn,emptyOptions:!jr.length,onDropdownVisibleChange:yr,dropdownMatchSelectWidth:Gi}))))}),ye=Ae;ye.TreeNode=ke,ye.SHOW_ALL=Yn,ye.SHOW_PARENT=It,ye.SHOW_CHILD=wn;var qe=ye,vt=qe,et=pe(2738),Ye=pe(53487),xt=pe(62892),yt=pe(19080),at=pe(36355),zt=pe(1684),un=pe(93891),fn=pe(19716),Qt=pe(32441),Kn=pe(14154),On=pe(58582),jt=pe(84443),sn=pe(66339),jn=pe(33234),dn=pe(71997),Pn=pe(98447),ui=pe(37613),pi=pe(83116),gi=pe(20648);const bi=$n=>{const{componentCls:Le,treePrefixCls:Ei,colorBgElevated:Ri}=$n,nn=`.${Ei}`;return[{[`${Le}-dropdown`]:[{padding:`${$n.paddingXS}px ${$n.paddingXS/2}px`},(0,gi.Yk)(Ei,(0,ui.TS)($n,{colorBgContainer:Ri})),{[nn]:{borderRadius:0,[`${nn}-list-holder-inner`]:{alignItems:"stretch",[`${nn}-treenode`]:{[`${nn}-node-content-wrapper`]:{flex:"auto"}}}}},(0,Pn.C2)(`${Ei}-checkbox`,$n),{"&-rtl":{direction:"rtl",[`${nn}-switcher${nn}-switcher_close`]:{[`${nn}-switcher-icon svg`]:{transform:"rotate(90deg)"}}}}]}]};function Xi($n,Le){return(0,pi.Z)("TreeSelect",Ei=>{const Ri=(0,ui.TS)(Ei,{treePrefixCls:Le});return[bi(Ri)]},gi.TM)($n)}var ar=function($n,Le){var Ei={};for(var Ri in $n)Object.prototype.hasOwnProperty.call($n,Ri)&&Le.indexOf(Ri)<0&&(Ei[Ri]=$n[Ri]);if($n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nn=0,Ri=Object.getOwnPropertySymbols($n);nn<Ri.length;nn++)Le.indexOf(Ri[nn])<0&&Object.prototype.propertyIsEnumerable.call($n,Ri[nn])&&(Ei[Ri[nn]]=$n[Ri[nn]]);return Ei};const Ji=($n,Le)=>{var Ei,{prefixCls:Ri,size:nn,disabled:di,bordered:yi=!0,className:Li,rootClassName:Tn,treeCheckable:Un,multiple:kt,listHeight:$t=256,listItemHeight:Je=26,placement:qt,notFoundContent:vn,switcherIcon:Ft,treeLine:st,getPopupContainer:on,popupClassName:En,dropdownClassName:Dn,treeIcon:Jn=!1,transitionName:St,choiceTransitionName:Nn="",status:qn,treeExpandAction:Si,builtinPlacements:en,dropdownMatchSelectWidth:Cn,popupMatchSelectWidth:At,allowClear:yn}=$n,pn=ar($n,["prefixCls","size","disabled","bordered","className","rootClassName","treeCheckable","multiple","listHeight","listItemHeight","placement","notFoundContent","switcherIcon","treeLine","getPopupContainer","popupClassName","dropdownClassName","treeIcon","transitionName","choiceTransitionName","status","treeExpandAction","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","allowClear"]);const{getPopupContainer:mn,getPrefixCls:Wn,renderEmpty:Hn,direction:Qn,virtual:ii,popupMatchSelectWidth:ji,popupOverflow:cn}=De.useContext(at.E_),Yi=Wn(),$i=Wn("select",Ri),Wi=Wn("select-tree",Ri),ln=Wn("tree-select",Ri),{compactSize:oi,compactItemClassnames:Bi}=(0,jn.ri)($i,Qn),[Gi,Ti]=(0,Kn.Z)($i),[Qi]=Xi(ln,Wi),gr=Oe()(En||Dn,`${ln}-dropdown`,{[`${ln}-dropdown-rtl`]:Qn==="rtl"},Tn,Ti),hr=!!(Un||kt),Ki=(0,jt.Z)(pn.suffixIcon,pn.showArrow),Sr=(Ei=At!=null?At:Cn)!==null&&Ei!==void 0?Ei:ji,{status:kn,hasFeedback:Br,isFormItemInput:_n,feedbackIcon:Or}=De.useContext(Qt.aM),no=(0,yt.F)(kn,qn),{suffixIcon:br,removeIcon:mo,clearIcon:Jr}=(0,sn.Z)(Object.assign(Object.assign({},pn),{multiple:hr,showSuffixIcon:Ki,hasFeedback:Br,feedbackIcon:Or,prefixCls:$i,componentName:"TreeSelect"})),ur=yn===!0?{clearIcon:Jr}:yn;let er;vn!==void 0?er=vn:er=(Hn==null?void 0:Hn("Select"))||De.createElement(un.Z,{componentName:"Select"});const qi=(0,et.Z)(pn,["suffixIcon","itemIcon","removeIcon","clearIcon","switcherIcon"]),Rr=De.useMemo(()=>qt!==void 0?qt:Qn==="rtl"?"bottomRight":"bottomLeft",[qt,Qn]),Ii=(0,On.Z)(en,cn),tt=(0,fn.Z)(Lr=>{var Fr;return(Fr=nn!=null?nn:oi)!==null&&Fr!==void 0?Fr:Lr}),Qr=De.useContext(zt.Z),lo=di!=null?di:Qr,jr=Oe()(!Ri&&ln,{[`${$i}-lg`]:tt==="large",[`${$i}-sm`]:tt==="small",[`${$i}-rtl`]:Qn==="rtl",[`${$i}-borderless`]:!yi,[`${$i}-in-form-item`]:_n},(0,yt.Z)($i,no,Br),Bi,Li,Tn,Ti),vo=Lr=>De.createElement(dn.Z,{prefixCls:Wi,switcherIcon:Ft,treeNodeProps:Lr,showLine:st}),po=De.createElement(vt,Object.assign({virtual:ii,disabled:lo},qi,{dropdownMatchSelectWidth:Sr,builtinPlacements:Ii,ref:Le,prefixCls:$i,className:jr,listHeight:$t,listItemHeight:Je,treeCheckable:Un&&De.createElement("span",{className:`${$i}-tree-checkbox-inner`}),treeLine:!!st,suffixIcon:br,multiple:hr,placement:Rr,removeIcon:mo,allowClear:ur,switcherIcon:vo,showTreeIcon:Jn,notFoundContent:er,getPopupContainer:on||mn,treeMotion:null,dropdownClassName:gr,choiceTransitionName:(0,xt.m)(Yi,"",Nn),transitionName:(0,xt.m)(Yi,"slide-up",St),treeExpandAction:Si}));return Gi(Qi(po))},mr=De.forwardRef(Ji),Hi=(0,Ye.Z)(mr);mr.TreeNode=ke,mr.SHOW_ALL=Yn,mr.SHOW_PARENT=It,mr.SHOW_CHILD=wn,mr._InternalPanelDoNotUseOrYouWillBeFired=Hi;var Er=mr},17574:function(Vn,xn,pe){"use strict";pe.d(xn,{default:function(){return ot}});var ge=pe(43858),Oe=pe(19127),Ke=pe(52671),ut=pe(8657),Ge=pe(96663),Xe=pe(59301),Ne={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"},Tt=Ne,Ct=pe(7657),Ve=function(Wt,Ln){return Xe.createElement(Ct.Z,(0,Ge.Z)({},Wt,{ref:Ln,icon:Tt}))},Lt=Xe.forwardRef(Ve),dt=Lt,Rt=pe(92310),De=pe.n(Rt),ne=pe(35654),ee=pe(71430),ce=pe(36355),se=pe(56082),he=pe(62892),ve=pe(20648);const be=4;function ke(Ue){const{dropPosition:Wt,dropLevelOffset:Ln,prefixCls:Fn,indent:Gt,direction:rn="ltr"}=Ue,An=rn==="ltr"?"left":"right",ni=rn==="ltr"?"right":"left",Sn={[An]:-Ln*Gt+be,[ni]:0};switch(Wt){case-1:Sn.top=-3;break;case 1:Sn.bottom=-3;break;default:Sn.bottom=-3,Sn[An]=Gt+be;break}return Xe.createElement("div",{style:Sn,className:`${Fn}-drop-indicator`})}var Be=pe(71997),We=Xe.forwardRef((Ue,Wt)=>{const{getPrefixCls:Ln,direction:Fn,virtual:Gt,tree:rn}=Xe.useContext(ce.E_),{prefixCls:An,className:ni,showIcon:Sn=!1,showLine:Yn,switcherIcon:It,blockNode:wn=!1,children:Gn,checkable:ze=!1,selectable:Ee=!0,draggable:Pe,motion:Fe,style:Ae}=Ue,ye=Ln("tree",An),qe=Ln(),vt=Fe!=null?Fe:Object.assign(Object.assign({},(0,he.Z)(qe)),{motionAppear:!1}),et=Object.assign(Object.assign({},Ue),{checkable:ze,selectable:Ee,showIcon:Sn,motion:vt,blockNode:wn,showLine:!!Yn,dropIndicatorRender:ke}),[Ye,xt]=(0,ve.ZP)(ye),yt=Xe.useMemo(()=>{if(!Pe)return!1;let zt={};switch(typeof Pe){case"function":zt.nodeDraggable=Pe;break;case"object":zt=Object.assign({},Pe);break;default:break}return zt.icon!==!1&&(zt.icon=zt.icon||Xe.createElement(se.Z,null)),zt},[Pe]),at=zt=>Xe.createElement(Be.Z,{prefixCls:ye,switcherIcon:It,treeNodeProps:zt,showLine:Yn});return Ye(Xe.createElement(ge.Z,Object.assign({itemHeight:20,ref:Wt,virtual:Gt},et,{style:Object.assign(Object.assign({},rn==null?void 0:rn.style),Ae),prefixCls:ye,className:De()({[`${ye}-icon-hide`]:!Sn,[`${ye}-block-node`]:wn,[`${ye}-unselectable`]:!Ee,[`${ye}-rtl`]:Fn==="rtl"},rn==null?void 0:rn.className,ni,xt),direction:Fn,checkable:ze&&Xe.createElement("span",{className:`${ye}-checkbox-inner`}),selectable:Ee,switcherIcon:at,draggable:yt}),Gn))}),rt;(function(Ue){Ue[Ue.None=0]="None",Ue[Ue.Start=1]="Start",Ue[Ue.End=2]="End"})(rt||(rt={}));function Qe(Ue,Wt){function Ln(Fn){const{key:Gt,children:rn}=Fn;Wt(Gt,Fn)!==!1&&Qe(rn||[],Wt)}Ue.forEach(Ln)}function Pt(Ue){let{treeData:Wt,expandedKeys:Ln,startKey:Fn,endKey:Gt}=Ue;const rn=[];let An=rt.None;if(Fn&&Fn===Gt)return[Fn];if(!Fn||!Gt)return[];function ni(Sn){return Sn===Fn||Sn===Gt}return Qe(Wt,Sn=>{if(An===rt.End)return!1;if(ni(Sn)){if(rn.push(Sn),An===rt.None)An=rt.Start;else if(An===rt.Start)return An=rt.End,!1}else An===rt.Start&&rn.push(Sn);return Ln.includes(Sn)}),rn}function Ze(Ue,Wt){const Ln=(0,Oe.Z)(Wt),Fn=[];return Qe(Ue,(Gt,rn)=>{const An=Ln.indexOf(Gt);return An!==-1&&(Fn.push(rn),Ln.splice(An,1)),!!Ln.length}),Fn}var Et=function(Ue,Wt){var Ln={};for(var Fn in Ue)Object.prototype.hasOwnProperty.call(Ue,Fn)&&Wt.indexOf(Fn)<0&&(Ln[Fn]=Ue[Fn]);if(Ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Gt=0,Fn=Object.getOwnPropertySymbols(Ue);Gt<Fn.length;Gt++)Wt.indexOf(Fn[Gt])<0&&Object.prototype.propertyIsEnumerable.call(Ue,Fn[Gt])&&(Ln[Fn[Gt]]=Ue[Fn[Gt]]);return Ln};function it(Ue){const{isLeaf:Wt,expanded:Ln}=Ue;return Wt?Xe.createElement(Ke.Z,null):Ln?Xe.createElement(ut.Z,null):Xe.createElement(dt,null)}function Dt(Ue){let{treeData:Wt,children:Ln}=Ue;return Wt||(0,ee.zn)(Ln)}const ht=(Ue,Wt)=>{var{defaultExpandAll:Ln,defaultExpandParent:Fn,defaultExpandedKeys:Gt}=Ue,rn=Et(Ue,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const An=Xe.useRef(),ni=Xe.useRef(),Sn=()=>{const{keyEntities:yt}=(0,ee.I8)(Dt(rn));let at;return Ln?at=Object.keys(yt):Fn?at=(0,ne.r7)(rn.expandedKeys||Gt||[],yt):at=rn.expandedKeys||Gt,at},[Yn,It]=Xe.useState(rn.selectedKeys||rn.defaultSelectedKeys||[]),[wn,Gn]=Xe.useState(()=>Sn());Xe.useEffect(()=>{"selectedKeys"in rn&&It(rn.selectedKeys)},[rn.selectedKeys]),Xe.useEffect(()=>{"expandedKeys"in rn&&Gn(rn.expandedKeys)},[rn.expandedKeys]);const ze=(yt,at)=>{var zt;return"expandedKeys"in rn||Gn(yt),(zt=rn.onExpand)===null||zt===void 0?void 0:zt.call(rn,yt,at)},Ee=(yt,at)=>{var zt;const{multiple:un}=rn,{node:fn,nativeEvent:Qt}=at,{key:Kn=""}=fn,On=Dt(rn),jt=Object.assign(Object.assign({},at),{selected:!0}),sn=(Qt==null?void 0:Qt.ctrlKey)||(Qt==null?void 0:Qt.metaKey),jn=Qt==null?void 0:Qt.shiftKey;let dn;un&&sn?(dn=yt,An.current=Kn,ni.current=dn,jt.selectedNodes=Ze(On,dn)):un&&jn?(dn=Array.from(new Set([].concat((0,Oe.Z)(ni.current||[]),(0,Oe.Z)(Pt({treeData:On,expandedKeys:wn,startKey:Kn,endKey:An.current}))))),jt.selectedNodes=Ze(On,dn)):(dn=[Kn],An.current=Kn,ni.current=dn,jt.selectedNodes=Ze(On,dn)),(zt=rn.onSelect)===null||zt===void 0||zt.call(rn,dn,jt),"selectedKeys"in rn||It(dn)},{getPrefixCls:Pe,direction:Fe}=Xe.useContext(ce.E_),{prefixCls:Ae,className:ye,showIcon:qe=!0,expandAction:vt="click"}=rn,et=Et(rn,["prefixCls","className","showIcon","expandAction"]),Ye=Pe("tree",Ae),xt=De()(`${Ye}-directory`,{[`${Ye}-directory-rtl`]:Fe==="rtl"},ye);return Xe.createElement(We,Object.assign({icon:it,ref:Wt,blockNode:!0},et,{showIcon:qe,expandAction:vt,prefixCls:Ye,className:xt,expandedKeys:wn,selectedKeys:Yn,onSelect:Ee,onExpand:ze}))};var _t=Xe.forwardRef(ht);const Vt=We;Vt.DirectoryTree=_t,Vt.TreeNode=ge.O;var ot=Vt},20648:function(Vn,xn,pe){"use strict";pe.d(xn,{TM:function(){return Rt},Yk:function(){return dt}});var ge=pe(93083),Oe=pe(98447),Ke=pe(17313),ut=pe(8378),Ge=pe(37613),Xe=pe(83116);const Ne=new ge.Keyframes("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),Tt=(De,ne)=>({[`.${De}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${ne.motionDurationSlow}`}}}),Ct=(De,ne)=>({[`.${De}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:ne.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${ne.lineWidthBold}px solid ${ne.colorPrimary}`,borderRadius:"50%",content:'""'}}}),Ve=(De,ne)=>{const{treeCls:ee,treeNodeCls:ce,treeNodePadding:se,titleHeight:he,nodeSelectedBg:ve,nodeHoverBg:be}=ne,ke=ne.paddingXS;return{[ee]:Object.assign(Object.assign({},(0,Ke.Wf)(ne)),{background:ne.colorBgContainer,borderRadius:ne.borderRadius,transition:`background-color ${ne.motionDurationSlow}`,[`&${ee}-rtl`]:{[`${ee}-switcher`]:{"&_close":{[`${ee}-switcher-icon`]:{svg:{transform:"rotate(90deg)"}}}}},[`&-focused:not(:hover):not(${ee}-active-focused)`]:Object.assign({},(0,Ke.oN)(ne)),[`${ee}-list-holder-inner`]:{alignItems:"flex-start"},[`&${ee}-block-node`]:{[`${ee}-list-holder-inner`]:{alignItems:"stretch",[`${ee}-node-content-wrapper`]:{flex:"auto"},[`${ce}.dragging`]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:se,insetInlineStart:0,border:`1px solid ${ne.colorPrimary}`,opacity:0,animationName:Ne,animationDuration:ne.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},[`${ce}`]:{display:"flex",alignItems:"flex-start",padding:`0 0 ${se}px 0`,outline:"none","&-rtl":{direction:"rtl"},"&-disabled":{[`${ee}-node-content-wrapper`]:{color:ne.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}}},[`&-active ${ee}-node-content-wrapper`]:Object.assign({},(0,Ke.oN)(ne)),[`&:not(${ce}-disabled).filter-node ${ee}-title`]:{color:"inherit",fontWeight:500},"&-draggable":{[`${ee}-draggable-icon`]:{flexShrink:0,width:he,lineHeight:`${he}px`,textAlign:"center",visibility:"visible",opacity:.2,transition:`opacity ${ne.motionDurationSlow}`,[`${ce}:hover &`]:{opacity:.45}},[`&${ce}-disabled`]:{[`${ee}-draggable-icon`]:{visibility:"hidden"}}}},[`${ee}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:he}},[`${ee}-draggable-icon`]:{visibility:"hidden"},[`${ee}-switcher`]:Object.assign(Object.assign({},Tt(De,ne)),{position:"relative",flex:"none",alignSelf:"stretch",width:he,margin:0,lineHeight:`${he}px`,textAlign:"center",cursor:"pointer",userSelect:"none","&-noop":{cursor:"default"},"&_close":{[`${ee}-switcher-icon`]:{svg:{transform:"rotate(-90deg)"}}},"&-loading-icon":{color:ne.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:he/2,bottom:-se,marginInlineStart:-1,borderInlineEnd:`1px solid ${ne.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:he/2*.8,height:he/2,borderBottom:`1px solid ${ne.colorBorder}`,content:'""'}}}),[`${ee}-checkbox`]:{top:"initial",marginInlineEnd:ke},[`${ee}-node-content-wrapper, ${ee}-checkbox + span`]:{position:"relative",zIndex:"auto",minHeight:he,margin:0,padding:`0 ${ne.paddingXS/2}px`,color:"inherit",lineHeight:`${he}px`,background:"transparent",borderRadius:ne.borderRadius,cursor:"pointer",transition:`all ${ne.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,"&:hover":{backgroundColor:be},[`&${ee}-node-selected`]:{backgroundColor:ve},[`${ee}-iconEle`]:{display:"inline-block",width:he,height:he,lineHeight:`${he}px`,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${ee}-unselectable ${ee}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${ee}-node-content-wrapper`]:Object.assign({lineHeight:`${he}px`,userSelect:"none"},Ct(De,ne)),[`${ce}.drop-container`]:{"> [draggable]":{boxShadow:`0 0 0 2px ${ne.colorPrimary}`}},"&-show-line":{[`${ee}-indent`]:{"&-unit":{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:he/2,bottom:-se,borderInlineEnd:`1px solid ${ne.colorBorder}`,content:'""'},"&-end":{"&:before":{display:"none"}}}},[`${ee}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${ce}-leaf-last`]:{[`${ee}-switcher`]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:`${he/2}px !important`}}}}})}},Lt=De=>{const{treeCls:ne,treeNodeCls:ee,treeNodePadding:ce,directoryNodeSelectedBg:se,directoryNodeSelectedColor:he}=De;return{[`${ne}${ne}-directory`]:{[ee]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:ce,insetInlineStart:0,transition:`background-color ${De.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:De.controlItemBgHover}},"> *":{zIndex:1},[`${ne}-switcher`]:{transition:`color ${De.motionDurationMid}`},[`${ne}-node-content-wrapper`]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},[`&${ne}-node-selected`]:{color:he,background:"transparent"}},"&-selected":{"\n &:hover::before,\n &::before\n ":{background:se},[`${ne}-switcher`]:{color:he},[`${ne}-node-content-wrapper`]:{color:he,background:"transparent"}}}}}},dt=(De,ne)=>{const ee=`.${De}`,ce=`${ee}-treenode`,se=ne.paddingXS/2,he=(0,Ge.TS)(ne,{treeCls:ee,treeNodeCls:ce,treeNodePadding:se});return[Ve(De,he),Lt(he)]},Rt=De=>{const{controlHeightSM:ne}=De;return{titleHeight:ne,nodeHoverBg:De.controlItemBgHover,nodeSelectedBg:De.controlItemBgActive}};xn.ZP=(0,Xe.Z)("Tree",(De,ne)=>{let{prefixCls:ee}=ne;return[{[De.componentCls]:(0,Oe.C2)(`${ee}-checkbox`,De)},dt(ee,De),(0,ut.Z)(De)]},De=>{const{colorTextLightSolid:ne,colorPrimary:ee}=De;return Object.assign(Object.assign({},Rt(De)),{directoryNodeSelectedColor:ne,directoryNodeSelectedBg:ee})})},71997:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return ce}});var ge=pe(96663),Oe=pe(59301),Ke={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"},ut=Ke,Ge=pe(7657),Xe=function(he,ve){return Oe.createElement(Ge.Z,(0,ge.Z)({},he,{ref:ve,icon:ut}))},Ne=Oe.forwardRef(Xe),Tt=Ne,Ct=pe(52671),Ve=pe(58617),Lt=pe(15075),dt=pe(43531),Rt=pe(92310),De=pe.n(Rt),ne=pe(92343),ce=se=>{const{prefixCls:he,switcherIcon:ve,treeNodeProps:be,showLine:ke}=se,{isLeaf:Be,expanded:He,loading:We}=be;if(We)return Oe.createElement(Ve.Z,{className:`${he}-switcher-loading-icon`});let rt;if(ke&&typeof ke=="object"&&(rt=ke.showLeafIcon),Be){if(!ke)return null;if(typeof rt!="boolean"&&rt){const Ze=typeof rt=="function"?rt(be):rt,Et=`${he}-switcher-line-custom-icon`;return(0,ne.l$)(Ze)?(0,ne.Tm)(Ze,{className:De()(Ze.props.className||"",Et)}):Ze}return rt?Oe.createElement(Ct.Z,{className:`${he}-switcher-line-icon`}):Oe.createElement("span",{className:`${he}-switcher-leaf-line`})}const Qe=`${he}-switcher-icon`,Pt=typeof ve=="function"?ve(be):ve;return(0,ne.l$)(Pt)?(0,ne.Tm)(Pt,{className:De()(Pt.props.className||"",Qe)}):Pt!==void 0?Pt:ke?He?Oe.createElement(Lt.Z,{className:`${he}-switcher-line-icon`}):Oe.createElement(dt.Z,{className:`${he}-switcher-line-icon`}):Oe.createElement(Tt,{className:Qe})}},54580:function(Vn,xn,pe){"use strict";pe.d(xn,{default:function(){return Cn}});var ge=pe(59301),Oe=pe(19127),Ke=pe(92310),ut=pe.n(Ke),Ge=pe(96663),Xe=pe(52884),Ne=pe(95727),Tt=pe(65711),Ct=pe(85745),Ve=pe(90493),Lt=pe(6620),dt=pe(49581),Rt=pe(20135),De=pe(73324),ne=pe(26112);function ee(At,yn){var pn="cannot ".concat(At.method," ").concat(At.action," ").concat(yn.status,"'"),mn=new Error(pn);return mn.status=yn.status,mn.method=At.method,mn.url=At.action,mn}function ce(At){var yn=At.responseText||At.response;if(!yn)return yn;try{return JSON.parse(yn)}catch(pn){return yn}}function se(At){var yn=new XMLHttpRequest;At.onProgress&&yn.upload&&(yn.upload.onprogress=function(Hn){Hn.total>0&&(Hn.percent=Hn.loaded/Hn.total*100),At.onProgress(Hn)});var pn=new FormData;At.data&&Object.keys(At.data).forEach(function(Wn){var Hn=At.data[Wn];if(Array.isArray(Hn)){Hn.forEach(function(Qn){pn.append("".concat(Wn,"[]"),Qn)});return}pn.append(Wn,Hn)}),At.file instanceof Blob?pn.append(At.filename,At.file,At.file.name):pn.append(At.filename,At.file),yn.onerror=function(Hn){At.onError(Hn)},yn.onload=function(){return yn.status<200||yn.status>=300?At.onError(ee(At,yn),ce(yn)):At.onSuccess(ce(yn),yn)},yn.open(At.method,At.action,!0),At.withCredentials&&"withCredentials"in yn&&(yn.withCredentials=!0);var mn=At.headers||{};return mn["X-Requested-With"]!==null&&yn.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(mn).forEach(function(Wn){mn[Wn]!==null&&yn.setRequestHeader(Wn,mn[Wn])}),yn.send(pn),{abort:function(){yn.abort()}}}var he=+new Date,ve=0;function be(){return"rc-upload-".concat(he,"-").concat(++ve)}var ke=pe(48736),Be=function(At,yn){if(At&&yn){var pn=Array.isArray(yn)?yn:yn.split(","),mn=At.name||"",Wn=At.type||"",Hn=Wn.replace(/\/.*$/,"");return pn.some(function(Qn){var ii=Qn.trim();if(/^\*(\/\*)?$/.test(Qn))return!0;if(ii.charAt(0)==="."){var ji=mn.toLowerCase(),cn=ii.toLowerCase(),Yi=[cn];return(cn===".jpg"||cn===".jpeg")&&(Yi=[".jpg",".jpeg"]),Yi.some(function($i){return ji.endsWith($i)})}return/\/\*$/.test(ii)?Hn===ii.replace(/\/.*$/,""):Wn===ii?!0:/^\w+$/.test(ii)?((0,ke.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(ii,"'.Skip for check.")),!0):!1})}return!0};function He(At,yn){var pn=At.createReader(),mn=[];function Wn(){pn.readEntries(function(Hn){var Qn=Array.prototype.slice.apply(Hn);mn=mn.concat(Qn);var ii=!Qn.length;ii?yn(mn):Wn()})}Wn()}var We=function(yn,pn,mn){var Wn=function Hn(Qn,ii){Qn&&(Qn.path=ii||"",Qn.isFile?Qn.file(function(ji){mn(ji)&&(Qn.fullPath&&!ji.webkitRelativePath&&(Object.defineProperties(ji,{webkitRelativePath:{writable:!0}}),ji.webkitRelativePath=Qn.fullPath.replace(/^\//,""),Object.defineProperties(ji,{webkitRelativePath:{writable:!1}})),pn([ji]))}):Qn.isDirectory&&He(Qn,function(ji){ji.forEach(function(cn){Hn(cn,"".concat(ii).concat(Qn.name,"/"))})}))};yn.forEach(function(Hn){Wn(Hn.webkitGetAsEntry())})},rt=We,Qe=["component","prefixCls","className","disabled","id","style","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"],Pt=function(At){(0,Tt.Z)(pn,At);var yn=(0,Ct.Z)(pn);function pn(){var mn;(0,Xe.Z)(this,pn);for(var Wn=arguments.length,Hn=new Array(Wn),Qn=0;Qn<Wn;Qn++)Hn[Qn]=arguments[Qn];return mn=yn.call.apply(yn,[this].concat(Hn)),mn.state={uid:be()},mn.reqs={},mn.fileInput=void 0,mn._isMounted=void 0,mn.onChange=function(ii){var ji=mn.props,cn=ji.accept,Yi=ji.directory,$i=ii.target.files,Wi=(0,Oe.Z)($i).filter(function(ln){return!Yi||Be(ln,cn)});mn.uploadFiles(Wi),mn.reset()},mn.onClick=function(ii){var ji=mn.fileInput;if(ji){var cn=ii.target,Yi=mn.props.onClick;if(cn&&cn.tagName==="BUTTON"){var $i=ji.parentNode;$i.focus(),cn.blur()}ji.click(),Yi&&Yi(ii)}},mn.onKeyDown=function(ii){ii.key==="Enter"&&mn.onClick(ii)},mn.onFileDrop=function(ii){var ji=mn.props.multiple;if(ii.preventDefault(),ii.type!=="dragover")if(mn.props.directory)rt(Array.prototype.slice.call(ii.dataTransfer.items),mn.uploadFiles,function(Yi){return Be(Yi,mn.props.accept)});else{var cn=(0,Oe.Z)(ii.dataTransfer.files).filter(function(Yi){return Be(Yi,mn.props.accept)});ji===!1&&(cn=cn.slice(0,1)),mn.uploadFiles(cn)}},mn.uploadFiles=function(ii){var ji=(0,Oe.Z)(ii),cn=ji.map(function(Yi){return Yi.uid=be(),mn.processFile(Yi,ji)});Promise.all(cn).then(function(Yi){var $i=mn.props.onBatchStart;$i==null||$i(Yi.map(function(Wi){var ln=Wi.origin,oi=Wi.parsedFile;return{file:ln,parsedFile:oi}})),Yi.filter(function(Wi){return Wi.parsedFile!==null}).forEach(function(Wi){mn.post(Wi)})})},mn.processFile=function(){var ii=(0,De.Z)((0,dt.Z)().mark(function ji(cn,Yi){var $i,Wi,ln,oi,Bi,Gi,Ti,Qi,gr;return(0,dt.Z)().wrap(function(Ki){for(;;)switch(Ki.prev=Ki.next){case 0:if($i=mn.props.beforeUpload,Wi=cn,!$i){Ki.next=14;break}return Ki.prev=3,Ki.next=6,$i(cn,Yi);case 6:Wi=Ki.sent,Ki.next=12;break;case 9:Ki.prev=9,Ki.t0=Ki.catch(3),Wi=!1;case 12:if(Wi!==!1){Ki.next=14;break}return Ki.abrupt("return",{origin:cn,parsedFile:null,action:null,data:null});case 14:if(ln=mn.props.action,typeof ln!="function"){Ki.next=21;break}return Ki.next=18,ln(cn);case 18:oi=Ki.sent,Ki.next=22;break;case 21:oi=ln;case 22:if(Bi=mn.props.data,typeof Bi!="function"){Ki.next=29;break}return Ki.next=26,Bi(cn);case 26:Gi=Ki.sent,Ki.next=30;break;case 29:Gi=Bi;case 30:return Ti=((0,Rt.Z)(Wi)==="object"||typeof Wi=="string")&&Wi?Wi:cn,Ti instanceof File?Qi=Ti:Qi=new File([Ti],cn.name,{type:cn.type}),gr=Qi,gr.uid=cn.uid,Ki.abrupt("return",{origin:cn,data:Gi,parsedFile:gr,action:oi});case 35:case"end":return Ki.stop()}},ji,null,[[3,9]])}));return function(ji,cn){return ii.apply(this,arguments)}}(),mn.saveFileInput=function(ii){mn.fileInput=ii},mn}return(0,Ne.Z)(pn,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(Wn){var Hn=this,Qn=Wn.data,ii=Wn.origin,ji=Wn.action,cn=Wn.parsedFile;if(this._isMounted){var Yi=this.props,$i=Yi.onStart,Wi=Yi.customRequest,ln=Yi.name,oi=Yi.headers,Bi=Yi.withCredentials,Gi=Yi.method,Ti=ii.uid,Qi=Wi||se,gr={action:ji,filename:ln,data:Qn,file:cn,headers:oi,withCredentials:Bi,method:Gi||"post",onProgress:function(Ki){var Sr=Hn.props.onProgress;Sr==null||Sr(Ki,cn)},onSuccess:function(Ki,Sr){var kn=Hn.props.onSuccess;kn==null||kn(Ki,cn,Sr),delete Hn.reqs[Ti]},onError:function(Ki,Sr){var kn=Hn.props.onError;kn==null||kn(Ki,Sr,cn),delete Hn.reqs[Ti]}};$i(ii),this.reqs[Ti]=Qi(gr)}}},{key:"reset",value:function(){this.setState({uid:be()})}},{key:"abort",value:function(Wn){var Hn=this.reqs;if(Wn){var Qn=Wn.uid?Wn.uid:Wn;Hn[Qn]&&Hn[Qn].abort&&Hn[Qn].abort(),delete Hn[Qn]}else Object.keys(Hn).forEach(function(ii){Hn[ii]&&Hn[ii].abort&&Hn[ii].abort(),delete Hn[ii]})}},{key:"render",value:function(){var Wn=this.props,Hn=Wn.component,Qn=Wn.prefixCls,ii=Wn.className,ji=Wn.disabled,cn=Wn.id,Yi=Wn.style,$i=Wn.multiple,Wi=Wn.accept,ln=Wn.capture,oi=Wn.children,Bi=Wn.directory,Gi=Wn.openFileDialogOnClick,Ti=Wn.onMouseEnter,Qi=Wn.onMouseLeave,gr=(0,Lt.Z)(Wn,Qe),hr=ut()((0,Ve.Z)((0,Ve.Z)((0,Ve.Z)({},Qn,!0),"".concat(Qn,"-disabled"),ji),ii,ii)),Ki=Bi?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},Sr=ji?{}:{onClick:Gi?this.onClick:function(){},onKeyDown:Gi?this.onKeyDown:function(){},onMouseEnter:Ti,onMouseLeave:Qi,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return ge.createElement(Hn,(0,Ge.Z)({},Sr,{className:hr,role:"button",style:Yi}),ge.createElement("input",(0,Ge.Z)({},(0,ne.Z)(gr,{aria:!0,data:!0}),{id:cn,disabled:ji,type:"file",ref:this.saveFileInput,onClick:function(Br){return Br.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:Wi},Ki,{multiple:$i,onChange:this.onChange},ln!=null?{capture:ln}:{})),oi)}}]),pn}(ge.Component),Ze=Pt;function Et(){}var it=function(At){(0,Tt.Z)(pn,At);var yn=(0,Ct.Z)(pn);function pn(){var mn;(0,Xe.Z)(this,pn);for(var Wn=arguments.length,Hn=new Array(Wn),Qn=0;Qn<Wn;Qn++)Hn[Qn]=arguments[Qn];return mn=yn.call.apply(yn,[this].concat(Hn)),mn.uploader=void 0,mn.saveUploader=function(ii){mn.uploader=ii},mn}return(0,Ne.Z)(pn,[{key:"abort",value:function(Wn){this.uploader.abort(Wn)}},{key:"render",value:function(){return ge.createElement(Ze,(0,Ge.Z)({},this.props,{ref:this.saveUploader}))}}]),pn}(ge.Component);it.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Et,onError:Et,onSuccess:Et,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var Dt=it,ht=Dt,Ht=pe(18929),_t=pe(4676),Vt=pe(36355),ot=pe(1684),Ue=pe(9763),Wt=pe(31724),Ln={icon:function(yn,pn){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:pn}},{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:yn}}]}},name:"file",theme:"twotone"},Fn=Ln,Gt=pe(7657),rn=function(yn,pn){return ge.createElement(Gt.Z,(0,Ge.Z)({},yn,{ref:pn,icon:Fn}))},An=ge.forwardRef(rn),ni=An,Sn=pe(58617),Yn={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"},It=Yn,wn=function(yn,pn){return ge.createElement(Gt.Z,(0,Ge.Z)({},yn,{ref:pn,icon:It}))},Gn=ge.forwardRef(wn),ze=Gn,Ee={icon:function(yn,pn){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:yn}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:pn}},{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:pn}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:pn}},{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:yn}}]}},name:"picture",theme:"twotone"},Pe=Ee,Fe=function(yn,pn){return ge.createElement(Gt.Z,(0,Ge.Z)({},yn,{ref:pn,icon:Pe}))},Ae=ge.forwardRef(Fe),ye=Ae,qe=pe(77900),vt=pe(56762),et=pe(62892),Ye=pe(92343),xt=pe(3113);function yt(At){return Object.assign(Object.assign({},At),{lastModified:At.lastModified,lastModifiedDate:At.lastModifiedDate,name:At.name,size:At.size,type:At.type,uid:At.uid,percent:0,originFileObj:At})}function at(At,yn){const pn=(0,Oe.Z)(yn),mn=pn.findIndex(Wn=>{let{uid:Hn}=Wn;return Hn===At.uid});return mn===-1?pn.push(At):pn[mn]=At,pn}function zt(At,yn){const pn=At.uid!==void 0?"uid":"name";return yn.filter(mn=>mn[pn]===At[pn])[0]}function un(At,yn){const pn=At.uid!==void 0?"uid":"name",mn=yn.filter(Wn=>Wn[pn]!==At[pn]);return mn.length===yn.length?null:mn}const fn=function(){const yn=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),mn=yn[yn.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(mn)||[""])[0]},Qt=At=>At.indexOf("image/")===0,Kn=At=>{if(At.type&&!At.thumbUrl)return Qt(At.type);const yn=At.thumbUrl||At.url||"",pn=fn(yn);return/^data:image\//.test(yn)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(pn)?!0:!(/^data:/.test(yn)||pn)},On=200;function jt(At){return new Promise(yn=>{if(!At.type||!Qt(At.type)){yn("");return}const pn=document.createElement("canvas");pn.width=On,pn.height=On,pn.style.cssText=`position: fixed; left: 0; top: 0; width: ${On}px; height: ${On}px; z-index: 9999; display: none;`,document.body.appendChild(pn);const mn=pn.getContext("2d"),Wn=new Image;if(Wn.onload=()=>{const{width:Hn,height:Qn}=Wn;let ii=On,ji=On,cn=0,Yi=0;Hn>Qn?(ji=Qn*(On/Hn),Yi=-(ji-ii)/2):(ii=Hn*(On/Qn),cn=-(ii-ji)/2),mn.drawImage(Wn,cn,Yi,ii,ji);const $i=pn.toDataURL();document.body.removeChild(pn),window.URL.revokeObjectURL(Wn.src),yn($i)},Wn.crossOrigin="anonymous",At.type.startsWith("image/svg+xml")){const Hn=new FileReader;Hn.onload=()=>{Hn.result&&(Wn.src=Hn.result)},Hn.readAsDataURL(At)}else if(At.type.startsWith("image/gif")){const Hn=new FileReader;Hn.onload=()=>{Hn.result&&yn(Hn.result)},Hn.readAsDataURL(At)}else Wn.src=window.URL.createObjectURL(At)})}var sn=pe(26227),jn=pe(41464),dn=pe(15277),Pn=pe(93948),ui=pe(6848),gi=ge.forwardRef((At,yn)=>{let{prefixCls:pn,className:mn,style:Wn,locale:Hn,listType:Qn,file:ii,items:ji,progress:cn,iconRender:Yi,actionIconRender:$i,itemRender:Wi,isImgUrl:ln,showPreviewIcon:oi,showRemoveIcon:Bi,showDownloadIcon:Gi,previewIcon:Ti,removeIcon:Qi,downloadIcon:gr,onPreview:hr,onDownload:Ki,onClose:Sr}=At;var kn,Br;const{status:_n}=ii,[Or,no]=ge.useState(_n);ge.useEffect(()=>{_n!=="removed"&&no(_n)},[_n]);const[br,mo]=ge.useState(!1);ge.useEffect(()=>{const Ro=setTimeout(()=>{mo(!0)},300);return()=>{clearTimeout(Ro)}},[]);const Jr=Yi(ii);let ur=ge.createElement("div",{className:`${pn}-icon`},Jr);if(Qn==="picture"||Qn==="picture-card"||Qn==="picture-circle")if(Or==="uploading"||!ii.thumbUrl&&!ii.url){const Ro=ut()(`${pn}-list-item-thumbnail`,{[`${pn}-list-item-file`]:Or!=="uploading"});ur=ge.createElement("div",{className:Ro},Jr)}else{const Ro=ln!=null&&ln(ii)?ge.createElement("img",{src:ii.thumbUrl||ii.url,alt:ii.name,className:`${pn}-list-item-image`,crossOrigin:ii.crossOrigin}):Jr,Mr=ut()(`${pn}-list-item-thumbnail`,{[`${pn}-list-item-file`]:ln&&!ln(ii)});ur=ge.createElement("a",{className:Mr,onClick:Nr=>hr(ii,Nr),href:ii.url||ii.thumbUrl,target:"_blank",rel:"noopener noreferrer"},Ro)}const er=ut()(`${pn}-list-item`,`${pn}-list-item-${Or}`),qi=typeof ii.linkProps=="string"?JSON.parse(ii.linkProps):ii.linkProps,Rr=Bi?$i((typeof Qi=="function"?Qi(ii):Qi)||ge.createElement(sn.Z,null),()=>Sr(ii),pn,Hn.removeFile):null,Ii=Gi&&Or==="done"?$i((typeof gr=="function"?gr(ii):gr)||ge.createElement(jn.Z,null),()=>Ki(ii),pn,Hn.downloadFile):null,tt=Qn!=="picture-card"&&Qn!=="picture-circle"&&ge.createElement("span",{key:"download-delete",className:ut()(`${pn}-list-item-actions`,{picture:Qn==="picture"})},Ii,Rr),Qr=ut()(`${pn}-list-item-name`),lo=ii.url?[ge.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:Qr,title:ii.name},qi,{href:ii.url,onClick:Ro=>hr(ii,Ro)}),ii.name),tt]:[ge.createElement("span",{key:"view",className:Qr,onClick:Ro=>hr(ii,Ro),title:ii.name},ii.name),tt],jr={pointerEvents:"none",opacity:.5},vo=oi?ge.createElement("a",{href:ii.url||ii.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:ii.url||ii.thumbUrl?void 0:jr,onClick:Ro=>hr(ii,Ro),title:Hn.previewFile},typeof Ti=="function"?Ti(ii):Ti||ge.createElement(dn.Z,null)):null,po=(Qn==="picture-card"||Qn==="picture-circle")&&Or!=="uploading"&&ge.createElement("span",{className:`${pn}-list-item-actions`},vo,Or==="done"&&Ii,Rr),{getPrefixCls:Lr}=ge.useContext(Vt.E_),Fr=Lr(),uo=ge.createElement("div",{className:er},ur,lo,po,br&&ge.createElement(qe.default,{motionName:`${Fr}-fade`,visible:Or==="uploading",motionDeadline:2e3},Ro=>{let{className:Mr}=Ro;const Nr="percent"in ii?ge.createElement(Pn.Z,Object.assign({},cn,{type:"line",percent:ii.percent,"aria-label":ii["aria-label"],"aria-labelledby":ii["aria-labelledby"]})):null;return ge.createElement("div",{className:ut()(`${pn}-list-item-progress`,Mr)},Nr)})),qr=ii.response&&typeof ii.response=="string"?ii.response:((kn=ii.error)===null||kn===void 0?void 0:kn.statusText)||((Br=ii.error)===null||Br===void 0?void 0:Br.message)||Hn.uploadError,zo=Or==="error"?ge.createElement(ui.Z,{title:qr,getPopupContainer:Ro=>Ro.parentNode},uo):uo;return ge.createElement("div",{className:ut()(`${pn}-list-item-container`,mn),style:Wn,ref:yn},Wi?Wi(zo,ii,ji,{download:Ki.bind(null,ii),preview:hr.bind(null,ii),remove:Sr.bind(null,ii)}):zo)});const bi=(At,yn)=>{const{listType:pn="text",previewFile:mn=jt,onPreview:Wn,onDownload:Hn,onRemove:Qn,locale:ii,iconRender:ji,isImageUrl:cn=Kn,prefixCls:Yi,items:$i=[],showPreviewIcon:Wi=!0,showRemoveIcon:ln=!0,showDownloadIcon:oi=!1,removeIcon:Bi,previewIcon:Gi,downloadIcon:Ti,progress:Qi={size:[-1,2],showInfo:!1},appendAction:gr,appendActionVisible:hr=!0,itemRender:Ki,disabled:Sr}=At,kn=(0,vt.Z)(),[Br,_n]=ge.useState(!1);ge.useEffect(()=>{pn!=="picture"&&pn!=="picture-card"&&pn!=="picture-circle"||($i||[]).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="",mn&&mn(jr.originFileObj).then(vo=>{jr.thumbUrl=vo||"",kn()}))})},[pn,$i,mn]),ge.useEffect(()=>{_n(!0)},[]);const Or=(jr,vo)=>{if(Wn)return vo==null||vo.preventDefault(),Wn(jr)},no=jr=>{typeof Hn=="function"?Hn(jr):jr.url&&window.open(jr.url)},br=jr=>{Qn==null||Qn(jr)},mo=jr=>{if(ji)return ji(jr,pn);const vo=jr.status==="uploading",po=cn&&cn(jr)?ge.createElement(ye,null):ge.createElement(ni,null);let Lr=vo?ge.createElement(Sn.Z,null):ge.createElement(ze,null);return pn==="picture"?Lr=vo?ge.createElement(Sn.Z,null):po:(pn==="picture-card"||pn==="picture-circle")&&(Lr=vo?ii.uploading:po),Lr},Jr=(jr,vo,po,Lr)=>{const Fr={type:"text",size:"small",title:Lr,onClick:uo=>{vo(),(0,Ye.l$)(jr)&&jr.props.onClick&&jr.props.onClick(uo)},className:`${po}-list-item-action`,disabled:Sr};if((0,Ye.l$)(jr)){const uo=(0,Ye.Tm)(jr,Object.assign(Object.assign({},jr.props),{onClick:()=>{}}));return ge.createElement(xt.ZP,Object.assign({},Fr,{icon:uo}))}return ge.createElement(xt.ZP,Object.assign({},Fr),ge.createElement("span",null,jr))};ge.useImperativeHandle(yn,()=>({handlePreview:Or,handleDownload:no}));const{getPrefixCls:ur}=ge.useContext(Vt.E_),er=ur("upload",Yi),qi=ur(),Rr=ut()(`${er}-list`,`${er}-list-${pn}`),Ii=(0,Oe.Z)($i.map(jr=>({key:jr.uid,file:jr})));let Qr={motionDeadline:2e3,motionName:`${er}-${pn==="picture-card"||pn==="picture-circle"?"animate-inline":"animate"}`,keys:Ii,motionAppear:Br};const lo=ge.useMemo(()=>{const jr=Object.assign({},(0,et.Z)(qi));return delete jr.onAppearEnd,delete jr.onEnterEnd,delete jr.onLeaveEnd,jr},[qi]);return pn!=="picture-card"&&pn!=="picture-circle"&&(Qr=Object.assign(Object.assign({},lo),Qr)),ge.createElement("div",{className:Rr},ge.createElement(qe.CSSMotionList,Object.assign({},Qr,{component:!1}),jr=>{let{key:vo,file:po,className:Lr,style:Fr}=jr;return ge.createElement(gi,{key:vo,locale:ii,prefixCls:er,className:Lr,style:Fr,file:po,items:$i,progress:Qi,listType:pn,isImgUrl:cn,showPreviewIcon:Wi,showRemoveIcon:ln,showDownloadIcon:oi,removeIcon:Bi,previewIcon:Gi,downloadIcon:Ti,iconRender:mo,actionIconRender:Jr,itemRender:Ki,onPreview:Or,onDownload:no,onClose:br})}),gr&&ge.createElement(qe.default,Object.assign({},Qr,{visible:hr,forceRender:!0}),jr=>{let{className:vo,style:po}=jr;return(0,Ye.Tm)(gr,Lr=>({className:ut()(Lr.className,vo),style:Object.assign(Object.assign(Object.assign({},po),{pointerEvents:vo?"none":void 0}),Lr.style)}))}))};var ar=ge.forwardRef(bi),Ji=pe(17313),wr=pe(8378),mr=pe(83116),Hi=pe(37613),$n=At=>{const{componentCls:yn,iconCls:pn}=At;return{[`${yn}-wrapper`]:{[`${yn}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:At.colorFillAlter,border:`${At.lineWidth}px dashed ${At.colorBorder}`,borderRadius:At.borderRadiusLG,cursor:"pointer",transition:`border-color ${At.motionDurationSlow}`,[yn]:{padding:`${At.padding}px 0`},[`${yn}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none"},[`${yn}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`&:not(${yn}-disabled):hover`]:{borderColor:At.colorPrimaryHover},[`p${yn}-drag-icon`]:{marginBottom:At.margin,[pn]:{color:At.colorPrimary,fontSize:At.uploadThumbnailSize}},[`p${yn}-text`]:{margin:`0 0 ${At.marginXXS}px`,color:At.colorTextHeading,fontSize:At.fontSizeLG},[`p${yn}-hint`]:{color:At.colorTextDescription,fontSize:At.fontSize},[`&${yn}-disabled`]:{cursor:"not-allowed",[`p${yn}-drag-icon ${pn},
|
|
|
p${yn}-text,
|
|
|
p${yn}-hint
|
|
|
`]:{color:At.colorTextDisabled}}}}}},Ei=At=>{const{componentCls:yn,antCls:pn,iconCls:mn,fontSize:Wn,lineHeight:Hn}=At,Qn=`${yn}-list-item`,ii=`${Qn}-actions`,ji=`${Qn}-action`,cn=Math.round(Wn*Hn);return{[`${yn}-wrapper`]:{[`${yn}-list`]:Object.assign(Object.assign({},(0,Ji.dF)()),{lineHeight:At.lineHeight,[Qn]:{position:"relative",height:At.lineHeight*Wn,marginTop:At.marginXS,fontSize:Wn,display:"flex",alignItems:"center",transition:`background-color ${At.motionDurationSlow}`,"&:hover":{backgroundColor:At.controlItemBgHover},[`${Qn}-name`]:Object.assign(Object.assign({},Ji.vS),{padding:`0 ${At.paddingXS}px`,lineHeight:Hn,flex:"auto",transition:`all ${At.motionDurationSlow}`}),[ii]:{[ji]:{opacity:0},[`${ji}${pn}-btn-sm`]:{height:cn,border:0,lineHeight:1,"> span":{transform:"scale(1)"}},[`
|
|
|
${ji}:focus-visible,
|
|
|
&.picture ${ji}
|
|
|
`]:{opacity:1},[mn]:{color:At.actionsColor,transition:`all ${At.motionDurationSlow}`},[`&:hover ${mn}`]:{color:At.colorText}},[`${yn}-icon ${mn}`]:{color:At.colorTextDescription,fontSize:Wn},[`${Qn}-progress`]:{position:"absolute",bottom:-At.uploadProgressOffset,width:"100%",paddingInlineStart:Wn+At.paddingXS,fontSize:Wn,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${Qn}:hover ${ji}`]:{opacity:1,color:At.colorText},[`${Qn}-error`]:{color:At.colorError,[`${Qn}-name, ${yn}-icon ${mn}`]:{color:At.colorError},[ii]:{[`${mn}, ${mn}:hover`]:{color:At.colorError},[ji]:{opacity:1}}},[`${yn}-list-item-container`]:{transition:`opacity ${At.motionDurationSlow}, height ${At.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},Ri=pe(93083),nn=pe(1950);const di=new Ri.Keyframes("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),yi=new Ri.Keyframes("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}});var Tn=At=>{const{componentCls:yn}=At,pn=`${yn}-animate-inline`;return[{[`${yn}-wrapper`]:{[`${pn}-appear, ${pn}-enter, ${pn}-leave`]:{animationDuration:At.motionDurationSlow,animationTimingFunction:At.motionEaseInOutCirc,animationFillMode:"forwards"},[`${pn}-appear, ${pn}-enter`]:{animationName:di},[`${pn}-leave`]:{animationName:yi}}},{[`${yn}-wrapper`]:(0,nn.J$)(At)},di,yi]},Un=pe(93398),kt=pe(64993);const $t=At=>{const{componentCls:yn,iconCls:pn,uploadThumbnailSize:mn,uploadProgressOffset:Wn}=At,Hn=`${yn}-list`,Qn=`${Hn}-item`;return{[`${yn}-wrapper`]:{[`
|
|
|
${Hn}${Hn}-picture,
|
|
|
${Hn}${Hn}-picture-card,
|
|
|
${Hn}${Hn}-picture-circle
|
|
|
`]:{[Qn]:{position:"relative",height:mn+At.lineWidth*2+At.paddingXS*2,padding:At.paddingXS,border:`${At.lineWidth}px ${At.lineType} ${At.colorBorder}`,borderRadius:At.borderRadiusLG,"&:hover":{background:"transparent"},[`${Qn}-thumbnail`]:Object.assign(Object.assign({},Ji.vS),{width:mn,height:mn,lineHeight:`${mn+At.paddingSM}px`,textAlign:"center",flex:"none",[pn]:{fontSize:At.fontSizeHeading2,color:At.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${Qn}-progress`]:{bottom:Wn,width:`calc(100% - ${At.paddingSM*2}px)`,marginTop:0,paddingInlineStart:mn+At.paddingXS}},[`${Qn}-error`]:{borderColor:At.colorError,[`${Qn}-thumbnail ${pn}`]:{[`svg path[fill='${Un.blue[0]}']`]:{fill:At.colorErrorBg},[`svg path[fill='${Un.blue.primary}']`]:{fill:At.colorError}}},[`${Qn}-uploading`]:{borderStyle:"dashed",[`${Qn}-name`]:{marginBottom:Wn}}},[`${Hn}${Hn}-picture-circle ${Qn}`]:{[`&, &::before, ${Qn}-thumbnail`]:{borderRadius:"50%"}}}}},Je=At=>{const{componentCls:yn,iconCls:pn,fontSizeLG:mn,colorTextLightSolid:Wn}=At,Hn=`${yn}-list`,Qn=`${Hn}-item`,ii=At.uploadPicCardSize;return{[`
|
|
|
${yn}-wrapper${yn}-picture-card-wrapper,
|
|
|
${yn}-wrapper${yn}-picture-circle-wrapper
|
|
|
`]:Object.assign(Object.assign({},(0,Ji.dF)()),{display:"inline-block",width:"100%",[`${yn}${yn}-select`]:{width:ii,height:ii,marginInlineEnd:At.marginXS,marginBottom:At.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:At.colorFillAlter,border:`${At.lineWidth}px dashed ${At.colorBorder}`,borderRadius:At.borderRadiusLG,cursor:"pointer",transition:`border-color ${At.motionDurationSlow}`,[`> ${yn}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${yn}-disabled):hover`]:{borderColor:At.colorPrimary}},[`${Hn}${Hn}-picture-card, ${Hn}${Hn}-picture-circle`]:{[`${Hn}-item-container`]:{display:"inline-block",width:ii,height:ii,marginBlock:`0 ${At.marginXS}px`,marginInline:`0 ${At.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[Qn]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${At.paddingXS*2}px)`,height:`calc(100% - ${At.paddingXS*2}px)`,backgroundColor:At.colorBgMask,opacity:0,transition:`all ${At.motionDurationSlow}`,content:'" "'}},[`${Qn}:hover`]:{[`&::before, ${Qn}-actions`]:{opacity:1}},[`${Qn}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${At.motionDurationSlow}`,[`${pn}-eye, ${pn}-download, ${pn}-delete`]:{zIndex:10,width:mn,margin:`0 ${At.marginXXS}px`,fontSize:mn,cursor:"pointer",transition:`all ${At.motionDurationSlow}`,svg:{verticalAlign:"baseline"}}},[`${Qn}-actions, ${Qn}-actions:hover`]:{[`${pn}-eye, ${pn}-download, ${pn}-delete`]:{color:new kt.C(Wn).setAlpha(.65).toRgbString(),"&:hover":{color:Wn}}},[`${Qn}-thumbnail, ${Qn}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${Qn}-name`]:{display:"none",textAlign:"center"},[`${Qn}-file + ${Qn}-name`]:{position:"absolute",bottom:At.margin,display:"block",width:`calc(100% - ${At.paddingXS*2}px)`},[`${Qn}-uploading`]:{[`&${Qn}`]:{backgroundColor:At.colorFillAlter},[`&::before, ${pn}-eye, ${pn}-download, ${pn}-delete`]:{display:"none"}},[`${Qn}-progress`]:{bottom:At.marginXL,width:`calc(100% - ${At.paddingXS*2}px)`,paddingInlineStart:0}}}),[`${yn}-wrapper${yn}-picture-circle-wrapper`]:{[`${yn}${yn}-select`]:{borderRadius:"50%"}}}};var vn=At=>{const{componentCls:yn}=At;return{[`${yn}-rtl`]:{direction:"rtl"}}};const Ft=At=>{const{componentCls:yn,colorTextDisabled:pn}=At;return{[`${yn}-wrapper`]:Object.assign(Object.assign({},(0,Ji.Wf)(At)),{[yn]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${yn}-select`]:{display:"inline-block"},[`${yn}-disabled`]:{color:pn,cursor:"not-allowed"}})}};var st=(0,mr.Z)("Upload",At=>{const{fontSizeHeading3:yn,fontSize:pn,lineHeight:mn,lineWidth:Wn,controlHeightLG:Hn}=At,Qn=Math.round(pn*mn),ii=(0,Hi.TS)(At,{uploadThumbnailSize:yn*2,uploadProgressOffset:Qn/2+Wn,uploadPicCardSize:Hn*2.55});return[Ft(ii),$n(ii),$t(ii),Je(ii),Ei(ii),Tn(ii),vn(ii),(0,wr.Z)(ii)]},At=>({actionsColor:At.colorTextDescription})),on=function(At,yn,pn,mn){function Wn(Hn){return Hn instanceof pn?Hn:new pn(function(Qn){Qn(Hn)})}return new(pn||(pn=Promise))(function(Hn,Qn){function ii(Yi){try{cn(mn.next(Yi))}catch($i){Qn($i)}}function ji(Yi){try{cn(mn.throw(Yi))}catch($i){Qn($i)}}function cn(Yi){Yi.done?Hn(Yi.value):Wn(Yi.value).then(ii,ji)}cn((mn=mn.apply(At,yn||[])).next())})};const En=`__LIST_IGNORE_${Date.now()}__`,Dn=(At,yn)=>{const{fileList:pn,defaultFileList:mn,onRemove:Wn,showUploadList:Hn=!0,listType:Qn="text",onPreview:ii,onDownload:ji,onChange:cn,onDrop:Yi,previewFile:$i,disabled:Wi,locale:ln,iconRender:oi,isImageUrl:Bi,progress:Gi,prefixCls:Ti,className:Qi,type:gr="select",children:hr,style:Ki,itemRender:Sr,maxCount:kn,data:Br={},multiple:_n=!1,action:Or="",accept:no="",supportServerRender:br=!0,rootClassName:mo}=At,Jr=ge.useContext(ot.Z),ur=Wi!=null?Wi:Jr,[er,qi]=(0,Ht.Z)(mn||[],{value:pn,postState:Zi=>Zi!=null?Zi:[]}),[Rr,Ii]=ge.useState("drop"),tt=ge.useRef(null);ge.useMemo(()=>{const Zi=Date.now();(pn||[]).forEach((Ci,nr)=>{!Ci.uid&&!Object.isFrozen(Ci)&&(Ci.uid=`__AUTO__${Zi}_${nr}__`)})},[pn]);const Qr=(Zi,Ci,nr)=>{let rr=(0,Oe.Z)(Ci),cr=!1;kn===1?rr=rr.slice(-1):kn&&(cr=rr.length>kn,rr=rr.slice(0,kn)),(0,_t.flushSync)(()=>{qi(rr)});const xr={file:Zi,fileList:rr};nr&&(xr.event=nr),(!cr||rr.some(Gr=>Gr.uid===Zi.uid))&&(0,_t.flushSync)(()=>{cn==null||cn(xr)})},lo=(Zi,Ci)=>on(void 0,void 0,void 0,function*(){const{beforeUpload:nr,transformFile:rr}=At;let cr=Zi;if(nr){const xr=yield nr(Zi,Ci);if(xr===!1)return!1;if(delete Zi[En],xr===En)return Object.defineProperty(Zi,En,{value:!0,configurable:!0}),!1;typeof xr=="object"&&xr&&(cr=xr)}return rr&&(cr=yield rr(cr)),cr}),jr=Zi=>{const Ci=Zi.filter(cr=>!cr.file[En]);if(!Ci.length)return;const nr=Ci.map(cr=>yt(cr.file));let rr=(0,Oe.Z)(er);nr.forEach(cr=>{rr=at(cr,rr)}),nr.forEach((cr,xr)=>{let Gr=cr;if(Ci[xr].parsedFile)cr.status="uploading";else{const{originFileObj:vr}=cr;let kr;try{kr=new File([vr],vr.name,{type:vr.type})}catch(Zr){kr=new Blob([vr],{type:vr.type}),kr.name=vr.name,kr.lastModifiedDate=new Date,kr.lastModified=new Date().getTime()}kr.uid=cr.uid,Gr=kr}Qr(Gr,rr)})},vo=(Zi,Ci,nr)=>{try{typeof Zi=="string"&&(Zi=JSON.parse(Zi))}catch(xr){}if(!zt(Ci,er))return;const rr=yt(Ci);rr.status="done",rr.percent=100,rr.response=Zi,rr.xhr=nr;const cr=at(rr,er);Qr(rr,cr)},po=(Zi,Ci)=>{if(!zt(Ci,er))return;const nr=yt(Ci);nr.status="uploading",nr.percent=Zi.percent;const rr=at(nr,er);Qr(nr,rr,Zi)},Lr=(Zi,Ci,nr)=>{if(!zt(nr,er))return;const rr=yt(nr);rr.error=Zi,rr.response=Ci,rr.status="error";const cr=at(rr,er);Qr(rr,cr)},Fr=Zi=>{let Ci;Promise.resolve(typeof Wn=="function"?Wn(Zi):Wn).then(nr=>{var rr;if(nr===!1)return;const cr=un(Zi,er);cr&&(Ci=Object.assign(Object.assign({},Zi),{status:"removed"}),er==null||er.forEach(xr=>{const Gr=Ci.uid!==void 0?"uid":"name";xr[Gr]===Ci[Gr]&&!Object.isFrozen(xr)&&(xr.status="removed")}),(rr=tt.current)===null||rr===void 0||rr.abort(Ci),Qr(Ci,cr))})},uo=Zi=>{Ii(Zi.type),Zi.type==="drop"&&(Yi==null||Yi(Zi))};ge.useImperativeHandle(yn,()=>({onBatchStart:jr,onSuccess:vo,onProgress:po,onError:Lr,fileList:er,upload:tt.current}));const{getPrefixCls:qr,direction:zo,upload:Ro}=ge.useContext(Vt.E_),Mr=qr("upload",Ti),Nr=Object.assign(Object.assign({onBatchStart:jr,onError:Lr,onProgress:po,onSuccess:vo},At),{data:Br,multiple:_n,action:Or,accept:no,supportServerRender:br,prefixCls:Mr,disabled:ur,beforeUpload:lo,onChange:void 0});delete Nr.className,delete Nr.style,(!hr||ur)&&delete Nr.id;const[fi,Tr]=st(Mr),[Bo]=(0,Ue.Z)("Upload",Wt.Z.Upload),{showRemoveIcon:aa,showPreviewIcon:Ho,showDownloadIcon:Ao,removeIcon:_o,previewIcon:ta,downloadIcon:Ea}=typeof Hn=="boolean"?{}:Hn,Mt=(Zi,Ci)=>Hn?ge.createElement(ar,{prefixCls:Mr,listType:Qn,items:er,previewFile:$i,onPreview:ii,onDownload:ji,onRemove:Fr,showRemoveIcon:!ur&&aa,showPreviewIcon:Ho,showDownloadIcon:Ao,removeIcon:_o,previewIcon:ta,downloadIcon:Ea,iconRender:oi,locale:Object.assign(Object.assign({},Bo),ln),isImageUrl:Bi,progress:Gi,appendAction:Zi,appendActionVisible:Ci,itemRender:Sr,disabled:ur}):Zi,Pi=ut()(`${Mr}-wrapper`,Qi,mo,Tr,Ro==null?void 0:Ro.className,{[`${Mr}-rtl`]:zo==="rtl",[`${Mr}-picture-card-wrapper`]:Qn==="picture-card",[`${Mr}-picture-circle-wrapper`]:Qn==="picture-circle"}),Ut=Object.assign(Object.assign({},Ro==null?void 0:Ro.style),Ki);if(gr==="drag"){const Zi=ut()(Tr,Mr,`${Mr}-drag`,{[`${Mr}-drag-uploading`]:er.some(Ci=>Ci.status==="uploading"),[`${Mr}-drag-hover`]:Rr==="dragover",[`${Mr}-disabled`]:ur,[`${Mr}-rtl`]:zo==="rtl"});return fi(ge.createElement("span",{className:Pi},ge.createElement("div",{className:Zi,style:Ut,onDrop:uo,onDragOver:uo,onDragLeave:uo},ge.createElement(ht,Object.assign({},Nr,{ref:tt,className:`${Mr}-btn`}),ge.createElement("div",{className:`${Mr}-drag-container`},hr))),Mt()))}const Ui=ut()(Mr,`${Mr}-select`,{[`${Mr}-disabled`]:ur}),yr=(Zi=>ge.createElement("div",{className:Ui,style:Zi},ge.createElement(ht,Object.assign({},Nr,{ref:tt}))))(hr?void 0:{display:"none"});return fi(Qn==="picture-card"||Qn==="picture-circle"?ge.createElement("span",{className:Pi},Mt(yr,!!hr)):ge.createElement("span",{className:Pi},yr,Mt()))};var St=ge.forwardRef(Dn),Nn=function(At,yn){var pn={};for(var mn in At)Object.prototype.hasOwnProperty.call(At,mn)&&yn.indexOf(mn)<0&&(pn[mn]=At[mn]);if(At!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Wn=0,mn=Object.getOwnPropertySymbols(At);Wn<mn.length;Wn++)yn.indexOf(mn[Wn])<0&&Object.prototype.propertyIsEnumerable.call(At,mn[Wn])&&(pn[mn[Wn]]=At[mn[Wn]]);return pn},Si=ge.forwardRef((At,yn)=>{var{style:pn,height:mn}=At,Wn=Nn(At,["style","height"]);return ge.createElement(St,Object.assign({ref:yn},Wn,{type:"drag",style:Object.assign(Object.assign({},pn),{height:mn})}))});const en=St;en.Dragger=Si,en.LIST_IGNORE=En;var Cn=en},99498:function(Vn,xn,pe){(function(ge){ge(pe(89780))})(function(ge){ge.defineOption("placeholder","",function(Tt,Ct,Ve){var Lt=Ve&&Ve!=ge.Init;if(Ct&&!Lt)Tt.on("blur",Ge),Tt.on("change",Xe),Tt.on("swapDoc",Xe),ge.on(Tt.getInputField(),"compositionupdate",Tt.state.placeholderCompose=function(){ut(Tt)}),Xe(Tt);else if(!Ct&&Lt){Tt.off("blur",Ge),Tt.off("change",Xe),Tt.off("swapDoc",Xe),ge.off(Tt.getInputField(),"compositionupdate",Tt.state.placeholderCompose),Oe(Tt);var dt=Tt.getWrapperElement();dt.className=dt.className.replace(" CodeMirror-empty","")}Ct&&!Tt.hasFocus()&&Ge(Tt)});function Oe(Tt){Tt.state.placeholder&&(Tt.state.placeholder.parentNode.removeChild(Tt.state.placeholder),Tt.state.placeholder=null)}function Ke(Tt){Oe(Tt);var Ct=Tt.state.placeholder=document.createElement("pre");Ct.style.cssText="height: 0; overflow: visible",Ct.style.direction=Tt.getOption("direction"),Ct.className="CodeMirror-placeholder CodeMirror-line-like";var Ve=Tt.getOption("placeholder");typeof Ve=="string"&&(Ve=document.createTextNode(Ve)),Ct.appendChild(Ve),Tt.display.lineSpace.insertBefore(Ct,Tt.display.lineSpace.firstChild)}function ut(Tt){setTimeout(function(){var Ct=!1,Ve=Tt.getInputField();Ve.nodeName=="TEXTAREA"?Ct=!Ve.value:Tt.lineCount()==1&&(Ct=!/[^\u200b]/.test(Ve.querySelector(".CodeMirror-line").textContent)),Ct?Ke(Tt):Oe(Tt)},20)}function Ge(Tt){Ne(Tt)&&Ke(Tt)}function Xe(Tt){var Ct=Tt.getWrapperElement(),Ve=Ne(Tt);Ct.className=Ct.className.replace(" CodeMirror-empty","")+(Ve?" CodeMirror-empty":""),Ve?Ke(Tt):Oe(Tt)}function Ne(Tt){return Tt.lineCount()===1&&Tt.getLine(0)===""}})},25717:function(Vn,xn,pe){(function(ge){ge(pe(89780))})(function(ge){var Oe={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Ke=ge.Pos;ge.defineOption("autoCloseBrackets",!1,function(ne,ee,ce){ce&&ce!=ge.Init&&(ne.removeKeyMap(Ge),ne.state.closeBrackets=null),ee&&(Xe(ut(ee,"pairs")),ne.state.closeBrackets=ee,ne.addKeyMap(Ge))});function ut(ne,ee){return ee=="pairs"&&typeof ne=="string"?ne:typeof ne=="object"&&ne[ee]!=null?ne[ee]:Oe[ee]}var Ge={Backspace:Ct,Enter:Ve};function Xe(ne){for(var ee=0;ee<ne.length;ee++){var ce=ne.charAt(ee),se="'"+ce+"'";Ge[se]||(Ge[se]=Ne(ce))}}Xe(Oe.pairs+"`");function Ne(ne){return function(ee){return dt(ee,ne)}}function Tt(ne){var ee=ne.state.closeBrackets;if(!ee||ee.override)return ee;var ce=ne.getModeAt(ne.getCursor());return ce.closeBrackets||ee}function Ct(ne){var ee=Tt(ne);if(!ee||ne.getOption("disableInput"))return ge.Pass;for(var ce=ut(ee,"pairs"),se=ne.listSelections(),he=0;he<se.length;he++){if(!se[he].empty())return ge.Pass;var ve=Rt(ne,se[he].head);if(!ve||ce.indexOf(ve)%2!=0)return ge.Pass}for(var he=se.length-1;he>=0;he--){var be=se[he].head;ne.replaceRange("",Ke(be.line,be.ch-1),Ke(be.line,be.ch+1),"+delete")}}function Ve(ne){var ee=Tt(ne),ce=ee&&ut(ee,"explode");if(!ce||ne.getOption("disableInput"))return ge.Pass;for(var se=ne.listSelections(),he=0;he<se.length;he++){if(!se[he].empty())return ge.Pass;var ve=Rt(ne,se[he].head);if(!ve||ce.indexOf(ve)%2!=0)return ge.Pass}ne.operation(function(){var be=ne.lineSeparator()||`
|
|
|
`;ne.replaceSelection(be+be,null),ne.execCommand("goCharLeft"),se=ne.listSelections();for(var ke=0;ke<se.length;ke++){var Be=se[ke].head.line;ne.indentLine(Be,null,!0),ne.indentLine(Be+1,null,!0)}})}function Lt(ne){var ee=ge.cmpPos(ne.anchor,ne.head)>0;return{anchor:new Ke(ne.anchor.line,ne.anchor.ch+(ee?-1:1)),head:new Ke(ne.head.line,ne.head.ch+(ee?1:-1))}}function dt(ne,ee){var ce=Tt(ne);if(!ce||ne.getOption("disableInput"))return ge.Pass;var se=ut(ce,"pairs"),he=se.indexOf(ee);if(he==-1)return ge.Pass;for(var ve=ut(ce,"closeBefore"),be=ut(ce,"triples"),ke=se.charAt(he+1)==ee,Be=ne.listSelections(),He=he%2==0,We,rt=0;rt<Be.length;rt++){var Qe=Be[rt],Pt=Qe.head,Ze,Et=ne.getRange(Pt,Ke(Pt.line,Pt.ch+1));if(He&&!Qe.empty())Ze="surround";else if((ke||!He)&&Et==ee)ke&&De(ne,Pt)?Ze="both":be.indexOf(ee)>=0&&ne.getRange(Pt,Ke(Pt.line,Pt.ch+3))==ee+ee+ee?Ze="skipThree":Ze="skip";else if(ke&&Pt.ch>1&&be.indexOf(ee)>=0&&ne.getRange(Ke(Pt.line,Pt.ch-2),Pt)==ee+ee){if(Pt.ch>2&&/\bstring/.test(ne.getTokenTypeAt(Ke(Pt.line,Pt.ch-2))))return ge.Pass;Ze="addFour"}else if(ke){var it=Pt.ch==0?" ":ne.getRange(Ke(Pt.line,Pt.ch-1),Pt);if(!ge.isWordChar(Et)&&it!=ee&&!ge.isWordChar(it))Ze="both";else return ge.Pass}else if(He&&(Et.length===0||/\s/.test(Et)||ve.indexOf(Et)>-1))Ze="both";else return ge.Pass;if(!We)We=Ze;else if(We!=Ze)return ge.Pass}var Dt=he%2?se.charAt(he-1):ee,ht=he%2?ee:se.charAt(he+1);ne.operation(function(){if(We=="skip")ne.execCommand("goCharRight");else if(We=="skipThree")for(var Ht=0;Ht<3;Ht++)ne.execCommand("goCharRight");else if(We=="surround"){for(var _t=ne.getSelections(),Ht=0;Ht<_t.length;Ht++)_t[Ht]=Dt+_t[Ht]+ht;ne.replaceSelections(_t,"around"),_t=ne.listSelections().slice();for(var Ht=0;Ht<_t.length;Ht++)_t[Ht]=Lt(_t[Ht]);ne.setSelections(_t)}else We=="both"?(ne.replaceSelection(Dt+ht,null),ne.triggerElectric(Dt+ht),ne.execCommand("goCharLeft")):We=="addFour"&&(ne.replaceSelection(Dt+Dt+Dt+Dt,"before"),ne.execCommand("goCharRight"))})}function Rt(ne,ee){var ce=ne.getRange(Ke(ee.line,ee.ch-1),Ke(ee.line,ee.ch+1));return ce.length==2?ce:null}function De(ne,ee){var ce=ne.getTokenAt(Ke(ee.line,ee.ch+1));return/\bstring/.test(ce.type)&&ce.start==ee.ch&&(ee.ch==0||!/\bstring/.test(ne.getTokenTypeAt(ee)))}})},6313:function(Vn,xn,pe){(function(ge){ge(pe(89780),pe(32855))})(function(ge){ge.defineOption("autoCloseTags",!1,function(Ct,Ve,Lt){if(Lt!=ge.Init&&Lt&&Ct.removeKeyMap("autoCloseTags"),!!Ve){var dt={name:"autoCloseTags"};(typeof Ve!="object"||Ve.whenClosing!==!1)&&(dt["'/'"]=function(Rt){return Xe(Rt)}),(typeof Ve!="object"||Ve.whenOpening!==!1)&&(dt["'>'"]=function(Rt){return ut(Rt)}),Ct.addKeyMap(dt)}});var Oe=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Ke=["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 ut(Ct){if(Ct.getOption("disableInput"))return ge.Pass;for(var Ve=Ct.listSelections(),Lt=[],dt=Ct.getOption("autoCloseTags"),Rt=0;Rt<Ve.length;Rt++){if(!Ve[Rt].empty())return ge.Pass;var De=Ve[Rt].head,ne=Ct.getTokenAt(De),ee=ge.innerMode(Ct.getMode(),ne.state),ce=ee.state,se=ee.mode.xmlCurrentTag&&ee.mode.xmlCurrentTag(ce),he=se&&se.name;if(!he)return ge.Pass;var ve=ee.mode.configuration=="html",be=typeof dt=="object"&&dt.dontCloseTags||ve&&Oe,ke=typeof dt=="object"&&dt.indentTags||ve&&Ke;ne.end>De.ch&&(he=he.slice(0,he.length-ne.end+De.ch));var Be=he.toLowerCase();if(!he||ne.type=="string"&&(ne.end!=De.ch||!/[\"\']/.test(ne.string.charAt(ne.string.length-1))||ne.string.length==1)||ne.type=="tag"&&se.close||ne.string.indexOf("/")==De.ch-ne.start-1||be&&Ne(be,Be)>-1||Tt(Ct,ee.mode.xmlCurrentContext&&ee.mode.xmlCurrentContext(ce)||[],he,De,!0))return ge.Pass;var He=typeof dt=="object"&&dt.emptyTags;if(He&&Ne(He,he)>-1){Lt[Rt]={text:"/>",newPos:ge.Pos(De.line,De.ch+2)};continue}var We=ke&&Ne(ke,Be)>-1;Lt[Rt]={indent:We,text:">"+(We?`
|
|
|
|
|
|
`:"")+"</"+he+">",newPos:We?ge.Pos(De.line+1,0):ge.Pos(De.line,De.ch+1)}}for(var rt=typeof dt=="object"&&dt.dontIndentOnAutoClose,Rt=Ve.length-1;Rt>=0;Rt--){var Qe=Lt[Rt];Ct.replaceRange(Qe.text,Ve[Rt].head,Ve[Rt].anchor,"+insert");var Pt=Ct.listSelections().slice(0);Pt[Rt]={head:Qe.newPos,anchor:Qe.newPos},Ct.setSelections(Pt),!rt&&Qe.indent&&(Ct.indentLine(Qe.newPos.line,null,!0),Ct.indentLine(Qe.newPos.line+1,null,!0))}}function Ge(Ct,Ve){for(var Lt=Ct.listSelections(),dt=[],Rt=Ve?"/":"</",De=Ct.getOption("autoCloseTags"),ne=typeof De=="object"&&De.dontIndentOnSlash,ee=0;ee<Lt.length;ee++){if(!Lt[ee].empty())return ge.Pass;var ce=Lt[ee].head,se=Ct.getTokenAt(ce),he=ge.innerMode(Ct.getMode(),se.state),ve=he.state;if(Ve&&(se.type=="string"||se.string.charAt(0)!="<"||se.start!=ce.ch-1))return ge.Pass;var be,ke=he.mode.name!="xml"&&Ct.getMode().name=="htmlmixed";if(ke&&he.mode.name=="javascript")be=Rt+"script";else if(ke&&he.mode.name=="css")be=Rt+"style";else{var Be=he.mode.xmlCurrentContext&&he.mode.xmlCurrentContext(ve);if(!Be||Be.length&&Tt(Ct,Be,Be[Be.length-1],ce))return ge.Pass;be=Rt+Be[Be.length-1]}Ct.getLine(ce.line).charAt(se.end)!=">"&&(be+=">"),dt[ee]=be}if(Ct.replaceSelections(dt),Lt=Ct.listSelections(),!ne)for(var ee=0;ee<Lt.length;ee++)(ee==Lt.length-1||Lt[ee].head.line<Lt[ee+1].head.line)&&Ct.indentLine(Lt[ee].head.line)}function Xe(Ct){return Ct.getOption("disableInput")?ge.Pass:Ge(Ct,!0)}ge.commands.closeTag=function(Ct){return Ge(Ct)};function Ne(Ct,Ve){if(Ct.indexOf)return Ct.indexOf(Ve);for(var Lt=0,dt=Ct.length;Lt<dt;++Lt)if(Ct[Lt]==Ve)return Lt;return-1}function Tt(Ct,Ve,Lt,dt,Rt){if(!ge.scanForClosingTag)return!1;var De=Math.min(Ct.lastLine()+1,dt.line+500),ne=ge.scanForClosingTag(Ct,dt,null,De);if(!ne||ne.tag!=Lt)return!1;for(var ee=Rt?1:0,ce=Ve.length-1;ce>=0&&Ve[ce]==Lt;ce--)++ee;dt=ne.to;for(var ce=1;ce<ee;ce++){var se=ge.scanForClosingTag(Ct,dt,null,De);if(!se||se.tag!=Lt)return!1;dt=se.to}return!0}})},32855:function(Vn,xn,pe){(function(ge){ge(pe(89780))})(function(ge){"use strict";var Oe=ge.Pos;function Ke(ce,se){return ce.line-se.line||ce.ch-se.ch}var ut="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",Ge=ut+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Xe=new RegExp("<(/?)(["+ut+"]["+Ge+"]*)","g");function Ne(ce,se,he,ve){this.line=se,this.ch=he,this.cm=ce,this.text=ce.getLine(se),this.min=ve?Math.max(ve.from,ce.firstLine()):ce.firstLine(),this.max=ve?Math.min(ve.to-1,ce.lastLine()):ce.lastLine()}function Tt(ce,se){var he=ce.cm.getTokenTypeAt(Oe(ce.line,se));return he&&/\btag\b/.test(he)}function Ct(ce){if(!(ce.line>=ce.max))return ce.ch=0,ce.text=ce.cm.getLine(++ce.line),!0}function Ve(ce){if(!(ce.line<=ce.min))return ce.text=ce.cm.getLine(--ce.line),ce.ch=ce.text.length,!0}function Lt(ce){for(;;){var se=ce.text.indexOf(">",ce.ch);if(se==-1){if(Ct(ce))continue;return}if(!Tt(ce,se+1)){ce.ch=se+1;continue}var he=ce.text.lastIndexOf("/",se),ve=he>-1&&!/\S/.test(ce.text.slice(he+1,se));return ce.ch=se+1,ve?"selfClose":"regular"}}function dt(ce){for(;;){var se=ce.ch?ce.text.lastIndexOf("<",ce.ch-1):-1;if(se==-1){if(Ve(ce))continue;return}if(!Tt(ce,se+1)){ce.ch=se;continue}Xe.lastIndex=se,ce.ch=se;var he=Xe.exec(ce.text);if(he&&he.index==se)return he}}function Rt(ce){for(;;){Xe.lastIndex=ce.ch;var se=Xe.exec(ce.text);if(!se){if(Ct(ce))continue;return}if(!Tt(ce,se.index+1)){ce.ch=se.index+1;continue}return ce.ch=se.index+se[0].length,se}}function De(ce){for(;;){var se=ce.ch?ce.text.lastIndexOf(">",ce.ch-1):-1;if(se==-1){if(Ve(ce))continue;return}if(!Tt(ce,se+1)){ce.ch=se;continue}var he=ce.text.lastIndexOf("/",se),ve=he>-1&&!/\S/.test(ce.text.slice(he+1,se));return ce.ch=se+1,ve?"selfClose":"regular"}}function ne(ce,se){for(var he=[];;){var ve=Rt(ce),be,ke=ce.line,Be=ce.ch-(ve?ve[0].length:0);if(!ve||!(be=Lt(ce)))return;if(be!="selfClose")if(ve[1]){for(var He=he.length-1;He>=0;--He)if(he[He]==ve[2]){he.length=He;break}if(He<0&&(!se||se==ve[2]))return{tag:ve[2],from:Oe(ke,Be),to:Oe(ce.line,ce.ch)}}else he.push(ve[2])}}function ee(ce,se){for(var he=[];;){var ve=De(ce);if(!ve)return;if(ve=="selfClose"){dt(ce);continue}var be=ce.line,ke=ce.ch,Be=dt(ce);if(!Be)return;if(Be[1])he.push(Be[2]);else{for(var He=he.length-1;He>=0;--He)if(he[He]==Be[2]){he.length=He;break}if(He<0&&(!se||se==Be[2]))return{tag:Be[2],from:Oe(ce.line,ce.ch),to:Oe(be,ke)}}}}ge.registerHelper("fold","xml",function(ce,se){for(var he=new Ne(ce,se.line,0);;){var ve=Rt(he);if(!ve||he.line!=se.line)return;var be=Lt(he);if(!be)return;if(!ve[1]&&be!="selfClose"){var ke=Oe(he.line,he.ch),Be=ne(he,ve[2]);return Be&&Ke(Be.from,ke)>0?{from:ke,to:Be.from}:null}}}),ge.findMatchingTag=function(ce,se,he){var ve=new Ne(ce,se.line,se.ch,he);if(!(ve.text.indexOf(">")==-1&&ve.text.indexOf("<")==-1)){var be=Lt(ve),ke=be&&Oe(ve.line,ve.ch),Be=be&&dt(ve);if(!(!be||!Be||Ke(ve,se)>0)){var He={from:Oe(ve.line,ve.ch),to:ke,tag:Be[2]};return be=="selfClose"?{open:He,close:null,at:"open"}:Be[1]?{open:ee(ve,Be[2]),close:He,at:"close"}:(ve=new Ne(ce,ke.line,ke.ch,he),{open:He,close:ne(ve,Be[2]),at:"open"})}}},ge.findEnclosingTag=function(ce,se,he,ve){for(var be=new Ne(ce,se.line,se.ch,he);;){var ke=ee(be,ve);if(!ke)break;var Be=new Ne(ce,se.line,se.ch,he),He=ne(Be,ke.tag);if(He)return{open:ke,close:He}}},ge.scanForClosingTag=function(ce,se,he,ve){var be=new Ne(ce,se.line,se.ch,ve?{from:0,to:ve}:null);return ne(be,he)}})},89780:function(Vn){(function(xn,pe){Vn.exports=pe()})(this,function(){"use strict";var xn=navigator.userAgent,pe=navigator.platform,ge=/gecko\/\d/i.test(xn),Oe=/MSIE \d/.test(xn),Ke=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(xn),ut=/Edge\/(\d+)/.exec(xn),Ge=Oe||Ke||ut,Xe=Ge&&(Oe?document.documentMode||6:+(ut||Ke)[1]),Ne=!ut&&/WebKit\//.test(xn),Tt=Ne&&/Qt\/\d+\.\d+/.test(xn),Ct=!ut&&/Chrome\//.test(xn),Ve=/Opera\//.test(xn),Lt=/Apple Computer/.test(navigator.vendor),dt=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(xn),Rt=/PhantomJS/.test(xn),De=!ut&&/AppleWebKit/.test(xn)&&/Mobile\/\w+/.test(xn),ne=/Android/.test(xn),ee=De||ne||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(xn),ce=De||/Mac/.test(pe),se=/\bCrOS\b/.test(xn),he=/win/i.test(pe),ve=Ve&&xn.match(/Version\/(\d*\.\d*)/);ve&&(ve=Number(ve[1])),ve&&ve>=15&&(Ve=!1,Ne=!0);var be=ce&&(Tt||Ve&&(ve==null||ve<12.11)),ke=ge||Ge&&Xe>=9;function Be(ie){return new RegExp("(^|\\s)"+ie+"(?:$|\\s)\\s*")}var He=function(ie,ae){var fe=ie.className,de=Be(ae).exec(fe);if(de){var Se=fe.slice(de.index+de[0].length);ie.className=fe.slice(0,de.index)+(Se?de[1]+Se:"")}};function We(ie){for(var ae=ie.childNodes.length;ae>0;--ae)ie.removeChild(ie.firstChild);return ie}function rt(ie,ae){return We(ie).appendChild(ae)}function Qe(ie,ae,fe,de){var Se=document.createElement(ie);if(fe&&(Se.className=fe),de&&(Se.style.cssText=de),typeof ae=="string")Se.appendChild(document.createTextNode(ae));else if(ae)for(var Re=0;Re<ae.length;++Re)Se.appendChild(ae[Re]);return Se}function Pt(ie,ae,fe,de){var Se=Qe(ie,ae,fe,de);return Se.setAttribute("role","presentation"),Se}var Ze;document.createRange?Ze=function(ie,ae,fe,de){var Se=document.createRange();return Se.setEnd(de||ie,fe),Se.setStart(ie,ae),Se}:Ze=function(ie,ae,fe){var de=document.body.createTextRange();try{de.moveToElementText(ie.parentNode)}catch(Se){return de}return de.collapse(!0),de.moveEnd("character",fe),de.moveStart("character",ae),de};function Et(ie,ae){if(ae.nodeType==3&&(ae=ae.parentNode),ie.contains)return ie.contains(ae);do if(ae.nodeType==11&&(ae=ae.host),ae==ie)return!0;while(ae=ae.parentNode)}function it(){var ie;try{ie=document.activeElement}catch(ae){ie=document.body||null}for(;ie&&ie.shadowRoot&&ie.shadowRoot.activeElement;)ie=ie.shadowRoot.activeElement;return ie}function Dt(ie,ae){var fe=ie.className;Be(ae).test(fe)||(ie.className+=(fe?" ":"")+ae)}function ht(ie,ae){for(var fe=ie.split(" "),de=0;de<fe.length;de++)fe[de]&&!Be(fe[de]).test(ae)&&(ae+=" "+fe[de]);return ae}var Ht=function(ie){ie.select()};De?Ht=function(ie){ie.selectionStart=0,ie.selectionEnd=ie.value.length}:Ge&&(Ht=function(ie){try{ie.select()}catch(ae){}});function _t(ie){var ae=Array.prototype.slice.call(arguments,1);return function(){return ie.apply(null,ae)}}function Vt(ie,ae,fe){ae||(ae={});for(var de in ie)ie.hasOwnProperty(de)&&(fe!==!1||!ae.hasOwnProperty(de))&&(ae[de]=ie[de]);return ae}function ot(ie,ae,fe,de,Se){ae==null&&(ae=ie.search(/[^\s\u00a0]/),ae==-1&&(ae=ie.length));for(var Re=de||0,_e=Se||0;;){var ft=ie.indexOf(" ",Re);if(ft<0||ft>=ae)return _e+(ae-Re);_e+=ft-Re,_e+=fe-_e%fe,Re=ft+1}}var Ue=function(){this.id=null,this.f=null,this.time=0,this.handler=_t(this.onTimeout,this)};Ue.prototype.onTimeout=function(ie){ie.id=0,ie.time<=+new Date?ie.f():setTimeout(ie.handler,ie.time-+new Date)},Ue.prototype.set=function(ie,ae){this.f=ae;var fe=+new Date+ie;(!this.id||fe<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,ie),this.time=fe)};function Wt(ie,ae){for(var fe=0;fe<ie.length;++fe)if(ie[fe]==ae)return fe;return-1}var Ln=50,Fn={toString:function(){return"CodeMirror.Pass"}},Gt={scroll:!1},rn={origin:"*mouse"},An={origin:"+move"};function ni(ie,ae,fe){for(var de=0,Se=0;;){var Re=ie.indexOf(" ",de);Re==-1&&(Re=ie.length);var _e=Re-de;if(Re==ie.length||Se+_e>=ae)return de+Math.min(_e,ae-Se);if(Se+=Re-de,Se+=fe-Se%fe,de=Re+1,Se>=ae)return de}}var Sn=[""];function Yn(ie){for(;Sn.length<=ie;)Sn.push(It(Sn)+" ");return Sn[ie]}function It(ie){return ie[ie.length-1]}function wn(ie,ae){for(var fe=[],de=0;de<ie.length;de++)fe[de]=ae(ie[de],de);return fe}function Gn(ie,ae,fe){for(var de=0,Se=fe(ae);de<ie.length&&fe(ie[de])<=Se;)de++;ie.splice(de,0,ae)}function ze(){}function Ee(ie,ae){var fe;return Object.create?fe=Object.create(ie):(ze.prototype=ie,fe=new ze),ae&&Vt(ae,fe),fe}var Pe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Fe(ie){return/\w/.test(ie)||ie>"\x80"&&(ie.toUpperCase()!=ie.toLowerCase()||Pe.test(ie))}function Ae(ie,ae){return ae?ae.source.indexOf("\\w")>-1&&Fe(ie)?!0:ae.test(ie):Fe(ie)}function ye(ie){for(var ae in ie)if(ie.hasOwnProperty(ae)&&ie[ae])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 vt(ie){return ie.charCodeAt(0)>=768&&qe.test(ie)}function et(ie,ae,fe){for(;(fe<0?ae>0:ae<ie.length)&&vt(ie.charAt(ae));)ae+=fe;return ae}function Ye(ie,ae,fe){for(var de=ae>fe?-1:1;;){if(ae==fe)return ae;var Se=(ae+fe)/2,Re=de<0?Math.ceil(Se):Math.floor(Se);if(Re==ae)return ie(Re)?ae:fe;ie(Re)?fe=Re:ae=Re+de}}function xt(ie,ae,fe,de){if(!ie)return de(ae,fe,"ltr",0);for(var Se=!1,Re=0;Re<ie.length;++Re){var _e=ie[Re];(_e.from<fe&&_e.to>ae||ae==fe&&_e.to==ae)&&(de(Math.max(_e.from,ae),Math.min(_e.to,fe),_e.level==1?"rtl":"ltr",Re),Se=!0)}Se||de(ae,fe,"ltr")}var yt=null;function at(ie,ae,fe){var de;yt=null;for(var Se=0;Se<ie.length;++Se){var Re=ie[Se];if(Re.from<ae&&Re.to>ae)return Se;Re.to==ae&&(Re.from!=Re.to&&fe=="before"?de=Se:yt=Se),Re.from==ae&&(Re.from!=Re.to&&fe!="before"?de=Se:yt=Se)}return de!=null?de:yt}var zt=function(){var ie="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ae="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function fe(Zt){return Zt<=247?ie.charAt(Zt):1424<=Zt&&Zt<=1524?"R":1536<=Zt&&Zt<=1785?ae.charAt(Zt-1536):1774<=Zt&&Zt<=2220?"r":8192<=Zt&&Zt<=8203?"w":Zt==8204?"b":"L"}var de=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,Se=/[stwN]/,Re=/[LRr]/,_e=/[Lb1n]/,ft=/[1n]/;function lt(Zt,Rn,Yt){this.level=Zt,this.from=Rn,this.to=Yt}return function(Zt,Rn){var Yt=Rn=="ltr"?"L":"R";if(Zt.length==0||Rn=="ltr"&&!de.test(Zt))return!1;for(var ci=Zt.length,ai=[],tr=0;tr<ci;++tr)ai.push(fe(Zt.charCodeAt(tr)));for(var lr=0,Pr=Yt;lr<ci;++lr){var Vr=ai[lr];Vr=="m"?ai[lr]=Pr:Pr=Vr}for(var yo=0,ao=Yt;yo<ci;++yo){var Eo=ai[yo];Eo=="1"&&ao=="r"?ai[yo]="n":Re.test(Eo)&&(ao=Eo,Eo=="r"&&(ai[yo]="R"))}for(var Qo=1,so=ai[0];Qo<ci-1;++Qo){var ha=ai[Qo];ha=="+"&&so=="1"&&ai[Qo+1]=="1"?ai[Qo]="1":ha==","&&so==ai[Qo+1]&&(so=="1"||so=="n")&&(ai[Qo]=so),so=ha}for(var ws=0;ws<ci;++ws){var Pl=ai[ws];if(Pl==",")ai[ws]="N";else if(Pl=="%"){var ks=void 0;for(ks=ws+1;ks<ci&&ai[ks]=="%";++ks);for(var mu=ws&&ai[ws-1]=="!"||ks<ci&&ai[ks]=="1"?"1":"N",zl=ws;zl<ks;++zl)ai[zl]=mu;ws=ks-1}}for(var fl=0,vu=Yt;fl<ci;++fl){var Nl=ai[fl];vu=="L"&&Nl=="1"?ai[fl]="L":Re.test(Nl)&&(vu=Nl)}for(var gl=0;gl<ci;++gl)if(Se.test(ai[gl])){var Za=void 0;for(Za=gl+1;Za<ci&&Se.test(ai[Za]);++Za);for(var Is=(gl?ai[gl-1]:Yt)=="L",bl=(Za<ci?ai[Za]:Yt)=="L",Fl=Is==bl?Is?"L":"R":Yt,cc=gl;cc<Za;++cc)ai[cc]=Fl;gl=Za-1}for(var Os=[],Zu,xe=0;xe<ci;)if(_e.test(ai[xe])){var Ce=xe;for(++xe;xe<ci&&_e.test(ai[xe]);++xe);Os.push(new lt(0,Ce,xe))}else{var Ie=xe,$e=Os.length,mt=Rn=="rtl"?1:0;for(++xe;xe<ci&&ai[xe]!="L";++xe);for(var gt=Ie;gt<xe;)if(ft.test(ai[gt])){Ie<gt&&(Os.splice($e,0,new lt(1,Ie,gt)),$e+=mt);var Bt=gt;for(++gt;gt<xe&&ft.test(ai[gt]);++gt);Os.splice($e,0,new lt(2,Bt,gt)),$e+=mt,Ie=gt}else++gt;Ie<xe&&Os.splice($e,0,new lt(1,Ie,xe))}return Rn=="ltr"&&(Os[0].level==1&&(Zu=Zt.match(/^\s+/))&&(Os[0].from=Zu[0].length,Os.unshift(new lt(0,0,Zu[0].length))),It(Os).level==1&&(Zu=Zt.match(/\s+$/))&&(It(Os).to-=Zu[0].length,Os.push(new lt(0,ci-Zu[0].length,ci)))),Rn=="rtl"?Os.reverse():Os}}();function un(ie,ae){var fe=ie.order;return fe==null&&(fe=ie.order=zt(ie.text,ae)),fe}var fn=[],Qt=function(ie,ae,fe){if(ie.addEventListener)ie.addEventListener(ae,fe,!1);else if(ie.attachEvent)ie.attachEvent("on"+ae,fe);else{var de=ie._handlers||(ie._handlers={});de[ae]=(de[ae]||fn).concat(fe)}};function Kn(ie,ae){return ie._handlers&&ie._handlers[ae]||fn}function On(ie,ae,fe){if(ie.removeEventListener)ie.removeEventListener(ae,fe,!1);else if(ie.detachEvent)ie.detachEvent("on"+ae,fe);else{var de=ie._handlers,Se=de&&de[ae];if(Se){var Re=Wt(Se,fe);Re>-1&&(de[ae]=Se.slice(0,Re).concat(Se.slice(Re+1)))}}}function jt(ie,ae){var fe=Kn(ie,ae);if(fe.length)for(var de=Array.prototype.slice.call(arguments,2),Se=0;Se<fe.length;++Se)fe[Se].apply(null,de)}function sn(ie,ae,fe){return typeof ae=="string"&&(ae={type:ae,preventDefault:function(){this.defaultPrevented=!0}}),jt(ie,fe||ae.type,ie,ae),gi(ae)||ae.codemirrorIgnore}function jn(ie){var ae=ie._handlers&&ie._handlers.cursorActivity;if(ae)for(var fe=ie.curOp.cursorActivityHandlers||(ie.curOp.cursorActivityHandlers=[]),de=0;de<ae.length;++de)Wt(fe,ae[de])==-1&&fe.push(ae[de])}function dn(ie,ae){return Kn(ie,ae).length>0}function Pn(ie){ie.prototype.on=function(ae,fe){Qt(this,ae,fe)},ie.prototype.off=function(ae,fe){On(this,ae,fe)}}function ui(ie){ie.preventDefault?ie.preventDefault():ie.returnValue=!1}function pi(ie){ie.stopPropagation?ie.stopPropagation():ie.cancelBubble=!0}function gi(ie){return ie.defaultPrevented!=null?ie.defaultPrevented:ie.returnValue==!1}function bi(ie){ui(ie),pi(ie)}function Xi(ie){return ie.target||ie.srcElement}function ar(ie){var ae=ie.which;return ae==null&&(ie.button&1?ae=1:ie.button&2?ae=3:ie.button&4&&(ae=2)),ce&&ie.ctrlKey&&ae==1&&(ae=3),ae}var Ji=function(){if(Ge&&Xe<9)return!1;var ie=Qe("div");return"draggable"in ie||"dragDrop"in ie}(),wr;function mr(ie){if(wr==null){var ae=Qe("span","\u200B");rt(ie,Qe("span",[ae,document.createTextNode("x")])),ie.firstChild.offsetHeight!=0&&(wr=ae.offsetWidth<=1&&ae.offsetHeight>2&&!(Ge&&Xe<8))}var fe=wr?Qe("span","\u200B"):Qe("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return fe.setAttribute("cm-text",""),fe}var Hi;function Er(ie){if(Hi!=null)return Hi;var ae=rt(ie,document.createTextNode("A\u062EA")),fe=Ze(ae,0,1).getBoundingClientRect(),de=Ze(ae,1,2).getBoundingClientRect();return We(ie),!fe||fe.left==fe.right?!1:Hi=de.right-fe.right<3}var $n=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(ie){for(var ae=0,fe=[],de=ie.length;ae<=de;){var Se=ie.indexOf(`
|
|
|
`,ae);Se==-1&&(Se=ie.length);var Re=ie.slice(ae,ie.charAt(Se-1)=="\r"?Se-1:Se),_e=Re.indexOf("\r");_e!=-1?(fe.push(Re.slice(0,_e)),ae+=_e+1):(fe.push(Re),ae=Se+1)}return fe}:function(ie){return ie.split(/\r\n?|\n/)},Le=window.getSelection?function(ie){try{return ie.selectionStart!=ie.selectionEnd}catch(ae){return!1}}:function(ie){var ae;try{ae=ie.ownerDocument.selection.createRange()}catch(fe){}return!ae||ae.parentElement()!=ie?!1:ae.compareEndPoints("StartToEnd",ae)!=0},Ei=function(){var ie=Qe("div");return"oncopy"in ie?!0:(ie.setAttribute("oncopy","return;"),typeof ie.oncopy=="function")}(),Ri=null;function nn(ie){if(Ri!=null)return Ri;var ae=rt(ie,Qe("span","x")),fe=ae.getBoundingClientRect(),de=Ze(ae,0,1).getBoundingClientRect();return Ri=Math.abs(fe.left-de.left)>1}var di={},yi={};function Li(ie,ae){arguments.length>2&&(ae.dependencies=Array.prototype.slice.call(arguments,2)),di[ie]=ae}function Tn(ie,ae){yi[ie]=ae}function Un(ie){if(typeof ie=="string"&&yi.hasOwnProperty(ie))ie=yi[ie];else if(ie&&typeof ie.name=="string"&&yi.hasOwnProperty(ie.name)){var ae=yi[ie.name];typeof ae=="string"&&(ae={name:ae}),ie=Ee(ae,ie),ie.name=ae.name}else{if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(ie))return Un("application/xml");if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(ie))return Un("application/json")}return typeof ie=="string"?{name:ie}:ie||{name:"null"}}function kt(ie,ae){ae=Un(ae);var fe=di[ae.name];if(!fe)return kt(ie,"text/plain");var de=fe(ie,ae);if($t.hasOwnProperty(ae.name)){var Se=$t[ae.name];for(var Re in Se)Se.hasOwnProperty(Re)&&(de.hasOwnProperty(Re)&&(de["_"+Re]=de[Re]),de[Re]=Se[Re])}if(de.name=ae.name,ae.helperType&&(de.helperType=ae.helperType),ae.modeProps)for(var _e in ae.modeProps)de[_e]=ae.modeProps[_e];return de}var $t={};function Je(ie,ae){var fe=$t.hasOwnProperty(ie)?$t[ie]:$t[ie]={};Vt(ae,fe)}function qt(ie,ae){if(ae===!0)return ae;if(ie.copyState)return ie.copyState(ae);var fe={};for(var de in ae){var Se=ae[de];Se instanceof Array&&(Se=Se.concat([])),fe[de]=Se}return fe}function vn(ie,ae){for(var fe;ie.innerMode&&(fe=ie.innerMode(ae),!(!fe||fe.mode==ie));)ae=fe.state,ie=fe.mode;return fe||{mode:ie,state:ae}}function Ft(ie,ae,fe){return ie.startState?ie.startState(ae,fe):!0}var st=function(ie,ae,fe){this.pos=this.start=0,this.string=ie,this.tabSize=ae||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=fe};st.prototype.eol=function(){return this.pos>=this.string.length},st.prototype.sol=function(){return this.pos==this.lineStart},st.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},st.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},st.prototype.eat=function(ie){var ae=this.string.charAt(this.pos),fe;if(typeof ie=="string"?fe=ae==ie:fe=ae&&(ie.test?ie.test(ae):ie(ae)),fe)return++this.pos,ae},st.prototype.eatWhile=function(ie){for(var ae=this.pos;this.eat(ie););return this.pos>ae},st.prototype.eatSpace=function(){for(var ie=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>ie},st.prototype.skipToEnd=function(){this.pos=this.string.length},st.prototype.skipTo=function(ie){var ae=this.string.indexOf(ie,this.pos);if(ae>-1)return this.pos=ae,!0},st.prototype.backUp=function(ie){this.pos-=ie},st.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ot(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ot(this.string,this.lineStart,this.tabSize):0)},st.prototype.indentation=function(){return ot(this.string,null,this.tabSize)-(this.lineStart?ot(this.string,this.lineStart,this.tabSize):0)},st.prototype.match=function(ie,ae,fe){if(typeof ie=="string"){var de=function(_e){return fe?_e.toLowerCase():_e},Se=this.string.substr(this.pos,ie.length);if(de(Se)==de(ie))return ae!==!1&&(this.pos+=ie.length),!0}else{var Re=this.string.slice(this.pos).match(ie);return Re&&Re.index>0?null:(Re&&ae!==!1&&(this.pos+=Re[0].length),Re)}},st.prototype.current=function(){return this.string.slice(this.start,this.pos)},st.prototype.hideFirstChars=function(ie,ae){this.lineStart+=ie;try{return ae()}finally{this.lineStart-=ie}},st.prototype.lookAhead=function(ie){var ae=this.lineOracle;return ae&&ae.lookAhead(ie)},st.prototype.baseToken=function(){var ie=this.lineOracle;return ie&&ie.baseToken(this.pos)};function on(ie,ae){if(ae-=ie.first,ae<0||ae>=ie.size)throw new Error("There is no line "+(ae+ie.first)+" in the document.");for(var fe=ie;!fe.lines;)for(var de=0;;++de){var Se=fe.children[de],Re=Se.chunkSize();if(ae<Re){fe=Se;break}ae-=Re}return fe.lines[ae]}function En(ie,ae,fe){var de=[],Se=ae.line;return ie.iter(ae.line,fe.line+1,function(Re){var _e=Re.text;Se==fe.line&&(_e=_e.slice(0,fe.ch)),Se==ae.line&&(_e=_e.slice(ae.ch)),de.push(_e),++Se}),de}function Dn(ie,ae,fe){var de=[];return ie.iter(ae,fe,function(Se){de.push(Se.text)}),de}function Jn(ie,ae){var fe=ae-ie.height;if(fe)for(var de=ie;de;de=de.parent)de.height+=fe}function St(ie){if(ie.parent==null)return null;for(var ae=ie.parent,fe=Wt(ae.lines,ie),de=ae.parent;de;ae=de,de=de.parent)for(var Se=0;de.children[Se]!=ae;++Se)fe+=de.children[Se].chunkSize();return fe+ae.first}function Nn(ie,ae){var fe=ie.first;e:do{for(var de=0;de<ie.children.length;++de){var Se=ie.children[de],Re=Se.height;if(ae<Re){ie=Se;continue e}ae-=Re,fe+=Se.chunkSize()}return fe}while(!ie.lines);for(var _e=0;_e<ie.lines.length;++_e){var ft=ie.lines[_e],lt=ft.height;if(ae<lt)break;ae-=lt}return fe+_e}function qn(ie,ae){return ae>=ie.first&&ae<ie.first+ie.size}function Si(ie,ae){return String(ie.lineNumberFormatter(ae+ie.firstLineNumber))}function en(ie,ae,fe){if(fe===void 0&&(fe=null),!(this instanceof en))return new en(ie,ae,fe);this.line=ie,this.ch=ae,this.sticky=fe}function Cn(ie,ae){return ie.line-ae.line||ie.ch-ae.ch}function At(ie,ae){return ie.sticky==ae.sticky&&Cn(ie,ae)==0}function yn(ie){return en(ie.line,ie.ch)}function pn(ie,ae){return Cn(ie,ae)<0?ae:ie}function mn(ie,ae){return Cn(ie,ae)<0?ie:ae}function Wn(ie,ae){return Math.max(ie.first,Math.min(ae,ie.first+ie.size-1))}function Hn(ie,ae){if(ae.line<ie.first)return en(ie.first,0);var fe=ie.first+ie.size-1;return ae.line>fe?en(fe,on(ie,fe).text.length):Qn(ae,on(ie,ae.line).text.length)}function Qn(ie,ae){var fe=ie.ch;return fe==null||fe>ae?en(ie.line,ae):fe<0?en(ie.line,0):ie}function ii(ie,ae){for(var fe=[],de=0;de<ae.length;de++)fe[de]=Hn(ie,ae[de]);return fe}var ji=function(ie,ae){this.state=ie,this.lookAhead=ae},cn=function(ie,ae,fe,de){this.state=ae,this.doc=ie,this.line=fe,this.maxLookAhead=de||0,this.baseTokens=null,this.baseTokenPos=1};cn.prototype.lookAhead=function(ie){var ae=this.doc.getLine(this.line+ie);return ae!=null&&ie>this.maxLookAhead&&(this.maxLookAhead=ie),ae},cn.prototype.baseToken=function(ie){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=ie;)this.baseTokenPos+=2;var ae=this.baseTokens[this.baseTokenPos+1];return{type:ae&&ae.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-ie}},cn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},cn.fromSaved=function(ie,ae,fe){return ae instanceof ji?new cn(ie,qt(ie.mode,ae.state),fe,ae.lookAhead):new cn(ie,qt(ie.mode,ae),fe)},cn.prototype.save=function(ie){var ae=ie!==!1?qt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ji(ae,this.maxLookAhead):ae};function Yi(ie,ae,fe,de){var Se=[ie.state.modeGen],Re={};gr(ie,ae.text,ie.doc.mode,fe,function(Zt,Rn){return Se.push(Zt,Rn)},Re,de);for(var _e=fe.state,ft=function(Zt){fe.baseTokens=Se;var Rn=ie.state.overlays[Zt],Yt=1,ci=0;fe.state=!0,gr(ie,ae.text,Rn.mode,fe,function(ai,tr){for(var lr=Yt;ci<ai;){var Pr=Se[Yt];Pr>ai&&Se.splice(Yt,1,ai,Se[Yt+1],Pr),Yt+=2,ci=Math.min(ai,Pr)}if(tr)if(Rn.opaque)Se.splice(lr,Yt-lr,ai,"overlay "+tr),Yt=lr+2;else for(;lr<Yt;lr+=2){var Vr=Se[lr+1];Se[lr+1]=(Vr?Vr+" ":"")+"overlay "+tr}},Re),fe.state=_e,fe.baseTokens=null,fe.baseTokenPos=1},lt=0;lt<ie.state.overlays.length;++lt)ft(lt);return{styles:Se,classes:Re.bgClass||Re.textClass?Re:null}}function $i(ie,ae,fe){if(!ae.styles||ae.styles[0]!=ie.state.modeGen){var de=Wi(ie,St(ae)),Se=ae.text.length>ie.options.maxHighlightLength&&qt(ie.doc.mode,de.state),Re=Yi(ie,ae,de);Se&&(de.state=Se),ae.stateAfter=de.save(!Se),ae.styles=Re.styles,Re.classes?ae.styleClasses=Re.classes:ae.styleClasses&&(ae.styleClasses=null),fe===ie.doc.highlightFrontier&&(ie.doc.modeFrontier=Math.max(ie.doc.modeFrontier,++ie.doc.highlightFrontier))}return ae.styles}function Wi(ie,ae,fe){var de=ie.doc,Se=ie.display;if(!de.mode.startState)return new cn(de,!0,ae);var Re=hr(ie,ae,fe),_e=Re>de.first&&on(de,Re-1).stateAfter,ft=_e?cn.fromSaved(de,_e,Re):new cn(de,Ft(de.mode),Re);return de.iter(Re,ae,function(lt){ln(ie,lt.text,ft);var Zt=ft.line;lt.stateAfter=Zt==ae-1||Zt%5==0||Zt>=Se.viewFrom&&Zt<Se.viewTo?ft.save():null,ft.nextLine()}),fe&&(de.modeFrontier=ft.line),ft}function ln(ie,ae,fe,de){var Se=ie.doc.mode,Re=new st(ae,ie.options.tabSize,fe);for(Re.start=Re.pos=de||0,ae==""&&oi(Se,fe.state);!Re.eol();)Bi(Se,Re,fe.state),Re.start=Re.pos}function oi(ie,ae){if(ie.blankLine)return ie.blankLine(ae);if(ie.innerMode){var fe=vn(ie,ae);if(fe.mode.blankLine)return fe.mode.blankLine(fe.state)}}function Bi(ie,ae,fe,de){for(var Se=0;Se<10;Se++){de&&(de[0]=vn(ie,fe).mode);var Re=ie.token(ae,fe);if(ae.pos>ae.start)return Re}throw new Error("Mode "+ie.name+" failed to advance stream.")}var Gi=function(ie,ae,fe){this.start=ie.start,this.end=ie.pos,this.string=ie.current(),this.type=ae||null,this.state=fe};function Ti(ie,ae,fe,de){var Se=ie.doc,Re=Se.mode,_e;ae=Hn(Se,ae);var ft=on(Se,ae.line),lt=Wi(ie,ae.line,fe),Zt=new st(ft.text,ie.options.tabSize,lt),Rn;for(de&&(Rn=[]);(de||Zt.pos<ae.ch)&&!Zt.eol();)Zt.start=Zt.pos,_e=Bi(Re,Zt,lt.state),de&&Rn.push(new Gi(Zt,_e,qt(Se.mode,lt.state)));return de?Rn:new Gi(Zt,_e,lt.state)}function Qi(ie,ae){if(ie)for(;;){var fe=ie.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!fe)break;ie=ie.slice(0,fe.index)+ie.slice(fe.index+fe[0].length);var de=fe[1]?"bgClass":"textClass";ae[de]==null?ae[de]=fe[2]:new RegExp("(?:^|\\s)"+fe[2]+"(?:$|\\s)").test(ae[de])||(ae[de]+=" "+fe[2])}return ie}function gr(ie,ae,fe,de,Se,Re,_e){var ft=fe.flattenSpans;ft==null&&(ft=ie.options.flattenSpans);var lt=0,Zt=null,Rn=new st(ae,ie.options.tabSize,de),Yt,ci=ie.options.addModeClass&&[null];for(ae==""&&Qi(oi(fe,de.state),Re);!Rn.eol();){if(Rn.pos>ie.options.maxHighlightLength?(ft=!1,_e&&ln(ie,ae,de,Rn.pos),Rn.pos=ae.length,Yt=null):Yt=Qi(Bi(fe,Rn,de.state,ci),Re),ci){var ai=ci[0].name;ai&&(Yt="m-"+(Yt?ai+" "+Yt:ai))}if(!ft||Zt!=Yt){for(;lt<Rn.start;)lt=Math.min(Rn.start,lt+5e3),Se(lt,Zt);Zt=Yt}Rn.start=Rn.pos}for(;lt<Rn.pos;){var tr=Math.min(Rn.pos,lt+5e3);Se(tr,Zt),lt=tr}}function hr(ie,ae,fe){for(var de,Se,Re=ie.doc,_e=fe?-1:ae-(ie.doc.mode.innerMode?1e3:100),ft=ae;ft>_e;--ft){if(ft<=Re.first)return Re.first;var lt=on(Re,ft-1),Zt=lt.stateAfter;if(Zt&&(!fe||ft+(Zt instanceof ji?Zt.lookAhead:0)<=Re.modeFrontier))return ft;var Rn=ot(lt.text,null,ie.options.tabSize);(Se==null||de>Rn)&&(Se=ft-1,de=Rn)}return Se}function Ki(ie,ae){if(ie.modeFrontier=Math.min(ie.modeFrontier,ae),!(ie.highlightFrontier<ae-10)){for(var fe=ie.first,de=ae-1;de>fe;de--){var Se=on(ie,de).stateAfter;if(Se&&(!(Se instanceof ji)||de+Se.lookAhead<ae)){fe=de+1;break}}ie.highlightFrontier=Math.min(ie.highlightFrontier,fe)}}var Sr=!1,kn=!1;function Br(){Sr=!0}function _n(){kn=!0}function Or(ie,ae,fe){this.marker=ie,this.from=ae,this.to=fe}function no(ie,ae){if(ie)for(var fe=0;fe<ie.length;++fe){var de=ie[fe];if(de.marker==ae)return de}}function br(ie,ae){for(var fe,de=0;de<ie.length;++de)ie[de]!=ae&&(fe||(fe=[])).push(ie[de]);return fe}function mo(ie,ae){ie.markedSpans=ie.markedSpans?ie.markedSpans.concat([ae]):[ae],ae.marker.attachLine(ie)}function Jr(ie,ae,fe){var de;if(ie)for(var Se=0;Se<ie.length;++Se){var Re=ie[Se],_e=Re.marker,ft=Re.from==null||(_e.inclusiveLeft?Re.from<=ae:Re.from<ae);if(ft||Re.from==ae&&_e.type=="bookmark"&&(!fe||!Re.marker.insertLeft)){var lt=Re.to==null||(_e.inclusiveRight?Re.to>=ae:Re.to>ae);(de||(de=[])).push(new Or(_e,Re.from,lt?null:Re.to))}}return de}function ur(ie,ae,fe){var de;if(ie)for(var Se=0;Se<ie.length;++Se){var Re=ie[Se],_e=Re.marker,ft=Re.to==null||(_e.inclusiveRight?Re.to>=ae:Re.to>ae);if(ft||Re.from==ae&&_e.type=="bookmark"&&(!fe||Re.marker.insertLeft)){var lt=Re.from==null||(_e.inclusiveLeft?Re.from<=ae:Re.from<ae);(de||(de=[])).push(new Or(_e,lt?null:Re.from-ae,Re.to==null?null:Re.to-ae))}}return de}function er(ie,ae){if(ae.full)return null;var fe=qn(ie,ae.from.line)&&on(ie,ae.from.line).markedSpans,de=qn(ie,ae.to.line)&&on(ie,ae.to.line).markedSpans;if(!fe&&!de)return null;var Se=ae.from.ch,Re=ae.to.ch,_e=Cn(ae.from,ae.to)==0,ft=Jr(fe,Se,_e),lt=ur(de,Re,_e),Zt=ae.text.length==1,Rn=It(ae.text).length+(Zt?Se:0);if(ft)for(var Yt=0;Yt<ft.length;++Yt){var ci=ft[Yt];if(ci.to==null){var ai=no(lt,ci.marker);ai?Zt&&(ci.to=ai.to==null?null:ai.to+Rn):ci.to=Se}}if(lt)for(var tr=0;tr<lt.length;++tr){var lr=lt[tr];if(lr.to!=null&&(lr.to+=Rn),lr.from==null){var Pr=no(ft,lr.marker);Pr||(lr.from=Rn,Zt&&(ft||(ft=[])).push(lr))}else lr.from+=Rn,Zt&&(ft||(ft=[])).push(lr)}ft&&(ft=qi(ft)),lt&<!=ft&&(lt=qi(lt));var Vr=[ft];if(!Zt){var yo=ae.text.length-2,ao;if(yo>0&&ft)for(var Eo=0;Eo<ft.length;++Eo)ft[Eo].to==null&&(ao||(ao=[])).push(new Or(ft[Eo].marker,null,null));for(var Qo=0;Qo<yo;++Qo)Vr.push(ao);Vr.push(lt)}return Vr}function qi(ie){for(var ae=0;ae<ie.length;++ae){var fe=ie[ae];fe.from!=null&&fe.from==fe.to&&fe.marker.clearWhenEmpty!==!1&&ie.splice(ae--,1)}return ie.length?ie:null}function Rr(ie,ae,fe){var de=null;if(ie.iter(ae.line,fe.line+1,function(ai){if(ai.markedSpans)for(var tr=0;tr<ai.markedSpans.length;++tr){var lr=ai.markedSpans[tr].marker;lr.readOnly&&(!de||Wt(de,lr)==-1)&&(de||(de=[])).push(lr)}}),!de)return null;for(var Se=[{from:ae,to:fe}],Re=0;Re<de.length;++Re)for(var _e=de[Re],ft=_e.find(0),lt=0;lt<Se.length;++lt){var Zt=Se[lt];if(!(Cn(Zt.to,ft.from)<0||Cn(Zt.from,ft.to)>0)){var Rn=[lt,1],Yt=Cn(Zt.from,ft.from),ci=Cn(Zt.to,ft.to);(Yt<0||!_e.inclusiveLeft&&!Yt)&&Rn.push({from:Zt.from,to:ft.from}),(ci>0||!_e.inclusiveRight&&!ci)&&Rn.push({from:ft.to,to:Zt.to}),Se.splice.apply(Se,Rn),lt+=Rn.length-3}}return Se}function Ii(ie){var ae=ie.markedSpans;if(ae){for(var fe=0;fe<ae.length;++fe)ae[fe].marker.detachLine(ie);ie.markedSpans=null}}function tt(ie,ae){if(ae){for(var fe=0;fe<ae.length;++fe)ae[fe].marker.attachLine(ie);ie.markedSpans=ae}}function Qr(ie){return ie.inclusiveLeft?-1:0}function lo(ie){return ie.inclusiveRight?1:0}function jr(ie,ae){var fe=ie.lines.length-ae.lines.length;if(fe!=0)return fe;var de=ie.find(),Se=ae.find(),Re=Cn(de.from,Se.from)||Qr(ie)-Qr(ae);if(Re)return-Re;var _e=Cn(de.to,Se.to)||lo(ie)-lo(ae);return _e||ae.id-ie.id}function vo(ie,ae){var fe=kn&&ie.markedSpans,de;if(fe)for(var Se=void 0,Re=0;Re<fe.length;++Re)Se=fe[Re],Se.marker.collapsed&&(ae?Se.from:Se.to)==null&&(!de||jr(de,Se.marker)<0)&&(de=Se.marker);return de}function po(ie){return vo(ie,!0)}function Lr(ie){return vo(ie,!1)}function Fr(ie,ae){var fe=kn&&ie.markedSpans,de;if(fe)for(var Se=0;Se<fe.length;++Se){var Re=fe[Se];Re.marker.collapsed&&(Re.from==null||Re.from<ae)&&(Re.to==null||Re.to>ae)&&(!de||jr(de,Re.marker)<0)&&(de=Re.marker)}return de}function uo(ie,ae,fe,de,Se){var Re=on(ie,ae),_e=kn&&Re.markedSpans;if(_e)for(var ft=0;ft<_e.length;++ft){var lt=_e[ft];if(lt.marker.collapsed){var Zt=lt.marker.find(0),Rn=Cn(Zt.from,fe)||Qr(lt.marker)-Qr(Se),Yt=Cn(Zt.to,de)||lo(lt.marker)-lo(Se);if(!(Rn>=0&&Yt<=0||Rn<=0&&Yt>=0)&&(Rn<=0&&(lt.marker.inclusiveRight&&Se.inclusiveLeft?Cn(Zt.to,fe)>=0:Cn(Zt.to,fe)>0)||Rn>=0&&(lt.marker.inclusiveRight&&Se.inclusiveLeft?Cn(Zt.from,de)<=0:Cn(Zt.from,de)<0)))return!0}}}function qr(ie){for(var ae;ae=po(ie);)ie=ae.find(-1,!0).line;return ie}function zo(ie){for(var ae;ae=Lr(ie);)ie=ae.find(1,!0).line;return ie}function Ro(ie){for(var ae,fe;ae=Lr(ie);)ie=ae.find(1,!0).line,(fe||(fe=[])).push(ie);return fe}function Mr(ie,ae){var fe=on(ie,ae),de=qr(fe);return fe==de?ae:St(de)}function Nr(ie,ae){if(ae>ie.lastLine())return ae;var fe=on(ie,ae),de;if(!fi(ie,fe))return ae;for(;de=Lr(fe);)fe=de.find(1,!0).line;return St(fe)+1}function fi(ie,ae){var fe=kn&&ae.markedSpans;if(fe){for(var de=void 0,Se=0;Se<fe.length;++Se)if(de=fe[Se],!!de.marker.collapsed){if(de.from==null)return!0;if(!de.marker.widgetNode&&de.from==0&&de.marker.inclusiveLeft&&Tr(ie,ae,de))return!0}}}function Tr(ie,ae,fe){if(fe.to==null){var de=fe.marker.find(1,!0);return Tr(ie,de.line,no(de.line.markedSpans,fe.marker))}if(fe.marker.inclusiveRight&&fe.to==ae.text.length)return!0;for(var Se=void 0,Re=0;Re<ae.markedSpans.length;++Re)if(Se=ae.markedSpans[Re],Se.marker.collapsed&&!Se.marker.widgetNode&&Se.from==fe.to&&(Se.to==null||Se.to!=fe.from)&&(Se.marker.inclusiveLeft||fe.marker.inclusiveRight)&&Tr(ie,ae,Se))return!0}function Bo(ie){ie=qr(ie);for(var ae=0,fe=ie.parent,de=0;de<fe.lines.length;++de){var Se=fe.lines[de];if(Se==ie)break;ae+=Se.height}for(var Re=fe.parent;Re;fe=Re,Re=fe.parent)for(var _e=0;_e<Re.children.length;++_e){var ft=Re.children[_e];if(ft==fe)break;ae+=ft.height}return ae}function aa(ie){if(ie.height==0)return 0;for(var ae=ie.text.length,fe,de=ie;fe=po(de);){var Se=fe.find(0,!0);de=Se.from.line,ae+=Se.from.ch-Se.to.ch}for(de=ie;fe=Lr(de);){var Re=fe.find(0,!0);ae-=de.text.length-Re.from.ch,de=Re.to.line,ae+=de.text.length-Re.to.ch}return ae}function Ho(ie){var ae=ie.display,fe=ie.doc;ae.maxLine=on(fe,fe.first),ae.maxLineLength=aa(ae.maxLine),ae.maxLineChanged=!0,fe.iter(function(de){var Se=aa(de);Se>ae.maxLineLength&&(ae.maxLineLength=Se,ae.maxLine=de)})}var Ao=function(ie,ae,fe){this.text=ie,tt(this,ae),this.height=fe?fe(this):1};Ao.prototype.lineNo=function(){return St(this)},Pn(Ao);function _o(ie,ae,fe,de){ie.text=ae,ie.stateAfter&&(ie.stateAfter=null),ie.styles&&(ie.styles=null),ie.order!=null&&(ie.order=null),Ii(ie),tt(ie,fe);var Se=de?de(ie):1;Se!=ie.height&&Jn(ie,Se)}function ta(ie){ie.parent=null,Ii(ie)}var Ea={},Mt={};function Pi(ie,ae){if(!ie||/^\s*$/.test(ie))return null;var fe=ae.addModeClass?Mt:Ea;return fe[ie]||(fe[ie]=ie.replace(/\S+/g,"cm-$&"))}function Ut(ie,ae){var fe=Pt("span",null,null,Ne?"padding-right: .1px":null),de={pre:Pt("pre",[fe],"CodeMirror-line"),content:fe,col:0,pos:0,cm:ie,trailingSpace:!1,splitSpaces:ie.getOption("lineWrapping")};ae.measure={};for(var Se=0;Se<=(ae.rest?ae.rest.length:0);Se++){var Re=Se?ae.rest[Se-1]:ae.line,_e=void 0;de.pos=0,de.addToken=wi,Er(ie.display.measure)&&(_e=un(Re,ie.doc.direction))&&(de.addToken=Zi(de.addToken,_e)),de.map=[];var ft=ae!=ie.display.externalMeasured&&St(Re);nr(Re,de,$i(ie,Re,ft)),Re.styleClasses&&(Re.styleClasses.bgClass&&(de.bgClass=ht(Re.styleClasses.bgClass,de.bgClass||"")),Re.styleClasses.textClass&&(de.textClass=ht(Re.styleClasses.textClass,de.textClass||""))),de.map.length==0&&de.map.push(0,0,de.content.appendChild(mr(ie.display.measure))),Se==0?(ae.measure.map=de.map,ae.measure.cache={}):((ae.measure.maps||(ae.measure.maps=[])).push(de.map),(ae.measure.caches||(ae.measure.caches=[])).push({}))}if(Ne){var lt=de.content.lastChild;(/\bcm-tab\b/.test(lt.className)||lt.querySelector&<.querySelector(".cm-tab"))&&(de.content.className="cm-tab-wrap-hack")}return jt(ie,"renderLine",ie,ae.line,de.pre),de.pre.className&&(de.textClass=ht(de.pre.className,de.textClass||"")),de}function Ui(ie){var ae=Qe("span","\u2022","cm-invalidchar");return ae.title="\\u"+ie.charCodeAt(0).toString(16),ae.setAttribute("aria-label",ae.title),ae}function wi(ie,ae,fe,de,Se,Re,_e){if(ae){var ft=ie.splitSpaces?yr(ae,ie.trailingSpace):ae,lt=ie.cm.state.specialChars,Zt=!1,Rn;if(!lt.test(ae))ie.col+=ae.length,Rn=document.createTextNode(ft),ie.map.push(ie.pos,ie.pos+ae.length,Rn),Ge&&Xe<9&&(Zt=!0),ie.pos+=ae.length;else{Rn=document.createDocumentFragment();for(var Yt=0;;){lt.lastIndex=Yt;var ci=lt.exec(ae),ai=ci?ci.index-Yt:ae.length-Yt;if(ai){var tr=document.createTextNode(ft.slice(Yt,Yt+ai));Ge&&Xe<9?Rn.appendChild(Qe("span",[tr])):Rn.appendChild(tr),ie.map.push(ie.pos,ie.pos+ai,tr),ie.col+=ai,ie.pos+=ai}if(!ci)break;Yt+=ai+1;var lr=void 0;if(ci[0]==" "){var Pr=ie.cm.options.tabSize,Vr=Pr-ie.col%Pr;lr=Rn.appendChild(Qe("span",Yn(Vr),"cm-tab")),lr.setAttribute("role","presentation"),lr.setAttribute("cm-text"," "),ie.col+=Vr}else ci[0]=="\r"||ci[0]==`
|
|
|
`?(lr=Rn.appendChild(Qe("span",ci[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),lr.setAttribute("cm-text",ci[0]),ie.col+=1):(lr=ie.cm.options.specialCharPlaceholder(ci[0]),lr.setAttribute("cm-text",ci[0]),Ge&&Xe<9?Rn.appendChild(Qe("span",[lr])):Rn.appendChild(lr),ie.col+=1);ie.map.push(ie.pos,ie.pos+1,lr),ie.pos++}}if(ie.trailingSpace=ft.charCodeAt(ae.length-1)==32,fe||de||Se||Zt||Re||_e){var yo=fe||"";de&&(yo+=de),Se&&(yo+=Se);var ao=Qe("span",[Rn],yo,Re);if(_e)for(var Eo in _e)_e.hasOwnProperty(Eo)&&Eo!="style"&&Eo!="class"&&ao.setAttribute(Eo,_e[Eo]);return ie.content.appendChild(ao)}ie.content.appendChild(Rn)}}function yr(ie,ae){if(ie.length>1&&!/ /.test(ie))return ie;for(var fe=ae,de="",Se=0;Se<ie.length;Se++){var Re=ie.charAt(Se);Re==" "&&fe&&(Se==ie.length-1||ie.charCodeAt(Se+1)==32)&&(Re="\xA0"),de+=Re,fe=Re==" "}return de}function Zi(ie,ae){return function(fe,de,Se,Re,_e,ft,lt){Se=Se?Se+" cm-force-border":"cm-force-border";for(var Zt=fe.pos,Rn=Zt+de.length;;){for(var Yt=void 0,ci=0;ci<ae.length&&(Yt=ae[ci],!(Yt.to>Zt&&Yt.from<=Zt));ci++);if(Yt.to>=Rn)return ie(fe,de,Se,Re,_e,ft,lt);ie(fe,de.slice(0,Yt.to-Zt),Se,Re,null,ft,lt),Re=null,de=de.slice(Yt.to-Zt),Zt=Yt.to}}}function Ci(ie,ae,fe,de){var Se=!de&&fe.widgetNode;Se&&ie.map.push(ie.pos,ie.pos+ae,Se),!de&&ie.cm.display.input.needsContentAttribute&&(Se||(Se=ie.content.appendChild(document.createElement("span"))),Se.setAttribute("cm-marker",fe.id)),Se&&(ie.cm.display.input.setUneditable(Se),ie.content.appendChild(Se)),ie.pos+=ae,ie.trailingSpace=!1}function nr(ie,ae,fe){var de=ie.markedSpans,Se=ie.text,Re=0;if(!de){for(var _e=1;_e<fe.length;_e+=2)ae.addToken(ae,Se.slice(Re,Re=fe[_e]),Pi(fe[_e+1],ae.cm.options));return}for(var ft=Se.length,lt=0,Zt=1,Rn="",Yt,ci,ai=0,tr,lr,Pr,Vr,yo;;){if(ai==lt){tr=lr=Pr=ci="",yo=null,Vr=null,ai=1/0;for(var ao=[],Eo=void 0,Qo=0;Qo<de.length;++Qo){var so=de[Qo],ha=so.marker;if(ha.type=="bookmark"&&so.from==lt&&ha.widgetNode)ao.push(ha);else if(so.from<=lt&&(so.to==null||so.to>lt||ha.collapsed&&so.to==lt&&so.from==lt)){if(so.to!=null&&so.to!=lt&&ai>so.to&&(ai=so.to,lr=""),ha.className&&(tr+=" "+ha.className),ha.css&&(ci=(ci?ci+";":"")+ha.css),ha.startStyle&&so.from==lt&&(Pr+=" "+ha.startStyle),ha.endStyle&&so.to==ai&&(Eo||(Eo=[])).push(ha.endStyle,so.to),ha.title&&((yo||(yo={})).title=ha.title),ha.attributes)for(var ws in ha.attributes)(yo||(yo={}))[ws]=ha.attributes[ws];ha.collapsed&&(!Vr||jr(Vr.marker,ha)<0)&&(Vr=so)}else so.from>lt&&ai>so.from&&(ai=so.from)}if(Eo)for(var Pl=0;Pl<Eo.length;Pl+=2)Eo[Pl+1]==ai&&(lr+=" "+Eo[Pl]);if(!Vr||Vr.from==lt)for(var ks=0;ks<ao.length;++ks)Ci(ae,0,ao[ks]);if(Vr&&(Vr.from||0)==lt){if(Ci(ae,(Vr.to==null?ft+1:Vr.to)-lt,Vr.marker,Vr.from==null),Vr.to==null)return;Vr.to==lt&&(Vr=!1)}}if(lt>=ft)break;for(var mu=Math.min(ft,ai);;){if(Rn){var zl=lt+Rn.length;if(!Vr){var fl=zl>mu?Rn.slice(0,mu-lt):Rn;ae.addToken(ae,fl,Yt?Yt+tr:tr,Pr,lt+fl.length==ai?lr:"",ci,yo)}if(zl>=mu){Rn=Rn.slice(mu-lt),lt=mu;break}lt=zl,Pr=""}Rn=Se.slice(Re,Re=fe[Zt++]),Yt=Pi(fe[Zt++],ae.cm.options)}}}function rr(ie,ae,fe){this.line=ae,this.rest=Ro(ae),this.size=this.rest?St(It(this.rest))-fe+1:1,this.node=this.text=null,this.hidden=fi(ie,ae)}function cr(ie,ae,fe){for(var de=[],Se,Re=ae;Re<fe;Re=Se){var _e=new rr(ie.doc,on(ie.doc,Re),Re);Se=Re+_e.size,de.push(_e)}return de}var xr=null;function Gr(ie){xr?xr.ops.push(ie):ie.ownsGroup=xr={ops:[ie],delayedCallbacks:[]}}function vr(ie){var ae=ie.delayedCallbacks,fe=0;do{for(;fe<ae.length;fe++)ae[fe].call(null);for(var de=0;de<ie.ops.length;de++){var Se=ie.ops[de];if(Se.cursorActivityHandlers)for(;Se.cursorActivityCalled<Se.cursorActivityHandlers.length;)Se.cursorActivityHandlers[Se.cursorActivityCalled++].call(null,Se.cm)}}while(fe<ae.length)}function kr(ie,ae){var fe=ie.ownsGroup;if(fe)try{vr(fe)}finally{xr=null,ae(fe)}}var Zr=null;function Oi(ie,ae){var fe=Kn(ie,ae);if(fe.length){var de=Array.prototype.slice.call(arguments,2),Se;xr?Se=xr.delayedCallbacks:Zr?Se=Zr:(Se=Zr=[],setTimeout(sa,0));for(var Re=function(ft){Se.push(function(){return fe[ft].apply(null,de)})},_e=0;_e<fe.length;++_e)Re(_e)}}function sa(){var ie=Zr;Zr=null;for(var ae=0;ae<ie.length;++ae)ie[ae]()}function Ra(ie,ae,fe,de){for(var Se=0;Se<ae.changes.length;Se++){var Re=ae.changes[Se];Re=="text"?Vi(ie,ae):Re=="gutter"?Ba(ie,ae,fe,de):Re=="class"?La(ie,ae):Re=="widget"&&zs(ie,ae,de)}ae.changes=null}function Ls(ie){return ie.node==ie.text&&(ie.node=Qe("div",null,null,"position: relative"),ie.text.parentNode&&ie.text.parentNode.replaceChild(ie.node,ie.text),ie.node.appendChild(ie.text),Ge&&Xe<8&&(ie.node.style.zIndex=2)),ie.node}function Ys(ie,ae){var fe=ae.bgClass?ae.bgClass+" "+(ae.line.bgClass||""):ae.line.bgClass;if(fe&&(fe+=" CodeMirror-linebackground"),ae.background)fe?ae.background.className=fe:(ae.background.parentNode.removeChild(ae.background),ae.background=null);else if(fe){var de=Ls(ae);ae.background=de.insertBefore(Qe("div",null,fe),de.firstChild),ie.display.input.setUneditable(ae.background)}}function tl(ie,ae){var fe=ie.display.externalMeasured;return fe&&fe.line==ae.line?(ie.display.externalMeasured=null,ae.measure=fe.measure,fe.built):Ut(ie,ae)}function Vi(ie,ae){var fe=ae.text.className,de=tl(ie,ae);ae.text==ae.node&&(ae.node=de.pre),ae.text.parentNode.replaceChild(de.pre,ae.text),ae.text=de.pre,de.bgClass!=ae.bgClass||de.textClass!=ae.textClass?(ae.bgClass=de.bgClass,ae.textClass=de.textClass,La(ie,ae)):fe&&(ae.text.className=fe)}function La(ie,ae){Ys(ie,ae),ae.line.wrapClass?Ls(ae).className=ae.line.wrapClass:ae.node!=ae.text&&(ae.node.className="");var fe=ae.textClass?ae.textClass+" "+(ae.line.textClass||""):ae.line.textClass;ae.text.className=fe||""}function Ba(ie,ae,fe,de){if(ae.gutter&&(ae.node.removeChild(ae.gutter),ae.gutter=null),ae.gutterBackground&&(ae.node.removeChild(ae.gutterBackground),ae.gutterBackground=null),ae.line.gutterClass){var Se=Ls(ae);ae.gutterBackground=Qe("div",null,"CodeMirror-gutter-background "+ae.line.gutterClass,"left: "+(ie.options.fixedGutter?de.fixedPos:-de.gutterTotalWidth)+"px; width: "+de.gutterTotalWidth+"px"),ie.display.input.setUneditable(ae.gutterBackground),Se.insertBefore(ae.gutterBackground,ae.text)}var Re=ae.line.gutterMarkers;if(ie.options.lineNumbers||Re){var _e=Ls(ae),ft=ae.gutter=Qe("div",null,"CodeMirror-gutter-wrapper","left: "+(ie.options.fixedGutter?de.fixedPos:-de.gutterTotalWidth)+"px");if(ie.display.input.setUneditable(ft),_e.insertBefore(ft,ae.text),ae.line.gutterClass&&(ft.className+=" "+ae.line.gutterClass),ie.options.lineNumbers&&(!Re||!Re["CodeMirror-linenumbers"])&&(ae.lineNumber=ft.appendChild(Qe("div",Si(ie.options,fe),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+de.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+ie.display.lineNumInnerWidth+"px"))),Re)for(var lt=0;lt<ie.display.gutterSpecs.length;++lt){var Zt=ie.display.gutterSpecs[lt].className,Rn=Re.hasOwnProperty(Zt)&&Re[Zt];Rn&&ft.appendChild(Qe("div",[Rn],"CodeMirror-gutter-elt","left: "+de.gutterLeft[Zt]+"px; width: "+de.gutterWidth[Zt]+"px"))}}}function zs(ie,ae,fe){ae.alignable&&(ae.alignable=null);for(var de=Be("CodeMirror-linewidget"),Se=ae.node.firstChild,Re=void 0;Se;Se=Re)Re=Se.nextSibling,de.test(Se.className)&&ae.node.removeChild(Se);lu(ie,ae,fe)}function su(ie,ae,fe,de){var Se=tl(ie,ae);return ae.text=ae.node=Se.pre,Se.bgClass&&(ae.bgClass=Se.bgClass),Se.textClass&&(ae.textClass=Se.textClass),La(ie,ae),Ba(ie,ae,fe,de),lu(ie,ae,de),ae.node}function lu(ie,ae,fe){if(wo(ie,ae.line,ae,fe,!0),ae.rest)for(var de=0;de<ae.rest.length;de++)wo(ie,ae.rest[de],ae,fe,!1)}function wo(ie,ae,fe,de,Se){if(ae.widgets)for(var Re=Ls(fe),_e=0,ft=ae.widgets;_e<ft.length;++_e){var lt=ft[_e],Zt=Qe("div",[lt.node],"CodeMirror-linewidget"+(lt.className?" "+lt.className:""));lt.handleMouseEvents||Zt.setAttribute("cm-ignore-events","true"),yc(lt,Zt,fe,de),ie.display.input.setUneditable(Zt),Se&<.above?Re.insertBefore(Zt,fe.gutter||fe.text):Re.appendChild(Zt),Oi(lt,"redraw")}}function yc(ie,ae,fe,de){if(ie.noHScroll){(fe.alignable||(fe.alignable=[])).push(ae);var Se=de.wrapperWidth;ae.style.left=de.fixedPos+"px",ie.coverGutter||(Se-=de.gutterTotalWidth,ae.style.paddingLeft=de.gutterTotalWidth+"px"),ae.style.width=Se+"px"}ie.coverGutter&&(ae.style.zIndex=5,ae.style.position="relative",ie.noHScroll||(ae.style.marginLeft=-de.gutterTotalWidth+"px"))}function Ml(ie){if(ie.height!=null)return ie.height;var ae=ie.doc.cm;if(!ae)return 0;if(!Et(document.body,ie.node)){var fe="position: relative;";ie.coverGutter&&(fe+="margin-left: -"+ae.display.gutters.offsetWidth+"px;"),ie.noHScroll&&(fe+="width: "+ae.display.wrapper.clientWidth+"px;"),rt(ae.display.measure,Qe("div",[ie.node],null,fe))}return ie.height=ie.node.parentNode.offsetHeight}function as(ie,ae){for(var fe=Xi(ae);fe!=ie.wrapper;fe=fe.parentNode)if(!fe||fe.nodeType==1&&fe.getAttribute("cm-ignore-events")=="true"||fe.parentNode==ie.sizer&&fe!=ie.mover)return!0}function vl(ie){return ie.lineSpace.offsetTop}function ju(ie){return ie.mover.offsetHeight-ie.lineSpace.offsetHeight}function rc(ie){if(ie.cachedPaddingH)return ie.cachedPaddingH;var ae=rt(ie.measure,Qe("pre","x","CodeMirror-line-like")),fe=window.getComputedStyle?window.getComputedStyle(ae):ae.currentStyle,de={left:parseInt(fe.paddingLeft),right:parseInt(fe.paddingRight)};return!isNaN(de.left)&&!isNaN(de.right)&&(ie.cachedPaddingH=de),de}function wl(ie){return Ln-ie.display.nativeBarWidth}function sl(ie){return ie.display.scroller.clientWidth-wl(ie)-ie.display.barWidth}function td(ie){return ie.display.scroller.clientHeight-wl(ie)-ie.display.barHeight}function nd(ie,ae,fe){var de=ie.options.lineWrapping,Se=de&&sl(ie);if(!ae.measure.heights||de&&ae.measure.width!=Se){var Re=ae.measure.heights=[];if(de){ae.measure.width=Se;for(var _e=ae.text.firstChild.getClientRects(),ft=0;ft<_e.length-1;ft++){var lt=_e[ft],Zt=_e[ft+1];Math.abs(lt.bottom-Zt.bottom)>2&&Re.push((lt.bottom+Zt.top)/2-fe.top)}}Re.push(fe.bottom-fe.top)}}function kc(ie,ae,fe){if(ie.line==ae)return{map:ie.measure.map,cache:ie.measure.cache};for(var de=0;de<ie.rest.length;de++)if(ie.rest[de]==ae)return{map:ie.measure.maps[de],cache:ie.measure.caches[de]};for(var Se=0;Se<ie.rest.length;Se++)if(St(ie.rest[Se])>fe)return{map:ie.measure.maps[Se],cache:ie.measure.caches[Se],before:!0}}function _d(ie,ae){ae=qr(ae);var fe=St(ae),de=ie.display.externalMeasured=new rr(ie.doc,ae,fe);de.lineN=fe;var Se=de.built=Ut(ie,de);return de.text=Se.pre,rt(ie.display.lineMeasure,Se.pre),de}function id(ie,ae,fe,de){return uu(ie,Js(ie,ae),fe,de)}function Ic(ie,ae){if(ae>=ie.display.viewFrom&&ae<ie.display.viewTo)return ie.display.view[ul(ie,ae)];var fe=ie.display.externalMeasured;if(fe&&ae>=fe.lineN&&ae<fe.lineN+fe.size)return fe}function Js(ie,ae){var fe=St(ae),de=Ic(ie,fe);de&&!de.text?de=null:de&&de.changes&&(Ra(ie,de,fe,Nh(ie)),ie.curOp.forceUpdate=!0),de||(de=_d(ie,ae));var Se=kc(de,ae,fe);return{line:ae,view:de,rect:null,map:Se.map,cache:Se.cache,before:Se.before,hasHeights:!1}}function uu(ie,ae,fe,de,Se){ae.before&&(fe=-1);var Re=fe+(de||""),_e;return ae.cache.hasOwnProperty(Re)?_e=ae.cache[Re]:(ae.rect||(ae.rect=ae.view.text.getBoundingClientRect()),ae.hasHeights||(nd(ie,ae.view,ae.rect),ae.hasHeights=!0),_e=Vo(ie,ae,fe,de),_e.bogus||(ae.cache[Re]=_e)),{left:_e.left,right:_e.right,top:Se?_e.rtop:_e.top,bottom:Se?_e.rbottom:_e.bottom}}var xd={left:0,right:0,top:0,bottom:0};function Eu(ie,ae,fe){for(var de,Se,Re,_e,ft,lt,Zt=0;Zt<ie.length;Zt+=3)if(ft=ie[Zt],lt=ie[Zt+1],ae<ft?(Se=0,Re=1,_e="left"):ae<lt?(Se=ae-ft,Re=Se+1):(Zt==ie.length-3||ae==lt&&ie[Zt+3]>ae)&&(Re=lt-ft,Se=Re-1,ae>=lt&&(_e="right")),Se!=null){if(de=ie[Zt+2],ft==lt&&fe==(de.insertLeft?"left":"right")&&(_e=fe),fe=="left"&&Se==0)for(;Zt&&ie[Zt-2]==ie[Zt-3]&&ie[Zt-1].insertLeft;)de=ie[(Zt-=3)+2],_e="left";if(fe=="right"&&Se==lt-ft)for(;Zt<ie.length-3&&ie[Zt+3]==ie[Zt+4]&&!ie[Zt+5].insertLeft;)de=ie[(Zt+=3)+2],_e="right";break}return{node:de,start:Se,end:Re,collapse:_e,coverStart:ft,coverEnd:lt}}function Sc(ie,ae){var fe=xd;if(ae=="left")for(var de=0;de<ie.length&&(fe=ie[de]).left==fe.right;de++);else for(var Se=ie.length-1;Se>=0&&(fe=ie[Se]).left==fe.right;Se--);return fe}function Vo(ie,ae,fe,de){var Se=Eu(ae.map,fe,de),Re=Se.node,_e=Se.start,ft=Se.end,lt=Se.collapse,Zt;if(Re.nodeType==3){for(var Rn=0;Rn<4;Rn++){for(;_e&&vt(ae.line.text.charAt(Se.coverStart+_e));)--_e;for(;Se.coverStart+ft<Se.coverEnd&&vt(ae.line.text.charAt(Se.coverStart+ft));)++ft;if(Ge&&Xe<9&&_e==0&&ft==Se.coverEnd-Se.coverStart?Zt=Re.parentNode.getBoundingClientRect():Zt=Sc(Ze(Re,_e,ft).getClientRects(),de),Zt.left||Zt.right||_e==0)break;ft=_e,_e=_e-1,lt="right"}Ge&&Xe<11&&(Zt=ya(ie.display.measure,Zt))}else{_e>0&&(lt=de="right");var Yt;ie.options.lineWrapping&&(Yt=Re.getClientRects()).length>1?Zt=Yt[de=="right"?Yt.length-1:0]:Zt=Re.getBoundingClientRect()}if(Ge&&Xe<9&&!_e&&(!Zt||!Zt.left&&!Zt.right)){var ci=Re.parentNode.getClientRects()[0];ci?Zt={left:ci.left,right:ci.left+Mu(ie.display),top:ci.top,bottom:ci.bottom}:Zt=xd}for(var ai=Zt.top-ae.rect.top,tr=Zt.bottom-ae.rect.top,lr=(ai+tr)/2,Pr=ae.view.measure.heights,Vr=0;Vr<Pr.length-1&&!(lr<Pr[Vr]);Vr++);var yo=Vr?Pr[Vr-1]:0,ao=Pr[Vr],Eo={left:(lt=="right"?Zt.right:Zt.left)-ae.rect.left,right:(lt=="left"?Zt.left:Zt.right)-ae.rect.left,top:yo,bottom:ao};return!Zt.left&&!Zt.right&&(Eo.bogus=!0),ie.options.singleCursorHeightPerLine||(Eo.rtop=ai,Eo.rbottom=tr),Eo}function ya(ie,ae){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!nn(ie))return ae;var fe=screen.logicalXDPI/screen.deviceXDPI,de=screen.logicalYDPI/screen.deviceYDPI;return{left:ae.left*fe,right:ae.right*fe,top:ae.top*de,bottom:ae.bottom*de}}function ll(ie){if(ie.measure&&(ie.measure.cache={},ie.measure.heights=null,ie.rest))for(var ae=0;ae<ie.rest.length;ae++)ie.measure.caches[ae]={}}function Ss(ie){ie.display.externalMeasure=null,We(ie.display.lineMeasure);for(var ae=0;ae<ie.display.view.length;ae++)ll(ie.display.view[ae])}function ms(ie){Ss(ie),ie.display.cachedCharWidth=ie.display.cachedTextHeight=ie.display.cachedPaddingH=null,ie.options.lineWrapping||(ie.display.maxLineChanged=!0),ie.display.lineNumChars=null}function Ua(){return Ct&&ne?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ss(){return Ct&&ne?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function xs(ie){var ae=0;if(ie.widgets)for(var fe=0;fe<ie.widgets.length;++fe)ie.widgets[fe].above&&(ae+=Ml(ie.widgets[fe]));return ae}function vs(ie,ae,fe,de,Se){if(!Se){var Re=xs(ae);fe.top+=Re,fe.bottom+=Re}if(de=="line")return fe;de||(de="local");var _e=Bo(ae);if(de=="local"?_e+=vl(ie.display):_e-=ie.display.viewOffset,de=="page"||de=="window"){var ft=ie.display.lineSpace.getBoundingClientRect();_e+=ft.top+(de=="window"?0:ss());var lt=ft.left+(de=="window"?0:Ua());fe.left+=lt,fe.right+=lt}return fe.top+=_e,fe.bottom+=_e,fe}function oc(ie,ae,fe){if(fe=="div")return ae;var de=ae.left,Se=ae.top;if(fe=="page")de-=Ua(),Se-=ss();else if(fe=="local"||!fe){var Re=ie.display.sizer.getBoundingClientRect();de+=Re.left,Se+=Re.top}var _e=ie.display.lineSpace.getBoundingClientRect();return{left:de-_e.left,top:Se-_e.top}}function _l(ie,ae,fe,de,Se){return de||(de=on(ie.doc,ae.line)),vs(ie,de,id(ie,de,ae.ch,Se),fe)}function is(ie,ae,fe,de,Se,Re){de=de||on(ie.doc,ae.line),Se||(Se=Js(ie,de));function _e(tr,lr){var Pr=uu(ie,Se,tr,lr?"right":"left",Re);return lr?Pr.left=Pr.right:Pr.right=Pr.left,vs(ie,de,Pr,fe)}var ft=un(de,ie.doc.direction),lt=ae.ch,Zt=ae.sticky;if(lt>=de.text.length?(lt=de.text.length,Zt="before"):lt<=0&&(lt=0,Zt="after"),!ft)return _e(Zt=="before"?lt-1:lt,Zt=="before");function Rn(tr,lr,Pr){var Vr=ft[lr],yo=Vr.level==1;return _e(Pr?tr-1:tr,yo!=Pr)}var Yt=at(ft,lt,Zt),ci=yt,ai=Rn(lt,Yt,Zt=="before");return ci!=null&&(ai.other=Rn(lt,ci,Zt!="before")),ai}function bh(ie,ae){var fe=0;ae=Hn(ie.doc,ae),ie.options.lineWrapping||(fe=Mu(ie.display)*ae.ch);var de=on(ie.doc,ae.line),Se=Bo(de)+vl(ie.display);return{left:fe,right:fe,top:Se,bottom:Se+de.height}}function Eh(ie,ae,fe,de,Se){var Re=en(ie,ae,fe);return Re.xRel=Se,de&&(Re.outside=de),Re}function Uu(ie,ae,fe){var de=ie.doc;if(fe+=ie.display.viewOffset,fe<0)return Eh(de.first,0,null,-1,-1);var Se=Nn(de,fe),Re=de.first+de.size-1;if(Se>Re)return Eh(de.first+de.size-1,on(de,Re).text.length,null,1,1);ae<0&&(ae=0);for(var _e=on(de,Se);;){var ft=xi(ie,_e,Se,ae,fe),lt=Fr(_e,ft.ch+(ft.xRel>0||ft.outside>0?1:0));if(!lt)return ft;var Zt=lt.find(1);if(Zt.line==Se)return Zt;_e=on(de,Se=Zt.line)}}function ro(ie,ae,fe,de){de-=xs(ae);var Se=ae.text.length,Re=Ye(function(_e){return uu(ie,fe,_e-1).bottom<=de},Se,0);return Se=Ye(function(_e){return uu(ie,fe,_e).top>de},Re,Se),{begin:Re,end:Se}}function rd(ie,ae,fe,de){fe||(fe=Js(ie,ae));var Se=vs(ie,ae,uu(ie,fe,de),"line").top;return ro(ie,ae,fe,Se)}function Jt(ie,ae,fe,de){return ie.bottom<=fe?!1:ie.top>fe?!0:(de?ie.left:ie.right)>ae}function xi(ie,ae,fe,de,Se){Se-=Bo(ae);var Re=Js(ie,ae),_e=xs(ae),ft=0,lt=ae.text.length,Zt=!0,Rn=un(ae,ie.doc.direction);if(Rn){var Yt=(ie.options.lineWrapping?Lh:Mh)(ie,ae,fe,Re,Rn,de,Se);Zt=Yt.level!=1,ft=Zt?Yt.from:Yt.to-1,lt=Zt?Yt.to:Yt.from-1}var ci=null,ai=null,tr=Ye(function(Qo){var so=uu(ie,Re,Qo);return so.top+=_e,so.bottom+=_e,Jt(so,de,Se,!1)?(so.top<=Se&&so.left<=de&&(ci=Qo,ai=so),!0):!1},ft,lt),lr,Pr,Vr=!1;if(ai){var yo=de-ai.left<ai.right-de,ao=yo==Zt;tr=ci+(ao?0:1),Pr=ao?"after":"before",lr=yo?ai.left:ai.right}else{!Zt&&(tr==lt||tr==ft)&&tr++,Pr=tr==0?"after":tr==ae.text.length?"before":uu(ie,Re,tr-(Zt?1:0)).bottom+_e<=Se==Zt?"after":"before";var Eo=is(ie,en(fe,tr,Pr),"line",ae,Re);lr=Eo.left,Vr=Se<Eo.top?-1:Se>=Eo.bottom?1:0}return tr=et(ae.text,tr,1),Eh(fe,tr,Pr,Vr,de-lr)}function Mh(ie,ae,fe,de,Se,Re,_e){var ft=Ye(function(Yt){var ci=Se[Yt],ai=ci.level!=1;return Jt(is(ie,en(fe,ai?ci.to:ci.from,ai?"before":"after"),"line",ae,de),Re,_e,!0)},0,Se.length-1),lt=Se[ft];if(ft>0){var Zt=lt.level!=1,Rn=is(ie,en(fe,Zt?lt.from:lt.to,Zt?"after":"before"),"line",ae,de);Jt(Rn,Re,_e,!0)&&Rn.top>_e&&(lt=Se[ft-1])}return lt}function Lh(ie,ae,fe,de,Se,Re,_e){var ft=ro(ie,ae,de,_e),lt=ft.begin,Zt=ft.end;/\s/.test(ae.text.charAt(Zt-1))&&Zt--;for(var Rn=null,Yt=null,ci=0;ci<Se.length;ci++){var ai=Se[ci];if(!(ai.from>=Zt||ai.to<=lt)){var tr=ai.level!=1,lr=uu(ie,de,tr?Math.min(Zt,ai.to)-1:Math.max(lt,ai.from)).right,Pr=lr<Re?Re-lr+1e9:lr-Re;(!Rn||Yt>Pr)&&(Rn=ai,Yt=Pr)}}return Rn||(Rn=Se[Se.length-1]),Rn.from<lt&&(Rn={from:lt,to:Rn.to,level:Rn.level}),Rn.to>Zt&&(Rn={from:Rn.from,to:Zt,level:Rn.level}),Rn}var ac;function cu(ie){if(ie.cachedTextHeight!=null)return ie.cachedTextHeight;if(ac==null){ac=Qe("pre",null,"CodeMirror-line-like");for(var ae=0;ae<49;++ae)ac.appendChild(document.createTextNode("x")),ac.appendChild(Qe("br"));ac.appendChild(document.createTextNode("x"))}rt(ie.measure,ac);var fe=ac.offsetHeight/50;return fe>3&&(ie.cachedTextHeight=fe),We(ie.measure),fe||1}function Mu(ie){if(ie.cachedCharWidth!=null)return ie.cachedCharWidth;var ae=Qe("span","xxxxxxxxxx"),fe=Qe("pre",[ae],"CodeMirror-line-like");rt(ie.measure,fe);var de=ae.getBoundingClientRect(),Se=(de.right-de.left)/10;return Se>2&&(ie.cachedCharWidth=Se),Se||10}function Nh(ie){for(var ae=ie.display,fe={},de={},Se=ae.gutters.clientLeft,Re=ae.gutters.firstChild,_e=0;Re;Re=Re.nextSibling,++_e){var ft=ie.display.gutterSpecs[_e].className;fe[ft]=Re.offsetLeft+Re.clientLeft+Se,de[ft]=Re.clientWidth}return{fixedPos:Pd(ae),gutterTotalWidth:ae.gutters.offsetWidth,gutterLeft:fe,gutterWidth:de,wrapperWidth:ae.wrapper.clientWidth}}function Pd(ie){return ie.scroller.getBoundingClientRect().left-ie.sizer.getBoundingClientRect().left}function ys(ie){var ae=cu(ie.display),fe=ie.options.lineWrapping,de=fe&&Math.max(5,ie.display.scroller.clientWidth/Mu(ie.display)-3);return function(Se){if(fi(ie.doc,Se))return 0;var Re=0;if(Se.widgets)for(var _e=0;_e<Se.widgets.length;_e++)Se.widgets[_e].height&&(Re+=Se.widgets[_e].height);return fe?Re+(Math.ceil(Se.text.length/de)||1)*ae:Re+ae}}function To(ie){var ae=ie.doc,fe=ys(ie);ae.iter(function(de){var Se=fe(de);Se!=de.height&&Jn(de,Se)})}function yl(ie,ae,fe,de){var Se=ie.display;if(!fe&&Xi(ae).getAttribute("cm-not-content")=="true")return null;var Re,_e,ft=Se.lineSpace.getBoundingClientRect();try{Re=ae.clientX-ft.left,_e=ae.clientY-ft.top}catch(Yt){return null}var lt=Uu(ie,Re,_e),Zt;if(de&<.xRel>0&&(Zt=on(ie.doc,lt.line).text).length==lt.ch){var Rn=ot(Zt,Zt.length,ie.options.tabSize)-Zt.length;lt=en(lt.line,Math.max(0,Math.round((Re-rc(ie.display).left)/Mu(ie.display))-Rn))}return lt}function ul(ie,ae){if(ae>=ie.display.viewTo||(ae-=ie.display.viewFrom,ae<0))return null;for(var fe=ie.display.view,de=0;de<fe.length;de++)if(ae-=fe[de].size,ae<0)return de}function _a(ie,ae,fe,de){ae==null&&(ae=ie.doc.first),fe==null&&(fe=ie.doc.first+ie.doc.size),de||(de=0);var Se=ie.display;if(de&&fe<Se.viewTo&&(Se.updateLineNumbers==null||Se.updateLineNumbers>ae)&&(Se.updateLineNumbers=ae),ie.curOp.viewChanged=!0,ae>=Se.viewTo)kn&&Mr(ie.doc,ae)<Se.viewTo&&Hs(ie);else if(fe<=Se.viewFrom)kn&&Nr(ie.doc,fe+de)>Se.viewFrom?Hs(ie):(Se.viewFrom+=de,Se.viewTo+=de);else if(ae<=Se.viewFrom&&fe>=Se.viewTo)Hs(ie);else if(ae<=Se.viewFrom){var Re=Xl(ie,fe,fe+de,1);Re?(Se.view=Se.view.slice(Re.index),Se.viewFrom=Re.lineN,Se.viewTo+=de):Hs(ie)}else if(fe>=Se.viewTo){var _e=Xl(ie,ae,ae,-1);_e?(Se.view=Se.view.slice(0,_e.index),Se.viewTo=_e.lineN):Hs(ie)}else{var ft=Xl(ie,ae,ae,-1),lt=Xl(ie,fe,fe+de,1);ft&<?(Se.view=Se.view.slice(0,ft.index).concat(cr(ie,ft.lineN,lt.lineN)).concat(Se.view.slice(lt.index)),Se.viewTo+=de):Hs(ie)}var Zt=Se.externalMeasured;Zt&&(fe<Zt.lineN?Zt.lineN+=de:ae<Zt.lineN+Zt.size&&(Se.externalMeasured=null))}function ra(ie,ae,fe){ie.curOp.viewChanged=!0;var de=ie.display,Se=ie.display.externalMeasured;if(Se&&ae>=Se.lineN&&ae<Se.lineN+Se.size&&(de.externalMeasured=null),!(ae<de.viewFrom||ae>=de.viewTo)){var Re=de.view[ul(ie,ae)];if(Re.node!=null){var _e=Re.changes||(Re.changes=[]);Wt(_e,fe)==-1&&_e.push(fe)}}}function Hs(ie){ie.display.viewFrom=ie.display.viewTo=ie.doc.first,ie.display.view=[],ie.display.viewOffset=0}function Xl(ie,ae,fe,de){var Se=ul(ie,ae),Re,_e=ie.display.view;if(!kn||fe==ie.doc.first+ie.doc.size)return{index:Se,lineN:fe};for(var ft=ie.display.viewFrom,lt=0;lt<Se;lt++)ft+=_e[lt].size;if(ft!=ae){if(de>0){if(Se==_e.length-1)return null;Re=ft+_e[Se].size-ae,Se++}else Re=ft-ae;ae+=Re,fe+=Re}for(;Mr(ie.doc,fe)!=fe;){if(Se==(de<0?0:_e.length-1))return null;fe+=de*_e[Se-(de<0?1:0)].size,Se+=de}return{index:Se,lineN:fe}}function Ja(ie,ae,fe){var de=ie.display,Se=de.view;Se.length==0||ae>=de.viewTo||fe<=de.viewFrom?(de.view=cr(ie,ae,fe),de.viewFrom=ae):(de.viewFrom>ae?de.view=cr(ie,ae,de.viewFrom).concat(de.view):de.viewFrom<ae&&(de.view=de.view.slice(ul(ie,ae))),de.viewFrom=ae,de.viewTo<fe?de.view=de.view.concat(cr(ie,de.viewTo,fe)):de.viewTo>fe&&(de.view=de.view.slice(0,ul(ie,fe)))),de.viewTo=fe}function du(ie){for(var ae=ie.display.view,fe=0,de=0;de<ae.length;de++){var Se=ae[de];!Se.hidden&&(!Se.node||Se.changes)&&++fe}return fe}function nl(ie){ie.display.input.showSelection(ie.display.input.prepareSelection())}function od(ie,ae){ae===void 0&&(ae=!0);for(var fe=ie.doc,de={},Se=de.cursors=document.createDocumentFragment(),Re=de.selection=document.createDocumentFragment(),_e=0;_e<fe.sel.ranges.length;_e++)if(!(!ae&&_e==fe.sel.primIndex)){var ft=fe.sel.ranges[_e];if(!(ft.from().line>=ie.display.viewTo||ft.to().line<ie.display.viewFrom)){var lt=ft.empty();(lt||ie.options.showCursorWhenSelecting)&&Pa(ie,ft.head,Se),lt||wa(ie,ft,Re)}}return de}function Pa(ie,ae,fe){var de=is(ie,ae,"div",null,null,!ie.options.singleCursorHeightPerLine),Se=fe.appendChild(Qe("div","\xA0","CodeMirror-cursor"));if(Se.style.left=de.left+"px",Se.style.top=de.top+"px",Se.style.height=Math.max(0,de.bottom-de.top)*ie.options.cursorHeight+"px",de.other){var Re=fe.appendChild(Qe("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Re.style.display="",Re.style.left=de.other.left+"px",Re.style.top=de.other.top+"px",Re.style.height=(de.other.bottom-de.other.top)*.85+"px"}}function Ll(ie,ae){return ie.top-ae.top||ie.left-ae.left}function wa(ie,ae,fe){var de=ie.display,Se=ie.doc,Re=document.createDocumentFragment(),_e=rc(ie.display),ft=_e.left,lt=Math.max(de.sizerWidth,sl(ie)-de.sizer.offsetLeft)-_e.right,Zt=Se.direction=="ltr";function Rn(ao,Eo,Qo,so){Eo<0&&(Eo=0),Eo=Math.round(Eo),so=Math.round(so),Re.appendChild(Qe("div",null,"CodeMirror-selected","position: absolute; left: "+ao+`px;
|
|
|
top: `+Eo+"px; width: "+(Qo==null?lt-ao:Qo)+`px;
|
|
|
height: `+(so-Eo)+"px"))}function Yt(ao,Eo,Qo){var so=on(Se,ao),ha=so.text.length,ws,Pl;function ks(fl,vu){return _l(ie,en(ao,fl),"div",so,vu)}function mu(fl,vu,Nl){var gl=rd(ie,so,null,fl),Za=vu=="ltr"==(Nl=="after")?"left":"right",Is=Nl=="after"?gl.begin:gl.end-(/\s/.test(so.text.charAt(gl.end-1))?2:1);return ks(Is,Za)[Za]}var zl=un(so,Se.direction);return xt(zl,Eo||0,Qo==null?ha:Qo,function(fl,vu,Nl,gl){var Za=Nl=="ltr",Is=ks(fl,Za?"left":"right"),bl=ks(vu-1,Za?"right":"left"),Fl=Eo==null&&fl==0,cc=Qo==null&&vu==ha,Os=gl==0,Zu=!zl||gl==zl.length-1;if(bl.top-Is.top<=3){var xe=(Zt?Fl:cc)&&Os,Ce=(Zt?cc:Fl)&&Zu,Ie=xe?ft:(Za?Is:bl).left,$e=Ce?lt:(Za?bl:Is).right;Rn(Ie,Is.top,$e-Ie,Is.bottom)}else{var mt,gt,Bt,Kt;Za?(mt=Zt&&Fl&&Os?ft:Is.left,gt=Zt?lt:mu(fl,Nl,"before"),Bt=Zt?ft:mu(vu,Nl,"after"),Kt=Zt&&cc&&Zu?lt:bl.right):(mt=Zt?mu(fl,Nl,"before"):ft,gt=!Zt&&Fl&&Os?lt:Is.right,Bt=!Zt&&cc&&Zu?ft:bl.left,Kt=Zt?mu(vu,Nl,"after"):lt),Rn(mt,Is.top,gt-mt,Is.bottom),Is.bottom<bl.top&&Rn(ft,Is.bottom,null,bl.top),Rn(Bt,bl.top,Kt-Bt,bl.bottom)}(!ws||Ll(Is,ws)<0)&&(ws=Is),Ll(bl,ws)<0&&(ws=bl),(!Pl||Ll(Is,Pl)<0)&&(Pl=Is),Ll(bl,Pl)<0&&(Pl=bl)}),{start:ws,end:Pl}}var ci=ae.from(),ai=ae.to();if(ci.line==ai.line)Yt(ci.line,ci.ch,ai.ch);else{var tr=on(Se,ci.line),lr=on(Se,ai.line),Pr=qr(tr)==qr(lr),Vr=Yt(ci.line,ci.ch,Pr?tr.text.length+1:null).end,yo=Yt(ai.line,Pr?0:null,ai.ch).start;Pr&&(Vr.top<yo.top-2?(Rn(Vr.right,Vr.top,null,Vr.bottom),Rn(ft,yo.top,yo.left,yo.bottom)):Rn(Vr.right,Vr.top,yo.left-Vr.right,Vr.bottom)),Vr.bottom<yo.top&&Rn(ft,Vr.bottom,null,yo.top)}fe.appendChild(Re)}function Va(ie){if(ie.state.focused){var ae=ie.display;clearInterval(ae.blinker);var fe=!0;ae.cursorDiv.style.visibility="",ie.options.cursorBlinkRate>0?ae.blinker=setInterval(function(){ie.hasFocus()||ad(ie),ae.cursorDiv.style.visibility=(fe=!fe)?"":"hidden"},ie.options.cursorBlinkRate):ie.options.cursorBlinkRate<0&&(ae.cursorDiv.style.visibility="hidden")}}function cs(ie){ie.state.focused||(ie.display.input.focus(),Na(ie))}function Ps(ie){ie.state.delayingBlurEvent=!0,setTimeout(function(){ie.state.delayingBlurEvent&&(ie.state.delayingBlurEvent=!1,ad(ie))},100)}function Na(ie,ae){ie.state.delayingBlurEvent&&(ie.state.delayingBlurEvent=!1),ie.options.readOnly!="nocursor"&&(ie.state.focused||(jt(ie,"focus",ie,ae),ie.state.focused=!0,Dt(ie.display.wrapper,"CodeMirror-focused"),!ie.curOp&&ie.display.selForContextMenu!=ie.doc.sel&&(ie.display.input.reset(),Ne&&setTimeout(function(){return ie.display.input.reset(!0)},20)),ie.display.input.receivedFocus()),Va(ie))}function ad(ie,ae){ie.state.delayingBlurEvent||(ie.state.focused&&(jt(ie,"blur",ie,ae),ie.state.focused=!1,He(ie.display.wrapper,"CodeMirror-focused")),clearInterval(ie.display.blinker),setTimeout(function(){ie.state.focused||(ie.display.shift=!1)},150))}function Do(ie){for(var ae=ie.display,fe=ae.lineDiv.offsetTop,de=0;de<ae.view.length;de++){var Se=ae.view[de],Re=ie.options.lineWrapping,_e=void 0,ft=0;if(!Se.hidden){if(Ge&&Xe<8){var lt=Se.node.offsetTop+Se.node.offsetHeight;_e=lt-fe,fe=lt}else{var Zt=Se.node.getBoundingClientRect();_e=Zt.bottom-Zt.top,!Re&&Se.text.firstChild&&(ft=Se.text.firstChild.getBoundingClientRect().right-Zt.left-1)}var Rn=Se.line.height-_e;if((Rn>.005||Rn<-.005)&&(Jn(Se.line,_e),Rf(Se.line),Se.rest))for(var Yt=0;Yt<Se.rest.length;Yt++)Rf(Se.rest[Yt]);if(ft>ie.display.sizerWidth){var ci=Math.ceil(ft/Mu(ie.display));ci>ie.display.maxLineLength&&(ie.display.maxLineLength=ci,ie.display.maxLine=Se.line,ie.display.maxLineChanged=!0)}}}}function Rf(ie){if(ie.widgets)for(var ae=0;ae<ie.widgets.length;++ae){var fe=ie.widgets[ae],de=fe.node.parentNode;de&&(fe.height=de.offsetHeight)}}function fa(ie,ae,fe){var de=fe&&fe.top!=null?Math.max(0,fe.top):ie.scroller.scrollTop;de=Math.floor(de-vl(ie));var Se=fe&&fe.bottom!=null?fe.bottom:de+ie.wrapper.clientHeight,Re=Nn(ae,de),_e=Nn(ae,Se);if(fe&&fe.ensure){var ft=fe.ensure.from.line,lt=fe.ensure.to.line;ft<Re?(Re=ft,_e=Nn(ae,Bo(on(ae,ft))+ie.wrapper.clientHeight)):Math.min(lt,ae.lastLine())>=_e&&(Re=Nn(ae,Bo(on(ae,lt))-ie.wrapper.clientHeight),_e=lt)}return{from:Re,to:Math.max(_e,Re+1)}}function jf(ie,ae){if(!sn(ie,"scrollCursorIntoView")){var fe=ie.display,de=fe.sizer.getBoundingClientRect(),Se=null;if(ae.top+de.top<0?Se=!0:ae.bottom+de.top>(window.innerHeight||document.documentElement.clientHeight)&&(Se=!1),Se!=null&&!Rt){var Re=Qe("div","\u200B",null,`position: absolute;
|
|
|
top: `+(ae.top-fe.viewOffset-vl(ie.display))+`px;
|
|
|
height: `+(ae.bottom-ae.top+wl(ie)+fe.barHeight)+`px;
|
|
|
left: `+ae.left+"px; width: "+Math.max(2,ae.right-ae.left)+"px;");ie.display.lineSpace.appendChild(Re),Re.scrollIntoView(Se),ie.display.lineSpace.removeChild(Re)}}}function sd(ie,ae,fe,de){de==null&&(de=0);var Se;!ie.options.lineWrapping&&ae==fe&&(ae=ae.ch?en(ae.line,ae.sticky=="before"?ae.ch-1:ae.ch,"after"):ae,fe=ae.sticky=="before"?en(ae.line,ae.ch+1,"before"):ae);for(var Re=0;Re<5;Re++){var _e=!1,ft=is(ie,ae),lt=!fe||fe==ae?ft:is(ie,fe);Se={left:Math.min(ft.left,lt.left),top:Math.min(ft.top,lt.top)-de,right:Math.max(ft.left,lt.left),bottom:Math.max(ft.bottom,lt.bottom)+de};var Zt=zf(ie,Se),Rn=ie.doc.scrollTop,Yt=ie.doc.scrollLeft;if(Zt.scrollTop!=null&&(_u(ie,Zt.scrollTop),Math.abs(ie.doc.scrollTop-Rn)>1&&(_e=!0)),Zt.scrollLeft!=null&&(kl(ie,Zt.scrollLeft),Math.abs(ie.doc.scrollLeft-Yt)>1&&(_e=!0)),!_e)break}return Se}function wd(ie,ae){var fe=zf(ie,ae);fe.scrollTop!=null&&_u(ie,fe.scrollTop),fe.scrollLeft!=null&&kl(ie,fe.scrollLeft)}function zf(ie,ae){var fe=ie.display,de=cu(ie.display);ae.top<0&&(ae.top=0);var Se=ie.curOp&&ie.curOp.scrollTop!=null?ie.curOp.scrollTop:fe.scroller.scrollTop,Re=td(ie),_e={};ae.bottom-ae.top>Re&&(ae.bottom=ae.top+Re);var ft=ie.doc.height+ju(fe),lt=ae.top<de,Zt=ae.bottom>ft-de;if(ae.top<Se)_e.scrollTop=lt?0:ae.top;else if(ae.bottom>Se+Re){var Rn=Math.min(ae.top,(Zt?ft:ae.bottom)-Re);Rn!=Se&&(_e.scrollTop=Rn)}var Yt=ie.options.fixedGutter?0:fe.gutters.offsetWidth,ci=ie.curOp&&ie.curOp.scrollLeft!=null?ie.curOp.scrollLeft:fe.scroller.scrollLeft-Yt,ai=sl(ie)-fe.gutters.offsetWidth,tr=ae.right-ae.left>ai;return tr&&(ae.right=ae.left+ai),ae.left<10?_e.scrollLeft=0:ae.left<ci?_e.scrollLeft=Math.max(0,ae.left+Yt-(tr?0:10)):ae.right>ai+ci-3&&(_e.scrollLeft=ae.right+(tr?0:10)-ai),_e}function Xd(ie,ae){ae!=null&&(sc(ie),ie.curOp.scrollTop=(ie.curOp.scrollTop==null?ie.doc.scrollTop:ie.curOp.scrollTop)+ae)}function ld(ie){sc(ie);var ae=ie.getCursor();ie.curOp.scrollToPos={from:ae,to:ae,margin:ie.options.cursorScrollMargin}}function ud(ie,ae,fe){(ae!=null||fe!=null)&&sc(ie),ae!=null&&(ie.curOp.scrollLeft=ae),fe!=null&&(ie.curOp.scrollTop=fe)}function Fa(ie,ae){sc(ie),ie.curOp.scrollToPos=ae}function sc(ie){var ae=ie.curOp.scrollToPos;if(ae){ie.curOp.scrollToPos=null;var fe=bh(ie,ae.from),de=bh(ie,ae.to);Yd(ie,fe,de,ae.margin)}}function Yd(ie,ae,fe,de){var Se=zf(ie,{left:Math.min(ae.left,fe.left),top:Math.min(ae.top,fe.top)-de,right:Math.max(ae.right,fe.right),bottom:Math.max(ae.bottom,fe.bottom)+de});ud(ie,Se.scrollLeft,Se.scrollTop)}function _u(ie,ae){Math.abs(ie.doc.scrollTop-ae)<2||(ge||zr(ie,{top:ae}),Fh(ie,ae,!0),ge&&zr(ie),Mi(ie,100))}function Fh(ie,ae,fe){ae=Math.max(0,Math.min(ie.display.scroller.scrollHeight-ie.display.scroller.clientHeight,ae)),!(ie.display.scroller.scrollTop==ae&&!fe)&&(ie.doc.scrollTop=ae,ie.display.scrollbars.setScrollTop(ae),ie.display.scroller.scrollTop!=ae&&(ie.display.scroller.scrollTop=ae))}function kl(ie,ae,fe,de){ae=Math.max(0,Math.min(ae,ie.display.scroller.scrollWidth-ie.display.scroller.clientWidth)),!((fe?ae==ie.doc.scrollLeft:Math.abs(ie.doc.scrollLeft-ae)<2)&&!de)&&(ie.doc.scrollLeft=ae,ko(ie),ie.display.scroller.scrollLeft!=ae&&(ie.display.scroller.scrollLeft=ae),ie.display.scrollbars.setScrollLeft(ae))}function Il(ie){var ae=ie.display,fe=ae.gutters.offsetWidth,de=Math.round(ie.doc.height+ju(ie.display));return{clientHeight:ae.scroller.clientHeight,viewHeight:ae.wrapper.clientHeight,scrollWidth:ae.scroller.scrollWidth,clientWidth:ae.scroller.clientWidth,viewWidth:ae.wrapper.clientWidth,barLeft:ie.options.fixedGutter?fe:0,docHeight:de,scrollHeight:de+wl(ie)+ae.barHeight,nativeBarWidth:ae.nativeBarWidth,gutterWidth:fe}}var xc=function(ie,ae,fe){this.cm=fe;var de=this.vert=Qe("div",[Qe("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),Se=this.horiz=Qe("div",[Qe("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");de.tabIndex=Se.tabIndex=-1,ie(de),ie(Se),Qt(de,"scroll",function(){de.clientHeight&&ae(de.scrollTop,"vertical")}),Qt(Se,"scroll",function(){Se.clientWidth&&ae(Se.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Ge&&Xe<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};xc.prototype.update=function(ie){var ae=ie.scrollWidth>ie.clientWidth+1,fe=ie.scrollHeight>ie.clientHeight+1,de=ie.nativeBarWidth;if(fe){this.vert.style.display="block",this.vert.style.bottom=ae?de+"px":"0";var Se=ie.viewHeight-(ae?de:0);this.vert.firstChild.style.height=Math.max(0,ie.scrollHeight-ie.clientHeight+Se)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(ae){this.horiz.style.display="block",this.horiz.style.right=fe?de+"px":"0",this.horiz.style.left=ie.barLeft+"px";var Re=ie.viewWidth-ie.barLeft-(fe?de:0);this.horiz.firstChild.style.width=Math.max(0,ie.scrollWidth-ie.clientWidth+Re)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&ie.clientHeight>0&&(de==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:fe?de:0,bottom:ae?de:0}},xc.prototype.setScrollLeft=function(ie){this.horiz.scrollLeft!=ie&&(this.horiz.scrollLeft=ie),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},xc.prototype.setScrollTop=function(ie){this.vert.scrollTop!=ie&&(this.vert.scrollTop=ie),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},xc.prototype.zeroWidthHack=function(){var ie=ce&&!dt?"12px":"18px";this.horiz.style.height=this.vert.style.width=ie,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ue,this.disableVert=new Ue},xc.prototype.enableZeroWidthBar=function(ie,ae,fe){ie.style.pointerEvents="auto";function de(){var Se=ie.getBoundingClientRect(),Re=fe=="vert"?document.elementFromPoint(Se.right-1,(Se.top+Se.bottom)/2):document.elementFromPoint((Se.right+Se.left)/2,Se.bottom-1);Re!=ie?ie.style.pointerEvents="none":ae.set(1e3,de)}ae.set(1e3,de)},xc.prototype.clear=function(){var ie=this.horiz.parentNode;ie.removeChild(this.horiz),ie.removeChild(this.vert)};var Lu=function(){};Lu.prototype.update=function(){return{bottom:0,right:0}},Lu.prototype.setScrollLeft=function(){},Lu.prototype.setScrollTop=function(){},Lu.prototype.clear=function(){};function lc(ie,ae){ae||(ae=Il(ie));var fe=ie.display.barWidth,de=ie.display.barHeight;Jd(ie,ae);for(var Se=0;Se<4&&fe!=ie.display.barWidth||de!=ie.display.barHeight;Se++)fe!=ie.display.barWidth&&ie.options.lineWrapping&&Do(ie),Jd(ie,Il(ie)),fe=ie.display.barWidth,de=ie.display.barHeight}function Jd(ie,ae){var fe=ie.display,de=fe.scrollbars.update(ae);fe.sizer.style.paddingRight=(fe.barWidth=de.right)+"px",fe.sizer.style.paddingBottom=(fe.barHeight=de.bottom)+"px",fe.heightForcer.style.borderBottom=de.bottom+"px solid transparent",de.right&&de.bottom?(fe.scrollbarFiller.style.display="block",fe.scrollbarFiller.style.height=de.bottom+"px",fe.scrollbarFiller.style.width=de.right+"px"):fe.scrollbarFiller.style.display="",de.bottom&&ie.options.coverGutterNextToScrollbar&&ie.options.fixedGutter?(fe.gutterFiller.style.display="block",fe.gutterFiller.style.height=de.bottom+"px",fe.gutterFiller.style.width=ae.gutterWidth+"px"):fe.gutterFiller.style.display=""}var of={native:xc,null:Lu};function Ah(ie){ie.display.scrollbars&&(ie.display.scrollbars.clear(),ie.display.scrollbars.addClass&&He(ie.display.wrapper,ie.display.scrollbars.addClass)),ie.display.scrollbars=new of[ie.options.scrollbarStyle](function(ae){ie.display.wrapper.insertBefore(ae,ie.display.scrollbarFiller),Qt(ae,"mousedown",function(){ie.state.focused&&setTimeout(function(){return ie.display.input.focus()},0)}),ae.setAttribute("cm-not-content","true")},function(ae,fe){fe=="horizontal"?kl(ie,ae):_u(ie,ae)},ie),ie.display.scrollbars.addClass&&Dt(ie.display.wrapper,ie.display.scrollbars.addClass)}var Hf=0;function Ol(ie){ie.curOp={cm:ie,viewChanged:!1,startHeight:ie.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:++Hf},Gr(ie.curOp)}function Oc(ie){var ae=ie.curOp;ae&&kr(ae,function(fe){for(var de=0;de<fe.ops.length;de++)fe.ops[de].cm.curOp=null;dg(fe)})}function dg(ie){for(var ae=ie.ops,fe=0;fe<ae.length;fe++)pt(ae[fe]);for(var de=0;de<ae.length;de++)wt(ae[de]);for(var Se=0;Se<ae.length;Se++)tn(ae[Se]);for(var Re=0;Re<ae.length;Re++)an(ae[Re]);for(var _e=0;_e<ae.length;_e++)zn(ae[_e])}function pt(ie){var ae=ie.cm,fe=ae.display;fr(ae),ie.updateMaxLine&&Ho(ae),ie.mustUpdate=ie.viewChanged||ie.forceUpdate||ie.scrollTop!=null||ie.scrollToPos&&(ie.scrollToPos.from.line<fe.viewFrom||ie.scrollToPos.to.line>=fe.viewTo)||fe.maxLineChanged&&ae.options.lineWrapping,ie.update=ie.mustUpdate&&new Ni(ae,ie.mustUpdate&&{top:ie.scrollTop,ensure:ie.scrollToPos},ie.forceUpdate)}function wt(ie){ie.updatedDisplay=ie.mustUpdate&&Wr(ie.cm,ie.update)}function tn(ie){var ae=ie.cm,fe=ae.display;ie.updatedDisplay&&Do(ae),ie.barMeasure=Il(ae),fe.maxLineChanged&&!ae.options.lineWrapping&&(ie.adjustWidthTo=id(ae,fe.maxLine,fe.maxLine.text.length).left+3,ae.display.sizerWidth=ie.adjustWidthTo,ie.barMeasure.scrollWidth=Math.max(fe.scroller.clientWidth,fe.sizer.offsetLeft+ie.adjustWidthTo+wl(ae)+ae.display.barWidth),ie.maxScrollLeft=Math.max(0,fe.sizer.offsetLeft+ie.adjustWidthTo-sl(ae))),(ie.updatedDisplay||ie.selectionChanged)&&(ie.preparedSelection=fe.input.prepareSelection())}function an(ie){var ae=ie.cm;ie.adjustWidthTo!=null&&(ae.display.sizer.style.minWidth=ie.adjustWidthTo+"px",ie.maxScrollLeft<ae.doc.scrollLeft&&kl(ae,Math.min(ae.display.scroller.scrollLeft,ie.maxScrollLeft),!0),ae.display.maxLineChanged=!1);var fe=ie.focus&&ie.focus==it();ie.preparedSelection&&ae.display.input.showSelection(ie.preparedSelection,fe),(ie.updatedDisplay||ie.startHeight!=ae.doc.height)&&lc(ae,ie.barMeasure),ie.updatedDisplay&&xo(ae,ie.barMeasure),ie.selectionChanged&&Va(ae),ae.state.focused&&ie.updateInput&&ae.display.input.reset(ie.typing),fe&&cs(ie.cm)}function zn(ie){var ae=ie.cm,fe=ae.display,de=ae.doc;if(ie.updatedDisplay&&sr(ae,ie.update),fe.wheelStartX!=null&&(ie.scrollTop!=null||ie.scrollLeft!=null||ie.scrollToPos)&&(fe.wheelStartX=fe.wheelStartY=null),ie.scrollTop!=null&&Fh(ae,ie.scrollTop,ie.forceScroll),ie.scrollLeft!=null&&kl(ae,ie.scrollLeft,!0,!0),ie.scrollToPos){var Se=sd(ae,Hn(de,ie.scrollToPos.from),Hn(de,ie.scrollToPos.to),ie.scrollToPos.margin);jf(ae,Se)}var Re=ie.maybeHiddenMarkers,_e=ie.maybeUnhiddenMarkers;if(Re)for(var ft=0;ft<Re.length;++ft)Re[ft].lines.length||jt(Re[ft],"hide");if(_e)for(var lt=0;lt<_e.length;++lt)_e[lt].lines.length&&jt(_e[lt],"unhide");fe.wrapper.offsetHeight&&(de.scrollTop=ae.display.scroller.scrollTop),ie.changeObjs&&jt(ae,"changes",ae,ie.changeObjs),ie.update&&ie.update.finish()}function bn(ie,ae){if(ie.curOp)return ae();Ol(ie);try{return ae()}finally{Oc(ie)}}function si(ie,ae){return function(){if(ie.curOp)return ae.apply(ie,arguments);Ol(ie);try{return ae.apply(ie,arguments)}finally{Oc(ie)}}}function li(ie){return function(){if(this.curOp)return ie.apply(this,arguments);Ol(this);try{return ie.apply(this,arguments)}finally{Oc(this)}}}function ei(ie){return function(){var ae=this.cm;if(!ae||ae.curOp)return ie.apply(this,arguments);Ol(ae);try{return ie.apply(this,arguments)}finally{Oc(ae)}}}function Mi(ie,ae){ie.doc.highlightFrontier<ie.display.viewTo&&ie.state.highlight.set(ae,_t(Ai,ie))}function Ai(ie){var ae=ie.doc;if(!(ae.highlightFrontier>=ie.display.viewTo)){var fe=+new Date+ie.options.workTime,de=Wi(ie,ae.highlightFrontier),Se=[];ae.iter(de.line,Math.min(ae.first+ae.size,ie.display.viewTo+500),function(Re){if(de.line>=ie.display.viewFrom){var _e=Re.styles,ft=Re.text.length>ie.options.maxHighlightLength?qt(ae.mode,de.state):null,lt=Yi(ie,Re,de,!0);ft&&(de.state=ft),Re.styles=lt.styles;var Zt=Re.styleClasses,Rn=lt.classes;Rn?Re.styleClasses=Rn:Zt&&(Re.styleClasses=null);for(var Yt=!_e||_e.length!=Re.styles.length||Zt!=Rn&&(!Zt||!Rn||Zt.bgClass!=Rn.bgClass||Zt.textClass!=Rn.textClass),ci=0;!Yt&&ci<_e.length;++ci)Yt=_e[ci]!=Re.styles[ci];Yt&&Se.push(de.line),Re.stateAfter=de.save(),de.nextLine()}else Re.text.length<=ie.options.maxHighlightLength&&ln(ie,Re.text,de),Re.stateAfter=de.line%5==0?de.save():null,de.nextLine();if(+new Date>fe)return Mi(ie,ie.options.workDelay),!0}),ae.highlightFrontier=de.line,ae.modeFrontier=Math.max(ae.modeFrontier,de.line),Se.length&&bn(ie,function(){for(var Re=0;Re<Se.length;Re++)ra(ie,Se[Re],"text")})}}var Ni=function(ie,ae,fe){var de=ie.display;this.viewport=ae,this.visible=fa(de,ie.doc,ae),this.editorIsHidden=!de.wrapper.offsetWidth,this.wrapperHeight=de.wrapper.clientHeight,this.wrapperWidth=de.wrapper.clientWidth,this.oldDisplayWidth=sl(ie),this.force=fe,this.dims=Nh(ie),this.events=[]};Ni.prototype.signal=function(ie,ae){dn(ie,ae)&&this.events.push(arguments)},Ni.prototype.finish=function(){for(var ie=0;ie<this.events.length;ie++)jt.apply(null,this.events[ie])};function fr(ie){var ae=ie.display;!ae.scrollbarsClipped&&ae.scroller.offsetWidth&&(ae.nativeBarWidth=ae.scroller.offsetWidth-ae.scroller.clientWidth,ae.heightForcer.style.height=wl(ie)+"px",ae.sizer.style.marginBottom=-ae.nativeBarWidth+"px",ae.sizer.style.borderRightWidth=wl(ie)+"px",ae.scrollbarsClipped=!0)}function dr(ie){if(ie.hasFocus())return null;var ae=it();if(!ae||!Et(ie.display.lineDiv,ae))return null;var fe={activeElt:ae};if(window.getSelection){var de=window.getSelection();de.anchorNode&&de.extend&&Et(ie.display.lineDiv,de.anchorNode)&&(fe.anchorNode=de.anchorNode,fe.anchorOffset=de.anchorOffset,fe.focusNode=de.focusNode,fe.focusOffset=de.focusOffset)}return fe}function ir(ie){if(!(!ie||!ie.activeElt||ie.activeElt==it())&&(ie.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(ie.activeElt.nodeName)&&ie.anchorNode&&Et(document.body,ie.anchorNode)&&Et(document.body,ie.focusNode))){var ae=window.getSelection(),fe=document.createRange();fe.setEnd(ie.anchorNode,ie.anchorOffset),fe.collapse(!1),ae.removeAllRanges(),ae.addRange(fe),ae.extend(ie.focusNode,ie.focusOffset)}}function Wr(ie,ae){var fe=ie.display,de=ie.doc;if(ae.editorIsHidden)return Hs(ie),!1;if(!ae.force&&ae.visible.from>=fe.viewFrom&&ae.visible.to<=fe.viewTo&&(fe.updateLineNumbers==null||fe.updateLineNumbers>=fe.viewTo)&&fe.renderedView==fe.view&&du(ie)==0)return!1;$r(ie)&&(Hs(ie),ae.dims=Nh(ie));var Se=de.first+de.size,Re=Math.max(ae.visible.from-ie.options.viewportMargin,de.first),_e=Math.min(Se,ae.visible.to+ie.options.viewportMargin);fe.viewFrom<Re&&Re-fe.viewFrom<20&&(Re=Math.max(de.first,fe.viewFrom)),fe.viewTo>_e&&fe.viewTo-_e<20&&(_e=Math.min(Se,fe.viewTo)),kn&&(Re=Mr(ie.doc,Re),_e=Nr(ie.doc,_e));var ft=Re!=fe.viewFrom||_e!=fe.viewTo||fe.lastWrapHeight!=ae.wrapperHeight||fe.lastWrapWidth!=ae.wrapperWidth;Ja(ie,Re,_e),fe.viewOffset=Bo(on(ie.doc,fe.viewFrom)),ie.display.mover.style.top=fe.viewOffset+"px";var lt=du(ie);if(!ft&<==0&&!ae.force&&fe.renderedView==fe.view&&(fe.updateLineNumbers==null||fe.updateLineNumbers>=fe.viewTo))return!1;var Zt=dr(ie);return lt>4&&(fe.lineDiv.style.display="none"),Ir(ie,fe.updateLineNumbers,ae.dims),lt>4&&(fe.lineDiv.style.display=""),fe.renderedView=fe.view,ir(Zt),We(fe.cursorDiv),We(fe.selectionDiv),fe.gutters.style.height=fe.sizer.style.minHeight=0,ft&&(fe.lastWrapHeight=ae.wrapperHeight,fe.lastWrapWidth=ae.wrapperWidth,Mi(ie,400)),fe.updateLineNumbers=null,!0}function sr(ie,ae){for(var fe=ae.viewport,de=!0;;de=!1){if(!de||!ie.options.lineWrapping||ae.oldDisplayWidth==sl(ie)){if(fe&&fe.top!=null&&(fe={top:Math.min(ie.doc.height+ju(ie.display)-td(ie),fe.top)}),ae.visible=fa(ie.display,ie.doc,fe),ae.visible.from>=ie.display.viewFrom&&ae.visible.to<=ie.display.viewTo)break}else de&&(ae.visible=fa(ie.display,ie.doc,fe));if(!Wr(ie,ae))break;Do(ie);var Se=Il(ie);nl(ie),lc(ie,Se),xo(ie,Se),ae.force=!1}ae.signal(ie,"update",ie),(ie.display.viewFrom!=ie.display.reportedViewFrom||ie.display.viewTo!=ie.display.reportedViewTo)&&(ae.signal(ie,"viewportChange",ie,ie.display.viewFrom,ie.display.viewTo),ie.display.reportedViewFrom=ie.display.viewFrom,ie.display.reportedViewTo=ie.display.viewTo)}function zr(ie,ae){var fe=new Ni(ie,ae);if(Wr(ie,fe)){Do(ie),sr(ie,fe);var de=Il(ie);nl(ie),lc(ie,de),xo(ie,de),fe.finish()}}function Ir(ie,ae,fe){var de=ie.display,Se=ie.options.lineNumbers,Re=de.lineDiv,_e=Re.firstChild;function ft(tr){var lr=tr.nextSibling;return Ne&&ce&&ie.display.currentWheelTarget==tr?tr.style.display="none":tr.parentNode.removeChild(tr),lr}for(var lt=de.view,Zt=de.viewFrom,Rn=0;Rn<lt.length;Rn++){var Yt=lt[Rn];if(!Yt.hidden)if(!Yt.node||Yt.node.parentNode!=Re){var ci=su(ie,Yt,Zt,fe);Re.insertBefore(ci,_e)}else{for(;_e!=Yt.node;)_e=ft(_e);var ai=Se&&ae!=null&&ae<=Zt&&Yt.lineNumber;Yt.changes&&(Wt(Yt.changes,"gutter")>-1&&(ai=!1),Ra(ie,Yt,Zt,fe)),ai&&(We(Yt.lineNumber),Yt.lineNumber.appendChild(document.createTextNode(Si(ie.options,Zt)))),_e=Yt.node.nextSibling}Zt+=Yt.size}for(;_e;)_e=ft(_e)}function eo(ie){var ae=ie.gutters.offsetWidth;ie.sizer.style.marginLeft=ae+"px"}function xo(ie,ae){ie.display.sizer.style.minHeight=ae.docHeight+"px",ie.display.heightForcer.style.top=ae.docHeight+"px",ie.display.gutters.style.height=ae.docHeight+ie.display.barHeight+wl(ie)+"px"}function ko(ie){var ae=ie.display,fe=ae.view;if(!(!ae.alignWidgets&&(!ae.gutters.firstChild||!ie.options.fixedGutter))){for(var de=Pd(ae)-ae.scroller.scrollLeft+ie.doc.scrollLeft,Se=ae.gutters.offsetWidth,Re=de+"px",_e=0;_e<fe.length;_e++)if(!fe[_e].hidden){ie.options.fixedGutter&&(fe[_e].gutter&&(fe[_e].gutter.style.left=Re),fe[_e].gutterBackground&&(fe[_e].gutterBackground.style.left=Re));var ft=fe[_e].alignable;if(ft)for(var lt=0;lt<ft.length;lt++)ft[lt].style.left=Re}ie.options.fixedGutter&&(ae.gutters.style.left=de+Se+"px")}}function $r(ie){if(!ie.options.lineNumbers)return!1;var ae=ie.doc,fe=Si(ie.options,ae.first+ae.size-1),de=ie.display;if(fe.length!=de.lineNumChars){var Se=de.measure.appendChild(Qe("div",[Qe("div",fe)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Re=Se.firstChild.offsetWidth,_e=Se.offsetWidth-Re;return de.lineGutter.style.width="",de.lineNumInnerWidth=Math.max(Re,de.lineGutter.offsetWidth-_e)+1,de.lineNumWidth=de.lineNumInnerWidth+_e,de.lineNumChars=de.lineNumInnerWidth?fe.length:-1,de.lineGutter.style.width=de.lineNumWidth+"px",eo(ie.display),!0}return!1}function So(ie,ae){for(var fe=[],de=!1,Se=0;Se<ie.length;Se++){var Re=ie[Se],_e=null;if(typeof Re!="string"&&(_e=Re.style,Re=Re.className),Re=="CodeMirror-linenumbers")if(ae)de=!0;else continue;fe.push({className:Re,style:_e})}return ae&&!de&&fe.push({className:"CodeMirror-linenumbers",style:null}),fe}function Xo(ie){var ae=ie.gutters,fe=ie.gutterSpecs;We(ae),ie.lineGutter=null;for(var de=0;de<fe.length;++de){var Se=fe[de],Re=Se.className,_e=Se.style,ft=ae.appendChild(Qe("div",null,"CodeMirror-gutter "+Re));_e&&(ft.style.cssText=_e),Re=="CodeMirror-linenumbers"&&(ie.lineGutter=ft,ft.style.width=(ie.lineNumWidth||1)+"px")}ae.style.display=fe.length?"":"none",eo(ie)}function _r(ie){Xo(ie.display),_a(ie),ko(ie)}function co(ie,ae,fe,de){var Se=this;this.input=fe,Se.scrollbarFiller=Qe("div",null,"CodeMirror-scrollbar-filler"),Se.scrollbarFiller.setAttribute("cm-not-content","true"),Se.gutterFiller=Qe("div",null,"CodeMirror-gutter-filler"),Se.gutterFiller.setAttribute("cm-not-content","true"),Se.lineDiv=Pt("div",null,"CodeMirror-code"),Se.selectionDiv=Qe("div",null,null,"position: relative; z-index: 1"),Se.cursorDiv=Qe("div",null,"CodeMirror-cursors"),Se.measure=Qe("div",null,"CodeMirror-measure"),Se.lineMeasure=Qe("div",null,"CodeMirror-measure"),Se.lineSpace=Pt("div",[Se.measure,Se.lineMeasure,Se.selectionDiv,Se.cursorDiv,Se.lineDiv],null,"position: relative; outline: none");var Re=Pt("div",[Se.lineSpace],"CodeMirror-lines");Se.mover=Qe("div",[Re],null,"position: relative"),Se.sizer=Qe("div",[Se.mover],"CodeMirror-sizer"),Se.sizerWidth=null,Se.heightForcer=Qe("div",null,null,"position: absolute; height: "+Ln+"px; width: 1px;"),Se.gutters=Qe("div",null,"CodeMirror-gutters"),Se.lineGutter=null,Se.scroller=Qe("div",[Se.sizer,Se.heightForcer,Se.gutters],"CodeMirror-scroll"),Se.scroller.setAttribute("tabIndex","-1"),Se.wrapper=Qe("div",[Se.scrollbarFiller,Se.gutterFiller,Se.scroller],"CodeMirror"),Ge&&Xe<8&&(Se.gutters.style.zIndex=-1,Se.scroller.style.paddingRight=0),!Ne&&!(ge&&ee)&&(Se.scroller.draggable=!0),ie&&(ie.appendChild?ie.appendChild(Se.wrapper):ie(Se.wrapper)),Se.viewFrom=Se.viewTo=ae.first,Se.reportedViewFrom=Se.reportedViewTo=ae.first,Se.view=[],Se.renderedView=null,Se.externalMeasured=null,Se.viewOffset=0,Se.lastWrapHeight=Se.lastWrapWidth=0,Se.updateLineNumbers=null,Se.nativeBarWidth=Se.barHeight=Se.barWidth=0,Se.scrollbarsClipped=!1,Se.lineNumWidth=Se.lineNumInnerWidth=Se.lineNumChars=null,Se.alignWidgets=!1,Se.cachedCharWidth=Se.cachedTextHeight=Se.cachedPaddingH=null,Se.maxLine=null,Se.maxLineLength=0,Se.maxLineChanged=!1,Se.wheelDX=Se.wheelDY=Se.wheelStartX=Se.wheelStartY=null,Se.shift=!1,Se.selForContextMenu=null,Se.activeTouch=null,Se.gutterSpecs=So(de.gutters,de.lineNumbers),Xo(Se),fe.init(Se)}var Xr=0,Cr=null;Ge?Cr=-.53:ge?Cr=15:Ct?Cr=-.7:Lt&&(Cr=-1/3);function oo(ie){var ae=ie.wheelDeltaX,fe=ie.wheelDeltaY;return ae==null&&ie.detail&&ie.axis==ie.HORIZONTAL_AXIS&&(ae=ie.detail),fe==null&&ie.detail&&ie.axis==ie.VERTICAL_AXIS?fe=ie.detail:fe==null&&(fe=ie.wheelDelta),{x:ae,y:fe}}function Mo(ie){var ae=oo(ie);return ae.x*=Cr,ae.y*=Cr,ae}function Zo(ie,ae){var fe=oo(ae),de=fe.x,Se=fe.y,Re=ie.display,_e=Re.scroller,ft=_e.scrollWidth>_e.clientWidth,lt=_e.scrollHeight>_e.clientHeight;if(de&&ft||Se&<){if(Se&&ce&&Ne){e:for(var Zt=ae.target,Rn=Re.view;Zt!=_e;Zt=Zt.parentNode)for(var Yt=0;Yt<Rn.length;Yt++)if(Rn[Yt].node==Zt){ie.display.currentWheelTarget=Zt;break e}}if(de&&!ge&&!Ve&&Cr!=null){Se&<&&_u(ie,Math.max(0,_e.scrollTop+Se*Cr)),kl(ie,Math.max(0,_e.scrollLeft+de*Cr)),(!Se||Se&<)&&ui(ae),Re.wheelStartX=null;return}if(Se&&Cr!=null){var ci=Se*Cr,ai=ie.doc.scrollTop,tr=ai+Re.wrapper.clientHeight;ci<0?ai=Math.max(0,ai+ci-50):tr=Math.min(ie.doc.height,tr+ci+50),zr(ie,{top:ai,bottom:tr})}Xr<20&&(Re.wheelStartX==null?(Re.wheelStartX=_e.scrollLeft,Re.wheelStartY=_e.scrollTop,Re.wheelDX=de,Re.wheelDY=Se,setTimeout(function(){if(Re.wheelStartX!=null){var lr=_e.scrollLeft-Re.wheelStartX,Pr=_e.scrollTop-Re.wheelStartY,Vr=Pr&&Re.wheelDY&&Pr/Re.wheelDY||lr&&Re.wheelDX&&lr/Re.wheelDX;Re.wheelStartX=Re.wheelStartY=null,Vr&&(Cr=(Cr*Xr+Vr)/(Xr+1),++Xr)}},200)):(Re.wheelDX+=de,Re.wheelDY+=Se))}}var Wo=function(ie,ae){this.ranges=ie,this.primIndex=ae};Wo.prototype.primary=function(){return this.ranges[this.primIndex]},Wo.prototype.equals=function(ie){if(ie==this)return!0;if(ie.primIndex!=this.primIndex||ie.ranges.length!=this.ranges.length)return!1;for(var ae=0;ae<this.ranges.length;ae++){var fe=this.ranges[ae],de=ie.ranges[ae];if(!At(fe.anchor,de.anchor)||!At(fe.head,de.head))return!1}return!0},Wo.prototype.deepCopy=function(){for(var ie=[],ae=0;ae<this.ranges.length;ae++)ie[ae]=new Kr(yn(this.ranges[ae].anchor),yn(this.ranges[ae].head));return new Wo(ie,this.primIndex)},Wo.prototype.somethingSelected=function(){for(var ie=0;ie<this.ranges.length;ie++)if(!this.ranges[ie].empty())return!0;return!1},Wo.prototype.contains=function(ie,ae){ae||(ae=ie);for(var fe=0;fe<this.ranges.length;fe++){var de=this.ranges[fe];if(Cn(ae,de.from())>=0&&Cn(ie,de.to())<=0)return fe}return-1};var Kr=function(ie,ae){this.anchor=ie,this.head=ae};Kr.prototype.from=function(){return mn(this.anchor,this.head)},Kr.prototype.to=function(){return pn(this.anchor,this.head)},Kr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Yo(ie,ae,fe){var de=ie&&ie.options.selectionsMayTouch,Se=ae[fe];ae.sort(function(ci,ai){return Cn(ci.from(),ai.from())}),fe=Wt(ae,Se);for(var Re=1;Re<ae.length;Re++){var _e=ae[Re],ft=ae[Re-1],lt=Cn(ft.to(),_e.from());if(de&&!_e.empty()?lt>0:lt>=0){var Zt=mn(ft.from(),_e.from()),Rn=pn(ft.to(),_e.to()),Yt=ft.empty()?_e.from()==_e.head:ft.from()==ft.head;Re<=fe&&--fe,ae.splice(--Re,2,new Kr(Yt?Rn:Zt,Yt?Zt:Rn))}}return new Wo(ae,fe)}function ia(ie,ae){return new Wo([new Kr(ie,ae||ie)],0)}function Ta(ie){return ie.text?en(ie.from.line+ie.text.length-1,It(ie.text).length+(ie.text.length==1?ie.from.ch:0)):ie.to}function pa(ie,ae){if(Cn(ie,ae.from)<0)return ie;if(Cn(ie,ae.to)<=0)return Ta(ae);var fe=ie.line+ae.text.length-(ae.to.line-ae.from.line)-1,de=ie.ch;return ie.line==ae.to.line&&(de+=Ta(ae).ch-ae.to.ch),en(fe,de)}function ds(ie,ae){for(var fe=[],de=0;de<ie.sel.ranges.length;de++){var Se=ie.sel.ranges[de];fe.push(new Kr(pa(Se.anchor,ae),pa(Se.head,ae)))}return Yo(ie.cm,fe,ie.sel.primIndex)}function ja(ie,ae,fe){return ie.line==ae.line?en(fe.line,ie.ch-ae.ch+fe.ch):en(fe.line+(ie.line-ae.line),ie.ch)}function na(ie,ae,fe){for(var de=[],Se=en(ie.first,0),Re=Se,_e=0;_e<ae.length;_e++){var ft=ae[_e],lt=ja(ft.from,Se,Re),Zt=ja(Ta(ft),Se,Re);if(Se=ft.to,Re=Zt,fe=="around"){var Rn=ie.sel.ranges[_e],Yt=Cn(Rn.head,Rn.anchor)<0;de[_e]=new Kr(Yt?Zt:lt,Yt?lt:Zt)}else de[_e]=new Kr(lt,lt)}return new Wo(de,ie.sel.primIndex)}function Fo(ie){ie.doc.mode=kt(ie.options,ie.doc.modeOption),Sa(ie)}function Sa(ie){ie.doc.iter(function(ae){ae.stateAfter&&(ae.stateAfter=null),ae.styles&&(ae.styles=null)}),ie.doc.modeFrontier=ie.doc.highlightFrontier=ie.doc.first,Mi(ie,100),ie.state.modeGen++,ie.curOp&&_a(ie)}function hs(ie,ae){return ae.from.ch==0&&ae.to.ch==0&&It(ae.text)==""&&(!ie.cm||ie.cm.options.wholeLineUpdateBefore)}function Qa(ie,ae,fe,de){function Se(yo){return fe?fe[yo]:null}function Re(yo,ao,Eo){_o(yo,ao,Eo,de),Oi(yo,"change",yo,ae)}function _e(yo,ao){for(var Eo=[],Qo=yo;Qo<ao;++Qo)Eo.push(new Ao(Zt[Qo],Se(Qo),de));return Eo}var ft=ae.from,lt=ae.to,Zt=ae.text,Rn=on(ie,ft.line),Yt=on(ie,lt.line),ci=It(Zt),ai=Se(Zt.length-1),tr=lt.line-ft.line;if(ae.full)ie.insert(0,_e(0,Zt.length)),ie.remove(Zt.length,ie.size-Zt.length);else if(hs(ie,ae)){var lr=_e(0,Zt.length-1);Re(Yt,Yt.text,ai),tr&&ie.remove(ft.line,tr),lr.length&&ie.insert(ft.line,lr)}else if(Rn==Yt)if(Zt.length==1)Re(Rn,Rn.text.slice(0,ft.ch)+ci+Rn.text.slice(lt.ch),ai);else{var Pr=_e(1,Zt.length-1);Pr.push(new Ao(ci+Rn.text.slice(lt.ch),ai,de)),Re(Rn,Rn.text.slice(0,ft.ch)+Zt[0],Se(0)),ie.insert(ft.line+1,Pr)}else if(Zt.length==1)Re(Rn,Rn.text.slice(0,ft.ch)+Zt[0]+Yt.text.slice(lt.ch),Se(0)),ie.remove(ft.line+1,tr);else{Re(Rn,Rn.text.slice(0,ft.ch)+Zt[0],Se(0)),Re(Yt,ci+Yt.text.slice(lt.ch),ai);var Vr=_e(1,Zt.length-1);tr>1&&ie.remove(ft.line+1,tr-1),ie.insert(ft.line+1,Vr)}Oi(ie,"change",ie,ae)}function Ns(ie,ae,fe){function de(Se,Re,_e){if(Se.linked)for(var ft=0;ft<Se.linked.length;++ft){var lt=Se.linked[ft];if(lt.doc!=Re){var Zt=_e&<.sharedHist;fe&&!Zt||(ae(lt.doc,Zt),de(lt.doc,Se,Zt))}}}de(ie,null,!0)}function $o(ie,ae){if(ae.cm)throw new Error("This document is already in use.");ie.doc=ae,ae.cm=ie,To(ie),Fo(ie),Io(ie),ie.options.lineWrapping||Ho(ie),ie.options.mode=ae.modeOption,_a(ie)}function Io(ie){(ie.doc.direction=="rtl"?Dt:He)(ie.display.lineDiv,"CodeMirror-rtl")}function Go(ie){bn(ie,function(){Io(ie),_a(ie)})}function Co(ie){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=ie||1}function Aa(ie,ae){var fe={from:yn(ae.from),to:Ta(ae),text:En(ie,ae.from,ae.to)};return cl(ie,fe,ae.from.line,ae.to.line+1),Ns(ie,function(de){return cl(de,fe,ae.from.line,ae.to.line+1)},!0),fe}function Po(ie){for(;ie.length;){var ae=It(ie);if(ae.ranges)ie.pop();else break}}function Jo(ie,ae){if(ae)return Po(ie.done),It(ie.done);if(ie.done.length&&!It(ie.done).ranges)return It(ie.done);if(ie.done.length>1&&!ie.done[ie.done.length-2].ranges)return ie.done.pop(),It(ie.done)}function ga(ie,ae,fe,de){var Se=ie.history;Se.undone.length=0;var Re=+new Date,_e,ft;if((Se.lastOp==de||Se.lastOrigin==ae.origin&&ae.origin&&(ae.origin.charAt(0)=="+"&&Se.lastModTime>Re-(ie.cm?ie.cm.options.historyEventDelay:500)||ae.origin.charAt(0)=="*"))&&(_e=Jo(Se,Se.lastOp==de)))ft=It(_e.changes),Cn(ae.from,ae.to)==0&&Cn(ae.from,ft.to)==0?ft.to=Ta(ae):_e.changes.push(Aa(ie,ae));else{var lt=It(Se.done);for((!lt||!lt.ranges)&&Zs(ie.sel,Se.done),_e={changes:[Aa(ie,ae)],generation:Se.generation},Se.done.push(_e);Se.done.length>Se.undoDepth;)Se.done.shift(),Se.done[0].ranges||Se.done.shift()}Se.done.push(fe),Se.generation=++Se.maxGeneration,Se.lastModTime=Se.lastSelTime=Re,Se.lastOp=Se.lastSelOp=de,Se.lastOrigin=Se.lastSelOrigin=ae.origin,ft||jt(ie,"historyAdded")}function ma(ie,ae,fe,de){var Se=ae.charAt(0);return Se=="*"||Se=="+"&&fe.ranges.length==de.ranges.length&&fe.somethingSelected()==de.somethingSelected()&&new Date-ie.history.lastSelTime<=(ie.cm?ie.cm.options.historyEventDelay:500)}function Us(ie,ae,fe,de){var Se=ie.history,Re=de&&de.origin;fe==Se.lastSelOp||Re&&Se.lastSelOrigin==Re&&(Se.lastModTime==Se.lastSelTime&&Se.lastOrigin==Re||ma(ie,Re,It(Se.done),ae))?Se.done[Se.done.length-1]=ae:Zs(ae,Se.done),Se.lastSelTime=+new Date,Se.lastSelOrigin=Re,Se.lastSelOp=fe,de&&de.clearRedo!==!1&&Po(Se.undone)}function Zs(ie,ae){var fe=It(ae);fe&&fe.ranges&&fe.equals(ie)||ae.push(ie)}function cl(ie,ae,fe,de){var Se=ae["spans_"+ie.id],Re=0;ie.iter(Math.max(ie.first,fe),Math.min(ie.first+ie.size,de),function(_e){_e.markedSpans&&((Se||(Se=ae["spans_"+ie.id]={}))[Re]=_e.markedSpans),++Re})}function ka(ie){if(!ie)return null;for(var ae,fe=0;fe<ie.length;++fe)ie[fe].marker.explicitlyCleared?ae||(ae=ie.slice(0,fe)):ae&&ae.push(ie[fe]);return ae?ae.length?ae:null:ie}function il(ie,ae){var fe=ae["spans_"+ie.id];if(!fe)return null;for(var de=[],Se=0;Se<ae.text.length;++Se)de.push(ka(fe[Se]));return de}function Fs(ie,ae){var fe=il(ie,ae),de=er(ie,ae);if(!fe)return de;if(!de)return fe;for(var Se=0;Se<fe.length;++Se){var Re=fe[Se],_e=de[Se];if(Re&&_e)e:for(var ft=0;ft<_e.length;++ft){for(var lt=_e[ft],Zt=0;Zt<Re.length;++Zt)if(Re[Zt].marker==lt.marker)continue e;Re.push(lt)}else _e&&(fe[Se]=_e)}return fe}function Ws(ie,ae,fe){for(var de=[],Se=0;Se<ie.length;++Se){var Re=ie[Se];if(Re.ranges){de.push(fe?Wo.prototype.deepCopy.call(Re):Re);continue}var _e=Re.changes,ft=[];de.push({changes:ft});for(var lt=0;lt<_e.length;++lt){var Zt=_e[lt],Rn=void 0;if(ft.push({from:Zt.from,to:Zt.to,text:Zt.text}),ae)for(var Yt in Zt)(Rn=Yt.match(/^spans_(\d+)$/))&&Wt(ae,Number(Rn[1]))>-1&&(It(ft)[Yt]=Zt[Yt],delete Zt[Yt])}}return de}function uc(ie,ae,fe,de){if(de){var Se=ie.anchor;if(fe){var Re=Cn(ae,Se)<0;Re!=Cn(fe,Se)<0?(Se=ae,ae=fe):Re!=Cn(ae,fe)<0&&(ae=fe)}return new Kr(Se,ae)}else return new Kr(fe||ae,ae)}function Ia(ie,ae,fe,de,Se){Se==null&&(Se=ie.cm&&(ie.cm.display.shift||ie.extend)),Xa(ie,new Wo([uc(ie.sel.primary(),ae,fe,Se)],0),de)}function $a(ie,ae,fe){for(var de=[],Se=ie.cm&&(ie.cm.display.shift||ie.extend),Re=0;Re<ie.sel.ranges.length;Re++)de[Re]=uc(ie.sel.ranges[Re],ae[Re],null,Se);var _e=Yo(ie.cm,de,ie.sel.primIndex);Xa(ie,_e,fe)}function Oa(ie,ae,fe,de){var Se=ie.sel.ranges.slice(0);Se[ae]=fe,Xa(ie,Yo(ie.cm,Se,ie.sel.primIndex),de)}function qa(ie,ae,fe,de){Xa(ie,ia(ae,fe),de)}function As(ie,ae,fe){var de={ranges:ae.ranges,update:function(Se){this.ranges=[];for(var Re=0;Re<Se.length;Re++)this.ranges[Re]=new Kr(Hn(ie,Se[Re].anchor),Hn(ie,Se[Re].head))},origin:fe&&fe.origin};return jt(ie,"beforeSelectionChange",ie,de),ie.cm&&jt(ie.cm,"beforeSelectionChange",ie.cm,de),de.ranges!=ae.ranges?Yo(ie.cm,de.ranges,de.ranges.length-1):ae}function da(ie,ae,fe){var de=ie.history.done,Se=It(de);Se&&Se.ranges?(de[de.length-1]=ae,_s(ie,ae,fe)):Xa(ie,ae,fe)}function Xa(ie,ae,fe){_s(ie,ae,fe),Us(ie,ie.sel,ie.cm?ie.cm.curOp.id:NaN,fe)}function _s(ie,ae,fe){(dn(ie,"beforeSelectionChange")||ie.cm&&dn(ie.cm,"beforeSelectionChange"))&&(ae=As(ie,ae,fe));var de=fe&&fe.bias||(Cn(ae.primary().head,ie.sel.primary().head)<0?-1:1);dl(ie,Yl(ie,ae,de,!0)),!(fe&&fe.scroll===!1)&&ie.cm&&ld(ie.cm)}function dl(ie,ae){ae.equals(ie.sel)||(ie.sel=ae,ie.cm&&(ie.cm.curOp.updateInput=1,ie.cm.curOp.selectionChanged=!0,jn(ie.cm)),Oi(ie,"cursorActivity",ie))}function hu(ie){dl(ie,Yl(ie,ie.sel,null,!1))}function Yl(ie,ae,fe,de){for(var Se,Re=0;Re<ae.ranges.length;Re++){var _e=ae.ranges[Re],ft=ae.ranges.length==ie.sel.ranges.length&&ie.sel.ranges[Re],lt=Jl(ie,_e.anchor,ft&&ft.anchor,fe,de),Zt=Jl(ie,_e.head,ft&&ft.head,fe,de);(Se||lt!=_e.anchor||Zt!=_e.head)&&(Se||(Se=ae.ranges.slice(0,Re)),Se[Re]=new Kr(lt,Zt))}return Se?Yo(ie.cm,Se,ae.primIndex):ae}function Ds(ie,ae,fe,de,Se){var Re=on(ie,ae.line);if(Re.markedSpans)for(var _e=0;_e<Re.markedSpans.length;++_e){var ft=Re.markedSpans[_e],lt=ft.marker,Zt="selectLeft"in lt?!lt.selectLeft:lt.inclusiveLeft,Rn="selectRight"in lt?!lt.selectRight:lt.inclusiveRight;if((ft.from==null||(Zt?ft.from<=ae.ch:ft.from<ae.ch))&&(ft.to==null||(Rn?ft.to>=ae.ch:ft.to>ae.ch))){if(Se&&(jt(lt,"beforeCursorEnter"),lt.explicitlyCleared))if(Re.markedSpans){--_e;continue}else break;if(!lt.atomic)continue;if(fe){var Yt=lt.find(de<0?1:-1),ci=void 0;if((de<0?Rn:Zt)&&(Yt=Ql(ie,Yt,-de,Yt&&Yt.line==ae.line?Re:null)),Yt&&Yt.line==ae.line&&(ci=Cn(Yt,fe))&&(de<0?ci<0:ci>0))return Ds(ie,Yt,ae,de,Se)}var ai=lt.find(de<0?-1:1);return(de<0?Zt:Rn)&&(ai=Ql(ie,ai,de,ai.line==ae.line?Re:null)),ai?Ds(ie,ai,ae,de,Se):null}}return ae}function Jl(ie,ae,fe,de,Se){var Re=de||1,_e=Ds(ie,ae,fe,Re,Se)||!Se&&Ds(ie,ae,fe,Re,!0)||Ds(ie,ae,fe,-Re,Se)||!Se&&Ds(ie,ae,fe,-Re,!0);return _e||(ie.cantEdit=!0,en(ie.first,0))}function Ql(ie,ae,fe,de){return fe<0&&ae.ch==0?ae.line>ie.first?Hn(ie,en(ae.line-1)):null:fe>0&&ae.ch==(de||on(ie,ae.line)).text.length?ae.line<ie.first+ie.size-1?en(ae.line+1,0):null:new en(ae.line,ae.ch+fe)}function za(ie){ie.setSelection(en(ie.firstLine(),0),en(ie.lastLine()),Gt)}function rl(ie,ae,fe){var de={canceled:!1,from:ae.from,to:ae.to,text:ae.text,origin:ae.origin,cancel:function(){return de.canceled=!0}};return fe&&(de.update=function(Se,Re,_e,ft){Se&&(de.from=Hn(ie,Se)),Re&&(de.to=Hn(ie,Re)),_e&&(de.text=_e),ft!==void 0&&(de.origin=ft)}),jt(ie,"beforeChange",ie,de),ie.cm&&jt(ie.cm,"beforeChange",ie.cm,de),de.canceled?(ie.cm&&(ie.cm.curOp.updateInput=2),null):{from:de.from,to:de.to,text:de.text,origin:de.origin}}function es(ie,ae,fe){if(ie.cm){if(!ie.cm.curOp)return si(ie.cm,es)(ie,ae,fe);if(ie.cm.state.suppressEdits)return}if(!((dn(ie,"beforeChange")||ie.cm&&dn(ie.cm,"beforeChange"))&&(ae=rl(ie,ae,!0),!ae))){var de=Sr&&!fe&&Rr(ie,ae.from,ae.to);if(de)for(var Se=de.length-1;Se>=0;--Se)Ya(ie,{from:de[Se].from,to:de[Se].to,text:Se?[""]:ae.text,origin:ae.origin});else Ya(ie,ae)}}function Ya(ie,ae){if(!(ae.text.length==1&&ae.text[0]==""&&Cn(ae.from,ae.to)==0)){var fe=ds(ie,ae);ga(ie,ae,fe,ie.cm?ie.cm.curOp.id:NaN),Nu(ie,ae,fe,er(ie,ae));var de=[];Ns(ie,function(Se,Re){!Re&&Wt(de,Se.history)==-1&&(rs(Se.history,ae),de.push(Se.history)),Nu(Se,ae,null,er(Se,ae))})}}function fu(ie,ae,fe){var de=ie.cm&&ie.cm.state.suppressEdits;if(!(de&&!fe)){for(var Se=ie.history,Re,_e=ie.sel,ft=ae=="undo"?Se.done:Se.undone,lt=ae=="undo"?Se.undone:Se.done,Zt=0;Zt<ft.length&&(Re=ft[Zt],!(fe?Re.ranges&&!Re.equals(ie.sel):!Re.ranges));Zt++);if(Zt!=ft.length){for(Se.lastOrigin=Se.lastSelOrigin=null;;)if(Re=ft.pop(),Re.ranges){if(Zs(Re,lt),fe&&!Re.equals(ie.sel)){Xa(ie,Re,{clearRedo:!1});return}_e=Re}else if(de){ft.push(Re);return}else break;var Rn=[];Zs(_e,lt),lt.push({changes:Rn,generation:Se.generation}),Se.generation=Re.generation||++Se.maxGeneration;for(var Yt=dn(ie,"beforeChange")||ie.cm&&dn(ie.cm,"beforeChange"),ci=function(lr){var Pr=Re.changes[lr];if(Pr.origin=ae,Yt&&!rl(ie,Pr,!1))return ft.length=0,{};Rn.push(Aa(ie,Pr));var Vr=lr?ds(ie,Pr):It(ft);Nu(ie,Pr,Vr,Fs(ie,Pr)),!lr&&ie.cm&&ie.cm.scrollIntoView({from:Pr.from,to:Ta(Pr)});var yo=[];Ns(ie,function(ao,Eo){!Eo&&Wt(yo,ao.history)==-1&&(rs(ao.history,Pr),yo.push(ao.history)),Nu(ao,Pr,null,Fs(ao,Pr))})},ai=Re.changes.length-1;ai>=0;--ai){var tr=ci(ai);if(tr)return tr.v}}}}function Pc(ie,ae){if(ae!=0&&(ie.first+=ae,ie.sel=new Wo(wn(ie.sel.ranges,function(Se){return new Kr(en(Se.anchor.line+ae,Se.anchor.ch),en(Se.head.line+ae,Se.head.ch))}),ie.sel.primIndex),ie.cm)){_a(ie.cm,ie.first,ie.first-ae,ae);for(var fe=ie.cm.display,de=fe.viewFrom;de<fe.viewTo;de++)ra(ie.cm,de,"gutter")}}function Nu(ie,ae,fe,de){if(ie.cm&&!ie.cm.curOp)return si(ie.cm,Nu)(ie,ae,fe,de);if(ae.to.line<ie.first){Pc(ie,ae.text.length-1-(ae.to.line-ae.from.line));return}if(!(ae.from.line>ie.lastLine())){if(ae.from.line<ie.first){var Se=ae.text.length-1-(ie.first-ae.from.line);Pc(ie,Se),ae={from:en(ie.first,0),to:en(ae.to.line+Se,ae.to.ch),text:[It(ae.text)],origin:ae.origin}}var Re=ie.lastLine();ae.to.line>Re&&(ae={from:ae.from,to:en(Re,on(ie,Re).text.length),text:[ae.text[0]],origin:ae.origin}),ae.removed=En(ie,ae.from,ae.to),fe||(fe=ds(ie,ae)),ie.cm?Fu(ie.cm,ae,de):Qa(ie,ae,de),_s(ie,fe,Gt),ie.cantEdit&&Jl(ie,en(ie.firstLine(),0))&&(ie.cantEdit=!1)}}function Fu(ie,ae,fe){var de=ie.doc,Se=ie.display,Re=ae.from,_e=ae.to,ft=!1,lt=Re.line;ie.options.lineWrapping||(lt=St(qr(on(de,Re.line))),de.iter(lt,_e.line+1,function(ai){if(ai==Se.maxLine)return ft=!0,!0})),de.sel.contains(ae.from,ae.to)>-1&&jn(ie),Qa(de,ae,fe,ys(ie)),ie.options.lineWrapping||(de.iter(lt,Re.line+ae.text.length,function(ai){var tr=aa(ai);tr>Se.maxLineLength&&(Se.maxLine=ai,Se.maxLineLength=tr,Se.maxLineChanged=!0,ft=!1)}),ft&&(ie.curOp.updateMaxLine=!0)),Ki(de,Re.line),Mi(ie,400);var Zt=ae.text.length-(_e.line-Re.line)-1;ae.full?_a(ie):Re.line==_e.line&&ae.text.length==1&&!hs(ie.doc,ae)?ra(ie,Re.line,"text"):_a(ie,Re.line,_e.line+1,Zt);var Rn=dn(ie,"changes"),Yt=dn(ie,"change");if(Yt||Rn){var ci={from:Re,to:_e,text:ae.text,removed:ae.removed,origin:ae.origin};Yt&&Oi(ie,"change",ie,ci),Rn&&(ie.curOp.changeObjs||(ie.curOp.changeObjs=[])).push(ci)}ie.display.selForContextMenu=null}function gu(ie,ae,fe,de,Se){var Re;de||(de=fe),Cn(de,fe)<0&&(Re=[de,fe],fe=Re[0],de=Re[1]),typeof ae=="string"&&(ae=ie.splitLines(ae)),es(ie,{from:fe,to:de,text:ae,origin:Se})}function ql(ie,ae,fe,de){fe<ie.line?ie.line+=de:ae<ie.line&&(ie.line=ae,ie.ch=0)}function Da(ie,ae,fe,de){for(var Se=0;Se<ie.length;++Se){var Re=ie[Se],_e=!0;if(Re.ranges){Re.copied||(Re=ie[Se]=Re.deepCopy(),Re.copied=!0);for(var ft=0;ft<Re.ranges.length;ft++)ql(Re.ranges[ft].anchor,ae,fe,de),ql(Re.ranges[ft].head,ae,fe,de);continue}for(var lt=0;lt<Re.changes.length;++lt){var Zt=Re.changes[lt];if(fe<Zt.from.line)Zt.from=en(Zt.from.line+de,Zt.from.ch),Zt.to=en(Zt.to.line+de,Zt.to.ch);else if(ae<=Zt.to.line){_e=!1;break}}_e||(ie.splice(0,Se+1),Se=0)}}function rs(ie,ae){var fe=ae.from.line,de=ae.to.line,Se=ae.text.length-(de-fe)-1;Da(ie.done,fe,de,Se),Da(ie.undone,fe,de,Se)}function Bs(ie,ae,fe,de){var Se=ae,Re=ae;return typeof ae=="number"?Re=on(ie,Wn(ie,ae)):Se=St(ae),Se==null?null:(de(Re,Se)&&ie.cm&&ra(ie.cm,Se,fe),Re)}function os(ie){this.lines=ie,this.parent=null;for(var ae=0,fe=0;fe<ie.length;++fe)ie[fe].parent=this,ae+=ie[fe].height;this.height=ae}os.prototype={chunkSize:function(){return this.lines.length},removeInner:function(ie,ae){for(var fe=ie,de=ie+ae;fe<de;++fe){var Se=this.lines[fe];this.height-=Se.height,ta(Se),Oi(Se,"delete")}this.lines.splice(ie,ae)},collapse:function(ie){ie.push.apply(ie,this.lines)},insertInner:function(ie,ae,fe){this.height+=fe,this.lines=this.lines.slice(0,ie).concat(ae).concat(this.lines.slice(ie));for(var de=0;de<ae.length;++de)ae[de].parent=this},iterN:function(ie,ae,fe){for(var de=ie+ae;ie<de;++ie)if(fe(this.lines[ie]))return!0}};function Ca(ie){this.children=ie;for(var ae=0,fe=0,de=0;de<ie.length;++de){var Se=ie[de];ae+=Se.chunkSize(),fe+=Se.height,Se.parent=this}this.size=ae,this.height=fe,this.parent=null}Ca.prototype={chunkSize:function(){return this.size},removeInner:function(ie,ae){this.size-=ae;for(var fe=0;fe<this.children.length;++fe){var de=this.children[fe],Se=de.chunkSize();if(ie<Se){var Re=Math.min(ae,Se-ie),_e=de.height;if(de.removeInner(ie,Re),this.height-=_e-de.height,Se==Re&&(this.children.splice(fe--,1),de.parent=null),(ae-=Re)==0)break;ie=0}else ie-=Se}if(this.size-ae<25&&(this.children.length>1||!(this.children[0]instanceof os))){var ft=[];this.collapse(ft),this.children=[new os(ft)],this.children[0].parent=this}},collapse:function(ie){for(var ae=0;ae<this.children.length;++ae)this.children[ae].collapse(ie)},insertInner:function(ie,ae,fe){this.size+=ae.length,this.height+=fe;for(var de=0;de<this.children.length;++de){var Se=this.children[de],Re=Se.chunkSize();if(ie<=Re){if(Se.insertInner(ie,ae,fe),Se.lines&&Se.lines.length>50){for(var _e=Se.lines.length%25+25,ft=_e;ft<Se.lines.length;){var lt=new os(Se.lines.slice(ft,ft+=25));Se.height-=lt.height,this.children.splice(++de,0,lt),lt.parent=this}Se.lines=Se.lines.slice(0,_e),this.maybeSpill()}break}ie-=Re}},maybeSpill:function(){if(!(this.children.length<=10)){var ie=this;do{var ae=ie.children.splice(ie.children.length-5,5),fe=new Ca(ae);if(ie.parent){ie.size-=fe.size,ie.height-=fe.height;var Se=Wt(ie.parent.children,ie);ie.parent.children.splice(Se+1,0,fe)}else{var de=new Ca(ie.children);de.parent=ie,ie.children=[de,fe],ie=de}fe.parent=ie.parent}while(ie.children.length>10);ie.parent.maybeSpill()}},iterN:function(ie,ae,fe){for(var de=0;de<this.children.length;++de){var Se=this.children[de],Re=Se.chunkSize();if(ie<Re){var _e=Math.min(ae,Re-ie);if(Se.iterN(ie,_e,fe))return!0;if((ae-=_e)==0)break;ie=0}else ie-=Re}}};var Ts=function(ie,ae,fe){if(fe)for(var de in fe)fe.hasOwnProperty(de)&&(this[de]=fe[de]);this.doc=ie,this.node=ae};Ts.prototype.clear=function(){var ie=this.doc.cm,ae=this.line.widgets,fe=this.line,de=St(fe);if(!(de==null||!ae)){for(var Se=0;Se<ae.length;++Se)ae[Se]==this&&ae.splice(Se--,1);ae.length||(fe.widgets=null);var Re=Ml(this);Jn(fe,Math.max(0,fe.height-Re)),ie&&(bn(ie,function(){Rl(ie,fe,-Re),ra(ie,de,"widget")}),Oi(ie,"lineWidgetCleared",ie,this,de))}},Ts.prototype.changed=function(){var ie=this,ae=this.height,fe=this.doc.cm,de=this.line;this.height=null;var Se=Ml(this)-ae;Se&&(fi(this.doc,de)||Jn(de,de.height+Se),fe&&bn(fe,function(){fe.curOp.forceUpdate=!0,Rl(fe,de,Se),Oi(fe,"lineWidgetChanged",fe,ie,St(de))}))},Pn(Ts);function Rl(ie,ae,fe){Bo(ae)<(ie.curOp&&ie.curOp.scrollTop||ie.doc.scrollTop)&&Xd(ie,fe)}function zu(ie,ae,fe,de){var Se=new Ts(ie,fe,de),Re=ie.cm;return Re&&Se.noHScroll&&(Re.display.alignWidgets=!0),Bs(ie,ae,"widget",function(_e){var ft=_e.widgets||(_e.widgets=[]);if(Se.insertAt==null?ft.push(Se):ft.splice(Math.min(ft.length-1,Math.max(0,Se.insertAt)),0,Se),Se.line=_e,Re&&!fi(ie,_e)){var lt=Bo(_e)<ie.scrollTop;Jn(_e,_e.height+Ml(Se)),lt&&Xd(Re,Se.height),Re.curOp.forceUpdate=!0}return!0}),Re&&Oi(Re,"lineWidgetAdded",Re,Se,typeof ae=="number"?ae:St(ae)),Se}var Cd=0,hn=function(ie,ae){this.lines=[],this.type=ae,this.doc=ie,this.id=++Cd};hn.prototype.clear=function(){if(!this.explicitlyCleared){var ie=this.doc.cm,ae=ie&&!ie.curOp;if(ae&&Ol(ie),dn(this,"clear")){var fe=this.find();fe&&Oi(this,"clear",fe.from,fe.to)}for(var de=null,Se=null,Re=0;Re<this.lines.length;++Re){var _e=this.lines[Re],ft=no(_e.markedSpans,this);ie&&!this.collapsed?ra(ie,St(_e),"text"):ie&&(ft.to!=null&&(Se=St(_e)),ft.from!=null&&(de=St(_e))),_e.markedSpans=br(_e.markedSpans,ft),ft.from==null&&this.collapsed&&!fi(this.doc,_e)&&ie&&Jn(_e,cu(ie.display))}if(ie&&this.collapsed&&!ie.options.lineWrapping)for(var lt=0;lt<this.lines.length;++lt){var Zt=qr(this.lines[lt]),Rn=aa(Zt);Rn>ie.display.maxLineLength&&(ie.display.maxLine=Zt,ie.display.maxLineLength=Rn,ie.display.maxLineChanged=!0)}de!=null&&ie&&this.collapsed&&_a(ie,de,Se+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,ie&&hu(ie.doc)),ie&&Oi(ie,"markerCleared",ie,this,de,Se),ae&&Oc(ie),this.parent&&this.parent.clear()}},hn.prototype.find=function(ie,ae){ie==null&&this.type=="bookmark"&&(ie=1);for(var fe,de,Se=0;Se<this.lines.length;++Se){var Re=this.lines[Se],_e=no(Re.markedSpans,this);if(_e.from!=null&&(fe=en(ae?Re:St(Re),_e.from),ie==-1))return fe;if(_e.to!=null&&(de=en(ae?Re:St(Re),_e.to),ie==1))return de}return fe&&{from:fe,to:de}},hn.prototype.changed=function(){var ie=this,ae=this.find(-1,!0),fe=this,de=this.doc.cm;!ae||!de||bn(de,function(){var Se=ae.line,Re=St(ae.line),_e=Ic(de,Re);if(_e&&(ll(_e),de.curOp.selectionChanged=de.curOp.forceUpdate=!0),de.curOp.updateMaxLine=!0,!fi(fe.doc,Se)&&fe.height!=null){var ft=fe.height;fe.height=null;var lt=Ml(fe)-ft;lt&&Jn(Se,Se.height+lt)}Oi(de,"markerChanged",de,ie)})},hn.prototype.attachLine=function(ie){if(!this.lines.length&&this.doc.cm){var ae=this.doc.cm.curOp;(!ae.maybeHiddenMarkers||Wt(ae.maybeHiddenMarkers,this)==-1)&&(ae.maybeUnhiddenMarkers||(ae.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(ie)},hn.prototype.detachLine=function(ie){if(this.lines.splice(Wt(this.lines,ie),1),!this.lines.length&&this.doc.cm){var ae=this.doc.cm.curOp;(ae.maybeHiddenMarkers||(ae.maybeHiddenMarkers=[])).push(this)}},Pn(hn);function Rc(ie,ae,fe,de,Se){if(de&&de.shared)return af(ie,ae,fe,de,Se);if(ie.cm&&!ie.cm.curOp)return si(ie.cm,Rc)(ie,ae,fe,de,Se);var Re=new hn(ie,Se),_e=Cn(ae,fe);if(de&&Vt(de,Re,!1),_e>0||_e==0&&Re.clearWhenEmpty!==!1)return Re;if(Re.replacedWith&&(Re.collapsed=!0,Re.widgetNode=Pt("span",[Re.replacedWith],"CodeMirror-widget"),de.handleMouseEvents||Re.widgetNode.setAttribute("cm-ignore-events","true"),de.insertLeft&&(Re.widgetNode.insertLeft=!0)),Re.collapsed){if(uo(ie,ae.line,ae,fe,Re)||ae.line!=fe.line&&uo(ie,fe.line,ae,fe,Re))throw new Error("Inserting collapsed marker partially overlapping an existing one");_n()}Re.addToHistory&&ga(ie,{from:ae,to:fe,origin:"markText"},ie.sel,NaN);var ft=ae.line,lt=ie.cm,Zt;if(ie.iter(ft,fe.line+1,function(Yt){lt&&Re.collapsed&&!lt.options.lineWrapping&&qr(Yt)==lt.display.maxLine&&(Zt=!0),Re.collapsed&&ft!=ae.line&&Jn(Yt,0),mo(Yt,new Or(Re,ft==ae.line?ae.ch:null,ft==fe.line?fe.ch:null)),++ft}),Re.collapsed&&ie.iter(ae.line,fe.line+1,function(Yt){fi(ie,Yt)&&Jn(Yt,0)}),Re.clearOnEnter&&Qt(Re,"beforeCursorEnter",function(){return Re.clear()}),Re.readOnly&&(Br(),(ie.history.done.length||ie.history.undone.length)&&ie.clearHistory()),Re.collapsed&&(Re.id=++Cd,Re.atomic=!0),lt){if(Zt&&(lt.curOp.updateMaxLine=!0),Re.collapsed)_a(lt,ae.line,fe.line+1);else if(Re.className||Re.startStyle||Re.endStyle||Re.css||Re.attributes||Re.title)for(var Rn=ae.line;Rn<=fe.line;Rn++)ra(lt,Rn,"text");Re.atomic&&hu(lt.doc),Oi(lt,"markerAdded",lt,Re)}return Re}var Xu=function(ie,ae){this.markers=ie,this.primary=ae;for(var fe=0;fe<ie.length;++fe)ie[fe].parent=this};Xu.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var ie=0;ie<this.markers.length;++ie)this.markers[ie].clear();Oi(this,"clear")}},Xu.prototype.find=function(ie,ae){return this.primary.find(ie,ae)},Pn(Xu);function af(ie,ae,fe,de,Se){de=Vt(de),de.shared=!1;var Re=[Rc(ie,ae,fe,de,Se)],_e=Re[0],ft=de.widgetNode;return Ns(ie,function(lt){ft&&(de.widgetNode=ft.cloneNode(!0)),Re.push(Rc(lt,Hn(lt,ae),Hn(lt,fe),de,Se));for(var Zt=0;Zt<lt.linked.length;++Zt)if(lt.linked[Zt].isParent)return;_e=It(Re)}),new Xu(Re,_e)}function bd(ie){return ie.findMarks(en(ie.first,0),ie.clipPos(en(ie.lastLine())),function(ae){return ae.parent})}function Ed(ie,ae){for(var fe=0;fe<ae.length;fe++){var de=ae[fe],Se=de.find(),Re=ie.clipPos(Se.from),_e=ie.clipPos(Se.to);if(Cn(Re,_e)){var ft=Rc(ie,Re,_e,de.primary,de.primary.type);de.markers.push(ft),ft.parent=de}}}function Dh(ie){for(var ae=function(de){var Se=ie[de],Re=[Se.primary.doc];Ns(Se.primary.doc,function(lt){return Re.push(lt)});for(var _e=0;_e<Se.markers.length;_e++){var ft=Se.markers[_e];Wt(Re,ft.doc)==-1&&(ft.parent=null,Se.markers.splice(_e--,1))}},fe=0;fe<ie.length;fe++)ae(fe)}var Qg=0,Gs=function(ie,ae,fe,de,Se){if(!(this instanceof Gs))return new Gs(ie,ae,fe,de,Se);fe==null&&(fe=0),Ca.call(this,[new os([new Ao("",null)])]),this.first=fe,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=fe;var Re=en(fe,0);this.sel=ia(Re),this.history=new Co(null),this.id=++Qg,this.modeOption=ae,this.lineSep=de,this.direction=Se=="rtl"?"rtl":"ltr",this.extend=!1,typeof ie=="string"&&(ie=this.splitLines(ie)),Qa(this,{from:Re,to:Re,text:ie}),Xa(this,ia(Re),Gt)};Gs.prototype=Ee(Ca.prototype,{constructor:Gs,iter:function(ie,ae,fe){fe?this.iterN(ie-this.first,ae-ie,fe):this.iterN(this.first,this.first+this.size,ie)},insert:function(ie,ae){for(var fe=0,de=0;de<ae.length;++de)fe+=ae[de].height;this.insertInner(ie-this.first,ae,fe)},remove:function(ie,ae){this.removeInner(ie-this.first,ae)},getValue:function(ie){var ae=Dn(this,this.first,this.first+this.size);return ie===!1?ae:ae.join(ie||this.lineSeparator())},setValue:ei(function(ie){var ae=en(this.first,0),fe=this.first+this.size-1;es(this,{from:ae,to:en(fe,on(this,fe).text.length),text:this.splitLines(ie),origin:"setValue",full:!0},!0),this.cm&&ud(this.cm,0,0),Xa(this,ia(ae),Gt)}),replaceRange:function(ie,ae,fe,de){ae=Hn(this,ae),fe=fe?Hn(this,fe):ae,gu(this,ie,ae,fe,de)},getRange:function(ie,ae,fe){var de=En(this,Hn(this,ie),Hn(this,ae));return fe===!1?de:de.join(fe||this.lineSeparator())},getLine:function(ie){var ae=this.getLineHandle(ie);return ae&&ae.text},getLineHandle:function(ie){if(qn(this,ie))return on(this,ie)},getLineNumber:function(ie){return St(ie)},getLineHandleVisualStart:function(ie){return typeof ie=="number"&&(ie=on(this,ie)),qr(ie)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(ie){return Hn(this,ie)},getCursor:function(ie){var ae=this.sel.primary(),fe;return ie==null||ie=="head"?fe=ae.head:ie=="anchor"?fe=ae.anchor:ie=="end"||ie=="to"||ie===!1?fe=ae.to():fe=ae.from(),fe},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:ei(function(ie,ae,fe){qa(this,Hn(this,typeof ie=="number"?en(ie,ae||0):ie),null,fe)}),setSelection:ei(function(ie,ae,fe){qa(this,Hn(this,ie),Hn(this,ae||ie),fe)}),extendSelection:ei(function(ie,ae,fe){Ia(this,Hn(this,ie),ae&&Hn(this,ae),fe)}),extendSelections:ei(function(ie,ae){$a(this,ii(this,ie),ae)}),extendSelectionsBy:ei(function(ie,ae){var fe=wn(this.sel.ranges,ie);$a(this,ii(this,fe),ae)}),setSelections:ei(function(ie,ae,fe){if(ie.length){for(var de=[],Se=0;Se<ie.length;Se++)de[Se]=new Kr(Hn(this,ie[Se].anchor),Hn(this,ie[Se].head));ae==null&&(ae=Math.min(ie.length-1,this.sel.primIndex)),Xa(this,Yo(this.cm,de,ae),fe)}}),addSelection:ei(function(ie,ae,fe){var de=this.sel.ranges.slice(0);de.push(new Kr(Hn(this,ie),Hn(this,ae||ie))),Xa(this,Yo(this.cm,de,de.length-1),fe)}),getSelection:function(ie){for(var ae=this.sel.ranges,fe,de=0;de<ae.length;de++){var Se=En(this,ae[de].from(),ae[de].to());fe=fe?fe.concat(Se):Se}return ie===!1?fe:fe.join(ie||this.lineSeparator())},getSelections:function(ie){for(var ae=[],fe=this.sel.ranges,de=0;de<fe.length;de++){var Se=En(this,fe[de].from(),fe[de].to());ie!==!1&&(Se=Se.join(ie||this.lineSeparator())),ae[de]=Se}return ae},replaceSelection:function(ie,ae,fe){for(var de=[],Se=0;Se<this.sel.ranges.length;Se++)de[Se]=ie;this.replaceSelections(de,ae,fe||"+input")},replaceSelections:ei(function(ie,ae,fe){for(var de=[],Se=this.sel,Re=0;Re<Se.ranges.length;Re++){var _e=Se.ranges[Re];de[Re]={from:_e.from(),to:_e.to(),text:this.splitLines(ie[Re]),origin:fe}}for(var ft=ae&&ae!="end"&&na(this,de,ae),lt=de.length-1;lt>=0;lt--)es(this,de[lt]);ft?da(this,ft):this.cm&&ld(this.cm)}),undo:ei(function(){fu(this,"undo")}),redo:ei(function(){fu(this,"redo")}),undoSelection:ei(function(){fu(this,"undo",!0)}),redoSelection:ei(function(){fu(this,"redo",!0)}),setExtending:function(ie){this.extend=ie},getExtending:function(){return this.extend},historySize:function(){for(var ie=this.history,ae=0,fe=0,de=0;de<ie.done.length;de++)ie.done[de].ranges||++ae;for(var Se=0;Se<ie.undone.length;Se++)ie.undone[Se].ranges||++fe;return{undo:ae,redo:fe}},clearHistory:function(){var ie=this;this.history=new Co(this.history.maxGeneration),Ns(this,function(ae){return ae.history=ie.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(ie){return ie&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(ie){return this.history.generation==(ie||this.cleanGeneration)},getHistory:function(){return{done:Ws(this.history.done),undone:Ws(this.history.undone)}},setHistory:function(ie){var ae=this.history=new Co(this.history.maxGeneration);ae.done=Ws(ie.done.slice(0),null,!0),ae.undone=Ws(ie.undone.slice(0),null,!0)},setGutterMarker:ei(function(ie,ae,fe){return Bs(this,ie,"gutter",function(de){var Se=de.gutterMarkers||(de.gutterMarkers={});return Se[ae]=fe,!fe&&ye(Se)&&(de.gutterMarkers=null),!0})}),clearGutter:ei(function(ie){var ae=this;this.iter(function(fe){fe.gutterMarkers&&fe.gutterMarkers[ie]&&Bs(ae,fe,"gutter",function(){return fe.gutterMarkers[ie]=null,ye(fe.gutterMarkers)&&(fe.gutterMarkers=null),!0})})}),lineInfo:function(ie){var ae;if(typeof ie=="number"){if(!qn(this,ie)||(ae=ie,ie=on(this,ie),!ie))return null}else if(ae=St(ie),ae==null)return null;return{line:ae,handle:ie,text:ie.text,gutterMarkers:ie.gutterMarkers,textClass:ie.textClass,bgClass:ie.bgClass,wrapClass:ie.wrapClass,widgets:ie.widgets}},addLineClass:ei(function(ie,ae,fe){return Bs(this,ie,ae=="gutter"?"gutter":"class",function(de){var Se=ae=="text"?"textClass":ae=="background"?"bgClass":ae=="gutter"?"gutterClass":"wrapClass";if(!de[Se])de[Se]=fe;else{if(Be(fe).test(de[Se]))return!1;de[Se]+=" "+fe}return!0})}),removeLineClass:ei(function(ie,ae,fe){return Bs(this,ie,ae=="gutter"?"gutter":"class",function(de){var Se=ae=="text"?"textClass":ae=="background"?"bgClass":ae=="gutter"?"gutterClass":"wrapClass",Re=de[Se];if(Re)if(fe==null)de[Se]=null;else{var _e=Re.match(Be(fe));if(!_e)return!1;var ft=_e.index+_e[0].length;de[Se]=Re.slice(0,_e.index)+(!_e.index||ft==Re.length?"":" ")+Re.slice(ft)||null}else return!1;return!0})}),addLineWidget:ei(function(ie,ae,fe){return zu(this,ie,ae,fe)}),removeLineWidget:function(ie){ie.clear()},markText:function(ie,ae,fe){return Rc(this,Hn(this,ie),Hn(this,ae),fe,fe&&fe.type||"range")},setBookmark:function(ie,ae){var fe={replacedWith:ae&&(ae.nodeType==null?ae.widget:ae),insertLeft:ae&&ae.insertLeft,clearWhenEmpty:!1,shared:ae&&ae.shared,handleMouseEvents:ae&&ae.handleMouseEvents};return ie=Hn(this,ie),Rc(this,ie,ie,fe,"bookmark")},findMarksAt:function(ie){ie=Hn(this,ie);var ae=[],fe=on(this,ie.line).markedSpans;if(fe)for(var de=0;de<fe.length;++de){var Se=fe[de];(Se.from==null||Se.from<=ie.ch)&&(Se.to==null||Se.to>=ie.ch)&&ae.push(Se.marker.parent||Se.marker)}return ae},findMarks:function(ie,ae,fe){ie=Hn(this,ie),ae=Hn(this,ae);var de=[],Se=ie.line;return this.iter(ie.line,ae.line+1,function(Re){var _e=Re.markedSpans;if(_e)for(var ft=0;ft<_e.length;ft++){var lt=_e[ft];!(lt.to!=null&&Se==ie.line&&ie.ch>=lt.to||lt.from==null&&Se!=ie.line||lt.from!=null&&Se==ae.line&<.from>=ae.ch)&&(!fe||fe(lt.marker))&&de.push(lt.marker.parent||lt.marker)}++Se}),de},getAllMarks:function(){var ie=[];return this.iter(function(ae){var fe=ae.markedSpans;if(fe)for(var de=0;de<fe.length;++de)fe[de].from!=null&&ie.push(fe[de].marker)}),ie},posFromIndex:function(ie){var ae,fe=this.first,de=this.lineSeparator().length;return this.iter(function(Se){var Re=Se.text.length+de;if(Re>ie)return ae=ie,!0;ie-=Re,++fe}),Hn(this,en(fe,ae))},indexFromPos:function(ie){ie=Hn(this,ie);var ae=ie.ch;if(ie.line<this.first||ie.ch<0)return 0;var fe=this.lineSeparator().length;return this.iter(this.first,ie.line,function(de){ae+=de.text.length+fe}),ae},copy:function(ie){var ae=new Gs(Dn(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return ae.scrollTop=this.scrollTop,ae.scrollLeft=this.scrollLeft,ae.sel=this.sel,ae.extend=!1,ie&&(ae.history.undoDepth=this.history.undoDepth,ae.setHistory(this.getHistory())),ae},linkedDoc:function(ie){ie||(ie={});var ae=this.first,fe=this.first+this.size;ie.from!=null&&ie.from>ae&&(ae=ie.from),ie.to!=null&&ie.to<fe&&(fe=ie.to);var de=new Gs(Dn(this,ae,fe),ie.mode||this.modeOption,ae,this.lineSep,this.direction);return ie.sharedHist&&(de.history=this.history),(this.linked||(this.linked=[])).push({doc:de,sharedHist:ie.sharedHist}),de.linked=[{doc:this,isParent:!0,sharedHist:ie.sharedHist}],Ed(de,bd(this)),de},unlinkDoc:function(ie){if(ie instanceof Ha&&(ie=ie.doc),this.linked)for(var ae=0;ae<this.linked.length;++ae){var fe=this.linked[ae];if(fe.doc==ie){this.linked.splice(ae,1),ie.unlinkDoc(this),Dh(bd(this));break}}if(ie.history==this.history){var de=[ie.id];Ns(ie,function(Se){return de.push(Se.id)},!0),ie.history=new Co(null),ie.history.done=Ws(this.history.done,de),ie.history.undone=Ws(this.history.undone,de)}},iterLinkedDocs:function(ie){Ns(this,ie)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(ie){return this.lineSep?ie.split(this.lineSep):$n(ie)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:ei(function(ie){ie!="rtl"&&(ie="ltr"),ie!=this.direction&&(this.direction=ie,this.iter(function(ae){return ae.order=null}),this.cm&&Go(this.cm))})}),Gs.prototype.eachLine=Gs.prototype.iter;var Qd=0;function Md(ie){var ae=this;if(Zf(ae),!(sn(ae,ie)||as(ae.display,ie))){ui(ie),Ge&&(Qd=+new Date);var fe=yl(ae,ie,!0),de=ie.dataTransfer.files;if(!(!fe||ae.isReadOnly()))if(de&&de.length&&window.FileReader&&window.File)for(var Se=de.length,Re=Array(Se),_e=0,ft=function(){++_e==Se&&si(ae,function(){fe=Hn(ae.doc,fe);var ai={from:fe,to:fe,text:ae.doc.splitLines(Re.filter(function(tr){return tr!=null}).join(ae.doc.lineSeparator())),origin:"paste"};es(ae.doc,ai),da(ae.doc,ia(Hn(ae.doc,fe),Hn(ae.doc,Ta(ai))))})()},lt=function(ai,tr){if(ae.options.allowDropFileTypes&&Wt(ae.options.allowDropFileTypes,ai.type)==-1){ft();return}var lr=new FileReader;lr.onerror=function(){return ft()},lr.onload=function(){var Pr=lr.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Pr)){ft();return}Re[tr]=Pr,ft()},lr.readAsText(ai)},Zt=0;Zt<de.length;Zt++)lt(de[Zt],Zt);else{if(ae.state.draggingText&&ae.doc.sel.contains(fe)>-1){ae.state.draggingText(ie),setTimeout(function(){return ae.display.input.focus()},20);return}try{var Rn=ie.dataTransfer.getData("Text");if(Rn){var Yt;if(ae.state.draggingText&&!ae.state.draggingText.copy&&(Yt=ae.listSelections()),_s(ae.doc,ia(fe,fe)),Yt)for(var ci=0;ci<Yt.length;++ci)gu(ae.doc,"",Yt[ci].anchor,Yt[ci].head,"drag");ae.replaceSelection(Rn,"around","paste"),ae.display.input.focus()}}catch(ai){}}}}function qd(ie,ae){if(Ge&&(!ie.state.draggingText||+new Date-Qd<100)){bi(ae);return}if(!(sn(ie,ae)||as(ie.display,ae))&&(ae.dataTransfer.setData("Text",ie.getSelection()),ae.dataTransfer.effectAllowed="copyMove",ae.dataTransfer.setDragImage&&!Lt)){var fe=Qe("img",null,null,"position: fixed; left: 0; top: 0;");fe.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Ve&&(fe.width=fe.height=1,ie.display.wrapper.appendChild(fe),fe._top=fe.offsetTop),ae.dataTransfer.setDragImage(fe,0,0),Ve&&fe.parentNode.removeChild(fe)}}function sf(ie,ae){var fe=yl(ie,ae);if(fe){var de=document.createDocumentFragment();Pa(ie,fe,de),ie.display.dragCursor||(ie.display.dragCursor=Qe("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),ie.display.lineSpace.insertBefore(ie.display.dragCursor,ie.display.cursorDiv)),rt(ie.display.dragCursor,de)}}function Zf(ie){ie.display.dragCursor&&(ie.display.lineSpace.removeChild(ie.display.dragCursor),ie.display.dragCursor=null)}function eh(ie){if(document.getElementsByClassName){for(var ae=document.getElementsByClassName("CodeMirror"),fe=[],de=0;de<ae.length;de++){var Se=ae[de].CodeMirror;Se&&fe.push(Se)}fe.length&&fe[0].operation(function(){for(var Re=0;Re<fe.length;Re++)ie(fe[Re])})}}var th=!1;function pu(){th||(Ld(),th=!0)}function Ld(){var ie;Qt(window,"resize",function(){ie==null&&(ie=setTimeout(function(){ie=null,eh(lf)},100))}),Qt(window,"blur",function(){return eh(ad)})}function lf(ie){var ae=ie.display;ae.cachedCharWidth=ae.cachedTextHeight=ae.cachedPaddingH=null,ae.scrollbarsClipped=!1,ie.setSize()}for(var Yu={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"},jc=0;jc<10;jc++)Yu[jc+48]=Yu[jc+96]=String(jc);for(var Nd=65;Nd<=90;Nd++)Yu[Nd]=String.fromCharCode(Nd);for(var cd=1;cd<=12;cd++)Yu[cd+111]=Yu[cd+63235]="F"+cd;var jl={};jl.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"},jl.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"},jl.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"},jl.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"]},jl.default=ce?jl.macDefault:jl.pcDefault;function dd(ie){var ae=ie.split(/-(?!$)/);ie=ae[ae.length-1];for(var fe,de,Se,Re,_e=0;_e<ae.length-1;_e++){var ft=ae[_e];if(/^(cmd|meta|m)$/i.test(ft))Re=!0;else if(/^a(lt)?$/i.test(ft))fe=!0;else if(/^(c|ctrl|control)$/i.test(ft))de=!0;else if(/^s(hift)?$/i.test(ft))Se=!0;else throw new Error("Unrecognized modifier name: "+ft)}return fe&&(ie="Alt-"+ie),de&&(ie="Ctrl-"+ie),Re&&(ie="Cmd-"+ie),Se&&(ie="Shift-"+ie),ie}function Bh(ie){var ae={};for(var fe in ie)if(ie.hasOwnProperty(fe)){var de=ie[fe];if(/^(name|fallthrough|(de|at)tach)$/.test(fe))continue;if(de=="..."){delete ie[fe];continue}for(var Se=wn(fe.split(" "),dd),Re=0;Re<Se.length;Re++){var _e=void 0,ft=void 0;Re==Se.length-1?(ft=Se.join(" "),_e=de):(ft=Se.slice(0,Re+1).join(" "),_e="...");var lt=ae[ft];if(!lt)ae[ft]=_e;else if(lt!=_e)throw new Error("Inconsistent bindings for "+ft)}delete ie[fe]}for(var Zt in ae)ie[Zt]=ae[Zt];return ie}function eu(ie,ae,fe,de){ae=zc(ae);var Se=ae.call?ae.call(ie,de):ae[ie];if(Se===!1)return"nothing";if(Se==="...")return"multi";if(Se!=null&&fe(Se))return"handled";if(ae.fallthrough){if(Object.prototype.toString.call(ae.fallthrough)!="[object Array]")return eu(ie,ae.fallthrough,fe,de);for(var Re=0;Re<ae.fallthrough.length;Re++){var _e=eu(ie,ae.fallthrough[Re],fe,de);if(_e)return _e}}}function wc(ie){var ae=typeof ie=="string"?ie:Yu[ie.keyCode];return ae=="Ctrl"||ae=="Alt"||ae=="Shift"||ae=="Mod"}function nh(ie,ae,fe){var de=ie;return ae.altKey&&de!="Alt"&&(ie="Alt-"+ie),(be?ae.metaKey:ae.ctrlKey)&&de!="Ctrl"&&(ie="Ctrl-"+ie),(be?ae.ctrlKey:ae.metaKey)&&de!="Mod"&&(ie="Cmd-"+ie),!fe&&ae.shiftKey&&de!="Shift"&&(ie="Shift-"+ie),ie}function ih(ie,ae){if(Ve&&ie.keyCode==34&&ie.char)return!1;var fe=Yu[ie.keyCode];return fe==null||ie.altGraphKey?!1:(ie.keyCode==3&&ie.code&&(fe=ie.code),nh(fe,ie,ae))}function zc(ie){return typeof ie=="string"?jl[ie]:ie}function Cl(ie,ae){for(var fe=ie.doc.sel.ranges,de=[],Se=0;Se<fe.length;Se++){for(var Re=ae(fe[Se]);de.length&&Cn(Re.from,It(de).to)<=0;){var _e=de.pop();if(Cn(_e.from,Re.from)<0){Re.from=_e.from;break}}de.push(Re)}bn(ie,function(){for(var ft=de.length-1;ft>=0;ft--)gu(ie.doc,"",de[ft].from,de[ft].to,"+delete");ld(ie)})}function Th(ie,ae,fe){var de=et(ie.text,ae+fe,fe);return de<0||de>ie.text.length?null:de}function $s(ie,ae,fe){var de=Th(ie,ae.ch,fe);return de==null?null:new en(ae.line,de,fe<0?"after":"before")}function xa(ie,ae,fe,de,Se){if(ie){ae.doc.direction=="rtl"&&(Se=-Se);var Re=un(fe,ae.doc.direction);if(Re){var _e=Se<0?It(Re):Re[0],ft=Se<0==(_e.level==1),lt=ft?"after":"before",Zt;if(_e.level>0||ae.doc.direction=="rtl"){var Rn=Js(ae,fe);Zt=Se<0?fe.text.length-1:0;var Yt=uu(ae,Rn,Zt).top;Zt=Ye(function(ci){return uu(ae,Rn,ci).top==Yt},Se<0==(_e.level==1)?_e.from:_e.to-1,Zt),lt=="before"&&(Zt=Th(fe,Zt,1))}else Zt=Se<0?_e.to:_e.from;return new en(de,Zt,lt)}}return new en(de,Se<0?fe.text.length:0,Se<0?"before":"after")}function ls(ie,ae,fe,de){var Se=un(ae,ie.doc.direction);if(!Se)return $s(ae,fe,de);fe.ch>=ae.text.length?(fe.ch=ae.text.length,fe.sticky="before"):fe.ch<=0&&(fe.ch=0,fe.sticky="after");var Re=at(Se,fe.ch,fe.sticky),_e=Se[Re];if(ie.doc.direction=="ltr"&&_e.level%2==0&&(de>0?_e.to>fe.ch:_e.from<fe.ch))return $s(ae,fe,de);var ft=function(Vr,yo){return Th(ae,Vr instanceof en?Vr.ch:Vr,yo)},lt,Zt=function(Vr){return ie.options.lineWrapping?(lt=lt||Js(ie,ae),rd(ie,ae,lt,Vr)):{begin:0,end:ae.text.length}},Rn=Zt(fe.sticky=="before"?ft(fe,-1):fe.ch);if(ie.doc.direction=="rtl"||_e.level==1){var Yt=_e.level==1==de<0,ci=ft(fe,Yt?1:-1);if(ci!=null&&(Yt?ci<=_e.to&&ci<=Rn.end:ci>=_e.from&&ci>=Rn.begin)){var ai=Yt?"before":"after";return new en(fe.line,ci,ai)}}var tr=function(Vr,yo,ao){for(var Eo=function(ws,Pl){return Pl?new en(fe.line,ft(ws,1),"before"):new en(fe.line,ws,"after")};Vr>=0&&Vr<Se.length;Vr+=yo){var Qo=Se[Vr],so=yo>0==(Qo.level!=1),ha=so?ao.begin:ft(ao.end,-1);if(Qo.from<=ha&&ha<Qo.to||(ha=so?Qo.from:ft(Qo.to,-1),ao.begin<=ha&&ha<ao.end))return Eo(ha,so)}},lr=tr(Re+de,de,Rn);if(lr)return lr;var Pr=de>0?Rn.end:ft(Rn.begin,-1);return Pr!=null&&!(de>0&&Pr==ae.text.length)&&(lr=tr(de>0?0:Se.length-1,de,Zt(Pr)),lr)?lr:null}var Sl={selectAll:za,singleSelection:function(ie){return ie.setSelection(ie.getCursor("anchor"),ie.getCursor("head"),Gt)},killLine:function(ie){return Cl(ie,function(ae){if(ae.empty()){var fe=on(ie.doc,ae.head.line).text.length;return ae.head.ch==fe&&ae.head.line<ie.lastLine()?{from:ae.head,to:en(ae.head.line+1,0)}:{from:ae.head,to:en(ae.head.line,fe)}}else return{from:ae.from(),to:ae.to()}})},deleteLine:function(ie){return Cl(ie,function(ae){return{from:en(ae.from().line,0),to:Hn(ie.doc,en(ae.to().line+1,0))}})},delLineLeft:function(ie){return Cl(ie,function(ae){return{from:en(ae.from().line,0),to:ae.from()}})},delWrappedLineLeft:function(ie){return Cl(ie,function(ae){var fe=ie.charCoords(ae.head,"div").top+5,de=ie.coordsChar({left:0,top:fe},"div");return{from:de,to:ae.from()}})},delWrappedLineRight:function(ie){return Cl(ie,function(ae){var fe=ie.charCoords(ae.head,"div").top+5,de=ie.coordsChar({left:ie.display.lineDiv.offsetWidth+100,top:fe},"div");return{from:ae.from(),to:de}})},undo:function(ie){return ie.undo()},redo:function(ie){return ie.redo()},undoSelection:function(ie){return ie.undoSelection()},redoSelection:function(ie){return ie.redoSelection()},goDocStart:function(ie){return ie.extendSelection(en(ie.firstLine(),0))},goDocEnd:function(ie){return ie.extendSelection(en(ie.lastLine()))},goLineStart:function(ie){return ie.extendSelectionsBy(function(ae){return Au(ie,ae.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(ie){return ie.extendSelectionsBy(function(ae){return Fd(ie,ae.head)},{origin:"+move",bias:1})},goLineEnd:function(ie){return ie.extendSelectionsBy(function(ae){return Du(ie,ae.head.line)},{origin:"+move",bias:-1})},goLineRight:function(ie){return ie.extendSelectionsBy(function(ae){var fe=ie.cursorCoords(ae.head,"div").top+5;return ie.coordsChar({left:ie.display.lineDiv.offsetWidth+100,top:fe},"div")},An)},goLineLeft:function(ie){return ie.extendSelectionsBy(function(ae){var fe=ie.cursorCoords(ae.head,"div").top+5;return ie.coordsChar({left:0,top:fe},"div")},An)},goLineLeftSmart:function(ie){return ie.extendSelectionsBy(function(ae){var fe=ie.cursorCoords(ae.head,"div").top+5,de=ie.coordsChar({left:0,top:fe},"div");return de.ch<ie.getLine(de.line).search(/\S/)?Fd(ie,ae.head):de},An)},goLineUp:function(ie){return ie.moveV(-1,"line")},goLineDown:function(ie){return ie.moveV(1,"line")},goPageUp:function(ie){return ie.moveV(-1,"page")},goPageDown:function(ie){return ie.moveV(1,"page")},goCharLeft:function(ie){return ie.moveH(-1,"char")},goCharRight:function(ie){return ie.moveH(1,"char")},goColumnLeft:function(ie){return ie.moveH(-1,"column")},goColumnRight:function(ie){return ie.moveH(1,"column")},goWordLeft:function(ie){return ie.moveH(-1,"word")},goGroupRight:function(ie){return ie.moveH(1,"group")},goGroupLeft:function(ie){return ie.moveH(-1,"group")},goWordRight:function(ie){return ie.moveH(1,"word")},delCharBefore:function(ie){return ie.deleteH(-1,"codepoint")},delCharAfter:function(ie){return ie.deleteH(1,"char")},delWordBefore:function(ie){return ie.deleteH(-1,"word")},delWordAfter:function(ie){return ie.deleteH(1,"word")},delGroupBefore:function(ie){return ie.deleteH(-1,"group")},delGroupAfter:function(ie){return ie.deleteH(1,"group")},indentAuto:function(ie){return ie.indentSelection("smart")},indentMore:function(ie){return ie.indentSelection("add")},indentLess:function(ie){return ie.indentSelection("subtract")},insertTab:function(ie){return ie.replaceSelection(" ")},insertSoftTab:function(ie){for(var ae=[],fe=ie.listSelections(),de=ie.options.tabSize,Se=0;Se<fe.length;Se++){var Re=fe[Se].from(),_e=ot(ie.getLine(Re.line),Re.ch,de);ae.push(Yn(de-_e%de))}ie.replaceSelections(ae)},defaultTab:function(ie){ie.somethingSelected()?ie.indentSelection("add"):ie.execCommand("insertTab")},transposeChars:function(ie){return bn(ie,function(){for(var ae=ie.listSelections(),fe=[],de=0;de<ae.length;de++)if(ae[de].empty()){var Se=ae[de].head,Re=on(ie.doc,Se.line).text;if(Re){if(Se.ch==Re.length&&(Se=new en(Se.line,Se.ch-1)),Se.ch>0)Se=new en(Se.line,Se.ch+1),ie.replaceRange(Re.charAt(Se.ch-1)+Re.charAt(Se.ch-2),en(Se.line,Se.ch-2),Se,"+transpose");else if(Se.line>ie.doc.first){var _e=on(ie.doc,Se.line-1).text;_e&&(Se=new en(Se.line,1),ie.replaceRange(Re.charAt(0)+ie.doc.lineSeparator()+_e.charAt(_e.length-1),en(Se.line-1,_e.length-1),Se,"+transpose"))}}fe.push(new Kr(Se,Se))}ie.setSelections(fe)})},newlineAndIndent:function(ie){return bn(ie,function(){for(var ae=ie.listSelections(),fe=ae.length-1;fe>=0;fe--)ie.replaceRange(ie.doc.lineSeparator(),ae[fe].anchor,ae[fe].head,"+input");ae=ie.listSelections();for(var de=0;de<ae.length;de++)ie.indentLine(ae[de].from().line,null,!0);ld(ie)})},openLine:function(ie){return ie.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(ie){return ie.toggleOverwrite()}};function Au(ie,ae){var fe=on(ie.doc,ae),de=qr(fe);return de!=fe&&(ae=St(de)),xa(!0,ie,de,ae,1)}function Du(ie,ae){var fe=on(ie.doc,ae),de=zo(fe);return de!=fe&&(ae=St(de)),xa(!0,ie,fe,ae,-1)}function Fd(ie,ae){var fe=Au(ie,ae.line),de=on(ie.doc,fe.line),Se=un(de,ie.doc.direction);if(!Se||Se[0].level==0){var Re=Math.max(fe.ch,de.text.search(/\S/)),_e=ae.line==fe.line&&ae.ch<=Re&&ae.ch;return en(fe.line,_e?0:Re,fe.sticky)}return fe}function Hc(ie,ae,fe){if(typeof ae=="string"&&(ae=Sl[ae],!ae))return!1;ie.display.input.ensurePolled();var de=ie.display.shift,Se=!1;try{ie.isReadOnly()&&(ie.state.suppressEdits=!0),fe&&(ie.display.shift=!1),Se=ae(ie)!=Fn}finally{ie.display.shift=de,ie.state.suppressEdits=!1}return Se}function rh(ie,ae,fe){for(var de=0;de<ie.state.keyMaps.length;de++){var Se=eu(ae,ie.state.keyMaps[de],fe,ie);if(Se)return Se}return ie.options.extraKeys&&eu(ae,ie.options.extraKeys,fe,ie)||eu(ae,ie.options.keyMap,fe,ie)}var Hu=new Ue;function Cc(ie,ae,fe,de){var Se=ie.state.keySeq;if(Se){if(wc(ae))return"handled";if(/\'$/.test(ae)?ie.state.keySeq=null:Hu.set(50,function(){ie.state.keySeq==Se&&(ie.state.keySeq=null,ie.display.input.reset())}),Wf(ie,Se+" "+ae,fe,de))return!0}return Wf(ie,ae,fe,de)}function Wf(ie,ae,fe,de){var Se=rh(ie,ae,de);return Se=="multi"&&(ie.state.keySeq=ae),Se=="handled"&&Oi(ie,"keyHandled",ie,ae,fe),(Se=="handled"||Se=="multi")&&(ui(fe),Va(ie)),!!Se}function Gf(ie,ae){var fe=ih(ae,!0);return fe?ae.shiftKey&&!ie.state.keySeq?Cc(ie,"Shift-"+fe,ae,function(de){return Hc(ie,de,!0)})||Cc(ie,fe,ae,function(de){if(typeof de=="string"?/^go[A-Z]/.test(de):de.motion)return Hc(ie,de)}):Cc(ie,fe,ae,function(de){return Hc(ie,de)}):!1}function $f(ie,ae,fe){return Cc(ie,"'"+fe+"'",ae,function(de){return Hc(ie,de,!0)})}var Ad=null;function hg(ie){var ae=this;if(!(ie.target&&ie.target!=ae.display.input.getField())&&(ae.curOp.focus=it(),!sn(ae,ie))){Ge&&Xe<11&&ie.keyCode==27&&(ie.returnValue=!1);var fe=ie.keyCode;ae.display.shift=fe==16||ie.shiftKey;var de=Gf(ae,ie);Ve&&(Ad=de?fe:null,!de&&fe==88&&!Ei&&(ce?ie.metaKey:ie.ctrlKey)&&ae.replaceSelection("",null,"cut")),ge&&!ce&&!de&&fe==46&&ie.shiftKey&&!ie.ctrlKey&&document.execCommand&&document.execCommand("cut"),fe==18&&!/\bCodeMirror-crosshair\b/.test(ae.display.lineDiv.className)&&fg(ae)}}function fg(ie){var ae=ie.display.lineDiv;Dt(ae,"CodeMirror-crosshair");function fe(de){(de.keyCode==18||!de.altKey)&&(He(ae,"CodeMirror-crosshair"),On(document,"keyup",fe),On(document,"mouseover",fe))}Qt(document,"keyup",fe),Qt(document,"mouseover",fe)}function gg(ie){ie.keyCode==16&&(this.doc.sel.shift=!1),sn(this,ie)}function bc(ie){var ae=this;if(!(ie.target&&ie.target!=ae.display.input.getField())&&!(as(ae.display,ie)||sn(ae,ie)||ie.ctrlKey&&!ie.altKey||ce&&ie.metaKey)){var fe=ie.keyCode,de=ie.charCode;if(Ve&&fe==Ad){Ad=null,ui(ie);return}if(!(Ve&&(!ie.which||ie.which<10)&&Gf(ae,ie))){var Se=String.fromCharCode(de==null?fe:de);Se!="\b"&&($f(ae,ie,Se)||ae.display.input.onKeyPress(ie))}}}var pg=400,mg=function(ie,ae,fe){this.time=ie,this.pos=ae,this.button=fe};mg.prototype.compare=function(ie,ae,fe){return this.time+pg>ie&&Cn(ae,this.pos)==0&&fe==this.button};var kh,oh;function vg(ie,ae){var fe=+new Date;return oh&&oh.compare(fe,ie,ae)?(kh=oh=null,"triple"):kh&&kh.compare(fe,ie,ae)?(oh=new mg(fe,ie,ae),kh=null,"double"):(kh=new mg(fe,ie,ae),oh=null,"single")}function Ec(ie){var ae=this,fe=ae.display;if(!(sn(ae,ie)||fe.activeTouch&&fe.input.supportsTouch())){if(fe.input.ensurePolled(),fe.shift=ie.shiftKey,as(fe,ie)){Ne||(fe.scroller.draggable=!1,setTimeout(function(){return fe.scroller.draggable=!0},100));return}if(!Kf(ae,ie)){var de=yl(ae,ie),Se=ar(ie),Re=de?vg(de,Se):"single";window.focus(),Se==1&&ae.state.selectingText&&ae.state.selectingText(ie),!(de&&yg(ae,Se,de,Re,ie))&&(Se==1?de?Sg(ae,de,Re,ie):Xi(ie)==fe.scroller&&ui(ie):Se==2?(de&&Ia(ae.doc,de),setTimeout(function(){return fe.input.focus()},20)):Se==3&&(ke?ae.display.input.onContextMenu(ie):Ps(ae)))}}}function yg(ie,ae,fe,de,Se){var Re="Click";return de=="double"?Re="Double"+Re:de=="triple"&&(Re="Triple"+Re),Re=(ae==1?"Left":ae==2?"Middle":"Right")+Re,Cc(ie,nh(Re,Se),Se,function(_e){if(typeof _e=="string"&&(_e=Sl[_e]),!_e)return!1;var ft=!1;try{ie.isReadOnly()&&(ie.state.suppressEdits=!0),ft=_e(ie,fe)!=Fn}finally{ie.state.suppressEdits=!1}return ft})}function ah(ie,ae,fe){var de=ie.getOption("configureMouse"),Se=de?de(ie,ae,fe):{};if(Se.unit==null){var Re=se?fe.shiftKey&&fe.metaKey:fe.altKey;Se.unit=Re?"rectangle":ae=="single"?"char":ae=="double"?"word":"line"}return(Se.extend==null||ie.doc.extend)&&(Se.extend=ie.doc.extend||fe.shiftKey),Se.addNew==null&&(Se.addNew=ce?fe.metaKey:fe.ctrlKey),Se.moveOnDrag==null&&(Se.moveOnDrag=!(ce?fe.altKey:fe.ctrlKey)),Se}function Sg(ie,ae,fe,de){Ge?setTimeout(_t(cs,ie),0):ie.curOp.focus=it();var Se=ah(ie,fe,de),Re=ie.doc.sel,_e;ie.options.dragDrop&&Ji&&!ie.isReadOnly()&&fe=="single"&&(_e=Re.contains(ae))>-1&&(Cn((_e=Re.ranges[_e]).from(),ae)<0||ae.xRel>0)&&(Cn(_e.to(),ae)>0||ae.xRel<0)?xg(ie,de,ae,Se):Wp(ie,de,ae,Se)}function xg(ie,ae,fe,de){var Se=ie.display,Re=!1,_e=si(ie,function(Zt){Ne&&(Se.scroller.draggable=!1),ie.state.draggingText=!1,On(Se.wrapper.ownerDocument,"mouseup",_e),On(Se.wrapper.ownerDocument,"mousemove",ft),On(Se.scroller,"dragstart",lt),On(Se.scroller,"drop",_e),Re||(ui(Zt),de.addNew||Ia(ie.doc,fe,null,null,de.extend),Ne&&!Lt||Ge&&Xe==9?setTimeout(function(){Se.wrapper.ownerDocument.body.focus({preventScroll:!0}),Se.input.focus()},20):Se.input.focus())}),ft=function(Zt){Re=Re||Math.abs(ae.clientX-Zt.clientX)+Math.abs(ae.clientY-Zt.clientY)>=10},lt=function(){return Re=!0};Ne&&(Se.scroller.draggable=!0),ie.state.draggingText=_e,_e.copy=!de.moveOnDrag,Se.scroller.dragDrop&&Se.scroller.dragDrop(),Qt(Se.wrapper.ownerDocument,"mouseup",_e),Qt(Se.wrapper.ownerDocument,"mousemove",ft),Qt(Se.scroller,"dragstart",lt),Qt(Se.scroller,"drop",_e),Ps(ie),setTimeout(function(){return Se.input.focus()},20)}function Pg(ie,ae,fe){if(fe=="char")return new Kr(ae,ae);if(fe=="word")return ie.findWordAt(ae);if(fe=="line")return new Kr(en(ae.line,0),Hn(ie.doc,en(ae.line+1,0)));var de=fe(ie,ae);return new Kr(de.from,de.to)}function Wp(ie,ae,fe,de){var Se=ie.display,Re=ie.doc;ui(ae);var _e,ft,lt=Re.sel,Zt=lt.ranges;if(de.addNew&&!de.extend?(ft=Re.sel.contains(fe),ft>-1?_e=Zt[ft]:_e=new Kr(fe,fe)):(_e=Re.sel.primary(),ft=Re.sel.primIndex),de.unit=="rectangle")de.addNew||(_e=new Kr(fe,fe)),fe=yl(ie,ae,!0,!0),ft=-1;else{var Rn=Pg(ie,fe,de.unit);de.extend?_e=uc(_e,Rn.anchor,Rn.head,de.extend):_e=Rn}de.addNew?ft==-1?(ft=Zt.length,Xa(Re,Yo(ie,Zt.concat([_e]),ft),{scroll:!1,origin:"*mouse"})):Zt.length>1&&Zt[ft].empty()&&de.unit=="char"&&!de.extend?(Xa(Re,Yo(ie,Zt.slice(0,ft).concat(Zt.slice(ft+1)),0),{scroll:!1,origin:"*mouse"}),lt=Re.sel):Oa(Re,ft,_e,rn):(ft=0,Xa(Re,new Wo([_e],0),rn),lt=Re.sel);var Yt=fe;function ci(ao){if(Cn(Yt,ao)!=0)if(Yt=ao,de.unit=="rectangle"){for(var Eo=[],Qo=ie.options.tabSize,so=ot(on(Re,fe.line).text,fe.ch,Qo),ha=ot(on(Re,ao.line).text,ao.ch,Qo),ws=Math.min(so,ha),Pl=Math.max(so,ha),ks=Math.min(fe.line,ao.line),mu=Math.min(ie.lastLine(),Math.max(fe.line,ao.line));ks<=mu;ks++){var zl=on(Re,ks).text,fl=ni(zl,ws,Qo);ws==Pl?Eo.push(new Kr(en(ks,fl),en(ks,fl))):zl.length>fl&&Eo.push(new Kr(en(ks,fl),en(ks,ni(zl,Pl,Qo))))}Eo.length||Eo.push(new Kr(fe,fe)),Xa(Re,Yo(ie,lt.ranges.slice(0,ft).concat(Eo),ft),{origin:"*mouse",scroll:!1}),ie.scrollIntoView(ao)}else{var vu=_e,Nl=Pg(ie,ao,de.unit),gl=vu.anchor,Za;Cn(Nl.anchor,gl)>0?(Za=Nl.head,gl=mn(vu.from(),Nl.anchor)):(Za=Nl.anchor,gl=pn(vu.to(),Nl.head));var Is=lt.ranges.slice(0);Is[ft]=qg(ie,new Kr(Hn(Re,gl),Za)),Xa(Re,Yo(ie,Is,ft),rn)}}var ai=Se.wrapper.getBoundingClientRect(),tr=0;function lr(ao){var Eo=++tr,Qo=yl(ie,ao,!0,de.unit=="rectangle");if(Qo)if(Cn(Qo,Yt)!=0){ie.curOp.focus=it(),ci(Qo);var so=fa(Se,Re);(Qo.line>=so.to||Qo.line<so.from)&&setTimeout(si(ie,function(){tr==Eo&&lr(ao)}),150)}else{var ha=ao.clientY<ai.top?-20:ao.clientY>ai.bottom?20:0;ha&&setTimeout(si(ie,function(){tr==Eo&&(Se.scroller.scrollTop+=ha,lr(ao))}),50)}}function Pr(ao){ie.state.selectingText=!1,tr=1/0,ao&&(ui(ao),Se.input.focus()),On(Se.wrapper.ownerDocument,"mousemove",Vr),On(Se.wrapper.ownerDocument,"mouseup",yo),Re.history.lastSelOrigin=null}var Vr=si(ie,function(ao){ao.buttons===0||!ar(ao)?Pr(ao):lr(ao)}),yo=si(ie,Pr);ie.state.selectingText=yo,Qt(Se.wrapper.ownerDocument,"mousemove",Vr),Qt(Se.wrapper.ownerDocument,"mouseup",yo)}function qg(ie,ae){var fe=ae.anchor,de=ae.head,Se=on(ie.doc,fe.line);if(Cn(fe,de)==0&&fe.sticky==de.sticky)return ae;var Re=un(Se);if(!Re)return ae;var _e=at(Re,fe.ch,fe.sticky),ft=Re[_e];if(ft.from!=fe.ch&&ft.to!=fe.ch)return ae;var lt=_e+(ft.from==fe.ch==(ft.level!=1)?0:1);if(lt==0||lt==Re.length)return ae;var Zt;if(de.line!=fe.line)Zt=(de.line-fe.line)*(ie.doc.direction=="ltr"?1:-1)>0;else{var Rn=at(Re,de.ch,de.sticky),Yt=Rn-_e||(de.ch-fe.ch)*(ft.level==1?-1:1);Rn==lt-1||Rn==lt?Zt=Yt<0:Zt=Yt>0}var ci=Re[lt+(Zt?-1:0)],ai=Zt==(ci.level==1),tr=ai?ci.from:ci.to,lr=ai?"after":"before";return fe.ch==tr&&fe.sticky==lr?ae:new Kr(new en(fe.line,tr,lr),de)}function Dd(ie,ae,fe,de){var Se,Re;if(ae.touches)Se=ae.touches[0].clientX,Re=ae.touches[0].clientY;else try{Se=ae.clientX,Re=ae.clientY}catch(ci){return!1}if(Se>=Math.floor(ie.display.gutters.getBoundingClientRect().right))return!1;de&&ui(ae);var _e=ie.display,ft=_e.lineDiv.getBoundingClientRect();if(Re>ft.bottom||!dn(ie,fe))return gi(ae);Re-=ft.top-_e.viewOffset;for(var lt=0;lt<ie.display.gutterSpecs.length;++lt){var Zt=_e.gutters.childNodes[lt];if(Zt&&Zt.getBoundingClientRect().right>=Se){var Rn=Nn(ie.doc,Re),Yt=ie.display.gutterSpecs[lt];return jt(ie,fe,ie,Rn,Yt.className,ae),gi(ae)}}}function Kf(ie,ae){return Dd(ie,ae,"gutterClick",!0)}function uf(ie,ae){as(ie.display,ae)||ep(ie,ae)||sn(ie,ae,"contextmenu")||ke||ie.display.input.onContextMenu(ae)}function ep(ie,ae){return dn(ie,"gutterContextMenu")?Dd(ie,ae,"gutterContextMenu",!1):!1}function Vf(ie){ie.display.wrapper.className=ie.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+ie.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ms(ie)}var sh={toString:function(){return"CodeMirror.Init"}},wg={},lh={};function tp(ie){var ae=ie.optionHandlers;function fe(de,Se,Re,_e){ie.defaults[de]=Se,Re&&(ae[de]=_e?function(ft,lt,Zt){Zt!=sh&&Re(ft,lt,Zt)}:Re)}ie.defineOption=fe,ie.Init=sh,fe("value","",function(de,Se){return de.setValue(Se)},!0),fe("mode",null,function(de,Se){de.doc.modeOption=Se,Fo(de)},!0),fe("indentUnit",2,Fo,!0),fe("indentWithTabs",!1),fe("smartIndent",!0),fe("tabSize",4,function(de){Sa(de),ms(de),_a(de)},!0),fe("lineSeparator",null,function(de,Se){if(de.doc.lineSep=Se,!!Se){var Re=[],_e=de.doc.first;de.doc.iter(function(lt){for(var Zt=0;;){var Rn=lt.text.indexOf(Se,Zt);if(Rn==-1)break;Zt=Rn+Se.length,Re.push(en(_e,Rn))}_e++});for(var ft=Re.length-1;ft>=0;ft--)gu(de.doc,Se,Re[ft],en(Re[ft].line,Re[ft].ch+Se.length))}}),fe("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(de,Se,Re){de.state.specialChars=new RegExp(Se.source+(Se.test(" ")?"":"| "),"g"),Re!=sh&&de.refresh()}),fe("specialCharPlaceholder",Ui,function(de){return de.refresh()},!0),fe("electricChars",!0),fe("inputStyle",ee?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),fe("spellcheck",!1,function(de,Se){return de.getInputField().spellcheck=Se},!0),fe("autocorrect",!1,function(de,Se){return de.getInputField().autocorrect=Se},!0),fe("autocapitalize",!1,function(de,Se){return de.getInputField().autocapitalize=Se},!0),fe("rtlMoveVisually",!he),fe("wholeLineUpdateBefore",!0),fe("theme","default",function(de){Vf(de),_r(de)},!0),fe("keyMap","default",function(de,Se,Re){var _e=zc(Se),ft=Re!=sh&&zc(Re);ft&&ft.detach&&ft.detach(de,_e),_e.attach&&_e.attach(de,ft||null)}),fe("extraKeys",null),fe("configureMouse",null),fe("lineWrapping",!1,np,!0),fe("gutters",[],function(de,Se){de.display.gutterSpecs=So(Se,de.options.lineNumbers),_r(de)},!0),fe("fixedGutter",!0,function(de,Se){de.display.gutters.style.left=Se?Pd(de.display)+"px":"0",de.refresh()},!0),fe("coverGutterNextToScrollbar",!1,function(de){return lc(de)},!0),fe("scrollbarStyle","native",function(de){Ah(de),lc(de),de.display.scrollbars.setScrollTop(de.doc.scrollTop),de.display.scrollbars.setScrollLeft(de.doc.scrollLeft)},!0),fe("lineNumbers",!1,function(de,Se){de.display.gutterSpecs=So(de.options.gutters,Se),_r(de)},!0),fe("firstLineNumber",1,_r,!0),fe("lineNumberFormatter",function(de){return de},_r,!0),fe("showCursorWhenSelecting",!1,nl,!0),fe("resetSelectionOnContextMenu",!0),fe("lineWiseCopyCut",!0),fe("pasteLinesPerSelection",!0),fe("selectionsMayTouch",!1),fe("readOnly",!1,function(de,Se){Se=="nocursor"&&(ad(de),de.display.input.blur()),de.display.input.readOnlyChanged(Se)}),fe("screenReaderLabel",null,function(de,Se){Se=Se===""?null:Se,de.display.input.screenReaderLabelChanged(Se)}),fe("disableInput",!1,function(de,Se){Se||de.display.input.reset()},!0),fe("dragDrop",!0,Uf),fe("allowDropFileTypes",null),fe("cursorBlinkRate",530),fe("cursorScrollMargin",0),fe("cursorHeight",1,nl,!0),fe("singleCursorHeightPerLine",!0,nl,!0),fe("workTime",100),fe("workDelay",100),fe("flattenSpans",!0,Sa,!0),fe("addModeClass",!1,Sa,!0),fe("pollInterval",100),fe("undoDepth",200,function(de,Se){return de.doc.history.undoDepth=Se}),fe("historyEventDelay",1250),fe("viewportMargin",10,function(de){return de.refresh()},!0),fe("maxHighlightLength",1e4,Sa,!0),fe("moveInputWithCursor",!0,function(de,Se){Se||de.display.input.resetPosition()}),fe("tabindex",null,function(de,Se){return de.display.input.getField().tabIndex=Se||""}),fe("autofocus",null),fe("direction","ltr",function(de,Se){return de.doc.setDirection(Se)},!0),fe("phrases",null)}function Uf(ie,ae,fe){var de=fe&&fe!=sh;if(!ae!=!de){var Se=ie.display.dragFunctions,Re=ae?Qt:On;Re(ie.display.scroller,"dragstart",Se.start),Re(ie.display.scroller,"dragenter",Se.enter),Re(ie.display.scroller,"dragover",Se.over),Re(ie.display.scroller,"dragleave",Se.leave),Re(ie.display.scroller,"drop",Se.drop)}}function np(ie){ie.options.lineWrapping?(Dt(ie.display.wrapper,"CodeMirror-wrap"),ie.display.sizer.style.minWidth="",ie.display.sizerWidth=null):(He(ie.display.wrapper,"CodeMirror-wrap"),Ho(ie)),To(ie),_a(ie),ms(ie),setTimeout(function(){return lc(ie)},100)}function Ha(ie,ae){var fe=this;if(!(this instanceof Ha))return new Ha(ie,ae);this.options=ae=ae?Vt(ae):{},Vt(wg,ae,!1);var de=ae.value;typeof de=="string"?de=new Gs(de,ae.mode,null,ae.lineSeparator,ae.direction):ae.mode&&(de.modeOption=ae.mode),this.doc=de;var Se=new Ha.inputStyles[ae.inputStyle](this),Re=this.display=new co(ie,de,Se,ae);Re.wrapper.CodeMirror=this,Vf(this),ae.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ah(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 Ue,keySeq:null,specialChars:null},ae.autofocus&&!ee&&Re.input.focus(),Ge&&Xe<11&&setTimeout(function(){return fe.display.input.reset(!0)},20),Ih(this),pu(),Ol(this),this.curOp.forceUpdate=!0,$o(this,de),ae.autofocus&&!ee||this.hasFocus()?setTimeout(function(){fe.hasFocus()&&!fe.state.focused&&Na(fe)},20):ad(this);for(var _e in lh)lh.hasOwnProperty(_e)&&lh[_e](this,ae[_e],sh);$r(this),ae.finishInit&&ae.finishInit(this);for(var ft=0;ft<Bd.length;++ft)Bd[ft](this);Oc(this),Ne&&ae.lineWrapping&&getComputedStyle(Re.lineDiv).textRendering=="optimizelegibility"&&(Re.lineDiv.style.textRendering="auto")}Ha.defaults=wg,Ha.optionHandlers=lh;function Ih(ie){var ae=ie.display;Qt(ae.scroller,"mousedown",si(ie,Ec)),Ge&&Xe<11?Qt(ae.scroller,"dblclick",si(ie,function(lt){if(!sn(ie,lt)){var Zt=yl(ie,lt);if(!(!Zt||Kf(ie,lt)||as(ie.display,lt))){ui(lt);var Rn=ie.findWordAt(Zt);Ia(ie.doc,Rn.anchor,Rn.head)}}})):Qt(ae.scroller,"dblclick",function(lt){return sn(ie,lt)||ui(lt)}),Qt(ae.scroller,"contextmenu",function(lt){return uf(ie,lt)}),Qt(ae.input.getField(),"contextmenu",function(lt){ae.scroller.contains(lt.target)||uf(ie,lt)});var fe,de={end:0};function Se(){ae.activeTouch&&(fe=setTimeout(function(){return ae.activeTouch=null},1e3),de=ae.activeTouch,de.end=+new Date)}function Re(lt){if(lt.touches.length!=1)return!1;var Zt=lt.touches[0];return Zt.radiusX<=1&&Zt.radiusY<=1}function _e(lt,Zt){if(Zt.left==null)return!0;var Rn=Zt.left-lt.left,Yt=Zt.top-lt.top;return Rn*Rn+Yt*Yt>20*20}Qt(ae.scroller,"touchstart",function(lt){if(!sn(ie,lt)&&!Re(lt)&&!Kf(ie,lt)){ae.input.ensurePolled(),clearTimeout(fe);var Zt=+new Date;ae.activeTouch={start:Zt,moved:!1,prev:Zt-de.end<=300?de:null},lt.touches.length==1&&(ae.activeTouch.left=lt.touches[0].pageX,ae.activeTouch.top=lt.touches[0].pageY)}}),Qt(ae.scroller,"touchmove",function(){ae.activeTouch&&(ae.activeTouch.moved=!0)}),Qt(ae.scroller,"touchend",function(lt){var Zt=ae.activeTouch;if(Zt&&!as(ae,lt)&&Zt.left!=null&&!Zt.moved&&new Date-Zt.start<300){var Rn=ie.coordsChar(ae.activeTouch,"page"),Yt;!Zt.prev||_e(Zt,Zt.prev)?Yt=new Kr(Rn,Rn):!Zt.prev.prev||_e(Zt,Zt.prev.prev)?Yt=ie.findWordAt(Rn):Yt=new Kr(en(Rn.line,0),Hn(ie.doc,en(Rn.line+1,0))),ie.setSelection(Yt.anchor,Yt.head),ie.focus(),ui(lt)}Se()}),Qt(ae.scroller,"touchcancel",Se),Qt(ae.scroller,"scroll",function(){ae.scroller.clientHeight&&(_u(ie,ae.scroller.scrollTop),kl(ie,ae.scroller.scrollLeft,!0),jt(ie,"scroll",ie))}),Qt(ae.scroller,"mousewheel",function(lt){return Zo(ie,lt)}),Qt(ae.scroller,"DOMMouseScroll",function(lt){return Zo(ie,lt)}),Qt(ae.wrapper,"scroll",function(){return ae.wrapper.scrollTop=ae.wrapper.scrollLeft=0}),ae.dragFunctions={enter:function(lt){sn(ie,lt)||bi(lt)},over:function(lt){sn(ie,lt)||(sf(ie,lt),bi(lt))},start:function(lt){return qd(ie,lt)},drop:si(ie,Md),leave:function(lt){sn(ie,lt)||Zf(ie)}};var ft=ae.input.getField();Qt(ft,"keyup",function(lt){return gg.call(ie,lt)}),Qt(ft,"keydown",si(ie,hg)),Qt(ft,"keypress",si(ie,bc)),Qt(ft,"focus",function(lt){return Na(ie,lt)}),Qt(ft,"blur",function(lt){return ad(ie,lt)})}var Bd=[];Ha.defineInitHook=function(ie){return Bd.push(ie)};function xl(ie,ae,fe,de){var Se=ie.doc,Re;fe==null&&(fe="add"),fe=="smart"&&(Se.mode.indent?Re=Wi(ie,ae).state:fe="prev");var _e=ie.options.tabSize,ft=on(Se,ae),lt=ot(ft.text,null,_e);ft.stateAfter&&(ft.stateAfter=null);var Zt=ft.text.match(/^\s*/)[0],Rn;if(!de&&!/\S/.test(ft.text))Rn=0,fe="not";else if(fe=="smart"&&(Rn=Se.mode.indent(Re,ft.text.slice(Zt.length),ft.text),Rn==Fn||Rn>150)){if(!de)return;fe="prev"}fe=="prev"?ae>Se.first?Rn=ot(on(Se,ae-1).text,null,_e):Rn=0:fe=="add"?Rn=lt+ie.options.indentUnit:fe=="subtract"?Rn=lt-ie.options.indentUnit:typeof fe=="number"&&(Rn=lt+fe),Rn=Math.max(0,Rn);var Yt="",ci=0;if(ie.options.indentWithTabs)for(var ai=Math.floor(Rn/_e);ai;--ai)ci+=_e,Yt+=" ";if(ci<Rn&&(Yt+=Yn(Rn-ci)),Yt!=Zt)return gu(Se,Yt,en(ae,0),en(ae,Zt.length),"+input"),ft.stateAfter=null,!0;for(var tr=0;tr<Se.sel.ranges.length;tr++){var lr=Se.sel.ranges[tr];if(lr.head.line==ae&&lr.head.ch<Zt.length){var Pr=en(ae,Zt.length);Oa(Se,tr,new Kr(Pr,Pr));break}}}var tu=null;function Oh(ie){tu=ie}function uh(ie,ae,fe,de,Se){var Re=ie.doc;ie.display.shift=!1,de||(de=Re.sel);var _e=+new Date-200,ft=Se=="paste"||ie.state.pasteIncoming>_e,lt=$n(ae),Zt=null;if(ft&&de.ranges.length>1)if(tu&&tu.text.join(`
|
|
|
`)==ae){if(de.ranges.length%tu.text.length==0){Zt=[];for(var Rn=0;Rn<tu.text.length;Rn++)Zt.push(Re.splitLines(tu.text[Rn]))}}else lt.length==de.ranges.length&&ie.options.pasteLinesPerSelection&&(Zt=wn(lt,function(Vr){return[Vr]}));for(var Yt=ie.curOp.updateInput,ci=de.ranges.length-1;ci>=0;ci--){var ai=de.ranges[ci],tr=ai.from(),lr=ai.to();ai.empty()&&(fe&&fe>0?tr=en(tr.line,tr.ch-fe):ie.state.overwrite&&!ft?lr=en(lr.line,Math.min(on(Re,lr.line).text.length,lr.ch+It(lt).length)):ft&&tu&&tu.lineWise&&tu.text.join(`
|
|
|
`)==lt.join(`
|
|
|
`)&&(tr=lr=en(tr.line,0)));var Pr={from:tr,to:lr,text:Zt?Zt[ci%Zt.length]:lt,origin:Se||(ft?"paste":ie.state.cutIncoming>_e?"cut":"+input")};es(ie.doc,Pr),Oi(ie,"inputRead",ie,Pr)}ae&&!ft&&bg(ie,ae),ld(ie),ie.curOp.updateInput<2&&(ie.curOp.updateInput=Yt),ie.curOp.typing=!0,ie.state.pasteIncoming=ie.state.cutIncoming=-1}function Cg(ie,ae){var fe=ie.clipboardData&&ie.clipboardData.getData("Text");if(fe)return ie.preventDefault(),!ae.isReadOnly()&&!ae.options.disableInput&&bn(ae,function(){return uh(ae,fe,0,null,"paste")}),!0}function bg(ie,ae){if(!(!ie.options.electricChars||!ie.options.smartIndent))for(var fe=ie.doc.sel,de=fe.ranges.length-1;de>=0;de--){var Se=fe.ranges[de];if(!(Se.head.ch>100||de&&fe.ranges[de-1].head.line==Se.head.line)){var Re=ie.getModeAt(Se.head),_e=!1;if(Re.electricChars){for(var ft=0;ft<Re.electricChars.length;ft++)if(ae.indexOf(Re.electricChars.charAt(ft))>-1){_e=xl(ie,Se.head.line,"smart");break}}else Re.electricInput&&Re.electricInput.test(on(ie.doc,Se.head.line).text.slice(0,Se.head.ch))&&(_e=xl(ie,Se.head.line,"smart"));_e&&Oi(ie,"electricInput",ie,Se.head.line)}}}function Eg(ie){for(var ae=[],fe=[],de=0;de<ie.doc.sel.ranges.length;de++){var Se=ie.doc.sel.ranges[de].head.line,Re={anchor:en(Se,0),head:en(Se+1,0)};fe.push(Re),ae.push(ie.getRange(Re.anchor,Re.head))}return{text:ae,ranges:fe}}function Mg(ie,ae,fe,de){ie.setAttribute("autocorrect",fe?"":"off"),ie.setAttribute("autocapitalize",de?"":"off"),ie.setAttribute("spellcheck",!!ae)}function Lg(){var ie=Qe("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),ae=Qe("div",[ie],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Ne?ie.style.width="1000px":ie.setAttribute("wrap","off"),De&&(ie.style.border="1px solid black"),Mg(ie),ae}function Td(ie){var ae=ie.optionHandlers,fe=ie.helpers={};ie.prototype={constructor:ie,focus:function(){window.focus(),this.display.input.focus()},setOption:function(de,Se){var Re=this.options,_e=Re[de];Re[de]==Se&&de!="mode"||(Re[de]=Se,ae.hasOwnProperty(de)&&si(this,ae[de])(this,Se,_e),jt(this,"optionChange",this,de))},getOption:function(de){return this.options[de]},getDoc:function(){return this.doc},addKeyMap:function(de,Se){this.state.keyMaps[Se?"push":"unshift"](zc(de))},removeKeyMap:function(de){for(var Se=this.state.keyMaps,Re=0;Re<Se.length;++Re)if(Se[Re]==de||Se[Re].name==de)return Se.splice(Re,1),!0},addOverlay:li(function(de,Se){var Re=de.token?de:ie.getMode(this.options,de);if(Re.startState)throw new Error("Overlays may not be stateful.");Gn(this.state.overlays,{mode:Re,modeSpec:de,opaque:Se&&Se.opaque,priority:Se&&Se.priority||0},function(_e){return _e.priority}),this.state.modeGen++,_a(this)}),removeOverlay:li(function(de){for(var Se=this.state.overlays,Re=0;Re<Se.length;++Re){var _e=Se[Re].modeSpec;if(_e==de||typeof de=="string"&&_e.name==de){Se.splice(Re,1),this.state.modeGen++,_a(this);return}}}),indentLine:li(function(de,Se,Re){typeof Se!="string"&&typeof Se!="number"&&(Se==null?Se=this.options.smartIndent?"smart":"prev":Se=Se?"add":"subtract"),qn(this.doc,de)&&xl(this,de,Se,Re)}),indentSelection:li(function(de){for(var Se=this.doc.sel.ranges,Re=-1,_e=0;_e<Se.length;_e++){var ft=Se[_e];if(ft.empty())ft.head.line>Re&&(xl(this,ft.head.line,de,!0),Re=ft.head.line,_e==this.doc.sel.primIndex&&ld(this));else{var lt=ft.from(),Zt=ft.to(),Rn=Math.max(Re,lt.line);Re=Math.min(this.lastLine(),Zt.line-(Zt.ch?0:1))+1;for(var Yt=Rn;Yt<Re;++Yt)xl(this,Yt,de);var ci=this.doc.sel.ranges;lt.ch==0&&Se.length==ci.length&&ci[_e].from().ch>0&&Oa(this.doc,_e,new Kr(lt,ci[_e].to()),Gt)}}}),getTokenAt:function(de,Se){return Ti(this,de,Se)},getLineTokens:function(de,Se){return Ti(this,en(de),Se,!0)},getTokenTypeAt:function(de){de=Hn(this.doc,de);var Se=$i(this,on(this.doc,de.line)),Re=0,_e=(Se.length-1)/2,ft=de.ch,lt;if(ft==0)lt=Se[2];else for(;;){var Zt=Re+_e>>1;if((Zt?Se[Zt*2-1]:0)>=ft)_e=Zt;else if(Se[Zt*2+1]<ft)Re=Zt+1;else{lt=Se[Zt*2+2];break}}var Rn=lt?lt.indexOf("overlay "):-1;return Rn<0?lt:Rn==0?null:lt.slice(0,Rn-1)},getModeAt:function(de){var Se=this.doc.mode;return Se.innerMode?ie.innerMode(Se,this.getTokenAt(de).state).mode:Se},getHelper:function(de,Se){return this.getHelpers(de,Se)[0]},getHelpers:function(de,Se){var Re=[];if(!fe.hasOwnProperty(Se))return Re;var _e=fe[Se],ft=this.getModeAt(de);if(typeof ft[Se]=="string")_e[ft[Se]]&&Re.push(_e[ft[Se]]);else if(ft[Se])for(var lt=0;lt<ft[Se].length;lt++){var Zt=_e[ft[Se][lt]];Zt&&Re.push(Zt)}else ft.helperType&&_e[ft.helperType]?Re.push(_e[ft.helperType]):_e[ft.name]&&Re.push(_e[ft.name]);for(var Rn=0;Rn<_e._global.length;Rn++){var Yt=_e._global[Rn];Yt.pred(ft,this)&&Wt(Re,Yt.val)==-1&&Re.push(Yt.val)}return Re},getStateAfter:function(de,Se){var Re=this.doc;return de=Wn(Re,de==null?Re.first+Re.size-1:de),Wi(this,de+1,Se).state},cursorCoords:function(de,Se){var Re,_e=this.doc.sel.primary();return de==null?Re=_e.head:typeof de=="object"?Re=Hn(this.doc,de):Re=de?_e.from():_e.to(),is(this,Re,Se||"page")},charCoords:function(de,Se){return _l(this,Hn(this.doc,de),Se||"page")},coordsChar:function(de,Se){return de=oc(this,de,Se||"page"),Uu(this,de.left,de.top)},lineAtHeight:function(de,Se){return de=oc(this,{top:de,left:0},Se||"page").top,Nn(this.doc,de+this.display.viewOffset)},heightAtLine:function(de,Se,Re){var _e=!1,ft;if(typeof de=="number"){var lt=this.doc.first+this.doc.size-1;de<this.doc.first?de=this.doc.first:de>lt&&(de=lt,_e=!0),ft=on(this.doc,de)}else ft=de;return vs(this,ft,{top:0,left:0},Se||"page",Re||_e).top+(_e?this.doc.height-Bo(ft):0)},defaultTextHeight:function(){return cu(this.display)},defaultCharWidth:function(){return Mu(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(de,Se,Re,_e,ft){var lt=this.display;de=is(this,Hn(this.doc,de));var Zt=de.bottom,Rn=de.left;if(Se.style.position="absolute",Se.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(Se),lt.sizer.appendChild(Se),_e=="over")Zt=de.top;else if(_e=="above"||_e=="near"){var Yt=Math.max(lt.wrapper.clientHeight,this.doc.height),ci=Math.max(lt.sizer.clientWidth,lt.lineSpace.clientWidth);(_e=="above"||de.bottom+Se.offsetHeight>Yt)&&de.top>Se.offsetHeight?Zt=de.top-Se.offsetHeight:de.bottom+Se.offsetHeight<=Yt&&(Zt=de.bottom),Rn+Se.offsetWidth>ci&&(Rn=ci-Se.offsetWidth)}Se.style.top=Zt+"px",Se.style.left=Se.style.right="",ft=="right"?(Rn=lt.sizer.clientWidth-Se.offsetWidth,Se.style.right="0px"):(ft=="left"?Rn=0:ft=="middle"&&(Rn=(lt.sizer.clientWidth-Se.offsetWidth)/2),Se.style.left=Rn+"px"),Re&&wd(this,{left:Rn,top:Zt,right:Rn+Se.offsetWidth,bottom:Zt+Se.offsetHeight})},triggerOnKeyDown:li(hg),triggerOnKeyPress:li(bc),triggerOnKeyUp:gg,triggerOnMouseDown:li(Ec),execCommand:function(de){if(Sl.hasOwnProperty(de))return Sl[de].call(null,this)},triggerElectric:li(function(de){bg(this,de)}),findPosH:function(de,Se,Re,_e){var ft=1;Se<0&&(ft=-1,Se=-Se);for(var lt=Hn(this.doc,de),Zt=0;Zt<Se&&(lt=cf(this.doc,lt,ft,Re,_e),!lt.hitSide);++Zt);return lt},moveH:li(function(de,Se){var Re=this;this.extendSelectionsBy(function(_e){return Re.display.shift||Re.doc.extend||_e.empty()?cf(Re.doc,_e.head,de,Se,Re.options.rtlMoveVisually):de<0?_e.from():_e.to()},An)}),deleteH:li(function(de,Se){var Re=this.doc.sel,_e=this.doc;Re.somethingSelected()?_e.replaceSelection("",null,"+delete"):Cl(this,function(ft){var lt=cf(_e,ft.head,de,Se,!1);return de<0?{from:lt,to:ft.head}:{from:ft.head,to:lt}})}),findPosV:function(de,Se,Re,_e){var ft=1,lt=_e;Se<0&&(ft=-1,Se=-Se);for(var Zt=Hn(this.doc,de),Rn=0;Rn<Se;++Rn){var Yt=is(this,Zt,"div");if(lt==null?lt=Yt.left:Yt.left=lt,Zt=hd(this,Yt,ft,Re),Zt.hitSide)break}return Zt},moveV:li(function(de,Se){var Re=this,_e=this.doc,ft=[],lt=!this.display.shift&&!_e.extend&&_e.sel.somethingSelected();if(_e.extendSelectionsBy(function(Rn){if(lt)return de<0?Rn.from():Rn.to();var Yt=is(Re,Rn.head,"div");Rn.goalColumn!=null&&(Yt.left=Rn.goalColumn),ft.push(Yt.left);var ci=hd(Re,Yt,de,Se);return Se=="page"&&Rn==_e.sel.primary()&&Xd(Re,_l(Re,ci,"div").top-Yt.top),ci},An),ft.length)for(var Zt=0;Zt<_e.sel.ranges.length;Zt++)_e.sel.ranges[Zt].goalColumn=ft[Zt]}),findWordAt:function(de){var Se=this.doc,Re=on(Se,de.line).text,_e=de.ch,ft=de.ch;if(Re){var lt=this.getHelper(de,"wordChars");(de.sticky=="before"||ft==Re.length)&&_e?--_e:++ft;for(var Zt=Re.charAt(_e),Rn=Ae(Zt,lt)?function(Yt){return Ae(Yt,lt)}:/\s/.test(Zt)?function(Yt){return/\s/.test(Yt)}:function(Yt){return!/\s/.test(Yt)&&!Ae(Yt)};_e>0&&Rn(Re.charAt(_e-1));)--_e;for(;ft<Re.length&&Rn(Re.charAt(ft));)++ft}return new Kr(en(de.line,_e),en(de.line,ft))},toggleOverwrite:function(de){de!=null&&de==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Dt(this.display.cursorDiv,"CodeMirror-overwrite"):He(this.display.cursorDiv,"CodeMirror-overwrite"),jt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==it()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:li(function(de,Se){ud(this,de,Se)}),getScrollInfo:function(){var de=this.display.scroller;return{left:de.scrollLeft,top:de.scrollTop,height:de.scrollHeight-wl(this)-this.display.barHeight,width:de.scrollWidth-wl(this)-this.display.barWidth,clientHeight:td(this),clientWidth:sl(this)}},scrollIntoView:li(function(de,Se){de==null?(de={from:this.doc.sel.primary().head,to:null},Se==null&&(Se=this.options.cursorScrollMargin)):typeof de=="number"?de={from:en(de,0),to:null}:de.from==null&&(de={from:de,to:null}),de.to||(de.to=de.from),de.margin=Se||0,de.from.line!=null?Fa(this,de):Yd(this,de.from,de.to,de.margin)}),setSize:li(function(de,Se){var Re=this,_e=function(lt){return typeof lt=="number"||/^\d+$/.test(String(lt))?lt+"px":lt};de!=null&&(this.display.wrapper.style.width=_e(de)),Se!=null&&(this.display.wrapper.style.height=_e(Se)),this.options.lineWrapping&&Ss(this);var ft=this.display.viewFrom;this.doc.iter(ft,this.display.viewTo,function(lt){if(lt.widgets){for(var Zt=0;Zt<lt.widgets.length;Zt++)if(lt.widgets[Zt].noHScroll){ra(Re,ft,"widget");break}}++ft}),this.curOp.forceUpdate=!0,jt(this,"refresh",this)}),operation:function(de){return bn(this,de)},startOperation:function(){return Ol(this)},endOperation:function(){return Oc(this)},refresh:li(function(){var de=this.display.cachedTextHeight;_a(this),this.curOp.forceUpdate=!0,ms(this),ud(this,this.doc.scrollLeft,this.doc.scrollTop),eo(this.display),(de==null||Math.abs(de-cu(this.display))>.5||this.options.lineWrapping)&&To(this),jt(this,"refresh",this)}),swapDoc:li(function(de){var Se=this.doc;return Se.cm=null,this.state.selectingText&&this.state.selectingText(),$o(this,de),ms(this),this.display.input.reset(),ud(this,de.scrollLeft,de.scrollTop),this.curOp.forceScroll=!0,Oi(this,"swapDoc",this,Se),Se}),phrase:function(de){var Se=this.options.phrases;return Se&&Object.prototype.hasOwnProperty.call(Se,de)?Se[de]:de},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}},Pn(ie),ie.registerHelper=function(de,Se,Re){fe.hasOwnProperty(de)||(fe[de]=ie[de]={_global:[]}),fe[de][Se]=Re},ie.registerGlobalHelper=function(de,Se,Re,_e){ie.registerHelper(de,Se,_e),fe[de]._global.push({pred:Re,val:_e})}}function cf(ie,ae,fe,de,Se){var Re=ae,_e=fe,ft=on(ie,ae.line),lt=Se&&ie.direction=="rtl"?-fe:fe;function Zt(){var yo=ae.line+lt;return yo<ie.first||yo>=ie.first+ie.size?!1:(ae=new en(yo,ae.ch,ae.sticky),ft=on(ie,yo))}function Rn(yo){var ao;if(de=="codepoint"){var Eo=ft.text.charCodeAt(ae.ch+(de>0?0:-1));isNaN(Eo)?ao=null:ao=new en(ae.line,Math.max(0,Math.min(ft.text.length,ae.ch+fe*(Eo>=55296&&Eo<56320?2:1))),-fe)}else Se?ao=ls(ie.cm,ft,ae,fe):ao=$s(ft,ae,fe);if(ao==null)if(!yo&&Zt())ae=xa(Se,ie.cm,ft,ae.line,lt);else return!1;else ae=ao;return!0}if(de=="char"||de=="codepoint")Rn();else if(de=="column")Rn(!0);else if(de=="word"||de=="group")for(var Yt=null,ci=de=="group",ai=ie.cm&&ie.cm.getHelper(ae,"wordChars"),tr=!0;!(fe<0&&!Rn(!tr));tr=!1){var lr=ft.text.charAt(ae.ch)||`
|
|
|
`,Pr=Ae(lr,ai)?"w":ci&&lr==`
|
|
|
`?"n":!ci||/\s/.test(lr)?null:"p";if(ci&&!tr&&!Pr&&(Pr="s"),Yt&&Yt!=Pr){fe<0&&(fe=1,Rn(),ae.sticky="after");break}if(Pr&&(Yt=Pr),fe>0&&!Rn(!tr))break}var Vr=Jl(ie,ae,Re,_e,!0);return At(Re,Vr)&&(Vr.hitSide=!0),Vr}function hd(ie,ae,fe,de){var Se=ie.doc,Re=ae.left,_e;if(de=="page"){var ft=Math.min(ie.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),lt=Math.max(ft-.5*cu(ie.display),3);_e=(fe>0?ae.bottom:ae.top)+fe*lt}else de=="line"&&(_e=fe>0?ae.bottom+3:ae.top-3);for(var Zt;Zt=Uu(ie,Re,_e),!!Zt.outside;){if(fe<0?_e<=0:_e>=Se.height){Zt.hitSide=!0;break}_e+=fe*5}return Zt}var ts=function(ie){this.cm=ie,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ue,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ts.prototype.init=function(ie){var ae=this,fe=this,de=fe.cm,Se=fe.div=ie.lineDiv;Mg(Se,de.options.spellcheck,de.options.autocorrect,de.options.autocapitalize);function Re(ft){for(var lt=ft.target;lt;lt=lt.parentNode){if(lt==Se)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(lt.className))break}return!1}Qt(Se,"paste",function(ft){!Re(ft)||sn(de,ft)||Cg(ft,de)||Xe<=11&&setTimeout(si(de,function(){return ae.updateFromDOM()}),20)}),Qt(Se,"compositionstart",function(ft){ae.composing={data:ft.data,done:!1}}),Qt(Se,"compositionupdate",function(ft){ae.composing||(ae.composing={data:ft.data,done:!1})}),Qt(Se,"compositionend",function(ft){ae.composing&&(ft.data!=ae.composing.data&&ae.readFromDOMSoon(),ae.composing.done=!0)}),Qt(Se,"touchstart",function(){return fe.forceCompositionEnd()}),Qt(Se,"input",function(){ae.composing||ae.readFromDOMSoon()});function _e(ft){if(!(!Re(ft)||sn(de,ft))){if(de.somethingSelected())Oh({lineWise:!1,text:de.getSelections()}),ft.type=="cut"&&de.replaceSelection("",null,"cut");else if(de.options.lineWiseCopyCut){var lt=Eg(de);Oh({lineWise:!0,text:lt.text}),ft.type=="cut"&&de.operation(function(){de.setSelections(lt.ranges,0,Gt),de.replaceSelection("",null,"cut")})}else return;if(ft.clipboardData){ft.clipboardData.clearData();var Zt=tu.text.join(`
|
|
|
`);if(ft.clipboardData.setData("Text",Zt),ft.clipboardData.getData("Text")==Zt){ft.preventDefault();return}}var Rn=Lg(),Yt=Rn.firstChild;de.display.lineSpace.insertBefore(Rn,de.display.lineSpace.firstChild),Yt.value=tu.text.join(`
|
|
|
`);var ci=document.activeElement;Ht(Yt),setTimeout(function(){de.display.lineSpace.removeChild(Rn),ci.focus(),ci==Se&&fe.showPrimarySelection()},50)}}Qt(Se,"copy",_e),Qt(Se,"cut",_e)},ts.prototype.screenReaderLabelChanged=function(ie){ie?this.div.setAttribute("aria-label",ie):this.div.removeAttribute("aria-label")},ts.prototype.prepareSelection=function(){var ie=od(this.cm,!1);return ie.focus=document.activeElement==this.div,ie},ts.prototype.showSelection=function(ie,ae){!ie||!this.cm.display.view.length||((ie.focus||ae)&&this.showPrimarySelection(),this.showMultipleSelections(ie))},ts.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ts.prototype.showPrimarySelection=function(){var ie=this.getSelection(),ae=this.cm,fe=ae.doc.sel.primary(),de=fe.from(),Se=fe.to();if(ae.display.viewTo==ae.display.viewFrom||de.line>=ae.display.viewTo||Se.line<ae.display.viewFrom){ie.removeAllRanges();return}var Re=df(ae,ie.anchorNode,ie.anchorOffset),_e=df(ae,ie.focusNode,ie.focusOffset);if(!(Re&&!Re.bad&&_e&&!_e.bad&&Cn(mn(Re,_e),de)==0&&Cn(pn(Re,_e),Se)==0)){var ft=ae.display.view,lt=de.line>=ae.display.viewFrom&&ch(ae,de)||{node:ft[0].measure.map[2],offset:0},Zt=Se.line<ae.display.viewTo&&ch(ae,Se);if(!Zt){var Rn=ft[ft.length-1].measure,Yt=Rn.maps?Rn.maps[Rn.maps.length-1]:Rn.map;Zt={node:Yt[Yt.length-1],offset:Yt[Yt.length-2]-Yt[Yt.length-3]}}if(!lt||!Zt){ie.removeAllRanges();return}var ci=ie.rangeCount&&ie.getRangeAt(0),ai;try{ai=Ze(lt.node,lt.offset,Zt.offset,Zt.node)}catch(tr){}ai&&(!ge&&ae.state.focused?(ie.collapse(lt.node,lt.offset),ai.collapsed||(ie.removeAllRanges(),ie.addRange(ai))):(ie.removeAllRanges(),ie.addRange(ai)),ci&&ie.anchorNode==null?ie.addRange(ci):ge&&this.startGracePeriod()),this.rememberSelection()}},ts.prototype.startGracePeriod=function(){var ie=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){ie.gracePeriod=!1,ie.selectionChanged()&&ie.cm.operation(function(){return ie.cm.curOp.selectionChanged=!0})},20)},ts.prototype.showMultipleSelections=function(ie){rt(this.cm.display.cursorDiv,ie.cursors),rt(this.cm.display.selectionDiv,ie.selection)},ts.prototype.rememberSelection=function(){var ie=this.getSelection();this.lastAnchorNode=ie.anchorNode,this.lastAnchorOffset=ie.anchorOffset,this.lastFocusNode=ie.focusNode,this.lastFocusOffset=ie.focusOffset},ts.prototype.selectionInEditor=function(){var ie=this.getSelection();if(!ie.rangeCount)return!1;var ae=ie.getRangeAt(0).commonAncestorContainer;return Et(this.div,ae)},ts.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},ts.prototype.blur=function(){this.div.blur()},ts.prototype.getField=function(){return this.div},ts.prototype.supportsTouch=function(){return!0},ts.prototype.receivedFocus=function(){var ie=this;this.selectionInEditor()?this.pollSelection():bn(this.cm,function(){return ie.cm.curOp.selectionChanged=!0});function ae(){ie.cm.state.focused&&(ie.pollSelection(),ie.polling.set(ie.cm.options.pollInterval,ae))}this.polling.set(this.cm.options.pollInterval,ae)},ts.prototype.selectionChanged=function(){var ie=this.getSelection();return ie.anchorNode!=this.lastAnchorNode||ie.anchorOffset!=this.lastAnchorOffset||ie.focusNode!=this.lastFocusNode||ie.focusOffset!=this.lastFocusOffset},ts.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var ie=this.getSelection(),ae=this.cm;if(ne&&Ct&&this.cm.display.gutterSpecs.length&&Ng(ie.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var fe=df(ae,ie.anchorNode,ie.anchorOffset),de=df(ae,ie.focusNode,ie.focusOffset);fe&&de&&bn(ae,function(){Xa(ae.doc,ia(fe,de),Gt),(fe.bad||de.bad)&&(ae.curOp.selectionChanged=!0)})}}},ts.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var ie=this.cm,ae=ie.display,fe=ie.doc.sel.primary(),de=fe.from(),Se=fe.to();if(de.ch==0&&de.line>ie.firstLine()&&(de=en(de.line-1,on(ie.doc,de.line-1).length)),Se.ch==on(ie.doc,Se.line).text.length&&Se.line<ie.lastLine()&&(Se=en(Se.line+1,0)),de.line<ae.viewFrom||Se.line>ae.viewTo-1)return!1;var Re,_e,ft;de.line==ae.viewFrom||(Re=ul(ie,de.line))==0?(_e=St(ae.view[0].line),ft=ae.view[0].node):(_e=St(ae.view[Re].line),ft=ae.view[Re-1].node.nextSibling);var lt=ul(ie,Se.line),Zt,Rn;if(lt==ae.view.length-1?(Zt=ae.viewTo-1,Rn=ae.lineDiv.lastChild):(Zt=St(ae.view[lt+1].line)-1,Rn=ae.view[lt+1].node.previousSibling),!ft)return!1;for(var Yt=ie.doc.splitLines(dh(ie,ft,Rn,_e,Zt)),ci=En(ie.doc,en(_e,0),en(Zt,on(ie.doc,Zt).text.length));Yt.length>1&&ci.length>1;)if(It(Yt)==It(ci))Yt.pop(),ci.pop(),Zt--;else if(Yt[0]==ci[0])Yt.shift(),ci.shift(),_e++;else break;for(var ai=0,tr=0,lr=Yt[0],Pr=ci[0],Vr=Math.min(lr.length,Pr.length);ai<Vr&&lr.charCodeAt(ai)==Pr.charCodeAt(ai);)++ai;for(var yo=It(Yt),ao=It(ci),Eo=Math.min(yo.length-(Yt.length==1?ai:0),ao.length-(ci.length==1?ai:0));tr<Eo&&yo.charCodeAt(yo.length-tr-1)==ao.charCodeAt(ao.length-tr-1);)++tr;if(Yt.length==1&&ci.length==1&&_e==de.line)for(;ai&&ai>de.ch&&yo.charCodeAt(yo.length-tr-1)==ao.charCodeAt(ao.length-tr-1);)ai--,tr++;Yt[Yt.length-1]=yo.slice(0,yo.length-tr).replace(/^\u200b+/,""),Yt[0]=Yt[0].slice(ai).replace(/\u200b+$/,"");var Qo=en(_e,ai),so=en(Zt,ci.length?It(ci).length-tr:0);if(Yt.length>1||Yt[0]||Cn(Qo,so))return gu(ie.doc,Yt,Qo,so,"+input"),!0},ts.prototype.ensurePolled=function(){this.forceCompositionEnd()},ts.prototype.reset=function(){this.forceCompositionEnd()},ts.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ts.prototype.readFromDOMSoon=function(){var ie=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(ie.readDOMTimeout=null,ie.composing)if(ie.composing.done)ie.composing=null;else return;ie.updateFromDOM()},80))},ts.prototype.updateFromDOM=function(){var ie=this;(this.cm.isReadOnly()||!this.pollContent())&&bn(this.cm,function(){return _a(ie.cm)})},ts.prototype.setUneditable=function(ie){ie.contentEditable="false"},ts.prototype.onKeyPress=function(ie){ie.charCode==0||this.composing||(ie.preventDefault(),this.cm.isReadOnly()||si(this.cm,uh)(this.cm,String.fromCharCode(ie.charCode==null?ie.keyCode:ie.charCode),0))},ts.prototype.readOnlyChanged=function(ie){this.div.contentEditable=String(ie!="nocursor")},ts.prototype.onContextMenu=function(){},ts.prototype.resetPosition=function(){},ts.prototype.needsContentAttribute=!0;function ch(ie,ae){var fe=Ic(ie,ae.line);if(!fe||fe.hidden)return null;var de=on(ie.doc,ae.line),Se=kc(fe,de,ae.line),Re=un(de,ie.doc.direction),_e="left";if(Re){var ft=at(Re,ae.ch);_e=ft%2?"right":"left"}var lt=Eu(Se.map,ae.ch,_e);return lt.offset=lt.collapse=="right"?lt.end:lt.start,lt}function Ng(ie){for(var ae=ie;ae;ae=ae.parentNode)if(/CodeMirror-gutter-wrapper/.test(ae.className))return!0;return!1}function kd(ie,ae){return ae&&(ie.bad=!0),ie}function dh(ie,ae,fe,de,Se){var Re="",_e=!1,ft=ie.doc.lineSeparator(),lt=!1;function Zt(ai){return function(tr){return tr.id==ai}}function Rn(){_e&&(Re+=ft,lt&&(Re+=ft),_e=lt=!1)}function Yt(ai){ai&&(Rn(),Re+=ai)}function ci(ai){if(ai.nodeType==1){var tr=ai.getAttribute("cm-text");if(tr){Yt(tr);return}var lr=ai.getAttribute("cm-marker"),Pr;if(lr){var Vr=ie.findMarks(en(de,0),en(Se+1,0),Zt(+lr));Vr.length&&(Pr=Vr[0].find(0))&&Yt(En(ie.doc,Pr.from,Pr.to).join(ft));return}if(ai.getAttribute("contenteditable")=="false")return;var yo=/^(pre|div|p|li|table|br)$/i.test(ai.nodeName);if(!/^br$/i.test(ai.nodeName)&&ai.textContent.length==0)return;yo&&Rn();for(var ao=0;ao<ai.childNodes.length;ao++)ci(ai.childNodes[ao]);/^(pre|p)$/i.test(ai.nodeName)&&(lt=!0),yo&&(_e=!0)}else ai.nodeType==3&&Yt(ai.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;ci(ae),ae!=fe;)ae=ae.nextSibling,lt=!1;return Re}function df(ie,ae,fe){var de;if(ae==ie.display.lineDiv){if(de=ie.display.lineDiv.childNodes[fe],!de)return kd(ie.clipPos(en(ie.display.viewTo-1)),!0);ae=null,fe=0}else for(de=ae;;de=de.parentNode){if(!de||de==ie.display.lineDiv)return null;if(de.parentNode&&de.parentNode==ie.display.lineDiv)break}for(var Se=0;Se<ie.display.view.length;Se++){var Re=ie.display.view[Se];if(Re.node==de)return ip(Re,ae,fe)}}function ip(ie,ae,fe){var de=ie.text.firstChild,Se=!1;if(!ae||!Et(de,ae))return kd(en(St(ie.line),0),!0);if(ae==de&&(Se=!0,ae=de.childNodes[fe],fe=0,!ae)){var Re=ie.rest?It(ie.rest):ie.line;return kd(en(St(Re),Re.text.length),Se)}var _e=ae.nodeType==3?ae:null,ft=ae;for(!_e&&ae.childNodes.length==1&&ae.firstChild.nodeType==3&&(_e=ae.firstChild,fe&&(fe=_e.nodeValue.length));ft.parentNode!=de;)ft=ft.parentNode;var lt=ie.measure,Zt=lt.maps;function Rn(Pr,Vr,yo){for(var ao=-1;ao<(Zt?Zt.length:0);ao++)for(var Eo=ao<0?lt.map:Zt[ao],Qo=0;Qo<Eo.length;Qo+=3){var so=Eo[Qo+2];if(so==Pr||so==Vr){var ha=St(ao<0?ie.line:ie.rest[ao]),ws=Eo[Qo]+yo;return(yo<0||so!=Pr)&&(ws=Eo[Qo+(yo?1:0)]),en(ha,ws)}}}var Yt=Rn(_e,ft,fe);if(Yt)return kd(Yt,Se);for(var ci=ft.nextSibling,ai=_e?_e.nodeValue.length-fe:0;ci;ci=ci.nextSibling){if(Yt=Rn(ci,ci.firstChild,0),Yt)return kd(en(Yt.line,Yt.ch-ai),Se);ai+=ci.textContent.length}for(var tr=ft.previousSibling,lr=fe;tr;tr=tr.previousSibling){if(Yt=Rn(tr,tr.firstChild,-1),Yt)return kd(en(Yt.line,Yt.ch+lr),Se);lr+=tr.textContent.length}}var hl=function(ie){this.cm=ie,this.prevInput="",this.pollingFast=!1,this.polling=new Ue,this.hasSelection=!1,this.composing=null};hl.prototype.init=function(ie){var ae=this,fe=this,de=this.cm;this.createField(ie);var Se=this.textarea;ie.wrapper.insertBefore(this.wrapper,ie.wrapper.firstChild),De&&(Se.style.width="0px"),Qt(Se,"input",function(){Ge&&Xe>=9&&ae.hasSelection&&(ae.hasSelection=null),fe.poll()}),Qt(Se,"paste",function(_e){sn(de,_e)||Cg(_e,de)||(de.state.pasteIncoming=+new Date,fe.fastPoll())});function Re(_e){if(!sn(de,_e)){if(de.somethingSelected())Oh({lineWise:!1,text:de.getSelections()});else if(de.options.lineWiseCopyCut){var ft=Eg(de);Oh({lineWise:!0,text:ft.text}),_e.type=="cut"?de.setSelections(ft.ranges,null,Gt):(fe.prevInput="",Se.value=ft.text.join(`
|
|
|
`),Ht(Se))}else return;_e.type=="cut"&&(de.state.cutIncoming=+new Date)}}Qt(Se,"cut",Re),Qt(Se,"copy",Re),Qt(ie.scroller,"paste",function(_e){if(!(as(ie,_e)||sn(de,_e))){if(!Se.dispatchEvent){de.state.pasteIncoming=+new Date,fe.focus();return}var ft=new Event("paste");ft.clipboardData=_e.clipboardData,Se.dispatchEvent(ft)}}),Qt(ie.lineSpace,"selectstart",function(_e){as(ie,_e)||ui(_e)}),Qt(Se,"compositionstart",function(){var _e=de.getCursor("from");fe.composing&&fe.composing.range.clear(),fe.composing={start:_e,range:de.markText(_e,de.getCursor("to"),{className:"CodeMirror-composing"})}}),Qt(Se,"compositionend",function(){fe.composing&&(fe.poll(),fe.composing.range.clear(),fe.composing=null)})},hl.prototype.createField=function(ie){this.wrapper=Lg(),this.textarea=this.wrapper.firstChild},hl.prototype.screenReaderLabelChanged=function(ie){ie?this.textarea.setAttribute("aria-label",ie):this.textarea.removeAttribute("aria-label")},hl.prototype.prepareSelection=function(){var ie=this.cm,ae=ie.display,fe=ie.doc,de=od(ie);if(ie.options.moveInputWithCursor){var Se=is(ie,fe.sel.primary().head,"div"),Re=ae.wrapper.getBoundingClientRect(),_e=ae.lineDiv.getBoundingClientRect();de.teTop=Math.max(0,Math.min(ae.wrapper.clientHeight-10,Se.top+_e.top-Re.top)),de.teLeft=Math.max(0,Math.min(ae.wrapper.clientWidth-10,Se.left+_e.left-Re.left))}return de},hl.prototype.showSelection=function(ie){var ae=this.cm,fe=ae.display;rt(fe.cursorDiv,ie.cursors),rt(fe.selectionDiv,ie.selection),ie.teTop!=null&&(this.wrapper.style.top=ie.teTop+"px",this.wrapper.style.left=ie.teLeft+"px")},hl.prototype.reset=function(ie){if(!(this.contextMenuPending||this.composing)){var ae=this.cm;if(ae.somethingSelected()){this.prevInput="";var fe=ae.getSelection();this.textarea.value=fe,ae.state.focused&&Ht(this.textarea),Ge&&Xe>=9&&(this.hasSelection=fe)}else ie||(this.prevInput=this.textarea.value="",Ge&&Xe>=9&&(this.hasSelection=null))}},hl.prototype.getField=function(){return this.textarea},hl.prototype.supportsTouch=function(){return!1},hl.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ee||it()!=this.textarea))try{this.textarea.focus()}catch(ie){}},hl.prototype.blur=function(){this.textarea.blur()},hl.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},hl.prototype.receivedFocus=function(){this.slowPoll()},hl.prototype.slowPoll=function(){var ie=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){ie.poll(),ie.cm.state.focused&&ie.slowPoll()})},hl.prototype.fastPoll=function(){var ie=!1,ae=this;ae.pollingFast=!0;function fe(){var de=ae.poll();!de&&!ie?(ie=!0,ae.polling.set(60,fe)):(ae.pollingFast=!1,ae.slowPoll())}ae.polling.set(20,fe)},hl.prototype.poll=function(){var ie=this,ae=this.cm,fe=this.textarea,de=this.prevInput;if(this.contextMenuPending||!ae.state.focused||Le(fe)&&!de&&!this.composing||ae.isReadOnly()||ae.options.disableInput||ae.state.keySeq)return!1;var Se=fe.value;if(Se==de&&!ae.somethingSelected())return!1;if(Ge&&Xe>=9&&this.hasSelection===Se||ce&&/[\uf700-\uf7ff]/.test(Se))return ae.display.input.reset(),!1;if(ae.doc.sel==ae.display.selForContextMenu){var Re=Se.charCodeAt(0);if(Re==8203&&!de&&(de="\u200B"),Re==8666)return this.reset(),this.cm.execCommand("undo")}for(var _e=0,ft=Math.min(de.length,Se.length);_e<ft&&de.charCodeAt(_e)==Se.charCodeAt(_e);)++_e;return bn(ae,function(){uh(ae,Se.slice(_e),de.length-_e,null,ie.composing?"*compose":null),Se.length>1e3||Se.indexOf(`
|
|
|
`)>-1?fe.value=ie.prevInput="":ie.prevInput=Se,ie.composing&&(ie.composing.range.clear(),ie.composing.range=ae.markText(ie.composing.start,ae.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},hl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},hl.prototype.onKeyPress=function(){Ge&&Xe>=9&&(this.hasSelection=null),this.fastPoll()},hl.prototype.onContextMenu=function(ie){var ae=this,fe=ae.cm,de=fe.display,Se=ae.textarea;ae.contextMenuPending&&ae.contextMenuPending();var Re=yl(fe,ie),_e=de.scroller.scrollTop;if(!Re||Ve)return;var ft=fe.options.resetSelectionOnContextMenu;ft&&fe.doc.sel.contains(Re)==-1&&si(fe,Xa)(fe.doc,ia(Re),Gt);var lt=Se.style.cssText,Zt=ae.wrapper.style.cssText,Rn=ae.wrapper.offsetParent.getBoundingClientRect();ae.wrapper.style.cssText="position: static",Se.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(ie.clientY-Rn.top-5)+"px; left: "+(ie.clientX-Rn.left-5)+`px;
|
|
|
z-index: 1000; background: `+(Ge?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Yt;Ne&&(Yt=window.scrollY),de.input.focus(),Ne&&window.scrollTo(null,Yt),de.input.reset(),fe.somethingSelected()||(Se.value=ae.prevInput=" "),ae.contextMenuPending=ai,de.selForContextMenu=fe.doc.sel,clearTimeout(de.detectingSelectAll);function ci(){if(Se.selectionStart!=null){var lr=fe.somethingSelected(),Pr="\u200B"+(lr?Se.value:"");Se.value="\u21DA",Se.value=Pr,ae.prevInput=lr?"":"\u200B",Se.selectionStart=1,Se.selectionEnd=Pr.length,de.selForContextMenu=fe.doc.sel}}function ai(){if(ae.contextMenuPending==ai&&(ae.contextMenuPending=!1,ae.wrapper.style.cssText=Zt,Se.style.cssText=lt,Ge&&Xe<9&&de.scrollbars.setScrollTop(de.scroller.scrollTop=_e),Se.selectionStart!=null)){(!Ge||Ge&&Xe<9)&&ci();var lr=0,Pr=function(){de.selForContextMenu==fe.doc.sel&&Se.selectionStart==0&&Se.selectionEnd>0&&ae.prevInput=="\u200B"?si(fe,za)(fe):lr++<10?de.detectingSelectAll=setTimeout(Pr,500):(de.selForContextMenu=null,de.input.reset())};de.detectingSelectAll=setTimeout(Pr,200)}}if(Ge&&Xe>=9&&ci(),ke){bi(ie);var tr=function(){On(window,"mouseup",tr),setTimeout(ai,20)};Qt(window,"mouseup",tr)}else setTimeout(ai,50)},hl.prototype.readOnlyChanged=function(ie){ie||this.reset(),this.textarea.disabled=ie=="nocursor",this.textarea.readOnly=!!ie},hl.prototype.setUneditable=function(){},hl.prototype.needsContentAttribute=!1;function rp(ie,ae){if(ae=ae?Vt(ae):{},ae.value=ie.value,!ae.tabindex&&ie.tabIndex&&(ae.tabindex=ie.tabIndex),!ae.placeholder&&ie.placeholder&&(ae.placeholder=ie.placeholder),ae.autofocus==null){var fe=it();ae.autofocus=fe==ie||ie.getAttribute("autofocus")!=null&&fe==document.body}function de(){ie.value=ft.getValue()}var Se;if(ie.form&&(Qt(ie.form,"submit",de),!ae.leaveSubmitMethodAlone)){var Re=ie.form;Se=Re.submit;try{var _e=Re.submit=function(){de(),Re.submit=Se,Re.submit(),Re.submit=_e}}catch(lt){}}ae.finishInit=function(lt){lt.save=de,lt.getTextArea=function(){return ie},lt.toTextArea=function(){lt.toTextArea=isNaN,de(),ie.parentNode.removeChild(lt.getWrapperElement()),ie.style.display="",ie.form&&(On(ie.form,"submit",de),!ae.leaveSubmitMethodAlone&&typeof ie.form.submit=="function"&&(ie.form.submit=Se))}},ie.style.display="none";var ft=Ha(function(lt){return ie.parentNode.insertBefore(lt,ie.nextSibling)},ae);return ft}function Id(ie){ie.off=On,ie.on=Qt,ie.wheelEventPixels=Mo,ie.Doc=Gs,ie.splitLines=$n,ie.countColumn=ot,ie.findColumn=ni,ie.isWordChar=Fe,ie.Pass=Fn,ie.signal=jt,ie.Line=Ao,ie.changeEnd=Ta,ie.scrollbarModel=of,ie.Pos=en,ie.cmpPos=Cn,ie.modes=di,ie.mimeModes=yi,ie.resolveMode=Un,ie.getMode=kt,ie.modeExtensions=$t,ie.extendMode=Je,ie.copyState=qt,ie.startState=Ft,ie.innerMode=vn,ie.commands=Sl,ie.keyMap=jl,ie.keyName=ih,ie.isModifierKey=wc,ie.lookupKey=eu,ie.normalizeKeyMap=Bh,ie.StringStream=st,ie.SharedTextMarker=Xu,ie.TextMarker=hn,ie.LineWidget=Ts,ie.e_preventDefault=ui,ie.e_stopPropagation=pi,ie.e_stop=bi,ie.addClass=Dt,ie.contains=Et,ie.rmClass=He,ie.keyNames=Yu}tp(Ha),Td(Ha);var Zc="iter insert remove copy getEditor constructor".split(" ");for(var hh in Gs.prototype)Gs.prototype.hasOwnProperty(hh)&&Wt(Zc,hh)<0&&(Ha.prototype[hh]=function(ie){return function(){return ie.apply(this.doc,arguments)}}(Gs.prototype[hh]));return Pn(Gs),Ha.inputStyles={textarea:hl,contenteditable:ts},Ha.defineMode=function(ie){!Ha.defaults.mode&&ie!="null"&&(Ha.defaults.mode=ie),Li.apply(this,arguments)},Ha.defineMIME=Tn,Ha.defineMode("null",function(){return{token:function(ie){return ie.skipToEnd()}}}),Ha.defineMIME("text/plain","null"),Ha.defineExtension=function(ie,ae){Ha.prototype[ie]=ae},Ha.defineDocExtension=function(ie,ae){Gs.prototype[ie]=ae},Ha.fromTextArea=rp,Id(Ha),Ha.version="5.58.2",Ha})},25419:function(Vn,xn,pe){(function(ge){ge(pe(89780),pe(15525),pe(98101))})(function(ge){"use strict";ge.defineMode("markdown",function(Oe,Ke){var ut=ge.getMode(Oe,"text/html"),Ge=ut.name=="null";function Xe(ot){if(ge.findModeByName){var Ue=ge.findModeByName(ot);Ue&&(ot=Ue.mime||Ue.mimes[0])}var Wt=ge.getMode(Oe,ot);return Wt.name=="null"?null:Wt}Ke.highlightFormatting===void 0&&(Ke.highlightFormatting=!1),Ke.maxBlockquoteDepth===void 0&&(Ke.maxBlockquoteDepth=0),Ke.taskLists===void 0&&(Ke.taskLists=!1),Ke.strikethrough===void 0&&(Ke.strikethrough=!1),Ke.emoji===void 0&&(Ke.emoji=!1),Ke.fencedCodeBlockHighlighting===void 0&&(Ke.fencedCodeBlockHighlighting=!0),Ke.fencedCodeBlockDefaultMode===void 0&&(Ke.fencedCodeBlockDefaultMode="text/plain"),Ke.xml===void 0&&(Ke.xml=!0),Ke.tokenTypeOverrides===void 0&&(Ke.tokenTypeOverrides={});var Ne={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 Tt in Ne)Ne.hasOwnProperty(Tt)&&Ke.tokenTypeOverrides[Tt]&&(Ne[Tt]=Ke.tokenTypeOverrides[Tt]);var Ct=/^([*\-_])(?:\s*\1){2,}\s*$/,Ve=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Lt=/^\[(x| )\](?=\s)/i,dt=Ke.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,Rt=/^ {0,3}(?:\={1,}|-{2,})\s*$/,De=/^[^#!\[\]*_\\<>` "'(~:]+/,ne=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,ee=/^\s*\[[^\]]+?\]:.*$/,ce=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,se=" ";function he(ot,Ue,Wt){return Ue.f=Ue.inline=Wt,Wt(ot,Ue)}function ve(ot,Ue,Wt){return Ue.f=Ue.block=Wt,Wt(ot,Ue)}function be(ot){return!ot||!/\S/.test(ot.string)}function ke(ot){if(ot.linkTitle=!1,ot.linkHref=!1,ot.linkText=!1,ot.em=!1,ot.strong=!1,ot.strikethrough=!1,ot.quote=0,ot.indentedCode=!1,ot.f==He){var Ue=Ge;if(!Ue){var Wt=ge.innerMode(ut,ot.htmlState);Ue=Wt.mode.name=="xml"&&Wt.state.tagStart===null&&!Wt.state.context&&Wt.state.tokenize.isInText}Ue&&(ot.f=Pt,ot.block=Be,ot.htmlState=null)}return ot.trailingSpace=0,ot.trailingSpaceNewLine=!1,ot.prevLine=ot.thisLine,ot.thisLine={stream:null},null}function Be(ot,Ue){var Wt=ot.column()===Ue.indentation,Ln=be(Ue.prevLine.stream),Fn=Ue.indentedCode,Gt=Ue.prevLine.hr,rn=Ue.list!==!1,An=(Ue.listStack[Ue.listStack.length-1]||0)+3;Ue.indentedCode=!1;var ni=Ue.indentation;if(Ue.indentationDiff===null&&(Ue.indentationDiff=Ue.indentation,rn)){for(Ue.list=null;ni<Ue.listStack[Ue.listStack.length-1];)Ue.listStack.pop(),Ue.listStack.length?Ue.indentation=Ue.listStack[Ue.listStack.length-1]:Ue.list=!1;Ue.list!==!1&&(Ue.indentationDiff=ni-Ue.listStack[Ue.listStack.length-1])}var Sn=!Ln&&!Gt&&!Ue.prevLine.header&&(!rn||!Fn)&&!Ue.prevLine.fencedCodeEnd,Yn=(Ue.list===!1||Gt||Ln)&&Ue.indentation<=An&&ot.match(Ct),It=null;if(Ue.indentationDiff>=4&&(Fn||Ue.prevLine.fencedCodeEnd||Ue.prevLine.header||Ln))return ot.skipToEnd(),Ue.indentedCode=!0,Ne.code;if(ot.eatSpace())return null;if(Wt&&Ue.indentation<=An&&(It=ot.match(dt))&&It[1].length<=6)return Ue.quote=0,Ue.header=It[1].length,Ue.thisLine.header=!0,Ke.highlightFormatting&&(Ue.formatting="header"),Ue.f=Ue.inline,rt(Ue);if(Ue.indentation<=An&&ot.eat(">"))return Ue.quote=Wt?1:Ue.quote+1,Ke.highlightFormatting&&(Ue.formatting="quote"),ot.eatSpace(),rt(Ue);if(!Yn&&!Ue.setext&&Wt&&Ue.indentation<=An&&(It=ot.match(Ve))){var wn=It[1]?"ol":"ul";return Ue.indentation=ni+ot.current().length,Ue.list=!0,Ue.quote=0,Ue.listStack.push(Ue.indentation),Ue.em=!1,Ue.strong=!1,Ue.code=!1,Ue.strikethrough=!1,Ke.taskLists&&ot.match(Lt,!1)&&(Ue.taskList=!0),Ue.f=Ue.inline,Ke.highlightFormatting&&(Ue.formatting=["list","list-"+wn]),rt(Ue)}else{if(Wt&&Ue.indentation<=An&&(It=ot.match(ne,!0)))return Ue.quote=0,Ue.fencedEndRE=new RegExp(It[1]+"+ *$"),Ue.localMode=Ke.fencedCodeBlockHighlighting&&Xe(It[2]||Ke.fencedCodeBlockDefaultMode),Ue.localMode&&(Ue.localState=ge.startState(Ue.localMode)),Ue.f=Ue.block=We,Ke.highlightFormatting&&(Ue.formatting="code-block"),Ue.code=-1,rt(Ue);if(Ue.setext||(!Sn||!rn)&&!Ue.quote&&Ue.list===!1&&!Ue.code&&!Yn&&!ee.test(ot.string)&&(It=ot.lookAhead(1))&&(It=It.match(Rt)))return Ue.setext?(Ue.header=Ue.setext,Ue.setext=0,ot.skipToEnd(),Ke.highlightFormatting&&(Ue.formatting="header")):(Ue.header=It[0].charAt(0)=="="?1:2,Ue.setext=Ue.header),Ue.thisLine.header=!0,Ue.f=Ue.inline,rt(Ue);if(Yn)return ot.skipToEnd(),Ue.hr=!0,Ue.thisLine.hr=!0,Ne.hr;if(ot.peek()==="[")return he(ot,Ue,ht)}return he(ot,Ue,Ue.inline)}function He(ot,Ue){var Wt=ut.token(ot,Ue.htmlState);if(!Ge){var Ln=ge.innerMode(ut,Ue.htmlState);(Ln.mode.name=="xml"&&Ln.state.tagStart===null&&!Ln.state.context&&Ln.state.tokenize.isInText||Ue.md_inside&&ot.current().indexOf(">")>-1)&&(Ue.f=Pt,Ue.block=Be,Ue.htmlState=null)}return Wt}function We(ot,Ue){var Wt=Ue.listStack[Ue.listStack.length-1]||0,Ln=Ue.indentation<Wt,Fn=Wt+3;if(Ue.fencedEndRE&&Ue.indentation<=Fn&&(Ln||ot.match(Ue.fencedEndRE))){Ke.highlightFormatting&&(Ue.formatting="code-block");var Gt;return Ln||(Gt=rt(Ue)),Ue.localMode=Ue.localState=null,Ue.block=Be,Ue.f=Pt,Ue.fencedEndRE=null,Ue.code=0,Ue.thisLine.fencedCodeEnd=!0,Ln?ve(ot,Ue,Ue.block):Gt}else return Ue.localMode?Ue.localMode.token(ot,Ue.localState):(ot.skipToEnd(),Ne.code)}function rt(ot){var Ue=[];if(ot.formatting){Ue.push(Ne.formatting),typeof ot.formatting=="string"&&(ot.formatting=[ot.formatting]);for(var Wt=0;Wt<ot.formatting.length;Wt++)Ue.push(Ne.formatting+"-"+ot.formatting[Wt]),ot.formatting[Wt]==="header"&&Ue.push(Ne.formatting+"-"+ot.formatting[Wt]+"-"+ot.header),ot.formatting[Wt]==="quote"&&(!Ke.maxBlockquoteDepth||Ke.maxBlockquoteDepth>=ot.quote?Ue.push(Ne.formatting+"-"+ot.formatting[Wt]+"-"+ot.quote):Ue.push("error"))}if(ot.taskOpen)return Ue.push("meta"),Ue.length?Ue.join(" "):null;if(ot.taskClosed)return Ue.push("property"),Ue.length?Ue.join(" "):null;if(ot.linkHref?Ue.push(Ne.linkHref,"url"):(ot.strong&&Ue.push(Ne.strong),ot.em&&Ue.push(Ne.em),ot.strikethrough&&Ue.push(Ne.strikethrough),ot.emoji&&Ue.push(Ne.emoji),ot.linkText&&Ue.push(Ne.linkText),ot.code&&Ue.push(Ne.code),ot.image&&Ue.push(Ne.image),ot.imageAltText&&Ue.push(Ne.imageAltText,"link"),ot.imageMarker&&Ue.push(Ne.imageMarker)),ot.header&&Ue.push(Ne.header,Ne.header+"-"+ot.header),ot.quote&&(Ue.push(Ne.quote),!Ke.maxBlockquoteDepth||Ke.maxBlockquoteDepth>=ot.quote?Ue.push(Ne.quote+"-"+ot.quote):Ue.push(Ne.quote+"-"+Ke.maxBlockquoteDepth)),ot.list!==!1){var Ln=(ot.listStack.length-1)%3;Ln?Ln===1?Ue.push(Ne.list2):Ue.push(Ne.list3):Ue.push(Ne.list1)}return ot.trailingSpaceNewLine?Ue.push("trailing-space-new-line"):ot.trailingSpace&&Ue.push("trailing-space-"+(ot.trailingSpace%2?"a":"b")),Ue.length?Ue.join(" "):null}function Qe(ot,Ue){if(ot.match(De,!0))return rt(Ue)}function Pt(ot,Ue){var Wt=Ue.text(ot,Ue);if(typeof Wt!="undefined")return Wt;if(Ue.list)return Ue.list=null,rt(Ue);if(Ue.taskList){var Ln=ot.match(Lt,!0)[1]===" ";return Ln?Ue.taskOpen=!0:Ue.taskClosed=!0,Ke.highlightFormatting&&(Ue.formatting="task"),Ue.taskList=!1,rt(Ue)}if(Ue.taskOpen=!1,Ue.taskClosed=!1,Ue.header&&ot.match(/^#+$/,!0))return Ke.highlightFormatting&&(Ue.formatting="header"),rt(Ue);var Fn=ot.next();if(Ue.linkTitle){Ue.linkTitle=!1;var Gt=Fn;Fn==="("&&(Gt=")"),Gt=(Gt+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var rn="^\\s*(?:[^"+Gt+"\\\\]+|\\\\\\\\|\\\\.)"+Gt;if(ot.match(new RegExp(rn),!0))return Ne.linkHref}if(Fn==="`"){var An=Ue.formatting;Ke.highlightFormatting&&(Ue.formatting="code"),ot.eatWhile("`");var ni=ot.current().length;if(Ue.code==0&&(!Ue.quote||ni==1))return Ue.code=ni,rt(Ue);if(ni==Ue.code){var Sn=rt(Ue);return Ue.code=0,Sn}else return Ue.formatting=An,rt(Ue)}else if(Ue.code)return rt(Ue);if(Fn==="\\"&&(ot.next(),Ke.highlightFormatting)){var Yn=rt(Ue),It=Ne.formatting+"-escape";return Yn?Yn+" "+It:It}if(Fn==="!"&&ot.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Ue.imageMarker=!0,Ue.image=!0,Ke.highlightFormatting&&(Ue.formatting="image"),rt(Ue);if(Fn==="["&&Ue.imageMarker&&ot.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Ue.imageMarker=!1,Ue.imageAltText=!0,Ke.highlightFormatting&&(Ue.formatting="image"),rt(Ue);if(Fn==="]"&&Ue.imageAltText){Ke.highlightFormatting&&(Ue.formatting="image");var Yn=rt(Ue);return Ue.imageAltText=!1,Ue.image=!1,Ue.inline=Ue.f=Et,Yn}if(Fn==="["&&!Ue.image)return Ue.linkText&&ot.match(/^.*?\]/)||(Ue.linkText=!0,Ke.highlightFormatting&&(Ue.formatting="link")),rt(Ue);if(Fn==="]"&&Ue.linkText){Ke.highlightFormatting&&(Ue.formatting="link");var Yn=rt(Ue);return Ue.linkText=!1,Ue.inline=Ue.f=ot.match(/\(.*?\)| ?\[.*?\]/,!1)?Et:Pt,Yn}if(Fn==="<"&&ot.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Ue.f=Ue.inline=Ze,Ke.highlightFormatting&&(Ue.formatting="link");var Yn=rt(Ue);return Yn?Yn+=" ":Yn="",Yn+Ne.linkInline}if(Fn==="<"&&ot.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Ue.f=Ue.inline=Ze,Ke.highlightFormatting&&(Ue.formatting="link");var Yn=rt(Ue);return Yn?Yn+=" ":Yn="",Yn+Ne.linkEmail}if(Ke.xml&&Fn==="<"&&ot.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var wn=ot.string.indexOf(">",ot.pos);if(wn!=-1){var Gn=ot.string.substring(ot.start,wn);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Gn)&&(Ue.md_inside=!0)}return ot.backUp(1),Ue.htmlState=ge.startState(ut),ve(ot,Ue,He)}if(Ke.xml&&Fn==="<"&&ot.match(/^\/\w*?>/))return Ue.md_inside=!1,"tag";if(Fn==="*"||Fn==="_"){for(var ze=1,Ee=ot.pos==1?" ":ot.string.charAt(ot.pos-2);ze<3&&ot.eat(Fn);)ze++;var Pe=ot.peek()||" ",Fe=!/\s/.test(Pe)&&(!ce.test(Pe)||/\s/.test(Ee)||ce.test(Ee)),Ae=!/\s/.test(Ee)&&(!ce.test(Ee)||/\s/.test(Pe)||ce.test(Pe)),ye=null,qe=null;if(ze%2&&(!Ue.em&&Fe&&(Fn==="*"||!Ae||ce.test(Ee))?ye=!0:Ue.em==Fn&&Ae&&(Fn==="*"||!Fe||ce.test(Pe))&&(ye=!1)),ze>1&&(!Ue.strong&&Fe&&(Fn==="*"||!Ae||ce.test(Ee))?qe=!0:Ue.strong==Fn&&Ae&&(Fn==="*"||!Fe||ce.test(Pe))&&(qe=!1)),qe!=null||ye!=null){Ke.highlightFormatting&&(Ue.formatting=ye==null?"strong":qe==null?"em":"strong em"),ye===!0&&(Ue.em=Fn),qe===!0&&(Ue.strong=Fn);var Sn=rt(Ue);return ye===!1&&(Ue.em=!1),qe===!1&&(Ue.strong=!1),Sn}}else if(Fn===" "&&(ot.eat("*")||ot.eat("_"))){if(ot.peek()===" ")return rt(Ue);ot.backUp(1)}if(Ke.strikethrough){if(Fn==="~"&&ot.eatWhile(Fn)){if(Ue.strikethrough){Ke.highlightFormatting&&(Ue.formatting="strikethrough");var Sn=rt(Ue);return Ue.strikethrough=!1,Sn}else if(ot.match(/^[^\s]/,!1))return Ue.strikethrough=!0,Ke.highlightFormatting&&(Ue.formatting="strikethrough"),rt(Ue)}else if(Fn===" "&&ot.match(/^~~/,!0)){if(ot.peek()===" ")return rt(Ue);ot.backUp(2)}}if(Ke.emoji&&Fn===":"&&ot.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Ue.emoji=!0,Ke.highlightFormatting&&(Ue.formatting="emoji");var vt=rt(Ue);return Ue.emoji=!1,vt}return Fn===" "&&(ot.match(/^ +$/,!1)?Ue.trailingSpace++:Ue.trailingSpace&&(Ue.trailingSpaceNewLine=!0)),rt(Ue)}function Ze(ot,Ue){var Wt=ot.next();if(Wt===">"){Ue.f=Ue.inline=Pt,Ke.highlightFormatting&&(Ue.formatting="link");var Ln=rt(Ue);return Ln?Ln+=" ":Ln="",Ln+Ne.linkInline}return ot.match(/^[^>]+/,!0),Ne.linkInline}function Et(ot,Ue){if(ot.eatSpace())return null;var Wt=ot.next();return Wt==="("||Wt==="["?(Ue.f=Ue.inline=Dt(Wt==="("?")":"]"),Ke.highlightFormatting&&(Ue.formatting="link-string"),Ue.linkHref=!0,rt(Ue)):"error"}var it={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Dt(ot){return function(Ue,Wt){var Ln=Ue.next();if(Ln===ot){Wt.f=Wt.inline=Pt,Ke.highlightFormatting&&(Wt.formatting="link-string");var Fn=rt(Wt);return Wt.linkHref=!1,Fn}return Ue.match(it[ot]),Wt.linkHref=!0,rt(Wt)}}function ht(ot,Ue){return ot.match(/^([^\]\\]|\\.)*\]:/,!1)?(Ue.f=Ht,ot.next(),Ke.highlightFormatting&&(Ue.formatting="link"),Ue.linkText=!0,rt(Ue)):he(ot,Ue,Pt)}function Ht(ot,Ue){if(ot.match(/^\]:/,!0)){Ue.f=Ue.inline=_t,Ke.highlightFormatting&&(Ue.formatting="link");var Wt=rt(Ue);return Ue.linkText=!1,Wt}return ot.match(/^([^\]\\]|\\.)+/,!0),Ne.linkText}function _t(ot,Ue){return ot.eatSpace()?null:(ot.match(/^[^\s]+/,!0),ot.peek()===void 0?Ue.linkTitle=!0:ot.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Ue.f=Ue.inline=Pt,Ne.linkHref+" url")}var Vt={startState:function(){return{f:Be,prevLine:{stream:null},thisLine:{stream:null},block:Be,htmlState:null,indentation:0,inline:Pt,text:Qe,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(ot){return{f:ot.f,prevLine:ot.prevLine,thisLine:ot.thisLine,block:ot.block,htmlState:ot.htmlState&&ge.copyState(ut,ot.htmlState),indentation:ot.indentation,localMode:ot.localMode,localState:ot.localMode?ge.copyState(ot.localMode,ot.localState):null,inline:ot.inline,text:ot.text,formatting:!1,linkText:ot.linkText,linkTitle:ot.linkTitle,linkHref:ot.linkHref,code:ot.code,em:ot.em,strong:ot.strong,strikethrough:ot.strikethrough,emoji:ot.emoji,header:ot.header,setext:ot.setext,hr:ot.hr,taskList:ot.taskList,list:ot.list,listStack:ot.listStack.slice(0),quote:ot.quote,indentedCode:ot.indentedCode,trailingSpace:ot.trailingSpace,trailingSpaceNewLine:ot.trailingSpaceNewLine,md_inside:ot.md_inside,fencedEndRE:ot.fencedEndRE}},token:function(ot,Ue){if(Ue.formatting=!1,ot!=Ue.thisLine.stream){if(Ue.header=0,Ue.hr=!1,ot.match(/^\s*$/,!0))return ke(Ue),null;if(Ue.prevLine=Ue.thisLine,Ue.thisLine={stream:ot},Ue.taskList=!1,Ue.trailingSpace=0,Ue.trailingSpaceNewLine=!1,!Ue.localState&&(Ue.f=Ue.block,Ue.f!=He)){var Wt=ot.match(/^\s*/,!0)[0].replace(/\t/g,se).length;if(Ue.indentation=Wt,Ue.indentationDiff=null,Wt>0)return null}}return Ue.f(ot,Ue)},innerMode:function(ot){return ot.block==He?{state:ot.htmlState,mode:ut}:ot.localState?{state:ot.localState,mode:ot.localMode}:{state:ot,mode:Vt}},indent:function(ot,Ue,Wt){return ot.block==He&&ut.indent?ut.indent(ot.htmlState,Ue,Wt):ot.localState&&ot.localMode.indent?ot.localMode.indent(ot.localState,Ue,Wt):ge.Pass},blankLine:ke,getType:rt,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Vt},"xml"),ge.defineMIME("text/markdown","markdown"),ge.defineMIME("text/x-markdown","markdown")})},98101:function(Vn,xn,pe){(function(ge){ge(pe(89780))})(function(ge){"use strict";ge.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 Oe=0;Oe<ge.modeInfo.length;Oe++){var Ke=ge.modeInfo[Oe];Ke.mimes&&(Ke.mime=Ke.mimes[0])}ge.findModeByMIME=function(ut){ut=ut.toLowerCase();for(var Ge=0;Ge<ge.modeInfo.length;Ge++){var Xe=ge.modeInfo[Ge];if(Xe.mime==ut)return Xe;if(Xe.mimes){for(var Ne=0;Ne<Xe.mimes.length;Ne++)if(Xe.mimes[Ne]==ut)return Xe}}if(/\+xml$/.test(ut))return ge.findModeByMIME("application/xml");if(/\+json$/.test(ut))return ge.findModeByMIME("application/json")},ge.findModeByExtension=function(ut){ut=ut.toLowerCase();for(var Ge=0;Ge<ge.modeInfo.length;Ge++){var Xe=ge.modeInfo[Ge];if(Xe.ext){for(var Ne=0;Ne<Xe.ext.length;Ne++)if(Xe.ext[Ne]==ut)return Xe}}},ge.findModeByFileName=function(ut){for(var Ge=0;Ge<ge.modeInfo.length;Ge++){var Xe=ge.modeInfo[Ge];if(Xe.file&&Xe.file.test(ut))return Xe}var Ne=ut.lastIndexOf("."),Tt=Ne>-1&&ut.substring(Ne+1,ut.length);if(Tt)return ge.findModeByExtension(Tt)},ge.findModeByName=function(ut){ut=ut.toLowerCase();for(var Ge=0;Ge<ge.modeInfo.length;Ge++){var Xe=ge.modeInfo[Ge];if(Xe.name.toLowerCase()==ut)return Xe;if(Xe.alias){for(var Ne=0;Ne<Xe.alias.length;Ne++)if(Xe.alias[Ne].toLowerCase()==ut)return Xe}}}})},67549:function(Vn,xn,pe){(function(ge){ge(pe(89780))})(function(ge){"use strict";ge.defineMode("stex",function(Oe,Ke){"use strict";function ut(De,ne){De.cmdState.push(ne)}function Ge(De){return De.cmdState.length>0?De.cmdState[De.cmdState.length-1]:null}function Xe(De){var ne=De.cmdState.pop();ne&&ne.closeBracket()}function Ne(De){for(var ne=De.cmdState,ee=ne.length-1;ee>=0;ee--){var ce=ne[ee];if(ce.name!="DEFAULT")return ce}return{styleIdentifier:function(){return null}}}function Tt(De,ne,ee){return function(){this.name=De,this.bracketNo=0,this.style=ne,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 Ct={};Ct.importmodule=Tt("importmodule","tag",["string","builtin"]),Ct.documentclass=Tt("documentclass","tag",["","atom"]),Ct.usepackage=Tt("usepackage","tag",["atom"]),Ct.begin=Tt("begin","tag",["atom"]),Ct.end=Tt("end","tag",["atom"]),Ct.label=Tt("label","tag",["atom"]),Ct.ref=Tt("ref","tag",["atom"]),Ct.eqref=Tt("eqref","tag",["atom"]),Ct.cite=Tt("cite","tag",["atom"]),Ct.bibitem=Tt("bibitem","tag",["atom"]),Ct.Bibitem=Tt("Bibitem","tag",["atom"]),Ct.RBibitem=Tt("RBibitem","tag",["atom"]),Ct.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function Ve(De,ne){De.f=ne}function Lt(De,ne){var ee;if(De.match(/^\\[a-zA-Z@]+/)){var ce=De.current().slice(1);return ee=Ct.hasOwnProperty(ce)?Ct[ce]:Ct.DEFAULT,ee=new ee,ut(ne,ee),Ve(ne,Rt),ee.style}if(De.match(/^\\[$&%#{}_]/)||De.match(/^\\[,;!\/\\]/))return"tag";if(De.match("\\["))return Ve(ne,function(he,ve){return dt(he,ve,"\\]")}),"keyword";if(De.match("\\("))return Ve(ne,function(he,ve){return dt(he,ve,"\\)")}),"keyword";if(De.match("$$"))return Ve(ne,function(he,ve){return dt(he,ve,"$$")}),"keyword";if(De.match("$"))return Ve(ne,function(he,ve){return dt(he,ve,"$")}),"keyword";var se=De.next();if(se=="%")return De.skipToEnd(),"comment";if(se=="}"||se=="]"){if(ee=Ge(ne),ee)ee.closeBracket(se),Ve(ne,Rt);else return"error";return"bracket"}else return se=="{"||se=="["?(ee=Ct.DEFAULT,ee=new ee,ut(ne,ee),"bracket"):/\d/.test(se)?(De.eatWhile(/[\w.%]/),"atom"):(De.eatWhile(/[\w\-_]/),ee=Ne(ne),ee.name=="begin"&&(ee.argument=De.current()),ee.styleIdentifier())}function dt(De,ne,ee){if(De.eatSpace())return null;if(ee&&De.match(ee))return Ve(ne,Lt),"keyword";if(De.match(/^\\[a-zA-Z@]+/))return"tag";if(De.match(/^[a-zA-Z]+/))return"variable-2";if(De.match(/^\\[$&%#{}_]/)||De.match(/^\\[,;!\/]/)||De.match(/^[\^_&]/))return"tag";if(De.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(De.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ce=De.next();return ce=="{"||ce=="}"||ce=="["||ce=="]"||ce=="("||ce==")"?"bracket":ce=="%"?(De.skipToEnd(),"comment"):"error"}function Rt(De,ne){var ee=De.peek(),ce;return ee=="{"||ee=="["?(ce=Ge(ne),ce.openBracket(ee),De.eat(ee),Ve(ne,Lt),"bracket"):/[ \t\r]/.test(ee)?(De.eat(ee),null):(Ve(ne,Lt),Xe(ne),Lt(De,ne))}return{startState:function(){var De=Ke.inMathMode?function(ne,ee){return dt(ne,ee)}:Lt;return{cmdState:[],f:De}},copyState:function(De){return{cmdState:De.cmdState.slice(),f:De.f}},token:function(De,ne){return ne.f(De,ne)},blankLine:function(De){De.f=Lt,De.cmdState.length=0},lineComment:"%"}}),ge.defineMIME("text/x-stex","stex"),ge.defineMIME("text/x-latex","stex")})},15525:function(Vn,xn,pe){(function(ge){ge(pe(89780))})(function(ge){"use strict";var Oe={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},Ke={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ge.defineMode("xml",function(ut,Ge){var Xe=ut.indentUnit,Ne={},Tt=Ge.htmlMode?Oe:Ke;for(var Ct in Tt)Ne[Ct]=Tt[Ct];for(var Ct in Ge)Ne[Ct]=Ge[Ct];var Ve,Lt;function dt(Ze,Et){function it(Ht){return Et.tokenize=Ht,Ht(Ze,Et)}var Dt=Ze.next();if(Dt=="<")return Ze.eat("!")?Ze.eat("[")?Ze.match("CDATA[")?it(ne("atom","]]>")):null:Ze.match("--")?it(ne("comment","-->")):Ze.match("DOCTYPE",!0,!0)?(Ze.eatWhile(/[\w\._\-]/),it(ee(1))):null:Ze.eat("?")?(Ze.eatWhile(/[\w\._\-]/),Et.tokenize=ne("meta","?>"),"meta"):(Ve=Ze.eat("/")?"closeTag":"openTag",Et.tokenize=Rt,"tag bracket");if(Dt=="&"){var ht;return Ze.eat("#")?Ze.eat("x")?ht=Ze.eatWhile(/[a-fA-F\d]/)&&Ze.eat(";"):ht=Ze.eatWhile(/[\d]/)&&Ze.eat(";"):ht=Ze.eatWhile(/[\w\.\-:]/)&&Ze.eat(";"),ht?"atom":"error"}else return Ze.eatWhile(/[^&<]/),null}dt.isInText=!0;function Rt(Ze,Et){var it=Ze.next();if(it==">"||it=="/"&&Ze.eat(">"))return Et.tokenize=dt,Ve=it==">"?"endTag":"selfcloseTag","tag bracket";if(it=="=")return Ve="equals",null;if(it=="<"){Et.tokenize=dt,Et.state=ve,Et.tagName=Et.tagStart=null;var Dt=Et.tokenize(Ze,Et);return Dt?Dt+" tag error":"tag error"}else return/[\'\"]/.test(it)?(Et.tokenize=De(it),Et.stringStartCol=Ze.column(),Et.tokenize(Ze,Et)):(Ze.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function De(Ze){var Et=function(it,Dt){for(;!it.eol();)if(it.next()==Ze){Dt.tokenize=Rt;break}return"string"};return Et.isInAttribute=!0,Et}function ne(Ze,Et){return function(it,Dt){for(;!it.eol();){if(it.match(Et)){Dt.tokenize=dt;break}it.next()}return Ze}}function ee(Ze){return function(Et,it){for(var Dt;(Dt=Et.next())!=null;){if(Dt=="<")return it.tokenize=ee(Ze+1),it.tokenize(Et,it);if(Dt==">")if(Ze==1){it.tokenize=dt;break}else return it.tokenize=ee(Ze-1),it.tokenize(Et,it)}return"meta"}}function ce(Ze,Et,it){this.prev=Ze.context,this.tagName=Et,this.indent=Ze.indented,this.startOfLine=it,(Ne.doNotIndent.hasOwnProperty(Et)||Ze.context&&Ze.context.noIndent)&&(this.noIndent=!0)}function se(Ze){Ze.context&&(Ze.context=Ze.context.prev)}function he(Ze,Et){for(var it;;){if(!Ze.context||(it=Ze.context.tagName,!Ne.contextGrabbers.hasOwnProperty(it)||!Ne.contextGrabbers[it].hasOwnProperty(Et)))return;se(Ze)}}function ve(Ze,Et,it){return Ze=="openTag"?(it.tagStart=Et.column(),be):Ze=="closeTag"?ke:ve}function be(Ze,Et,it){return Ze=="word"?(it.tagName=Et.current(),Lt="tag",We):Ne.allowMissingTagName&&Ze=="endTag"?(Lt="tag bracket",We(Ze,Et,it)):(Lt="error",be)}function ke(Ze,Et,it){if(Ze=="word"){var Dt=Et.current();return it.context&&it.context.tagName!=Dt&&Ne.implicitlyClosed.hasOwnProperty(it.context.tagName)&&se(it),it.context&&it.context.tagName==Dt||Ne.matchClosing===!1?(Lt="tag",Be):(Lt="tag error",He)}else return Ne.allowMissingTagName&&Ze=="endTag"?(Lt="tag bracket",Be(Ze,Et,it)):(Lt="error",He)}function Be(Ze,Et,it){return Ze!="endTag"?(Lt="error",Be):(se(it),ve)}function He(Ze,Et,it){return Lt="error",Be(Ze,Et,it)}function We(Ze,Et,it){if(Ze=="word")return Lt="attribute",rt;if(Ze=="endTag"||Ze=="selfcloseTag"){var Dt=it.tagName,ht=it.tagStart;return it.tagName=it.tagStart=null,Ze=="selfcloseTag"||Ne.autoSelfClosers.hasOwnProperty(Dt)?he(it,Dt):(he(it,Dt),it.context=new ce(it,Dt,ht==it.indented)),ve}return Lt="error",We}function rt(Ze,Et,it){return Ze=="equals"?Qe:(Ne.allowMissing||(Lt="error"),We(Ze,Et,it))}function Qe(Ze,Et,it){return Ze=="string"?Pt:Ze=="word"&&Ne.allowUnquoted?(Lt="string",We):(Lt="error",We(Ze,Et,it))}function Pt(Ze,Et,it){return Ze=="string"?Pt:We(Ze,Et,it)}return{startState:function(Ze){var Et={tokenize:dt,state:ve,indented:Ze||0,tagName:null,tagStart:null,context:null};return Ze!=null&&(Et.baseIndent=Ze),Et},token:function(Ze,Et){if(!Et.tagName&&Ze.sol()&&(Et.indented=Ze.indentation()),Ze.eatSpace())return null;Ve=null;var it=Et.tokenize(Ze,Et);return(it||Ve)&&it!="comment"&&(Lt=null,Et.state=Et.state(Ve||it,Ze,Et),Lt&&(it=Lt=="error"?it+" error":Lt)),it},indent:function(Ze,Et,it){var Dt=Ze.context;if(Ze.tokenize.isInAttribute)return Ze.tagStart==Ze.indented?Ze.stringStartCol+1:Ze.indented+Xe;if(Dt&&Dt.noIndent)return ge.Pass;if(Ze.tokenize!=Rt&&Ze.tokenize!=dt)return it?it.match(/^(\s*)/)[0].length:0;if(Ze.tagName)return Ne.multilineTagIndentPastTag!==!1?Ze.tagStart+Ze.tagName.length+2:Ze.tagStart+Xe*(Ne.multilineTagIndentFactor||1);if(Ne.alignCDATA&&/<!\[CDATA\[/.test(Et))return 0;var ht=Et&&/^<(\/)?([\w_:\.-]*)/.exec(Et);if(ht&&ht[1])for(;Dt;)if(Dt.tagName==ht[2]){Dt=Dt.prev;break}else if(Ne.implicitlyClosed.hasOwnProperty(Dt.tagName))Dt=Dt.prev;else break;else if(ht)for(;Dt;){var Ht=Ne.contextGrabbers[Dt.tagName];if(Ht&&Ht.hasOwnProperty(ht[2]))Dt=Dt.prev;else break}for(;Dt&&Dt.prev&&!Dt.startOfLine;)Dt=Dt.prev;return Dt?Dt.indent+Xe:Ze.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Ne.htmlMode?"html":"xml",helperType:Ne.htmlMode?"html":"xml",skipAttribute:function(Ze){Ze.state==Qe&&(Ze.state=We)},xmlCurrentTag:function(Ze){return Ze.tagName?{name:Ze.tagName,close:Ze.type=="closeTag"}:null},xmlCurrentContext:function(Ze){for(var Et=[],it=Ze.context;it;it=it.prev)it.tagName&&Et.push(it.tagName);return Et.reverse()}}}),ge.defineMIME("text/xml","xml"),ge.defineMIME("application/xml","xml"),ge.mimeModes.hasOwnProperty("text/html")||ge.defineMIME("text/html",{name:"xml",htmlMode:!0})})},12378:function(Vn,xn,pe){"use strict";pe.d(xn,{$u:function(){return Ct},BD:function(){return ze},E9:function(){return Tt},FF:function(){return wr},FJ:function(){return ve},Hn:function(){return he},KX:function(){return ke},NB:function(){return xt},S0:function(){return It},UL:function(){return Ve},Vk:function(){return se},Vm:function(){return at},YI:function(){return wn},ZA:function(){return Ke},Zt:function(){return Lt},al:function(){return ye},bn:function(){return Ae},bx:function(){return Ee},g2:function(){return Gn},h1:function(){return Qe},hD:function(){return Pn},l4:function(){return Xe},rU:function(){return yt},s_:function(){return Pe},uz:function(){return Ye},z6:function(){return dt}}),Vn=pe.hmd(Vn),function(){var Le;function Ei(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Ri(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:Ei(a)}}function nn(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var di=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},yi;if(typeof Object.setPrototypeOf=="function")yi=Object.setPrototypeOf;else{var Li;e:{var Tn={a:!0},Un={};try{Un.__proto__=Tn,Li=Un.a;break e}catch(a){}Li=!1}yi=Li?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var kt=yi;function $t(a,y){if(a.prototype=di(y.prototype),a.prototype.constructor=a,kt)kt(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 Je=typeof pe.g!="undefined"&&pe.g!=null?pe.g:self,qt=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},vn=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function Ft(a,y){if(y){var x=Je;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&&vn(x,a,{writable:!0,value:y})}}Ft("Object.assign",function(a){return a||qt}),Ft("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 st=typeof globalThis=="object"&&globalThis||typeof pe.g=="object"&&pe.g.global===pe.g&&pe.g||typeof self=="object"&&self.self===self&&self||{};st.requestAnimationFrame===void 0&&(st.setImmediate===void 0?st.requestAnimationFrame=function(a){st.setTimeout(a,0)}:st.requestAnimationFrame=st.setImmediate);function on(){}function En(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&st.clearTimeout(x),x=Dn(function(){x=-1,a.apply(b,E)},y)}}function Dn(a,y){return st.setTimeout(a,y)}function Jn(a){return st.document.createElement(a)}function St(a){throw Error(a)}function Nn(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),St(a)}function qn(a,y,x,b){x=x===null?"*":typeof x=="string"?x:typeof x=="function"&&typeof x.className=="string"?x.className:"",b!==void 0&&(x+="."+b),St(x+" is not in the range "+y+": "+a)}function Si(a){st.console&&st.console.log(a)}function en(a){return typeof a=="object"&&a!==null}function Cn(a){return Array.isArray(a)||st.NodeList&&a instanceof st.NodeList||st.HTMLCollection&&a instanceof st.HTMLCollection}function At(a){return Array.prototype.slice.call(a)}function yn(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):St("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function pn(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):St("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function mn(){var a=Wi.pop();return a===void 0?[]:a}function Wn(a){a.length=0,Wi.push(a)}function Hn(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(en(a)&&a.constructor)return Hn(a.constructor);return typeof a}function Qn(a){var y=a;return en(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 ii(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 ji(a,y,x){Object.defineProperty(fa.prototype,a,{get:y,set:x})}function cn(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 z="",te=0;te<a.length;te++)x=(x+1)%256,b=(b+y[x])%256,E=y[x],y[x]=y[b],y[b]=E,z+=String.fromCharCode(a.charCodeAt(te)^y[(y[x]+y[b])%256]);return z.indexOf("GoJS 2.1 evaluation")>-1||z.indexOf("\xA9 1998-2021 Northwoods Software")>-1||z.indexOf("Not for distribution or production use")>-1||z.indexOf("gojs.net")>-1?"":z}var Yi=st.navigator!==void 0&&0<st.navigator.userAgent.indexOf("Trident/7"),$i=st.navigator!==void 0&&st.navigator.platform!==void 0&&st.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,Wi=[];Object.freeze([]),on.className="Util",on.Dx="32ab5ff3b26f42dc0ed90f21472913b5",on.adym="gojs.net",on.vfo="28e645fdb266",on.className="Util";function ln(a,y,x){Or(this),this.j=a,this.xa=y,this.o=x}ln.prototype.toString=function(){return"EnumValue."+this.xa};function oi(a,y){return y==null||y===""?null:a[y]}Je.Object.defineProperties(ln.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),ln.className="EnumValue";function Bi(){this.ew=[]}Bi.prototype.toString=function(){return this.ew.join("")},Bi.prototype.add=function(a){a!==""&&this.ew.push(a)},Bi.className="StringBuilder";function Gi(){}Gi.className="PropertyCollection";var Ti={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){st.console&&st.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 z=Object.getOwnPropertyDescriptor(b.prototype,y.Zl[E.Tj]);z.get!==void 0&&z.set===void 0&&Object.defineProperty(b.prototype,y.Zl[E.Tj],{set:function(te,re){return function(){throw Error("Property "+te.Zl[re.Tj]+" of "+te.x+" is read-only.")}}(y,E)})}}}y={Zl:y.Zl,x:y.x}}}};function Qi(){}Qi.prototype.reset=function(){},Qi.prototype.next=function(){return!1},Qi.prototype.Ad=function(){return!1},Qi.prototype.first=function(){return null},Qi.prototype.any=function(){return!1},Qi.prototype.all=function(){return!0},Qi.prototype.each=function(){return this},Qi.prototype.map=function(){return this},Qi.prototype.filter=function(){return this},Qi.prototype.de=function(){},Qi.prototype.toString=function(){return"EmptyIterator"},Je.Object.defineProperties(Qi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Qi.prototype.first=Qi.prototype.first,Qi.prototype.hasNext=Qi.prototype.Ad,Qi.prototype.next=Qi.prototype.next,Qi.prototype.reset=Qi.prototype.reset;var gr=null;Qi.className="EmptyIterator",gr=new Qi;function hr(a){this.key=-1,this.value=a}hr.prototype.reset=function(){this.key=-1},hr.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},hr.prototype.Ad=function(){return this.next()},hr.prototype.first=function(){return this.key=0,this.value},hr.prototype.any=function(a){return this.key=-1,a(this.value)},hr.prototype.all=function(a){return this.key=-1,a(this.value)},hr.prototype.each=function(a){return this.key=-1,a(this.value),this},hr.prototype.map=function(a){return new hr(a(this.value))},hr.prototype.filter=function(a){return a(this.value)?new hr(this.value):gr},hr.prototype.de=function(){this.value=null},hr.prototype.toString=function(){return"SingletonIterator("+this.value+")"},Je.Object.defineProperties(hr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),hr.prototype.first=hr.prototype.first,hr.prototype.hasNext=hr.prototype.Ad,hr.prototype.next=hr.prototype.next,hr.prototype.reset=hr.prototype.reset,hr.className="SingletonIterator";function Ki(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}Ki.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},Ki.prototype.next=function(){var a=this.Bb;if(a.Ja!==this.qa&&0>this.key)return!1;a=a.s;var y=a.length,x=++this.Za,b=this.qf;if(b!==null)for(;x<y;){var E=a[x];if(b(E))return this.key=this.Za=x,this.value=E,!0;x++}else{if(x<y)return this.key=x,this.value=a[x],!0;this.de()}return!1},Ki.prototype.Ad=function(){return this.next()},Ki.prototype.first=function(){var a=this.Bb;this.qa=a.Ja,this.Za=0,a=a.s;var y=a.length,x=this.qf;if(x!==null){for(var b=0;b<y;){var E=a[b];if(x(E))return this.key=this.Za=b,this.value=E;b++}return null}return 0<y?(a=a[0],this.key=0,this.value=a):null},Ki.prototype.any=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var z=y[E];if((b===null||b(z))&&a(z))return!0}return!1},Ki.prototype.all=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var z=y[E];if((b===null||b(z))&&!a(z))return!1}return!0},Ki.prototype.each=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var z=y[E];(b===null||b(z))&&a(z)}return this},Ki.prototype.map=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var b=y.length,E=this.qf,z=0;z<b;z++){var te=y[z];(E===null||E(te))&&x.push(a(te))}return a=new kn,a.s=x,a.xb(),a.iterator},Ki.prototype.filter=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var b=y.length,E=this.qf,z=0;z<b;z++){var te=y[z];(E===null||E(te))&&a(te)&&x.push(te)}return a=new kn,a.s=x,a.xb(),a.iterator},Ki.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},Ki.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},Je.Object.defineProperties(Ki.prototype,{iterator:{get:function(){return this}},predicate:{get:function(){return this.qf},set:function(a){this.qf=a}},count:{get:function(){var a=this.qf;if(a!==null){for(var y=0,x=this.Bb.s,b=x.length,E=0;E<b;E++)a(x[E])&&y++;return y}return this.Bb.s.length}}}),Ki.prototype.first=Ki.prototype.first,Ki.prototype.hasNext=Ki.prototype.Ad,Ki.prototype.next=Ki.prototype.next,Ki.prototype.reset=Ki.prototype.reset,Ki.className="ListIterator";function Sr(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}Sr.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},Sr.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)},Sr.prototype.Ad=function(){return this.next()},Sr.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},Sr.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},Sr.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},Sr.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},Sr.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 kn,a.s=x,a.xb(),a.iterator},Sr.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 kn,a.s=x,a.xb(),a.iterator},Sr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},Sr.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},Je.Object.defineProperties(Sr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),Sr.prototype.first=Sr.prototype.first,Sr.prototype.hasNext=Sr.prototype.Ad,Sr.prototype.next=Sr.prototype.next,Sr.prototype.reset=Sr.prototype.reset,Sr.className="ListIteratorBackwards";function kn(a){Or(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&St("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Le=kn.prototype,Le.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Le.freeze=function(){return this._isFrozen=!0,this},Le.ka=function(){return this._isFrozen=!1,this},Le.toString=function(){return"List()#"+br(this)},Le.add=function(a){return a===null?this:(this._isFrozen&&Nn(this,a),this.s.push(a),this.xb(),this)},Le.push=function(a){this.add(a)},Le.addAll=function(a){if(a===null)return this;this._isFrozen&&Nn(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},Le.clear=function(){this._isFrozen&&Nn(this),this.s.length=0,this.xb()},Le.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},Le.has=function(a){return this.contains(a)},Le.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},Le.M=function(a){var y=this.s;return(0>a||a>=y.length)&&qn(a,"0 <= i < length",kn,"elt:i"),y[a]},Le.get=function(a){return this.M(a)},Le.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&qn(a,"0 <= i < length",kn,"setElt:i"),this._isFrozen&&Nn(this,a),x[a]=y},Le.set=function(a,y){this.cd(a,y)},Le.first=function(){var a=this.s;return a.length===0?null:a[0]},Le.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},Le.pop=function(){this._isFrozen&&Nn(this);var a=this.s;return 0<a.length?a.pop():null},kn.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},kn.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},kn.prototype.each=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)a(y[b]);return this},kn.prototype.map=function(a){for(var y=new kn,x=[],b=this.s,E=b.length,z=0;z<E;z++)x.push(a(b[z]));return y.s=x,y.xb(),y},kn.prototype.filter=function(a){for(var y=new kn,x=[],b=this.s,E=b.length,z=0;z<E;z++){var te=b[z];a(te)&&x.push(te)}return y.s=x,y.xb(),y},Le=kn.prototype,Le.Gb=function(a,y){0>a&&qn(a,">= 0",kn,"insertAt:i"),this._isFrozen&&Nn(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},Le.remove=function(a){if(a===null)return!1;this._isFrozen&&Nn(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)},Le.delete=function(a){return this.remove(a)},Le.mb=function(a){var y=this.s;(0>a||a>=y.length)&&qn(a,"0 <= i < length",kn,"removeAt:i"),this._isFrozen&&Nn(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},Le.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&&Nn(this);for(var E=a,z=y+1;z<b;)x[E++]=x[z++];return x.length=b-(y-a+1),this.xb(),this},kn.prototype.copy=function(){var a=new kn,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},Le=kn.prototype,Le.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),b=0;b<y;b++)x[b]=a[b];return x},Le.Iv=function(){for(var a=new _n,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},Le.sort=function(a){return this._isFrozen&&Nn(this),this.s.sort(a),this.xb(),this},Le.zi=function(a,y,x){var b=this.s,E=b.length;y===void 0&&(y=0),x===void 0&&(x=E),this._isFrozen&&Nn(this);var z=x-y;if(1>=z)return this;if((0>y||y>=E-1)&&qn(y,"0 <= from < length",kn,"sortRange:from"),z===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},Le.reverse=function(){return this._isFrozen&&Nn(this),this.s.reverse(),this.xb(),this},Je.Object.defineProperties(kn.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 gr;var a=this.Sa;return a!==null?(a.reset(),a):new Ki(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return gr;var a=this.Hg;return a!==null?(a.reset(),a):new Sr(this)}}}),kn.prototype.reverse=kn.prototype.reverse,kn.prototype.sortRange=kn.prototype.zi,kn.prototype.sort=kn.prototype.sort,kn.prototype.toSet=kn.prototype.Iv,kn.prototype.toArray=kn.prototype.Fa,kn.prototype.removeRange=kn.prototype.removeRange,kn.prototype.removeAt=kn.prototype.mb,kn.prototype.delete=kn.prototype.delete,kn.prototype.remove=kn.prototype.remove,kn.prototype.insertAt=kn.prototype.Gb,kn.prototype.pop=kn.prototype.pop,kn.prototype.last=kn.prototype.jc,kn.prototype.first=kn.prototype.first,kn.prototype.set=kn.prototype.set,kn.prototype.setElt=kn.prototype.cd,kn.prototype.get=kn.prototype.get,kn.prototype.elt=kn.prototype.M,kn.prototype.indexOf=kn.prototype.indexOf,kn.prototype.has=kn.prototype.has,kn.prototype.contains=kn.prototype.contains,kn.prototype.clear=kn.prototype.clear,kn.prototype.addAll=kn.prototype.addAll,kn.prototype.push=kn.prototype.push,kn.prototype.add=kn.prototype.add,kn.prototype.thaw=kn.prototype.ka,kn.prototype.freeze=kn.prototype.freeze,kn.className="List";function Br(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Br.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Br.prototype.next=function(){var a=this.eg;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=y.value,this.key=y.key,!0):(this.de(),!1)},Br.prototype.Ad=function(){return this.next()},Br.prototype.first=function(){var a=this.eg;if(this.qa=a.Ja,a=a.ea,a!==null){this.sa=a;var y=a.value;return this.key=a.key,this.value=y}return null},Br.prototype.any=function(a){var y=this.eg;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Br.prototype.all=function(a){var y=this.eg;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Br.prototype.each=function(a){var y=this.eg;for(this.sa=y.Sa=null,y=y.ea;y!==null;)a(y.value),y=y.va;return this},Br.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new kn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Br.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new kn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Br.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Br.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},Je.Object.defineProperties(Br.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Br.prototype.first=Br.prototype.first,Br.prototype.hasNext=Br.prototype.Ad,Br.prototype.next=Br.prototype.next,Br.prototype.reset=Br.prototype.reset,Br.className="SetIterator";function _n(a){Or(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&St("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Le=_n.prototype,Le.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Le.freeze=function(){return this._isFrozen=!0,this},Le.ka=function(){return this._isFrozen=!1,this},Le.toString=function(){return"Set()#"+br(this)},Le.add=function(a){if(a===null)return this;this._isFrozen&&Nn(this,a);var y=a;return en(a)&&(y=no(a)),this.Tb[y]===void 0&&(this.Sb++,a=new qi(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},Le.addAll=function(a){if(a===null)return this;if(this._isFrozen&&Nn(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},Le.contains=function(a){if(a===null)return!1;var y=a;return en(a)&&(y=br(a),y===void 0)?!1:this.Tb[y]!==void 0},Le.has=function(a){return this.contains(a)},Le.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},Le.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},Le.first=function(){var a=this.ea;return a===null?null:a.value},_n.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},_n.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},_n.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},_n.prototype.map=function(a){for(var y=new _n,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},_n.prototype.filter=function(a){for(var y=new _n,x=this.ea;x!==null;){var b=x.value;a(b)&&y.add(b),x=x.va}return y},Le=_n.prototype,Le.remove=function(a){if(a===null)return!1;this._isFrozen&&Nn(this,a);var y=a;if(en(a)&&(y=br(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},Le.delete=function(a){return this.remove(a)},Le.hp=function(a){if(a===null)return this;if(this._isFrozen&&Nn(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},Le.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&Nn(this);var y=new _n;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},Le.clear=function(){this._isFrozen&&Nn(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},_n.prototype.copy=function(){var a=new _n,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},_n.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},_n.prototype.Hv=function(){var a=new kn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function Or(a){a.__gohashid=mo++}function no(a){var y=a.__gohashid;return y===void 0&&(y=mo++,a.__gohashid=y),y}function br(a){return a.__gohashid}Je.Object.defineProperties(_n.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return gr;var a=this.Sa;return a!==null?(a.reset(),a):new Br(this)}}}),_n.prototype.toList=_n.prototype.Hv,_n.prototype.toArray=_n.prototype.Fa,_n.prototype.clear=_n.prototype.clear,_n.prototype.retainAll=_n.prototype.pA,_n.prototype.removeAll=_n.prototype.hp,_n.prototype.delete=_n.prototype.delete,_n.prototype.remove=_n.prototype.remove,_n.prototype.first=_n.prototype.first,_n.prototype.containsAny=_n.prototype.Ty,_n.prototype.containsAll=_n.prototype.Sy,_n.prototype.has=_n.prototype.has,_n.prototype.contains=_n.prototype.contains,_n.prototype.addAll=_n.prototype.addAll,_n.prototype.add=_n.prototype.add,_n.prototype.thaw=_n.prototype.ka,_n.prototype.freeze=_n.prototype.freeze;var mo=1;_n.className="Set",_n.uniqueHash=Or,_n.hashIdUnique=no,_n.hashId=br;function Jr(a){this.ma=a,this.qa=a.Ja,this.sa=null}Jr.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},Jr.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)},Jr.prototype.Ad=function(){return this.next()},Jr.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},Jr.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},Jr.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},Jr.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},Jr.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new kn;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},Jr.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new kn;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},Jr.prototype.de=function(){this.value=this.key=null,this.qa=-1},Jr.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},Je.Object.defineProperties(Jr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Jr.prototype.first=Jr.prototype.first,Jr.prototype.hasNext=Jr.prototype.Ad,Jr.prototype.next=Jr.prototype.next,Jr.prototype.reset=Jr.prototype.reset,Jr.className="MapKeySetIterator";function ur(a){_n.call(this),Or(this),this._isFrozen=!0,this.ma=a}$t(ur,_n),Le=ur.prototype,Le.freeze=function(){return this},Le.ka=function(){return this},Le.toString=function(){return"MapKeySet("+this.ma.toString()+")"},Le.add=function(){St("This Set is read-only: "+this.toString())},Le.contains=function(a){return this.ma.contains(a)},Le.has=function(a){return this.contains(a)},Le.remove=function(){St("This Set is read-only: "+this.toString())},Le.delete=function(a){return this.remove(a)},Le.clear=function(){St("This Set is read-only: "+this.toString())},Le.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 _n,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 _n,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 _n,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 kn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Je.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?gr:new Jr(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 er(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}er.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},er.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=y.value,this.key=y.key,!0):(this.de(),!1)},er.prototype.Ad=function(){return this.next()},er.prototype.first=function(){var a=this.ma;if(this.qa=a.Ja,a=a.ea,a!==null){this.sa=a;var y=a.value;return this.key=a.key,this.value=y}return null},er.prototype.any=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},er.prototype.all=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},er.prototype.each=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;)a(y.value),y=y.va;return this},er.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new kn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},er.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new kn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},er.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},er.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},Je.Object.defineProperties(er.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),er.prototype.first=er.prototype.first,er.prototype.hasNext=er.prototype.Ad,er.prototype.next=er.prototype.next,er.prototype.reset=er.prototype.reset,er.className="MapValueSetIterator";function qi(a,y){this.key=a,this.value=y,this.ll=this.va=null}qi.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},qi.className="KeyValuePair";function Rr(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Rr.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},Rr.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)},Rr.prototype.Ad=function(){return this.next()},Rr.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},Rr.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},Rr.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},Rr.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},Rr.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new kn;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},Rr.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new kn;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},Rr.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},Rr.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},Je.Object.defineProperties(Rr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Rr.prototype.first=Rr.prototype.first,Rr.prototype.hasNext=Rr.prototype.Ad,Rr.prototype.next=Rr.prototype.next,Rr.prototype.reset=Rr.prototype.reset,Rr.className="MapIterator";function Ii(a){Or(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"&&St("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Le=Ii.prototype,Le.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Le.freeze=function(){return this._isFrozen=!0,this},Le.ka=function(){return this._isFrozen=!1,this},Le.toString=function(){return"Map()#"+br(this)},Le.add=function(a,y){this._isFrozen&&Nn(this,a);var x=a;en(a)&&(x=no(a));var b=this.Tb[x];return b===void 0?(this.Sb++,a=new qi(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},Le.set=function(a,y){return this.add(a,y)},Le.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 Ii)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},Le.first=function(){return this.ea},Ii.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},Ii.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},Ii.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},Ii.prototype.map=function(a){for(var y=new Ii,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},Ii.prototype.filter=function(a){for(var y=new Ii,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},Le=Ii.prototype,Le.contains=function(a){var y=a;return en(a)&&(y=br(a),y===void 0)?!1:this.Tb[y]!==void 0},Le.has=function(a){return this.contains(a)},Le.I=function(a){var y=a;return en(a)&&(y=br(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},Le.get=function(a){return this.I(a)},Le.remove=function(a){if(a===null)return!1;this._isFrozen&&Nn(this,a);var y=a;if(en(a)&&(y=br(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},Le.delete=function(a){return this.remove(a)},Le.clear=function(){this._isFrozen&&Nn(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()},Ii.prototype.copy=function(){var a=new Ii,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},Ii.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 qi(E.key,E.value),x++}return y},Ii.prototype.Lf=function(){return new ur(this)},Je.Object.defineProperties(Ii.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return gr;var a=this.Sa;return a!==null?(a.reset(),a):new Rr(this)}},iteratorKeys:{get:function(){return 0>=this.count?gr:new Jr(this)}},iteratorValues:{get:function(){if(0>=this.count)return gr;var a=this.jf;return a!==null?(a.reset(),a):new er(this)}}}),Ii.prototype.toKeySet=Ii.prototype.Lf,Ii.prototype.toArray=Ii.prototype.Fa,Ii.prototype.clear=Ii.prototype.clear,Ii.prototype.delete=Ii.prototype.delete,Ii.prototype.remove=Ii.prototype.remove,Ii.prototype.get=Ii.prototype.get,Ii.prototype.getValue=Ii.prototype.I,Ii.prototype.has=Ii.prototype.has,Ii.prototype.contains=Ii.prototype.contains,Ii.prototype.first=Ii.prototype.first,Ii.prototype.addAll=Ii.prototype.addAll,Ii.prototype.set=Ii.prototype.set,Ii.prototype.add=Ii.prototype.add,Ii.prototype.thaw=Ii.prototype.ka,Ii.prototype.freeze=Ii.prototype.freeze,Ii.className="Map";function tt(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):St("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var Qr,lo,jr,vo,po;tt.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},tt.prototype.h=function(a,y){return this.x=a,this.y=y,this},tt.prototype.sg=function(a,y){return this.x=a,this.y=y,this},tt.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},tt.prototype.copy=function(){var a=new tt;return a.x=this.x,a.y=this.y,a},Le=tt.prototype,Le.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Le.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Le.freeze=function(){return this._isFrozen=!0,this},Le.ka=function(){return Object.isFrozen(this)&&St("cannot thaw constant: "+this),this._isFrozen=!1,this};function Lr(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new tt(x,E)}return new tt}function Fr(a){return a.x.toString()+" "+a.y.toString()}Le.toString=function(){return"Point("+this.x+","+this.y+")"},Le.D=function(a){return a instanceof tt?this.x===a.x&&this.y===a.y:!1},Le.hi=function(a,y){return this.x===a&&this.y===y},Le.Xa=function(a){return Jt.B(this.x,a.x)&&Jt.B(this.y,a.y)},Le.add=function(a){return this.x+=a.x,this.y+=a.y,this},Le.re=function(a){return this.x-=a.x,this.y-=a.y,this},Le.offset=function(a,y){return this.x+=a,this.y+=y,this},tt.prototype.rotate=function(a){if(a===0)return this;var y=this.x,x=this.y;if(y===0&&x===0)return this;if(360<=a?a-=360:0>a&&(a+=360),a===90){a=0;var b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));return this.x=a*y-b*x,this.y=b*y+a*x,this},Le=tt.prototype,Le.scale=function(a,y){return this.x*=a,this.y*=y,this},Le.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},Le.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},Le.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},Le.ab=function(a){return uo(a.x-this.x,a.y-this.y)},Le.direction=function(a,y){return uo(a-this.x,y-this.y)};function uo(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}Le.Ry=function(a,y){return Jt.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},Le.fA=function(a,y,x,b){return Jt.qh(a,y,x,b,this.x,this.y,this),this},Le.gA=function(a,y){return Jt.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},Le.uA=function(a,y,x,b){return Jt.No(this.x,this.y,a,y,x,b,this),this},Le.vA=function(a,y){return Jt.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},Le.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},Le.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},Le.transform=function(a){return a.Ga(this),this};function qr(a,y){return y.Cd(a),a}function zo(a,y,x,b,E,z){var te=E-x,re=z-b,oe=te*te+re*re;x-=a,b-=y;var le=-x*te-b*re;return 0>=le||le>=oe?(te=E-a,re=z-y,Math.min(x*x+b*b,te*te+re*re)):(a=te*b-re*x,a*a/oe)}function Ro(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function Mr(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)}Le.w=function(){return isFinite(this.x)&&isFinite(this.y)},tt.alloc=function(){var a=Nr.pop();return a===void 0?new tt:a},tt.allocAt=function(a,y){var x=Nr.pop();return x===void 0?new tt(a,y):(x.x=a,x.y=y,x)},tt.free=function(a){Nr.push(a)},tt.prototype.isReal=tt.prototype.w,tt.prototype.setSpot=tt.prototype.yi,tt.prototype.setRectSpot=tt.prototype.xi,tt.prototype.snapToGridPoint=tt.prototype.vA,tt.prototype.snapToGrid=tt.prototype.uA,tt.prototype.projectOntoLineSegmentPoint=tt.prototype.gA,tt.prototype.projectOntoLineSegment=tt.prototype.fA,tt.intersectingLineSegments=function(a,y,x,b,E,z,te,re){return Jt.Rl(a,y,x,b,E,z,te,re)},tt.prototype.compareWithLineSegmentPoint=tt.prototype.Ry,tt.compareWithLineSegment=function(a,y,x,b,E,z){return Jt.Fl(a,y,x,b,E,z)},tt.prototype.direction=tt.prototype.direction,tt.prototype.directionPoint=tt.prototype.ab,tt.prototype.normalize=tt.prototype.normalize,tt.prototype.distanceSquared=tt.prototype.zd,tt.prototype.distanceSquaredPoint=tt.prototype.Bf,tt.prototype.scale=tt.prototype.scale,tt.prototype.rotate=tt.prototype.rotate,tt.prototype.offset=tt.prototype.offset,tt.prototype.subtract=tt.prototype.re,tt.prototype.add=tt.prototype.add,tt.prototype.equalsApprox=tt.prototype.Xa,tt.prototype.equalTo=tt.prototype.hi,tt.prototype.equals=tt.prototype.D,tt.prototype.set=tt.prototype.set,tt.prototype.setTo=tt.prototype.sg;var Nr=[];tt.className="Point",tt.parse=Lr,tt.stringify=Fr,tt.distanceLineSegmentSquared=zo,tt.distanceSquared=Ro,tt.direction=Mr,tt.Origin=Qr=new tt(0,0).ja(),tt.InfiniteTopLeft=lo=new tt(-1/0,-1/0).ja(),tt.InfiniteBottomRight=jr=new tt(1/0,1/0).ja(),tt.SixPoint=vo=new tt(6,6).ja(),tt.NoPoint=po=new tt(NaN,NaN).ja(),tt.parse=Lr,tt.stringify=Fr,tt.distanceLineSegmentSquared=zo,tt.distanceSquared=Ro,tt.direction=Mr;function fi(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):St("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var Tr,Bo,aa,Ho,Ao,_o,ta;fi.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},fi.prototype.h=function(a,y){return this.width=a,this.height=y,this},fi.prototype.sg=function(a,y){return this.width=a,this.height=y,this},fi.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},fi.prototype.copy=function(){var a=new fi;return a.width=this.width,a.height=this.height,a},Le=fi.prototype,Le.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Le.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Le.freeze=function(){return this._isFrozen=!0,this},Le.ka=function(){return Object.isFrozen(this)&&St("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ea(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 fi(x,E)}return new fi}function Mt(a){return a.width.toString()+" "+a.height.toString()}Le.toString=function(){return"Size("+this.width+","+this.height+")"},Le.D=function(a){return a instanceof fi?this.width===a.width&&this.height===a.height:!1},Le.hi=function(a,y){return this.width===a&&this.height===y},Le.Xa=function(a){return Jt.B(this.width,a.width)&&Jt.B(this.height,a.height)},Le.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},Le.w=function(){return isFinite(this.width)&&isFinite(this.height)},fi.alloc=function(){var a=Pi.pop();return a===void 0?new fi:a},fi.free=function(a){Pi.push(a)},fi.prototype.isReal=fi.prototype.w,fi.prototype.inflate=fi.prototype.Bc,fi.prototype.equalsApprox=fi.prototype.Xa,fi.prototype.equalTo=fi.prototype.hi,fi.prototype.equals=fi.prototype.D,fi.prototype.set=fi.prototype.set,fi.prototype.setTo=fi.prototype.sg;var Pi=[];fi.className="Size",fi.parse=Ea,fi.stringify=Mt,fi.ZeroSize=Tr=new fi(0,0).ja(),fi.OneSize=Bo=new fi(1,1).ja(),fi.SixSize=aa=new fi(6,6).ja(),fi.EightSize=Ho=new fi(8,8).ja(),fi.TenSize=Ao=new fi(10,10).ja(),fi.InfiniteSize=_o=new fi(1/0,1/0).ja(),fi.NoSize=ta=new fi(NaN,NaN).ja(),fi.parse=Ea,fi.stringify=Mt;function Ut(a,y,x,b){a===void 0?this.height=this.width=this.y=this.x=0:typeof a=="number"&&typeof y=="number"&&typeof x=="number"&&(0<=x||isNaN(x))&&typeof b=="number"&&(0<=b||isNaN(b))?(this.x=a,this.y=y,this.width=x,this.height=b):a instanceof tt?(x=a.x,a=a.y,y instanceof tt?(b=y.x,y=y.y,this.x=Math.min(x,b),this.y=Math.min(a,y),this.width=Math.abs(x-b),this.height=Math.abs(a-y)):y instanceof fi?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):St("Incorrect second argument supplied to Rect constructor "+y)):St("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Le=Ut.prototype,Le.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Le.h=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function Ui(a,y,x){a.width=y,a.height=x}Le.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this},Le.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Le.dd=function(a){return this.x=a.x,this.y=a.y,this},Le.tA=function(a){return this.width=a.width,this.height=a.height,this},Ut.prototype.copy=function(){var a=new Ut;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},Le=Ut.prototype,Le.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Le.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Le.freeze=function(){return this._isFrozen=!0,this},Le.ka=function(){return Object.isFrozen(this)&&St("cannot thaw constant: "+this),this._isFrozen=!1,this};function wi(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 z=0;a[y]==="";)y++;(b=a[y++])&&(z=parseFloat(b));for(var te=0;a[y]==="";)y++;return(b=a[y++])&&(te=parseFloat(b)),new Ut(x,E,z,te)}return new Ut}function yr(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}Le.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},Le.D=function(a){return a instanceof Ut?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},Le.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},Le.Xa=function(a){return Jt.B(this.x,a.x)&&Jt.B(this.y,a.y)&&Jt.B(this.width,a.width)&&Jt.B(this.height,a.height)};function Zi(a,y){return Jt.$(a.x,y.x)&&Jt.$(a.y,y.y)&&Jt.$(a.width,y.width)&&Jt.$(a.height,y.height)}Le.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},Le.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},Le.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},Le.offset=function(a,y){return this.x+=a,this.y+=y,this},Le.Bc=function(a,y){return Ci(this,y,a,y,a)},Le.Co=function(a){return Ci(this,a.top,a.right,a.bottom,a.left)},Le.Fv=function(a){return Ci(this,-a.top,-a.right,-a.bottom,-a.left)},Le.Hz=function(a,y,x,b){return Ci(this,a,y,x,b)};function Ci(a,y,x,b,E){var z=a.width;return x+E<=-z?(a.x+=z/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}Le.Ex=function(a){return nr(this,a.x,a.y,a.width,a.height)},Le.Uu=function(a,y,x,b){return nr(this,a,y,x,b)};function nr(a,y,x,b,E){var z=Math.max(a.x,y),te=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=z,a.y=te,a.width=Math.max(0,y-z),a.height=Math.max(0,x-te),a}Le.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},Le.Vu=function(a,y,x,b){var E=this.width,z=this.x;return E!==1/0&&x!==1/0&&(E+=z,x+=a,isNaN(x)||isNaN(E)||z>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 rr(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))}Le.Ye=function(a){return cr(this,a.x,a.y,0,0)},Le.ed=function(a){return cr(this,a.x,a.y,a.width,a.height)},Le.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),cr(this,a,y,x,b)};function cr(a,y,x,b,E){var z=Math.min(a.x,y),te=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=z,a.y=te,a.width=y-z,a.height=x-te,a}Le.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 xr(a,y,x,b,E,z,te,re){return te===void 0&&(te=0),re===void 0&&(re=0),a<=E&&E+te<=a+x&&y<=z&&z+re<=y+b}function Gr(a,y,x,b,E,z,te,re){return a>te+E||E>x+a?!1:!(y>re+z||z>b+y)}Le.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Le.Mz=function(){return this.width===0&&this.height===0},Ut.alloc=function(){var a=Zr.pop();return a===void 0?new Ut:a},Ut.allocAt=function(a,y,x,b){var E=Zr.pop();return E===void 0?new Ut(a,y,x,b):E.h(a,y,x,b)},Ut.free=function(a){Zr.push(a)},Je.Object.defineProperties(Ut.prototype,{left:{get:function(){return this.x},set:function(a){this.x=a}},top:{get:function(){return this.y},set:function(a){this.y=a}},right:{get:function(){return this.x+this.width},set:function(a){this.x+=a-(this.x+this.width)}},bottom:{get:function(){return this.y+this.height},set:function(a){this.y+=a-(this.y+this.height)}},position:{get:function(){return new tt(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new fi(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new tt(this.x+this.width/2,this.y+this.height/2)},set:function(a){this.x=a.x-this.width/2,this.y=a.y-this.height/2}},centerX:{get:function(){return this.x+this.width/2},set:function(a){this.x=a-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(a){this.y=a-this.height/2}}}),Ut.prototype.isEmpty=Ut.prototype.Mz,Ut.prototype.isReal=Ut.prototype.w,Ut.intersectsLineSegment=function(a,y,x,b,E,z,te,re){return Jt.Fx(a,y,x,b,E,z,te,re)},Ut.prototype.setSpot=Ut.prototype.yi,Ut.prototype.union=Ut.prototype.Kv,Ut.prototype.unionRect=Ut.prototype.ed,Ut.prototype.unionPoint=Ut.prototype.Ye,Ut.prototype.intersects=Ut.prototype.Vu,Ut.prototype.intersectsRect=Ut.prototype.Yc,Ut.prototype.intersect=Ut.prototype.Uu,Ut.prototype.intersectRect=Ut.prototype.Ex,Ut.prototype.grow=Ut.prototype.Hz,Ut.prototype.subtractMargin=Ut.prototype.Fv,Ut.prototype.addMargin=Ut.prototype.Co,Ut.prototype.inflate=Ut.prototype.Bc,Ut.prototype.offset=Ut.prototype.offset,Ut.prototype.contains=Ut.prototype.contains,Ut.prototype.containsRect=Ut.prototype.Re,Ut.prototype.containsPoint=Ut.prototype.ca,Ut.prototype.equalsApprox=Ut.prototype.Xa,Ut.prototype.equalTo=Ut.prototype.hi,Ut.prototype.equals=Ut.prototype.D,Ut.prototype.setSize=Ut.prototype.tA,Ut.prototype.setPoint=Ut.prototype.dd,Ut.prototype.set=Ut.prototype.set,Ut.prototype.setTo=Ut.prototype.sg;var vr=null,kr=null,Zr=[];Ut.className="Rect",Ut.parse=wi,Ut.stringify=yr,Ut.contains=xr,Ut.intersects=Gr,Ut.ZeroRect=vr=new Ut(0,0,0,0).ja(),Ut.NoRect=kr=new Ut(NaN,NaN,NaN,NaN).ja(),Ut.parse=wi,Ut.stringify=yr,Ut.contains=xr,Ut.intersects=Gr;function Oi(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):St("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Oi.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Oi.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},Oi.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Oi.prototype.copy=function(){var a=new Oi;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},Le=Oi.prototype,Le.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Le.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Le.freeze=function(){return this._isFrozen=!0,this},Le.ka=function(){return Object.isFrozen(this)&&St("cannot thaw constant: "+this),this._isFrozen=!1,this};function sa(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 Oi;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new Oi(x);for(var z=NaN;a[y]==="";)y++;if((b=a[y++])&&(z=parseFloat(b)),isNaN(z))return new Oi(x,E);for(var te=NaN;a[y]==="";)y++;return(b=a[y++])&&(te=parseFloat(b)),isNaN(te)?new Oi(x,E):new Oi(x,E,z,te)}return new Oi}function Ra(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}Le.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},Le.D=function(a){return a instanceof Oi?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},Le.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},Le.Xa=function(a){return Jt.B(this.top,a.top)&&Jt.B(this.right,a.right)&&Jt.B(this.bottom,a.bottom)&&Jt.B(this.left,a.left)},Le.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Oi.alloc=function(){var a=tl.pop();return a===void 0?new Oi:a},Oi.free=function(a){tl.push(a)},Oi.prototype.isReal=Oi.prototype.w,Oi.prototype.equalsApprox=Oi.prototype.Xa,Oi.prototype.equalTo=Oi.prototype.hi,Oi.prototype.equals=Oi.prototype.D,Oi.prototype.set=Oi.prototype.set,Oi.prototype.setTo=Oi.prototype.sg;var Ls=null,Ys=null,tl=[];Oi.className="Margin",Oi.parse=sa,Oi.stringify=Ra,Oi.ZeroMargin=Ls=new Oi(0,0,0,0).ja(),Oi.TwoMargin=Ys=new Oi(2,2,2,2).ja(),Oi.parse=sa,Oi.stringify=Ra;function Vi(a,y,x,b){a===void 0?this.offsetY=this.offsetX=this.y=this.x=0:(y===void 0&&(y=0),x===void 0&&(x=0),b===void 0&&(b=0),this.x=a,this.y=y,this.offsetX=x,this.offsetY=b),this._isFrozen=!1}var La,Ba,zs,su,lu,wo,yc,Ml,as,vl,ju,rc,wl,sl,td,nd,kc,_d,id,Ic,Js,uu,xd,Eu,Sc,Vo,ya,ll,Ss,ms,Ua,ss,xs,vs,oc,_l;Vi.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Vi.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},Vi.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Vi.prototype.copy=function(){var a=new Vi;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},Le=Vi.prototype,Le.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Le.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Le.freeze=function(){return this._isFrozen=!0,this},Le.ka=function(){return Object.isFrozen(this)&&St("cannot thaw constant: "+this),this._isFrozen=!1,this};function is(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function bh(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return La;if(a==="TopLeft")return Ba;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return zs;if(a==="TopRight")return su;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return lu;if(a==="Center")return wo;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return yc;if(a==="BottomLeft")return Ml;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return as;if(a==="BottomRight")return vl;if(a==="TopSide")return ju;if(a==="LeftSide")return rc;if(a==="RightSide")return wl;if(a==="BottomSide")return sl;if(a==="TopBottomSides")return td;if(a==="LeftRightSides")return nd;if(a==="TopLeftSides")return kc;if(a==="TopRightSides")return _d;if(a==="BottomLeftSides")return id;if(a==="BottomRightSides")return Ic;if(a==="NotTopSide")return Js;if(a==="NotLeftSide")return uu;if(a==="NotRightSide")return xd;if(a==="NotBottomSide")return Eu;if(a==="AllSides")return Sc;if(a==="Default")return Vo;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 z=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(z=parseFloat(b));for(var te=0;a[y]==="";)y++;return b=a[y++],b!==void 0&&0<b.length&&(te=parseFloat(b)),new Vi(x,E,z,te)}return new Vi}function Eh(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}Le.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(La)?"None":this.D(Ba)?"TopLeft":this.D(zs)?"Top":this.D(su)?"TopRight":this.D(lu)?"Left":this.D(wo)?"Center":this.D(yc)?"Right":this.D(Ml)?"BottomLeft":this.D(as)?"Bottom":this.D(vl)?"BottomRight":this.D(ju)?"TopSide":this.D(rc)?"LeftSide":this.D(wl)?"RightSide":this.D(sl)?"BottomSide":this.D(td)?"TopBottomSides":this.D(nd)?"LeftRightSides":this.D(kc)?"TopLeftSides":this.D(_d)?"TopRightSides":this.D(id)?"BottomLeftSides":this.D(Ic)?"BottomRightSides":this.D(Js)?"NotTopSide":this.D(uu)?"NotLeftSide":this.D(xd)?"NotRightSide":this.D(Eu)?"NotBottomSide":this.D(Sc)?"AllSides":this.D(Vo)?"Default":"None"},Le.D=function(a){return a instanceof Vi?(this.x===a.x||isNaN(this.x)&&isNaN(a.x))&&(this.y===a.y||isNaN(this.y)&&isNaN(a.y))&&this.offsetX===a.offsetX&&this.offsetY===a.offsetY:!1},Le.gv=function(){return new Vi(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},Le.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(ya))a=rc;else if(a.D(ll))a=wl;else if(a.D(Ss))a=ju;else if(a.D(ms))a=sl;else return!1;return a=a.offsetY,(this.offsetY&a)===a},Le.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},Le.Mc=function(){return isNaN(this.x)||isNaN(this.y)},Le.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},Le.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},Le.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},Vi.alloc=function(){var a=Uu.pop();return a===void 0?new Vi:a},Vi.free=function(a){Uu.push(a)},Vi.prototype.isDefault=Vi.prototype.Xb,Vi.prototype.isNone=Vi.prototype.ys,Vi.prototype.isSide=Vi.prototype.$c,Vi.prototype.isNoSpot=Vi.prototype.Mc,Vi.prototype.isSpot=Vi.prototype.sb,Vi.prototype.includesSide=Vi.prototype.Hf,Vi.prototype.opposite=Vi.prototype.gv,Vi.prototype.equals=Vi.prototype.D,Vi.prototype.set=Vi.prototype.set,Vi.prototype.setTo=Vi.prototype.sg;var Uu=[];Vi.className="Spot",Vi.parse=bh,Vi.stringify=Eh,Vi.None=La=is(new Vi(0,0,0,0),0).ja(),Vi.Default=Vo=is(new Vi(0,0,-1,0),-1).ja(),Vi.TopLeft=Ba=new Vi(0,0,0,0).ja(),Vi.TopCenter=zs=new Vi(.5,0,0,0).ja(),Vi.TopRight=su=new Vi(1,0,0,0).ja(),Vi.LeftCenter=lu=new Vi(0,.5,0,0).ja(),Vi.Center=wo=new Vi(.5,.5,0,0).ja(),Vi.RightCenter=yc=new Vi(1,.5,0,0).ja(),Vi.BottomLeft=Ml=new Vi(0,1,0,0).ja(),Vi.BottomCenter=as=new Vi(.5,1,0,0).ja(),Vi.BottomRight=vl=new Vi(1,1,0,0).ja(),Vi.MiddleTop=Ua=zs,Vi.MiddleLeft=ss=lu,Vi.MiddleRight=xs=yc,Vi.MiddleBottom=vs=as,Vi.Top=Ss=zs,Vi.Left=ya=lu,Vi.Right=ll=yc,Vi.Bottom=ms=as,Vi.TopSide=ju=is(new Vi(0,0,1,1),1).ja(),Vi.LeftSide=rc=is(new Vi(0,0,1,2),1).ja(),Vi.RightSide=wl=is(new Vi(0,0,1,4),1).ja(),Vi.BottomSide=sl=is(new Vi(0,0,1,8),1).ja(),Vi.TopBottomSides=td=is(new Vi(0,0,1,9),1).ja(),Vi.LeftRightSides=nd=is(new Vi(0,0,1,6),1).ja(),Vi.TopLeftSides=kc=is(new Vi(0,0,1,3),1).ja(),Vi.TopRightSides=_d=is(new Vi(0,0,1,5),1).ja(),Vi.BottomLeftSides=id=is(new Vi(0,0,1,10),1).ja(),Vi.BottomRightSides=Ic=is(new Vi(0,0,1,12),1).ja(),Vi.NotTopSide=Js=is(new Vi(0,0,1,14),1).ja(),Vi.NotLeftSide=uu=is(new Vi(0,0,1,13),1).ja(),Vi.NotRightSide=xd=is(new Vi(0,0,1,11),1).ja(),Vi.NotBottomSide=Eu=is(new Vi(0,0,1,7),1).ja(),Vi.AllSides=Sc=is(new Vi(0,0,1,15),1).ja(),oc=new Vi(.156,.156).ja(),_l=new Vi(.844,.844).ja(),Vi.parse=bh,Vi.stringify=Eh;function ro(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}ro.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},ro.prototype.setTransform=function(a,y,x,b,E,z){return this.m11=a,this.m12=y,this.m21=x,this.m22=b,this.dx=E,this.dy=z,this},ro.prototype.copy=function(){var a=new ro;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},ro.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},ro.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},ro.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},ro.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},ro.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},ro.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,z=a.m11*y,te=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*z,E=this.m12*E+this.m22*z,this.dx=this.m11*te+this.m21*a+this.dx,this.dy=this.m12*te+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=b,this.m22=E,this},ro.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),z=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=z,this},ro.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,z=this.m11*-b+this.m21*a,te=this.m12*-b+this.m22*a;return this.m11=this.m11*a+this.m21*b,this.m12=E,this.m21=z,this.m22=te,this.translate(-y,-x),this},Le=ro.prototype,Le.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},Le.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},Le.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)},Le.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))},Le.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))},Le.pp=function(a){var y=a.x,x=a.y,b=y+a.width,E=x+a.height,z=this.m11,te=this.m12,re=this.m21,oe=this.m22,le=this.dx,ue=this.dy,me=y*z+x*re+le,we=y*te+x*oe+ue,Me=b*z+x*re+le,Te=b*te+x*oe+ue;return x=y*z+E*re+le,y=y*te+E*oe+ue,z=b*z+E*re+le,b=b*te+E*oe+ue,E=Math.min(me,Me),me=Math.max(me,Me),Me=Math.min(we,Te),we=Math.max(we,Te),E=Math.min(E,x),me=Math.max(me,x),Me=Math.min(Me,y),we=Math.max(we,y),E=Math.min(E,z),me=Math.max(me,z),Me=Math.min(Me,b),we=Math.max(we,b),a.h(E,Me,me-E,we-Me),a},ro.alloc=function(){var a=rd.pop();return a===void 0?new ro:a},ro.free=function(a){rd.push(a)},ro.prototype.transformRect=ro.prototype.pp,ro.prototype.transformPoint=ro.prototype.Ga,ro.prototype.scale=ro.prototype.scale,ro.prototype.translate=ro.prototype.translate,ro.prototype.rotate=ro.prototype.rotate,ro.prototype.invert=ro.prototype.Vj,ro.prototype.multiplyInverted=ro.prototype.bv,ro.prototype.multiply=ro.prototype.multiply,ro.prototype.reset=ro.prototype.reset,ro.prototype.isIdentity=ro.prototype.ws,ro.prototype.equals=ro.prototype.D,ro.prototype.setTransform=ro.prototype.setTransform,ro.prototype.set=ro.prototype.set;var rd=[];ro.className="Transform",ro.xF="54a702f3e53909c447824c6706603faf4c";var Jt={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=Jt.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);Jt.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,z,te){if(0>=E&&(E=1e-6),a<x)var re=a,oe=x;else re=x,oe=a;if(y<b)var le=y,ue=b;else le=b,ue=y;if(a===x)return le<=te&&te<=ue&&a-E<=z&&z<=a+E;if(y===b)return re<=z&&z<=oe&&y-E<=te&&te<=y+E;if(oe+=E,re-=E,re<=z&&z<=oe&&(ue+=E,le-=E,le<=te&&te<=ue))if(oe-re>ue-le)if(a-x>E||x-a>E){if(z=(b-y)/(x-a)*(z-a)+y,z-E<=te&&te<=z+E)return!0}else return!0;else if(y-b>E||b-y>E){if(te=(x-a)/(b-y)*(te-y)+a,te-E<=z&&z<=te+E)return!0}else return!0;return!1},cs:function(a,y,x,b,E,z,te,re,oe,le,ue,me){if(Jt.Yb(a,y,te,re,me,x,b)&&Jt.Yb(a,y,te,re,me,E,z))return Jt.Yb(a,y,te,re,me,le,ue);var we=(a+x)/2,Me=(y+b)/2,Te=(x+E)/2,je=(b+z)/2;E=(E+te)/2,z=(z+re)/2,b=(we+Te)/2,x=(Me+je)/2,Te=(Te+E)/2,je=(je+z)/2;var ct=(b+Te)/2,nt=(x+je)/2;return Jt.cs(a,y,we,Me,b,x,ct,nt,oe,le,ue,me)||Jt.cs(ct,nt,Te,je,E,z,te,re,oe,le,ue,me)},ax:function(a,y,x,b,E,z,te,re,oe){var le=(x+E)/2,ue=(b+z)/2;return oe.h((((a+x)/2+le)/2+(le+(E+te)/2)/2)/2,(((y+b)/2+ue)/2+(ue+(z+re)/2)/2)/2),oe},My:function(a,y,x,b,E,z,te,re){var oe=(x+E)/2,le=(b+z)/2;return Mr(((a+x)/2+oe)/2,((y+b)/2+le)/2,(oe+(E+te)/2)/2,(le+(z+re)/2)/2)},Dl:function(a,y,x,b,E,z,te,re,oe,le){if(Jt.Yb(a,y,te,re,oe,x,b)&&Jt.Yb(a,y,te,re,oe,E,z))cr(le,a,y,0,0),cr(le,te,re,0,0);else{var ue=(a+x)/2,me=(y+b)/2,we=(x+E)/2,Me=(b+z)/2;E=(E+te)/2,z=(z+re)/2,b=(ue+we)/2,x=(me+Me)/2,we=(we+E)/2,Me=(Me+z)/2;var Te=(b+we)/2,je=(x+Me)/2;Jt.Dl(a,y,ue,me,b,x,Te,je,oe,le),Jt.Dl(Te,je,we,Me,E,z,te,re,oe,le)}return le},Qe:function(a,y,x,b,E,z,te,re,oe,le){if(Jt.Yb(a,y,te,re,oe,x,b)&&Jt.Yb(a,y,te,re,oe,E,z))le.length===0&&(le.push(a),le.push(y)),le.push(te),le.push(re);else{var ue=(a+x)/2,me=(y+b)/2,we=(x+E)/2,Me=(b+z)/2;E=(E+te)/2,z=(z+re)/2,b=(ue+we)/2,x=(me+Me)/2,we=(we+E)/2,Me=(Me+z)/2;var Te=(b+we)/2,je=(x+Me)/2;Jt.Qe(a,y,ue,me,b,x,Te,je,oe,le),Jt.Qe(Te,je,we,Me,E,z,te,re,oe,le)}return le},jv:function(a,y,x,b,E,z,te,re,oe,le){if(Jt.Yb(a,y,E,z,le,x,b))return Jt.Yb(a,y,E,z,le,re,oe);var ue=(a+x)/2,me=(y+b)/2;x=(x+E)/2,b=(b+z)/2;var we=(ue+x)/2,Me=(me+b)/2;return Jt.jv(a,y,ue,me,we,Me,te,re,oe,le)||Jt.jv(we,Me,x,b,E,z,te,re,oe,le)},OA:function(a,y,x,b,E,z,te){return te.h(((a+x)/2+(x+E)/2)/2,((y+b)/2+(b+z)/2)/2),te},iv:function(a,y,x,b,E,z,te,re){if(Jt.Yb(a,y,E,z,te,x,b))cr(re,a,y,0,0),cr(re,E,z,0,0);else{var oe=(a+x)/2,le=(y+b)/2;x=(x+E)/2,b=(b+z)/2;var ue=(oe+x)/2,me=(le+b)/2;Jt.iv(a,y,oe,le,ue,me,te,re),Jt.iv(ue,me,x,b,E,z,te,re)}return re},ep:function(a,y,x,b,E,z,te,re){if(Jt.Yb(a,y,E,z,te,x,b))re.length===0&&(re.push(a),re.push(y)),re.push(E),re.push(z);else{var oe=(a+x)/2,le=(y+b)/2;x=(x+E)/2,b=(b+z)/2;var ue=(oe+x)/2,me=(le+b)/2;Jt.ep(a,y,oe,le,ue,me,te,re),Jt.ep(ue,me,x,b,E,z,te,re)}return re},Eo:function(a,y,x,b,E,z,te,re,oe,le,ue,me,we,Me){if(Jt.Yb(a,y,te,re,we,x,b)&&Jt.Yb(a,y,te,re,we,E,z))return!Jt.Rl(a,y,te,re,oe,le,ue,me)||(we=(a-te)*(le-me)-(y-re)*(oe-ue),we===0)?!1:(Me.h(((a*re-y*te)*(oe-ue)-(a-te)*(oe*me-le*ue))/we,((a*re-y*te)*(le-me)-(y-re)*(oe*me-le*ue))/we),!0);var Te=(a+x)/2,je=(y+b)/2,ct=(x+E)/2,nt=(b+z)/2;E=(E+te)/2,z=(z+re)/2,b=(Te+ct)/2,x=(je+nt)/2,ct=(ct+E)/2,nt=(nt+z)/2;var bt=(b+ct)/2,Nt=(x+nt)/2,Ot=1/0,Xt=!1,gn=0,Fi=0;return Jt.Eo(a,y,Te,je,b,x,bt,Nt,oe,le,ue,me,we,Me)&&(a=(Me.x-oe)*(Me.x-oe)+(Me.y-le)*(Me.y-le),a<Ot&&(Ot=a,Xt=!0,gn=Me.x,Fi=Me.y)),Jt.Eo(bt,Nt,ct,nt,E,z,te,re,oe,le,ue,me,we,Me)&&(Me.x-oe)*(Me.x-oe)+(Me.y-le)*(Me.y-le)<Ot&&(Xt=!0,gn=Me.x,Fi=Me.y),Xt&&(Me.x=gn,Me.y=Fi),Xt},Fo:function(a,y,x,b,E,z,te,re,oe,le,ue,me,we){var Me=0;if(Jt.Yb(a,y,te,re,we,x,b)&&Jt.Yb(a,y,te,re,we,E,z)){if(we=(a-te)*(le-me)-(y-re)*(oe-ue),we===0)return Me;var Te=((a*re-y*te)*(oe-ue)-(a-te)*(oe*me-le*ue))/we,je=((a*re-y*te)*(le-me)-(y-re)*(oe*me-le*ue))/we;if(Te>=ue)return Me;if((oe>ue?oe-ue:ue-oe)<(le>me?le-me:me-le)){if(y<re?(oe=y,a=re):(oe=re,a=y),je<oe||je>a)return Me}else if(a<te?(oe=a,a=te):oe=te,Te<oe||Te>a)return Me;0<we?Me++:0>we&&Me--}else{Te=(a+x)/2,je=(y+b)/2;var ct=(x+E)/2,nt=(b+z)/2;E=(E+te)/2,z=(z+re)/2,b=(Te+ct)/2,x=(je+nt)/2,ct=(ct+E)/2,nt=(nt+z)/2;var bt=(b+ct)/2,Nt=(x+nt)/2;Me+=Jt.Fo(a,y,Te,je,b,x,bt,Nt,oe,le,ue,me,we),Me+=Jt.Fo(bt,Nt,ct,nt,E,z,te,re,oe,le,ue,me,we)}return Me},qh:function(a,y,x,b,E,z,te){return Jt.$(a,x)?(y<b?(x=y,y=b):x=b,z<x?(te.h(a,x),!1):z>y?(te.h(a,y),!1):(te.h(a,z),!0)):Jt.$(y,b)?(a<x?(b=a,a=x):b=x,E<b?(te.h(b,y),!1):E>a?(te.h(a,y),!1):(te.h(E,y),!0)):(E=((a-E)*(a-x)+(y-z)*(y-b))/((x-a)*(x-a)+(b-y)*(b-y)),-5e-6>E?(te.h(a,y),!1):1.000005<E?(te.h(x,b),!1):(te.h(a+E*(x-a),y+E*(b-y)),!0))},Ve:function(a,y,x,b,E,z,te,re,oe){return Jt.B(a,x)&&Jt.B(y,b)?(oe.h(a,y),!1):Jt.$(E,te)?Jt.$(a,x)?(Jt.qh(a,y,x,b,E,z,oe),!1):Jt.qh(a,y,x,b,E,(b-y)/(x-a)*(E-a)+y,oe):(re=(re-z)/(te-E),Jt.$(a,x)?(x=re*(a-E)+z,y<b?(E=y,y=b):E=b,x<E?(oe.h(a,E),!1):x>y?(oe.h(a,y),!1):(oe.h(a,x),!0)):(te=(b-y)/(x-a),Jt.$(re,te)?(Jt.qh(a,y,x,b,E,z,oe),!1):(E=(te*a-re*E+z-y)/(te-re),Jt.$(te,0)?(a<x?(b=a,a=x):b=x,E<b?(oe.h(b,y),!1):E>a?(oe.h(a,y),!1):(oe.h(E,y),!0)):Jt.qh(a,y,x,b,E,te*(E-a)+y,oe))))},MA:function(a,y,x,b,E){return Jt.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,z,te,re,oe,le){function ue(ct,nt){var bt=(ct-a)*(ct-a)+(nt-y)*(nt-y);bt<me&&(me=bt,oe.h(ct,nt))}var me=1/0;ue(oe.x,oe.y);var we=0,Me=0,Te=0,je=0;if(E<te?(we=E,Me=te):(we=te,Me=E),z<re?(Te=E,je=te):(Te=te,je=E),we=(Me-we)/2+le,le=(je-Te)/2+le,E=(E+te)/2,z=(z+re)/2,we===0||le===0)return oe;if(.5>(x>a?x-a:a-x)){if(we=1-(x-E)*(x-E)/(we*we),0>we)return oe;we=Math.sqrt(we),b=-le*we+z,ue(x,le*we+z),ue(x,b)}else{if(x=(b-y)/(x-a),b=1/(we*we)+x*x/(le*le),re=2*x*(y-x*a)/(le*le)-2*x*z/(le*le)-2*E/(we*we),we=re*re-4*b*(2*x*a*z/(le*le)-2*y*z/(le*le)+z*z/(le*le)+E*E/(we*we)-1+(y-x*a)*(y-x*a)/(le*le)),0>we)return oe;we=Math.sqrt(we),le=(-re+we)/(2*b),ue(le,x*le-x*a+y),we=(-re-we)/(2*b),ue(we,x*we-x*a+y)}return oe},Ff:function(a,y,x,b,E,z,te,re,oe){var le=1e21,ue=a,me=y;if(Jt.Ve(a,y,a,b,E,z,te,re,oe)){var we=(oe.x-E)*(oe.x-E)+(oe.y-z)*(oe.y-z);we<le&&(le=we,ue=oe.x,me=oe.y)}return Jt.Ve(x,y,x,b,E,z,te,re,oe)&&(we=(oe.x-E)*(oe.x-E)+(oe.y-z)*(oe.y-z),we<le&&(le=we,ue=oe.x,me=oe.y)),Jt.Ve(a,y,x,y,E,z,te,re,oe)&&(y=(oe.x-E)*(oe.x-E)+(oe.y-z)*(oe.y-z),y<le&&(le=y,ue=oe.x,me=oe.y)),Jt.Ve(a,b,x,b,E,z,te,re,oe)&&(a=(oe.x-E)*(oe.x-E)+(oe.y-z)*(oe.y-z),a<le&&(le=a,ue=oe.x,me=oe.y)),oe.h(ue,me),1e21>le},us:function(a,y,x){return Jt.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,b,E,z,te,re){var oe=a+x,le=y+b;return E===te?(z<re?(te=z,z=re):te=re,a<=E&&E<=oe&&te<=le&&z>=y):z===re?(E<te?(re=E,E=te):re=te,y<=z&&z<=le&&re<=oe&&E>=a):!!(xr(a,y,x,b,E,z)||xr(a,y,x,b,te,re)||Jt.Rl(a,y,oe,y,E,z,te,re)||Jt.Rl(oe,y,oe,le,E,z,te,re)||Jt.Rl(oe,le,a,le,E,z,te,re)||Jt.Rl(a,le,a,y,E,z,te,re))},Rl:function(a,y,x,b,E,z,te,re){return a===x&&y===b&&E===te&&z===re?a===E&&y===z:0>=Jt.Fl(a,y,x,b,E,z)*Jt.Fl(a,y,x,b,te,re)&&0>=Jt.Fl(E,z,te,re,a,y)*Jt.Fl(E,z,te,re,x,b)},Fl:function(a,y,x,b,E,z){return x-=a,b-=y,a=E-a,y=z-y,z=a*b-y*x,z===0&&(z=a*x+y*b,0<z&&(z=(a-x)*x+(y-b)*b,0>z&&(z=0))),z},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,b,E,z){var te=Math.PI;z||(b*=te/180,E*=te/180);var re=b>E?-1:1;z=[];var oe=te/2,le=b;if(b=Math.min(2*te,Math.abs(E-b)),1e-5>b)return oe=le+re*Math.min(b,oe),re=a+x*Math.cos(le),le=y+x*Math.sin(le),a+=x*Math.cos(oe),y+=x*Math.sin(oe),x=(re+a)/2,oe=(le+y)/2,z.push([re,le,x,oe,x,oe,a,y]),z;for(;1e-5<b;)E=le+re*Math.min(b,oe),z.push(Jt.Vy(x,le,E,a,y)),b-=Math.abs(E-le),le=E;return z},Vy:function(a,y,x,b,E){var z=(x-y)/2,te=a*Math.cos(z),re=a*Math.sin(z),oe=-re,le=te*te+oe*oe,ue=le+te*te+oe*re;return le=4/3*(Math.sqrt(2*le*ue)-ue)/(te*re-oe*te),re=te-le*oe,te=oe+le*te,oe=-te,le=z+y,z=Math.cos(le),le=Math.sin(le),[b+a*Math.cos(y),E+a*Math.sin(y),b+re*z-te*le,E+re*le+te*z,b+re*z-oe*le,E+re*le+oe*z,b+a*Math.cos(x),E+a*Math.sin(x)]},No:function(a,y,x,b,E,z,te){x=Math.floor((a-x)/E)*E+x,b=Math.floor((y-b)/z)*z+b;var re=x;return x+E-a<E/2&&(re=x+E),a=b,b+z-y<z/2&&(a=b+z),te.h(re,a),te},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,z=0>b;if(a<y)var te=1,re=0;else te=0,re=1;var oe=te===0?a:y,le=te===0?x:b;return(te===0?E:z)&&(le=-le),te=re,x=te===0?x:b,(te===0?E:z)&&(x=-x),Jt.az(oe,te===0?a:y,le,x,0,0)},az:function(a,y,x,b,E,z){if(0<b)if(0<x){E=a*a,z=y*y,a*=x;var te=y*b,re=-z+te,oe=-z+Math.sqrt(a*a+te*te);y=re;for(var le=0;9999999999>le&&(y=.5*(re+oe),!(y===re||y===oe));++le){var ue=a/(y+E),me=te/(y+z);if(ue=ue*ue+me*me-1,0<ue)re=y;else if(0>ue)oe=y;else break}x=E*x/(y+E)-x,b=z*b/(y+z)-b,x=Math.sqrt(x*x+b*b)}else x=Math.abs(b-y);else b=a*a-y*y,z=a*x,z<b?(b=z/b,z=y*Math.sqrt(Math.abs(1-b*b)),x=a*b-x,x=Math.sqrt(x*x+z*z)):x=Math.abs(x-a);return x},Ze:new Gi,um:new Gi,Mf:new Gi,Nf:0,vm:100};Jt.za=Jt.AA;function xi(a){Or(this),this.l=2,a===void 0&&(a=xi.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===xi.o?this.ee=new kn:(xi.V===null&&(xi.V=new kn().freeze()),this.ee=xi.V),this.aq=this.ee.Ja,this.Ip=new Ut().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=Ba,this.gg=vl,this.Rk=this.Sk=NaN,this.Uf=ci}xi.prototype.copy=function(){var a=new xi;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===xi.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},xi.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},xi.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==xi.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},xi.prototype.ka=function(){if(Object.isFrozen(this)&&St("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==xi.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},xi.prototype.Xa=function(a){if(!(a instanceof xi))return!1;if(this.type!==a.type)return this.type===xi.j&&a.type===xi.o?Mh(this,a):a.type===xi.j&&this.type===xi.o?Mh(a,this):!1;if(this.type===xi.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 Jt.B(this.startX,a.startX)&&Jt.B(this.startY,a.startY)&&Jt.B(this.endX,a.endX)&&Jt.B(this.endY,a.endY)};function Mh(a,y){return a.type!==xi.j||y.type!==xi.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&Jt.B(a.startX,y.startX)&&Jt.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===ra&&Jt.B(a.endX,y.endX)&&Jt.B(a.endY,y.endY))))}xi.ia=function(a){return a.toString()},xi.prototype.qb=function(a){a.classType===xi&&(this.type=a)},xi.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case xi.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 xi.u:var y=new Ut(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 xi.F:if(y=new Ut(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 xi.o:y="",x=this.figures.s;for(var b=x.length,E=0;E<b;E++){var z=x[E];0<E&&(y+=" x "),z.isFilled&&(y+="F "),y+=z.toString(a)}return y;default:return this.type.toString()}},xi.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},xi.parse=function(a,y){function x(){return je>=Ot-1?!0:le[je+1].match(Xt)!==null}function b(){return je++,le[je]}function E(Ur){var Dr=parseFloat(b()),Ko=parseFloat(b());ct===ct.toLowerCase()&&(Dr=Nt.x+Dr,Ko=Nt.y+Ko),Ur.h(Dr,Ko)}function z(){return E(Nt),Nt}function te(){return E(bt),bt}function re(){var Ur=nt.toLowerCase();return Ur!=="c"&&Ur!=="s"&&Ur!=="q"&&Ur!=="t"?Nt:new tt(2*Nt.x-bt.x,2*Nt.y-bt.y)}y===void 0&&(y=!1);var oe=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(oe,"$1 $2"),a=a.replace(oe,"$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 le=a.split(" ");for(a=0;a<le.length;a++){var ue=le[a];if(ue.match(/(\.[0-9]*)(\.)/gm)!==null){oe=mn();for(var me="",we=!1,Me=0;Me<ue.length;Me++){var Te=ue[Me];Te!=="."||we?Te==="."?(oe.push(me),me="."):me+=Te:(we=!0,me+=Te)}for(oe.push(me),le.splice(a,1),ue=0;ue<oe.length;ue++)le.splice(a+ue,0,oe[ue]);a+=oe.length-1,Wn(oe)}}var je=-1,ct="",nt="";oe=new tt(0,0);var bt=new tt(0,0),Nt=new tt(0,0),Ot=le.length;a=DS(null),we=me=ue=!1,Me=!0,Te=null;for(var Xt=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(je>=Ot-1);)if(nt=ct,ct=b(),ct!=="")switch(ct.toUpperCase()){case"X":Me=!0,me=ue=!1;break;case"M":for(Te=z(),a.mc===null||Me===!0?(pp(a,Te.x,Te.y,ue,!me,we),Me=!1):a.moveTo(Te.x,Te.y),oe.assign(Nt);!x();)Te=z(),a.lineTo(Te.x,Te.y);break;case"L":for(;!x();)Te=z(),a.lineTo(Te.x,Te.y);break;case"H":for(;!x();)Nt=new tt((ct===ct.toLowerCase()?Nt.x:0)+parseFloat(b()),Nt.y),a.lineTo(Nt.x,Nt.y);break;case"V":for(;!x();)Nt=new tt(Nt.x,(ct===ct.toLowerCase()?Nt.y:0)+parseFloat(b())),a.lineTo(Nt.x,Nt.y);break;case"C":for(;!x();){Te=new tt,E(Te);var gn=te(),Fi=z();Hh(a,Te.x,Te.y,gn.x,gn.y,Fi.x,Fi.y)}break;case"S":for(;!x();)Te=re(),gn=te(),Fi=z(),Hh(a,Te.x,Te.y,gn.x,gn.y,Fi.x,Fi.y);break;case"Q":for(;!x();)Te=te(),gn=z(),u0(a,Te.x,Te.y,gn.x,gn.y);break;case"T":for(;!x();)bt=Te=re(),gn=z(),u0(a,Te.x,Te.y,gn.x,gn.y);break;case"B":for(;!x();){Te=parseFloat(b()),gn=parseFloat(b()),Fi=parseFloat(b());var _i=parseFloat(b()),zi=parseFloat(b()),mi=zi,ti=!1;x()||(mi=parseFloat(b()),x()||(ti=parseFloat(b())!==0)),ct===ct.toLowerCase()&&(Fi+=Nt.x,_i+=Nt.y),a.arcTo(Te,gn,Fi,_i,zi,mi,ti)}break;case"A":for(;!x();)Te=Math.abs(parseFloat(b())),gn=Math.abs(parseFloat(b())),Fi=parseFloat(b()),zi=_i=!1,ti=mi=0,mi=b(),mi.length===1?(_i=!!parseFloat(mi),zi=!!parseFloat(b()),mi=parseFloat(b())):mi.length===2?(_i=!!parseFloat(mi[0]),zi=!!parseFloat(mi[1]),mi=parseFloat(b())):(_i=!!parseFloat(mi[0]),zi=!!parseFloat(mi[1]),mi=parseFloat(mi.slice(2))),ti=parseFloat(b()),ct===ct.toLowerCase()&&(mi=Nt.x+mi,ti=Nt.y+ti),Nt.h(mi,ti),wx(a,Te,gn,Fi,_i,zi,mi,ti);break;case"Z":Px(a),Nt.assign(oe);break;case"F":for(Te="",gn=1;le[je+gn];)if(le[je+gn]==="0")we=!0,gn++;else if(le[je+gn].match(/[Uu]/)!==null)gn++;else if(le[je+gn].match(Xt)===null)gn++;else{Te=le[je+gn];break}Te.match(/[Mm]/)?ue=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Te="",gn=1;le[je+gn];)if(le[je+gn].match(/[Ff]/)!==null)gn++;else if(le[je+gn].match(Xt)===null)gn++;else{Te=le[je+gn];break}Te.match(/[Mm]/)?me=!0:a.mc.isShadowed=!1}if(oe=a.os,c0=a,y)for(y=oe.figures.iterator;y.next();)y.value.isFilled=!0;return oe},xi.Ha=function(a,y){for(var x=a.length,b=tt.alloc(),E=0;E<x;E++){var z=a[E];b.x=z[0],b.y=z[1],y.Ga(b),z[0]=b.x,z[1]=b.y,b.x=z[2],b.y=z[3],y.Ga(b),z[2]=b.x,z[3]=b.y,b.x=z[4],b.y=z[5],y.Ga(b),z[4]=b.x,z[5]=b.y,b.x=z[6],b.y=z[7],y.Ga(b),z[6]=b.x,z[7]=b.y}tt.free(b)},xi.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===xi.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},xi.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===xi.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 z=0;z<E;z++){var te=b[z];te._isInvalidBounds=!1,te.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),Lh(this,a,!1),cr(a,0,0,0,0),a.freeze()},xi.prototype.ix=function(){var a=new Ut;return Lh(this,a,!0),a};function Lh(a,y,x){switch(a.type){case xi.j:case xi.u:case xi.F:x?y.h(a.od,a.pd,0,0):cr(y,a.od,a.pd,0,0),cr(y,a.Dc,a.Ec,0,0);break;case xi.o:var b=a.figures;a=b.s,b=b.length;for(var E=0;E<b;E++){var z=a[E];x&&E===0?y.h(z.startX,z.startY,0,0):cr(y,z.startX,z.startY,0,0);for(var te=z.segments.s,re=te.length,oe=z.startX,le=z.startY,ue=0;ue<re;ue++){var me=te[ue];switch(me.type){case ra:case _a:oe=me.endX,le=me.endY,cr(y,oe,le,0,0);break;case Hs:Jt.Dl(oe,le,me.point1X,me.point1Y,me.point2X,me.point2Y,me.endX,me.endY,.5,y),oe=me.endX,le=me.endY;break;case Xl:Jt.iv(oe,le,me.point1X,me.point1Y,me.endX,me.endY,.5,y),oe=me.endX,le=me.endY;break;case Ja:case du:var we=me.type===Ja?yl(me,z):ul(me,z,oe,le),Me=we.length;if(Me===0){oe=me.type===Ja?me.centerX:me.endX,le=me.type===Ja?me.centerY:me.endY,cr(y,oe,le,0,0);break}me=null;for(var Te=0;Te<Me;Te++)me=we[Te],Jt.Dl(me[0],me[1],me[2],me[3],me[4],me[5],me[6],me[7],.5,y);me!==null&&(oe=me[6],le=me[7]);break;default:St("Unknown Segment type: "+me.type)}}}break;default:St("Unknown Geometry type: "+a.type)}}xi.prototype.normalize=function(){this._isFrozen&&Nn(this);var a=this.ix();return this.offset(-a.x,-a.y),new tt(-a.x,-a.y)},xi.prototype.offset=function(a,y){return this._isFrozen&&Nn(this),this.transform(1,0,0,1,a,y),this},xi.prototype.scale=function(a,y){return this._isFrozen&&Nn(this),this.transform(a,0,0,y,0,0),this},xi.prototype.rotate=function(a,y,x){this._isFrozen&&Nn(this),y===void 0&&(y=0),x===void 0&&(x=0);var b=ro.alloc();return b.reset(),b.rotate(a,y,x),this.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),ro.free(b),this},Le=xi.prototype,Le.transform=function(a,y,x,b,E,z){switch(this.type){case xi.j:case xi.u:case xi.F:var te=this.od,re=this.pd;this.od=te*a+re*x+E,this.pd=te*y+re*b+z,te=this.Dc,re=this.Ec,this.Dc=te*a+re*x+E,this.Ec=te*y+re*b+z;break;case xi.o:for(var oe=this.figures.s,le=oe.length,ue=0;ue<le;ue++){var me=oe[ue];te=me.startX,re=me.startY,me.startX=te*a+re*x+E,me.startY=te*y+re*b+z,me=me.segments.s;for(var we=me.length,Me=0;Me<we;Me++){var Te=me[Me];switch(Te.type){case ra:case _a:te=Te.endX,re=Te.endY,Te.endX=te*a+re*x+E,Te.endY=te*y+re*b+z;break;case Hs:te=Te.point1X,re=Te.point1Y,Te.point1X=te*a+re*x+E,Te.point1Y=te*y+re*b+z,te=Te.point2X,re=Te.point2Y,Te.point2X=te*a+re*x+E,Te.point2Y=te*y+re*b+z,te=Te.endX,re=Te.endY,Te.endX=te*a+re*x+E,Te.endY=te*y+re*b+z;break;case Xl:te=Te.point1X,re=Te.point1Y,Te.point1X=te*a+re*x+E,Te.point1Y=te*y+re*b+z,te=Te.endX,re=Te.endY,Te.endX=te*a+re*x+E,Te.endY=te*y+re*b+z;break;case Ja:te=Te.centerX,re=Te.centerY,Te.centerX=te*a+re*x+E,Te.centerY=te*y+re*b+z,y!==0&&(te=180*Math.atan2(y,a)/Math.PI,0>te&&(te+=360),Te.startAngle+=te),0>a&&(Te.startAngle=180-Te.startAngle,Te.sweepAngle=-Te.sweepAngle),0>b&&(Te.startAngle=-Te.startAngle,Te.sweepAngle=-Te.sweepAngle),Te.radiusX*=Math.sqrt(a*a+x*x),Te.radiusY!==void 0&&(Te.radiusY*=Math.sqrt(y*y+b*b));break;case du:if(te=Te.endX,re=Te.endY,Te.endX=te*a+re*x+E,Te.endY=te*y+re*b+z,Te.radiusX===0||Te.radiusY===0)break;y!==0&&(te=180*Math.atan2(y,a)/Math.PI,0>te&&(te+=360),Te.xAxisRotation+=te),0>a&&(Te.xAxisRotation=180-Te.xAxisRotation,Te.isClockwiseArc=!Te.isClockwiseArc),0>b&&(Te.xAxisRotation=-Te.xAxisRotation,Te.isClockwiseArc=!Te.isClockwiseArc),Te.radiusX*=Math.sqrt(a*a+x*x),Te.radiusY*=Math.sqrt(y*y+b*b);break;default:St("Unknown Segment type: "+Te.type)}}}}return this._isInvalidBounds=!0,this},Le.ca=function(a,y){y===void 0&&(y=0);var x=this.od,b=this.pd,E=this.Dc,z=this.Ec;switch(this.type){case xi.j:return Jt.Yb(x,b,E,z,y,a.x,a.y);case xi.u:var te=Ut.allocAt(Math.min(x,E)-y,Math.min(b,z)-y,Math.abs(E-x)+2*y,Math.abs(z-b)+2*y);return a=te.ca(a),Ut.free(te),a;case xi.F:te=Math.min(x,E)-y;var re=Math.min(b,z)-y;return x=(Math.abs(E-x)+2*y)/2,y=(Math.abs(z-b)+2*y)/2,0>=x||0>=y?!1:(te=a.x-(te+x),re=a.y-(re+y),1>=te*te/(x*x)+re*re/(y*y));case xi.o:return ac(this,a,y,!0,!1);default:return!1}};function ac(a,y,x,b,E){var z=y.x;y=y.y;for(var te=a.bounds.x-20,re=0,oe,le,ue,me,we=a.figures.s,Me=we.length,Te=0;Te<Me;Te++){var je=we[Te],ct=!je.isEvenOdd;if(je.isFilled){if(b&&je.ca(z,y,x))return!0;var nt=je.segments;oe=je.startX,le=je.startY;for(var bt=oe,Nt=le,Ot=nt.s,Xt=0;Xt<=nt.length;Xt++){var gn=void 0;if(Xt!==nt.length){gn=Ot[Xt];var Fi=gn.type;a=gn.endX,me=gn.endY}else Fi=ra,a=bt,me=Nt;switch(Fi){case _a:if(bt=cu(z,y,te,y,oe,le,bt,Nt),isNaN(bt))return!0;re+=bt,bt=a,Nt=me;break;case ra:if(oe=cu(z,y,te,y,oe,le,a,me),isNaN(oe))return!0;re+=oe;break;case Hs:ue=Jt.Fo(oe,le,gn.point1X,gn.point1Y,gn.point2X,gn.point2Y,a,me,te,y,z,y,.5),re+=ue;break;case Xl:ue=Jt.Fo(oe,le,(oe+2*gn.point1X)/3,(le+2*gn.point1Y)/3,(2*gn.point1X+a)/3,(2*gn.point1Y+me)/3,a,me,te,y,z,y,.5),re+=ue;break;case Ja:case du:Fi=gn.type===Ja?yl(gn,je):ul(gn,je,oe,le);var _i=Fi.length;if(_i===0){if(oe=cu(z,y,te,y,oe,le,gn.type===Ja?gn.centerX:gn.endX,gn.type===Ja?gn.centerY:gn.endY),isNaN(oe))return!0;re+=oe;break}gn=null;for(var zi=0;zi<_i;zi++){if(gn=Fi[zi],zi===0){if(ue=cu(z,y,te,y,oe,le,gn[0],gn[1]),isNaN(ue))return!0;re+=ue}ue=Jt.Fo(gn[0],gn[1],gn[2],gn[3],gn[4],gn[5],gn[6],gn[7],te,y,z,y,.5),re+=ue}gn!==null&&(a=gn[6],me=gn[7]);break;default:St("Unknown Segment type: "+gn.type)}oe=a,le=me}if(ct){if(re!==0)return!0}else if(re%2!==0)return!0;re=0}else if(je.ca(z,y,E?x:x+2))return!0}return!1}function cu(a,y,x,b,E,z,te,re){if(Jt.Yb(E,z,te,re,.05,a,y))return NaN;var oe=(a-x)*(z-re);if(oe===0)return 0;var le=((a*b-y*x)*(E-te)-(a-x)*(E*re-z*te))/oe;if(y=(a*b-y*x)*(z-re)/oe,le>=a)return 0;if((E>te?E-te:te-E)<(z>re?z-re:re-z)){if(z<re){if(y<z||y>re)return 0}else if(y<re||y>z)return 0}else if(E<te){if(le<E||le>te)return 0}else if(le<te||le>E)return 0;return 0<oe?1:-1}function Mu(a,y,x,b){a=a.figures.s;for(var E=a.length,z=0;z<E;z++)if(a[z].ca(y,x,b))return!0;return!1}Le.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new tt),this.type===xi.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,z=this.flattenedTotalLength*a,te=0,re=0;re<E;re++){var oe=b[re],le=oe.length;for(a=0;a<le;a++){var ue=oe[a];if(te+ue>=z)return b=z-te,b=ue===0?0:b/ue,x=x[re],re=x[2*a],E=x[2*a+1],y.h(re+(x[2*a+2]-re)*b,E+(x[2*a+3]-E)*b),y;te+=ue}}return y},Le.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===xi.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,z=0,te=0;te<b;te++){var re=x[te],oe=re.length;for(a=0;a<oe;a++){var le=re[a];if(z+le>=E)return E=y[te],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;z+=le}}return NaN},Le.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===xi.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,z=this.flattenedTotalLength*a,te=0,re=0;re<E;re++){var oe=b[re],le=oe.length;for(a=0;a<le;a++){var ue=oe[a];if(te+ue>=z)return b=z-te,b=ue===0?0:b/ue,ue=x[re],x=ue[2*a],re=ue[2*a+1],E=ue[2*a+2],a=ue[2*a+3],y[0]=x+(E-x)*b,y[1]=re+(a-re)*b,y[2]=1>Math.abs(E-x)&&1>Math.abs(a-re)?0:1>Math.abs(E-x)?0<=a-re?90:270:1>Math.abs(a-re)?0<=E-x?0:180:180*Math.atan2(a-re,E-x)/Math.PI,y;te+=ue}}return y},Le.xx=function(a){if(this.type===xi.j){var y=this.startX,x=this.startY,b=this.endX,E=this.endY;if(y!==b||x!==E){var z=a.x;if(a=a.y,y===b){if(x<E){var te=x;b=E}else te=E,b=x;return a<=te?te===x?0:1:a>=b?b===x?0:1:Math.abs(a-x)/(b-te)}if(x===E)return y<b?te=y:(te=b,b=y),z<=te?te===y?0:1:z>=b?b===y?0:1:Math.abs(z-y)/(b-te);te=(b-y)*(b-y)+(E-x)*(E-x);var re=tt.alloc();return Jt.qh(y,x,b,E,z,a,re),a=re.x,z=re.y,tt.free(re),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/te)}}else if(this.type===xi.u){te=this.startX,re=this.startY;var oe=this.endX;if(E=this.endY,te!==oe||re!==E){y=oe-te,x=E-re,z=2*y+2*x,b=a.x,a=a.y,b=Math.min(Math.max(b,te),oe),a=Math.min(Math.max(a,re),E),te=Math.abs(b-te),oe=Math.abs(b-oe),re=Math.abs(a-re),E=Math.abs(a-E);var le=Math.min(te,oe,re,E);if(le===re)return b/z;if(le===oe)return(y+a)/z;if(le===E)return(2*y+x-b)/z;if(le===te)return(2*y+2*x-a)/z}}else{y=this.flattenedSegments,x=this.flattenedLengths,z=this.flattenedTotalLength,b=tt.alloc(),E=1/0,re=te=0,oe=y.length;for(var ue=le=0,me=0;me<oe;me++)for(var we=y[me],Me=x[me],Te=we.length,je=0;je<Te;je+=2){var ct=we[je],nt=we[je+1];if(je!==0){Jt.qh(le,ue,ct,nt,a.x,a.y,b);var bt=(b.x-a.x)*(b.x-a.x)+(b.y-a.y)*(b.y-a.y);bt<E&&(E=bt,te=re,te+=Math.sqrt((b.x-le)*(b.x-le)+(b.y-ue)*(b.y-ue))),re+=Me[(je-2)/2]}le=ct,ue=nt}return tt.free(b),a=te/z,0>a?0:1<a?1:a}return 0};function Nh(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],b=[],E=[];if(a.type===xi.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===xi.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===xi.F){var z=new ys;z.startX=a.endX,z.startY=(a.startY+a.endY)/2;var te=new To(Ja);if(te.startAngle=0,te.sweepAngle=360,te.centerX=(a.startX+a.endX)/2,te.centerY=(a.startY+a.endY)/2,te.radiusX=Math.abs(a.startX-a.endX)/2,te.radiusY=Math.abs(a.startY-a.endY)/2,z.add(te),a=yl(te,z),E=a.length,E===0)b.push(te.centerX),b.push(te.centerY);else{te=z.startX,z=z.startY;for(var re=0;re<E;re++){var oe=a[re];Jt.Qe(te,z,oe[2],oe[3],oe[4],oe[5],oe[6],oe[7],.5,b),te=oe[6],z=oe[7]}}y.push(b),x.push(Pd(b))}else for(a=a.figures.iterator;a.next();){E=a.value,b=[],b.push(E.startX),b.push(E.startY),te=E.startX,z=E.startY,re=te,oe=z;for(var le=E.segments.s,ue=le.length,me=0;me<ue;me++){var we=le[me];switch(we.type){case _a:4<=b.length&&(y.push(b),x.push(Pd(b))),b=[],b.push(we.endX),b.push(we.endY),te=we.endX,z=we.endY,re=te,oe=z;break;case ra:b.push(we.endX),b.push(we.endY),te=we.endX,z=we.endY;break;case Hs:Jt.Qe(te,z,we.point1X,we.point1Y,we.point2X,we.point2Y,we.endX,we.endY,.5,b),te=we.endX,z=we.endY;break;case Xl:Jt.ep(te,z,we.point1X,we.point1Y,we.endX,we.endY,.5,b),te=we.endX,z=we.endY;break;case Ja:var Me=yl(we,E),Te=Me.length;if(Te===0){b.push(we.centerX),b.push(we.centerY),te=we.centerX,z=we.centerY;break}for(var je=0;je<Te;je++){var ct=Me[je];Jt.Qe(te,z,ct[2],ct[3],ct[4],ct[5],ct[6],ct[7],.5,b),te=ct[6],z=ct[7]}break;case du:if(Me=ul(we,E,te,z),Te=Me.length,je=we.endX,ct=we.endY,Te===0){b.push(je),b.push(ct),te=je,z=ct;break}for(je=0;je<Te;je++)ct=Me[je],Jt.Qe(te,z,ct[2],ct[3],ct[4],ct[5],ct[6],ct[7],.5,b),te=ct[6],z=ct[7];break;default:St("Segment not of valid type: "+we.type)}we.isClosed&&(b.push(re),b.push(oe))}4<=b.length&&(y.push(b),x.push(Pd(b)))}}}function Pd(a){for(var y=[],x=0,b=0,E=a.length,z=0;z<E;z+=2){var te=a[z],re=a[z+1];z!==0&&y.push(Math.sqrt(Ro(x,b,te,re))),x=te,b=re}return y}Le.add=function(a){return this.ee.add(a),this},Le.pm=function(a,y,x,b,E,z,te,re){return this._isFrozen&&Nn(this),this.fg=new Vi(a,y,E,z).freeze(),this.gg=new Vi(x,b,te,re).freeze(),this},Je.Object.defineProperties(xi.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 Nh(this),this.tk}},flattenedLengths:{get:function(){return Nh(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===xi.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===xi.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],z=E.length,te=0;te<z;te++)a+=E[te]}this.zm=a}return a}},type:{get:function(){return this.na},set:function(a){this.na!==a&&(this._isFrozen&&Nn(this,a),this.na=a,a===xi.o?this.ee=new kn:(xi.V===null&&(xi.V=new kn().freeze()),this.ee=xi.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&Nn(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&Nn(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&Nn(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&Nn(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&Nn(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&Nn(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&Nn(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&Nn(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),xi.prototype.setSpots=xi.prototype.pm,xi.prototype.add=xi.prototype.add,xi.prototype.getFractionForPoint=xi.prototype.xx,xi.prototype.getPointAndAngleAlongPath=xi.prototype.Qu,xi.prototype.getAngleAlongPath=xi.prototype.wx,xi.prototype.getPointAlongPath=xi.prototype.Pu,xi.prototype.containsPoint=xi.prototype.ca,xi.prototype.transform=xi.prototype.transform,xi.prototype.rotate=xi.prototype.rotate,xi.prototype.scale=xi.prototype.scale,xi.prototype.offset=xi.prototype.offset,xi.prototype.normalize=xi.prototype.normalize,xi.prototype.computeBoundsWithoutOrigin=xi.prototype.ix,xi.prototype.equalsApprox=xi.prototype.Xa,xi.className="Geometry",xi.j=new ln(xi,"Line",0),xi.u=new ln(xi,"Rectangle",1),xi.F=new ln(xi,"Ellipse",2),xi.o=new ln(xi,"Path",3),xi.V=null,xi.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",xi.className="Geometry",xi.stringify=xi.ia,xi.fillPath=xi.nb,xi.parse=xi.parse,xi.Line=xi.j,xi.Rectangle=xi.u,xi.Ellipse=xi.F,xi.Path=xi.o;function ys(a,y,x,b,E){Or(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 kn,this.sr=this.pl.Ja,this.fw=null}ys.prototype.copy=function(){var a=new ys;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 z=y[E].copy();b.add(z)}return a.sr=this.sr,a.fw=this.fw,a},Le=ys.prototype,Le.Xa=function(a){if(!(a instanceof ys&&Jt.B(this.startX,a.startX)&&Jt.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},Le.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},Le.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},Le.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},Le.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},Le.add=function(a){return this.pl.add(a),this},Le.ca=function(a,y,x){for(var b=this.startX,E=this.startY,z=b,te=E,re=this.segments.s,oe=re.length,le=0;le<oe;le++){var ue=re[le];switch(ue.type){case _a:z=ue.endX,te=ue.endY,b=ue.endX,E=ue.endY;break;case ra:if(Jt.Yb(b,E,ue.endX,ue.endY,x,a,y))return!0;b=ue.endX,E=ue.endY;break;case Hs:if(Jt.cs(b,E,ue.point1X,ue.point1Y,ue.point2X,ue.point2Y,ue.endX,ue.endY,.5,a,y,x))return!0;b=ue.endX,E=ue.endY;break;case Xl:if(Jt.jv(b,E,ue.point1X,ue.point1Y,ue.endX,ue.endY,.5,a,y,x))return!0;b=ue.endX,E=ue.endY;break;case Ja:case du:var me=ue.type===Ja?yl(ue,this):ul(ue,this,b,E),we=me.length,Me=ue.type===Ja?ue.centerX:ue.endX,Te=ue.type===Ja?ue.centerY:ue.endY;if(we===0){if(Jt.Yb(b,E,Me,Te,x,a,y))return!0;b=Me,E=Te;break}for(Me=null,Te=0;Te<we;Te++)if(Me=me[Te],Te===0&&Jt.Yb(b,E,Me[0],Me[1],x,a,y)||Jt.cs(Me[0],Me[1],Me[2],Me[3],Me[4],Me[5],Me[6],Me[7],.5,a,y,x))return!0;Me!==null&&(b=Me[6],E=Me[7]);break;default:St("Unknown Segment type: "+ue.type)}if(ue.isClosed&&(b!==z||E!==te)&&Jt.Yb(b,E,z,te,x,a,y))return!0}return!1},Je.Object.defineProperties(ys.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&&Nn(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&Nn(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&Nn(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&Nn(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&Nn(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&Nn(this,a),this.pl=a,this._isInvalidBounds=!0}}}),ys.prototype.add=ys.prototype.add,ys.prototype.equalsApprox=ys.prototype.Xa,ys.className="PathFigure";function To(a,y,x,b,E,z,te,re){Or(this),a===void 0&&(a=ra),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),z===void 0&&(z=0),te===void 0&&(te=0),a===du?(a=z%360,0>a&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(b,0),this.Pg=Math.max(E,0),typeof te=="boolean"?te&&(this.isLargeArc=!0):typeof te=="number"&&te&&(this.isLargeArc=!0),re&&(this.isClockwiseArc=!0)):(this.Ne=b,this.Vh=E,a===Ja&&(z=Math.max(z,0)),this.Wh=z,typeof te=="number"?(a===Ja&&(te=Math.max(te,0)),this.Pg=te):this.Pg=0),this.ae=null}To.prototype.copy=function(){var a=new To;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},Le=To.prototype,Le.Xa=function(a){if(!(a instanceof To)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case _a:case ra:return Jt.B(this.endX,a.endX)&&Jt.B(this.endY,a.endY);case Hs:return Jt.B(this.endX,a.endX)&&Jt.B(this.endY,a.endY)&&Jt.B(this.point1X,a.point1X)&&Jt.B(this.point1Y,a.point1Y)&&Jt.B(this.point2X,a.point2X)&&Jt.B(this.point2Y,a.point2Y);case Xl:return Jt.B(this.endX,a.endX)&&Jt.B(this.endY,a.endY)&&Jt.B(this.point1X,a.point1X)&&Jt.B(this.point1Y,a.point1Y);case Ja:return Jt.B(this.startAngle,a.startAngle)&&Jt.B(this.sweepAngle,a.sweepAngle)&&Jt.B(this.centerX,a.centerX)&&Jt.B(this.centerY,a.centerY)&&Jt.B(this.radiusX,a.radiusX)&&Jt.B(this.radiusY,a.radiusY);case du:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&Jt.B(this.xAxisRotation,a.xAxisRotation)&&Jt.B(this.endX,a.endX)&&Jt.B(this.endY,a.endY)&&Jt.B(this.radiusX,a.radiusX)&&Jt.B(this.radiusY,a.radiusY);default:return!1}},Le.qb=function(a){a.classType===To&&(this.type=a)},Le.toString=function(a){switch(a===void 0&&(a=-1),this.type){case _a:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case ra:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Hs: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 Xl: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 Ja: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 du: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":"")},Le.freeze=function(){return this._isFrozen=!0,this},Le.ka=function(){return this._isFrozen=!1,this},Le.close=function(){return this.isClosed=!0,this};function yl(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,z=Jt.jx(0,0,x<b?x:b,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==b){var te=ro.alloc();te.reset(),x<b?te.scale(1,b/x):te.scale(x/b,1),xi.Ha(z,te),ro.free(te)}for(x=z.length,b=0;b<x;b++)te=z[b],te[0]+=y,te[1]+=E,te[2]+=y,te[3]+=E,te[4]+=y,te[5]+=E,te[6]+=y,te[7]+=E;return a.ae=z,a.ae}function ul(a,y,x,b){function E(je,ct,nt,bt){return(je*bt<ct*nt?-1:1)*Math.acos((je*nt+ct*bt)/(Math.sqrt(je*je+ct*ct)*Math.sqrt(nt*nt+bt*bt)))}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 z=a.Pg;y===0&&(y=1e-4),z===0&&(z=1e-4);var te=Math.PI/180*a.Ne,re=a.isLargeArc,oe=a.isClockwiseArc,le=a.Dc,ue=a.Ec,me=Math.cos(te),we=Math.sin(te),Me=me*(x-le)/2+we*(b-ue)/2;te=-we*(x-le)/2+me*(b-ue)/2;var Te=Me*Me/(y*y)+te*te/(z*z);return 1<Te&&(y*=Math.sqrt(Te),z*=Math.sqrt(Te)),Te=(re===oe?-1:1)*Math.sqrt((y*y*z*z-y*y*te*te-z*z*Me*Me)/(y*y*te*te+z*z*Me*Me)),isNaN(Te)&&(Te=0),re=Te*y*te/z,Te=Te*-z*Me/y,isNaN(re)&&(re=0),isNaN(Te)&&(Te=0),x=(x+le)/2+me*re-we*Te,b=(b+ue)/2+we*re+me*Te,ue=E(1,0,(Me-re)/y,(te-Te)/z),me=(Me-re)/y,le=(te-Te)/z,Me=(-Me-re)/y,re=(-te-Te)/z,te=E(me,le,Me,re),Me=(me*Me+le*re)/(Math.sqrt(me*me+le*le)*Math.sqrt(Me*Me+re*re)),-1>=Me?te=Math.PI:1<=Me&&(te=0),!oe&&0<te&&(te-=2*Math.PI),oe&&0>te&&(te+=2*Math.PI),oe=y>z?1:y/z,Me=y>z?z/y:1,y=Jt.jx(0,0,y>z?y:z,ue,ue+te,!0),z=ro.alloc(),z.reset(),z.translate(x,b),z.rotate(a.Ne,0,0),z.scale(oe,Me),xi.Ha(y,z),ro.free(z),a.ae=y,a.ae}Je.Object.defineProperties(To.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&&Nn(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Nn(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&Nn(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Nn(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Nn(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&Nn(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&Nn(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Nn(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Nn(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&qn(a,">= zero",To,"radiusX"),this._isFrozen&&Nn(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&qn(a,">= zero",To,"radiusY"),this._isFrozen&&Nn(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Nn(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&&Nn(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&&Nn(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&&Nn(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&&Nn(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),To.prototype.equalsApprox=To.prototype.Xa;var _a=new ln(To,"Move",0),ra=new ln(To,"Line",1),Hs=new ln(To,"Bezier",2),Xl=new ln(To,"QuadraticBezier",3),Ja=new ln(To,"Arc",4),du=new ln(To,"SvgArc",4);To.className="PathSegment",To.Move=_a,To.Line=ra,To.Bezier=Hs,To.QuadraticBezier=Xl,To.Arc=Ja,To.SvgArc=du;function nl(){this.H=null,this.xu=new tt(0,0).freeze(),this.mt=new tt(0,0).freeze(),this.Bp=this.Rq=0,this.Cp=1,this.xq="",this.Wr=this.Tp=!1,this.Rp=this.Ep=0,this.xg=this.nq=this.tq=!1,this.Zp=null,this.Rr=0,this.xd=this.Nr=null}nl.prototype.copy=function(){var a=new nl;return this.clone(a)},nl.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},nl.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},nl.prototype.So=function(a,y){var x=this.diagram;return x===null||nh(x,a,y),y},nl.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(nh(x,a,y),y.assign(x.Ps(y))),y},Je.Object.defineProperties(nl.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}}}),nl.prototype.getMultiTouchDocumentPoint=nl.prototype.Bz,nl.prototype.getMultiTouchViewPoint=nl.prototype.So,nl.className="InputEvent";function od(){this.H=null,this.xa="",this.ar=this.Lr=null}od.prototype.copy=function(){var a=new od;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},od.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},Je.Object.defineProperties(od.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}}}),od.className="DiagramEvent";function Pa(){this.Fm=wa,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}Pa.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},Pa.prototype.copy=function(){var a=new Pa;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=en(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=en(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=en(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=en(y)&&typeof y.J=="function"?y.J():y,a},Pa.prototype.qb=function(a){a.classType===Pa&&(this.change=a)},Pa.prototype.toString=function(){var a="";return a=this.change===Ll?a+"* ":this.change===wa?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===Ll?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=Qn(this.object)),this.oldValue!==null&&(a+=" old: "+Qn(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+Qn(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},Pa.prototype.I=function(a){return a?this.oldValue:this.newValue},Pa.prototype.Dz=function(a){return a?this.oldParam:this.newParam},Pa.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},Pa.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},Pa.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},Pa.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},Je.Object.defineProperties(Pa.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===Ll&&(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}}}),Pa.prototype.redo=Pa.prototype.redo,Pa.prototype.canRedo=Pa.prototype.canRedo,Pa.prototype.undo=Pa.prototype.undo,Pa.prototype.canUndo=Pa.prototype.canUndo,Pa.prototype.getParam=Pa.prototype.Dz,Pa.prototype.getValue=Pa.prototype.I,Pa.prototype.clear=Pa.prototype.clear;var Ll=new ln(Pa,"Transaction",-1),wa=new ln(Pa,"Property",0),Va=new ln(Pa,"Insert",1),cs=new ln(Pa,"Remove",2);Pa.className="ChangedEvent",Pa.Transaction=Ll,Pa.Property=wa,Pa.Insert=Va,Pa.Remove=cs;function Ps(){this.o=new kn().freeze(),this.xa="",this.j=!1}Ps.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},Ps.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()},Ps.prototype.canUndo=function(){return this.isComplete},Ps.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()}},Ps.prototype.canRedo=function(){return this.isComplete},Ps.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()}},Ps.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new Ii,x=0;x<a.count;x++){var b=a.M(x);if(b!==null&&b.change===wa&&b.object){var E=y.get(b.object);E||(E=new Ii,y.set(b.object,E));var z=E.get(b.propertyName);z===null?E.set(b.propertyName,-1):(0<z&&a.cd(z,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()}},Je.Object.defineProperties(Ps.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}}}),Ps.prototype.optimize=Ps.prototype.ak,Ps.prototype.redo=Ps.prototype.redo,Ps.prototype.canRedo=Ps.prototype.canRedo,Ps.prototype.undo=Ps.prototype.undo,Ps.prototype.canUndo=Ps.prototype.canUndo,Ps.prototype.clear=Ps.prototype.clear,Ps.className="Transaction";function Na(){this.Pt=new _n,this.Jd=!1,this.u=new kn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new kn().freeze(),this.hl=new kn,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}Na.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},Na.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},Na.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},Le=Na.prototype,Le.Xw=function(a){this.Pt.add(a)},Le.Rx=function(a){this.Pt.remove(a)},Le.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},Le.eb=function(a){return a===void 0&&(a=""),ad(this,!0,a)},Le.Kf=function(){return ad(this,!1,"")};function ad(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&Si("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 z=0;if(0<a.transactionLevel&&(a.bi--,a.isEnabled)){var te=a.Ie.count;0<te&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(te-1),a.Ie.freeze()),te=a.hl.count,0<te&&(z=a.hl.M(te-1),a.hl.mb(te-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&&(z=y.M(0),z!==null&&z.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=z,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}Le.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()}},Na.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},Na.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){Si("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},Na.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},Na.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){Si("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},Na.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var b=new Pa;for(b.change=Ll,b.propertyName=a,b.object=x,b.oldValue=y,a=this.models;a.next();)y=a.value,b.model=y,y.ds(b)},Na.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new Ps);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||Si("Change not within a transaction: "+x.toString()))}},Na.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},Je.Object.defineProperties(Na.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}}}),Na.prototype.handleChanged=Na.prototype.Tu,Na.prototype.redo=Na.prototype.redo,Na.prototype.undo=Na.prototype.undo,Na.prototype.canUndo=Na.prototype.canUndo,Na.prototype.discardHistoryAfterIndex=Na.prototype.lx,Na.prototype.rollbackTransaction=Na.prototype.Kf,Na.prototype.commitTransaction=Na.prototype.eb,Na.prototype.startTransaction=Na.prototype.Ea,Na.prototype.removeModel=Na.prototype.Rx,Na.prototype.addModel=Na.prototype.Xw,Na.prototype.clear=Na.prototype.clear,Na.className="UndoManager";function Do(){Or(this),this.H=Xu,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new nl,this.Zr=-1}Do.prototype.toString=function(){return this.name!==""?this.name+" Tool":Hn(this.constructor)},Do.prototype.updateAdornments=function(){},Do.prototype.canStart=function(){return this.isEnabled},Do.prototype.doStart=function(){},Do.prototype.doActivate=function(){this.isActive=!0},Do.prototype.doDeactivate=function(){this.isActive=!1},Do.prototype.doStop=function(){},Do.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},Do.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},Do.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},Do.prototype.doMouseMove=function(){},Do.prototype.doMouseUp=function(){this.stopTool()},Do.prototype.doMouseWheel=function(){},Do.prototype.canStartMultiTouch=function(){return!0},Do.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,tt.allocAt(NaN,NaN)),b=y.So(1,tt.allocAt(NaN,NaN));if(x.w()&&b.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){a.Bw=a.scale;var E=b.x-x.x,z=b.y-x.y;a.Jw=Math.sqrt(E*E+z*z),y.bubbles=!1}tt.free(x),tt.free(b)},Do.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,tt.allocAt(NaN,NaN)),b=y.So(1,tt.allocAt(NaN,NaN));if(x.w()&&b.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){var E=b.x-x.x,z=b.y-x.y;z=Math.sqrt(E*E+z*z)/a.Jw,E=new tt((Math.min(b.x,x.x)+Math.max(b.x,x.x))/2,(Math.min(b.y,x.y)+Math.max(b.y,x.y))/2),z*=a.Bw;var te=a.commandHandler;if(z!==a.scale&&te.canResetZoom(z)){var re=a.zoomPoint;a.zoomPoint=E,te.resetZoom(z),a.zoomPoint=re}y.bubbles=!1}tt.free(x),tt.free(b)},Do.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},Do.prototype.doKeyUp=function(){},Do.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},Do.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},Do.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if($i?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||($i?y.meta:y.control)||y.shift||a.clearSelection()}},Do.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,Rf(a,b,x),b.handled};function Rf(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)}}}Do.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 z=a.Ck,te=z;for(a.Ck=b,this.doCurrentObjectChanged(z,b),y.handled=!1;z!==null;){var re=z.mouseLeave;if(re!==null&&(b===z||b!==null&&b.rg(z)||(re(y,z,b),E=!0,y.handled)))break;z=z.panel}for(z=te,y.handled=!1;b!==null&&(te=b.mouseEnter,!(te!==null&&(z===b||z!==null&&z.rg(b)||(te(y,b,z),E=!0,y.handled))));)b=b.panel;b=a.Ck}if(b!==null){for(z=b,te="";z!==null&&(te=z.cursor,te==="");)z=z.panel;for(a.currentCursor=te,y.handled=!1,z=b;z!==null&&(b=z.mouseOver,!(b!==null&&(b(y,z),E=!0,y.handled)));)z=z.panel}else this.doUpdateCursor(null),b=a.mouseOver,b!==null&&(b(y),E=!0);E&&a.$b(),a.skipsUndoManager=x}},Do.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},Do.prototype.doCurrentObjectChanged=function(){},Do.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===wd&&!y.shift||E===sd&&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===wd&&y.shift||E===sd&&!y.control){b=a.position.copy();var z=y.event;E=z.deltaMode;var te=z.deltaX;z=z.deltaY;var re="pixel";if(te===0&&z===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(re,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(re,0<x?"left":"right",Math.abs(x)));else{switch(E){case 0:re="pixel";break;case 1:re="line";break;case 2:re="page"}te!==0&&a.allowHorizontalScroll&&(te*=a.scrollHorizontalLineChange/16,a.scroll(re,0<te?"right":"left",Math.abs(te))),z!==0&&a.allowVerticalScroll&&(z*=a.scrollVerticalLineChange/16,a.scroll(re,0<z?"down":"up",Math.abs(z)))}this.doWheelChange(a,b,y)}}},Do.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},Do.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,b=y.clone(this.yy);this.Zr=Dn(function(){x.doWaitAfter(b)},a)},Do.prototype.cancelWaitAfter=function(){this.Zr!==-1&&st.clearTimeout(this.Zr),this.Zr=-1},Do.prototype.doWaitAfter=function(){},Do.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof jo);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},Do.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},Je.Object.defineProperties(Do.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof hn&&(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}}}),Do.prototype.startTransaction=Do.prototype.Ea,Do.className="Tool";function fa(){Do.call(this),this.name="ToolManager",this.hb=new kn,this.ob=new kn,this.Hb=new kn,this.F=this.V=850,this.o=new fi(2,2).ja(),this.Ha=5e3,this.ia=sd,this.u=Xd,this.Mp=this.j=null,this.zj=-1}$t(fa,Do),fa.prototype.initializeStandardTools=function(){},fa.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof jo&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},fa.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===ld&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===ud){y.bubbles=!0;return}if(this.gestureBehavior===ld)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===sd?this.mouseWheelBehavior=wd:this.mouseWheelBehavior===wd&&(this.mouseWheelBehavior=sd)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},fa.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===ud){y.bubbles=!0;return}if(this.gestureBehavior===ld)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}}jf(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function jf(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}fa.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof jo&&(y===a||y.rg(a))||this.hideToolTip()},fa.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()))},fa.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)},fa.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 jo)||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()},fa.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof jo){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 oo&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(st.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var E=this;this.zj=Dn(function(){E.hideToolTip()},a)}},fa.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}},fa.prototype.hideToolTip=function(){this.zj!==-1&&(st.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof jo?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof oo&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},fa.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()},fa.prototype.doMouseWheel=function(){this.standardMouseWheel()},fa.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},fa.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},fa.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},fa.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},fa.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)},Je.Object.defineProperties(fa.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 jo?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}}}),fa.prototype.replaceStandardTool=fa.prototype.gb;var sd=new ln(fa,"WheelScroll",0),wd=new ln(fa,"WheelZoom",1),zf=new ln(fa,"WheelNone",2),Xd=new ln(fa,"GestureZoom",3),ld=new ln(fa,"GestureCancel",4),ud=new ln(fa,"GestureNone",5);fa.className="ToolManager",fa.WheelScroll=sd,fa.WheelZoom=wd,fa.WheelNone=zf,fa.GestureZoom=Xd,fa.GestureCancel=ld,fa.GestureNone=ud;function Fa(){Do.call(this),this.name="Dragging",this.u=this.Sw=this.ob=!0,this.o=this.Ha=this.V=this.Oe=null,this.Ym=this.Hb=!1,this.tl=new tt(NaN,NaN),this.Fr=new tt,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new _n().freeze(),this.ia=new ae,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var sc;$t(Fa,Do),Fa.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},Fa.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},Fa.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,($i?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},Fa.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),an=null,this.isActive=!0,this.tl.set(a.position),Yd(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&&Gs(a),$f(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,an=this,zn=this.diagram,this.doSimulatedDragOut()))};function Yd(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof vi?(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 ir,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}Fa.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},Fa.prototype.Pd=function(a){return a===void 0?new Zc(Qr):this.isGridSnapEnabled?new Zc(new tt(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new Zc(a.copy())},Fa.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),_u(this),Ad(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<sc.count){for(var y=sc,x=y.length,b=0;b<x;b++){var E=y.M(b);xc(E),Il(E),_u(E),E.diagram.ug()}y.clear()}xc(this),this.tl.h(NaN,NaN),zn!==null&&(zn.currentCursor=""),an=zn=null,Il(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),Qd(a,!0)},Fa.prototype.stopTransaction=function(){var a=this.diagram,y=Do.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function _u(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,of(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function Fh(){var a=an;Il(a),lc(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}Fa.prototype.doCancel=function(){Il(this),lc(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},Fa.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},Fa.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function kl(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")):lc(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 Ii,b=a.draggedParts.iterator;b.next();){var E=b.key;if(E.Zc()&&E.canCopy()){var z=y.I(E);z!==null&&(z.location=E.location,z.Va(),x.add(z,a.Pd(z.location)))}}for(y=y.iterator;y.next();)b=y.value,b instanceof vi&&b.canCopy()&&x.add(b,a.Pd());a.copiedParts=x,Yd(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Gh(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function Il(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 vi&&(x.value.point=new tt(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 Lu(a,y,x){var b=a.diagram,E=a.startPoint,z=tt.alloc();z.assign(b.lastInput.documentPoint),a.moveParts(y,z.re(E),x),tt.free(z),b.Gf("temporaryPixelRatio")===!0&&b.Yh===null&&30<b.$w&&(Gs(b),b.hk())}Fa.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var b=this.diagram;b!==null&&Cc(b,a,y,this.dragOptions,x)};function lc(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 vi&&b.suspendsRouting){var E=x.value.point;a.draggedParts.add(b,a.Pd()),Gh(b,-E.x,-E.y)}y.bd()}}function Jd(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),Ol(a,!1));var b=a.findDragOverObject(y),E=x.lastInput;E.targetObject=b,a.doUpdateCursor(b);var z=x.skipsUndoManager,te=!1;try{if(x.skipsUndoManager=!0,te=of(a,E,b),!a.isActive&&an===null)return;var re=b!==null?b.part:null;if(re===null||x.handlesDragDropForTopLevelParts&&re.isTopLevel&&!(re instanceof Yr)){var oe=x.mouseDragOver;oe!==null&&(oe(E),te=!0)}if(!a.isActive&&an===null||(a.doDragOver(y,b),!a.isActive&&an===null))return}finally{x.skipsUndoManager=z,te&&x.bd()}a.Bn=b,x.isReadOnly||!x.allowMove&&!x.allowCopy||!x.allowHorizontalScroll&&!x.allowVerticalScroll||x.gs(E.viewPoint)}Fa.prototype.findDragOverObject=function(a){var y=this;return Yu(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof jo||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},Fa.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 of(a,y,x){var b=!1,E=a.Cg.length,z=0<E?a.Cg[0]:null;if(x===z)return!1;y.handled=!1;for(var te=0;te<E;te++){var re=a.Cg[te],oe=re.mouseDragLeave;if(oe!==null&&(oe(y,re,x),b=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&an===null||x===null)return b;for(y.handled=!1,E=x;E!==null;)a.Cg.push(E),E=Ah(E);for(E=a.Cg.length,x=0;x<E&&(te=a.Cg[x],re=te.mouseDragEnter,re===null||(re(y,te,z),b=!0,!y.handled));x++);return b}function Ah(a){var y=a.panel;return y!==null?y:a instanceof pr&&!(a instanceof Yr)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function Hf(a,y,x){var b=a.Oe;if(b===null)return null;var E=a.diagram.og(y,b.portGravity,function(le){return b.findValidLinkablePort(le,x)});a=tt.alloc();var z=1/0,te=null;for(E=E.iterator;E.next();){var re=E.value;if(re.part!==null){var oe=re.ga(wo,a);oe=y.Bf(oe),oe<z&&(te=re,z=oe)}}return tt.free(a),te}function Ol(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 z=null,te=null;x.fromNode===null&&(z=Hf(a,x.i(0),!1),z!==null&&(te=z.part));var re=null,oe=null;x.toNode===null&&(re=Hf(a,x.i(x.pointsCount-1),!0),re!==null&&(oe=re.part)),E.isValidLink(te,z,oe,re)?y?(x.defaultFromPoint=x.i(0),x.defaultToPoint=x.i(x.pointsCount-1),x.suspendsRouting=!1,x.fromNode=te,z!==null&&(x.fromPortId=z.portId),x.toNode=oe,re!==null&&(x.toPortId=re.portId),x.fromPort!==b.Mx&&b.R("LinkRelinked",x,b.Mx),x.toPort!==b.Nx&&b.R("LinkRelinked",x,b.Nx)):Wr(E,te,z,oe,re):Wr(E,null,null,null,null)}}}}Fa.prototype.doDragOver=function(){};function Oc(a,y){var x=a.diagram;a.dragsLink&&Ol(a,!0),_u(a);var b=a.findDragOverObject(y),E=x.lastInput;if(E.targetObject=b,b!==null){E.handled=!1;for(var z=b;z!==null;){var te=z.mouseDrop;if(te!==null&&(te(E,z),E.handled))break;dg(a,E,z),z=Ah(z)}}else z=x.mouseDrop,z!==null&&z(E);if(a.isActive||an!==null){for(E=(a.copiedParts||a.draggedParts).iterator;E.next();)z=E.key,z instanceof Di&&z.linksConnected.each(function(re){re.suspendsRouting=!1});if(a.doDropOnto(y,b),a.isActive||an!==null){for(a=Ut.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof Di&&pt(x,b,a);Ut.free(a)}}}function dg(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof Yr||(x=a.mouseDrop,x!==null&&x(y))}function pt(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 vi},!0,function(E){return E instanceof vi},b),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}Fa.prototype.doDropOnto=function(){},Fa.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()?(kl(this,!1),$f(a,this.copiedParts),Lu(this,this.copiedParts,!1),Ad(a,this.copiedParts)):this.mayMove()?(Il(this),Lu(this,this.draggedParts,!0)):this.mayDragOut()?(kl(this,!1),Lu(this,this.copiedParts,!1)):Il(this),Jd(this,a.lastInput.documentPoint))}},Fa.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?(Il(this),kl(this,!0),$f(a,this.copiedParts),Lu(this,this.copiedParts,!1),Ad(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,Il(this),this.mayMove()&&(Lu(this,this.draggedParts,!0),Jd(this,a.lastInput.documentPoint))),this.Ym=!0,Oc(this,a.lastInput.documentPoint),this.isActive){var b=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&wt(this),a.Ya(),Ad(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",b)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},Fa.prototype.simulatedMouseMove=function(a,y,x){if(an===null)return!1;var b=an.diagram;x instanceof hn||(x=null);var E=zn;return x!==E&&(E!==null&&E!==b&&(E.ug(),an.isDragOutStarted=!1,E=E.toolManager.findTool("Dragging"),E!==null&&E.doSimulatedDragLeave()),zn=x,x!==null&&x!==b&&(Fh(),E=x.toolManager.findTool("Dragging"),E!==null&&(sc.contains(E)||sc.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)},Fa.prototype.simulatedMouseUp=function(a,y,x){if(an===null)return!1;var b=zn,E=an.diagram;if(x===null)return an.doCancel(),!0;if(x!==b){var z=b.toolManager.findTool("Dragging");if(b!==null&&b!==E&&z!==null)return b.ug(),an.isDragOutStarted=!1,z.doSimulatedDragLeave(),!1;zn=x,b=x.toolManager.findTool("Dragging"),b!==null&&(Fh(),sc.contains(b)||sc.add(b),b.doSimulatedDragEnter())}return x!==this.diagram?(a!==null?(a.targetTouches!==void 0&&(0<a.targetTouches.length?a=a.targetTouches[0]:0<a.changedTouches.length&&(a=a.changedTouches[0])),y=x.getMouse(a)):y===null&&(y=new tt),x.lastInput.documentPoint=y,x.lastInput.viewPoint=x.op(y),x.lastInput.down=!1,x.lastInput.up=!0,a=x.toolManager.findTool("Dragging"),a!==null&&a.doSimulatedDrop(),a=an,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function wt(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof Di&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}Fa.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||($i?!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())},Fa.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())},Fa.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())},Fa.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},Fa.prototype.Az=function(){return an},Fa.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=an;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},Fa.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),Cl(a),a.animationManager.Cc(),a=an,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},Fa.prototype.doSimulatedDragLeave=function(){var a=an;a!==null&&a.doSimulatedDragOut(),this.doCancel()},Fa.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=an;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;tn(this,y.draggedParts.Lf(),!1,a.firstInput),Lu(this,this.copiedParts,!1),Jd(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},Fa.prototype.doSimulatedDrop=function(){var a=this.diagram,y=an;if(y!==null){var x=y.diagram;if(y.Ym=!0,Il(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),tn(this,y.draggedParts.Lf(),!0,a.lastInput),Lu(this,this.copiedParts,!1);var b=new _n;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0,b.add(E)})),Oc(this,a.lastInput.documentPoint),a.Ya(),this.copiedParts!==null&&(this.transactionResult="ExternalCopy"),this.copiedParts=null,a.doFocus(),a.R("ExternalObjectsDropped",b,x),this.stopTransaction(),a.R("ChangedSelection",a.selection)}a.animationManager.Dm=!1};function tn(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 z=Ut.alloc();E=b=1/0;for(var te=-1/0,re=-1/0,oe=y.iterator;oe.next();){var le=oe.value;if(le.isVisible()){var ue=le.location;le=ue.x,ue=ue.y,isNaN(le)||isNaN(ue)||(le<b&&(b=le),ue<E&&(E=ue),le>te&&(te=le),ue>re&&(re=ue))}}for(b===1/0?z.h(0,0,0,0):z.h(b,E,te-b,re-E),b=z.x+z.width/2,E=z.y+z.height/2,Ut.free(z),z=a.Fr,te=new Ii,re=tt.alloc(),oe=y.iterator;oe.next();)le=oe.value,le instanceof vi&&le.canCopy()&&(ue=x.I(le),ue!==null&&(ue.points=le.points,Gh(ue,z.x-b,z.y-E),ue.suspendsRouting=!0,te.add(ue,a.Pd())));for(y=y.iterator;y.next();)le=y.value,le.Zc()&&le.canCopy()&&(oe=x.I(le),oe!==null&&(le=le.location,re.h(z.x-(b-le.x),z.y-(E-le.y)),oe.location=re,oe.Va(),te.add(oe,a.Pd(re))));tt.free(re),a.copiedParts=te,Yd(a,te.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Gh(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}Fa.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},Fa.prototype.computeMove=function(a,y,x,b){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,b):new tt},Je.Object.defineProperties(Fa.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}}}),Fa.prototype.getDraggingSource=Fa.prototype.Az;var an=null,zn=null;Fa.className="DraggingTool",sc=new kn,ji("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),fa.prototype.doCancel=function(){an!==null&&an.doCancel(),Do.prototype.doCancel.call(this)};function bn(){Do.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new vi,y=new io;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new io,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new Di,y=new io,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Bo,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new Di,y=new io,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Bo,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 Ii,this.Of=this.gj=this.Pf=null}$t(bn,Do),bn.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},bn.prototype.copyPortProperties=function(a,y,x,b,E){if(a!==null&&y!==null&&x!==null&&b!==null){var z=y.Df(),te=fi.alloc();te.width=y.naturalBounds.width*z,te.height=y.naturalBounds.height*z,b.desiredSize=te,fi.free(te),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=wo,z=tt.alloc(),x.location=y.ga(wo,z),tt.free(z),b.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,b,E)}},bn.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=Bo,y.fromSpot=La,y.toSpot=La),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},bn.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},bn.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof Di){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)}},bn.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof Di))return null;for(;a!==null;){var b=y?a.toLinkable:a.fromLinkable;if(b===!0&&(a.portId!==null||a instanceof Di)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(b===!1)break;a=a.panel}return null},bn.prototype.findTargetPort=function(a){var y=this.diagram,x=y.lastInput.documentPoint,b=this.portGravity;0>=b&&(b=.1);var E=this,z=y.og(x,b,function(me){return E.findValidLinkablePort(me,a)},null,!0);for(b=1/0,y=null,z=z.iterator;z.next();){var te=z.value,re=te.part;if(re instanceof Di){var oe=te.ga(wo,tt.alloc()),le=x.x-oe.x,ue=x.y-oe.y;tt.free(oe),oe=le*le+ue*ue,oe<b&&(le=this.validPortsCache.I(te),le!==null?le&&(y=te,b=oe):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,re,te)||!a&&this.isValidLink(re,te,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(te,!0),y=te,b=oe):this.validPortsCache.add(te,!1))}}return y!==null&&(x=y.part,x instanceof Di&&(x.layer===null||x.layer.allowLink))?y:null},bn.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},bn.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},bn.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},bn.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof Di))return!1;a=a.portId,a===null&&(a="");var b=y.part;if(!(b instanceof Di))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},bn.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)},bn.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 _n;return b.add(a),si(this,x,y,b)};function si(a,y,x,b){if(y===x)return!0;var E=y.fromNode;return E!==null&&E.isLinkLabel&&(b.add(E),si(a,E.labeledLink,x,b))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(b.add(y),si(a,y.labeledLink,x,b))))}bn.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!==uh){if(b===Mg){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!li(this,a,y,x,!0)}if(b===Lg){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!li(this,a,y,x,!0)}if(b===Cg)return a===y?a=!0:(b=new _n,b.add(y),a=ei(this,b,a,y,x)),!a;if(b===bg)return!li(this,a,y,x,!1);if(b===Eg)return a===y?a=!0:(b=new _n,b.add(y),a=Mi(this,b,a,y,x)),!a}return!0};function li(a,y,x,b,E){if(y===x)return!0;if(y===null||x===null)return!1;for(var z=y.linksConnected;z.next();){var te=z.value;if(te!==b&&(!E||te.isTreeLink)&&te.toNode===y&&(te=te.fromNode,te!==y&&li(a,te,x,b,E)))return!0}return!1}function ei(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 z=x.linksConnected;z.next();){var te=z.value;if(te!==E&&te.toNode===x&&(te=te.fromNode,te!==x&&ei(a,y,te,b,E)))return!0}return!1}function Mi(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 z=x.linksConnected;z.next();){var te=z.value;if(te!==E){var re=te.fromNode;if(te=te.toNode,re=re===x?te:re,re!==x&&Mi(a,y,re,b,E))return!0}}return!1}Je.Object.defineProperties(bn.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}}}),bn.className="LinkingBaseTool";function Ai(){bn.call(this),this.name="Linking",this.V={},this.F=null,this.K=Ni,this.Xd=null}$t(Ai,bn),Ai.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},Ai.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 Di)))return null;var x=this.direction;if(x===Ni||x===fr){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===Ni||x===dr)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},Ai.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 Di&&(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 Di&&(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)},Ai.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()},Ai.prototype.doStop=function(){bn.prototype.doStop.call(this),this.startObject=null},Ai.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,b=null,E=null,z=null;try{var te=this.targetPort=this.findTargetPort(this.isForwards);if(te!==null){var re=te.part;re instanceof Di&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),b=re,E=te):(y=re,x=te,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?(z=this.insertLink(y,x,b,E),z!==null?(te===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),z.isSelected=!0),this.transactionResult=this.name,a.R("LinkDrawn",z)):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(),z&&a.allowSelect&&a.R("ChangedSelection",a.selection)}}},Ai.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof vi)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)},Ai.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},Ai.prototype.doNoLink=function(){},Je.Object.defineProperties(Ai.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 Ni=new ln(Ai,"Either",0),fr=new ln(Ai,"ForwardsOnly",0),dr=new ln(Ai,"BackwardsOnly",0);Ai.className="LinkingTool",Ai.Either=Ni,Ai.ForwardsOnly=fr,Ai.BackwardsOnly=dr;function ir(){bn.call(this),this.name="Relinking";var a=new io;a.figure="Diamond",a.desiredSize=Ho,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new io,a.figure="Diamond",a.desiredSize=Ho,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new Ut}$t(ir,bn),ir.prototype.updateAdornments=function(a){if(a!==null&&a instanceof vi){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)}},ir.prototype.makeAdornment=function(a,y){var x=new jo;return x.type=hi.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},ir.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},ir.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 jo&&x.adornedPart instanceof vi))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=Tr),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=Tr),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},ir.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===yp||x===$h)&&(x=Zl),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}},ir.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()},ir.prototype.doStop=function(){bn.prototype.doStop.call(this),this.handle=null},ir.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,z=this.originalLink;try{if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null){var te=this.targetPort.part;te instanceof Di&&(this.isForwards?(b=te,E=this.targetPort):(y=te,x=this.targetPort))}else this.isUnconnectedLinkValid?this.isForwards?E=b=null:x=y=null:z=null;z!==null?(this.reconnectLink(z,this.isForwards?b:y,this.isForwards?E:x,this.isForwards),this.targetPort===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint,z.bb()),this.transactionResult=this.name,a.R("LinkRelinked",z,this.isForwards?this.originalToPort:this.originalFromPort)):this.doNoRelink(this.originalLink,this.isForwards),this.originalLink.Xo(this.Ew)}finally{this.stopTool()}}},ir.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},ir.prototype.doNoRelink=function(){};function Wr(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)}Je.Object.defineProperties(ir.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 jo))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),ir.className="RelinkingTool",ji("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),ji("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function sr(){Do.call(this),this.name="LinkReshaping";var a=new io;a.figure="Rectangle",a.desiredSize=aa,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new io,a.figure="Diamond",a.desiredSize=Ho,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new tt,this.Yq=new kn}$t(sr,Do),sr.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:Ir},sr.prototype.om=function(a,y){a.reshapingBehavior=y},sr.prototype.updateAdornments=function(a){if(a!==null&&a instanceof vi){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)}},sr.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,b=y.isOrthogonal,E=null;if(y.points!==null&&1<x){E=new jo,E.type=hi.Link,x=y.firstPickIndex;var z=y.lastPickIndex,te=b?1:0;if(y.resegmentable&&y.computeCurve()!==$u)for(var re=x+te;re<z-te;re++){var oe=this.makeResegmentHandle(a,re);oe!==null&&(oe.segmentIndex=re,oe.segmentFraction=.5,oe.fromMaxLinks=999,E.add(oe))}for(te=x+1;te<z;te++)if(re=this.makeHandle(a,te),re!==null){if(re.segmentIndex=te,te!==x)if(te===x+1&&b){oe=y.i(x);var le=y.i(x+1);Jt.B(oe.x,le.x)&&Jt.B(oe.y,le.y)&&(le=y.i(x-1)),Jt.B(oe.x,le.x)?(this.om(re,xo),re.cursor="n-resize"):Jt.B(oe.y,le.y)&&(this.om(re,eo),re.cursor="w-resize")}else te===z-1&&b?(oe=y.i(z-1),le=y.i(z),Jt.B(oe.x,le.x)&&Jt.B(oe.y,le.y)&&(oe=y.i(z+1)),Jt.B(oe.x,le.x)?(this.om(re,xo),re.cursor="n-resize"):Jt.B(oe.y,le.y)&&(this.om(re,eo),re.cursor="w-resize")):te!==z&&(this.om(re,ko),re.cursor="move");E.add(re)}E.adornedObject=a}return E},sr.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},sr.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},sr.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},sr.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 vi){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}}},sr.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},sr.prototype.stopTransaction=function(){var a=this.diagram,y=Do.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},sr.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},sr.prototype.getResegmentingPoint=function(){return this.handle.ga(wo)},sr.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},sr.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),z=y.i(x+1);if(y.isOrthogonal){if(x>y.firstPickIndex+1&&x<y.lastPickIndex-1){var te=y.i(x-2);if(Math.abs(b.x-E.x)<this.resegmentingDistance&&Math.abs(b.y-E.y)<this.resegmentingDistance&&(zr(this,te,b,E,z,!0)||zr(this,te,b,E,z,!1))){var re=y.points.copy();zr(this,te,b,E,z,!0)?(re.cd(x-2,new tt(te.x,(z.y+te.y)/2)),re.cd(x+1,new tt(z.x,(z.y+te.y)/2))):(re.cd(x-2,new tt((z.x+te.x)/2,te.y)),re.cd(x+1,new tt((z.x+te.x)/2,z.y))),re.mb(x),re.mb(x-1),y.points=re,y.Wb()}else te=y.i(x+2),Math.abs(E.x-z.x)<this.resegmentingDistance&&Math.abs(E.y-z.y)<this.resegmentingDistance&&(zr(this,b,E,z,te,!0)||zr(this,b,E,z,te,!1))&&(re=y.points.copy(),zr(this,b,E,z,te,!0)?(re.cd(x-1,new tt(b.x,(b.y+te.y)/2)),re.cd(x+2,new tt(te.x,(b.y+te.y)/2))):(re.cd(x-1,new tt((b.x+te.x)/2,b.y)),re.cd(x+2,new tt((b.x+te.x)/2,te.y))),re.mb(x+1),re.mb(x),y.points=re,y.Wb())}}else te=tt.alloc(),Jt.qh(b.x,b.y,z.x,z.y,E.x,E.y,te)&&te.Bf(E)<this.resegmentingDistance*this.resegmentingDistance&&(b=y.points.copy(),b.mb(x),y.points=b,y.Wb()),tt.free(te)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function zr(a,y,x,b,E,z){return z?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}sr.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===xo?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):b===eo&&(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===xo?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):b===eo&&(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),z=y.i(b-1),te=y.i(b+1);Jt.B(z.x,E.x)&&Jt.B(E.y,te.y)?(Jt.B(z.x,y.i(b-2).x)&&!Jt.B(z.y,y.i(b-2).y)?(y.m(b,a.x,z.y),x++,b++):y.L(b-1,a.x,z.y),Jt.B(te.y,y.i(b+2).y)&&!Jt.B(te.x,y.i(b+2).x)?y.m(b+1,te.x,a.y):y.L(b+1,te.x,a.y)):Jt.B(z.y,E.y)&&Jt.B(E.x,te.x)?(Jt.B(z.y,y.i(b-2).y)&&!Jt.B(z.x,y.i(b-2).x)?(y.m(b,z.x,a.y),x++,b++):y.L(b-1,z.x,a.y),Jt.B(te.x,y.i(b+2).x)&&!Jt.B(te.y,y.i(b+2).y)?y.m(b+1,a.x,te.y):y.L(b+1,a.x,te.y)):Jt.B(z.x,E.x)&&Jt.B(E.x,te.x)?(Jt.B(z.x,y.i(b-2).x)&&!Jt.B(z.y,y.i(b-2).y)?(y.m(b,a.x,z.y),x++,b++):y.L(b-1,a.x,z.y),Jt.B(te.x,y.i(b+2).x)&&!Jt.B(te.y,y.i(b+2).y)?y.m(b+1,a.x,te.y):y.L(b+1,a.x,te.y)):Jt.B(z.y,E.y)&&Jt.B(E.y,te.y)&&(Jt.B(z.y,y.i(b-2).y)&&!Jt.B(z.x,y.i(b-2).x)?(y.m(b,z.x,a.y),x++,b++):y.L(b-1,z.x,a.y),Jt.B(te.y,y.i(b+2).y)&&!Jt.B(te.x,y.i(b+2).x)?y.m(b+1,te.x,a.y):y.L(b+1,te.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&&(z=b.findVisibleNode(),z!==null&&z!==b&&(b=z,E=b.port)),x===1&&y.computeSpot(!0,E).Mc()&&(z=E.ga(wo,tt.alloc()),b=y.getLinkPointFromPoint(b,E,z,a,!0,tt.alloc()),y.L(0,b.x,b.y),tt.free(z),tt.free(b)),b=y.toNode,E=y.toPort,b!==null&&(z=b.findVisibleNode(),z!==null&&z!==b&&(b=z,E=b.port)),x===y.pointsCount-2&&y.computeSpot(!1,E).Mc()&&(x=E.ga(wo,tt.alloc()),a=y.getLinkPointFromPoint(b,E,x,a,!1,tt.alloc()),y.L(y.pointsCount-1,a.x,a.y),tt.free(x),tt.free(a));y.zf()},sr.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case ko:return a;case xo:return new tt(y.i(x).x,a.y);case eo:return new tt(a.x,y.i(x).y);default:case Ir:return y.i(x)}},Je.Object.defineProperties(sr.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 jo))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}}}),sr.prototype.setReshapingBehavior=sr.prototype.om,sr.prototype.getReshapingBehavior=sr.prototype.Ru;var Ir=new ln(sr,"None",0),eo=new ln(sr,"Horizontal",1),xo=new ln(sr,"Vertical",2),ko=new ln(sr,"All",3);sr.className="LinkReshapingTool",sr.None=Ir,sr.Horizontal=eo,sr.Vertical=xo,sr.All=ko,ji("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function $r(){Do.call(this),this.name="Resizing",this.o=new fi(1,1).freeze(),this.j=new fi(9999,9999).freeze(),this.yg=new fi(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new io;a.alignmentFocus=wo,a.figure="Rectangle",a.desiredSize=aa,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new tt,this.Dw=new fi,this.Tn=new tt,this.rt=new fi(0,0),this.qt=new fi(1/0,1/0),this.pt=new fi(1,1)}$t($r,Do),$r.prototype.updateAdornments=function(a){if(!(a===null||a instanceof vi)){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(),vf(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},$r.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new jo,y.type=hi.Spot,y.locationSpot=wo;var x=new Hl;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,Ba)),y.add(this.makeHandle(a,su)),y.add(this.makeHandle(a,vl)),y.add(this.makeHandle(a,Ml)),y.add(this.makeHandle(a,Ua)),y.add(this.makeHandle(a,xs)),y.add(this.makeHandle(a,vs)),y.add(this.makeHandle(a,ss))}else if(hc(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},$r.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},$r.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=wo),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 hi)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},$r.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},$r.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))},$r.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},$r.prototype.stopTransaction=function(){var a=this.diagram,y=Do.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},$r.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},$r.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,b=this.pt,E=this.adornedObject.qs(a.lastInput.documentPoint,tt.alloc()),z=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,z),this.resize(y),a.bd(),tt.free(E)}},$r.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,b=this.pt,E=this.adornedObject.qs(a.lastInput.documentPoint,tt.alloc()),z=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,z),this.resize(y),tt.free(E),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},$r.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 Yr){var b=new kn;if(b.add(a),!this.dragsMembers&&a.placeholder===null){var E=new ae;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()}},$r.prototype.computeResize=function(a,y,x,b,E,z){y.Mc()&&(y=wo);var te=this.adornedObject.naturalBounds,re=te.x,oe=te.y,le=te.x+te.width,ue=te.y+te.height,me=1;if(!z){me=te.width;var we=te.height;0>=me&&(me=1),0>=we&&(we=1),me=we/me}return we=tt.alloc(),Jt.No(a.x,a.y,re,oe,E.width,E.height,we),a=te.copy(),0>=y.x?0>=y.y?(a.x=Math.max(we.x,le-b.width),a.x=Math.min(a.x,le-x.width),a.width=Math.max(le-a.x,x.width),a.y=Math.max(we.y,ue-b.height),a.y=Math.min(a.y,ue-x.height),a.height=Math.max(ue-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(me*a.width,b.height),x.height),a.width=a.height/me):(a.width=Math.max(Math.min(a.height/me,b.width),x.width),a.height=me*a.width),a.x=le-a.width,a.y=ue-a.height)):1<=y.y?(a.x=Math.max(we.x,le-b.width),a.x=Math.min(a.x,le-x.width),a.width=Math.max(le-a.x,x.width),a.height=Math.max(Math.min(we.y-oe,b.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(me*a.width,b.height),x.height),a.width=a.height/me):(a.width=Math.max(Math.min(a.height/me,b.width),x.width),a.height=me*a.width),a.x=le-a.width)):(a.x=Math.max(we.x,le-b.width),a.x=Math.min(a.x,le-x.width),a.width=le-a.x,z||(a.height=Math.max(Math.min(me*a.width,b.height),x.height),a.width=a.height/me,a.y=oe+.5*(ue-oe-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(we.x-re,b.width),x.width),a.y=Math.max(we.y,ue-b.height),a.y=Math.min(a.y,ue-x.height),a.height=Math.max(ue-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(me*a.width,b.height),x.height),a.width=a.height/me):(a.width=Math.max(Math.min(a.height/me,b.width),x.width),a.height=me*a.width),a.y=ue-a.height)):1<=y.y?(a.width=Math.max(Math.min(we.x-re,b.width),x.width),a.height=Math.max(Math.min(we.y-oe,b.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(me*a.width,b.height),x.height),a.width=a.height/me):(a.width=Math.max(Math.min(a.height/me,b.width),x.width),a.height=me*a.width))):(a.width=Math.max(Math.min(we.x-re,b.width),x.width),z||(a.height=Math.max(Math.min(me*a.width,b.height),x.height),a.width=a.height/me,a.y=oe+.5*(ue-oe-a.height))):0>=y.y?(a.y=Math.max(we.y,ue-b.height),a.y=Math.min(a.y,ue-x.height),a.height=ue-a.y,z||(a.width=Math.max(Math.min(a.height/me,b.width),x.width),a.height=me*a.width,a.x=re+.5*(le-re-a.width))):1<=y.y&&(a.height=Math.max(Math.min(we.y-oe,b.height),x.height),z||(a.width=Math.max(Math.min(a.height/me,b.width),x.width),a.height=me*a.width,a.x=re+.5*(le-re-a.width))),tt.free(we),a},$r.prototype.computeReshape=function(){var a=ai;return this.adornedObject instanceof io&&(a=kv(this.adornedObject)),!(a===tr||this.diagram.lastInput.shift)},$r.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},$r.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},$r.prototype.computeCellSize=function(){var a=new fi(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},Je.Object.defineProperties($r.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 jo))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 jo)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}}}),$r.className="ResizingTool",ji("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function So(){Do.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new tt,this.ue=null;var a=new io;a.figure="Ellipse",a.desiredSize=Ho,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new tt(NaN,NaN),this.u=0,this.F=50}$t(So,Do),So.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)}},So.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new jo,y.type=hi.Position,y.locationSpot=wo;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(hc(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},So.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},So.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)},So.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(wo)},So.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)},So.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new tt(NaN,NaN),this.isActive=a.isMouseCaptured=!1},So.prototype.stopTransaction=function(){var a=this.diagram,y=Do.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},So.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},So.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},So.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()},So.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()}},So.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},Je.Object.defineProperties(So.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 jo))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 jo)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}}}),So.className="RotatingTool",ji("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function Xo(){Do.call(this),this.name="ClickSelecting"}$t(Xo,Do),Xo.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},Xo.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},Xo.className="ClickSelectingTool";function _r(){Do.call(this),this.name="Action",this.pk=null}$t(_r,Do),_r.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},_r.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()},_r.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))}},_r.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()},_r.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())},_r.prototype.doStop=function(){this.pk=null},_r.className="ActionTool";function co(){Do.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new tt(0,0)}$t(co,Do),co.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)},co.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},co.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 pr)x.Zc()&&(hc(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);en(E)&&(y.model.xf(E),b=y.Lc(E))}if(b!==null){var z=tt.allocAt(a.x,a.y);this.isGridSnapEnabled&&Gf(this.diagram,b,a,z),b.location=z,y.allowSelect&&(y.clearSelection(!0),b.isSelected=!0),tt.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",b)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return b},Je.Object.defineProperties(co.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}}}),co.className="ClickCreatingTool";function Xr(){Do.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new pr;a.layerName="Tool",a.selectable=!1;var y=new io;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}$t(Xr,Do),Xr.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))},Xr.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},Xr.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},Xr.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=fi.alloc().h(y.width,y.height);x.desiredSize=b,this.box.mm(y.x,y.y,!1),fi.free(b),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},Xr.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()},Xr.prototype.computeBoxBounds=function(){var a=this.diagram;return new Ut(a.firstInput.documentPoint,a.lastInput.documentPoint)},Xr.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),$i?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 kn,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)}},Je.Object.defineProperties(Xr.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}}}),Xr.className="DragSelectingTool";function Cr(){Do.call(this),this.name="Panning",this.Xt=new tt,this.xy=new tt,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(st.document,"scroll",a.Kw,!1),a.stopTool()}}$t(Cr,Do),Cr.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())},Cr.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(st.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},Cr.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},Cr.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},Cr.prototype.doMouseMove=function(){this.move()},Cr.prototype.doMouseUp=function(){this.move(),this.stopTool()},Cr.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)}},Je.Object.defineProperties(Cr.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),Cr.className="PanningTool",ji("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),ji("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),ji("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),ji("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),ji("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function oo(){this.F=this.u=this.j=this.o=null}Je.Object.defineProperties(oo.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}}}),oo.className="HTMLInfo";function Mo(a,y,x){this.text=a,this.hx=y,this.visible=x}Mo.className="ContextMenuButtonInfo";function Zo(){Do.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new tt,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}$t(Zo,Do);function Wo(a){var y=new oo;y.show=function(E,z,te){te.showDefaultContextMenu()},y.hide=function(E,z){z.hideDefaultContextMenu()},pa=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");st.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",Kr,!1),b.addEventListener(y,"selectstart",Kr,!1),b.addEventListener(x,"contextmenu",Kr,!1)),y.className="goCXforeground",x.className="goCXbackground",st.document.body&&(st.document.body.appendChild(y),st.document.body.appendChild(x)),na=y,ja=x,ds=!0}function Kr(a){return a.preventDefault(),!1}Zo.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)},Zo.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},Zo.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},Zo.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,b=null;if(a instanceof hn||(a instanceof Yt?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},Zo.prototype.doActivate=function(){},Zo.prototype.doMouseDown=function(){if(Do.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof jo){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&Yo(this)},Zo.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof jo){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}Yo(this)};function Yo(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var b=null;x instanceof oo||(b=y.ic(y.lastInput.documentPoint,null,null),b!==null&&b.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(b)}}else a.canStart()&&(ia(a,!0),a.isActive||a.stopTool())}Zo.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function ia(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=pa,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var b=x.contextMenu;b!==null?(a.currentObject=x instanceof Yt?x:null,a.showContextMenu(b,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof jo&&!a.currentContextMenu.visible&&a.stopTool()}}Zo.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},Zo.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof jo){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 oo&&a.show(y,x,this);this.currentContextMenu=a},Zo.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}},Zo.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof jo?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof oo&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function Ta(a){var y=new kn;return y.add(new Mo("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new Mo("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new Mo("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new Mo("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new Mo("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new Mo("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new Mo("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new Mo("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new Mo("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new Mo("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new Mo("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new Mo("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new Mo("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}Zo.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=Ta(this)),na.innerHTML="",ja.addEventListener("pointerdown",this.tu,!1);var y=this,x=Jn("ul");x.className="goCXul",na.appendChild(x),x.innerHTML="";for(var b=this.jt.iterator;b.next();){var E=b.value,z=E.visible;if(typeof E.hx=="function"&&(typeof z!="function"||z(a))){z=Jn("li"),z.className="goCXli";var te=Jn("a");te.className="goCXa",te.href="#",te.ky=E.hx,te.addEventListener("pointerdown",function(re){return this.ky(a),y.stopTool(),re.preventDefault(),!1},!1),te.textContent=E.text,z.appendChild(te),x.appendChild(z)}}na.style.display="block",ja.style.display="block"},Zo.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===pa){na.style.display="none",ja.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(ja,"pointerdown",this.tu,!1),this.currentContextMenu=null}},Je.Object.defineProperties(Zo.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof jo?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return ds===!1&&pa===null&&Ha&&Wo(this),pa},set:function(a){a===null&&(ds=!0),pa=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var pa=null,ds=!1,ja=null,na=null;Zo.className="ContextMenuTool",ji("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function Fo(){Do.call(this),this.name="TextEditing",this.Zh=new ua,this.ia=null,this.V=Co,this.vj=null,this.qa=Po,this.u=1,this.F=!0,this.o=null,this.j=new oo,this.kt=null,Sa(this,this.j)}$t(Fo,Do);function Sa(a,y){if(Ha){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(Io)):E==="Tab"?(a.acceptText($o),b.preventDefault()):E==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Po){var b=a.kt;a.qa===Jo&&(a.qa=ga),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Po){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,z){if(b instanceof ua&&z instanceof Fo)if(z.state===Us)x.style.border="3px solid red",x.focus();else{var te=b.ga(wo),re=E.position,oe=E.scale,le=b.Df()*oe;le<z.minimumEditorScale&&(le=z.minimumEditorScale);var ue=b.naturalBounds.width*le+6,me=b.naturalBounds.height*le+2,we=(te.x-re.x)*oe;te=(te.y-re.y)*oe,re=b.verticalAlignment,oe=(b.lineHeight+b.spacingAbove+b.spacingBelow)*b.lineCount*le,me=re.y*me-re.y*oe+re.offsetY-(.5*me-.5*oe)-oe/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*le+"%",x.style.lineHeight="normal",x.style.width=ue+"px",x.style.left=(we-ue/2|0)-1+"px",x.style.top=(te+me|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=le,x.className="goTXarea",E.div.appendChild(x),x.focus(),z.selectsTextOnActivate&&(x.select(),x.setSelectionRange(0,9999))}},y.hide=function(b){b.div.removeChild(x)}}}Fo.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||cl&&cl!==this&&(cl.acceptText(Ns),cl&&cl!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof ua&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===Co&&!y.isSelected||this.starting===Aa&&2>a.lastInput.clickCount)):!1},Fo.prototype.doStart=function(){cl=this,this.textBlock!==null&&this.doActivate()},Fo.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 ua&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=Jo;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var b=new Ut(this.textBlock.ga(Ba),this.textBlock.ga(vl));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},Fo.prototype.doCancel=function(){this.stopTool()},Fo.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},Fo.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Ns)},Fo.prototype.acceptText=function(a){switch(a){case Ns:this.qa===Zs?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===Jo||this.qa===Us||this.qa===ga)&&(this.qa=ma,hs(this));break;case Qa:case Io:case $o:(Io!==a||this.textBlock.isMultiline!==!0)&&(this.qa===Jo||this.qa===Us||this.qa===ga)&&(this.qa=ma,hs(this))}};function hs(a){var y=a.textBlock,x=a.diagram,b=a.currentTextEditor;if(y!==null&&b!==null){var E=y.text,z="";b.valueFunction!==null&&(z=b.valueFunction()),a.isValidText(y,E,z)?(a.Ea(a.name),a.qa=Zs,a.transactionResult=a.name,y.text=z,a.doSuccess(E,z),x!==null&&x.R("TextEdited",y,E),a.stopTransaction(),a.stopTool(),x!==null&&x.doFocus()):(a.qa=Us,a.doError(E,z))}}Fo.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)},Fo.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},Fo.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Po,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},Fo.prototype.doStop=function(){cl=null},Fo.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)))},Fo.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},Je.Object.defineProperties(Fo.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)}}}),Fo.prototype.measureTemporaryTextBlock=Fo.prototype.Lx;var Qa=new ln(Fo,"LostFocus",0),Ns=new ln(Fo,"MouseDown",1),$o=new ln(Fo,"Tab",2),Io=new ln(Fo,"Enter",3),Go=new ln(Fo,"SingleClick",0),Co=new ln(Fo,"SingleClickSelected",1),Aa=new ln(Fo,"DoubleClick",2),Po=new ln(Fo,"StateNone",0),Jo=new ln(Fo,"StateActive",1),ga=new ln(Fo,"StateEditing",2),ma=new ln(Fo,"StateValidating",3),Us=new ln(Fo,"StateInvalid",4),Zs=new ln(Fo,"StateValidated",5),cl=null;Fo.className="TextEditingTool",Fo.LostFocus=Qa,Fo.MouseDown=Ns,Fo.Tab=$o,Fo.Enter=Io,Fo.SingleClick=Go,Fo.SingleClickSelected=Co,Fo.DoubleClick=Aa,Fo.StateNone=Po,Fo.StateActive=Jo,Fo.StateEditing=ga,Fo.StateValidating=ma,Fo.StateInvalid=Us,Fo.StateValidated=Zs,ji("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function ka(a){Yl||(dl(),Yl=!0),this.H=Xu,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=Ds,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new _n,this.ce=new za,this.ce.Yd=this,this.Ei=new _n,this.pu=new _n,this.Sr=new _n,this.pr=new _n,a&&Object.assign(this,a)}ka.prototype.Xe=function(a){this.H=a},ka.prototype.canStart=function(){return!0};function il(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),$s(a.H),a.zb=!0)}function Fs(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,b=a.Zd.contains("Model");b&&(a.Ok=!0,a.Pk===Ds?(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===Ql&&y.vc.clear(),a.Qw=!!(a.Pk===Jl&&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(),rl(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,b=y.vc.get(x),x.autoScale!==xl&&b!==null&&(delete b.start.scale,delete b.end.scale),st.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Gs(x),Md(x),a.zb=!1,y.start(),y.bc&&(Oa(a),x.Ya(),Pc(y,0),Cl(x,!0),qa(a),x.R("AnimationStarting",a)))}))}}function Ws(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function uc(a,y,x,b){a.isTicking||Ws(a)||y instanceof vi&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}Le=ka.prototype,Le.fv=function(a){return this.ce.fv(a)},Le.Xu=function(a){return this.ce.Xu(a)};function Ia(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 z=E.pu.iterator;z.next();){var te=z.value;if(te.bc!==!1){e:if(0<te.yl.count)var re=!0;else{for(re=te.vc.iterator;re.next();){var oe=re.key;if(oe instanceof Yt&&oe.diagram!==null||oe instanceof hn){re=!0;break e}}re=!1}re?fu(te,!1):te.Xk=!0}}E.pu.clear(),E.bc!==!1&&(Oa(E),Cl(E.H),qa(E)),st.requestAnimationFrame(x)}}var b=a.Ei,E=a;a.bc?a.Sr.add(y):(a.bc=!0,b.add(y),st.requestAnimationFrame(function(){x()}))}function $a(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function Oa(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 qa(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}Le.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(),rl(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),rl(y,this.H)},Le.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))},Le.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),Xa(this,a))},Le.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),es(this.ce,y,"position",y.position,y.position),Xa(this,a))};function As(a,y,x){!a.zb||y.D(x)||Ws(a)||(a.H.pi||(y=x.copy()),es(a.ce,a.H,"position",y,x))}function da(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function Xa(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function _s(a,y,x,b,E){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var z=a[0],te=a[1],re=a[2];a=a[3];var oe=y[0],le=y[1],ue=y[2];return y=y[3],re===0||re===100?(z=oe,te=le):(ue===0||ue===100)&&(oe=z,le=te),180<Math.abs(oe-z)&&(oe>z?z+=360:oe+=360),z=E(x,z,oe-z,b)%360,te=E(x,te,le-te,b),re=E(x,re,ue-re,b),x=E(x,a,y-a,b),"hsla("+z+", "+te+"%, "+re+"%, "+x+")"}function dl(){function a(x,b,E,z,te,re){x.position=new tt(z(te,b.x,E.x-b.x,re),z(te,b.y,E.y-b.y,re))}var y=new Ii;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,b,E,z,te,re){te<re?x.mm(z(te,b.x,E.x-b.x,re),z(te,b.y,E.y-b.y,re),!1):x.position=new tt(z(te,b.x,E.x-b.x,re),z(te,b.y,E.y-b.y,re))}),y.add("location",function(x,b,E,z,te,re){te<re?x.mm(z(te,b.x,E.x-b.x,re),z(te,b.y,E.y-b.y,re),!0):x.location=new tt(z(te,b.x,E.x-b.x,re),z(te,b.y,E.y-b.y,re))}),y.add("position:placeholder",function(x,b,E,z,te,re){te<re?x.mm(z(te,b.x,E.x-b.x,re),z(te,b.y,E.y-b.y,re),!1):x.position=new tt(z(te,b.x,E.x-b.x,re),z(te,b.y,E.y-b.y,re))}),y.add("position:nodeCollapse",function(x,b,E,z,te,re){var oe=x.actualBounds,le=E.actualBounds;E=le.x+le.width/2-oe.width/2,oe=le.y+le.height/2-oe.height/2,te<re?x.mm(z(te,b.x,E-b.x,re),z(te,b.y,oe-b.y,re),!1):x.position=new tt(z(te,b.x,E-b.x,re),z(te,b.y,oe-b.y,re))}),y.add("desiredSize",function(x,b,E,z,te,re){x.desiredSize=new Ut(z(te,b.width,E.width-b.width,re),z(te,b.height,E.height-b.height,re))}),y.add("width",function(x,b,E,z,te,re){x.width=z(te,b,E-b,re)}),y.add("height",function(x,b,E,z,te,re){x.height=z(te,b,E-b,re)}),y.add("fill",function(x,b,E,z,te,re){x.fill=_s(b,E,te,re,z)}),y.add("stroke",function(x,b,E,z,te,re){x.stroke=_s(b,E,te,re,z)}),y.add("strokeWidth",function(x,b,E,z,te,re){x.strokeWidth=z(te,b,E-b,re)}),y.add("strokeDashOffset",function(x,b,E,z,te,re){x.strokeDashOffset=z(te,b,E-b,re)}),y.add("background",function(x,b,E,z,te,re){x.background=_s(b,E,te,re,z)}),y.add("areaBackground",function(x,b,E,z,te,re){x.areaBackground=_s(b,E,te,re,z)}),y.add("opacity",function(x,b,E,z,te,re){x.opacity=z(te,b,E-b,re)}),y.add("scale",function(x,b,E,z,te,re){x.scale=z(te,b,E-b,re)}),y.add("angle",function(x,b,E,z,te,re){x.angle=z(te,b,E-b,re)}),hu=y}Je.Object.defineProperties(ka.prototype,{animationReasons:{get:function(){return this.Zd}},isEnabled:{get:function(){return this.Jd},set:function(a){(this.Jd=a)&&this.Ei.each(function(y){y.isAnimating||y.runCount!==1/0||y.start()})}},duration:{get:function(){return this.Dg},set:function(a){1>a&&qn(a,">= 1",ka,"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}}}),ka.prototype.stopAnimation=ka.prototype.Cc;var hu=null,Yl=!1,Ds=new ln(ka,"Default",1),Jl=new ln(ka,"AnimateLocations",2),Ql=new ln(ka,"None",3);ka.className="AnimationManager",ka.defineAnimationEffect=function(a,y){Yl||(dl(),Yl=!0),hu.add(a,y)},ka.Default=Ds,ka.AnimateLocations=Jl,ka.None=Ql;function za(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=Qr,this.vc=new Ii,this.Tt=new Ii,this.yl=new _n,this.Ut=new _n,this.dw=Td,a&&Object.assign(this,a)}za.prototype.suspend=function(){this.Xk=!0},za.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,fu(this,!0),Oa(this.Yd),Cl(this.H),qa(this.Yd),this.H.redraw()};function rl(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}Le=za.prototype,Le.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 hn?a=x:x instanceof Yt&&(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===Ds&&this===y.defaultAnimation&&(this.Lp=Fu,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=cf),Oa(y),this.yl.each(function(b){b.data=null,a.add(b)}),qa(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,Ia(y,this),this)},Le.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},Le.add=function(a,y,x,b,E){if(y==="position"&&x.Xa(b))return this;if(this.H===null&&(a instanceof hn?this.H=a:a instanceof Yt&&a.diagram!==null&&(this.H=a.diagram)),a instanceof pr){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return es(this,a,y,x,b,E),this};function es(a,y,x,b,E,z){var te=a.vc;if(y instanceof hn&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(Gu(b),_f(),b=[Su.j,Su.u,Su.o,Su.F],Gu(E),_f(),E=[Su.j,Su.u,Su.o,Su.F]),te.contains(y)){var re=te.I(y),oe=re.start,le=re.end;oe[x]===void 0&&(oe[x]=Ya(b)),le[x]=Ya(E)}else oe={},le={},oe[x]=Ya(b),le[x]=Ya(E),re=oe.position,y instanceof Yt&&re instanceof tt&&!re.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&re.assign(le.position),re=new gu(oe,le,z),te.add(y,re);te=oe[x],te instanceof tt&&!te.w()&&te.assign(a.o),z&&x.indexOf("position:")===0&&y instanceof pr?re.Ku.location=Ya(y.location):z&&(re.Ku[x]=Ya(b))}function Ya(a){return a instanceof tt||a instanceof fi?a.copy():a}Le.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},Le.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function fu(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),Oa(x),Pc(a,E),Cl(a.H,!0),qa(x),b>a.cn&&(a.ho&&!a.Wk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Wk=!0):a.Ml(!1))}}}function Pc(a,y){for(var x=a.Gd,b=a.vc.iterator,E=a.Wk;b.next();){var z=b.key;if(!(z instanceof Yt&&z.diagram===null)){var te=b.value,re=E?te.end:te.start;te=E?te.start:te.end;var oe=hu,le;for(le in te)le==="position"&&(te["position:placeholder"]||te["position:nodeCollapse"])||oe.get(le)===null||oe.get(le)(z,re[le],te[le],a.Lp,y,x,a)}}}Le.stop=function(){return this.bc?(this.Ml(!0),this):this},Le.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,Oa(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 z=hu;b.next();){var te=b.key,re=b.value,oe=E?re.end:re.start,le=E?re.start:re.end,ue=re.Ku,me;for(me in le)if(z.get(me)!==null){var we=me;!re.Hu||we!=="position:nodeCollapse"&&we!=="position:placeholder"||(we="position"),z.get(we)(te,oe[me],ue[me]!==void 0?ue[me]:re.Hu?oe[me]:le[me],this.Lp,this.Gd,this.Gd,this)}re.Hu&&ue.location!==void 0&&te instanceof pr&&(te.location=ue.location),re.nv&&te instanceof pr&&te.Zb(!1)}if(y.As.clear(),Qd(y,!1),y.Ya(),y.N(),Cl(y,!0),x.defaultAnimation===this){for(me=x.pr.iterator;me.next();)E=me.value,E.Tg!==null&&(E.points=E.Tg,E.Tg=null);x.pr.clear()}Cl(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),qa(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),rl(this,null),x.Ml(this),y.$b())}},Le.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof Yr&&(b=y.placeholder),b!==null?(x=b.ga(Ba),b=b.padding,x.x+=b.left,x.y+=b.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new tt(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof Yr)for(a=a.memberParts;a.next();)b=a.value,b instanceof Di&&this.Cj(b,y)},Le.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof Yr&&(x=y.placeholder),x!==null){var b=x.ga(Ba);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 Yr)for(a=a.memberParts;a.next();)b=a.value,b instanceof Di&&this.Aj(b,y)}},Le.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},Je.Object.defineProperties(za.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&qn(a,">= 1",za,"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:St("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}}}),za.prototype.getTemporaryState=za.prototype.Ez,za.prototype.stop=za.prototype.stop,za.prototype.add=za.prototype.add,za.prototype.addTemporaryPart=za.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 Fu(a,y,x,b){return a===b?y+x:x*(-Math.pow(2,-10*a/b)+1)+y}za.className="Animation",za.EaseLinear=function(a,y,x,b){return x*a/b+y},za.EaseInOutQuad=Nu,za.EaseInQuad=function(a,y,x,b){return x*(a/=b)*a+y},za.EaseOutQuad=function(a,y,x,b){return-x*(a/=b)*(a-2)+y},za.EaseInExpo=function(a,y,x,b){return a===0?y:x*Math.pow(2,10*(a/b-1))+y},za.EaseOutExpo=Fu;function gu(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}gu.className="AnimationState";function ql(a,y,x){this.xd=null,this.rf=a,this.so=x||rs,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=Bs))}ql.prototype.copy=function(){var a=new ql(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 Da(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))}Je.Object.defineProperties(ql.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 rs=new ln(ql,"Default",1),Bs=new ln(ql,"Immediate",2),os=new ln(ql,"Bundled",3);ql.className="AnimationTrigger",ql.Default=rs,ql.Immediate=Bs,ql.Bundled=os;function Ca(a){Or(this),this.H=null,this.Pa=new kn,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)}Le=Ca.prototype,Le.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,gl(x)}a.clear(),this.Zq.length=0},Le.Xe=function(a){this.H=a},Le.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,z=0,te=0,re=this.Pa.iterator;re.next();){var oe=re.value;oe instanceof Yr?E++:oe instanceof Di?b++:oe instanceof vi?z++:oe instanceof jo?te++:x++}if(re="",0<x&&(re+=x+" Parts "),0<b&&(re+=b+" Nodes "),0<E&&(re+=E+" Groups "),0<z&&(re+=z+" Links "),0<te&&(re+=te+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,re+=`
|
|
|
`+x.toString(),b=x.data,b!==null&&br(b)&&(re+=" #"+br(b)),x instanceof Di?re+=" "+Qn(b):x instanceof vi&&(re+=" "+Qn(x.fromNode)+" "+Qn(x.toNode));return y+" "+this.Pa.count+": "+re},Le.ic=function(a,y,x){if(y===void 0&&(y=null),x===void 0&&(x=null),this.Uh===!1)return null;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var E=tt.alloc(),z=this.Pa.s,te=z.length;te--;){var re=z[te];if((b!==!0||vf(re)!==!1)&&re.isVisible()&&(E.assign(a),qr(E,re.oe),re=re.ic(E,y,x),re!==null&&(y!==null&&(re=y(re)),re!==null&&(x===null||x(re)))))return tt.free(E),re}return tt.free(E),null},Le.ji=function(a,y,x,b){if(y===void 0&&(y=null),x===void 0&&(x=null),b instanceof kn||b instanceof _n||(b=new _n),this.Uh===!1)return b;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var z=tt.alloc(),te=this.Pa.s,re=te.length;re--;){var oe=te[re];if((E!==!0||vf(oe)!==!1)&&oe.isVisible()){z.assign(a),qr(z,oe.oe);var le=oe;oe.ji(z,y,x,b)&&(y!==null&&(le=y(le)),le===null||x!==null&&!x(le)||b.add(le))}}return tt.free(z),b},Le.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 kn||E instanceof _n||(E=new _n),this.Uh===!1)return E;var z=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(z=!0);for(var te=this.Pa.s,re=te.length;re--;){var oe=te[re];if((z!==!0||vf(oe)!==!1)&&oe.isVisible()){var le=oe;oe.Cf(a,y,x,b,E)&&(y!==null&&(le=y(le)),le===null||x!==null&&!x(le)||E.add(le))}}return E},Le.Nu=function(a,y,x,b,E,z,te){if(this.Uh===!1)return E;for(var re=this.Pa.s,oe=re.length;oe--;){var le=re[oe];if((te!==!0||vf(le)!==!1)&&z(le)&&le.isVisible()){var ue=le;le.Cf(a,y,x,b,E)&&(y!==null&&(ue=y(ue)),ue===null||x!==null&&!x(ue)||E.add(ue))}}return E},Le.og=function(a,y,x,b,E,z){if(x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof kn||E instanceof _n)&&(z=E),E=!0),z instanceof kn||z instanceof _n||(z=new _n),this.Uh===!1)return z;var te=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(te=!0);for(var re=tt.alloc(),oe=tt.alloc(),le=this.Pa.s,ue=le.length;ue--;){var me=le[ue];if((te!==!0||vf(me)!==!1)&&me.isVisible()){re.assign(a),qr(re,me.oe),oe.h(a.x+y,a.y),qr(oe,me.oe);var we=me;me.og(re,oe,x,b,E,z)&&(x!==null&&(we=x(we)),we===null||b!==null&&!b(we)||z.add(we))}}return tt.free(re),tt.free(oe),z},Le.Fd=function(a,y){if(this.visible){var x=this.Pa.s,b=x.length;if(b!==0){a=mn();for(var E=mn(),z=0;z<b;z++){var te=x[z];if(te.vw=z,te instanceof vi){if(te.fd===!1)continue}else if(te instanceof jo&&te.adornedPart!==null)continue;var re=te.actualBounds;te.isVisible()&&rr(re,y)?(te.Fd(!0),a.push(te)):(te.Fd(!1),te.adornments!==null&&0<te.adornments.count&&E.push(te))}for(y=0;y<a.length;y++)for(x=a[y],Kv(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++)Kv(E[y]);Wn(a),Wn(E)}}};function Ts(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}Le.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=Ts(this,a);var z=this.Zq;z.length=0;for(var te=y.scale,re=Ut.alloc(),oe=0;oe<b;oe++)this.Oj(a,x[oe],y,z,te,re,!0);if(Ut.free(re),a.isTemporary)for(y=0;y<b;y++)x[y].Gj();a.globalAlpha=E}}};function Rl(a,y,x,b,E){if(a.visible&&a.pb!==0&&(E||!a.isTemporary)){E=a.Pa.s;var z=E.length;if(z!==0){var te=Ts(a,y),re=a.Zq;re.length=0;for(var oe=x.scale,le=Ut.alloc(),ue=0;ue<z;ue++){var me=E[ue];b.contains(me)&&a.Oj(y,me,x,re,oe,le,!1)}Ut.free(le),y.globalAlpha=te}}}Le.Oj=function(a,y,x,b,E,z,te){if(te&&!vf(y))a.Hs(y);else{if(b!==null&&y instanceof vi&&(y.isOrthogonal&&b.push(y),y.fd===!1)){a.Hs(y);return}for(te=!1,b=y.containingGroup;b!==null;)te?b.tb!==null&&z.Ex(b.tb):b.tb!==null&&(te=!0,z.assign(b.tb)),b=b.containingGroup;var re=y.actualBounds;if(b=!1,te&&y.isVisible()){if(!z.Yc(re)){a.Hs(y);return}b=!z.Re(re)}b&&(a.save(),a instanceof Uo?a.bk=z.copy():(a.beginPath(),a.rect(z.x,z.y,z.width,z.height),a.clip())),re.width*E>x.Oq||re.height*E>x.Oq?y.gc(a,x):(E=y.actualBounds,z=y.naturalBounds,E.width===0||E.height===0||isNaN(E.x)||isNaN(E.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(Za(y,a,y.areaBackground,!0,!0,z,E),a.fillRect(E.x,E.y,E.width,E.height)),y.areaBackground===null&&y.background===null&&(Za(y,a,"rgba(0,0,0,0.3)",!0,!1,z,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),Za(y,a,y.background,!0,!1,z,E),a.fillRect(0,0,z.width/2,z.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))}},Le.g=function(a,y,x,b,E){var z=this.diagram;z!==null&&z.cb(wa,a,this,y,x,b,E)},Le.oi=function(a,y,x){var b=this.Pa;if(y.Ig=this,this===null&&gl(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)),zu(this,a,y),a},Le.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,gl(y),a};function zu(a,y,x){if(y=Cd(a,y,x),x instanceof Yr&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var b=-1,E=a.Pa.s,z=E.length,te=0;te<z;te++){var re=E[te];if(re===x&&(y=te,0<=b)||0>b&&re.containingGroup===x&&(b=te,0<=y))break}!(0>b)&&b<y&&(E=a.Pa,E.mb(y),E.Gb(b,x))}y=x.containingGroup,y!==null&&zu(a,-1,y)}x.svg!==null&&x.svg.remove()}function Cd(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 z=y-1,te=NaN;0<=z&&(te=a.M(z).zOrder,!!isNaN(te));)z--;for(var re=y+1,oe=NaN;re<E&&(oe=a.M(re).zOrder,!!isNaN(oe));)re++;if(!isNaN(te)&&te>b)for(;;){if(z===-1||te<=b){if(z++,z===y)break;return a.mb(y),a.Gb(z,x),z}for(te=NaN;0<=--z&&(te=a.M(z).zOrder,isNaN(te)););}else if(!isNaN(oe)&&oe<b)for(;;){if(re===E||oe>=b){if(re--,re===y)break;return a.mb(y),a.Gb(re,x),re}for(oe=NaN;++re<E&&(oe=a.M(re).zOrder,isNaN(oe)););}return y}Je.Object.defineProperties(Ca.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===""&&St("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&St("Layer.name is already present in this diagram: "+a);for(this.xa=a,this.g("name",y,a),a=this.Pa.iterator;a.next();)a.value.layerName=this.xa}}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&qn(a,"0 <= value <= 1",Ca,"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))}}}),Ca.prototype.findObjectsNear=Ca.prototype.og,Ca.prototype.findObjectsIn=Ca.prototype.Cf,Ca.prototype.findObjectsAt=Ca.prototype.ji,Ca.prototype.findObjectAt=Ca.prototype.ic,Ca.className="Layer";function hn(a,y){if(ip||(hl(),ip=!0),Or(this),Xu=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,Ha){var x=this,b=function(){x.removeEventListener(st.document,"DOMContentLoaded",b,!1),x.setRTL()};st.document.body!==null?this.setRTL():x.addEventListener(st.document,"DOMContentLoaded",b,!1)}this.ol=null,Uf.add("Model",qo);var E=this;return this.Hb=function(z){var te=E.partManager;if(z.model===te.diagram.model&&te.diagram.aa){te.diagram.aa=!1;try{var re=z.change;z.modelChange===""&&re===wa&&te.updateDataBindings(z.object,z.propertyName)}finally{te.diagram.aa=!0}}},this.Oc=function(z){E.partManager.doModelChanged(z)},this.hu=this.ku=null,af(this),this.model=xy(),this.Wg=!0,qd(this),this.layout=new Ma,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 rp,a!==void 0&&(typeof a=="string"||st.Element&&a instanceof Element?Dh(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var Rc,Xu;function af(a){a.Yd=new ka,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new kn,a.pj=new Ii,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new tt(NaN,NaN).freeze(),a.du=new tt(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new tt(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new ro,a.zu=new tt(NaN,NaN).freeze(),a.ut=new Ut(NaN,NaN,NaN,NaN).freeze(),a.rj=new Oi(0,0,0,0).freeze(),a.sj=Td,a.nu=!1,a.Zt=null,a.fu=null,a.yh=xl,a.zk=Vo,a.Fg=xl,a.pq=Vo,a.yt=Ba,a.Bt=Ba,a.Fc=!0,a.pn=!1,a.De=new _n,a.Eh=new Ii,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Oi(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new nl,a.bq.diagram=a,a.Qg=new nl,a.Qg.diagram=a,a.cj=new nl,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,Wp(a),a.ai=new _n,a.Ht=!0,a.uu=hd,a.pw=!1,a.wu=uh,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 Ii,a.Xn=new kn,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 Oi(5).freeze(),a.Hw=new _n().freeze(),a.Nt=999999999,a.nw=new _n().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 _n,a.ow=new _n,a.Xh=null,a.aw=new fi(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new tt,bounds:new Ut,Py:new fi,bA:new fi,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new Ut(NaN,NaN,NaN,NaN).freeze(),a.wo=new fi(NaN,NaN).freeze(),a.Sp=new Ut(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new Ii;var y=new Di,x=new ua;x.bind(new fs("text","",Qn)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Di,x=new ua,x.stroke="brown",x.bind(new fs("text","",Qn)),y.add(x),a.Lg.add("Comment",y),y=new Di,y.selectable=!1,y.avoidable=!1,x=new io,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new fi(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new Ii,y=new Yr,y.selectionObjectName="GROUPPANEL",y.type=hi.Vertical,x=new ua,x.font="bold 12pt sans-serif",x.bind(new fs("text","",Qn)),y.add(x),x=new hi(hi.Auto),x.name="GROUPPANEL";var b=new io;b.figure="Rectangle",b.fill="rgba(128,128,128,0.2)",b.stroke="black",x.add(b),b=new Hl,b.padding=new Oi(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new Ii,y=new vi,x=new io,x.isPanelMain=!0,y.add(x),x=new io,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new vi,x=new io,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new jo,y.type=hi.Auto,x=new io,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Hl,x.margin=new Oi(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new jo,y.type=hi.Link,x=new io,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 qo,a.toolManager=new fa,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new ae,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=Ed(),a.eq=null,a.fq=po,a.Pw=!1,a.Mb=1,a.Yh=null,a.Oq=1,a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0,a.yq=1,a.tw=0,a.uw=new tt,a.zy=500,a.wp=new tt,a.wq=!1}hn.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),Ih=null,Bd="",bd(this,!1),this.Xn.clear(),fp(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function bd(a,y){a.animationManager.Cc(!0),a.Hw=new _n().freeze(),a.nw=new _n().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 z=[],te=a.Wa.length;if(y){for(y=0;y<te;y++)for(var re=a.Wa.s[y].parts;re.next();){var oe=re.value;oe!==E&&oe.data===null&&z.push(oe)}for(y=0;y<z.length;y++)a.remove(z[y])}for(y=0;y<te;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(),fp(),a.Og.clear(),Wi=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),z}function Ed(){return null}hn.prototype.reset=function(){this.clear(),this.vb=!0,af(this),Ec(this),this.Wg=!0,qd(this),this.layout=new Ma,this.Wg=!1,this.model=xy(),this.model.undoManager=new Na,this.vb=this.rn=!1,this.N()},hn.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=st.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},hn.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=st.document.body);var y=0;if(Ha){var x=np;y=Rc,x===null&&(x=np=Jn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Rc=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||$i||(y=11)}this.Db=y,this.Gw=!0},hn.prototype.qb=function(a){a.classType===hn&&(this.autoScale=a)},hn.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 Dh(a,y){if(Ha){if(y!=null||St("Diagram setup requires an argument DIV."),a.Ka!==null&&St("Diagram has already completed setup."),typeof y=="string"?a.Ka=st.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:St("No DIV or DIV id supplied: "+y),a.Ka===null&&St("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&St("Invalid div id; div already has a Diagram associated with it."),!a.ol&&st.ResizeObserver){var x=En(function(){a.$b()},250);a.ol=new st.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}st.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=st.go;var E=new al(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",st.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),Fd(a,a.Aa,a.ya),a.Ka.insertBefore(E.Oa,a.Ka.firstChild),E=new al(null),E.width=1,E.height=1,a.jw=E,a.oy=E.context,Ha){E=Jn("div");var z=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",z.style.position="absolute",z.style.width="1px",z.style.height="1px",a.Ka.appendChild(E),E.appendChild(z),E.onscroll=Zf,E.addEventListener("pointerdown",eh),E.H=a,E.uy=!0,E.vy=!0,a.ku=E,a.hu=z}a.hk=En(function(){a.Yh=null,a.N()},300),a.Ov=En(function(){Md(a)},250),a.preventDefault=function(te){return te.preventDefault(),!1},a.$j=function(te){if(a.isEnabled){var re=jl(a,te,!0);re.bubbles=!0;var oe=0,le=0;re.delta=0,te.deltaX!==void 0?(te.deltaX!==0&&(oe=0<te.deltaX?1:-1),te.deltaY!==0&&(le=0<te.deltaY?1:-1),re.delta=Math.abs(te.deltaX)>Math.abs(te.deltaY)?-oe:-le):te.wheelDeltaX!==void 0?(te.wheelDeltaX!==0&&(oe=0<te.wheelDeltaX?-1:1),te.wheelDeltaY!==0&&(le=0<te.wheelDeltaY?-1:1),re.delta=Math.abs(te.wheelDeltaX)>Math.abs(te.wheelDeltaY)?-oe:-le):te.wheelDelta!==void 0&&te.wheelDelta!==0&&(re.delta=0<te.wheelDelta?1:-1),a.doMouseWheel(),eu(re,te)}},a.aA=function(te){a.isEnabled&&(a.Vk=!1,jl(a,te,!0),te=a.currentTool,te.cancelWaitAfter(),te.standardMouseOver())},a.ui=function(te){if(a.isEnabled){a.Vk=!0;var re=a.Yt;re[te.pointerId]===void 0&&(re[te.pointerId]=te),re=a.oj;var oe=!1;if(re[0]===null||re[0].pointerId!==te.pointerId&&re[0].pointerType===te.pointerType)if(re[1]!==null&&re[1].pointerId===te.pointerId)re[1]=te,oe=!0;else if(re[0]===null)re[0]=te;else if(re[1]===null)re[1]=te,oe=!0;else{te.preventDefault();return}else re[0]=te;(re=te.pointerType==="touch"||te.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var le=oe;oe=Bh(a,te,!0,!1,!0,le),wc(a,te,oe),oe.targetDiagram=dd(te,te.target),oe.targetObject=null,le||oe.clone(a.bq),le=a.uw,re=re?25:10,te.timeStamp-a.tw<a.zy&&!(Math.abs(le.x-te.screenX)>re||Math.abs(le.y-te.screenY)>re)?a.yq++:a.yq=1,oe.clickCount=a.yq,a.tw=te.timeStamp,a.uw.sg(te.screenX,te.screenY),a.doMouseDown(),te.button===1?te.preventDefault():eu(oe,te)}},a.dk=function(te){if(a.isEnabled){a.Vk=!0;var re=a.oj;if(re[0]===null||re[0].pointerId!==te.pointerId&&re[0].pointerType===te.pointerType){if(re[1]!==null&&re[1].pointerId===te.pointerId){re[1]=te;return}if(re[0]===null)re[0]=te;else return}else re[0]=te;if(re[0].pointerId===te.pointerId){re=Bh(a,te,!1,!1,!1,re[1]!==null);var oe=st.document.elementFromPoint(te.clientX,te.clientY)||null;oe!==null&&oe.shadowRoot!==void 0&&oe.shadowRoot!==null&&(oe=oe.shadowRoot.elementFromPoint(te.clientX,te.clientY));var le=a,ue=te;oe&&oe.H&&(ue=te,le=oe.H),re.targetDiagram=le,wc(a,ue,re),re.targetObject=null,a.doMouseMove(),eu(re,te)}}},a.fk=function(te){if(a.isEnabled){a.Vk=!0;var re=te.pointerType==="touch"||te.pointerType==="pen",oe=a.Yt;if(re&&a.qu)delete oe[te.pointerId],te.preventDefault();else if(oe=a.oj,oe[0]===null||oe[0].pointerId!==te.pointerId&&oe[0].pointerType===te.pointerType)oe[1]!==null&&oe[1].pointerId===te.pointerId&&(oe[1]=null);else{oe[0]=null,oe=Bh(a,te,!1,!0,!0,!1);var le=st.document.elementFromPoint(te.clientX,te.clientY)||null;le!==null&&le.shadowRoot!==void 0&&le.shadowRoot!==null&&(le=le.shadowRoot.elementFromPoint(te.clientX,te.clientY)),le!==null&&le.H instanceof hn&&le.H!==a&&wc(le.H,te,oe),le===null&&(le=te.target),wc(a,te,oe),oe.clickCount=a.yq,oe.targetDiagram=dd(te,le),oe.targetObject=null,a.doMouseUp(),eu(oe,te),re&&(a.wq=!1)}}},a.ek=function(te){if(a.isEnabled){a.Vk=!1;var re=a.Yt;re[te.pointerId]&&delete re[te.pointerId],re=a.oj,re[0]!==null&&re[0].pointerId===te.pointerId&&(re[0]=null),re[1]!==null&&re[1].pointerId===te.pointerId&&(re[1]=null),te.pointerType!=="touch"&&te.pointerType!=="pen"&&(te=a.currentTool,te.cancelWaitAfter(),te.standardMouseOver())}},a.ck=function(te){var re=a.oj;re[0]!==null&&re[0].pointerId===te.pointerId?(re[0]=null,a.wq=!1):re[1]!==null&&re[1].pointerId===te.pointerId&&(re[1]=null)},a.Vp=b.Z["d"+hh[1]+hh[2]+"wI"+dh.slice(1,5)]["b"+Bx.slice(1,y)](b.Z,df,y,y),b.Vc(!0),Qg(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}hn.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},hn.prototype.removeEventListener=function(a,y,x,b){a.removeEventListener(y,x,{capture:b})};function Qg(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(st,"resize",a.Ov,!1)}function Gs(a){30<a.Sq&&(a.Yh=1)}function Qd(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),Ti&&Ti.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}hn.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:st.devicePixelRatio||1},hn.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},hn.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},hn.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},hn.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},hn.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},hn.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},hn.prototype.doFocus=function(){this.focus()},hn.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=st.scrollX||st.pageXOffset,y=st.scrollY||st.pageYOffset;this.ta.focus(),st.scrollTo(a,y)}},hn.prototype.Oy=function(){this.H.R("GainedFocus")},hn.prototype.Ny=function(){this.H.R("LostFocus")};function Md(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===xl&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function qd(a){var y=new Ca;y.name="Background",a.Al(y),y=new Ca,y.name="",a.Al(y),y=new Ca,y.name="Foreground",a.Al(y),y=new Ca,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new Ca,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new Ca,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function sf(a){var y=new hi(hi.Grid);y.name="GRID";var x=new io;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new io,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new io,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new io,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new io,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new io,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new pr,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):Hc(this.H)}function eh(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):Hc(this.H)}hn.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,z=this.rj,te=b.x-z.left,re=b.y-z.top,oe=b.width+z.left+z.right,le=b.height+z.top+z.bottom,ue=b.right+z.right;z=b.bottom+z.bottom;var me=E.x;b=E.y;var we=E.width,Me=E.height,Te=E.right,je=E.bottom;E=this.scale;var ct=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":ct=ct+a.scrollWidth-a.clientWidth;break;case"reverse":ct=a.scrollWidth-ct-a.clientWidth}var nt=ct;we<oe||Me<le?(ct=tt.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==nt&&(ct.x=nt/E+te,this.ju=nt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(ct.y=a.scrollTop/E+re,this.lu=a.scrollTop),this.position=ct,tt.free(ct),this.Ee=this.qr=!1):(ct=tt.alloc(),a.uy&&this.allowHorizontalScroll&&(te<me&&(this.position=ct.h(nt+te,this.position.y)),ue>Te&&(this.position=ct.h(-(y.scrollWidth-this.Aa)+nt-this.Aa/E+ue,this.position.y))),a.vy&&this.allowVerticalScroll&&(re<b&&(this.position=ct.h(this.position.x,a.scrollTop+re)),z>je&&(this.position=ct.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/E+z))),tt.free(ct),this.vd=!0,this.Ee=this.qr=!1,b=this.documentBounds,E=this.viewportBounds,ue=b.right,Te=E.right,z=b.bottom,je=E.bottom,te=b.x,me=E.x,re=b.y,b=E.y,we>=oe&&te>=me&&ue<=Te&&(x.style.width="1px"),Me>=le&&re>=b&&z<=je&&(x.style.height="1px"))}},hn.prototype.computeBounds=function(a){return a===void 0&&(a=new Ut),$s(this),th(this,a)};function th(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,z=0;z<E;z++){var te=b[z];if(te.visible&&te.isInDocumentBounds){te=te.Pa.s;for(var re=te.length,oe=0;oe<re;oe++){var le=te[oe];le.isInDocumentBounds&&le.isVisible()&&(le=le.actualBounds,le.w()&&(x?(x=!1,y.assign(le)):y.ed(le)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}hn.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 vi||(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 vi||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds));return x===null?new Ut(NaN,NaN,0,0):x};function pu(a,y){if((y||a.hf)&&!a.vb&&a.ta!==null&&a.documentBounds.w()){if(a.vb=!0,y){var x=a.initialPosition;if(x.w()){a.vb=!1,a.position=x;return}x=tt.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var b=a.viewportBounds;b=Ut.allocAt(0,0,b.width,b.height);var E=tt.alloc();E.xi(b,a.initialViewportSpot),E.h(x.x-E.x,x.y-E.y),a.position=E,Ut.free(b),tt.free(E),tt.free(x)}x=a.yh,y&&a.Fg!==xl&&(x=a.Fg);var z=x!==xl?Ld(a,x):a.scale;x=a.pa.x,b=a.pa.y,E=a.Aa/z;var te=a.ya/z,re=a.zk,oe=a.pq;y&&!re.sb()&&(oe.sb()||oe.Xb())&&(re=oe.Xb()?wo:oe),lf(a,a.documentBounds,E,te,re,y),y=a.scale,a.scale=z,a.vb=!1,z=a.viewportBounds,Jt.B(z.x,x)&&Jt.B(z.y,b)&&Jt.B(z.width,E)&&Jt.B(z.height,te)||a.onViewportBoundsChanged(new Ut(x,b,E,te),z,y,!1)}}function Ld(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 z=a.Aa+(a.gf?a.Db:0),te=a.ya+(a.Be?a.Db:0),re=z/E,oe=te/b;return y===tu?(y=Math.min(oe,re),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===Oh?(y=oe>re?(te-a.Db)/b:(z-a.Db)/E,y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):a.scale}hn.prototype.zoomToFit=function(){var a=this.sj;this.sj=Td,this.scale=Ld(this,tu),a!==Td&&(pu(this,!1),lf(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},Le=hn.prototype,Le.BA=function(a,y){y===void 0&&(y=tu);var x=a.width,b=a.height;if(!(x===0||b===0||isNaN(x)&&isNaN(b))){var E=1;if(y===tu||y===Oh)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 z=this.ya;E=y===Oh?z/b>E/x?(z-(this.Be?this.Db:0))/b:(E-(this.gf?this.Db:0))/x:Math.min(z/b,E/x)}this.scale=E,this.position=new tt(a.x,a.y)}},Le.Jy=function(a,y){this.Va();var x=this.documentBounds,b=this.viewportBounds;this.position=new tt(x.x+(a.x*x.width+a.offsetX)-(y.x*b.width-y.offsetX),x.y+(a.y*x.height+a.offsetY)-(y.y*b.height-y.offsetY))},Le.zz=function(a){if(a instanceof Yt){this.eq=a;var y=tt.alloc();this.fq=this.op(a.ga(Ba,y)),tt.free(y)}else this.eq=null,this.fq=po};function lf(a,y,x,b,E,z){var te=tt.allocAt(a.pa.x,a.pa.y),re=te.x,oe=te.y;if(a.eq!==null){var le=tt.alloc();le=a.eq.ga(Ba,le),re=le.x-a.fq.x/a.scale,oe=le.y-a.fq.y/a.scale,E=La,tt.free(le)}(z||a.scrollMode===Td)&&(E.sb()&&(x>y.width&&(re=y.x+(E.x*y.width+E.offsetX)-(E.x*x-E.offsetX)),b>y.height&&(oe=y.y+(E.y*y.height+E.offsetY)-(E.y*b-E.offsetY))),E=a.rj,z=x-y.width,x<y.width+E.left+E.right?(re=Math.min(re+x/2,y.right+Math.max(z,E.right)-x/2),re=Math.max(re,y.left-Math.max(z,E.left)+x/2),re-=x/2):re>y.left?re=y.left:re<y.right-x&&(re=y.right-x),x=b-y.height,b<y.height+E.top+E.bottom?(oe=Math.min(oe+b/2,y.bottom+Math.max(x,E.bottom)-b/2),oe=Math.max(oe,y.top-Math.max(x,E.top)+b/2),oe-=b/2):oe>y.top?oe=y.top:oe<y.bottom-b&&(oe=y.bottom-b)),te.x=isFinite(re)?re:-a.yb.left,te.y=isFinite(oe)?oe:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,te),te.x=y.x,te.y=y.y),As(a.Yd,a.pa,te),a.pa.h(te.x,te.y),Ec(a),tt.free(te)}Le.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=Yu(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof pr)return a}else if(a=Yu(this,a,function(x){return x.part}),a instanceof pr)return a;return null},Le.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),$s(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 Yu(a,y,x,b){for(x===void 0&&(x=null),b===void 0&&(b=null),$s(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}Le.lz=function(a,y,x){return y===void 0&&(y=!0),jc(this,a,function(b){return b.part},y?function(b){return b instanceof pr&&b.canSelect()}:null,x)};function jc(a,y,x,b,E){for(x===void 0&&(x=null),b===void 0&&(b=null),E instanceof kn||E instanceof _n||(E=new _n),$s(a),a=a.Wa.iteratorBackwards;a.next();){var z=a.value;z.visible&&!z.isTemporary&&z.ji(y,x,b,E)}return E}Le.ji=function(a,y,x,b){y===void 0&&(y=null),x===void 0&&(x=null),b instanceof kn||b instanceof _n||(b=new _n),$s(this);for(var E=this.Wa.iteratorBackwards;E.next();){var z=E.value;z.visible&&z.ji(a,y,x,b)}return b},Le.ux=function(a,y,x,b){return y===void 0&&(y=!1),x===void 0&&(x=!0),Nd(this,a,function(E){return E instanceof pr&&(!x||E.canSelect())},y,b)},Le.Cf=function(a,y,x,b,E){y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof kn||E instanceof _n||(E=new _n),$s(this);for(var z=this.Wa.iteratorBackwards;z.next();){var te=z.value;te.visible&&te.Cf(a,y,x,b,E)}return E},Le.Nu=function(a,y,x,b,E,z){var te=new _n;$s(this);for(var re=this.Wa.iteratorBackwards;re.next();){var oe=re.value;oe.visible&&oe.Nu(a,y,x,b,te,E,z)}return te};function Nd(a,y,x,b,E){var z=null;for(z===void 0&&(z=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof kn||E instanceof _n||(E=new _n),$s(a),a=a.Wa.iteratorBackwards;a.next();){var te=a.value;te.visible&&!te.isTemporary&&te.Cf(y,z,x,b,E)}return E}Le.mz=function(a,y,x,b,E){return x===void 0&&(x=!0),b===void 0&&(b=!0),cd(this,a,y,function(z){return z instanceof pr&&(!b||z.canSelect())},x,E)},Le.og=function(a,y,x,b,E,z){x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof kn||E instanceof _n)&&(z=E),E=!0),z instanceof kn||z instanceof _n||(z=new _n),$s(this);for(var te=this.Wa.iteratorBackwards;te.next();){var re=te.value;re.visible&&re.og(a,y,x,b,E,z)}return z};function cd(a,y,x,b,E,z){var te=null;for(te===void 0&&(te=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof kn||E instanceof _n)&&(z=E),E=!0),z instanceof kn||z instanceof _n||(z=new _n),$s(a),a=a.Wa.iteratorBackwards;a.next();){var re=a.value;re.visible&&!re.isTemporary&&re.og(y,x,te,b,E,z)}return z}hn.prototype.acceptEvent=function(a){return jl(this,a,a instanceof MouseEvent)};function jl(a,y,x){var b=a.Qg;return a.Qg=a.cj,a.cj=b,b.diagram=a,b.event=y,x?wc(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),$i&&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=dd(y,y.target),b.targetObject=null,b}function dd(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 Bh(a,y,x,b,E,z){var te=a.Qg;return a.Qg=a.cj,a.cj=te,te.diagram=a,te.clickCount=1,a=te.delta=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),te.modifiers=a,te.event=y,te.timestamp=y.timeStamp,te.button=y.button,te.buttons=y.buttons,$i&&y.button===0&&y.ctrlKey&&(te.button=2),te.down=x,te.up=b,te.handled=!1,te.bubbles=E,te.isMultiTouch=z,te}function eu(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}hn.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=jl(y,a,!1);switch(x.key=String.fromCharCode(a.which),x.down=!0,a.which){case 8:x.key="Backspace";break;case 33:x.key="PageUp";break;case 34:x.key="PageDown";break;case 35:x.key="End";break;case 36:x.key="Home";break;case 37:x.key="Left";break;case 38:x.key="Up";break;case 39:x.key="Right";break;case 40:x.key="Down";break;case 45:x.key="Insert";break;case 46:x.key="Del";break;case 48:x.key="0";break;case 187:case 61:case 107:x.key="Add";break;case 189:case 173:case 109:x.key="Subtract";break;case 27:x.key="Esc"}return y.doKeyDown(),eu(x,a)},hn.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=jl(y,a,!1);switch(x.key=String.fromCharCode(a.which),x.up=!0,a.which){case 8:x.key="Backspace";break;case 33:x.key="PageUp";break;case 34:x.key="PageDown";break;case 35:x.key="End";break;case 36:x.key="Home";break;case 37:x.key="Left";break;case 38:x.key="Up";break;case 39:x.key="Right";break;case 40:x.key="Down";break;case 45:x.key="Insert";break;case 46:x.key="Del"}return y.doKeyUp(),eu(x,a)},hn.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=jl(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),eu(x,a)},hn.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=jl(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),eu(x,a)},hn.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new tt(0,0);var x=y.getBoundingClientRect();return y=a.clientX-this.Aa/x.width*x.left,a=a.clientY-this.ya/x.height*x.top,this.Ab!==null?qr(new tt(y,a),this.Ab):new tt(y,a)};function wc(a,y,x){var b=a.ta,E=a.Aa,z=a.ya,te=0,re=0;b!==null&&(b=b.getBoundingClientRect(),te=y.clientX-E/b.width*b.left,re=y.clientY-z/b.height*b.top),x.viewPoint.h(te,re),a.Ab!==null?(y=tt.allocAt(te,re),a.Ab.Cd(y),x.documentPoint.assign(y),tt.free(y)):x.documentPoint.h(te,re)}function nh(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))}}hn.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function ih(a){a.ld||$s(a),a.Va()}hn.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},Le=hn.prototype,Le.Pz=function(){return this.kg},Le.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,Cl(this),this.hf=!1,this.du=new tt(NaN,NaN),y.isEnabled=x,this.ld=!0;var b=this;a!==null&&Dn(function(){b.ld=!1,il(y,"Model"),a(b)},1)},Le.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;st.requestAnimationFrame(function(){y.kg&&y.bd()})}},Le.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),Cl(this))};function zc(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||Hc(a)||(y&&$s(a),x&&pu(a,!1))}function Cl(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,z=E.length,te=0;te<z;te++){var re=E[te];gt(re,!1),re.v()}b.clear()}b=a.ow,0<b.count&&(b.each(function(oe){oe.Nv()}),b.clear()),E=b=!1,x.defaultAnimation.isAnimating&&(E=!0,b=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||Md(a),zc(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(bc(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),$s(a),z=!1,(!a.hf||a.xh)&&(a.hf?xg(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),xg(a,!1)),z=!0),a.Jk=!1,$s(a),a.ou||ih(a),zc(a,!0,!1),te=!1,z?(x=Ut.alloc(),x.assign(a.viewportBounds),a.hf||(te=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,Th(a)),a.R("LayoutCompleted"),zc(a,!0,!1),Ut.free(x)):x.Ok&&x.Qw&&(a.Fg!==xl?a.scale=Ld(a,a.Fg):a.yh!==xl?a.scale=Ld(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),pu(a,!0)),z&&te&&a.eb("Initial Layout"),$s(a),y||a.gc(a.ib),E&&(a.skipsUndoManager=b),a.ld=!1}}function Th(a){if(a.Fg!==xl)a.scale=Ld(a,a.Fg);else if(a.yh!==xl)a.scale=Ld(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}pu(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),bc(a)}function $s(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 _n,a.Nv(x,a.De)}a.nodes.each(function(b){b instanceof Yr&&b.U&65536&&(b.U=b.U^65536)})}}Le.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof Yr||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof Yr&&x.isVisible()&&xa(this,x);for(a.reset();a.next();)x=a.value,x instanceof vi&&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 jo&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function xa(a,y){for(var x=mn(),b=mn(),E=y.memberParts;E.next();){var z=E.value;z.isVisible()&&(z instanceof Yr?(mt(z)||Bt(z)||mf(z))&&xa(a,z):z instanceof vi?z.fromNode===y||z.toNode===y?b.push(z):x.push(z):(z.measure(1/0,1/0),z.arrange()))}for(a=x.length,E=0;E<a;E++)z=x[E],z.measure(1/0,1/0),z.arrange();for(Wn(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();Wn(b)}Le.Fd=function(a,y,x,b){if(this.vd||this.animationManager.isAnimating)for(var E=0;E<y;E++)a[E].Fd(x,b)},Le.gc=function(a){if(this.Ka!==null){if(this.ta===null&&St("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){Du(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,z=Math.round(y.x*E)/E,te=Math.round(y.y*E)/E,re=this.Ab;for(re.reset(),E!==1&&re.scale(E),y.x===0&&y.y===0||re.translate(-z,-te),a.ti=null,va(a,re.m11,re.m12,re.m21,re.m22,re.dx,re.dy),this.pb!==1&&(a.globalAlpha=this.pb),Sl(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?Id(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(ro.prototype.Cd=ro.prototype.Eu),this.Fc=this.vd=!1}}}}else e:if(z=this.animationManager,!z.zb&&(!z.isAnimating||z.isTicking)&&(x=new Date,Du(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&&!z.isAnimating)break e;z=this.Ab,z.reset(),te=this.Mb,re=this.pa;var oe=this.Ca,le=Math.round(re.x*oe)/oe,ue=Math.round(re.y*oe)/oe;for(oe!==1&&z.scale(oe),re.x===0&&re.y===0||z.translate(-le,-ue),a.setTransform(te,0,0,te,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),Sl(this,a),re=0;re<E;re++)a.setTransform(te,0,0,te,0,0),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),a.yc(),y[re].gc(a,this);if(y=!1,this.Yf?Id(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(ro.prototype.Cd=ro.prototype.Eu),b?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,b=Ti&&Ti.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 ls(a,y,x,b,E,z,te,re,oe,le){if(a.Ka!==null){a.ta===null&&St("No canvas specified"),te===void 0&&(te=null),re===void 0&&(re=null),oe===void 0&&(oe=!1),le===void 0&&(le=!1),Du(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var ue=a.Ca;a.Ca=E;var me=a.Wa.s,we=me.length;try{var Me=new Ut(z.x,z.y,b.width/E,b.height/E),Te=Me.copy();Te.Co(x),bc(a,Te),$s(a),a.Fd(me,we,a,Me),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,b.width,b.height),re!==null&&re!==""&&(y.fillStyle=re,y.ox(0,0,b.width,b.height));var je=a.Mb;y.scale(je,je);var ct=ro.alloc();ct.reset(),ct.translate(x.left,x.top),ct.scale(E),z.x===0&&z.y===0||ct.translate(-z.x,-z.y),y.setTransform(ct.m11,ct.m12,ct.m21,ct.m22,ct.dx,ct.dy),y.yc(),y instanceof Uo&&va(y,ct.m11,ct.m12,ct.m21,ct.m22,ct.dx,ct.dy),ro.free(ct),Sl(a,y),y.globalAlpha=a.pb;var nt=a.Qj("Grid");if(te){var bt=new _n,Nt=te.iterator;for(Nt.reset();Nt.next();){var Ot=Nt.value;Ot instanceof pr&&(le||Ot.layer!==nt)&&(Ot.Gj(),bt.add(Ot))}for(le=0;le<we;le++)Rl(me[le],y,a,bt,oe);bt.each(function(gn){return gn.Gj()})}else for(bt=0;bt<we;bt++){var Xt=me[bt];Xt===nt?le&&Xt.gc(y,a,!0):Xt.gc(y,a,oe)}a.$i=!1,a.Yf&&Id(a.Yf,a)&&a.Vp()}finally{a.Ca=ue,a.ib.Vc(!0),a.vd=!0,a.Fd(me,we,a,a.viewportBounds),bc(a),a.ib instanceof Uo&&(a.ib.Nj.PA(),a.redraw())}}}Le.Gf=function(a){return this.Rg[a]},Le.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},Le.Tx=function(){this.Rg=new Gi,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!($i||Yi),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function Sl(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}Le.Ql=function(a){return this.on[a]},Le.sA=function(a,y){this.on[a]=y},Le.Sx=function(){this.on=new Gi,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},Le.set=function(a){return Object.assign(this,a),this},Le.Du=function(a){return this.nm(a)},Le.nm=function(a){return Au(this,a),this};function Au(a,y){var x=a instanceof hi,b=a instanceof hn,E;for(E in y){E===""&&St("Setting properties requires non-empty property names");var z=a,te=E;if(x||b){var re=E.indexOf(".");if(0<re){var oe=E.substring(0,re);x?z=a.fb(oe):(z=a[oe],z==null&&(z=a.toolManager[oe])),en(z)?te=E.substr(re+1):St("Unable to find object named: "+oe+" in "+a.toString()+" when trying to set property: "+E)}}if(te[0]!=="_"&&!ii(z,te))if(b&&te==="ModelChanged"){a.Yw(y[te]);continue}else if(b&&te==="Changed"){a.Pe(y[te]);continue}else if(b&&ii(a.toolManager,te))z=a.toolManager;else if(b&&qg(a,te)){a.Bj(te,y[te]);continue}else if(a instanceof or&&te==="Changed"){a.Pe(y[te]);continue}else St('Trying to set undefined property "'+te+'" on object: '+z.toString());z[te]=y[E],te[0]==="_"&&z instanceof Yt&&z.Vw(te)}}Le.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new Ii,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},Le.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")},hn.prototype.invalidateViewport=function(a,y){if(this.Fc!==!0)if(this.Fc=!0,this.nl==="svg")this.bd();else{var x=this.Gf("temporaryPixelRatio")===!0;if(this.Gf("viewportOptimizations")===!0&&this.scrollMode!==cf&&this.rj.hi(0,0,0,0)&&y.width===a.width&&y.height===a.height){var b=this.scale,E=Math.max(a.y,y.y),z=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,z-E)*b){if(!(this.ld||(this.kg=!1,this.Ka===null||(this.ld=!0,this.documentBounds.w()||(b=Ut.alloc(),yg(this,this.computeBounds(b)),Ut.free(b)),b=this.ta,b===null||b instanceof bo)))){var te=this.Mb;E=this.Aa*te;var re=this.ya*te,oe=this.scale*te;z=Math.round(Math.round(y.x*oe)-Math.round(a.x*oe)),y=Math.round(Math.round(y.y*oe)-Math.round(a.y*oe)),oe=this.jw,a=this.oy,oe.width!==E&&(oe.width=E),oe.height!==re&&(oe.height=re),a.clearRect(0,0,E,re),oe=190*te;var le=70*te,ue=Math.max(z,0),me=Math.max(y,0),we=Math.floor(E-ue),Me=Math.floor(re-me);a.drawImage(b.Oa,ue,me,we,Me,0,0,we,Me),Id(this.Yf,this)&&a.clearRect(0,0,oe,le),b=mn(),a=mn(),Me=Math.abs(z),we=Math.abs(y);var Te=ue===0?0:E-Me;ue=tt.allocAt(Te,0),Me=tt.allocAt(Me+Te,re),a.push(new Ut(Math.min(ue.x,Me.x),Math.min(ue.y,Me.y),Math.abs(ue.x-Me.x),Math.abs(ue.y-Me.y)));var je=this.Ab;if(je.reset(),je.scale(te,te),this.Ca!==1&&je.scale(this.Ca),te=this.pa,(te.x!==0||te.y!==0)&&isFinite(te.x)&&isFinite(te.y)&&je.translate(-te.x,-te.y),qr(ue,je),qr(Me,je),b.push(new Ut(Math.min(ue.x,Me.x),Math.min(ue.y,Me.y),Math.abs(ue.x-Me.x),Math.abs(ue.y-Me.y))),Te=me===0?0:re-we,ue.h(0,Te),Me.h(E,we+Te),a.push(new Ut(Math.min(ue.x,Me.x),Math.min(ue.y,Me.y),Math.abs(ue.x-Me.x),Math.abs(ue.y-Me.y))),qr(ue,je),qr(Me,je),b.push(new Ut(Math.min(ue.x,Me.x),Math.min(ue.y,Me.y),Math.abs(ue.x-Me.x),Math.abs(ue.y-Me.y))),Id(this.Yf,this)&&(E=0<z?0:-z,re=0<y?0:-y,ue.h(E,re),Me.h(oe+E,le+re),a.push(new Ut(Math.min(ue.x,Me.x),Math.min(ue.y,Me.y),Math.abs(ue.x-Me.x),Math.abs(ue.y-Me.y))),qr(ue,je),qr(Me,je),b.push(new Ut(Math.min(ue.x,Me.x),Math.min(ue.y,Me.y),Math.abs(ue.x-Me.x),Math.abs(ue.y-Me.y)))),tt.free(ue),tt.free(Me),zc(this,!1,!0),this.Ka===null&&St("No div specified"),this.ta===null&&St("No canvas specified"),!this.animationManager.zb&&(E=this.ib,this.Fc)){for(Du(this),re=this.Mb,E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,this.Aa*re,this.ya*re),E.drawImage(this.jw.Oa,0<z?0:Math.round(-z),0<y?0:Math.round(-y)),z=this.pa,te=this.Ca,oe=Math.round(z.x*te)/te,le=Math.round(z.y*te)/te,y=this.Ab,y.reset(),te!==1&&y.scale(te),z.x===0&&z.y===0||y.translate(-oe,-le),E.save(),E.beginPath(),z=a.length,te=0;te<z;te++)oe=a[te],oe.width!==0&&oe.height!==0&&E.rect(Math.floor(oe.x),Math.floor(oe.y),Math.ceil(oe.width),Math.ceil(oe.height));for(E.clip(),E.setTransform(re,0,0,re,0,0),E.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),E.yc(),y=this.Wa.s,z=y.length,this.Fd(y,z,this,this.viewportBounds),Sl(this,E),E.globalAlpha=this.pb,re=0;re<z;re++)if(te=y[re],oe=b,te.visible&&te.pb!==0){le=Ts(te,E),me=te.Zq,me.length=0,ue=this.scale,we=Ut.alloc(),Me=te.Pa.s,je=Me.length,Te=oe.length;for(var ct=0;ct<je;ct++){var nt=Me[ct],bt=qf(nt,nt.actualBounds);e:{for(var Nt=2/ue,Ot=4/ue,Xt=0;Xt<Te;Xt++){var gn=oe[Xt];if(gn.width!==0&&gn.height!==0&&bt.Vu(gn.x-Nt,gn.y-Nt,gn.width+Ot,gn.height+Ot)){bt=!0;break e}}bt=!1}bt&&te.Oj(E,nt,this,me,ue,we,!0)}Ut.free(we),E.globalAlpha=le}E.restore(),E.Vc(!0),this.Yf&&Id(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}Wn(b),Wn(a),this.ld=!1}}else this.bd();x&&(Gs(this),this.bd(),Qd(this,!0))}else x?(Gs(this),this.bd(),Qd(this,!0)):this.bd()}};function Du(a){a.pn!==!1&&(a.pn=!1,Fd(a,a.Aa,a.ya))}function Fd(a,y,x){Ec(a);var b=a.Mb;a.ta.resize(y*b,x*b,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function Hc(a){var y=a.ta;if(y===null||a.wo.w())return!0;var x=a.Aa,b=a.ya,E=a.Ka,z=!1,te=a.gf?a.Db:0,re=a.Be?a.Db:0,oe=E.clientWidth||x+te,le=E.clientHeight||b+re,ue=a.viewportBounds;E=ue.x;var me=ue.y,we=ue.width,Me=ue.height;if((oe!==x+te||le!==b+re)&&(a.gf=!1,a.Be=!1,re=te=0,a.Aa=oe,a.ya=le,z=a.pn=!0,Ec(a)),!a.hf||!a.viewportBounds.w())return!0;var Te=a.ku,je=a.hu;if(a.Ee=!1,!(z||a.gf||a.Be||a.mn||a.nn))return!0;var ct=a.documentBounds,nt=0,bt=0,Nt=0,Ot=0,Xt=ue.width,gn=ue.height,Fi=a.rj;a.contentAlignment.sb()?(ct.width>Xt&&(nt=Fi.left,bt=Fi.right),ct.height>gn&&(Nt=Fi.top,Ot=Fi.bottom)):(nt=Fi.left,bt=Fi.right,Nt=Fi.top,Ot=Fi.bottom);var _i=ct.width+nt+bt,zi=ct.height+Nt+Ot;Fi=a.scale;var mi=_i>oe/Fi,ti=zi>le/Fi;if(!(z||a.gf||a.Be||mi||ti))return!0;nt=ct.x-nt,oe=ue.x,bt=ct.right+bt,le=ue.right+te,Nt=ct.y-Nt;var Ur=ue.y;ct=ct.bottom+Ot,ue=ue.bottom+re;var Dr="1px";if(Ot="1px",a.scrollMode===Td&&(mi||ti)&&(mi&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(mi=1,nt+1<oe&&(mi=Math.max((oe-nt)*Fi+a.Aa,mi)),bt>le+1&&(mi=Math.max((bt-le)*Fi+a.Aa,mi)),Xt+te+1<_i&&(mi=Math.max((_i-Xt)*Fi+a.Aa,mi)),Dr=mi.toString()+"px"),ti&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(mi=1,Nt+1<Ur&&(mi=Math.max((Ur-Nt)*Fi+a.ya,mi)),ct>ue+1&&(mi=Math.max((ct-ue)*Fi+a.ya,mi)),gn+re+1<zi&&(mi=Math.max((zi-gn)*Fi+a.ya,mi)),Ot=mi.toString()+"px")),mi=Dr!=="1px",ti=Ot!=="1px",mi&&ti||!mi&&!ti||(ti&&(le-=a.Db),mi&&(ue-=a.Db),_i<Xt+te||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(te=1,nt+1<oe&&(te=Math.max((oe-nt)*Fi+a.Aa,te)),bt>le+1&&(te=Math.max((bt-le)*Fi+a.Aa,te)),Xt+1<_i&&(te=Math.max((_i-Xt)*Fi+a.Aa,te)),Dr=te.toString()+"px"),mi=Dr!=="1px",te=a.ya,mi!==a.Be&&(te=mi?a.ya-a.Db:a.ya+a.Db),zi<gn+re||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(re=1,Nt+1<Ur&&(re=Math.max((Ur-Nt)*Fi+te,re)),ct>ue+1&&(re=Math.max((ct-ue)*Fi+te,re)),gn+1<zi&&(re=Math.max((zi-gn)*Fi+te,re)),Ot=re.toString()+"px"),ti=Ot!=="1px"),a.qr&&mi===a.Be&&ti===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if(mi!==a.Be&&(Dr==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=mi,je.style.width=Dr,ti!==a.gf&&(Ot==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),z=!0,a.tn&&(re=tt.alloc(),ti?(y.style.left=a.Db+"px",a.position=re.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=re.h(a.pa.x-a.Db/a.scale,a.pa.y)),tt.free(re))),z&&Ec(a),a.gf=ti,je.style.height=Ot,a.gu=!0,z&&(a.pn=!0),y=Te.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Xt+1<_i?y=(a.position.x-nt)*Fi:nt+1<oe?y=Te.scrollWidth-Te.clientWidth:bt>le+1&&(y=a.position.x*Fi)),a.tn)switch(a.bu){case"negative":y=-(Te.scrollWidth-y-Te.clientWidth);break;case"reverse":y=Te.scrollWidth-y-Te.clientWidth}return Te.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(gn+1<zi?Te.scrollTop=(a.position.y-Nt)*Fi:Nt+1<Ur?Te.scrollTop=Te.scrollHeight-Te.clientHeight:ct>ue+1&&(Te.scrollTop=a.position.y*Fi)),oe=a.Aa,le=a.ya,Te.style.width=oe+(a.gf?a.Db:0)+"px",Te.style.height=le+(a.Be?a.Db:0)+"px",x!==oe||b!==le||a.animationManager.zb?(x=Ut.allocAt(E,me,we,Me),a.onViewportBoundsChanged(x,a.viewportBounds,Fi,z),Ut.free(x),!1):!0}Le=hn.prototype,Le.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&St("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&&St('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(Va,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},Le.oi=function(a){this.partManager.oi(a);var y=this;Yf(a,function(x){kh(y,x)}),(a instanceof jo||a instanceof Yr&&a.placeholder!==null)&&a.v(),a.data!==null&&Yf(a,function(x){vy(y.partManager,x)}),Bt(a)!==!0&&mf(a)!==!0||this.De.add(a),jS(a,!0,this),HS(a)?(a.actualBounds.w()&&this.N(qf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(qf(a,a.actualBounds)),this.$b()},Le.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&Yf(a,function(x){yy(y.partManager,x,y)}),this.De.remove(a),HS(a)?(a.actualBounds.w()&&this.N(qf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(qf(a,a.actualBounds)),this.$b()},Le.remove=function(a){rh(this,a,!0)};function rh(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(cs,"parts",b,y,null,x,null),a=y.layerChanged,a!==null&&a(y,b,null))}Le.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 _n,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},Le.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},hn.prototype.moveParts=function(a,y,x,b){if(x===void 0&&(x=!1),b===void 0&&(b=Wf(this)),this.toolManager!==null){var E=new Ii;if(a!==null)if(Cn(a))for(var z=0;z<a.length;z++)Hu(this,E,a[z],x,b);else for(a=a.iterator;a.next();)Hu(this,E,a.value,x,b);else{for(a=this.parts;a.next();)Hu(this,E,a.value,x,b);for(a=this.nodes;a.next();)Hu(this,E,a.value,x,b);for(a=this.links;a.next();)Hu(this,E,a.value,x,b)}Cc(this,E,y,b,x)}};function Hu(a,y,x,b,E,z){if(!y.contains(x)&&(z===void 0&&(z=!1),!b||z||x.canMove()||x.canCopy()))if(E===void 0&&(E=Wf(a)),x instanceof Di){if(y.add(x,a.Pd(E,x,x.location)),x instanceof Yr&&(x.placeholder!==null||E.dragsMembers))for(z=x.memberParts;z.next();)Hu(a,y,z.value,b,E,E.groupsAlwaysMove);for(z=x.linksConnected;z.next();){var te=z.value;if(!y.contains(te)){var re=te.fromNode,oe=te.toNode;re!==null&&y.contains(re)&&oe!==null&&y.contains(oe)&&Hu(a,y,te,b,E)}}if(E.dragsTree)for(x=x.Ou();x.next();)Hu(a,y,x.value,b,E)}else if(x instanceof vi)for(y.add(x,a.Pd(E,x)),x=x.labelNodes;x.next();)Hu(a,y,x.value,b,E);else x instanceof jo||y.add(x,a.Pd(E,x,x.location))}function Cc(a,y,x,b,E){if(y!==null&&y.count!==0){var z=tt.alloc(),te=tt.alloc();te.assign(x),isNaN(te.x)&&(te.x=0),isNaN(te.y)&&(te.y=0),(x=a.Mr)||$f(a,y);for(var re=mn(),oe=mn(),le=y.iterator,ue=tt.alloc();le.next();){var me=le.key,we=le.value;if(me.Zc()){var Me=hg(a,me,y);Me!==null?re.push(new ie(me,we,Me)):(!E||me.canMove())&&(Me=we.point,z.assign(Me),a.computeMove(me,z.add(te),b,ue),me.location=ue,we.shifted===void 0&&(we.shifted=new tt),we.shifted.assign(ue.re(Me)))}else le.key instanceof vi&&oe.push(le.sa)}for(tt.free(ue),E=re.length,le=0;le<E;le++)me=re[le],z.assign(me.info.point),me.Su.shifted===void 0&&(me.Su.shifted=new tt),me.node.location=z.add(me.Su.shifted);for(E=tt.alloc(),le=tt.alloc(),me=oe.length,we=0;we<me;we++){var Te=oe[we];if(Me=Te.key,Me instanceof vi)if(Me.suspendsRouting){Me.Tg=null,ue=Me.fromNode;var je=Me.toNode;if(a.draggedLink!==null&&b.dragsLink)if(je=Te.value.point,Me.dragComputation===null)y.add(Me,a.Pd(b,Me,te)),Gh(Me,te.x-je.x,te.y-je.y);else{Te=tt.allocAt(0,0),(ue=Me.i(0))&&ue.w()&&Te.assign(ue);var ct=ue=tt.alloc().assign(Te).add(te);b.isGridSnapEnabled&&(b.isGridSnapRealtime||a.lastInput.up)&&(ct=tt.alloc(),Gf(a,Me,ue,ct,b)),ue.assign(Me.dragComputation(Me,ue,ct)).re(Te),y.add(Me,a.Pd(b,Me,ue)),Gh(Me,ue.x-je.x,ue.y-je.y),tt.free(Te),tt.free(ue),ct!==ue&&tt.free(ct)}else ue!==null&&(E.assign(ue.location),ct=y.I(ue),ct!==null&&E.re(ct.point)),je!==null&&(le.assign(je.location),ct=y.I(je),ct!==null&&le.re(ct.point)),ue!==null&&je!==null?E.Xa(le)?(ue=Te.value.point,je=z,je.assign(E),je.re(ue),y.add(Me,a.Pd(b,Me,E)),Gh(Me,je.x,je.y)):(Me.suspendsRouting=!1,Me.bb()):(Te=Te.value.point,ue=ue!==null?E:je!==null?le:te,y.add(Me,a.Pd(b,Me,ue)),Gh(Me,ue.x-Te.x,ue.y-Te.y))}else(Me.fromNode===null||Me.toNode===null)&&(ue=Te.value.point,y.add(Me,a.Pd(b,Me,te)),Gh(Me,te.x-ue.x,te.y-ue.y))}tt.free(z),tt.free(te),tt.free(E),tt.free(le),Wn(re),Wn(oe),x||($s(a),Ad(a,y))}}hn.prototype.computeMove=function(a,y,x,b){if(b===void 0&&(b=new tt),b.assign(y),a===null)return b;var E=y,z=x.isGridSnapEnabled;z&&(x.isGridSnapRealtime||this.lastInput.up)&&(E=tt.alloc(),Gf(this,a,y,E,x)),x=a.dragComputation!==null?a.dragComputation(a,y,E):E;var te=a.minLocation,re=te.x;isNaN(re)&&(re=z?Math.round(1e3*a.location.x)/1e3:a.location.x),te=te.y,isNaN(te)&&(te=z?Math.round(1e3*a.location.y)/1e3:a.location.y);var oe=a.maxLocation,le=oe.x;return isNaN(le)&&(le=z?Math.round(1e3*a.location.x)/1e3:a.location.x),oe=oe.y,isNaN(oe)&&(oe=z?Math.round(1e3*a.location.y)/1e3:a.location.y),b.h(Math.max(re,Math.min(x.x,le)),Math.max(te,Math.min(x.y,oe))),E!==y&&tt.free(E),b};function Wf(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function Gf(a,y,x,b,E){if(E===void 0&&(E=Wf(a)),b.assign(x),y!==null){var z=a.grid;y=E.gridSnapCellSize,a=y.width,y=y.height;var te=E.gridSnapOrigin,re=te.x;if(te=te.y,E=E.gridSnapCellSpot,z!==null){var oe=z.gridCellSize;isNaN(a)&&(a=oe.width),isNaN(y)&&(y=oe.height),z=z.gridOrigin,isNaN(re)&&(re=z.x),isNaN(te)&&(te=z.y)}z=tt.allocAt(0,0),z.yi(0,0,a,y,E),Jt.No(x.x,x.y,re+z.x,te+z.y,a,y,b),tt.free(z)}}function $f(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof vi&&(y.suspendsRouting=!0)}function Ad(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof vi&&(x.suspendsRouting=!1,iy(x)&&x.bb())}a.Mr=!1}}function hg(a,y,x){return y=y.containingGroup,y!==null&&(a=hg(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}Le=hn.prototype,Le.Pd=function(a,y,x){if(x===void 0)return new Zc(Qr);var b=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(b=!1),b?new Zc(new tt(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new Zc(x.copy())};function fg(a,y,x){if(y.diagram!==null&&y.diagram!==a&&St("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&St("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&St("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&St("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&&St("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}Le.Al=function(a){fg(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(Va,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},Le.Ww=function(a,y){fg(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(cs,"layers",this,a,null,b,null));var E=x.count,z;for(z=0;z<E;z++)if(x.M(z)===y){x.Gb(z,a);break}return this.cc!==null&&this.cb(Va,"layers",this,null,a,null,z),this.N(),0>b&&this.Ya(),this},Le.Cy=function(a,y){fg(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(cs,"layers",this,a,null,b,null));var E=x.count,z;for(z=0;z<E;z++)if(x.M(z)===y){x.Gb(z+1,a);break}return this.cc!==null&&this.cb(Va,"layers",this,null,a,null,z+1),this.N(),0>b&&this.Ya(),this},Le.kA=function(a){if(a.diagram!==this&&St("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(cs,"layers",this,a,null,x,null),this.N(),this.Ya()}}},Le.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},Le.Yw=function(a){return this.pf===null&&(this.pf=new kn),this.pf.add(a),this.model.Pe(a),this},Le.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},Le.Pe=function(a){return this.zg===null&&(this.zg=new kn),this.zg.add(a),this},Le.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},Le.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==Ll&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,b=0;b<x;b++)y.M(b)(a)},Le.cb=function(a,y,x,b,E,z,te){z===void 0&&(z=null),te===void 0&&(te=null);var re=new Pa;re.diagram=this,re.change=a,re.propertyName=y,re.object=x,re.oldValue=b,re.oldParam=z,re.newValue=E,re.newParam=te,this.ds(re)},Le.g=function(a,y,x,b,E){this.cb(wa,a,this,y,x,b,E)},hn.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===wa){var E=a.object;if(ba(E,a.propertyName,a.I(y)),E instanceof Yt){var z=E.part;z!==null&&z.Wb()}this.isModified=!0}else if(b===Va){var te=a.object,re=a.newParam,oe=a.newValue;if(te instanceof hi)if(typeof re=="number"&&oe instanceof Yt){y?te.pc(re):te.Gb(re,oe);var le=te.part;le!==null&&le.Wb()}else typeof re=="number"&&oe instanceof Cs&&(oe.isRow?dS(te,re,y?void 0:oe):hS(te,re,y?void 0:oe));else if(te instanceof Ca){var ue=a.oldParam===!0;typeof re=="number"&&oe instanceof pr&&(y?(oe.isSelected=!1,oe.isHighlighted=!1,oe.Wb(),te.pc(ue?re:-1,oe,ue)):te.oi(re,oe,ue))}else te instanceof hn?typeof re=="number"&&oe instanceof Ca&&(y?this.Wa.mb(re):(oe.Xe(this),this.Wa.Gb(re,oe))):St("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(b===cs){var me=a.object,we=a.oldParam,Me=a.oldValue;if(me instanceof hi)typeof we=="number"&&Me instanceof Yt?y?me.Gb(we,Me):me.pc(we):typeof we=="number"&&Me instanceof Cs&&(Me.isRow?dS(me,we,y?Me:void 0):hS(me,we,y?Me:void 0));else if(me instanceof Ca){var Te=a.newParam===!0;typeof we=="number"&&Me instanceof pr&&(y?0>me.Pa.indexOf(Me)&&me.oi(we,Me,Te):(Me.isSelected=!1,Me.isHighlighted=!1,Me.Wb(),me.pc(Te?we:-1,Me,Te)))}else me instanceof hn?typeof we=="number"&&Me instanceof Ca&&(y?(Me.Xe(this),this.Wa.Gb(we,Me)):this.Wa.mb(we)):St("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==Ll&&St("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},hn.prototype.Ea=function(a){return this.undoManager.Ea(a)},hn.prototype.eb=function(a){return this.undoManager.eb(a)},hn.prototype.Kf=function(){return this.undoManager.Kf()},hn.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}},hn.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},hn.prototype.rp=function(){this.partManager.rp()};function gg(a,y,x){var b=a.animationManager;if(a.vb||a.ld)a.Ca=x,Ec(a),a.N(),a.Ee=!0,b.zb&&(Ws(b)||b.ce.add(b.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,Ec(a);else{a.vb=!0;var E=a.viewportBounds.copy(),z=a.Aa,te=a.ya,re=a.zoomPoint.x,oe=a.zoomPoint.y,le=a.contentAlignment;isNaN(re)&&(le.$c()?le.Hf(rc)?re=0:le.Hf(wl)&&(re=z-1):re=le.sb()?le.x*(z-1):z/2),isNaN(oe)&&(le.$c()?le.Hf(ju)?oe=0:le.Hf(sl)&&(oe=te-1):oe=le.sb()?le.y*(te-1):te/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),z=tt.allocAt(a.pa.x+re/y-re/x,a.pa.y+oe/y-oe/x),a.position=z,tt.free(z),a.Ca=x,Ec(a),a.vb=!1,a.onViewportBoundsChanged(E,a.viewportBounds,y,!1),pu(a,!1),b.zb&&(Ws(b)||b.ce.add(b.H,"scale",y,a.Ca))}}hn.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!==xl||a.width===y.width&&a.height===y.height||E.C(),E=this.currentTool,this.Vk===!0&&E instanceof fa&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),jf(E,this)),this.vb||this.invalidateViewport(a,y),bc(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(z){z.isAvoiding&&z.actualBounds.Yc(y)&&z.bb()})}};function bc(a,y){var x=a.fe;if(x!==null&&x.visible){for(var b=fi.alloc(),E=1,z=1,te=x.O.s,re=te.length,oe=0;oe<re;oe++){var le=te[oe],ue=Math.abs(le.interval);2>ue||(Ev(le.figure)?z=z*ue/Jt.vx(z,ue):E=E*ue/Jt.vx(E,ue))}if(te=x.gridCellSize,b.h(z*te.width,E*te.height),y!==void 0)E=y.width,z=y.height,a=y.x,te=y.y;else{if(y=Ut.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){Ut.free(y);return}E=y.width,z=y.height,a=y.x,te=y.y,Ut.free(y)}x.width=E+2*b.width,x.height=z+2*b.height,y=tt.alloc(),Jt.No(a,te,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),fi.free(b),x.part.location=y,tt.free(y)}}hn.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)}},hn.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))},hn.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 pr||St("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 pr||St("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},hn.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()}},Le=hn.prototype,Le.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},Le.Jz=function(a){a=new _n().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 pr||St("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},Le.scroll=function(a,y,x){x===void 0&&(x=1);var b=y==="up"||y==="down",E=0,z=tt.alloc();if(a==="pixel")E=x;else if(a==="line")E=x*(b?this.scrollVerticalLineChange:this.scrollHorizontalLineChange);else if(a==="page")a=b?this.viewportBounds.height:this.viewportBounds.width,a*=this.scale,a!==0&&(E=x*Math.max(a-(b?this.scrollVerticalLineChange:this.scrollHorizontalLineChange),0));else{if(a==="document"){E=this.documentBounds,x=this.viewportBounds,y==="up"?this.position=z.h(x.x,E.y):y==="left"?this.position=z.h(E.x,x.y):y==="down"?this.position=z.h(x.x,E.bottom-x.height):y==="right"&&(this.position=z.h(E.right-x.width,x.y)),tt.free(z);return}St("scrolling unit must be 'pixel', 'line', 'page', or 'document', not: "+a)}E/=this.scale,x=this.position,y==="up"?this.position=z.h(x.x,x.y-E):y==="down"?this.position=z.h(x.x,x.y+E):y==="left"?this.position=z.h(x.x-E,x.y):y==="right"?this.position=z.h(x.x+E,x.y):St("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),tt.free(z)},Le.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)},Le.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},Le.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)},Le.zA=function(a){var y=this.Ab,x=a.x,b=a.y,E=x+a.width,z=b+a.height,te=y.m11,re=y.m12,oe=y.m21,le=y.m22,ue=y.dx,me=y.dy,we=x*te+b*oe+ue;y=x*re+b*le+me;var Me=E*te+b*oe+ue;return a=E*re+b*le+me,b=x*te+z*oe+ue,x=x*re+z*le+me,te=E*te+z*oe+ue,E=E*re+z*le+me,z=Math.min(we,Me),we=Math.max(we,Me),Me=Math.min(y,a),y=Math.max(y,a),z=Math.min(z,b),we=Math.max(we,b),Me=Math.min(Me,x),y=Math.max(y,x),z=Math.min(z,te),we=Math.max(we,te),Me=Math.min(Me,E),y=Math.max(y,E),new Ut(z,Me,we-z,y-Me)},Le.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),qr(a.copy(),this.Ab)};function pg(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function mg(a){return a=Uf.get(a),a!==null?new a:new qo}hn.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,b=a.propertyName;if(x===Ll&&b[0]==="S")if(b==="StartingFirstTransaction"){var E=this;a=this.toolManager,a.mouseDownTools.each(function(oe){return oe.diagram=E}),a.mouseMoveTools.each(function(oe){return oe.diagram=E}),a.mouseUpTools.each(function(oe){return oe.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===Ll){(b==="FinishedUndo"||b==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),$s(this));var z=this.animationManager;b==="RolledBackTransaction"&&z.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||Fs(z),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 te=a.isTransactionFinished;if(te&&(pg(this),this.As.clear(),$a(this.animationManager)),!this.Rt&&te&&this.lastInput.targetDiagram){this.Rt=!0;var re=this;Dn(function(){re.currentTool.standardMouseOver(),re.Rt=!1},10)}}}finally{this.aa=!0}}}};function kh(a,y){y=y.O.s;for(var x=y.length,b=0;b<x;b++)oh(a,y[b])}function oh(a,y){if(y instanceof ru){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof _n&&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 vg(a,y){if(y instanceof ru){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 z=0;z<E.length;z++)if(E[z]===y){E.splice(z,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 _n&&x.Bg.remove(a),fp(b));break}}}}}hn.prototype.Wd=function(){this.partManager.Wd()},hn.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},hn.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},hn.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},hn.prototype.Vb=function(a){return this.partManager.Vb(a)},hn.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},Le=hn.prototype,Le.Lc=function(a){return this.partManager.Lc(a)},Le.ii=function(a){return this.partManager.ii(a)},Le.Kc=function(a){return this.partManager.Kc(a)},Le.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:nn(Ri(y)))},Le.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:nn(Ri(y)))};function Ec(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 yg(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),pu(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}Le.Va=function(){if(this.Zi){var a=Ut.alloc();yg(this,this.computeBounds(a)),Ut.free(a)}},Le.rz=function(){for(var a=new _n,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},Le.qz=function(){return this.ai.iterator},Le.Uz=function(a){$s(this),a&&ah(this,!0),this.ld?xg(this,!1):(this.Jk=!0,Cl(this))};function ah(a,y){for(var x=a.ai.iterator;x.next();)Sg(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function Sg(a,y,x){if(y!==null){for(var b=y.gl.iterator;b.next();)Sg(a,b.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function xg(a,y){if(a.xh&&!a.lt){var x=a.aa;a.aa=!0;var b=a.undoManager.transactionLevel,E=a.layout,z=a.animationManager;try{b===0&&(a.undoManager.isInternalTransaction=!0,a.Ea("Layout")),1>=b&&!z.defaultAnimation.isAnimating&&!z.zb&&(y||il(z,"Layout")),a.xh=!1;for(var te=a.ai.iterator;te.next();)Pg(a,te.value,y,b);E.isValidLayout||(!y||E.isRealtime||E.isRealtime===null||b===0?(E.doLayout(a),$s(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||Fs(z),a.aa=x}}}function Pg(a,y,x,b){if(y!==null){for(var E=y.gl.iterator;E.next();)Pg(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),xa(a,y),E.isValidLayout=!0):a.xh=!0)}}Le.yz=function(){for(var a=new kn,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function Wp(a){function y(E){var z=E.toLowerCase(),te=new kn;x.add(E,te),x.add(z,te),b.add(E,E),b.add(z,E)}var x=new Ii,b=new Ii;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 qg(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function Dd(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;St("Unknown DiagramEvent name: "+y)}Le.Bj=function(a,y){return a=Dd(this,a),a!==null&&a.add(y),this},Le.am=function(a,y){a=Dd(this,a),a!==null&&a.remove(y)},Le.R=function(a,y,x){var b=Dd(this,a),E=new od;if(E.diagram=this,a=qg(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 Kf(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}Le.Yj=function(a,y){return uf(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},hn.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?th(this,a):a.assign(this.documentBounds)};function uf(a,y,x,b){var E=a.Xh;if(E===null&&(a.Xh=E=new lm(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=ep(a,x)),x===null){y=Ut.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),E.initialize(y);for(var z=a.nodes;z.next();){var te=z.value,re=te.layer;re!==null&&re.visible&&!re.isTemporary&&Vf(a,te,b,y)}Ut.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),E.initialize(y)),y=Ut.alloc(),z=x.memberParts;z.next();)te=z.value,te instanceof Di&&Vf(a,te,b,y);Ut.free(y)}E.group=x,E.Yx=b,E.vs=!1}else y&&o1(E);return E}function ep(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?ep(a,y.containingGroup):null}function Vf(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,z=y.y;if(Sp(a,E,z))for(x=(z-a.Od)/a.sc|0,b=Math.min((E+y.width-a.Nd)/a.rc|0,a.di),y=Math.min((z+y.height-a.Od)/a.sc|0,a.ei),E=(E-a.Nd)/a.rc|0;E<=b;E++)if(z=a.ac[E],z.fill)z.fill(Kh,x,y+1);else for(var te=x;te<=y;te++)z[te]=Kh}else if(y instanceof Yr)for(y=y.memberParts;y.next();)E=y.value,E instanceof Di&&Vf(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)}hn.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():wg(this)};function wg(a){a.vk===-1&&(a.vk=Dn(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=Ut.alloc(),a.computeBounds(y),y.ed(a.documentBounds),yg(a,y),Ut.free(y),a.Fc=!0,a.bd(),wg(a))}},a.vp))}hn.prototype.ug=function(){this.vk!==-1&&(st.clearTimeout(this.vk),this.vk=-1)},hn.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=Ut.allocAt(0,0,b.width*E,b.height*E);var z=tt.allocAt(0,0);if(a.x>=b.x&&a.x<b.x+x.left&&this.allowHorizontalScroll){var te=Math.max(this.scrollHorizontalLineChange,1);te|=0,z.x-=te,a.x<b.x+x.left/2&&(z.x-=te),a.x<b.x+x.left/4&&(z.x-=4*te)}else a.x<=b.x+b.width&&a.x>b.x+b.width-x.right&&this.allowHorizontalScroll&&(te=Math.max(this.scrollHorizontalLineChange,1),te|=0,z.x+=te,a.x>b.x+b.width-x.right/2&&(z.x+=te),a.x>b.x+b.width-x.right/4&&(z.x+=4*te));return a.y>=b.y&&a.y<b.y+x.top&&this.allowVerticalScroll?(te=Math.max(this.scrollVerticalLineChange,1),te|=0,z.y-=te,a.y<b.y+x.top/2&&(z.y-=te),a.y<b.y+x.top/4&&(z.y-=4*te)):a.y<=b.y+b.height&&a.y>b.y+b.height-x.bottom&&this.allowVerticalScroll&&(te=Math.max(this.scrollVerticalLineChange,1),te|=0,z.y+=te,a.y>b.y+b.height-x.bottom/2&&(z.y+=te),a.y>b.y+b.height-x.bottom/4&&(z.y+=4*te)),z.Xa(Qr)||(y=new tt(y.x+z.x/E,y.y+z.y/E)),Ut.free(b),tt.free(z),y},Le=hn.prototype,Le.Cs=function(){return null},Le.av=function(){return null},Le.bs=function(a,y){this.pj.add(a,y)},Le.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof Yr&&(y.$p=null)})};function lh(a,y,x){function b(){var ue=+new Date;for(z=!0,te.reset();te.next();)if(!te.value[0].al){z=!1;break}z||ue-le>oe?y(x,E,re):st.requestAnimationFrame(b)}for(var E=x.callback,z=!0,te=a.Og.iterator;te.next();)if(!te.value[0].al){z=!1;break}if(typeof E!="function"||z)return y(x,E,a);var re=a,oe=x.callbackTimeout||300,le=+new Date;return st.requestAnimationFrame(function(){b()}),null}Le.Wz=function(a){return Ha?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},Le.Jx=function(a){return a===void 0&&(a={}),lh(this,this.Xz,a)},Le.Xz=function(a,y,x){var b=tp(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 dh+"data":E=b.getImageData(0,0,x.width,x.height);break;case dh:b=(a.document||document).createElement("img"),b.src=x.toDataURL(a.type,a.details),E=b;break;case"blob":return typeof y!="function"&&St('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 tp(a,y,x,b){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&St("properties argument must be an Object.");var E=y.size||null,z=y.scale||null;y.scale!==void 0&&isNaN(y.scale)&&(z="NaN");var te=y.maxSize;y.maxSize===void 0&&(te=x==="SVG"?new fi(1/0,1/0):new fi(2e3,2e3));var re=y.position||null,oe=y.parts||null,le=y.padding===void 0?1:y.padding,ue=y.background||null,me=y.omitTemporary;me===void 0&&(me=!0);var we=y.document||document,Me=y.elementFinished||null,Te=y.showTemporary;Te===void 0&&(Te=!me),y=y.showGrid,y===void 0&&(y=Te),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof le=="number"?le=new Oi(le):le instanceof Oi||St("MakeImage padding must be a Margin or a number."),le.left=Math.max(le.left,0),le.right=Math.max(le.right,0),le.top=Math.max(le.top,0),le.bottom=Math.max(le.bottom,0),a.ib.Vc(!0),me=new al(null,we,void 0,!0);var je=me.context;if(!(E||z||oe||re))return me.width=a.Aa+Math.ceil(le.left+le.right),me.height=a.ya+Math.ceil(le.top+le.bottom),x==="SVG"?b===null?null:(b.resize(me.width,me.height,me.width,me.height),b.ownerDocument=we,b.hs=Me,ls(a,b.context,le,new fi(me.width,me.height),a.Ca,a.pa,oe,ue,Te,y),b.context):(a.Xm=!1,ls(a,je,le,new fi(me.width,me.height),a.Ca,a.pa,oe,ue,Te,y),a.Xm=!0,me.context);var ct=a.Pp,nt=a.documentBounds.copy();if(nt.Fv(a.yb),Te)for(var bt=a.Wa.s,Nt=bt.length,Ot=0;Ot<Nt;Ot++){var Xt=bt[Ot];if(Xt.visible&&Xt.isTemporary){Xt=Xt.Pa.s;for(var gn=Xt.length,Fi=0;Fi<gn;Fi++){var _i=Xt[Fi];_i.isInDocumentBounds&&_i.isVisible()&&(_i=_i.actualBounds,_i.w()&&nt.ed(_i))}}}if(bt=new tt(nt.x,nt.y),oe!==null){for(Nt=new Ut(0,0,0,0),Ot=!0,Xt=oe.iterator,Xt.reset();Xt.next();)gn=Xt.value,gn instanceof pr&&(Fi=gn.layer,Fi!==null&&!Fi.visible||Fi!==null&&!Te&&Fi.isTemporary||!gn.isVisible()||(gn=gn.actualBounds,gn.w()&&(Ot?(Ot=!1,Nt.assign(gn)):Nt.ed(gn))));nt.width=Nt.width,nt.height=Nt.height,bt.x=Nt.x,bt.y=Nt.y}return re!==null&&re.w()&&(bt=re,z||(z=ct)),Nt=re=0,le!==null&&(re=le.left+le.right,Nt=le.top+le.bottom),Ot=Xt=0,E!==null&&(Xt=E.width,Ot=E.height,isFinite(Xt)&&(Xt=Math.max(0,Xt-re)),isFinite(Ot)&&(Ot=Math.max(0,Ot-Nt))),E!==null&&z!==null?(z==="NaN"&&(z=ct),E.w()?(E=Xt,nt=Ot):isNaN(Ot)?(E=Xt,nt=nt.height*z):(E=nt.width*z,nt=Ot)):E!==null?E.w()?(z=Math.min(Xt/nt.width,Ot/nt.height),E=Xt,nt=Ot):isNaN(Ot)?(z=Xt/nt.width,E=Xt,nt=nt.height*z):(z=Ot/nt.height,E=nt.width*z,nt=Ot):z!==null?z==="NaN"&&te.w()?(z=Math.min((te.width-re)/nt.width,(te.height-Nt)/nt.height),z>ct?(z=ct,E=nt.width,nt=nt.height):(E=te.width,nt=te.height)):(E=nt.width*z,nt=nt.height*z):(z=ct,E=nt.width,nt=nt.height),le!==null?(E+=re,nt+=Nt):le=new Oi(0),te!==null&&(ct=te.width,te=te.height,isNaN(ct)&&(ct=2e3),isNaN(te)&&(te=2e3),isFinite(ct)&&(E=Math.min(E,ct)),isFinite(te)&&(nt=Math.min(nt,te))),me.width=Math.ceil(E),me.height=Math.ceil(nt),x==="SVG"?b===null?null:(b.resize(me.width,me.height,me.width,me.height),b.ownerDocument=we,b.hs=Me,ls(a,b.context,le,new fi(Math.ceil(E),Math.ceil(nt)),z,bt,oe,ue,Te,y),b.context):(a.Xm=!1,ls(a,je,le,new fi(Math.ceil(E),Math.ceil(nt)),z,bt,oe,ue,Te,y),a.Xm=!0,me.context)}Je.Object.defineProperties(hn.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof Se||(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 bo(this,st.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 bo(this,st.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(st,"resize",this.Ov,!1),this.removeEventListener(st,"wheel",this.$j,!0),Xu===this&&(Xu=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),Dh(this,a),this.hk())}}},$w:{get:function(){return this.Sq}},pi:{get:function(){return this.hf}},draggedLink:{get:function(){return this.nt},set:function(a){this.nt!==a&&(this.nt=a,a!==null&&(this.Vt=a.fromPort,this.Wt=a.toPort))}},Mx:{get:function(){return this.Vt},set:function(a){this.Vt=a}},Nx:{get:function(){return this.Wt},set:function(a){this.Wt=a}},animationManager:{get:function(){return this.Yd}},undoManager:{get:function(){return this.cc.undoManager}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a,this.cc.skipsUndoManager=a}},delaysLayout:{get:function(){return this.lt},set:function(a){this.lt=a}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&qn(a,"0 <= value <= 1",hn,"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),pu(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),pu(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),pu(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),pu(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&qn(a,">= 0",hn,"scrollHorizontalLineChange"),this.iu=a,this.g("scrollHorizontalLineChange",y,a))}},scrollVerticalLineChange:{get:function(){return this.mu},set:function(a){var y=this.mu;y!==a&&(0>a&&qn(a,">= 0",hn,"scrollVerticalLineChange"),this.mu=a,this.g("scrollVerticalLineChange",y,a))}},lastInput:{get:function(){return this.cj},set:function(a){this.cj=a}},previousInput:{get:function(){return this.Qg},set:function(a){this.Qg=a}},firstInput:{get:function(){return this.bq},set:function(a){this.bq=a}},currentCursor:{get:function(){return this.it},set:function(a){if(a===""&&(a=this.Op),this.it!==a){var y=this.ta,x=this.Ka;if(y!==null&&x!==null){this.it=a;var b=y.style.cursor;y.style.cursor=a,x.style.cursor=a,y.style.cursor===b&&(y.style.cursor="-webkit-"+a,x.style.cursor="-webkit-"+a,y.style.cursor===b&&(y.style.cursor="-moz-"+a,x.style.cursor="-moz-"+a,y.style.cursor===b&&(y.style.cursor=a,x.style.cursor=a)))}}}},defaultCursor:{get:function(){return this.Op},set:function(a){a===""&&(a="auto");var y=this.Op;y!==a&&(this.Op=a,this.g("defaultCursor",y,a))}},click:{get:function(){return this.zh},set:function(a){var y=this.zh;y!==a&&(this.zh=a,this.g("click",y,a))}},doubleClick:{get:function(){return this.Fh},set:function(a){var y=this.Fh;y!==a&&(this.Fh=a,this.g("doubleClick",y,a))}},contextClick:{get:function(){return this.Bh},set:function(a){var y=this.Bh;y!==a&&(this.Bh=a,this.g("contextClick",y,a))}},mouseOver:{get:function(){return this.Qh},set:function(a){var y=this.Qh;y!==a&&(this.Qh=a,this.g("mouseOver",y,a))}},mouseHover:{get:function(){return this.Oh},set:function(a){var y=this.Oh;y!==a&&(this.Oh=a,this.g("mouseHover",y,a))}},mouseHold:{get:function(){return this.Nh},set:function(a){var y=this.Nh;y!==a&&(this.Nh=a,this.g("mouseHold",y,a))}},mouseDragOver:{get:function(){return this.Qt},set:function(a){var y=this.Qt;y!==a&&(this.Qt=a,this.g("mouseDragOver",y,a))}},mouseDrop:{get:function(){return this.Lh},set:function(a){var y=this.Lh;y!==a&&(this.Lh=a,this.g("mouseDrop",y,a))}},handlesDragDropForTopLevelParts:{get:function(){return this.xt},set:function(a){var y=this.xt;y!==a&&(this.xt=a,this.g("handlesDragDropForTopLevelParts",y,a))}},mouseEnter:{get:function(){return this.Mh},set:function(a){var y=this.Mh;y!==a&&(this.Mh=a,this.g("mouseEnter",y,a))}},mouseLeave:{get:function(){return this.Ph},set:function(a){var y=this.Ph;y!==a&&(this.Ph=a,this.g("mouseLeave",y,a))}},toolTip:{get:function(){return this.$h},set:function(a){var y=this.$h;y!==a&&(this.$h=a,this.g("toolTip",y,a))}},contextMenu:{get:function(){return this.Ch},set:function(a){var y=this.Ch;y!==a&&(this.Ch=a,this.g("contextMenu",y,a))}},commandHandler:{get:function(){return this.nb},set:function(a){this.nb!==a&&(this.nb=a,a.Xe(this))}},toolManager:{get:function(){return this.te},set:function(a){this.te!==a&&(this.te=a,a.diagram=this)}},defaultTool:{get:function(){return this.ob},set:function(a){var y=this.ob;y!==a&&(this.ob=a,a.diagram=this,this.currentTool===y&&(this.currentTool=a))}},currentTool:{get:function(){return this.hb},set:function(a){var y=this.hb;y&&(y.isActive&&y.doDeactivate(),y.cancelWaitAfter(),y.doStop()),a===null&&(a=this.defaultTool),a!==null&&(this.hb=a,a.diagram=this,a.doStart())}},selection:{get:function(){return this.Hw}},maxSelectionCount:{get:function(){return this.Nt},set:function(a){var y=this.Nt;if(y!==a)if(0<=a&&!isNaN(a)){if(this.Nt=a,this.g("maxSelectionCount",y,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0<a)){this.R("ChangingSelection",this.selection),y=this.selection.Fa();for(var x=0;x<a;x++)y[x].isSelected=!1;this.R("ChangedSelection",this.selection)}}else qn(a,">= 0",hn,"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||pg(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&&St("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=bd(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var b=this.vb;this.vb=!0,il(this.animationManager,"Model"),y&&(this.pf!==null&&this.pf.each(function(z){return y.ik(z)}),y.ik(this.Oc)),this.cc=a,this.partManager=mg(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(z){return a.Pe(z)}),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(st,"pointermove",this.dk,!0),this.addEventListener(st,"pointerdown",this.ui,!0),this.addEventListener(st,"pointerup",this.fk,!0),this.addEventListener(st,"pointerout",this.ek,!0),this.addEventListener(st,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(st,"wheel",this.$j,!0),this.addEventListener(st,"selectstart",this.preventDefault,!1)):(this.removeEventListener(st,"pointermove",this.dk,!0),this.removeEventListener(st,"pointerdown",this.ui,!0),this.removeEventListener(st,"pointerup",this.fk,!0),this.removeEventListener(st,"pointerout",this.ek,!0),this.removeEventListener(st,"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(st,"wheel",this.$j,!0),this.removeEventListener(st,"selectstart",this.preventDefault,!1),this.addEventListener(y,"wheel",this.$j,!1)),this.qw=a))}},position:{get:function(){return this.pa},set:function(a){var y=tt.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),As(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?Ec(this):(this.vb=!0,a=this.scale,lf(this,this.Sp,this.Aa/a,this.ya/a,this.zk,!1),this.vb=!1),this.vb||this.onViewportBoundsChanged(x,this.viewportBounds,this.Ca,!1)}tt.free(y)}},initialPosition:{get:function(){return this.zt},set:function(a){this.zt.D(a)||(this.zt=a.J())}},initialScale:{get:function(){return this.At},set:function(a){this.At!==a&&(this.At=a)}},grid:{get:function(){return this.fe===null&&(this.fe=sf(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=sf(this)),a.type!==hi.Grid&&St("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),bc(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),Ec(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||St("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 Oi(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===Td&&pu(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,pu(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,gg(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&&gg(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!==xl&&pu(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()||St("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()||St("initialViewportSpot must be a specific Spot: "+a),this.yt=a,this.g("initialDocumentSpot",y,a))}},minScale:{get:function(){return this.Ot},set:function(a){var y=this.Ot;y!==a&&(0<a?(this.Ot=a,this.g("minScale",y,a),a>this.scale&&(this.scale=a)):qn(a,"> 0",hn,"minScale"))}},maxScale:{get:function(){return this.Mt},set:function(a){var y=this.Mt;y!==a&&(0<a?(this.Mt=a,this.g("maxScale",y,a),a<this.scale&&(this.scale=a)):qn(a,"> 0",hn,"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),pu(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 Oi(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&&St("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();)Qp(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==hd&&a!==ts&&a!==ch&&St("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 fi(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 Oi(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),Je.Object.defineProperties(hn,{licenseKey:{get:function(){return Ng.jc()},set:function(a){Ng.add(a.replace(/\s/g,""))}},version:{get:function(){return kd}}}),hn.prototype.makeImageData=hn.prototype.Jx,hn.prototype.makeImage=hn.prototype.Wz,hn.prototype.cacheGroupExternalLinks=hn.prototype.Fu,hn.prototype.addRenderer=hn.prototype.bs,hn.prototype.makeSVG=hn.prototype.av,hn.prototype.makeSvg=hn.prototype.Cs,hn.prototype.stopAutoScroll=hn.prototype.ug,hn.prototype.doAutoScroll=hn.prototype.gs,hn.prototype.isUnoccupied=hn.prototype.Yj,hn.prototype.raiseDiagramEvent=hn.prototype.R,hn.prototype.removeDiagramListener=hn.prototype.am,hn.prototype.addDiagramListener=hn.prototype.Bj,hn.prototype.findTreeRoots=hn.prototype.yz,hn.prototype.layoutDiagram=hn.prototype.Uz,hn.prototype.findTopLevelGroups=hn.prototype.qz,hn.prototype.findTopLevelNodesAndLinks=hn.prototype.rz,hn.prototype.ensureBounds=hn.prototype.Va,hn.prototype.findLinksByExample=hn.prototype.ls,hn.prototype.findNodesByExample=hn.prototype.ms,hn.prototype.findLinkForData=hn.prototype.Kc,hn.prototype.findNodeForData=hn.prototype.ii,hn.prototype.findPartForData=hn.prototype.Lc,hn.prototype.findLinkForKey=hn.prototype.findLinkForKey,hn.prototype.findNodeForKey=hn.prototype.Vb,hn.prototype.findPartForKey=hn.prototype.findPartForKey,hn.prototype.rebuildParts=hn.prototype.Wd,hn.prototype.transformViewToDoc=hn.prototype.Ps,hn.prototype.transformRectDocToView=hn.prototype.zA,hn.prototype.transformDocToView=hn.prototype.op,hn.prototype.centerRect=hn.prototype.es,hn.prototype.scrollToRect=hn.prototype.tv,hn.prototype.scroll=hn.prototype.scroll,hn.prototype.highlightCollection=hn.prototype.Jz,hn.prototype.highlight=hn.prototype.Iz,hn.prototype.selectCollection=hn.prototype.rA,hn.prototype.select=hn.prototype.select,hn.prototype.updateAllRelationshipsFromData=hn.prototype.rp,hn.prototype.updateAllTargetBindings=hn.prototype.updateAllTargetBindings,hn.prototype.commit=hn.prototype.commit,hn.prototype.rollbackTransaction=hn.prototype.Kf,hn.prototype.commitTransaction=hn.prototype.eb,hn.prototype.startTransaction=hn.prototype.Ea,hn.prototype.raiseChanged=hn.prototype.g,hn.prototype.raiseChangedEvent=hn.prototype.cb,hn.prototype.removeChangedListener=hn.prototype.ik,hn.prototype.addChangedListener=hn.prototype.Pe,hn.prototype.removeModelChangedListener=hn.prototype.mA,hn.prototype.addModelChangedListener=hn.prototype.Yw,hn.prototype.findLayer=hn.prototype.Qj,hn.prototype.removeLayer=hn.prototype.kA,hn.prototype.addLayerAfter=hn.prototype.Cy,hn.prototype.addLayerBefore=hn.prototype.Ww,hn.prototype.addLayer=hn.prototype.Al,hn.prototype.moveParts=hn.prototype.moveParts,hn.prototype.copyParts=hn.prototype.Kj,hn.prototype.removeParts=hn.prototype.Is,hn.prototype.remove=hn.prototype.remove,hn.prototype.add=hn.prototype.add,hn.prototype.clearDelayedGeometries=hn.prototype.bx,hn.prototype.setProperties=hn.prototype.nm,hn.prototype.attach=hn.prototype.Du,hn.prototype.set=hn.prototype.set,hn.prototype.resetInputOptions=hn.prototype.Sx,hn.prototype.setInputOption=hn.prototype.sA,hn.prototype.getInputOption=hn.prototype.Ql,hn.prototype.resetRenderingHints=hn.prototype.Tx,hn.prototype.setRenderingHint=hn.prototype.Xx,hn.prototype.getRenderingHint=hn.prototype.Gf,hn.prototype.maybeUpdate=hn.prototype.bd,hn.prototype.requestUpdate=hn.prototype.$b,hn.prototype.delayInitialization=hn.prototype.Xy,hn.prototype.isUpdateRequested=hn.prototype.Pz,hn.prototype.invalidateDocumentBounds=hn.prototype.Ya,hn.prototype.findObjectsNear=hn.prototype.og,hn.prototype.findPartsNear=hn.prototype.mz,hn.prototype.findObjectsIn=hn.prototype.Cf,hn.prototype.findPartsIn=hn.prototype.ux,hn.prototype.findObjectsAt=hn.prototype.ji,hn.prototype.findPartsAt=hn.prototype.lz,hn.prototype.findObjectAt=hn.prototype.ic,hn.prototype.findPartAt=hn.prototype.Ol,hn.prototype.focusObject=hn.prototype.zz,hn.prototype.alignDocument=hn.prototype.Jy,hn.prototype.zoomToRect=hn.prototype.BA,hn.prototype.zoomToFit=hn.prototype.zoomToFit,hn.prototype.diagramScroll=hn.prototype.kx,hn.prototype.focus=hn.prototype.focus;var Uf=new Ii,np=null,Ha=st.document!==void 0,Ih=null,Bd="",xl=new ln(hn,"None",0),tu=new ln(hn,"Uniform",1),Oh=new ln(hn,"UniformToFill",2),uh=new ln(hn,"CycleAll",10),Cg=new ln(hn,"CycleNotDirected",11),bg=new ln(hn,"CycleNotDirectedFast",12),Eg=new ln(hn,"CycleNotUndirected",13),Mg=new ln(hn,"CycleDestinationTree",14),Lg=new ln(hn,"CycleSourceTree",15),Td=new ln(hn,"DocumentScroll",1),cf=new ln(hn,"InfiniteScroll",2),hd=new ln(hn,"TreeParentCollapsed",21),ts=new ln(hn,"AllParentsCollapsed",22),ch=new ln(hn,"AnyParentsCollapsed",23),Ng=new kn,kd="2.3.10",dh="image",df=null,ip=!1;function hl(){if(Ha){var a=st.document.createElement("canvas"),y=a.getContext("2d"),x=cn("7ca11abfd022028846");y[x]=cn("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",on.Dx+"4ae6247590da4bb21c324ba3a84e385776",ro.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",Jt.za],E=1;5>E;E++)y[cn("7ca11abfd7330390")](cn(b[E-1]),10,15*E);for(y[x]=cn("39f046ebb36e4b"),x=1;5>x;x++)y[cn("7ca11abfd7330390")](cn(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(ro.prototype.Cd=ro.prototype.Eu),df=a}}hn.className="Diagram",hn.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=st.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof hn?y.H:null},hn.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},hn.useDOM=function(a){Ha=a?st.document!==void 0:!1},hn.isUsingDOM=function(){return Ha},hn.None=xl,hn.Uniform=tu,hn.UniformToFill=Oh,hn.CycleAll=uh,hn.CycleNotDirected=Cg,hn.CycleNotDirectedFast=bg,hn.CycleNotUndirected=Eg,hn.CycleDestinationTree=Mg,hn.CycleSourceTree=Lg,hn.DocumentScroll=Td,hn.InfiniteScroll=cf,hn.TreeParentCollapsed=hd,hn.AllParentsCollapsed=ts,hn.AnyParentsCollapsed=ch;function rp(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Id(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=st[cn("76a715b2f73f148a")][cn("72ba13b5")]||"";if(a.Rc=!0,Ha){var b=hn[cn("76a115b6ed251eaf4692")];if(b)for(var E=Ng.iterator;E.next()&&(b=E.value,b=cn(b).split(cn("39e9")),!(6>b.length));){var z=cn(b[1]).split(".");if(b[4]!=="7da71ca0")break;var te=cn(on[cn("6cae19")]).split(".");if(z[0]>te[0]||z[0]===te[0]&&z[1]>=te[1]){var re=st[cn("74a900bae4370f8b51")][cn("6fbb13a1c2311e8a57")].toLowerCase();if(te=re[cn("73a612b6fb191d")](cn("3aad1ab6e022098b4dc4")),z=cn(b[2]),-1<te&&(re=re[cn("73a612b6fb191d")](z.toLowerCase()+"/"),a.Rc=!(-1<re&&re<te),!a.Rc))break;for(te=x[cn("76ad18b4f73e")],re=x[cn("73a612b6fb191d")](cn("35e7"))+2;re<te;re++)y+=x[re];if(te=y[cn("73a612b6fb191d")](z),0>te&&z!==cn("7da71ca0ad381e90")&&(te=y[cn("73a612b6fb191d")](cn("76a715b2ef3e149757"))),0>te&&(te=y[cn("73a612b6fb191d")](cn("76a715b2ef3e149757"))),0>te&&(te=y[cn("73a612b6fb191d")](cn("2bfa41fdb3784bca12"))),0>te&&(te=x[cn("73a612b6fb191d")](cn("7baa19a6f76c1988428554"))),a.Rc=!(0<=te&&te<y[cn("73a612b6fb191d")](cn("35"))||y[cn("73a612b6fb191d")](cn("35"))===-1),!a.Rc||x[cn("73a612b6fb191d")](cn("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[cn("73a612b6fb191d")](z)),!a.Rc)||(te=st[cn("76a715b2f73f148a")][cn("69ad17a1e03e")],re=te[cn("73a612b6fb191d")](cn("7fb002b6ed25128b4da25b2e")),-1<re&&(a.Rc=!(te[cn("73a612b6fb191d")](z)>re),!a.Rc)))break;if(z[0]==="#"){te=st.document.createElement("div");for(var oe=b[0].replace(/[A-Za-z]/g,"");4>oe.length;)oe+="9";if(re=oe,oe=oe.substr(oe.length-4),b="",b+=["gsh","gsf"][parseInt(oe.substr(0,1),10)%2],b+=["Header","Background","Display","Feedback"][parseInt(oe.substr(0,1),10)%4],te[cn("79a417a0f0181a8946")]=b,st.document[cn("78a712aa")]){st.document[cn("78a712aa")][cn("7bb806b6ed32388c4a875b")](te),oe=st.getComputedStyle(te).getPropertyValue(cn("78a704b7e62456904c9b12701b6532a8"));var le=st.getComputedStyle(te).getPropertyValue(cn("75b817b0ea2202"));if(st.document[cn("78a712aa")][cn("68ad1bbcf533388c4a875b")](te),oe){if(te=st[cn("77a902b0eb1b1e804a8a")],le==="0."+parseInt(re,10)%100||oe.indexOf(parseInt(z[1]+z[2],16))!==-1&&oe.indexOf(parseInt(z[3]+z[4],16))!==-1){a.Rc=!1;break}else if(te&&te(cn("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(b="."+b,z=0;z<document.styleSheets.length;z++){te=document.styleSheets[z].rules||document.styleSheets[z].cssRules;for(var ue in te)if(b===te[ue].selectorText){a.Rc=!1;break e}}}}else a.Rc=null,a.Rc=!1}}}else{for(ue=x[cn("76ad18b4f73e")],E=x[cn("73a612b6fb191d")](cn("35e7"))+2;E<ue;E++)y+=x[E];x=y[cn("73a612b6fb191d")](cn("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[cn("73a612b6fb191d")](cn("35")))}}}return 0<a.Rc&&a!==a.wy}rp.className="DiagramHelper";function Zc(a){this.j=a===void 0?new tt:a,this.o=new tt}Je.Object.defineProperties(Zc.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 hh="DraggingInfo";Zc.className="DraggingInfo";function ie(a,y,x){this.node=a,this.info=y,this.Su=x}ie.className="DraggingNodeInfoPair";function ae(){this.reset()}ae.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new fi(NaN,NaN).freeze(),this.gridSnapCellSpot=Ba,this.gridSnapOrigin=new tt(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},ae.className="DraggingOptions";function fe(a,y){if(typeof a=="string"||st.Element&&a instanceof Element)var x=hn.call(this,a)||this;else x=hn.call(this)||this,y=a;return de(x),y&&x.nm(y),x}$t(fe,hn);function de(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=zs,a.layout=new qs}fe.prototype.reset=function(){hn.prototype.reset.call(this),de(this)},fe.className="Palette";function Se(a,y){if(typeof a=="string"||st.Element&&a instanceof Element)var x=hn.call(this,a)||this;else x=hn.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 pr;var E=new io;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 Oi(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new ft,x.toolManager.mouseMoveTools),x.click=function(){var z=b.observed;if(z!==null){var te=z.viewportBounds,re=b.lastInput.documentPoint;z.position=new tt(re.x-te.width/2,re.y-te.height/2)}},x.Pf=function(){b.Ya(),_e(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&&_e(b)},x.autoScale=tu,x.vb=!1,y&&Object.assign(x,y),x}$t(Se,hn),Se.prototype.computePixelRatio=function(){return 1},Se.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(Du(this),this.ql===null){var x=new al(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),Re(this)}finally{this.ta=a,this.ib=y}}}hn.prototype.redraw.call(this)},Se.prototype.gc=function(){if(this.Ka===null&&St("No div specified"),this.ta===null&&St("No canvas specified"),!(this.ta instanceof bo)&&(Kv(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){Du(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?Re(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 Re(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=Ut.alloc().assign(a.viewportBounds).ed(y.viewportBounds),bc(y,E),Ut.free(E),$s(y));var z=a.Ab;z.reset(),a.scale!==1&&z.scale(a.scale),a.position.x===0&&a.position.y===0||z.translate(-a.position.x,-a.position.y),E=a.ib,E.scale(a.Mb,a.Mb),E.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),E.yc(),y=y.Wa.s,z=y.length;for(var te=0;te<z;te++){var re=y[te],oe=a;if(re.visible&&re.opacity!==0){var le=re.diagram.grid.part;if(!x&&re.isTemporary)b&&le.layer===re&&(re=Ts(re,E),le.gc(E,oe),E.globalAlpha=re);else{for(var ue=Ts(re,E),me=oe.scale,we=Ut.alloc(),Me=re.Pa.s,Te=Me.length,je=0;je<Te;je++){var ct=Me[je];(b||ct!==le)&&re.Oj(E,ct,oe,null,me,we,!1)}Ut.free(we),E.globalAlpha=ue}}}}}function _e(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=fi.alloc();E.h(x.width,x.height),b.desiredSize=E,fi.free(E),a=2/a.scale,b instanceof io&&(b.strokeWidth=a),y.location=new tt(x.x-a/2,x.y-a/2),y.isSelected=!0}}}Se.prototype.computeBounds=function(){var a=this.observed;if(a===null)return vr;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},Se.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},Se.prototype.onViewportBoundsChanged=function(a,y,x,b){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),_e(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))},Je.Object.defineProperties(Se.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof Se&&St("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),_e(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),_e(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)}}}),Se.className="Overview";function ft(){Fa.call(this),this.j=null}$t(ft,Fa),ft.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||!a.allowMove||!a.allowSelect)return!1;var y=a.observed;if(y===null)return!1;var x=a.lastInput;return!x.left||a.currentTool!==this&&(!this.isBeyondDragSize()||x.isTouchEvent&&x.timestamp-a.firstInput.timestamp<this.delay)?!1:(this.findDraggablePart()===null&&(x=y.viewportBounds,this.j=new tt(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new tt(a.x-this.j.x,a.y-this.j.y)),!0)},ft.prototype.doActivate=function(){this.j=null,Fa.prototype.doActivate.call(this)},ft.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},ft.prototype.moveParts=function(){var a=this.diagram,y=a.observed;if(y!==null){var x=a.box;if(x!==null){if(this.j===null){var b=a.firstInput.documentPoint;x=x.location,this.j=new tt(b.x-x.x,b.y-x.y)}a=a.lastInput.documentPoint,y.position=new tt(a.x-this.j.x,a.y-this.j.y)}}},ft.className="OverviewDraggingTool";function lt(){Or(this),this.H=Xu,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=vr,this.hb=!0,this.cg=null,this.ob=200}lt.prototype.toString=function(){return"CommandHandler"},lt.prototype.Xe=function(a){this.H=a},lt.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=$i?y.meta:y.control,b=y.shift,E=y.alt,z=y.key;!x||z!=="C"&&z!=="Insert"?x&&z==="X"||b&&z==="Del"?this.canCutSelection()&&this.cutSelection():x&&z==="V"||b&&z==="Insert"?this.canPasteSelection()&&this.pasteSelection():x&&z==="Y"||E&&b&&z==="Backspace"?this.canRedo()&&this.redo():x&&z==="Z"||E&&z==="Backspace"?this.canUndo()&&this.undo():z==="Del"||z==="Backspace"?this.canDeleteSelection()&&this.deleteSelection():x&&z==="A"?this.canSelectAll()&&this.selectAll():z==="Esc"?this.canStopCommand()&&this.stopCommand():z==="Up"?a.allowVerticalScroll&&(x?a.scroll("pixel","up"):a.scroll("line","up")):z==="Down"?a.allowVerticalScroll&&(x?a.scroll("pixel","down"):a.scroll("line","down")):z==="Left"?a.allowHorizontalScroll&&(x?a.scroll("pixel","left"):a.scroll("line","left")):z==="Right"?a.allowHorizontalScroll&&(x?a.scroll("pixel","right"):a.scroll("line","right")):z==="PageUp"?b&&a.allowHorizontalScroll?a.scroll("page","left"):a.allowVerticalScroll&&a.scroll("page","up"):z==="PageDown"?b&&a.allowHorizontalScroll?a.scroll("page","right"):a.allowVerticalScroll&&a.scroll("page","down"):z==="Home"?x&&a.allowVerticalScroll?a.scroll("document","up"):!x&&a.allowHorizontalScroll&&a.scroll("document","left"):z==="End"?x&&a.allowVerticalScroll?a.scroll("document","down"):!x&&a.allowHorizontalScroll&&a.scroll("document","right"):z===" "?this.canScrollToPart()&&this.scrollToPart():z==="Subtract"?this.canDecreaseZoom()&&this.decreaseZoom():z==="Add"?this.canIncreaseZoom()&&this.increaseZoom():x&&z==="0"?this.canResetZoom()&&this.resetZoom():b&&z==="Z"?this.canZoomToFit()&&this.zoomToFit():x&&!b&&z==="G"?this.canGroupSelection()&&this.groupSelection():x&&b&&z==="G"?this.canUngroupSelection()&&this.ungroupSelection():z==="F2"||y.event&&y.event.key==="F2"?this.canEditTextBlock()&&this.editTextBlock():z==="ContextMenu"||y.event&&y.event.key==="ContextMenu"?this.canShowContextMenu()&&this.showContextMenu():y.bubbles=!0:this.canCopySelection()&&this.copySelection()},lt.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},lt.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof fa&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},lt.prototype.canStopCommand=function(){return!0},lt.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=""}},lt.prototype.canSelectAll=function(){return this.diagram.allowSelect},lt.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 _n,x=a.selection.iterator;x.next();)yf(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=""}},lt.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},lt.prototype.copySelection=function(){var a=this.diagram,y=new _n;for(a=a.selection.iterator;a.next();)yf(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},lt.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},lt.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},lt.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},lt.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)Ih=null,Bd="";else{x=y.model;var b=!1,E=!1,z=null;try{x.Tl()&&(b=x.Jj,x.Jj=this.copiesParentKey),x.Wj()&&(E=x.Ij,x.Ij=this.copiesGroupKey),z=y.Kj(a,null,!0)}finally{x.Tl()&&(x.Jj=b),x.Wj()&&(x.Ij=E),x=new kn,x.addAll(z),Ih=x,Bd=y.model.dataFormat}}y.R("ClipboardChanged",x)},lt.prototype.pasteFromClipboard=function(){var a=new _n,y=Ih;if(y===null)return a;var x=this.diagram;if(Bd!==x.model.dataFormat)return a;var b=x.model,E=!1,z=!1,te=null;try{b.Tl()&&(E=b.Jj,b.Jj=this.copiesParentKey),b.Wj()&&(z=b.Ij,b.Ij=this.copiesGroupKey),te=x.Kj(y,x,!1)}finally{for(b.Tl()&&(b.Jj=E),b.Wj()&&(b.Ij=z),y=te.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},lt.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 z=this.computeEffectiveCollection(y.selection,y.Wm);Cc(y,z,new tt(a.x-E.centerX,a.y-E.centerY),y.Wm,!1)}}y.R("ClipboardPasted",x)}finally{y.eb("Paste"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},lt.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||Ih===null||Ih.count===0||Bd!==a.model.dataFormat)},lt.prototype.undo=function(){this.diagram.undoManager.undo()},lt.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},lt.prototype.redo=function(){this.diagram.undoManager.redo()},lt.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},lt.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===xl&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},lt.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==xl?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},lt.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===xl&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},lt.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==xl?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},lt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},lt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},lt.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,b=a.scale;il(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=vr):(this.Jt=b,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),Fs(y)},lt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},lt.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(oe){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;il(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 z=function(){y.Ea();for(var oe=E.pop();0<E.length&&oe instanceof Di&&oe.isTreeExpanded&&(!(oe instanceof Yr)||oe.isSubGraphExpanded);)oe=E.pop();0<E.length?(oe instanceof pr&&y.tv(oe.actualBounds),oe instanceof Di&&!oe.isTreeExpanded&&(oe.isTreeExpanded=!0),oe instanceof Yr&&!oe.isSubGraphExpanded&&(oe.isSubGraphExpanded=!0)):(oe instanceof pr&&y.es(oe.actualBounds),y.am("LayoutCompleted",te)),y.eb("Scroll To Part")},te=function(){Dn(z,(x.isEnabled?x.duration:0)+b)};y.Bj("LayoutCompleted",te),z()}}else{var re=y.position.copy();y.es(a.actualBounds),re.Xa(y.position)&&x.Cc()}}};function Zt(a,y,x){if(y.isVisible())return x;if(y instanceof jo)Zt(a,y.adornedPart,x);else if(y instanceof vi){var b=y.fromNode;b!==null&&Zt(a,b,x),y=y.toNode,y!==null&&Zt(a,y,x)}else y instanceof Di&&(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}lt.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof pr)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},lt.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),il(y.animationManager,"Collapse Tree");var x=new kn;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 Di&&E.isTreeExpanded&&(E.collapseTree(),x.add(E))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},lt.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Di&&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 Di&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},lt.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),il(y.animationManager,"Expand Tree");var x=new kn;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 Di&&!E.isTreeExpanded&&(E.expandTree(),x.add(E))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},lt.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Di)||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 Di&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},lt.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 kn,z=a.selection.iterator;z.next();){var te=z.value;te.Zc()&&te.canGroup()&&E.add(te)}for(var re=new kn,oe=E.iterator;oe.next();){var le=oe.value;z=!1;for(var ue=E.iterator;ue.next();)if(le.Td(ue.value)){z=!0;break}z||re.add(le)}if(0<re.count){var me=re.first().containingGroup;if(me!==null)for(;me!==null;){E=!1;for(var we=re.iterator;we.next();)if(!we.value.Td(me)){E=!0;break}if(E)me=me.containingGroup;else break}if(x instanceof Yr)hc(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var Me=y.copyNodeData(x);en(Me)&&(y.xf(Me),b=a.ii(Me))}if(b!==null){me!==null&&this.isValidMember(me,b)&&(b.containingGroup=me);for(var Te=re.iterator;Te.next();){var je=Te.value;this.isValidMember(b,je)&&(je.containingGroup=b)}a.clearSelection(!0),b.isSelected=!0}}a.R("SelectionGrouped",b)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},lt.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 Rn(a){var y=mn();for(a=a.iterator;a.next();){var x=a.value;x instanceof vi||y.push(x)}a=new _n,x=y.length;for(var b=0;b<x;b++){for(var E=y[b],z=!0,te=0;te<x;te++)if(E.Td(y[te])){z=!1;break}z&&a.add(E)}return Wn(y),a}lt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof vi)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},lt.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 kn;if(a!==null)b.add(a);else for(var E=y.selection.iterator;E.next();){var z=E.value;z instanceof Yr&&z.canUngroup()&&b.add(z)}var te=new kn;if(0<b.count){y.clearSelection(!0);for(var re=b.iterator;re.next();){var oe=re.value;oe.expandSubGraph();var le=oe.containingGroup,ue=le!==null&&le.data!==null?x.wa(le.data):void 0;te.addAll(oe.memberParts);for(var me=te.iterator;me.next();){var we=me.value;if(we.isSelected=!0,!(we instanceof vi)){var Me=we.data;Me!==null?x.mp(Me,ue):we.containingGroup=le}}y.remove(oe)}}y.R("SelectionUngrouped",b,te)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},lt.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 Yr))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Yr&&y.canUngroup())return!0;return!1},lt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=Rn(a).iterator;a.next();){var b=a.value;b.containingGroup!==null&&(!y||this.isValidMember(null,b)?b.containingGroup=null:x=!1)}return x},lt.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),il(y.animationManager,"Collapse SubGraph");var x=new kn;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 Yr&&E.isSubGraphExpanded&&(E.collapseSubGraph(),x.add(E))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},lt.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof Yr&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Yr&&y.isSubGraphExpanded)return!0;return!1},lt.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),il(y.animationManager,"Expand SubGraph");var x=new kn;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 Yr&&!E.isSubGraphExpanded&&(E.expandSubGraph(),x.add(E))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},lt.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof Yr&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Yr&&!y.isSubGraphExpanded)return!0;return!1},lt.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(z){return z instanceof ua&&z.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},lt.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 ua))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 ua&&x.editable}),a!==null))return!0;return!1},lt.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 Yt?E=a.ga(wo):y.viewportBounds.ca(b.documentPoint)||(E=y.viewportBounds,E=new tt(E.x+E.width/2,E.y+E.height/2)),E!==null&&(b.viewPoint=y.op(E),b.documentPoint=E,b.left=!1,b.right=!0,b.up=!0),y.currentTool=x,ia(x,!1,a)}},lt.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)},lt.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 Ii,a===null)return b;for(var z=a.iterator;z.next();)Hu(x,b,z.value,E,y);if(x.draggedLink!==null&&y.dragsLink)return b;for(z=a.iterator;z.next();)a=z.value,a instanceof vi&&(y=a.fromNode,y===null||b.contains(y)?(y=a.toNode,y===null||b.contains(y)||b.remove(a)):b.remove(a));return b},Je.Object.defineProperties(lt.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||St("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}}}),lt.className="CommandHandler",Ed=function(){return new lt};function Yt(){Or(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new tt(NaN,NaN).freeze(),this.jd=ta,this.Ab=new ro,this.wh=new ro,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=Ls,this.uc=new Ut(NaN,NaN,NaN,NaN).freeze(),this.Ib=new Ut(NaN,NaN,NaN,NaN).freeze(),this.dc=new Ut(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=Vo,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 ci,ai,tr,lr,Pr,Vr,yo,ao,Eo,Qo;Yt.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=At(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},Yt.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)},Yt.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},Yt.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},Yt.prototype.copy=function(){return this.clone()},Le=Yt.prototype,Le.qb=function(a){a.classType===vi?a.name.indexOf("Orient")===0?this.segmentOrientation=a:St("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===Yt&&(this.stretch=a)},Le.toString=function(){return Hn(this.constructor)+"#"+br(this)},Le.th=function(){this.A!==null&&(this.A.nc=!0)};function so(a){a.A===null?a.A=new Ar:a.A.nc&&(a.A=a.A.copy())}Le.Xc=function(){if(this.ba===null){var a=new to;a.Xi=La,a.yj=La,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},Le.cb=function(a,y,x,b,E,z,te){var re=this.part;if(re!==null&&(re.gk(a,y,x,b,E,z,te),x===this&&a===wa&&xe(this)&&ha(this,re,y),z=this.diagram,this.animationTriggers===null||z===null||!z.pi||z.undoManager.isUndoingRedoing||z.animationManager.Dm||(a=this.animationTriggers.get(y),a!==null&&z.animationManager.isEnabled&&!z.animationManager.isTicking&&(this.jo===null&&(this.jo=new Ii),te=z.undoManager.transactionLevel===0,a.startCondition===Bs?te=!0:a.startCondition===os&&(te=!1),te?(z=new za,Da(a,z),te=this.jo.get(a),te!==null&&te.stop(),this.jo.add(a,z),z.vu=this,z.Nw=a,z.add(this,y,b,E),z.start()):(il(z.animationManager,"Trigger"),z.animationManager.defaultAnimation.add(this,y,b,E)))),this instanceof hi&&x===re&&(re.l&16777216)!==0&&re.data!==null))for(x=this.O.s,b=x.length,E=0;E<b;E++)re=x[E],re instanceof hi&&Yf(re,function(oe){oe.data!==null&&oe.l&16777216&&oe.La(y)})};function ha(a,y,x){var b=a.ih();if(b!==null)for(var E=a.localBindings.iterator;E.next();){var z=E.value,te=null;if(z.sourceName!==null){if(te=L1(z,b,a),te===null)continue;z.sp(a,te,x,null)}else if(z.isToModel){var re=y.diagram;re===null||re.skipsModelSourceBindings||z.sp(a,re.model.modelData,x,b)}else{if(re=b.data,re===null)continue;var oe=y.diagram;oe===null||oe.skipsModelSourceBindings||z.sp(a,re,x,b)}te===a&&(re=b.ks(z.Ai),re!==null&&z.Mv(re,te,x))}}Le.ks=function(a){return this.bindingId===a?this:null},Le.g=function(a,y,x){this.cb(wa,a,this,y,x)},Le.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 ro);var z=this.Lb;z.reset(),this.no(z,a,y,x,b),z.pp(E)}};function ws(a,y,x,b){return a.pickable===!1?!1:(b.multiply(a.transform),x?a.Yc(y,b):a.fh(y,b))}Le.tx=function(a,y,x){if(this.pickable===!1)return!1;var b=this.naturalBounds;return y=a.Bf(y),x?zo(a.x,a.y,0,0,0,b.height)<=y||zo(a.x,a.y,0,b.height,b.width,b.height)<=y||zo(a.x,a.y,b.width,b.height,b.width,0)<=y||zo(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},Le.se=function(){return!0},Le.ca=function(a){var y=tt.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return tt.free(y),!1;var b=this.diagram;if(b!==null&&b.wq){var E=b.Ql("extraTouchThreshold"),z=b.Ql("extraTouchArea"),te=z/2,re=this.naturalBounds;b=this.Df()*b.scale;var oe=1/b;if(re.width*b<E&&re.height*b<E)return a=xr(x.x-te*oe,x.y-te*oe,x.width+z*oe,x.height+z*oe,y.x,y.y),tt.free(y),a}return E=!1,(this instanceof jo||this instanceof io?xr(x.x-5,x.y-5,x.width+10,x.height+10,y.x,y.y):x.ca(y))&&(this.tb&&!this.tb.ca(y)?E=!1:this.areaBackground!==null&&x.ca(y)||this.Ma!==null&&this.dc.ca(a)?E=!0:E=this.gh(a)),tt.free(y),E},Le.gh=function(a){var y=this.naturalBounds;return xr(0,0,y.width,y.height,a.x,a.y)},Le.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=Ut.allocAt(0,0,y.width,y.height);var x=this.transform,b=!1,E=tt.allocAt(a.x,a.y);return y.ca(x.Cd(E))&&(E.h(a.x,a.bottom),y.ca(x.Cd(E))&&(E.h(a.right,a.bottom),y.ca(x.Cd(E))&&(E.h(a.right,a.y),y.ca(x.Cd(E))&&(b=!0)))),tt.free(E),Ut.free(y),b},Le.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,b=!1,E=tt.allocAt(0,0);return a.ca(y.Ga(E))&&(E.h(0,x.height),a.ca(y.Ga(E))&&(E.h(x.width,x.height),a.ca(y.Ga(E))&&(E.h(x.width,0),a.ca(y.Ga(E))&&(b=!0)))),tt.free(E),b},Le.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,b=tt.allocAt(0,0),E=tt.allocAt(0,x.height),z=tt.allocAt(x.width,x.height),te=tt.allocAt(x.width,0),re=!1;if(a.ca(y.Ga(b))||a.ca(y.Ga(E))||a.ca(y.Ga(z))||a.ca(y.Ga(te)))re=!0;else{x=Ut.allocAt(0,0,x.width,x.height);var oe=tt.allocAt(a.x,a.y);x.ca(y.Cd(oe))?re=!0:(oe.h(a.x,a.bottom),x.ca(y.Cd(oe))?re=!0:(oe.h(a.right,a.bottom),x.ca(y.Cd(oe))?re=!0:(oe.h(a.right,a.y),x.ca(y.Cd(oe))&&(re=!0)))),tt.free(oe),Ut.free(x),!re&&(Jt.us(a,b,E)||Jt.us(a,E,z)||Jt.us(a,z,te)||Jt.us(a,te,b))&&(re=!0)}return tt.free(b),tt.free(E),tt.free(z),tt.free(te),re},Le.ga=function(a,y){if(y===void 0&&(y=new tt),a instanceof Vi){var x=this.naturalBounds;y.h(a.x*x.width+a.offsetX,a.y*x.height+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},Le.mi=function(a){a===void 0&&(a=new Ut);var y=this.naturalBounds,x=this.oe,b=tt.allocAt(0,0).transform(x);return a.h(b.x,b.y,0,0),b.h(y.width,0).transform(x),cr(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),cr(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),cr(a,b.x,b.y,0,0),tt.free(b),a},Le.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},Le.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},Le.qs=function(a,y){return y===void 0&&(y=new tt),y.assign(a),this.oe.Cd(y),y},Le.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Le.Sj=function(a,y,x,b,E){var z=this.transform,te=1/(z.m11*z.m22-z.m12*z.m21),re=z.m22*te,oe=-z.m12*te,le=-z.m21*te,ue=z.m11*te,me=te*(z.m21*z.dy-z.m22*z.dx),we=te*(z.m12*z.dx-z.m11*z.dy);return this.areaBackground!==null?(z=this.actualBounds,Jt.Ff(z.left,z.top,z.right,z.bottom,a,y,x,b,E)):(te=a*re+y*le+me,a=a*oe+y*ue+we,y=x*re+b*le+me,x=x*oe+b*ue+we,E.h(0,0),b=this.naturalBounds,x=Jt.Ff(0,0,b.width,b.height,te,a,y,x,E),E.transform(z),x)},Yt.prototype.measure=function(a,y,x,b){if(mt(this)!==!1){var E=this.Kg,z=E.right+E.left;E=E.top+E.bottom,a=Math.max(a-z,0),y=Math.max(y-E,0),x=Math.max((x||0)-z,0),b=Math.max((b||0)-E,0),z=this.angle,E=this.desiredSize;var te=this.kq();z===90||z===270?(a=isFinite(E.height)?E.height+te:a,y=isFinite(E.width)?E.width+te:y):(a=isFinite(E.width)?E.width+te:a,y=isFinite(E.height)?E.height+te:y),E=x||0,te=b||0;var re=this instanceof hi;switch(Fl(this,!0)){case ai:te=E=0,re&&(y=a=1/0);break;case ci:isFinite(a)&&a>x&&(E=a),isFinite(y)&&y>b&&(te=y);break;case lr:isFinite(a)&&a>x&&(E=a),te=0,re&&(y=1/0);break;case Pr:isFinite(y)&&y>b&&(te=y),E=0,re&&(a=1/0)}re=this.maxSize;var oe=this.minSize;E>re.width&&oe.width<re.width&&(E=re.width),te>re.height&&oe.height<re.height&&(te=re.height),x=Math.max(E,oe.width),b=Math.max(te,oe.height),re.width<x&&(x=Math.min(oe.width,x)),re.height<b&&(b=Math.min(oe.height,b)),a=Math.min(re.width,a),y=Math.min(re.height,y),a=Math.max(x,a),y=Math.max(b,y),(z===90||z===270)&&(z=a,a=y,y=z,z=x,x=b,b=z),this.uc.ka(),this.Wl(a,y,x,b),this.uc.freeze(),this.uc.w()||St("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),gt(this,!1)}},Yt.prototype.Wl=function(){},Yt.prototype.Dd=function(){return!1},Yt.prototype.arrange=function(a,y,x,b,E){this.Uk();var z=Ut.alloc();z.assign(this.Ib),this.Ib.ka(),Bt(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&&zh(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 ua&&(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()||St("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),Kt(this,!1),Ut.free(z)},Le=Yt.prototype,Le.eh=function(){};function Pl(a,y,x,b,E){if(a.Ib.h(y,x,b,E),!a.desiredSize.w()){var z=a.uc;x=a.Kg,y=x.right+x.left;var te=x.top+x.bottom;switch(x=z.width+y,z=z.height+te,b+=y,E+=te,y=Fl(a,!0),x===b&&z===E&&(y=ai),y){case ai:(x>b||z>E)&&(gt(a,!0),a.measure(x>b?b:x,z>E?E:z,0,0));break;case ci:gt(a,!0),a.measure(b,E,0,0);break;case lr:gt(a,!0),a.measure(b,z,0,0);break;case Pr:gt(a,!0),a.measure(x,E,0,0)}}}Le.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(),Zi(a,y)||(x.oh(),this.Pn(x)))},Le.Pn=function(a){this.portId!==null&&(_v(a,!0),a instanceof Di&&$S(a,this))},Le.gc=function(a,y){if(!vu(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 z=this instanceof hi&&zh(this),te=this.Ib;if(z){var re=this.Ib,oe=this.dc,le=this.areaBackground,ue=this.Ma;le===null&&ue===null||a.yc(),le!==null&&(Za(this,a,le,!0,!0,oe,re),le instanceof Oo&&le.type===Qu?(a.beginPath(),a.rect(re.x,re.y,re.width,re.height),a.ng(le)):a.fillRect(re.x,re.y,re.width,re.height)),ue!==null&&(Za(this,a,ue,!0,!1,oe,re),ue instanceof Oo&&ue.type===Qu?(a.beginPath(),a.rect(re.x,re.y,re.width,re.height),a.ng(ue)):a.fillRect(re.x,re.y,re.width,re.height)),this.hh(a,y)}if(!z&&(z||te.width!==0&&te.height!==0&&!isNaN(te.x)&&!isNaN(te.y))){z=this.transform,re=this.panel,this.l&4096&&Is(this),le=this.part,oe=!1;var me=0;le&&y.Gf("drawShadows")&&(oe=le.isShadowed)&&(ue=le.shadowOffset,me=Math.max(ue.y,ue.x)*y.scale*y.Mb),ue=this.Dd();var we;if(!(we=y.$i||!ue)){var Me=this.naturalBounds;we=this.wh;var Te=we.m11,je=we.m21,ct=we.dx,nt=we.m12,bt=we.m22,Nt=we.dy,Ot,Xt=Ot=0;we=Ot*Te+Xt*je+ct;var gn=Ot*nt+Xt*bt+Nt;Ot=Me.width+me,Xt=0;var Fi=Ot*Te+Xt*je+ct;Ot=Ot*nt+Xt*bt+Nt,Xt=Math.min(we,Fi);var _i=Math.min(gn,Ot),zi=Math.max(we+0,Fi)-Xt,mi=Math.max(gn+0,Ot)-_i;we=Xt,gn=_i,Ot=Me.width+me,Xt=Me.height+me,Fi=Ot*Te+Xt*je+ct,Ot=Ot*nt+Xt*bt+Nt,Xt=Math.min(we,Fi),_i=Math.min(gn,Ot),zi=Math.max(we+zi,Fi)-Xt,mi=Math.max(gn+mi,Ot)-_i,we=Xt,gn=_i,Ot=0,Xt=Me.height+me,Fi=Ot*Te+Xt*je+ct,Ot=Ot*nt+Xt*bt+Nt,Xt=Math.min(we,Fi),_i=Math.min(gn,Ot),zi=Math.max(we+zi,Fi)-Xt,mi=Math.max(gn+mi,Ot)-_i,we=Xt,gn=_i,me=y.viewportBounds,Me=me.x,Te=me.y,we=!(we>me.width+Me||Me>zi+we||gn>me.height+Te||Te>mi+gn)}if(we){if(we=(this.l&256)!==0,a.clipInsteadOfFill&&(we=!1),this instanceof ua&&(a.font=this.font),we){if(gn=re.se()?re.naturalBounds:re.actualBounds,zi=Math.max(te.x,gn.x),mi=Math.max(te.y,gn.y),me=Math.min(te.right,gn.right)-zi,Me=Math.min(te.bottom,gn.bottom)-mi,Te=this.tb,Te!==null&&(zi=Te.x,mi=Te.y,me=Te.width,Me=Te.height),zi>te.width+te.x||te.x>gn.width+gn.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect(zi,mi,me,Me),a.clip()}if(ue){if(!le.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}oe&&(gn=le.shadowOffset,a.Ev(gn.x*y.scale*this.scale*y.Mb,gn.y*y.scale*this.scale*y.Mb,le.shadowBlur),Xs(a),a.shadowColor=le.shadowColor)}oe&&this.shadowVisible===!0?Xs(a):oe&&this.shadowVisible===!1&&Al(a),le=this.naturalBounds,this.areaBackground!==null&&(a.yc(),mu(this,a,le,te)),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),oe&&ks(this,re)&&this.shadowVisible===null&&Al(a),this.Ma!==null&&(a.yc(),zl(this,a,le,te)),oe&&(this.Ma!==null||this.areaBackground!==null||ks(this,re))?(Zu(this,!0),this.shadowVisible===null&&Al(a)):Zu(this,!1),this.hh(a,y),oe&&this.l&512&&Xs(a),ue&&oe&&Al(a),we&&(a.restore(),a.Vc(this instanceof hi)),z.ws()||(y=1/(z.m11*z.m22-z.m12*z.m21),a.transform(z.m22*y,-z.m12*y,-z.m21*y,z.m11*y,y*(z.m21*z.dy-z.m22*z.dx),y*(z.m12*z.dx-z.m11*z.dy)))}}x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E)}}};function ks(a,y){return y===null?!1:(zh(y)&&(y=y.panel),(y.l&512)!==0||(y.type===hi.Auto||y.type===hi.Spot)&&y.Pb()!==a)}Le.Dv=function(){};function mu(a,y,x,b){Za(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof Oo&&a.areaBackground.type===Qu?(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 zl(a,y,x,b){var E=a.kq(),z=x.x,te=x.y,re=x.width+E,oe=x.height+E;Za(a,y,a.Ma,!0,!1,x,b),a.Ma instanceof Oo&&a.Ma.type===Qu?(y.beginPath(),y.rect(z-E/2,te-E/2,re,oe),y.ng(a.Ma)):y.fillRect(z-E/2,te-E/2,re,oe)}function fl(a,y,x){for(var b=y.O.s,E=b.length,z=-1,te=0;te<E;te++)if(b[te]===a){z=te;break}if(a=z,a!==-1)if(a===0)y.svg.gd?y.svg.gd.after(x):y.svg.Ma?y.svg.Ma.after(x):y.type===hi.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 vu(a,y,x){if(!(y instanceof Uo))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&&fl(a,b,a.svg),!0);if(a.Dd()&&a.isShadowed){var z=a.shadowOffset;y.Ev(z.x*x.scale*a.scale*x.Mb,z.y*x.scale*a.scale*x.Mb,a.shadowBlur),Xs(y),y.shadowColor=a.shadowColor}a instanceof ua&&(y.font=a.font),y.yd=null;var te=a.transform;z=a instanceof hi;var re=a instanceof hi?zh(a):!1;a.l&4096&&Is(a);var oe=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,E&&(y.o=!0,z&&re?(Ju(y,1,0,0,1,0,0),a.svg=y.ad):z?(Ju(y,te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),a.svg=y.ad):Ju(y,1,0,0,1,0,0)),E=a.naturalBounds,a.areaBackground!==null){var le=te.copy().Vj();y.rb.ha=[le.m11,le.m12,le.m21,le.m22,le.dx,le.dy],mu(a,y,E,oe),y.rb.ha=[1,0,0,1,0,0],y.yd.gd=y.ad,y.yd.prepend(y.ad)}return z||(y.rb.ha=[te.m11,te.m12,te.m21,te.m22,te.dx,te.dy]),a.background!==null&&(z?(re&&(y.rb.ha=[te.m11,te.m12,te.m21,te.m22,te.dx,te.dy]),zl(a,y,E,oe),re&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[te.m11,te.m12,te.m21,te.m22,te.dx,te.dy],zl(a,y,E,oe)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),te=y.yd,E=a.part,re=!1,E&&x.Gf("drawShadows")&&(re=E.isShadowed),y.clipInsteadOfFill&&(re=!1),a.Dd()&&re&&Xs(y),re&&a.shadowVisible===!0?Xs(y):re&&a.shadowVisible===!1&&Al(y),E=a.panel,re&&ks(a,E)&&a.shadowVisible===null&&Al(y),y.Il&&(le=x.computePixelRatio(),le="drop-shadow("+y.shadowOffsetX/le+"px "+y.shadowOffsetY/le+"px "+y.shadowBlur/le/2+"px "+y.shadowColor+")",a.background!==null&&te.Ma.setAttributeNS(null,"filter",le),a.areaBackground!==null&&te.gd.setAttributeNS(null,"filter",le)),re&&(a.Ma!==null||a.areaBackground!==null||ks(a,E))?(Zu(a,!0),a.shadowVisible===null&&Al(y)):Zu(a,!1),E=re,a.hh(y,x),z&&y.nh.pop(),y.o&&y.nh.pop(),te=y.Gv.hs,re=z?a.svg:y.yd,le=a.svg,!z&&le!==null&&re!==le&&le.parentNode===a.panel.svg?(a.svg.replaceWith(re),a.svg=re,re!==null&&a.$o(y,b,oe,re),Nl(y,le),!0):(a.svg=re,te!==null&&re===null&&(Wu(y),y.nh.pop()),re===null||(a.$o(y,b,oe,re),y.Il&&(x=x.computePixelRatio(),a.Dv(re,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),E&&a.l&512&&Xs(y),a.Dd()&&Al(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&re.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&re.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(re):y.Nj.prepend(re),y.ti=re):b!==null&&fl(a,b,re),te!==null&&te(a,re)),!0)}Le.$o=function(a,y,x,b){var E=(this.l&256)!==0;if(a.clipInsteadOfFill&&(E=!1),E){var z=y.se()?y.naturalBounds:y.actualBounds;y=Math.max(x.x,z.x),E=Math.max(x.y,z.y);var te=Math.min(x.right,z.right)-y;x=Math.min(x.bottom,z.bottom)-E,z=this.tb,z!==null&&(y=z.x,E=z.y,te=z.width,x=z.height),z=b.getAttribute("clip-path");var re=null;z!==null&&(re=a.svg.getElementById(z.split("#")[1].slice(0,-1))),re===null?(z="CLIP"+mo++,re=a.Ud("clipPath",{id:z}),y=a.Ud("rect",{x:y,y:E,width:te,height:x}),this instanceof hi&&(E=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")),re.appendChild(y),a.svg.appendChild(re),b.setAttributeNS(null,"clip-path","url(#"+z+")")):(a=re.firstElementChild,a.setAttribute("x",y.toString()),a.setAttribute("y",E.toString()),a.setAttribute("width",te.toString()),a.setAttribute("height",x.toString()))}else b.removeAttributeNS(null,"clip-path"),Nl(a,b)};function Nl(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function gl(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=Ri(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()}}Le.hh=function(){},Le.lv=function(){this.Uc=!0},Le.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 hi?zh(this):!1;if(!(this instanceof hi&&E))if(this instanceof ru){var z=this.bt;a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy],z!==null&&Ka(a,z[0],z[1],z[2],z[3],z[4],z[5],z[6],z[7]),x?y.lastElementChild.setAttributeNS(null,"transform",pl(a)):y.setAttributeNS(null,"transform",pl(a))}else if(!x||this instanceof hi)y.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");else if(this instanceof io){z=y.getElementsByTagName("path");for(var te=0;te<z.length;te++)z[te].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 z=this.Dd()?this.opacity*a.globalAlpha:this.opacity,z===1?y.removeAttribute("opacity"):y.setAttributeNS(null,"opacity",z.toString()),a.rb.ha=[1,0,0,1,0,0],(this.areaBackground!==null||y.gd!==void 0)&&(z=y.gd,this.areaBackground===null?(y.gd.remove(),y.gd=void 0):(te=b.copy().Vj(),a.rb.ha=[te.m11,te.m12,te.m21,te.m22,te.dx,te.dy],mu(this,a,this.naturalBounds,this.actualBounds),a.rb.ha=[1,0,0,1,0,0],y.gd?(te=y.gd.getAttribute("filter"),te!==null&&a.ad.setAttribute("filter",te),y.gd.replaceWith(a.ad)):y.prepend(a.ad),y.gd=a.ad),z&&fd(a,z)),(this.background!==null||y.Ma!==void 0)&&(z=y.Ma,this.background===null?(fd(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((E||x&&!(this instanceof hi))&&(a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy]),zl(this,a,this.naturalBounds,this.actualBounds),y.Ma?(fd(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),z&&fd(a,z)),this.$o(a,this.panel,this.actualBounds,y),!0},Le.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 Za(a,y,x,b,E,z,te){if(x!==null){var re=1,oe=1;if(typeof x=="string")b?y.fillStyle=x:y.strokeStyle=x;else if(x.type===jh)b?y.fillStyle=x.color:y.strokeStyle=x.color;else{var le=a.kq();if(re=z.width,oe=z.height,E?(re=te.width,oe=te.height):b||(re+=le,oe+=le),(z=y instanceof Gc)&&x.xe&&(x.type===lp||x.yk===re&&x.ft===oe))var ue=x.xe;else{var me=0,we=0,Me=0,Te=0,je=0,ct=0;if(ct=je=0,E?(je=te.x,ct=te.y):b||(je-=le/2,ct-=le/2),me=x.start.x*re+x.start.offsetX,we=x.start.y*oe+x.start.offsetY,Me=x.end.x*re+x.end.offsetX,Te=x.end.y*oe+x.end.offsetY,me+=je,Me+=je,we+=ct,Te+=ct,x.type===gh)ue=y.createLinearGradient(me,we,Me,Te);else if(x.type===Qu)ct=isNaN(x.endRadius)?Math.max(re,oe)/2:x.endRadius,isNaN(x.startRadius)?(je=0,ct=Math.max(re,oe)/2):je=x.startRadius,ue=y.createRadialGradient(me,we,je,Me,Te,ct);else if(x.type===lp)try{ue=y.createPattern(x.pattern,"repeat")}catch(bt){ue=null}if(x.type!==lp&&(E=x.colorStops,E!==null))for(E=E.iterator;E.next();)ue.addColorStop(E.key,E.value);if(z&&(x.xe=ue,ue!==null&&(x.yk=re,x.ft=oe),ue===null&&x.type===lp&&x.yk!==-1)){x.yk=-1;var nt=a.diagram;nt!==null&&x.yk===-1&&Dn(function(){nt.redraw()},600)}}b?y.fillStyle=ue:y.strokeStyle=ue}}}Le.rg=function(a){if(a instanceof hi)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},Le.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},Le.If=function(){for(var a=this instanceof hi?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function Is(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){Ie(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)}Ie(a,!1),$e(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,$e(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,$e(a,!1)))}Le.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=tt.alloc();z.yi(y,x,b,E,wo),a.rotate(this.Kb,z.x,z.y),tt.free(z)}},Le.v=function(a){if(!mt(this)){a===void 0&&(a=!1),gt(this,!0),Kt(this,!0);var y=this.panel;y===null||a||y.v()}},Le.Uj=function(){mt(this)||(gt(this,!0),Kt(this,!0))};function bl(a){if(!Bt(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof Di&&a.Bd(),y.$b())),Kt(a,!0)}}Le.Uk=function(){!(this.l&2048)&&(Ie(this,!0),$e(this,!0))},Le.Wu=function(){$e(this,!0)},Le.N=function(){var a=this.part;a!==null&&a.N()};function Fl(a,y){var x=a.stretch,b=a.panel;return b!==null&&b.type===hi.Table?cc(a,b.Fb(a.row),b.Eb(a.column),y):b!==null&&b.type===hi.Auto&&b.Pb()===a?Os(a,ci,y):x===Vr?b!==null?b.type===hi.Spot&&b.Pb()===a?Os(a,ci,y):(x=b.defaultStretch,x===Vr?Os(a,ai,y):Os(a,x,y)):Os(a,ai,y):Os(a,x,y)}function cc(a,y,x,b){var E=a.stretch;if(E!==Vr)return Os(a,E,b);var z=E=null;switch(y.stretch){case Pr:z=!0;break;case ci:z=!0}switch(x.stretch){case lr:E=!0;break;case ci:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===lr||y===ci),z===null&&(z=y===Pr||y===ci),E===!0&&z===!0?Os(a,ci,b):E===!0?Os(a,lr,b):z===!0?Os(a,Pr,b):Os(a,ai,b)}function Os(a,y,x){if(x)return y;if(y===ai||(x=a.desiredSize,x.w()))return ai;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===lr)return ai;if(y===ci)return Pr}else{if(y===Pr)return ai;if(y===ci)return lr}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===Pr)return ai;if(y===ci)return lr}else{if(y===lr)return ai;if(y===ci)return Pr}return y}function Zu(a,y){a.l=y?a.l|512:a.l&-513}function xe(a){return(a.l&1024)!==0}function Ce(a,y){a.l=y?a.l|1024:a.l&-1025}function Ie(a,y){a.l=y?a.l|2048:a.l&-2049}function $e(a,y){a.l=y?a.l|4096:a.l&-4097}function mt(a){return(a.l&8192)!==0}function gt(a,y){a.l=y?a.l|8192:a.l&-8193}function Bt(a){return(a.l&16384)!==0}function Kt(a,y){a.l=y?a.l|16384:a.l&-16385}Le.Gj=function(){this.svg=null},Le.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},Le.Av=function(){},Le.zv=function(a){return this.pa=a,bl(this),!0},Le.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},Le.kq=function(){return 0};function Mn(a){var y=a.part;if(y instanceof Di&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||$S(y,a)}}function Xn(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof hi?a instanceof Di?a.Bd():a.qm(a,function(x){Mn(x)}):Mn(a))}Le.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new fs(a,y,x,b):E=a,E.xd=this,a=this.ih(),a!==null&&fS(a)&&St("Cannot add a Binding to a template that has already been copied: "+E),this.localBindings===null&&(this.localBindings=new kn),this.localBindings.add(E),this},Le.set=function(a){return Object.assign(this,a),this},Le.Du=function(a){return In(this,a),this},Le.apply=function(a){return a(this),this},Le.nm=function(a){return Au(this,a),this},Le.pz=function(){return this.ih()},Le.ih=function(){for(var a=this instanceof hi?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},Le.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new Ii),this.animationTriggers.add(a.propertyName,a),this};function Zn(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 z=ki.I(a);typeof z=="function"?(x=At(arguments),b=z(x),en(b)||St('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=st.go[a]}if(b===null&&(E!=null&&E.constructor||St("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 hn&&1<x.length){z=b;var te=x[1];(typeof te=="string"||te instanceof HTMLDivElement)&&(Dh(z,te),E++)}for(;E<x.length;E++)z=x[E],z===void 0?St("Undefined value at argument "+E+" for object being constructed by GraphObject.make: "+b):In(b,z);return b}function In(a,y){if(typeof y=="string")if(a instanceof ua)a.text=y;else if(a instanceof io)a.figure=y;else if(a instanceof ru)a.source=y;else if(a instanceof hi)y=Mc.I(y),y!==null&&(a.type=y);else if(a instanceof Oo){var x=oi(Oo,y);x!==null?a.type=x:St("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof xi?(y=oi(xi,y),y!==null&&(a.type=y)):a instanceof To&&(y=oi(To,y),y!==null&&(a.type=y));else if(y instanceof Yt)a instanceof hi||St("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof Cs){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 Cs?Qm(b,y):St("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof ln)typeof a.qb=="function"&&a.qb(y);else if(y instanceof Es)a.type=y;else if(y instanceof fs)a instanceof Yt||a instanceof Cs?a.bind(y):St("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof ql)a instanceof Yt?a.Jv(y):St("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof ys)a instanceof xi&&a.type===xi.o?a.figures.add(y):St("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof To)a instanceof ys?a.segments.add(y):St("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof Ma)a instanceof hn||a instanceof Yr?a.layout=y:St("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++)In(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof Oo){x=new Gi;for(var E in y)b=parseFloat(E),isNaN(b)?x[E]=y[E]:a.addColorStop(b,y[E]);Au(a,x)}else if(a instanceof Cs){y.row!==void 0?(E=y.row,(E==null||E===1/0||isNaN(E)||0>E)&&St("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)&&St("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new Gi;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);Au(a,E)}else Au(a,y);else St('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function Bn(a,y){ki.add(a,y)}function ri(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}Je.Object.defineProperties(Yt.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new Ar),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 Ar),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 Ar),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(so(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&&(so(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:Zl},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new Hr),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===Zl&&(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 Hr),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 Hr),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:Qr},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new Hr),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:Vr},set:function(a){var y=this.stretch;y!==a&&(so(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&&(so(this),this.A.xa=a,this.part!==null&&(this.part.Rh=null),this.g("name",y,a))}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&qn(a,"0 <= value <= 1",Yt,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(qf(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(qf(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(),Xn(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&&ff(a,"GraphObject.areaBackground"),a instanceof Oo&&a.freeze(),so(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&&ff(a,"GraphObject.background"),a instanceof Oo&&a.freeze(),this.Ma=a,this.N(),this.g("background",y,a))}},part:{get:function(){if(this.Dd())return this;if(this.Ng!==null)return this.Ng;var a;for(a=this.panel;a;){if(a instanceof pr)return this.Ng=a;a=a.panel}return null}},svg:{get:function(){return this.V},set:function(a){this.V=a}},panel:{get:function(){return this.Me}},layer:{get:function(){var a=this.part;return a!==null?a.layer:null}},diagram:{get:function(){var a=this.part;return a!==null?a.diagram:null}},position:{get:function(){return this.pa},set:function(a){var y=a.x,x=a.y,b=this.pa,E=b.x;b=b.y,(E===y||isNaN(E)&&isNaN(y))&&(b===x||isNaN(b)&&isNaN(x))?this.Av():(a=a.copy(),this.zv(a,E,b)&&this.g("position",new tt(E,b),a))}},actualBounds:{get:function(){return this.Ib}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&(0>=a&&St("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,Xn(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,z=b.height;(E===y||isNaN(E)&&isNaN(y))&&(z===x||isNaN(z)&&isNaN(x))||(this.jd=a=a.J(),this.v(),this instanceof io&&this.qc(),this.g("desiredSize",b,a),xe(this)&&(a=this.part,a!==null&&(ha(this,a,"width"),ha(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 fi(a,this.jd.height).freeze(),this.v(),this instanceof io&&this.qc(),this.g("desiredSize",y,a),xe(this)&&(a=this.part,a!==null&&ha(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 fi(this.jd.width,a).freeze(),this.v(),this instanceof io&&this.qc(),this.g("desiredSize",y,a),xe(this)&&(a=this.part,a!==null&&ha(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:Tr},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(),so(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:_o},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(),so(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 Oi(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&&Is(this),this.Ab}},oe:{get:function(){return this.l&4096&&Is(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(so(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:ai},set:function(a){this.reshapingBehavior!==a&&(so(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()&&St("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),bl(this),this.g("alignment",y,a))}},column:{get:function(){return this.Ag},set:function(a){a=Math.round(a);var y=this.Ag;y!==a&&(0>a&&qn(a,">= 0",Yt,"column"),this.Ag=a,this.v(),this.g("column",y,a),this.svg!==null&&this.svg.remove())}},columnSpan:{get:function(){return this.A!==null?this.A.ob:1},set:function(a){a=Math.round(a);var y=this.columnSpan;y!==a&&(1>a&&qn(a,">= 1",Yt,"columnSpan"),so(this),this.A.ob=a,this.v(),this.g("columnSpan",y,a))}},row:{get:function(){return this.io},set:function(a){a=Math.round(a);var y=this.io;y!==a&&(0>a&&qn(a,">= 0",Yt,"row"),this.io=a,this.v(),this.g("row",y,a),this.svg!==null&&this.svg.remove())}},rowSpan:{get:function(){return this.A!==null?this.A.Bi:1},set:function(a){a=Math.round(a);var y=this.rowSpan;y!==a&&(1>a&&qn(a,">= 1",Yt,"rowSpan"),so(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&&(so(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 Di||St("Cannot set portID on a Link: "+a),y!==null&&x!==null&&Qv(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,US(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:La},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Mn(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&qn(a,">= 0",Yt,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Mn(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),Mn(this))}},toLinkable:{get:function(){return this.ba!==null?this.ba.Tr:null},set:function(a){var y=this.toLinkable;y!==a&&(this.Xc(),this.ba.Tr=a,this.g("toLinkable",y,a))}},toMaxLinks:{get:function(){return this.ba!==null?this.ba.Ur:1/0},set:function(a){var y=this.toMaxLinks;y!==a&&(0>a&&qn(a,">= 0",Yt,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:La},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Mn(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&qn(a,">= 0",Yt,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Mn(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),Mn(this))}},fromLinkable:{get:function(){return this.ba!==null?this.ba.hq:null},set:function(a){var y=this.fromLinkable;y!==a&&(this.Xc(),this.ba.hq=a,this.g("fromLinkable",y,a))}},fromMaxLinks:{get:function(){return this.ba!==null?this.ba.iq:1/0},set:function(a){var y=this.fromMaxLinks;y!==a&&(0>a&&qn(a,">= 0",Yt,"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&&(so(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&&(so(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&&(so(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&&(so(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&&(so(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&&(so(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&&(so(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&&(so(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&&(so(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&&(so(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&&(so(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&&(so(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&&(so(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&&(so(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&&(so(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&&(so(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&&(so(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&&(so(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),Yt.prototype.trigger=Yt.prototype.Jv,Yt.prototype.findBindingPanel=Yt.prototype.ih,Yt.prototype.findTemplateBinder=Yt.prototype.pz,Yt.prototype.setProperties=Yt.prototype.nm,Yt.prototype.apply=Yt.prototype.apply,Yt.prototype.attach=Yt.prototype.Du,Yt.prototype.set=Yt.prototype.set,Yt.prototype.isEnabledObject=Yt.prototype.If,Yt.prototype.isVisibleObject=Yt.prototype.Ed,Yt.prototype.isContainedBy=Yt.prototype.rg,Yt.prototype.getNearestIntersectionPoint=Yt.prototype.rs,Yt.prototype.getLocalPoint=Yt.prototype.qs,Yt.prototype.getDocumentScale=Yt.prototype.Df,Yt.prototype.getDocumentAngle=Yt.prototype.li,Yt.prototype.getDocumentBounds=Yt.prototype.mi,Yt.prototype.getDocumentPoint=Yt.prototype.ga,Yt.prototype.intersectsRect=Yt.prototype.Yc,Yt.prototype.containedInRect=Yt.prototype.fh,Yt.prototype.containsRect=Yt.prototype.Re,Yt.prototype.containsPoint=Yt.prototype.ca,Yt.prototype.raiseChanged=Yt.prototype.g,Yt.prototype.raiseChangedEvent=Yt.prototype.cb,Yt.prototype.addCopyProperty=Yt.prototype.Vw;var ki=null;Yt.className="GraphObject",ki=new Ii,Bn("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=Zn(hi,hi.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof hi){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"},Zn(io,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Vi(0,0,2.76142374915397,2.761423749153969),spot2:new Vi(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));return y.mouseEnter=function(x,b){if(b.If()&&b instanceof hi&&(x=b.fb("ButtonBorder"),x instanceof io)){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 hi&&(x=b.fb("ButtonBorder"),x instanceof io&&(x.fill=b._buttonFillNormal,x.stroke=b._buttonStrokeNormal))},y.actionDown=function(x,b){if(b.If()&&b instanceof hi&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof io){x=x.diagram;var z=x.skipsUndoManager;x.skipsUndoManager=!0;var te=b._buttonFillPressed;b._buttonFillOver=E.fill,E.fill=te,te=b._buttonStrokePressed,b._buttonStrokeOver=E.stroke,E.stroke=te,x.skipsUndoManager=z}}},y.actionUp=function(x,b){if(b.If()&&b instanceof hi&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof io){var z=x.diagram,te=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),z.skipsUndoManager=te}}},y.actionCancel=function(x,b){if(b.If()&&b instanceof hi&&b._buttonFillPressed!==null){var E=b.fb("ButtonBorder");if(E instanceof io){var z=x.diagram,te=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),z.skipsUndoManager=te}}},y.actionMove=function(x,b){if(b.If()&&b instanceof hi&&b._buttonFillPressed!==null){var E=x.diagram;if(E.firstInput.button===0&&(E.currentTool.standardMouseOver(),a(x,b)&&(x=b.fb("ButtonBorder"),x instanceof io))){var z=E.skipsUndoManager;E.skipsUndoManager=!0;var te=b._buttonFillPressed;x.fill!==te&&(x.fill=te),te=b._buttonStrokePressed,x.stroke!==te&&(x.stroke=te),E.skipsUndoManager=z}}},y}),Bn("TreeExpanderButton",function(){var a=Zn("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Zn(io,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ho},new fs("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new fs("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof jo&&(x=x.adornedPart),x instanceof Di){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}),Bn("SubGraphExpanderButton",function(){var a=Zn("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Zn(io,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ho},new fs("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 jo&&(x=x.adornedPart),x instanceof Yr){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}),Bn("ToolTip",function(){return Zn(jo,hi.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new tt(0,3),shadowBlur:5},Zn(io,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new Vi(0,0,4,6),spot2:new Vi(1,1,-4,-4)}))}),Bn("ContextMenu",function(){return Zn(jo,hi.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new tt(0,3),shadowBlur:5},new fs("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),Bn("ContextMenuButton",function(){var a=Zn("Button");a.stretch=lr;var y=a.fb("ButtonBorder");return y instanceof io&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new Vi(0,0,2,3),y.spot2=new Vi(1,1,-2,-2)),a}),Bn("PanelExpanderButton",function(a){var y=ri(a,"COLLAPSIBLE"),x=Zn("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},Zn(io,{name:"ButtonIcon",strokeWidth:2},new fs("geometryString","visible",function(b){return b?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof io&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(b,E){var z=E.diagram;if(z!==null&&!z.isReadOnly){var te=E.ih();te===null&&(te=E.part),te!==null&&(E=te.fb(y),E!==null&&(b.handled=!0,z.Ea("Collapse/Expand Panel"),E.visible=!E.visible,z.eb("Collapse/Expand Panel")))}},x}),Bn("CheckBoxButton",function(a){var y=ri(a);return a=Zn("Button",{desiredSize:new fi(14,14)},Zn(io,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:ci,geometryStretch:tr,visible:!1},y!==""?new fs("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof hi){var E=x.diagram;if(!(E===null||E.isReadOnly||y!==""&&E.model.isReadOnly)){x.handled=!0;var z=b.fb("ButtonIcon");E.Ea("checkbox"),z.visible=!z.visible,typeof b._doClick=="function"&&b._doClick(x,b),E.eb("checkbox")}}},a}),Bn("CheckBox",function(a){a=ri(a),a=Zn("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new Oi(0,1,0,0)});var y=Zn(hi,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Oi(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}),Yt.None=ai=new ln(Yt,"None",0),Yt.Default=Vr=new ln(Yt,"Default",0),Yt.Vertical=Pr=new ln(Yt,"Vertical",4),Yt.Horizontal=lr=new ln(Yt,"Horizontal",5),Yt.Fill=ci=new ln(Yt,"Fill",3),Yt.Uniform=tr=new ln(Yt,"Uniform",1),Yt.UniformToFill=yo=new ln(Yt,"UniformToFill",2),Yt.FlipVertical=ao=new ln(Yt,"FlipVertical",1),Yt.FlipHorizontal=Eo=new ln(Yt,"FlipHorizontal",2),Yt.FlipBoth=Qo=new ln(Yt,"FlipBoth",3),Yt.make=Zn,Yt.getBuilders=function(){var a=new Ii,y;for(y in ki)if(y!==y.toLowerCase()){var x=ki.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},Yt.defineBuilder=Bn,Yt.build=function(a,y,x){for(var b=[],E=2;E<arguments.length;++E)b[E-2]=arguments[E];if(E=ki.I(a),typeof E=="function"&&(b=E([a].concat(b)),b instanceof Yt))return y&&b.set(y),b;St('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},Yt.takeBuilderArgument=ri;function Ar(){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=Tr,this.o=_o,this.hg=Vr,this.ob=this.Bi=1,this.Pf=ai,this.Pc=this.Ci=this.gd=null,this.Oc="category"}Ar.prototype.copy=function(){var a=new Ar;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 Hr(){this.u=-1/0,this.o=0,this.F=Qr,this.rr=Zl,this.j=this.V="None"}Hr.prototype.copy=function(){var a=new Hr;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},Hr.className="LinkElementSettings";function to(){this.yj=this.Xi=Vo,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}to.prototype.copy=function(){var a=new to;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},to.className="LinkSettings";function ho(){this.ha=[1,0,0,1,0,0]}ho.prototype.copy=function(){var a=new ho;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},ho.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},ho.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},ho.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,z=this.ha[0]*-b+this.ha[2]*a,te=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]=z,this.ha[3]=te,this.translate(-y,-x)}},ho.className="STransform";function Lo(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}Lo.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},Lo.className="SGradient";function bo(a,y,x){this.ownerDocument=a=y===void 0?st.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 Uo(this,x)}bo.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},bo.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),en(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},bo.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},bo.prototype.focus=function(){this.Oa.focus()},bo.prototype.mx=function(){this.ownerDocument=null},Je.Object.defineProperties(bo.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}}}),bo.className="SVGSurface";function Uo(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 ho,this.j=Wu(this),this.Nj=Wu(this,"gojs-diagram"),this.Hl=this.ti=null;var x=mo++,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 va(a,y,x,b,E,z,te){a.Nj===void 0?Ju(a,y,x,b,E,z,te):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+b+", "+E+", "+z+", "+te+")")}Le=Uo.prototype,Le.arc=function(a,y,x,b,E,z,te,re){var oe=2*Math.PI,le=oe-1e-6,ue=x*Math.cos(b),me=x*Math.sin(b),we=a+ue,Me=y+me,Te=z?0:1;b=z?b-E:E-b,(1e-6<Math.abs(te-we)||1e-6<Math.abs(re-Me))&&this.path.push(["L",we,+Me]),0>b&&(b=b%oe+oe),b>le?(this.path.push(["A",x,x,0,1,Te,a-ue,y-me]),this.path.push(["A",x,x,0,1,Te,we,Me])):1e-6<b&&this.path.push(["A",x,x,0,+(b>=Math.PI),Te,a+x*Math.cos(E),y+x*Math.sin(E)])},Le.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},Le.Se=function(a){this.addPath(this.path,this.rb,a||0)},Le.bezierCurveTo=function(a,y,x,b,E,z){this.path.push(["C",a,y,x,b,E,z])},Le.clearRect=function(){},Le.clip=function(){this.Yl.clipPath=!0},Le.closePath=function(){this.path.push(["z"])},Le.createLinearGradient=function(a,y,x,b){var E=new Lo("linear");return E.x1=a,E.y1=y,E.x2=x,E.y2=b,E},Le.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"+mo++,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(dh,E)),this.svg.appendChild(a),x[y]=b,"url(#"+b+")"},Le.createRadialGradient=function(a,y,x,b,E,z){var te=new Lo("radial");return te.x1=a,te.y1=y,te.r1=x,te.x2=b,te.y2=E,te.r2=z,te};function Ka(a,y,x,b,E,z,te,re,oe){b=re/b,E=oe/E,z===0&&te===0||a.rb.translate(z,te),b===1&&E===1||a.rb.scale(b,E),y===0&&x===0||a.rb.translate(-y,-x)}Le.drawImage=function(a,y,x,b,E,z,te,re,oe){var le="";a instanceof HTMLCanvasElement&&(le=a.toDataURL()),a instanceof HTMLImageElement&&(le=a.getAttribute("src"));var ue=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,b===void 0&&(z=y,te=x,re=b=ue,oe=E=a),b=b||0,E=E||0,re=re||0,oe=oe||0,Ka(this,y,x,b,E,z||0,te||0,re,oe),z={x:0,y:0,width:ue||b,height:a||E,href:le},Jt.$(b,re)&&Jt.$(E,oe)?le.toLowerCase().indexOf(".svg")===-1&&le.toLowerCase().indexOf("data:image/svg")===-1&&(z.preserveAspectRatio="xMidYMid slice"):z.preserveAspectRatio="none",(y!==0||x!==0||b!==ue||E!==a)&&(b+=y,E+=x,z["clip-path"]="path('M "+y+","+x+" L "+b+" "+x+" L "+b+" "+E+" L "+y+" "+E+" z')"),Wa(this,dh,z,this.rb),this.addElement(dh,z)},Le.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),ol(this,this.Yl)},Le.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},Le.fillRect=function(a,y,x,b){a=[a,y,x,b],a={x:a[0],y:a[1],width:a[2],height:a[3]},Wa(this,"fill",a,this.rb),this.addElement("rect",a)},Le.ox=function(a,y,x,b){a={x:a,y,width:x,height:b},Wa(this,"fill",a,this.rb),ol(this,a),this.svg.prepend(this.Ud("rect",a))},Le.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},Wa(this,"fill",y,this.rb),this.addElement("text",y,a[0])},Le.lineTo=function(a,y){this.path.push(["L",a,y])},Le.moveTo=function(a,y){this.path.push(["M",a,y])},Le.quadraticCurveTo=function(a,y,x,b){this.path.push(["Q",a,y,x,b])},Le.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"])},Le.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},Le.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())},Le.setTransform=function(a,y,x,b,E,z){a===1&&y===0&&x===0&&b===1&&E===0&&z===0||Ju(this,a,y,x,b,E,z)};function pl(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}Le.scale=function(a,y){this.rb.scale(a,y)},Le.translate=function(a,y){this.rb.translate(a,y)},Le.transform=function(){},Le.yc=function(){},Le.stroke=function(){yu(this,this.Yl)},Le.jk=function(){this.clipInsteadOfFill||this.stroke()},Le.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},Le.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 Wa(a,y,x,b){y==="fill"?ol(a,x):y==="stroke"&&yu(a,x),b!==null&&(a=b.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function ol(a,y){a.fillStyle instanceof Lo?y.fill=Wc(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 nu(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof Lo?y.setAttributeNS(null,"fill",Wc(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 yu(a,y){if(a.strokeStyle instanceof Lo)y.stroke=Wc(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 Wc(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"+mo++,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 z=[],te=0;te<y;te++){var re=E[te],oe=re.color;re={offset:re.offset,"stop-color":oe},/^rgba\(/.test(oe)&&(oe=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(oe),re["stop-color"]="rgb("+oe[1]+","+oe[2]+","+oe[3]+")",re["stop-opacity"]=oe[4]),z.push(re)}for(z.sort(function(le,ue){return le.offset>ue.offset?1:-1}),E=0;E<y;E++)x.appendChild(a.Ud("stop",z[E]));return a.svg.appendChild(x),"url(#"+b+")"}Le.addPath=function(a,y,x){for(var b=[],E=0;E<a.length;E++){var z=At(a[E]),te=[z.shift()];if(te[0]==="A")te.push(z.shift()+","+z.shift(),z.shift(),z.shift()+","+z.shift(),z.shift()+","+z.shift());else for(;z.length;)te.push(z.shift()+","+z.shift());b.push(te.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,Wa(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var re in a)re!=="transform"&&y.setAttributeNS(null,re,a[re]);else{re=y.getElementsByTagName("path");for(var oe in a)oe!=="transform"&&re[x].setAttributeNS(null,oe,a[oe])}else this.addElement("path",a)};function Ju(a,y,x,b,E,z,te){var re=new ho;re.ha=[y,x,b,E,z,te],y={},Wa(a,"g",y,re),re=a.addElement("g",y),a.nh.push(re)}function Wu(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}Le.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function Al(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function Xs(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}Le.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},Le.fs=function(){this.Ct=!1},Le.Vc=function(){},Le.Wx=function(){},Uo.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},Uo.prototype.getImageData=function(){return null},Uo.prototype.measureText=function(){return null};function fd(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()))}Uo.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},Uo.className="SVGContext",hn.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new bo(this,st.document));var y=new bo(this,st.document,!0);a===void 0&&(a=new Gi);var x=this;return lh(this,function(b,E){return b=tp(x,b,"SVG",y),b=b!==null?b.svg:null,typeof E=="function"?(E(b),null):b},a)},hn.prototype.makeSvg=hn.prototype.Cs,hn.prototype.av=function(a){return this.Cs(a)},hn.prototype.makeSVG=hn.prototype.av;function al(a,y,x,b){this.ownerDocument=y=y===void 0?st.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new Gc(y,x,b),y.H=a}al.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},al.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},al.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},al.prototype.focus=function(){this.Oa.focus()},al.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},Je.Object.defineProperties(al.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}}}),al.className="CanvasSurface";function Gc(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&St("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 ro,this.isTemporary=!!x}Le=Gc.prototype,Le.Wx=function(a){this.Z.imageSmoothingEnabled=a},Le.arc=function(a,y,x,b,E,z){this.Z.arc(a,y,x,b,E,z)},Le.beginPath=function(){this.Z.beginPath()},Le.Se=function(){},Le.bezierCurveTo=function(a,y,x,b,E,z){this.Z.bezierCurveTo(a,y,x,b,E,z)},Le.clearRect=function(a,y,x,b){this.yc(),this.Z.clearRect(a,y,x,b)},Le.clip=function(){this.Z.clip()},Le.closePath=function(){this.Z.closePath()},Le.createLinearGradient=function(a,y,x,b){return this.Z.createLinearGradient(a,y,x,b)},Le.createPattern=function(a,y){return this.Z.createPattern(a,y)},Le.createRadialGradient=function(a,y,x,b,E,z){return this.Z.createRadialGradient(a,y,x,b,E,z)},Le.drawImage=function(a,y,x,b,E,z,te,re,oe){b===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,b,E,z,te,re,oe)},Le.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},Le.fillRect=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},Le.ox=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},Le.fillText=function(a,y,x){this.Z.fillText(a,y,x)},Le.getImageData=function(a,y,x,b){return this.Z.getImageData(a,y,x,b)},Le.lineTo=function(a,y){this.Z.lineTo(a,y)},Le.measureText=function(a){return this.Z.measureText(a)},Le.moveTo=function(a,y){this.Z.moveTo(a,y)},Le.quadraticCurveTo=function(a,y,x,b){this.Z.quadraticCurveTo(a,y,x,b)},Le.rect=function(a,y,x,b){this.Z.rect(a,y,x,b)},Le.restore=function(){this.Z.restore()},Le.save=function(){this.yc(),this.Z.save()},Gc.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},Le=Gc.prototype,Le.setTransform=function(a,y,x,b,E,z){this.El.setTransform(a,y,x,b,E,z)},Le.scale=function(a,y){this.El.scale(a,y)},Le.translate=function(a,y){this.El.translate(a,y)},Le.stroke=function(){this.Z.stroke()},Le.transform=function(a,y,x,b,E,z){if(a!==1||y!==0||x!==0||b!==1||E!==0||z!==0){var te=this.El,re=te.m11*a+te.m21*y;a=te.m12*a+te.m22*y,y=te.m11*x+te.m21*b,x=te.m12*x+te.m22*b,te.dx=te.m11*E+te.m21*z+te.dx,te.dy=te.m12*E+te.m22*z+te.dy,te.m11=re,te.m12=a,te.m21=y,te.m22=x}},Le.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},Le.ng=function(a,y){if(a instanceof Oo&&a.type===Qu){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)},Le.jk=function(){this.Hm||this.stroke()},Le.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},Le.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},Le.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(hf),a.lineDashOffset=0)},Le.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},Le.Hs=function(){},Je.Object.defineProperties(Gc.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 hf=Object.freeze([]);Gc.className="CanvasSurfaceContext";function $c(){this.F=this.o=this.u=this.j=0}$c.className="ColorNumbers";function Oo(a,y){sp||(ap(),sp=!0),Or(this),this._isFrozen=!1,a===void 0?(this.na=jh,this.xk="black"):typeof a=="string"?(this.na=jh,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===gh?(this.Qd=zs,this.Lk=as):this.Lk=a===Qu?this.Qd=wo:this.Qd=La,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}Oo.prototype.copy=function(){var a=new Oo;return a.na=this.na,a.xk=this.xk,a.Qd=this.Qd.J(),a.Lk=this.Lk.J(),a.Gr=this.Gr,a.Xp=this.Xp,this.we!==null&&(a.we=this.we.copy()),a.cr=this.cr,a},Le=Oo.prototype,Le.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},Le.ka=function(){return Object.isFrozen(this)&&St("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},Le.qb=function(a){a.classType===Oo&&(this.type=a)},Le.toString=function(){var a="Brush(";if(this.type===jh)a+=this.color;else if(a=this.type===gh?a+"Linear ":this.type===Qu?a+"Radial ":this.type===lp?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+")"},Le.addColorStop=function(a,y){return this._isFrozen&&Nn(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&qn(a,"0 <= loc <= 1",Oo,"addColorStop:loc"),this.we===null&&(this.we=new Ii),this.we.add(a,y),this.na===jh&&(this.type=gh),this.xe=null,this},Le.Vz=function(a,y){if(this._isFrozen&&Nn(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?up:y,this.type===jh)Gu(this.color),this.color=fh(a,y);else if((this.type===gh||this.type===Qu)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Gu(x.value),this.addColorStop(x.key,fh(a,y));return this};function Rh(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?up:x,Gu(a),fh(y,x)}Le.Wy=function(a,y){if(this._isFrozen&&Nn(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?up:y,this.type===jh)Gu(this.color),this.color=fh(-a,y);else if((this.type===gh||this.type===Qu)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Gu(x.value),this.addColorStop(x.key,fh(-a,y));return this};function Fg(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?up:x,Gu(a),fh(-y,x)}function Kc(a,y,x){Gu(a),a=oa.j;var b=oa.u,E=oa.o,z=oa.F;return Gu(y),x===void 0&&(x=.5),"rgba("+Math.round((oa.j-a)*x+a)+", "+Math.round((oa.u-b)*x+b)+", "+Math.round((oa.o-E)*x+E)+", "+Math.round((oa.F-z)*x+z)+")"}Le.Gx=function(){if(this.type===jh)return Od(this.color);if((this.type===gh||this.type===Qu)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Qu)return Od(a.first().value);if(a.get(.5)!==null)return Od(a.get(.5));if(a.count===2)return a=a.Fa(),Od(Kc(a[0].value,a[1].value));for(var y=a.iterator,x=-1,b=-1,E=1,z=1;y.next();){var te=y.key,re=Math.abs(.5-y.key);E>z&&re<E?(x=te,E=re):z>=E&&re<z&&(b=te,z=re)}return x>b&&(z=x,x=b,b=z,z=E),E=b-x,Od(Kc(a.get(x),a.get(b),1-z/E))}return!1};function Od(a){return a?a instanceof Oo?a.Gx():(Gu(a),128>(299*oa.j+587*oa.u+114*oa.o)/1e3):!1}function fh(a,y){switch(y){case up:y=100*Xf(oa.j);var x=100*Xf(oa.u),b=100*Xf(oa.o);return Qs.j=.4124564*y+.3575761*x+.1804375*b,Qs.u=.2126729*y+.7151522*x+.072175*b,Qs.o=.0193339*y+.119192*x+.9503041*b,Qs.F=oa.F,y=Gp(Qs.j/pf[0]),x=Gp(Qs.u/pf[1]),b=Gp(Qs.o/pf[2]),dc.j=116*x-16,dc.u=500*(y-x),dc.o=200*(x-b),dc.F=Qs.F,dc.j=Math.min(100,Math.max(0,dc.j+100*a)),a=(dc.j+16)/116,y=a-dc.o/200,Qs.j=pf[0]*Ag(dc.u/500+a),Qs.u=pf[1]*(dc.j>gf*Dg?Math.pow(a,3):dc.j/gf),Qs.o=pf[2]*Ag(y),Qs.F=dc.F,a=-.969266*Qs.j+1.8760108*Qs.u+.041556*Qs.o,y=.0556434*Qs.j+-.2040259*Qs.u+1.0572252*Qs.o,oa.j=255*op((3.2404542*Qs.j+-1.5371385*Qs.u+-.4985314*Qs.o)/100),oa.u=255*op(a/100),oa.o=255*op(y/100),oa.F=Qs.F,oa.j=Math.round(oa.j),255<oa.j?oa.j=255:0>oa.j&&(oa.j=0),oa.u=Math.round(oa.u),255<oa.u?oa.u=255:0>oa.u&&(oa.u=0),oa.o=Math.round(oa.o),255<oa.o?oa.o=255:0>oa.o&&(oa.o=0),"rgba("+oa.j+", "+oa.u+", "+oa.o+", "+oa.F+")";case iS:return _f(),Su.o=Math.min(100,Math.max(0,Su.o+100*a)),"hsla("+Su.j+", "+Su.u+"%, "+Su.o+"%, "+Su.F+")";default:St("Unknown color space: "+y)}}function Gu(a){sp||(ap(),sp=!0);var y=Bg;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,oa.j=a[0],oa.u=a[1],oa.o=a[2],oa.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,oa.j=0,oa.u=0,oa.o=0,oa.F=1)}}function _f(){var a=oa.j/255,y=oa.u/255,x=oa.o/255,b=Math.max(a,y,x),E=Math.min(a,y,x),z=b-E;if(E=(b+E)/2,z===0)var te=a=0;else{switch(b){case a:te=(y-x)/z%6;break;case y:te=(x-a)/z+2;break;case x:te=(a-y)/z+4}te*=60,0>te&&(te+=360),a=z/(1-Math.abs(2*E-1))}Su.j=Math.round(te),Su.u=Math.round(100*a),Su.o=Math.round(100*E),Su.F=oa.F}function Xf(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function op(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function Gp(a){return a>Dg?Math.pow(a,1/3):(gf*a+16)/116}function Ag(a){var y=a*a*a;return y>Dg?y:(116*a-16)/gf}function ff(a,y){typeof a!="string"&&(a instanceof Oo||St("Value for "+y+" must be a color string or a Brush, not "+a))}function ap(){Bg=Ha?new al(null,void 0,{willReadFrequently:!0}).context:null}Je.Object.defineProperties(Oo.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&Nn(this,a),this.na=a,this.start.Mc()&&(a===gh?this.start=zs:a===Qu&&(this.start=wo)),this.end.Mc()&&(a===gh?this.end=as:a===Qu&&(this.end=wo)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&Nn(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&Nn(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&Nn(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&Nn(this,a),0>a&&qn(a,">= zero",Oo,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&Nn(this,a),0>a&&qn(a,">= zero",Oo,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&Nn(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&Nn(this,a),this.cr=a,this.xe=null}}}),Oo.prototype.isDark=Oo.prototype.Gx,Oo.prototype.darkenBy=Oo.prototype.Wy,Oo.prototype.lightenBy=Oo.prototype.Vz,Oo.prototype.addColorStop=Oo.prototype.addColorStop;var Dg=216/24389,gf=24389/27,pf=[95.047,100,108.883],Bg=null,oa=new $c,Su=new $c,Qs=new $c,dc=new $c,sp=!1;Oo.className="Brush";var jh;Oo.Solid=jh=new ln(Oo,"Solid",0);var gh;Oo.Linear=gh=new ln(Oo,"Linear",1);var Qu;Oo.Radial=Qu=new ln(Oo,"Radial",2);var lp;Oo.Pattern=lp=new ln(Oo,"Pattern",4);var up;Oo.Lab=up=new ln(Oo,"Lab",5);var iS;Oo.HSL=iS=new ln(Oo,"HSL",6),Oo.randomColor=function(a,y){a===void 0&&(a=128),y===void 0&&(y=Math.max(a,255));var x=Math.abs(y-a);y=Math.floor(a+Math.random()*x).toString(16);var b=Math.floor(a+Math.random()*x).toString(16);return a=Math.floor(a+Math.random()*x).toString(16),2>y.length&&(y="0"+y),2>b.length&&(b="0"+b),2>a.length&&(a="0"+a),"#"+y+b+a},Oo.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;sp||(ap(),sp=!0);var y=Bg;if(y===null)return!0;y.fillStyle="#000000";var x=y.fillStyle;return y.fillStyle=a,y.fillStyle!==x?!0:(y.fillStyle="#FFFFFF",x=y.fillStyle,y.fillStyle=a,y.fillStyle!==x)},Oo.lighten=function(a){return Rh(a)},Oo.lightenBy=Rh,Oo.darken=function(a){return Fg(a)},Oo.darkenBy=Fg,Oo.mix=Kc,Oo.isDark=Od;function Es(){this.xa="Base"}Es.prototype.measure=function(){},Es.prototype.Yz=function(a,y,x,b,E){a.measure(y,x,b,E)},Es.prototype.arrange=function(){},Es.prototype.Ly=function(a,y,x,b,E,z){a.arrange(y,x,b,E,z)},Es.prototype.iA=function(a){a.Uj()},Es.prototype.gc=function(){},Je.Object.defineProperties(Es.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return hi}}}),Es.prototype.remeasureObject=Es.prototype.iA,Es.prototype.arrangeElement=Es.prototype.Ly,Es.prototype.measureElement=Es.prototype.Yz,Es.className="PanelLayout";function jm(){this.xa="Base"}$t(jm,Es),jm.prototype.measure=function(a,y,x,b,E,z,te){var re=b.length;a=ph(a);for(var oe=0;oe<re;oe++){var le=b[oe];if(le.visible||le===a){var ue=le.margin,me=ue.right+ue.left;ue=ue.top+ue.bottom,le.measure(y,x,z,te);var we=le.measuredBounds;me=Math.max(we.width+me,0),ue=Math.max(we.height+ue,0),we=le.position.x;var Me=le.position.y;isFinite(we)||(we=0),isFinite(Me)||(Me=0),le instanceof io&&le.isGeometryPositioned&&(le=le.strokeWidth/2,we-=le,Me-=le),cr(E,we,Me,me,ue)}}},jm.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 z=y[E],te=z.measuredBounds,re=z.margin,oe=z.position.x,le=z.position.y;if(oe=isNaN(oe)?-a:oe-a,le=isNaN(le)?-x:le-x,z instanceof io&&z.isGeometryPositioned){var ue=z.strokeWidth/2;oe-=ue,le-=ue}z.visible&&z.arrange(oe+re.left,le+re.top,te.width,te.height)}};function zm(){this.xa="Base"}$t(zm,Es),zm.prototype.measure=function(a,y,x,b,E,z,te){var re=b.length;y=mn(),z=ph(a);for(var oe=0;oe<re;oe++){var le=b[oe];if(le.visible||le===z){var ue=Fl(le,!1);if(ue!==ai&&ue!==lr)y.push(le);else{le.measure(1/0,x,0,te),ue=le.margin,le=le.measuredBounds;var me=Math.max(le.height+ue.top+ue.bottom,0);E.width+=Math.max(le.width+ue.right+ue.left,0),E.height=Math.max(E.height,me)}}}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++)oe=y[a],(oe.visible||oe===z)&&(ue=oe.margin,re=ue.right+ue.left,ue=ue.top+ue.bottom,oe.measure(1/0,x,0,te),oe=oe.measuredBounds,ue=Math.max(oe.height+ue,0),E.width+=Math.max(oe.width+re,0),E.height=Math.max(E.height,ue));Wn(y)},zm.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,z=E.top,te=a.isOpposite,re=te?x.width:E.left,oe=0;oe<b;oe++){var le=z,ue=y[oe];if(ue.visible){var me=ue.measuredBounds,we=ue.margin,Me=we.top+we.bottom,Te=z+E.bottom,je=me.height,ct=Fl(ue,!1);(isNaN(ue.desiredSize.height)&&ct===ci||ct===Pr)&&(je=Math.max(x.height-Me-Te,0)),Me=je+Me+Te,Te=ue.alignment,Te.Xb()&&(Te=a.defaultAlignment),Te.sb()||(Te=wo),te&&(re-=me.width+we.left+we.right),ue.arrange(re+Te.offsetX+we.left,le+Te.offsetY+we.top+(x.height*Te.y-Me*Te.y),me.width,je),te||(re+=me.width+we.left+we.right)}}};function Hm(){this.xa="Base"}$t(Hm,Es),Hm.prototype.measure=function(a,y,x,b,E,z){var te=b.length;x=mn();for(var re=ph(a),oe=0;oe<te;oe++){var le=b[oe];if(le.visible||le===re){var ue=Fl(le,!1);if(ue!==ai&&ue!==Pr)x.push(le);else{var me=le.margin;ue=me.right+me.left,me=me.top+me.bottom,le.measure(y,1/0,z,0),le=le.measuredBounds,Ui(E,Math.max(E.width,Math.max(le.width+ue,0)),E.height+Math.max(le.height+me,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++)oe=x[a],(oe.visible||oe===re)&&(le=oe.margin,te=le.right+le.left,le=le.top+le.bottom,oe.measure(y,1/0,z,0),oe=oe.measuredBounds,le=Math.max(oe.height+le,0),E.width=Math.max(E.width,Math.max(oe.width+te,0)),E.height+=le);Wn(x)}},Hm.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,z=E.left,te=a.isOpposite,re=te?x.height:E.top,oe=0;oe<b;oe++){var le=z,ue=y[oe];if(ue.visible){var me=ue.measuredBounds,we=ue.margin,Me=we.left+we.right,Te=z+E.right,je=me.width,ct=Fl(ue,!1);(isNaN(ue.desiredSize.width)&&ct===ci||ct===lr)&&(je=Math.max(x.width-Me-Te,0)),Me=je+Me+Te,Te=ue.alignment,Te.Xb()&&(Te=a.defaultAlignment),Te.sb()||(Te=wo),te&&(re-=me.height+we.bottom+we.top),ue.arrange(le+Te.offsetX+we.left+(x.width*Te.x-Me*Te.x),re+Te.offsetY+we.top,je,me.height),te||(re+=me.height+we.bottom+we.top)}}};function Zm(){this.xa="Base"}$t(Zm,Es),Zm.prototype.measure=function(a,y,x,b,E,z,te){var re=b.length,oe=a.Pb(),le=oe.margin,ue=le.right+le.left,me=le.top+le.bottom;oe.measure(y,x,z,te);var we=oe.measuredBounds;z=we.width,te=we.height;var Me=Math.max(z+ue,0),Te=Math.max(te+me,0),je=a.isClipping,ct=Ut.allocAt(-le.left,-le.top,Me,Te),nt=Ut.allocAt(0,0,z,te);Cv(oe,nt,!0),z=nt.width,te=nt.height;for(var bt=!0,Nt=ph(a),Ot=0;Ot<re;Ot++){var Xt=b[Ot];we=y;var gn=x;if(Xt!==oe&&(Xt.visible||Xt===Nt)){le=Xt.margin;var Fi=le.left,_i=le.top;switch(Me=le.right+le.left,Te=le.top+le.bottom,le=Fl(Xt,!1),le){case ci:we=z,gn=te,_i=Fi=Te=Me=0;break;case lr:we=z,Fi=Me=0;break;case Pr:gn=te,_i=Te=0}Xt.measure(we,gn,0,0),we=Xt.measuredBounds,Me=Math.max(we.width+Me,0),Te=Math.max(we.height+Te,0),le=Xt.alignment,le.Xb()&&(le=a.defaultAlignment),le.sb()||(le=wo);var zi=Xt.alignmentFocus;if(zi.Xb()&&(zi=wo),gn=null,Xt instanceof hi&&Xt.$e!==""&&(gn=Xt.fb(Xt.$e),gn===Xt&&(gn=null)),Fi=nt.x-Fi,_i=nt.y-_i,gn!==null){for(Xt.arrange(0,0,we.width,we.height),we=gn.actualBounds,we=tt.allocAt(we.x+(zi.x*we.width-zi.offsetX),we.y+(zi.y*we.height-zi.offsetY)),gn=gn.panel;gn!==Xt;)gn.transform.Ga(we),gn=gn.panel;Fi+=le.x*z+le.offsetX-we.x,_i+=le.y*te+le.offsetY-we.y,tt.free(we)}else Fi+=le.x*z+le.offsetX-(zi.x*we.width+zi.offsetX),_i+=le.y*te+le.offsetY-(zi.y*we.height+zi.offsetY);bt?(bt=!1,E.h(Fi,_i,Me,Te)):cr(E,Fi,_i,Me,Te)}}switch(bt?E.assign(ct):je?E.Uu(nt.x,nt.y,nt.width,nt.height):cr(E,ct.x,ct.y,ct.width,ct.height),Ut.free(ct),Ut.free(nt),le=oe.stretch,le===Vr&&(le=Fl(oe,!1)),le){case ai:return;case ci:if(!isFinite(y)&&!isFinite(x))return;break;case lr:if(!isFinite(y))return;break;case Pr:if(!isFinite(x))return}for(we=oe.measuredBounds,z=we.width,te=we.height,Me=Math.max(z+ue,0),Te=Math.max(te+me,0),le=oe.margin,nt=Ut.allocAt(-le.left,-le.top,Me,Te),Cv(oe,nt,!0),z=nt.width,te=nt.height,y=0;y<re;y++)x=b[y],x===oe||!x.visible&&x!==Nt||(le=x.margin,Me=le.right+le.left,Te=le.top+le.bottom,we=x.measuredBounds,Me=Math.max(we.width+Me,0),Te=Math.max(we.height+Te,0),ue=x.alignment,ue.Xb()&&(ue=a.defaultAlignment),ue.sb()||(ue=wo),x=x.alignmentFocus,x.Xb()&&(x=wo),bt?(bt=!1,E.h(ue.x*z+ue.offsetX-(x.x*we.width+x.offsetX)-le.left,ue.y*te+ue.offsetY-(x.y*we.height+x.offsetY)-le.top,Me,Te)):cr(E,ue.x*z+ue.offsetX-(x.x*we.width+x.offsetX)-le.left,ue.y*te+ue.offsetY-(x.y*we.height+x.offsetY)-le.top,Me,Te));bt?E.assign(ct):je?E.Uu(nt.x,nt.y,nt.width,nt.height):cr(E,ct.x,ct.y,ct.width,ct.height),Ut.free(nt)},Zm.prototype.arrange=function(a,y,x){var b=y.length,E=a.Pb(),z=E.measuredBounds,te=z.width,re=z.height,oe=a.padding;z=oe.left,oe=oe.top;var le=z-x.x,ue=oe-x.y;for(E.arrange(le,ue,te,re),te=Ut.allocAt(0,0,te,re),Cv(E,te,!1),re=0;re<b;re++){var me=y[re];if(me!==E){le=me.measuredBounds;var we=le.width,Me=le.height;ue=me.alignment,ue.Xb()&&(ue=a.defaultAlignment),ue.sb()||(ue=wo);var Te=me.alignmentFocus;if(Te.Xb()&&(Te=wo),le=null,me instanceof hi&&me.$e!==""&&(le=me.fb(me.$e),le===me&&(le=null)),le!==null){var je=le.actualBounds;for(Te=tt.allocAt(je.x+(Te.x*je.width-Te.offsetX),je.y+(Te.y*je.height-Te.offsetY)),le=le.panel;le!==me;)le.transform.Ga(Te),le=le.panel;le=ue.x*te.width+ue.offsetX-Te.x,ue=ue.y*te.height+ue.offsetY-Te.y,tt.free(Te)}else le=ue.x*te.width+ue.offsetX-(Te.x*we+Te.offsetX),ue=ue.y*te.height+ue.offsetY-(Te.y*Me+Te.offsetY);le+=te.x-x.x,ue+=te.y-x.y,me.visible&&me.arrange(z+le,oe+ue,we,Me)}}Ut.free(te)};function Cv(a,y,x){var b=null;if(a instanceof hi&&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"}$t(Wm,Es),Wm.prototype.measure=function(a,y,x,b,E,z,te){var re=b.length,oe=a.Pb(),le=oe.margin,ue=y,me=x,we=le.right+le.left,Me=le.top+le.bottom;oe.measure(y,x,z,te),le=oe.measuredBounds;var Te=0,je=null;oe instanceof io&&(je=oe,Te=je.strokeWidth*je.scale);var ct=Math.max(le.width+we,0);le=Math.max(le.height+Me,0);var nt=Lv(oe),bt=nt.x*ct+nt.offsetX;nt=nt.y*le+nt.offsetY;var Nt=Nv(oe),Ot=Nt.x*ct+Nt.offsetX;for(Nt=Nt.y*le+Nt.offsetY,isFinite(y)&&(ue=Math.max(Math.abs(bt-Ot)-Te,0)),isFinite(x)&&(me=Math.max(Math.abs(nt-Nt)-Te,0)),Te=fi.alloc(),Te.h(0,0),a=ph(a),Nt=0;Nt<re;Nt++)nt=b[Nt],nt===oe||!nt.visible&&nt!==a||(le=nt.margin,ct=le.right+le.left,bt=le.top+le.bottom,nt.measure(ue,me,0,0),le=nt.measuredBounds,ct=Math.max(le.width+ct,0),le=Math.max(le.height+bt,0),Te.h(Math.max(ct,Te.width),Math.max(le,Te.height)));if(re===1)E.width=ct,E.height=le,fi.free(Te);else{switch(nt=Lv(oe),Nt=Nv(oe),re=b=0,Nt.x!==nt.x&&Nt.y!==nt.y&&(b=Te.width/Math.abs(Nt.x-nt.x),re=Te.height/Math.abs(Nt.y-nt.y)),fi.free(Te),Te=0,je!==null&&(Te=je.strokeWidth*je.scale,kv(je)===tr&&(b=re=Math.max(b,re))),b+=Math.abs(nt.offsetX)+Math.abs(Nt.offsetX)+Te,re+=Math.abs(nt.offsetY)+Math.abs(Nt.offsetY)+Te,je=oe.stretch,je===Vr&&(je=Fl(oe,!1)),je){case ai:te=z=0;break;case ci:isFinite(y)&&(b=y),isFinite(x)&&(re=x);break;case lr:isFinite(y)&&(b=y),te=0;break;case Pr:z=0,isFinite(x)&&(re=x)}oe.Uj(),oe.measure(b,re,z,te),E.width=oe.measuredBounds.width+we,E.height=oe.measuredBounds.height+Me}},Wm.prototype.arrange=function(a,y){var x=y.length,b=a.Pb(),E=b.measuredBounds,z=Ut.alloc();z.h(0,0,1,1);var te=b.margin,re=te.left;te=te.top;var oe=a.padding,le=oe.left;oe=oe.top,b.arrange(le+re,oe+te,E.width,E.height);var ue=Lv(b),me=Nv(b),we=ue.y*E.height+ue.offsetY,Me=me.x*E.width+me.offsetX;for(me=me.y*E.height+me.offsetY,z.x=ue.x*E.width+ue.offsetX,z.y=we,cr(z,Me,me,0,0),z.x+=re+le,z.y+=te+oe,E=0;E<x;E++)re=y[E],re!==b&&(le=re.measuredBounds,te=re.margin,oe=Math.max(le.width+te.right+te.left,0),ue=Math.max(le.height+te.top+te.bottom,0),we=re.alignment,we.Xb()&&(we=a.defaultAlignment),we.sb()||(we=wo),oe=z.width*we.x+we.offsetX-oe*we.x+te.left+z.x,te=z.height*we.y+we.offsetY-ue*we.y+te.top+z.y,re.visible&&(xr(z.x,z.y,z.width,z.height,oe,te,le.width,le.height)?re.arrange(oe,te,le.width,le.height):re.arrange(oe,te,le.width,le.height,new Ut(z.x,z.y,z.width,z.height))));Ut.free(z)};function Gm(){this.xa="Base",this.name="Table"}$t(Gm,Es),Gm.prototype.measure=function(a,y,x,b,E){for(var z=b.length,te=mn(),re=mn(),oe=0;oe<z;oe++){var le=b[oe],ue=le instanceof hi?le:null;if(ue!==null&&zh(ue)&&le.visible){re.push(ue);for(var me=ue.O.s,we=me.length,Me=0;Me<we;Me++){var Te=me[Me];ue.type===hi.TableRow?Te.row=le.row:ue.type===hi.TableColumn&&(Te.column=le.column),te.push(Te)}}else te.push(le)}z=te.length,z===0&&(a.Fb(0),a.Eb(0));for(var je=[],ct=0;ct<z;ct++){var nt=te[ct];nt.visible&&(gt(nt,!0),Kt(nt,!0),je[nt.row]||(je[nt.row]=[]),je[nt.row][nt.column]||(je[nt.row][nt.column]=[]),je[nt.row][nt.column].push(nt))}Wn(te);var bt=mn(),Nt=mn(),Ot=mn(),Xt={count:0},gn={count:0},Fi=y,_i=x,zi=a.rowDefs,mi=a.colDefs,ti=null;z=zi.length;for(var Ur=0;Ur<z;Ur++)ti=zi[Ur],ti!==void 0&&(ti.actual=0);z=mi.length;for(var Dr=0;Dr<z;Dr++)ti=mi[Dr],ti!==void 0&&(ti.actual=0);for(var Ko=je.length,la=0,Rs=0;Rs<Ko;Rs++)je[Rs]&&(la=Math.max(la,je[Rs].length));var Vs=Math.min(a.topIndex,Ko-1),Dl=Math.min(a.leftIndex,la-1),js=0;Ko=je.length;for(var Xh=ph(a),gs=0;gs<Ko;gs++)if(je[gs]){la=je[gs].length;var Yc=a.Fb(gs);Yc.actual=0;for(var Bl=Yc.oc=0;Bl<la;Bl++)if(je[gs][Bl]){var Yh=a.Eb(Bl);bt[Bl]===void 0&&(Yh.actual=0,Yh.oc=0,bt[Bl]=!0);for(var Vu=je[gs][Bl],pc=Vu.length,ku=0;ku<pc;ku++){var Pu=Vu[ku];if(Pu.visible||Pu===Xh){var Ff=1<Pu.rowSpan||1<Pu.columnSpan;Ff&&(gs<Vs||Bl<Dl||Nt.push(Pu));var Jc=Pu.margin,Bp=Jc.right+Jc.left,Iu=Jc.top+Jc.bottom,Tl=cc(Pu,Yc,Yh,!1),Am=Pu.desiredSize,$g=!isNaN(Am.height),md=!isNaN(Am.width)&&$g;if(Ff||Tl===ai||md||gs<Vs||Bl<Dl||(Xt[Bl]!==void 0||Tl!==ci&&Tl!==lr||(Xt[Bl]=-1,Xt.count++),gn[gs]!==void 0||Tl!==ci&&Tl!==Pr||(gn[gs]=-1,gn.count++),Ot.push(Pu)),Pu.measure(1/0,1/0,0,0),!(gs<Vs||Bl<Dl)){var wu=Pu.measuredBounds,rg=Math.max(wu.width+Bp,0),Ou=Math.max(wu.height+Iu,0);if(Pu.rowSpan===1&&(Tl===ai||Tl===lr)){ti=a.Fb(gs);var Af=ti.Wc();js=Math.max(Ou-ti.actual,0),js+Af>_i&&(js=Math.max(_i-Af,0));var hv=ti.oa===0;ti.oc=ti.oc+js,ti.actual=ti.oa+js,_i=Math.max(_i-(js+(hv?Af:0)),0)}if(Pu.columnSpan===1&&(Tl===ai||Tl===Pr)){ti=a.Eb(Bl);var Dm=ti.Wc();js=Math.max(rg-ti.actual,0),js+Dm>Fi&&(js=Math.max(Fi-Dm,0));var Yy=ti.oa===0;ti.oc=ti.oc+js,ti.actual=ti.oa+js,Fi=Math.max(Fi-(js+(Yy?Dm:0)),0)}Ff&&Pu.Uj()}}}}}Wn(bt);var Kd=0,yh=0;z=a.columnCount;for(var Kg=0;Kg<z;Kg++){var Df=mi[Kg];Df!==void 0&&(Kd+=isNaN(Df.Hc)?Df.oc:Df.Hc,Df.oc!==0&&(Kd+=Df.Wc()))}z=a.rowCount;for(var Tp=0;Tp<z;Tp++){var Bf=zi[Tp];Bf!==void 0&&(yh+=isNaN(Bf.Hc)?Bf.oc:Bf.Hc,Bf.oc!==0&&(yh+=Bf.Wc()))}Fi=Math.max(y-Kd,0);var Vd=_i=Math.max(x-yh,0),Jh=Fi;z=Ot.length;for(var Cu=0;Cu<z;Cu++){var vd=Ot[Cu],fv=a.Fb(vd.row),Sh=a.Eb(vd.column),kp=vd.measuredBounds,Qc=vd.margin,og=Qc.right+Qc.left,yd=Qc.top+Qc.bottom;Xt[vd.column]=Sh.oc===0&&Xt[vd.column]!==void 0?Math.max(kp.width+og,Xt[vd.column]):null,gn[vd.row]=fv.oc===0&&gn[vd.row]!==void 0?Math.max(kp.height+yd,gn[vd.row]):null}var Vg=0,Ip=0,Bc;for(Bc in gn)Bc!=="count"&&(Vg+=gn[Bc]);for(Bc in Xt)Bc!=="count"&&(Ip+=Xt[Bc]);for(var el=fi.alloc(),Bm=0;Bm<z;Bm++){var Vl=Ot[Bm];if(Vl.visible||Vl===Xh){var ps=a.Fb(Vl.row),Ul=a.Eb(Vl.column),xh=0;isFinite(Ul.width)?xh=Ul.width:(isFinite(Fi)&&Xt[Vl.column]!==null?Ip===0?xh=Ul.actual+Fi:xh=Xt[Vl.column]/Ip*Jh:Xt[Vl.column]!==null?xh=Fi:xh=Ul.actual||Fi,xh=Math.max(0,xh-Ul.Wc()));var Qh=0;switch(isFinite(ps.height)?Qh=ps.height:(isFinite(_i)&&gn[Vl.row]!==null?Vg===0?Qh=ps.actual+_i:Qh=gn[Vl.row]/Vg*Vd:gn[Vl.row]!==null?Qh=_i:Qh=ps.actual||_i,Qh=Math.max(0,Qh-ps.Wc())),el.h(Math.max(Ul.minimum,Math.min(xh,Ul.maximum)),Math.max(ps.minimum,Math.min(Qh,ps.maximum))),Tl=cc(Vl,ps,Ul,!1),Tl){case lr:el.height=Math.max(el.height,ps.actual+_i);break;case Pr:el.width=Math.max(el.width,Ul.actual+Fi)}var ag=Vl.margin,Jy=ag.right+ag.left,gv=ag.top+ag.bottom;Vl.Uj(),Vl.measure(el.width,el.height,Ul.minimum,ps.minimum);var Op=Vl.measuredBounds,sg=Math.max(Op.width+Jy,0),Ug=Math.max(Op.height+gv,0);isFinite(Fi)&&(sg=Math.min(sg,el.width)),isFinite(_i)&&(Ug=Math.min(Ug,el.height));var bu=0;bu=ps.actual,ps.actual=Math.max(ps.actual,Ug),ps.oc=Math.max(ps.oc,Ug),js=ps.actual-bu,_i=Math.max(_i-js,0),gn[Vl.row]===null&&(Vd=Math.max(Vd-js,0)),bu=Ul.actual,Ul.actual=Math.max(Ul.actual,sg),Ul.oc=Math.max(Ul.oc,sg),js=Ul.actual-bu,Fi=Math.max(Fi-js,0),Xt[Vl.column]===null&&(Jh=Math.max(Jh-js,0))}}Wn(Ot);var Ph=fi.alloc(),qc=mn(),ic=mn();if(z=Nt.length,z!==0){for(var Tf=0;Tf<Ko;Tf++)if(je[Tf]){la=je[Tf].length;var Rp=a.Fb(Tf);qc[Tf]=Rp.actual;for(var kf=0;kf<la;kf++)if(je[Tf][kf]){var pv=a.Eb(kf);ic[kf]=pv.actual}}}for(var jp=0;jp<z;jp++){var ns=Nt[jp];if(ns.visible||ns===Xh){var Tc=a.Fb(ns.row),mc=a.Eb(ns.column);switch(el.h(Math.max(mc.minimum,Math.min(y,mc.maximum)),Math.max(Tc.minimum,Math.min(x,Tc.maximum))),Tl=cc(ns,Tc,mc,!1),Tl){case ci:ic[mc.index]!==0&&(el.width=Math.min(el.width,ic[mc.index])),qc[Tc.index]!==0&&(el.height=Math.min(el.height,qc[Tc.index]));break;case lr:ic[mc.index]!==0&&(el.width=Math.min(el.width,ic[mc.index]));break;case Pr:qc[Tc.index]!==0&&(el.height=Math.min(el.height,qc[Tc.index]))}isFinite(mc.width)&&(el.width=mc.width),isFinite(Tc.height)&&(el.height=Tc.height),Ph.h(0,0);for(var mv=mc.minimum,Ru=Tc.minimum,qh=1;qh<ns.rowSpan&&!(ns.row+qh>=a.rowCount);qh++)ti=a.Fb(ns.row+qh),js=0,js=Tl===ci||Tl===Pr?Math.max(ti.minimum,qc[ns.row+qh]===0?ti.maximum:Math.min(qc[ns.row+qh],ti.maximum)):Math.max(ti.minimum,isNaN(ti.Hc)?ti.maximum:Math.min(ti.Hc,ti.maximum)),Ph.height+=js,Ru+=ti.minimum;for(var vc=1;vc<ns.columnSpan&&!(ns.column+vc>=a.columnCount);vc++)ti=a.Eb(ns.column+vc),js=0,js=Tl===ci||Tl===lr?Math.max(ti.minimum,ic[ns.column+vc]===0?ti.maximum:Math.min(ic[ns.column+vc],ti.maximum)):Math.max(ti.minimum,isNaN(ti.Hc)?ti.maximum:Math.min(ti.Hc,ti.maximum)),Ph.width+=js,mv+=ti.minimum;el.width+=Ph.width,el.height+=Ph.height;var zp=ns.margin,If=zp.right+zp.left,Tm=zp.top+zp.bottom;ns.measure(el.width,el.height,mv,Ru);for(var Hp=ns.measuredBounds,Sd=Math.max(Hp.width+If,0),lg=Math.max(Hp.height+Tm,0),Of=0,Zp=0;Zp<ns.rowSpan&&!(ns.row+Zp>=a.rowCount);Zp++)ti=a.Fb(ns.row+Zp),Of+=ti.total||0;if(Of<lg){var ef=lg-Of,Ud=lg-Of;if(ns.spanAllocation!==null)for(var tf=ns.spanAllocation,wh=0;wh<ns.rowSpan&&!(0>=ef)&&!(ns.row+wh>=a.rowCount);wh++){ti=a.Fb(ns.row+wh);var nf=ti.oa||0,ug=tf(ns,ti,Ud);ti.actual=Math.min(ti.maximum,nf+ug),ti.oa!==nf&&(ef-=ti.oa-nf)}for(;0<ef;){var ed=ti.oa||0;if(isNaN(ti.height)&&ti.maximum>ed&&(ti.actual=Math.min(ti.maximum,ed+ef),ti.oa!==ed&&(ef-=ti.oa-ed)),ti.index===0)break;ti=a.Fb(ti.index-1)}}for(var _g=0,rf=0;rf<ns.columnSpan&&!(ns.column+rf>=a.columnCount);rf++)ti=a.Eb(ns.column+rf),_g+=ti.total||0;if(_g<Sd){var Xg=Sd-_g,Qy=Sd-_g;if(ns.spanAllocation!==null)for(var Ch=ns.spanAllocation,cg=0;cg<ns.columnSpan&&!(0>=Xg)&&!(ns.column+cg>=a.columnCount);cg++){ti=a.Eb(ns.column+cg);var km=ti.oa||0,qy=Ch(ns,ti,Qy);ti.actual=Math.min(ti.maximum,km+qy),ti.oa!==km&&(Xg-=ti.oa-km)}for(;0<Xg;){var vv=ti.oa||0;if(isNaN(ti.width)&&ti.maximum>vv&&(ti.actual=Math.min(ti.maximum,vv+Xg),ti.oa!==vv&&(Xg-=ti.oa-vv)),ti.index===0)break;ti=a.Eb(ti.index-1)}}}}Wn(Nt),fi.free(Ph),fi.free(el),qc!==void 0&&Wn(qc),ic!==void 0&&Wn(ic);var Yg=0,Jg=0,yv=a.desiredSize,px=a.maxSize;Tl=Fl(a,!0);var Im=yh=Kd=0,Om=0;z=a.columnCount;for(var Sv=0;Sv<z;Sv++)mi[Sv]!==void 0&&(ti=a.Eb(Sv),isFinite(ti.width)?(Im+=ti.width,Im+=ti.Wc()):qm(ti)===Up?(Im+=ti.oa,Im+=ti.Wc()):ti.oa!==0&&(Kd+=ti.oa,Kd+=ti.Wc()));isFinite(yv.width)?Yg=Math.min(yv.width,px.width):Yg=Tl!==ai&&isFinite(y)?y:Kd,Yg=Math.max(Yg,a.minSize.width),Yg=Math.max(Yg-Im,0);for(var Jx=Kd===0?1:Math.max(Yg/Kd,1),xv=0;xv<z;xv++)mi[xv]!==void 0&&(ti=a.Eb(xv),isFinite(ti.width)||qm(ti)===Up||(ti.actual=ti.oa*Jx),ti.position=E.width,ti.oa!==0&&(E.width+=ti.oa,E.width+=ti.Wc()));z=a.rowCount;for(var Pv=0;Pv<z;Pv++)zi[Pv]!==void 0&&(ti=a.Fb(Pv),isFinite(ti.height)?(Om+=ti.height,Om+=ti.Wc()):qm(ti)===Up?(Om+=ti.oa,Om+=ti.Wc()):ti.oa!==0&&(yh+=ti.oa,yh+=ti.Wc()));isFinite(yv.height)?Jg=Math.min(yv.height,px.height):Jg=Tl!==ai&&isFinite(x)?x:yh,Jg=Math.max(Jg,a.minSize.height),Jg=Math.max(Jg-Om,0);for(var Qx=yh===0?1:Math.max(Jg/yh,1),wv=0;wv<z;wv++)zi[wv]!==void 0&&(ti=a.Fb(wv),isFinite(ti.height)||qm(ti)===Up||(ti.actual=ti.oa*Qx),ti.position=E.height,ti.oa!==0&&(E.height+=ti.oa,E.height+=ti.Wc()));z=re.length;for(var eS=0;eS<z;eS++){var Rm=re[eS],tS=0,nS=0;Rm.type===hi.TableRow?(tS=E.width,ti=a.Fb(Rm.row),nS=ti.actual):(ti=a.Eb(Rm.column),tS=ti.actual,nS=E.height),Rm.measuredBounds.h(0,0,tS,nS),gt(Rm,!1)}Wn(re),a.inRowsCols=je},Gm.prototype.arrange=function(a,y,x){var b=y.length,E=a.padding,z=E.left;E=E.top;var te=a.inRowsCols;if(te!==null){for(var re,oe,le=te.length,ue=0,me=0;me<le;me++)te[me]&&(ue=Math.max(ue,te[me].length));oe=a.rowDefs,re=a.colDefs;var we=me=0,Me=Math.min(a.topIndex,le-1);if(0<oe.length){for(;Me!==le&&(oe[Me]===void 0||oe[Me].oa===0);)Me++;Me=Math.max(Math.min(Me,le-1),0),me=-oe[Me].position}var Te=Math.min(a.leftIndex,ue-1);if(0<re.length){for(;Te!==ue&&(re[Te]===void 0||re[Te].oa===0);)Te++;Te=Math.max(Math.min(Te,ue-1),0),we=-re[Te].position}for(var je=0,ct=0;je!==le&&oe[je]===void 0;)je++;for(;ct!==le&&re[ct]===void 0;)ct++;ue=a.part,a.Fb(je),a.Eb(ct);for(var nt=0;nt<y.length;nt++){var bt=y[nt];if(bt instanceof hi&&bt.visible&&zh(bt)){if(bt.type===hi.TableRow){re=a.Fb(bt.row);var Nt=a.Eb(ct)}else re=a.Fb(je),Nt=a.Eb(bt.column);oe=re.position+me+E,re.oa!==0&&(oe+=re.Io(Math.max(je,Me))),re=Nt.position+we+z,Nt.oa!==0&&(re+=Nt.Io(Math.max(ct,Te))),Nt=bt.measuredBounds,bt.Uk(),bt.actualBounds.ka();var Ot=bt.actualBounds,Xt=Ut.allocAt(Ot.x,Ot.y,Ot.width,Ot.height);Ot.x=bt.type===hi.TableRow?z:re,Ot.y=bt.type===hi.TableColumn?E:oe,Ot.width=Nt.width,Ot.height=Nt.height,bt.actualBounds.freeze(),Kt(bt,!1),Zi(Xt,Ot)||ue===null||(ue.oh(),bt.Pn(ue)),Ut.free(Xt)}}for(nt=fi.alloc(),bt=0;bt<le;bt++)if(te[bt]){for(ue=te[bt].length,Nt=a.Fb(bt),oe=Nt.position+me+E,Nt.oa!==0&&(oe+=Nt.Io(Math.max(je,Me))),Ot=0;Ot<ue;Ot++)if(te[bt][Ot]){Xt=a.Eb(Ot),re=Xt.position+we+z,Xt.oa!==0&&(re+=Xt.Io(Math.max(ct,Te)));for(var gn=te[bt][Ot],Fi=gn.length,_i=0;_i<Fi;_i++){var zi=gn[_i],mi=zi.measuredBounds;nt.h(0,0);for(var ti=1;ti<zi.rowSpan&&!(bt+ti>=a.rowCount);ti++){var Ur=a.Fb(bt+ti);Ur.oa!==0&&(nt.height+=Ur.total)}for(ti=1;ti<zi.columnSpan&&!(Ot+ti>=a.columnCount);ti++)Ur=a.Eb(Ot+ti),Ur.oa!==0&&(nt.width+=Ur.total);var Dr=Xt.oa+nt.width,Ko=Nt.oa+nt.height;ti=re,Ur=oe;var la=Dr,Rs=Ko,Vs=re,Dl=oe,js=Dr,Xh=Ko;re+Dr>x.width&&(js=Math.max(x.width-re,0)),oe+Ko>x.height&&(Xh=Math.max(x.height-oe,0));var gs=zi.alignment;if(gs.Xb()){gs=a.defaultAlignment,gs.sb()||(gs=wo);var Yc=gs.x,Bl=gs.y,Yh=gs.offsetX;gs=gs.offsetY;var Vu=Xt.alignment,pc=Nt.alignment;Vu.sb()&&(Yc=Vu.x,Yh=Vu.offsetX),pc.sb()&&(Bl=pc.y,gs=pc.offsetY)}else Yc=gs.x,Bl=gs.y,Yh=gs.offsetX,gs=gs.offsetY;(isNaN(Yc)||isNaN(Bl))&&(Bl=Yc=.5,gs=Yh=0),Vu=mi.width,pc=mi.height;var ku=zi.margin,Pu=ku.left+ku.right,Ff=ku.top+ku.bottom,Jc=cc(zi,Nt,Xt,!1);!isNaN(zi.desiredSize.width)||Jc!==ci&&Jc!==lr||(Vu=Math.max(Dr-Pu,0)),!isNaN(zi.desiredSize.height)||Jc!==ci&&Jc!==Pr||(pc=Math.max(Ko-Ff,0)),Dr=zi.maxSize,Ko=zi.minSize,Vu=Math.min(Dr.width,Vu),pc=Math.min(Dr.height,pc),Vu=Math.max(Ko.width,Vu),pc=Math.max(Ko.height,pc),Dr=pc+Ff,ti+=la*Yc-(Vu+Pu)*Yc+Yh+ku.left,Ur+=Rs*Bl-Dr*Bl+gs+ku.top,zi.visible&&(xr(Vs,Dl,js,Xh,ti,Ur,mi.width,mi.height)?zi.arrange(ti,Ur,Vu,pc):zi.arrange(ti,Ur,Vu,pc,new Ut(Vs,Dl,js,Xh)))}}}for(fi.free(nt),a=0;a<b;a++)x=y[a],z=x instanceof hi?x:null,z!==null&&zh(z)&&(z=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,z.width,z.height),x.naturalBounds.freeze())}};function $m(){this.xa="Base"}$t($m,Es),$m.prototype.measure=function(){},$m.prototype.arrange=function(){};function Km(){this.xa="Base"}$t(Km,Es),Km.prototype.measure=function(){},Km.prototype.arrange=function(){};function Vm(){this.xa="Base"}$t(Vm,Es),Vm.prototype.measure=function(a,y,x,b,E,z,te){1<b.length&&St("Viewbox Panel cannot contain more than one GraphObject."),b=b[0],b.Ca=1,b.Uj(),b.measure(1/0,1/0,z,te);var re=b.measuredBounds,oe=b.margin,le=oe.right+oe.left;if(oe=oe.top+oe.bottom,isFinite(y)||isFinite(x)){var ue=b.scale,me=re.width;re=re.height;var we=Math.max(y-le,0),Me=Math.max(x-oe,0),Te=1;a.viewboxStretch===tr?me!==0&&re!==0&&(Te=Math.min(we/me,Me/re)):me!==0&&re!==0&&(Te=Math.max(we/me,Me/re)),Te===0&&(Te=1e-4),b.Ca*=Te,ue!==b.scale&&(gt(b,!0),b.measure(1/0,1/0,z,te))}re=b.measuredBounds,E.width=isFinite(y)?y:Math.max(re.width+le,0),E.height=isFinite(x)?x:Math.max(re.height+oe,0)},Vm.prototype.arrange=function(a,y,x){y=y[0];var b=y.measuredBounds,E=y.margin,z=Math.max(b.width+(E.right+E.left),0);E=Math.max(b.height+(E.top+E.bottom),0);var te=y.alignment;te.Xb()&&(te=a.defaultAlignment),te.sb()||(te=wo),y.arrange(x.width*te.x-z*te.x+te.offsetX,x.height*te.y-E*te.y+te.offsetY,b.width,b.height)};function $p(){this.xa="Base"}$t($p,Es),$p.prototype.measure=function(){},$p.prototype.arrange=function(){},$p.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 z=a.naturalBounds,te=a.actualBounds,re=z.width,oe=z.height,le=Math.ceil(re/E),ue=Math.ceil(oe/b),me=a.gridOrigin,we=me.x;me=me.y,y.save(),y.beginPath(),y.rect(0,0,re,oe),y.clip(),y.Se();for(var Me=[],Te=a.O.s,je=Te.length,ct=0;ct<je;ct++){var nt=Te[ct],bt=[];if(Me.push(bt),nt.visible){var Nt=nt.interval;if(!(0>Nt)){nt=Ev(nt.figure);for(var Ot=0;Ot<je;Ot++)if(Ot!==ct){var Xt=Te[Ot];Xt.visible&&Ev(Xt.figure)===nt&&(Xt=Xt.interval,Xt>Nt&&bt.push(Xt))}}}}for(Te=a.O.s,je=Te.length,ct=0;ct<je;ct++){var gn=Te[ct];if(gn.visible&&(bt=gn.interval||1,nt=Math.abs(bt),!(2>E*nt*x))){if(Nt=gn.segmentIndex,(!isFinite(Nt)||isNaN(Nt))&&(Nt=0),0>Nt&&(Nt=nt-Math.min(-Nt,nt)),Nt=Math.round(Nt%nt),nt=gn.opacity,Ot=1,nt!==1){if(nt===0)continue;Ot=y.globalAlpha,y.globalAlpha=Ot*nt}Xt=Me[ct];var Fi=!1,_i=gn.strokeDashArray;if(_i!==null&&(Fi=!0,y.js(_i,gn.strokeDashOffset)),gn.figure==="LineV"&&gn.stroke!==null&&0<gn.strokeWidth){for(y.lineWidth=gn.strokeWidth,Za(a,y,gn.stroke,!1,!1,z,te),y.beginPath(),_i=gn=Math.floor((we-E)/E);_i<=gn+le;_i++){var zi=_i*E+we;0<=zi&&zi<=re&&Um(_i,bt,Nt,Xt)&&(y.moveTo(zi,0),y.lineTo(zi,oe))}y.stroke(),y.Se()}else if(gn.figure==="LineH"&&gn.stroke!==null&&0<gn.strokeWidth){for(y.lineWidth=gn.strokeWidth,Za(a,y,gn.stroke,!1,!1,z,te),y.beginPath(),_i=gn=Math.floor((me-b)/b);_i<=gn+ue;_i++)zi=_i*b+me,0<=zi&&zi<=oe&&Um(_i,bt,Nt,Xt)&&(y.moveTo(0,zi),y.lineTo(re,zi));y.stroke(),y.Se()}else if(gn.figure==="BarV"&&gn.fill!==null)for(Za(a,y,gn.fill,!0,!1,z,te),gn=gn.width,isNaN(gn)&&(gn=E),zi=_i=Math.floor((we-E)/E);zi<=_i+le;zi++){var mi=zi*E+we;0<=mi+gn&&mi<=re&&Um(zi,bt,Nt,Xt)&&y.fillRect(mi,0,gn,oe)}else if(gn.figure==="BarH"&&gn.fill!==null)for(Za(a,y,gn.fill,!0,!1,z,te),gn=gn.height,isNaN(gn)&&(gn=b),zi=_i=Math.floor((me-b)/b);zi<=_i+ue;zi++)mi=zi*b+me,0<=mi+gn&&mi<=oe&&Um(zi,bt,Nt,Xt)&&y.fillRect(0,mi,re,gn);Fi&&y.fs(),nt!==1&&(y.globalAlpha=Ot)}}y.restore(),y.Vc(!1)};function Um(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 _m(){this.xa="Base"}$t(_m,Es),_m.prototype.measure=function(a,y,x,b,E){var z=b.length;if(a instanceof jo||a instanceof vi){var te=null,re=null;if(a instanceof vi&&(te=a),a instanceof jo&&(re=a,te=re.adornedPart,a.j===null&&(a.j=[])),te instanceof vi){var oe=te;if(z===0)Ui(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var le=a instanceof jo?null:te.path;y=te.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var ue=oe.points,me=te.pointsCount;re!==null?re.Ul(!1):te!==null&&te.Ul(!1),re=y.width;var we=y.height,Me=a.j;if(Me.length=0,le!==null){rS(a,re,we,le);var Te=le.measuredBounds;x.ed(Te),Me.push(Te)}Te=ro.alloc();for(var je=tt.alloc(),ct=tt.alloc(),nt=0;nt<z;nt++){var bt=b[nt];if(bt!==le)if(bt.isPanelMain&&bt instanceof io){rS(a,re,we,bt);var Nt=bt.measuredBounds;x.ed(Nt),Me.push(Nt)}else if(2>me)bt.measure(1/0,1/0,0,0),Nt=bt.measuredBounds,x.ed(Nt),Me.push(Nt);else{var Ot=bt.segmentIndex,Xt=bt.segmentFraction,gn=bt.alignmentFocus;gn.Mc()&&(gn=wo);var Fi=bt.segmentOrientation,_i=bt.segmentOffset;if(isNaN(Ot)){var zi=oe.ua;Nt=mn(),zi.Qu(Xt,Nt);var mi=tt.allocAt(Nt[0],Nt[1]);if(mi.add(oe.i(0)),zi.type===xi.j?mi.offset(-zi.startX,-zi.startY):(zi=zi.figures.first(),zi!==null&&mi.offset(-zi.startX,-zi.startY)),zi=Nt[2],Fi!==Zl){var ti=oe.computeAngle(bt,Fi,zi);bt.Kb=ti}ti=mi.x-y.x;var Ur=mi.y-y.y;tt.free(mi),Wn(Nt)}else if(Ot<-me||Ot>=me)Nt=tt.alloc(),oe.vg(),oe.computeMidPoint(Nt),zi=oe.midAngle,Fi!==Zl&&(ti=oe.computeAngle(bt,Fi,zi),bt.Kb=ti),ti=Nt.x-y.x,Ur=Nt.y-y.y,tt.free(Nt);else{if(ti=0,0<=Ot?(Ur=ue.M(Ot),Nt=Ot<me-1?ue.M(Ot+1):Ur):(ti=me+Ot,Ur=ue.M(ti),Nt=0<ti?ue.M(ti-1):Ur),Ur.Xa(Nt)){0<=Ot?(zi=0<Ot?ue.M(Ot-1):Ur,ti=Ot<me-2?ue.M(Ot+2):Nt):(zi=ti<me-1?ue.M(ti+1):Ur,ti=1<ti?ue.M(ti-2):Nt),mi=zi.Bf(Ur);var Dr=Nt.Bf(ti);zi=mi>Dr+10?0<=Ot?zi.ab(Ur):Ur.ab(zi):Dr>mi+10?0<=Ot?Nt.ab(ti):ti.ab(Nt):0<=Ot?zi.ab(ti):ti.ab(zi)}else zi=0<=Ot?Ur.ab(Nt):Nt.ab(Ur);Fi!==Zl&&(ti=oe.computeAngle(bt,Fi,zi),bt.Kb=ti),ti=Ur.x+(Nt.x-Ur.x)*Xt-y.x,Ur=Ur.y+(Nt.y-Ur.y)*Xt-y.y}bt.measure(1/0,1/0,0,0),Nt=bt.measuredBounds,mi=bt.naturalBounds;var Ko=0;bt instanceof io&&(Ko=bt.strokeWidth),Dr=mi.width+Ko;var la=mi.height+Ko;Te.reset(),Te.translate(-Nt.x,-Nt.y),Te.scale(bt.scale,bt.scale),Te.rotate(Fi===Zl?bt.angle:zi,Dr/2,la/2),Fi!==im&&Fi!==om||Te.rotate(90,Dr/2,la/2),Fi!==rm&&Fi!==am||Te.rotate(-90,Dr/2,la/2),Fi===b0&&(45<zi&&135>zi||225<zi&&315>zi)&&Te.rotate(-zi,Dr/2,la/2),mi=new Ut(0,0,Dr,la),je.xi(mi,gn),Te.Ga(je),gn=-je.x+Ko/2*bt.scale,bt=-je.y+Ko/2*bt.scale,ct.assign(_i),Ko=isNaN(_i.x);var Rs=isNaN(_i.y);if(Ko||Rs){Dr=Dr/2+3,la=la/2+3;var Vs=45<=zi&&135>=zi,Dl=225<=zi&&315>=zi;Fi===Zl&&(Vs||Dl)?(ct.x=Rs?Dr:_i.y,ct.y=Ko?la:_i.x,Vs?0<=Ot||isNaN(Ot)&&.5>Xt||!Ko||(ct.y=-la):Dl&&((0<=Ot||isNaN(Ot)&&.5>Xt)&&Ko&&(ct.y=-la),Rs&&(ct.x=-Dr))):(Ko&&(ct.x=0<=Ot||isNaN(Ot)&&.5>Xt?Dr:-Dr),Rs&&(ct.y=-la),ct.rotate(zi))}else ct.rotate(zi);ti+=ct.x,Ur+=ct.y,mi.set(Nt),mi.h(ti+gn,Ur+bt,Nt.width,Nt.height),Me.push(mi),x.ed(mi)}}if(te!==null)for(b=te.labelNodes;b.next();)b.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),Ui(E,x.width||0,x.height||0),ro.free(Te),tt.free(je),tt.free(ct)}}}},_m.prototype.arrange=function(a,y){var x=y.length;if(a instanceof jo||a instanceof vi){var b=a,E=null;a instanceof jo&&(E=a,b=E.adornedPart);var z=a instanceof jo?null:b.path,te=a.j;if(te.length!==0){var re=0;if(z!==null&&re<te.length){var oe=te[re];re++,z.arrange(oe.x-a.jg.x,oe.y-a.jg.y,oe.width,oe.height)}for(oe=0;oe<x;oe++){var le=y[oe];if(le!==z&&re<te.length){var ue=te[re];re++,le.arrange(ue.x-a.jg.x,ue.y-a.jg.y,ue.width,ue.height)}}}if(y=b.points,x=y.count,2<=x&&a instanceof vi)for(z=a.labelNodes;z.next();){var me=a;te=z.value,re=te.segmentIndex,oe=te.segmentFraction;var we=te.alignmentFocus;if(le=te.segmentOrientation,ue=te.segmentOffset,isNaN(re)){var Me=me.ua,Te=mn();Me.Qu(oe,Te);var je=tt.allocAt(Te[0],Te[1]);je.add(me.i(0)),Me.type===xi.j||(Me=Me.figures.first()),je.offset(-Me.startX,-Me.startY),Me=Te[2],le!==Zl&&(me=me.computeAngle(te,le,Me),te.angle=me),me=je.x;var ct=je.y;tt.free(je),Wn(Te)}else if(re<-x||re>=x)Te=tt.alloc(),Me=me,ct=Te,Me.vg(),Me.computeMidPoint(ct),Me=me.midAngle,le!==Zl&&(me=me.computeAngle(te,le,Me),te.angle=me),me=Te.x,ct=Te.y,tt.free(Te);else{if(je=0,0<=re?(Te=y.s[re],ct=re<x-1?y.s[re+1]:Te):(je=x+re,Te=y.s[je],ct=0<je?y.s[je-1]:Te),Te.Xa(ct)){0<=re?(Me=0<re?y.s[re-1]:Te,je=re<x-2?y.s[re+2]:ct):(Me=je<x-1?y.s[je+1]:Te,je=1<je?y.s[je-2]:ct);var nt=Me.Bf(Te),bt=ct.Bf(je);Me=nt>bt+10?0<=re?Me.ab(Te):Te.ab(Me):bt>nt+10?0<=re?ct.ab(je):je.ab(ct):0<=re?Me.ab(je):je.ab(Me)}else Me=0<=re?Te.ab(ct):ct.ab(Te);le!==Zl&&(me=me.computeAngle(te,le,Me),te.angle=me),me=Te.x+(ct.x-Te.x)*oe,ct=Te.y+(ct.y-Te.y)*oe}if(we.ys())te.location=new tt(me,ct);else{we.Mc()&&(we=wo),Te=ro.alloc(),Te.reset(),Te.scale(te.scale,te.scale),Te.rotate(te.angle,0,0);var Nt=te.naturalBounds;je=Ut.allocAt(0,0,Nt.width,Nt.height),nt=tt.alloc(),nt.xi(je,we),Te.Ga(nt),we=-nt.x,bt=-nt.y;var Ot=Nt.width,Xt=Nt.height;Nt=tt.alloc(),Nt.assign(ue);var gn=isNaN(ue.x),Fi=isNaN(ue.y);if(gn||Fi){Ot=Ot/2+3,Xt=Xt/2+3;var _i=45<=Me&&135>=Me,zi=225<=Me&&315>=Me;le===Zl&&(_i||zi)?(Nt.x=Fi?Ot:ue.y,Nt.y=gn?Xt:ue.x,_i?0<=re||isNaN(re)&&.5>oe||!gn||(Nt.y=-Xt):zi&&((0<=re||isNaN(re)&&.5>oe)&&gn&&(Nt.y=-Xt),Fi&&(Nt.x=-Ot))):(gn&&(Nt.x=0<=re||isNaN(re)&&.5>oe?Ot:-Ot),Fi&&(Nt.y=-Xt),Nt.rotate(Me))}else Nt.rotate(Me);me+=Nt.x,ct+=Nt.y,Te.pp(je),we+=je.x,bt+=je.y,re=tt.allocAt(me+we,ct+bt),te.move(re),tt.free(re),tt.free(Nt),tt.free(nt),Ut.free(je),ro.free(Te)}}E!==null?E.Ul(!1):b.Ul(!1),b=TS(a),a.location.h(a.position.x+b.x,a.position.y+b.y),tt.free(b)}};function rS(a,y,x,b){if(mt(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof jo&&a.type===hi.Link&&a.adornedObject instanceof io&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof vi&&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 jo&&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),gt(b,!1)}}function Kp(){this.xa="Base"}$t(Kp,Es),Kp.prototype.measure=function(a,y,x,b,E,z,te){var re=a.Pb();a.graduatedBounds=[];var oe=re.margin,le=oe.right+oe.left,ue=oe.top+oe.bottom;re.measure(y,x,z,te);var me=re.measuredBounds,we=new Ut(-oe.left,-oe.top,Math.max(me.width+le,0),Math.max(me.height+ue,0));a.graduatedBounds.push(we),E.assign(we);for(var Me=re.geometry,Te=re.strokeWidth,je=Me.flattenedSegments,ct=Me.flattenedLengths,nt=Me.flattenedTotalLength,bt=je.length,Nt=0,Ot=0,Xt=mn(),gn=0;gn<bt;gn++){var Fi=je[gn],_i=[];Ot=Nt=0;for(var zi=Fi.length,mi=0;mi<zi;mi+=2){var ti=Fi[mi],Ur=Fi[mi+1];if(mi!==0){var Dr=180*Math.atan2(Ur-Ot,ti-Nt)/Math.PI;0>Dr&&(Dr+=360),_i.push(Dr)}Nt=ti,Ot=Ur}Xt.push(_i)}if(a.graduatedIntervals===null){for(var Ko=[],la=a.O.s,Rs=la.length,Vs=0;Vs<Rs;Vs++){var Dl=la[Vs],js=[];if(Ko.push(js),Dl.visible){var Xh=Dl.interval;if(!(0>Xh)){for(var gs=0;gs<Rs;gs++)if(gs!==Vs){var Yc=la[gs];if(Yc.visible&&Dl.constructor===Yc.constructor){var Bl=Yc.interval;Bl>Xh&&js.push(Bl)}}}}}a.graduatedIntervals=Ko}var Yh=a.graduatedIntervals,Vu=a.O.s,pc=Vu.length,ku=0,Pu=0,Ff=nt;a.graduatedMarks=[];for(var Jc,Bp=0;Bp<pc;Bp++){var Iu=Vu[Bp];if(Jc=[],Iu.visible&&Iu!==re){var Tl=Math.abs(Iu.interval),Am=a.graduatedTickUnit;if(!(2>Am*Tl*nt/a.graduatedRange&&Iu.graduatedSkip===null)){var $g=ct[0][0],md=0,wu=0;Pu=nt*Iu.graduatedStart-1e-4,Ff=nt*Iu.graduatedEnd+1e-4;var rg=Am*Tl,Ou=a.graduatedTickBase;if(Ou<a.graduatedMin){var Af=(a.graduatedMin-Ou)/rg;Af=Af%1===0?Af:Math.floor(Af+1),Ou+=Af*rg}else Ou>a.graduatedMin+rg&&(Ou-=Math.floor((Ou-a.graduatedMin)/rg)*rg);for(var hv=Yh[Bp],Dm=Ou,Yy=1e-6*a.graduatedMax,Kd=1;Ou<=a.graduatedMax+Yy;Kd++){e:{for(var yh=hv.length,Kg=0;Kg<yh;Kg++){var Df=(Ou-a.graduatedTickBase)%(hv[Kg]*a.graduatedTickUnit),Tp=1e-6*a.graduatedTickUnit;if(Df<Tp&&Df>-Tp){var Bf=!1;break e}}Bf=!0}if(Bf&&(Ou>a.graduatedMax&&(Ou=a.graduatedMax),Iu.graduatedSkip===null||Iu instanceof ua&&!Iu.graduatedSkip(Ou,Iu)||Iu instanceof io&&!Iu.graduatedSkip(Ou,Iu))&&(ku=(Ou-a.graduatedMin)*nt/a.graduatedRange,ku>nt&&(ku=nt),Pu<=ku&&ku<=Ff)){for(var Vd=Xt[md][wu],Jh=ct[md][wu];md<ct.length;){for(;ku>$g&&wu<ct[md].length-1;)wu++,Vd=Xt[md][wu],Jh=ct[md][wu],$g+=Jh;if(ku<=$g)break;md++,wu=0,Vd=Xt[md][wu],Jh=ct[md][wu],$g+=Jh}var Cu=je[md],vd=Cu[2*wu],fv=Cu[2*wu+1],Sh=(ku-($g-Jh))/Jh,kp=new tt(vd+(Cu[2*wu+2]-vd)*Sh+Te/2-Me.bounds.x,fv+(Cu[2*wu+3]-fv)*Sh+Te/2-Me.bounds.y);kp.scale(re.scale,re.scale);e:{var Qc=Vd,og=Xt[md];if(!(.5005>Sh&&.4995<Sh)){var yd=Qc;if(.5>Sh?0<wu?yd=og[wu-1]:Jt.$(Cu[0],Cu[Cu.length-2])&&Jt.$(Cu[1],Cu[Cu.length-1])&&(yd=og[og.length-1]):.5<Sh&&(wu+1<og.length?yd=og[wu+1]:Jt.$(Cu[0],Cu[Cu.length-2])&&Jt.$(Cu[1],Cu[Cu.length-1])&&(yd=og[0])),Qc!==yd){var Vg=Math.abs(Qc-yd);if(180<Vg&&(Qc<yd?Qc+=360:yd+=360,Vg=Math.abs(Qc-yd)),5e-4>Sh||.9995<Sh){Vd=(Qc+yd)/2%360;break e}if(10>Vg){var Ip=1-Math.abs(.5-Sh);Vd=(Qc*Ip+yd*(1-Ip))%360;break e}}}Vd=Qc}if(Iu instanceof ua){var Bc="";Iu.graduatedFunction!==null?(Bc=Iu.graduatedFunction(Ou,Iu),Bc=Bc!=null?Bc.toString():""):Bc=(+Ou.toFixed(2)).toString(),Bc!==""&&Jc.push({$l:kp,angle:Vd,text:Bc})}else Jc.push({$l:kp,angle:Vd})}Ou=Dm+Kd*rg}}}a.graduatedMarks.push(Jc)}Wn(Xt);var el=a.graduatedMarks;if(el!==null)for(var Bm=b.length,Vl=0;Vl<Bm;Vl++){var ps=b[Vl],Ul=el[Vl];if(ps.visible&&ps!==re&&Ul.length!==0){if(ps instanceof io){var xh=a,Qh=E,ag=ps.alignmentFocus;ag.Mc()&&(ag=zs);var Jy=ps.angle;ps.Kb=0,ps.measure(1/0,1/0,0,0),ps.Kb=Jy;var gv=ps.measuredBounds,Op=gv.width,sg=gv.height,Ug=Ut.allocAt(0,0,Op,sg),bu=tt.alloc();bu.xi(Ug,ag),Ut.free(Ug);for(var Ph=-bu.x,qc=-bu.y,ic=new Ut,Tf=Ul.length,Rp=0;Rp<Tf;Rp++)for(var kf=Ul[Rp],pv=kf.$l.x,jp=kf.$l.y,ns=kf.angle,Tc=0;4>Tc;Tc++){switch(Tc){case 0:bu.h(Ph,qc);break;case 1:bu.h(Ph+Op,qc);break;case 2:bu.h(Ph,qc+sg);break;case 3:bu.h(Ph+Op,qc+sg)}bu.rotate(ns+ps.angle),bu.offset(pv,jp),Rp===0&&Tc===0?ic.h(bu.x,bu.y,0,0):ic.Ye(bu),bu.offset(-pv,-jp),bu.rotate(-ns-ps.angle)}tt.free(bu),xh.graduatedBounds!==null&&xh.graduatedBounds.push(ic),cr(Qh,ic.x,ic.y,ic.width,ic.height)}else if(ps instanceof ua){var mc=a,mv=E;mc.temporaryTextBlock===null&&(mc.temporaryTextBlock=new ua);var Ru=mc.temporaryTextBlock;SS(Ru,ps);var qh=ps.alignmentFocus;qh.Mc()&&(qh=zs);for(var vc=ps.segmentOrientation,zp=ps.segmentOffset,If=new Ut,Tm=0,Hp=0,Sd=0,lg=0,Of=0,Zp=Ul.length,ef=0;ef<Zp;ef++){var Ud=Ul[ef];Tm=Ud.$l.x,Hp=Ud.$l.y,Sd=Ud.angle,Of=lg=ps.angle,vc!==Zl&&(Of=vc===nm||vc===C0?Sd+ps.angle:Sd,lg=vi.computeAngle(vc,Of)),Ru.Kb=lg,Ru.text=Ud.text||"",Ru.measure(1/0,1/0,0,0);var tf=Ru.measuredBounds,wh=Ru.naturalBounds,nf=wh.width,ug=wh.height,ed=ro.alloc();ed.reset(),ed.translate(-tf.x,-tf.y),ed.scale(Ru.scale,Ru.scale),ed.rotate(Of,nf/2,ug/2),vc!==im&&vc!==om||ed.rotate(90,nf/2,ug/2),vc!==rm&&vc!==am||ed.rotate(-90,nf/2,ug/2),vc===b0&&(45<Sd&&135>Sd||225<Sd&&315>Sd)&&ed.rotate(-Sd,nf/2,ug/2);var _g=Ut.allocAt(0,0,nf,ug),rf=tt.alloc();rf.xi(_g,qh),ed.Ga(rf);var Xg=-rf.x,Qy=-rf.y,Ch=tt.alloc();Ch.assign(zp),isNaN(Ch.x)&&(Ch.x=nf/2+3),isNaN(Ch.y)&&(Ch.y=-(ug/2+3)),Ch.rotate(Sd),Tm+=Ch.x+Xg,Hp+=Ch.y+Qy;var cg=new Ut(Tm,Hp,tf.width,tf.height),km=new Ut(tf.x,tf.y,tf.width,tf.height),qy=new Ut(wh.x,wh.y,wh.width,wh.height);Ud.Sz=lg,Ud.lineCount=Ru.lineCount,Ud.lines=[Ru.Cb,Ru.Ih,Ru.df,Ru.Le,Ru.Qc,Ru.Qb,Ru.ze],Ud.actualBounds=cg,Ud.measuredBounds=km,Ud.naturalBounds=qy,ef===0?If.assign(cg):If.ed(cg),tt.free(Ch),tt.free(rf),Ut.free(_g),ro.free(ed)}mc.graduatedBounds!==null&&mc.graduatedBounds.push(If),cr(mv,If.x,If.y,If.width,If.height)}gt(ps,!1)}}},Kp.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var b=a.Pb(),E=a.graduatedMarks;if(E!==null){var z=a.graduatedBounds,te=0,re=z[te];te++,b!==null&&b.arrange(re.x-x.x,re.y-x.y,re.width,re.height);for(var oe=y.length,le=0;le<oe;le++){var ue=y[le];re=E[le],ue.visible&&ue!==b&&re.length!==0&&(re=z[te],te++,ue.arrange(re.x-x.x,re.y-x.y,re.width,re.height))}a.graduatedBounds=null}}},Kp.prototype.gc=function(a,y,x){var b=x.$i;x.$i=!0;var E=a.naturalBounds,z=E.width,te=E.height;E=y instanceof Uo,y.save(),y.beginPath(),y.rect(-1,-1,z+1,te+1),y.clip(),y.Se(),z=a.Pb(),z.gc(y,x),te=a.Df()*x.scale,0>=te&&(te=1);for(var re=z.actualBounds,oe=a.O.s,le=a.graduatedMarks,ue=oe.length,me=0;me<ue;me++){var we=oe[me],Me=le[me],Te=Me.length;if(we.visible&&we!==z&&Me.length!==0){if(we instanceof io){if(!(2>a.graduatedTickUnit*we.interval*z.geometry.flattenedTotalLength/a.graduatedRange*te&&we.graduatedSkip===null)){var je=we.measuredBounds,ct=we.strokeWidth*we.scale,nt=we.alignmentFocus;nt.Mc()&&(nt=zs);for(var bt=0;bt<Te;bt++){var Nt=Me[bt].$l,Ot=Me[bt].angle,Xt=nt,gn=we.Ab;gn.reset(),gn.translate(Nt.x+re.x,Nt.y+re.y),gn.rotate(Ot+we.angle,0,0),gn.translate(-je.width*Xt.x+Xt.offsetX+ct/2,-je.height*Xt.y+Xt.offsetY+ct/2),gn.scale(we.scale,we.scale),Ie(we,!1),we.wh.set(we.Ab),we.Kk=we.scale,$e(we,!1),we.gc(y,x),E&&(a.svg.appendChild(we.svg),we.svg=null),we.Ab.reset()}}}else if(we instanceof ua)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new ua),je=a.temporaryTextBlock,SS(je,we),ct=0;ct<Te;ct++)nt=Me[ct],nt.actualBounds&&nt.measuredBounds&&nt.naturalBounds&&(je.ec=nt.text||"",je.Kb=nt.Sz||0,je.Gc=nt.lineCount||0,bt=nt.lines,bt!==void 0&&(je.Cb=bt[0],je.Ih=bt[1],je.df=bt[2],je.Le=bt[3],je.Qc=bt[4],je.Qb=bt[5],je.ze=bt[6]),nt.naturalBounds&&(je.dc=nt.naturalBounds),nt.actualBounds&&(bt=nt.actualBounds,je.arrange(bt.x,bt.y,bt.width,bt.height)),bt=nt.actualBounds,je.arrange(bt.x,bt.y,bt.width,bt.height),Nt=nt.measuredBounds,nt=nt.naturalBounds,Ot=je.Ab,Ot.reset(),Ot.translate(bt.x+re.x,bt.y+re.y),Ot.translate(-Nt.x,-Nt.y),je.no(Ot,nt.x,nt.y,nt.width,nt.height),Ie(je,!1),je.wh.set(je.Ab),je.Kk=je.scale,$e(je,!1),je.Ng=we.part,je.Me=we.panel,je.gc(y,x),je.Me=null,je.Ng=null,E&&(a.svg.appendChild(je.svg),je.svg=null))}}x.$i=b,y.restore(),y.Vc(!0)};function hi(a,y){if(Yt.call(this),this.na=null,a===void 0)this.na=hi.Position;else if(typeof a=="string"){var x=Mc.I(a);x!==null&&(this.na=x)}else a instanceof Es?this.na=a:a&&(this.na=hi.Position,y=a);this.na===null&&St("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===hi.Grid?1048576:0),this.O=new kn,this.yb=Ls,this.Tm=Vo,this.Uf=Vr,this.$g=null,this.$e="",this.jg=new Ut(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=tr,this.jn=Ao,this.kn=Qr,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}$t(hi,Yt),hi.prototype.cloneProtected=function(a){Yt.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},hi.prototype.Af=function(a){Yt.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},hi.prototype.copy=function(){var a=Yt.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 z=a.O,te=z.count;if(z.Gb(te,E),z=a.part,z!==null){z.Rh=null,E.portId!==null&&z instanceof Di&&(z.Te=!0);var re=a.diagram;re!==null&&re.undoManager.isUndoingRedoing||z.cb(Va,"elements",a,null,E,null,te)}}return a}return null},Le=hi.prototype,Le.toString=function(){return"Panel("+this.type.name+")#"+br(this)},Le.Pn=function(a){Yt.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,b=0;b<x;b++)y[b].Pn(a)},Le.hh=function(a,y){if(this.na===hi.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===hi.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===hi.Table)if(a.yc(),a instanceof Uo){var x=a.yd;a.yd=Wu(a,"gojs-ts"),bv(this,a),a.nh.pop(),a.yd=x}else bv(this,a);(x=this.isClipping&&this.na===hi.Spot)&&a.save();for(var b=this.Pb(),E=this.O.s,z=E.length,te=0;te<z;te++){var re=E[te];x&&re===b&&(a.clipInsteadOfFill=!0),re.gc(a,y),x&&re===b&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function bv(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,b=0<a.columnCount?a.colDefs:null;x!==null&&Xm(a,y,!0,x,!0),b!==null&&Xm(a,y,!1,b,!0),x!==null&&oS(a,y,!0,x),b!==null&&oS(a,y,!1,b),x!==null&&Xm(a,y,!0,x,!1),b!==null&&Xm(a,y,!1,b,!1)}function oS(a,y,x,b){for(var E=b.length,z=a.actualBounds,te=a.naturalBounds,re=!0,oe=0;oe<E;oe++){var le=b[oe];if(le!==void 0&&le.actual!==0)if(re)re=!1;else{if(x){if(le.position>te.height)continue}else if(le.position>te.width)continue;var ue=le.separatorStrokeWidth;isNaN(ue)&&(ue=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var me=le.separatorStroke;if(me===null&&(me=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ue!==0&&me!==null){Za(a,y,me,!1,!1,te,z),me=!1;var we=le.separatorDashArray;we===null&&(we=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),we!==null&&(me=!0,y.js(we,0)),y.beginPath(),we=le.position+ue,x?we>te.height&&(ue-=we-te.height):we>te.width&&(ue-=we-te.width),le=le.position+ue/2,y.lineWidth=ue,ue=a.yb,x?(le+=ue.top,we=te.width-ue.right,y.moveTo(ue.left,le),y.lineTo(we,le)):(le+=ue.left,we=te.height-ue.bottom,y.moveTo(le,ue.top),y.lineTo(le,we)),y.stroke(),y.Se(),me&&y.fs()}}}}function Xm(a,y,x,b,E){for(var z=b.length,te=a.actualBounds,re=a.naturalBounds,oe=aS(a,!0),le=aS(a,!1),ue=0;ue<z;ue++){var me=b[ue];if(me!==void 0&&me.background!==null&&me.coversSeparators!==E&&me.actual!==0){var we=x?te.height:te.width;if(!(me.position>we)){var Me=me.Wc(),Te=me.separatorStrokeWidth;isNaN(Te)&&(Te=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var je=me.separatorStroke;je===null&&(je=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(je===null||me.index===(x?oe:le))&&(Te=0),Me-=Te,Te=me.position+Te,Me+=me.actual,Te+Me>we&&(Me=we-Te),0>=Me||(we=a.yb,Za(a,y,me.background,!0,!1,re,te),x?y.fillRect(we.left,Te+we.top,te.width-(we.left+we.right),Me):y.fillRect(Te+we.left,we.top,Me,te.height-(we.top+we.bottom)))}}}}function aS(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 Ev(a){return a==="LineV"||a==="BarV"}Le.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},Le.kk=function(a,y,x){if(!Yt.prototype.kk.call(this,a,y,x))return!1;if(this.type===hi.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,bv(this,a),a.yd=null;else if(this.na===hi.Grid||this.na===hi.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},Le.nk=function(){return!0},Le.$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,z=0,te=0;te<y.length;te++)if(y[te].Ed()){var re=y[te].actualBounds;E=te===0?re.x:Math.min(re.x,E),z=te===0?re.y:Math.min(re.y,z)}b.setAttributeNS(null,"clip-path","path('M "+(a.x-x.x-E)+","+(a.y-x.y-z)+" l "+a.width+" 0 l 0 "+a.height+" l -"+a.width+" 0 z')")}else Yt.prototype.$o.call(this,a,y,x,b)},Le.Sj=function(a,y,x,b,E){var z=this.se(),te=this.transform,re=1/(te.m11*te.m22-te.m12*te.m21),oe=te.m22*re,le=-te.m12*re,ue=-te.m21*re,me=te.m11*re,we=re*(te.m21*te.dy-te.m22*te.dx),Me=re*(te.m12*te.dx-te.m11*te.dy);if(this.areaBackground!==null)return te=this.actualBounds,Jt.Ff(te.left,te.top,te.right,te.bottom,a,y,x,b,E);if(this.background!==null)return z=a*oe+y*ue+we,re=a*le+y*me+Me,a=x*oe+b*ue+we,oe=x*le+b*me+Me,E.h(0,0),x=this.naturalBounds,z=Jt.Ff(0,0,x.width,x.height,z,re,a,oe,E),E.transform(te),z;z||(oe=1,ue=le=0,me=1,Me=we=0),re=a*oe+y*ue+we,a=a*le+y*me+Me,oe=x*oe+b*ue+we,x=x*le+b*me+Me,E.h(oe,x),b=(oe-re)*(oe-re)+(x-a)*(x-a),le=!1,me=this.O.s,Me=me.length,ue=tt.alloc(),we=null,y=1/0;var Te=null,je=this.isClipping&&this.na===hi.Spot;je&&(Te=tt.alloc(),we=this.Pb(),(le=we.Sj(re,a,oe,x,Te))&&(y=(re-Te.x)*(re-Te.x)+(a-Te.y)*(a-Te.y)));for(var ct=0;ct<Me;ct++){var nt=me[ct];nt.visible&&nt!==we&&nt.Sj(re,a,oe,x,ue)&&(le=!0,nt=(re-ue.x)*(re-ue.x)+(a-ue.y)*(a-ue.y),nt<b&&(b=nt,E.set(ue)))}return je&&(y>b&&E.set(Te),tt.free(Te)),tt.free(ue),z&&E.transform(te),le},Le.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();Yt.prototype.Gj.call(this)},Le.v=function(a){if(!mt(this)){Yt.prototype.v.call(this,a),a=null,(this.na===hi.Auto||this.na===hi.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 z=Fl(E,!1);(E instanceof Hl||E instanceof hi||E instanceof ua||z!==ai)&&E.v(!0)}}}},Le.Uj=function(){if(!mt(this)){gt(this,!0),Kt(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},Le.Uk=function(){if(!(this.l&2048)){Ie(this,!0),$e(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},Le.Wu=function(){$e(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},Le.Wl=function(a,y,x,b){var E=this.jg;E.h(0,0,0,0);var z=this.desiredSize,te=this.minSize;x===void 0&&(x=te.width,b=te.height),x=Math.max(x,te.width),b=Math.max(b,te.height);var re=this.maxSize;isNaN(z.width)||(a=Math.min(z.width,re.width)),isNaN(z.height)||(y=Math.min(z.height,re.height)),a=Math.max(x,a),y=Math.max(b,y);var oe=this.yb;a=Math.max(a-oe.left-oe.right,0),y=Math.max(y-oe.top-oe.bottom,0);var le=this.O.s;le.length!==0&&this.na.measure(this,a,y,le,E,x,b),a=E.width+oe.left+oe.right,oe=E.height+oe.top+oe.bottom,isFinite(z.width)&&(a=z.width),isFinite(z.height)&&(oe=z.height),a=Math.min(re.width,a),oe=Math.min(re.height,oe),a=Math.max(te.width,a),oe=Math.max(te.height,oe),a=Math.max(x,a),oe=Math.max(b,oe),Ui(E,a,oe),Ui(this.naturalBounds,a,oe),this.Ge(0,0,a,oe)},Le.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 ph(a){return a.part!==null?a.part.locationObject:null}Le.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=Fl(this,!0);var z=this.measuredBounds;y=z.width,z=z.height;var te=this.Kg,re=te.left+te.right;switch(te=te.top+te.bottom,y===x&&z===b&&(a=ai),a){case ai:(y>x||z>b)&&(this.v(),this.measure(y>x?x:y,z>b?b:z,0,0));break;case ci:this.v(!0),this.measure(x+re,b+te,0,0);break;case lr:this.v(!0),this.measure(x+re,z+te,0,0);break;case Pr:this.v(!0),this.measure(y+re,b+te,0,0)}}this.na.arrange(this,E,this.jg)}},Le.gh=function(a){var y=this.naturalBounds,x=ph(this);if(xr(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var b=y.length,E=tt.allocAt(0,0);b--;){var z=y[b];if((z.visible||z===x)&&(qr(E.set(a),z.transform),z.ca(E)))return tt.free(E),!0}return tt.free(E),!(this.Ma===null&&this.areaBackground===null)}return!1},Le.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},Le.qm=function(a,y){if(y(this,a),a instanceof hi){a=a.O.s;for(var x=a.length,b=0;b<x;b++)this.qm(a[b],y)}};function Yf(a,y){sS(a,a,y)}function sS(a,y,x){x(y),y=y.O.s;for(var b=y.length,E=0;E<b;E++){var z=y[E];z instanceof hi&&sS(a,z,x)}}function vx(a,y){lS(a,a,y)}function lS(a,y,x){if(x(y),y instanceof hi){y=y.O.s;for(var b=y.length,E=0;E<b;E++)lS(a,y[E],x)}}Le.Nl=function(a){return uS(this,this,a)};function uS(a,y,x){if(x(y))return y;if(y instanceof hi){y=y.O.s;for(var b=y.length,E=0;E<b;E++){var z=uS(a,y[E],x);if(z!==null)return z}}return null}Le.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=Vp(this));for(var b=0;b<x;b++){var E=y[b];if(E instanceof hi){var z=E.fb(a);if(z!==null)return z}if(E.name===a)return E}return null};function cS(a){a=a.O.s;for(var y=a.length,x=0,b=0;b<y;b++){var E=a[b];E instanceof hi?x=Math.max(x,cS(E)):E instanceof io&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}Le.se=function(){return!(this.type===hi.TableRow||this.type===hi.TableColumn)};function zh(a){return a.type===hi.TableRow||a.type===hi.TableColumn}Le.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),Bt(this)))return null;var b=this.naturalBounds,E=1/this.Df(),z=this.se(),te=z?a:qr(tt.allocAt(a.x,a.y),this.transform),re=this.diagram,oe=10,le=5;if(re!==null&&(oe=re.Ql("extraTouchArea"),le=oe/2),xr(-(le*E),-(le*E),b.width+oe*E,b.height+oe*E,te.x,te.y)){if(!this.isAtomic){E=this.O.s;var ue=E.length;if(re=tt.alloc(),le=(oe=this.isClipping&&this.na===hi.Spot)?this.Pb():null,oe&&(le.se()?qr(re.set(a),le.transform):re.set(a),!le.ca(re)))return tt.free(re),z||tt.free(te),null;for(var me=ph(this);ue--;){var we=E[ue];if((we.visible||we===me)&&(we.se()?qr(re.set(a),we.transform):re.set(a),!oe||we!==le)){var Me=null;if(we instanceof hi?Me=we.ic(re,y,x):we.pickable===!0&&we.ca(re)&&(Me=we),Me!==null&&(y!==null&&(Me=y(Me)),Me!==null&&(x===null||x(Me))))return tt.free(re),z||tt.free(te),Me}}tt.free(re)}return this.background===null&&this.areaBackground===null?(z||tt.free(te),null):(a=xr(0,0,b.width,b.height,te.x,te.y)?this:null,z||tt.free(te),a)}return z||tt.free(te),null},Le.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,z=this.se(),te=z?a:qr(tt.allocAt(a.x,a.y),this.transform);if(E=xr(0,0,E.width,E.height,te.x,te.y),zh(this)||E){if(!this.isAtomic){for(var re=this.O.s,oe=re.length,le=tt.alloc(),ue=ph(this);oe--;){var me=re[oe];if(me.visible||me===ue){me.se()?qr(le.set(a),me.transform):le.set(a);var we=me;me=me instanceof hi?me:null,(me!==null?me.ji(le,y,x,b):we.ca(le))&&we.pickable!==!1&&(y!==null&&(we=y(we)),we===null||x!==null&&!x(we)||b.add(we))}}tt.free(le)}return z||tt.free(te),E&&(this.background!==null||this.areaBackground!==null)}return z||tt.free(te),!1},Le.Cf=function(a,y,x,b,E,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var te=z;if(z===void 0&&(te=ro.alloc(),te.reset()),te.multiply(this.transform),this.fh(a,te))return Mv(this,y,x,E),z===void 0&&ro.free(te),!0;if(this.Yc(a,te)){if(!this.isAtomic)for(var re=ph(this),oe=this.O.s,le=oe.length;le--;){var ue=oe[le];if(ue.visible||ue===re){var me=ue.actualBounds,we=this.naturalBounds;me.x>we.width||me.y>we.height||0>me.x+me.width||0>me.y+me.height||(me=ue,ue=ue instanceof hi?ue:null,we=ro.alloc(),we.set(te),(ue!==null?ue.Cf(a,y,x,b,E,we):ws(me,a,b,we))&&(y!==null&&(me=y(me)),me===null||x!==null&&!x(me)||E.add(me)),ro.free(we))}}return z===void 0&&ro.free(te),b}return z===void 0&&ro.free(te),!1};function Mv(a,y,x,b){for(var E=a.O.s,z=E.length;z--;){var te=E[z];if(te.visible){var re=te.actualBounds,oe=a.naturalBounds;re.x>oe.width||re.y>oe.height||0>re.x+re.width||0>re.y+re.height||(te instanceof hi&&Mv(te,y,x,b),y!==null&&(te=y(te)),te===null||x!==null&&!x(te)||b.add(te))}}}Le.og=function(a,y,x,b,E,z){if(this.pickable===!1)return!1;x===void 0&&(x=null),b===void 0&&(b=null);var te=this.naturalBounds,re=this.se(),oe=re?a:qr(tt.allocAt(a.x,a.y),this.transform),le=re?y:qr(tt.allocAt(y.x,y.y),this.transform),ue=oe.Bf(le),me=0<oe.x&&oe.x<te.width&&0<oe.y&&oe.y<te.height||zo(oe.x,oe.y,0,0,0,te.height)<=ue||zo(oe.x,oe.y,0,te.height,te.width,te.height)<=ue||zo(oe.x,oe.y,te.width,te.height,te.width,0)<=ue||zo(oe.x,oe.y,te.width,0,0,0)<=ue;if(te=oe.zd(0,0)<=ue&&oe.zd(0,te.height)<=ue&&oe.zd(te.width,0)<=ue&&oe.zd(te.width,te.height)<=ue,re||(tt.free(oe),tt.free(le)),me){if(!this.isAtomic){oe=tt.alloc(),le=tt.alloc(),ue=ph(this);for(var we=this.O.s,Me=we.length;Me--;){var Te=we[Me];if(Te.visible||Te===ue){var je=Te.actualBounds,ct=this.naturalBounds;(!re||!(je.x>ct.width||je.y>ct.height||0>je.x+je.width||0>je.y+je.height))&&(Te.se()?(je=Te.transform,qr(oe.set(a),je),qr(le.set(y),je)):(oe.set(a),le.set(y)),je=Te,Te=Te instanceof hi?Te:null,(Te!==null?Te.og(oe,le,x,b,E,z):je.tx(oe,le,E))&&(x!==null&&(je=x(je)),je===null||b!==null&&!b(je)||z.add(je)))}}tt.free(oe),tt.free(le)}return E?me:te}return!1};function Lv(a){var y=null;return a instanceof io&&(y=a.spot1,y===Vo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=Ba),y}function Nv(a){var y=null;return a instanceof io&&(y=a.spot2,y===Vo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=vl),y}Le.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},Le.M=function(a){return this.O.M(a)},Le.Gb=function(a,y){y instanceof pr&&St("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&St("Cannot make a Panel contain itself: "+this.toString()),St("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&St("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!==hi.Grid||y instanceof io||St("Can only add Shapes to a Grid Panel, not: "+y),this.na!==hi.Graduated||y instanceof io||y instanceof ua||St("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 Ii),this.ge.add(b,y))}var E=this.O;if(b=-1,x===this){for(var z=-1,te=this.O.s,re=te.length,oe=0;oe<re;oe++)if(te[oe]===y){z=oe;break}if(z!==-1){if(z===a||z+1>=E.count&&a>=E.count)return;E.mb(z),b=z}else St("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),mt(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof hi&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||Jm(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof Di&&(x.Te=!0),x.Te&&x instanceof Di&&(x.wc=null),E=this.diagram,E!==null&&E.undoManager.isUndoingRedoing||(b!==-1&&x.cb(cs,"elements",this,y,null,b,null),x.cb(Va,"elements",this,null,y,null,a)))};function Fv(a,y){a.l=y?a.l|16777216:a.l&-16777217}Le.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)},Le.mb=function(a){0<=a&&this.pc(a,!0)},Le.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),gt(this,!1),this.v(),this.$g===b&&(this.$g=null),this.graduatedIntervals=null;var z=this.part;z!==null&&(z.Rh=null,z.ag=NaN,z.Wb(),z instanceof Di&&(b instanceof hi?b.qm(b,function(te,re){Qv(z,re,y)}):Qv(z,b,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||z.cb(cs,"elements",this,b,null,a,null))},Le.Fb=function(a){0>a&&qn(a,">= 0",hi,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Cs;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(Va,"rowdefs",this,null,x,null,a)}return y[a]},Le.oA=function(a){if(0>a&&qn(a,">= 0",hi,"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(cs,"rowdefs",this,x,null,a,null),this.v()}}};function dS(a,y,x){var b=a.rowDefs;if(!(0>y)){if(b[y]=x instanceof Cs?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}Le.Eb=function(a){0>a&&qn(a,">= 0",hi,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Cs;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(Va,"coldefs",this,null,x,null,a)}return y[a]},Le.jA=function(a){if(0>a&&qn(a,">= 0",hi,"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(cs,"coldefs",this,x,null,a,null),this.v()}}};function hS(a,y,x){var b=a.colDefs;if(!(0>y)){if(b[y]=x instanceof Cs?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}Le.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&Qm(y,a),this},Le.Hy=function(a,y){return(a=this.Fb(a))&&Qm(a,new Cs(y)),this},Le.By=function(a,y){return(a=this.Eb(a))&&Qm(a,new Cs(y)),this},Le.nz=function(a){if(0>a||this.type!==hi.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,b=x.length,E=this.topIndex;E<b;E++){var z=x[E];if(z!==void 0&&(y+=z.total,a<y))break}return E},Le.fz=function(a){if(0>a||this.type!==hi.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,b=x.length,E=this.leftIndex;E<b;E++){var z=x[E];if(z!==void 0&&(y+=z.total,a<y))break}return E},Le.Fz=function(a,y){if(y===void 0&&(y=new tt(NaN,NaN)),this.type!==hi.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)},Le.Gz=function(a){if(this.type!==hi.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function fS(a){return a=a.allBindings,a!==null&&a._isFrozen}function hc(a){var y=a.allBindings;if(y===null)a.data!==null&&St("Template cannot have .data be non-null: "+a),a.allBindings=y=new kn;else if(y._isFrozen)return;var x=new kn;Fv(a,!1),a.qm(a,function(le,ue){ue.th();var me=ue.localBindings;if(me!==null)for(Ce(ue,!1),me=me.iterator;me.next();){var we=me.value;we.mode===gm&&Ce(ue,!0);var Me=we.sourceName;Me!==null&&(Me==="/"&&Fv(le,!0),Me=L1(we,le,ue),Me!==null&&(x.add(Me),Me.srcBindings===null&&(Me.srcBindings=new kn),Me.srcBindings.add(we))),y.add(we)}if(ue instanceof hi&&ue.type===hi.Table){if(0<ue.rowCount){for(le=ue.rowDefs,me=le.length,we=0;we<me;we++)if(Me=le[we],Me!==void 0&&Me.be!==null)for(var Te=Me.be.iterator;Te.next();){var je=Te.value;je.xd=Me,je.to=2,je.wl=Me.index,y.add(je)}}if(0<ue.columnCount){for(ue=ue.colDefs,le=ue.length,me=0;me<le;me++)if(we=ue[me],we!==void 0&&we.be!==null)for(Me=we.be.iterator;Me.next();)Te=Me.value,Te.xd=we,Te.to=1,Te.wl=we.index,y.add(Te)}}});for(var b=x.iterator;b.next();){var E=b.value;if(E.srcBindings!==null){Ce(E,!0);for(var z=E.srcBindings.iterator;z.next();){var te=z.value;E.localBindings===null&&(E.localBindings=new kn),E.localBindings.add(te)}}E.srcBindings=null}for(b=y.iterator;b.next();)if(E=b.value,z=E.xd,z!==null){E.xd=null;var re=E.targetProperty,oe=re.indexOf(".");0<oe&&z instanceof hi&&(te=re.substring(0,oe),re=re.substr(oe+1),oe=z.fb(te),oe!==null?(z=oe,E.targetProperty=re):Si('Warning: unable to find GraphObject named "'+te+'" for Binding: '+E.toString())),z instanceof Cs?(te=br(z.panel),E.Ai=te===void 0?-1:te,z.panel.bindingId=E.Ai):z instanceof Yt?(te=br(z),E.Ai=te===void 0?-1:te,z.bindingId=E.Ai):St("Unknown type of binding target: "+z)}y.freeze(),a instanceof pr&&a.Zc()&&a.Va()}Le.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return vx(y,function(x){x instanceof hi&&(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&&hc(y),y},Le.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 z=this,te=x.Ai;if(te!==-1){if(z=this.ks(te),z===null)continue}else x.xd!==null&&(z=x.xd);if(E==="/"?b=z.part:E==="."?b=z:E===".."&&(b=z.panel),E=x.to,E!==0){if(!(z instanceof hi))continue;E===1?z=z.Eb(x.wl):E===2&&(z=z.Fb(x.wl))}z!==void 0&&x.Mv(z,b)}}},Le.sx=function(a){return a==null||this.ge===null?null:this.ge.I(a)};function yx(a,y){a=a.O.s;for(var x=a.length,b=y.length,E=0,z=null;E<x&&(z=a[E],!(z instanceof hi&&z.data!==null));)E++,z=a[E];if(x-E!==b)return!0;if(z===null)return 0<b;for(var te=0;E<x&&te<b;){if(z=a[E],!(z instanceof hi)||z.data!==y[te])return!0;E++,te++}return!1}function Vp(a){if(a.type===hi.Spot||a.type===hi.Auto)return Math.min(a.O.length,1);if(a.type===hi.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var b=a.M(x);if(!(b instanceof io&&b.isPanelMain))break}return x}return a.type===hi.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof hi&&zh(a))?1:0}Le.mv=function(){for(var a=Vp(this);this.O.length>a;)this.pc(this.O.length-1,!1);gS(this,this.itemArray)};function gS(a,y){var x=Vp(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++)Ym(a,y[b],b,!0)}else{b=x;for(var E=0;E<y.length;E++,b++){var z=y[E],te=b<a.O.length?a.O.M(b):null;if(te instanceof hi){if(te.data!==z){var re=Dv(a,te.data),oe=Dv(a,z),le=oe!==re;le||(re=Bv(a,re),le=Bv(a,oe)!==re),le?(a.pc(b,!1),Ym(a,z,E,!1)):te.data=z}}else Ym(a,z,E,!1)}for(;b<a.O.length;)a.pc(b,!1);a.$g=null,Av(a,x,0),mt(a)||a.v(),a.graduatedIntervals=null,a.If()||Jm(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof Di&&(y.Te=!0),y.Te&&y instanceof Di&&(y.wc=null))}}function Ym(a,y,x,b){if(!(y==null||0>x)){var E=Dv(a,y);if(E=Bv(a,E),E!==null){if(hc(E),E=E.copy(),E.l&16777216){var z=a.ih();z!==null&&Fv(z,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new Ii),a.ge.add(y,E)),z=x+Vp(a),a.Gb(z,E),b&&(E.ub=y,Av(a,z,x),E.ub=null),E.data=y}}}function Av(a,y,x){for(a=a.O;y<a.length;){var b=a.M(y);if(b instanceof hi){var E=y,z=x;b.type===hi.TableRow?b.row=E:b.type===hi.TableColumn&&(b.column=E),b.itemIndex=z}y++,x++}}function Dv(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=us(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;St("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function Bv(a,y){var x=a.itemTemplateMap,b=null;return x!==null&&(b=x.I(y)),b===null&&(x!==null&&(b=x.I("")),b===null&&(pS||(pS=!0,Si('No item template Panel found for category "'+y+'" on '+a),Si(" Using default item template."),a=new hi,y=new ua,y.bind(new fs("text","",Qn)),a.add(y),mS=a),b=mS)),b}function Jm(a,y,x){var b=y.enabledChanged;if(b!==null&&b(y,x),y instanceof hi){y=y.O.s,b=y.length;for(var E=0;E<b;E++){var z=y[E];x&&z instanceof hi&&!z.isEnabled||Jm(a,z,x)}}}function gd(a,y){y.name=a,Mc.add(a,y)}Je.Object.defineProperties(hi.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===hi.Grid,this.v(),this.g("type",y,a))}},elements:{get:function(){return this.O.iterator}},naturalBounds:{get:function(){return this.dc}},padding:{get:function(){return this.yb},set:function(a){typeof a=="number"?(0>a&&qn(a,">= 0",hi,"padding"),a=new Oi(a)):(0>a.left&&qn(a.left,">= 0",hi,"padding:value.left"),0>a.right&&qn(a.right,">= 0",hi,"padding:value.right"),0>a.top&&qn(a.top,">= 0",hi,"padding:value.top"),0>a.bottom&&qn(a.bottom,">= 0",hi,"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:Ls},set:function(a){typeof a=="number"&&(a=new Oi(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new qu),this.T.Qp=a,this.v(),this.g("defaultSeparatorPadding",y,a))}},defaultRowSeparatorStroke:{get:function(){return this.T!==null?this.T.ia:null},set:function(a){var y=this.defaultRowSeparatorStroke;y!==a&&(a===null||typeof a=="string"||a instanceof Oo)&&(a instanceof Oo&&a.freeze(),this.T===null&&(this.T=new qu),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 qu),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 z=a[E];typeof z=="number"&&0<=z&&isFinite(z)||St("defaultRowSeparatorDashArray value "+z+" at index "+E+" must be a positive number or zero."),b+=z}if(b===0){if(y===null)return;a=null}}this.T===null&&(this.T=new qu),this.T.V=a,this.N(),this.g("defaultRowSeparatorDashArray",y,a)}}},defaultColumnSeparatorStroke:{get:function(){return this.T!==null?this.T.u:null},set:function(a){var y=this.defaultColumnSeparatorStroke;y!==a&&(a===null||typeof a=="string"||a instanceof Oo)&&(a instanceof Oo&&a.freeze(),this.T===null&&(this.T=new qu),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 qu),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 z=a[E];typeof z=="number"&&0<=z&&isFinite(z)||St("defaultColumnSeparatorDashArray value "+z+" at index "+E+" must be a positive number or zero."),b+=z}if(b===0){if(y===null)return;a=null}}this.T===null&&(this.T=new qu),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 qu),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||St("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&bc(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()||St("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&bc(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 mh),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),xe(this)&&(a=this.part,a!==null&&ha(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 mh),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),xe(this)&&(a=this.part,a!==null&&ha(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 mh),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 mh),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 mh,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 mh,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 mh,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 mh,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 qu),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new qu),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:e0},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new qu),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:e0},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new qu),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)&&St("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new qu),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)&&St("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new qu),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 pr&&!(this instanceof jo);hc(this),this.ub=a;var b=this.diagram;b!==null&&(x?(x=b.partManager,this instanceof vi?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof pr&&(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 Ar),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&yx(this,a)){var x=this.diagram;y!==a&&(x!==null&&y!==null&&yy(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&vy(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||gS(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 Ii}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof pr||a.isPanelMain)&&St("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(););so(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&&(so(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 Yr&&(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&&Jm(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))}}}),Je.Object.defineProperties(hi,{Position:{get:function(){return Mc.I("Position")}},Horizontal:{get:function(){return Mc.I("Horizontal")}},Vertical:{get:function(){return Mc.I("Vertical")}},Spot:{get:function(){return Mc.I("Spot")}},Auto:{get:function(){return Mc.I("Auto")}},Table:{get:function(){return Mc.I("Table")}},Viewbox:{get:function(){return Mc.I("Viewbox")}},TableRow:{get:function(){return Mc.I("TableRow")}},TableColumn:{get:function(){return Mc.I("TableColumn")}},Link:{get:function(){return Mc.I("Link")}},Grid:{get:function(){return Mc.I("Grid")}},Graduated:{get:function(){return Mc.I("Graduated")}}}),hi.prototype.rebuildItemElements=hi.prototype.mv,hi.prototype.findItemPanelForData=hi.prototype.sx,hi.prototype.updateTargetBindings=hi.prototype.La,hi.prototype.copyTemplate=hi.prototype.Uy,hi.prototype.graduatedValueForPoint=hi.prototype.Gz,hi.prototype.graduatedPointForValue=hi.prototype.Fz,hi.prototype.findColumnForLocalX=hi.prototype.fz,hi.prototype.findRowForLocalY=hi.prototype.nz,hi.prototype.addColumnDefinition=hi.prototype.By,hi.prototype.addRowDefinition=hi.prototype.Hy,hi.prototype.addRowColumnDefinition=hi.prototype.Gy,hi.prototype.removeColumnDefinition=hi.prototype.jA,hi.prototype.getColumnDefinition=hi.prototype.Eb,hi.prototype.removeRowDefinition=hi.prototype.oA,hi.prototype.getRowDefinition=hi.prototype.Fb,hi.prototype.removeAt=hi.prototype.mb,hi.prototype.remove=hi.prototype.remove,hi.prototype.insertAt=hi.prototype.Gb,hi.prototype.elt=hi.prototype.M,hi.prototype.add=hi.prototype.add,hi.prototype.findObject=hi.prototype.fb,hi.prototype.findInVisualTree=hi.prototype.Nl,hi.prototype.walkVisualTreeFrom=hi.prototype.qm,hi.prototype.findMainElement=hi.prototype.Pb;var pS=!1,mS=null,Mc=new Ii;hi.className="Panel",hi.definePanelLayout=gd,gd("Position",new jm),gd("Vertical",new Hm),gd("Auto",new Wm),gd("Link",new _m);function mh(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}mh.prototype.copy=function(){var a=new mh;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},mh.className="GradPanelSettings";function qu(){this.Pc=[],this.Oc=[],this.j=this.ob=e0,this.hb=this.Hb=0,this.Qp=Ls,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}qu.prototype.copy=function(a){for(var y=new qu,x=this.Pc,b=x.length,E=y.Pc,z=0;z<b;z++)if(x[z]!==void 0){var te=x[z].copy();te.wi(a),E[z]=te}for(x=this.Oc,b=x.length,E=y.Oc,z=0;z<b;z++)x[z]!==void 0&&(te=x[z].copy(),te.wi(a),E[z]=te);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},qu.className="TablePanelSettings";function Cs(a){Or(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=Vo,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Tv,this.hg=Vr,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))}Cs.prototype.copy=function(){var a=new Cs;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=At(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function Qm(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=At(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}Le=Cs.prototype,Le.qb=function(a){a.classType===Cs&&(this.sizing=a)},Le.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+br(this)},Le.wi=function(a){this.Me=a},Le.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)},Le.Wc=function(){var a=0,y=this.Me,x=0,b=this.isRow;if(y!==null&&y.type===hi.Table)for(var E=b?y.rowDefs.length:y.colDefs.length,z=0;z<E;z++){var te=b?y.rowDefs[z]:y.colDefs[z];if(te!==void 0&&te.oa!==0){x=te.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)},Le.Ob=function(a,y,x){var b=this.Me;if(b!==null&&(b.cb(wa,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 qm(a){if(a.sizing===Tv){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}Le.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new fs(a,y,x,b):E=a,E.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&fS(y)&&St("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+E+" on "+a)),this.be===null&&(this.be=new kn),this.be.add(E),this},Je.Object.defineProperties(Cs.prototype,{panel:{get:function(){return this.Me}},isRow:{get:function(){return this.uq},set:function(a){this.uq=a}},index:{get:function(){return this.Za},set:function(a){this.Za=a}},height:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&qn(a,">= 0",Cs,"height"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("height",y,a))}},width:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&qn(a,">= 0",Cs,"width"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("width",y,a))}},minimum:{get:function(){return this.jj},set:function(a){var y=this.jj;y!==a&&((0>a||!isFinite(a))&&qn(a,">= 0",Cs,"minimum"),this.jj=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("minimum",y,a))}},maximum:{get:function(){return this.hj},set:function(a){var y=this.hj;y!==a&&(0>a&&qn(a,">= 0",Cs,"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 Oi(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&&ff(a,"RowColumnDefinition.separatorStroke"),a instanceof Oo&&a.freeze(),this.lo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStroke",y,a))}},separatorStrokeWidth:{get:function(){return this.mo},set:function(a){var y=this.mo;y!==a&&(this.mo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStrokeWidth",y,a))}},separatorDashArray:{get:function(){return this.tj},set:function(a){var y=this.tj;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;E<x;E++){var z=a[E];typeof z=="number"&&0<=z&&isFinite(z)||St("separatorDashArray value "+z+" at index "+E+" must be a positive number or zero."),b+=z}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&&ff(a,"RowColumnDefinition.background"),a instanceof Oo&&a.freeze(),this.Ma=a,this.panel!==null&&this.panel.N(),this.Ob("background",y,a))}},coversSeparators:{get:function(){return this.Pm},set:function(a){var y=this.Pm;y!==a&&(this.Pm=a,this.panel!==null&&this.panel.N(),this.Ob("coversSeparators",y,a))}},sizing:{get:function(){return this.oo},set:function(a){var y=this.oo;y!==a&&(this.oo=a,this.panel!==null&&this.panel.v(),this.Ob("sizing",y,a))}},actual:{get:function(){return this.oa},set:function(a){this.oa=isNaN(this.Hc)?Math.max(Math.min(this.hj,a),this.jj):Math.max(Math.min(this.hj,this.Hc),this.jj)}},measured:{get:function(){return this.oc},set:function(a){this.oc=a}},total:{get:function(){return this.oa+this.Wc()}},position:{get:function(){return this.pa},set:function(a){this.pa=a}}}),Cs.prototype.computeEffectiveSpacing=Cs.prototype.Wc,Cs.prototype.computeEffectiveSpacingTop=Cs.prototype.Io;var Tv=new ln(Cs,"Default",0),Up=new ln(Cs,"None",1),e0=new ln(Cs,"ProportionalExtra",2);Cs.className="RowColumnDefinition",Cs.Default=Tv,Cs.None=Up,Cs.ProportionalExtra=e0;function io(a,y){Yt.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)}$t(io,Yt),io.prototype.cloneProtected=function(a){Yt.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=At(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 Jf(a){a.Na===null?a.Na=new Ov:a.Na.nc&&(a.Na=a.Na.copy())}Le=io.prototype,Le.th=function(){Yt.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},Le.qb=function(a){a===ai||a===tr||a===yo||a===Vr?this.geometryStretch=a:Yt.prototype.qb.call(this,a)},Le.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+br(this)};function cp(a,y,x,b){var E=x.length;if(!(4>E)){var z=b.measuredBounds,te=Math.max(1,z.width);z=z.height;for(var re=x[0],oe=x[1],le,ue,me,we,Me,Te,je=0,ct=mn(),nt=2;nt<E;nt+=2)le=x[nt],ue=x[nt+1],me=le-re,re=ue-oe,me===0&&(me=.001),we=re/me,Me=Math.atan2(re,me),Te=Math.sqrt(me*me+re*re),ct.push([me,Me,we,Te]),je+=Te,re=le,oe=ue;re=x[0],oe=x[1],me=b.measuredBounds.width,b instanceof io&&(me-=b.strokeWidth),1>me&&(me=1),E=x=me,le=te/2,ue=le!==0,nt=0,Te=ct[nt],me=Te[0],Me=Te[1],we=Te[2],Te=Te[3];for(var bt=0;.1<=je;){if(bt===0&&(ue?(E=x,E-=le,je-=le,ue=!1):E=x,E===0&&(E=1)),E>je){Wn(ct);return}E>Te?(bt=E-Te,E=Te):bt=0;var Nt=Math.sqrt(E*E/(1+we*we));if(0>me&&(Nt=-Nt),re+=Nt,oe+=we*Nt,a.translate(re,oe),a.rotate(Me),a.translate(-(te/2),-(z/2)),bt===0&&b.hh(a,y),a.translate(te/2,z/2),a.rotate(-Me),a.translate(-re,-oe),je-=E,Te-=E,bt!==0){if(nt++,nt===ct.length){Wn(ct);return}Te=ct[nt],me=Te[0],Me=Te[1],we=Te[2],Te=Te[3],E=bt}}Wn(ct)}}Le.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 z=this.actualBounds,te=this.naturalBounds;b!==null&&Za(this,a,b,!0,!1,te,z);var re=this.part,oe=this.ig;if(x===null||oe!==0||re===null||!this.isPanelMain&&re.Pb()!==this||(oe=re.type===hi.Link&&re instanceof jo&&re.category==="Selection"&&re.adornedObject instanceof io&&re.adornedPart.Pb()===re.adornedObject?re.adornedObject.strokeWidth:0),oe===0&&(x=null),x!==null&&oe!==0&&(Za(this,a,x,!1,!1,te,z),a.lineWidth=oe,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),z=!1,re&&y.Gf("drawShadows")&&(z=re.isShadowed),a.Il===!1&&(z=!1),re=!0,x===null||b!==null&&b!=="transparent"||(re=!1),te=!1,oe=this.strokeDashArray,oe!==null&&(te=!0,a.js(oe,this.strokeDashOffset)),E.type===xi.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===xi.u){var le=E.startX;oe=E.startY;var ue=E.endX,me=E.endY;E=Math.min(le,ue);var we=Math.min(oe,me);le=Math.abs(ue-le),oe=Math.abs(me-oe),a.beginPath(),a.rect(E,we,le,oe),b!==null&&a.ng(b),x!==null&&(re&&z&&Al(a),a.jk(),re&&z&&Xs(a)),a.Se()}else if(E.type===xi.F)le=E.startX,oe=E.startY,ue=E.endX,me=E.endY,E=Math.abs(ue-le)/2,we=Math.abs(me-oe)/2,le=Math.min(le,ue)+E,oe=Math.min(oe,me)+we,a.beginPath(),a.moveTo(le,oe-we),a.bezierCurveTo(le+Jt.wg*E,oe-we,le+E,oe-Jt.wg*we,le+E,oe),a.bezierCurveTo(le+E,oe+Jt.wg*we,le+Jt.wg*E,oe+we,le,oe+we),a.bezierCurveTo(le-Jt.wg*E,oe+we,le-E,oe+Jt.wg*we,le-E,oe),a.bezierCurveTo(le-E,oe-Jt.wg*we,le-Jt.wg*E,oe-we,le,oe-we),a.closePath(),b!==null&&a.ng(b),x!==null&&(re&&z&&Al(a),a.jk(),re&&z&&Xs(a)),a.Se();else if(E.type===xi.o)for(E=E.figures,oe=E.length,we=0;we<oe;we++){le=E.s[we],a.beginPath(),a.moveTo(le.startX,le.startY),ue=le.segments.s,me=ue.length;for(var Me=null,Te=0;Te<me;Te++){var je=ue[Te];switch(je.type){case _a:a.moveTo(je.endX,je.endY);break;case ra:a.lineTo(je.endX,je.endY);break;case Hs:a.bezierCurveTo(je.point1X,je.point1Y,je.point2X,je.point2Y,je.endX,je.endY);break;case Xl:a.quadraticCurveTo(je.point1X,je.point1Y,je.endX,je.endY);break;case Ja:if(je.radiusX===je.radiusY){var ct=Math.PI/180;a.arc(je.point1X,je.point1Y,je.radiusX,je.startAngle*ct,(je.startAngle+je.sweepAngle)*ct,0>je.sweepAngle,Me!==null?Me.endX:le.startX,Me!==null?Me.endY:le.startY)}else if(Me=yl(je,le),ct=Me.length,ct===0)a.lineTo(je.centerX,je.centerY);else for(var nt=0;nt<ct;nt++){var bt=Me[nt];nt===0&&a.lineTo(bt[0],bt[1]),a.bezierCurveTo(bt[2],bt[3],bt[4],bt[5],bt[6],bt[7])}break;case du:if(nt=ct=0,Me!==null&&Me.type===Ja){if(Me=yl(Me,le),bt=Me.length,bt===0){a.lineTo(je.endX,je.endY);break}Me=Me[bt-1]||null,Me!==null&&(ct=Me[6],nt=Me[7])}else ct=Me!==null?Me.endX:le.startX,nt=Me!==null?Me.endY:le.startY;if(Me=ul(je,le,ct,nt),ct=Me.length,ct===0){a.lineTo(je.endX,je.endY);break}for(nt=0;nt<ct;nt++)bt=Me[nt],a.bezierCurveTo(bt[2],bt[3],bt[4],bt[5],bt[6],bt[7]);break;default:St("Segment not of valid type: "+je.type)}je.isClosed&&a.closePath(),Me=je}ue=le.isFilled,z?le.isShadowed?(ue===!0&&b!=="transparent"&&b!==null&&a.ng(b,le.isEvenOdd),x!==null&&(ue&&re&&Al(a),a.jk(),ue&&re&&Xs(a))):(Al(a),ue&&b!=="transparent"&&b!==null&&a.ng(b,le.isEvenOdd),x!==null&&a.jk(),Xs(a)):(ue&&b!==null&&a.ng(b,le.isEvenOdd),x!==null&&a.jk()),a.Se(we)}if(te&&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),z=this.geometry,a.save(),a.beginPath(),b=mn(),z.type===xi.j)b.push(z.startX),b.push(z.startY),b.push(z.endX),b.push(z.endY),cp(a,y,b,x);else if(z.type===xi.o)for(z=z.figures.iterator;z.next();){for(re=z.value,b.length=0,b.push(re.startX),b.push(re.startY),te=re.startX,E=re.startY,oe=te,we=E,le=re.segments.s,ue=le.length,me=0;me<ue;me++){switch(Te=le[me],Te.type){case _a:cp(a,y,b,x),b.length=0,b.push(Te.endX),b.push(Te.endY),te=Te.endX,E=Te.endY,oe=te,we=E;break;case ra:b.push(Te.endX),b.push(Te.endY),te=Te.endX,E=Te.endY;break;case Hs:Jt.Qe(te,E,Te.point1X,Te.point1Y,Te.point2X,Te.point2Y,Te.endX,Te.endY,.5,b),te=Te.endX,E=Te.endY;break;case Xl:Jt.ep(te,E,Te.point1X,Te.point1Y,Te.endX,Te.endY,.5,b),te=Te.endX,E=Te.endY;break;case Ja:if(je=yl(Te,re),Me=je.length,Me===0){b.push(Te.centerX),b.push(Te.centerY),te=Te.centerX,E=Te.centerY;break}for(ct=0;ct<Me;ct++)nt=je[ct],Jt.Qe(te,E,nt[2],nt[3],nt[4],nt[5],nt[6],nt[7],.5,b),te=nt[6],E=nt[7];break;case du:if(je=ul(Te,re,te,E),Me=je.length,Me===0){b.push(Te.endX),b.push(Te.endY),te=Te.endX,E=Te.endY;break}for(ct=0;ct<Me;ct++)nt=je[ct],Jt.Qe(te,E,nt[2],nt[3],nt[4],nt[5],nt[6],nt[7],.5,b),te=nt[6],E=nt[7];break;default:St("Segment not of valid type: "+Te.type)}Te.isClosed&&(b.push(oe),b.push(we),cp(a,y,b,x))}cp(a,y,b,x)}else if(z.type===xi.u)b.push(z.startX),b.push(z.startY),b.push(z.endX),b.push(z.startY),b.push(z.endX),b.push(z.endY),b.push(z.startX),b.push(z.endY),b.push(z.startX),b.push(z.startY),cp(a,y,b,x);else if(z.type===xi.F){if(E=new ys,E.startX=z.endX,E.startY=(z.startY+z.endY)/2,te=new To(Ja),te.startAngle=0,te.sweepAngle=360,te.centerX=(z.startX+z.endX)/2,te.centerY=(z.startY+z.endY)/2,te.radiusX=Math.abs(z.startX-z.endX)/2,te.radiusY=Math.abs(z.startY-z.endY)/2,E.add(te),z=yl(te,E),re=z.length,re===0)b.push(te.centerX),b.push(te.centerY);else for(te=E.startX,E=E.startY,oe=0;oe<re;oe++)we=z[oe],Jt.Qe(te,E,we[2],we[3],we[4],we[5],we[6],we[7],.5,b),te=we[6],E=we[7];cp(a,y,b,x)}Wn(b),a.restore(),a.Vc(!1)}}}},Le.kk=function(a,y,x){return!Yt.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)},Le.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:Yt.prototype.nk.call(this,a)},Le.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)}},Le.ga=function(a,y){if(y===void 0&&(y=new tt),a instanceof Vi){a.Mc()&&St("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},Le.mi=function(a){a===void 0&&(a=new Ut);var y=this.naturalBounds,x=this.oe;y=Ut.allocAt(y.x,y.y,y.width,y.height);var b=this.strokeWidth;return y.Bc(b/2,b/2),b=tt.allocAt(y.x,y.y).transform(x),a.h(b.x,b.y,0,0),b.h(y.right,y.y).transform(x),cr(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),cr(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),cr(a,b.x,b.y,0,0),Ut.free(y),tt.free(b),a},Le.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!==xi.j||y||(E+=2);var z=Ut.alloc();if(z.assign(b),z.Bc(E+2,E+2),!z.ca(a))return Ut.free(z),!1;if(b=E+1e-4,x.type===xi.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:(Ut.free(z),Jt.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===xi.u){y=x.startX;var te=x.startY,re=x.endX;if(x=x.endY,z.x=Math.min(y,re),z.y=Math.min(te,x),z.width=Math.abs(re-y),z.height=Math.abs(x-te),this.fill===null){if(z.Bc(-b,-b),z.ca(a))return Ut.free(z),!1;z.Bc(b,b)}return this.stroke!==null&&z.Bc(E,E),a=z.ca(a),Ut.free(z),a}if(x.type===xi.F){te=x.startX,E=x.startY,re=x.endX;var oe=x.endY;if(x=Math.min(te,re),y=Math.min(E,oe),te=Math.abs(re-te)/2,E=Math.abs(oe-E)/2,x=a.x-(x+te),y=a.y-(y+E),this.fill===null){if(te-=b,E-=b,0>=te||0>=E||1>=x*x/(te*te)+y*y/(E*E))return Ut.free(z),!1;te+=b,E+=b}return this.stroke!==null&&(te+=b,E+=b),Ut.free(z),0>=te||0>=E?!1:1>=x*x/(te*te)+y*y/(E*E)}if(x.type===xi.o)return Ut.free(z),this.fill===null?Mu(x,a.x,a.y,E):ac(x,a,E,1<this.strokeWidth,y);St("Unknown Geometry type: "+x.type)},Le.Wl=function(a,y,x,b){var E=this.desiredSize,z=this.ig;if(a=Math.max(a,0),y=Math.max(y,0),this.Rd!==null)var te=this.geometry.bounds;else{var re=this.figure,oe=Iv[re];if(oe===void 0){var le=Jt.Ze[re];typeof le=="string"&&(le=Jt.Ze[le]),typeof le=="function"?(oe=le(null,100,100),Iv[re]=oe):St("Unsupported Figure: "+re)}te=oe.bounds}re=te.width,oe=te.height,le=te.width;var ue=te.height;switch(Fl(this,!0)){case ai:b=x=0;break;case ci:le=Math.max(a-z,0),ue=Math.max(y-z,0);break;case lr:le=Math.max(a-z,0),b=0;break;case Pr:x=0,ue=Math.max(y-z,0)}isFinite(E.width)&&(le=E.width),isFinite(E.height)&&(ue=E.height);var me=this.maxSize,we=this.minSize;switch(x=Math.max(x-z,we.width),b=Math.max(b-z,we.height),le=Math.min(me.width,le),ue=Math.min(me.height,ue),le=isFinite(le)?Math.max(x,le):Math.max(re,x),ue=isFinite(ue)?Math.max(b,ue):Math.max(oe,b),x=kv(this),x){case ai:break;case ci:re=le,oe=ue;break;case tr:x=Math.min(le/re,ue/oe),isFinite(x)||(x=1),re*=x,oe*=x;break;default:St(x+" is not a valid geometryStretch.")}this.Rd!==null?(re===0&&(re=.001),oe===0&&(oe=.001),x=this.Rd!==null?this.Rd:this.ua,te=x.bounds,b=re/te.width,te=oe/te.height,isFinite(b)||(b=1),isFinite(te)||(te=1),this.ua=b===1&&te===1?x:x.copy().scale(b,te)):this.ua!==null&&Jt.$(this.ua.Sk,a-z)&&Jt.$(this.ua.Rk,y-z)||(this.ua=io.makeGeometry(this,re,oe)),te=this.ua.bounds,a===1/0||y===1/0?this.Ge(te.x-z/2,te.y-z/2,a===0&&re===0?0:te.width+z,y===0&&oe===0?0:te.height+z):this.Ge(-(z/2),-(z/2),le+z,ue+z),E.w()?(le=E.width,ue=E.height,le=Math.min(me.width,le),ue=Math.min(me.height,ue),le=Math.max(we.width,le),ue=Math.max(we.height,ue),this.dc.h(0,0,le,ue)):this.dc.assign(te)};function kv(a){var y=a.geometryStretch;return a.Rd!==null?y===Vr?ci:y:y===Vr?Iv[a.figure].defaultStretch:y}Le.eh=function(a,y,x,b){Pl(this,a,y,x,b)},Le.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Le.Sj=function(a,y,x,b,E){var z=this.transform,te=1/(z.m11*z.m22-z.m12*z.m21),re=z.m22*te,oe=-z.m12*te,le=-z.m21*te,ue=z.m11*te,me=te*(z.m21*z.dy-z.m22*z.dx),we=te*(z.m12*z.dx-z.m11*z.dy);z=a*re+y*le+me,te=a*oe+y*ue+we,re=x*re+b*le+me,oe=x*oe+b*ue+we,me=this.ig/2,le=this.ua,le===null&&(this.measure(1/0,1/0),le=this.ua);var Me=le.bounds;if(ue=!1,le.type===xi.j)if(1.5>=this.strokeWidth)ue=Jt.Ve(le.startX,le.startY,le.endX,le.endY,z,te,re,oe,E);else{if(le.startX===le.endX?(b=me,ue=0):(y=(le.endY-le.startY)/(le.endX-le.startX),ue=me/Math.sqrt(1+y*y),b=ue*y),y=mn(),a=new tt,Jt.Ve(le.startX+b,le.startY+ue,le.endX+b,le.endY+ue,z,te,re,oe,a)&&y.push(a),a=new tt,Jt.Ve(le.startX-b,le.startY-ue,le.endX-b,le.endY-ue,z,te,re,oe,a)&&y.push(a),a=new tt,Jt.Ve(le.startX+b,le.startY+ue,le.startX-b,le.startY-ue,z,te,re,oe,a)&&y.push(a),a=new tt,Jt.Ve(le.endX+b,le.endY+ue,le.endX-b,le.endY-ue,z,te,re,oe,a)&&y.push(a),re=y.length,re===0)return Wn(y),!1;for(ue=!0,oe=1/0,b=0;b<re;b++)a=y[b],x=(a.x-z)*(a.x-z)+(a.y-te)*(a.y-te),x<oe&&(oe=x,E.x=a.x,E.y=a.y);Wn(y)}else if(le.type===xi.u)ue=Jt.Ff(Me.x-me,Me.y-me,Me.x+Me.width+me,Me.y+Me.height+me,z,te,re,oe,E);else if(le.type===xi.F){y=Ut.allocAt(Me.x,Me.y,Me.width,Me.height).Bc(me,me);e:if(y.width===0)ue=Jt.Ve(y.x,y.y,y.x,y.y+y.height,z,te,re,oe,E);else if(y.height===0)ue=Jt.Ve(y.x,y.y,y.x+y.width,y.y,z,te,re,oe,E);else{if(a=y.width/2,le=y.height/2,b=y.x+a,ue=y.y+le,x=9999,z!==re&&(x=(te-oe)/(z-re)),9999>Math.abs(x)){if(oe=te-ue-x*(z-b),0>a*a*x*x+le*le-oe*oe){E.x=NaN,E.y=NaN,ue=!1;break e}me=Math.sqrt(a*a*x*x+le*le-oe*oe),re=(-(a*a*x*oe)+a*le*me)/(le*le+a*a*x*x)+b,a=(-(a*a*x*oe)-a*le*me)/(le*le+a*a*x*x)+b,le=x*(re-b)+oe+ue,oe=x*(a-b)+oe+ue,Math.abs((z-re)*(z-re))+Math.abs((te-le)*(te-le))<Math.abs((z-a)*(z-a))+Math.abs((te-oe)*(te-oe))?(E.x=re,E.y=le):(E.x=a,E.y=oe)}else{if(re=le*le,oe=z-b,re-=re/(a*a)*oe*oe,0>re){E.x=NaN,E.y=NaN,ue=!1;break e}oe=Math.sqrt(re),re=ue+oe,oe=ue-oe,Math.abs(re-te)<Math.abs(oe-te)?(E.x=z,E.y=re):(E.x=z,E.y=oe)}ue=!0}Ut.free(y)}else if(le.type===xi.o){we=tt.alloc();var Te=re-z,je=oe-te,ct=Te*Te+je*je,nt=z,bt=te;if(0<ct&&Me.contains(nt,bt)&&(we.x=nt,we.y=bt,this.ca(we)))for(Te!==0&&.5>Math.abs(Te)?(je*=.5/Te,Te=.5):je!==0&&.5>Math.abs(je)&&(Te*=.5/je,je=.5),nt-=Te,bt-=je;Me.contains(nt,bt);)nt-=Te,bt-=je;for(E.x=re,E.y=oe,je=0;je<le.figures.count;je++){var Nt=le.figures.s[je],Ot=Nt.isFilled?nt:z,Xt=Nt.isFilled?bt:te,gn=Nt.segments;Me=Nt.startX,Te=Nt.startY;for(var Fi=Me,_i=Te,zi=0;zi<gn.count;zi++){var mi=gn.s[zi],ti=mi.type,Ur=mi.endX,Dr=mi.endY,Ko=!1;switch(ti){case _a:Fi=Ur,_i=Dr;break;case ra:Ko=n0(Me,Te,Ur,Dr,Ot,Xt,re,oe,we);break;case Hs:Ko=Jt.Eo(Me,Te,mi.point1X,mi.point1Y,mi.point2X,mi.point2Y,Ur,Dr,Ot,Xt,re,oe,.6,we);break;case Xl:Ko=Jt.Eo(Me,Te,Me+2/3*(mi.point1X-Me),Te+2/3*(mi.point1Y-Te),Ur+2/3*(mi.point1X-Ur),Dr+2/3*(mi.point1Y-Dr),Ur,Dr,Ot,Xt,re,oe,.6,we);break;case Ja:case du:ti=mi.type===Ja?yl(mi,Nt):ul(mi,Nt,Me,Te);var la=ti.length;if(la===0){Ko=n0(Me,Te,mi.type===Ja?mi.centerX:mi.endX,mi.type===Ja?mi.centerY:mi.endY,Ot,Xt,re,oe,we);break}for(Dr=null,Ur=0;Ur<la;Ur++){if(Dr=ti[Ur],Ur===0&&n0(Me,Te,Dr[0],Dr[1],Ot,Xt,re,oe,we)){var Rs=t0(Ot,Xt,we,ct,E);Rs<ct&&(ct=Rs,ue=!0)}Jt.Eo(Dr[0],Dr[1],Dr[2],Dr[3],Dr[4],Dr[5],Dr[6],Dr[7],Ot,Xt,re,oe,.6,we)&&(Rs=t0(Ot,Xt,we,ct,E),Rs<ct&&(ct=Rs,ue=!0))}Ur=Dr[6],Dr=Dr[7];break;default:St("Unknown Segment type: "+ti)}Me=Ur,Te=Dr,Ko&&(Ko=t0(Ot,Xt,we,ct,E),Ko<ct&&(ct=Ko,ue=!0)),mi.isClosed&&(Ur=Fi,Dr=_i,n0(Me,Te,Ur,Dr,Ot,Xt,re,oe,we)&&(mi=t0(Ot,Xt,we,ct,E),mi<ct&&(ct=mi,ue=!0)))}}z=x-a,te=b-y,re=Math.sqrt(z*z+te*te),re!==0&&(z/=re,te/=re),E.x-=z*me,E.y-=te*me,tt.free(we)}else St("Unknown Geometry type: "+le.type);return ue?(this.transform.Ga(E),!0):!1};function t0(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 n0(a,y,x,b,E,z,te,re,oe){if(Jt.$(a,x)&&Jt.$(y,b)||Jt.$(E,te)&&Jt.$(z,re))return!1;var le=!1,ue=(E-te)*(y-b)-(z-re)*(a-x);return ue===0?!1:(oe.x=((E*re-z*te)*(a-x)-(E-te)*(a*b-y*x))/ue,oe.y=((E*re-z*te)*(y-b)-(z-re)*(a*b-y*x))/ue,(a>x?a-x:x-a)<(y>b?y-b:b-y)?(a=y<b?y:b,y=y<b?b:y,(oe.y>a||Jt.$(oe.y,a))&&(oe.y<y||Jt.$(oe.y,y))&&(le=!0)):(y=a<x?a:x,a=a<x?x:a,(oe.x>y||Jt.$(oe.x,y))&&(oe.x<a||Jt.$(oe.x,a))&&(le=!0)),le)}Le.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,z=tt.alloc();return z.h(x.x-b,x.y-b),a.ca(y.Ga(z))&&(z.h(x.x-b,x.bottom+b),a.ca(y.Ga(z))&&(z.h(x.right+b,x.bottom+b),a.ca(y.Ga(z))&&(z.h(x.right+b,x.y-b),a.ca(y.Ga(z))&&(E=!0)))),tt.free(z),E},Le.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=ro.alloc();x.set(y),x.Vj();var b=a.left,E=a.right,z=a.top;a=a.bottom;var te=tt.alloc();if(te.h(b,z),x.Ga(te),this.gh(te,!0)||(te.h(E,z),x.Ga(te),this.gh(te,!0))||(te.h(b,a),x.Ga(te),this.gh(te,!0))||(te.h(E,a),x.Ga(te),this.gh(te,!0)))return tt.free(te),!0;var re=tt.alloc(),oe=tt.alloc();return x.set(y),x.bv(this.transform),x.Vj(),re.x=E,re.y=z,re.transform(x),te.x=b,te.y=z,te.transform(x),y=!1,Qf(this,te,re,oe)?y=!0:(te.x=E,te.y=a,te.transform(x),Qf(this,te,re,oe)?y=!0:(re.x=b,re.y=a,re.transform(x),Qf(this,te,re,oe)?y=!0:(te.x=b,te.y=z,te.transform(x),Qf(this,te,re,oe)&&(y=!0)))),tt.free(te),ro.free(x),tt.free(re),tt.free(oe),y};function Qf(a,y,x,b){if(!a.rs(y,x,b))return!1;a=y.x,y=y.y;var E=x.x,z=x.y;return x=b.x,b=b.y,a===E?(y<z?(a=y,y=z):a=z,b>=a&&b<=y):(a<E?(b=a,a=E):b=E,x>=b&&x<=a)}Le.tx=function(a,y,x){function b(ct,nt){for(var bt=ct.length,Nt=0;Nt<bt;Nt+=2)if(nt.zd(ct[Nt],ct[Nt+1])>E)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var E=a.Bf(y),z=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 te=y.bounds,re=te.x,oe=te.y,le=te.x+te.width;if(te=te.y+te.height,Ro(a.x,a.y,re,oe)<=E&&Ro(a.x,a.y,le,oe)<=E&&Ro(a.x,a.y,re,te)<=E&&Ro(a.x,a.y,le,te)<=E)return!0}if(re=y.startX,oe=y.startY,le=y.endX,te=y.endY,y.type===xi.j){if(x=(re-le)*(a.x-le)+(oe-te)*(a.y-te),zo(a.x,a.y,re,oe,le,te)<=(0<=(le-re)*(a.x-re)+(te-oe)*(a.y-oe)&&0<=x?E:z))return!0}else{if(y.type===xi.u)return y=!1,x&&(y=zo(a.x,a.y,re,oe,re,te)<=E||zo(a.x,a.y,re,oe,le,oe)<=E||zo(a.x,a.y,le,oe,le,te)<=E||zo(a.x,a.y,re,te,le,te)<=E),y;if(y.type===xi.F){y=a.x-(re+le)/2,z=a.y-(oe+te)/2;var ue=Math.abs(le-re)/2,me=Math.abs(te-oe)/2;if(ue===0||me===0)return zo(a.x,a.y,re,oe,le,te)<=E;if(x){if(a=Jt.$y(ue,me,y,z),a*a<=E)return!0}else return!(Ro(y,z,-ue,0)>=E||Ro(y,z,0,-me)>=E||Ro(y,z,0,me)>=E||Ro(y,z,ue,0)>=E)}else if(y.type===xi.o){if(le=y.bounds,z=le.x,re=le.y,oe=le.x+le.width,le=le.y+le.height,a.x>oe&&a.x<z&&a.y>le&&a.y<re&&zo(a.x,a.y,z,re,z,le)>E&&zo(a.x,a.y,z,re,oe,re)>E&&zo(a.x,a.y,oe,le,z,le)>E&&zo(a.x,a.y,oe,le,oe,re)>E)return!1;if(z=Math.sqrt(E),x){if(this.fill===null?Mu(y,a.x,a.y,z):ac(y,a,z,!0,!1))return!0}else{for(x=y.figures,y=0;y<x.count;y++){if(z=x.s[y],te=z.startX,ue=z.startY,a.zd(te,ue)>E)return!1;for(re=z.segments.s,oe=re.length,le=0;le<oe;le++)switch(me=re[le],me.type){case _a:case ra:if(te=me.endX,ue=me.endY,a.zd(te,ue)>E)return!1;break;case Hs:var we=mn();if(Jt.Qe(te,ue,me.point1X,me.point1Y,me.point2X,me.point2Y,me.endX,me.endY,.8,we),te=b(we,a),Wn(we),te||(te=me.endX,ue=me.endY,a.zd(te,ue)>E))return!1;break;case Xl:if(we=mn(),Jt.ep(te,ue,me.point1X,me.point1Y,me.endX,me.endY,.8,we),te=b(we,a),Wn(we),te||(te=me.endX,ue=me.endY,a.zd(te,ue)>E))return!1;break;case Ja:case du:we=me.type===Ja?yl(me,z):ul(me,z,te,ue);var Me=we.length;if(Me===0){if(te=me.type===Ja?me.centerX:me.endX,ue=me.type===Ja?me.centerY:me.endY,a.zd(te,ue)>E)return!1;break}me=null;for(var Te=mn(),je=0;je<Me;je++)if(me=we[je],Te.length=0,Jt.Qe(me[0],me[1],me[2],me[3],me[4],me[5],me[6],me[7],.8,Te),b(Te,a))return Wn(Te),!1;Wn(Te),me!==null&&(te=me[6],ue=me[7]);break;default:St("Unknown Segment type: "+me.type)}}return!0}}}return!1},Le.qc=function(){this.ua=null},Le.kq=function(){return this.ig};function vS(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=nm,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=xs):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new Vi(1-xs.x,xs.y)))}io.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var b=Rd[a.toArrow];else a.fromArrow!=="None"?b=Rd[a.fromArrow]:(b=Jt.Ze[a.figure],typeof b=="string"&&(b=Jt.Ze[b]),b===void 0&&St("Unknown Shape.figure: "+a.figure),b=b(a,y,x),b.Sk=y,b.Rk=x);if(b===null){var E=Jt.Ze.Rectangle;typeof E=="function"&&(b=E(a,y,x))}return b};function yS(a){var y=Rd[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=Rd[x],y===void 0){var b=null,E;for(E in Jt.um)if(E.toLowerCase()===x){b=E;break}if(b!==null)return a=xi.parse(Jt.um[b],!1),Rd[b]=a,x!==b&&(Rd[x]=b),b}}return typeof y=="string"?y:y instanceof xi?a:null}Je.Object.defineProperties(io.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),xe(this)&&(a=this.part,a!==null&&ha(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=xi.parse(a);var y=a.normalize();this.geometry=a,this.position=a=tt.allocAt(-y.x,-y.y),tt.free(a)}},isGeometryPositioned:{get:function(){return(this.l&1048576)!==0},set:function(a){var y=(this.l&1048576)!==0;y!==a&&(this.l^=1048576,this.v(),this.g("isGeometryPositioned",y,a))}},fill:{get:function(){return this.Ui},set:function(a){var y=this.Ui;y!==a&&(a!==null&&ff(a,"Shape.fill"),a instanceof Oo&&a.freeze(),this.Ui=a,this.N(),this.g("fill",y,a))}},stroke:{get:function(){return this.xc},set:function(a){var y=this.xc;y!==a&&(a!==null&&ff(a,"Shape.stroke"),a instanceof Oo&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},strokeWidth:{get:function(){return this.ig},set:function(a){var y=this.ig;if(y!==a)if(0<=a){this.ig=a,this.v();var x=this.part;x!==null&&(x.ag=NaN),this.g("strokeWidth",y,a)}else qn(a,"value >= 0",io,"strokeWidth:value")}},strokeCap:{get:function(){return this.Na!==null?this.Na.Hr:"butt"},set:function(a){var y=this.strokeCap;y!==a&&(typeof a!="string"||a!=="butt"&&a!=="round"&&a!=="square"?qn(a,'"butt", "round", or "square"',io,"strokeCap"):(Jf(this),this.Na.Hr=a,this.N(),this.g("strokeCap",y,a)))}},strokeJoin:{get:function(){return this.Na!==null?this.Na.Ir:"miter"},set:function(a){var y=this.strokeJoin;y!==a&&(typeof a!="string"||a!=="miter"&&a!=="bevel"&&a!=="round"?qn(a,'"miter", "bevel", or "round"',io,"strokeJoin"):(Jf(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){Jf(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 z=a[E];0<=z&&isFinite(z)||St("strokeDashArray:value "+z+" at index "+E+" must be a positive number or zero."),b+=z}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&&(Jf(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=Jt.Ze[a];typeof x=="function"?x=a:(x=Jt.Ze[a.toLowerCase()])||St("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=yS(a);x===null?St("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new Hr),this.Ua.V=x,this.Rd=null,this.qc(),this.v(),vS(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=yS(a);x===null?St("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new Hr),this.Ua.j=x,this.Rd=null,this.qc(),this.v(),vS(this),this.g("fromArrow",y,x))}}},spot1:{get:function(){return this.Na!==null?this.Na.fg:Vo},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),Jf(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:Vo},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),Jf(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&&(Jf(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:Vr},set:function(a){var y=this.geometryStretch;y!==a&&(Jf(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 jd),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&bc(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 jd),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 jd),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 jd),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),io.prototype.intersectsRect=io.prototype.Yc,io.prototype.containedInRect=io.prototype.fh,io.prototype.getNearestIntersectionPoint=io.prototype.rs,io.prototype.getDocumentBounds=io.prototype.mi,io.prototype.getDocumentPoint=io.prototype.ga;var Rd=new Gi,Iv=new Gi;io.className="Shape",io.getFigureGenerators=function(){var a=new Ii,y;for(y in Jt.Ze)y!==y.toLowerCase()&&a.add(y,Jt.Ze[y]);return a.freeze(),a},io.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),b=Jt.Ze;b[a]=y,b[x]=a},io.getArrowheadGeometries=function(){var a=new Ii;for(b in Jt.um)if(Rd[b]===void 0){var y=xi.parse(Jt.um[b],!1);Rd[b]=y,y=b.toLowerCase(),y!==b&&(Rd[y]=b)}for(var x in Rd)if(x!==x.toLowerCase()){var b=Rd[x];b instanceof xi&&a.add(x,b)}return a.freeze(),a},io.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=xi.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||St("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var b=Rd;b[a]=x,b[y]=a};function Ov(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=Vr,this.gg=this.fg=Vo}Ov.prototype.copy=function(){var a=new Ov;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 ua(a,y){return Yt.call(this),s0||(iu=Ha?new al(null).context:null,s0=!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}$t(ua,Yt),ua.prototype.cloneProtected=function(a){Yt.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 pd(a){a.da===null?a.da=new Gv:a.da.nc&&(a.da=a.da.copy())}Le=ua.prototype,Le.th=function(){Yt.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function SS(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}Le.qb=function(a){a.classType===ua?this.wrap=a:Yt.prototype.qb.call(this,a)},Le.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},Le.v=function(){Yt.prototype.v.call(this)},Le.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,z=x.height,te=Xp(this),re=a.textAlign=this.textAlign,oe=y.tn;re==="start"?re=oe?"right":"left":re==="end"&&(re=oe?"left":"right"),oe=this.isUnderline;var le=this.isStrikethrough;Za(this,a,this.xc,!0,!1,x,b),(oe||le)&&Za(this,a,this.xc,!1,!1,x,b),b=0,x=!1;var ue=this.oe,me=ue.dx-(te*ue.m21+ue.dx);ue=ue.dy-(te*ue.m22+ue.dy);var we=y.scale;switch(8>(me*me+ue*ue)*we*we&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Uo&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,me=this.spacingBelow,this.flip){case Eo:a.translate(E,0),a.scale(-1,1);break;case ao:a.translate(0,z),a.scale(1,-1);break;case Qo:a.translate(E,z),a.scale(-1,-1)}if(a.yc(),ue=this.Gc,we=(y+te+me)*ue,z>we&&(b=this.verticalAlignment,b=b.y*z-b.y*we+b.offsetY),ue===1&&this.ze!==null)me=this.Cb,me>E&&(me=E),this.Oj(this.ze,a,0,b+y,E,te,me,x,re,oe,le);else if(this.Qc!==null&&this.Qb!==null)for(we=0;we<ue;we++){var Me=this.Qc[we];Me>E&&(Me=E),b+=y,this.Oj(this.Qb[we],a,0,b,E,te,Me,x,re,oe,le),b+=te+me}switch(this.flip){case Eo:a.scale(-1,1),a.translate(-E,0);break;case ao:a.scale(1,-1),a.translate(0,-z);break;case Qo:a.scale(-1,-1),a.translate(-E,-z)}}},Le.Oj=function(a,y,x,b,E,z,te,re,oe,le,ue){var me=0;if(re)oe==="left"?me=0:oe==="right"?me=E-te:oe==="center"&&(me=(E-te)/2),y.fillRect(x+me,b+.25*z,te,1);else{if(oe==="left"?me=0:oe==="right"?me=E:oe==="center"&&(me=E/2),E=i0!==null?i0(this,z):.75*z,y.fillText(a,x+me,b+E),a=z/20|0,a===0&&(a=1),oe==="right"?me-=te:oe==="center"&&(me-=te/2),le){re=r0!==null?r0(this,z):.8*z,oe=x+me,le=b+re,E=x+me+te,re=b+re;var we=a;y.beginPath(),y.lineWidth=we,y.moveTo(oe,le),y.lineTo(E,re),y.stroke(),y.Se(),y instanceof Uo&&y.ad.classList.add("gojs-td")}ue&&(ue=b+z-z/2.2|0,a%2!==0&&(ue+=.5),b=x+me,z=ue,x=x+me+te,te=ue,me=a,y.beginPath(),y.lineWidth=me,y.moveTo(b,z),y.lineTo(x,te),y.stroke(),y.Se(),y instanceof Uo&&y.ad.classList.add("gojs-td"))}},Le.kk=function(a,y,x){if(!Yt.prototype.kk.call(this,a,y,x))return!1;if(Za(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++)nu(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,nu(a,y,!0);return!0},Le.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:Yt.prototype.nk.call(this,a)},Le.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)}},Le.Wl=function(a,y,x,b){var E=this.Gc;this.Ih=a,this.l&=-16777217;var z=this.Ae;iu!==null&&MS!==z&&(MS=iu.font=z),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var te;if(isNaN(this.desiredSize.width)){if(z=this.ec.replace(/\r\n/g,`
|
|
|
`).replace(/\r/g,`
|
|
|
`),z.length===0)z=8;else if(this.isMultiline){for(var re=te=0,oe=!1;!oe;){var le=z.indexOf(`
|
|
|
`,re);le===-1&&(le=z.length,oe=!0),re=z.substr(re,le-re),this.formatting===Yp&&(re=re.trim()),te=Math.max(te,Lc(re)),re=le+1}z=te}else te=z.indexOf(`
|
|
|
`,0),0<=te&&(z=z.substr(0,te)),z=Lc(z);z=Math.min(z,a/this.scale)}else z=this.desiredSize.width;if(this.panel!==null&&(z=Math.min(z,this.panel.maxSize.width)),te=PS(this,z),isNaN(this.desiredSize.height)?te=Math.min(te,y/this.scale):te=this.desiredSize.height,oe=te,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===o0&&(y=this.Ae,y=this.overflow===o0?xS(y):0,le=this.spacingAbove+this.spacingBelow,le=Math.max(0,Xp(this)+le),oe=Math.min(this.maxLines-1,Math.max(Math.floor(oe/le+.01)-1,0)),!(oe+1>=this.Qb.length))){for(this.l|=16777216,le=this.Qb[oe],y=Math.max(1,a-y);Lc(le)>y&&1<le.length;)le=le.substr(0,le.length-1);le+=Jp,y=Lc(le),this.Qb[oe]=le,this.Qb=this.Qb.slice(0,oe+1),this.Qc[oe]=y,this.Qc=this.Qc.slice(0,oe+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===wS||isNaN(this.desiredSize.width))&&(z=isNaN(a)?this.Cb:Math.min(a,this.Cb)),z=Math.max(x,z),te=Math.max(b,te),Ui(this.dc,z,te),this.Ge(0,0,z,te),this.svg!==null&&E!==this.Gc&&(this.Uc=!0)},Le.eh=function(a,y,x,b){Pl(this,a,y,x,b)};function _p(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 Rv(a,y,x,b){var E=a.formatting===Yp;E&&(y=y.trim());var z=0,te=a.Ae,re=a.spacingAbove+a.spacingBelow;re=Math.max(0,Xp(a)+re);var oe=a.overflow===o0?xS(te):0;if(a.Gc>=a.maxLines)b!==null&&b.h(0,re);else if(te=y,a.wrap===jv){a.Le=1;var le=Lc(y);if(oe===0||le<=x)a.Cb=Math.max(a.Cb,le),_p(a,y,a.Cb),b!==null&&b.h(le,re);else{for(z=dp(a,te),te=te.substr(z.length),y=dp(a,te),le=Lc(z+y);0<y.length&&le<=x;)z+=y,te=te.substr(y.length),y=dp(a,te),le=z+y,E&&(le=le.trim()),le=Lc(le);for(E&&(y=y.trim()),z+=y,x=Math.max(1,x-oe);Lc(z)>x&&1<z.length;)z=z.substr(0,z.length-1);a.l|=16777216,z+=Jp;var ue=Lc(z);a.Cb=ue,_p(a,z,ue),b!==null&&b.h(ue,re)}}else{for(oe=0,te.length===0&&(oe=1,_p(a,te,0));0<te.length;){for(y=dp(a,te),te=te.substr(y.length);Lc(y)>x;){var me=1;for(le=Lc(y.substr(0,me)),ue=0;le<=x;)me++,ue=le,le=Lc(y.substr(0,me));if(me===1){var we=le;z=Math.max(z,le)}else we=ue,z=Math.max(z,ue);if(me--,1>me&&(me=1),_p(a,y.substr(0,me),we),oe++,y=y.substr(me),a.Gc+oe>a.maxLines)break}for(ue=dp(a,te),le=Lc(y+ue);0<ue.length&&le<=x;)y+=ue,te=te.substr(ue.length),ue=dp(a,te),le=y+ue,E&&(le=le.trim()),le=Lc(le);if(E&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),ue.length===0?(me=le,z=Math.max(z,le)):(me=ue=Lc(y),z=Math.max(z,ue)),_p(a,y,me),oe++,a.Gc+oe>a.maxLines))break}a.Le=Math.min(a.maxLines,oe),a.Cb=Math.max(a.Cb,z),b!==null&&b.h(a.Cb,re*a.Le)}}function dp(a,y){if(a.wrap===CS)return y.substr(0,1);for(var x=y.length,b=0,E=Sx;b<x&&!E.test(y.charAt(b));)b++;for(a.formatting===bS&&(x=Math.min(x,b+1));b<x&&E.test(y.charAt(b));)b++;return b>=y.length?y:y.substr(0,b)}function Lc(a){return iu===null?8*a.length:iu.measureText(a).width}function Xp(a){if(a.df!==null)return a.df;var y=a.Ae;if(iu===null){var x=16;return a.df=x}return Zv[y]!==void 0&&5e3>ES?x=Zv[y]:(x=1.3*iu.measureText("M").width,Zv[y]=x,ES++),a.df=x}function xS(a){if(iu===null)return 6;if(a0[a]!==void 0&&5e3>Wv)var y=a0[a];else y=iu.measureText(Jp).width,a0[a]=y,Wv++;return y}function PS(a,y){var x=a.ec.replace(/\r\n/g,`
|
|
|
`).replace(/\r/g,`
|
|
|
`),b=a.spacingAbove+a.spacingBelow;if(b=Math.max(0,Xp(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 z=a.Gc=0,te,re=!1;!re;){if(te=x.indexOf(`
|
|
|
`,z),te===-1&&(te=x.length,re=!0),z<=te){if(z=x.substr(z,te-z),a.wrap!==jv){a.Le=0;var oe=fi.alloc();Rv(a,z,y,oe),E+=oe.height,fi.free(oe),a.Gc+=a.Le}else Rv(a,z,y,null),E+=b,a.Gc++;a.Gc===a.maxLines&&(re=!0)}z=te+1}return a.Lq=E}Je.Object.defineProperties(ua.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"||(pd(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:ai},set:function(a){var y=this.flip;y!==a&&(pd(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:Ss},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),pd(this),this.da.Yr=a,bl(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=fi.alloc();Rv(this,this.ec,999999,a);var y=a.width;fi.free(a),a=PS(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Ui(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:zv},set:function(a){var y=this.wrap;y!==a&&(pd(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:Hv},set:function(a){var y=this.overflow;y!==a&&(pd(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&&ff(a,"TextBlock.stroke"),a instanceof Oo&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return Xp(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&&(pd(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&&(pd(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 jd),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 jd),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 jd),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 jd),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 jd),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&&(pd(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&&(pd(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&&(pd(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&&(pd(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:Yp},set:function(a){var y=this.formatting;y!==a&&(pd(this),this.da.gq=a,this.v(),this.g("formatting",y,a))}},maxLines:{get:function(){return this.da!==null?this.da.Jq:1/0},set:function(a){var y=this.maxLines;y!==a&&(a=Math.floor(a),0>=a&&qn(a,"> 0",ua,"maxLines"),pd(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 i0=null,r0=null,jv=new ln(ua,"None",0),wS=new ln(ua,"WrapFit",1),zv=new ln(ua,"WrapDesiredSize",2),CS=new ln(ua,"WrapBreakAll",3),Hv=new ln(ua,"OverflowClip",0),o0=new ln(ua,"OverflowEllipsis",1),Yp=new ln(ua,"FormatTrim",0),bS=new ln(ua,"FormatNone",0),Sx=/[ \u200b\u00ad]/,Zv=new Gi,ES=0,a0=new Gi,Wv=0,Jp="...",MS="",iu=null,s0=!1;ua.className="TextBlock";function Gv(){this.nc=!1,this.Hd=null,this.Xf=ai,this.gq=Yp,this.Jq=1/0,this.$q=Hv,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=Ss,this.$r=zv}Gv.prototype.copy=function(){var a=new Gv;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},ua.getEllipsis=function(){return Jp},ua.setEllipsis=function(a){Jp=a,a0=new Gi,Wv=0},ua.getBaseline=function(){return i0},ua.setBaseline=function(a){i0=a},ua.getUnderline=function(){return r0},ua.setUnderline=function(a){r0=a},ua.isValidFont=function(a){if(s0||(iu=Ha?new al(null).context:null,s0=!0),iu===null)return!0;var y=iu.font;if(a===y||a==="10px sans-serif")return!0;iu.font="10px sans-serif",iu.font=a;var x=iu.font;if(x!=="10px sans-serif")return iu.font=y,!0;iu.font="19px serif";var b=iu.font;return iu.font=a,x=iu.font,iu.font=y,x!==b},ua.FormatNone=bS,ua.FormatTrim=Yp,ua.None=jv,ua.OverflowClip=Hv,ua.OverflowEllipsis=o0,ua.WrapBreakAll=CS,ua.WrapDesiredSize=zv,ua.WrapFit=wS;function jd(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}jd.prototype.copy=function(){var a=new jd;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},jd.className="GradElementSettings";function ru(a,y){Yt.call(this),this.Eg=null,this.qo="",this.Xg=kr,this.Nk=ci,this.Zg=this.Hd=null,this.Mk=wo,this.Xf=ai,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 hp;$t(ru,Yt),ru.prototype.cloneProtected=function(a){Yt.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},ru.prototype.qb=function(a){a===ai||a===tr||a===yo?this.imageStretch=a:Yt.prototype.qb.call(this,a)},ru.prototype.toString=function(){return"Picture("+this.source+")#"+br(this)};function fp(a){a===void 0&&(a=""),a!==""?hp[a]&&(delete hp[a],l0--):(hp=new Gi,l0=0)}function LS(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 z=y.getAttribute("src")||"",te=E.Og.I(z);if(te!==null)for(var re=te.length,oe=0;oe<re;oe++)z=te[oe],E.Xn.add(z),z.Uc=!0,E.$b(),y.hn&&(y.eu===void 0&&(y.eu=x),z.Zg!==null&&z.Zg(z,x))}y.Bg.clear()}a.desiredSize.w()||(gt(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,z=y.getAttribute("src")||"",te=E.Og.I(z);if(te!==null){E=te.length,z=mn();for(var re=0;re<E;re++)z.push(te[re]);if(y.hn)for(re=0;re<E;re++)te=z[re],te.Hd!==null&&te.Hd(te,x);Wn(z)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}ru.prototype.hA=function(){if(this.source!==""){fp(this.source);var a=this.source;this.source="",this.source=a}},ru.prototype.redraw=function(){this.N(),this.Uc=!0},ru.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 Gc)){var E=a instanceof Uo;b=this.naturalBounds;var z=0,te=0,re=this.qn,oe=re?+x.width:x.naturalWidth;if(re=re?+x.height:x.naturalHeight,oe===void 0&&x.videoWidth&&(oe=x.videoWidth),re===void 0&&x.videoHeight&&(re=x.videoHeight),oe=oe||b.width,re=re||b.height,oe!==0&&re!==0){var le=oe,ue=re;this.sourceRect.w()&&(z=this.Xg.x,te=this.Xg.y,oe=this.Xg.width,re=this.Xg.height);var me=oe,we=re,Me=this.Nk,Te=this.Mk;switch(Me){case ai:if(this.sourceRect.w())break;me>=b.width&&(z=z+Te.offsetX+(me*Te.x-b.width*Te.x)),we>=b.height&&(te=te+Te.offsetY+(we*Te.y-b.height*Te.y)),oe=Math.min(b.width,me),re=Math.min(b.height,we);break;case ci:me=b.width,we=b.height;break;case tr:case yo:Me===tr?(Me=Math.min(b.height/we,b.width/me),me*=Me,we*=Me):Me===yo&&(Me=Math.max(b.height/we,b.width/me),me*=Me,we*=Me,me>=b.width&&(z=(z+Te.offsetX+(me*Te.x-b.width*Te.x)/me)*oe),we>=b.height&&(te=(te+Te.offsetY+(we*Te.y-b.height*Te.y)/we)*re),oe*=1/(me/b.width),re*=1/(we/b.height),me=b.width,we=b.height)}Me=this.Df()*y.scale;var je=me*Me*we*Me,ct=oe*re/je,nt=x.__goCache;Me=null;var bt=xx;if(!E){if(x.sq&&nt!==void 0&&4<je&&ct>bt*bt)for(nt.gi===null&&(FS(nt,4,le,ue,x),FS(nt,16,le,ue,x)),E=nt.gi,le=E.length,ue=0;ue<le&&E[ue].ratio*E[ue].ratio<ct;ue++)Me=E[ue];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{E=new al(null).context;try{E.drawImage(this.Eg,0,0)}catch(Nt){this.en=!1}try{E.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(Nt){this.vl=!0}}if(this.vl)return}}switch(E=me<b.width?Te.offsetX+(b.width*Te.x-me*Te.x):0,Te=we<b.height?Te.offsetY+(b.height*Te.y-we*Te.y):0,this.flip){case Eo:a.translate(Math.min(b.width,me),0),a.scale(-1,1);break;case ao:a.translate(0,Math.min(b.height,we)),a.scale(1,-1);break;case Qo:a.translate(Math.min(b.width,me),Math.min(b.height,we)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&nt!==void 0&&Me!==null&&Me.ratio!==1){a.save(),y=Me.ratio;try{a.drawImage(Me.source,z/y,te/y,Math.min(Me.source.width,oe/y),Math.min(Me.source.height,re/y),E,Te,Math.min(b.width,me),Math.min(b.height,we)),a instanceof Uo&&(this.bt=[z/y,te/y,Math.min(Me.source.width,oe/y),Math.min(Me.source.height,re/y),E,Te,Math.min(b.width,me),Math.min(b.height,we)])}catch(Nt){this.en=!1}a.restore()}else try{a.drawImage(x,z,te,oe,re,E,Te,Math.min(b.width,me),Math.min(b.height,we)),a instanceof Uo&&(this.bt=[z,te,oe,re,E,Te,Math.min(b.width,me),Math.min(b.height,we)])}catch(Nt){this.en=!1}switch(this.flip){case Eo:a.scale(-1,1),a.translate(-Math.min(b.width,me),0);break;case ao:a.scale(1,-1),a.translate(0,-Math.min(b.height,we));break;case Qo:a.scale(-1,-1),a.translate(-Math.min(b.width,me),-Math.min(b.height,we))}}}}},ru.prototype.Wl=function(a,y,x,b){var E=this.desiredSize,z=Fl(this,!0),te=this.Eg,re=this.qn,oe=0,le=0;(re||!this.al&&te&&te.complete)&&(this.al=!0),te===null?(isFinite(E.width)||(a=0),isFinite(E.height)||(y=0)):(oe=re?+te.width:te.naturalWidth,le=re?+te.height:te.naturalHeight),isFinite(E.width)||z===ci||z===lr?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:te!==null&&(a=oe)),x=0):te!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:oe),isFinite(E.height)||z===ci||z===Pr?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:te!==null&&(y=le)),b=0):te!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:le),isFinite(E.width)&&(a=E.width),isFinite(E.height)&&(y=E.height),E=this.maxSize,z=this.minSize,x=Math.max(x||0,z.width),b=Math.max(b||0,z.height),a=Math.min(E.width,a),y=Math.min(E.height,y),a=Math.max(x,a),y=Math.max(b,y),te===null||te.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),Ui(this.dc,a,y),this.Ge(0,0,a,y)},ru.prototype.eh=function(a,y,x,b){Pl(this,a,y,x,b)},Je.Object.defineProperties(ru.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||St("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var b=this.diagram;b!==null&&vg(b,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new _n),b!==null&&x&&oh(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()||(gt(this,!1),this.v())):x&&LS(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=hp;if(Ha){var b=null;if(x[a]!==void 0)b=x[a];else if(a!==""){30<l0&&(fp(),x=hp),b=Jn("img"),b.hn=!0,LS(this,b);var E=this.rl;E!==null&&(b.crossOrigin=E(this)),b.src=a,x[a]=b,l0++}this.element=b,b!==null&&b.__goCache===void 0&&(b.__goCache=new NS),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}}}),ru.prototype.redraw=ru.prototype.redraw,ru.prototype.reloadSource=ru.prototype.hA;var l0=0,xx=4;ru.className="Picture",hp=new Gi,ru.clearCache=fp;function NS(){this.gi=null}function FS(a,y,x,b,E){a.gi===null&&(a.gi=[]);var z=new al(null),te=z.context,re=1/y;z.width=x/y,z.height=b/y,z.width!==0&&z.height!==0&&(y=new AS(z.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],E=x.source,x=x.ratio),te.setTransform(re*x,0,0,re*x,0,0),te.yc(),te.drawImage(E,0,0),a.gi.push(y))}NS.className="PictureCacheArray";function AS(a,y){this.source=a,this.ratio=y}AS.className="PictureCacheInstance";function gp(){this.os=new xi,this.mc=null}gp.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new xi,this.mc=null};function pp(a,y,x,b,E,z){a.mc=new ys,a.mc.startX=y,a.mc.startY=x,a.mc.isFilled=b,a.mc.isEvenOdd=z||!1,a.os.figures.add(a.mc),E!==void 0&&(a.mc.isShadowed=E)}function Px(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}gp.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var b=new To(_a);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)},gp.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var b=new To(ra);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)};function Hh(a,y,x,b,E,z,te){var re;re===void 0&&(re=!1);var oe=new To(Hs);oe.point1X=y,oe.point1Y=x,oe.point2X=b,oe.point2Y=E,oe.endX=z,oe.endY=te,re&&oe.close(),a.mc.segments.add(oe)}function u0(a,y,x,b,E){var z;z===void 0&&(z=!1);var te=new To(Xl);te.point1X=y,te.point1Y=x,te.endX=b,te.endY=E,z&&te.close(),a.mc.segments.add(te)}gp.prototype.arcTo=function(a,y,x,b,E,z,te){z===void 0&&(z=0),te===void 0&&(te=!1);var re=new To(Ja);re.startAngle=a,re.sweepAngle=y,re.centerX=x,re.centerY=b,re.radiusX=E,re.radiusY=z!==0?z:E,te&&re.close(),this.mc.segments.add(re)};function wx(a,y,x,b,E,z,te,re){var oe;oe===void 0&&(oe=!1),y=new To(du,te,re,y,x,b,E,z),oe&&y.close(),a.mc.segments.add(y)}function DS(a){var y=c0;return y!==null?(c0=null,y.reset(a),y):(y=new gp,y.reset(a),y)}var c0=null;gp.className="StreamGeometryContext";function El(a,y){var x=a.toLowerCase(),b=Jt.Ze;b[a]=y,b[x]=a}El("Rectangle",function(a,y,x){a="r"+y+","+x;var b=Jt.Mf[a];return b!==void 0||(b=new xi(xi.u),b.endX=y,b.endY=x,Jt.Nf<Jt.vm&&(Jt.Mf[a]=b,Jt.Nf++)),b}),El("Square",function(a,y,x){a="s"+y+","+x;var b=Jt.Mf[a];return b!==void 0||(b=new xi(xi.u),b.endX=y,b.endY=x,b.defaultStretch=tr,Jt.Nf<Jt.vm&&(Jt.Mf[a]=b,Jt.Nf++)),b}),El("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=Jt.Mf[b];if(E!==void 0)return E;var z=a*Jt.wg;return E=new xi().add(new ys(a,0,!0).add(new To(ra,y-a,0)).add(new To(Hs,y,a,y-z,0,y,z)).add(new To(ra,y,x-a)).add(new To(Hs,y-a,x,y,x-z,y-z,x)).add(new To(ra,a,x)).add(new To(Hs,0,x-a,z,x,0,x-z)).add(new To(ra,0,a)).add(new To(Hs,a,0,0,z,z,0).close())),1<z&&(E.spot1=new Vi(0,0,z,z),E.spot2=new Vi(1,1,-z,-z)),Jt.Nf<Jt.vm&&(Jt.Mf[b]=E,Jt.Nf++),E}),El("Border","RoundedRectangle"),El("Ellipse",function(a,y,x){a="e"+y+","+x;var b=Jt.Mf[a];return b!==void 0||(b=new xi(xi.F),b.endX=y,b.endY=x,b.spot1=oc,b.spot2=_l,Jt.Nf<Jt.vm&&(Jt.Mf[a]=b,Jt.Nf++)),b}),El("Circle",function(a,y,x){a="c"+y+","+x;var b=Jt.Mf[a];return b!==void 0||(b=new xi(xi.F),b.endX=y,b.endY=x,b.spot1=oc,b.spot2=_l,b.defaultStretch=tr,Jt.Nf<Jt.vm&&(Jt.Mf[a]=b,Jt.Nf++)),b}),El("TriangleRight",function(a,y,x){return new xi().add(new ys(0,0).add(new To(ra,y,.5*x)).add(new To(ra,0,x).close())).pm(0,.25,.5,.75)}),El("TriangleDown",function(a,y,x){return new xi().add(new ys(0,0).add(new To(ra,y,0)).add(new To(ra,.5*y,x).close())).pm(.25,0,.75,.5)}),El("TriangleLeft",function(a,y,x){return new xi().add(new ys(y,x).add(new To(ra,0,.5*x)).add(new To(ra,y,0).close())).pm(.5,.25,1,.75)}),El("TriangleUp",function(a,y,x){return new xi().add(new ys(y,x).add(new To(ra,0,x)).add(new To(ra,.5*y,0).close())).pm(.25,.5,.75,1)}),El("Triangle","TriangleUp"),El("Diamond",function(a,y,x){return new xi().add(new ys(.5*y,0).add(new To(ra,0,.5*x)).add(new To(ra,.5*y,x)).add(new To(ra,y,.5*x).close())).pm(.25,.25,.75,.75)}),El("LineH",function(a,y,x){return a=new xi(xi.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),El("LineV",function(a,y,x){return a=new xi(xi.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),El("None","Rectangle"),El("BarH","Rectangle"),El("BarV","Rectangle"),El("MinusLine","LineH"),El("PlusLine",function(a,y,x){return new xi().add(new ys(0,x/2,!1).add(new To(ra,y,x/2)).add(new To(_a,y/2,0)).add(new To(ra,y/2,x)))}),El("XLine",function(a,y,x){return new xi().add(new ys(0,x,!1).add(new To(ra,y,0)).add(new To(_a,0,0)).add(new To(ra,y,x)))}),El("LineRight",function(a,y,x){return new xi().add(new ys(.25*y,0,!1).add(new To(ra,.75*y,.5*x)).add(new To(ra,.25*y,x)))}),El("LineDown",function(a,y,x){return new xi().add(new ys(0,.25*x,!1).add(new To(ra,.5*y,.75*x)).add(new To(ra,y,.25*x)))}),El("LineLeft",function(a,y,x){return new xi().add(new ys(.75*y,0,!1).add(new To(ra,.25*y,.5*x)).add(new To(ra,.75*y,x)))}),El("LineUp",function(a,y,x){return new xi().add(new ys(0,.75*x,!1).add(new To(ra,.5*y,.25*x)).add(new To(ra,y,.75*x)))}),Jt.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 $v(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=ta,this.ir=null,this.jr="",this.lr=Vo,this.Gq="",this.Hq=Ba,this.Pq=lo,this.Kq=jr,this.Up=null,this.Cq=127,this.zr=vo,this.yr="gray",this.Vg=4}$v.prototype.copy=function(){var a=new $v;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 pr(a,y){a===void 0||a instanceof Es||typeof a=="string"?hi.call(this,a):(hi.call(this),a&&(y=a)),this.G=2408959,this.Tf="",this.P=null,this.Jg="",this.Qf=this.Ug=null,this.ec="",this.Ah=this.Ig=null,this.ke=new tt(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new Ut,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}$t(pr,hi),pr.prototype.cloneProtected=function(a){hi.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},Le=pr.prototype,Le.Af=function(a){hi.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},Le.toString=function(){var a=Hn(this.constructor)+"#"+br(this);return this.data!==null&&(a+="("+Qn(this.data)+")"),a};function ou(a){a.P===null?a.P=new $v:a.P.nc&&(a.P=a.P.copy())}Le.th=function(){hi.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},Le.gk=function(a,y,x,b,E,z,te){var re=this.diagram;re!==null&&(a===Va&&y==="elements"?E instanceof hi?Yf(E,function(oe){vy(re.partManager,oe),kh(re,oe)}):oh(re,E):a===cs&&y==="elements"&&(E instanceof hi?Yf(E,function(oe){yy(re.partManager,oe,re)}):vg(re,E)),re.cb(a,y,x,b,E,z,te))},Le.La=function(a){if(hi.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 hi&&Yf(E,function(z){z.data!==null&&z.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},pr.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},pr.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},pr.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 Ii),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)))}}},pr.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)}},pr.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=mn();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);Wn(y)}},pr.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 Yr?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof jo))break e;hc(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=hi.Link),x.adornedObject=y)}if(x!==null){x.type===hi.Link&&x.v(),this.bh("Selection",x);break e}}this.Jf("Selection")}for(Cx(this,a),y=this.adornments;y.next();)y.value.La()}},pr.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function Kv(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 d0(a){if(mf(a)===!1){Uv(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function BS(a){if(a.G|=2097152,mf(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||IS(a,y,x),x=a.Ib;var b=Ut.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(b,x),Ut.free(b),Uv(a,!1)}}pr.prototype.Ge=function(a,y,x,b){var E=this.uc;E.h(a,y,x,b),this.Lb===null&&(this.Lb=new ro);var z=this.Lb;z.reset(),this.no(z,a,y,x,b),this.Lb=z,z.ws()||z.pp(E)},pr.prototype.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=wo;this.locationSpot.sb()&&(z=this.locationSpot);var te=tt.alloc();if(this.locationObject!==this)for(y=this.locationObject,x=y.naturalBounds,te.yi(x.x,x.y,x.width,x.height,z),y.Lb!==null&&y.Lb.Ga(te),te.offset(-y.measuredBounds.x,-y.measuredBounds.y),z=y.panel;z!==null&&z!==this;)z.Lb!==null&&z.Lb.Ga(te),te.offset(-z.measuredBounds.x,-z.measuredBounds.y),z=z.panel;else te.yi(y,x,b,E,z);a.rotate(this.Kb,te.x,te.y),tt.free(te)}},pr.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},pr.prototype.moveTo=function(a,y,x){a=tt.allocAt(a,y),this.move(a,x),tt.free(a)},pr.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())},pr.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())},pr.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new Ii),y.I(a)!==null)return y.I(a);var x=hi.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function Zh(a,y,x,b){b===void 0&&(b=new tt),x=x.Mc()?wo: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}pr.prototype.mi=function(a){return a===void 0&&(a=new Ut),a.assign(this.actualBounds)},pr.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function TS(a){var y=tt.alloc(),x=a.locationObject,b=x.naturalBounds,E=x instanceof io?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 qf(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=cS(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 z=y.width;y=y.height;var te=a.shadowBlur;return a=a.shadowOffset,z+=te,y+=te,b-=te/2,E-=te/2,0<a.x?z+=a.x:(b+=a.x,z-=a.x),0<a.y?y+=a.y:(E+=a.y,y-=a.y),x.h(b-1,E-1,z+2,y+2),x}pr.prototype.arrange=function(){if(Bt(this)===!1)BS(this);else{Kt(this,!1);var a=this.Ib,y=Ut.alloc();y.assign(a);var x=vf(this);this.eh(0,0,this.uc.width,this.uc.height);var b=this.position;IS(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()||Jt.B(y.width,a.width)&&Jt.B(y.height,a.height)||0<=this.vw&&this.C(16),Ut.free(y),Uv(this,!1)}},Le=pr.prototype,Le.Xl=function(a,y){var x=this.diagram;if(x!==null){var b=!1;if(x.Zi===!1&&a.w()){var E=Ut.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),Ut.free(E)}!(this.G&65536)&&a.D(y)||jS(this,b,x),x.N(),!a.w()&&!y.w()||Zi(a,y)||(this instanceof Di&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},Le.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var b=this.diagram;return b!==null&&kS(this,b,a,y,x),this.pa=a,this.G&=-2097153,!this.ke.w()||b!==null&&!b.animationManager.isTicking&&b.undoManager.isUndoingRedoing||(b=this.ke,this.ke=new tt(b.x+(a.x-y),b.y+(a.y-x)),this.g("location",b,this.ke.copy())),mf(this)===!1&&Bt(this)===!1&&(d0(this),BS(this)),!0};function kS(a,y,x,b,E){y===null||a instanceof jo||(y=y.animationManager,y.zb&&uc(y,a,new tt(b,E),x))}Le.mm=function(a,y,x){var b=this.ke,E=this.pa;if(x){if(b.x===a&&b.y===y)return;mf(this)||Bt(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)}d0(this)},Le.Av=function(){this.G&=-2097153,d0(this)};function IS(a,y,x){var b=TS(a),E=a.diagram,z=x.w(),te=y.w();z&&te?a.G&2097152?OS(a,y,x,E,b):RS(a,y,x,E,b):z?OS(a,y,x,E,b):te&&RS(a,y,x,E,b),a.G|=2097152,tt.free(b),a.Uk()}function OS(a,y,x,b,E){var z=y.x,te=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 jo||uc(x,a,new tt(z,te),y),b||y.x===z&&y.y===te||a.g("position",new tt(z,te),y.copy()))}function RS(a,y,x,b,E){var z=x.copy();x.h(y.x+E.x,y.y+E.y),x.D(z)||b===null||a.g("location",z,x.copy())}function jS(a,y,x){_v(a,!1),a instanceof Di&&sh(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var b=x.viewportBounds;b.w()?vf(a)?(rr(y,b)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(b)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}Le.si=function(){return!0},Le.Zc=function(){return!0},Le.ph=function(){return!1},Le.Dd=function(){return!0};function Vv(a,y,x,b){y.constructor===a.constructor||ZS||(ZS=!0,Si('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),Si(" Old class: "+Hn(a.constructor)+", new class: "+Hn(y.constructor)+", part: "+a.toString())),a.Ej();var E=a.data;x=a.layerName;var z=a.isSelected,te=a.isHighlighted,re=!0,oe=!0,le=!1;a instanceof Di&&(re=a.isTreeLeaf,oe=a.isTreeExpanded,le=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=z?a.G|4096:a.G&-4097,a.G=te?a.G|524288:a.G&-524289,a instanceof Di&&(a.U=re?a.U|4:a.U&-5,a.U=oe?a.U|1:a.U&-2,a.U=le?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)}pr.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},pr.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},pr.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},pr.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},pr.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},pr.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},pr.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},pr.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},pr.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 mf(a){return(a.G&32768)!==0}function Uv(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 vf(a){return(a.G&131072)!==0}Le=pr.prototype,Le.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function h0(a,y){a.G=y?a.G|1048576:a.G&-1048577}Le.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},Le.N=function(){var a=this.diagram;a!==null&&!Bt(this)&&!mf(this)&&this.isVisible()&&this.Ib.w()&&a.N(qf(this,this.Ib))},Le.v=function(){hi.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof Di&&this.labeledLink!==null&&bl(this.labeledLink),a.$b(!0))},Le.Vo=function(a){a||(a=this.Ah,a!==null&&ey(a,this))},Le.Wo=function(a){a||(a=this.Ah,a!==null&&ty(a,this))},Le.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},Le.oz=function(){return Xv(this,this)};function Xv(a,y){var x=y.containingGroup;return x!==null?1+Xv(a,x):y instanceof Di&&(y=y.labeledLink,y!==null)?Xv(a,y):0}Le.sz=function(){return zS(this,this)};function zS(a,y){var x=y.containingGroup;return x!==null||y instanceof Di&&(x=y.labeledLink,x!==null)?zS(a,x):y}Le.Td=function(a){return a instanceof Yr?Yv(this,this,a):!1};function Yv(a,y,x){if(y===x||x===null)return!1;var b=y.containingGroup;return b===null||b!==x&&!Yv(a,b,x)?y instanceof Di&&(y=y.labeledLink,y!==null)?Yv(a,y,x):!1:!0}Le.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof Yr&&h0(y,!0),y instanceof Di){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 Di&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof Yr&&h0(y,!1),y instanceof Di&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},pr.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof Di&&this.isLinkLabel)},pr.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 Di&&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 HS(a){return a.isVisible()?(a=a.layer,!(a!==null&&a.isTemporary)):!1}function yf(a,y,x,b,E,z){if(z===void 0&&(z=null),!(a.contains(y)||z!==null&&!z(y)||y instanceof jo)){if(a.add(y),y instanceof Di){if(x&&y instanceof Yr)for(var te=y.memberParts;te.next();)yf(a,te.value,x,b,E,z);if(E!==!1)for(te=y.linksConnected;te.next();){var re=te.value;if(!a.contains(re)){var oe=re.fromNode,le=re.toNode;oe=oe===null||a.contains(oe),le=le===null||a.contains(le),(E?oe&&le:oe||le)&&yf(a,re,x,b,E,z)}}if(1<b)for(y=y.Ou();y.next();)yf(a,y.value,x,b-1,E,z)}else if(y instanceof vi)for(y=y.labelNodes;y.next();)yf(a,y.value,x,b,E,z)}}Je.Object.defineProperties(pr.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?gr: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(cs,"parts",y,this,null,b,!0),b=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=b&&x.cb(Va,"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&&(ou(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&&zu(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 jo?this.type!==hi.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:lo},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),ou(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(),ou(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&&(ou(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:Ba},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),ou(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,Bt(this)===!1&&(d0(this),x=this.pa,x.w())){var E=this.diagram;if(E===null||E.animationManager.isTicking||!E.undoManager.isUndoingRedoing){var z=x.copy();x.h(x.x+(y.x-b.x),x.y+(y.y-b.y)),kS(this,E,x,z.x,z.y),this.g("position",z,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 jo)){var z=x.model.undoManager;z.isEnabled&&!z.isUndoingRedoing&&(E=this.clone(),E.O.addAll(this.O))}this.Tf=a,this.g("category",y,a),x===null||b===null||this instanceof jo?this instanceof jo&&(E=this.adornedPart,E!==null&&(a=E.Qf,a!==null&&a.remove(y),E.bh(this.category,this))):(z=x.model,z.undoManager.isUndoingRedoing||(this.ph()?(x.partManager.setLinkCategoryForData(b,a),x=x.partManager.findLinkTemplateForCategory(a),x!==null&&(hc(x),x=x.copy(),x!==null&&Vv(this,x,y,a))):(z!==null&&z.jm(b,a),x=h1(x.partManager,b,a),x!==null&&(hc(x),x=x.copy(),x===null||x instanceof vi||(b=this.location.copy(),Vv(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){Vv(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&&(ou(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&&(ou(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&&(ou(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 vi?(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&&(ou(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&&(ou(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&&(ou(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:ta},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),ou(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&&(ou(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&&(ou(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:Vo},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),ou(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&&St("Cannot make a Group a member of itself: "+this.toString()),St("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?ty(y,this):this instanceof Yr&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?ey(a,this):this instanceof Yr&&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 z=E.wa(a!==null?a.data:null);E.mp(b,z)}}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 Yr){for(x=new _n,yf(x,this,!0,0,!0),x=x.iterator;x.next();)if(b=x.value,b instanceof Di)for(b=b.linksConnected;b.next();)mp(b.value)}if(this instanceof Di){for(x=this.linksConnected;x.next();)mp(x.value);x=this.labeledLink,x!==null&&mp(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&zu(y,-1,a))}}else St("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&&(ou(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof Di&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(ou(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&&(ou(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:vo},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),ou(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&&(ou(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&&(ou(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),pr.prototype.invalidateLayout=pr.prototype.C,pr.prototype.findCommonContainingGroup=pr.prototype.px,pr.prototype.isMemberOf=pr.prototype.Td,pr.prototype.findTopLevelPart=pr.prototype.sz,pr.prototype.findSubGraphLevel=pr.prototype.oz,pr.prototype.ensureBounds=pr.prototype.Va,pr.prototype.getDocumentBounds=pr.prototype.mi,pr.prototype.findObject=pr.prototype.fb,pr.prototype.moveTo=pr.prototype.moveTo,pr.prototype.invalidateAdornments=pr.prototype.Wb,pr.prototype.clearAdornments=pr.prototype.Ej,pr.prototype.removeAdornment=pr.prototype.Jf,pr.prototype.addAdornment=pr.prototype.bh,pr.prototype.findAdornment=pr.prototype.Pj,pr.prototype.updateTargetBindings=pr.prototype.La;var ZS=!1;pr.className="Part",pr.LayoutNone=0,pr.LayoutAdded=1,pr.LayoutRemoved=2,pr.LayoutShown=4,pr.LayoutHidden=8,pr.LayoutNodeSized=16,pr.LayoutGroupLayout=32,pr.LayoutNodeReplaced=64,pr.LayoutStandard=127,pr.LayoutAll=16777215;function jo(a,y){a===void 0||a instanceof Es||typeof a=="string"?pr.call(this,a):(pr.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)}$t(jo,pr),jo.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},jo.prototype.updateRelationshipsFromData=function(){},jo.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof vi&&y instanceof io){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 io&&(E.ua=a)}}},jo.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!Bt(a))},jo.prototype.Zc=function(){return!1},jo.prototype.gk=function(a,y,x,b,E,z,te){if(a===Va&&y==="elements"){if(E instanceof Hl)this.$a===null&&(this.$a=E);else if(E instanceof hi){var re=E.Nl(function(oe){return oe instanceof Hl});re instanceof Hl&&this.$a===null&&(this.$a=re)}}else a===cs&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof hi&&this.$a.rg(b)&&(this.$a=null));pr.prototype.gk.call(this,a,y,x,b,E,z,te)},jo.prototype.updateAdornments=function(){},jo.prototype.Lj=function(){},Je.Object.defineProperties(jo.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}}}),jo.className="Adornment";function Jv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=Ys,this.er=p0,this.Kr=this.ij=this.Nq=this.Mq=null}Jv.prototype.copy=function(){var a=new Jv;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 Di(a,y){a===void 0||a instanceof Es||typeof a=="string"?pr.call(this,a):(pr.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new kn,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}$t(Di,pr),Di.prototype.cloneProtected=function(a){pr.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},Le=Di.prototype,Le.Af=function(a){pr.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function Wh(a){a.Ba===null?a.Ba=new Jv:a.Ba.nc&&(a.Ba=a.Ba.copy())}Le.th=function(){pr.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function WS(a,y){y!==null&&(a.af===null&&(a.af=new _n),a.af.add(y))}function GS(a,y,x,b){if(y===null||a.af===null)return null;for(var E=a.af.iterator;E.next();){var z=E.value;if(z.Ds===a&&z.cv===y&&z.Ox===x&&z.Px===b||z.Ds===y&&z.cv===a&&z.Ox===b&&z.Px===x)return z}return null}Le.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=GS(this,a,y,x),a!==null&&a.Sl()},Le.gk=function(a,y,x,b,E,z,te){a===Va&&y==="elements"?this.wc=null:a===cs&&y==="elements"&&(this.wc=null),pr.prototype.gk.call(this,a,y,x,b,E,z,te)},Le.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(Bu(x.fromPort),Bu(x.toPort),x.bb())}};function $S(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(Bu(x.fromPort),Bu(x.toPort),x.bb())}}function Bu(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||Bu(y.port)}}Le.si=function(){return!0},Di.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},Di.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},Di.prototype.isVisible=function(){if(!pr.prototype.isVisible.call(this))return!1;var a=!0,y=hd,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===hd){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===ts){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(b){return!b.isTreeExpanded}))return!1}else if(y===ch&&(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},Di.prototype.Zb=function(a){pr.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)}},Di.prototype.qx=function(){var a=new _n,y=new _n;return KS(this,this,a,y),y.iterator};function KS(a,y,x,b){if(y!==null&&!x.has(y)){x.add(y);var E=!0,z=a.diagram;z!==null&&(E=z.isTreePathToChildren),y.linksConnected.each(function(te){te.isTreeLink?(E?te.fromNode===y:te.toNode===y)&&KS(a,E?te.toNode:te.fromNode,x,b):b.add(te)})}}Di.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new Ki(this.jb),x=this;return y.predicate=function(b){return b.fromNode===x&&b.fromPortId===a||b.toNode===x&&b.toPortId===a},y},Le=Di.prototype,Le.Mo=function(a){a===void 0&&(a=null);var y=new Ki(this.jb),x=this;return y.predicate=function(b){return b.fromNode!==x?!1:a===null?!0:b.fromPortId===a},y},Le.Sd=function(a){a===void 0&&(a=null);var y=new Ki(this.jb),x=this;return y.predicate=function(b){return b.toNode!==x?!1:a===null?!0:b.toPortId===a},y},Le.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 _n,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 _n,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new hr(x):gr},Le.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 _n,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new hr(x):gr},Le.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 _n,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new hr(x):gr},Le.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new Ki(this.jb),E=this;return b.predicate=function(z){return!((z.fromNode!==E||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)&&(z.fromNode!==a||z.toNode!==E||x!==null&&z.fromPortId!==x||y!==null&&z.toPortId!==y))},b},Le.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new Ki(this.jb),E=this;return b.predicate=function(z){return!(z.fromNode!==E||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)},b};function f0(a,y,x){Bu(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 z=!0,te=a.diagram;te!==null&&(z=te.aa,te.aa=!0),E(a,y,x),te!==null&&(te.aa=z)}}!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,z=b?x:y,E.ci||(E.ci=z),!z.isTreeLeaf||a!==null&&a.undoManager.isUndoingRedoing||(b?x===z&&(z.isTreeLeaf=!1):y===z&&(z.isTreeLeaf=!1))))}function g0(a,y,x){Bu(x);var b=a.jb.remove(y),E=null;if(b||y.toNode===y.fromNode){var z=a.linkDisconnected;if(E=a.diagram,z!==null){var te=!0;E!==null&&(te=E.aa,E.aa=!0),z(a,y,x),E!==null&&(E.aa=te)}}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)):Qp(y)))}function Qp(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}}}Di.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},Le=Di.prototype,Le.Vo=function(a){pr.prototype.Vo.call(this,a),a||(Qp(this),a=this.Yk,a!==null&&e1(a,this))},Le.Wo=function(a){pr.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},Le.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,pr.prototype.Lj.call(this)},Le.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;VS(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function VS(a){a.wc===null?a.wc=new Ii:a.wc.clear(),a.qm(a,function(y,x){US(y,x)}),a.wc.count===0&&a.wc.add("",a)}function US(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function Qv(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=mn()),x.push(b);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);Wn(x)}}}Le.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},Le.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}},Le.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)h0(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;)h0(y,!1),y=y.pg();return x},Le.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},Le.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof Di)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},Le.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 _n;return a(this,y),y},Le.uz=function(){return _S(this,this)};function _S(a,y){return y=y.pg(),y===null?0:1+_S(a,y)}Le.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new Ki(this.jb);var x=this;return y.predicate=a?function(b){return!!(b.isTreeLink&&b.fromNode===x)}:function(b){return!!(b.isTreeLink&&b.toNode===x)},y},Le.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 kn,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 kn,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new hr(x):gr},Le.wz=function(a){a===void 0&&(a=1/0);var y=new _n;return yf(y,this,!1,a,!0),y},Di.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 _n;x.add(this),XS(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===hd),y.Ue=!1}};function XS(a,y,x,b,E,z,te){if(1<b)for(var re=x?a.Mo():a.Sd();re.next();){var oe=re.value;oe.isTreeLink&&(oe=oe.To(a),oe===null||oe===a||y.contains(oe)||(y.add(oe),XS(oe,y,x,b-1,E,z,te)))}else YS(a,y,x,E,z,te)}function YS(a,y,x,b,E,z){for(var te=E===a?!0:a.isTreeExpanded,re=x?a.Mo():a.Sd(),oe={};re.next();){var le=re.value;if(le.isTreeLink&&(le=le.To(a),le!==null&&le!==a)){var ue=y.contains(le);if(ue||y.add(le),te){var me=x?le.Oo():le.Po();oe.uv=a,me.all(function(we){return function(Me){return Me===we.uv||!Me.isTreeExpanded}}(oe))&&b.Aj(le,E),le.oh(),le.Zb(!1)}le.isTreeExpanded&&(le.wasTreeExpanded=le.isTreeExpanded,ue||YS(le,y,x,b,E,z))}oe={uv:oe.uv}}a.isTreeExpanded=!1}Di.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 _n;x.add(this),JS(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===hd),y.Ue=!1}};function JS(a,y,x,b,E,z,te){for(var re=z===a?!1:a.isTreeExpanded,oe=x?a.Mo():a.Sd(),le={};oe.next();){var ue=oe.value;if(ue.isTreeLink&&(re||ue.fd||ue.bb(),ue=ue.To(a),ue!==null&&ue!==a&&!y.contains(ue))){if(y.add(ue),!re){ue.Zb(!0),ue.oh();var me=x?ue.Oo():ue.Po();le.vv=a,me.all(function(we){return function(Me){return Me===we.vv||!Me.isTreeExpanded}}(le))&&E.Cj(ue,z)}(2<b||ue.wasTreeExpanded)&&(ue.wasTreeExpanded=!1,JS(ue,y,x,b-1,E,z,te))}le={vv:le.vv}}a.isTreeExpanded=!0}Je.Object.defineProperties(Di.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:p0},set:function(a){var y=this.portSpreading;y!==a&&(Wh(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:Ys},set:function(a){typeof a=="number"&&(a=new Oi(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),Wh(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&&(Wh(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&&(Wh(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&&(Wh(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,z=x.model;if(E!==null&&z.ri()){var te=z.wa(b);te!==void 0&&z.Qx(E,te)}}this.containingGroup=null}this.Yk=a,a!==null&&(e1(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),bl(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&VS(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&&(Wh(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))}}}),Di.prototype.expandTree=Di.prototype.expandTree,Di.prototype.collapseTree=Di.prototype.collapseTree,Di.prototype.findTreeParts=Di.prototype.wz,Di.prototype.findTreeChildrenNodes=Di.prototype.Ou,Di.prototype.findTreeChildrenLinks=Di.prototype.Qo,Di.prototype.findTreeLevel=Di.prototype.uz,Di.prototype.findTreeParentChain=Di.prototype.vz,Di.prototype.findTreeParentNode=Di.prototype.pg,Di.prototype.findTreeParentLink=Di.prototype.kh,Di.prototype.findCommonTreeParent=Di.prototype.gz,Di.prototype.findTreeRoot=Di.prototype.xz,Di.prototype.isInTreeOf=Di.prototype.Nz,Di.prototype.findPort=Di.prototype.ns,Di.prototype.findLinksTo=Di.prototype.kz,Di.prototype.findLinksBetween=Di.prototype.jz,Di.prototype.findNodesInto=Di.prototype.Oo,Di.prototype.findNodesOutOf=Di.prototype.Po,Di.prototype.findNodesConnected=Di.prototype.Mu,Di.prototype.findLinksInto=Di.prototype.Sd,Di.prototype.findLinksOutOf=Di.prototype.Mo,Di.prototype.findExternalTreeLinksConnected=Di.prototype.qx,Di.prototype.invalidateConnectedLinks=Di.prototype.Bd,Di.prototype.invalidateLinkBundle=Di.prototype.Lz;var bx=new ln(Di,"SpreadingNone",10),p0=new ln(Di,"SpreadingEvenly",11),qv=new ln(Di,"SpreadingPacked",12);Di.className="Node",Di.SpreadingNone=bx,Di.SpreadingEvenly=p0,Di.SpreadingPacked=qv;function Yr(a,y){a===void 0||a instanceof Es||typeof a=="string"?Di.call(this,a):(Di.call(this),a&&(y=a)),this.U|=4608,this.Gn=new _n,this.$a=null,this.Sc=new Ma,this.Sc.group=this,this.gl=new _n,this.tb=this.$p=null,y&&Object.assign(this,y)}$t(Yr,Di),Yr.prototype.cloneProtected=function(a){Di.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof Hl});y instanceof Hl?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())},Le=Yr.prototype,Le.Af=function(a){Di.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 Di)x.Bd(y);else if(x instanceof vi)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},Le.gk=function(a,y,x,b,E,z,te){if(a===Va&&y==="elements"){if(E instanceof Hl)this.$a===null?this.$a=E:this.$a!==E&&St("Cannot insert a second Placeholder into the visual tree of a Group.");else if(E instanceof hi){var re=E.Nl(function(oe){return oe instanceof Hl});re instanceof Hl&&(this.$a===null?this.$a=re:this.$a!==re&&St("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===cs&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof hi&&this.$a.rg(b)&&(this.$a=null));Di.prototype.gk.call(this,a,y,x,b,E,z,te)},Le.Xl=function(a,y){Di.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==hi.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof hi&&(a=a.Pb()),this.tb===null&&(this.tb=new Ut),a.mi(this.tb),a instanceof io&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},Le.eh=function(a,y,x,b){this.nf=this.$a,Di.prototype.eh.call(this,a,y,x,b)},Le.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof vi||y.Va()}),Di.prototype.Va.call(this)},Le.si=function(){if(!Di.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof Di){if(y.isVisible()&&Bt(y))return!1}else if(y instanceof vi&&y.isVisible()&&Bt(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function ey(a,y){if(a.Gn.add(y)){y instanceof Yr&&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 vi&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function ty(a,y){if(a.Gn.remove(y)){y instanceof Yr&&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 vi&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}Le.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)}Di.prototype.Lj.call(this)},Yr.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=Rn(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},Yr.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var b=!0;for(a=Rn(a).iterator;a.next();){var E=a.value;!y||x.isValidMember(this,E)?E.containingGroup=this:b=!1}return b},Yr.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))},Le=Yr.prototype,Le.Bd=function(a){var y=(this.U&65536)!==0;if(Di.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()?(Bu(x.fromPort),Bu(x.toPort),x.bb()):(b=x.toNode,b!==null&&b!==this&&b.Td(this)&&!b.isVisible()&&(Bu(x.fromPort),Bu(x.toPort),x.bb()))}}},Le.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 _n,b=y.iterator;b.next();){var E=b.value;if(E instanceof Di)for(E=E.linksConnected;E.next();){var z=E.value;y.contains(z)||x.add(z)}}return a&&(this.$p=x),x.iterator},Le.iz=function(){var a=this.Rj();a.add(this);for(var y=new _n,x=a.iterator;x.next();){var b=x.value;if(b instanceof Di)for(b=b.linksConnected;b.next();){var E=b.value,z=E.fromNode;z===null||a.contains(z)&&z!==this||y.add(z),E=E.toNode,E===null||a.contains(E)&&E!==this||y.add(E)}}return y.iterator},Le.hz=function(){function a(x,b){x!==null&&(b.add(x),a(x.containingGroup,b))}var y=new _n;return a(this,y),y},Le.Rj=function(){var a=new _n;return yf(a,this,!0,0,!0),a.remove(this),a},Le.Zb=function(a){Di.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},Yr.prototype.collapseSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();QS(this,y,a,this),a.Ue=!1}};function QS(a,y,x,b){for(var E=a.memberParts;E.next();){var z=E.value;if(z.Zb(!1),z instanceof Yr&&z.isSubGraphExpanded&&(z.wasSubGraphExpanded=z.isSubGraphExpanded,QS(z,y,x,b)),z instanceof Di)z.Bd(y),x.Aj(z,b);else if(z instanceof vi)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!1}Yr.prototype.expandSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();qS(this,y,a,this),a.Ue=!1}};function qS(a,y,x,b){for(var E=a.memberParts;E.next();){var z=E.value;if(z.Zb(!0),z instanceof Yr&&z.wasSubGraphExpanded&&(z.wasSubGraphExpanded=!1,qS(z,y,x,b)),z instanceof Di)z.Bd(y),x.Cj(z,b);else if(z instanceof vi)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!0}Yr.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,z=a.y;if(!(b===E||isNaN(b)&&isNaN(E))||!(x===z||isNaN(x)&&isNaN(z))){for(b=E-(isNaN(b)?0:b),x=z-(isNaN(x)?0:x),z=tt.alloc(),Di.prototype.move.call(this,a,y),a=new _n,y=this.Rj().iterator;y.next();)E=y.value,E instanceof vi&&(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 Di&&E.isLinkLabel)){var te=E.position,re=E.location;te.w()?(z.x=te.x+b,z.y=te.y+x,E.position=z):re.w()&&(z.x=re.x+b,z.y=re.y+x,E.location=z)}for(y.reset();y.next();)E=y.value,E instanceof vi&&(E.suspendsRouting=a.contains(E),E.fd||E.fromNode!==this&&E.toNode!==this)&&(te=E.position,z.x=te.x+b,z.y=te.y+x,z.w()?E.move(z):E.bb(),iy(E)&&E.bb());tt.free(z)}},Je.Object.defineProperties(Yr.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&&St("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&&(Wh(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&&(Wh(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&&(Wh(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&&(Wh(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)}}}),Yr.prototype.expandSubGraph=Yr.prototype.expandSubGraph,Yr.prototype.collapseSubGraph=Yr.prototype.collapseSubGraph,Yr.prototype.findSubGraphParts=Yr.prototype.Rj,Yr.prototype.findContainingGroupChain=Yr.prototype.hz,Yr.prototype.findExternalNodesConnected=Yr.prototype.iz,Yr.prototype.findExternalLinksConnected=Yr.prototype.Lu,Yr.prototype.ensureBounds=Yr.prototype.Va,Yr.className="Group";function Hl(a){Yt.call(this),this.yb=Ls,this.ko=new Ut(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}$t(Hl,Yt),Hl.prototype.cloneProtected=function(a){Yt.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},Hl.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return xr(0,0,y.width,y.height,a.x,a.y)},Hl.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof Yr||a instanceof jo)||St("Placeholder is not inside a Group or Adornment."),a instanceof Yr){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(Ui(b,(isFinite(x.width)?Math.max(x.width,y.width):y.width)||0,(isFinite(x.height)?Math.max(x.height,y.height):y.height)||0),this.Ge(0,0,b.width,b.height),b=a.memberParts,x=!1;b.next();)if(b.value.isVisible()){x=!0;break}b=a.diagram,!x||b===null||b.animationManager.Xu(a)||isNaN(y.x)||isNaN(y.y)||(x=tt.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),tt.free(x))}else{y=this.dc,x=this.yb,b=x.left+x.right;var E=x.top+x.bottom,z=a.adornedObject;a.angle=z.li();var te=0;z instanceof io&&(te=z.strokeWidth);var re=z.Df(),oe=z.naturalBounds,le=(oe.width+te)*re;te=(oe.height+te)*re,a.type!==hi.Link&&(re=z.ga(a.category==="Selection"?Ba:a.locationSpot,tt.alloc()),a.location=re,tt.free(re)),isNaN(le)||isNaN(te)?(a=z.ga(Ba,tt.alloc()),le=Ut.allocAt(a.x,a.y,0,0),le.Ye(z.ga(vl,a)),le.Ye(z.ga(su,a)),le.Ye(z.ga(Ml,a)),Ui(y,le.width+b||0,le.height+E||0),this.Ge(-x.left,-x.top,y.width,y.height),tt.free(a),Ut.free(le)):(Ui(y,le+b||0,te+E||0),this.Ge(-x.left,-x.top,y.width,y.height))}},Hl.prototype.eh=function(a,y,x,b){this.actualBounds.h(a,y,x,b)},Hl.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,b=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof Yr&&!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=Ut.alloc(),E=this.computeMemberBounds(x);var z=this.yb;return y instanceof Yr&&!y.isSubGraphExpanded?a.h(E.x-z.left,E.y-z.top,0,0):a.h(E.x-z.left,E.y-z.top,Math.max(E.width+z.left+z.right,0),Math.max(E.height+z.top+z.bottom,0)),Ut.free(x),b&&y instanceof Yr&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Hl.prototype.computeMemberBounds=function(a){if(!(this.part instanceof Yr))return a.h(0,0,0,0),a;for(var y=this.part,x=1/0,b=1/0,E=-1/0,z=-1/0,te=y.memberParts;te.next();){var re=te.value;if(re.isVisible()){if(re instanceof vi&&(!y.computesBoundsIncludingLinks||mt(re)||re.fromNode===y||re.toNode===y))continue;re=re.actualBounds,re.left<x&&(x=re.left),re.top<b&&(b=re.top),re.right>E&&(E=re.right),re.bottom>z&&(z=re.bottom)}}return isFinite(x)&&isFinite(b)?a.h(x,b,E-x,z-b):(y=y.location,a.h(y.x,y.y,0,0)),a},Je.Object.defineProperties(Hl.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Oi(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Hl.className="Placeholder";function vi(a){pr.call(this,hi.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=Zl,this.Om=0,this.Qm=Zl,this.Rm=NaN,this.qj=ay,this.po=.5,this.wd=null,this.Nb=new kn().freeze(),this.Tg=this.Mg=null,this.ml=new Ut,this.ua=new xi,this.u=this.o=this.Sf=this.Wf=null,this.su=new tt,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}$t(vi,pr),vi.prototype.cloneProtected=function(a){pr.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())},Le=vi.prototype,Le.Af=function(a){pr.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&&Bu(y),a=a.toPort,a!==null&&Bu(a)},Le.qb=function(a){a.classType===vi?(a.value&2)===2?this.routing=a:a===$u||a===$h||a===yp?this.curve=a:a===tm||a===P0||a===w0?this.adjusting=a:a!==ay&&a!==Zl&&St("Unknown Link enum value for a Link property: "+a):pr.prototype.qb.call(this,a)},Le.Xc=function(){this.ba===null&&(this.ba=new to)},Le.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),Bt(a)||mf(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),Bt(a)||mf(a)))},Le.zv=function(){return!1},Le.Av=function(){},Le.Zc=function(){return!1},vi.prototype.computeAngle=function(a,y,x){return vi.computeAngle(y,x)},vi.computeAngle=function(a,y){switch(a){default:case Zl:a=0;break;case nm:a=y;break;case im:a=y+90;break;case rm:a=y-90;break;case sy:a=y+180;break;case C0:a=Jt.bp(y),90<a&&270>a&&(a-=180);break;case om:a=Jt.bp(y+90),90<a&&270>a&&(a-=180);break;case am:a=Jt.bp(y-90),90<a&&270>a&&(a-=180);break;case b0:if(a=Jt.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return Jt.bp(a)};function mp(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&&ty(x,a),a.Ah=y,y!==null&&ey(y,a);var E=a.containingGroupChanged;if(E!==null){var z=!0,te=a.diagram;te!==null&&(z=te.aa,te.aa=!0),E(a,x,y),te!==null&&(te.aa=z)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=b}Le=vi.prototype,Le.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&pr.prototype.oh.call(this)},Le.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},Le.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function e1(a,y){a.wd===null&&(a.wd=new _n),a.wd.add(y),a.v()}Le.Vo=function(a){if(pr.prototype.Vo.call(this,a),eg(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,f0(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||f0(x,this,b)}qp(this)}},Le.Wo=function(a){if(pr.prototype.Wo.call(this,a),eg(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,g0(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||g0(x,this,b)}em(this)}},Le.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))},vi.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},vi.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?pr.prototype.move.call(this,a,!1):(a=tt.allocAt(x.x+b,x.y+E),pr.prototype.move.call(this,a,!1),tt.free(a)),Gh(this,b,E),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+b,x.y+E)},vi.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},vi.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},vi.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(po),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()===$u))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()===$u){if(y===3){x=this.i(0),b=this.i(1);var E=this.i(2);return Jt.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 z=this.i(x+2);x=this.i(x+3),Jt.ax(b.x,b.y,E.x,E.y,z.x,z.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var te=this.flattenedLengths;for(x=this.flattenedTotalLength,E=z=b=0;b<x/2&&z<y&&(E=te[z],!(b+E>x/2));)b+=E,z++;return y=this.i(z),z=this.i(z+1),1>Math.abs(y.x-z.x)?y.y>z.y?a.h(y.x,y.y-(x/2-b)):a.h(y.x,y.y+(x/2-b)):1>Math.abs(y.y-z.y)?y.x>z.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*(z.x-y.x),y.y+x*(z.y-y.y))),a},vi.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()===$u))return this.ua.wx(.5);if(this.computeCurve()===$u&&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),Jt.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 z;E<b/2&&x<a&&(z=y[x],!(E+z>b/2));)E+=z,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)},Le=vi.prototype,Le.i=function(a){return this.Nb.s[a]},Le.dd=function(a,y){this.Nb.cd(a,y)},Le.L=function(a,y,x){this.Nb.cd(a,new tt(y,x))},Le.Kz=function(a,y){this.Nb.Gb(a,y)},Le.m=function(a,y,x){this.Nb.Gb(a,new tt(y,x))},Le.ne=function(a){this.Nb.add(a)},Le.yf=function(a,y){this.Nb.add(new tt(a,y))},Le.pv=function(a){this.Nb.mb(a)},Le.Fj=function(){this.Nb.clear()};function Gh(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 kn,z=a.Nb.iterator;z.next();){var te=z.value;E.add(new tt(te.x+y,te.y+x).freeze())}E.freeze(),z=a.Nb,a.Nb=E,te=a.diagram,isNaN(y)||isNaN(x)||te!==null&&te.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),bl(a)),b?m0(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),te!==null&&te.animationManager.zb&&da(te.animationManager,a,E),a.g("points",z,E)}}Le.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},Le.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,b=1/0,E=a.s,z=E.length,te=0;te<z;te++){var re=E[te];x=Math.min(re.x,x),b=Math.min(re.y,b)}re=te=1/0;for(var oe=y.s,le=oe.length,ue=0;ue<le;ue++){var me=oe[ue];te=Math.min(me.x,te),re=Math.min(me.y,re),me.freeze()}if(y.freeze(),le===z){for(z=0;z<le;z++)if(ue=E[z],me=oe[z],ue.x-x!==me.x-te||ue.y-b!==me.y-re){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&da(x.animationManager,this,y),m0(this),this.g("points",a,y)}},Le.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function m0(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),x0(a,!1))}Le.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())}},Le.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()}}},vi.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Ig||(Ig=new Di,Ig.desiredSize=Tr,Ig.Va()),this.defaultFromPoint&&(Ig.location=this.defaultFromPoint,Ig.Va(),y=a=Ig)):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?(Og||(Og=new Di,Og.desiredSize=Tr,Og.Va()),this.defaultToPoint&&(Og.location=this.defaultToPoint,Og.Va(),E=b=Og)):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 z=this.pointsCount,te=this.computeSpot(!0,y);x=this.computeSpot(!1,E);var re=vp(te),oe=vp(x),le=y===E&&y!==null,ue=this.isOrthogonal,me=this.curve===$u;this.Wf=le&&!ue?me=!0:!1;var we=this.computeAdjusting()===Zl||le;if(!ue&&!le&&re&&oe){if(re=!1,!we&&3<=z&&(we=this.getLinkPoint(a,y,te,!0,!1,b,E),oe=this.getLinkPoint(b,E,x,!1,!1,a,y),re=this.adjustPoints(0,we,z-1,oe))&&(we=this.getLinkPoint(a,y,te,!0,!1,b,E),oe=this.getLinkPoint(b,E,x,!1,!1,a,y),this.adjustPoints(0,we,z-1,oe)),!re)if(this.Fj(),me){z=this.getLinkPoint(a,y,te,!0,!1,b,E),we=this.getLinkPoint(b,E,x,!1,!1,a,y),re=we.x-z.x,oe=we.y-z.y,le=this.computeCurviness(),me=ue=0;var Me=z.x+re/3,Te=z.y+oe/3,je=Me,ct=Te;Jt.B(oe,0)?ct=0<re?ct-le:ct+le:(ue=-re/oe,me=Math.sqrt(le*le/(ue*ue+1)),0>le&&(me=-me),je=(0>oe?-1:1)*me+Me,ct=ue*(je-Me)+Te),Me=z.x+2*re/3,Te=z.y+2*oe/3;var nt=Me,bt=Te;Jt.B(oe,0)?bt=0<re?bt-le:bt+le:(nt=(0>oe?-1:1)*me+Me,bt=ue*(nt-Me)+Te),this.Fj(),this.ne(z),this.yf(je,ct),this.yf(nt,bt),this.ne(we),this.dd(0,this.getLinkPoint(a,y,te,!0,!1,b,E)),this.dd(3,this.getLinkPoint(b,E,x,!1,!1,a,y))}else z=b,we=E,b=this.getLinkPoint(a,y,te,!0,!1,z,we),E=this.getLinkPoint(z,we,x,!1,!1,a,y),this.hasCurviness()?(we=E.x-b.x,x=E.y-b.y,te=this.computeCurviness(),a=b.x+we/2,y=b.y+x/2,z=a,re=y,Jt.B(x,0)?re=0<we?re-te:re+te:(we=-we/x,z=Math.sqrt(te*te/(we*we+1)),0>te&&(z=-z),z=(0>x?-1:1)*z+a,re=we*(z-a)+y),this.ne(b),this.yf(z,re),this.ne(E)):(this.ne(b),this.ne(E),re=Ut.alloc(),y.mi(re),oe=re.ca(E),we.mi(re),le=re.ca(b),(oe||le)&&(te=y.ga(y0(te),new tt),this.dd(0,this.getLinkPointFromPoint(a,y,te,E,!0,te)),x=we.ga(y0(x),new tt),this.dd(1,this.getLinkPointFromPoint(z,we,x,b,!1,x))),Ut.free(re))}else{me=this.isAvoiding,we&&(ue&&me||le)&&this.Fj();var Nt=le?this.computeCurviness():0;me=this.getLinkPoint(a,y,te,!0,ue,b,E),Me=je=Te=0,(ue||!re||le)&&(ct=this.computeEndSegmentLength(a,y,te,!0),Me=this.getLinkDirection(a,y,me,te,!0,ue,b,E),le&&(re||te.D(x)||!ue&&te.x+x.x===1&&te.y+x.y===1)&&(Me-=ue?90:30,0>Nt&&(Me-=180)),0>Me?Me+=360:360<=Me&&(Me-=360),le&&(ct+=Math.abs(Nt)*(ue?1:2)),Me===0?Te=ct:Me===90?je=ct:Me===180?Te=-ct:Me===270?je=-ct:(Te=ct*Math.cos(Me*Math.PI/180),je=ct*Math.sin(Me*Math.PI/180)),te.Mc()&&le&&(ct=y.ga(wo,tt.alloc()),nt=tt.allocAt(ct.x+1e3*Te,ct.y+1e3*je),this.getLinkPointFromPoint(a,y,ct,nt,!0,me),tt.free(ct),tt.free(nt))),ct=this.getLinkPoint(b,E,x,!1,ue,a,y);var Ot=bt=nt=0;if(ue||!oe||le){var Xt=this.computeEndSegmentLength(b,E,x,!1);Ot=this.getLinkDirection(b,E,ct,x,!1,ue,a,y),le&&(oe||te.D(x)||!ue&&te.x+x.x===1&&te.y+x.y===1)&&(Ot+=ue?0:30,0>Nt&&(Ot+=180)),0>Ot?Ot+=360:360<=Ot&&(Ot-=360),le&&(Xt+=Math.abs(Nt)*(ue?1:2)),Ot===0?nt=Xt:Ot===90?bt=Xt:Ot===180?nt=-Xt:Ot===270?bt=-Xt:(nt=Xt*Math.cos(Ot*Math.PI/180),bt=Xt*Math.sin(Ot*Math.PI/180)),x.Mc()&&le&&(x=E.ga(wo,tt.alloc()),te=tt.allocAt(x.x+1e3*nt,x.y+1e3*bt),this.getLinkPointFromPoint(b,E,x,te,!1,ct),tt.free(x),tt.free(te))}x=me,(ue||!re||le)&&(x=new tt(me.x+Te,me.y+je)),te=ct,(ue||!oe||le)&&(te=new tt(ct.x+nt,ct.y+bt)),!we&&!ue&&re&&3<z&&this.adjustPoints(0,me,z-2,te)?this.dd(z-1,ct):!we&&!ue&&oe&&3<z&&this.adjustPoints(1,x,z-1,ct)?this.dd(0,me):!we&&(ue?6<=z:4<z)&&this.adjustPoints(1,x,z-2,te)?(this.dd(0,me),this.dd(z-1,ct)):(this.Fj(),this.ne(me),(ue||!re||le)&&this.ne(x),ue&&this.addOrthoPoints(x,Me,te,Ot,a,b),(ue||!oe||le)&&this.ne(te),this.ne(ct))}return!0};function ny(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}vi.prototype.getLinkPointFromPoint=function(a,y,x,b,E,z){if(z===void 0&&(z=new tt),a===null||y===null)return z.assign(x),z;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 te=x.x;x=x.y}else{a=E.oe,E=1/(a.m11*a.m22-a.m12*a.m21),te=a.m22*E;var re=-a.m12*E,oe=-a.m21*E,le=a.m11*E,ue=E*(a.m21*a.dy-a.m22*a.dx),me=E*(a.m12*a.dx-a.m11*a.dy);E=b.x*te+b.y*oe+ue,b=b.x*re+b.y*le+me,te=x.x*te+x.y*oe+ue,x=x.x*re+x.y*le+me}return y.Sj(E,b,te,x,z),a!==null&&z.transform(a),z};function v0(a,y){var x=y.Zn;return x===null&&(x=new Rg,x.port=y,x.node=y.part,y.Zn=x),l1(x,a)}vi.prototype.getLinkPoint=function(a,y,x,b,E,z,te,re){if(re===void 0&&(re=new tt),x.sb()&&!vp(x))return y.ga(x,re),re;if(x.$c()){var oe=v0(this,y);if(oe!==null){if(re.assign(oe.Zo),E&&this.routing===n1){var le=v0(this,te);if(le!==null&&oe.Gl<le.Gl){oe=tt.alloc(),le=tt.alloc();var ue=new Ut(y.ga(Ba,oe),y.ga(vl,le)),me=this.computeSpot(!b,te);a=this.getLinkPoint(z,te,me,!b,E,a,y,le),(x.Hf(rc)||x.Hf(wl))&&a.y>=ue.y&&a.y<=ue.y+ue.height?re.y=a.y:(x.Hf(ju)||x.Hf(sl))&&a.x>=ue.x&&a.x<=ue.x+ue.width&&(re.x=a.x),tt.free(oe),tt.free(le)}}return re}}return x=y.ga(y0(x),tt.alloc()),this.pointsCount>(E?6:2)?(te=b?this.i(1):this.i(this.pointsCount-2),E&&(te=ny(x,te.copy()))):(oe=this.computeSpot(!b,te),z=tt.alloc(),te=te.ga(y0(oe),z),E&&(te=ny(x,te)),tt.free(z)),this.getLinkPointFromPoint(a,y,x,te,b,re),tt.free(x),re},vi.prototype.getLinkDirection=function(a,y,x,b,E,z,te,re){e:if(b.sb())var oe=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()&&(oe=v0(this,y),oe!==null))switch(oe.Nc){case 1:oe=270;break e;case 2:oe=180;break e;default:case 4:oe=0;break e;case 8:oe=90;break e}oe=y.ga(wo,tt.alloc()),this.pointsCount>(z?6:2)?(re=E?this.i(1):this.i(this.pointsCount-2),re=z?ny(oe,re.copy()):x):(x=tt.alloc(),re=re.ga(wo,x),tt.free(x)),x=Math.abs(re.x-oe.x)>Math.abs(re.y-oe.y)?re.x>=oe.x?0:180:re.y>=oe.y?90:270,tt.free(oe),oe=x}return b.Mc()&&te.Td(a)&&(oe+=180,360<=oe&&(oe-=360)),vp(b)||(a=y.li(),a===0)||(45<=a&&135>a?oe+=90:135<=a&&225>a?oe+=180:225<=a&&315>a&&(oe+=270),360<=oe&&(oe-=360)),oe},vi.prototype.computeEndSegmentLength=function(a,y,x,b){return y!==null&&x.$c()&&(a=v0(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)},vi.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=wo:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===Vo?La:y)):(a=y||this.toPort,a===null?a=wo:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===Vo?La:y)),a};function vp(a){return a===La||a.x===.5&&a.y===.5}function y0(a){return a.x===.5&&a.y===.5?a:wo}vi.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Zl&&4<this.pointsCount?this.computeMidPoint(new tt):(a=y.Zn,a=a!==null?l1(a,this):null,a!==null?a.Zo:y.ga(wo))},vi.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},vi.prototype.Cf=function(a,y,x,b,E,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var te=z;if(z===void 0&&(te=ro.alloc(),te.reset()),te.multiply(this.transform),this.fh(a,te))return Mv(this,y,x,E),z===void 0&&ro.free(te),!0;if(this.Yc(a,te)){var re=!1;if(!this.isAtomic)for(var oe=this.O.s,le=oe.length;le--;){var ue=oe[le];if(ue.visible||ue===this.locationObject){var me=ue.actualBounds,we=this.naturalBounds;if(!(me.x>we.width||me.y>we.height||0>me.x+me.width||0>me.y+me.height)){if(me=ro.alloc(),me.set(te),ue instanceof hi)re=ue.Cf(a,y,x,b,E,me);else if(this.path===ue){if(ue instanceof io)if(re=a,we=b,ue.pickable===!1)re=!1;else if(me.multiply(ue.transform),we)e:{var Me=re,Te=me;if(ue.fh(Me,Te))re=!0;else{if(Te===void 0&&(Te=ue.transform,Me.Re(ue.actualBounds))){re=!0;break e}re=Me.left,we=Me.right;var je=Me.top;Me=Me.bottom;var ct=tt.alloc(),nt=tt.alloc(),bt=tt.alloc(),Nt=ro.alloc();Nt.set(Te),Nt.bv(ue.transform),Nt.Vj(),nt.x=we,nt.y=je,nt.transform(Nt),ct.x=re,ct.y=je,ct.transform(Nt),Te=!1,Qf(ue,ct,nt,bt)?Te=!0:(ct.x=we,ct.y=Me,ct.transform(Nt),Qf(ue,ct,nt,bt)?Te=!0:(nt.x=re,nt.y=Me,nt.transform(Nt),Qf(ue,ct,nt,bt)?Te=!0:(ct.x=re,ct.y=je,ct.transform(Nt),Qf(ue,ct,nt,bt)&&(Te=!0)))),ro.free(Nt),tt.free(ct),tt.free(nt),tt.free(bt),re=Te}}else re=ue.fh(re,me)}else re=ws(ue,a,b,me);re&&(we=ue,y!==null&&(we=y(ue)),we&&(x===null||x(we))&&E.add(we)),ro.free(me)}}}return z===void 0&&ro.free(te),re||this.background!==null||this.areaBackground!==null}return z===void 0&&ro.free(te),!1},vi.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?$u:this.curve},vi.prototype.computeCorner=function(){if(this.curve===$u)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},vi.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},vi.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=r1;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,z=b.margin,te=isNaN(E.width)?30:E.width*b.scale+z.left+z.right;E=isNaN(E.height)?14:E.height*b.scale+z.top+z.bottom,b=b.segmentOrientation,b===nm||b===C0||b===sy?a=Math.max(a,E):b===rm||b===am||b===im||b===om?a=Math.max(a,te):(y=y.ga(wo).ab(x.ga(wo))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*te)+Math.abs(Math.cos(y)*E)+1)),this.curve===$u&&(a*=1.333)}}return a},vi.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===Zl&&x.bb()}},vi.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=i1;var y=this.Sf;if(y!==null){for(var x=mn(),b=0,E=y.links,z=0;z<E.length;z++){var te=E[z].computeSpacing();x.push(te),b+=te}for(b=-b/2,z=0;z<E.length;z++){if(E[z]===this){a=b+x[z]/2;break}b+=x[z]}y.Ds===this.fromNode&&(a=-a),Wn(x)}}return a},vi.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},vi.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},vi.prototype.adjustPoints=function(a,y,x,b){var E=this.computeAdjusting();if(this.isOrthogonal){if(E===P0)return!1;E===w0&&(E=tm)}switch(E){case P0:var z=this.i(a),te=this.i(x);if(!z.Xa(y)||!te.Xa(b)){E=z.x,z=z.y;var re=te.x-E,oe=te.y-z,le=Math.sqrt(re*re+oe*oe);if(!Jt.$(le,0)){if(Jt.$(re,0))var ue=0>oe?-Math.PI/2:Math.PI/2;else ue=Math.atan(oe/Math.abs(re)),0>re&&(ue=Math.PI-ue);te=y.x;var me=y.y;re=b.x-te;var we=b.y-me;for(oe=Math.sqrt(re*re+we*we),Jt.$(re,0)?we=0>we?-Math.PI/2:Math.PI/2:(we=Math.atan(we/Math.abs(re)),0>re&&(we=Math.PI-we)),le=oe/le,ue=we-ue,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),re=y.x-E,oe=y.y-z,y=Math.sqrt(re*re+oe*oe),Jt.$(y,0)||(Jt.$(re,0)?oe=0>oe?-Math.PI/2:Math.PI/2:(oe=Math.atan(oe/Math.abs(re)),0>re&&(oe=Math.PI-oe)),re=oe+ue,y*=le,this.L(a,te+y*Math.cos(re),me+y*Math.sin(re)));this.dd(x,b)}}return!0;case w0:if(z=this.i(a),me=this.i(x),!z.Xa(y)||!me.Xa(b)){E=z.x,z=z.y,te=me.x,me=me.y,le=(te-E)*(te-E)+(me-z)*(me-z),re=y.x,ue=y.y,oe=b.x,we=b.y;var Me=1;if(oe-re!==0){var Te=(we-ue)/(oe-re);Me=Math.sqrt(1+1/(Te*Te))}else Te=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var je=y.x,ct=y.y,nt=.5;le!==0&&(nt=((E-je)*(E-te)+(z-ct)*(z-me))/le);var bt=E+nt*(te-E),Nt=z+nt*(me-z);y=Math.sqrt((je-bt)*(je-bt)+(ct-Nt)*(ct-Nt)),ct<Te*(je-bt)+Nt&&(y=-y),0<Te&&(y=-y),je=re+nt*(oe-re),nt=ue+nt*(we-ue),Te!==0?(y=je+y/Me,this.L(a,y,nt-(y-je)/Te)):this.L(a,je,nt+y)}this.dd(x,b)}return!0;case tm:e:{if(this.isOrthogonal&&(E=this.i(a),z=this.i(a+1),te=this.i(a+2),re=z.x,ue=z.y,me=re,le=ue,Jt.B(E.y,z.y)?Jt.B(z.x,te.x)?ue=y.y:Jt.B(z.y,te.y)&&(re=y.x):Jt.B(E.x,z.x)&&(Jt.B(z.y,te.y)?re=y.x:Jt.B(z.x,te.x)&&(ue=y.y)),this.L(a+1,re,ue),E=this.i(x),z=this.i(x-1),te=this.i(x-2),re=z.x,ue=z.y,oe=re,we=ue,Jt.B(E.y,z.y)?Jt.B(z.x,te.x)?ue=b.y:Jt.B(z.y,te.y)&&(re=b.x):Jt.B(E.x,z.x)&&(Jt.B(z.y,te.y)?re=b.x:Jt.B(z.x,te.x)&&(ue=b.y)),this.L(x-1,re,ue),iy(this))){this.L(a+1,me,le),this.L(x-1,oe,we),x=!1;break e}this.dd(a,y),this.dd(x,b),x=!0}return x;default:return!1}},vi.prototype.addOrthoPoints=function(a,y,x,b,E,z){0>y?y+=360:360<=y&&(y-=360),0>b?b+=360:360<=b&&(b-=360);var te=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 re=E.actualBounds.copy(),oe=z.actualBounds.copy();if(re.w()&&oe.w()){re.Bc(sm,sm),oe.Bc(sm,sm),re.Ye(a),oe.Ye(x);var le=tt.alloc(),ue=tt.alloc();y===0?x.x>a.x||b===270&&x.y<a.y&&oe.right>a.x||b===90&&x.y>a.y&&oe.right>a.x?(le.h(x.x,a.y),ue.h(x.x,(a.y+x.y)/2),b===180?(le.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ue.x=le.x,ue.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(le.x=a.x<oe.left?this.computeMidOrthoPosition(a.x,a.y,oe.left,x.y,!1):a.x<oe.right&&(b===270&&a.y<oe.top||b===90&&a.y>oe.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):oe.right,ue.x=le.x,ue.y=x.y):b===0&&a.x<oe.left&&a.y>oe.top&&a.y<oe.bottom&&(le.x=a.x,le.y=a.y<x.y?Math.min(x.y,oe.top):Math.max(x.y,oe.bottom),ue.y=le.y)):(le.h(a.x,x.y),ue.h((a.x+x.x)/2,x.y),(b===180||b===90&&x.y<re.top||b===270&&x.y>re.bottom)&&(b===180&&(oe.ca(a)||re.ca(x))?le.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===180||b===90)?le.y=this.computeMidOrthoPosition(a.x,re.top,x.x,Math.max(x.y,oe.bottom),!0):x.y>a.y&&(b===180||b===270)&&(le.y=this.computeMidOrthoPosition(a.x,re.bottom,x.x,Math.min(x.y,oe.top),!0)),ue.x=x.x,ue.y=le.y),le.y>re.top&&le.y<re.bottom&&(x.x>=re.left&&x.x<=a.x||a.x<=oe.right&&a.x>=x.x?(b===90||b===270)&&(le.h(Math.max((a.x+x.x)/2,a.x),a.y),ue.h(le.x,x.y)):(le.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===0?re.top:Math.min(re.top,oe.top)):Math.max(x.y,b===0?re.bottom:Math.max(re.bottom,oe.bottom)),ue.x=x.x,ue.y=le.y))):y===180?x.x<a.x||b===270&&x.y<a.y&&oe.left<a.x||b===90&&x.y>a.y&&oe.left<a.x?(le.h(x.x,a.y),ue.h(x.x,(a.y+x.y)/2),b===0?(le.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ue.x=le.x,ue.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(le.x=a.x>oe.right?this.computeMidOrthoPosition(a.x,a.y,oe.right,x.y,!1):a.x>oe.left&&(b===270&&a.y<oe.top||b===90&&a.y>oe.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):oe.left,ue.x=le.x,ue.y=x.y):b===180&&a.x>oe.right&&a.y>oe.top&&a.y<oe.bottom&&(le.x=a.x,le.y=a.y<x.y?Math.min(x.y,oe.top):Math.max(x.y,oe.bottom),ue.y=le.y)):(le.h(a.x,x.y),ue.h((a.x+x.x)/2,x.y),(b===0||b===90&&x.y<re.top||b===270&&x.y>re.bottom)&&(b===0&&(oe.ca(a)||re.ca(x))?le.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===0||b===90)?le.y=this.computeMidOrthoPosition(a.x,re.top,x.x,Math.max(x.y,oe.bottom),!0):x.y>a.y&&(b===0||b===270)&&(le.y=this.computeMidOrthoPosition(a.x,re.bottom,x.x,Math.min(x.y,oe.top),!0)),ue.x=x.x,ue.y=le.y),le.y>re.top&&le.y<re.bottom&&(x.x<=re.right&&x.x>=a.x||a.x>=oe.left&&a.x<=x.x?(b===90||b===270)&&(le.h(Math.min((a.x+x.x)/2,a.x),a.y),ue.h(le.x,x.y)):(le.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===180?re.top:Math.min(re.top,oe.top)):Math.max(x.y,b===180?re.bottom:Math.max(re.bottom,oe.bottom)),ue.x=x.x,ue.y=le.y))):y===90?x.y>a.y||b===180&&x.x<a.x&&oe.bottom>a.y||b===0&&x.x>a.x&&oe.bottom>a.y?(le.h(a.x,x.y),ue.h((a.x+x.x)/2,x.y),b===270?(le.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ue.x=x.x,ue.y=le.y):b===180&&x.x<a.x||b===0&&x.x>a.x?(le.y=a.y<oe.top?this.computeMidOrthoPosition(a.x,a.y,x.x,oe.top,!0):a.y<oe.bottom&&(b===180&&a.x<oe.left||b===0&&a.x>oe.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):oe.bottom,ue.x=x.x,ue.y=le.y):b===90&&a.y<oe.top&&a.x>oe.left&&a.x<oe.right&&(le.x=a.x<x.x?Math.min(x.x,oe.left):Math.max(x.x,oe.right),le.y=a.y,ue.x=le.x)):(le.h(x.x,a.y),ue.h(x.x,(a.y+x.y)/2),(b===270||b===0&&x.x<re.left||b===180&&x.x>re.right)&&(b===270&&(oe.ca(a)||re.ca(x))?le.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===270||b===0)?le.x=this.computeMidOrthoPosition(re.left,a.y,Math.max(x.x,oe.right),x.y,!1):x.x>a.x&&(b===270||b===180)&&(le.x=this.computeMidOrthoPosition(re.right,a.y,Math.min(x.x,oe.left),x.y,!1)),ue.x=le.x,ue.y=x.y),le.x>re.left&&le.x<re.right&&(x.y>=re.top&&x.y<=a.y||a.y<=oe.bottom&&a.y>=x.y?(b===0||b===180)&&(le.h(a.x,Math.max((a.y+x.y)/2,a.y)),ue.h(x.x,le.y)):(le.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===90?re.left:Math.min(re.left,oe.left)):Math.max(x.x,b===90?re.right:Math.max(re.right,oe.right)),ue.x=le.x,ue.y=x.y))):x.y<a.y||b===180&&x.x<a.x&&oe.top<a.y||b===0&&x.x>a.x&&oe.top<a.y?(le.h(a.x,x.y),ue.h((a.x+x.x)/2,x.y),b===90?(le.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ue.x=x.x,ue.y=le.y):b===180&&x.x<a.x||b===0&&x.x>=a.x?(le.y=a.y>oe.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,oe.bottom,!0):a.y>oe.top&&(b===180&&a.x<oe.left||b===0&&a.x>oe.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):oe.top,ue.x=x.x,ue.y=le.y):b===270&&a.y>oe.bottom&&a.x>oe.left&&a.x<oe.right&&(le.x=a.x<x.x?Math.min(x.x,oe.left):Math.max(x.x,oe.right),le.y=a.y,ue.x=le.x)):(le.h(x.x,a.y),ue.h(x.x,(a.y+x.y)/2),(b===90||b===0&&x.x<re.left||b===180&&x.x>re.right)&&(b===90&&(oe.ca(a)||re.ca(x))?le.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===90||b===0)?le.x=this.computeMidOrthoPosition(re.left,a.y,Math.max(x.x,oe.right),x.y,!1):x.x>a.x&&(b===90||b===180)&&(le.x=this.computeMidOrthoPosition(re.right,a.y,Math.min(x.x,oe.left),x.y,!1)),ue.x=le.x,ue.y=x.y),le.x>re.left&&le.x<re.right&&(x.y<=re.bottom&&x.y>=a.y||a.y>=oe.top&&a.y<=x.y?(b===0||b===180)&&(le.h(a.x,Math.min((a.y+x.y)/2,a.y)),ue.h(x.x,le.y)):(le.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===270?re.left:Math.min(re.left,oe.left)):Math.max(x.x,b===270?re.right:Math.max(re.right,oe.right)),ue.x=le.x,ue.y=x.y)));var me=x;if(this.isAvoiding){var we=this.diagram;if(we===null||E===z||this.layer.isTemporary||!Kf(we)||re.ca(me)&&!z.Td(E)||oe.ca(a)&&!E.Td(z))y=!1;else{var Me=uf(we,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Me.Yj(Math.min(a.x,le.x),Math.min(a.y,le.y),Math.abs(a.x-le.x),Math.abs(a.y-le.y))&&Me.Yj(Math.min(le.x,ue.x),Math.min(le.y,ue.y),Math.abs(le.x-ue.x),Math.abs(le.y-ue.y))&&Me.Yj(Math.min(ue.x,me.x),Math.min(ue.y,me.y),Math.abs(ue.x-me.x),Math.abs(ue.y-me.y)))y=!1;else{E=a,z=me;var Te=x=null;if(we.isVirtualized){we=Me.bounds.copy(),we.Bc(-Me.Ho,-Me.Go);var je=tt.alloc();Sp(Me,a.x,a.y)||(Jt.Ff(we.x,we.y,we.x+we.width,we.y+we.height,a.x,a.y,le.x,le.y,je)?(x=a=je.copy(),y=je.ab(le)):Jt.Ff(we.x,we.y,we.x+we.width,we.y+we.height,le.x,le.y,ue.x,ue.y,je)?(x=a=je.copy(),y=je.ab(ue)):Jt.Ff(we.x,we.y,we.x+we.width,we.y+we.height,ue.x,ue.y,me.x,me.y,je)&&(x=a=je.copy(),y=je.ab(me))),Sp(Me,me.x,me.y)||(Jt.Ff(we.x,we.y,we.x+we.width,we.y+we.height,me.x,me.y,ue.x,ue.y,je)?(Te=me=je.copy(),b=ue.ab(je)):Jt.Ff(we.x,we.y,we.x+we.width,we.y+we.height,ue.x,ue.y,le.x,le.y,je)?(Te=me=je.copy(),b=le.ab(je)):Jt.Ff(we.x,we.y,we.x+we.width,we.y+we.height,le.x,le.y,a.x,a.y,je)&&(Te=me=je.copy(),b=a.ab(je))),tt.free(je)}re=re.copy().ed(oe),re.Bc(Me.Ho*Me.Os,Me.Go*Me.Os),a1(Me,a,y,me,b,re,!0),oe=zd(Me,me.x,me.y),!Me.abort&&oe>=xp&&(o1(Me),re.Bc(Me.Ho*Me.Hx,Me.Go*Me.Ix),a1(Me,a,y,me,b,re,!1),oe=zd(Me,me.x,me.y)),!Me.abort&&oe<xp&&zd(Me,me.x,me.y)!==Kh?(ry(this,Me,me.x,me.y,b,!0,te),re=this.i(2),4>this.pointsCount?(y===0||y===180?(re.x=a.x,re.y=me.y):(re.x=me.x,re.y=a.y),this.L(2,re.x,re.y),this.m(3,re.x,re.y)):(te=this.i(3),y===0||y===180?Jt.B(re.x,te.x)?(re=y===0?Math.max(re.x,a.x):Math.min(re.x,a.x),this.L(2,re,a.y),this.L(3,re,te.y)):Jt.B(re.y,te.y)?(Math.abs(a.y-re.y)<=Me.Go/2&&(this.L(2,re.x,a.y),this.L(3,te.x,a.y)),this.m(2,re.x,a.y)):this.L(2,a.x,re.y):(y===90||y===270)&&(Jt.B(re.y,te.y)?(re=y===90?Math.max(re.y,a.y):Math.min(re.y,a.y),this.L(2,a.x,re),this.L(3,te.x,re)):Jt.B(re.x,te.x)?(Math.abs(a.x-re.x)<=Me.Ho/2&&(this.L(2,a.x,re.y),this.L(3,a.x,te.y)),this.m(2,a.x,re.y)):this.L(2,re.x,a.y))),x!==null&&(a=this.i(1),te=this.i(2),a.x!==te.x&&a.y!==te.y?y===0||y===180?this.m(2,a.x,te.y):this.m(2,te.x,a.y):y===0||y===180?this.m(2,E.x,x.y):this.m(2,x.x,E.y)),Te!==null&&(b===0||b===180?this.yf(z.x,Te.y):this.yf(Te.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(le.copy()),this.ne(ue.copy())),tt.free(le),tt.free(ue)}},vi.prototype.computeMidOrthoPosition=function(a,y,x,b,E){var z=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(z=this.computeCurviness()),E?(y+b)/2+z:(a+x)/2+z};function iy(a){if(a.diagram===null||!a.isAvoiding||!Kf(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=uf(a.diagram,!0,a.containingGroup,null);for(var b=1;b<x-2;b++){var E=y[b],z=y[b+1];if(!a.Yj(Math.min(E.x,z.x),Math.min(E.y,z.y),Math.abs(E.x-z.x),Math.abs(E.y-z.y)))return!0}return!1}function ry(a,y,x,b,E,z,te){var re=y.Ho,oe=y.Go,le=zd(y,x,b),ue=x,me=b;for(E===0?ue+=re:E===90?me+=oe:E===180?ue-=re:me-=oe,E!==te&&le>tg&&zd(y,ue,me)!==le-1&&(zd(y,x-re,b)===le-1?(E=180,ue=x-re,me=b):zd(y,x+re,b)===le-1?(E=0,ue=x+re,me=b):zd(y,x,b-oe)===le-1?(E=270,ue=x,me=b-oe):zd(y,x,b+oe)===le-1&&(E=90,ue=x,me=b+oe));le>tg&&zd(y,ue,me)===le-1;)x=ue,b=me,E===0?ue+=re:E===90?me+=oe:E===180?ue-=re:me-=oe,--le;z?le>tg&&(E===180||E===0?x=Math.floor(x/re)*re+re/2:(E===90||E===270)&&(b=Math.floor(b/oe)*oe+oe/2)):(x=Math.floor(x/re)*re+re/2,b=Math.floor(b/oe)*oe+oe/2),le>tg&&(z=E,te=x,ue=b,E===0?(z=90,ue+=oe):E===90?(z=180,te-=re):E===180?(z=270,ue-=oe):E===270&&(z=0,te+=re),zd(y,te,ue)===le-1?ry(a,y,te,ue,z,!1,z):(te=x,ue=b,E===0?(z=270,ue-=oe):E===90?(z=0,te+=re):E===180?(z=90,ue+=oe):E===270&&(z=180,te-=re),zd(y,te,ue)===le-1&&ry(a,y,te,ue,z,!1,z))),a.yf(x,b)}vi.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),b=this.i(1),E=zo(y,a,x.x,x.y,b.x,b.y),z=0,te=1;te<this.pointsCount-1;te++){x=this.i(te+1);var re=zo(y,a,b.x,b.y,x.x,x.y);b=x,re<E&&(z=te,E=re)}return z},vi.prototype.qc=function(){this.lk=!1,this.v()},vi.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 io&&(E.ua=this.ua)}}},vi.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,b=this.diagram;b!==null&&eg(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(),z=E.copy();b=this.Nb.s;var te=this.computeCurve();if(te===$u&&3<=y&&!Jt.$(this.smoothness,0))if(y===3){var re=this.i(1);b=Math.min(E.x,re.x);var oe=Math.min(E.y,re.y);re=this.i(2),b=Math.min(b,re.x),oe=Math.min(oe,re.y)}else{if(this.isOrthogonal)for(oe=0;oe<y;oe++)re=b[oe],z.x=Math.min(re.x,z.x),z.y=Math.min(re.y,z.y);else for(b=3;b<y;b+=3)b+3>=y&&(b=y-1),oe=this.i(b),z.x=Math.min(oe.x,z.x),z.y=Math.min(oe.y,z.y);b=z.x,oe=z.y}else{for(oe=0;oe<y;oe++)re=b[oe],z.x=Math.min(re.x,z.x),z.y=Math.min(re.y,z.y);b=z.x,oe=z.y}if(b-=this.su.x,oe-=this.su.y,E.x-=b,E.y-=oe,y!==2||eg(this)){if(a.type=xi.o,re=DS(a),this.computeShortLength(!0)!==0&&(E=Tg(this,E,!0,z)),pp(re,E.x,E.y,!1),te===$u&&3<=y&&!Jt.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-b,x=x.y-oe,E=this.i(2).copy(),E.x-=b,E.y-=oe,this.computeShortLength(!1)!==0&&(E=Tg(this,E,!1,z)),Hh(re,y,x,y,x,E.x,E.y);else if(this.isOrthogonal){y=tt.allocAt(b,oe),x=tt.alloc(),x.assign(this.i(1)),z=tt.allocAt(b,oe),E=tt.allocAt(b,oe),te=this.i(0);for(var le,ue=this.smoothness/3,me=1;me<this.pointsCount-1;me++){le=this.i(me);var we=te,Me=le,Te=this.i(oy(this,le,me,!1));if((!Jt.$(we.x,Me.x)||!Jt.$(Me.x,Te.x))&&(!Jt.$(we.y,Me.y)||!Jt.$(Me.y,Te.y))){var je=ue;isNaN(je)&&(je=this.smoothness/3);var ct=we.x;we=we.y;var nt=Me.x;Me=Me.y;var bt=Te.x;Te=Te.y;var Nt=je*S0(ct,we,nt,Me);je*=S0(nt,Me,bt,Te),Jt.$(we,Me)&&Jt.$(nt,bt)&&(nt>ct?Te>Me?(z.x=nt-Nt,z.y=Me-Nt,E.x=nt+je,E.y=Me+je):(z.x=nt-Nt,z.y=Me+Nt,E.x=nt+je,E.y=Me-je):Te>Me?(z.x=nt+Nt,z.y=Me-Nt,E.x=nt-je,E.y=Me+je):(z.x=nt+Nt,z.y=Me+Nt,E.x=nt-je,E.y=Me-je)),Jt.$(ct,nt)&&Jt.$(Me,Te)&&(Me>we?(bt>nt?(z.x=nt-Nt,z.y=Me-Nt,E.x=nt+je):(z.x=nt+Nt,z.y=Me-Nt,E.x=nt-je),E.y=Me+je):(bt>nt?(z.x=nt-Nt,z.y=Me+Nt,E.x=nt+je):(z.x=nt+Nt,z.y=Me+Nt,E.x=nt-je),E.y=Me-je)),(Jt.$(ct,nt)&&Jt.$(nt,bt)||Jt.$(we,Me)&&Jt.$(Me,Te))&&(ct=.5*(ct+bt),we=.5*(we+Te),z.x=ct,z.y=we,E.x=ct,E.y=we),(me===1||me===2&&Jt.$(te.x,this.i(0).x)&&Jt.$(te.y,this.i(0).y))&&(x.x=.5*(te.x+le.x),x.y=.5*(te.y+le.y)),Hh(re,x.x-b,x.y-oe,z.x-b,z.y-oe,le.x-b,le.y-oe),y.set(z),x.set(E),te=le}}le=te.x,te=te.y,ue=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(ue=Tg(this,ue.copy(),!1,Qr)),le=.5*(le+ue.x),te=.5*(te+ue.y),Hh(re,E.x-b,E.y-oe,le-b,te-oe,ue.x-b,ue.y-oe),tt.free(y),tt.free(x),tt.free(z),tt.free(E)}else for(x=3;x<y;x+=3)z=this.i(x-2),x+3>=y&&(x=y-1),E=this.i(x-1),te=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(te=Tg(this,te.copy(),!1,Qr)),Hh(re,z.x-b,z.y-oe,E.x-b,E.y-oe,te.x-b,te.y-oe);else{for(z=tt.alloc(),z.assign(this.i(0)),E=tt.alloc(),E.assign(z),te=this.computeCorner(),me=1,le=0;me<y;){if(me=oy(this,z,me,1<me),ue=this.i(me),me>=y-1){if(!z.D(ue))this.computeShortLength(!1)!==0&&(ue=Tg(this,ue.copy(),!1,Qr)),kg(this,re,-b,-oe,z,ue,x);else if(le===0)for(me=1;me<y;)E.assign(z),ue=this.i(me++),kg(this,re,-b,-oe,z,ue,x),z.assign(ue);break}if(le=oy(this,ue,me+1,me<y-3),me=-b,ct=-oe,we=ue,nt=this.i(le),je=x,Jt.B(z.y,we.y)&&Jt.B(we.x,nt.x))if(Te=Math.min(te,Math.abs(we.x-E.x)/2),Te=Nt=Math.min(Te,Math.abs(nt.y-we.y)/2),Jt.B(Te,0))kg(this,re,me,ct,z,we,je),z.assign(we);else{var Ot=we.x,Xt=we.y;Me=Ot,bt=Xt,we.x>z.x?Ot=we.x-Te:Ot=we.x+Te,nt.y>we.y?bt=we.y+Nt:bt=we.y-Nt,nt=tt.allocAt(Ot,Xt),kg(this,re,me,ct,z,nt,je),tt.free(nt),u0(re,we.x+me,we.y+ct,Me+me,bt+ct),z.h(Me,bt)}else Jt.B(z.x,we.x)&&Jt.B(we.y,nt.y)?(Te=Math.min(te,Math.abs(we.y-E.y)/2),Te=Nt=Math.min(Te,Math.abs(nt.x-we.x)/2),Jt.B(Nt,0)?(kg(this,re,me,ct,z,we,je),z.assign(we)):(Ot=we.x,Xt=we.y,Me=Ot,bt=Xt,we.y>z.y?Xt=we.y-Te:Xt=we.y+Te,nt.x>we.x?Me=we.x+Nt:Me=we.x-Nt,nt=tt.allocAt(Ot,Xt),kg(this,re,me,ct,z,nt,je),tt.free(nt),u0(re,we.x+me,we.y+ct,Me+me,bt+ct),z.h(Me,bt))):(kg(this,re,me,ct,z,we,je),z.assign(we));E.assign(ue),me=le}tt.free(z)}c0=re}else re=this.i(1).copy(),re.x-=b,re.y-=oe,this.computeShortLength(!0)!==0&&(E=Tg(this,E,!0,z)),this.computeShortLength(!1)!==0&&(re=Tg(this,re,!1,z)),a.type=xi.j,a.startX=E.x,a.startY=E.y,a.endX=re.x,a.endY=re.y;return this.lk=!0,a};function S0(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),Jt.$(a,0)?y:Jt.$(y,0)?a:Math.sqrt(a*a+y*y)))}function Tg(a,y,x,b){var E=a.pointsCount;if(2>E)return y;if(x){var z=a.i(1);if(x=z.x-b.x,z=z.y-b.y,b=S0(y.x,y.y,x,z),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!0),a>E&&(a=E),E=a*(z-y.y)/b,y.x+=a*(x-y.x)/b,y.y+=E}else{if(z=a.i(E-2),x=z.x-b.x,z=z.y-b.y,b=S0(y.x,y.y,x,z),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!1),a>E&&(a=E),E=a*(y.y-z)/b,y.x-=a*(y.x-x)/b,y.y-=E}return y}function oy(a,y,x,b){for(var E=a.pointsCount,z=y;Jt.$(y.x,z.x)&&Jt.$(y.y,z.y);){if(x>=E)return E-1;z=a.i(x++)}if(!Jt.$(y.x,z.x)&&!Jt.$(y.y,z.y))return x-1;for(var te=z;Jt.$(y.x,z.x)&&Jt.$(z.x,te.x)&&(!b||(y.y>=z.y?z.y>=te.y:z.y<=te.y))||Jt.$(y.y,z.y)&&Jt.$(z.y,te.y)&&(!b||(y.x>=z.x?z.x>=te.x:z.x<=te.x));){if(x>=E)return E-1;te=a.i(x++)}return x-2}vi.prototype.computeJumpLength=function(){return 10};function kg(a,y,x,b,E,z,te){if(!te&&eg(a)){te=a.computeJumpLength();var re=te/2,oe=[],le=0;if(a.isVisible()&&(le=Ex(a,E,z,oe)),0<le){if(Jt.B(E.y,z.y))if(E.x<z.x)for(var ue=0;ue<le;){var me=Math.max(E.x,Math.min(oe[ue++]-re,z.x-te));y.lineTo(me+x,z.y+b);for(var we=me+x,Me=Math.min(me+te,z.x);ue<le&&(me=oe[ue],me<Me+te);)ue++,Me=Math.min(me+re,z.x);me=z.y-te+b,Me+=x;var Te=z.y+b;a.curve===$h?pp(y,Me,Te,!1):Hh(y,we,me,Me,me,Me,Te)}else for(--le;0<=le;){for(ue=Math.min(E.x,Math.max(oe[le--]+re,z.x+te)),y.lineTo(ue+x,z.y+b),we=ue+x,me=Math.max(ue-te,z.x);0<=le&&(ue=oe[le],ue>me-te);)le--,me=Math.max(ue-re,z.x);ue=z.y-te+b,me+=x,Me=z.y+b,a.curve===$h?pp(y,me,Me,!1):Hh(y,we,ue,me,ue,me,Me)}else if(Jt.B(E.x,z.x))if(E.y<z.y)for(ue=0;ue<le;){for(me=Math.max(E.y,Math.min(oe[ue++]-re,z.y-te)),y.lineTo(z.x+x,me+b),we=me+b,me=Math.min(me+te,z.y);ue<le&&(Me=oe[ue],Me<me+te);)ue++,me=Math.min(Me+re,z.y);Me=z.x-te+x,Te=z.x+x,me+=b,a.curve===$h?pp(y,Te,me,!1):Hh(y,Me,we,Me,me,Te,me)}else for(--le;0<=le;){for(ue=Math.min(E.y,Math.max(oe[le--]+re,z.y+te)),y.lineTo(z.x+x,ue+b),we=ue+b,ue=Math.max(ue-te,z.y);0<=le&&(me=oe[le],me>ue-te);)le--,ue=Math.max(me-re,z.y);me=z.x-te+x,Me=z.x+x,ue+=b,a.curve===$h?pp(y,Me,ue,!1):Hh(y,me,we,me,ue,Me,ue)}}}y.lineTo(z.x+x,z.y+b)}function Ex(a,y,x,b){var E=a.diagram;if(E===null||y.D(x))return 0;for(E=E.layers;E.next();){var z=E.value;if(z!==null&&z.visible){z=z.Pa.s;for(var te=z.length,re=0;re<te;re++){var oe=z[re];if(oe instanceof vi){if(oe===a)return 0<b.length&&b.sort(function(ue,me){return ue-me}),b.length;if(oe.isVisible()&&eg(oe)){var le=oe.routeBounds;le.w()&&a.routeBounds.Yc(le)&&!a.usesSamePort(oe)&&(le=oe.path,le!==null&&le.Ed()&&Mx(y,x,b,oe))}}}}}return 0<b.length&&b.sort(function(ue,me){return ue-me}),b.length}function Mx(a,y,x,b){for(var E=Jt.B(a.y,y.y),z=b.pointsCount,te=b.i(0),re=tt.alloc(),oe=1;oe<z;oe++){var le=b.i(oe);if(oe<z-1){var ue=b.i(oe+1);if(te.y===le.y&&le.y===ue.y){if(le.x>te.x&&ue.x>=le.x||le.x<te.x&&ue.x<=le.x)continue}else if(te.x===le.x&&le.x===ue.x&&(le.y>te.y&&ue.y>=le.y||le.y<te.y&&ue.y<=le.y))continue}e:{ue=a.x;var me=a.y,we=y.x,Me=y.y,Te=te.x;te=te.y;var je=le.x,ct=le.y;if(Jt.B(ue,we)){if(!Jt.B(me,Me)&&Jt.B(te,ct)&&Math.min(me,Me)<te&&Math.max(me,Me)>te&&Math.min(Te,je)<ue&&Math.max(Te,je)>ue&&!Jt.B(Te,je)){re.x=ue,re.y=te,ue=!0;break e}}else if(Jt.B(me,Me)&&Jt.B(Te,je)&&Math.min(ue,we)<Te&&Math.max(ue,we)>Te&&Math.min(te,ct)<me&&Math.max(te,ct)>me&&!Jt.B(te,ct)){re.x=Te,re.y=me,ue=!0;break e}re.x=0,re.y=0,ue=!1}ue&&(E?x.push(re.x):x.push(re.y)),te=le}tt.free(re)}function eg(a){return a=a.curve,a===yp||a===$h}function x0(a,y){(y||eg(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()))}vi.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 z=!1;E=E.Pa.s;for(var te=E.length,re=0;re<te;re++){var oe=E[re];oe instanceof vi&&(oe===this?z=!0:z&&t1(this,oe,a))}}else if(b)for(z=E.Pa.s,E=z.length,te=0;te<E;te++)re=z[te],re instanceof vi&&t1(this,re,a)}}}}};function t1(a,y,x){if(y!==null&&y.lk&&y.fd&&eg(y)){var b=y.routeBounds;b.w()&&(a.routeBounds.Yc(b)||x.Yc(b))&&(a.usesSamePort(y)||y.qc())}}vi.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},vi.prototype.isVisible=function(){if(!pr.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},vi.prototype.Zb=function(a){if(pr.prototype.Zb.call(this,a),a&&x0(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},vi.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?tm:this.qk};function qp(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,z=a=null,te=y.jb.s,re=te.length,oe=0;oe<re;oe++){var le=te[oe];(le.ef===y&&le.ff===b&&le.uf===x&&le.vf===E||le.ef===x&&le.ff===E&&le.uf===y&&le.vf===b)&&(z===null?z=le:(a===null&&(a=[],a.push(z)),a.push(le)))}if(a!==null){for(z=GS(y,x,b,E),z===null&&(z=new E0(y,b,x,E),WS(y,z),WS(x,z)),z.links=a,y=0;y<a.length;y++)a[y].Sf=z;z.Sl()}}}}function em(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(pn(y.links,a),y.Sl()))}vi.prototype.ph=function(){return!0},Je.Object.defineProperties(vi.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&&g0(y,this,x),em(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,z=this.fromPortChanged;if(z!==null){var te=!0;b!==null&&(te=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=te)}a!==null&&(this.uf!==a&&f0(a,this,E),qp(this),this.C(1)),this.g("fromNode",y,a),mp(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&Bu(x),em(this),this.ff=a;var b=this.fromPort;b!==null&&Bu(b);var E=this.diagram;if(E!==null){var z=this.data,te=E.model;z!==null&&te.ri()&&te.xv(z,a)}x!==b&&(this.Wf=null,this.bb(),z=this.fromPortChanged,z!==null&&(te=!0,E!==null&&(te=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=te))),qp(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&&g0(y,this,x),em(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,z=this.toPortChanged;if(z!==null){var te=!0;b!==null&&(te=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=te)}a!==null&&(this.ef!==a&&f0(a,this,E),qp(this),this.C(1)),this.g("toNode",y,a),mp(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&Bu(x),em(this),this.vf=a;var b=this.toPort;b!==null&&Bu(b);var E=this.diagram;if(E!==null){var z=this.data,te=E.model;z!==null&&te.ri()&&te.Cv(z,a)}x!==b&&(this.Wf=null,this.bb(),z=this.toPortChanged,z!==null&&(te=!0,E!==null&&(te=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=te))),qp(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:Vo},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&&Bu(this.fromPort),this.bb())}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:NaN},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&qn(a,">= 0",vi,"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:Vo},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&&Bu(this.toPort),this.bb())}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:NaN},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&qn(a,">= 0",vi,"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?gr: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&&Qp(this.fromNode),this.toNode!==null&&Qp(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof io?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()===$u&&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 z=this.i(2);y=Math.min(z.x,y),x=Math.min(z.y,x),Jt.Dl(E.x,E.y,b.x,b.y,b.x,b.y,z.x,z.y,.5,a)}else for(z=3;z<b;z+=3){var te=this.i(z-2);z+3>=b&&(z=b-1);var re=this.i(z-1),oe=this.i(z);Jt.Dl(E.x,E.y,te.x,te.y,re.x,re.y,oe.x,oe.y,.5,a),y=Math.min(oe.x,y),x=Math.min(oe.y,x),E=oe}else for(E=this.i(0),z=this.i(1),y=Math.min(E.x,z.x),x=Math.min(E.y,z.y),a.h(E.x,E.y,0,0),a.Ye(z),E=2;E<b;E++)z=this.i(E),y=Math.min(z.x,y),x=Math.min(z.y,x),a.Ye(z);this.su.h(y-a.x,x-a.y)}return a}},midPoint:{get:function(){return this.vg(),this.computeMidPoint(new tt)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||m0(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);Jt.$(b.x,E.x)?(b=E.y-b.y,0>b&&(b=-b)):Jt.$(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 kn,b=0;b<a.length/2;b++)E=new tt(a[2*b],a[2*b+1]).freeze(),x.add(E);else{for(b=!0,E=0;E<a.length;E++){var z=a[E];if(!en(z)||typeof z.x!="number"||isNaN(z.x)||typeof z.y!="number"||isNaN(z.y)){b=!1;break}}if(b)for(x=new kn,b=0;b<a.length;b++)E=a[b],x.add(new tt(E.x,E.y).freeze())}}else if(a instanceof kn)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else St("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),m0(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&da(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||!vp(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!vp(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(),x0(this,y===$h||y===yp||a===$h||a===yp),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(),x0(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)}}}),vi.prototype.invalidateOtherJumpOvers=vi.prototype.Xo,vi.prototype.findClosestSegment=vi.prototype.ez,vi.prototype.updateRoute=vi.prototype.vg,vi.prototype.invalidateRoute=vi.prototype.bb,vi.prototype.rollbackRoute=vi.prototype.rv,vi.prototype.commitRoute=vi.prototype.zf,vi.prototype.startRoute=vi.prototype.uh,vi.prototype.clearPoints=vi.prototype.Fj,vi.prototype.removePoint=vi.prototype.pv,vi.prototype.addPointAt=vi.prototype.yf,vi.prototype.addPoint=vi.prototype.ne,vi.prototype.insertPointAt=vi.prototype.m,vi.prototype.insertPoint=vi.prototype.Kz,vi.prototype.setPointAt=vi.prototype.L,vi.prototype.setPoint=vi.prototype.dd,vi.prototype.getPoint=vi.prototype.i,vi.prototype.getOtherPort=vi.prototype.Cz,vi.prototype.getOtherNode=vi.prototype.To;var Ig=null,Og=null,ay=new ln(vi,"Normal",1),Lx=new ln(vi,"Orthogonal",2),Nx=new ln(vi,"AvoidsNodes",6),n1=new ln(vi,"AvoidsNodesStraight",7),Zl=new ln(vi,"None",0),$u=new ln(vi,"Bezier",9),$h=new ln(vi,"JumpGap",10),yp=new ln(vi,"JumpOver",11),tm=new ln(vi,"End",17),P0=new ln(vi,"Scale",18),w0=new ln(vi,"Stretch",19),nm=new ln(vi,"OrientAlong",21),im=new ln(vi,"OrientPlus90",22),rm=new ln(vi,"OrientMinus90",23),sy=new ln(vi,"OrientOpposite",24),C0=new ln(vi,"OrientUpright",25),om=new ln(vi,"OrientPlus90Upright",26),am=new ln(vi,"OrientMinus90Upright",27),b0=new ln(vi,"OrientUpright45",28),i1=16,r1=14,sm=8;vi.className="Link",vi.Normal=ay,vi.Orthogonal=Lx,vi.AvoidsNodes=Nx,vi.AvoidsNodesStraight=n1,vi.None=Zl,vi.Bezier=$u,vi.JumpGap=$h,vi.JumpOver=yp,vi.End=tm,vi.Scale=P0,vi.Stretch=w0,vi.OrientAlong=nm,vi.OrientPlus90=im,vi.OrientMinus90=rm,vi.OrientOpposite=sy,vi.OrientUpright=C0,vi.OrientPlus90Upright=om,vi.OrientMinus90Upright=am,vi.OrientUpright45=b0,vi.EndSegmentStep=8,vi.CurvinessStart=i1,vi.SpacingMin=r1,vi.OrthoShortCut=sm;function E0(a,y,x,b){Or(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=b,this.links=[]}E0.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},E0.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))}},E0.className="LinkBundle";function lm(a){Or(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}lm.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=ly,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 Sp(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function zd(a,y,x){return Sp(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):ly}function o1(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]>=tg&&(x[b]=ly)}lm.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 z=y;z<=x;z++)if(E[z]===Kh)return!1}return!0};function Hd(a,y,x,b,E,z,te,re,oe){if(!(y<z||y>te||x<re||x>oe)){var le=y|0,ue=x|0,me=a.ac[le][ue];if(me>=tg&&me<xp)for(E?ue+=b:le+=b,me+=1;z<=le&&le<=te&&re<=ue&&ue<=oe&&!(me>=a.ac[le][ue]);)a.ac[le][ue]=me,me+=1,E?ue+=b:le+=b;if(le=E?ue:le,E)if(0<b)for(x+=b;x<le;x+=b)Hd(a,y,x,1,!E,z,te,re,oe),Hd(a,y,x,-1,!E,z,te,re,oe);else for(x+=b;x>le;x+=b)Hd(a,y,x,1,!E,z,te,re,oe),Hd(a,y,x,-1,!E,z,te,re,oe);else if(0<b)for(y+=b;y<le;y+=b)Hd(a,y,x,1,!E,z,te,re,oe),Hd(a,y,x,-1,!E,z,te,re,oe);else for(y+=b;y>le;y+=b)Hd(a,y,x,1,!E,z,te,re,oe),Hd(a,y,x,-1,!E,z,te,re,oe)}}function M0(a,y,x,b,E,z,te,re,oe){y|=0,x|=0;var le=Kh,ue=tg;for(a.ac[y][x]=ue;le===Kh&&y>z&&y<te&&x>re&&x<oe;)ue+=1,a.ac[y][x]=ue,E?x+=b:y+=b,le=a.ac[y][x]}function L0(a,y,x,b,E,z,te,re,oe){y|=0,x|=0;var le=Kh,ue=xp;for(a.ac[y][x]=ue;le===Kh&&y>z&&y<te&&x>re&&x<oe;)a.ac[y][x]=ue,E?x+=b:y+=b,le=a.ac[y][x]}function a1(a,y,x,b,E,z,te){if(a.ac!==null){a.abort=!1;var re=y.x,oe=y.y;if(Sp(a,re,oe)){re-=a.Nd,re/=a.rc,oe-=a.Od,oe/=a.sc;var le=b.x,ue=b.y;if(Sp(a,le,ue))if(le-=a.Nd,le/=a.rc,ue-=a.Od,ue/=a.sc,1>=Math.abs(re-le)&&1>=Math.abs(oe-ue))a.abort=!0;else{var me=z.x;b=z.y,y=z.x+z.width;var we=z.y+z.height;me-=a.Nd,me/=a.rc,b-=a.Od,b/=a.sc,y-=a.Nd,y/=a.rc,we-=a.Od,we/=a.sc,z=Math.max(0,Math.min(a.di,me|0)),y=Math.min(a.di,Math.max(0,y|0)),me=Math.max(0,Math.min(a.ei,b|0)),we=Math.min(a.ei,Math.max(0,we|0)),b=a.ac,re|=0,oe|=0,le|=0,ue|=0;var Me=x===0||x===90?1:-1;if(x=x===90||x===270,b[re][oe]===Kh?(M0(a,re,oe,Me,x,z,y,me,we),M0(a,re,oe,1,!x,z,y,me,we),M0(a,re,oe,-1,!x,z,y,me,we)):M0(a,re,oe,Me,x,re,oe,re,oe),b[le][ue]===Kh?(L0(a,le,ue,E===0||E===90?1:-1,E===90||E===270,z,y,me,we),L0(a,le,ue,1,!(E===90||E===270),z,y,me,we),L0(a,le,ue,-1,!(E===90||E===270),z,y,me,we)):L0(a,le,ue,Me,x,le,ue,le,ue),x=mn(),te&&s1(a,le,ue,E,re,oe,x))for((x[0]!==le||x[1]!==ue)&&(x.unshift(ue),x.unshift(le)),(x[x.length-2]!==re||x[x.length-1]!==oe)&&(x.push(re),x.push(oe)),a=tg,E=x[x.length-2],te=x[x.length-1],b[E][te]=a++,z=x.length-4;0<=z;z-=2)for(E=x[z+2],te=x[z+3],y=x[z],le=x[z+1];y>E?E++:y<E?E--:le>te?te++:le<te&&te--,b[E][te]=a++,E!==y||te!==le;);else Hd(a,re,oe,1,!1,z,y,me,we),Hd(a,re,oe,-1,!1,z,y,me,we),Hd(a,re,oe,1,!0,z,y,me,we),Hd(a,re,oe,-1,!0,z,y,me,we);Wn(x)}}}}function s1(a,y,x,b,E,z,te){for(var re=a.ac,oe=y,le=x;;){if(oe===E&&le===z)return!0;var ue=oe,me=le;if(b===0)if(ue<E)ue++;else break;else if(b===90)if(me<z)me++;else break;else if(b===180)if(ue>E)ue--;else break;else if(me>z)me--;else break;var we=re[ue][me];if(we===0||we===uy)break;oe=ue,le=me}for(;;){if(ue=b,me=oe,we=le,b===0?we<z?(ue=90,we++):we>z&&(ue=270,we--):b===90?me<E?(ue=0,me++):me>E&&(ue=180,me--):b===180?we<z?(ue=90,we++):we>z&&(ue=270,we--):me<E?(ue=0,me++):me>E&&(ue=180,me--),me=re[me][we],ue!==b&&me!==0&&me!==uy){if(te.push(oe),te.push(le),s1(a,oe,le,ue,E,z,te))return!0;te.pop(),te.pop()}if(re[oe][le]=uy,b===0){if(oe===y)return!1;oe--}else if(b===90){if(le===x)return!1;le--}else if(b===180){if(oe===y)return!1;oe++}else{if(le===x)return!1;le++}}}Je.Object.defineProperties(lm.prototype,{bounds:{get:function(){return new Ut(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 Kh=0,tg=1,xp=999999,ly=xp+1,uy=xp+2;lm.className="PositionArray";function Rg(){Or(this),this.port=this.node=null,this.pe=[],this.ap=!1}Rg.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 Fx(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}Rg.prototype.Sl=function(){this.pe.length=0};function l1(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,z=E instanceof Yr?E:null;if(z===null||z.isSubGraphExpanded)var te=E.isTreeExpanded?E.findLinksConnected(a.port.portId):E.qx();else{if(!z.actualBounds.w()){a.ap=x;break e}b=z,te=b.Lu()}z=a.pe.length=0;var re=a.port.ga(Ba,tt.alloc()),oe=a.port.ga(vl,tt.alloc());for(E=Ut.allocAt(re.x,re.y,0,0),E.Ye(oe),tt.free(re),tt.free(oe),re=tt.allocAt(E.x+E.width/2,E.y+E.height/2),oe=a.port.li(),te=te.iterator;te.next();){var le=te.value;if(le.isVisible()&&le.fromPort!==le.toPort){var ue=le.fromPort===a.port||le.fromNode!==null&&le.fromNode.Td(b),me=le.computeSpot(ue,a.port);if(me.$c()&&(ue=ue?le.toPort:le.fromPort,ue!==null)){var we=ue.part;if(we!==null){var Me=we.findVisibleNode();Me!==null&&Me!==we&&(we=Me,ue=we.port),ue=le.computeOtherPoint(we,ue),we=re.ab(ue),we-=oe,0>we?we+=360:360<=we&&(we-=360),me=Fx(E,me,we,le.isOrthogonal),me===0?(me=4,180<we&&(we-=360)):me===90?(me=8,270<we&&(we-=360)):me===180?me=2:(me=1,90>we&&(we+=360)),Me=a.pe[z],Me===void 0?(Me=new cy(le,we,me),a.pe[z]=Me):(Me.link=le,Me.angle=we,Me.Nc=me),Me.hv.set(ue),z++}}}}for(tt.free(re),a.pe.sort(Rg.prototype.j),oe=a.pe.length,b=-1,z=re=0;z<oe;z++)te=a.pe[z],te!==void 0&&(te.Nc!==b&&(b=te.Nc,re=0),te.Uo=re,re++);for(b=-1,re=0,z=oe-1;0<=z;z--)oe=a.pe[z],oe!==void 0&&(oe.Nc!==b&&(b=oe.Nc,re=oe.Uo+1),oe.Gl=re);if(z=a.pe,me=a.port,b=a.node.portSpreading,re=tt.alloc(),oe=tt.alloc(),te=tt.alloc(),le=tt.alloc(),me.ga(Ba,re),me.ga(su,oe),me.ga(vl,te),me.ga(Ml,le),Me=we=ue=me=0,b===qv)for(var Te=0;Te<z.length;Te++){var je=z[Te];if(je!==null){var ct=je.link.computeThickness();switch(je.Nc){case 8:we+=ct;break;case 2:Me+=ct;break;case 1:me+=ct;break;default:case 4:ue+=ct}}}var nt=Te=0,bt=1,Nt=je=0;for(ct=0;ct<z.length;ct++){var Ot=z[ct];if(Ot!==null){if(Te!==Ot.Nc){switch(Te=Ot.Nc,Te){case 8:var Xt=te;nt=le;break;case 2:Xt=le,nt=re;break;case 1:Xt=re,nt=oe;break;default:case 4:Xt=oe,nt=te}switch(je=nt.x-Xt.x,Nt=nt.y-Xt.y,Te){case 8:we>Math.abs(je)?(bt=Math.abs(je)/we,we=Math.abs(je)):bt=1;break;case 2:Me>Math.abs(Nt)?(bt=Math.abs(Nt)/Me,Me=Math.abs(Nt)):bt=1;break;case 1:me>Math.abs(je)?(bt=Math.abs(je)/me,me=Math.abs(je)):bt=1;break;default:case 4:ue>Math.abs(Nt)?(bt=Math.abs(Nt)/ue,ue=Math.abs(Nt)):bt=1}nt=0}var gn=Ot.Zo;if(b===qv){switch(Ot=Ot.link.computeThickness(),Ot*=bt,gn.set(Xt),Te){case 8:gn.x=Xt.x+je/2+we/2-nt-Ot/2;break;case 2:gn.y=Xt.y+Nt/2+Me/2-nt-Ot/2;break;case 1:gn.x=Xt.x+je/2-me/2+nt+Ot/2;break;default:case 4:gn.y=Xt.y+Nt/2-ue/2+nt+Ot/2}nt+=Ot}else{var Fi=.5;b===p0&&(Fi=(Ot.Uo+1)/(Ot.Gl+1)),gn.x=Xt.x+je*Fi,gn.y=Xt.y+Nt*Fi}}}for(tt.free(re),tt.free(oe),tt.free(te),tt.free(le),Xt=a.pe,z=0;z<Xt.length;z++)b=Xt[z],b!==null&&(b.Ju=a.computeEndSegmentLength(b));a.ap=x,Ut.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}Rg.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},Rg.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,La,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 z=a.Zo;return(a.Nc===2||a.Nc===8)&&(b=E-1-b),((a=a.Nc===2||a.Nc===4)?y.y<z.y:y.x<z.x)?x+8*b:(a?y.y===z.y:y.x===z.x)?x:x+8*(E-1-b)},Rg.className="Knot";function cy(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new tt,this.Gl=this.Uo=0,this.Zo=new tt,this.Ju=0}cy.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()},cy.className="LinkInfo";function Ma(a){Or(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new tt(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}Ma.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},Ma.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Ma.prototype.qb=function(){},Ma.prototype.toString=function(){var a=Hn(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},Ma.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())}}},Ma.prototype.createNetwork=function(){return new ca(this)},Ma.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof hn?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof Yr?y.lg(a.memberParts):y.lg(a.iterator),y},Ma.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")}},Ma.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()}},Ma.prototype.doLayout=function(a){var y=new _n;a instanceof hn?(Sf(this,y,a.nodes,!0,this.rh,!0,!1,!0),Sf(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof Yr?Sf(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},Ma.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,z=0,te=0;for(a=a.iterator;a.next();){var re=a.value;um(re);var oe=re.measuredBounds,le=oe.width;oe=oe.height,re.moveTo(b,E),re instanceof Yr&&(re.rh=!1),b+=Math.max(le,50)+20,te=Math.max(te,Math.max(oe,50)),z>=y-1?(z=0,b=x,E+=te+20,te=0):z++}},Ma.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,z=0,te=this.network.vertexes.iterator;te.next();){var re=te.value.node;if(!(re===null||re instanceof vi)&&(um(re),this.rh(re))){var oe=re.measuredBounds,le=oe.width;oe=oe.height,re.moveTo(x,b),re instanceof Yr&&(re.rh=!1),x+=Math.max(le,50)+20,z=Math.max(z,Math.max(oe,50)),E>=a-1?(E=0,x=y,b+=z+20,z=0):E++}}},Ma.prototype.rh=function(a){return!!(!a.location.w()||a instanceof Yr&&a.rh)};function Sf(a,y,x,b,E,z,te,re){for(x=x.iterator;x.next();){var oe=x.value;b&&!oe.isTopLevel||E!==null&&!E(oe)||!oe.canLayout()||(z&&oe instanceof Di?oe.isLinkLabel||(oe instanceof Yr&&oe.layout===null?Sf(a,y,oe.memberParts,!1,E,z,te,re):(um(oe),y.add(oe))):te&&oe instanceof vi?y.add(oe):!re||!oe.Zc()||oe instanceof Di||(um(oe),y.add(oe)))}}function um(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}Ma.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new Ut),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},Ma.prototype.ex=function(a){var y=new _n;return a instanceof hn?(Sf(this,y,a.nodes,!0,null,!0,!0,!0),Sf(this,y,a.links,!0,null,!0,!0,!0),Sf(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof Yr?Sf(this,y,a.memberParts,!1,null,!0,!0,!0):Sf(this,y,a.iterator,!1,null,!0,!0,!0),y},Ma.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(Ba),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},Je.Object.defineProperties(Ma.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())}}}),Ma.prototype.collectParts=Ma.prototype.ex,Ma.prototype.getLayoutBounds=Ma.prototype.ni,Ma.prototype.invalidateLayout=Ma.prototype.C,Ma.className="Layout";function ca(a){Or(this),this.Sc=a,this.wf=new _n,this.ye=new _n,this.Es=new Ii,this.zs=new Ii}ca.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 _n,this.ye=new _n,this.Es=new Ii,this.zs=new Ii},ca.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},ca.prototype.createVertex=function(){return new Ms(this)},ca.prototype.createEdge=function(){return new Tu(this)},ca.prototype.lg=function(a,y,x){if(a!==null){for(y===void 0&&(y=!1),x===void 0&&(x=null),x===null&&(x=function(te){if(te instanceof Di)return!te.isLinkLabel;if(te instanceof vi){var re=te.fromNode;return re===null||re.isLinkLabel?!1:(te=te.toNode,!(te===null||te.isLinkLabel))}return!1}),a=a.iterator;a.next();){var b=a.value;if(b instanceof Di&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)){if(b instanceof Yr&&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 vi&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)&&this.Lo(b)===null){var z=b.fromNode;E=b.toNode,z!==null&&E!==null&&z!==E&&(z=this.findGroupVertex(z),E=this.findGroupVertex(E),z!==null&&E!==null&&this.Zj(z,E,b))}}},ca.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},Le=ca.prototype,Le.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},Le.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},Le.Iu=function(a){if(a!==null&&u1(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 u1(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}Le.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},Le.ki=function(a){return a===null?null:this.Es.I(a)},Le.Bo=function(a){if(a!==null){dy(this,a);var y=a.toVertex;y!==null&&y.Cl(a),y=a.fromVertex,y!==null&&y.zl(a)}};function dy(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}}Le.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},Le.Mj=function(a){if(a!==null){var y=a.toVertex;y!==null&&y.Kl(a),y=a.fromVertex,y!==null&&y.Jl(a),hy(this,a)}};function hy(a,y){y!==null&&a.ye.remove(y)&&(y=y.link,y!==null&&a.zs.remove(y))}Le.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},Le.Lo=function(a){return a===null?null:this.zs.I(a)},Le.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},Le.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))}},Le.Ko=function(){for(var a=mn(),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]);Wn(a)},ca.prototype.deleteArtificialVertexes=function(){for(var a=mn(),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=mn(),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]);Wn(a),Wn(y)};function Ax(a){for(var y=mn(),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]);Wn(y)}ca.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Ax(this),this.Ko()),a=new kn;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),fy(this,y,b),y=!0;break}}}return a.sort(function(E,z){return E===null||z===null||E===z?0:z.vertexes.count-E.vertexes.count}),a};function fy(a,y,x){if(x!==null&&x.network!==y){u1(a,x),y.dh(x);for(var b=x.sourceEdges;b.next();){var E=b.value;E.network!==y&&(hy(a,E),dy(y,E),fy(a,y,E.fromVertex))}for(b=x.destinationEdges;b.next();)x=b.value,x.network!==y&&(hy(a,x),dy(y,x),fy(a,y,x.toVertex))}}ca.prototype.dz=function(){for(var a=new _n,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},Je.Object.defineProperties(ca.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}}}),ca.prototype.findAllParts=ca.prototype.dz,ca.prototype.splitIntoSubNetworks=ca.prototype.Zx,ca.prototype.deleteSelfEdges=ca.prototype.Ko,ca.prototype.reverseEdge=ca.prototype.gm,ca.prototype.linkVertexes=ca.prototype.Zj,ca.prototype.findEdge=ca.prototype.Lo,ca.prototype.deleteLink=ca.prototype.Yy,ca.prototype.deleteEdge=ca.prototype.Mj,ca.prototype.addLink=ca.prototype.Dy,ca.prototype.addEdge=ca.prototype.Bo,ca.prototype.findVertex=ca.prototype.ki,ca.prototype.deleteNode=ca.prototype.Zy,ca.prototype.deleteVertex=ca.prototype.Iu,ca.prototype.addNode=ca.prototype.Bl,ca.prototype.addVertex=ca.prototype.dh,ca.prototype.addParts=ca.prototype.lg,ca.className="LayoutNetwork";function Ms(a){Or(this),this.ob=a,this.j=new Ut(0,0,10,10).freeze(),this.o=new tt(5,5).freeze(),this.Sh=this.ub=null,this.tg=new kn,this.mg=new kn}Ms.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new kn,this.mg=new kn},Ms.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+br(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 z=b.value;x?x=!1:E+=",",E+=z.toString(0)}y+=" sources: "+a+" destinations: "+E}return y},Ms.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;en(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 Yr)){x=Ut.alloc(),a.Va();var b=this.network.layout.ni(a,x),E=a.locationObject.ga(wo);if(b.w()&&E.w()){a.moveTo(y.x+this.focusX-(E.x-b.x),y.y+this.focusY-(E.y-b.y)),Ut.free(x);return}Ut.free(x)}a.moveTo(y.x,y.y)}},Ms.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},Ms.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},Ms.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},Ms.prototype.Jl=function(a){a!==null&&this.mg.remove(a)};function gy(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}Je.Object.defineProperties(Ms.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=Ut.alloc(),b=y.ni(a,x);y=b.x;var E=b.y,z=b.width;if(b=b.height,isNaN(y)&&(y=0),isNaN(E)&&(E=0),this.j.h(y,E,z,b),Ut.free(x),!(a instanceof Yr)&&(a=a.locationObject.ga(wo),a.w())){this.o.h(a.x-y,a.y-E);return}this.o.h(z/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 _n,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new _n,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new _n,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 kn,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}}}),Ms.prototype.deleteDestinationEdge=Ms.prototype.Jl,Ms.prototype.addDestinationEdge=Ms.prototype.zl,Ms.prototype.deleteSourceEdge=Ms.prototype.Kl,Ms.prototype.addSourceEdge=Ms.prototype.Cl,Ms.className="LayoutVertex",Ms.standardComparer=gy,Ms.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 Tu(a){Or(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}Tu.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},Tu.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+br(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},Tu.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},Tu.prototype.commit=function(){},Tu.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},Je.Object.defineProperties(Tu.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)}}}),Tu.prototype.getOtherVertex=Tu.prototype.Ax,Tu.className="LayoutEdge";function qs(a){Ma.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new fi(NaN,NaN).freeze(),this.tf=new fi(10,10).freeze(),this.Jb=cm,this.Rb=F0,this.nd=dm,this.hd=c1,a&&Object.assign(this,a)}$t(qs,Ma),qs.prototype.cloneProtected=function(a){Ma.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},qs.prototype.qb=function(a){a.classType===qs?a===dm||a===D0||a===py||a===A0?this.sorting=a:a===F0||a===Vc?this.arrangement=a:a===cm||a===N0?this.alignment=a:St("Unknown enum value: "+a):Ma.prototype.qb.call(this,a)},qs.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 Yr)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 A0:E.reverse();break;case dm:E.sort(this.comparer);break;case D0:E.sort(this.comparer),E.reverse()}var z=this.wrappingColumn;isNaN(z)&&(z=0);var te=this.wrappingWidth;switch(isNaN(te)&&a!==null?(y=a.padding,te=Math.max(a.viewportBounds.width-y.left-y.right,0)):te=Math.max(this.wrappingWidth,0),0>=z&&0>=te&&(z=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 N0:var re=y,oe=x,le=Ut.alloc(),ue=Math.max(this.cellSize.width,1);if(!isFinite(ue))for(var me=ue=0;me<E.length;me++){var we=this.ni(E[me],le);ue=Math.max(ue,we.width)}if(ue=Math.max(ue+re,1),me=Math.max(this.cellSize.height,1),!isFinite(me))for(we=me=0;we<E.length;we++){var Me=this.ni(E[we],le);me=Math.max(me,Me.height)}me=Math.max(me+oe,1),we=this.arrangement;for(var Te=Me=this.arrangementOrigin.x,je=this.arrangementOrigin.y,ct=0,nt=0,bt=0;bt<E.length;bt++){var Nt=E[bt],Ot=this.ni(Nt,le),Xt=Math.ceil((Ot.width+re)/ue)*ue,gn=Math.ceil((Ot.height+oe)/me)*me;switch(we){case Vc:var Fi=Math.abs(Te-Ot.width);break;default:Fi=Te+Ot.width}switch((0<z&&ct>z-1||0<te&&0<ct&&Fi-Me>te)&&(b.push(new Ut(0,je,te+re,nt)),ct=0,Te=Me,je+=nt,nt=0),nt=Math.max(nt,gn),we){case Vc:Ot=-Ot.width;break;default:Ot=0}switch(Nt.moveTo(Te+Ot,je),we){case Vc:Te-=Xt;break;default:Te+=Xt}ct++}b.push(new Ut(0,je,te+re,nt)),Ut.free(le);break;case cm:for(oe=te,ue=z,me=y,we=x,te=Ut.alloc(),Me=Math.max(this.cellSize.width,1),z=je=le=0,re=tt.alloc(),Te=0;Te<E.length;Te++)nt=E[Te],ct=this.ni(nt,te),nt=Zh(nt,nt.locationObject,nt.locationSpot,re),le=Math.max(le,nt.x),je=Math.max(je,ct.width-nt.x),z=Math.max(z,nt.y);switch(Te=this.arrangement,Te){case Vc:le+=me;break;default:je+=me}Me=isFinite(Me)?Math.max(Me+me,1):Math.max(le+je,1);var _i=nt=this.arrangementOrigin.x;for(bt=this.arrangementOrigin.y,je=0,oe>=le&&(oe-=le),le=Nt=0,Xt=Math.max(this.cellSize.height,1),Ot=z=0,gn=!0,ct=tt.alloc(),Fi=0;Fi<E.length;Fi++){var zi=E[Fi],mi=this.ni(zi,te),ti=Zh(zi,zi.locationObject,zi.locationSpot,re);if(0<je)switch(Te){case Vc:_i=(_i-nt-(mi.width-ti.x))/Me,_i=Jt.$(Math.round(_i),_i)?Math.round(_i):Math.floor(_i),_i=_i*Me+nt;break;default:_i=(_i-nt+ti.x)/Me,_i=Jt.$(Math.round(_i),_i)?Math.round(_i):Math.ceil(_i),_i=_i*Me+nt}else switch(Te){case Vc:Nt=_i+ti.x+mi.width;break;default:Nt=_i-ti.x}switch(Te){case Vc:var Ur=-(_i+ti.x)+Nt;break;default:Ur=_i+mi.width-ti.x-Nt}if(0<ue&&je>ue-1||0<oe&&0<je&&Ur>oe){for(b.push(new Ut(0,gn?bt-z:bt,oe+me,Ot+z+we)),_i=0;_i<je&&Fi!==je;_i++){Ur=E[Fi-je+_i];var Dr=Zh(Ur,Ur.locationObject,Ur.locationSpot,ct);Ur.moveTo(Ur.position.x,Ur.position.y+z-Dr.y)}Ot+=we,bt=gn?bt+Ot:bt+(Ot+z),je=Ot=z=0,_i=nt,gn=!1}switch(_i===nt&&(le=Te===Vc?Math.max(le,mi.width-ti.x):Math.min(le,-ti.x)),z=Math.max(z,ti.y),Ot=Math.max(Ot,mi.height-ti.y),isFinite(Xt)&&(Ot=Math.max(Ot,Math.max(mi.height,Xt)-ti.y)),gn?zi.moveTo(_i-ti.x,bt-ti.y):zi.moveTo(_i-ti.x,bt),Te){case Vc:_i-=ti.x+me;break;default:_i+=mi.width-ti.x+me}je++}if(b.push(new Ut(0,bt,oe+me,(gn?Ot:Ot+z)+we)),E.length!==je)for(oe=0;oe<je;oe++)ue=E[E.length-je+oe],me=Zh(ue,ue.locationObject,ue.locationSpot,re),ue.moveTo(ue.position.x,ue.position.y+z-me.y);if(tt.free(re),tt.free(ct),Te===Vc)for(E=0;E<b.length;E++)z=b[E],z.width+=le,z.x-=le;else for(E=0;E<b.length;E++)z=b[E],z.x>le&&(z.width+=z.x-le,z.x=le);Ut.free(te)}for(re=z=te=E=0;re<b.length;re++)oe=b[re],E=Math.min(E,oe.x),te=Math.min(te,oe.y),z=Math.max(z,oe.x+oe.width);this.arrangement===Vc?this.commitLayers(b,new tt(E+y/2-(z+E),te-x/2)):this.commitLayers(b,new tt(E-y/2,te-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},qs.prototype.commitLayers=function(){};function c1(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}Je.Object.defineProperties(qs.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!==cm&&a!==N0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==F0&&a!==Vc||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==py&&a!==A0&&a!==dm&&a!==D0||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var N0=new ln(qs,"Position",0),cm=new ln(qs,"Location",1),F0=new ln(qs,"LeftToRight",2),Vc=new ln(qs,"RightToLeft",3),py=new ln(qs,"Forward",4),A0=new ln(qs,"Reverse",5),dm=new ln(qs,"Ascending",6),D0=new ln(qs,"Descending",7);qs.className="GridLayout",qs.standardComparer=c1,qs.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},qs.Position=N0,qs.Location=cm,qs.LeftToRight=F0,qs.RightToLeft=Vc,qs.Forward=py,qs.Reverse=A0,qs.Ascending=dm,qs.Descending=D0;function qo(){this.On=new _n,this.Dn=new _n,this.Pa=new _n,this.cf=new Ii,this.bf=new Ii,this.aj=new Ii,this.H=null,this.tp=!1}Le=qo.prototype,Le.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},Le.Xe=function(a){this.H=a},Le.oi=function(a){if(a instanceof Di){if(this.On.add(a),a instanceof Yr){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 vi?this.Dn.add(a):a instanceof jo||this.Pa.add(a);y=a.data,y===null||a instanceof jo||(a instanceof vi?this.bf.add(y,a):this.cf.add(y,a))},Le.pc=function(a){if(a.Ej(),a instanceof Di){if(this.On.remove(a),a instanceof Yr){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 vi?this.Dn.remove(a):a instanceof jo||this.Pa.remove(a);y=a.data,y===null||a instanceof jo||(a instanceof vi?this.bf.remove(y):this.cf.remove(y))},Le.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 Yr)&&St('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 Yr||St('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 vi||St('Invalid link template in Diagram.linkTemplateMap: template for "'+b+'" must be a Link, not a normal Node or simple Part: '+x);for(y=mn(),x=a.selection.iterator;x.next();)(b=x.value.data)&&y.push(b);for(x=mn(),a=a.highlighteds.iterator;a.next();)(b=a.value.data)&&x.push(b);for(a=mn(),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]);Wn(y),Wn(x),Wn(a)}},qo.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},qo.prototype.addModeledParts=function(a,y){var x=this,b=this.diagram.model;a.forEach(function(E){b.lb(E)&&d1(x,E,!1)}),a.forEach(function(E){b.lb(E)&&x.resolveReferencesForData(E)}),y!==!1&&ah(this.diagram,!1)};function d1(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=h1(a,y,b);if(E!==null&&(hc(E),E=E.copy(),E!==null)){var z=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=z,b=E;break e}}b=null}b!==null&&x&&a.resolveReferencesForData(y)}}qo.prototype.insertLink=function(){return null},qo.prototype.resolveReferencesForData=function(){},qo.prototype.Ro=function(a){return this.H.model.Ro(a)};function h1(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&&(p1||(p1=!0,Si('No Group template found for category "'+x+'"'),Si(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(g1||(g1=!0,Si('No Node template found for category "'+x+'"'),Si(" Using default node template")),y=a.ny))),y}qo.prototype.getLinkCategoryForData=function(){return""},qo.prototype.setLinkCategoryForData=function(){},qo.prototype.setFromNodeForLink=function(){},qo.prototype.setToNodeForLink=function(){},qo.prototype.findLinkTemplateForCategory=function(a){var y=this.H,x=y.linkTemplateMap.I(a);return x===null&&(x=y.linkTemplateMap.I(""),x===null&&(m1||(m1=!0,Si('No Link template found for category "'+a+'"'),Si(" Using default link template")),x=y.my)),x},qo.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},qo.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},qo.prototype.ip=function(a){a=this.Lc(a),a!==null&&(rh(this.diagram,a,!1),this.unresolveReferencesForPart(a))},qo.prototype.unresolveReferencesForPart=function(){},qo.prototype.removeDataForLink=function(){},qo.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},qo.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof Di?a:null)},qo.prototype.findLinkForKey=function(){return null},Le=qo.prototype,Le.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},Le.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof Di?a:null)},Le.Kc=function(a){return a===null?null:this.bf.I(a)},Le.ms=function(a){for(var y=0;y<arguments.length;++y);y=new _n;for(var x=this.On.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var z=0;z<arguments.length;z++){var te=arguments[z];if(en(te)&&my(this,E,te)){y.add(b);break}}}return y.iterator},Le.ls=function(a){for(var y=0;y<arguments.length;++y);y=new _n;for(var x=this.Dn.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var z=0;z<arguments.length;z++){var te=arguments[z];if(en(te)&&my(this,E,te)){y.add(b);break}}}return y.iterator};function my(a,y,x){for(var b in x){var E=y[b],z=x[b];if(Cn(z)){if(!Cn(E)||E.length<z.length)return!1;for(var te=0;te<E.length;te++){var re=z[te];if(re!==void 0&&!f1(a,E[te],re))return!1}}else if(!f1(a,E,z))return!1}return!0}function f1(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(en(y)&&en(x)){if(!my(a,y,x))return!1}else if(y!==x)return!1;return!0}qo.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===wa){if(b==="nodeCategory"){var E=this.Lc(a.object),z=a.newValue;E!==null&&typeof z=="string"&&(E.category=z)}else b==="nodeDataArray"&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));y.isModified=!0}else if(x===Va){var te=a.newValue;b==="nodeDataArray"&&en(te)&&d1(this,te),y.isModified=!0}else if(x===cs){var re=a.oldValue;b==="nodeDataArray"&&en(re)&&this.ip(re),y.isModified=!0}else x===Ll&&(b==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):b==="ModelDisplaced"&&this.Wd());else if(x===wa){var oe=a.propertyName,le=a.object;le===y.model?(oe==="nodeKeyProperty"||oe==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(le,oe),y.isModified=!0}else if(x===Va||x===cs){var ue=a.change===Va,me=ue?a.newParam:a.oldParam,we=ue?a.newValue:a.oldValue,Me=this.aj.I(a.object);if(Array.isArray(Me))for(a=0;a<Me.length;a++){var Te=Me[a];if(ue)Ym(Te,we,me,!0);else if(!(0>me)){var je=me+Vp(Te);Te.pc(je,!0),Av(Te,je,me)}}y.isModified=!0}}finally{y.aa=!0}}}}},qo.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)},qo.prototype.rp=function(){for(var a=this.H.model,y=new _n,x=a.nodeDataArray,b=0;b<x.length;b++)y.add(x[b]);var E=[];for(this.nodes.each(function(te){te.data===null||y.contains(te.data)||E.push(te.data)}),this.parts.each(function(te){te.data===null||y.contains(te.data)||E.push(te.data)}),E.forEach(function(te){E1(a,te,!1)}),b=0;b<x.length;b++){var z=x[b];this.Lc(z)===null&&b1(a,z,!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()},qo.prototype.refreshDataBoundLinks=function(){},qo.prototype.updateRelationshipsFromData=function(){},qo.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,z=0;z<E.length;z++){var te=E[z].sx(a);te!==null&&(x===null&&(x=mn()),x.push(te))}if(x!==null)break}if(x!==null){for(b=0;b<x.length;b++)x[b].La(y);Wn(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function vy(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 yy(a,y,x){Yf(y,function(te){te=te.O.s;for(var re=te.length,oe=0;oe<re;oe++)vg(x,te[oe])});var b=y.Hh;if(Cn(b)){var E=a.aj.I(b);if(E!==null){for(var z=0;z<E.length;z++)if(E[z]===y){E.splice(z,1),E.length===0&&a.aj.remove(b);break}}}}qo.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var b=new Ii;if(Cn(a))for(var E=0;E<a.length;E++)B0(this,a[E],y,b,x);else for(a=a.iterator;a.next();)B0(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 _n;for(var z=new Ii,te=b.iterator;te.next();){var re=te.value;if(re instanceof vi)a||re.fromNode!==null&&re.toNode!==null||E.add(re);else if(re instanceof Di&&re.data!==null&&x.Tl()){var oe=re;re=te.key;var le=re.pg();le!==null&&(le=b.I(le),le!==null?(x.qe(oe.data,x.wa(le.data)),oe=y.Kc(oe.data),re=re.kh(),re!==null&&oe!==null&&z.add(re,oe)):x.qe(oe.data,void 0))}}if(0<E.count&&y.Is(E,!1),0<z.count)for(x=z.iterator;x.next();)b.add(x.key,x.value)}if(y!==null&&this.H!==null&&(y=y.model,x=y.afterCopyFunction,x!==null)){var ue=new Ii;b.each(function(me){me.key.data!==null&&ue.add(me.key.data,me.value.data)}),x(ue,y,this.H.model)}for(y=b.iterator;y.next();)y.value.La();return b};function B0(a,y,x,b,E){if(y===null||E&&!y.canCopy())return null;if(b.contains(y))return b.I(y);var z=a.copyPartData(y,x);if(!(z instanceof pr))return null;if(z.isSelected=!1,z.isHighlighted=!1,b.add(y,z),y instanceof Di){for(var te=y.linksConnected;te.next();){var re=te.value;if(re.fromNode===y){var oe=b.I(re);oe!==null&&(oe.fromNode=z)}re.toNode===y&&(re=b.I(re),re!==null&&(re.toNode=z))}if(y instanceof Yr&&z instanceof Yr)for(y=y.memberParts;y.next();)te=B0(a,y.value,x,b,E),te instanceof vi||te===null||(te.containingGroup=z)}else if(y instanceof vi&&z instanceof vi)for(te=y.fromNode,te!==null&&(te=b.I(te),te!==null&&(z.fromNode=te)),te=y.toNode,te!==null&&(te=b.I(te),te!==null&&(z.toNode=te)),y=y.labelNodes;y.next();)te=B0(a,y.value,x,b,E),te!==null&&te instanceof Di&&(te.labeledLink=z);return z}qo.prototype.copyPartData=function(a,y){var x=null,b=a.data;if(b!==null&&y!==null){var E=y.model;a instanceof vi||(b=E.copyNodeData(b),en(b)&&(E.xf(b),x=y.Lc(b)))}else hc(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 vi||(E=y.copyNodeData(b)),en(E)&&(x.data=E)));return x},Je.Object.defineProperties(qo.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}}}),qo.prototype.updateAllRelationshipsFromData=qo.prototype.rp,qo.prototype.findLinksByExample=qo.prototype.ls,qo.prototype.findNodesByExample=qo.prototype.ms,qo.prototype.findLinkForData=qo.prototype.Kc,qo.prototype.findNodeForData=qo.prototype.ii,qo.prototype.findPartForData=qo.prototype.Lc,qo.prototype.findNodeForKey=qo.prototype.Vb,qo.prototype.removeModeledPart=qo.prototype.ip,qo.prototype.removeModeledParts=qo.prototype.Gs,qo.prototype.rebuildParts=qo.prototype.Wd;var g1=!1,p1=!1,m1=!1;qo.className="PartManager";function Ks(a){qo.apply(this,arguments)}$t(Ks,qo),Ks.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),v1(this,a.linkDataArray)},Ks.prototype.addModeledParts=function(a){for(qo.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)mp(a.value);ah(this.diagram,!1)};function v1(a,y){y.forEach(function(x){y1(a,x)}),ah(a.diagram,!1)}function y1(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){hc(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 z=O0(x,y,!0);z!==""&&(E.fromPortId=z),z=Ku(x,y,!0),z!==void 0&&(z=a.Vb(z),z instanceof Di&&(E.fromNode=z)),z=O0(x,y,!1),z!==""&&(E.toPortId=z),z=Ku(x,y,!1),z!==void 0&&(z=a.Vb(z),z instanceof Di&&(E.toNode=z)),x=x.Ef(y),Array.isArray(x)&&x.forEach(function(te){te=a.Vb(te),te!==null&&(te.labeledLink=E)}),a.tp&&(E.Jg="Tool"),a.diagram.add(E),E.ub=null,E.data=y,a.diagram.skipsModelSourceBindings=b}}}}Ks.prototype.removeAllModeledParts=function(){var a=this.diagram.model;S1(this,a.linkDataArray),this.Gs(a.nodeDataArray)};function S1(a,y){y.forEach(function(x){a.ip(x)})}Ks.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},Ks.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},Ks.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},Ks.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},Ks.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},Ks.prototype.findPartForKey=function(a){var y=qo.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},Ks.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},Ks.prototype.doModelChanged=function(a){var y=this;if(qo.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===wa){if(E==="linkFromKey"){var z=this.Kc(a.object);if(z!==null){var te=this.Vb(a.newValue);z.fromNode=te}}else if(E==="linkToKey"){var re=this.Kc(a.object);if(re!==null){var oe=this.Vb(a.newValue);re.toNode=oe}}else if(E==="linkFromPortId"){var le=this.Kc(a.object);if(le!==null){var ue=a.newValue;typeof ue=="string"&&(le.fromPortId=ue)}}else if(E==="linkToPortId"){var me=this.Kc(a.object);if(me!==null){var we=a.newValue;typeof we=="string"&&(me.toPortId=we)}}else if(E==="nodeGroupKey"){var Me=this.Lc(a.object);if(Me!==null){var Te=a.newValue;if(Te!==void 0){var je=this.Vb(Te);je instanceof Yr?Me.containingGroup=je:Me.containingGroup=null}else Me.containingGroup=null}}else if(E==="linkLabelKeys"){var ct=this.Kc(a.object);if(ct!==null){var nt=a.oldValue,bt=a.newValue;Array.isArray(nt)&&nt.forEach(function(ti){0<=bt.indexOf(ti)||(ti=y.Vb(ti),ti!==null&&(ti.labeledLink=null))}),Array.isArray(bt)&&bt.forEach(function(ti){ti=y.Vb(ti),ti!==null&&(ti.labeledLink=ct)})}}else if(E==="linkCategory"){var Nt=this.Kc(a.object),Ot=a.newValue;Nt!==null&&typeof Ot=="string"&&(Nt.category=Ot)}else E==="linkDataArray"&&(S1(this,a.oldValue),v1(this,a.newValue));x.isModified=!0}else if(b===Va){var Xt=a.newValue;if(E==="linkDataArray"&&typeof Xt=="object"&&Xt!==null)y1(this,Xt);else if(E==="linkLabelKeys"&&Pf(Xt)){var gn=this.Kc(a.object),Fi=this.Vb(Xt);gn!==null&&Fi!==null&&(Fi.labeledLink=gn)}x.isModified=!0}else if(b===cs){var _i=a.oldValue;if(E==="linkDataArray"&&typeof _i=="object"&&_i!==null)this.ip(_i);else if(E==="linkLabelKeys"&&Pf(_i)){var zi=this.Vb(_i);zi!==null&&(zi.labeledLink=null)}x.isModified=!0}}else if(b===wa){var mi=a.propertyName;a.object!==x.model||mi!=="linkFromKeyProperty"&&mi!=="linkToKeyProperty"&&mi!=="linkFromPortIdProperty"&&mi!=="linkToPortIdProperty"&&mi!=="linkLabelKeysProperty"&&mi!=="nodeIsGroupProperty"&&mi!=="nodeGroupKeyProperty"&&mi!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},Ks.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new _n,b=y.linkDataArray;b.forEach(function(z){x.add(z)});var E=[];this.links.each(function(z){z.data===null||x.contains(z.data)||E.push(z.data)}),E.forEach(function(z){D1(y,z,!1)}),b.forEach(function(z){a.Kc(z)===null&&A1(y,z,!1)})},Ks.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 vi){var E=Ku(b,y,!0);if(E=x.Vb(E),a.fromNode=E,E=Ku(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 z=a.labelNodes.first();if(b.wa(z.data)===E)return}E=new _n().addAll(y);var te=new _n;a.labelNodes.each(function(re){re.data!==null&&(re=b.wa(re.data),re!==void 0&&te.add(re))}),y=te.copy(),y.hp(E),E=E.copy(),E.hp(te),(0<y.count||0<E.count)&&(y.each(function(re){re=x.Vb(re),re!==null&&re.labeledLink===a&&(re.labeledLink=null)}),E.each(function(re){re=x.Vb(re),re!==null&&re.labeledLink!==a&&(re.labeledLink=a)}))}}else!(a instanceof jo)&&(y=b.lh(y),y=x.findPartForKey(y),y===null||y instanceof Yr)&&(a.containingGroup=y)}}},Ks.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=hm(y,x),E=this.Lc(a);if(b!==null&&E!==null){b=b.iterator;for(var z={};b.next();){var te=b.value;y.lb(te)?E instanceof Yr&&y.lh(te)===x&&(te=this.Lc(te),te!==null&&(te.containingGroup=E)):(z.link=this.Kc(te),z.link!==null&&E instanceof Di&&(Ku(y,te,!0)===x&&(z.link.fromNode=E),Ku(y,te,!1)===x&&(z.link.toNode=E),te=y.Ef(te),Array.isArray(te)&&te.some(function(re){return function(oe){return oe===x?(E.labeledLink=re.link,!0):!1}}(z)))),z={link:z.link}}_c(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof Yr&&(E.containingGroup=a))}},Ks.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Di){var x=y.wa(a.data);if(x!==void 0){for(var b=a.linksConnected;b.next();)Uc(y,x,b.value.data);if(a.isLinkLabel&&(b=a.labeledLink,b!==null&&Uc(y,x,b.data)),a instanceof Yr)for(a=a.memberParts;a.next();)b=a.value.data,y.lb(b)&&Uc(y,x,b)}}},Ks.prototype.copyPartData=function(a,y){var x=qo.prototype.copyPartData.call(this,a,y);if(a instanceof vi)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},Ks.prototype.insertLink=function(a,y,x,b){var E=this.diagram,z=E.model,te=E.toolManager.findTool("Linking"),re="";if(a!==null&&(y===null&&(y=a),re=y.portId,re===null&&(re="")),y="",x!==null&&(b===null&&(b=x),y=b.portId,y===null&&(y="")),b=te.archetypeLinkData,b instanceof vi){if(hc(b),z=b.copy(),z!==null)return z.fromNode=a,z.fromPortId=re,z.toNode=x,z.toPortId=y,E.add(z),a=te.archetypeLabelNodeData,a instanceof Di&&(hc(a),a=a.copy(),a!==null&&(a.labeledLink=z,E.add(a))),z}else if(b!==null&&(b=z.Jo(b),typeof b=="object"&&b!==null))return a!==null&&wp(z,b,z.wa(a.data),!0),Cp(z,b,re,!0),x!==null&&wp(z,b,z.wa(x.data),!1),Cp(z,b,y,!1),z.fi(b),a=te.archetypeLabelNodeData,a===null||a instanceof Di||(a=z.copyNodeData(a),typeof a=="object"&&a!==null&&(z.xf(a),a=z.wa(a),a!==void 0&&z.Bu(b,a))),E.Kc(b);return null},Ks.prototype.findLinkForKey=Ks.prototype.findLinkForKey,Ks.prototype.findPartForKey=Ks.prototype.findPartForKey,Ks.prototype.removeAllModeledParts=Ks.prototype.removeAllModeledParts,Ks.prototype.addModeledParts=Ks.prototype.addModeledParts,Ks.prototype.addAllModeledParts=Ks.prototype.addAllModeledParts,Ks.className="GraphLinksPartManager";function ec(){qo.apply(this,arguments),this.Sg=null}$t(ec,qo);function T0(a,y,x){if(y!==null&&x!==null&&x.kh()===null){var b=a.diagram.toolManager.findTool("Linking"),E=y,z=x;if(a.diagram.isTreePathToChildren||(E=x,z=y),(b===null||!li(b,E,z,null,!0))&&(y=a.getLinkCategoryForData(x.data),b=a.findLinkTemplateForCategory(y),b!==null&&(hc(b),b=b.copy(),b!==null))){var te=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,b.Tf=y,b.ub=x.data,b.fromNode=E,b.toNode=z,a.diagram.add(b),b.ub=null,b.data=x.data,a.diagram.skipsModelSourceBindings=te}}}ec.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},ec.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},ec.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}},ec.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))},ec.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},ec.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},ec.prototype.doModelChanged=function(a){if(qo.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===wa){if(b==="nodeParentKey"){var E=a.object,z=this.Vb(a.newValue),te=this.ii(E);if(this.Sg!==null)z!==null&&(this.Sg.data=E,this.Sg.category=this.getLinkCategoryForData(E));else if(te!==null){var re=te.kh();re!==null?z===null?y.remove(re):y.isTreePathToChildren?re.fromNode=z:re.toNode=z:T0(this,z,te)}}else if(b==="parentLinkCategory"){var oe=this.ii(a.object),le=a.newValue;if(oe!==null&&typeof le=="string"){var ue=oe.kh();ue!==null&&(ue.category=le)}}y.isModified=!0}}else if(x===wa){var me=a.propertyName;a.object===y.model&&me==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},ec.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;a instanceof Di&&(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:T0(this,y,a):b!==null&&rh(x,b,!1)))}}},ec.prototype.updateDataBindings=function(a,y){qo.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},ec.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=hm(y,x),E=this.Lc(a);if(b!==null&&E!==null){for(b=b.iterator;b.next();){var z=b.value;y.lb(z)&&E instanceof Di&&y.mh(z)===x&&T0(this,E,this.ii(z))}_c(y,x)}a=y.mh(a),a!==void 0&&E instanceof Di&&(a=this.Vb(a),T0(this,a,E))}},ec.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Di){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 z=E.pc(-1,b,!1);0<=z&&this.diagram.cb(cs,"parts",E,b,null,z,null),z=b.layerChanged,z!==null&&z(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)&&Uc(y,x,E)}},ec.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},ec.prototype.findLinkForKey=ec.prototype.findLinkForKey,ec.className="TreePartManager";function or(a,y){this.kl=new _n,this.il=new _n,this.Wv=`,
|
|
|
"insertedNodeKeys": `,this.jy=`,
|
|
|
"modifiedNodeData": `,this.Yv=`,
|
|
|
"removedNodeKeys": `,this.vh=null,Or(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new Ii,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 Ii,this.Lt=new kn,this.Wg=!1,this.o=null,this.undoManager=new Na,a!==void 0&&(Cn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}or.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},or.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},or.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},or.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)+":"+Qn(E)}}return y},or.prototype.xA=function(a){a.change!==Ll&&St("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof Ps?(P1(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},or.prototype.Qv=function(a,y){var x=this,b=!1,E=new _n,z=new _n,te=new _n,re=this.vh;a.changes.each(function(me){me.model===x&&(me.modelChange==="nodeDataArray"?me.change===Va?E.add(me.newValue):me.change===cs&&te.add(me.oldValue):x.lb(me.object)?z.add(me.object):me.change!==wa||x.modelData!==me.object&&me.propertyName!=="modelData"?me.object!==null&&(re&&re.contains(me.object)?re.get(me.object).each(function(we){x.lb(we)&&z.add(we)}):me.object instanceof or||x.ri()&&x.Jc(me.object)||w1(x,me.object).each(function(we){z.add(we)})):b=!0)});var oe=this.il;oe.clear(),E.each(function(me){oe.add(x.wa(me)),y||z.add(me)});var le=this.kl;le.clear(),te.each(function(me){le.add(x.wa(me)),y&&z.add(me)}),a=x.cloneDeep(z.Fa());var ue=null;return b&&(ue===null&&(ue={}),ue.modelData=this.cloneDeep(this.modelData)),0<oe.count&&(ue===null&&(ue={}),y?ue.removedNodeKeys=oe.Fa():ue.insertedNodeKeys=oe.Fa()),0<a.length&&(ue===null&&(ue={}),ue.modifiedNodeData=a),0<le.count&&(ue===null&&(ue={}),y?ue.insertedNodeKeys=le.Fa():ue.removedNodeKeys=le.Fa()),le.clear(),oe.clear(),ue},or.prototype.cloneDeep=function(a){return Pp(this,a,!0)};function Pp(a,y,x,b,E,z){function te(me,we){re?(me.__gohashid===void 0&&z.push(me),b.set(me,we)):(me=mo++,b.set(me,we),E.set(me,y))}if(!en(y))return y;z||(z=[]);var re=Object.isExtensible(y);if(b||(b=new Ii),re){var oe=b.get(y);if(oe)return oe}else for(E||(E=new Ii),oe=E.iterator;oe.next();){var le=oe.key;if(oe.value===y&&(le=b.get(le)))return le}if(Array.isArray(y)){oe=[],te(y,oe);for(var ue=0;ue<y.length;ue++)oe.push(Pp(a,y[ue],!1,b,E,z))}else if(y instanceof tt||y instanceof fi||y instanceof Ut||y instanceof Oi||y instanceof Vi)oe=y.copy(),te(y,oe);else{if(y instanceof Oo||y instanceof xi||y instanceof ln)return y;if(y instanceof kn)oe=new kn().addAll(Pp(a,y.Fa(),!1,b,E,z)),te(y,oe);else if(y instanceof _n)oe=new _n().addAll(Pp(a,y.Fa(),!1,b,E,z)),te(y,oe);else if(y instanceof Ii)oe=new Ii().addAll(Pp(a,y.Fa(),!1,b,E,z)),te(y,oe);else if(y instanceof Date)oe=new Date(y.getTime()),te(y,oe);else if(y instanceof RegExp)oe=new RegExp(y),te(y,oe),oe.lastIndex=y.lastIndex;else if(typeof y.copy=="function")oe=y.copy(),te(y,oe);else for(ue in oe={},te(y,oe),y)ue!=="__gohashid"&&(oe[ue]=Pp(a,y[ue],!1,b,E,z))}return x&&z.forEach(function(me){delete me.__gohashid}),oe}Le=or.prototype,Le.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},Le.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},Le.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 x1(a,y){y=y.modelData,en(y)&&(a.dm(y),a.modelData=y)}Le.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!C1(x,a[x])){y=!0;break}return a="",y&&(a=`,
|
|
|
"modelData": `+Sy(this,this.modelData)),a+`,
|
|
|
"nodeDataArray": `+xf(this,this.nodeDataArray,!0)},Le.kv=function(a){x1(this,a),a=a.nodeDataArray,Cn(a)&&(this.dm(a),this.nodeDataArray=a)};function P1(a,y){function x(E,z){if((z=z.part)&&(z=z.data,E!==z)){var te=b.get(E);te===null?(te=new _n,te.add(z),b.add(E,te)):te.add(z)}}var b=a.vh;b===null&&(b=new Ii,y.changes.each(function(E){if(E.diagram!==null){var z=E.change;z===wa?(E=E.object.panel)&&(z=E.data)&&x(z,E):(z===Va||z===cs)&&(E=E.object,(z=E.itemArray)&&x(z,E))}}),a.vh=b)}function w1(a,y){for(var x=new _n,b=0;b<a.nodeDataArray.length;b++){var E=a.nodeDataArray[b];k0(a,y,E,E,x)}return x}function k0(a,y,x,b,E){if(Array.isArray(x))for(var z=0;z<x.length;z++){var te=x[z];if(te===y)return E.add(b),!0;if(k0(a,y,te,b,E))return!0}else if(en(x)&&Object.getPrototypeOf(x)===Object.prototype)for(z in x){if(te=x[z],te===y)return E.add(b),!0;if(k0(a,y,te,b,E))return!0}return!1}Le.Pv=function(a,y){var x=this,b=!1,E=new _n,z=new _n,te=new _n,re=this.vh;a.changes.each(function(ue){ue.model===x&&(ue.modelChange==="nodeDataArray"?ue.change===Va?E.add(ue.newValue):ue.change===cs&&te.add(ue.oldValue):x.lb(ue.object)?z.add(ue.object):ue.change!==wa||x.modelData!==ue.object&&ue.propertyName!=="modelData"?ue.object!==null&&(re&&re.contains(ue.object)?re.get(ue.object).each(function(me){x.lb(me)&&z.add(me)}):ue.object instanceof or||x.ri()&&x.Jc(ue.object)||w1(x,ue.object).each(function(me){z.add(me)})):b=!0)});var oe=this.il;oe.clear(),E.each(function(ue){oe.add(x.wa(ue)),y||z.add(ue)});var le=this.kl;return le.clear(),te.each(function(ue){le.add(x.wa(ue)),y&&z.add(ue)}),a="",b&&(a+=`,
|
|
|
"modelData": `+Sy(this,this.modelData)),0<oe.count&&(a+=(y?this.Yv:this.Wv)+xf(this,oe.Fa(),!0)),0<z.count&&(a+=this.jy+xf(this,z.Fa(),!0)),0<le.count&&(a+=(y?this.Wv:this.Yv)+xf(this,le.Fa(),!0)),le.clear(),oe.clear(),a},Le.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)&&St("applyIncrementalJson cannot change Model properties"),x1(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new Ii;if(Array.isArray(x))for(var E=0;E<x.length;E++){var z=x[E],te=this.wa(z);te!=null&&b.set(te,z)}if(Array.isArray(y))for(E=y.length,z=0;z<E;z++){te=y[z];var re=this.hc(te);re===null&&(re=(re=b.get(te))?re:this.copyNodeData({}),this.km(re,te),this.xf(re))}if(Array.isArray(x)){for(y=x.length,b=0;b<y;b++)if(E=x[b],z=this.wa(E),z=this.hc(z),z!==null){for(var oe in E)oe==="__gohashid"||oe===this.nodeKeyProperty||this.Wj()&&oe===this.nodeIsGroupProperty||this.setDataProperty(z,oe,E[oe]);this.lm(E,z)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,oe=0;oe<x;oe++)y=this.hc(a[oe]),y!==null&&this.cm(y)},Le.$x=function(a,y){a.change!==Ll&&St("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof Ps?(y===void 0&&(y=fm(this,this)),P1(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 }'},Le.yA=function(a,y){return this.$x(a,y)},Le.np=function(a){return a===void 0&&(a=fm(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},Le.toJSON=function(a){return this.np(a)},Le.Zw=function(a){var y=null;if(typeof a=="string")try{y=st.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:St("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&St("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},Le.Ky=function(a){return this.Zw(a)},or.constructGraphLinksModel=function(){return new or},Le=or.prototype,Le.dm=function(a){if(Cn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if(en(b)){var E=x;b=this.dm(b),Array.isArray(a)?a[E]=b:St("Cannot replace an object in an HTMLCollection or NodeList at "+E)}}else if(en(a)){for(y in a)if(x=a[y],en(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 kn,b=0;b<x.length/2;b++)E.add(new tt(x[2*b],x[2*b+1]));E.freeze(),a[y]=E}}return Dx(a)}return a},Le.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)?xf(this,a):en(a)?Sy(this,a):typeof a=="function"?"null":a.toString()};function xf(a,y,x){x===void 0&&(x=!1);var b=y.length;if(0>=b)return"[]";var E=new Bi;E.add("["),x&&1<b&&E.add(`
|
|
|
`);for(var z=0;z<b;z++){var te=y[z];te!==void 0&&(0<z&&(E.add(","),x&&E.add(`
|
|
|
`)),E.add(a.sm(te)))}return x&&1<b&&E.add(`
|
|
|
`),E.add("]"),E.toString()}function C1(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function Wl(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function Sy(a,y){var x=y;if(x instanceof tt)y={class:"go.Point",x:Wl(x.x),y:Wl(x.y)};else if(x instanceof fi)y={class:"go.Size",width:Wl(x.width),height:Wl(x.height)};else if(x instanceof Ut)y={class:"go.Rect",x:Wl(x.x),y:Wl(x.y),width:Wl(x.width),height:Wl(x.height)};else if(x instanceof Oi)y={class:"go.Margin",top:Wl(x.top),right:Wl(x.right),bottom:Wl(x.bottom),left:Wl(x.left)};else if(x instanceof Vi)x.sb()?y={class:"go.Spot",x:Wl(x.x),y:Wl(x.y),offsetX:Wl(x.offsetX),offsetY:Wl(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof Oo){if(y={class:"go.Brush",type:x.type.name},x.type===jh?y.color=x.color:(x.type===gh||x.type===Qu)&&(y.start=x.start,y.end=x.end,x.type===Qu&&(x.startRadius!==0&&(y.startRadius=Wl(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=Wl(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 xi?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=Wl(x.startX)),x.startY!==0&&(y.startY=Wl(x.startY)),x.endX!==0&&(y.endX=Wl(x.endX)),x.endY!==0&&(y.endY=Wl(x.endY)),x.spot1.D(Ba)||(y.spot1=x.spot1),x.spot2.D(vl)||(y.spot2=x.spot2),x.type===xi.o&&(y.path=xi.ia(x))):x instanceof ln&&(y={class:"go.EnumValue",classType:fm(a,x.classType),name:x.name});b="{",x=!0;for(var E in y){var z=us(y,E);if(!C1(E,z))if(x?x=!1:b+=",",b+=a.quote(E)+":",E==="points"&&z instanceof kn){var te="[";for(z=z.iterator;z.next();){var re=z.value;1<te.length&&(te+=","),te+=a.sm(re.x),te+=",",te+=a.sm(re.y)}te+="]",b+=te}else b+=a.sm(z)}return b+"}"}function Gl(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function Dx(a){if(typeof a!="object")return a;var y=a.class||"";if(y==="NaN")return NaN;if(y==="Date")return new Date(a.value);if(y.indexOf("go.")!==0)return a;y=y.substr(3);var x=a;if(y==="Point")x=new tt(Gl(a.x),Gl(a.y));else if(y==="Size")x=new fi(Gl(a.width),Gl(a.height));else if(y==="Rect")x=new Ut(Gl(a.x),Gl(a.y),Gl(a.width),Gl(a.height));else if(y==="Margin")x=new Oi(Gl(a.top),Gl(a.right),Gl(a.bottom),Gl(a.left));else if(y==="Spot")typeof a.enum=="string"?x=bh(a.enum):x=new Vi(Gl(a.x),Gl(a.y),Gl(a.offsetX),Gl(a.offsetY));else if(y==="Brush"){if(x=new Oo,x.type=oi(Oo,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof Vi&&(x.start=a.start),a.end instanceof Vi&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=Gl(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=Gl(a.endRadius)),a=a.colorStops,en(a))for(var b in a)x.addColorStop(parseFloat(b),a[b])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=xi.parse(a.path):x=new xi,x.type=oi(xi,a.type),typeof a.startX=="number"&&(x.startX=Gl(a.startX)),typeof a.startY=="number"&&(x.startY=Gl(a.startY)),typeof a.endX=="number"&&(x.endX=Gl(a.endX)),typeof a.endY=="number"&&(x.endY=Gl(a.endY)),a.spot1 instanceof Vi&&(x.spot1=a.spot1),a.spot2 instanceof Vi&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=Py(b),typeof b=="function"&&(x=oi(b,a.name)));return x}Le.Pe=function(a){return this.Lt.add(a),this},Le.ik=function(a){this.Lt.remove(a)},Le.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)},Le.cb=function(a,y,x,b,E,z,te){bs(this,"",a,y,x,b,E,z,te)},Le.g=function(a,y,x,b,E){bs(this,"",wa,a,this,y,x,b,E)},Le.Fs=function(a,y,x,b,E,z){bs(this,"",wa,y,a,x,b,E,z)};function bs(a,y,x,b,E,z,te,re,oe){re===void 0&&(re=null),oe===void 0&&(oe=null);var le=new Pa;le.model=a,le.change=x,le.modelChange=y,le.propertyName=b,le.object=E,le.oldValue=z,le.oldParam=re,le.newValue=te,le.newParam=oe,a.ds(le)}or.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===wa){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)),ba(x,b,E)}else a.change===Va?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,en(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]===a&&pn(this.Tc,x),b!==void 0&&this.kb.remove(b)):(this.Tc[x]!==a&&yn(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!Cn(b)&&a.propertyName&&(b=us(a.object,a.propertyName)),Cn(b)&&typeof x=="number"&&(a=a.newValue,y?pn(b,x):yn(b,x,a))):St("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===cs?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,en(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&yn(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)):(this.Tc[x]===a&&pn(this.Tc,x),b!==void 0&&this.kb.remove(b)))):a.modelChange===""?((b=a.object)&&!Cn(b)&&a.propertyName&&(b=us(a.object,a.propertyName)),Cn(b)&&typeof x=="number"&&(a=a.oldValue,y?yn(b,x,a):pn(b,x))):St("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==Ll&&St("unknown ChangedEvent: "+a.toString())},or.prototype.Ea=function(a){return this.undoManager.Ea(a)},or.prototype.eb=function(a){return this.undoManager.eb(a)},or.prototype.Kf=function(){return this.undoManager.Kf()},or.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}},Le=or.prototype,Le.La=function(a,y){y===void 0&&(y=""),bs(this,"SourceChanged",Ll,y,a,null,null)},Le.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=us(a,y),y!==void 0)){if(Pf(y))return y;St("Key value for node data "+a+" is not a number or a string: "+y)}}},Le.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var b=us(a,x);b!==y&&this.hc(y)===null&&(ba(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),bs(this,"nodeKey",wa,x,a,b,y),typeof x=="string"&&this.La(a,x),this.jp(b,y))}else ba(a,x,y)}};function Pf(a){return typeof a=="number"||typeof a=="string"}Le.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},Le.hc=function(a){return a===null&&St("Model.findNodeDataForKey:key must not be null"),a!==void 0&&Pf(a)?this.kb.I(a):null},Le.$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))){ba(a,y,x);return}if(typeof x=="string"){for(b=2;this.kb.contains(x+b);)b++;ba(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;ba(a,y,x)}}}}},Le.xf=function(a){a!==null&&(no(a),this.lb(a)||b1(this,a,!0))};function b1(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&&St("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,yn(a.Tc,b,y)),bs(a,"nodeDataArray",Va,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}Le.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)},Le.cm=function(a){a!==null&&E1(this,a,!0)};function E1(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;pn(a.Tc,b)}bs(a,"nodeDataArray",cs,"nodeDataArray",a,y,null,b,null),a.qp(y)}Le.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)},Le.$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 z=a[E],te=this.wa(z);if(te!==void 0){x.add(te);var re=this.hc(te);re!==z&&(re!==null?(this.Do(re,z),this.lm(z,re)):(z=this.cloneDeep(z),this.km(z,te),this.xf(z)))}else te=this.cloneDeep(z),this.xf(te),x.add(this.wa(te))}for(a=y.iterator;a.next();)b=a.value,x.contains(b)||(b=this.hc(b))&&this.cm(b);y.clear(),x.clear()}},Le.jp=function(a,y){y!==void 0&&(a=hm(this,a),a instanceof _n&&this.Vf.add(y,a))},Le.Lv=function(){},Le.fm=function(){},Le.em=function(){},Le.qp=function(){};function Uc(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b===null&&(b=new _n,a.Vf.add(y,b)),b.add(x)}}function _c(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b instanceof _n&&(x==null?a.Vf.remove(y):(b.remove(x),b.count===0&&a.Vf.remove(y)))}}function hm(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof _n?a:null)}Le.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},or.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):I0(this,a,!0),en(a)&&Or(a),a};function I0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var b=[];for(x=0;x<y.length;x++){var E=I0(a,y[x],a.copiesArrayObjects);b.push(E)}return Or(b),b}if(x&&en(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 z=us(y,b),te=fm(a,z);te==="GraphObject"||te==="Diagram"||te==="Layer"||te==="RowColumnDefinition"||te==="AnimationManager"||te==="Tool"||te==="CommandHandler"||te==="Layout"||te==="InputEvent"||te==="DiagramEvent"||z instanceof or||z instanceof Na||z instanceof Ps||z instanceof Pa||(z=I0(a,z,!1)),ba(x,b,z)}return Or(x),x}return y instanceof tt||y instanceof fi||y instanceof Ut||y instanceof Vi||y instanceof Oi?y.copy():y}or.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!M1&&a instanceof Yt&&(M1=!0,Si('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),Si(" Is that really your intent?"));var b=us(a,y);b!==x&&(ba(a,y,x),this.Fs(a,y,b,x))},Le=or.prototype,Le.set=function(a,y,x){this.setDataProperty(a,y,x)},Le.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])}},Le.Ay=function(a,y){this.ts(a,-1,y)},Le.ts=function(a,y,x){0>y&&(y=a.length),yn(a,y,x),bs(this,"",Va,"",a,null,x,null,y)},Le.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&St("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];pn(a,y),bs(this,"",cs,"",a,x,null,y,null)},Le.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=us(a,y),y===void 0))return"";if(typeof y=="string")return y;St("getCategoryForNodeData found a non-string category for "+a+": "+y)},Le.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var b=us(a,x);b===void 0&&(b=""),b!==y&&(ba(a,x,y),bs(this,"nodeCategory",wa,x,a,b,y))}else ba(a,x,y)}},Le.lm=function(a,y){this.jm(y,this.Ro(a))},Le.Tl=function(){return!1},Le.Wj=function(){return!1},Le.ri=function(){return!1},Le.xs=function(){return!1},Le.Xj=function(){return!1};function xy(){return new or}function fm(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 fm(a,y.constructor);return typeof y}function Py(a){return Nc[a]?Nc[a]:st.go!==void 0&&st.go[a]?st.go[a]:null}function us(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 ba(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){}}Je.Object.defineProperties(or.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===""&&St("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&St("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];en(E)||St("Model.nodeDataArray must only contain Objects, not: "+E),no(E)}for(this.Tc=a,b=new kn,E=0;E<x;E++){var z=a[E],te=this.wa(z);te===void 0||this.kb.I(te)!==null?b.add(z):this.kb.add(te,z)}for(b=b.iterator;b.next();)E=b.value,this.$u(E),z=this.wa(E),z!==void 0&&this.kb.add(z,E);for(bs(this,"nodeDataArray",wa,"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"}}}),or.prototype.setCategoryForNodeData=or.prototype.jm,or.prototype.getCategoryForNodeData=or.prototype.Ro,or.prototype.removeArrayItem=or.prototype.ov,or.prototype.insertArrayItem=or.prototype.ts,or.prototype.addArrayItem=or.prototype.Ay,or.prototype.assignAllDataProperties=or.prototype.Do,or.prototype.set=or.prototype.set,or.prototype.clearUnresolvedReferences=or.prototype.Qy,or.prototype.mergeNodeDataArray=or.prototype.$z,or.prototype.removeNodeDataCollection=or.prototype.nA,or.prototype.removeNodeData=or.prototype.cm,or.prototype.addNodeDataCollection=or.prototype.Fy,or.prototype.addNodeData=or.prototype.xf,or.prototype.makeNodeDataKeyUnique=or.prototype.$u,or.prototype.findNodeDataForKey=or.prototype.hc,or.prototype.containsNodeData=or.prototype.lb,or.prototype.setKeyForNodeData=or.prototype.km,or.prototype.getKeyForNodeData=or.prototype.wa,or.prototype.updateTargetBindings=or.prototype.La,or.prototype.commit=or.prototype.commit,or.prototype.rollbackTransaction=or.prototype.Kf,or.prototype.commitTransaction=or.prototype.eb,or.prototype.startTransaction=or.prototype.Ea,or.prototype.raiseDataChanged=or.prototype.Fs,or.prototype.raiseChanged=or.prototype.g,or.prototype.raiseChangedEvent=or.prototype.cb,or.prototype.removeChangedListener=or.prototype.ik,or.prototype.addChangedListener=or.prototype.Pe,or.prototype.writeJsonValue=or.prototype.sm,or.prototype.replaceJsonObjects=or.prototype.dm,or.prototype.applyIncrementalJSON=or.prototype.Ky,or.prototype.applyIncrementalJson=or.prototype.Zw,or.prototype.toJSON=or.prototype.toJSON,or.prototype.toJson=or.prototype.np,or.prototype.toIncrementalJSON=or.prototype.yA,or.prototype.toIncrementalJson=or.prototype.$x,or.prototype.toIncrementalData=or.prototype.xA,or.prototype.clear=or.prototype.clear;var M1=!1,Nc={};or.className="Model",or.fromJSON=or.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=st.JSON.parse(a)}catch(z){}else typeof a=="object"?x=a:St("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=Py(b)):(E=Py(b),E===null&&(E=st[b])),typeof E=="function"&&(a=new E)}catch(z){}a===null||a instanceof or?y=a:St("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=or.constructGraphLinksModel()),y.gp(x),y.kv(x),y},or.safePropertyValue=us,or.safePropertySet=ba,Nc.Brush=Oo,Nc.ChangedEvent=Pa,Nc.Geometry=xi,Nc.Margin=Oi,Nc.Panel=hi,Nc.Point=tt,Nc.Rect=Ut,Nc.Size=fi,Nc.Spot=Vi,Nc.Transaction=Ps,Nc.UndoManager=Na;function fs(a,y,x,b){Or(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=N1,this.wk=null):(this.el=gm,this.wk=b),this.st=new _n}fs.prototype.copy=function(){var a=new fs;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},Le=fs.prototype,Le.qb=function(a){a.classType===fs&&(this.mode=a)},Le.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},Le.freeze=function(){return this._isFrozen=!0,this},Le.ka=function(){return this._isFrozen=!1,this},Le.Kx=function(a){return a===void 0&&(a=null),this.mode=gm,this.backConverter=a,this},Le.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},Le.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function L1(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}Le.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==="")Si("Binding error: target property is the empty string: "+this.toString());else{var z=y;if(b!==""&&(z=us(y,b)),z!==void 0)if(E===null)x!==""&&ba(a,x,z);else try{if(x!==""){var te=E(z,a);ba(a,x,te)}else E(z,a)}catch(re){}}}},Le.sp=function(a,y,x,b){if(this.el===gm){var E=this.xl;if(x===void 0||E===x){x=this.sl;var z=this.wk,te=a;if(E!==""&&(te=us(a,E)),te!==void 0&&!this.st.contains(a))try{this.st.add(a);var re=b!==null?b.diagram:null,oe=re!==null?re.model:null;if(z===null){if(x!=="")oe!==null?oe.setDataProperty(y,x,te):ba(y,x,te);else if(oe!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var le=b.itemIndex,ue=b.panel.itemArray;oe.ov(ue,le),oe.ts(ue,le,te)}}else try{if(x!==""){var me=z(te,y,oe);oe!==null?oe.setDataProperty(y,x,me):ba(y,x,me)}else{var we=z(te,y,oe);if(we!==void 0&&oe!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var Me=b.itemIndex,Te=b.panel.itemArray;oe.ov(Te,Me),oe.ts(Te,Me,we)}}}catch(je){}}finally{this.st.remove(a)}}}},Je.Object.defineProperties(fs.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&Nn(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&Nn(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&Nn(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&Nn(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&Nn(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&Nn(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&Nn(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&Nn(this),this.el=a}}}),fs.prototype.updateSource=fs.prototype.sp,fs.prototype.updateTarget=fs.prototype.Mv,fs.prototype.ofModel=fs.prototype.dA,fs.prototype.ofObject=fs.prototype.cp,fs.prototype.makeTwoWay=fs.prototype.Kx;var Bx="Binding",N1=new ln(fs,"OneWay",1),gm=new ln(fs,"TwoWay",2);fs.className="Binding",fs.parseEnum=function(a,y){return function(x){return x=oi(a,x),x===null?y:x}},fs.toString=Qn,fs.OneWay=N1,fs.TwoWay=gm;function No(a,y,x){or.call(this),this.Vv=`,
|
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
|
"removedLinkKeys": `,this.md=[],this.$f=new _n,this.wb=new Ii,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))}$t(No,or),No.constructGraphLinksModel=or.constructGraphLinksModel,No.prototype.cloneProtected=function(a){or.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},Le=No.prototype,Le.clear=function(){or.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},Le.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)+":"+Qn(E)}for(y+=`
|
|
|
link data:`,a=this.linkDataArray,x=a.length,b=0;b<x;b++)E=a[b],y+=" "+Ku(this,E,!0)+"-->"+Ku(this,E,!1)}return y},Le.Qv=function(a,y){this.linkKeyProperty===""&&St("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=or.prototype.Qv.call(this,a,y),b=this,E=new _n,z=new _n,te=new _n,re=this.vh;a.changes.each(function(ue){ue.model===b&&(ue.modelChange==="linkDataArray"?ue.change===Va?E.add(ue.newValue):ue.change===cs&&te.add(ue.oldValue):b.Jc(ue.object)?z.add(ue.object):ue.object!==null&&(ue.object!==null&&re&&re.contains(ue.object)?re.get(ue.object).each(function(me){b.Jc(me)&&z.add(me)}):ue.object instanceof or||b.lb(ue.object)||F1(b,ue.object).each(function(me){z.add(me)})))});var oe=this.il;oe.clear(),E.each(function(ue){oe.add(b.Ac(ue)),y||z.add(ue)});var le=this.kl;return le.clear(),te.each(function(ue){le.add(b.Ac(ue)),y&&z.add(ue)}),a=b.cloneDeep(z.Fa()),0<oe.count&&(x===null&&(x={}),y?x.removedLinkKeys=oe.Fa():x.insertedLinkKeys=oe.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<le.count&&(x===null&&(x={}),y?x.insertedLinkKeys=le.Fa():x.removedLinkKeys=le.Fa()),le.clear(),oe.clear(),x},Le.rm=function(){var a=or.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},Le.gp=function(a){or.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)},Le.Rv=function(){var a=or.prototype.Rv.call(this),y=`,
|
|
|
"linkDataArray": `+xf(this,this.linkDataArray,!0);return a+y},Le.kv=function(a){or.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function F1(a,y){for(var x=new _n,b=0;b<a.linkDataArray.length;b++){var E=a.linkDataArray[b];k0(a,y,E,E,x)}return x}Le.Pv=function(a,y){this.linkKeyProperty===""&&St("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=or.prototype.Pv.call(this,a,y),b=this,E=new _n,z=new _n,te=new _n,re=this.vh;a.changes.each(function(ue){ue.model===b&&(ue.modelChange==="linkDataArray"?ue.change===Va?E.add(ue.newValue):ue.change===cs&&te.add(ue.oldValue):b.Jc(ue.object)?z.add(ue.object):ue.object!==null&&(ue.object!==null&&re&&re.contains(ue.object)?re.get(ue.object).each(function(me){b.Jc(me)&&z.add(me)}):ue.object instanceof or||b.lb(ue.object)||F1(b,ue.object).each(function(me){z.add(me)})))});var oe=this.il;oe.clear(),E.each(function(ue){oe.add(b.Ac(ue)),y||z.add(ue)});var le=this.kl;return le.clear(),te.each(function(ue){le.add(b.Ac(ue)),y&&z.add(ue)}),a=x,0<oe.count&&(a+=(y?this.Xv:this.Vv)+xf(this,oe.Fa(),!0)),0<z.count&&(a+=this.iy+xf(this,z.Fa(),!0)),0<le.count&&(a+=(y?this.Vv:this.Xv)+xf(this,le.Fa(),!0)),le.clear(),oe.clear(),a},Le.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)&&St("applyIncrementalJson cannot change Model properties"),or.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],z=this.jh(E);z===null&&(z=this.Jo({}),this.Ks(z,E),this.fi(z))}if(y=a.modifiedLinkData,Array.isArray(y)){for(x=y.length,b=0;b<x;b++)if(E=y[b],z=this.Ac(E),z=this.jh(z),z!==null){for(var te in E)te!=="__gohashid"&&te!==this.linkKeyProperty&&this.setDataProperty(z,te,E[te]);B1(this,E,z)}}if(a=a.removedLinkKeys,Array.isArray(a))for(te=a.length,y=0;y<te;y++)x=this.jh(a[y]),x!==null&&this.bm(x)},No.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===wa){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),ba(x,b,E);return}}else if(a.change===Va){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,en(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===cs){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,en(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}}or.prototype.changeState.call(this,a,y)}},Le=No.prototype,Le.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),ba(x,this.nodeKeyProperty,a),this.xf(x))}return a}},Le.yx=function(a){return Ku(this,a,!0)},Le.wv=function(a,y){wp(this,a,y,!0)},Le.Bx=function(a){return Ku(this,a,!1)},Le.Bv=function(a,y){wp(this,a,y,!1)};function Ku(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=us(y,a),a!==void 0))){if(Pf(a))return a;St((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function wp(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 z=us(y,E);z!==x&&(_c(a,z,y),ba(y,E,x),a.hc(x)===null&&Uc(a,x,y),bs(a,b?"linkFromKey":"linkToKey",wa,E,y,z,x),typeof E=="string"&&a.La(y,E))}else ba(y,E,x)}}Le.zx=function(a){return O0(this,a,!0)},Le.xv=function(a,y){Cp(this,a,y,!0)},Le.Cx=function(a){return O0(this,a,!1)},Le.Cv=function(a,y){Cp(this,a,y,!1)};function O0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=us(y,a),y===void 0?"":y)}function Cp(a,y,x,b){if(y!==null){var E=b?a.ej:a.fj;if(E!=="")if(a.Jc(y)){var z=us(y,E);z===void 0&&(z=""),z!==x&&(ba(y,E,x),bs(a,b?"linkFromPortId":"linkToPortId",wa,E,y,z,x),typeof E=="string"&&a.La(y,E))}else ba(y,E,x)}}Le.Ef=function(a){if(a===null)return R0;var y=this.je;return y===""?R0:(a=us(a,y),a===void 0?R0:a)},Le.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var b=us(a,x);if(b===void 0&&(b=R0),b!==y){if(Array.isArray(b))for(var E=b.length,z=0;z<E;z++)_c(this,b[z],a);for(ba(a,x,y),E=y.length,z=0;z<E;z++){var te=y[z];this.hc(te)===null&&Uc(this,te,a)}bs(this,"linkLabelKeys",wa,x,a,b,y),typeof x=="string"&&this.La(a,x)}}else ba(a,x,y)}},Le.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=us(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&&Uc(this,y,a),bs(this,"linkLabelKeys",Va,x,a,null,y,null,E)))}else St(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},Le.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=us(a,x);if(Array.isArray(b)){var E=b.indexOf(y);0>E||(b.splice(E,1),this.Jc(a)&&(_c(this,y,a),bs(this,"linkLabelKeys",cs,x,a,y,null,E,null)))}else b!==void 0&&St(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},Le.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=us(a,y),y!==void 0)){if(Pf(y))return y;St("Key value for link data "+a+" is not a number or a string: "+y)}}},Le.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var b=us(a,x);b!==y&&this.jh(y)===null&&(ba(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),bs(this,"linkKey",wa,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ba(a,x,y)}},Le.jh=function(a){return a===null&&St("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&Pf(a)?this.wb.I(a):null},Le.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))){ba(a,y,x);return}if(typeof x=="string"){for(b=2;this.wb.contains(x+b);)b++;ba(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;ba(a,y,x)}}}}},Le.Jc=function(a){return a===null?!1:this.$f.contains(a)},Le.fi=function(a){a!==null&&(no(a),this.Jc(a)||A1(this,a,!0))};function A1(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&&St("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)),bs(a,"linkDataArray",Va,"linkDataArray",a,null,y,null,b),wy(a,y)}Le.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)},Le.bm=function(a){a!==null&&D1(this,a,!0)};function D1(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(bs(a,"linkDataArray",cs,"linkDataArray",a,y,null,b,null),x=Ku(a,y,!0),_c(a,x,y),x=Ku(a,y,!1),_c(a,x,y),b=a.Ef(y),Array.isArray(b))for(var E=b.length,z=0;z<E;z++)x=b[z],_c(a,x,y)}Le.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)},Le.Zz=function(a){if(this.linkKeyProperty===""&&St("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 z=a[E],te=this.Ac(z);if(te!==void 0){x.add(te);var re=this.jh(te);re!==z&&(re!==null?(this.Do(re,z),B1(this,z,re)):(z=this.cloneDeep(z),this.Ks(z,te),this.fi(z)))}else te=this.cloneDeep(z),this.fi(te),x.add(this.Ac(te))}for(a=y.iterator;a.next();)b=a.value,x.contains(b)||(b=this.jh(b))&&this.bm(b);y.clear(),x.clear()}};function wy(a,y){var x=Ku(a,y,!0);x=a.Vl(x),a.hc(x)===null&&Uc(a,x,y),x=Ku(a,y,!1),x=a.Vl(x),a.hc(x)===null&&Uc(a,x,y);var b=a.Ef(y);if(Array.isArray(b))for(var E=b.length,z=0;z<E;z++)x=b[z],a.hc(x)===null&&Uc(a,x,y)}Le.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):I0(this,a,!0),en(a)&&(Or(a),this.lf!==""&&ba(a,this.lf,void 0),this.mf!==""&&ba(a,this.mf,void 0),this.je!==""&&ba(a,this.je,[])),a},Le.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!us(a,y)},Le.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=us(a,y),y!==void 0)){if(Pf(y))return y;St("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},Le.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var b=us(a,x);b!==y&&(_c(this,b,a),ba(a,x,y),this.hc(y)===null&&Uc(this,y,a),bs(this,"nodeGroupKey",wa,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ba(a,x,y)}},No.prototype.copyNodeData=function(a){return a===null?null:(a=or.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||us(a,this.Je)===void 0||ba(a,this.Je,void 0),a)},No.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){wp(this,a,x,!0);return}if(y===this.linkToKeyProperty){wp(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Cp(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Cp(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=us(a,y);b!==x&&(ba(a,y,x),this.Fs(a,y,b,x))},Le=No.prototype,Le.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&&us(a,E)===y[E]||b&&E===this.linkKeyProperty||this.setDataProperty(a,E,y[E])}},Le.jp=function(a,y){or.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,z=y;if(Ku(this,b,!0)===E){var te=this.lf;ba(b,te,z),bs(this,"linkFromKey",wa,te,b,E,z),typeof te=="string"&&this.La(b,te)}if(Ku(this,b,!1)===E&&(te=this.mf,ba(b,te,z),bs(this,"linkToKey",wa,te,b,E,z),typeof te=="string"&&this.La(b,te)),te=this.Ef(b),Array.isArray(te))for(var re=te.length,oe=this.je,le=0;le<re;le++)te[le]===E&&(te[le]=z,bs(this,"linkLabelKeys",Va,oe,b,E,z,le,le))}},Le.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;ba(a,b,x),bs(this,"nodeGroupKey",wa,b,a,y,x),typeof b=="string"&&this.La(a,b)}},Le.Lv=function(){or.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)wy(this,a[x])},Le.fm=function(a){or.prototype.fm.call(this,a),a=this.wa(a);var y=hm(this,a);if(y!==null){var x=mn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)){if(this.lh(b)===a){var E=this.Je;bs(this,"nodeGroupKey",wa,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}else if(Ku(this,b,!0)===a&&(E=this.lf,bs(this,"linkFromKey",wa,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),Ku(this,b,!1)===a&&(E=this.mf,bs(this,"linkToKey",wa,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),E=this.Ef(b),Array.isArray(E))for(var z=E.length,te=this.je,re=0;re<z;re++)E[re]===a&&(bs(this,"linkLabelKeys",Va,te,b,a,a,re,re),x.push(b))}for(y=0;y<x.length;y++)_c(this,a,x[y]);Wn(x)}},Le.em=function(a){or.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&Uc(this,y,a)},Le.qp=function(a){or.prototype.qp.call(this,a);var y=this.lh(a);_c(this,y,a)},Le.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=us(a,y),y===void 0))return"";if(typeof y=="string")return y;St("getCategoryForLinkData found a non-string category for "+a+": "+y)},No.prototype.getLinkCategoryForData=function(a){return this.ps(a)},No.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var b=us(a,x);b===void 0&&(b=""),b!==y&&(ba(a,x,y),bs(this,"linkCategory",wa,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ba(a,x,y)}},No.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},Le=No.prototype,Le.lm=function(a,y){or.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function B1(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))}Le.Wj=function(){return!0},Le.ri=function(){return!0},Le.xs=function(){return!0},Le.Xj=function(){return!0},Je.Object.defineProperties(No.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];en(E)||St("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),no(E)}if(this.md=a,this.linkKeyProperty!==""){for(b=new kn,E=0;E<x;E++){var z=a[E],te=this.Ac(z);te===void 0||this.wb.I(te)!==null?b.add(z):this.wb.add(te,z)}for(b=b.iterator;b.next();)E=b.value,this.Bs(E),z=this.Ac(E),z!==void 0&&this.wb.add(z,E)}for(b=new _n,E=0;E<x;E++)b.add(a[E]);for(this.$f=b,bs(this,"linkDataArray",wa,"linkDataArray",this,y,a),y=0;y<x;y++)wy(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],z=this.Ac(E);z===void 0&&(this.Bs(E),z=this.Ac(E)),z!==void 0&&this.wb.add(z,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"}}}),No.prototype.setCategoryForLinkData=No.prototype.lp,No.prototype.getCategoryForLinkData=No.prototype.ps,No.prototype.assignAllDataProperties=No.prototype.Do,No.prototype.setGroupKeyForNodeData=No.prototype.mp,No.prototype.getGroupKeyForNodeData=No.prototype.lh,No.prototype.isGroupForNodeData=No.prototype.Yu,No.prototype.copyLinkData=No.prototype.Jo,No.prototype.mergeLinkDataArray=No.prototype.Zz,No.prototype.removeLinkDataCollection=No.prototype.lA,No.prototype.removeLinkData=No.prototype.bm,No.prototype.addLinkDataCollection=No.prototype.Ey,No.prototype.addLinkData=No.prototype.fi,No.prototype.containsLinkData=No.prototype.Jc,No.prototype.makeLinkDataKeyUnique=No.prototype.Bs,No.prototype.findLinkDataForKey=No.prototype.jh,No.prototype.setKeyForLinkData=No.prototype.Ks,No.prototype.getKeyForLinkData=No.prototype.Ac,No.prototype.removeLabelKeyForLinkData=No.prototype.Qx,No.prototype.addLabelKeyForLinkData=No.prototype.Bu,No.prototype.setLabelKeysForLinkData=No.prototype.Ls,No.prototype.getLabelKeysForLinkData=No.prototype.Ef,No.prototype.setToPortIdForLinkData=No.prototype.Cv,No.prototype.getToPortIdForLinkData=No.prototype.Cx,No.prototype.setFromPortIdForLinkData=No.prototype.xv,No.prototype.getFromPortIdForLinkData=No.prototype.zx,No.prototype.setToKeyForLinkData=No.prototype.Bv,No.prototype.getToKeyForLinkData=No.prototype.Bx,No.prototype.setFromKeyForLinkData=No.prototype.wv,No.prototype.getFromKeyForLinkData=No.prototype.yx,No.prototype.clear=No.prototype.clear;var R0=Object.freeze([]);No.className="GraphLinksModel",Nc.GraphLinksModel=No,or.constructGraphLinksModel=or.constructGraphLinksModel=function(){return new No},or.initDiagramModel=xy=function(){return new No};function $l(a,y){or.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))}$t($l,or),$l.constructGraphLinksModel=or.constructGraphLinksModel,$l.prototype.cloneProtected=function(a){or.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},Le=$l.prototype,Le.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)+":"+Qn(E)}}return y},Le.rm=function(){var a=or.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
|
|
|
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},Le.gp=function(a){or.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},Le.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&St("applyIncrementalJson cannot change Model properties"),or.prototype.fp.call(this,a)},Le.Vl=function(a){return a},Le.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=us(a,y),y!==void 0)){if(Pf(y))return y;St("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},Le.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=us(a,x);b!==y&&(_c(this,b,a),ba(a,x,y),this.hc(y)===null&&Uc(this,y,a),bs(this,"nodeParentKey",wa,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ba(a,x,y)}},Le.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=us(a,y),y===void 0)?"":typeof y=="string"?y:(St("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},$l.prototype.getLinkCategoryForData=function(a){return this.ss(a)},$l.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var b=us(a,x);b===void 0&&(b=""),b!==y&&(ba(a,x,y),bs(this,"parentLinkCategory",wa,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ba(a,x,y)}},$l.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},$l.prototype.copyNodeData=function(a){return a===null?null:(a=or.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||us(a,this.Ke)===void 0||ba(a,this.Ke,void 0),a)},$l.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=us(a,y);b!==x&&(ba(a,y,x),this.Fs(a,y,b,x))},Le=$l.prototype,Le.jp=function(a,y){or.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},Le.qv=function(a,y,x){if(this.mh(a)===y){var b=this.Ke;ba(a,b,x),bs(this,"nodeParentKey",wa,b,a,y,x),typeof b=="string"&&this.La(a,b)}},Le.fm=function(a){or.prototype.fm.call(this,a),a=this.wa(a);var y=hm(this,a);if(y!==null){var x=mn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)&&this.mh(b)===a){var E=this.Ke;bs(this,"nodeParentKey",wa,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}for(y=0;y<x.length;y++)_c(this,a,x[y]);Wn(x)}},Le.em=function(a){or.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&Uc(this,y,a)},Le.qp=function(a){or.prototype.qp.call(this,a);var y=this.mh(a);_c(this,y,a)},Le.lm=function(a,y){or.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},Le.Tl=function(){return!0},Le.xs=function(){return!0},Je.Object.defineProperties($l.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"}}}),$l.prototype.setParentLinkCategoryForNodeData=$l.prototype.Ms,$l.prototype.getParentLinkCategoryForNodeData=$l.prototype.ss,$l.prototype.setParentKeyForNodeData=$l.prototype.qe,$l.prototype.getParentKeyForNodeData=$l.prototype.mh,$l.className="TreeModel",Nc.TreeModel=$l;function Ga(a){Ma.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=Fc,this.Ti=0,this.Zv=new tt,this.Jp=this.me=0,this.Xr=new ym,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=Fc,this.K=Kl,this.nd=Ep,this.hd=gy,this.tf=6,this.Nn=$0,a&&Object.assign(this,a)}$t(Ga,Ma),Ga.prototype.cloneProtected=function(a){Ma.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},Ga.prototype.qb=function(a){a.classType===Ga?a===W0||a===G0||a===H0||a===Z0||a===Ep?this.sorting=a:a===ng||a===bp||a===Kl||a===Cf?this.direction=a:a===Vh||a===wf||a===Fc||a===Ac?this.arrangement=a:(a===jg||a===$0)&&(this.nodeDiameterFormula=a):Ma.prototype.qb.call(this,a)},Ga.prototype.createNetwork=function(){return new Mp(this)},Ga.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 kn;y.addAll(a.iterator),a=new kn;var x=new kn,b=this.sort(y),E,z,te=this.Jp,re=this.arrangement,oe=this.nodeDiameterFormula,le=this.radius;(!isFinite(le)||0>=le)&&(le=NaN);var ue=this.aspectRatio;(!isFinite(ue)||0>=ue)&&(ue=1);var me=this.startAngle;isFinite(me)||(me=0);var we=this.sweepAngle;if((!isFinite(we)||360<we||1>we)&&(we=360),y=this.spacing,isFinite(y)||(y=NaN),re===Ac&&oe===jg?re=Fc:re===Ac&&oe!==jg&&(re=this.arrangement),(this.direction===ng||this.direction===bp)&&this.sorting!==Ep){for(oe=0;!(oe>=b.length)&&(a.add(b.M(oe)),!(oe+1>=b.length));oe+=2)x.add(b.M(oe+1));this.direction===ng?(this.arrangement===Ac&&a.reverse(),b=new kn,b.addAll(a),b.addAll(x)):(this.arrangement===Ac&&x.reverse(),b=new kn,b.addAll(x),b.addAll(a))}oe=b.length;for(var Me=z=E=0;Me<b.length;Me++){var Te=me+we*z*(this.direction===Kl?1:-1)/oe,je=b.M(Me).diameter;isNaN(je)&&(je=bf(b.M(Me),Te)),360>we&&(Me===0||Me===b.length-1)&&(je/=2),E+=je,z++}if(isNaN(le)||re===Ac){if(isNaN(y)&&(y=6),re!==Fc&&re!==Ac){for(z=-1/0,te=0;te<oe;te++)Me=b.M(te),E=b.M(te===oe-1?0:te+1),isNaN(Me.diameter)&&bf(Me,0),isNaN(E.diameter)&&bf(E,0),z=Math.max(z,(Me.diameter+E.diameter)/2);te=z+y,re===Vh?le=(z+y)/(2*Math.PI/oe):le=j0(this,te*(360<=we?oe:oe-1),ue,me*Math.PI/180,we*Math.PI/180)}else le=j0(this,E+(360<=we?oe:oe-1)*(re!==Ac?y:1.6*y),ue,me*Math.PI/180,we*Math.PI/180);z=le*ue}else if(z=le*ue,Me=Cy(this,le,z,me*Math.PI/180,we*Math.PI/180),isNaN(y))(re===Fc||re===Ac)&&(y=(Me-E)/(360<=we?oe:oe-1));else if(re===Fc||re===Ac)Me=(Me-E)/(360<=we?oe:oe-1),Me<y?(le=j0(this,E+y*(360<=we?oe:oe-1),ue,me*Math.PI/180,we*Math.PI/180),z=le*ue):y=Me;else{for(te=-1/0,E=0;E<oe;E++)Te=b.M(E),je=b.M(E===oe-1?0:E+1),isNaN(Te.diameter)&&bf(Te,0),isNaN(je.diameter)&&bf(je,0),te=Math.max(te,(Te.diameter+je.diameter)/2);te+=y,E=j0(this,te*(360<=we?oe:oe-1),ue,me*Math.PI/180,we*Math.PI/180),E>le?(le=E,z=le*ue):te=Me/(360<=we?oe:oe-1)}if(this.kw=re,this.lc=le,this.Zm=ue,this.lw=me,this.Wp=we,this.Ti=y,this.me=z,this.Jp=te,y=b,b=this.kw,re=this.lc,le=this.lw,ue=this.Wp,me=this.Ti,we=this.me,oe=this.Jp,this.direction!==ng&&this.direction!==bp||b!==Ac)if(this.direction===ng||this.direction===bp){switch(te=0,b){case wf:te=180*z0(this,re,we,le,oe)/Math.PI;break;case Fc:oe=y=0,te=a.first(),te!==null&&(y=bf(te,Math.PI/2)),te=x.first(),te!==null&&(oe=bf(te,Math.PI/2)),te=180*z0(this,re,we,le,me+(y+oe)/2)/Math.PI;break;case Vh:te=ue/y.length}if(this.direction===ng){switch(b){case wf:vm(this,a,le,Cf);break;case Fc:mm(this,a,le,Cf);break;case Vh:pm(this,a,ue/2,le,Cf)}switch(b){case wf:vm(this,x,le+te,Kl);break;case Fc:mm(this,x,le+te,Kl);break;case Vh:pm(this,x,ue/2,le+te,Kl)}}else{switch(b){case wf:vm(this,x,le,Cf);break;case Fc:mm(this,x,le,Cf);break;case Vh:pm(this,x,ue/2,le,Cf)}switch(b){case wf:vm(this,a,le+te,Kl);break;case Fc:mm(this,a,le+te,Kl);break;case Vh:pm(this,a,ue/2,le+te,Kl)}}}else switch(b){case wf:vm(this,y,le,this.direction);break;case Fc:mm(this,y,le,this.direction);break;case Vh:pm(this,y,ue,le,this.direction);break;case Ac:T1(this,y,ue,le,this.direction)}else T1(this,y,ue,le-ue/2,Kl)}this.updateParts(),this.network=null,this.isValidLayout=!0};function pm(a,y,x,b,E){var z=a.Wp,te=a.lc;a=a.me,b=b*Math.PI/180,x=x*Math.PI/180;for(var re=y.length,oe=0;oe<re;oe++){var le=b+(E===Kl?oe*x/(360<=z?re:re-1):-(oe*x)/re),ue=y.M(oe),me=te*Math.tan(le)/a;me=Math.sqrt((te*te+a*a*me*me)/(1+me*me)),ue.centerX=me*Math.cos(le),ue.centerY=me*Math.sin(le),ue.actualAngle=180*le/Math.PI}}function mm(a,y,x,b){var E=a.lc,z=a.me,te=a.Ti;x=x*Math.PI/180;for(var re=y.length,oe=0;oe<re;oe++){var le=y.M(oe),ue=y.M(oe===re-1?0:oe+1),me=z*Math.sin(x);le.centerX=E*Math.cos(x),le.centerY=me,le.actualAngle=180*x/Math.PI,isNaN(le.diameter)&&bf(le,0),isNaN(ue.diameter)&&bf(ue,0),le=z0(a,E,z,b===Kl?x:-x,(le.diameter+ue.diameter)/2+te),x+=b===Kl?le:-le}}function vm(a,y,x,b){var E=a.lc,z=a.me,te=a.Jp;x=x*Math.PI/180;for(var re=y.length,oe=0;oe<re;oe++){var le=y.M(oe);le.centerX=E*Math.cos(x),le.centerY=z*Math.sin(x),le.actualAngle=180*x/Math.PI,le=z0(a,E,z,b===Kl?x:-x,te),x+=b===Kl?le:-le}}function T1(a,y,x,b,E){var z=a.Wp;if(a.mj=0,a.Xr=new ym,360>x){for(z=b+(E===Kl?z:-z);0>z;)z+=360;z%=360,180<z&&(z-=360),z*=Math.PI/180,a.gt=z,I1(a,y,x,b,E)}else k1(a,y,x,b,E);a.Xr.commit(y)}function k1(a,y,x,b,E){var z=a.lc,te=a.Ti,re=a.Zm,oe=z*Math.cos(b*Math.PI/180),le=a.me*Math.sin(b*Math.PI/180),ue=y.Fa();if(ue.length===3)ue[0].centerX=z,ue[0].centerY=0,ue[1].centerX=ue[0].centerX-ue[0].width/2-ue[1].width/2-te,ue[1].y=ue[0].y,ue[2].centerX=(ue[0].centerX+ue[1].centerX)/2,ue[2].y=ue[0].y-ue[2].height-te;else if(ue.length===4)ue[0].centerX=z,ue[0].centerY=0,ue[2].centerX=-ue[0].centerX,ue[2].centerY=ue[0].centerY,ue[1].centerX=0,ue[1].y=Math.min(ue[0].y,ue[2].y)-ue[1].height-te,ue[3].centerX=0,ue[3].y=Math.max(ue[0].y+ue[0].height+te,ue[2].y+ue[2].height+te);else{z=tt.alloc();for(var me=0;me<ue.length&&(ue[me].centerX=oe,ue[me].centerY=le,!(me>=ue.length-1));me++)O1(a,oe,le,ue,me,E,z)||R1(a,oe,le,ue,me,E,z),oe=z.x,le=z.y;if(tt.free(z),a.mj++,!(23<a.mj)){oe=ue[0].centerX,le=ue[0].centerY,z=ue[ue.length-1].centerX,me=ue[ue.length-1].centerY;var we=Math.abs(oe-z)-((ue[0].width+ue[ue.length-1].width)/2+te),Me=Math.abs(le-me)-((ue[0].height+ue[ue.length-1].height)/2+te);te=0,1>Math.abs(Me)?Math.abs(oe-z)<(ue[0].width+ue[ue.length-1].width)/2&&(te=0):te=0<Me?Me:1>Math.abs(we)?0:we,oe=Math.abs(z)>Math.abs(me)?0<z!=le>me:0<me!=oe<z,(oe=E===Kl?oe:!oe)&&(te=-Math.abs(te),te=Math.min(te,-ue[ue.length-1].width),te=Math.min(te,-ue[ue.length-1].height)),a.Xr.compare(te,ue),1<Math.abs(te)&&(a.lc=8>a.mj?a.lc-te/(2*Math.PI):5>ue.length&&10<te?a.lc/2:a.lc-(0<te?1.7:-2.3),a.me=a.lc*re,k1(a,y,x,b,E))}}}function I1(a,y,x,b,E){for(var z=a.lc,te=a.me,re=a.Zm,oe=z*Math.cos(b*Math.PI/180),le=te*Math.sin(b*Math.PI/180),ue=tt.alloc(),me=y.Fa(),we=0;we<me.length&&(me[we].centerX=oe,me[we].centerY=le,!(we>=me.length-1));we++)O1(a,oe,le,me,we,E,ue)||R1(a,oe,le,me,we,E,ue),oe=ue.x,le=ue.y;if(tt.free(ue),a.mj++,!(23<a.mj)){if(oe=Math.atan2(le,oe),oe=E===Kl?a.gt-oe:oe-a.gt,oe=Math.abs(oe)<Math.abs(oe-2*Math.PI)?oe:oe-2*Math.PI,z=oe*(z+te)/2,te=a.Xr,Math.abs(z)<Math.abs(te.Pl))for(te.Pl=z,te.mk=[],te.tm=[],oe=0;oe<me.length;oe++)te.mk[oe]=me[oe].bounds.x,te.tm[oe]=me[oe].bounds.y;1<Math.abs(z)&&(a.lc=8>a.mj?a.lc-z/(2*Math.PI):a.lc-(0<z?1.7:-2.3),a.me=a.lc*re,I1(a,y,x,b,E))}}function O1(a,y,x,b,E,z,te){var re=a.lc,oe=a.me,le=0;a=(b[E].width+b[E+1].width)/2+a.Ti;var ue=!1;if(0<=x!=(z===Kl)){if(z=y+a,z>re){if(z=y-a,z<-re)return te.x=z,te.y=le,!1;ue=!0}}else if(z=y-a,z<-re){if(z=y+a,z>re)return te.x=z,te.y=le,!1;ue=!0}return le=Math.sqrt(1-Math.min(1,z*z/(re*re)))*oe,0>x!==ue&&(le=-le),Math.abs(x-le)>(b[E].height+b[E+1].height)/2?(te.x=z,te.y=le,!1):(te.x=z,te.y=le,!0)}function R1(a,y,x,b,E,z,te){var re=a.lc,oe=a.me,le=0;if(a=(b[E].height+b[E+1].height)/2+a.Ti,b=!1,0<=y!=(z===Kl)){if(z=x-a,z<-oe){if(z=x+a,z>oe){te.x=le,te.y=z;return}b=!0}}else if(z=x+a,z>oe){if(z=x-a,z<-oe){te.x=le,te.y=z;return}b=!0}le=Math.sqrt(1-Math.min(1,z*z/(oe*oe)))*re,0>y!==b&&(le=-le),te.x=le,te.y=z}Ga.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},Ga.prototype.commitNodes=function(){var a=this.group!==null&&this.group.placeholder!==null&&this.group.isSubGraphExpanded,y=a?this.group.location.copy():null,x=this.actualCenter;a?x=new tt(0,0):(x.x=this.arrangementOrigin.x+this.lc,x.y=this.arrangementOrigin.y+this.me);for(var b=this.network.vertexes.iterator;b.next();){var E=b.value;E.x+=x.x,E.y+=x.y,E.commit()}a&&(this.group.Va(),a=this.group.position.copy(),x=this.group.location.copy(),y=y.re(x.re(a)),this.group.move(y),this.Zv=y.re(a))},Ga.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function Cy(a,y,x,b,E){var z=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 te=0,re=b!==void 0&&E!==void 0?E/(z+1):Math.PI/(2*(z+1)),oe=0,le=0;le<=z;le++){b!==void 0&&E!==void 0?oe=b+le*E/z:oe=le*Math.PI/(2*z);var ue=Math.sin(oe);te+=Math.sqrt(1-a*a*ue*ue)*re}return b!==void 0&&E!==void 0?(y>x?y:x)*te:4*(y>x?y:x)*te}function j0(a,y,x,b,E){return y/(b!==void 0&&E!==void 0?Cy(a,1,x,b,E):Cy(a,1,x))}function z0(a,y,x,b,E){if(.001>Math.abs(a.Zm-1))return E/y;var z=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x,te=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(b+=Math.PI/2);for(var re=0;;re++){var oe=Math.sin(b+re*a);if(te+=(y>x?y:x)*Math.sqrt(1-z*z*oe*oe)*a,te>=E)return re*a}}Ga.prototype.sort=function(a){switch(this.sorting){case H0:break;case Z0:a.reverse();break;case W0:a.sort(this.comparer);break;case G0:a.sort(this.comparer),a.reverse();break;case Ep:return this.ak(Tx(a));default:St("Invalid sorting type.")}return a};function Tx(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new kn;for(var b=0;b<a.length;b++){var E=-1,z=-1;if(b===0)for(var te=0;te<a.length;te++){var re=a.M(te).edgesCount;re>E&&(E=re,z=te)}else for(te=0;te<a.length;te++)re=y[te],re>E&&(E=re,z=te);for(x.add(a.M(z)),y[z]=-1,z=a.M(z),te=z.sourceEdges;te.next();)E=a.indexOf(te.value.fromVertex),0>E||0<=y[E]&&y[E]++;for(z=z.destinationEdges;z.next();)E=a.indexOf(z.value.toVertex),0>E||0<=y[E]&&y[E]++}return x}Ga.prototype.ak=function(a){for(var y=[],x=0;x<a.length;x++){var b=a.M(x);y[x]=[];for(var E,z=b.destinationEdges;z.next();)E=a.indexOf(z.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(z=[],x=0;x<y.length;x++)z[x]=0;x=[];var te=[],re=[];b=[],E=new kn;for(var oe=0,le=0;le<y.length;le++){var ue=y[le].length;if(ue===1)b.push(le);else if(ue===0)E.add(a.M(le));else{if(oe===0)x.push(le);else{for(var me=ue=1/0,we=-1,Me=[],Te=0;Te<x.length;Te++)0>y[x[Te]].indexOf(x[Te===x.length-1?0:Te+1])&&Me.push(Te===x.length-1?0:Te+1);if(Me.length===0)for(Te=0;Te<x.length;Te++)Me.push(Te);for(Te=0;Te<Me.length;Te++){for(var je=Me[Te],ct=y[le],nt=0,bt=0;bt<te.length;bt++){var Nt=z[te[bt]],Ot=z[re[bt]];if(Nt<Ot){var Xt=Nt;Nt=Ot}else Xt=Ot;if(Xt<je&&je<=Nt)for(Ot=0;Ot<ct.length;Ot++){var gn=ct[Ot];0>x.indexOf(gn)||Xt<z[gn]&&z[gn]<Nt||Xt===z[gn]||Nt===z[gn]||nt++}else for(Ot=0;Ot<ct.length;Ot++)gn=ct[Ot],0>x.indexOf(gn)||Xt<z[gn]&&z[gn]<Nt&&Xt!==z[gn]&&Nt!==z[gn]&&nt++}for(ct=nt,bt=nt=0;bt<y[le].length;bt++)Xt=x.indexOf(y[le][bt]),0<=Xt&&(Xt=Math.abs(je-(Xt>=je?Xt+1:Xt)),nt+=Xt<x.length+1-Xt?Xt:x.length+1-Xt);for(bt=0;bt<te.length;bt++)Xt=z[te[bt]],Nt=z[re[bt]],Xt>=je&&Xt++,Nt>=je&&Nt++,Xt>Nt&&(Ot=Nt,Nt=Xt,Xt=Ot),Nt-Xt<(x.length+2)/2==(Xt<je&&je<=Nt)&&nt++;(ct<ue||ct===ue&&nt<me)&&(ue=ct,me=nt,we=je)}for(x.splice(we,0,le),ue=0;ue<x.length;ue++)z[x[ue]]=ue;for(ue=0;ue<y[le].length;ue++)me=y[le][ue],0<=x.indexOf(me)&&(te.push(le),re.push(me))}oe++}}for(te=x.length;;){for(z=!0,re=0;re<b.length;re++)if(oe=b[re],le=y[oe][0],ue=x.indexOf(le),0<=ue){for(we=me=0;we<y[le].length;we++)Me=x.indexOf(y[le][we]),0>Me||Me===ue||(Te=Me>ue?Me-ue:ue-Me,me+=Me<ue!=Te>te-Te?1:-1);x.splice(0>me?ue:ue+1,0,oe),b.splice(re,1),re--}else z=!1;if(z)break;x.push(b[0]),b.splice(0,1)}for(y=0;y<x.length;y++)E.add(a.M(x[y]));return E},Je.Object.defineProperties(Ga.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!==Ac&&a!==Fc&&a!==wf&&a!==Vh||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==Kl&&a!==Cf&&a!==ng&&a!==bp||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==H0&&a!==Z0&&a!==W0&&!G0&&a!==Ep||(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!==$0&&a!==jg||(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 Fc=new ln(Ga,"ConstantSpacing",0),wf=new ln(Ga,"ConstantDistance",1),Vh=new ln(Ga,"ConstantAngle",2),Ac=new ln(Ga,"Packed",3),Kl=new ln(Ga,"Clockwise",4),Cf=new ln(Ga,"Counterclockwise",5),ng=new ln(Ga,"BidirectionalLeft",6),bp=new ln(Ga,"BidirectionalRight",7),H0=new ln(Ga,"Forwards",8),Z0=new ln(Ga,"Reverse",9),W0=new ln(Ga,"Ascending",10),G0=new ln(Ga,"Descending",11),Ep=new ln(Ga,"Optimized",12),$0=new ln(Ga,"Pythagorean",13),jg=new ln(Ga,"Circular",14);Ga.className="CircularLayout",Ga.ConstantSpacing=Fc,Ga.ConstantDistance=wf,Ga.ConstantAngle=Vh,Ga.Packed=Ac,Ga.Clockwise=Kl,Ga.Counterclockwise=Cf,Ga.BidirectionalLeft=ng,Ga.BidirectionalRight=bp,Ga.Forwards=H0,Ga.Reverse=Z0,Ga.Ascending=W0,Ga.Descending=G0,Ga.Optimized=Ep,Ga.Pythagorean=$0,Ga.Circular=jg;function ym(){this.Pl=-1/0,this.tm=this.mk=null}ym.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},ym.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]}},ym.className="VertexArrangement";function Mp(a){ca.call(this,a)}$t(Mp,ca),Mp.prototype.createVertex=function(){return new Sm(this)},Mp.prototype.createEdge=function(){return new K0(this)},Mp.className="CircularNetwork";function Sm(a){Ms.call(this,a),this.u=this.Si=NaN}$t(Sm,Ms);function bf(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===Ac)if(x.nodeDiameterFormula===jg)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===jg?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}Je.Object.defineProperties(Sm.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)}}}),Sm.className="CircularVertex";function K0(a){Tu.call(this,a)}$t(K0,Tu),K0.className="CircularEdge";function ml(a){Ma.call(this),this.ah=null,this.An=0,this.$d=new fi(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)}$t(ml,Ma),ml.prototype.cloneProtected=function(a){Ma.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},ml.prototype.createNetwork=function(){return new zg(this)},ml.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 z=E.value;z.Vd=z.vertexes.count,z.sh=1,z.Hj=null,z.We=null}j1(this,0,a)}this.network=y;var te=b=x.iterator;b=this.arrangementSpacing;var re=te.count,oe=!0;z=E=0;for(var le=mn(),ue=0;ue<re+y.vertexes.count+2;ue++)le[ue]=null;re=0,te.reset();for(var me=Ut.alloc();te.next();)if(ue=te.value,this.computeBounds(ue,me),oe)oe=!1,E=me.x+me.width/2,z=me.y+me.height/2,le[0]=new tt(me.x+me.width+b.width,me.y),le[1]=new tt(me.x,me.y+me.height+b.height),re=2;else{var we=z1(le,re,E,z,me.width,me.height,b),Me=le[we],Te=new tt(Me.x+me.width+b.width,Me.y),je=new tt(Me.x,Me.y+me.height+b.height);for(we+1<re&&le.splice(we+1,0,null),le[we]=Te,le[we+1]=je,re++,we=Me.x-me.x,Me=Me.y-me.y,ue=ue.vertexes.iterator;ue.next();)Te=ue.value,Te.centerX+=we,Te.centerY+=Me}for(Ut.free(me),ue=y.vertexes.iterator;ue.next();)te=ue.value,we=te.bounds,2>re?(E=we.x+we.width/2,z=we.y+we.height/2,le[0]=new tt(we.x+we.width+b.width,we.y),le[1]=new tt(we.x,we.y+we.height+b.height),re=2):(oe=z1(le,re,E,z,we.width,we.height,b),me=le[oe],Me=new tt(me.x+we.width+b.width,me.y),we=new tt(me.x,me.y+we.height+b.height),oe+1<re&&le.splice(oe+1,0,null),le[oe]=Me,le[oe+1]=we,re++,te.centerX=me.x+te.width/2,te.centerY=me.y+te.height/2);for(Wn(le),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)}}Z1(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},ml.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},ml.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 j1(a,y,x){if(kx(a,y)){var b=a.Zf;a.Zf*=1+1/(y+1);var E=Ix(a,y),z=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=z,j1(a,y+1,x),Z1(a,z),Ox(a,E),y=E.vertexes.Fa(),y.sort(function(te,re){return te===null||re===null||te===re?0:re.Vd-te.Vd}),x=0;x<y.length;x++)Rx(a,y[x]);a.Zf=b}}function kx(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 Ix(a,y){for(var x=a.network,b=new zg(a),E=0;E<a.ah.length;E++){var z=a.ah[E];if(1<z.Vd){b.dh(z);var te=new W1;te.Rs=z.Vd,te.Ss=z.width,te.Qs=z.height,te.Sv=z.focus.x,te.Tv=z.focus.y,z.We===null&&(z.We=new kn),z.We.add(te),z.sv=z.We.count-1}else break}for(z=x.edges.iterator;z.next();){var re=z.value;E=re.fromVertex,te=re.toVertex,E.network===b&&te.network===b?b.Bo(re):E.network===b?(re=E.Hj,re===null&&(re=new kn,E.Hj=re),re.add(te),E.Vd--,E.sh+=te.sh):te.network===b&&(re=te.Hj,re===null&&(re=new kn,te.Hj=re),re.add(E),te.Vd--,te.sh+=E.sh)}for(E=b.edges.iterator;E.next();)z=E.value,z.length*=Math.max(1,Jt.sqrt((z.fromVertex.sh+z.toVertex.sh)/(4*y+1)));for(y=b.vertexes.iterator;y.next();){E=y.value;var oe=E.Hj;if(oe!==null&&0<oe.count&&(te=E.We.M(E.We.count-1).Rs-E.Vd,!(0>=te))){for(var le=re=0,ue=oe.count-te;ue<oe.count;ue++){var me=oe.M(ue),we=null;for(z=me.edges.iterator;z.next();){var Me=z.value;if(Me.Ax(me)===E){we=Me;break}}we!==null&&(le+=we.length,re+=me.width*me.height)}z=E.centerX,oe=E.centerY,ue=E.width,me=E.height,we=E.focus,Me=ue*me,1>Me&&(Me=1),re=Jt.sqrt((re+Me+le*le*4/(te*te))/Me),te=(re-1)*ue/2,re=(re-1)*me/2,E.bounds=new Ut(z-we.x-te,oe-we.y-re,ue+2*te,me+2*re),E.focus=new tt(we.x+te,we.y+re)}}return a.network=b,x}function Ox(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 z=E.Sv,te=E.Tv;b.bounds=new Ut(b.centerX-z,b.centerY-te,E.Ss,E.Qs),b.focus=new tt(z,te),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,z=y.width,te=y.height;y.We!==null&&0<y.We.count&&(te=y.We.M(0),z=te.Ss,te=te.Qs),z=Jt.sqrt(z*z+te*te)/2;for(var re=!1,oe=te=0,le=0,ue=y.vertexes.iterator;ue.next();){var me=ue.value;1>=me.Vd?oe++:(re=!0,le++,te+=Math.atan2(y.centerY-me.centerY,y.centerX-me.centerX))}if(oe!==0){for(0<le&&(te/=le),le=y=0,y=re?2*Math.PI/(oe+1):2*Math.PI/oe,oe%2===0&&(le=y/2),1<x.count&&x.sort(function(Me,Te){return Me===null||Te===null||Me===Te?0:Te.width*Te.height-Me.width*Me.height}),re=oe%2===0?0:1,x=x.iterator;x.next();)if(oe=x.value,!(1<oe.Vd||a.isFixed(oe))){for(ue=null,me=oe.edges.iterator;me.next();){ue=me.value;break}me=oe.width;var we=oe.height;me=Jt.sqrt(me*me+we*we)/2,ue=z+ue.length+me,me=te+(y*(re/2>>1)+le)*(re%2===0?1:-1),oe.centerX=b+ue*Math.cos(me),oe.centerY=E+ue*Math.sin(me),re++}}}}function z1(a,y,x,b,E,z,te){var re=9e19,oe=-1,le=0;e:for(;le<y;le++){var ue=a[le],me=ue.x-x,we=ue.y-b;if(me=me*me+we*we,me<re){for(we=le-1;0<=we;we--)if(a[we].y>ue.y&&a[we].x-ue.x<E+te.width)continue e;for(we=le+1;we<y;we++)if(a[we].x>ue.x&&a[we].y-ue.y<z+te.height)continue e;oe=le,re=me}}return oe}ml.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},ml.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 z=E.value;if(z.toVertex===a){x=z;break}}if(x===null){for(E=b.sourceEdges;E.next();)if(z=E.value,z.fromVertex===a){x=z;break}}x===null&&(x=this.network.Zj(a,b,null)),x.length=this.defaultCommentSpringLength}}};function H1(a,y){var x=a.bounds,b=x.x;a=x.y;var E=x.width;x=x.height;var z=y.bounds,te=z.x;y=z.y;var re=z.width;return z=z.height,b+E<te?a>y+z?(x=b+E-te,a=a-y-z,Jt.sqrt(x*x+a*a)):a+x<y?(b=b+E-te,a=a+x-y,Jt.sqrt(b*b+a*a)):te-(b+E):b>te+re?a>y+z?(x=b-te-re,a=a-y-z,Jt.sqrt(x*x+a*a)):a+x<y?(b=b-te-re,a=a+x-y,Jt.sqrt(b*b+a*a)):b-(te+re):a>y+z?a-(y+z):a+x<y?y-(a+x):.1}function Z1(a,y){for(a.ah=null,y=a.An+y;a.An<y&&(a.An++,jx(a)););a.ah=null}function jx(a){a.ah===null&&(a.ah=a.network.vertexes.Fa());var y=a.ah;if(0>=y.length)return!1;var x=y[0];x.forceX=0,x.forceY=0;for(var b=x.centerX,E=b,z=x=x.centerY,te=1;te<y.length;te++){var re=y[te];re.forceX=0,re.forceY=0;var oe=re.centerX;re=re.centerY,b=Math.min(b,oe),E=Math.max(E,oe),x=Math.min(x,re),z=Math.max(z,re)}(E=E-b>z-x)?y.sort(function(je,ct){return je===null||ct===null||je===ct?0:je.centerX-ct.centerX}):y.sort(function(je,ct){return je===null||ct===null||je===ct?0:je.centerY-ct.centerY}),x=a.Zf;var le=b=re=0;for(z=0;z<y.length;z++){te=y[z],b=te.bounds,re=te.focus,oe=b.x+re.x;var ue=b.y+re.y;b=te.charge*a.electricalFieldX(oe,ue),le=te.charge*a.electricalFieldY(oe,ue),b+=te.mass*a.gravitationalFieldX(oe,ue),le+=te.mass*a.gravitationalFieldY(oe,ue),te.forceX+=b,te.forceY+=le;for(var me=z+1;me<y.length;me++){var we=y[me];if(we!==te){b=we.bounds,re=we.focus,le=b.x+re.x;var Me=b.y+re.y;if(oe-le>x||le-oe>x){if(E)break}else if(ue-Me>x||Me-ue>x){if(!E)break}else{var Te=H1(te,we);1>Te?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new V0),Te=b.random(),re=b.random(),oe>le?(b=Math.abs(we.bounds.right-te.bounds.x),b=(1+b)*Te):oe<le?(b=Math.abs(we.bounds.x-te.bounds.right),b=-(1+b)*Te):(b=Math.max(we.width,te.width),b=(1+b)*Te-b/2),ue>Me?(le=Math.abs(we.bounds.bottom-te.bounds.y),le=(1+le)*re):oe<le?(le=Math.abs(we.bounds.y-te.bounds.bottom),le=-(1+le)*re):(le=Math.max(we.height,te.height),le=(1+le)*re-le/2)):(re=-(te.charge*we.charge)/(Te*Te),b=(le-oe)/Te*re,le=(Me-ue)/Te*re),te.forceX+=b,te.forceY+=le,we.forceX-=b,we.forceY-=le}}}}for(E=a.network.edges.iterator;E.next();)re=E.value,x=re.fromVertex,z=re.toVertex,te=x.bounds,oe=x.focus,b=te.x+oe.x,te=te.y+oe.y,ue=z.bounds,me=z.focus,oe=ue.x+me.x,ue=ue.y+me.y,me=H1(x,z),1>me?(me=a.randomNumberGenerator,me===null&&(a.randomNumberGenerator=me=new V0),re=me.random(),me=me.random(),b=(b>oe?1:-1)*(1+(z.width>x.width?z.width:x.width))*re,le=(te>ue?1:-1)*(1+(z.height>x.height?z.height:x.height))*me):(re=re.stiffness*(me-re.length),b=(oe-b)/me*re,le=(ue-te)/me*re),x.forceX+=b,x.forceY+=le,z.forceX-=b,z.forceY-=le;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}ml.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},ml.prototype.moveFixedVertex=function(){},ml.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},ml.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=Vo,y.toSpot=Vo)}},ml.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=Ut.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,Ut.free(x)}x=Ut.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()}Ut.free(x)},ml.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},ml.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},ml.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},ml.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},ml.prototype.electricalFieldX=function(){return 0},ml.prototype.electricalFieldY=function(){return 0},ml.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},ml.prototype.gravitationalFieldX=function(){return 0},ml.prototype.gravitationalFieldY=function(){return 0},ml.prototype.isFixed=function(a){return a.isFixed},Je.Object.defineProperties(ml.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"&&St('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())}}}),ml.className="ForceDirectedLayout";function W1(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}W1.className="ForceDirectedSubnet";function zg(a){ca.call(this,a)}$t(zg,ca),zg.prototype.createVertex=function(){return new xm(this)},zg.prototype.createEdge=function(){return new Pm(this)},zg.className="ForceDirectedNetwork";function xm(a){Ms.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}$t(xm,Ms),Je.Object.defineProperties(xm.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)}}}),xm.className="ForceDirectedVertex";function Pm(a){Tu.call(this,a),this.j=this.o=NaN}$t(Pm,Tu),Je.Object.defineProperties(Pm.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)}}}),Pm.className="ForceDirectedEdge";function V0(){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()}V0.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},V0.className="RandomNumberGenerator";function ea(a){Ma.call(this),this.kc=this.ie=25,this.K=0,this.Dk=J0,this.Zk=Q0,this.Qk=q0,this.bj=4,this.rk=ev,this.bg=15,this.sf=!0,this.Cn=4,this.Ra=this.Iq=this.Ia=-1,this.Md=this.Hn=0,this.Ta=this.Kd=this.Ld=this.he=this.tc=null,this.Kn=0,this.Jn=this.kj=null,this.le=0,this.fl=null,this.Rf=new tt,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}$t(ea,Ma),ea.prototype.cloneProtected=function(a){Ma.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},ea.prototype.qb=function(a){a.classType===ea?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:St("Unknown enum value: "+a):Ma.prototype.qb.call(this,a)},ea.prototype.createNetwork=function(){return new Np(this)},ea.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!==Cm&&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===Cm&&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,z=b.toVertex;if(!(b.valid||(E.node===null&&E.data===null||z.node===null&&z.data===null)&&E.layer===z.layer)){var te=0,re=0,oe=0,le=0;if(b.link!==null){if(re=b.link,re===null)continue;var ue=E.node;if(te=z.node,ue===null||te===null)continue;var me=re.fromNode;oe=re.toNode;for(var we=re.fromPort;we!==null&&!we.Ed();)we=we.panel;for(re=re.toPort;re!==null&&!re.Ed();)re=re.panel;if(b.rev){le=me;var Me=we;me=oe,we=re,oe=le,re=Me}var Te=E.focus;le=z.focus;var je=b.rev?z.bounds:E.bounds;Me=tt.alloc(),ue!==me?je.w()&&me.isVisible()?me.actualBounds.w()?(Zh(me,we,wo,Me),Me.x+=me.actualBounds.x-je.x,Me.y+=me.actualBounds.y-je.y):(Zh(me,we,wo,Me),Me.w()||Me.assign(Te)):Me.assign(Te):je.w()?(Zh(me,we,wo,Me),Me.w()||Me.assign(Te)):Me.assign(Te),me=b.rev?E.bounds:z.bounds,ue=tt.alloc(),te!==oe?me.w()&&oe.isVisible()?oe.actualBounds.w()?(Zh(oe,re,wo,ue),ue.x+=oe.actualBounds.x-me.x,ue.y+=oe.actualBounds.y-me.y):(Zh(oe,re,wo,ue),ue.w()||ue.assign(le)):ue.assign(le):me.w()?(Zh(oe,re,wo,ue),ue.w()||ue.assign(le)):ue.assign(le),this.K===90||this.K===270?(te=Math.round((Me.x-Te.x)/this.kc),oe=Me.x,re=Math.round((ue.x-le.x)/this.kc),le=ue.x):(te=Math.round((Me.y-Te.y)/this.kc),oe=Me.y,re=Math.round((ue.y-le.y)/this.kc),le=ue.y),tt.free(Me),tt.free(ue),b.portFromColOffset=te,b.portFromPos=oe,b.portToColOffset=re,b.portToPos=le}else b.portFromColOffset=0,b.portFromPos=0,b.portToColOffset=0,b.portToPos=0;if(Me=E.layer,ue=z.layer,me=0,je=b.link,je!==null){var ct=je.fromPort,nt=je.toPort;if(ct!==null&&nt!==null){var bt=je.fromNode;if(we=je.toNode,bt!==null&&we!==null){var Nt=Y0(this,!0),Ot=Y0(this,!1),Xt=this.setsPortSpots?Nt:je.computeSpot(!0,ct);Te=this.setsPortSpots?Ot:je.computeSpot(!1,nt);var gn=je.isOrthogonal;Xt.$c()&&Xt.Hf(Ot)&&Te.$c()&&Te.Hf(Nt)?me=0:(Nt=je.getLinkPoint(bt,ct,Xt,!0,gn,we,nt,tt.alloc()),Ot=je.getLinkDirection(bt,ct,Nt,Xt,!0,gn,we,nt),tt.free(Nt),Xt.ys()||Ot!==J1(this,b,!0)?this.setsPortSpots&&bt!==null&&bt.ports.count===1&&b.rev&&(me+=1):me+=1,Xt=je.getLinkPoint(we,nt,Te,!1,gn,bt,ct,tt.alloc()),je=je.getLinkDirection(we,nt,Xt,Te,!1,gn,bt,ct),tt.free(Xt),Te.ys()||je!==J1(this,b,!1)?this.setsPortSpots&&we!==null&&we.ports.count===1&&b.rev&&(me+=2):me+=2)}}}if(we=me,me=we===1||we===3,(we=we===2||we===3)&&(Te=a.createVertex(),Te.node=null,Te.Dj=1,Te.layer=Me,Te.near=E,a.dh(Te),E=a.Zj(E,Te,b.link),E.valid=!1,E.rev=b.rev,E.portFromColOffset=te,E.portToColOffset=0,E.portFromPos=oe,E.portToPos=0,E=Te),je=1,me&&je--,Me-ue>je&&0<Me){for(b.valid=!1,Te=a.createVertex(),Te.node=null,Te.Dj=2,Te.layer=Me-1,a.dh(Te),E=a.Zj(E,Te,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=we?0:te,E.portToColOffset=0,E.portFromPos=we?0:oe,E.portToPos=0,E=Te,Me--;Me-ue>je&&0<Me;)Te=a.createVertex(),Te.node=null,Te.Dj=3,Te.layer=Me-1,a.dh(Te),E=a.Zj(E,Te,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=0,E.portFromPos=0,E.portToPos=0,E=Te,Me--;E=a.Zj(Te,z,b.link),E.valid=!me,me&&(Te.near=z),E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=re,E.portFromPos=0,E.portToPos=le}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=Ef(this,a),x=0,b=this.tc[a],z=0;z<b;z++)E=y[z],x+=this.nodeMinColumnSpace(E,!0),E.column=x,x+=1,x+=this.nodeMinColumnSpace(E,!1);this.Ra=Math.max(this.Ra,x-1),Mf(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},ea.prototype.linkMinLength=function(){return 1};function by(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}ea.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},ea.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 au(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 tc(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 G1(a,y,x){var b=Ef(a,y),E=a.tc[y];(a.Jn===null||a.Jn.length<E*E)&&(a.Jn=[]);for(var z=a.Jn,te=0;te<E;te++){var re=0,oe=b[te],le=oe.near;if(le!==null&&le.layer===oe.layer)if(oe=le.index,oe>te)for(var ue=te+1;ue<oe;ue++){var me=b[ue];me.near===le&&me.Dj===le.Dj||re++}else for(ue=te-1;ue>oe;ue--)me=b[ue],me.near===le&&me.Dj===le.Dj||re++;var we;if(0<=x)for(oe=b[te].sourceEdgesArrayAccess,le=0;le<oe.length;le++){var Me=oe[le];if(Me.valid&&Me.fromVertex.layer!==y)for(me=Me.fromVertex.index,ue=Me.portToPos,Me=Me.portFromPos,we=le+1;we<oe.length;we++){var Te=oe[we];if(Te.valid&&Te.fromVertex.layer!==y){var je=Te.fromVertex.index,ct=Te.portToPos;Te=Te.portFromPos,ue<ct&&(me>je||me===je&&Me>Te)&&re++,ct<ue&&(je>me||je===me&&Te>Me)&&re++}}}if(0>=x){for(oe=b[te].destinationEdgesArrayAccess,le=0;le<oe.length;le++)if(Me=oe[le],Me.valid&&Me.toVertex.layer!==y)for(me=Me.toVertex.index,ue=Me.portToPos,Me=Me.portFromPos,we=le+1;we<oe.length;we++)Te=oe[we],Te.valid&&Te.toVertex.layer!==y&&(je=Te.toVertex.index,ct=Te.portToPos,Te=Te.portFromPos,Me<Te&&(me>je||me===je&&ue>ct)&&re++,Te<Me&&(je>me||je===me&&ct>ue)&&re++)}for(z[te*E+te]=re,oe=te+1;oe<E;oe++){var nt=0,bt=0;if(0<=x){re=b[te].sourceEdgesArrayAccess;var Nt=b[oe].sourceEdgesArrayAccess;for(le=0;le<re.length;le++)if(Me=re[le],Me.valid&&Me.fromVertex.layer!==y)for(me=Me.fromVertex.index,Me=Me.portFromPos,we=0;we<Nt.length;we++)Te=Nt[we],Te.valid&&Te.fromVertex.layer!==y&&(je=Te.fromVertex.index,Te=Te.portFromPos,(me<je||me===je&&Me<Te)&&bt++,(je<me||je===me&&Te<Me)&&nt++)}if(0>=x){for(re=b[te].destinationEdgesArrayAccess,Nt=b[oe].destinationEdgesArrayAccess,le=0;le<re.length;le++)if(Me=re[le],Me.valid&&Me.toVertex.layer!==y)for(me=Me.toVertex.index,ue=Me.portToPos,we=0;we<Nt.length;we++)Te=Nt[we],Te.valid&&Te.toVertex.layer!==y&&(je=Te.toVertex.index,ct=Te.portToPos,(me<je||me===je&&ue<ct)&&bt++,(je<me||je===me&&ct<ue)&&nt++)}z[te*E+oe]=nt,z[oe*E+te]=bt}}return Mf(a,y,b),z}ea.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=G1(this,y,1),b=this.tc[y],E=0;E<b;E++)for(var z=E;z<b;z++)a+=x[E*b+z];return a};function U0(a){for(var y=0,x=0;x<=a.Ia;x++){for(var b=a,E=x,z=Ef(b,E),te=b.tc[E],re=0,oe=0;oe<te;oe++){var le=z[oe].destinationEdgesArrayAccess;if(le!==null)for(var ue=0;ue<le.length;ue++){var me=le[ue];if(me.valid&&me.toVertex.layer!==E){var we=me.fromVertex.column+me.portFromColOffset,Me=me.toVertex.column+me.portToColOffset;re+=(Math.abs(we-Me)+1)*by(me)}}}Mf(b,E,z),y+=re}return y}ea.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 Ey(a,y,x){for(var b=Ef(a,y),E=a.tc[y],z=[],te=0;te<E;te++){var re=b[te],oe=null;0>=x&&(oe=re.sourceEdgesArrayAccess);var le=null;0<=x&&(le=re.destinationEdgesArrayAccess);var ue=0,me=0,we=re.near;if(we!==null&&we.layer===re.layer&&(ue+=we.column-1,me++),oe!==null)for(we=0;we<oe.length;we++){re=oe[we];var Me=re.fromVertex;re.valid&&!re.rev&&Me.layer!==y&&(ue+=Me.column,me++)}if(le!==null)for(oe=0;oe<le.length;oe++)re=le[oe],we=re.toVertex,re.valid&&!re.rev&&we.layer!==y&&(ue+=we.column,me++);z[te]=me===0?-1:ue/me}return Mf(a,y,b),z}function $1(a,y,x){for(var b=Ef(a,y),E=a.tc[y],z=[],te=0;te<E;te++){var re=b[te],oe=null;0>=x&&(oe=re.sourceEdgesArrayAccess);var le=null;0<=x&&(le=re.destinationEdgesArrayAccess);var ue=0,me=[],we=re.near;if(we!==null&&we.layer===re.layer&&(me[ue]=we.column-1,ue++),re=void 0,oe!==null)for(we=0;we<oe.length;we++){re=oe[we];var Me=re.fromVertex;re.valid&&!re.rev&&Me.layer!==y&&(me[ue]=Me.column+re.portFromColOffset,ue++)}if(le!==null)for(oe=0;oe<le.length;oe++)re=le[oe],we=re.toVertex,re.valid&&!re.rev&&we.layer!==y&&(me[ue]=we.column+re.portToColOffset,ue++);ue===0?z[te]=-1:(me.sort(function(Te,je){return Te-je}),le=ue>>1,z[te]=ue&1?me[le]:me[le-1]+me[le]>>1)}return Mf(a,y,b),z}function wm(a,y,x,b,E,z){if(y.component===b){if(y.component=x,E)for(var te=y.destinationEdges;te.next();){var re=te.value,oe=re.toVertex,le=y.layer-oe.layer;re=a.linkMinLength(re),le===re&&wm(a,oe,x,b,E,z)}if(z)for(te=y.sourceEdges;te.next();)re=te.value,oe=re.fromVertex,le=oe.layer-y.layer,re=a.linkMinLength(re),le===re&&wm(a,oe,x,b,E,z)}}function My(a,y,x,b,E,z){if(y.component===b){if(y.component=x,E)for(var te=y.destinationEdges;te.next();)My(a,te.value.toVertex,x,b,E,z);if(z)for(y=y.sourceEdges;y.next();)My(a,y.value.fromVertex,x,b,E,z)}}ea.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case Fy: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=K1(a);E!==null;)b[x]=E,x--,E.valid=!1,E=K1(a);for(E=V1(a);E!==null;)b[y]=E,y++,E.valid=!1,E=V1(a);E=null;for(var z=0,te=this.network.vertexes.iterator;te.next();){var re=te.value;if(re.valid){for(var oe=0,le=re.destinationEdges;le.next();)le.value.toVertex.valid&&oe++;le=0;for(var ue=re.sourceEdges;ue.next();)ue.value.fromVertex.valid&&le++;(E===null||z<oe-le)&&(E=re,z=oe-le)}}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 J0: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&&Ly(this,y);for(b.reset();b.next();)y=b.value,y.Ll===-1&&Ly(this,y);for(a.reset();a.next();)b=a.value,b.forest||(y=b.fromVertex,x=y.finish,E=b.toVertex,z=E.finish,E.Ll<y.Ll&&x<z&&(this.network.gm(b),b.rev=!0));break;case Cm: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(z=0;z<E.length;z++)E[z].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 K1(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 V1(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 Ly(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,Ly(a,E))}y.finish=a.Kn,a.Kn++}ea.prototype.assignLayers=function(){switch(this.Zk){case Ay:U1(this);break;case Dy:for(var a,y=this.network.vertexes.iterator;y.next();)a=X1(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 Q0:for(U1(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&Y1(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 U1(a){for(var y=a.network.vertexes.iterator;y.next();){var x=_1(a,y.value);a.Ia=Math.max(x,a.Ia)}}function _1(a,y){var x=0;if(y.layer===-1){for(var b=y.destinationEdges;b.next();){var E=b.value,z=E.toVertex;E=a.linkMinLength(E),x=Math.max(x,_1(a,z)+E)}y.layer=x}else x=y.layer;return x}function X1(a,y){var x=0;if(y.layer===-1){for(var b=y.sourceEdges;b.next();){var E=b.value,z=E.fromVertex;E=a.linkMinLength(E),x=Math.max(x,X1(a,z)+E)}y.layer=x}else x=y.layer;return x}function Y1(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)Y1(a,x.value.toVertex);for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(var b=y.sourceEdgesArrayAccess,E=b.length,z=0;z<E;z++){var te=b[z],re=te.fromVertex,oe=te.toVertex;te=a.linkMinLength(te),re.layer-oe.layer>te&&wm(a,re,0,-1,!0,!1)}for(wm(a,y,1,-1,!0,!0);y.component!==0;){for(z=0,b=1/0,re=0,oe=null,te=a.network.vertexes.iterator;te.next();){var le=te.value;if(le.component===1){var ue=0,me=!1,we=le.sourceEdgesArrayAccess;E=we.length;for(var Me=0;Me<E;Me++){var Te=we[Me],je=Te.fromVertex;ue+=1,je.component!==1&&(z+=1,je=je.layer-le.layer,Te=a.linkMinLength(Te),b=Math.min(b,je-Te))}for(we=le.destinationEdgesArrayAccess,E=we.length,Me=0;Me<E;Me++)Te=we[Me].toVertex,--ue,Te.component!==1?--z:me=!0;(oe===null||ue<re)&&!me&&(oe=le,re=ue)}}if(0<z){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer+=b);y.component=0}else oe.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(wm(a,y,1,-1,!0,!1);y.component!==0;){for(b=0,E=1/0,z=0,re=null,oe=a.network.vertexes.iterator;oe.next();)if(te=oe.value,te.component===1){for(le=0,ue=!1,we=te.sourceEdgesArrayAccess,me=we.length,Me=0;Me<me;Me++)Te=we[Me].fromVertex,le+=1,Te.component!==1?b+=1:ue=!0;for(we=te.destinationEdgesArrayAccess,me=we.length,Me=0;Me<me;Me++)Te=we[Me],je=Te.toVertex,--le,je.component!==1&&(--b,je=te.layer-je.layer,Te=a.linkMinLength(Te),E=Math.min(E,je-Te));(re===null||le>z)&&!ue&&(re=te,z=le)}if(0>b){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer-=E);y.component=0}else re.component=0}}}function J1(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}ea.prototype.initializeIndices=function(){switch(this.Qk){default:case Ty: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 q0: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&&Q1(this,x);break;case By: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&&q1(this,x)}};function Q1(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],z=y[b+1];E.portFromColOffset>z.portFromColOffset&&(x=!0,y[b]=z,y[b+1]=E)}}for(x=0;x<y.length;x++)b=y[x],b.valid&&(b=b.toVertex,b.index===-1&&Q1(a,b))}function q1(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],z=y[x+1];E.portToColOffset>z.portToColOffset&&(b=!0,y[x]=z,y[x+1]=E)}for(x=0;x<y.length;x++)b=y[x],b.valid&&(b=b.fromVertex,b.index===-1&&q1(a,b))}ea.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=au(this),x,b;for(x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)_0(this,b,1),fc(this,b,1);var E=this.countCrossings();for(E<a&&(a=E,y=au(this)),b=this.Ia;0<=b;b--)_0(this,b,-1),fc(this,b,-1);E=this.countCrossings(),E<a&&(a=E,y=au(this))}for(tc(this,y),x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)_0(this,b,0),fc(this,b,0);for(E=this.countCrossings(),E<a&&(a=E,y=au(this)),b=this.Ia;0<=b;b--)_0(this,b,0),fc(this,b,0);E=this.countCrossings(),E<a&&(a=E,y=au(this))}tc(this,y);var z,te,re;switch(this.rk){case ky:break;case Iy:for(re=a+1;(b=this.countCrossings())<re;)for(re=b,x=this.Ia;0<=x;x--)for(te=0;te<=x;te++){for(z=!0;z;)for(z=!1,b=x;b>=te;b--)z=fc(this,b,-1)||z;for(E=this.countCrossings(),E>=a?tc(this,y):(a=E,y=au(this)),z=!0;z;)for(z=!1,b=x;b>=te;b--)z=fc(this,b,1)||z;for(E=this.countCrossings(),E>=a?tc(this,y):(a=E,y=au(this)),z=!0;z;)for(z=!1,b=te;b<=x;b++)z=fc(this,b,1)||z;for(E>=a?tc(this,y):(a=E,y=au(this)),z=!0;z;)for(z=!1,b=te;b<=x;b++)z=fc(this,b,-1)||z;for(E>=a?tc(this,y):(a=E,y=au(this)),z=!0;z;)for(z=!1,b=x;b>=te;b--)z=fc(this,b,0)||z;for(E>=a?tc(this,y):(a=E,y=au(this)),z=!0;z;)for(z=!1,b=te;b<=x;b++)z=fc(this,b,0)||z;E>=a?tc(this,y):(a=E,y=au(this))}break;default:case ev:for(x=this.Ia,te=0,re=a+1;(b=this.countCrossings())<re;){for(re=b,z=!0;z;)for(z=!1,b=x;b>=te;b--)z=fc(this,b,-1)||z;for(E=this.countCrossings(),E>=a?tc(this,y):(a=E,y=au(this)),z=!0;z;)for(z=!1,b=x;b>=te;b--)z=fc(this,b,1)||z;for(E=this.countCrossings(),E>=a?tc(this,y):(a=E,y=au(this)),z=!0;z;)for(z=!1,b=te;b<=x;b++)z=fc(this,b,1)||z;for(E>=a?tc(this,y):(a=E,y=au(this)),z=!0;z;)for(z=!1,b=te;b<=x;b++)z=fc(this,b,-1)||z;for(E>=a?tc(this,y):(a=E,y=au(this)),z=!0;z;)for(z=!1,b=x;b>=te;b--)z=fc(this,b,0)||z;for(E>=a?tc(this,y):(a=E,y=au(this)),z=!0;z;)for(z=!1,b=te;b<=x;b++)z=fc(this,b,0)||z;E>=a?tc(this,y):(a=E,y=au(this))}}tc(this,y)};function _0(a,y,x){var b=Ef(a,y),E=a.tc[y],z=$1(a,y,x),te=Ey(a,y,x);for(x=0;x<E;x++)te[x]===-1&&(te[x]=b[x].column),z[x]===-1&&(z[x]=b[x].column);for(var re=!0,oe;re;)for(re=!1,x=0;x<E-1;x++)(z[x+1]<z[x]||z[x+1]===z[x]&&te[x+1]<te[x])&&(re=!0,oe=z[x],z[x]=z[x+1],z[x+1]=oe,oe=te[x],te[x]=te[x+1],te[x+1]=oe,oe=b[x],b[x]=b[x+1],b[x+1]=oe);for(x=z=0;x<E;x++)oe=b[x],oe.index=x,z+=a.nodeMinColumnSpace(oe,!0),oe.column=z,z+=1,z+=a.nodeMinColumnSpace(oe,!1);Mf(a,y,b)}function fc(a,y,x){var b=Ef(a,y),E=a.tc[y];x=G1(a,y,x);var z,te=[];for(z=0;z<E;z++)te[z]=-1;var re=[];for(z=0;z<E;z++)re[z]=-1;for(var oe=!1,le=!0;le;)for(le=!1,z=0;z<E-1;z++){var ue=x[b[z].index*E+b[z+1].index],me=x[b[z+1].index*E+b[z].index],we=0,Me=0,Te=b[z].column,je=b[z+1].column,ct=a.nodeMinColumnSpace(b[z],!0),nt=a.nodeMinColumnSpace(b[z],!1),bt=a.nodeMinColumnSpace(b[z+1],!0),Nt=a.nodeMinColumnSpace(b[z+1],!1);ct=Te-ct+bt,nt=je-nt+Nt;var Ot=b[z].sourceEdges.iterator;for(Ot.reset();Ot.next();)if(bt=Ot.value,Nt=bt.fromVertex,bt.valid&&Nt.layer===y){for(bt=0;b[bt]!==Nt;)bt++;bt<z&&(we+=2*(z-bt),Me+=2*(z+1-bt)),bt===z+1&&(we+=1),bt>z+1&&(we+=4*(bt-z),Me+=4*(bt-(z+1)))}for(Ot=b[z].destinationEdges.iterator,Ot.reset();Ot.next();)if(bt=Ot.value,Nt=bt.toVertex,bt.valid&&Nt.layer===y){for(bt=0;b[bt]!==Nt;)bt++;bt===z+1&&(Me+=1)}for(Ot=b[z+1].sourceEdges.iterator,Ot.reset();Ot.next();)if(bt=Ot.value,Nt=bt.fromVertex,bt.valid&&Nt.layer===y){for(bt=0;b[bt]!==Nt;)bt++;bt<z&&(we+=2*(z+1-bt),Me+=2*(z-bt)),bt===z&&(Me+=1),bt>z+1&&(we+=4*(bt-(z+1)),Me+=4*(bt-z))}for(Ot=b[z+1].destinationEdges.iterator,Ot.reset();Ot.next();)if(bt=Ot.value,Nt=bt.toVertex,bt.valid&&Nt.layer===y){for(bt=0;b[bt]!==Nt;)bt++;bt===z&&(we+=1)}bt=Nt=0,Ot=te[b[z].index];var Xt=re[b[z].index],gn=te[b[z+1].index],Fi=re[b[z+1].index];Ot!==-1&&(Nt+=Math.abs(Ot-Te),bt+=Math.abs(Ot-nt)),Xt!==-1&&(Nt+=Math.abs(Xt-Te),bt+=Math.abs(Xt-nt)),gn!==-1&&(Nt+=Math.abs(gn-je),bt+=Math.abs(gn-ct)),Fi!==-1&&(Nt+=Math.abs(Fi-je),bt+=Math.abs(Fi-ct)),(Me<we-.5||Me===we&&me<ue-.5||Me===we&&me===ue&&bt<Nt-.5)&&(le=oe=!0,b[z].column=nt,b[z+1].column=ct,ue=b[z],b[z]=b[z+1],b[z+1]=ue)}for(z=0;z<E;z++)b[z].index=z;return Mf(a,y,b),oe}ea.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&Ux)!==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 z=E.value;y=z.layer,b=z.column,z=this.nodeMinColumnSpace(z,!1),x[y]=Math.max(x[y],b+z)}for(E.reset();E.next();)z=E.value,y=z.layer,b=z.column,z.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=Lp(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Lp(this,y,-1)||x;x=Lp(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)Ny(this,y,1);for(y=this.Md-1;0<=y;y--)Ny(this,y,-1);Ny(this,this.Md,0)}if(a&&(ex(this,-1),ex(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=Lp(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Lp(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Lp(this,y,0)||x}}else Gx(this)};function Lp(a,y,x){for(var b=!1;Hx(a,y,x);)b=!0;return b}function Hx(a,y,x){var b,E=Ef(a,y),z=a.tc[y],te=Ey(a,y,-1);if(0<x)for(b=0;b<z;b++)te[b]=-1;var re=Ey(a,y,1);if(0>x)for(b=0;b<z;b++)re[b]=-1;for(var oe=!1,le=!0;le;)for(le=!1,b=0;b<z;b++){var ue=E[b].column,me=a.nodeMinColumnSpace(E[b],!0),we=a.nodeMinColumnSpace(E[b],!1),Me=0;0>b-1||ue-E[b-1].column-1>me+a.nodeMinColumnSpace(E[b-1],!1)?Me=ue-1:Me=ue,me=b+1>=z||E[b+1].column-ue-1>we+a.nodeMinColumnSpace(E[b+1],!0)?ue+1:ue;var Te=we=0,je=0;if(0>=x)for(var ct=E[b].sourceEdges.iterator;ct.next();){var nt=ct.value,bt=nt.fromVertex;if(nt.valid&&bt.layer!==y){var Nt=by(nt),Ot=nt.portFromColOffset;nt=nt.portToColOffset,bt=bt.column,we+=(Math.abs(ue+nt-(bt+Ot))+1)*Nt,Te+=(Math.abs(Me+nt-(bt+Ot))+1)*Nt,je+=(Math.abs(me+nt-(bt+Ot))+1)*Nt}}if(0<=x)for(ct=E[b].destinationEdges.iterator;ct.next();)nt=ct.value,bt=nt.toVertex,nt.valid&&bt.layer!==y&&(Nt=by(nt),Ot=nt.portFromColOffset,nt=nt.portToColOffset,bt=bt.column,we+=(Math.abs(ue+Ot-(bt+nt))+1)*Nt,Te+=(Math.abs(Me+Ot-(bt+nt))+1)*Nt,je+=(Math.abs(me+Ot-(bt+nt))+1)*Nt);nt=Ot=Nt=0,ct=te[E[b].index],bt=re[E[b].index],ct!==-1&&(Nt+=Math.abs(ct-ue),Ot+=Math.abs(ct-Me),nt+=Math.abs(ct-me)),bt!==-1&&(Nt+=Math.abs(bt-ue),Ot+=Math.abs(bt-Me),nt+=Math.abs(bt-me)),Te<we||Te===we&&Ot<Nt?(le=oe=!0,E[b].column=Me):(je<we||je===we&&nt<Nt)&&(le=oe=!0,E[b].column=me)}return Mf(a,y,E),a.normalize(),oe}function Ny(a,y,x){var b=Ef(a,y),E=a.tc[y],z=$1(a,y,x),te=[];for(x=0;x<E;x++)te[x]=z[x];for(z=!0;z;)for(z=!1,x=0;x<E;x++){var re=b[x].column,oe=a.nodeMinColumnSpace(b[x],!0),le=a.nodeMinColumnSpace(b[x],!1),ue=0;if(te[x]===-1)if(x===0&&x===E-1)ue=re;else if(x===0){var me=b[x+1].column;me-re===le+a.nodeMinColumnSpace(b[x+1],!0)?ue=re-1:ue=re}else x===E-1?(me=b[x-1].column,ue=re-me===oe+a.nodeMinColumnSpace(b[x-1],!1)?re+1:re):(me=b[x-1].column,oe=me+a.nodeMinColumnSpace(b[x-1],!1)+oe+1,me=b[x+1].column,le=me-a.nodeMinColumnSpace(b[x+1],!0)-le-1,ue=(oe+le)/2|0);else x===0&&x===E-1?ue=te[x]:x===0?(me=b[x+1].column,le=me-a.nodeMinColumnSpace(b[x+1],!0)-le-1,ue=Math.min(te[x],le)):x===E-1?(me=b[x-1].column,oe=me+a.nodeMinColumnSpace(b[x-1],!1)+oe+1,ue=Math.max(te[x],oe)):(me=b[x-1].column,oe=me+a.nodeMinColumnSpace(b[x-1],!1)+oe+1,me=b[x+1].column,le=me-a.nodeMinColumnSpace(b[x+1],!0)-le-1,oe<te[x]&&te[x]<le?ue=te[x]:oe>=te[x]?ue=oe:le<=te[x]&&(ue=le));ue!==re&&(z=!0,b[x].column=ue)}Mf(a,y,b),a.normalize()}function Zx(a,y){for(var x=!0,b=a.network.vertexes.iterator;b.next();){var E=b.value,z=a.nodeMinColumnSpace(E,!0),te=a.nodeMinColumnSpace(E,!1);if(E.column-z<=y&&E.column+te>=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 Wx(a,y){var x=y+1,b,E=[],z=[];for(b=0;b<=a.Ia;b++)E[b]=!1,z[b]=!1;for(var te=a.network.vertexes.iterator;te.next();){b=te.value;var re=b.column-a.nodeMinColumnSpace(b,!0),oe=b.column+a.nodeMinColumnSpace(b,!1);re<=y&&oe>=y&&(E[b.layer]=!0),re<=x&&oe>=x&&(z[b.layer]=!0)}for(re=!0,x=!1,b=0;b<=a.Ia;b++)re=re&&!(E[b]&&z[b]);if(re)for(te.reset();te.next();)a=te.value,a.column>y&&(--a.column,x=!0);return x}function ex(a,y){for(var x=0;x<=a.Ra;x++)for(;Zx(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;Wx(a,x););a.normalize();var b;if(0<y)for(x=0;x<=a.Ra;x++){var E=au(a),z=U0(a);for(b=z+1;z<b;){b=z,tx(a,x,1);var te=U0(a);te>z?tc(a,E):te<z&&(z=te,E=au(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(E=au(a),z=U0(a),b=z+1;z<b;)b=z,tx(a,x,-1),te=U0(a),te>z?tc(a,E):te<z&&(z=te,E=au(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&&(My(a,y,a.le,-1,!0,!0),a.le++);var z;for(y=[],z=0;z<a.le*a.le;z++)y[z]=!1;for(E=[],z=0;z<(a.Ia+1)*(a.Ra+1);z++)E[z]=-1;for(b.reset();b.next();){z=b.value;for(var te=z.layer,re=Math.max(0,z.column-a.nodeMinColumnSpace(z,!0)),oe=Math.min(a.Ra,z.column+a.nodeMinColumnSpace(z,!1));re<=oe;re++)E[te*(a.Ra+1)+re]=z.component}for(z=0;z<=a.Ia;z++){if(0<x)for(te=0;te<a.Ra;te++)E[z*(a.Ra+1)+te]!==-1&&E[z*(a.Ra+1)+te+1]!==-1&&E[z*(a.Ra+1)+te]!==E[z*(a.Ra+1)+te+1]&&(y[E[z*(a.Ra+1)+te]*a.le+E[z*(a.Ra+1)+te+1]]=!0);if(0>x)for(te=a.Ra;0<te;te--)E[z*(a.Ra+1)+te]!==-1&&E[z*(a.Ra+1)+te-1]!==-1&&E[z*(a.Ra+1)+te]!==E[z*(a.Ra+1)+te-1]&&(y[E[z*(a.Ra+1)+te]*a.le+E[z*(a.Ra+1)+te-1]]=!0)}for(E=[],z=0;z<a.le;z++)E[z]=!0;for(te=[],te.push(0);te.length!==0;)if(oe=te[te.length-1],te.pop(),E[oe])for(E[oe]=!1,z=0;z<a.le;z++)y[oe*a.le+z]&&te.splice(0,0,z);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 Gx(a){for(var y=mn(),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 _n,$x(y,x);var z=null,te=null,re=null,oe=null,le=(a.ve&1)!==0,ue=(a.ve&2)!==0,me=(a.ve&4)!==0,we=(a.ve&8)!==0;for(le&&(a.verticalAlignment(y,x,!0),z=X0(a,y,!0,!1)),y.reverse(),me&&(a.verticalAlignment(y,x,!1),re=X0(a,y,!1,!1)),b=Ri(y),E=b.next();!E.done;E=b.next())E.value.reverse();we&&(a.verticalAlignment(y,x,!1),oe=X0(a,y,!1,!0)),y.reverse(),ue&&(a.verticalAlignment(y,x,!0),te=X0(a,y,!0,!0)),Wn(y),a.u(z,te,re,oe),a.network.vertexes.each(function(Me){var Te=mn();le&&Te.push(z.get(Me)),ue&&Te.push(te.get(Me)),me&&Te.push(re.get(Me)),we&&Te.push(oe.get(Me)),Te.sort(function(ct,nt){return ct-nt});var je=Te.length;je=(Te[Math.floor((je-1)/2)]+Te[Math.ceil((je-1)/2)])/2,Wn(Te),Me.zc=je})}function $x(a,y){for(var x=a.length,b=1;b<x-1;b++)for(var E=0,z=0,te=a[b],re=a[b+1],oe=0;z<re.length;oe++){var le=re[oe];e:{if(le.node===null){var ue=Oy(le);if(0<ue.length){ue=ue[0].node===null;break e}}ue=!1}var me=ue;if(oe===re.length-1||me){for(ue=te.length-1,me&&(ue=Oy(le)[0].index);z<=oe;){if(le=re[z],!le.bo){me=[];for(var we=Ri(le.sourceEdgesArrayAccess),Me=we.next();!Me.done;Me=we.next())Me=Me.value,Me.valid&&me.push(Me);le.bo=me}for(le=Ri(le.bo),me=le.next();!me.done;me=le.next())me=me.value,we=me.fromVertex.index,(we<E||we>ue)&&y.add(me);z++}E=ue}}}ea.prototype.verticalAlignment=function(a,y,x){Kx(a),a=Ri(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=Ri(b.value);for(var z=b.next();!z.done;z=b.next()){z=z.value;var te=x?Oy(z):_x(z),re=te.length;if(0<re){te.sort(function(me,we){return me.vi-we.vi});var oe=(re-1)/2;for(re=Math.floor(oe),oe=Math.ceil(oe);re<=oe;re++)if(z.align===z){var le=te[re],ue=void 0;ue=x?tv(le,z):tv(z,le),!y.contains(ue)&&E<le.vi&&(le.align=z,z.root=le.root,z.align=le.root,E=le.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 X0(a,y,x,b){for(var E=a.K===90||a.K===270,z=Ri(y),te=z.next();!te.done;te=z.next()){var re=Ri(te.value);for(te=re.next();!te.done;te=re.next())te=te.value,te.sd=te,te.shift=1/0,te.zc=NaN,te.qg=0}for(te=a.K===90||a.K===270,z=Ri(y),re=z.next();!re.done;re=z.next()){re=Ri(re.value);for(var oe=re.next();!oe.done;oe=re.next())if(oe=oe.value,oe.root===oe){for(var le=0,ue=oe;ue.align!==oe;){var me=ue.align,we=te?ue.width:ue.height,Me=te?me.width:me.height;if(x){var Te=tv(ue,me),je=Te.portFromPos,ct=Te.portToPos;Te.link!==null&&(ue.node&&ue.node!==Te.link.fromNode&&(je=te?ue.focusX:ue.focusY),me.node&&me.node!==Te.link.toNode&&(ct=te?me.focusX:me.focusY))}else Te=tv(me,ue),je=Te.portToPos,ct=Te.portFromPos,Te.link!==null&&(ue.node&&ue.node!==Te.link.toNode&&(je=te?ue.focusX:ue.focusY),me.node&&me.node!==Te.link.fromNode&&(ct=te?me.focusX:me.focusY));we=b?ue.qg+(we-je)-(Me-ct):ue.qg+je-ct,me.qg=we,le=Math.min(le,we),ue=ue.align}ue=oe;do ue.qg=ue.qg-le,ue=ue.align;while(ue!==oe)}}for(x=Ri(y),te=x.next();!te.done;te=x.next())for(z=Ri(te.value),te=z.next();!te.done;te=z.next())te=te.value,te.root===te&&nx(a,te,y);for(x=0;x<y.length;x++)if(!(0>=y[x].length)&&(te=y[x][0],te.sd===te)){te.sd.shift===1/0&&(te.sd.shift=0),te=x,re=0;do{for(z=y[te][re];z.align!==z.root;)z=z.align,te++,0<z.vi&&(re=ix(z,y),re.sd.shift=Math.min(re.sd.shift,z.sd.shift+z.zc+z.qg-(re.zc+re.qg+(E?re.width:re.height)+a.columnSpacing)));re=z.vi+1}while(te<y.length&&re<y[te].length&&z.sd===y[te][re].sd)}for(a=new Ii,y=Ri(y),te=y.next();!te.done;te=y.next())for(x=Ri(te.value),te=x.next();!te.done;te=x.next())te=te.value,te.zc=te.zc+te.sd.shift+te.qg,z=E?te.width:te.height,a.add(te,b?-te.zc-z:te.zc);return a}function nx(a,y,x){if(isNaN(y.zc)){y.zc=0;var b=y;do{if(0<b.vi){var E=ix(b,x),z=E.root;nx(a,z,x),y.sd===y&&(y.sd=z.sd);var te=a.K===90||a.K===270?E.width:E.height;y.sd===z.sd&&(y.zc=Math.max(y.zc,z.zc+E.qg+te-b.qg+a.columnSpacing))}b=b.align}while(b!==y);for(;b.align!==y;)b=b.align,b.zc=y.zc,b.sd=y.sd}}function ix(a,y){var x=a.Tz;return a=a.vi,1>a&&St("Could not determine previous vertex in layer"),y[x][a-1]}ea.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var b=mn(),E=mn(),z=1/0,te=0;4>te;te++)if(y[te]){var re=Vx(this,y[te],b,E,te);re<z&&(x=te,z=re)}for(z={},te=0;4>te;z={delta:z.delta},te++)y[te]&&(z.delta=te===0||te===2?b[x]-b[te]:E[x]-E[te],z.delta!==0&&y[te].each(function(oe){return function(le){le.value+=oe.delta}}(z)));Wn(b),Wn(E)};function Vx(a,y,x,b,E){if(!y||y.count===0)return x[E]=0,b[E]=0,1/0;var z=1/0,te=-1/0;return y.each(function(re){var oe=re.key;re=re.value,oe=a.K===90||a.K===270?oe.width:oe.height,re<z&&(z=re),re+oe>te&&(te=re+oe)}),x[E]=z,b[E]=te,te-z}ea.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=Y0(this,!0),y=Y0(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 Y0(a,y){return a.K===270?y?Ua:vs:a.K===90?y?vs:Ua:a.K===180?y?ss:xs:y?xs:ss}ea.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 z=1/0,te=E=1/0,re=-1/0;a.next();){var oe=a.value,le=oe.layer,ue=oe.column|0;b?(te=y.x+this.kc*ue,le=this.Kd[le]):(te=this.Kd[le],le=y.y+this.kc*ue),oe.centerX=te,oe.centerY=le,x&&isFinite(oe.zc)&&(b?oe.node?oe.x=y.x+oe.zc:oe.centerX=y.x+oe.zc:oe.node?oe.y=y.y+oe.zc:oe.centerY=y.y+oe.zc),z=Math.min(oe.x,z),E=Math.min(oe.y,E),b?(te=z,re=Math.max(re,oe.bounds.right)):(te=E,re=Math.max(re,oe.bounds.bottom))}for(this.xw=re-te,z=y.x-z,y=y.y-E,this.Rf=new tt(x&&b?0:z,x&&!b?0:y),a.reset();a.next();)x=a.value,x.x+=z,x.y+=y,x.commit()},ea.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 Ut(0,0,x,Math.abs(this.Ta[0]))):y.push(new Ut(0,this.Ta[b-1],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===90?b===0?y.push(new Ut(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new Ut(0,this.Ta[b],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===180?b===0?y.push(new Ut(0,0,Math.abs(this.Ta[0]),x)):y.push(new Ut(this.Ta[b-1],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x)):b===0?y.push(new Ut(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new Ut(this.Ta[b],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x));this.commitLayers(y,this.Rf)},ea.prototype.commitLayers=function(){},ea.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,z=b.toNode,te=b.fromPort,re=b.toPort;if(E!==null){var oe=E.findVisibleNode();oe!==null&&oe!==E&&(E=oe,te=oe.port)}z!==null&&(oe=z.findVisibleNode(),oe!==null&&oe!==z&&(z=oe,re=oe.port));var le=y.computeSpot(!0,te);oe=y.computeSpot(!1,re);var ue=x.fromVertex,me=x.toVertex;if(x.valid)y.curve===$u&&y.pointsCount===4&&(ue.column===me.column&&this.alignOption===0?(x=y.getLinkPoint(E,te,le,!0,!1,z,re),re=y.getLinkPoint(z,re,oe,!1,!1,E,te),x.w()||x.set(E.actualBounds.center),re.w()||re.set(z.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+re.x)/3,(2*x.y+re.y)/3),y.yf((x.x+2*re.x)/3,(x.y+2*re.y)/3),y.yf(re.x,re.y)):(x=b=!1,te!==null&&le===La&&(b=!0),re!==null&&oe===La&&(x=!0),(b||x)&&(oe=null,b&&(oe=y.getLinkPointFromPoint(E,te,te.ga(wo),y.i(3),!0),oe.w()||oe.set(E.actualBounds.center),y.L(0,oe.x,oe.y)),E=null,x&&(E=y.getLinkPointFromPoint(z,re,re.ga(wo),y.i(0),!1),E.w()||E.set(z.actualBounds.center),y.L(3,E.x,E.y)),oe&&(z=y.i(2),y.L(1,(2*oe.x+z.x)/3,(2*oe.y+z.y)/3)),E&&(z=y.i(1),y.L(2,(2*E.x+z.x)/3,(2*E.y+z.y)/3))))),y.zf();else if(ue.layer===me.layer)y.zf();else{var we=!1,Me=!1,Te=this.ie,je=y.firstPickIndex+1;if(y.isOrthogonal){Me=!0;var ct=y.pointsCount;4<ct&&y.points.removeRange(2,ct-3)}else if(y.curve===$u)we=!0,ct=y.pointsCount,4<ct&&y.points.removeRange(2,ct-3),ct===4&&(je=2);else{ct=y.pointsCount;var nt=le===La,bt=oe===La;2<ct&&nt&&bt?y.points.removeRange(1,ct-2):3<ct&&nt&&!bt?y.points.removeRange(1,ct-3):3<ct&&!nt&&bt?y.points.removeRange(2,ct-2):4<ct&&!nt&&!bt&&y.points.removeRange(2,ct-3)}if(x.rev){for(;me!==null&&ue!==me;){var Nt=ct=null;for(nt=me.sourceEdges.iterator;nt.next()&&(bt=nt.value,bt.link!==x.link||(ct=bt.fromVertex,Nt=bt.toVertex,ct.node!==null)););if(ct===null)break;if(ct!==ue){nt=y.i(je-1).x,bt=y.i(je-1).y;var Ot=ct.centerX,Xt=ct.centerY;if(Me)this.K===180||this.K===0?je===y.firstPickIndex+1?(y.m(je++,nt,bt),y.m(je++,nt,Xt)):(Nt!==null?Nt.centerY:bt)!==Xt&&(Nt=this.Ta[ct.layer-1]+this.Rf.x,y.m(je++,Nt,bt),y.m(je++,Nt,Xt)):je===y.firstPickIndex+1?(y.m(je++,nt,bt),y.m(je++,Ot,bt)):(Nt!==null?Nt.centerX:nt)!==Ot&&(Nt=this.Ta[ct.layer-1]+this.Rf.y,y.m(je++,nt,Nt),y.m(je++,Ot,Nt));else if(je===y.firstPickIndex+1){Nt=Math.max(10,this.he[me.layer]);var gn=Math.max(10,this.Ld[me.layer]);if(we)this.K===180?Ot<=me.bounds.x?(me=me.bounds.x,y.m(je++,me-Nt,Xt),y.m(je++,me,Xt),y.m(je++,me+gn,Xt)):(y.m(je++,Ot-Nt,Xt),y.m(je++,Ot,Xt),y.m(je++,Ot+gn,Xt)):this.K===90?Xt>=me.bounds.bottom?(me=me.bounds.y+me.bounds.height,y.m(je++,Ot,me+gn),y.m(je++,Ot,me),y.m(je++,Ot,me-Nt)):(y.m(je++,Ot,Xt+gn),y.m(je++,Ot,Xt),y.m(je++,Ot,Xt-Nt)):this.K===270?Xt<=me.bounds.y?(me=me.bounds.y,y.m(je++,Ot,me-Nt),y.m(je++,Ot,me),y.m(je++,Ot,me+gn)):(y.m(je++,Ot,Xt-Nt),y.m(je++,Ot,Xt),y.m(je++,Ot,Xt+gn)):this.K===0&&(Ot>=me.bounds.right?(me=me.bounds.x+me.bounds.width,y.m(je++,me+gn,Xt),y.m(je++,me,Xt),y.m(je++,me-Nt,Xt)):(y.m(je++,Ot+gn,Xt),y.m(je++,Ot,Xt),y.m(je++,Ot-Nt,Xt)));else{y.m(je++,nt,bt);var Fi=0;this.K===180||this.K===0?((this.K===180?Ot>=me.bounds.right:Ot<=me.bounds.x)&&(Fi=(this.K===0?-Nt:gn)/2),y.m(je++,nt+Fi,Xt)):((this.K===270?Xt>=me.bounds.bottom:Xt<=me.bounds.y)&&(Fi=(this.K===90?-Nt:gn)/2),y.m(je++,Ot,bt+Fi)),y.m(je++,Ot,Xt)}}else Nt=Math.max(10,this.he[ct.layer]),gn=Math.max(10,this.Ld[ct.layer]),we?this.K===180?(y.m(je++,Ot-Nt-Te,Xt),y.m(je++,Math.min(Ot-Nt+Te/2,Ot),Xt),y.m(je++,Ot,Xt),y.m(je++,Ot,Xt),y.m(je++,Math.max(Ot+gn-Te/2,Ot),Xt),y.m(je++,Ot+gn+Te,Xt)):this.K===90?(y.m(je++,Ot,Xt+gn+Te),y.m(je++,Ot,Math.max(Xt+gn-Te/2,Xt)),y.m(je++,Ot,Xt),y.m(je++,Ot,Xt),y.m(je++,Ot,Math.min(Xt-Nt+Te/2,Xt)),y.m(je++,Ot,Xt-Nt-Te)):this.K===270?(y.m(je++,Ot,Xt-Nt-Te),y.m(je++,Ot,Math.min(Xt-Nt+Te/2,Xt)),y.m(je++,Ot,Xt),y.m(je++,Ot,Xt),y.m(je++,Ot,Math.max(Xt+gn-Te/2,Xt)),y.m(je++,Ot,Xt+gn+Te)):(y.m(je++,Ot+gn+Te,Xt),y.m(je++,Math.max(Ot+gn-Te/2,Ot),Xt),y.m(je++,Ot,Xt),y.m(je++,Ot,Xt),y.m(je++,Math.min(Ot-Nt+Te/2,Ot),Xt),y.m(je++,Ot-Nt-Te,Xt)):y.m(je++,Ot,Xt)}me=ct}(re===null||le!==La||Me)&&(nt=y.i(je-1).x,bt=y.i(je-1).y,Ot=y.i(je).x,Xt=y.i(je).y,Me?(Te=this.Ld[ue.layer],this.K===180||this.K===0?(Me=bt,Me>=ue.bounds.y&&Me<=ue.bounds.bottom&&(this.K===180?Ot>=ue.bounds.x:Ot<=ue.bounds.right)&&(me=ue.centerX+(this.K===180?-Te:Te),Me<ue.bounds.y+ue.bounds.height/2?Me=ue.bounds.y-this.kc/2:Me=ue.bounds.bottom+this.kc/2,y.m(je++,me,bt),y.m(je++,me,Me)),y.m(je++,Ot,Me)):(Me=nt,Me>=ue.bounds.x&&Me<=ue.bounds.right&&(this.K===270?Xt>=ue.bounds.y:Xt<=ue.bounds.bottom)&&(me=ue.centerY+(this.K===270?-Te:Te),Me<ue.bounds.x+ue.bounds.width/2?Me=ue.bounds.x-this.kc/2:Me=ue.bounds.right+this.kc/2,y.m(je++,nt,me),y.m(je++,Me,me)),y.m(je++,Me,Xt)),y.m(je++,Ot,Xt)):we?(Nt=Math.max(10,this.he[ue.layer]),gn=Math.max(10,this.Ld[ue.layer]),this.K===180&&Ot>=ue.bounds.x?(me=ue.bounds.x+ue.bounds.width,y.L(je-2,me,bt),y.L(je-1,me+gn,bt)):this.K===90&&Xt<=ue.bounds.bottom?(me=ue.bounds.y,y.L(je-2,nt,me),y.L(je-1,nt,me-Nt)):this.K===270&&Xt>=ue.bounds.y?(me=ue.bounds.y+ue.bounds.height,y.L(je-2,nt,me),y.L(je-1,nt,me+gn)):this.K===0&&Ot<=ue.bounds.right&&(me=ue.bounds.x,y.L(je-2,me,bt),y.L(je-1,me-Nt,bt))):(Nt=Math.max(10,this.he[ue.layer]),gn=Math.max(10,this.Ld[ue.layer]),Me=0,this.K===180||this.K===0?((this.K===180?Ot<=ue.bounds.x:Ot>=ue.bounds.right)&&(Me=(this.K===0?gn:-Nt)/2),y.m(je++,Ot+Me,bt)):((this.K===270?Xt<=ue.bounds.y:Xt>=ue.bounds.bottom)&&(Me=(this.K===90?gn:-Nt)/2),y.m(je++,nt,Xt+Me)),y.m(je++,Ot,Xt)))}else{for(;ue!==null&&ue!==me;){for(Nt=ct=null,ue=ue.destinationEdges.iterator;ue.next()&&(nt=ue.value,nt.link!==x.link||(ct=nt.toVertex,Nt=nt.fromVertex,Nt.node!==null&&(Nt=null),ct.node!==null)););if(ct===null)break;ct!==me&&(nt=y.i(je-1).x,bt=y.i(je-1).y,Ot=ct.centerX,Xt=ct.centerY,Me?this.K===180||this.K===0?(Nt!==null?Nt.centerY:bt)!==Xt&&(Nt=this.Ta[ct.layer]+this.Rf.x,je===y.firstPickIndex+1&&(Nt=this.K===0?Math.max(Nt,nt):Math.min(Nt,nt)),y.m(je++,Nt,bt),y.m(je++,Nt,Xt)):(Nt!==null?Nt.centerX:nt)!==Ot&&(Nt=this.Ta[ct.layer]+this.Rf.y,je===y.firstPickIndex+1&&(Nt=this.K===90?Math.max(Nt,bt):Math.min(Nt,bt)),y.m(je++,nt,Nt),y.m(je++,Ot,Nt)):(Nt=Math.max(10,this.he[ct.layer]),gn=Math.max(10,this.Ld[ct.layer]),we?this.K===180?(y.m(je++,Ot+gn+Te,Xt),y.m(je++,Math.max(Ot+gn-Te/2,Ot),Xt),y.m(je++,Ot,Xt),y.m(je++,Ot,Xt),y.m(je++,Math.min(Ot-Nt+Te/2,Ot),Xt),y.m(je++,Ot-Nt-Te,Xt)):this.K===90?(y.m(je++,Ot,Xt-Nt-Te),y.m(je++,Ot,Math.min(Xt-Nt+Te/2,Xt)),y.m(je++,Ot,Xt),y.m(je++,Ot,Xt),y.m(je++,Ot,Math.max(Xt+gn-Te/2,Xt)),y.m(je++,Ot,Xt+gn+Te)):this.K===270?(y.m(je++,Ot,Xt+gn+Te),y.m(je++,Ot,Math.max(Xt+gn-Te/2,Xt)),y.m(je++,Ot,Xt),y.m(je++,Ot,Xt),y.m(je++,Ot,Math.min(Xt-Nt+Te/2,Xt)),y.m(je++,Ot,Xt-Nt-Te)):(y.m(je++,Ot-Nt-Te,Xt),y.m(je++,Math.min(Ot-Nt+Te/2,Ot),Xt),y.m(je++,Ot,Xt),y.m(je++,Ot,Xt),y.m(je++,Math.max(Ot+gn-Te/2,Ot),Xt),y.m(je++,Ot+gn+Te,Xt)):this.K===180?(y.m(je++,Ot+gn,Xt),y.m(je++,Ot-Nt,Xt)):this.K===90?(y.m(je++,Ot,Xt-Nt),y.m(je++,Ot,Xt+gn)):this.K===270?(y.m(je++,Ot,Xt+gn),y.m(je++,Ot,Xt-Nt)):(y.m(je++,Ot-Nt,Xt),y.m(je++,Ot+gn,Xt)))),ue=ct}Me&&(nt=y.i(je-1).x,bt=y.i(je-1).y,Ot=y.i(je).x,Xt=y.i(je).y,this.K===180||this.K===0?bt!==Xt&&(Nt=this.K===0?Math.min(Math.max((Ot+nt)/2,this.Ta[me.layer]+this.Rf.x),Ot):Math.max(Math.min((Ot+nt)/2,this.Ta[me.layer]+this.Rf.x),Ot),y.m(je++,Nt,bt),y.m(je++,Nt,Xt)):nt!==Ot&&(Nt=this.K===90?Math.min(Math.max((Xt+bt)/2,this.Ta[me.layer]+this.Rf.y),Xt):Math.max(Math.min((Xt+bt)/2,this.Ta[me.layer]+this.Rf.y),Xt),y.m(je++,nt,Nt),y.m(je++,Ot,Nt)))}b!==null&&we&&4<=y.pointsCount&&(te!==null&&(te=le===La?y.getLinkPointFromPoint(E,te,te.ga(wo),y.i(3),!0):y.i(0),le===La&&(le=y.i(2),b=y.i(3),this.direction===90||this.direction===270?(y.L(1,(te.x+le.x)/2,le.y),y.L(2,b.x,(le.y+b.y)/2)):(y.L(1,le.x,(te.y+le.y)/2),y.L(2,(le.x+b.x)/2,b.y))),te.w()||te.set(E.actualBounds.center),y.L(0,te.x,te.y)),re!==null&&(E=oe===La?y.getLinkPointFromPoint(z,re,re.ga(wo),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),oe===La&&(re=y.i(y.pointsCount-3),oe=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(E.x+re.x)/2,re.y),y.L(y.pointsCount-2,oe.x,(re.y+oe.y)/2)):(y.L(y.pointsCount-2,re.x,(E.y+re.y)/2),y.L(y.pointsCount-3,(re.x+oe.x)/2,oe.y))),E.w()||E.set(z.actualBounds.center),y.L(y.pointsCount-1,E.x,E.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},ea.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new kn,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 z=b.i(E),te=b.i(E+1);if(this.B(z.y,te.y)&&!this.B(z.x,te.x)){var re=new Lf;re.layer=Math.floor(z.y/2);var oe=b.i(0),le=b.i(b.pointsCount-1);if(re.first=oe.x*oe.x+oe.y,re.jc=le.x*le.x+le.y,re.rd=Math.min(z.x,te.x),re.Ic=Math.max(z.x,te.x),re.index=E,re.link=b,E+2<b.pointsCount){oe=b.i(E-1),le=b.i(E+2);var ue=0;oe.y<z.y?ue=le.y<z.y?3:z.x<te.x?2:1:oe.y>z.y&&(ue=le.y>z.y?0:te.x<z.x?2:1),re.j=ue}x.push(re)}}}if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,b=a+1;b<x.length&&x[b].layer===z;)b++;if(1<b-a)for(z=a;z<b;){for(te=x[z].Ic,E=a+1;E<b&&x[E].rd<te;)te=Math.max(te,x[E].Ic),E++;if(te=E-z,1<te){for(this.zi(x,this.Js,z,z+te),ue=1,re=x[z].jc,oe=z;oe<E;oe++)le=x[oe],le.jc!==re&&(ue++,re=le.jc);this.zi(x,this.Ux,z,z+te);var me=1;for(re=x[z].first,oe=z;oe<E;oe++)le=x[oe],le.first!==re&&(me++,re=le.first);for(oe=!0,le=me,ue<me?(oe=!1,le=ue,re=x[z].jc,this.zi(x,this.Js,z,z+te)):re=x[z].first,ue=0,me=z;me<E;me++){var we=x[me];(oe?we.first:we.jc)!==re&&(ue++,re=oe?we.first:we.jc);var Me=we.link;z=Me.i(we.index),te=Me.i(we.index+1);var Te=this.linkSpacing*(ue-(le-1)/2);y++,Me.uh(),Me.L(we.index,z.x,z.y+Te),Me.L(we.index+1,te.x,te.y+Te),Me.zf()}}z=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++)z=b.i(E),te=b.i(E+1),this.B(z.x,te.x)&&!this.B(z.y,te.y)&&(re=new Lf,re.layer=Math.floor(z.x/2),oe=b.i(0),le=b.i(b.pointsCount-1),re.first=oe.x+oe.y*oe.y,re.jc=le.x+le.y*le.y,re.rd=Math.min(z.y,te.y),re.Ic=Math.max(z.y,te.y),re.index=E,re.link=b,E+2<b.pointsCount&&(oe=b.i(E-1),le=b.i(E+2),ue=0,oe.x<z.x?ue=le.x<z.x?3:z.y<te.y?2:1:oe.x>z.x&&(ue=le.x>z.x?0:te.y<z.y?2:1),re.j=ue),x.push(re));if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,b=a+1;b<x.length&&x[b].layer===z;)b++;if(1<b-a)for(z=a;z<b;){for(te=x[z].Ic,E=a+1;E<b&&x[E].rd<te;)te=Math.max(te,x[E].Ic),E++;if(te=E-z,1<te){for(this.zi(x,this.Js,z,z+te),ue=1,re=x[z].jc,oe=z;oe<E;oe++)le=x[oe],le.jc!==re&&(ue++,re=le.jc);for(this.zi(x,this.Ux,z,z+te),me=1,re=x[z].first,oe=z;oe<E;oe++)le=x[oe],le.first!==re&&(me++,re=le.first);for(oe=!0,le=me,ue<me?(oe=!1,le=ue,re=x[z].jc,this.zi(x,this.Js,z,z+te)):re=x[z].first,ue=0,me=z;me<E;me++)we=x[me],(oe?we.first:we.jc)!==re&&(ue++,re=oe?we.first:we.jc),Me=we.link,z=Me.i(we.index),te=Me.i(we.index+1),Te=this.linkSpacing*(ue-(le-1)/2),y++,Me.uh(),Me.L(we.index,z.x+Te,z.y),Me.L(we.index+1,te.x+Te,te.y),Me.zf()}z=E}a=b}}}},Le=ea.prototype,Le.Vx=function(a,y){return a instanceof Lf&&y instanceof Lf&&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},Le.Ux=function(a,y){return a instanceof Lf&&y instanceof Lf&&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},Le.Js=function(a,y){return a instanceof Lf&&y instanceof Lf&&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},Le.B=function(a,y){return a-=y,-1<a&&1>a},Le.zi=function(a,y,x,b){var E=a.length,z=b-x;if(!(1>=z))if((0>x||x>=E-1)&&St("not in range 0 <= from < length: "+x),z===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 Ef(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 Mf(a,y,x){a.He[a.tc[y]]=x}Je.Object.defineProperties(ea.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()):St("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==Fy&&a!==J0&&a!==Cm||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==Q0&&a!==Ay&&a!==Dy||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==q0&&a!==By&&a!==Ty||(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!==ky&&a!==ev&&a!==Iy||(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 J0=new ln(ea,"CycleDepthFirst",0),Fy=new ln(ea,"CycleGreedy",1),Cm=new ln(ea,"CycleFromLayers",2),Q0=new ln(ea,"LayerOptimalLinkLength",0),Ay=new ln(ea,"LayerLongestPathSink",1),Dy=new ln(ea,"LayerLongestPathSource",2),q0=new ln(ea,"InitDepthFirstOut",0),By=new ln(ea,"InitDepthFirstIn",1),Ty=new ln(ea,"InitNaive",2),ky=new ln(ea,"AggressiveNone",0),ev=new ln(ea,"AggressiveLess",1),Iy=new ln(ea,"AggressiveMore",2),Ux=8;ea.className="LayeredDigraphLayout",ea.CycleDepthFirst=J0,ea.CycleGreedy=Fy,ea.CycleFromLayers=Cm,ea.LayerOptimalLinkLength=Q0,ea.LayerLongestPathSink=Ay,ea.LayerLongestPathSource=Dy,ea.InitDepthFirstOut=q0,ea.InitDepthFirstIn=By,ea.InitNaive=Ty,ea.AggressiveNone=ky,ea.AggressiveLess=ev,ea.AggressiveMore=Iy,ea.PackNone=0,ea.PackExpand=1,ea.PackStraighten=2,ea.PackMedian=4,ea.PackAll=15,ea.AlignNone=0,ea.AlignUpperLeft=1,ea.AlignUpperRight=2,ea.AlignLowerLeft=4,ea.AlignLowerRight=8,ea.AlignAll=15;function Lf(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}Lf.className="SegInfo";function Np(a){ca.call(this,a)}$t(Np,ca),Np.prototype.createVertex=function(){return new nc(this)},Np.prototype.createEdge=function(){return new bm(this)},Np.className="LayeredDigraphNetwork";function nc(a){Ms.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}$t(nc,Ms);function rx(a,y){return a.index-y.index}function tv(a,y){if(!a.$n){for(var x=[],b=Ri(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=Ri(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;St("Unable to find destination edge to given vertex")}function Oy(a){if(!a.co){for(var y=[],x=Ri(a.sourceEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.fromVertex);y.sort(rx),a.co=y}return a.co}function _x(a){if(!a.ao){for(var y=[],x=Ri(a.destinationEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.toVertex);y.sort(rx),a.ao=y}return a.ao}nc.prototype.Cl=function(a){Ms.prototype.Cl.call(this,a),this.bo=this.co=null},nc.prototype.Kl=function(a){Ms.prototype.Kl.call(this,a),this.bo=this.co=null},nc.prototype.zl=function(a){Ms.prototype.zl.call(this,a),this.$n=this.ao=null},nc.prototype.Jl=function(a){Ms.prototype.Jl.call(this,a),this.$n=this.ao=null},Je.Object.defineProperties(nc.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)}}}),nc.prototype.deleteDestinationEdge=nc.prototype.Jl,nc.prototype.addDestinationEdge=nc.prototype.zl,nc.prototype.deleteSourceEdge=nc.prototype.Kl,nc.prototype.addSourceEdge=nc.prototype.Cl,nc.className="LayeredDigraphVertex";function bm(a){Tu.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}$t(bm,Tu),Je.Object.defineProperties(bm.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)}}}),bm.className="LayeredDigraphEdge";function fo(a){Ma.call(this),this.Ub=new _n,this.Wn=ov,this.ud=Zd,this.vo=sv,this.Bq=Uy,this.$v=[],this.td=!0,this.Rb=lv,this.$d=new fi(10,10).freeze();var y=new Gg(this);this.W=new gc(y),this.Y=new gc(y),this.ru=[],a&&Object.assign(this,a)}$t(fo,Ma),fo.prototype.cloneProtected=function(a){Ma.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)},fo.prototype.qb=function(a){a.classType===fo?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:St("Unknown enum value: "+a):Ma.prototype.qb.call(this,a)},fo.prototype.createNetwork=function(){return new Gg(this)},fo.prototype.makeNetwork=function(a){function y(b){if(b instanceof Di)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof vi){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 hn?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof Yr?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},fo.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==uv&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof hn&&(y=a),this.path===ov&&y!==null?this.ud=y.isTreePathToChildren?Zd:Zg:this.ud=this.path===ov?Zd: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 _n,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof Di?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof gc&&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,Ry(this,y));for(y=this.network.vertexes,a=null;a=Xx(y),0<a.count;)y=ox(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,Ry(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof gc&&sx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof gc&&lx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof gc&&ux(this,y);if(this.Cu(),this.layerStyle===cv){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 z=y.children[E];b=Math.max(b,x?z.width:z.height)}if(0<=b)for(E=0;E<y.children.length;E++)z=y.children[E],x?(y.angle===180&&(z.focusX+=b-z.width),z.width=b):(y.angle===270&&(z.focusY+=b-z.height),z.height=b)}for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof gc&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new _n,this.isValidLayout=!0};function Xx(a){var y=new _n;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}fo.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case Zd:x.sourceEdges.count===0&&this.Ub.add(x);break;case Zg:x.destinationEdges.count===0&&this.Ub.add(x);break;default:St("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 Zd:E.sourceEdges.count<x&&(x=E.sourceEdges.count,b=E);break;case Zg:E.destinationEdges.count<x&&(x=E.destinationEdges.count,b=E);break;default:St("Unhandled path value "+a.ud.toString())}}return b}function Ry(a,y){if(y!==null){switch(a.ud){case Zd:if(0<y.destinationEdges.count){for(var x=new kn,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 Zg:if(0<y.sourceEdges.count){for(x=new kn,b=y.sourceVertexes;b.next();)E=b.value,ax(a,y,E)&&x.add(E);0<x.count&&(y.children=x.Fa())}break;default:St("Unhandled path value"+a.ud.toString())}for(x=y.children,b=x.length,E=0;E<b;E++){var z=x[E];z.initialized=!0,z.level=y.level+1,z.parent=y,a.Ub.remove(z)}for(y=0;y<b;y++)Ry(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}fo.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 z=E=0;z<x.length;z++)x[z]!==y&&(b[E++]=x[z]);a.children=b}}};function sx(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===$d&&a.sortTreeVertexChildren(y);for(var x=0,b=y.childrenCount,E=0,z=y.children,te=z.length,re=0;re<te;re++){var oe=z[re];sx(a,oe),x+=oe.descendantCount+1,b=Math.max(b,oe.maxChildrenCount),E=Math.max(E,oe.maxGenerationCount)}y.descendantCount=x,y.maxChildrenCount=b,y.maxGenerationCount=0<b?E+1:0}}function Yx(a,y){switch(a.vo){default:case sv:return y.parent!==null?y.parent:a.W;case Ky:return y.parent===null?a.W:y.parent.parent===null?a.Y:y.parent;case $y:return y.parent!==null?y.parent.parent!==null?y.parent.parent:a.Y:a.W;case Gy:var x=!0;if(y.childrenCount===0)x=!1;else for(var b=y.children,E=b.length,z=0;z<E;z++)if(0<b[z].childrenCount){x=!1;break}return x&&y.parent!==null?a.Y:y.parent!==null?y.parent:a.W}}fo.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(Yx(this,a)),a.parent!==null&&a.parent.alignment===$d){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])}}fo.prototype.assignTreeVertexValues=function(){};function ux(a,y){if(y!==null){y.alignment!==$d&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,b=0;b<x;b++)ux(a,y[b])}}fo.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Fp:break;case Mm:a.children.reverse();break;case Lm:a.children.sort(a.comparer);break;case Nm:a.children.sort(a.comparer),a.children.reverse();break;default:St("Unhandled sorting value "+a.sorting.toString())}},fo.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},fo.prototype.addComments=function(a){var y=a.angle,x=a.parent,b=0,E=!1;x!==null&&(b=x.angle,E=x.alignment,E=Nf(E)),y=y===90||y===270,b=b===90||b===270,x=a.childrenCount===0;var z=0,te=0,re=0,oe=a.commentSpacing;if(a.node!==null)for(var le=a.node.Mu();le.next();){var ue=le.value;ue.category==="Comment"&&ue.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(ue),ue.Va(),ue=ue.measuredBounds,y&&!x||!E&&!b&&x||E&&b&&x?(z=Math.max(z,ue.width),te+=ue.height+Math.abs(re)):(z+=ue.width+Math.abs(re),te=Math.max(te,ue.height)),re=oe)}a.comments!==null&&(y&&!x||!E&&!b&&x||E&&b&&x?(z+=Math.abs(a.commentMargin),te=Math.max(0,te-a.height)):(te+=Math.abs(a.commentMargin),z=Math.max(0,z-a.width)),E=Ut.allocAt(0,0,a.bounds.width+z,a.bounds.height+te),a.bounds=E,Ut.free(E))};function Nf(a){return a===Uh||a===$d||a===_h||a===vh}function Em(a){return a===Uh||a===$d}function jy(a){var y=a.parent;if(y!==null){var x=y.alignment;if(Nf(x)){if(Em(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===_h)return!0}}return!1}fo.prototype.layoutComments=function(a){if(a.comments!==null){var y=a.node.measuredBounds,x=a.parent,b=a.angle,E=0,z=!1;x!==null&&(E=x.angle,z=x.alignment,z=Nf(z)),b=b===90||b===270,x=E===90||E===270;for(var te=a.childrenCount===0,re=jy(a),oe=0,le=a.comments,ue=le.length,me=tt.alloc(),we=0;we<ue;we++){var Me=le[we],Te=Me.measuredBounds;if(b&&!te||!z&&!x&&te||z&&x&&te){if(135<E&&!z||x&&re)if(0<=a.commentMargin)for(me.h(a.bounds.x-a.commentMargin-Te.width,a.bounds.y+oe),Me.move(me),Me=Me.Sd();Me.next();){var je=Me.value;je.fromSpot=ss,je.toSpot=xs}else for(me.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+oe),Me.move(me),Me=Me.Sd();Me.next();)je=Me.value,je.fromSpot=xs,je.toSpot=ss;else if(0<=a.commentMargin)for(me.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+oe),Me.move(me),Me=Me.Sd();Me.next();)je=Me.value,je.fromSpot=xs,je.toSpot=ss;else for(me.h(a.bounds.x+a.commentMargin-Te.width,a.bounds.y+oe),Me.move(me),Me=Me.Sd();Me.next();)je=Me.value,je.fromSpot=ss,je.toSpot=xs;oe=0<=a.commentSpacing?oe+(Te.height+a.commentSpacing):oe+(a.commentSpacing-Te.height)}else{if(135<E&&!z||!x&&re)if(0<=a.commentMargin)for(me.h(a.bounds.x+oe,a.bounds.y-a.commentMargin-Te.height),Me.move(me),Me=Me.Sd();Me.next();)je=Me.value,je.fromSpot=Ua,je.toSpot=vs;else for(me.h(a.bounds.x+oe,a.bounds.y+2*a.focus.y-a.commentMargin),Me.move(me),Me=Me.Sd();Me.next();)je=Me.value,je.fromSpot=vs,je.toSpot=Ua;else if(0<=a.commentMargin)for(me.h(a.bounds.x+oe,a.bounds.y+2*a.focus.y+a.commentMargin),Me.move(me),Me=Me.Sd();Me.next();)je=Me.value,je.fromSpot=vs,je.toSpot=Ua;else for(me.h(a.bounds.x+oe,a.bounds.y+a.commentMargin-Te.height),Me.move(me),Me=Me.Sd();Me.next();)je=Me.value,je.fromSpot=Ua,je.toSpot=vs;oe=0<=a.commentSpacing?oe+(Te.width+a.commentSpacing):oe+(a.commentSpacing-Te.width)}}if(tt.free(me),y=oe-a.commentSpacing-(b?y.height:y.width),this.ud===Zd)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)}},fo.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 av:cx(this,a);break;case Fm:if(a.alignment===$d)cx(this,a);else if(a.childrenCount===0)b=a.parent,x=!1,y=0,b!==null&&(y=b.angle,x=b.alignment,x=Nf(x)),b=jy(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=Dc(a);y=E===90||E===270;var z=0,te=a.children,re=te.length;for(x=0;x<re;x++)b=te[x],z=Math.max(z,y?b.Da.width:b.Da.height);var oe=a.alignment;b=oe===Wd;var le=oe===Gd,ue=Nf(oe),me=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var we=a.nodeSpacing,Me=this.computeNodeIndent(a),Te=a.rowSpacing,je=0;(b||le||a.hm||a.im&&a.maxGenerationCount===1)&&(je=Math.max(0,a.rowIndent)),b=a.width;var ct=a.height,nt=0,bt=0,Nt=0,Ot=null,Xt=null,gn=0,Fi=0,_i=0,zi=0,mi=0,ti=0,Ur=0,Dr=0;if(ue&&!Em(oe)&&135<E&&te.reverse(),Em(oe))if(1<re)for(var Ko=0;Ko<re;Ko++)Ko%2===0&&Ko!==re-1&&(Dr=Math.max(Dr,y?te[Ko].Da.width:te[Ko].Da.height));else re===1&&(Dr=y?te[0].Da.width:te[0].Da.height);if(ue){switch(oe){case Uh:bt=135>E?dx(this,a,te,Dr,nt,bt):hx(this,a,te,Dr,nt,bt),Dr=bt.x,nt=bt.width,bt=bt.height;break;case _h:for(Ot=0;Ot<re;Ot++)Xt=te[Ot],me=Xt.Da,Nt=ti===0?0:Te,y?(Xt.S.h(z-me.width,zi+Nt),nt=Math.max(nt,me.width),bt=Math.max(bt,zi+Nt+me.height),zi+=Nt+me.height):(Xt.S.h(_i+Nt,z-me.height),nt=Math.max(nt,_i+Nt+me.width),bt=Math.max(bt,me.height),_i+=Nt+me.width),ti++;break;case vh:for(Ot=0;Ot<re;Ot++)Xt=te[Ot],z=Xt.Da,me=ti===0?0:Te,y?(Xt.S.h(we/2+a.focus.x,zi+me),nt=Math.max(nt,z.width),bt=Math.max(bt,zi+me+z.height),zi+=me+z.height):(Xt.S.h(_i+me,we/2+a.focus.y),nt=Math.max(nt,_i+me+z.width),bt=Math.max(bt,z.height),_i+=me+z.width),ti++}Ot=xu(this,2),Xt=xu(this,2),y?(Ot[0].h(0,0),Ot[1].h(0,bt),Xt[0].h(nt,0)):(Ot[0].h(0,0),Ot[1].h(nt,0),Xt[0].h(0,bt)),Xt[1].h(nt,bt)}else for(Ko=0;Ko<re;Ko++){var la=te[Ko],Rs=la.Da;if(y){0<me&&0<ti&&_i+we+Rs.width>me&&(_i<z&&ig(a,oe,z-_i,0,Ur,Ko-1),mi++,ti=0,Ur=Ko,Nt=bt,_i=0,zi=135<E?-bt-Te:bt+Te),iv(this,la,0,zi);var Vs=0;if(ti===0)Ot=la.Yo,Xt=la.kp,gn=Rs.width,Fi=Rs.height,(Ot===null||Xt===null||E!==Dc(la))&&(Ot=xu(this,2),Xt=xu(this,2),Ot[0].h(0,0),Ot[1].h(0,Fi),Xt[0].h(gn,0),Xt[1].h(gn,Fi));else{var Dl=mn();Fi=fx(this,a,la,Ot,Xt,gn,Fi,Dl),Vs=Fi.x,Ot=Dl[0],Xt=Dl[1],gn=Fi.width,Fi=Fi.height,Wn(Dl),_i<Rs.width&&0>Vs&&(Hg(a,-Vs,0,Ur,Ko-1),rv(Ot,-Vs,0),rv(Xt,-Vs,0),Vs=0)}la.S.h(Vs,zi),nt=Math.max(nt,gn),bt=Math.max(bt,Nt+(mi===0?0:Te)+Rs.height),_i=gn}else 0<me&&0<ti&&zi+we+Rs.height>me&&(zi<z&&ig(a,oe,0,z-zi,Ur,Ko-1),mi++,ti=0,Ur=Ko,Nt=nt,zi=0,_i=135<E?-nt-Te:nt+Te),iv(this,la,_i,0),Vs=0,ti===0?(Ot=la.Yo,Xt=la.kp,gn=Rs.width,Fi=Rs.height,(Ot===null||Xt===null||E!==Dc(la))&&(Ot=xu(this,2),Xt=xu(this,2),Ot[0].h(0,0),Ot[1].h(gn,0),Xt[0].h(0,Fi),Xt[1].h(gn,Fi))):(Dl=mn(),Fi=fx(this,a,la,Ot,Xt,gn,Fi,Dl),Vs=Fi.x,Ot=Dl[0],Xt=Dl[1],gn=Fi.width,Fi=Fi.height,Wn(Dl),zi<Rs.height&&0>Vs&&(Hg(a,0,-Vs,Ur,Ko-1),rv(Ot,0,-Vs),rv(Xt,0,-Vs),Vs=0)),la.S.h(_i,Vs),bt=Math.max(bt,Fi),nt=Math.max(nt,Nt+(mi===0?0:Te)+Rs.width),zi=Fi;ti++}switch(0<mi&&(y?(bt+=Math.max(0,x),_i<nt&&ig(a,oe,nt-_i,0,Ur,re-1),0<je&&(le||Hg(a,je,0,0,re-1),nt+=je)):(nt+=Math.max(0,x),zi<bt&&ig(a,oe,0,bt-zi,Ur,re-1),0<je&&(le||Hg(a,0,je,0,re-1),bt+=je))),je=le=0,oe){case Ap:y?le+=nt/2-a.focus.x-Me/2:je+=bt/2-a.focus.y-Me/2;break;case Wg:0<mi?y?le+=nt/2-a.focus.x-Me/2:je+=bt/2-a.focus.y-Me/2:y?(Dr=te[0].S.x+te[0].la.x,le+=Dr+(te[re-1].S.x+te[re-1].la.x+2*te[re-1].focus.x-Dr)/2-a.focus.x-Me/2):(Dr=te[0].S.y+te[0].la.y,je+=Dr+(te[re-1].S.y+te[re-1].la.y+2*te[re-1].focus.y-Dr)/2-a.focus.y-Me/2);break;case Wd:y?(le-=Me,nt+=Me):(je-=Me,bt+=Me);break;case Gd:y?(le+=nt-a.width+Me,nt+=Me):(je+=bt-a.height+Me,bt+=Me);break;case Uh:y?1<re?le+=Dr+we/2-a.focus.x:le+=te[0].focus.x-a.focus.x+te[0].la.x:1<re?je+=Dr+we/2-a.focus.y:je+=te[0].focus.y-a.focus.y+te[0].la.y;break;case _h:y?le+=nt+we/2-a.focus.x:je+=bt+we/2-a.focus.y;break;case vh:break;default:bt=this.customAlignment(a,le,je,nt,bt),le=bt[0],je=bt[1],nt=bt[2],bt=bt[3]}for(Me=0;Me<re;Me++)Dr=te[Me],y?Dr.S.h(Dr.S.x+Dr.la.x-le,Dr.S.y+(135<E?(ue?-bt:-Dr.Da.height)+Dr.la.y-x:ct+x+Dr.la.y)):Dr.S.h(Dr.S.x+(135<E?(ue?-nt:-Dr.Da.width)+Dr.la.x-x:b+x+Dr.la.x),Dr.S.y+Dr.la.y-je);if(re=te=0,ue?y?(nt=zy(a,nt,le),0>le&&(le=0),135<E&&(je+=bt+x),bt+=ct+x,oe===vh&&(te+=we/2+a.focus.x),re+=ct+x):(135<E&&(le+=nt+x),nt+=b+x,bt=Hy(a,bt,je),0>je&&(je=0),oe===vh&&(re+=we/2+a.focus.y),te+=b+x):y?(a.comments===null?b>nt&&(nt=Zy(oe,b-nt,0),te=nt.x,re=nt.y,nt=b,le=0):nt=zy(a,nt,le),0>le&&(te-=le,le=0),135<E&&(je+=bt+x),bt=Math.max(Math.max(bt,ct),bt+ct+x),re+=ct+x):(135<E&&(le+=nt+x),nt=Math.max(Math.max(nt,b),nt+b+x),a.comments===null?ct>bt&&(bt=Zy(oe,0,ct-bt),te=bt.x,re=bt.y,bt=ct,je=0):bt=Hy(a,bt,je),0>je&&(re-=je,je=0),te+=b+x),0<mi)E=xu(this,4),mi=xu(this,4),y?(E[2].h(0,ct+x),E[3].h(E[2].x,bt),mi[2].h(nt,E[2].y),mi[3].h(mi[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(nt,E[2].y),mi[2].h(E[2].x,bt),mi[3].h(E[3].x,mi[2].y));else{for(E=xu(this,Ot.length+2),mi=xu(this,Xt.length+2),oe=0;oe<Ot.length;oe++)ue=Ot[oe],E[oe+2].h(ue.x+te,ue.y+re);for(oe=0;oe<Xt.length;oe++)ue=Xt[oe],mi[oe+2].h(ue.x+te,ue.y+re)}y?(E[0].h(le,0),E[1].h(E[0].x,ct),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])),mi[0].h(le+b,0),mi[1].h(mi[0].x,ct),mi[2].y<mi[1].y&&(mi[2].x<mi[0].x?mi[2].assign(mi[1]):mi[1].assign(mi[2])),mi[3].y<mi[2].y&&(mi[3].x<mi[0].x?mi[3].assign(mi[2]):mi[2].assign(mi[3])),E[2].y-=x/2,mi[2].y-=x/2):(E[0].h(0,je),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])),mi[0].h(0,je+ct),mi[1].h(b,mi[0].y),mi[2].x<mi[1].x&&(mi[2].y<mi[0].y?mi[2].assign(mi[1]):mi[1].assign(mi[2])),mi[3].x<mi[2].x&&(mi[3].y<mi[0].y?mi[3].assign(mi[2]):mi[2].assign(mi[3])),E[2].x-=x/2,mi[2].x-=x/2),Xc(this,Ot),Xc(this,Xt),a.Yo=E,a.kp=mi,a.la.h(le,je),a.Da.h(nt,bt)}break;default:St("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=Nf(x));var E=jy(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=Dc(y),x=b===90||b===270;var z=0;E=y.children;for(var te=E.length,re=0;re<te;re++){var oe=E[re];z=Math.max(z,x?oe.Da.width:oe.Da.height)}var le=y.alignment,ue=le===Wd,me=le===Gd;re=Nf(le);var we=Math.max(0,y.breadthLimit);oe=a.computeLayerSpacing(y);var Me=y.nodeSpacing,Te=a.computeNodeIndent(y),je=ue||me?0:Te/2,ct=y.rowSpacing,nt=0;(ue||me||y.hm||y.im&&y.maxGenerationCount===1)&&(nt=Math.max(0,y.rowIndent)),ue=y.width;var bt=y.height,Nt=0,Ot=0,Xt=0,gn=0,Fi=0,_i=0,zi=0,mi=0,ti=0,Ur=0;if(re&&!Em(le)&&135<b&&E.reverse(),Em(le))if(1<te)for(var Dr=0;Dr<te;Dr++){var Ko=E[Dr],la=Ko.Da;Dr%2===0&&Dr!==te-1?ti=Math.max(ti,(x?la.width:la.height)+a.computeBusNodeSpacing(Ko)-Me):Dr%2!==0&&(Ur=Math.max(Ur,(x?la.width:la.height)+a.computeBusNodeSpacing(Ko)-Me))}else te===1&&(ti=x?E[0].Da.width:E[0].Da.height);if(re)switch(le){case Uh:case $d:Ot=135>b?dx(a,y,E,ti,Nt,Ot):hx(a,y,E,ti,Nt,Ot),ti=Ot.x,Nt=Ot.width,Ot=Ot.height;break;case _h:for(we=0;we<te;we++)je=E[we],Xt=je.Da,Ur=zi===0?0:ct,x?(je.S.h(z-Xt.width,Fi+Ur),Nt=Math.max(Nt,Xt.width),Ot=Math.max(Ot,Fi+Ur+Xt.height),Fi+=Ur+Xt.height):(je.S.h(gn+Ur,z-Xt.height),Nt=Math.max(Nt,gn+Ur+Xt.width),Ot=Math.max(Ot,Xt.height),gn+=Ur+Xt.width),zi++;break;case vh:for(z=0;z<te;z++)we=E[z],je=we.Da,Xt=zi===0?0:ct,x?(we.S.h(Me/2+y.focus.x,Fi+Xt),Nt=Math.max(Nt,je.width),Ot=Math.max(Ot,Fi+Xt+je.height),Fi+=Xt+je.height):(we.S.h(gn+Xt,Me/2+y.focus.y),Nt=Math.max(Nt,gn+Xt+je.width),Ot=Math.max(Ot,je.height),gn+=Xt+je.width),zi++}else for(Ur=0;Ur<te;Ur++)Dr=E[Ur],Ko=Dr.Da,x?(0<we&&0<zi&&gn+Me+Ko.width>we&&(gn<z&&ig(y,le,z-gn,0,mi,Ur-1),_i++,zi=0,mi=Ur,Xt=Ot,gn=0,Fi=135<b?-Ot-ct:Ot+ct),la=zi===0?je:Me,iv(a,Dr,0,Fi),Dr.S.h(gn+la,Fi),Nt=Math.max(Nt,gn+la+Ko.width),Ot=Math.max(Ot,Xt+(_i===0?0:ct)+Ko.height),gn+=la+Ko.width):(0<we&&0<zi&&Fi+Me+Ko.height>we&&(Fi<z&&ig(y,le,0,z-Fi,mi,Ur-1),_i++,zi=0,mi=Ur,Xt=Nt,Fi=0,gn=135<b?-Nt-ct:Nt+ct),la=zi===0?je:Me,iv(a,Dr,gn,0),Dr.S.h(gn,Fi+la),Ot=Math.max(Ot,Fi+la+Ko.height),Nt=Math.max(Nt,Xt+(_i===0?0:ct)+Ko.width),Fi+=la+Ko.height),zi++;switch(0<_i&&(x?(Ot+=Math.max(0,oe),gn<Nt&&ig(y,le,Nt-gn,0,mi,te-1),0<nt&&(me||Hg(y,nt,0,0,te-1),Nt+=nt)):(Nt+=Math.max(0,oe),Fi<Ot&&ig(y,le,0,Ot-Fi,mi,te-1),0<nt&&(me||Hg(y,0,nt,0,te-1),Ot+=nt))),nt=me=0,le){case Ap:x?me+=Nt/2-y.focus.x-Te/2:nt+=Ot/2-y.focus.y-Te/2;break;case Wg:0<_i?x?me+=Nt/2-y.focus.x-Te/2:nt+=Ot/2-y.focus.y-Te/2:x?(a=E[0].S.x+E[0].la.x,me+=a+(E[te-1].S.x+E[te-1].la.x+2*E[te-1].focus.x-a)/2-y.focus.x-Te/2):(a=E[0].S.y+E[0].la.y,nt+=a+(E[te-1].S.y+E[te-1].la.y+2*E[te-1].focus.y-a)/2-y.focus.y-Te/2);break;case Wd:x?(me-=Te,Nt+=Te):(nt-=Te,Ot+=Te);break;case Gd:x?(me+=Nt-y.width+Te,Nt+=Te):(nt+=Ot-y.height+Te,Ot+=Te);break;case Uh:case $d:x?1<te?me+=ti+Me/2-y.focus.x:me+=E[0].focus.x-y.focus.x+E[0].la.x:1<te?nt+=ti+Me/2-y.focus.y:nt+=E[0].focus.y-y.focus.y+E[0].la.y;break;case _h:x?me+=Nt+Me/2-y.focus.x:nt+=Ot+Me/2-y.focus.y;break;case vh:break;default:a=a.customAlignment(y,me,nt,Nt,Ot),me=a[0],nt=a[1],Nt=a[2],Ot=a[3]}for(a=0;a<te;a++)Te=E[a],x?Te.S.h(Te.S.x+Te.la.x-me,Te.S.y+(135<b?(re?-Ot:-Te.Da.height)+Te.la.y-oe:bt+oe+Te.la.y)):Te.S.h(Te.S.x+(135<b?(re?-Nt:-Te.Da.width)+Te.la.x-oe:ue+oe+Te.la.x),Te.S.y+Te.la.y-nt);x?(Nt=zy(y,Nt,me),0>me&&(me=0),135<b&&(nt+=Ot+oe),Ot=Math.max(Math.max(Ot,bt),Ot+bt+oe)):(135<b&&(me+=Nt+oe),Nt=Math.max(Math.max(Nt,ue),Nt+ue+oe),Ot=Hy(y,Ot,nt),0>nt&&(nt=0)),y.la.h(me,nt),y.Da.h(Nt,Ot)}}fo.prototype.customAlignment=function(a,y,x,b,E){return[y,x,b,E]};function dx(a,y,x,b,E,z){var te=x.length;if(te===0)return new Ut(b,0,E,z);if(te===1)return y=x[0],E=y.Da.width,z=y.Da.height,new Ut(b,0,E,z);for(var re=y.nodeSpacing,oe=y.rowSpacing,le=Dc(y)===90,ue=0,me=0,we=0,Me=0;Me<te;Me++)if(!(Me%2!==0||1<te&&Me===te-1)){var Te=x[Me],je=Te.Da,ct=ue===0?0:oe;if(le){var nt=a.computeBusNodeSpacing(Te)-re;Te.S.h(b-(je.width+nt),we+ct),E=Math.max(E,je.width+nt),z=Math.max(z,we+ct+je.height),we+=ct+je.height}else nt=a.computeBusNodeSpacing(Te)-re,Te.S.h(me+ct,b-(je.height+nt)),z=Math.max(z,je.height+nt),E=Math.max(E,me+ct+je.width),me+=ct+je.width;ue++}for(ue=0,Te=me,Me=we,le?(me=b+re,we=0):(me=0,we=b+re),je=0;je<te;je++)if(je%2!==0){ct=x[je],nt=ct.Da;var bt=ue===0?0:oe;if(le){var Nt=a.computeBusNodeSpacing(ct)-re;ct.S.h(me+Nt,we+bt),E=Math.max(E,me+nt.width+Nt),z=Math.max(z,we+bt+nt.height),we+=bt+nt.height}else Nt=a.computeBusNodeSpacing(ct)-re,ct.S.h(me+bt,we+Nt),E=Math.max(E,me+bt+nt.width),z=Math.max(z,we+nt.height+Nt),me+=bt+nt.width;ue++}return 1<te&&te%2===1&&(x=x[te-1],te=x.Da,a=a.computeBusLastRowSpacing(x,le?Math.max(Math.abs(Me),Math.abs(we)):Math.max(Math.abs(Te),Math.abs(me))),le?(x.S.h(b+re/2-x.focus.x-x.la.x,z+a),le=b+re/2-x.focus.x-x.la.x,E=Math.max(E,le+te.width),0>le&&(E-=le),z=Math.max(z,Math.max(Me,we)+a+te.height),0>x.S.x&&(b=nv(y,x.S.x,!1,b,re))):(x.S.h(E+a,b+re/2-x.focus.y-x.la.y),E=Math.max(E,Math.max(Te,me)+a+te.width),we=b+re/2-x.focus.y-x.la.y,z=Math.max(z,we+te.height),0>we&&(z-=we),0>x.S.y&&(b=nv(y,x.S.y,!0,b,re)))),new Ut(b,0,E,z)}function hx(a,y,x,b,E,z){var te=x.length;if(te===0)return new Ut(b,0,E,z);if(te===1)return x=x[0],E=x.Da.width,z=x.Da.height,new Ut(b,0,E,z);for(var re=y.nodeSpacing,oe=y.rowSpacing,le=Dc(y)===270,ue=0,me=0,we=0,Me=0;Me<te;Me++)if(!(Me%2!==0||1<te&&Me===te-1)){var Te=x[Me],je=Te.Da,ct=ue===0?0:oe;if(le){var nt=a.computeBusNodeSpacing(Te)-re;we-=ct+je.height,Te.S.h(b-(je.width+nt),we),E=Math.max(E,je.width+nt),z=Math.max(z,Math.abs(we))}else nt=a.computeBusNodeSpacing(Te)-re,me-=ct+je.width,Te.S.h(me,b-(je.height+nt)),z=Math.max(z,je.height+nt),E=Math.max(E,Math.abs(me));ue++}for(ue=0,Te=me,Me=we,le?(me=b+re,we=0):(me=0,we=b+re),je=0;je<te;je++)if(je%2!==0){ct=x[je],nt=ct.Da;var bt=ue===0?0:oe;if(le){var Nt=a.computeBusNodeSpacing(ct)-re;we-=bt+nt.height,ct.S.h(me+Nt,we),E=Math.max(E,me+nt.width+Nt),z=Math.max(z,Math.abs(we))}else Nt=a.computeBusNodeSpacing(ct)-re,me-=bt+nt.width,ct.S.h(me,we+Nt),z=Math.max(z,we+nt.height+Nt),E=Math.max(E,Math.abs(me));ue++}for(1<te&&te%2===1&&(oe=x[te-1],ue=oe.Da,a=a.computeBusLastRowSpacing(oe,le?Math.max(Math.abs(Me),Math.abs(we)):Math.max(Math.abs(Te),Math.abs(me))),le?(oe.S.h(b+re/2-oe.focus.x-oe.la.x,-z-ue.height-a),me=b+re/2-oe.focus.x-oe.la.x,E=Math.max(E,me+ue.width),0>me&&(E-=me),z=Math.max(z,Math.abs(Math.min(Me,we))+a+ue.height),0>oe.S.x&&(b=nv(y,oe.S.x,!1,b,re))):(oe.S.h(-E-ue.width-a,b+re/2-oe.focus.y-oe.la.y),E=Math.max(E,Math.abs(Math.min(Te,me))+a+ue.width),we=b+re/2-oe.focus.y-oe.la.y,z=Math.max(z,we+ue.height),0>we&&(z-=we),0>oe.S.y&&(b=nv(y,oe.S.y,!0,b,re)))),y=0;y<te;y++)re=x[y],le?re.S.h(re.S.x,re.S.y+z):re.S.h(re.S.x+E,re.S.y);return new Ut(b,0,E,z)}fo.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},fo.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function nv(a,y,x,b,E){a=a.children;for(var z=a.length,te=0;te<z;te++)x?a[te].S.h(a[te].S.x,a[te].S.y-y):a[te].S.h(a[te].S.x-y,a[te].S.y);return y=a[z-1],Math.max(b,x?y.la.y+y.focus.y-E/2:y.la.x+y.focus.x-E/2)}function zy(a,y,x){switch(a.alignment){case Wg:case Ap:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case Wd:return a.width>y?a.width:y;case Gd:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case Uh:case $d:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case _h:return a.width-a.focus.x+a.nodeSpacing/2+y;case vh:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Hy(a,y,x){switch(a.alignment){case Wg:case Ap:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case Wd:return a.height>y?a.height:y;case Gd:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case Uh:case $d:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case _h:return a.height-a.focus.y+a.nodeSpacing/2+y;case vh:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function Zy(a,y,x){switch(a){case Ap:y/=2,x/=2;break;case Wg:y/=2,x/=2;break;case Wd:x=y=0;break;case Gd:break;default:St("Unhandled alignment value "+a.toString())}return new tt(y,x)}function ig(a,y,x,b,E,z){y=Zy(y,x,b),Hg(a,y.x,y.y,E,z)}function Hg(a,y,x,b,E){if(y!==0||x!==0)for(a=a.children;b<=E;b++){var z=a[b].S;z.x+=y,z.y+=x}}function iv(a,y,x,b){var E=y.parent;switch(a.ud){case Zd:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===E&&y.relativePoint.h(x,b);break;case Zg:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===E&&y.relativePoint.h(x,b);break;default:St("Unhandled path value "+a.ud.toString())}}function rv(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,z,te,re){var oe=Dc(y),le=oe===90||oe===270,ue=y.nodeSpacing;y=b;var me=E;b=z;var we=te,Me=x.Yo,Te=x.kp;te=x.Da;var je=le?Math.max(we,te.height):Math.max(b,te.width);if((Me===null||oe!==Dc(x))&&(Me=xu(a,2),Te=xu(a,2),le?(Me[0].h(0,0),Me[1].h(0,te.height),Te[0].h(te.width,0),Te[1].h(Te[0].x,Me[1].y)):(Me[0].h(0,0),Me[1].h(te.width,0),Te[0].h(0,te.height),Te[1].h(Me[1].x,Te[0].y))),le){if(we=9999999,!(me===null||2>me.length||Me===null||2>Me.length))for(E=x=0;x<me.length&&E<Me.length;){z=me[x];var ct=Me[E];oe=ct.x,le=ct.y,oe+=b;var nt=z;x+1<me.length&&(nt=me[x+1]);var bt=ct;ct=bt.x,bt=bt.y,E+1<Me.length&&(bt=Me[E+1],ct=bt.x,bt=bt.y,ct+=b);var Nt=we;z.y===le?Nt=oe-z.x:z.y>le&&z.y<bt?Nt=oe+(z.y-le)/(bt-le)*(ct-oe)-z.x:le>z.y&&le<nt.y&&(Nt=oe-(z.x+(le-z.y)/(nt.y-z.y)*(nt.x-z.x))),Nt<we&&(we=Nt),nt.y<=z.y?x++:bt<=le?E++:(nt.y<=bt&&x++,bt<=nt.y&&E++)}if(we=b-we,we+=ue,x=Me,E=we,y===null||2>y.length||x===null||2>x.length)b=null;else{for(ue=xu(a,y.length+x.length),b=z=oe=0;z<x.length&&x[z].y<y[0].y;)le=x[z++],ue[b++].h(le.x+E,le.y);for(;oe<y.length;)le=y[oe++],ue[b++].h(le.x,le.y);for(oe=y[y.length-1].y;z<x.length&&x[z].y<=oe;)z++;for(;z<x.length&&x[z].y>oe;)le=x[z++],ue[b++].h(le.x+E,le.y);for(x=xu(a,b),oe=0;oe<b;oe++)x[oe].assign(ue[oe]);Xc(a,ue),b=x}if(z=Te,oe=we,me===null||2>me.length||z===null||2>z.length)E=null;else{for(ue=xu(a,me.length+z.length),E=le=x=0;x<me.length&&me[x].y<z[0].y;)nt=me[x++],ue[E++].h(nt.x,nt.y);for(;le<z.length;)nt=z[le++],ue[E++].h(nt.x+oe,nt.y);for(z=z[z.length-1].y;x<me.length&&me[x].y<=z;)x++;for(;x<me.length&&me[x].y>z;)oe=me[x++],ue[E++].h(oe.x,oe.y);for(z=xu(a,E),x=0;x<E;x++)z[x].assign(ue[x]);Xc(a,ue),E=z}return z=Math.max(0,we)+te.width,te=je,Xc(a,y),Xc(a,Me),Xc(a,me),Xc(a,Te),re[0]=b,re[1]=E,new Ut(we,0,z,te)}if(b=9999999,!(me===null||2>me.length||Me===null||2>Me.length))for(E=x=0;x<me.length&&E<Me.length;)z=me[x],ct=Me[E],oe=ct.x,le=ct.y,le+=we,nt=z,x+1<me.length&&(nt=me[x+1]),bt=ct,ct=bt.x,bt=bt.y,E+1<Me.length&&(bt=Me[E+1],ct=bt.x,bt=bt.y,bt+=we),Nt=b,z.x===oe?Nt=le-z.y:z.x>oe&&z.x<ct?Nt=le+(z.x-oe)/(ct-oe)*(bt-le)-z.y:oe>z.x&&oe<nt.x&&(Nt=le-(z.y+(oe-z.x)/(nt.x-z.x)*(nt.y-z.y))),Nt<b&&(b=Nt),nt.x<=z.x?x++:ct<=oe?E++:(nt.x<=ct&&x++,ct<=nt.x&&E++);if(we-=b,we+=ue,x=Me,E=we,y===null||2>y.length||x===null||2>x.length)b=null;else{for(ue=xu(a,y.length+x.length),b=z=oe=0;z<x.length&&x[z].x<y[0].x;)le=x[z++],ue[b++].h(le.x,le.y+E);for(;oe<y.length;)le=y[oe++],ue[b++].h(le.x,le.y);for(oe=y[y.length-1].x;z<x.length&&x[z].x<=oe;)z++;for(;z<x.length&&x[z].x>oe;)le=x[z++],ue[b++].h(le.x,le.y+E);for(x=xu(a,b),oe=0;oe<b;oe++)x[oe].assign(ue[oe]);Xc(a,ue),b=x}if(z=Te,oe=we,me===null||2>me.length||z===null||2>z.length)E=null;else{for(ue=xu(a,me.length+z.length),E=le=x=0;x<me.length&&me[x].x<z[0].x;)nt=me[x++],ue[E++].h(nt.x,nt.y);for(;le<z.length;)nt=z[le++],ue[E++].h(nt.x,nt.y+oe);for(z=z[z.length-1].x;x<me.length&&me[x].x<=z;)x++;for(;x<me.length&&me[x].x>z;)oe=me[x++],ue[E++].h(oe.x,oe.y);for(z=xu(a,E),x=0;x<E;x++)z[x].assign(ue[x]);Xc(a,ue),E=z}return z=je,te=Math.max(0,we)+te.height,Xc(a,y),Xc(a,Me),Xc(a,me),Xc(a,Te),re[0]=b,re[1]=E,new Ut(we,0,z,te)}function xu(a,y){if(a=a.ru[y],a!==void 0&&(a=a.pop(),a!==void 0))return a;a=[];for(var x=0;x<y;x++)a[x]=new tt;return a}function Xc(a,y){var x=y.length,b=a.ru[x];b===void 0&&(b=[],a.ru[x]=b),b.push(y)}fo.prototype.arrangeTrees=function(){if(this.Rb===uv)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof gc){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),Wy(this,y,x,b)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof gc&&a.push(x);switch(this.sorting){case Fp:break;case Mm:a.reverse();break;case Lm:a.sort(this.comparer);break;case Nm:a.sort(this.comparer),a.reverse();break;default:St("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(Wy(this,E,y+E.la.x,x+E.la.y),this.Rb){case lv:x+=E.Da.height+this.$d.height;break;case Vy:y+=E.Da.width+this.$d.width;break;default:St("Unhandled arrangement value "+this.Rb.toString())}}}};function Wy(a,y,x,b){if(y!==null){y.x=x,y.y=b,y=y.children;for(var E=y.length,z=0;z<E;z++){var te=y[z];Wy(a,te,x+te.S.x,b+te.S.y)}}}fo.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},fo.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},fo.prototype.Gu=function(){if(this.layerStyle===cv){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 z=y[E.level];z===void 0?z=this.computeLayerSpacing(E):z=Math.max(z,this.computeLayerSpacing(E)),y[E.level]=z}for(b=0;b<y.length;b++)y[b]===void 0&&(y[b]=0);if(this.angle===90||this.angle===270?(x.Bc(this.nodeSpacing/2,this.layerSpacing),b=new tt(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),b=new tt(-this.layerSpacing/2,-this.nodeSpacing/2)),E=[],x=this.angle===90||this.angle===270?x.width:x.height,z=0,this.angle===180||this.angle===270)for(var te=0;te<a.length;te++)z+=a[te]+y[te];for(te=0;te<a.length;te++){var re=a[te]+y[te];this.angle===270?(z-=re,E.push(new Ut(0,z,x,re))):this.angle===90?(E.push(new Ut(0,z,x,re)),z+=re):this.angle===180?(z-=re,E.push(new Ut(z,0,re,x))):(E.push(new Ut(z,0,re,x)),z+=re)}this.commitLayers(E,b)}},fo.prototype.commitLayers=function(){},fo.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},fo.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof gc&&gx(this,y)}};function gx(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,b=0;b<x;b++)gx(a,y[b])}}fo.prototype.setPortSpots=function(a){var y=a.alignment;if(Nf(y)){var x=this.ud===Zd,b=Dc(a);switch(b){case 0:var E=xs;break;case 90:E=vs;break;case 180:E=ss;break;default:E=Ua}var z=a.children,te=z.length;switch(y){case Uh:case $d:for(y=0;y<te;y++){var re=z[y];if(re=(x?re.sourceEdges:re.destinationEdges).first(),re!==null&&(re=re.link,re!==null)){var oe=b===90||b===270?ss:Ua;if(te===1||y===te-1&&te%2===1)switch(b){case 0:oe=ss;break;case 90:oe=Ua;break;case 180:oe=xs;break;default:oe=vs}else y%2===0&&(oe=b===90||b===270?xs:vs);x?(a.setsPortSpot&&(re.fromSpot=E),a.setsChildPortSpot&&(re.toSpot=oe)):(a.setsPortSpot&&(re.fromSpot=oe),a.setsChildPortSpot&&(re.toSpot=E))}}break;case _h:for(b=b===90||b===270?xs:vs,z=x?a.destinationEdges:a.sourceEdges;z.next();)te=z.value.link,te!==null&&(x?(a.setsPortSpot&&(te.fromSpot=E),a.setsChildPortSpot&&(te.toSpot=b)):(a.setsPortSpot&&(te.fromSpot=b),a.setsChildPortSpot&&(te.toSpot=E)));break;case vh:for(b=b===90||b===270?ss:Ua,z=x?a.destinationEdges:a.sourceEdges;z.next();)te=z.value.link,te!==null&&(x?(a.setsPortSpot&&(te.fromSpot=E),a.setsChildPortSpot&&(te.toSpot=b)):(a.setsPortSpot&&(te.fromSpot=b),a.setsChildPortSpot&&(te.toSpot=E)))}}else if(x=Dc(a),this.ud===Zd){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=xs;break;case 90:b.fromSpot=vs;break;case 180:b.fromSpot=ss;break;default:b.fromSpot=Ua}else b.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.toSpot=ss;break;case 90:b.toSpot=Ua;break;case 180:b.toSpot=xs;break;default:b.toSpot=vs}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=xs;break;case 90:b.toSpot=vs;break;case 180:b.toSpot=ss;break;default:b.toSpot=Ua}else b.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.fromSpot=ss;break;case 90:b.fromSpot=Ua;break;case 180:b.fromSpot=xs;break;default:b.fromSpot=vs}else b.fromSpot=a.childPortSpot}};function Dc(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}fo.prototype.computeLayerSpacing=function(a){var y=Dc(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},fo.prototype.computeNodeIndent=function(a){var y=Dc(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)},Je.Object.defineProperties(fo.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!==sv&&a!==$y&&a!==Gy&&a!==Ky||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==Uy&&a!==_y&&a!==cv||(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!==lv&&a!==Vy&&a!==uv||(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!==Fp&&a!==Mm&&a!==Lm&&!Nm||(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()):St("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!==av&&a!==Fm||(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!==Fp&&a!==Mm&&a!==Lm&&!Nm||(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!==av&&a!==Fm||(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 ov=new ln(fo,"PathDefault",-1),Zd=new ln(fo,"PathDestination",0),Zg=new ln(fo,"PathSource",1),Fp=new ln(fo,"SortingForwards",10),Mm=new ln(fo,"SortingReverse",11),Lm=new ln(fo,"SortingAscending",12),Nm=new ln(fo,"SortingDescending",13),Ap=new ln(fo,"AlignmentCenterSubtrees",20),Wg=new ln(fo,"AlignmentCenterChildren",21),Wd=new ln(fo,"AlignmentStart",22),Gd=new ln(fo,"AlignmentEnd",23),Uh=new ln(fo,"AlignmentBus",24),$d=new ln(fo,"AlignmentBusBranching",25),_h=new ln(fo,"AlignmentTopLeftBus",26),vh=new ln(fo,"AlignmentBottomRightBus",27),av=new ln(fo,"CompactionNone",30),Fm=new ln(fo,"CompactionBlock",31),sv=new ln(fo,"StyleLayered",40),Gy=new ln(fo,"StyleLastParents",41),$y=new ln(fo,"StyleAlternating",42),Ky=new ln(fo,"StyleRootOnly",43),lv=new ln(fo,"ArrangementVertical",50),Vy=new ln(fo,"ArrangementHorizontal",51),uv=new ln(fo,"ArrangementFixedRoots",52),Uy=new ln(fo,"LayerIndividual",60),_y=new ln(fo,"LayerSiblings",61),cv=new ln(fo,"LayerUniform",62);fo.className="TreeLayout",fo.PathDefault=ov,fo.PathDestination=Zd,fo.PathSource=Zg,fo.SortingForwards=Fp,fo.SortingReverse=Mm,fo.SortingAscending=Lm,fo.SortingDescending=Nm,fo.AlignmentCenterSubtrees=Ap,fo.AlignmentCenterChildren=Wg,fo.AlignmentStart=Wd,fo.AlignmentEnd=Gd,fo.AlignmentBus=Uh,fo.AlignmentBusBranching=$d,fo.AlignmentTopLeftBus=_h,fo.AlignmentBottomRightBus=vh,fo.CompactionNone=av,fo.CompactionBlock=Fm,fo.StyleLayered=sv,fo.StyleLastParents=Gy,fo.StyleAlternating=$y,fo.StyleRootOnly=Ky,fo.ArrangementVertical=lv,fo.ArrangementHorizontal=Vy,fo.ArrangementFixedRoots=uv,fo.LayerIndividual=Uy,fo.LayerSiblings=_y,fo.LayerUniform=cv;function Gg(a){ca.call(this,a)}$t(Gg,ca),Gg.prototype.createVertex=function(){return new gc(this)},Gg.prototype.createEdge=function(){return new Dp(this)},Gg.className="TreeNetwork";function gc(a){Ms.call(this,a),this.V=!1,this.hb=null,this.u=[],this.nb=this.Ha=this.F=this.ia=0,this.td=null,this.S=new tt(0,0),this.Da=new fi(0,0),this.la=new tt(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Fp,this.hd=gy,this.Kb=0,this.Jb=Wg,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Fm,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=Vo,this.wr=!0,this.Dp=Vo}$t(gc,Ms),gc.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)},Je.Object.defineProperties(gc.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)}}}),gc.className="TreeVertex";function Dp(a){Tu.call(this,a),this.$t=new tt(0,0)}$t(Dp,Tu),Dp.prototype.commit=function(){var a=this.link;if(a!==null&&!a.isAvoiding){var y=this.network.layout,x=null,b=null;switch(y.ud){case Zd:x=this.fromVertex,b=this.toVertex;break;case Zg:x=this.toVertex,b=this.fromVertex;break;default:St("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 z=Dc(x),te=y.computeLayerSpacing(x),re=x.rowSpacing;a.vg();var oe=a.curve===$u,le=a.isOrthogonal,ue;if(a.uh(),le||oe){for(ue=2;4<a.pointsCount;)a.pv(2);var me=a.i(1),we=a.i(2)}else{for(ue=1;3<a.pointsCount;)a.pv(1);me=a.i(0),we=a.i(a.pointsCount-1)}var Me=a.i(a.pointsCount-1);z===0?(x.alignment===Gd?(z=b.bottom+E.y,E.y===0&&me.y>Me.y+x.rowIndent&&(z=Math.min(z,Math.max(me.y,z-y.computeNodeIndent(x))))):x.alignment===Wd?(z=b.top+E.y,E.y===0&&me.y<Me.y-x.rowIndent&&(z=Math.max(z,Math.min(me.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,oe?(a.m(ue,me.x,z),ue++,a.m(ue,b.right+te,z),ue++,a.m(ue,b.right+te+(E.x-re)/3,z),ue++,a.m(ue,b.right+te+2*(E.x-re)/3,z),ue++,a.m(ue,b.right+te+(E.x-re),z),ue++,a.m(ue,we.x,z)):(le&&(a.m(ue,b.right+te/2,me.y),ue++),a.m(ue,b.right+te/2,z),ue++,a.m(ue,b.right+te+E.x-(le?re/2:re),z),ue++,le&&a.m(ue,a.i(ue-1).x,we.y))):z===90?(x.alignment===Gd?(z=b.right+E.x,E.x===0&&me.x>Me.x+x.rowIndent&&(z=Math.min(z,Math.max(me.x,z-y.computeNodeIndent(x))))):x.alignment===Wd?(z=b.left+E.x,E.x===0&&me.x<Me.x-x.rowIndent&&(z=Math.max(z,Math.min(me.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,oe?(a.m(ue,z,me.y),ue++,a.m(ue,z,b.bottom+te),ue++,a.m(ue,z,b.bottom+te+(E.y-re)/3),ue++,a.m(ue,z,b.bottom+te+2*(E.y-re)/3),ue++,a.m(ue,z,b.bottom+te+(E.y-re)),ue++,a.m(ue,z,we.y)):(le&&(a.m(ue,me.x,b.bottom+te/2),ue++),a.m(ue,z,b.bottom+te/2),ue++,a.m(ue,z,b.bottom+te+E.y-(le?re/2:re)),ue++,le&&a.m(ue,we.x,a.i(ue-1).y))):z===180?(x.alignment===Gd?(z=b.bottom+E.y,E.y===0&&me.y>Me.y+x.rowIndent&&(z=Math.min(z,Math.max(me.y,z-y.computeNodeIndent(x))))):x.alignment===Wd?(z=b.top+E.y,E.y===0&&me.y<Me.y-x.rowIndent&&(z=Math.max(z,Math.min(me.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,oe?(a.m(ue,me.x,z),ue++,a.m(ue,b.left-te,z),ue++,a.m(ue,b.left-te+(E.x+re)/3,z),ue++,a.m(ue,b.left-te+2*(E.x+re)/3,z),ue++,a.m(ue,b.left-te+(E.x+re),z),ue++,a.m(ue,we.x,z)):(le&&(a.m(ue,b.left-te/2,me.y),ue++),a.m(ue,b.left-te/2,z),ue++,a.m(ue,b.left-te+E.x+(le?re/2:re),z),ue++,le&&a.m(ue,a.i(ue-1).x,we.y))):z===270?(x.alignment===Gd?(z=b.right+E.x,E.x===0&&me.x>Me.x+x.rowIndent&&(z=Math.min(z,Math.max(me.x,z-y.computeNodeIndent(x))))):x.alignment===Wd?(z=b.left+E.x,E.x===0&&me.x<Me.x-x.rowIndent&&(z=Math.max(z,Math.min(me.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,oe?(a.m(ue,z,me.y),ue++,a.m(ue,z,b.top-te),ue++,a.m(ue,z,b.top-te+(E.y+re)/3),ue++,a.m(ue,z,b.top-te+2*(E.y+re)/3),ue++,a.m(ue,z,b.top-te+(E.y+re)),ue++,a.m(ue,z,we.y)):(le&&(a.m(ue,me.x,b.top-te/2),ue++),a.m(ue,z,b.top-te/2),ue++,a.m(ue,z,b.top-te+E.y+(le?re/2:re)),ue++,le&&a.m(ue,we.x,a.i(ue-1).y))):St("Invalid angle "+z),a.zf()}else E=b,a=this.link,b=this.network.layout,y=Dc(x),y!==Dc(E)&&(te=b.computeLayerSpacing(x),re=x.bounds,x=E.bounds,y===0&&x.left-re.right<te+1||y===90&&x.top-re.bottom<te+1||y===180&&re.left-x.right<te+1||y===270&&re.top-x.bottom<te+1||(a.vg(),x=a.curve===$u,E=a.isOrthogonal,b=Nf(this.fromVertex.alignment),a.uh(),y===0?(y=re.right+te/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=re.bottom+te/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=re.left-te/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=re.top-te/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()))}}},Je.Object.defineProperties(Dp.prototype,{fromVertex:{get:function(){return this.kd},set:function(a){this.kd!==a&&(this.kd=a)}},toVertex:{get:function(){return this.qd},set:function(a){this.qd!==a&&(this.qd=a)}},relativePoint:{get:function(){return this.$t},set:function(a){this.$t.set(a)}}}),Dp.className="TreeEdge",fa.prototype.initializeStandardTools=function(){this.gb("Action",new _r,this.mouseDownTools),this.gb("Relinking",new ir,this.mouseDownTools),this.gb("LinkReshaping",new sr,this.mouseDownTools),this.gb("Rotating",new So,this.mouseDownTools),this.gb("Resizing",new $r,this.mouseDownTools),this.gb("Linking",new Ai,this.mouseMoveTools),this.gb("Dragging",new Fa,this.mouseMoveTools),this.gb("DragSelecting",new Xr,this.mouseMoveTools),this.gb("Panning",new Cr,this.mouseMoveTools),this.gb("ContextMenu",new Zo,this.mouseUpTools),this.gb("TextEditing",new Fo,this.mouseUpTools),this.gb("ClickCreating",new co,this.mouseUpTools),this.gb("ClickSelecting",new Xo,this.mouseUpTools)},gd("Horizontal",new zm),gd("Spot",new Zm),gd("Table",new Gm),gd("Viewbox",new Vm),gd("TableRow",new $m),gd("TableColumn",new Km),gd("Graduated",new Kp),gd("Grid",new $p),Uf.add("GraphLinksModel",Ks),Uf.add("TreeModel",ec);var dv=st.go,Xy={get licenseKey(){return hn.licenseKey},set licenseKey(a){hn.licenseKey=a},get version(){return hn.version},Group:Yr,EnumValue:ln,List:kn,Set:_n,Map:Ii,Point:tt,Size:fi,Rect:Ut,Margin:Oi,Spot:Vi,Geometry:xi,PathFigure:ys,PathSegment:To,InputEvent:nl,DiagramEvent:od,ChangedEvent:Pa,Model:or,GraphLinksModel:No,TreeModel:$l,Binding:fs,Transaction:Ps,UndoManager:Na,CommandHandler:lt,Tool:Do,DraggingTool:Fa,DraggingInfo:Zc,DraggingOptions:ae,LinkingBaseTool:bn,LinkingTool:Ai,RelinkingTool:ir,LinkReshapingTool:sr,ResizingTool:$r,RotatingTool:So,ClickSelectingTool:Xo,ActionTool:_r,ClickCreatingTool:co,HTMLInfo:oo,ContextMenuTool:Zo,DragSelectingTool:Xr,PanningTool:Cr,TextEditingTool:Fo,ToolManager:fa,Animation:za,AnimationManager:ka,AnimationTrigger:ql,Layer:Ca,Diagram:hn,Palette:fe,Overview:Se,Brush:Oo,GraphObject:Yt,Panel:hi,RowColumnDefinition:Cs,Shape:io,TextBlock:ua,Picture:ru,Part:pr,Adornment:jo,Node:Di,Link:vi,Placeholder:Hl,Layout:Ma,LayoutNetwork:ca,LayoutVertex:Ms,LayoutEdge:Tu,GridLayout:qs,PanelLayout:Es,CircularLayout:Ga,CircularNetwork:Mp,CircularVertex:Sm,CircularEdge:K0,ForceDirectedLayout:ml,ForceDirectedNetwork:zg,ForceDirectedVertex:xm,ForceDirectedEdge:Pm,LayeredDigraphLayout:ea,LayeredDigraphNetwork:Np,LayeredDigraphVertex:nc,LayeredDigraphEdge:bm,TreeLayout:fo,TreeNetwork:Gg,TreeVertex:gc,TreeEdge:Dp};typeof dv=="object"&&dv.version&&Si("WARNING: a `go` object on the root object is already defined. "+("Debug"in dv?"debug ":"")+"version: "+dv.version+", replaced with version: "+Xy.version),hn.prototype.go=Xy,st.go=Xy,typeof Vn.exports=="object"&&(Vn.exports=typeof pe.g!="undefined"?pe.g.go:self.go)}();var ge=typeof pe.g!="undefined"?pe.g.go:self.go;const Oe=typeof pe.g!="undefined"?pe.g.go:self.go,Ke=Oe.Group,ut=Oe.EnumValue,Ge=Oe.List,Xe=Oe.Set,Ne=Oe.Map,Tt=Oe.Point,Ct=Oe.Size,Ve=Oe.Rect,Lt=Oe.Margin,dt=Oe.Spot,Rt=Oe.Geometry,De=Oe.PathFigure,ne=Oe.PathSegment,ee=Oe.InputEvent,ce=Oe.DiagramEvent,se=Oe.ChangedEvent,he=Oe.Model,ve=Oe.GraphLinksModel,be=Oe.TreeModel,ke=Oe.Binding,Be=Oe.Transaction,He=Oe.UndoManager,We=Oe.CommandHandler,rt=Oe.Tool,Qe=Oe.DraggingTool,Pt=Oe.DraggingInfo,Ze=Oe.LinkingBaseTool,Et=Oe.LinkingTool,it=Oe.RelinkingTool,Dt=Oe.LinkReshapingTool,ht=Oe.ResizingTool,Ht=Oe.RotatingTool,_t=Oe.ClickSelectingTool,Vt=Oe.ActionTool,ot=Oe.ClickCreatingTool,Ue=Oe.HTMLInfo,Wt=Oe.ContextMenuTool,Ln=Oe.DragSelectingTool,Fn=Oe.PanningTool,Gt=Oe.TextEditingTool,rn=Oe.ToolManager,An=Oe.Animation,ni=Oe.AnimationManager,Sn=Oe.AnimationTrigger,Yn=Oe.Layer,It=Oe.Diagram,wn=Oe.Palette,Gn=Oe.Overview,ze=Oe.Brush,Ee=Oe.GraphObject,Pe=Oe.Panel,Fe=Oe.RowColumnDefinition,Ae=Oe.Shape,ye=Oe.TextBlock,qe=Oe.TextBlockMetrics,vt=Oe.Picture,et=Oe.Part,Ye=Oe.Adornment,xt=Oe.Node,yt=Oe.Link,at=Oe.Placeholder,zt=Oe.Layout,un=Oe.LayoutNetwork,fn=Oe.LayoutVertex,Qt=Oe.LayoutEdge,Kn=Oe.GridLayout,On=Oe.PanelLayout,jt=Oe.CircularLayout,sn=Oe.CircularNetwork,jn=Oe.CircularVertex,dn=Oe.CircularEdge,Pn=Oe.ForceDirectedLayout,ui=Oe.ForceDirectedNetwork,pi=Oe.ForceDirectedVertex,gi=Oe.ForceDirectedEdge,bi=Oe.LayeredDigraphLayout,Xi=Oe.LayeredDigraphNetwork,ar=Oe.LayeredDigraphVertex,Ji=Oe.LayeredDigraphEdge,wr=Oe.TreeLayout,mr=Oe.TreeNetwork,Hi=Oe.TreeVertex,Er=Oe.TreeEdge,$n=Oe.version},24334:function(Vn,xn,pe){var ge,Oe;(function(Ke,ut){Vn.exports=ut(Ke)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof pe.g!="undefined"?pe.g:this,function(Ke){"use strict";Ke=Ke||{};var ut=Ke.Base64,Ge="2.6.4",Xe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ne=function(it){for(var Dt={},ht=0,Ht=it.length;ht<Ht;ht++)Dt[it.charAt(ht)]=ht;return Dt}(Xe),Tt=String.fromCharCode,Ct=function(it){if(it.length<2){var Dt=it.charCodeAt(0);return Dt<128?it:Dt<2048?Tt(192|Dt>>>6)+Tt(128|Dt&63):Tt(224|Dt>>>12&15)+Tt(128|Dt>>>6&63)+Tt(128|Dt&63)}else{var Dt=65536+(it.charCodeAt(0)-55296)*1024+(it.charCodeAt(1)-56320);return Tt(240|Dt>>>18&7)+Tt(128|Dt>>>12&63)+Tt(128|Dt>>>6&63)+Tt(128|Dt&63)}},Ve=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Lt=function(it){return it.replace(Ve,Ct)},dt=function(it){var Dt=[0,2,1][it.length%3],ht=it.charCodeAt(0)<<16|(it.length>1?it.charCodeAt(1):0)<<8|(it.length>2?it.charCodeAt(2):0),Ht=[Xe.charAt(ht>>>18),Xe.charAt(ht>>>12&63),Dt>=2?"=":Xe.charAt(ht>>>6&63),Dt>=1?"=":Xe.charAt(ht&63)];return Ht.join("")},Rt=Ke.btoa&&typeof Ke.btoa=="function"?function(it){return Ke.btoa(it)}:function(it){if(it.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return it.replace(/[\s\S]{1,3}/g,dt)},De=function(it){return Rt(Lt(String(it)))},ne=function(it){return it.replace(/[+\/]/g,function(Dt){return Dt=="+"?"-":"_"}).replace(/=/g,"")},ee=function(it,Dt){return Dt?ne(De(it)):De(it)},ce=function(it){return ee(it,!0)},se;Ke.Uint8Array&&(se=function(it,Dt){for(var ht="",Ht=0,_t=it.length;Ht<_t;Ht+=3){var Vt=it[Ht],ot=it[Ht+1],Ue=it[Ht+2],Wt=Vt<<16|ot<<8|Ue;ht+=Xe.charAt(Wt>>>18)+Xe.charAt(Wt>>>12&63)+(typeof ot!="undefined"?Xe.charAt(Wt>>>6&63):"=")+(typeof Ue!="undefined"?Xe.charAt(Wt&63):"=")}return Dt?ne(ht):ht});var he=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ve=function(it){switch(it.length){case 4:var Dt=(7&it.charCodeAt(0))<<18|(63&it.charCodeAt(1))<<12|(63&it.charCodeAt(2))<<6|63&it.charCodeAt(3),ht=Dt-65536;return Tt((ht>>>10)+55296)+Tt((ht&1023)+56320);case 3:return Tt((15&it.charCodeAt(0))<<12|(63&it.charCodeAt(1))<<6|63&it.charCodeAt(2));default:return Tt((31&it.charCodeAt(0))<<6|63&it.charCodeAt(1))}},be=function(it){return it.replace(he,ve)},ke=function(it){var Dt=it.length,ht=Dt%4,Ht=(Dt>0?Ne[it.charAt(0)]<<18:0)|(Dt>1?Ne[it.charAt(1)]<<12:0)|(Dt>2?Ne[it.charAt(2)]<<6:0)|(Dt>3?Ne[it.charAt(3)]:0),_t=[Tt(Ht>>>16),Tt(Ht>>>8&255),Tt(Ht&255)];return _t.length-=[0,0,2,1][ht],_t.join("")},Be=Ke.atob&&typeof Ke.atob=="function"?function(it){return Ke.atob(it)}:function(it){return it.replace(/\S{1,4}/g,ke)},He=function(it){return Be(String(it).replace(/[^A-Za-z0-9\+\/]/g,""))},We=function(it){return be(Be(it))},rt=function(it){return String(it).replace(/[-_]/g,function(Dt){return Dt=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Qe=function(it){return We(rt(it))},Pt;Ke.Uint8Array&&(Pt=function(it){return Uint8Array.from(He(rt(it)),function(Dt){return Dt.charCodeAt(0)})});var Ze=function(){var it=Ke.Base64;return Ke.Base64=ut,it};if(Ke.Base64={VERSION:Ge,atob:He,btoa:Rt,fromBase64:Qe,toBase64:ee,utob:Lt,encode:ee,encodeURI:ce,btou:be,decode:Qe,noConflict:Ze,fromUint8Array:se,toUint8Array:Pt},typeof Object.defineProperty=="function"){var Et=function(it){return{value:it,enumerable:!1,writable:!0,configurable:!0}};Ke.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",Et(function(){return Qe(this)})),Object.defineProperty(String.prototype,"toBase64",Et(function(it){return ee(this,it)})),Object.defineProperty(String.prototype,"toBase64URI",Et(function(){return ee(this,!0)}))}}return Ke.Meteor&&(Base64=Ke.Base64),Vn.exports?Vn.exports.Base64=Ke.Base64:(ge=[],Oe=function(){return Ke.Base64}.apply(xn,ge),Oe!==void 0&&(Vn.exports=Oe)),{Base64:Ke.Base64}})},2859:function(Vn,xn,pe){"use strict";pe.d(xn,{hP:function(){return Gn}});var ge=function(ze,Ee){return(ge=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Pe,Fe){Pe.__proto__=Fe}||function(Pe,Fe){for(var Ae in Fe)Object.prototype.hasOwnProperty.call(Fe,Ae)&&(Pe[Ae]=Fe[Ae])})(ze,Ee)};function Oe(ze,Ee){function Pe(){this.constructor=ze}ge(ze,Ee),ze.prototype=Ee===null?Object.create(Ee):(Pe.prototype=Ee.prototype,new Pe)}function Ke(ze,Ee,Pe,Fe){return new(Pe||(Pe=Promise))(function(Ae,ye){function qe(Ye){try{et(Fe.next(Ye))}catch(xt){ye(xt)}}function vt(Ye){try{et(Fe.throw(Ye))}catch(xt){ye(xt)}}function et(Ye){var xt;Ye.done?Ae(Ye.value):(xt=Ye.value,xt instanceof Pe?xt:new Pe(function(yt){yt(xt)})).then(qe,vt)}et((Fe=Fe.apply(ze,Ee||[])).next())})}function ut(ze,Ee){var Pe,Fe,Ae,ye,qe={label:0,sent:function(){if(1&Ae[0])throw Ae[1];return Ae[1]},trys:[],ops:[]};return ye={next:vt(0),throw:vt(1),return:vt(2)},typeof Symbol=="function"&&(ye[Symbol.iterator]=function(){return this}),ye;function vt(et){return function(Ye){return function(xt){if(Pe)throw new TypeError("Generator is already executing.");for(;qe;)try{if(Pe=1,Fe&&(Ae=2&xt[0]?Fe.return:xt[0]?Fe.throw||((Ae=Fe.return)&&Ae.call(Fe),0):Fe.next)&&!(Ae=Ae.call(Fe,xt[1])).done)return Ae;switch(Fe=0,Ae&&(xt=[2&xt[0],Ae.value]),xt[0]){case 0:case 1:Ae=xt;break;case 4:return qe.label++,{value:xt[1],done:!1};case 5:qe.label++,Fe=xt[1],xt=[0];continue;case 7:xt=qe.ops.pop(),qe.trys.pop();continue;default:if(Ae=qe.trys,!((Ae=Ae.length>0&&Ae[Ae.length-1])||xt[0]!==6&&xt[0]!==2)){qe=0;continue}if(xt[0]===3&&(!Ae||xt[1]>Ae[0]&&xt[1]<Ae[3])){qe.label=xt[1];break}if(xt[0]===6&&qe.label<Ae[1]){qe.label=Ae[1],Ae=xt;break}if(Ae&&qe.label<Ae[2]){qe.label=Ae[2],qe.ops.push(xt);break}Ae[2]&&qe.ops.pop(),qe.trys.pop();continue}xt=Ee.call(ze,qe)}catch(yt){xt=[6,yt],Fe=0}finally{Pe=Ae=0}if(5&xt[0])throw xt[1];return{value:xt[0]?xt[1]:void 0,done:!0}}([et,Ye])}}}function Ge(){for(var ze=0,Ee=0,Pe=arguments.length;Ee<Pe;Ee++)ze+=arguments[Ee].length;var Fe=Array(ze),Ae=0;for(Ee=0;Ee<Pe;Ee++)for(var ye=arguments[Ee],qe=0,vt=ye.length;qe<vt;qe++,Ae++)Fe[Ae]=ye[qe];return Fe}var Xe=function(){function ze(){}return ze.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ze.setAttributes=function(Ee,Pe){for(var Fe=0,Ae=Pe;Fe<Ae.length;Fe++){var ye=Ae[Fe],qe=ye[0],vt=ye[1];Ee.setAttribute(qe,vt)}},ze.createRect=function(Ee,Pe,Fe){var Ae=document.createElementNS("http://www.w3.org/2000/svg","rect");return Ae.setAttribute("width",Ee.toString()),Ae.setAttribute("height",Pe.toString()),Fe&&ze.setAttributes(Ae,Fe),Ae},ze.createLine=function(Ee,Pe,Fe,Ae,ye){var qe=document.createElementNS("http://www.w3.org/2000/svg","line");return qe.setAttribute("x1",Ee.toString()),qe.setAttribute("y1",Pe.toString()),qe.setAttribute("x2",Fe.toString()),qe.setAttribute("y2",Ae.toString()),ye&&ze.setAttributes(qe,ye),qe},ze.createPolygon=function(Ee,Pe){var Fe=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Fe.setAttribute("points",Ee),Pe&&ze.setAttributes(Fe,Pe),Fe},ze.createCircle=function(Ee,Pe){var Fe=document.createElementNS("http://www.w3.org/2000/svg","circle");return Fe.setAttribute("cx",(Ee/2).toString()),Fe.setAttribute("cy",(Ee/2).toString()),Fe.setAttribute("r",Ee.toString()),Pe&&ze.setAttributes(Fe,Pe),Fe},ze.createEllipse=function(Ee,Pe,Fe){var Ae=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Ae.setAttribute("cx",(Ee/2).toString()),Ae.setAttribute("cy",(Pe/2).toString()),Ae.setAttribute("rx",(Ee/2).toString()),Ae.setAttribute("ry",(Pe/2).toString()),Fe&&ze.setAttributes(Ae,Fe),Ae},ze.createGroup=function(Ee){var Pe=document.createElementNS("http://www.w3.org/2000/svg","g");return Ee&&ze.setAttributes(Pe,Ee),Pe},ze.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ze.createMarker=function(Ee,Pe,Fe,Ae,ye,qe,vt){var et=document.createElementNS("http://www.w3.org/2000/svg","marker");return ze.setAttributes(et,[["id",Ee],["orient",Pe],["markerWidth",Fe.toString()],["markerHeight",Ae.toString()],["refX",ye.toString()],["refY",qe.toString()]]),et.appendChild(vt),et},ze.createText=function(Ee){var Pe=document.createElementNS("http://www.w3.org/2000/svg","text");return Pe.setAttribute("x","0"),Pe.setAttribute("y","0"),Ee&&ze.setAttributes(Pe,Ee),Pe},ze.createTSpan=function(Ee,Pe){var Fe=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Fe.textContent=Ee,Pe&&ze.setAttributes(Fe,Pe),Fe},ze.createImage=function(Ee){var Pe=document.createElementNS("http://www.w3.org/2000/svg","image");return Ee&&ze.setAttributes(Pe,Ee),Pe},ze.createPoint=function(Ee,Pe){var Fe=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Fe.x=Ee,Fe.y=Pe,Fe},ze.createPath=function(Ee,Pe){var Fe=document.createElementNS("http://www.w3.org/2000/svg","path");return Fe.setAttribute("d",Ee),Pe&&ze.setAttributes(Fe,Pe),Fe},ze}(),Ne=function(){function ze(){}return ze.addKey=function(Ee){ze.key=Ee},Object.defineProperty(ze,"isLicensed",{get:function(){return!!ze.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(ze.key)},enumerable:!1,configurable:!0}),ze}(),Tt=function(){function ze(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return ze.prototype.rasterize=function(Ee,Pe,Fe){var Ae=this;return new Promise(function(ye){var qe=Fe!==void 0?Fe:document.createElement("canvas");Ee===null&&(Ae.markersOnly=!0,Ae.naturalSize=!1);var vt=document.createElementNS("http://www.w3.org/2000/svg","svg");vt.setAttribute("xmlns","http://www.w3.org/2000/svg"),vt.setAttribute("width",Pe.width.baseVal.valueAsString),vt.setAttribute("height",Pe.height.baseVal.valueAsString),vt.setAttribute("viewBox","0 0 "+Pe.viewBox.baseVal.width.toString()+" "+Pe.viewBox.baseVal.height.toString()),vt.innerHTML=Pe.innerHTML,Ae.naturalSize===!0?(vt.width.baseVal.value=Ee.naturalWidth,vt.height.baseVal.value=Ee.naturalHeight):Ae.width!==void 0&&Ae.height!==void 0&&(vt.width.baseVal.value=Ae.width,vt.height.baseVal.value=Ae.height),qe.width=vt.width.baseVal.value,qe.height=vt.height.baseVal.value;var et=vt.outerHTML,Ye=qe.getContext("2d");Ae.markersOnly!==!0&&Ye.drawImage(Ee,0,0,qe.width,qe.height);var xt=window.URL,yt=new Image(qe.width,qe.height);yt.setAttribute("crossOrigin","anonymous");var at=new Blob([et],{type:"image/svg+xml"}),zt=xt.createObjectURL(at);yt.onload=function(){Ye.drawImage(yt,0,0),xt.revokeObjectURL(zt);var un=qe.toDataURL(Ae.imageType,Ae.imageQuality);ye(un)},yt.src=zt})},ze}(),Ct=function(){},Ve=function(){function ze(Ee){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+Ee+"_"}return Object.defineProperty(ze.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(ze.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(ze.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),ze.prototype.addClass=function(Ee){return this.styleSheet===void 0&&this.addStyleSheet(),Ee.name=""+this.classNamePrefix+Ee.localName,this.classes.push(Ee),this.styleSheet.sheet.insertRule("."+Ee.name+" {"+Ee.style+"}",this.styleSheet.sheet.cssRules.length),Ee},ze.prototype.addRule=function(Ee){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(Ee),this.styleSheet.sheet.insertRule(Ee.selector+" {"+Ee.style+"}",this.styleSheet.sheet.cssRules.length)},ze.prototype.addStyleSheet=function(){var Ee;this.styleSheet=document.createElement("style"),((Ee=this.styleSheetRoot)!==null&&Ee!==void 0?Ee:document.head).appendChild(this.styleSheet),this.addRule(new Lt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Lt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new Lt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new dt("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new dt("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},ze.prototype.removeStyleSheet=function(){var Ee;this.styleSheet&&(((Ee=this.styleSheetRoot)!==null&&Ee!==void 0?Ee:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ze}(),Lt=function(ze,Ee){this.selector=ze,this.style=Ee},dt=function(ze,Ee){this.localName=ze,this.style=Ee},Rt=function(){function ze(Ee,Pe,Fe,Ae,ye){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=Ee,this.displayMode=Pe,this.markerItems=Fe,this.uiStyleSettings=Ae,this.styles=ye,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return ze.prototype.show=function(Ee){var Pe=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Ee,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Fe=document.createElement("div");Fe.className=this.toolbarBlockStyleClass.name,Fe.style.whiteSpace="nowrap",this.uiContainer.appendChild(Fe),this.addActionButton(Fe,'<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(Fe,'<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(Fe,'<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(Fe,'<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(Fe,'<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(Fe,'<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(Fe,'<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(Fe,'<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(ye){var qe=document.createElement("div");qe.className=""+Pe.toolbarButtonStyleClass.name,qe.setAttribute("data-type-name",ye.typeName),qe.innerHTML=ye.icon,qe.addEventListener("click",function(){Pe.markerToolbarButtonClicked(qe,ye)}),Pe.buttons.push(qe),Pe.markerButtons.push(qe)}),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 Ae=document.createElement("div");Ae.className=this.toolbarBlockStyleClass.name,Ae.style.whiteSpace="nowrap",Ae.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Ae),this.addActionButton(Ae,'<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(Ae,'<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()},ze.prototype.addButtonClickListener=function(Ee){this.buttonClickListeners.push(Ee)},ze.prototype.removeButtonClickListener=function(Ee){this.buttonClickListeners.indexOf(Ee)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Ee),1)},ze.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},ze.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var Ee=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Pe=0;Pe<this.markerButtons.length;Pe++)Pe<Ee||Pe===Ee&&this.markerButtons.length-1===Ee?this.markerButtonBlock.appendChild(this.markerButtons[Pe]):(Pe===Ee&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Pe]))}},ze.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")},ze.prototype.resetButtonStyles=function(){var Ee=this;this.buttons.forEach(function(Pe){Pe.className=Pe.className.replace(Ee.uiStyleSettings.toolbarButtonStyleColorsClassName?Ee.uiStyleSettings.toolbarButtonStyleColorsClassName:Ee.toolbarButtonStyleColorsClass.name,"").trim(),Pe.className=Pe.className.replace(Ee.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?Ee.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:Ee.toolbarActiveButtonStyleColorsClass.name,"").trim(),Pe.className+=" "+(Ee.uiStyleSettings.toolbarButtonStyleColorsClassName?Ee.uiStyleSettings.toolbarButtonStyleColorsClassName:Ee.toolbarButtonStyleColorsClass.name)})},ze.prototype.addActionButton=function(Ee,Pe,Fe){var Ae=this,ye=document.createElement("div");switch(ye.className=""+this.toolbarButtonStyleClass.name,ye.innerHTML=Pe,ye.setAttribute("data-action",Fe),ye.addEventListener("click",function(){Ae.actionToolbarButtonClicked(ye,Fe)}),Fe){case"select":ye.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":ye.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":ye.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":ye.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":ye.style.fill=this.uiStyleSettings.closeButtonColor}Ee.appendChild(ye),this.buttons.push(ye)},ze.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new dt("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 dt("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new dt("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new dt("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 dt("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var Ee=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new dt("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*Ee)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*Ee)+`px;
|
|
|
padding: `+Ee+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new dt("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new dt("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new Lt("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new Lt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},ze.prototype.markerToolbarButtonClicked=function(Ee,Pe){this.setActiveButton(Ee),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Fe){return Fe("marker",Pe)}),this.markerButtonOverflowBlock.style.display="none"},ze.prototype.actionToolbarButtonClicked=function(Ee,Pe){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Fe){return Fe("action",Pe)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},ze.prototype.setActiveButton=function(Ee){this.resetButtonStyles(),Ee.className=Ee.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),Ee.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},ze.prototype.setActiveMarkerButton=function(Ee){var Pe=this.markerButtons.find(function(Fe){return Fe.getAttribute("data-type-name")===Ee});Pe&&this.setActiveButton(Pe)},ze.prototype.setCurrentMarker=function(Ee){var Pe=this;this.currentMarker=Ee,this.buttons.filter(function(Fe){return/delete|notes/.test(Fe.getAttribute("data-action"))}).forEach(function(Fe){Pe.currentMarker===void 0?(Fe.style.fillOpacity="0.4",Fe.style.pointerEvents="none"):(Fe.style.fillOpacity="1",Fe.style.pointerEvents="all")})},ze}(),De=function(){function ze(Ee,Pe,Fe,Ae){this.panels=[],this.panelButtons=[],this.markerjsContainer=Ee,this.displayMode=Pe,this.uiStyleSettings=Fe,this.styles=Ae,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return ze.prototype.addStyles=function(){var Ee;this.toolboxStyleClass=this.styles.addClass(new dt("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 dt("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var Pe=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new dt("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new dt("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new dt("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 dt("toolbox-panel-row_colors",`
|
|
|
background-color: `+((Ee=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Ee!==void 0?Ee:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new dt("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*Pe)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*Pe)+`px;
|
|
|
padding: `+Pe+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new dt("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new dt("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new Lt("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new Lt("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},ze.prototype.show=function(Ee){var Pe;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Ee,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Pe=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Pe!==void 0?Pe:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},ze.prototype.setPanelButtons=function(Ee){var Pe,Fe,Ae=this;this.panels=Ee,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Pe=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Pe!==void 0?Pe:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Fe=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Fe!==void 0?Fe:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(ye){var qe;ye.uiStyleSettings=Ae.uiStyleSettings;var vt=document.createElement("div");vt.className=Ae.toolboxButtonStyleClass.name+" "+((qe=Ae.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&qe!==void 0?qe:Ae.toolboxButtonStyleColorsClass.name),vt.innerHTML=ye.icon,vt.title=ye.title,vt.addEventListener("click",function(){Ae.panelButtonClick(ye)}),Ae.panelButtons.push(vt),Ae.buttonRow.appendChild(vt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ze.prototype.panelButtonClick=function(Ee){var Pe=this,Fe=-1;if(Ee!==this.activePanel){Fe=this.panels.indexOf(Ee),this.panelRow.innerHTML="";var Ae=Ee.getUi();Ae.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Ae),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=Ee}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Pe.displayMode==="inline"?Pe.panelRow.style.display="none":Pe.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(ye,qe){var vt,et;ye.className=Pe.toolboxButtonStyleClass.name+" "+(qe===Fe?""+((vt=Pe.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&vt!==void 0?vt:Pe.toolboxActiveButtonStyleColorsClass.name):""+((et=Pe.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&et!==void 0?et:Pe.toolboxButtonStyleColorsClass.name))})},ze}(),ne=function(ze,Ee){this.title=ze,this.icon=Ee},ee=function(ze){function Ee(Pe,Fe,Ae,ye){var qe=ze.call(this,Pe,ye||'<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 qe.colors=[],qe.addTransparent=!1,qe.colorBoxes=[],qe.colors=Fe,qe.currentColor=Ae,qe.setCurrentColor=qe.setCurrentColor.bind(qe),qe.getColorBox=qe.getColorBox.bind(qe),qe}return Oe(Ee,ze),Ee.prototype.getUi=function(){var Pe=this,Fe=document.createElement("div");return Fe.style.overflow="hidden",Fe.style.whiteSpace="nowrap",this.colors.forEach(function(Ae){var ye=Pe.getColorBox(Ae);Fe.appendChild(ye),Pe.colorBoxes.push(ye)}),Fe},Ee.prototype.getColorBox=function(Pe){var Fe=this,Ae=this.uiStyleSettings.toolbarHeight/4,ye=this.uiStyleSettings.toolbarHeight-Ae,qe=document.createElement("div");qe.style.display="inline-block",qe.style.boxSizing="content-box",qe.style.width=ye-2+"px",qe.style.height=ye-2+"px",qe.style.padding="1px",qe.style.marginRight="2px",qe.style.marginBottom="2px",qe.style.borderWidth="2px",qe.style.borderStyle="solid",qe.style.borderRadius=(ye+2)/2+"px",qe.style.borderColor=Pe===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",qe.addEventListener("click",function(){Fe.setCurrentColor(Pe,qe)});var vt=document.createElement("div");return vt.style.display="inline-block",vt.style.width=ye-2+"px",vt.style.height=ye-2+"px",vt.style.backgroundColor=Pe,vt.style.borderRadius=ye/2+"px",Pe==="transparent"&&(vt.style.fill=this.uiStyleSettings.toolboxAccentColor,vt.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>`),qe.appendChild(vt),qe},Ee.prototype.setCurrentColor=function(Pe,Fe){var Ae=this;this.currentColor=Pe,this.colorBoxes.forEach(function(ye){ye.style.borderColor=ye===Fe?Ae.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Pe)},Ee}(ne),ce=function(){function ze(Ee,Pe,Fe){this._state="new",this._isSelected=!1,this._container=Ee,this._overlayContainer=Pe,this.globalSettings=Fe,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(ze.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),ze.prototype.ownsTarget=function(Ee){return!1},Object.defineProperty(ze.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),ze.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},ze.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},ze.prototype.pointerDown=function(Ee,Pe){},ze.prototype.dblClick=function(Ee,Pe){},ze.prototype.manipulate=function(Ee){},ze.prototype.pointerUp=function(Ee){this.stateChanged()},ze.prototype.dispose=function(){},ze.prototype.addMarkerVisualToContainer=function(Ee){this.container.childNodes.length>0?this.container.insertBefore(Ee,this.container.childNodes[0]):this.container.appendChild(Ee)},ze.prototype.getState=function(){return{typeName:ze.typeName,state:this.state,notes:this.notes}},ze.prototype.restoreState=function(Ee){this._state=Ee.state,this.notes=Ee.notes},ze.prototype.scale=function(Ee,Pe){},ze.prototype.colorChanged=function(Ee){this.onColorChanged&&this.onColorChanged(Ee),this.stateChanged()},ze.prototype.fillColorChanged=function(Ee){this.onFillColorChanged&&this.onFillColorChanged(Ee),this.stateChanged()},ze.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var Ee=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),Ee.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(Ee)&&this.onStateChanged(this)}},ze.typeName="MarkerBase",ze}(),se=function(){function ze(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ze.prototype.findGripByVisual=function(Ee){return this.topLeft.ownsTarget(Ee)?this.topLeft:this.topCenter.ownsTarget(Ee)?this.topCenter:this.topRight.ownsTarget(Ee)?this.topRight:this.centerLeft.ownsTarget(Ee)?this.centerLeft:this.centerRight.ownsTarget(Ee)?this.centerRight:this.bottomLeft.ownsTarget(Ee)?this.bottomLeft:this.bottomCenter.ownsTarget(Ee)?this.bottomCenter:this.bottomRight.ownsTarget(Ee)?this.bottomRight:void 0},ze}(),he=function(){function ze(){this.GRIP_SIZE=10,this.visual=Xe.createGroup(),this.visual.appendChild(Xe.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Xe.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ze.prototype.ownsTarget=function(Ee){return Ee===this.visual||Ee===this.visual.childNodes[0]||Ee===this.visual.childNodes[1]},ze}(),ve=function(){function ze(){}return ze.toITransformMatrix=function(Ee){return{a:Ee.a,b:Ee.b,c:Ee.c,d:Ee.d,e:Ee.e,f:Ee.f}},ze.toSVGMatrix=function(Ee,Pe){return Ee.a=Pe.a,Ee.b=Pe.b,Ee.c=Pe.c,Ee.d=Pe.d,Ee.e=Pe.e,Ee.f=Pe.f,Ee},ze}(),be=function(ze){function Ee(Pe,Fe,Ae){var ye=ze.call(this,Pe,Fe,Ae)||this;return ye.left=0,ye.top=0,ye.width=0,ye.height=0,ye.defaultSize={x:50,y:20},ye.offsetX=0,ye.offsetY=0,ye.rotationAngle=0,ye.CB_DISTANCE=10,ye._suppressMarkerCreateEvent=!1,ye.container.transform.baseVal.appendItem(Xe.createTransform()),ye.setupControlBox(),ye}return Oe(Ee,ze),Object.defineProperty(Ee.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(Ee.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(Ee.prototype,"visual",{get:function(){return this._visual},set:function(Pe){this._visual=Pe;var Fe=Xe.createTransform();this._visual.transform.baseVal.appendItem(Fe)},enumerable:!1,configurable:!0}),Ee.prototype.ownsTarget=function(Pe){return!!ze.prototype.ownsTarget.call(this,Pe)||!!(this.controlGrips.findGripByVisual(Pe)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Pe))},Ee.prototype.pointerDown=function(Pe,Fe){ze.prototype.pointerDown.call(this,Pe,Fe),this.state==="new"&&(this.left=Pe.x,this.top=Pe.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Ae=this.unrotatePoint(Pe);if(this.manipulationStartX=Ae.x,this.manipulationStartY=Ae.y,this.offsetX=Ae.x-this.left,this.offsetY=Ae.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Fe),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Fe)){this.activeGrip=this.rotatorGrip;var ye=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=ye.x-this.width/2,this.top=ye.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var qe=this.container.transform.baseVal.getItem(0);qe.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(qe,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},Ee.prototype.pointerUp=function(Pe){var Fe=this.state;ze.prototype.pointerUp.call(this,Pe),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Pe),this._state="select",Fe==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},Ee.prototype.moveVisual=function(Pe){this.visual.style.transform="translate("+Pe.x+"px, "+Pe.y+"px)"},Ee.prototype.manipulate=function(Pe){var Fe=this.unrotatePoint(Pe);this.state==="creating"?this.resize(Pe):this.state==="move"?(this.left=this.manipulationStartLeft+(Fe.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Fe.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Fe):this.state==="rotate"&&this.rotate(Pe)},Ee.prototype.resize=function(Pe){var Fe=this.manipulationStartLeft,Ae=this.manipulationStartWidth,ye=this.manipulationStartTop,qe=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Fe=this.manipulationStartLeft+Pe.x-this.manipulationStartX,Ae=this.manipulationStartWidth+this.manipulationStartLeft-Fe;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Ae=this.manipulationStartWidth+Pe.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ye=this.manipulationStartTop+Pe.y-this.manipulationStartY,qe=this.manipulationStartHeight+this.manipulationStartTop-ye;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:qe=this.manipulationStartHeight+Pe.y-this.manipulationStartY}Ae>=0?(this.left=Fe,this.width=Ae):(this.left=Fe+Ae,this.width=-Ae),qe>=0?(this.top=ye,this.height=qe):(this.top=ye+qe,this.height=-qe),this.setSize()},Ee.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Ee.prototype.rotate=function(Pe){if(Math.abs(Pe.x-this.centerX)>.1){var Fe=Math.sign(Pe.x-this.centerX);this.rotationAngle=180*Math.atan((Pe.y-this.centerY)/(Pe.x-this.centerX))/Math.PI+90*Fe,this.applyRotation()}},Ee.prototype.applyRotation=function(){var Pe=this.container.transform.baseVal.getItem(0);Pe.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Pe,0)},Ee.prototype.rotatePoint=function(Pe){if(this.rotationAngle===0)return Pe;var Fe=this.container.getCTM(),Ae=Xe.createPoint(Pe.x,Pe.y);return{x:(Ae=Ae.matrixTransform(Fe)).x,y:Ae.y}},Ee.prototype.unrotatePoint=function(Pe){if(this.rotationAngle===0)return Pe;var Fe=this.container.getCTM();Fe=Fe.inverse();var Ae=Xe.createPoint(Pe.x,Pe.y);return{x:(Ae=Ae.matrixTransform(Fe)).x,y:Ae.y}},Ee.prototype.select=function(){ze.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Ee.prototype.deselect=function(){ze.prototype.deselect.call(this),this.controlBox.style.display="none"},Ee.prototype.setupControlBox=function(){this.controlBox=Xe.createGroup();var Pe=Xe.createTransform();Pe.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Pe),this.container.appendChild(this.controlBox),this.controlRect=Xe.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=Xe.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 se,this.addControlGrips(),this.controlBox.style.display="none"},Ee.prototype.adjustControlBox=function(){var Pe=this.controlBox.transform.baseVal.getItem(0);Pe.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Pe,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()},Ee.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()},Ee.prototype.createGrip=function(){var Pe=new he;return Pe.visual.transform.baseVal.appendItem(Xe.createTransform()),this.controlBox.appendChild(Pe.visual),Pe},Ee.prototype.positionGrips=function(){var Pe=this.controlGrips.topLeft.GRIP_SIZE,Fe=-Pe/2,Ae=Fe,ye=(this.width+this.CB_DISTANCE)/2-Pe/2,qe=(this.height+this.CB_DISTANCE)/2-Pe/2,vt=this.height+this.CB_DISTANCE-Pe/2,et=this.width+this.CB_DISTANCE-Pe/2;this.positionGrip(this.controlGrips.topLeft.visual,Fe,Ae),this.positionGrip(this.controlGrips.topCenter.visual,ye,Ae),this.positionGrip(this.controlGrips.topRight.visual,et,Ae),this.positionGrip(this.controlGrips.centerLeft.visual,Fe,qe),this.positionGrip(this.controlGrips.centerRight.visual,et,qe),this.positionGrip(this.controlGrips.bottomLeft.visual,Fe,vt),this.positionGrip(this.controlGrips.bottomCenter.visual,ye,vt),this.positionGrip(this.controlGrips.bottomRight.visual,et,vt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ye,Ae-3*this.CB_DISTANCE)},Ee.prototype.positionGrip=function(Pe,Fe,Ae){var ye=Pe.transform.baseVal.getItem(0);ye.setTranslate(Fe,Ae),Pe.transform.baseVal.replaceItem(ye,0)},Ee.prototype.hideControlBox=function(){this.controlBox.style.display="none"},Ee.prototype.showControlBox=function(){this.controlBox.style.display=""},Ee.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ve.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ve.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},ze.prototype.getState.call(this))},Ee.prototype.restoreState=function(Pe){ze.prototype.restoreState.call(this,Pe);var Fe=Pe;this.left=Fe.left,this.top=Fe.top,this.width=Fe.width,this.height=Fe.height,this.rotationAngle=Fe.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ve.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Fe.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ve.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Fe.containerTransformMatrix))},Ee.prototype.scale=function(Pe,Fe){ze.prototype.scale.call(this,Pe,Fe);var Ae=this.rotatePoint({x:this.left,y:this.top}),ye=this.unrotatePoint({x:Ae.x*Pe,y:Ae.y*Fe});this.left=ye.x,this.top=ye.y,this.width=this.width*Pe,this.height=this.height*Fe,this.adjustControlBox()},Ee}(ce),ke=function(ze){function Ee(Pe,Fe,Ae){var ye=ze.call(this,Pe,Fe,Ae)||this;return ye.fillColor="transparent",ye.strokeColor="transparent",ye.strokeWidth=0,ye.strokeDasharray="",ye.opacity=1,ye.setStrokeColor=ye.setStrokeColor.bind(ye),ye.setFillColor=ye.setFillColor.bind(ye),ye.setStrokeWidth=ye.setStrokeWidth.bind(ye),ye.setStrokeDasharray=ye.setStrokeDasharray.bind(ye),ye.createVisual=ye.createVisual.bind(ye),ye}return Oe(Ee,ze),Ee.prototype.ownsTarget=function(Pe){return!(!ze.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual)},Ee.prototype.createVisual=function(){this.visual=Xe.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)},Ee.prototype.pointerDown=function(Pe,Fe){ze.prototype.pointerDown.call(this,Pe,Fe),this.state==="new"&&(this.createVisual(),this.moveVisual(Pe),this._state="creating")},Ee.prototype.manipulate=function(Pe){ze.prototype.manipulate.call(this,Pe)},Ee.prototype.resize=function(Pe){ze.prototype.resize.call(this,Pe),this.setSize()},Ee.prototype.setSize=function(){ze.prototype.setSize.call(this),Xe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Ee.prototype.pointerUp=function(Pe){ze.prototype.pointerUp.call(this,Pe),this.setSize()},Ee.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.visual&&Xe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Pe),this.stateChanged()},Ee.prototype.setFillColor=function(Pe){this.fillColor=Pe,this.visual&&Xe.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Ee.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.visual&&Xe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ee.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.visual&&Xe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Ee.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ze.prototype.getState.call(this))},Ee.prototype.restoreState=function(Pe){var Fe=Pe;this.fillColor=Fe.fillColor,this.strokeColor=Fe.strokeColor,this.strokeWidth=Fe.strokeWidth,this.strokeDasharray=Fe.strokeDasharray,this.opacity=Fe.opacity,this.createVisual(),ze.prototype.restoreState.call(this,Pe),this.setSize()},Ee.prototype.scale=function(Pe,Fe){ze.prototype.scale.call(this,Pe,Fe),this.setSize()},Ee.title="Rectangle marker",Ee}(be),Be=function(ze){function Ee(Pe,Fe,Ae,ye){var qe=ze.call(this,Pe,ye||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return qe.widths=[],qe.widthBoxes=[],qe.widths=Fe,qe.currentWidth=Ae,qe.setCurrentWidth=qe.setCurrentWidth.bind(qe),qe}return Oe(Ee,ze),Ee.prototype.getUi=function(){var Pe=this,Fe=document.createElement("div");return Fe.style.display="flex",Fe.style.overflow="hidden",Fe.style.flexGrow="2",this.widths.forEach(function(Ae){var ye=document.createElement("div");ye.style.display="flex",ye.style.flexGrow="2",ye.style.alignItems="center",ye.style.justifyContent="space-between",ye.style.padding="5px",ye.style.borderWidth="2px",ye.style.borderStyle="solid",ye.style.borderColor=Ae===Pe.currentWidth?Pe.uiStyleSettings.toolboxAccentColor:"transparent",ye.addEventListener("click",function(){Pe.setCurrentWidth(Ae,ye)}),Fe.appendChild(ye);var qe=document.createElement("div");qe.innerText=Ae.toString(),qe.style.marginRight="5px",ye.appendChild(qe);var vt=document.createElement("div");vt.style.minHeight="20px",vt.style.flexGrow="2",vt.style.display="flex",vt.style.alignItems="center";var et=document.createElement("hr");et.style.minWidth="20px",et.style.border="0px",et.style.borderTop=Ae+"px solid "+Pe.uiStyleSettings.toolboxColor,et.style.flexGrow="2",vt.appendChild(et),ye.appendChild(vt),Pe.widthBoxes.push(ye)}),Fe},Ee.prototype.setCurrentWidth=function(Pe,Fe){var Ae=this;this.currentWidth=Pe,this.widthBoxes.forEach(function(ye){ye.style.borderColor=ye===Fe?Ae.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},Ee}(ne),He=function(ze){function Ee(Pe,Fe,Ae,ye){var qe=ze.call(this,Pe,ye||'<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 qe.styles=[],qe.styleBoxes=[],qe.styles=Fe,qe.currentStyle=Ae,qe.setCurrentStyle=qe.setCurrentStyle.bind(qe),qe}return Oe(Ee,ze),Ee.prototype.getUi=function(){var Pe=this,Fe=document.createElement("div");return Fe.style.display="flex",Fe.style.overflow="hidden",Fe.style.flexGrow="2",this.styles.forEach(function(Ae){var ye=document.createElement("div");ye.style.display="flex",ye.style.alignItems="center",ye.style.justifyContent="space-between",ye.style.padding="5px",ye.style.borderWidth="2px",ye.style.borderStyle="solid",ye.style.overflow="hidden",ye.style.maxWidth=100/Pe.styles.length-5+"%",ye.style.borderColor=Ae===Pe.currentStyle?Pe.uiStyleSettings.toolboxAccentColor:"transparent",ye.addEventListener("click",function(){Pe.setCurrentStyle(Ae,ye)}),Fe.appendChild(ye);var qe=document.createElement("div");qe.style.minHeight="20px",qe.style.flexGrow="2",qe.style.overflow="hidden";var vt=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Pe.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Ae!==""?'stroke-dasharray="'+Ae+'"':"")+` />
|
|
|
</svg>`;qe.innerHTML=vt,ye.appendChild(qe),Pe.styleBoxes.push(ye)}),Fe},Ee.prototype.setCurrentStyle=function(Pe,Fe){var Ae=this;this.currentStyle=Pe,this.styleBoxes.forEach(function(ye){ye.style.borderColor=ye===Fe?Ae.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},Ee}(ne),We=function(ze){function Ee(Pe,Fe,Ae){var ye=ze.call(this,Pe,Fe,Ae)||this;return ye.strokeColor=Ae.defaultColor,ye.strokeWidth=Ae.defaultStrokeWidth,ye.strokeDasharray=Ae.defaultStrokeDasharray,ye.strokePanel=new ee("Line color",Ae.defaultColorSet,Ae.defaultColor),ye.strokePanel.onColorChanged=ye.setStrokeColor,ye.strokeWidthPanel=new Be("Line width",Ae.defaultStrokeWidths,Ae.defaultStrokeWidth),ye.strokeWidthPanel.onWidthChanged=ye.setStrokeWidth,ye.strokeStylePanel=new He("Line style",Ae.defaultStrokeDasharrays,Ae.defaultStrokeDasharray),ye.strokeStylePanel.onStyleChanged=ye.setStrokeDasharray,ye}return Oe(Ee,ze),Object.defineProperty(Ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ee.prototype.getState=function(){var Pe=ze.prototype.getState.call(this);return Pe.typeName=Ee.typeName,Pe},Ee.typeName="FrameMarker",Ee.title="Frame marker",Ee.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',Ee}(ke),rt=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"},Qe=function(ze){function Ee(Pe,Fe,Ae){var ye=ze.call(this,Pe,Fe,Ae)||this;return ye.x1=0,ye.y1=0,ye.x2=0,ye.y2=0,ye.defaultLength=50,ye.manipulationStartX=0,ye.manipulationStartY=0,ye.manipulationStartX1=0,ye.manipulationStartY1=0,ye.manipulationStartX2=0,ye.manipulationStartY2=0,ye.setupControlBox(),ye}return Oe(Ee,ze),Ee.prototype.ownsTarget=function(Pe){return!!ze.prototype.ownsTarget.call(this,Pe)||!(!this.grip1.ownsTarget(Pe)&&!this.grip2.ownsTarget(Pe))},Ee.prototype.pointerDown=function(Pe,Fe){ze.prototype.pointerDown.call(this,Pe,Fe),this.manipulationStartX=Pe.x,this.manipulationStartY=Pe.y,this.state==="new"&&(this.x1=Pe.x,this.y1=Pe.y,this.x2=Pe.x,this.y2=Pe.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(Fe)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Fe)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},Ee.prototype.pointerUp=function(Pe){var Fe=this.state;ze.prototype.pointerUp.call(this,Pe),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(Pe),this._state="select",Fe==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},Ee.prototype.adjustVisual=function(){},Ee.prototype.manipulate=function(Pe){this.state==="creating"?this.resize(Pe):this.state==="move"?(this.x1=this.manipulationStartX1+Pe.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Pe.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Pe.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Pe.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Pe)},Ee.prototype.resize=function(Pe){switch(this.activeGrip){case this.grip1:this.x1=Pe.x,this.y1=Pe.y;break;case this.grip2:case void 0:this.x2=Pe.x,this.y2=Pe.y}this.adjustVisual(),this.adjustControlBox()},Ee.prototype.select=function(){ze.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Ee.prototype.deselect=function(){ze.prototype.deselect.call(this),this.controlBox.style.display="none"},Ee.prototype.setupControlBox=function(){this.controlBox=Xe.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},Ee.prototype.adjustControlBox=function(){this.positionGrips()},Ee.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},Ee.prototype.createGrip=function(){var Pe=new he;return Pe.visual.transform.baseVal.appendItem(Xe.createTransform()),this.controlBox.appendChild(Pe.visual),Pe},Ee.prototype.positionGrips=function(){var Pe=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Pe/2,this.y1-Pe/2),this.positionGrip(this.grip2.visual,this.x2-Pe/2,this.y2-Pe/2)},Ee.prototype.positionGrip=function(Pe,Fe,Ae){var ye=Pe.transform.baseVal.getItem(0);ye.setTranslate(Fe,Ae),Pe.transform.baseVal.replaceItem(ye,0)},Ee.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},ze.prototype.getState.call(this))},Ee.prototype.restoreState=function(Pe){ze.prototype.restoreState.call(this,Pe);var Fe=Pe;this.x1=Fe.x1,this.y1=Fe.y1,this.x2=Fe.x2,this.y2=Fe.y2},Ee.prototype.scale=function(Pe,Fe){ze.prototype.scale.call(this,Pe,Fe),this.x1=this.x1*Pe,this.y1=this.y1*Fe,this.x2=this.x2*Pe,this.y2=this.y2*Fe,this.adjustVisual(),this.adjustControlBox()},Ee}(ce),Pt=function(ze){function Ee(Pe,Fe,Ae){var ye=ze.call(this,Pe,Fe,Ae)||this;return ye.strokeColor="transparent",ye.strokeWidth=0,ye.strokeDasharray="",ye.setStrokeColor=ye.setStrokeColor.bind(ye),ye.setStrokeWidth=ye.setStrokeWidth.bind(ye),ye.setStrokeDasharray=ye.setStrokeDasharray.bind(ye),ye.strokeColor=Ae.defaultColor,ye.strokeWidth=Ae.defaultStrokeWidth,ye.strokeDasharray=Ae.defaultStrokeDasharray,ye.strokePanel=new ee("Line color",Ae.defaultColorSet,Ae.defaultColor),ye.strokePanel.onColorChanged=ye.setStrokeColor,ye.strokeWidthPanel=new Be("Line width",Ae.defaultStrokeWidths,Ae.defaultStrokeWidth),ye.strokeWidthPanel.onWidthChanged=ye.setStrokeWidth,ye.strokeStylePanel=new He("Line style",Ae.defaultStrokeDasharrays,Ae.defaultStrokeDasharray),ye.strokeStylePanel.onStyleChanged=ye.setStrokeDasharray,ye}return Oe(Ee,ze),Ee.prototype.ownsTarget=function(Pe){return!(!ze.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual&&Pe!==this.selectorLine&&Pe!==this.visibleLine)},Ee.prototype.createVisual=function(){this.visual=Xe.createGroup(),this.selectorLine=Xe.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Xe.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)},Ee.prototype.pointerDown=function(Pe,Fe){ze.prototype.pointerDown.call(this,Pe,Fe),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},Ee.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()),Xe.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Xe.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Xe.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Ee.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.adjustVisual(),this.colorChanged(Pe)},Ee.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.adjustVisual()},Ee.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ee.prototype.getState=function(){var Pe=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ze.prototype.getState.call(this));return Pe.typeName=Ee.typeName,Pe},Ee.prototype.restoreState=function(Pe){ze.prototype.restoreState.call(this,Pe);var Fe=Pe;this.strokeColor=Fe.strokeColor,this.strokeWidth=Fe.strokeWidth,this.strokeDasharray=Fe.strokeDasharray,this.createVisual(),this.adjustVisual()},Ee.typeName="LineMarker",Ee.title="Line marker",Ee.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',Ee}(Qe),Ze=function(ze){function Ee(Pe,Fe,Ae,ye){var qe=ze.call(this,Pe,ye||'<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 qe.fonts=[],qe.fontBoxes=[],qe.fonts=Fe,qe.currentFont=Ae,qe.setCurrentFont=qe.setCurrentFont.bind(qe),qe}return Oe(Ee,ze),Ee.prototype.getUi=function(){var Pe=this,Fe=document.createElement("div");return Fe.style.overflow="hidden",Fe.style.flexGrow="2",this.fonts.forEach(function(Ae){var ye=document.createElement("div");ye.style.display="inline-block",ye.style.alignItems="center",ye.style.justifyContent="space-between",ye.style.padding="5px",ye.style.borderWidth="2px",ye.style.borderStyle="solid",ye.style.overflow="hidden",ye.style.maxWidth=100/Pe.fonts.length-5+"%",ye.style.borderColor=Ae===Pe.currentFont?Pe.uiStyleSettings.toolboxAccentColor:"transparent",ye.addEventListener("click",function(){Pe.setCurrentFont(Ae,ye)}),Fe.appendChild(ye);var qe=document.createElement("div");qe.style.display="flex",qe.style.minHeight="20px",qe.style.flexGrow="2",qe.style.fontFamily=Ae,qe.style.overflow="hidden";var vt=document.createElement("div");vt.style.whiteSpace="nowrap",vt.style.overflow="hidden",vt.style.textOverflow="ellipsis",vt.innerHTML="The quick brown fox jumps over the lazy dog",qe.appendChild(vt),ye.appendChild(qe),Pe.fontBoxes.push(ye)}),Fe},Ee.prototype.setCurrentFont=function(Pe,Fe){var Ae=this;this.currentFont=Pe,this.fontBoxes.forEach(function(ye){ye.style.borderColor=ye===Fe?Ae.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},Ee}(ne),Et=function(ze){function Ee(Pe,Fe,Ae){var ye=ze.call(this,Pe,Fe,Ae)||this;return ye.color="transparent",ye.padding=5,ye.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",ye.text=ye.DEFAULT_TEXT,ye.isMoved=!1,ye.color=Ae.defaultColor,ye.fontFamily=Ae.defaultFontFamily,ye.defaultSize={x:100,y:30},ye.setColor=ye.setColor.bind(ye),ye.setFont=ye.setFont.bind(ye),ye.renderText=ye.renderText.bind(ye),ye.sizeText=ye.sizeText.bind(ye),ye.textEditDivClicked=ye.textEditDivClicked.bind(ye),ye.showTextEditor=ye.showTextEditor.bind(ye),ye.setSize=ye.setSize.bind(ye),ye.positionTextEditor=ye.positionTextEditor.bind(ye),ye.colorPanel=new ee("Color",Ae.defaultColorSet,Ae.defaultColor),ye.colorPanel.onColorChanged=ye.setColor,ye.fontFamilyPanel=new Ze("Font",Ae.defaultFontFamilies,Ae.defaultFontFamily),ye.fontFamilyPanel.onFontChanged=ye.setFont,ye}return Oe(Ee,ze),Ee.prototype.ownsTarget=function(Pe){if(ze.prototype.ownsTarget.call(this,Pe)||Pe===this.visual||Pe===this.textElement||Pe===this.bgRectangle)return!0;var Fe=!1;return this.textElement.childNodes.forEach(function(Ae){Ae===Pe&&(Fe=!0)}),Fe},Ee.prototype.createVisual=function(){this.visual=Xe.createGroup(),this.bgRectangle=Xe.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Xe.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Xe.createTransform()),this.textElement.transform.baseVal.appendItem(Xe.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},Ee.prototype.pointerDown=function(Pe,Fe){ze.prototype.pointerDown.call(this,Pe,Fe),this.isMoved=!1,this.pointerDownPoint=Pe,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Pe),this._state="creating")},Ee.prototype.renderText=function(){var Pe=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(Fe){Pe.textElement.appendChild(Xe.createTSpan(Fe.trim()===""?" ":Fe.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},Ee.prototype.getTextScale=function(){var Pe=this.textElement.getBBox(),Fe=1;if(Pe.width>0&&Pe.height>0){var Ae=(1*this.width-this.width*this.padding*2/100)/Pe.width,ye=(1*this.height-this.height*this.padding*2/100)/Pe.height;Fe=Math.min(Ae,ye)}return Fe},Ee.prototype.getTextPosition=function(Pe){var Fe=this.textElement.getBBox(),Ae=0,ye=0;return Fe.width>0&&Fe.height>0&&(Ae=(this.width-Fe.width*Pe)/2,ye=this.height/2-Fe.height*Pe/2),{x:Ae,y:ye}},Ee.prototype.sizeText=function(){var Pe=this.textElement.getBBox(),Fe=this.getTextScale(),Ae=this.getTextPosition(Fe);Ae.y-=Pe.y*Fe,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Ae.x+"px, "+Ae.y+"px) scale("+Fe+", "+Fe+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Ae.x,Ae.y),this.textElement.transform.baseVal.getItem(1).setScale(Fe,Fe))},Ee.prototype.manipulate=function(Pe){ze.prototype.manipulate.call(this,Pe),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Pe.x-this.pointerDownPoint.x)>5||Math.abs(Pe.y-this.pointerDownPoint.y)>5)},Ee.prototype.resize=function(Pe){ze.prototype.resize.call(this,Pe),this.isMoved=!0,this.setSize(),this.sizeText()},Ee.prototype.setSize=function(){ze.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Xe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Xe.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},Ee.prototype.pointerUp=function(Pe){var Fe=this.state;Fe==="creating"&&(this._suppressMarkerCreateEvent=!0),ze.prototype.pointerUp.call(this,Pe),this.setSize(),(Fe==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},Ee.prototype.showTextEditor=function(){var Pe=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(Fe){Fe.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Fe=Number.parseFloat(Pe.textEditor.style.fontSize);Pe.textEditor.clientWidth>=Number.parseInt(Pe.textEditor.style.maxWidth)&&Fe>.9;)Fe-=.1,Pe.textEditor.style.fontSize=Math.max(Fe,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Fe){Fe.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Fe){if(Fe.clipboardData){var Ae=Fe.clipboardData.getData("text"),ye=window.getSelection();if(!ye.rangeCount)return!1;ye.deleteFromDocument(),ye.getRangeAt(0).insertNode(document.createTextNode(Ae)),Fe.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Pe.textEditDivClicked(Pe.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},Ee.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Pe=this.getTextScale(),Fe=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Ae=this.textElement.getBBox(),ye={x:Ae.width*Pe,y:Ae.height*Pe};Fe.x-=ye.x/2,Fe.y-=ye.y/2,this.textEditor.style.top=Fe.y+"px",this.textEditor.style.left=Fe.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Fe.x+"px",this.textEditor.style.fontSize=Math.max(16*Pe,12)+"px",this.textElement.style.display="none"}},Ee.prototype.textEditDivClicked=function(Pe){this.text=Pe.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},Ee.prototype.select=function(){ze.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Ee.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ze.prototype.deselect.call(this)},Ee.prototype.dblClick=function(Pe,Fe){ze.prototype.dblClick.call(this,Pe,Fe),this.showTextEditor()},Ee.prototype.setColor=function(Pe){this.textElement&&Xe.setAttributes(this.textElement,[["fill",Pe]]),this.color=Pe,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Pe)},Ee.prototype.setFont=function(Pe){this.textElement&&Xe.setAttributes(this.textElement,[["font-family",Pe]]),this.fontFamily=Pe,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},Ee.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},Ee.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(Ee.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Ee.prototype.getState=function(){var Pe=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},ze.prototype.getState.call(this));return Pe.typeName=Ee.typeName,Pe},Ee.prototype.restoreState=function(Pe){var Fe=Pe;this.color=Fe.color,this.fontFamily=Fe.fontFamily,this.padding=Fe.padding,this.text=Fe.text,this.createVisual(),ze.prototype.restoreState.call(this,Pe),this.setSize()},Ee.prototype.scale=function(Pe,Fe){ze.prototype.scale.call(this,Pe,Fe),this.setSize(),this.sizeText(),this.positionTextEditor()},Ee.typeName="TextMarker",Ee.title="Text marker",Ee.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>',Ee}(be),it=function(ze){function Ee(Pe,Fe,Ae){var ye=ze.call(this,Pe,Fe,Ae)||this;return ye.color="transparent",ye.lineWidth=3,ye.drawing=!1,ye.pixelRatio=1,ye.color=Ae.defaultColor,ye.lineWidth=Ae.defaultStrokeWidth,ye.pixelRatio=Ae.freehandPixelRatio,ye.setColor=ye.setColor.bind(ye),ye.addCanvas=ye.addCanvas.bind(ye),ye.finishCreation=ye.finishCreation.bind(ye),ye.setLineWidth=ye.setLineWidth.bind(ye),ye.colorPanel=new ee("Color",Ae.defaultColorSet,Ae.defaultColor),ye.colorPanel.onColorChanged=ye.setColor,ye.lineWidthPanel=new Be("Line width",Ae.defaultStrokeWidths,Ae.defaultStrokeWidth),ye.lineWidthPanel.onWidthChanged=ye.setLineWidth,ye}return Oe(Ee,ze),Ee.prototype.ownsTarget=function(Pe){return!(!ze.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual&&Pe!==this.drawingImage)},Ee.prototype.createVisual=function(){this.visual=Xe.createGroup(),this.drawingImage=Xe.createImage(),this.visual.appendChild(this.drawingImage);var Pe=Xe.createTransform();this.visual.transform.baseVal.appendItem(Pe),this.addMarkerVisualToContainer(this.visual)},Ee.prototype.pointerDown=function(Pe,Fe){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(Pe.x,Pe.y),this.drawing=!0):ze.prototype.pointerDown.call(this,Pe,Fe)},Ee.prototype.manipulate=function(Pe){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Pe.x,Pe.y),this.canvasContext.stroke()):ze.prototype.manipulate.call(this,Pe)},Ee.prototype.resize=function(Pe){ze.prototype.resize.call(this,Pe),Xe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Xe.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},Ee.prototype.pointerUp=function(Pe){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):ze.prototype.pointerUp.call(this,Pe)},Ee.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)},Ee.prototype.select=function(){this.state==="creating"&&this.finishCreation(),ze.prototype.select.call(this)},Ee.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ze.prototype.deselect.call(this)},Ee.prototype.finishCreation=function(){for(var Pe=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Fe=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Ae=Fe[0],ye=Fe[1],qe=Fe[2],vt=Fe[3],et=!1,Ye=0;Ye<this.canvasElement.height;Ye++)for(var xt=0;xt<this.canvasElement.width;xt++)Pe.data[Ye*this.canvasElement.width*4+4*xt+3]>0&&(et=!0,Ye<ye&&(ye=Ye),xt<Ae&&(Ae=xt),Ye>vt&&(vt=Ye),xt>qe&&(qe=xt));if(et){this.left=Ae/this.pixelRatio,this.top=ye/this.pixelRatio,this.width=(qe-Ae)/this.pixelRatio,this.height=(vt-ye)/this.pixelRatio;var yt=document.createElement("canvas");yt.width=qe-Ae,yt.height=vt-ye,yt.getContext("2d").putImageData(this.canvasContext.getImageData(Ae,ye,qe-Ae,vt-ye),0,0),this.drawingImgUrl=yt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Ee.prototype.setDrawingImage=function(){Xe.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Xe.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},Ee.prototype.setColor=function(Pe){this.color=Pe,this.colorChanged(Pe)},Ee.prototype.setLineWidth=function(Pe){this.lineWidth=Pe},Object.defineProperty(Ee.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),Ee.prototype.getState=function(){var Pe=Object.assign({drawingImgUrl:this.drawingImgUrl},ze.prototype.getState.call(this));return Pe.typeName=Ee.typeName,Pe},Ee.prototype.restoreState=function(Pe){this.createVisual(),ze.prototype.restoreState.call(this,Pe),this.drawingImgUrl=Pe.drawingImgUrl,this.setDrawingImage()},Ee.prototype.scale=function(Pe,Fe){ze.prototype.scale.call(this,Pe,Fe),this.setDrawingImage()},Ee.typeName="FreehandMarker",Ee.title="Freehand marker",Ee.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>',Ee}(be),Dt=function(ze){function Ee(Pe,Fe,Ae){var ye=ze.call(this,Pe,Ae||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return ye.typeBoxes=[],ye.currentType=Fe,ye.setCurrentType=ye.setCurrentType.bind(ye),ye}return Oe(Ee,ze),Ee.prototype.getUi=function(){var Pe=this,Fe=document.createElement("div");Fe.style.display="flex",Fe.style.overflow="hidden",Fe.style.flexGrow="2";for(var Ae=function(vt){var et="both";switch(vt){case 0:et="both";break;case 1:et="start";break;case 2:et="end";break;case 3:et="none"}var Ye=document.createElement("div");if(Ye.style.display="flex",Ye.style.flexGrow="2",Ye.style.alignItems="center",Ye.style.justifyContent="space-between",Ye.style.padding="5px",Ye.style.borderWidth="2px",Ye.style.borderStyle="solid",Ye.style.borderColor=et===ye.currentType?ye.uiStyleSettings.toolboxAccentColor:"transparent",Ye.addEventListener("click",function(){Pe.setCurrentType(et,Ye)}),Fe.appendChild(Ye),et==="both"||et==="start"){var xt=document.createElement("div");xt.style.display="flex",xt.style.alignItems="center",xt.style.minHeight="20px",xt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,5 10,0 10,10" fill="`+(ye.uiStyleSettings!==void 0?ye.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,xt.style.marginLeft="5px",Ye.appendChild(xt)}var yt=document.createElement("div");yt.style.display="flex",yt.style.alignItems="center",yt.style.minHeight="20px",yt.style.flexGrow="2";var at=document.createElement("hr");if(at.style.minWidth="20px",at.style.border="0px",at.style.borderTop="3px solid "+(ye.uiStyleSettings!==void 0?ye.uiStyleSettings.toolboxColor:"#eeeeee"),at.style.flexGrow="2",yt.appendChild(at),Ye.appendChild(yt),et==="both"||et==="end"){var zt=document.createElement("div");zt.style.display="flex",zt.style.alignItems="center",zt.style.minHeight="20px",zt.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="`+(ye.uiStyleSettings!==void 0?ye.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,zt.style.marginRight="5px",Ye.appendChild(zt)}ye.typeBoxes.push(Ye)},ye=this,qe=0;qe<4;qe++)Ae(qe);return Fe},Ee.prototype.setCurrentType=function(Pe,Fe){var Ae=this;this.currentType=Pe,this.typeBoxes.forEach(function(ye){ye.style.borderColor=ye===Fe?Ae.uiStyleSettings!==void 0?Ae.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},Ee}(ne),ht=function(ze){function Ee(Pe,Fe,Ae){var ye=ze.call(this,Pe,Fe,Ae)||this;return ye.arrowType="end",ye.arrowBaseHeight=10,ye.arrowBaseWidth=10,ye.getArrowPoints=ye.getArrowPoints.bind(ye),ye.setArrowType=ye.setArrowType.bind(ye),ye.arrowTypePanel=new Dt("Arrow type","end"),ye.arrowTypePanel.onArrowTypeChanged=ye.setArrowType,ye}return Oe(Ee,ze),Ee.prototype.ownsTarget=function(Pe){return!(!ze.prototype.ownsTarget.call(this,Pe)&&Pe!==this.arrow1&&Pe!==this.arrow2)},Ee.prototype.getArrowPoints=function(Pe,Fe){var Ae=this.arrowBaseWidth+2*this.strokeWidth,ye=this.arrowBaseHeight+2*this.strokeWidth;return Pe-Ae/2+","+(Fe+ye/2)+" "+Pe+","+(Fe-ye/2)+" "+(Pe+Ae/2)+","+(Fe+ye/2)},Ee.prototype.createTips=function(){this.arrow1=Xe.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Xe.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Xe.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Xe.createTransform()),this.visual.appendChild(this.arrow2)},Ee.prototype.pointerDown=function(Pe,Fe){ze.prototype.pointerDown.call(this,Pe,Fe),this.state==="creating"&&this.createTips()},Ee.prototype.adjustVisual=function(){if(ze.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",Xe.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Xe.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var Pe=0;Math.abs(this.x1-this.x2)>.1&&(Pe=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Fe=this.arrow1.transform.baseVal.getItem(0);Fe.setRotate(Pe,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Fe,0);var Ae=this.arrow2.transform.baseVal.getItem(0);Ae.setRotate(Pe+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Ae,0)}},Ee.prototype.setArrowType=function(Pe){this.arrowType=Pe,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),Ee.prototype.getState=function(){var Pe=Object.assign({arrowType:this.arrowType},ze.prototype.getState.call(this));return Pe.typeName=Ee.typeName,Pe},Ee.prototype.restoreState=function(Pe){ze.prototype.restoreState.call(this,Pe);var Fe=Pe;this.arrowType=Fe.arrowType,this.createTips(),this.adjustVisual()},Ee.typeName="ArrowMarker",Ee.title="Arrow marker",Ee.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',Ee}(Pt),Ht=function(ze){function Ee(Pe,Fe,Ae){var ye=ze.call(this,Pe,Fe,Ae)||this;return ye.fillColor=Ae.defaultFillColor,ye.strokeWidth=0,ye.fillPanel=new ee("Color",Ae.defaultColorSet,Ae.defaultFillColor),ye.fillPanel.onColorChanged=ye.setFillColor,ye}return Oe(Ee,ze),Object.defineProperty(Ee.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Ee.prototype.getState=function(){var Pe=ze.prototype.getState.call(this);return Pe.typeName=Ee.typeName,Pe},Ee.typeName="CoverMarker",Ee.title="Cover marker",Ee.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',Ee}(ke),_t=function(ze){function Ee(Pe,Fe,Ae,ye){var qe=ze.call(this,Pe,ye||'<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 qe.opacities=[],qe.opacityBoxes=[],qe.opacities=Fe,qe.currentOpacity=Ae,qe.setCurrentOpacity=qe.setCurrentOpacity.bind(qe),qe}return Oe(Ee,ze),Ee.prototype.getUi=function(){var Pe=this,Fe=document.createElement("div");return Fe.style.display="flex",Fe.style.overflow="hidden",Fe.style.flexGrow="2",Fe.style.justifyContent="space-between",this.opacities.forEach(function(Ae){var ye=document.createElement("div");ye.style.display="flex",ye.style.alignItems="center",ye.style.justifyContent="center",ye.style.padding="5px",ye.style.borderWidth="2px",ye.style.borderStyle="solid",ye.style.borderColor=Ae===Pe.currentOpacity?Pe.uiStyleSettings.toolboxAccentColor:"transparent",ye.addEventListener("click",function(){Pe.setCurrentOpacity(Ae,ye)}),Fe.appendChild(ye);var qe=document.createElement("div");qe.innerText=100*Ae+"%",ye.appendChild(qe),Pe.opacityBoxes.push(ye)}),Fe},Ee.prototype.setCurrentOpacity=function(Pe,Fe){var Ae=this;this.currentOpacity=Pe,this.opacityBoxes.forEach(function(ye){ye.style.borderColor=ye===Fe?Ae.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},Ee}(ne),Vt=function(ze){function Ee(Pe,Fe,Ae){var ye=ze.call(this,Pe,Fe,Ae)||this;return ye.setOpacity=ye.setOpacity.bind(ye),ye.fillColor=Ae.defaultHighlightColor,ye.strokeWidth=0,ye.opacity=Ae.defaultHighlightOpacity,ye.fillPanel=new ee("Color",Ae.defaultColorSet,ye.fillColor),ye.fillPanel.onColorChanged=ye.setFillColor,ye.opacityPanel=new _t("Opacity",Ae.defaultOpacitySteps,ye.opacity),ye.opacityPanel.onOpacityChanged=ye.setOpacity,ye}return Oe(Ee,ze),Ee.prototype.setOpacity=function(Pe){this.opacity=Pe,this.visual&&Xe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Ee.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Ee.prototype.getState=function(){var Pe=ze.prototype.getState.call(this);return Pe.typeName=Ee.typeName,Pe},Ee.typeName="HighlightMarker",Ee.title="Highlight marker",Ee.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>',Ee}(Ht),ot='<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>',Ue='<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>',Wt=function(ze){function Ee(Pe,Fe,Ae){var ye=ze.call(this,Pe,Fe,Ae)||this;return ye.bgColor="transparent",ye.tipPosition={x:0,y:0},ye.tipBase1Position={x:0,y:0},ye.tipBase2Position={x:0,y:0},ye.tipMoving=!1,ye.color=Ae.defaultStrokeColor,ye.bgColor=Ae.defaultFillColor,ye.fontFamily=Ae.defaultFontFamily,ye.defaultSize={x:100,y:30},ye.setBgColor=ye.setBgColor.bind(ye),ye.getTipPoints=ye.getTipPoints.bind(ye),ye.positionTip=ye.positionTip.bind(ye),ye.setTipPoints=ye.setTipPoints.bind(ye),ye.colorPanel=new ee("Text color",Ae.defaultColorSet,ye.color,ot),ye.colorPanel.onColorChanged=ye.setColor,ye.bgColorPanel=new ee("Fill color",Ae.defaultColorSet,ye.bgColor,Ue),ye.bgColorPanel.onColorChanged=ye.setBgColor,ye.fontFamilyPanel=new Ze("Font",Ae.defaultFontFamilies,Ae.defaultFontFamily),ye.fontFamilyPanel.onFontChanged=ye.setFont,ye.tipGrip=new he,ye.tipGrip.visual.transform.baseVal.appendItem(Xe.createTransform()),ye.controlBox.appendChild(ye.tipGrip.visual),ye}return Oe(Ee,ze),Ee.prototype.ownsTarget=function(Pe){return ze.prototype.ownsTarget.call(this,Pe)||this.tipGrip.ownsTarget(Pe)||this.tip===Pe},Ee.prototype.createTip=function(){Xe.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Xe.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},Ee.prototype.pointerDown=function(Pe,Fe){this.state==="new"&&ze.prototype.pointerDown.call(this,Pe,Fe),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Fe)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ze.prototype.pointerDown.call(this,Pe,Fe)},Ee.prototype.pointerUp=function(Pe){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ze.prototype.pointerUp.call(this,Pe);else{var Fe=this.state==="creating";ze.prototype.pointerUp.call(this,Pe),this.setTipPoints(Fe),this.positionTip()}},Ee.prototype.manipulate=function(Pe){if(this.tipMoving){var Fe=this.unrotatePoint(Pe);this.tipPosition={x:Fe.x-this.manipulationStartLeft,y:Fe.y-this.manipulationStartTop},this.positionTip()}else ze.prototype.manipulate.call(this,Pe)},Ee.prototype.setBgColor=function(Pe){this.bgRectangle&&this.tip&&(Xe.setAttributes(this.bgRectangle,[["fill",Pe]]),Xe.setAttributes(this.tip,[["fill",Pe]])),this.bgColor=Pe,this.fillColorChanged(Pe)},Ee.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},Ee.prototype.setTipPoints=function(Pe){Pe===void 0&&(Pe=!1);var Fe=Math.min(this.height/2,15),Ae=this.height/5;Pe&&(this.tipPosition={x:Fe+Ae/2,y:this.height+20});var ye=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?ye<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Ae=this.width/5,Fe=Math.min(this.width/2,15),this.tipBase1Position={x:Fe,y:0},this.tipBase2Position={x:Fe+Ae,y:0}):(this.tipBase1Position={x:0,y:Fe},this.tipBase2Position={x:0,y:Fe+Ae}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?ye<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Ae=this.width/5,Fe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Fe-Ae,y:0},this.tipBase2Position={x:this.width-Fe,y:0}):(this.tipBase1Position={x:this.width,y:Fe},this.tipBase2Position={x:this.width,y:Fe+Ae}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?ye<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Ae=this.width/5,Fe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Fe-Ae,y:this.height},this.tipBase2Position={x:this.width-Fe,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Fe-Ae},this.tipBase2Position={x:this.width,y:this.height-Fe}):ye<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Ae=this.width/5,Fe=Math.min(this.width/2,15),this.tipBase1Position={x:Fe,y:this.height},this.tipBase2Position={x:Fe+Ae,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Fe},this.tipBase2Position={x:0,y:this.height-Fe-Ae})},Ee.prototype.resize=function(Pe){ze.prototype.resize.call(this,Pe),this.positionTip()},Ee.prototype.positionTip=function(){Xe.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Pe=this.tipGrip.visual.transform.baseVal.getItem(0);Pe.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Pe,0)},Object.defineProperty(Ee.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Ee.prototype.select=function(){this.positionTip(),ze.prototype.select.call(this)},Ee.prototype.getState=function(){var Pe=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},ze.prototype.getState.call(this));return Pe.typeName=Ee.typeName,Pe},Ee.prototype.restoreState=function(Pe){var Fe=Pe;this.bgColor=Fe.bgColor,this.tipPosition=Fe.tipPosition,ze.prototype.restoreState.call(this,Pe),this.createTip(),this.setTipPoints()},Ee.prototype.scale=function(Pe,Fe){ze.prototype.scale.call(this,Pe,Fe),this.tipPosition={x:this.tipPosition.x*Pe,y:this.tipPosition.y*Fe},this.positionTip()},Ee.typeName="CalloutMarker",Ee.title="Callout marker",Ee.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>',Ee}(Et),Ln=function(ze){function Ee(Pe,Fe,Ae){var ye=ze.call(this,Pe,Fe,Ae)||this;return ye.fillColor="transparent",ye.strokeColor="transparent",ye.strokeWidth=0,ye.strokeDasharray="",ye.opacity=1,ye.strokeColor=Ae.defaultColor,ye.strokeWidth=Ae.defaultStrokeWidth,ye.strokeDasharray=Ae.defaultStrokeDasharray,ye.fillColor=Ae.defaultFillColor,ye.setStrokeColor=ye.setStrokeColor.bind(ye),ye.setFillColor=ye.setFillColor.bind(ye),ye.setStrokeWidth=ye.setStrokeWidth.bind(ye),ye.setStrokeDasharray=ye.setStrokeDasharray.bind(ye),ye.setOpacity=ye.setOpacity.bind(ye),ye.createVisual=ye.createVisual.bind(ye),ye.strokePanel=new ee("Line color",Ge(Ae.defaultColorSet,["transparent"]),Ae.defaultColor),ye.strokePanel.onColorChanged=ye.setStrokeColor,ye.fillPanel=new ee("Fill color",Ge(Ae.defaultColorSet,["transparent"]),ye.fillColor,Ue),ye.fillPanel.onColorChanged=ye.setFillColor,ye.strokeWidthPanel=new Be("Line width",Ae.defaultStrokeWidths,Ae.defaultStrokeWidth),ye.strokeWidthPanel.onWidthChanged=ye.setStrokeWidth,ye.strokeStylePanel=new He("Line style",Ae.defaultStrokeDasharrays,Ae.defaultStrokeDasharray),ye.strokeStylePanel.onStyleChanged=ye.setStrokeDasharray,ye.opacityPanel=new _t("Opacity",Ae.defaultOpacitySteps,ye.opacity),ye.opacityPanel.onOpacityChanged=ye.setOpacity,ye}return Oe(Ee,ze),Ee.prototype.ownsTarget=function(Pe){return!(!ze.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual)},Ee.prototype.createVisual=function(){this.visual=Xe.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)},Ee.prototype.pointerDown=function(Pe,Fe){ze.prototype.pointerDown.call(this,Pe,Fe),this.state==="new"&&(this.createVisual(),this.moveVisual(Pe),this._state="creating")},Ee.prototype.manipulate=function(Pe){ze.prototype.manipulate.call(this,Pe)},Ee.prototype.resize=function(Pe){ze.prototype.resize.call(this,Pe),this.setSize()},Ee.prototype.setSize=function(){ze.prototype.setSize.call(this),Xe.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},Ee.prototype.pointerUp=function(Pe){ze.prototype.pointerUp.call(this,Pe),this.setSize()},Ee.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.visual&&Xe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Pe),this.stateChanged()},Ee.prototype.setFillColor=function(Pe){this.fillColor=Pe,this.visual&&Xe.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Pe),this.stateChanged()},Ee.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.visual&&Xe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ee.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.visual&&Xe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Ee.prototype.setOpacity=function(Pe){this.opacity=Pe,this.visual&&Xe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Ee.prototype.getState=function(){var Pe=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ze.prototype.getState.call(this));return Pe.typeName=Ee.typeName,Pe},Ee.prototype.restoreState=function(Pe){var Fe=Pe;this.fillColor=Fe.fillColor,this.strokeColor=Fe.strokeColor,this.strokeWidth=Fe.strokeWidth,this.strokeDasharray=Fe.strokeDasharray,this.opacity=Fe.opacity,this.createVisual(),ze.prototype.restoreState.call(this,Pe),this.setSize()},Ee.prototype.scale=function(Pe,Fe){ze.prototype.scale.call(this,Pe,Fe),this.setSize()},Ee.typeName="EllipseMarker",Ee.title="Ellipse marker",Ee.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>',Ee}(be),Fn=function(ze){function Ee(Pe,Fe,Ae){return ze.call(this,Pe,Fe,Ae)||this}return Oe(Ee,ze),Object.defineProperty(Ee.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),Ee.prototype.ownsTarget=function(Pe){return!(!ze.prototype.ownsTarget.call(this,Pe)&&Pe!==this.tip1&&Pe!==this.tip2)},Ee.prototype.createTips=function(){this.tip1=Xe.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(Xe.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Xe.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(Xe.createTransform()),this.visual.appendChild(this.tip2)},Ee.prototype.pointerDown=function(Pe,Fe){ze.prototype.pointerDown.call(this,Pe,Fe),this.state==="creating"&&this.createTips()},Ee.prototype.adjustVisual=function(){if(ze.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Xe.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()]]),Xe.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 Pe=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Fe=this.tip1.transform.baseVal.getItem(0);Fe.setRotate(Pe,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Fe,0);var Ae=this.tip2.transform.baseVal.getItem(0);Ae.setRotate(Pe+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Ae,0)}},Object.defineProperty(Ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ee.prototype.getState=function(){var Pe=ze.prototype.getState.call(this);return Pe.typeName=Ee.typeName,Pe},Ee.prototype.restoreState=function(Pe){ze.prototype.restoreState.call(this,Pe),this.createTips(),this.adjustVisual()},Ee.typeName="MeasurementMarker",Ee.title="Measurement marker",Ee.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>',Ee}(Pt),Gt=function(ze){function Ee(Pe,Fe,Ae){var ye=ze.call(this,Pe,Fe,Ae)||this;return ye.strokePanel.colors=Ae.defaultColorSet,ye.fillColor="transparent",ye}return Oe(Ee,ze),Object.defineProperty(Ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ee.prototype.getState=function(){var Pe=ze.prototype.getState.call(this);return Pe.typeName=Ee.typeName,Pe},Ee.typeName="EllipseFrameMarker",Ee.title="Ellipse frame marker",Ee.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>',Ee}(Ln),rn=function(){function ze(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(ze.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),ze.prototype.addUndoStep=function(Ee){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(Ee)||(this.undoStack.push(Ee),JSON.stringify(this.lastRedoStep)!==JSON.stringify(Ee)&&this.redoStack.splice(0,this.redoStack.length))},ze.prototype.replaceLastUndoStep=function(Ee){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Ee)},ze.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},ze.prototype.undo=function(){if(this.undoStack.length>1){var Ee=this.undoStack.pop();return Ee!==void 0&&this.redoStack.push(Ee),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},ze.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},ze}(),An=function(ze){function Ee(Pe,Fe,Ae){var ye=ze.call(this,Pe,Fe,Ae)||this;return ye.strokeColor="transparent",ye.strokeWidth=0,ye.strokeDasharray="",ye.curveX=0,ye.curveY=0,ye.manipulationStartCurveX=0,ye.manipulationStartCurveY=0,ye.setStrokeColor=ye.setStrokeColor.bind(ye),ye.setStrokeWidth=ye.setStrokeWidth.bind(ye),ye.setStrokeDasharray=ye.setStrokeDasharray.bind(ye),ye.positionGrips=ye.positionGrips.bind(ye),ye.addControlGrips=ye.addControlGrips.bind(ye),ye.adjustVisual=ye.adjustVisual.bind(ye),ye.setupControlBox=ye.setupControlBox.bind(ye),ye.resize=ye.resize.bind(ye),ye.strokeColor=Ae.defaultColor,ye.strokeWidth=Ae.defaultStrokeWidth,ye.strokeDasharray=Ae.defaultStrokeDasharray,ye.strokePanel=new ee("Line color",Ae.defaultColorSet,Ae.defaultColor),ye.strokePanel.onColorChanged=ye.setStrokeColor,ye.strokeWidthPanel=new Be("Line width",Ae.defaultStrokeWidths,Ae.defaultStrokeWidth),ye.strokeWidthPanel.onWidthChanged=ye.setStrokeWidth,ye.strokeStylePanel=new He("Line style",Ae.defaultStrokeDasharrays,Ae.defaultStrokeDasharray),ye.strokeStylePanel.onStyleChanged=ye.setStrokeDasharray,ye}return Oe(Ee,ze),Ee.prototype.ownsTarget=function(Pe){return!(!ze.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual&&Pe!==this.selectorCurve&&Pe!==this.visibleCurve&&!this.curveGrip.ownsTarget(Pe))},Ee.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},Ee.prototype.createVisual=function(){this.visual=Xe.createGroup(),this.selectorCurve=Xe.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Xe.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)},Ee.prototype.pointerDown=function(Pe,Fe){ze.prototype.pointerDown.call(this,Pe,Fe),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Pe.x,this.curveY=Pe.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Fe)&&(this.activeGrip=this.curveGrip,this._state="resize")},Ee.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Xe.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Xe.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Xe.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Ee.prototype.setupControlBox=function(){ze.prototype.setupControlBox.call(this),this.curveControlLine1=Xe.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Xe.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)},Ee.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,ze.prototype.addControlGrips.call(this)},Ee.prototype.positionGrips=function(){ze.prototype.positionGrips.call(this);var Pe=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Pe/2,this.curveY-Pe/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()))},Ee.prototype.manipulate=function(Pe){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Pe.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Pe.y-this.manipulationStartY),ze.prototype.manipulate.call(this,Pe)},Ee.prototype.resize=function(Pe){this.activeGrip===this.curveGrip&&(this.curveX=Pe.x,this.curveY=Pe.y),ze.prototype.resize.call(this,Pe),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},Ee.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.adjustVisual(),this.colorChanged(Pe)},Ee.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.adjustVisual()},Ee.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.adjustVisual()},Ee.prototype.scale=function(Pe,Fe){this.curveX=this.curveX*Pe,this.curveY=this.curveY*Fe,ze.prototype.scale.call(this,Pe,Fe)},Object.defineProperty(Ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ee.prototype.getState=function(){var Pe=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},ze.prototype.getState.call(this));return Pe.typeName=Ee.typeName,Pe},Ee.prototype.restoreState=function(Pe){ze.prototype.restoreState.call(this,Pe);var Fe=Pe;this.strokeColor=Fe.strokeColor,this.strokeWidth=Fe.strokeWidth,this.strokeDasharray=Fe.strokeDasharray,this.curveX=Fe.curveX,this.curveY=Fe.curveY,this.createVisual(),this.adjustVisual()},Ee.typeName="CurveMarker",Ee.title="Curve marker",Ee.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>',Ee}(Qe),ni=function(ze){function Ee(Pe,Fe,Ae){var ye=ze.call(this,Pe,Fe,Ae)||this;return ye.fillColor="transparent",ye.strokeColor="transparent",ye.strokeWidth=0,ye.strokeDasharray="",ye.textColor="transparent",ye.fontSize="1rem",ye.isMoved=!1,ye.captionText="Caption",ye.PADDING=5,ye.captionBoxWidth=0,ye.captionBoxHeight=0,ye.strokeColor=Ae.defaultColor,ye.strokeWidth=Ae.defaultStrokeWidth,ye.strokeDasharray=Ae.defaultStrokeDasharray,ye.fillColor=Ae.defaultFillColor,ye.textColor=Ae.defaultStrokeColor,ye.fontFamily=Ae.defaultFontFamily,ye.fontSize=Ae.defaultCaptionFontSize,ye.captionText=Ae.defaultCaptionText,ye.setStrokeColor=ye.setStrokeColor.bind(ye),ye.setFillColor=ye.setFillColor.bind(ye),ye.setStrokeWidth=ye.setStrokeWidth.bind(ye),ye.setStrokeDasharray=ye.setStrokeDasharray.bind(ye),ye.createVisual=ye.createVisual.bind(ye),ye.sizeCaption=ye.sizeCaption.bind(ye),ye.setCaptionText=ye.setCaptionText.bind(ye),ye.showTextEditor=ye.showTextEditor.bind(ye),ye.positionTextEditor=ye.positionTextEditor.bind(ye),ye.finishTextEditing=ye.finishTextEditing.bind(ye),ye.setFont=ye.setFont.bind(ye),ye.setTextColor=ye.setTextColor.bind(ye),ye.strokePanel=new ee("Line color",Ge(Ae.defaultColorSet,["transparent"]),ye.strokeColor),ye.strokePanel.onColorChanged=ye.setStrokeColor,ye.fillPanel=new ee("Fill color",Ge(Ae.defaultColorSet,["transparent"]),ye.fillColor,Ue),ye.fillPanel.onColorChanged=ye.setFillColor,ye.strokeWidthPanel=new Be("Line width",Ae.defaultStrokeWidths,Ae.defaultStrokeWidth),ye.strokeWidthPanel.onWidthChanged=ye.setStrokeWidth,ye.strokeStylePanel=new He("Line style",Ae.defaultStrokeDasharrays,Ae.defaultStrokeDasharray),ye.strokeStylePanel.onStyleChanged=ye.setStrokeDasharray,ye.fontFamilyPanel=new Ze("Font",Ae.defaultFontFamilies,Ae.defaultFontFamily),ye.fontFamilyPanel.onFontChanged=ye.setFont,ye.textColorPanel=new ee("Text color",Ae.defaultColorSet,ye.textColor,ot),ye.textColorPanel.onColorChanged=ye.setTextColor,ye}return Oe(Ee,ze),Ee.prototype.ownsTarget=function(Pe){return!(!ze.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual&&Pe!==this.frame&&Pe!==this.captionBg&&Pe!==this.captionElement)},Ee.prototype.createVisual=function(){this.visual=Xe.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Xe.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Xe.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=Xe.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()},Ee.prototype.setCaptionText=function(Pe){this.captionText=Pe,this.captionElement.textContent=this.captionText,this.sizeCaption()},Ee.prototype.pointerDown=function(Pe,Fe){ze.prototype.pointerDown.call(this,Pe,Fe),this.isMoved=!1,this.pointerDownPoint=Pe,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Pe),this._state="creating")},Ee.prototype.manipulate=function(Pe){ze.prototype.manipulate.call(this,Pe),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Pe.x-this.pointerDownPoint.x)>5||Math.abs(Pe.y-this.pointerDownPoint.y)>5)},Ee.prototype.resize=function(Pe){ze.prototype.resize.call(this,Pe),this.setSize()},Ee.prototype.sizeCaption=function(){var Pe=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Pe.width+2*this.PADDING,this.captionBoxHeight=Pe.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),Xe.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')"]]),Xe.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')"]])},Ee.prototype.showTextEditor=function(){var Pe=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(Fe){Fe.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Fe){Fe.key==="Enter"&&Pe.finishTextEditing(Pe.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Fe){Fe.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Pe.finishTextEditing(Pe.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Pe.finishTextEditing(Pe.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},Ee.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"))},Ee.prototype.finishTextEditing=function(Pe){this.setCaptionText(Pe.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Ee.prototype.setFont=function(Pe){this.captionElement&&Xe.setAttributes(this.captionElement,[["font-family",Pe]]),this.fontFamily=Pe,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},Ee.prototype.setTextColor=function(Pe){this.captionElement&&Xe.setAttributes(this.captionElement,[["fill",Pe]]),this.textColor=Pe,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},Ee.prototype.setSize=function(){ze.prototype.setSize.call(this),Xe.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Ee.prototype.pointerUp=function(Pe){ze.prototype.pointerUp.call(this,Pe),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},Ee.prototype.dblClick=function(Pe,Fe){ze.prototype.dblClick.call(this,Pe,Fe),this.showTextEditor()},Ee.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.frame&&Xe.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Pe),this.stateChanged()},Ee.prototype.setFillColor=function(Pe){this.fillColor=Pe,this.captionBg&&Xe.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Pe),this.stateChanged()},Ee.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.frame&&Xe.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ee.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.frame&&Xe.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(Ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),Ee.prototype.getState=function(){var Pe=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},ze.prototype.getState.call(this));return Pe.typeName=this.typeName,Pe},Ee.prototype.restoreState=function(Pe){var Fe=Pe;this.fillColor=Fe.fillColor,this.strokeColor=Fe.strokeColor,this.strokeWidth=Fe.strokeWidth,this.strokeDasharray=Fe.strokeDasharray,this.textColor=Fe.textColor,this.fontFamily=Fe.fontFamily,this.captionText=Fe.captionText,this.fontSize=Fe.fontSize,this.createVisual(),ze.prototype.restoreState.call(this,Pe),this.setSize()},Ee.prototype.scale=function(Pe,Fe){ze.prototype.scale.call(this,Pe,Fe),this.setSize()},Ee.typeName="CaptionFrameMarker",Ee.title="Caption frame marker",Ee.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>',Ee}(be),Sn=function(){function ze(Ee,Pe){Pe===void 0&&(Pe=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Ee,this.cancelable=Pe}return Object.defineProperty(ze.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),ze.prototype.preventDefault=function(){this._defaultPrevented=!0},ze}(),Yn=function(ze){function Ee(Pe,Fe,Ae){var ye=ze.call(this,Pe,!1)||this;return ye.dataUrl=Fe,ye.state=Ae,ye}return Oe(Ee,ze),Ee}(Sn),It=function(ze){function Ee(Pe,Fe,Ae){Ae===void 0&&(Ae=!1);var ye=ze.call(this,Pe,Ae)||this;return ye.marker=Fe,ye}return Oe(Ee,ze),Ee}(Sn),wn=function(){function ze(){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 ze.prototype.addEventListener=function(Ee,Pe){this[Ee].push(Pe)},ze.prototype.removeEventListener=function(Ee,Pe){var Fe=this[Ee].indexOf(Pe);Fe>-1&&this[Ee].splice(Fe,1)},ze}(),Gn=function(){function ze(Ee){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new rt,this._isOpen=!1,this.undoRedoManager=new rn,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new wn,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ze.instanceCounter++,this.styles=new Ve(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=Ee,this.targetRoot=document.body,this.width=Ee.clientWidth,this.height=Ee.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(ze.prototype,"ALL_MARKER_TYPES",{get:function(){return[We,it,ht,Et,Gt,Ln,Vt,Wt,Fn,Ht,Pt,An,ni]},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[We,it,ht,Et,Ln,Vt,Wt]},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"BASIC_MARKER_TYPES",{get:function(){return[We,it,ht,Et,Vt]},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Ee){var Pe=this;this._availableMarkerTypes.splice(0),Ee.forEach(function(Fe){if(typeof Fe=="string"){var Ae=Pe.ALL_MARKER_TYPES.find(function(ye){return ye.typeName===Fe});Ae!==void 0&&Pe._availableMarkerTypes.push(Ae)}else Pe._availableMarkerTypes.push(Fe)})},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(Ee){this._zoomLevel=Ee,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(ze.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),ze.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Ne.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ze.prototype.show=function(){var Ee=this;this.styles.styleSheetRoot===void 0&&Ct.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ct.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Pe){return Pe(new Sn(Ee))})},ze.prototype.render=function(){return Ke(this,void 0,void 0,function(){var Ee;return ut(this,function(Pe){switch(Pe.label){case 0:return this.setCurrentMarker(),(Ee=new Tt).naturalSize=this.renderAtNaturalSize,Ee.imageType=this.renderImageType,Ee.imageQuality=this.renderImageQuality,Ee.markersOnly=this.renderMarkersOnly,Ee.width=this.renderWidth,Ee.height=this.renderHeight,[4,Ee.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Pe.sent(),[4,Ee.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Pe.sent()]}})})},ze.prototype.close=function(Ee){var Pe=this;if(Ee===void 0&&(Ee=!1),this.isOpen){var Fe=!1;Ee||this.eventListeners.beforeclose.forEach(function(Ae){var ye=new Sn(Pe,!0);Ae(ye),ye.defaultPrevented&&(Fe=!0)}),Fe||(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(Ae){return Ae(new Sn(Pe))}),this.detachEvents(),this._isOpen=!1)}},ze.prototype.addMarkersToToolbar=function(){for(var Ee,Pe=[],Fe=0;Fe<arguments.length;Fe++)Pe[Fe]=arguments[Fe];(Ee=this._availableMarkerTypes).push.apply(Ee,Pe)},ze.prototype.addRenderEventListener=function(Ee){this.addEventListener("render",function(Pe){Ee(Pe.dataUrl,Pe.state)})},ze.prototype.removeRenderEventListener=function(Ee){},ze.prototype.addCloseEventListener=function(Ee){this.addEventListener("close",function(){Ee()})},ze.prototype.removeCloseEventListener=function(Ee){},ze.prototype.setupResizeObserver=function(){var Ee=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){Ee.resize(Ee.target.clientWidth,Ee.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return Ee.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},ze.prototype.onPopupTargetResize=function(){var Ee=1*this.target.clientWidth/this.target.clientHeight,Pe=this.editorCanvas.clientWidth/Ee>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Ee:this.editorCanvas.clientWidth,Fe=Pe<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/Ee;this.resize(Pe,Fe)},ze.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ze.prototype.resize=function(Ee,Pe){this._isResizing=!0;var Fe=Ee/this.imageWidth,Ae=Pe/this.imageHeight;this.imageWidth=Math.round(Ee),this.imageHeight=Math.round(Pe),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(Fe,Ae),this._isResizing=!1},ze.prototype.scaleMarkers=function(Ee,Pe){var Fe,Ae=this;this._currentMarker&&this._currentMarker instanceof Et?this._currentMarker.scale(Ee,Pe):(Fe=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(ye){ye!==Ae._currentMarker&&ye.scale(Ee,Pe)}),Fe!==void 0&&this.setCurrentMarker(Fe)},ze.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"},ze.prototype.setTopLeft=function(){var Ee=this.editingTarget.getBoundingClientRect(),Pe=this.editorCanvas.getBoundingClientRect();this.left=Ee.left-Pe.left,this.top=Ee.top-Pe.top},ze.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)},ze.prototype.addDefs=function(){for(var Ee,Pe=[],Fe=0;Fe<arguments.length;Fe++)Pe[Fe]=arguments[Fe];this.defs=Xe.createDefs(),this.addDefsToImage(),(Ee=this.defs).append.apply(Ee,Pe)},ze.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},ze.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)},ze.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},ze.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},ze.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)},ze.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},ze.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)},ze.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 Ee=document.createElement("a");Ee.href="https://markerjs.com/",Ee.target="_blank",Ee.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>',Ee.title="Powered by marker.js",Ee.style.display="grid",Ee.style.alignItems="center",Ee.style.justifyItems="center",Ee.style.padding="3px",Ee.style.width="20px",Ee.style.height="20px",this.logoUI.appendChild(Ee),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},ze.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")},ze.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"},ze.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ze.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 Ee=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=Ee+"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 Rt(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 De(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},ze.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ze.prototype.removeMarker=function(Ee){this.markerImage.removeChild(Ee.container),this.markers.indexOf(Ee)>-1&&this.markers.splice(this.markers.indexOf(Ee),1),Ee.dispose()},ze.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())},ze.prototype.toolbarButtonClicked=function(Ee,Pe){if(Ee==="marker"&&Pe!==void 0)this.createNewMarker(Pe);else if(Ee==="action")switch(Pe){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()}},ze.prototype.deleteSelectedMarker=function(){var Ee=this;if(this._currentMarker!==void 0){var Pe=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Ae){var ye=new It(Ee,Ee._currentMarker,!0);Ae(ye),ye.defaultPrevented&&(Pe=!0)}),!Pe){var Fe=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(Ae){return Ae(new It(Ee,Fe))})}}},ze.prototype.clear=function(){var Ee=this,Pe=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(qe){var vt=new It(Ee,void 0,!0);qe(vt),vt.defaultPrevented&&(Pe=!0)}),!Pe)){this.setCurrentMarker();for(var Fe=function(qe){var vt=Ae.markers[qe];Ae.setCurrentMarker(Ae.markers[qe]),Ae._currentMarker.dispose(),Ae.markerImage.removeChild(Ae._currentMarker.container),Ae.markers.splice(Ae.markers.indexOf(Ae._currentMarker),1),Ae.eventListeners.markerdelete.forEach(function(et){return et(new It(Ee,vt))})},Ae=this,ye=this.markers.length-1;ye>=0;ye--)Fe(ye);this.addUndoStep()}},Object.defineProperty(ze.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ze.prototype.showNotesEditor=function(){var Ee;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=(Ee=this._currentMarker.notes)!==null&&Ee!==void 0?Ee:"",this.overlayContainer.appendChild(this.notesArea))},ze.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)},ze.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},ze.prototype.addUndoStep=function(){var Ee=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Pe=this.getState(),Fe=this.undoRedoManager.getLastUndoStep();if(!Fe||Fe.width===Pe.width&&Fe.height===Pe.height){var Ae=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Pe),Ae<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(ye){return ye(new Sn(Ee))})}else this.undoRedoManager.replaceLastUndoStep(Pe),this.eventListeners.statechange.forEach(function(ye){return ye(new Sn(Ee))})}},ze.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},ze.prototype.undoStep=function(){var Ee=this,Pe=this.undoRedoManager.undo();Pe!==void 0&&(this.restoreState(Pe),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Fe){return Fe(new Sn(Ee))}))},ze.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},ze.prototype.redoStep=function(){var Ee=this,Pe=this.undoRedoManager.redo();Pe!==void 0&&(this.restoreState(Pe),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Fe){return Fe(new Sn(Ee))}))},ze.prototype.stepZoom=function(){var Ee=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=Ee<this.zoomSteps.length-1?this.zoomSteps[Ee+1]:this.zoomSteps[0]},ze.prototype.panTo=function(Ee){this.contentDiv.scrollBy({left:this.prevPanPoint.x-Ee.x,top:this.prevPanPoint.y-Ee.y}),this.prevPanPoint=Ee},ze.prototype.startRenderAndClose=function(){return Ke(this,void 0,void 0,function(){var Ee,Pe,Fe=this;return ut(this,function(Ae){switch(Ae.label){case 0:return[4,this.render()];case 1:return Ee=Ae.sent(),Pe=this.getState(),this.eventListeners.render.forEach(function(ye){return ye(new Yn(Fe,Ee,Pe))}),this.close(!0),[2]}})})},ze.prototype.getState=function(Ee){Ee===!0&&this.setCurrentMarker();var Pe={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Fe){return Pe.markers.push(Fe.getState())}),Pe},ze.prototype.restoreState=function(Ee){var Pe=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);Ee.markers.forEach(function(Fe){var Ae=Pe._availableMarkerTypes.find(function(qe){return qe.typeName===Fe.typeName});if(Ae!==void 0){var ye=Pe.addNewMarker(Ae);ye.restoreState(Fe),Pe.markers.push(ye)}}),Ee.width&&Ee.height&&(Ee.width!==this.imageWidth||Ee.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/Ee.width,this.imageHeight/Ee.height),this.eventListeners.restorestate.forEach(function(Fe){return Fe(new Sn(Pe))})},ze.prototype.addNewMarker=function(Ee){var Pe=Xe.createGroup();return this.markerImage.appendChild(Pe),new Ee(Pe,this.overlayContainer,this.settings)},ze.prototype.createNewMarker=function(Ee){var Pe,Fe=this;(Pe=typeof Ee=="string"?this._availableMarkerTypes.find(function(Ae){return Ae.typeName===Ee}):Ee)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Pe),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(Pe.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Ae){return Ae(new It(Fe,Fe._currentMarker))}))},ze.prototype.markerCreated=function(Ee){var Pe=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(Ee),this.setCurrentMarker(Ee),Ee instanceof it&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(it):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Fe){return Fe(new It(Pe,Pe._currentMarker))})},ze.prototype.colorChanged=function(Ee){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=Ee,this.settings.defaultStrokeColor=Ee)},ze.prototype.fillColorChanged=function(Ee){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=Ee)},ze.prototype.markerStateChanged=function(Ee){var Pe=this;this.eventListeners.markerchange.forEach(function(Fe){return Fe(new It(Pe,Ee))})},ze.prototype.setCurrentMarker=function(Ee){var Pe=this;this._currentMarker!==Ee&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Fe){return Fe(new It(Pe,Pe._currentMarker))})),this._currentMarker=Ee,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(Fe){return Fe(new It(Pe,Pe._currentMarker))}))},ze.prototype.onPointerDown=function(Ee){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||Ee.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var Pe=this.markers.find(function(Fe){return Fe.ownsTarget(Ee.target)});Pe!==void 0?(this.setCurrentMarker(Pe),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Ee.clientX,Ee.clientY),Ee.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:Ee.clientX,y:Ee.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Ee.clientX,Ee.clientY))},ze.prototype.onDblClick=function(Ee){if(this._isFocused||this.focus(),this.mode==="select"){var Pe=this.markers.find(function(Fe){return Fe.ownsTarget(Ee.target)});Pe!==void 0&&Pe!==this._currentMarker&&this.setCurrentMarker(Pe),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(Ee.clientX,Ee.clientY),Ee.target):this.setCurrentMarker()}},ze.prototype.onPointerMove=function(Ee){this.touchPoints!==1&&Ee.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||Ee.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(Ee.clientX,Ee.clientY)):this.zoomLevel>1&&this.panTo({x:Ee.clientX,y:Ee.clientY}))},ze.prototype.onPointerUp=function(Ee){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(Ee.clientX,Ee.clientY)),this.isDragging=!1,this.addUndoStep()},ze.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ze.prototype.onKeyUp=function(Ee){this._currentMarker===void 0||this.notesArea!==void 0||Ee.key!=="Delete"&&Ee.key!=="Backspace"||this.deleteSelectedMarker()},ze.prototype.clientToLocalCoordinates=function(Ee,Pe){var Fe=this.markerImage.getBoundingClientRect();return{x:(Ee-Fe.left)/this.zoomLevel,y:(Pe-Fe.top)/this.zoomLevel}},ze.prototype.onWindowResize=function(){this.positionUI()},ze.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var Ee=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Ee+"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()},ze.prototype.addLicenseKey=function(Ee){Ne.addKey(Ee)},ze.prototype.addEventListener=function(Ee,Pe){this.eventListeners.addEventListener(Ee,Pe)},ze.prototype.removeEventListener=function(Ee,Pe){this.eventListeners.removeEventListener(Ee,Pe)},ze.prototype.renderState=function(Ee){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(Ee),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(ze.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ze.prototype.focus=function(){var Ee=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Pe){return Pe(new Sn(Ee))}))},ze.prototype.blur=function(){var Ee=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Pe){return Pe(new Sn(Ee))}))},ze.instanceCounter=0,ze}()},17115:function(Vn,xn,pe){"use strict";pe.d(xn,{ZP:function(){return Ne}});var ge=pe(72071),Oe=pe(59301),Ke=pe(47273),ut=0,Ge=(0,Ke.Z)();function Xe(){var Tt;return Ge?(Tt=ut,ut+=1):Tt="TEST_OR_SSR",Tt}function Ne(Tt){var Ct=Oe.useState(),Ve=(0,ge.Z)(Ct,2),Lt=Ve[0],dt=Ve[1];return Oe.useEffect(function(){dt("rc_select_".concat(Xe()))},[]),Tt||Lt}},77861:function(Vn,xn,pe){"use strict";pe.d(xn,{Ac:function(){return zt},Xo:function(){return gi},Wx:function(){return Xi},ZP:function(){return vn},lk:function(){return be}});var ge=pe(96663),Oe=pe(19127),Ke=pe(90493),ut=pe(44127),Ge=pe(72071),Xe=pe(6620),Ne=pe(20135),Tt=pe(18929),Ct=pe(48736),Ve=pe(59301),Lt=pe(92310),dt=pe.n(Lt),Rt=pe(34280),De=pe(49658),ne=pe(10228),ee=pe(8654),ce=function(st){var on=st.className,En=st.customizeIcon,Dn=st.customizeIconProps,Jn=st.onMouseDown,St=st.onClick,Nn=st.children,qn;return typeof En=="function"?qn=En(Dn):qn=En,Ve.createElement("span",{className:on,onMouseDown:function(en){en.preventDefault(),Jn&&Jn(en)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:St,"aria-hidden":!0},qn!==void 0?qn:Ve.createElement("span",{className:dt()(on.split(/\s+/).map(function(Si){return"".concat(Si,"-icon")}))},Nn))},se=ce;function he(Ft,st,on,En,Dn){var Jn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,St=arguments.length>6?arguments[6]:void 0,Nn=arguments.length>7?arguments[7]:void 0,qn=Ve.useMemo(function(){if((0,Ne.Z)(En)==="object")return En.clearIcon;if(Dn)return Dn},[En,Dn]),Si=Ve.useMemo(function(){return!!(!Jn&&En&&(on.length||St)&&!(Nn==="combobox"&&St===""))},[En,Jn,on.length,St,Nn]);return{allowClear:Si,clearIcon:Ve.createElement(se,{className:"".concat(Ft,"-clear"),onMouseDown:st,customizeIcon:qn},"\xD7")}}var ve=Ve.createContext(null);function be(){return Ve.useContext(ve)}function ke(){var Ft=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,st=Ve.useState(!1),on=(0,Ge.Z)(st,2),En=on[0],Dn=on[1],Jn=Ve.useRef(null),St=function(){window.clearTimeout(Jn.current)};Ve.useEffect(function(){return St},[]);var Nn=function(Si,en){St(),Jn.current=window.setTimeout(function(){Dn(Si),en&&en()},Ft)};return[En,Nn,St]}function Be(){var Ft=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,st=Ve.useRef(null),on=Ve.useRef(null);Ve.useEffect(function(){return function(){window.clearTimeout(on.current)}},[]);function En(Dn){(Dn||st.current===null)&&(st.current=Dn),window.clearTimeout(on.current),on.current=window.setTimeout(function(){st.current=null},Ft)}return[function(){return st.current},En]}function He(Ft,st,on,En){var Dn=Ve.useRef(null);Dn.current={open:st,triggerOpen:on,customizedTrigger:En},Ve.useEffect(function(){function Jn(St){var Nn;if(!((Nn=Dn.current)!==null&&Nn!==void 0&&Nn.customizedTrigger)){var qn=St.target;qn.shadowRoot&&St.composed&&(qn=St.composedPath()[0]||qn),Dn.current.open&&Ft().filter(function(Si){return Si}).every(function(Si){return!Si.contains(qn)&&Si!==qn})&&Dn.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Jn),function(){return window.removeEventListener("mousedown",Jn)}},[])}var We=pe(26112),rt=pe(11780),Qe=function(st,on){var En,Dn,Jn=st.prefixCls,St=st.id,Nn=st.inputElement,qn=st.disabled,Si=st.tabIndex,en=st.autoFocus,Cn=st.autoComplete,At=st.editable,yn=st.activeDescendantId,pn=st.value,mn=st.maxLength,Wn=st.onKeyDown,Hn=st.onMouseDown,Qn=st.onChange,ii=st.onPaste,ji=st.onCompositionStart,cn=st.onCompositionEnd,Yi=st.open,$i=st.attrs,Wi=Nn||Ve.createElement("input",null),ln=Wi,oi=ln.ref,Bi=ln.props,Gi=Bi.onKeyDown,Ti=Bi.onChange,Qi=Bi.onMouseDown,gr=Bi.onCompositionStart,hr=Bi.onCompositionEnd,Ki=Bi.style;return(0,Ct.Kp)(!("maxLength"in Wi.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Wi=Ve.cloneElement(Wi,(0,ut.Z)((0,ut.Z)((0,ut.Z)({type:"search"},Bi),{},{id:St,ref:(0,ee.sQ)(on,oi),disabled:qn,tabIndex:Si,autoComplete:Cn||"off",autoFocus:en,className:dt()("".concat(Jn,"-selection-search-input"),(En=Wi)===null||En===void 0||(Dn=En.props)===null||Dn===void 0?void 0:Dn.className),role:"combobox","aria-label":"Search","aria-expanded":Yi||!1,"aria-haspopup":"listbox","aria-owns":"".concat(St,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(St,"_list"),"aria-activedescendant":Yi?yn:void 0},$i),{},{value:At?pn:"",maxLength:mn,readOnly:!At,unselectable:At?null:"on",style:(0,ut.Z)((0,ut.Z)({},Ki),{},{opacity:At?null:0}),onKeyDown:function(kn){Wn(kn),Gi&&Gi(kn)},onMouseDown:function(kn){Hn(kn),Qi&&Qi(kn)},onChange:function(kn){Qn(kn),Ti&&Ti(kn)},onCompositionStart:function(kn){ji(kn),gr&&gr(kn)},onCompositionEnd:function(kn){cn(kn),hr&&hr(kn)},onPaste:ii})),Wi},Pt=Ve.forwardRef(Qe);Pt.displayName="Input";var Ze=Pt;function Et(Ft){return Array.isArray(Ft)?Ft:Ft!==void 0?[Ft]:[]}var it=typeof window!="undefined"&&window.document&&window.document.documentElement,Dt=it;function ht(Ft){return Ft!=null}function Ht(Ft){return!Ft&&Ft!==0}function _t(Ft){return["string","number"].includes((0,Ne.Z)(Ft))}function Vt(Ft){var st=void 0;return Ft&&(_t(Ft.title)?st=Ft.title.toString():_t(Ft.label)&&(st=Ft.label.toString())),st}function ot(Ft,st){Dt?Ve.useLayoutEffect(Ft,st):Ve.useEffect(Ft,st)}function Ue(Ft){var st;return(st=Ft.key)!==null&&st!==void 0?st:Ft.value}var Wt=function(st){st.preventDefault(),st.stopPropagation()},Ln=function(st){var on=st.id,En=st.prefixCls,Dn=st.values,Jn=st.open,St=st.searchValue,Nn=st.autoClearSearchValue,qn=st.inputRef,Si=st.placeholder,en=st.disabled,Cn=st.mode,At=st.showSearch,yn=st.autoFocus,pn=st.autoComplete,mn=st.activeDescendantId,Wn=st.tabIndex,Hn=st.removeIcon,Qn=st.maxTagCount,ii=st.maxTagTextLength,ji=st.maxTagPlaceholder,cn=ji===void 0?function(Qr){return"+ ".concat(Qr.length," ...")}:ji,Yi=st.tagRender,$i=st.onToggleOpen,Wi=st.onRemove,ln=st.onInputChange,oi=st.onInputPaste,Bi=st.onInputKeyDown,Gi=st.onInputMouseDown,Ti=st.onInputCompositionStart,Qi=st.onInputCompositionEnd,gr=Ve.useRef(null),hr=(0,Ve.useState)(0),Ki=(0,Ge.Z)(hr,2),Sr=Ki[0],kn=Ki[1],Br=(0,Ve.useState)(!1),_n=(0,Ge.Z)(Br,2),Or=_n[0],no=_n[1],br="".concat(En,"-selection"),mo=Jn||Cn==="multiple"&&Nn===!1||Cn==="tags"?St:"",Jr=Cn==="tags"||Cn==="multiple"&&Nn===!1||At&&(Jn||Or);ot(function(){kn(gr.current.scrollWidth)},[mo]);function ur(Qr,lo,jr,vo,po){return Ve.createElement("span",{className:dt()("".concat(br,"-item"),(0,Ke.Z)({},"".concat(br,"-item-disabled"),jr)),title:Vt(Qr)},Ve.createElement("span",{className:"".concat(br,"-item-content")},lo),vo&&Ve.createElement(se,{className:"".concat(br,"-item-remove"),onMouseDown:Wt,onClick:po,customizeIcon:Hn},"\xD7"))}function er(Qr,lo,jr,vo,po){var Lr=function(uo){Wt(uo),$i(!Jn)};return Ve.createElement("span",{onMouseDown:Lr},Yi({label:lo,value:Qr,disabled:jr,closable:vo,onClose:po}))}function qi(Qr){var lo=Qr.disabled,jr=Qr.label,vo=Qr.value,po=!en&&!lo,Lr=jr;if(typeof ii=="number"&&(typeof jr=="string"||typeof jr=="number")){var Fr=String(Lr);Fr.length>ii&&(Lr="".concat(Fr.slice(0,ii),"..."))}var uo=function(zo){zo&&zo.stopPropagation(),Wi(Qr)};return typeof Yi=="function"?er(vo,Lr,lo,po,uo):ur(Qr,Lr,lo,po,uo)}function Rr(Qr){var lo=typeof cn=="function"?cn(Qr):cn;return ur({title:lo},lo,!1)}var Ii=Ve.createElement("div",{className:"".concat(br,"-search"),style:{width:Sr},onFocus:function(){no(!0)},onBlur:function(){no(!1)}},Ve.createElement(Ze,{ref:qn,open:Jn,prefixCls:En,id:on,inputElement:null,disabled:en,autoFocus:yn,autoComplete:pn,editable:Jr,activeDescendantId:mn,value:mo,onKeyDown:Bi,onMouseDown:Gi,onChange:ln,onPaste:oi,onCompositionStart:Ti,onCompositionEnd:Qi,tabIndex:Wn,attrs:(0,We.Z)(st,!0)}),Ve.createElement("span",{ref:gr,className:"".concat(br,"-search-mirror"),"aria-hidden":!0},mo,"\xA0")),tt=Ve.createElement(rt.Z,{prefixCls:"".concat(br,"-overflow"),data:Dn,renderItem:qi,renderRest:Rr,suffix:Ii,itemKey:Ue,maxCount:Qn});return Ve.createElement(Ve.Fragment,null,tt,!Dn.length&&!mo&&Ve.createElement("span",{className:"".concat(br,"-placeholder")},Si))},Fn=Ln,Gt=function(st){var on=st.inputElement,En=st.prefixCls,Dn=st.id,Jn=st.inputRef,St=st.disabled,Nn=st.autoFocus,qn=st.autoComplete,Si=st.activeDescendantId,en=st.mode,Cn=st.open,At=st.values,yn=st.placeholder,pn=st.tabIndex,mn=st.showSearch,Wn=st.searchValue,Hn=st.activeValue,Qn=st.maxLength,ii=st.onInputKeyDown,ji=st.onInputMouseDown,cn=st.onInputChange,Yi=st.onInputPaste,$i=st.onInputCompositionStart,Wi=st.onInputCompositionEnd,ln=st.title,oi=Ve.useState(!1),Bi=(0,Ge.Z)(oi,2),Gi=Bi[0],Ti=Bi[1],Qi=en==="combobox",gr=Qi||mn,hr=At[0],Ki=Wn||"";Qi&&Hn&&!Gi&&(Ki=Hn),Ve.useEffect(function(){Qi&&Ti(!1)},[Qi,Hn]);var Sr=en!=="combobox"&&!Cn&&!mn?!1:!!Ki,kn=ln===void 0?Vt(hr):ln,Br=function(){if(hr)return null;var Or=Sr?{visibility:"hidden"}:void 0;return Ve.createElement("span",{className:"".concat(En,"-selection-placeholder"),style:Or},yn)};return Ve.createElement(Ve.Fragment,null,Ve.createElement("span",{className:"".concat(En,"-selection-search")},Ve.createElement(Ze,{ref:Jn,prefixCls:En,id:Dn,open:Cn,inputElement:on,disabled:St,autoFocus:Nn,autoComplete:qn,editable:gr,activeDescendantId:Si,value:Ki,onKeyDown:ii,onMouseDown:ji,onChange:function(Or){Ti(!0),cn(Or)},onPaste:Yi,onCompositionStart:$i,onCompositionEnd:Wi,tabIndex:pn,attrs:(0,We.Z)(st,!0),maxLength:Qi?Qn:void 0})),!Qi&&hr?Ve.createElement("span",{className:"".concat(En,"-selection-item"),title:kn,style:Sr?{visibility:"hidden"}:void 0},hr.label):null,Br())},rn=Gt;function An(Ft){return![ne.Z.ESC,ne.Z.SHIFT,ne.Z.BACKSPACE,ne.Z.TAB,ne.Z.WIN_KEY,ne.Z.ALT,ne.Z.META,ne.Z.WIN_KEY_RIGHT,ne.Z.CTRL,ne.Z.SEMICOLON,ne.Z.EQUALS,ne.Z.CAPS_LOCK,ne.Z.CONTEXT_MENU,ne.Z.F1,ne.Z.F2,ne.Z.F3,ne.Z.F4,ne.Z.F5,ne.Z.F6,ne.Z.F7,ne.Z.F8,ne.Z.F9,ne.Z.F10,ne.Z.F11,ne.Z.F12].includes(Ft)}var ni=function(st,on){var En=(0,Ve.useRef)(null),Dn=(0,Ve.useRef)(!1),Jn=st.prefixCls,St=st.open,Nn=st.mode,qn=st.showSearch,Si=st.tokenWithEnter,en=st.autoClearSearchValue,Cn=st.onSearch,At=st.onSearchSubmit,yn=st.onToggleOpen,pn=st.onInputKeyDown,mn=st.domRef;Ve.useImperativeHandle(on,function(){return{focus:function(){En.current.focus()},blur:function(){En.current.blur()}}});var Wn=Be(0),Hn=(0,Ge.Z)(Wn,2),Qn=Hn[0],ii=Hn[1],ji=function(Ki){var Sr=Ki.which;(Sr===ne.Z.UP||Sr===ne.Z.DOWN)&&Ki.preventDefault(),pn&&pn(Ki),Sr===ne.Z.ENTER&&Nn==="tags"&&!Dn.current&&!St&&(At==null||At(Ki.target.value)),An(Sr)&&yn(!0)},cn=function(){ii(!0)},Yi=(0,Ve.useRef)(null),$i=function(Ki){Cn(Ki,!0,Dn.current)!==!1&&yn(!0)},Wi=function(){Dn.current=!0},ln=function(Ki){Dn.current=!1,Nn!=="combobox"&&$i(Ki.target.value)},oi=function(Ki){var Sr=Ki.target.value;if(Si&&Yi.current&&/[\r\n]/.test(Yi.current)){var kn=Yi.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Sr=Sr.replace(kn,Yi.current)}Yi.current=null,$i(Sr)},Bi=function(Ki){var Sr=Ki.clipboardData,kn=Sr.getData("text");Yi.current=kn},Gi=function(Ki){var Sr=Ki.target;if(Sr!==En.current){var kn=document.body.style.msTouchAction!==void 0;kn?setTimeout(function(){En.current.focus()}):En.current.focus()}},Ti=function(Ki){var Sr=Qn();Ki.target!==En.current&&!Sr&&Nn!=="combobox"&&Ki.preventDefault(),(Nn!=="combobox"&&(!qn||!Sr)||!St)&&(St&&en!==!1&&Cn("",!0,!1),yn())},Qi={inputRef:En,onInputKeyDown:ji,onInputMouseDown:cn,onInputChange:oi,onInputPaste:Bi,onInputCompositionStart:Wi,onInputCompositionEnd:ln},gr=Nn==="multiple"||Nn==="tags"?Ve.createElement(Fn,(0,ge.Z)({},st,Qi)):Ve.createElement(rn,(0,ge.Z)({},st,Qi));return Ve.createElement("div",{ref:mn,className:"".concat(Jn,"-selector"),onClick:Gi,onMouseDown:Ti},gr)},Sn=Ve.forwardRef(ni);Sn.displayName="Selector";var Yn=Sn,It=pe(35593),wn=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Gn=function(st){var on=st===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:on,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:on,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:on,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:on,adjustY:1},htmlRegion:"scroll"}}},ze=function(st,on){var En=st.prefixCls,Dn=st.disabled,Jn=st.visible,St=st.children,Nn=st.popupElement,qn=st.animation,Si=st.transitionName,en=st.dropdownStyle,Cn=st.dropdownClassName,At=st.direction,yn=At===void 0?"ltr":At,pn=st.placement,mn=st.builtinPlacements,Wn=st.dropdownMatchSelectWidth,Hn=st.dropdownRender,Qn=st.dropdownAlign,ii=st.getPopupContainer,ji=st.empty,cn=st.getTriggerDOMNode,Yi=st.onPopupVisibleChange,$i=st.onPopupMouseEnter,Wi=(0,Xe.Z)(st,wn),ln="".concat(En,"-dropdown"),oi=Nn;Hn&&(oi=Hn(Nn));var Bi=Ve.useMemo(function(){return mn||Gn(Wn)},[mn,Wn]),Gi=qn?"".concat(ln,"-").concat(qn):Si,Ti=typeof Wn=="number",Qi=Ve.useMemo(function(){return Ti?null:Wn===!1?"minWidth":"width"},[Wn,Ti]),gr=en;Ti&&(gr=(0,ut.Z)((0,ut.Z)({},gr),{},{width:Wn}));var hr=Ve.useRef(null);return Ve.useImperativeHandle(on,function(){return{getPopupElement:function(){return hr.current}}}),Ve.createElement(It.Z,(0,ge.Z)({},Wi,{showAction:Yi?["click"]:[],hideAction:Yi?["click"]:[],popupPlacement:pn||(yn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Bi,prefixCls:ln,popupTransitionName:Gi,popup:Ve.createElement("div",{ref:hr,onMouseEnter:$i},oi),stretch:Qi,popupAlign:Qn,popupVisible:Jn,getPopupContainer:ii,popupClassName:dt()(Cn,(0,Ke.Z)({},"".concat(ln,"-empty"),ji)),popupStyle:gr,getTriggerDOMNode:cn,onPopupVisibleChange:Yi}),St)},Ee=Ve.forwardRef(ze);Ee.displayName="SelectTrigger";var Pe=Ee,Fe=pe(4537);function Ae(Ft,st){var on=Ft.key,En;return"value"in Ft&&(En=Ft.value),on!=null?on:En!==void 0?En:"rc-index-key-".concat(st)}function ye(Ft,st){var on=Ft||{},En=on.label,Dn=on.value,Jn=on.options,St=on.groupLabel,Nn=En||(st?"children":"label");return{label:Nn,value:Dn||"value",options:Jn||"options",groupLabel:St||Nn}}function qe(Ft){var st=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},on=st.fieldNames,En=st.childrenAsData,Dn=[],Jn=ye(on,!1),St=Jn.label,Nn=Jn.value,qn=Jn.options,Si=Jn.groupLabel;function en(Cn,At){Cn.forEach(function(yn){if(At||!(qn in yn)){var pn=yn[Nn];Dn.push({key:Ae(yn,Dn.length),groupOption:At,data:yn,label:yn[St],value:pn})}else{var mn=yn[Si];mn===void 0&&En&&(mn=yn.label),Dn.push({key:Ae(yn,Dn.length),group:!0,data:yn,label:mn}),en(yn[qn],!0)}})}return en(Ft,!1),Dn}function vt(Ft){var st=(0,ut.Z)({},Ft);return"props"in st||Object.defineProperty(st,"props",{get:function(){return(0,Ct.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),st}}),st}function et(Ft,st){if(!st||!st.length)return null;var on=!1;function En(Jn,St){var Nn=(0,Fe.Z)(St),qn=Nn[0],Si=Nn.slice(1);if(!qn)return[Jn];var en=Jn.split(qn);return on=on||en.length>1,en.reduce(function(Cn,At){return[].concat((0,Oe.Z)(Cn),(0,Oe.Z)(En(At,Si)))},[]).filter(function(Cn){return Cn})}var Dn=En(Ft,st);return on?Dn:null}var Ye=["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"],xt=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function yt(Ft){return Ft==="tags"||Ft==="multiple"}var at=Ve.forwardRef(function(Ft,st){var on,En,Dn=Ft.id,Jn=Ft.prefixCls,St=Ft.className,Nn=Ft.showSearch,qn=Ft.tagRender,Si=Ft.direction,en=Ft.omitDomProps,Cn=Ft.displayValues,At=Ft.onDisplayValuesChange,yn=Ft.emptyOptions,pn=Ft.notFoundContent,mn=pn===void 0?"Not Found":pn,Wn=Ft.onClear,Hn=Ft.mode,Qn=Ft.disabled,ii=Ft.loading,ji=Ft.getInputElement,cn=Ft.getRawInputElement,Yi=Ft.open,$i=Ft.defaultOpen,Wi=Ft.onDropdownVisibleChange,ln=Ft.activeValue,oi=Ft.onActiveValueChange,Bi=Ft.activeDescendantId,Gi=Ft.searchValue,Ti=Ft.autoClearSearchValue,Qi=Ft.onSearch,gr=Ft.onSearchSplit,hr=Ft.tokenSeparators,Ki=Ft.allowClear,Sr=Ft.suffixIcon,kn=Ft.clearIcon,Br=Ft.OptionList,_n=Ft.animation,Or=Ft.transitionName,no=Ft.dropdownStyle,br=Ft.dropdownClassName,mo=Ft.dropdownMatchSelectWidth,Jr=Ft.dropdownRender,ur=Ft.dropdownAlign,er=Ft.placement,qi=Ft.builtinPlacements,Rr=Ft.getPopupContainer,Ii=Ft.showAction,tt=Ii===void 0?[]:Ii,Qr=Ft.onFocus,lo=Ft.onBlur,jr=Ft.onKeyUp,vo=Ft.onKeyDown,po=Ft.onMouseDown,Lr=(0,Xe.Z)(Ft,Ye),Fr=yt(Hn),uo=(Nn!==void 0?Nn:Fr)||Hn==="combobox",qr=(0,ut.Z)({},Lr);xt.forEach(function(Vo){delete qr[Vo]}),en==null||en.forEach(function(Vo){delete qr[Vo]});var zo=Ve.useState(!1),Ro=(0,Ge.Z)(zo,2),Mr=Ro[0],Nr=Ro[1];Ve.useEffect(function(){Nr((0,De.Z)())},[]);var fi=Ve.useRef(null),Tr=Ve.useRef(null),Bo=Ve.useRef(null),aa=Ve.useRef(null),Ho=Ve.useRef(null),Ao=ke(),_o=(0,Ge.Z)(Ao,3),ta=_o[0],Ea=_o[1],Mt=_o[2];Ve.useImperativeHandle(st,function(){var Vo,ya;return{focus:(Vo=aa.current)===null||Vo===void 0?void 0:Vo.focus,blur:(ya=aa.current)===null||ya===void 0?void 0:ya.blur,scrollTo:function(Ss){var ms;return(ms=Ho.current)===null||ms===void 0?void 0:ms.scrollTo(Ss)}}});var Pi=Ve.useMemo(function(){var Vo;if(Hn!=="combobox")return Gi;var ya=(Vo=Cn[0])===null||Vo===void 0?void 0:Vo.value;return typeof ya=="string"||typeof ya=="number"?String(ya):""},[Gi,Hn,Cn]),Ut=Hn==="combobox"&&typeof ji=="function"&&ji()||null,Ui=typeof cn=="function"&&cn(),wi=(0,ee.x1)(Tr,Ui==null||(on=Ui.props)===null||on===void 0?void 0:on.ref),yr=Ve.useState(!1),Zi=(0,Ge.Z)(yr,2),Ci=Zi[0],nr=Zi[1];(0,Rt.Z)(function(){nr(!0)},[]);var rr=(0,Tt.Z)(!1,{defaultValue:$i,value:Yi}),cr=(0,Ge.Z)(rr,2),xr=cr[0],Gr=cr[1],vr=Ci?xr:!1,kr=!mn&&yn;(Qn||kr&&vr&&Hn==="combobox")&&(vr=!1);var Zr=kr?!1:vr,Oi=Ve.useCallback(function(Vo){var ya=Vo!==void 0?Vo:!vr;Qn||(Gr(ya),vr!==ya&&(Wi==null||Wi(ya)))},[Qn,vr,Gr,Wi]),sa=Ve.useMemo(function(){return(hr||[]).some(function(Vo){return[`
|
|
|
`,`\r
|
|
|
`].includes(Vo)})},[hr]),Ra=function(ya,ll,Ss){var ms=!0,Ua=ya;oi==null||oi(null);var ss=Ss?null:et(ya,hr);return Hn!=="combobox"&&ss&&(Ua="",gr==null||gr(ss),Oi(!1),ms=!1),Qi&&Pi!==Ua&&Qi(Ua,{source:ll?"typing":"effect"}),ms},Ls=function(ya){!ya||!ya.trim()||Qi(ya,{source:"submit"})};Ve.useEffect(function(){!vr&&!Fr&&Hn!=="combobox"&&Ra("",!1,!1)},[vr]),Ve.useEffect(function(){xr&&Qn&&Gr(!1),Qn&&Ea(!1)},[Qn]);var Ys=Be(),tl=(0,Ge.Z)(Ys,2),Vi=tl[0],La=tl[1],Ba=function(ya){var ll=Vi(),Ss=ya.which;if(Ss===ne.Z.ENTER&&(Hn!=="combobox"&&ya.preventDefault(),vr||Oi(!0)),La(!!Pi),Ss===ne.Z.BACKSPACE&&!ll&&Fr&&!Pi&&Cn.length){for(var ms=(0,Oe.Z)(Cn),Ua=null,ss=ms.length-1;ss>=0;ss-=1){var xs=ms[ss];if(!xs.disabled){ms.splice(ss,1),Ua=xs;break}}Ua&&At(ms,{type:"remove",values:[Ua]})}for(var vs=arguments.length,oc=new Array(vs>1?vs-1:0),_l=1;_l<vs;_l++)oc[_l-1]=arguments[_l];if(vr&&Ho.current){var is;(is=Ho.current).onKeyDown.apply(is,[ya].concat(oc))}vo==null||vo.apply(void 0,[ya].concat(oc))},zs=function(ya){for(var ll=arguments.length,Ss=new Array(ll>1?ll-1:0),ms=1;ms<ll;ms++)Ss[ms-1]=arguments[ms];if(vr&&Ho.current){var Ua;(Ua=Ho.current).onKeyUp.apply(Ua,[ya].concat(Ss))}jr==null||jr.apply(void 0,[ya].concat(Ss))},su=function(ya){var ll=Cn.filter(function(Ss){return Ss!==ya});At(ll,{type:"remove",values:[ya]})},lu=Ve.useRef(!1),wo=function(){Ea(!0),Qn||(Qr&&!lu.current&&Qr.apply(void 0,arguments),tt.includes("focus")&&Oi(!0)),lu.current=!0},yc=function(){Ea(!1,function(){lu.current=!1,Oi(!1)}),!Qn&&(Pi&&(Hn==="tags"?Qi(Pi,{source:"submit"}):Hn==="multiple"&&Qi("",{source:"blur"})),lo&&lo.apply(void 0,arguments))},Ml=[];Ve.useEffect(function(){return function(){Ml.forEach(function(Vo){return clearTimeout(Vo)}),Ml.splice(0,Ml.length)}},[]);var as=function(ya){var ll,Ss=ya.target,ms=(ll=Bo.current)===null||ll===void 0?void 0:ll.getPopupElement();if(ms&&ms.contains(Ss)){var Ua=setTimeout(function(){var oc=Ml.indexOf(Ua);if(oc!==-1&&Ml.splice(oc,1),Mt(),!Mr&&!ms.contains(document.activeElement)){var _l;(_l=aa.current)===null||_l===void 0||_l.focus()}});Ml.push(Ua)}for(var ss=arguments.length,xs=new Array(ss>1?ss-1:0),vs=1;vs<ss;vs++)xs[vs-1]=arguments[vs];po==null||po.apply(void 0,[ya].concat(xs))},vl=Ve.useState({}),ju=(0,Ge.Z)(vl,2),rc=ju[1];function wl(){rc({})}var sl;Ui&&(sl=function(ya){Oi(ya)}),He(function(){var Vo;return[fi.current,(Vo=Bo.current)===null||Vo===void 0?void 0:Vo.getPopupElement()]},Zr,Oi,!!Ui);var td=Ve.useMemo(function(){return(0,ut.Z)((0,ut.Z)({},Ft),{},{notFoundContent:mn,open:vr,triggerOpen:Zr,id:Dn,showSearch:uo,multiple:Fr,toggleOpen:Oi})},[Ft,mn,Zr,vr,Dn,uo,Fr,Oi]),nd=!!Sr||ii,kc;nd&&(kc=Ve.createElement(se,{className:dt()("".concat(Jn,"-arrow"),(0,Ke.Z)({},"".concat(Jn,"-arrow-loading"),ii)),customizeIcon:Sr,customizeIconProps:{loading:ii,searchValue:Pi,open:vr,focused:ta,showSearch:uo}}));var _d=function(){var ya;Wn==null||Wn(),(ya=aa.current)===null||ya===void 0||ya.focus(),At([],{type:"clear",values:Cn}),Ra("",!1,!1)},id=he(Jn,_d,Cn,Ki,kn,Qn,Pi,Hn),Ic=id.allowClear,Js=id.clearIcon,uu=Ve.createElement(Br,{ref:Ho}),xd=dt()(Jn,St,(En={},(0,Ke.Z)(En,"".concat(Jn,"-focused"),ta),(0,Ke.Z)(En,"".concat(Jn,"-multiple"),Fr),(0,Ke.Z)(En,"".concat(Jn,"-single"),!Fr),(0,Ke.Z)(En,"".concat(Jn,"-allow-clear"),Ki),(0,Ke.Z)(En,"".concat(Jn,"-show-arrow"),nd),(0,Ke.Z)(En,"".concat(Jn,"-disabled"),Qn),(0,Ke.Z)(En,"".concat(Jn,"-loading"),ii),(0,Ke.Z)(En,"".concat(Jn,"-open"),vr),(0,Ke.Z)(En,"".concat(Jn,"-customize-input"),Ut),(0,Ke.Z)(En,"".concat(Jn,"-show-search"),uo),En)),Eu=Ve.createElement(Pe,{ref:Bo,disabled:Qn,prefixCls:Jn,visible:Zr,popupElement:uu,animation:_n,transitionName:Or,dropdownStyle:no,dropdownClassName:br,direction:Si,dropdownMatchSelectWidth:mo,dropdownRender:Jr,dropdownAlign:ur,placement:er,builtinPlacements:qi,getPopupContainer:Rr,empty:yn,getTriggerDOMNode:function(){return Tr.current},onPopupVisibleChange:sl,onPopupMouseEnter:wl},Ui?Ve.cloneElement(Ui,{ref:wi}):Ve.createElement(Yn,(0,ge.Z)({},Ft,{domRef:Tr,prefixCls:Jn,inputElement:Ut,ref:aa,id:Dn,showSearch:uo,autoClearSearchValue:Ti,mode:Hn,activeDescendantId:Bi,tagRender:qn,values:Cn,open:vr,onToggleOpen:Oi,activeValue:ln,searchValue:Pi,onSearch:Ra,onSearchSubmit:Ls,onRemove:su,tokenWithEnter:sa}))),Sc;return Ui?Sc=Eu:Sc=Ve.createElement("div",(0,ge.Z)({className:xd},qr,{ref:fi,onMouseDown:as,onKeyDown:Ba,onKeyUp:zs,onFocus:wo,onBlur:yc}),ta&&!vr&&Ve.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(Cn.map(function(Vo){var ya=Vo.label,ll=Vo.value;return["number","string"].includes((0,Ne.Z)(ya))?ya:ll}).join(", "))),Eu,kc,Ic&&Js),Ve.createElement(ve.Provider,{value:td},Sc)}),zt=at,un=function(Ft,st){var on=Ve.useRef({values:new Map,options:new Map}),En=Ve.useMemo(function(){var Jn=on.current,St=Jn.values,Nn=Jn.options,qn=Ft.map(function(Cn){if(Cn.label===void 0){var At;return(0,ut.Z)((0,ut.Z)({},Cn),{},{label:(At=St.get(Cn.value))===null||At===void 0?void 0:At.label})}return Cn}),Si=new Map,en=new Map;return qn.forEach(function(Cn){Si.set(Cn.value,Cn),en.set(Cn.value,st.get(Cn.value)||Nn.get(Cn.value))}),on.current.values=Si,on.current.options=en,qn},[Ft,st]),Dn=Ve.useCallback(function(Jn){return st.get(Jn)||on.current.options.get(Jn)},[st]);return[En,Dn]};function fn(Ft,st){return Et(Ft).join("").toUpperCase().includes(st)}var Qt=function(Ft,st,on,En,Dn){return Ve.useMemo(function(){if(!on||En===!1)return Ft;var Jn=st.options,St=st.label,Nn=st.value,qn=[],Si=typeof En=="function",en=on.toUpperCase(),Cn=Si?En:function(yn,pn){return Dn?fn(pn[Dn],en):pn[Jn]?fn(pn[St!=="children"?St:"label"],en):fn(pn[Nn],en)},At=Si?function(yn){return vt(yn)}:function(yn){return yn};return Ft.forEach(function(yn){if(yn[Jn]){var pn=Cn(on,At(yn));if(pn)qn.push(yn);else{var mn=yn[Jn].filter(function(Wn){return Cn(on,At(Wn))});mn.length&&qn.push((0,ut.Z)((0,ut.Z)({},yn),{},(0,Ke.Z)({},Jn,mn)))}return}Cn(on,At(yn))&&qn.push(yn)}),qn},[Ft,En,Dn,on,st])},Kn=pe(17115),On=pe(11592),jt=["children","value"],sn=["children"];function jn(Ft){var st=Ft,on=st.key,En=st.props,Dn=En.children,Jn=En.value,St=(0,Xe.Z)(En,jt);return(0,ut.Z)({key:on,value:Jn!==void 0?Jn:on,children:Dn},St)}function dn(Ft){var st=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,On.Z)(Ft).map(function(on,En){if(!Ve.isValidElement(on)||!on.type)return null;var Dn=on,Jn=Dn.type.isSelectOptGroup,St=Dn.key,Nn=Dn.props,qn=Nn.children,Si=(0,Xe.Z)(Nn,sn);return st||!Jn?jn(on):(0,ut.Z)((0,ut.Z)({key:"__RC_SELECT_GRP__".concat(St===null?En:St,"__"),label:St},Si),{},{options:dn(qn)})}).filter(function(on){return on})}function Pn(Ft,st,on,En,Dn){return Ve.useMemo(function(){var Jn=Ft,St=!Ft;St&&(Jn=dn(st));var Nn=new Map,qn=new Map,Si=function(At,yn,pn){pn&&typeof pn=="string"&&At.set(yn[pn],yn)};function en(Cn){for(var At=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,yn=0;yn<Cn.length;yn+=1){var pn=Cn[yn];!pn[on.options]||At?(Nn.set(pn[on.value],pn),Si(qn,pn,on.label),Si(qn,pn,En),Si(qn,pn,Dn)):en(pn[on.options],!0)}}return en(Jn),{options:Jn,valueOptions:Nn,labelOptions:qn}},[Ft,st,on,En,Dn])}function ui(Ft){var st=Ve.useRef();st.current=Ft;var on=Ve.useCallback(function(){return st.current.apply(st,arguments)},[]);return on}var pi=function(){return null};pi.isSelectOptGroup=!0;var gi=pi,bi=function(){return null};bi.isSelectOption=!0;var Xi=bi,ar=pe(80547),Ji=pe(2738),wr=pe(24916),mr=Ve.createContext(null),Hi=mr;function Er(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var $n=["disabled","title","children","style","className"];function Le(Ft){return typeof Ft=="string"||typeof Ft=="number"}var Ei=function(st,on){var En=be(),Dn=En.prefixCls,Jn=En.id,St=En.open,Nn=En.multiple,qn=En.mode,Si=En.searchValue,en=En.toggleOpen,Cn=En.notFoundContent,At=En.onPopupScroll,yn=Ve.useContext(Hi),pn=yn.flattenOptions,mn=yn.onActiveValue,Wn=yn.defaultActiveFirstOption,Hn=yn.onSelect,Qn=yn.menuItemSelectedIcon,ii=yn.rawValues,ji=yn.fieldNames,cn=yn.virtual,Yi=yn.direction,$i=yn.listHeight,Wi=yn.listItemHeight,ln="".concat(Dn,"-item"),oi=(0,ar.Z)(function(){return pn},[St,pn],function(ur,er){return er[0]&&ur[1]!==er[1]}),Bi=Ve.useRef(null),Gi=function(er){er.preventDefault()},Ti=function(er){Bi.current&&Bi.current.scrollTo(typeof er=="number"?{index:er}:er)},Qi=function(er){for(var qi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Rr=oi.length,Ii=0;Ii<Rr;Ii+=1){var tt=(er+Ii*qi+Rr)%Rr,Qr=oi[tt],lo=Qr.group,jr=Qr.data;if(!lo&&!jr.disabled)return tt}return-1},gr=Ve.useState(function(){return Qi(0)}),hr=(0,Ge.Z)(gr,2),Ki=hr[0],Sr=hr[1],kn=function(er){var qi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Sr(er);var Rr={source:qi?"keyboard":"mouse"},Ii=oi[er];if(!Ii){mn(null,-1,Rr);return}mn(Ii.value,er,Rr)};(0,Ve.useEffect)(function(){kn(Wn!==!1?Qi(0):-1)},[oi.length,Si]);var Br=Ve.useCallback(function(ur){return ii.has(ur)&&qn!=="combobox"},[qn,(0,Oe.Z)(ii).toString(),ii.size]);(0,Ve.useEffect)(function(){var ur=setTimeout(function(){if(!Nn&&St&&ii.size===1){var qi=Array.from(ii)[0],Rr=oi.findIndex(function(Ii){var tt=Ii.data;return tt.value===qi});Rr!==-1&&(kn(Rr),Ti(Rr))}});if(St){var er;(er=Bi.current)===null||er===void 0||er.scrollTo(void 0)}return function(){return clearTimeout(ur)}},[St,Si,pn.length]);var _n=function(er){er!==void 0&&Hn(er,{selected:!ii.has(er)}),Nn||en(!1)};if(Ve.useImperativeHandle(on,function(){return{onKeyDown:function(er){var qi=er.which,Rr=er.ctrlKey;switch(qi){case ne.Z.N:case ne.Z.P:case ne.Z.UP:case ne.Z.DOWN:{var Ii=0;if(qi===ne.Z.UP?Ii=-1:qi===ne.Z.DOWN?Ii=1:Er()&&Rr&&(qi===ne.Z.N?Ii=1:qi===ne.Z.P&&(Ii=-1)),Ii!==0){var tt=Qi(Ki+Ii,Ii);Ti(tt),kn(tt,!0)}break}case ne.Z.ENTER:{var Qr=oi[Ki];Qr&&!Qr.data.disabled?_n(Qr.value):_n(void 0),St&&er.preventDefault();break}case ne.Z.ESC:en(!1),St&&er.stopPropagation()}},onKeyUp:function(){},scrollTo:function(er){Ti(er)}}}),oi.length===0)return Ve.createElement("div",{role:"listbox",id:"".concat(Jn,"_list"),className:"".concat(ln,"-empty"),onMouseDown:Gi},Cn);var Or=Object.keys(ji).map(function(ur){return ji[ur]}),no=function(er){return er.label};function br(ur,er){var qi=ur.group;return{role:qi?"presentation":"option",id:"".concat(Jn,"_list_").concat(er)}}var mo=function(er){var qi=oi[er];if(!qi)return null;var Rr=qi.data||{},Ii=Rr.value,tt=qi.group,Qr=(0,We.Z)(Rr,!0),lo=no(qi);return qi?Ve.createElement("div",(0,ge.Z)({"aria-label":typeof lo=="string"&&!tt?lo:null},Qr,{key:er},br(qi,er),{"aria-selected":Br(Ii)}),Ii):null},Jr={role:"listbox",id:"".concat(Jn,"_list")};return Ve.createElement(Ve.Fragment,null,cn&&Ve.createElement("div",(0,ge.Z)({},Jr,{style:{height:0,width:0,overflow:"hidden"}}),mo(Ki-1),mo(Ki),mo(Ki+1)),Ve.createElement(wr.Z,{itemKey:"key",ref:Bi,data:oi,height:$i,itemHeight:Wi,fullHeight:!1,onMouseDown:Gi,onScroll:At,virtual:cn,direction:Yi,innerProps:cn?null:Jr},function(ur,er){var qi,Rr=ur.group,Ii=ur.groupOption,tt=ur.data,Qr=ur.label,lo=ur.value,jr=tt.key;if(Rr){var vo,po=(vo=tt.title)!==null&&vo!==void 0?vo:Le(Qr)?Qr.toString():void 0;return Ve.createElement("div",{className:dt()(ln,"".concat(ln,"-group")),title:po},Qr!==void 0?Qr:jr)}var Lr=tt.disabled,Fr=tt.title,uo=tt.children,qr=tt.style,zo=tt.className,Ro=(0,Xe.Z)(tt,$n),Mr=(0,Ji.Z)(Ro,Or),Nr=Br(lo),fi="".concat(ln,"-option"),Tr=dt()(ln,fi,zo,(qi={},(0,Ke.Z)(qi,"".concat(fi,"-grouped"),Ii),(0,Ke.Z)(qi,"".concat(fi,"-active"),Ki===er&&!Lr),(0,Ke.Z)(qi,"".concat(fi,"-disabled"),Lr),(0,Ke.Z)(qi,"".concat(fi,"-selected"),Nr),qi)),Bo=no(ur),aa=!Qn||typeof Qn=="function"||Nr,Ho=typeof Bo=="number"?Bo:Bo||lo,Ao=Le(Ho)?Ho.toString():void 0;return Fr!==void 0&&(Ao=Fr),Ve.createElement("div",(0,ge.Z)({},(0,We.Z)(Mr),cn?{}:br(ur,er),{"aria-selected":Nr,className:Tr,title:Ao,onMouseMove:function(){Ki===er||Lr||kn(er)},onClick:function(){Lr||_n(lo)},style:qr}),Ve.createElement("div",{className:"".concat(fi,"-content")},Ho),Ve.isValidElement(Qn)||Nr,aa&&Ve.createElement(se,{className:"".concat(ln,"-option-state"),customizeIcon:Qn,customizeIconProps:{isSelected:Nr}},Nr?"\u2713":null))}))},Ri=Ve.forwardRef(Ei);Ri.displayName="OptionList";var nn=Ri;function di(Ft){var st=Ft.mode,on=Ft.options,En=Ft.children,Dn=Ft.backfill,Jn=Ft.allowClear,St=Ft.placeholder,Nn=Ft.getInputElement,qn=Ft.showSearch,Si=Ft.onSearch,en=Ft.defaultOpen,Cn=Ft.autoFocus,At=Ft.labelInValue,yn=Ft.value,pn=Ft.inputValue,mn=Ft.optionLabelProp,Wn=isMultiple(st),Hn=qn!==void 0?qn:Wn||st==="combobox",Qn=on||convertChildrenToData(En);if(warning(st!=="tags"||Qn.every(function(Yi){return!Yi.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),st==="tags"||st==="combobox"){var ii=Qn.some(function(Yi){return Yi.options?Yi.options.some(function($i){return typeof("value"in $i?$i.value:$i.key)=="number"}):typeof("value"in Yi?Yi.value:Yi.key)=="number"});warning(!ii,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(st!=="combobox"||!mn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(st==="combobox"||!Dn,"`backfill` only works with `combobox` mode."),warning(st==="combobox"||!Nn,"`getInputElement` only work with `combobox` mode."),noteOnce(st!=="combobox"||!Nn||!Jn||!St,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Si&&!Hn&&st!=="combobox"&&st!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!en||Cn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),yn!=null){var ji=toArray(yn);warning(!At||ji.every(function(Yi){return _typeof(Yi)==="object"&&("key"in Yi||"value"in Yi)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Wn||Array.isArray(yn),"`value` should be array when `mode` is `multiple` or `tags`")}if(En){var cn=null;toNodeArray(En).some(function(Yi){if(!React.isValidElement(Yi)||!Yi.type)return!1;var $i=Yi,Wi=$i.type;if(Wi.isSelectOption)return!1;if(Wi.isSelectOptGroup){var ln=toNodeArray(Yi.props.children).every(function(oi){return!React.isValidElement(oi)||!Yi.type||oi.type.isSelectOption?!0:(cn=oi.type,!1)});return!ln}return cn=Wi,!0}),cn&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(cn.displayName||cn.name||cn,"`.")),warning(pn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function yi(Ft,st){if(Ft){var on=function En(Dn){for(var Jn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,St=0;St<Dn.length;St++){var Nn=Dn[St];if(Nn[st==null?void 0:st.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Jn&&Array.isArray(Nn[st==null?void 0:st.options])&&En(Nn[st==null?void 0:st.options],!0))break}};on(Ft)}}var Li=null,Tn=["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"],Un=["inputValue"];function kt(Ft){return!Ft||(0,Ne.Z)(Ft)!=="object"}var $t=Ve.forwardRef(function(Ft,st){var on=Ft.id,En=Ft.mode,Dn=Ft.prefixCls,Jn=Dn===void 0?"rc-select":Dn,St=Ft.backfill,Nn=Ft.fieldNames,qn=Ft.inputValue,Si=Ft.searchValue,en=Ft.onSearch,Cn=Ft.autoClearSearchValue,At=Cn===void 0?!0:Cn,yn=Ft.onSelect,pn=Ft.onDeselect,mn=Ft.dropdownMatchSelectWidth,Wn=mn===void 0?!0:mn,Hn=Ft.filterOption,Qn=Ft.filterSort,ii=Ft.optionFilterProp,ji=Ft.optionLabelProp,cn=Ft.options,Yi=Ft.children,$i=Ft.defaultActiveFirstOption,Wi=Ft.menuItemSelectedIcon,ln=Ft.virtual,oi=Ft.direction,Bi=Ft.listHeight,Gi=Bi===void 0?200:Bi,Ti=Ft.listItemHeight,Qi=Ti===void 0?20:Ti,gr=Ft.value,hr=Ft.defaultValue,Ki=Ft.labelInValue,Sr=Ft.onChange,kn=(0,Xe.Z)(Ft,Tn),Br=(0,Kn.ZP)(on),_n=yt(En),Or=!!(!cn&&Yi),no=Ve.useMemo(function(){return Hn===void 0&&En==="combobox"?!1:Hn},[Hn,En]),br=Ve.useMemo(function(){return ye(Nn,Or)},[JSON.stringify(Nn),Or]),mo=(0,Tt.Z)("",{value:Si!==void 0?Si:qn,postState:function(kr){return kr||""}}),Jr=(0,Ge.Z)(mo,2),ur=Jr[0],er=Jr[1],qi=Pn(cn,Yi,br,ii,ji),Rr=qi.valueOptions,Ii=qi.labelOptions,tt=qi.options,Qr=Ve.useCallback(function(vr){var kr=Et(vr);return kr.map(function(Zr){var Oi,sa,Ra,Ls,Ys;if(kt(Zr))Oi=Zr;else{var tl;Ra=Zr.key,sa=Zr.label,Oi=(tl=Zr.value)!==null&&tl!==void 0?tl:Ra}var Vi=Rr.get(Oi);if(Vi){var La;if(sa===void 0&&(sa=Vi==null?void 0:Vi[ji||br.label]),Ra===void 0&&(Ra=(La=Vi==null?void 0:Vi.key)!==null&&La!==void 0?La:Oi),Ls=Vi==null?void 0:Vi.disabled,Ys=Vi==null?void 0:Vi.title,0)var Ba}return{label:sa,value:Oi,key:Ra,disabled:Ls,title:Ys}})},[br,ji,Rr]),lo=(0,Tt.Z)(hr,{value:gr}),jr=(0,Ge.Z)(lo,2),vo=jr[0],po=jr[1],Lr=Ve.useMemo(function(){var vr,kr=Qr(vo);return En==="combobox"&&Ht((vr=kr[0])===null||vr===void 0?void 0:vr.value)?[]:kr},[vo,Qr,En]),Fr=un(Lr,Rr),uo=(0,Ge.Z)(Fr,2),qr=uo[0],zo=uo[1],Ro=Ve.useMemo(function(){if(!En&&qr.length===1){var vr=qr[0];if(vr.value===null&&(vr.label===null||vr.label===void 0))return[]}return qr.map(function(kr){var Zr;return(0,ut.Z)((0,ut.Z)({},kr),{},{label:(Zr=kr.label)!==null&&Zr!==void 0?Zr:kr.value})})},[En,qr]),Mr=Ve.useMemo(function(){return new Set(qr.map(function(vr){return vr.value}))},[qr]);Ve.useEffect(function(){if(En==="combobox"){var vr,kr=(vr=qr[0])===null||vr===void 0?void 0:vr.value;er(ht(kr)?String(kr):"")}},[qr]);var Nr=ui(function(vr,kr){var Zr,Oi=kr!=null?kr:vr;return Zr={},(0,Ke.Z)(Zr,br.value,vr),(0,Ke.Z)(Zr,br.label,Oi),Zr}),fi=Ve.useMemo(function(){if(En!=="tags")return tt;var vr=(0,Oe.Z)(tt),kr=function(Oi){return Rr.has(Oi)};return(0,Oe.Z)(qr).sort(function(Zr,Oi){return Zr.value<Oi.value?-1:1}).forEach(function(Zr){var Oi=Zr.value;kr(Oi)||vr.push(Nr(Oi,Zr.label))}),vr},[Nr,tt,Rr,qr,En]),Tr=Qt(fi,br,ur,no,ii),Bo=Ve.useMemo(function(){return En!=="tags"||!ur||Tr.some(function(vr){return vr[ii||"value"]===ur})||Tr.some(function(vr){return vr[br.value]===ur})?Tr:[Nr(ur)].concat((0,Oe.Z)(Tr))},[Nr,ii,En,Tr,ur,br]),aa=Ve.useMemo(function(){return Qn?(0,Oe.Z)(Bo).sort(function(vr,kr){return Qn(vr,kr)}):Bo},[Bo,Qn]),Ho=Ve.useMemo(function(){return qe(aa,{fieldNames:br,childrenAsData:Or})},[aa,br,Or]),Ao=function(kr){var Zr=Qr(kr);if(po(Zr),Sr&&(Zr.length!==qr.length||Zr.some(function(Ra,Ls){var Ys;return((Ys=qr[Ls])===null||Ys===void 0?void 0:Ys.value)!==(Ra==null?void 0:Ra.value)}))){var Oi=Ki?Zr:Zr.map(function(Ra){return Ra.value}),sa=Zr.map(function(Ra){return vt(zo(Ra.value))});Sr(_n?Oi:Oi[0],_n?sa:sa[0])}},_o=Ve.useState(null),ta=(0,Ge.Z)(_o,2),Ea=ta[0],Mt=ta[1],Pi=Ve.useState(0),Ut=(0,Ge.Z)(Pi,2),Ui=Ut[0],wi=Ut[1],yr=$i!==void 0?$i:En!=="combobox",Zi=Ve.useCallback(function(vr,kr){var Zr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Oi=Zr.source,sa=Oi===void 0?"keyboard":Oi;wi(kr),St&&En==="combobox"&&vr!==null&&sa==="keyboard"&&Mt(String(vr))},[St,En]),Ci=function(kr,Zr,Oi){var sa=function(){var lu,wo=zo(kr);return[Ki?{label:wo==null?void 0:wo[br.label],value:kr,key:(lu=wo==null?void 0:wo.key)!==null&&lu!==void 0?lu:kr}:kr,vt(wo)]};if(Zr&&yn){var Ra=sa(),Ls=(0,Ge.Z)(Ra,2),Ys=Ls[0],tl=Ls[1];yn(Ys,tl)}else if(!Zr&&pn&&Oi!=="clear"){var Vi=sa(),La=(0,Ge.Z)(Vi,2),Ba=La[0],zs=La[1];pn(Ba,zs)}},nr=ui(function(vr,kr){var Zr,Oi=_n?kr.selected:!0;Oi?Zr=_n?[].concat((0,Oe.Z)(qr),[vr]):[vr]:Zr=qr.filter(function(sa){return sa.value!==vr}),Ao(Zr),Ci(vr,Oi),En==="combobox"?Mt(""):(!yt||At)&&(er(""),Mt(""))}),rr=function(kr,Zr){Ao(kr);var Oi=Zr.type,sa=Zr.values;(Oi==="remove"||Oi==="clear")&&sa.forEach(function(Ra){Ci(Ra.value,!1,Oi)})},cr=function(kr,Zr){if(er(kr),Mt(null),Zr.source==="submit"){var Oi=(kr||"").trim();if(Oi){var sa=Array.from(new Set([].concat((0,Oe.Z)(Mr),[Oi])));Ao(sa),Ci(Oi,!0),er("")}return}Zr.source!=="blur"&&(En==="combobox"&&Ao(kr),en==null||en(kr))},xr=function(kr){var Zr=kr;En!=="tags"&&(Zr=kr.map(function(sa){var Ra=Ii.get(sa);return Ra==null?void 0:Ra.value}).filter(function(sa){return sa!==void 0}));var Oi=Array.from(new Set([].concat((0,Oe.Z)(Mr),(0,Oe.Z)(Zr))));Ao(Oi),Oi.forEach(function(sa){Ci(sa,!0)})},Gr=Ve.useMemo(function(){var vr=ln!==!1&&Wn!==!1;return(0,ut.Z)((0,ut.Z)({},qi),{},{flattenOptions:Ho,onActiveValue:Zi,defaultActiveFirstOption:yr,onSelect:nr,menuItemSelectedIcon:Wi,rawValues:Mr,fieldNames:br,virtual:vr,direction:oi,listHeight:Gi,listItemHeight:Qi,childrenAsData:Or})},[qi,Ho,Zi,yr,nr,Wi,Mr,br,ln,Wn,Gi,Qi,Or]);return Ve.createElement(Hi.Provider,{value:Gr},Ve.createElement(zt,(0,ge.Z)({},kn,{id:Br,prefixCls:Jn,ref:st,omitDomProps:Un,mode:En,displayValues:Ro,onDisplayValuesChange:rr,direction:oi,searchValue:ur,onSearch:cr,autoClearSearchValue:At,onSearchSplit:xr,dropdownMatchSelectWidth:Wn,OptionList:nn,emptyOptions:!Ho.length,activeValue:Ea,activeDescendantId:"".concat(Br,"_list_").concat(Ui)})))}),Je=$t;Je.Option=Xi,Je.OptGroup=gi;var qt=Je,vn=qt},9296:function(Vn,xn,pe){"use strict";pe.r(xn),pe.d(xn,{ResizableTextArea:function(){return Pt},default:function(){return Ht}});var ge=pe(96663),Oe=pe(44127),Ke=pe(90493),ut=pe(20135),Ge=pe(72071),Xe=pe(6620),Ne=pe(19127),Tt=pe(92310),Ct=pe.n(Tt),Ve=pe(93681),Lt=pe(5643),dt=pe(18929),Rt=pe(59301),De=pe(29301),ne=pe(34280),ee=pe(16089),ce=`
|
|
|
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;
|
|
|
`,se=["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"],he={},ve;function be(_t){var Vt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ot=_t.getAttribute("id")||_t.getAttribute("data-reactid")||_t.getAttribute("name");if(Vt&&he[ot])return he[ot];var Ue=window.getComputedStyle(_t),Wt=Ue.getPropertyValue("box-sizing")||Ue.getPropertyValue("-moz-box-sizing")||Ue.getPropertyValue("-webkit-box-sizing"),Ln=parseFloat(Ue.getPropertyValue("padding-bottom"))+parseFloat(Ue.getPropertyValue("padding-top")),Fn=parseFloat(Ue.getPropertyValue("border-bottom-width"))+parseFloat(Ue.getPropertyValue("border-top-width")),Gt=se.map(function(An){return"".concat(An,":").concat(Ue.getPropertyValue(An))}).join(";"),rn={sizingStyle:Gt,paddingSize:Ln,borderSize:Fn,boxSizing:Wt};return Vt&&ot&&(he[ot]=rn),rn}function ke(_t){var Vt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ue=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ve||(ve=document.createElement("textarea"),ve.setAttribute("tab-index","-1"),ve.setAttribute("aria-hidden","true"),document.body.appendChild(ve)),_t.getAttribute("wrap")?ve.setAttribute("wrap",_t.getAttribute("wrap")):ve.removeAttribute("wrap");var Wt=be(_t,Vt),Ln=Wt.paddingSize,Fn=Wt.borderSize,Gt=Wt.boxSizing,rn=Wt.sizingStyle;ve.setAttribute("style","".concat(rn,";").concat(ce)),ve.value=_t.value||_t.placeholder||"";var An=void 0,ni=void 0,Sn,Yn=ve.scrollHeight;if(Gt==="border-box"?Yn+=Fn:Gt==="content-box"&&(Yn-=Ln),ot!==null||Ue!==null){ve.value=" ";var It=ve.scrollHeight-Ln;ot!==null&&(An=It*ot,Gt==="border-box"&&(An=An+Ln+Fn),Yn=Math.max(An,Yn)),Ue!==null&&(ni=It*Ue,Gt==="border-box"&&(ni=ni+Ln+Fn),Sn=Yn>ni?"":"hidden",Yn=Math.min(ni,Yn))}var wn={height:Yn,overflowY:Sn,resize:"none"};return An&&(wn.minHeight=An),ni&&(wn.maxHeight=ni),wn}var Be=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],He=0,We=1,rt=2,Qe=Rt.forwardRef(function(_t,Vt){var ot=_t,Ue=ot.prefixCls,Wt=ot.onPressEnter,Ln=ot.defaultValue,Fn=ot.value,Gt=ot.autoSize,rn=ot.onResize,An=ot.className,ni=ot.style,Sn=ot.disabled,Yn=ot.onChange,It=ot.onInternalAutoSize,wn=(0,Xe.Z)(ot,Be),Gn=(0,dt.Z)(Ln,{value:Fn,postState:function(gi){return gi!=null?gi:""}}),ze=(0,Ge.Z)(Gn,2),Ee=ze[0],Pe=ze[1],Fe=function(gi){Pe(gi.target.value),Yn==null||Yn(gi)},Ae=Rt.useRef();Rt.useImperativeHandle(Vt,function(){return{textArea:Ae.current}});var ye=Rt.useMemo(function(){return Gt&&(0,ut.Z)(Gt)==="object"?[Gt.minRows,Gt.maxRows]:[]},[Gt]),qe=(0,Ge.Z)(ye,2),vt=qe[0],et=qe[1],Ye=!!Gt,xt=function(){try{if(document.activeElement===Ae.current){var gi=Ae.current,bi=gi.selectionStart,Xi=gi.selectionEnd,ar=gi.scrollTop;Ae.current.setSelectionRange(bi,Xi),Ae.current.scrollTop=ar}}catch(Ji){}},yt=Rt.useState(rt),at=(0,Ge.Z)(yt,2),zt=at[0],un=at[1],fn=Rt.useState(),Qt=(0,Ge.Z)(fn,2),Kn=Qt[0],On=Qt[1],jt=function(){un(He)};(0,ne.Z)(function(){Ye&&jt()},[Fn,vt,et,Ye]),(0,ne.Z)(function(){if(zt===He)un(We);else if(zt===We){var pi=ke(Ae.current,!1,vt,et);un(rt),On(pi)}else xt()},[zt]);var sn=Rt.useRef(),jn=function(){ee.Z.cancel(sn.current)},dn=function(gi){zt===rt&&(rn==null||rn(gi),Gt&&(jn(),sn.current=(0,ee.Z)(function(){jt()})))};Rt.useEffect(function(){return jn},[]);var Pn=Ye?Kn:null,ui=(0,Oe.Z)((0,Oe.Z)({},ni),Pn);return(zt===He||zt===We)&&(ui.overflowY="hidden",ui.overflowX="hidden"),Rt.createElement(De.Z,{onResize:dn,disabled:!(Gt||rn)},Rt.createElement("textarea",(0,ge.Z)({},wn,{ref:Ae,style:ui,className:Ct()(Ue,An,(0,Ke.Z)({},"".concat(Ue,"-disabled"),Sn)),disabled:Sn,value:Ee,onChange:Fe})))}),Pt=Qe,Ze=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Et(_t,Vt){return(0,Ne.Z)(_t||"").slice(0,Vt).join("")}function it(_t,Vt,ot,Ue){var Wt=ot;return _t?Wt=Et(ot,Ue):(0,Ne.Z)(Vt||"").length<ot.length&&(0,Ne.Z)(ot||"").length>Ue&&(Wt=Vt),Wt}var Dt=Rt.forwardRef(function(_t,Vt){var ot,Ue=_t.defaultValue,Wt=_t.value,Ln=_t.onFocus,Fn=_t.onBlur,Gt=_t.onChange,rn=_t.allowClear,An=_t.maxLength,ni=_t.onCompositionStart,Sn=_t.onCompositionEnd,Yn=_t.suffix,It=_t.prefixCls,wn=It===void 0?"rc-textarea":It,Gn=_t.classes,ze=_t.showCount,Ee=_t.className,Pe=_t.style,Fe=_t.disabled,Ae=_t.hidden,ye=_t.classNames,qe=_t.styles,vt=_t.onResize,et=(0,Xe.Z)(_t,Ze),Ye=(0,dt.Z)(Ue,{value:Wt,defaultValue:Ue}),xt=(0,Ge.Z)(Ye,2),yt=xt[0],at=xt[1],zt=(0,Rt.useRef)(null),un=Rt.useState(!1),fn=(0,Ge.Z)(un,2),Qt=fn[0],Kn=fn[1],On=Rt.useState(!1),jt=(0,Ge.Z)(On,2),sn=jt[0],jn=jt[1],dn=Rt.useRef(),Pn=Rt.useRef(0),ui=Rt.useState(null),pi=(0,Ge.Z)(ui,2),gi=pi[0],bi=pi[1],Xi=function(){var kt;(kt=zt.current)===null||kt===void 0||kt.textArea.focus()};(0,Rt.useImperativeHandle)(Vt,function(){return{resizableTextArea:zt.current,focus:Xi,blur:function(){var kt;(kt=zt.current)===null||kt===void 0||kt.textArea.blur()}}}),(0,Rt.useEffect)(function(){Kn(function(Un){return!Fe&&Un})},[Fe]);var ar=Number(An)>0,Ji=function(kt){jn(!0),dn.current=yt,Pn.current=kt.currentTarget.selectionStart,ni==null||ni(kt)},wr=function(kt){jn(!1);var $t=kt.currentTarget.value;if(ar){var Je,qt=Pn.current>=An+1||Pn.current===((Je=dn.current)===null||Je===void 0?void 0:Je.length);$t=it(qt,dn.current,$t,An)}$t!==yt&&(at($t),(0,Lt.rJ)(kt.currentTarget,kt,Gt,$t)),Sn==null||Sn(kt)},mr=function(kt){var $t=kt.target.value;if(!sn&&ar){var Je=kt.target.selectionStart>=An+1||kt.target.selectionStart===$t.length||!kt.target.selectionStart;$t=it(Je,yt,$t,An)}at($t),(0,Lt.rJ)(kt.currentTarget,kt,Gt,$t)},Hi=function(kt){var $t=et.onPressEnter,Je=et.onKeyDown;kt.key==="Enter"&&$t&&$t(kt),Je==null||Je(kt)},Er=function(kt){Kn(!0),Ln==null||Ln(kt)},$n=function(kt){Kn(!1),Fn==null||Fn(kt)},Le=function(kt){var $t;at(""),Xi(),(0,Lt.rJ)(($t=zt.current)===null||$t===void 0?void 0:$t.textArea,kt,Gt)},Ei=(0,Lt.D7)(yt);!sn&&ar&&Wt==null&&(Ei=Et(Ei,An));var Ri=Yn,nn;if(ze){var di=(0,Ne.Z)(Ei).length;(0,ut.Z)(ze)==="object"?nn=ze.formatter({value:Ei,count:di,maxLength:An}):nn="".concat(di).concat(ar?" / ".concat(An):""),Ri=Rt.createElement(Rt.Fragment,null,Ri,Rt.createElement("span",{className:Ct()("".concat(wn,"-data-count"),ye==null?void 0:ye.count),style:qe==null?void 0:qe.count},nn))}var yi=function(kt){var $t;vt==null||vt(kt),($t=zt.current)!==null&&$t!==void 0&&$t.textArea.style.height&&bi(!0)},Li=!et.autoSize&&!ze&&!rn,Tn=Rt.createElement(Ve.BaseInput,{value:Ei,allowClear:rn,handleReset:Le,suffix:Ri,prefixCls:wn,classes:{affixWrapper:Ct()(Gn==null?void 0:Gn.affixWrapper,(ot={},(0,Ke.Z)(ot,"".concat(wn,"-show-count"),ze),(0,Ke.Z)(ot,"".concat(wn,"-textarea-allow-clear"),rn),ot))},disabled:Fe,focused:Qt,className:Ee,style:(0,Oe.Z)((0,Oe.Z)({},Pe),gi&&!Li?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof nn=="string"?nn:void 0}},hidden:Ae,inputElement:Rt.createElement(Pt,(0,ge.Z)({},et,{onKeyDown:Hi,onChange:mr,onFocus:Er,onBlur:$n,onCompositionStart:Ji,onCompositionEnd:wr,className:ye==null?void 0:ye.textarea,style:(0,Oe.Z)((0,Oe.Z)({},qe==null?void 0:qe.textarea),{},{resize:Pe==null?void 0:Pe.resize}),disabled:Fe,prefixCls:wn,onResize:yi,ref:zt}))});return Tn}),ht=Dt,Ht=ht},39417:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return We}});var ge=pe(96663),Oe=pe(90493),Ke=pe(6620),ut=pe(44127),Ge=pe(52884),Xe=pe(95727),Ne=pe(89866),Tt=pe(65711),Ct=pe(85745),Ve=pe(92310),Lt=pe.n(Ve),dt=pe(26112),Rt=pe(59301),De=pe(39378),ne=function(Qe){for(var Pt=Qe.prefixCls,Ze=Qe.level,Et=Qe.isStart,it=Qe.isEnd,Dt="".concat(Pt,"-indent-unit"),ht=[],Ht=0;Ht<Ze;Ht+=1){var _t;ht.push(Rt.createElement("span",{key:Ht,className:Lt()(Dt,(_t={},(0,Oe.Z)(_t,"".concat(Dt,"-start"),Et[Ht]),(0,Oe.Z)(_t,"".concat(Dt,"-end"),it[Ht]),_t))}))}return Rt.createElement("span",{"aria-hidden":"true",className:"".concat(Pt,"-indent")},ht)},ee=Rt.memo(ne),ce=pe(67841),se=pe(71430),he=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],ve="open",be="close",ke="---",Be=function(rt){(0,Tt.Z)(Pt,rt);var Qe=(0,Ct.Z)(Pt);function Pt(){var Ze;(0,Ge.Z)(this,Pt);for(var Et=arguments.length,it=new Array(Et),Dt=0;Dt<Et;Dt++)it[Dt]=arguments[Dt];return Ze=Qe.call.apply(Qe,[this].concat(it)),Ze.state={dragNodeHighlight:!1},Ze.selectHandle=void 0,Ze.cacheIndent=void 0,Ze.onSelectorClick=function(ht){var Ht=Ze.props.context.onNodeClick;Ht(ht,(0,se.F)(Ze.props)),Ze.isSelectable()?Ze.onSelect(ht):Ze.onCheck(ht)},Ze.onSelectorDoubleClick=function(ht){var Ht=Ze.props.context.onNodeDoubleClick;Ht(ht,(0,se.F)(Ze.props))},Ze.onSelect=function(ht){if(!Ze.isDisabled()){var Ht=Ze.props.context.onNodeSelect;Ht(ht,(0,se.F)(Ze.props))}},Ze.onCheck=function(ht){if(!Ze.isDisabled()){var Ht=Ze.props,_t=Ht.disableCheckbox,Vt=Ht.checked,ot=Ze.props.context.onNodeCheck;if(!(!Ze.isCheckable()||_t)){var Ue=!Vt;ot(ht,(0,se.F)(Ze.props),Ue)}}},Ze.onMouseEnter=function(ht){var Ht=Ze.props.context.onNodeMouseEnter;Ht(ht,(0,se.F)(Ze.props))},Ze.onMouseLeave=function(ht){var Ht=Ze.props.context.onNodeMouseLeave;Ht(ht,(0,se.F)(Ze.props))},Ze.onContextMenu=function(ht){var Ht=Ze.props.context.onNodeContextMenu;Ht(ht,(0,se.F)(Ze.props))},Ze.onDragStart=function(ht){var Ht=Ze.props.context.onNodeDragStart;ht.stopPropagation(),Ze.setState({dragNodeHighlight:!0}),Ht(ht,(0,Ne.Z)(Ze));try{ht.dataTransfer.setData("text/plain","")}catch(_t){}},Ze.onDragEnter=function(ht){var Ht=Ze.props.context.onNodeDragEnter;ht.preventDefault(),ht.stopPropagation(),Ht(ht,(0,Ne.Z)(Ze))},Ze.onDragOver=function(ht){var Ht=Ze.props.context.onNodeDragOver;ht.preventDefault(),ht.stopPropagation(),Ht(ht,(0,Ne.Z)(Ze))},Ze.onDragLeave=function(ht){var Ht=Ze.props.context.onNodeDragLeave;ht.stopPropagation(),Ht(ht,(0,Ne.Z)(Ze))},Ze.onDragEnd=function(ht){var Ht=Ze.props.context.onNodeDragEnd;ht.stopPropagation(),Ze.setState({dragNodeHighlight:!1}),Ht(ht,(0,Ne.Z)(Ze))},Ze.onDrop=function(ht){var Ht=Ze.props.context.onNodeDrop;ht.preventDefault(),ht.stopPropagation(),Ze.setState({dragNodeHighlight:!1}),Ht(ht,(0,Ne.Z)(Ze))},Ze.onExpand=function(ht){var Ht=Ze.props,_t=Ht.loading,Vt=Ht.context.onNodeExpand;_t||Vt(ht,(0,se.F)(Ze.props))},Ze.setSelectHandle=function(ht){Ze.selectHandle=ht},Ze.getNodeState=function(){var ht=Ze.props.expanded;return Ze.isLeaf()?null:ht?ve:be},Ze.hasChildren=function(){var ht=Ze.props.eventKey,Ht=Ze.props.context.keyEntities,_t=(0,ce.Z)(Ht,ht)||{},Vt=_t.children;return!!(Vt||[]).length},Ze.isLeaf=function(){var ht=Ze.props,Ht=ht.isLeaf,_t=ht.loaded,Vt=Ze.props.context.loadData,ot=Ze.hasChildren();return Ht===!1?!1:Ht||!Vt&&!ot||Vt&&_t&&!ot},Ze.isDisabled=function(){var ht=Ze.props.disabled,Ht=Ze.props.context.disabled;return!!(Ht||ht)},Ze.isCheckable=function(){var ht=Ze.props.checkable,Ht=Ze.props.context.checkable;return!Ht||ht===!1?!1:Ht},Ze.syncLoadData=function(ht){var Ht=ht.expanded,_t=ht.loading,Vt=ht.loaded,ot=Ze.props.context,Ue=ot.loadData,Wt=ot.onNodeLoad;_t||Ue&&Ht&&!Ze.isLeaf()&&!Ze.hasChildren()&&!Vt&&Wt((0,se.F)(Ze.props))},Ze.isDraggable=function(){var ht=Ze.props,Ht=ht.data,_t=ht.context.draggable;return!!(_t&&(!_t.nodeDraggable||_t.nodeDraggable(Ht)))},Ze.renderDragHandler=function(){var ht=Ze.props.context,Ht=ht.draggable,_t=ht.prefixCls;return Ht!=null&&Ht.icon?Rt.createElement("span",{className:"".concat(_t,"-draggable-icon")},Ht.icon):null},Ze.renderSwitcherIconDom=function(ht){var Ht=Ze.props.switcherIcon,_t=Ze.props.context.switcherIcon,Vt=Ht||_t;return typeof Vt=="function"?Vt((0,ut.Z)((0,ut.Z)({},Ze.props),{},{isLeaf:ht})):Vt},Ze.renderSwitcher=function(){var ht=Ze.props.expanded,Ht=Ze.props.context.prefixCls;if(Ze.isLeaf()){var _t=Ze.renderSwitcherIconDom(!0);return _t!==!1?Rt.createElement("span",{className:Lt()("".concat(Ht,"-switcher"),"".concat(Ht,"-switcher-noop"))},_t):null}var Vt=Lt()("".concat(Ht,"-switcher"),"".concat(Ht,"-switcher_").concat(ht?ve:be)),ot=Ze.renderSwitcherIconDom(!1);return ot!==!1?Rt.createElement("span",{onClick:Ze.onExpand,className:Vt},ot):null},Ze.renderCheckbox=function(){var ht=Ze.props,Ht=ht.checked,_t=ht.halfChecked,Vt=ht.disableCheckbox,ot=Ze.props.context.prefixCls,Ue=Ze.isDisabled(),Wt=Ze.isCheckable();if(!Wt)return null;var Ln=typeof Wt!="boolean"?Wt:null;return Rt.createElement("span",{className:Lt()("".concat(ot,"-checkbox"),Ht&&"".concat(ot,"-checkbox-checked"),!Ht&&_t&&"".concat(ot,"-checkbox-indeterminate"),(Ue||Vt)&&"".concat(ot,"-checkbox-disabled")),onClick:Ze.onCheck},Ln)},Ze.renderIcon=function(){var ht=Ze.props.loading,Ht=Ze.props.context.prefixCls;return Rt.createElement("span",{className:Lt()("".concat(Ht,"-iconEle"),"".concat(Ht,"-icon__").concat(Ze.getNodeState()||"docu"),ht&&"".concat(Ht,"-icon_loading"))})},Ze.renderSelector=function(){var ht=Ze.state.dragNodeHighlight,Ht=Ze.props,_t=Ht.title,Vt=_t===void 0?ke:_t,ot=Ht.selected,Ue=Ht.icon,Wt=Ht.loading,Ln=Ht.data,Fn=Ze.props.context,Gt=Fn.prefixCls,rn=Fn.showIcon,An=Fn.icon,ni=Fn.loadData,Sn=Fn.titleRender,Yn=Ze.isDisabled(),It="".concat(Gt,"-node-content-wrapper"),wn;if(rn){var Gn=Ue||An;wn=Gn?Rt.createElement("span",{className:Lt()("".concat(Gt,"-iconEle"),"".concat(Gt,"-icon__customize"))},typeof Gn=="function"?Gn(Ze.props):Gn):Ze.renderIcon()}else ni&&Wt&&(wn=Ze.renderIcon());var ze;typeof Vt=="function"?ze=Vt(Ln):Sn?ze=Sn(Ln):ze=Vt;var Ee=Rt.createElement("span",{className:"".concat(Gt,"-title")},ze);return Rt.createElement("span",{ref:Ze.setSelectHandle,title:typeof Vt=="string"?Vt:"",className:Lt()("".concat(It),"".concat(It,"-").concat(Ze.getNodeState()||"normal"),!Yn&&(ot||ht)&&"".concat(Gt,"-node-selected")),onMouseEnter:Ze.onMouseEnter,onMouseLeave:Ze.onMouseLeave,onContextMenu:Ze.onContextMenu,onClick:Ze.onSelectorClick,onDoubleClick:Ze.onSelectorDoubleClick},wn,Ee,Ze.renderDropIndicator())},Ze.renderDropIndicator=function(){var ht=Ze.props,Ht=ht.disabled,_t=ht.eventKey,Vt=Ze.props.context,ot=Vt.draggable,Ue=Vt.dropLevelOffset,Wt=Vt.dropPosition,Ln=Vt.prefixCls,Fn=Vt.indent,Gt=Vt.dropIndicatorRender,rn=Vt.dragOverNodeKey,An=Vt.direction,ni=!!ot,Sn=!Ht&&ni&&rn===_t,Yn=Fn!=null?Fn:Ze.cacheIndent;return Ze.cacheIndent=Fn,Sn?Gt({dropPosition:Wt,dropLevelOffset:Ue,indent:Yn,prefixCls:Ln,direction:An}):null},Ze}return(0,Xe.Z)(Pt,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var Et=this.props.selectable,it=this.props.context.selectable;return typeof Et=="boolean"?Et:it}},{key:"render",value:function(){var Et,it=this.props,Dt=it.eventKey,ht=it.className,Ht=it.style,_t=it.dragOver,Vt=it.dragOverGapTop,ot=it.dragOverGapBottom,Ue=it.isLeaf,Wt=it.isStart,Ln=it.isEnd,Fn=it.expanded,Gt=it.selected,rn=it.checked,An=it.halfChecked,ni=it.loading,Sn=it.domRef,Yn=it.active,It=it.data,wn=it.onMouseMove,Gn=it.selectable,ze=(0,Ke.Z)(it,he),Ee=this.props.context,Pe=Ee.prefixCls,Fe=Ee.filterTreeNode,Ae=Ee.keyEntities,ye=Ee.dropContainerKey,qe=Ee.dropTargetKey,vt=Ee.draggingNodeKey,et=this.isDisabled(),Ye=(0,dt.Z)(ze,{aria:!0,data:!0}),xt=(0,ce.Z)(Ae,Dt)||{},yt=xt.level,at=Ln[Ln.length-1],zt=this.isDraggable(),un=!et&&zt,fn=vt===Dt,Qt=Gn!==void 0?{"aria-selected":!!Gn}:void 0;return Rt.createElement("div",(0,ge.Z)({ref:Sn,className:Lt()(ht,"".concat(Pe,"-treenode"),(Et={},(0,Oe.Z)(Et,"".concat(Pe,"-treenode-disabled"),et),(0,Oe.Z)(Et,"".concat(Pe,"-treenode-switcher-").concat(Fn?"open":"close"),!Ue),(0,Oe.Z)(Et,"".concat(Pe,"-treenode-checkbox-checked"),rn),(0,Oe.Z)(Et,"".concat(Pe,"-treenode-checkbox-indeterminate"),An),(0,Oe.Z)(Et,"".concat(Pe,"-treenode-selected"),Gt),(0,Oe.Z)(Et,"".concat(Pe,"-treenode-loading"),ni),(0,Oe.Z)(Et,"".concat(Pe,"-treenode-active"),Yn),(0,Oe.Z)(Et,"".concat(Pe,"-treenode-leaf-last"),at),(0,Oe.Z)(Et,"".concat(Pe,"-treenode-draggable"),zt),(0,Oe.Z)(Et,"dragging",fn),(0,Oe.Z)(Et,"drop-target",qe===Dt),(0,Oe.Z)(Et,"drop-container",ye===Dt),(0,Oe.Z)(Et,"drag-over",!et&&_t),(0,Oe.Z)(Et,"drag-over-gap-top",!et&&Vt),(0,Oe.Z)(Et,"drag-over-gap-bottom",!et&&ot),(0,Oe.Z)(Et,"filter-node",Fe&&Fe((0,se.F)(this.props))),Et)),style:Ht,draggable:un,"aria-grabbed":fn,onDragStart:un?this.onDragStart:void 0,onDragEnter:zt?this.onDragEnter:void 0,onDragOver:zt?this.onDragOver:void 0,onDragLeave:zt?this.onDragLeave:void 0,onDrop:zt?this.onDrop:void 0,onDragEnd:zt?this.onDragEnd:void 0,onMouseMove:wn},Qt,Ye),Rt.createElement(ee,{prefixCls:Pe,level:yt,isStart:Wt,isEnd:Ln}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),Pt}(Rt.Component),He=function(Qe){return Rt.createElement(De.k.Consumer,null,function(Pt){return Rt.createElement(Be,(0,ge.Z)({},Qe,{context:Pt}))})};He.displayName="TreeNode",He.isTreeNode=1;var We=He},39378:function(Vn,xn,pe){"use strict";pe.d(xn,{k:function(){return Oe}});var ge=pe(59301),Oe=ge.createContext(null)},43858:function(Vn,xn,pe){"use strict";pe.d(xn,{O:function(){return We.Z},Z:function(){return Ee}});var ge=pe(96663),Oe=pe(90493),Ke=pe(20135),ut=pe(44127),Ge=pe(19127),Xe=pe(52884),Ne=pe(95727),Tt=pe(89866),Ct=pe(65711),Ve=pe(85745),Lt=pe(92310),dt=pe.n(Lt),Rt=pe(10228),De=pe(26112),ne=pe(48736),ee=pe(59301),ce=pe(39378);function se(Pe){var Fe=Pe.dropPosition,Ae=Pe.dropLevelOffset,ye=Pe.indent,qe={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Fe){case-1:qe.top=0,qe.left=-Ae*ye;break;case 1:qe.bottom=0,qe.left=-Ae*ye;break;case 0:qe.bottom=0,qe.left=ye;break}return ee.createElement("div",{style:qe})}function he(Pe){if(Pe==null)throw new TypeError("Cannot destructure "+Pe)}var ve=pe(72071),be=pe(6620),ke=pe(34280),Be=pe(24916),He=pe(77900),We=pe(39417);function rt(Pe,Fe){var Ae=ee.useState(!1),ye=(0,ve.Z)(Ae,2),qe=ye[0],vt=ye[1];ee.useLayoutEffect(function(){if(qe)return Pe(),function(){Fe()}},[qe]),ee.useLayoutEffect(function(){return vt(!0),function(){vt(!1)}},[])}var Qe=pe(71430),Pt=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Ze=function(Fe,Ae){var ye=Fe.className,qe=Fe.style,vt=Fe.motion,et=Fe.motionNodes,Ye=Fe.motionType,xt=Fe.onMotionStart,yt=Fe.onMotionEnd,at=Fe.active,zt=Fe.treeNodeRequiredProps,un=(0,be.Z)(Fe,Pt),fn=ee.useState(!0),Qt=(0,ve.Z)(fn,2),Kn=Qt[0],On=Qt[1],jt=ee.useContext(ce.k),sn=jt.prefixCls,jn=et&&Ye!=="hide";(0,ke.Z)(function(){et&&jn!==Kn&&On(jn)},[et]);var dn=function(){et&&xt()},Pn=ee.useRef(!1),ui=function(){et&&!Pn.current&&(Pn.current=!0,yt())};rt(dn,ui);var pi=function(bi){jn===bi&&ui()};return et?ee.createElement(He.default,(0,ge.Z)({ref:Ae,visible:Kn},vt,{motionAppear:Ye==="show",onVisibleChanged:pi}),function(gi,bi){var Xi=gi.className,ar=gi.style;return ee.createElement("div",{ref:bi,className:dt()("".concat(sn,"-treenode-motion"),Xi),style:ar},et.map(function(Ji){var wr=(0,ge.Z)({},(he(Ji.data),Ji.data)),mr=Ji.title,Hi=Ji.key,Er=Ji.isStart,$n=Ji.isEnd;delete wr.children;var Le=(0,Qe.H8)(Hi,zt);return ee.createElement(We.Z,(0,ge.Z)({},wr,Le,{title:mr,active:at,data:Ji.data,key:Hi,isStart:Er,isEnd:$n}))}))}):ee.createElement(We.Z,(0,ge.Z)({domRef:Ae,className:ye,style:qe},un,{active:at}))};Ze.displayName="MotionTreeNode";var Et=ee.forwardRef(Ze),it=Et;function Dt(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ae=Pe.length,ye=Fe.length;if(Math.abs(Ae-ye)!==1)return{add:!1,key:null};function qe(vt,et){var Ye=new Map;vt.forEach(function(yt){Ye.set(yt,!0)});var xt=et.filter(function(yt){return!Ye.has(yt)});return xt.length===1?xt[0]:null}return Ae<ye?{add:!0,key:qe(Pe,Fe)}:{add:!1,key:qe(Fe,Pe)}}function ht(Pe,Fe,Ae){var ye=Pe.findIndex(function(Ye){return Ye.key===Ae}),qe=Pe[ye+1],vt=Fe.findIndex(function(Ye){return Ye.key===Ae});if(qe){var et=Fe.findIndex(function(Ye){return Ye.key===qe.key});return Fe.slice(vt+1,et)}return Fe.slice(vt+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"],_t={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Vt=function(){},ot="RC_TREE_MOTION_".concat(Math.random()),Ue={key:ot},Wt={key:ot,level:0,index:0,pos:"0",node:Ue,nodes:[Ue]},Ln={parent:null,children:[],pos:Wt.pos,data:Ue,title:null,key:ot,isStart:[],isEnd:[]};function Fn(Pe,Fe,Ae,ye){return Fe===!1||!Ae?Pe:Pe.slice(0,Math.ceil(Ae/ye)+1)}function Gt(Pe){var Fe=Pe.key,Ae=Pe.pos;return(0,Qe.km)(Fe,Ae)}function rn(Pe){for(var Fe=String(Pe.data.key),Ae=Pe;Ae.parent;)Ae=Ae.parent,Fe="".concat(Ae.data.key," > ").concat(Fe);return Fe}var An=ee.forwardRef(function(Pe,Fe){var Ae=Pe.prefixCls,ye=Pe.data,qe=Pe.selectable,vt=Pe.checkable,et=Pe.expandedKeys,Ye=Pe.selectedKeys,xt=Pe.checkedKeys,yt=Pe.loadedKeys,at=Pe.loadingKeys,zt=Pe.halfCheckedKeys,un=Pe.keyEntities,fn=Pe.disabled,Qt=Pe.dragging,Kn=Pe.dragOverNodeKey,On=Pe.dropPosition,jt=Pe.motion,sn=Pe.height,jn=Pe.itemHeight,dn=Pe.virtual,Pn=Pe.focusable,ui=Pe.activeItem,pi=Pe.focused,gi=Pe.tabIndex,bi=Pe.onKeyDown,Xi=Pe.onFocus,ar=Pe.onBlur,Ji=Pe.onActiveChange,wr=Pe.onListChangeStart,mr=Pe.onListChangeEnd,Hi=(0,be.Z)(Pe,Ht),Er=ee.useRef(null),$n=ee.useRef(null);ee.useImperativeHandle(Fe,function(){return{scrollTo:function(Cn){Er.current.scrollTo(Cn)},getIndentWidth:function(){return $n.current.offsetWidth}}});var Le=ee.useState(et),Ei=(0,ve.Z)(Le,2),Ri=Ei[0],nn=Ei[1],di=ee.useState(ye),yi=(0,ve.Z)(di,2),Li=yi[0],Tn=yi[1],Un=ee.useState(ye),kt=(0,ve.Z)(Un,2),$t=kt[0],Je=kt[1],qt=ee.useState([]),vn=(0,ve.Z)(qt,2),Ft=vn[0],st=vn[1],on=ee.useState(null),En=(0,ve.Z)(on,2),Dn=En[0],Jn=En[1],St=ee.useRef(ye);St.current=ye;function Nn(){var en=St.current;Tn(en),Je(en),st([]),Jn(null),mr()}(0,ke.Z)(function(){nn(et);var en=Dt(Ri,et);if(en.key!==null)if(en.add){var Cn=Li.findIndex(function(Hn){var Qn=Hn.key;return Qn===en.key}),At=Fn(ht(Li,ye,en.key),dn,sn,jn),yn=Li.slice();yn.splice(Cn+1,0,Ln),Je(yn),st(At),Jn("show")}else{var pn=ye.findIndex(function(Hn){var Qn=Hn.key;return Qn===en.key}),mn=Fn(ht(ye,Li,en.key),dn,sn,jn),Wn=ye.slice();Wn.splice(pn+1,0,Ln),Je(Wn),st(mn),Jn("hide")}else Li!==ye&&(Tn(ye),Je(ye))},[et,ye]),ee.useEffect(function(){Qt||Nn()},[Qt]);var qn=jt?$t:ye,Si={expandedKeys:et,selectedKeys:Ye,loadedKeys:yt,loadingKeys:at,checkedKeys:xt,halfCheckedKeys:zt,dragOverNodeKey:Kn,dropPosition:On,keyEntities:un};return ee.createElement(ee.Fragment,null,pi&&ui&&ee.createElement("span",{style:_t,"aria-live":"assertive"},rn(ui)),ee.createElement("div",null,ee.createElement("input",{style:_t,disabled:Pn===!1||fn,tabIndex:Pn!==!1?gi:null,onKeyDown:bi,onFocus:Xi,onBlur:ar,value:"",onChange:Vt,"aria-label":"for screen reader"})),ee.createElement("div",{className:"".concat(Ae,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},ee.createElement("div",{className:"".concat(Ae,"-indent")},ee.createElement("div",{ref:$n,className:"".concat(Ae,"-indent-unit")}))),ee.createElement(Be.Z,(0,ge.Z)({},Hi,{data:qn,itemKey:Gt,height:sn,fullHeight:!1,virtual:dn,itemHeight:jn,prefixCls:"".concat(Ae,"-list"),ref:Er,onVisibleChange:function(Cn,At){var yn=new Set(Cn),pn=At.filter(function(mn){return!yn.has(mn)});pn.some(function(mn){return Gt(mn)===ot})&&Nn()}}),function(en){var Cn=en.pos,At=(0,ge.Z)({},(he(en.data),en.data)),yn=en.title,pn=en.key,mn=en.isStart,Wn=en.isEnd,Hn=(0,Qe.km)(pn,Cn);delete At.key,delete At.children;var Qn=(0,Qe.H8)(Hn,Si);return ee.createElement(it,(0,ge.Z)({},At,Qn,{title:yn,active:!!ui&&pn===ui.key,pos:Cn,data:en.data,isStart:mn,isEnd:Wn,motion:jt,motionNodes:pn===ot?Ft:null,motionType:Dn,onMotionStart:wr,onMotionEnd:Nn,treeNodeRequiredProps:Si,onMouseMove:function(){Ji(null)}}))}))});An.displayName="NodeList";var ni=An,Sn=pe(35654),Yn=pe(90782),It=pe(67841),wn=10,Gn=function(Pe){(0,Ct.Z)(Ae,Pe);var Fe=(0,Ve.Z)(Ae);function Ae(){var ye;(0,Xe.Z)(this,Ae);for(var qe=arguments.length,vt=new Array(qe),et=0;et<qe;et++)vt[et]=arguments[et];return ye=Fe.call.apply(Fe,[this].concat(vt)),ye.destroyed=!1,ye.delayedDragEnterLogic=void 0,ye.loadingRetryTimes={},ye.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,Qe.w$)()},ye.dragStartMousePosition=null,ye.dragNode=void 0,ye.currentMouseOverDroppableNodeKey=null,ye.listRef=ee.createRef(),ye.onNodeDragStart=function(Ye,xt){var yt=ye.state,at=yt.expandedKeys,zt=yt.keyEntities,un=ye.props.onDragStart,fn=xt.props.eventKey;ye.dragNode=xt,ye.dragStartMousePosition={x:Ye.clientX,y:Ye.clientY};var Qt=(0,Sn._5)(at,fn);ye.setState({draggingNodeKey:fn,dragChildrenKeys:(0,Sn.wA)(fn,zt),indent:ye.listRef.current.getIndentWidth()}),ye.setExpandedKeys(Qt),window.addEventListener("dragend",ye.onWindowDragEnd),un==null||un({event:Ye,node:(0,Qe.F)(xt.props)})},ye.onNodeDragEnter=function(Ye,xt){var yt=ye.state,at=yt.expandedKeys,zt=yt.keyEntities,un=yt.dragChildrenKeys,fn=yt.flattenNodes,Qt=yt.indent,Kn=ye.props,On=Kn.onDragEnter,jt=Kn.onExpand,sn=Kn.allowDrop,jn=Kn.direction,dn=xt.props,Pn=dn.pos,ui=dn.eventKey,pi=(0,Tt.Z)(ye),gi=pi.dragNode;if(ye.currentMouseOverDroppableNodeKey!==ui&&(ye.currentMouseOverDroppableNodeKey=ui),!gi){ye.resetDragState();return}var bi=(0,Sn.OM)(Ye,gi,xt,Qt,ye.dragStartMousePosition,sn,fn,zt,at,jn),Xi=bi.dropPosition,ar=bi.dropLevelOffset,Ji=bi.dropTargetKey,wr=bi.dropContainerKey,mr=bi.dropTargetPos,Hi=bi.dropAllowed,Er=bi.dragOverNodeKey;if(un.indexOf(Ji)!==-1||!Hi){ye.resetDragState();return}if(ye.delayedDragEnterLogic||(ye.delayedDragEnterLogic={}),Object.keys(ye.delayedDragEnterLogic).forEach(function($n){clearTimeout(ye.delayedDragEnterLogic[$n])}),gi.props.eventKey!==xt.props.eventKey&&(Ye.persist(),ye.delayedDragEnterLogic[Pn]=window.setTimeout(function(){if(ye.state.draggingNodeKey!==null){var $n=(0,Ge.Z)(at),Le=(0,It.Z)(zt,xt.props.eventKey);Le&&(Le.children||[]).length&&($n=(0,Sn.L0)(at,xt.props.eventKey)),"expandedKeys"in ye.props||ye.setExpandedKeys($n),jt==null||jt($n,{node:(0,Qe.F)(xt.props),expanded:!0,nativeEvent:Ye.nativeEvent})}},800)),gi.props.eventKey===Ji&&ar===0){ye.resetDragState();return}ye.setState({dragOverNodeKey:Er,dropPosition:Xi,dropLevelOffset:ar,dropTargetKey:Ji,dropContainerKey:wr,dropTargetPos:mr,dropAllowed:Hi}),On==null||On({event:Ye,node:(0,Qe.F)(xt.props),expandedKeys:at})},ye.onNodeDragOver=function(Ye,xt){var yt=ye.state,at=yt.dragChildrenKeys,zt=yt.flattenNodes,un=yt.keyEntities,fn=yt.expandedKeys,Qt=yt.indent,Kn=ye.props,On=Kn.onDragOver,jt=Kn.allowDrop,sn=Kn.direction,jn=(0,Tt.Z)(ye),dn=jn.dragNode;if(dn){var Pn=(0,Sn.OM)(Ye,dn,xt,Qt,ye.dragStartMousePosition,jt,zt,un,fn,sn),ui=Pn.dropPosition,pi=Pn.dropLevelOffset,gi=Pn.dropTargetKey,bi=Pn.dropContainerKey,Xi=Pn.dropAllowed,ar=Pn.dropTargetPos,Ji=Pn.dragOverNodeKey;at.indexOf(gi)!==-1||!Xi||(dn.props.eventKey===gi&&pi===0?ye.state.dropPosition===null&&ye.state.dropLevelOffset===null&&ye.state.dropTargetKey===null&&ye.state.dropContainerKey===null&&ye.state.dropTargetPos===null&&ye.state.dropAllowed===!1&&ye.state.dragOverNodeKey===null||ye.resetDragState():ui===ye.state.dropPosition&&pi===ye.state.dropLevelOffset&&gi===ye.state.dropTargetKey&&bi===ye.state.dropContainerKey&&ar===ye.state.dropTargetPos&&Xi===ye.state.dropAllowed&&Ji===ye.state.dragOverNodeKey||ye.setState({dropPosition:ui,dropLevelOffset:pi,dropTargetKey:gi,dropContainerKey:bi,dropTargetPos:ar,dropAllowed:Xi,dragOverNodeKey:Ji}),On==null||On({event:Ye,node:(0,Qe.F)(xt.props)}))}},ye.onNodeDragLeave=function(Ye,xt){ye.currentMouseOverDroppableNodeKey===xt.props.eventKey&&!Ye.currentTarget.contains(Ye.relatedTarget)&&(ye.resetDragState(),ye.currentMouseOverDroppableNodeKey=null);var yt=ye.props.onDragLeave;yt==null||yt({event:Ye,node:(0,Qe.F)(xt.props)})},ye.onWindowDragEnd=function(Ye){ye.onNodeDragEnd(Ye,null,!0),window.removeEventListener("dragend",ye.onWindowDragEnd)},ye.onNodeDragEnd=function(Ye,xt){var yt=ye.props.onDragEnd;ye.setState({dragOverNodeKey:null}),ye.cleanDragState(),yt==null||yt({event:Ye,node:(0,Qe.F)(xt.props)}),ye.dragNode=null,window.removeEventListener("dragend",ye.onWindowDragEnd)},ye.onNodeDrop=function(Ye,xt){var yt,at=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,zt=ye.state,un=zt.dragChildrenKeys,fn=zt.dropPosition,Qt=zt.dropTargetKey,Kn=zt.dropTargetPos,On=zt.dropAllowed;if(On){var jt=ye.props.onDrop;if(ye.setState({dragOverNodeKey:null}),ye.cleanDragState(),Qt!==null){var sn=(0,ut.Z)((0,ut.Z)({},(0,Qe.H8)(Qt,ye.getTreeNodeRequiredProps())),{},{active:((yt=ye.getActiveItem())===null||yt===void 0?void 0:yt.key)===Qt,data:(0,It.Z)(ye.state.keyEntities,Qt).node}),jn=un.indexOf(Qt)!==-1;(0,ne.ZP)(!jn,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var dn=(0,Sn.yx)(Kn),Pn={event:Ye,node:(0,Qe.F)(sn),dragNode:ye.dragNode?(0,Qe.F)(ye.dragNode.props):null,dragNodesKeys:[ye.dragNode.props.eventKey].concat(un),dropToGap:fn!==0,dropPosition:fn+Number(dn[dn.length-1])};at||jt==null||jt(Pn),ye.dragNode=null}}},ye.cleanDragState=function(){var Ye=ye.state.draggingNodeKey;Ye!==null&&ye.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),ye.dragStartMousePosition=null,ye.currentMouseOverDroppableNodeKey=null},ye.triggerExpandActionExpand=function(Ye,xt){var yt=ye.state,at=yt.expandedKeys,zt=yt.flattenNodes,un=xt.expanded,fn=xt.key,Qt=xt.isLeaf;if(!(Qt||Ye.shiftKey||Ye.metaKey||Ye.ctrlKey)){var Kn=zt.filter(function(jt){return jt.key===fn})[0],On=(0,Qe.F)((0,ut.Z)((0,ut.Z)({},(0,Qe.H8)(fn,ye.getTreeNodeRequiredProps())),{},{data:Kn.data}));ye.setExpandedKeys(un?(0,Sn._5)(at,fn):(0,Sn.L0)(at,fn)),ye.onNodeExpand(Ye,On)}},ye.onNodeClick=function(Ye,xt){var yt=ye.props,at=yt.onClick,zt=yt.expandAction;zt==="click"&&ye.triggerExpandActionExpand(Ye,xt),at==null||at(Ye,xt)},ye.onNodeDoubleClick=function(Ye,xt){var yt=ye.props,at=yt.onDoubleClick,zt=yt.expandAction;zt==="doubleClick"&&ye.triggerExpandActionExpand(Ye,xt),at==null||at(Ye,xt)},ye.onNodeSelect=function(Ye,xt){var yt=ye.state.selectedKeys,at=ye.state,zt=at.keyEntities,un=at.fieldNames,fn=ye.props,Qt=fn.onSelect,Kn=fn.multiple,On=xt.selected,jt=xt[un.key],sn=!On;sn?Kn?yt=(0,Sn.L0)(yt,jt):yt=[jt]:yt=(0,Sn._5)(yt,jt);var jn=yt.map(function(dn){var Pn=(0,It.Z)(zt,dn);return Pn?Pn.node:null}).filter(function(dn){return dn});ye.setUncontrolledState({selectedKeys:yt}),Qt==null||Qt(yt,{event:"select",selected:sn,node:xt,selectedNodes:jn,nativeEvent:Ye.nativeEvent})},ye.onNodeCheck=function(Ye,xt,yt){var at=ye.state,zt=at.keyEntities,un=at.checkedKeys,fn=at.halfCheckedKeys,Qt=ye.props,Kn=Qt.checkStrictly,On=Qt.onCheck,jt=xt.key,sn,jn={event:"check",node:xt,checked:yt,nativeEvent:Ye.nativeEvent};if(Kn){var dn=yt?(0,Sn.L0)(un,jt):(0,Sn._5)(un,jt),Pn=(0,Sn._5)(fn,jt);sn={checked:dn,halfChecked:Pn},jn.checkedNodes=dn.map(function(ar){return(0,It.Z)(zt,ar)}).filter(function(ar){return ar}).map(function(ar){return ar.node}),ye.setUncontrolledState({checkedKeys:dn})}else{var ui=(0,Yn.S)([].concat((0,Ge.Z)(un),[jt]),!0,zt),pi=ui.checkedKeys,gi=ui.halfCheckedKeys;if(!yt){var bi=new Set(pi);bi.delete(jt);var Xi=(0,Yn.S)(Array.from(bi),{checked:!1,halfCheckedKeys:gi},zt);pi=Xi.checkedKeys,gi=Xi.halfCheckedKeys}sn=pi,jn.checkedNodes=[],jn.checkedNodesPositions=[],jn.halfCheckedKeys=gi,pi.forEach(function(ar){var Ji=(0,It.Z)(zt,ar);if(Ji){var wr=Ji.node,mr=Ji.pos;jn.checkedNodes.push(wr),jn.checkedNodesPositions.push({node:wr,pos:mr})}}),ye.setUncontrolledState({checkedKeys:pi},!1,{halfCheckedKeys:gi})}On==null||On(sn,jn)},ye.onNodeLoad=function(Ye){var xt=Ye.key,yt=new Promise(function(at,zt){ye.setState(function(un){var fn=un.loadedKeys,Qt=fn===void 0?[]:fn,Kn=un.loadingKeys,On=Kn===void 0?[]:Kn,jt=ye.props,sn=jt.loadData,jn=jt.onLoad;if(!sn||Qt.indexOf(xt)!==-1||On.indexOf(xt)!==-1)return null;var dn=sn(Ye);return dn.then(function(){var Pn=ye.state.loadedKeys,ui=(0,Sn.L0)(Pn,xt);jn==null||jn(ui,{event:"load",node:Ye}),ye.setUncontrolledState({loadedKeys:ui}),ye.setState(function(pi){return{loadingKeys:(0,Sn._5)(pi.loadingKeys,xt)}}),at()}).catch(function(Pn){if(ye.setState(function(pi){return{loadingKeys:(0,Sn._5)(pi.loadingKeys,xt)}}),ye.loadingRetryTimes[xt]=(ye.loadingRetryTimes[xt]||0)+1,ye.loadingRetryTimes[xt]>=wn){var ui=ye.state.loadedKeys;(0,ne.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),ye.setUncontrolledState({loadedKeys:(0,Sn.L0)(ui,xt)}),at()}zt(Pn)}),{loadingKeys:(0,Sn.L0)(On,xt)}})});return yt.catch(function(){}),yt},ye.onNodeMouseEnter=function(Ye,xt){var yt=ye.props.onMouseEnter;yt==null||yt({event:Ye,node:xt})},ye.onNodeMouseLeave=function(Ye,xt){var yt=ye.props.onMouseLeave;yt==null||yt({event:Ye,node:xt})},ye.onNodeContextMenu=function(Ye,xt){var yt=ye.props.onRightClick;yt&&(Ye.preventDefault(),yt({event:Ye,node:xt}))},ye.onFocus=function(){var Ye=ye.props.onFocus;ye.setState({focused:!0});for(var xt=arguments.length,yt=new Array(xt),at=0;at<xt;at++)yt[at]=arguments[at];Ye==null||Ye.apply(void 0,yt)},ye.onBlur=function(){var Ye=ye.props.onBlur;ye.setState({focused:!1}),ye.onActiveChange(null);for(var xt=arguments.length,yt=new Array(xt),at=0;at<xt;at++)yt[at]=arguments[at];Ye==null||Ye.apply(void 0,yt)},ye.getTreeNodeRequiredProps=function(){var Ye=ye.state,xt=Ye.expandedKeys,yt=Ye.selectedKeys,at=Ye.loadedKeys,zt=Ye.loadingKeys,un=Ye.checkedKeys,fn=Ye.halfCheckedKeys,Qt=Ye.dragOverNodeKey,Kn=Ye.dropPosition,On=Ye.keyEntities;return{expandedKeys:xt||[],selectedKeys:yt||[],loadedKeys:at||[],loadingKeys:zt||[],checkedKeys:un||[],halfCheckedKeys:fn||[],dragOverNodeKey:Qt,dropPosition:Kn,keyEntities:On}},ye.setExpandedKeys=function(Ye){var xt=ye.state,yt=xt.treeData,at=xt.fieldNames,zt=(0,Qe.oH)(yt,Ye,at);ye.setUncontrolledState({expandedKeys:Ye,flattenNodes:zt},!0)},ye.onNodeExpand=function(Ye,xt){var yt=ye.state.expandedKeys,at=ye.state,zt=at.listChanging,un=at.fieldNames,fn=ye.props,Qt=fn.onExpand,Kn=fn.loadData,On=xt.expanded,jt=xt[un.key];if(!zt){var sn=yt.indexOf(jt),jn=!On;if((0,ne.ZP)(On&&sn!==-1||!On&&sn===-1,"Expand state not sync with index check"),jn?yt=(0,Sn.L0)(yt,jt):yt=(0,Sn._5)(yt,jt),ye.setExpandedKeys(yt),Qt==null||Qt(yt,{node:xt,expanded:jn,nativeEvent:Ye.nativeEvent}),jn&&Kn){var dn=ye.onNodeLoad(xt);dn&&dn.then(function(){var Pn=(0,Qe.oH)(ye.state.treeData,yt,un);ye.setUncontrolledState({flattenNodes:Pn})}).catch(function(){var Pn=ye.state.expandedKeys,ui=(0,Sn._5)(Pn,jt);ye.setExpandedKeys(ui)})}}},ye.onListChangeStart=function(){ye.setUncontrolledState({listChanging:!0})},ye.onListChangeEnd=function(){setTimeout(function(){ye.setUncontrolledState({listChanging:!1})})},ye.onActiveChange=function(Ye){var xt=ye.state.activeKey,yt=ye.props.onActiveChange;xt!==Ye&&(ye.setState({activeKey:Ye}),Ye!==null&&ye.scrollTo({key:Ye}),yt==null||yt(Ye))},ye.getActiveItem=function(){var Ye=ye.state,xt=Ye.activeKey,yt=Ye.flattenNodes;return xt===null?null:yt.find(function(at){var zt=at.key;return zt===xt})||null},ye.offsetActiveKey=function(Ye){var xt=ye.state,yt=xt.flattenNodes,at=xt.activeKey,zt=yt.findIndex(function(Qt){var Kn=Qt.key;return Kn===at});zt===-1&&Ye<0&&(zt=yt.length),zt=(zt+Ye+yt.length)%yt.length;var un=yt[zt];if(un){var fn=un.key;ye.onActiveChange(fn)}else ye.onActiveChange(null)},ye.onKeyDown=function(Ye){var xt=ye.state,yt=xt.activeKey,at=xt.expandedKeys,zt=xt.checkedKeys,un=xt.fieldNames,fn=ye.props,Qt=fn.onKeyDown,Kn=fn.checkable,On=fn.selectable;switch(Ye.which){case Rt.Z.UP:{ye.offsetActiveKey(-1),Ye.preventDefault();break}case Rt.Z.DOWN:{ye.offsetActiveKey(1),Ye.preventDefault();break}}var jt=ye.getActiveItem();if(jt&&jt.data){var sn=ye.getTreeNodeRequiredProps(),jn=jt.data.isLeaf===!1||!!(jt.data[un.children]||[]).length,dn=(0,Qe.F)((0,ut.Z)((0,ut.Z)({},(0,Qe.H8)(yt,sn)),{},{data:jt.data,active:!0}));switch(Ye.which){case Rt.Z.LEFT:{jn&&at.includes(yt)?ye.onNodeExpand({},dn):jt.parent&&ye.onActiveChange(jt.parent.key),Ye.preventDefault();break}case Rt.Z.RIGHT:{jn&&!at.includes(yt)?ye.onNodeExpand({},dn):jt.children&&jt.children.length&&ye.onActiveChange(jt.children[0].key),Ye.preventDefault();break}case Rt.Z.ENTER:case Rt.Z.SPACE:{Kn&&!dn.disabled&&dn.checkable!==!1&&!dn.disableCheckbox?ye.onNodeCheck({},dn,!zt.includes(yt)):!Kn&&On&&!dn.disabled&&dn.selectable!==!1&&ye.onNodeSelect({},dn);break}}}Qt==null||Qt(Ye)},ye.setUncontrolledState=function(Ye){var xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,yt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!ye.destroyed){var at=!1,zt=!0,un={};Object.keys(Ye).forEach(function(fn){if(fn in ye.props){zt=!1;return}at=!0,un[fn]=Ye[fn]}),at&&(!xt||zt)&&ye.setState((0,ut.Z)((0,ut.Z)({},un),yt))}},ye.scrollTo=function(Ye){ye.listRef.current.scrollTo(Ye)},ye}return(0,Ne.Z)(Ae,[{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,vt=this.state,et=vt.focused,Ye=vt.flattenNodes,xt=vt.keyEntities,yt=vt.draggingNodeKey,at=vt.activeKey,zt=vt.dropLevelOffset,un=vt.dropContainerKey,fn=vt.dropTargetKey,Qt=vt.dropPosition,Kn=vt.dragOverNodeKey,On=vt.indent,jt=this.props,sn=jt.prefixCls,jn=jt.className,dn=jt.style,Pn=jt.showLine,ui=jt.focusable,pi=jt.tabIndex,gi=pi===void 0?0:pi,bi=jt.selectable,Xi=jt.showIcon,ar=jt.icon,Ji=jt.switcherIcon,wr=jt.draggable,mr=jt.checkable,Hi=jt.checkStrictly,Er=jt.disabled,$n=jt.motion,Le=jt.loadData,Ei=jt.filterTreeNode,Ri=jt.height,nn=jt.itemHeight,di=jt.virtual,yi=jt.titleRender,Li=jt.dropIndicatorRender,Tn=jt.onContextMenu,Un=jt.onScroll,kt=jt.direction,$t=jt.rootClassName,Je=jt.rootStyle,qt=(0,De.Z)(this.props,{aria:!0,data:!0}),vn;return wr&&((0,Ke.Z)(wr)==="object"?vn=wr:typeof wr=="function"?vn={nodeDraggable:wr}:vn={}),ee.createElement(ce.k.Provider,{value:{prefixCls:sn,selectable:bi,showIcon:Xi,icon:ar,switcherIcon:Ji,draggable:vn,draggingNodeKey:yt,checkable:mr,checkStrictly:Hi,disabled:Er,keyEntities:xt,dropLevelOffset:zt,dropContainerKey:un,dropTargetKey:fn,dropPosition:Qt,dragOverNodeKey:Kn,indent:On,direction:kt,dropIndicatorRender:Li,loadData:Le,filterTreeNode:Ei,titleRender:yi,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:dt()(sn,jn,$t,(qe={},(0,Oe.Z)(qe,"".concat(sn,"-show-line"),Pn),(0,Oe.Z)(qe,"".concat(sn,"-focused"),et),(0,Oe.Z)(qe,"".concat(sn,"-active-focused"),at!==null),qe)),style:Je},ee.createElement(ni,(0,ge.Z)({ref:this.listRef,prefixCls:sn,style:dn,data:Ye,disabled:Er,selectable:bi,checkable:!!mr,motion:$n,dragging:yt!==null,height:Ri,itemHeight:nn,virtual:di,focusable:ui,focused:et,tabIndex:gi,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Tn,onScroll:Un},this.getTreeNodeRequiredProps(),qt))))}}],[{key:"getDerivedStateFromProps",value:function(qe,vt){var et=vt.prevProps,Ye={prevProps:qe};function xt(ui){return!et&&ui in qe||et&&et[ui]!==qe[ui]}var yt,at=vt.fieldNames;if(xt("fieldNames")&&(at=(0,Qe.w$)(qe.fieldNames),Ye.fieldNames=at),xt("treeData")?yt=qe.treeData:xt("children")&&((0,ne.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),yt=(0,Qe.zn)(qe.children)),yt){Ye.treeData=yt;var zt=(0,Qe.I8)(yt,{fieldNames:at});Ye.keyEntities=(0,ut.Z)((0,Oe.Z)({},ot,Wt),zt.keyEntities)}var un=Ye.keyEntities||vt.keyEntities;if(xt("expandedKeys")||et&&xt("autoExpandParent"))Ye.expandedKeys=qe.autoExpandParent||!et&&qe.defaultExpandParent?(0,Sn.r7)(qe.expandedKeys,un):qe.expandedKeys;else if(!et&&qe.defaultExpandAll){var fn=(0,ut.Z)({},un);delete fn[ot],Ye.expandedKeys=Object.keys(fn).map(function(ui){return fn[ui].key})}else!et&&qe.defaultExpandedKeys&&(Ye.expandedKeys=qe.autoExpandParent||qe.defaultExpandParent?(0,Sn.r7)(qe.defaultExpandedKeys,un):qe.defaultExpandedKeys);if(Ye.expandedKeys||delete Ye.expandedKeys,yt||Ye.expandedKeys){var Qt=(0,Qe.oH)(yt||vt.treeData,Ye.expandedKeys||vt.expandedKeys,at);Ye.flattenNodes=Qt}if(qe.selectable&&(xt("selectedKeys")?Ye.selectedKeys=(0,Sn.BT)(qe.selectedKeys,qe):!et&&qe.defaultSelectedKeys&&(Ye.selectedKeys=(0,Sn.BT)(qe.defaultSelectedKeys,qe))),qe.checkable){var Kn;if(xt("checkedKeys")?Kn=(0,Sn.E6)(qe.checkedKeys)||{}:!et&&qe.defaultCheckedKeys?Kn=(0,Sn.E6)(qe.defaultCheckedKeys)||{}:yt&&(Kn=(0,Sn.E6)(qe.checkedKeys)||{checkedKeys:vt.checkedKeys,halfCheckedKeys:vt.halfCheckedKeys}),Kn){var On=Kn,jt=On.checkedKeys,sn=jt===void 0?[]:jt,jn=On.halfCheckedKeys,dn=jn===void 0?[]:jn;if(!qe.checkStrictly){var Pn=(0,Yn.S)(sn,!0,un);sn=Pn.checkedKeys,dn=Pn.halfCheckedKeys}Ye.checkedKeys=sn,Ye.halfCheckedKeys=dn}}return xt("loadedKeys")&&(Ye.loadedKeys=qe.loadedKeys),Ye}}]),Ae}(ee.Component);Gn.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:se,allowDrop:function(){return!0},expandAction:!1},Gn.TreeNode=We.Z;var ze=Gn,Ee=ze},35654:function(Vn,xn,pe){"use strict";pe.d(xn,{BT:function(){return ee},E6:function(){return he},L0:function(){return Ve},OM:function(){return ne},_5:function(){return Ct},r7:function(){return ve},wA:function(){return dt},yx:function(){return Lt}});var ge=pe(19127),Oe=pe(20135),Ke=pe(48736),ut=pe(59301),Ge=pe(39417),Xe=pe(67841),Ne=pe(71430),Tt=null;function Ct(be,ke){if(!be)return[];var Be=be.slice(),He=Be.indexOf(ke);return He>=0&&Be.splice(He,1),Be}function Ve(be,ke){var Be=(be||[]).slice();return Be.indexOf(ke)===-1&&Be.push(ke),Be}function Lt(be){return be.split("-")}function dt(be,ke){var Be=[],He=(0,Xe.Z)(ke,be);function We(){var rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];rt.forEach(function(Qe){var Pt=Qe.key,Ze=Qe.children;Be.push(Pt),We(Ze)})}return We(He.children),Be}function Rt(be){if(be.parent){var ke=Lt(be.pos);return Number(ke[ke.length-1])===be.parent.children.length-1}return!1}function De(be){var ke=Lt(be.pos);return Number(ke[ke.length-1])===0}function ne(be,ke,Be,He,We,rt,Qe,Pt,Ze,Et){var it,Dt=be.clientX,ht=be.clientY,Ht=be.target.getBoundingClientRect(),_t=Ht.top,Vt=Ht.height,ot=(Et==="rtl"?-1:1)*(((We==null?void 0:We.x)||0)-Dt),Ue=(ot-12)/He,Wt=(0,Xe.Z)(Pt,Be.props.eventKey);if(ht<_t+Vt/2){var Ln=Qe.findIndex(function(Ee){return Ee.key===Wt.key}),Fn=Ln<=0?0:Ln-1,Gt=Qe[Fn].key;Wt=(0,Xe.Z)(Pt,Gt)}var rn=Wt.key,An=Wt,ni=Wt.key,Sn=0,Yn=0;if(!Ze.includes(rn))for(var It=0;It<Ue&&Rt(Wt);It+=1)Wt=Wt.parent,Yn+=1;var wn=ke.props.data,Gn=Wt.node,ze=!0;return De(Wt)&&Wt.level===0&&ht<_t+Vt/2&&rt({dragNode:wn,dropNode:Gn,dropPosition:-1})&&Wt.key===Be.props.eventKey?Sn=-1:(An.children||[]).length&&Ze.includes(ni)?rt({dragNode:wn,dropNode:Gn,dropPosition:0})?Sn=0:ze=!1:Yn===0?Ue>-1.5?rt({dragNode:wn,dropNode:Gn,dropPosition:1})?Sn=1:ze=!1:rt({dragNode:wn,dropNode:Gn,dropPosition:0})?Sn=0:rt({dragNode:wn,dropNode:Gn,dropPosition:1})?Sn=1:ze=!1:rt({dragNode:wn,dropNode:Gn,dropPosition:1})?Sn=1:ze=!1,{dropPosition:Sn,dropLevelOffset:Yn,dropTargetKey:Wt.key,dropTargetPos:Wt.pos,dragOverNodeKey:ni,dropContainerKey:Sn===0?null:((it=Wt.parent)===null||it===void 0?void 0:it.key)||null,dropAllowed:ze}}function ee(be,ke){if(be){var Be=ke.multiple;return Be?be.slice():be.length?[be[0]]:be}}var ce=function(ke){return ke};function se(be,ke){if(!be)return[];var Be=ke||{},He=Be.processProps,We=He===void 0?ce:He,rt=Array.isArray(be)?be:[be];return rt.map(function(Qe){var Pt=Qe.children,Ze=_objectWithoutProperties(Qe,Tt),Et=se(Pt,ke);return React.createElement(TreeNode,_extends({key:Ze.key},We(Ze)),Et)})}function he(be){if(!be)return null;var ke;if(Array.isArray(be))ke={checkedKeys:be,halfCheckedKeys:void 0};else if((0,Oe.Z)(be)==="object")ke={checkedKeys:be.checked||void 0,halfCheckedKeys:be.halfChecked||void 0};else return(0,Ke.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return ke}function ve(be,ke){var Be=new Set;function He(We){if(!Be.has(We)){var rt=(0,Xe.Z)(ke,We);if(rt){Be.add(We);var Qe=rt.parent,Pt=rt.node;Pt.disabled||Qe&&He(Qe.key)}}}return(be||[]).forEach(function(We){He(We)}),(0,ge.Z)(Be)}},90782:function(Vn,xn,pe){"use strict";pe.d(xn,{S:function(){return Ne}});var ge=pe(48736),Oe=pe(67841);function Ke(Tt,Ct){var Ve=new Set;return Tt.forEach(function(Lt){Ct.has(Lt)||Ve.add(Lt)}),Ve}function ut(Tt){var Ct=Tt||{},Ve=Ct.disabled,Lt=Ct.disableCheckbox,dt=Ct.checkable;return!!(Ve||Lt)||dt===!1}function Ge(Tt,Ct,Ve,Lt){for(var dt=new Set(Tt),Rt=new Set,De=0;De<=Ve;De+=1){var ne=Ct.get(De)||new Set;ne.forEach(function(he){var ve=he.key,be=he.node,ke=he.children,Be=ke===void 0?[]:ke;dt.has(ve)&&!Lt(be)&&Be.filter(function(He){return!Lt(He.node)}).forEach(function(He){dt.add(He.key)})})}for(var ee=new Set,ce=Ve;ce>=0;ce-=1){var se=Ct.get(ce)||new Set;se.forEach(function(he){var ve=he.parent,be=he.node;if(!(Lt(be)||!he.parent||ee.has(he.parent.key))){if(Lt(he.parent.node)){ee.add(ve.key);return}var ke=!0,Be=!1;(ve.children||[]).filter(function(He){return!Lt(He.node)}).forEach(function(He){var We=He.key,rt=dt.has(We);ke&&!rt&&(ke=!1),!Be&&(rt||Rt.has(We))&&(Be=!0)}),ke&&dt.add(ve.key),Be&&Rt.add(ve.key),ee.add(ve.key)}})}return{checkedKeys:Array.from(dt),halfCheckedKeys:Array.from(Ke(Rt,dt))}}function Xe(Tt,Ct,Ve,Lt,dt){for(var Rt=new Set(Tt),De=new Set(Ct),ne=0;ne<=Lt;ne+=1){var ee=Ve.get(ne)||new Set;ee.forEach(function(ve){var be=ve.key,ke=ve.node,Be=ve.children,He=Be===void 0?[]:Be;!Rt.has(be)&&!De.has(be)&&!dt(ke)&&He.filter(function(We){return!dt(We.node)}).forEach(function(We){Rt.delete(We.key)})})}De=new Set;for(var ce=new Set,se=Lt;se>=0;se-=1){var he=Ve.get(se)||new Set;he.forEach(function(ve){var be=ve.parent,ke=ve.node;if(!(dt(ke)||!ve.parent||ce.has(ve.parent.key))){if(dt(ve.parent.node)){ce.add(be.key);return}var Be=!0,He=!1;(be.children||[]).filter(function(We){return!dt(We.node)}).forEach(function(We){var rt=We.key,Qe=Rt.has(rt);Be&&!Qe&&(Be=!1),!He&&(Qe||De.has(rt))&&(He=!0)}),Be||Rt.delete(be.key),He&&De.add(be.key),ce.add(be.key)}})}return{checkedKeys:Array.from(Rt),halfCheckedKeys:Array.from(Ke(De,Rt))}}function Ne(Tt,Ct,Ve,Lt){var dt=[],Rt;Lt?Rt=Lt:Rt=ut;var De=new Set(Tt.filter(function(se){var he=!!(0,Oe.Z)(Ve,se);return he||dt.push(se),he})),ne=new Map,ee=0;Object.keys(Ve).forEach(function(se){var he=Ve[se],ve=he.level,be=ne.get(ve);be||(be=new Set,ne.set(ve,be)),be.add(he),ee=Math.max(ee,ve)}),(0,ge.ZP)(!dt.length,"Tree missing follow keys: ".concat(dt.slice(0,100).map(function(se){return"'".concat(se,"'")}).join(", ")));var ce;return Ct===!0?ce=Ge(De,ne,ee,Rt):ce=Xe(De,Ct.halfCheckedKeys,ne,ee,Rt),ce}},67841:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return ge}});function ge(Oe,Ke){return Oe[Ke]}},71430:function(Vn,xn,pe){"use strict";pe.d(xn,{F:function(){return ve},H8:function(){return he},I8:function(){return se},km:function(){return dt},oH:function(){return ee},w$:function(){return Rt},zn:function(){return ne}});var ge=pe(20135),Oe=pe(19127),Ke=pe(44127),ut=pe(6620),Ge=pe(11592),Xe=pe(2738),Ne=pe(48736),Tt=pe(67841),Ct=["children"];function Ve(be,ke){return"".concat(be,"-").concat(ke)}function Lt(be){return be&&be.type&&be.type.isTreeNode}function dt(be,ke){return be!=null?be:ke}function Rt(be){var ke=be||{},Be=ke.title,He=ke._title,We=ke.key,rt=ke.children,Qe=Be||"title";return{title:Qe,_title:He||[Qe],key:We||"key",children:rt||"children"}}function De(be,ke){var Be=new Map;function He(We){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(We||[]).forEach(function(Qe){var Pt=Qe[ke.key],Ze=Qe[ke.children];warning(Pt!=null,"Tree node must have a certain key: [".concat(rt).concat(Pt,"]"));var Et=String(Pt);warning(!Be.has(Et)||Pt===null||Pt===void 0,"Same 'key' exist in the Tree: ".concat(Et)),Be.set(Et,!0),He(Ze,"".concat(rt).concat(Et," > "))})}He(be)}function ne(be){function ke(Be){var He=(0,Ge.Z)(Be);return He.map(function(We){if(!Lt(We))return(0,Ne.ZP)(!We,"Tree/TreeNode can only accept TreeNode as children."),null;var rt=We.key,Qe=We.props,Pt=Qe.children,Ze=(0,ut.Z)(Qe,Ct),Et=(0,Ke.Z)({key:rt},Ze),it=ke(Pt);return it.length&&(Et.children=it),Et}).filter(function(We){return We})}return ke(be)}function ee(be,ke,Be){var He=Rt(Be),We=He._title,rt=He.key,Qe=He.children,Pt=new Set(ke===!0?[]:ke),Ze=[];function Et(it){var Dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return it.map(function(ht,Ht){for(var _t=Ve(Dt?Dt.pos:"0",Ht),Vt=dt(ht[rt],_t),ot,Ue=0;Ue<We.length;Ue+=1){var Wt=We[Ue];if(ht[Wt]!==void 0){ot=ht[Wt];break}}var Ln=(0,Ke.Z)((0,Ke.Z)({},(0,Xe.Z)(ht,[].concat((0,Oe.Z)(We),[rt,Qe]))),{},{title:ot,key:Vt,parent:Dt,pos:_t,children:null,data:ht,isStart:[].concat((0,Oe.Z)(Dt?Dt.isStart:[]),[Ht===0]),isEnd:[].concat((0,Oe.Z)(Dt?Dt.isEnd:[]),[Ht===it.length-1])});return Ze.push(Ln),ke===!0||Pt.has(Vt)?Ln.children=Et(ht[Qe]||[],Ln):Ln.children=[],Ln})}return Et(be),Ze}function ce(be,ke,Be){var He={};(0,ge.Z)(Be)==="object"?He=Be:He={externalGetKey:Be},He=He||{};var We=He,rt=We.childrenPropName,Qe=We.externalGetKey,Pt=We.fieldNames,Ze=Rt(Pt),Et=Ze.key,it=Ze.children,Dt=rt||it,ht;Qe?typeof Qe=="string"?ht=function(Vt){return Vt[Qe]}:typeof Qe=="function"&&(ht=function(Vt){return Qe(Vt)}):ht=function(Vt,ot){return dt(Vt[Et],ot)};function Ht(_t,Vt,ot,Ue){var Wt=_t?_t[Dt]:be,Ln=_t?Ve(ot.pos,Vt):"0",Fn=_t?[].concat((0,Oe.Z)(Ue),[_t]):[];if(_t){var Gt=ht(_t,Ln),rn={node:_t,index:Vt,pos:Ln,key:Gt,parentPos:ot.node?ot.pos:null,level:ot.level+1,nodes:Fn};ke(rn)}Wt&&Wt.forEach(function(An,ni){Ht(An,ni,{node:_t,pos:Ln,level:ot?ot.level+1:-1},Fn)})}Ht(null)}function se(be){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Be=ke.initWrapper,He=ke.processEntity,We=ke.onProcessFinished,rt=ke.externalGetKey,Qe=ke.childrenPropName,Pt=ke.fieldNames,Ze=arguments.length>2?arguments[2]:void 0,Et=rt||Ze,it={},Dt={},ht={posEntities:it,keyEntities:Dt};return Be&&(ht=Be(ht)||ht),ce(be,function(Ht){var _t=Ht.node,Vt=Ht.index,ot=Ht.pos,Ue=Ht.key,Wt=Ht.parentPos,Ln=Ht.level,Fn=Ht.nodes,Gt={node:_t,nodes:Fn,index:Vt,key:Ue,pos:ot,level:Ln},rn=dt(Ue,ot);it[ot]=Gt,Dt[rn]=Gt,Gt.parent=it[Wt],Gt.parent&&(Gt.parent.children=Gt.parent.children||[],Gt.parent.children.push(Gt)),He&&He(Gt,ht)},{externalGetKey:Et,childrenPropName:Qe,fieldNames:Pt}),We&&We(ht),ht}function he(be,ke){var Be=ke.expandedKeys,He=ke.selectedKeys,We=ke.loadedKeys,rt=ke.loadingKeys,Qe=ke.checkedKeys,Pt=ke.halfCheckedKeys,Ze=ke.dragOverNodeKey,Et=ke.dropPosition,it=ke.keyEntities,Dt=(0,Tt.Z)(it,be),ht={eventKey:be,expanded:Be.indexOf(be)!==-1,selected:He.indexOf(be)!==-1,loaded:We.indexOf(be)!==-1,loading:rt.indexOf(be)!==-1,checked:Qe.indexOf(be)!==-1,halfChecked:Pt.indexOf(be)!==-1,pos:String(Dt?Dt.pos:""),dragOver:Ze===be&&Et===0,dragOverGapTop:Ze===be&&Et===-1,dragOverGapBottom:Ze===be&&Et===1};return ht}function ve(be){var ke=be.data,Be=be.expanded,He=be.selected,We=be.checked,rt=be.loaded,Qe=be.loading,Pt=be.halfChecked,Ze=be.dragOver,Et=be.dragOverGapTop,it=be.dragOverGapBottom,Dt=be.pos,ht=be.active,Ht=be.eventKey,_t=(0,Ke.Z)((0,Ke.Z)({},ke),{},{expanded:Be,selected:He,checked:We,loaded:rt,loading:Qe,halfChecked:Pt,dragOver:Ze,dragOverGapTop:Et,dragOverGapBottom:it,pos:Dt,active:ht,key:Ht});return"props"in _t||Object.defineProperty(_t,"props",{get:function(){return(0,Ne.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),be}}),_t}},8224:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Oe}});var ge=pe(4676);function Oe(Ke,ut,Ge,Xe){var Ne=ge.unstable_batchedUpdates?function(Ct){ge.unstable_batchedUpdates(Ge,Ct)}:Ge;return Ke!=null&&Ke.addEventListener&&Ke.addEventListener(ut,Ne,Xe),{remove:function(){Ke!=null&&Ke.removeEventListener&&Ke.removeEventListener(ut,Ne,Xe)}}}},55468:function(Vn,xn,pe){"use strict";pe.d(xn,{g1:function(){return Lt},os:function(){return Rt}});var ge=/margin|padding|width|height|max|min|offset/,Oe={left:!0,top:!0},Ke={cssFloat:1,styleFloat:1,float:1};function ut(De){return De.nodeType===1?De.ownerDocument.defaultView.getComputedStyle(De,null):{}}function Ge(De,ne,ee){if(ne=ne.toLowerCase(),ee==="auto"){if(ne==="height")return De.offsetHeight;if(ne==="width")return De.offsetWidth}return ne in Oe||(Oe[ne]=ge.test(ne)),Oe[ne]?parseFloat(ee)||0:ee}function Xe(De,ne){var ee=arguments.length,ce=ut(De);return ne=Ke[ne]?"cssFloat"in De.style?"cssFloat":"styleFloat":ne,ee===1?ce:Ge(De,ne,ce[ne]||De.style[ne])}function Ne(De,ne,ee){var ce=arguments.length;if(ne=Ke[ne]?"cssFloat"in De.style?"cssFloat":"styleFloat":ne,ce===3)return typeof ee=="number"&&ge.test(ne)&&(ee="".concat(ee,"px")),De.style[ne]=ee,ee;for(var se in ne)ne.hasOwnProperty(se)&&Ne(De,se,ne[se]);return ut(De)}function Tt(De){return De===document.body?document.documentElement.clientWidth:De.offsetWidth}function Ct(De){return De===document.body?window.innerHeight||document.documentElement.clientHeight:De.offsetHeight}function Ve(){var De=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),ne=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:De,height:ne}}function Lt(){var De=document.documentElement.clientWidth,ne=window.innerHeight||document.documentElement.clientHeight;return{width:De,height:ne}}function dt(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function Rt(De){var ne=De.getBoundingClientRect(),ee=document.documentElement;return{left:ne.left+(window.pageXOffset||ee.scrollLeft)-(ee.clientLeft||document.body.clientLeft||0),top:ne.top+(window.pageYOffset||ee.scrollTop)-(ee.clientTop||document.body.clientTop||0)}}},24514:function(Vn,xn,pe){"use strict";pe.d(xn,{G:function(){return ut}});var ge=pe(47273),Oe=function(Xe){if((0,ge.Z)()&&window.document.documentElement){var Ne=Array.isArray(Xe)?Xe:[Xe],Tt=window.document.documentElement;return Ne.some(function(Ct){return Ct in Tt.style})}return!1},Ke=function(Xe,Ne){if(!Oe(Xe))return!1;var Tt=document.createElement("div"),Ct=Tt.style[Xe];return Tt.style[Xe]=Ne,Tt.style[Xe]!==Ct};function ut(Ge,Xe){return!Array.isArray(Ge)&&Xe!==void 0?Ke(Ge,Xe):Oe(Ge)}},24916:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Gn}});var ge=pe(96663),Oe=pe(20135),Ke=pe(44127),ut=pe(90493),Ge=pe(72071),Xe=pe(6620),Ne=pe(92310),Tt=pe.n(Ne),Ct=pe(29301),Ve=pe(70425),Lt=pe(34280),dt=pe(59301),Rt=pe(4676),De=dt.forwardRef(function(ze,Ee){var Pe=ze.height,Fe=ze.offsetY,Ae=ze.offsetX,ye=ze.children,qe=ze.prefixCls,vt=ze.onInnerResize,et=ze.innerProps,Ye=ze.rtl,xt=ze.extra,yt={},at={display:"flex",flexDirection:"column"};return Fe!==void 0&&(yt={height:Pe,position:"relative",overflow:"hidden"},at=(0,Ke.Z)((0,Ke.Z)({},at),{},(0,ut.Z)((0,ut.Z)((0,ut.Z)((0,ut.Z)((0,ut.Z)({transform:"translateY(".concat(Fe,"px)")},Ye?"marginRight":"marginLeft",-Ae),"position","absolute"),"left",0),"right",0),"top",0))),dt.createElement("div",{style:yt},dt.createElement(Ct.Z,{onResize:function(un){var fn=un.offsetHeight;fn&&vt&&vt()}},dt.createElement("div",(0,ge.Z)({style:at,className:Tt()((0,ut.Z)({},"".concat(qe,"-holder-inner"),qe)),ref:Ee},et),ye,xt)))});De.displayName="Filler";var ne=De;function ee(ze){var Ee=ze.children,Pe=ze.setRef,Fe=dt.useCallback(function(Ae){Pe(Ae)},[]);return dt.cloneElement(Ee,{ref:Fe})}function ce(ze,Ee,Pe,Fe,Ae,ye,qe,vt){var et=vt.getKey;return ze.slice(Ee,Pe+1).map(function(Ye,xt){var yt=Ee+xt,at=qe(Ye,yt,{style:{width:Fe},offsetX:Ae}),zt=et(Ye);return dt.createElement(ee,{key:zt,setRef:function(fn){return ye(Ye,fn)}},at)})}function se(ze,Ee,Pe,Fe){var Ae=Pe-ze,ye=Ee-Pe,qe=Math.min(Ae,ye)*2;if(Fe<=qe){var vt=Math.floor(Fe/2);return Fe%2?Pe+vt+1:Pe-vt}return Ae>ye?Pe-(Fe-ye):Pe+(Fe-Ae)}function he(ze,Ee,Pe){var Fe=ze.length,Ae=Ee.length,ye,qe;if(Fe===0&&Ae===0)return null;Fe<Ae?(ye=ze,qe=Ee):(ye=Ee,qe=ze);var vt={__EMPTY_ITEM__:!0};function et(un){return un!==void 0?Pe(un):vt}for(var Ye=null,xt=Math.abs(Fe-Ae)!==1,yt=0;yt<qe.length;yt+=1){var at=et(ye[yt]),zt=et(qe[yt]);if(at!==zt){Ye=yt,xt=xt||at!==et(qe[yt+1]);break}}return Ye===null?null:{index:Ye,multiple:xt}}function ve(ze,Ee,Pe){var Fe=dt.useState(ze),Ae=(0,Ge.Z)(Fe,2),ye=Ae[0],qe=Ae[1],vt=dt.useState(null),et=(0,Ge.Z)(vt,2),Ye=et[0],xt=et[1];return dt.useEffect(function(){var yt=he(ye||[],ze||[],Ee);(yt==null?void 0:yt.index)!==void 0&&(Pe==null||Pe(yt.index),xt(ze[yt.index])),qe(ze)},[ze]),[Ye]}var be=pe(16089),ke=(typeof navigator=="undefined"?"undefined":(0,Oe.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Be=ke,He=function(ze,Ee,Pe,Fe){var Ae=(0,dt.useRef)(!1),ye=(0,dt.useRef)(null);function qe(){clearTimeout(ye.current),Ae.current=!0,ye.current=setTimeout(function(){Ae.current=!1},50)}var vt=(0,dt.useRef)({top:ze,bottom:Ee,left:Pe,right:Fe});return vt.current.top=ze,vt.current.bottom=Ee,vt.current.left=Pe,vt.current.right=Fe,function(et,Ye){var xt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,yt=et?Ye<0&&vt.current.left||Ye>0&&vt.current.right:Ye<0&&vt.current.top||Ye>0&&vt.current.bottom;return xt&&yt?(clearTimeout(ye.current),Ae.current=!1):(!yt||Ae.current)&&qe(),!Ae.current&&yt}};function We(ze,Ee,Pe,Fe,Ae,ye,qe){var vt=(0,dt.useRef)(0),et=(0,dt.useRef)(null),Ye=(0,dt.useRef)(null),xt=(0,dt.useRef)(!1),yt=He(Ee,Pe,Fe,Ae);function at(On,jt){if(be.Z.cancel(et.current),!yt(!1,jt)){var sn=On;if(!sn._virtualHandled)sn._virtualHandled=!0;else return;vt.current+=jt,Ye.current=jt,Be||sn.preventDefault(),et.current=(0,be.Z)(function(){var jn=xt.current?10:1;qe(vt.current*jn,!1),vt.current=0})}}function zt(On,jt){qe(jt,!0),Be||On.preventDefault()}var un=(0,dt.useRef)(null),fn=(0,dt.useRef)(null);function Qt(On){if(ze){be.Z.cancel(fn.current),fn.current=(0,be.Z)(function(){un.current=null},2);var jt=On.deltaX,sn=On.deltaY,jn=On.shiftKey,dn=jt,Pn=sn;(un.current==="sx"||!un.current&&jn&&sn&&!jt)&&(dn=sn,Pn=0,un.current="sx");var ui=Math.abs(dn),pi=Math.abs(Pn);un.current===null&&(un.current=ye&&ui>pi?"x":"y"),un.current==="y"?at(On,Pn):zt(On,dn)}}function Kn(On){ze&&(xt.current=On.detail===Ye.current)}return[Qt,Kn]}function rt(ze,Ee,Pe,Fe){var Ae=dt.useMemo(function(){return[new Map,[]]},[ze,Pe.id,Fe]),ye=(0,Ge.Z)(Ae,2),qe=ye[0],vt=ye[1],et=function(xt){var yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:xt,at=qe.get(xt),zt=qe.get(yt);if(at===void 0||zt===void 0)for(var un=ze.length,fn=vt.length;fn<un;fn+=1){var Qt,Kn=ze[fn],On=Ee(Kn);qe.set(On,fn);var jt=(Qt=Pe.get(On))!==null&&Qt!==void 0?Qt:Fe;if(vt[fn]=(vt[fn-1]||0)+jt,On===xt&&(at=fn),On===yt&&(zt=fn),at!==void 0&&zt!==void 0)break}return{top:vt[at-1]||0,bottom:vt[zt]}};return et}var Qe=pe(52884),Pt=pe(95727),Ze=function(){function ze(){(0,Qe.Z)(this,ze),(0,ut.Z)(this,"maps",void 0),(0,ut.Z)(this,"id",0),(0,ut.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,Pt.Z)(ze,[{key:"set",value:function(Pe,Fe){this.maps[Pe]=Fe,this.id+=1,this.diffKeys.add(Pe)}},{key:"get",value:function(Pe){return this.maps[Pe]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),ze}(),Et=Ze;function it(ze){var Ee=parseFloat(ze);return isNaN(Ee)?0:Ee}function Dt(ze,Ee,Pe){var Fe=dt.useState(0),Ae=(0,Ge.Z)(Fe,2),ye=Ae[0],qe=Ae[1],vt=(0,dt.useRef)(new Map),et=(0,dt.useRef)(new Et),Ye=(0,dt.useRef)(0);function xt(){Ye.current+=1}function yt(){var zt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;xt();var un=function(){var Kn=!1;vt.current.forEach(function(On,jt){if(On&&On.offsetParent){var sn=On.offsetHeight,jn=getComputedStyle(On),dn=jn.marginTop,Pn=jn.marginBottom,ui=it(dn),pi=it(Pn),gi=sn+ui+pi;et.current.get(jt)!==gi&&(et.current.set(jt,gi),Kn=!0)}}),Kn&&qe(function(On){return On+1})};if(zt)un();else{Ye.current+=1;var fn=Ye.current;Promise.resolve().then(function(){fn===Ye.current&&un()})}}function at(zt,un){var fn=ze(zt),Qt=vt.current.get(fn);un?(vt.current.set(fn,un),yt()):vt.current.delete(fn),!Qt!=!un&&(un?Ee==null||Ee(zt):Pe==null||Pe(zt))}return(0,dt.useEffect)(function(){return xt},[]),[at,yt,et.current,ye]}var ht=14/15;function Ht(ze,Ee,Pe){var Fe=(0,dt.useRef)(!1),Ae=(0,dt.useRef)(0),ye=(0,dt.useRef)(0),qe=(0,dt.useRef)(null),vt=(0,dt.useRef)(null),et,Ye=function(zt){if(Fe.current){var un=Math.ceil(zt.touches[0].pageX),fn=Math.ceil(zt.touches[0].pageY),Qt=Ae.current-un,Kn=ye.current-fn,On=Math.abs(Qt)>Math.abs(Kn);On?Ae.current=un:ye.current=fn;var jt=Pe(On,On?Qt:Kn,!1,zt);jt&&zt.preventDefault(),clearInterval(vt.current),jt&&(vt.current=setInterval(function(){On?Qt*=ht:Kn*=ht;var sn=Math.floor(On?Qt:Kn);(!Pe(On,sn,!0)||Math.abs(sn)<=.1)&&clearInterval(vt.current)},16))}},xt=function(){Fe.current=!1,et()},yt=function(zt){et(),zt.touches.length===1&&!Fe.current&&(Fe.current=!0,Ae.current=Math.ceil(zt.touches[0].pageX),ye.current=Math.ceil(zt.touches[0].pageY),qe.current=zt.target,qe.current.addEventListener("touchmove",Ye,{passive:!1}),qe.current.addEventListener("touchend",xt,{passive:!0}))};et=function(){qe.current&&(qe.current.removeEventListener("touchmove",Ye),qe.current.removeEventListener("touchend",xt))},(0,Lt.Z)(function(){return ze&&Ee.current.addEventListener("touchstart",yt,{passive:!0}),function(){var at;(at=Ee.current)===null||at===void 0||at.removeEventListener("touchstart",yt),et(),clearInterval(vt.current)}},[ze])}function _t(ze){return Math.floor(Math.pow(ze,.5))}function Vt(ze,Ee){var Pe="touches"in ze?ze.touches[0]:ze;return Pe[Ee?"pageX":"pageY"]-window[Ee?"scrollX":"scrollY"]}function ot(ze,Ee,Pe){dt.useEffect(function(){var Fe=Ee.current;if(ze&&Fe){var Ae=!1,ye,qe,vt=function(){be.Z.cancel(ye)},et=function at(){vt(),ye=(0,be.Z)(function(){Pe(qe),at()})},Ye=function(zt){if(!zt.target.draggable){var un=zt;un._virtualHandled||(un._virtualHandled=!0,Ae=!0)}},xt=function(){Ae=!1,vt()},yt=function(zt){if(Ae){var un=Vt(zt,!1),fn=Fe.getBoundingClientRect(),Qt=fn.top,Kn=fn.bottom;if(un<=Qt){var On=Qt-un;qe=-_t(On),et()}else if(un>=Kn){var jt=un-Kn;qe=_t(jt),et()}else vt()}};return Fe.addEventListener("mousedown",Ye),Fe.ownerDocument.addEventListener("mouseup",xt),Fe.ownerDocument.addEventListener("mousemove",yt),function(){Fe.removeEventListener("mousedown",Ye),Fe.ownerDocument.removeEventListener("mouseup",xt),Fe.ownerDocument.removeEventListener("mousemove",yt),vt()}}},[ze])}var Ue=10;function Wt(ze,Ee,Pe,Fe,Ae,ye,qe,vt){var et=dt.useRef(),Ye=dt.useState(null),xt=(0,Ge.Z)(Ye,2),yt=xt[0],at=xt[1];return(0,Lt.Z)(function(){if(yt&&yt.times<Ue){if(!ze.current){at(function($n){return(0,Ke.Z)({},$n)});return}ye();var zt=yt.targetAlign,un=yt.originAlign,fn=yt.index,Qt=yt.offset,Kn=ze.current.clientHeight,On=!1,jt=zt,sn=null;if(Kn){for(var jn=zt||un,dn=0,Pn=0,ui=0,pi=Math.min(Ee.length-1,fn),gi=0;gi<=pi;gi+=1){var bi=Ae(Ee[gi]);Pn=dn;var Xi=Pe.get(bi);ui=Pn+(Xi===void 0?Fe:Xi),dn=ui}for(var ar=jn==="top"?Qt:Kn-Qt,Ji=pi;Ji>=0;Ji-=1){var wr=Ae(Ee[Ji]),mr=Pe.get(wr);if(mr===void 0){On=!0;break}if(ar-=mr,ar<=0)break}switch(jn){case"top":sn=Pn-Qt;break;case"bottom":sn=ui-Kn+Qt;break;default:{var Hi=ze.current.scrollTop,Er=Hi+Kn;Pn<Hi?jt="top":ui>Er&&(jt="bottom")}}sn!==null&&qe(sn),sn!==yt.lastTop&&(On=!0)}On&&at((0,Ke.Z)((0,Ke.Z)({},yt),{},{times:yt.times+1,targetAlign:jt,lastTop:sn}))}},[yt,ze.current]),function(zt){if(zt==null){vt();return}if(be.Z.cancel(et.current),typeof zt=="number")qe(zt);else if(zt&&(0,Oe.Z)(zt)==="object"){var un,fn=zt.align;"index"in zt?un=zt.index:un=Ee.findIndex(function(On){return Ae(On)===zt.key});var Qt=zt.offset,Kn=Qt===void 0?0:Qt;at({times:0,index:un,offset:Kn,originAlign:fn})}}}var Ln=dt.forwardRef(function(ze,Ee){var Pe=ze.prefixCls,Fe=ze.rtl,Ae=ze.scrollOffset,ye=ze.scrollRange,qe=ze.onStartMove,vt=ze.onStopMove,et=ze.onScroll,Ye=ze.horizontal,xt=ze.spinSize,yt=ze.containerSize,at=ze.style,zt=ze.thumbStyle,un=ze.showScrollBar,fn=dt.useState(!1),Qt=(0,Ge.Z)(fn,2),Kn=Qt[0],On=Qt[1],jt=dt.useState(null),sn=(0,Ge.Z)(jt,2),jn=sn[0],dn=sn[1],Pn=dt.useState(null),ui=(0,Ge.Z)(Pn,2),pi=ui[0],gi=ui[1],bi=!Fe,Xi=dt.useRef(),ar=dt.useRef(),Ji=dt.useState(un),wr=(0,Ge.Z)(Ji,2),mr=wr[0],Hi=wr[1],Er=dt.useRef(),$n=function(){un===!0||un===!1||(clearTimeout(Er.current),Hi(!0),Er.current=setTimeout(function(){Hi(!1)},3e3))},Le=ye-yt||0,Ei=yt-xt||0,Ri=dt.useMemo(function(){if(Ae===0||Le===0)return 0;var Je=Ae/Le;return Je*Ei},[Ae,Le,Ei]),nn=function(qt){qt.stopPropagation(),qt.preventDefault()},di=dt.useRef({top:Ri,dragging:Kn,pageY:jn,startTop:pi});di.current={top:Ri,dragging:Kn,pageY:jn,startTop:pi};var yi=function(qt){On(!0),dn(Vt(qt,Ye)),gi(di.current.top),qe(),qt.stopPropagation(),qt.preventDefault()};dt.useEffect(function(){var Je=function(st){st.preventDefault()},qt=Xi.current,vn=ar.current;return qt.addEventListener("touchstart",Je,{passive:!1}),vn.addEventListener("touchstart",yi,{passive:!1}),function(){qt.removeEventListener("touchstart",Je),vn.removeEventListener("touchstart",yi)}},[]);var Li=dt.useRef();Li.current=Le;var Tn=dt.useRef();Tn.current=Ei,dt.useEffect(function(){if(Kn){var Je,qt=function(st){var on=di.current,En=on.dragging,Dn=on.pageY,Jn=on.startTop;be.Z.cancel(Je);var St=Xi.current.getBoundingClientRect(),Nn=yt/(Ye?St.width:St.height);if(En){var qn=(Vt(st,Ye)-Dn)*Nn,Si=Jn;!bi&&Ye?Si-=qn:Si+=qn;var en=Li.current,Cn=Tn.current,At=Cn?Si/Cn:0,yn=Math.ceil(At*en);yn=Math.max(yn,0),yn=Math.min(yn,en),Je=(0,be.Z)(function(){et(yn,Ye)})}},vn=function(){On(!1),vt()};return window.addEventListener("mousemove",qt,{passive:!0}),window.addEventListener("touchmove",qt,{passive:!0}),window.addEventListener("mouseup",vn,{passive:!0}),window.addEventListener("touchend",vn,{passive:!0}),function(){window.removeEventListener("mousemove",qt),window.removeEventListener("touchmove",qt),window.removeEventListener("mouseup",vn),window.removeEventListener("touchend",vn),be.Z.cancel(Je)}}},[Kn]),dt.useEffect(function(){return $n(),function(){clearTimeout(Er.current)}},[Ae]),dt.useImperativeHandle(Ee,function(){return{delayHidden:$n}});var Un="".concat(Pe,"-scrollbar"),kt={position:"absolute",visibility:mr?null:"hidden"},$t={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return Ye?(kt.height=8,kt.left=0,kt.right=0,kt.bottom=0,$t.height="100%",$t.width=xt,bi?$t.left=Ri:$t.right=Ri):(kt.width=8,kt.top=0,kt.bottom=0,bi?kt.right=0:kt.left=0,$t.width="100%",$t.height=xt,$t.top=Ri),dt.createElement("div",{ref:Xi,className:Tt()(Un,(0,ut.Z)((0,ut.Z)((0,ut.Z)({},"".concat(Un,"-horizontal"),Ye),"".concat(Un,"-vertical"),!Ye),"".concat(Un,"-visible"),mr)),style:(0,Ke.Z)((0,Ke.Z)({},kt),at),onMouseDown:nn,onMouseMove:$n},dt.createElement("div",{ref:ar,className:Tt()("".concat(Un,"-thumb"),(0,ut.Z)({},"".concat(Un,"-thumb-moving"),Kn)),style:(0,Ke.Z)((0,Ke.Z)({},$t),zt),onMouseDown:yi}))}),Fn=Ln,Gt=20;function rn(){var ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Pe=ze/Ee*ze;return isNaN(Pe)&&(Pe=0),Pe=Math.max(Pe,Gt),Math.floor(Pe)}var An=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],ni=[],Sn={overflowY:"auto",overflowAnchor:"none"};function Yn(ze,Ee){var Pe=ze.prefixCls,Fe=Pe===void 0?"rc-virtual-list":Pe,Ae=ze.className,ye=ze.height,qe=ze.itemHeight,vt=ze.fullHeight,et=vt===void 0?!0:vt,Ye=ze.style,xt=ze.data,yt=ze.children,at=ze.itemKey,zt=ze.virtual,un=ze.direction,fn=ze.scrollWidth,Qt=ze.component,Kn=Qt===void 0?"div":Qt,On=ze.onScroll,jt=ze.onVirtualScroll,sn=ze.onVisibleChange,jn=ze.innerProps,dn=ze.extraRender,Pn=ze.styles,ui=ze.showScrollBar,pi=ui===void 0?"optional":ui,gi=(0,Xe.Z)(ze,An),bi=dt.useCallback(function(Lr){return typeof at=="function"?at(Lr):Lr==null?void 0:Lr[at]},[at]),Xi=Dt(bi,null,null),ar=(0,Ge.Z)(Xi,4),Ji=ar[0],wr=ar[1],mr=ar[2],Hi=ar[3],Er=!!(zt!==!1&&ye&&qe),$n=dt.useMemo(function(){return Object.values(mr.maps).reduce(function(Lr,Fr){return Lr+Fr},0)},[mr.id,mr.maps]),Le=Er&&xt&&(Math.max(qe*xt.length,$n)>ye||!!fn),Ei=un==="rtl",Ri=Tt()(Fe,(0,ut.Z)({},"".concat(Fe,"-rtl"),Ei),Ae),nn=xt||ni,di=(0,dt.useRef)(),yi=(0,dt.useRef)(),Li=(0,dt.useRef)(),Tn=(0,dt.useState)(0),Un=(0,Ge.Z)(Tn,2),kt=Un[0],$t=Un[1],Je=(0,dt.useState)(0),qt=(0,Ge.Z)(Je,2),vn=qt[0],Ft=qt[1],st=(0,dt.useState)(!1),on=(0,Ge.Z)(st,2),En=on[0],Dn=on[1],Jn=function(){Dn(!0)},St=function(){Dn(!1)},Nn={getKey:bi};function qn(Lr){$t(function(Fr){var uo;typeof Lr=="function"?uo=Lr(Fr):uo=Lr;var qr=Qi(uo);return di.current.scrollTop=qr,qr})}var Si=(0,dt.useRef)({start:0,end:nn.length}),en=(0,dt.useRef)(),Cn=ve(nn,bi),At=(0,Ge.Z)(Cn,1),yn=At[0];en.current=yn;var pn=dt.useMemo(function(){if(!Er)return{scrollHeight:void 0,start:0,end:nn.length-1,offset:void 0};if(!Le){var Lr;return{scrollHeight:((Lr=yi.current)===null||Lr===void 0?void 0:Lr.offsetHeight)||0,start:0,end:nn.length-1,offset:void 0}}for(var Fr=0,uo,qr,zo,Ro=nn.length,Mr=0;Mr<Ro;Mr+=1){var Nr=nn[Mr],fi=bi(Nr),Tr=mr.get(fi),Bo=Fr+(Tr===void 0?qe:Tr);Bo>=kt&&uo===void 0&&(uo=Mr,qr=Fr),Bo>kt+ye&&zo===void 0&&(zo=Mr),Fr=Bo}return uo===void 0&&(uo=0,qr=0,zo=Math.ceil(ye/qe)),zo===void 0&&(zo=nn.length-1),zo=Math.min(zo+1,nn.length-1),{scrollHeight:Fr,start:uo,end:zo,offset:qr}},[Le,Er,kt,nn,Hi,ye]),mn=pn.scrollHeight,Wn=pn.start,Hn=pn.end,Qn=pn.offset;Si.current.start=Wn,Si.current.end=Hn,dt.useLayoutEffect(function(){var Lr=mr.getRecord();if(Lr.size===1){var Fr=Array.from(Lr)[0],uo=nn[Wn];if(uo){var qr=bi(uo);if(qr===Fr){var zo=mr.get(Fr),Ro=zo-qe;qn(function(Mr){return Mr+Ro})}}}mr.resetRecord()},[mn]);var ii=dt.useState({width:0,height:ye}),ji=(0,Ge.Z)(ii,2),cn=ji[0],Yi=ji[1],$i=function(Fr){Yi({width:Fr.offsetWidth,height:Fr.offsetHeight})},Wi=(0,dt.useRef)(),ln=(0,dt.useRef)(),oi=dt.useMemo(function(){return rn(cn.width,fn)},[cn.width,fn]),Bi=dt.useMemo(function(){return rn(cn.height,mn)},[cn.height,mn]),Gi=mn-ye,Ti=(0,dt.useRef)(Gi);Ti.current=Gi;function Qi(Lr){var Fr=Lr;return Number.isNaN(Ti.current)||(Fr=Math.min(Fr,Ti.current)),Fr=Math.max(Fr,0),Fr}var gr=kt<=0,hr=kt>=Gi,Ki=vn<=0,Sr=vn>=fn,kn=He(gr,hr,Ki,Sr),Br=function(){return{x:Ei?-vn:vn,y:kt}},_n=(0,dt.useRef)(Br()),Or=(0,Ve.useEvent)(function(Lr){if(jt){var Fr=(0,Ke.Z)((0,Ke.Z)({},Br()),Lr);(_n.current.x!==Fr.x||_n.current.y!==Fr.y)&&(jt(Fr),_n.current=Fr)}});function no(Lr,Fr){var uo=Lr;Fr?((0,Rt.flushSync)(function(){Ft(uo)}),Or()):qn(uo)}function br(Lr){var Fr=Lr.currentTarget.scrollTop;Fr!==kt&&qn(Fr),On==null||On(Lr),Or()}var mo=function(Fr){var uo=Fr,qr=fn?fn-cn.width:0;return uo=Math.max(uo,0),uo=Math.min(uo,qr),uo},Jr=(0,Ve.useEvent)(function(Lr,Fr){Fr?((0,Rt.flushSync)(function(){Ft(function(uo){var qr=uo+(Ei?-Lr:Lr);return mo(qr)})}),Or()):qn(function(uo){var qr=uo+Lr;return qr})}),ur=We(Er,gr,hr,Ki,Sr,!!fn,Jr),er=(0,Ge.Z)(ur,2),qi=er[0],Rr=er[1];Ht(Er,di,function(Lr,Fr,uo,qr){var zo=qr;return kn(Lr,Fr,uo)?!1:!zo||!zo._virtualHandled?(zo&&(zo._virtualHandled=!0),qi({preventDefault:function(){},deltaX:Lr?Fr:0,deltaY:Lr?0:Fr}),!0):!1}),ot(Le,di,function(Lr){qn(function(Fr){return Fr+Lr})}),(0,Lt.Z)(function(){function Lr(uo){var qr=gr&&uo.detail<0,zo=hr&&uo.detail>0;Er&&!qr&&!zo&&uo.preventDefault()}var Fr=di.current;return Fr.addEventListener("wheel",qi,{passive:!1}),Fr.addEventListener("DOMMouseScroll",Rr,{passive:!0}),Fr.addEventListener("MozMousePixelScroll",Lr,{passive:!1}),function(){Fr.removeEventListener("wheel",qi),Fr.removeEventListener("DOMMouseScroll",Rr),Fr.removeEventListener("MozMousePixelScroll",Lr)}},[Er,gr,hr]),(0,Lt.Z)(function(){if(fn){var Lr=mo(vn);Ft(Lr),Or({x:Lr})}},[cn.width,fn]);var Ii=function(){var Fr,uo;(Fr=Wi.current)===null||Fr===void 0||Fr.delayHidden(),(uo=ln.current)===null||uo===void 0||uo.delayHidden()},tt=Wt(di,nn,mr,qe,bi,function(){return wr(!0)},qn,Ii);dt.useImperativeHandle(Ee,function(){return{nativeElement:Li.current,getScrollInfo:Br,scrollTo:function(Fr){function uo(qr){return qr&&(0,Oe.Z)(qr)==="object"&&("left"in qr||"top"in qr)}uo(Fr)?(Fr.left!==void 0&&Ft(mo(Fr.left)),tt(Fr.top)):tt(Fr)}}}),(0,Lt.Z)(function(){if(sn){var Lr=nn.slice(Wn,Hn+1);sn(Lr,nn)}},[Wn,Hn,nn]);var Qr=rt(nn,bi,mr,qe),lo=dn==null?void 0:dn({start:Wn,end:Hn,virtual:Le,offsetX:vn,offsetY:Qn,rtl:Ei,getSize:Qr}),jr=ce(nn,Wn,Hn,fn,vn,Ji,yt,Nn),vo=null;ye&&(vo=(0,Ke.Z)((0,ut.Z)({},et?"height":"maxHeight",ye),Sn),Er&&(vo.overflowY="hidden",fn&&(vo.overflowX="hidden"),En&&(vo.pointerEvents="none")));var po={};return Ei&&(po.dir="rtl"),dt.createElement("div",(0,ge.Z)({ref:Li,style:(0,Ke.Z)((0,Ke.Z)({},Ye),{},{position:"relative"}),className:Ri},po,gi),dt.createElement(Ct.Z,{onResize:$i},dt.createElement(Kn,{className:"".concat(Fe,"-holder"),style:vo,ref:di,onScroll:br,onMouseEnter:Ii},dt.createElement(ne,{prefixCls:Fe,height:mn,offsetX:vn,offsetY:Qn,scrollWidth:fn,onInnerResize:wr,ref:yi,innerProps:jn,rtl:Ei,extra:lo},jr))),Le&&mn>ye&&dt.createElement(Fn,{ref:Wi,prefixCls:Fe,scrollOffset:kt,scrollRange:mn,rtl:Ei,onScroll:no,onStartMove:Jn,onStopMove:St,spinSize:Bi,containerSize:cn.height,style:Pn==null?void 0:Pn.verticalScrollBar,thumbStyle:Pn==null?void 0:Pn.verticalScrollBarThumb,showScrollBar:pi}),Le&&fn>cn.width&&dt.createElement(Fn,{ref:ln,prefixCls:Fe,scrollOffset:vn,scrollRange:fn,rtl:Ei,onScroll:no,onStartMove:Jn,onStopMove:St,spinSize:oi,containerSize:cn.width,horizontal:!0,style:Pn==null?void 0:Pn.horizontalScrollBar,thumbStyle:Pn==null?void 0:Pn.horizontalScrollBarThumb,showScrollBar:pi}))}var It=dt.forwardRef(Yn);It.displayName="List";var wn=It,Gn=wn},54203:function(Vn,xn,pe){"use strict";pe.d(xn,{Z5:function(){return wg},_l:function(){return Nl},bK:function(){return Zu}});var ge=pe(59301),Oe=pe(75229);function Ke(xe,Ce){xe.prototype=Object.create(Ce.prototype),xe.prototype.constructor=xe,(0,Oe.Z)(xe,Ce)}var ut=pe(96663),Ge=pe(59781),Xe=ge.createContext(null),Ne=null;function Tt(xe){xe()}var Ct=Tt,Ve=function(Ce){return Ct=Ce},Lt=function(){return Ct};function dt(){var xe=Lt(),Ce=null,Ie=null;return{clear:function(){Ce=null,Ie=null},notify:function(){xe(function(){for(var mt=Ce;mt;)mt.callback(),mt=mt.next})},get:function(){for(var mt=[],gt=Ce;gt;)mt.push(gt),gt=gt.next;return mt},subscribe:function(mt){var gt=!0,Bt=Ie={callback:mt,next:null,prev:Ie};return Bt.prev?Bt.prev.next=Bt:Ce=Bt,function(){!gt||Ce===null||(gt=!1,Bt.next?Bt.next.prev=Bt.prev:Ie=Bt.prev,Bt.prev?Bt.prev.next=Bt.next:Ce=Bt.next)}}}}var Rt={notify:function(){},get:function(){return[]}};function De(xe,Ce){var Ie,$e=Rt;function mt(In){return Mn(),$e.subscribe(In)}function gt(){$e.notify()}function Bt(){Zn.onStateChange&&Zn.onStateChange()}function Kt(){return!!Ie}function Mn(){Ie||(Ie=Ce?Ce.addNestedSub(Bt):xe.subscribe(Bt),$e=dt())}function Xn(){Ie&&(Ie(),Ie=void 0,$e.clear(),$e=Rt)}var Zn={addNestedSub:mt,notifyNestedSubs:gt,handleChangeWrapper:Bt,isSubscribed:Kt,trySubscribe:Mn,tryUnsubscribe:Xn,getListeners:function(){return $e}};return Zn}var ne=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?ge.useLayoutEffect:ge.useEffect;function ee(xe){var Ce=xe.store,Ie=xe.context,$e=xe.children,mt=(0,ge.useMemo)(function(){var Kt=De(Ce);return{store:Ce,subscription:Kt}},[Ce]),gt=(0,ge.useMemo)(function(){return Ce.getState()},[Ce]);ne(function(){var Kt=mt.subscription;return Kt.onStateChange=Kt.notifyNestedSubs,Kt.trySubscribe(),gt!==Ce.getState()&&Kt.notifyNestedSubs(),function(){Kt.tryUnsubscribe(),Kt.onStateChange=null}},[mt,gt]);var Bt=Ie||Xe;return ge.createElement(Bt.Provider,{value:mt},$e)}var ce=ee,se=pe(30176),he=pe(94266),ve=pe.n(he),be=pe(53410),ke=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],Be=["reactReduxForwardedRef"],He=[],We=[null,null],rt=function(Ce){try{return JSON.stringify(Ce)}catch(Ie){return String(Ce)}};function Qe(xe,Ce){var Ie=xe[1];return[Ce.payload,Ie+1]}function Pt(xe,Ce,Ie){ne(function(){return xe.apply(void 0,Ce)},Ie)}function Ze(xe,Ce,Ie,$e,mt,gt,Bt){xe.current=$e,Ce.current=mt,Ie.current=!1,gt.current&&(gt.current=null,Bt())}function Et(xe,Ce,Ie,$e,mt,gt,Bt,Kt,Mn,Xn){if(xe){var Zn=!1,In=null,Bn=function(){if(!Zn){var Ar=Ce.getState(),Hr,to;try{Hr=$e(Ar,mt.current)}catch(ho){to=ho,In=ho}to||(In=null),Hr===gt.current?Bt.current||Mn():(gt.current=Hr,Kt.current=Hr,Bt.current=!0,Xn({type:"STORE_UPDATED",payload:{error:to}}))}};Ie.onStateChange=Bn,Ie.trySubscribe(),Bn();var ri=function(){if(Zn=!0,Ie.tryUnsubscribe(),Ie.onStateChange=null,In)throw In};return ri}}var it=function(){return[null,0]};function Dt(xe,Ce){Ce===void 0&&(Ce={});var Ie=Ce,$e=Ie.getDisplayName,mt=$e===void 0?function(va){return"ConnectAdvanced("+va+")"}:$e,gt=Ie.methodName,Bt=gt===void 0?"connectAdvanced":gt,Kt=Ie.renderCountProp,Mn=Kt===void 0?void 0:Kt,Xn=Ie.shouldHandleStateChanges,Zn=Xn===void 0?!0:Xn,In=Ie.storeKey,Bn=In===void 0?"store":In,ri=Ie.withRef,ki=ri===void 0?!1:ri,Ar=Ie.forwardRef,Hr=Ar===void 0?!1:Ar,to=Ie.context,ho=to===void 0?Xe:to,Lo=(0,se.Z)(Ie,ke);if(0)var bo;var Uo=ho;return function(Ka){var pl=Ka.displayName||Ka.name||"Component",Wa=mt(pl),ol=(0,ut.Z)({},Lo,{getDisplayName:mt,methodName:Bt,renderCountProp:Mn,shouldHandleStateChanges:Zn,storeKey:Bn,displayName:Wa,wrappedComponentName:pl,WrappedComponent:Ka}),nu=Lo.pure;function yu(Xs){return xe(Xs.dispatch,ol)}var Wc=nu?ge.useMemo:function(Xs){return Xs()};function Ju(Xs){var fd=(0,ge.useMemo)(function(){var Qs=Xs.reactReduxForwardedRef,dc=(0,se.Z)(Xs,Be);return[Xs.context,Qs,dc]},[Xs]),al=fd[0],Gc=fd[1],hf=fd[2],$c=(0,ge.useMemo)(function(){return al&&al.Consumer&&(0,be.isContextConsumer)(ge.createElement(al.Consumer,null))?al:Uo},[al,Uo]),Oo=(0,ge.useContext)($c),Rh=!!Xs.store&&!!Xs.store.getState&&!!Xs.store.dispatch,Fg=!!Oo&&!!Oo.store,Kc=Rh?Xs.store:Oo.store,Od=(0,ge.useMemo)(function(){return yu(Kc)},[Kc]),fh=(0,ge.useMemo)(function(){if(!Zn)return We;var Qs=De(Kc,Rh?null:Oo.subscription),dc=Qs.notifyNestedSubs.bind(Qs);return[Qs,dc]},[Kc,Rh,Oo]),Gu=fh[0],_f=fh[1],Xf=(0,ge.useMemo)(function(){return Rh?Oo:(0,ut.Z)({},Oo,{subscription:Gu})},[Rh,Oo,Gu]),op=(0,ge.useReducer)(Qe,He,it),Gp=op[0],Ag=Gp[0],ff=op[1];if(Ag&&Ag.error)throw Ag.error;var ap=(0,ge.useRef)(),Dg=(0,ge.useRef)(hf),gf=(0,ge.useRef)(),pf=(0,ge.useRef)(!1),Bg=Wc(function(){return gf.current&&hf===Dg.current?gf.current:Od(Kc.getState(),hf)},[Kc,Ag,hf]);Pt(Ze,[Dg,ap,pf,hf,Bg,gf,_f]),Pt(Et,[Zn,Kc,Gu,Od,Dg,ap,pf,gf,_f,ff],[Kc,Gu,Od]);var oa=(0,ge.useMemo)(function(){return ge.createElement(Ka,(0,ut.Z)({},Bg,{ref:Gc}))},[Gc,Ka,Bg]),Su=(0,ge.useMemo)(function(){return Zn?ge.createElement($c.Provider,{value:Xf},oa):oa},[$c,oa,Xf]);return Su}var Wu=nu?ge.memo(Ju):Ju;if(Wu.WrappedComponent=Ka,Wu.displayName=Ju.displayName=Wa,Hr){var Al=ge.forwardRef(function(fd,al){return ge.createElement(Wu,(0,ut.Z)({},fd,{reactReduxForwardedRef:al}))});return Al.displayName=Wa,Al.WrappedComponent=Ka,ve()(Al,Ka)}return ve()(Wu,Ka)}}function ht(xe,Ce){return xe===Ce?xe!==0||Ce!==0||1/xe===1/Ce:xe!==xe&&Ce!==Ce}function Ht(xe,Ce){if(ht(xe,Ce))return!0;if(typeof xe!="object"||xe===null||typeof Ce!="object"||Ce===null)return!1;var Ie=Object.keys(xe),$e=Object.keys(Ce);if(Ie.length!==$e.length)return!1;for(var mt=0;mt<Ie.length;mt++)if(!Object.prototype.hasOwnProperty.call(Ce,Ie[mt])||!ht(xe[Ie[mt]],Ce[Ie[mt]]))return!1;return!0}function _t(xe,Ce){var Ie={},$e=function(Bt){var Kt=xe[Bt];typeof Kt=="function"&&(Ie[Bt]=function(){return Ce(Kt.apply(void 0,arguments))})};for(var mt in xe)$e(mt);return Ie}function Vt(xe){return function(Ie,$e){var mt=xe(Ie,$e);function gt(){return mt}return gt.dependsOnOwnProps=!1,gt}}function ot(xe){return xe.dependsOnOwnProps!==null&&xe.dependsOnOwnProps!==void 0?!!xe.dependsOnOwnProps:xe.length!==1}function Ue(xe,Ce){return function($e,mt){var gt=mt.displayName,Bt=function(Mn,Xn){return Bt.dependsOnOwnProps?Bt.mapToProps(Mn,Xn):Bt.mapToProps(Mn)};return Bt.dependsOnOwnProps=!0,Bt.mapToProps=function(Mn,Xn){Bt.mapToProps=xe,Bt.dependsOnOwnProps=ot(xe);var Zn=Bt(Mn,Xn);return typeof Zn=="function"&&(Bt.mapToProps=Zn,Bt.dependsOnOwnProps=ot(Zn),Zn=Bt(Mn,Xn)),Zn},Bt}}function Wt(xe){return typeof xe=="function"?Ue(xe,"mapDispatchToProps"):void 0}function Ln(xe){return xe?void 0:Vt(function(Ce){return{dispatch:Ce}})}function Fn(xe){return xe&&typeof xe=="object"?Vt(function(Ce){return _t(xe,Ce)}):void 0}var Gt=[Wt,Ln,Fn];function rn(xe){return typeof xe=="function"?Ue(xe,"mapStateToProps"):void 0}function An(xe){return xe?void 0:Vt(function(){return{}})}var ni=[rn,An];function Sn(xe,Ce,Ie){return(0,ut.Z)({},Ie,xe,Ce)}function Yn(xe){return function(Ie,$e){var mt=$e.displayName,gt=$e.pure,Bt=$e.areMergedPropsEqual,Kt=!1,Mn;return function(Zn,In,Bn){var ri=xe(Zn,In,Bn);return Kt?(!gt||!Bt(ri,Mn))&&(Mn=ri):(Kt=!0,Mn=ri),Mn}}}function It(xe){return typeof xe=="function"?Yn(xe):void 0}function wn(xe){return xe?void 0:function(){return Sn}}var Gn=[It,wn],ze=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function Ee(xe,Ce,Ie,$e){return function(gt,Bt){return Ie(xe(gt,Bt),Ce($e,Bt),Bt)}}function Pe(xe,Ce,Ie,$e,mt){var gt=mt.areStatesEqual,Bt=mt.areOwnPropsEqual,Kt=mt.areStatePropsEqual,Mn=!1,Xn,Zn,In,Bn,ri;function ki(Lo,bo){return Xn=Lo,Zn=bo,In=xe(Xn,Zn),Bn=Ce($e,Zn),ri=Ie(In,Bn,Zn),Mn=!0,ri}function Ar(){return In=xe(Xn,Zn),Ce.dependsOnOwnProps&&(Bn=Ce($e,Zn)),ri=Ie(In,Bn,Zn),ri}function Hr(){return xe.dependsOnOwnProps&&(In=xe(Xn,Zn)),Ce.dependsOnOwnProps&&(Bn=Ce($e,Zn)),ri=Ie(In,Bn,Zn),ri}function to(){var Lo=xe(Xn,Zn),bo=!Kt(Lo,In);return In=Lo,bo&&(ri=Ie(In,Bn,Zn)),ri}function ho(Lo,bo){var Uo=!Bt(bo,Zn),va=!gt(Lo,Xn,bo,Zn);return Xn=Lo,Zn=bo,Uo&&va?Ar():Uo?Hr():va?to():ri}return function(bo,Uo){return Mn?ho(bo,Uo):ki(bo,Uo)}}function Fe(xe,Ce){var Ie=Ce.initMapStateToProps,$e=Ce.initMapDispatchToProps,mt=Ce.initMergeProps,gt=(0,se.Z)(Ce,ze),Bt=Ie(xe,gt),Kt=$e(xe,gt),Mn=mt(xe,gt),Xn=gt.pure?Pe:Ee;return Xn(Bt,Kt,Mn,xe,gt)}var Ae=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function ye(xe,Ce,Ie){for(var $e=Ce.length-1;$e>=0;$e--){var mt=Ce[$e](xe);if(mt)return mt}return function(gt,Bt){throw new Error("Invalid value of type "+typeof xe+" for "+Ie+" argument when connecting component "+Bt.wrappedComponentName+".")}}function qe(xe,Ce){return xe===Ce}function vt(xe){var Ce=xe===void 0?{}:xe,Ie=Ce.connectHOC,$e=Ie===void 0?Dt:Ie,mt=Ce.mapStateToPropsFactories,gt=mt===void 0?ni:mt,Bt=Ce.mapDispatchToPropsFactories,Kt=Bt===void 0?Gt:Bt,Mn=Ce.mergePropsFactories,Xn=Mn===void 0?Gn:Mn,Zn=Ce.selectorFactory,In=Zn===void 0?Fe:Zn;return function(ri,ki,Ar,Hr){Hr===void 0&&(Hr={});var to=Hr,ho=to.pure,Lo=ho===void 0?!0:ho,bo=to.areStatesEqual,Uo=bo===void 0?qe:bo,va=to.areOwnPropsEqual,Ka=va===void 0?Ht:va,pl=to.areStatePropsEqual,Wa=pl===void 0?Ht:pl,ol=to.areMergedPropsEqual,nu=ol===void 0?Ht:ol,yu=(0,se.Z)(to,Ae),Wc=ye(ri,gt,"mapStateToProps"),Ju=ye(ki,Kt,"mapDispatchToProps"),Wu=ye(Ar,Xn,"mergeProps");return $e(In,(0,ut.Z)({methodName:"connect",getDisplayName:function(Xs){return"Connect("+Xs+")"},shouldHandleStateChanges:!!ri,initMapStateToProps:Wc,initMapDispatchToProps:Ju,initMergeProps:Wu,pure:Lo,areStatesEqual:Uo,areOwnPropsEqual:Ka,areStatePropsEqual:Wa,areMergedPropsEqual:nu},yu))}}var et=vt();function Ye(){var xe=useContext(ReactReduxContext);return xe}function xt(xe){xe===void 0&&(xe=ReactReduxContext);var Ce=xe===ReactReduxContext?useDefaultReduxContext:function(){return useContext(xe)};return function(){var $e=Ce(),mt=$e.store;return mt}}var yt=null;function at(xe){xe===void 0&&(xe=ReactReduxContext);var Ce=xe===ReactReduxContext?useDefaultStore:createStoreHook(xe);return function(){var $e=Ce();return $e.dispatch}}var zt=null,un=function(Ce,Ie){return Ce===Ie};function fn(xe,Ce,Ie,$e){var mt=useReducer(function(ki){return ki+1},0),gt=mt[1],Bt=useMemo(function(){return createSubscription(Ie,$e)},[Ie,$e]),Kt=useRef(),Mn=useRef(),Xn=useRef(),Zn=useRef(),In=Ie.getState(),Bn;try{if(xe!==Mn.current||In!==Xn.current||Kt.current){var ri=xe(In);Zn.current===void 0||!Ce(ri,Zn.current)?Bn=ri:Bn=Zn.current}else Bn=Zn.current}catch(ki){throw Kt.current&&(ki.message+=`
|
|
|
The error may be correlated with this previous error:
|
|
|
`+Kt.current.stack+`
|
|
|
|
|
|
`),ki}return useIsomorphicLayoutEffect(function(){Mn.current=xe,Xn.current=In,Zn.current=Bn,Kt.current=void 0}),useIsomorphicLayoutEffect(function(){function ki(){try{var Ar=Ie.getState();if(Ar===Xn.current)return;var Hr=Mn.current(Ar);if(Ce(Hr,Zn.current))return;Zn.current=Hr,Xn.current=Ar}catch(to){Kt.current=to}gt()}return Bt.onStateChange=ki,Bt.trySubscribe(),ki(),function(){return Bt.tryUnsubscribe()}},[Ie,Bt]),Bn}function Qt(xe){xe===void 0&&(xe=ReactReduxContext);var Ce=xe===ReactReduxContext?useDefaultReduxContext:function(){return useContext(xe)};return function($e,mt){mt===void 0&&(mt=un);var gt=Ce(),Bt=gt.store,Kt=gt.subscription,Mn=fn($e,mt,Bt,Kt);return useDebugValue(Mn),Mn}}var Kn=null,On=pe(4676);Ve(On.unstable_batchedUpdates);function jt(xe,Ce){if(xe.length!==Ce.length)return!1;for(var Ie=0;Ie<xe.length;Ie++)if(xe[Ie]!==Ce[Ie])return!1;return!0}function sn(xe,Ce){var Ie=(0,ge.useState)(function(){return{inputs:Ce,result:xe()}})[0],$e=(0,ge.useRef)(!0),mt=(0,ge.useRef)(Ie),gt=$e.current||!!(Ce&&mt.current.inputs&&jt(Ce,mt.current.inputs)),Bt=gt?mt.current:{inputs:Ce,result:xe()};return(0,ge.useEffect)(function(){$e.current=!1,mt.current=Bt},[Bt]),Bt.result}function jn(xe,Ce){return sn(function(){return xe},Ce)}var dn=sn,Pn=jn,ui=!0,pi="Invariant failed";function gi(xe,Ce){if(!xe){if(ui)throw new Error(pi);var Ie=typeof Ce=="function"?Ce():Ce,$e=Ie?"".concat(pi,": ").concat(Ie):pi;throw new Error($e)}}var bi=function(Ce){var Ie=Ce.top,$e=Ce.right,mt=Ce.bottom,gt=Ce.left,Bt=$e-gt,Kt=mt-Ie,Mn={top:Ie,right:$e,bottom:mt,left:gt,width:Bt,height:Kt,x:gt,y:Ie,center:{x:($e+gt)/2,y:(mt+Ie)/2}};return Mn},Xi=function(Ce,Ie){return{top:Ce.top-Ie.top,left:Ce.left-Ie.left,bottom:Ce.bottom+Ie.bottom,right:Ce.right+Ie.right}},ar=function(Ce,Ie){return{top:Ce.top+Ie.top,left:Ce.left+Ie.left,bottom:Ce.bottom-Ie.bottom,right:Ce.right-Ie.right}},Ji=function(Ce,Ie){return{top:Ce.top+Ie.y,left:Ce.left+Ie.x,bottom:Ce.bottom+Ie.y,right:Ce.right+Ie.x}},wr={top:0,right:0,bottom:0,left:0},mr=function(Ce){var Ie=Ce.borderBox,$e=Ce.margin,mt=$e===void 0?wr:$e,gt=Ce.border,Bt=gt===void 0?wr:gt,Kt=Ce.padding,Mn=Kt===void 0?wr:Kt,Xn=bi(Xi(Ie,mt)),Zn=bi(ar(Ie,Bt)),In=bi(ar(Zn,Mn));return{marginBox:Xn,borderBox:bi(Ie),paddingBox:Zn,contentBox:In,margin:mt,border:Bt,padding:Mn}},Hi=function(Ce){var Ie=Ce.slice(0,-2),$e=Ce.slice(-2);if($e!=="px")return 0;var mt=Number(Ie);return isNaN(mt)&&gi(!1),mt},Er=function(){return{x:window.pageXOffset,y:window.pageYOffset}},$n=function(Ce,Ie){var $e=Ce.borderBox,mt=Ce.border,gt=Ce.margin,Bt=Ce.padding,Kt=Ji($e,Ie);return mr({borderBox:Kt,border:mt,margin:gt,padding:Bt})},Le=function(Ce,Ie){return Ie===void 0&&(Ie=Er()),$n(Ce,Ie)},Ei=function(Ce,Ie){var $e={top:Hi(Ie.marginTop),right:Hi(Ie.marginRight),bottom:Hi(Ie.marginBottom),left:Hi(Ie.marginLeft)},mt={top:Hi(Ie.paddingTop),right:Hi(Ie.paddingRight),bottom:Hi(Ie.paddingBottom),left:Hi(Ie.paddingLeft)},gt={top:Hi(Ie.borderTopWidth),right:Hi(Ie.borderRightWidth),bottom:Hi(Ie.borderBottomWidth),left:Hi(Ie.borderLeftWidth)};return mr({borderBox:Ce,margin:$e,padding:mt,border:gt})},Ri=function(Ce){var Ie=Ce.getBoundingClientRect(),$e=window.getComputedStyle(Ce);return Ei(Ie,$e)},nn=Number.isNaN||function(Ce){return typeof Ce=="number"&&Ce!==Ce};function di(xe,Ce){return!!(xe===Ce||nn(xe)&&nn(Ce))}function yi(xe,Ce){if(xe.length!==Ce.length)return!1;for(var Ie=0;Ie<xe.length;Ie++)if(!di(xe[Ie],Ce[Ie]))return!1;return!0}function Li(xe,Ce){Ce===void 0&&(Ce=yi);var Ie,$e=[],mt,gt=!1;function Bt(){for(var Kt=[],Mn=0;Mn<arguments.length;Mn++)Kt[Mn]=arguments[Mn];return gt&&Ie===this&&Ce(Kt,$e)||(mt=xe.apply(this,Kt),gt=!0,Ie=this,$e=Kt),mt}return Bt}var Tn=Li,Un=function(Ce){var Ie=[],$e=null,mt=function(){for(var Bt=arguments.length,Kt=new Array(Bt),Mn=0;Mn<Bt;Mn++)Kt[Mn]=arguments[Mn];Ie=Kt,!$e&&($e=requestAnimationFrame(function(){$e=null,Ce.apply(void 0,Ie)}))};return mt.cancel=function(){$e&&(cancelAnimationFrame($e),$e=null)},mt},kt=Un,$t=!0,Je=/[ \t]{2,}/g,qt=/^[ \t]*/gm,vn=function(Ce){return Ce.replace(Je," ").replace(qt,"").trim()},Ft=function(Ce){return vn(`
|
|
|
%creact-beautiful-dnd
|
|
|
|
|
|
%c`+vn(Ce)+`
|
|
|
|
|
|
%c\u{1F477}\u200D This is a development only message. It will be removed in production builds.
|
|
|
`)},st=function(Ce){return[Ft(Ce),"color: #00C584; font-size: 1.2em; font-weight: bold;","line-height: 1.5","color: #723874;"]},on="__react-beautiful-dnd-disable-dev-warnings";function En(xe,Ce){var Ie;$t||typeof window!="undefined"&&window[on]||(Ie=console)[xe].apply(Ie,st(Ce))}var Dn=En.bind(null,"warn"),Jn=En.bind(null,"error");function St(){}function Nn(xe,Ce){return(0,ut.Z)({},xe,{},Ce)}function qn(xe,Ce,Ie){var $e=Ce.map(function(mt){var gt=Nn(Ie,mt.options);return xe.addEventListener(mt.eventName,mt.fn,gt),function(){xe.removeEventListener(mt.eventName,mt.fn,gt)}});return function(){$e.forEach(function(gt){gt()})}}var Si=!0,en="Invariant failed";function Cn(xe){this.message=xe}Cn.prototype.toString=function(){return this.message};function At(xe,Ce){if(!xe)throw Si?new Cn(en):new Cn(en+": "+(Ce||""))}var yn=function(xe){Ke(Ce,xe);function Ce(){for(var $e,mt=arguments.length,gt=new Array(mt),Bt=0;Bt<mt;Bt++)gt[Bt]=arguments[Bt];return $e=xe.call.apply(xe,[this].concat(gt))||this,$e.callbacks=null,$e.unbind=St,$e.onWindowError=function(Kt){var Mn=$e.getCallbacks();Mn.isDragging()&&Mn.tryAbort();var Xn=Kt.error;Xn instanceof Cn&&Kt.preventDefault()},$e.getCallbacks=function(){if(!$e.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return $e.callbacks},$e.setCallbacks=function(Kt){$e.callbacks=Kt},$e}var Ie=Ce.prototype;return Ie.componentDidMount=function(){this.unbind=qn(window,[{eventName:"error",fn:this.onWindowError}])},Ie.componentWillUnmount=function(){this.unbind()},Ie.componentDidCatch=function(mt){if(mt instanceof Cn){this.setState({});return}throw mt},Ie.render=function(){return this.props.children(this.setCallbacks)},Ce}(ge.Component),pn=`
|
|
|
Press space bar to start a drag.
|
|
|
When dragging you can use the arrow keys to move the item around and escape to cancel.
|
|
|
Some screen readers may require you to be in focus mode or to use your pass through key
|
|
|
`,mn=function(Ce){return Ce+1},Wn=function(Ce){return`
|
|
|
You have lifted an item in position `+mn(Ce.source.index)+`
|
|
|
`},Hn=function(Ce,Ie){var $e=Ce.droppableId===Ie.droppableId,mt=mn(Ce.index),gt=mn(Ie.index);return $e?`
|
|
|
You have moved the item from position `+mt+`
|
|
|
to position `+gt+`
|
|
|
`:`
|
|
|
You have moved the item from position `+mt+`
|
|
|
in list `+Ce.droppableId+`
|
|
|
to list `+Ie.droppableId+`
|
|
|
in position `+gt+`
|
|
|
`},Qn=function(Ce,Ie,$e){var mt=Ie.droppableId===$e.droppableId;return mt?`
|
|
|
The item `+Ce+`
|
|
|
has been combined with `+$e.draggableId:`
|
|
|
The item `+Ce+`
|
|
|
in list `+Ie.droppableId+`
|
|
|
has been combined with `+$e.draggableId+`
|
|
|
in list `+$e.droppableId+`
|
|
|
`},ii=function(Ce){var Ie=Ce.destination;if(Ie)return Hn(Ce.source,Ie);var $e=Ce.combine;return $e?Qn(Ce.draggableId,Ce.source,$e):"You are over an area that cannot be dropped on"},ji=function(Ce){return`
|
|
|
The item has returned to its starting position
|
|
|
of `+mn(Ce.index)+`
|
|
|
`},cn=function(Ce){if(Ce.reason==="CANCEL")return`
|
|
|
Movement cancelled.
|
|
|
`+ji(Ce.source)+`
|
|
|
`;var Ie=Ce.destination,$e=Ce.combine;return Ie?`
|
|
|
You have dropped the item.
|
|
|
`+Hn(Ce.source,Ie)+`
|
|
|
`:$e?`
|
|
|
You have dropped the item.
|
|
|
`+Qn(Ce.draggableId,Ce.source,$e)+`
|
|
|
`:`
|
|
|
The item has been dropped while not over a drop area.
|
|
|
`+ji(Ce.source)+`
|
|
|
`},Yi={dragHandleUsageInstructions:pn,onDragStart:Wn,onDragUpdate:ii,onDragEnd:cn},$i={x:0,y:0},Wi=function(Ce,Ie){return{x:Ce.x+Ie.x,y:Ce.y+Ie.y}},ln=function(Ce,Ie){return{x:Ce.x-Ie.x,y:Ce.y-Ie.y}},oi=function(Ce,Ie){return Ce.x===Ie.x&&Ce.y===Ie.y},Bi=function(Ce){return{x:Ce.x!==0?-Ce.x:0,y:Ce.y!==0?-Ce.y:0}},Gi=function(Ce,Ie,$e){var mt;return $e===void 0&&($e=0),mt={},mt[Ce]=Ie,mt[Ce==="x"?"y":"x"]=$e,mt},Ti=function(Ce,Ie){return Math.sqrt(Math.pow(Ie.x-Ce.x,2)+Math.pow(Ie.y-Ce.y,2))},Qi=function(Ce,Ie){return Math.min.apply(Math,Ie.map(function($e){return Ti(Ce,$e)}))},gr=function(Ce){return function(Ie){return{x:Ce(Ie.x),y:Ce(Ie.y)}}},hr=function(xe,Ce){var Ie=bi({top:Math.max(Ce.top,xe.top),right:Math.min(Ce.right,xe.right),bottom:Math.min(Ce.bottom,xe.bottom),left:Math.max(Ce.left,xe.left)});return Ie.width<=0||Ie.height<=0?null:Ie},Ki=function(Ce,Ie){return{top:Ce.top+Ie.y,left:Ce.left+Ie.x,bottom:Ce.bottom+Ie.y,right:Ce.right+Ie.x}},Sr=function(Ce){return[{x:Ce.left,y:Ce.top},{x:Ce.right,y:Ce.top},{x:Ce.left,y:Ce.bottom},{x:Ce.right,y:Ce.bottom}]},kn={top:0,right:0,bottom:0,left:0},Br=function(Ce,Ie){return Ie?Ki(Ce,Ie.scroll.diff.displacement):Ce},_n=function(Ce,Ie,$e){if($e&&$e.increasedBy){var mt;return(0,ut.Z)({},Ce,(mt={},mt[Ie.end]=Ce[Ie.end]+$e.increasedBy[Ie.line],mt))}return Ce},Or=function(Ce,Ie){return Ie&&Ie.shouldClipSubject?hr(Ie.pageMarginBox,Ce):bi(Ce)},no=function(xe){var Ce=xe.page,Ie=xe.withPlaceholder,$e=xe.axis,mt=xe.frame,gt=Br(Ce.marginBox,mt),Bt=_n(gt,$e,Ie),Kt=Or(Bt,mt);return{page:Ce,withPlaceholder:Ie,active:Kt}},br=function(xe,Ce){xe.frame||At(!1);var Ie=xe.frame,$e=ln(Ce,Ie.scroll.initial),mt=Bi($e),gt=(0,ut.Z)({},Ie,{scroll:{initial:Ie.scroll.initial,current:Ce,diff:{value:$e,displacement:mt},max:Ie.scroll.max}}),Bt=no({page:xe.subject.page,withPlaceholder:xe.subject.withPlaceholder,axis:xe.axis,frame:gt}),Kt=(0,ut.Z)({},xe,{frame:gt,subject:Bt});return Kt};function mo(xe){return Number.isInteger?Number.isInteger(xe):typeof xe=="number"&&isFinite(xe)&&Math.floor(xe)===xe}function Jr(xe){return Object.values?Object.values(xe):Object.keys(xe).map(function(Ce){return xe[Ce]})}function ur(xe,Ce){if(xe.findIndex)return xe.findIndex(Ce);for(var Ie=0;Ie<xe.length;Ie++)if(Ce(xe[Ie]))return Ie;return-1}function er(xe,Ce){if(xe.find)return xe.find(Ce);var Ie=ur(xe,Ce);if(Ie!==-1)return xe[Ie]}function qi(xe){return Array.prototype.slice.call(xe)}var Rr=Tn(function(xe){return xe.reduce(function(Ce,Ie){return Ce[Ie.descriptor.id]=Ie,Ce},{})}),Ii=Tn(function(xe){return xe.reduce(function(Ce,Ie){return Ce[Ie.descriptor.id]=Ie,Ce},{})}),tt=Tn(function(xe){return Jr(xe)}),Qr=Tn(function(xe){return Jr(xe)}),lo=Tn(function(xe,Ce){var Ie=Qr(Ce).filter(function($e){return xe===$e.descriptor.droppableId}).sort(function($e,mt){return $e.descriptor.index-mt.descriptor.index});return Ie});function jr(xe){return xe.at&&xe.at.type==="REORDER"?xe.at.destination:null}function vo(xe){return xe.at&&xe.at.type==="COMBINE"?xe.at.combine:null}var po=Tn(function(xe,Ce){return Ce.filter(function(Ie){return Ie.descriptor.id!==xe.descriptor.id})}),Lr=function(xe){var Ce=xe.isMovingForward,Ie=xe.draggable,$e=xe.destination,mt=xe.insideDestination,gt=xe.previousImpact;if(!$e.isCombineEnabled)return null;var Bt=jr(gt);if(!Bt)return null;function Kt(Ar){var Hr={type:"COMBINE",combine:{draggableId:Ar,droppableId:$e.descriptor.id}};return(0,ut.Z)({},gt,{at:Hr})}var Mn=gt.displaced.all,Xn=Mn.length?Mn[0]:null;if(Ce)return Xn?Kt(Xn):null;var Zn=po(Ie,mt);if(!Xn){if(!Zn.length)return null;var In=Zn[Zn.length-1];return Kt(In.descriptor.id)}var Bn=ur(Zn,function(Ar){return Ar.descriptor.id===Xn});Bn===-1&&At(!1);var ri=Bn-1;if(ri<0)return null;var ki=Zn[ri];return Kt(ki.descriptor.id)},Fr=function(xe,Ce){return xe.descriptor.droppableId===Ce.descriptor.id},uo={point:$i,value:0},qr={invisible:{},visible:{},all:[]},zo={displaced:qr,displacedBy:uo,at:null},Ro=function(xe,Ce){return function(Ie){return xe<=Ie&&Ie<=Ce}},Mr=function(xe){var Ce=Ro(xe.top,xe.bottom),Ie=Ro(xe.left,xe.right);return function($e){var mt=Ce($e.top)&&Ce($e.bottom)&&Ie($e.left)&&Ie($e.right);if(mt)return!0;var gt=Ce($e.top)||Ce($e.bottom),Bt=Ie($e.left)||Ie($e.right),Kt=gt&&Bt;if(Kt)return!0;var Mn=$e.top<xe.top&&$e.bottom>xe.bottom,Xn=$e.left<xe.left&&$e.right>xe.right,Zn=Mn&&Xn;if(Zn)return!0;var In=Mn&&Bt||Xn&>return In}},Nr=function(xe){var Ce=Ro(xe.top,xe.bottom),Ie=Ro(xe.left,xe.right);return function($e){var mt=Ce($e.top)&&Ce($e.bottom)&&Ie($e.left)&&Ie($e.right);return mt}},fi={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Tr={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},Bo=function(xe){return function(Ce){var Ie=Ro(Ce.top,Ce.bottom),$e=Ro(Ce.left,Ce.right);return function(mt){return xe===fi?Ie(mt.top)&&Ie(mt.bottom):$e(mt.left)&&$e(mt.right)}}},aa=function(Ce,Ie){var $e=Ie.frame?Ie.frame.scroll.diff.displacement:$i;return Ki(Ce,$e)},Ho=function(Ce,Ie,$e){return Ie.subject.active?$e(Ie.subject.active)(Ce):!1},Ao=function(Ce,Ie,$e){return $e(Ie)(Ce)},_o=function(Ce){var Ie=Ce.target,$e=Ce.destination,mt=Ce.viewport,gt=Ce.withDroppableDisplacement,Bt=Ce.isVisibleThroughFrameFn,Kt=gt?aa(Ie,$e):Ie;return Ho(Kt,$e,Bt)&&Ao(Kt,mt,Bt)},ta=function(Ce){return _o((0,ut.Z)({},Ce,{isVisibleThroughFrameFn:Mr}))},Ea=function(Ce){return _o((0,ut.Z)({},Ce,{isVisibleThroughFrameFn:Nr}))},Mt=function(Ce){return _o((0,ut.Z)({},Ce,{isVisibleThroughFrameFn:Bo(Ce.destination.axis)}))},Pi=function(Ce,Ie,$e){if(typeof $e=="boolean")return $e;if(!Ie)return!0;var mt=Ie.invisible,gt=Ie.visible;if(mt[Ce])return!1;var Bt=gt[Ce];return Bt?Bt.shouldAnimate:!0};function Ut(xe,Ce){var Ie=xe.page.marginBox,$e={top:Ce.point.y,right:0,bottom:0,left:Ce.point.x};return bi(Xi(Ie,$e))}function Ui(xe){var Ce=xe.afterDragging,Ie=xe.destination,$e=xe.displacedBy,mt=xe.viewport,gt=xe.forceShouldAnimate,Bt=xe.last;return Ce.reduce(function(Mn,Xn){var Zn=Ut(Xn,$e),In=Xn.descriptor.id;Mn.all.push(In);var Bn=ta({target:Zn,destination:Ie,viewport:mt,withDroppableDisplacement:!0});if(!Bn)return Mn.invisible[Xn.descriptor.id]=!0,Mn;var ri=Pi(In,Bt,gt),ki={draggableId:In,shouldAnimate:ri};return Mn.visible[In]=ki,Mn},{all:[],visible:{},invisible:{}})}function wi(xe,Ce){if(!xe.length)return 0;var Ie=xe[xe.length-1].descriptor.index;return Ce.inHomeList?Ie:Ie+1}function yr(xe){var Ce=xe.insideDestination,Ie=xe.inHomeList,$e=xe.displacedBy,mt=xe.destination,gt=wi(Ce,{inHomeList:Ie});return{displaced:qr,displacedBy:$e,at:{type:"REORDER",destination:{droppableId:mt.descriptor.id,index:gt}}}}function Zi(xe){var Ce=xe.draggable,Ie=xe.insideDestination,$e=xe.destination,mt=xe.viewport,gt=xe.displacedBy,Bt=xe.last,Kt=xe.index,Mn=xe.forceShouldAnimate,Xn=Fr(Ce,$e);if(Kt==null)return yr({insideDestination:Ie,inHomeList:Xn,displacedBy:gt,destination:$e});var Zn=er(Ie,function(Ar){return Ar.descriptor.index===Kt});if(!Zn)return yr({insideDestination:Ie,inHomeList:Xn,displacedBy:gt,destination:$e});var In=po(Ce,Ie),Bn=Ie.indexOf(Zn),ri=In.slice(Bn),ki=Ui({afterDragging:ri,destination:$e,displacedBy:gt,last:Bt,viewport:mt.frame,forceShouldAnimate:Mn});return{displaced:ki,displacedBy:gt,at:{type:"REORDER",destination:{droppableId:$e.descriptor.id,index:Kt}}}}function Ci(xe,Ce){return!!Ce.effected[xe]}var nr=function(xe){var Ce=xe.isMovingForward,Ie=xe.destination,$e=xe.draggables,mt=xe.combine,gt=xe.afterCritical;if(!Ie.isCombineEnabled)return null;var Bt=mt.draggableId,Kt=$e[Bt],Mn=Kt.descriptor.index,Xn=Ci(Bt,gt);return Xn?Ce?Mn:Mn-1:Ce?Mn+1:Mn},rr=function(xe){var Ce=xe.isMovingForward,Ie=xe.isInHomeList,$e=xe.insideDestination,mt=xe.location;if(!$e.length)return null;var gt=mt.index,Bt=Ce?gt+1:gt-1,Kt=$e[0].descriptor.index,Mn=$e[$e.length-1].descriptor.index,Xn=Ie?Mn:Mn+1;return Bt<Kt||Bt>Xn?null:Bt},cr=function(xe){var Ce=xe.isMovingForward,Ie=xe.isInHomeList,$e=xe.draggable,mt=xe.draggables,gt=xe.destination,Bt=xe.insideDestination,Kt=xe.previousImpact,Mn=xe.viewport,Xn=xe.afterCritical,Zn=Kt.at;if(Zn||At(!1),Zn.type==="REORDER"){var In=rr({isMovingForward:Ce,isInHomeList:Ie,location:Zn.destination,insideDestination:Bt});return In==null?null:Zi({draggable:$e,insideDestination:Bt,destination:gt,viewport:Mn,last:Kt.displaced,displacedBy:Kt.displacedBy,index:In})}var Bn=nr({isMovingForward:Ce,destination:gt,displaced:Kt.displaced,draggables:mt,combine:Zn.combine,afterCritical:Xn});return Bn==null?null:Zi({draggable:$e,insideDestination:Bt,destination:gt,viewport:Mn,last:Kt.displaced,displacedBy:Kt.displacedBy,index:Bn})},xr=function(xe){var Ce=xe.displaced,Ie=xe.afterCritical,$e=xe.combineWith,mt=xe.displacedBy,gt=!!(Ce.visible[$e]||Ce.invisible[$e]);return Ci($e,Ie)?gt?$i:Bi(mt.point):gt?mt.point:$i},Gr=function(xe){var Ce=xe.afterCritical,Ie=xe.impact,$e=xe.draggables,mt=vo(Ie);mt||At(!1);var gt=mt.draggableId,Bt=$e[gt].page.borderBox.center,Kt=xr({displaced:Ie.displaced,afterCritical:Ce,combineWith:gt,displacedBy:Ie.displacedBy});return Wi(Bt,Kt)},vr=function(Ce,Ie){return Ie.margin[Ce.start]+Ie.borderBox[Ce.size]/2},kr=function(Ce,Ie){return Ie.margin[Ce.end]+Ie.borderBox[Ce.size]/2},Zr=function(Ce,Ie,$e){return Ie[Ce.crossAxisStart]+$e.margin[Ce.crossAxisStart]+$e.borderBox[Ce.crossAxisSize]/2},Oi=function(Ce){var Ie=Ce.axis,$e=Ce.moveRelativeTo,mt=Ce.isMoving;return Gi(Ie.line,$e.marginBox[Ie.end]+vr(Ie,mt),Zr(Ie,$e.marginBox,mt))},sa=function(Ce){var Ie=Ce.axis,$e=Ce.moveRelativeTo,mt=Ce.isMoving;return Gi(Ie.line,$e.marginBox[Ie.start]-kr(Ie,mt),Zr(Ie,$e.marginBox,mt))},Ra=function(Ce){var Ie=Ce.axis,$e=Ce.moveInto,mt=Ce.isMoving;return Gi(Ie.line,$e.contentBox[Ie.start]+vr(Ie,mt),Zr(Ie,$e.contentBox,mt))},Ls=function(xe){var Ce=xe.impact,Ie=xe.draggable,$e=xe.draggables,mt=xe.droppable,gt=xe.afterCritical,Bt=lo(mt.descriptor.id,$e),Kt=Ie.page,Mn=mt.axis;if(!Bt.length)return Ra({axis:Mn,moveInto:mt.page,isMoving:Kt});var Xn=Ce.displaced,Zn=Ce.displacedBy,In=Xn.all[0];if(In){var Bn=$e[In];if(Ci(In,gt))return sa({axis:Mn,moveRelativeTo:Bn.page,isMoving:Kt});var ri=$n(Bn.page,Zn.point);return sa({axis:Mn,moveRelativeTo:ri,isMoving:Kt})}var ki=Bt[Bt.length-1];if(ki.descriptor.id===Ie.descriptor.id)return Kt.borderBox.center;if(Ci(ki.descriptor.id,gt)){var Ar=$n(ki.page,Bi(gt.displacedBy.point));return Oi({axis:Mn,moveRelativeTo:Ar,isMoving:Kt})}return Oi({axis:Mn,moveRelativeTo:ki.page,isMoving:Kt})},Ys=function(xe,Ce){var Ie=xe.frame;return Ie?Wi(Ce,Ie.scroll.diff.displacement):Ce},tl=function(Ce){var Ie=Ce.impact,$e=Ce.draggable,mt=Ce.droppable,gt=Ce.draggables,Bt=Ce.afterCritical,Kt=$e.page.borderBox.center,Mn=Ie.at;return!mt||!Mn?Kt:Mn.type==="REORDER"?Ls({impact:Ie,draggable:$e,draggables:gt,droppable:mt,afterCritical:Bt}):Gr({impact:Ie,draggables:gt,afterCritical:Bt})},Vi=function(xe){var Ce=tl(xe),Ie=xe.droppable,$e=Ie?Ys(Ie,Ce):Ce;return $e},La=function(xe,Ce){var Ie=ln(Ce,xe.scroll.initial),$e=Bi(Ie),mt=bi({top:Ce.y,bottom:Ce.y+xe.frame.height,left:Ce.x,right:Ce.x+xe.frame.width}),gt={frame:mt,scroll:{initial:xe.scroll.initial,max:xe.scroll.max,current:Ce,diff:{value:Ie,displacement:$e}}};return gt};function Ba(xe,Ce){return xe.map(function(Ie){return Ce[Ie]})}function zs(xe,Ce){for(var Ie=0;Ie<Ce.length;Ie++){var $e=Ce[Ie].visible[xe];if($e)return $e}return null}var su=function(xe){var Ce=xe.impact,Ie=xe.viewport,$e=xe.destination,mt=xe.draggables,gt=xe.maxScrollChange,Bt=La(Ie,Wi(Ie.scroll.current,gt)),Kt=$e.frame?br($e,Wi($e.frame.scroll.current,gt)):$e,Mn=Ce.displaced,Xn=Ui({afterDragging:Ba(Mn.all,mt),destination:$e,displacedBy:Ce.displacedBy,viewport:Bt.frame,last:Mn,forceShouldAnimate:!1}),Zn=Ui({afterDragging:Ba(Mn.all,mt),destination:Kt,displacedBy:Ce.displacedBy,viewport:Ie.frame,last:Mn,forceShouldAnimate:!1}),In={},Bn={},ri=[Mn,Xn,Zn];Mn.all.forEach(function(Ar){var Hr=zs(Ar,ri);if(Hr){Bn[Ar]=Hr;return}In[Ar]=!0});var ki=(0,ut.Z)({},Ce,{displaced:{all:Mn.all,invisible:In,visible:Bn}});return ki},lu=function(xe,Ce){return Wi(xe.scroll.diff.displacement,Ce)},wo=function(xe){var Ce=xe.pageBorderBoxCenter,Ie=xe.draggable,$e=xe.viewport,mt=lu($e,Ce),gt=ln(mt,Ie.page.borderBox.center);return Wi(Ie.client.borderBox.center,gt)},yc=function(xe){var Ce=xe.draggable,Ie=xe.destination,$e=xe.newPageBorderBoxCenter,mt=xe.viewport,gt=xe.withDroppableDisplacement,Bt=xe.onlyOnMainAxis,Kt=Bt===void 0?!1:Bt,Mn=ln($e,Ce.page.borderBox.center),Xn=Ki(Ce.page.borderBox,Mn),Zn={target:Xn,destination:Ie,withDroppableDisplacement:gt,viewport:mt};return Kt?Mt(Zn):Ea(Zn)},Ml=function(xe){var Ce=xe.isMovingForward,Ie=xe.draggable,$e=xe.destination,mt=xe.draggables,gt=xe.previousImpact,Bt=xe.viewport,Kt=xe.previousPageBorderBoxCenter,Mn=xe.previousClientSelection,Xn=xe.afterCritical;if(!$e.isEnabled)return null;var Zn=lo($e.descriptor.id,mt),In=Fr(Ie,$e),Bn=Lr({isMovingForward:Ce,draggable:Ie,destination:$e,insideDestination:Zn,previousImpact:gt})||cr({isMovingForward:Ce,isInHomeList:In,draggable:Ie,draggables:mt,destination:$e,insideDestination:Zn,previousImpact:gt,viewport:Bt,afterCritical:Xn});if(!Bn)return null;var ri=Vi({impact:Bn,draggable:Ie,droppable:$e,draggables:mt,afterCritical:Xn}),ki=yc({draggable:Ie,destination:$e,newPageBorderBoxCenter:ri,viewport:Bt.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(ki){var Ar=wo({pageBorderBoxCenter:ri,draggable:Ie,viewport:Bt});return{clientSelection:Ar,impact:Bn,scrollJumpRequest:null}}var Hr=ln(ri,Kt),to=su({impact:Bn,viewport:Bt,destination:$e,draggables:mt,maxScrollChange:Hr});return{clientSelection:Mn,impact:to,scrollJumpRequest:Hr}},as=function(Ce){var Ie=Ce.subject.active;return Ie||At(!1),Ie},vl=function(xe){var Ce=xe.isMovingForward,Ie=xe.pageBorderBoxCenter,$e=xe.source,mt=xe.droppables,gt=xe.viewport,Bt=$e.subject.active;if(!Bt)return null;var Kt=$e.axis,Mn=Ro(Bt[Kt.start],Bt[Kt.end]),Xn=tt(mt).filter(function(In){return In!==$e}).filter(function(In){return In.isEnabled}).filter(function(In){return!!In.subject.active}).filter(function(In){return Mr(gt.frame)(as(In))}).filter(function(In){var Bn=as(In);return Ce?Bt[Kt.crossAxisEnd]<Bn[Kt.crossAxisEnd]:Bn[Kt.crossAxisStart]<Bt[Kt.crossAxisStart]}).filter(function(In){var Bn=as(In),ri=Ro(Bn[Kt.start],Bn[Kt.end]);return Mn(Bn[Kt.start])||Mn(Bn[Kt.end])||ri(Bt[Kt.start])||ri(Bt[Kt.end])}).sort(function(In,Bn){var ri=as(In)[Kt.crossAxisStart],ki=as(Bn)[Kt.crossAxisStart];return Ce?ri-ki:ki-ri}).filter(function(In,Bn,ri){return as(In)[Kt.crossAxisStart]===as(ri[0])[Kt.crossAxisStart]});if(!Xn.length)return null;if(Xn.length===1)return Xn[0];var Zn=Xn.filter(function(In){var Bn=Ro(as(In)[Kt.start],as(In)[Kt.end]);return Bn(Ie[Kt.line])});return Zn.length===1?Zn[0]:Zn.length>1?Zn.sort(function(In,Bn){return as(In)[Kt.start]-as(Bn)[Kt.start]})[0]:Xn.sort(function(In,Bn){var ri=Qi(Ie,Sr(as(In))),ki=Qi(Ie,Sr(as(Bn)));return ri!==ki?ri-ki:as(In)[Kt.start]-as(Bn)[Kt.start]})[0]},ju=function(Ce,Ie){var $e=Ce.page.borderBox.center;return Ci(Ce.descriptor.id,Ie)?ln($e,Ie.displacedBy.point):$e},rc=function(Ce,Ie){var $e=Ce.page.borderBox;return Ci(Ce.descriptor.id,Ie)?Ki($e,Bi(Ie.displacedBy.point)):$e},wl=function(xe){var Ce=xe.pageBorderBoxCenter,Ie=xe.viewport,$e=xe.destination,mt=xe.insideDestination,gt=xe.afterCritical,Bt=mt.filter(function(Kt){return Ea({target:rc(Kt,gt),destination:$e,viewport:Ie.frame,withDroppableDisplacement:!0})}).sort(function(Kt,Mn){var Xn=Ti(Ce,Ys($e,ju(Kt,gt))),Zn=Ti(Ce,Ys($e,ju(Mn,gt)));return Xn<Zn?-1:Zn<Xn?1:Kt.descriptor.index-Mn.descriptor.index});return Bt[0]||null},sl=Tn(function(Ce,Ie){var $e=Ie[Ce.line];return{value:$e,point:Gi(Ce.line,$e)}}),td=function(Ce,Ie,$e){var mt=Ce.axis;if(Ce.descriptor.mode==="virtual")return Gi(mt.line,Ie[mt.line]);var gt=Ce.subject.page.contentBox[mt.size],Bt=lo(Ce.descriptor.id,$e),Kt=Bt.reduce(function(Zn,In){return Zn+In.client.marginBox[mt.size]},0),Mn=Kt+Ie[mt.line],Xn=Mn-gt;return Xn<=0?null:Gi(mt.line,Xn)},nd=function(Ce,Ie){return(0,ut.Z)({},Ce,{scroll:(0,ut.Z)({},Ce.scroll,{max:Ie})})},kc=function(Ce,Ie,$e){var mt=Ce.frame;Fr(Ie,Ce)&&At(!1),Ce.subject.withPlaceholder&&At(!1);var gt=sl(Ce.axis,Ie.displaceBy).point,Bt=td(Ce,gt,$e),Kt={placeholderSize:gt,increasedBy:Bt,oldFrameMaxScroll:Ce.frame?Ce.frame.scroll.max:null};if(!mt){var Mn=no({page:Ce.subject.page,withPlaceholder:Kt,axis:Ce.axis,frame:Ce.frame});return(0,ut.Z)({},Ce,{subject:Mn})}var Xn=Bt?Wi(mt.scroll.max,Bt):mt.scroll.max,Zn=nd(mt,Xn),In=no({page:Ce.subject.page,withPlaceholder:Kt,axis:Ce.axis,frame:Zn});return(0,ut.Z)({},Ce,{subject:In,frame:Zn})},_d=function(Ce){var Ie=Ce.subject.withPlaceholder;Ie||At(!1);var $e=Ce.frame;if(!$e){var mt=no({page:Ce.subject.page,axis:Ce.axis,frame:null,withPlaceholder:null});return(0,ut.Z)({},Ce,{subject:mt})}var gt=Ie.oldFrameMaxScroll;gt||At(!1);var Bt=nd($e,gt),Kt=no({page:Ce.subject.page,axis:Ce.axis,frame:Bt,withPlaceholder:null});return(0,ut.Z)({},Ce,{subject:Kt,frame:Bt})},id=function(xe){var Ce=xe.previousPageBorderBoxCenter,Ie=xe.moveRelativeTo,$e=xe.insideDestination,mt=xe.draggable,gt=xe.draggables,Bt=xe.destination,Kt=xe.viewport,Mn=xe.afterCritical;if(!Ie){if($e.length)return null;var Xn={displaced:qr,displacedBy:uo,at:{type:"REORDER",destination:{droppableId:Bt.descriptor.id,index:0}}},Zn=Vi({impact:Xn,draggable:mt,droppable:Bt,draggables:gt,afterCritical:Mn}),In=Fr(mt,Bt)?Bt:kc(Bt,mt,gt),Bn=yc({draggable:mt,destination:In,newPageBorderBoxCenter:Zn,viewport:Kt.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return Bn?Xn:null}var ri=Ce[Bt.axis.line]<=Ie.page.borderBox.center[Bt.axis.line],ki=function(){var Hr=Ie.descriptor.index;return Ie.descriptor.id===mt.descriptor.id||ri?Hr:Hr+1}(),Ar=sl(Bt.axis,mt.displaceBy);return Zi({draggable:mt,insideDestination:$e,destination:Bt,viewport:Kt,displacedBy:Ar,last:qr,index:ki})},Ic=function(xe){var Ce=xe.isMovingForward,Ie=xe.previousPageBorderBoxCenter,$e=xe.draggable,mt=xe.isOver,gt=xe.draggables,Bt=xe.droppables,Kt=xe.viewport,Mn=xe.afterCritical,Xn=vl({isMovingForward:Ce,pageBorderBoxCenter:Ie,source:mt,droppables:Bt,viewport:Kt});if(!Xn)return null;var Zn=lo(Xn.descriptor.id,gt),In=wl({pageBorderBoxCenter:Ie,viewport:Kt,destination:Xn,insideDestination:Zn,afterCritical:Mn}),Bn=id({previousPageBorderBoxCenter:Ie,destination:Xn,draggable:$e,draggables:gt,moveRelativeTo:In,insideDestination:Zn,viewport:Kt,afterCritical:Mn});if(!Bn)return null;var ri=Vi({impact:Bn,draggable:$e,droppable:Xn,draggables:gt,afterCritical:Mn}),ki=wo({pageBorderBoxCenter:ri,draggable:$e,viewport:Kt});return{clientSelection:ki,impact:Bn,scrollJumpRequest:null}},Js=function(xe){var Ce=xe.at;return Ce?Ce.type==="REORDER"?Ce.destination.droppableId:Ce.combine.droppableId:null},uu=function(Ce,Ie){var $e=Js(Ce);return $e?Ie[$e]:null},xd=function(xe){var Ce=xe.state,Ie=xe.type,$e=uu(Ce.impact,Ce.dimensions.droppables),mt=!!$e,gt=Ce.dimensions.droppables[Ce.critical.droppable.id],Bt=$e||gt,Kt=Bt.axis.direction,Mn=Kt==="vertical"&&(Ie==="MOVE_UP"||Ie==="MOVE_DOWN")||Kt==="horizontal"&&(Ie==="MOVE_LEFT"||Ie==="MOVE_RIGHT");if(Mn&&!mt)return null;var Xn=Ie==="MOVE_DOWN"||Ie==="MOVE_RIGHT",Zn=Ce.dimensions.draggables[Ce.critical.draggable.id],In=Ce.current.page.borderBoxCenter,Bn=Ce.dimensions,ri=Bn.draggables,ki=Bn.droppables;return Mn?Ml({isMovingForward:Xn,previousPageBorderBoxCenter:In,draggable:Zn,destination:Bt,draggables:ri,viewport:Ce.viewport,previousClientSelection:Ce.current.client.selection,previousImpact:Ce.impact,afterCritical:Ce.afterCritical}):Ic({isMovingForward:Xn,previousPageBorderBoxCenter:In,draggable:Zn,isOver:Bt,draggables:ri,droppables:ki,viewport:Ce.viewport,afterCritical:Ce.afterCritical})};function Eu(xe){return xe.phase==="DRAGGING"||xe.phase==="COLLECTING"}function Sc(xe){var Ce=Ro(xe.top,xe.bottom),Ie=Ro(xe.left,xe.right);return function(mt){return Ce(mt.y)&&Ie(mt.x)}}function Vo(xe,Ce){return xe.left<Ce.right&&xe.right>Ce.left&&xe.top<Ce.bottom&&xe.bottom>Ce.top}function ya(xe){var Ce=xe.pageBorderBox,Ie=xe.draggable,$e=xe.candidates,mt=Ie.page.borderBox.center,gt=$e.map(function(Bt){var Kt=Bt.axis,Mn=Gi(Bt.axis.line,Ce.center[Kt.line],Bt.page.borderBox.center[Kt.crossAxisLine]);return{id:Bt.descriptor.id,distance:Ti(mt,Mn)}}).sort(function(Bt,Kt){return Kt.distance-Bt.distance});return gt[0]?gt[0].id:null}function ll(xe){var Ce=xe.pageBorderBox,Ie=xe.draggable,$e=xe.droppables,mt=tt($e).filter(function(gt){if(!gt.isEnabled)return!1;var Bt=gt.subject.active;if(!Bt||!Vo(Ce,Bt))return!1;if(Sc(Bt)(Ce.center))return!0;var Kt=gt.axis,Mn=Bt.center[Kt.crossAxisLine],Xn=Ce[Kt.crossAxisStart],Zn=Ce[Kt.crossAxisEnd],In=Ro(Bt[Kt.crossAxisStart],Bt[Kt.crossAxisEnd]),Bn=In(Xn),ri=In(Zn);return!Bn&&!ri?!0:Bn?Xn<Mn:Zn>Mn});return mt.length?mt.length===1?mt[0].descriptor.id:ya({pageBorderBox:Ce,draggable:Ie,candidates:mt}):null}var Ss=function(Ce,Ie){return bi(Ki(Ce,Ie))},ms=function(xe,Ce){var Ie=xe.frame;return Ie?Ss(Ce,Ie.scroll.diff.value):Ce};function Ua(xe){var Ce=xe.displaced,Ie=xe.id;return!!(Ce.visible[Ie]||Ce.invisible[Ie])}function ss(xe){var Ce=xe.draggable,Ie=xe.closest,$e=xe.inHomeList;return Ie?$e&&Ie.descriptor.index>Ce.descriptor.index?Ie.descriptor.index-1:Ie.descriptor.index:null}var xs=function(xe){var Ce=xe.pageBorderBoxWithDroppableScroll,Ie=xe.draggable,$e=xe.destination,mt=xe.insideDestination,gt=xe.last,Bt=xe.viewport,Kt=xe.afterCritical,Mn=$e.axis,Xn=sl($e.axis,Ie.displaceBy),Zn=Xn.value,In=Ce[Mn.start],Bn=Ce[Mn.end],ri=po(Ie,mt),ki=er(ri,function(Hr){var to=Hr.descriptor.id,ho=Hr.page.borderBox.center[Mn.line],Lo=Ci(to,Kt),bo=Ua({displaced:gt,id:to});return Lo?bo?Bn<=ho:In<ho-Zn:bo?Bn<=ho+Zn:In<ho}),Ar=ss({draggable:Ie,closest:ki,inHomeList:Fr(Ie,$e)});return Zi({draggable:Ie,insideDestination:mt,destination:$e,viewport:Bt,last:gt,displacedBy:Xn,index:Ar})},vs=4,oc=function(xe){var Ce=xe.draggable,Ie=xe.pageBorderBoxWithDroppableScroll,$e=xe.previousImpact,mt=xe.destination,gt=xe.insideDestination,Bt=xe.afterCritical;if(!mt.isCombineEnabled)return null;var Kt=mt.axis,Mn=sl(mt.axis,Ce.displaceBy),Xn=Mn.value,Zn=Ie[Kt.start],In=Ie[Kt.end],Bn=po(Ce,gt),ri=er(Bn,function(Ar){var Hr=Ar.descriptor.id,to=Ar.page.borderBox,ho=to[Kt.size],Lo=ho/vs,bo=Ci(Hr,Bt),Uo=Ua({displaced:$e.displaced,id:Hr});return bo?Uo?In>to[Kt.start]+Lo&&In<to[Kt.end]-Lo:Zn>to[Kt.start]-Xn+Lo&&Zn<to[Kt.end]-Xn-Lo:Uo?In>to[Kt.start]+Xn+Lo&&In<to[Kt.end]+Xn-Lo:Zn>to[Kt.start]+Lo&&Zn<to[Kt.end]-Lo});if(!ri)return null;var ki={displacedBy:Mn,displaced:$e.displaced,at:{type:"COMBINE",combine:{draggableId:ri.descriptor.id,droppableId:mt.descriptor.id}}};return ki},_l=function(xe){var Ce=xe.pageOffset,Ie=xe.draggable,$e=xe.draggables,mt=xe.droppables,gt=xe.previousImpact,Bt=xe.viewport,Kt=xe.afterCritical,Mn=Ss(Ie.page.borderBox,Ce),Xn=ll({pageBorderBox:Mn,draggable:Ie,droppables:mt});if(!Xn)return zo;var Zn=mt[Xn],In=lo(Zn.descriptor.id,$e),Bn=ms(Zn,Mn);return oc({pageBorderBoxWithDroppableScroll:Bn,draggable:Ie,previousImpact:gt,destination:Zn,insideDestination:In,afterCritical:Kt})||xs({pageBorderBoxWithDroppableScroll:Bn,draggable:Ie,destination:Zn,insideDestination:In,last:gt.displaced,viewport:Bt,afterCritical:Kt})},is=function(xe,Ce){var Ie;return(0,ut.Z)({},xe,(Ie={},Ie[Ce.descriptor.id]=Ce,Ie))},bh=function(Ce){var Ie=Ce.previousImpact,$e=Ce.impact,mt=Ce.droppables,gt=Js(Ie),Bt=Js($e);if(!gt||gt===Bt)return mt;var Kt=mt[gt];if(!Kt.subject.withPlaceholder)return mt;var Mn=_d(Kt);return is(mt,Mn)},Eh=function(xe){var Ce=xe.draggable,Ie=xe.draggables,$e=xe.droppables,mt=xe.previousImpact,gt=xe.impact,Bt=bh({previousImpact:mt,impact:gt,droppables:$e}),Kt=Js(gt);if(!Kt)return Bt;var Mn=$e[Kt];if(Fr(Ce,Mn)||Mn.subject.withPlaceholder)return Bt;var Xn=kc(Mn,Ce,Ie);return is(Bt,Xn)},Uu=function(xe){var Ce=xe.state,Ie=xe.clientSelection,$e=xe.dimensions,mt=xe.viewport,gt=xe.impact,Bt=xe.scrollJumpRequest,Kt=mt||Ce.viewport,Mn=$e||Ce.dimensions,Xn=Ie||Ce.current.client.selection,Zn=ln(Xn,Ce.initial.client.selection),In={offset:Zn,selection:Xn,borderBoxCenter:Wi(Ce.initial.client.borderBoxCenter,Zn)},Bn={selection:Wi(In.selection,Kt.scroll.current),borderBoxCenter:Wi(In.borderBoxCenter,Kt.scroll.current),offset:Wi(In.offset,Kt.scroll.diff.value)},ri={client:In,page:Bn};if(Ce.phase==="COLLECTING")return(0,ut.Z)({phase:"COLLECTING"},Ce,{dimensions:Mn,viewport:Kt,current:ri});var ki=Mn.draggables[Ce.critical.draggable.id],Ar=gt||_l({pageOffset:Bn.offset,draggable:ki,draggables:Mn.draggables,droppables:Mn.droppables,previousImpact:Ce.impact,viewport:Kt,afterCritical:Ce.afterCritical}),Hr=Eh({draggable:ki,impact:Ar,previousImpact:Ce.impact,draggables:Mn.draggables,droppables:Mn.droppables}),to=(0,ut.Z)({},Ce,{current:ri,dimensions:{draggables:Mn.draggables,droppables:Hr},impact:Ar,viewport:Kt,scrollJumpRequest:Bt||null,forceShouldAnimate:Bt?!1:null});return to};function ro(xe,Ce){return xe.map(function(Ie){return Ce[Ie]})}var rd=function(xe){var Ce=xe.impact,Ie=xe.viewport,$e=xe.draggables,mt=xe.destination,gt=xe.forceShouldAnimate,Bt=Ce.displaced,Kt=ro(Bt.all,$e),Mn=Ui({afterDragging:Kt,destination:mt,displacedBy:Ce.displacedBy,viewport:Ie.frame,forceShouldAnimate:gt,last:Bt});return(0,ut.Z)({},Ce,{displaced:Mn})},Jt=function(xe){var Ce=xe.impact,Ie=xe.draggable,$e=xe.droppable,mt=xe.draggables,gt=xe.viewport,Bt=xe.afterCritical,Kt=Vi({impact:Ce,draggable:Ie,draggables:mt,droppable:$e,afterCritical:Bt});return wo({pageBorderBoxCenter:Kt,draggable:Ie,viewport:gt})},xi=function(xe){var Ce=xe.state,Ie=xe.dimensions,$e=xe.viewport;Ce.movementMode!=="SNAP"&&At(!1);var mt=Ce.impact,gt=$e||Ce.viewport,Bt=Ie||Ce.dimensions,Kt=Bt.draggables,Mn=Bt.droppables,Xn=Kt[Ce.critical.draggable.id],Zn=Js(mt);Zn||At(!1);var In=Mn[Zn],Bn=rd({impact:mt,viewport:gt,destination:In,draggables:Kt}),ri=Jt({impact:Bn,draggable:Xn,droppable:In,draggables:Kt,viewport:gt,afterCritical:Ce.afterCritical});return Uu({impact:Bn,clientSelection:ri,state:Ce,dimensions:Bt,viewport:gt})},Mh=function(xe){return{index:xe.index,droppableId:xe.droppableId}},Lh=function(xe){var Ce=xe.draggable,Ie=xe.home,$e=xe.draggables,mt=xe.viewport,gt=sl(Ie.axis,Ce.displaceBy),Bt=lo(Ie.descriptor.id,$e),Kt=Bt.indexOf(Ce);Kt===-1&&At(!1);var Mn=Bt.slice(Kt+1),Xn=Mn.reduce(function(ri,ki){return ri[ki.descriptor.id]=!0,ri},{}),Zn={inVirtualList:Ie.descriptor.mode==="virtual",displacedBy:gt,effected:Xn},In=Ui({afterDragging:Mn,destination:Ie,displacedBy:gt,last:null,viewport:mt.frame,forceShouldAnimate:!1}),Bn={displaced:In,displacedBy:gt,at:{type:"REORDER",destination:Mh(Ce.descriptor)}};return{impact:Bn,afterCritical:Zn}},ac=function(xe,Ce){return{draggables:xe.draggables,droppables:is(xe.droppables,Ce)}},cu=function(Ce){},Mu=function(Ce){},Nh=function(xe){var Ce=xe.draggable,Ie=xe.offset,$e=xe.initialWindowScroll,mt=$n(Ce.client,Ie),gt=Le(mt,$e),Bt=(0,ut.Z)({},Ce,{placeholder:(0,ut.Z)({},Ce.placeholder,{client:mt}),client:mt,page:gt});return Bt},Pd=function(xe){var Ce=xe.frame;return Ce||At(!1),Ce},ys=function(xe){var Ce=xe.additions,Ie=xe.updatedDroppables,$e=xe.viewport,mt=$e.scroll.diff.value;return Ce.map(function(gt){var Bt=gt.descriptor.droppableId,Kt=Ie[Bt],Mn=Pd(Kt),Xn=Mn.scroll.diff.value,Zn=Wi(mt,Xn),In=Nh({draggable:gt,offset:Zn,initialWindowScroll:$e.scroll.initial});return In})},To=function(xe){var Ce=xe.state,Ie=xe.published;cu();var $e=Ie.modified.map(function(Lo){var bo=Ce.dimensions.droppables[Lo.droppableId],Uo=br(bo,Lo.scroll);return Uo}),mt=(0,ut.Z)({},Ce.dimensions.droppables,{},Rr($e)),gt=Ii(ys({additions:Ie.additions,updatedDroppables:mt,viewport:Ce.viewport})),Bt=(0,ut.Z)({},Ce.dimensions.draggables,{},gt);Ie.removals.forEach(function(Lo){delete Bt[Lo]});var Kt={droppables:mt,draggables:Bt},Mn=Js(Ce.impact),Xn=Mn?Kt.droppables[Mn]:null,Zn=Kt.draggables[Ce.critical.draggable.id],In=Kt.droppables[Ce.critical.droppable.id],Bn=Lh({draggable:Zn,home:In,draggables:Bt,viewport:Ce.viewport}),ri=Bn.impact,ki=Bn.afterCritical,Ar=Xn&&Xn.isCombineEnabled?Ce.impact:ri,Hr=_l({pageOffset:Ce.current.page.offset,draggable:Kt.draggables[Ce.critical.draggable.id],draggables:Kt.draggables,droppables:Kt.droppables,previousImpact:Ar,viewport:Ce.viewport,afterCritical:ki});Mu();var to=(0,ut.Z)({phase:"DRAGGING"},Ce,{phase:"DRAGGING",impact:Hr,onLiftImpact:ri,dimensions:Kt,afterCritical:ki,forceShouldAnimate:!1});if(Ce.phase==="COLLECTING")return to;var ho=(0,ut.Z)({phase:"DROP_PENDING"},to,{phase:"DROP_PENDING",reason:Ce.reason,isWaiting:!1});return ho},yl=function(Ce){return Ce.movementMode==="SNAP"},ul=function(Ce,Ie,$e){var mt=ac(Ce.dimensions,Ie);return!yl(Ce)||$e?Uu({state:Ce,dimensions:mt}):xi({state:Ce,dimensions:mt})};function _a(xe){return xe.isDragging&&xe.movementMode==="SNAP"?(0,ut.Z)({phase:"DRAGGING"},xe,{scrollJumpRequest:null}):xe}var ra={phase:"IDLE",completed:null,shouldFlush:!1},Hs=function(xe,Ce){if(xe===void 0&&(xe=ra),Ce.type==="FLUSH")return(0,ut.Z)({},ra,{shouldFlush:!0});if(Ce.type==="INITIAL_PUBLISH"){xe.phase!=="IDLE"&&At(!1);var Ie=Ce.payload,$e=Ie.critical,mt=Ie.clientSelection,gt=Ie.viewport,Bt=Ie.dimensions,Kt=Ie.movementMode,Mn=Bt.draggables[$e.draggable.id],Xn=Bt.droppables[$e.droppable.id],Zn={selection:mt,borderBoxCenter:Mn.client.borderBox.center,offset:$i},In={client:Zn,page:{selection:Wi(Zn.selection,gt.scroll.initial),borderBoxCenter:Wi(Zn.selection,gt.scroll.initial),offset:Wi(Zn.selection,gt.scroll.diff.value)}},Bn=tt(Bt.droppables).every(function(Xf){return!Xf.isFixedOnPage}),ri=Lh({draggable:Mn,home:Xn,draggables:Bt.draggables,viewport:gt}),ki=ri.impact,Ar=ri.afterCritical,Hr={phase:"DRAGGING",isDragging:!0,critical:$e,movementMode:Kt,dimensions:Bt,initial:In,current:In,isWindowScrollAllowed:Bn,impact:ki,afterCritical:Ar,onLiftImpact:ki,viewport:gt,scrollJumpRequest:null,forceShouldAnimate:null};return Hr}if(Ce.type==="COLLECTION_STARTING"){if(xe.phase==="COLLECTING"||xe.phase==="DROP_PENDING")return xe;xe.phase!=="DRAGGING"&&At(!1);var to=(0,ut.Z)({phase:"COLLECTING"},xe,{phase:"COLLECTING"});return to}if(Ce.type==="PUBLISH_WHILE_DRAGGING")return xe.phase==="COLLECTING"||xe.phase==="DROP_PENDING"||At(!1),To({state:xe,published:Ce.payload});if(Ce.type==="MOVE"){if(xe.phase==="DROP_PENDING")return xe;Eu(xe)||At(!1);var ho=Ce.payload.client;return oi(ho,xe.current.client.selection)?xe:Uu({state:xe,clientSelection:ho,impact:yl(xe)?xe.impact:null})}if(Ce.type==="UPDATE_DROPPABLE_SCROLL"){if(xe.phase==="DROP_PENDING"||xe.phase==="COLLECTING")return _a(xe);Eu(xe)||At(!1);var Lo=Ce.payload,bo=Lo.id,Uo=Lo.newScroll,va=xe.dimensions.droppables[bo];if(!va)return xe;var Ka=br(va,Uo);return ul(xe,Ka,!1)}if(Ce.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(xe.phase==="DROP_PENDING")return xe;Eu(xe)||At(!1);var pl=Ce.payload,Wa=pl.id,ol=pl.isEnabled,nu=xe.dimensions.droppables[Wa];nu||At(!1),nu.isEnabled===ol&&At(!1);var yu=(0,ut.Z)({},nu,{isEnabled:ol});return ul(xe,yu,!0)}if(Ce.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(xe.phase==="DROP_PENDING")return xe;Eu(xe)||At(!1);var Wc=Ce.payload,Ju=Wc.id,Wu=Wc.isCombineEnabled,Al=xe.dimensions.droppables[Ju];Al||At(!1),Al.isCombineEnabled===Wu&&At(!1);var Xs=(0,ut.Z)({},Al,{isCombineEnabled:Wu});return ul(xe,Xs,!0)}if(Ce.type==="MOVE_BY_WINDOW_SCROLL"){if(xe.phase==="DROP_PENDING"||xe.phase==="DROP_ANIMATING")return xe;Eu(xe)||At(!1),xe.isWindowScrollAllowed||At(!1);var fd=Ce.payload.newScroll;if(oi(xe.viewport.scroll.current,fd))return _a(xe);var al=La(xe.viewport,fd);return yl(xe)?xi({state:xe,viewport:al}):Uu({state:xe,viewport:al})}if(Ce.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!Eu(xe))return xe;var Gc=Ce.payload.maxScroll;if(oi(Gc,xe.viewport.scroll.max))return xe;var hf=(0,ut.Z)({},xe.viewport,{scroll:(0,ut.Z)({},xe.viewport.scroll,{max:Gc})});return(0,ut.Z)({phase:"DRAGGING"},xe,{viewport:hf})}if(Ce.type==="MOVE_UP"||Ce.type==="MOVE_DOWN"||Ce.type==="MOVE_LEFT"||Ce.type==="MOVE_RIGHT"){if(xe.phase==="COLLECTING"||xe.phase==="DROP_PENDING")return xe;xe.phase!=="DRAGGING"&&At(!1);var $c=xd({state:xe,type:Ce.type});return $c?Uu({state:xe,impact:$c.impact,clientSelection:$c.clientSelection,scrollJumpRequest:$c.scrollJumpRequest}):xe}if(Ce.type==="DROP_PENDING"){var Oo=Ce.payload.reason;xe.phase!=="COLLECTING"&&At(!1);var Rh=(0,ut.Z)({phase:"DROP_PENDING"},xe,{phase:"DROP_PENDING",isWaiting:!0,reason:Oo});return Rh}if(Ce.type==="DROP_ANIMATE"){var Fg=Ce.payload,Kc=Fg.completed,Od=Fg.dropDuration,fh=Fg.newHomeClientOffset;xe.phase==="DRAGGING"||xe.phase==="DROP_PENDING"||At(!1);var Gu={phase:"DROP_ANIMATING",completed:Kc,dropDuration:Od,newHomeClientOffset:fh,dimensions:xe.dimensions};return Gu}if(Ce.type==="DROP_COMPLETE"){var _f=Ce.payload.completed;return{phase:"IDLE",completed:_f,shouldFlush:!1}}return xe},Xl=function(Ce){return{type:"BEFORE_INITIAL_CAPTURE",payload:Ce}},Ja=function(Ce){return{type:"LIFT",payload:Ce}},du=function(Ce){return{type:"INITIAL_PUBLISH",payload:Ce}},nl=function(Ce){return{type:"PUBLISH_WHILE_DRAGGING",payload:Ce}},od=function(){return{type:"COLLECTION_STARTING",payload:null}},Pa=function(Ce){return{type:"UPDATE_DROPPABLE_SCROLL",payload:Ce}},Ll=function(Ce){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:Ce}},wa=function(Ce){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:Ce}},Va=function(Ce){return{type:"MOVE",payload:Ce}},cs=function(Ce){return{type:"MOVE_BY_WINDOW_SCROLL",payload:Ce}},Ps=function(Ce){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:Ce}},Na=function(){return{type:"MOVE_UP",payload:null}},ad=function(){return{type:"MOVE_DOWN",payload:null}},Do=function(){return{type:"MOVE_RIGHT",payload:null}},Rf=function(){return{type:"MOVE_LEFT",payload:null}},fa=function(){return{type:"FLUSH",payload:null}},jf=function(Ce){return{type:"DROP_ANIMATE",payload:Ce}},sd=function(Ce){return{type:"DROP_COMPLETE",payload:Ce}},wd=function(Ce){return{type:"DROP",payload:Ce}},zf=function(Ce){return{type:"DROP_PENDING",payload:Ce}},Xd=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}};function ld(xe){if(!(xe.length<=1)){for(var Ce=xe.map(function(Kt){return Kt.descriptor.index}),Ie={},$e=1;$e<Ce.length;$e++){var mt=Ce[$e],gt=Ce[$e-1];mt!==gt+1&&(Ie[mt]=!0)}if(Object.keys(Ie).length)var Bt=Ce.map(function(Kt){var Mn=!!Ie[Kt];return Mn?"[\u{1F525}"+Kt+"]":""+Kt}).join(", ")}}function ud(xe,Ce){if(0)var Ie}var Fa=function(xe){return function(Ce){var Ie=Ce.getState,$e=Ce.dispatch;return function(mt){return function(gt){if(gt.type!=="LIFT"){mt(gt);return}var Bt=gt.payload,Kt=Bt.id,Mn=Bt.clientSelection,Xn=Bt.movementMode,Zn=Ie();Zn.phase==="DROP_ANIMATING"&&$e(sd({completed:Zn.completed})),Ie().phase!=="IDLE"&&At(!1),$e(fa()),$e(Xl({draggableId:Kt,movementMode:Xn}));var In={shouldPublishImmediately:Xn==="SNAP"},Bn={draggableId:Kt,scrollOptions:In},ri=xe.startPublishing(Bn),ki=ri.critical,Ar=ri.dimensions,Hr=ri.viewport;ud(ki,Ar),$e(du({critical:ki,dimensions:Ar,clientSelection:Mn,movementMode:Xn,viewport:Hr}))}}}},sc=function(xe){return function(){return function(Ce){return function(Ie){Ie.type==="INITIAL_PUBLISH"&&xe.dragging(),Ie.type==="DROP_ANIMATE"&&xe.dropping(Ie.payload.completed.result.reason),(Ie.type==="FLUSH"||Ie.type==="DROP_COMPLETE")&&xe.resting(),Ce(Ie)}}}},Yd={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},_u={opacity:{drop:0,combining:.7},scale:{drop:.75}},Fh={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},kl=Fh.outOfTheWay+"s "+Yd.outOfTheWay,Il={fluid:"opacity "+kl,snap:"transform "+kl+", opacity "+kl,drop:function(Ce){var Ie=Ce+"s "+Yd.drop;return"transform "+Ie+", opacity "+Ie},outOfTheWay:"transform "+kl,placeholder:"height "+kl+", width "+kl+", margin "+kl},xc=function(Ce){return oi(Ce,$i)?null:"translate("+Ce.x+"px, "+Ce.y+"px)"},Lu={moveTo:xc,drop:function(Ce,Ie){var $e=xc(Ce);return $e?Ie?$e+" scale("+_u.scale.drop+")":$e:null}},lc=Fh.minDropTime,Jd=Fh.maxDropTime,of=Jd-lc,Ah=1500,Hf=.6,Ol=function(xe){var Ce=xe.current,Ie=xe.destination,$e=xe.reason,mt=Ti(Ce,Ie);if(mt<=0)return lc;if(mt>=Ah)return Jd;var gt=mt/Ah,Bt=lc+of*gt,Kt=$e==="CANCEL"?Bt*Hf:Bt;return Number(Kt.toFixed(2))},Oc=function(xe){var Ce=xe.impact,Ie=xe.draggable,$e=xe.dimensions,mt=xe.viewport,gt=xe.afterCritical,Bt=$e.draggables,Kt=$e.droppables,Mn=Js(Ce),Xn=Mn?Kt[Mn]:null,Zn=Kt[Ie.descriptor.droppableId],In=Jt({impact:Ce,draggable:Ie,draggables:Bt,afterCritical:gt,droppable:Xn||Zn,viewport:mt}),Bn=ln(In,Ie.client.borderBox.center);return Bn},dg=function(xe){var Ce=xe.draggables,Ie=xe.reason,$e=xe.lastImpact,mt=xe.home,gt=xe.viewport,Bt=xe.onLiftImpact;if(!$e.at||Ie!=="DROP"){var Kt=rd({draggables:Ce,impact:Bt,destination:mt,viewport:gt,forceShouldAnimate:!0});return{impact:Kt,didDropInsideDroppable:!1}}if($e.at.type==="REORDER")return{impact:$e,didDropInsideDroppable:!0};var Mn=(0,ut.Z)({},$e,{displaced:qr});return{impact:Mn,didDropInsideDroppable:!0}},pt=function(xe){var Ce=xe.getState,Ie=xe.dispatch;return function($e){return function(mt){if(mt.type!=="DROP"){$e(mt);return}var gt=Ce(),Bt=mt.payload.reason;if(gt.phase==="COLLECTING"){Ie(zf({reason:Bt}));return}if(gt.phase!=="IDLE"){var Kt=gt.phase==="DROP_PENDING"&>.isWaiting;Kt&&At(!1),gt.phase==="DRAGGING"||gt.phase==="DROP_PENDING"||At(!1);var Mn=gt.critical,Xn=gt.dimensions,Zn=Xn.draggables[gt.critical.draggable.id],In=dg({reason:Bt,lastImpact:gt.impact,afterCritical:gt.afterCritical,onLiftImpact:gt.onLiftImpact,home:gt.dimensions.droppables[gt.critical.droppable.id],viewport:gt.viewport,draggables:gt.dimensions.draggables}),Bn=In.impact,ri=In.didDropInsideDroppable,ki=ri?jr(Bn):null,Ar=ri?vo(Bn):null,Hr={index:Mn.draggable.index,droppableId:Mn.droppable.id},to={draggableId:Zn.descriptor.id,type:Zn.descriptor.type,source:Hr,reason:Bt,mode:gt.movementMode,destination:ki,combine:Ar},ho=Oc({impact:Bn,draggable:Zn,dimensions:Xn,viewport:gt.viewport,afterCritical:gt.afterCritical}),Lo={critical:gt.critical,afterCritical:gt.afterCritical,result:to,impact:Bn},bo=!oi(gt.current.client.offset,ho)||!!to.combine;if(!bo){Ie(sd({completed:Lo}));return}var Uo=Ol({current:gt.current.client.offset,destination:ho,reason:Bt}),va={newHomeClientOffset:ho,dropDuration:Uo,completed:Lo};Ie(jf(va))}}}},wt=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function tn(xe){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(Ie){Ie.target!==window&&Ie.target!==window.document||xe()}}}function an(xe){var Ce=xe.onWindowScroll;function Ie(){Ce(wt())}var $e=kt(Ie),mt=tn($e),gt=St;function Bt(){return gt!==St}function Kt(){Bt()&&At(!1),gt=qn(window,[mt])}function Mn(){Bt()||At(!1),$e.cancel(),gt(),gt=St}return{start:Kt,stop:Mn,isActive:Bt}}var zn=function(Ce){return Ce.type==="DROP_COMPLETE"||Ce.type==="DROP_ANIMATE"||Ce.type==="FLUSH"},bn=function(xe){var Ce=an({onWindowScroll:function($e){xe.dispatch(cs({newScroll:$e}))}});return function(Ie){return function($e){!Ce.isActive()&&$e.type==="INITIAL_PUBLISH"&&Ce.start(),Ce.isActive()&&zn($e)&&Ce.stop(),Ie($e)}}},si=function(xe){var Ce=!1,Ie=!1,$e=setTimeout(function(){Ie=!0}),mt=function(Bt){Ce||Ie||(Ce=!0,xe(Bt),clearTimeout($e))};return mt.wasCalled=function(){return Ce},mt},li=function(){var xe=[],Ce=function(gt){var Bt=ur(xe,function(Xn){return Xn.timerId===gt});Bt===-1&&At(!1);var Kt=xe.splice(Bt,1),Mn=Kt[0];Mn.callback()},Ie=function(gt){var Bt=setTimeout(function(){return Ce(Bt)}),Kt={timerId:Bt,callback:gt};xe.push(Kt)},$e=function(){if(xe.length){var gt=[].concat(xe);xe.length=0,gt.forEach(function(Bt){clearTimeout(Bt.timerId),Bt.callback()})}};return{add:Ie,flush:$e}},ei=function(Ce,Ie){return Ce==null&&Ie==null?!0:Ce==null||Ie==null?!1:Ce.droppableId===Ie.droppableId&&Ce.index===Ie.index},Mi=function(Ce,Ie){return Ce==null&&Ie==null?!0:Ce==null||Ie==null?!1:Ce.draggableId===Ie.draggableId&&Ce.droppableId===Ie.droppableId},Ai=function(Ce,Ie){if(Ce===Ie)return!0;var $e=Ce.draggable.id===Ie.draggable.id&&Ce.draggable.droppableId===Ie.draggable.droppableId&&Ce.draggable.type===Ie.draggable.type&&Ce.draggable.index===Ie.draggable.index,mt=Ce.droppable.id===Ie.droppable.id&&Ce.droppable.type===Ie.droppable.type;return $e&&mt},Ni=function(Ce,Ie){cu(),Ie(),Mu()},fr=function(Ce,Ie){return{draggableId:Ce.draggable.id,type:Ce.droppable.type,source:{droppableId:Ce.droppable.id,index:Ce.draggable.index},mode:Ie}},dr=function(Ce,Ie,$e,mt){if(!Ce){$e(mt(Ie));return}var gt=si($e),Bt={announce:gt};Ce(Ie,Bt),gt.wasCalled()||$e(mt(Ie))},ir=function(xe,Ce){var Ie=li(),$e=null,mt=function(Bn,ri){$e&&At(!1),Ni("onBeforeCapture",function(){var ki=xe().onBeforeCapture;if(ki){var Ar={draggableId:Bn,mode:ri};ki(Ar)}})},gt=function(Bn,ri){$e&&At(!1),Ni("onBeforeDragStart",function(){var ki=xe().onBeforeDragStart;ki&&ki(fr(Bn,ri))})},Bt=function(Bn,ri){$e&&At(!1);var ki=fr(Bn,ri);$e={mode:ri,lastCritical:Bn,lastLocation:ki.source,lastCombine:null},Ie.add(function(){Ni("onDragStart",function(){return dr(xe().onDragStart,ki,Ce,Yi.onDragStart)})})},Kt=function(Bn,ri){var ki=jr(ri),Ar=vo(ri);$e||At(!1);var Hr=!Ai(Bn,$e.lastCritical);Hr&&($e.lastCritical=Bn);var to=!ei($e.lastLocation,ki);to&&($e.lastLocation=ki);var ho=!Mi($e.lastCombine,Ar);if(ho&&($e.lastCombine=Ar),!(!Hr&&!to&&!ho)){var Lo=(0,ut.Z)({},fr(Bn,$e.mode),{combine:Ar,destination:ki});Ie.add(function(){Ni("onDragUpdate",function(){return dr(xe().onDragUpdate,Lo,Ce,Yi.onDragUpdate)})})}},Mn=function(){$e||At(!1),Ie.flush()},Xn=function(Bn){$e||At(!1),$e=null,Ni("onDragEnd",function(){return dr(xe().onDragEnd,Bn,Ce,Yi.onDragEnd)})},Zn=function(){if($e){var Bn=(0,ut.Z)({},fr($e.lastCritical,$e.mode),{combine:null,destination:null,reason:"CANCEL"});Xn(Bn)}};return{beforeCapture:mt,beforeStart:gt,start:Bt,update:Kt,flush:Mn,drop:Xn,abort:Zn}},Wr=function(xe,Ce){var Ie=ir(xe,Ce);return function($e){return function(mt){return function(gt){if(gt.type==="BEFORE_INITIAL_CAPTURE"){Ie.beforeCapture(gt.payload.draggableId,gt.payload.movementMode);return}if(gt.type==="INITIAL_PUBLISH"){var Bt=gt.payload.critical;Ie.beforeStart(Bt,gt.payload.movementMode),mt(gt),Ie.start(Bt,gt.payload.movementMode);return}if(gt.type==="DROP_COMPLETE"){var Kt=gt.payload.completed.result;Ie.flush(),mt(gt),Ie.drop(Kt);return}if(mt(gt),gt.type==="FLUSH"){Ie.abort();return}var Mn=$e.getState();Mn.phase==="DRAGGING"&&Ie.update(Mn.critical,Mn.impact)}}}},sr=function(xe){return function(Ce){return function(Ie){if(Ie.type!=="DROP_ANIMATION_FINISHED"){Ce(Ie);return}var $e=xe.getState();$e.phase!=="DROP_ANIMATING"&&At(!1),xe.dispatch(sd({completed:$e.completed}))}}},zr=function(xe){var Ce=null,Ie=null;function $e(){Ie&&(cancelAnimationFrame(Ie),Ie=null),Ce&&(Ce(),Ce=null)}return function(mt){return function(gt){if((gt.type==="FLUSH"||gt.type==="DROP_COMPLETE"||gt.type==="DROP_ANIMATION_FINISHED")&&$e(),mt(gt),gt.type==="DROP_ANIMATE"){var Bt={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var Mn=xe.getState();Mn.phase==="DROP_ANIMATING"&&xe.dispatch(Xd())}};Ie=requestAnimationFrame(function(){Ie=null,Ce=qn(window,[Bt])})}}}},Ir=function(xe){return function(){return function(Ce){return function(Ie){(Ie.type==="DROP_COMPLETE"||Ie.type==="FLUSH"||Ie.type==="DROP_ANIMATE")&&xe.stopPublishing(),Ce(Ie)}}}},eo=function(xe){var Ce=!1;return function(){return function(Ie){return function($e){if($e.type==="INITIAL_PUBLISH"){Ce=!0,xe.tryRecordFocus($e.payload.critical.draggable.id),Ie($e),xe.tryRestoreFocusRecorded();return}if(Ie($e),!!Ce){if($e.type==="FLUSH"){Ce=!1,xe.tryRestoreFocusRecorded();return}if($e.type==="DROP_COMPLETE"){Ce=!1;var mt=$e.payload.completed.result;mt.combine&&xe.tryShiftRecord(mt.draggableId,mt.combine.draggableId),xe.tryRestoreFocusRecorded()}}}}}},xo=function(Ce){return Ce.type==="DROP_COMPLETE"||Ce.type==="DROP_ANIMATE"||Ce.type==="FLUSH"},ko=function(xe){return function(Ce){return function(Ie){return function($e){if(xo($e)){xe.stop(),Ie($e);return}if($e.type==="INITIAL_PUBLISH"){Ie($e);var mt=Ce.getState();mt.phase!=="DRAGGING"&&At(!1),xe.start(mt);return}Ie($e),xe.scroll(Ce.getState())}}}},$r=function(xe){return function(Ce){return function(Ie){if(Ce(Ie),Ie.type==="PUBLISH_WHILE_DRAGGING"){var $e=xe.getState();$e.phase==="DROP_PENDING"&&($e.isWaiting||xe.dispatch(wd({reason:$e.reason})))}}}},So=Ge.qC,Xo=function(xe){var Ce=xe.dimensionMarshal,Ie=xe.focusMarshal,$e=xe.styleMarshal,mt=xe.getResponders,gt=xe.announce,Bt=xe.autoScroller;return(0,Ge.MT)(Hs,So((0,Ge.md)(sc($e),Ir(Ce),Fa(Ce),pt,sr,zr,$r,ko(Bt),bn,eo(Ie),Wr(mt,gt))))},_r=function(){return{additions:{},removals:{},modified:{}}};function co(xe){var Ce=xe.registry,Ie=xe.callbacks,$e=_r(),mt=null,gt=function(){mt||(Ie.collectionStarting(),mt=requestAnimationFrame(function(){mt=null,cu();var Zn=$e,In=Zn.additions,Bn=Zn.removals,ri=Zn.modified,ki=Object.keys(In).map(function(to){return Ce.draggable.getById(to).getDimension($i)}).sort(function(to,ho){return to.descriptor.index-ho.descriptor.index}),Ar=Object.keys(ri).map(function(to){var ho=Ce.droppable.getById(to),Lo=ho.callbacks.getScrollWhileDragging();return{droppableId:to,scroll:Lo}}),Hr={additions:ki,removals:Object.keys(Bn),modified:Ar};$e=_r(),Mu(),Ie.publish(Hr)}))},Bt=function(Zn){var In=Zn.descriptor.id;$e.additions[In]=Zn,$e.modified[Zn.descriptor.droppableId]=!0,$e.removals[In]&&delete $e.removals[In],gt()},Kt=function(Zn){var In=Zn.descriptor;$e.removals[In.id]=!0,$e.modified[In.droppableId]=!0,$e.additions[In.id]&&delete $e.additions[In.id],gt()},Mn=function(){mt&&(cancelAnimationFrame(mt),mt=null,$e=_r())};return{add:Bt,remove:Kt,stop:Mn}}var Xr=function(xe){var Ce=xe.scrollHeight,Ie=xe.scrollWidth,$e=xe.height,mt=xe.width,gt=ln({x:Ie,y:Ce},{x:mt,y:$e}),Bt={x:Math.max(0,gt.x),y:Math.max(0,gt.y)};return Bt},Cr=function(){var xe=document.documentElement;return xe||At(!1),xe},oo=function(){var xe=Cr(),Ce=Xr({scrollHeight:xe.scrollHeight,scrollWidth:xe.scrollWidth,width:xe.clientWidth,height:xe.clientHeight});return Ce},Mo=function(){var xe=wt(),Ce=oo(),Ie=xe.y,$e=xe.x,mt=Cr(),gt=mt.clientWidth,Bt=mt.clientHeight,Kt=$e+gt,Mn=Ie+Bt,Xn=bi({top:Ie,left:$e,right:Kt,bottom:Mn}),Zn={frame:Xn,scroll:{initial:xe,current:xe,max:Ce,diff:{value:$i,displacement:$i}}};return Zn},Zo=function(xe){var Ce=xe.critical,Ie=xe.scrollOptions,$e=xe.registry;cu();var mt=Mo(),gt=mt.scroll.current,Bt=Ce.droppable,Kt=$e.droppable.getAllByType(Bt.type).map(function(In){return In.callbacks.getDimensionAndWatchScroll(gt,Ie)}),Mn=$e.draggable.getAllByType(Ce.draggable.type).map(function(In){return In.getDimension(gt)}),Xn={draggables:Ii(Mn),droppables:Rr(Kt)};Mu();var Zn={dimensions:Xn,critical:Ce,viewport:mt};return Zn};function Wo(xe,Ce,Ie){if(Ie.descriptor.id===Ce.id||Ie.descriptor.type!==Ce.type)return!1;var $e=xe.droppable.getById(Ie.descriptor.droppableId);return $e.descriptor.mode==="virtual"}var Kr=function(xe,Ce){var Ie=null,$e=co({callbacks:{publish:Ce.publishWhileDragging,collectionStarting:Ce.collectionStarting},registry:xe}),mt=function(ri,ki){xe.droppable.exists(ri)||At(!1),Ie&&Ce.updateDroppableIsEnabled({id:ri,isEnabled:ki})},gt=function(ri,ki){Ie&&(xe.droppable.exists(ri)||At(!1),Ce.updateDroppableIsCombineEnabled({id:ri,isCombineEnabled:ki}))},Bt=function(ri,ki){Ie&&(xe.droppable.exists(ri)||At(!1),Ce.updateDroppableScroll({id:ri,newScroll:ki}))},Kt=function(ri,ki){Ie&&xe.droppable.getById(ri).callbacks.scroll(ki)},Mn=function(){if(Ie){$e.stop();var ri=Ie.critical.droppable;xe.droppable.getAllByType(ri.type).forEach(function(ki){return ki.callbacks.dragStopped()}),Ie.unsubscribe(),Ie=null}},Xn=function(ri){Ie||At(!1);var ki=Ie.critical.draggable;ri.type==="ADDITION"&&Wo(xe,ki,ri.value)&&$e.add(ri.value),ri.type==="REMOVAL"&&Wo(xe,ki,ri.value)&&$e.remove(ri.value)},Zn=function(ri){Ie&&At(!1);var ki=xe.draggable.getById(ri.draggableId),Ar=xe.droppable.getById(ki.descriptor.droppableId),Hr={draggable:ki.descriptor,droppable:Ar.descriptor},to=xe.subscribe(Xn);return Ie={critical:Hr,unsubscribe:to},Zo({critical:Hr,registry:xe,scrollOptions:ri.scrollOptions})},In={updateDroppableIsEnabled:mt,updateDroppableIsCombineEnabled:gt,scrollDroppable:Kt,updateDroppableScroll:Bt,startPublishing:Zn,stopPublishing:Mn};return In},Yo=function(xe,Ce){return xe.phase==="IDLE"?!0:xe.phase!=="DROP_ANIMATING"||xe.completed.result.draggableId===Ce?!1:xe.completed.result.reason==="DROP"},ia=function(xe){window.scrollBy(xe.x,xe.y)},Ta=Tn(function(xe){return tt(xe).filter(function(Ce){return!(!Ce.isEnabled||!Ce.frame)})}),pa=function(Ce,Ie){var $e=er(Ta(Ie),function(mt){return mt.frame||At(!1),Sc(mt.frame.pageMarginBox)(Ce)});return $e},ds=function(xe){var Ce=xe.center,Ie=xe.destination,$e=xe.droppables;if(Ie){var mt=$e[Ie];return mt.frame?mt:null}var gt=pa(Ce,$e);return gt},ja={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(Ce){return Math.pow(Ce,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},na=function(xe,Ce){var Ie=xe[Ce.size]*ja.startFromPercentage,$e=xe[Ce.size]*ja.maxScrollAtPercentage,mt={startScrollingFrom:Ie,maxScrollValueAt:$e};return mt},Fo=function(xe){var Ce=xe.startOfRange,Ie=xe.endOfRange,$e=xe.current,mt=Ie-Ce;if(mt===0)return 0;var gt=$e-Ce,Bt=gt/mt;return Bt},Sa=1,hs=function(xe,Ce){if(xe>Ce.startScrollingFrom)return 0;if(xe<=Ce.maxScrollValueAt)return ja.maxPixelScroll;if(xe===Ce.startScrollingFrom)return Sa;var Ie=Fo({startOfRange:Ce.maxScrollValueAt,endOfRange:Ce.startScrollingFrom,current:xe}),$e=1-Ie,mt=ja.maxPixelScroll*ja.ease($e);return Math.ceil(mt)},Qa=ja.durationDampening.accelerateAt,Ns=ja.durationDampening.stopDampeningAt,$o=function(xe,Ce){var Ie=Ce,$e=Ns,mt=Date.now(),gt=mt-Ie;if(gt>=Ns)return xe;if(gt<Qa)return Sa;var Bt=Fo({startOfRange:Qa,endOfRange:$e,current:gt}),Kt=xe*ja.ease(Bt);return Math.ceil(Kt)},Io=function(xe){var Ce=xe.distanceToEdge,Ie=xe.thresholds,$e=xe.dragStartTime,mt=xe.shouldUseTimeDampening,gt=hs(Ce,Ie);return gt===0?0:mt?Math.max($o(gt,$e),Sa):gt},Go=function(xe){var Ce=xe.container,Ie=xe.distanceToEdges,$e=xe.dragStartTime,mt=xe.axis,gt=xe.shouldUseTimeDampening,Bt=na(Ce,mt),Kt=Ie[mt.end]<Ie[mt.start];return Kt?Io({distanceToEdge:Ie[mt.end],thresholds:Bt,dragStartTime:$e,shouldUseTimeDampening:gt}):-1*Io({distanceToEdge:Ie[mt.start],thresholds:Bt,dragStartTime:$e,shouldUseTimeDampening:gt})},Co=function(xe){var Ce=xe.container,Ie=xe.subject,$e=xe.proposedScroll,mt=Ie.height>Ce.height,gt=Ie.width>Ce.width;return!gt&&!mt?$e:gt&&mt?null:{x:gt?0:$e.x,y:mt?0:$e.y}},Aa=gr(function(xe){return xe===0?0:xe}),Po=function(xe){var Ce=xe.dragStartTime,Ie=xe.container,$e=xe.subject,mt=xe.center,gt=xe.shouldUseTimeDampening,Bt={top:mt.y-Ie.top,right:Ie.right-mt.x,bottom:Ie.bottom-mt.y,left:mt.x-Ie.left},Kt=Go({container:Ie,distanceToEdges:Bt,dragStartTime:Ce,axis:fi,shouldUseTimeDampening:gt}),Mn=Go({container:Ie,distanceToEdges:Bt,dragStartTime:Ce,axis:Tr,shouldUseTimeDampening:gt}),Xn=Aa({x:Mn,y:Kt});if(oi(Xn,$i))return null;var Zn=Co({container:Ie,subject:$e,proposedScroll:Xn});return Zn?oi(Zn,$i)?null:Zn:null},Jo=gr(function(xe){return xe===0?0:xe>0?1:-1}),ga=function(){var xe=function(Ie,$e){return Ie<0?Ie:Ie>$e?Ie-$e:0};return function(Ce){var Ie=Ce.current,$e=Ce.max,mt=Ce.change,gt=Wi(Ie,mt),Bt={x:xe(gt.x,$e.x),y:xe(gt.y,$e.y)};return oi(Bt,$i)?null:Bt}}(),ma=function(Ce){var Ie=Ce.max,$e=Ce.current,mt=Ce.change,gt={x:Math.max($e.x,Ie.x),y:Math.max($e.y,Ie.y)},Bt=Jo(mt),Kt=ga({max:gt,current:$e,change:Bt});return!Kt||Bt.x!==0&&Kt.x===0||Bt.y!==0&&Kt.y===0},Us=function(Ce,Ie){return ma({current:Ce.scroll.current,max:Ce.scroll.max,change:Ie})},Zs=function(Ce,Ie){if(!Us(Ce,Ie))return null;var $e=Ce.scroll.max,mt=Ce.scroll.current;return ga({current:mt,max:$e,change:Ie})},cl=function(Ce,Ie){var $e=Ce.frame;return $e?ma({current:$e.scroll.current,max:$e.scroll.max,change:Ie}):!1},ka=function(Ce,Ie){var $e=Ce.frame;return!$e||!cl(Ce,Ie)?null:ga({current:$e.scroll.current,max:$e.scroll.max,change:Ie})},il=function(xe){var Ce=xe.viewport,Ie=xe.subject,$e=xe.center,mt=xe.dragStartTime,gt=xe.shouldUseTimeDampening,Bt=Po({dragStartTime:mt,container:Ce.frame,subject:Ie,center:$e,shouldUseTimeDampening:gt});return Bt&&Us(Ce,Bt)?Bt:null},Fs=function(xe){var Ce=xe.droppable,Ie=xe.subject,$e=xe.center,mt=xe.dragStartTime,gt=xe.shouldUseTimeDampening,Bt=Ce.frame;if(!Bt)return null;var Kt=Po({dragStartTime:mt,container:Bt.pageMarginBox,subject:Ie,center:$e,shouldUseTimeDampening:gt});return Kt&&cl(Ce,Kt)?Kt:null},Ws=function(xe){var Ce=xe.state,Ie=xe.dragStartTime,$e=xe.shouldUseTimeDampening,mt=xe.scrollWindow,gt=xe.scrollDroppable,Bt=Ce.current.page.borderBoxCenter,Kt=Ce.dimensions.draggables[Ce.critical.draggable.id],Mn=Kt.page.marginBox;if(Ce.isWindowScrollAllowed){var Xn=Ce.viewport,Zn=il({dragStartTime:Ie,viewport:Xn,subject:Mn,center:Bt,shouldUseTimeDampening:$e});if(Zn){mt(Zn);return}}var In=ds({center:Bt,destination:Js(Ce.impact),droppables:Ce.dimensions.droppables});if(In){var Bn=Fs({dragStartTime:Ie,droppable:In,subject:Mn,center:Bt,shouldUseTimeDampening:$e});Bn&>(In.descriptor.id,Bn)}},uc=function(xe){var Ce=xe.scrollWindow,Ie=xe.scrollDroppable,$e=kt(Ce),mt=kt(Ie),gt=null,Bt=function(Zn){gt||At(!1);var In=gt,Bn=In.shouldUseTimeDampening,ri=In.dragStartTime;Ws({state:Zn,scrollWindow:$e,scrollDroppable:mt,dragStartTime:ri,shouldUseTimeDampening:Bn})},Kt=function(Zn){cu(),gt&&At(!1);var In=Date.now(),Bn=!1,ri=function(){Bn=!0};Ws({state:Zn,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:ri,scrollDroppable:ri}),gt={dragStartTime:In,shouldUseTimeDampening:Bn},Mu(),Bn&&Bt(Zn)},Mn=function(){gt&&($e.cancel(),mt.cancel(),gt=null)};return{start:Kt,stop:Mn,scroll:Bt}},Ia=function(xe){var Ce=xe.move,Ie=xe.scrollDroppable,$e=xe.scrollWindow,mt=function(Xn,Zn){var In=Wi(Xn.current.client.selection,Zn);Ce({client:In})},gt=function(Xn,Zn){if(!cl(Xn,Zn))return Zn;var In=ka(Xn,Zn);if(!In)return Ie(Xn.descriptor.id,Zn),null;var Bn=ln(Zn,In);Ie(Xn.descriptor.id,Bn);var ri=ln(Zn,Bn);return ri},Bt=function(Xn,Zn,In){if(!Xn||!Us(Zn,In))return In;var Bn=Zs(Zn,In);if(!Bn)return $e(In),null;var ri=ln(In,Bn);$e(ri);var ki=ln(In,ri);return ki},Kt=function(Xn){var Zn=Xn.scrollJumpRequest;if(Zn){var In=Js(Xn.impact);In||At(!1);var Bn=gt(Xn.dimensions.droppables[In],Zn);if(Bn){var ri=Xn.viewport,ki=Bt(Xn.isWindowScrollAllowed,ri,Bn);ki&&mt(Xn,ki)}}};return Kt},$a=function(xe){var Ce=xe.scrollDroppable,Ie=xe.scrollWindow,$e=xe.move,mt=uc({scrollWindow:Ie,scrollDroppable:Ce}),gt=Ia({move:$e,scrollWindow:Ie,scrollDroppable:Ce}),Bt=function(Xn){if(Xn.phase==="DRAGGING"){if(Xn.movementMode==="FLUID"){mt.scroll(Xn);return}Xn.scrollJumpRequest&>(Xn)}},Kt={scroll:Bt,start:mt.start,stop:mt.stop};return Kt},Oa="data-rbd",qa=function(){var xe=Oa+"-drag-handle";return{base:xe,draggableId:xe+"-draggable-id",contextId:xe+"-context-id"}}(),As=function(){var xe=Oa+"-draggable";return{base:xe,contextId:xe+"-context-id",id:xe+"-id"}}(),da=function(){var xe=Oa+"-droppable";return{base:xe,contextId:xe+"-context-id",id:xe+"-id"}}(),Xa={contextId:Oa+"-scroll-container-context-id"},_s=function(Ce){return function(Ie){return"["+Ie+'="'+Ce+'"]'}},dl=function(Ce,Ie){return Ce.map(function($e){var mt=$e.styles[Ie];return mt?$e.selector+" { "+mt+" }":""}).join(" ")},hu="pointer-events: none;",Yl=function(xe){var Ce=_s(xe),Ie=function(){var Kt=`
|
|
|
cursor: -webkit-grab;
|
|
|
cursor: grab;
|
|
|
`;return{selector:Ce(qa.contextId),styles:{always:`
|
|
|
-webkit-touch-callout: none;
|
|
|
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
|
|
touch-action: manipulation;
|
|
|
`,resting:Kt,dragging:hu,dropAnimating:Kt}}}(),$e=function(){var Kt=`
|
|
|
transition: `+Il.outOfTheWay+`;
|
|
|
`;return{selector:Ce(As.contextId),styles:{dragging:Kt,dropAnimating:Kt,userCancel:Kt}}}(),mt={selector:Ce(da.contextId),styles:{always:"overflow-anchor: none;"}},gt={selector:"body",styles:{dragging:`
|
|
|
cursor: grabbing;
|
|
|
cursor: -webkit-grabbing;
|
|
|
user-select: none;
|
|
|
-webkit-user-select: none;
|
|
|
-moz-user-select: none;
|
|
|
-ms-user-select: none;
|
|
|
overflow-anchor: none;
|
|
|
`}},Bt=[$e,Ie,mt,gt];return{always:dl(Bt,"always"),resting:dl(Bt,"resting"),dragging:dl(Bt,"dragging"),dropAnimating:dl(Bt,"dropAnimating"),userCancel:dl(Bt,"userCancel")}},Ds=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?ge.useLayoutEffect:ge.useEffect,Jl=function(){var Ce=document.querySelector("head");return Ce||At(!1),Ce},Ql=function(Ce){var Ie=document.createElement("style");return Ce&&Ie.setAttribute("nonce",Ce),Ie.type="text/css",Ie};function za(xe,Ce){var Ie=dn(function(){return Yl(xe)},[xe]),$e=(0,ge.useRef)(null),mt=(0,ge.useRef)(null),gt=Pn(Tn(function(In){var Bn=mt.current;Bn||At(!1),Bn.textContent=In}),[]),Bt=Pn(function(In){var Bn=$e.current;Bn||At(!1),Bn.textContent=In},[]);Ds(function(){!$e.current&&!mt.current||At(!1);var In=Ql(Ce),Bn=Ql(Ce);return $e.current=In,mt.current=Bn,In.setAttribute(Oa+"-always",xe),Bn.setAttribute(Oa+"-dynamic",xe),Jl().appendChild(In),Jl().appendChild(Bn),Bt(Ie.always),gt(Ie.resting),function(){var ri=function(Ar){var Hr=Ar.current;Hr||At(!1),Jl().removeChild(Hr),Ar.current=null};ri($e),ri(mt)}},[Ce,Bt,gt,Ie.always,Ie.resting,xe]);var Kt=Pn(function(){return gt(Ie.dragging)},[gt,Ie.dragging]),Mn=Pn(function(In){if(In==="DROP"){gt(Ie.dropAnimating);return}gt(Ie.userCancel)},[gt,Ie.dropAnimating,Ie.userCancel]),Xn=Pn(function(){mt.current&>(Ie.resting)},[gt,Ie.resting]),Zn=dn(function(){return{dragging:Kt,dropping:Mn,resting:Xn}},[Kt,Mn,Xn]);return Zn}var rl=function(xe){return xe&&xe.ownerDocument?xe.ownerDocument.defaultView:window};function es(xe){return xe instanceof rl(xe).HTMLElement}function Ya(xe,Ce){var Ie="["+qa.contextId+'="'+xe+'"]',$e=qi(document.querySelectorAll(Ie));if(!$e.length)return null;var mt=er($e,function(gt){return gt.getAttribute(qa.draggableId)===Ce});return!mt||!es(mt)?null:mt}function fu(xe){var Ce=(0,ge.useRef)({}),Ie=(0,ge.useRef)(null),$e=(0,ge.useRef)(null),mt=(0,ge.useRef)(!1),gt=Pn(function(Bn,ri){var ki={id:Bn,focus:ri};return Ce.current[Bn]=ki,function(){var Hr=Ce.current,to=Hr[Bn];to!==ki&&delete Hr[Bn]}},[]),Bt=Pn(function(Bn){var ri=Ya(xe,Bn);ri&&ri!==document.activeElement&&ri.focus()},[xe]),Kt=Pn(function(Bn,ri){Ie.current===Bn&&(Ie.current=ri)},[]),Mn=Pn(function(){$e.current||mt.current&&($e.current=requestAnimationFrame(function(){$e.current=null;var Bn=Ie.current;Bn&&Bt(Bn)}))},[Bt]),Xn=Pn(function(Bn){Ie.current=null;var ri=document.activeElement;ri&&ri.getAttribute(qa.draggableId)===Bn&&(Ie.current=Bn)},[]);Ds(function(){return mt.current=!0,function(){mt.current=!1;var Bn=$e.current;Bn&&cancelAnimationFrame(Bn)}},[]);var Zn=dn(function(){return{register:gt,tryRecordFocus:Xn,tryRestoreFocusRecorded:Mn,tryShiftRecord:Kt}},[gt,Xn,Mn,Kt]);return Zn}function Pc(){var xe={draggables:{},droppables:{}},Ce=[];function Ie(In){return Ce.push(In),function(){var ri=Ce.indexOf(In);ri!==-1&&Ce.splice(ri,1)}}function $e(In){Ce.length&&Ce.forEach(function(Bn){return Bn(In)})}function mt(In){return xe.draggables[In]||null}function gt(In){var Bn=mt(In);return Bn||At(!1),Bn}var Bt={register:function(Bn){xe.draggables[Bn.descriptor.id]=Bn,$e({type:"ADDITION",value:Bn})},update:function(Bn,ri){var ki=xe.draggables[ri.descriptor.id];ki&&ki.uniqueId===Bn.uniqueId&&(delete xe.draggables[ri.descriptor.id],xe.draggables[Bn.descriptor.id]=Bn)},unregister:function(Bn){var ri=Bn.descriptor.id,ki=mt(ri);ki&&Bn.uniqueId===ki.uniqueId&&(delete xe.draggables[ri],$e({type:"REMOVAL",value:Bn}))},getById:gt,findById:mt,exists:function(Bn){return!!mt(Bn)},getAllByType:function(Bn){return Jr(xe.draggables).filter(function(ri){return ri.descriptor.type===Bn})}};function Kt(In){return xe.droppables[In]||null}function Mn(In){var Bn=Kt(In);return Bn||At(!1),Bn}var Xn={register:function(Bn){xe.droppables[Bn.descriptor.id]=Bn},unregister:function(Bn){var ri=Kt(Bn.descriptor.id);ri&&Bn.uniqueId===ri.uniqueId&&delete xe.droppables[Bn.descriptor.id]},getById:Mn,findById:Kt,exists:function(Bn){return!!Kt(Bn)},getAllByType:function(Bn){return Jr(xe.droppables).filter(function(ri){return ri.descriptor.type===Bn})}};function Zn(){xe.draggables={},xe.droppables={},Ce.length=0}return{draggable:Bt,droppable:Xn,subscribe:Ie,clean:Zn}}function Nu(){var xe=dn(Pc,[]);return(0,ge.useEffect)(function(){return function(){requestAnimationFrame(xe.clean)}},[xe]),xe}var Fu=ge.createContext(null),gu=function(){var xe=document.body;return xe||At(!1),xe},ql={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},Da=function(Ce){return"rbd-announcement-"+Ce};function rs(xe){var Ce=dn(function(){return Da(xe)},[xe]),Ie=(0,ge.useRef)(null);(0,ge.useEffect)(function(){var gt=document.createElement("div");return Ie.current=gt,gt.id=Ce,gt.setAttribute("aria-live","assertive"),gt.setAttribute("aria-atomic","true"),(0,ut.Z)(gt.style,ql),gu().appendChild(gt),function(){setTimeout(function(){var Mn=gu();Mn.contains(gt)&&Mn.removeChild(gt),gt===Ie.current&&(Ie.current=null)})}},[Ce]);var $e=Pn(function(mt){var gt=Ie.current;if(gt){gt.textContent=mt;return}},[]);return $e}var Bs=0,os={separator:"::"};function Ca(){Bs=0}function Ts(xe,Ce){return Ce===void 0&&(Ce=os),dn(function(){return""+xe+Ce.separator+Bs++},[Ce.separator,xe])}function Rl(xe){var Ce=xe.contextId,Ie=xe.uniqueId;return"rbd-hidden-text-"+Ce+"-"+Ie}function zu(xe){var Ce=xe.contextId,Ie=xe.text,$e=Ts("hidden-text",{separator:"-"}),mt=dn(function(){return Rl({contextId:Ce,uniqueId:$e})},[$e,Ce]);return(0,ge.useEffect)(function(){var Bt=document.createElement("div");return Bt.id=mt,Bt.textContent=Ie,Bt.style.display="none",gu().appendChild(Bt),function(){var Mn=gu();Mn.contains(Bt)&&Mn.removeChild(Bt)}},[mt,Ie]),mt}var Cd=ge.createContext(null),hn={react:"^16.8.5","react-dom":"^16.8.5"},Rc=/(\d+)\.(\d+)\.(\d+)/,Xu=function(Ce){var Ie=Rc.exec(Ce);Ie==null&&At(!1);var $e=Number(Ie[1]),mt=Number(Ie[2]),gt=Number(Ie[3]);return{major:$e,minor:mt,patch:gt,raw:Ce}},af=function(Ce,Ie){return Ie.major>Ce.major?!0:Ie.major<Ce.major?!1:Ie.minor>Ce.minor?!0:Ie.minor<Ce.minor?!1:Ie.patch>=Ce.patch},bd=function(xe,Ce){var Ie=Xu(xe),$e=Xu(Ce);af(Ie,$e)},Ed=`
|
|
|
We expect a html5 doctype: <!doctype html>
|
|
|
This is to ensure consistent browser layout and measurement
|
|
|
|
|
|
More information: https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/guides/doctype.md
|
|
|
`,Dh=function(xe){var Ce=xe.doctype;Ce&&(Ce.name.toLowerCase(),Ce.publicId)};function Qg(xe){}function Gs(xe,Ce){}function Qd(){Gs(function(){bd(hn.react,ge.version),Dh(document)},[])}function Md(xe){var Ce=(0,ge.useRef)(xe);return(0,ge.useEffect)(function(){Ce.current=xe}),Ce}function qd(){var xe=null;function Ce(){return!!xe}function Ie(Bt){return Bt===xe}function $e(Bt){xe&&At(!1);var Kt={abandon:Bt};return xe=Kt,Kt}function mt(){xe||At(!1),xe=null}function gt(){xe&&(xe.abandon(),mt())}return{isClaimed:Ce,isActive:Ie,claim:$e,release:mt,tryAbandon:gt}}var sf=9,Zf=13,eh=27,th=32,pu=33,Ld=34,lf=35,Yu=36,jc=37,Nd=38,cd=39,jl=40,dd,Bh=(dd={},dd[Zf]=!0,dd[sf]=!0,dd),eu=function(xe){Bh[xe.keyCode]&&xe.preventDefault()},wc=function(){var xe="visibilitychange";if(typeof document=="undefined")return xe;var Ce=[xe,"ms"+xe,"webkit"+xe,"moz"+xe,"o"+xe],Ie=er(Ce,function($e){return"on"+$e in document});return Ie||xe}(),nh=0,ih=5;function zc(xe,Ce){return Math.abs(Ce.x-xe.x)>=ih||Math.abs(Ce.y-xe.y)>=ih}var Cl={type:"IDLE"};function Th(xe){var Ce=xe.cancel,Ie=xe.completed,$e=xe.getPhase,mt=xe.setPhase;return[{eventName:"mousemove",fn:function(Bt){var Kt=Bt.button,Mn=Bt.clientX,Xn=Bt.clientY;if(Kt===nh){var Zn={x:Mn,y:Xn},In=$e();if(In.type==="DRAGGING"){Bt.preventDefault(),In.actions.move(Zn);return}In.type!=="PENDING"&&At(!1);var Bn=In.point;if(zc(Bn,Zn)){Bt.preventDefault();var ri=In.actions.fluidLift(Zn);mt({type:"DRAGGING",actions:ri})}}}},{eventName:"mouseup",fn:function(Bt){var Kt=$e();if(Kt.type!=="DRAGGING"){Ce();return}Bt.preventDefault(),Kt.actions.drop({shouldBlockNextClick:!0}),Ie()}},{eventName:"mousedown",fn:function(Bt){$e().type==="DRAGGING"&&Bt.preventDefault(),Ce()}},{eventName:"keydown",fn:function(Bt){var Kt=$e();if(Kt.type==="PENDING"){Ce();return}if(Bt.keyCode===eh){Bt.preventDefault(),Ce();return}eu(Bt)}},{eventName:"resize",fn:Ce},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){$e().type==="PENDING"&&Ce()}},{eventName:"webkitmouseforcedown",fn:function(Bt){var Kt=$e();if(Kt.type==="IDLE"&&At(!1),Kt.actions.shouldRespectForcePress()){Ce();return}Bt.preventDefault()}},{eventName:wc,fn:Ce}]}function $s(xe){var Ce=(0,ge.useRef)(Cl),Ie=(0,ge.useRef)(St),$e=dn(function(){return{eventName:"mousedown",fn:function(In){if(!In.defaultPrevented&&In.button===nh&&!(In.ctrlKey||In.metaKey||In.shiftKey||In.altKey)){var Bn=xe.findClosestDraggableId(In);if(Bn){var ri=xe.tryGetLock(Bn,Bt,{sourceEvent:In});if(ri){In.preventDefault();var ki={x:In.clientX,y:In.clientY};Ie.current(),Xn(ri,ki)}}}}}},[xe]),mt=dn(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(In){if(!In.defaultPrevented){var Bn=xe.findClosestDraggableId(In);if(Bn){var ri=xe.findOptionsForDraggable(Bn);ri&&(ri.shouldRespectForcePress||xe.canGetLock(Bn)&&In.preventDefault())}}}}},[xe]),gt=Pn(function(){var In={passive:!1,capture:!0};Ie.current=qn(window,[mt,$e],In)},[mt,$e]),Bt=Pn(function(){var Zn=Ce.current;Zn.type!=="IDLE"&&(Ce.current=Cl,Ie.current(),gt())},[gt]),Kt=Pn(function(){var Zn=Ce.current;Bt(),Zn.type==="DRAGGING"&&Zn.actions.cancel({shouldBlockNextClick:!0}),Zn.type==="PENDING"&&Zn.actions.abort()},[Bt]),Mn=Pn(function(){var In={capture:!0,passive:!1},Bn=Th({cancel:Kt,completed:Bt,getPhase:function(){return Ce.current},setPhase:function(ki){Ce.current=ki}});Ie.current=qn(window,Bn,In)},[Kt,Bt]),Xn=Pn(function(In,Bn){Ce.current.type!=="IDLE"&&At(!1),Ce.current={type:"PENDING",point:Bn,actions:In},Mn()},[Mn]);Ds(function(){return gt(),function(){Ie.current()}},[gt])}var xa;function ls(){}var Sl=(xa={},xa[Ld]=!0,xa[pu]=!0,xa[Yu]=!0,xa[lf]=!0,xa);function Au(xe,Ce){function Ie(){Ce(),xe.cancel()}function $e(){Ce(),xe.drop()}return[{eventName:"keydown",fn:function(gt){if(gt.keyCode===eh){gt.preventDefault(),Ie();return}if(gt.keyCode===th){gt.preventDefault(),$e();return}if(gt.keyCode===jl){gt.preventDefault(),xe.moveDown();return}if(gt.keyCode===Nd){gt.preventDefault(),xe.moveUp();return}if(gt.keyCode===cd){gt.preventDefault(),xe.moveRight();return}if(gt.keyCode===jc){gt.preventDefault(),xe.moveLeft();return}if(Sl[gt.keyCode]){gt.preventDefault();return}eu(gt)}},{eventName:"mousedown",fn:Ie},{eventName:"mouseup",fn:Ie},{eventName:"click",fn:Ie},{eventName:"touchstart",fn:Ie},{eventName:"resize",fn:Ie},{eventName:"wheel",fn:Ie,options:{passive:!0}},{eventName:wc,fn:Ie}]}function Du(xe){var Ce=(0,ge.useRef)(ls),Ie=dn(function(){return{eventName:"keydown",fn:function(gt){if(gt.defaultPrevented||gt.keyCode!==th)return;var Bt=xe.findClosestDraggableId(gt);if(!Bt)return;var Kt=xe.tryGetLock(Bt,Zn,{sourceEvent:gt});if(!Kt)return;gt.preventDefault();var Mn=!0,Xn=Kt.snapLift();Ce.current();function Zn(){Mn||At(!1),Mn=!1,Ce.current(),$e()}Ce.current=qn(window,Au(Xn,Zn),{capture:!0,passive:!1})}}},[xe]),$e=Pn(function(){var gt={passive:!1,capture:!0};Ce.current=qn(window,[Ie],gt)},[Ie]);Ds(function(){return $e(),function(){Ce.current()}},[$e])}var Fd={type:"IDLE"},Hc=120,rh=.15;function Hu(xe){var Ce=xe.cancel,Ie=xe.getPhase;return[{eventName:"orientationchange",fn:Ce},{eventName:"resize",fn:Ce},{eventName:"contextmenu",fn:function(mt){mt.preventDefault()}},{eventName:"keydown",fn:function(mt){if(Ie().type!=="DRAGGING"){Ce();return}mt.keyCode===eh&&mt.preventDefault(),Ce()}},{eventName:wc,fn:Ce}]}function Cc(xe){var Ce=xe.cancel,Ie=xe.completed,$e=xe.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(gt){var Bt=$e();if(Bt.type!=="DRAGGING"){Ce();return}Bt.hasMoved=!0;var Kt=gt.touches[0],Mn=Kt.clientX,Xn=Kt.clientY,Zn={x:Mn,y:Xn};gt.preventDefault(),Bt.actions.move(Zn)}},{eventName:"touchend",fn:function(gt){var Bt=$e();if(Bt.type!=="DRAGGING"){Ce();return}gt.preventDefault(),Bt.actions.drop({shouldBlockNextClick:!0}),Ie()}},{eventName:"touchcancel",fn:function(gt){if($e().type!=="DRAGGING"){Ce();return}gt.preventDefault(),Ce()}},{eventName:"touchforcechange",fn:function(gt){var Bt=$e();Bt.type==="IDLE"&&At(!1);var Kt=gt.touches[0];if(Kt){var Mn=Kt.force>=rh;if(Mn){var Xn=Bt.actions.shouldRespectForcePress();if(Bt.type==="PENDING"){Xn&&Ce();return}if(Xn){if(Bt.hasMoved){gt.preventDefault();return}Ce();return}gt.preventDefault()}}}},{eventName:wc,fn:Ce}]}function Wf(xe){var Ce=(0,ge.useRef)(Fd),Ie=(0,ge.useRef)(St),$e=Pn(function(){return Ce.current},[]),mt=Pn(function(ri){Ce.current=ri},[]),gt=dn(function(){return{eventName:"touchstart",fn:function(ri){if(!ri.defaultPrevented){var ki=xe.findClosestDraggableId(ri);if(ki){var Ar=xe.tryGetLock(ki,Kt,{sourceEvent:ri});if(Ar){var Hr=ri.touches[0],to=Hr.clientX,ho=Hr.clientY,Lo={x:to,y:ho};Ie.current(),In(Ar,Lo)}}}}}},[xe]),Bt=Pn(function(){var ri={capture:!0,passive:!1};Ie.current=qn(window,[gt],ri)},[gt]),Kt=Pn(function(){var Bn=Ce.current;Bn.type!=="IDLE"&&(Bn.type==="PENDING"&&clearTimeout(Bn.longPressTimerId),mt(Fd),Ie.current(),Bt())},[Bt,mt]),Mn=Pn(function(){var Bn=Ce.current;Kt(),Bn.type==="DRAGGING"&&Bn.actions.cancel({shouldBlockNextClick:!0}),Bn.type==="PENDING"&&Bn.actions.abort()},[Kt]),Xn=Pn(function(){var ri={capture:!0,passive:!1},ki={cancel:Mn,completed:Kt,getPhase:$e},Ar=qn(window,Cc(ki),ri),Hr=qn(window,Hu(ki),ri);Ie.current=function(){Ar(),Hr()}},[Mn,$e,Kt]),Zn=Pn(function(){var ri=$e();ri.type!=="PENDING"&&At(!1);var ki=ri.actions.fluidLift(ri.point);mt({type:"DRAGGING",actions:ki,hasMoved:!1})},[$e,mt]),In=Pn(function(ri,ki){$e().type!=="IDLE"&&At(!1);var Ar=setTimeout(Zn,Hc);mt({type:"PENDING",point:ki,actions:ri,longPressTimerId:Ar}),Xn()},[Xn,$e,mt,Zn]);Ds(function(){return Bt(),function(){Ie.current();var ki=$e();ki.type==="PENDING"&&(clearTimeout(ki.longPressTimerId),mt(Fd))}},[$e,Bt,mt]),Ds(function(){var ri=qn(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return ri},[])}function Gf(xe){}var $f={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Ad(xe,Ce){if(Ce==null)return!1;var Ie=!!$f[Ce.tagName.toLowerCase()];if(Ie)return!0;var $e=Ce.getAttribute("contenteditable");return $e==="true"||$e===""?!0:Ce===xe?!1:Ad(xe,Ce.parentElement)}function hg(xe,Ce){var Ie=Ce.target;return es(Ie)?Ad(xe,Ie):!1}var fg=function(xe){return bi(xe.getBoundingClientRect()).center};function gg(xe){return xe instanceof rl(xe).Element}var bc=function(){var xe="matches";if(typeof document=="undefined")return xe;var Ce=[xe,"msMatchesSelector","webkitMatchesSelector"],Ie=er(Ce,function($e){return $e in Element.prototype});return Ie||xe}();function pg(xe,Ce){return xe==null?null:xe[bc](Ce)?xe:pg(xe.parentElement,Ce)}function mg(xe,Ce){return xe.closest?xe.closest(Ce):pg(xe,Ce)}function kh(xe){return"["+qa.contextId+'="'+xe+'"]'}function oh(xe,Ce){var Ie=Ce.target;if(!gg(Ie))return null;var $e=kh(xe),mt=mg(Ie,$e);return!mt||!es(mt)?null:mt}function vg(xe,Ce){var Ie=oh(xe,Ce);return Ie?Ie.getAttribute(qa.draggableId):null}function Ec(xe,Ce){var Ie="["+As.contextId+'="'+xe+'"]',$e=qi(document.querySelectorAll(Ie)),mt=er($e,function(gt){return gt.getAttribute(As.id)===Ce});return!mt||!es(mt)?null:mt}function yg(xe){xe.preventDefault()}function ah(xe){var Ce=xe.expected,Ie=xe.phase,$e=xe.isLockActive,mt=xe.shouldWarn;return!(!$e()||Ce!==Ie)}function Sg(xe){var Ce=xe.lockAPI,Ie=xe.store,$e=xe.registry,mt=xe.draggableId;if(Ce.isClaimed())return!1;var gt=$e.draggable.findById(mt);return!(!gt||!gt.options.isEnabled||!Yo(Ie.getState(),mt))}function xg(xe){var Ce=xe.lockAPI,Ie=xe.contextId,$e=xe.store,mt=xe.registry,gt=xe.draggableId,Bt=xe.forceSensorStop,Kt=xe.sourceEvent,Mn=Sg({lockAPI:Ce,store:$e,registry:mt,draggableId:gt});if(!Mn)return null;var Xn=mt.draggable.getById(gt),Zn=Ec(Ie,Xn.descriptor.id);if(!Zn||Kt&&!Xn.options.canDragInteractiveElements&&hg(Zn,Kt))return null;var In=Ce.claim(Bt||St),Bn="PRE_DRAG";function ri(){return Xn.options.shouldRespectForcePress}function ki(){return Ce.isActive(In)}function Ar(va,Ka){ah({expected:va,phase:Bn,isLockActive:ki,shouldWarn:!0})&&$e.dispatch(Ka())}var Hr=Ar.bind(null,"DRAGGING");function to(va){function Ka(){Ce.release(),Bn="COMPLETED"}Bn!=="PRE_DRAG"&&(Ka(),Bn!=="PRE_DRAG"&&At(!1)),$e.dispatch(Ja(va.liftActionArgs)),Bn="DRAGGING";function pl(Wa,ol){if(ol===void 0&&(ol={shouldBlockNextClick:!1}),va.cleanup(),ol.shouldBlockNextClick){var nu=qn(window,[{eventName:"click",fn:yg,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(nu)}Ka(),$e.dispatch(wd({reason:Wa}))}return(0,ut.Z)({isActive:function(){return ah({expected:"DRAGGING",phase:Bn,isLockActive:ki,shouldWarn:!1})},shouldRespectForcePress:ri,drop:function(ol){return pl("DROP",ol)},cancel:function(ol){return pl("CANCEL",ol)}},va.actions)}function ho(va){var Ka=kt(function(Wa){Hr(function(){return Va({client:Wa})})}),pl=to({liftActionArgs:{id:gt,clientSelection:va,movementMode:"FLUID"},cleanup:function(){return Ka.cancel()},actions:{move:Ka}});return(0,ut.Z)({},pl,{move:Ka})}function Lo(){var va={moveUp:function(){return Hr(Na)},moveRight:function(){return Hr(Do)},moveDown:function(){return Hr(ad)},moveLeft:function(){return Hr(Rf)}};return to({liftActionArgs:{id:gt,clientSelection:fg(Zn),movementMode:"SNAP"},cleanup:St,actions:va})}function bo(){var va=ah({expected:"PRE_DRAG",phase:Bn,isLockActive:ki,shouldWarn:!0});va&&Ce.release()}var Uo={isActive:function(){return ah({expected:"PRE_DRAG",phase:Bn,isLockActive:ki,shouldWarn:!1})},shouldRespectForcePress:ri,fluidLift:ho,snapLift:Lo,abort:bo};return Uo}var Pg=[$s,Du,Wf];function Wp(xe){var Ce=xe.contextId,Ie=xe.store,$e=xe.registry,mt=xe.customSensors,gt=xe.enableDefaultSensors,Bt=[].concat(gt?Pg:[],mt||[]),Kt=(0,ge.useState)(function(){return qd()})[0],Mn=Pn(function(ho,Lo){ho.isDragging&&!Lo.isDragging&&Kt.tryAbandon()},[Kt]);Ds(function(){var ho=Ie.getState(),Lo=Ie.subscribe(function(){var bo=Ie.getState();Mn(ho,bo),ho=bo});return Lo},[Kt,Ie,Mn]),Ds(function(){return Kt.tryAbandon},[Kt.tryAbandon]);var Xn=Pn(function(to){return Sg({lockAPI:Kt,registry:$e,store:Ie,draggableId:to})},[Kt,$e,Ie]),Zn=Pn(function(to,ho,Lo){return xg({lockAPI:Kt,registry:$e,contextId:Ce,store:Ie,draggableId:to,forceSensorStop:ho,sourceEvent:Lo&&Lo.sourceEvent?Lo.sourceEvent:null})},[Ce,Kt,$e,Ie]),In=Pn(function(to){return vg(Ce,to)},[Ce]),Bn=Pn(function(to){var ho=$e.draggable.findById(to);return ho?ho.options:null},[$e.draggable]),ri=Pn(function(){Kt.isClaimed()&&(Kt.tryAbandon(),Ie.getState().phase!=="IDLE"&&Ie.dispatch(fa()))},[Kt,Ie]),ki=Pn(Kt.isClaimed,[Kt]),Ar=dn(function(){return{canGetLock:Xn,tryGetLock:Zn,findClosestDraggableId:In,findOptionsForDraggable:Bn,tryReleaseLock:ri,isLockClaimed:ki}},[Xn,Zn,In,Bn,ri,ki]);Gf(Bt);for(var Hr=0;Hr<Bt.length;Hr++)Bt[Hr](Ar)}var qg=function(Ce){return{onBeforeCapture:Ce.onBeforeCapture,onBeforeDragStart:Ce.onBeforeDragStart,onDragStart:Ce.onDragStart,onDragEnd:Ce.onDragEnd,onDragUpdate:Ce.onDragUpdate}};function Dd(xe){return xe.current||At(!1),xe.current}function Kf(xe){var Ce=xe.contextId,Ie=xe.setCallbacks,$e=xe.sensors,mt=xe.nonce,gt=xe.dragHandleUsageInstructions,Bt=(0,ge.useRef)(null);Qd();var Kt=Md(xe),Mn=Pn(function(){return qg(Kt.current)},[Kt]),Xn=rs(Ce),Zn=zu({contextId:Ce,text:gt}),In=za(Ce,mt),Bn=Pn(function(Wa){Dd(Bt).dispatch(Wa)},[]),ri=dn(function(){return(0,Ge.DE)({publishWhileDragging:nl,updateDroppableScroll:Pa,updateDroppableIsEnabled:Ll,updateDroppableIsCombineEnabled:wa,collectionStarting:od},Bn)},[Bn]),ki=Nu(),Ar=dn(function(){return Kr(ki,ri)},[ki,ri]),Hr=dn(function(){return $a((0,ut.Z)({scrollWindow:ia,scrollDroppable:Ar.scrollDroppable},(0,Ge.DE)({move:Va},Bn)))},[Ar.scrollDroppable,Bn]),to=fu(Ce),ho=dn(function(){return Xo({announce:Xn,autoScroller:Hr,dimensionMarshal:Ar,focusMarshal:to,getResponders:Mn,styleMarshal:In})},[Xn,Hr,Ar,to,Mn,In]);Bt.current=ho;var Lo=Pn(function(){var Wa=Dd(Bt),ol=Wa.getState();ol.phase!=="IDLE"&&Wa.dispatch(fa())},[]),bo=Pn(function(){var Wa=Dd(Bt).getState();return Wa.isDragging||Wa.phase==="DROP_ANIMATING"},[]),Uo=dn(function(){return{isDragging:bo,tryAbort:Lo}},[bo,Lo]);Ie(Uo);var va=Pn(function(Wa){return Yo(Dd(Bt).getState(),Wa)},[]),Ka=Pn(function(){return Eu(Dd(Bt).getState())},[]),pl=dn(function(){return{marshal:Ar,focus:to,contextId:Ce,canLift:va,isMovementAllowed:Ka,dragHandleUsageInstructionsId:Zn,registry:ki}},[Ce,Ar,Zn,to,va,Ka,ki]);return Wp({contextId:Ce,store:ho,registry:ki,customSensors:$e,enableDefaultSensors:xe.enableDefaultSensors!==!1}),(0,ge.useEffect)(function(){return Lo},[Lo]),ge.createElement(Cd.Provider,{value:pl},ge.createElement(ce,{context:Fu,store:ho},xe.children))}var uf=0;function ep(){uf=0}function Vf(){return dn(function(){return""+uf++},[])}function sh(){ep(),Ca()}function wg(xe){var Ce=Vf(),Ie=xe.dragHandleUsageInstructions||Yi.dragHandleUsageInstructions;return ge.createElement(yn,null,function($e){return ge.createElement(Kf,{nonce:xe.nonce,contextId:Ce,setCallbacks:$e,dragHandleUsageInstructions:Ie,enableDefaultSensors:xe.enableDefaultSensors,sensors:xe.sensors,onBeforeCapture:xe.onBeforeCapture,onBeforeDragStart:xe.onBeforeDragStart,onDragStart:xe.onDragStart,onDragUpdate:xe.onDragUpdate,onDragEnd:xe.onDragEnd},xe.children)})}var lh=function(Ce){return function(Ie){return Ce===Ie}},tp=lh("scroll"),Uf=lh("auto"),np=lh("visible"),Ha=function(Ce,Ie){return Ie(Ce.overflowX)||Ie(Ce.overflowY)},Ih=function(Ce,Ie){return Ie(Ce.overflowX)&&Ie(Ce.overflowY)},Bd=function(Ce){var Ie=window.getComputedStyle(Ce),$e={overflowX:Ie.overflowX,overflowY:Ie.overflowY};return Ha($e,tp)||Ha($e,Uf)},xl=function(){return!1;var Ce,Ie,$e,mt},tu=function xe(Ce){return Ce==null?null:Ce===document.body?xl()?Ce:null:Ce===document.documentElement?null:Bd(Ce)?Ce:xe(Ce.parentElement)},Oh=function(xe){if(xe)var Ce=tu(xe.parentElement)},uh=function(xe){return{x:xe.scrollLeft,y:xe.scrollTop}},Cg=function xe(Ce){if(!Ce)return!1;var Ie=window.getComputedStyle(Ce);return Ie.position==="fixed"?!0:xe(Ce.parentElement)},bg=function(xe){var Ce=tu(xe),Ie=Cg(xe);return{closestScrollable:Ce,isFixedOnPage:Ie}},Eg=function(xe){var Ce=xe.descriptor,Ie=xe.isEnabled,$e=xe.isCombineEnabled,mt=xe.isFixedOnPage,gt=xe.direction,Bt=xe.client,Kt=xe.page,Mn=xe.closest,Xn=function(){if(!Mn)return null;var ri=Mn.scrollSize,ki=Mn.client,Ar=Xr({scrollHeight:ri.scrollHeight,scrollWidth:ri.scrollWidth,height:ki.paddingBox.height,width:ki.paddingBox.width});return{pageMarginBox:Mn.page.marginBox,frameClient:ki,scrollSize:ri,shouldClipSubject:Mn.shouldClipSubject,scroll:{initial:Mn.scroll,current:Mn.scroll,max:Ar,diff:{value:$i,displacement:$i}}}}(),Zn=gt==="vertical"?fi:Tr,In=no({page:Kt,withPlaceholder:null,axis:Zn,frame:Xn}),Bn={descriptor:Ce,isCombineEnabled:$e,isFixedOnPage:mt,axis:Zn,isEnabled:Ie,client:Bt,page:Kt,frame:Xn,subject:In};return Bn},Mg=function(Ce,Ie){var $e=Ri(Ce);if(!Ie||Ce!==Ie)return $e;var mt=$e.paddingBox.top-Ie.scrollTop,gt=$e.paddingBox.left-Ie.scrollLeft,Bt=mt+Ie.scrollHeight,Kt=gt+Ie.scrollWidth,Mn={top:mt,right:Kt,bottom:Bt,left:gt},Xn=Xi(Mn,$e.border),Zn=mr({borderBox:Xn,margin:$e.margin,border:$e.border,padding:$e.padding});return Zn},Lg=function(xe){var Ce=xe.ref,Ie=xe.descriptor,$e=xe.env,mt=xe.windowScroll,gt=xe.direction,Bt=xe.isDropDisabled,Kt=xe.isCombineEnabled,Mn=xe.shouldClipSubject,Xn=$e.closestScrollable,Zn=Mg(Ce,Xn),In=Le(Zn,mt),Bn=function(){if(!Xn)return null;var ki=Ri(Xn),Ar={scrollHeight:Xn.scrollHeight,scrollWidth:Xn.scrollWidth};return{client:ki,page:Le(ki,mt),scroll:uh(Xn),scrollSize:Ar,shouldClipSubject:Mn}}(),ri=Eg({descriptor:Ie,isEnabled:!Bt,isCombineEnabled:Kt,isFixedOnPage:$e.isFixedOnPage,direction:gt,client:Zn,page:In,closest:Bn});return ri},Td={passive:!1},cf={passive:!0},hd=function(xe){return xe.shouldPublishImmediately?Td:cf};function ts(xe){var Ce=(0,ge.useContext)(xe);return Ce||At(!1),Ce}var ch=function(Ce){return Ce&&Ce.env.closestScrollable||null};function Ng(xe){var Ce=(0,ge.useRef)(null),Ie=ts(Cd),$e=Ts("droppable"),mt=Ie.registry,gt=Ie.marshal,Bt=Md(xe),Kt=dn(function(){return{id:xe.droppableId,type:xe.type,mode:xe.mode}},[xe.droppableId,xe.mode,xe.type]),Mn=(0,ge.useRef)(Kt),Xn=dn(function(){return Tn(function(bo,Uo){Ce.current||At(!1);var va={x:bo,y:Uo};gt.updateDroppableScroll(Kt.id,va)})},[Kt.id,gt]),Zn=Pn(function(){var bo=Ce.current;return!bo||!bo.env.closestScrollable?$i:uh(bo.env.closestScrollable)},[]),In=Pn(function(){var bo=Zn();Xn(bo.x,bo.y)},[Zn,Xn]),Bn=dn(function(){return kt(In)},[In]),ri=Pn(function(){var bo=Ce.current,Uo=ch(bo);bo&&Uo||At(!1);var va=bo.scrollOptions;if(va.shouldPublishImmediately){In();return}Bn()},[Bn,In]),ki=Pn(function(bo,Uo){Ce.current&&At(!1);var va=Bt.current,Ka=va.getDroppableRef();Ka||At(!1);var pl=bg(Ka),Wa={ref:Ka,descriptor:Kt,env:pl,scrollOptions:Uo};Ce.current=Wa;var ol=Lg({ref:Ka,descriptor:Kt,env:pl,windowScroll:bo,direction:va.direction,isDropDisabled:va.isDropDisabled,isCombineEnabled:va.isCombineEnabled,shouldClipSubject:!va.ignoreContainerClipping}),nu=pl.closestScrollable;return nu&&(nu.setAttribute(Xa.contextId,Ie.contextId),nu.addEventListener("scroll",ri,hd(Wa.scrollOptions))),ol},[Ie.contextId,Kt,ri,Bt]),Ar=Pn(function(){var bo=Ce.current,Uo=ch(bo);return bo&&Uo||At(!1),uh(Uo)},[]),Hr=Pn(function(){var bo=Ce.current;bo||At(!1);var Uo=ch(bo);Ce.current=null,Uo&&(Bn.cancel(),Uo.removeAttribute(Xa.contextId),Uo.removeEventListener("scroll",ri,hd(bo.scrollOptions)))},[ri,Bn]),to=Pn(function(bo){var Uo=Ce.current;Uo||At(!1);var va=ch(Uo);va||At(!1),va.scrollTop+=bo.y,va.scrollLeft+=bo.x},[]),ho=dn(function(){return{getDimensionAndWatchScroll:ki,getScrollWhileDragging:Ar,dragStopped:Hr,scroll:to}},[Hr,ki,Ar,to]),Lo=dn(function(){return{uniqueId:$e,descriptor:Kt,callbacks:ho}},[ho,Kt,$e]);Ds(function(){return Mn.current=Lo.descriptor,mt.droppable.register(Lo),function(){Ce.current&&Hr(),mt.droppable.unregister(Lo)}},[ho,Kt,Hr,Lo,gt,mt.droppable]),Ds(function(){Ce.current&>.updateDroppableIsEnabled(Mn.current.id,!xe.isDropDisabled)},[xe.isDropDisabled,gt]),Ds(function(){Ce.current&>.updateDroppableIsCombineEnabled(Mn.current.id,xe.isCombineEnabled)},[xe.isCombineEnabled,gt])}function kd(){}var dh={width:0,height:0,margin:kn},df=function(Ce){var Ie=Ce.isAnimatingOpenOnMount,$e=Ce.placeholder,mt=Ce.animate;return Ie||mt==="close"?dh:{height:$e.client.borderBox.height,width:$e.client.borderBox.width,margin:$e.client.margin}},ip=function(Ce){var Ie=Ce.isAnimatingOpenOnMount,$e=Ce.placeholder,mt=Ce.animate,gt=df({isAnimatingOpenOnMount:Ie,placeholder:$e,animate:mt});return{display:$e.display,boxSizing:"border-box",width:gt.width,height:gt.height,marginTop:gt.margin.top,marginRight:gt.margin.right,marginBottom:gt.margin.bottom,marginLeft:gt.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:mt!=="none"?Il.placeholder:null}};function hl(xe){var Ce=(0,ge.useRef)(null),Ie=Pn(function(){Ce.current&&(clearTimeout(Ce.current),Ce.current=null)},[]),$e=xe.animate,mt=xe.onTransitionEnd,gt=xe.onClose,Bt=xe.contextId,Kt=(0,ge.useState)(xe.animate==="open"),Mn=Kt[0],Xn=Kt[1];(0,ge.useEffect)(function(){return Mn?$e!=="open"?(Ie(),Xn(!1),kd):Ce.current?kd:(Ce.current=setTimeout(function(){Ce.current=null,Xn(!1)}),Ie):kd},[$e,Mn,Ie]);var Zn=Pn(function(Bn){Bn.propertyName==="height"&&(mt(),$e==="close"&>())},[$e,gt,mt]),In=ip({isAnimatingOpenOnMount:Mn,animate:xe.animate,placeholder:xe.placeholder});return ge.createElement(xe.placeholder.tagName,{style:In,"data-rbd-placeholder-context-id":Bt,onTransitionEnd:Zn,ref:xe.innerRef})}var rp=ge.memo(hl),Id=ge.createContext(null);function Zc(xe){xe&&es(xe)||At(!1)}function hh(xe){return typeof xe=="boolean"}function ie(xe,Ce){Ce.forEach(function(Ie){return Ie(xe)})}var ae=[function(Ce){var Ie=Ce.props;Ie.droppableId||At(!1),typeof Ie.droppableId!="string"&&At(!1)},function(Ce){var Ie=Ce.props;hh(Ie.isDropDisabled)||At(!1),hh(Ie.isCombineEnabled)||At(!1),hh(Ie.ignoreContainerClipping)||At(!1)},function(Ce){var Ie=Ce.getDroppableRef;Zc(Ie())}],fe=[function(Ce){var Ie=Ce.props,$e=Ce.getPlaceholderRef;if(Ie.placeholder)var mt=$e()}],de=[function(Ce){var Ie=Ce.props;Ie.renderClone||At(!1)},function(Ce){var Ie=Ce.getPlaceholderRef;Ie()&&At(!1)}];function Se(xe){Gs(function(){ie(xe,ae),xe.props.mode==="standard"&&ie(xe,fe),xe.props.mode==="virtual"&&ie(xe,de)})}var Re=function(xe){Ke(Ce,xe);function Ce(){for(var $e,mt=arguments.length,gt=new Array(mt),Bt=0;Bt<mt;Bt++)gt[Bt]=arguments[Bt];return $e=xe.call.apply(xe,[this].concat(gt))||this,$e.state={isVisible:!!$e.props.on,data:$e.props.on,animate:$e.props.shouldAnimate&&$e.props.on?"open":"none"},$e.onClose=function(){$e.state.animate==="close"&&$e.setState({isVisible:!1})},$e}Ce.getDerivedStateFromProps=function(mt,gt){return mt.shouldAnimate?mt.on?{isVisible:!0,data:mt.on,animate:"open"}:gt.isVisible?{isVisible:!0,data:gt.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!mt.on,data:mt.on,animate:"none"}};var Ie=Ce.prototype;return Ie.render=function(){if(!this.state.isVisible)return null;var mt={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(mt)},Ce}(ge.PureComponent),_e={dragging:5e3,dropAnimating:4500},ft=function(Ce,Ie){return Ie?Il.drop(Ie.duration):Ce?Il.snap:Il.fluid},lt=function(Ce,Ie){return Ce?Ie?_u.opacity.drop:_u.opacity.combining:null},Zt=function(Ce){return Ce.forceShouldAnimate!=null?Ce.forceShouldAnimate:Ce.mode==="SNAP"};function Rn(xe){var Ce=xe.dimension,Ie=Ce.client,$e=xe.offset,mt=xe.combineWith,gt=xe.dropping,Bt=!!mt,Kt=Zt(xe),Mn=!!gt,Xn=Mn?Lu.drop($e,Bt):Lu.moveTo($e),Zn={position:"fixed",top:Ie.marginBox.top,left:Ie.marginBox.left,boxSizing:"border-box",width:Ie.borderBox.width,height:Ie.borderBox.height,transition:ft(Kt,gt),transform:Xn,opacity:lt(Bt,Mn),zIndex:Mn?_e.dropAnimating:_e.dragging,pointerEvents:"none"};return Zn}function Yt(xe){return{transform:Lu.moveTo(xe.offset),transition:xe.shouldAnimateDisplacement?null:"none"}}function ci(xe){return xe.type==="DRAGGING"?Rn(xe):Yt(xe)}function ai(xe,Ce,Ie){Ie===void 0&&(Ie=$i);var $e=window.getComputedStyle(Ce),mt=Ce.getBoundingClientRect(),gt=Ei(mt,$e),Bt=Le(gt,Ie),Kt={client:gt,tagName:Ce.tagName.toLowerCase(),display:$e.display},Mn={x:gt.marginBox.width,y:gt.marginBox.height},Xn={descriptor:xe,placeholder:Kt,displaceBy:Mn,client:gt,page:Bt};return Xn}function tr(xe){var Ce=Ts("draggable"),Ie=xe.descriptor,$e=xe.registry,mt=xe.getDraggableRef,gt=xe.canDragInteractiveElements,Bt=xe.shouldRespectForcePress,Kt=xe.isEnabled,Mn=dn(function(){return{canDragInteractiveElements:gt,shouldRespectForcePress:Bt,isEnabled:Kt}},[gt,Kt,Bt]),Xn=Pn(function(ri){var ki=mt();return ki||At(!1),ai(Ie,ki,ri)},[Ie,mt]),Zn=dn(function(){return{uniqueId:Ce,descriptor:Ie,options:Mn,getDimension:Xn}},[Ie,Xn,Mn,Ce]),In=(0,ge.useRef)(Zn),Bn=(0,ge.useRef)(!0);Ds(function(){return $e.draggable.register(In.current),function(){return $e.draggable.unregister(In.current)}},[$e.draggable]),Ds(function(){if(Bn.current){Bn.current=!1;return}var ri=In.current;In.current=Zn,$e.draggable.update(Zn,ri)},[Zn,$e.draggable])}function lr(xe,Ce,Ie){Gs(function(){function $e(gt){return"Draggable[id: "+gt+"]: "}var mt=xe.draggableId;mt||At(!1),typeof mt!="string"&&At(!1),mo(xe.index)||At(!1),xe.mapped.type!=="DRAGGING"&&(Zc(Ie()),xe.isEnabled&&(Ya(Ce,mt)||At(!1)))})}function Pr(xe){}function Vr(xe){xe.preventDefault()}function yo(xe){var Ce=(0,ge.useRef)(null),Ie=Pn(function(Wa){Ce.current=Wa},[]),$e=Pn(function(){return Ce.current},[]),mt=ts(Cd),gt=mt.contextId,Bt=mt.dragHandleUsageInstructionsId,Kt=mt.registry,Mn=ts(Id),Xn=Mn.type,Zn=Mn.droppableId,In=dn(function(){return{id:xe.draggableId,index:xe.index,type:Xn,droppableId:Zn}},[xe.draggableId,xe.index,Xn,Zn]),Bn=xe.children,ri=xe.draggableId,ki=xe.isEnabled,Ar=xe.shouldRespectForcePress,Hr=xe.canDragInteractiveElements,to=xe.isClone,ho=xe.mapped,Lo=xe.dropAnimationFinished;if(lr(xe,gt,$e),Pr(to),!to){var bo=dn(function(){return{descriptor:In,registry:Kt,getDraggableRef:$e,canDragInteractiveElements:Hr,shouldRespectForcePress:Ar,isEnabled:ki}},[In,Kt,$e,Hr,Ar,ki]);tr(bo)}var Uo=dn(function(){return ki?{tabIndex:0,role:"button","aria-describedby":Bt,"data-rbd-drag-handle-draggable-id":ri,"data-rbd-drag-handle-context-id":gt,draggable:!1,onDragStart:Vr}:null},[gt,Bt,ri,ki]),va=Pn(function(Wa){ho.type==="DRAGGING"&&ho.dropping&&Wa.propertyName==="transform"&&Lo()},[Lo,ho]),Ka=dn(function(){var Wa=ci(ho),ol=ho.type==="DRAGGING"&&ho.dropping?va:null,nu={innerRef:Ie,draggableProps:{"data-rbd-draggable-context-id":gt,"data-rbd-draggable-id":ri,style:Wa,onTransitionEnd:ol},dragHandleProps:Uo};return nu},[gt,Uo,ri,ho,va,Ie]),pl=dn(function(){return{draggableId:In.id,type:In.type,source:{index:In.index,droppableId:In.droppableId}}},[In.droppableId,In.id,In.index,In.type]);return Bn(Ka,ho.snapshot,pl)}var ao=function(xe,Ce){return xe===Ce},Eo=function(xe){var Ce=xe.combine,Ie=xe.destination;return Ie?Ie.droppableId:Ce?Ce.droppableId:null},Qo=function(Ce){return Ce.combine?Ce.combine.draggableId:null},so=function(Ce){return Ce.at&&Ce.at.type==="COMBINE"?Ce.at.combine.draggableId:null};function ha(){var xe=Tn(function(mt,gt){return{x:mt,y:gt}}),Ce=Tn(function(mt,gt,Bt,Kt,Mn){return{isDragging:!0,isClone:gt,isDropAnimating:!!Mn,dropAnimation:Mn,mode:mt,draggingOver:Bt,combineWith:Kt,combineTargetFor:null}}),Ie=Tn(function(mt,gt,Bt,Kt,Mn,Xn,Zn){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:Mn,combineWith:Xn,mode:gt,offset:mt,dimension:Bt,forceShouldAnimate:Zn,snapshot:Ce(gt,Kt,Mn,Xn,null)}}}),$e=function(gt,Bt){if(gt.isDragging){if(gt.critical.draggable.id!==Bt.draggableId)return null;var Kt=gt.current.client.offset,Mn=gt.dimensions.draggables[Bt.draggableId],Xn=Js(gt.impact),Zn=so(gt.impact),In=gt.forceShouldAnimate;return Ie(xe(Kt.x,Kt.y),gt.movementMode,Mn,Bt.isClone,Xn,Zn,In)}if(gt.phase==="DROP_ANIMATING"){var Bn=gt.completed;if(Bn.result.draggableId!==Bt.draggableId)return null;var ri=Bt.isClone,ki=gt.dimensions.draggables[Bt.draggableId],Ar=Bn.result,Hr=Ar.mode,to=Eo(Ar),ho=Qo(Ar),Lo=gt.dropDuration,bo={duration:Lo,curve:Yd.drop,moveTo:gt.newHomeClientOffset,opacity:ho?_u.opacity.drop:null,scale:ho?_u.scale.drop:null};return{mapped:{type:"DRAGGING",offset:gt.newHomeClientOffset,dimension:ki,dropping:bo,draggingOver:to,combineWith:ho,mode:Hr,forceShouldAnimate:null,snapshot:Ce(Hr,ri,to,ho,bo)}}}return null};return $e}function ws(xe){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:xe,combineWith:null}}var Pl={mapped:{type:"SECONDARY",offset:$i,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:ws(null)}};function ks(){var xe=Tn(function(Bt,Kt){return{x:Bt,y:Kt}}),Ce=Tn(ws),Ie=Tn(function(Bt,Kt,Mn){return Kt===void 0&&(Kt=null),{mapped:{type:"SECONDARY",offset:Bt,combineTargetFor:Kt,shouldAnimateDisplacement:Mn,snapshot:Ce(Kt)}}}),$e=function(Kt){return Kt?Ie($i,Kt,!0):null},mt=function(Kt,Mn,Xn,Zn){var In=Xn.displaced.visible[Kt],Bn=!!(Zn.inVirtualList&&Zn.effected[Kt]),ri=vo(Xn),ki=ri&&ri.draggableId===Kt?Mn:null;if(!In){if(!Bn)return $e(ki);if(Xn.displaced.invisible[Kt])return null;var Ar=Bi(Zn.displacedBy.point),Hr=xe(Ar.x,Ar.y);return Ie(Hr,ki,!0)}if(Bn)return $e(ki);var to=Xn.displacedBy.point,ho=xe(to.x,to.y);return Ie(ho,ki,In.shouldAnimate)},gt=function(Kt,Mn){if(Kt.isDragging)return Kt.critical.draggable.id===Mn.draggableId?null:mt(Mn.draggableId,Kt.critical.draggable.id,Kt.impact,Kt.afterCritical);if(Kt.phase==="DROP_ANIMATING"){var Xn=Kt.completed;return Xn.result.draggableId===Mn.draggableId?null:mt(Mn.draggableId,Xn.result.draggableId,Xn.impact,Xn.afterCritical)}return null};return gt}var mu=function(){var Ce=ha(),Ie=ks(),$e=function(gt,Bt){return Ce(gt,Bt)||Ie(gt,Bt)||Pl};return $e},zl={dropAnimationFinished:Xd},fl=et(mu,zl,null,{context:Fu,pure:!0,areStatePropsEqual:ao})(yo);function vu(xe){var Ce=ts(Id),Ie=Ce.isUsingCloneFor;return Ie===xe.draggableId&&!xe.isClone?null:ge.createElement(fl,xe)}function Nl(xe){var Ce=typeof xe.isDragDisabled=="boolean"?!xe.isDragDisabled:!0,Ie=!!xe.disableInteractiveElementBlocking,$e=!!xe.shouldRespectForcePress;return ge.createElement(vu,(0,ut.Z)({},xe,{isClone:!1,isEnabled:Ce,canDragInteractiveElements:Ie,shouldRespectForcePress:$e}))}function gl(xe){var Ce=(0,ge.useContext)(Cd);Ce||At(!1);var Ie=Ce.contextId,$e=Ce.isMovementAllowed,mt=(0,ge.useRef)(null),gt=(0,ge.useRef)(null),Bt=xe.children,Kt=xe.droppableId,Mn=xe.type,Xn=xe.mode,Zn=xe.direction,In=xe.ignoreContainerClipping,Bn=xe.isDropDisabled,ri=xe.isCombineEnabled,ki=xe.snapshot,Ar=xe.useClone,Hr=xe.updateViewportMaxScroll,to=xe.getContainerForClone,ho=Pn(function(){return mt.current},[]),Lo=Pn(function(yu){mt.current=yu},[]),bo=Pn(function(){return gt.current},[]),Uo=Pn(function(yu){gt.current=yu},[]);Se({props:xe,getDroppableRef:ho,getPlaceholderRef:bo});var va=Pn(function(){$e()&&Hr({maxScroll:oo()})},[$e,Hr]);Ng({droppableId:Kt,type:Mn,mode:Xn,direction:Zn,isDropDisabled:Bn,isCombineEnabled:ri,ignoreContainerClipping:In,getDroppableRef:ho});var Ka=ge.createElement(Re,{on:xe.placeholder,shouldAnimate:xe.shouldAnimatePlaceholder},function(yu){var Wc=yu.onClose,Ju=yu.data,Wu=yu.animate;return ge.createElement(rp,{placeholder:Ju,onClose:Wc,innerRef:Uo,animate:Wu,contextId:Ie,onTransitionEnd:va})}),pl=dn(function(){return{innerRef:Lo,placeholder:Ka,droppableProps:{"data-rbd-droppable-id":Kt,"data-rbd-droppable-context-id":Ie}}},[Ie,Kt,Ka,Lo]),Wa=Ar?Ar.dragging.draggableId:null,ol=dn(function(){return{droppableId:Kt,type:Mn,isUsingCloneFor:Wa}},[Kt,Wa,Mn]);function nu(){if(!Ar)return null;var yu=Ar.dragging,Wc=Ar.render,Ju=ge.createElement(vu,{draggableId:yu.draggableId,index:yu.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(Wu,Al){return Wc(Wu,Al,yu)});return On.createPortal(Ju,to())}return ge.createElement(Id.Provider,{value:ol},Bt(pl,ki),nu())}var Za=function(Ce,Ie){return Ce===Ie.droppable.type},Is=function(Ce,Ie){return Ie.draggables[Ce.draggable.id]},bl=function(){var Ce={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},Ie=(0,ut.Z)({},Ce,{shouldAnimatePlaceholder:!1}),$e=Tn(function(Bt){return{draggableId:Bt.id,type:Bt.type,source:{index:Bt.index,droppableId:Bt.droppableId}}}),mt=Tn(function(Bt,Kt,Mn,Xn,Zn,In){var Bn=Zn.descriptor.id,ri=Zn.descriptor.droppableId===Bt;if(ri){var ki=In?{render:In,dragging:$e(Zn.descriptor)}:null,Ar={isDraggingOver:Mn,draggingOverWith:Mn?Bn:null,draggingFromThisWith:Bn,isUsingPlaceholder:!0};return{placeholder:Zn.placeholder,shouldAnimatePlaceholder:!1,snapshot:Ar,useClone:ki}}if(!Kt)return Ie;if(!Xn)return Ce;var Hr={isDraggingOver:Mn,draggingOverWith:Bn,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:Zn.placeholder,shouldAnimatePlaceholder:!0,snapshot:Hr,useClone:null}}),gt=function(Kt,Mn){var Xn=Mn.droppableId,Zn=Mn.type,In=!Mn.isDropDisabled,Bn=Mn.renderClone;if(Kt.isDragging){var ri=Kt.critical;if(!Za(Zn,ri))return Ie;var ki=Is(ri,Kt.dimensions),Ar=Js(Kt.impact)===Xn;return mt(Xn,In,Ar,Ar,ki,Bn)}if(Kt.phase==="DROP_ANIMATING"){var Hr=Kt.completed;if(!Za(Zn,Hr.critical))return Ie;var to=Is(Hr.critical,Kt.dimensions);return mt(Xn,In,Eo(Hr.result)===Xn,Js(Hr.impact)===Xn,to,Bn)}if(Kt.phase==="IDLE"&&Kt.completed&&!Kt.shouldFlush){var ho=Kt.completed;if(!Za(Zn,ho.critical))return Ie;var Lo=Js(ho.impact)===Xn,bo=!!(ho.impact.at&&ho.impact.at.type==="COMBINE"),Uo=ho.critical.droppable.id===Xn;return Lo?bo?Ce:Ie:Uo?Ce:Ie}return Ie};return gt},Fl={updateViewportMaxScroll:Ps};function cc(){return document.body||At(!1),document.body}var Os={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:cc},Zu=et(bl,Fl,null,{context:Fu,pure:!0,areStatePropsEqual:ao})(gl);Zu.defaultProps=Os},38486:function(Vn,xn){"use strict";var pe;var ge=60103,Oe=60106,Ke=60107,ut=60108,Ge=60114,Xe=60109,Ne=60110,Tt=60112,Ct=60113,Ve=60120,Lt=60115,dt=60116,Rt=60121,De=60122,ne=60117,ee=60129,ce=60131;if(typeof Symbol=="function"&&Symbol.for){var se=Symbol.for;ge=se("react.element"),Oe=se("react.portal"),Ke=se("react.fragment"),ut=se("react.strict_mode"),Ge=se("react.profiler"),Xe=se("react.provider"),Ne=se("react.context"),Tt=se("react.forward_ref"),Ct=se("react.suspense"),Ve=se("react.suspense_list"),Lt=se("react.memo"),dt=se("react.lazy"),Rt=se("react.block"),De=se("react.server.block"),ne=se("react.fundamental"),ee=se("react.debug_trace_mode"),ce=se("react.legacy_hidden")}function he(Et){if(typeof Et=="object"&&Et!==null){var it=Et.$$typeof;switch(it){case ge:switch(Et=Et.type,Et){case Ke:case Ge:case ut:case Ct:case Ve:return Et;default:switch(Et=Et&&Et.$$typeof,Et){case Ne:case Tt:case dt:case Lt:case Xe:return Et;default:return it}}case Oe:return it}}}var ve=Xe,be=ge,ke=Tt,Be=Ke,He=dt,We=Lt,rt=Oe,Qe=Ge,Pt=ut,Ze=Ct;pe=Ne,pe=ve,pe=be,pe=ke,pe=Be,pe=He,pe=We,pe=rt,pe=Qe,pe=Pt,pe=Ze,pe=function(){return!1},pe=function(){return!1},xn.isContextConsumer=function(Et){return he(Et)===Ne},pe=function(Et){return he(Et)===Xe},pe=function(Et){return typeof Et=="object"&&Et!==null&&Et.$$typeof===ge},pe=function(Et){return he(Et)===Tt},pe=function(Et){return he(Et)===Ke},pe=function(Et){return he(Et)===dt},pe=function(Et){return he(Et)===Lt},pe=function(Et){return he(Et)===Oe},pe=function(Et){return he(Et)===Ge},pe=function(Et){return he(Et)===ut},pe=function(Et){return he(Et)===Ct},pe=function(Et){return typeof Et=="string"||typeof Et=="function"||Et===Ke||Et===Ge||Et===ee||Et===ut||Et===Ct||Et===Ve||Et===ce||typeof Et=="object"&&Et!==null&&(Et.$$typeof===dt||Et.$$typeof===Lt||Et.$$typeof===Xe||Et.$$typeof===Ne||Et.$$typeof===Tt||Et.$$typeof===ne||Et.$$typeof===Rt||Et[0]===De)},pe=he},53410:function(Vn,xn,pe){"use strict";Vn.exports=pe(38486)},32637:function(Vn,xn,pe){"use strict";Vn.exports=pe.p+"static/AssistantCode3.a8740efb.jpeg"},93314:function(Vn){"use strict";Vn.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=="},73631:function(Vn){"use strict";Vn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAZxJREFUOBGtlL1Ow0AMgH2XUIkOLFXVASgTsDHxBIAEzAwMPBQjT8AATGVBgEBCYmHmFcICYmBogCbNYSe52HUTVZWwFJ3PP599Z+WMcy6Af5SwYkWnLYifTyBzq5XNK8YNwbbvYP381ZuaVlN1+HJwAc4d1QYaA+gDsHYANrhGHTdCMtSDMILtwSMDn7ZiANPKwyjeQ0Reo4r1gEoEwRkDb7spdPcBeocMk1Cv00oii5L+fgPwcR/zHfb3AJY2sEpUVLOUhB/l+w7I1iS9TYDFrM3AzhqGDstPZ3li2Z12U2WLvk4fGJh+F0elYN8ZrbWiA7igAP4WR6sFzDAKPgPHP0VnlMsFS5IyyIGoeAamCKybYI5UQLWVE2fgGI/s72wqQXRd9jyxiHgGJtihFxGQm8Qd5XvtF3fEQOrQH9mDm1Z9hyJuEphXIq9uSWSQqv8a4RbAUTFdcs7gifwplYGjT3wzbPFz6Q70EZv8WZoxMP66ApMc86inirNBA8njcFIuvOTXhowPyzuQJiukzi3hQgS7b+I9nJtQn/AHsLGsvlcPPWsAAAAASUVORK5CYII="},5623:function(Vn){"use strict";Vn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAedJREFUOBGtVDtLA0EQ/jY5z7dgEBVJLHyAitpYWQqKjVZa5BfEKpWlWPgrLG0UEdTexkILRUQiSBBBCAhGUINFHia53Dm7ufXcvfgIOHA3O69vvtnbPeY4ThD/KIF/xBJQhg/wbmkZtj0KMKbEGNIweg4xuPmq+DWDKSOfz2/AqaxpOVWzip8HC2xTsydfjoMHhMd2VMDjkSswTPqSucOhh3PmupaIediBOnL52UTLENC7QCV1bC9vkjkF3i4WVUDeORIF2sf5ymOk7mY1pr87hoHEhekHDLYQOfck8c6c6OeYfPHN3LyOxEB2KwQru0LrBvTPdaGRipj7ISUzqUWJ/moiRyc1tUXAQP42Tsa6sEIRCtwDRXqESDYS8RuG5iyRMEWFAat4CbvsAmgFmukmeYofJYeSAimab0L4DfQNHiF1laFAyMv840o2zN3Q1FMuIOIWStF9OtAxH4xkIC8NZyN9SnIOsNISkLRd3EWlFBP0lQJtDzVTyc8mBKB3U65nUnBYmDaFAr98BFGqvYKtwOMZHRsp1vsedVxV8bQRJXu5BbKWa6sAmK1lj2FiOoLcS5LYNX/N+3ktp+GapFJMeoDccdI9gEJ2nW5HhJjKuXmktih7yjJoC8VVwNpldXnr+KX8DfcD09mnwzz7SXEAAAAASUVORK5CYII="},96908:function(Vn){"use strict";Vn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKQAAAA8CAYAAADogBFvAAAAAXNSR0IArs4c6QAADzxJREFUeF7tnQl4VcUVx3/3JSEBARFEFllcQAMJuKDUD7FqtVbFtUqtS6ufS1soxaW1Si0KBaFVWy2ittqqdQ9xpYq4tLgVFWUThYQlJIEkkJXs63u333lzL+/mrfeF9/KSeM/35Xv3zZw5c+bM/83MOTN3ouGQY4EuZAGtC+niqOJYAAeQDgi6lAU0fUayHqCR5gJXEriS/T6TICkZNOMzIN/gFx7/8vvLiFxDtpfP4G2Xb5Ej6SaPKddav6mPtb5g9e/PF9nSvmTVlpD1S36Sr63WOj1ukD/d+PR+b1NpAekmj5Gve8Dd5lc2ivK4G2lzV4K7Eo/8eSrQ3ZW424rw6J/ST1utTb2jtkuhLAplwgDS7BDj09txdgFqgsjCbwVOKMCYAPH+IAzABIDf8qPYz+OygMus0+8HFQDmYDpaypj1mp+m/qKbgMoKQO+zxwIyCzhNPhOIQQFrAas/uK3l5dlt/SEY9bbn0ZsrS1obynfXNJQXFTeUbPugua5utQZrM7PZHgU2EsIaHJAJUcWp1JYFklKgVx/fX0oqpPSBgw6BASOh/xAlxgC+u6WJqh0bqdi2nrb66gI0sjQXL2W8xHpb9XUykwPITjZ43KuTpcnBw2HA4TBwFBw81Dt66+42aoq2U7FjAw0Ve8R52KxpLB6v86KWjTvuetmswAGkTUN1W7aDBsHIieiHjkVDlhpuavbkU7ThE9wtjQLMbTosyFzGc5pGoD/RyQ13ANnJBk9YdSm9YVg6+tB0NC2ZtqZ6dn/1P+rKirwqaRqrknVuSM9mZ8J0FD2CetmJ1MipO74WkPXn0VOg72CvY1ZRuJU9uRvQPW4ZLes0jdszlvG3+CoRWroDyERZPtH1Dk1HH56B5vHQWFvJzrUf42lrUaMlPJ4BMxOxtnQAmWhgJLL+3gPQR5+E1qsPDdXl5G9YjUdipIreGpzGFUOfpb4zVXQA2ZnW7op1paSiH30qWlIqdVWlFGz6Al1ipmqkXH0wnD0ym8bOUt0BZGdZuivXk9IH/ajJaK4Uasr3UJizUQX/Fb2WOZ7LtfniosefHEDG38bdo4bUvuijJqG5XFQU5VOSv22/3hr8NTObWzqjIQ4gO8PK3aWO3v3RR57gHR13blpHQ121FZTTM7N5Od5NcQAZbwt3N/mDjvDu8jQ11rHj6/XoskevqKxXMuOPfZHyeDbJAWQ8rdsdZct2zYjj0VJS2bu7gLLiXdZRMiszmx/Hs1kOIONp3e4qO60/+rBx6O5WdmzeRHOTz8lO0pg2fhkr4tU0B5Dxsmx3lytTd99B1FZVUZC31dqanMzxTNDmsz9gGcumOoCMpTV7kixXEvrwCV4HZ1vuZlqamqytu2VCNn+NR3MdQMbDqj1Epj5wBFqfgVSU7qWkWB3CENKgEhibme39jCklBpCysf/H3aohrY1w64CYNqrLCJOziRJg1hN+qqtjJklJQx88xrudmJuzBY+cVveBcmlmNr/qmODQpRIHyPuKlVYtjXBL/1i3K7HyDh4Gp94IU2+Ee0+A+pgPJJ3WPn3QEWgpvSkpKaaiosJabxsuJk7IYksslXEAGUtrmrIW5sHAkerb7UO6NSBJ6wcDhnvXkFu354HlDK8GKzOzOS+WJnQAGUtrmrIW5atXCHoCIDXwDDwSlyuJvIICGhran7OIdRjIAaQDyIgW0PsNRkvtR2l5OaXlAcuPmIaBuh4gp1wP/QYrI338ODRUBRpM0+Cc36p0OVT6nwd9PIcdAydcqr7nroL8NXDi5TBmKoyepPgL16n0dS+3dzgGjoaTjY0If7n+Wow+GdK/p1Jr9sC+Ihg1SX0X3Xob6+K3F0FLg0r/egUUbWovSRy8SdNh5PEw4jho2Ae71sOuDbDhVaWvP1nbWLIZvvo3TLwQvjtDvdQlaf+eB2Uxeuu1V2/oP4yGhnryCn3etqmWS+PmjGUsiYhsGwxdD5C/WwsjJirV7xkX3KjyPvZSY+poqoXbBvqaetzF8HPjDMAbc2HIWDjlp8FNsfldePIaH+iTU2FxIRxkyHvgu5D3afCyM5dDprF8emuBN4jM6TPDm/zZG+HTf/l4xpwG1z/nXaMFpYIv4fHpUGVEJEwmaxu/eBFyP4Br/t5exMPnwZb3bUDADouGPmiU9+3FnLxC3BZvW0rHMgzUswEpI5O8Q9LaDAVroHgzDE2H0SdB6kGqJyryYdFJ0GicbLnsfjjLOGn1yT/ghRmBPSajmgBXLg+Qwwd3j4WzboXTDV4J95jkPZxghH2e+xl89ozKEVDdlKVu8RAq/lqNikm91Eg++GiVXlsGD52tRr1ggCz+BgaPAXk/20oxBSTo/YagJfdiV8lequuMEd9SnwYxCQP1bECKwerK4ZELQUYbk2RbbNZbMOQYlbJyMSy/Wz3LdDjvG/XcWAN3Hg6t7XYp4IxZ8CNjmSCj7NJp7cEQyamRH8m8zT7H54WZ8MkTPhlyO4ZM+xcvUGkb3oDHLw8OSDP1m3fgw0ehtlSBWUb2ysL2eh3It7T+iMddVV1LUVnQMFZMwkA9H5CPXQqb3gzsChlVBBSyHm2uh7ljFHiFbn4Pjj1DPT/1U5Bp0Uq/XQ1HnKxSnrgC1r8aHSAvnAfn3aXKfPYsPHN9cKiYywIJrC+a5Ft/WqfsSDIOBITWsnJjRr/DaG1pIbewJKjUWISBejYgZTqeOzZ0l9zyPhxzusp/7BLY9JZ6FifjhhfUc85/YckPfDKsI6iMRnNGq3t+rBRphJyzBuQgrNBD34etHwTXcfLVcN3TKu/d++H136lnKyDlx3TXkcGdv1iB0ZTT7zDv0/aiMppaWoNKP9AwUM8G5Fdvwt8MjzuY+ab/Bc40dr+yfw2rDEdRRgMBlXSArAFl9KwyzgVaR7f3HoDX5gRKjgTIh6rV2lZow+uBSwJTojhX489R32QUltHYH5A7P4P7T4s19ILLk2k7JY3SqhpK99WFqvOAwkA9G5Af/R1emhW6s865HS5ZpPJXLYXsW328Fy+EH9yhvi+/B1YafH/YCoceqdLnZUBpu6NZKj0cICVgLvnRkoSCFk8OBOSXy+DJq6OV1jH+5F6Q1p/G5mZ2lAQJxxlSDyQMFHtATpgGR56iVNvyHmz7KLDxstcrXqpQUx3cdoiPJ5ZhnzUvwNPXhjb+tLth2lyV/86f4I3f+3jF8Zmfq+6SLNsB96TDUVPgNx8qHmnXg2cFlx0OkDIyPrhPrV2FJNbqe8MvtK4S3go2Zcv6Vta5nUGicp9B3vuBcooraXMHfxHxQMJAsQfkRQvg3DuVeazeq9Vgo06EOz9XKXu3wvwMX651fbXgeCgxPF5reQlgLzSCvuHikOJpSiwxFF3zBEy5TuU+exN8aqzXTP5fvgkZxvrxz2fC5CvhtJ+p3KevgzXPRw9IKWHd6w41yoYDmH8csrMAKTql9vWGqoqr6qisaw6pZUfDQLEH5Hd+Atc+qRRdmw3/vCpQaStPzn9gybk+nl+8BhMvUN+XXgCb3wksf+1T8J1rVHo4QMoux7xxwcMfElwXUJt7zg+cDnmr29clux+/MDxoGW0zzlVBc9lNmTMy9Nov0hpy1goY/31Vl3/Ix6rB8ZfACT9UKRJe+vw59ZxIQMq0nZJGbUMzBRVhL7XoUBgo9oCUoPMdxu6GBKQXTIByy4VaKWnwm4/VVpnQf5fAy7/2dcP0B+FMY90XbMo9fCLM+UJNpZEAKflfZqndGH8SZ0acGiEJSC82wjhWPokH3pvnA62ZJ/G+rJsDZZop1nWmePni7VvpuIvg56+oFNlynJ8JzX5OgswCd63zbUH+5Xuw/ePEA1KWGvIOt9vNlr21eDyhz3p2JAwUe0CKyWavhHRjfVVXoUAni38x8ik/geHGFC33yMgIZu2wcWfDr972dZ/slnz+PNTuhaNPhUvuVd6vSeFGSPGQBbjrXoH3/gxl22BIOpz0I593LXIevQi+ttRpBc/5c+ECI2hupt8rMcGvQgPSGk6SsFHO+2rPXLxyk2a8DrLeFirdrtaHEryXy0ZlmTD5Kt9uzTcrVXDfpESOkKKD7G3rOruqmqhuCv9qjcvF+RlZhDBuoAnjA0iJ1ckoaR4wCNV1794HrxsBYivPze/CsWcGLyUgWz5XAVMoHCAFiEInXhZcloBkxQKQvehQJFP6wh2+Lb78L+C+KaH5JUeWE7Ks8KdZaeqqZaFDRsCMN3z79qEk7t4IMjo21XQdQLpSvP8QoKaxlcJ9odeRorCmsSVjHBPtvhQWH0CKJtKRVz3mO4BgNXhFgQrHyC8/GMmhUNlTPvWG9rnVJarcphX2DleIByrOxxVL1Mhsxv5EqkyVWbNh4/Lw4JLc2e/4TvbI3raM2pFo6k1wxkwYPNa3z2wFpJSXeOf5v1d751bdJE/WqfJDkeWBf+A90SOkTNtJvdA9bWwpa8ET4RWNaMJA8QOk2WF9DlEHGmS6FhDszVX7rXao76EwdJy6yF2OjJXLieUIFKqzpPMlHCWjdsFadWTMDglQFhVAnwFqi/HOEYHrPTtywvFIBx96FAzPVODbk6PW3XbCQQdad0fLiz11D7urW9nXHP4eqmjCQPEHZEcb3NFysR49JMxz5SNKm9VPgZzYcQjE4ZOzKy1u8qtt3Jmv8fCEZcyOZDoHkJEsNHcjDBuvuO6bCvlG/DRSuW9Dvly74tHZUumOOG3LUWo7L4U5gAwHHHGsxMESkvOKC40DEd8GsEXRxqI6D1VNka+P1ODtzGzOD7t66XGX3sdyypaguATHhbJvg1UPR9FN3x7WxjbYsc/ezSqRwkA9b4QclqE8aiEJeH/5UseQITs5F81X/+tQSPa6g73f0zHpPaqUhMa3VrppDRMkNxscKQzU8wDZo7q6+zSmtFGntN6GcwOECwM5gOw+fd6lNW31QG6lADLytTHhwkAOILt0N3cv5XZWe6gXZNqhEGEgB5B2jOfw2LLAvmad3bX2pu1QYSAHkLZM7TDZsYD4NDn2YpJeccHCQA4g7Vja4bFtgeJ6D5WNNqdtcXD8TgM5gLRtaofRjgWa3LC9yl5M0jtK+p0GcgBpx8oOT1QWyKt209Aa2ds2hbpczM7Iwrvr4AAyKlM7zHYsEKVz0+5uIAeQdizs8Ni2gIyL8icxSbeNnZv9go0wkANI26Z2GKOxwJ56D+VRODdmGMgBZDRWdnhtW6C6WWeX/Zjk/jDQ/wHkSLPJ/mcrgQAAAABJRU5ErkJggg=="},57177:function(Vn){"use strict";Vn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANQAAAA8CAYAAAAeyZT3AAAAAXNSR0IArs4c6QAAEpJJREFUeF7tXQeYFdUV/mcbS1F6UUEsoLC7IGKNJWpERbEgSoxGo7HEQFDRWCAGgdASNBbEhglqsC1rAxVBNGg0qNgLsJRddmFhe3vby3uT7393ZmfeezOv7M57W3LP9/EtM3Pn3DPn3n/uvf85c58CKdID0gOOeUBxTJNUJD0gPQAJKNkJpAcc9EALoNRpCaqt3rh4QIkDvH/jxV/zuZZjrVy8uRzvSzDdrx3HxWnnEnz1eevhOf/79HpNdrAs6wrQr9VvtiMc+/kc0HSan9Nrq8Uzt9hquuZjv8kPev26r8x16X5VPYDHDYT7Vy/L8vo94d7P8u5mcV+w+1U34GEZ7a+5Tg/vV31tbrmu36ff23JcB9VdBo9a5v2rekq14/1wN30GNXGzctPKKgf7eExVKUGBpJsSEkgWYPMHXEuH0sHlB5iW8jrAtE6sd9AW8GidVD9mR/fvxDrAzJ3Yp/ObAGL3srC1XweJnf0awHUQWgGJ52i3P+D9OyOP/QHSAjYT8Lwd3gRGH3Bp5dza34D7LUDsD04vmPzuN9cZGkSAF3xm4JttNoFWdasNlRVNta4SV21l6YHakvyPGurrNivA12kZ2B1TdLSisvAA1QrF8hbpAUsP8EWVkAwkdgMSugHxiUB8EpDcC+g1AOjeG+BciSBWPXA3NaA8Pxel+7LRXF+bCwXpShxeTX0V33ZED0tAdcRW+X+2iaN3j35Ar/7iX/e+XnCpbg9cZfkozctBrauci/9tioIlKSpeUTLg7iguk4DqKC0h7bD2QPJBQP/hUHsNhsIVv+qBq7QI+7O2w93USGDtUoEFaavxoqJ4x7Z2FQmodnW/rDxsD3Ba2PcwqL0PhaLEobmxAXnZmaiuKPOqUBRsSlBx06gM7AlbZxQKSkBFwalSZRQ9kJAEDD4GSD7Yyz6WFu5HQV4uVI+Ho1W1ouCe1NV4OooWBFUtAdVenpf1ts0DfQ6F2mcoOMurq6nCnp2Z8DAMwNEKWJEKTG+PtZUEVNuaVd7dnh5I6gF1wFFQEpJQW+1CTtYueBgeEPLuwGRcNWQVamJpogRULL0t63LeA/GJUAeNhBKXgOpqF3Kzs6Ey3iVGqs29gQnDMlDnfMXWGiWgYuVpWU/0PBCfBHXQ0VCUeLgqK7B3b67I4BDyZloKrlTmQ6AsyiIBFWUHS/Ux8kBCMtT+w70MYGlJMfILCloqVoDH0jIwMxaWSEDFwsuyjth4IKk71D7DGKzCnj05qK0zZnoKMDUtA69F2xAJqGh7WOqPrQeYvtSjL+rr65C1JxeqMfUrTkpAyrGvoCSaBklARdO7UnfsPaAAat/DocTFo7C4FMWlIvBLUYD0tAz8KppGSUBF07tSd/t4ILE71N5DoHrcyMrJQ0NjY4sd8QompazGumgZJgEVLc9Kve3rgZ79gW49UVVdg9wDhWZbMtNSMEaZDxEFdlgkoBx2qFTXQTygxHnz/gAPdu3NR2Njk9mwmWMy8Fg0LJWAioZXpU7DA/0OB479hTguyQZ2/Sdm3lF79IWS2B2llVXILylvqVcBuLAamZbh/euotA+geg0E/ponHqSpDrizj6MP1WGU8WM671eq7fhVweTFwIQ/Cpe8PRfY8NfYuue4y4BbNbb6y1eA534Tu/rjEqEeNAAejxs7cgvg4VfGmijA8rQM3Oa0Me0HqKUHxLM01gEzD3b6udpXX+9DgNNvBs64GVh0PFDj+Isw/Oe7fAlw3t2i/NoHgPVLwr/XiZLtCShGpHr29zJ++aWVKHX5pPU1Iw5jx6RjuxOP2QLUsPaUcLJG6uII1ZUBtTAb6McAI4B7BktAtdcIRf/zM/vkg9HY3IydeQxBGbMFBVifloELnezecoRy0pu6rsU5QJ/DJKDogXYeoWiCp2c/7mWF7MJy1Nb7kBNwmkaXgJKAioYHDJ0dAFBqt55Q4ruhyFWDooqArzkcpdE7HqBOuxE4aKBokE9WALUGO9PSStxc4Px7xWFzI/DhI0YDDjoGOP5ycbxjE5CzBRh/JTDiDGD4CaL83m/E+W9e8yUM+g0HTtIC6f56/bvd8JOAURp75SoAKvYDh58gStG27tq68L3FQGOtOP/TOmD/j76aOP09YSowbBww9DigtgLY9y2w7zvguzeEvf5ifsb8bcAPbwNjLwF+Pg3oPQTgubfnAcW7ASfXUAOOBH52PTB0nKiHn6UXZwFFu4DPVwEFFssRK0BRz7gpwn/0U+7XQM6XwFfpYrsxpyUhEUjqhdqGJmQXVgRoj1NwR+pqLHOi2o4HqD99DQwdK55t7mjRKfyF++4t1xIf66uAu/oZJcwNuGYOMHgkcKoNs7TtfWDltQZoOd9eshfoqel76OdA9mfWfp6+FkjTpt/vLhA79Jw1PXibrLoZ+OwFo8yIM4EbXwT6MF5iIblfASumAuUaI6oX8e+kOz4Crn3GV8HjFwLbP3AOUJfMBybO9m7eYCnuJmDjQ4L4MIu/rR8+Bty2zvCxuezuT4AVVwHVxU70bR8dao8+XsY1c38F3Ca2j4WcpNG7NqA4MiT1AJoagNwtwIFtwJBRwPATvVF0r5TmAItPBOoqxfEVDwLnapn+n/4DeHlaYONyVCHw4hPErqoPjATOvRM4Syvr3RVWE2/jaQvhF38HfP4vcYEd7ZZ0sWsu5cBPYlTiW58j6cCjxfmqYuDRCWLU0cXcSQ9sBQaOEPvcmcVJQF08F7joz4b2sr3iRcOX2eHjxT9dVl4HfPWqta0cnRmX4r58WZ8CRbsD24Mvj8UnOE7kqN16eT/t2FdWjcrawFHfKRq9awOKzVpdAjxxCcC3vS79jwBmvCs2+6CQStbfrJxOzdsqzte5gFmHAU31vp317BnAL7VpJke55ZN8r4ciJQjyedsM4uLl6cCnzxo6uDcdp42XLRDnvlsDrLjSupPqZ7duAD5+EqgqEmBkh2fHb+uUjy+eJXliI0rK6/f6TrF5ji+TK5aK65wCzh1lbyvb48nJQM4XRpkBRwHT3gIOGS3Obfw78OYsX5+29YgvnLgklNc0YH+FNgX31ekIjd71AfXU5cCP7wQ2B9/q7NScwjTUAHNGCPBR7tgIHHu2+D8DkQxImuXezcARJ4kzz14FfPuG7/VQgLpkHnDh/eIerj3+daN1d9GnlQwM862tr7/MI1QoHW0FFNdLE+8ToQ6uFTlFtpJFe4C+Q8WVmb2NdaO/rS/cCHyxyro95m4Ve9ozNsn24MvBKeHW10nd0dTsxo5C663TnaDRuzagOJ2bM9K+SWZ+ABxzlrj+1GTgx3fF/0kS3PSy+H/mv4FlFxg6zCMYG3z28MCFdChAzd4CDDte6Hz0PGDnR9Y2nvxr4IbnxbX3HwTe+pP4v7mT8mVw/5HW5A3LthVQ4XboO94Hjj1HlF403hr8ZfsEULQ9HwJUz1gHpJwnTj89RZAtTgpHW9WD3cU1qG+y/iK+rTR61wbUD+8AT2uMn1XDTH0YOEfLPsn4I7BJI3q43zZBcdAgsUZiJyjfJzSYRxcuwt+cHag5FKAerRRrO8p3bwVOKXWNJEdSzhdHHAU5GvoDas/nwINn2nc7JwHF2NrxUwCydP2PFEQMiRzulcdjfV1Ke2iXv61b14vpt52Y169v3Ad88LCTcBJ2KvEoqmpAUbUFeypqaxON3rUB9Z9ngFdn2DfK+fcAzHWjbFoOZNxplL1sIXDBfeJ47VxgvVbuLztFh6LMSwWKdgbqDwYodkpej1RIpS85ObCTfrUaWPnr6AKKDNlVy4DxUwURE0rsABWqPZhzOEXLNfz4KSD99lA1RXbd+1NCiahrdCOrzH4jpLbQ6M4Daswk4MhTxYNu32idXcxcN7JklPpq4K6+hmOcpM23vAw8f7290yc9AEyaI65v+BuwxsRkkbiYv0PM6fWF9lGnAXd/LMoza/qRc611BwMUR6ZHKgz6mbE2uymQWTsZNaspX6iE07aOUInJwO0bgKNPM9qL8bHCXUBVoRhdmxuAibOMaawdoL54EXjht/btYR791y0E3pkfGWBClSbjH0c21IPM4no0e6yTlttCozsPqEsXCOdSzOyZ+WFJs87SWJ7CncD8VOOqeX2xYByQrzFu5vsZgF2oxaeCxaHIdDGWZCfXPgucdoO4uuoW4DNtvaKX/8M7QKq2fvr7OcDJVwNn/k5cff4GYMtLkQOKd5hz/exGuWCdI5Lsg7YCimzj5EXCmrzvBYXP4LO/zPrcCGzbASrYS4j6rvuHCBxT7MiLUKAJdZ3Teag44GpCWZ39j3a0lkZ3HlCnXAdcv1I81tcZwD+vCXxEc5nMD4FlE40yv38TGHuxOF5+MbBtQ+D91z8HnKKxTcEAxSyDeaMFfewvDA4TlHrO3UNnAdmbfUsx++D3GoPH0S51oghIskPNHma/9gm1hjIvvv0pc7MF4yaLNQuF9Dzf8JRYAop0NmcdlGeuBL5fE+hL/qbT0gJjOmgHKLbHn48CXD5f0Ap9bA/67eDB4njp6SKbxWnRfjmzqr4ZuZVBszJaRaM7DygGTe/TsgsYUF0wBigx/SACpxB3fyJSbSj/Xga8pn2vw+OpjwDnaOseqynbYWOB2V+KqRglGKB4neksVlQvyQiSEhQGVJdoNLi5ARkPWpRtgE6/xnhP+h32TW1eZ5FlJNtoluMuBW59XZxhytL8NKCh2rcMR+H7vzFSmB7+BcBMAkosAWWegvPlyJekv5hBx2t2gOK1/64EXro1UMeEu4ApfxPnmYa0VJti2nu59Vfi4r27y24vaYYnyLdqraHRnQcUH/P29cAobX1RXSpAw8U7O8mp1wGHalM8bu7OEcTc4UZPAG57z3AWsxW+eEnM148+XUw/yL7pEgxQZOgIvG9eF8HC4l3A4FHAib802D3qefJS4CdTneamumgOcLFfOs0ixoR+sG9QMx1P2j3zA5EzSFZQF3MnZMYA10cMPvOzbU4zT77GyJbwZ8daCyjq58sjHPlhrfDJb1aKNqMU7gBemgZk/VdkeHCtfPliY82s6w0GKJYhkULSgdN5Zq4wTKGzrbzOGQtnLtES9gmPB/uqPKhsCL6hbFwcLkpNh03nCDQwOoBirIajlJ4gaueY95cCb2kBTnMZc0zD/16CZO0cY14fDFAEEmX8FdYWsJOvWwAwF89OOCVcmGWkCIXz9uR0lNNSf5mRLH6rlsIg6LQ1Rt6iXf1ct3B0qncZJVoLqEg6qM5sWrUlM0hIruiM386PBdj09aUdoLZtFOSGTq8HtK1bZKywX0RVvL/cBlejir2u4D9+qCjYnjoaY8Pd1CU6gKIz2BGvecpIIDU7qDRX0Nl881oJf7WOMYnTb/K9Wpkv7vtxXXjJsWTASB6Q8uVbVo/9UCunWqRlv18buunIcumZ5czt46gZSs64BTh7OjBwpJFnZwYU7+cCmTlyzB0028ZrXKcR6Jxe+mdgxxJQtOWIU4CrHzdYPP3Z2Y7fvi5GV+b7MXmWYgcopi0xiM2g+aARvh7kfhP0LUf0GAk5vu2l7qDTPpoSCY0ePUDpTunRVwzrnO6xE/NNFm5KCXcBHTJaLFT5yQWdHkrsOhs7L6co+ucCTKMJR9jRF+cCjMUwK2HW0MD1Tjh6gpVh+hPz2Q5NE+ApyBTrznDo9LbWHe79tHFIigACaXJOH/VUrXB1mMuxTbne1j+nqSltjZY235NX5UFFiGlfJDR69AHV5keOUEEkb+9wVHMac/UTouTm5wBmjEvpMh6oblKRUxnGb14reHzMaoSMNEtAheoac74HDkkRpZae4ZslHepeeb3De4DL6O1load9/JQ1nE1dJKCCNTmTPUmQUPi90kItobXDdxNpYCQe2F/tQXl96J+PUoD30jJwUdDZe7vsehTJ00Za1skpH4O6DO5SMu4CNj0eqTWyfCfwQF0zkFUR3qf3oWj0rjdCHZJqxE0YczF/PRpJ4zJyf+l8b3ayV5jrZ7W/RSQ6ZdkO6QGyfTvL3Giyye0zGx2KRu96gOqQTSaN6ugeKKpTUVQTBjkRgkaXgOroLS3ti4kH+L3hjjICKvS22cFodAmomDSXrKQzeGBPpQc1Nl/yBthvQ6NLQHWGlpY2xsQDFQ0q8qrCm/bZ0egSUDFpKllJZ/AAOYnM8GJS3sexotEloDpDS0sbY+aBAzUelNWFjknpBvnT6BJQMWsqWVFn8EC9G9hdHl5MyjtK+WWjS0B1hlaWNsbUA9mVbtQ2hWb7TKPU7anp8Eb9JaBi2lSyss7ggQjJCZ+90SWgOkMLSxtj5gGOS/zHmJQ7jMyJFsM0Gl0CKmZNJSvqTB4oqPGgJAJyQqfRJaA6UytLW2PmgcoGFfvCj0m10Oj/A9jGm+feuyEMAAAAAElFTkSuQmCC"},81378:function(Vn){"use strict";Vn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALAAAAA8CAYAAADGxTD9AAAAAXNSR0IArs4c6QAAFoFJREFUeF7tXQl4k1W6fv8sTbqvlJa2tJSy74ugsiMqq4AKIlDUueNwR2dGHR0XdLwixW3uuF6Xq3O9o15nxuUiIIsCsijK1pa20NJ937eke5tmmec7f/40TfInaUNK6+R7nj5Jk7Of93z/t55w8JBnBYbwCnBDeOyeoXtWAB4Ae0AwpFeA+1SWbbA1A07KQSID6JWT0ivAyThIpBwgBSQy4+fCq0T4jANnrEdlWFkpjK/0ndAetd/znpMaTO0LZcz74tsxti0xjqVXfeNYZcZyxvHSuK3GbDYX03iMbbLy5nOz+pzGbGDrwpfj52DQG2DQAwad8Gcwvudf9ToDQN/pDdBrDYBFWfqMry/UAytP9fjPjJ/rYVHf2L7Qph4GaA0tOj1UnBYqvd6gMugMKr0OKoOOq+UMhhQ5DGfHPRNWMaSRaxy8bQBzPGAZAI3AFMAoAIJtnBnA2WaagdlU39iOAKKeje85FKY2TYDkwWh+APi2ebD0AJ8HMn/AzAHFA4x9Jxwss7bN5yXUpbnwB4SvY3Nu9LmwLr36NIKWAEhA1BlMgOUBCAZYBtJe761Byx+A3vV54Av1efDrtUawm4G+N+D5MfUcHH5s7H890KnqNjRWNGkaqlXqhgp1VV1JwxkOSJUAqUB0xk4s0Q4FgIty4KEweM8Yba+ARCmBzBuQeksgVXKQKugVkAdIoRwhhU+EHJycg0GrNz01Whs6UJhegtLsCmi7tI0GYC8H7osYTPhuO2Z3D9a19gB4sO6Mm8flFSKBd4QcyuFS+MbKIfOWMM6v69KjIq8WhVlFaKpvAQeuFsCr/gh45wmsbXHzsPrcvAfAfV6yn18FjgN8YmUInKiAd4TMJObUlNQj42wWutq7SNtXA9zrIVC88nts7Bgsq+AB8GDZiUEyDrm/BAFj5PBLUAASniNnpeSgvLCSjZADl8dBev8ubD41GIbsAfBg2IVBOAaSnUNnK6GM5DlyQ5UKmSlZ6GjvJBiT5epdGRSP7MRGzbUcvgfA13L1h0DfPtFyBE9VMKuMVqNH2rl0NNapBG78vQ98b9+B2xuu1VQ8AL5WKz+E+pV6cQiaqoAyXAp9tx5pyZfQUNdoBDEKAG5VEhJzrsWUPAC+Fqs+RPsMnOgF3xg5dBod0i9eRmM9D2IAFYB03m5sKRnoqXkAPNArPsT7CxingE+UFDqdHpfSMtHYYJIecn2hnL8DG+sGcooeAA/kav9M+gpIkEMZJYdBq0PqxXS0NDcLMvEFKRTzB1Kx8wD4ZwKqgZ6G/2g5vCPlaGttR+rFZMaRiSSQvLILW58YqPF4ADxQK/1z64cDs05IlByqqiqRX5gvKHV6gLspCYknB2LKHgAPxCr/TPuQ+XAImOQFzsDh0pVLUDcJ5jWUSaGcuBMbW9099WsOYDKYU8Qbi5zqshnZ6e41uGrtSxScU3NQhErR1UBhae4hstkaBiiWzDtSykSJri4NLmYmQ6s1dfz6bmx7xD0z7Gn1mgN4bX48CyapP9eBI/NLXZ5v3JYAzHlnOGvnyMJSqNO7TG36xMjYe41KB22r+GGR+nC48aNIVrb4780o2+OYkYTOVWLRnijk/JcKee+qoVHzMqE5zXlvOGLW+0MRIsXBGUVouuweJ9bys7HwjpJBldaJk2vcH/brP9aLRb1V11aisLzAKEpwWimks3Zic4bLm2qngUED4K5GHWpOttuda+U3bSj83ya7ZeLvCcD1f+HBd3hOMVQXeQDL/DhsVI1l71MerUXOm/zjzhYRV1lfmsC+Sn28FtmviZcV6t/wUSRGbQ5g/575RRWKPuE1c3Ma8+sgXPcmf7gynqvH5d3OO7DkARIowigzwDEtPxcLryApmrK7cGqtYwB31evQ3Wx94Bz3xJcgOThwrBd0Wj1Ssi6gW8sfTA44swuJ8zje9ewWGjQAdmZ2OW+rkPIwRfeJ09UAsH+CHGuuxLNOzj9Yjfz37R8axTAp1hWPBnmsOuu02BtXCL3Ges8IhOvLRkPmI0FjSie+ud55u//YB4Iw+w0e/Febkh+qQe47apea9Y2VQeYrQXlNGcpqeubFQfKrJGz9wKXG7VQeNADuqNKi6FNrrmU+9rqfOlDxtf3HudMAfkuFmPV+iN0QgMyXG6BK6xE1gqYpsDI5jnX9071VKHYwrklPhWDa88NY+csvNiDj2XrRJZ/7fgRG3xfIvv8qrgAdFc4Jq4MdwHQoCcQkA6fmXIBOz8v4HNAog2zcc9gsviguoNutAKZHsdRHYnd4y76LgU+UHKr0TvxwFx+y54iIu7WX9Ww8SwGS8/mp8YkBmPNuBHv/7fwSHph6A0jBshQhVqbGIWiKAgUfqnFue42p22HzvHHzyZHs/+83VKB8r/ihoRQjkuMp6IVShvYlFGLyjlCEzVXanIZXiJS5Y4laizSij+78/2lisrRA8kAJCz53RKO2BLL+ic5tr0btaftiGZXrrNGhu6n/IoQwJt+RMrbOJTVFqG4030vJX3dj632Oxt6f790K4CWHohF5s29/xmW3DoH98Oyex9TY3wRh9mvij1f15S4cWVBiBWCBW2vb9fhqZIFpEyNv9sGSQzFsDCdWlqHqqDgIiIsv+DyKlS39/xac3lSJpd9EI+Im1+Z9+YUGZPyHbaYVMlOB0DneNtdo5J3+GL7Ih31HcraYtYPmXPSx/SdeXzeORAifETJ0dnYivTgFBoMgRpEMLF24G5tP97VNR+WHJIBL97TgtBm37i+AJV4c1hbEsywEc8XOHJRHl5Si7rTtBASZLwfi4n7xXmydT60rR8XBNkx/IQwhM3s4cMgsJVOqCDT1Z5xLZij6W7MowMxFFkcbLPZ9R7UWX8XwFoOrSd4jOUilMuRWZkHdZq78cpdliJ5xtZNFBwTAxAW+u7nMap1uOhbDTEo1p9qR8oh95Ywe9YJp68fESpT8oyc9K+x6JUas8GPtB09TIGoV/55Eg45qHTprtSj8qMmmFWLKs6GY8scwNOdqcGBSEas3KjEAN3xotGRcV9xLPjafBJnFEv4tyPTRsZtKUfu9NUBJTApf6NOrD1dAYw7gikOt0Hc7r+SHTFcys6W7AOwVLIFXoBQ16iqU1BdaTvOJ3dj2iitzt6w7IADuqNHiq2jr0357xWgow2UoP9CK8/9eDZ8YOXxjZPAZaXyNkcN7uBRHF5dh7gcRGH1vIHQaA/ZE5ovKjk4rcUYzmt9oOW7L5i0Ox28tQ/Xxdkz+YyimPhvGPvsyPA8albV8GLXaF4u+iu61nqIAPhGD8Pk+aM7R4MBk/pC4QuYA3juqAJo+yK/XvRUOkpPdBWB6qpHuo9F0I73sgsU0uTYZFOShc93gb2x5wAD89YQiDLteyUBKDgVSZGI3+bOUb0e0L6EAEx8PRfQaP6gyOnFytbhts68Apr5vOT0SYXO9Uba3BT9sqMSNn0QiblMAOuu12BNpffDIbLYqLY4dPnMSA/CKlFgET1UyRdVcdnc0b7HvB7MIQWP2jiJlk8OVqgy0a6wU4H27sW1df+d+zTjwiRXlTF60R6TFd1Rq0VbSjbYyLdpLu9FW2s2UoxG3+qK1RIumzC67GnN/AEwmqmlJw5D3ngppO+pBjgCSYet+bGfc35IW7olih4mIQK4M44EsBuC1hfHswDYkd+LECuv2zNunC0wcORXMAaxR060nzsNB6ith9mp3cWAaiVewFBQnUaEqRVVzudXgOEjWJGHrAedHLV5ywDjw/rGFWF86Gu2lWrSV8cCM3xbIjPoElB+3VjHw0gbaIsHlXPyPZvyUWCU6I0sAtxV3Y/QvApH332pRTxx56TgJZwLOBtUYyP0kKPhrE87dX92rL6k3hzvrEtiTgwBZ+HGTybsmBuCN6jHMyO8M0eElU5w9MgfwF2F5fTKBCXZodwKY3MoE4rauVmTX2vQkF4dCOfFqpOcPGIBtycArLsQieLoS3a16ZL/WaFOWkyo4hN3gjejVPMdLe7oOWa+YUlms9tkcwAR2Uuh0HXrsH1folCuZYgjWF4/m+9pRh6w/Wfe1+EAUgiYp8M0NJezJILiubQGYAmvu7hjnDHZZmeY8DQ5MtC8nmwOY5Gq6b81Z8o6UMYuIOwFM3gvv4TLGjDJqkqHVWcd8SICXdmHbU86OW6zcNQWwI/OX5aAJ6IdnFqO1yPZNR8RJJz8dhomPhfSqShz/4NQipwAcscwHSw/zNuDv76hA+X5rJwYFDJFtmQKFzA+MLQCbx1VUHmlD9bE2m3sx/qFg5tBRZ3bh0PRipzlwfwHgVgADkAdL2F1zZc1FqG/v/RQzjrmbg9e0JGy60t85UD23AniZUfsmj9P+sdZchTRWAgxxMb943jtli7Tt5HnrRsnnLWg4T/cS9KaEXwZi5EZ/pulLjB45KkHyYe7bauS8pWIXdDgTzDPrtXCM+00w62BPTD46q+2HPToCcNQqXyzay1srLM1/5rNYkRyL4GlKNKZ24pu59mMkzDnwoZnF0DQ5H5o546VhzH3ubgBLlRLI/Tk0dzQjX51pc185cCeTkLhk0AL4ttxR8BvlxdyZx5bwygu5Q8l1KRDJpxTk0pKnYU4Aoti7/EEu1/Zyba/YB3Kn2nJ5Lvh8BAtTtKRvbyxBwwUe8M5Go60rjudd2xmdODzLcbCNIwBPfT4Mk5/iXbv2QihXpsUxsaTuTAeOLrRvZTIHcOmXLcy06CyRJYgcL+4GMF1XJQ+RsvvWLjcmQ0fXadogCbh7diHxY2fHb1nOrRz4rtYxTNkp+byZhQ7OejUc4Yt9cHBKEVryeDFAUM7MvWurMuIQOEGB6hNtOH4Lr8WS6eq23HhUHm5F+tP1vcSIcb8NwqQdoaDNNHQD437Lc1BnwinZ3b7G8xS+0BvLvuNjILLfaETqY44TbB0BeOmRaEQs8WXOhs8CckUDzVdfHoWAcV6oOtYGstjYo8FuRhPGToyJ4lRKW4rQ2NUTa2I+N7o8UAq/cTuxvl/hcG4DMGUd3FHNx9ReebWRKV7ktiVtPPcdFZIf4j1vzgJ4WlIYJj0RCl0nKWRFzGIhELl0dZ383bt9MaORy3j6i8NwfHk5yFohgI3abS3U4OCMYuja7XM3ewCmw3Fn3RjQfWP15ztwZJ44Z70tLx5+cXKTLdpZAP90TxW0rc4H4ox9MAgRS33dzoFp/BTYQ0p4i6YZha1Z9qb03m5s+3V/uLDbAEw3uaxM4e2+KY/VIucNFWb+aRjGPxzCrA57YwuY2coZAFMg9205o9j9tln/2Yi0p8Q5oxiAzZUpciuTB45kZqLkR2qgvtSFZcd47isQZVc4cnHbA/DIDf6Y/7cRrDlH1hMyMZKFoOj/mnDmvt5KD3FmWk+BYtb5IXYjHzx/9pdVIB3BWRqzPYgF+5B+cP6BHq6ozuhinsKrSSRGyPwl7B7izJZU6ETynDhAL4X0hp3Ycr6v/bsNwObKy+m7K9njnUxUxIVJO039Qy2yX1c5BeDrP4xAfGIgU1b2jym06doVJi4GYOK0ltYJqlN9vA2Xkhow+9VwZtKjCKqa4+0smozeH1taJhrMQ/XtAfjmUyMx7EY+auzriYUmscnWJt1Zn8BiCLLfVCH10d5xIRMeDcaMl8L7urd9Kn/xyVpc+bPjzJM+NUpc2FsCCQeUdRRA1S3OeDjg4lQor9uIjc5rpO60Qlz39nCM+RUf6GKuTC3aH4WoFX4sFpZEgbV5fE6cmAx8OanBJJemP1uHzBfFbcCWgBJkYP8xcqzJ4uMdiAiYFBif+VIjU/JINhfk5rz31YzDr8kZxTxsZJc9NKNYNFlTDMAhsxRYfpZ/AjnjQt7UOZYd7LRn6pD1cu85DmUAc3L6SQgJ2rXNKOiwK0ZQbu9Du7Dtzb4cErdwYDLe316eAJKDyQa7L77HsxS9zg8Lv4hC7Q/tOL25EreejrULYJKdKZWGLBDkzeuLTGquxJFiSMmHJZ+1IOvlBjRl8Y9LYTz0XrAXU8KneQaEvYMjBmDzWGjhCSS2MaSg3lHJ6wskEhR+ZB2nS8qQJUUs8wVF01Ecx8Wn6pD9qu3DPeU53hJCQVXkkcx/X42uut6MTswD2hcwiZUlzxz9NkduZxq6DeJiCgeu2RsY/zTsuFotOnELgEes9MXifbzt0zLFhsBNFgaSOYmckYFJGfIf44XmbMcy2vTdYSzwh+jgtCITUClIvTmvmylrAo1Y7osFX45glhLiyidXlZuC16nPVem8ZYBk9q8nFNq0CdsCsLmVwBnuO/EPIZj+Ap+SRFkkDeesbd3CmAkMI1b4ghwfw+bxMjwRJcSeWF1u/aTggDlvDwc5X8htT0Q28eK/tzD7OMm+7ibBNl+tKUO9zn7WDQd8loRtm5wdk1sALERz0SBI9qOYh/GP8KYtSxKi0djPTxnjWsnBwXEcA5Wt5Ehq48y91UyuJgpf5I15n4xgSiEBjoiSK/dEFYgGukTe4ouFe3rAe+GBGuT/pXfyprkcbysugvqxBDB9tvRIDBMHaPxkEqv+js/oGLbAGzNfCYeuXQ9dFz9fUlDDjNkVFAdB4ZZkUbEkGi/FKUet9mNxGgK1FGhw8ck6u2lPVJZMWgRicvpQZJwJ+KfaWYZ2OeUaOq8LOosvVo7iTCgxuVuvQW53msO6UnC3PI/Eow4LuksGnvnncIz/XTDqz3bgyIJSZqqypUA5M0CxMj9urWTiABFpuhvqE/iFMpKjDGaSUZedGMnuM7jwYA3yP7CdeXzT0RgMX+xjU7myBWAy7y0+EA3/0V649Hw9Lu3qSZ2nQKA7ahLYD6pYEkXiHVtSivqztrmv5RqSKzv/AzX70/fxN4ToYFL0XdBk3rJBThvy/rnzMhT62TNyahTpMtFhsO1OF9aEfsYgHKFTfoeVDh8PbuHANJCJj4ewC0QIGOQgEMvh6i+IKw609hIpxv8+mAWp0O0+ZftanLo0hOKRyUYrBl4aG5mvKOWo6ojtRY+72x+z3+Lz8egOhrofOxhXpUd8+h+tc9oS7g9EAF0EYvwJLNJc6n/qQOW3bb0SVS3XhTyYK5LjUL6vlUXJNSaLixlOrSnHZ55MeSaU5fE1pjrEilPNOiqkMtSiSmc/1oNxbXDPJSFxp6P23AZgRx17vu/HCtAD5mo/5t3Rpp2p6aFHji4VBgdaIwd0SsFN2YlE/tZAEfIAuB848lRxbQUq9Plo0ts3hxp7+HY3ti33ANi19fbUvsor0GFoRZHOvk1Y6FIC7q5dSPzcw4Gv8iZ4mnNtBQp0l9BlcHzFAAeu0h8B48V+JdQjQri2D57a/VyBBkMNanSOw1WNCt0bSUh82FZXHgD3cwM81VxbAT10yNWlQm+6vceupKuTQTJ7J7ZYGZE9AHZtHzy1XViBSn0B1Hpnr5jlziZh642WV7V6AOzCBniqurYCnWhDodZ2upGtliXA9l3Y9r75dx4Au7YHntourkChLhOdDjxzPV1wKl8oxpn/Fp0HwC5ugKe6ayvQbGhAuc75SwY5cB8lIfFeoVcPgF1bf09tl1fAgDxdut0wS+supIt2Y8v3zELxqSz7ajsnXZ6Sp4F/rRVoMFShRmf/yq3eK8JljcSE6dsxu9sD4H8trAzK2eqgQ54uDXohPdyJUXLgnkxC4sseADuxWJ4i7l+Ban0JGvW2U+9t9c4B7QZIJ3oA7P698fTgxAo0GepRobN/qaFlMxy4/f8E90wA8RE2tUgAAAAASUVORK5CYII="},16722:function(Vn,xn,pe){"use strict";pe.d(xn,{Z:function(){return Tt}});const ge=Ct=>typeof Ct=="object"&&Ct!=null&&Ct.nodeType===1,Oe=(Ct,Ve)=>(!Ve||Ct!=="hidden")&&Ct!=="visible"&&Ct!=="clip",Ke=(Ct,Ve)=>{if(Ct.clientHeight<Ct.scrollHeight||Ct.clientWidth<Ct.scrollWidth){const Lt=getComputedStyle(Ct,null);return Oe(Lt.overflowY,Ve)||Oe(Lt.overflowX,Ve)||(dt=>{const Rt=(De=>{if(!De.ownerDocument||!De.ownerDocument.defaultView)return null;try{return De.ownerDocument.defaultView.frameElement}catch(ne){return null}})(dt);return!!Rt&&(Rt.clientHeight<dt.scrollHeight||Rt.clientWidth<dt.scrollWidth)})(Ct)}return!1},ut=(Ct,Ve,Lt,dt,Rt,De,ne,ee)=>De<Ct&&ne>Ve||De>Ct&&ne<Ve?0:De<=Ct&&ee<=Lt||ne>=Ve&&ee>=Lt?De-Ct-dt:ne>Ve&&ee<Lt||De<Ct&&ee>Lt?ne-Ve+Rt:0,Ge=Ct=>{const Ve=Ct.parentElement;return Ve==null?Ct.getRootNode().host||null:Ve},Xe=(Ct,Ve)=>{var Lt,dt,Rt,De;if(typeof document=="undefined")return[];const{scrollMode:ne,block:ee,inline:ce,boundary:se,skipOverflowHiddenElements:he}=Ve,ve=typeof se=="function"?se:Fn=>Fn!==se;if(!ge(Ct))throw new TypeError("Invalid target");const be=document.scrollingElement||document.documentElement,ke=[];let Be=Ct;for(;ge(Be)&&ve(Be);){if(Be=Ge(Be),Be===be){ke.push(Be);break}Be!=null&&Be===document.body&&Ke(Be)&&!Ke(document.documentElement)||Be!=null&&Ke(Be,he)&&ke.push(Be)}const He=(dt=(Lt=window.visualViewport)==null?void 0:Lt.width)!=null?dt:innerWidth,We=(De=(Rt=window.visualViewport)==null?void 0:Rt.height)!=null?De:innerHeight,{scrollX:rt,scrollY:Qe}=window,{height:Pt,width:Ze,top:Et,right:it,bottom:Dt,left:ht}=Ct.getBoundingClientRect(),{top:Ht,right:_t,bottom:Vt,left:ot}=(Fn=>{const Gt=window.getComputedStyle(Fn);return{top:parseFloat(Gt.scrollMarginTop)||0,right:parseFloat(Gt.scrollMarginRight)||0,bottom:parseFloat(Gt.scrollMarginBottom)||0,left:parseFloat(Gt.scrollMarginLeft)||0}})(Ct);let Ue=ee==="start"||ee==="nearest"?Et-Ht:ee==="end"?Dt+Vt:Et+Pt/2-Ht+Vt,Wt=ce==="center"?ht+Ze/2-ot+_t:ce==="end"?it+_t:ht-ot;const Ln=[];for(let Fn=0;Fn<ke.length;Fn++){const Gt=ke[Fn],{height:rn,width:An,top:ni,right:Sn,bottom:Yn,left:It}=Gt.getBoundingClientRect();if(ne==="if-needed"&&Et>=0&&ht>=0&&Dt<=We&&it<=He&&(Gt===be&&!Ke(Gt)||Et>=ni&&Dt<=Yn&&ht>=It&&it<=Sn))return Ln;const wn=getComputedStyle(Gt),Gn=parseInt(wn.borderLeftWidth,10),ze=parseInt(wn.borderTopWidth,10),Ee=parseInt(wn.borderRightWidth,10),Pe=parseInt(wn.borderBottomWidth,10);let Fe=0,Ae=0;const ye="offsetWidth"in Gt?Gt.offsetWidth-Gt.clientWidth-Gn-Ee:0,qe="offsetHeight"in Gt?Gt.offsetHeight-Gt.clientHeight-ze-Pe:0,vt="offsetWidth"in Gt?Gt.offsetWidth===0?0:An/Gt.offsetWidth:0,et="offsetHeight"in Gt?Gt.offsetHeight===0?0:rn/Gt.offsetHeight:0;if(be===Gt)Fe=ee==="start"?Ue:ee==="end"?Ue-We:ee==="nearest"?ut(Qe,Qe+We,We,ze,Pe,Qe+Ue,Qe+Ue+Pt,Pt):Ue-We/2,Ae=ce==="start"?Wt:ce==="center"?Wt-He/2:ce==="end"?Wt-He:ut(rt,rt+He,He,Gn,Ee,rt+Wt,rt+Wt+Ze,Ze),Fe=Math.max(0,Fe+Qe),Ae=Math.max(0,Ae+rt);else{Fe=ee==="start"?Ue-ni-ze:ee==="end"?Ue-Yn+Pe+qe:ee==="nearest"?ut(ni,Yn,rn,ze,Pe+qe,Ue,Ue+Pt,Pt):Ue-(ni+rn/2)+qe/2,Ae=ce==="start"?Wt-It-Gn:ce==="center"?Wt-(It+An/2)+ye/2:ce==="end"?Wt-Sn+Ee+ye:ut(It,Sn,An,Gn,Ee+ye,Wt,Wt+Ze,Ze);const{scrollLeft:Ye,scrollTop:xt}=Gt;Fe=et===0?0:Math.max(0,Math.min(xt+Fe/et,Gt.scrollHeight-rn/et+qe)),Ae=vt===0?0:Math.max(0,Math.min(Ye+Ae/vt,Gt.scrollWidth-An/vt+ye)),Ue+=xt-Fe,Wt+=Ye-Ae}Ln.push({el:Gt,top:Fe,left:Ae})}return Ln},Ne=Ct=>Ct===!1?{block:"end",inline:"nearest"}:(Ve=>Ve===Object(Ve)&&Object.keys(Ve).length!==0)(Ct)?Ct:{block:"start",inline:"nearest"};function Tt(Ct,Ve){if(!Ct.isConnected||!(Rt=>{let De=Rt;for(;De&&De.parentNode;){if(De.parentNode===document)return!0;De=De.parentNode instanceof ShadowRoot?De.parentNode.host:De.parentNode}return!1})(Ct))return;const Lt=(Rt=>{const De=window.getComputedStyle(Rt);return{top:parseFloat(De.scrollMarginTop)||0,right:parseFloat(De.scrollMarginRight)||0,bottom:parseFloat(De.scrollMarginBottom)||0,left:parseFloat(De.scrollMarginLeft)||0}})(Ct);if((Rt=>typeof Rt=="object"&&typeof Rt.behavior=="function")(Ve))return Ve.behavior(Xe(Ct,Ve));const dt=typeof Ve=="boolean"||Ve==null?void 0:Ve.behavior;for(const{el:Rt,top:De,left:ne}of Xe(Ct,Ne(Ve))){const ee=De-Lt.top+Lt.bottom,ce=ne-Lt.left+Lt.right;Rt.scroll({top:ee,left:ce,behavior:dt})}}}}]);
|