|
|
(self.webpackChunk=self.webpackChunk||[]).push([[337],{89489:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(96663),De=ve(59301),_e={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"},Ct=_e,Ze=ve(7657),Ke=function(He,Et){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},59477:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(96663),De=ve(59301),_e={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"},Ct=_e,Ze=ve(7657),Ke=function(He,Et){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},40001:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(96663),De=ve(59301),_e={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"},Ct=_e,Ze=ve(7657),Ke=function(He,Et){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},49198:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(96663),De=ve(59301),_e={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"},Ct=_e,Ze=ve(7657),Ke=function(He,Et){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},87169:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(96663),De=ve(59301),_e={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"},Ct=_e,Ze=ve(7657),Ke=function(He,Et){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},73331:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(96663),De=ve(59301),_e={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"},Ct=_e,Ze=ve(7657),Ke=function(He,Et){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},15277:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(96663),De=ve(59301),_e={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"},Ct=_e,Ze=ve(7657),Ke=function(He,Et){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},52671:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(96663),De=ve(59301),_e={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"},Ct=_e,Ze=ve(7657),Ke=function(He,Et){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},8657:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(96663),De=ve(59301),_e={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"},Ct=_e,Ze=ve(7657),Ke=function(He,Et){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},56082:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(96663),De=ve(59301),_e={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"},Ct=_e,Ze=ve(7657),Ke=function(He,Et){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},33853:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(96663),De=ve(59301),_e={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"},Ct=_e,Ze=ve(7657),Ke=function(He,Et){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},12893:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(96663),De=ve(59301),_e={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"},Ct=_e,Ze=ve(7657),Ke=function(He,Et){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},15075:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(96663),De=ve(59301),_e={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"},Ct=_e,Ze=ve(7657),Ke=function(He,Et){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},32134:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(96663),De=ve(59301),_e={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"},Ct=_e,Ze=ve(7657),Ke=function(He,Et){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},43531:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(96663),De=ve(59301),_e={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"},Ct=_e,Ze=ve(7657),Ke=function(He,Et){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},61485:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(96663),De=ve(59301),_e={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"},Ct=_e,Ze=ve(7657),Ke=function(He,Et){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},38819:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(96663),De=ve(59301),_e={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"},Ct=_e,Ze=ve(7657),Ke=function(He,Et){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},47472:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(96663),De=ve(59301),_e={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"},Ct=_e,Ze=ve(7657),Ke=function(He,Et){return De.createElement(Ze.Z,(0,ce.Z)({},He,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},37036:function(){"use strict"},95625:function(){"use strict"},88010:function(Pn,an){"use strict";an.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},43809:function(Pn,an){"use strict";an.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"}},42678:function(Pn,an,ve){"use strict";var ce=ve(59301),De=Object.defineProperty,_e=Object.getOwnPropertySymbols,Ct=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable,Ke=(ct,He,Et)=>He in ct?De(ct,He,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ct[He]=Et,Be=(ct,He)=>{for(var Et in He||(He={}))Ct.call(He,Et)&&Ke(ct,Et,He[Et]);if(_e)for(var Et of _e(He))Ze.call(He,Et)&&Ke(ct,Et,He[Et]);return ct};const mt=ct=>React.createElement("svg",Be({width:14,height:14,xmlns:"http://www.w3.org/2000/svg"},ct),React.createElement("title",null,"\u7F16\u7EC4 18"),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("circle",{fill:"#FCB041",cx:7,cy:7,r:7}),React.createElement("path",{d:"M7.531 9.638a.616.616 0 1 1-1.231 0v-.02a.616.616 0 1 1 1.231 0v.02Zm0-2.25a.616.616 0 1 1-1.231 0V4.117a.616.616 0 1 1 1.231 0v3.273Z",fill:"#FFF",fillRule:"nonzero"})));an.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGZpbGw9IiNGQ0IwNDEiIGN4PSI3IiBjeT0iNyIgcj0iNyIvPjxwYXRoIGQ9Ik03LjUzMSA5LjYzOGEuNjE2LjYxNiAwIDEgMS0xLjIzMSAwdi0uMDJhLjYxNi42MTYgMCAxIDEgMS4yMzEgMHYuMDJabTAtMi4yNWEuNjE2LjYxNiAwIDEgMS0xLjIzMSAwVjQuMTE3YS42MTYuNjE2IDAgMSAxIDEuMjMxIDB2My4yNzNaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L2c+PC9zdmc+"},74413:function(){"use strict";function Pn(Ae,te,ee,he){ee===void 0&&(ee=0),he===void 0&&(he=1/0),this._name=Ae,this._defaultValue=te,this._minimum=ee,this._maximum=he}Object.defineProperty(Pn.prototype,"name",{get:function(){return this._name},set:function(Ae){if(typeof Ae!="string"||Ae==="")throw new Error("Shape name must be a valid string.");this._name=Ae}}),Object.defineProperty(Pn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(Ae){if(typeof Ae!="number"||isNaN(Ae))throw new Error("The default value must be a real number, not: "+Ae);this._defaultValue=Ae}}),Object.defineProperty(Pn.prototype,"minimum",{get:function(){return this._minimum},set:function(Ae){if(typeof Ae!="number"||isNaN(Ae))throw new Error("Minimum must be a real number, not: "+Ae);this._minimum=Ae}}),Object.defineProperty(Pn.prototype,"maximum",{get:function(){return this._maximum},set:function(Ae){if(typeof Ae!="number"||isNaN(Ae))throw new Error("Maximum must be a real number, not: "+Ae);this._maximum=Ae}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(Ae,te){var ee=go.Shape._FigureParameters[Ae];return ee?ee[te]:null},go.Shape.setFigureParameter=function(Ae,te,ee){if(!(ee instanceof Pn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+ee);if(ee.defaultValue<ee.minimum||ee.defaultValue>ee.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+ee.defaultValue);var he=go.Shape._FigureParameters[Ae];he||(he=[],go.Shape._FigureParameters[Ae]=he),he[te]=ee};var an=[];function ve(Ae,te){var ee=an.pop();return ee===void 0?new go.Point(Ae,te):(ee.x=Ae,ee.y=te,ee)}function ce(){var Ae=an.pop();return Ae===void 0?new go.Point:Ae}function De(Ae){an.push(Ae)}function _e(Ae,te,ee,he,se,de,me,we,be){be||(be=new go.Point);var Me=Ae-ee,Ie=se-me,ze=NaN,et=NaN;if(Me===0)if(Ie===0)Ae===ee&&(ze=Ae,et=te);else{var $e=(de-we)/Ie,gt=de-$e*se;ze=Ae,et=$e*ze+gt}else if(Ie===0){var je=(te-he)/Me,Tt=te-je*Ae;ze=se,et=je*ze+Tt}else{var je=(te-he)/Me,$e=(de-we)/Ie,Tt=te-je*Ae,gt=de-$e*se;ze=(gt-Tt)/(je-$e),et=je*ze+Tt}return be.x=ze,be.y=et,be}function Ct(Ae,te,ee,he,se,de,me,we,be,Me,Ie,ze,et,$e){var gt=1-be,je=be,Tt=Ae*gt+ee*je,Qe=te*gt+he*je,bt=ee*gt+se*je,Nt=he*gt+de*je,At=se*gt+me*je,Zt=de*gt+we*je,Yt=Tt*gt+bt*je,ut=Qe*gt+Nt*je,Ge=bt*gt+At*je,kt=Nt*gt+Zt*je,ln=Yt*gt+Ge*je,sn=ut*gt+kt*je;Me.x=Tt,Me.y=Qe,Ie.x=Yt,Ie.y=ut,ze.x=ln,ze.y=sn,et.x=Ge,et.y=kt,$e.x=At,$e.y=Zt}var Ze=new go.Spot(.156,.156),Ke=new go.Spot(.844,.844),Be=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new Pn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;(isNaN(he)||he<0)&&(he=5),he=Math.min(he,te/3),he=Math.min(he,ee/3);var se=he*Be,de=new go.Geometry().add(new go.PathFigure(he,0,!0).add(new go.PathSegment(go.PathSegment.Line,te-he,0)).add(new go.PathSegment(go.PathSegment.Bezier,te,he,te-se,0,te,se)).add(new go.PathSegment(go.PathSegment.Line,te,ee-he)).add(new go.PathSegment(go.PathSegment.Bezier,te-he,ee,te,ee-se,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,he,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee-he,se,ee,0,ee-se)).add(new go.PathSegment(go.PathSegment.Line,0,he)).add(new go.PathSegment(go.PathSegment.Bezier,he,0,0,se,se,0).close()));return se>1&&(de.spot1=new go.Spot(0,0,se,se),de.spot2=new go.Spot(1,1,-se,-se)),de}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(te,ee).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(te,ee).add(new go.PathSegment(go.PathSegment.Line,0,ee)).add(new go.PathSegment(go.PathSegment.Line,.5*te,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(.5*te,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(Ae,te,ee){var he=new go.Geometry(go.Geometry.Line);return he.startX=0,he.startY=ee/2,he.endX=te,he.endY=ee/2,he}),go.Shape.defineFigureGenerator("LineV",function(Ae,te,ee){var he=new go.Geometry(go.Geometry.Line);return he.startX=te/2,he.startY=0,he.endX=te/2,he.endY=ee,he}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,ee/2,!1).add(new go.PathSegment(go.PathSegment.Line,te,ee/2)).add(new go.PathSegment(go.PathSegment.Move,te/2,0)).add(new go.PathSegment(go.PathSegment.Line,te/2,ee)))}),go.Shape.defineFigureGenerator("XLine",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)))}),go.Shape.defineFigureGenerator("LineRight",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(.25*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.25*te,ee)))}),go.Shape.defineFigureGenerator("LineDown",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,.25*ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,.75*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)))}),go.Shape.defineFigureGenerator("LineLeft",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(.75*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.75*te,ee)))}),go.Shape.defineFigureGenerator("LineUp",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,.75*ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.75*ee)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(Ae,te,ee){var he=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(he*te,(1-he)*ee,!1).add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,he*ee)).add(new go.PathSegment(go.PathSegment.Move,he*te,he*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,(1-he)*ee)).add(new go.PathSegment(go.PathSegment.Move,0,ee/2)).add(new go.PathSegment(go.PathSegment.Line,te,ee/2)).add(new go.PathSegment(go.PathSegment.Move,te/2,0)).add(new go.PathSegment(go.PathSegment.Line,te/2,ee)))}),go.Shape.defineFigureGenerator("CircleLine",function(Ae,te,ee){var he=te/2,se=new go.Geometry().add(new go.PathFigure(te,te/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,he,he,he,he).close()));return se.spot1=Ze,se.spot2=Ke,se.defaultStretch=go.GraphObject.Uniform,se}),go.Shape.defineFigureGenerator("Line1",function(Ae,te,ee){var he=new go.Geometry(go.Geometry.Line);return he.startX=0,he.startY=0,he.endX=te,he.endY=ee,he}),go.Shape.defineFigureGenerator("Line2",function(Ae,te,ee){var he=new go.Geometry(go.Geometry.Line);return he.startX=te,he.startY=0,he.endX=0,he.endY=ee,he}),go.Shape.defineFigureGenerator("Curve1",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,te,ee,Be*te,0,te,(1-Be)*ee)))}),go.Shape.defineFigureGenerator("Curve2",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,te,ee,0,Be*ee,(1-Be)*te,ee)))}),go.Shape.defineFigureGenerator("Curve3",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(te,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,te,Be*ee,Be*te,ee)))}),go.Shape.defineFigureGenerator("Curve4",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(te,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,(1-Be)*te,0,0,(1-Be)*ee)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(te,0,!0).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new Pn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)?he=.1:he<-1?he=-1:he>1&&(he=1);var se=Math.abs(he)*te;if(he===0){var de=new go.Geometry(go.Geometry.Rectangle);return de.startX=0,de.startY=0,de.endX=te,de.endY=ee,de}else{var de=new go.Geometry;return he>0?de.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):de.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te-se,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<te/2&&de.setSpots(se/te,0,(te-se)/te,1),de}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new Pn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)?he=10:he<-te?he=-te:he>te&&(he=te);var se=Math.abs(he);if(he===0){var de=new go.Geometry(go.Geometry.Rectangle);return de.startX=0,de.startY=0,de.endX=te,de.endY=ee,de}else{var de=new go.Geometry;return he>0?de.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):de.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te-se,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<te/2&&de.setSpots(se/te,0,(te-se)/te,1),de}}),go.Shape.setFigureParameter("Trapezoid1",0,new Pn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)?he=.2:he<.5?he=-.5:he>.5&&(he=.5);var se=Math.abs(he)*te;if(he===0){var de=new go.Geometry(go.Geometry.Rectangle);return de.startX=0,de.startY=0,de.endX=te,de.endY=ee,de}else{var de=new go.Geometry;return he>0?de.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,te-se,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):de.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<te/2&&de.setSpots(se/te,0,(te-se)/te,1),de}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new Pn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)?he=20:he<-te?he=-te/2:he>te&&(he=te/2);var se=Math.abs(he);if(he===0){var de=new go.Geometry(go.Geometry.Rectangle);return de.startX=0,de.startY=0,de.endX=te,de.endY=ee,de}else{var de=new go.Geometry;return he>0?de.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,te-se,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):de.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<te/2&&de.setSpots(se/te,0,(te-se)/te,1),de}}),go.Shape.setFigureParameter("ManualOperation",0,new Pn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)?he=10:he<-te?he=-te/2:he>te&&(he=te/2);var se=Math.abs(he);if(he===0){var de=new go.Geometry(go.Geometry.Rectangle);return de.startX=0,de.startY=0,de.endX=te,de.endY=ee,de}else{var de=new go.Geometry;return he>0?de.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())):de.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,te-se,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())),se<te/2&&de.setSpots(se/te,0,(te-se)/te,1),de}});var mt=[];function ct(){var Ae=mt.pop();return Ae===void 0?[]:Ae}function He(Ae){Ae.length=0,mt.push(Ae)}function Et(Ae){for(var te=ct(),ee=.5,he=.5,se=Math.PI*1.5,de=0,me=0;me<Ae;me++)de=2*Math.PI/Ae*me+se,te[me]=new go.Point(he+ee*Math.cos(de),he+ee*Math.sin(de));return te.push(te[0]),te}function ht(Ae){var te=dt(Ae),ee=ct();ee[0]=te[0];for(var he=1,se=1;he<te.length;he+=2,se+=3)ee[se]=te[he],ee[se+1]=te[he],ee[se+2]=te[he+1];return He(te),ee}function dt(Ae){for(var te=Et(Ae),ee=ct(),he=Math.floor(te.length/2),se=te.length-1,de=Ae%2===0?2:1,me=0;me<se;me++){var we=te[me],be=te[me+1],Me=te[(he+me-1)%se],Ie=te[(he+me+de)%se];ee[me*2]=we,ee[me*2+1]=_e(we.x,we.y,Me.x,Me.y,be.x,be.y,Ie.x,Ie.y,new go.Point)}return ee[ee.length]=ee[0],He(te),ee}go.Shape.defineFigureGenerator("Pentagon",function(Ae,te,ee){var he=Et(5),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<5;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),He(he),se.spot1=new go.Spot(.2,.22),se.spot2=new go.Spot(.8,.9),se}),go.Shape.defineFigureGenerator("Hexagon",function(Ae,te,ee){var he=Et(6),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<6;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),He(he),se.spot1=new go.Spot(.07,.25),se.spot2=new go.Spot(.93,.75),se}),go.Shape.defineFigureGenerator("Heptagon",function(Ae,te,ee){var he=Et(7),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<7;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),He(he),se.spot1=new go.Spot(.2,.15),se.spot2=new go.Spot(.8,.85),se}),go.Shape.defineFigureGenerator("Octagon",function(Ae,te,ee){var he=Et(8),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<8;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),He(he),se.spot1=new go.Spot(.15,.15),se.spot2=new go.Spot(.85,.85),se}),go.Shape.defineFigureGenerator("Nonagon",function(Ae,te,ee){var he=Et(9),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<9;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),He(he),se.spot1=new go.Spot(.17,.13),se.spot2=new go.Spot(.82,.82),se}),go.Shape.defineFigureGenerator("Decagon",function(Ae,te,ee){var he=Et(10),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<10;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),He(he),se.spot1=new go.Spot(.16,.16),se.spot2=new go.Spot(.84,.84),se}),go.Shape.defineFigureGenerator("Dodecagon",function(Ae,te,ee){var he=Et(12),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<12;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),He(he),se.spot1=new go.Spot(.16,.16),se.spot2=new go.Spot(.84,.84),se}),go.Shape.defineFigureGenerator("FivePointedStar",function(Ae,te,ee){var he=dt(5),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<10;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),He(he),se.spot1=new go.Spot(.266,.333),se.spot2=new go.Spot(.733,.733),se}),go.Shape.defineFigureGenerator("SixPointedStar",function(Ae,te,ee){var he=dt(6),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<12;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),He(he),se.spot1=new go.Spot(.17,.25),se.spot2=new go.Spot(.83,.75),se}),go.Shape.defineFigureGenerator("SevenPointedStar",function(Ae,te,ee){var he=dt(7),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<14;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),He(he),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.666),se}),go.Shape.defineFigureGenerator("EightPointedStar",function(Ae,te,ee){var he=dt(8),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<16;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),He(he),se.spot1=new go.Spot(.25,.25),se.spot2=new go.Spot(.75,.75),se}),go.Shape.defineFigureGenerator("NinePointedStar",function(Ae,te,ee){var he=dt(9),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<18;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),He(he),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.666),se}),go.Shape.defineFigureGenerator("TenPointedStar",function(Ae,te,ee){var he=dt(10),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<20;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),He(he),se.spot1=new go.Spot(.281,.261),se.spot2=new go.Spot(.723,.748),se}),go.Shape.defineFigureGenerator("FivePointedBurst",function(Ae,te,ee){var he=ht(5),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<he.length;me+=3)de.add(new go.PathSegment(go.PathSegment.Bezier,he[me+2].x*te,he[me+2].y*ee,he[me].x*te,he[me].y*ee,he[me+1].x*te,he[me+1].y*ee));return de.segments.last().close(),He(he),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("SixPointedBurst",function(Ae,te,ee){var he=ht(6),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<he.length;me+=3)de.add(new go.PathSegment(go.PathSegment.Bezier,he[me+2].x*te,he[me+2].y*ee,he[me].x*te,he[me].y*ee,he[me+1].x*te,he[me+1].y*ee));return de.segments.last().close(),He(he),se.spot1=new go.Spot(.17,.222),se.spot2=new go.Spot(.833,.777),se}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(Ae,te,ee){var he=ht(7),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<he.length;me+=3)de.add(new go.PathSegment(go.PathSegment.Bezier,he[me+2].x*te,he[me+2].y*ee,he[me].x*te,he[me].y*ee,he[me+1].x*te,he[me+1].y*ee));return de.segments.last().close(),He(he),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("EightPointedBurst",function(Ae,te,ee){var he=ht(8),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<he.length;me+=3)de.add(new go.PathSegment(go.PathSegment.Bezier,he[me+2].x*te,he[me+2].y*ee,he[me].x*te,he[me].y*ee,he[me+1].x*te,he[me+1].y*ee));return de.segments.last().close(),He(he),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("NinePointedBurst",function(Ae,te,ee){var he=ht(9),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<he.length;me+=3)de.add(new go.PathSegment(go.PathSegment.Bezier,he[me+2].x*te,he[me+2].y*ee,he[me].x*te,he[me].y*ee,he[me+1].x*te,he[me+1].y*ee));return de.segments.last().close(),He(he),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("TenPointedBurst",function(Ae,te,ee){var he=ht(10),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<he.length;me+=3)de.add(new go.PathSegment(go.PathSegment.Bezier,he[me+2].x*te,he[me+2].y*ee,he[me].x*te,he[me].y*ee,he[me+1].x*te,he[me+1].y*ee));return de.segments.last().close(),He(he),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.setFigureParameter("FramedRectangle",0,new Pn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new Pn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN,se=Ae?Ae.parameter2:NaN;isNaN(he)&&(he=8),isNaN(se)&&(se=8);var de=new go.Geometry,me=new go.PathFigure(0,0,!0);return de.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,0)),me.add(new go.PathSegment(go.PathSegment.Line,te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),he<te/2&&se<ee/2&&(me.add(new go.PathSegment(go.PathSegment.Move,he,se)),me.add(new go.PathSegment(go.PathSegment.Line,he,ee-se)),me.add(new go.PathSegment(go.PathSegment.Line,te-he,ee-se)),me.add(new go.PathSegment(go.PathSegment.Line,te-he,se).close())),de.setSpots(0,0,1,1,he,se,-he,-se),de}),go.Shape.setFigureParameter("Ring",0,new Pn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;(isNaN(he)||he<0)&&(he=8);var se=te/2,de=new go.Geometry,me=new go.PathFigure(te,te/2,!0);de.add(me),me.add(new go.PathSegment(go.PathSegment.Arc,0,360,se,se,se,se).close());var we=Math.max(se-he,0);return we>0&&(me.add(new go.PathSegment(go.PathSegment.Move,te/2+we,te/2)),me.add(new go.PathSegment(go.PathSegment.Arc,0,-360,se,se,we,we).close())),de.spot1=Ze,de.spot2=Ke,de.defaultStretch=go.GraphObject.Uniform,de}),go.Shape.defineFigureGenerator("Cloud",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(.08034461*te,.1944299*ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*te,.05349299*ee,-.09239631*te,.07836421*ee,.1406031*te,-.0542823*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*te,.074219*ee,.2450511*te,-.00697547*ee,.3776197*te,-.01112067*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*te,.07004196*ee,.4539471*te,0,.6066018*te,-.02526587*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*te,.08370865*ee,.6914277*te,-.01904177*ee,.8921095*te,-.01220843*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*te,.3194596*ee,1.036446*te,.04105738*ee,1.020377*te,.3022052*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*te,.562044*ee,1.04448*te,.360238*ee,.992256*te,.5219009*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*te,.8217117*ee,1.032337*te,.5771781*ee,1.018411*te,.8120651*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*te,.9156953*ee,1.028411*te,.9571472*ee,.8556702*te,1.052487*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*te,.9310455*ee,.7431877*te,1.009325*ee,.5624123*te,1.021761*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*te,.9344623*ee,.4820677*te,1.031761*ee,.3030112*te,1.002796*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*te,.870098*ee,.2329994*te,1.01518*ee,.03213784*te,1.01518*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*te,.6545475*ee,-.02812061*te,.9032597*ee,-.01205169*te,.6835638*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*te,.4265613*ee,-.01812061*te,.6089503*ee,-.00606892*te,.4555777*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*te,.1944299*ee,-.01606892*te,.3892545*ee,-.01205169*te,.1944299*ee))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(Ae,te,ee){var he=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(he*te,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,0)).add(new go.PathSegment(go.PathSegment.Line,te,he*ee)).add(new go.PathSegment(go.PathSegment.Line,te,(1-he)*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,ee)).add(new go.PathSegment(go.PathSegment.Line,he*te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,(1-he)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,he*ee).close())).setSpots(he/2,he/2,1-he/2,1-he/2)}),go.Shape.setFigureParameter("Pie",0,new Pn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new Pn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN,se=Ae?Ae.parameter2:NaN;isNaN(he)&&(he=0),isNaN(se)&&(se=315);var de=he%360;de<0&&(de+=360);var me=se%360,we=Math.min(te,ee)/2;return new go.Geometry().add(new go.PathFigure(we,we).add(new go.PathSegment(go.PathSegment.Arc,de,me,we,we,we,we).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(Ae,te,ee){var he=Be/Math.SQRT2*.5,se=Math.SQRT2/2,de=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(te,ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,se*te,de*ee,te,(1-he)*ee,(se+he)*te,(de+he)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()))}),go.Shape.setFigureParameter("ThickCross",0,new Pn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;(isNaN(he)||he<0)&&(he=30);var se=Math.min(he,te)/2,de=te/2,me=ee/2;return new go.Geometry().add(new go.PathFigure(de-se,0,!0).add(new go.PathSegment(go.PathSegment.Line,de+se,0)).add(new go.PathSegment(go.PathSegment.Line,de+se,me-se)).add(new go.PathSegment(go.PathSegment.Line,te,me-se)).add(new go.PathSegment(go.PathSegment.Line,te,me+se)).add(new go.PathSegment(go.PathSegment.Line,de+se,me+se)).add(new go.PathSegment(go.PathSegment.Line,de+se,ee)).add(new go.PathSegment(go.PathSegment.Line,de-se,ee)).add(new go.PathSegment(go.PathSegment.Line,de-se,me+se)).add(new go.PathSegment(go.PathSegment.Line,0,me+se)).add(new go.PathSegment(go.PathSegment.Line,0,me-se)).add(new go.PathSegment(go.PathSegment.Line,de-se,me-se).close()))}),go.Shape.setFigureParameter("ThinCross",0,new Pn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;(isNaN(he)||he<0)&&(he=10);var se=Math.min(he,te)/2,de=te/2,me=ee/2;return new go.Geometry().add(new go.PathFigure(de-se,0,!0).add(new go.PathSegment(go.PathSegment.Line,de+se,0)).add(new go.PathSegment(go.PathSegment.Line,de+se,me-se)).add(new go.PathSegment(go.PathSegment.Line,te,me-se)).add(new go.PathSegment(go.PathSegment.Line,te,me+se)).add(new go.PathSegment(go.PathSegment.Line,de+se,me+se)).add(new go.PathSegment(go.PathSegment.Line,de+se,ee)).add(new go.PathSegment(go.PathSegment.Line,de-se,ee)).add(new go.PathSegment(go.PathSegment.Line,de-se,me+se)).add(new go.PathSegment(go.PathSegment.Line,0,me+se)).add(new go.PathSegment(go.PathSegment.Line,0,me-se)).add(new go.PathSegment(go.PathSegment.Line,de-se,me-se).close()))}),go.Shape.setFigureParameter("ThickX",0,new Pn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;if((isNaN(he)||he<0)&&(he=30),te===0||ee===0){var se=new go.Geometry(go.Geometry.Rectangle);return se.startX=0,se.startY=0,se.endX=te,se.endY=ee,se}else{var de=te/2,me=ee/2,we=Math.atan2(ee,te),be=he-Math.min(Math.cos(we)*he/2,de),Me=he-Math.min(Math.sin(we)*he/2,me),se=new go.Geometry,Ie=new go.PathFigure(be,0,!0);return se.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Line,de,.2*ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,te-be,0)),Ie.add(new go.PathSegment(go.PathSegment.Line,te,Me)),Ie.add(new go.PathSegment(go.PathSegment.Line,.8*te,me)),Ie.add(new go.PathSegment(go.PathSegment.Line,te,ee-Me)),Ie.add(new go.PathSegment(go.PathSegment.Line,te-be,ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,de,.8*ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,be,ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,0,ee-Me)),Ie.add(new go.PathSegment(go.PathSegment.Line,.2*te,me)),Ie.add(new go.PathSegment(go.PathSegment.Line,0,Me).close()),se}}),go.Shape.setFigureParameter("ThinX",0,new Pn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;(isNaN(he)||he<0)&&(he=10);var se=new go.Geometry,de=new go.PathFigure(.1*te,0,!0);return se.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.9*te,0)),de.add(new go.PathSegment(go.PathSegment.Line,te,.1*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.6*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.1*te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.4*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee).close()),se}),go.Shape.setFigureParameter("SquareIBeam",0,new Pn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=.2);var se=new go.Geometry,de=new go.PathFigure(0,0,!0);return se.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Line,te,he*ee)),de.add(new go.PathSegment(go.PathSegment.Line,(.5+he/2)*te,he*ee)),de.add(new go.PathSegment(go.PathSegment.Line,(.5+he/2)*te,(1-he)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,(1-he)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,(1-he)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,(.5-he/2)*te,(1-he)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,(.5-he/2)*te,he*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,he*ee).close()),se}),go.Shape.setFigureParameter("RoundedIBeam",0,new Pn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=.5);var se=new go.Geometry,de=new go.PathFigure(0,0,!0);return se.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Bezier,te,ee,Math.abs(1-he)*te,.25*ee,Math.abs(1-he)*te,.75*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,0,0,he*te,.75*ee,he*te,.25*ee).close()),se}),go.Shape.defineFigureGenerator("HalfEllipse",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,Be*te,0,te,(.5-Be/2)*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,te,(.5+Be/2)*ee,Be*te,ee).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,te,0,te,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*te,.75*ee,.5*te,.25*ee).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(.5*te,ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,.1*te,.8*ee,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.3*ee,0,0,.45*te,0)).add(new go.PathSegment(go.PathSegment.Bezier,te,.3*ee,.55*te,0,te,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,.5*ee,.9*te,.8*ee).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(.5*te,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*te,.01*ee)).add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,.6*te,.2*ee,te,.25*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.55*te,.7*ee,te,.8*ee,.6*te,.8*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.75*te,ee,.5*te,.75*ee,.55*te,.95*ee)).add(new go.PathSegment(go.PathSegment.Line,.25*te,ee)).add(new go.PathSegment(go.PathSegment.Bezier,.45*te,.7*ee,.45*te,.95*ee,.5*te,.75*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.4*te,.8*ee,0,.8*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.49*te,.01*ee,0,.25*ee,.4*te,.2*ee).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.4*te,.6*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.15*te,ee,.5*te,.75*ee,.45*te,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.6*te,.6*ee,.55*te,.95*ee,.5*te,.75*ee));var de=.2,me=.3,we=0,be=de*Be;return se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+me)*te,(.5+de+we)*ee,(.5-de+me)*te,(.5+be+we)*ee,(.5-be+me)*te,(.5+de+we)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+de+me)*te,(.5+we)*ee,(.5+be+me)*te,(.5+de+we)*ee,(.5+de+me)*te,(.5+be+we)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+me)*te,(.5-de+we)*ee,(1-.5+de+me)*te,(.5-be+we)*ee,(.5+be+me)*te,(.5-de+we)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.65*te,.36771243*ee,(.5-be+me)*te,(.5-de+we)*ee,(.5-de+me+.05)*te,(.5-be+we-.02)*ee)),de=.2,me=0,we=-.3,be=de*Be,se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+de+me)*te,(.5+we)*ee,(.5+be+me)*te,(.5+de+we)*ee,(.5+de+me)*te,(.5+be+we)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+me)*te,(.5-de+we)*ee,(1-.5+de+me)*te,(.5-be+we)*ee,(.5+be+me)*te,(.5-de+we)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-de+me)*te,(.5+we)*ee,(.5-be+me)*te,(.5-de+we)*ee,(.5-de+me)*te,(.5-be+we)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-be+me)*te,(.5+de+we)*ee,(.5-de+me)*te,(.5+be+we)*ee,(.5-be+me)*te,(.5+de+we)*ee)),de=.2,me=-.3,we=0,be=de*Be,se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+me)*te,(.5-de+we)*ee,(1-.5+de+me-.05)*te,(.5-be+we-.02)*ee,(.5+be+me)*te,(.5-de+we)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-de+me)*te,(.5+we)*ee,(.5-be+me)*te,(.5-de+we)*ee,(.5-de+me)*te,(.5-be+we)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+me)*te,(.5+de+we)*ee,(.5-de+me)*te,(.5+be+we)*ee,(.5-be+me)*te,(.5+de+we)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.4*te,.6*ee,(.5+be+me)*te,(.5+de+we)*ee,(.5+de+me)*te,(.5+be+we)*ee).close()),he.setSpots(.06,.33,.93,.68),he}),go.Shape.defineFigureGenerator("YinYang",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*.5,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,te*.5,te*.5,te*.5,te*.5)),se.add(new go.PathSegment(go.PathSegment.Arc,90,-180,te*.5,te*.75,te*.25,te*.25)),se.add(new go.PathSegment(go.PathSegment.Arc,90,180,te*.5,te*.25,te*.25,te*.25));var de=.1,me=.5,we=.25;return se.add(new go.PathSegment(go.PathSegment.Move,(me+de)*te,we*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,0,-360,te*me,ee*we,de*te,de*te).close()),se=new go.PathFigure(te*.5,0,!1),he.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,-180,te*.5,te*.5,te*.5,te*.5)),we=.75,se=new go.PathFigure((me+de)*te,we*ee,!0),he.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,0,360,te*me,ee*we,de*te,de*te).close()),he.defaultStretch=go.GraphObject.Uniform,he}),go.Shape.defineFigureGenerator("Peace",function(Ae,te,ee){var he=.8535533905932737,se=.5*te,de=.5*ee;return new go.Geometry().add(new go.PathFigure(se,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,se,de,se,de)).add(new go.PathSegment(go.PathSegment.Line,se,ee)).add(new go.PathSegment(go.PathSegment.Move,se,de)).add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,he*ee)).add(new go.PathSegment(go.PathSegment.Move,se,de)).add(new go.PathSegment(go.PathSegment.Line,he*te,he*ee)))}),go.Shape.defineFigureGenerator("NotAllowed",function(Ae,te,ee){var he=new go.Geometry,se=Be*.5,de=.5,me=.5,we=.5,be=new go.PathFigure(me*te,(we-de)*ee);he.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,(me-de)*te,we*ee,(me-se)*te,(we-de)*ee,(me-de)*te,(we-se)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+de)*ee,(me-de)*te,(we+se)*ee,(me-se)*te,(we+de)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,we*ee,(me+se)*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-de)*ee,(me+de)*te,(we-se)*ee,(me+se)*te,(we-de)*ee)),de=.4,se=Be*.4;var Me=ce(),Ie=ce(),ze=ce(),et=ce();Ct(me,we-de,me+se,we-de,me+de,we-se,me+de,we,.42,Me,Ie,ze,et,et);var $e=ce(),gt=ce(),je=ce();Ct(me,we-de,me+se,we-de,me+de,we-se,me+de,we,.58,et,et,je,$e,gt);var Tt=ce(),Qe=ce(),bt=ce();Ct(me,we+de,me-se,we+de,me-de,we+se,me-de,we,.42,Tt,Qe,bt,et,et);var Nt=ce(),At=ce(),Zt=ce();return Ct(me,we+de,me-se,we+de,me-de,we+se,me-de,we,.58,et,et,Zt,Nt,At),be.add(new go.PathSegment(go.PathSegment.Move,Zt.x*te,Zt.y*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(me-de)*te,we*ee,Nt.x*te,Nt.y*ee,At.x*te,At.y*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-de)*ee,(me-de)*te,(we-se)*ee,(me-se)*te,(we-de)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,ze.x*te,ze.y*ee,Me.x*te,Me.y*ee,Ie.x*te,Ie.y*ee)),be.add(new go.PathSegment(go.PathSegment.Line,Zt.x*te,Zt.y*ee).close()),be.add(new go.PathSegment(go.PathSegment.Move,bt.x*te,bt.y*ee)),be.add(new go.PathSegment(go.PathSegment.Line,je.x*te,je.y*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,we*ee,$e.x*te,$e.y*ee,gt.x*te,gt.y*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+de)*ee,(me+de)*te,(we+se)*ee,(me+se)*te,(we+de)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,bt.x*te,bt.y*ee,Tt.x*te,Tt.y*ee,Qe.x*te,Qe.y*ee).close()),De(Me),De(Ie),De(ze),De(et),De($e),De(gt),De(je),De(Tt),De(Qe),De(bt),De(Nt),De(At),De(Zt),he.defaultStretch=go.GraphObject.Uniform,he}),go.Shape.defineFigureGenerator("Fragile",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*te,0)).add(new go.PathSegment(go.PathSegment.Line,.2*te,.15*ee)).add(new go.PathSegment(go.PathSegment.Line,.3*te,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,.29*te,.33*ee)).add(new go.PathSegment(go.PathSegment.Line,.35*te,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,.3*te,.15*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*te,0)).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*te,.5*ee,te,.25*ee,.75*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.55*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)).add(new go.PathSegment(go.PathSegment.Line,.3*te,ee)).add(new go.PathSegment(go.PathSegment.Line,.3*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.45*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.45*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*te,.5*ee,0,.25*ee).close()))}),go.Shape.setFigureParameter("HourGlass",0,new Pn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;(isNaN(he)||he<0)&&(he=30),he>te&&(he=te);var se=(te-he)/2,de=se+he;return new go.Geometry().add(new go.PathFigure(de,.5*ee).add(new go.PathSegment(go.PathSegment.Line,te,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,te,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,.55*ee).add(new go.PathSegment(go.PathSegment.Line,.6*te,0)).add(new go.PathSegment(go.PathSegment.Line,.3*te,.45*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.45*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*te,ee)).add(new go.PathSegment(go.PathSegment.Line,.7*te,.55*ee).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(Ae,te,ee){var he=new go.Geometry,se=Be*.4,de=.4,me=.5,we=.5,be=ce(),Me=ce(),Ie=ce(),ze=ce(),et=new go.PathFigure((me-de)*te,we*ee,!1);he.add(et),et.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-de)*ee,(me-de)*te,(we-se)*ee,(me-se)*te,(we-de)*ee)),Ct(me,we-de,me+se,we-de,me+de,we-se,me+de,we,.44,Ie,ze,Me,be,be),et.add(new go.PathSegment(go.PathSegment.Bezier,Me.x*te,Me.y*ee,Ie.x*te,Ie.y*ee,ze.x*te,ze.y*ee));var $e=ve(Me.x,Me.y);Ct(me,we-de,me+se,we-de,me+de,we-se,me+de,we,.56,be,be,Me,Ie,ze);var gt=ve(Me.x,Me.y);et.add(new go.PathSegment(go.PathSegment.Line,($e.x*.1+.95*.9)*te,$e.y*.1*ee)),et.add(new go.PathSegment(go.PathSegment.Line,.85*te,$e.y*.1*ee)),et.add(new go.PathSegment(go.PathSegment.Line,.85*te,0)),et.add(new go.PathSegment(go.PathSegment.Line,te,0)),et.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),et.add(new go.PathSegment(go.PathSegment.Line,(gt.x*.1+.9)*te,.15*ee)),et.add(new go.PathSegment(go.PathSegment.Line,(gt.x*.1+.9)*te,(gt.y*.1+.05*.9)*ee)),et.add(new go.PathSegment(go.PathSegment.Line,gt.x*te,gt.y*ee)),et.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,we*ee,Ie.x*te,Ie.y*ee,ze.x*te,ze.y*ee)),et.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+de)*ee,(me+de)*te,(we+se)*ee,(me+se)*te,(we+de)*ee)),et.add(new go.PathSegment(go.PathSegment.Bezier,(me-de)*te,we*ee,(me-se)*te,(we+de)*ee,(me-de)*te,(we+se)*ee)),de=.35,se=Be*.35;var je=new go.PathFigure(me*te,(we-de)*ee,!1);he.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,(me-de)*te,we*ee,(me-se)*te,(we-de)*ee,(me-de)*te,(we-se)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+de)*ee,(me-de)*te,(we+se)*ee,(me-se)*te,(we+de)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,we*ee,(me+se)*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-de)*ee,(me+de)*te,(we-se)*ee,(me+se)*te,(we-de)*ee));var Tt=new go.PathFigure((me-de)*te,we*ee,!1);return he.add(Tt),De(be),De(Me),De(Ie),De(ze),De($e),De(gt),he.spot1=new go.Spot(.202,.257),he.spot2=new go.Spot(.792,.739),he.defaultStretch=go.GraphObject.Uniform,he}),go.Shape.defineFigureGenerator("GenderFemale",function(Ae,te,ee){var he=new go.Geometry,se=.375,de=0,me=-.125,we=se*Be,be=new go.PathFigure((.525+de)*te,(.5+se+me)*ee,!1);he.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+de)*te,(.5+me)*ee,(.5+we+de)*te,(.5+se+me)*ee,(.5+se+de)*te,(.5+we+me)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(.5+de)*te,(.5-se+me)*ee,(1-.5+se+de)*te,(.5-we+me)*ee,(.5+we+de)*te,(.5-se+me)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+de)*te,(.5+me)*ee,(.5-we+de)*te,(.5-se+me)*ee,(.5-se+de)*te,(.5-we+me)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(.475+de)*te,(.5+se+me)*ee,(.5-se+de)*te,(.5+we+me)*ee,(.5-we+de)*te,(.5+se+me)*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.475*te,.85*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.425*te,.85*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.425*te,.9*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.475*te,.9*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.475*te,ee)),be.add(new go.PathSegment(go.PathSegment.Line,.525*te,ee)),be.add(new go.PathSegment(go.PathSegment.Line,.525*te,.9*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.575*te,.9*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.575*te,.85*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.525*te,.85*ee).close()),se=.325,de=0,me=-.125,we=se*Be;var be=new go.PathFigure((1-.5+se+de)*te,(.5+me)*ee,!1);he.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,(.5+de)*te,(.5+se+me)*ee,(.5+se+de)*te,(.5+we+me)*ee,(.5+we+de)*te,(.5+se+me)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+de)*te,(.5+me)*ee,(.5-we+de)*te,(.5+se+me)*ee,(.5-se+de)*te,(.5+we+me)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(.5+de)*te,(.5-se+me)*ee,(.5-se+de)*te,(.5-we+me)*ee,(.5-we+de)*te,(.5-se+me)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+de)*te,(.5+me)*ee,(.5+we+de)*te,(.5-se+me)*ee,(1-.5+se+de)*te,(.5-we+me)*ee));var be=new go.PathFigure((.525+de)*te,(.5+se+me)*ee,!1);return he.add(be),he.spot1=new go.Spot(.232,.136),he.spot2=new go.Spot(.682,.611),he.defaultStretch=go.GraphObject.Uniform,he}),go.Shape.defineFigureGenerator("LogicImplies",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;return isNaN(he)&&(he=.2),new go.Geometry().add(new go.PathFigure((1-he)*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;return isNaN(he)&&(he=.2),new go.Geometry().add(new go.PathFigure((1-he)*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,he*te,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,he*te,ee))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)))}),go.Shape.defineFigureGenerator("LogicAnd",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)).add(new go.PathSegment(go.PathSegment.Line,te,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(Ae,te,ee){var he=new go.Geometry().add(new go.PathFigure(.5*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*te,.5*ee,.5*te,.5*ee)));return he.defaultStretch=go.GraphObject.Uniform,he}),go.Shape.defineFigureGenerator("LogicTruth",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Move,.5*te,0)).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Move,.5*te,ee)).add(new go.PathSegment(go.PathSegment.Line,.5*te,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee)))}),go.Shape.defineFigureGenerator("LogicForAll",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Move,.25*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.75*te,.5*ee))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,0,ee)).add(new go.PathSegment(go.PathSegment.Line,te,ee))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(Ae,te,ee){var he=.5;return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,0,he*ee)).add(new go.PathSegment(go.PathSegment.Arc,180,180,he*te,he*ee,he*te,he*ee)).add(new go.PathSegment(go.PathSegment.Line,te,ee))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(Ae,te,ee){var he=.5;return new go.Geometry().add(new go.PathFigure(te,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,he*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,180,he*te,he*ee,he*te,he*ee)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new Pn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new Pn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=.3);var se=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=.3);var de=(1-he)*te,me=(.5-se/2)*ee,we=(.5+se/2)*ee,be=new go.Geometry,Me=new go.PathFigure(0,me,!0);be.add(Me),Me.add(new go.PathSegment(go.PathSegment.Line,de,me)),Me.add(new go.PathSegment(go.PathSegment.Line,de,0)),Me.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,de,ee)),Me.add(new go.PathSegment(go.PathSegment.Line,de,we)),Me.add(new go.PathSegment(go.PathSegment.Line,0,we).close()),be.spot1=new go.Spot(0,me/ee);var Ie=_e(0,we/ee,1,we/ee,de/te,1,1,.5,ce());return be.spot2=new go.Spot(Ie.x,Ie.y),De(Ie),be}),go.Shape.setFigureParameter("Arrow2",0,new Pn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new Pn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=30),he>te&&(he=te);var se=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=30),se=Math.min(se,ee/2);var de=te-he,me=(ee-se)/2,we=me+se,be=new go.Geometry,Me=new go.PathFigure(0,me,!0);be.add(Me),Me.add(new go.PathSegment(go.PathSegment.Line,de,me)),Me.add(new go.PathSegment(go.PathSegment.Line,de,0)),Me.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,de,ee)),Me.add(new go.PathSegment(go.PathSegment.Line,de,we)),Me.add(new go.PathSegment(go.PathSegment.Line,0,we).close()),be.spot1=new go.Spot(0,me/ee);var Ie=_e(0,we/ee,1,we/ee,de/te,1,1,.5,ce());return be.spot2=new go.Spot(Ie.x,Ie.y),De(Ie),be}),go.Shape.defineFigureGenerator("Chevron",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee).close()),he}),go.Shape.defineFigureGenerator("DoubleArrow",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,.214*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,1*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,.786*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,1*ee).close()),he}),go.Shape.setFigureParameter("DoubleEndArrow",0,new Pn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=.3);var se=(.5-he/2)*ee,de=(.5+he/2)*ee,me=new go.Geometry,we=new go.PathFigure(te,.5*ee,!0);me.add(we),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,de)),we.add(new go.PathSegment(go.PathSegment.Line,.3*te,de)),we.add(new go.PathSegment(go.PathSegment.Line,.3*te,ee)),we.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.3*te,0)),we.add(new go.PathSegment(go.PathSegment.Line,.3*te,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,0).close());var be=_e(0,.5,.3,0,0,se/ee,.1,se/ee,ce());return me.spot1=new go.Spot(be.x,be.y),be=_e(.7,1,1,.5,0,de/ee,1,de/ee,be),me.spot2=new go.Spot(be.x,be.y),De(be),me}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new Pn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new Pn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=40);var se=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=100);var de=(ee-he)/2,me=de+he,we=(ee-se)/2,be=we+se;(he>ee||se>ee)&&(se>he?(he=he*ee/se,de=(ee-he)/2,me=de+he,we=0,be=ee):(de=0,me=ee,we=0,be=ee));var Me=new go.Geometry,Ie=new go.PathFigure(te,.5*ee,!0);Me.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*te,be)),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*te,me)),Ie.add(new go.PathSegment(go.PathSegment.Line,.3*te,me)),Ie.add(new go.PathSegment(go.PathSegment.Line,.3*te,be)),Ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,.3*te,we)),Ie.add(new go.PathSegment(go.PathSegment.Line,.3*te,de)),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*te,de)),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*te,we).close());var ze=_e(0,.5,.3,we/ee,0,de/ee,1,de/ee,ce());return Me.spot1=new go.Spot(ze.x,ze.y),ze=_e(.7,be/ee,1,.5,0,me/ee,1,me/ee,ze),Me.spot2=new go.Spot(ze.x,ze.y),De(ze),Me}),go.Shape.setFigureParameter("IBeamArrow",0,new Pn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=.3);var se=(.5-he/2)*ee,de=(.5+he/2)*ee,me=new go.Geometry,we=new go.PathFigure(te,.5*ee,!0);me.add(we),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,de)),we.add(new go.PathSegment(go.PathSegment.Line,.2*te,de)),we.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),we.add(new go.PathSegment(go.PathSegment.Line,0,ee)),we.add(new go.PathSegment(go.PathSegment.Line,0,0)),we.add(new go.PathSegment(go.PathSegment.Line,.2*te,0)),we.add(new go.PathSegment(go.PathSegment.Line,.2*te,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,0).close()),me.spot1=new go.Spot(0,se/ee);var be=_e(.7,1,1,.5,0,de/ee,1,de/ee,ce());return me.spot2=new go.Spot(be.x,be.y),De(be),me}),go.Shape.setFigureParameter("IBeamArrow2",0,new Pn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new Pn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=40);var se=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=100);var de=(ee-he)/2,me=de+he,we=(ee-se)/2,be=we+se;(he>ee||se>ee)&&(se>he?(he=he*ee/se,de=(ee-he)/2,me=de+he,we=0,be=ee):(de=0,me=ee,we=0,be=ee));var Me=new go.Geometry,Ie=new go.PathFigure(te,.5*ee,!0);Me.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*te,be)),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*te,me)),Ie.add(new go.PathSegment(go.PathSegment.Line,.2*te,me)),Ie.add(new go.PathSegment(go.PathSegment.Line,.2*te,be)),Ie.add(new go.PathSegment(go.PathSegment.Line,0,be)),Ie.add(new go.PathSegment(go.PathSegment.Line,0,we)),Ie.add(new go.PathSegment(go.PathSegment.Line,.2*te,we)),Ie.add(new go.PathSegment(go.PathSegment.Line,.2*te,de)),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*te,de)),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*te,we).close()),Me.spot1=new go.Spot(0,de/ee);var ze=_e(.7,be/ee,1,.5,0,me/ee,1,me/ee,ce());return Me.spot2=new go.Spot(ze.x,ze.y),De(ze),Me}),go.Shape.setFigureParameter("Pointer",0,new Pn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=.1);var se=new go.Geometry,de=new go.PathFigure(te,.5*ee,!0);se.add(de),de.add(new go.PathSegment(go.PathSegment.Line,0,ee)),de.add(new go.PathSegment(go.PathSegment.Line,he*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),se.spot1=new go.Spot(he,.35);var me=_e(.2,.65,1,.65,0,1,1,.5,ce());return se.spot2=new go.Spot(me.x,me.y),De(me),se}),go.Shape.setFigureParameter("RoundedPointer",0,new Pn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=.3);var se=new go.Geometry,de=new go.PathFigure(te,.5*ee,!0);se.add(de),de.add(new go.PathSegment(go.PathSegment.Line,0,ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,0,0,he*te,.75*ee,he*te,.25*ee).close()),se.spot1=new go.Spot(he,.35);var me=_e(0,.65,1,.65,0,1,1,.5,ce());return se.spot2=new go.Spot(me.x,me.y),De(me),se}),go.Shape.setFigureParameter("SplitEndArrow",0,new Pn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=.4);var se=(.5-he/2)*ee,de=(.5+he/2)*ee,me=new go.Geometry,we=new go.PathFigure(te,.5*ee,!0);me.add(we),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,de)),we.add(new go.PathSegment(go.PathSegment.Line,0,de)),we.add(new go.PathSegment(go.PathSegment.Line,.2*te,.5*ee)),we.add(new go.PathSegment(go.PathSegment.Line,0,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,0).close()),me.spot1=new go.Spot(.2,.3);var be=_e(.7,1,1,.5,0,de/ee,1,de/ee,ce());return me.spot2=new go.Spot(be.x,be.y),De(be),me}),go.Shape.setFigureParameter("SplitEndArrow2",0,new Pn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=50);var se=(ee-he)/2,de=se+he;he>ee&&(se=0,de=ee);var me=new go.Geometry,we=new go.PathFigure(te,.5*ee,!0);me.add(we),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,de)),we.add(new go.PathSegment(go.PathSegment.Line,0,de)),we.add(new go.PathSegment(go.PathSegment.Line,.2*te,.5*ee)),we.add(new go.PathSegment(go.PathSegment.Line,0,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,0).close()),me.spot1=new go.Spot(.2,se/ee);var be=_e(.7,1,1,.5,0,de/ee,1,de/ee,ce());return me.spot2=new go.Spot(be.x,be.y),De(be),me}),go.Shape.setFigureParameter("SquareArrow",0,new Pn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=.7);var se=new go.Geometry,de=new go.PathFigure(te,.5*ee,!0);return se.add(de),de.add(new go.PathSegment(go.PathSegment.Line,he*te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,0)),de.add(new go.PathSegment(go.PathSegment.Line,he*te,0).close()),se.spot1=go.Spot.TopLeft,se.spot2=new go.Spot(he,1),se}),go.Shape.defineFigureGenerator("Cone1",function(Ae,te,ee){var he=new go.Geometry,se=Be*.5,de=Be*.1,me=new go.PathFigure(0,.9*ee,!0);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),me.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,(.9+de)*ee,(.5+se)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-se)*te,ee,0,(.9+de)*ee).close()),he.spot1=new go.Spot(.25,.5),he.spot2=new go.Spot(.75,.97),he}),go.Shape.defineFigureGenerator("Cone2",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.9*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.9*ee,(1-.85/.9)*te,ee,.85/.9*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee).close());var de=new go.PathFigure(0,.9*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Bezier,te,.9*ee,(1-.85/.9)*te,.8*ee,.85/.9*te,.8*ee)),he.spot1=new go.Spot(.25,.5),he.spot2=new go.Spot(.75,.82),he}),go.Shape.defineFigureGenerator("Cube1",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.5*te,ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,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 de=new go.PathFigure(.5*te,ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,.3*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,.15*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.5*te,.3*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),he.spot1=new go.Spot(0,.3),he.spot2=new go.Spot(.5,.85),he}),go.Shape.defineFigureGenerator("Cube2",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.3*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,0).close());var de=new go.PathFigure(0,.3*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.7*te,.3*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Move,.7*te,.3*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),he.spot1=new go.Spot(0,.3),he.spot2=new go.Spot(.7,1),he}),go.Shape.defineFigureGenerator("Cylinder1",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=5),he=Math.min(he,ee/3);var se=new go.Geometry,de=Be*.5,me=new go.PathFigure(0,he,!0);se.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,Be*he,(.5-de)*te,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,1*te,he,(.5+de)*te,0,1*te,Be*he)),me.add(new go.PathSegment(go.PathSegment.Line,te,ee-he)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,1*ee,1*te,ee-Be*he,(.5+de)*te,1*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-he,(.5-de)*te,1*ee,0,ee-Be*he)),me.add(new go.PathSegment(go.PathSegment.Line,0,he));var we=new go.PathFigure(te,he,!1);return se.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,2*he,1*te,2*he-Be*he,(.5+de)*te,2*he)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,he,(.5-de)*te,2*he,0,2*he-Be*he)),se.spot1=new go.Spot(0,0,0,2*he),se.spot2=new go.Spot(1,1),se}),go.Shape.defineFigureGenerator("Cylinder2",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=5),he=Math.min(he,ee/3);var se=new go.Geometry,de=Be*.5,me=new go.PathFigure(0,ee-he,!0);se.add(me),me.add(new go.PathSegment(go.PathSegment.Line,0,he)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,Be*he,(.5-de)*te,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,te,he,(.5+de)*te,0,te,Be*he)),me.add(new go.PathSegment(go.PathSegment.Line,te,ee-he)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,ee-Be*he,(.5+de)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-he,(.5-de)*te,ee,0,ee-Be*he));var we=new go.PathFigure(0,ee-he,!1);return se.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee-2*he,0,ee-he-Be*he,(.5-de)*te,ee-2*he)),we.add(new go.PathSegment(go.PathSegment.Bezier,te,ee-he,(.5+de)*te,ee-2*he,te,ee-he-Be*he)),se.spot1=new go.Spot(0,0),se.spot2=new go.Spot(1,1,0,-2*he),se}),go.Shape.defineFigureGenerator("Cylinder3",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=5),he=Math.min(he,te/3);var se=new go.Geometry,de=Be*.5,me=new go.PathFigure(he,0,!0);se.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te-he,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,te-Be*he,0,te,(.5-de)*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,te-he,ee,te,(.5+de)*ee,te-Be*he,ee)),me.add(new go.PathSegment(go.PathSegment.Line,he,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,Be*he,ee,0,(.5+de)*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,he,0,0,(.5-de)*ee,Be*he,0));var we=new go.PathFigure(he,0,!1);return se.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,2*he,.5*ee,he+Be*he,0,2*he,(.5-de)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,he,ee,2*he,(.5+de)*ee,he+Be*he,ee)),se.spot1=new go.Spot(0,0,2*he,0),se.spot2=new go.Spot(1,1),se}),go.Shape.defineFigureGenerator("Cylinder4",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=5),he=Math.min(he,te/3);var se=new go.Geometry,de=Be*.5,me=new go.PathFigure(te-he,0,!0);se.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,te-Be*he,0,te,(.5-de)*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,te-he,ee,te,(.5+de)*ee,te-Be*he,ee)),me.add(new go.PathSegment(go.PathSegment.Line,he,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,Be*he,ee,0,(.5+de)*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,he,0,0,(.5-de)*ee,Be*he,0)),me.add(new go.PathSegment(go.PathSegment.Line,te-he,0));var we=new go.PathFigure(te-he,0,!1);return se.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,te-2*he,.5*ee,te-he-Be*he,0,te-2*he,(.5-de)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,te-he,ee,te-2*he,(.5+de)*ee,te-he-Be*he,ee)),se.spot1=new go.Spot(0,0),se.spot2=new go.Spot(1,1,-2*he,0),se}),go.Shape.defineFigureGenerator("Prism1",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.25*te,.25*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var de=new go.PathFigure(.25*te,.25*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),he.spot1=new go.Spot(.408,.172),he.spot2=new go.Spot(.833,.662),he}),go.Shape.defineFigureGenerator("Prism2",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.25*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var de=new go.PathFigure(0,ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.25*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),de.add(new go.PathSegment(go.PathSegment.Move,0,.25*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.25*te,.5*ee)),he.spot1=new go.Spot(.25,.5),he.spot2=new go.Spot(.75,.75),he}),go.Shape.defineFigureGenerator("Pyramid1",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee).close());var de=new go.PathFigure(.5*te,0,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),he.spot1=new go.Spot(.25,.367),he.spot2=new go.Spot(.75,.875),he}),go.Shape.defineFigureGenerator("Pyramid2",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee).close());var de=new go.PathFigure(.5*te,0,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,.7*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.5*te,.7*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,.85*ee)),he.spot1=new go.Spot(.25,.367),he.spot2=new go.Spot(.75,.875),he}),go.Shape.defineFigureGenerator("Actor",function(Ae,te,ee){var he=new go.Geometry,se=.2,de=.1,me=Be*se,we=Be*de,be=.5,Me=.1,Ie=new go.PathFigure(be*te,(Me+de)*ee,!0);he.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(be-se)*te,Me*ee,(be-me)*te,(Me+de)*ee,(be-se)*te,(Me+we)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,be*te,(Me-de)*ee,(be-se)*te,(Me-we)*ee,(be-me)*te,(Me-de)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(be+se)*te,Me*ee,(be+me)*te,(Me-de)*ee,(be+se)*te,(Me-we)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,be*te,(Me+de)*ee,(be+se)*te,(Me+we)*ee,(be+me)*te,(Me+de)*ee));var ze=.05,et=Be*ze;be=.05,Me=.25;var $e=new go.PathFigure(.5*te,.2*ee,!0);return he.add($e),$e.add(new go.PathSegment(go.PathSegment.Line,.95*te,.2*ee)),be=.95,Me=.25,$e.add(new go.PathSegment(go.PathSegment.Bezier,(be+ze)*te,Me*ee,(be+et)*te,(Me-ze)*ee,(be+ze)*te,(Me-et)*ee)),$e.add(new go.PathSegment(go.PathSegment.Line,te,.6*ee)),$e.add(new go.PathSegment(go.PathSegment.Line,.85*te,.6*ee)),$e.add(new go.PathSegment(go.PathSegment.Line,.85*te,.35*ee)),ze=.025,et=Be*ze,be=.825,Me=.35,$e.add(new go.PathSegment(go.PathSegment.Bezier,be*te,(Me-ze)*ee,(be+ze)*te,(Me-et)*ee,(be+et)*te,(Me-ze)*ee)),$e.add(new go.PathSegment(go.PathSegment.Bezier,(be-ze)*te,Me*ee,(be-et)*te,(Me-ze)*ee,(be-ze)*te,(Me-et)*ee)),$e.add(new go.PathSegment(go.PathSegment.Line,.8*te,ee)),$e.add(new go.PathSegment(go.PathSegment.Line,.55*te,ee)),$e.add(new go.PathSegment(go.PathSegment.Line,.55*te,.7*ee)),ze=.05,et=Be*ze,be=.5,Me=.7,$e.add(new go.PathSegment(go.PathSegment.Bezier,be*te,(Me-ze)*ee,(be+ze)*te,(Me-et)*ee,(be+et)*te,(Me-ze)*ee)),$e.add(new go.PathSegment(go.PathSegment.Bezier,(be-ze)*te,Me*ee,(be-et)*te,(Me-ze)*ee,(be-ze)*te,(Me-et)*ee)),$e.add(new go.PathSegment(go.PathSegment.Line,.45*te,ee)),$e.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),$e.add(new go.PathSegment(go.PathSegment.Line,.2*te,.35*ee)),ze=.025,et=Be*ze,be=.175,Me=.35,$e.add(new go.PathSegment(go.PathSegment.Bezier,be*te,(Me-ze)*ee,(be+ze)*te,(Me-et)*ee,(be+et)*te,(Me-ze)*ee)),$e.add(new go.PathSegment(go.PathSegment.Bezier,(be-ze)*te,Me*ee,(be-et)*te,(Me-ze)*ee,(be-ze)*te,(Me-et)*ee)),$e.add(new go.PathSegment(go.PathSegment.Line,.15*te,.6*ee)),$e.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),$e.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),ze=.05,et=Be*ze,be=.05,Me=.25,$e.add(new go.PathSegment(go.PathSegment.Bezier,be*te,(Me-ze)*ee,(be-ze)*te,(Me-et)*ee,(be-et)*te,(Me-ze)*ee)),$e.add(new go.PathSegment(go.PathSegment.Line,.5*te,.2*ee)),he.spot1=new go.Spot(.2,.2),he.spot2=new go.Spot(.8,.65),he}),go.Shape.setFigureParameter("Card",0,new Pn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=.2);var se=new go.Geometry,de=new go.PathFigure(te,0,!0);return se.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,he*ee)),de.add(new go.PathSegment(go.PathSegment.Line,he*te,0).close()),se.spot1=new go.Spot(0,he),se.spot2=go.Spot.BottomRight,se}),go.Shape.defineFigureGenerator("Collate",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.5*te,.5*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee));var de=new go.PathFigure(.5*te,.5*ee,!0);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee)),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),he.spot1=new go.Spot(.25,0),he.spot2=new go.Spot(.75,.25),he}),go.Shape.defineFigureGenerator("CreateRequest",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.1);var de=new go.PathFigure(0,0,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var me=new go.PathFigure(0,se*ee,!1);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,se*ee)),me.add(new go.PathSegment(go.PathSegment.Move,0,(1-se)*ee)),me.add(new go.PathSegment(go.PathSegment.Line,te,(1-se)*ee)),he}),go.Shape.defineFigureGenerator("Database",function(Ae,te,ee){var he=new go.Geometry,se=Be*.5,de=Be*.1,me=new go.PathFigure(te,.1*ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,(.9+de)*ee,(.5+se)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-se)*te,ee,0,(.9+de)*ee)),me.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,(.1-de)*ee,(.5-se)*te,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,te,.1*ee,(.5+se)*te,0,te,(.1-de)*ee));var we=new go.PathFigure(te,.1*ee,!1);return he.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.2*ee,te,(.1+de)*ee,(.5+se)*te,.2*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-se)*te,.2*ee,0,(.1+de)*ee)),we.add(new go.PathSegment(go.PathSegment.Move,te,.2*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.3*ee,te,(.2+de)*ee,(.5+se)*te,.3*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-se)*te,.3*ee,0,(.2+de)*ee)),we.add(new go.PathSegment(go.PathSegment.Move,te,.3*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.4*ee,te,(.3+de)*ee,(.5+se)*te,.4*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,(.5-se)*te,.4*ee,0,(.3+de)*ee)),he.spot1=new go.Spot(0,.4),he.spot2=new go.Spot(1,.9),he}),go.Shape.defineFigureGenerator("DataStorage",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.75*te,ee,te,0,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*te,.9*ee,.25*te,.1*ee).close()),he.spot1=new go.Spot(.226,0),he.spot2=new go.Spot(.81,1),he}),go.Shape.defineFigureGenerator("DiskStorage",function(Ae,te,ee){var he=new go.Geometry,se=Be*.5,de=Be*.1,me=new go.PathFigure(te,.1*ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,(.9+de)*ee,(.5+se)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-se)*te,ee,0,(.9+de)*ee)),me.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,(.1-de)*ee,(.5-se)*te,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,te,.1*ee,(.5+se)*te,0,te,(.1-de)*ee));var we=new go.PathFigure(te,.1*ee,!1);return he.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.2*ee,te,(.1+de)*ee,(.5+se)*te,.2*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-se)*te,.2*ee,0,(.1+de)*ee)),we.add(new go.PathSegment(go.PathSegment.Move,te,.2*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.3*ee,te,(.2+de)*ee,(.5+se)*te,.3*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-se)*te,.3*ee,0,(.2+de)*ee)),he.spot1=new go.Spot(0,.3),he.spot2=new go.Spot(1,.9),he}),go.Shape.defineFigureGenerator("Display",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.25*te,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.75*te,ee,te,0,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.25*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close()),he.spot1=new go.Spot(.25,0),he.spot2=new go.Spot(.75,1),he}),go.Shape.defineFigureGenerator("DividedEvent",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)?se=.2:se<.15&&(se=.15);var de=Be*.2,me=new go.PathFigure(0,.2*ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,0,0,(.2-de)*ee,(.2-de)*te,0)),me.add(new go.PathSegment(go.PathSegment.Line,.8*te,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,te,.2*ee,(.8+de)*te,0,te,(.2-de)*ee)),me.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,ee,te,(.8+de)*ee,(.8+de)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*ee,(.2-de)*te,ee,0,(.8+de)*ee)),me.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee));var we=new go.PathFigure(0,se*ee,!1);return he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,te,se*ee)),he}),go.Shape.defineFigureGenerator("DividedProcess",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;(isNaN(se)||se<.1)&&(se=.1);var de=new go.PathFigure(0,0,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var me=new go.PathFigure(0,se*ee,!1);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,se*ee)),he}),go.Shape.defineFigureGenerator("Document",function(Ae,te,ee){var he=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(0,.7*ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*te,.4*ee,.5*te,ee).close()),he.spot1=go.Spot.TopLeft,he.spot2=new go.Spot(1,.6),he}),go.Shape.defineFigureGenerator("ExternalOrganization",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;(isNaN(se)||se<.2)&&(se=.2);var de=new go.PathFigure(0,0,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var me=new go.PathFigure(se*te,0,!1);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,0,se*ee)),me.add(new go.PathSegment(go.PathSegment.Move,te,se*ee)),me.add(new go.PathSegment(go.PathSegment.Line,(1-se)*te,0)),me.add(new go.PathSegment(go.PathSegment.Move,0,(1-se)*ee)),me.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),me.add(new go.PathSegment(go.PathSegment.Move,(1-se)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,te,(1-se)*ee)),he}),go.Shape.defineFigureGenerator("ExternalProcess",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close());var de=new go.PathFigure(.1*te,.4*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.1*te,.6*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.9*te,.6*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.9*te,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.6*te,.1*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.4*te,.1*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.4*te,.9*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.6*te,.9*ee)),he.spot1=new go.Spot(.25,.25),he.spot2=new go.Spot(.75,.75),he}),go.Shape.defineFigureGenerator("File",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var de=new go.PathFigure(.75*te,0,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.75*te,.25*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),he.spot1=new go.Spot(0,.25),he.spot2=go.Spot.BottomRight,he}),go.Shape.defineFigureGenerator("Interrupt",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te,.5*ee,!0);he.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,te,.5*ee));var de=new go.PathFigure(te,.5*ee,!1);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,ee));var me=new go.PathFigure(te,.5*ee,!1);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.spot1=new go.Spot(0,.25),he.spot2=new go.Spot(.5,.75),he}),go.Shape.defineFigureGenerator("InternalStorage",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN,de=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(de)&&(de=.1);var me=new go.PathFigure(0,0,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,0)),me.add(new go.PathSegment(go.PathSegment.Line,te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var we=new go.PathFigure(se*te,0,!1);return he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),we.add(new go.PathSegment(go.PathSegment.Move,0,de*ee)),we.add(new go.PathSegment(go.PathSegment.Line,te,de*ee)),he}),go.Shape.defineFigureGenerator("Junction",function(Ae,te,ee){var he=new go.Geometry,se=1/Math.SQRT2,de=(1-1/Math.SQRT2)/2,me=Be*.5,we=.5,be=new go.PathFigure(te,we*ee,!0);he.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,we*te,ee,te,(we+me)*ee,(we+me)*te,ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,we*ee,(we-me)*te,ee,0,(we+me)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,we*te,0,0,(we-me)*ee,(we-me)*te,0)),be.add(new go.PathSegment(go.PathSegment.Bezier,te,we*ee,(we+me)*te,0,te,(we-me)*ee));var Me=new go.PathFigure((de+se)*te,(de+se)*ee,!1);return he.add(Me),Me.add(new go.PathSegment(go.PathSegment.Line,de*te,de*ee)),Me.add(new go.PathSegment(go.PathSegment.Move,de*te,(de+se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,(de+se)*te,de*ee)),he}),go.Shape.defineFigureGenerator("LinedDocument",function(Ae,te,ee){var he=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(0,.7*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*te,.4*ee,.5*te,ee).close());var de=new go.PathFigure(.1*te,0,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.1*te,.75*ee)),he.spot1=new go.Spot(.1,0),he.spot2=new go.Spot(1,.6),he}),go.Shape.defineFigureGenerator("LoopLimit",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.25*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee).close()),he.spot1=new go.Spot(0,.25),he.spot2=go.Spot.BottomRight,he}),go.Shape.defineFigureGenerator("MagneticTape",function(Ae,te,ee){var he=new go.Geometry,se=Be*.5,de=.5,me=new go.PathFigure(.5*te,ee,!0);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,0,de*ee,(de-se)*te,ee,0,(de+se)*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,de*te,0,0,(de-se)*ee,(de-se)*te,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,te,de*ee,(de+se)*te,0,te,(de-se)*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,(de+.1)*te,.9*ee,te,(de+se)*ee,(de+se)*te,.9*ee)),me.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),me.add(new go.PathSegment(go.PathSegment.Line,te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),he.spot1=new go.Spot(.15,.15),he.spot2=new go.Spot(.85,.8),he}),go.Shape.defineFigureGenerator("ManualInput",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee).close()),he.spot1=new go.Spot(0,.25),he.spot2=go.Spot.BottomRight,he}),go.Shape.defineFigureGenerator("MessageFromUser",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.7);var de=new go.PathFigure(0,0,!0);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Line,se*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),he.spot1=go.Spot.TopLeft,he}),go.Shape.defineFigureGenerator("MicroformProcessing",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.25);var de=new go.PathFigure(0,0,!0);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,se*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,(1-se)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),he}),go.Shape.defineFigureGenerator("MicroformRecording",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),he.spot1=new go.Spot(0,.25),he.spot2=new go.Spot(1,.75),he}),go.Shape.defineFigureGenerator("MultiDocument",function(Ae,te,ee){var he=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(te,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*te,.44*ee,.96*te,.47*ee,.93*te,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.54*ee,.86*te,.57*ee,.83*te,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.4*te,.4*ee,.4*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,0).close());var de=new go.PathFigure(.1*te,.2*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.54*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.2*te,.1*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.9*te,.1*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.9*te,.44*ee)),he.spot1=new go.Spot(0,.25),he.spot2=new go.Spot(.8,.77),he}),go.Shape.defineFigureGenerator("MultiProcess",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.1*te,.1*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,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*te,.2*ee).close());var de=new go.PathFigure(.2*te,.1*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.9*te,.1*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.9*te,.8*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.1*te,.2*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.9*ee)),he.spot1=new go.Spot(0,.2),he.spot2=new go.Spot(.8,1),he}),go.Shape.defineFigureGenerator("OfflineStorage",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.1);var de=1-se,me=new go.PathFigure(0,0,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,0)),me.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee).close());var we=new go.PathFigure(.5*se*te,se*ee,!1);return he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,(1-.5*se)*te,se*ee)),he}),go.Shape.defineFigureGenerator("OffPageConnector",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),he.spot1=go.Spot.TopLeft,he.spot2=new go.Spot(.75,1),he}),go.Shape.defineFigureGenerator("Or",function(Ae,te,ee){var he=new go.Geometry,se=Be*.5,de=.5,me=new go.PathFigure(te,de*ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,de*te,ee,te,(de+se)*ee,(de+se)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,de*ee,(de-se)*te,ee,0,(de+se)*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,de*te,0,0,(de-se)*ee,(de-se)*te,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,te,de*ee,(de+se)*te,0,te,(de-se)*ee));var we=new go.PathFigure(te,.5*ee,!1);return he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),we.add(new go.PathSegment(go.PathSegment.Move,.5*te,ee)),we.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),he}),go.Shape.defineFigureGenerator("PaperTape",function(Ae,te,ee){var he=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(0,.7*ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.3*ee,.5*te,.6*ee,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*te,.4*ee,.5*te,ee).close()),he.spot1=new go.Spot(0,.49),he.spot2=new go.Spot(1,.75),he}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN,de=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(de)&&(de=.3);var me=new go.PathFigure(0,0,!0);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,0)),me.add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,.5*ee)),me.add(new go.PathSegment(go.PathSegment.Line,te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),he}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN,de=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(de)&&(de=.3);var me=new go.PathFigure(0,0,!0);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,0)),me.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),me.add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),he}),go.Shape.defineFigureGenerator("Procedure",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.1);var de=new go.PathFigure(0,0,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var me=new go.PathFigure((1-se)*te,0,!1);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,(1-se)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Move,se*te,0)),me.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),he}),go.Shape.defineFigureGenerator("Process",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.1);var de=new go.PathFigure(0,0,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var me=new go.PathFigure(se*te,0,!1);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),he.spot2=go.Spot.BottomRight,he}),go.Shape.defineFigureGenerator("Sort",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close());var de=new go.PathFigure(0,.5*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),he.spot1=new go.Spot(.25,.25),he.spot2=new go.Spot(.75,.5),he}),go.Shape.defineFigureGenerator("Start",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.25);var de=new go.PathFigure(se*te,0,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*te,.5*ee,.25*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*te,.5*ee,.25*te,.5*ee));var me=new go.PathFigure(se*te,0,!1);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),me.add(new go.PathSegment(go.PathSegment.Move,(1-se)*te,0)),me.add(new go.PathSegment(go.PathSegment.Line,(1-se)*te,ee)),he.spot1=new go.Spot(se,0),he.spot2=new go.Spot(1-se,1),he}),go.Shape.defineFigureGenerator("Terminator",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.25*te,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*te,.5*ee,.25*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*te,.5*ee,.25*te,.5*ee)),he.spot1=new go.Spot(.23,0),he.spot2=new go.Spot(.77,1),he}),go.Shape.defineFigureGenerator("TransmittalTape",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.1);var de=new go.PathFigure(0,0,!0);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,.75*te,(1-se)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,(1-se)*ee).close()),he.spot1=go.Spot.TopLeft,he}),go.Shape.defineFigureGenerator("AndGate",function(Ae,te,ee){var he=new go.Geometry,se=Be*.5,de=new go.PathFigure(0,0,!0);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),de.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,(.5+se)*te,0,te,(.5-se)*ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,(.5+se)*ee,(.5+se)*te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),he.spot1=go.Spot.TopLeft,he.spot2=new go.Spot(.55,1),he}),go.Shape.defineFigureGenerator("Buffer",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),he.spot1=new go.Spot(0,.25),he.spot2=new go.Spot(.5,.75),he}),go.Shape.defineFigureGenerator("Clock",function(Ae,te,ee){var he=new go.Geometry,se=Be*.5,de=.5,me=new go.PathFigure(te,de*ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,de*te,ee,te,(de+se)*ee,(de+se)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,de*ee,(de-se)*te,ee,0,(de+se)*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,de*te,0,0,(de-se)*ee,(de-se)*te,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,te,de*ee,(de+se)*te,0,te,(de-se)*ee));var we=new go.PathFigure(te,de*ee,!1);he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,te,de*ee));var be=new go.PathFigure(.8*te,.75*ee,!1);return he.add(be),be.add(new go.PathSegment(go.PathSegment.Line,.8*te,.25*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.6*te,.25*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.6*te,.75*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.4*te,.75*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.4*te,.25*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.2*te,.25*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.2*te,.75*ee)),he}),go.Shape.defineFigureGenerator("Ground",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.5*te,0,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.3*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.4*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,ee)),he}),go.Shape.defineFigureGenerator("Inverter",function(Ae,te,ee){var he=new go.Geometry,se=Be*.1,de=.1,me=.9,we=.5,be=new go.PathFigure(.8*te,.5*ee,!0);he.add(be),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,.8*te,.5*ee));var Me=new go.PathFigure((me+de)*te,we*ee,!0);return he.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+de)*ee,(me+de)*te,(we+se)*ee,(me+se)*te,(we+de)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(me-de)*te,we*ee,(me-se)*te,(we+de)*ee,(me-de)*te,(we+se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-de)*ee,(me-de)*te,(we-se)*ee,(me-se)*te,(we-de)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,we*ee,(me+se)*te,(we-de)*ee,(me+de)*te,(we-se)*ee)),he.spot1=new go.Spot(0,.25),he.spot2=new go.Spot(.4,.75),he}),go.Shape.defineFigureGenerator("NandGate",function(Ae,te,ee){var he=new go.Geometry,se=Be*.5,de=Be*.4,me=Be*.1,we=.1,be=.9,Me=.5,Ie=new go.PathFigure(.8*te,.5*ee,!0);he.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Bezier,.4*te,ee,.8*te,(.5+de)*ee,(.4+se)*te,ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),Ie.add(new go.PathSegment(go.PathSegment.Line,.4*te,0)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.5*ee,(.4+se)*te,0,.8*te,(.5-de)*ee));var ze=new go.PathFigure((be+we)*te,Me*ee,!0);return he.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,be*te,(Me+we)*ee,(be+we)*te,(Me+me)*ee,(be+me)*te,(Me+we)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(be-we)*te,Me*ee,(be-me)*te,(Me+we)*ee,(be-we)*te,(Me+me)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,be*te,(Me-we)*ee,(be-we)*te,(Me-me)*ee,(be-me)*te,(Me-we)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(be+we)*te,Me*ee,(be+me)*te,(Me-we)*ee,(be+we)*te,(Me-me)*ee)),he.spot1=new go.Spot(0,.05),he.spot2=new go.Spot(.55,.95),he}),go.Shape.defineFigureGenerator("NorGate",function(Ae,te,ee){var he=new go.Geometry,se=.5,de=Be*se,me=0,we=.5,be=new go.PathFigure(.8*te,.5*ee,!0);he.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.7*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*te,.75*ee,.25*te,.25*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.5*ee,(me+de)*te,(we-se)*ee,.7*te,(we-de)*ee)),se=.1,de=Be*.1,me=.9,we=.5;var Me=new go.PathFigure((me-se)*te,we*ee,!0);return he.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-se)*ee,(me-se)*te,(we-de)*ee,(me-de)*te,(we-se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(me+se)*te,we*ee,(me+de)*te,(we-se)*ee,(me+se)*te,(we-de)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+se)*ee,(me+se)*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(me-se)*te,we*ee,(me-de)*te,(we+se)*ee,(me-se)*te,(we+de)*ee)),he.spot1=new go.Spot(.2,.25),he.spot2=new go.Spot(.6,.75),he}),go.Shape.defineFigureGenerator("OrGate",function(Ae,te,ee){var he=new go.Geometry,se=.5,de=Be*se,me=0,we=.5,be=new go.PathFigure(0,0,!0);return he.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,(me+de+de)*te,(we-se)*ee,.8*te,(we-de)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.8*te,(we+de)*ee,(me+de+de)*te,(we+se)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*te,.75*ee,.25*te,.25*ee).close()),he.spot1=new go.Spot(.2,.25),he.spot2=new go.Spot(.75,.75),he}),go.Shape.defineFigureGenerator("XnorGate",function(Ae,te,ee){var he=new go.Geometry,se=.5,de=Be*se,me=.2,we=.5,be=new go.PathFigure(.1*te,0,!1);he.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,.1*te,ee,.35*te,.25*ee,.35*te,.75*ee));var Me=new go.PathFigure(.8*te,.5*ee,!0);he.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,ee,.7*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,0,.45*te,.75*ee,.45*te,.25*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.5*ee,(me+de)*te,(we-se)*ee,.7*te,(we-de)*ee)),se=.1,de=Be*.1,me=.9,we=.5;var Ie=new go.PathFigure((me-se)*te,we*ee,!0);return he.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-se)*ee,(me-se)*te,(we-de)*ee,(me-de)*te,(we-se)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(me+se)*te,we*ee,(me+de)*te,(we-se)*ee,(me+se)*te,(we-de)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+se)*ee,(me+se)*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(me-se)*te,we*ee,(me-de)*te,(we+se)*ee,(me-se)*te,(we+de)*ee)),he.spot1=new go.Spot(.4,.25),he.spot2=new go.Spot(.65,.75),he}),go.Shape.defineFigureGenerator("XorGate",function(Ae,te,ee){var he=new go.Geometry,se=.5,de=Be*se,me=.2,we=.5,be=new go.PathFigure(.1*te,0,!1);he.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,.1*te,ee,.35*te,.25*ee,.35*te,.75*ee));var Me=new go.PathFigure(.2*te,0,!0);return he.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,(me+de)*te,(we-se)*ee,.9*te,(we-de)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,ee,.9*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,0,.45*te,.75*ee,.45*te,.25*ee).close()),he.spot1=new go.Spot(.4,.25),he.spot2=new go.Spot(.8,.75),he}),go.Shape.defineFigureGenerator("Capacitor",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he}),go.Shape.defineFigureGenerator("Resistor",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.5*ee,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,.5*ee)),he}),go.Shape.defineFigureGenerator("Inductor",function(Ae,te,ee){var he=new go.Geometry,se=Be*.1,de=.1,me=.1,we=.5,be=new go.PathFigure((me-se*.5)*te,ee,!1);return he.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,0,(me-se)*te,ee,(me-de)*te,0)),me=.3,be.add(new go.PathSegment(go.PathSegment.Bezier,me*te,ee,(me+de)*te,0,(me+se)*te,ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,0,(me-se)*te,ee,(me-de)*te,0)),me=.5,be.add(new go.PathSegment(go.PathSegment.Bezier,me*te,ee,(me+de)*te,0,(me+se)*te,ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,0,(me-se)*te,ee,(me-de)*te,0)),me=.7,be.add(new go.PathSegment(go.PathSegment.Bezier,me*te,ee,(me+de)*te,0,(me+se)*te,ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,0,(me-se)*te,ee,(me-de)*te,0)),me=.9,be.add(new go.PathSegment(go.PathSegment.Bezier,(me+se*.5)*te,ee,(me+de)*te,0,(me+se)*te,ee)),he}),go.Shape.defineFigureGenerator("ACvoltageSource",function(Ae,te,ee){var he=new go.Geometry,se=Be*.5,de=.5,me=.5,we=.5,be=new go.PathFigure((me-de)*te,we*ee,!1);return he.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-de)*ee,(me-de)*te,(we-se)*ee,(me-se)*te,(we-de)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,we*ee,(me+se)*te,(we-de)*ee,(me+de)*te,(we-se)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+de)*ee,(me+de)*te,(we+se)*ee,(me+se)*te,(we+de)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(me-de)*te,we*ee,(me-se)*te,(we+de)*ee,(me-de)*te,(we+se)*ee)),be.add(new go.PathSegment(go.PathSegment.Move,(me-de+.1)*te,we*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(me+de-.1)*te,we*ee,me*te,(we-de)*ee,me*te,(we+de)*ee)),he}),go.Shape.defineFigureGenerator("DCvoltageSource",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.75*ee,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he}),go.Shape.defineFigureGenerator("Diode",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te,0,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.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,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.spot1=new go.Spot(0,.25),he.spot2=new go.Spot(.5,.75),he}),go.Shape.defineFigureGenerator("Wifi",function(Ae,te,ee){var he=new go.Geometry,se=te,de=ee;te=te*.38,ee=ee*.6;var me=Be*.8,we=.8,be=0,Me=.5,Ie=(se-te)/2,ze=(de-ee)/2,et=new go.PathFigure(be*te+Ie,(Me+we)*ee+ze,!0);he.add(et),et.add(new go.PathSegment(go.PathSegment.Bezier,(be-we)*te+Ie,Me*ee+ze,(be-me)*te+Ie,(Me+we)*ee+ze,(be-we)*te+Ie,(Me+me)*ee+ze)),et.add(new go.PathSegment(go.PathSegment.Bezier,be*te+Ie,(Me-we)*ee+ze,(be-we)*te+Ie,(Me-me)*ee+ze,(be-me)*te+Ie,(Me-we)*ee+ze)),et.add(new go.PathSegment(go.PathSegment.Bezier,(be-we+me*.5)*te+Ie,Me*ee+ze,be*te+Ie,(Me-we)*ee+ze,(be-we+me*.5)*te+Ie,(Me-me)*ee+ze)),et.add(new go.PathSegment(go.PathSegment.Bezier,be*te+Ie,(Me+we)*ee+ze,(be-we+me*.5)*te+Ie,(Me+me)*ee+ze,be*te+Ie,(Me+we)*ee+ze).close()),me=Be*.4,we=.4,be=.2,Me=.5;var $e=new go.PathFigure(be*te+Ie,(Me+we)*ee+ze,!0);he.add($e),$e.add(new go.PathSegment(go.PathSegment.Bezier,(be-we)*te+Ie,Me*ee+ze,(be-me)*te+Ie,(Me+we)*ee+ze,(be-we)*te+Ie,(Me+me)*ee+ze)),$e.add(new go.PathSegment(go.PathSegment.Bezier,be*te+Ie,(Me-we)*ee+ze,(be-we)*te+Ie,(Me-me)*ee+ze,(be-me)*te+Ie,(Me-we)*ee+ze)),$e.add(new go.PathSegment(go.PathSegment.Bezier,(be-we+me*.5)*te+Ie,Me*ee+ze,be*te+Ie,(Me-we)*ee+ze,(be-we+me*.5)*te+Ie,(Me-me)*ee+ze)),$e.add(new go.PathSegment(go.PathSegment.Bezier,be*te+Ie,(Me+we)*ee+ze,(be-we+me*.5)*te+Ie,(Me+me)*ee+ze,be*te+Ie,(Me+we)*ee+ze).close()),me=Be*.2,we=.2,be=.5,Me=.5;var gt=new go.PathFigure((be-we)*te+Ie,Me*ee+ze,!0);he.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,be*te+Ie,(Me-we)*ee+ze,(be-we)*te+Ie,(Me-me)*ee+ze,(be-me)*te+Ie,(Me-we)*ee+ze)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(be+we)*te+Ie,Me*ee+ze,(be+me)*te+Ie,(Me-we)*ee+ze,(be+we)*te+Ie,(Me-me)*ee+ze)),gt.add(new go.PathSegment(go.PathSegment.Bezier,be*te+Ie,(Me+we)*ee+ze,(be+we)*te+Ie,(Me+me)*ee+ze,(be+me)*te+Ie,(Me+we)*ee+ze)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(be-we)*te+Ie,Me*ee+ze,(be-me)*te+Ie,(Me+we)*ee+ze,(be-we)*te+Ie,(Me+me)*ee+ze)),me=Be*.4,we=.4,be=.8,Me=.5;var je=new go.PathFigure(be*te+Ie,(Me-we)*ee+ze,!0);he.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,(be+we)*te+Ie,Me*ee+ze,(be+me)*te+Ie,(Me-we)*ee+ze,(be+we)*te+Ie,(Me-me)*ee+ze)),je.add(new go.PathSegment(go.PathSegment.Bezier,be*te+Ie,(Me+we)*ee+ze,(be+we)*te+Ie,(Me+me)*ee+ze,(be+me)*te+Ie,(Me+we)*ee+ze)),je.add(new go.PathSegment(go.PathSegment.Bezier,(be+we-me*.5)*te+Ie,Me*ee+ze,be*te+Ie,(Me+we)*ee+ze,(be+we-me*.5)*te+Ie,(Me+me)*ee+ze)),je.add(new go.PathSegment(go.PathSegment.Bezier,be*te+Ie,(Me-we)*ee+ze,(be+we-me*.5)*te+Ie,(Me-me)*ee+ze,be*te+Ie,(Me-we)*ee+ze).close()),me=Be*.8,we=.8,be=1,Me=.5;var Tt=new go.PathFigure(be*te+Ie,(Me-we)*ee+ze,!0);return he.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(be+we)*te+Ie,Me*ee+ze,(be+me)*te+Ie,(Me-we)*ee+ze,(be+we)*te+Ie,(Me-me)*ee+ze)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,be*te+Ie,(Me+we)*ee+ze,(be+we)*te+Ie,(Me+me)*ee+ze,(be+me)*te+Ie,(Me+we)*ee+ze)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(be+we-me*.5)*te+Ie,Me*ee+ze,be*te+Ie,(Me+we)*ee+ze,(be+we-me*.5)*te+Ie,(Me+me)*ee+ze)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,be*te+Ie,(Me-we)*ee+ze,(be+we-me*.5)*te+Ie,(Me-me)*ee+ze,be*te+Ie,(Me-we)*ee+ze).close()),he}),go.Shape.defineFigureGenerator("Email",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var de=new go.PathFigure(0,0,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Move,0,ee)),de.add(new go.PathSegment(go.PathSegment.Line,.45*te,.54*ee)),de.add(new go.PathSegment(go.PathSegment.Move,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,.55*te,.54*ee)),he}),go.Shape.defineFigureGenerator("Ethernet",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.35*te,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.65*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.65*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*te,0).close());var de=new go.PathFigure(.1*te,ee,!0,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.4*te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,.4*te,.6*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.1*te,.6*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.1*te,ee).close());var me=new go.PathFigure(.6*te,ee,!0,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,.9*te,.6*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.6*te,.6*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.6*te,ee).close());var we=new go.PathFigure(0,.5*ee,!1);return he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),we.add(new go.PathSegment(go.PathSegment.Move,.5*te,.5*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.5*te,.4*ee)),we.add(new go.PathSegment(go.PathSegment.Move,.75*te,.5*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.75*te,.6*ee)),we.add(new go.PathSegment(go.PathSegment.Move,.25*te,.5*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.25*te,.6*ee)),he}),go.Shape.defineFigureGenerator("Power",function(Ae,te,ee){var he=new go.Geometry,se=Be*.4,de=.4,me=.5,we=.5,be=ce(),Me=ce(),Ie=ce(),ze=ce();Ct(me,we-de,me+se,we-de,me+de,we-se,me+de,we,.5,be,be,Me,Ie,ze);var et=ve(Me.x,Me.y),$e=new go.PathFigure(Me.x*te,Me.y*ee,!0);he.add($e),$e.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,we*ee,Ie.x*te,Ie.y*ee,ze.x*te,ze.y*ee)),$e.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+de)*ee,(me+de)*te,(we+se)*ee,(me+se)*te,(we+de)*ee)),$e.add(new go.PathSegment(go.PathSegment.Bezier,(me-de)*te,we*ee,(me-se)*te,(we+de)*ee,(me-de)*te,(we+se)*ee)),Ct(me-de,we,me-de,we-se,me-se,we-de,me,we-de,.5,Ie,ze,Me,be,be),$e.add(new go.PathSegment(go.PathSegment.Bezier,Me.x*te,Me.y*ee,Ie.x*te,Ie.y*ee,ze.x*te,ze.y*ee)),se=Be*.3,de=.3,Ct(me-de,we,me-de,we-se,me-se,we-de,me,we-de,.5,Ie,ze,Me,be,be),$e.add(new go.PathSegment(go.PathSegment.Line,Me.x*te,Me.y*ee)),$e.add(new go.PathSegment(go.PathSegment.Bezier,(me-de)*te,we*ee,ze.x*te,ze.y*ee,Ie.x*te,Ie.y*ee)),$e.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+de)*ee,(me-de)*te,(we+se)*ee,(me-se)*te,(we+de)*ee)),$e.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,we*ee,(me+se)*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),Ct(me,we-de,me+se,we-de,me+de,we-se,me+de,we,.5,be,be,Me,Ie,ze),$e.add(new go.PathSegment(go.PathSegment.Bezier,Me.x*te,Me.y*ee,ze.x*te,ze.y*ee,Ie.x*te,Ie.y*ee).close());var $e=new go.PathFigure(.45*te,0,!0);return he.add($e),$e.add(new go.PathSegment(go.PathSegment.Line,.45*te,.5*ee)),$e.add(new go.PathSegment(go.PathSegment.Line,.55*te,.5*ee)),$e.add(new go.PathSegment(go.PathSegment.Line,.55*te,0).close()),De(be),De(Me),De(Ie),De(ze),De(et),he.spot1=new go.Spot(.25,.45),he.spot2=new go.Spot(.75,.8),he}),go.Shape.defineFigureGenerator("Fallout",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,ee/2,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,180,360,te/2,ee/2,te/2,ee/2));function de(me,we,be){me.add(new go.PathSegment(go.PathSegment.Move,(.3+we)*te,(.8+be)*ee)),me.add(new go.PathSegment(go.PathSegment.Line,(.5+we)*te,(.5+be)*ee)),me.add(new go.PathSegment(go.PathSegment.Line,(.1+we)*te,(.5+be)*ee)),me.add(new go.PathSegment(go.PathSegment.Line,(.3+we)*te,(.8+be)*ee).close())}return de(se,0,0),de(se,.4,0),de(se,.2,-.3),he}),go.Shape.defineFigureGenerator("IrritationHazard",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.2*te,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee).close()),he.spot1=new go.Spot(.3,.3),he.spot2=new go.Spot(.7,.7),he}),go.Shape.defineFigureGenerator("ElectricalHazard",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.37*te,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.11*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.77*te,.04*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.33*te,.49*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.37*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.63*te,.86*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.77*te,.91*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.34*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.34*te,.78*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.44*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.65*te,.56*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.68*ee).close()),he}),go.Shape.defineFigureGenerator("FireHazard",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.1*te,ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.29*te,0,-.25*te,.63*ee,.45*te,.44*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.51*te,.42*ee,.48*te,.17*ee,.54*te,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.59*te,.18*ee,.59*te,.29*ee,.58*te,.28*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.75*te,.6*ee,.8*te,.34*ee,.88*te,.43*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.88*te,.31*ee,.87*te,.48*ee,.88*te,.43*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*te,ee,1.17*te,.76*ee,.82*te,.8*ee).close()),he.spot1=new go.Spot(.07,.445),he.spot2=new go.Spot(.884,.958),he}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(Ae,te,ee){var he=new go.Geometry,se=.5,de=0,me=0,we=se*Be,be=.4*Math.SQRT2/2+.5,Me=.5-.5*Math.SQRT2/2,Ie=1,ze=.5,et=.5,$e=0,gt=new go.PathFigure(be*te,(1-Me)*ee,!1);return he.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,Ie*te,ze*ee,Ie*te,.7*ee,Ie*te,ze*ee)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(et+de)*te,($e+de)*ee,(.5+se+de)*te,(.5-we+de)*ee,(.5+we+de)*te,(.5-se+de)*ee)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+de)*te,(.5+me)*ee,(.5-we+de)*te,(.5-se+me)*ee,(.5-se+de)*te,(.5-we+me)*ee)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(.35+de)*te,.9*ee,(.5-se+de)*te,(.5+we+me)*ee,(.5-we+de)*te,.9*ee)),gt.add(new go.PathSegment(go.PathSegment.Move,(.25+de)*te,.8*ee)),gt.add(new go.PathSegment(go.PathSegment.Line,(.35+de)*te,.9*ee)),gt.add(new go.PathSegment(go.PathSegment.Line,(.2+de)*te,.95*ee)),he}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!1);he.add(se);var de=new go.PathFigure(te,ee,!1);he.add(de);var me=new go.PathFigure(0,.5*ee,!1);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.5*ee,.2*te,.35*ee,.3*te,.35*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,.7*te,.65*ee,.8*te,.65*ee)),he}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee).close()),he}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.2*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.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 he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee)),he}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.7*te,ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*te,0,.6*te,.5*ee,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.7*te,ee,.4*te,.5*ee,te,.5*ee).close());var de=new go.PathFigure(.45*te,.73*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.7*te,.73*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.38*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.63*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.31*te,.27*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.56*te,.27*ee)),he}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!1);he.add(se);var de=new go.PathFigure(.335*te,(1-.555)*ee,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.335*te,(1-.405)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*te,(1-.405)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*te,(1-.555)*ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,te,.68*ee,(1-.12)*te,.46*ee,(1-.02)*te,.54*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,.68*ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,.335*te,(1-.555)*ee,.02*te,.54*ee,.12*te,.46*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.365*te,(1-.595)*ee));var me=.5-.285,we=.5,be=me,Me=Math.PI/4,Ie=4*(1-Math.cos(Me))/(3*Math.sin(Me)),ze=Ie*.5,et=me,$e=me,gt=Ie*et,je=Ie*$e;de.add(new go.PathSegment(go.PathSegment.Bezier,(we-et)*te,be*ee,(we-(gt+et)/2)*te,(be+($e+je)/2)*ee,(we-et)*te,(be+je)*ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,we*te,(be-$e)*ee,(we-et)*te,(be-je)*ee,(we-gt)*te,(be-$e)*ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,(we+et)*te,be*ee,(we+gt)*te,(be-$e)*ee,(we+et)*te,(be-je)*ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*te,(1-.595)*ee,(we+et)*te,(be+je)*ee,(we+(gt+et)/2)*te,(be+($e+je)/2)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*te,(1-.595)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*te,(1-.555)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*te,(1-.405)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.335*te,(1-.405)*ee));var Tt=new go.PathFigure(.2*te,ee,!1);he.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Line,.2*te,.8*ee));var Qe=new go.PathFigure(.8*te,ee,!1);return he.add(Qe),Qe.add(new go.PathSegment(go.PathSegment.Line,.8*te,.8*ee)),he}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.1*te,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,ee).close());var de=new go.PathFigure(.2*te,.2*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.2*te,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.2*te,.6*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.6*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.2*te,.8*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.8*ee)),he}),go.Shape.defineFigureGenerator("BpmnEventError",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.33*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.66*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.66*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.33*te,.5*ee).close()),he}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!1);he.add(se);var de=new go.PathFigure(te,ee,!1);he.add(de);var me=new go.PathFigure(.1*te,ee,!0);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),me.add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee).close()),he}),go.Shape.defineFigureGenerator("Caution",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.05*te,ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.1*te,.8*ee,0,ee,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.45*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.55*te,.1*ee,.5*te,0,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.95*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*te,ee,te,ee,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.05*te,ee));var de=.05;return se.add(new go.PathSegment(go.PathSegment.Move,(.5-de)*te,.875*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*te,.875*ee,de*te,de*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.325*ee,.575*te,.725*ee,.625*te,.375*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.75*ee,.375*te,.375*ee,.425*te,.725*ee)),he}),go.Shape.defineFigureGenerator("Recycle",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.45*te,.95*ee,!1);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.185*te,.85*ee,.17*te,.95*ee,.15*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.235*te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,.625*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*te,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.275*te,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.05*te,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.05*te,.575*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.1875*te,.95*ee,0,.675*ee,0,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.45*te,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.45*te,.775*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.22*te,.775*ee));var de=new go.PathFigure(.475*te,.2*ee,!1);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.4*te,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.225*te,.3*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.275*te,.175*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.325*te,.05*ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,.4*te,.05*ee,.35*te,0,.375*te,0)),de.add(new go.PathSegment(go.PathSegment.Line,.575*te,.375*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.525*te,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.75*te,.475*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.85*te,.315*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.32*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.65*te,.05*ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,.575*te,0,.65*te,.05*ee,.625*te,0)),de.add(new go.PathSegment(go.PathSegment.Line,.38*te,.0105*ee));var me=new go.PathFigure(.675*te,.575*ee,!1);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.875*te,.525*ee)),me.add(new go.PathSegment(go.PathSegment.Line,te,.775*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,.85*te,.95*ee,te,.8*ee,te,.85*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.65*te,.95*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.65*te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,.55*te,.85*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.65*te,.725*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.65*te,.775*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.7*te,.775*ee)),me.add(new go.PathSegment(go.PathSegment.Line,te,.775*ee)),me.add(new go.PathSegment(go.PathSegment.Move,.675*te,.575*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.775*te,.775*ee)),he}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(Ae,te,ee){var he=new go.Geometry,se=.5,de=Be*.5,me=new go.PathFigure(te,se*ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,se*te,ee,te,(se+de)*ee,(se+de)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,se*ee,(se-de)*te,ee,0,(se+de)*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,se*te,0,0,(se-de)*ee,(se-de)*te,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,te,se*ee,(se+de)*te,0,te,(se-de)*ee));var we=new go.PathFigure(se*te,0,!1);return he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,se*te,.15*ee)),we.add(new go.PathSegment(go.PathSegment.Move,se*te,ee)),we.add(new go.PathSegment(go.PathSegment.Line,se*te,.85*ee)),we.add(new go.PathSegment(go.PathSegment.Move,0,se*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.15*te,se*ee)),we.add(new go.PathSegment(go.PathSegment.Move,te,se*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.85*te,se*ee)),we.add(new go.PathSegment(go.PathSegment.Move,se*te,se*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.58*te,.1*ee)),we.add(new go.PathSegment(go.PathSegment.Move,se*te,se*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.78*te,.54*ee)),he}),go.Shape.defineFigureGenerator("Package",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.15*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var de=new go.PathFigure(0,.15*ee,!0);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,0,0)),de.add(new go.PathSegment(go.PathSegment.Line,.6*te,0)),de.add(new go.PathSegment(go.PathSegment.Line,.65*te,.15*ee).close()),he.spot1=new go.Spot(0,.1),he.spot2=new go.Spot(1,1),he}),go.Shape.defineFigureGenerator("Class",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var de=new go.PathFigure(0,.2*ee,!1);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee).close());var me=new go.PathFigure(0,.5*ee,!1);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee).close()),he}),go.Shape.defineFigureGenerator("Component",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te,ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee).close());var de=new go.PathFigure(0,.2*ee,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.45*te,.2*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.45*te,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee).close());var me=new go.PathFigure(0,.6*ee,!0);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.45*te,.6*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.45*te,.8*ee)),me.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),me.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee).close()),he}),go.Shape.defineFigureGenerator("Boat Shipment",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.15*te,.6*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,.6*ee));var de=new go.PathFigure(.15*te,.6*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.85*te,.6*ee)),he}),go.Shape.defineFigureGenerator("Customer/Supplier",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te,ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.66*te,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.66*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.33*te,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.33*te,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,te,ee).close()),he}),go.Shape.defineFigureGenerator("Workcell",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.65*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.65*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),he}),go.Shape.defineFigureGenerator("Supermarket",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.66*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.66*ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,.66*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he}),go.Shape.defineFigureGenerator("TruckShipment",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,.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 de=new go.PathFigure(te,.8*ee,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.6*te,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.6*te,.8*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee).close());var me=.1,we=Be*.1,be=.2,Me=.9,Ie=new go.PathFigure((be-me)*te,Me*ee,!0);he.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Bezier,be*te,(Me-me)*ee,(be-me)*te,(Me-we)*ee,(be-we)*te,(Me-me)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(be+me)*te,Me*ee,(be+we)*te,(Me-me)*ee,(be+me)*te,(Me-we)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,be*te,(Me+me)*ee,(be+me)*te,(Me+we)*ee,(be+we)*te,(Me+me)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(be-me)*te,Me*ee,(be-we)*te,(Me+me)*ee,(be-me)*te,(Me+we)*ee).close()),me=.1,we=Be*.1,be=.8,Me=.9;var ze=new go.PathFigure((be-me)*te,Me*ee,!0);return he.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,be*te,(Me-me)*ee,(be-me)*te,(Me-we)*ee,(be-we)*te,(Me-me)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(be+me)*te,Me*ee,(be+we)*te,(Me-me)*ee,(be+me)*te,(Me-we)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,be*te,(Me+me)*ee,(be+me)*te,(Me+we)*ee,(be+we)*te,(Me+me)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(be-me)*te,Me*ee,(be-we)*te,(Me+me)*ee,(be-me)*te,(Me+we)*ee).close()),he}),go.Shape.defineFigureGenerator("KanbanPost",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.2*te,0,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,0)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,ee)),he}),go.Shape.defineFigureGenerator("Forklift",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,0));var de=new go.PathFigure(0,.5*ee,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,.8*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var me=new go.PathFigure(.5*te,.8*ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.5*te,.1*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.55*te,.1*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.55*te,.8*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.5*te,.8*ee));var we=new go.PathFigure(.5*te,.7*ee,!1);he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee));var be=.1,Me=Be*.1,Ie=.1,ze=.9,et=new go.PathFigure((Ie-be)*te,ze*ee,!0);he.add(et),et.add(new go.PathSegment(go.PathSegment.Bezier,Ie*te,(ze-be)*ee,(Ie-be)*te,(ze-Me)*ee,(Ie-Me)*te,(ze-be)*ee)),et.add(new go.PathSegment(go.PathSegment.Bezier,(Ie+be)*te,ze*ee,(Ie+Me)*te,(ze-be)*ee,(Ie+be)*te,(ze-Me)*ee)),et.add(new go.PathSegment(go.PathSegment.Bezier,Ie*te,(ze+be)*ee,(Ie+be)*te,(ze+Me)*ee,(Ie+Me)*te,(ze+be)*ee)),et.add(new go.PathSegment(go.PathSegment.Bezier,(Ie-be)*te,ze*ee,(Ie-Me)*te,(ze+be)*ee,(Ie-be)*te,(ze+Me)*ee)),be=.1,Me=Be*.1,Ie=.4,ze=.9;var $e=new go.PathFigure((Ie-be)*te,ze*ee,!0);return he.add($e),$e.add(new go.PathSegment(go.PathSegment.Bezier,Ie*te,(ze-be)*ee,(Ie-be)*te,(ze-Me)*ee,(Ie-Me)*te,(ze-be)*ee)),$e.add(new go.PathSegment(go.PathSegment.Bezier,(Ie+be)*te,ze*ee,(Ie+Me)*te,(ze-be)*ee,(Ie+be)*te,(ze-Me)*ee)),$e.add(new go.PathSegment(go.PathSegment.Bezier,Ie*te,(ze+be)*ee,(Ie+be)*te,(ze+Me)*ee,(Ie+Me)*te,(ze+be)*ee)),$e.add(new go.PathSegment(go.PathSegment.Bezier,(Ie-be)*te,ze*ee,(Ie-Me)*te,(ze+be)*ee,(Ie-be)*te,(ze+Me)*ee)),he}),go.Shape.defineFigureGenerator("RailShipment",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.1*te,.4*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.45*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.45*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.4*ee).close());var de=new go.PathFigure(.45*te,.7*ee,!1);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.55*te,.7*ee));var me=new go.PathFigure(.55*te,.4*ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.9*te,.4*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.9*te,.9*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.55*te,.9*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.55*te,.4*ee).close());var Ie=.05,ze=Be*.05,et=.175,$e=.95,we=new go.PathFigure((et-Ie)*te,$e*ee,!0);he.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,et*te,($e-Ie)*ee,(et-Ie)*te,($e-ze)*ee,(et-ze)*te,($e-Ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(et+Ie)*te,$e*ee,(et+ze)*te,($e-Ie)*ee,(et+Ie)*te,($e-ze)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,et*te,($e+Ie)*ee,(et+Ie)*te,($e+ze)*ee,(et+ze)*te,($e+Ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(et-Ie)*te,$e*ee,(et-ze)*te,($e+Ie)*ee,(et-Ie)*te,($e+ze)*ee));var Ie=.05,ze=Be*.05,et=.375,$e=.95,be=new go.PathFigure((et-Ie)*te,$e*ee,!0);he.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,et*te,($e-Ie)*ee,(et-Ie)*te,($e-ze)*ee,(et-ze)*te,($e-Ie)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(et+Ie)*te,$e*ee,(et+ze)*te,($e-Ie)*ee,(et+Ie)*te,($e-ze)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,et*te,($e+Ie)*ee,(et+Ie)*te,($e+ze)*ee,(et+ze)*te,($e+Ie)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(et-Ie)*te,$e*ee,(et-ze)*te,($e+Ie)*ee,(et-Ie)*te,($e+ze)*ee));var Ie=.05,ze=Be*.05,et=.625,$e=.95,Me=new go.PathFigure((et-Ie)*te,$e*ee,!0);he.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,et*te,($e-Ie)*ee,(et-Ie)*te,($e-ze)*ee,(et-ze)*te,($e-Ie)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(et+Ie)*te,$e*ee,(et+ze)*te,($e-Ie)*ee,(et+Ie)*te,($e-ze)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,et*te,($e+Ie)*ee,(et+Ie)*te,($e+ze)*ee,(et+ze)*te,($e+Ie)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(et-Ie)*te,$e*ee,(et-ze)*te,($e+Ie)*ee,(et-Ie)*te,($e+ze)*ee));var Ie=.05,ze=Be*.05,et=.825,$e=.95,gt=new go.PathFigure((et-Ie)*te,$e*ee,!0);he.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,et*te,($e-Ie)*ee,(et-Ie)*te,($e-ze)*ee,(et-ze)*te,($e-Ie)*ee)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(et+Ie)*te,$e*ee,(et+ze)*te,($e-Ie)*ee,(et+Ie)*te,($e-ze)*ee)),gt.add(new go.PathSegment(go.PathSegment.Bezier,et*te,($e+Ie)*ee,(et+Ie)*te,($e+ze)*ee,(et+ze)*te,($e+Ie)*ee)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(et-Ie)*te,$e*ee,(et-ze)*te,($e+Ie)*ee,(et-Ie)*te,($e+ze)*ee).close());var je=new go.PathFigure(0,ee,!1);return he.add(je),je.add(new go.PathSegment(go.PathSegment.Line,te,ee).close()),he}),go.Shape.defineFigureGenerator("Warehouse",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var de=new go.PathFigure(0,.2*ee,!1);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee).close());var me=new go.PathFigure(.15*te,ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.15*te,.5*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.4*te,.5*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.4*te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,.15*te,ee).close());var we=.05,be=Be*.05,Me=.35,Ie=.775,ze=new go.PathFigure((Me-we)*te,Ie*ee,!0);return he.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,Me*te,(Ie-we)*ee,(Me-we)*te,(Ie-be)*ee,(Me-be)*te,(Ie-we)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Me+we)*te,Ie*ee,(Me+be)*te,(Ie-we)*ee,(Me+we)*te,(Ie-be)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,Me*te,(Ie+we)*ee,(Me+we)*te,(Ie+be)*ee,(Me+be)*te,(Ie+we)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Me-we)*te,Ie*ee,(Me-be)*te,(Ie+we)*ee,(Me-we)*te,(Ie+be)*ee).close()),he}),go.Shape.defineFigureGenerator("ControlCenter",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.1*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.8*ee).close()),he}),go.Shape.defineFigureGenerator("Bluetooth",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.75*ee,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),he}),go.Shape.defineFigureGenerator("Bookmark",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Move,.2*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.4*ee)),he}),go.Shape.defineFigureGenerator("Bookmark",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Move,.2*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.4*ee)),he}),go.Shape.defineFigureGenerator("Globe",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.5*te,0,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,.75*te,0,te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,.75*ee,.75*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.25*te,ee,0,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,.25*ee,.25*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,.15*te,.25*ee,.15*te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,.85*te,.75*ee,.85*te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.1675*te,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8325*te,.15*ee,.35*te,.3*ee,.65*te,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.1675*te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8325*te,.85*ee,.35*te,.7*ee,.65*te,.7*ee)),he}),go.Shape.defineFigureGenerator("Wave",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.25*ee,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*te,.25*ee,.1*te,0,.2*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.7*te,.25*ee,.425*te,.5*ee,.575*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.25*ee,.8*te,0,.9*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.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*te,.75*ee,.1*te,.5*ee,.2*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.7*te,.75*ee,.425*te,ee,.575*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.75*ee,.8*te,.5*ee,.9*te,.5*ee)),he}),go.Shape.defineFigureGenerator("Operator",function(Ae,te,ee){var he=new go.Geometry,se=.3,de=Be*.3,me=.5,we=.7,be=new go.PathFigure((me-se)*te,we*ee,!0);he.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-se)*ee,(me-se)*te,(we-de)*ee,(me-de)*te,(we-se)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(me+se)*te,we*ee,(me+de)*te,(we-se)*ee,(me+se)*te,(we-de)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+se)*ee,(me+se)*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(me-se)*te,we*ee,(me-de)*te,(we+se)*ee,(me-se)*te,(we+de)*ee));var Me=new go.PathFigure(0,.7*ee,!1);return he.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,te,.7*ee,0,0,te,0)),he}),go.Shape.defineFigureGenerator("TripleFanBlades",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.65*ee,.65*te,.3*ee,.65*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,.35*te,.5*ee,.35*te,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.3*te,.6*ee,.1*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.65*ee,.2*te,ee,.35*te,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,ee,.7*te,.6*ee,.9*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.65*ee,.8*te,ee,.65*te,.95*ee)),he}),go.Shape.defineFigureGenerator("CentrifugalPump",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,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*te,ee,0,ee,.4*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.4*ee,.8*te,ee,.85*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),he}),go.Shape.defineFigureGenerator("Battery",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.4*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,.1*ee));var de=new go.PathFigure(0,.6*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Move,0,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,.4*ee)),he}),go.Shape.defineFigureGenerator("Delete",function(Ae,te,ee){var he=new go.Geometry,se=.5,de=Be*.5,me=.5,we=.5,be=new go.PathFigure((me-se)*te,we*ee,!0);he.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-se)*ee,(me-se)*te,(we-de)*ee,(me-de)*te,(we-se)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(me+se)*te,we*ee,(me+de)*te,(we-se)*ee,(me+se)*te,(we-de)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+se)*ee,(me+se)*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(me-se)*te,we*ee,(me-de)*te,(we+se)*ee,(me-se)*te,(we+de)*ee));var Me=new go.PathFigure(.15*te,.5*ee,!1);return he.add(Me),Me.add(new go.PathSegment(go.PathSegment.Line,.85*te,.5*ee)),he}),go.Shape.defineFigureGenerator("Flag",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.1*ee,!0);return he.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*te,.1*ee,.15*te,0,.35*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.1*ee,.65*te,.2*ee,.85*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.5*ee,.85*te,.6*ee,.65*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.35*te,.4*ee,.15*te,.4*ee).close()),he}),go.Shape.defineFigureGenerator("Help",function(Ae,te,ee){var he=new go.Geometry,se=.5,de=Be*.5,me=.5,we=.5,be=new go.PathFigure((me-se)*te,we*ee,!1);he.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-se)*ee,(me-se)*te,(we-de)*ee,(me-de)*te,(we-se)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(me+se)*te,we*ee,(me+de)*te,(we-se)*ee,(me+se)*te,(we-de)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+se)*ee,(me+se)*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(me-se)*te,we*ee,(me-de)*te,(we+se)*ee,(me-se)*te,(we+de)*ee).close()),se=.05,de=Be*.05,me=.5,we=.8;var Me=new go.PathFigure((me-se)*te,we*ee,!1);return he.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-se)*ee,(me-se)*te,(we-de)*ee,(me-de)*te,(we-se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(me+se)*te,we*ee,(me+de)*te,(we-se)*ee,(me+se)*te,(we-de)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+se)*ee,(me+se)*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(me-se)*te,we*ee,(me-de)*te,(we+se)*ee,(me-se)*te,(we+de)*ee).close()),Me.add(new go.PathSegment(go.PathSegment.Move,.5*te,.7*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.2*ee,.75*te,.475*ee,.75*te,.225*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,.3*te,.35*ee,.4*te,.2*ee,.3*te,.25*ee)),he}),go.Shape.defineFigureGenerator("Location",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(.5*te,ee,!0).add(new go.PathSegment(go.PathSegment.Line,.75*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,.975*te,.025*ee,.5*te,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*te,.5*ee,.5*te,0,.025*te,.025*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.5*te,.2*ee)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*te,.3*ee,.1*te,.1*ee).close()))}),go.Shape.defineFigureGenerator("Lock",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var de=new go.PathFigure(.2*te,.5*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Move,.2*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.2*te,.3*ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.3*ee,.25*te,0,.75*te,0)),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.3*ee)),he}),go.Shape.defineFigureGenerator("Unlocked",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var de=new go.PathFigure(.2*te,.5*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Move,.2*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.2*te,.3*ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.3*ee,.25*te,0,.75*te,0)),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.35*ee)),he}),go.Shape.defineFigureGenerator("Gear",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(.9375*te,.56246875*ee,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*te,.4375*ee)).add(new go.PathSegment(go.PathSegment.Line,.80621875*te,.4375*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.763*te,.3316875*ee,.79840625*te,.39915625*ee,.7834375*te,.3635*ee)).add(new go.PathSegment(go.PathSegment.Line,.8566875*te,.23796875*ee)).add(new go.PathSegment(go.PathSegment.Line,.76825*te,.14959375*ee)).add(new go.PathSegment(go.PathSegment.Line,.67596875*te,.24184375*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*te,.19378125*ee,.64228125*te,.2188125*ee,.603875*te,.2021875*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*te,.0625*ee)).add(new go.PathSegment(go.PathSegment.Line,.4375*te,.0625*ee)).add(new go.PathSegment(go.PathSegment.Line,.4375*te,.19378125*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*te,.239375*ee,.39759375*te,.20190625*ee,.36053125*te,.2176875*ee)).add(new go.PathSegment(go.PathSegment.Line,.2379375*te,.14959375*ee)).add(new go.PathSegment(go.PathSegment.Line,.14953125*te,.2379375*ee)).add(new go.PathSegment(go.PathSegment.Line,.23934375*te,.3278125*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*te,.4375*ee,.21765625*te,.36059375*ee,.201875*te,.397625*ee)).add(new go.PathSegment(go.PathSegment.Line,.0625*te,.4375*ee)).add(new go.PathSegment(go.PathSegment.Line,.0625*te,.5625*ee)).add(new go.PathSegment(go.PathSegment.Line,.1938125*te,.5625*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*te,.67596875*ee,.20221875*te,.603875*ee,.21884375*te,.64228125*ee)).add(new go.PathSegment(go.PathSegment.Line,.1495625*te,.76825*ee)).add(new go.PathSegment(go.PathSegment.Line,.238*te,.8566875*ee)).add(new go.PathSegment(go.PathSegment.Line,.3316875*te,.76296875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*te,.80621875*ee,.36353125*te,.78340625*ee,.3991875*te,.79840625*ee)).add(new go.PathSegment(go.PathSegment.Line,.43753125*te,.9375*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*te,.9375*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*te,.80621875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*te,.760625*ee,.602375*te,.79809375*ee,.63946875*te,.78234375*ee)).add(new go.PathSegment(go.PathSegment.Line,.76828125*te,.8566875*ee)).add(new go.PathSegment(go.PathSegment.Line,.85671875*te,.76825*ee)).add(new go.PathSegment(go.PathSegment.Line,.76065625*te,.67221875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*te,.56246875*ee,.78234375*te,.63940625*ee,.798125*te,.602375*ee)).add(new go.PathSegment(go.PathSegment.Line,.9375*te,.56246875*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.5*te,.6*ee)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*te,.5*ee,.1*te,.1*ee).close()))}),go.Shape.defineFigureGenerator("Hand",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.1*te,.3*ee,0,.375*ee,.05*te,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.45*te,.075*ee,.3*te,.225*ee,.4*te,.175*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.525*te,.075*ee,.46*te,.05*ee,.525*te,.05*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*te,.4*ee,.525*te,.275*ee,.475*te,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*te,.55*ee,te,.4*ee,te,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.425*te,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.6*te,.7*ee,.675*te,.55*ee,.675*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.575*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.575*te,.85*ee,.65*te,.7*ee,.65*te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.525*te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.535*te,ee,.61*te,.85*ee,.61*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,.435*te,ee,0,ee).close()),he}),go.Shape.defineFigureGenerator("Map",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.2*ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.25*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.25*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),se.add(new go.PathSegment(go.PathSegment.Move,.25*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.25*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,.8*ee)),he}),go.Shape.defineFigureGenerator("Eject",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee*.7)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.7).close());var de=new go.PathFigure(0,ee*.6,!0);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,.6*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,0).close()),he}),go.Shape.defineFigureGenerator("Pencil",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*te,.1*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)).add(new go.PathSegment(go.PathSegment.Line,.1*te,.2*ee).close()))}),go.Shape.defineFigureGenerator("Building",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*1,ee*1,!1);he.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*te,ee*.85)),se.add(new go.PathSegment(go.PathSegment.Line,.046*te,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*te,ee*.3)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*te,ee*.3)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee*.3)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*te,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*te,ee*.85)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee*.85).close());var de=new go.PathFigure(.126*te,.85*ee,!1);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.126*te,.45*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.322*te,.45*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.322*te,.85*ee).close());var me=new go.PathFigure(.402*te,.85*ee,!1);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.402*te,.45*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.598*te,.45*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.598*te,.85*ee).close());var we=new go.PathFigure(.678*te,.85*ee,!1);he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,.678*te,.45*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.874*te,.45*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.874*te,.85*ee).close());var be=new go.PathFigure(.5*te,.1*ee,!1);return he.add(be),be.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*te,.3*ee)),be.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*te,.3*ee).close()),he}),go.Shape.defineFigureGenerator("Staircase",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,ee*1,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.2,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.2,ee*.8)),se.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.8)),se.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.6)),se.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.6)),se.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.4)),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*.4)),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*.2)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.2)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.15)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.15)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.35,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.35,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.15,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.15,ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.95).close()),he}),go.Shape.defineFigureGenerator("5Bars",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,ee*1,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.184,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.184,ee*(1-.184)).close());var de=new go.PathFigure(te*.204,ee,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te*.204,ee*(1-.184))),de.add(new go.PathSegment(go.PathSegment.Line,te*.388,ee*(1-.184*2))),de.add(new go.PathSegment(go.PathSegment.Line,te*.388,ee*1).close());var me=new go.PathFigure(te*.408,ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te*.408,ee*(1-.184*2))),me.add(new go.PathSegment(go.PathSegment.Line,te*.592,ee*(1-.184*3))),me.add(new go.PathSegment(go.PathSegment.Line,te*.592,ee*1).close());var we=new go.PathFigure(te*.612,ee,!0);he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,te*.612,ee*(1-.184*3))),we.add(new go.PathSegment(go.PathSegment.Line,te*.796,ee*(1-.184*4))),we.add(new go.PathSegment(go.PathSegment.Line,te*.796,ee*1).close());var be=new go.PathFigure(te*.816,ee,!0);return he.add(be),be.add(new go.PathSegment(go.PathSegment.Line,te*.816,ee*(1-.184*4))),be.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*(1-.184*5))),be.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1).close()),he}),go.Shape.defineFigureGenerator("PC",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,0).close());var de=new go.PathFigure(te*.055,.07*ee,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.07)),de.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.1)),de.add(new go.PathSegment(go.PathSegment.Line,te*.055,ee*.1).close());var me=new go.PathFigure(te*.055,.13*ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.13)),me.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.16)),me.add(new go.PathSegment(go.PathSegment.Line,te*.055,ee*.16).close());var we=new go.PathFigure(te*.055,.18*ee,!0);he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.18)),we.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.21)),we.add(new go.PathSegment(go.PathSegment.Line,te*.055,ee*.21).close());var be=new go.PathFigure(te*1,0,!0);return he.add(be),be.add(new go.PathSegment(go.PathSegment.Line,te*.4,0)),be.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.65)),be.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.65).close()),he}),go.Shape.defineFigureGenerator("Plane",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.55*te,ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.475*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.35*te,.525*ee,0,.4*ee,.225*te,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,.475*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*te,.2*ee,.975*te,0,te,.08*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.55*te,ee).close()),he}),go.Shape.defineFigureGenerator("Key",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*1,ee*.5,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.9,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.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,te*.15,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.6,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.65,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.7,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.85,.575*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.9,.6*ee).close()),se.add(new go.PathSegment(go.PathSegment.Move,.17*te,.425*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*te,.5*ee,.075*te,.075*ee).close()),he}),go.Shape.defineFigureGenerator("FilmTape",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!1);he.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,te*0,te*.3,te*.055)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.08,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.08,ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*1),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*1),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*2),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*2),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*3),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*3),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*4),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*4),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*5),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*5),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*6),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*6),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*7),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*7),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*8),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*8),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*9),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*9),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*10),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*10),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*11),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*11),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*12),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*12),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*13),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*13),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*14),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*14),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*15),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*15),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1));var de=new go.PathFigure(0,0,!1);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*0)),de.add(new go.PathSegment(go.PathSegment.Arc,270,-180,te*1,te*.3,te*.055)),de.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1));var me=new go.PathFigure(te*.11,ee*.1,!1);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*1+.028*0),ee*.1)),me.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*1+.028*0),ee*.8)),me.add(new go.PathSegment(go.PathSegment.Line,te*.11,ee*.8).close());var we=new go.PathFigure(te*(.11+.24133333*1+.028*1),ee*.1,!1);he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*2+.028*1),ee*.1)),we.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*2+.028*1),ee*.8)),we.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*1+.028*1),ee*.8).close());var be=new go.PathFigure(te*(.11+.24133333*2+.028*2),ee*.1,!1);return he.add(be),be.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*3+.028*2),ee*.1)),be.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*3+.028*2),ee*.8)),be.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*2+.028*2),ee*.8).close()),he}),go.Shape.defineFigureGenerator("FloppyDisk",function(Ae,te,ee){var he=new go.Geometry,se=8,de=se*Be,me=new go.PathFigure(se,0,!1);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te*.86,0)),me.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.14)),me.add(new go.PathSegment(go.PathSegment.Line,te,ee-se)),me.add(new go.PathSegment(go.PathSegment.Bezier,te-se,ee,te,ee-de,te-de,ee)),me.add(new go.PathSegment(go.PathSegment.Line,se,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-se,de,ee,0,ee-de)),me.add(new go.PathSegment(go.PathSegment.Line,0,se)),me.add(new go.PathSegment(go.PathSegment.Bezier,se,0,0,de,de,0).close());var we=new go.PathFigure(te*.83,0,!1);he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,te*.83,ee*.3)),we.add(new go.PathSegment(go.PathSegment.Line,te*.17,ee*.3)),we.add(new go.PathSegment(go.PathSegment.Line,te*.17,ee*0).close());var be=new go.PathFigure(te*.83,ee*1,!1);he.add(be),be.add(new go.PathSegment(go.PathSegment.Line,te*.83,ee*.5)),be.add(new go.PathSegment(go.PathSegment.Line,te*.17,ee*.5)),be.add(new go.PathSegment(go.PathSegment.Line,te*.17,ee*1).close());var Me=new go.PathFigure(te*.78,ee*.05,!1);return he.add(Me),Me.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.05)),Me.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.25)),Me.add(new go.PathSegment(go.PathSegment.Line,te*.78,ee*.25).close()),he}),go.Shape.defineFigureGenerator("SpeechBubble",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;(isNaN(he)||he<0)&&(he=15),he=Math.min(he,te/3),he=Math.min(he,ee/3);var se=he*Be,de=ee*.8,me=new go.Geometry,we=new go.PathFigure(he,0,!0);return me.add(we),we.add(new go.PathSegment(go.PathSegment.Line,te-he,0)),we.add(new go.PathSegment(go.PathSegment.Bezier,te,he,te-se,0,te,se)),we.add(new go.PathSegment(go.PathSegment.Line,te,de-he)),we.add(new go.PathSegment(go.PathSegment.Bezier,te-he,de,te,de-se,te-se,de)),we.add(new go.PathSegment(go.PathSegment.Line,te*.7,de)),we.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee)),we.add(new go.PathSegment(go.PathSegment.Line,te*.55,de)),we.add(new go.PathSegment(go.PathSegment.Line,he,de)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,de-he,se,de,0,de-se)),we.add(new go.PathSegment(go.PathSegment.Line,0,he)),we.add(new go.PathSegment(go.PathSegment.Bezier,he,0,0,se,se,0).close()),se>1?(me.spot1=new go.Spot(0,0,se,se),me.spot2=new go.Spot(1,.8,-se,-se)):(me.spot1=go.Spot.TopLeft,me.spot2=new go.Spot(1,.8)),me}),go.Shape.defineFigureGenerator("Repeat",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*0,ee*.45,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.25,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,ee*.9)),se.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.9)),se.add(new go.PathSegment(go.PathSegment.Line,te*.65,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.2,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.2,ee*.45).close());var de=new go.PathFigure(te*1,ee*.55,!0);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*1)),de.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.55)),de.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee*.55)),de.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee*.1)),de.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.1)),de.add(new go.PathSegment(go.PathSegment.Line,te*.35,ee*0)),de.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*0)),de.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*.55).close()),he}),go.Shape.defineFigureGenerator("Windows",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()).add(new go.PathSegment(go.PathSegment.Move,.4*te,.4*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*te,.8*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*te,.8*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*te,.4*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.2*te,.1*ee)).add(new go.PathSegment(go.PathSegment.Line,.2*te,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*te,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*te,.1*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.1*te,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.1*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee).close()))}),go.Shape.defineFigureGenerator("Terminal",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*0,ee*.1,!1);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.9)),se.add(new go.PathSegment(go.PathSegment.Line,te*0,ee*.9).close());var de=new go.PathFigure(te*.1,ee*.2,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te*.1,ee*.25)),de.add(new go.PathSegment(go.PathSegment.Line,te*.22,ee*.285)),de.add(new go.PathSegment(go.PathSegment.Line,te*.1,ee*.32)),de.add(new go.PathSegment(go.PathSegment.Line,te*.1,ee*.37)),de.add(new go.PathSegment(go.PathSegment.Line,te*.275,ee*.32)),de.add(new go.PathSegment(go.PathSegment.Line,te*.275,ee*.25).close());var me=new go.PathFigure(te*.28,ee*.37,!0);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.37)),me.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.41)),me.add(new go.PathSegment(go.PathSegment.Line,te*.28,ee*.41).close()),he}),go.Shape.defineFigureGenerator("Beaker",function(Ae,te,ee){var he=new go.Geometry,se=15,de=se*Be,me=new go.PathFigure(te*.62,ee*.475,!0);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,ee-se)),me.add(new go.PathSegment(go.PathSegment.Bezier,te-se,ee,te,ee-de,te-de,ee)),me.add(new go.PathSegment(go.PathSegment.Line,se,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-se,de,ee,0,ee-de)),me.add(new go.PathSegment(go.PathSegment.Line,te*.38,ee*.475)),me.add(new go.PathSegment(go.PathSegment.Line,te*.38,ee*.03)),me.add(new go.PathSegment(go.PathSegment.Line,te*.36,ee*0)),me.add(new go.PathSegment(go.PathSegment.Line,te*.64,ee*0)),me.add(new go.PathSegment(go.PathSegment.Line,te*.62,ee*.03).close()),de>1?(he.spot1=new go.Spot(0,0,de,de),he.spot2=new go.Spot(1,1,-de,-de)):(he.spot1=go.Spot.TopLeft,he.spot2=go.Spot.BottomRight),he}),go.Shape.defineFigureGenerator("Download",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*0,ee*1,!0);he.add(se);var de=.1/.3;se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.755,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.93,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.64,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.61,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.39,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.36,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.07,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.755),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.8),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*0,ee*(1-de)).close());var me=new go.PathFigure(te*.4,ee*0,!0);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.44)),me.add(new go.PathSegment(go.PathSegment.Line,te*.26,ee*.44)),me.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.66)),me.add(new go.PathSegment(go.PathSegment.Line,te*(1-.26),ee*.44)),me.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.44)),me.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*0).close()),he}),go.Shape.defineFigureGenerator("Bin",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*0,ee*1,!0);he.add(se);var de=.1/.3;return se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.755,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.93,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.64,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.61,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.39,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.36,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.07,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.755),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.8),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*0,ee*(1-de)).close()),he}),go.Shape.defineFigureGenerator("Upload",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*0,ee*1,!0);he.add(se);var de=.1/.3;se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.755,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.93,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.64,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.61,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.39,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.36,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.07,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.755),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.8),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*0,ee*(1-de)).close());var me=new go.PathFigure(te*.5,ee*0,!0);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te*.26,ee*.25)),me.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.25)),me.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.63)),me.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.63)),me.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.25)),me.add(new go.PathSegment(go.PathSegment.Line,te*.74,ee*.25).close()),he}),go.Shape.defineFigureGenerator("EmptyDrink",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*.15,ee*0,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.85,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,ee*1).close()),he}),go.Shape.defineFigureGenerator("Drink",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*.15,ee*0,!1);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.85,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,ee*1).close());var de=new go.PathFigure(te*.235,ee*.28,!0);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te*.765,ee*.28)),de.add(new go.PathSegment(go.PathSegment.Line,te*.655,ee*.97)),de.add(new go.PathSegment(go.PathSegment.Line,te*.345,ee*.97).close()),he}),go.Shape.defineFigureGenerator("4Arrows",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*.5,ee*0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.65,ee*.25)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.25)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.5)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.65)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.65,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.35,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.25,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.25,ee*.65)),se.add(new go.PathSegment(go.PathSegment.Line,te*0,ee*.5)),se.add(new go.PathSegment(go.PathSegment.Line,te*.25,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,te*.25,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.25)),se.add(new go.PathSegment(go.PathSegment.Line,te*.35,ee*.25).close()),he}),go.Shape.defineFigureGenerator("Connector","Ellipse"),go.Shape.defineFigureGenerator("Alternative","TriangleUp"),go.Shape.defineFigureGenerator("Merge","TriangleUp"),go.Shape.defineFigureGenerator("Decision","Diamond"),go.Shape.defineFigureGenerator("DataTransmissions","Hexagon"),go.Shape.defineFigureGenerator("Gate","Crescent"),go.Shape.defineFigureGenerator("Delay","HalfEllipse"),go.Shape.defineFigureGenerator("Input","Parallelogram1"),go.Shape.defineFigureGenerator("ManualLoop","ManualOperation"),go.Shape.defineFigureGenerator("ISOProcess","Chevron"),go.Shape.defineFigureGenerator("MessageToUser","SquareArrow"),go.Shape.defineFigureGenerator("MagneticData","Cylinder1"),go.Shape.defineFigureGenerator("DirectData","Cylinder4"),go.Shape.defineFigureGenerator("StoredData","DataStorage"),go.Shape.defineFigureGenerator("SequentialData","MagneticTape"),go.Shape.defineFigureGenerator("Subroutine","Procedure")},80727:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var Pn={},an="5.0",ve={},ce=null,De=!1,_e=!1,Ct=null,Ze=!1,Ke=null,Be=null,mt=0;mt<arguments.length;mt++){var ct=arguments[mt];if(ct!==null)switch(typeof ct){case"number":an=ct.toFixed(1);break;case"string":ct.match(new RegExp("^[0-9]\\.[0-9]+$"))?an=ct:Ct=ct;break;case"object":typeof ct.is3D!="undefined"?ce=ct:ve=ct;break;case"boolean":De=ct,_e=!0;break}}ce===null&&(ce={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},ve.material_id!==void 0&&!_e&&(De=!0)),Ct!==null&&ve.id===void 0&&(ve.id=Ct);var He="",Et="",ht=!1,dt=null,Ae=null,te=null,ee=!1,he=null,se=null,de=null,me=null,we=null;ve.height!==void 0&&(ve.height=Math.round(ve.height)),ve.width!==void 0&&(ve.width=Math.round(ve.width));var be=function(Bt){return parseFloat(Bt)>4?parseFloat(Bt):5};Pn.setHTML5Codebase=function(Bt,Gt){Be=Bt,kt(Bt,Gt)},Pn.setJavaCodebase=Pn.setJavaCodebaseVersion=Pn.isCompiledInstalled=Pn.setPreCompiledScriptPath=Pn.setPreCompiledResourcePath=function(){},Pn.setHTML5CodebaseVersion=function(Bt,Gt){var en=parseFloat(Bt);if(en!==NaN&&en<5){console.log("The GeoGebra HTML5 codebase version "+en+" is deprecated. Using version latest instead.");return}Ke=Bt,Ge(Bt,Gt)},Pn.getHTML5CodebaseVersion=function(){return Ae},Pn.getParameters=function(){return ve},Pn.setFontsCSSURL=function(Bt){me=Bt},Pn.setGiacJSURL=function(Bt){},Pn.setJNLPFile=function(Bt){He=Bt},Pn.setJNLPBaseDir=function(Bt){},Pn.inject=function(){function Bt(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Gt="auto",en=ve.id,Bn,rn=!1,Cn=0;Cn<arguments.length;Cn++){var ft=arguments[Cn];typeof ft=="string"?(ft=ft.toLowerCase(),ft.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Gt=ft:en=arguments[Cn]):typeof ft=="boolean"?rn=ft:ft instanceof HTMLElement&&(Bn=ft)}En();function En(){if(!Ze){setTimeout(En,200);return}Gt=Yt(Gt);var Vn=Bn||document.getElementById(en);if(!Vn){console.log("possibly bug on ajax loading? ");return}if(Pn.removeExistingApplet(Vn,!1),ve.width===void 0&&Vn.clientWidth&&(ve.width=Vn.clientWidth),ve.height===void 0&&Vn.clientHeight&&(ve.height=Vn.clientHeight),!(ve.width&&ve.height)&&Gt==="html5"&&(delete ve.width,delete ve.height),dt=Gt,Gt==="screenshot")Qe(Vn,ve);else{var Re=!1;ve.hasOwnProperty("playButton")&&ve.playButton||ve.hasOwnProperty("clickToLoad")&&ve.clickToLoad?Re=!0:ve.hasOwnProperty("playButtonAutoDecide")&&ve.playButtonAutoDecide&&(Re=(!Me()||Bt())&&Ie()),Re?(dt="screenshot",Nt(Vn,ve,rn,Gt)):Tt(Vn,ve,rn)}}};function Me(){try{return window.self!==window.top}catch(Bt){return!0}}function Ie(){return ve.hasOwnProperty("screenshotGenerator")&&ve.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Pn.getViews=function(){return ce},Pn.isJavaInstalled=function(){return!1};var ze=function(Bt){var Gt=function(Cn){var ft=JSON.parse(Cn),En=function(Ce){return Ce.type=="G"||Ce.type=="E"},Vn=ft.elements?ft.elements.filter(En)[0]:ft;if(!Vn||!Vn.url){en();return}ve.fileName=Vn.url,et(Vn.settings||{}),ce.is3D=!0;var Re="https://www.geogebra.org/images/";Pn.setPreviewImage(he||Vn.previewUrl,Re+"GeoGebra_loading.png",Re+"applet_play.png"),Bt()},en=function(){ve.onError&&ve.onError(),ln("Error: Fetching material (id "+ve.material_id+") failed.",ve)},Bn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",rn="/materials/"+ve.material_id+"?scope=basic";$e("https://"+Bn+"/api/proxy.php?path="+encodeURIComponent(rn),Gt,en)};function et(Bt){var Gt=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(en){Bt[en]=!!Bt[en]}),Gt.forEach(function(en){ve[en]===void 0&&Bt[en]!==void 0&&(ve[en]=Bt[en])}),ve.showToolBarHelp===void 0&&(ve.showToolBarHelp=ve.showToolBar)}function $e(Bt,Gt,en){var Bn=new XMLHttpRequest;Bn.open("GET",Bt),Bn.onload=function(){Gt(Bn.responseText)},Bn.onerror=en,Bn.send()}Pn.isHTML5Installed=function(){return!0},Pn.getLoadedAppletType=function(){return dt},Pn.setPreviewImage=function(Bt,Gt,en){he=Bt,se=Gt,de=en},Pn.removeExistingApplet=function(Bt,Gt){var en;typeof Bt=="string"&&(Bt=document.getElementById(Bt)),dt=null;var Bn=null;for(en=0;en<Bt.childNodes.length;en++){var rn=Bt.childNodes[en],Cn=rn.className;Cn==="applet_screenshot"?Gt?(rn.style.display="block",dt="screenshot"):rn.style.display="none":Cn!=="applet_scaler prerender"&&(Bt.removeChild(rn),Bn=Cn&&Cn.indexOf("appletParameters")!=-1?rn.id:null,en--)}var ft=ve.id!==void 0?ve.id:Bn,En=window[ft];En&&typeof En.getBase64=="function"&&(En.remove(),window[ft]=null)},Pn.refreshHitPoints=function(){if(be(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Bt=Pn.getAppletObject();return Bt&&typeof Bt.recalculateEnvironments=="function"?(Bt.recalculateEnvironments(),!0):!1},Pn.startAnimation=function(){var Bt=Pn.getAppletObject();return Bt&&typeof Bt.startAnimation=="function"?(Bt.startAnimation(),!0):!1},Pn.stopAnimation=function(){var Bt=Pn.getAppletObject();return Bt&&typeof Bt.stopAnimation=="function"?(Bt.stopAnimation(),!0):!1},Pn.getAppletObject=function(){var Bt=ve.id!==void 0?ve.id:"ggbApplet";return window[Bt]},Pn.resize=function(){};var gt=function(Bt,Gt,en){var Bn=document.createElement("param");Bn.setAttribute("name",Gt),Bn.setAttribute("value",en),Bt.appendChild(Bn)},je=function(Bt){return Bt&&Bt!=="false"},Tt=function(Bt,Gt,en){be(Ae)<=4.2&&(en=!0);var Bn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Ae||ggbHTML5LoadedCodebaseIsWebSimple&&!ee)&&(Bn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var rn=document.createElement("div");rn.classList.add("appletParameters","notranslate");var Cn=Gt.width,ft=Gt.height;if(Gt.disableAutoScale=Gt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Gt.disableAutoScale,Gt.width!==void 0)if(be(Ae)<=4.4)je(Gt.showToolBar)&&(Gt.height-=7),je(Gt.showAlgebraInput)&&(Gt.height-=37),Gt.width<605&&je(Gt.showToolBar)&&(Gt.width=605,Cn=605);else{var En=100;(je(Gt.showToolBar)||je(Gt.showMenuBar))&&(Gt.hasOwnProperty("customToolBar")&&(Gt.customToolbar=Gt.customToolBar),En=je(Gt.showMenuBar)?245:155),Cn<En&&(Gt.width=En,Cn=En)}rn.style.border="none",rn.style.display="inline-block";for(var Vn in Gt)Gt.hasOwnProperty(Vn)&&Vn!=="appletOnLoad"&&rn.setAttribute("data-param-"+Vn,Gt[Vn]);me&&rn.setAttribute("data-param-fontscssurl",me),Pn.resize=function(){GGBAppletUtils.responsiveResize(Bt,Gt)},window.addEventListener("resize",function(lt){Pn.resize()});var Re=typeof Gt.appletOnLoad=="function"?Gt.appletOnLoad:function(){};if(!en&&Gt.width!==void 0){Gt.hasOwnProperty("showSplash")||rn.setAttribute("data-param-showSplash","false");var Ce=Bt.querySelector(".applet_scaler.prerender"),Pe=Ce!==null;if(Pe)var Ne=Ce.querySelector(".ggb_preview");else{var Ne=Zt(Cn,ft,Gt.borderColor,!1);Ce=document.createElement("div"),Ce.className="applet_scaler",Ce.style.position="relative",Ce.style.display="block",Ce.style.width=Cn+"px",Ce.style.height=ft+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Ce,"66%"),be(Ae)>=5?(Gt.appletOnLoad=function(lt){var Dt=Bt.querySelector(".ggb_preview");Dt&&Dt.parentNode.removeChild(Dt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Ce),window.GGBT_wsf_view&&$(window).trigger("resize"),Re(lt)},Pe||Ce.appendChild(Ne)):rn.appendChild(Ne),Ce.appendChild(rn),Pe||Bt.appendChild(Ce),setTimeout(function(){Pn.resize()},1)}else{var ke=document.createElement("div");ke.className="applet_scaler",ke.style.position="relative",ke.style.display="block",ke.appendChild(rn),Bt.appendChild(ke),Gt.appletOnLoad=function(lt){Pn.resize(),Re(lt)}}function Se(lt,Dt){Dt&&typeof Dt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(lt,Dt.appletOnLoad):renderGGBElement(lt),ln("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Dt)}function nt(lt,Dt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:lt,params:Dt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(un){Se(un.article,un.params)}),html5AppletsToProcess=null)},be(Ae)<5&&(lt.className+=" geogebraweb")):Se(lt,Dt)}if(Bn){scriptLoadStarted=!0;for(var Pt=0;Pt<rn.childNodes.length;Pt++){var qe=rn.childNodes[Pt].tagName;qe==="TABLE"&&(rn.removeChild(rn.childNodes[Pt]),Pt--)}if(ggbHTML5LoadedScript!==null){var Ue=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Ue!=null&&Ue.parentNode.removeChild(Ue)}var St=document.createElement("script"),vt=function(){nt(rn,Gt)};St.src=Et+te,ggbHTML5LoadedCodebaseIsWebSimple=ee,ggbHTML5LoadedCodebaseVersion=Ae,ggbHTML5LoadedScript=St.src,ln("GeoGebra HTML5 codebase loaded: '"+Et+"'.",Gt),!Be&&(!Ke||Ke=="5.0")?(ee?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),vt()):Et.requirejs?__webpack_require__.e(4184).then(function(){var lt=[__webpack_require__(74620)];vt.apply(null,lt)}.bind(this)).catch(__webpack_require__.oe):(St.onload=vt,Bt.appendChild(St))}else nt(rn,Gt);Gt.height=ft,Gt.width=Cn},Qe=function(Bt,Gt,en){var Bn=Zt(Gt.width,Gt.height,Gt.borderColor,en),rn=document.createElement("div");rn.style.position="relative",rn.style.display="block",rn.style.width=Gt.width+"px",rn.style.height=Gt.height+"px",rn.className="applet_screenshot applet_scaler"+(en?" applet_screenshot_play":""),rn.appendChild(Bn);var Cn=GGBAppletUtils.getScale(Gt,Bt,en);en?(Bt.appendChild(At()),window.GGBT_wsf_view||(Bt.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(rn,"66%"),Bt.appendChild(rn),Cn!==1&&!isNaN(Cn)&&(GGBAppletUtils.scaleElement(rn,Cn),rn.style.width=Gt.width+"px",rn.style.height=Gt.height+"px",rn.parentNode.style.width=Gt.width*Cn+"px",rn.parentNode.style.height=Gt.height*Cn+"px"),Pn.resize=function(){bt(Bt,Bn,rn,en)},window.addEventListener("resize",function(ft){Pn.resize()}),Pn.resize()};function bt(Bt,Gt,en,Bn){if(Bt.contains(Gt)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Bt.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Bt)}var rn=GGBAppletUtils.getScale(ve,Bt,Bn);en.parentNode!==null&&(!isNaN(rn)&&rn!==1?(GGBAppletUtils.scaleElement(en,rn),en.parentNode.style.width=ve.width*rn+"px",en.parentNode.style.height=ve.height*rn+"px"):(GGBAppletUtils.scaleElement(en,1),en.parentNode.style.width=ve.width+"px",en.parentNode.style.height=ve.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(Bt),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Pn.onExitFullscreen=function(Bt,Gt){Gt.appendChild(Bt)};var Nt=function(Bt,Gt,en,Bn){Qe(Bt,Gt,!0);for(var rn=function(){var En=[];for(ft=0;ft<Bt.childNodes.length;ft++)En.push(Bt.childNodes[ft]);if(window.GGBT_wsf_view){var Vn=window.GGBT_wsf_view.renderFullScreen(Bt,Gt.id),Re=document.getElementById("fullscreencontainer"),Ce=jQuery(Bt).find(".fullscreencontent");Ce.length>0?(Vn.remove(),Ce.attr("id","fullscreencontent").show(),jQuery(Re).append(Ce),window.dispatchEvent(new Event("resize"))):Tt(Vn,Gt,!1),window.GGBT_wsf_view.launchFullScreen(Re)}else dt=Bn,Tt(Bt,Gt,!1);if(!window.GGBT_wsf_view)for(ft=0;ft<En.length;ft++)Bt.removeChild(En[ft])},Cn=Bt.getElementsByClassName("ggb_preview_play"),ft=0;ft<Cn.length;ft++)Cn[ft].addEventListener("click",rn,!1),Cn[ft].addEventListener("ontouchstart",rn,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Bt),Ie()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},At=function(){var Bt=document.createElement("div");if(Bt.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var Gt='.icon-applet-play { width: 100%; height: 100%;box-sizing: border-box;position: absolute;z-index: 1001;cursor: pointer;border-width: 0px; background-color: transparent;background-repeat: no-repeat;left: 0;top: 0;background-position: center center; background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet.png");}.icon-applet-play:hover {background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet-hover.png");}',en=document.createElement("style");en.styleSheet?en.styleSheet.cssText=Gt:en.appendChild(document.createTextNode(Gt)),document.getElementsByTagName("head")[0].appendChild(en)}return Bt},Zt=function(Bt,Gt,en,Bn){var rn=document.createElement("div");rn.className="ggb_preview",rn.style.position="absolute",rn.style.zIndex="90",rn.style.width=Bt-2+"px",rn.style.height=Gt-2+"px",rn.style.top="0px",rn.style.left="0px",rn.style.overflow="hidden",rn.style.backgroundColor="white";var Cn="lightgrey";en!==void 0&&(en==="none"?Cn="transparent":Cn=en),rn.style.border="1px solid "+Cn;var ft=document.createElement("img");if(ft.style.position="relative",ft.style.zIndex="1000",ft.style.top="-1px",ft.style.left="-1px",he!==null&&ft.setAttribute("src",he),ft.style.opacity=.7,se!==null){var En,Vn,Re;if(!Bn){En=document.createElement("img"),En.style.position="absolute",En.style.zIndex="1001",En.style.opacity=1,ft.style.opacity=.3,Vn=360,Vn>Bt/4*3&&(Vn=Bt/4*3),Re=Vn/5.8,En.setAttribute("src",se),En.setAttribute("width",Vn),En.setAttribute("height",Re);var Ce=(Bt-Vn)/2,Pe=(Gt-Re)/2;En.style.left=Ce+"px",En.style.top=Pe+"px",rn.appendChild(En)}}return rn.appendChild(ft),rn},Yt=function(Bt){return Bt=Bt.toLowerCase(),Bt==="html5"||Bt==="screenshot"?Bt:"html5"},ut=["web","webSimple","web3d","tablet","tablet3d","phone"],Ge=function(Bt,Gt){if(Ae=Bt,Gt){kt(Ae,!0);return}var en=!De;if(en){var Bn=be(Ae);!isNaN(Bn)&&Bn<4.4&&(en=!1)}var rn,Cn;window.location.protocol.substr(0,4)==="http"?rn=window.location.protocol:rn="http:";var ft=Ae.indexOf("//");ft>0?Cn=Ae:ft===0?Cn=rn+Ae:Cn="https://www.geogebra.org/apps/5.2.814.0/";for(var En in ut)if(Ae.slice(ut[En].length*-1)===ut[En]||Ae.slice((ut[En].length+1)*-1)===ut[En]+"/"){kt(Cn,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&en&&!ce.is3D&&!ce.AV&&!ce.SV&&!ce.CV&&!ce.EV2&&!ce.CP&&!ce.PC&&!ce.DA&&!ce.FI&&!ce.PV&&!je(ve.showToolBar)&&!je(ve.showMenuBar)&&!je(ve.showAlgebraInput)&&!je(ve.enableRightClick)&&(!ve.appName||ve.appName=="classic")?Cn+="webSimple/":Cn+="web3d/",kt(Cn,!1)},kt=function(Bt,Gt){if(Bt.requirejs){Et=Bt;return}Bt.slice(-1)!=="/"&&(Bt+="/"),Et=Bt,Gt===null&&(Gt=Bt.indexOf("http")===-1),ht=Gt,te="web.nocache.js",ee=!1;var en=Et.split("/");en.length>1&&(!Gt&&en[en.length-2]==="webSimple"?(te="webSimple.nocache.js",ee=!0):ut.indexOf(en[en.length-2])>=0&&(te=en[en.length-2]+".nocache.js")),en=Bt.split("/"),Ae=en[en.length-3],Ae.substr(0,4)==="test"?Ae=Ae.substr(4,1)+"."+Ae.substr(5,1):(Ae.substr(0,3)==="war"||Ae.substr(0,4)==="beta")&&(Ae="5.0");var Bn=parseFloat(Ae);Bn!==NaN&&Bn<5&&Bt.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Bn+" is deprecated. Using version latest instead."),Ge("5.0",Gt))},ln=function(Bt,Gt){window.console&&window.console.log&&(!Gt||typeof Gt.showLogging=="undefined"||Gt.showLogging&&Gt.showLogging!=="false")&&console.log(Bt)};ve.material_id!==void 0?ze(sn):sn();function sn(){var Bt=an;Ke!==null?Bt=Ke:parseFloat(Bt)<5&&(Bt="5.0"),Ge(Bt,!1),Be!==null&&kt(Be,ht),Ze=!0}return Pn},GGBAppletUtils=function(){"use strict";function Pn(){return window.GGBT_wsf_edit!==void 0}function an(Ze,Ke){Ke!=1?(Ze.style.transformOrigin="0% 0% 0px",Ze.style.webkitTransformOrigin="0% 0% 0px",Ze.style.transform="scale("+Ke+","+Ke+")",Ze.style.webkitTransform="scale("+Ke+","+Ke+")",Ze.style.maxWidth="initial",Ze.querySelector(".ggb_preview")!==null&&(Ze.querySelector(".ggb_preview").style.maxWidth="initial"),Ze.querySelectorAll(".ggb_preview img")[0]!==void 0&&(Ze.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),Ze.querySelectorAll(".ggb_preview img")[1]!==void 0&&(Ze.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(Ze.style.transform="none",Ze.style.webkitTransform="none")}function ve(Ze,Ke,Be,mt,ct,He){var Et=null;if(He!=null&&He!="")for(var ht=Ze.parentNode;ht!=null;)if((" "+ht.className+" ").indexOf(" "+He+" ")>-1){Et=ht;break}else ht=ht.parentNode;var dt=0,Ae=0,te=0,ee=0,he=0,se=0,de=0;if(Et)dt=Et.offsetWidth,Ae=Math.max(mt?Et.offsetWidth:0,Et.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(dt=Math.min(window.innerWidth,document.documentElement.clientWidth),Ae=Math.min(window.innerHeight,document.documentElement.clientHeight),te=dt):(dt=window.innerWidth,Ae=window.innerHeight,te=window.innerWidth),Ze){var me=Ze.getBoundingClientRect();me.left>0&&me.left<=dt&&(ct===void 0||!ct)&&(document.dir==="rtl"?(he=dt-me.width-me.left,se=te<=480?10:30):(se=me.left,he=te<=480?10:30),ee=se+he)}if(Ze&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var we=Ze.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ee=40,de=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ee=0,de=40)}}return Ze&&((Be===void 0||!Be)&&Ke>0&&Ke+ee<dt?dt=Ke:dt-=ee,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Be===void 0||!Be)&&(Ae-=de)),{width:dt,height:Ae}}function ce(Ze,Ke,Be,mt,ct){if(Ze.isScreenshoGenerator)return 1;var He=mt!==void 0&&mt,Et=Ze.noScaleMargin!=null&&Ze.noScaleMargin,ht=function(we){return we&&we!=="false"},dt=ht(Ze.autoHeight),Ae=ve(Ke,Ze.width,Be,dt,He&&window.GGBT_wsf_view||Et,ct),te=parseInt(Ae.width),ee=Ze.width,he=Ze.height;if(ee===void 0){var se=Ke.querySelector(".appletParameters");se&&(ee=se.offsetWidth,he=se.offsetHeight)}var de=te/ee,me=He?1:Ae.height/he;return Be!==void 0&&!Be&&(de=Math.min(1,de),me=Math.min(1,me)),Math.min(de,me)}function De(Ze,Ke,Be){var mt=1,ct,He=!1;if(Ze.hasOwnProperty("allowUpscale")&&(He=Ze.allowUpscale),Ze.hasOwnProperty("scale")&&(mt=parseFloat(Ze.scale),(isNaN(mt)||mt===null||mt===0)&&(mt=1),mt>1&&(He=!0)),Ke&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(He=!0),!(Ze.hasOwnProperty("disableAutoScale")&&Ze.disableAutoScale))ct=ce(Ze,Ke,He,Be,Ze.scaleContainerClass);else return mt;return He&&(!Ze.hasOwnProperty("scale")||mt===1)?ct:Math.min(mt,ct)}function _e(Ze){var Ke=Math.min(window.innerWidth,document.documentElement.clientWidth),Be=Math.min(window.innerHeight,document.documentElement.clientHeight),mt=Ze.getBoundingClientRect(),ct=(Ke-mt.width)/2,He=(Be-mt.height)/2;He<0&&(He=0),Ze.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ct<40?Ze.style.left="40px":Ze.style.left=ct+"px",Ze.style.top=He+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(He<40?Ze.style.top="40px":Ze.style.top=He+"px",Ze.style.left=ct+"px")}function Ct(Ze,Ke){var Be=Ze.querySelector(".appletParameters");if(Be){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ke.id!==Be.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(Ze)}if(Be.parentElement&&/fullscreen/.test(Be.parentElement.className))return;var mt=De(Ke,Ze);Pn()&&Be.setAttribute("data-param-scale",mt);for(var ct=null,He=0;He<Ze.childNodes.length;He++)if(Ze.childNodes[He].className!==void 0&&Ze.childNodes[He].className.match(/^applet_scaler/)){ct=Ze.childNodes[He];break}if(ct!==null&&ct.querySelector(".noscale")!==null)return;var Et=Ke.id!==void 0?Ke.id:"ggbApplet",ht=window[Et];(ht==null||!ht.recalculateEnvironments)&&ct!==null&&!ct.className.match(/fullscreen/)&&(ct.parentNode.style.transform="",!isNaN(mt)&&mt!==1?(ct.parentNode.style.width=Ke.width*mt+"px",ct.parentNode.style.height=Ke.height*mt+"px",an(ct,mt)):(an(ct,1),ct.parentNode.style.width=Ke.width+"px",ct.parentNode.style.height=Ke.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&_e(Ze),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Be).parents(".content-added-content"))}}return{responsiveResize:Ct,isFlexibleWorksheetEditor:Pn,positionCenter:_e,getScale:De,scaleElement:an}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var Pn=n.location.search;return Pn.indexOf(J)!=-1||Pn.indexOf(K)!=-1}function q(Pn,an){}webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{};s[L]={moduleName:L},webModule.__moduleStartupDone=function(Pn){var an=s[L].bindings;s[L].bindings=function(){for(var ve=an?an():{},ce=Pn[webModule.__softPermutationId],De=O;De<ce.length;De++){var _e=ce[De];ve[_e[O]]=_e[P]}return ve}};var t;function u(){return v(),t}function v(){if(!t){var Pn=o.createElement(Q);if(Pn.id=L,Pn.style.cssText=R+S,Pn.tabIndex=-1,o.body.appendChild(Pn),t=Pn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var an=document.compatMode==U?V:W;t.write(an+X),t.close()}}}function w(Pn){function an(ce){function De(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var _e=De();if(_e){ce();return}function Ct(){if(!_e){if(!De())return;_e=!0,ce(),o.removeEventListener&&o.removeEventListener(Z,Ct,!1),Ze&&clearInterval(Ze)}}o.addEventListener&&o.addEventListener(Z,Ct,!1);var Ze=setInterval(function(){Ct()},$)}function ve(ce){var De=u(),_e=De.body,Ct=De.createElement(_);Ct.language=ab,Ct.crossOrigin=W,Ct.src=ce,webModule.__errFn&&(Ct.onerror=function(){webModule.__errFn(L,new Error(bb+ce))}),_e.appendChild(Ct)}an(function(){ve(Pn)})}webModule.__startLoadingFragment=function(Pn){return C(Pn)},webModule.__installRunAsyncCode=function(Pn){var an=u(),ve=an.body,ce=an.createElement(_);ce.language=ab,ce.text=Pn,ve.appendChild(ce),ve.removeChild(ce)};function A(){for(var c={},d,e,f=o.getElementsByTagName(fb),g=O,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(gb),k;if(j){if(j=j.replace(hb,W),j.indexOf(ib)>=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(Pn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Pn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Pn){var an=c[Pn];return an==null?null:an},r=d,webModule.__errFn=e}function B(){function Pn(Ze){var Ke=Ze.lastIndexOf(rb);Ke==-1&&(Ke=Ze.length);var Be=Ze.indexOf(sb);Be==-1&&(Be=Ze.length);var mt=Ze.lastIndexOf(tb,Math.min(Be,Ke));return mt>=O?Ze.substring(O,mt+P):W}function an(Ze){if(!Ze.match(/^\w+:\/\//)){var Ke=o.createElement(ub);Ke.src=Ze+vb,Ze=Pn(Ke.src)}return Ze}function ve(){var Ze=__gwt_getMetaProperty(wb);return Ze!=null?Ze:W}function ce(){for(var Ze=o.getElementsByTagName(_),Ke=O;Ke<Ze.length;++Ke)if(Ze[Ke].src.indexOf(xb)!=-1)return Pn(Ze[Ke].src);return W}function De(){var Ze=o.getElementsByTagName(yb);return Ze.length>O?Ze[Ze.length-P].href:W}function _e(){var Ze=o.location;return Ze.href==Ze.protocol+zb+Ze.host+Ze.pathname+Ze.search+Ze.hash}var Ct=ve();return Ct==W&&(Ct=ce()),Ct==W&&(Ct=De()),Ct==W&&_e()&&(Ct=Pn(o.location.href)),Ct=an(Ct),Ct}function C(Pn){return Pn.match(/^\//)||Pn.match(/^[a-zA-Z]+:\/\//)?Pn:webModule.__moduleBase+Pn}function D(){var Pn=[],an=O,ve=[],ce=[];function De(Ze){var Ke=ce[Ze](),Be=ve[Ze];if(Ke in Be)return Ke;var mt=[];for(var ct in Be)mt[Be[ct]]=ct;throw r&&r(Ze,mt,Ke),null}if(__gwt_isKnownPropertyValue=function(Ze,Ke){return Ke in ve[Ze]},webModule.__getPropMap=function(){var Ze={};for(var Ke in ve)ve.hasOwnProperty(Ke)&&(Ze[Ke]=De(Ke));return Ze},webModule.__computePropValue=De,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var _e;try{_e=Cb;var Ct=_e.indexOf(Db);Ct!=-1&&(an=parseInt(_e.substring(Ct+P),$),_e=_e.substring(O,Ct))}catch(Ze){}return webModule.__softPermutationId=an,C(_e+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},77903:function(Pn,an,ve){"use strict";ve.d(an,{Ax:function(){return Ct},Ds:function(){return Ze},KI:function(){return Be},SI:function(){return _e},f1:function(){return De}});var ce=ve(3294);function De(mt){let ct=!0;if(mt.length>0){for(let He=0;He<mt.length;He++)if(mt[He].compile_success==0||!mt[He].compile_success){ct=!1;break}}else ct=!1;return ct}function _e(mt,ct=""){let He=[];for(let Et=0;Et<mt.length;Et++){let ht=mt[Et],dt=ct?`${ct}/${ht.name}`:`${ht.name}`;He.push({title:ht.name,type:ht.type,isLeaf:ht.type!=="tree",key:dt})}return He}function Ct(mt,ct,He){for(let Et=0;Et<mt.length;Et++){let ht=mt[Et];if(ht.key===ct){ht.children=He;break}ht.children&&Ct(ht.children,ct,He)}return mt}function Ze(mt,ct,He){let Et;return function(){let ht=this,dt=arguments,Ae=function(){Et=null,He||mt.apply(ht,dt)},te=He&&!Et;clearTimeout(Et),Et=setTimeout(Ae,ct),te&&mt.apply(ht,dt)}}const Ke=!0,Be=ce.Z.API_SERVER},6021:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return Ae}});var ce=ve(3113),De=ve(59301),_e=Object.defineProperty,Ct=Object.defineProperties,Ze=Object.getOwnPropertyDescriptors,Ke=Object.getOwnPropertySymbols,Be=Object.prototype.hasOwnProperty,mt=Object.prototype.propertyIsEnumerable,ct=(te,ee,he)=>ee in te?_e(te,ee,{enumerable:!0,configurable:!0,writable:!0,value:he}):te[ee]=he,He=(te,ee)=>{for(var he in ee||(ee={}))Be.call(ee,he)&&ct(te,he,ee[he]);if(Ke)for(var he of Ke(ee))mt.call(ee,he)&&ct(te,he,ee[he]);return te},Et=(te,ee)=>Ct(te,Ze(ee)),ht=(te,ee)=>{var he={};for(var se in te)Be.call(te,se)&&ee.indexOf(se)<0&&(he[se]=te[se]);if(te!=null&&Ke)for(var se of Ke(te))ee.indexOf(se)<0&&mt.call(te,se)&&(he[se]=te[se]);return he},dt=(te,ee,he)=>new Promise((se,de)=>{var me=Me=>{try{be(he.next(Me))}catch(Ie){de(Ie)}},we=Me=>{try{be(he.throw(Me))}catch(Ie){de(Ie)}},be=Me=>Me.done?se(Me.value):Promise.resolve(Me.value).then(me,we);be((he=he.apply(te,ee)).next())});const Ae=te=>{var ee=te,{children:he}=ee,se=ht(ee,["children"]);const[de,me]=(0,De.useState)(!1);return De.createElement(ce.ZP,Et(He({},se),{loading:de,onClick:we=>dt(void 0,null,function*(){try{me(!0),yield se.onClick(we),me(!1)}catch(be){console.error(be),me(!1)}})}),he)}},59155:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return dt}});var ce=ve(59301),De=ve(8591),_e=ve(92832),Ct={codeBox:"codeBox___WpkVl"},Ze=ve(92310),Ke=ve.n(Ze),Be=Object.defineProperty,mt=(Ae,te,ee)=>te in Ae?Be(Ae,te,{enumerable:!0,configurable:!0,writable:!0,value:ee}):Ae[te]=ee,ct=(Ae,te,ee)=>mt(Ae,typeof te!="symbol"?te+"":te,ee),He=(Ae,te,ee)=>new Promise((he,se)=>{var de=be=>{try{we(ee.next(be))}catch(Me){se(Me)}},me=be=>{try{we(ee.throw(be))}catch(Me){se(Me)}},we=be=>be.done?he(be.value):Promise.resolve(be.value).then(de,me);we((ee=ee.apply(Ae,te)).next())});class Et extends ce.Component{constructor(te){super(te),ct(this,"canvas"),ct(this,"randomNum",(ee,he)=>Math.floor(Math.random()*(he-ee)+ee)),ct(this,"drawPic",()=>{this.randomCode()}),ct(this,"reloadPic",()=>{this.drawPic()}),ct(this,"changeCode",ee=>{console.log(ee.target.value,222),this.setState({value:ee.target.value,showError:!1})}),ct(this,"onVerify",()=>{let ee;return this.state.value.toLowerCase()!==""&&this.state.value.toLowerCase()!==this.state.code.toLowerCase()?(ee=!0,De.ZP.error("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u9A8C\u8BC1\u7801"),this.reloadPic()):this.state.value.toLowerCase()===""?(ee=!0,De.ZP.error("\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801")):this.state.value.toLowerCase()===this.state.code.toLowerCase()&&(ee=!1),this.setState({showError:ee}),ee}),this.canvas=ce.createRef(),this.state={value:"",code:"",codeLength:4,fontSizeMin:20,fontSizeMax:22,backgroundColorMin:240,backgroundColorMax:250,colorMin:10,colorMax:20,lineColorMin:40,lineColorMax:180,contentWidth:96,contentHeight:38,showError:!1}}componentDidMount(){this.drawPic()}randomColor(te,ee){const he=this.randomNum(te,ee),se=this.randomNum(te,ee),de=this.randomNum(te,ee);return`rgb(${he}, ${se}, ${de})`}drawText(te,ee,he){te.fillStyle=this.randomColor(this.state.colorMin,this.state.colorMax);const se=this.randomNum(this.state.fontSizeMin,this.state.fontSizeMax);te.font=se+"px SimHei";const de=10,me=(this.state.contentWidth-40)/(this.state.code.length-1);let we=de;he>0&&(we=de+he*me);let be=this.randomNum(this.state.fontSizeMax,this.state.contentHeight-5);se>40&&(be=40);const Me=this.randomNum(-10,10);te.translate(we,be),te.rotate(Me*Math.PI/180),te.fillText(ee,0,0),te.rotate(-Me*Math.PI/180),te.translate(-we,-be)}drawLine(te){for(let ee=0;ee<1;ee++)te.strokeStyle=this.randomColor(this.state.lineColorMin,this.state.lineColorMax),te.beginPath(),te.moveTo(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight)),te.lineTo(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight)),te.stroke()}drawDot(te){for(let ee=0;ee<100;ee++)te.fillStyle=this.randomColor(0,255),te.beginPath(),te.arc(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight),1,0,2*Math.PI),te.fill()}randomCode(){let te="";const ee="QWERTYUPLKJHGFDSAZXCVBNMqwertyupkjhgfdsazxcvbnm1234567890";for(let he=0;he<this.state.codeLength;he++){const se=Math.floor(Math.random()*57);te+=ee[se]}this.setState({code:te},()=>{const se=this.canvas.current.getContext("2d");se.textBaseline="bottom",se.fillStyle=this.randomColor(this.state.backgroundColorMin,this.state.backgroundColorMax),se.fillRect(0,0,this.state.contentWidth,this.state.contentHeight);for(let de=0;de<this.state.code.length;de++)this.drawText(se,this.state.code[de],de);this.drawLine(se),this.drawDot(se)})}render(){const{className:te,width:ee=300}=this.props;return ce.createElement("div",{className:Ke()(Ct.codeBox,te),style:{width:ee}},ce.createElement("aside",null,ce.createElement(_e.default,{value:this.state.value,onChange:this.changeCode,placeholder:"\u8BF7\u8F93\u5165\u56FE\u7247\u4E2D\u7684\u9A8C\u8BC1\u7801"})),ce.createElement("div",null,ce.createElement("canvas",{onClick:this.reloadPic,ref:this.canvas,width:"100",height:"30"}),ce.createElement("div",{className:"current",onClick:this.reloadPic},"\u770B\u4E0D\u6E05\uFF1F\u6362\u4E00\u5F20")))}}const ht=(Ae,te)=>{let ee;Modal.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:React.createElement("div",null,React.createElement("p",null,te),React.createElement(Et,{ref:he=>ee=he})),onOk:()=>He(void 0,null,function*(){if(ee.onVerify())return Promise.reject();Ae()})})};var dt=Et},10672:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return ct}});var ce=ve(59301),De=ve(92832),_e=ve(12563),Ct=ve(8591),Ze={flex:"flex___eLcnP",flex1:"flex1___yUTT7",color666:"color666___TiUhG",error:"error___gTTtv",deleteIcon:"deleteIcon___mnZW1",addIcon:"addIcon___JC5NS"},Ke=ve(62772);const{TextArea:Be}=De.default;class mt extends ce.Component{constructor(Et){super(Et),this.state={inputVisible:!1,EditInputIndex:-1}}render(){let{index:Et,onAnswerChange:ht,addChildAnswer:dt,exerciseIsPublish:Ae,answers:te,activeOptionErrorIndex:ee,flex:he="0 0 1000px"}=this.props;console.log("----",te);let{inputVisible:se,EditInputIndex:de}=this.state;return ce.createElement("div",{className:Ze.flex},ce.createElement("div",{className:`${Ze.color666} mb5 mt6`,style:{flex:"0 0 90px"}},"\u7B54\u6848(\u586B\u7A7A",Et+1,"):"),ce.createElement("div",{style:{border:"1px solid #f6f6f6",flex:1,padding:10}},te==null?void 0:te.map((me,we)=>ce.createElement(ce.Fragment,null,de!==we?(me==null?void 0:me.length)>0?ce.createElement(_e.default,{className:"edit-tag",key:me,closable:!((te==null?void 0:te.length)===1&&we===0),onClose:be=>{be.preventDefault(),(te==null?void 0:te.length)===1&&we===0?this.props.deleteChildAnswermain(Et,we):this.props.deleteChildAnswer(Et,we)}},ce.createElement("span",{onDoubleClick:be=>{this.setState({EditInputIndex:we}),be.preventDefault()}},me)):ce.createElement(De.default,{defaultValue:me,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:be=>{if(be.target.value.replaceAll(" ","").length<=0){Ct.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}ht(Et,we,be.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}):ce.createElement(De.default,{defaultValue:me,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:be=>{if(be.target.value.replaceAll(" ","").length<=0){Ct.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}ht(Et,we,be.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}))),!se&&ce.createElement(_e.default,{className:"site-tag-plus",onClick:()=>{dt(Et),this.setState({inputVisible:!0})}},ce.createElement(Ke.Z,null)," \u65B0\u589E\u7B54\u6848")))}}var ct=mt},65158:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return Ae}});var ce=ve(59301),De=ve(12290),_e=Object.defineProperty,Ct=Object.defineProperties,Ze=Object.getOwnPropertyDescriptors,Ke=Object.getOwnPropertySymbols,Be=Object.prototype.hasOwnProperty,mt=Object.prototype.propertyIsEnumerable,ct=(te,ee,he)=>ee in te?_e(te,ee,{enumerable:!0,configurable:!0,writable:!0,value:he}):te[ee]=he,He=(te,ee)=>{for(var he in ee||(ee={}))Be.call(ee,he)&&ct(te,he,ee[he]);if(Ke)for(var he of Ke(ee))mt.call(ee,he)&&ct(te,he,ee[he]);return te},Et=(te,ee)=>Ct(te,Ze(ee)),ht=(te,ee,he)=>ct(te,typeof ee!="symbol"?ee+"":ee,he);const dt="\u2581";class Ae extends ce.Component{constructor(){super(...arguments),ht(this,"getChCountBeforeCursor",(ee,he)=>{const se=he.line;let de=0;for(let we=0;we<se;we++)de+=ee.getLine(we).split(dt).length-1;const me=ee.getLine(se).substring(0,he.ch);return de+=me.split(dt).length-1,de}),ht(this,"onCMBeforeChange",(ee,he)=>{const se=ee.getRange(he.from,he.to);let de=0;if(he.text.forEach(me=>{de+=me.split(dt).length-1}),se&&se.indexOf(dt)!=-1){const me=se.split(dt).length-1,we=this.getChCountBeforeCursor(ee,he.from);console.log(`\u5220\u9664${me}\u4E2A\uFF0C \u4E4B\u524D\u6709${we}\u4E2A\uFF0C\u65B0\u589E${de}\u4E2A`),this.props.deleteEmptyDisabled?he.cancel():this.props.onPlaceholderChange&&this.props.onPlaceholderChange(we,me,de)}else if(de){const me=this.getChCountBeforeCursor(ee,he.from);console.log(`\u65B0\u589E${de}\u4E2A\uFF0C\u4E4B\u524D\u6709${me}\u4E2A`),this.props.onPlaceholderChange&&this.props.onPlaceholderChange(me,0,de)}})}render(){return ce.createElement(De.Z,Et(He({},this.props),{onCMBeforeChange:this.onCMBeforeChange}))}}},32570:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return Ke}});var ce=ve(60324),De={text:"text___FxbAX",wrap:"wrap___UlBQ1",contact:"contact____pUDq",img:"img___BapAv"},_e=ve(32637),Ct=ve(59301),Ke=({type:Be,style:mt})=>{const ct=Ct.createElement("div",{className:De.wrap,onClick:He=>{He.preventDefault(),He.stopPropagation()}},Ct.createElement("p",null,Be==="shixun"||Be==="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",Ct.createElement("br",null),"\u6839\u636E\u5E73\u53F0\u4F7F\u7528\u89C4\u5219\uFF0C\u9700\u8981\u6388\u6743\u624D\u80FD\u4F7F\u7528\u3002",Be==="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"),Ct.createElement("div",{className:De.contact},Ct.createElement("div",{className:De.img},Ct.createElement("img",{src:_e,width:"124px",height:"124px"})),Ct.createElement("div",{className:"tc font14 mt10",style:{color:"#777A93"}},"\u626B\u4E00\u626B\uFF0C\u83B7\u53D6\u6388\u6743\u7801")));return Ct.createElement(ce.Z,{content:ct},Ct.createElement("span",{className:De.text,style:mt},"\u9AD8\u6D88\u8017"))}},73524:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return Et}});var ce=ve(59301),De={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},_e=ve(92310),Ct=ve.n(_e),Ze=ve(71418),Ke=ve(2859),Be=ve(99064),mt=ve(955),ct=(ht,dt,Ae)=>new Promise((te,ee)=>{var he=me=>{try{de(Ae.next(me))}catch(we){ee(we)}},se=me=>{try{de(Ae.throw(me))}catch(we){ee(we)}},de=me=>me.done?te(me.value):Promise.resolve(me.value).then(he,se);de((Ae=Ae.apply(ht,dt)).next())}),Et=({data:ht,className:dt,fullWidth:Ae,style:te={},onClose:ee,onOk:he,showFullTools:se,noAssociationId:de})=>{const me=(0,ce.useRef)(null),we=(0,ce.useRef)(null),be=(0,ce.useRef)(null),Me=(0,ce.useRef)(null),[Ie,ze]=(0,ce.useState)(!1),[et,$e]=(0,ce.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,ce.useEffect)(()=>(be.current||(be.current=document.createElement("style"),document.head.appendChild(be.current)),ht!=null&&ht.visible?(document.body.setAttribute("data-custom","y-hidden"),be.current.innerHTML=" html { overflow-y: hidden; }",ht!=null&&ht.src&>()):(document.body.removeAttribute("data-custom"),be.current&&(document.head.removeChild(be.current),be.current=null)),()=>{document.body.removeAttribute("data-custom"),be.current&&(document.head.removeChild(be.current),be.current=null)}),[ht==null?void 0:ht.visible]);const gt=()=>ct(void 0,null,function*(){ze(!0),$e("\u6B63\u5728\u52A0\u8F7D\u4E2D");const bt=yield(0,mt.ZJ)(ht==null?void 0:ht.src);me.current.src="",me.current.src=bt,me.current.onload=function(){Qe()},ze(!1),$e("")}),je=bt=>ct(void 0,null,function*(){ze(!0),$e("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Nt=yield(0,Be.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:ht.title,file:bt.dataUrl}});Nt!=null&&Nt.id&&!de?(yield(0,Be.ZP)(`/api/attachments/${ht.id}/add_subitem.json`,{method:"post",body:{subitem_id:Nt==null?void 0:Nt.id,settings:JSON.stringify(bt.state)}})).status===0&&he():Nt!=null&&Nt.id&&he(Nt),ze(!1),$e("")}),Tt=()=>{const bt=document.querySelector('a[href="https://markerjs.com/"]');bt&&bt.parentNode&&(bt.parentNode.style.display="none"),[{name:'[data-action="select"]',title:"\u9009\u62E9"},{name:'[data-action="delete"]',title:"\u5220\u9664\u5143\u7D20"},{name:'[data-action="undo"]',title:"\u64A4\u9500"},{name:'[data-type-name="FrameMarker"]',title:"\u77E9\u5F62"},{name:'[data-type-name="FreehandMarker"]',title:"\u753B\u7EBF"},{name:'[data-type-name="ArrowMarker"]',title:"\u7BAD\u5934"},{name:'[data-type-name="TextMarker"]',title:"\u6587\u672C"},{name:'[data-type-name="EllipseMarker"]',title:"\u692D\u5706"},{name:'[data-type-name="HighlightMarker"]',title:"\u65B9\u5757"},{name:'[data-type-name="CalloutMarker"]',title:"\u6CE8\u91CA"},{name:'[data-action="render"]',title:"\u4FDD\u5B58"},{name:'[data-action="close"]',title:"\u9000\u51FA"}].forEach(At=>{const Zt=document.querySelector(At.name);Zt&&Zt.setAttribute("title",At.title)})},Qe=()=>{we.current=new Ke.hP(me.current),we.current.targetRoot=Me.current,we.current.addEventListener("render",je),we.current.addEventListener("beforeclose",ee),se&&(we.current.availableMarkerTypes=we.current.ALL_MARKER_TYPES,we.current.uiStyleSettings.redoButtonVisible=!0,we.current.uiStyleSettings.notesButtonVisible=!0,we.current.uiStyleSettings.zoomButtonVisible=!0,we.current.uiStyleSettings.zoomOutButtonVisible=!0,we.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=we.current.uiStyleSettings,we.current.show(),ht!=null&&ht.snapshotData&&we.current.restoreState(ht.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Tt()},300)};return ce.createElement(ce.Fragment,null,(ht==null?void 0:ht.visible)&&ce.createElement(Ze.Z,{spinning:Ie,tip:et,style:{position:"absolute",width:"100vw"}},ce.createElement("div",{ref:Me,className:Ct()(De.imageDimensions,dt,Ae?De.fullWidth:""),style:te},ce.createElement("img",{className:De.img,ref:me}))))}},59879:function(Pn,an,ve){"use strict";var ce=ve(59301),De=ve(88010),_e=ve(48136),Ct=ve(41588),Ze=ve(43418),Ke=ve(59301);const Be=(0,ce.forwardRef)(({callback:mt,width:ct,onChange:He,disabled:Et,readOnly:ht,type:dt="",value:Ae="",style:te={}},ee)=>{const he=(0,ce.useRef)(),se=(0,ce.useRef)(),[de,me]=(0,ce.useState)(0),[we,be]=(0,ce.useState)(0),[Me,Ie]=(0,ce.useState)(!1),ze=()=>{var je=document.createElement("div");je.innerHTML=he.current.getValue();var Tt=je.innerText;return mt&&mt(Tt),Tt};(0,ce.useImperativeHandle)(ee,()=>({getData:ze}));const et=je=>{je.preventDefault();const Tt=je.clientX-de,Qe=je.clientY-we;document.body.onmousemove=bt=>{let Nt=bt.clientX-Tt,At=bt.clientY-Qe;const Zt=document.getElementsByClassName("markdown-popup-form")[0],Yt=window.innerWidth-Zt.offsetWidth,ut=window.innerHeight-Zt.offsetHeight;Nt=Math.max(0,Math.min(Nt,Yt)),At=Math.max(0,Math.min(At,ut)),$e(bt.clientX,bt.clientY,Tt,Qe)&&(me(Nt),be(At))},document.body.onmouseup=function(){document.body.onmousemove=null}},$e=(je,Tt,Qe,bt)=>{const Nt=document.body.clientHeight,At=document.body.clientWidth;return je<20&&Qe>je||je>At-20&&Qe<je||Tt<20&&bt>Tt||Tt>Nt-20&&bt<Tt?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};(0,ce.useEffect)(()=>{Me&&setTimeout(()=>{const je=document.getElementsByClassName("markdown-popup-form")[0],Tt=window.innerWidth/2-je.offsetWidth/2,Qe=window.innerHeight/2-je.offsetHeight/2;me(Tt),be(Qe)},0)},[Me]);const gt=()=>{Et||ht||Ie(!0)};return Ke.createElement("div",{style:te},Ke.createElement("div",{style:{width:ct||"100%",position:"relative"},className:`${De.Z.mathFillWrap} ${Et||ht?"cursorDefault":""}`,onClick:()=>gt()},Ke.createElement("math-field",{disabled:Et,locale:"zh_cn",class:`${De.Z.mathField} ${dt}`,readOnly:ht,placeholder:"\u8BF7\u8F93\u5165\u516C\u5F0F",ref:he,style:{width:"100%",fontSize:Ae?18:14},value:Ae||""})),Ke.createElement(Ze.default,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:de,top:we},title:Ke.createElement("div",{style:{cursor:"move"},onMouseDown:et},"\u8F93\u5165\u516C\u5F0F"),open:Me,onOk:()=>{const je=se.current.getData();he.current.setValue(je),He(je),Ie(!1)},onCancel:()=>{Ie(!1)},destroyOnClose:!0,className:"markdown-popup-form"},Ke.createElement(Ct.Z,{value:Ae,ref:se,onChange:He,showSaveButton:!1})))});an.Z=Be},41588:function(Pn,an,ve){"use strict";var ce=ve(59301),De=ve(95237),_e=ve(43604),Ct=ve(99313),Ze=ve(3113),Ke=ve(85149),Be=ve(88010),mt=ve(48136),ct=ve(59301);const He=(0,ce.forwardRef)(({callback:Et,showSaveButton:ht,value:dt=""},Ae)=>{const te=(0,ce.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 "}]}]}],he=[{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=we=>{te.current.setValue(te.current.getValue()+" "+we.value+" ")},de=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:ct.createElement(De.Z,{className:Be.Z.lists,gutter:[10,10]},ee.map((we,be)=>ct.createElement(_e.Z,{flex:"110px",className:Be.Z.item},ct.createElement("div",null,ct.createElement(Ke.Z,{value:`$$${we.value}$$`}),we.name),ct.createElement("div",{className:Be.Z.children},we.children.map((Me,Ie)=>ct.createElement("div",{key:Ie},ct.createElement("h1",null,Me.name),ct.createElement(De.Z,{gutter:[10,10]},Me.data.map((ze,et)=>ct.createElement(_e.Z,{key:et,onClick:()=>se(ze),className:Be.Z.diamond},ct.createElement(Ke.Z,{value:"`$$"+ze.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:ct.createElement(De.Z,{className:Be.Z.lists,gutter:[10,10]},he.map((we,be)=>ct.createElement(_e.Z,{flex:"110px",className:Be.Z.item},ct.createElement("div",null,ct.createElement(Ke.Z,{value:"`$$"+we.value+"$$`"}),we.name),ct.createElement("div",{className:Be.Z.children},we.children.map((Me,Ie)=>ct.createElement("div",{key:Ie},Me.name&&ct.createElement("h1",null,Me.name),ct.createElement(De.Z,{gutter:[10,10]},Me.data.map((ze,et)=>ct.createElement(_e.Z,{key:et,onClick:()=>se(ze),className:Be.Z.diamond},ct.createElement(Ke.Z,{value:"`$$"+ze.value+"$$`"}))))))))))}],me=()=>{var we=document.createElement("div");we.innerHTML=te.current.getValue();var be=we.innerText;return Et&&Et(be),be};return(0,ce.useImperativeHandle)(Ae,()=>({getData:me})),ct.createElement("div",{className:Be.Z.mathWrap},ct.createElement(Ct.default,{defaultActiveKey:"1",items:de}),ct.createElement("math-field",{locale:"zh_cn",className:Be.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:te,style:{width:800,marginTop:30,fontSize:18}},dt||""),ht&&ct.createElement("div",{className:Be.Z.button},ct.createElement(Ze.ZP,{size:"large",onClick:me,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});an.Z=He},8797:function(Pn,an,ve){"use strict";var ce=ve(59301),De=ve(93314),_e=ve(3113),Ct=Object.defineProperty,Ze=Object.defineProperties,Ke=Object.getOwnPropertyDescriptors,Be=Object.getOwnPropertySymbols,mt=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable,He=(Ae,te,ee)=>te in Ae?Ct(Ae,te,{enumerable:!0,configurable:!0,writable:!0,value:ee}):Ae[te]=ee,Et=(Ae,te)=>{for(var ee in te||(te={}))mt.call(te,ee)&&He(Ae,ee,te[ee]);if(Be)for(var ee of Be(te))ct.call(te,ee)&&He(Ae,ee,te[ee]);return Ae},ht=(Ae,te)=>Ze(Ae,Ke(te));const dt=({img:Ae,buttonProps:te={},styles:ee={},customText:he,ButtonText:se,ButtonClick:de,Buttonclass:me,ButtonTwo:we,imgStyles:be,loading:Me=!1})=>ce.createElement("section",{className:"tc animated fadeIn",style:Et(Et({},{color:"#999",margin:"100px auto",visibility:Me?"hidden":"visible"}),ee)},ce.createElement("img",{src:Ae||De,style:ht(Et({},be),{pointerEvents:"none",userSelect:"none"})}),ce.createElement("p",{className:"mt20 font14"},he||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),se&&ce.createElement(_e.ZP,Et({className:me,onClick:de},te),se),we&&we);an.Z=dt},23210:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return me}});var ce=ve(59301),De={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},_e=ve(3113),Ct=ve(70557),Ze=ve(23954),Ke=ve(6848),Be=ve(955),mt=ve(94941),ct=ve(8797),He=ve(3294),Et=ve(19381),ht=ve(59301),dt=Object.defineProperty,Ae=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,he=(we,be,Me)=>be in we?dt(we,be,{enumerable:!0,configurable:!0,writable:!0,value:Me}):we[be]=Me,se=(we,be)=>{for(var Me in be||(be={}))te.call(be,Me)&&he(we,Me,be[Me]);if(Ae)for(var Me of Ae(be))ee.call(be,Me)&&he(we,Me,be[Me]);return we},de=(we,be,Me)=>new Promise((Ie,ze)=>{var et=je=>{try{gt(Me.next(je))}catch(Tt){ze(Tt)}},$e=je=>{try{gt(Me.throw(je))}catch(Tt){ze(Tt)}},gt=je=>je.done?Ie(je.value):Promise.resolve(je.value).then(et,$e);gt((Me=Me.apply(we,be)).next())}),me=({editOffice:we="view",data:be,theme:Me,type:Ie,filename:ze,monacoEditor:et,className:$e,style:gt,close:je,onClose:Tt,hasMask:Qe,disabledDownload:bt,onImgDimensions:Nt,showNodata:At,recordInfo:Zt})=>{const[Yt,ut]=(0,ce.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Ge,kt]=(0,ce.useState)(""),[ln,sn]=(0,ce.useState)(),Bt=window.ENV==="build"?"/react/build":"",Gt=location.host.startsWith("localhost")?He.Z.PROXY_SERVER:He.Z.API_SERVER,Bn=10*(1024*1024),rn=(0,ce.useRef)();be!=null&&be.startsWith("/api")&&Ie!=="txt"&&(be=He.Z.API_SERVER+be);const Cn=Re=>Re.substring(Re.lastIndexOf("/")+1).split(".").pop();ze&&et&&(et.filename=ze),(0,ce.useEffect)(()=>{var Re,Ce;const Pe=(Ce=(Re=document.cookie)==null?void 0:Re.replace(/\s/g,""))==null?void 0:Ce.split(";");Pe==null||Pe.map(Ne=>{let ke=Ne.split("=");ke[0]==="_educoder_session"&&kt(ke[1])})},[]),(0,ce.useEffect)(()=>{Ie==="office"&&(be.indexOf("bigfilescdn.")>-1||be.indexOf("bigfiles1")>-1?sn({url:be,fileType:Cn(be),model:be.indexOf("model=edit")?"edit":"view"}):ft())},[Ie,be]);const ft=()=>de(void 0,null,function*(){console.log("data:",be);let Re=be;be.startsWith("http")||(Re=location.origin+Re);let Ce=new URL(Re).pathname.split("/").pop();const Pe=yield(0,mt.gJ)({attachment_id:Ce});Pe.url=Gt+Pe.url,sn(Pe)}),En=()=>{if(be.startsWith("http")||be.startsWith("blob:")){Vn();return}(0,Be.Sv)(ze||"educoder",be,ze)},Vn=()=>{Zt&&(0,Et.fc)({id:Zt==null?void 0:Zt.id,watch_type:1,course_id:Zt==null?void 0:Zt.course_id}),(0,Be.Nd)(ze||"educoder",decodeURIComponent(be))};return ht.createElement("div",{style:se({},gt||{}),className:`${Qe&&De.bgBlack} ${Ie?De.wrp:"hide"}`},je&&ht.createElement("div",{className:De.close,ref:rn},!!Nt&&ht.createElement(Ke.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>rn.current},ht.createElement("span",{onClick:()=>{Tt(),Nt()}},ht.createElement("i",{className:"icon-yulanpizhu"}))),!bt&&ht.createElement(Ke.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>rn.current},ht.createElement("span",{onClick:Vn},ht.createElement("i",{className:"icon-quxiaozhiding"}))),ht.createElement(Ke.Z,{title:"\u5173\u95ED",getPopupContainer:()=>rn.current},ht.createElement("span",{className:"",onClick:Tt},ht.createElement("i",{className:"icon-guanbi1"})))),ht.createElement("div",{className:`${De[$e]} ${$e} ${De.monaco} ${Ie==="txt"?"show":"hide"}`},Ie==="txt"&&ht.createElement(ht.Fragment,null,ht.createElement(Ze.ZP,se({},et)))),Ie==="audio"&&ht.createElement("audio",{src:`${(be==null?void 0:be.indexOf("http://"))>-1||(be==null?void 0:be.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${be}`,autoPlay:!0}),Ie==="video"&&ht.createElement(ht.Fragment,null,(be==null?void 0:be.indexOf("http"))>-1?ht.createElement("video",{controls:!0,src:`${be}`,autoPlay:!0}):ht.createElement("video",{controls:!0,src:`data:video/mp4;base64,${be}`,autoPlay:!0})),Ie==="office"&&ln&&ht.createElement("iframe",{src:`${Bt}/office.html?key=${ln.key}&url=${btoa(ln.url)}&callbackUrl=${Gt+(ln.callbackUrl||"")}&fileType=${ln.fileType}&title=${ln.title||""}&model=${we}&officeServer=${He.Z.ONLYOFFICE}&disabledDownload=${!!bt}`}),Ie==="html"&&ht.createElement("iframe",{src:be+"&disposition=inline"}),Ie==="pdf"&&ht.createElement("iframe",{src:`${Bt}/js/pdfview/index.html?filename=${ze||"educoder.pdf"}&url=${encodeURIComponent(be)}&disabledDownload=${!!bt}`}),Ie==="image"&&ht.createElement("img",{src:`${(be==null?void 0:be.indexOf("http://"))>-1||(be==null?void 0:be.indexOf("https://"))>-1?"":"data:image/png;base64,"}${be}`}),(Ie==="other"||Ie==="download")&&ht.createElement(ht.Fragment,null,At?ht.createElement(ct.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:ht.createElement(_e.ZP,{icon:ht.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:En,disabled:bt},"\u4E0B\u8F7D")}):ht.createElement(_e.ZP,{type:"primary",size:"middle",onClick:En,disabled:bt},ht.createElement(Ct.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},90502:function(Pn,an,ve){"use strict";ve.d(an,{t:function(){return Pe}});var ce=ve(59301),De=ve(92832),_e=ve(78241),Ct=ve(43418),Ze=ve(95237),Ke=ve(43604),Be=ve(5871),mt=ve(57809),ct=ve(5112),He=ve(41984),Et=ve(89070),ht=ve(43809),dt=ve(8591),Ae=ve(3113),te=ve(71418),ee=ve(24334),he={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=ve(99064),de=ve(88264),me=ve(12290),we=ve(56102),be=ve(74440),Me=ve(59301),Ie=Object.defineProperty,ze=Object.defineProperties,et=Object.getOwnPropertyDescriptors,$e=Object.getOwnPropertySymbols,gt=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,Tt=(Ne,ke,Se)=>ke in Ne?Ie(Ne,ke,{enumerable:!0,configurable:!0,writable:!0,value:Se}):Ne[ke]=Se,Qe=(Ne,ke)=>{for(var Se in ke||(ke={}))gt.call(ke,Se)&&Tt(Ne,Se,ke[Se]);if($e)for(var Se of $e(ke))je.call(ke,Se)&&Tt(Ne,Se,ke[Se]);return Ne},bt=(Ne,ke)=>ze(Ne,et(ke)),Nt=(Ne,ke,Se)=>new Promise((nt,Pt)=>{var qe=vt=>{try{St(Se.next(vt))}catch(lt){Pt(lt)}},Ue=vt=>{try{St(Se.throw(vt))}catch(lt){Pt(lt)}},St=vt=>vt.done?nt(vt.value):Promise.resolve(vt.value).then(qe,Ue);St((Se=Se.apply(Ne,ke)).next())}),Zt=({buttonProps:Ne,buttonText:ke,form:Se,hackIdentifier:nt="",answerKey:Pt,data:qe})=>{const[Ue,St]=(0,ce.useState)(!1),[vt,lt]=(0,ce.useState)(!1),[Dt,un]=(0,ce.useState)(!1),[Xt,$t]=(0,ce.useState)({}),[wn,bn]=(0,ce.useState)(""),[pn,Yn]=(0,ce.useState)(""),ai=(0,ce.useRef)(nt),Wn=(0,ce.useRef)(""),Rn=(0,ce.useRef)(!1);(0,ce.useEffect)(()=>{Dt&&Ri()},[Dt]),(0,ce.useEffect)(()=>()=>{sessionStorage.removeItem("projectFill")},[]);const ii=()=>new Date().getTime(),pi=qe==null?void 0:qe.code,gi=()=>{var $n,ti;let Pi=pi?qe==null?void 0:qe.code:($n=Se.getFieldValue("hack_codes"))==null?void 0:$n.code,mi=pi?qe==null?void 0:qe.answer_content:Se.getFieldValue(Pt),nr=pi?qe==null?void 0:qe.input:(ti=Se.getFieldValue("hack_sets"))==null?void 0:ti.input;mi==null||mi.forEach(ji=>{const Le=ji.value||ji.answer_text||"";Pi=Pi.replace(/(@▁@|@▁▁@)/,Le)}),Yn(nr),bn(Pi),$t({}),un(!0)},Ri=()=>Nt(void 0,null,function*(){var $n,ti,Pi,mi;const nr=ii(),ji=pi?qe==null?void 0:qe.time_limit:($n=Se.getFieldsValue())==null?void 0:$n.hack.time_limit,Le=pi?(ti=qe==null?void 0:qe.answer_content)==null?void 0:ti.length:(mi=(Pi=Se.getFieldsValue())==null?void 0:Pi.standard_answers)==null?void 0:mi.length;St(!0),yield(0,de.bM)(Wn.current,{test_hack_code:wn,test_input:pn});function si(){return Nt(this,null,function*(){const{status:Hi,data:hn}=yield(0,de.rX)(Wn.current,"submit"),vi=ii()-nr>(ji+3)*1e3*Le;if(Rn.current){if(vi){dt.ZP.error("\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"),St(!1);return}if(Hi===0){St(!1),$t(bt(Qe({},hn),{showText:!0}));return}setTimeout(si,1e3)}})}si()}),Ji=()=>Nt(void 0,null,function*(){var $n,ti,Pi,mi,nr,ji,Le;if(!qe){try{yield Se.validateFields()}catch(ni){(Pi=(ti=($n=ni==null?void 0:ni.errorFields)==null?void 0:$n[0])==null?void 0:ti.name)!=null&&Pi.includes("standard_answers")?dt.ZP.error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"):dt.ZP.error(ni.errorFields[0].errors[0]),Se.scrollToField(ni.errorFields[0].name,{behavior:"smooth",block:"center"});return}lt(!0);let Hi="";const hn=Se.getFieldsValue();ai.current?Hi=yield(0,se.ZP)(`/api/problems/${ai.current}.json`,{method:"put",body:bt(Qe({},hn),{hack:bt(Qe({},hn==null?void 0:hn.hack),{sub_discipline_id:(Le=(ji=hn==null?void 0:hn.hack)==null?void 0:ji.sub_discipline_id)==null?void 0:Le[1],difficult:hn.difficulty,item_banks_group_id:hn.item_banks_group_id}),hack_codes:bt(Qe({},hn.hack_codes),{code:ee.Base64.encode(hn.hack_codes.code)}),update_hack_sets:[Qe({},hn.hack_sets)],is_blank:!0})}):(Hi=yield(0,se.ZP)("/api/problems.json",{method:"post",body:bt(Qe({},hn),{hack:bt(Qe({},hn==null?void 0:hn.hack),{sub_discipline_id:(nr=(mi=hn==null?void 0:hn.hack)==null?void 0:mi.sub_discipline_id)==null?void 0:nr[1],difficult:hn.difficulty,item_banks_group_id:hn.item_banks_group_id}),hack_codes:bt(Qe({},hn.hack_codes),{code:ee.Base64.encode(hn.hack_codes.code)}),hack_sets:[Qe({},hn.hack_sets)],is_blank:!0})}),ai.current=Hi==null?void 0:Hi.identifier,sessionStorage.projectFill=Hi==null?void 0:Hi.identifier)}const si=yield(0,se.ZP)(`/api/problems/${ai.current}/start.json`,{method:"get"});if((si==null?void 0:si.status)===0){Wn.current=si==null?void 0:si.identifier,Rn.current=!0,lt(!1),gi();return}lt(!1)}),Un=$n=>{const{status:ti,error_msg:Pi,execute_time:mi,output:nr,input:ji,expected_output:Le}=$n;let si=null;switch(ti){case be.h.OK:si=Me.createElement(Me.Fragment,null,Me.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",mi/1e3,"\u79D2"),Me.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A\u8C03\u8BD5\u901A\u8FC7"));break;case be.h.NOMATCH:si=Me.createElement(Me.Fragment,null,Me.createElement("div",null,"\u8F93\u5165\uFF1A"),Me.createElement("pre",{style:{fontFamily:"initial"}},ji),Me.createElement("div",null,"\u8F93\u51FA\uFF1A"),Me.createElement("pre",{style:{fontFamily:"initial"}},nr&&ee.Base64.decode(nr)),Me.createElement("div",null,"\u9884\u671F\u8F93\u51FA\uFF1A"),Me.createElement("pre",{style:{fontFamily:"initial"}},Le&&ee.Base64.decode(Le)));break;case be.h.EXECUTEFAILURE:si=Me.createElement(Me.Fragment,null,Me.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",Me.createElement("pre",null,ji)),Me.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),Me.createElement("pre",{className:"error"},ee.Base64.decode(Pi)));break;case be.h.COMPILEFAILURE:si=Me.createElement(Me.Fragment,null,Me.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",Me.createElement("pre",null,ji)),Me.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),Me.createElement("pre",{className:"error"},ee.Base64.decode(Pi)));break;case be.h.PODFAILURE:si=Me.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case be.h.TIMEOUT:si=Me.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return Me.createElement(Me.Fragment,null," ",si," ")};return Me.createElement("div",null,Me.createElement(Ae.ZP,bt(Qe({loading:vt},Ne),{onClick:Ji}),ke),Me.createElement(Ct.default,{open:Dt,title:"\u8C03\u8BD5\u4EE3\u7801",destroyOnClose:!0,width:1200,okText:"\u8FD0\u884C\u6D4B\u8BD5",confirmLoading:Ue,cancelButtonProps:{style:{display:"none"}},onOk:()=>Ri(),onCancel:()=>{Rn.current=!1,un(!1)}},Me.createElement("div",{className:he.result},Me.createElement("div",{className:he.left},Me.createElement("div",{className:"mb20"},Me.createElement("span",{className:"c-black"},"\u6267\u884C\u4EE3\u7801"),!qe&&Me.createElement(we.CopyToClipboard,{text:wn,onCopy:()=>dt.ZP.success("\u590D\u5236\u6210\u529F")},Me.createElement("span",{style:{float:"right"},className:"current c-light-primary"},Me.createElement("i",{className:"iconfont icon-fuzhi8 mr5"}),"\u590D\u5236"))),Me.createElement(me.Z,{height:510,className:"mb0",hidetoolBar:!0,defaultValue:wn,onChange:$n=>bn($n)})),Me.createElement("div",{className:he.right},Me.createElement("div",{className:"c-black mb20"},"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B"),Me.createElement("div",{className:he.box},Me.createElement("div",{className:he.li},Me.createElement(De.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165",value:pn,onChange:$n=>Yn($n.target.value),bordered:!1,style:{height:180}}))),Me.createElement("div",{className:"c-black mb20 mt30"},"\u4EE3\u7801\u6267\u884C\u7ED3\u679C"),Me.createElement("div",{className:he.box},Me.createElement(te.Z,{spinning:Ue,tip:"\u4EE3\u7801\u6267\u884C\u4E2D"},Me.createElement("div",{className:he.li,style:{height:196,overflow:"auto",padding:10}},Un(Xt))))))))},Yt=ve(87169),ut=ve(59301),Ge=Object.defineProperty,kt=Object.defineProperties,ln=Object.getOwnPropertyDescriptors,sn=Object.getOwnPropertySymbols,Bt=Object.prototype.hasOwnProperty,Gt=Object.prototype.propertyIsEnumerable,en=(Ne,ke,Se)=>ke in Ne?Ge(Ne,ke,{enumerable:!0,configurable:!0,writable:!0,value:Se}):Ne[ke]=Se,Bn=(Ne,ke)=>{for(var Se in ke||(ke={}))Bt.call(ke,Se)&&en(Ne,Se,ke[Se]);if(sn)for(var Se of sn(ke))Gt.call(ke,Se)&&en(Ne,Se,ke[Se]);return Ne},rn=(Ne,ke)=>kt(Ne,ln(ke)),Cn=(Ne,ke)=>{var Se={};for(var nt in Ne)Bt.call(Ne,nt)&&ke.indexOf(nt)<0&&(Se[nt]=Ne[nt]);if(Ne!=null&&sn)for(var nt of sn(Ne))ke.indexOf(nt)<0&&Gt.call(Ne,nt)&&(Se[nt]=Ne[nt]);return Se};const{TextArea:ft}=De.default,En=[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"}],Vn=({value:Ne,onChange:ke})=>ut.createElement(Switch,{checked:Ne,onChange:Se=>{ke(Se)}}),Re="@\u2581@",Ce="@\u2581\u2581@",Pe=({questionTitlePlaceholder:Ne,form:ke,scoreByBlank:Se=!1,hackidentifier:nt,answerKey:Pt})=>{const[qe,Ue]=(0,ce.useState)(!1),[St,vt]=(0,ce.useState)(!1),Dt=(0,Et.useParams)().type==="edit",un=(Wn,Rn)=>{const ii=Rn.line;let pi=0;for(let Ri=0;Ri<ii;Ri++)pi+=Wn.getLine(Ri).split(Re).length-1;for(let Ri=0;Ri<ii;Ri++)pi+=Wn.getLine(Ri).split(Ce).length-1;const gi=Wn.getLine(ii).substring(0,Rn.ch);return pi+=gi.split(Re).length-1,pi+=gi.split(Ce).length-1,pi},Xt=(Wn,Rn,ii,pi)=>{const gi=Wn.getRange(Rn.from,Rn.to);let Ri=0;if(Rn.text.forEach(Ji=>{Ri+=Ji.split(Re).length-1}),Rn.text.forEach(Ji=>{Ri+=Ji.split(Ce).length-1}),Rn.origin!=="setValue"){if(gi&&(gi.indexOf(Re)!==-1||gi.indexOf(Ce)!==-1)){const Ji=gi.split(Re).length-1+gi.split(Ce).length-1,Un=un(Wn,Rn.from);if(console.log(`\u5220\u9664${Ji}\u4E2A\uFF0C \u524D\u9762\u6709${Un}\u4E2A\uFF0C\u65B0\u589E${Ri}\u4E2A`),Ji>1){const $n=Array.from({length:Ji},(ti,Pi)=>Un+Pi);pi($n)}else pi(Un)}else if(Ri>0){const Ji=un(Wn,Rn.from);console.log(`\u65B0\u589E${Ri}\u4E2A\uFF0C\u4E4B\u524D\u6709${Ji}\u4E2A`),ii(Ri,Ji)}}},$t=()=>{const Wn=ke.getFieldValue(Pt);ke.setFieldsValue({[Pt]:Wn==null?void 0:Wn.map((Rn,ii)=>rn(Bn({},Rn),{position:ii+1}))})},wn=(0,ce.useRef)(),bn=(Wn,Rn)=>{for(let ii=0;ii<Wn;ii++)wn.current({position:null,answer_text:""},Rn+ii);$t()},pn=(0,ce.useRef)(),Yn=Wn=>{pn.current(Wn),$t()},ai=_e.default.useWatch(Pt,ke);return ut.createElement("div",{className:ht.Z.wrap},ut.createElement(_e.default.Item,{label:"\u8BD5\u9898\u63CF\u8FF0",name:["hack","description"],style:{display:"table"},className:"w100",labelCol:{span:24},rules:[{required:!0}]},ut.createElement(He.h,{scrollId:"name",watch:!0,height:140})),ut.createElement("div",{className:ht.Z.questionTitleEditorWrap},ut.createElement(_e.default.Item,{label:"\u7A0B\u5E8F\u4EE3\u7801",name:["hack_codes","code"],labelCol:{span:24},rules:[{required:!0}]},ut.createElement(He.h,{scrollId:"name",watch:!0,height:400,showNullProgramButton:!0,onChange:(Wn,Rn)=>{const ii=ke.getFieldValue(Pt);console.log("--preAnswerData",ii,Rn),ke.setFieldsValue({[Pt]:ii==null?void 0:ii.map((pi,gi)=>{var Ri;return rn(Bn({},pi),{position:gi+1,multi_line:(Ri=Rn==null?void 0:Rn[gi])==null?void 0:Ri.multiLine})})})},placeholder:Ne,onCMBeforeChange:(Wn,Rn)=>{Xt(Wn,Rn,bn,Yn)}}))),ut.createElement(_e.default.List,{name:Pt,rules:[{validator(Wn,Rn){if(!(Rn!=null&&Rn.length))return Promise.reject(new Error("\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"));for(const ii of Rn){const{answer_text:pi}=ii||{};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()}}]},(Wn,{add:Rn,remove:ii},{errors:pi})=>(wn.current=Rn,pn.current=ii,ut.createElement(ut.Fragment,null,ut.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},ut.createElement(_e.default.Item,{label:"\u586B\u7A7A\u9879\u7B54\u6848",required:!0,labelCol:{span:24}}),ut.createElement("div",{onClick:()=>{Ct.default.warning({title:"\u7ED9\u5206\u8BF4\u660E",icon:null,width:700,centered:!0,content:ut.createElement("div",null,ut.createElement("div",null,"1.\u5B66\u751F\u586B\u5199\u7B54\u6848\u4E4B\u540E\uFF0C\u5FC5\u987B\u63D0\u4EA4\u4EE3\u7801",ut.createElement("span",{style:{color:"#e30000"}},"\u8FDB\u884C\u8BC4\u6D4B"),"\u624D\u80FD\u5F97\u5206\u3002"),ut.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"}},ut.createElement(Yt.Z,{style:{marginRight:3,color:"#3061D0"}}),ut.createElement("span",null," \u7ED9\u5206\u8BF4\u660E"))),Wn.map((gi,Ri)=>{var Ji=gi,{key:Un,name:$n}=Ji,ti=Cn(Ji,["key","name"]),Pi,mi;return ut.createElement(Ze.Z,{className:"mb20",key:Un,align:"middle",wrap:!1},ut.createElement(Ke.Z,{flex:"0 0 auto",className:`${ht.Z.blankIndex}`},"\u586B\u7A7A\u9879",Ri+1),ut.createElement(Ke.Z,{flex:1},ut.createElement(Ze.Z,{align:"top",justify:"space-between",wrap:!1},ut.createElement(Ke.Z,null,ut.createElement(_e.default.Item,rn(Bn({},ti),{name:[$n,"answer_text"],noStyle:!0}),(Pi=ai==null?void 0:ai[$n])!=null&&Pi.multi_line||(mi=ai==null?void 0:ai[$n])!=null&&mi.multiLine?ut.createElement(ft,{spellCheck:!1,style:{marginLeft:10,width:550}}):ut.createElement(De.default,{style:{marginLeft:10,width:550},className:ht.Z.blankInput,size:"large",maxLength:1e3,onBlur:nr=>{}}))),Se&&ut.createElement(Ke.Z,{flex:"224px"},ut.createElement(_e.default.Item,rn(Bn({},ti),{name:[$n,"score"],label:"\u5206\u503C",rules:[{required:!0}]}),ut.createElement(Be.Z,{size:"large",className:ht.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5206\u503C"}))))))})))),ut.createElement("div",{onClick:()=>Ue(!0)},ut.createElement(_e.default.Item,{name:["hack","analysis"],label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ut.createElement(He.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:qe}))),ut.createElement(_e.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"}]},ut.createElement(mt.default,{size:"large"},En.map(Wn=>ut.createElement(mt.default.Option,{key:Wn.title,value:Wn.key}," ",Wn.title)))),ut.createElement(_e.default.Item,{label:"\u6700\u5927\u8BC4\u6D4B\u65F6\u957F\uFF08\u79D2\uFF09",style:{marginTop:30},labelCol:{span:24},required:!0},ut.createElement(_e.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},ut.createElement(Be.Z,{precision:0,max:10,min:3,size:"large",style:{width:"97%"}})),ut.createElement("span",{className:"ml10 font14"},"\u79D2")),ut.createElement(_e.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"}]},ut.createElement(ct.ZP.Group,{style:{marginTop:-10}},ut.createElement(ct.ZP,{value:0},"\u4E0D\u5FFD\u7565\u7A7A\u683C"),ut.createElement(ct.ZP,{value:1},"\u5FFD\u7565\u9996\u5C3E\u7A7A\u683C"),ut.createElement(ct.ZP,{value:2},"\u5FFD\u7565\u6240\u6709\u7A7A\u683C"))),ut.createElement(_e.default.Item,{label:"\u6D4B\u8BD5\u7528\u4F8B",required:!0,style:{marginTop:30}}),ut.createElement("div",{style:{background:"#F6F7F9",padding:15}},ut.createElement(_e.default.Item,{label:"\u8F93\u5165",labelCol:{span:24},name:["hack_sets","input"]},ut.createElement(ft,{rows:4})),ut.createElement(_e.default.Item,{label:"\u8F93\u51FA",labelCol:{span:24},name:["hack_sets","output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},ut.createElement(ft,{rows:4}))),ut.createElement(Zt,{form:ke,answerKey:Pt,hackIdentifier:nt,buttonText:"\u8FD0\u884C\u8C03\u8BD5",buttonProps:{ghost:!0,icon:ut.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(Pn,an,ve){"use strict";ve.d(an,{u:function(){return Me}});var ce=ve(59301),De=ve(95237),_e=ve(43604),Ct=ve(6848),Ze=ve(78241),Ke=ve(43809),Be=ve(32134),mt=ve(12893),ct=ve(41984),He=ve(59301),Et=Object.defineProperty,ht=Object.defineProperties,dt=Object.getOwnPropertyDescriptors,Ae=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,he=(Ie,ze,et)=>ze in Ie?Et(Ie,ze,{enumerable:!0,configurable:!0,writable:!0,value:et}):Ie[ze]=et,se=(Ie,ze)=>{for(var et in ze||(ze={}))te.call(ze,et)&&he(Ie,et,ze[et]);if(Ae)for(var et of Ae(ze))ee.call(ze,et)&&he(Ie,et,ze[et]);return Ie},de=(Ie,ze)=>ht(Ie,dt(ze)),me=(Ie,ze)=>{var et={};for(var $e in Ie)te.call(Ie,$e)&&ze.indexOf($e)<0&&(et[$e]=Ie[$e]);if(Ie!=null&&Ae)for(var $e of Ae(Ie))ze.indexOf($e)<0&&ee.call(Ie,$e)&&(et[$e]=Ie[$e]);return et};const we=["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"],be=({value:Ie,onChange:ze,choiceTextKey:et,answerKey:$e,index:gt,isEdit:je,setInputActive:Tt,form:Qe,choiceOptionsPath:bt,allowChangeMode:Nt,showAddIcon:At,addItem:Zt,deleteItem:Yt})=>{console.log(Ie,"value");const ut=(Ie==null?void 0:Ie[$e])===1,Ge=()=>{const ln=Qe.getFieldValue(bt);Qe.setFieldValue(bt,ln.map(sn=>de(se({},sn),{[$e]:0})))},kt=()=>{ut?ze(de(se({},Ie),{[$e]:0})):(Nt||Ge(),ze(de(se({},Ie),{[$e]:1})))};return He.createElement(De.Z,{className:Ke.Z.choiceWrap,align:"middle",wrap:!1},He.createElement(_e.Z,{onClick:kt,className:`${Ke.Z.choiceIndex} ${ut?Ke.Z.activeAnswer:""}`},we[gt]),He.createElement(_e.Z,{flex:1,className:`${Ke.Z.editorWrap} ml15`,onClick:Tt},He.createElement(ct.x,{height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",isEdit:je,value:Ie==null?void 0:Ie[et],onChange:ln=>{ze(de(se({},Ie),{[et]:ln}))}})),He.createElement(_e.Z,{flex:"0 0 auto",className:"ml15"},He.createElement("div",{onClick:kt,className:`${Ke.Z.setAnswerBtn} ${ut?Ke.Z.activeAnswer:""}`},ut?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")),He.createElement(_e.Z,{className:Ke.Z.actionWrapper},He.createElement(Ct.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},He.createElement(Be.Z,{className:Ke.Z.addIcon,onClick:Zt,style:{visibility:At?"visible":"hidden"}})),He.createElement(Ct.Z,{title:"\u5220\u9664"},He.createElement(mt.Z,{className:Ke.Z.deleteIcon,onClick:Yt,style:{visibility:gt>1?"visible":"hidden"}}))))},Me=({questionTitlePlaceholder:Ie,titleKey:ze,choiceKey:et,analysisKey:$e,choiceTextKey:gt,answerKey:je,choiceOptionsPath:Tt,allowChangeMode:Qe=!0,form:bt,showAnalysis:Nt=!0})=>{const[At,Zt]=(0,ce.useState)(),[Yt,ut]=(0,ce.useState)(!1);return He.createElement("div",{className:Ke.Z.wrap},He.createElement("div",{className:Ke.Z.questionTitleEditorWrap},He.createElement(Ze.default.Item,{label:"\u9898\u5E72",name:ze,labelCol:{span:24},rules:[{required:!0}]},He.createElement(ct.h,{scrollId:Array.isArray(ze)?ze.join("_"):`${ze}`,watch:!0,height:140,placeholder:Ie}))),He.createElement(Ze.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),He.createElement(Ze.default.List,{name:et,rules:[{validator(Ge,kt){const ln=kt.some(Bt=>Bt[je]===1),sn=kt.findIndex(Bt=>{var Gt;return((Gt=Bt[gt])==null?void 0:Gt.length)<=0});return sn!==-1?Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${we[sn]}\u9009\u9879\u7684\u5185\u5BB9`)):ln?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},(Ge,{add:kt,remove:ln})=>He.createElement("div",{id:Array.isArray(Tt)?Tt.join("_"):`${Tt}`},Ge.map((sn,Bt)=>{var Gt=sn,{key:en,name:Bn}=Gt,rn=me(Gt,["key","name"]);const Cn=At===en,ft=()=>{Zt(en)},En=Bt<7&&Bt===Ge.length-1,Vn=()=>kt({[gt]:"",[je]:0}),Re=()=>ln(Bn);return He.createElement(Ze.default.Item,de(se({},rn),{key:en,name:Bn,className:Ke.Z.choiceListWrap,rules:[{validator(Ce,Pe){return Pe!=null&&Pe.choice_text?Promise.resolve():Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${we[Bt]}\u9009\u9879\u7684\u5185\u5BB9`))}}]}),He.createElement(be,{choiceTextKey:gt,answerKey:je,index:Bt,isEdit:Cn,setInputActive:ft,form:bt,choiceOptionsPath:Tt,allowChangeMode:Qe,showAddIcon:En,addItem:Vn,deleteItem:Re}))}),Ge.length<8&&He.createElement("div",{className:`${Ke.Z.addBtn} mb30`,onClick:()=>kt({[gt]:"",[je]:0})},"\u6DFB\u52A0\u9009\u9879"))),Nt&&He.createElement("div",{onClick:()=>ut(!0)},He.createElement(Ze.default.Item,{name:$e,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},He.createElement(ct.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Yt}))))}},70472:function(Pn,an,ve){"use strict";ve.d(an,{u:function(){return Qe}});var ce=ve(59301),De=ve(43418),_e=ve(95237),Ct=ve(43604),Ze=ve(92832),Ke=ve(6848),Be=ve(78673),mt=ve(78241),ct=ve(5112),He=ve(5871),Et=ve(41984),ht=ve(12893),dt=ve(61485),Ae=ve(43809),te=ve(59879),ee=ve(59301),he=Object.defineProperty,se=Object.defineProperties,de=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,we=Object.prototype.hasOwnProperty,be=Object.prototype.propertyIsEnumerable,Me=(bt,Nt,At)=>Nt in bt?he(bt,Nt,{enumerable:!0,configurable:!0,writable:!0,value:At}):bt[Nt]=At,Ie=(bt,Nt)=>{for(var At in Nt||(Nt={}))we.call(Nt,At)&&Me(bt,At,Nt[At]);if(me)for(var At of me(Nt))be.call(Nt,At)&&Me(bt,At,Nt[At]);return bt},ze=(bt,Nt)=>se(bt,de(Nt)),et=(bt,Nt)=>{var At={};for(var Zt in bt)we.call(bt,Zt)&&Nt.indexOf(Zt)<0&&(At[Zt]=bt[Zt]);if(bt!=null&&me)for(var Zt of me(bt))Nt.indexOf(Zt)<0&&be.call(bt,Zt)&&(At[Zt]=bt[Zt]);return At};const $e=({value:bt,onChange:Nt})=>{const At=Yt=>{De.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:Ae.Z.modal,onOk:()=>{const ut=[...bt];ut.splice(Yt,1),Nt(ut)}})},Zt=()=>{const Yt=[...bt];Yt.push(""),Nt(Yt)};return ee.createElement(_e.Z,{className:"ml20"},ee.createElement(Ct.Z,{flex:1},bt==null?void 0:bt.map((Yt,ut)=>ee.createElement(_e.Z,{key:`${Yt}_${ut}`,className:"mb20"},ee.createElement(Ze.default.TextArea,{style:{flex:1,minHeight:44},defaultValue:Yt,autoSize:{maxRows:3},maxLength:1e3,onBlur:Ge=>{const kt=[...bt],ln=Ge.target.value.trim();kt[ut]=ln,Nt(kt)}}),ee.createElement(Ke.Z,{title:"\u5220\u9664"},ee.createElement(ht.Z,{className:Ae.Z.deleteIcon,style:{marginLeft:15,visibility:ut>0?"visible":"hidden"},onClick:()=>At(ut)}))))),ee.createElement(Ct.Z,null,ee.createElement("div",{className:`${Ae.Z.addBtn}`,onClick:()=>{Zt()}},"\u65B0\u589E\u7B54\u6848")))},gt=({value:bt,onChange:Nt})=>{const At=Yt=>{De.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:Ae.Z.modal,onOk:()=>{const ut=[...bt];ut.splice(Yt,1),Nt(ut)}})},Zt=()=>{const Yt=[...bt];Yt.push(""),Nt(Yt)};return ee.createElement(_e.Z,{className:"ml20"},ee.createElement(Ct.Z,{flex:1},bt==null?void 0:bt.map((Yt,ut)=>ee.createElement(_e.Z,{key:`${Yt}_${ut}`,align:"middle",className:"mb20"},ee.createElement(te.Z,{value:Yt,style:{flex:1},onChange:Ge=>{const kt=[...bt];kt[ut]=Ge,Nt(kt)}}),ee.createElement(Ke.Z,{title:"\u5220\u9664"},ee.createElement(ht.Z,{className:Ae.Z.deleteIcon,style:{marginLeft:15,visibility:ut>0?"visible":"hidden"},onClick:()=>At(ut)}))))),ee.createElement(Ct.Z,null,ee.createElement("div",{className:`${Ae.Z.addBtn}`,onClick:()=>{Zt()}},"\u65B0\u589E\u7B54\u6848")))},je=({value:bt=!0,onChange:Nt})=>ee.createElement(Be.Z,{checked:!bt,onChange:At=>{Nt(!At)}}),Tt="\u2581",Qe=({questionTitlePlaceholder:bt,form:Nt,scoreByBlank:At=!1,answerKey:Zt})=>{const[Yt,ut]=(0,ce.useState)(!1),Ge=(rn,Cn)=>{const ft=Cn.line;let En=0;for(let Re=0;Re<ft;Re++)En+=rn.getLine(Re).split(Tt).length-1;const Vn=rn.getLine(ft).substring(0,Cn.ch);return En+=Vn.split(Tt).length-1,En},kt=(rn,Cn,ft,En)=>{const Vn=rn.getRange(Cn.from,Cn.to);let Re=0;if(Cn.text.forEach(Ce=>{Re+=Ce.split(Tt).length-1}),Cn.origin!=="setValue"){if(Vn&&Vn.indexOf(Tt)!==-1){const Ce=Vn.split(Tt).length-1,Pe=Ge(rn,Cn.from);if(console.log(`\u5220\u9664${Ce}\u4E2A\uFF0C \u524D\u9762\u6709${Pe}\u4E2A\uFF0C\u65B0\u589E${Re}\u4E2A`),Ce>1){const Ne=Array.from({length:Ce},(ke,Se)=>Pe+Se);En(Ne)}else En(Pe)}else if(Re>0){const Ce=Ge(rn,Cn.from);console.log(`\u65B0\u589E${Re}\u4E2A\uFF0C\u4E4B\u524D\u6709${Ce}\u4E2A`),ft(Re,Ce)}}},ln=()=>{const rn=Nt.getFieldValue(Zt);Nt.setFieldsValue({[Zt]:rn.map((Cn,ft)=>ze(Ie({},Cn),{position:ft+1}))})},sn=(0,ce.useRef)(),Bt=(rn,Cn)=>{for(let ft=0;ft<rn;ft++)sn.current({position:null,answer_text:[""],model:1},Cn+ft);ln()},Gt=(0,ce.useRef)(),en=rn=>{Gt.current(rn),ln()},Bn=mt.default.useWatch(Zt,Nt);return ee.createElement("div",{className:Ae.Z.wrap},ee.createElement("div",{className:Ae.Z.questionTitleEditorWrap},ee.createElement(mt.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},ee.createElement(Et.h,{scrollId:"name",watch:!0,height:140,placeholder:bt,showNullButton:!0,onCMBeforeChange:(rn,Cn)=>{kt(rn,Cn,Bt,en)}}))),ee.createElement(mt.default.List,{name:Zt,rules:[{validator(rn,Cn){if(!(Cn!=null&&Cn.length))return Promise.reject(new Error("\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879"));for(const ft of Cn){const{answer_text:En}=ft||{};if(En!=null&&En.some(Vn=>(Vn==null?void 0:Vn.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(rn,{add:Cn,remove:ft},{errors:En})=>(sn.current=Cn,Gt.current=ft,ee.createElement(ee.Fragment,null,ee.createElement(mt.default.Item,{label:ee.createElement("span",null,"\u586B\u7A7A\u9879\u7B54\u6848",!(rn!=null&&rn.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}}),rn.map((Vn,Re)=>{var Ce=Vn,{key:Pe,name:Ne}=Ce,ke=et(Ce,["key","name"]),Se,nt;return ee.createElement("div",{style:{marginBottom:10},key:Pe},ee.createElement(_e.Z,{className:"mb20",align:"middle",wrap:!1},ee.createElement(Ct.Z,{style:{marginRight:10},flex:"0 0 auto",className:`${Ae.Z.blankIndex}`},"\u586B\u7A7A\u9879",Re+1),ee.createElement(mt.default.Item,ze(Ie({},ke),{name:[Ne,"model"],noStyle:!0}),ee.createElement(ct.ZP.Group,{onChange:()=>{const Pt=Nt.getFieldValue(Zt);Nt.setFieldsValue({[Zt]:Pt.map((qe,Ue)=>ze(Ie({},qe),{answer_text:Ne===Ue?[""]:qe.answer_text}))})}},ee.createElement(ct.ZP,{value:1},"\u6587\u672C\u6A21\u5F0F ",ee.createElement(Ke.Z,{title:"\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9700\u8981\u5728\u6587\u672C\u6846\u4E2D\u586B\u5199\u6587\u672C\u7B54\u6848"},ee.createElement(dt.Z,null))),ee.createElement(ct.ZP,{value:2},"\u6570\u5B66\u516C\u5F0F\u6A21\u5F0F ",ee.createElement(Ke.Z,{title:"\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9700\u8981\u7F16\u5199\u6570\u5B66\u516C\u5F0F\u4F5C\u4E3A\u7B54\u6848"},ee.createElement(dt.Z,null)))))),ee.createElement(_e.Z,{style:{marginLeft:20},align:"middle",wrap:!1},ee.createElement(Ct.Z,{flex:1},ee.createElement(_e.Z,{align:"top",justify:"space-between",wrap:!1},ee.createElement(Ct.Z,{flex:1},ee.createElement(mt.default.Item,ze(Ie({},ke),{name:[Ne,"answer_text"],noStyle:!0}),((nt=(Se=Nt.getFieldValue(Zt))==null?void 0:Se[Ne])==null?void 0:nt.model)===1?ee.createElement($e,null):ee.createElement(gt,null))),At&&ee.createElement(Ct.Z,{flex:"224px",style:{margin:"-7px 0 0 20px"}},ee.createElement(mt.default.Item,ze(Ie({},ke),{name:[Ne,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:Ae.Z.blankInputNumberWrapper}),ee.createElement(He.Z,{min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5206\u503C"})))),ee.createElement(mt.default.Item,ze(Ie({},ke),{name:[Ne,"position"],noStyle:!0}),ee.createElement(Ze.default,{type:"hidden"})))))})))),ee.createElement(_e.Z,{align:"middle"},ee.createElement(mt.default.Item,{name:"downcase",valuePropName:"checked"},ee.createElement(Be.Z,null)),ee.createElement(Ct.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),ee.createElement(_e.Z,{align:"middle"},ee.createElement(mt.default.Item,{name:"no_space",valuePropName:"checked"},ee.createElement(Be.Z,null)),ee.createElement(Ct.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(Bn==null?void 0:Bn.length)>1&&ee.createElement(_e.Z,{align:"middle",className:(Bn==null?void 0:Bn.length)>1?"mb30":`${Ae.Z.hide}`},ee.createElement(mt.default.Item,{name:"is_ordered"},ee.createElement(je,null)),ee.createElement(Ct.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:()=>ut(!0)},ee.createElement(mt.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ee.createElement(Et.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Yt}))))}},11832:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return me}});var ce=ve(59301),De=ve(95237),_e=ve(43604),Ct=ve(78241),Ze=ve(43809),Ke=ve(41984),Be=ve(59301),mt=Object.defineProperty,ct=Object.defineProperties,He=Object.getOwnPropertyDescriptors,Et=Object.getOwnPropertySymbols,ht=Object.prototype.hasOwnProperty,dt=Object.prototype.propertyIsEnumerable,Ae=(we,be,Me)=>be in we?mt(we,be,{enumerable:!0,configurable:!0,writable:!0,value:Me}):we[be]=Me,te=(we,be)=>{for(var Me in be||(be={}))ht.call(be,Me)&&Ae(we,Me,be[Me]);if(Et)for(var Me of Et(be))dt.call(be,Me)&&Ae(we,Me,be[Me]);return we},ee=(we,be)=>ct(we,He(be)),he=(we,be)=>{var Me={};for(var Ie in we)ht.call(we,Ie)&&be.indexOf(Ie)<0&&(Me[Ie]=we[Ie]);if(we!=null&&Et)for(var Ie of Et(we))be.indexOf(Ie)<0&&dt.call(we,Ie)&&(Me[Ie]=we[Ie]);return Me};const se={\u6B63\u786E:"T",\u9519\u8BEF:"F"},de=({value:we,onChange:be,form:Me})=>{const Ie=(we==null?void 0:we.is_answer)===1,ze=we==null?void 0:we.choice_text,et=()=>{const $e=Me.getFieldsValue().choices.map(gt=>({choice_text:gt.choice_text,is_answer:0}));Me.setFieldsValue({choices:$e}),be(ee(te({},we),{is_answer:1}))};return Be.createElement(De.Z,{className:Ze.Z.choiceWrap,align:"middle",wrap:!1,style:{marginBottom:"20px"}},Be.createElement(_e.Z,{onClick:et,className:`${Ze.Z.choiceIndex} ${Ze.Z.judgementIndex} ${Ie?Ze.Z.activeAnswer:""}`},se[ze]),Be.createElement(_e.Z,{flex:1,className:`${Ze.Z.editorWrap} ml15`},Be.createElement("div",{className:`${Ze.Z.inputBorder} ${Ze.Z.placeholder} ${Ie?Ze.Z.activeJudgementAnswer:""}`},ze)),Be.createElement(_e.Z,{flex:"0 0 auto",className:"ml15"},Be.createElement("div",{onClick:et,className:`${Ze.Z.setAnswerBtn} ${Ie?Ze.Z.activeAnswer:""}`},Ie?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},me=({questionTitlePlaceholder:we,choiceKey:be,form:Me})=>{const[Ie,ze]=(0,ce.useState)(!1);return Be.createElement("div",{className:Ze.Z.wrap},Be.createElement("div",{className:Ze.Z.questionTitleEditorWrap},Be.createElement(Ct.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},Be.createElement(Ke.h,{scrollId:"name",watch:!0,height:140,placeholder:we}))),Be.createElement(Ct.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},Be.createElement(Ct.default.List,{name:"choices",rules:[{validator(et,$e){return $e.some(je=>(je==null?void 0:je.is_answer)===1)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},et=>Be.createElement("div",{id:"choices"},et.map($e=>{var gt=$e,{key:je,name:Tt}=gt,Qe=he(gt,["key","name"]);return Be.createElement(Ct.default.Item,ee(te({},Qe),{key:je,name:Tt,noStyle:!0}),Be.createElement(de,{form:Me}))})))),Be.createElement("div",{onClick:()=>ze(!0)},Be.createElement(Ct.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Be.createElement(Ke.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Ie}))))}},41984:function(Pn,an,ve){"use strict";ve.d(an,{h:function(){return te},x:function(){return ee}});var ce=ve(12290),De=ve(43809),_e=ve(85149),Ct=ve(59301),Ze=Object.defineProperty,Ke=Object.defineProperties,Be=Object.getOwnPropertyDescriptors,mt=Object.getOwnPropertySymbols,ct=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,Et=(he,se,de)=>se in he?Ze(he,se,{enumerable:!0,configurable:!0,writable:!0,value:de}):he[se]=de,ht=(he,se)=>{for(var de in se||(se={}))ct.call(se,de)&&Et(he,de,se[de]);if(mt)for(var de of mt(se))He.call(se,de)&&Et(he,de,se[de]);return he},dt=(he,se)=>Ke(he,Be(se)),Ae=(he,se)=>{var de={};for(var me in he)ct.call(he,me)&&se.indexOf(me)<0&&(de[me]=he[me]);if(he!=null&&mt)for(var me of mt(he))se.indexOf(me)<0&&He.call(he,me)&&(de[me]=he[me]);return de};const te=he=>{var se=he,{value:de,onChange:me,scrollId:we}=se,be=Ae(se,["value","onChange","scrollId"]);return Ct.createElement("div",{id:we||""},Ct.createElement(ce.Z,dt(ht({},be),{defaultValue:de,onChange:(Me,Ie)=>{Ie!=null&&Ie.length?me(Me,Ie):me(Me)}})))},ee=({value:he,onChange:se,placeholder:de,height:me=140,isEdit:we,miniToolbar:be,watch:Me=!0})=>we?Ct.createElement(ce.Z,{watch:Me,isFocus:!0,height:me||void 0,placeholder:de,defaultValue:he,onChange:se,miniToolbar:be}):Ct.createElement("div",{style:{cursor:"pointer"}},he?Ct.createElement(_e.Z,{className:De.Z.inputBorder,value:he}):Ct.createElement("div",{className:`${De.Z.inputBorder} ${De.Z.placeholder} inputBorderError`},de))},35173:function(Pn,an,ve){"use strict";ve.d(an,{W:function(){return gt}});var ce=ve(59301),De=ve(8591),_e=ve(12563),Ct=ve(78241),Ze=ve(78673),Ke=ve(95237),Be=ve(43604),mt=ve(6848),ct=ve(92832),He=ve(5871),Et=ve(43809),ht=ve(41984),dt=ve(12290),Ae=ve(61485),te=Object.defineProperty,ee=Object.defineProperties,he=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,de=Object.prototype.hasOwnProperty,me=Object.prototype.propertyIsEnumerable,we=(je,Tt,Qe)=>Tt in je?te(je,Tt,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):je[Tt]=Qe,be=(je,Tt)=>{for(var Qe in Tt||(Tt={}))de.call(Tt,Qe)&&we(je,Qe,Tt[Qe]);if(se)for(var Qe of se(Tt))me.call(Tt,Qe)&&we(je,Qe,Tt[Qe]);return je},Me=(je,Tt)=>ee(je,he(Tt)),Ie=(je,Tt)=>{var Qe={};for(var bt in je)de.call(je,bt)&&Tt.indexOf(bt)<0&&(Qe[bt]=je[bt]);if(je!=null&&se)for(var bt of se(je))Tt.indexOf(bt)<0&&me.call(je,bt)&&(Qe[bt]=je[bt]);return Qe};const ze=je=>{var Tt=je,{value:Qe,onChange:bt}=Tt,Nt=Ie(Tt,["value","onChange"]);const At=Zt=>{bt([Zt])};return ce.createElement(dt.Z,Me(be({},Nt),{defaultValue:Qe==null?void 0:Qe[0],onChange:At}))},et=je=>{if(!je)return!1;if(/^s*$/.test(je)||je.trim()===""){De.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u5168\u4E3A\u7A7A\u683C");return}let Tt=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 je==="|"?(De.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},$e=({value:je=[],onClose:Tt})=>ce.createElement(_e.default,{closable:!0,onClose:Tt,className:Et.Z.keywordTag},ce.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},je.join(" \u6216 "))),gt=({questionTitlePlaceholder:je,form:Tt,showKeywords:Qe,isMustKeyWords:bt=Qe})=>{const[Nt,At]=(0,ce.useState)(!1),[Zt,Yt]=(0,ce.useState)(""),ut=Ct.default.useWatch("use_keywords",Tt),Ge=Ct.default.useWatch("question_score",Tt);return ce.createElement("div",{className:Et.Z.wrap},ce.createElement("div",{className:Et.Z.questionTitleEditorWrap},ce.createElement(Ct.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},ce.createElement(ht.h,{scrollId:"name",watch:!0,height:140,placeholder:je}))),ce.createElement(Ct.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:"answer_texts",labelCol:{span:24}},ce.createElement(ze,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),Qe&&!bt&&ce.createElement(Ct.default.Item,{hidden:!0,name:"use_keywords",valuePropName:"checked"},ce.createElement(Ze.Z,{defaultChecked:!0})),Qe&&bt&&ce.createElement(Ke.Z,{align:"middle",className:"mb30"},ce.createElement(Ct.default.Item,{name:"use_keywords",valuePropName:"checked"},ce.createElement(Ze.Z,null)),ce.createElement(Be.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),ce.createElement(Be.Z,null,ce.createElement(mt.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"},ce.createElement(Ae.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(ut||!bt)&&ce.createElement(Ct.default.List,{name:"keywords",rules:[{validator(kt,ln){return bt?ln!=null&&ln.length?(ln==null?void 0:ln.reduce((Bt,Gt)=>Bt+Gt.score,0))>parseFloat(Ge)?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()}}]},(kt,{add:ln,remove:sn})=>ce.createElement(ce.Fragment,null,ce.createElement("div",{className:`${Et.Z.title} mb10`},bt?"\u5173\u952E\u8BCD":ce.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),ce.createElement(Ke.Z,{align:"middle",className:"font14 mb30"},ce.createElement(Be.Z,{flex:1},ce.createElement(ct.default,{value:Zt,onChange:Bt=>{Yt(Bt.target.value)},maxLength:50,allowClear:!0,onPressEnter:Bt=>{var Gt,en,Bn,rn;const Cn=`${(Gt=Bt.target)==null?void 0:Gt.value}`,ft=(Bn=(en=Cn==null?void 0:Cn.split("|"))==null?void 0:en.filter(Re=>!!Re))==null?void 0:Bn.map(Re=>Re==null?void 0:Re.trim()),En=Tt.getFieldValue("keywords"),Vn=((rn=En==null?void 0:En.map(Re=>Re==null?void 0:Re.keyword))==null?void 0:rn.flat())||[];for(const Re of ft)if(Vn.includes(Re)){De.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}et(Cn)&&(ln({keyword:ft,score:1}),Yt(""))},className:Et.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"})),ce.createElement(Be.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),kt.map(Bt=>{var Gt=Bt,{key:en,name:Bn}=Gt,rn=Ie(Gt,["key","name"]);return ce.createElement(Ke.Z,{key:en,className:"mb20",style:{marginRight:148}},ce.createElement(Be.Z,{flex:1},ce.createElement(Ke.Z,{align:"middle",justify:"space-between"},ce.createElement(Ct.default.Item,Me(be({},rn),{name:[Bn,"keyword"]}),ce.createElement($e,{onClose:()=>sn(Bn)})),bt&&ce.createElement(Ct.default.Item,Me(be({},rn),{name:[Bn,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:Et.Z.blankInputNumberWrapper}),ce.createElement(He.Z,{className:Et.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),ce.createElement("div",{onClick:()=>At(!0)},ce.createElement(Ct.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ce.createElement(ht.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Nt}))))}},94734:function(Pn,an,ve){"use strict";ve.d(an,{tc:function(){return Ji.t},uh:function(){return ce.u},rL:function(){return Ri},u8:function(){return _e.u},ZZ:function(){return De.Z},Wk:function(){return Ct.W}});var ce=ve(65357),De=ve(11832),_e=ve(70472),Ct=ve(35173),Ze=ve(59301),Ke=ve(36381),Be=ve(78241),mt=ve(95237),ct=ve(43604),He=ve(5871),Et=ve(6848),ht=ve(38854),dt=ve(43809),Ae=ve(12893),te=ve(41984),ee=ve(43418),he=ve(92832),se=ve(78673),de=ve(59301),me=Object.defineProperty,we=Object.defineProperties,be=Object.getOwnPropertyDescriptors,Me=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,ze=Object.prototype.propertyIsEnumerable,et=(Un,$n,ti)=>$n in Un?me(Un,$n,{enumerable:!0,configurable:!0,writable:!0,value:ti}):Un[$n]=ti,$e=(Un,$n)=>{for(var ti in $n||($n={}))Ie.call($n,ti)&&et(Un,ti,$n[ti]);if(Me)for(var ti of Me($n))ze.call($n,ti)&&et(Un,ti,$n[ti]);return Un},gt=(Un,$n)=>we(Un,be($n)),je=(Un,$n)=>{var ti={};for(var Pi in Un)Ie.call(Un,Pi)&&$n.indexOf(Pi)<0&&(ti[Pi]=Un[Pi]);if(Un!=null&&Me)for(var Pi of Me(Un))$n.indexOf(Pi)<0&&ze.call(Un,Pi)&&(ti[Pi]=Un[Pi]);return ti};const Tt=({value:Un,onChange:$n})=>{const ti=mi=>{ee.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:dt.Z.modal,onOk:()=>{const nr=[...Un];nr.splice(mi,1),$n(nr)}})},Pi=()=>{const mi=[...Un];mi.push(""),$n(mi)};return de.createElement(mt.Z,{className:"ml20"},de.createElement(ct.Z,{flex:1},Un==null?void 0:Un.map((mi,nr)=>de.createElement(mt.Z,{key:`${mi}_${nr}`,align:"middle",className:"mb20"},de.createElement(he.default.TextArea,{style:{flex:1,minHeight:44},defaultValue:mi,autoSize:{maxRows:3},maxLength:1e3,onBlur:ji=>{const Le=[...Un],si=ji.target.value.trim();Le[nr]=si,$n(Le)}}),de.createElement(Et.Z,{title:"\u5220\u9664"},de.createElement(Ae.Z,{className:dt.Z.deleteIcon,style:{marginLeft:15,visibility:nr>0?"visible":"hidden"},onClick:()=>ti(nr)}))))),de.createElement(ct.Z,null,de.createElement("div",{className:`${dt.Z.addBtn}`,onClick:()=>{Pi()}},"\u65B0\u589E\u7B54\u6848")))},Qe=({value:Un=!0,onChange:$n})=>de.createElement(se.Z,{checked:!Un,onChange:ti=>{$n(!ti)}}),bt="\u2581",Nt=({questionTitlePlaceholder:Un,form:$n,name:ti,scoreByBlank:Pi=!1,answerKey:mi,titleKey:nr="name",analysisKey:ji="analysis",isOrdered:Le="is_ordered"})=>{var si,Hi;const[hn,ni]=(0,Ze.useState)(!1),vi=(tn,xt)=>{const rt=xt.line;let Vt=0;for(let xn=0;xn<rt;xn++)Vt+=tn.getLine(xn).split(bt).length-1;const on=tn.getLine(rt).substring(0,xt.ch);return Vt+=on.split(bt).length-1,Vt},Fi=(tn,xt,rt,Vt)=>{const on=tn.getRange(xt.from,xt.to);let xn=0;if(xt.text.forEach(An=>{xn+=An.split(bt).length-1}),xt.origin!=="setValue"){if(on&&on.indexOf(bt)!==-1){const An=on.split(bt).length-1,yt=vi(tn,xt.from);if(console.log(`\u5220\u9664${An}\u4E2A\uFF0C \u524D\u9762\u6709${yt}\u4E2A\uFF0C\u65B0\u589E${xn}\u4E2A`),An>1){const cn=Array.from({length:An},(On,ri)=>yt+ri);Vt(cn)}else Vt(yt)}else if(xn>0){const An=vi(tn,xt.from);console.log(`\u65B0\u589E${xn}\u4E2A\uFF0C\u4E4B\u524D\u6709${An}\u4E2A`),rt(xn,An)}}},_n=()=>{const tn=$n.getFieldValue(["sub_item_banks",...mi]);$n.setFieldValue(["sub_item_banks",...mi],tn==null?void 0:tn.map((xt,rt)=>gt($e({},xt),{position:rt+1})))},Dn=(0,Ze.useRef)(),Ft=(tn,xt)=>{for(let rt=0;rt<tn;rt++)Dn.current({position:null,answer_text:[""]},xt+rt);_n()},Ot=(0,Ze.useRef)(),Ve=tn=>{Ot.current(tn),_n()},Ut=(Hi=(si=$n.getFieldValue("sub_item_banks"))==null?void 0:si[mi==null?void 0:mi[0]])==null?void 0:Hi[mi==null?void 0:mi[1]];return(0,Ze.useEffect)(()=>{console.log("========",$n.getFieldsValue())},[$n]),de.createElement("div",{className:dt.Z.wrap},de.createElement("div",{className:dt.Z.questionTitleEditorWrap},de.createElement(Be.default.Item,{label:"\u9898\u5E72",name:nr,labelCol:{span:24},rules:[{required:!0}]},de.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:Un,showNullButton:!0,onCMBeforeChange:(tn,xt)=>{Fi(tn,xt,Ft,Ve)}}))),de.createElement(Be.default.List,{name:mi,rules:[{validator(tn,xt){if((xt==null?void 0:xt.length)===0)return Promise.reject(new Error("\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879"));for(const rt of xt){const{answer_text:Vt}=rt||{};if(Vt!=null&&Vt.some(on=>(on==null?void 0:on.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(tn,{add:xt,remove:rt},{errors:Vt})=>(Dn.current=xt,Ot.current=rt,de.createElement(de.Fragment,null,de.createElement(Be.default.Item,{label:de.createElement("span",null,"\u586B\u7A7A\u9879\u7B54\u6848",!(tn!=null&&tn.length)&&de.createElement("span",{style:{color:"#E99237"}},"\uFF08\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879\uFF09")),required:!0,labelCol:{span:24}}),tn.map((on,xn)=>{var An=on,{key:yt,name:cn}=An,On=je(An,["key","name"]);return de.createElement(mt.Z,{align:"top",key:yt},de.createElement(ct.Z,{className:`${dt.Z.blankIndex} pt5`},"\u586B\u7A7A\u9879",xn+1),de.createElement(ct.Z,{flex:1},de.createElement(mt.Z,{align:"top",justify:"space-between"},de.createElement(ct.Z,{flex:1},de.createElement(Be.default.Item,gt($e({},On),{name:[cn,"answer_text"],noStyle:!0}),de.createElement(Tt,null))),Pi&&de.createElement(ct.Z,{flex:"224px"},de.createElement(Be.default.Item,gt($e({},On),{name:[cn,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:dt.Z.blankInputNumberWrapper}),de.createElement(He.Z,{className:dt.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u6309\u7A7A\u7ED9\u5206\u8BF7\u8F93\u5165\u5206\u503C"})))),de.createElement(Be.default.Item,gt($e({},On),{name:[cn,"position"],noStyle:!0}),de.createElement(he.default,{type:"hidden"}))))})))),de.createElement(mt.Z,{align:"middle"},de.createElement(Be.default.Item,{name:[ti,"downcase"],valuePropName:"checked"},de.createElement(se.Z,null)),de.createElement(ct.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),de.createElement(mt.Z,{align:"middle"},de.createElement(Be.default.Item,{name:[ti,"no_space"],valuePropName:"checked"},de.createElement(se.Z,null)),de.createElement(ct.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(Ut==null?void 0:Ut.length)>1&&de.createElement(mt.Z,{align:"middle",className:(Ut==null?void 0:Ut.length)>1?"mb30":`${dt.Z.hide}`},de.createElement(Be.default.Item,{name:Le},de.createElement(Qe,null)),de.createElement(ct.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")),de.createElement("div",{className:"mt30",onClick:()=>ni(!0)},de.createElement(Be.default.Item,{name:ji,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},de.createElement(te.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:hn}))))};var At=ve(59301),Zt=Object.defineProperty,Yt=Object.defineProperties,ut=Object.getOwnPropertyDescriptors,Ge=Object.getOwnPropertySymbols,kt=Object.prototype.hasOwnProperty,ln=Object.prototype.propertyIsEnumerable,sn=(Un,$n,ti)=>$n in Un?Zt(Un,$n,{enumerable:!0,configurable:!0,writable:!0,value:ti}):Un[$n]=ti,Bt=(Un,$n)=>{for(var ti in $n||($n={}))kt.call($n,ti)&&sn(Un,ti,$n[ti]);if(Ge)for(var ti of Ge($n))ln.call($n,ti)&&sn(Un,ti,$n[ti]);return Un},Gt=(Un,$n)=>Yt(Un,ut($n)),en=(Un,$n)=>{var ti={};for(var Pi in Un)kt.call(Un,Pi)&&$n.indexOf(Pi)<0&&(ti[Pi]=Un[Pi]);if(Un!=null&&Ge)for(var Pi of Ge(Un))$n.indexOf(Pi)<0&&ln.call(Un,Pi)&&(ti[Pi]=Un[Pi]);return ti};const Bn={\u6B63\u786E:"T",\u9519\u8BEF:"F"},rn=({value:Un,onChange:$n,form:ti,choiceKey:Pi})=>{const mi=(Un==null?void 0:Un.is_answer)===1,nr=Un==null?void 0:Un.choice_text,ji=()=>{var Le;const si=(Le=ti==null?void 0:ti.getFieldValue(["sub_item_banks",...Pi]))==null?void 0:Le.map(Hi=>({choice_text:Hi.choice_text,is_answer:0}));ti==null||ti.setFieldValue(["sub_item_banks",...Pi],si),$n(Gt(Bt({},Un),{is_answer:1}))};return At.createElement(mt.Z,{className:dt.Z.choiceWrap,align:"middle",wrap:!1},At.createElement(ct.Z,{onClick:ji,className:`${dt.Z.choiceIndex} ${dt.Z.judgementIndex} ${mi?dt.Z.activeAnswer:""}`},Bn[nr]),At.createElement(ct.Z,{flex:1,className:`${dt.Z.editorWrap} ml15`},At.createElement("div",{className:`${dt.Z.inputBorder} ${dt.Z.placeholder} ${mi?dt.Z.activeJudgementAnswer:""}`},nr)),At.createElement(ct.Z,{flex:"0 0 auto",className:"ml15"},At.createElement("div",{onClick:ji,className:`${dt.Z.setAnswerBtn} ${mi?dt.Z.activeAnswer:""}`},mi?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},Cn=({questionTitlePlaceholder:Un,choiceKey:$n="choices",form:ti,titleKey:Pi="name",analysisKey:mi="analysis"})=>{const[nr,ji]=(0,Ze.useState)(!1);return At.createElement("div",{className:dt.Z.wrap},At.createElement("div",{className:dt.Z.questionTitleEditorWrap},At.createElement(Be.default.Item,{label:"\u9898\u5E72",name:Pi,labelCol:{span:24},rules:[{required:!0}]},At.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:Un}))),At.createElement(Be.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},At.createElement(Be.default.List,{name:$n,rules:[{validator(Le,si){return si.some(hn=>(hn==null?void 0:hn.is_answer)===1)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},Le=>At.createElement("div",{id:"choices",style:{display:"flex",flexDirection:"column",gap:"20px"}},Le.map(si=>{var Hi=si,{key:hn,name:ni}=Hi,vi=en(Hi,["key","name"]);return At.createElement(Be.default.Item,Gt(Bt({},vi),{key:hn,name:ni,noStyle:!0}),At.createElement(rn,{form:ti,choiceKey:$n}))})))),At.createElement("div",{className:"mt30",onClick:()=>ji(!0)},At.createElement(Be.default.Item,{name:mi,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},At.createElement(te.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:nr}))))};var ft=ve(8591),En=ve(12563),Vn=ve(12290),Re=ve(61485),Ce=Object.defineProperty,Pe=Object.defineProperties,Ne=Object.getOwnPropertyDescriptors,ke=Object.getOwnPropertySymbols,Se=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,Pt=(Un,$n,ti)=>$n in Un?Ce(Un,$n,{enumerable:!0,configurable:!0,writable:!0,value:ti}):Un[$n]=ti,qe=(Un,$n)=>{for(var ti in $n||($n={}))Se.call($n,ti)&&Pt(Un,ti,$n[ti]);if(ke)for(var ti of ke($n))nt.call($n,ti)&&Pt(Un,ti,$n[ti]);return Un},Ue=(Un,$n)=>Pe(Un,Ne($n)),St=(Un,$n)=>{var ti={};for(var Pi in Un)Se.call(Un,Pi)&&$n.indexOf(Pi)<0&&(ti[Pi]=Un[Pi]);if(Un!=null&&ke)for(var Pi of ke(Un))$n.indexOf(Pi)<0&&nt.call(Un,Pi)&&(ti[Pi]=Un[Pi]);return ti};const vt=Un=>{var $n=Un,{value:ti,onChange:Pi}=$n,mi=St($n,["value","onChange"]);const nr=ji=>{Pi([ji])};return Ze.createElement(Vn.Z,Ue(qe({},mi),{defaultValue:ti==null?void 0:ti[0],onChange:nr}))},lt=Un=>{if(!Un)return!1;let $n=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 Un==="|"?(ft.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},Dt=({value:Un=[],onClose:$n})=>Ze.createElement(En.default,{closable:!0,onClose:$n,className:dt.Z.keywordTag},Ze.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},Un.join(" \u6216 "))),un=({questionTitlePlaceholder:Un,form:$n,showKeywords:ti,isMustKeyWords:Pi=ti,titleKey:mi="name",analysisKey:nr="analysis",answerTexts:ji="answer_texts",keywords:Le="keywords",useKeywords:si="use_keywords",indexs:Hi})=>{const[hn,ni]=(0,Ze.useState)(!1),[vi,Fi]=(0,Ze.useState)(""),[_n,Dn]=(0,Ze.useState)(!1),Ft=Be.default.useWatch("question_score",$n);return Ze.createElement("div",{className:dt.Z.wrap},Ze.createElement("div",{className:dt.Z.questionTitleEditorWrap},Ze.createElement(Be.default.Item,{label:"\u9898\u5E72",name:mi,labelCol:{span:24},rules:[{required:!0}]},Ze.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:Un}))),Ze.createElement(Be.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:ji,labelCol:{span:24}},Ze.createElement(vt,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),ti&&!Pi&&Ze.createElement(Be.default.Item,{hidden:!0,name:si,valuePropName:"checked"},Ze.createElement(se.Z,{defaultChecked:!0})),ti&&Pi&&Ze.createElement(mt.Z,{align:"middle",className:"mb30"},Ze.createElement(Be.default.Item,{name:si,valuePropName:"checked"},Ze.createElement(se.Z,{onChange:()=>{var Ot,Ve,Ut,tn,xt,rt;console.log($n.getFieldsValue()),Dn((Ut=(Ve=(Ot=$n.getFieldsValue())==null?void 0:Ot.sub_item_banks)==null?void 0:Ve[Hi])==null?void 0:Ut.use_keywords),console.log((rt=(xt=(tn=$n.getFieldsValue())==null?void 0:tn.sub_item_banks)==null?void 0:xt[Hi])==null?void 0:rt.use_keywords),console.log(_n)}})),Ze.createElement(ct.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),Ze.createElement(ct.Z,null,Ze.createElement(Et.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"},Ze.createElement(Re.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(_n||!Pi)&&Ze.createElement(Be.default.List,{name:Le,rules:[{validator(Ot,Ve){return Pi?Ve!=null&&Ve.length?(Ve==null?void 0:Ve.reduce((tn,xt)=>tn+xt.score,0))>parseFloat(Ft)?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()}}]},(Ot,{add:Ve,remove:Ut})=>Ze.createElement(Ze.Fragment,null,Ze.createElement("div",{className:`${dt.Z.title} mb10`},Pi?"\u5173\u952E\u8BCD":Ze.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),Ze.createElement(mt.Z,{align:"middle",className:"font14 mb30"},Ze.createElement(ct.Z,{flex:1},Ze.createElement(he.default,{value:vi,onChange:tn=>{Fi(tn.target.value)},maxLength:50,allowClear:!0,onPressEnter:tn=>{var xt,rt,Vt,on;const xn=`${(xt=tn.target)==null?void 0:xt.value}`,An=(Vt=(rt=xn==null?void 0:xn.split("|"))==null?void 0:rt.filter(On=>!!On))==null?void 0:Vt.map(On=>On==null?void 0:On.trim()),yt=$n.getFieldValue(["sub_item_banks",...Le]),cn=((on=yt==null?void 0:yt.map(On=>On==null?void 0:On.keyword))==null?void 0:on.flat())||[];for(const On of An)if(cn.includes(On)){ft.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}lt(xn)&&(Ve({keyword:An,score:1}),Fi(""))},className:dt.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"})),Ze.createElement(ct.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),Ot.map(tn=>{var xt=tn,{key:rt,name:Vt}=xt,on=St(xt,["key","name"]);return Ze.createElement(mt.Z,{key:rt,className:"mb20",style:{marginRight:148}},Ze.createElement(ct.Z,{flex:1},Ze.createElement(mt.Z,{align:"middle",justify:"space-between"},Ze.createElement(Be.default.Item,Ue(qe({},on),{name:[Vt,"keyword"]}),Ze.createElement(Dt,{onClose:()=>Ut(Vt)})),Pi&&Ze.createElement(Be.default.Item,Ue(qe({},on),{name:[Vt,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:dt.Z.blankInputNumberWrapper}),Ze.createElement(He.Z,{className:dt.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),Ze.createElement("div",{onClick:()=>ni(!0)},Ze.createElement(Be.default.Item,{name:nr,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Ze.createElement(te.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:hn}))))};var Xt=ve(59301),$t=Object.defineProperty,wn=Object.defineProperties,bn=Object.getOwnPropertyDescriptors,pn=Object.getOwnPropertySymbols,Yn=Object.prototype.hasOwnProperty,ai=Object.prototype.propertyIsEnumerable,Wn=(Un,$n,ti)=>$n in Un?$t(Un,$n,{enumerable:!0,configurable:!0,writable:!0,value:ti}):Un[$n]=ti,Rn=(Un,$n)=>{for(var ti in $n||($n={}))Yn.call($n,ti)&&Wn(Un,ti,$n[ti]);if(pn)for(var ti of pn($n))ai.call($n,ti)&&Wn(Un,ti,$n[ti]);return Un},ii=(Un,$n)=>wn(Un,bn($n)),pi=(Un,$n)=>{var ti={};for(var Pi in Un)Yn.call(Un,Pi)&&$n.indexOf(Pi)<0&&(ti[Pi]=Un[Pi]);if(Un!=null&&pn)for(var Pi of pn(Un))$n.indexOf(Pi)<0&&ai.call(Un,Pi)&&(ti[Pi]=Un[Pi]);return ti};const{Panel:gi}=Ke.default,Ri=({questionTitlePlaceholder:Un,choiceKey:$n,form:ti,withScore:Pi})=>{const[mi,nr]=(0,Ze.useState)([]),ji=Le=>{nr(Le)};return Xt.createElement("div",{className:dt.Z.wrap},Xt.createElement("div",{className:dt.Z.questionTitleEditorWrap},Xt.createElement(Be.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},Xt.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:Un}))),Xt.createElement(Be.default.Item,{label:"\u5C0F\u9898",required:!0,labelCol:{span:24}}),Xt.createElement(Be.default.List,{name:"sub_item_banks",rules:[{validator(Le,si){return si?Promise.resolve():Promise.reject(new Error("\u8BF7\u6DFB\u52A0\u5C0F\u9898"))}}]},(Le,{add:si,remove:Hi,move:hn})=>{const ni=ti.getFieldValue("sub_item_banks");return Xt.createElement(Xt.Fragment,null,Xt.createElement(Ke.default,{className:Le.length>0?dt.Z.collapseWrapper:"",bordered:!1,activeKey:mi,onChange:ji,expandIcon:({isActive:vi})=>Xt.createElement("i",{className:`iconfont icon-weizhankai ${vi?dt.Z.open:dt.Z.close}`,style:{fontSize:14,transition:"all .2s"}})},Le.map((vi,Fi)=>{var _n=vi,{key:Dn,name:Ft}=_n,Ot=pi(_n,["key","name"]),Ve,Ut,tn,xt,rt,Vt,on,xn,An,yt;return Xt.createElement(gi,{className:dt.Z.panel,forceRender:!0,header:Xt.createElement("div",{className:dt.Z.panelHeader},"\u7B2C",Fi+1,"\u5C0F\u9898",Xt.createElement("span",null,"\uFF08",((Ve=ni==null?void 0:ni[Ft])==null?void 0:Ve.item_type)=="SINGLE"?"\u5355\u9009\u9898":((Ut=ni==null?void 0:ni[Ft])==null?void 0:Ut.item_type)=="MULTIPLE"?"\u591A\u9009\u9898":((tn=ni==null?void 0:ni[Ft])==null?void 0:tn.item_type)=="COMPLETION"?"\u586B\u7A7A\u9898":((xt=ni==null?void 0:ni[Ft])==null?void 0:xt.item_type)=="JUDGMENT"?"\u5224\u65AD\u9898":"\u7B80\u7B54\u9898","\uFF09")),key:Ft,extra:Xt.createElement(mt.Z,{align:"middle",onClick:cn=>cn.stopPropagation()},Pi&&Xt.createElement(ct.Z,null,Xt.createElement(Be.default.Item,ii(Rn({},Ot),{rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5C0F\u9898\u5206\u503C"}],label:"\u5206\u503C",name:[Ft,"question_score"],className:dt.Z.blankInputNumberWrapper}),Xt.createElement(He.Z,{className:dt.Z.blankInput,placeholder:"\u8BF7\u8F93\u5165\u5F53\u524D\u5C0F\u9898\u5206\u6570",min:.1,precision:1,max:100,style:{width:150}}))),Xt.createElement(ct.Z,null,Xt.createElement(mt.Z,{align:"middle",className:"pl40",justify:"end"},Fi!==0&&Xt.createElement("div",{onClick:()=>{var cn;hn(Fi,Fi-1);const On=(cn=ti.getFieldValue("sub_item_banks"))==null?void 0:cn.map((ri,Wt)=>(Le.map((Jt,hi)=>{Wt===hi&&(ri.q_position=Number(Jt.name)+1)}),ri));ti.setFieldValue("sub_item_banks",On)}},Xt.createElement(Et.Z,{title:"\u4E0A\u79FB"},Xt.createElement("i",{className:"iconfont icon-shangyi3 c-grey-999 primary-hover"}))),Fi<Le.length-1&&Xt.createElement("div",{onClick:()=>{var cn;hn(Fi,Fi+1);const On=(cn=ti.getFieldValue("sub_item_banks"))==null?void 0:cn.map((ri,Wt)=>(Le.map((Jt,hi)=>{Wt===hi&&(ri.q_position=Number(Jt.name)+1)}),ri));ti.setFieldValue("sub_item_banks",On)},className:Fi===0?"":"ml15"},Xt.createElement(Et.Z,{title:"\u4E0B\u79FB"},Xt.createElement("i",{className:"iconfont icon-xiayi3 c-grey-999 primary-hover"}))))),Xt.createElement(ct.Z,null,Xt.createElement(Et.Z,{title:"\u5220\u9664"},Xt.createElement(Ae.Z,{className:`${dt.Z.deleteIcon} ml15`,onClick:()=>Hi(Ft)}))))},Xt.createElement(Be.default.Item,ii(Rn({},Ot),{name:Ft}),(((rt=ni==null?void 0:ni[Ft])==null?void 0:rt.item_type)=="SINGLE"||((Vt=ni==null?void 0:ni[Ft])==null?void 0:Vt.item_type)=="MULTIPLE")&&Xt.createElement(ce.u,{questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9009\u62E9\u9898\u9898\u5E72\u5185\u5BB9",allowChangeMode:((on=ni==null?void 0:ni[Ft])==null?void 0:on.item_type)=="MULTIPLE",form:ti,choiceKey:[Ft,"choices"],titleKey:[Ft,"name"],analysisKey:[Ft,"analysis"],choiceOptionsPath:["sub_item_banks",Ft,"choices"],choiceTextKey:"choice_text",answerKey:"is_answer"}),((xn=ni==null?void 0:ni[Ft])==null?void 0:xn.item_type)=="COMPLETION"&&Xt.createElement(Nt,{form:ti,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:!1,name:Ft,titleKey:[Ft,"name"],analysisKey:[Ft,"analysis"],isOrdered:[Ft,"is_ordered"],answerKey:[Ft,"standard_answers"]}),((An=ni==null?void 0:ni[Ft])==null?void 0:An.item_type)=="JUDGMENT"&&Xt.createElement(Cn,{form:ti,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u5224\u65AD\u9898\u9898\u5E72\u5185\u5BB9",titleKey:[Ft,"name"],analysisKey:[Ft,"analysis"],choiceKey:[Ft,"choices"]}),((yt=ni==null?void 0:ni[Ft])==null?void 0:yt.item_type)=="SUBJECTIVE"&&Xt.createElement(un,{showKeywords:!0,isMustKeyWords:!1,form:ti,titleKey:[Ft,"name"],analysisKey:[Ft,"analysis"],answerTexts:[Ft,"answer_texts"],useKeywords:[Ft,"use_keywords"],keywords:[Ft,"keywords"],indexs:Ft,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u7B80\u7B54\u9898\u9898\u5E72\u5185\u5BB9"})))})),Le.length<20&&Xt.createElement(ht.Z,{menu:{items:[{label:Xt.createElement("div",{onClick:()=>{si({name:"",choices:Array.from({length:4},()=>({choice_text:"",is_answer:0})),analysis:"",item_type:"SINGLE"}),nr([Le==null?void 0:Le.length,...mi])}},"\u5355\u9009\u9898"),key:"1",show:!0},{label:Xt.createElement("div",{onClick:()=>{si({name:"",choices:Array.from({length:4},()=>({choice_text:"",is_answer:0})),analysis:"",item_type:"MULTIPLE"}),nr([Le==null?void 0:Le.length,...mi])}},"\u591A\u9009\u9898"),key:"2",show:!0},{label:Xt.createElement("div",{onClick:()=>{si({name:"",choices:[{choice_text:"\u6B63\u786E",is_answer:0},{choice_text:"\u9519\u8BEF",is_answer:0}],analysis:"",item_type:"JUDGMENT"}),nr([Le==null?void 0:Le.length,...mi])}},"\u5224\u65AD\u9898"),key:"3",show:!0},{label:Xt.createElement("div",{onClick:()=>{si({name:"",analysis:"",is_ordered:!0,standard_answers:[],item_type:"COMPLETION",downcase:!0,no_space:!0}),nr([Le==null?void 0:Le.length,...mi])}},"\u586B\u7A7A\u9898"),key:"4",show:!0},{label:Xt.createElement("div",{onClick:()=>{si({name:"",answer_texts:[],keywords:[],use_keywords:!0,analysis:"",item_type:"SUBJECTIVE"}),nr([Le==null?void 0:Le.length,...mi])}},"\u7B80\u7B54\u9898"),key:"5",show:!0}].filter(vi=>vi.show).map(vi=>({label:vi.label,key:vi.key}))}},Xt.createElement("div",{className:`${dt.Z.addBtn}`},"\u6DFB\u52A0\u5C0F\u9898")))}))};var Ji=ve(90502)},85149:function(Pn,an,ve){"use strict";ve.d(an,{z:function(){return Ie},Z:function(){return ze}});var ce=ve(59301),De=ve(50304),_e=ve(24768),Ct=ve(64018),Ze=ve(40846),Ke=ve(3294),Be=ve(955),mt=ve(15342),ct=ve(1012),He=ve(23210),Et=ve(59301),dt=({html:et})=>{const $e=(0,ce.useRef)(null),gt=(0,ce.useRef)(null),je=`.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,ce.useEffect)(()=>{const Tt=$e.current.attachShadow({mode:"open"});gt.current=document.createElement("div"),gt.current.className="markdown-body",gt.current.innerHTML=et,Tt.appendChild(gt.current);const Qe=document.createElement("style");return Qe.textContent=je,Tt.appendChild(Qe),()=>{Tt.innerHTML=""}},[]),(0,ce.useEffect)(()=>{gt.current&&(gt.current.innerHTML=et)},[et]),Et.createElement("div",{ref:$e})},Ae=Object.defineProperty,te=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable,se=(et,$e,gt)=>$e in et?Ae(et,$e,{enumerable:!0,configurable:!0,writable:!0,value:gt}):et[$e]=gt,de=(et,$e)=>{for(var gt in $e||($e={}))ee.call($e,gt)&&se(et,gt,$e[gt]);if(te)for(var gt of te($e))he.call($e,gt)&&se(et,gt,$e[gt]);return et};const me="@\u2581\u2581@",we="@\u2581@",be=/<pre[^>]*>/g;function Me(et){let $e=document.createElement("div");return $e.innerHTML=et,$e.childNodes.length===0?"":$e.childNodes[0].nodeValue}const Ie=(et,$e)=>{et=et||"";const gt=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,je=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Tt=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Qe=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return $e?et.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(gt,(bt,Nt,At,Zt,Yt,ut,Ge)=>{const kt=Nt||Zt||ut,ln=At||Yt||Ge||"?";return Ke.Z.API_SERVER+"/api/attachments/"+kt+ln+"&t="+(0,Be.Jn)(kt,Date.now())+(bt.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(et=et.replace(Qe,(bt,Nt,At,Zt,Yt,ut,Ge)=>{const kt=Nt||Zt||ut,ln=At||Yt||Ge||"?";return Ke.Z.API_SERVER+"/attachments/download/"+kt+ln+"&t="+(0,Be.Jn)(kt,Date.now())+(bt.indexOf(")")>-1?")":"&")}).replace(gt,(bt,Nt,At,Zt,Yt,ut,Ge)=>{const kt=Nt||Zt||ut,ln=At||Yt||Ge||"?";return Ke.Z.API_SERVER+"/api/attachments/"+kt+ln+"&t="+(0,Be.Jn)(kt,Date.now())+(bt.indexOf(")")>-1?")":"&")}).replace(je,(bt,Nt,At,Zt,Yt)=>{const ut=Nt||Zt,Ge=At||Yt||"";return'"'+Ke.Z.API_SERVER+"/api/attachments/"+ut+Ge+ut+Ge+"&t="+(0,Be.Jn)(ut,Date.now())}).replace(Tt,(bt,Nt,At,Zt,Yt)=>{const ut=Nt||Zt,Ge=At||Yt||"";return"("+Ke.Z.API_SERVER+"/files/uploads/"+ut+Ge+ut+Ge+"&t="+(0,Be.Jn)(ut,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,`
|
|
|
`),et)};var ze=({value:et="",className:$e,showTextOnly:gt,showLines:je,style:Tt={},stylesPrev:Qe={},highlightKeywords:bt,showProgramFill:Nt,isProgramFill:At,disabledFill:Zt=!1,programFillValue:Yt,onFillChange:ut=ln=>{},onFillBlur:Ge=()=>{},onFillFocus:kt=()=>{}})=>{let ln=String(et);const[sn,Bt]=(0,ce.useState)(""),[Gt,en]=(0,ce.useState)("office"),[Bn,rn]=(0,ce.useState)([]),Cn=(0,ce.useRef)("a"+(0,ct.Z)()),ft={},En=(St,vt,lt)=>{const Dt=document.createElement(St===we?"input":"textarea");Dt.style.width="100%",Dt.style.height=St===we?"40px":"151px",Dt.rows=5,Dt.spellcheck=!1,Dt.name="edu-program-fill",Dt.placeholder="\u8BF7\u8F93\u5165",Dt.dataset.id=vt;const un=Object.keys(ft).length;return ft[un]=Dt,`<span class="edu-program-fill-wrap ${St===we?"":"show"}" style="width:${St===we?"400px":"100%"}" title=${lt||""}><span>${Dt.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Vn(St){return St=St.replace(/!\[.*?\]\(.*?\)/g,""),St=St.replace(/\[.*?\]\(.*?\)/g,""),St=St.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),St=St.replace(/<embed.*?>/g,""),St=St.replace(/<img.*?>/g,""),St=St.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),St=St.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),St=St.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),St=St.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),St}const Re=St=>St.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(vt,lt){let Dt=lt.replace(/(\n|\r)/g,"").split("}"),un=[];return Dt.map(Xt=>{Xt!=""&&un.push(`.${Cn.current} ${Xt}`)}),`<style>${un.join("}")}</style>`}),Ce=(0,ce.useMemo)(()=>{try{const Dt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,un=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Xt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,$t=/\(\/attachments\/download\//g;ln=ln.replace($t,"("+Ke.Z.API_SERVER+"/attachments/download/").replace(Dt,"("+Ke.Z.API_SERVER+"/api/attachments/").replace(un,'"'+Ke.Z.API_SERVER+"/api/attachments/").replace(Xt,'"'+Ke.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(Dt){}if(Nt){let Dt=-1;return ln=ln.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(un,Xt,$t){var wn;return++Dt,En(un,Dt,(wn=Yt==null?void 0:Yt[Dt])==null?void 0:wn.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${Re(ln||"")}</pre>`}let St=Re(ln);St=(0,_e.ZP)(St);const vt=(0,_e.ez)();ln.match(/\[TOC\]/)&&(St=St.replace("<p>[TOC]</p>",(0,_e.Qv)()),(0,_e.Iy)()),St=St.replace(/(__special_katext_id_\d+__)/g,(Dt,un)=>{const{type:Xt,expression:$t}=vt[un];return(0,mt.renderToString)(Me($t)||"",{displayMode:Xt==="block",throwOnError:!1,output:"html"})}),St=St.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,_e.AL)();const lt=document.createElement("div");if(lt.innerHTML=St,gt)return lt.innerText;if(bt){const Dt=bt.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Se(lt,Dt),lt.innerHTML}return setTimeout(()=>qe(),500),lt.innerHTML},[ln,bt]);(0,ce.useEffect)(()=>{nt.current&&nt.current.querySelectorAll(["input","textarea"]).forEach(vt=>{vt.oninput=Pe,vt.onblur=Ne,vt.onfocus=ke})},[Bn]),(0,ce.useEffect)(()=>{var St,vt,lt,Dt,un;if(Yt!=null&&Yt.length)try{const Xt=nt.current.querySelectorAll(".edu-program-fill-score"),$t=nt.current.querySelectorAll('[name="edu-program-fill"]');for(const[wn,bn]of $t.entries())bn.value=((St=Yt==null?void 0:Yt[wn])==null?void 0:St.value)||"",((vt=Yt==null?void 0:Yt[wn])==null?void 0:vt.type)==="warning"?bn.className="program-fill-warning":((lt=Yt==null?void 0:Yt[wn])==null?void 0:lt.type)==="success"?bn.className="program-fill-success":bn.className="";for(const[wn,bn]of Xt.entries())bn.innerHTML=(Dt=Yt==null?void 0:Yt[wn])!=null&&Dt.score?`${(un=Yt==null?void 0:Yt[wn])==null?void 0:un.score}\u5206`:"";rn(Yt)}catch(Xt){console.log(Xt,"error")}},[Yt]);const Pe=St=>{Bn[St.target.dataset.id]=Bn[St.target.dataset.id]||{},Bn[St.target.dataset.id].value=St.target.value,rn([...Bn]),ut(Bn,St.target.dataset.id)},Ne=St=>{Bn[St.target.dataset.id]=Bn[St.target.dataset.id]||{},Bn[St.target.dataset.id].value=St.target.value,rn([...Bn]),Ge(Bn,St.target.dataset.id)},ke=St=>{Bn[St.target.dataset.id]=Bn[St.target.dataset.id]||{},Bn[St.target.dataset.id].value=St.target.value,rn([...Bn]),kt(Bn,St.target.dataset.id)};function Se(St,vt){return St.childNodes.forEach(lt=>{var Dt;if(lt.childNodes.length>0)Se(lt,vt);else if(lt.nodeName!=="IMG")if(lt.innerHTML)lt.innerHTML=(Dt=lt.innerHTML)==null?void 0:Dt.replace(new RegExp(vt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const un=document.createElement("span");un.innerHTML=lt.textContent.replace(new RegExp(vt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),lt.replaceWith(un)}})}const nt=(0,ce.useRef)();_e.jb.WebkitLineClamp=je,je&&(Tt=de(de({},Tt),_e.jb));function Pt(St){let vt=St.target;if(vt.tagName.toUpperCase()==="A"){let lt=vt.getAttribute("href");if(lt.indexOf("office")>-1)St.preventDefault(),Bt(lt),en("office");else if(lt.indexOf("application/pdf")>-1)St.preventDefault(),Bt(lt),en("pdf");else if(lt.indexOf("text/html")>-1)St.preventDefault(),Bt(lt),en("html");else if(lt.startsWith("#")){St.preventDefault();let Dt=document.getElementById(lt.replace("#",""));Dt&&Dt.scrollIntoView(!0)}}}const qe=()=>{var St;const vt=(St=nt.current)==null?void 0:St.querySelectorAll("video");vt==null||vt.forEach(lt=>{if(lt.oncontextmenu=()=>!1,lt.src.indexOf(".m3u8")>-1&&!lt.canPlayType("application/vnd.apple.mpegurl")){if(Ze.ZP.isSupported()){var Dt=new Ze.ZP;Dt.loadSource(lt.src),Dt.attachMedia(lt)}}})};(0,ce.useEffect)(()=>{if(nt.current&&Ce&&Ce.match(be)&&window.PR.prettyPrint(),nt.current)return nt.current.addEventListener("click",Pt),()=>{var St;(St=nt.current)==null||St.removeEventListener("click",Pt),(0,_e.AL)(),(0,_e.Iy)()}},[Ce,nt.current,Pt]),(0,ce.useEffect)(()=>{var St;const vt=lt=>{lt.preventDefault(),lt.clipboardData.setData("text",window.getSelection().toString())};return(St=nt.current)==null||St.addEventListener("copy",vt),()=>{var lt;(lt=nt.current)==null||lt.removeEventListener("copy",vt)}},[nt.current]);const Ue=St=>/<style[\s\S]*?>/i.test(St||"");return ce.createElement(ce.Fragment,null,gt&&ce.createElement("div",{ref:nt},Ce),!gt&&!Ue(Ce)&&ce.createElement("div",{ref:nt,style:de({},Tt),className:`${$e||""} ${Zt?"disabled-fill":""} markdown-body ${Cn.current}`,dangerouslySetInnerHTML:{__html:Ce}}),!gt&&Ue(Ce)&&ce.createElement(dt,{html:Ce}),ce.createElement(He.Z,{close:!0,data:sn,type:sn!=null&&sn.length?Gt:"",style:de({},Qe),onClose:()=>Bt("")}))}},68042:function(Pn,an,ve){"use strict";ve.d(an,{C:function(){return Nt}});var ce=ve(59301),De={recalculation:"recalculation____i9AE",tips:"tips___GoMu8",filter:"filter___Vx7VO",input:"input___OEMMv",operating:"operating___TS9iA",operatingItem:"operatingItem___AT84q"},_e=ve(92310),Ct=ve.n(_e),Ze=ve(24905),Ke=ve(95237),Be=ve(8591),mt=ve(6848),ct=ve(3113),He=ve(43418),Et=ve(1710),ht=ve(5871),dt=ve(78241),Ae=ve(71418),te=ve(955),ee=ve(99064),he=ve(24065),se=ve(59155),de=ve(85057),me=Object.defineProperty,we=Object.defineProperties,be=Object.getOwnPropertyDescriptors,Me=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,ze=Object.prototype.propertyIsEnumerable,et=(At,Zt,Yt)=>Zt in At?me(At,Zt,{enumerable:!0,configurable:!0,writable:!0,value:Yt}):At[Zt]=Yt,$e=(At,Zt)=>{for(var Yt in Zt||(Zt={}))Ie.call(Zt,Yt)&&et(At,Yt,Zt[Yt]);if(Me)for(var Yt of Me(Zt))ze.call(Zt,Yt)&&et(At,Yt,Zt[Yt]);return At},gt=(At,Zt)=>we(At,be(Zt)),je=(At,Zt,Yt)=>new Promise((ut,Ge)=>{var kt=Bt=>{try{sn(Yt.next(Bt))}catch(Gt){Ge(Gt)}},ln=Bt=>{try{sn(Yt.throw(Bt))}catch(Gt){Ge(Gt)}},sn=Bt=>Bt.done?ut(Bt.value):Promise.resolve(Bt.value).then(kt,ln);sn((Yt=Yt.apply(At,Zt)).next())});const Tt=Ze.default.Group,Qe=({className:At,title:Zt,items:Yt=[],value:ut,onChange:Ge})=>{const kt=(Yt==null?void 0:Yt.length)===(ut==null?void 0:ut.length),ln=(ut==null?void 0:ut.length)>0&&(ut==null?void 0:ut.length)<(Yt==null?void 0:Yt.length),sn=Bt=>{const Gt=Yt.map(en=>en.id);Ge(Bt.target.checked?Gt:[])};return ce.createElement(Ke.Z,{align:"middle",className:At},!!Zt&&ce.createElement("div",{className:"mr20",style:{color:"#5F6368"}},Zt),ce.createElement(Ze.default,{indeterminate:ln,onChange:sn,checked:kt},"\u5168\u90E8"),ce.createElement(Tt,{value:ut,onChange:Ge},Yt.map(Bt=>ce.createElement(Ze.default,{className:"ml30 c-black",key:Bt.id,value:Bt.id},Bt.name,ce.createElement("span",null,`(${Bt.count})`)))))};var Nt=({className:At,style:Zt,dataSource:Yt})=>{var ut,Ge,kt,ln,sn,Bt,Gt;const[en,Bn]=(0,ce.useState)({}),[rn,Cn]=(0,ce.useState)(!0),[ft,En]=(0,ce.useState)(!1),[Vn,Re]=(0,ce.useState)(!1),[Ce,Pe]=(0,ce.useState)(null),[Ne,ke]=(0,ce.useState)(0),[Se,nt]=(0,ce.useState)({}),[Pt,qe]=(0,ce.useState)(!0),[Ue,St]=(0,ce.useState)(0),[vt,lt]=(0,ce.useState)(0),[Dt,un]=(0,ce.useState)(!1),Xt=(0,ce.useRef)(null),[$t,wn]=(0,ce.useState)(!1),[bn,pn]=(0,ce.useState)(!0),[Yn,ai]=(0,ce.useState)([]),Wn={page:1,per_page:5,keyword:"",review:[],question_status:[],success_status:[],sort_by:null,direction:null},[Rn,ii]=(0,ce.useState)($e({},Wn));(0,ce.useEffect)(()=>{Yt!=null&&Yt.question_id&&Bn(Yt)},[Yt==null?void 0:Yt.question_id]),(0,ce.useEffect)(()=>{var si;if(((si=en==null?void 0:en.exercise_question_resubmit)==null?void 0:si.status)==="running"){const Hi=setInterval(()=>{Ri()},3e3);return()=>clearInterval(Hi)}},[(ut=en==null?void 0:en.exercise_question_resubmit)==null?void 0:ut.status]),(0,ce.useEffect)(()=>{var si;Vn&&(Vn===1&&(Rn.question_status=Ji.map(Hi=>Hi.value),Rn.review=Un.map(Hi=>Hi.value)),Vn===2&&(Rn.exercise_question_resubmit_id=(si=en==null?void 0:en.exercise_question_resubmit)==null?void 0:si.id,Ce===1&&(Rn.success_status=[1]),Ce===2&&(Rn.success_status=[0])),ii($e({},Rn)),pi(Rn),lt(en!=null&&en.is_mirror?3:10),St(en!=null&&en.is_mirror?1:5))},[Vn]),(0,ce.useEffect)(()=>{$t&&gi()},[$t]);const pi=si=>je(void 0,null,function*(){Cn(!0);const Hi=yield(0,ee.ZP)(`/api/exercise_questions/${en==null?void 0:en.question_id}/resubmit_student_list.json`,{method:"get",params:si});(Hi==null?void 0:Hi.status)==0&&(nt(Hi||[]),ke(Hi==null?void 0:Hi.count)),Cn(!1)}),gi=()=>je(void 0,null,function*(){pn(!0);const si=yield(0,ee.ZP)(`/api/exercise_questions/${en==null?void 0:en.question_id}/resubmit_history.json`,{method:"get"});(si==null?void 0:si.status)==0&&ai((si==null?void 0:si.data)||[]),pn(!1)}),Ri=()=>je(void 0,null,function*(){const si=yield(0,ee.ZP)(`/api/exercise_questions/${en==null?void 0:en.question_id}/resubmit_status.json`,{method:"get"});(si==null?void 0:si.status)==0&&Bn(gt($e({},en),{show_resubmit_history:!0,exercise_question_resubmit:(si==null?void 0:si.data)||{}}))}),Ji=[{label:"\u672A\u8BC4\u6D4B",value:2,color:"#9096A3"},{label:"\u672A\u901A\u5173",value:0,color:"#E30000"},{label:"\u5DF2\u901A\u5173",value:1,color:"#00B187"}],Un=[{label:"\u672A\u8BC4\u9605",value:0,color:"#9096A3"},{label:"\u8BC4\u9605\u4E2D",value:2,color:"#FF9D18"},{label:"\u5DF2\u8BC4\u9605",value:1,color:"#3061D0"}],$n=[{label:"\u6210\u529F",value:1,color:"#00B187"},{label:"\u5931\u8D25",value:0,color:"#E30000"}],ti=[{title:"\u5E8F\u53F7",dataIndex:"key",render:(si,Hi,hn)=>ce.createElement("span",{className:"c-black"},hn+1+(Rn.page-1)*Rn.per_page)},{title:"\u59D3\u540D",dataIndex:"user_name",render:si=>ce.createElement("span",{className:"c-black"},si)},{title:"\u5B66\u53F7",dataIndex:"student_id",sorter:!0,render:si=>ce.createElement("span",{className:"c-grey-666"},si||"--")},{title:"\u5206\u73ED",dataIndex:"group_name",render:si=>ce.createElement("span",{className:"c-black"},si)},{title:"\u9898\u76EE\u72B6\u6001",dataIndex:"question_status",render:si=>{const{label:Hi,color:hn}=Ji.find(ni=>ni.value===si)||{};return ce.createElement("span",{style:{color:hn}},Hi)}},{title:"\u9898\u76EE\u5F97\u5206",dataIndex:"question_score",sorter:!0,render:si=>ce.createElement("span",{className:"c-black"},si)},{title:"\u6700\u7EC8\u6210\u7EE9",dataIndex:"score",sorter:!0,render:si=>ce.createElement("span",{className:"c-black"},si)},{title:"\u8BC4\u9605\u72B6\u6001",dataIndex:"review",render:si=>{const{label:Hi,color:hn}=Un.find(ni=>ni.value===si)||{};return ce.createElement("span",{style:{color:hn}},Hi)}},Vn===2&&{title:"\u91CD\u65B0\u8BC4\u6D4B\u7ED3\u679C",dataIndex:"success_status",render:si=>{const{label:Hi,color:hn}=$n.find(ni=>ni.value===si)||{};return ce.createElement("span",{style:{color:hn}},Hi)}}].filter(Boolean),Pi=(si,Hi,hn)=>{Rn.page=si==null?void 0:si.current,Rn.per_page=si==null?void 0:si.pageSize,hn!=null&&hn.order?(Rn.sort_by=hn==null?void 0:hn.field,Rn.direction=(hn==null?void 0:hn.order)==="ascend"?"asc":"desc"):(Rn.sort_by=null,Rn.direction=null),ii($e({},Rn)),pi(Rn)},mi=()=>{if(!Ue){Be.ZP.warning("\u8BF7\u8F93\u5165\u91CD\u65B0\u8BC4\u6D4B\u4EFB\u52A1\u5E76\u53D1\u4EBA\u6570");return}un(!0)},nr=()=>je(void 0,null,function*(){var si,Hi;if((si=Xt.current)!=null&&si.onVerify())return;En(!0);const hn=yield(0,ee.ZP)(`/api/exercise_questions/${en==null?void 0:en.question_id}/resubmit.json`,{method:"post",body:{keyword:Rn.keyword,question_status:Rn.question_status,review:Rn.review_status,success_status:Rn.success_status,use_max_score:Pt,permits:Ue,exercise_question_resubmit_id:Vn===1?null:(Hi=en==null?void 0:en.exercise_question_resubmit)==null?void 0:Hi.id}});(hn==null?void 0:hn.status)==0&&(yield Ri(),Be.ZP.success("\u64CD\u4F5C\u6210\u529F"),un(!1),Re(!1)),En(!1)}),ji=(si,Hi)=>{Rn.page=1,Rn[Hi]=si,ii($e({},Rn)),pi(Rn)},Le=["","\u5F53\u524D\u9898\u76EE\u7684\u5B9E\u9A8C\u8D44\u6E90\u4E3A\u4E13\u6709\u4E91\uFF0C\u4E0D\u652F\u6301\u91CD\u65B0\u8BC4\u6D4B~","\u8BE5\u529F\u80FD\u4EC5\u8BFE\u5802\u7BA1\u7406\u5458\u548C\u8003\u8BD5\u7684\u521B\u5EFA\u8005\u53EF\u4EE5\u64CD\u4F5C~"];return ce.createElement(ce.Fragment,null,ce.createElement("div",{className:Ct()(De.recalculation,At),style:Zt},ce.createElement(mt.Z,{title:Le[(en==null?void 0:en.disable_resubmit_reason)||0]},ce.createElement(ct.ZP,{disabled:(en==null?void 0:en.disable_resubmit)||((Ge=en==null?void 0:en.exercise_question_resubmit)==null?void 0:Ge.status)==="running",onClick:()=>Re(1),icon:ce.createElement("i",{className:"iconfont icon-zhongxinpingce font14"}),type:"primary",ghost:!0},"\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206")),(en==null?void 0:en.show_resubmit_history)&&ce.createElement(ce.Fragment,null,((kt=en==null?void 0:en.exercise_question_resubmit)==null?void 0:kt.status)==="running"?ce.createElement("div",{className:"c-grey-666"},"\u91CD\u65B0\u8BC4\u6D4B\u4E2D\uFF0C\u5F53\u524D\u8FDB\u5EA6",ce.createElement("span",{className:"c-light-primary ml3"},(ln=en==null?void 0:en.exercise_question_resubmit)==null?void 0:ln.rate)):ce.createElement("div",{className:"c-grey-666"},"\u91CD\u65B0\u8BC4\u6D4B\u6210\u529F",ce.createElement("span",{onClick:()=>{Re(2),Pe(1)},className:"current",style:{color:"#3061D0",textDecoration:"underline",margin:"0 3px"}},(sn=en==null?void 0:en.exercise_question_resubmit)==null?void 0:sn.success_student_count),"\u4EBA\uFF0C\u5931\u8D25",ce.createElement("span",{onClick:()=>{Re(2),Pe(2)},className:"current",style:{color:"#E30000",textDecoration:"underline",margin:"0 3px"}},(Bt=en==null?void 0:en.exercise_question_resubmit)==null?void 0:Bt.fail_count),"\u4EBA"),ce.createElement(mt.Z,{title:"\u64CD\u4F5C\u8BB0\u5F55"},ce.createElement("i",{onClick:()=>wn(!0),className:"iconfont icon-chakanshenqingjilu c-light-primary current font14"})))),ce.createElement(He.default,{centered:!0,open:!!Vn,title:`\u91CD\u65B0\u8BC4\u6D4B${Vn===1?"\u7B97\u5206":"\u7ED3\u679C"}`,width:870,okText:"\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206",onCancel:()=>Re(!1),onOk:mi,afterClose:()=>{qe(!0),Pe(null),ii($e({},Wn))}},ce.createElement("div",{className:De.filter},Vn===1&&ce.createElement(ce.Fragment,null,ce.createElement("div",{className:De.tips},ce.createElement("div",{className:"mb5",style:{color:"#FF9D18"}},ce.createElement("i",{className:"iconfont icon-tishi9 mr10 font14"}),"\u6E29\u99A8\u63D0\u793A"),ce.createElement("div",null,"1.\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206\u6D41\u7A0B\uFF1A \u7CFB\u7EDF\u81EA\u52A8\u83B7\u53D6\u5B66\u751F\u5728\u8003\u8BD5\u9875\u9762\u4FDD\u5B58\u7684\u6700\u65B0\u4EE3\u7801\uFF0C\u5E76\u8FDB\u884C\u91CD\u65B0\u8BC4\u6D4B\uFF0C\u4ECE\u800C\u7CBE\u51C6\u8BA1\u7B97\u51FA\u5B66\u751F\u7684\u6700\u7EC8\u5F97\u5206\uFF1B"),ce.createElement("div",{style:{margin:"2px 0"}},"2.\u91CD\u65B0\u8BC4\u6D4B\u6761\u4EF6\uFF1A \u8003\u8BD5\u7ED3\u675F\u540E\uFF0C\u4EC5\u5BF9\u5DF2\u63D0\u4EA4\u8BD5\u5377\u4E14\u5DF2\u4F5C\u7B54\u8BE5\u9898\u76EE\u7684\u5B66\u751F\u8FDB\u884C\u91CD\u65B0\u8BC4\u6D4B\u4E0E\u7B97\u5206\uFF1B"),ce.createElement("div",null,"3.\u91CD\u65B0\u8BC4\u6D4B\u65F6\uFF0C\u8BF7\u786E\u4FDD\u5B9E\u9A8C\u73AF\u5883\u80FD\u6B63\u5E38\u542F\u52A8\u5E76\u53EF\u8FD0\u884C\u8BC4\u6D4B\u3002")),ce.createElement(Qe,{className:"mt10",title:"\u9898\u76EE\u72B6\u6001",items:(Se==null?void 0:Se.question_status)||[],value:Rn.question_status,onChange:si=>ji(si,"question_status")}),ce.createElement(Qe,{className:"mt10",title:"\u8BC4\u9605\u72B6\u6001",items:(Se==null?void 0:Se.review_status)||[],value:Rn.review,onChange:si=>ji(si,"review")})),Vn===2&&ce.createElement(ce.Fragment,null,ce.createElement(Qe,{className:"mt10",title:"\u91CD\u65B0\u8BC4\u6D4B\u7ED3\u679C",items:(Se==null?void 0:Se.success_status)||[],value:Rn.success_status,onChange:si=>ji(si,"success_status")})),ce.createElement(de.t7,{className:De.input,style:{bottom:Vn===1?10:-5},value:Rn.keyword,onChange:si=>ji(si,"keyword"),placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D\u6216\u8005\u5B66\u53F7\u641C\u7D22"})),ce.createElement(Et.default,{className:"mt20",columns:ti,scroll:((Gt=Se==null?void 0:Se.data)==null?void 0:Gt.length)>7?{y:300}:{},dataSource:(Se==null?void 0:Se.data)||[],loading:rn,onChange:Pi,pagination:{total:Ne,pageSize:Rn.per_page,current:Rn.page,hideOnSinglePage:!Ne,showSizeChanger:!0,pageSizeOptions:["5","10","20","50","100"],showQuickJumper:!0,size:"default",showTotal:te.rU}}),ce.createElement(Ke.Z,{justify:"space-between",align:"middle",className:"mt10"},ce.createElement(Ze.default,{className:"c-black",checked:Pt,onChange:si=>qe(si.target.checked)},"\u91CD\u65B0\u8BC4\u6D4B\u540E\u7684\u5206\u6570\u5927\u4E8E\u539F\u6765\u7684\u5206\u6570\u624D\u66F4\u65B0\u6210\u7EE9"),(0,he.Ny)()&&ce.createElement("div",{className:"c-black"},"\u91CD\u65B0\u8BC4\u6D4B\u4EFB\u52A1\u5E76\u53D1\u4EBA\u6570",ce.createElement(ht.Z,{className:"ml10 mr10",value:Ue,max:vt,min:1,precision:0,onChange:si=>St(si)}),"\u4EBA",ce.createElement(mt.Z,{overlayStyle:{maxWidth:450},title:"\u91CD\u65B0\u8BC4\u6D4B\u4EFB\u52A1\u7684\u6700\u5927\u5E76\u53D1\u4EBA\u6570\u4E3A20\u4EBA\uFF08\u81EA\u5B9A\u4E49\u955C\u50CF\u7684\u6700\u5927\u5E76\u53D1\u4EBA\u6570\u4E3A3\u4EBA\uFF09\u3002"},ce.createElement("i",{style:{color:"#9096A3"},className:"iconfont icon-tishi5 font13 ml10"}))))),ce.createElement(He.default,{centered:!0,title:"\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206",open:Dt,width:494,zIndex:1001,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",confirmLoading:ft,destroyOnClose:!0,onOk:nr,onCancel:()=>un(!1)},ce.createElement(dt.default.Item,{className:"mb0",colon:!1,label:"\u9A8C\u8BC1\u7801",name:"code",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"}]},ce.createElement(se.Z,{ref:si=>Xt.current=si}))),ce.createElement(He.default,{centered:!0,title:"\u64CD\u4F5C\u8BB0\u5F55",open:$t,width:710,onCancel:()=>wn(!1),footer:null},ce.createElement(Ae.Z,{spinning:bn},ce.createElement("div",{className:De.operating},Yn.map((si,Hi)=>ce.createElement("div",{key:Hi,className:De.operatingItem},ce.createElement("div",{style:{flex:"0 0 180px"},className:"c-grey-666"},si==null?void 0:si.created_at),ce.createElement("div",{className:"c-black"},si==null?void 0:si.user_name,"\u64CD\u4F5C\u4E86\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206"),(si==null?void 0:si.status)==="running"?ce.createElement("div",{className:"c-black"},"\u91CD\u65B0\u8BC4\u6D4B\u4E2D\uFF0C\u5F53\u524D\u8FDB\u5EA6",ce.createElement("span",{className:"c-light-primary ml3"},si==null?void 0:si.rate)):ce.createElement("div",{className:"c-black"},"\u91CD\u65B0\u8BC4\u6D4B\u6210\u529F",ce.createElement("span",{style:{color:"#3061D0",margin:"0 3px"}},si==null?void 0:si.success_student_count),"\u4EBA\uFF0C\u5931\u8D25",ce.createElement("span",{style:{color:"#E30000",margin:"0 3px"}},si==null?void 0:si.fail_count),"\u4EBA")))),ce.createElement("div",{style:{height:20}}))))}},82438:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(59301),De={flex_box_center:"flex_box_center___rQJfc",flex_space_between:"flex_space_between___MDW24",flex_box_vertical_center:"flex_box_vertical_center___RZbAv",flex_box_center_end:"flex_box_center_end___ILhJA",flex_box_column:"flex_box_column___Fmij7",orangeColor:"orangeColor___U5vU6",redColor:"redColor___qYa6X",statustitle:"statustitle___pTBLm",statusbody:"statusbody___qUPQx",flex:"flex___VtL45"},_e=ve(43418),Ct="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAPCAYAAADUFP50AAAAAXNSR0IArs4c6QAAAUFJREFUOE+V0ktKw1AUxvH/rVqIxT4wkgwEUSmK4APRBfiYCKU7cOZEBOkadAMZiwhuwJETBQciFRTtwJkPBLW2BRGrRanU9kpN2sSYiGaWc/PjuznnCN2Qh8AkPo+AzXxKLLiPhW7ICtDqB4GzQkqM/huGFZgZcDCBBDaaicsTMKbZH2xfwdY5/ICAEGSasC0AwRYblj+gKkENwfy4WS9V4LHsgsk49EZteJKHdBa6w7AybdZzr3D64ILxGKjtNrx9gfsSRBSYtf6xZh1/u+qQClrIhtdFuHmGvhisJcz65RPsZl2Jc/3QE7FhpgDHuT80x2+O9cR1K/GiCDt3rkQ/+Ns43gDFD0YVmHIuQGOOmiGTARhxwkGd1cZ7Vwd0OppWr3911StpcV++Iwn67q/kyBMuHchErcqwFxT1XZXsfQJqo2zI6kdI4QAAAABJRU5ErkJggg==",Ze="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAW1JREFUOE+dkj1IQmEUht9z/blp4VQEjS39eW+oSCFCpFCI4BiKFGWWQUSrCjVVg+lQNJZQDZGNTm1B4NTibS3n2lo0wuqEN8i/a0HfeN7v+d73nO+QJEcKAJzQPAwCnSpKNtoqkyRHqgDrtUFAb6Rnedx43KgT6O5P0GQijFiNLe/Sy3/B8g+YTIRRrb5jP32JYNADr8eOldU0RJEqVlm8r1kyuA/AIEB10OWy4vBgA4ryCIdjCJlMDmfn1zAY6EmyGY/UrAwrgGATWKsn4mGEQl4Uiw+YX9hT73aZiEcl8eMbZAGA0AT6/ZPY3Ykiny/A55tA7uoGqdQFBD2VbDbDugoSTTEj3gTGYgG8Vt7UeG63hNkZJ7a2s+gw1XqPnf5REKhkt4kxNakO08ycbOtRC/7FcakCwNTJ0WwmDI+1LUCZZDkSYGa5Eewf0G0KAnprNYtFQHdPbZhNS1cmLafF5bUTJsyBSVMHPm+/ADTrfrtCH68WAAAAAElFTkSuQmCC",Ke=(ct,He,Et)=>new Promise((ht,dt)=>{var Ae=he=>{try{ee(Et.next(he))}catch(se){dt(se)}},te=he=>{try{ee(Et.throw(he))}catch(se){dt(se)}},ee=he=>he.done?ht(he.value):Promise.resolve(he.value).then(Ae,te);ee((Et=Et.apply(ct,He)).next())}),mt=({type:ct,resdata:He,onok:Et,oktext:ht,okloading:dt})=>{const[Ae,te]=(0,ce.useState)(!1),{can_copy_list:ee,can_copy_num:he,challenge_type:se,course_data_list:de,no_copy_list:me,no_copy_num:we,no_use_list:be,no_use_num:Me,repeat_shixun_num:Ie,student_count:ze,total_num:et,use_num:$e}=He;let gt=he>0||ct==="exercise";(0,ce.useEffect)(()=>{(He==null?void 0:He.student_count)>0&&te(!0)},[He]),console.log("---11",dt),(0,ce.useEffect)(()=>{dt||te(!1)},[dt]);const je=()=>{if(ct==="exercise"&&se===1)return ce.createElement(ce.Fragment,null,"\u8BFE\u5802\u5185\u6709",ce.createElement("span",{className:De.orangeColor},ze),"\u540D\u5B66\u751F\u5DF2\u5728\u5176\u4ED6\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",ce.createElement("span",{className:De.orangeColor},$e),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C",ce.createElement("span",{className:De.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u4F5C\u7B54\u5DF2\u6311\u6218\u8FC7\u7684\u5B9E\u8BAD\u9898\u3002"));if(ct==="exercise"&&se===2)return ce.createElement(ce.Fragment,null,"\u8BFE\u5802\u5185\u6709",ce.createElement("span",{className:De.orangeColor},ze),"\u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",ce.createElement("span",{className:De.orangeColor},$e),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",ce.createElement("span",{className:De.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ct==="shixun"&&se===1)return ce.createElement(ce.Fragment,null,"\u8BFE\u5802\u5185\u6709",ce.createElement("span",{className:De.orangeColor},ze),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u8BE5\u5B9E\u8DF5\u9879\u76EE\uFF0C",ce.createElement("span",{className:De.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ct==="shixun"&&se===2)return ce.createElement(ce.Fragment,null,"\u8BFE\u5802\u5185\u6709",ce.createElement("span",{className:De.orangeColor},ze),"\u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u4E2D\u6311\u6218\u8FC7\u8BE5\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",ce.createElement("span",{className:De.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ct==="subject"&&se===1)return ce.createElement(ce.Fragment,null,"\u8BFE\u5802\u5185\u6709",ce.createElement("span",{className:De.orangeColor},ze),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",ce.createElement("span",{className:De.orangeColor},$e),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C",ce.createElement("span",{className:De.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ct==="subject"&&se===2)return ce.createElement(ce.Fragment,null,"\u8BFE\u5802\u5185\u6709 ",ce.createElement("span",{className:De.orangeColor},ze)," \u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u6311\u6218\u8FC7\u5176\u4E2D\u7684 ",ce.createElement("span",{className:De.orangeColor},$e)," \u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",ce.createElement("span",{className:De.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ct==="exercisepush")return ce.createElement(ce.Fragment,null,"\u8BFE\u5802\u5185\u6709",ce.createElement("span",{className:De.orangeColor},ze),"\u540D\u5B66\u751F\u5DF2\u5728\u5176\u4ED6\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u8BD5\u5377\u4E2D\u7684",ce.createElement("span",{className:De.orangeColor},$e),"\u4E2A\u5B9E\u8DF5\u9879\u76EE \uFF0C",ce.createElement("span",{className:De.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u5728\u5F53\u524D\u8003\u8BD5\u4E2D\u8FDB\u884C\u4F5C\u7B54\u3002"));if(ct==="shixunpush"&&se===1)return ce.createElement(ce.Fragment,null,"\u8BFE\u5802\u5185\u6709",ce.createElement("span",{className:De.orangeColor},ze),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",ce.createElement("span",{className:De.orangeColor},$e),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C",ce.createElement("span",{className:De.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ct==="shixunpush"&&se===2)return ce.createElement(ce.Fragment,null,"\u8BFE\u5802\u5185\u6709",ce.createElement("span",{className:De.orangeColor},ze),"\u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u4E2D\u6311\u6218\u8FC7",ce.createElement("span",{className:De.orangeColor},$e),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",ce.createElement("span",{className:De.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"))},Tt=()=>{if(ct==="exercise"||ct==="subject"||ct==="exercisepush"||ct==="shixunpush")return ce.createElement("div",{style:{marginTop:20}},we>0&&ce.createElement("div",null,ce.createElement("span",{className:De.flex},ce.createElement("img",{src:Ze,style:{width:14}}),ce.createElement("span",{className:De.statustitle},"\u4E0D\u652F\u6301\u590D\u5236\u7684\u5B9E\u8DF5\u9879\u76EE")),ce.createElement("div",{className:De.statusbody},ct==="exercise"&&ce.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",ce.createElement("span",{className:De.redColor},"\u4EE5\u4E0B\u8BD5\u9898\u5C06\u4E0D\u4F1A\u88AB\u53D1\u9001\u81F3\u8BFE\u5802\u4E2D\u3002"),"\u60A8\u4E5F\u53EF\u4EE5\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8005\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002"),(ct==="subject"||ct==="exercisepush")&&ce.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",gt&&ce.createElement("span",{className:De.redColor},"\u4E00\u952E\u590D\u5236\u4E0D\u4F1A\u590D\u5236\u6B64\u90E8\u5206\u9879\u76EE\u3002"),"\u60A8\u53EF\u4EE5\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8005\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002"),ct==="shixunpush"&&ce.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",gt&&ce.createElement("span",{className:De.redColor},"\u4E00\u952E\u590D\u5236\u4E0D\u4F1A\u590D\u5236\u6B64\u90E8\u5206\u9879\u76EE\u3002"),"\u5EFA\u8BAE\u60A8\u91CD\u65B0\u9009\u62E9\u5B9E\u8DF5\u9879\u76EE\u518D\u53D1\u5E03\u4F5C\u4E1A\uFF0C\u4E5F\u53EF\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002"),ce.createElement("div",null,me==null?void 0:me.map((Qe,bt)=>ce.createElement("a",{href:`/shixuns/${Qe.identifier}/challenges`,target:"_blank"},"\u300A",Qe==null?void 0:Qe.name,"\u300B",bt+1!==we&&"\u3001"))))),he>0&&ce.createElement("div",{style:{marginTop:20}},ce.createElement("span",{className:De.flex},ce.createElement("img",{src:Ct,style:{width:14}}),ce.createElement("span",{className:De.statustitle},"\u652F\u6301\u590D\u5236\u7684\u5B9E\u8DF5\u9879\u76EE")),ce.createElement("div",{className:De.statusbody},ct==="exercise"&&ce.createElement("div",{style:{marginBottom:15}},"\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u66FF\u6362\u8BD5\u9898\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\u66FF\u6362\u8BD5\u5377\u4E2D\u7684\u539F\u8BD5\u9898\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002"),(ct==="subject"||ct==="exercisepush")&&ce.createElement("div",{style:{marginBottom:15}},"\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u53D1\u9001\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002"),ct==="shixunpush"&&ce.createElement("div",{style:{marginBottom:15}},"\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u66FF\u6362\u8BD5\u9898\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\u66FF\u6362\u5F53\u524D\u4F5C\u4E1A\u4E2D\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002"),ce.createElement("div",null,ee==null?void 0:ee.map((Qe,bt)=>ce.createElement("a",{href:`/shixuns/${Qe.identifier}/challenges`,target:"_blank"},"\u300A",Qe==null?void 0:Qe.name,"\u300B",bt+1!==he&&"\u3001"))))));if(ct==="shixun")return ce.createElement("div",{style:{marginTop:20}},he>0?"\u8BE5\u9879\u76EE\u652F\u6301\u590D\u5236\uFF0C\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u53D1\u9001\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002":"\u8BE5\u9879\u76EE\u4E0D\u652F\u6301\u590D\u5236\uFF0C\u60A8\u53EF\u4EE5\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8005\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002")};return ce.createElement(_e.default,{open:Ae,onCancel:()=>{te(!1)},cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",width:700,centered:!0,cancelButtonProps:{style:{display:!gt&&"none"}},zIndex:1003,confirmLoading:dt,okText:gt?ht:"\u6211\u77E5\u9053\u4E86",onOk:()=>Ke(void 0,null,function*(){gt?yield Et([...ee,...be]):te(!1)})},ce.createElement("div",{style:{maxHeight:600,overflow:"auto"}},je(),Tt()))}},69304:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return Ke}});var ce=ve(59301),De={btn:"btn___kReTL",redBtn:"redBtn___UFEL0"},_e=ve(92310),Ct=ve.n(_e),Ke=({className:Be,style:mt,state:ct,onClick:He})=>{var Et,ht;return ce.createElement("div",{onClick:He,className:Ct()(ct?(Et=De)==null?void 0:Et.redBtn:(ht=De)==null?void 0:ht.btn,Be),style:mt},ct?ce.createElement(ce.Fragment,null,ce.createElement("i",{className:"iconfont icon-biaoji1"}),ce.createElement("span",null,"\u53D6\u6D88\u6807\u8BB0\u9519\u9898")):ce.createElement(ce.Fragment,null,ce.createElement("i",{className:"iconfont icon-biaojigaiti"}),ce.createElement("span",null,"\u6807\u8BB0\u9519\u9898")))}},97692:function(Pn,an,ve){"use strict";ve.d(an,{h:function(){return we}});var ce=ve(59301),De=ve(57809),_e=ve(78241),Ct=ve(3113),Ze=ve(89780),Ke=ve.n(Ze),Be=ve(37036),mt=ve(95625),ct=Object.defineProperty,He=Object.defineProperties,Et=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertySymbols,dt=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,te=(be,Me,Ie)=>Me in be?ct(be,Me,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):be[Me]=Ie,ee=(be,Me)=>{for(var Ie in Me||(Me={}))dt.call(Me,Ie)&&te(be,Ie,Me[Ie]);if(ht)for(var Ie of ht(Me))Ae.call(Me,Ie)&&te(be,Ie,Me[Ie]);return be},he=(be,Me)=>He(be,Et(Me));const se=De.default.Option,de={labelCol:{span:4},wrapperCol:{span:20}},me={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"]};an.Z=({callback:be,onCancel:Me})=>{const[Ie,ze]=(0,ce.useState)("python");function et(gt){ze(me[gt][1])}function $e(gt){be(gt)}return ce.createElement(_e.default,he(ee({},de),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:$e,style:{width:500}}),ce.createElement(_e.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},ce.createElement(De.default,{getPopupContainer:gt=>gt.parentNode,onChange:et},Object.keys(me).map(gt=>ce.createElement(se,{key:gt,value:gt},me[gt][0])))),ce.createElement(_e.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},ce.createElement(we,{mode:Ie})),ce.createElement("div",{className:"flex-container flex-end"},ce.createElement(Ct.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ce.createElement(Ct.ZP,{type:"ghost",onClick:Me},"\u53D6\u6D88")))};function we({value:be,onChange:Me,mode:Ie,options:ze={}}){const et=(0,ce.useRef)(),[$e,gt]=(0,ce.useState)();return(0,ce.useEffect)(()=>{if($e){let je=function(Tt){const Qe=Tt.getValue();Me&&Me(Qe)};return $e.on("change",je),()=>{$e.off("change",je)}}},[$e,Me]),(0,ce.useEffect)(()=>{$e&&$e.setOption("mode",Ie)},[$e,Ie]),(0,ce.useEffect)(()=>{$e&&(be!==$e.getValue()||be==="")&&setTimeout(()=>{$e.setValue(be||"")},300)},[$e,be]),(0,ce.useEffect)(()=>{if(et.current&&!$e){const je=Ke().fromTextArea(et.current,ee({mode:Ie,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},ze));gt(je)}},[et.current,$e]),ce.createElement("div",{className:"my-codemirror-container"},ce.createElement("textarea",{ref:et}))}},12290:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return Dn}});var ce=ve(59301),De=ve(89780),_e=ve.n(De),Ct=ve(76374),Ze=ve(37036),Ke=ve(6313),Be=ve(25717),mt=ve(99498),ct=ve(25419),He=ve(67549),Et=ve(85149),ht=({value:Ft="",className:Ot,showTextOnly:Ve,showLines:Ut,style:tn={}})=>{const xt=(0,ce.useMemo)(()=>"",[Ft]);return ce.createElement(ce.Fragment,null,ce.createElement("div",{dangerouslySetInnerHTML:{__html:xt}}))},dt=ve(59301),Ae=Object.defineProperty,te=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,he=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,me=(Ft,Ot,Ve)=>Ot in Ft?Ae(Ft,Ot,{enumerable:!0,configurable:!0,writable:!0,value:Ve}):Ft[Ot]=Ve,we=(Ft,Ot)=>{for(var Ve in Ot||(Ot={}))se.call(Ot,Ve)&&me(Ft,Ve,Ot[Ve]);if(he)for(var Ve of he(Ot))de.call(Ot,Ve)&&me(Ft,Ve,Ot[Ve]);return Ft},be=(Ft,Ot)=>te(Ft,ee(Ot));let Me=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u56FE\u50CF",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"iconfont icon-jisuan1",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function Ie({onActionCallback:Ft,title:Ot,icon:Ve,actionName:Ut,className:tn="",children:xt}){function rt(){Ft(Ut)}return dt.createElement("a",{title:Ot,className:tn,onClick:rt},dt.createElement("i",{className:`${Ve}`}),xt)}var ze=({watch:Ft,showNullButton:Ot,showNullProgramButton:Ve,onActionCallback:Ut,fullScreen:tn,insertTemp:xt,hidetoolBar:rt,extraUse:Vt})=>{const on=[...Me,{title:`${Ft?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Ft?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return dt.createElement("ul",{className:"markdown-toolbar-container"},!rt&&on.map((xn,An)=>dt.createElement("li",{key:An},xn.actionName?dt.createElement(Ie,be(we({},xn),{onActionCallback:Ut})):dt.createElement("span",{className:"v-line"}))),Ot?dt.createElement("li",null,dt.createElement(Ie,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Ut},dt.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ve?dt.createElement(dt.Fragment,null,dt.createElement("li",null,dt.createElement(Ie,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Ut},dt.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),dt.createElement("li",null,dt.createElement(Ie,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Ut},dt.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,xt&&dt.createElement("li",null,dt.createElement(Ie,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${xt}`,onActionCallback:Ut},dt.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Vt&&dt.createElement("li",null,Vt),dt.createElement("li",{className:"btn-full-screen"},dt.createElement(Ie,{icon:`${tn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:tn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Ut})))},et=ve(79346),$e=ve(78241),gt=ve(92832),je=ve(3113),Tt=Object.defineProperty,Qe=Object.defineProperties,bt=Object.getOwnPropertyDescriptors,Nt=Object.getOwnPropertySymbols,At=Object.prototype.hasOwnProperty,Zt=Object.prototype.propertyIsEnumerable,Yt=(Ft,Ot,Ve)=>Ot in Ft?Tt(Ft,Ot,{enumerable:!0,configurable:!0,writable:!0,value:Ve}):Ft[Ot]=Ve,ut=(Ft,Ot)=>{for(var Ve in Ot||(Ot={}))At.call(Ot,Ve)&&Yt(Ft,Ve,Ot[Ve]);if(Nt)for(var Ve of Nt(Ot))Zt.call(Ot,Ve)&&Yt(Ft,Ve,Ot[Ve]);return Ft},Ge=(Ft,Ot)=>Qe(Ft,bt(Ot));const kt={labelCol:{span:4},wrapperCol:{span:20}};var ln=({callback:Ft,onCancel:Ot})=>{function Ve(Ut){Ft(Ut)}return ce.createElement($e.default,Ge(ut({},kt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ve,style:{width:500}}),ce.createElement($e.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},ce.createElement(gt.default,null)),ce.createElement($e.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},ce.createElement(gt.default,null)),ce.createElement("div",{className:"flex-container flex-end"},ce.createElement(je.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ce.createElement(je.ZP,{type:"ghost",onClick:Ot},"\u53D6\u6D88")))},sn=ve(97692),Bt=ve(28451),Gt=ve(43418),en=ve(95237),Bn=ve(73524),rn=ve(59301),Cn=({callback:Ft,onCancel:Ot})=>{const Ve=document.createElement("canvas"),Ut=Ve.getContext("2d");Ve.width=1e3,Ve.height=800,Ut.fillStyle="#ffffff",Ut.fillRect(0,0,Ve.width,Ve.height);const tn=Ve.toDataURL("image/png");return rn.createElement(Gt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},rn.createElement(en.Z,{style:{height:"100vh"}},rn.createElement(Bn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:tn,visible:!0,title:String(Date.now())},onOk:xt=>{Ft({src:xt.url})},onClose:Ot})))},ft=ve(12378);function En(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(En,go.CommandHandler),En.prototype.canAlignSelection=function(){var Ft=this.diagram;return!(Ft===null||Ft.isReadOnly||Ft.isModelReadOnly||Ft.selection.count<2)},En.prototype.alignLeft=function(){var Ft=this.diagram;Ft.startTransaction("aligning left");var Ot=1/0;Ft.selection.each(function(Ve){Ve instanceof go.Link||(Ot=Math.min(Ve.position.x,Ot))}),Ft.selection.each(function(Ve){Ve instanceof go.Link||Ve.move(new go.Point(Ot,Ve.position.y))}),Ft.commitTransaction("aligning left")},En.prototype.alignRight=function(){var Ft=this.diagram;Ft.startTransaction("aligning right");var Ot=-1/0;Ft.selection.each(function(Ve){if(!(Ve instanceof go.Link)){var Ut=Ve.actualBounds.x+Ve.actualBounds.width;Ot=Math.max(Ut,Ot)}}),Ft.selection.each(function(Ve){Ve instanceof go.Link||Ve.move(new go.Point(Ot-Ve.actualBounds.width,Ve.position.y))}),Ft.commitTransaction("aligning right")},En.prototype.alignTop=function(){var Ft=this.diagram;Ft.startTransaction("alignTop");var Ot=1/0;Ft.selection.each(function(Ve){Ve instanceof go.Link||(Ot=Math.min(Ve.position.y,Ot))}),Ft.selection.each(function(Ve){Ve instanceof go.Link||Ve.move(new go.Point(Ve.position.x,Ot))}),Ft.commitTransaction("alignTop")},En.prototype.alignBottom=function(){var Ft=this.diagram;Ft.startTransaction("aligning bottom");var Ot=-1/0;Ft.selection.each(function(Ve){if(!(Ve instanceof go.Link)){var Ut=Ve.actualBounds.y+Ve.actualBounds.height;Ot=Math.max(Ut,Ot)}}),Ft.selection.each(function(Ve){Ve instanceof go.Link||Ve.move(new go.Point(Ve.actualBounds.x,Ot-Ve.actualBounds.height))}),Ft.commitTransaction("aligning bottom")},En.prototype.alignCenterX=function(){var Ft=this.diagram,Ot=Ft.selection.first();if(Ot){Ft.startTransaction("aligning Center X");var Ve=Ot.actualBounds.x+Ot.actualBounds.width/2;Ft.selection.each(function(Ut){Ut instanceof go.Link||Ut.move(new go.Point(Ve-Ut.actualBounds.width/2,Ut.actualBounds.y))}),Ft.commitTransaction("aligning Center X")}},En.prototype.alignCenterY=function(){var Ft=this.diagram,Ot=Ft.selection.first();if(Ot){Ft.startTransaction("aligning Center Y");var Ve=Ot.actualBounds.y+Ot.actualBounds.height/2;Ft.selection.each(function(Ut){Ut instanceof go.Link||Ut.move(new go.Point(Ut.actualBounds.x,Ve-Ut.actualBounds.height/2))}),Ft.commitTransaction("aligning Center Y")}},En.prototype.alignColumn=function(Ft){var Ot=this.diagram;Ot.startTransaction("align Column"),Ft===void 0&&(Ft=0),Ft=parseFloat(Ft);var Ve=new Array;Ot.selection.each(function(Vt){Vt instanceof go.Link||Ve.push(Vt)});for(var Ut=0;Ut<Ve.length-1;Ut++){var tn=Ve[Ut],xt=tn.actualBounds.y+tn.actualBounds.height+Ft,rt=Ve[Ut+1];rt.move(new go.Point(tn.actualBounds.x,xt))}Ot.commitTransaction("align Column")},En.prototype.alignRow=function(Ft){Ft===void 0&&(Ft=0),Ft=parseFloat(Ft);var Ot=this.diagram;Ot.startTransaction("align Row");var Ve=new Array;Ot.selection.each(function(Vt){Vt instanceof go.Link||Ve.push(Vt)});for(var Ut=0;Ut<Ve.length-1;Ut++){var tn=Ve[Ut],xt=tn.actualBounds.x+tn.actualBounds.width+Ft,rt=Ve[Ut+1];rt.move(new go.Point(xt,tn.actualBounds.y))}Ot.commitTransaction("align Row")},En.prototype.canRotate=function(Ft){var Ot=this.diagram;return!(Ot===null||Ot.isReadOnly||Ot.isModelReadOnly||Ot.selection.count<1)},En.prototype.rotate=function(Ft){Ft===void 0&&(Ft=90);var Ot=this.diagram;Ot.startTransaction("rotate "+Ft.toString());var Ot=this.diagram;Ot.selection.each(function(Ve){Ve instanceof go.Link||Ve instanceof go.Group||(Ve.angle+=Ft)}),Ot.commitTransaction("rotate "+Ft.toString())},En.prototype.pullToFront=function(){var Ft=this.diagram;Ft.startTransaction("pullToFront");var Ot=new go.Map;Ft.selection.each(function(Ve){Ot.set(Ve.layer,0)}),Ot.iteratorKeys.each(function(Ve){var Ut=0;Ve.parts.each(function(tn){if(!tn.isSelected){var xt=tn.zOrder;isNaN(xt)?tn.zOrder=0:Ut=Math.max(Ut,xt)}}),Ot.set(Ve,Ut)}),Ft.selection.each(function(Ve){En._assignZOrder(Ve,Ot.get(Ve.layer)+1)}),Ft.commitTransaction("pullToFront")},En.prototype.pushToBack=function(){var Ft=this.diagram;Ft.startTransaction("pushToBack");var Ot=new go.Map;Ft.selection.each(function(Ve){Ot.set(Ve.layer,0)}),Ot.iteratorKeys.each(function(Ve){var Ut=0;Ve.parts.each(function(tn){if(!tn.isSelected){var xt=tn.zOrder;isNaN(xt)?tn.zOrder=0:Ut=Math.min(Ut,xt)}}),Ot.set(Ve,Ut)}),Ft.selection.each(function(Ve){En._assignZOrder(Ve,Ot.get(Ve.layer)-1-En._findGroupDepth(Ve))}),Ft.commitTransaction("pushToBack")},En._assignZOrder=function(Ft,Ot,Ve){Ve===void 0&&(Ve=Ft),Ft.layer===Ve.layer&&(Ft.zOrder=Ot),Ft instanceof go.Group&&Ft.memberParts.each(function(Ut){En._assignZOrder(Ut,Ot+1,Ve)})},En._findGroupDepth=function(Ft){if(Ft instanceof go.Group){var Ot=0;return Ft.memberParts.each(function(Ve){Ot=Math.max(Ot,En._findGroupDepth(Ve))}),Ot+1}else return 0},En.prototype.doKeyDown=function(){var Ft=this.diagram;if(Ft!==null){var Ot=Ft.lastInput;if(Ot.key==="Up"||Ot.key==="Down"||Ot.key==="Left"||Ot.key==="Right"){var Ve=this.arrowKeyBehavior;if(Ve==="none")return;if(Ve==="select"){this._arrowKeySelect();return}else if(Ve==="move"){this._arrowKeyMove();return}else if(Ve==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},En.prototype._getAllParts=function(){var Ft=new Array;return this.diagram.nodes.each(function(Ot){Ft.push(Ot)}),this.diagram.parts.each(function(Ot){Ft.push(Ot)}),Ft},En.prototype._arrowKeyMove=function(){var Ft=this.diagram,Ot=Ft.lastInput,Ve=0,Ut=0;if(Ot.control||Ot.meta)Ve=1,Ut=1;else if(Ft.grid!==null){var tn=Ft.grid.gridCellSize;Ut=tn.width,Ve=tn.height}Ft.startTransaction("arrowKeyMove"),Ft.selection.each(function(xt){Ot.key==="Up"?xt.move(new go.Point(xt.actualBounds.x,xt.actualBounds.y-Ve)):Ot.key==="Down"?xt.move(new go.Point(xt.actualBounds.x,xt.actualBounds.y+Ve)):Ot.key==="Left"?xt.move(new go.Point(xt.actualBounds.x-Ut,xt.actualBounds.y)):Ot.key==="Right"&&xt.move(new go.Point(xt.actualBounds.x+Ut,xt.actualBounds.y))}),Ft.commitTransaction("arrowKeyMove")},En.prototype._arrowKeySelect=function(){var Ft=this.diagram,Ot=Ft.lastInput,Ve=null;Ot.key==="Up"?Ve=this._findNearestPartTowards(270):Ot.key==="Down"?Ve=this._findNearestPartTowards(90):Ot.key==="Left"?Ve=this._findNearestPartTowards(180):Ot.key==="Right"&&(Ve=this._findNearestPartTowards(0)),Ve!==null&&(Ot.shift?Ve.isSelected=!0:Ot.control||Ot.meta?Ve.isSelected=!Ve.isSelected:Ft.select(Ve))},En.prototype._findNearestPartTowards=function(Ft){var Ot=this.diagram.selection.first();if(Ot===null)return null;for(var Ve=Ot.actualBounds.center,Ut=this._getAllParts(),tn=1/0,xt=Ot,rt=0;rt<Ut.length;rt++){var Vt=Ut[rt];if(Vt!==Ot&&Vt.canSelect()){var on=Vt.actualBounds.center,xn=Ve.directionPoint(on),An=this._angleCloseness(xn,Ft);if(An<=45){var yt=Ve.distanceSquaredPoint(on);yt*=1+Math.sin(An*Math.PI/180),yt<tn&&(tn=yt,xt=Vt)}}}return xt},En.prototype._angleCloseness=function(Ft,Ot){return Math.min(Math.abs(Ot-Ft),Math.min(Math.abs(Ot+360-Ft),Math.abs(Ot-360-Ft)))},En.prototype._arrowKeyTree=function(){var Ft=this.diagram,Ot=Ft.selection.first();if(Ot instanceof go.Node){var Ve=Ft.lastInput;if(Ve.key==="Right"){if(!Ot.isTreeLeaf)if(!Ot.isTreeExpanded)Ft.commandHandler.canExpandTree(Ot)&&Ft.commandHandler.expandTree(Ot);else{var Ut=this._sortTreeChildrenByY(Ot).first();Ut!==null&&Ft.select(Ut)}}else if(Ve.key==="Left")if(!Ot.isTreeLeaf&&Ot.isTreeExpanded)Ft.commandHandler.canCollapseTree(Ot)&&Ft.commandHandler.collapseTree(Ot);else{var tn=Ot.findTreeParentNode();tn!==null&&Ft.select(tn)}else if(Ve.key==="Up"){var tn=Ot.findTreeParentNode();if(tn!==null){var xt=this._sortTreeChildrenByY(tn),rt=xt.indexOf(Ot);if(rt>0){for(var Vt=xt.elt(rt-1);Vt!==null&&Vt.isTreeExpanded&&!Vt.isTreeLeaf;){var on=this._sortTreeChildrenByY(Vt);Vt=on.last()}Vt!==null&&Ft.select(Vt)}else Ft.select(tn)}}else if(Ve.key==="Down")if(Ot.isTreeExpanded&&!Ot.isTreeLeaf){var Ut=this._sortTreeChildrenByY(Ot).first();Ut!==null&&Ft.select(Ut)}else for(;Ot!==null;){var tn=Ot.findTreeParentNode();if(tn===null)break;var xt=this._sortTreeChildrenByY(tn),rt=xt.indexOf(Ot);if(rt<xt.length-1){Ft.select(xt.elt(rt+1));break}else Ot=tn}var xn=Ft.selection.first();xn!==null&&Ft.scrollToRect(xn.actualBounds)}},En.prototype._sortTreeChildrenByY=function(Ft){var Ot=new go.List().addAll(Ft.findTreeChildrenNodes());return Ot.sort(function(Ve,Ut){var tn=Ve.location,xt=Ut.location;return tn.y<xt.y?-1:tn.y>xt.y?1:tn.x<xt.x?-1:tn.x>xt.x?1:0}),Ot},En.prototype.copyToClipboard=function(Ft){go.CommandHandler.prototype.copyToClipboard.call(this,Ft),this._lastPasteOffset.set(this.pasteOffset)},En.prototype.pasteFromClipboard=function(){var Ft=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(Ft,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),Ft},Object.defineProperty(En.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(Ft){if(Ft!=="move"&&Ft!=="select"&&Ft!=="scroll"&&Ft!=="tree"&&Ft!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+Ft);this._arrowKeyBehavior=Ft}}),Object.defineProperty(En.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(Ft){if(!(Ft instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+Ft);this._pasteOffset.set(Ft)}});var Vn=En,Re=ve(74413),Ce=ve(43604),Pe=ve(99064),Ne={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},ke=ve(24065),Se=ve(59301),nt=(Ft,Ot,Ve)=>new Promise((Ut,tn)=>{var xt=on=>{try{Vt(Ve.next(on))}catch(xn){tn(xn)}},rt=on=>{try{Vt(Ve.throw(on))}catch(xn){tn(xn)}},Vt=on=>on.done?Ut(on.value):Promise.resolve(on.value).then(xt,rt);Vt((Ve=Ve.apply(Ft,Ot)).next())});function Pt({onCancel:Ft,callback:Ot}){let Ve=(0,ce.useRef)(),Ut=(0,ce.useRef)(),tn=(0,ce.useRef)(),xt=(0,ce.useRef)(!1);const rt=(0,ce.useRef)(!1),[Vt,on]=(0,ce.useState)(0);function xn(){const yt=ft.bx.make,cn={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"};Ve.current=new ft.S0(Ut.current,{padding:20,grid:yt(ft.s_,"Grid",yt(ft.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),yt(ft.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:jn=>{var Ei=jn.diagram.commandHandler.addTopLevelParts(jn.diagram.selection,!0);Ei||jn.diagram.currentTool.doCancel()},commandHandler:yt(Vn),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:jn=>{var Ei=jn.subject;Ei.location=Ei.location.copy().snapToGridPoint(jn.diagram.grid.gridOrigin,jn.diagram.grid.gridCellSize),setTimeout(()=>{jn.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:jn=>{var Ei=jn.subject;setTimeout(()=>{jn.diagram.commandHandler.editTextBlock()})},LinkRelinked:jn=>{var Ei=jn.parameter.part;Ei.invalidateConnectedLinks();var zi=jn.subject;jn.diagram.toolManager.linkingTool.isForwards?zi.toNode.invalidateConnectedLinks():zi.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Ve.current.nodeTemplate=yt(ft.NB,"Auto",{locationSpot:ft.z6.Center,locationObjectName:"SHAPE",desiredSize:new ft.$u(120,60),minSize:new ft.$u(40,40),resizable:!0,resizeCellSize:new ft.$u(10,10),rotatable:!0},new ft.KX("location","loc",ft.E9.parse).makeTwoWay(ft.E9.stringify),new ft.KX("desiredSize","size",ft.$u.parse).makeTwoWay(ft.$u.stringify),yt(ft.bn,{name:"SHAPE",fill:cn.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:ft.z6.AllSides,toSpot:ft.z6.AllSides},new ft.KX("figure"),new ft.KX("fill"),new ft.KX("stroke","borderColor"),new ft.KX("strokeWidth","thickness"),new ft.KX("strokeDashArray","dash")),yt(ft.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),yt(ft.al,{margin:1,textAlign:"center",overflow:ft.al.OverflowEllipsis,editable:!0},new ft.KX("text").makeTwoWay(),new ft.KX("stroke","color"))),Ve.current.nodeTemplate.toolTip=yt("ToolTip",yt(ft.s_,"Vertical",{maxSize:new ft.$u(200,NaN)},yt(ft.al,{font:"bold 10pt sans-serif",textAlign:"center"},new ft.KX("text")),yt(ft.al,{font:"10pt sans-serif",textAlign:"center"},new ft.KX("text","details"))));function On(jn,Ei){var zi=(Ni,Gi)=>{Ni.handled=!0,Ni.diagram.model.commit(ur=>{var Qi=Gi.part.adornedPart,rr=new ft.E9().setRectSpot(Qi.actualBounds,jn);rr.subtract(Qi.location),rr.scale(2,2),rr.x+=Math.sign(rr.x)*130,rr.y+=Math.sign(rr.y)*130,rr.add(Qi.location),rr.snapToGridPoint(Ni.diagram.grid.gridOrigin,Ni.diagram.grid.gridCellSize);var fr=ur.copyNodeData(Qi.data);ur.setGroupKeyForNodeData(fr,ur.getGroupKeyForNodeData(Qi.data)),ur.addNodeData(fr);var Nn={from:Qi.key,to:ur.getKeyForNodeData(fr)};ur.addLinkData(Nn);var Jr=Ni.diagram.findNodeForData(fr);Jr.location=rr,Ni.diagram.select(Jr),setTimeout(()=>{Ni.diagram.commandHandler.editTextBlock()},20)})};return yt(ft.bn,{figure:Ei,alignment:jn,alignmentFocus:jn.opposite(),width:jn.equals(ft.z6.Top)||jn.equals(ft.z6.Bottom)?25:18,height:jn.equals(ft.z6.Top)||jn.equals(ft.z6.Bottom)?18:25,fill:"orange",stroke:cn.white,strokeWidth:4,mouseEnter:(Ni,Gi)=>Gi.fill="dodgerblue",mouseLeave:(Ni,Gi)=>Gi.fill="orange",isActionable:!0,click:zi,contextClick:zi})}function ri(jn){return yt(ft.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:(Ei,zi)=>zi.fill="dodgerblue",mouseLeave:(Ei,zi)=>zi.fill="orange",click:(Ei,zi)=>{Ei.diagram.commandHandler.showContextMenu(zi.part.adornedPart)}},jn||{})}Ve.current.nodeTemplate.selectionAdornmentTemplate=yt(ft.uz,"Spot",yt(ft.Vm,{padding:10}),On(ft.z6.Top,"TriangleUp"),On(ft.z6.Left,"TriangleLeft"),On(ft.z6.Right,"TriangleRight"),On(ft.z6.Bottom,"TriangleDown"),ri({alignment:new ft.z6(.75,0)}));function Wt(jn,Ei){return(zi,Ni)=>{zi.handled=!0,zi.diagram.model.commit(Gi=>{Gi.set(Ni.part.adornedPart.data,jn,Ei)})}}function Jt(jn,Ei){return Ei||(Ei="color"),yt(ft.bn,{width:16,height:16,stroke:"lightgray",fill:jn,margin:1,background:"transparent",mouseEnter:(zi,Ni)=>Ni.stroke="dodgerblue",mouseLeave:(zi,Ni)=>Ni.stroke="lightgray",click:Wt(Ei,jn),contextClick:Wt(Ei,jn)})}function hi(){return[yt("ContextMenuButton",yt(ft.s_,"Horizontal",Jt(cn.white,"fill"),Jt(cn.beige,"fill"),Jt(cn.extralightblue,"fill"),Jt(cn.extralightred,"fill"))),yt("ContextMenuButton",yt(ft.s_,"Horizontal",Jt(cn.lightgray,"fill"),Jt(cn.lightgreen,"fill"),Jt(cn.lightblue,"fill"),Jt(cn.lightred,"fill")))]}function ci(){return[yt("ContextMenuButton",yt(ft.s_,"Horizontal",Jt(cn.black),Jt(cn.green),Jt(cn.blue),Jt(cn.red))),yt("ContextMenuButton",yt(ft.s_,"Horizontal",Jt(cn.white),Jt(cn.magenta),Jt(cn.purple),Jt(cn.orange)))]}function ui(jn,Ei){return Ei||(Ei="thickness"),yt(ft.bn,"LineH",{width:16,height:16,strokeWidth:jn,margin:1,background:"transparent",mouseEnter:(zi,Ni)=>Ni.background="dodgerblue",mouseLeave:(zi,Ni)=>Ni.background="transparent",click:Wt(Ei,jn),contextClick:Wt(Ei,jn)})}function qn(jn,Ei){return Ei||(Ei="dash"),yt(ft.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:jn,margin:1,background:"transparent",mouseEnter:(zi,Ni)=>Ni.background="dodgerblue",mouseLeave:(zi,Ni)=>Ni.background="transparent",click:Wt(Ei,jn),contextClick:Wt(Ei,jn)})}function di(){return[yt("ContextMenuButton",yt(ft.s_,"Horizontal",ui(1),ui(2),ui(3),ui(4))),yt("ContextMenuButton",yt(ft.s_,"Horizontal",qn(null),qn([2,4]),qn([4,4])))]}function li(jn,Ei){return Ei||(Ei="figure"),yt(ft.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:jn,margin:1,background:"transparent",mouseEnter:(zi,Ni)=>Ni.fill="dodgerblue",mouseLeave:(zi,Ni)=>Ni.fill="lightgray",click:Wt(Ei,jn),contextClick:Wt(Ei,jn)})}Ve.current.nodeTemplate.contextMenu=yt("ContextMenu",yt("ContextMenuButton",yt(ft.s_,"Horizontal",li("Rectangle"),li("RoundedRectangle"),li("Ellipse"),li("Diamond"))),yt("ContextMenuButton",yt(ft.s_,"Horizontal",li("Parallelogram2"),li("ManualOperation"),li("Procedure"),li("Cylinder1"))),yt("ContextMenuButton",yt(ft.s_,"Horizontal",li("Terminator"),li("CreateRequest"),li("Document"),li("TriangleDown"))),hi(),ci(),di()),Ve.current.groupTemplate=yt(ft.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:ft.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(jn,Ei)=>{var zi=Ei.addMembers(Ei.diagram.selection,!0);zi||Ei.diagram.currentTool.doCancel()},avoidable:!1},new ft.KX("location","loc",ft.E9.parse).makeTwoWay(ft.E9.stringify),yt(ft.s_,"Auto",{name:"BODY"},yt(ft.bn,{parameter1:10,fill:cn.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:ft.z6.AllSides,toSpot:ft.z6.AllSides},new ft.KX("fill"),new ft.KX("stroke","color"),new ft.KX("strokeWidth","thickness"),new ft.KX("strokeDashArray","dash")),yt(ft.Vm,{background:"transparent",margin:20})),yt(ft.al,{alignment:ft.z6.Top,alignmentFocus:ft.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new ft.KX("text"),new ft.KX("stroke","color"))),Ve.current.groupTemplate.selectionAdornmentTemplate=yt(ft.uz,"Spot",yt(ft.s_,"Auto",yt(ft.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),yt(ft.Vm,{margin:1.5})),ri({alignment:ft.z6.TopRight,alignmentFocus:ft.z6.BottomRight})),Ve.current.groupTemplate.contextMenu=yt("ContextMenu",hi(),ci(),di()),Ve.current.linkTemplate=yt(ft.rU,{layerName:"Foreground",routing:ft.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new ft.KX("fromSpot","fromSpot",ft.z6.parse),new ft.KX("toSpot","toSpot",ft.z6.parse),new ft.KX("fromShortLength","dir",jn=>jn>=1?10:0),new ft.KX("toShortLength","dir",jn=>jn>=1?10:0),new ft.KX("points").makeTwoWay(),yt(ft.bn,{strokeWidth:2},new ft.KX("stroke","color"),new ft.KX("strokeWidth","thickness"),new ft.KX("strokeDashArray","dash")),yt(ft.bn,{segmentIndex:0,segmentOffset:new ft.E9(15,0),segmentOrientation:ft.rU.OrientAlong,alignmentFocus:ft.z6.Right,figure:"circle",width:10,strokeWidth:0},new ft.KX("fill","color"),new ft.KX("visible","dir",jn=>jn===1)),yt(ft.bn,{segmentIndex:-1,segmentOffset:new ft.E9(-10,6),segmentOrientation:ft.rU.OrientPlus90,alignmentFocus:ft.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new ft.KX("fill","color"),new ft.KX("visible","dir",jn=>jn>=1),new ft.KX("width","thickness",jn=>7+3*jn),new ft.KX("height","thickness",jn=>7+3*jn),new ft.KX("segmentOffset","thickness",jn=>new ft.E9(-15,4+1.5*jn))),yt(ft.bn,{segmentIndex:0,segmentOffset:new ft.E9(15,-6),segmentOrientation:ft.rU.OrientMinus90,alignmentFocus:ft.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new ft.KX("fill","color"),new ft.KX("visible","dir",jn=>jn===2),new ft.KX("width","thickness",jn=>7+3*jn),new ft.KX("height","thickness",jn=>7+3*jn),new ft.KX("segmentOffset","thickness",jn=>new ft.E9(-15,4+1.5*jn))),yt(ft.al,{alignmentFocus:new ft.z6(0,1,-4,0),editable:!0},new ft.KX("text").makeTwoWay(),new ft.KX("stroke","color"))),Ve.current.linkTemplate.selectionAdornmentTemplate=yt(ft.uz,yt(ft.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Ai(2)},new ft.KX("pathPattern","thickness",Ai)),ri({alignmentFocus:new ft.z6(0,0,-6,-4)}));function Ai(jn){return yt(ft.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(jn+4).toString()+" H3"})}function er(jn){var Ei="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return jn===0?Ei="M0 0 M16 16 M0 8 L16 8":jn===2&&(Ei="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),yt(ft.bn,{geometryString:Ei,margin:2,background:"transparent",mouseEnter:(zi,Ni)=>Ni.background="dodgerblue",mouseLeave:(zi,Ni)=>Ni.background="transparent",click:Wt("dir",jn),contextClick:Wt("dir",jn)})}function sr(jn){var Ei=(zi,Ni)=>{zi.handled=!0,zi.diagram.model.commit(Gi=>{var ur=Ni.part.adornedPart;Gi.set(ur.data,jn?"toSpot":"fromSpot",ft.z6.stringify(ft.z6.AllSides)),(jn?ur.toNode:ur.fromNode).invalidateConnectedLinks()})};return yt(ft.bn,{width:12,height:12,fill:"transparent",mouseEnter:(zi,Ni)=>Ni.background="dodgerblue",mouseLeave:(zi,Ni)=>Ni.background="transparent",click:Ei,contextClick:Ei})}function vn(jn,Ei){var zi=0,Ni=ft.z6.RightSide;jn.equals(ft.z6.Top)?(zi=270,Ni=ft.z6.TopSide):jn.equals(ft.z6.Left)?(zi=180,Ni=ft.z6.LeftSide):jn.equals(ft.z6.Bottom)&&(zi=90,Ni=ft.z6.BottomSide),Ei||(zi-=180);var Gi=(ur,Qi)=>{ur.handled=!0,ur.diagram.model.commit(rr=>{var fr=Qi.part.adornedPart;rr.set(fr.data,Ei?"toSpot":"fromSpot",ft.z6.stringify(Ni)),(Ei?fr.toNode:fr.fromNode).invalidateConnectedLinks()})};return yt(ft.bn,{alignment:jn,alignmentFocus:jn.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:zi,background:"transparent",mouseEnter:(ur,Qi)=>Qi.background="dodgerblue",mouseLeave:(ur,Qi)=>Qi.background="transparent",click:Gi,contextClick:Gi})}Ve.current.linkTemplate.contextMenu=yt("ContextMenu",ci(),di(),yt("ContextMenuButton",yt(ft.s_,"Horizontal",er(0),er(1),er(2))),yt("ContextMenuButton",yt(ft.s_,"Horizontal",yt(ft.s_,"Spot",sr(!1),vn(ft.z6.Top,!1),vn(ft.z6.Left,!1),vn(ft.z6.Right,!1),vn(ft.z6.Bottom,!1)),yt(ft.s_,"Spot",{margin:new ft.Zt(0,0,0,2)},sr(!0),vn(ft.z6.Top,!0),vn(ft.z6.Left,!0),vn(ft.z6.Right,!0),vn(ft.z6.Bottom,!0)))));const Nr=`{ "class": "GraphLinksModel",
|
|
|
"nodeDataArray": [
|
|
|
{"text":"Find Problem","key":-9,"loc":"-20 -140","color":"#3358ff","fill":"white","figure":"Procedure","thickness":3},
|
|
|
{"text":"What do we want?","key":-10,"loc":"-65 -324.305","group":-16,"figure":"Ellipse","fill":"white"},
|
|
|
{"text":"What do our users want?","key":-11,"loc":"105 -334.305","group":-20,"figure":"Ellipse","fill":"#ffffff","color":"black"},
|
|
|
{"text":"Meetings","key":-12,"loc":"-65 -444.305","group":-16,"figure":"TriangleDown","fill":"#ffffff"},
|
|
|
{"text":"Reviews","key":-13,"loc":"105 -454.305","group":-20,"figure":"TriangleDown","fill":"#ffffff","color":"black"},
|
|
|
{"text":"Can we solve it?","key":-14,"loc":"190 -140","color":"#7d33ff","fill":"#ffffff","figure":"Diamond","size":"140 80","thickness":3},
|
|
|
{"isGroup":true,"text":"Internal","key":-16,"loc":"-65 -384.305","fill":"#d5ebff","dash":null,"thickness":1,"group":-22},
|
|
|
{"isGroup":true,"text":"External","key":-20,"loc":"105 -394.305","fill":"#d5ebff","dash":null,"thickness":1,"group":-22},
|
|
|
{"isGroup":true,"text":"Sources","key":-22,"loc":"20 -400","fill":"#a5d2fa","dash":[4,4],"color":"#3358ff"}
|
|
|
],
|
|
|
"linkDataArray": [
|
|
|
{"from":-12,"to":-10,"points":[-65,-414.305,-65,-404.305,-65,-384.305,-65,-384.305,-65,-364.305,-65,-354.305],"dash":null,"dir":1},
|
|
|
{"from":-13,"to":-11,"points":[105,-424.305,105,-414.305,105,-394.305,105,-394.305,105,-374.305,105,-364.305],"dash":null,"color":"#000000","dir":1},
|
|
|
{"from":-10,"to":-9,"points":[-65,-294.305,-65,-284.305,-65,-232.1525,-40,-232.1525,-40,-180,-40,-170],"dir":2,"dash":[4,4]},
|
|
|
{"from":-11,"to":-9,"points":[105,-304.305,105,-294.305,105,-237.1525,0,-237.1525,0,-180,0,-170],"dash":[4,4],"dir":2},
|
|
|
{"from":-9,"to":-14,"points":[40,-150,58,-150,80,-150,80,-153.33333333333331,102,-153.33333333333331,120,-153.33333333333331],"dir":1,"color":"#3358ff"},
|
|
|
{"from":-14,"to":-9,"points":[190,-100,190,-90,-20,-90,-20,-95,-20,-100,-20,-110],"fromSpot":"BottomSide","toSpot":"BottomSide","text":"No","color":"#ff3333","thickness":2,"dir":1},
|
|
|
{"from":-9,"to":-14,"points":[40,-130,58,-130,80,-130,80,-126.66666666666666,102,-126.66666666666666,120,-126.66666666666666]}
|
|
|
]}`;var Dr=["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 ir(jn){return console.log("shapeName:",jn),Dr.indexOf(jn)>=0}var fn=new ft.YI(tn.current,{maxSelectionCount:1,linkTemplate:yt(ft.rU,{locationSpot:ft.z6.Center,selectionAdornmentTemplate:yt(ft.uz,"Link",{locationSpot:ft.z6.Center},yt(ft.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),yt(ft.bn,{toArrow:"Standard",stroke:null}))},{routing:ft.rU.AvoidsNodes,curve:ft.rU.JumpOver,corner:5,toShortLength:4},new ft.KX("points"),yt(ft.bn,{isPanelMain:!0,strokeWidth:2}),yt(ft.bn,{toArrow:"Standard",stroke:null})),model:new ft.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...ft.bn.getFigureGenerators().toArray().map(jn=>({text:"\u672A\u547D\u540D",size:"100 100",figure:jn.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Ve.current.addDiagramListener("TextEdited",function(jn){var Ei;const zi=jn.subject.part;var Ni=(Ei=document.activeElement)==null?void 0:Ei.value;typeof Ni=="string"&&Ni.trim()===""&&Ve.current.model.commit(function(Gi){Gi.set(zi.data,"text","\u672A\u547D\u540D"),Ve.current.commandHandler.stopCommand()},"increment")}),fn.nodeTemplate=yt(ft.NB,"Auto",{locationSpot:ft.z6.Center},new ft.KX("location","location",ft.E9.parse).makeTwoWay(ft.E9.stringify),yt(ft.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 ft.KX("stroke").makeTwoWay(),new ft.KX("fill").makeTwoWay(),new ft.KX("figure")),yt(ft.al,{margin:new ft.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new ft.$u(16,16),maxSize:new ft.$u(10,NaN),textAlign:"center",editable:!0},new ft.KX("key").makeTwoWay())),setTimeout(()=>{Ve.current.grid=yt(ft.s_,"Grid",yt(ft.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),yt(ft.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Ve.current.grid.visible=!0,Ve.current.grid.gridCellStroke="darkgray",Ve.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Ve.current,Ve.current}const An=()=>nt(this,null,function*(){var yt,cn=Ve.current.makeImage();const On=yield(0,Pe.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:cn.src,file_data:JSON.stringify({login:(yt=(0,ke.eY)())==null?void 0:yt.login,data:JSON.parse(Ve.current.model.toJson())})}});Ot({src:On.url})});return(0,ce.useEffect)(()=>(setTimeout(()=>{xn()},500),on(Vt+1),()=>{Ve.current=null}),[]),Se.createElement("div",{ref:rt,className:xt.current?`${Ne.maxH60} body-overflow-initial`:"body-overflow-initial"},Se.createElement(Gt.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!Vt,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:Se.createElement(en.Z,null,Se.createElement(Ce.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Se.createElement(Ce.Z,{onClick:()=>{var yt,cn,On=Ve.current.selection.first();if(xt.current=!xt.current,document.activeElement&&On){let ri=(cn=(yt=document.activeElement)==null?void 0:yt.value)==null?void 0:cn.trim();typeof ri=="string"&&Ve.current.model.commit(function(Wt){Wt.set(On.data,"text",ri||"\u672A\u547D\u540D"),Ve.current.commandHandler.stopCommand()},"increment")}on(Vt+1)}},Se.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:Ft},Se.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:Ne.flowChartWrp},Se.createElement("div",{style:{display:"flex",height:"100%"}},Se.createElement("div",{style:{width:"300px",height:"100%"}},Se.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),Se.createElement("div",{style:{height:"calc(100% - 50px)"},className:Ne.myPaletteDiv,ref:tn})),Se.createElement("div",{style:{flex:1,position:"relative"}},Se.createElement("div",{ref:Ut,style:{height:"80vh"}}))),Se.createElement("div",{className:"tr"},Se.createElement(je.ZP,{size:"large",onClick:An,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var qe=Pt,Ue=ve(5112),St=ve(5871);const vt=Ue.ZP.Group,lt={margin:"0 8px"};var Dt=({callback:Ft,onCancel:Ot})=>{function Ve(Ut){Ft(Ut)}return ce.createElement($e.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ve},ce.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},ce.createElement("span",{style:lt},"\u5355\u5143\u683C\u6570\uFF1A"),ce.createElement("span",{style:lt},"\u884C\u6570"),ce.createElement($e.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},ce.createElement(St.Z,null)),ce.createElement("span",{style:lt},"\u5217\u6570"),ce.createElement($e.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},ce.createElement(St.Z,null))),ce.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},ce.createElement("span",{style:lt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),ce.createElement($e.default.Item,{name:"align"},ce.createElement(vt,null,ce.createElement(Ue.ZP,{value:"default"},ce.createElement("i",{className:"fa fa-align-justify"})),ce.createElement(Ue.ZP,{value:"left"},ce.createElement("i",{className:"fa fa-align-left"})),ce.createElement(Ue.ZP,{value:"center"},ce.createElement("i",{className:"fa fa-align-center"})),ce.createElement(Ue.ZP,{value:"right"},ce.createElement("i",{className:"fa fa-align-right"}))))),ce.createElement("div",{className:"flex-container flex-end"},ce.createElement(je.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ce.createElement(je.ZP,{type:"ghost",onClick:Ot},"\u53D6\u6D88")))},un=ve(78673),Xt=ve(80727),$t=ve.n(Xt),bn=(0,ce.forwardRef)(({use3d:Ft,width:Ot,height:Ve,callback:Ut,showSaveButton:tn},xt)=>{const rt=(0,ce.useRef)(),Vt=(0,ce.useRef)(),[on,xn]=(0,ce.useState)(!1),An=(0,ce.useRef)({id:rt,appName:"graphing",width:Ot||1e3,height:Ve||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,ce.useEffect)(()=>{Vt.current=new($t())(An.current,!0),window.onload=function(){Vt.current.inject("applet_container")}},[]);const yt=()=>{var cn=window.ggbApplet.getPNGBase64(1,!0,72);return Ut&&Ut(cn),cn};return(0,ce.useEffect)(()=>{An.current.appName=on?"3D":"graphing",Vt.current.inject("applet_container")},[on]),(0,ce.useEffect)(()=>{xn(Ft)},[Ft]),(0,ce.useImperativeHandle)(xt,()=>({getImgData:yt})),ce.createElement(ce.Fragment,null,ce.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:rt}),ce.createElement(en.Z,{align:"middle"},ce.createElement(Ce.Z,{flex:1},ce.createElement(un.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:on,onChange:cn=>xn(cn)})),ce.createElement(Ce.Z,null,ce.createElement(je.ZP,{size:"large",onClick:yt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),pn=ve(41588),Yn=ve(8591);const ai="link",Wn="upload-image",Rn="add-flowchart",ii="draw-image",pi="add-flowchart",gi="code-block",Ri="add-table",Ji="------------",Un={default:Ji,left:`:${Ji}`,center:`:${Ji}:`,right:`${Ji}:`};var $n=ve(58856);function ti(){}let Pi=0;const mi=1e4,nr="\u2581",ji="@\u2581\u2581@",Le="@\u2581@",si=`
|
|
|
**\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`,Hi=["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 hn(Ft){return/^\d+$/.test(Ft)?`${Ft}px`:Ft}const vi=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Fi={[vi+"-B"]:"bold",[vi+"-I"]:"italic"},_n={[ai]:"\u6DFB\u52A0\u94FE\u63A5",[gi]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Wn]:"\u6DFB\u52A0\u56FE\u7247",[ii]:"\u6DFB\u52A0\u753B\u56FE",[Rn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Ri]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Dn=({defaultValue:Ft="",onChange:Ot,width:Ve="100%",height:Ut=400,miniToolbar:tn=!1,isFocus:xt=!1,watch:rt,insertTemp:Vt,mode:on="markdown",id:xn="markdown-editor-id",showResizeBar:An=!1,noStorage:yt=!1,showNullButton:cn=!1,showNullProgramButton:On=!1,hidetoolBar:ri=!1,fullScreen:Wt=!1,onBlur:Jt,onCMBeforeChange:hi,onFullScreen:ci,className:ui="",disablePaste:qn=!1,disabled:di=!1,disabledFill:li=!1,placeholder:Ai="",values:er="",extraUse:sr})=>{const[vn,Nr]=(0,ce.useState)(null),[Dr,ir]=(0,ce.useState)(Ft),[fn,jn]=(0,ce.useState)(rt),[Ei,zi]=(0,ce.useState)(Wt),[Ni,Gi]=(0,ce.useState)(""),[ur,Qi]=(0,ce.useState)(0),[rr,fr]=(0,ce.useState)(Ut),[Nn,Jr]=(0,ce.useState)(!1),[Ln,Zr]=(0,ce.useState)(0),[co,Bi]=(0,ce.useState)(0),Po=(0,ce.useRef)(),ao=(0,ce.useRef)(),Vi=(0,ce.useRef)(),qi=(0,ce.useRef)();(0,ce.useEffect)(()=>{const Mr=window.scrollY||window.pageYOffset;ir(er),vn==null||vn.setValue(er),window.scrollTo(0,Mr)},[er]),(0,ce.useEffect)(()=>{ci==null||ci(Ei)},[Ei]),(0,ce.useEffect)(()=>{if(Po.current){let Mr=function(Xn,yr){var wo;if(qn){yr.preventDefault();return}const ua=yr.clipboardData;if(ua){const No=ua.types.toString(),yo=ua.items;if(No==="Files"||ua.types.indexOf("Files")>-1){if(yr.preventDefault(),on=="stex")return;try{let ta=yo[1];((wo=yo[0])==null?void 0:wo.kind)==="file"&&(ta=yo[0]);const na=ta.getAsFile(),Na=na.name.split(".").pop();(0,Bt.I)(na,ka=>{var is,gn,Oa;ka.id?((is=na==null?void 0:na.type)==null?void 0:is.indexOf("image"))>-1?hr.replaceSelection(`<img width="100%" src="/api/attachments/${ka.id}?type=${ka.content_type})" alt="" />`):((gn=na==null?void 0:na.type)==null?void 0:gn.indexOf("video"))>-1?hr.replaceSelection(`<video width="100%" controls src="/api/attachments/${ka.id}"></video>`):((Oa=na==null?void 0:na.type)==null?void 0:Oa.indexOf("pdf"))>-1?hr.replaceSelection(`<a href="/api/attachments/${ka.id}?type=${na.type}&disposition=inline" target="_blank">${na.name}</a>`):Hi.includes(Na)?hr.replaceSelection(`<a href="/api/attachments/${ka.id}?type=office&disposition=inline" target="_blank">${na.name}</a>`):hr.replaceSelection(`[${na.name}](/api/attachments/${ka.id}?type=${ka.content_type})`):(ka==null?void 0:ka.status)===401&&(document.location.href="/user/login")})}catch(ta){Yn.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const hr=_e().fromTextArea(Po.current,{mode:on,lineNumbers:!tn,lineWrapping:!0,value:Ft,autoCloseTags:!0,autoCloseBrackets:!0});return hr.on("keyup",function(Xn,yr){yr.keyCode===8&&(Xn.getValue()==""?hr.setOption("placeholder",Ai):hr.setOption("placeholder",null))}),hr.on("keydown",function(Xn,yr){if(yr.keyCode===8){var wo=ro(Xn);wo&&yr.preventDefault()}}),xt&&hr.focus(),hr.on("paste",Mr),di&&hr.on("beforeChange",function(Xn,yr){(yr.origin==="paste"||yr.origin==="+input")&&yr.cancel()}),Nr(hr),()=>{hr.off("paste",Mr)}}},[]);const Hr=(0,ce.useCallback)(()=>{if(ao.current)try{}catch(Mr){console.log(Mr,"---- to set md editor body height")}},[rr,ao,Ei]);(0,ce.useEffect)(()=>{function Mr(){let hr=new Ct.Z(Xn=>{for(let yr of Xn)(yr.target.offsetHeight>0||yr.target.offsetWidth>0)&&(Hr(),vn.setSize("100%","100%"),vn.refresh())});return hr.observe(Po.current.parentElement),hr}if(vn){const hr=Mr();return()=>{var Xn,yr;(Xn=Po.current)!=null&&Xn.parentElement&&hr.unobserve((yr=Po.current)==null?void 0:yr.parentElement)}}},[vn,Hr]),(0,ce.useEffect)(()=>{if(vn){let Mr=[];for(const[hr,Xn]of Object.entries(Fi)){let yr={[hr]:()=>{xi(Xn)}};Mr.push(yr),vn.addKeyMap(yr)}return()=>{for(let hr of Mr)vn.removeKeyMap(hr)}}},[vn]),(0,ce.useEffect)(()=>{Wt!==Ei&&zi(Wt)},[Wt]),(0,$n.Z)(()=>{if(!yt&&ur>0){let Mr=new Date().getTime(),hr=window.sessionStorage.getItem(xn);Mr>=ur+mi&&(!hr||hr!==Dr)&&(window.sessionStorage.setItem(xn,Dr),Jr(!0))}},mi),(0,ce.useEffect)(()=>{jn(rt)},[vn,rt]),(0,ce.useEffect)(()=>{vn&&xt&&vn.focus()},[vn,xt]),(0,ce.useEffect)(()=>{if(fn&&vn){let Mr=function(Xn){let yr=Xn.target;if(qi.current){let wo=yr.scrollTop/yr.scrollHeight;qi.current.scrollTop=qi.current.scrollHeight*wo}};const hr=vn.getScrollerElement();return hr.addEventListener("scroll",Mr),()=>{hr.removeEventListener("scroll",Mr)}}},[vn,fn]),(0,ce.useEffect)(()=>{if(vn&&hi){let Mr=function(hr,Xn){hi(hr,Xn)};return vn.on("beforeChange",Mr),()=>{vn.off("beforeChange",Mr)}}},[vn,hi]),(0,ce.useEffect)(()=>{if(vn&&Jt){let Mr=function(){Jt(vn.getValue())};return vn.on("blur",Mr),()=>{vn.off("blur",Mr)}}},[vn,Jt]);function ro(Mr,hr){var Xn=Mr.getDoc(),yr=Xn.getCursor(),wo=Xn.getLine(yr.line),ua=wo.charAt(yr.ch-1),No=wo.lastIndexOf("@\u2581@",yr.ch),yo=wo.lastIndexOf("@\u2581\u2581@",yr.ch),ta=No>yo?No:yo,na=No>yo?3:4;if(ji.indexOf(ua)===-1)return null;if(console.log("change1:",hr,Mr,wo,yr,ta,No,yo,ua),ta>=0&&yr.ch-ta<5){var Na=ta+na;return Xn.replaceRange("",{line:yr.line,ch:ta},{line:yr.line,ch:Na}),{line:yr.line,ch:Na}}return null}(0,ce.useEffect)(()=>{if(vn){let Mr=function(hr,Xn){const yr=hr.getValue();ir(yr),Qi(new Date().getTime()),hr.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Ot&&(On?Ot(yr,kr(yr)):Ot(yr))};return vn.on("change",Mr),()=>{vn.off("change",Mr)}}},[vn,Ot]),(0,ce.useEffect)(()=>{if(vn)if(Ft==null)vn.setValue(""),ir("");else{const Mr=window.scrollY||window.pageYOffset;Ft!==vn.getValue()&&(vn.setValue(Ft),ir(Ft),vn.setCursor(di?1:vn.lineCount(),0),window.scrollTo(0,Mr))}},[vn,Ft]);const xi=(0,ce.useCallback)(Mr=>{const hr=vn.getCursor(),Xn=vn.getSelection();let yr=Xn.split(`
|
|
|
`);switch(Mr){case"bold":return vn.replaceSelection("**"+Xn+"**"),Xn===""&&vn.setCursor(hr.line,hr.ch+2),vn.focus();case"italic":return vn.replaceSelection("*"+Xn+"*"),Xn===""&&vn.setCursor(hr.line,hr.ch+1),vn.focus();case"code":return vn.replaceSelection("`"+Xn+"`"),Xn===""&&vn.setCursor(hr.line,hr.ch+1),vn.focus();case"inline-latex":return Gi("inline-latex"),vn.focus();case"latex":return vn.replaceSelection("```latex\n"+Xn+"\n```"),vn.setCursor(hr.line+1,Xn.length+1),vn.focus();case"line-break":return vn.replaceSelection(`<br/>
|
|
|
`),vn.focus();case"list-ul":return Xn===""?vn.replaceSelection("- "+Xn):vn.replaceSelection(yr.map(wo=>wo===""?"":`- ${wo}`).join(`
|
|
|
`)),vn.focus();case"list-ol":return Xn===""?vn.replaceSelection("1. "+Xn):vn.replaceSelection(yr.map((wo,ua)=>wo===""?"":`${ua+1}. ${wo}`).join(`
|
|
|
`)),vn.focus();case"add-null-ch":return Xn===""&&vn.setCursor(hr.line,hr.ch),vn.replaceSelection(nr),vn.focus();case"add-signal":return Xn===""&&vn.setCursor(hr.line,hr.ch),vn.replaceSelection(Le),vn.focus();case"add-multiple":return Xn===""&&vn.setCursor(hr.line,hr.ch),vn.replaceSelection(ji),vn.focus();case"inster-template-1":return Xn===""&&vn.setCursor(hr.line,hr.ch),vn.replaceSelection(si),vn.focus();case"eraser":return vn.setValue(""),vn.focus();case"trigger-watch":return jn(!fn),vn.focus();case"trigger-full-screen":return zi(!Ei),vn.focus();case ai:Gi(ai);return;case gi:Gi(gi);return;case Wn:Gi(Wn);return;case ii:Gi(ii);return;case"maths-latex":Gi("maths-latex");return;case Rn:Gi(Rn);return;case Ri:Gi(Ri);return;default:throw new Error}},[vn,fn,Ei]),tt=(0,ce.useCallback)((Mr,hr)=>{var Xn,yr,wo,ua,No,yo;switch(Gi(""),Ni){case ai:const{title:is,link:gn}=Mr;return vn.replaceSelection(`[${is}](${gn})`),vn.focus();case gi:const{language:Oa,content:Vl}=Mr;return vn.replaceSelection(["```"+Oa,Vl,"```"].join(`
|
|
|
`)),vn.focus();case"maths-latex":for(var ta=atob(Mr),na=new Uint8Array(ta.length),Na=0;Na<ta.length;Na++)na[Na]=ta.charCodeAt(Na);var ka=new Blob([na],{type:"image/png"});(0,Bt.I)(ka,$r=>{$r.id?vn.replaceSelection(``):($r==null?void 0:$r.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":vn.replaceSelection("`$$"+Mr+"$$`");break;case Wn:case ii:case pi:const{src:Hs,alt:wl}=Mr,Ma=hr,yu=(wo=(yr=(Xn=Ma==null?void 0:Ma.name)==null?void 0:Xn.split("."))==null?void 0:yr.pop)==null?void 0:wo.call(yr);return((ua=Ma==null?void 0:Ma.type)==null?void 0:ua.indexOf("image"))>-1||!(Ma!=null&&Ma.type)?Ma!=null&&Ma.align||Ma!=null&&Ma.width?vn.replaceSelection(`<p style="text-align:${Ma.align||"initial"}"><img width="${Ma.width?Ma.width+"%":"initial"}" src="${Hs}" alt="${wl||""}" /></p>`):vn.replaceSelection(`<img width="100%" src="${Hs}" alt="${wl||""}" />`):((No=Ma==null?void 0:Ma.type)==null?void 0:No.indexOf("video"))>-1?vn.replaceSelection(`<video width="100%" controls src="${Hs}"></video>`):((yo=Ma==null?void 0:Ma.type)==null?void 0:yo.indexOf("pdf"))>-1?vn.replaceSelection(`<a href="${Hs}?type=${Ma.type}&disposition=inline" target="_blank">${Ma.name}</a>`):Hi.includes(yu)?vn.replaceSelection(`<a href="${Hs}?type=office&disposition=inline" target="_blank">${Ma.name}</a>`):vn.replaceSelection(`[${Ma.name}](${Hs})`),vn.focus();case Ri:const{row:Cl,col:ma,align:Fo}=Mr;let Ul=`
|
|
|
`;for(let $r=0;$r<Cl;$r++){let Ko=[],So=[];for(let Di=0;Di<ma;Di++)$r===1&&So.push(Un[Fo]),Ko.push(" ");$r===1&&(Ul+=`| ${So.join(" | ")} |
|
|
|
`),Ul+=`| ${Ko.join(ma===1?"":" | ")} |
|
|
|
`}return vn.replaceSelection(Ul+`
|
|
|
`),vn.focus();default:throw new Error}},[vn,Ni]),uo=(0,ce.useMemo)(()=>{switch(Ni){case ai:return ce.createElement(ln,{callback:tt,onCancel:Zo});case gi:return ce.createElement(sn.Z,{callback:tt,onCancel:Zo});case Wn:return ce.createElement(Bt.Z,{callback:tt,onCancel:Zo});case Rn:return ce.createElement(qe,{callback:tt,onCancel:Zo});case Ri:return ce.createElement(Dt,{callback:tt,onCancel:Zo});case"maths-latex":return ce.createElement(bn,{showSaveButton:!0,callback:tt});case"inline-latex":return ce.createElement(pn.Z,{showSaveButton:!0,callback:tt});default:return null}},[Ni]);function Zo(){Gi("")}(0,ce.useEffect)(()=>{if(Vi.current){let Mr=function(No){wo=!0,ua=No.pageY},hr=function(){wo=!1},Xn=function(No){if(wo){let yo=No.pageY-ua;yo<0&&(yo=0),yo>300&&(yo=300);let ta=Ut+yo+"px";fr(ta)}},yr=Vi.current,wo=!1,ua=0;return yr.addEventListener("mousedown",Mr),document.addEventListener("mousemove",Xn),document.addEventListener("mouseup",hr),()=>{yr.removeEventListener("mousedown",Mr),document.removeEventListener("mousemove",Xn),document.removeEventListener("mouseup",hr)}}},[vn,Vi]),(0,ce.useEffect)(()=>{fr(Ut)},[Ut]);const ga=hn(Ve),Pa=hn(rr),ia={width:ga,height:Pa},Or=(0,ce.useMemo)(()=>{if(ur){let Mr=new Date(ur),hr=Mr.getHours(),Xn=Mr.getMinutes(),yr=Mr.getSeconds();return hr=hr<10?"0"+hr:hr,Xn=Xn<10?"0"+Xn:Xn,yr=yr<10?"0"+yr:yr,`${hr}:${Xn}:${yr}`}return 0},[ur]),kr=Mr=>{const hr=[];if(On){let Xn=-1;Mr=Mr.replace(/(@▁▁@|@▁@)/g,function(yr,wo,ua){hr.push({multiLine:yr!==Le})})}return hr};function fo(){window.sessionStorage.removeItem(xn),Jr(!1),Qi(0)}function jr(){Jr(!1),Qi(0),vn.setValue(window.sessionStorage.getItem(xn))}(0,ce.useEffect)(()=>{_n[Ni]&&Ni!==ii&&Ni!==Rn&&setTimeout(()=>{const Mr=document.getElementsByClassName("markdown-popup-form")[0],hr=window.innerWidth/2-Mr.offsetWidth/2,Xn=window.innerHeight/2-Mr.offsetHeight/2;Zr(hr),Bi(Xn)},0)},[Ni]);const To=Mr=>{Mr.preventDefault();const hr=Mr.clientX-Ln,Xn=Mr.clientY-co;document.body.onmousemove=yr=>{let wo=yr.clientX-hr,ua=yr.clientY-Xn;const No=document.getElementsByClassName("markdown-popup-form")[0],yo=window.innerWidth-No.offsetWidth,ta=window.innerHeight-No.offsetHeight;wo=Math.max(0,Math.min(wo,yo)),ua=Math.max(0,Math.min(ua,ta)),qa(yr.clientX,yr.clientY,hr,Xn)&&(Zr(wo),Bi(ua))},document.body.onmouseup=function(){document.body.onmousemove=null}},qa=(Mr,hr,Xn,yr)=>{const wo=document.body.clientHeight,ua=document.body.clientWidth;return Mr<20&&Xn>Mr||Mr>ua-20&&Xn<Mr||hr<20&&yr>hr||hr>wo-20&&yr<hr?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return ce.createElement(ce.Fragment,null,ce.createElement("div",{className:"markdown-editor-wrapper",ref:ao},ce.createElement("div",{className:`markdown-editor-container ${ui} ${fn?"on-preview":""} ${tn?"mini":""} ${Ei?"full-screen":""}`,style:ia},ce.createElement(ze,{insertTemp:Vt,watch:fn,fullScreen:Ei,showNullButton:cn,showNullProgramButton:On,onActionCallback:xi,hidetoolBar:ri,extraUse:sr}),ce.createElement("div",{className:"markdown-editor-body"},ce.createElement("div",{className:"codemirror-container"},ce.createElement("textarea",{ref:Po,placeholder:Ai})),fn?ce.createElement("div",{ref:qi,className:"preview-container"},on==="stex"&&ce.createElement(ht,{value:Dr}),on!=="stex"&&ce.createElement(Et.Z,{disabledFill:li,showProgramFill:On,value:Dr})):null))),An?ce.createElement("a",{ref:Vi,className:"editor-resize"}):null,Ni===ii&&ce.createElement(Cn,{callback:tt,onCancel:Zo}),Ni===Rn&&ce.createElement(qe,{callback:tt,onCancel:Zo}),ce.createElement(et.Z,null,_n[Ni]&&Ni!==ii&&Ni!==Rn?ce.createElement(Gt.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Ln,top:co},title:ce.createElement("div",{style:{cursor:"move"},onMouseDown:To},_n[Ni]),open:!0,onCancel:Zo,footer:null,destroyOnClose:!0,width:Ni===Rn?"1200px":null,height:Ni===Rn?"80vh":null,className:"markdown-popup-form"},uo):null))}},28451:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return Me},I:function(){return ze}});var ce=ve(78241),De=ve(8591),_e=ve(92832),Ct=ve(81327),Ze=ve(5871),Ke=ve(5112),Be=ve(3113),mt=ve(77903),ct=ve(59301),He=ve(59301),Et=Object.defineProperty,ht=Object.defineProperties,dt=Object.getOwnPropertyDescriptors,Ae=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,he=(et,$e,gt)=>$e in et?Et(et,$e,{enumerable:!0,configurable:!0,writable:!0,value:gt}):et[$e]=gt,se=(et,$e)=>{for(var gt in $e||($e={}))te.call($e,gt)&&he(et,gt,$e[gt]);if(Ae)for(var gt of Ae($e))ee.call($e,gt)&&he(et,gt,$e[gt]);return et},de=(et,$e)=>ht(et,dt($e));const{useForm:me}=ce.default,we={width:280,marginRight:10},be={labelCol:{span:5},wrapperCol:{span:19}};var Me=({callback:et,onCancel:$e})=>{const[gt]=me();let je=(0,ct.useRef)();function Tt(Nt){je.current.width=gt.getFieldValue("width"),je.current.align=gt.getFieldValue("align"),et(Nt,je.current)}function Qe(Nt,At){if(Nt.status===-1){De.ZP.error(Nt.message);return}gt.setFieldsValue({src:`/api/attachments/${Nt.id}`,type:At.type})}function bt(Nt){let At=Nt.target.files[0];je.current=At,ze(At,Qe)}return He.createElement(ce.default,de(se({form:gt},be),{className:"upload-image-panel",onFinish:Tt,style:{width:470,overflow:"hidden"}}),He.createElement(ce.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},He.createElement("div",{className:"flex-container"},He.createElement(ce.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},He.createElement(_e.default,{style:we})),He.createElement(Ie,{onFileChange:bt}))),He.createElement(ce.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},He.createElement(_e.default,{style:{width:264}})),He.createElement(ce.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},He.createElement(Ct.Z,null,He.createElement(ce.default.Item,{name:"width",style:{margin:0}},He.createElement(Ze.Z,{style:{width:264}})),He.createElement("span",{className:"ml8"},"%"))),He.createElement(ce.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},He.createElement(Ke.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"}]})),He.createElement("aside",null,He.createElement(ce.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},He.createElement(Be.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),He.createElement(Be.ZP,{type:"default",onClick:$e},"\u53D6\u6D88"))))};function Ie({onFileChange:et}){return He.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",He.createElement("input",{type:"file",onChange:et}))}function ze(et,$e){if(!et)throw new String("\u6CA1\u6709\u6587\u4EF6");let gt=new FormData;gt.append("editormd-image-file",et),gt.append("file_param_name","editormd-image-file"),gt.append("byxhr","true");var je=new window.XMLHttpRequest;je.withCredentials=!0,je.addEventListener("load",function(Tt){$e(JSON.parse(Tt.target.responseText),et)},!1),je.addEventListener("error",function(Tt){console.error(Tt)},!1),je.open("POST",`${mt.KI}/api/attachments.json`),je.send(gt)}},79346:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return _e}});var ce=ve(59301),De=ve(4676);class _e extends ce.Component{constructor(Ze){super(Ze);const Ke=window.document;this.node=Ke.createElement("div"),Ke.body.appendChild(this.node)}render(){const{children:Ze}=this.props;return(0,De.createPortal)(Ze,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},23954:function(Pn,an,ve){"use strict";ve.d(an,{SV:function(){return nt},ZP:function(){return Se}});var ce=ve(59301),De=ve(76374);const _e={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"]},Ct={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"]},Ze={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(`
|
|
|
`)}]},Ke={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(`
|
|
|
`)}]},Be={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 mt=ve(53184),ct=ve.n(mt),He=Object.defineProperty,Et=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,dt=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,ee=(Pt,qe,Ue)=>qe in Pt?He(Pt,qe,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):Pt[qe]=Ue,he=(Pt,qe)=>{for(var Ue in qe||(qe={}))Ae.call(qe,Ue)&&ee(Pt,Ue,qe[Ue]);if(dt)for(var Ue of dt(qe))te.call(qe,Ue)&&ee(Pt,Ue,qe[Ue]);return Pt},se=(Pt,qe)=>Et(Pt,ht(qe)),de=(Pt,qe,Ue)=>new Promise((St,vt)=>{var lt=Xt=>{try{un(Ue.next(Xt))}catch($t){vt($t)}},Dt=Xt=>{try{un(Ue.throw(Xt))}catch($t){vt($t)}},un=Xt=>Xt.done?St(Xt.value):Promise.resolve(Xt.value).then(lt,Dt);un((Ue=Ue.apply(Pt,qe)).next())});const me={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"]}},we=(Pt,qe)=>qe.map(Ue=>({label:Ue,kind:Pt.languages.CompletionItemKind.Keyword,insertText:Ue})),be=Pt=>Object.keys(me.tables).map(qe=>({label:qe,kind:Pt.languages.CompletionItemKind.Variable,insertText:qe})),Me=(Pt,qe)=>{const Ue=me.tables[Pt];return Ue?Ue.map(St=>({label:St,kind:qe.languages.CompletionItemKind.Field,insertText:St})):[]};function Ie(Pt,qe,Ue,St,vt){let lt=qe.getWordUntilPosition(Ue),Dt={startLineNumber:Ue.lineNumber,endLineNumber:Ue.lineNumber,startColumn:lt.startColumn,endColumn:lt.endColumn},un=St.map(Xt=>({label:Xt,kind:Pt.languages.CompletionItemKind.Keyword,insertText:Xt,insertTextRules:Pt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Dt}));return vt.map(Xt=>{un.push(se(he({},Xt),{range:Dt}))}),un}var ze=Pt=>{me.languages.map(vt=>(Pt.languages.registerDocumentFormattingEditProvider(vt,{provideDocumentFormattingEdits(lt,Dt,un){return de(this,null,function*(){const Xt=ct()(lt.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:lt.getFullModelRange(),text:Xt}]})}}),vt));const qe=Ze.quickKey.map(vt=>({label:vt.label,kind:Pt.languages.CompletionItemKind.Method,insertText:vt.content,insertTextRules:Pt.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Ue=Ke.quickKey.map(vt=>({label:vt.label,kind:Pt.languages.CompletionItemKind.Method,insertText:vt.content,insertTextRules:Pt.languages.CompletionItemInsertTextRule.InsertAsSnippet})),St=Ct.quickKey.map(vt=>({label:vt.label,kind:Pt.languages.CompletionItemKind.Method,insertText:vt.content,insertTextRules:Pt.languages.CompletionItemInsertTextRule.InsertAsSnippet}));Pt.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(vt,lt){var Dt=vt.getWordUntilPosition(lt),un={startLineNumber:lt.lineNumber,endLineNumber:lt.lineNumber,startColumn:Dt.startColumn,endColumn:Dt.endColumn},Xt=vt.getLineContent(lt.lineNumber).substring(Dt.startColumn-2,Dt.endColumn);return{suggestions:[...Ze.keywords.map($t=>({label:$t,kind:Pt.languages.CompletionItemKind.Function,documentation:$t,insertText:$t,insertTextRules:Pt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:un})),...Ze.quickKey.map($t=>({label:$t.label,kind:Pt.languages.CompletionItemKind.Function,documentation:$t.content,insertText:Xt.startsWith("#")?$t.content.replace(/#/,""):$t.content,insertTextRules:Pt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:un}))]}}}),Pt.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(vt,lt){var Dt=vt.getWordUntilPosition(lt),un={startLineNumber:lt.lineNumber,endLineNumber:lt.lineNumber,startColumn:Dt.startColumn,endColumn:Dt.endColumn};return{suggestions:[..._e.keywords.map(Xt=>({label:Xt,kind:Pt.languages.CompletionItemKind.Function,documentation:Xt,insertText:Xt,insertTextRules:Pt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:un}))]}}}),Pt.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(vt,lt){var Dt=vt.getWordUntilPosition(lt),un={startLineNumber:lt.lineNumber,endLineNumber:lt.lineNumber,startColumn:Dt.startColumn,endColumn:Dt.endColumn},Xt=vt.getLineContent(lt.lineNumber).substring(Dt.startColumn-2,Dt.endColumn);return{suggestions:[...Ct.keywords.map($t=>({label:$t,kind:Pt.languages.CompletionItemKind.Function,documentation:$t,insertText:$t,insertTextRules:Pt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:un})),...Ct.quickKey.map($t=>({label:$t.label,kind:Pt.languages.CompletionItemKind.Function,documentation:$t.content,insertText:Xt.startsWith("#")?$t.content.replace(/#/,""):$t.content,insertTextRules:Pt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:un}))]}}}),Pt.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(vt,lt){var Dt=vt.getWordUntilPosition(lt),un={startLineNumber:lt.lineNumber,endLineNumber:lt.lineNumber,startColumn:Dt.startColumn,endColumn:Dt.endColumn},Xt=vt.getLineContent(lt.lineNumber).substring(Dt.startColumn-2,Dt.endColumn);return{suggestions:[...Be.keywords.map($t=>({label:$t,kind:Pt.languages.CompletionItemKind.Function,documentation:$t,insertText:$t,insertTextRules:Pt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:un})),...Be.quickKey.map($t=>({label:$t.label,kind:Pt.languages.CompletionItemKind.Function,documentation:$t.content,insertText:Xt.startsWith("#")?$t.content.replace(/#/,""):$t.content,insertTextRules:Pt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:un}))]}}}),Pt.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(vt,lt){var Dt=vt.getWordUntilPosition(lt),un={startLineNumber:lt.lineNumber,endLineNumber:lt.lineNumber,startColumn:Dt.startColumn,endColumn:Dt.endColumn},Xt=vt.getLineContent(lt.lineNumber).substring(Dt.startColumn-2,Dt.endColumn);return{suggestions:[...Ke.keywords.map($t=>({label:$t,kind:Pt.languages.CompletionItemKind.Function,documentation:$t,insertText:$t,insertTextRules:Pt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:un})),...Ke.quickKey.map($t=>({label:$t.label,kind:Pt.languages.CompletionItemKind.Function,documentation:$t.content,insertText:Xt.startsWith("#")?$t.content.replace(/#/,""):$t.content,insertTextRules:Pt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:un}))]}}})};const et="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var $e=Object.defineProperty,gt=(Pt,qe,Ue)=>qe in Pt?$e(Pt,qe,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):Pt[qe]=Ue,je=(Pt,qe,Ue)=>gt(Pt,typeof qe!="symbol"?qe+"":qe,Ue);const Tt=class px{constructor(qe,Ue,St){this.placeholder=qe,this.editor=Ue,this.monaco=St,Ue.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return px.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)}};je(Tt,"ID","editor.widget.placeholderHint");var bt=Tt,Nt=ve(96236),At=ve(8591),Zt=ve(6848),Yt=ve(89392),ut=ve(34604),Ge=ve(56102),kt=Object.defineProperty,ln=Object.defineProperties,sn=Object.getOwnPropertyDescriptors,Bt=Object.getOwnPropertySymbols,Gt=Object.prototype.hasOwnProperty,en=Object.prototype.propertyIsEnumerable,Bn=(Pt,qe,Ue)=>qe in Pt?kt(Pt,qe,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):Pt[qe]=Ue,rn=(Pt,qe)=>{for(var Ue in qe||(qe={}))Gt.call(qe,Ue)&&Bn(Pt,Ue,qe[Ue]);if(Bt)for(var Ue of Bt(qe))en.call(qe,Ue)&&Bn(Pt,Ue,qe[Ue]);return Pt},Cn=(Pt,qe)=>ln(Pt,sn(qe)),ft=(Pt,qe)=>{var Ue={};for(var St in Pt)Gt.call(Pt,St)&&qe.indexOf(St)<0&&(Ue[St]=Pt[St]);if(Pt!=null&&Bt)for(var St of Bt(Pt))qe.indexOf(St)<0&&en.call(Pt,St)&&(Ue[St]=Pt[St]);return Ue},En=(Pt,qe,Ue)=>new Promise((St,vt)=>{var lt=Xt=>{try{un(Ue.next(Xt))}catch($t){vt($t)}},Dt=Xt=>{try{un(Ue.throw(Xt))}catch($t){vt($t)}},un=Xt=>Xt.done?St(Xt.value):Promise.resolve(Xt.value).then(lt,Dt);un((Ue=Ue.apply(Pt,qe)).next())});function Vn(Pt){return/^\d+$/.test(Pt)?`${Pt}px`:Pt}function Re(){}let Ce=!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 Ne(Pt=[]){let qe=Pt;if(Array.isArray(Pt)){for(let Ue=0;Ue<Pt.length;Ue++){let St=Pe[Pt[Ue]];if(St)return St}return qe[0]}return Pe[qe]||qe}let ke=null;var Se=Pt=>{var qe=Pt,{width:Ue="100%",height:St="100%",value:vt,language:lt="javascript",style:Dt={},options:un={},overrideServices:Xt={},theme:$t="vs-dark",onEditBlur:wn,isCopy:bn=!1,onSave:pn,autoHeight:Yn=!1,forbidCopy:ai=!1,onChange:Wn=Re,editorDidMount:Rn=Re,onFocus:ii=Re,onBreakPoint:pi=Re,breakPointValue:gi=[],filename:Ri="educoder.txt",errorLine:Ji,errorContent:Un="",highlightLine:$n,openBreakPoint:ti=!1,placeholder:Pi=""}=qe,mi=ft(qe,["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 nr=(0,ce.useRef)(),ji=(0,ce.useRef)({}),Le=(0,ce.useRef)(),si=(0,ce.useRef)(),Hi=(0,ce.useRef)([]),hn=(0,ce.useRef)(!1),ni=(0,ce.useRef)(),vi=(0,ce.useRef)(),Fi=(0,ce.useRef)(!1),[_n,Dn]=(0,ce.useState)(!1);function Ft(){let Wt;return nr.current&&(Wt=new De.Z(Jt=>{for(let hi of Jt)(hi.target.offsetHeight>0||hi.target.offsetWidth>0)&&ji.current.instance.layout()}),Wt.observe(nr.current)),Wt}function Ot(){At.ZP.warning({content:decodeURIComponent(et),key:"monaco-editor-tip"})}const Ve=()=>{let Wt=ji.current.instance;if(vt!=null&&Wt&&_n){const Jt=Wt.getModel();Jt&&vt!==Jt.getValue()&&(Ce=!0,Jt.setValue(vt),Wt.layout(),Ce=!1)}};(0,ce.useEffect)(()=>{const Wt=ut.Z.subscribe("formatDocument",Jt=>{var hi;let ci=ji.current.instance;(hi=ci==null?void 0:ci.getAction)==null||hi.call(ci,"editor.action.formatDocument").run()});return window.updateMonacoValue=Jt=>{Wn(Jt)},Wt},[]),(0,ce.useEffect)(()=>{var Wt;let Jt=ji.current.instance;si.current&&clearTimeout(si.current),si.current=setTimeout(()=>{Ve()},500),vt&&(vt!=null&&vt.length)&&((Wt=Jt==null?void 0:Jt.updateOptions)==null||Wt.call(Jt,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(vt.split(/\r\n|\r|\n/g).length))+3,5)}))},[vt,_n,ji.current]),(0,ce.useEffect)(()=>{if(Ji&&ji.current&&ji.current.instance){let Jt=ji.current.instance;Jt.changeViewZones(function(hi){var ci=document.createElement("div");ci.style.padding="10px 20px",ci.style.width="calc(100% - 20px)",ci.className="my-error-line-wrp",ci.innerHTML=Un,hi.addZone({afterLineNumber:Ji||11,heightInLines:3,domNode:ci})});var Wt={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}};Jt.addOverlayWidget(Wt),Jt.revealPositionInCenter({lineNumber:20,column:1})}},[Ji,ji.current,_n]);const Ut=(Wt="",Jt)=>{if(!Wt||Wt.trim()==="")return!0;const ci=ji.current.instance.getModel().getLineTokens(Jt);let ui=!1;for(let qn=0;qn<2;qn++)ci.getStandardTokenType(qn)===1&&(ui=!0);return ui};(0,ce.useEffect)(()=>{var Wt;const Jt=(Wt=ji.current)==null?void 0:Wt.instance;if(Jt&&_n&&ai){const hi=Jt.onDidBlurEditorWidget(()=>{Fi.current=!1}),ci=Jt.onDidFocusEditorText(()=>{Fi.current=!0});return()=>{hi.dispose(),ci.dispose()}}},[ji.current,_n,ai]),(0,ce.useEffect)(()=>{var Wt;if((Wt=ji.current)!=null&&Wt.instance&&_n&&ti){let Jt=ji.current.instance,hi=Jt.getModel();if(!hi)return;(()=>{var ir;let fn=[],jn=[];const Ei=hi.getAllDecorations();for(let Ni of Ei)Ni.options.className==="highlighted-line"&&(fn.push((ir=Ni==null?void 0:Ni.range)==null?void 0:ir.startLineNumber),jn.push(Ni==null?void 0:Ni.id));if($n===fn[0])return;hi.deltaDecorations(jn,[]);const zi=hi.getLineCount();$n&&$n<=zi&&(Jt.deltaDecorations([],[{range:new ke.Range($n,1,$n,hi.getLineMaxColumn($n)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Jt.revealLineInCenter($n))})();const ui=(ir=!1)=>{var fn;let jn=[],Ei=[];const zi=hi.getAllDecorations();for(let Ni of zi)Ni.options.linesDecorationsClassName==="breakpoints-select"&&(jn.push((fn=Ni==null?void 0:Ni.range)==null?void 0:fn.startLineNumber),Ei.push(Ni==null?void 0:Ni.id));if(ir)return{lines:jn,ids:Ei};pi(jn)},qn=ir=>En(void 0,null,function*(){let fn={range:new ke.Range(ir,1,ir,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield hi.deltaDecorations([],[fn]),ui()}),di=ir=>En(void 0,null,function*(){let fn=[];const jn=Jt.getLineDecorations(ir);for(let Ei of jn)Ei.options.linesDecorationsClassName==="breakpoints-select"&&fn.push(Ei.id);yield hi.deltaDecorations(fn,[]),ui()}),li=ir=>{let fn=Jt.getLineDecorations(ir);for(let jn of fn)if(jn.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Yt.isEqual)(gi,ui(!0).lines)){hi.deltaDecorations(ui(!0).ids,[]);const ir=gi.map(fn=>({range:new ke.Range(fn,1,fn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));hi.deltaDecorations([],ir)}const Ai=Jt.onDidChangeModelContent(ir=>{let fn=Jt.getPosition();if(fn){let jn=fn.lineNumber;clearTimeout(vi.current),vi.current=setTimeout(()=>{Ut(hi.getLineContent(jn),jn)?di(jn):li(jn)?(di(jn),qn(jn)):ui()},100)}}),er=Jt.onMouseDown(ir=>{var fn,jn,Ei;if(ir.target.detail&&((Ei=(jn=(fn=ir.target)==null?void 0:fn.element)==null?void 0:jn.className)!=null&&Ei.includes("line-numbers"))){let zi=ir.target.position.lineNumber;if(Ut(hi.getLineContent(zi),zi))return;li(zi)?di(zi):qn(zi)}}),sr=ir=>{let fn={range:new ke.Range(ir,1,ir,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Hi.current=Jt.deltaDecorations(Hi.current,[fn])},vn=()=>{Hi.current=Jt.deltaDecorations(Hi.current,[])},Nr=Jt.onMouseMove(ir=>{var fn,jn,Ei;if(vn(),ir.target.detail&&((Ei=(jn=(fn=ir.target)==null?void 0:fn.element)==null?void 0:jn.className)!=null&&Ei.includes("line-numbers"))){let zi=ir.target.position.lineNumber;if(Ut(hi.getLineContent(zi),zi))return;sr(zi)}}),Dr=Jt.onMouseLeave(()=>{vn()});return()=>{Ai.dispose(),er.dispose(),Nr.dispose(),Dr.dispose()}}},[ji.current,_n,gi,$n,ti,lt]),(0,ce.useEffect)(()=>{var Wt;(Wt=ji.current)!=null&&Wt.instance&&ti&&ji.current.instance.setPosition({lineNumber:0,column:0})},[$n]);function tn(){let Wt=ji.current.instance;if(Wt){const Jt=Wt.getSelection(),hi=ji.current.pastePos||{},ci=new ke.Range(hi.startLineNumber||Jt.endLineNumber,hi.startColumn||Jt.endColumn,hi.endLineNumber||Jt.endLineNumber,hi.endColumn||Jt.endColumn);setTimeout(()=>{Wt.executeEdits("",[{range:ci,text:""}])},300)}}function xt(Wt){(window.navigator.platform.match("Mac")?Wt.metaKey:Wt.ctrlKey)&&Wt.keyCode==83&&(Wt.preventDefault(),pn())}const rt=()=>{if(Yn&&ji.current.instance){const Wt=ji.current.instance.getContentHeight();On(Wt<St?St:Wt)}else On(St)};function Vt(Wt){var Jt=document.createEvent("MouseEvents");Jt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Wt.dispatchEvent(Jt)}const on=Wt=>{if(!Fi.current)return;const{keyCode:Jt,ctrlKey:hi,metaKey:ci,target:ui,type:qn}=Wt;return(qn==="paste"||(Jt===67||Jt===86)&&(ci||hi))&&ui.nodeName==="TEXTAREA"&&(Ot(),Wt.preventDefault()),!1};function xn(Wt,Jt){var hi=window.URL||window.webkitURL||window,ci=new Blob([Jt]),ui=document.createElementNS("http://www.w3.org/1999/xhtml","a");ui.href=hi.createObjectURL(ci),ui.download=Wt,Vt(ui)}(0,ce.useEffect)(()=>{rt()},[rt]),(0,ce.useEffect)(()=>{nr.current&&!_n&&Promise.all([ve.e(8909),ve.e(3267)]).then(ve.bind(ve,71448)).then(Wt=>{try{ke=Wt,ji.current.instance=ke.editor.create(nr.current,{value:vt,language:Ne(lt),theme:$t,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},Xt);const Jt=ji.current.instance;let ui=[...Nt.BH._menuItems].find(Ai=>Ai[0]._debugName=="EditorContext")[1],qn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],di=(Ai,er)=>{var sr,vn;let Nr=Ai._first;do er.includes((vn=(sr=Nr.element)==null?void 0:sr.command)==null?void 0:vn.id)&&Ai._remove(Nr);while(Nr=Nr.next)};if(Rn(Jt,ke),setTimeout(()=>{rt(),ji.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{xn(Ri||"educoder.txt",Jt.getValue())}})},500),ji.current.subscription=Jt.onDidChangeModelContent(Ai=>{hn.current?clearTimeout(ni.current):(rt(),Wn(Jt.getValue(),Ai)),ni.current=setTimeout(()=>{hn.current=!1},500)}),window.Monaco||ze(ke,Ne(lt)),ai&&(di(ui,qn),nr.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",on),window.removeEventListener("paste",on),window.addEventListener("keydown",on),window.addEventListener("paste",on)),window.Monaco=ke,wn&&Jt.onDidBlurEditorWidget(()=>{wn(Jt.getValue())}),ii&&Jt.onDidFocusEditorText(()=>{ii(Jt.getValue())}),ai)try{Jt.onDidPaste(Ai=>{const er=Jt.getSelection(),sr=ji.current.pastePos||{},vn=new ke.Range(sr.startLineNumber||er.endLineNumber,sr.startColumn||er.endColumn,sr.endLineNumber||er.endLineNumber,sr.endColumn||er.endColumn);Jt.executeEdits("",[{range:Ai.range,text:""}])})}catch(Ai){}let li=Ft();return Pi&&typeof Pi=="string"&&new bt(Pi,Jt,ke),Dn(!0),()=>{const Ai=ji.current.instance;Ai.dispose();const er=Ai.getModel();er&&er.dispose(),ji.current.subscription&&ji.current.subscription.dispose(),li.unobserve(nr.current)}}catch(Jt){}})},[]),(0,ce.useEffect)(()=>{if(ji.current.instance&&_n)return document.addEventListener("keydown",xt,!1),()=>{document.removeEventListener("keydown",xt)}},[pn,_n]),(0,ce.useEffect)(()=>{let Wt=ji.current.instance;if(Wt&&_n){let Jt=Ne(lt);ke.editor.setModelLanguage(Wt.getModel(),Jt)}},[lt,_n]),(0,ce.useEffect)(()=>{ji.current.instance&&_n&&ke.editor.setTheme($t)},[$t,_n]),(0,ce.useEffect)(()=>{let Wt=ji.current.instance;Le.current=un,Wt&&_n&&(Wt.updateOptions(rn({},un)),setTimeout(()=>{Wt.getModel().updateOptions(rn({},un))},200))},[JSON.stringify(un),_n]),(0,ce.useEffect)(()=>{let Wt=ji.current.instance;Wt&&_n&&Wt.layout()},[Ue,St,_n]);const[An,yt]=(0,ce.useState)(Vn(Ue)),[cn,On]=(0,ce.useState)(Vn(St)),ri=Cn(rn({},Dt),{width:An,height:cn,position:"relative"});return ce.createElement("div",{className:"my-monaco-editor",ref:nr,style:ri},bn&&ce.createElement(Ge.CopyToClipboard,{text:vt,onCopy:()=>At.ZP.success("\u590D\u5236\u6210\u529F")},ce.createElement(Zt.Z,{title:"\u590D\u5236\u4EE3\u7801"},ce.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},ce.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function nt({width:Pt="100%",height:qe="100%",original:Ue,modified:St,language:vt,options:lt={}}){const Dt=(0,ce.useRef)(),[un,Xt]=(0,ce.useState)(null);function $t(Yn){let ai;return Dt.current&&(ai=new De.Z(Wn=>{for(let Rn of Wn)(Rn.target.offsetHeight>0||Rn.target.offsetWidth>0)&&Yn.layout()}),ai.observe(Dt.current)),ai}(0,ce.useEffect)(()=>(Dt.current&&Promise.all([ve.e(8909),ve.e(9404)]).then(ve.bind(ve,2550)).then(Yn=>{ke=Yn;const ai=ke.editor.createDiffEditor(Dt.current,Cn(rn({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},lt),{wordWrap:!0}));Xt(ai);let Wn=$t(ai);return()=>{ai.dispose();const Rn=ai.getModel();Rn&&Rn.dispose(),Wn.unobserve(Dt.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,ce.useEffect)(()=>{un&&un.setModel({original:ke.editor.createModel(Ue,vt),modified:ke.editor.createModel(St,vt)})},[Ue,St,vt,un]);const wn=Vn(Pt),bn=Vn(qe),pn={width:wn,height:bn};return ce.createElement("div",{className:"my-diff-editor",ref:Dt,style:pn})}},85057:function(Pn,an,ve){"use strict";ve.d(an,{jL:function(){return Ze},w9:function(){return Gt},QD:function(){return Wn},cQ:function(){return Ge},op:function(){return $t},O5:function(){return Fi},_b:function(){return Ji},t7:function(){return se},Gi:function(){return En},YG:function(){return Cn},qp:function(){return Et},vr:function(){return pi},qE:function(){return pn},Je:function(){return we},wb:function(){return Nt},cq:function(){return ke},tp:function(){return Ae}});var ce=ve(59301),De={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"},_e="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==",Ze=({dataSource:_n=[],img:Dn,imgWidth:Ft=346,title:Ot,sunTitle:Ve,bannerExtraContent:Ut})=>ce.createElement("div",{className:De.banner},ce.createElement("div",{className:De.content},ce.createElement("aside",null,ce.createElement("p",null,ce.createElement("b",null,Ot),ce.createElement("span",null,Ve)),_n.length>0&&ce.createElement("div",{className:De.btns},_n.map((tn,xt)=>ce.createElement("div",{key:xt,onClick:tn.click},tn.name,tn.sign?ce.createElement("img",{src:_e,width:39}):null))),Ut),Dn&&ce.createElement("img",{style:{marginTop:33,marginRight:38},src:Dn,width:Ft}))),Ke={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"},Be=ve(92310),mt=ve.n(Be),ct=ve(89392),Et=({dataSource:_n=[],value:Dn,onChange:Ft,onTitleChange:Ot,className:Ve,title:Ut,titleWidth:tn=41,style:xt={},fontColor:rt="#6A7283",showCount:Vt})=>{const[on,xn]=(0,ce.useState)(0),[An,yt]=(0,ce.useState)(!1),cn=(0,ce.useRef)(null),On=(0,ce.useRef)(null);return(0,ce.useEffect)(()=>{var ri;_n.length!==0&&(((ri=cn==null?void 0:cn.current)==null?void 0:ri.clientHeight)>97?xn(1):xn(0)),_n.length===0&&xn(0),yt(!1)},[_n]),ce.createElement("div",{className:mt()(Ke.row,Ve),style:xt},ce.createElement("div",{onClick:(0,ct.throttle)(()=>Ot==null?void 0:Ot(),2e3),style:{width:tn,marginTop:An?12:4},className:`${Ke.title} ${Ot?"current":""}`},Ut),ce.createElement("div",{className:An?`${Ke.tagsWrap} ${Ke.tagsBorderWrap}`:Ke.tagsWrap},ce.createElement("div",{className:Ke.bar,ref:On,style:on>0?{height:on===1?97:"auto",overflow:on===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},ce.createElement("div",{className:Ke.tag,ref:cn},_n==null?void 0:_n.map(ri=>ce.createElement("span",{onClick:()=>Ft(ri.id),key:ri.id,style:{color:rt},className:Dn===ri.id?Ke.active:""},ce.createElement("span",{title:ri.name,className:Ke.name},ri.name),!!Vt&&ce.createElement("span",{className:Ke.num},ri.count))))),!!on&&ce.createElement(ce.Fragment,null,on===1?ce.createElement("div",{onClick:()=>{var ri;xn(2),((ri=cn==null?void 0:cn.current)==null?void 0:ri.clientHeight)>245?yt(!0):yt(!1)},className:Ke.action},"\u5C55\u5F00",ce.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):ce.createElement("div",{onClick:()=>{On.current.scrollTop=0,xn(1),yt(!1)},className:Ke.action},"\u6536\u8D77",ce.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},ht={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"},Ae=({dataSource:_n=[],value:Dn,onChange:Ft,className:Ot,style:Ve={}})=>ce.createElement("div",{style:Ve,className:mt()(ht.tabs,Ot)},_n.map(Ut=>ce.createElement("span",{onClick:()=>Ft(Ut.id),className:Dn===Ut.id?ht.active:"",key:Ut.id},Ut.name))),te={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=ve(92832),se=({dataSource:_n=[],value:Dn="",onChange:Ft,onInputChange:Ot=()=>{},className:Ve,style:Ut={},placeholder:tn,allowClear:xt=!1})=>{var rt;const[Vt,on]=(0,ce.useState)(""),[xn,An]=(0,ce.useState)("");(0,ce.useEffect)(()=>{var On;let ri=Dn;(On=JSON.stringify(Dn))!=null&&On.includes("{")&&(on(Dn.id),ri=Dn.value||"");try{An(decodeURIComponent(ri||""))}catch(Wt){An(decodeURIComponent(ri||""))}},[Dn]);const yt=()=>{Ft(encodeURIComponent(xn),Vt||null)},cn=On=>{On!==Vt&&(on(On),Ft(encodeURIComponent(xn),On))};return ce.createElement("div",{className:mt()(te.input,Ve),style:Ut},!!_n.length&&ce.createElement("div",{className:te.dropdown},ce.createElement("div",{className:te.text},(rt=_n.find(On=>On.id===Vt))==null?void 0:rt.name,ce.createElement("i",{className:"iconfont icon-zhankai4"}),ce.createElement("b",{className:te.b1}),ce.createElement("b",{className:te.b2})),ce.createElement("div",{className:te.menu},_n.map((On,ri)=>ce.createElement("div",{key:ri,onClick:()=>cn(On.id)},On.name)))),ce.createElement(ee.default,{onPressEnter:yt,value:xn,onChange:On=>{An(On.target.value),Ot(encodeURIComponent(On.target.value),Vt||null)},bordered:!1,placeholder:tn}),ce.createElement("i",{onClick:yt,className:"iconfont icon-sousuo9 font14 pl10 current"}))},de={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"},we=({value:_n,onChange:Dn,className:Ft,total:Ot,pageSize:Ve,style:Ut={}})=>{const tn=_n<2,xt=_n>=Math.ceil(Ot/Ve);return Ot<=Ve?ce.createElement(ce.Fragment,null):ce.createElement("div",{className:mt()(de.quickPager,Ft),style:Ut},ce.createElement("div",{onClick:()=>{tn||Dn(_n-1,"prev")},className:tn?de.disabled:""},"\u4E0A\u4E00\u9875"),ce.createElement("div",{onClick:()=>{xt||Dn(_n+1,"next")},className:xt?de.disabled:""},"\u4E0B\u4E00\u9875"))},be={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"},Me=ve(71418),Ie=ve(6848),ze=ve(13570),et=ve(3294),$e=ve(955),gt=ve(96908),je=ve(57177),Tt=ve(81378),Qe=ve(8797),Nt=({className:_n,dataSource:Dn=[],col:Ft=4,right:Ot,bottom:Ve=23,precision:Ut=0,wrapWidth:tn=1200,trackEventItems:xt,loading:rt})=>{const Vt=Math.floor((tn-(Ft-1)*Ot)/Ft);return ce.createElement(Me.Z,{spinning:rt},ce.createElement("div",{className:mt()(be.list,_n)},!!Dn.length&&Dn.map((on,xn)=>{const{name:An,id:yt,identifier:cn,power:On,cover_image_id:ri,pic:Wt}=on;return ce.createElement("div",{className:be.wrap,key:yt,style:{width:Vt,marginRight:(1+xn)%Ft===0?0:Ot+Ut,marginBottom:Ve}},ce.createElement("a",{target:"_blank",href:`/shixuns/${cn}/challenges`,className:be.li,onClick:Jt=>{Jt.preventDefault(),xt&&(0,$e.L9)([xt]),On&&(0,$e.xg)(`/shixuns/${cn}/challenges`)}},ce.createElement("div",{className:be.img},ce.createElement("img",{className:be.cover,src:`${Wt}`}),on.is_jupyter&&ce.createElement("img",{className:be.sign,src:gt}),on.is_jupyter_lab&&ce.createElement("img",{className:be.sign,src:je}),on.is_unity_3d&&ce.createElement("img",{className:be.sign,src:Tt})),ce.createElement("div",{className:be.name},ce.createElement(Ie.Z,{title:An||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},ce.createElement("span",{className:be.e},An||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),ce.createElement("div",{className:be.tags},ce.createElement(Ie.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},ce.createElement("span",null,ce.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),ce.createElement("span",null,on.challenges_count))),!!on.myshixuns_count&&ce.createElement(Ie.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},ce.createElement("span",null,ce.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),ce.createElement("span",null,on.myshixuns_count))),ce.createElement(Ie.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},ce.createElement("span",null,ce.createElement("span",null,on.level))),ce.createElement("div",{className:be.rate},ce.createElement(ze.Z,{allowHalf:!0,disabled:!0,defaultValue:on.score_info}),ce.createElement("span",null,"\xA0",on.score_info?`${on.score_info}\u5206`:"5\u5206")))),!On&&ce.createElement("div",{className:be.lockWrap},ce.createElement("img",{src:`${et.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),ce.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!Dn.length&&ce.createElement(Qe.Z,null)))},At={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"},Zt=ve(24065),Yt=ve(59301),Ge=({className:_n,dataSource:Dn=[],col:Ft=4,right:Ot,bottom:Ve=23,precision:Ut=0,wrapWidth:tn=1200,trackEventItems:xt,loading:rt,onRemove:Vt=()=>{},isCurrent:on=!0,showAlias:xn=!1})=>{const An=Math.floor((tn-(Ft-1)*Ot)/Ft),yt=[{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 Yt.createElement(Me.Z,{spinning:rt},Yt.createElement("div",{className:mt()(At.list,_n)},!!(Dn!=null&&Dn.length)&&(Dn==null?void 0:Dn.map((cn,On)=>{var ri;const{name:Wt,id:Jt,identifier:hi,featured:ci,school_name:ui,image_url:qn,excellent:di,is_plan:li}=cn;return Yt.createElement("div",{key:Jt,className:At.wrap,style:{width:An,marginRight:(1+On)%Ft===0?0:Ot+Ut,marginBottom:Ve}},Yt.createElement("a",{className:At.li,onClick:Ai=>{Ai.preventDefault(),Ai.stopPropagation(),xt&&(0,$e.L9)([xt]),(0,$e.xg)(`/paths/${hi}`)}},Yt.createElement("div",{className:At.img},Yt.createElement("img",{className:At.cover,src:`${qn}`}),on&&(0,Zt.bg)()&&(cn==null?void 0:cn.studying)&&Yt.createElement("div",{className:`${At.movebq} user-path-items`,onClick:Ai=>{Ai.stopPropagation(),Vt(cn)}},Yt.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),Yt.createElement("span",{className:"c-red"},"\u79FB\u9664")),(ri=cn==null?void 0:cn.subject_tags)==null?void 0:ri.map((Ai,er)=>{var sr,vn;if(er===0){const Dr=(sr=yt.find(ir=>ir.name==Ai))==null?void 0:sr.swimg;return Yt.createElement("img",{className:At.sign,src:Dr,style:{left:"-4px"}})}const Nr=(vn=yt.find(Dr=>Dr.name==Ai))==null?void 0:vn.ptimg;return Yt.createElement("img",{className:At.sign,src:Nr,style:{left:`${48+52*(er-1)+2*er}px`}})}),Yt.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(cn==null?void 0:cn.excellent)&&Yt.createElement("div",{className:At.bq},"\u5F00\u653E\u8BFE\u7A0B"))),Yt.createElement("div",{className:At.name},Yt.createElement(Ie.Z,{title:xn&&(cn!=null&&cn.excellent_alias_name)?Yt.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${Wt}`,Yt.createElement("br",null),Yt.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${cn==null?void 0:cn.excellent_alias_name}`)):Wt},Yt.createElement("span",{className:At.e},xn&&(cn==null?void 0:cn.excellent_alias_name)||Wt))),Yt.createElement(Ie.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${ui}`},Yt.createElement("div",{className:At.unit},Yt.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),ui)),Yt.createElement("div",{className:At.tags},Yt.createElement("div",null,Yt.createElement(Ie.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},Yt.createElement("span",null,Yt.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),Yt.createElement("span",null,cn.stages_count))),Yt.createElement(Ie.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},Yt.createElement("span",null,Yt.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),Yt.createElement("span",null,cn.members_count)))))))})),!Dn.length&&Yt.createElement(Qe.Z,null)))},kt={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",sn=ve(59301),Gt=({className:_n,dataSource:Dn=[],col:Ft=4,right:Ot,bottom:Ve=23,precision:Ut=0,wrapWidth:tn=1200,trackEventItems:xt,loading:rt,handleVery:Vt=()=>!0})=>{const on=Math.floor((tn-(Ft-1)*Ot)/Ft);return sn.createElement(Me.Z,{spinning:rt},sn.createElement("div",{className:mt()(kt.list,_n)},!!Dn.length&&Dn.map((xn,An)=>{const{subject_identifier:yt,id:cn,identifier:On,power:ri}=xn,Wt=xn.is_public!=0&&xn.is_public;return sn.createElement("div",{className:kt.wrap,key:cn,style:{width:on,marginRight:(1+An)%Ft===0?0:Ot+Ut,marginBottom:Ve}},sn.createElement("a",{className:kt.li,onClick:Jt=>{Jt.preventDefault(),Vt(xn==null?void 0:xn.first_category_url)&&(xt&&(0,$e.L9)([xt]),(0,$e.xg)(xn.first_category_url))}},sn.createElement("div",{className:kt.top},sn.createElement(Ie.Z,{title:xn.name},sn.createElement("div",{className:kt.name},xn.name)),sn.createElement("img",{className:kt.img,src:et.Z.IMG_SERVER+"/images/"+xn.avatar_url}),sn.createElement("div",{className:kt.text,title:xn.creator},xn.creator),yt&&sn.createElement("div",{className:kt.btns},sn.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),sn.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),Wt&&sn.createElement("div",{className:kt.sign},"\u516C\u5F00")),sn.createElement("div",{className:kt.bottom},xn.visits>0&&sn.createElement(Ie.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},sn.createElement("span",null,sn.createElement("i",{className:"iconfont icon-liulanyan"}),sn.createElement("span",null,xn.visits))),xn.course_members_count>0&&sn.createElement(Ie.Z,{title:"\u6210\u5458",placement:"bottom"},sn.createElement("span",null,sn.createElement("i",{className:"iconfont icon-chengyuan"}),xn.course_members_count)),xn.tasks_count>0&&sn.createElement(Ie.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},sn.createElement("span",null,sn.createElement("i",{className:"iconfont icon-zuoye"}),xn.tasks_count)),xn.is_end?sn.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):sn.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!xn.is_accessible&&sn.createElement("div",{className:kt.lockWrap},sn.createElement("img",{src:`${et.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),sn.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!Dn.length&&sn.createElement(Qe.Z,null)))},en={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"},Bn=ve(89070),Cn=({dataSource:_n=[],value:Dn,onChange:Ft,className:Ot,style:Ve={},tabBarExtraContent:Ut})=>ce.createElement("div",{className:mt()(en.tabs,Ot),style:Ve},ce.createElement("div",{className:en.tabsWrap},_n.map((tn,xt)=>!(tn!=null&&tn.hide)&&ce.createElement("aside",{className:en.tab,onClick:()=>{Ft(tn.id),tn.link&&Bn.history.push(tn.link)},key:xt},ce.createElement("div",{className:Dn===tn.id?en.active:""},tn.name),(tn==null?void 0:tn.resetCount)==null&&(tn==null?void 0:tn.total)!==void 0&&ce.createElement("span",null,"\uFF08",tn==null?void 0:tn.total,"\uFF09"),(tn==null?void 0:tn.resetCount)!==void 0&&(tn==null?void 0:tn.total)!==void 0&&ce.createElement(Ie.Z,{title:(tn==null?void 0:tn.tip)!=null?tn==null?void 0:tn.tip:""},ce.createElement("span",{style:{color:"#9096A3"}},"\uFF08",ce.createElement("span",{style:{color:"#000"}},tn==null?void 0:tn.resetCount),"/",ce.createElement("span",null,tn==null?void 0:tn.total),"\uFF09"))))),ce.createElement("div",{className:en.tabBar},Ut)),En=({className:_n,style:Dn={},children:Ft})=>ce.createElement("div",{className:mt()(_n),style:Dn},Ft),Vn={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"},Re=ve(38854),Ce=ve(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 ke=({sortValue:_n,dropValue:Dn,className:Ft,onSort:Ot,onDrop:Ve,dataSource:Ut=Pe})=>{var tn;return ce.createElement("div",{className:mt()(Vn.orderWrap,Ft)},ce.createElement(Re.Z,{dropdownRender:()=>ce.createElement(Ce.default,null,Ut.map((xt,rt)=>ce.createElement(Ce.default.Item,{key:rt,onClick:()=>Ve(xt.id)},xt.name)))},ce.createElement("span",{className:Vn.orderTextWrap},(tn=Ut.find(xt=>Dn===xt.id))==null?void 0:tn.name)),ce.createElement("span",{className:Vn.orderIconWrap},ce.createElement("span",{className:Vn.orderAsc},ce.createElement("i",{className:_n==="asc"?`iconfont icon-sanjiaoxing-up font12 ${Vn.cursorPointer} ${Vn.active}`:`iconfont icon-sanjiaoxing-up font12 ${Vn.cursorPointer}`,onClick:()=>Ot(_n==="asc"?"desc":"asc")})),ce.createElement("span",{className:Vn.orderDesc},ce.createElement("i",{className:_n==="desc"?`iconfont icon-sanjiaoxing-down font12 ${Vn.cursorPointer} ${Vn.active}`:`iconfont icon-sanjiaoxing-down font12 ${Vn.cursorPointer}`,onClick:()=>Ot(_n==="asc"?"desc":"asc")}))))},Se={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"},nt=ve(3113),Pt=Object.defineProperty,qe=Object.getOwnPropertySymbols,Ue=Object.prototype.hasOwnProperty,St=Object.prototype.propertyIsEnumerable,vt=(_n,Dn,Ft)=>Dn in _n?Pt(_n,Dn,{enumerable:!0,configurable:!0,writable:!0,value:Ft}):_n[Dn]=Ft,lt=(_n,Dn)=>{for(var Ft in Dn||(Dn={}))Ue.call(Dn,Ft)&&vt(_n,Ft,Dn[Ft]);if(qe)for(var Ft of qe(Dn))St.call(Dn,Ft)&&vt(_n,Ft,Dn[Ft]);return _n},Dt=(_n,Dn)=>{var Ft={};for(var Ot in _n)Ue.call(_n,Ot)&&Dn.indexOf(Ot)<0&&(Ft[Ot]=_n[Ot]);if(_n!=null&&qe)for(var Ot of qe(_n))Dn.indexOf(Ot)<0&&St.call(_n,Ot)&&(Ft[Ot]=_n[Ot]);return Ft},un=(_n,Dn,Ft)=>new Promise((Ot,Ve)=>{var Ut=rt=>{try{xt(Ft.next(rt))}catch(Vt){Ve(Vt)}},tn=rt=>{try{xt(Ft.throw(rt))}catch(Vt){Ve(Vt)}},xt=rt=>rt.done?Ot(rt.value):Promise.resolve(rt.value).then(Ut,tn);xt((Ft=Ft.apply(_n,Dn)).next())}),$t=_n=>{var Dn=_n,{className:Ft,style:Ot,children:Ve,loading:Ut=!1,openLoading:tn,onClick:xt=()=>{},size:rt="middle",shape:Vt="round"}=Dn,on=Dt(Dn,["className","style","children","loading","openLoading","onClick","size","shape"]);const[xn,An]=(0,ce.useState)(!1);return ce.createElement(nt.ZP,lt({onClick:(0,ct.throttle)(yt=>un(void 0,null,function*(){tn&&An(!0);try{yield xt(yt)}catch(cn){console.log("error",cn)}tn&&An(!1)}),2e3,{leading:!0,trailing:!1}),className:mt()(Se.btn,Se[`${rt}-${Vt}`],Ft),style:Ot,size:rt,shape:Vt,loading:xn||Ut},on),Ve)},wn={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"},pn=({className:_n,style:Dn,children:Ft=null,onClick:Ot,title:Ve})=>ce.createElement("div",{className:mt()(wn.head,_n),style:Dn},ce.createElement("span",{className:"primary-hover",onClick:Ot},ce.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),ce.createElement("b",{title:Ve},Ve),ce.createElement("div",{className:wn.node},Ft)),Yn={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"},Wn=({confirmShow:_n=!0,confirmTitle:Dn,confirmClick:Ft,cancelShow:Ot=!0,cancelTitle:Ve,cancelClick:Ut,className:tn,style:xt,confirmLoading:rt=!1})=>ce.createElement("div",{className:mt()(Yn.btns,tn),style:xt},_n&&ce.createElement(nt.ZP,{loading:rt,onClick:Ft,type:"primary",className:Yn.confirm},Dn),Ot&&ce.createElement(nt.ZP,{onClick:Ut,className:Yn.cancel},Ve)),Rn={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:_n,style:Dn={},LeftContent:Ft,children:Ot,RightContent:Ve})=>ce.createElement("div",{className:mt()(Rn.fixedBottom,_n),style:Dn},ce.createElement("div",{className:Rn.wrap},ce.createElement("div",{className:Rn.left},Ft),ce.createElement("div",{className:Rn.center},Ot),ce.createElement("div",{className:Rn.right},Ve))),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"},Ji=({className:_n,style:Dn={},dataSource:Ft=[]})=>ce.createElement("div",{className:mt()(gi.crumbs,_n),style:Dn},Ft.map((Ot,Ve)=>Ve<Ft.length-1?ce.createElement(ce.Fragment,{key:Ve},Ot.path||Ot.onClick?ce.createElement("span",{className:gi.hover,onClick:Ot!=null&&Ot.onClick?Ot.onClick:()=>Bn.history.push(Ot.path)},Ot.name):ce.createElement("span",null,Ot.name),ce.createElement("span",null,"\xA0",">","\xA0")):ce.createElement("span",{key:Ve,style:{color:"#5F6368"}},Ot.name))),Un=ve(31797),$n=Object.defineProperty,ti=Object.defineProperties,Pi=Object.getOwnPropertyDescriptors,mi=Object.getOwnPropertySymbols,nr=Object.prototype.hasOwnProperty,ji=Object.prototype.propertyIsEnumerable,Le=(_n,Dn,Ft)=>Dn in _n?$n(_n,Dn,{enumerable:!0,configurable:!0,writable:!0,value:Ft}):_n[Dn]=Ft,si=(_n,Dn)=>{for(var Ft in Dn||(Dn={}))nr.call(Dn,Ft)&&Le(_n,Ft,Dn[Ft]);if(mi)for(var Ft of mi(Dn))ji.call(Dn,Ft)&&Le(_n,Ft,Dn[Ft]);return _n},Hi=(_n,Dn)=>ti(_n,Pi(Dn)),hn=(_n,Dn)=>{var Ft={};for(var Ot in _n)nr.call(_n,Ot)&&Dn.indexOf(Ot)<0&&(Ft[Ot]=_n[Ot]);if(_n!=null&&mi)for(var Ot of mi(_n))Dn.indexOf(Ot)<0&&ji.call(_n,Ot)&&(Ft[Ot]=_n[Ot]);return Ft};const{Countdown:ni}=Un.default;var Fi=_n=>{var Dn=_n,{onChange:Ft}=Dn,Ot=hn(Dn,["onChange"]);const[Ve,Ut]=(0,ce.useState)(null);(0,ce.useEffect)(()=>{typeof Ve=="number"&&Ve>=0&&Ft(Ve)},[Ve]);const tn=xt=>{const rt=Math.floor(xt/1e3);Ut(rt)};return ce.createElement(ni,Hi(si({},Ot),{onChange:tn}))}},58856:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return De}});var ce=ve(59301);function De(_e,Ct){const Ze=(0,ce.useRef)();(0,ce.useEffect)(()=>{Ze.current=_e}),(0,ce.useEffect)(()=>{function Ke(){Ze.current()}if(Ct!==null){let Be=setInterval(Ke,Ct);return()=>clearInterval(Be)}},[Ct])}},74440:function(Pn,an,ve){"use strict";ve.d(an,{h:function(){return ce}});var ce=(De=>(De[De.NOMATCH=-1]="NOMATCH",De[De.OK=0]="OK",De[De.TIMEOUT=2]="TIMEOUT",De[De.PODFAILURE=3]="PODFAILURE",De[De.COMPILEFAILURE=4]="COMPILEFAILURE",De[De.EXECUTEFAILURE=5]="EXECUTEFAILURE",De[De.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",De))(ce||{})},88264:function(Pn,an,ve){"use strict";ve.d(an,{H7:function(){return te},MK:function(){return Ae},MU:function(){return He},X6:function(){return ht},bM:function(){return ct},fi:function(){return ee},fu:function(){return mt},n4:function(){return he},rX:function(){return dt},vl:function(){return se},zO:function(){return Et}});var ce=ve(99064),De=Object.defineProperty,_e=Object.getOwnPropertySymbols,Ct=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable,Ke=(de,me,we)=>me in de?De(de,me,{enumerable:!0,configurable:!0,writable:!0,value:we}):de[me]=we,Be=(de,me)=>{for(var we in me||(me={}))Ct.call(me,we)&&Ke(de,we,me[we]);if(_e)for(var we of _e(me))Ze.call(me,we)&&Ke(de,we,me[we]);return de};function mt(de,me){return(0,ce.U2)(`myproblems/${de}.json`,Be({hidePopLogin:!0},me||{}))}function ct(de,me){return(0,ce.v_)(`myproblems/${de}/code_submit.json`,me)}function He(de,me){return(0,ce.v_)(`myproblems/${de}/code_debug.json`,me)}function Et(de,me){return me.language&&(me.language=encodeURIComponent(me.language)),(0,ce.U2)(`myproblems/${de}/submit_records.json`,me)}function ht(de){return(0,ce.U2)("myproblems/record_detail.json",{id:de})}function dt(de,me){return(0,ce.U2)(`myproblems/${de}/result.json`,{mode:me})}function Ae(de,me){return(0,ce.v_)(`myproblems/${de}/add_notes.json`,me)}function te(de,me){return(0,ce.v_)(`myproblems/${de}/restore_initial_code.json`,me)}function ee(de){return(0,ce.v_)(`myproblems/${de}/sync_code.json`)}function he(de,me){return(0,ce.v_)(`myproblems/${de}/update_code.json`,me)}function se(de,me){return(0,ce.v_)(`discusses/${de}/plus.json`,me)}},92744:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return Mc}});var ce=ve(59301),De={flex_box_center:"flex_box_center___bZaL5",flex_space_between:"flex_space_between___oaJSq",flex_box_vertical_center:"flex_box_vertical_center____hsuP",flex_box_center_end:"flex_box_center_end___ZYbPQ",flex_box_column:"flex_box_column___nE_62",wrap:"wrap___ulhwR",left:"left___kyWln",title:"title___jsO1D",total:"total___GEhiU",list:"list___u9dBZ",name:"name___Wxggs",b:"b___Y15YO",r:"r___mKQoe",l:"l___uelFD",tag:"tag___Mpkbg",right:"right___mQ3dU",examName:"examName___Na1r8",t:"t___IgCWK",num:"num___CXI8j",topWarp:"topWarp___Kicpu",head:"head___jx3W8",so:"so___qYW7F",btn:"btn___EMJDz",content:"content___sHGsV",titleWrap:"titleWrap___I__GR",single:"single___K5iv9",analysis:"analysis___NoAuR",text:"text___xESW2",modalColumn:"modalColumn___I_tK_",modalRow:"modalRow___lyw_U",sup:"sup___HSz3Z",popover:"popover___kE8aI"},_e=ve(78241),Ct=ve(6848),Ze=ve(3113),Ke=ve(43418),Be=ve(5871),mt=ve(8591),ct=ve(92832),He=ve(28103),Et=ve(24905),ht=ve(95237),dt=ve(43604),Ae=ve(58421),te=ve(60324),ee=Object.defineProperty,he=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,me=(Kt,_t,mn)=>_t in Kt?ee(Kt,_t,{enumerable:!0,configurable:!0,writable:!0,value:mn}):Kt[_t]=mn,we=(Kt,_t)=>{for(var mn in _t||(_t={}))se.call(_t,mn)&&me(Kt,mn,_t[mn]);if(he)for(var mn of he(_t))de.call(_t,mn)&&me(Kt,mn,_t[mn]);return Kt};const be=Kt=>React.createElement("svg",we({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},Kt),React.createElement("title",null,"\u7F16\u7EC4 6"),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("rect",{fill:"#E4E6FD",width:34,height:34,rx:10}),React.createElement("g",{fillRule:"nonzero"},React.createElement("path",{d:"M13.808 11.448a.558.558 0 0 1 0 .788l-1.564 1.565a.558.558 0 1 1-.789-.79l1.564-1.563a.558.558 0 0 1 .79 0Zm9.882 2.462a.558.558 0 0 1-.789 0l-1.564-1.563a.558.558 0 1 1 .789-.789l1.564 1.564a.556.556 0 0 1 0 .788Z",fill:"#6678EB"}),React.createElement("path",{d:"M21.753 21.707a5.937 5.937 0 1 0-8.58.015l-.937.936a.558.558 0 1 0 .789.788l.995-.994a5.91 5.91 0 0 0 3.436 1.095c1.287 0 2.48-.41 3.452-1.106l.992.992a.558.558 0 1 0 .789-.789l-.936-.937Z",fill:"#6678EB"}),React.createElement("path",{d:"m20.858 18.95-3.024-1.745v-2.054a.558.558 0 1 0-1.117 0v2.351c0 .064.011.126.031.184a.551.551 0 0 0 .258.33l3.293 1.9a.557.557 0 0 0 .559-.966Z",fill:"#FFF"}))));var Me="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSIjRTRFNkZEIiB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIvPjxnIGZpbGwtcnVsZT0ibm9uemVybyI+PHBhdGggZD0iTTEzLjgwOCAxMS40NDhhLjU1OC41NTggMCAwIDEgMCAuNzg4bC0xLjU2NCAxLjU2NWEuNTU4LjU1OCAwIDEgMS0uNzg5LS43OWwxLjU2NC0xLjU2M2EuNTU4LjU1OCAwIDAgMSAuNzkgMFptOS44ODIgMi40NjJhLjU1OC41NTggMCAwIDEtLjc4OSAwbC0xLjU2NC0xLjU2M2EuNTU4LjU1OCAwIDEgMSAuNzg5LS43ODlsMS41NjQgMS41NjRhLjU1Ni41NTYgMCAwIDEgMCAuNzg4WiIgZmlsbD0iIzY2NzhFQiIvPjxwYXRoIGQ9Ik0yMS43NTMgMjEuNzA3YTUuOTM3IDUuOTM3IDAgMSAwLTguNTguMDE1bC0uOTM3LjkzNmEuNTU4LjU1OCAwIDEgMCAuNzg5Ljc4OGwuOTk1LS45OTRhNS45MSA1LjkxIDAgMCAwIDMuNDM2IDEuMDk1YzEuMjg3IDAgMi40OC0uNDEgMy40NTItMS4xMDZsLjk5Mi45OTJhLjU1OC41NTggMCAxIDAgLjc4OS0uNzg5bC0uOTM2LS45MzdaIiBmaWxsPSIjNjY3OEVCIi8+PHBhdGggZD0ibTIwLjg1OCAxOC45NS0zLjAyNC0xLjc0NXYtMi4wNTRhLjU1OC41NTggMCAxIDAtMS4xMTcgMHYyLjM1MWMwIC4wNjQuMDExLjEyNi4wMzEuMTg0YS41NTEuNTUxIDAgMCAwIC4yNTguMzNsMy4yOTMgMS45YS41NTcuNTU3IDAgMCAwIC41NTktLjk2NloiIGZpbGw9IiNGRkYiLz48L2c+PC9nPjwvc3ZnPg==",Ie=ve(85149),ze=ve(89070),et=ve(955),$e=ve(99064),gt=Object.defineProperty,je=Object.getOwnPropertySymbols,Tt=Object.prototype.hasOwnProperty,Qe=Object.prototype.propertyIsEnumerable,bt=(Kt,_t,mn)=>_t in Kt?gt(Kt,_t,{enumerable:!0,configurable:!0,writable:!0,value:mn}):Kt[_t]=mn,Nt=(Kt,_t)=>{for(var mn in _t||(_t={}))Tt.call(_t,mn)&&bt(Kt,mn,_t[mn]);if(je)for(var mn of je(_t))Qe.call(_t,mn)&&bt(Kt,mn,_t[mn]);return Kt};const At=Kt=>React.createElement("svg",Nt({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},Kt),React.createElement("title",null,"\u7F16\u7EC4 12"),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("rect",{width:34,height:34,rx:10,fill:"#EAF3F4"}),React.createElement("path",{d:"M25.905 15.37a.775.775 0 0 0-.626-.529l-4.814-.7-2.152-4.362a.776.776 0 0 0-1.392 0l-2.153 4.363-4.814.699a.775.775 0 0 0-.43 1.323l3.484 3.396-.823 4.794a.777.777 0 0 0 1.126.818l4.306-2.264 4.305 2.264a.778.778 0 0 0 .817-.059.777.777 0 0 0 .31-.759l-.823-4.794 3.483-3.396a.777.777 0 0 0 .196-.795Z",fill:"#21C0A6",fillRule:"nonzero"})));var Zt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIgZmlsbD0iI0VBRjNGNCIvPjxwYXRoIGQ9Ik0yNS45MDUgMTUuMzdhLjc3NS43NzUgMCAwIDAtLjYyNi0uNTI5bC00LjgxNC0uNy0yLjE1Mi00LjM2MmEuNzc2Ljc3NiAwIDAgMC0xLjM5MiAwbC0yLjE1MyA0LjM2My00LjgxNC42OTlhLjc3NS43NzUgMCAwIDAtLjQzIDEuMzIzbDMuNDg0IDMuMzk2LS44MjMgNC43OTRhLjc3Ny43NzcgMCAwIDAgMS4xMjYuODE4bDQuMzA2LTIuMjY0IDQuMzA1IDIuMjY0YS43NzguNzc4IDAgMCAwIC44MTctLjA1OS43NzcuNzc3IDAgMCAwIC4zMS0uNzU5bC0uODIzLTQuNzk0IDMuNDgzLTMuMzk2YS43NzcuNzc3IDAgMCAwIC4xOTYtLjc5NVoiIGZpbGw9IiMyMUMwQTYiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvZz48L3N2Zz4=",Yt=Object.defineProperty,ut=Object.getOwnPropertySymbols,Ge=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable,ln=(Kt,_t,mn)=>_t in Kt?Yt(Kt,_t,{enumerable:!0,configurable:!0,writable:!0,value:mn}):Kt[_t]=mn,sn=(Kt,_t)=>{for(var mn in _t||(_t={}))Ge.call(_t,mn)&&ln(Kt,mn,_t[mn]);if(ut)for(var mn of ut(_t))kt.call(_t,mn)&&ln(Kt,mn,_t[mn]);return Kt};const Bt=Kt=>React.createElement("svg",sn({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},Kt),React.createElement("title",null,"\u9898\u76EE"),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("rect",{fill:"#E7F3FF",width:34,height:34,rx:10}),React.createElement("g",{fill:"#4C6FFF",fillRule:"nonzero"},React.createElement("path",{d:"m23.719 13.325-4.098-3.94c-.097-.13-.225-.162-.355-.162-.129 0-.258.064-.387.161l-7.55 7.753c-.065.065-.098.162-.13.227l-1.032 5.427c-.033.194.032.323.16.484.13.13.227.162.389.162h.096l4.776-1.099c.097-.032.194-.064.258-.161l7.841-8.108c.194-.162.194-.517.033-.744h-.001Zm-8.1 8.044a.534.534 0 0 1-.386.162.56.56 0 0 1-.388-.162l-3-2.81c-.226-.194-.226-.517-.033-.743.194-.227.517-.227.743-.033l3 2.811c.259.226.291.55.065.776ZM17 22.92h6.844v1.055H17z"}))));var Gt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSIjRTdGM0ZGIiB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIvPjxnIGZpbGw9IiM0QzZGRkYiIGZpbGwtcnVsZT0ibm9uemVybyI+PHBhdGggZD0ibTIzLjcxOSAxMy4zMjUtNC4wOTgtMy45NGMtLjA5Ny0uMTMtLjIyNS0uMTYyLS4zNTUtLjE2Mi0uMTI5IDAtLjI1OC4wNjQtLjM4Ny4xNjFsLTcuNTUgNy43NTNjLS4wNjUuMDY1LS4wOTguMTYyLS4xMy4yMjdsLTEuMDMyIDUuNDI3Yy0uMDMzLjE5NC4wMzIuMzIzLjE2LjQ4NC4xMy4xMy4yMjcuMTYyLjM4OS4xNjJoLjA5Nmw0Ljc3Ni0xLjA5OWMuMDk3LS4wMzIuMTk0LS4wNjQuMjU4LS4xNjFsNy44NDEtOC4xMDhjLjE5NC0uMTYyLjE5NC0uNTE3LjAzMy0uNzQ0aC0uMDAxWm0tOC4xIDguMDQ0YS41MzQuNTM0IDAgMCAxLS4zODYuMTYyLjU2LjU2IDAgMCAxLS4zODgtLjE2MmwtMy0yLjgxYy0uMjI2LS4xOTQtLjIyNi0uNTE3LS4wMzMtLjc0My4xOTQtLjIyNy41MTctLjIyNy43NDMtLjAzM2wzIDIuODExYy4yNTkuMjI2LjI5MS41NS4wNjUuNzc2Wk0xNyAyMi45Mmg2Ljg0NHYxLjA1NUgxN3oiLz48L2c+PC9nPjwvc3ZnPg==",en=ve(42678),Bn=ve(12290),rn=ve(65158),Cn=ve(10672),ft={wrap:"wrap___OIoOI",modal:"modal___Z3hfU",titleWrap:"titleWrap___aK3oG",required:"required___NHoO7",title:"title___uxb1R",colorGray:"colorGray___O8YPg",choiceWrap:"choiceWrap___t51sb",answer:"answer___vsBnh",activeAnswer:"activeAnswer___AJN4p",deleteIcon:"deleteIcon___WvOJZ",addIcon:"addIcon___UyeIs",editorWrap:"editorWrap___uqcFU",htmlWrap:"htmlWrap___GcBNL",radio:"radio___e8qQ5",color333:"color333___PLzVK",color999:"color999___v3EY0",fold:"fold___OfvPe",head:"head___EejYX",collapseWrapper:"collapseWrapper___sQyVD",panelHeader:"panelHeader___Ivicf",open:"open___aEOQE",close:"close___z4P5H",inputBorder:"inputBorder___ix67O",keywordTag:"keywordTag___iGx08",scoreByBlankRadio:"scoreByBlankRadio___Kwu7q"},En=ve(59301),Vn=Object.defineProperty,Re=Object.defineProperties,Ce=Object.getOwnPropertyDescriptors,Pe=Object.getOwnPropertySymbols,Ne=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable,Se=(Kt,_t,mn)=>_t in Kt?Vn(Kt,_t,{enumerable:!0,configurable:!0,writable:!0,value:mn}):Kt[_t]=mn,nt=(Kt,_t)=>{for(var mn in _t||(_t={}))Ne.call(_t,mn)&&Se(Kt,mn,_t[mn]);if(Pe)for(var mn of Pe(_t))ke.call(_t,mn)&&Se(Kt,mn,_t[mn]);return Kt},Pt=(Kt,_t)=>Re(Kt,Ce(_t)),qe=(Kt,_t)=>{var mn={};for(var it in Kt)Ne.call(Kt,it)&&_t.indexOf(it)<0&&(mn[it]=Kt[it]);if(Kt!=null&&Pe)for(var it of Pe(Kt))_t.indexOf(it)<0&&ke.call(Kt,it)&&(mn[it]=Kt[it]);return mn};const Ue=null,St=(Kt,_t)=>{var mn=Kt,{globalSetting:it,loading:yn,dispatch:zr,isEdit:Bo,editData:Ir}=mn,_r=qe(mn,["globalSetting","loading","dispatch","isEdit","editData"]);const[jo,po]=(0,ce.useState)(""),[Go,ho]=(0,ce.useState)(""),[_i,$i]=(0,ce.useState)([]),[Tr,Ar]=(0,ce.useState)(""),[or,Cr]=(0,ce.useState)(),[Lo,Rr]=(0,ce.useState)(!1),[tr,cr]=(0,ce.useState)({}),[lr,Ii]=(0,ce.useState)([]);(0,ce.useEffect)(()=>{!Ir||!Bo||(po(Ir==null?void 0:Ir.name),ho(Ir==null?void 0:Ir.analysis),Cr(Ir==null?void 0:Ir.is_ordered),cr(Ir),Rr(!0))},[Ir]),(0,ce.useEffect)(()=>{if(!Lo)return;const Wi=Ir==null?void 0:Ir.standard_answer.map(Vr=>Vr==null?void 0:Vr.answer_text);$i(Wi);const Ia=Ir==null?void 0:Ir.standard_answer.map(Vr=>Vr==null?void 0:Vr.score);Ii(Ia),Rr(!1)},[Lo]),(0,ce.useImperativeHandle)(_t,()=>({onSave:Do,Clear:Yr}));const Do=()=>{let Wi=[],Ia=!1;return jo?(_i.forEach((Vr,_a)=>{Wi.push({position:_a+1,answer_text:[],score:lr[_a]}),Vr==null||Vr.forEach((Is,ju)=>{Wi[_a].answer_text.push(Is),(!Is||!(0,et.eR)(Is,1e4))&&(Ar(`${_a}-${ju}`),mt.ZP.info(Is?"\u7B54\u6848\u4E0D\u80FD\u8D85\u8FC710000\u5B57\u7B26":"\u7B54\u6848\uFF1A\u4E0D\u80FD\u4E3A\u7A7A"),Ia=!0)})}),Ia?!1:(Wi==null?void 0:Wi.length)>20?(mt.ZP.warning("\u586B\u7A7A\u9898\u6807\u51C6\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A/\u4E0D\u80FD\u8D85\u8FC720\u4E2A\uFF01"),!1):{name:jo,analysis:Go,standard_answers:Wi,is_ordered:or,downcase:tr==null?void 0:tr.downcase,no_space:tr==null?void 0:tr.no_space,use_blank_score:tr==null?void 0:tr.use_blank_score}):(mt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1)},Yr=()=>{po(""),ho(""),$i([]),Cr(!1)},ko=(Wi,Ia,Vr)=>{const _a=_i.slice();if(Ia&&_a.splice(Wi,Ia),Vr)for(let Is=0;Is<Vr;Is++)_a.splice(Wi+Is,0,[""]);$i(_a)},Yo=(Wi,Ia,Vr)=>{Ar("");let _a=_i.slice();_a[Wi][Ia]=Vr,$i(_a)},br=Wi=>{let Ia=_i.slice();Ia[Wi]=[...Ia[Wi],""],$i(Ia)},Oo=(Wi,Ia)=>{let Vr=_i.slice();if(!Vr[Wi][Ia]){Vr[Wi]=Vr[Wi].filter((_a,Is)=>Is!==Ia),$i(Vr);return}Ke.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:ft.modal,onOk:()=>{Vr[Wi]=Vr[Wi].filter((_a,Is)=>Is!==Ia),$i(Vr)}})},Bs=Wi=>{Ke.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:ft.modal,onOk:()=>{let Ia=_i.slice();Ia=_i.filter((Vr,_a)=>Wi!==_a),$i(Ia)}})};return En.createElement("section",{className:ft.wrap},En.createElement("p",{className:ft.titleWrap},En.createElement("span",{className:ft.required},"*"),En.createElement("span",{className:ft.title},"\u9898\u5E72\uFF1A")),En.createElement("div",null,En.createElement(rn.Z,{id:"completion-question-tittle",placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE",height:155,defaultValue:jo,onChange:Wi=>po(Wi),showNullButton:!0,onPlaceholderChange:ko})),En.createElement("div",{className:"mt20"},_i.map((Wi,Ia)=>En.createElement("div",{style:{display:"flex"}},En.createElement("div",{style:{flex:1}},En.createElement(Cn.Z,{key:Ia,answers:Wi,index:Ia,flex:1,is_md:!0,activeOptionErrorIndex:Tr,onAnswerChange:Yo,addChildAnswer:br,deleteChildAnswer:Oo,deleteChildAnswermain:Bs})),tr.use_blank_score&&En.createElement("div",{style:{display:"flex",alignItems:"center",width:"165px"}},En.createElement("span",{style:{color:"red",margin:"auto 5px auto 10px"}},"*"),"\u5206\u503C\uFF1A",En.createElement(Be.Z,{style:{width:"100px"},size:"large",defaultValue:lr[Ia],onBlur:Vr=>{lr[Ia]=Vr.target.value,Ii([...lr])}}))))),En.createElement("div",null,En.createElement(Et.default,{className:`${ft.color333} font14 mt20`,checked:tr.use_blank_score,onChange:Wi=>cr(Pt(nt({},tr),{use_blank_score:Wi.target.checked}))},"\u5224\u5206\u65F6\u6309\u7A7A\u7ED9\u5206"),En.createElement("span",{style:{color:"#999999",fontSize:"12px"}},"\uFF08\u9009\u4E2D\uFF0C\u5219\u9700\u8981\u8BBE\u7F6E\u6BCF\u7A7A\u5206\u503C\uFF0C\u5B66\u751F\u7B54\u6848\u5224\u5206\u65F6\u6309\u7A7A\u7ED9\u5206\uFF09")),En.createElement("div",null,En.createElement(Et.default,{className:`${ft.color333} font14 mt20`,checked:tr.downcase,onChange:Wi=>cr(Pt(nt({},tr),{downcase:Wi.target.checked}))},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),En.createElement("div",null,En.createElement(Et.default,{className:`${ft.color333} font14 mt20`,checked:tr.no_space,onChange:Wi=>cr(Pt(nt({},tr),{no_space:Wi.target.checked}))},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),En.createElement("div",{className:"mt20"},(_i==null?void 0:_i.length)>1&&En.createElement("span",null,En.createElement(Et.default,{checked:or,onChange:Wi=>Cr(Wi.target.checked),className:`${ft.color333} font14`},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),En.createElement("span",{className:`${ft.color999} font12`},"\uFF08\u9009\u4E2D\uFF0C\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u987A\u5E8F\u5FC5\u987B\u4E0E\u53C2\u8003\u7B54\u6848\u4E00\u81F4\uFF09"))),En.createElement("p",{className:ft.titleWrap},En.createElement("span",{className:ft.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),En.createElement(Bn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Go,onChange:Wi=>ho(Wi)}))};var vt=(0,ze.connect)(({loading:Kt,globalSetting:_t})=>({globalSetting:_t,loading:Kt.effects}),null,null,{forwardRef:!0})((0,ce.forwardRef)(St)),lt=ve(5112),Dt=Object.getOwnPropertySymbols,un=Object.prototype.hasOwnProperty,Xt=Object.prototype.propertyIsEnumerable,$t=(Kt,_t)=>{var mn={};for(var it in Kt)un.call(Kt,it)&&_t.indexOf(it)<0&&(mn[it]=Kt[it]);if(Kt!=null&&Dt)for(var it of Dt(Kt))_t.indexOf(it)<0&&Xt.call(Kt,it)&&(mn[it]=Kt[it]);return mn};const wn=null,bn=(Kt,_t)=>{var mn=Kt,{globalSetting:it,loading:yn,editData:zr,dispatch:Bo,onRef:Ir=()=>{},isEdit:_r}=mn,jo=$t(mn,["globalSetting","loading","editData","dispatch","onRef","isEdit"]);const[po,Go]=(0,ce.useState)(),[ho,_i]=(0,ce.useState)(""),[$i,Tr]=(0,ce.useState)("");(0,ce.useEffect)(()=>{if(!zr||!_r)return;_i(zr==null?void 0:zr.name),Tr(zr==null?void 0:zr.analysis);const Cr=zr==null?void 0:zr.choices.find(Lo=>Lo.is_answer);Go(Cr.choice_text==="\u6B63\u786E"?"0":"1")},[zr]),(0,ce.useImperativeHandle)(_t,()=>({onSave:Ar,Clear:or}));const Ar=()=>ho?po?{name:ho,choices:[{choice_text:"\u6B63\u786E",is_answer:po==="0"?1:0},{choice_text:"\u9519\u8BEF",is_answer:po==="1"?1:0}],analysis:$i}:(mt.ZP.info("\u8BF7\u5148\u70B9\u51FB\u9009\u62E9\u672C\u9009\u62E9\u9898\u7684\u6B63\u786E\u9009\u9879"),!1):(mt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1),or=()=>{_i(""),Tr(""),Go("")};return ce.createElement("section",{className:ft.wrap},ce.createElement("p",{className:ft.titleWrap},ce.createElement("span",{className:ft.required},"*"),ce.createElement("span",{className:ft.title},"\u9898\u5E72\uFF1A")),ce.createElement(Bn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:ho,onChange:Cr=>_i(Cr)}),ce.createElement("p",{className:ft.titleWrap},ce.createElement("span",{className:ft.required},"*"),ce.createElement("span",{className:ft.title},"\u7B54\u6848\u9009\u9879\uFF1A",ce.createElement("span",{className:ft.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),ce.createElement(lt.ZP.Group,{buttonStyle:"solid",value:po,onChange:Cr=>Go(Cr.target.value)},ce.createElement(lt.ZP.Button,{value:"0",className:`${ft.radio} mr40`},"\u6B63\u786E"),ce.createElement(lt.ZP.Button,{value:"1",className:ft.radio},"\u9519\u8BEF")),ce.createElement("p",{className:ft.titleWrap},ce.createElement("span",{className:ft.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),ce.createElement(Bn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:$i,onChange:Cr=>Tr(Cr)}))};var pn=(0,ze.connect)(({loading:Kt,globalSetting:_t})=>({globalSetting:_t,loading:Kt.effects}),null,null,{forwardRef:!0})((0,ce.forwardRef)(bn)),Yn=Object.getOwnPropertySymbols,ai=Object.prototype.hasOwnProperty,Wn=Object.prototype.propertyIsEnumerable,Rn=(Kt,_t)=>{var mn={};for(var it in Kt)ai.call(Kt,it)&&_t.indexOf(it)<0&&(mn[it]=Kt[it]);if(Kt!=null&&Yn)for(var it of Yn(Kt))_t.indexOf(it)<0&&Wn.call(Kt,it)&&(mn[it]=Kt[it]);return mn};const ii=null,pi=(Kt,_t)=>{var mn=Kt,{globalSetting:it,loading:yn,editData:zr,dispatch:Bo,onRef:Ir=()=>{},isEdit:_r}=mn,jo=Rn(mn,["globalSetting","loading","editData","dispatch","onRef","isEdit"]);const[po,Go]=(0,ce.useState)([]);(0,ce.useEffect)(()=>{var Tr;if(!zr||!_r)return;const Ar=(Tr=zr==null?void 0:zr.shixun)==null?void 0:Tr.challenges.map(or=>({id:or==null?void 0:or.id,score:or.score}));Go(Ar)},[zr]),(0,ce.useImperativeHandle)(_t,()=>({onSave:ho,Clear:_i}));const ho=()=>({challenges:[...po]}),_i=()=>{Go([])};console.log("editData--",zr);const $i=Tr=>{var Ar,or;return ce.createElement("div",null,(or=(Ar=Tr==null?void 0:Tr.shixun)==null?void 0:Ar.challenges)==null?void 0:or.map((Cr,Lo)=>{var Rr;return ce.createElement("div",{className:"c-grey-666 font14 ml25",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"15px"}},ce.createElement("div",null,ce.createElement("span",{className:"mr5"},"\u7B2C",Lo+1,"\u5173"),ce.createElement(Ct.Z,{key:Lo,title:Cr==null?void 0:Cr.challenge_name},ce.createElement("span",null,(0,et.Pq)(Cr==null?void 0:Cr.challenge_name,44)))),ce.createElement("p",{style:{marginBottom:0}},ce.createElement("span",{className:ft.required},"*"),ce.createElement("span",{className:ft.title},"\u5206\u503C\uFF1A"),ce.createElement(Be.Z,{precision:1,min:1,max:100,className:ft.baseFormItem,style:{width:176},value:(Rr=po.find(tr=>tr.id===Cr.id))==null?void 0:Rr.score,onChange:tr=>{po.find(cr=>cr.id===Cr.id).score=tr,Go([...po])}})))}),ce.createElement("div",{style:{clear:"both"}}))};return ce.createElement("section",{className:ft.wrap},ce.createElement(Ie.Z,{style:{paddingRight:10},className:ft.titleHtml,value:`${zr==null?void 0:zr.position}\u3001${zr==null?void 0:zr.name}`}),ce.createElement("p",{style:{marginBottom:"10px",marginTop:"25px"}},ce.createElement("span",{className:ft.required},"*"),ce.createElement("span",{className:ft.title},"\u5173\u5361")),$i(zr))};var gi=(0,ze.connect)(({loading:Kt,globalSetting:_t})=>({globalSetting:_t,loading:Kt.effects}),null,null,{forwardRef:!0})((0,ce.forwardRef)(pi)),Ri=Object.getOwnPropertySymbols,Ji=Object.prototype.hasOwnProperty,Un=Object.prototype.propertyIsEnumerable,$n=(Kt,_t)=>{var mn={};for(var it in Kt)Ji.call(Kt,it)&&_t.indexOf(it)<0&&(mn[it]=Kt[it]);if(Kt!=null&&Ri)for(var it of Ri(Kt))_t.indexOf(it)<0&&Un.call(Kt,it)&&(mn[it]=Kt[it]);return mn};const ti=["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"],Pi=(Kt,_t)=>{var mn=Kt,{editData:it,globalSetting:yn,loading:zr,dispatch:Bo,onRef:Ir=()=>{},isEdit:_r}=mn,jo=$n(mn,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[po,Go]=(0,ce.useState)([]),[ho,_i]=(0,ce.useState)(),[$i,Tr]=(0,ce.useState)([]),[Ar,or]=(0,ce.useState)(""),[Cr,Lo]=(0,ce.useState)("");(0,ce.useEffect)(()=>{Go(["","","",""])},[]),(0,ce.useEffect)(()=>{if(!it||!_r)return;or(it==null?void 0:it.name),Lo(it==null?void 0:it.analysis),Go(it==null?void 0:it.choices.map(lr=>lr.choice_text));const cr=[];it==null||it.choices.map((lr,Ii)=>{lr.is_answer&&cr.push(Ii)}),Tr(cr)},[it]),(0,ce.useImperativeHandle)(_t,()=>({onSave:Rr,Clear:tr}));const Rr=()=>{if(!Ar)return mt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;const cr=po.findIndex(Ii=>!Ii);if(cr>-1)return mt.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${ti[cr]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!$i.length)return mt.ZP.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),!1;if($i.length<2)return mt.ZP.info("\u591A\u9009\u9898\u6700\u5C0F\u6B63\u786E\u9009\u9879\u4E3A2\u4E2A"),!1;const lr=po.map((Ii,Do)=>({choice_text:Ii,is_answer:$i.includes(Do)?1:0}));return{name:Ar,choices:lr,analysis:Cr}},tr=()=>{Go(["","","",""]),or(""),Lo(""),Tr("")};return ce.createElement("section",{className:ft.wrap},ce.createElement("p",{className:ft.titleWrap},ce.createElement("span",{className:ft.required},"*"),ce.createElement("span",{className:ft.title},"\u9898\u5E72\uFF1A")),ce.createElement(Bn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Ar,onChange:cr=>or(cr)}),ce.createElement("p",{className:ft.titleWrap},ce.createElement("span",{className:ft.required},"*"),ce.createElement("span",{className:ft.title},"\u7B54\u6848\u9009\u9879\uFF1A",ce.createElement("span",{className:ft.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),po.map((cr,lr)=>ce.createElement("div",{className:ft.choiceWrap,key:lr},ce.createElement(Ct.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},ce.createElement("div",{className:`${ft.answer} ${$i.includes(lr)?ft.activeAnswer:""}`,onClick:()=>{$i.includes(lr)?Tr($i.filter(Ii=>Ii!==lr)):Tr([...$i,lr])}},ti[lr])),ce.createElement("div",{className:ft.editorWrap},ho===lr?ce.createElement(Bn.Z,{id:`single-question-option-${lr}`,watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:cr,onChange:Ii=>{po[lr]=Ii,Go(po)}}):ce.createElement("div",{className:ft.htmlWrap,onClick:()=>_i(lr)},ce.createElement(Ie.Z,{value:cr}))),lr>1&&ce.createElement(Ct.Z,{title:"\u5220\u9664"},ce.createElement("i",{className:`${ft.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>{Go(po.filter((Ii,Do)=>Do!==lr)),$i.includes(lr)?Tr($i.filter(Ii=>Ii!==lr)):Tr([...$i,lr])}})),lr<7&&lr===po.length-1&&ce.createElement(Ct.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},ce.createElement("i",{className:`${ft.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>Go([...po,""])})))),ce.createElement("p",{className:ft.titleWrap},ce.createElement("span",{className:ft.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),ce.createElement(Bn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Cr,onChange:cr=>Lo(cr)}))};var mi=(0,ze.connect)(({loading:Kt,globalSetting:_t})=>({globalSetting:_t,loading:Kt.effects}),null,null,{forwardRef:!0})((0,ce.forwardRef)(Pi)),nr=Object.getOwnPropertySymbols,ji=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,si=(Kt,_t)=>{var mn={};for(var it in Kt)ji.call(Kt,it)&&_t.indexOf(it)<0&&(mn[it]=Kt[it]);if(Kt!=null&&nr)for(var it of nr(Kt))_t.indexOf(it)<0&&Le.call(Kt,it)&&(mn[it]=Kt[it]);return mn};const Hi=["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"],hn=(Kt,_t)=>{var mn=Kt,{editData:it,globalSetting:yn,loading:zr,dispatch:Bo,onRef:Ir=()=>{},isEdit:_r}=mn,jo=si(mn,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[po,Go]=(0,ce.useState)([]),[ho,_i]=(0,ce.useState)(),[$i,Tr]=(0,ce.useState)(),[Ar,or]=(0,ce.useState)(""),[Cr,Lo]=(0,ce.useState)("");(0,ce.useEffect)(()=>{Go(["","","",""])},[]),(0,ce.useEffect)(()=>{if(!it||!_r)return;const cr=[],lr=[];it==null||it.choices.forEach((Ii,Do)=>{cr.push(Ii.choice_text),Ii.is_answer&&lr.push(Do)}),or(it==null?void 0:it.name),Lo(it==null?void 0:it.analysis),Go(cr),Tr(lr)},[it]),(0,ce.useImperativeHandle)(_t,()=>({onSave:Rr,Clear:tr}));const Rr=()=>{if(!Ar)return mt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;const cr=po.findIndex(Ii=>!Ii);if(cr>-1)return mt.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${Hi[cr]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!Array.isArray($i))return mt.ZP.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),!1;const lr=po.map((Ii,Do)=>({choice_text:Ii,is_answer:$i.includes(Do)?1:0}));return{name:Ar,choices:lr,analysis:Cr}},tr=()=>{Go(["","","",""]),or(""),Lo(""),Tr("")};return ce.createElement("section",{className:ft.wrap},ce.createElement("p",{className:ft.titleWrap},ce.createElement("span",{className:ft.required},"*"),ce.createElement("span",{className:ft.title},"\u9898\u5E72\uFF1A")),ce.createElement(Bn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Ar,onChange:cr=>or(cr)}),ce.createElement("p",{className:ft.titleWrap},ce.createElement("span",{className:ft.required},"*"),ce.createElement("span",{className:ft.title},"\u7B54\u6848\u9009\u9879\uFF1A",ce.createElement("span",{className:ft.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),po.map((cr,lr)=>ce.createElement("div",{className:ft.choiceWrap,key:lr},ce.createElement(Ct.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},ce.createElement("div",{className:`${ft.answer} ${$i!=null&&$i.includes(lr)?ft.activeAnswer:""}`,onClick:()=>Tr([lr])},Hi[lr])),ce.createElement("div",{className:ft.editorWrap},ho===lr?ce.createElement(Bn.Z,{id:`single-question-option-${lr}`,watch:!0,height:155,isFocus:!0,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:cr,onChange:Ii=>{po[lr]=Ii,Go(po)}}):ce.createElement("div",{className:ft.htmlWrap,onClick:()=>_i(lr)},ce.createElement(Ie.Z,{value:cr}))),lr>1&&ce.createElement(Ct.Z,{title:"\u5220\u9664"},ce.createElement("i",{className:`${ft.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>{Go(po.filter((Ii,Do)=>Do!==lr)),lr===$i&&Tr(null)}})),lr<7&&lr===po.length-1&&ce.createElement(Ct.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},ce.createElement("i",{className:`${ft.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>Go([...po,""])})))),ce.createElement("p",{className:ft.titleWrap},ce.createElement("span",{className:ft.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),ce.createElement(Bn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Cr,onChange:cr=>Lo(cr)}))};var ni=(0,ze.connect)(({loading:Kt,globalSetting:_t})=>({globalSetting:_t,loading:Kt.effects}),null,null,{forwardRef:!0})((0,ce.forwardRef)(hn)),vi=ve(12563),Fi=ve(78673),_n=ve(61485),Dn=ve(59301),Ft=Object.defineProperty,Ot=Object.defineProperties,Ve=Object.getOwnPropertyDescriptors,Ut=Object.getOwnPropertySymbols,tn=Object.prototype.hasOwnProperty,xt=Object.prototype.propertyIsEnumerable,rt=(Kt,_t,mn)=>_t in Kt?Ft(Kt,_t,{enumerable:!0,configurable:!0,writable:!0,value:mn}):Kt[_t]=mn,Vt=(Kt,_t)=>{for(var mn in _t||(_t={}))tn.call(_t,mn)&&rt(Kt,mn,_t[mn]);if(Ut)for(var mn of Ut(_t))xt.call(_t,mn)&&rt(Kt,mn,_t[mn]);return Kt},on=(Kt,_t)=>Ot(Kt,Ve(_t)),xn=(Kt,_t)=>{var mn={};for(var it in Kt)tn.call(Kt,it)&&_t.indexOf(it)<0&&(mn[it]=Kt[it]);if(Kt!=null&&Ut)for(var it of Ut(Kt))_t.indexOf(it)<0&&xt.call(Kt,it)&&(mn[it]=Kt[it]);return mn},An=(Kt,_t,mn)=>new Promise((it,yn)=>{var zr=_r=>{try{Ir(mn.next(_r))}catch(jo){yn(jo)}},Bo=_r=>{try{Ir(mn.throw(_r))}catch(jo){yn(jo)}},Ir=_r=>_r.done?it(_r.value):Promise.resolve(_r.value).then(zr,Bo);Ir((mn=mn.apply(Kt,_t)).next())});const yt=Kt=>{if(!Kt)return!1;if(/^s*$/.test(Kt)||Kt.trim()===""){mt.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u5168\u4E3A\u7A7A\u683C");return}let _t=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 Kt==="|"?(mt.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},cn=({value:Kt=[],onClose:_t})=>Dn.createElement(vi.default,{closable:!0,onClose:_t,className:ft.keywordTag},Dn.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},Kt.join(" \u6216 "))),On=(Kt,_t)=>{var mn=Kt,{editData:it,globalSetting:yn,loading:zr,dispatch:Bo,onRef:Ir=()=>{},isEdit:_r}=mn,jo=xn(mn,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[po,Go]=(0,ce.useState)(""),[ho,_i]=(0,ce.useState)(""),[$i,Tr]=(0,ce.useState)(""),[Ar,or]=(0,ce.useState)(""),[Cr]=_e.default.useForm(),Lo=_e.default.useWatch("use_keywords",Cr);(0,ce.useEffect)(()=>{var lr;!it||!_r||(Go(it==null?void 0:it.name),_i(it==null?void 0:it.analysis),Tr((lr=it==null?void 0:it.answer_texts)==null?void 0:lr[0]),Cr.setFieldsValue(Vt({},it)))},[it]),(0,ce.useImperativeHandle)(_t,()=>({onSave:Rr,Clear:tr}));const Rr=()=>An(void 0,null,function*(){if(!po)return mt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;try{yield Cr.validateFields()}catch(Ii){mt.ZP.error(Ii.errorFields[0].errors[0]);return}const lr=Cr.getFieldsValue();return console.log(lr,"values"),Vt({name:po,answer_texts:[$i],analysis:ho},lr)}),tr=()=>{Go(""),_i(""),Tr(""),Cr.resetFields()},cr=it==null?void 0:it.score;return Dn.createElement("section",{className:ft.wrap},Dn.createElement("p",{className:ft.titleWrap},Dn.createElement("span",{className:ft.required},"*"),Dn.createElement("span",{className:ft.title},"\u9898\u5E72\uFF1A")),Dn.createElement(Bn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:po,onChange:lr=>Go(lr)}),Dn.createElement("p",{className:ft.titleWrap},Dn.createElement("span",{className:ft.title},"\u53C2\u8003\u7B54\u6848\uFF1A")),Dn.createElement(Bn.Z,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u53C2\u8003\u7B54\u6848",defaultValue:$i,onChange:lr=>Tr(lr)}),Dn.createElement("p",{className:ft.titleWrap},Dn.createElement("span",{className:ft.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),Dn.createElement(Bn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:ho,onChange:lr=>_i(lr)}),Dn.createElement(_e.default,{form:Cr,size:"large",onFinishFailed:lr=>An(void 0,null,function*(){var Ii,Do;mt.ZP.error(lr.errorFields[0].errors[0]),Cr.scrollToField((Do=(Ii=lr==null?void 0:lr.errorFields)==null?void 0:Ii[0])==null?void 0:Do.name,{behavior:"smooth",block:"center"})})},Dn.createElement(ht.Z,{align:"middle",className:"mb30 mt20"},Dn.createElement(_e.default.Item,{noStyle:!0,name:"use_keywords",valuePropName:"checked"},Dn.createElement(Fi.Z,null)),Dn.createElement(dt.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),Dn.createElement(dt.Z,null,Dn.createElement(Ct.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"},Dn.createElement(_n.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),Lo&&Dn.createElement(_e.default.List,{name:"keywords",rules:[{validator(lr,Ii){return Ii!=null&&Ii.length?(Ii==null?void 0:Ii.reduce((Yr,ko)=>Yr+ko.score,0))>parseFloat(cr)?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"))}}]},(lr,{add:Ii,remove:Do})=>Dn.createElement(Dn.Fragment,null,Dn.createElement("div",{className:"mb10"},"\u5173\u952E\u8BCD"),Dn.createElement(ht.Z,{align:"middle",className:"font14 mb30"},Dn.createElement(dt.Z,{flex:1},Dn.createElement(ct.default,{value:Ar,onChange:Yr=>{or(Yr.target.value)},maxLength:50,allowClear:!0,onPressEnter:Yr=>{var ko,Yo,br,Oo;const Bs=`${(ko=Yr.target)==null?void 0:ko.value}`,Wi=(br=(Yo=Bs==null?void 0:Bs.split("|"))==null?void 0:Yo.filter(_a=>!!_a))==null?void 0:br.map(_a=>_a==null?void 0:_a.trim()),Ia=Cr.getFieldValue("keywords"),Vr=((Oo=Ia==null?void 0:Ia.map(_a=>_a==null?void 0:_a.keyword))==null?void 0:Oo.flat())||[];for(const _a of Wi)if(Vr.includes(_a)){mt.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}yt(Bs)&&(Ii({keyword:Wi,score:1}),or(""))},className:ft.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"})),Dn.createElement(dt.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),lr.map(Yr=>{var ko=Yr,{key:Yo,name:br}=ko,Oo=xn(ko,["key","name"]);return Dn.createElement(ht.Z,{key:Yo,style:{marginRight:148}},Dn.createElement(dt.Z,{flex:1},Dn.createElement(ht.Z,{align:"middle",justify:"space-between"},Dn.createElement(_e.default.Item,on(Vt({},Oo),{name:[br,"keyword"]}),Dn.createElement(cn,{onClose:()=>Do(br)})),Dn.createElement(_e.default.Item,on(Vt({},Oo),{name:[br,"score"],label:"\u5206\u503C",rules:[{required:!0}]}),Dn.createElement(Be.Z,{min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))})))))};var ri=(0,ze.connect)(({loading:Kt,globalSetting:_t})=>({globalSetting:_t,loading:Kt.effects}),null,null,{forwardRef:!0})((0,ce.forwardRef)(On)),Wt=ve(36381),Jt={wrap:"wrap___Cc0gS",deleteIcon:"deleteIcon___ebwMv",keywordTag:"keywordTag___lUfL5",questionTitleEditorWrap:"questionTitleEditorWrap___u9UgK",choiceWrap:"choiceWrap___VHsr3",choiceIndex:"choiceIndex___rsj9r",judgementIndex:"judgementIndex___fMm6E",setAnswerBtn:"setAnswerBtn___krVC9",activeAnswer:"activeAnswer___WiYo2",activeJudgementAnswer:"activeJudgementAnswer___M6iww",actionWrapper:"actionWrapper___oKI8_",addIcon:"addIcon___eMbGP",inputBorder:"inputBorder___ob_6x",placeholder:"placeholder___Vkwr4",blankWrapper:"blankWrapper____MZQ5",blankInput:"blankInput___ephwY",blankInputNumberWrapper:"blankInputNumberWrapper___C1UJS",addBtn:"addBtn___qRBpJ",blankIndex:"blankIndex___QsKgf",baseInputWrapper:"baseInputWrapper___juqCB",collapseWrapper:"collapseWrapper___kAXJ0",panelHeader:"panelHeader___hLTSe",open:"open___wWDjf",close:"close___XPTJ0",hide:"hide___VytUy"},hi=ve(32134),ci=ve(12893),ui=Object.defineProperty,qn=Object.defineProperties,di=Object.getOwnPropertyDescriptors,li=Object.getOwnPropertySymbols,Ai=Object.prototype.hasOwnProperty,er=Object.prototype.propertyIsEnumerable,sr=(Kt,_t,mn)=>_t in Kt?ui(Kt,_t,{enumerable:!0,configurable:!0,writable:!0,value:mn}):Kt[_t]=mn,vn=(Kt,_t)=>{for(var mn in _t||(_t={}))Ai.call(_t,mn)&&sr(Kt,mn,_t[mn]);if(li)for(var mn of li(_t))er.call(_t,mn)&&sr(Kt,mn,_t[mn]);return Kt},Nr=(Kt,_t)=>qn(Kt,di(_t)),Dr=(Kt,_t)=>{var mn={};for(var it in Kt)Ai.call(Kt,it)&&_t.indexOf(it)<0&&(mn[it]=Kt[it]);if(Kt!=null&&li)for(var it of li(Kt))_t.indexOf(it)<0&&er.call(Kt,it)&&(mn[it]=Kt[it]);return mn};const ir=Kt=>{var _t=Kt,{value:mn,onChange:it,scrollId:yn}=_t,zr=Dr(_t,["value","onChange","scrollId"]);return ce.createElement("div",{id:yn||""},ce.createElement(Bn.Z,Nr(vn({},zr),{defaultValue:mn,onChange:(Bo,Ir)=>{Ir!=null&&Ir.length?it(Bo,Ir):it(Bo)}})))},fn=({value:Kt,onChange:_t,placeholder:mn,height:it=140,isEdit:yn})=>yn?ce.createElement(Bn.Z,{watch:!0,isFocus:!0,height:it,placeholder:mn,defaultValue:Kt,onChange:_t}):ce.createElement("div",{style:{cursor:"pointer"}},Kt?ce.createElement(Ie.Z,{className:Jt.inputBorder,value:Kt}):ce.createElement("div",{className:`${Jt.inputBorder} ${Jt.placeholder}`},mn));var jn=ve(59301),Ei=Object.defineProperty,zi=Object.defineProperties,Ni=Object.getOwnPropertyDescriptors,Gi=Object.getOwnPropertySymbols,ur=Object.prototype.hasOwnProperty,Qi=Object.prototype.propertyIsEnumerable,rr=(Kt,_t,mn)=>_t in Kt?Ei(Kt,_t,{enumerable:!0,configurable:!0,writable:!0,value:mn}):Kt[_t]=mn,fr=(Kt,_t)=>{for(var mn in _t||(_t={}))ur.call(_t,mn)&&rr(Kt,mn,_t[mn]);if(Gi)for(var mn of Gi(_t))Qi.call(_t,mn)&&rr(Kt,mn,_t[mn]);return Kt},Nn=(Kt,_t)=>zi(Kt,Ni(_t)),Jr=(Kt,_t)=>{var mn={};for(var it in Kt)ur.call(Kt,it)&&_t.indexOf(it)<0&&(mn[it]=Kt[it]);if(Kt!=null&&Gi)for(var it of Gi(Kt))_t.indexOf(it)<0&&Qi.call(Kt,it)&&(mn[it]=Kt[it]);return mn};const Ln=["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"],Zr=({value:Kt,onChange:_t,choiceTextKey:mn,answerKey:it,index:yn,isEdit:zr,setInputActive:Bo,form:Ir,choiceOptionsPath:_r,allowChangeMode:jo,showAddIcon:po,addItem:Go,deleteItem:ho})=>{const _i=(Kt==null?void 0:Kt[it])===!0,$i=()=>{const Ar=Ir.getFieldValue(_r);Ir.setFieldValue(_r,Ar.map(or=>Nn(fr({},or),{[it]:!1})))},Tr=()=>{_i?_t(Nn(fr({},Kt),{[it]:!1})):(jo||$i(),_t(Nn(fr({},Kt),{[it]:!0})))};return jn.createElement(ht.Z,{className:Jt.choiceWrap,align:"middle",wrap:!1},jn.createElement(dt.Z,{onClick:Tr,className:`${Jt.choiceIndex} ${_i?Jt.activeAnswer:""}`},Ln[yn]),jn.createElement(dt.Z,{flex:1,className:`${Jt.editorWrap} ml15`,onClick:Bo},jn.createElement(fn,{height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",isEdit:zr,value:Kt==null?void 0:Kt[mn],onChange:Ar=>{_t(Nn(fr({},Kt),{[mn]:Ar}))}})),jn.createElement(dt.Z,{flex:"0 0 auto",className:"ml15"},jn.createElement("div",{onClick:Tr,className:`${Jt.setAnswerBtn} ${_i?Jt.activeAnswer:""}`},_i?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")),jn.createElement(dt.Z,{className:Jt.actionWrapper},jn.createElement(Ct.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},jn.createElement(hi.Z,{className:Jt.addIcon,onClick:Go,style:{visibility:po?"visible":"hidden"}})),jn.createElement(Ct.Z,{title:"\u5220\u9664"},jn.createElement(ci.Z,{className:Jt.deleteIcon,onClick:ho,style:{visibility:yn>1?"visible":"hidden"}}))))},co=({questionTitlePlaceholder:Kt,titleKey:_t,choiceKey:mn,analysisKey:it,choiceTextKey:yn,answerKey:zr,choiceOptionsPath:Bo,allowChangeMode:Ir=!0,form:_r,showAnalysis:jo=!0})=>{const[po,Go]=(0,ce.useState)(),[ho,_i]=(0,ce.useState)(!1);return jn.createElement("div",{className:Jt.wrap},jn.createElement("div",{className:Jt.questionTitleEditorWrap},jn.createElement(_e.default.Item,{label:"\u9898\u5E72",name:_t,labelCol:{span:24},rules:[{required:!0}]},jn.createElement(ir,{scrollId:Array.isArray(_t)?_t.join("_"):`${_t}`,watch:!0,height:140,placeholder:Kt}))),jn.createElement(_e.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),jn.createElement(_e.default.List,{name:mn,rules:[{validator($i,Tr){const Ar=Tr.some(Cr=>Cr[zr]),or=Tr.findIndex(Cr=>{var Lo;return((Lo=Cr[yn])==null?void 0:Lo.length)<=0});return or!==-1?Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${Ln[or]}\u9009\u9879\u7684\u5185\u5BB9`)):Ar?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},($i,{add:Tr,remove:Ar})=>jn.createElement("div",{id:Array.isArray(Bo)?Bo.join("_"):`${Bo}`},$i.map((or,Cr)=>{var Lo=or,{key:Rr,name:tr}=Lo,cr=Jr(Lo,["key","name"]);const lr=po===Rr,Ii=()=>{Go(Rr)},Do=Cr<7&&Cr===$i.length-1,Yr=()=>Tr({[yn]:"",[zr]:0}),ko=()=>Ar(tr);return jn.createElement(_e.default.Item,Nn(fr({},cr),{key:Rr,name:tr,noStyle:!0}),jn.createElement(Zr,{choiceTextKey:yn,answerKey:zr,index:Cr,isEdit:lr,setInputActive:Ii,form:_r,choiceOptionsPath:Bo,allowChangeMode:Ir,showAddIcon:Do,addItem:Yr,deleteItem:ko}))}),$i.length<8&&jn.createElement("div",{className:`${Jt.addBtn} mb30`,onClick:()=>Tr({[yn]:"",[zr]:0})},"\u6DFB\u52A0\u9009\u9879"))),jo&&jn.createElement("div",{onClick:()=>_i(!0)},jn.createElement(_e.default.Item,{name:it,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},jn.createElement(fn,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:ho}))))};var Bi=ve(59301),Po=Object.defineProperty,ao=Object.defineProperties,Vi=Object.getOwnPropertyDescriptors,qi=Object.getOwnPropertySymbols,Hr=Object.prototype.hasOwnProperty,ro=Object.prototype.propertyIsEnumerable,xi=(Kt,_t,mn)=>_t in Kt?Po(Kt,_t,{enumerable:!0,configurable:!0,writable:!0,value:mn}):Kt[_t]=mn,tt=(Kt,_t)=>{for(var mn in _t||(_t={}))Hr.call(_t,mn)&&xi(Kt,mn,_t[mn]);if(qi)for(var mn of qi(_t))ro.call(_t,mn)&&xi(Kt,mn,_t[mn]);return Kt},uo=(Kt,_t)=>ao(Kt,Vi(_t)),Zo=(Kt,_t)=>{var mn={};for(var it in Kt)Hr.call(Kt,it)&&_t.indexOf(it)<0&&(mn[it]=Kt[it]);if(Kt!=null&&qi)for(var it of qi(Kt))_t.indexOf(it)<0&&ro.call(Kt,it)&&(mn[it]=Kt[it]);return mn};const ga=({value:Kt,onChange:_t})=>{const mn=yn=>{Ke.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:Jt.modal,onOk:()=>{const zr=[...Kt];zr.splice(yn,1),_t(zr)}})},it=()=>{const yn=[...Kt];yn.push(""),_t(yn)};return Bi.createElement(ht.Z,{align:"middle",className:"ml20",gutter:[40,20]},Kt==null?void 0:Kt.map((yn,zr)=>Bi.createElement(dt.Z,{key:`${yn}_${zr}`,className:Jt.blankWrapper},Bi.createElement(ct.default,{className:Jt.blankInput,defaultValue:yn,maxLength:1e3,onBlur:Bo=>{const Ir=[...Kt],_r=Bo.target.value.trim();Ir[zr]=_r,_t(Ir)}}),Bi.createElement(Ct.Z,{title:"\u5220\u9664"},Bi.createElement(ci.Z,{className:Jt.deleteIcon,style:{marginLeft:15,visibility:zr>0?"visible":"hidden"},onClick:()=>mn(zr)})))),Bi.createElement(dt.Z,null,Bi.createElement("div",{className:`${Jt.addBtn}`,onClick:()=>{it()}},"\u65B0\u589E\u7B54\u6848")))},Pa=({value:Kt=!0,onChange:_t})=>Bi.createElement(Fi.Z,{checked:!Kt,onChange:mn=>{_t(!mn)}}),ia="\u2581",Or=({questionTitlePlaceholder:Kt,form:_t,name:mn,scoreByBlank:it="use_blank_score",answerKey:yn,titleKey:zr="name",analysisKey:Bo="analysis",isOrdered:Ir="is_ordered"})=>{var _r,jo;const[po,Go]=(0,ce.useState)(!1),ho=(Rr,tr)=>{const cr=tr.line;let lr=0;for(let Do=0;Do<cr;Do++)lr+=Rr.getLine(Do).split(ia).length-1;const Ii=Rr.getLine(cr).substring(0,tr.ch);return lr+=Ii.split(ia).length-1,lr},_i=(Rr,tr,cr,lr)=>{const Ii=Rr.getRange(tr.from,tr.to);let Do=0;if(tr.text.forEach(Yr=>{Do+=Yr.split(ia).length-1}),tr.origin!=="setValue"){if(Ii&&Ii.indexOf(ia)!==-1){const Yr=Ii.split(ia).length-1,ko=ho(Rr,tr.from);if(console.log(`\u5220\u9664${Yr}\u4E2A\uFF0C \u524D\u9762\u6709${ko}\u4E2A\uFF0C\u65B0\u589E${Do}\u4E2A`),Yr>1){const Yo=Array.from({length:Yr},(br,Oo)=>ko+Oo);lr(Yo)}else lr(ko)}else if(Do>0){const Yr=ho(Rr,tr.from);console.log(`\u65B0\u589E${Do}\u4E2A\uFF0C\u4E4B\u524D\u6709${Yr}\u4E2A`),cr(Do,Yr)}}},$i=()=>{const Rr=_t.getFieldValue(["sub_item_banks",...yn]);_t.setFieldValue(["sub_item_banks",...yn],Rr==null?void 0:Rr.map((tr,cr)=>uo(tt({},tr),{position:cr+1})))},Tr=(0,ce.useRef)(),Ar=(Rr,tr)=>{for(let cr=0;cr<Rr;cr++)Tr.current({position:null,answer_text:[""]},tr+cr);$i()},or=(0,ce.useRef)(),Cr=Rr=>{or.current(Rr),$i()},Lo=(jo=(_r=_t.getFieldValue("sub_item_banks"))==null?void 0:_r[yn==null?void 0:yn[0]])==null?void 0:jo[yn==null?void 0:yn[1]];return Bi.createElement("div",{className:Jt.wrap},Bi.createElement("div",{className:Jt.questionTitleEditorWrap},Bi.createElement(_e.default.Item,{label:"\u9898\u5E72",name:zr,labelCol:{span:24},rules:[{required:!0}]},Bi.createElement(ir,{scrollId:"name",watch:!0,height:140,placeholder:Kt,showNullButton:!0,onCMBeforeChange:(Rr,tr)=>{_i(Rr,tr,Ar,Cr)}}))),Bi.createElement(_e.default.List,{name:yn,rules:[{validator(Rr,tr){if((tr==null?void 0:tr.length)===0)return Promise.reject(new Error("\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"));for(const cr of tr){const{answer_text:lr}=cr||{};if(lr!=null&&lr.some(Ii=>(Ii==null?void 0:Ii.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(Rr,{add:tr,remove:cr},{errors:lr})=>(Tr.current=tr,or.current=cr,Bi.createElement(Bi.Fragment,null,Bi.createElement(_e.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),Rr.map((Ii,Do)=>{var Yr=Ii,{key:ko,name:Yo}=Yr,br=Zo(Yr,["key","name"]);return Bi.createElement(ht.Z,{className:"mb20",key:ko,align:"middle",wrap:!1},Bi.createElement(dt.Z,{flex:"0 0 auto",className:`${Jt.blankIndex}`},"\u586B\u7A7A\u9879",Do+1),Bi.createElement(dt.Z,{flex:1},Bi.createElement(ht.Z,{align:"top",justify:"space-between",wrap:!1},Bi.createElement(dt.Z,null,Bi.createElement(_e.default.Item,uo(tt({},br),{name:[Yo,"answer_text"],noStyle:!0}),Bi.createElement(ga,null))),(_t==null?void 0:_t.getFieldValue(["sub_item_banks",...it]))&&Bi.createElement(dt.Z,{flex:"224px"},Bi.createElement(_e.default.Item,uo(tt({},br),{name:[Yo,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:Jt.blankInputNumberWrapper}),Bi.createElement(Be.Z,{className:Jt.blankInput,min:.1,max:100,style:{width:"100%"},placeholder:"\u6309\u7A7A\u7ED9\u5206\u8BF7\u8F93\u5165\u5206\u503C"})))),Bi.createElement(_e.default.Item,uo(tt({},br),{name:[Yo,"position"],noStyle:!0}),Bi.createElement(ct.default,{type:"hidden"}))))})))),Bi.createElement(ht.Z,{align:"middle"},Bi.createElement(_e.default.Item,{name:[mn,"downcase"],valuePropName:"checked"},Bi.createElement(Fi.Z,null)),Bi.createElement(dt.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),Bi.createElement(ht.Z,{align:"middle"},Bi.createElement(_e.default.Item,{name:[mn,"no_space"],valuePropName:"checked"},Bi.createElement(Fi.Z,null)),Bi.createElement(dt.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(Lo==null?void 0:Lo.length)>1&&Bi.createElement(ht.Z,{align:"middle",className:(Lo==null?void 0:Lo.length)>1?"mb30":`${Jt.hide}`},Bi.createElement(_e.default.Item,{name:Ir},Bi.createElement(Pa,null)),Bi.createElement(dt.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")),Bi.createElement("div",{onClick:()=>Go(!0)},Bi.createElement(_e.default.Item,{name:Bo,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Bi.createElement(fn,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:po}))))};var kr=Object.defineProperty,fo=Object.defineProperties,jr=Object.getOwnPropertyDescriptors,To=Object.getOwnPropertySymbols,qa=Object.prototype.hasOwnProperty,Mr=Object.prototype.propertyIsEnumerable,hr=(Kt,_t,mn)=>_t in Kt?kr(Kt,_t,{enumerable:!0,configurable:!0,writable:!0,value:mn}):Kt[_t]=mn,Xn=(Kt,_t)=>{for(var mn in _t||(_t={}))qa.call(_t,mn)&&hr(Kt,mn,_t[mn]);if(To)for(var mn of To(_t))Mr.call(_t,mn)&&hr(Kt,mn,_t[mn]);return Kt},yr=(Kt,_t)=>fo(Kt,jr(_t)),wo=(Kt,_t)=>{var mn={};for(var it in Kt)qa.call(Kt,it)&&_t.indexOf(it)<0&&(mn[it]=Kt[it]);if(Kt!=null&&To)for(var it of To(Kt))_t.indexOf(it)<0&&Mr.call(Kt,it)&&(mn[it]=Kt[it]);return mn};const ua={\u6B63\u786E:"T",\u9519\u8BEF:"F"},No=({value:Kt,onChange:_t,form:mn,choiceKey:it})=>{const yn=(Kt==null?void 0:Kt.is_answer)===!0,zr=Kt==null?void 0:Kt.choice_text,Bo=()=>{var Ir;const _r=(Ir=mn==null?void 0:mn.getFieldValue(["sub_item_banks",...it]))==null?void 0:Ir.map(jo=>({choice_text:jo==null?void 0:jo.choice_text,is_answer:!1}));mn==null||mn.setFieldValue(["sub_item_banks",...it],_r),_t(yr(Xn({},Kt),{is_answer:!0}))};return ce.createElement(ht.Z,{className:Jt.choiceWrap,align:"middle",wrap:!1},ce.createElement(dt.Z,{onClick:Bo,className:`${Jt.choiceIndex} ${Jt.judgementIndex} ${yn?Jt.activeAnswer:""}`},ua[zr]),ce.createElement(dt.Z,{flex:1,className:`${Jt.editorWrap} ml15`},ce.createElement("div",{className:`${Jt.inputBorder} ${Jt.placeholder} ${yn?Jt.activeJudgementAnswer:""}`},zr)),ce.createElement(dt.Z,{flex:"0 0 auto",className:"ml15"},ce.createElement("div",{onClick:Bo,className:`${Jt.setAnswerBtn} ${yn?Jt.activeAnswer:""}`},yn?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},yo=({questionTitlePlaceholder:Kt,choiceKey:_t="choices",form:mn,titleKey:it="name",analysisKey:yn="analysis"})=>{const[zr,Bo]=(0,ce.useState)(!1);return ce.createElement("div",{className:Jt.wrap},ce.createElement("div",{className:Jt.questionTitleEditorWrap},ce.createElement(_e.default.Item,{label:"\u9898\u5E72",name:it,labelCol:{span:24},rules:[{required:!0}]},ce.createElement(ir,{scrollId:"name",watch:!0,height:140,placeholder:Kt}))),ce.createElement(_e.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},ce.createElement(_e.default.List,{name:_t,rules:[{validator(Ir,_r){return _r.some(po=>(po==null?void 0:po.is_answer)===!0)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},Ir=>ce.createElement("div",{id:"choices"},Ir.map(_r=>{var jo=_r,{key:po,name:Go}=jo,ho=wo(jo,["key","name"]);return ce.createElement(_e.default.Item,yr(Xn({},ho),{key:po,name:Go,noStyle:!0}),ce.createElement(No,{form:mn,choiceKey:_t}))})))),ce.createElement("div",{onClick:()=>Bo(!0)},ce.createElement(_e.default.Item,{name:yn,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ce.createElement(fn,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:zr}))))};var ta=Object.defineProperty,na=Object.defineProperties,Na=Object.getOwnPropertyDescriptors,ka=Object.getOwnPropertySymbols,is=Object.prototype.hasOwnProperty,gn=Object.prototype.propertyIsEnumerable,Oa=(Kt,_t,mn)=>_t in Kt?ta(Kt,_t,{enumerable:!0,configurable:!0,writable:!0,value:mn}):Kt[_t]=mn,Vl=(Kt,_t)=>{for(var mn in _t||(_t={}))is.call(_t,mn)&&Oa(Kt,mn,_t[mn]);if(ka)for(var mn of ka(_t))gn.call(_t,mn)&&Oa(Kt,mn,_t[mn]);return Kt},Hs=(Kt,_t)=>na(Kt,Na(_t)),wl=(Kt,_t)=>{var mn={};for(var it in Kt)is.call(Kt,it)&&_t.indexOf(it)<0&&(mn[it]=Kt[it]);if(Kt!=null&&ka)for(var it of ka(Kt))_t.indexOf(it)<0&&gn.call(Kt,it)&&(mn[it]=Kt[it]);return mn};const Ma=Kt=>{var _t=Kt,{value:mn,onChange:it}=_t,yn=wl(_t,["value","onChange"]);const zr=Bo=>{it([Bo])};return ce.createElement(Bn.Z,Hs(Vl({},yn),{defaultValue:mn==null?void 0:mn[0],onChange:zr}))},yu=Kt=>{if(!Kt)return!1;let _t=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 Kt==="|"?(mt.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},Cl=({value:Kt=[],onClose:_t})=>ce.createElement(vi.default,{closable:!0,onClose:_t,className:Jt.keywordTag},Kt==null?void 0:Kt.join(" \u6216 ")),ma=({questionTitlePlaceholder:Kt,form:_t,showKeywords:mn,isMustKeyWords:it=mn,titleKey:yn="name",analysisKey:zr="analysis",answerTexts:Bo="answer_texts",keywords:Ir="keywords",useKeywords:_r="use_keywords",indexs:jo})=>{const[po,Go]=(0,ce.useState)(!1),[ho,_i]=(0,ce.useState)(""),$i=_e.default.useWatch("sub_item_banks",_t),{use_keywords:Tr,score:Ar}=($i==null?void 0:$i[jo])||{};return console.log(Tr,Ar,"itemValues"),ce.createElement("div",{className:Jt.wrap},ce.createElement("div",{className:Jt.questionTitleEditorWrap},ce.createElement(_e.default.Item,{label:"\u9898\u5E72",name:yn,labelCol:{span:24},rules:[{required:!0}]},ce.createElement(ir,{scrollId:"name",watch:!0,height:140,placeholder:Kt}))),ce.createElement(_e.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:Bo,labelCol:{span:24}},ce.createElement(Ma,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),mn&&!it&&ce.createElement(_e.default.Item,{hidden:!0,name:_r,valuePropName:"checked"},ce.createElement(Fi.Z,{defaultChecked:!0})),mn&&it&&ce.createElement(ht.Z,{align:"middle",className:"mb30"},ce.createElement(_e.default.Item,{name:_r,valuePropName:"checked"},ce.createElement(Fi.Z,null)),ce.createElement(dt.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),ce.createElement(dt.Z,null,ce.createElement(Ct.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"},ce.createElement(_n.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(Tr||!it)&&ce.createElement(_e.default.List,{name:Ir,rules:[{validator(or,Cr){return it?Cr!=null&&Cr.length?(Cr==null?void 0:Cr.reduce((Rr,tr)=>Rr+tr.score,0))>parseFloat(Ar)?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()}}]},(or,{add:Cr,remove:Lo})=>ce.createElement(ce.Fragment,null,ce.createElement("div",{className:`${Jt.title} mb10`},it?"\u5173\u952E\u8BCD":ce.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),ce.createElement(ht.Z,{align:"middle",className:"font14 mb30"},ce.createElement(dt.Z,{flex:1},ce.createElement(ct.default,{value:ho,onChange:Rr=>{_i(Rr.target.value)},maxLength:50,allowClear:!0,onPressEnter:Rr=>{var tr,cr,lr,Ii;const Do=`${(tr=Rr.target)==null?void 0:tr.value}`,Yr=(lr=(cr=Do==null?void 0:Do.split("|"))==null?void 0:cr.filter(br=>!!br))==null?void 0:lr.map(br=>br==null?void 0:br.trim()),ko=_t.getFieldValue(["sub_item_banks",...Ir]),Yo=((Ii=ko==null?void 0:ko.map(br=>br==null?void 0:br.keyword))==null?void 0:Ii.flat())||[];for(const br of Yr)if(Yo.includes(br)){mt.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}yu(Do)&&(Cr({keyword:Yr,score:1}),_i(""))},className:Jt.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"})),ce.createElement(dt.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),or.map(Rr=>{var tr=Rr,{key:cr,name:lr}=tr,Ii=wl(tr,["key","name"]);return ce.createElement(ht.Z,{key:cr,className:"mb20",style:{marginRight:148}},ce.createElement(dt.Z,{flex:1},ce.createElement(ht.Z,{align:"middle",justify:"space-between"},ce.createElement(_e.default.Item,Hs(Vl({},Ii),{name:[lr,"keyword"]}),ce.createElement(Cl,{onClose:()=>Lo(lr)})),it&&ce.createElement(_e.default.Item,Hs(Vl({},Ii),{name:[lr,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:Jt.blankInputNumberWrapper}),ce.createElement(Be.Z,{className:Jt.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),ce.createElement("div",{onClick:()=>Go(!0)},ce.createElement(_e.default.Item,{name:zr,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ce.createElement(fn,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:po}))))};var Fo=ve(59301),Ul=Object.defineProperty,$r=Object.defineProperties,Ko=Object.getOwnPropertyDescriptors,So=Object.getOwnPropertySymbols,Di=Object.prototype.hasOwnProperty,Ga=Object.prototype.propertyIsEnumerable,$a=(Kt,_t,mn)=>_t in Kt?Ul(Kt,_t,{enumerable:!0,configurable:!0,writable:!0,value:mn}):Kt[_t]=mn,bs=(Kt,_t)=>{for(var mn in _t||(_t={}))Di.call(_t,mn)&&$a(Kt,mn,_t[mn]);if(So)for(var mn of So(_t))Ga.call(_t,mn)&&$a(Kt,mn,_t[mn]);return Kt},El=(Kt,_t)=>$r(Kt,Ko(_t)),Dl=(Kt,_t)=>{var mn={};for(var it in Kt)Di.call(Kt,it)&&_t.indexOf(it)<0&&(mn[it]=Kt[it]);if(Kt!=null&&So)for(var it of So(Kt))_t.indexOf(it)<0&&Ga.call(Kt,it)&&(mn[it]=Kt[it]);return mn},bi=(Kt,_t,mn)=>new Promise((it,yn)=>{var zr=_r=>{try{Ir(mn.next(_r))}catch(jo){yn(jo)}},Bo=_r=>{try{Ir(mn.throw(_r))}catch(jo){yn(jo)}},Ir=_r=>_r.done?it(_r.value):Promise.resolve(_r.value).then(zr,Bo);Ir((mn=mn.apply(Kt,_t)).next())});const{Panel:Fa}=Wt.default,cs=null,bl=(Kt,_t)=>{var mn=Kt,{globalSetting:it,loading:yn,dispatch:zr,editData:Bo,onRef:Ir=()=>{},isEdit:_r}=mn,jo=Dl(mn,["globalSetting","loading","dispatch","editData","onRef","isEdit"]);const[po,Go]=(0,ce.useState)(""),[ho,_i]=(0,ce.useState)([]),[$i]=_e.default.useForm();(0,ce.useEffect)(()=>{!Bo||!_r||(Go(Bo==null?void 0:Bo.name),_i(Bo==null?void 0:Bo.sub_item_banks),$i.setFieldsValue(bs({},Bo)))},[Bo]),(0,ce.useEffect)(()=>{_i($i.getFieldValue("sub_item_banks"))},[_e.default.useWatch("sub_item_banks",$i)]),(0,ce.useImperativeHandle)(_t,()=>({onSave:Tr,Clear:Ar}));const Tr=()=>bi(void 0,null,function*(){if(!po)return mt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;try{yield $i.validateFields()}catch(cr){return console.log(cr,"errInfo"),mt.ZP.error(cr.errorFields[0].errors[0]),!1}const tr=ho.map(cr=>bs({id:cr.id>1?cr.id:null},cr));return{name:po,sub_item_banks:tr}}),Ar=()=>{Go(""),_i([])},or={single:"\u5355\u9009\u9898",multiple:"\u591A\u9009\u9898",judgement:"\u5224\u65AD\u9898",completion:"\u586B\u7A7A\u9898",subjective:"\u7B80\u7B54\u9898",practical:"\u5B9E\u8BAD\u9898",program:"\u7F16\u7A0B\u9898",bprogram:"\u7A0B\u5E8F\u586B\u7A7A\u9898",combination:"\u7EC4\u5408\u9898"},Cr=({value:tr})=>Fo.createElement("div",{style:{textAlign:"center",color:"#DF3065",margin:"0 5px"}},tr),[Lo,Rr]=(0,ce.useState)();return Fo.createElement("section",{className:ft.wrap},Fo.createElement("p",{className:ft.titleWrap},Fo.createElement("span",{className:ft.required},"*"),Fo.createElement("span",{className:ft.title},"\u9898\u5E72\uFF1A")),Fo.createElement(Bn.Z,{id:"combination-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:po,onChange:tr=>Go(tr)}),Fo.createElement(_e.default,{form:$i,autoComplete:"off"},Fo.createElement(_e.default.List,{name:"sub_item_banks",rules:[{validator(tr,cr){return cr?Promise.resolve():Promise.reject(new Error("\u8BF7\u6DFB\u52A0\u5C0F\u9898"))}}]},(tr,{add:cr,remove:lr})=>{const Ii=$i.getFieldValue("sub_item_banks");return Fo.createElement(Fo.Fragment,null,Fo.createElement(Wt.default,{className:tr.length>0?ft.collapseWrapper:"",bordered:!1,expandIcon:({isActive:Do})=>Fo.createElement("i",{className:`iconfont icon-weizhankai ${Do?ft.open:ft.close}`,style:{fontSize:14,transition:"all .2s"}})},tr.map((Do,Yr)=>{var ko=Do,{key:Yo,name:br}=ko,Oo=Dl(ko,["key","name"]),Bs,Wi,Ia,Vr,_a,Is,ju,Wh,Bh,ru,zu,aa;return Fo.createElement(Fa,{className:ft.panel,forceRender:!0,header:Fo.createElement("div",{className:ft.panelHeader},"\u7B2C",Yr+1,"\u5C0F\u9898",Fo.createElement("span",null,"\uFF08",or[(Bs=Ii==null?void 0:Ii[br])==null?void 0:Bs.item_type],"\uFF09")),extra:Fo.createElement(ht.Z,{align:"middle",onClick:Ml=>Ml.stopPropagation(),style:{display:"flex",alignItems:"center"}},((Wi=Ii==null?void 0:Ii[br])==null?void 0:Wi.item_type)=="completion"&&Fo.createElement(_e.default.Item,El(bs({},Oo),{name:[br,"score"],className:ft.blankInputNumberWrapper,style:{marginBottom:0}}),((Ia=Ii==null?void 0:Ii[br])==null?void 0:Ia.item_type)=="completion"&&Fo.createElement("div",{style:{display:"flex",alignItems:"center",color:"#191919"}},"\u5171",Fo.createElement(Cr,{value:(Vr=Ii==null?void 0:Ii[br])==null?void 0:Vr.score}),"\u5206")),((_a=Ii==null?void 0:Ii[br])==null?void 0:_a.item_type)=="completion"&&Fo.createElement(Fo.Fragment,null,Fo.createElement(lt.ZP.Group,{defaultValue:(Is=Ii==null?void 0:Ii[br])==null?void 0:Is.use_blank_score,className:ft.scoreByBlankRadio,style:{marginRight:10},optionType:"button",options:[{label:"\u6309\u7A7A\u7ED9\u5206",value:!0},{label:"\u6309\u9898\u7ED9\u5206",value:!1}],onChange:Ml=>{var Gh;console.log($i.getFieldsValue()),$i==null||$i.setFieldValue(["sub_item_banks",br,"use_blank_score"],(Gh=Ml==null?void 0:Ml.target)==null?void 0:Gh.value),Rr(new Date)}}),Fo.createElement(Ct.Z,{overlayInnerStyle:{width:460},title:Fo.createElement("div",null,"\u6309\u7A7A\u7ED9\u5206\uFF1A\u9700\u8981\u5206\u522B\u8BBE\u7F6E\u6BCF\u4E2A\u586B\u7A7A\u9879\u7684\u5206\u503C\uFF0C\u586B\u7A7A\u9879\u7B54\u5BF9\u4E4B\u540E\u5219\u83B7\u5F97\u5BF9\u5E94\u7684\u5206\u503C\u3002",Fo.createElement("br",null),"\u6309\u9898\u7ED9\u5206\uFF1A\u7B54\u5BF9\u5168\u90E8\u586B\u7A7A\u9879\u4E4B\u540E\u624D\u80FD\u83B7\u5F97\u8BE5\u5C0F\u9898\u7684\u5206\u503C\u3002")},Fo.createElement("i",{className:"icon-tishixiaowenhao font18 c-3061d0"})))),key:Yo},Fo.createElement(_e.default.Item,El(bs({},Oo),{name:br}),(((ju=Ii==null?void 0:Ii[br])==null?void 0:ju.item_type)=="single"||((Wh=Ii==null?void 0:Ii[br])==null?void 0:Wh.item_type)=="multiple")&&Fo.createElement(co,{questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9009\u62E9\u9898\u9898\u5E72\u5185\u5BB9",allowChangeMode:((Bh=Ii==null?void 0:Ii[br])==null?void 0:Bh.item_type)!="single",form:$i,choiceKey:[br,"choices"],titleKey:[br,"name"],analysisKey:[br,"analysis"],choiceOptionsPath:["sub_item_banks",br,"choices"],choiceTextKey:"choice_text",answerKey:"is_answer"}),((ru=Ii==null?void 0:Ii[br])==null?void 0:ru.item_type)=="completion"&&Fo.createElement(Or,{form:$i,name:br,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:[br,"use_blank_score"],titleKey:[br,"name"],analysisKey:[br,"analysis"],isOrdered:[br,"is_ordered"],answerKey:[br,"standard_answer"],key:Lo}),((zu=Ii==null?void 0:Ii[br])==null?void 0:zu.item_type)=="judgement"&&Fo.createElement(yo,{form:$i,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u5224\u65AD\u9898\u9898\u5E72\u5185\u5BB9",titleKey:[br,"name"],analysisKey:[br,"analysis"],choiceKey:[br,"choices"]}),((aa=Ii==null?void 0:Ii[br])==null?void 0:aa.item_type)=="subjective"&&Fo.createElement(ma,{showKeywords:!0,form:$i,titleKey:[br,"name"],analysisKey:[br,"analysis"],answerTexts:[br,"answer_texts"],useKeywords:[br,"use_keywords"],keywords:[br,"keywords"],indexs:br,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u7B80\u7B54\u9898\u9898\u5E72\u5185\u5BB9"})))})))})))};var Ol=(0,ze.connect)(({loading:Kt,globalSetting:_t})=>({globalSetting:_t,loading:Kt.effects}),null,null,{forwardRef:!0})((0,ce.forwardRef)(bl)),Il=ve(6021),Qr=ve(19842),Ju=ve(57809),nl=ve(1710),vs={flex_box_center:"flex_box_center___xDdtW",flex_space_between:"flex_space_between___J4mFI",flex_box_vertical_center:"flex_box_vertical_center___hDYn6",flex_box_center_end:"flex_box_center_end___H7l1j",flex_box_column:"flex_box_column___TPd2T",questionInfo:"questionInfo___ABq66",label:"label___VQOr7",content:"content____HZ6z",leftPart:"leftPart___YB0y5",rightPart:"rightPart___UVMmS",dragItem:"dragItem___Hbx8k",blackText:"blackText___U4u33",greyText:"greyText___rWIL_",iconWrapper:"iconWrapper___I0kek",contentArea:"contentArea___hGC13",dragging:"dragging___z7VVY",hidden:"hidden___nWAxb",dragIcon:"dragIcon___j91TC",deleteIcon:"deleteIcon___cmCqc",disabled:"disabled___ZlKMj",challengeNameWrapper:"challengeNameWrapper___SpiRb",challengeName:"challengeName___lmQe2",shixunPreviewFooter:"shixunPreviewFooter___u0CzD",shixunInfoWrapper:"shixunInfoWrapper___HzLHD",shixunInfo:"shixunInfo___qaQlF",btnToDetail:"btnToDetail___scXqr",fixedBottom:"fixedBottom___wTBAR",cancelBtn:"cancelBtn___Km4Gi",confirmBtn:"confirmBtn___WrECz",previewBtn:"previewBtn____oGPS",setScoreModalTable:"setScoreModalTable___CjDlp",title:"title___cQWdZ",tipcontent:"tipcontent___A8tZ5",name:"name___CvfT9",tip:"tip___EvoCF",info:"info___y_ayi",img:"img___X9CNn"},ys=ve(85057),Su=ve(94860),Iu=ve(92365),Ys=ve(83312),ul=ve(8797),Mh=ve(32570),Lh=({open:Kt,onCancel:_t,onOk:mn})=>{const it=(0,Su.g)(),[yn,zr,Bo,Ir]=(0,Ys.U)(Iu.Gm,{page:1,limit:10,keyword:"",diff:"",shixun_publish_status:"",discipline_id:"",sub_discipline_id:"",type:0,include_shixuns:!0,item_type:"SHIXUN"}),[_r,jo]=(0,ce.useState)(!1);(0,ce.useEffect)(()=>{Kt&&Bo({page:1,limit:10,type:0},!0).then($i=>{($i==null?void 0:$i.shixuns_count)===0&&jo(!0)})},[Kt]);const[po,Go]=(0,ce.useState)([]),[ho,_i]=(0,ce.useState)([]);return ce.createElement(Ke.default,{title:"\u9009\u62E9\u5B9E\u8BAD\u9898",open:Kt,width:948,centered:!0,closable:!0,onCancel:_t,onOk:()=>mn(ho),destroyOnClose:!0},ce.createElement(ht.Z,{justify:"space-between",className:"mb20",style:{maxHeight:650}},ce.createElement(dt.Z,null,ce.createElement(Qr.Z,{style:{width:160},size:"large",placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",options:it,onChange:$i=>{Bo({page:1,discipline_id:$i==null?void 0:$i[0],sub_discipline_id:$i==null?void 0:$i[1]})}}),ce.createElement(Ju.default,{className:"ml20",style:{width:118},size:"large",placeholder:"\u96BE\u5EA6",allowClear:!0,options:[{label:"\u521D\u7EA7",value:1},{label:"\u4E2D\u7EA7",value:2},{label:"\u4E2D\u9AD8\u7EA7",value:3},{label:"\u9AD8\u7EA7",value:4}],onChange:$i=>Bo({page:1,diff:$i})}),ce.createElement(Ju.default,{className:"ml20",placeholder:"\u5168\u90E8\u72B6\u6001",style:{width:118},size:"large",allowClear:!0,options:[{label:"\u672A\u53D1\u5E03",value:"unpublish"},{label:"\u9759\u9ED8\u53D1\u5E03",value:"silent_publish"},{label:"\u516C\u5F00\u53D1\u5E03",value:"public_publish"}],onChange:$i=>Bo({page:1,shixun_publish_status:$i})})),ce.createElement(ys.t7,{placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22",style:{width:290},onChange:$i=>{Bo({keyword:$i,page:1})}})),_r?ce.createElement("div",null,ce.createElement(ul.Z,{customText:"\u6682\u65E0\u6570\u636E",ButtonText:"\u524D\u5F80\u5B9E\u8DF5\u9879\u76EE\u5E93\uFF0C\u6DFB\u52A0\u66F4\u591A\u8BD5\u9898>",ButtonClick:()=>(0,et.xg)("/shixuns")})):ce.createElement(nl.default,{loading:zr,rowKey:"id",columns:[{title:"\u8BD5\u9898\u540D\u79F0",dataIndex:"name",width:"30%",ellipsis:{showTitle:!0},render:($i,Tr)=>ce.createElement("div",{style:{display:"flex",alignItems:"center"}},ce.createElement("div",{className:Tr!=null&&Tr.high_resources_consume?vs.title:"",title:$i||"--"},ce.createElement(Ie.Z,{key:1,showLines:1,showTextOnly:!0,value:$i||"--"})),(Tr==null?void 0:Tr.high_resources_consume)&&ce.createElement(Mh.Z,{type:"shixun",style:{marginLeft:10}}))},{title:"\u96BE\u5EA6",dataIndex:"level"},{title:"\u5173\u5361\u6570\u91CF",dataIndex:"challenges_count",key:"challenges_count",render:($i,Tr,Ar)=>ce.createElement("span",null,$i||"- -")},{title:"\u4F7F\u7528\u6B21\u6570",dataIndex:"study_count"},{title:ce.createElement("span",null,"\u53D1\u5E03\u72B6\u6001 ",ce.createElement(Ct.Z,{title:"\u672A\u53D1\u5E03\u7684\u5B9E\u8DF5\u9879\u76EE\u4E0D\u80FD\u88AB\u9009\u7528"},ce.createElement(_n.Z,null))),dataIndex:"shixun_tag_num_name",key:"shixun_tag_num_name",width:100,render:($i,Tr,Ar)=>ce.createElement("span",null,$i||"- -")},{title:"\u64CD\u4F5C",render($i,Tr){const{title:Ar,challenge_names:or,author_name:Cr,identifier:Lo,author_school_name:Rr,study_count:tr}=Tr||{};return ce.createElement("div",null,ce.createElement("span",{style:{color:"#165DFF",cursor:"pointer"},onClick:()=>{Ke.default.confirm({title:"\u9898\u76EE\u8BE6\u60C5",closable:!0,width:1e3,centered:!0,icon:null,footer:null,content:ce.createElement("div",null,ce.createElement(Ie.Z,{value:Ar,style:{marginBottom:18}}),ce.createElement("div",{className:vs.challengeNameWrapper},or.map((cr,lr)=>ce.createElement("div",{className:vs.challengeName,key:lr},"\u7B2C",(0,et.EM)(lr+1),"\u9898\xA0",cr))),ce.createElement(ht.Z,{className:vs.shixunPreviewFooter,justify:"space-between",style:{alignItems:"center"}},ce.createElement(dt.Z,{className:vs.shixunInfoWrapper},ce.createElement("span",null,"\u521B\u5EFA\u8005"),ce.createElement("span",{className:vs.shixunInfo},Cr.split("\u3001")[0]),ce.createElement("span",null,"\u6240\u5C5E\u5355\u4F4D"),ce.createElement("span",{className:vs.shixunInfo},Rr),ce.createElement("span",null,"\u5B66\u4E60\u4EBA\u6570"),ce.createElement("span",{className:vs.shixunInfo},tr)),ce.createElement(Ze.ZP,{type:"primary",className:vs.btnToDetail,onClick:()=>(0,et.xg)(`/shixuns/${Lo}/challenges?exercise=true`)},ce.createElement("i",{className:"iconfont icon-shixunkecheng"}),"\u5B9E\u8BAD\u8BE6\u60C5")))})}},"\u67E5\u770B"),(Tr==null?void 0:Tr.shixun_tag_num)===1&&ce.createElement("a",{target:"_blank",href:`/shixuns/${Tr==null?void 0:Tr.identifier}/challenges`,style:{marginLeft:10}},"\u53BB\u53D1\u5E03"))}}],dataSource:Ir==null?void 0:Ir.items,rowSelection:{type:"radio",selectedRowKeys:po,preserveSelectedRowKeys:!0,getCheckboxProps:$i=>({disabled:$i.shixun_tag_num===1}),onChange($i,Tr){var Ar,or,Cr;console.log($i),Go($i);const Lo=[];for(const tr of ho)$i.includes(tr.id)&&Lo.push(tr);const Rr=Lo.map(tr=>tr.id);for(const tr of Tr)tr&&$i.includes(tr.id)&&!Rr.includes(tr.id)&&Lo.push({id:tr.id,difficulty:tr.level,identifier:tr.identifier,name:tr.name,real_name:(Ar=tr==null?void 0:tr.author_name)==null?void 0:Ar.split("\u3001")[0],school_name:tr.author_school_name,challenge_names:tr.challenge_names,challenges:(or=tr.challenge_names)==null?void 0:or.map((cr,lr)=>({subject:cr,id:lr,score:5})),score:((Cr=tr.challenge_names)==null?void 0:Cr.length)*5,study_count:tr.study_count,challenges_count:tr.challenges_count});_i(Lo)}},pagination:{current:yn.page,pageSize:yn.limit,total:Ir==null?void 0:Ir.items_count,showTotal:$i=>ce.createElement("span",null,"\u5171\xA0",ce.createElement("span",{style:{color:"#165DFF"}},$i),"\xA0\u6761\u6570\u636E"),showQuickJumper:!0,onChange($i,Tr){Bo({page:$i,limit:Tr})},size:"default"},scroll:{y:400}}))},hc=ve(82438),Fh=ve(49692),Ru=(Kt,_t,mn)=>new Promise((it,yn)=>{var zr=_r=>{try{Ir(mn.next(_r))}catch(jo){yn(jo)}},Bo=_r=>{try{Ir(mn.throw(_r))}catch(jo){yn(jo)}},Ir=_r=>_r.done?it(_r.value):Promise.resolve(_r.value).then(zr,Bo);Ir((mn=mn.apply(Kt,_t)).next())}),Rl=({visible:Kt,getdata:_t,onCancel:mn,onRandomExchange:it,selectFromProblemSet:yn,questionParams:zr})=>{const[Bo,Ir]=(0,ce.useState)(!1),[_r,jo]=(0,ce.useState)(!1),[po,Go]=(0,ce.useState)({}),ho=(0,ze.useParams)(),[_i,$i]=(0,ce.useState)(),Tr=(Ar,or)=>Ru(void 0,null,function*(){jo(!0);const Cr=yield(0,$e.ZP)(`/api/exercises/${ho.categoryId}/toggle_random_question.json`,{method:"post",body:{question_id:zr.id,item_bank_id:Ar,shixuns_info:[{id:Ar,is_copy:or!=1,is_use:or!=1}]}});jo(!1),Cr!=null&&Cr.status||(mt.ZP.info("\u6362\u9898\u6210\u529F"),mn(),_t())});return ce.createElement(Ke.default,{title:"\u8BF7\u9009\u62E9\u66FF\u6362\u65B9\u5F0F",open:Kt,onCancel:mn,centered:!0,maskClosable:!0,footer:null},ce.createElement(ht.Z,{justify:"center",className:"pb20"},ce.createElement(Il.Z,{onClick:it},"\u968F\u673A\u66F4\u6362"),(zr==null?void 0:zr.type)!=="PRACTICAL"&&ce.createElement(Ze.ZP,{style:{marginLeft:24},onClick:yn},"\u4ECE\u9898\u5E93\u4E2D\u9009\u62E9"),(zr==null?void 0:zr.type)==="PRACTICAL"&&ce.createElement(Ze.ZP,{style:{marginLeft:24},onClick:()=>{Ir(!0)}},"\u4ECE\u9898\u5E93\u4E2D\u9009\u62E9")),ce.createElement(Lh,{open:Bo,onCancel:()=>Ir(!1),onOk:Ar=>Ru(void 0,null,function*(){if(console.log("----selectedRows",Ar,ho),(Ar==null?void 0:Ar.length)<=0){mt.ZP.info("\u8BF7\u9009\u62E9\u5B9E\u8BAD");return}let or=Ar==null?void 0:Ar.map(Lo=>Lo==null?void 0:Lo.id),Cr=yield(0,Fh.Tr)({id:[...or],course_id:ho.coursesId,type:"shixun"});(Cr==null?void 0:Cr.student_count)===0?Tr(or==null?void 0:or[0],1):($i(or),Go(Cr)),Ir(!1)})}),ce.createElement(hc.Z,{resdata:po,type:"shixun",okloading:_r,oktext:(po==null?void 0:po.can_copy_num)===0?"\u786E\u5B9A":"\u4E00\u952E\u590D\u5236\u5E76\u66FF\u6362",onok:Ar=>Ru(void 0,null,function*(){Tr(_i==null?void 0:_i[0],2)})}))},Hh=ve(94734),qu=ve(24334),eh=ve(69304),Co=ve(68042),Uo=ve(14165),Ws=Object.defineProperty,ds=Object.defineProperties,es=Object.getOwnPropertyDescriptors,Aa=Object.getOwnPropertySymbols,za=Object.prototype.hasOwnProperty,rs=Object.prototype.propertyIsEnumerable,Ka=(Kt,_t,mn)=>_t in Kt?Ws(Kt,_t,{enumerable:!0,configurable:!0,writable:!0,value:mn}):Kt[_t]=mn,Gs=(Kt,_t)=>{for(var mn in _t||(_t={}))za.call(_t,mn)&&Ka(Kt,mn,_t[mn]);if(Aa)for(var mn of Aa(_t))rs.call(_t,mn)&&Ka(Kt,mn,_t[mn]);return Kt},$s=(Kt,_t)=>ds(Kt,es(_t)),va=(Kt,_t,mn)=>new Promise((it,yn)=>{var zr=_r=>{try{Ir(mn.next(_r))}catch(jo){yn(jo)}},Bo=_r=>{try{Ir(mn.throw(_r))}catch(jo){yn(jo)}},Ir=_r=>_r.done?it(_r.value):Promise.resolve(_r.value).then(zr,Bo);Ir((mn=mn.apply(Kt,_t)).next())}),Mc=({data:Kt,submit:_t,goBack:mn,loading:it,onTypeScore:yn,editPreview:zr=!1,onSkipExamination:Bo,selectValue:Ir,onExchange:_r,getdata:jo,handleMarkWrongQuestion:po})=>{var Go,ho,_i,$i,Tr,Ar,or,Cr,Lo,Rr,tr;const cr=(0,ce.useRef)(),[lr,Ii]=(0,ce.useState)(null),[Do,Yr]=(0,ce.useState)(!1),[ko,Yo]=(0,ce.useState)(!1),br=(0,ce.useRef)(),[Oo]=_e.default.useForm(),Bs=(0,ze.useParams)(),[Wi,Ia]=(0,ce.useState)(!1);(0,ce.useEffect)(()=>{Yr(!0)},[]),(0,ce.useEffect)(()=>{zr||(0,et.Dk)("\u8BD5\u5377\u9884\u89C8")},[zr]);const Vr=["\u5BB9\u6613","\u7B80\u5355","\u9002\u4E2D","\u56F0\u96BE"],_a={SINGLE:"\u5355\u9009\u9898",MULTIPLE:"\u591A\u9009\u9898",JUDGMENT:"\u5224\u65AD\u9898",COMPLETION:"\u586B\u7A7A\u9898",SUBJECTIVE:"\u7B80\u7B54\u9898",PRACTICAL:"\u5B9E\u8BAD\u9898",PROGRAM:"\u7F16\u7A0B\u9898",BPROGRAM:"\u7A0B\u5E8F\u586B\u7A7A\u9898",COMBINATION:"\u7EC4\u5408\u9898"},Is={single:"\u5355\u9009\u9898",multiple:"\u591A\u9009\u9898",judgement:"\u5224\u65AD\u9898",completion:"\u586B\u7A7A\u9898",subjective:"\u7B80\u7B54\u9898",practical:"\u5B9E\u8BAD\u9898",program:"\u7F16\u7A0B\u9898",bprogram:"\u7A0B\u5E8F\u586B\u7A7A\u9898",combination:"\u7EC4\u5408\u9898"},ju=Zn=>{var Sr;const Jo=[];return ce.createElement(ce.Fragment,null,ce.createElement("aside",{className:De.single},(Sr=Zn==null?void 0:Zn.choices)==null?void 0:Sr.map((Je,Ye)=>(Je.is_answer&&Jo.push(Uo.k4[Ye]),ce.createElement("ul",{key:Ye},ce.createElement("li",null,Uo.k4[Ye],"\u3001"),ce.createElement("li",null,ce.createElement(Ie.Z,{value:Je.choice_text})))))),ce.createElement("div",{className:De.analysis},ce.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",Jo.join(""),ce.createElement("span",{className:"ml30"},"\u96BE\u5EA6\uFF1A",Vr[Zn.difficulty])),ce.createElement("aside",null,ce.createElement("span",{className:De.text},"\u89E3\u6790:"),ce.createElement(Ie.Z,{value:Zn.analysis?Zn.analysis:"\u6682\u65E0\u89E3\u6790"})),ce.createElement("ul",null,ce.createElement("li",null,ce.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(Zn==null?void 0:Zn.discipline_name)||"--"}/${Zn==null?void 0:Zn.sub_discipline_name}`),ce.createElement(Ct.Z,{title:Zn==null?void 0:Zn.tag_discipline_name},ce.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},ce.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),Zn==null?void 0:Zn.tag_discipline_name)))))},Wh=(Zn,Sr)=>{var Jo;const Je=(Jo=Zn==null?void 0:Zn.standard_answer)==null?void 0:Jo.map((Ye,jt)=>{var zt;return ce.createElement("div",{key:jt},`\u7B54\u6848\uFF08\u586B\u7A7A${Ye==null?void 0:Ye.position}\uFF09\uFF1A${(zt=Ye==null?void 0:Ye.answer_text)==null?void 0:zt.join("\u3001")}`)});return ce.createElement(ce.Fragment,null,ce.createElement("div",{className:De.analysis},ce.createElement("div",{style:{display:"flex"}},ce.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A"),ce.createElement("div",null,Je)),ce.createElement("aside",null,ce.createElement("span",{className:De.text},"\u89E3\u6790:"),ce.createElement(Ie.Z,{value:Zn.analysis?Zn.analysis:"\u6682\u65E0\u89E3\u6790"})),ce.createElement("ul",null,ce.createElement("li",null,ce.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),Sr?`${(Sr==null?void 0:Sr.discipline_name)||"--"}/${Sr==null?void 0:Sr.sub_discipline_name}`:`${(Zn==null?void 0:Zn.discipline_name)||"--"}/${Zn==null?void 0:Zn.sub_discipline_name}`),ce.createElement(Ct.Z,{title:Sr?Sr==null?void 0:Sr.tag_discipline_name:Zn==null?void 0:Zn.tag_discipline_name},ce.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},ce.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),Sr?Sr==null?void 0:Sr.tag_discipline_name:Zn==null?void 0:Zn.tag_discipline_name)))))},Bh=Zn=>{var Sr;const Jo=(Sr=Zn==null?void 0:Zn.standard_answer)==null?void 0:Sr.map((Je,Ye)=>ce.createElement("div",{key:Ye},`\u7B54\u6848\uFF08\u586B\u7A7A${(Je==null?void 0:Je.position)||(Je==null?void 0:Je.exercise_choice_id)}\uFF09\uFF1A${Je==null?void 0:Je.answer_text}`));return ce.createElement(ce.Fragment,null,ce.createElement("div",{className:De.analysis},ce.createElement("div",{style:{display:"flex"}},ce.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A"),ce.createElement("div",null,Jo)),ce.createElement("aside",null,ce.createElement("span",{className:De.text},"\u89E3\u6790:"),ce.createElement(Ie.Z,{value:Zn.analysis?Zn.analysis:"\u6682\u65E0\u89E3\u6790"})),ce.createElement("ul",null,ce.createElement("li",null,ce.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(Zn==null?void 0:Zn.discipline_name)||"--"}/${Zn==null?void 0:Zn.sub_discipline_name}`),ce.createElement(Ct.Z,{title:Zn==null?void 0:Zn.tag_discipline_name},ce.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},ce.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),Zn==null?void 0:Zn.tag_discipline_name)))))},ru=(Zn,Sr)=>{var Jo;return ce.createElement("div",{className:De.analysis},ce.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",(Jo=Zn==null?void 0:Zn.answer_texts)==null?void 0:Jo[0]),ce.createElement("aside",null,ce.createElement("span",{className:De.text},"\u89E3\u6790:"),ce.createElement(Ie.Z,{value:Zn.analysis?Zn.analysis:"\u6682\u65E0\u89E3\u6790"})),ce.createElement("ul",null,ce.createElement("li",null,ce.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),Sr?`${(Sr==null?void 0:Sr.discipline_name)||"--"}/${Sr==null?void 0:Sr.sub_discipline_name}`:`${(Zn==null?void 0:Zn.discipline_name)||"--"}/${Zn==null?void 0:Zn.sub_discipline_name}`),ce.createElement(Ct.Z,{title:Sr?Sr==null?void 0:Sr.tag_discipline_name:Zn==null?void 0:Zn.tag_discipline_name},ce.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},ce.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),Sr?Sr==null?void 0:Sr.tag_discipline_name:Zn==null?void 0:Zn.tag_discipline_name))))},zu=Zn=>{var Sr,Jo;return ce.createElement("div",{className:De.analysis},ce.createElement("aside",null,ce.createElement("span",{className:De.text},"\u9884\u671F\u8F93\u51FA:"),ce.createElement(Ie.Z,{value:(Sr=Zn==null?void 0:Zn.program_attr)==null?void 0:Sr.description})),ce.createElement("div",{style:{marginTop:20}},"\u6B63\u786E\u7B54\u6848\uFF1A",((Jo=Zn==null?void 0:Zn.program_attr)==null?void 0:Jo.answer_text)||"--"),ce.createElement("aside",null,ce.createElement("span",{className:De.text},"\u89E3\u6790:"),ce.createElement(Ie.Z,{value:Zn.analysis?Zn.analysis:"\u6682\u65E0\u89E3\u6790"})),ce.createElement("ul",null,ce.createElement("li",null,ce.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(Zn==null?void 0:Zn.discipline_name)||"--"}/${Zn==null?void 0:Zn.sub_discipline_name}`),ce.createElement(Ct.Z,{title:Zn==null?void 0:Zn.tag_discipline_name},ce.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},ce.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),Zn==null?void 0:Zn.tag_discipline_name))))},aa=(Zn,Sr)=>{var Jo;return ce.createElement("div",null,(Jo=Zn==null?void 0:Zn.sub_item_banks)==null?void 0:Jo.map((Je,Ye)=>{var jt,zt;const nn=[];return ce.createElement(ce.Fragment,null,ce.createElement("div",{style:{marginLeft:25,fontSize:"16px",color:"#333",paddingTop:"15px"}},Sr+1+"."+(Ye+1),"\uFF08",_a[Je.item_type]||Is[Je.item_type],"\uFF09",Je.name),(Je.item_type=="SINGLE"||Je.item_type=="MULTIPLE"||Je.item_type=="JUDGMENT"||Je.item_type=="single"||Je.item_type=="multiple"||Je.item_type=="judgement")&&ce.createElement(ce.Fragment,null,ce.createElement("aside",{className:De.single},(jt=Je==null?void 0:Je.choices)==null?void 0:jt.map((Ht,Mn)=>(Ht.is_answer&&nn.push(Uo.k4[Mn]),ce.createElement("ul",{key:Mn},ce.createElement("li",null,Uo.k4[Mn],"\u3001"),ce.createElement("li",null,ce.createElement(Ie.Z,{value:Ht.choice_text})))))),ce.createElement("div",{className:De.analysis},ce.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",nn.join(""),ce.createElement("span",{className:"ml30"},"\u96BE\u5EA6\uFF1A",Vr[Je.difficulty])),ce.createElement("aside",null,ce.createElement("span",{className:De.text},"\u89E3\u6790:"),ce.createElement(Ie.Z,{value:Je.analysis?Je.analysis:"\u6682\u65E0\u89E3\u6790"})),ce.createElement("ul",null,ce.createElement("li",null,ce.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(Zn==null?void 0:Zn.discipline_name)||"--"}/${Zn==null?void 0:Zn.sub_discipline_name}`),ce.createElement(Ct.Z,{title:Zn==null?void 0:Zn.tag_discipline_name},ce.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},ce.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),Zn==null?void 0:Zn.tag_discipline_name))))),(Je.item_type=="COMPLETION"||Je.item_type=="completion")&&Wh(Je,Zn),(Je.item_type=="SUBJECTIVE"||Je.item_type=="subjective")&&ru(Je,Zn),((zt=Kt==null?void 0:Kt.exam)==null?void 0:zt.exercise_status)===3&&ce.createElement("div",{className:"flex gap-20px mt20"},ce.createElement(eh.Z,{state:Je==null?void 0:Je.is_wrong,onClick:()=>{po==null||po({value:$s(Gs({},Je),{question_id:Je==null?void 0:Je.id,question_score:Je==null?void 0:Je.score})})}}),Je.item_type=="single"&&ce.createElement(Ze.ZP,{style:{color:"#3061D0"},onClick:()=>{Fc({value:Je})}},"\u589E\u8BBE\u6B63\u786E\u7B54\u6848")))}))},Ml=Zn=>{var Sr,Jo,Je;return ce.createElement("div",{style:{marginTop:"12px"}},(Jo=(Sr=Zn==null?void 0:Zn.shixun)==null?void 0:Sr.challenges)==null?void 0:Jo.map((Ye,jt)=>ce.createElement("div",{className:"c-grey-666 font14 mb10 ml25",style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},ce.createElement("div",null,ce.createElement("span",{className:"mr5"},"\u7B2C",jt+1,"\u5173"),ce.createElement(Ct.Z,{key:jt,title:Ye==null?void 0:Ye.challenge_name},ce.createElement("span",null,(0,et.Pq)(Ye==null?void 0:Ye.challenge_name,44)))),zr&&ce.createElement("div",null,"\u5206\u503C\uFF1A",Ye.score,"\u5206"))),ce.createElement(ze.Link,{style:{float:"right"},target:"_blank",to:`/shixuns/${(Je=Zn==null?void 0:Zn.shixun)==null?void 0:Je.identifier}/challenges`},"\u5B9E\u8BAD\u8BE6\u60C5"),ce.createElement("div",{style:{clear:"both"}}))},Gh=Zn=>{let Sr=Zn.questions_score/Zn.questions_count;Ke.default.confirm({icon:null,centered:!0,title:"\u5206\u6570\u8BBE\u7F6E",content:ce.createElement("div",{className:De.modalColumn},ce.createElement("div",{className:De.modalRow,style:{justifyContent:"flex-start"}},ce.createElement("sup",{className:De.sup},"*"),ce.createElement("span",null,Zn==null?void 0:Zn.name,"\uFF1A"),ce.createElement(Be.Z,{min:0,precision:1,defaultValue:Sr,onChange:Jo=>{Sr=Jo}}),ce.createElement("span",{className:"ml5"},"\u5206/\u9898"))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>va(void 0,null,function*(){var Jo;if(!Sr)return mt.ZP.warning("\u5206\u6570\u4E0D\u80FD\u4E3A\u7A7A\u6216\u4E3A0"),Promise.reject();const Je={type:Zn==null?void 0:Zn.type,score:Sr,scoreTotal:Number((Jo=Sr*Zn.questions_count)==null?void 0:Jo.toFixed(1))};yn(Je)})})},Nh=()=>{let Zn="";Ke.default.confirm({icon:null,centered:!0,title:"\u4FDD\u5B58\u8BD5\u5377",content:ce.createElement("div",{className:De.modalColumn},ce.createElement("div",{style:{color:"#676A6C",display:"flex",alignItems:"center"},className:"font14 mt20"},ce.createElement("img",{style:{marginRight:5},src:en.Z}),"\u4FDD\u5B58\u540E\u5355\u72EC\u751F\u6210\u4E00\u4EFD\u4EBA\u5DE5\u7EC4\u5377\u7C7B\u578B\u7684\u56FA\u5B9A\u8BD5\u5377\u3002"),ce.createElement("div",{className:De.modalRow,style:{marginTop:20}},ce.createElement("sup",{className:De.sup},"*"),ce.createElement("span",{style:{flexShrink:0}},"\u8BD5\u5377\u540D\u79F0\uFF1A"),ce.createElement(ct.default,{placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u540D\u79F0",min:0,maxLength:60,defaultValue:Zn,onChange:Sr=>{Zn=Sr.target.value}}))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>va(void 0,null,function*(){var Sr;if(!Zn)return mt.ZP.warning("\u8BD5\u5377\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"),Promise.reject();const Jo=[],Je=[],Ye=[],jt=[];(Sr=Kt==null?void 0:Kt.questionList)==null||Sr.forEach(nn=>{var Ht;(Ht=nn.questions)==null||Ht.forEach(Mn=>{let Sn=nn.questions_score/nn.questions_count;Sn=Sn&&Sn.toFixed(1),nn.type==="COMBINATION"&&Ye.push({id:Mn.id,sub_item_bank_ids:Mn.sub_item_banks.map(Fn=>Fn.id)}),nn.type==="PRACTICAL"?jt.push(Mn.id):(Jo.push(Mn.id),Je.push(Sn))})}),console.log("-----",Ye),yield _t({item_bank_ids:Jo,item_bank_scores:Je,name:Zn,combination_item_banks:Ye,shixun_ids:jt})})})},Od=(Zn,Sr,Jo,Je)=>{var Ye;const jt=`${location.pathname}${location.search}`,zt=(Ye=Je.questions)==null?void 0:Ye.map(nn=>nn==null?void 0:nn.id);if(jt.includes("exercise"))br.current={id:Zn,ids:zt,type:Sr,index:Jo},Yo(!0);else{let nn=Ke.default.confirm({icon:null,centered:!0,title:"\u6E29\u99A8\u63D0\u793A",content:"\u786E\u8BA4\u8981\u66F4\u6362\u8BE5\u8BD5\u9898\u5417\uFF1F",cancelButtonProps:{disabled:!1},maskClosable:!0,keyboard:!1,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>va(void 0,null,function*(){nn.update({cancelButtonProps:{disabled:!0}}),yield _r({single_question_id:Zn,seleted_item_bank_ids:zt},{type:Sr,index:Jo}),nn.update({cancelButtonProps:{disabled:!1}}),mt.ZP.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210\u8BD5\u9898")})})}},_u=Zn=>{var Sr;const Jo=(Sr=Zn.questions)==null?void 0:Sr.map(jt=>jt==null?void 0:jt.id),Je=Zn.name;let Ye=Ke.default.confirm({icon:null,centered:!0,title:"\u6E29\u99A8\u63D0\u793A",content:`\u786E\u8BA4\u66F4\u6362${Je}\u4E2D\u7684\u6240\u6709\u8BD5\u9898\u5417\uFF1F`,cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>va(void 0,null,function*(){Ye.update({cancelButtonProps:{disabled:!0}}),yield _r({seleted_item_bank_ids:Jo},{type:Zn.type}),Ye.update({cancelButtonProps:{disabled:!1}}),mt.ZP.success(`\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210${Je}\u8BD5\u9898`)})})},ou=()=>{let Zn=Ke.default.confirm({icon:null,centered:!0,title:"\u6E29\u99A8\u63D0\u793A",content:"\u786E\u8BA4\u66F4\u6362\u9884\u89C8\u4E2D\u7684\u6240\u6709\u8BD5\u9898\u5417\uFF1F",cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>va(void 0,null,function*(){Zn.update({cancelButtonProps:{disabled:!0}}),yield _r(),Zn.update({cancelButtonProps:{disabled:!1}}),mt.ZP.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210\u6574\u5F20\u8BD5\u9898")})})},xu=Zn=>{console.log(Zn,"key"),Bo(Zn-1)},Pu=(Zn,Sr)=>{var Jo,Je;if(Sr==="SINGLE")return ce.createElement(ce.Fragment,null,ce.createElement(ni,{ref:cr,editData:Zn,isEdit:!0}),ce.createElement(He.Z,null));if(Sr==="MULTIPLE")return ce.createElement(ce.Fragment,null,ce.createElement(mi,{ref:cr,editData:Zn,isEdit:!0}),ce.createElement(He.Z,null));if(Sr==="JUDGMENT")return ce.createElement(ce.Fragment,null,ce.createElement(pn,{ref:cr,editData:Zn,isEdit:!0}),ce.createElement(He.Z,null));if(Sr==="COMPLETION")return ce.createElement(ce.Fragment,null,ce.createElement(vt,{ref:cr,editData:Zn,isEdit:!0}),ce.createElement(He.Z,null));if(Sr==="SUBJECTIVE")return ce.createElement(ce.Fragment,null,ce.createElement(ri,{ref:cr,editData:Zn,isEdit:!0}),ce.createElement(He.Z,null));if(Sr==="COMBINATION")return ce.createElement(ce.Fragment,null,ce.createElement(Ol,{ref:cr,editData:Zn,isEdit:!0}),ce.createElement(He.Z,null));if(Sr==="BPROGRAM")return ce.createElement(ce.Fragment,null,ce.createElement(_e.default,{form:Oo,style:{marginTop:20},onFinishFailed:Ye=>{var jt,zt;Ye.errorFields[0].name.includes("standard_answers")?mt.ZP.error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"):mt.ZP.error(Ye.errorFields[0].errors[0]),Oo.scrollToField((zt=(jt=Ye==null?void 0:Ye.errorFields)==null?void 0:jt[0])==null?void 0:zt.name,{behavior:"smooth",block:"center"})},onFinish:Ye=>va(void 0,null,function*(){var jt;let zt=$s(Gs({question_score:Zn.score},Ye),{question_type:8,hack:$s(Gs({},Ye.hack),{difficult:Zn.program_attr.difficult}),hack_codes:$s(Gs({},Ye.hack_codes),{code:qu.Base64.encode((jt=Ye.hack_codes)==null?void 0:jt.code)})});Wi&&(zt.is_cover=1);const nn=yield(0,$e.ZP)(`/api/exercise_questions/${Zn.id}.json`,{method:"put",body:zt});(nn==null?void 0:nn.status)===0&&(mt.ZP.success("\u7F16\u8F91\u6210\u529F"),xu(Ir+1)),Ii(null)})},ce.createElement(Hh.tc,{form:Oo,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:!1,hackidentifier:(Jo=Zn==null?void 0:Zn.program_attr)==null?void 0:Jo.identifier,answerKey:"standard_answers"}),ce.createElement(He.Z,null)));if(Sr==="PROGRAM"&&ze.history.push(`/problems/${(Je=Zn==null?void 0:Zn.program_attr)==null?void 0:Je.identifier}/edit?type=exercises&express_id=${Bs.categoryId}&question_id=${Zn==null?void 0:Zn.id}&score=${Zn==null?void 0:Zn.score}&callback_url=${location.pathname}&select=${Ir}&exercise=true`),Sr==="PRACTICAL")return ce.createElement(ce.Fragment,null,ce.createElement(gi,{ref:cr,editData:Zn,isEdit:!0}),ce.createElement(He.Z,null))},dh=(Zn,Sr)=>va(void 0,null,function*(){var Jo,Je,Ye,jt,zt,nn;const Ht=yield(Jo=cr.current)==null?void 0:Jo.onSave();if(!Ht)return;const Mn=kn=>{const Jn=kn.map(wi=>wi.choice_text.trim().replace(/^\s+|\s+$/g,""));return new Set(Jn).size!==Jn.length},Sn={question_score:Sr.score,analysis:Ht.analysis};if(Zn==="SINGLE"||Zn==="MULTIPLE"||Zn==="JUDGMENT"){if(Zn!=="JUDGMENT"&&Mn(Ht==null?void 0:Ht.choices)){mt.ZP.error("\u9009\u62E9\u9898\u9009\u9879\u5185\u5BB9\u4E0D\u80FD\u91CD\u590D\uFF0C\u8BF7\u4FEE\u6539\u540E\u518D\u4FDD\u5B58");return}const kn=[],Jn=[];Sn.question_type=Zn==="JUDGMENT"?2:1,Sn.question_title=Ht==null?void 0:Ht.name,(Je=Ht==null?void 0:Ht.choices)==null||Je.forEach((ki,wi)=>{kn.push(ki.choice_text),ki!=null&&ki.is_answer&&Jn.push(wi+1)}),Sn.question_choices=kn,Sn.standard_answers=Jn}if(Zn==="COMPLETION"){let kn=(Ye=Ht==null?void 0:Ht.standard_answers)==null?void 0:Ye.map((wi,yi)=>(wi==null?void 0:wi.score)<=0?yi+1:null).filter(wi=>wi!==null);if((kn==null?void 0:kn.length)>0)return mt.ZP.warning(`\u7B2C${kn.join("\u3001")}\u9879\u7684\u5206\u503C\u4E0D\u80FD\u4E3A\u7A7A`),!1;let Jn=(jt=Ht==null?void 0:Ht.standard_answers)==null?void 0:jt.reduce((wi,yi)=>wi+(Number(yi==null?void 0:yi.score)||0),0);if(parseFloat(Jn.toFixed(2))!=(Sn==null?void 0:Sn.question_score))return mt.ZP.warning("\u5404\u586B\u7A7A\u9879\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E\u8BE5\u5C0F\u9898\u5206\u503C\uFF01"),!1;Sn.is_ordered=Ht.is_ordered,Sn.question_title=Ht==null?void 0:Ht.name,Sn.use_blank_score=Ht==null?void 0:Ht.use_blank_score,Sn.question_type=3;const ki=[];(zt=Ht==null?void 0:Ht.standard_answers)==null||zt.forEach((wi,yi)=>{ki.push({choice_id:wi.position,answer_text:wi.answer_text,score:wi.score})}),Sn.standard_answers=ki,Sn.downcase=Ht==null?void 0:Ht.downcase,Sn.no_space=Ht==null?void 0:Ht.no_space}if(Zn==="SUBJECTIVE"&&(console.log("editorData"),console.log(Ht),Sn.question_title=Ht==null?void 0:Ht.name,Sn.question_type=4,Sn.answer_texts=Ht==null?void 0:Ht.answer_texts,Sn.use_keywords=Ht==null?void 0:Ht.use_keywords,Sn.keywords=Ht==null?void 0:Ht.keywords),Zn==="COMBINATION"){Sn.question_title=Ht==null?void 0:Ht.name,Sn.question_type=7;try{Sn.sub_questions=(nn=Ht==null?void 0:Ht.sub_item_banks)==null?void 0:nn.map((kn,Jn)=>{var ki,wi,yi;if((kn==null?void 0:kn.item_type)=="single"||(kn==null?void 0:kn.item_type)=="multiple"){if(Mn(kn==null?void 0:kn.choices))throw new Error(`\u7B2C${Jn+1}\u5C0F\u9898\u9009\u9879\u5185\u5BB9\u91CD\u590D\uFF0C\u8BF7\u4FEE\u6539\u540E\u518D\u4FDD\u5B58`);const ar=[],Mi=[];return(ki=kn==null?void 0:kn.choices)==null||ki.forEach((Ui,Yi)=>{ar.push(Ui.choice_text),Ui!=null&&Ui.is_answer&&Mi.push(Yi+1)}),{id:kn.id,question_id:kn.id,question_title:kn.name,difficulty:kn.difficulty,question_type:(kn==null?void 0:kn.item_type)=="single"?0:(kn==null?void 0:kn.item_type)=="multiple"?1:2,question_choices:ar,standard_answers:Mi,analysis:kn.analysis,question_score:kn==null?void 0:kn.score}}else if((kn==null?void 0:kn.item_type)=="completion"){let ar=(wi=kn==null?void 0:kn.standard_answer)==null?void 0:wi.reduce((Ui,Yi)=>Ui+(Number(Yi==null?void 0:Yi.score)||0),0);if(parseFloat(ar.toFixed(2))!=(kn==null?void 0:kn.score))throw new Error("\u5404\u586B\u7A7A\u9879\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E\u8BE5\u5C0F\u9898\u5206\u503C\uFF01");const Mi=[];return(yi=kn==null?void 0:kn.standard_answer)==null||yi.forEach((Ui,Yi)=>{Mi.push({choice_id:Ui.position,answer_text:Ui.answer_text,score:Ui.score})}),{id:kn.id,question_id:kn.id,is_ordered:kn.is_ordered,question_title:kn.name,difficulty:kn.difficulty,question_type:3,standard_answers:Mi,use_blank_score:kn.use_blank_score,analysis:kn.analysis,downcase:kn==null?void 0:kn.downcase,no_space:kn==null?void 0:kn.no_space,question_score:kn==null?void 0:kn.score}}else if((kn==null?void 0:kn.item_type)=="subjective")return{id:kn.id,question_id:kn.id,question_title:kn.name,question_type:4,difficulty:kn.difficulty,answer_texts:kn==null?void 0:kn.answer_texts,analysis:kn.analysis,question_score:kn==null?void 0:kn.score,use_keywords:kn.use_keywords,keywords:kn==null?void 0:kn.keywords}})}catch(kn){mt.ZP.warning(kn.message);return}delete Sn.analysis}let Fn=!1;(Sr==null?void 0:Sr.is_my)===1&&(Fn=yield new Promise((Jn,ki)=>{Ke.default.confirm({title:"\u63D0\u793A",content:"\u6B64\u9898\u76EE\u5DF2\u5B58\u5728\u4E8E\u8BD5\u9898\u5E93\uFF0C\u662F\u5426\u5C06\u4FEE\u6539\u540E\u7684\u9898\u76EE\u8986\u76D6\u8BD5\u9898\u5E93\u7684\u539F\u9898\uFF1F",okText:"\u8986\u76D6\u539F\u9898",cancelText:"\u4E0D\u8986\u76D6",keyboard:!1,onOk:()=>{Jn(!0)},onCancel:()=>{Jn(!1)}})})),Fn&&(Sn.is_cover=1);const Qn=Zn!=="PRACTICAL"?yield(0,$e.ZP)(`/api/exercise_questions/${Sr.id}.json`,{method:"put",body:Sn}):yield(0,$e.ZP)(`/api/exercise_questions/${Sr.id}/update_shixun_score.json`,{method:"post",body:Gs({},Ht)});(Qn==null?void 0:Qn.status)===0&&(mt.ZP.success("\u7F16\u8F91\u6210\u529F"),xu(Ir+1),Ii(null))}),Lc=()=>va(void 0,null,function*(){(0,ze.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u66F4\u65B0\u8BD5\u5377\uFF0C\u8BF7\u7A0D\u540E..."}}),(yield(0,$e.ZP)(`/api/exercises/${Bs.categoryId}/sync_random_question.json`,{method:"post"})).status===0&&(yield Bo(Ir),mt.ZP.success("\u66F4\u65B0\u6210\u529F")),(0,ze.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1}})}),Fc=({value:Zn}={})=>{var Sr;const Jo=[];let Je=[];const Ye=(Sr=Zn==null?void 0:Zn.choices)==null?void 0:Sr.map((zt,nn)=>{var Ht;const Mn=nn+1;return zt!=null&&zt.is_answer&&(Jo.push(Mn),Je.push(Mn)),{value:Mn,label:ce.createElement(Ie.Z,{className:"c-black font14",value:`${(Ht=Uo.k4)==null?void 0:Ht[nn]}. ${zt==null?void 0:zt.choice_text}`}),disabled:zt==null?void 0:zt.origin_standard_answer}}),jt=Ke.default.confirm({centered:!0,icon:null,title:"\u589E\u8BBE\u6B63\u786E\u7B54\u6848",width:800,content:ce.createElement(ce.Fragment,null,"\u5F53\u524D\u8BD5\u9898\u7684\u6B63\u786E\u7B54\u6848\u4E3A ",Jo==null?void 0:Jo.map(zt=>{var nn;return(nn=Uo.k4)==null?void 0:nn[zt-1]}),"\uFF0C\u8BF7\u9009\u62E9\u9700\u8981\u589E\u8BBE\u4E3A\u6B63\u786E\u7B54\u6848\u7684\u9009\u9879\u3002",ce.createElement("br",null),"\u52FE\u9009\u63D0\u4EA4\u4E4B\u540E\uFF0C\u9009\u4E2D\u589E\u8BBE\u4E3A\u6B63\u786E\u7B54\u6848\u4EFB\u4E00\u9009\u9879\u7684\u5B66\u751F\u4E5F\u4F1A\u83B7\u5F97\u8BE5\u5C0F\u9898\u7684\u5206\u503C\uFF0C\u4F46\u4E0D\u4F1A\u4FEE\u6539\u5F53\u524D\u8BD5\u9898\u7684\u9898\u578B\u3002\u53D6\u6D88\u52FE\u9009\u63D0\u4EA4\u4E4B\u540E\uFF0C\u4E5F\u4F1A\u91CD\u65B0\u8BA1\u7B97\u5BF9\u5E94\u5B66\u751F\u7684\u5F97\u5206\u3002",ce.createElement("br",null),ce.createElement(Et.default.Group,{className:"flex-col mt20",options:Ye,defaultValue:Je,onChange:zt=>{Je=zt}})),onOk:()=>va(void 0,null,function*(){const zt=yield(0,$e.ZP)(`/api/exercises/${Bs.categoryId}/questions/${Zn==null?void 0:Zn.id}/add_standard_answers.json`,{method:"put",body:{standard_answer:Je}});(zt==null?void 0:zt.status)===0&&(mt.ZP.success("\u4FEE\u6539\u6210\u529F"),xu(Ir+1))})})},Bc=(Go=Kt==null?void 0:Kt.questionList)==null?void 0:Go.reduce((Zn,Sr)=>Zn+Number(Sr.questions_score),0),od=zr&&((ho=Kt==null?void 0:Kt.exam)==null?void 0:ho.exercise_status)!==1;return ce.createElement("section",{className:De.wrap},ce.createElement("div",{id:"id_left_preview",className:De.left,onMouseEnter:Zn=>{const Sr=document.getElementById("id_left_preview");Sr.style.overflowY="auto"},onMouseLeave:Zn=>{const Sr=document.getElementById("id_left_preview");Sr.style.overflowY="hidden"}},ce.createElement("div",{className:De.title},ce.createElement("div",{className:"body-overflow-initial"},ce.createElement("b",null),ce.createElement("span",null,"\u7B54\u9898\u5361"))),ce.createElement("div",{className:De.total},ce.createElement("div",null,ce.createElement("img",{src:Zt}),ce.createElement("span",null,"\u9898\u6570(\u9053)"),ce.createElement("aside",null,Kt==null?void 0:Kt.all_questions_count)),ce.createElement("div",{className:"mr30 ml30"},ce.createElement("img",{src:Gt}),ce.createElement("span",null,"\u603B\u5206(\u5206)"),ce.createElement("aside",null,Bc&&Bc.toFixed(1))),ce.createElement("div",null,ce.createElement("img",{src:Me}),ce.createElement("span",null,"\u65F6\u957F(\u5206)"),ce.createElement("aside",null,((_i=Kt==null?void 0:Kt.exam)==null?void 0:_i.time)===-1||(($i=Kt==null?void 0:Kt.exam)==null?void 0:$i.time)===null?"\u4E0D\u9650":(Tr=Kt==null?void 0:Kt.exam)==null?void 0:Tr.time))),(Ar=Kt==null?void 0:Kt.questionList)==null?void 0:Ar.map((Zn,Sr)=>{var Jo;return ce.createElement("div",{className:De.list,key:Sr},ce.createElement("div",{className:De.name},ce.createElement("b",null),ce.createElement("span",null,Zn.name)),ce.createElement("aside",null,ce.createElement("div",null,"\u5171",ce.createElement("span",{className:De.b},Zn.questions_count),"\u9898 ",ce.createElement("span",{className:De.l},"|"),"\u5171",ce.createElement("span",{className:De.r},Zn.questions_score),"\u5206"),ce.createElement("div",{className:De.answerSheet},(Jo=Zn==null?void 0:Zn.questions)==null?void 0:Jo.map((Je,Ye)=>ce.createElement("div",{onClick:()=>{const jt=`Anchor_${Je==null?void 0:Je.id}`;let zt=document.getElementById(jt);zt&&setTimeout(()=>zt.scrollIntoView({block:"center",behavior:"smooth"}))},key:Je==null?void 0:Je.id,className:De.tag},Ye+1)))))})),ce.createElement("div",{className:De.right},ce.createElement("div",{className:De.examName,id:"examName"},ce.createElement("div",{className:De.name},ce.createElement(Ct.Z,{title:(or=Kt==null?void 0:Kt.exam)==null?void 0:or.name,getPopupContainer:Zn=>Zn.parentNode},ce.createElement("span",{className:De.t},(Cr=Kt==null?void 0:Kt.exam)==null?void 0:Cr.name))),zr&&((Lo=Kt==null?void 0:Kt.exam)==null?void 0:Lo.exercise_status)===1&&ce.createElement(ys.op,{openLoading:!0,shape:"default",onClick:()=>{Ke.default.confirm({title:"\u63D0\u793A",content:"\u786E\u8BA4\u6839\u636E\u6700\u65B0\u7684\u968F\u673A\u7EC4\u5377\u62BD\u9898\u89C4\u5219\u91CD\u65B0\u751F\u6210\u8BD5\u5377\u5417\uFF1F",onOk:()=>{Lc()}})},type:"primary"},"\u66F4\u65B0\u8BD5\u5377"),!zr&&ce.createElement(Ze.ZP,{onClick:ou,type:"primary"},"\u968F\u673A\u66F4\u6362")),ce.createElement("div",{className:De.topWarp},(Rr=Kt==null?void 0:Kt.questionList)==null?void 0:Rr.map((Zn,Sr)=>{var Jo,Je;return ce.createElement(ce.Fragment,{key:Sr},ce.createElement("div",{className:De.head,style:Sr===0?{border:0,marginTop:-16}:{}},ce.createElement("div",{className:De.name},ce.createElement("b",null),ce.createElement("span",null,Zn.name)),ce.createElement("div",{className:De.so},"\u5171",ce.createElement("span",{className:De.b},Zn.questions_count," "),"\u9898 ",Zn.type==="COMBINATION"&&`\uFF08\u5305\u542B${(Jo=Zn==null?void 0:Zn.questions)==null?void 0:Jo.map(Ye=>{var jt;return(jt=Ye==null?void 0:Ye.sub_item_banks)==null?void 0:jt.length}).reduce((Ye,jt)=>Ye+jt)}\u5C0F\u9898\uFF09`,ce.createElement("span",{className:De.l},"|"),"\u5171",ce.createElement("span",{className:De.r},Zn.questions_score),"\u5206"),!zr&&ce.createElement("div",{className:De.btn},ce.createElement(Ze.ZP,{onClick:()=>{Gh(Zn)},type:"primary",ghost:!0,className:"mr20"},"\u8BBE\u7F6E\u5F97\u5206"),ce.createElement(Ze.ZP,{onClick:()=>_u(Zn),type:"primary",ghost:!0},"\u968F\u673A\u66F4\u6362"))),(Je=Zn==null?void 0:Zn.questions)==null?void 0:Je.map((Ye,jt)=>{var zt,nn,Ht,Mn;return lr===(Ye==null?void 0:Ye.id)?ce.createElement("div",{id:`Anchor_${Ye==null?void 0:Ye.id}`,className:De.content,style:{padding:0,marginTop:24},key:Ye==null?void 0:Ye.id},ce.createElement("div",{style:{float:"right",marginTop:`${(Zn==null?void 0:Zn.type)==="PRACTICAL"?"-2px":"-6px"}`}},ce.createElement(Ze.ZP,{onClick:()=>Ii(null),className:"mr20",type:"primary",ghost:!0},"\u53D6\u6D88"),ce.createElement(Ze.ZP,{onClick:()=>{dh(Zn==null?void 0:Zn.type,Ye)},type:"primary"},"\u4FDD\u5B58")),Pu(Ye,Zn.type)):ce.createElement("div",{id:`Anchor_${Ye==null?void 0:Ye.id}`,className:De.content,key:Ye==null?void 0:Ye.id},ce.createElement("div",{className:De.titleWrap},(Ye==null?void 0:Ye.item_type)==="bprogram"?ce.createElement(Ie.Z,{style:{paddingRight:10},value:jt+1+"\u3001"+((zt=Ye==null?void 0:Ye.program_attr)==null?void 0:zt.description)}):ce.createElement(Ie.Z,{style:{paddingRight:10},className:De.titleHtml,value:jt+1+`\u3001${(Ye==null?void 0:Ye.item_type)==="combination"?"\uFF08\u9898\u5E72\uFF09":""}`+(Ye==null?void 0:Ye.name)}),zr&&ce.createElement(Ze.ZP,{onClick:()=>{var Sn,Fn,Qn;if(lr){mt.ZP.warning("\u5148\u4FDD\u5B58\u6216\u53D6\u6D88\u5F53\u524D\u6B63\u5728\u7F16\u8F91\u7684\u8BD5\u9898");return}Oo.setFieldsValue({standard_answers:Ye==null?void 0:Ye.standard_answer,hack:Gs(Gs({},Ye),Ye==null?void 0:Ye.program_attr),hack_codes:$s(Gs({},Ye==null?void 0:Ye.program_attr),{code:qu.Base64.decode(((Sn=Ye==null?void 0:Ye.program_attr)==null?void 0:Sn.code)||"")}),hack_sets:Gs({},(Fn=Ye==null?void 0:Ye.hack_sets)==null?void 0:Fn[0])}),(Ye==null?void 0:Ye.item_type)=="program"?ze.history.push(`/problems/newedit/${(Qn=Ye==null?void 0:Ye.program_attr)==null?void 0:Qn.identifier}?type=exercises&express_id=${Bs.categoryId}&question_id=${Ye==null?void 0:Ye.id}&score=${Ye==null?void 0:Ye.score}&exercise=true&callback_url=/classrooms/${Bs.coursesId}/exercise/${Bs.categoryId}/detail?random=true`):Ii(Ye==null?void 0:Ye.id)},type:"primary",style:{marginLeft:"auto"},ghost:!0},"\u7F16\u8F91"),!od&&ce.createElement(Ze.ZP,{disabled:od,className:"ml20",onClick:()=>Od(Ye==null?void 0:Ye.id,Zn.type,jt,Zn),type:"primary",ghost:!0},"\u6362\u4E00\u9898")),(Ye==null?void 0:Ye.item_type)==="bprogram"&&ce.createElement(Ie.Z,{style:{paddingRight:10,paddingLeft:25},showProgramFill:!0,disabledFill:!0,className:De.titleHtml,value:qu.Base64.decode(((nn=Ye==null?void 0:Ye.program_attr)==null?void 0:nn.code)||"")}),(Zn.type==="SINGLE"||Zn.type==="JUDGMENT"||Zn.type==="MULTIPLE")&&ju(Ye),Zn.type==="COMPLETION"&&Wh(Ye),Zn.type==="SUBJECTIVE"&&ru(Ye),Zn.type==="PROGRAM"&&zu(Ye),Zn.type==="BPROGRAM"&&Bh(Ye),Zn.type==="COMBINATION"&&aa(Ye,jt),Zn.type==="PRACTICAL"&&Ml(Ye),ce.createElement(ht.Z,{className:"mt20",wrap:!1,align:"middle",gutter:20},((Ht=Kt==null?void 0:Kt.exam)==null?void 0:Ht.exercise_status)===3&&!["PROGRAM","BPROGRAM","PRACTICAL","COMBINATION"].includes(Zn.type)&&ce.createElement(dt.Z,null,ce.createElement(eh.Z,{state:Ye==null?void 0:Ye.is_wrong,onClick:()=>{po==null||po({value:$s(Gs({},Ye),{question_id:Ye==null?void 0:Ye.id,question_score:Ye==null?void 0:Ye.score})})}})),["PROGRAM","BPROGRAM","PRACTICAL"].includes(Zn.type)&&(Ye==null?void 0:Ye.show_resubmit)&&ce.createElement(dt.Z,null,ce.createElement(Co.C,{dataSource:$s(Gs({},Ye),{question_id:Ye==null?void 0:Ye.id})})),((Mn=Kt==null?void 0:Kt.exam)==null?void 0:Mn.exercise_status)===3&&["SINGLE"].includes(Zn.type)&&ce.createElement(dt.Z,null,ce.createElement(Ze.ZP,{style:{color:"#3061D0"},onClick:()=>{Fc({value:Ye})}},"\u589E\u8BBE\u6B63\u786E\u7B54\u6848"))))}))}))),zr?ce.createElement(ys.vr,null,ce.createElement(Ae.Z,{showTotal:et.rU,total:(tr=Kt==null?void 0:Kt.exam)==null?void 0:tr.total_num,pageSize:1,current:Ir+1,showSizeChanger:!1,onChange:xu,showQuickJumper:!1,hideOnSinglePage:!1})):ce.createElement(ys.vr,{LeftContent:ce.createElement(ys.op,{onClick:mn,shape:"default",style:{height:38,background:"#fff",boxShadow:"none"}},"\u8FD4\u56DE"),RightContent:ce.createElement(ht.Z,{align:"middle"},ce.createElement(te.Z,{color:"#55575D",overlayClassName:De.popover,open:Do,getPopupContainer:Zn=>Zn==null?void 0:Zn.parentNode,content:"\u5982\u60A8\u5BF9\u6B64\u4EFD\u8BD5\u9898\u6EE1\u610F\uFF0C\u53EF\u5C06\u6B64\u4EFD\u8BD5\u9898\u4FDD\u5B58\u4E3A\u56FA\u5B9A\u8BD5\u5377"},ce.createElement(ys.op,{onMouseEnter:()=>Yr(!0),onMouseLeave:()=>Yr(!1),onClick:()=>Nh(),shape:"default",style:{height:38,background:"#fff",boxShadow:"none"}},"\u4FDD\u5B58")),ce.createElement(ys.op,{shape:"default",type:"primary",onClick:()=>_t(),style:{height:38,marginLeft:20}},"\u63D0\u4EA4"))}),ce.createElement(Rl,{visible:ko,questionParams:br.current,getdata:jo,onRandomExchange:()=>va(void 0,null,function*(){const Zn=br.current;yield _r({single_question_id:Zn.id,seleted_item_bank_ids:Zn.ids},{type:Zn.type,index:Zn.index}),Yo(!1)}),selectFromProblemSet:()=>{const Zn=br.current,Sr=`${location.pathname}${location.search}`;Sr.includes("exercise")&&ze.history.push(`/paperlibrary/exchangequestion?type=exercise&qid=${Zn.id}&qtype=${Zn.type}&exerciseid=${Bs.categoryId}&from=${Sr}`)},onCancel:()=>{Yo(!1)}}))}},76175:function(Pn,an,ve){"use strict";ve.r(an),ve.d(an,{default:function(){return se}});var ce=ve(59301),De=ve(89070),_e={flex_box_center:"flex_box_center___kQBcj",flex_space_between:"flex_space_between___Znlbo",flex_box_vertical_center:"flex_box_vertical_center___CPD50",flex_box_center_end:"flex_box_center_end___jzPvK",flex_box_column:"flex_box_column___cvIBS",wrap:"wrap___lab8O",crumbs:"crumbs___qvTza"},Ct=ve(92744),Ze=ve(8591),Ke=ve(61621),Be=ve(99064),mt=ve(955),ct=ve(59301),He=Object.defineProperty,Et=Object.getOwnPropertySymbols,ht=Object.prototype.hasOwnProperty,dt=Object.prototype.propertyIsEnumerable,Ae=(de,me,we)=>me in de?He(de,me,{enumerable:!0,configurable:!0,writable:!0,value:we}):de[me]=we,te=(de,me)=>{for(var we in me||(me={}))ht.call(me,we)&&Ae(de,we,me[we]);if(Et)for(var we of Et(me))dt.call(me,we)&&Ae(de,we,me[we]);return de},ee=(de,me,we)=>new Promise((be,Me)=>{var Ie=$e=>{try{et(we.next($e))}catch(gt){Me(gt)}},ze=$e=>{try{et(we.throw($e))}catch(gt){Me(gt)}},et=$e=>$e.done?be($e.value):Promise.resolve($e.value).then(Ie,ze);et((we=we.apply(de,me)).next())});const he=({paperlibrary:de,user:me,globalSetting:we,dispatch:be,location:Me})=>{var Ie,ze,et,$e;const[gt]=(0,De.useSearchParams)(),je=gt.get("select")||0,[Tt,Qe]=(0,ce.useState)(!1),[bt,Nt]=(0,ce.useState)(!0),[At,Zt]=(0,ce.useState)(Number(je)),[Yt,ut]=(0,ce.useState)({}),Ge=(0,De.useParams)(),{userInfo:kt}=me,{actionTabs:ln}=de;(0,ce.useEffect)(()=>(be({type:"globalSetting/footerToggle",payload:!1}),()=>{be({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,ce.useEffect)(()=>(be({type:"globalSetting/onlyShowBackTopToggle",payload:!1}),be({type:"globalSetting/onlyShowBackTopIconToggle",payload:!1}),be({type:"exercise/getWorkSetting",payload:te({},Ge)}),()=>{be({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),be({type:"globalSetting/onlyShowBackTopIconToggle",payload:!0})}),[]),(0,ce.useEffect)(()=>{sn(At)},[]),(0,ce.useEffect)(()=>{var Cn;(Cn=ln==null?void 0:ln.params)!=null&&Cn.isUpdateData&&sn(At)},[(Ie=ln==null?void 0:ln.params)==null?void 0:Ie.isUpdateData]);const sn=(Cn=0)=>ee(void 0,null,function*(){console.log(Ge),Nt(!0);const ft=yield(0,Be.ZP)(`/api/exercises/${Ge.categoryId}/preview_random_exercise.json`,{method:"get",params:{num:Cn}});be({type:"paperlibrary/setActionTabs",payload:{params:{isUpdateData:!1}}}),Nt(!1),ut((0,mt.PF)(ft))}),Bt=()=>{De.history.push(`/classrooms/${Ge.coursesId}/exercise`)},Gt=()=>{alert("\u4FDD\u5B58")},en=(Cn,ft)=>ee(void 0,null,function*(){const En=yield(0,Be.ZP)(`/api/exercises/${Ge.categoryId}/toggle_random_question.json`,{method:"post",body:{question_id:Cn==null?void 0:Cn.single_question_id}});En!=null&&En.question&&(Ze.ZP.info("\u6362\u9898\u6210\u529F"),sn(At))}),Bn=Cn=>ee(void 0,null,function*(){document.body.scrollIntoView(),Zt(Cn),yield sn(Cn)}),rn=Cn=>{be({type:"exercise/setActionTabs",payload:{key:"\u6807\u8BB0\u9519\u9898",params:Cn}})};return console.log((0,De.useLocation)(),"location333"),ct.createElement("section",{className:_e.wrap},ct.createElement(Ke.Z,{loading:bt,active:!0,paragraph:{rows:5}},((et=(ze=(0,De.useLocation)())==null?void 0:ze.pathname)==null?void 0:et.includes("preview"))&&ct.createElement("div",{className:_e.crumbs},ct.createElement("b",null),ct.createElement("span",{className:"current",onClick:()=>De.history.push(`/classrooms/${Ge.coursesId}/exercise`)},`${($e=kt==null?void 0:kt.course)==null?void 0:$e.course_name}>`),ct.createElement("span",{className:"current",onClick:()=>De.history.push(`/classrooms/${Ge.coursesId}/exercise`)},"\u8BD5\u5377\u5217\u8868>"),ct.createElement("span",{style:{color:"#bebebe"}},"\u9884\u89C8")),ct.createElement(Ct.Z,{loading:Tt,submit:Gt,goBack:Bt,data:Yt,getdata:()=>{sn(At)},selectValue:At,editPreview:!0,onExchange:en,onSkipExamination:Bn,handleMarkWrongQuestion:rn})))};var se=(0,De.connect)(({paperlibrary:de,user:me,globalSetting:we})=>({paperlibrary:de,user:me,globalSetting:we}))(he)},94860:function(Pn,an,ve){"use strict";ve.d(an,{g:function(){return Ze}});var ce=ve(59301),De=ve(80401),_e=ve(26422),Ct=(Ke,Be,mt)=>new Promise((ct,He)=>{var Et=Ae=>{try{dt(mt.next(Ae))}catch(te){He(te)}},ht=Ae=>{try{dt(mt.throw(Ae))}catch(te){He(te)}},dt=Ae=>Ae.done?ct(Ae.value):Promise.resolve(Ae.value).then(Et,ht);dt((mt=mt.apply(Ke,Be)).next())});const Ze=()=>{const[Ke,Be]=(0,ce.useState)([]);return(0,ce.useEffect)(()=>{Ct(void 0,null,function*(){const ct=yield(0,De.d1)({source:"question"});ct!=null&&ct.disciplines&&Be((0,_e.L)(ct==null?void 0:ct.disciplines))})},[]),Ke}},83312:function(Pn,an,ve){"use strict";ve.d(an,{U:function(){return ct}});var ce=ve(59301),De=Object.defineProperty,_e=Object.getOwnPropertySymbols,Ct=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable,Ke=(He,Et,ht)=>Et in He?De(He,Et,{enumerable:!0,configurable:!0,writable:!0,value:ht}):He[Et]=ht,Be=(He,Et)=>{for(var ht in Et||(Et={}))Ct.call(Et,ht)&&Ke(He,ht,Et[ht]);if(_e)for(var ht of _e(Et))Ze.call(Et,ht)&&Ke(He,ht,Et[ht]);return He},mt=(He,Et,ht)=>new Promise((dt,Ae)=>{var te=se=>{try{he(ht.next(se))}catch(de){Ae(de)}},ee=se=>{try{he(ht.throw(se))}catch(de){Ae(de)}},he=se=>se.done?dt(se.value):Promise.resolve(se.value).then(te,ee);he((ht=ht.apply(He,Et)).next())});function ct(He,Et){const[ht,dt]=(0,ce.useState)(Et),[Ae,te]=(0,ce.useState)(!1),[ee,he]=(0,ce.useState)();return[ht,Ae,(de,me=!1)=>mt(this,null,function*(){const we=me?Et:Be(Be({},ht),de);te(!0),dt(we);const be=yield He(we);return te(!1),he(be),be}),ee,he]}},24768:function(Pn,an,ve){"use strict";ve.d(an,{AL:function(){return we},Iy:function(){return Et},Qv:function(){return Ae},ez:function(){return me},jb:function(){return ht}});var ce=ve(32834),De=ve.n(ce),_e=ve(11690),Ct=ve.n(_e);let Ze=1;function Ke(et,$e){const gt=et.match(/^(\s+)(?:```)/);if(gt===null)return $e;const je=gt[1];return $e.split(`
|
|
|
`).map(Tt=>{const Qe=Tt.match(/^\s+/);if(Qe===null)return Tt;const[bt]=Qe;return bt.length>=je.length?Tt.slice(je.length):Tt}).join(`
|
|
|
`)}let Be=[],mt=["<ul>"];const ct=new(De()).Renderer,He=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Et(){Be.length=0,mt=["<ul>"]}const ht={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function dt(et,$e,gt,je){if($e>=et.length||et[$e].level<=gt)return $e;var Tt=et[$e];je.push("<li><a href='#"+Ze+Tt.anchor+"'>"+Tt.text+"</a>"),$e++;var Qe=[];return $e=dt(et,$e,Tt.level,Qe),Qe.length>0&&(je.push("<ul>"),Qe.forEach(function(bt){je.push(bt)}),je.push("</ul>")),je.push("</li>"),$e=dt(et,$e,gt,je),$e}function Ae(){return dt(Be,0,0,mt),mt.push("</ul>"),mt.join("")}const te={heading(et){const $e=He.exec(et);if(Ze+=1,$e)return{type:"heading",raw:$e[0],depth:$e[1].length,text:$e[2]}},fences(et){const $e=this.rules.block.fences.exec(et);if($e){const gt=$e[0];let je=Ke(gt,$e[3]||"");const Tt=$e[2]?$e[2].trim():$e[2];if(["latex","katex","math"].indexOf(Tt)>=0){const Qe=se(),bt=je;je=Qe,de[Qe]={type:"block",expression:bt}}return{type:"code",raw:gt,lang:Tt,text:je}}}},ee=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let he=0;const se=()=>`__special_katext_id_${he++}__`;let de={};function me(){return de}function we(){he=0,de={}}function be(et){return et=et.replace(ee,($e,gt)=>{const je=se();return de[je]={type:"inline",expression:gt},je}),et}const Me=ct.listitem;ct.listitem=function(et){return Me(be(et))};const Ie=ct.paragraph;ct.paragraph=function(et){return Ie(be(et))};const ze=ct.tablecell;ct.tablecell=function(et,$e){return ze(be(et),$e)},ct.code=function(et,$e,gt){const je=($e||"").match(/\S*/)[0];return je?["latex","katex","math"].indexOf(je)>=0?`<p class='editormd-tex'>${et}</p>`:`<pre class="prettyprint linenums"><code class="language-${$e}">${gt?et:(0,_e.escape)(et,!0)}</code></pre>
|
|
|
`:'<pre class="prettyprint linenums"><code>'+(gt?et:(0,_e.escape)(et,!0))+"</code></pre>"},ct.heading=function(et,$e,gt){let je=this.options.headerPrefix+gt.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Be.push({anchor:je,level:$e,text:et}),"<h"+$e+' id="'+Ze+je+'">'+et+"</h"+$e+">"},De().setOptions({silent:!0,gfm:!0,pedantic:!1}),De().use({tokenizer:te,renderer:ct}),an.ZP=De()},50371:function(Pn,an){"use strict";function ve(){const ce=Object.assign({},arguments.length<=0?void 0:arguments[0]);for(let De=1;De<arguments.length;De++){const _e=De<0||arguments.length<=De?void 0:arguments[De];_e&&Object.keys(_e).forEach(Ct=>{const Ze=_e[Ct];Ze!==void 0&&(ce[Ct]=Ze)})}return ce}an.Z=ve},77578:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return ce}});const ce=De=>De?typeof De=="function"?De():De:null},13845:function(Pn,an,ve){"use strict";ve.d(an,{F:function(){return ce},Z:function(){return De}});function ce(_e){return _e!=null&&_e===_e.window}function De(_e,Ct){var Ze,Ke;if(typeof window=="undefined")return 0;const Be=Ct?"scrollTop":"scrollLeft";let mt=0;return ce(_e)?mt=_e[Ct?"pageYOffset":"pageXOffset"]:_e instanceof Document?mt=_e.documentElement[Be]:(_e instanceof HTMLElement||_e)&&(mt=_e[Be]),_e&&!ce(_e)&&typeof mt!="number"&&(mt=(Ke=((Ze=_e.ownerDocument)!==null&&Ze!==void 0?Ze:_e).documentElement)===null||Ke===void 0?void 0:Ke[Be]),mt}},56762:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return De}});var ce=ve(59301);function De(){const[,_e]=ce.useReducer(Ct=>Ct+1,0);return _e}},68031:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return Ct}});var ce=ve(16089);function De(Ze,Ke,Be,mt){const ct=Be-Ke;return Ze/=mt/2,Ze<1?ct/2*Ze*Ze*Ze+Ke:ct/2*((Ze-=2)*Ze*Ze+2)+Ke}var _e=ve(13845);function Ct(Ze){let Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:Be=()=>window,callback:mt,duration:ct=450}=Ke,He=Be(),Et=(0,_e.Z)(He,!0),ht=Date.now(),dt=()=>{const te=Date.now()-ht,ee=De(te>ct?ct:te,Et,Ze,ct);(0,_e.F)(He)?He.scrollTo(window.pageXOffset,ee):He instanceof Document||He.constructor.name==="HTMLDocument"?He.documentElement.scrollTop=ee:He.scrollTop=ee,te<ct?(0,ce.Z)(dt):typeof mt=="function"&&mt()};(0,ce.Z)(dt)}},19842:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return Hi}});var ce=ve(19127),De=ve(59301),_e=ve(33853),Ct=ve(58617),Ze=ve(38819),Ke=ve(92310),Be=ve.n(Ke),mt=ve(96663),ct=ve(72071),He=ve(6620),Et=ve(77861),ht=ve(17115),dt=ve(90782),Ae=ve(6089),te=ve(18929),ee=De.createContext(null),he=ee,se=ve(20135),de=ve(90493),me=ve(44127),we="__rc_cascader_search_mark__",be=function(ni,vi,Fi){var _n=Fi.label;return vi.some(function(Dn){return String(Dn[_n]).toLowerCase().includes(ni.toLowerCase())})},Me=function(ni,vi,Fi,_n){return vi.map(function(Dn){return Dn[_n.label]}).join(" / ")},Ie=function(hn,ni,vi,Fi,_n,Dn){var Ft=_n.filter,Ot=Ft===void 0?be:Ft,Ve=_n.render,Ut=Ve===void 0?Me:Ve,tn=_n.limit,xt=tn===void 0?50:tn,rt=_n.sort;return De.useMemo(function(){var Vt=[];if(!hn)return[];function on(xn,An){var yt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;xn.forEach(function(cn){if(!(!rt&&xt!==!1&&xt>0&&Vt.length>=xt)){var On=[].concat((0,ce.Z)(An),[cn]),ri=cn[vi.children],Wt=yt||cn.disabled;if((!ri||ri.length===0||Dn)&&Ot(hn,On,{label:vi.label})){var Jt;Vt.push((0,me.Z)((0,me.Z)({},cn),{},(Jt={disabled:Wt},(0,de.Z)(Jt,vi.label,Ut(hn,On,Fi,vi)),(0,de.Z)(Jt,we,On),(0,de.Z)(Jt,vi.children,void 0),Jt)))}ri&&on(cn[vi.children],On,Wt)}})}return on(ni,[]),rt&&Vt.sort(function(xn,An){return rt(xn[we],An[we],hn,vi)}),xt!==!1&&xt>0?Vt.slice(0,xt):Vt},[hn,ni,vi,Fi,Ut,Dn,Ot,rt,xt])},ze="__RC_CASCADER_SPLIT__",et="SHOW_PARENT",$e="SHOW_CHILD";function gt(hn){return hn.join(ze)}function je(hn){return hn.map(gt)}function Tt(hn){return hn.split(ze)}function Qe(hn){var ni=hn||{},vi=ni.label,Fi=ni.value,_n=ni.children,Dn=Fi||"value";return{label:vi||"label",value:Dn,key:Dn,children:_n||"children"}}function bt(hn,ni){var vi,Fi;return(vi=hn.isLeaf)!==null&&vi!==void 0?vi:!((Fi=hn[ni.children])!==null&&Fi!==void 0&&Fi.length)}function Nt(hn){var ni=hn.parentElement;if(ni){var vi=hn.offsetTop-ni.offsetTop;vi-ni.scrollTop<0?ni.scrollTo({top:vi}):vi+hn.offsetHeight-ni.scrollTop>ni.offsetHeight&&ni.scrollTo({top:vi+hn.offsetHeight-ni.offsetHeight})}}function At(hn,ni){return hn.map(function(vi){var Fi;return(Fi=vi[we])===null||Fi===void 0?void 0:Fi.map(function(_n){return _n[ni.value]})})}function Zt(hn,ni,vi){var Fi=new Set(hn),_n=ni();return hn.filter(function(Dn){var Ft=_n[Dn],Ot=Ft?Ft.parent:null,Ve=Ft?Ft.children:null;return Ft&&Ft.node.disabled?!0:vi===$e?!(Ve&&Ve.some(function(Ut){return Ut.key&&Fi.has(Ut.key)})):!(Ot&&!Ot.node.disabled&&Fi.has(Ot.key))})}function Yt(hn,ni,vi){for(var Fi=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,_n=ni,Dn=[],Ft=function(){var Ut,tn,xt,rt=hn[Ot],Vt=(Ut=_n)===null||Ut===void 0?void 0:Ut.findIndex(function(xn){var An=xn[vi.value];return Fi?String(An)===String(rt):An===rt}),on=Vt!==-1?(tn=_n)===null||tn===void 0?void 0:tn[Vt]:null;Dn.push({value:(xt=on==null?void 0:on[vi.value])!==null&&xt!==void 0?xt:rt,index:Vt,option:on}),_n=on==null?void 0:on[vi.children]},Ot=0;Ot<hn.length;Ot+=1)Ft();return Dn}var ut=function(hn,ni,vi,Fi,_n){return De.useMemo(function(){var Dn=_n||function(Ft){var Ot=Fi?Ft.slice(-1):Ft,Ve=" / ";return Ot.every(function(Ut){return["string","number"].includes((0,se.Z)(Ut))})?Ot.join(Ve):Ot.reduce(function(Ut,tn,xt){var rt=De.isValidElement(tn)?De.cloneElement(tn,{key:xt}):tn;return xt===0?[rt]:[].concat((0,ce.Z)(Ut),[Ve,rt])},[])};return hn.map(function(Ft){var Ot,Ve,Ut=Yt(Ft,ni,vi),tn=Dn(Ut.map(function(rt){var Vt,on=rt.option,xn=rt.value;return(Vt=on==null?void 0:on[vi.label])!==null&&Vt!==void 0?Vt:xn}),Ut.map(function(rt){var Vt=rt.option;return Vt})),xt=gt(Ft);return{label:tn,value:xt,key:xt,valueCells:Ft,disabled:(Ot=Ut[Ut.length-1])===null||Ot===void 0||(Ve=Ot.option)===null||Ve===void 0?void 0:Ve.disabled}})},[hn,ni,vi,_n,Fi])},Ge=ve(71430),kt=function(hn,ni){var vi=De.useRef({options:null,info:null}),Fi=De.useCallback(function(){return vi.current.options!==hn&&(vi.current.options=hn,vi.current.info=(0,Ge.I8)(hn,{fieldNames:ni,initWrapper:function(Dn){return(0,me.Z)((0,me.Z)({},Dn),{},{pathKeyEntities:{}})},processEntity:function(Dn,Ft){var Ot=Dn.nodes.map(function(Ve){return Ve[ni.value]}).join(ze);Ft.pathKeyEntities[Ot]=Dn,Dn.key=Ot}})),vi.current.info.pathKeyEntities},[ni,hn]);return Fi},ln=function(hn,ni){return De.useCallback(function(vi){var Fi=[],_n=[];return vi.forEach(function(Dn){var Ft=Yt(Dn,hn,ni);Ft.every(function(Ot){return Ot.option})?_n.push(Dn):Fi.push(Dn)}),[_n,Fi]},[hn,ni])},sn=ve(48736);function Bt(hn){return De.useMemo(function(){if(!hn)return[!1,{}];var ni={matchInputWidth:!0,limit:50};return hn&&(0,se.Z)(hn)==="object"&&(ni=(0,me.Z)((0,me.Z)({},ni),hn)),ni.limit<=0&&delete ni.limit,[!0,ni]},[hn])}var Gt=De.memo(function(hn){var ni=hn.children;return ni},function(hn,ni){return!ni.open}),en=Gt;function Bn(hn){var ni,vi=hn.prefixCls,Fi=hn.checked,_n=hn.halfChecked,Dn=hn.disabled,Ft=hn.onClick,Ot=hn.disableCheckbox,Ve=De.useContext(he),Ut=Ve.checkable,tn=typeof Ut!="boolean"?Ut:null;return De.createElement("span",{className:Be()("".concat(vi),(ni={},(0,de.Z)(ni,"".concat(vi,"-checked"),Fi),(0,de.Z)(ni,"".concat(vi,"-indeterminate"),!Fi&&_n),(0,de.Z)(ni,"".concat(vi,"-disabled"),Dn||Ot),ni)),onClick:Ft},tn)}var rn="__cascader_fix_label__";function Cn(hn){var ni=hn.prefixCls,vi=hn.multiple,Fi=hn.options,_n=hn.activeValue,Dn=hn.prevValuePath,Ft=hn.onToggleOpen,Ot=hn.onSelect,Ve=hn.onActive,Ut=hn.checkedSet,tn=hn.halfCheckedSet,xt=hn.loadingKeys,rt=hn.isSelectable,Vt=hn.searchValue,on="".concat(ni,"-menu"),xn="".concat(ni,"-menu-item"),An=De.useContext(he),yt=An.fieldNames,cn=An.changeOnSelect,On=An.expandTrigger,ri=An.expandIcon,Wt=An.loadingIcon,Jt=An.dropdownMenuColumnStyle,hi=On==="hover",ci=De.useMemo(function(){return Fi.map(function(ui){var qn,di=ui.disabled,li=ui.disableCheckbox,Ai=ui[we],er=(qn=ui[rn])!==null&&qn!==void 0?qn:ui[yt.label],sr=ui[yt.value],vn=bt(ui,yt),Nr=Ai?Ai.map(function(Ei){return Ei[yt.value]}):[].concat((0,ce.Z)(Dn),[sr]),Dr=gt(Nr),ir=xt.includes(Dr),fn=Ut.has(Dr),jn=tn.has(Dr);return{disabled:di,label:er,value:sr,isLeaf:vn,isLoading:ir,checked:fn,halfChecked:jn,option:ui,disableCheckbox:li,fullPath:Nr,fullPathKey:Dr}})},[Fi,Ut,yt,tn,xt,Dn]);return De.createElement("ul",{className:on,role:"menu"},ci.map(function(ui){var qn,di=ui.disabled,li=ui.label,Ai=ui.value,er=ui.isLeaf,sr=ui.isLoading,vn=ui.checked,Nr=ui.halfChecked,Dr=ui.option,ir=ui.fullPath,fn=ui.fullPathKey,jn=ui.disableCheckbox,Ei=function(){if(!(di||Vt)){var ur=(0,ce.Z)(ir);hi&&er&&ur.pop(),Ve(ur)}},zi=function(){rt(Dr)&&Ot(ir,er)},Ni;return typeof Dr.title=="string"?Ni=Dr.title:typeof li=="string"&&(Ni=li),De.createElement("li",{key:fn,className:Be()(xn,(qn={},(0,de.Z)(qn,"".concat(xn,"-expand"),!er),(0,de.Z)(qn,"".concat(xn,"-active"),_n===Ai||_n===fn),(0,de.Z)(qn,"".concat(xn,"-disabled"),di),(0,de.Z)(qn,"".concat(xn,"-loading"),sr),qn)),style:Jt,role:"menuitemcheckbox",title:Ni,"aria-checked":vn,"data-path-key":fn,onClick:function(){Ei(),!jn&&(!vi||er)&&zi()},onDoubleClick:function(){cn&&Ft(!1)},onMouseEnter:function(){hi&&Ei()},onMouseDown:function(ur){ur.preventDefault()}},vi&&De.createElement(Bn,{prefixCls:"".concat(ni,"-checkbox"),checked:vn,halfChecked:Nr,disabled:di||jn,disableCheckbox:jn,onClick:function(ur){jn||(ur.stopPropagation(),zi())}}),De.createElement("div",{className:"".concat(xn,"-content")},li),!sr&&ri&&!er&&De.createElement("div",{className:"".concat(xn,"-expand-icon")},ri),sr&&Wt&&De.createElement("div",{className:"".concat(xn,"-loading-icon")},Wt))}))}var ft=function(){var hn=(0,Et.lk)(),ni=hn.multiple,vi=hn.open,Fi=De.useContext(he),_n=Fi.values,Dn=De.useState([]),Ft=(0,ct.Z)(Dn,2),Ot=Ft[0],Ve=Ft[1];return De.useEffect(function(){if(vi&&!ni){var Ut=_n[0];Ve(Ut||[])}},[vi]),[Ot,Ve]},En=ve(10228),Vn=function(hn,ni,vi,Fi,_n,Dn){var Ft=(0,Et.lk)(),Ot=Ft.direction,Ve=Ft.searchValue,Ut=Ft.toggleOpen,tn=Ft.open,xt=Ot==="rtl",rt=De.useMemo(function(){for(var Jt=-1,hi=ni,ci=[],ui=[],qn=Fi.length,di=At(ni,vi),li=function(Dr){var ir=hi.findIndex(function(fn,jn){return(di[jn]?gt(di[jn]):fn[vi.value])===Fi[Dr]});if(ir===-1)return"break";Jt=ir,ci.push(Jt),ui.push(Fi[Dr]),hi=hi[Jt][vi.children]},Ai=0;Ai<qn&&hi;Ai+=1){var er=li(Ai);if(er==="break")break}for(var sr=ni,vn=0;vn<ci.length-1;vn+=1)sr=sr[ci[vn]][vi.children];return[ui,Jt,sr,di]},[Fi,vi,ni]),Vt=(0,ct.Z)(rt,4),on=Vt[0],xn=Vt[1],An=Vt[2],yt=Vt[3],cn=function(hi){_n(hi)},On=function(hi){var ci=An.length,ui=xn;ui===-1&&hi<0&&(ui=ci);for(var qn=0;qn<ci;qn+=1){ui=(ui+hi+ci)%ci;var di=An[ui];if(di&&!di.disabled){var li=on.slice(0,-1).concat(yt[ui]?gt(yt[ui]):di[vi.value]);cn(li);return}}},ri=function(){if(on.length>1){var hi=on.slice(0,-1);cn(hi)}else Ut(!1)},Wt=function(){var hi,ci=((hi=An[xn])===null||hi===void 0?void 0:hi[vi.children])||[],ui=ci.find(function(di){return!di.disabled});if(ui){var qn=[].concat((0,ce.Z)(on),[ui[vi.value]]);cn(qn)}};De.useImperativeHandle(hn,function(){return{onKeyDown:function(hi){var ci=hi.which;switch(ci){case En.Z.UP:case En.Z.DOWN:{var ui=0;ci===En.Z.UP?ui=-1:ci===En.Z.DOWN&&(ui=1),ui!==0&&On(ui);break}case En.Z.LEFT:{if(Ve)break;xt?Wt():ri();break}case En.Z.RIGHT:{if(Ve)break;xt?ri():Wt();break}case En.Z.BACKSPACE:{Ve||ri();break}case En.Z.ENTER:{if(on.length){var qn=An[xn],di=(qn==null?void 0:qn[we])||[];di.length?Dn(di.map(function(li){return li[vi.value]}),di[di.length-1]):Dn(on,An[xn])}break}case En.Z.ESC:Ut(!1),tn&&hi.stopPropagation()}},onKeyUp:function(){}}})},Re=De.forwardRef(function(hn,ni){var vi,Fi,_n,Dn,Ft=(0,Et.lk)(),Ot=Ft.prefixCls,Ve=Ft.multiple,Ut=Ft.searchValue,tn=Ft.toggleOpen,xt=Ft.notFoundContent,rt=Ft.direction,Vt=Ft.open,on=De.useRef(),xn=rt==="rtl",An=De.useContext(he),yt=An.options,cn=An.values,On=An.halfValues,ri=An.fieldNames,Wt=An.changeOnSelect,Jt=An.onSelect,hi=An.searchOptions,ci=An.dropdownPrefixCls,ui=An.loadData,qn=An.expandTrigger,di=ci||Ot,li=De.useState([]),Ai=(0,ct.Z)(li,2),er=Ai[0],sr=Ai[1],vn=function(Bi){if(!(!ui||Ut)){var Po=Yt(Bi,yt,ri),ao=Po.map(function(Hr){var ro=Hr.option;return ro}),Vi=ao[ao.length-1];if(Vi&&!bt(Vi,ri)){var qi=gt(Bi);sr(function(Hr){return[].concat((0,ce.Z)(Hr),[qi])}),ui(ao)}}};De.useEffect(function(){er.length&&er.forEach(function(co){var Bi=Tt(co),Po=Yt(Bi,yt,ri,!0).map(function(Vi){var qi=Vi.option;return qi}),ao=Po[Po.length-1];(!ao||ao[ri.children]||bt(ao,ri))&&sr(function(Vi){return Vi.filter(function(qi){return qi!==co})})})},[yt,er,ri]);var Nr=De.useMemo(function(){return new Set(je(cn))},[cn]),Dr=De.useMemo(function(){return new Set(je(On))},[On]),ir=ft(),fn=(0,ct.Z)(ir,2),jn=fn[0],Ei=fn[1],zi=function(Bi){Ei(Bi),vn(Bi)},Ni=function(Bi){var Po=Bi.disabled,ao=bt(Bi,ri);return!Po&&(ao||Wt||Ve)},Gi=function(Bi,Po){var ao=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Jt(Bi),!Ve&&(Po||Wt&&(qn==="hover"||ao))&&tn(!1)},ur=De.useMemo(function(){return Ut?hi:yt},[Ut,hi,yt]),Qi=De.useMemo(function(){for(var co=[{options:ur}],Bi=ur,Po=At(Bi,ri),ao=function(){var ro=jn[Vi],xi=Bi.find(function(uo,Zo){return(Po[Zo]?gt(Po[Zo]):uo[ri.value])===ro}),tt=xi==null?void 0:xi[ri.children];if(!(tt!=null&&tt.length))return"break";Bi=tt,co.push({options:tt})},Vi=0;Vi<jn.length;Vi+=1){var qi=ao();if(qi==="break")break}return co},[ur,jn,ri]),rr=function(Bi,Po){Ni(Po)&&Gi(Bi,bt(Po,ri),!0)};Vn(ni,ur,ri,jn,zi,rr),De.useEffect(function(){for(var co=0;co<jn.length;co+=1){var Bi,Po=jn.slice(0,co+1),ao=gt(Po),Vi=(Bi=on.current)===null||Bi===void 0?void 0:Bi.querySelector('li[data-path-key="'.concat(ao.replace(/\\{0,2}"/g,'\\"'),'"]'));Vi&&Nt(Vi)}},[jn]);var fr=!((vi=Qi[0])!==null&&vi!==void 0&&(Fi=vi.options)!==null&&Fi!==void 0&&Fi.length),Nn=[(_n={},(0,de.Z)(_n,ri.value,"__EMPTY__"),(0,de.Z)(_n,rn,xt),(0,de.Z)(_n,"disabled",!0),_n)],Jr=(0,me.Z)((0,me.Z)({},hn),{},{multiple:!fr&&Ve,onSelect:Gi,onActive:zi,onToggleOpen:tn,checkedSet:Nr,halfCheckedSet:Dr,loadingKeys:er,isSelectable:Ni}),Ln=fr?[{options:Nn}]:Qi,Zr=Ln.map(function(co,Bi){var Po=jn.slice(0,Bi),ao=jn[Bi];return De.createElement(Cn,(0,mt.Z)({key:Bi},Jr,{searchValue:Ut,prefixCls:di,options:co.options,prevValuePath:Po,activeValue:ao}))});return De.createElement(en,{open:Vt},De.createElement("div",{className:Be()("".concat(di,"-menus"),(Dn={},(0,de.Z)(Dn,"".concat(di,"-menu-empty"),fr),(0,de.Z)(Dn,"".concat(di,"-rtl"),xn),Dn)),ref:on},Zr))}),Ce=Re;function Pe(hn){var ni=hn.onPopupVisibleChange,vi=hn.popupVisible,Fi=hn.popupClassName,_n=hn.popupPlacement;warning(!ni,"`onPopupVisibleChange` is deprecated. Please use `onDropdownVisibleChange` instead."),warning(vi===void 0,"`popupVisible` is deprecated. Please use `open` instead."),warning(Fi===void 0,"`popupClassName` is deprecated. Please use `dropdownClassName` instead."),warning(_n===void 0,"`popupPlacement` is deprecated. Please use `placement` instead.")}function Ne(hn,ni){if(hn){var vi=function Fi(_n){for(var Dn=0;Dn<_n.length;Dn++){var Ft=_n[Dn];if(Ft[ni==null?void 0:ni.value]===null)return warning(!1,"`value` in Cascader options should not be `null`."),!0;if(Array.isArray(Ft[ni==null?void 0:ni.children])&&Fi(Ft[ni==null?void 0:ni.children]))return!0}};vi(hn)}}var ke=null,Se=["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 nt(hn){return Array.isArray(hn)&&Array.isArray(hn[0])}function Pt(hn){return hn?nt(hn)?hn:(hn.length===0?[]:[hn]).map(function(ni){return Array.isArray(ni)?ni:[ni]}):[]}var qe=De.forwardRef(function(hn,ni){var vi=hn.id,Fi=hn.prefixCls,_n=Fi===void 0?"rc-cascader":Fi,Dn=hn.fieldNames,Ft=hn.defaultValue,Ot=hn.value,Ve=hn.changeOnSelect,Ut=hn.onChange,tn=hn.displayRender,xt=hn.checkable,rt=hn.autoClearSearchValue,Vt=rt===void 0?!0:rt,on=hn.searchValue,xn=hn.onSearch,An=hn.showSearch,yt=hn.expandTrigger,cn=hn.options,On=hn.dropdownPrefixCls,ri=hn.loadData,Wt=hn.popupVisible,Jt=hn.open,hi=hn.popupClassName,ci=hn.dropdownClassName,ui=hn.dropdownMenuColumnStyle,qn=hn.popupPlacement,di=hn.placement,li=hn.onDropdownVisibleChange,Ai=hn.onPopupVisibleChange,er=hn.expandIcon,sr=er===void 0?">":er,vn=hn.loadingIcon,Nr=hn.children,Dr=hn.dropdownMatchSelectWidth,ir=Dr===void 0?!1:Dr,fn=hn.showCheckedStrategy,jn=fn===void 0?et:fn,Ei=(0,He.Z)(hn,Se),zi=(0,ht.ZP)(vi),Ni=!!xt,Gi=(0,te.Z)(Ft,{value:Ot,postState:Pt}),ur=(0,ct.Z)(Gi,2),Qi=ur[0],rr=ur[1],fr=De.useMemo(function(){return Qe(Dn)},[JSON.stringify(Dn)]),Nn=De.useMemo(function(){return cn||[]},[cn]),Jr=kt(Nn,fr),Ln=De.useCallback(function(No){var yo=Jr();return No.map(function(ta){var na=yo[ta].nodes;return na.map(function(Na){return Na[fr.value]})})},[Jr,fr]),Zr=(0,te.Z)("",{value:on,postState:function(yo){return yo||""}}),co=(0,ct.Z)(Zr,2),Bi=co[0],Po=co[1],ao=function(yo,ta){Po(yo),ta.source!=="blur"&&xn&&xn(yo)},Vi=Bt(An),qi=(0,ct.Z)(Vi,2),Hr=qi[0],ro=qi[1],xi=Ie(Bi,Nn,fr,On||_n,ro,Ve),tt=ln(Nn,fr),uo=De.useMemo(function(){var No=tt(Qi),yo=(0,ct.Z)(No,2),ta=yo[0],na=yo[1];if(!Ni||!Qi.length)return[ta,[],na];var Na=je(ta),ka=Jr(),is=(0,dt.S)(Na,!0,ka),gn=is.checkedKeys,Oa=is.halfCheckedKeys;return[Ln(gn),Ln(Oa),na]},[Ni,Qi,Jr,Ln,tt]),Zo=(0,ct.Z)(uo,3),ga=Zo[0],Pa=Zo[1],ia=Zo[2],Or=De.useMemo(function(){var No=je(ga),yo=Zt(No,Jr,jn);return[].concat((0,ce.Z)(ia),(0,ce.Z)(Ln(yo)))},[ga,Jr,Ln,ia,jn]),kr=ut(Or,Nn,fr,Ni,tn),fo=(0,Ae.Z)(function(No){if(rr(No),Ut){var yo=Pt(No),ta=yo.map(function(ka){return Yt(ka,Nn,fr).map(function(is){return is.option})}),na=Ni?yo:yo[0],Na=Ni?ta:ta[0];Ut(na,Na)}}),jr=(0,Ae.Z)(function(No){if((!Ni||Vt)&&Po(""),!Ni)fo(No);else{var yo=gt(No),ta=je(ga),na=je(Pa),Na=ta.includes(yo),ka=ia.some(function(Cl){return gt(Cl)===yo}),is=ga,gn=ia;if(ka&&!Na)gn=ia.filter(function(Cl){return gt(Cl)!==yo});else{var Oa=Na?ta.filter(function(Cl){return Cl!==yo}):[].concat((0,ce.Z)(ta),[yo]),Vl=Jr(),Hs;if(Na){var wl=(0,dt.S)(Oa,{checked:!1,halfCheckedKeys:na},Vl);Hs=wl.checkedKeys}else{var Ma=(0,dt.S)(Oa,!0,Vl);Hs=Ma.checkedKeys}var yu=Zt(Hs,Jr,jn);is=Ln(yu)}fo([].concat((0,ce.Z)(gn),(0,ce.Z)(is)))}}),To=function(yo,ta){if(ta.type==="clear"){fo([]);return}var na=ta.values[0],Na=na.valueCells;jr(Na)},qa=Jt!==void 0?Jt:Wt,Mr=ci||hi,hr=di||qn,Xn=function(yo){li==null||li(yo),Ai==null||Ai(yo)},yr=De.useMemo(function(){return{options:Nn,fieldNames:fr,values:ga,halfValues:Pa,changeOnSelect:Ve,onSelect:jr,checkable:xt,searchOptions:xi,dropdownPrefixCls:On,loadData:ri,expandTrigger:yt,expandIcon:sr,loadingIcon:vn,dropdownMenuColumnStyle:ui}},[Nn,fr,ga,Pa,Ve,jr,xt,xi,On,ri,yt,sr,vn,ui]),wo=!(Bi?xi:Nn).length,ua=Bi&&ro.matchInputWidth||wo?{}:{minWidth:"auto"};return De.createElement(he.Provider,{value:yr},De.createElement(Et.Ac,(0,mt.Z)({},Ei,{ref:ni,id:zi,prefixCls:_n,autoClearSearchValue:Vt,dropdownMatchSelectWidth:ir,dropdownStyle:ua,displayValues:kr,onDisplayValuesChange:To,mode:Ni?"multiple":void 0,searchValue:Bi,onSearch:ao,showSearch:Hr,OptionList:Ce,emptyOptions:wo,open:qa,dropdownClassName:Mr,placement:hr,onDropdownVisibleChange:Xn,getRawInputElement:function(){return Nr}})))});qe.SHOW_PARENT=et,qe.SHOW_CHILD=$e;var Ue=qe,St=Ue,vt=ve(2738),lt=ve(62892),Dt=ve(53487),un=ve(19080),Xt=ve(36355),$t=ve(93891),wn=ve(1684),bn=ve(19716),pn=ve(32441),Yn=ve(14154),ai=ve(58582),Wn=ve(84443),Rn=ve(66339),ii=ve(33234),pi=ve(98447),gi=ve(17313),Ri=ve(74207),Ji=ve(83116);const Un=hn=>{const{prefixCls:ni,componentCls:vi,antCls:Fi}=hn,_n=`${vi}-menu-item`,Dn=`
|
|
|
&${_n}-expand ${_n}-expand-icon,
|
|
|
${_n}-loading-icon
|
|
|
`;return[{[vi]:{width:hn.controlWidth}},{[`${vi}-dropdown`]:[(0,pi.C2)(`${ni}-checkbox`,hn),{[`&${Fi}-select-dropdown`]:{padding:0}},{[vi]:{"&-checkbox":{top:0,marginInlineEnd:hn.paddingXS},"&-menus":{display:"flex",flexWrap:"nowrap",alignItems:"flex-start",[`&${vi}-menu-empty`]:{[`${vi}-menu`]:{width:"100%",height:"auto",[_n]:{color:hn.colorTextDisabled}}}},"&-menu":{flexGrow:1,minWidth:hn.controlItemWidth,height:hn.dropdownHeight,margin:0,padding:hn.menuPadding,overflow:"auto",verticalAlign:"top",listStyle:"none","-ms-overflow-style":"-ms-autohiding-scrollbar","&:not(:last-child)":{borderInlineEnd:`${hn.lineWidth}px ${hn.lineType} ${hn.colorSplit}`},"&-item":Object.assign(Object.assign({},gi.vS),{display:"flex",flexWrap:"nowrap",alignItems:"center",padding:hn.optionPadding,lineHeight:hn.lineHeight,cursor:"pointer",transition:`all ${hn.motionDurationMid}`,borderRadius:hn.borderRadiusSM,"&:hover":{background:hn.controlItemBgHover},"&-disabled":{color:hn.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"},[Dn]:{color:hn.colorTextDisabled}},[`&-active:not(${_n}-disabled)`]:{"&, &:hover":{fontWeight:hn.optionSelectedFontWeight,backgroundColor:hn.optionSelectedBg}},"&-content":{flex:"auto"},[Dn]:{marginInlineStart:hn.paddingXXS,color:hn.colorTextDescription,fontSize:hn.fontSizeIcon},"&-keyword":{color:hn.colorHighlight}})}}}]},{[`${vi}-dropdown-rtl`]:{direction:"rtl"}},(0,Ri.c)(hn)]};var $n=(0,Ji.Z)("Cascader",hn=>[Un(hn)],hn=>{const ni=Math.round((hn.controlHeight-hn.fontSize*hn.lineHeight)/2);return{controlWidth:184,controlItemWidth:111,dropdownHeight:180,optionSelectedBg:hn.controlItemBgActive,optionSelectedFontWeight:hn.fontWeightStrong,optionPadding:`${ni}px ${hn.paddingSM}px`,menuPadding:hn.paddingXXS}}),ti=function(hn,ni){var vi={};for(var Fi in hn)Object.prototype.hasOwnProperty.call(hn,Fi)&&ni.indexOf(Fi)<0&&(vi[Fi]=hn[Fi]);if(hn!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _n=0,Fi=Object.getOwnPropertySymbols(hn);_n<Fi.length;_n++)ni.indexOf(Fi[_n])<0&&Object.prototype.propertyIsEnumerable.call(hn,Fi[_n])&&(vi[Fi[_n]]=hn[Fi[_n]]);return vi};const{SHOW_CHILD:Pi,SHOW_PARENT:mi}=St;function nr(hn,ni,vi){const Fi=hn.toLowerCase().split(ni).reduce((Ft,Ot,Ve)=>Ve===0?[Ot]:[].concat((0,ce.Z)(Ft),[ni,Ot]),[]),_n=[];let Dn=0;return Fi.forEach((Ft,Ot)=>{const Ve=Dn+Ft.length;let Ut=hn.slice(Dn,Ve);Dn=Ve,Ot%2===1&&(Ut=De.createElement("span",{className:`${vi}-menu-item-keyword`,key:`separator-${Ot}`},Ut)),_n.push(Ut)}),_n}const ji=(hn,ni,vi,Fi)=>{const _n=[],Dn=hn.toLowerCase();return ni.forEach((Ft,Ot)=>{Ot!==0&&_n.push(" / ");let Ve=Ft[Fi.label];const Ut=typeof Ve;(Ut==="string"||Ut==="number")&&(Ve=nr(String(Ve),Dn,vi)),_n.push(Ve)}),_n},Le=De.forwardRef((hn,ni)=>{const{prefixCls:vi,size:Fi,disabled:_n,className:Dn,rootClassName:Ft,multiple:Ot,bordered:Ve=!0,transitionName:Ut,choiceTransitionName:tn="",popupClassName:xt,dropdownClassName:rt,expandIcon:Vt,placement:on,showSearch:xn,allowClear:An=!0,notFoundContent:yt,direction:cn,getPopupContainer:On,status:ri,showArrow:Wt,builtinPlacements:Jt,style:hi}=hn,ci=ti(hn,["prefixCls","size","disabled","className","rootClassName","multiple","bordered","transitionName","choiceTransitionName","popupClassName","dropdownClassName","expandIcon","placement","showSearch","allowClear","notFoundContent","direction","getPopupContainer","status","showArrow","builtinPlacements","style"]),ui=(0,vt.Z)(ci,["suffixIcon"]),{getPopupContainer:qn,getPrefixCls:di,renderEmpty:li,direction:Ai,popupOverflow:er,cascader:sr}=De.useContext(Xt.E_),vn=cn||Ai,Nr=vn==="rtl",{status:Dr,hasFeedback:ir,isFormItemInput:fn,feedbackIcon:jn}=De.useContext(pn.aM),Ei=(0,un.F)(Dr,ri),zi=yt||(li==null?void 0:li("Cascader"))||De.createElement($t.Z,{componentName:"Cascader"}),Ni=di(),Gi=di("select",vi),ur=di("cascader",vi),[Qi,rr]=(0,Yn.Z)(Gi),[fr]=$n(ur),{compactSize:Nn,compactItemClassnames:Jr}=(0,ii.ri)(Gi,cn),Ln=Be()(xt||rt,`${ur}-dropdown`,{[`${ur}-dropdown-rtl`]:vn==="rtl"},Ft,rr),Zr=De.useMemo(()=>{if(!xn)return xn;let ia={render:ji};return typeof xn=="object"&&(ia=Object.assign(Object.assign({},ia),xn)),ia},[xn]),co=(0,bn.Z)(ia=>{var Or;return(Or=Fi!=null?Fi:Nn)!==null&&Or!==void 0?Or:ia}),Bi=De.useContext(wn.Z),Po=_n!=null?_n:Bi;let ao=Vt;Vt||(ao=Nr?De.createElement(_e.Z,null):De.createElement(Ze.Z,null));const Vi=De.createElement("span",{className:`${Gi}-menu-item-loading-icon`},De.createElement(Ct.Z,{spin:!0})),qi=De.useMemo(()=>Ot?De.createElement("span",{className:`${ur}-checkbox-inner`}):!1,[Ot]),Hr=(0,Wn.Z)(hn.suffixIcon,Wt),{suffixIcon:ro,removeIcon:xi,clearIcon:tt}=(0,Rn.Z)(Object.assign(Object.assign({},hn),{hasFeedback:ir,feedbackIcon:jn,showSuffixIcon:Hr,multiple:Ot,prefixCls:Gi,componentName:"Cascader"})),uo=De.useMemo(()=>on!==void 0?on:Nr?"bottomRight":"bottomLeft",[on,Nr]),Zo=(0,ai.Z)(Jt,er),ga=An===!0?{clearIcon:tt}:An,Pa=De.createElement(St,Object.assign({prefixCls:Gi,className:Be()(!vi&&ur,{[`${Gi}-lg`]:co==="large",[`${Gi}-sm`]:co==="small",[`${Gi}-rtl`]:Nr,[`${Gi}-borderless`]:!Ve,[`${Gi}-in-form-item`]:fn},(0,un.Z)(Gi,Ei,ir),Jr,sr==null?void 0:sr.className,Dn,Ft,rr),disabled:Po,style:Object.assign(Object.assign({},sr==null?void 0:sr.style),hi)},ui,{builtinPlacements:Zo,direction:vn,placement:uo,notFoundContent:zi,allowClear:ga,showSearch:Zr,expandIcon:ao,suffixIcon:ro,removeIcon:xi,loadingIcon:Vi,checkable:qi,dropdownClassName:Ln,dropdownPrefixCls:vi||ur,choiceTransitionName:(0,lt.m)(Ni,"",tn),transitionName:(0,lt.m)(Ni,"slide-up",Ut),getPopupContainer:On||qn,ref:ni}));return fr(Qi(Pa))}),si=(0,Dt.Z)(Le);Le.SHOW_PARENT=mi,Le.SHOW_CHILD=Pi,Le._InternalPanelDoNotUseOrYouWillBeFired=si;var Hi=Le},24905:function(Pn,an,ve){"use strict";ve.d(an,{default:function(){return Ie}});var ce=ve(92310),De=ve.n(ce),_e=ve(5630),Ct=ve(59301),Ze=ve(36355),Ke=ve(1684),Be=ve(32441),ct=Ct.createContext(null),He=ve(98447),Et=ve(14088),ht=ve(4572),dt=function(ze,et){var $e={};for(var gt in ze)Object.prototype.hasOwnProperty.call(ze,gt)&&et.indexOf(gt)<0&&($e[gt]=ze[gt]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var je=0,gt=Object.getOwnPropertySymbols(ze);je<gt.length;je++)et.indexOf(gt[je])<0&&Object.prototype.propertyIsEnumerable.call(ze,gt[je])&&($e[gt[je]]=ze[gt[je]]);return $e};const Ae=(ze,et)=>{var $e;const{prefixCls:gt,className:je,rootClassName:Tt,children:Qe,indeterminate:bt=!1,style:Nt,onMouseEnter:At,onMouseLeave:Zt,skipGroup:Yt=!1,disabled:ut}=ze,Ge=dt(ze,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:kt,direction:ln,checkbox:sn}=Ct.useContext(Ze.E_),Bt=Ct.useContext(ct),{isFormItemInput:Gt}=Ct.useContext(Be.aM),en=Ct.useContext(Ke.Z),Bn=($e=(Bt==null?void 0:Bt.disabled)||ut)!==null&&$e!==void 0?$e:en,rn=Ct.useRef(Ge.value);Ct.useEffect(()=>{Bt==null||Bt.registerValue(Ge.value)},[]),Ct.useEffect(()=>{if(!Yt)return Ge.value!==rn.current&&(Bt==null||Bt.cancelValue(rn.current),Bt==null||Bt.registerValue(Ge.value),rn.current=Ge.value),()=>Bt==null?void 0:Bt.cancelValue(Ge.value)},[Ge.value]);const Cn=kt("checkbox",gt),[ft,En]=(0,He.ZP)(Cn),Vn=Object.assign({},Ge);Bt&&!Yt&&(Vn.onChange=function(){Ge.onChange&&Ge.onChange.apply(Ge,arguments),Bt.toggleOption&&Bt.toggleOption({label:Qe,value:Ge.value})},Vn.name=Bt.name,Vn.checked=Bt.value.includes(Ge.value));const Re=De()(`${Cn}-wrapper`,{[`${Cn}-rtl`]:ln==="rtl",[`${Cn}-wrapper-checked`]:Vn.checked,[`${Cn}-wrapper-disabled`]:Bn,[`${Cn}-wrapper-in-form-item`]:Gt},sn==null?void 0:sn.className,je,Tt,En),Ce=De()({[`${Cn}-indeterminate`]:bt},ht.A,En),Pe=bt?"mixed":void 0;return ft(Ct.createElement(Et.Z,{component:"Checkbox",disabled:Bn},Ct.createElement("label",{className:Re,style:Object.assign(Object.assign({},sn==null?void 0:sn.style),Nt),onMouseEnter:At,onMouseLeave:Zt},Ct.createElement(_e.Z,Object.assign({"aria-checked":Pe},Vn,{prefixCls:Cn,className:Ce,disabled:Bn,ref:et})),Qe!==void 0&&Ct.createElement("span",null,Qe))))};var ee=Ct.forwardRef(Ae),he=ve(19127),se=ve(2738),de=function(ze,et){var $e={};for(var gt in ze)Object.prototype.hasOwnProperty.call(ze,gt)&&et.indexOf(gt)<0&&($e[gt]=ze[gt]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var je=0,gt=Object.getOwnPropertySymbols(ze);je<gt.length;je++)et.indexOf(gt[je])<0&&Object.prototype.propertyIsEnumerable.call(ze,gt[je])&&($e[gt[je]]=ze[gt[je]]);return $e};const me=(ze,et)=>{const{defaultValue:$e,children:gt,options:je=[],prefixCls:Tt,className:Qe,rootClassName:bt,style:Nt,onChange:At}=ze,Zt=de(ze,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:Yt,direction:ut}=Ct.useContext(Ze.E_),[Ge,kt]=Ct.useState(Zt.value||$e||[]),[ln,sn]=Ct.useState([]);Ct.useEffect(()=>{"value"in Zt&&kt(Zt.value||[])},[Zt.value]);const Bt=Ct.useMemo(()=>je.map(Ne=>typeof Ne=="string"||typeof Ne=="number"?{label:Ne,value:Ne}:Ne),[je]),Gt=Ne=>{sn(ke=>ke.filter(Se=>Se!==Ne))},en=Ne=>{sn(ke=>[].concat((0,he.Z)(ke),[Ne]))},Bn=Ne=>{const ke=Ge.indexOf(Ne.value),Se=(0,he.Z)(Ge);ke===-1?Se.push(Ne.value):Se.splice(ke,1),"value"in Zt||kt(Se),At==null||At(Se.filter(nt=>ln.includes(nt)).sort((nt,Pt)=>{const qe=Bt.findIndex(St=>St.value===nt),Ue=Bt.findIndex(St=>St.value===Pt);return qe-Ue}))},rn=Yt("checkbox",Tt),Cn=`${rn}-group`,[ft,En]=(0,He.ZP)(rn),Vn=(0,se.Z)(Zt,["value","disabled"]),Re=je.length?Bt.map(Ne=>Ct.createElement(ee,{prefixCls:rn,key:Ne.value.toString(),disabled:"disabled"in Ne?Ne.disabled:Zt.disabled,value:Ne.value,checked:Ge.includes(Ne.value),onChange:Ne.onChange,className:`${Cn}-item`,style:Ne.style,title:Ne.title},Ne.label)):gt,Ce={toggleOption:Bn,value:Ge,disabled:Zt.disabled,name:Zt.name,registerValue:en,cancelValue:Gt},Pe=De()(Cn,{[`${Cn}-rtl`]:ut==="rtl"},Qe,bt,En);return ft(Ct.createElement("div",Object.assign({className:Pe,style:Nt},Vn,{ref:et}),Ct.createElement(ct.Provider,{value:Ce},Re)))},we=Ct.forwardRef(me);var be=Ct.memo(we);const Me=ee;Me.Group=be,Me.__ANT_CHECKBOX=!0;var Ie=Me},98447:function(Pn,an,ve){"use strict";ve.d(an,{C2:function(){return Ze}});var ce=ve(17313),De=ve(37613),_e=ve(83116);const Ct=Ke=>{const{checkboxCls:Be}=Ke,mt=`${Be}-wrapper`;return[{[`${Be}-group`]:Object.assign(Object.assign({},(0,ce.Wf)(Ke)),{display:"inline-flex",flexWrap:"wrap",columnGap:Ke.marginXS,[`> ${Ke.antCls}-row`]:{flex:1}}),[mt]:Object.assign(Object.assign({},(0,ce.Wf)(Ke)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${mt}`]:{marginInlineStart:0},[`&${mt}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[Be]:Object.assign(Object.assign({},(0,ce.Wf)(Ke)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:Ke.borderRadiusSM,alignSelf:"center",[`${Be}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${Be}-inner`]:Object.assign({},(0,ce.oN)(Ke))},[`${Be}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:Ke.checkboxSize,height:Ke.checkboxSize,direction:"ltr",backgroundColor:Ke.colorBgContainer,border:`${Ke.lineWidth}px ${Ke.lineType} ${Ke.colorBorder}`,borderRadius:Ke.borderRadiusSM,borderCollapse:"separate",transition:`all ${Ke.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:Ke.checkboxSize/14*5,height:Ke.checkboxSize/14*8,border:`${Ke.lineWidthBold}px solid ${Ke.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${Ke.motionDurationFast} ${Ke.motionEaseInBack}, opacity ${Ke.motionDurationFast}`}},"& + span":{paddingInlineStart:Ke.paddingXS,paddingInlineEnd:Ke.paddingXS}})},{[`
|
|
|
${mt}:not(${mt}-disabled),
|
|
|
${Be}:not(${Be}-disabled)
|
|
|
`]:{[`&:hover ${Be}-inner`]:{borderColor:Ke.colorPrimary}},[`${mt}:not(${mt}-disabled)`]:{[`&:hover ${Be}-checked:not(${Be}-disabled) ${Be}-inner`]:{backgroundColor:Ke.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${Be}-checked:not(${Be}-disabled):after`]:{borderColor:Ke.colorPrimaryHover}}},{[`${Be}-checked`]:{[`${Be}-inner`]:{backgroundColor:Ke.colorPrimary,borderColor:Ke.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${Ke.motionDurationMid} ${Ke.motionEaseOutBack} ${Ke.motionDurationFast}`}}},[`
|
|
|
${mt}-checked:not(${mt}-disabled),
|
|
|
${Be}-checked:not(${Be}-disabled)
|
|
|
`]:{[`&:hover ${Be}-inner`]:{backgroundColor:Ke.colorPrimaryHover,borderColor:"transparent"}}},{[Be]:{"&-indeterminate":{[`${Be}-inner`]:{backgroundColor:Ke.colorBgContainer,borderColor:Ke.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:Ke.fontSizeLG/2,height:Ke.fontSizeLG/2,backgroundColor:Ke.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${mt}-disabled`]:{cursor:"not-allowed"},[`${Be}-disabled`]:{[`&, ${Be}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${Be}-inner`]:{background:Ke.colorBgContainerDisabled,borderColor:Ke.colorBorder,"&:after":{borderColor:Ke.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:Ke.colorTextDisabled},[`&${Be}-indeterminate ${Be}-inner::after`]:{background:Ke.colorTextDisabled}}}]};function Ze(Ke,Be){const mt=(0,De.TS)(Be,{checkboxCls:`.${Ke}`,checkboxSize:Be.controlInteractiveSize});return[Ct(mt)]}an.ZP=(0,_e.Z)("Checkbox",(Ke,Be)=>{let{prefixCls:mt}=Be;return[Ze(mt,Ke)]})},36381:function(Pn,an,ve){"use strict";ve.d(an,{default:function(){return Vn}});var ce=ve(38819),De=ve(92310),_e=ve.n(De),Ct=ve(96663),Ze=ve(19127),Ke=ve(72071),Be=ve(20135),mt=ve(18929),ct=ve(48736),He=ve(59301),Et=ve(6620),ht=ve(11592),dt=ve(90493),Ae=ve(77900),te=ve(10228),ee=He.forwardRef(function(Re,Ce){var Pe=Re.prefixCls,Ne=Re.forceRender,ke=Re.className,Se=Re.style,nt=Re.children,Pt=Re.isActive,qe=Re.role,Ue=He.useState(Pt||Ne),St=(0,Ke.Z)(Ue,2),vt=St[0],lt=St[1];return He.useEffect(function(){(Ne||Pt)&<(!0)},[Ne,Pt]),vt?He.createElement("div",{ref:Ce,className:_e()("".concat(Pe,"-content"),(0,dt.Z)((0,dt.Z)({},"".concat(Pe,"-content-active"),Pt),"".concat(Pe,"-content-inactive"),!Pt),ke),style:Se,role:qe},He.createElement("div",{className:"".concat(Pe,"-content-box")},nt)):null});ee.displayName="PanelContent";var he=ee,se=["showArrow","headerClass","isActive","onItemClick","forceRender","className","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],de=He.forwardRef(function(Re,Ce){var Pe=Re.showArrow,Ne=Pe===void 0?!0:Pe,ke=Re.headerClass,Se=Re.isActive,nt=Re.onItemClick,Pt=Re.forceRender,qe=Re.className,Ue=Re.prefixCls,St=Re.collapsible,vt=Re.accordion,lt=Re.panelKey,Dt=Re.extra,un=Re.header,Xt=Re.expandIcon,$t=Re.openMotion,wn=Re.destroyInactivePanel,bn=Re.children,pn=(0,Et.Z)(Re,se),Yn=St==="disabled",ai=St==="header",Wn=St==="icon",Rn=Dt!=null&&typeof Dt!="boolean",ii=function(){nt==null||nt(lt)},pi=function(ti){(ti.key==="Enter"||ti.keyCode===te.Z.ENTER||ti.which===te.Z.ENTER)&&ii()},gi=typeof Xt=="function"?Xt(Re):He.createElement("i",{className:"arrow"});gi&&(gi=He.createElement("div",{className:"".concat(Ue,"-expand-icon"),onClick:["header","icon"].includes(St)?ii:void 0},gi));var Ri=_e()((0,dt.Z)((0,dt.Z)((0,dt.Z)({},"".concat(Ue,"-item"),!0),"".concat(Ue,"-item-active"),Se),"".concat(Ue,"-item-disabled"),Yn),qe),Ji=_e()(ke,(0,dt.Z)((0,dt.Z)((0,dt.Z)({},"".concat(Ue,"-header"),!0),"".concat(Ue,"-header-collapsible-only"),ai),"".concat(Ue,"-icon-collapsible-only"),Wn)),Un={className:Ji,"aria-expanded":Se,"aria-disabled":Yn,onKeyDown:pi};return!ai&&!Wn&&(Un.onClick=ii,Un.role=vt?"tab":"button",Un.tabIndex=Yn?-1:0),He.createElement("div",(0,Ct.Z)({},pn,{ref:Ce,className:Ri}),He.createElement("div",Un,Ne&&gi,He.createElement("span",{className:"".concat(Ue,"-header-text"),onClick:St==="header"?ii:void 0},un),Rn&&He.createElement("div",{className:"".concat(Ue,"-extra")},Dt)),He.createElement(Ae.default,(0,Ct.Z)({visible:Se,leavedClassName:"".concat(Ue,"-content-hidden")},$t,{forceRender:Pt,removeOnLeave:wn}),function($n,ti){var Pi=$n.className,mi=$n.style;return He.createElement(he,{ref:ti,prefixCls:Ue,className:Pi,style:mi,isActive:Se,forceRender:Pt,role:vt?"tabpanel":void 0},bn)}))}),me=de,we=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],be=function(Ce,Pe){var Ne=Pe.prefixCls,ke=Pe.accordion,Se=Pe.collapsible,nt=Pe.destroyInactivePanel,Pt=Pe.onItemClick,qe=Pe.activeKey,Ue=Pe.openMotion,St=Pe.expandIcon;return Ce.map(function(vt,lt){var Dt=vt.children,un=vt.label,Xt=vt.key,$t=vt.collapsible,wn=vt.onItemClick,bn=vt.destroyInactivePanel,pn=(0,Et.Z)(vt,we),Yn=String(Xt!=null?Xt:lt),ai=$t!=null?$t:Se,Wn=bn!=null?bn:nt,Rn=function(gi){ai!=="disabled"&&(Pt(gi),wn==null||wn(gi))},ii=!1;return ke?ii=qe[0]===Yn:ii=qe.indexOf(Yn)>-1,He.createElement(me,(0,Ct.Z)({},pn,{prefixCls:Ne,key:Yn,panelKey:Yn,isActive:ii,accordion:ke,openMotion:Ue,expandIcon:St,header:un,collapsible:ai,onItemClick:Rn,destroyInactivePanel:Wn}),Dt)})},Me=function(Ce,Pe,Ne){if(!Ce)return null;var ke=Ne.prefixCls,Se=Ne.accordion,nt=Ne.collapsible,Pt=Ne.destroyInactivePanel,qe=Ne.onItemClick,Ue=Ne.activeKey,St=Ne.openMotion,vt=Ne.expandIcon,lt=Ce.key||String(Pe),Dt=Ce.props,un=Dt.header,Xt=Dt.headerClass,$t=Dt.destroyInactivePanel,wn=Dt.collapsible,bn=Dt.onItemClick,pn=!1;Se?pn=Ue[0]===lt:pn=Ue.indexOf(lt)>-1;var Yn=wn!=null?wn:nt,ai=function(ii){Yn!=="disabled"&&(qe(ii),bn==null||bn(ii))},Wn={key:lt,panelKey:lt,header:un,headerClass:Xt,isActive:pn,prefixCls:ke,destroyInactivePanel:$t!=null?$t:Pt,openMotion:St,accordion:Se,children:Ce.props.children,onItemClick:ai,expandIcon:vt,collapsible:Yn};return typeof Ce.type=="string"?Ce:(Object.keys(Wn).forEach(function(Rn){typeof Wn[Rn]=="undefined"&&delete Wn[Rn]}),He.cloneElement(Ce,Wn))};function Ie(Re,Ce,Pe){return Array.isArray(Re)?be(Re,Pe):(0,ht.Z)(Ce).map(function(Ne,ke){return Me(Ne,ke,Pe)})}var ze=Ie,et=ve(26112);function $e(Re){var Ce=Re;if(!Array.isArray(Ce)){var Pe=(0,Be.Z)(Ce);Ce=Pe==="number"||Pe==="string"?[Ce]:[]}return Ce.map(function(Ne){return String(Ne)})}var gt=He.forwardRef(function(Re,Ce){var Pe=Re.prefixCls,Ne=Pe===void 0?"rc-collapse":Pe,ke=Re.destroyInactivePanel,Se=ke===void 0?!1:ke,nt=Re.style,Pt=Re.accordion,qe=Re.className,Ue=Re.children,St=Re.collapsible,vt=Re.openMotion,lt=Re.expandIcon,Dt=Re.activeKey,un=Re.defaultActiveKey,Xt=Re.onChange,$t=Re.items,wn=_e()(Ne,qe),bn=(0,mt.Z)([],{value:Dt,onChange:function(pi){return Xt==null?void 0:Xt(pi)},defaultValue:un,postState:$e}),pn=(0,Ke.Z)(bn,2),Yn=pn[0],ai=pn[1],Wn=function(pi){return ai(function(){if(Pt)return Yn[0]===pi?[]:[pi];var gi=Yn.indexOf(pi),Ri=gi>-1;return Ri?Yn.filter(function(Ji){return Ji!==pi}):[].concat((0,Ze.Z)(Yn),[pi])})};(0,ct.ZP)(!Ue,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var Rn=ze($t,Ue,{prefixCls:Ne,accordion:Pt,openMotion:vt,expandIcon:lt,collapsible:St,destroyInactivePanel:Se,onItemClick:Wn,activeKey:Yn});return He.createElement("div",(0,Ct.Z)({ref:Ce,className:wn,style:nt,role:Pt?"tablist":void 0},(0,et.Z)(Re,{aria:!0,data:!0})),Rn)}),je=Object.assign(gt,{Panel:me}),Tt=je,Qe=je.Panel,bt=ve(2738),Nt=ve(62892),At=ve(92343),Zt=ve(36355),Yt=ve(19716),Ge=He.forwardRef((Re,Ce)=>{const{getPrefixCls:Pe}=He.useContext(Zt.E_),{prefixCls:Ne,className:ke,showArrow:Se=!0}=Re,nt=Pe("collapse",Ne),Pt=_e()({[`${nt}-no-arrow`]:!Se},ke);return He.createElement(Tt.Panel,Object.assign({ref:Ce},Re,{prefixCls:nt,className:Pt}))}),kt=ve(17313),ln=ve(8378),sn=ve(83116),Bt=ve(37613);const Gt=Re=>{const{componentCls:Ce,contentBg:Pe,padding:Ne,headerBg:ke,headerPadding:Se,collapseHeaderPaddingSM:nt,collapseHeaderPaddingLG:Pt,collapsePanelBorderRadius:qe,lineWidth:Ue,lineType:St,colorBorder:vt,colorText:lt,colorTextHeading:Dt,colorTextDisabled:un,fontSize:Xt,fontSizeLG:$t,lineHeight:wn,marginSM:bn,paddingSM:pn,paddingLG:Yn,paddingXS:ai,motionDurationSlow:Wn,fontSizeIcon:Rn,contentPadding:ii}=Re,pi=`${Ue}px ${St} ${vt}`;return{[Ce]:Object.assign(Object.assign({},(0,kt.Wf)(Re)),{backgroundColor:ke,border:pi,borderBottom:0,borderRadius:`${qe}px`,"&-rtl":{direction:"rtl"},[`& > ${Ce}-item`]:{borderBottom:pi,"&:last-child":{[`
|
|
|
&,
|
|
|
& > ${Ce}-header`]:{borderRadius:`0 0 ${qe}px ${qe}px`}},[`> ${Ce}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:Se,color:Dt,lineHeight:wn,cursor:"pointer",transition:`all ${Wn}, visibility 0s`,[`> ${Ce}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${Ce}-expand-icon`]:{height:Xt*wn,display:"flex",alignItems:"center",paddingInlineEnd:bn},[`${Ce}-arrow`]:Object.assign(Object.assign({},(0,kt.Ro)()),{fontSize:Rn,svg:{transition:`transform ${Wn}`}}),[`${Ce}-header-text`]:{marginInlineEnd:"auto"}},[`${Ce}-header-collapsible-only`]:{cursor:"default",[`${Ce}-header-text`]:{flex:"none",cursor:"pointer"}},[`${Ce}-icon-collapsible-only`]:{cursor:"default",[`${Ce}-expand-icon`]:{cursor:"pointer"}}},[`${Ce}-content`]:{color:lt,backgroundColor:Pe,borderTop:pi,[`& > ${Ce}-content-box`]:{padding:ii},"&-hidden":{display:"none"}},"&-small":{[`> ${Ce}-item`]:{[`> ${Ce}-header`]:{padding:nt,paddingInlineStart:ai,[`> ${Ce}-expand-icon`]:{marginInlineStart:pn-ai}},[`> ${Ce}-content > ${Ce}-content-box`]:{padding:pn}}},"&-large":{[`> ${Ce}-item`]:{fontSize:$t,[`> ${Ce}-header`]:{padding:Pt,paddingInlineStart:Ne,[`> ${Ce}-expand-icon`]:{height:$t*wn,marginInlineStart:Yn-Ne}},[`> ${Ce}-content > ${Ce}-content-box`]:{padding:Yn}}},[`${Ce}-item:last-child`]:{[`> ${Ce}-content`]:{borderRadius:`0 0 ${qe}px ${qe}px`}},[`& ${Ce}-item-disabled > ${Ce}-header`]:{"\n &,\n & > .arrow\n ":{color:un,cursor:"not-allowed"}},[`&${Ce}-icon-position-end`]:{[`& > ${Ce}-item`]:{[`> ${Ce}-header`]:{[`${Ce}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:bn}}}}})}},en=Re=>{const{componentCls:Ce}=Re,Pe=`> ${Ce}-item > ${Ce}-header ${Ce}-arrow svg`;return{[`${Ce}-rtl`]:{[Pe]:{transform:"rotate(180deg)"}}}},Bn=Re=>{const{componentCls:Ce,headerBg:Pe,paddingXXS:Ne,colorBorder:ke}=Re;return{[`${Ce}-borderless`]:{backgroundColor:Pe,border:0,[`> ${Ce}-item`]:{borderBottom:`1px solid ${ke}`},[`
|
|
|
> ${Ce}-item:last-child,
|
|
|
> ${Ce}-item:last-child ${Ce}-header
|
|
|
`]:{borderRadius:0},[`> ${Ce}-item:last-child`]:{borderBottom:0},[`> ${Ce}-item > ${Ce}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${Ce}-item > ${Ce}-content > ${Ce}-content-box`]:{paddingTop:Ne}}}},rn=Re=>{const{componentCls:Ce,paddingSM:Pe}=Re;return{[`${Ce}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${Ce}-item`]:{borderBottom:0,[`> ${Ce}-content`]:{backgroundColor:"transparent",border:0,[`> ${Ce}-content-box`]:{paddingBlock:Pe}}}}}};var Cn=(0,sn.Z)("Collapse",Re=>{const Ce=(0,Bt.TS)(Re,{collapseHeaderPaddingSM:`${Re.paddingXS}px ${Re.paddingSM}px`,collapseHeaderPaddingLG:`${Re.padding}px ${Re.paddingLG}px`,collapsePanelBorderRadius:Re.borderRadiusLG});return[Gt(Ce),Bn(Ce),rn(Ce),en(Ce),(0,ln.Z)(Ce)]},Re=>({headerPadding:`${Re.paddingSM}px ${Re.padding}px`,headerBg:Re.colorFillAlter,contentPadding:`${Re.padding}px 16px`,contentBg:Re.colorBgContainer})),En=Object.assign(He.forwardRef((Re,Ce)=>{const{getPrefixCls:Pe,direction:Ne,collapse:ke}=He.useContext(Zt.E_),{prefixCls:Se,className:nt,rootClassName:Pt,style:qe,bordered:Ue=!0,ghost:St,size:vt,expandIconPosition:lt="start",children:Dt,expandIcon:un}=Re,Xt=(0,Yt.Z)(pi=>{var gi;return(gi=vt!=null?vt:pi)!==null&&gi!==void 0?gi:"middle"}),$t=Pe("collapse",Se),wn=Pe(),[bn,pn]=Cn($t),Yn=He.useMemo(()=>lt==="left"?"start":lt==="right"?"end":lt,[lt]),ai=function(){let pi=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const gi=un?un(pi):He.createElement(ce.Z,{rotate:pi.isActive?90:void 0});return(0,At.Tm)(gi,()=>({className:_e()(gi.props.className,`${$t}-arrow`)}))},Wn=_e()(`${$t}-icon-position-${Yn}`,{[`${$t}-borderless`]:!Ue,[`${$t}-rtl`]:Ne==="rtl",[`${$t}-ghost`]:!!St,[`${$t}-${Xt}`]:Xt!=="middle"},ke==null?void 0:ke.className,nt,Pt,pn),Rn=Object.assign(Object.assign({},(0,Nt.Z)(wn)),{motionAppear:!1,leavedClassName:`${$t}-content-hidden`}),ii=He.useMemo(()=>Dt?(0,ht.Z)(Dt).map((pi,gi)=>{var Ri,Ji;if(!((Ri=pi.props)===null||Ri===void 0)&&Ri.disabled){const Un=(Ji=pi.key)!==null&&Ji!==void 0?Ji:String(gi),{disabled:$n,collapsible:ti}=pi.props,Pi=Object.assign(Object.assign({},(0,bt.Z)(pi.props,["disabled"])),{key:Un,collapsible:ti!=null?ti:$n?"disabled":void 0});return(0,At.Tm)(pi,Pi)}return pi}):null,[Dt]);return bn(He.createElement(Tt,Object.assign({ref:Ce,openMotion:Rn},(0,bt.Z)(Re,["rootClassName"]),{expandIcon:ai,prefixCls:$t,className:Wn,style:Object.assign(Object.assign({},ke==null?void 0:ke.style),qe)}),ii))}),{Panel:Ge}),Vn=En},93891:function(Pn,an,ve){"use strict";var ce=ve(59301),De=ve(36355),_e=ve(64165);const Ct=Ze=>{const{componentName:Ke}=Ze,{getPrefixCls:Be}=(0,ce.useContext)(De.E_),mt=Be("empty");switch(Ke){case"Table":case"List":return ce.createElement(_e.Z,{image:_e.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return ce.createElement(_e.Z,{image:_e.Z.PRESENTED_IMAGE_SIMPLE,className:`${mt}-small`});default:return ce.createElement(_e.Z,null)}};an.Z=Ct},28103:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return ht}});var ce=ve(92310),De=ve.n(ce),_e=ve(59301),Ct=ve(36355),Ze=ve(17313),Ke=ve(83116),Be=ve(37613);const mt=dt=>{const{componentCls:Ae,sizePaddingEdgeHorizontal:te,colorSplit:ee,lineWidth:he,textPaddingInline:se,orientationMargin:de,verticalMarginInline:me}=dt;return{[Ae]:Object.assign(Object.assign({},(0,Ze.Wf)(dt)),{borderBlockStart:`${he}px solid ${ee}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:me,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${he}px solid ${ee}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${dt.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${Ae}-with-text`]:{display:"flex",alignItems:"center",margin:`${dt.dividerHorizontalWithTextGutterMargin}px 0`,color:dt.colorTextHeading,fontWeight:500,fontSize:dt.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${ee}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${he}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${Ae}-with-text-left`]:{"&::before":{width:`${de*100}%`},"&::after":{width:`${100-de*100}%`}},[`&-horizontal${Ae}-with-text-right`]:{"&::before":{width:`${100-de*100}%`},"&::after":{width:`${de*100}%`}},[`${Ae}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:se},"&-dashed":{background:"none",borderColor:ee,borderStyle:"dashed",borderWidth:`${he}px 0 0`},[`&-horizontal${Ae}-with-text${Ae}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${Ae}-dashed`]:{borderInlineStartWidth:he,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${Ae}-with-text`]:{color:dt.colorText,fontWeight:"normal",fontSize:dt.fontSize},[`&-horizontal${Ae}-with-text-left${Ae}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${Ae}-inner-text`]:{paddingInlineStart:te}},[`&-horizontal${Ae}-with-text-right${Ae}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${Ae}-inner-text`]:{paddingInlineEnd:te}}})}};var ct=(0,Ke.Z)("Divider",dt=>{const Ae=(0,Be.TS)(dt,{dividerHorizontalWithTextGutterMargin:dt.margin,dividerHorizontalGutterMargin:dt.marginLG,sizePaddingEdgeHorizontal:0});return[mt(Ae)]},dt=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:dt.marginXS})),He=function(dt,Ae){var te={};for(var ee in dt)Object.prototype.hasOwnProperty.call(dt,ee)&&Ae.indexOf(ee)<0&&(te[ee]=dt[ee]);if(dt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,ee=Object.getOwnPropertySymbols(dt);he<ee.length;he++)Ae.indexOf(ee[he])<0&&Object.prototype.propertyIsEnumerable.call(dt,ee[he])&&(te[ee[he]]=dt[ee[he]]);return te},ht=dt=>{const{getPrefixCls:Ae,direction:te,divider:ee}=_e.useContext(Ct.E_),{prefixCls:he,type:se="horizontal",orientation:de="center",orientationMargin:me,className:we,rootClassName:be,children:Me,dashed:Ie,plain:ze,style:et}=dt,$e=He(dt,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","plain","style"]),gt=Ae("divider",he),[je,Tt]=ct(gt),Qe=de.length>0?`-${de}`:de,bt=!!Me,Nt=de==="left"&&me!=null,At=de==="right"&&me!=null,Zt=De()(gt,ee==null?void 0:ee.className,Tt,`${gt}-${se}`,{[`${gt}-with-text`]:bt,[`${gt}-with-text${Qe}`]:bt,[`${gt}-dashed`]:!!Ie,[`${gt}-plain`]:!!ze,[`${gt}-rtl`]:te==="rtl",[`${gt}-no-default-orientation-margin-left`]:Nt,[`${gt}-no-default-orientation-margin-right`]:At},we,be),Yt=_e.useMemo(()=>typeof me=="number"?me:/^\d+$/.test(me)?Number(me):me,[me]),ut=Object.assign(Object.assign({},Nt&&{marginLeft:Yt}),At&&{marginRight:Yt});return je(_e.createElement("div",Object.assign({className:Zt,style:Object.assign(Object.assign({},ee==null?void 0:ee.style),et)},$e,{role:"separator"}),Me&&se!=="vertical"&&_e.createElement("span",{className:`${gt}-inner-text`,style:ut},Me)))}},91857:function(Pn,an,ve){"use strict";var ce=ve(59301),De=ve(38819),_e=ve(92310),Ct=ve.n(_e),Ze=ve(31561),Ke=ve(70425),Be=ve(18929),mt=ve(2738),ct=ve(79676),He=ve(53487),Et=ve(92343),ht=ve(36355),dt=ve(20834),Ae=ve(40875),te=ve(88088),ee=ve(47211);const he=null,se=be=>{const{menu:Me,arrow:Ie,prefixCls:ze,children:et,trigger:$e,disabled:gt,dropdownRender:je,getPopupContainer:Tt,overlayClassName:Qe,rootClassName:bt,open:Nt,onOpenChange:At,visible:Zt,onVisibleChange:Yt,mouseEnterDelay:ut=.15,mouseLeaveDelay:Ge=.1,autoAdjustOverflow:kt=!0,placement:ln="",overlay:sn,transitionName:Bt}=be,{getPopupContainer:Gt,getPrefixCls:en,direction:Bn}=ce.useContext(ht.E_),rn=ce.useMemo(()=>{const lt=en();return Bt!==void 0?Bt:ln.includes("top")?`${lt}-slide-down`:`${lt}-slide-up`},[en,ln,Bt]),Cn=ce.useMemo(()=>ln?ln.includes("Center")?ln.slice(0,ln.indexOf("Center")):ln:Bn==="rtl"?"bottomRight":"bottomLeft",[ln,Bn]),ft=en("dropdown",ze),[En,Vn]=(0,ee.Z)(ft),[,Re]=(0,te.Z)(),Ce=ce.Children.only(et),Pe=(0,Et.Tm)(Ce,{className:Ct()(`${ft}-trigger`,{[`${ft}-rtl`]:Bn==="rtl"},Ce.props.className),disabled:gt}),Ne=gt?[]:$e;let ke;Ne&&Ne.includes("contextMenu")&&(ke=!0);const[Se,nt]=(0,Be.Z)(!1,{value:Nt!=null?Nt:Zt}),Pt=(0,Ke.useEvent)(lt=>{At==null||At(lt),Yt==null||Yt(lt),nt(lt)}),qe=Ct()(Qe,bt,Vn,{[`${ft}-rtl`]:Bn==="rtl"}),Ue=(0,ct.Z)({arrowPointAtCenter:typeof Ie=="object"&&Ie.pointAtCenter,autoAdjustOverflow:kt,offset:Re.marginXXS,arrowWidth:Ie?Re.sizePopupArrow:0,borderRadius:Re.borderRadius}),St=ce.useCallback(()=>{nt(!1)},[]),vt=()=>{let lt;return Me!=null&&Me.items?lt=ce.createElement(dt.default,Object.assign({},Me)):typeof sn=="function"?lt=sn():lt=sn,je&&(lt=je(lt)),lt=ce.Children.only(typeof lt=="string"?ce.createElement("span",null,lt):lt),ce.createElement(Ae.J,{prefixCls:`${ft}-menu`,expandIcon:ce.createElement("span",{className:`${ft}-menu-submenu-arrow`},ce.createElement(De.Z,{className:`${ft}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:St,validator:Dt=>{let{mode:un}=Dt}},lt)};return En(ce.createElement(Ze.Z,Object.assign({alignPoint:ke},(0,mt.Z)(be,["rootClassName"]),{mouseEnterDelay:ut,mouseLeaveDelay:Ge,visible:Se,builtinPlacements:Ue,arrow:!!Ie,overlayClassName:qe,prefixCls:ft,getPopupContainer:Tt||Gt,transitionName:rn,trigger:Ne,overlay:vt,placement:Cn,onVisibleChange:Pt}),Pe))};function de(be){return Object.assign(Object.assign({},be),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const me=(0,He.Z)(se,"dropdown",be=>be,de),we=be=>ce.createElement(me,Object.assign({},be),ce.createElement("span",null));se._InternalPanelDoNotUseOrYouWillBeFired=we,an.Z=se},38854:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return te}});var ce=ve(91857),De=ve(92310),_e=ve.n(De),Ct=ve(59301),Ze=ve(18785),Ke=ve(3113),Be=ve(36355),mt=ve(81327),ct=ve(33234),He=ve(47211),Et=function(ee,he){var se={};for(var de in ee)Object.prototype.hasOwnProperty.call(ee,de)&&he.indexOf(de)<0&&(se[de]=ee[de]);if(ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var me=0,de=Object.getOwnPropertySymbols(ee);me<de.length;me++)he.indexOf(de[me])<0&&Object.prototype.propertyIsEnumerable.call(ee,de[me])&&(se[de[me]]=ee[de[me]]);return se};const ht=ee=>{const{getPopupContainer:he,getPrefixCls:se,direction:de}=Ct.useContext(Be.E_),{prefixCls:me,type:we="default",danger:be,disabled:Me,loading:Ie,onClick:ze,htmlType:et,children:$e,className:gt,menu:je,arrow:Tt,autoFocus:Qe,overlay:bt,trigger:Nt,align:At,open:Zt,onOpenChange:Yt,placement:ut,getPopupContainer:Ge,href:kt,icon:ln=Ct.createElement(Ze.Z,null),title:sn,buttonsRender:Bt=vt=>vt,mouseEnterDelay:Gt,mouseLeaveDelay:en,overlayClassName:Bn,overlayStyle:rn,destroyPopupOnHide:Cn,dropdownRender:ft}=ee,En=Et(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"]),Vn=se("dropdown",me),Re=`${Vn}-button`,[Ce,Pe]=(0,He.Z)(Vn),Ne={menu:je,arrow:Tt,autoFocus:Qe,align:At,disabled:Me,trigger:Me?[]:Nt,onOpenChange:Yt,getPopupContainer:Ge||he,mouseEnterDelay:Gt,mouseLeaveDelay:en,overlayClassName:Bn,overlayStyle:rn,destroyPopupOnHide:Cn,dropdownRender:ft},{compactSize:ke,compactItemClassnames:Se}=(0,ct.ri)(Vn,de),nt=_e()(Re,Se,gt,Pe);"overlay"in ee&&(Ne.overlay=bt),"open"in ee&&(Ne.open=Zt),"placement"in ee?Ne.placement=ut:Ne.placement=de==="rtl"?"bottomLeft":"bottomRight";const Pt=Ct.createElement(Ke.ZP,{type:we,danger:be,disabled:Me,loading:Ie,onClick:ze,htmlType:et,href:kt,title:sn},$e),qe=Ct.createElement(Ke.ZP,{type:we,danger:be,icon:ln}),[Ue,St]=Bt([Pt,qe]);return Ce(Ct.createElement(mt.Z.Compact,Object.assign({className:nt,size:ke,block:!0},En),Ue,Ct.createElement(ce.Z,Object.assign({},Ne),St)))};ht.__ANT_BUTTON=!0;var dt=ht;const Ae=ce.Z;Ae.Button=dt;var te=Ae},47211:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return Et}});var ce=ve(17313),De=ve(13826),_e=ve(92899),Ct=ve(29878),Ze=ve(19447),Ke=ve(83116),Be=ve(37613),ct=ht=>{const{componentCls:dt,menuCls:Ae,colorError:te,colorTextLightSolid:ee}=ht,he=`${Ae}-item`;return{[`${dt}, ${dt}-menu-submenu`]:{[`${Ae} ${he}`]:{[`&${he}-danger:not(${he}-disabled)`]:{color:te,"&:hover":{color:ee,backgroundColor:te}}}}}};const He=ht=>{const{componentCls:dt,menuCls:Ae,zIndexPopup:te,dropdownArrowDistance:ee,sizePopupArrow:he,antCls:se,iconCls:de,motionDurationMid:me,dropdownPaddingVertical:we,fontSize:be,dropdownEdgeChildPadding:Me,colorTextDisabled:Ie,fontSizeIcon:ze,controlPaddingHorizontal:et,colorBgElevated:$e}=ht;return[{[dt]:Object.assign(Object.assign({},(0,ce.Wf)(ht)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:te,display:"block","&::before":{position:"absolute",insetBlock:-ee+he/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${se}-btn`]:{[`& > ${de}-down, & > ${se}-btn-icon > ${de}-down`]:{fontSize:ze}},[`${dt}-wrap`]:{position:"relative",[`${se}-btn > ${de}-down`]:{fontSize:ze},[`${de}-down::before`]:{transition:`transform ${me}`}},[`${dt}-wrap-open`]:{[`${de}-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${dt}-placement-bottomLeft,
|
|
|
&${se}-slide-down-appear${se}-slide-down-appear-active${dt}-placement-bottomLeft,
|
|
|
&${se}-slide-down-enter${se}-slide-down-enter-active${dt}-placement-bottom,
|
|
|
&${se}-slide-down-appear${se}-slide-down-appear-active${dt}-placement-bottom,
|
|
|
&${se}-slide-down-enter${se}-slide-down-enter-active${dt}-placement-bottomRight,
|
|
|
&${se}-slide-down-appear${se}-slide-down-appear-active${dt}-placement-bottomRight`]:{animationName:De.fJ},[`&${se}-slide-up-enter${se}-slide-up-enter-active${dt}-placement-topLeft,
|
|
|
&${se}-slide-up-appear${se}-slide-up-appear-active${dt}-placement-topLeft,
|
|
|
&${se}-slide-up-enter${se}-slide-up-enter-active${dt}-placement-top,
|
|
|
&${se}-slide-up-appear${se}-slide-up-appear-active${dt}-placement-top,
|
|
|
&${se}-slide-up-enter${se}-slide-up-enter-active${dt}-placement-topRight,
|
|
|
&${se}-slide-up-appear${se}-slide-up-appear-active${dt}-placement-topRight`]:{animationName:De.Qt},[`&${se}-slide-down-leave${se}-slide-down-leave-active${dt}-placement-bottomLeft,
|
|
|
&${se}-slide-down-leave${se}-slide-down-leave-active${dt}-placement-bottom,
|
|
|
&${se}-slide-down-leave${se}-slide-down-leave-active${dt}-placement-bottomRight`]:{animationName:De.Uw},[`&${se}-slide-up-leave${se}-slide-up-leave-active${dt}-placement-topLeft,
|
|
|
&${se}-slide-up-leave${se}-slide-up-leave-active${dt}-placement-top,
|
|
|
&${se}-slide-up-leave${se}-slide-up-leave-active${dt}-placement-topRight`]:{animationName:De.ly}})},(0,Ze.ZP)(ht,{colorBg:$e,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${dt} ${Ae}`]:{position:"relative",margin:0},[`${Ae}-submenu-popup`]:{position:"absolute",zIndex:te,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${dt}, ${dt}-menu-submenu`]:{[Ae]:Object.assign(Object.assign({padding:Me,listStyleType:"none",backgroundColor:$e,backgroundClip:"padding-box",borderRadius:ht.borderRadiusLG,outline:"none",boxShadow:ht.boxShadowSecondary},(0,ce.Qy)(ht)),{[`${Ae}-item-group-title`]:{padding:`${we}px ${et}px`,color:ht.colorTextDescription,transition:`all ${me}`},[`${Ae}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${Ae}-item-icon`]:{minWidth:be,marginInlineEnd:ht.marginXS,fontSize:ht.fontSizeSM},[`${Ae}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${me}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${Ae}-item, ${Ae}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${we}px ${et}px`,color:ht.colorText,fontWeight:"normal",fontSize:be,lineHeight:ht.lineHeight,cursor:"pointer",transition:`all ${me}`,borderRadius:ht.borderRadiusSM,"&:hover, &-active":{backgroundColor:ht.controlItemBgHover}},(0,ce.Qy)(ht)),{"&-selected":{color:ht.colorPrimary,backgroundColor:ht.controlItemBgActive,"&:hover, &-active":{backgroundColor:ht.controlItemBgActiveHover}},"&-disabled":{color:Ie,cursor:"not-allowed","&:hover":{color:Ie,backgroundColor:$e,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${ht.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:ht.colorSplit},[`${dt}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:ht.paddingXS,[`${dt}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:ht.colorTextDescription,fontSize:ze,fontStyle:"normal"}}}),[`${Ae}-item-group-list`]:{margin:`0 ${ht.marginXS}px`,padding:0,listStyle:"none"},[`${Ae}-submenu-title`]:{paddingInlineEnd:et+ht.fontSizeSM},[`${Ae}-submenu-vertical`]:{position:"relative"},[`${Ae}-submenu${Ae}-submenu-disabled ${dt}-menu-submenu-title`]:{[`&, ${dt}-menu-submenu-arrow-icon`]:{color:Ie,backgroundColor:$e,cursor:"not-allowed"}},[`${Ae}-submenu-selected ${dt}-menu-submenu-title`]:{color:ht.colorPrimary}})}},[(0,De.oN)(ht,"slide-up"),(0,De.oN)(ht,"slide-down"),(0,_e.Fm)(ht,"move-up"),(0,_e.Fm)(ht,"move-down"),(0,Ct._y)(ht,"zoom-big")]]};var Et=(0,Ke.Z)("Dropdown",(ht,dt)=>{let{rootPrefixCls:Ae}=dt;const{marginXXS:te,sizePopupArrow:ee,controlHeight:he,fontSize:se,lineHeight:de,paddingXXS:me,componentCls:we,borderRadiusLG:be}=ht,Me=(he-se*de)/2,{dropdownArrowOffset:Ie}=(0,Ze.fS)({contentRadius:be}),ze=(0,Be.TS)(ht,{menuCls:`${we}-menu`,rootPrefixCls:Ae,dropdownArrowDistance:ee/2+te,dropdownArrowOffset:Ie,dropdownPaddingVertical:Me,dropdownEdgeChildPadding:me});return[He(ze),ct(ze)]},ht=>({zIndexPopup:ht.zIndexPopupBase+50}))},64165:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return me}});var ce=ve(92310),De=ve.n(ce),_e=ve(59301),Ct=ve(36355),Ze=ve(9763),Ke=ve(64993),Be=ve(88088),ct=()=>{const[,we]=(0,Be.Z)(),Me=new Ke.C(we.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return _e.createElement("svg",{style:Me,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},_e.createElement("g",{fill:"none",fillRule:"evenodd"},_e.createElement("g",{transform:"translate(24 31.67)"},_e.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),_e.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"}),_e.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)"}),_e.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"}),_e.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"})),_e.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"}),_e.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},_e.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),_e.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},Et=()=>{const[,we]=(0,Be.Z)(),{colorFill:be,colorFillTertiary:Me,colorFillQuaternary:Ie,colorBgContainer:ze}=we,{borderColor:et,shadowColor:$e,contentColor:gt}=(0,_e.useMemo)(()=>({borderColor:new Ke.C(be).onBackground(ze).toHexShortString(),shadowColor:new Ke.C(Me).onBackground(ze).toHexShortString(),contentColor:new Ke.C(Ie).onBackground(ze).toHexShortString()}),[be,Me,Ie,ze]);return _e.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},_e.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},_e.createElement("ellipse",{fill:$e,cx:"32",cy:"33",rx:"32",ry:"7"}),_e.createElement("g",{fillRule:"nonzero",stroke:et},_e.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"}),_e.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:gt}))))},ht=ve(83116),dt=ve(37613);const Ae=we=>{const{componentCls:be,margin:Me,marginXS:Ie,marginXL:ze,fontSize:et,lineHeight:$e}=we;return{[be]:{marginInline:Ie,fontSize:et,lineHeight:$e,textAlign:"center",[`${be}-image`]:{height:we.emptyImgHeight,marginBottom:Ie,opacity:we.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${be}-description`]:{color:we.colorText},[`${be}-footer`]:{marginTop:Me},"&-normal":{marginBlock:ze,color:we.colorTextDisabled,[`${be}-description`]:{color:we.colorTextDisabled},[`${be}-image`]:{height:we.emptyImgHeightMD}},"&-small":{marginBlock:Ie,color:we.colorTextDisabled,[`${be}-image`]:{height:we.emptyImgHeightSM}}}}};var te=(0,ht.Z)("Empty",we=>{const{componentCls:be,controlHeightLG:Me}=we,Ie=(0,dt.TS)(we,{emptyImgCls:`${be}-img`,emptyImgHeight:Me*2.5,emptyImgHeightMD:Me,emptyImgHeightSM:Me*.875});return[Ae(Ie)]}),ee=function(we,be){var Me={};for(var Ie in we)Object.prototype.hasOwnProperty.call(we,Ie)&&be.indexOf(Ie)<0&&(Me[Ie]=we[Ie]);if(we!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ze=0,Ie=Object.getOwnPropertySymbols(we);ze<Ie.length;ze++)be.indexOf(Ie[ze])<0&&Object.prototype.propertyIsEnumerable.call(we,Ie[ze])&&(Me[Ie[ze]]=we[Ie[ze]]);return Me};const he=_e.createElement(ct,null),se=_e.createElement(Et,null),de=we=>{var{className:be,rootClassName:Me,prefixCls:Ie,image:ze=he,description:et,children:$e,imageStyle:gt,style:je}=we,Tt=ee(we,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:Qe,direction:bt,empty:Nt}=_e.useContext(Ct.E_),At=Qe("empty",Ie),[Zt,Yt]=te(At),[ut]=(0,Ze.Z)("Empty"),Ge=typeof et!="undefined"?et:ut==null?void 0:ut.description,kt=typeof Ge=="string"?Ge:"empty";let ln=null;return typeof ze=="string"?ln=_e.createElement("img",{alt:kt,src:ze}):ln=ze,Zt(_e.createElement("div",Object.assign({className:De()(Yt,At,Nt==null?void 0:Nt.className,{[`${At}-normal`]:ze===se,[`${At}-rtl`]:bt==="rtl"},be,Me),style:Object.assign(Object.assign({},Nt==null?void 0:Nt.style),je)},Tt),_e.createElement("div",{className:`${At}-image`,style:gt},ln),Ge&&_e.createElement("div",{className:`${At}-description`},Ge),$e&&_e.createElement("div",{className:`${At}-footer`},$e)))};de.PRESENTED_IMAGE_DEFAULT=he,de.PRESENTED_IMAGE_SIMPLE=se;var me=de},78241:function(Pn,an,ve){"use strict";ve.d(an,{default:function(){return Ot}});var ce=ve(19127),De=ve(92310),_e=ve.n(De),Ct=ve(77900),Ze=ve(59301),Ke=ve(62892),Be=ve(32441);function mt(Ve){const[Ut,tn]=Ze.useState(Ve);return Ze.useEffect(()=>{const xt=setTimeout(()=>{tn(Ve)},Ve.length?0:10);return()=>{clearTimeout(xt)}},[Ve]),Ut}var ct=ve(17313),He=ve(29878),Et=ve(8378),ht=ve(37613),dt=ve(83116),te=Ve=>{const{componentCls:Ut}=Ve,tn=`${Ut}-show-help`,xt=`${Ut}-show-help-item`;return{[tn]:{transition:`opacity ${Ve.motionDurationSlow} ${Ve.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[xt]:{overflow:"hidden",transition:`height ${Ve.motionDurationSlow} ${Ve.motionEaseInOut},
|
|
|
opacity ${Ve.motionDurationSlow} ${Ve.motionEaseInOut},
|
|
|
transform ${Ve.motionDurationSlow} ${Ve.motionEaseInOut} !important`,[`&${xt}-appear, &${xt}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${xt}-leave-active`]:{transform:"translateY(-5px)"}}}}};const ee=Ve=>({legend:{display:"block",width:"100%",marginBottom:Ve.marginLG,padding:0,color:Ve.colorTextDescription,fontSize:Ve.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${Ve.lineWidth}px ${Ve.lineType} ${Ve.colorBorder}`},label:{fontSize:Ve.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 ${Ve.controlOutlineWidth}px ${Ve.controlOutline}`},output:{display:"block",paddingTop:15,color:Ve.colorText,fontSize:Ve.fontSize,lineHeight:Ve.lineHeight}}),he=(Ve,Ut)=>{const{formItemCls:tn}=Ve;return{[tn]:{[`${tn}-label > label`]:{height:Ut},[`${tn}-control-input`]:{minHeight:Ut}}}},se=Ve=>{const{componentCls:Ut}=Ve;return{[Ve.componentCls]:Object.assign(Object.assign(Object.assign({},(0,ct.Wf)(Ve)),ee(Ve)),{[`${Ut}-text`]:{display:"inline-block",paddingInlineEnd:Ve.paddingSM},"&-small":Object.assign({},he(Ve,Ve.controlHeightSM)),"&-large":Object.assign({},he(Ve,Ve.controlHeightLG))})}},de=Ve=>{const{formItemCls:Ut,iconCls:tn,componentCls:xt,rootPrefixCls:rt,labelRequiredMarkColor:Vt,labelColor:on,labelFontSize:xn,labelHeight:An,labelColonMarginInlineStart:yt,labelColonMarginInlineEnd:cn,itemMarginBottom:On}=Ve;return{[Ut]:Object.assign(Object.assign({},(0,ct.Wf)(Ve)),{marginBottom:On,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${rt}-row`]:{display:"none"},"&-has-warning":{[`${Ut}-split`]:{color:Ve.colorError}},"&-has-error":{[`${Ut}-split`]:{color:Ve.colorWarning}},[`${Ut}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${Ve.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:An,color:on,fontSize:xn,[`> ${tn}`]:{fontSize:Ve.fontSize,verticalAlign:"top"},[`&${Ut}-required:not(${Ut}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:Ve.marginXXS,color:Vt,fontSize:Ve.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${xt}-hide-required-mark &`]:{display:"none"}},[`${Ut}-optional`]:{display:"inline-block",marginInlineStart:Ve.marginXXS,color:Ve.colorTextDescription,[`${xt}-hide-required-mark &`]:{display:"none"}},[`${Ut}-tooltip`]:{color:Ve.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:Ve.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:yt,marginInlineEnd:cn},[`&${Ut}-no-colon::after`]:{content:'"\\a0"'}}},[`${Ut}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${rt}-col-'"]):not([class*="' ${rt}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:Ve.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[Ut]:{"&-explain, &-extra":{clear:"both",color:Ve.colorTextDescription,fontSize:Ve.fontSize,lineHeight:Ve.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:Ve.controlHeightSM,transition:`color ${Ve.motionDurationMid} ${Ve.motionEaseOut}`},"&-explain":{"&-error":{color:Ve.colorError},"&-warning":{color:Ve.colorWarning}}},[`&-with-help ${Ut}-explain`]:{height:"auto",opacity:1},[`${Ut}-feedback-icon`]:{fontSize:Ve.fontSize,textAlign:"center",visibility:"visible",animationName:He.kr,animationDuration:Ve.motionDurationMid,animationTimingFunction:Ve.motionEaseOutBack,pointerEvents:"none","&-success":{color:Ve.colorSuccess},"&-error":{color:Ve.colorError},"&-warning":{color:Ve.colorWarning},"&-validating":{color:Ve.colorPrimary}}})}},me=Ve=>{const{componentCls:Ut,formItemCls:tn}=Ve;return{[`${Ut}-horizontal`]:{[`${tn}-label`]:{flexGrow:0},[`${tn}-control`]:{flex:"1 1 0",minWidth:0},[`${tn}-label[class$='-24'], ${tn}-label[class*='-24 ']`]:{[`& + ${tn}-control`]:{minWidth:"unset"}}}}},we=Ve=>{const{componentCls:Ut,formItemCls:tn}=Ve;return{[`${Ut}-inline`]:{display:"flex",flexWrap:"wrap",[tn]:{flex:"none",marginInlineEnd:Ve.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${tn}-label,
|
|
|
> ${tn}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${tn}-label`]:{flex:"none"},[`${Ut}-text`]:{display:"inline-block"},[`${tn}-has-feedback`]:{display:"inline-block"}}}}},be=Ve=>({padding:Ve.verticalLabelPadding,margin:Ve.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),Me=Ve=>{const{componentCls:Ut,formItemCls:tn,rootPrefixCls:xt}=Ve;return{[`${tn} ${tn}-label`]:be(Ve),[Ut]:{[tn]:{flexWrap:"wrap",[`${tn}-label, ${tn}-control`]:{[`&:not([class*=" ${xt}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},Ie=Ve=>{const{componentCls:Ut,formItemCls:tn,rootPrefixCls:xt}=Ve;return{[`${Ut}-vertical`]:{[tn]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${Ut}-item-control`]:{width:"100%"}}},[`${Ut}-vertical ${tn}-label,
|
|
|
.${xt}-col-24${tn}-label,
|
|
|
.${xt}-col-xl-24${tn}-label`]:be(Ve),[`@media (max-width: ${Ve.screenXSMax}px)`]:[Me(Ve),{[Ut]:{[`.${xt}-col-xs-24${tn}-label`]:be(Ve)}}],[`@media (max-width: ${Ve.screenSMMax}px)`]:{[Ut]:{[`.${xt}-col-sm-24${tn}-label`]:be(Ve)}},[`@media (max-width: ${Ve.screenMDMax}px)`]:{[Ut]:{[`.${xt}-col-md-24${tn}-label`]:be(Ve)}},[`@media (max-width: ${Ve.screenLGMax}px)`]:{[Ut]:{[`.${xt}-col-lg-24${tn}-label`]:be(Ve)}}}},ze=(Ve,Ut)=>(0,ht.TS)(Ve,{formItemCls:`${Ve.componentCls}-item`,rootPrefixCls:Ut});var et=(0,dt.Z)("Form",(Ve,Ut)=>{let{rootPrefixCls:tn}=Ut;const xt=ze(Ve,tn);return[se(xt),de(xt),te(xt),me(xt),we(xt),Ie(xt),(0,Et.Z)(xt),He.kr]},Ve=>({labelRequiredMarkColor:Ve.colorError,labelColor:Ve.colorTextHeading,labelFontSize:Ve.fontSize,labelHeight:Ve.controlHeight,labelColonMarginInlineStart:Ve.marginXXS/2,labelColonMarginInlineEnd:Ve.marginXS,itemMarginBottom:Ve.marginLG,verticalLabelPadding:`0 0 ${Ve.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const $e=[];function gt(Ve,Ut,tn){let xt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof Ve=="string"?Ve:`${Ut}-${xt}`,error:Ve,errorStatus:tn}}var Tt=Ve=>{let{help:Ut,helpStatus:tn,errors:xt=$e,warnings:rt=$e,className:Vt,fieldId:on,onVisibleChanged:xn}=Ve;const{prefixCls:An}=Ze.useContext(Be.Rk),yt=`${An}-item-explain`,[,cn]=et(An),On=(0,Ze.useMemo)(()=>(0,Ke.Z)(An),[An]),ri=mt(xt),Wt=mt(rt),Jt=Ze.useMemo(()=>Ut!=null?[gt(Ut,"help",tn)]:[].concat((0,ce.Z)(ri.map((ci,ui)=>gt(ci,"error","error",ui))),(0,ce.Z)(Wt.map((ci,ui)=>gt(ci,"warning","warning",ui)))),[Ut,tn,ri,Wt]),hi={};return on&&(hi.id=`${on}_help`),Ze.createElement(Ct.default,{motionDeadline:On.motionDeadline,motionName:`${An}-show-help`,visible:!!Jt.length,onVisibleChanged:xn},ci=>{const{className:ui,style:qn}=ci;return Ze.createElement("div",Object.assign({},hi,{className:_e()(yt,ui,Vt,cn),style:qn,role:"alert"}),Ze.createElement(Ct.CSSMotionList,Object.assign({keys:Jt},(0,Ke.Z)(An),{motionName:`${An}-show-help-item`,component:!1}),di=>{const{key:li,error:Ai,errorStatus:er,className:sr,style:vn}=di;return Ze.createElement("div",{key:li,className:_e()(sr,{[`${yt}-${er}`]:er}),style:vn},Ai)}))})},Qe=ve(95013),bt=ve(36355),Nt=ve(1684),At=ve(52946),Zt=ve(19716),Yt=ve(16722);const ut=["parentNode"],Ge="form_item";function kt(Ve){return Ve===void 0||Ve===!1?[]:Array.isArray(Ve)?Ve:[Ve]}function ln(Ve,Ut){if(!Ve.length)return;const tn=Ve.join("_");return Ut?`${Ut}_${tn}`:ut.includes(tn)?`${Ge}_${tn}`:tn}function sn(Ve,Ut,tn,xt,rt,Vt){let on=xt;return Vt!==void 0?on=Vt:tn.validating?on="validating":Ve.length?on="error":Ut.length?on="warning":(tn.touched||rt&&tn.validated)&&(on="success"),on}function Bt(Ve){return kt(Ve).join("_")}function Gt(Ve){const[Ut]=(0,Qe.useForm)(),tn=Ze.useRef({}),xt=Ze.useMemo(()=>Ve!=null?Ve:Object.assign(Object.assign({},Ut),{__INTERNAL__:{itemRef:rt=>Vt=>{const on=Bt(rt);Vt?tn.current[on]=Vt:delete tn.current[on]}},scrollToField:function(rt){let Vt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const on=kt(rt),xn=ln(on,xt.__INTERNAL__.name),An=xn?document.getElementById(xn):null;An&&(0,Yt.Z)(An,Object.assign({scrollMode:"if-needed",block:"nearest"},Vt))},getFieldInstance:rt=>{const Vt=Bt(rt);return tn.current[Vt]}}),[Ve,Ut]);return[xt]}var en=ve(28726),Bn=function(Ve,Ut){var tn={};for(var xt in Ve)Object.prototype.hasOwnProperty.call(Ve,xt)&&Ut.indexOf(xt)<0&&(tn[xt]=Ve[xt]);if(Ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var rt=0,xt=Object.getOwnPropertySymbols(Ve);rt<xt.length;rt++)Ut.indexOf(xt[rt])<0&&Object.prototype.propertyIsEnumerable.call(Ve,xt[rt])&&(tn[xt[rt]]=Ve[xt[rt]]);return tn};const rn=(Ve,Ut)=>{const tn=Ze.useContext(Nt.Z),{getPrefixCls:xt,direction:rt,form:Vt}=Ze.useContext(bt.E_),{prefixCls:on,className:xn,rootClassName:An,size:yt,disabled:cn=tn,form:On,colon:ri,labelAlign:Wt,labelWrap:Jt,labelCol:hi,wrapperCol:ci,hideRequiredMark:ui,layout:qn="horizontal",scrollToFirstError:di,requiredMark:li,onFinishFailed:Ai,name:er,style:sr,feedbackIcons:vn}=Ve,Nr=Bn(Ve,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),Dr=(0,Zt.Z)(yt),ir=Ze.useContext(en.Z),fn=(0,Ze.useMemo)(()=>li!==void 0?li:Vt&&Vt.requiredMark!==void 0?Vt.requiredMark:!ui,[ui,li,Vt]),jn=ri!=null?ri:Vt==null?void 0:Vt.colon,Ei=xt("form",on),[zi,Ni]=et(Ei),Gi=_e()(Ei,`${Ei}-${qn}`,{[`${Ei}-hide-required-mark`]:fn===!1,[`${Ei}-rtl`]:rt==="rtl",[`${Ei}-${Dr}`]:Dr},Ni,Vt==null?void 0:Vt.className,xn,An),[ur]=Gt(On),{__INTERNAL__:Qi}=ur;Qi.name=er;const rr=(0,Ze.useMemo)(()=>({name:er,labelAlign:Wt,labelCol:hi,labelWrap:Jt,wrapperCol:ci,vertical:qn==="vertical",colon:jn,requiredMark:fn,itemRef:Qi.itemRef,form:ur,feedbackIcons:vn}),[er,Wt,hi,ci,qn,jn,fn,ur,vn]);Ze.useImperativeHandle(Ut,()=>ur);const fr=(Jr,Ln)=>{if(Jr){let Zr={block:"nearest"};typeof Jr=="object"&&(Zr=Jr),ur.scrollToField(Ln,Zr)}},Nn=Jr=>{if(Ai==null||Ai(Jr),Jr.errorFields.length){const Ln=Jr.errorFields[0].name;if(di!==void 0){fr(di,Ln);return}Vt&&Vt.scrollToFirstError!==void 0&&fr(Vt.scrollToFirstError,Ln)}};return zi(Ze.createElement(Nt.n,{disabled:cn},Ze.createElement(At.q,{size:Dr},Ze.createElement(Be.RV,Object.assign({},{validateMessages:ir}),Ze.createElement(Be.q3.Provider,{value:rr},Ze.createElement(Qe.default,Object.assign({id:er},Nr,{name:er,onFinishFailed:Nn,form:ur,style:Object.assign(Object.assign({},Vt==null?void 0:Vt.style),sr),className:Gi})))))))};var ft=Ze.forwardRef(rn),En=ve(41799),Vn=ve(8654),Re=ve(92343),Ce=ve(11592);function Pe(Ve){if(typeof Ve=="function")return Ve;const Ut=(0,Ce.Z)(Ve);return Ut.length<=1?Ut[0]:Ut}const Ne=()=>{const{status:Ve,errors:Ut=[],warnings:tn=[]}=(0,Ze.useContext)(Be.aM);return{status:Ve,errors:Ut,warnings:tn}};Ne.Context=Be.aM;var ke=Ne,Se=ve(16089);function nt(Ve){const[Ut,tn]=Ze.useState(Ve),xt=(0,Ze.useRef)(null),rt=(0,Ze.useRef)([]),Vt=(0,Ze.useRef)(!1);Ze.useEffect(()=>(Vt.current=!1,()=>{Vt.current=!0,Se.Z.cancel(xt.current),xt.current=null}),[]);function on(xn){Vt.current||(xt.current===null&&(rt.current=[],xt.current=(0,Se.Z)(()=>{xt.current=null,tn(An=>{let yt=An;return rt.current.forEach(cn=>{yt=cn(yt)}),yt})})),rt.current.push(xn))}return[Ut,on]}function Pt(){const{itemRef:Ve}=Ze.useContext(Be.q3),Ut=Ze.useRef({});function tn(xt,rt){const Vt=rt&&typeof rt=="object"&&rt.ref,on=xt.join("_");return(Ut.current.name!==on||Ut.current.originRef!==Vt)&&(Ut.current.name=on,Ut.current.originRef=Vt,Ut.current.ref=(0,Vn.sQ)(Ve(xt),Vt)),Ut.current.ref}return tn}var qe=ve(29194),Ue=ve(34280),St=ve(2738),vt=ve(27382),lt=ve(37028);const Dt=Ve=>{const{formItemCls:Ut}=Ve;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${Ut}-control`]:{display:"flex"}}}};var un=(0,dt.b)(["Form","item-item"],(Ve,Ut)=>{let{rootPrefixCls:tn}=Ut;const xt=ze(Ve,tn);return[Dt(xt)]}),$t=Ve=>{const{prefixCls:Ut,status:tn,wrapperCol:xt,children:rt,errors:Vt,warnings:on,_internalItemRender:xn,extra:An,help:yt,fieldId:cn,marginBottom:On,onErrorVisibleChanged:ri}=Ve,Wt=`${Ut}-item`,Jt=Ze.useContext(Be.q3),hi=xt||Jt.wrapperCol||{},ci=_e()(`${Wt}-control`,hi.className),ui=Ze.useMemo(()=>Object.assign({},Jt),[Jt]);delete ui.labelCol,delete ui.wrapperCol;const qn=Ze.createElement("div",{className:`${Wt}-control-input`},Ze.createElement("div",{className:`${Wt}-control-input-content`},rt)),di=Ze.useMemo(()=>({prefixCls:Ut,status:tn}),[Ut,tn]),li=On!==null||Vt.length||on.length?Ze.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},Ze.createElement(Be.Rk.Provider,{value:di},Ze.createElement(Tt,{fieldId:cn,errors:Vt,warnings:on,help:yt,helpStatus:tn,className:`${Wt}-explain-connected`,onVisibleChanged:ri})),!!On&&Ze.createElement("div",{style:{width:0,height:On}})):null,Ai={};cn&&(Ai.id=`${cn}_extra`);const er=An?Ze.createElement("div",Object.assign({},Ai,{className:`${Wt}-extra`}),An):null,sr=xn&&xn.mark==="pro_table_render"&&xn.render?xn.render(Ve,{input:qn,errorList:li,extra:er}):Ze.createElement(Ze.Fragment,null,qn,li,er);return Ze.createElement(Be.q3.Provider,{value:ui},Ze.createElement(lt.Z,Object.assign({},hi,{className:ci}),sr),Ze.createElement(un,{prefixCls:Ut}))},wn=ve(61485),bn=ve(31724),pn=ve(9763),Yn=ve(6848),ai=function(Ve,Ut){var tn={};for(var xt in Ve)Object.prototype.hasOwnProperty.call(Ve,xt)&&Ut.indexOf(xt)<0&&(tn[xt]=Ve[xt]);if(Ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var rt=0,xt=Object.getOwnPropertySymbols(Ve);rt<xt.length;rt++)Ut.indexOf(xt[rt])<0&&Object.prototype.propertyIsEnumerable.call(Ve,xt[rt])&&(tn[xt[rt]]=Ve[xt[rt]]);return tn};function Wn(Ve){return Ve?typeof Ve=="object"&&!Ze.isValidElement(Ve)?Ve:{title:Ve}:null}var ii=Ve=>{let{prefixCls:Ut,label:tn,htmlFor:xt,labelCol:rt,labelAlign:Vt,colon:on,required:xn,requiredMark:An,tooltip:yt}=Ve;var cn;const[On]=(0,pn.Z)("Form"),{vertical:ri,labelAlign:Wt,labelCol:Jt,labelWrap:hi,colon:ci}=Ze.useContext(Be.q3);if(!tn)return null;const ui=rt||Jt||{},qn=Vt||Wt,di=`${Ut}-item-label`,li=_e()(di,qn==="left"&&`${di}-left`,ui.className,{[`${di}-wrap`]:!!hi});let Ai=tn;const er=on===!0||ci!==!1&&on!==!1;er&&!ri&&typeof tn=="string"&&tn.trim()!==""&&(Ai=tn.replace(/[:|:]\s*$/,""));const vn=Wn(yt);if(vn){const{icon:fn=Ze.createElement(wn.Z,null)}=vn,jn=ai(vn,["icon"]),Ei=Ze.createElement(Yn.Z,Object.assign({},jn),Ze.cloneElement(fn,{className:`${Ut}-item-tooltip`,title:""}));Ai=Ze.createElement(Ze.Fragment,null,Ai,Ei)}const Nr=An==="optional",Dr=typeof An=="function";Dr?Ai=An(Ai,{required:!!xn}):Nr&&!xn&&(Ai=Ze.createElement(Ze.Fragment,null,Ai,Ze.createElement("span",{className:`${Ut}-item-optional`,title:""},(On==null?void 0:On.optional)||((cn=bn.Z.Form)===null||cn===void 0?void 0:cn.optional))));const ir=_e()({[`${Ut}-item-required`]:xn,[`${Ut}-item-required-mark-optional`]:Nr||Dr,[`${Ut}-item-no-colon`]:!er});return Ze.createElement(lt.Z,Object.assign({},ui,{className:li}),Ze.createElement("label",{htmlFor:xt,className:ir,title:typeof tn=="string"?tn:""},Ai))},pi=ve(29679),gi=ve(19248),Ri=ve(96512),Ji=ve(58617);const Un={success:pi.Z,warning:Ri.Z,error:gi.Z,validating:Ji.Z};function $n(Ve){let{children:Ut,errors:tn,warnings:xt,hasFeedback:rt,validateStatus:Vt,prefixCls:on,meta:xn,noStyle:An}=Ve;const yt=`${on}-item`,{feedbackIcons:cn}=Ze.useContext(Be.q3),On=sn(tn,xt,xn,null,!!rt,Vt),{isFormItemInput:ri,status:Wt}=Ze.useContext(Be.aM),Jt=Ze.useMemo(()=>{var hi;let ci;if(rt){const di=rt!==!0&&rt.icons||cn,li=On&&((hi=di==null?void 0:di({status:On,errors:tn,warnings:xt}))===null||hi===void 0?void 0:hi[On]),Ai=On&&Un[On];ci=li!==!1&&Ai?Ze.createElement("span",{className:_e()(`${yt}-feedback-icon`,`${yt}-feedback-icon-${On}`)},li||Ze.createElement(Ai,null)):null}let ui=!0,qn=On||"";return An&&(ui=ri,qn=(On!=null?On:Wt)||""),{status:qn,errors:tn,warnings:xt,hasFeedback:!!rt,feedbackIcon:ci,isFormItemInput:ui}},[On,rt,An,ri,Wt]);return Ze.createElement(Be.aM.Provider,{value:Jt},Ut)}var ti=function(Ve,Ut){var tn={};for(var xt in Ve)Object.prototype.hasOwnProperty.call(Ve,xt)&&Ut.indexOf(xt)<0&&(tn[xt]=Ve[xt]);if(Ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var rt=0,xt=Object.getOwnPropertySymbols(Ve);rt<xt.length;rt++)Ut.indexOf(xt[rt])<0&&Object.prototype.propertyIsEnumerable.call(Ve,xt[rt])&&(tn[xt[rt]]=Ve[xt[rt]]);return tn};function Pi(Ve){const{prefixCls:Ut,className:tn,rootClassName:xt,style:rt,help:Vt,errors:on,warnings:xn,validateStatus:An,meta:yt,hasFeedback:cn,hidden:On,children:ri,fieldId:Wt,required:Jt,isRequired:hi,onSubItemMetaChange:ci}=Ve,ui=ti(Ve,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),qn=`${Ut}-item`,{requiredMark:di}=Ze.useContext(Be.q3),li=Ze.useRef(null),Ai=mt(on),er=mt(xn),sr=Vt!=null,vn=!!(sr||on.length||xn.length),Nr=!!li.current&&(0,qe.Z)(li.current),[Dr,ir]=Ze.useState(null);(0,Ue.Z)(()=>{if(vn&&li.current){const Ni=getComputedStyle(li.current);ir(parseInt(Ni.marginBottom,10))}},[vn,Nr]);const fn=Ni=>{Ni||ir(null)},Ei=function(){let Ni=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Gi=Ni?Ai:yt.errors,ur=Ni?er:yt.warnings;return sn(Gi,ur,yt,"",!!cn,An)}(),zi=_e()(qn,tn,xt,{[`${qn}-with-help`]:sr||Ai.length||er.length,[`${qn}-has-feedback`]:Ei&&cn,[`${qn}-has-success`]:Ei==="success",[`${qn}-has-warning`]:Ei==="warning",[`${qn}-has-error`]:Ei==="error",[`${qn}-is-validating`]:Ei==="validating",[`${qn}-hidden`]:On});return Ze.createElement("div",{className:zi,style:rt,ref:li},Ze.createElement(vt.Z,Object.assign({className:`${qn}-row`},(0,St.Z)(ui,["_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"])),Ze.createElement(ii,Object.assign({htmlFor:Wt},Ve,{requiredMark:di,required:Jt!=null?Jt:hi,prefixCls:Ut})),Ze.createElement($t,Object.assign({},Ve,yt,{errors:Ai,warnings:er,prefixCls:Ut,status:Ei,help:Vt,marginBottom:Dr,onErrorVisibleChanged:fn}),Ze.createElement(Be.qI.Provider,{value:ci},Ze.createElement($n,{prefixCls:Ut,meta:yt,errors:yt.errors,warnings:yt.warnings,hasFeedback:cn,validateStatus:Ei},ri)))),!!Dr&&Ze.createElement("div",{className:`${qn}-margin-offset`,style:{marginBottom:-Dr}}))}const mi="__SPLIT__",nr=null,ji=Ze.memo(Ve=>{let{children:Ut}=Ve;return Ut},(Ve,Ut)=>Ve.value===Ut.value&&Ve.update===Ut.update&&Ve.childProps.length===Ut.childProps.length&&Ve.childProps.every((tn,xt)=>tn===Ut.childProps[xt]));function Le(Ve){return Ve!=null}function si(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Hi(Ve){const{name:Ut,noStyle:tn,className:xt,dependencies:rt,prefixCls:Vt,shouldUpdate:on,rules:xn,children:An,required:yt,label:cn,messageVariables:On,trigger:ri="onChange",validateTrigger:Wt,hidden:Jt,help:hi}=Ve,{getPrefixCls:ci}=Ze.useContext(bt.E_),{name:ui}=Ze.useContext(Be.q3),qn=Pe(An),di=typeof qn=="function",li=Ze.useContext(Be.qI),{validateTrigger:Ai}=Ze.useContext(Qe.FieldContext),er=Wt!==void 0?Wt:Ai,sr=Le(Ut),vn=ci("form",Vt),[Nr,Dr]=et(vn),ir=Ze.useContext(Qe.ListContext),fn=Ze.useRef(),[jn,Ei]=nt({}),[zi,Ni]=(0,En.Z)(()=>si()),Gi=Ln=>{const Zr=ir==null?void 0:ir.getKey(Ln.name);if(Ni(Ln.destroy?si():Ln,!0),tn&&hi!==!1&&li){let co=Ln.name;if(Ln.destroy)co=fn.current||co;else if(Zr!==void 0){const[Bi,Po]=Zr;co=[Bi].concat((0,ce.Z)(Po)),fn.current=co}li(Ln,co)}},ur=(Ln,Zr)=>{Ei(co=>{const Bi=Object.assign({},co),ao=[].concat((0,ce.Z)(Ln.name.slice(0,-1)),(0,ce.Z)(Zr)).join(mi);return Ln.destroy?delete Bi[ao]:Bi[ao]=Ln,Bi})},[Qi,rr]=Ze.useMemo(()=>{const Ln=(0,ce.Z)(zi.errors),Zr=(0,ce.Z)(zi.warnings);return Object.values(jn).forEach(co=>{Ln.push.apply(Ln,(0,ce.Z)(co.errors||[])),Zr.push.apply(Zr,(0,ce.Z)(co.warnings||[]))}),[Ln,Zr]},[jn,zi.errors,zi.warnings]),fr=Pt();function Nn(Ln,Zr,co){return tn&&!Jt?Ze.createElement($n,{prefixCls:vn,hasFeedback:Ve.hasFeedback,validateStatus:Ve.validateStatus,meta:zi,errors:Qi,warnings:rr,noStyle:!0},Ln):Ze.createElement(Pi,Object.assign({key:"row"},Ve,{className:_e()(xt,Dr),prefixCls:vn,fieldId:Zr,isRequired:co,errors:Qi,warnings:rr,meta:zi,onSubItemMetaChange:ur}),Ln)}if(!sr&&!di&&!rt)return Nr(Nn(qn));let Jr={};return typeof cn=="string"?Jr.label=cn:Ut&&(Jr.label=String(Ut)),On&&(Jr=Object.assign(Object.assign({},Jr),On)),Nr(Ze.createElement(Qe.Field,Object.assign({},Ve,{messageVariables:Jr,trigger:ri,validateTrigger:er,onMetaChange:Gi}),(Ln,Zr,co)=>{const Bi=kt(Ut).length&&Zr?Zr.name:[],Po=ln(Bi,ui),ao=yt!==void 0?yt:!!(xn&&xn.some(Hr=>{if(Hr&&typeof Hr=="object"&&Hr.required&&!Hr.warningOnly)return!0;if(typeof Hr=="function"){const ro=Hr(co);return ro&&ro.required&&!ro.warningOnly}return!1})),Vi=Object.assign({},Ln);let qi=null;if(Array.isArray(qn)&&sr)qi=qn;else if(!(di&&(!(on||rt)||sr))){if(!(rt&&!di&&!sr))if((0,Re.l$)(qn)){const Hr=Object.assign(Object.assign({},qn.props),Vi);if(Hr.id||(Hr.id=Po),hi||Qi.length>0||rr.length>0||Ve.extra){const tt=[];(hi||Qi.length>0)&&tt.push(`${Po}_help`),Ve.extra&&tt.push(`${Po}_extra`),Hr["aria-describedby"]=tt.join(" ")}Qi.length>0&&(Hr["aria-invalid"]="true"),ao&&(Hr["aria-required"]="true"),(0,Vn.Yr)(qn)&&(Hr.ref=fr(Bi,qn)),new Set([].concat((0,ce.Z)(kt(ri)),(0,ce.Z)(kt(er)))).forEach(tt=>{Hr[tt]=function(){for(var uo,Zo,ga,Pa,ia,Or=arguments.length,kr=new Array(Or),fo=0;fo<Or;fo++)kr[fo]=arguments[fo];(ga=Vi[tt])===null||ga===void 0||(uo=ga).call.apply(uo,[Vi].concat(kr)),(ia=(Pa=qn.props)[tt])===null||ia===void 0||(Zo=ia).call.apply(Zo,[Pa].concat(kr))}});const xi=[Hr["aria-required"],Hr["aria-invalid"],Hr["aria-describedby"]];qi=Ze.createElement(ji,{value:Vi[Ve.valuePropName||"value"],update:qn,childProps:xi},(0,Re.Tm)(qn,Hr))}else di&&(on||rt)&&!sr?qi=qn(co):qi=qn}return Nn(qi,Po,ao)}))}const hn=Hi;hn.useStatus=ke;var ni=hn,vi=function(Ve,Ut){var tn={};for(var xt in Ve)Object.prototype.hasOwnProperty.call(Ve,xt)&&Ut.indexOf(xt)<0&&(tn[xt]=Ve[xt]);if(Ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var rt=0,xt=Object.getOwnPropertySymbols(Ve);rt<xt.length;rt++)Ut.indexOf(xt[rt])<0&&Object.prototype.propertyIsEnumerable.call(Ve,xt[rt])&&(tn[xt[rt]]=Ve[xt[rt]]);return tn},_n=Ve=>{var{prefixCls:Ut,children:tn}=Ve,xt=vi(Ve,["prefixCls","children"]);const{getPrefixCls:rt}=Ze.useContext(bt.E_),Vt=rt("form",Ut),on=Ze.useMemo(()=>({prefixCls:Vt,status:"error"}),[Vt]);return Ze.createElement(Qe.List,Object.assign({},xt),(xn,An,yt)=>Ze.createElement(Be.Rk.Provider,{value:on},tn(xn.map(cn=>Object.assign(Object.assign({},cn),{fieldKey:cn.key})),An,{errors:yt.errors,warnings:yt.warnings})))};function Dn(){const{form:Ve}=(0,Ze.useContext)(Be.q3);return Ve}const Ft=ft;Ft.Item=ni,Ft.List=_n,Ft.ErrorList=Tt,Ft.useForm=Gt,Ft.useFormInstance=Dn,Ft.useWatch=Qe.useWatch,Ft.Provider=Be.RV,Ft.create=()=>{};var Ot=Ft},8628:function(Pn,an,ve){"use strict";var ce=ve(59301),De=ve(34280),_e=ve(56762),Ct=ve(69507);function Ze(){let Ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const Be=(0,ce.useRef)({}),mt=(0,_e.Z)(),ct=(0,Ct.ZP)();return(0,De.Z)(()=>{const He=ct.subscribe(Et=>{Be.current=Et,Ke&&mt()});return()=>ct.unsubscribe(He)},[]),Be.current}an.Z=Ze},9432:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return de},n:function(){return he}});var ce=ve(19248),De=ve(92310),_e=ve.n(De),Ct=ve(93681),Ze=ve(8654),Ke=ve(59301),Be=ve(19080),mt=ve(36355),ct=ve(1684),He=ve(19716),Et=ve(32441),ht=ve(33234),dt=ve(59412),Ae=ve(9937);function te(me){return!!(me.prefix||me.suffix||me.allowClear)}var ee=function(me,we){var be={};for(var Me in me)Object.prototype.hasOwnProperty.call(me,Me)&&we.indexOf(Me)<0&&(be[Me]=me[Me]);if(me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ie=0,Me=Object.getOwnPropertySymbols(me);Ie<Me.length;Ie++)we.indexOf(Me[Ie])<0&&Object.prototype.propertyIsEnumerable.call(me,Me[Ie])&&(be[Me[Ie]]=me[Me[Ie]]);return be};function he(me,we){if(!me)return;me.focus(we);const{cursor:be}=we||{};if(be){const Me=me.value.length;switch(be){case"start":me.setSelectionRange(0,0);break;case"end":me.setSelectionRange(Me,Me);break;default:me.setSelectionRange(0,Me);break}}}var de=(0,Ke.forwardRef)((me,we)=>{var be;const{prefixCls:Me,bordered:Ie=!0,status:ze,size:et,disabled:$e,onBlur:gt,onFocus:je,suffix:Tt,allowClear:Qe,addonAfter:bt,addonBefore:Nt,className:At,style:Zt,styles:Yt,rootClassName:ut,onChange:Ge,classNames:kt}=me,ln=ee(me,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:sn,direction:Bt,input:Gt}=Ke.useContext(mt.E_),en=sn("input",Me),Bn=(0,Ke.useRef)(null),[rn,Cn]=(0,Ae.ZP)(en),{compactSize:ft,compactItemClassnames:En}=(0,ht.ri)(en,Bt),Vn=(0,He.Z)(un=>{var Xt;return(Xt=et!=null?et:ft)!==null&&Xt!==void 0?Xt:un}),Re=Ke.useContext(ct.Z),Ce=$e!=null?$e:Re,{status:Pe,hasFeedback:Ne,feedbackIcon:ke}=(0,Ke.useContext)(Et.aM),Se=(0,Be.F)(Pe,ze),nt=te(me)||!!Ne,Pt=(0,Ke.useRef)(nt);(0,Ke.useEffect)(()=>{var un;nt&&Pt.current,Pt.current=nt},[nt]);const qe=(0,dt.Z)(Bn,!0),Ue=un=>{qe(),gt==null||gt(un)},St=un=>{qe(),je==null||je(un)},vt=un=>{qe(),Ge==null||Ge(un)},lt=(Ne||Tt)&&Ke.createElement(Ke.Fragment,null,Tt,Ne&&ke);let Dt;return typeof Qe=="object"&&(Qe!=null&&Qe.clearIcon)?Dt=Qe:Qe&&(Dt={clearIcon:Ke.createElement(ce.Z,null)}),rn(Ke.createElement(Ct.default,Object.assign({ref:(0,Ze.sQ)(we,Bn),prefixCls:en,autoComplete:Gt==null?void 0:Gt.autoComplete},ln,{disabled:Ce,onBlur:Ue,onFocus:St,style:Object.assign(Object.assign({},Gt==null?void 0:Gt.style),Zt),styles:Object.assign(Object.assign({},Gt==null?void 0:Gt.styles),Yt),suffix:lt,allowClear:Dt,className:_e()(At,ut,En,Gt==null?void 0:Gt.className),onChange:vt,addonAfter:bt&&Ke.createElement(ht.BR,null,Ke.createElement(Et.Ux,{override:!0,status:!0},bt)),addonBefore:Nt&&Ke.createElement(ht.BR,null,Ke.createElement(Et.Ux,{override:!0,status:!0},Nt)),classNames:Object.assign(Object.assign(Object.assign({},kt),Gt==null?void 0:Gt.classNames),{input:_e()({[`${en}-sm`]:Vn==="small",[`${en}-lg`]:Vn==="large",[`${en}-rtl`]:Bt==="rtl",[`${en}-borderless`]:!Ie},!nt&&(0,Be.Z)(en,Se),kt==null?void 0:kt.input,(be=Gt==null?void 0:Gt.classNames)===null||be===void 0?void 0:be.input,Cn)}),classes:{affixWrapper:_e()({[`${en}-affix-wrapper-sm`]:Vn==="small",[`${en}-affix-wrapper-lg`]:Vn==="large",[`${en}-affix-wrapper-rtl`]:Bt==="rtl",[`${en}-affix-wrapper-borderless`]:!Ie},(0,Be.Z)(`${en}-affix-wrapper`,Se,Ne),Cn),wrapper:_e()({[`${en}-group-rtl`]:Bt==="rtl"},Cn),group:_e()({[`${en}-group-wrapper-sm`]:Vn==="small",[`${en}-group-wrapper-lg`]:Vn==="large",[`${en}-group-wrapper-rtl`]:Bt==="rtl",[`${en}-group-wrapper-disabled`]:Ce},(0,Be.Z)(`${en}-group-wrapper`,Se,Ne),Cn)}})))})},1643:function(Pn,an,ve){"use strict";var ce=ve(19248),De=ve(92310),_e=ve.n(De),Ct=ve(9296),Ze=ve(59301),Ke=ve(19080),Be=ve(36355),mt=ve(1684),ct=ve(19716),He=ve(32441),Et=ve(9432),ht=ve(9937),dt=function(te,ee){var he={};for(var se in te)Object.prototype.hasOwnProperty.call(te,se)&&ee.indexOf(se)<0&&(he[se]=te[se]);if(te!=null&&typeof Object.getOwnPropertySymbols=="function")for(var de=0,se=Object.getOwnPropertySymbols(te);de<se.length;de++)ee.indexOf(se[de])<0&&Object.prototype.propertyIsEnumerable.call(te,se[de])&&(he[se[de]]=te[se[de]]);return he};const Ae=(0,Ze.forwardRef)((te,ee)=>{const{prefixCls:he,bordered:se=!0,size:de,disabled:me,status:we,allowClear:be,showCount:Me,classNames:Ie,rootClassName:ze,className:et}=te,$e=dt(te,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:gt,direction:je}=Ze.useContext(Be.E_),Tt=(0,ct.Z)(de),Qe=Ze.useContext(mt.Z),bt=me!=null?me:Qe,{status:Nt,hasFeedback:At,feedbackIcon:Zt}=Ze.useContext(He.aM),Yt=(0,Ke.F)(Nt,we),ut=Ze.useRef(null);Ze.useImperativeHandle(ee,()=>{var Bt;return{resizableTextArea:(Bt=ut.current)===null||Bt===void 0?void 0:Bt.resizableTextArea,focus:Gt=>{var en,Bn;(0,Et.n)((Bn=(en=ut.current)===null||en===void 0?void 0:en.resizableTextArea)===null||Bn===void 0?void 0:Bn.textArea,Gt)},blur:()=>{var Gt;return(Gt=ut.current)===null||Gt===void 0?void 0:Gt.blur()}}});const Ge=gt("input",he);let kt;typeof be=="object"&&(be!=null&&be.clearIcon)?kt=be:be&&(kt={clearIcon:Ze.createElement(ce.Z,null)});const[ln,sn]=(0,ht.ZP)(Ge);return ln(Ze.createElement(Ct.default,Object.assign({},$e,{disabled:bt,allowClear:kt,className:_e()(et,ze),classes:{affixWrapper:_e()(`${Ge}-textarea-affix-wrapper`,{[`${Ge}-affix-wrapper-rtl`]:je==="rtl",[`${Ge}-affix-wrapper-borderless`]:!se,[`${Ge}-affix-wrapper-sm`]:Tt==="small",[`${Ge}-affix-wrapper-lg`]:Tt==="large",[`${Ge}-textarea-show-count`]:Me},(0,Ke.Z)(`${Ge}-affix-wrapper`,Yt),sn)},classNames:Object.assign(Object.assign({},Ie),{textarea:_e()({[`${Ge}-borderless`]:!se,[`${Ge}-sm`]:Tt==="small",[`${Ge}-lg`]:Tt==="large"},(0,Ke.Z)(Ge,Yt),sn,Ie==null?void 0:Ie.textarea)}),prefixCls:Ge,suffix:At&&Ze.createElement("span",{className:`${Ge}-textarea-suffix`},Zt),showCount:Me,ref:ut})))});an.Z=Ae},59412:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return De}});var ce=ve(59301);function De(_e,Ct){const Ze=(0,ce.useRef)([]),Ke=()=>{Ze.current.push(setTimeout(()=>{var Be,mt,ct,He;!((Be=_e.current)===null||Be===void 0)&&Be.input&&((mt=_e.current)===null||mt===void 0?void 0:mt.input.getAttribute("type"))==="password"&&(!((ct=_e.current)===null||ct===void 0)&&ct.input.hasAttribute("value"))&&((He=_e.current)===null||He===void 0||He.input.removeAttribute("value"))}))};return(0,ce.useEffect)(()=>(Ct&&Ke(),()=>Ze.current.forEach(Be=>{Be&&clearTimeout(Be)})),[]),Ke}},92832:function(Pn,an,ve){"use strict";ve.d(an,{default:function(){return Tt}});var ce=ve(92310),De=ve.n(ce),_e=ve(59301),Ct=ve(36355),Ze=ve(32441),Ke=ve(9937),mt=Qe=>{const{getPrefixCls:bt,direction:Nt}=(0,_e.useContext)(Ct.E_),{prefixCls:At,className:Zt}=Qe,Yt=bt("input-group",At),ut=bt("input"),[Ge,kt]=(0,Ke.ZP)(ut),ln=De()(Yt,{[`${Yt}-lg`]:Qe.size==="large",[`${Yt}-sm`]:Qe.size==="small",[`${Yt}-compact`]:Qe.compact,[`${Yt}-rtl`]:Nt==="rtl"},kt,Zt),sn=(0,_e.useContext)(Ze.aM),Bt=(0,_e.useMemo)(()=>Object.assign(Object.assign({},sn),{isFormItemInput:!1}),[sn]);return Ge(_e.createElement("span",{className:ln,style:Qe.style,onMouseEnter:Qe.onMouseEnter,onMouseLeave:Qe.onMouseLeave,onFocus:Qe.onFocus,onBlur:Qe.onBlur},_e.createElement(Ze.aM.Provider,{value:Bt},Qe.children)))},ct=ve(9432),He=ve(73331),Et=ve(15277),ht=ve(2738),dt=ve(8654),Ae=ve(59412),te=function(Qe,bt){var Nt={};for(var At in Qe)Object.prototype.hasOwnProperty.call(Qe,At)&&bt.indexOf(At)<0&&(Nt[At]=Qe[At]);if(Qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Zt=0,At=Object.getOwnPropertySymbols(Qe);Zt<At.length;Zt++)bt.indexOf(At[Zt])<0&&Object.prototype.propertyIsEnumerable.call(Qe,At[Zt])&&(Nt[At[Zt]]=Qe[At[Zt]]);return Nt};const ee=Qe=>Qe?_e.createElement(Et.Z,null):_e.createElement(He.Z,null),he={click:"onClick",hover:"onMouseOver"};var de=_e.forwardRef((Qe,bt)=>{const{visibilityToggle:Nt=!0}=Qe,At=typeof Nt=="object"&&Nt.visible!==void 0,[Zt,Yt]=(0,_e.useState)(()=>At?Nt.visible:!1),ut=(0,_e.useRef)(null);_e.useEffect(()=>{At&&Yt(Nt.visible)},[At,Nt]);const Ge=(0,Ae.Z)(ut),kt=()=>{const{disabled:Ce}=Qe;Ce||(Zt&&Ge(),Yt(Pe=>{var Ne;const ke=!Pe;return typeof Nt=="object"&&((Ne=Nt.onVisibleChange)===null||Ne===void 0||Ne.call(Nt,ke)),ke}))},ln=Ce=>{const{action:Pe="click",iconRender:Ne=ee}=Qe,ke=he[Pe]||"",Se=Ne(Zt),nt={[ke]:kt,className:`${Ce}-icon`,key:"passwordIcon",onMouseDown:Pt=>{Pt.preventDefault()},onMouseUp:Pt=>{Pt.preventDefault()}};return _e.cloneElement(_e.isValidElement(Se)?Se:_e.createElement("span",null,Se),nt)},{className:sn,prefixCls:Bt,inputPrefixCls:Gt,size:en}=Qe,Bn=te(Qe,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:rn}=_e.useContext(Ct.E_),Cn=rn("input",Gt),ft=rn("input-password",Bt),En=Nt&&ln(ft),Vn=De()(ft,sn,{[`${ft}-${en}`]:!!en}),Re=Object.assign(Object.assign({},(0,ht.Z)(Bn,["suffix","iconRender","visibilityToggle"])),{type:Zt?"text":"password",className:Vn,prefixCls:Cn,suffix:En});return en&&(Re.size=en),_e.createElement(ct.Z,Object.assign({ref:(0,dt.sQ)(bt,ut)},Re))}),me=ve(47472),we=ve(92343),be=ve(3113),Me=ve(19716),Ie=ve(33234),ze=function(Qe,bt){var Nt={};for(var At in Qe)Object.prototype.hasOwnProperty.call(Qe,At)&&bt.indexOf(At)<0&&(Nt[At]=Qe[At]);if(Qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Zt=0,At=Object.getOwnPropertySymbols(Qe);Zt<At.length;Zt++)bt.indexOf(At[Zt])<0&&Object.prototype.propertyIsEnumerable.call(Qe,At[Zt])&&(Nt[At[Zt]]=Qe[At[Zt]]);return Nt},$e=_e.forwardRef((Qe,bt)=>{const{prefixCls:Nt,inputPrefixCls:At,className:Zt,size:Yt,suffix:ut,enterButton:Ge=!1,addonAfter:kt,loading:ln,disabled:sn,onSearch:Bt,onChange:Gt,onCompositionStart:en,onCompositionEnd:Bn}=Qe,rn=ze(Qe,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Cn,direction:ft}=_e.useContext(Ct.E_),En=_e.useRef(!1),Vn=Cn("input-search",Nt),Re=Cn("input",At),{compactSize:Ce}=(0,Ie.ri)(Vn,ft),Pe=(0,Me.Z)($t=>{var wn;return(wn=Yt!=null?Yt:Ce)!==null&&wn!==void 0?wn:$t}),Ne=_e.useRef(null),ke=$t=>{$t&&$t.target&&$t.type==="click"&&Bt&&Bt($t.target.value,$t,{source:"clear"}),Gt&&Gt($t)},Se=$t=>{var wn;document.activeElement===((wn=Ne.current)===null||wn===void 0?void 0:wn.input)&&$t.preventDefault()},nt=$t=>{var wn,bn;Bt&&Bt((bn=(wn=Ne.current)===null||wn===void 0?void 0:wn.input)===null||bn===void 0?void 0:bn.value,$t,{source:"input"})},Pt=$t=>{En.current||ln||nt($t)},qe=typeof Ge=="boolean"?_e.createElement(me.Z,null):null,Ue=`${Vn}-button`;let St;const vt=Ge||{},lt=vt.type&&vt.type.__ANT_BUTTON===!0;lt||vt.type==="button"?St=(0,we.Tm)(vt,Object.assign({onMouseDown:Se,onClick:$t=>{var wn,bn;(bn=(wn=vt==null?void 0:vt.props)===null||wn===void 0?void 0:wn.onClick)===null||bn===void 0||bn.call(wn,$t),nt($t)},key:"enterButton"},lt?{className:Ue,size:Pe}:{})):St=_e.createElement(be.ZP,{className:Ue,type:Ge?"primary":void 0,size:Pe,disabled:sn,key:"enterButton",onMouseDown:Se,onClick:nt,loading:ln,icon:qe},Ge),kt&&(St=[St,(0,we.Tm)(kt,{key:"addonAfter"})]);const Dt=De()(Vn,{[`${Vn}-rtl`]:ft==="rtl",[`${Vn}-${Pe}`]:!!Pe,[`${Vn}-with-button`]:!!Ge},Zt),un=$t=>{En.current=!0,en==null||en($t)},Xt=$t=>{En.current=!1,Bn==null||Bn($t)};return _e.createElement(ct.Z,Object.assign({ref:(0,dt.sQ)(Ne,bt),onPressEnter:Pt},rn,{size:Pe,onCompositionStart:un,onCompositionEnd:Xt,prefixCls:Re,addonAfter:St,suffix:ut,onChange:ke,className:Dt,disabled:sn}))}),gt=ve(1643);const je=ct.Z;je.Group=mt,je.Search=$e,je.TextArea=gt.Z,je.Password=de;var Tt=je},45818:function(Pn,an,ve){"use strict";ve.d(an,{D:function(){return me},Z:function(){return Me}});var ce=ve(96663),De=ve(59301),_e={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"},Ct=_e,Ze=ve(7657),Ke=function(ze,et){return De.createElement(Ze.Z,(0,ce.Z)({},ze,{ref:et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be,ct=ve(33853),He=ve(38819),Et=ve(92310),ht=ve.n(Et),dt=ve(2738),te=Ie=>!isNaN(parseFloat(Ie))&&isFinite(Ie),ee=ve(36355),he=ve(84966),se=function(Ie,ze){var et={};for(var $e in Ie)Object.prototype.hasOwnProperty.call(Ie,$e)&&ze.indexOf($e)<0&&(et[$e]=Ie[$e]);if(Ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var gt=0,$e=Object.getOwnPropertySymbols(Ie);gt<$e.length;gt++)ze.indexOf($e[gt])<0&&Object.prototype.propertyIsEnumerable.call(Ie,$e[gt])&&(et[$e[gt]]=Ie[$e[gt]]);return et};const de={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},me=De.createContext({}),we=(()=>{let Ie=0;return function(){let ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return Ie+=1,`${ze}${Ie}`}})();var Me=De.forwardRef((Ie,ze)=>{const{prefixCls:et,className:$e,trigger:gt,children:je,defaultCollapsed:Tt=!1,theme:Qe="dark",style:bt={},collapsible:Nt=!1,reverseArrow:At=!1,width:Zt=200,collapsedWidth:Yt=80,zeroWidthTriggerStyle:ut,breakpoint:Ge,onCollapse:kt,onBreakpoint:ln}=Ie,sn=se(Ie,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:Bt}=(0,De.useContext)(he.Gs),[Gt,en]=(0,De.useState)("collapsed"in Ie?Ie.collapsed:Tt),[Bn,rn]=(0,De.useState)(!1);(0,De.useEffect)(()=>{"collapsed"in Ie&&en(Ie.collapsed)},[Ie.collapsed]);const Cn=(Pe,Ne)=>{"collapsed"in Ie||en(Pe),kt==null||kt(Pe,Ne)},ft=(0,De.useRef)();ft.current=Pe=>{rn(Pe.matches),ln==null||ln(Pe.matches),Gt!==Pe.matches&&Cn(Pe.matches,"responsive")},(0,De.useEffect)(()=>{function Pe(ke){return ft.current(ke)}let Ne;if(typeof window!="undefined"){const{matchMedia:ke}=window;if(ke&&Ge&&Ge in de){Ne=ke(`(max-width: ${de[Ge]})`);try{Ne.addEventListener("change",Pe)}catch(Se){Ne.addListener(Pe)}Pe(Ne)}}return()=>{try{Ne==null||Ne.removeEventListener("change",Pe)}catch(ke){Ne==null||Ne.removeListener(Pe)}}},[Ge]),(0,De.useEffect)(()=>{const Pe=we("ant-sider-");return Bt.addSider(Pe),()=>Bt.removeSider(Pe)},[]);const En=()=>{Cn(!Gt,"clickTrigger")},{getPrefixCls:Vn}=(0,De.useContext)(ee.E_),Re=()=>{const Pe=Vn("layout-sider",et),Ne=(0,dt.Z)(sn,["collapsed"]),ke=Gt?Yt:Zt,Se=te(ke)?`${ke}px`:String(ke),nt=parseFloat(String(Yt||0))===0?De.createElement("span",{onClick:En,className:ht()(`${Pe}-zero-width-trigger`,`${Pe}-zero-width-trigger-${At?"right":"left"}`),style:ut},gt||De.createElement(mt,null)):null,Ue={expanded:At?De.createElement(He.Z,null):De.createElement(ct.Z,null),collapsed:At?De.createElement(ct.Z,null):De.createElement(He.Z,null)}[Gt?"collapsed":"expanded"],St=gt!==null?nt||De.createElement("div",{className:`${Pe}-trigger`,onClick:En,style:{width:Se}},gt||Ue):null,vt=Object.assign(Object.assign({},bt),{flex:`0 0 ${Se}`,maxWidth:Se,minWidth:Se,width:Se}),lt=ht()(Pe,`${Pe}-${Qe}`,{[`${Pe}-collapsed`]:!!Gt,[`${Pe}-has-trigger`]:Nt&>!==null&&!nt,[`${Pe}-below`]:!!Bn,[`${Pe}-zero-width`]:parseFloat(Se)===0},$e);return De.createElement("aside",Object.assign({className:lt},Ne,{style:vt,ref:ze}),De.createElement("div",{className:`${Pe}-children`},je),Nt||Bn&&nt?St:null)},Ce=De.useMemo(()=>({siderCollapsed:Gt}),[Gt]);return De.createElement(me.Provider,{value:Ce},Re())})},84966:function(Pn,an,ve){"use strict";ve.d(an,{VY:function(){return me},$_:function(){return de},h4:function(){return se},Gs:function(){return dt},ZP:function(){return we}});var ce=ve(19127),De=ve(92310),_e=ve.n(De),Ct=ve(2738),Ze=ve(59301),Ke=ve(36355),Be=ve(83116),ct=be=>{const{componentCls:Me,bodyBg:Ie,lightSiderBg:ze,lightTriggerBg:et,lightTriggerColor:$e}=be;return{[`${Me}-sider-light`]:{background:ze,[`${Me}-sider-trigger`]:{color:$e,background:et},[`${Me}-sider-zero-width-trigger`]:{color:$e,background:et,border:`1px solid ${Ie}`,borderInlineStart:0}}}};const He=be=>{const{antCls:Me,componentCls:Ie,colorText:ze,triggerColor:et,footerBg:$e,triggerBg:gt,headerHeight:je,headerPadding:Tt,headerColor:Qe,footerPadding:bt,triggerHeight:Nt,zeroTriggerHeight:At,zeroTriggerWidth:Zt,motionDurationMid:Yt,motionDurationSlow:ut,fontSize:Ge,borderRadius:kt,bodyBg:ln,headerBg:sn,siderBg:Bt}=be;return{[Ie]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:ln,"&, *":{boxSizing:"border-box"},[`&${Ie}-has-sider`]:{flexDirection:"row",[`> ${Ie}, > ${Ie}-content`]:{width:0}},[`${Ie}-header, &${Ie}-footer`]:{flex:"0 0 auto"},[`${Ie}-sider`]:{position:"relative",minWidth:0,background:Bt,transition:`all ${Yt}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${Me}-menu${Me}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:Nt},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:Nt,color:et,lineHeight:`${Nt}px`,textAlign:"center",background:gt,cursor:"pointer",transition:`all ${Yt}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:je,insetInlineEnd:-Zt,zIndex:1,width:Zt,height:At,color:et,fontSize:be.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:Bt,borderStartStartRadius:0,borderStartEndRadius:kt,borderEndEndRadius:kt,borderEndStartRadius:0,cursor:"pointer",transition:`background ${ut} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${ut}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-Zt,borderStartStartRadius:kt,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:kt}}}}},ct(be)),{"&-rtl":{direction:"rtl"}}),[`${Ie}-header`]:{height:je,padding:Tt,color:Qe,lineHeight:`${je}px`,background:sn,[`${Me}-menu`]:{lineHeight:"inherit"}},[`${Ie}-footer`]:{padding:bt,color:ze,fontSize:Ge,background:$e},[`${Ie}-content`]:{flex:"auto",minHeight:0}}};var Et=(0,Be.Z)("Layout",be=>[He(be)],be=>{const{colorBgLayout:Me,controlHeight:Ie,controlHeightLG:ze,colorText:et,controlHeightSM:$e,marginXXS:gt,colorTextLightSolid:je,colorBgContainer:Tt}=be,Qe=ze*1.25;return{colorBgHeader:"#001529",colorBgBody:Me,colorBgTrigger:"#002140",bodyBg:Me,headerBg:"#001529",headerHeight:Ie*2,headerPadding:`0 ${Qe}px`,headerColor:et,footerPadding:`${$e}px ${Qe}px`,footerBg:Me,siderBg:"#001529",triggerHeight:ze+gt*2,triggerBg:"#002140",triggerColor:je,zeroTriggerWidth:ze,zeroTriggerHeight:ze,lightSiderBg:Tt,lightTriggerBg:Tt,lightTriggerColor:et}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),ht=function(be,Me){var Ie={};for(var ze in be)Object.prototype.hasOwnProperty.call(be,ze)&&Me.indexOf(ze)<0&&(Ie[ze]=be[ze]);if(be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var et=0,ze=Object.getOwnPropertySymbols(be);et<ze.length;et++)Me.indexOf(ze[et])<0&&Object.prototype.propertyIsEnumerable.call(be,ze[et])&&(Ie[ze[et]]=be[ze[et]]);return Ie};const dt=Ze.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function Ae(be){let{suffixCls:Me,tagName:Ie,displayName:ze}=be;return et=>Ze.forwardRef((gt,je)=>Ze.createElement(et,Object.assign({ref:je,suffixCls:Me,tagName:Ie},gt)))}const te=Ze.forwardRef((be,Me)=>{const{prefixCls:Ie,suffixCls:ze,className:et,tagName:$e}=be,gt=ht(be,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:je}=Ze.useContext(Ke.E_),Tt=je("layout",Ie),[Qe,bt]=Et(Tt),Nt=ze?`${Tt}-${ze}`:Tt;return Qe(Ze.createElement($e,Object.assign({className:_e()(Ie||Nt,et,bt),ref:Me},gt)))}),ee=Ze.forwardRef((be,Me)=>{const{direction:Ie}=Ze.useContext(Ke.E_),[ze,et]=Ze.useState([]),{prefixCls:$e,className:gt,rootClassName:je,children:Tt,hasSider:Qe,tagName:bt,style:Nt}=be,At=ht(be,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),Zt=(0,Ct.Z)(At,["suffixCls"]),{getPrefixCls:Yt,layout:ut}=Ze.useContext(Ke.E_),Ge=Yt("layout",$e),[kt,ln]=Et(Ge),sn=_e()(Ge,{[`${Ge}-has-sider`]:typeof Qe=="boolean"?Qe:ze.length>0,[`${Ge}-rtl`]:Ie==="rtl"},ut==null?void 0:ut.className,gt,je,ln),Bt=Ze.useMemo(()=>({siderHook:{addSider:Gt=>{et(en=>[].concat((0,ce.Z)(en),[Gt]))},removeSider:Gt=>{et(en=>en.filter(Bn=>Bn!==Gt))}}}),[]);return kt(Ze.createElement(dt.Provider,{value:Bt},Ze.createElement(bt,Object.assign({ref:Me,className:sn,style:Object.assign(Object.assign({},ut==null?void 0:ut.style),Nt)},Zt),Tt)))}),he=Ae({tagName:"div",displayName:"Layout"})(ee),se=Ae({suffixCls:"header",tagName:"header",displayName:"Header"})(te),de=Ae({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(te),me=Ae({suffixCls:"content",tagName:"main",displayName:"Content"})(te);var we=he},40875:function(Pn,an,ve){"use strict";ve.d(an,{J:function(){return Ke}});var ce=ve(59301),De=ve(33234),_e=ve(70425),Ct=function(Be,mt){var ct={};for(var He in Be)Object.prototype.hasOwnProperty.call(Be,He)&&mt.indexOf(He)<0&&(ct[He]=Be[He]);if(Be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Et=0,He=Object.getOwnPropertySymbols(Be);Et<He.length;Et++)mt.indexOf(He[Et])<0&&Object.prototype.propertyIsEnumerable.call(Be,He[Et])&&(ct[He[Et]]=Be[He[Et]]);return ct};const Ze=ce.createContext(null),Ke=ce.forwardRef((Be,mt)=>{const{children:ct}=Be,He=Ct(Be,["children"]),Et=ce.useContext(Ze),ht=ce.useMemo(()=>Object.assign(Object.assign({},Et),He),[Et,He.prefixCls,He.mode,He.selectable]);return ce.createElement(Ze.Provider,{value:ht},ce.createElement(De.BR,null,(0,_e.supportNodeRef)(ct)?ce.cloneElement(ct,{ref:mt}):ct))});an.Z=Ze},20834:function(Pn,an,ve){"use strict";ve.d(an,{default:function(){return Ce}});var ce=ve(15285),De=ve(59301),_e=ve(45818),Ct=ve(92310),Ze=ve.n(Ct),Ke=ve(36355),Be=function(Pe,Ne){var ke={};for(var Se in Pe)Object.prototype.hasOwnProperty.call(Pe,Se)&&Ne.indexOf(Se)<0&&(ke[Se]=Pe[Se]);if(Pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,Se=Object.getOwnPropertySymbols(Pe);nt<Se.length;nt++)Ne.indexOf(Se[nt])<0&&Object.prototype.propertyIsEnumerable.call(Pe,Se[nt])&&(ke[Se[nt]]=Pe[Se[nt]]);return ke},ct=Pe=>{const{prefixCls:Ne,className:ke,dashed:Se}=Pe,nt=Be(Pe,["prefixCls","className","dashed"]),{getPrefixCls:Pt}=De.useContext(Ke.E_),qe=Pt("menu",Ne),Ue=Ze()({[`${qe}-item-divider-dashed`]:!!Se},ke);return De.createElement(ce.iz,Object.assign({className:Ue},nt))},He=ve(11592),Et=ve(2738),ht=ve(6848),dt=ve(92343),te=(0,De.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),he=Pe=>{var Ne;const{className:ke,children:Se,icon:nt,title:Pt,danger:qe}=Pe,{prefixCls:Ue,firstLevel:St,direction:vt,disableMenuItemTitleTooltip:lt,inlineCollapsed:Dt}=De.useContext(te),un=Yn=>{const ai=De.createElement("span",{className:`${Ue}-title-content`},Se);return(!nt||(0,dt.l$)(Se)&&Se.type==="span")&&Se&&Yn&&St&&typeof Se=="string"?De.createElement("div",{className:`${Ue}-inline-collapsed-noicon`},Se.charAt(0)):ai},{siderCollapsed:Xt}=De.useContext(_e.D);let $t=Pt;typeof Pt=="undefined"?$t=St?Se:"":Pt===!1&&($t="");const wn={title:$t};!Xt&&!Dt&&(wn.title=null,wn.open=!1);const bn=(0,He.Z)(Se).length;let pn=De.createElement(ce.ck,Object.assign({},(0,Et.Z)(Pe,["title","icon","danger"]),{className:Ze()({[`${Ue}-item-danger`]:qe,[`${Ue}-item-only-child`]:(nt?bn+1:bn)===1},ke),title:typeof Pt=="string"?Pt:void 0}),(0,dt.Tm)(nt,{className:Ze()((0,dt.l$)(nt)?(Ne=nt.props)===null||Ne===void 0?void 0:Ne.className:"",`${Ue}-item-icon`)}),un(Dt));return lt||(pn=De.createElement(ht.Z,Object.assign({},wn,{placement:vt==="rtl"?"left":"right",overlayClassName:`${Ue}-inline-collapsed-tooltip`}),pn)),pn},de=Pe=>{var Ne;const{popupClassName:ke,icon:Se,title:nt,theme:Pt}=Pe,qe=De.useContext(te),{prefixCls:Ue,inlineCollapsed:St,theme:vt}=qe,lt=(0,ce.Xl)();let Dt;if(!Se)Dt=St&&!lt.length&&nt&&typeof nt=="string"?De.createElement("div",{className:`${Ue}-inline-collapsed-noicon`},nt.charAt(0)):De.createElement("span",{className:`${Ue}-title-content`},nt);else{const Xt=(0,dt.l$)(nt)&&nt.type==="span";Dt=De.createElement(De.Fragment,null,(0,dt.Tm)(Se,{className:Ze()((0,dt.l$)(Se)?(Ne=Se.props)===null||Ne===void 0?void 0:Ne.className:"",`${Ue}-item-icon`)}),Xt?nt:De.createElement("span",{className:`${Ue}-title-content`},nt))}const un=De.useMemo(()=>Object.assign(Object.assign({},qe),{firstLevel:!1}),[qe]);return De.createElement(te.Provider,{value:un},De.createElement(ce.Wd,Object.assign({},(0,Et.Z)(Pe,["icon"]),{title:Dt,popupClassName:Ze()(Ue,ke,`${Ue}-${Pt||vt}`)})))},me=ve(18785),we=ve(70425),be=ve(62892),Me=ve(40875),Ie=function(Pe,Ne){var ke={};for(var Se in Pe)Object.prototype.hasOwnProperty.call(Pe,Se)&&Ne.indexOf(Se)<0&&(ke[Se]=Pe[Se]);if(Pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,Se=Object.getOwnPropertySymbols(Pe);nt<Se.length;nt++)Ne.indexOf(Se[nt])<0&&Object.prototype.propertyIsEnumerable.call(Pe,Se[nt])&&(ke[Se[nt]]=Pe[Se[nt]]);return ke};function ze(Pe){return(Pe||[]).map((Ne,ke)=>{if(Ne&&typeof Ne=="object"){const Se=Ne,{label:nt,children:Pt,key:qe,type:Ue}=Se,St=Ie(Se,["label","children","key","type"]),vt=qe!=null?qe:`tmp-${ke}`;return Pt||Ue==="group"?Ue==="group"?De.createElement(ce.BW,Object.assign({key:vt},St,{title:nt}),ze(Pt)):De.createElement(de,Object.assign({key:vt},St,{title:nt}),ze(Pt)):Ue==="divider"?De.createElement(ct,Object.assign({key:vt},St)):De.createElement(he,Object.assign({key:vt},St),nt)}return null}).filter(Ne=>Ne)}function et(Pe){return De.useMemo(()=>Pe&&ze(Pe),[Pe])}var $e=ve(64993),gt=ve(17313),je=ve(8378),Tt=ve(13826),Qe=ve(29878),bt=ve(83116),Nt=ve(37613),Zt=Pe=>{const{componentCls:Ne,motionDurationSlow:ke,horizontalLineHeight:Se,colorSplit:nt,lineWidth:Pt,lineType:qe,itemPaddingInline:Ue}=Pe;return{[`${Ne}-horizontal`]:{lineHeight:Se,border:0,borderBottom:`${Pt}px ${qe} ${nt}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${Ne}-item, ${Ne}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:Ue},[`> ${Ne}-item:hover,
|
|
|
> ${Ne}-item-active,
|
|
|
> ${Ne}-submenu ${Ne}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${Ne}-item, ${Ne}-submenu-title`]:{transition:[`border-color ${ke}`,`background ${ke}`].join(",")},[`${Ne}-submenu-arrow`]:{display:"none"}}}},ut=Pe=>{let{componentCls:Ne,menuArrowOffset:ke}=Pe;return{[`${Ne}-rtl`]:{direction:"rtl"},[`${Ne}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${Ne}-rtl${Ne}-vertical,
|
|
|
${Ne}-submenu-rtl ${Ne}-vertical`]:{[`${Ne}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${ke})`},"&::after":{transform:`rotate(45deg) translateY(${ke})`}}}}};const Ge=Pe=>Object.assign({},(0,gt.oN)(Pe));var ln=(Pe,Ne)=>{const{componentCls:ke,itemColor:Se,itemSelectedColor:nt,groupTitleColor:Pt,itemBg:qe,subMenuItemBg:Ue,itemSelectedBg:St,activeBarHeight:vt,activeBarWidth:lt,activeBarBorderWidth:Dt,motionDurationSlow:un,motionEaseInOut:Xt,motionEaseOut:$t,itemPaddingInline:wn,motionDurationMid:bn,itemHoverColor:pn,lineType:Yn,colorSplit:ai,itemDisabledColor:Wn,dangerItemColor:Rn,dangerItemHoverColor:ii,dangerItemSelectedColor:pi,dangerItemActiveBg:gi,dangerItemSelectedBg:Ri,itemHoverBg:Ji,itemActiveBg:Un,menuSubMenuBg:$n,horizontalItemSelectedColor:ti,horizontalItemSelectedBg:Pi,horizontalItemBorderRadius:mi,horizontalItemHoverBg:nr,popupBg:ji}=Pe;return{[`${ke}-${Ne}, ${ke}-${Ne} > ${ke}`]:{color:Se,background:qe,[`&${ke}-root:focus-visible`]:Object.assign({},Ge(Pe)),[`${ke}-item-group-title`]:{color:Pt},[`${ke}-submenu-selected`]:{[`> ${ke}-submenu-title`]:{color:nt}},[`${ke}-item-disabled, ${ke}-submenu-disabled`]:{color:`${Wn} !important`},[`${ke}-item:not(${ke}-item-selected):not(${ke}-submenu-selected)`]:{[`&:hover, > ${ke}-submenu-title:hover`]:{color:pn}},[`&:not(${ke}-horizontal)`]:{[`${ke}-item:not(${ke}-item-selected)`]:{"&:hover":{backgroundColor:Ji},"&:active":{backgroundColor:Un}},[`${ke}-submenu-title`]:{"&:hover":{backgroundColor:Ji},"&:active":{backgroundColor:Un}}},[`${ke}-item-danger`]:{color:Rn,[`&${ke}-item:hover`]:{[`&:not(${ke}-item-selected):not(${ke}-submenu-selected)`]:{color:ii}},[`&${ke}-item:active`]:{background:gi}},[`${ke}-item a`]:{"&, &:hover":{color:"inherit"}},[`${ke}-item-selected`]:{color:nt,[`&${ke}-item-danger`]:{color:pi},"a, a:hover":{color:"inherit"}},[`& ${ke}-item-selected`]:{backgroundColor:St,[`&${ke}-item-danger`]:{backgroundColor:Ri}},[`${ke}-item, ${ke}-submenu-title`]:{[`&:not(${ke}-item-disabled):focus-visible`]:Object.assign({},Ge(Pe))},[`&${ke}-submenu > ${ke}`]:{backgroundColor:$n},[`&${ke}-popup > ${ke}`]:{backgroundColor:ji},[`&${ke}-horizontal`]:Object.assign(Object.assign({},Ne==="dark"?{borderBottom:0}:{}),{[`> ${ke}-item, > ${ke}-submenu`]:{top:Dt,marginTop:-Dt,marginBottom:0,borderRadius:mi,"&::after":{position:"absolute",insetInline:wn,bottom:0,borderBottom:`${vt}px solid transparent`,transition:`border-color ${un} ${Xt}`,content:'""'},"&:hover, &-active, &-open":{background:nr,"&::after":{borderBottomWidth:vt,borderBottomColor:ti}},"&-selected":{color:ti,backgroundColor:Pi,"&:hover":{backgroundColor:Pi},"&::after":{borderBottomWidth:vt,borderBottomColor:ti}}}}),[`&${ke}-root`]:{[`&${ke}-inline, &${ke}-vertical`]:{borderInlineEnd:`${Dt}px ${Yn} ${ai}`}},[`&${ke}-inline`]:{[`${ke}-sub${ke}-inline`]:{background:Ue},[`${ke}-item, ${ke}-submenu-title`]:Dt&<?{width:`calc(100% + ${Dt}px)`}:{},[`${ke}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${lt}px solid ${nt}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${bn} ${$t}`,`opacity ${bn} ${$t}`].join(","),content:'""'},[`&${ke}-item-danger`]:{"&::after":{borderInlineEndColor:pi}}},[`${ke}-selected, ${ke}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${bn} ${Xt}`,`opacity ${bn} ${Xt}`].join(",")}}}}}};const sn=Pe=>{const{componentCls:Ne,itemHeight:ke,itemMarginInline:Se,padding:nt,menuArrowSize:Pt,marginXS:qe,itemMarginBlock:Ue}=Pe,St=nt+Pt+qe;return{[`${Ne}-item`]:{position:"relative",overflow:"hidden"},[`${Ne}-item, ${Ne}-submenu-title`]:{height:ke,lineHeight:`${ke}px`,paddingInline:nt,overflow:"hidden",textOverflow:"ellipsis",marginInline:Se,marginBlock:Ue,width:`calc(100% - ${Se*2}px)`},[`> ${Ne}-item,
|
|
|
> ${Ne}-submenu > ${Ne}-submenu-title`]:{height:ke,lineHeight:`${ke}px`},[`${Ne}-item-group-list ${Ne}-submenu-title,
|
|
|
${Ne}-submenu-title`]:{paddingInlineEnd:St}}};var Gt=Pe=>{const{componentCls:Ne,iconCls:ke,itemHeight:Se,colorTextLightSolid:nt,dropdownWidth:Pt,controlHeightLG:qe,motionDurationMid:Ue,motionEaseOut:St,paddingXL:vt,itemMarginInline:lt,fontSizeLG:Dt,motionDurationSlow:un,paddingXS:Xt,boxShadowSecondary:$t,collapsedWidth:wn,collapsedIconSize:bn}=Pe,pn={height:Se,lineHeight:`${Se}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[Ne]:{"&-inline, &-vertical":Object.assign({[`&${Ne}-root`]:{boxShadow:"none"}},sn(Pe))},[`${Ne}-submenu-popup`]:{[`${Ne}-vertical`]:Object.assign(Object.assign({},sn(Pe)),{boxShadow:$t})}},{[`${Ne}-submenu-popup ${Ne}-vertical${Ne}-sub`]:{minWidth:Pt,maxHeight:`calc(100vh - ${qe*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${Ne}-inline`]:{width:"100%",[`&${Ne}-root`]:{[`${Ne}-item, ${Ne}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${un}`,`background ${un}`,`padding ${Ue} ${St}`].join(","),[`> ${Ne}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${Ne}-sub${Ne}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${Ne}-submenu > ${Ne}-submenu-title`]:pn,[`& ${Ne}-item-group-title`]:{paddingInlineStart:vt}},[`${Ne}-item`]:pn}},{[`${Ne}-inline-collapsed`]:{width:wn,[`&${Ne}-root`]:{[`${Ne}-item, ${Ne}-submenu ${Ne}-submenu-title`]:{[`> ${Ne}-inline-collapsed-noicon`]:{fontSize:Dt,textAlign:"center"}}},[`> ${Ne}-item,
|
|
|
> ${Ne}-item-group > ${Ne}-item-group-list > ${Ne}-item,
|
|
|
> ${Ne}-item-group > ${Ne}-item-group-list > ${Ne}-submenu > ${Ne}-submenu-title,
|
|
|
> ${Ne}-submenu > ${Ne}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${Dt/2}px - ${lt}px)`,textOverflow:"clip",[`
|
|
|
${Ne}-submenu-arrow,
|
|
|
${Ne}-submenu-expand-icon
|
|
|
`]:{opacity:0},[`${Ne}-item-icon, ${ke}`]:{margin:0,fontSize:bn,lineHeight:`${Se}px`,"+ span":{display:"inline-block",opacity:0}}},[`${Ne}-item-icon, ${ke}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${Ne}-item-icon, ${ke}`]:{display:"none"},"a, a:hover":{color:nt}},[`${Ne}-item-group-title`]:Object.assign(Object.assign({},gt.vS),{paddingInline:Xt})}}]};const en=Pe=>{const{componentCls:Ne,motionDurationSlow:ke,motionDurationMid:Se,motionEaseInOut:nt,motionEaseOut:Pt,iconCls:qe,iconSize:Ue,iconMarginInlineEnd:St}=Pe;return{[`${Ne}-item, ${Ne}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${ke}`,`background ${ke}`,`padding ${ke} ${nt}`].join(","),[`${Ne}-item-icon, ${qe}`]:{minWidth:Ue,fontSize:Ue,transition:[`font-size ${Se} ${Pt}`,`margin ${ke} ${nt}`,`color ${ke}`].join(","),"+ span":{marginInlineStart:St,opacity:1,transition:[`opacity ${ke} ${nt}`,`margin ${ke}`,`color ${ke}`].join(",")}},[`${Ne}-item-icon`]:Object.assign({},(0,gt.Ro)()),[`&${Ne}-item-only-child`]:{[`> ${qe}, > ${Ne}-item-icon`]:{marginInlineEnd:0}}},[`${Ne}-item-disabled, ${Ne}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${Ne}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},Bn=Pe=>{const{componentCls:Ne,motionDurationSlow:ke,motionEaseInOut:Se,borderRadius:nt,menuArrowSize:Pt,menuArrowOffset:qe}=Pe;return{[`${Ne}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:Pe.margin,width:Pt,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${ke} ${Se}, opacity ${ke}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:Pt*.6,height:Pt*.15,backgroundColor:"currentcolor",borderRadius:nt,transition:[`background ${ke} ${Se}`,`transform ${ke} ${Se}`,`top ${ke} ${Se}`,`color ${ke} ${Se}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${qe})`},"&::after":{transform:`rotate(-45deg) translateY(${qe})`}}}}},rn=Pe=>{const{antCls:Ne,componentCls:ke,fontSize:Se,motionDurationSlow:nt,motionDurationMid:Pt,motionEaseInOut:qe,paddingXS:Ue,padding:St,colorSplit:vt,lineWidth:lt,zIndexPopup:Dt,borderRadiusLG:un,subMenuItemBorderRadius:Xt,menuArrowSize:$t,menuArrowOffset:wn,lineType:bn,menuPanelMaskInset:pn,groupTitleLineHeight:Yn,groupTitleFontSize:ai}=Pe;return[{"":{[`${ke}`]:Object.assign(Object.assign({},(0,gt.dF)()),{"&-hidden":{display:"none"}})},[`${ke}-submenu-hidden`]:{display:"none"}},{[ke]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,gt.Wf)(Pe)),(0,gt.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:Se,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${nt} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${ke}-item`]:{flex:"none"}},[`${ke}-item, ${ke}-submenu, ${ke}-submenu-title`]:{borderRadius:Pe.itemBorderRadius},[`${ke}-item-group-title`]:{padding:`${Ue}px ${St}px`,fontSize:ai,lineHeight:Yn,transition:`all ${nt}`},[`&-horizontal ${ke}-submenu`]:{transition:[`border-color ${nt} ${qe}`,`background ${nt} ${qe}`].join(",")},[`${ke}-submenu, ${ke}-submenu-inline`]:{transition:[`border-color ${nt} ${qe}`,`background ${nt} ${qe}`,`padding ${Pt} ${qe}`].join(",")},[`${ke}-submenu ${ke}-sub`]:{cursor:"initial",transition:[`background ${nt} ${qe}`,`padding ${nt} ${qe}`].join(",")},[`${ke}-title-content`]:{transition:`color ${nt}`},[`${ke}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${ke}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:vt,borderStyle:bn,borderWidth:0,borderTopWidth:lt,marginBlock:lt,padding:0,"&-dashed":{borderStyle:"dashed"}}}),en(Pe)),{[`${ke}-item-group`]:{[`${ke}-item-group-list`]:{margin:0,padding:0,[`${ke}-item, ${ke}-submenu-title`]:{paddingInline:`${Se*2}px ${St}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:Dt,borderRadius:un,boxShadow:"none",transformOrigin:"0 0",[`&${ke}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${pn}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:pn},"\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},[`> ${ke}`]:Object.assign(Object.assign(Object.assign({borderRadius:un},en(Pe)),Bn(Pe)),{[`${ke}-item, ${ke}-submenu > ${ke}-submenu-title`]:{borderRadius:Xt},[`${ke}-submenu-title::after`]:{transition:`transform ${nt} ${qe}`}})}}),Bn(Pe)),{[`&-inline-collapsed ${ke}-submenu-arrow,
|
|
|
&-inline ${ke}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${wn})`},"&::after":{transform:`rotate(45deg) translateX(-${wn})`}},[`${ke}-submenu-open${ke}-submenu-inline > ${ke}-submenu-title > ${ke}-submenu-arrow`]:{transform:`translateY(-${$t*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${wn})`},"&::before":{transform:`rotate(45deg) translateX(${wn})`}}})},{[`${Ne}-layout-header`]:{[ke]:{lineHeight:"inherit"}}}]};var Cn=(Pe,Ne)=>(0,bt.Z)("Menu",Se=>{if(Ne===!1)return[];const{colorBgElevated:nt,colorPrimary:Pt,colorTextLightSolid:qe,controlHeightLG:Ue,fontSize:St,darkItemColor:vt,darkDangerItemColor:lt,darkItemBg:Dt,darkSubMenuItemBg:un,darkItemSelectedColor:Xt,darkItemSelectedBg:$t,darkDangerItemSelectedBg:wn,darkItemHoverBg:bn,darkGroupTitleColor:pn,darkItemHoverColor:Yn,darkItemDisabledColor:ai,darkDangerItemHoverColor:Wn,darkDangerItemSelectedColor:Rn,darkDangerItemActiveBg:ii}=Se,pi=St/7*5,gi=(0,Nt.TS)(Se,{menuArrowSize:pi,menuHorizontalHeight:Ue*1.15,menuArrowOffset:`${pi*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:nt}),Ri=(0,Nt.TS)(gi,{itemColor:vt,itemHoverColor:Yn,groupTitleColor:pn,itemSelectedColor:Xt,itemBg:Dt,popupBg:Dt,subMenuItemBg:un,itemActiveBg:"transparent",itemSelectedBg:$t,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:bn,itemDisabledColor:ai,dangerItemColor:lt,dangerItemHoverColor:Wn,dangerItemSelectedColor:Rn,dangerItemActiveBg:ii,dangerItemSelectedBg:wn,menuSubMenuBg:un,horizontalItemSelectedColor:qe,horizontalItemSelectedBg:Pt});return[rn(gi),Zt(gi),Gt(gi),ln(gi,"light"),ln(Ri,"dark"),ut(gi),(0,je.Z)(gi),(0,Tt.oN)(gi,"slide-up"),(0,Tt.oN)(gi,"slide-down"),(0,Qe._y)(gi,"zoom-big")]},Se=>{const{colorPrimary:nt,colorError:Pt,colorTextDisabled:qe,colorErrorBg:Ue,colorText:St,colorTextDescription:vt,colorBgContainer:lt,colorFillAlter:Dt,colorFillContent:un,lineWidth:Xt,lineWidthBold:$t,controlItemBgActive:wn,colorBgTextHover:bn,controlHeightLG:pn,lineHeight:Yn,colorBgElevated:ai,marginXXS:Wn,padding:Rn,fontSize:ii,controlHeightSM:pi,fontSizeLG:gi,colorTextLightSolid:Ri,colorErrorHover:Ji}=Se,Un=new $e.C(Ri).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:Se.zIndexPopupBase+50,radiusItem:Se.borderRadiusLG,itemBorderRadius:Se.borderRadiusLG,radiusSubMenuItem:Se.borderRadiusSM,subMenuItemBorderRadius:Se.borderRadiusSM,colorItemText:St,itemColor:St,colorItemTextHover:St,itemHoverColor:St,colorItemTextHoverHorizontal:nt,horizontalItemHoverColor:nt,colorGroupTitle:vt,groupTitleColor:vt,colorItemTextSelected:nt,itemSelectedColor:nt,colorItemTextSelectedHorizontal:nt,horizontalItemSelectedColor:nt,colorItemBg:lt,itemBg:lt,colorItemBgHover:bn,itemHoverBg:bn,colorItemBgActive:un,itemActiveBg:wn,colorSubItemBg:Dt,subMenuItemBg:Dt,colorItemBgSelected:wn,itemSelectedBg:wn,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:$t,activeBarHeight:$t,colorActiveBarBorderSize:Xt,activeBarBorderWidth:Xt,colorItemTextDisabled:qe,itemDisabledColor:qe,colorDangerItemText:Pt,dangerItemColor:Pt,colorDangerItemTextHover:Pt,dangerItemHoverColor:Pt,colorDangerItemTextSelected:Pt,dangerItemSelectedColor:Pt,colorDangerItemBgActive:Ue,dangerItemActiveBg:Ue,colorDangerItemBgSelected:Ue,dangerItemSelectedBg:Ue,itemMarginInline:Se.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:pn,groupTitleLineHeight:Yn,collapsedWidth:pn*2,popupBg:ai,itemMarginBlock:Wn,itemPaddingInline:Rn,horizontalLineHeight:`${pn*1.15}px`,iconSize:ii,iconMarginInlineEnd:pi-ii,collapsedIconSize:gi,groupTitleFontSize:ii,darkItemDisabledColor:new $e.C(Ri).setAlpha(.25).toRgbString(),darkItemColor:Un,darkDangerItemColor:Pt,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:Ri,darkItemSelectedBg:nt,darkDangerItemSelectedBg:Pt,darkItemHoverBg:"transparent",darkGroupTitleColor:Un,darkItemHoverColor:Ri,darkDangerItemHoverColor:Ji,darkDangerItemSelectedColor:Ri,darkDangerItemActiveBg:Pt}},{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),ft=function(Pe,Ne){var ke={};for(var Se in Pe)Object.prototype.hasOwnProperty.call(Pe,Se)&&Ne.indexOf(Se)<0&&(ke[Se]=Pe[Se]);if(Pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,Se=Object.getOwnPropertySymbols(Pe);nt<Se.length;nt++)Ne.indexOf(Se[nt])<0&&Object.prototype.propertyIsEnumerable.call(Pe,Se[nt])&&(ke[Se[nt]]=Pe[Se[nt]]);return ke},Vn=(0,De.forwardRef)((Pe,Ne)=>{var ke,Se;const nt=De.useContext(Me.Z),Pt=nt||{},{getPrefixCls:qe,getPopupContainer:Ue,direction:St,menu:vt}=De.useContext(Ke.E_),lt=qe(),{prefixCls:Dt,className:un,style:Xt,theme:$t="light",expandIcon:wn,_internalDisableMenuItemTitleTooltip:bn,inlineCollapsed:pn,siderCollapsed:Yn,items:ai,children:Wn,rootClassName:Rn,mode:ii,selectable:pi,onClick:gi,overflowedIndicatorPopupClassName:Ri}=Pe,Ji=ft(Pe,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),Un=(0,Et.Z)(Ji,["collapsedWidth"]),$n=et(ai)||Wn;(ke=Pt.validator)===null||ke===void 0||ke.call(Pt,{mode:ii});const ti=(0,we.useEvent)(function(){var Fi;gi==null||gi.apply(void 0,arguments),(Fi=Pt.onClick)===null||Fi===void 0||Fi.call(Pt)}),Pi=Pt.mode||ii,mi=pi!=null?pi:Pt.selectable,nr=De.useMemo(()=>Yn!==void 0?Yn:pn,[pn,Yn]),ji={horizontal:{motionName:`${lt}-slide-up`},inline:(0,be.Z)(lt),other:{motionName:`${lt}-zoom-big`}},Le=qe("menu",Dt||Pt.prefixCls),[si,Hi]=Cn(Le,!nt),hn=Ze()(`${Le}-${$t}`,vt==null?void 0:vt.className,un);let ni;if(typeof wn=="function")ni=wn;else if(wn===null||wn===!1)ni=null;else if(Pt.expandIcon===null||Pt.expandIcon===!1)ni=null;else{const Fi=wn!=null?wn:Pt.expandIcon;ni=(0,dt.Tm)(Fi,{className:Ze()(`${Le}-submenu-expand-icon`,(0,dt.l$)(Fi)?(Se=Fi.props)===null||Se===void 0?void 0:Se.className:"")})}const vi=De.useMemo(()=>({prefixCls:Le,inlineCollapsed:nr||!1,direction:St,firstLevel:!0,theme:$t,mode:Pi,disableMenuItemTitleTooltip:bn}),[Le,nr,St,bn,$t]);return si(De.createElement(Me.Z.Provider,{value:null},De.createElement(te.Provider,{value:vi},De.createElement(ce.ZP,Object.assign({getPopupContainer:Ue,overflowedIndicator:De.createElement(me.Z,null),overflowedIndicatorPopupClassName:Ze()(Le,`${Le}-${$t}`,Ri),mode:Pi,selectable:mi,onClick:ti},Un,{inlineCollapsed:nr,style:Object.assign(Object.assign({},vt==null?void 0:vt.style),Xt),className:hn,prefixCls:Le,direction:St,defaultMotions:ji,expandIcon:ni,ref:Ne,rootClassName:Ze()(Rn,Hi)}),$n))))});const Re=(0,De.forwardRef)((Pe,Ne)=>{const ke=(0,De.useRef)(null),Se=De.useContext(_e.D);return(0,De.useImperativeHandle)(Ne,()=>({menu:ke.current,focus:nt=>{var Pt;(Pt=ke.current)===null||Pt===void 0||Pt.focus(nt)}})),De.createElement(Vn,Object.assign({ref:ke},Pe,Se))});Re.Item=he,Re.SubMenu=de,Re.Divider=ct,Re.ItemGroup=ce.BW;var Ce=Re},58421:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return Pt}});var ce=ve(96663),De=ve(59301),_e={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"},Ct=_e,Ze=ve(7657),Ke=function(Ue,St){return De.createElement(Ze.Z,(0,ce.Z)({},Ue,{ref:St,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be,ct=ve(49198),He=ve(33853),Et=ve(38819),ht=ve(92310),dt=ve.n(ht),Ae=ve(90493),te=ve(44127),ee=ve(52884),he=ve(95727),se=ve(65711),de=ve(85745),me=ve(26112),we={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},be=we,Me=ve(91735),Ie=function(qe){(0,se.Z)(St,qe);var Ue=(0,de.Z)(St);function St(){var vt;(0,ee.Z)(this,St);for(var lt=arguments.length,Dt=new Array(lt),un=0;un<lt;un++)Dt[un]=arguments[un];return vt=Ue.call.apply(Ue,[this].concat(Dt)),vt.state={goInputText:""},vt.getValidValue=function(){var Xt=vt.state.goInputText;return!Xt||Number.isNaN(Xt)?void 0:Number(Xt)},vt.buildOptionText=function(Xt){return"".concat(Xt," ").concat(vt.props.locale.items_per_page)},vt.changeSize=function(Xt){vt.props.changeSize(Number(Xt))},vt.handleChange=function(Xt){vt.setState({goInputText:Xt.target.value})},vt.handleBlur=function(Xt){var $t=vt.props,wn=$t.goButton,bn=$t.quickGo,pn=$t.rootPrefixCls,Yn=vt.state.goInputText;wn||Yn===""||(vt.setState({goInputText:""}),!(Xt.relatedTarget&&(Xt.relatedTarget.className.indexOf("".concat(pn,"-item-link"))>=0||Xt.relatedTarget.className.indexOf("".concat(pn,"-item"))>=0))&&bn(vt.getValidValue()))},vt.go=function(Xt){var $t=vt.state.goInputText;$t!==""&&(Xt.keyCode===be.ENTER||Xt.type==="click")&&(vt.setState({goInputText:""}),vt.props.quickGo(vt.getValidValue()))},vt}return(0,he.Z)(St,[{key:"getPageSizeOptions",value:function(){var lt=this.props,Dt=lt.pageSize,un=lt.pageSizeOptions;return un.some(function(Xt){return Xt.toString()===Dt.toString()})?un:un.concat([Dt.toString()]).sort(function(Xt,$t){var wn=Number.isNaN(Number(Xt))?0:Number(Xt),bn=Number.isNaN(Number($t))?0:Number($t);return wn-bn})}},{key:"render",value:function(){var lt=this,Dt=this.props,un=Dt.pageSize,Xt=Dt.locale,$t=Dt.rootPrefixCls,wn=Dt.changeSize,bn=Dt.quickGo,pn=Dt.goButton,Yn=Dt.selectComponentClass,ai=Dt.buildOptionText,Wn=Dt.selectPrefixCls,Rn=Dt.disabled,ii=this.state.goInputText,pi="".concat($t,"-options"),gi=Yn,Ri=null,Ji=null,Un=null;if(!wn&&!bn)return null;var $n=this.getPageSizeOptions();if(wn&&gi){var ti=$n.map(function(Pi,mi){return De.createElement(gi.Option,{key:mi,value:Pi.toString()},(ai||lt.buildOptionText)(Pi))});Ri=De.createElement(gi,{disabled:Rn,prefixCls:Wn,showSearch:!1,className:"".concat(pi,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(un||$n[0]).toString(),onChange:this.changeSize,getPopupContainer:function(mi){return mi.parentNode},"aria-label":Xt.page_size,defaultOpen:!1},ti)}return bn&&(pn&&(Un=typeof pn=="boolean"?De.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:Rn,className:"".concat(pi,"-quick-jumper-button")},Xt.jump_to_confirm):De.createElement("span",{onClick:this.go,onKeyUp:this.go},pn)),Ji=De.createElement("div",{className:"".concat(pi,"-quick-jumper")},Xt.jump_to,De.createElement("input",{disabled:Rn,type:"text",value:ii,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":Xt.page}),Xt.page,Un)),De.createElement("li",{className:"".concat(pi)},Ri,Ji)}}]),St}(De.Component);Ie.defaultProps={pageSizeOptions:["10","20","50","100"]};var ze=Ie,et=function(Ue){var St,vt=Ue.rootPrefixCls,lt=Ue.page,Dt=Ue.active,un=Ue.className,Xt=Ue.showTitle,$t=Ue.onClick,wn=Ue.onKeyPress,bn=Ue.itemRender,pn="".concat(vt,"-item"),Yn=dt()(pn,"".concat(pn,"-").concat(lt),(St={},(0,Ae.Z)(St,"".concat(pn,"-active"),Dt),(0,Ae.Z)(St,"".concat(pn,"-disabled"),!lt),(0,Ae.Z)(St,Ue.className,un),St)),ai=function(){$t(lt)},Wn=function(pi){wn(pi,$t,lt)},Rn=bn(lt,"page",De.createElement("a",{rel:"nofollow"},lt));return Rn?De.createElement("li",{title:Xt?lt.toString():null,className:Yn,onClick:ai,onKeyPress:Wn,tabIndex:0},Rn):null},$e=et;function gt(){}function je(qe){var Ue=Number(qe);return typeof Ue=="number"&&!Number.isNaN(Ue)&&isFinite(Ue)&&Math.floor(Ue)===Ue}var Tt=function(Ue,St,vt){return vt};function Qe(qe,Ue,St){var vt=typeof qe=="undefined"?Ue.pageSize:qe;return Math.floor((St.total-1)/vt)+1}var bt=function(qe){(0,se.Z)(St,qe);var Ue=(0,de.Z)(St);function St(vt){var lt;(0,ee.Z)(this,St),lt=Ue.call(this,vt),lt.paginationNode=De.createRef(),lt.getJumpPrevPage=function(){return Math.max(1,lt.state.current-(lt.props.showLessItems?3:5))},lt.getJumpNextPage=function(){return Math.min(Qe(void 0,lt.state,lt.props),lt.state.current+(lt.props.showLessItems?3:5))},lt.getItemIcon=function(wn,bn){var pn=lt.props.prefixCls,Yn=wn||De.createElement("button",{type:"button","aria-label":bn,className:"".concat(pn,"-item-link")});return typeof wn=="function"&&(Yn=De.createElement(wn,(0,te.Z)({},lt.props))),Yn},lt.isValid=function(wn){var bn=lt.props.total;return je(wn)&&wn!==lt.state.current&&je(bn)&&bn>0},lt.shouldDisplayQuickJumper=function(){var wn=lt.props,bn=wn.showQuickJumper,pn=wn.total,Yn=lt.state.pageSize;return pn<=Yn?!1:bn},lt.handleKeyDown=function(wn){(wn.keyCode===be.ARROW_UP||wn.keyCode===be.ARROW_DOWN)&&wn.preventDefault()},lt.handleKeyUp=function(wn){var bn=lt.getValidValue(wn),pn=lt.state.currentInputValue;bn!==pn&<.setState({currentInputValue:bn}),wn.keyCode===be.ENTER?lt.handleChange(bn):wn.keyCode===be.ARROW_UP?lt.handleChange(bn-1):wn.keyCode===be.ARROW_DOWN&<.handleChange(bn+1)},lt.handleBlur=function(wn){var bn=lt.getValidValue(wn);lt.handleChange(bn)},lt.changePageSize=function(wn){var bn=lt.state.current,pn=Qe(wn,lt.state,lt.props);bn=bn>pn?pn:bn,pn===0&&(bn=lt.state.current),typeof wn=="number"&&("pageSize"in lt.props||lt.setState({pageSize:wn}),"current"in lt.props||lt.setState({current:bn,currentInputValue:bn})),lt.props.onShowSizeChange(bn,wn),"onChange"in lt.props&<.props.onChange&<.props.onChange(bn,wn)},lt.handleChange=function(wn){var bn=lt.props,pn=bn.disabled,Yn=bn.onChange,ai=lt.state,Wn=ai.pageSize,Rn=ai.current,ii=ai.currentInputValue;if(lt.isValid(wn)&&!pn){var pi=Qe(void 0,lt.state,lt.props),gi=wn;return wn>pi?gi=pi:wn<1&&(gi=1),"current"in lt.props||lt.setState({current:gi}),gi!==ii&<.setState({currentInputValue:gi}),Yn(gi,Wn),gi}return Rn},lt.prev=function(){lt.hasPrev()&<.handleChange(lt.state.current-1)},lt.next=function(){lt.hasNext()&<.handleChange(lt.state.current+1)},lt.jumpPrev=function(){lt.handleChange(lt.getJumpPrevPage())},lt.jumpNext=function(){lt.handleChange(lt.getJumpNextPage())},lt.hasPrev=function(){return lt.state.current>1},lt.hasNext=function(){return lt.state.current<Qe(void 0,lt.state,lt.props)},lt.runIfEnter=function(wn,bn){if(wn.key==="Enter"||wn.charCode===13){for(var pn=arguments.length,Yn=new Array(pn>2?pn-2:0),ai=2;ai<pn;ai++)Yn[ai-2]=arguments[ai];bn.apply(void 0,Yn)}},lt.runIfEnterPrev=function(wn){lt.runIfEnter(wn,lt.prev)},lt.runIfEnterNext=function(wn){lt.runIfEnter(wn,lt.next)},lt.runIfEnterJumpPrev=function(wn){lt.runIfEnter(wn,lt.jumpPrev)},lt.runIfEnterJumpNext=function(wn){lt.runIfEnter(wn,lt.jumpNext)},lt.handleGoTO=function(wn){(wn.keyCode===be.ENTER||wn.type==="click")&<.handleChange(lt.state.currentInputValue)},lt.renderPrev=function(wn){var bn=lt.props,pn=bn.prevIcon,Yn=bn.itemRender,ai=Yn(wn,"prev",lt.getItemIcon(pn,"prev page")),Wn=!lt.hasPrev();return(0,De.isValidElement)(ai)?(0,De.cloneElement)(ai,{disabled:Wn}):ai},lt.renderNext=function(wn){var bn=lt.props,pn=bn.nextIcon,Yn=bn.itemRender,ai=Yn(wn,"next",lt.getItemIcon(pn,"next page")),Wn=!lt.hasNext();return(0,De.isValidElement)(ai)?(0,De.cloneElement)(ai,{disabled:Wn}):ai};var Dt=vt.onChange!==gt,un="current"in vt;un&&!Dt&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var Xt=vt.defaultCurrent;"current"in vt&&(Xt=vt.current);var $t=vt.defaultPageSize;return"pageSize"in vt&&($t=vt.pageSize),Xt=Math.min(Xt,Qe($t,void 0,vt)),lt.state={current:Xt,currentInputValue:Xt,pageSize:$t},lt}return(0,he.Z)(St,[{key:"componentDidUpdate",value:function(lt,Dt){var un=this.props.prefixCls;if(Dt.current!==this.state.current&&this.paginationNode.current){var Xt=this.paginationNode.current.querySelector(".".concat(un,"-item-").concat(Dt.current));if(Xt&&document.activeElement===Xt){var $t;Xt==null||($t=Xt.blur)===null||$t===void 0||$t.call(Xt)}}}},{key:"getValidValue",value:function(lt){var Dt=lt.target.value,un=Qe(void 0,this.state,this.props),Xt=this.state.currentInputValue,$t;return Dt===""?$t=Dt:Number.isNaN(Number(Dt))?$t=Xt:Dt>=un?$t=un:$t=Number(Dt),$t}},{key:"getShowSizeChanger",value:function(){var lt=this.props,Dt=lt.showSizeChanger,un=lt.total,Xt=lt.totalBoundaryShowSizeChanger;return typeof Dt!="undefined"?Dt:un>Xt}},{key:"render",value:function(){var lt=this.props,Dt=lt.prefixCls,un=lt.className,Xt=lt.style,$t=lt.disabled,wn=lt.hideOnSinglePage,bn=lt.total,pn=lt.locale,Yn=lt.showQuickJumper,ai=lt.showLessItems,Wn=lt.showTitle,Rn=lt.showTotal,ii=lt.simple,pi=lt.itemRender,gi=lt.showPrevNextJumpers,Ri=lt.jumpPrevIcon,Ji=lt.jumpNextIcon,Un=lt.selectComponentClass,$n=lt.selectPrefixCls,ti=lt.pageSizeOptions,Pi=this.state,mi=Pi.current,nr=Pi.pageSize,ji=Pi.currentInputValue;if(wn===!0&&bn<=nr)return null;var Le=Qe(void 0,this.state,this.props),si=[],Hi=null,hn=null,ni=null,vi=null,Fi=null,_n=Yn&&Yn.goButton,Dn=ai?1:2,Ft=mi-1>0?mi-1:0,Ot=mi+1<Le?mi+1:Le,Ve=(0,me.Z)(this.props,{aria:!0,data:!0}),Ut=Rn&&De.createElement("li",{className:"".concat(Dt,"-total-text")},Rn(bn,[bn===0?0:(mi-1)*nr+1,mi*nr>bn?bn:mi*nr]));if(ii){_n&&(typeof _n=="boolean"?Fi=De.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},pn.jump_to_confirm):Fi=De.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},_n),Fi=De.createElement("li",{title:Wn?"".concat(pn.jump_to).concat(mi,"/").concat(Le):null,className:"".concat(Dt,"-simple-pager")},Fi));var tn=this.renderPrev(Ft);return De.createElement("ul",(0,ce.Z)({className:dt()(Dt,"".concat(Dt,"-simple"),(0,Ae.Z)({},"".concat(Dt,"-disabled"),$t),un),style:Xt,ref:this.paginationNode},Ve),Ut,tn?De.createElement("li",{title:Wn?pn.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:dt()("".concat(Dt,"-prev"),(0,Ae.Z)({},"".concat(Dt,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},tn):null,De.createElement("li",{title:Wn?"".concat(mi,"/").concat(Le):null,className:"".concat(Dt,"-simple-pager")},De.createElement("input",{type:"text",value:ji,disabled:$t,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:3}),De.createElement("span",{className:"".concat(Dt,"-slash")},"/"),Le),De.createElement("li",{title:Wn?pn.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:dt()("".concat(Dt,"-next"),(0,Ae.Z)({},"".concat(Dt,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Ot)),Fi)}if(Le<=3+Dn*2){var xt={locale:pn,rootPrefixCls:Dt,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:Wn,itemRender:pi};Le||si.push(De.createElement($e,(0,ce.Z)({},xt,{key:"noPager",page:1,className:"".concat(Dt,"-item-disabled")})));for(var rt=1;rt<=Le;rt+=1){var Vt=mi===rt;si.push(De.createElement($e,(0,ce.Z)({},xt,{key:rt,page:rt,active:Vt})))}}else{var on=ai?pn.prev_3:pn.prev_5,xn=ai?pn.next_3:pn.next_5,An=pi(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Ri,"prev page")),yt=pi(this.getJumpNextPage(),"jump-next",this.getItemIcon(Ji,"next page"));gi&&(Hi=An?De.createElement("li",{title:Wn?on:null,key:"prev",onClick:this.jumpPrev,tabIndex:0,onKeyPress:this.runIfEnterJumpPrev,className:dt()("".concat(Dt,"-jump-prev"),(0,Ae.Z)({},"".concat(Dt,"-jump-prev-custom-icon"),!!Ri))},An):null,hn=yt?De.createElement("li",{title:Wn?xn:null,key:"next",tabIndex:0,onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:dt()("".concat(Dt,"-jump-next"),(0,Ae.Z)({},"".concat(Dt,"-jump-next-custom-icon"),!!Ji))},yt):null),vi=De.createElement($e,{locale:pn,last:!0,rootPrefixCls:Dt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Le,page:Le,active:!1,showTitle:Wn,itemRender:pi}),ni=De.createElement($e,{locale:pn,rootPrefixCls:Dt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:Wn,itemRender:pi});var cn=Math.max(1,mi-Dn),On=Math.min(mi+Dn,Le);mi-1<=Dn&&(On=1+Dn*2),Le-mi<=Dn&&(cn=Le-Dn*2);for(var ri=cn;ri<=On;ri+=1){var Wt=mi===ri;si.push(De.createElement($e,{locale:pn,rootPrefixCls:Dt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:ri,page:ri,active:Wt,showTitle:Wn,itemRender:pi}))}mi-1>=Dn*2&&mi!==3&&(si[0]=(0,De.cloneElement)(si[0],{className:"".concat(Dt,"-item-after-jump-prev")}),si.unshift(Hi)),Le-mi>=Dn*2&&mi!==Le-2&&(si[si.length-1]=(0,De.cloneElement)(si[si.length-1],{className:"".concat(Dt,"-item-before-jump-next")}),si.push(hn)),cn!==1&&si.unshift(ni),On!==Le&&si.push(vi)}var Jt=!this.hasPrev()||!Le,hi=!this.hasNext()||!Le,ci=this.renderPrev(Ft),ui=this.renderNext(Ot);return De.createElement("ul",(0,ce.Z)({className:dt()(Dt,un,(0,Ae.Z)({},"".concat(Dt,"-disabled"),$t)),style:Xt,ref:this.paginationNode},Ve),Ut,ci?De.createElement("li",{title:Wn?pn.prev_page:null,onClick:this.prev,tabIndex:Jt?null:0,onKeyPress:this.runIfEnterPrev,className:dt()("".concat(Dt,"-prev"),(0,Ae.Z)({},"".concat(Dt,"-disabled"),Jt)),"aria-disabled":Jt},ci):null,si,ui?De.createElement("li",{title:Wn?pn.next_page:null,onClick:this.next,tabIndex:hi?null:0,onKeyPress:this.runIfEnterNext,className:dt()("".concat(Dt,"-next"),(0,Ae.Z)({},"".concat(Dt,"-disabled"),hi)),"aria-disabled":hi},ui):null,De.createElement(ze,{disabled:$t,locale:pn,rootPrefixCls:Dt,selectComponentClass:Un,selectPrefixCls:$n,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:mi,pageSize:nr,pageSizeOptions:ti,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:_n}))}}],[{key:"getDerivedStateFromProps",value:function(lt,Dt){var un={};if("current"in lt&&(un.current=lt.current,lt.current!==Dt.current&&(un.currentInputValue=un.current)),"pageSize"in lt&<.pageSize!==Dt.pageSize){var Xt=Dt.current,$t=Qe(lt.pageSize,Dt,lt);Xt=Xt>$t?$t:Xt,"current"in lt||(un.current=Xt,un.currentInputValue=Xt),un.pageSize=lt.pageSize}return un}}]),St}(De.Component);bt.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:gt,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:gt,locale:Me.Z,style:{},itemRender:Tt,totalBoundaryShowSizeChanger:50};var Nt=bt,At=ve(22075),Zt=ve(36355),Yt=ve(19716),ut=ve(8628),Ge=ve(9763),kt=ve(57809);const ln=qe=>De.createElement(kt.default,Object.assign({},qe,{showSearch:!0,size:"small"})),sn=qe=>De.createElement(kt.default,Object.assign({},qe,{showSearch:!0,size:"middle"}));ln.Option=kt.default.Option,sn.Option=kt.default.Option;var Bt=ve(9937),Gt=ve(17313),en=ve(83116),Bn=ve(37613);const rn=qe=>{const{componentCls:Ue}=qe;return{[`${Ue}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${Ue}-item-link`]:{color:qe.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${Ue}-item-link`]:{color:qe.colorTextDisabled,cursor:"not-allowed"}}},[`&${Ue}-disabled`]:{cursor:"not-allowed",[`${Ue}-item`]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:qe.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:qe.colorBorder,backgroundColor:qe.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:qe.itemActiveBgDisabled},a:{color:qe.itemActiveColorDisabled}}},[`${Ue}-item-link`]:{color:qe.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${Ue}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${Ue}-simple-pager`]:{color:qe.colorTextDisabled},[`${Ue}-jump-prev, ${Ue}-jump-next`]:{[`${Ue}-item-link-icon`]:{opacity:0},[`${Ue}-item-ellipsis`]:{opacity:1}}},[`&${Ue}-simple`]:{[`${Ue}-prev, ${Ue}-next`]:{[`&${Ue}-disabled ${Ue}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},Cn=qe=>{const{componentCls:Ue}=qe;return{[`&${Ue}-mini ${Ue}-total-text, &${Ue}-mini ${Ue}-simple-pager`]:{height:qe.itemSizeSM,lineHeight:`${qe.itemSizeSM}px`},[`&${Ue}-mini ${Ue}-item`]:{minWidth:qe.itemSizeSM,height:qe.itemSizeSM,margin:0,lineHeight:`${qe.itemSizeSM-2}px`},[`&${Ue}-mini:not(${Ue}-disabled) ${Ue}-item:not(${Ue}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:qe.colorBgTextHover},"&:active":{backgroundColor:qe.colorBgTextActive}},[`&${Ue}-mini ${Ue}-prev, &${Ue}-mini ${Ue}-next`]:{minWidth:qe.itemSizeSM,height:qe.itemSizeSM,margin:0,lineHeight:`${qe.itemSizeSM}px`},[`&${Ue}-mini:not(${Ue}-disabled)`]:{[`${Ue}-prev, ${Ue}-next`]:{[`&:hover ${Ue}-item-link`]:{backgroundColor:qe.colorBgTextHover},[`&:active ${Ue}-item-link`]:{backgroundColor:qe.colorBgTextActive},[`&${Ue}-disabled:hover ${Ue}-item-link`]:{backgroundColor:"transparent"}}},[`
|
|
|
&${Ue}-mini ${Ue}-prev ${Ue}-item-link,
|
|
|
&${Ue}-mini ${Ue}-next ${Ue}-item-link
|
|
|
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:qe.itemSizeSM,lineHeight:`${qe.itemSizeSM}px`}},[`&${Ue}-mini ${Ue}-jump-prev, &${Ue}-mini ${Ue}-jump-next`]:{height:qe.itemSizeSM,marginInlineEnd:0,lineHeight:`${qe.itemSizeSM}px`},[`&${Ue}-mini ${Ue}-options`]:{marginInlineStart:qe.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:qe.miniOptionsSizeChangerTop},"&-quick-jumper":{height:qe.itemSizeSM,lineHeight:`${qe.itemSizeSM}px`,input:Object.assign(Object.assign({},(0,Bt.x0)(qe)),{width:qe.paginationMiniQuickJumperInputWidth,height:qe.controlHeightSM})}}}},ft=qe=>{const{componentCls:Ue}=qe;return{[`
|
|
|
&${Ue}-simple ${Ue}-prev,
|
|
|
&${Ue}-simple ${Ue}-next
|
|
|
`]:{height:qe.itemSizeSM,lineHeight:`${qe.itemSizeSM}px`,verticalAlign:"top",[`${Ue}-item-link`]:{height:qe.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:qe.colorBgTextHover},"&:active":{backgroundColor:qe.colorBgTextActive},"&::after":{height:qe.itemSizeSM,lineHeight:`${qe.itemSizeSM}px`}}},[`&${Ue}-simple ${Ue}-simple-pager`]:{display:"inline-block",height:qe.itemSizeSM,marginInlineEnd:qe.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:qe.marginXS,padding:`0 ${qe.paginationItemPaddingInline}px`,textAlign:"center",backgroundColor:qe.itemInputBg,border:`${qe.lineWidth}px ${qe.lineType} ${qe.colorBorder}`,borderRadius:qe.borderRadius,outline:"none",transition:`border-color ${qe.motionDurationMid}`,color:"inherit","&:hover":{borderColor:qe.colorPrimary},"&:focus":{borderColor:qe.colorPrimaryHover,boxShadow:`${qe.inputOutlineOffset}px 0 ${qe.controlOutlineWidth}px ${qe.controlOutline}`},"&[disabled]":{color:qe.colorTextDisabled,backgroundColor:qe.colorBgContainerDisabled,borderColor:qe.colorBorder,cursor:"not-allowed"}}}}},En=qe=>{const{componentCls:Ue}=qe;return{[`${Ue}-jump-prev, ${Ue}-jump-next`]:{outline:0,[`${Ue}-item-container`]:{position:"relative",[`${Ue}-item-link-icon`]:{color:qe.colorPrimary,fontSize:qe.fontSizeSM,opacity:0,transition:`all ${qe.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${Ue}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:qe.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:qe.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:qe.paginationEllipsisTextIndent,opacity:1,transition:`all ${qe.motionDurationMid}`}},"&:hover":{[`${Ue}-item-link-icon`]:{opacity:1},[`${Ue}-item-ellipsis`]:{opacity:0}}},[`
|
|
|
${Ue}-prev,
|
|
|
${Ue}-jump-prev,
|
|
|
${Ue}-jump-next
|
|
|
`]:{marginInlineEnd:qe.marginXS},[`
|
|
|
${Ue}-prev,
|
|
|
${Ue}-next,
|
|
|
${Ue}-jump-prev,
|
|
|
${Ue}-jump-next
|
|
|
`]:{display:"inline-block",minWidth:qe.itemSize,height:qe.itemSize,color:qe.colorText,fontFamily:qe.fontFamily,lineHeight:`${qe.itemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:qe.borderRadius,cursor:"pointer",transition:`all ${qe.motionDurationMid}`},[`${Ue}-prev, ${Ue}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:qe.colorText,cursor:"pointer",userSelect:"none"},[`${Ue}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:qe.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${qe.lineWidth}px ${qe.lineType} transparent`,borderRadius:qe.borderRadius,outline:"none",transition:`all ${qe.motionDurationMid}`},[`&:hover ${Ue}-item-link`]:{backgroundColor:qe.colorBgTextHover},[`&:active ${Ue}-item-link`]:{backgroundColor:qe.colorBgTextActive},[`&${Ue}-disabled:hover`]:{[`${Ue}-item-link`]:{backgroundColor:"transparent"}}},[`${Ue}-slash`]:{marginInlineEnd:qe.paginationSlashMarginInlineEnd,marginInlineStart:qe.paginationSlashMarginInlineStart},[`${Ue}-options`]:{display:"inline-block",marginInlineStart:qe.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:qe.controlHeight,marginInlineStart:qe.marginXS,lineHeight:`${qe.controlHeight}px`,verticalAlign:"top",input:Object.assign(Object.assign({},(0,Bt.ik)(qe)),{width:qe.controlHeightLG*1.25,height:qe.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:qe.marginXS,marginInlineEnd:qe.marginXS})}}}},Vn=qe=>{const{componentCls:Ue}=qe;return{[`${Ue}-item`]:{display:"inline-block",minWidth:qe.itemSize,height:qe.itemSize,marginInlineEnd:qe.marginXS,fontFamily:qe.fontFamily,lineHeight:`${qe.itemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${qe.lineWidth}px ${qe.lineType} transparent`,borderRadius:qe.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${qe.paginationItemPaddingInline}px`,color:qe.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${Ue}-item-active)`]:{"&:hover":{transition:`all ${qe.motionDurationMid}`,backgroundColor:qe.colorBgTextHover},"&:active":{backgroundColor:qe.colorBgTextActive}},"&-active":{fontWeight:qe.fontWeightStrong,backgroundColor:qe.itemActiveBg,borderColor:qe.colorPrimary,a:{color:qe.colorPrimary},"&:hover":{borderColor:qe.colorPrimaryHover},"&:hover a":{color:qe.colorPrimaryHover}}}}},Re=qe=>{const{componentCls:Ue}=qe;return{[Ue]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Gt.Wf)(qe)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${Ue}-total-text`]:{display:"inline-block",height:qe.itemSize,marginInlineEnd:qe.marginXS,lineHeight:`${qe.itemSize-2}px`,verticalAlign:"middle"}}),Vn(qe)),En(qe)),ft(qe)),Cn(qe)),rn(qe)),{[`@media only screen and (max-width: ${qe.screenLG}px)`]:{[`${Ue}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${qe.screenSM}px)`]:{[`${Ue}-options`]:{display:"none"}}}),[`&${qe.componentCls}-rtl`]:{direction:"rtl"}}},Ce=qe=>{const{componentCls:Ue}=qe;return{[`${Ue}${Ue}-disabled:not(${Ue}-mini)`]:{"&, &:hover":{[`${Ue}-item-link`]:{borderColor:qe.colorBorder}},"&:focus-visible":{[`${Ue}-item-link`]:{borderColor:qe.colorBorder}},[`${Ue}-item, ${Ue}-item-link`]:{backgroundColor:qe.colorBgContainerDisabled,borderColor:qe.colorBorder,[`&:hover:not(${Ue}-item-active)`]:{backgroundColor:qe.colorBgContainerDisabled,borderColor:qe.colorBorder,a:{color:qe.colorTextDisabled}},[`&${Ue}-item-active`]:{backgroundColor:qe.itemActiveBgDisabled}},[`${Ue}-prev, ${Ue}-next`]:{"&:hover button":{backgroundColor:qe.colorBgContainerDisabled,borderColor:qe.colorBorder,color:qe.colorTextDisabled},[`${Ue}-item-link`]:{backgroundColor:qe.colorBgContainerDisabled,borderColor:qe.colorBorder}}},[`${Ue}:not(${Ue}-mini)`]:{[`${Ue}-prev, ${Ue}-next`]:{"&:hover button":{borderColor:qe.colorPrimaryHover,backgroundColor:qe.itemBg},[`${Ue}-item-link`]:{backgroundColor:qe.itemLinkBg,borderColor:qe.colorBorder},[`&:hover ${Ue}-item-link`]:{borderColor:qe.colorPrimary,backgroundColor:qe.itemBg,color:qe.colorPrimary},[`&${Ue}-disabled`]:{[`${Ue}-item-link`]:{borderColor:qe.colorBorder,color:qe.colorTextDisabled}}},[`${Ue}-item`]:{backgroundColor:qe.itemBg,border:`${qe.lineWidth}px ${qe.lineType} ${qe.colorBorder}`,[`&:hover:not(${Ue}-item-active)`]:{borderColor:qe.colorPrimary,backgroundColor:qe.itemBg,a:{color:qe.colorPrimary}},"&-active":{borderColor:qe.colorPrimary}}}}},Pe=qe=>{const{componentCls:Ue}=qe;return{[`${Ue}:not(${Ue}-disabled)`]:{[`${Ue}-item`]:Object.assign({},(0,Gt.Qy)(qe)),[`${Ue}-jump-prev, ${Ue}-jump-next`]:{"&:focus-visible":Object.assign({[`${Ue}-item-link-icon`]:{opacity:1},[`${Ue}-item-ellipsis`]:{opacity:0}},(0,Gt.oN)(qe))},[`${Ue}-prev, ${Ue}-next`]:{[`&:focus-visible ${Ue}-item-link`]:Object.assign({},(0,Gt.oN)(qe))}}}};var Ne=(0,en.Z)("Pagination",qe=>{const Ue=(0,Bn.TS)(qe,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:qe.marginXXS/2,paginationMiniQuickJumperInputWidth:qe.controlHeightLG*1.1,paginationItemPaddingInline:qe.marginXXS*1.5,paginationEllipsisLetterSpacing:qe.marginXXS/2,paginationSlashMarginInlineStart:qe.marginXXS,paginationSlashMarginInlineEnd:qe.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,Bt.e5)(qe),(0,Bt.TM)(qe));return[Re(Ue),Pe(Ue),qe.wireframe&&Ce(Ue)]},qe=>({itemBg:qe.colorBgContainer,itemSize:qe.controlHeight,itemSizeSM:qe.controlHeightSM,itemActiveBg:qe.colorBgContainer,itemLinkBg:qe.colorBgContainer,itemActiveColorDisabled:qe.colorTextDisabled,itemActiveBgDisabled:qe.controlItemBgActiveDisabled,itemInputBg:qe.colorBgContainer,miniOptionsSizeChangerTop:0})),ke=function(qe,Ue){var St={};for(var vt in qe)Object.prototype.hasOwnProperty.call(qe,vt)&&Ue.indexOf(vt)<0&&(St[vt]=qe[vt]);if(qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var lt=0,vt=Object.getOwnPropertySymbols(qe);lt<vt.length;lt++)Ue.indexOf(vt[lt])<0&&Object.prototype.propertyIsEnumerable.call(qe,vt[lt])&&(St[vt[lt]]=qe[vt[lt]]);return St},nt=qe=>{const{prefixCls:Ue,selectPrefixCls:St,className:vt,rootClassName:lt,style:Dt,size:un,locale:Xt,selectComponentClass:$t,responsive:wn,showSizeChanger:bn}=qe,pn=ke(qe,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:Yn}=(0,ut.Z)(wn),{getPrefixCls:ai,direction:Wn,pagination:Rn={}}=De.useContext(Zt.E_),ii=ai("pagination",Ue),[pi,gi]=Ne(ii),Ri=bn!=null?bn:Rn.showSizeChanger,Ji=De.useMemo(()=>{const Le=De.createElement("span",{className:`${ii}-item-ellipsis`},"\u2022\u2022\u2022"),si=De.createElement("button",{className:`${ii}-item-link`,type:"button",tabIndex:-1},Wn==="rtl"?De.createElement(Et.Z,null):De.createElement(He.Z,null)),Hi=De.createElement("button",{className:`${ii}-item-link`,type:"button",tabIndex:-1},Wn==="rtl"?De.createElement(He.Z,null):De.createElement(Et.Z,null)),hn=De.createElement("a",{className:`${ii}-item-link`},De.createElement("div",{className:`${ii}-item-container`},Wn==="rtl"?De.createElement(ct.Z,{className:`${ii}-item-link-icon`}):De.createElement(mt,{className:`${ii}-item-link-icon`}),Le)),ni=De.createElement("a",{className:`${ii}-item-link`},De.createElement("div",{className:`${ii}-item-container`},Wn==="rtl"?De.createElement(mt,{className:`${ii}-item-link-icon`}):De.createElement(ct.Z,{className:`${ii}-item-link-icon`}),Le));return{prevIcon:si,nextIcon:Hi,jumpPrevIcon:hn,jumpNextIcon:ni}},[Wn,ii]),[Un]=(0,Ge.Z)("Pagination",At.Z),$n=Object.assign(Object.assign({},Un),Xt),ti=(0,Yt.Z)(un),Pi=ti==="small"||!!(Yn&&!ti&&wn),mi=ai("select",St),nr=dt()({[`${ii}-mini`]:Pi,[`${ii}-rtl`]:Wn==="rtl"},Rn==null?void 0:Rn.className,vt,lt,gi),ji=Object.assign(Object.assign({},Rn==null?void 0:Rn.style),Dt);return pi(De.createElement(Nt,Object.assign({},Ji,pn,{style:ji,prefixCls:ii,selectPrefixCls:mi,className:nr,selectComponentClass:$t||(Pi?ln:sn),locale:$n,showSizeChanger:Ri})))},Pt=nt},39722:function(Pn,an,ve){"use strict";ve.d(an,{t5:function(){return He}});var ce=ve(92310),De=ve.n(ce),_e=ve(55477),Ct=ve(59301),Ze=ve(36355),Ke=ve(77578),Be=ve(17356),mt=function(ht,dt){var Ae={};for(var te in ht)Object.prototype.hasOwnProperty.call(ht,te)&&dt.indexOf(te)<0&&(Ae[te]=ht[te]);if(ht!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ee=0,te=Object.getOwnPropertySymbols(ht);ee<te.length;ee++)dt.indexOf(te[ee])<0&&Object.prototype.propertyIsEnumerable.call(ht,te[ee])&&(Ae[te[ee]]=ht[te[ee]]);return Ae};const ct=(ht,dt,Ae)=>{if(!(!dt&&!Ae))return Ct.createElement(Ct.Fragment,null,dt&&Ct.createElement("div",{className:`${ht}-title`},(0,Ke.Z)(dt)),Ct.createElement("div",{className:`${ht}-inner-content`},(0,Ke.Z)(Ae)))},He=ht=>{const{hashId:dt,prefixCls:Ae,className:te,style:ee,placement:he="top",title:se,content:de,children:me}=ht;return Ct.createElement("div",{className:De()(dt,Ae,`${Ae}-pure`,`${Ae}-placement-${he}`,te),style:ee},Ct.createElement("div",{className:`${Ae}-arrow`}),Ct.createElement(_e.G,Object.assign({},ht,{className:dt,prefixCls:Ae}),me||ct(Ae,se,de)))},Et=ht=>{const{prefixCls:dt}=ht,Ae=mt(ht,["prefixCls"]),{getPrefixCls:te}=Ct.useContext(Ze.E_),ee=te("popover",dt),[he,se]=(0,Be.Z)(ee);return he(Ct.createElement(He,Object.assign({},Ae,{prefixCls:ee,hashId:se})))};an.ZP=Et},60324:function(Pn,an,ve){"use strict";var ce=ve(92310),De=ve.n(ce),_e=ve(59301),Ct=ve(77578),Ze=ve(62892),Ke=ve(36355),Be=ve(6848),mt=ve(39722),ct=ve(17356),He=function(dt,Ae){var te={};for(var ee in dt)Object.prototype.hasOwnProperty.call(dt,ee)&&Ae.indexOf(ee)<0&&(te[ee]=dt[ee]);if(dt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,ee=Object.getOwnPropertySymbols(dt);he<ee.length;he++)Ae.indexOf(ee[he])<0&&Object.prototype.propertyIsEnumerable.call(dt,ee[he])&&(te[ee[he]]=dt[ee[he]]);return te};const Et=dt=>{let{title:Ae,content:te,prefixCls:ee}=dt;return _e.createElement(_e.Fragment,null,Ae&&_e.createElement("div",{className:`${ee}-title`},(0,Ct.Z)(Ae)),_e.createElement("div",{className:`${ee}-inner-content`},(0,Ct.Z)(te)))},ht=_e.forwardRef((dt,Ae)=>{const{prefixCls:te,title:ee,content:he,overlayClassName:se,placement:de="top",trigger:me="hover",mouseEnterDelay:we=.1,mouseLeaveDelay:be=.1,overlayStyle:Me={}}=dt,Ie=He(dt,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:ze}=_e.useContext(Ke.E_),et=ze("popover",te),[$e,gt]=(0,ct.Z)(et),je=ze(),Tt=De()(se,gt);return $e(_e.createElement(Be.Z,Object.assign({placement:de,trigger:me,mouseEnterDelay:we,mouseLeaveDelay:be,overlayStyle:Me},Ie,{prefixCls:et,overlayClassName:Tt,ref:Ae,overlay:ee||he?_e.createElement(Et,{prefixCls:et,title:ee,content:he}):null,transitionName:(0,Ze.m)(je,"zoom-big",Ie.transitionName),"data-popover-inject":!0})))});ht._InternalPanelDoNotUseOrYouWillBeFired=mt.ZP,an.Z=ht},17356:function(Pn,an,ve){"use strict";var ce=ve(17313),De=ve(29878),_e=ve(19447),Ct=ve(33166),Ze=ve(83116),Ke=ve(37613);const Be=He=>{const{componentCls:Et,popoverColor:ht,minWidth:dt,fontWeightStrong:Ae,popoverPadding:te,boxShadowSecondary:ee,colorTextHeading:he,borderRadiusLG:se,zIndexPopup:de,marginXS:me,colorBgElevated:we,popoverBg:be}=He;return[{[Et]:Object.assign(Object.assign({},(0,ce.Wf)(He)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:de,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":we,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${Et}-content`]:{position:"relative"},[`${Et}-inner`]:{backgroundColor:be,backgroundClip:"padding-box",borderRadius:se,boxShadow:ee,padding:te},[`${Et}-title`]:{minWidth:dt,marginBottom:me,color:he,fontWeight:Ae},[`${Et}-inner-content`]:{color:ht}})},(0,_e.ZP)(He,{colorBg:"var(--antd-arrow-background-color)"}),{[`${Et}-pure`]:{position:"relative",maxWidth:"none",margin:He.sizePopupArrow,display:"inline-block",[`${Et}-content`]:{display:"inline-block"}}}]},mt=He=>{const{componentCls:Et}=He;return{[Et]:Ct.i.map(ht=>{const dt=He[`${ht}6`];return{[`&${Et}-${ht}`]:{"--antd-arrow-background-color":dt,[`${Et}-inner`]:{backgroundColor:dt},[`${Et}-arrow`]:{background:"transparent"}}}})}},ct=He=>{const{componentCls:Et,lineWidth:ht,lineType:dt,colorSplit:Ae,paddingSM:te,controlHeight:ee,fontSize:he,lineHeight:se,padding:de}=He,me=ee-Math.round(he*se),we=me/2,be=me/2-ht,Me=de;return{[Et]:{[`${Et}-inner`]:{padding:0},[`${Et}-title`]:{margin:0,padding:`${we}px ${Me}px ${be}px`,borderBottom:`${ht}px ${dt} ${Ae}`},[`${Et}-inner-content`]:{padding:`${te}px ${Me}px`}}}};an.Z=(0,Ze.Z)("Popover",He=>{const{colorBgElevated:Et,colorText:ht,wireframe:dt}=He,Ae=(0,Ke.TS)(He,{popoverPadding:12,popoverBg:Et,popoverColor:ht});return[Be(Ae),mt(Ae),dt&&ct(Ae),(0,De._y)(Ae,"zoom-big")]},He=>({width:177,minWidth:177,zIndexPopup:He.zIndexPopupBase+30}),{resetStyle:!1,deprecatedTokens:[["width","minWidth"]]})},13570:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return Ge}});var ce=ve(96663),De=ve(59301),_e={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"},Ct=_e,Ze=ve(7657),Ke=function(ln,sn){return De.createElement(Ze.Z,(0,ce.Z)({},ln,{ref:sn,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be,ct=ve(92310),He=ve.n(ct),Et=ve(90493),ht=ve(72071),dt=ve(6620),Ae=ve(18929),te=ve(10228),ee=ve(26112);function he(kt,ln){var sn=kt.disabled,Bt=kt.prefixCls,Gt=kt.character,en=kt.characterRender,Bn=kt.index,rn=kt.count,Cn=kt.value,ft=kt.allowHalf,En=kt.focused,Vn=kt.onHover,Re=kt.onClick,Ce=function(Ue){Vn(Ue,Bn)},Pe=function(Ue){Re(Ue,Bn)},Ne=function(Ue){Ue.keyCode===te.Z.ENTER&&Re(Ue,Bn)},ke=Bn+1,Se=new Set([Bt]);Cn===0&&Bn===0&&En?Se.add("".concat(Bt,"-focused")):ft&&Cn+.5>=ke&&Cn<ke?(Se.add("".concat(Bt,"-half")),Se.add("".concat(Bt,"-active")),En&&Se.add("".concat(Bt,"-focused"))):(ke<=Cn?Se.add("".concat(Bt,"-full")):Se.add("".concat(Bt,"-zero")),ke===Cn&&En&&Se.add("".concat(Bt,"-focused")));var nt=typeof Gt=="function"?Gt(kt):Gt,Pt=De.createElement("li",{className:He()(Array.from(Se)),ref:ln},De.createElement("div",{onClick:sn?null:Pe,onKeyDown:sn?null:Ne,onMouseMove:sn?null:Ce,role:"radio","aria-checked":Cn>Bn?"true":"false","aria-posinset":Bn+1,"aria-setsize":rn,tabIndex:sn?-1:0},De.createElement("div",{className:"".concat(Bt,"-first")},nt),De.createElement("div",{className:"".concat(Bt,"-second")},nt)));return en&&(Pt=en(Pt,kt)),Pt}var se=De.forwardRef(he);function de(){var kt=De.useRef({});function ln(Bt){return kt.current[Bt]}function sn(Bt){return function(Gt){kt.current[Bt]=Gt}}return[ln,sn]}function me(kt){var ln=kt.pageXOffset,sn="scrollLeft";if(typeof ln!="number"){var Bt=kt.document;ln=Bt.documentElement[sn],typeof ln!="number"&&(ln=Bt.body[sn])}return ln}function we(kt){var ln,sn,Bt=kt.ownerDocument,Gt=Bt.body,en=Bt&&Bt.documentElement,Bn=kt.getBoundingClientRect();return ln=Bn.left,sn=Bn.top,ln-=en.clientLeft||Gt.clientLeft||0,sn-=en.clientTop||Gt.clientTop||0,{left:ln,top:sn}}function be(kt){var ln=we(kt),sn=kt.ownerDocument,Bt=sn.defaultView||sn.parentWindow;return ln.left+=me(Bt),ln.left}var Me=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function Ie(kt,ln){var sn,Bt=kt.prefixCls,Gt=Bt===void 0?"rc-rate":Bt,en=kt.className,Bn=kt.defaultValue,rn=kt.value,Cn=kt.count,ft=Cn===void 0?5:Cn,En=kt.allowHalf,Vn=En===void 0?!1:En,Re=kt.allowClear,Ce=Re===void 0?!0:Re,Pe=kt.character,Ne=Pe===void 0?"\u2605":Pe,ke=kt.characterRender,Se=kt.disabled,nt=kt.direction,Pt=nt===void 0?"ltr":nt,qe=kt.tabIndex,Ue=qe===void 0?0:qe,St=kt.autoFocus,vt=kt.onHoverChange,lt=kt.onChange,Dt=kt.onFocus,un=kt.onBlur,Xt=kt.onKeyDown,$t=kt.onMouseLeave,wn=(0,dt.Z)(kt,Me),bn=de(),pn=(0,ht.Z)(bn,2),Yn=pn[0],ai=pn[1],Wn=De.useRef(null),Rn=function(){if(!Se){var rt;(rt=Wn.current)===null||rt===void 0||rt.focus()}};De.useImperativeHandle(ln,function(){return{focus:Rn,blur:function(){if(!Se){var rt;(rt=Wn.current)===null||rt===void 0||rt.blur()}}}});var ii=(0,Ae.Z)(Bn||0,{value:rn}),pi=(0,ht.Z)(ii,2),gi=pi[0],Ri=pi[1],Ji=(0,Ae.Z)(null),Un=(0,ht.Z)(Ji,2),$n=Un[0],ti=Un[1],Pi=function(rt,Vt){var on=Pt==="rtl",xn=rt+1;if(Vn){var An=Yn(rt),yt=be(An),cn=An.clientWidth;(on&&Vt-yt>cn/2||!on&&Vt-yt<cn/2)&&(xn-=.5)}return xn},mi=function(rt){Ri(rt),lt==null||lt(rt)},nr=De.useState(!1),ji=(0,ht.Z)(nr,2),Le=ji[0],si=ji[1],Hi=function(){si(!0),Dt==null||Dt()},hn=function(){si(!1),un==null||un()},ni=De.useState(null),vi=(0,ht.Z)(ni,2),Fi=vi[0],_n=vi[1],Dn=function(rt,Vt){var on=Pi(Vt,rt.pageX);on!==$n&&(_n(on),ti(null)),vt==null||vt(on)},Ft=function(rt){Se||(_n(null),ti(null),vt==null||vt(void 0)),rt&&($t==null||$t(rt))},Ot=function(rt,Vt){var on=Pi(Vt,rt.pageX),xn=!1;Ce&&(xn=on===gi),Ft(),mi(xn?0:on),ti(xn?on:null)},Ve=function(rt){var Vt=rt.keyCode,on=Pt==="rtl",xn=gi;Vt===te.Z.RIGHT&&xn<ft&&!on?(Vn?xn+=.5:xn+=1,mi(xn),rt.preventDefault()):Vt===te.Z.LEFT&&xn>0&&!on||Vt===te.Z.RIGHT&&xn>0&&on?(Vn?xn-=.5:xn-=1,mi(xn),rt.preventDefault()):Vt===te.Z.LEFT&&xn<ft&&on&&(Vn?xn+=.5:xn+=1,mi(xn),rt.preventDefault()),Xt==null||Xt(rt)};De.useEffect(function(){St&&!Se&&Rn()},[]);var Ut=new Array(ft).fill(0).map(function(xt,rt){return De.createElement(se,{ref:ai(rt),index:rt,count:ft,disabled:Se,prefixCls:"".concat(Gt,"-star"),allowHalf:Vn,value:Fi===null?gi:Fi,onClick:Ot,onHover:Dn,key:xt||rt,character:Ne,characterRender:ke,focused:Le})}),tn=He()(Gt,en,(sn={},(0,Et.Z)(sn,"".concat(Gt,"-disabled"),Se),(0,Et.Z)(sn,"".concat(Gt,"-rtl"),Pt==="rtl"),sn));return De.createElement("ul",(0,ce.Z)({className:tn,onMouseLeave:Ft,tabIndex:Se?-1:Ue,onFocus:Se?null:Hi,onBlur:Se?null:hn,onKeyDown:Se?null:Ve,ref:Wn,role:"radiogroup"},(0,ee.Z)(wn,{aria:!0,data:!0,attr:!0})),Ut)}var ze=De.forwardRef(Ie),et=ze,$e=ve(36355),gt=ve(6848),je=ve(17313),Tt=ve(83116),Qe=ve(37613);const bt=kt=>{const{componentCls:ln}=kt;return{[`${ln}-star`]:{position:"relative",display:"inline-block",color:"inherit",cursor:"pointer","&:not(:last-child)":{marginInlineEnd:kt.marginXS},"> div":{transition:`all ${kt.motionDurationMid}, outline 0s`,"&:hover":{transform:kt.starHoverScale},"&:focus":{outline:0},"&:focus-visible":{outline:`${kt.lineWidth}px dashed ${kt.starColor}`,transform:kt.starHoverScale}},"&-first, &-second":{color:kt.starBg,transition:`all ${kt.motionDurationMid}`,userSelect:"none",[kt.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"}}}},Nt=kt=>({[`&-rtl${kt.componentCls}`]:{direction:"rtl"}}),At=kt=>{const{componentCls:ln}=kt;return{[ln]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,je.Wf)(kt)),{display:"inline-block",margin:0,padding:0,color:kt.starColor,fontSize:kt.starSize,lineHeight:"unset",listStyle:"none",outline:"none",[`&-disabled${ln} ${ln}-star`]:{cursor:"default","> div:hover":{transform:"scale(1)"}}}),bt(kt)),{[`+ ${ln}-text`]:{display:"inline-block",marginInlineStart:kt.marginXS,fontSize:kt.fontSize}}),Nt(kt))}};var Zt=(0,Tt.Z)("Rate",kt=>{const ln=(0,Qe.TS)(kt,{});return[At(ln)]},kt=>({starColor:kt.yellow6,starSize:kt.controlHeightLG*.5,starHoverScale:"scale(1.1)",starBg:kt.colorFillContent})),Yt=function(kt,ln){var sn={};for(var Bt in kt)Object.prototype.hasOwnProperty.call(kt,Bt)&&ln.indexOf(Bt)<0&&(sn[Bt]=kt[Bt]);if(kt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Gt=0,Bt=Object.getOwnPropertySymbols(kt);Gt<Bt.length;Gt++)ln.indexOf(Bt[Gt])<0&&Object.prototype.propertyIsEnumerable.call(kt,Bt[Gt])&&(sn[Bt[Gt]]=kt[Bt[Gt]]);return sn},Ge=De.forwardRef((kt,ln)=>{const{prefixCls:sn,className:Bt,rootClassName:Gt,style:en,tooltips:Bn,character:rn=De.createElement(mt,null)}=kt,Cn=Yt(kt,["prefixCls","className","rootClassName","style","tooltips","character"]),ft=(Se,nt)=>{let{index:Pt}=nt;return Bn?De.createElement(gt.Z,{title:Bn[Pt]},Se):Se},{getPrefixCls:En,direction:Vn,rate:Re}=De.useContext($e.E_),Ce=En("rate",sn),[Pe,Ne]=Zt(Ce),ke=Object.assign(Object.assign({},Re==null?void 0:Re.style),en);return Pe(De.createElement(et,Object.assign({ref:ln,character:rn,characterRender:ft},Cn,{className:He()(Bt,Gt,Ne,Re==null?void 0:Re.className),style:ke,prefixCls:Ce,direction:Vn})))})},57809:function(Pn,an,ve){"use strict";var ce=ve(92310),De=ve.n(ce),_e=ve(77861),Ct=ve(2738),Ze=ve(59301),Ke=ve(53487),Be=ve(62892),mt=ve(19080),ct=ve(36355),He=ve(1684),Et=ve(93891),ht=ve(19716),dt=ve(32441),Ae=ve(33234),te=ve(14154),ee=ve(58582),he=ve(84443),se=ve(66339),de=function(Ie,ze){var et={};for(var $e in Ie)Object.prototype.hasOwnProperty.call(Ie,$e)&&ze.indexOf($e)<0&&(et[$e]=Ie[$e]);if(Ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var gt=0,$e=Object.getOwnPropertySymbols(Ie);gt<$e.length;gt++)ze.indexOf($e[gt])<0&&Object.prototype.propertyIsEnumerable.call(Ie,$e[gt])&&(et[$e[gt]]=Ie[$e[gt]]);return et};const me="SECRET_COMBOBOX_MODE_DO_NOT_USE",we=(Ie,ze)=>{var et,{prefixCls:$e,bordered:gt=!0,className:je,rootClassName:Tt,getPopupContainer:Qe,popupClassName:bt,dropdownClassName:Nt,listHeight:At=256,placement:Zt,listItemHeight:Yt=24,size:ut,disabled:Ge,notFoundContent:kt,status:ln,builtinPlacements:sn,dropdownMatchSelectWidth:Bt,popupMatchSelectWidth:Gt,direction:en,style:Bn,allowClear:rn}=Ie,Cn=de(Ie,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:ft,getPrefixCls:En,renderEmpty:Vn,direction:Re,virtual:Ce,popupMatchSelectWidth:Pe,popupOverflow:Ne,select:ke}=Ze.useContext(ct.E_),Se=En("select",$e),nt=En(),Pt=en!=null?en:Re,{compactSize:qe,compactItemClassnames:Ue}=(0,Ae.ri)(Se,Pt),[St,vt]=(0,te.Z)(Se),lt=Ze.useMemo(()=>{const{mode:ji}=Cn;if(ji!=="combobox")return ji===me?"combobox":ji},[Cn.mode]),Dt=lt==="multiple"||lt==="tags",un=(0,he.Z)(Cn.suffixIcon,Cn.showArrow),Xt=(et=Gt!=null?Gt:Bt)!==null&&et!==void 0?et:Pe,{status:$t,hasFeedback:wn,isFormItemInput:bn,feedbackIcon:pn}=Ze.useContext(dt.aM),Yn=(0,mt.F)($t,ln);let ai;kt!==void 0?ai=kt:lt==="combobox"?ai=null:ai=(Vn==null?void 0:Vn("Select"))||Ze.createElement(Et.Z,{componentName:"Select"});const{suffixIcon:Wn,itemIcon:Rn,removeIcon:ii,clearIcon:pi}=(0,se.Z)(Object.assign(Object.assign({},Cn),{multiple:Dt,hasFeedback:wn,feedbackIcon:pn,showSuffixIcon:un,prefixCls:Se,showArrow:Cn.showArrow,componentName:"Select"})),gi=rn===!0?{clearIcon:pi}:rn,Ri=(0,Ct.Z)(Cn,["suffixIcon","itemIcon"]),Ji=De()(bt||Nt,{[`${Se}-dropdown-${Pt}`]:Pt==="rtl"},Tt,vt),Un=(0,ht.Z)(ji=>{var Le;return(Le=ut!=null?ut:qe)!==null&&Le!==void 0?Le:ji}),$n=Ze.useContext(He.Z),ti=Ge!=null?Ge:$n,Pi=De()({[`${Se}-lg`]:Un==="large",[`${Se}-sm`]:Un==="small",[`${Se}-rtl`]:Pt==="rtl",[`${Se}-borderless`]:!gt,[`${Se}-in-form-item`]:bn},(0,mt.Z)(Se,Yn,wn),Ue,ke==null?void 0:ke.className,je,Tt,vt),mi=Ze.useMemo(()=>Zt!==void 0?Zt:Pt==="rtl"?"bottomRight":"bottomLeft",[Zt,Pt]),nr=(0,ee.Z)(sn,Ne);return St(Ze.createElement(_e.ZP,Object.assign({ref:ze,virtual:Ce,showSearch:ke==null?void 0:ke.showSearch},Ri,{style:Object.assign(Object.assign({},ke==null?void 0:ke.style),Bn),dropdownMatchSelectWidth:Xt,builtinPlacements:nr,transitionName:(0,Be.m)(nt,"slide-up",Cn.transitionName),listHeight:At,listItemHeight:Yt,mode:lt,prefixCls:Se,placement:mi,direction:Pt,suffixIcon:Wn,menuItemSelectedIcon:Rn,removeIcon:ii,allowClear:gi,notFoundContent:ai,className:Pi,getPopupContainer:Qe||ft,dropdownClassName:Ji,disabled:ti})))},be=Ze.forwardRef(we),Me=(0,Ke.Z)(be);be.SECRET_COMBOBOX_MODE_DO_NOT_USE=me,be.Option=_e.Wx,be.OptGroup=_e.Xo,be._InternalPanelDoNotUseOrYouWillBeFired=Me,an.default=be},14154:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return be}});var ce=ve(17313),De=ve(74207),_e=ve(37613),Ct=ve(83116),Ze=ve(13826),Ke=ve(92899);const Be=Me=>{const{optionHeight:Ie,optionFontSize:ze,optionLineHeight:et,optionPadding:$e}=Me;return{position:"relative",display:"block",minHeight:Ie,padding:$e,color:Me.colorText,fontWeight:"normal",fontSize:ze,lineHeight:et,boxSizing:"border-box"}};var ct=Me=>{const{antCls:Ie,componentCls:ze}=Me,et=`${ze}-item`,$e=`&${Ie}-slide-up-enter${Ie}-slide-up-enter-active`,gt=`&${Ie}-slide-up-appear${Ie}-slide-up-appear-active`,je=`&${Ie}-slide-up-leave${Ie}-slide-up-leave-active`,Tt=`${ze}-dropdown-placement-`;return[{[`${ze}-dropdown`]:Object.assign(Object.assign({},(0,ce.Wf)(Me)),{position:"absolute",top:-9999,zIndex:Me.zIndexPopup,boxSizing:"border-box",padding:Me.paddingXXS,overflow:"hidden",fontSize:Me.fontSize,fontVariant:"initial",backgroundColor:Me.colorBgElevated,borderRadius:Me.borderRadiusLG,outline:"none",boxShadow:Me.boxShadowSecondary,[`
|
|
|
${$e}${Tt}bottomLeft,
|
|
|
${gt}${Tt}bottomLeft
|
|
|
`]:{animationName:Ze.fJ},[`
|
|
|
${$e}${Tt}topLeft,
|
|
|
${gt}${Tt}topLeft,
|
|
|
${$e}${Tt}topRight,
|
|
|
${gt}${Tt}topRight
|
|
|
`]:{animationName:Ze.Qt},[`${je}${Tt}bottomLeft`]:{animationName:Ze.Uw},[`
|
|
|
${je}${Tt}topLeft,
|
|
|
${je}${Tt}topRight
|
|
|
`]:{animationName:Ze.ly},"&-hidden":{display:"none"},[`${et}`]:Object.assign(Object.assign({},Be(Me)),{cursor:"pointer",transition:`background ${Me.motionDurationSlow} ease`,borderRadius:Me.borderRadiusSM,"&-group":{color:Me.colorTextDescription,fontSize:Me.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},ce.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${et}-option-disabled)`]:{backgroundColor:Me.optionActiveBg},[`&-selected:not(${et}-option-disabled)`]:{color:Me.optionSelectedColor,fontWeight:Me.optionSelectedFontWeight,backgroundColor:Me.optionSelectedBg,[`${et}-option-state`]:{color:Me.colorPrimary}},"&-disabled":{[`&${et}-option-selected`]:{backgroundColor:Me.colorBgContainerDisabled},color:Me.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:Me.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,Ze.oN)(Me,"slide-up"),(0,Ze.oN)(Me,"slide-down"),(0,Ke.Fm)(Me,"move-up"),(0,Ke.Fm)(Me,"move-down")]};const He=2,Et=Me=>{let{controlHeightSM:Ie,controlHeight:ze,lineWidth:et}=Me;const $e=(ze-Ie)/2-et,gt=Math.ceil($e/2);return[$e,gt]};function ht(Me,Ie){const{componentCls:ze,iconCls:et}=Me,$e=`${ze}-selection-overflow`,gt=Me.multipleSelectItemHeight,[je]=Et(Me),Tt=Ie?`${ze}-${Ie}`:"";return{[`${ze}-multiple${Tt}`]:{fontSize:Me.fontSize,[$e]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${ze}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${je-He}px ${He*2}px`,borderRadius:Me.borderRadius,[`${ze}-show-search&`]:{cursor:"text"},[`${ze}-disabled&`]:{background:Me.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${He}px 0`,lineHeight:`${gt}px`,visibility:"hidden",content:'"\\a0"'}},[`
|
|
|
&${ze}-show-arrow ${ze}-selector,
|
|
|
&${ze}-allow-clear ${ze}-selector
|
|
|
`]:{paddingInlineEnd:Me.fontSizeIcon+Me.controlPaddingHorizontal},[`${ze}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:gt,marginTop:He,marginBottom:He,lineHeight:`${gt-Me.lineWidth*2}px`,background:Me.multipleItemBg,border:`${Me.lineWidth}px ${Me.lineType} ${Me.multipleItemBorderColor}`,borderRadius:Me.borderRadiusSM,cursor:"default",transition:`font-size ${Me.motionDurationSlow}, line-height ${Me.motionDurationSlow}, height ${Me.motionDurationSlow}`,userSelect:"none",marginInlineEnd:He*2,paddingInlineStart:Me.paddingXS,paddingInlineEnd:Me.paddingXS/2,[`${ze}-disabled&`]:{color:Me.multipleItemColorDisabled,borderColor:Me.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:Me.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,ce.Ro)()),{display:"inline-flex",alignItems:"center",color:Me.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${et}`]:{verticalAlign:"-0.2em"},"&:hover":{color:Me.colorIconHover}})},[`${$e}-item + ${$e}-item`]:{[`${ze}-selection-search`]:{marginInlineStart:0}},[`${ze}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:Me.inputPaddingHorizontalBase-je,"\n &-input,\n &-mirror\n ":{height:gt,fontFamily:Me.fontFamily,lineHeight:`${gt}px`,transition:`all ${Me.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${ze}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:Me.inputPaddingHorizontalBase,insetInlineEnd:Me.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${Me.motionDurationSlow}`}}}}var Ae=Me=>{const{componentCls:Ie}=Me,ze=(0,_e.TS)(Me,{controlHeight:Me.controlHeightSM,multipleSelectItemHeight:Me.controlHeightXS,borderRadius:Me.borderRadiusSM,borderRadiusSM:Me.borderRadiusXS}),et=(0,_e.TS)(Me,{fontSize:Me.fontSizeLG,controlHeight:Me.controlHeightLG,multipleSelectItemHeight:Me.multipleItemHeightLG,borderRadius:Me.borderRadiusLG,borderRadiusSM:Me.borderRadius}),[,$e]=Et(Me);return[ht(Me),ht(ze,"sm"),{[`${Ie}-multiple${Ie}-sm`]:{[`${Ie}-selection-placeholder`]:{insetInline:Me.controlPaddingHorizontalSM-Me.lineWidth},[`${Ie}-selection-search`]:{marginInlineStart:$e}}},ht(et,"lg")]};function te(Me,Ie){const{componentCls:ze,inputPaddingHorizontalBase:et,borderRadius:$e}=Me,gt=Me.controlHeight-Me.lineWidth*2,je=Math.ceil(Me.fontSize*1.25),Tt=Ie?`${ze}-${Ie}`:"";return{[`${ze}-single${Tt}`]:{fontSize:Me.fontSize,[`${ze}-selector`]:Object.assign(Object.assign({},(0,ce.Wf)(Me)),{display:"flex",borderRadius:$e,[`${ze}-selection-search`]:{position:"absolute",top:0,insetInlineStart:et,insetInlineEnd:et,bottom:0,"&-input":{width:"100%"}},[`
|
|
|
${ze}-selection-item,
|
|
|
${ze}-selection-placeholder
|
|
|
`]:{padding:0,lineHeight:`${gt}px`,transition:`all ${Me.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${gt}px`}},[`${ze}-selection-item`]:{position:"relative",userSelect:"none"},[`${ze}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${ze}-selection-item:after`,`${ze}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
|
&${ze}-show-arrow ${ze}-selection-item,
|
|
|
&${ze}-show-arrow ${ze}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:je},[`&${ze}-open ${ze}-selection-item`]:{color:Me.colorTextPlaceholder},[`&:not(${ze}-customize-input)`]:{[`${ze}-selector`]:{width:"100%",height:Me.controlHeight,padding:`0 ${et}px`,[`${ze}-selection-search-input`]:{height:gt},"&:after":{lineHeight:`${gt}px`}}},[`&${ze}-customize-input`]:{[`${ze}-selector`]:{"&:after":{display:"none"},[`${ze}-selection-search`]:{position:"static",width:"100%"},[`${ze}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${et}px`,"&:after":{display:"none"}}}}}}}function ee(Me){const{componentCls:Ie}=Me,ze=Me.controlPaddingHorizontalSM-Me.lineWidth;return[te(Me),te((0,_e.TS)(Me,{controlHeight:Me.controlHeightSM,borderRadius:Me.borderRadiusSM}),"sm"),{[`${Ie}-single${Ie}-sm`]:{[`&:not(${Ie}-customize-input)`]:{[`${Ie}-selection-search`]:{insetInlineStart:ze,insetInlineEnd:ze},[`${Ie}-selector`]:{padding:`0 ${ze}px`},[`&${Ie}-show-arrow ${Ie}-selection-search`]:{insetInlineEnd:ze+Me.fontSize*1.5},[`
|
|
|
&${Ie}-show-arrow ${Ie}-selection-item,
|
|
|
&${Ie}-show-arrow ${Ie}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:Me.fontSize*1.5}}}},te((0,_e.TS)(Me,{controlHeight:Me.singleItemHeightLG,fontSize:Me.fontSizeLG,borderRadius:Me.borderRadiusLG}),"lg")]}const he=Me=>{const{componentCls:Ie,selectorBg:ze}=Me;return{position:"relative",backgroundColor:ze,border:`${Me.lineWidth}px ${Me.lineType} ${Me.colorBorder}`,transition:`all ${Me.motionDurationMid} ${Me.motionEaseInOut}`,input:{cursor:"pointer"},[`${Ie}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${Ie}-disabled&`]:{color:Me.colorTextDisabled,background:Me.colorBgContainerDisabled,cursor:"not-allowed",[`${Ie}-multiple&`]:{background:Me.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},se=function(Me,Ie){let ze=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:et,borderHoverColor:$e,outlineColor:gt,antCls:je}=Ie,Tt=ze?{[`${et}-selector`]:{borderColor:$e}}:{};return{[Me]:{[`&:not(${et}-disabled):not(${et}-customize-input):not(${je}-pagination-size-changer)`]:Object.assign(Object.assign({},Tt),{[`${et}-focused& ${et}-selector`]:{borderColor:$e,boxShadow:`0 0 0 ${Ie.controlOutlineWidth}px ${gt}`,outline:0},[`&:hover ${et}-selector`]:{borderColor:$e}})}}},de=Me=>{const{componentCls:Ie}=Me;return{[`${Ie}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},me=Me=>{const{componentCls:Ie,inputPaddingHorizontalBase:ze,iconCls:et}=Me;return{[Ie]:Object.assign(Object.assign({},(0,ce.Wf)(Me)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${Ie}-customize-input) ${Ie}-selector`]:Object.assign(Object.assign({},he(Me)),de(Me)),[`${Ie}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},ce.vS),[`${Ie}-selection-placeholder`]:Object.assign(Object.assign({},ce.vS),{flex:1,color:Me.colorTextPlaceholder,pointerEvents:"none"}),[`${Ie}-arrow`]:Object.assign(Object.assign({},(0,ce.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:ze,height:Me.fontSizeIcon,marginTop:-Me.fontSizeIcon/2,color:Me.colorTextQuaternary,fontSize:Me.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[et]:{verticalAlign:"top",transition:`transform ${Me.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${Ie}-suffix)`]:{pointerEvents:"auto"}},[`${Ie}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${Ie}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:ze,zIndex:1,display:"inline-block",width:Me.fontSizeIcon,height:Me.fontSizeIcon,marginTop:-Me.fontSizeIcon/2,color:Me.colorTextQuaternary,fontSize:Me.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:Me.clearBg,cursor:"pointer",opacity:0,transition:`color ${Me.motionDurationMid} ease, opacity ${Me.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:Me.colorTextTertiary}},"&:hover":{[`${Ie}-clear`]:{opacity:1}}}),[`${Ie}-has-feedback`]:{[`${Ie}-clear`]:{insetInlineEnd:ze+Me.fontSize+Me.paddingXS}}}},we=Me=>{const{componentCls:Ie}=Me;return[{[Ie]:{[`&-borderless ${Ie}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${Ie}-in-form-item`]:{width:"100%"}}},me(Me),ee(Me),Ae(Me),ct(Me),{[`${Ie}-rtl`]:{direction:"rtl"}},se(Ie,(0,_e.TS)(Me,{borderHoverColor:Me.colorPrimaryHover,outlineColor:Me.controlOutline})),se(`${Ie}-status-error`,(0,_e.TS)(Me,{borderHoverColor:Me.colorErrorHover,outlineColor:Me.colorErrorOutline}),!0),se(`${Ie}-status-warning`,(0,_e.TS)(Me,{borderHoverColor:Me.colorWarningHover,outlineColor:Me.colorWarningOutline}),!0),(0,De.c)(Me,{borderElCls:`${Ie}-selector`,focusElCls:`${Ie}-focused`})]};var be=(0,Ct.Z)("Select",(Me,Ie)=>{let{rootPrefixCls:ze}=Ie;const et=(0,_e.TS)(Me,{rootPrefixCls:ze,inputPaddingHorizontalBase:Me.paddingSM-1,multipleSelectItemHeight:Me.multipleItemHeight});return[we(et)]},Me=>{const{fontSize:Ie,lineHeight:ze,controlHeight:et,controlPaddingHorizontal:$e,zIndexPopupBase:gt,colorText:je,fontWeightStrong:Tt,controlItemBgActive:Qe,controlItemBgHover:bt,colorBgContainer:Nt,colorFillSecondary:At,controlHeightLG:Zt,controlHeightSM:Yt,colorBgContainerDisabled:ut,colorTextDisabled:Ge}=Me;return{zIndexPopup:gt+50,optionSelectedColor:je,optionSelectedFontWeight:Tt,optionSelectedBg:Qe,optionActiveBg:bt,optionPadding:`${(et-Ie*ze)/2}px ${$e}px`,optionFontSize:Ie,optionLineHeight:ze,optionHeight:et,selectorBg:Nt,clearBg:Nt,singleItemHeightLG:Zt,multipleItemBg:At,multipleItemBorderColor:"transparent",multipleItemHeight:Yt,multipleItemHeightLG:et,multipleSelectorBgDisabled:ut,multipleItemColorDisabled:Ge,multipleItemBorderColorDisabled:"transparent"}})},58582:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return De}});const ce=_e=>{const Ze={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:_e==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},Ze),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},Ze),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},Ze),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},Ze),{points:["br","tr"],offset:[0,-4]})}};function De(_e,Ct){return _e||ce(Ct)}},84443:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return ce}});function ce(De,_e){return _e!==void 0?_e:De!==null}},66339:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(40001),De=ve(19248),_e=ve(99267),Ct=ve(84105),Ze=ve(58617),Ke=ve(47472),Be=ve(59301);function mt(ct){let{suffixIcon:He,clearIcon:Et,menuItemSelectedIcon:ht,removeIcon:dt,loading:Ae,multiple:te,hasFeedback:ee,prefixCls:he,showSuffixIcon:se,feedbackIcon:de,showArrow:me,componentName:we}=ct;const be=Et!=null?Et:Be.createElement(De.Z,null),Me=$e=>He===null&&!ee&&!me?null:Be.createElement(Be.Fragment,null,se!==!1&&$e,ee&&de);let Ie=null;if(He!==void 0)Ie=Me(He);else if(Ae)Ie=Me(Be.createElement(Ze.Z,{spin:!0}));else{const $e=`${he}-suffix`;Ie=gt=>{let{open:je,showSearch:Tt}=gt;return Me(je&&Tt?Be.createElement(Ke.Z,{className:$e}):Be.createElement(Ct.Z,{className:$e}))}}let ze=null;ht!==void 0?ze=ht:te?ze=Be.createElement(ce.Z,null):ze=null;let et=null;return dt!==void 0?et=dt:et=Be.createElement(_e.Z,null),{clearIcon:be,suffixIcon:Ie,itemIcon:ze,removeIcon:et}}},61621:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return Ne}});var ce=ve(92310),De=ve.n(ce),_e=ve(59301),Ct=ve(36355),Ze=ve(2738),Be=ke=>{const{prefixCls:Se,className:nt,style:Pt,size:qe,shape:Ue}=ke,St=De()({[`${Se}-lg`]:qe==="large",[`${Se}-sm`]:qe==="small"}),vt=De()({[`${Se}-circle`]:Ue==="circle",[`${Se}-square`]:Ue==="square",[`${Se}-round`]:Ue==="round"}),lt=_e.useMemo(()=>typeof qe=="number"?{width:qe,height:qe,lineHeight:`${qe}px`}:{},[qe]);return _e.createElement("span",{className:De()(Se,St,vt,nt),style:Object.assign(Object.assign({},lt),Pt)})},mt=ve(93083),ct=ve(83116),He=ve(37613);const Et=new mt.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),ht=ke=>({height:ke,lineHeight:`${ke}px`}),dt=ke=>Object.assign({width:ke},ht(ke)),Ae=ke=>({background:ke.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:Et,animationDuration:ke.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),te=ke=>Object.assign({width:ke*5,minWidth:ke*5},ht(ke)),ee=ke=>{const{skeletonAvatarCls:Se,gradientFromColor:nt,controlHeight:Pt,controlHeightLG:qe,controlHeightSM:Ue}=ke;return{[`${Se}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:nt},dt(Pt)),[`${Se}${Se}-circle`]:{borderRadius:"50%"},[`${Se}${Se}-lg`]:Object.assign({},dt(qe)),[`${Se}${Se}-sm`]:Object.assign({},dt(Ue))}},he=ke=>{const{controlHeight:Se,borderRadiusSM:nt,skeletonInputCls:Pt,controlHeightLG:qe,controlHeightSM:Ue,gradientFromColor:St}=ke;return{[`${Pt}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:St,borderRadius:nt},te(Se)),[`${Pt}-lg`]:Object.assign({},te(qe)),[`${Pt}-sm`]:Object.assign({},te(Ue))}},se=ke=>Object.assign({width:ke},ht(ke)),de=ke=>{const{skeletonImageCls:Se,imageSizeBase:nt,gradientFromColor:Pt,borderRadiusSM:qe}=ke;return{[`${Se}`]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:Pt,borderRadius:qe},se(nt*2)),{[`${Se}-path`]:{fill:"#bfbfbf"},[`${Se}-svg`]:Object.assign(Object.assign({},se(nt)),{maxWidth:nt*4,maxHeight:nt*4}),[`${Se}-svg${Se}-svg-circle`]:{borderRadius:"50%"}}),[`${Se}${Se}-circle`]:{borderRadius:"50%"}}},me=(ke,Se,nt)=>{const{skeletonButtonCls:Pt}=ke;return{[`${nt}${Pt}-circle`]:{width:Se,minWidth:Se,borderRadius:"50%"},[`${nt}${Pt}-round`]:{borderRadius:Se}}},we=ke=>Object.assign({width:ke*2,minWidth:ke*2},ht(ke)),be=ke=>{const{borderRadiusSM:Se,skeletonButtonCls:nt,controlHeight:Pt,controlHeightLG:qe,controlHeightSM:Ue,gradientFromColor:St}=ke;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${nt}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:St,borderRadius:Se,width:Pt*2,minWidth:Pt*2},we(Pt))},me(ke,Pt,nt)),{[`${nt}-lg`]:Object.assign({},we(qe))}),me(ke,qe,`${nt}-lg`)),{[`${nt}-sm`]:Object.assign({},we(Ue))}),me(ke,Ue,`${nt}-sm`))},Me=ke=>{const{componentCls:Se,skeletonAvatarCls:nt,skeletonTitleCls:Pt,skeletonParagraphCls:qe,skeletonButtonCls:Ue,skeletonInputCls:St,skeletonImageCls:vt,controlHeight:lt,controlHeightLG:Dt,controlHeightSM:un,gradientFromColor:Xt,padding:$t,marginSM:wn,borderRadius:bn,titleHeight:pn,blockRadius:Yn,paragraphLiHeight:ai,controlHeightXS:Wn,paragraphMarginTop:Rn}=ke;return{[`${Se}`]:{display:"table",width:"100%",[`${Se}-header`]:{display:"table-cell",paddingInlineEnd:$t,verticalAlign:"top",[`${nt}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Xt},dt(lt)),[`${nt}-circle`]:{borderRadius:"50%"},[`${nt}-lg`]:Object.assign({},dt(Dt)),[`${nt}-sm`]:Object.assign({},dt(un))},[`${Se}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${Pt}`]:{width:"100%",height:pn,background:Xt,borderRadius:Yn,[`+ ${qe}`]:{marginBlockStart:un}},[`${qe}`]:{padding:0,"> li":{width:"100%",height:ai,listStyle:"none",background:Xt,borderRadius:Yn,"+ li":{marginBlockStart:Wn}}},[`${qe}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${Se}-content`]:{[`${Pt}, ${qe} > li`]:{borderRadius:bn}}},[`${Se}-with-avatar ${Se}-content`]:{[`${Pt}`]:{marginBlockStart:wn,[`+ ${qe}`]:{marginBlockStart:Rn}}},[`${Se}${Se}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},be(ke)),ee(ke)),he(ke)),de(ke)),[`${Se}${Se}-block`]:{width:"100%",[`${Ue}`]:{width:"100%"},[`${St}`]:{width:"100%"}},[`${Se}${Se}-active`]:{[`
|
|
|
${Pt},
|
|
|
${qe} > li,
|
|
|
${nt},
|
|
|
${Ue},
|
|
|
${St},
|
|
|
${vt}
|
|
|
`]:Object.assign({},Ae(ke))}}};var Ie=(0,ct.Z)("Skeleton",ke=>{const{componentCls:Se}=ke,nt=(0,He.TS)(ke,{skeletonAvatarCls:`${Se}-avatar`,skeletonTitleCls:`${Se}-title`,skeletonParagraphCls:`${Se}-paragraph`,skeletonButtonCls:`${Se}-button`,skeletonInputCls:`${Se}-input`,skeletonImageCls:`${Se}-image`,imageSizeBase:ke.controlHeight*1.5,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${ke.gradientFromColor} 25%, ${ke.gradientToColor} 37%, ${ke.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[Me(nt)]},ke=>{const{colorFillContent:Se,colorFill:nt}=ke,Pt=Se,qe=nt;return{color:Pt,colorGradientEnd:qe,gradientFromColor:Pt,gradientToColor:qe,titleHeight:ke.controlHeight/2,blockRadius:ke.borderRadiusSM,paragraphMarginTop:ke.marginLG+ke.marginXXS,paragraphLiHeight:ke.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),et=ke=>{const{prefixCls:Se,className:nt,rootClassName:Pt,active:qe,shape:Ue="circle",size:St="default"}=ke,{getPrefixCls:vt}=_e.useContext(Ct.E_),lt=vt("skeleton",Se),[Dt,un]=Ie(lt),Xt=(0,Ze.Z)(ke,["prefixCls","className"]),$t=De()(lt,`${lt}-element`,{[`${lt}-active`]:qe},nt,Pt,un);return Dt(_e.createElement("div",{className:$t},_e.createElement(Be,Object.assign({prefixCls:`${lt}-avatar`,shape:Ue,size:St},Xt))))},gt=ke=>{const{prefixCls:Se,className:nt,rootClassName:Pt,active:qe,block:Ue=!1,size:St="default"}=ke,{getPrefixCls:vt}=_e.useContext(Ct.E_),lt=vt("skeleton",Se),[Dt,un]=Ie(lt),Xt=(0,Ze.Z)(ke,["prefixCls"]),$t=De()(lt,`${lt}-element`,{[`${lt}-active`]:qe,[`${lt}-block`]:Ue},nt,Pt,un);return Dt(_e.createElement("div",{className:$t},_e.createElement(Be,Object.assign({prefixCls:`${lt}-button`,size:St},Xt))))};const je="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 Qe=ke=>{const{prefixCls:Se,className:nt,rootClassName:Pt,style:qe,active:Ue}=ke,{getPrefixCls:St}=_e.useContext(Ct.E_),vt=St("skeleton",Se),[lt,Dt]=Ie(vt),un=De()(vt,`${vt}-element`,{[`${vt}-active`]:Ue},nt,Pt,Dt);return lt(_e.createElement("div",{className:un},_e.createElement("div",{className:De()(`${vt}-image`,nt),style:qe},_e.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${vt}-image-svg`},_e.createElement("path",{d:je,className:`${vt}-image-path`})))))},Nt=ke=>{const{prefixCls:Se,className:nt,rootClassName:Pt,active:qe,block:Ue,size:St="default"}=ke,{getPrefixCls:vt}=_e.useContext(Ct.E_),lt=vt("skeleton",Se),[Dt,un]=Ie(lt),Xt=(0,Ze.Z)(ke,["prefixCls"]),$t=De()(lt,`${lt}-element`,{[`${lt}-active`]:qe,[`${lt}-block`]:Ue},nt,Pt,un);return Dt(_e.createElement("div",{className:$t},_e.createElement(Be,Object.assign({prefixCls:`${lt}-input`,size:St},Xt))))},At=ve(96663),Zt={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"},Yt=Zt,ut=ve(7657),Ge=function(Se,nt){return _e.createElement(ut.Z,(0,At.Z)({},Se,{ref:nt,icon:Yt}))},kt=_e.forwardRef(Ge),ln=kt,Bt=ke=>{const{prefixCls:Se,className:nt,rootClassName:Pt,style:qe,active:Ue,children:St}=ke,{getPrefixCls:vt}=_e.useContext(Ct.E_),lt=vt("skeleton",Se),[Dt,un]=Ie(lt),Xt=De()(lt,`${lt}-element`,{[`${lt}-active`]:Ue},un,nt,Pt),$t=St!=null?St:_e.createElement(ln,null);return Dt(_e.createElement("div",{className:Xt},_e.createElement("div",{className:De()(`${lt}-image`,nt),style:qe},$t)))},Gt=ve(19127),Bn=ke=>{const Se=vt=>{const{width:lt,rows:Dt=2}=ke;if(Array.isArray(lt))return lt[vt];if(Dt-1===vt)return lt},{prefixCls:nt,className:Pt,style:qe,rows:Ue}=ke,St=(0,Gt.Z)(Array(Ue)).map((vt,lt)=>_e.createElement("li",{key:lt,style:{width:Se(lt)}}));return _e.createElement("ul",{className:De()(nt,Pt),style:qe},St)},Cn=ke=>{let{prefixCls:Se,className:nt,width:Pt,style:qe}=ke;return _e.createElement("h3",{className:De()(Se,nt),style:Object.assign({width:Pt},qe)})};function ft(ke){return ke&&typeof ke=="object"?ke:{}}function En(ke,Se){return ke&&!Se?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function Vn(ke,Se){return!ke&&Se?{width:"38%"}:ke&&Se?{width:"50%"}:{}}function Re(ke,Se){const nt={};return(!ke||!Se)&&(nt.width="61%"),!ke&&Se?nt.rows=3:nt.rows=2,nt}const Ce=ke=>{const{prefixCls:Se,loading:nt,className:Pt,rootClassName:qe,style:Ue,children:St,avatar:vt=!1,title:lt=!0,paragraph:Dt=!0,active:un,round:Xt}=ke,{getPrefixCls:$t,direction:wn,skeleton:bn}=_e.useContext(Ct.E_),pn=$t("skeleton",Se),[Yn,ai]=Ie(pn);if(nt||!("loading"in ke)){const Wn=!!vt,Rn=!!lt,ii=!!Dt;let pi;if(Wn){const Ji=Object.assign(Object.assign({prefixCls:`${pn}-avatar`},En(Rn,ii)),ft(vt));pi=_e.createElement("div",{className:`${pn}-header`},_e.createElement(Be,Object.assign({},Ji)))}let gi;if(Rn||ii){let Ji;if(Rn){const $n=Object.assign(Object.assign({prefixCls:`${pn}-title`},Vn(Wn,ii)),ft(lt));Ji=_e.createElement(Cn,Object.assign({},$n))}let Un;if(ii){const $n=Object.assign(Object.assign({prefixCls:`${pn}-paragraph`},Re(Wn,Rn)),ft(Dt));Un=_e.createElement(Bn,Object.assign({},$n))}gi=_e.createElement("div",{className:`${pn}-content`},Ji,Un)}const Ri=De()(pn,{[`${pn}-with-avatar`]:Wn,[`${pn}-active`]:un,[`${pn}-rtl`]:wn==="rtl",[`${pn}-round`]:Xt},bn==null?void 0:bn.className,Pt,qe,ai);return Yn(_e.createElement("div",{className:Ri,style:Object.assign(Object.assign({},bn==null?void 0:bn.style),Ue)},pi,gi))}return typeof St!="undefined"?St:null};Ce.Button=gt,Ce.Avatar=et,Ce.Input=Nt,Ce.Image=Qe,Ce.Node=Bt;var Pe=Ce,Ne=Pe},81327:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return he}});var ce=ve(59301),De=ve(92310),_e=ve.n(De),Ct=ve(11592),Ze=ve(36355),Ke=ve(33234);const Be=ce.createContext({latestIndex:0}),mt=Be.Provider;var He=se=>{let{className:de,index:me,children:we,split:be,style:Me}=se;const{latestIndex:Ie}=ce.useContext(Be);return we==null?null:ce.createElement(ce.Fragment,null,ce.createElement("div",{className:de,style:Me},we),me<Ie&&be&&ce.createElement("span",{className:`${de}-split`},be))},Et=ve(2856);function ht(se){return["small","middle","large"].includes(se)}function dt(se){return se?typeof se=="number"&&!Number.isNaN(se):!1}var Ae=function(se,de){var me={};for(var we in se)Object.prototype.hasOwnProperty.call(se,we)&&de.indexOf(we)<0&&(me[we]=se[we]);if(se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var be=0,we=Object.getOwnPropertySymbols(se);be<we.length;be++)de.indexOf(we[be])<0&&Object.prototype.propertyIsEnumerable.call(se,we[be])&&(me[we[be]]=se[we[be]]);return me};const ee=ce.forwardRef((se,de)=>{var me,we;const{getPrefixCls:be,space:Me,direction:Ie}=ce.useContext(Ze.E_),{size:ze=(Me==null?void 0:Me.size)||"small",align:et,className:$e,rootClassName:gt,children:je,direction:Tt="horizontal",prefixCls:Qe,split:bt,style:Nt,wrap:At=!1,classNames:Zt,styles:Yt}=se,ut=Ae(se,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[Ge,kt]=Array.isArray(ze)?ze:[ze,ze],ln=ht(kt),sn=ht(Ge),Bt=dt(kt),Gt=dt(Ge),en=(0,Ct.Z)(je,{keepEmpty:!0}),Bn=et===void 0&&Tt==="horizontal"?"center":et,rn=be("space",Qe),[Cn,ft]=(0,Et.Z)(rn),En=_e()(rn,Me==null?void 0:Me.className,ft,`${rn}-${Tt}`,{[`${rn}-rtl`]:Ie==="rtl",[`${rn}-align-${Bn}`]:Bn,[`${rn}-gap-row-${kt}`]:ln,[`${rn}-gap-col-${Ge}`]:sn},$e,gt),Vn=_e()(`${rn}-item`,(me=Zt==null?void 0:Zt.item)!==null&&me!==void 0?me:(we=Me==null?void 0:Me.classNames)===null||we===void 0?void 0:we.item);let Re=0;const Ce=en.map((ke,Se)=>{var nt,Pt;ke!=null&&(Re=Se);const qe=ke&&ke.key||`${Vn}-${Se}`;return ce.createElement(He,{className:Vn,key:qe,index:Se,split:bt,style:(nt=Yt==null?void 0:Yt.item)!==null&&nt!==void 0?nt:(Pt=Me==null?void 0:Me.styles)===null||Pt===void 0?void 0:Pt.item},ke)}),Pe=ce.useMemo(()=>({latestIndex:Re}),[Re]);if(en.length===0)return null;const Ne={};return At&&(Ne.flexWrap="wrap"),!sn&&Gt&&(Ne.columnGap=Ge),!ln&&Bt&&(Ne.rowGap=kt),Cn(ce.createElement("div",Object.assign({ref:de,className:En,style:Object.assign(Object.assign(Object.assign({},Ne),Me==null?void 0:Me.style),Nt)},ut),ce.createElement(mt,{value:Pe},Ce)))});ee.Compact=Ke.ZP;var he=ee},31797:function(Pn,an,ve){"use strict";ve.d(an,{default:function(){return Ie}});var ce=ve(59301),De=ve(56762),_e=ve(92343),Ct=ve(92310),Ze=ve.n(Ct),Ke=ve(36355),Be=ve(61621),ct=ze=>{const{value:et,formatter:$e,precision:gt,decimalSeparator:je,groupSeparator:Tt="",prefixCls:Qe}=ze;let bt;if(typeof $e=="function")bt=$e(et);else{const Nt=String(et),At=Nt.match(/^(-?)(\d*)(\.(\d+))?$/);if(!At||Nt==="-")bt=Nt;else{const Zt=At[1];let Yt=At[2]||"0",ut=At[4]||"";Yt=Yt.replace(/\B(?=(\d{3})+(?!\d))/g,Tt),typeof gt=="number"&&(ut=ut.padEnd(gt,"0").slice(0,gt>0?gt:0)),ut&&(ut=`${je}${ut}`),bt=[ce.createElement("span",{key:"int",className:`${Qe}-content-value-int`},Zt,Yt),ut&&ce.createElement("span",{key:"decimal",className:`${Qe}-content-value-decimal`},ut)]}}return ce.createElement("span",{className:`${Qe}-content-value`},bt)},He=ve(17313),Et=ve(83116),ht=ve(37613);const dt=ze=>{const{componentCls:et,marginXXS:$e,padding:gt,colorTextDescription:je,titleFontSize:Tt,colorTextHeading:Qe,contentFontSize:bt,fontFamily:Nt}=ze;return{[`${et}`]:Object.assign(Object.assign({},(0,He.Wf)(ze)),{[`${et}-title`]:{marginBottom:$e,color:je,fontSize:Tt},[`${et}-skeleton`]:{paddingTop:gt},[`${et}-content`]:{color:Qe,fontSize:bt,fontFamily:Nt,[`${et}-content-value`]:{display:"inline-block",direction:"ltr"},[`${et}-content-prefix, ${et}-content-suffix`]:{display:"inline-block"},[`${et}-content-prefix`]:{marginInlineEnd:$e},[`${et}-content-suffix`]:{marginInlineStart:$e}}})}};var Ae=(0,Et.Z)("Statistic",ze=>{const et=(0,ht.TS)(ze,{});return[dt(et)]},ze=>{const{fontSizeHeading3:et,fontSize:$e}=ze;return{titleFontSize:$e,contentFontSize:et}}),ee=ze=>{const{prefixCls:et,className:$e,rootClassName:gt,style:je,valueStyle:Tt,value:Qe=0,title:bt,valueRender:Nt,prefix:At,suffix:Zt,loading:Yt=!1,onMouseEnter:ut,onMouseLeave:Ge,decimalSeparator:kt=".",groupSeparator:ln=","}=ze,{getPrefixCls:sn,direction:Bt,statistic:Gt}=ce.useContext(Ke.E_),en=sn("statistic",et),[Bn,rn]=Ae(en),Cn=ce.createElement(ct,Object.assign({decimalSeparator:kt,groupSeparator:ln,prefixCls:en},ze,{value:Qe})),ft=Ze()(en,{[`${en}-rtl`]:Bt==="rtl"},Gt==null?void 0:Gt.className,$e,gt,rn);return Bn(ce.createElement("div",{className:ft,style:Object.assign(Object.assign({},Gt==null?void 0:Gt.style),je),onMouseEnter:ut,onMouseLeave:Ge},bt&&ce.createElement("div",{className:`${en}-title`},bt),ce.createElement(Be.Z,{paragraph:!1,loading:Yt,className:`${en}-skeleton`},ce.createElement("div",{style:Tt,className:`${en}-content`},At&&ce.createElement("span",{className:`${en}-content-prefix`},At),Nt?Nt(Cn):Cn,Zt&&ce.createElement("span",{className:`${en}-content-suffix`},Zt)))))};const he=[["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(ze,et){let $e=ze;const gt=/\[[^\]]*]/g,je=(et.match(gt)||[]).map(Nt=>Nt.slice(1,-1)),Tt=et.replace(gt,"[]"),Qe=he.reduce((Nt,At)=>{let[Zt,Yt]=At;if(Nt.includes(Zt)){const ut=Math.floor($e/Yt);return $e-=ut*Yt,Nt.replace(new RegExp(`${Zt}+`,"g"),Ge=>{const kt=Ge.length;return ut.toString().padStart(kt,"0")})}return Nt},Tt);let bt=0;return Qe.replace(gt,()=>{const Nt=je[bt];return bt+=1,Nt})}function de(ze,et){const{format:$e=""}=et,gt=new Date(ze).getTime(),je=Date.now(),Tt=Math.max(gt-je,0);return se(Tt,$e)}const me=1e3/30;function we(ze){return new Date(ze).getTime()}const be=ze=>{const{value:et,format:$e="HH:mm:ss",onChange:gt,onFinish:je}=ze,Tt=(0,De.Z)(),Qe=ce.useRef(null),bt=()=>{je==null||je(),Qe.current&&(clearInterval(Qe.current),Qe.current=null)},Nt=()=>{const Yt=we(et);Yt>=Date.now()&&(Qe.current=setInterval(()=>{Tt(),gt==null||gt(Yt-Date.now()),Yt<Date.now()&&bt()},me))};ce.useEffect(()=>(Nt(),()=>{Qe.current&&(clearInterval(Qe.current),Qe.current=null)}),[et]);const At=(Yt,ut)=>de(Yt,Object.assign(Object.assign({},ut),{format:$e})),Zt=Yt=>(0,_e.Tm)(Yt,{title:void 0});return ce.createElement(ee,Object.assign({},ze,{valueRender:Zt,formatter:At}))};var Me=ce.memo(be);ee.Countdown=Me;var Ie=ee},15969:function(Pn,an,ve){"use strict";ve.d(an,{N:function(){return ce}});const ce=De=>({color:De.colorLink,textDecoration:"none",outline:"none",cursor:"pointer",transition:`color ${De.motionDurationSlow}`,"&:focus, &:hover":{color:De.colorLinkHover},"&:active":{color:De.colorLinkActive}})},78673:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return Tt}});var ce=ve(58617),De=ve(92310),_e=ve.n(De),Ct=ve(96663),Ze=ve(90493),Ke=ve(72071),Be=ve(6620),mt=ve(59301),ct=ve(18929),He=ve(10228),Et=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],ht=mt.forwardRef(function(Qe,bt){var Nt,At=Qe.prefixCls,Zt=At===void 0?"rc-switch":At,Yt=Qe.className,ut=Qe.checked,Ge=Qe.defaultChecked,kt=Qe.disabled,ln=Qe.loadingIcon,sn=Qe.checkedChildren,Bt=Qe.unCheckedChildren,Gt=Qe.onClick,en=Qe.onChange,Bn=Qe.onKeyDown,rn=(0,Be.Z)(Qe,Et),Cn=(0,ct.Z)(!1,{value:ut,defaultValue:Ge}),ft=(0,Ke.Z)(Cn,2),En=ft[0],Vn=ft[1];function Re(ke,Se){var nt=En;return kt||(nt=ke,Vn(nt),en==null||en(nt,Se)),nt}function Ce(ke){ke.which===He.Z.LEFT?Re(!1,ke):ke.which===He.Z.RIGHT&&Re(!0,ke),Bn==null||Bn(ke)}function Pe(ke){var Se=Re(!En,ke);Gt==null||Gt(Se,ke)}var Ne=_e()(Zt,Yt,(Nt={},(0,Ze.Z)(Nt,"".concat(Zt,"-checked"),En),(0,Ze.Z)(Nt,"".concat(Zt,"-disabled"),kt),Nt));return mt.createElement("button",(0,Ct.Z)({},rn,{type:"button",role:"switch","aria-checked":En,disabled:kt,className:Ne,ref:bt,onKeyDown:Ce,onClick:Pe}),ln,mt.createElement("span",{className:"".concat(Zt,"-inner")},mt.createElement("span",{className:"".concat(Zt,"-inner-checked")},sn),mt.createElement("span",{className:"".concat(Zt,"-inner-unchecked")},Bt)))});ht.displayName="Switch";var dt=ht,Ae=ve(14088),te=ve(36355),ee=ve(1684),he=ve(19716),se=ve(64993),de=ve(17313),me=ve(83116),we=ve(37613);const be=Qe=>{const{componentCls:bt,trackHeightSM:Nt,trackPadding:At,trackMinWidthSM:Zt,innerMinMarginSM:Yt,innerMaxMarginSM:ut,handleSizeSM:Ge}=Qe,kt=`${bt}-inner`;return{[bt]:{[`&${bt}-small`]:{minWidth:Zt,height:Nt,lineHeight:`${Nt}px`,[`${bt}-inner`]:{paddingInlineStart:ut,paddingInlineEnd:Yt,[`${kt}-checked`]:{marginInlineStart:`calc(-100% + ${Ge+At*2}px - ${ut*2}px)`,marginInlineEnd:`calc(100% - ${Ge+At*2}px + ${ut*2}px)`},[`${kt}-unchecked`]:{marginTop:-Nt,marginInlineStart:0,marginInlineEnd:0}},[`${bt}-handle`]:{width:Ge,height:Ge},[`${bt}-loading-icon`]:{top:(Ge-Qe.switchLoadingIconSize)/2,fontSize:Qe.switchLoadingIconSize},[`&${bt}-checked`]:{[`${bt}-inner`]:{paddingInlineStart:Yt,paddingInlineEnd:ut,[`${kt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${kt}-unchecked`]:{marginInlineStart:`calc(100% - ${Ge+At*2}px + ${ut*2}px)`,marginInlineEnd:`calc(-100% + ${Ge+At*2}px - ${ut*2}px)`}},[`${bt}-handle`]:{insetInlineStart:`calc(100% - ${Ge+At}px)`}},[`&:not(${bt}-disabled):active`]:{[`&:not(${bt}-checked) ${kt}`]:{[`${kt}-unchecked`]:{marginInlineStart:Qe.marginXXS/2,marginInlineEnd:-Qe.marginXXS/2}},[`&${bt}-checked ${kt}`]:{[`${kt}-checked`]:{marginInlineStart:-Qe.marginXXS/2,marginInlineEnd:Qe.marginXXS/2}}}}}}},Me=Qe=>{const{componentCls:bt,handleSize:Nt}=Qe;return{[bt]:{[`${bt}-loading-icon${Qe.iconCls}`]:{position:"relative",top:(Nt-Qe.fontSize)/2,color:Qe.switchLoadingIconColor,verticalAlign:"top"},[`&${bt}-checked ${bt}-loading-icon`]:{color:Qe.switchColor}}}},Ie=Qe=>{const{componentCls:bt,motion:Nt,trackPadding:At,handleBg:Zt,handleShadow:Yt,handleSize:ut}=Qe,Ge=`${bt}-handle`;return{[bt]:{[Ge]:{position:"absolute",top:At,insetInlineStart:At,width:ut,height:ut,transition:`all ${Qe.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:Zt,borderRadius:ut/2,boxShadow:Yt,transition:`all ${Qe.switchDuration} ease-in-out`,content:'""'}},[`&${bt}-checked ${Ge}`]:{insetInlineStart:`calc(100% - ${ut+At}px)`},[`&:not(${bt}-disabled):active`]:Nt?{[`${Ge}::before`]:{insetInlineEnd:Qe.switchHandleActiveInset,insetInlineStart:0},[`&${bt}-checked ${Ge}::before`]:{insetInlineEnd:0,insetInlineStart:Qe.switchHandleActiveInset}}:{}}}},ze=Qe=>{const{componentCls:bt,trackHeight:Nt,trackPadding:At,innerMinMargin:Zt,innerMaxMargin:Yt,handleSize:ut}=Qe,Ge=`${bt}-inner`;return{[bt]:{[Ge]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:Yt,paddingInlineEnd:Zt,transition:`padding-inline-start ${Qe.switchDuration} ease-in-out, padding-inline-end ${Qe.switchDuration} ease-in-out`,[`${Ge}-checked, ${Ge}-unchecked`]:{display:"block",color:Qe.colorTextLightSolid,fontSize:Qe.fontSizeSM,transition:`margin-inline-start ${Qe.switchDuration} ease-in-out, margin-inline-end ${Qe.switchDuration} ease-in-out`,pointerEvents:"none"},[`${Ge}-checked`]:{marginInlineStart:`calc(-100% + ${ut+At*2}px - ${Yt*2}px)`,marginInlineEnd:`calc(100% - ${ut+At*2}px + ${Yt*2}px)`},[`${Ge}-unchecked`]:{marginTop:-Nt,marginInlineStart:0,marginInlineEnd:0}},[`&${bt}-checked ${Ge}`]:{paddingInlineStart:Zt,paddingInlineEnd:Yt,[`${Ge}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Ge}-unchecked`]:{marginInlineStart:`calc(100% - ${ut+At*2}px + ${Yt*2}px)`,marginInlineEnd:`calc(-100% + ${ut+At*2}px - ${Yt*2}px)`}},[`&:not(${bt}-disabled):active`]:{[`&:not(${bt}-checked) ${Ge}`]:{[`${Ge}-unchecked`]:{marginInlineStart:At*2,marginInlineEnd:-At*2}},[`&${bt}-checked ${Ge}`]:{[`${Ge}-checked`]:{marginInlineStart:-At*2,marginInlineEnd:At*2}}}}}},et=Qe=>{const{componentCls:bt,trackHeight:Nt,trackMinWidth:At}=Qe;return{[bt]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,de.Wf)(Qe)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:At,height:Nt,lineHeight:`${Nt}px`,verticalAlign:"middle",background:Qe.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${Qe.motionDurationMid}`,userSelect:"none",[`&:hover:not(${bt}-disabled)`]:{background:Qe.colorTextTertiary}}),(0,de.Qy)(Qe)),{[`&${bt}-checked`]:{background:Qe.switchColor,[`&:hover:not(${bt}-disabled)`]:{background:Qe.colorPrimaryHover}},[`&${bt}-loading, &${bt}-disabled`]:{cursor:"not-allowed",opacity:Qe.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${bt}-rtl`]:{direction:"rtl"}})}};var $e=(0,me.Z)("Switch",Qe=>{const bt=(0,we.TS)(Qe,{switchDuration:Qe.motionDurationMid,switchColor:Qe.colorPrimary,switchDisabledOpacity:Qe.opacityLoading,switchLoadingIconSize:Qe.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${Qe.opacityLoading})`,switchHandleActiveInset:"-30%"});return[et(bt),ze(bt),Ie(bt),Me(bt),be(bt)]},Qe=>{const{fontSize:bt,lineHeight:Nt,controlHeight:At,colorWhite:Zt}=Qe,Yt=bt*Nt,ut=At/2,Ge=2,kt=Yt-Ge*2,ln=ut-Ge*2;return{trackHeight:Yt,trackHeightSM:ut,trackMinWidth:kt*2+Ge*4,trackMinWidthSM:ln*2+Ge*2,trackPadding:Ge,handleBg:Zt,handleSize:kt,handleSizeSM:ln,handleShadow:`0 2px 4px 0 ${new se.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:kt/2,innerMaxMargin:kt+Ge+Ge*2,innerMinMarginSM:ln/2,innerMaxMarginSM:ln+Ge+Ge*2}}),gt=function(Qe,bt){var Nt={};for(var At in Qe)Object.prototype.hasOwnProperty.call(Qe,At)&&bt.indexOf(At)<0&&(Nt[At]=Qe[At]);if(Qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Zt=0,At=Object.getOwnPropertySymbols(Qe);Zt<At.length;Zt++)bt.indexOf(At[Zt])<0&&Object.prototype.propertyIsEnumerable.call(Qe,At[Zt])&&(Nt[At[Zt]]=Qe[At[Zt]]);return Nt};const je=mt.forwardRef((Qe,bt)=>{const{prefixCls:Nt,size:At,disabled:Zt,loading:Yt,className:ut,rootClassName:Ge,style:kt}=Qe,ln=gt(Qe,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:sn,direction:Bt,switch:Gt}=mt.useContext(te.E_),en=mt.useContext(ee.Z),Bn=(Zt!=null?Zt:en)||Yt,rn=sn("switch",Nt),Cn=mt.createElement("div",{className:`${rn}-handle`},Yt&&mt.createElement(ce.Z,{className:`${rn}-loading-icon`})),[ft,En]=$e(rn),Vn=(0,he.Z)(At),Re=_e()(Gt==null?void 0:Gt.className,{[`${rn}-small`]:Vn==="small",[`${rn}-loading`]:Yt,[`${rn}-rtl`]:Bt==="rtl"},ut,Ge,En),Ce=Object.assign(Object.assign({},Gt==null?void 0:Gt.style),kt);return ft(mt.createElement(Ae.Z,{component:"Switch"},mt.createElement(dt,Object.assign({},ln,{prefixCls:rn,className:Re,style:Ce,disabled:Bn,ref:bt,loadingIcon:Cn}))))});je.__ANT_SWITCH=!0;var Tt=je},1710:function(Pn,an,ve){"use strict";ve.d(an,{default:function(){return Jo}});var ce={},De="rc-table-internal-hook",_e=ve(72071),Ct=ve(6089),Ze=ve(34280),Ke=ve(13697),Be=ve(59301),mt=ve(4676);function ct(Je){var Ye=Be.createContext(void 0),jt=function(nn){var Ht=nn.value,Mn=nn.children,Sn=Be.useRef(Ht);Sn.current=Ht;var Fn=Be.useState(function(){return{getValue:function(){return Sn.current},listeners:new Set}}),Qn=(0,_e.Z)(Fn,1),kn=Qn[0];return(0,Ze.Z)(function(){(0,mt.unstable_batchedUpdates)(function(){kn.listeners.forEach(function(Jn){Jn(Ht)})})},[Ht]),Be.createElement(Ye.Provider,{value:kn},Mn)};return{Context:Ye,Provider:jt,defaultValue:Je}}function He(Je,Ye){var jt=(0,Ct.Z)(typeof Ye=="function"?Ye:function(Jn){if(Ye===void 0)return Jn;if(!Array.isArray(Ye))return Jn[Ye];var ki={};return Ye.forEach(function(wi){ki[wi]=Jn[wi]}),ki}),zt=Be.useContext(Je==null?void 0:Je.Context),nn=zt||{},Ht=nn.listeners,Mn=nn.getValue,Sn=Be.useRef();Sn.current=jt(zt?Mn():Je==null?void 0:Je.defaultValue);var Fn=Be.useState({}),Qn=(0,_e.Z)(Fn,2),kn=Qn[1];return(0,Ze.Z)(function(){if(!zt)return;function Jn(ki){var wi=jt(ki);(0,Ke.Z)(Sn.current,wi,!0)||kn({})}return Ht.add(Jn),function(){Ht.delete(Jn)}},[zt]),Sn.current}var Et=ve(96663),ht=ve(8654);function dt(){var Je=Be.createContext(null);function Ye(){return Be.useContext(Je)}function jt(nn,Ht){var Mn=(0,ht.Yr)(nn),Sn=function(Qn,kn){var Jn=Mn?{ref:kn}:{},ki=Be.useRef(0),wi=Be.useRef(Qn),yi=Ye();return yi!==null?Be.createElement(nn,(0,Et.Z)({},Qn,Jn)):((!Ht||Ht(wi.current,Qn))&&(ki.current+=1),wi.current=Qn,Be.createElement(Je.Provider,{value:ki.current},Be.createElement(nn,(0,Et.Z)({},Qn,Jn))))};return Mn?Be.forwardRef(Sn):Sn}function zt(nn,Ht){var Mn=(0,ht.Yr)(nn),Sn=function(Qn,kn){var Jn=Mn?{ref:kn}:{};return Ye(),Be.createElement(nn,(0,Et.Z)({},Qn,Jn))};return Mn?Be.memo(Be.forwardRef(Sn),Ht):Be.memo(Sn,Ht)}return{makeImmutable:jt,responseImmutable:zt,useImmutableMark:Ye}}var Ae=dt(),te=Ae.makeImmutable,ee=Ae.responseImmutable,he=Ae.useImmutableMark,se=dt(),de=se.makeImmutable,me=se.responseImmutable,we=se.useImmutableMark,be=ct(),Me=be;function Ie(Je,Ye){var jt=Be.useRef(0);jt.current+=1;var zt=Be.useRef(Je),nn=[];Object.keys(Je||{}).map(function(Mn){var Sn;(Je==null?void 0:Je[Mn])!==((Sn=zt.current)===null||Sn===void 0?void 0:Sn[Mn])&&nn.push(Mn)}),zt.current=Je;var Ht=Be.useRef([]);return nn.length&&(Ht.current=nn),Be.useDebugValue(jt.current),Be.useDebugValue(Ht.current.join(", ")),Ye&&console.log("".concat(Ye,":"),jt.current,Ht.current),jt.current}var ze=null,et=Be.memo(function(){var Je=Ie();return Be.createElement("h1",null,"Render Times: ",Je)});et.displayName="RenderBlock";var $e=ve(20135),gt=ve(44127),je=ve(90493),Tt=ve(92310),Qe=ve.n(Tt),bt=ve(80547),Nt=ve(97938),At=ve(48736),Zt=Be.createContext({renderWithProps:!1}),Yt=Zt,ut="RC_TABLE_KEY";function Ge(Je){return Je==null?[]:Array.isArray(Je)?Je:[Je]}function kt(Je){var Ye=[],jt={};return Je.forEach(function(zt){for(var nn=zt||{},Ht=nn.key,Mn=nn.dataIndex,Sn=Ht||Ge(Mn).join("-")||ut;jt[Sn];)Sn="".concat(Sn,"_next");jt[Sn]=!0,Ye.push(Sn)}),Ye}function ln(Je){return Je!=null}function sn(Je){return Je&&(0,$e.Z)(Je)==="object"&&!Array.isArray(Je)&&!Be.isValidElement(Je)}function Bt(Je,Ye,jt,zt,nn,Ht){var Mn=Be.useContext(Yt),Sn=we(),Fn=(0,bt.Z)(function(){if(ln(zt))return[zt];var Qn=Ye==null||Ye===""?[]:Array.isArray(Ye)?Ye:[Ye],kn=(0,Nt.Z)(Je,Qn),Jn=kn,ki=void 0;if(nn){var wi=nn(kn,Je,jt);sn(wi)?(Jn=wi.children,ki=wi.props,Mn.renderWithProps=!0):Jn=wi}return[Jn,ki]},[Sn,Je,zt,Ye,nn,jt],function(Qn,kn){if(Ht){var Jn=(0,_e.Z)(Qn,2),ki=Jn[1],wi=(0,_e.Z)(kn,2),yi=wi[1];return Ht(yi,ki)}return Mn.renderWithProps?!0:!(0,Ke.Z)(Qn,kn,!0)});return Fn}function Gt(Je,Ye,jt,zt){var nn=Je+Ye-1;return Je<=zt&&nn>=jt}function en(Je,Ye){return He(Me,function(jt){var zt=Gt(Je,Ye||1,jt.hoverStartRow,jt.hoverEndRow);return[zt,jt.onHover]})}var Bn=function(Ye){var jt=Ye.ellipsis,zt=Ye.rowType,nn=Ye.children,Ht,Mn=jt===!0?{showTitle:!0}:jt;return Mn&&(Mn.showTitle||zt==="header")&&(typeof nn=="string"||typeof nn=="number"?Ht=nn.toString():Be.isValidElement(nn)&&typeof nn.props.children=="string"&&(Ht=nn.props.children)),Ht};function rn(Je){var Ye,jt,zt,nn,Ht,Mn,Sn,Fn,Qn=Je.component,kn=Je.children,Jn=Je.ellipsis,ki=Je.scope,wi=Je.prefixCls,yi=Je.className,ar=Je.align,Mi=Je.record,Ui=Je.render,Yi=Je.dataIndex,wr=Je.renderIndex,Xr=Je.shouldCellUpdate,so=Je.index,pr=Je.rowType,Ur=Je.colSpan,zo=Je.rowSpan,Pr=Je.fixLeft,Wr=Je.fixRight,xr=Je.firstFixLeft,Ki=Je.lastFixLeft,Fr=Je.firstFixRight,no=Je.lastFixRight,xo=Je.appendNode,Eo=Je.additionalProps,mr=Eo===void 0?{}:Eo,Ho=Je.isSticky,Vo="".concat(wi,"-cell"),wa=He(Me,["supportSticky","allColumnsFixedLeft"]),sa=wa.supportSticky,os=wa.allColumnsFixedLeft,ts=Bt(Mi,Yi,wr,kn,Ui,Xr),$o=(0,_e.Z)(ts,2),oo=$o[0],pa=$o[1],as={},Va=typeof Pr=="number"&&sa,Ms=typeof Wr=="number"&&sa;Va&&(as.position="sticky",as.left=Pr),Ms&&(as.position="sticky",as.right=Wr);var bo=(Ye=(jt=(zt=pa==null?void 0:pa.colSpan)!==null&&zt!==void 0?zt:mr.colSpan)!==null&&jt!==void 0?jt:Ur)!==null&&Ye!==void 0?Ye:1,mo=(nn=(Ht=(Mn=pa==null?void 0:pa.rowSpan)!==null&&Mn!==void 0?Mn:mr.rowSpan)!==null&&Ht!==void 0?Ht:zo)!==null&&nn!==void 0?nn:1,Mo=en(so,mo),qr=(0,_e.Z)(Mo,2),ya=qr[0],eo=qr[1],_o=function(ws){var Rs;Mi&&eo(so,so+mo-1),mr==null||(Rs=mr.onMouseEnter)===null||Rs===void 0||Rs.call(mr,ws)},ha=function(ws){var Rs;Mi&&eo(-1,-1),mr==null||(Rs=mr.onMouseLeave)===null||Rs===void 0||Rs.call(mr,ws)};if(bo===0||mo===0)return null;var ca=(Sn=mr.title)!==null&&Sn!==void 0?Sn:Bn({rowType:pr,ellipsis:Jn,children:oo}),Vs=Qe()(Vo,yi,(Fn={},(0,je.Z)(Fn,"".concat(Vo,"-fix-left"),Va&&sa),(0,je.Z)(Fn,"".concat(Vo,"-fix-left-first"),xr&&sa),(0,je.Z)(Fn,"".concat(Vo,"-fix-left-last"),Ki&&sa),(0,je.Z)(Fn,"".concat(Vo,"-fix-left-all"),Ki&&os&&sa),(0,je.Z)(Fn,"".concat(Vo,"-fix-right"),Ms&&sa),(0,je.Z)(Fn,"".concat(Vo,"-fix-right-first"),Fr&&sa),(0,je.Z)(Fn,"".concat(Vo,"-fix-right-last"),no&&sa),(0,je.Z)(Fn,"".concat(Vo,"-ellipsis"),Jn),(0,je.Z)(Fn,"".concat(Vo,"-with-append"),xo),(0,je.Z)(Fn,"".concat(Vo,"-fix-sticky"),(Va||Ms)&&Ho&&sa),(0,je.Z)(Fn,"".concat(Vo,"-row-hover"),!pa&&ya),Fn),mr.className,pa==null?void 0:pa.className),Ns={};ar&&(Ns.textAlign=ar);var hl=(0,gt.Z)((0,gt.Z)((0,gt.Z)((0,gt.Z)({},as),mr.style),Ns),pa==null?void 0:pa.style),Ca=oo;return(0,$e.Z)(Ca)==="object"&&!Array.isArray(Ca)&&!Be.isValidElement(Ca)&&(Ca=null),Jn&&(Ki||Fr)&&(Ca=Be.createElement("span",{className:"".concat(Vo,"-content")},Ca)),Be.createElement(Qn,(0,Et.Z)({},pa,mr,{className:Vs,style:hl,title:ca,scope:ki,onMouseEnter:_o,onMouseLeave:ha,colSpan:bo!==1?bo:null,rowSpan:mo!==1?mo:null}),xo,Ca)}var Cn=Be.memo(rn);function ft(Je,Ye,jt,zt,nn,Ht){var Mn=jt[Je]||{},Sn=jt[Ye]||{},Fn,Qn;Mn.fixed==="left"?Fn=zt.left[nn==="rtl"?Ye:Je]:Sn.fixed==="right"&&(Qn=zt.right[nn==="rtl"?Je:Ye]);var kn=!1,Jn=!1,ki=!1,wi=!1,yi=jt[Ye+1],ar=jt[Je-1],Mi=!(Ht!=null&&Ht.children);if(nn==="rtl"){if(Fn!==void 0){var Ui=ar&&ar.fixed==="left";wi=!Ui&&Mi}else if(Qn!==void 0){var Yi=yi&&yi.fixed==="right";ki=!Yi&&Mi}}else if(Fn!==void 0){var wr=yi&&yi.fixed==="left";kn=!wr&&Mi}else if(Qn!==void 0){var Xr=ar&&ar.fixed==="right";Jn=!Xr&&Mi}return{fixLeft:Fn,fixRight:Qn,lastFixLeft:kn,firstFixRight:Jn,lastFixRight:ki,firstFixLeft:wi,isSticky:zt.isSticky}}var En=Be.createContext({}),Vn=En;function Re(Je){var Ye=Je.className,jt=Je.index,zt=Je.children,nn=Je.colSpan,Ht=nn===void 0?1:nn,Mn=Je.rowSpan,Sn=Je.align,Fn=He(Me,["prefixCls","direction"]),Qn=Fn.prefixCls,kn=Fn.direction,Jn=Be.useContext(Vn),ki=Jn.scrollColumnIndex,wi=Jn.stickyOffsets,yi=Jn.flattenColumns,ar=Jn.columns,Mi=jt+Ht-1,Ui=Mi+1===ki?Ht+1:Ht,Yi=ft(jt,jt+Ui-1,yi,wi,kn,ar==null?void 0:ar[jt]);return Be.createElement(Cn,(0,Et.Z)({className:Ye,index:jt,component:"td",prefixCls:Qn,record:null,dataIndex:null,align:Sn,colSpan:Ui,rowSpan:Mn,render:function(){return zt}},Yi))}var Ce=ve(6620),Pe=["children"];function Ne(Je){var Ye=Je.children,jt=(0,Ce.Z)(Je,Pe);return Be.createElement("tr",jt,Ye)}function ke(Je){var Ye=Je.children;return Ye}ke.Row=Ne,ke.Cell=Re;var Se=ke;function nt(Je){var Ye=Je.children,jt=Je.stickyOffsets,zt=Je.flattenColumns,nn=Je.columns,Ht=He(Me,"prefixCls"),Mn=zt.length-1,Sn=zt[Mn],Fn=Be.useMemo(function(){return{stickyOffsets:jt,flattenColumns:zt,scrollColumnIndex:Sn!=null&&Sn.scrollbar?Mn:null,columns:nn}},[Sn,zt,Mn,jt,nn]);return Be.createElement(Vn.Provider,{value:Fn},Be.createElement("tfoot",{className:"".concat(Ht,"-summary")},Ye))}var Pt=me(nt),qe=Se,Ue=ve(70425),St=ve(29301),vt=ve(29194),lt=ve(24514),Dt=ve(75152),un=ve(26112);function Xt(Je,Ye,jt,zt,nn,Ht,Mn){Je.push({record:Ye,indent:jt,index:Mn});var Sn=Ht(Ye),Fn=nn==null?void 0:nn.has(Sn);if(Ye&&Array.isArray(Ye[zt])&&Fn)for(var Qn=0;Qn<Ye[zt].length;Qn+=1)Xt(Je,Ye[zt][Qn],jt+1,zt,nn,Ht,Qn)}function $t(Je,Ye,jt,zt){var nn=Be.useMemo(function(){if(jt!=null&&jt.size){for(var Ht=[],Mn=0;Mn<(Je==null?void 0:Je.length);Mn+=1){var Sn=Je[Mn];Xt(Ht,Sn,0,Ye,jt,zt,Mn)}return Ht}return Je==null?void 0:Je.map(function(Fn,Qn){return{record:Fn,indent:0,index:Qn}})},[Je,Ye,jt,zt]);return nn}function wn(Je){var Ye=Je.prefixCls,jt=Je.children,zt=Je.component,nn=Je.cellComponent,Ht=Je.className,Mn=Je.expanded,Sn=Je.colSpan,Fn=Je.isEmpty,Qn=He(Me,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),kn=Qn.scrollbarSize,Jn=Qn.fixHeader,ki=Qn.fixColumn,wi=Qn.componentWidth,yi=Qn.horizonScroll,ar=jt;return(Fn?yi&&wi:ki)&&(ar=Be.createElement("div",{style:{width:wi-(Jn?kn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ye,"-expanded-row-fixed")},ar)),Be.createElement(zt,{className:Ht,style:{display:Mn?null:"none"}},Be.createElement(Cn,{component:nn,prefixCls:Ye,colSpan:Sn},ar))}var bn=wn;function pn(Je,Ye,jt,zt){var nn=He(Me,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),Ht=nn.flattenColumns,Mn=nn.expandableType,Sn=nn.expandedKeys,Fn=nn.childrenColumnName,Qn=nn.onTriggerExpand,kn=nn.rowExpandable,Jn=nn.onRow,ki=nn.expandRowByClick,wi=nn.rowClassName,yi=Mn==="nest",ar=Mn==="row"&&(!kn||kn(Je)),Mi=ar||yi,Ui=Sn&&Sn.has(Ye),Yi=Fn&&Je&&Je[Fn],wr=(0,Ue.useEvent)(Qn),Xr=Jn==null?void 0:Jn(Je,jt),so=Xr==null?void 0:Xr.onClick,pr=function(Wr){ki&&Mi&&Qn(Je,Wr);for(var xr=arguments.length,Ki=new Array(xr>1?xr-1:0),Fr=1;Fr<xr;Fr++)Ki[Fr-1]=arguments[Fr];so==null||so.apply(void 0,[Wr].concat(Ki))},Ur;typeof wi=="string"?Ur=wi:typeof wi=="function"&&(Ur=wi(Je,jt,zt));var zo=kt(Ht);return(0,gt.Z)((0,gt.Z)({},nn),{},{columnsKey:zo,nestExpandable:yi,expanded:Ui,hasNestChildren:Yi,record:Je,onTriggerExpand:wr,rowSupportExpand:ar,expandable:Mi,rowProps:(0,gt.Z)((0,gt.Z)({},Xr),{},{className:Qe()(Ur,Xr==null?void 0:Xr.className),onClick:pr})})}function Yn(Je,Ye,jt,zt,nn){var Ht=Je.record,Mn=Je.prefixCls,Sn=Je.columnsKey,Fn=Je.fixedInfoList,Qn=Je.expandIconColumnIndex,kn=Je.nestExpandable,Jn=Je.indentSize,ki=Je.expandIcon,wi=Je.expanded,yi=Je.hasNestChildren,ar=Je.onTriggerExpand,Mi=Sn[jt],Ui=Fn[jt],Yi;jt===(Qn||0)&&kn&&(Yi=Be.createElement(Be.Fragment,null,Be.createElement("span",{style:{paddingLeft:"".concat(Jn*zt,"px")},className:"".concat(Mn,"-row-indent indent-level-").concat(zt)}),ki({prefixCls:Mn,expanded:wi,expandable:yi,record:Ht,onExpand:ar})));var wr;return Ye.onCell&&(wr=Ye.onCell(Ht,nn)),{key:Mi,fixedInfo:Ui,appendCellNode:Yi,additionalCellProps:wr||{}}}function ai(Je){var Ye=Je.className,jt=Je.style,zt=Je.record,nn=Je.index,Ht=Je.renderIndex,Mn=Je.rowKey,Sn=Je.indent,Fn=Sn===void 0?0:Sn,Qn=Je.rowComponent,kn=Je.cellComponent,Jn=Je.scopeCellComponent,ki=pn(zt,Mn,nn,Fn),wi=ki.prefixCls,yi=ki.flattenColumns,ar=ki.expandedRowClassName,Mi=ki.expandedRowRender,Ui=ki.rowProps,Yi=ki.expanded,wr=ki.rowSupportExpand,Xr=Be.useState(!1),so=(0,_e.Z)(Xr,2),pr=so[0],Ur=so[1];Be.useEffect(function(){Yi&&Ur(!0)},[Yi]);var zo=Be.createElement(Qn,(0,Et.Z)({},Ui,{"data-row-key":Mn,className:Qe()(Ye,"".concat(wi,"-row"),"".concat(wi,"-row-level-").concat(Fn),Ui==null?void 0:Ui.className),style:(0,gt.Z)((0,gt.Z)({},jt),Ui==null?void 0:Ui.style)}),yi.map(function(Ki,Fr){var no=Ki.render,xo=Ki.dataIndex,Eo=Ki.className,mr=Yn(ki,Ki,Fr,Fn,nn),Ho=mr.key,Vo=mr.fixedInfo,wa=mr.appendCellNode,sa=mr.additionalCellProps;return Be.createElement(Cn,(0,Et.Z)({className:Eo,ellipsis:Ki.ellipsis,align:Ki.align,scope:Ki.rowScope,component:Ki.rowScope?Jn:kn,prefixCls:wi,key:Ho,record:zt,index:nn,renderIndex:Ht,dataIndex:xo,render:no,shouldCellUpdate:Ki.shouldCellUpdate},Vo,{appendNode:wa,additionalProps:sa}))})),Pr;if(wr&&(pr||Yi)){var Wr=Mi(zt,nn,Fn+1,Yi),xr=ar&&ar(zt,nn,Fn);Pr=Be.createElement(bn,{expanded:Yi,className:Qe()("".concat(wi,"-expanded-row"),"".concat(wi,"-expanded-row-level-").concat(Fn+1),xr),prefixCls:wi,component:Qn,cellComponent:kn,colSpan:yi.length,isEmpty:!1},Wr)}return Be.createElement(Be.Fragment,null,zo,Pr)}ai.displayName="BodyRow";var Wn=me(ai);function Rn(Je){var Ye=Je.columnKey,jt=Je.onColumnResize,zt=Be.useRef();return Be.useEffect(function(){zt.current&&jt(Ye,zt.current.offsetWidth)},[]),Be.createElement(St.Z,{data:Ye},Be.createElement("td",{ref:zt,style:{padding:0,border:0,height:0}},Be.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function ii(Je){var Ye=Je.prefixCls,jt=Je.columnsKey,zt=Je.onColumnResize;return Be.createElement("tr",{"aria-hidden":"true",className:"".concat(Ye,"-measure-row"),style:{height:0,fontSize:0}},Be.createElement(St.Z.Collection,{onBatchResize:function(Ht){Ht.forEach(function(Mn){var Sn=Mn.data,Fn=Mn.size;zt(Sn,Fn.offsetWidth)})}},jt.map(function(nn){return Be.createElement(Rn,{key:nn,columnKey:nn,onColumnResize:zt})})))}function pi(Je){var Ye=Je.data,jt=Je.measureColumnWidth,zt=He(Me,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),nn=zt.prefixCls,Ht=zt.getComponent,Mn=zt.onColumnResize,Sn=zt.flattenColumns,Fn=zt.getRowKey,Qn=zt.expandedKeys,kn=zt.childrenColumnName,Jn=zt.emptyNode,ki=$t(Ye,kn,Qn,Fn),wi=Be.useRef({renderWithProps:!1}),yi=Ht(["body","wrapper"],"tbody"),ar=Ht(["body","row"],"tr"),Mi=Ht(["body","cell"],"td"),Ui=Ht(["body","cell"],"th"),Yi;Ye.length?Yi=ki.map(function(Xr,so){var pr=Xr.record,Ur=Xr.indent,zo=Xr.index,Pr=Fn(pr,so);return Be.createElement(Wn,{key:Pr,rowKey:Pr,record:pr,index:so,renderIndex:zo,rowComponent:ar,cellComponent:Mi,scopeCellComponent:Ui,getRowKey:Fn,indent:Ur})}):Yi=Be.createElement(bn,{expanded:!0,className:"".concat(nn,"-placeholder"),prefixCls:nn,component:ar,cellComponent:Mi,colSpan:Sn.length,isEmpty:!0},Jn);var wr=kt(Sn);return Be.createElement(Yt.Provider,{value:wi.current},Be.createElement(yi,{className:"".concat(nn,"-tbody")},jt&&Be.createElement(ii,{prefixCls:nn,columnsKey:wr,onColumnResize:Mn}),Yi))}pi.displayName="Body";var gi=me(pi),Ri=["expandable"],Ji="RC_TABLE_INTERNAL_COL_DEFINE";function Un(Je){var Ye=Je.expandable,jt=(0,Ce.Z)(Je,Ri),zt;return"expandable"in Je?zt=(0,gt.Z)((0,gt.Z)({},jt),Ye):zt=jt,zt.showExpandColumn===!1&&(zt.expandIconColumnIndex=-1),zt}var $n=["columnType"];function ti(Je){for(var Ye=Je.colWidths,jt=Je.columns,zt=Je.columCount,nn=[],Ht=zt||jt.length,Mn=!1,Sn=Ht-1;Sn>=0;Sn-=1){var Fn=Ye[Sn],Qn=jt&&jt[Sn],kn=Qn&&Qn[Ji];if(Fn||kn||Mn){var Jn=kn||{},ki=Jn.columnType,wi=(0,Ce.Z)(Jn,$n);nn.unshift(Be.createElement("col",(0,Et.Z)({key:Sn,style:{width:Fn}},wi))),Mn=!0}}return Be.createElement("colgroup",null,nn)}var Pi=ti,mi=ve(19127),nr=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function ji(Je,Ye){return(0,Be.useMemo)(function(){for(var jt=[],zt=0;zt<Ye;zt+=1){var nn=Je[zt];if(nn!==void 0)jt[zt]=nn;else return null}return jt},[Je.join("_"),Ye])}var Le=Be.forwardRef(function(Je,Ye){var jt=Je.className,zt=Je.noData,nn=Je.columns,Ht=Je.flattenColumns,Mn=Je.colWidths,Sn=Je.columCount,Fn=Je.stickyOffsets,Qn=Je.direction,kn=Je.fixHeader,Jn=Je.stickyTopOffset,ki=Je.stickyBottomOffset,wi=Je.stickyClassName,yi=Je.onScroll,ar=Je.maxContentScroll,Mi=Je.children,Ui=(0,Ce.Z)(Je,nr),Yi=He(Me,["prefixCls","scrollbarSize","isSticky"]),wr=Yi.prefixCls,Xr=Yi.scrollbarSize,so=Yi.isSticky,pr=so&&!kn?0:Xr,Ur=Be.useRef(null),zo=Be.useCallback(function(Eo){(0,ht.mH)(Ye,Eo),(0,ht.mH)(Ur,Eo)},[]);Be.useEffect(function(){var Eo;function mr(Ho){var Vo=Ho,wa=Vo.currentTarget,sa=Vo.deltaX;sa&&(yi({currentTarget:wa,scrollLeft:wa.scrollLeft+sa}),Ho.preventDefault())}return(Eo=Ur.current)===null||Eo===void 0||Eo.addEventListener("wheel",mr),function(){var Ho;(Ho=Ur.current)===null||Ho===void 0||Ho.removeEventListener("wheel",mr)}},[]);var Pr=Be.useMemo(function(){return Ht.every(function(Eo){return Eo.width})},[Ht]),Wr=Ht[Ht.length-1],xr={fixed:Wr?Wr.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(wr,"-cell-scrollbar")}}},Ki=(0,Be.useMemo)(function(){return pr?[].concat((0,mi.Z)(nn),[xr]):nn},[pr,nn]),Fr=(0,Be.useMemo)(function(){return pr?[].concat((0,mi.Z)(Ht),[xr]):Ht},[pr,Ht]),no=(0,Be.useMemo)(function(){var Eo=Fn.right,mr=Fn.left;return(0,gt.Z)((0,gt.Z)({},Fn),{},{left:Qn==="rtl"?[].concat((0,mi.Z)(mr.map(function(Ho){return Ho+pr})),[0]):mr,right:Qn==="rtl"?Eo:[].concat((0,mi.Z)(Eo.map(function(Ho){return Ho+pr})),[0]),isSticky:so})},[pr,Fn,so]),xo=ji(Mn,Sn);return Be.createElement("div",{style:(0,gt.Z)({overflow:"hidden"},so?{top:Jn,bottom:ki}:{}),ref:zo,className:Qe()(jt,(0,je.Z)({},wi,!!wi))},Be.createElement("table",{style:{tableLayout:"fixed",visibility:zt||xo?null:"hidden"}},(!zt||!ar||Pr)&&Be.createElement(Pi,{colWidths:xo?[].concat((0,mi.Z)(xo),[pr]):[],columCount:Sn+1,columns:Fr}),Mi((0,gt.Z)((0,gt.Z)({},Ui),{},{stickyOffsets:no,columns:Ki,flattenColumns:Fr}))))});Le.displayName="FixedHolder";var si=Be.memo(Le);function Hi(Je){var Ye=Je.cells,jt=Je.stickyOffsets,zt=Je.flattenColumns,nn=Je.rowComponent,Ht=Je.cellComponent,Mn=Je.tdCellComponent,Sn=Je.onHeaderRow,Fn=Je.index,Qn=He(Me,["prefixCls","direction"]),kn=Qn.prefixCls,Jn=Qn.direction,ki;Sn&&(ki=Sn(Ye.map(function(yi){return yi.column}),Fn));var wi=kt(Ye.map(function(yi){return yi.column}));return Be.createElement(nn,ki,Ye.map(function(yi,ar){var Mi=yi.column,Ui=ft(yi.colStart,yi.colEnd,zt,jt,Jn,Mi),Yi;return Mi&&Mi.onHeaderCell&&(Yi=yi.column.onHeaderCell(Mi)),Be.createElement(Cn,(0,Et.Z)({},yi,{scope:Mi.title?yi.colSpan>1?"colgroup":"col":null,ellipsis:Mi.ellipsis,align:Mi.align,component:Mi.title?Ht:Mn,prefixCls:kn,key:wi[ar]},Ui,{additionalProps:Yi,rowType:"header"}))}))}Hi.displayName="HeaderRow";var hn=Hi;function ni(Je){var Ye=[];function jt(Mn,Sn){var Fn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ye[Fn]=Ye[Fn]||[];var Qn=Sn,kn=Mn.filter(Boolean).map(function(Jn){var ki={key:Jn.key,className:Jn.className||"",children:Jn.title,column:Jn,colStart:Qn},wi=1,yi=Jn.children;return yi&&yi.length>0&&(wi=jt(yi,Qn,Fn+1).reduce(function(ar,Mi){return ar+Mi},0),ki.hasSubColumns=!0),"colSpan"in Jn&&(wi=Jn.colSpan),"rowSpan"in Jn&&(ki.rowSpan=Jn.rowSpan),ki.colSpan=wi,ki.colEnd=ki.colStart+wi-1,Ye[Fn].push(ki),Qn+=wi,wi});return kn}jt(Je,0);for(var zt=Ye.length,nn=function(Sn){Ye[Sn].forEach(function(Fn){!("rowSpan"in Fn)&&!Fn.hasSubColumns&&(Fn.rowSpan=zt-Sn)})},Ht=0;Ht<zt;Ht+=1)nn(Ht);return Ye}function vi(Je){var Ye=Je.stickyOffsets,jt=Je.columns,zt=Je.flattenColumns,nn=Je.onHeaderRow,Ht=He(Me,["prefixCls","getComponent"]),Mn=Ht.prefixCls,Sn=Ht.getComponent,Fn=Be.useMemo(function(){return ni(jt)},[jt]),Qn=Sn(["header","wrapper"],"thead"),kn=Sn(["header","row"],"tr"),Jn=Sn(["header","cell"],"th"),ki=Sn(["header","cell"],"td");return Be.createElement(Qn,{className:"".concat(Mn,"-thead")},Fn.map(function(wi,yi){var ar=Be.createElement(hn,{key:yi,flattenColumns:zt,cells:wi,stickyOffsets:Ye,rowComponent:kn,cellComponent:Jn,tdCellComponent:ki,onHeaderRow:nn,index:yi});return ar}))}var Fi=me(vi),_n=ve(11592);function Dn(Je){var Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof Ye=="number"?Ye:Ye.endsWith("%")?Je*parseFloat(Ye)/100:null}function Ft(Je,Ye){return Be.useMemo(function(){if(Ye&&Ye>0){var jt=0,zt=0;Je.forEach(function(Qn){var kn=Dn(Ye,Qn.width);kn?jt+=kn:zt+=1});var nn=Ye-jt,Ht=zt,Mn=nn/zt,Sn=0,Fn=Je.map(function(Qn){var kn=(0,gt.Z)({},Qn),Jn=Dn(Ye,kn.width);if(Jn)kn.width=Jn;else{var ki=Math.floor(Mn);kn.width=Ht===1?nn:ki,nn-=ki,Ht-=1}return Sn+=kn.width,kn});return[Fn,Sn]}return[Je,Ye]},[Je,Ye])}var Ot=["children"],Ve=["fixed"];function Ut(Je){return(0,_n.Z)(Je).filter(function(Ye){return Be.isValidElement(Ye)}).map(function(Ye){var jt=Ye.key,zt=Ye.props,nn=zt.children,Ht=(0,Ce.Z)(zt,Ot),Mn=(0,gt.Z)({key:jt},Ht);return nn&&(Mn.children=Ut(nn)),Mn})}function tn(Je){var Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return Je.filter(function(jt){return jt&&(0,$e.Z)(jt)==="object"}).reduce(function(jt,zt,nn){var Ht=zt.fixed,Mn=Ht===!0?"left":Ht,Sn="".concat(Ye,"-").concat(nn),Fn=zt.children;return Fn&&Fn.length>0?[].concat((0,mi.Z)(jt),(0,mi.Z)(tn(Fn,Sn).map(function(Qn){return(0,gt.Z)({fixed:Mn},Qn)}))):[].concat((0,mi.Z)(jt),[(0,gt.Z)((0,gt.Z)({key:Sn},zt),{},{fixed:Mn})])},[])}function xt(Je){for(var Ye=!0,jt=0;jt<Je.length;jt+=1){var zt=Je[jt];if(Ye&&zt.fixed!=="left")Ye=!1;else if(!Ye&&zt.fixed==="left"){warning(!1,"Index ".concat(jt-1," of `columns` missing `fixed='left'` prop."));break}}for(var nn=!0,Ht=Je.length-1;Ht>=0;Ht-=1){var Mn=Je[Ht];if(nn&&Mn.fixed!=="right")nn=!1;else if(!nn&&Mn.fixed==="right"){warning(!1,"Index ".concat(Ht+1," of `columns` missing `fixed='right'` prop."));break}}}function rt(Je){return Je.map(function(Ye){var jt=Ye.fixed,zt=(0,Ce.Z)(Ye,Ve),nn=jt;return jt==="left"?nn="right":jt==="right"&&(nn="left"),(0,gt.Z)({fixed:nn},zt)})}function Vt(Je,Ye){var jt=Je.prefixCls,zt=Je.columns,nn=Je.children,Ht=Je.expandable,Mn=Je.expandedKeys,Sn=Je.columnTitle,Fn=Je.getRowKey,Qn=Je.onTriggerExpand,kn=Je.expandIcon,Jn=Je.rowExpandable,ki=Je.expandIconColumnIndex,wi=Je.direction,yi=Je.expandRowByClick,ar=Je.columnWidth,Mi=Je.fixed,Ui=Je.scrollWidth,Yi=Be.useMemo(function(){return zt||Ut(nn)},[zt,nn]),wr=Be.useMemo(function(){if(Ht){var Wr,xr=Yi.slice();if(!xr.includes(ce)){var Ki=ki||0;Ki>=0&&xr.splice(Ki,0,ce)}var Fr=xr.indexOf(ce);xr=xr.filter(function(mr,Ho){return mr!==ce||Ho===Fr});var no=Yi[Fr],xo;(Mi==="left"||Mi)&&!ki?xo="left":(Mi==="right"||Mi)&&ki===Yi.length?xo="right":xo=no?no.fixed:null;var Eo=(Wr={},(0,je.Z)(Wr,Ji,{className:"".concat(jt,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),(0,je.Z)(Wr,"title",Sn),(0,je.Z)(Wr,"fixed",xo),(0,je.Z)(Wr,"className","".concat(jt,"-row-expand-icon-cell")),(0,je.Z)(Wr,"width",ar),(0,je.Z)(Wr,"render",function(Ho,Vo,wa){var sa=Fn(Vo,wa),os=Mn.has(sa),ts=Jn?Jn(Vo):!0,$o=kn({prefixCls:jt,expanded:os,expandable:ts,record:Vo,onExpand:Qn});return yi?Be.createElement("span",{onClick:function(pa){return pa.stopPropagation()}},$o):$o}),Wr);return xr.map(function(mr){return mr===ce?Eo:mr})}return Yi.filter(function(mr){return mr!==ce})},[Ht,Yi,Fn,Mn,kn,wi]),Xr=Be.useMemo(function(){var Wr=wr;return Ye&&(Wr=Ye(Wr)),Wr.length||(Wr=[{render:function(){return null}}]),Wr},[Ye,wr,wi]),so=Be.useMemo(function(){return wi==="rtl"?rt(tn(Xr)):tn(Xr)},[Xr,wi,Ui]),pr=Ft(so,Ui),Ur=(0,_e.Z)(pr,2),zo=Ur[0],Pr=Ur[1];return[Xr,zo,Pr]}var on=Vt;function xn(Je){var Ye,jt=Je.prefixCls,zt=Je.record,nn=Je.onExpand,Ht=Je.expanded,Mn=Je.expandable,Sn="".concat(jt,"-row-expand-icon");if(!Mn)return Be.createElement("span",{className:Qe()(Sn,"".concat(jt,"-row-spaced"))});var Fn=function(kn){nn(zt,kn),kn.stopPropagation()};return Be.createElement("span",{className:Qe()(Sn,(Ye={},(0,je.Z)(Ye,"".concat(jt,"-row-expanded"),Ht),(0,je.Z)(Ye,"".concat(jt,"-row-collapsed"),!Ht),Ye)),onClick:Fn})}function An(Je,Ye,jt){var zt=[];function nn(Ht){(Ht||[]).forEach(function(Mn,Sn){zt.push(Ye(Mn,Sn)),nn(Mn[jt])})}return nn(Je),zt}function yt(Je,Ye,jt){var zt=Un(Je),nn=zt.expandIcon,Ht=zt.expandedRowKeys,Mn=zt.defaultExpandedRowKeys,Sn=zt.defaultExpandAllRows,Fn=zt.expandedRowRender,Qn=zt.onExpand,kn=zt.onExpandedRowsChange,Jn=zt.childrenColumnName,ki=nn||xn,wi=Jn||"children",yi=Be.useMemo(function(){return Fn?"row":Je.expandable&&Je.internalHooks===De&&Je.expandable.__PARENT_RENDER_ICON__||Ye.some(function(so){return so&&(0,$e.Z)(so)==="object"&&so[wi]})?"nest":!1},[!!Fn,Ye]),ar=Be.useState(function(){return Mn||(Sn?An(Ye,jt,wi):[])}),Mi=(0,_e.Z)(ar,2),Ui=Mi[0],Yi=Mi[1],wr=Be.useMemo(function(){return new Set(Ht||Ui||[])},[Ht,Ui]),Xr=Be.useCallback(function(so){var pr=jt(so,Ye.indexOf(so)),Ur,zo=wr.has(pr);zo?(wr.delete(pr),Ur=(0,mi.Z)(wr)):Ur=[].concat((0,mi.Z)(wr),[pr]),Yi(Ur),Qn&&Qn(!zo,so),kn&&kn(Ur)},[jt,wr,Ye,Qn,kn]);return[zt,yi,wr,ki,wi,Xr]}function cn(Je,Ye,jt,zt){var nn=Je.map(function(Ht,Mn){return ft(Mn,Mn,Je,Ye,jt,zt==null?void 0:zt[Mn])});return(0,bt.Z)(function(){return nn},[nn],function(Ht,Mn){return!(0,Ke.Z)(Ht,Mn)})}function On(Je){var Ye=(0,Be.useRef)(Je),jt=(0,Be.useState)({}),zt=(0,_e.Z)(jt,2),nn=zt[1],Ht=(0,Be.useRef)(null),Mn=(0,Be.useRef)([]);function Sn(Fn){Mn.current.push(Fn);var Qn=Promise.resolve();Ht.current=Qn,Qn.then(function(){if(Ht.current===Qn){var kn=Mn.current,Jn=Ye.current;Mn.current=[],kn.forEach(function(ki){Ye.current=ki(Ye.current)}),Ht.current=null,Jn!==Ye.current&&nn({})}})}return(0,Be.useEffect)(function(){return function(){Ht.current=null}},[]),[Ye.current,Sn]}function ri(Je){var Ye=(0,Be.useRef)(Je||null),jt=(0,Be.useRef)();function zt(){window.clearTimeout(jt.current)}function nn(Mn){Ye.current=Mn,zt(),jt.current=window.setTimeout(function(){Ye.current=null,jt.current=void 0},100)}function Ht(){return Ye.current}return(0,Be.useEffect)(function(){return zt},[]),[nn,Ht]}function Wt(){var Je=Be.useState(-1),Ye=(0,_e.Z)(Je,2),jt=Ye[0],zt=Ye[1],nn=Be.useState(-1),Ht=(0,_e.Z)(nn,2),Mn=Ht[0],Sn=Ht[1],Fn=Be.useCallback(function(Qn,kn){zt(Qn),Sn(kn)},[]);return[jt,Mn,Fn]}var Jt=ve(47273),hi=(0,Jt.Z)()?window:null;function ci(Je,Ye){var jt=(0,$e.Z)(Je)==="object"?Je:{},zt=jt.offsetHeader,nn=zt===void 0?0:zt,Ht=jt.offsetSummary,Mn=Ht===void 0?0:Ht,Sn=jt.offsetScroll,Fn=Sn===void 0?0:Sn,Qn=jt.getContainer,kn=Qn===void 0?function(){return hi}:Qn,Jn=kn()||hi;return Be.useMemo(function(){var ki=!!Je;return{isSticky:ki,stickyClassName:ki?"".concat(Ye,"-sticky-holder"):"",offsetHeader:nn,offsetSummary:Mn,offsetScroll:Fn,container:Jn}},[Fn,nn,Mn,Ye,Jn])}function ui(Je,Ye,jt){var zt=(0,Be.useMemo)(function(){for(var nn=[],Ht=[],Mn=0,Sn=0,Fn=0;Fn<Ye;Fn+=1)if(jt==="rtl"){Ht[Fn]=Sn,Sn+=Je[Fn]||0;var Qn=Ye-Fn-1;nn[Qn]=Mn,Mn+=Je[Qn]||0}else{nn[Fn]=Mn,Mn+=Je[Fn]||0;var kn=Ye-Fn-1;Ht[kn]=Sn,Sn+=Je[kn]||0}return{left:nn,right:Ht}},[Je,Ye,jt]);return zt}var qn=ui;function di(Je){var Ye=Je.className,jt=Je.children;return Be.createElement("div",{className:Ye},jt)}var li=di,Ai=ve(8224),er=ve(55468),sr=function(Ye,jt){var zt,nn,Ht=Ye.scrollBodyRef,Mn=Ye.onScroll,Sn=Ye.offsetScroll,Fn=Ye.container,Qn=He(Me,"prefixCls"),kn=((zt=Ht.current)===null||zt===void 0?void 0:zt.scrollWidth)||0,Jn=((nn=Ht.current)===null||nn===void 0?void 0:nn.clientWidth)||0,ki=kn&&Jn*(Jn/kn),wi=Be.useRef(),yi=On({scrollLeft:0,isHiddenScrollBar:!1}),ar=(0,_e.Z)(yi,2),Mi=ar[0],Ui=ar[1],Yi=Be.useRef({delta:0,x:0}),wr=Be.useState(!1),Xr=(0,_e.Z)(wr,2),so=Xr[0],pr=Xr[1],Ur=function(){pr(!1)},zo=function(Fr){Fr.persist(),Yi.current.delta=Fr.pageX-Mi.scrollLeft,Yi.current.x=0,pr(!0),Fr.preventDefault()},Pr=function(Fr){var no,xo=Fr||((no=window)===null||no===void 0?void 0:no.event),Eo=xo.buttons;if(!so||Eo===0){so&&pr(!1);return}var mr=Yi.current.x+Fr.pageX-Yi.current.x-Yi.current.delta;mr<=0&&(mr=0),mr+ki>=Jn&&(mr=Jn-ki),Mn({scrollLeft:mr/Jn*(kn+2)}),Yi.current.x=Fr.pageX},Wr=function(){if(Ht.current){var Fr=(0,er.os)(Ht.current).top,no=Fr+Ht.current.offsetHeight,xo=Fn===window?document.documentElement.scrollTop+window.innerHeight:(0,er.os)(Fn).top+Fn.clientHeight;no-(0,Dt.Z)()<=xo||Fr>=xo-Sn?Ui(function(Eo){return(0,gt.Z)((0,gt.Z)({},Eo),{},{isHiddenScrollBar:!0})}):Ui(function(Eo){return(0,gt.Z)((0,gt.Z)({},Eo),{},{isHiddenScrollBar:!1})})}},xr=function(Fr){Ui(function(no){return(0,gt.Z)((0,gt.Z)({},no),{},{scrollLeft:Fr/kn*Jn||0})})};return Be.useImperativeHandle(jt,function(){return{setScrollLeft:xr}}),Be.useEffect(function(){var Ki=(0,Ai.Z)(document.body,"mouseup",Ur,!1),Fr=(0,Ai.Z)(document.body,"mousemove",Pr,!1);return Wr(),function(){Ki.remove(),Fr.remove()}},[ki,so]),Be.useEffect(function(){var Ki=(0,Ai.Z)(Fn,"scroll",Wr,!1),Fr=(0,Ai.Z)(window,"resize",Wr,!1);return function(){Ki.remove(),Fr.remove()}},[Fn]),Be.useEffect(function(){Mi.isHiddenScrollBar||Ui(function(Ki){var Fr=Ht.current;return Fr?(0,gt.Z)((0,gt.Z)({},Ki),{},{scrollLeft:Fr.scrollLeft/Fr.scrollWidth*Fr.clientWidth}):Ki})},[Mi.isHiddenScrollBar]),kn<=Jn||!ki||Mi.isHiddenScrollBar?null:Be.createElement("div",{style:{height:(0,Dt.Z)(),width:Jn,bottom:Sn},className:"".concat(Qn,"-sticky-scroll")},Be.createElement("div",{onMouseDown:zo,ref:wi,className:Qe()("".concat(Qn,"-sticky-scroll-bar"),(0,je.Z)({},"".concat(Qn,"-sticky-scroll-bar-active"),so)),style:{width:"".concat(ki,"px"),transform:"translate3d(".concat(Mi.scrollLeft,"px, 0, 0)")}}))},vn=Be.forwardRef(sr);function Nr(Je){return null}var Dr=Nr;function ir(Je){return null}var fn=ir,jn="rc-table",Ei=[],zi={};function Ni(){return"No Data"}function Gi(Je){var Ye,jt=(0,gt.Z)({rowKey:"key",prefixCls:jn,emptyText:Ni},Je),zt=jt.prefixCls,nn=jt.className,Ht=jt.rowClassName,Mn=jt.style,Sn=jt.data,Fn=jt.rowKey,Qn=jt.scroll,kn=jt.tableLayout,Jn=jt.direction,ki=jt.title,wi=jt.footer,yi=jt.summary,ar=jt.caption,Mi=jt.id,Ui=jt.showHeader,Yi=jt.components,wr=jt.emptyText,Xr=jt.onRow,so=jt.onHeaderRow,pr=jt.internalHooks,Ur=jt.transformColumns,zo=jt.internalRefs,Pr=jt.tailor,Wr=jt.sticky,xr=Sn||Ei,Ki=!!xr.length,Fr=pr===De,no=Be.useCallback(function(ba,ns){return(0,Nt.Z)(Yi,ba)||ns},[Yi]),xo=Be.useMemo(function(){return typeof Fn=="function"?Fn:function(ba){var ns=ba&&ba[Fn];return ns}},[Fn]),Eo=no(["body"]),mr=Wt(),Ho=(0,_e.Z)(mr,3),Vo=Ho[0],wa=Ho[1],sa=Ho[2],os=yt(jt,xr,xo),ts=(0,_e.Z)(os,6),$o=ts[0],oo=ts[1],pa=ts[2],as=ts[3],Va=ts[4],Ms=ts[5],bo=Qn==null?void 0:Qn.x,mo=Be.useState(0),Mo=(0,_e.Z)(mo,2),qr=Mo[0],ya=Mo[1],eo=on((0,gt.Z)((0,gt.Z)((0,gt.Z)({},jt),$o),{},{expandable:!!$o.expandedRowRender,columnTitle:$o.columnTitle,expandedKeys:pa,getRowKey:xo,onTriggerExpand:Ms,expandIcon:as,expandIconColumnIndex:$o.expandIconColumnIndex,direction:Jn,scrollWidth:Fr&&Pr&&typeof bo=="number"?bo:null}),Fr?Ur:null),_o=(0,_e.Z)(eo,3),ha=_o[0],ca=_o[1],Vs=_o[2],Ns=Vs!=null?Vs:bo,hl=Be.useMemo(function(){return{columns:ha,flattenColumns:ca}},[ha,ca]),Ca=Be.useRef(),Us=Be.useRef(),ws=Be.useRef(),Rs=Be.useRef(),fh=Be.useRef(),Ea=Be.useState(!1),Ta=(0,_e.Z)(Ea,2),ja=Ta[0],ms=Ta[1],js=Be.useState(!1),ra=(0,_e.Z)(js,2),Za=ra[0],zs=ra[1],jl=On(new Map),au=(0,_e.Z)(jl,2),Yl=au[0],wu=au[1],Cu=kt(ca),su=Cu.map(function(ba){return Yl.get(ba)}),La=Be.useMemo(function(){return su},[su.join("_")]),Xs=qn(La,ca.length,Jn),fs=Qn&&ln(Qn.y),Ha=Qn&&ln(Ns)||!!$o.fixed,lu=Ha&&ca.some(function(ba){var ns=ba.fixed;return ns}),kh=Be.useRef(),Eu=ci(Wr,zt),th=Eu.isSticky,gh=Eu.offsetHeader,Xl=Eu.offsetSummary,Sa=Eu.offsetScroll,Ua=Eu.stickyClassName,ks=Eu.container,Ya=Be.useMemo(function(){return yi==null?void 0:yi(xr)},[yi,xr]),fa=(fs||th)&&Be.isValidElement(Ya)&&Ya.type===Se&&Ya.props.fixed,_s,zl,Zu;fs&&(zl={overflowY:"scroll",maxHeight:Qn.y}),Ha&&(_s={overflowX:"auto"},fs||(zl={overflowY:"hidden"}),Zu={width:Ns===!0?"auto":Ns,minWidth:"100%"});var pf=Be.useCallback(function(ba,ns){(0,vt.Z)(Ca.current)&&wu(function(il){if(il.get(ba)!==ns){var bu=new Map(il);return bu.set(ba,ns),bu}return il})},[]),Qt=ri(null),$h=(0,_e.Z)(Qt,2),ph=$h[0],mf=$h[1];function Nc(ba,ns){ns&&(typeof ns=="function"?ns(ba):ns.scrollLeft!==ba&&(ns.scrollLeft=ba,ns.scrollLeft!==ba&&setTimeout(function(){ns.scrollLeft=ba},0)))}var cc=(0,Ct.Z)(function(ba){var ns=ba.currentTarget,il=ba.scrollLeft,bu=Jn==="rtl",Mu=typeof il=="number"?il:ns.scrollLeft,Gd=ns||zi;if(!mf()||mf()===Gd){var Uh;ph(Gd),Nc(Mu,Us.current),Nc(Mu,ws.current),Nc(Mu,fh.current),Nc(Mu,(Uh=kh.current)===null||Uh===void 0?void 0:Uh.setScrollLeft)}var ld=ns||Us.current;if(ld){var Hu=ld.scrollWidth,Ah=ld.clientWidth;if(Hu===Ah){ms(!1),zs(!1);return}bu?(ms(-Mu<Hu-Ah),zs(-Mu>0)):(ms(Mu>0),zs(Mu<Hu-Ah))}}),Id=function(){Ha&&ws.current?cc({currentTarget:ws.current}):(ms(!1),zs(!1))},$g=function(ns){var il=ns.width;il!==qr&&(Id(),ya(Ca.current?Ca.current.offsetWidth:il))},Js=Be.useRef(!1);Be.useEffect(function(){Js.current&&Id()},[Ha,Sn,ha.length]),Be.useEffect(function(){Js.current=!0},[]);var ad=Be.useState(0),Rd=(0,_e.Z)(ad,2),sd=Rd[0],vf=Rd[1],Uf=Be.useState(!0),yf=(0,_e.Z)(Uf,2),jd=yf[0],uu=yf[1];Be.useEffect(function(){(!Pr||!Fr)&&(ws.current instanceof Element?vf((0,Dt.o)(ws.current).width):vf((0,Dt.o)(Rs.current).width)),uu((0,lt.G)("position","sticky"))},[]),Be.useEffect(function(){Fr&&zo&&(zo.body.current=ws.current)});var kc=Be.useCallback(function(ba){return Be.createElement(Be.Fragment,null,Be.createElement(Fi,ba),fa==="top"&&Be.createElement(Pt,ba,Ya))},[fa,Ya]),Sf=Be.useCallback(function(ba){return Be.createElement(Pt,ba,Ya)},[Ya]),nh=no(["table"],"table"),Kh=Be.useMemo(function(){return kn||(lu?Ns==="max-content"?"auto":"fixed":fs||th||ca.some(function(ba){var ns=ba.ellipsis;return ns})?"fixed":"auto")},[fs,lu,ca,kn,th]),Ac,dc={colWidths:La,columCount:ca.length,stickyOffsets:Xs,onHeaderRow:so,fixHeader:fs,scroll:Qn},_l=Be.useMemo(function(){return Ki?null:typeof wr=="function"?wr():wr},[Ki,wr]),zd=Be.createElement(gi,{data:xr,measureColumnWidth:fs||Ha||th}),_d=Be.createElement(Pi,{colWidths:ca.map(function(ba){var ns=ba.width;return ns}),columns:ca}),hu=ar!=null?Be.createElement("caption",{className:"".concat(zt,"-caption")},ar):void 0,Tc=(0,un.Z)(jt,{data:!0}),Zd=(0,un.Z)(jt,{aria:!0});if(fs||th){var Hd;typeof Eo=="function"?(Hd=Eo(xr,{scrollbarSize:sd,ref:ws,onScroll:cc}),dc.colWidths=ca.map(function(ba,ns){var il=ba.width,bu=ns===ca.length-1?il-sd:il;return typeof bu=="number"&&!Number.isNaN(bu)?bu:0})):Hd=Be.createElement("div",{style:(0,gt.Z)((0,gt.Z)({},_s),zl),onScroll:cc,ref:ws,className:Qe()("".concat(zt,"-body"))},Be.createElement(nh,(0,Et.Z)({style:(0,gt.Z)((0,gt.Z)({},Zu),{},{tableLayout:Kh})},Zd),hu,_d,zd,!fa&&Ya&&Be.createElement(Pt,{stickyOffsets:Xs,flattenColumns:ca,columns:ha},Ya)));var Vh=(0,gt.Z)((0,gt.Z)((0,gt.Z)({noData:!xr.length,maxContentScroll:Ha&&Ns==="max-content"},dc),hl),{},{direction:Jn,stickyClassName:Ua,onScroll:cc});Ac=Be.createElement(Be.Fragment,null,Ui!==!1&&Be.createElement(si,(0,Et.Z)({},Vh,{stickyTopOffset:gh,className:"".concat(zt,"-header"),ref:Us}),kc),Hd,fa&&fa!=="top"&&Be.createElement(si,(0,Et.Z)({},Vh,{stickyBottomOffset:Xl,className:"".concat(zt,"-summary"),ref:fh}),Sf),th&&Be.createElement(vn,{ref:kh,offsetScroll:Sa,scrollBodyRef:ws,onScroll:cc,container:ks}))}else Ac=Be.createElement("div",{style:(0,gt.Z)((0,gt.Z)({},_s),zl),className:Qe()("".concat(zt,"-content")),onScroll:cc,ref:ws},Be.createElement(nh,(0,Et.Z)({style:(0,gt.Z)((0,gt.Z)({},Zu),{},{tableLayout:Kh})},Zd),hu,_d,Ui!==!1&&Be.createElement(Fi,(0,Et.Z)({},dc,hl)),zd,Ya&&Be.createElement(Pt,{stickyOffsets:Xs,flattenColumns:ca,columns:ha},Ya)));var Ll=Be.createElement("div",(0,Et.Z)({className:Qe()(zt,nn,(Ye={},(0,je.Z)(Ye,"".concat(zt,"-rtl"),Jn==="rtl"),(0,je.Z)(Ye,"".concat(zt,"-ping-left"),ja),(0,je.Z)(Ye,"".concat(zt,"-ping-right"),Za),(0,je.Z)(Ye,"".concat(zt,"-layout-fixed"),kn==="fixed"),(0,je.Z)(Ye,"".concat(zt,"-fixed-header"),fs),(0,je.Z)(Ye,"".concat(zt,"-fixed-column"),lu),(0,je.Z)(Ye,"".concat(zt,"-scroll-horizontal"),Ha),(0,je.Z)(Ye,"".concat(zt,"-has-fix-left"),ca[0]&&ca[0].fixed),(0,je.Z)(Ye,"".concat(zt,"-has-fix-right"),ca[ca.length-1]&&ca[ca.length-1].fixed==="right"),Ye)),style:Mn,id:Mi,ref:Ca},Tc),ki&&Be.createElement(li,{className:"".concat(zt,"-title")},ki(xr)),Be.createElement("div",{ref:Rs,className:"".concat(zt,"-container")},Ac),wi&&Be.createElement(li,{className:"".concat(zt,"-footer")},wi(xr)));Ha&&(Ll=Be.createElement(St.Z,{onResize:$g},Ll));var Wd=cn(ca,Xs,Jn,ha),As=Be.useMemo(function(){return{scrollX:Ns,prefixCls:zt,getComponent:no,scrollbarSize:sd,direction:Jn,fixedInfoList:Wd,isSticky:th,supportSticky:jd,componentWidth:qr,fixHeader:fs,fixColumn:lu,horizonScroll:Ha,tableLayout:Kh,rowClassName:Ht,expandedRowClassName:$o.expandedRowClassName,expandIcon:as,expandableType:oo,expandRowByClick:$o.expandRowByClick,expandedRowRender:$o.expandedRowRender,onTriggerExpand:Ms,expandIconColumnIndex:$o.expandIconColumnIndex,indentSize:$o.indentSize,allColumnsFixedLeft:ca.every(function(ba){return ba.fixed==="left"}),emptyNode:_l,columns:ha,flattenColumns:ca,onColumnResize:pf,hoverStartRow:Vo,hoverEndRow:wa,onHover:sa,rowExpandable:$o.rowExpandable,onRow:Xr,getRowKey:xo,expandedKeys:pa,childrenColumnName:Va}},[Ns,zt,no,sd,Jn,Wd,th,jd,qr,fs,lu,Ha,Kh,Ht,$o.expandedRowClassName,as,oo,$o.expandRowByClick,$o.expandedRowRender,Ms,$o.expandIconColumnIndex,$o.indentSize,_l,ha,ca,pf,Vo,wa,sa,$o.rowExpandable,Xr,xo,pa,Va]);return Be.createElement(Me.Provider,{value:As},Ll)}function ur(Je){return de(Gi,Je)}var Qi=ur();Qi.EXPAND_COLUMN=ce,Qi.INTERNAL_HOOKS=De,Qi.Column=Dr,Qi.ColumnGroup=fn,Qi.Summary=qe;var rr=Qi,fr=ve(24916),Nn=ct(null),Jr=ct(null);function Ln(Je,Ye,jt){var zt=Ye||1;return jt[Je+zt]-(jt[Je]||0)}function Zr(Je){var Ye=Je.rowInfo,jt=Je.column,zt=Je.colIndex,nn=Je.indent,Ht=Je.index,Mn=Je.renderIndex,Sn=Je.record,Fn=Je.style,Qn=Je.className,kn=Je.inverse,Jn=Je.getHeight,ki=jt.render,wi=jt.dataIndex,yi=jt.className,ar=jt.width,Mi=He(Jr,["columnsOffset"]),Ui=Mi.columnsOffset,Yi=Yn(Ye,jt,zt,nn,Ht),wr=Yi.key,Xr=Yi.fixedInfo,so=Yi.appendCellNode,pr=Yi.additionalCellProps,Ur=pr.style,zo=pr.colSpan,Pr=zo===void 0?1:zo,Wr=pr.rowSpan,xr=Wr===void 0?1:Wr,Ki=zt-1,Fr=Ln(Ki,Pr,Ui),no=Pr>1?ar-Fr:0,xo=(0,gt.Z)((0,gt.Z)((0,gt.Z)({},Ur),Fn),{},{flex:"0 0 ".concat(Fr,"px"),width:"".concat(Fr,"px"),marginRight:no,pointerEvents:"auto"}),Eo=Be.useMemo(function(){return kn?xr<=1:Pr===0||xr===0||xr>1},[xr,Pr,kn]);Eo?xo.visibility="hidden":kn&&(xo.height=Jn==null?void 0:Jn(xr));var mr=Eo?function(){return null}:ki,Ho={};return(xr===0||Pr===0)&&(Ho.rowSpan=1,Ho.colSpan=1),Be.createElement(Cn,(0,Et.Z)({className:Qe()(yi,Qn),ellipsis:jt.ellipsis,align:jt.align,scope:jt.rowScope,component:"div",prefixCls:Ye.prefixCls,key:wr,record:Sn,index:Ht,renderIndex:Mn,dataIndex:wi,render:mr,shouldCellUpdate:jt.shouldCellUpdate},Xr,{appendNode:so,additionalProps:(0,gt.Z)((0,gt.Z)({},pr),{},{style:xo},Ho)}))}var co=Zr,Bi=["data","index","className","rowKey","style","extra","getHeight"],Po=Be.forwardRef(function(Je,Ye){var jt=Je.data,zt=Je.index,nn=Je.className,Ht=Je.rowKey,Mn=Je.style,Sn=Je.extra,Fn=Je.getHeight,Qn=(0,Ce.Z)(Je,Bi),kn=jt.record,Jn=jt.indent,ki=jt.index,wi=He(Me,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),yi=wi.scrollX,ar=wi.flattenColumns,Mi=wi.prefixCls,Ui=wi.fixColumn,Yi=wi.componentWidth,wr=pn(kn,Ht,zt,Jn),Xr=wr.rowSupportExpand,so=wr.expanded,pr=wr.rowProps,Ur=wr.expandedRowRender,zo=wr.expandedRowClassName,Pr;if(Xr&&so){var Wr=Ur(kn,zt,Jn+1,so),xr=zo==null?void 0:zo(kn,zt,Jn),Ki={};Ui&&(Ki={style:(0,je.Z)({},"--virtual-width","".concat(Yi,"px"))});var Fr="".concat(Mi,"-expanded-row-cell");Pr=Be.createElement("div",{className:Qe()("".concat(Mi,"-expanded-row"),"".concat(Mi,"-expanded-row-level-").concat(Jn+1),xr)},Be.createElement(Cn,{component:"div",prefixCls:Mi,className:Qe()(Fr,(0,je.Z)({},"".concat(Fr,"-fixed"),Ui)),additionalProps:Ki},Wr))}var no=(0,gt.Z)((0,gt.Z)({},Mn),{},{width:yi});Sn&&(no.position="absolute",no.pointerEvents="none");var xo=Be.createElement("div",(0,Et.Z)({},pr,Qn,{ref:Xr?null:Ye,className:Qe()(nn,"".concat(Mi,"-row"),pr==null?void 0:pr.className,(0,je.Z)({},"".concat(Mi,"-row-extra"),Sn)),style:(0,gt.Z)((0,gt.Z)({},no),pr==null?void 0:pr.style)}),ar.map(function(Eo,mr){return Be.createElement(co,{key:mr,rowInfo:wr,column:Eo,colIndex:mr,indent:Jn,index:zt,renderIndex:ki,record:kn,inverse:Sn,getHeight:Fn})}));return Xr?Be.createElement("div",{ref:Ye},xo,Pr):xo}),ao=me(Po),Vi=ao,qi=Be.forwardRef(function(Je,Ye){var jt=Je.data,zt=Je.onScroll,nn=He(Me,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","emptyNode","scrollX"]),Ht=nn.flattenColumns,Mn=nn.onColumnResize,Sn=nn.getRowKey,Fn=nn.expandedKeys,Qn=nn.prefixCls,kn=nn.childrenColumnName,Jn=nn.emptyNode,ki=nn.scrollX,wi=He(Nn),yi=wi.scrollY,ar=wi.listItemHeight,Mi=Be.useRef(),Ui=$t(jt,kn,Fn,Sn),Yi=Be.useMemo(function(){var Pr=0;return Ht.map(function(Wr){var xr=Wr.width,Ki=Wr.key;return Pr+=xr,[Ki,xr,Pr]})},[Ht]),wr=Be.useMemo(function(){return Yi.map(function(Pr){return Pr[2]})},[Yi]);Be.useEffect(function(){Yi.forEach(function(Pr){var Wr=(0,_e.Z)(Pr,2),xr=Wr[0],Ki=Wr[1];Mn(xr,Ki)})},[Yi]),Be.useImperativeHandle(Ye,function(){var Pr={};return Object.defineProperty(Pr,"scrollLeft",{get:function(){var xr;return((xr=Mi.current)===null||xr===void 0?void 0:xr.getScrollInfo().x)||0},set:function(xr){var Ki;(Ki=Mi.current)===null||Ki===void 0||Ki.scrollTo({left:xr})}}),Pr});var Xr=function(Wr,xr){var Ki,Fr=(Ki=Ui[xr])===null||Ki===void 0?void 0:Ki.record,no=Wr.onCell;if(no){var xo,Eo=no(Fr,xr);return(xo=Eo==null?void 0:Eo.rowSpan)!==null&&xo!==void 0?xo:1}return 1},so=function(Wr){var xr=Wr.start,Ki=Wr.end,Fr=Wr.getSize,no=Wr.offsetY;if(Ki<0)return null;for(var xo=Ht.filter(function(bo){return Xr(bo,xr)===0}),Eo=xr,mr=function(mo){if(xo=xo.filter(function(Mo){return Xr(Mo,mo)===0}),!xo.length)return Eo=mo,"break"},Ho=xr;Ho>=0;Ho-=1){var Vo=mr(Ho);if(Vo==="break")break}for(var wa=Ht.filter(function(bo){return Xr(bo,Ki)!==1}),sa=Ki,os=function(mo){if(wa=wa.filter(function(Mo){return Xr(Mo,mo)!==1}),!wa.length)return sa=Math.max(mo-1,Ki),"break"},ts=Ki;ts<Ui.length;ts+=1){var $o=os(ts);if($o==="break")break}for(var oo=[],pa=function(mo){var Mo=Ui[mo];if(!Mo)return"continue";Ht.some(function(qr){return Xr(qr,mo)>1})&&oo.push(mo)},as=Eo;as<=sa;as+=1)var Va=pa(as);var Ms=oo.map(function(bo){var mo=Ui[bo],Mo=Sn(mo.record,bo),qr=function(_o){var ha=bo+_o-1,ca=Sn(Ui[ha].record,ha),Vs=Fr(Mo,ca);return Vs.bottom-Vs.top},ya=Fr(Mo);return Be.createElement(Vi,{key:bo,data:mo,rowKey:Mo,index:bo,style:{top:-no+ya.top},extra:!0,getHeight:qr})});return Ms},pr=Be.useMemo(function(){return{columnsOffset:wr}},[wr]),Ur="".concat(Qn,"-tbody"),zo;return Ui.length?zo=Be.createElement(fr.Z,{fullHeight:!1,ref:Mi,className:Qe()(Ur,"".concat(Ur,"-virtual")),height:yi,itemHeight:ar||24,data:Ui,itemKey:function(Wr){return Sn(Wr.record)},scrollWidth:ki,onVirtualScroll:function(Wr){var xr=Wr.x;zt({scrollLeft:xr})},extraRender:so},function(Pr,Wr,xr){var Ki=Sn(Pr.record,Wr);return Be.createElement(Vi,(0,Et.Z)({data:Pr,rowKey:Ki,index:Wr},xr))}):zo=Be.createElement("div",{className:Qe()("".concat(Qn,"-placeholder"))},Be.createElement(Cn,{component:"div",prefixCls:Qn},Jn)),Be.createElement(Jr.Provider,{value:pr},zo)}),Hr=me(qi),ro=Hr,xi=function(Ye,jt){var zt=jt.ref,nn=jt.onScroll;return Be.createElement(ro,{ref:zt,data:Ye,onScroll:nn})},tt=100;function uo(Je){var Ye=Je.columns,jt=Je.scroll,zt=Je.prefixCls,nn=zt===void 0?jn:zt,Ht=Je.className,Mn=Je.listItemHeight,Sn=jt||{},Fn=Sn.x,Qn=Sn.y;typeof Fn!="number"&&(Fn=((Ye||[]).length+1)*tt),typeof Qn!="number"&&(Qn=500);var kn=Be.useMemo(function(){return{scrollY:Qn,listItemHeight:Mn}},[Qn,Mn]);return Be.createElement(Nn.Provider,{value:kn},Be.createElement(rr,(0,Et.Z)({},Je,{className:Qe()(Ht,"".concat(nn,"-virtual")),scroll:(0,gt.Z)((0,gt.Z)({},jt),{},{x:Fn}),components:{body:xi},columns:Ye,internalHooks:De,tailor:!0})))}function Zo(Je){return de(uo,Je)}var ga=Zo(),Pa=null;function ia(Je){return null}var Or=ia;function kr(Je){return null}var fo=kr,jr=ve(2738),To=ve(68031),qa=ve(36355),Mr=ve(93891),hr=ve(19716),Xn=ve(8628),yr=ve(31724),wo=ve(58421),ua=ve(71418),No=ve(88088);function yo(Je){return function(jt){let{prefixCls:zt,onExpand:nn,record:Ht,expanded:Mn,expandable:Sn}=jt;const Fn=`${zt}-row-expand-icon`;return Be.createElement("button",{type:"button",onClick:Qn=>{nn(Ht,Qn),Qn.stopPropagation()},className:Qe()(Fn,{[`${Fn}-spaced`]:!Sn,[`${Fn}-expanded`]:Sn&&Mn,[`${Fn}-collapsed`]:Sn&&!Mn}),"aria-label":Mn?Je.collapse:Je.expand,"aria-expanded":Mn})}}var ta=yo;function na(Je,Ye){return"key"in Je&&Je.key!==void 0&&Je.key!==null?Je.key:Je.dataIndex?Array.isArray(Je.dataIndex)?Je.dataIndex.join("."):Je.dataIndex:Ye}function Na(Je,Ye){return Ye?`${Ye}-${Je}`:`${Je}`}function ka(Je,Ye){return typeof Je=="function"?Je(Ye):Je}function is(Je,Ye){const jt=ka(Je,Ye);return Object.prototype.toString.call(jt)==="[object Object]"?"":jt}var gn={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"},Oa=gn,Vl=ve(7657),Hs=function(Ye,jt){return Be.createElement(Vl.Z,(0,Et.Z)({},Ye,{ref:jt,icon:Oa}))},wl=Be.forwardRef(Hs),Ma=wl,yu=ve(56762);function Cl(Je){const Ye=Be.useRef(Je),jt=(0,yu.Z)();return[()=>Ye.current,zt=>{Ye.current=zt,jt()}]}var ma=ve(3113),Fo=ve(24905),Ul=ve(38854),$r=ve(64165),Ko=ve(20834),So=ve(40875),Di=ve(5112),Ga=ve(17574),$a=ve(47472),bs=ve(92832);function El(Je){let{value:Ye,onChange:jt,filterSearch:zt,tablePrefixCls:nn,locale:Ht}=Je;return zt?Be.createElement("div",{className:`${nn}-filter-dropdown-search`},Be.createElement(bs.default,{prefix:Be.createElement($a.Z,null),placeholder:Ht.filterSearchPlaceholder,onChange:jt,value:Ye,htmlSize:1,className:`${nn}-filter-dropdown-search-input`})):null}var Dl=El,bi=ve(10228);const Fa=Je=>{const{keyCode:Ye}=Je;Ye===bi.Z.ENTER&&Je.stopPropagation()};var bl=Be.forwardRef((Je,Ye)=>Be.createElement("div",{className:Je.className,onClick:jt=>jt.stopPropagation(),onKeyDown:Fa,ref:Ye},Je.children));function Ol(Je){let Ye=[];return(Je||[]).forEach(jt=>{let{value:zt,children:nn}=jt;Ye.push(zt),nn&&(Ye=[].concat((0,mi.Z)(Ye),(0,mi.Z)(Ol(nn))))}),Ye}function Il(Je){return Je.some(Ye=>{let{children:jt}=Ye;return jt})}function Qr(Je,Ye){return typeof Ye=="string"||typeof Ye=="number"?Ye==null?void 0:Ye.toString().toLowerCase().includes(Je.trim().toLowerCase()):!1}function Ju(Je){let{filters:Ye,prefixCls:jt,filteredKeys:zt,filterMultiple:nn,searchValue:Ht,filterSearch:Mn}=Je;return Ye.map((Sn,Fn)=>{const Qn=String(Sn.value);if(Sn.children)return{key:Qn||Fn,label:Sn.text,popupClassName:`${jt}-dropdown-submenu`,children:Ju({filters:Sn.children,prefixCls:jt,filteredKeys:zt,filterMultiple:nn,searchValue:Ht,filterSearch:Mn})};const kn=nn?Fo.default:Di.ZP,Jn={key:Sn.value!==void 0?Qn:Fn,label:Be.createElement(Be.Fragment,null,Be.createElement(kn,{checked:zt.includes(Qn)}),Be.createElement("span",null,Sn.text))};return Ht.trim()?typeof Mn=="function"?Mn(Ht,Sn)?Jn:null:Qr(Ht,Sn.text)?Jn:null:Jn})}function nl(Je){var Ye,jt;const{tablePrefixCls:zt,prefixCls:nn,column:Ht,dropdownPrefixCls:Mn,columnKey:Sn,filterMultiple:Fn,filterMode:Qn="menu",filterSearch:kn=!1,filterState:Jn,triggerFilter:ki,locale:wi,children:yi,getPopupContainer:ar}=Je,{filterDropdownOpen:Mi,onFilterDropdownOpenChange:Ui,filterResetToDefaultFilteredValue:Yi,defaultFilteredValue:wr,filterDropdownVisible:Xr,onFilterDropdownVisibleChange:so}=Ht,[pr,Ur]=Be.useState(!1),zo=!!(Jn&&(!((Ye=Jn.filteredKeys)===null||Ye===void 0)&&Ye.length||Jn.forceFiltered)),Pr=eo=>{Ur(eo),Ui==null||Ui(eo),so==null||so(eo)},Wr=(jt=Mi!=null?Mi:Xr)!==null&&jt!==void 0?jt:pr,xr=Jn==null?void 0:Jn.filteredKeys,[Ki,Fr]=Cl(xr||[]),no=eo=>{let{selectedKeys:_o}=eo;Fr(_o)},xo=(eo,_o)=>{let{node:ha,checked:ca}=_o;no(Fn?{selectedKeys:eo}:{selectedKeys:ca&&ha.key?[ha.key]:[]})};Be.useEffect(()=>{pr&&no({selectedKeys:xr||[]})},[xr]);const[Eo,mr]=Be.useState([]),Ho=eo=>{mr(eo)},[Vo,wa]=Be.useState(""),sa=eo=>{const{value:_o}=eo.target;wa(_o)};Be.useEffect(()=>{pr||wa("")},[pr]);const os=eo=>{const _o=eo&&eo.length?eo:null;if(_o===null&&(!Jn||!Jn.filteredKeys)||(0,Ke.Z)(_o,Jn==null?void 0:Jn.filteredKeys,!0))return null;ki({column:Ht,key:Sn,filteredKeys:_o})},ts=()=>{Pr(!1),os(Ki())},$o=function(){let{confirm:eo,closeDropdown:_o}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};eo&&os([]),_o&&Pr(!1),wa(""),Fr(Yi?(wr||[]).map(ha=>String(ha)):[])},oo=function(){let{closeDropdown:eo}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};eo&&Pr(!1),os(Ki())},pa=eo=>{eo&&xr!==void 0&&Fr(xr||[]),Pr(eo),!eo&&!Ht.filterDropdown&&ts()},as=Qe()({[`${Mn}-menu-without-submenu`]:!Il(Ht.filters||[])}),Va=eo=>{if(eo.target.checked){const _o=Ol(Ht==null?void 0:Ht.filters).map(ha=>String(ha));Fr(_o)}else Fr([])},Ms=eo=>{let{filters:_o}=eo;return(_o||[]).map((ha,ca)=>{const Vs=String(ha.value),Ns={title:ha.text,key:ha.value!==void 0?Vs:ca};return ha.children&&(Ns.children=Ms({filters:ha.children})),Ns})},bo=eo=>{var _o;return Object.assign(Object.assign({},eo),{text:eo.title,value:eo.key,children:((_o=eo.children)===null||_o===void 0?void 0:_o.map(ha=>bo(ha)))||[]})};let mo;if(typeof Ht.filterDropdown=="function")mo=Ht.filterDropdown({prefixCls:`${Mn}-custom`,setSelectedKeys:eo=>no({selectedKeys:eo}),selectedKeys:Ki(),confirm:oo,clearFilters:$o,filters:Ht.filters,visible:Wr,close:()=>{Pr(!1)}});else if(Ht.filterDropdown)mo=Ht.filterDropdown;else{const eo=Ki()||[],_o=()=>(Ht.filters||[]).length===0?Be.createElement($r.Z,{image:$r.Z.PRESENTED_IMAGE_SIMPLE,description:wi.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):Qn==="tree"?Be.createElement(Be.Fragment,null,Be.createElement(Dl,{filterSearch:kn,value:Vo,onChange:sa,tablePrefixCls:zt,locale:wi}),Be.createElement("div",{className:`${zt}-filter-dropdown-tree`},Fn?Be.createElement(Fo.default,{checked:eo.length===Ol(Ht.filters).length,indeterminate:eo.length>0&&eo.length<Ol(Ht.filters).length,className:`${zt}-filter-dropdown-checkall`,onChange:Va},wi.filterCheckall):null,Be.createElement(Ga.default,{checkable:!0,selectable:!1,blockNode:!0,multiple:Fn,checkStrictly:!Fn,className:`${Mn}-menu`,onCheck:xo,checkedKeys:eo,selectedKeys:eo,showIcon:!1,treeData:Ms({filters:Ht.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:Vo.trim()?ca=>typeof kn=="function"?kn(Vo,bo(ca)):Qr(Vo,ca.title):void 0}))):Be.createElement(Be.Fragment,null,Be.createElement(Dl,{filterSearch:kn,value:Vo,onChange:sa,tablePrefixCls:zt,locale:wi}),Be.createElement(Ko.default,{selectable:!0,multiple:Fn,prefixCls:`${Mn}-menu`,className:as,onSelect:no,onDeselect:no,selectedKeys:eo,getPopupContainer:ar,openKeys:Eo,onOpenChange:Ho,items:Ju({filters:Ht.filters||[],filterSearch:kn,prefixCls:nn,filteredKeys:Ki(),filterMultiple:Fn,searchValue:Vo})})),ha=()=>Yi?(0,Ke.Z)((wr||[]).map(ca=>String(ca)),eo,!0):eo.length===0;mo=Be.createElement(Be.Fragment,null,_o(),Be.createElement("div",{className:`${nn}-dropdown-btns`},Be.createElement(ma.ZP,{type:"link",size:"small",disabled:ha(),onClick:()=>$o()},wi.filterReset),Be.createElement(ma.ZP,{type:"primary",size:"small",onClick:ts},wi.filterConfirm)))}Ht.filterDropdown&&(mo=Be.createElement(So.J,{selectable:void 0},mo));const Mo=()=>Be.createElement(bl,{className:`${nn}-dropdown`},mo);let qr;typeof Ht.filterIcon=="function"?qr=Ht.filterIcon(zo):Ht.filterIcon?qr=Ht.filterIcon:qr=Be.createElement(Ma,null);const{direction:ya}=Be.useContext(qa.E_);return Be.createElement("div",{className:`${nn}-column`},Be.createElement("span",{className:`${zt}-column-title`},yi),Be.createElement(Ul.Z,{dropdownRender:Mo,trigger:["click"],open:Wr,onOpenChange:pa,getPopupContainer:ar,placement:ya==="rtl"?"bottomLeft":"bottomRight"},Be.createElement("span",{role:"button",tabIndex:-1,className:Qe()(`${nn}-trigger`,{active:zo}),onClick:eo=>{eo.stopPropagation()}},qr)))}var vs=nl;function ys(Je,Ye,jt){let zt=[];return(Je||[]).forEach((nn,Ht)=>{var Mn;const Sn=Na(Ht,jt);if(nn.filters||"filterDropdown"in nn||"onFilter"in nn)if("filteredValue"in nn){let Fn=nn.filteredValue;"filterDropdown"in nn||(Fn=(Mn=Fn==null?void 0:Fn.map(String))!==null&&Mn!==void 0?Mn:Fn),zt.push({column:nn,key:na(nn,Sn),filteredKeys:Fn,forceFiltered:nn.filtered})}else zt.push({column:nn,key:na(nn,Sn),filteredKeys:Ye&&nn.defaultFilteredValue?nn.defaultFilteredValue:void 0,forceFiltered:nn.filtered});"children"in nn&&(zt=[].concat((0,mi.Z)(zt),(0,mi.Z)(ys(nn.children,Ye,Sn))))}),zt}function Su(Je,Ye,jt,zt,nn,Ht,Mn,Sn){return jt.map((Fn,Qn)=>{const kn=Na(Qn,Sn),{filterMultiple:Jn=!0,filterMode:ki,filterSearch:wi}=Fn;let yi=Fn;if(yi.filters||yi.filterDropdown){const ar=na(yi,kn),Mi=zt.find(Ui=>{let{key:Yi}=Ui;return ar===Yi});yi=Object.assign(Object.assign({},yi),{title:Ui=>Be.createElement(vs,{tablePrefixCls:Je,prefixCls:`${Je}-filter`,dropdownPrefixCls:Ye,column:yi,columnKey:ar,filterState:Mi,filterMultiple:Jn,filterMode:ki,filterSearch:wi,triggerFilter:Ht,locale:nn,getPopupContainer:Mn},ka(Fn.title,Ui))})}return"children"in yi&&(yi=Object.assign(Object.assign({},yi),{children:Su(Je,Ye,yi.children,zt,nn,Ht,Mn,kn)})),yi})}function Iu(Je){const Ye={};return Je.forEach(jt=>{let{key:zt,filteredKeys:nn,column:Ht}=jt;const{filters:Mn,filterDropdown:Sn}=Ht;if(Sn)Ye[zt]=nn||null;else if(Array.isArray(nn)){const Fn=Ol(Mn);Ye[zt]=Fn.filter(Qn=>nn.includes(String(Qn)))}else Ye[zt]=null}),Ye}function Ys(Je,Ye){return Ye.reduce((jt,zt)=>{const{column:{onFilter:nn,filters:Ht},filteredKeys:Mn}=zt;return nn&&Mn&&Mn.length?jt.filter(Sn=>Mn.some(Fn=>{const Qn=Ol(Ht),kn=Qn.findIndex(ki=>String(ki)===String(Fn)),Jn=kn!==-1?Qn[kn]:Fn;return nn(Jn,Sn)})):jt},Je)}const ul=Je=>Je.flatMap(Ye=>"children"in Ye?[Ye].concat((0,mi.Z)(ul(Ye.children||[]))):[Ye]);function Mh(Je){let{prefixCls:Ye,dropdownPrefixCls:jt,mergedColumns:zt,onFilterChange:nn,getPopupContainer:Ht,locale:Mn}=Je;const Sn=Be.useMemo(()=>ul(zt||[]),[zt]),[Fn,Qn]=Be.useState(()=>ys(Sn,!0)),kn=Be.useMemo(()=>{const yi=ys(Sn,!1);if(yi.length===0)return yi;let ar=!0,Mi=!0;if(yi.forEach(Ui=>{let{filteredKeys:Yi}=Ui;Yi!==void 0?ar=!1:Mi=!1}),ar){const Ui=(Sn||[]).map((Yi,wr)=>na(Yi,Na(wr)));return Fn.filter(Yi=>{let{key:wr}=Yi;return Ui.includes(wr)}).map(Yi=>{const wr=Sn[Ui.findIndex(Xr=>Xr===Yi.key)];return Object.assign(Object.assign({},Yi),{column:Object.assign(Object.assign({},Yi.column),wr),forceFiltered:wr.filtered})})}return yi},[Sn,Fn]),Jn=Be.useMemo(()=>Iu(kn),[kn]),ki=yi=>{const ar=kn.filter(Mi=>{let{key:Ui}=Mi;return Ui!==yi.key});ar.push(yi),Qn(ar),nn(Iu(ar),ar)};return[yi=>Su(Ye,jt,yi,kn,Mn,ki,Ht),kn,Jn]}var uc=Mh;function Lh(Je,Ye,jt){const zt=Be.useRef({});function nn(Ht){if(!zt.current||zt.current.data!==Je||zt.current.childrenColumnName!==Ye||zt.current.getRowKey!==jt){let Sn=function(Fn){Fn.forEach((Qn,kn)=>{const Jn=jt(Qn,kn);Mn.set(Jn,Qn),Qn&&typeof Qn=="object"&&Ye in Qn&&Sn(Qn[Ye]||[])})};const Mn=new Map;Sn(Je),zt.current={data:Je,childrenColumnName:Ye,kvMap:Mn,getRowKey:jt}}return zt.current.kvMap.get(Ht)}return[nn]}var hc=ve(50371),Fh=function(Je,Ye){var jt={};for(var zt in Je)Object.prototype.hasOwnProperty.call(Je,zt)&&Ye.indexOf(zt)<0&&(jt[zt]=Je[zt]);if(Je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nn=0,zt=Object.getOwnPropertySymbols(Je);nn<zt.length;nn++)Ye.indexOf(zt[nn])<0&&Object.prototype.propertyIsEnumerable.call(Je,zt[nn])&&(jt[zt[nn]]=Je[zt[nn]]);return jt};const Ru=10;function Qu(Je,Ye){const jt={current:Je.current,pageSize:Je.pageSize};return Object.keys(Ye&&typeof Ye=="object"?Ye:{}).forEach(nn=>{const Ht=Je[nn];typeof Ht!="function"&&(jt[nn]=Ht)}),jt}function Rl(Je,Ye,jt){const zt=jt&&typeof jt=="object"?jt:{},{total:nn=0}=zt,Ht=Fh(zt,["total"]),[Mn,Sn]=(0,Be.useState)(()=>({current:"defaultCurrent"in Ht?Ht.defaultCurrent:1,pageSize:"defaultPageSize"in Ht?Ht.defaultPageSize:Ru})),Fn=(0,hc.Z)(Mn,Ht,{total:nn>0?nn:Je}),Qn=Math.ceil((nn||Je)/Fn.pageSize);Fn.current>Qn&&(Fn.current=Qn||1);const kn=(ki,wi)=>{Sn({current:ki!=null?ki:1,pageSize:wi||Fn.pageSize})},Jn=(ki,wi)=>{var yi;jt&&((yi=jt.onChange)===null||yi===void 0||yi.call(jt,ki,wi)),kn(ki,wi),Ye(ki,wi||(Fn==null?void 0:Fn.pageSize))};return jt===!1?[{},()=>{}]:[Object.assign(Object.assign({},Fn),{onChange:Jn}),kn]}var Hh=Rl,qu=ve(84105),eh=ve(35654),Co=ve(90782),Uo=ve(71430),Ws=ve(18929);const ds={},es="SELECT_ALL",Aa="SELECT_INVERT",za="SELECT_NONE",rs=[],Ka=(Je,Ye)=>{let jt=[];return(Ye||[]).forEach(zt=>{jt.push(zt),zt&&typeof zt=="object"&&Je in zt&&(jt=[].concat((0,mi.Z)(jt),(0,mi.Z)(Ka(Je,zt[Je]))))}),jt};var $s=(Je,Ye)=>{const{preserveSelectedRowKeys:jt,selectedRowKeys:zt,defaultSelectedRowKeys:nn,getCheckboxProps:Ht,onChange:Mn,onSelect:Sn,onSelectAll:Fn,onSelectInvert:Qn,onSelectNone:kn,onSelectMultiple:Jn,columnWidth:ki,type:wi,selections:yi,fixed:ar,renderCell:Mi,hideSelectAll:Ui,checkStrictly:Yi=!0}=Ye||{},{prefixCls:wr,data:Xr,pageData:so,getRecordByKey:pr,getRowKey:Ur,expandType:zo,childrenColumnName:Pr,locale:Wr,getPopupContainer:xr}=Je,[Ki,Fr]=(0,Ws.Z)(zt||nn||rs,{value:zt}),no=Be.useRef(new Map),xo=(0,Be.useCallback)(bo=>{if(jt){const mo=new Map;bo.forEach(Mo=>{let qr=pr(Mo);!qr&&no.current.has(Mo)&&(qr=no.current.get(Mo)),mo.set(Mo,qr)}),no.current=mo}},[pr,jt]);Be.useEffect(()=>{xo(Ki)},[Ki]);const{keyEntities:Eo}=(0,Be.useMemo)(()=>{if(Yi)return{keyEntities:null};let bo=Xr;if(jt){const mo=new Set(Xr.map((qr,ya)=>Ur(qr,ya))),Mo=Array.from(no.current).reduce((qr,ya)=>{let[eo,_o]=ya;return mo.has(eo)?qr:qr.concat(_o)},[]);bo=[].concat((0,mi.Z)(bo),(0,mi.Z)(Mo))}return(0,Uo.I8)(bo,{externalGetKey:Ur,childrenPropName:Pr})},[Xr,Ur,Yi,Pr,jt]),mr=(0,Be.useMemo)(()=>Ka(Pr,so),[Pr,so]),Ho=(0,Be.useMemo)(()=>{const bo=new Map;return mr.forEach((mo,Mo)=>{const qr=Ur(mo,Mo),ya=(Ht?Ht(mo):null)||{};bo.set(qr,ya)}),bo},[mr,Ur,Ht]),Vo=(0,Be.useCallback)(bo=>{var mo;return!!(!((mo=Ho.get(Ur(bo)))===null||mo===void 0)&&mo.disabled)},[Ho,Ur]),[wa,sa]=(0,Be.useMemo)(()=>{if(Yi)return[Ki||[],[]];const{checkedKeys:bo,halfCheckedKeys:mo}=(0,Co.S)(Ki,!0,Eo,Vo);return[bo||[],mo]},[Ki,Yi,Eo,Vo]),os=(0,Be.useMemo)(()=>{const bo=wi==="radio"?wa.slice(0,1):wa;return new Set(bo)},[wa,wi]),ts=(0,Be.useMemo)(()=>wi==="radio"?new Set:new Set(sa),[sa,wi]),[$o,oo]=(0,Be.useState)(null);Be.useEffect(()=>{Ye||Fr(rs)},[!!Ye]);const pa=(0,Be.useCallback)((bo,mo)=>{let Mo,qr;xo(bo),jt?(Mo=bo,qr=bo.map(ya=>no.current.get(ya))):(Mo=[],qr=[],bo.forEach(ya=>{const eo=pr(ya);eo!==void 0&&(Mo.push(ya),qr.push(eo))})),Fr(Mo),Mn==null||Mn(Mo,qr,{type:mo})},[Fr,pr,Mn,jt]),as=(0,Be.useCallback)((bo,mo,Mo,qr)=>{if(Sn){const ya=Mo.map(eo=>pr(eo));Sn(pr(bo),mo,ya,qr)}pa(Mo,"single")},[Sn,pr,pa]),Va=(0,Be.useMemo)(()=>!yi||Ui?null:(yi===!0?[es,Aa,za]:yi).map(mo=>mo===es?{key:"all",text:Wr.selectionAll,onSelect(){pa(Xr.map((Mo,qr)=>Ur(Mo,qr)).filter(Mo=>{const qr=Ho.get(Mo);return!(qr!=null&&qr.disabled)||os.has(Mo)}),"all")}}:mo===Aa?{key:"invert",text:Wr.selectInvert,onSelect(){const Mo=new Set(os);so.forEach((ya,eo)=>{const _o=Ur(ya,eo),ha=Ho.get(_o);ha!=null&&ha.disabled||(Mo.has(_o)?Mo.delete(_o):Mo.add(_o))});const qr=Array.from(Mo);Qn&&Qn(qr),pa(qr,"invert")}}:mo===za?{key:"none",text:Wr.selectNone,onSelect(){kn==null||kn(),pa(Array.from(os).filter(Mo=>{const qr=Ho.get(Mo);return qr==null?void 0:qr.disabled}),"none")}}:mo).map(mo=>Object.assign(Object.assign({},mo),{onSelect:function(){for(var Mo,qr,ya=arguments.length,eo=new Array(ya),_o=0;_o<ya;_o++)eo[_o]=arguments[_o];(qr=mo.onSelect)===null||qr===void 0||(Mo=qr).call.apply(Mo,[mo].concat(eo)),oo(null)}})),[yi,os,so,Ur,Qn,pa]);return[(0,Be.useCallback)(bo=>{var mo;if(!Ye)return bo.filter(Ea=>Ea!==ds);let Mo=(0,mi.Z)(bo);const qr=new Set(os),ya=mr.map(Ur).filter(Ea=>!Ho.get(Ea).disabled),eo=ya.every(Ea=>qr.has(Ea)),_o=ya.some(Ea=>qr.has(Ea)),ha=()=>{const Ea=[];eo?ya.forEach(ja=>{qr.delete(ja),Ea.push(ja)}):ya.forEach(ja=>{qr.has(ja)||(qr.add(ja),Ea.push(ja))});const Ta=Array.from(qr);Fn==null||Fn(!eo,Ta.map(ja=>pr(ja)),Ea.map(ja=>pr(ja))),pa(Ta,"all"),oo(null)};let ca;if(wi!=="radio"){let Ea;if(Va){const ra={getPopupContainer:xr,items:Va.map((Za,zs)=>{const{key:jl,text:au,onSelect:Yl}=Za;return{key:jl!=null?jl:zs,onClick:()=>{Yl==null||Yl(ya)},label:au}})};Ea=Be.createElement("div",{className:`${wr}-selection-extra`},Be.createElement(Ul.Z,{menu:ra,getPopupContainer:xr},Be.createElement("span",null,Be.createElement(qu.Z,null))))}const Ta=mr.map((ra,Za)=>{const zs=Ur(ra,Za),jl=Ho.get(zs)||{};return Object.assign({checked:qr.has(zs)},jl)}).filter(ra=>{let{disabled:Za}=ra;return Za}),ja=!!Ta.length&&Ta.length===mr.length,ms=ja&&Ta.every(ra=>{let{checked:Za}=ra;return Za}),js=ja&&Ta.some(ra=>{let{checked:Za}=ra;return Za});ca=!Ui&&Be.createElement("div",{className:`${wr}-selection`},Be.createElement(Fo.default,{checked:ja?ms:!!mr.length&&eo,indeterminate:ja?!ms&&js:!eo&&_o,onChange:ha,disabled:mr.length===0||ja,"aria-label":Ea?"Custom selection":"Select all",skipGroup:!0}),Ea)}let Vs;wi==="radio"?Vs=(Ea,Ta,ja)=>{const ms=Ur(Ta,ja),js=qr.has(ms);return{node:Be.createElement(Di.ZP,Object.assign({},Ho.get(ms),{checked:js,onClick:ra=>ra.stopPropagation(),onChange:ra=>{qr.has(ms)||as(ms,!0,[ms],ra.nativeEvent)}})),checked:js}}:Vs=(Ea,Ta,ja)=>{var ms;const js=Ur(Ta,ja),ra=qr.has(js),Za=ts.has(js),zs=Ho.get(js);let jl;return zo==="nest"?jl=Za:jl=(ms=zs==null?void 0:zs.indeterminate)!==null&&ms!==void 0?ms:Za,{node:Be.createElement(Fo.default,Object.assign({},zs,{indeterminate:jl,checked:ra,skipGroup:!0,onClick:au=>au.stopPropagation(),onChange:au=>{let{nativeEvent:Yl}=au;const{shiftKey:wu}=Yl;let Cu=-1,su=-1;if(wu&&Yi){const La=new Set([$o,js]);ya.some((Xs,fs)=>{if(La.has(Xs))if(Cu===-1)Cu=fs;else return su=fs,!0;return!1})}if(su!==-1&&Cu!==su&&Yi){const La=ya.slice(Cu,su+1),Xs=[];ra?La.forEach(Ha=>{qr.has(Ha)&&(Xs.push(Ha),qr.delete(Ha))}):La.forEach(Ha=>{qr.has(Ha)||(Xs.push(Ha),qr.add(Ha))});const fs=Array.from(qr);Jn==null||Jn(!ra,fs.map(Ha=>pr(Ha)),Xs.map(Ha=>pr(Ha))),pa(fs,"multiple")}else{const La=wa;if(Yi){const Xs=ra?(0,eh._5)(La,js):(0,eh.L0)(La,js);as(js,!ra,Xs,Yl)}else{const Xs=(0,Co.S)([].concat((0,mi.Z)(La),[js]),!0,Eo,Vo),{checkedKeys:fs,halfCheckedKeys:Ha}=Xs;let lu=fs;if(ra){const kh=new Set(fs);kh.delete(js),lu=(0,Co.S)(Array.from(kh),{checked:!1,halfCheckedKeys:Ha},Eo,Vo).checkedKeys}as(js,!ra,lu,Yl)}}oo(ra?null:js)}})),checked:ra}};const Ns=(Ea,Ta,ja)=>{const{node:ms,checked:js}=Vs(Ea,Ta,ja);return Mi?Mi(js,Ta,ja,ms):ms};if(!Mo.includes(ds))if(Mo.findIndex(Ea=>{var Ta;return((Ta=Ea[Ji])===null||Ta===void 0?void 0:Ta.columnType)==="EXPAND_COLUMN"})===0){const[Ea,...Ta]=Mo;Mo=[Ea,ds].concat((0,mi.Z)(Ta))}else Mo=[ds].concat((0,mi.Z)(Mo));const hl=Mo.indexOf(ds);Mo=Mo.filter((Ea,Ta)=>Ea!==ds||Ta===hl);const Ca=Mo[hl-1],Us=Mo[hl+1];let ws=ar;ws===void 0&&((Us==null?void 0:Us.fixed)!==void 0?ws=Us.fixed:(Ca==null?void 0:Ca.fixed)!==void 0&&(ws=Ca.fixed)),ws&&Ca&&((mo=Ca[Ji])===null||mo===void 0?void 0:mo.columnType)==="EXPAND_COLUMN"&&Ca.fixed===void 0&&(Ca.fixed=ws);const Rs=Qe()(`${wr}-selection-col`,{[`${wr}-selection-col-with-dropdown`]:yi&&wi==="checkbox"}),fh={fixed:ws,width:ki,className:`${wr}-selection-column`,title:Ye.columnTitle||ca,render:Ns,onCell:Ye.onCell,[Ji]:{className:Rs}};return Mo.map(Ea=>Ea===ds?fh:Ea)},[Ur,mr,Ye,wa,os,ts,ki,Va,zo,$o,Ho,Jn,as,Vo]),os]},va=ve(89489),rd=ve(59477),Mc=ve(6848);const Kt="ascend",_t="descend";function mn(Je){return typeof Je.sorter=="object"&&typeof Je.sorter.multiple=="number"?Je.sorter.multiple:!1}function it(Je){return typeof Je=="function"?Je:Je&&typeof Je=="object"&&Je.compare?Je.compare:!1}function yn(Je,Ye){return Ye?Je[Je.indexOf(Ye)+1]:Je[0]}function zr(Je,Ye,jt){let zt=[];function nn(Ht,Mn){zt.push({column:Ht,key:na(Ht,Mn),multiplePriority:mn(Ht),sortOrder:Ht.sortOrder})}return(Je||[]).forEach((Ht,Mn)=>{const Sn=Na(Mn,jt);Ht.children?("sortOrder"in Ht&&nn(Ht,Sn),zt=[].concat((0,mi.Z)(zt),(0,mi.Z)(zr(Ht.children,Ye,Sn)))):Ht.sorter&&("sortOrder"in Ht?nn(Ht,Sn):Ye&&Ht.defaultSortOrder&&zt.push({column:Ht,key:na(Ht,Sn),multiplePriority:mn(Ht),sortOrder:Ht.defaultSortOrder}))}),zt}function Bo(Je,Ye,jt,zt,nn,Ht,Mn,Sn){return(Ye||[]).map((Fn,Qn)=>{const kn=Na(Qn,Sn);let Jn=Fn;if(Jn.sorter){const ki=Jn.sortDirections||nn,wi=Jn.showSorterTooltip===void 0?Mn:Jn.showSorterTooltip,yi=na(Jn,kn),ar=jt.find(zo=>{let{key:Pr}=zo;return Pr===yi}),Mi=ar?ar.sortOrder:null,Ui=yn(ki,Mi);let Yi;if(Fn.sortIcon)Yi=Fn.sortIcon({sortOrder:Mi});else{const zo=ki.includes(Kt)&&Be.createElement(rd.Z,{className:Qe()(`${Je}-column-sorter-up`,{active:Mi===Kt})}),Pr=ki.includes(_t)&&Be.createElement(va.Z,{className:Qe()(`${Je}-column-sorter-down`,{active:Mi===_t})});Yi=Be.createElement("span",{className:Qe()(`${Je}-column-sorter`,{[`${Je}-column-sorter-full`]:!!(zo&&Pr)})},Be.createElement("span",{className:`${Je}-column-sorter-inner`,"aria-hidden":"true"},zo,Pr))}const{cancelSort:wr,triggerAsc:Xr,triggerDesc:so}=Ht||{};let pr=wr;Ui===_t?pr=so:Ui===Kt&&(pr=Xr);const Ur=typeof wi=="object"?wi:{title:pr};Jn=Object.assign(Object.assign({},Jn),{className:Qe()(Jn.className,{[`${Je}-column-sort`]:Mi}),title:zo=>{const Pr=Be.createElement("div",{className:`${Je}-column-sorters`},Be.createElement("span",{className:`${Je}-column-title`},ka(Fn.title,zo)),Yi);return wi?Be.createElement(Mc.Z,Object.assign({},Ur),Pr):Pr},onHeaderCell:zo=>{const Pr=Fn.onHeaderCell&&Fn.onHeaderCell(zo)||{},Wr=Pr.onClick,xr=Pr.onKeyDown;Pr.onClick=no=>{zt({column:Fn,key:yi,sortOrder:Ui,multiplePriority:mn(Fn)}),Wr==null||Wr(no)},Pr.onKeyDown=no=>{no.keyCode===bi.Z.ENTER&&(zt({column:Fn,key:yi,sortOrder:Ui,multiplePriority:mn(Fn)}),xr==null||xr(no))};const Ki=is(Fn.title,{}),Fr=Ki==null?void 0:Ki.toString();return Mi?Pr["aria-sort"]=Mi==="ascend"?"ascending":"descending":Pr["aria-label"]=Fr||"",Pr.className=Qe()(Pr.className,`${Je}-column-has-sorters`),Pr.tabIndex=0,Fn.ellipsis&&(Pr.title=(Ki!=null?Ki:"").toString()),Pr}})}return"children"in Jn&&(Jn=Object.assign(Object.assign({},Jn),{children:Bo(Je,Jn.children,jt,zt,nn,Ht,Mn,kn)})),Jn})}function Ir(Je){const{column:Ye,sortOrder:jt}=Je;return{column:Ye,order:jt,field:Ye.dataIndex,columnKey:Ye.key}}function _r(Je){const Ye=Je.filter(jt=>{let{sortOrder:zt}=jt;return zt}).map(Ir);return Ye.length===0&&Je.length?Object.assign(Object.assign({},Ir(Je[Je.length-1])),{column:void 0}):Ye.length<=1?Ye[0]||{}:Ye}function jo(Je,Ye,jt){const zt=Ye.slice().sort((Mn,Sn)=>Sn.multiplePriority-Mn.multiplePriority),nn=Je.slice(),Ht=zt.filter(Mn=>{let{column:{sorter:Sn},sortOrder:Fn}=Mn;return it(Sn)&&Fn});return Ht.length?nn.sort((Mn,Sn)=>{for(let Fn=0;Fn<Ht.length;Fn+=1){const Qn=Ht[Fn],{column:{sorter:kn},sortOrder:Jn}=Qn,ki=it(kn);if(ki&&Jn){const wi=ki(Mn,Sn,Jn);if(wi!==0)return Jn===Kt?wi:-wi}}return 0}).map(Mn=>{const Sn=Mn[jt];return Sn?Object.assign(Object.assign({},Mn),{[jt]:jo(Sn,Ye,jt)}):Mn}):nn}function po(Je){let{prefixCls:Ye,mergedColumns:jt,onSorterChange:zt,sortDirections:nn,tableLocale:Ht,showSorterTooltip:Mn}=Je;const[Sn,Fn]=Be.useState(zr(jt,!0)),Qn=Be.useMemo(()=>{let yi=!0;const ar=zr(jt,!1);if(!ar.length)return Sn;const Mi=[];function Ui(wr){yi?Mi.push(wr):Mi.push(Object.assign(Object.assign({},wr),{sortOrder:null}))}let Yi=null;return ar.forEach(wr=>{Yi===null?(Ui(wr),wr.sortOrder&&(wr.multiplePriority===!1?yi=!1:Yi=!0)):(Yi&&wr.multiplePriority!==!1||(yi=!1),Ui(wr))}),Mi},[jt,Sn]),kn=Be.useMemo(()=>{const yi=Qn.map(ar=>{let{column:Mi,sortOrder:Ui}=ar;return{column:Mi,order:Ui}});return{sortColumns:yi,sortColumn:yi[0]&&yi[0].column,sortOrder:yi[0]&&yi[0].order}},[Qn]);function Jn(yi){let ar;yi.multiplePriority===!1||!Qn.length||Qn[0].multiplePriority===!1?ar=[yi]:ar=[].concat((0,mi.Z)(Qn.filter(Mi=>{let{key:Ui}=Mi;return Ui!==yi.key})),[yi]),Fn(ar),zt(_r(ar),ar)}return[yi=>Bo(Ye,yi,Qn,Jn,nn,Ht,Mn),Qn,kn,()=>_r(Qn)]}function Go(Je,Ye){return Je.map(jt=>{const zt=Object.assign({},jt);return zt.title=ka(jt.title,Ye),"children"in zt&&(zt.children=Go(zt.children,Ye)),zt})}function ho(Je){return[Be.useCallback(jt=>Go(jt,Je),[Je])]}var _i=ur((Je,Ye)=>{const{_renderTimes:jt}=Je,{_renderTimes:zt}=Ye;return jt!==zt}),$i=Zo((Je,Ye)=>{const{_renderTimes:jt}=Je,{_renderTimes:zt}=Ye;return jt!==zt}),Tr=ve(64993),Ar=ve(17313),or=ve(83116),Cr=ve(37613),Rr=Je=>{const{componentCls:Ye}=Je,jt=`${Je.lineWidth}px ${Je.lineType} ${Je.tableBorderColor}`,zt=(nn,Ht,Mn)=>({[`&${Ye}-${nn}`]:{[`> ${Ye}-container`]:{[`> ${Ye}-content, > ${Ye}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${Ye}-expanded-row-fixed`]:{margin:`-${Ht}px -${Mn+Je.lineWidth}px`}}}}}});return{[`${Ye}-wrapper`]:{[`${Ye}${Ye}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${Ye}-title`]:{border:jt,borderBottom:0},[`> ${Ye}-container`]:{borderInlineStart:jt,borderTop:jt,[`
|
|
|
> ${Ye}-content,
|
|
|
> ${Ye}-header,
|
|
|
> ${Ye}-body,
|
|
|
> ${Ye}-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:jt},"> thead":{"> tr:not(:last-child) > th":{borderBottom:jt},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${Ye}-cell-fix-right-first::after`]:{borderInlineEnd:jt}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${Ye}-expanded-row-fixed`]:{margin:`-${Je.tablePaddingVertical}px -${Je.tablePaddingHorizontal+Je.lineWidth}px`,"&::after":{position:"absolute",top:0,insetInlineEnd:Je.lineWidth,bottom:0,borderInlineEnd:jt,content:'""'}}}}}},[`&${Ye}-scroll-horizontal`]:{[`> ${Ye}-container > ${Ye}-body`]:{"> table > tbody":{[`
|
|
|
> tr${Ye}-expanded-row,
|
|
|
> tr${Ye}-placeholder
|
|
|
`]:{"> th, > td":{borderInlineEnd:0}}}}}},zt("middle",Je.tablePaddingVerticalMiddle,Je.tablePaddingHorizontalMiddle)),zt("small",Je.tablePaddingVerticalSmall,Je.tablePaddingHorizontalSmall)),{[`> ${Ye}-footer`]:{border:jt,borderTop:0}}),[`${Ye}-cell`]:{[`${Ye}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${Je.lineWidth}px 0 ${Je.lineWidth}px ${Je.tableHeaderBg}`}},[`${Ye}-bordered ${Ye}-cell-scrollbar`]:{borderInlineEnd:jt}}}},cr=Je=>{const{componentCls:Ye}=Je;return{[`${Ye}-wrapper`]:{[`${Ye}-cell-ellipsis`]:Object.assign(Object.assign({},Ar.vS),{wordBreak:"keep-all",[`
|
|
|
&${Ye}-cell-fix-left-last,
|
|
|
&${Ye}-cell-fix-right-first
|
|
|
`]:{overflow:"visible",[`${Ye}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${Ye}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},Ii=Je=>{const{componentCls:Ye}=Je;return{[`${Ye}-wrapper`]:{[`${Ye}-tbody > tr${Ye}-placeholder`]:{textAlign:"center",color:Je.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:Je.colorBgContainer}}}}},Do=ve(15969),ko=Je=>{const{componentCls:Ye,antCls:jt,controlInteractiveSize:zt,motionDurationSlow:nn,lineWidth:Ht,paddingXS:Mn,lineType:Sn,tableBorderColor:Fn,tableExpandIconBg:Qn,tableExpandColumnWidth:kn,borderRadius:Jn,fontSize:ki,fontSizeSM:wi,lineHeight:yi,tablePaddingVertical:ar,tablePaddingHorizontal:Mi,tableExpandedRowBg:Ui,paddingXXS:Yi}=Je,wr=zt/2-Ht,Xr=wr*2+Ht*3,so=`${Ht}px ${Sn} ${Fn}`,pr=Yi-Ht;return{[`${Ye}-wrapper`]:{[`${Ye}-expand-icon-col`]:{width:kn},[`${Ye}-row-expand-icon-cell`]:{textAlign:"center",[`${Ye}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${Ye}-row-indent`]:{height:1,float:"left"},[`${Ye}-row-expand-icon`]:Object.assign(Object.assign({},(0,Do.N)(Je)),{position:"relative",float:"left",boxSizing:"border-box",width:Xr,height:Xr,padding:0,color:"inherit",lineHeight:`${Xr}px`,background:Qn,border:so,borderRadius:Jn,transform:`scale(${zt/Xr})`,transition:`all ${nn}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${nn} ease-out`,content:'""'},"&::before":{top:wr,insetInlineEnd:pr,insetInlineStart:pr,height:Ht},"&::after":{top:pr,bottom:pr,insetInlineStart:wr,width:Ht,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"}}),[`${Ye}-row-indent + ${Ye}-row-expand-icon`]:{marginTop:(ki*yi-Ht*3)/2-Math.ceil((wi*1.4-Ht*3)/2),marginInlineEnd:Mn},[`tr${Ye}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:Ui}},[`${jt}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${Ye}-expanded-row-fixed`]:{position:"relative",margin:`-${ar}px -${Mi}px`,padding:`${ar}px ${Mi}px`}}}},br=Je=>{const{componentCls:Ye,antCls:jt,iconCls:zt,tableFilterDropdownWidth:nn,tableFilterDropdownSearchWidth:Ht,paddingXXS:Mn,paddingXS:Sn,colorText:Fn,lineWidth:Qn,lineType:kn,tableBorderColor:Jn,tableHeaderIconColor:ki,fontSizeSM:wi,tablePaddingHorizontal:yi,borderRadius:ar,motionDurationSlow:Mi,colorTextDescription:Ui,colorPrimary:Yi,tableHeaderFilterActiveBg:wr,colorTextDisabled:Xr,tableFilterDropdownBg:so,tableFilterDropdownHeight:pr,controlItemBgHover:Ur,controlItemBgActive:zo,boxShadowSecondary:Pr,filterDropdownMenuBg:Wr}=Je,xr=`${jt}-dropdown`,Ki=`${Ye}-filter-dropdown`,Fr=`${jt}-tree`,no=`${Qn}px ${kn} ${Jn}`;return[{[`${Ye}-wrapper`]:{[`${Ye}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${Ye}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:-Mn,marginInline:`${Mn}px ${-yi/2}px`,padding:`0 ${Mn}px`,color:ki,fontSize:wi,borderRadius:ar,cursor:"pointer",transition:`all ${Mi}`,"&:hover":{color:Ui,background:wr},"&.active":{color:Yi}}}},{[`${jt}-dropdown`]:{[Ki]:Object.assign(Object.assign({},(0,Ar.Wf)(Je)),{minWidth:nn,backgroundColor:so,borderRadius:ar,boxShadow:Pr,overflow:"hidden",[`${xr}-menu`]:{maxHeight:pr,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:Wr,"&:empty::after":{display:"block",padding:`${Sn}px 0`,color:Xr,fontSize:wi,textAlign:"center",content:'"Not Found"'}},[`${Ki}-tree`]:{paddingBlock:`${Sn}px 0`,paddingInline:Sn,[Fr]:{padding:0},[`${Fr}-treenode ${Fr}-node-content-wrapper:hover`]:{backgroundColor:Ur},[`${Fr}-treenode-checkbox-checked ${Fr}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:zo}}},[`${Ki}-search`]:{padding:Sn,borderBottom:no,"&-input":{input:{minWidth:Ht},[zt]:{color:Xr}}},[`${Ki}-checkall`]:{width:"100%",marginBottom:Mn,marginInlineStart:Mn},[`${Ki}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${Sn-Qn}px ${Sn}px`,overflow:"hidden",borderTop:no}})}},{[`${jt}-dropdown ${Ki}, ${Ki}-submenu`]:{[`${jt}-checkbox-wrapper + span`]:{paddingInlineStart:Sn,color:Fn},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},Bs=Je=>{const{componentCls:Ye,lineWidth:jt,colorSplit:zt,motionDurationSlow:nn,zIndexTableFixed:Ht,tableBg:Mn,zIndexTableSticky:Sn}=Je,Fn=zt;return{[`${Ye}-wrapper`]:{[`
|
|
|
${Ye}-cell-fix-left,
|
|
|
${Ye}-cell-fix-right
|
|
|
`]:{position:"sticky !important",zIndex:Ht,background:Mn},[`
|
|
|
${Ye}-cell-fix-left-first::after,
|
|
|
${Ye}-cell-fix-left-last::after
|
|
|
`]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:-jt,width:30,transform:"translateX(100%)",transition:`box-shadow ${nn}`,content:'""',pointerEvents:"none"},[`${Ye}-cell-fix-left-all::after`]:{display:"none"},[`
|
|
|
${Ye}-cell-fix-right-first::after,
|
|
|
${Ye}-cell-fix-right-last::after
|
|
|
`]:{position:"absolute",top:0,bottom:-jt,left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${nn}`,content:'""',pointerEvents:"none"},[`${Ye}-container`]:{"&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:Sn+1,width:30,transition:`box-shadow ${nn}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${Ye}-ping-left`]:{[`&:not(${Ye}-has-fix-left) ${Ye}-container`]:{position:"relative","&::before":{boxShadow:`inset 10px 0 8px -8px ${Fn}`}},[`
|
|
|
${Ye}-cell-fix-left-first::after,
|
|
|
${Ye}-cell-fix-left-last::after
|
|
|
`]:{boxShadow:`inset 10px 0 8px -8px ${Fn}`},[`${Ye}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${Ye}-ping-right`]:{[`&:not(${Ye}-has-fix-right) ${Ye}-container`]:{position:"relative","&::after":{boxShadow:`inset -10px 0 8px -8px ${Fn}`}},[`
|
|
|
${Ye}-cell-fix-right-first::after,
|
|
|
${Ye}-cell-fix-right-last::after
|
|
|
`]:{boxShadow:`inset -10px 0 8px -8px ${Fn}`}}}}},Ia=Je=>{const{componentCls:Ye,antCls:jt}=Je;return{[`${Ye}-wrapper`]:{[`${Ye}-pagination${jt}-pagination`]:{margin:`${Je.margin}px 0`},[`${Ye}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:Je.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},_a=Je=>{const{componentCls:Ye,tableRadius:jt}=Je;return{[`${Ye}-wrapper`]:{[Ye]:{[`${Ye}-title, ${Ye}-header`]:{borderRadius:`${jt}px ${jt}px 0 0`},[`${Ye}-title + ${Ye}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${Ye}-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:jt,borderStartEndRadius:jt,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:jt},"> *:last-child":{borderStartEndRadius:jt}}},"&-footer":{borderRadius:`0 0 ${jt}px ${jt}px`}}}}},ju=Je=>{const{componentCls:Ye}=Je;return{[`${Ye}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${Ye}-pagination-left`]:{justifyContent:"flex-end"},[`${Ye}-pagination-right`]:{justifyContent:"flex-start"},[`${Ye}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${Ye}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${Ye}-row-indent`]:{float:"right"}}}}},Bh=Je=>{const{componentCls:Ye,antCls:jt,iconCls:zt,fontSizeIcon:nn,padding:Ht,paddingXS:Mn,tableHeaderIconColor:Sn,tableHeaderIconColorHover:Fn,tableSelectionColumnWidth:Qn}=Je;return{[`${Ye}-wrapper`]:{[`${Ye}-selection-col`]:{width:Qn,[`&${Ye}-selection-col-with-dropdown`]:{width:Qn+nn+Ht/4}},[`${Ye}-bordered ${Ye}-selection-col`]:{width:Qn+Mn*2,[`&${Ye}-selection-col-with-dropdown`]:{width:Qn+nn+Ht/4+Mn*2}},[`
|
|
|
table tr th${Ye}-selection-column,
|
|
|
table tr td${Ye}-selection-column
|
|
|
`]:{paddingInlineEnd:Je.paddingXS,paddingInlineStart:Je.paddingXS,textAlign:"center",[`${jt}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${Ye}-selection-column${Ye}-cell-fix-left`]:{zIndex:Je.zIndexTableFixed+1},[`table tr th${Ye}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${Ye}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${Ye}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${Je.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:`${Je.tablePaddingHorizontal/4}px`,[zt]:{color:Sn,fontSize:nn,verticalAlign:"baseline","&:hover":{color:Fn}}}}}},zu=Je=>{const{componentCls:Ye}=Je,jt=(zt,nn,Ht,Mn)=>({[`${Ye}${Ye}-${zt}`]:{fontSize:Mn,[`
|
|
|
${Ye}-title,
|
|
|
${Ye}-footer,
|
|
|
${Ye}-cell,
|
|
|
${Ye}-thead > tr > th,
|
|
|
${Ye}-tbody > tr > th,
|
|
|
${Ye}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{padding:`${nn}px ${Ht}px`},[`${Ye}-filter-trigger`]:{marginInlineEnd:`-${Ht/2}px`},[`${Ye}-expanded-row-fixed`]:{margin:`-${nn}px -${Ht}px`},[`${Ye}-tbody`]:{[`${Ye}-wrapper:only-child ${Ye}`]:{marginBlock:`-${nn}px`,marginInline:`${Je.tableExpandColumnWidth-Ht}px -${Ht}px`}},[`${Ye}-selection-column`]:{paddingInlineStart:`${Ht/4}px`}}});return{[`${Ye}-wrapper`]:Object.assign(Object.assign({},jt("middle",Je.tablePaddingVerticalMiddle,Je.tablePaddingHorizontalMiddle,Je.tableFontSizeMiddle)),jt("small",Je.tablePaddingVerticalSmall,Je.tablePaddingHorizontalSmall,Je.tableFontSizeSmall))}},Ml=Je=>{const{componentCls:Ye,marginXXS:jt,fontSizeIcon:zt,tableHeaderIconColor:nn,tableHeaderIconColorHover:Ht}=Je;return{[`${Ye}-wrapper`]:{[`${Ye}-thead th${Ye}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${Je.motionDurationSlow}`,"&:hover":{background:Je.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:Je.colorPrimary},[`
|
|
|
&${Ye}-cell-fix-left:hover,
|
|
|
&${Ye}-cell-fix-right:hover
|
|
|
`]:{background:Je.tableFixedHeaderSortActiveBg}},[`${Ye}-thead th${Ye}-column-sort`]:{background:Je.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${Ye}-column-sort`]:{background:Je.tableBodySortBg},[`${Ye}-column-title`]:{position:"relative",zIndex:1,flex:1},[`${Ye}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${Ye}-column-sorter`]:{marginInlineStart:jt,color:nn,fontSize:0,transition:`color ${Je.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:zt,"&.active":{color:Je.colorPrimary}},[`${Ye}-column-sorter-up + ${Ye}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${Ye}-column-sorters:hover ${Ye}-column-sorter`]:{color:Ht}}}},Nh=Je=>{const{componentCls:Ye,opacityLoading:jt,tableScrollThumbBg:zt,tableScrollThumbBgHover:nn,tableScrollThumbSize:Ht,tableScrollBg:Mn,zIndexTableSticky:Sn,stickyScrollBarBorderRadius:Fn}=Je,Qn=`${Je.lineWidth}px ${Je.lineType} ${Je.tableBorderColor}`;return{[`${Ye}-wrapper`]:{[`${Ye}-sticky`]:{"&-holder":{position:"sticky",zIndex:Sn,background:Je.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${Ht}px !important`,zIndex:Sn,display:"flex",alignItems:"center",background:Mn,borderTop:Qn,opacity:jt,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:Ht,backgroundColor:zt,borderRadius:Fn,transition:`all ${Je.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:nn}}}}}}},_u=Je=>{const{componentCls:Ye,lineWidth:jt,tableBorderColor:zt}=Je,nn=`${jt}px ${Je.lineType} ${zt}`;return{[`${Ye}-wrapper`]:{[`${Ye}-summary`]:{position:"relative",zIndex:Je.zIndexTableFixed,background:Je.tableBg,"> tr":{"> th, > td":{borderBottom:nn}}},[`div${Ye}-summary`]:{boxShadow:`0 -${jt}px 0 ${zt}`}}}},xu=Je=>{const{componentCls:Ye}=Je,jt=`${Je.lineWidth}px ${Je.lineType} ${Je.tableBorderColor}`,zt=`${Ye}-expanded-row-cell`;return{[`${Ye}-wrapper`]:{[`${Ye}-tbody-virtual`]:{[`${Ye}-row`]:{display:"flex",boxSizing:"border-box",width:"100%"},[`${Ye}-cell`]:{borderBottom:jt},[`${Ye}-expanded-row`]:{[`${zt}${zt}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${Je.lineWidth}px)`,borderInlineEnd:"none"}}},[`${Ye}-bordered`]:{[`${Ye}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:jt,position:"absolute"},[`${Ye}-cell`]:{borderInlineEnd:jt,[`&${Ye}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:-Je.lineWidth,borderInlineStart:jt}}}}}}};const Pu=Je=>{const{componentCls:Ye,fontWeightStrong:jt,tablePaddingVertical:zt,tablePaddingHorizontal:nn,lineWidth:Ht,lineType:Mn,tableBorderColor:Sn,tableFontSize:Fn,tableBg:Qn,tableRadius:kn,tableHeaderTextColor:Jn,motionDurationMid:ki,tableHeaderBg:wi,tableHeaderCellSplitColor:yi,tableRowHoverBg:ar,tableSelectedRowBg:Mi,tableSelectedRowHoverBg:Ui,tableFooterTextColor:Yi,tableFooterBg:wr,paddingContentVerticalLG:Xr}=Je,so=`${Ht}px ${Mn} ${Sn}`;return{[`${Ye}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},(0,Ar.dF)()),{[Ye]:Object.assign(Object.assign({},(0,Ar.Wf)(Je)),{fontSize:Fn,background:Qn,borderRadius:`${kn}px ${kn}px 0 0`}),table:{width:"100%",textAlign:"start",borderRadius:`${kn}px ${kn}px 0 0`,borderCollapse:"separate",borderSpacing:0},[`
|
|
|
${Ye}-cell,
|
|
|
${Ye}-thead > tr > th,
|
|
|
${Ye}-tbody > tr > th,
|
|
|
${Ye}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{position:"relative",padding:`${Xr}px ${nn}px`,overflowWrap:"break-word"},[`${Ye}-title`]:{padding:`${zt}px ${nn}px`},[`${Ye}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:Jn,fontWeight:jt,textAlign:"start",background:wi,borderBottom:so,transition:`background ${ki} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${Ye}-selection-column):not(${Ye}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:yi,transform:"translateY(-50%)",transition:`background-color ${ki}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${Ye}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${ki}, border-color ${ki}`,borderBottom:so,[`
|
|
|
> ${Ye}-wrapper:only-child,
|
|
|
> ${Ye}-expanded-row-fixed > ${Ye}-wrapper:only-child
|
|
|
`]:{[Ye]:{marginBlock:`-${zt}px`,marginInline:`${Je.tableExpandColumnWidth-nn}px -${nn}px`,[`${Ye}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:Jn,fontWeight:jt,textAlign:"start",background:wi,borderBottom:so,transition:`background ${ki} ease`},[`
|
|
|
&${Ye}-row:hover > th,
|
|
|
&${Ye}-row:hover > td,
|
|
|
> th${Ye}-cell-row-hover,
|
|
|
> td${Ye}-cell-row-hover
|
|
|
`]:{background:ar},[`&${Ye}-row-selected`]:{"> th, > td":{background:Mi},"&:hover > th, &:hover > td":{background:Ui}}}},[`${Ye}-footer`]:{padding:`${zt}px ${nn}px`,color:Yi,background:wr}})}};var dh=(0,or.Z)("Table",Je=>{const{colorTextHeading:Ye,colorSplit:jt,colorIcon:zt,colorIconHover:nn,opacityLoading:Ht,colorBgContainer:Mn,controlInteractiveSize:Sn,headerBg:Fn,headerColor:Qn,headerSortActiveBg:kn,headerSortHoverBg:Jn,bodySortBg:ki,rowHoverBg:wi,rowSelectedBg:yi,rowSelectedHoverBg:ar,rowExpandedBg:Mi,cellPaddingBlock:Ui,cellPaddingInline:Yi,cellPaddingBlockMD:wr,cellPaddingInlineMD:Xr,cellPaddingBlockSM:so,cellPaddingInlineSM:pr,borderColor:Ur,footerBg:zo,footerColor:Pr,headerBorderRadius:Wr,cellFontSize:xr,cellFontSizeMD:Ki,cellFontSizeSM:Fr,headerSplitColor:no,fixedHeaderSortActiveBg:xo,headerFilterHoverBg:Eo,filterDropdownBg:mr,expandIconBg:Ho,selectionColumnWidth:Vo,stickyScrollBarBg:wa}=Je,sa=new Tr.C(zt),os=new Tr.C(nn),ts=2,$o=(0,Cr.TS)(Je,{tableFontSize:xr,tableBg:Mn,tableRadius:Wr,tablePaddingVertical:Ui,tablePaddingHorizontal:Yi,tablePaddingVerticalMiddle:wr,tablePaddingHorizontalMiddle:Xr,tablePaddingVerticalSmall:so,tablePaddingHorizontalSmall:pr,tableBorderColor:Ur,tableHeaderTextColor:Qn,tableHeaderBg:Fn,tableFooterTextColor:Pr,tableFooterBg:zo,tableHeaderCellSplitColor:no,tableHeaderSortBg:kn,tableHeaderSortHoverBg:Jn,tableHeaderIconColor:sa.clone().setAlpha(sa.getAlpha()*Ht).toRgbString(),tableHeaderIconColorHover:os.clone().setAlpha(os.getAlpha()*Ht).toRgbString(),tableBodySortBg:ki,tableFixedHeaderSortActiveBg:xo,tableHeaderFilterActiveBg:Eo,tableFilterDropdownBg:mr,tableRowHoverBg:wi,tableSelectedRowBg:yi,tableSelectedRowHoverBg:ar,zIndexTableFixed:ts,zIndexTableSticky:ts+1,tableFontSizeMiddle:Ki,tableFontSizeSmall:Fr,tableSelectionColumnWidth:Vo,tableExpandIconBg:Ho,tableExpandColumnWidth:Sn+2*Je.padding,tableExpandedRowBg:Mi,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:wa,tableScrollThumbBgHover:Ye,tableScrollBg:jt});return[Pu($o),Ia($o),_u($o),Ml($o),br($o),Rr($o),_a($o),ko($o),_u($o),Ii($o),Bh($o),Bs($o),Nh($o),cr($o),zu($o),ju($o),xu($o)]},Je=>{const{colorFillAlter:Ye,colorBgContainer:jt,colorTextHeading:zt,colorFillSecondary:nn,colorFillContent:Ht,controlItemBgActive:Mn,controlItemBgActiveHover:Sn,padding:Fn,paddingSM:Qn,paddingXS:kn,colorBorderSecondary:Jn,borderRadiusLG:ki,fontSize:wi,controlHeight:yi,colorTextPlaceholder:ar}=Je,Mi=new Tr.C(nn).onBackground(jt).toHexShortString(),Ui=new Tr.C(Ht).onBackground(jt).toHexShortString(),Yi=new Tr.C(Ye).onBackground(jt).toHexShortString();return{headerBg:Yi,headerColor:zt,headerSortActiveBg:Mi,headerSortHoverBg:Ui,bodySortBg:Yi,rowHoverBg:Yi,rowSelectedBg:Mn,rowSelectedHoverBg:Sn,rowExpandedBg:Ye,cellPaddingBlock:Fn,cellPaddingInline:Fn,cellPaddingBlockMD:Qn,cellPaddingInlineMD:kn,cellPaddingBlockSM:kn,cellPaddingInlineSM:kn,borderColor:Jn,headerBorderRadius:ki,footerBg:Yi,footerColor:zt,cellFontSize:wi,cellFontSizeMD:wi,cellFontSizeSM:wi,headerSplitColor:Jn,fixedHeaderSortActiveBg:Mi,headerFilterHoverBg:Ht,filterDropdownMenuBg:jt,filterDropdownBg:jt,expandIconBg:jt,selectionColumnWidth:yi,stickyScrollBarBg:ar,stickyScrollBarBorderRadius:100}});const Lc=[],Fc=(Je,Ye)=>{const{prefixCls:jt,className:zt,rootClassName:nn,style:Ht,size:Mn,bordered:Sn,dropdownPrefixCls:Fn,dataSource:Qn,pagination:kn,rowSelection:Jn,rowKey:ki="key",rowClassName:wi,columns:yi,children:ar,childrenColumnName:Mi,onChange:Ui,getPopupContainer:Yi,loading:wr,expandIcon:Xr,expandable:so,expandedRowRender:pr,expandIconColumnIndex:Ur,indentSize:zo,scroll:Pr,sortDirections:Wr,locale:xr,showSorterTooltip:Ki=!0,virtual:Fr}=Je,no=Be.useMemo(()=>yi||Ut(ar),[yi,ar]),xo=Be.useMemo(()=>no.some(Sa=>Sa.responsive),[no]),Eo=(0,Xn.Z)(xo),mr=Be.useMemo(()=>{const Sa=new Set(Object.keys(Eo).filter(Ua=>Eo[Ua]));return no.filter(Ua=>!Ua.responsive||Ua.responsive.some(ks=>Sa.has(ks)))},[no,Eo]),Ho=(0,jr.Z)(Je,["className","style","columns"]),{locale:Vo=yr.Z,direction:wa,table:sa,renderEmpty:os,getPrefixCls:ts,getPopupContainer:$o}=Be.useContext(qa.E_),oo=(0,hr.Z)(Mn),pa=Object.assign(Object.assign({},Vo.Table),xr),as=Qn||Lc,Va=ts("table",jt),Ms=ts("dropdown",Fn),bo=Object.assign({childrenColumnName:Mi,expandIconColumnIndex:Ur},so),{childrenColumnName:mo="children"}=bo,Mo=Be.useMemo(()=>as.some(Sa=>Sa==null?void 0:Sa[mo])?"nest":pr||so&&so.expandedRowRender?"row":null,[as]),qr={body:Be.useRef()},ya=Be.useMemo(()=>typeof ki=="function"?ki:Sa=>Sa==null?void 0:Sa[ki],[ki]),[eo]=Lh(as,mo,ya),_o={},ha=function(Sa,Ua){let ks=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var Ya,fa,_s;const zl=Object.assign(Object.assign({},_o),Sa);ks&&((Ya=_o.resetPagination)===null||Ya===void 0||Ya.call(_o),!((fa=zl.pagination)===null||fa===void 0)&&fa.current&&(zl.pagination.current=1),kn&&kn.onChange&&kn.onChange(1,(_s=zl.pagination)===null||_s===void 0?void 0:_s.pageSize)),Pr&&Pr.scrollToFirstRowOnChange!==!1&&qr.body.current&&(0,To.Z)(0,{getContainer:()=>qr.body.current}),Ui==null||Ui(zl.pagination,zl.filters,zl.sorter,{currentDataSource:Ys(jo(as,zl.sorterStates,mo),zl.filterStates),action:Ua})},ca=(Sa,Ua)=>{ha({sorter:Sa,sorterStates:Ua},"sort",!1)},[Vs,Ns,hl,Ca]=po({prefixCls:Va,mergedColumns:mr,onSorterChange:ca,sortDirections:Wr||["ascend","descend"],tableLocale:pa,showSorterTooltip:Ki}),Us=Be.useMemo(()=>jo(as,Ns,mo),[as,Ns]);_o.sorter=Ca(),_o.sorterStates=Ns;const ws=(Sa,Ua)=>{ha({filters:Sa,filterStates:Ua},"filter",!0)},[Rs,fh,Ea]=uc({prefixCls:Va,locale:pa,dropdownPrefixCls:Ms,mergedColumns:mr,onFilterChange:ws,getPopupContainer:Yi||$o}),Ta=Ys(Us,fh);_o.filters=Ea,_o.filterStates=fh;const ja=Be.useMemo(()=>{const Sa={};return Object.keys(Ea).forEach(Ua=>{Ea[Ua]!==null&&(Sa[Ua]=Ea[Ua])}),Object.assign(Object.assign({},hl),{filters:Sa})},[hl,Ea]),[ms]=ho(ja),js=(Sa,Ua)=>{ha({pagination:Object.assign(Object.assign({},_o.pagination),{current:Sa,pageSize:Ua})},"paginate")},[ra,Za]=Hh(Ta.length,js,kn);_o.pagination=kn===!1?{}:Qu(ra,kn),_o.resetPagination=Za;const zs=Be.useMemo(()=>{if(kn===!1||!ra.pageSize)return Ta;const{current:Sa=1,total:Ua,pageSize:ks=Ru}=ra;return Ta.length<Ua?Ta.length>ks?Ta.slice((Sa-1)*ks,Sa*ks):Ta:Ta.slice((Sa-1)*ks,Sa*ks)},[!!kn,Ta,ra&&ra.current,ra&&ra.pageSize,ra&&ra.total]),[jl,au]=$s({prefixCls:Va,data:Ta,pageData:zs,getRowKey:ya,getRecordByKey:eo,expandType:Mo,childrenColumnName:mo,locale:pa,getPopupContainer:Yi||$o},Jn),Yl=(Sa,Ua,ks)=>{let Ya;return typeof wi=="function"?Ya=Qe()(wi(Sa,Ua,ks)):Ya=Qe()(wi),Qe()({[`${Va}-row-selected`]:au.has(ya(Sa,Ua))},Ya)};bo.__PARENT_RENDER_ICON__=bo.expandIcon,bo.expandIcon=bo.expandIcon||Xr||ta(pa),Mo==="nest"&&bo.expandIconColumnIndex===void 0?bo.expandIconColumnIndex=Jn?1:0:bo.expandIconColumnIndex>0&&Jn&&(bo.expandIconColumnIndex-=1),typeof bo.indentSize!="number"&&(bo.indentSize=typeof zo=="number"?zo:15);const wu=Be.useCallback(Sa=>ms(jl(Rs(Vs(Sa)))),[Vs,Rs,jl]);let Cu,su;if(kn!==!1&&(ra!=null&&ra.total)){let Sa;ra.size?Sa=ra.size:Sa=oo==="small"||oo==="middle"?"small":void 0;const Ua=fa=>Be.createElement(wo.Z,Object.assign({},ra,{className:Qe()(`${Va}-pagination ${Va}-pagination-${fa}`,ra.className),size:Sa})),ks=wa==="rtl"?"left":"right",{position:Ya}=ra;if(Ya!==null&&Array.isArray(Ya)){const fa=Ya.find(Zu=>Zu.includes("top")),_s=Ya.find(Zu=>Zu.includes("bottom")),zl=Ya.every(Zu=>`${Zu}`=="none");!fa&&!_s&&!zl&&(su=Ua(ks)),fa&&(Cu=Ua(fa.toLowerCase().replace("top",""))),_s&&(su=Ua(_s.toLowerCase().replace("bottom","")))}else su=Ua(ks)}let La;typeof wr=="boolean"?La={spinning:wr}:typeof wr=="object"&&(La=Object.assign({spinning:!0},wr));const[Xs,fs]=dh(Va),[,Ha]=(0,No.Z)(),lu=Qe()(`${Va}-wrapper`,sa==null?void 0:sa.className,{[`${Va}-wrapper-rtl`]:wa==="rtl"},zt,nn,fs),kh=Object.assign(Object.assign({},sa==null?void 0:sa.style),Ht),Eu=xr&&xr.emptyText||(os==null?void 0:os("Table"))||Be.createElement(Mr.Z,{componentName:"Table"}),th=Fr?$i:_i,gh={},Xl=Be.useMemo(()=>{const{fontSize:Sa,lineHeight:Ua,padding:ks,paddingXS:Ya,paddingSM:fa}=Ha,_s=Math.floor(Sa*Ua);switch(oo){case"large":return ks*2+_s;case"small":return Ya*2+_s;default:return fa*2+_s}},[Ha,oo]);return Fr&&(gh.listItemHeight=Xl),Xs(Be.createElement("div",{ref:Ye,className:lu,style:kh},Be.createElement(ua.Z,Object.assign({spinning:!1},La),Cu,Be.createElement(th,Object.assign({},gh,Ho,{columns:mr,direction:wa,expandable:bo,prefixCls:Va,className:Qe()({[`${Va}-middle`]:oo==="middle",[`${Va}-small`]:oo==="small",[`${Va}-bordered`]:Sn,[`${Va}-empty`]:as.length===0}),data:zs,rowKey:ya,rowClassName:Yl,emptyText:Eu,internalHooks:De,internalRefs:qr,transformColumns:wu})),su)))};var Bc=Be.forwardRef(Fc);const od=(Je,Ye)=>{const jt=Be.useRef(0);return jt.current+=1,Be.createElement(Bc,Object.assign({},Je,{ref:Ye,_renderTimes:jt.current}))},Zn=Be.forwardRef(od);Zn.SELECTION_COLUMN=ds,Zn.EXPAND_COLUMN=ce,Zn.SELECTION_ALL=es,Zn.SELECTION_INVERT=Aa,Zn.SELECTION_NONE=za,Zn.Column=Or,Zn.ColumnGroup=fo,Zn.Summary=qe;var Sr=Zn,Jo=Sr},12563:function(Pn,an,ve){"use strict";ve.d(an,{default:function(){return gt}});var ce=ve(59301),De=ve(99267),_e=ve(92310),Ct=ve.n(_e),Ze=ve(36785),Ke=ve(47729),Be=ve(14088),mt=ve(36355),ct=ve(17313),He=ve(37613),Et=ve(83116);const ht=je=>{const{paddingXXS:Tt,lineWidth:Qe,tagPaddingHorizontal:bt,componentCls:Nt}=je,At=bt-Qe,Zt=Tt-Qe;return{[Nt]:Object.assign(Object.assign({},(0,ct.Wf)(je)),{display:"inline-block",height:"auto",marginInlineEnd:je.marginXS,paddingInline:At,fontSize:je.tagFontSize,lineHeight:je.tagLineHeight,whiteSpace:"nowrap",background:je.defaultBg,border:`${je.lineWidth}px ${je.lineType} ${je.colorBorder}`,borderRadius:je.borderRadiusSM,opacity:1,transition:`all ${je.motionDurationMid}`,textAlign:"start",position:"relative",[`&${Nt}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:je.defaultColor},[`${Nt}-close-icon`]:{marginInlineStart:Zt,color:je.colorTextDescription,fontSize:je.tagIconSize,cursor:"pointer",transition:`all ${je.motionDurationMid}`,"&:hover":{color:je.colorTextHeading}},[`&${Nt}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${je.iconCls}-close, ${je.iconCls}-close:hover`]:{color:je.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${Nt}-checkable-checked):hover`]:{color:je.colorPrimary,backgroundColor:je.colorFillSecondary},"&:active, &-checked":{color:je.colorTextLightSolid},"&-checked":{backgroundColor:je.colorPrimary,"&:hover":{backgroundColor:je.colorPrimaryHover}},"&:active":{backgroundColor:je.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${je.iconCls} + span, > span + ${je.iconCls}`]:{marginInlineStart:At}}),[`${Nt}-borderless`]:{borderColor:"transparent",background:je.tagBorderlessBg}}},dt=je=>{const{lineWidth:Tt,fontSizeIcon:Qe}=je,bt=je.fontSizeSM,Nt=`${je.lineHeightSM*bt}px`;return(0,He.TS)(je,{tagFontSize:bt,tagLineHeight:Nt,tagIconSize:Qe-2*Tt,tagPaddingHorizontal:8,tagBorderlessBg:je.colorFillTertiary})},Ae=je=>({defaultBg:je.colorFillQuaternary,defaultColor:je.colorText});var te=(0,Et.Z)("Tag",je=>{const Tt=dt(je);return ht(Tt)},Ae),ee=function(je,Tt){var Qe={};for(var bt in je)Object.prototype.hasOwnProperty.call(je,bt)&&Tt.indexOf(bt)<0&&(Qe[bt]=je[bt]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Nt=0,bt=Object.getOwnPropertySymbols(je);Nt<bt.length;Nt++)Tt.indexOf(bt[Nt])<0&&Object.prototype.propertyIsEnumerable.call(je,bt[Nt])&&(Qe[bt[Nt]]=je[bt[Nt]]);return Qe},se=je=>{const{prefixCls:Tt,style:Qe,className:bt,checked:Nt,onChange:At,onClick:Zt}=je,Yt=ee(je,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:ut,tag:Ge}=ce.useContext(mt.E_),kt=en=>{At==null||At(!Nt),Zt==null||Zt(en)},ln=ut("tag",Tt),[sn,Bt]=te(ln),Gt=Ct()(ln,`${ln}-checkable`,{[`${ln}-checkable-checked`]:Nt},Ge==null?void 0:Ge.className,bt,Bt);return sn(ce.createElement("span",Object.assign({},Yt,{style:Object.assign(Object.assign({},Qe),Ge==null?void 0:Ge.style),className:Gt,onClick:kt})))},de=ve(45157);const me=je=>(0,de.Z)(je,(Tt,Qe)=>{let{textColor:bt,lightBorderColor:Nt,lightColor:At,darkColor:Zt}=Qe;return{[`${je.componentCls}-${Tt}`]:{color:bt,background:At,borderColor:Nt,"&-inverse":{color:je.colorTextLightSolid,background:Zt,borderColor:Zt},[`&${je.componentCls}-borderless`]:{borderColor:"transparent"}}}});var we=(0,Et.b)(["Tag","preset"],je=>{const Tt=dt(je);return me(Tt)},Ae);function be(je){return typeof je!="string"?je:je.charAt(0).toUpperCase()+je.slice(1)}const Me=(je,Tt,Qe)=>{const bt=be(Qe);return{[`${je.componentCls}-${Tt}`]:{color:je[`color${Qe}`],background:je[`color${bt}Bg`],borderColor:je[`color${bt}Border`],[`&${je.componentCls}-borderless`]:{borderColor:"transparent"}}}};var Ie=(0,Et.b)(["Tag","status"],je=>{const Tt=dt(je);return[Me(Tt,"success","Success"),Me(Tt,"processing","Info"),Me(Tt,"error","Error"),Me(Tt,"warning","Warning")]},Ae),ze=function(je,Tt){var Qe={};for(var bt in je)Object.prototype.hasOwnProperty.call(je,bt)&&Tt.indexOf(bt)<0&&(Qe[bt]=je[bt]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Nt=0,bt=Object.getOwnPropertySymbols(je);Nt<bt.length;Nt++)Tt.indexOf(bt[Nt])<0&&Object.prototype.propertyIsEnumerable.call(je,bt[Nt])&&(Qe[bt[Nt]]=je[bt[Nt]]);return Qe};const et=(je,Tt)=>{const{prefixCls:Qe,className:bt,rootClassName:Nt,style:At,children:Zt,icon:Yt,color:ut,onClose:Ge,closeIcon:kt,closable:ln,bordered:sn=!0}=je,Bt=ze(je,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:Gt,direction:en,tag:Bn}=ce.useContext(mt.E_),[rn,Cn]=ce.useState(!0);ce.useEffect(()=>{"visible"in Bt&&Cn(Bt.visible)},[Bt.visible]);const ft=(0,Ze.o2)(ut),En=(0,Ze.yT)(ut),Vn=ft||En,Re=Object.assign(Object.assign({backgroundColor:ut&&!Vn?ut:void 0},Bn==null?void 0:Bn.style),At),Ce=Gt("tag",Qe),[Pe,Ne]=te(Ce),ke=Ct()(Ce,Bn==null?void 0:Bn.className,{[`${Ce}-${ut}`]:Vn,[`${Ce}-has-color`]:ut&&!Vn,[`${Ce}-hidden`]:!rn,[`${Ce}-rtl`]:en==="rtl",[`${Ce}-borderless`]:!sn},bt,Nt,Ne),Se=vt=>{vt.stopPropagation(),Ge==null||Ge(vt),!vt.defaultPrevented&&Cn(!1)},[,nt]=(0,Ke.Z)(ln,kt,vt=>vt===null?ce.createElement(De.Z,{className:`${Ce}-close-icon`,onClick:Se}):ce.createElement("span",{className:`${Ce}-close-icon`,onClick:Se},vt),null,!1),Pt=typeof Bt.onClick=="function"||Zt&&Zt.type==="a",qe=Yt||null,Ue=qe?ce.createElement(ce.Fragment,null,qe,Zt&&ce.createElement("span",null,Zt)):Zt,St=ce.createElement("span",Object.assign({},Bt,{ref:Tt,className:ke,style:Re}),Ue,nt,ft&&ce.createElement(we,{key:"preset",prefixCls:Ce}),En&&ce.createElement(Ie,{key:"status",prefixCls:Ce}));return Pe(Pt?ce.createElement(Be.Z,{component:"Tag"},St):St)},$e=ce.forwardRef(et);$e.CheckableTag=se;var gt=$e},17574:function(Pn,an,ve){"use strict";ve.d(an,{default:function(){return ut}});var ce=ve(43858),De=ve(19127),_e=ve(52671),Ct=ve(8657),Ze=ve(96663),Ke=ve(59301),Be={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"},mt=Be,ct=ve(7657),He=function(kt,ln){return Ke.createElement(ct.Z,(0,Ze.Z)({},kt,{ref:ln,icon:mt}))},Et=Ke.forwardRef(He),ht=Et,dt=ve(92310),Ae=ve.n(dt),te=ve(35654),ee=ve(71430),he=ve(36355),se=ve(56082),de=ve(62892),me=ve(20648);const we=4;function be(Ge){const{dropPosition:kt,dropLevelOffset:ln,prefixCls:sn,indent:Bt,direction:Gt="ltr"}=Ge,en=Gt==="ltr"?"left":"right",Bn=Gt==="ltr"?"right":"left",rn={[en]:-ln*Bt+we,[Bn]:0};switch(kt){case-1:rn.top=-3;break;case 1:rn.bottom=-3;break;default:rn.bottom=-3,rn[en]=Bt+we;break}return Ke.createElement("div",{style:rn,className:`${sn}-drop-indicator`})}var Me=ve(71997),ze=Ke.forwardRef((Ge,kt)=>{const{getPrefixCls:ln,direction:sn,virtual:Bt,tree:Gt}=Ke.useContext(he.E_),{prefixCls:en,className:Bn,showIcon:rn=!1,showLine:Cn,switcherIcon:ft,blockNode:En=!1,children:Vn,checkable:Re=!1,selectable:Ce=!0,draggable:Pe,motion:Ne,style:ke}=Ge,Se=ln("tree",en),nt=ln(),Pt=Ne!=null?Ne:Object.assign(Object.assign({},(0,de.Z)(nt)),{motionAppear:!1}),qe=Object.assign(Object.assign({},Ge),{checkable:Re,selectable:Ce,showIcon:rn,motion:Pt,blockNode:En,showLine:!!Cn,dropIndicatorRender:be}),[Ue,St]=(0,me.ZP)(Se),vt=Ke.useMemo(()=>{if(!Pe)return!1;let Dt={};switch(typeof Pe){case"function":Dt.nodeDraggable=Pe;break;case"object":Dt=Object.assign({},Pe);break;default:break}return Dt.icon!==!1&&(Dt.icon=Dt.icon||Ke.createElement(se.Z,null)),Dt},[Pe]),lt=Dt=>Ke.createElement(Me.Z,{prefixCls:Se,switcherIcon:ft,treeNodeProps:Dt,showLine:Cn});return Ue(Ke.createElement(ce.Z,Object.assign({itemHeight:20,ref:kt,virtual:Bt},qe,{style:Object.assign(Object.assign({},Gt==null?void 0:Gt.style),ke),prefixCls:Se,className:Ae()({[`${Se}-icon-hide`]:!rn,[`${Se}-block-node`]:En,[`${Se}-unselectable`]:!Ce,[`${Se}-rtl`]:sn==="rtl"},Gt==null?void 0:Gt.className,Bn,St),direction:sn,checkable:Re&&Ke.createElement("span",{className:`${Se}-checkbox-inner`}),selectable:Ce,switcherIcon:lt,draggable:vt}),Vn))}),et;(function(Ge){Ge[Ge.None=0]="None",Ge[Ge.Start=1]="Start",Ge[Ge.End=2]="End"})(et||(et={}));function $e(Ge,kt){function ln(sn){const{key:Bt,children:Gt}=sn;kt(Bt,sn)!==!1&&$e(Gt||[],kt)}Ge.forEach(ln)}function gt(Ge){let{treeData:kt,expandedKeys:ln,startKey:sn,endKey:Bt}=Ge;const Gt=[];let en=et.None;if(sn&&sn===Bt)return[sn];if(!sn||!Bt)return[];function Bn(rn){return rn===sn||rn===Bt}return $e(kt,rn=>{if(en===et.End)return!1;if(Bn(rn)){if(Gt.push(rn),en===et.None)en=et.Start;else if(en===et.Start)return en=et.End,!1}else en===et.Start&&Gt.push(rn);return ln.includes(rn)}),Gt}function je(Ge,kt){const ln=(0,De.Z)(kt),sn=[];return $e(Ge,(Bt,Gt)=>{const en=ln.indexOf(Bt);return en!==-1&&(sn.push(Gt),ln.splice(en,1)),!!ln.length}),sn}var Tt=function(Ge,kt){var ln={};for(var sn in Ge)Object.prototype.hasOwnProperty.call(Ge,sn)&&kt.indexOf(sn)<0&&(ln[sn]=Ge[sn]);if(Ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Bt=0,sn=Object.getOwnPropertySymbols(Ge);Bt<sn.length;Bt++)kt.indexOf(sn[Bt])<0&&Object.prototype.propertyIsEnumerable.call(Ge,sn[Bt])&&(ln[sn[Bt]]=Ge[sn[Bt]]);return ln};function Qe(Ge){const{isLeaf:kt,expanded:ln}=Ge;return kt?Ke.createElement(_e.Z,null):ln?Ke.createElement(Ct.Z,null):Ke.createElement(ht,null)}function bt(Ge){let{treeData:kt,children:ln}=Ge;return kt||(0,ee.zn)(ln)}const Nt=(Ge,kt)=>{var{defaultExpandAll:ln,defaultExpandParent:sn,defaultExpandedKeys:Bt}=Ge,Gt=Tt(Ge,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const en=Ke.useRef(),Bn=Ke.useRef(),rn=()=>{const{keyEntities:vt}=(0,ee.I8)(bt(Gt));let lt;return ln?lt=Object.keys(vt):sn?lt=(0,te.r7)(Gt.expandedKeys||Bt||[],vt):lt=Gt.expandedKeys||Bt,lt},[Cn,ft]=Ke.useState(Gt.selectedKeys||Gt.defaultSelectedKeys||[]),[En,Vn]=Ke.useState(()=>rn());Ke.useEffect(()=>{"selectedKeys"in Gt&&ft(Gt.selectedKeys)},[Gt.selectedKeys]),Ke.useEffect(()=>{"expandedKeys"in Gt&&Vn(Gt.expandedKeys)},[Gt.expandedKeys]);const Re=(vt,lt)=>{var Dt;return"expandedKeys"in Gt||Vn(vt),(Dt=Gt.onExpand)===null||Dt===void 0?void 0:Dt.call(Gt,vt,lt)},Ce=(vt,lt)=>{var Dt;const{multiple:un}=Gt,{node:Xt,nativeEvent:$t}=lt,{key:wn=""}=Xt,bn=bt(Gt),pn=Object.assign(Object.assign({},lt),{selected:!0}),Yn=($t==null?void 0:$t.ctrlKey)||($t==null?void 0:$t.metaKey),ai=$t==null?void 0:$t.shiftKey;let Wn;un&&Yn?(Wn=vt,en.current=wn,Bn.current=Wn,pn.selectedNodes=je(bn,Wn)):un&&ai?(Wn=Array.from(new Set([].concat((0,De.Z)(Bn.current||[]),(0,De.Z)(gt({treeData:bn,expandedKeys:En,startKey:wn,endKey:en.current}))))),pn.selectedNodes=je(bn,Wn)):(Wn=[wn],en.current=wn,Bn.current=Wn,pn.selectedNodes=je(bn,Wn)),(Dt=Gt.onSelect)===null||Dt===void 0||Dt.call(Gt,Wn,pn),"selectedKeys"in Gt||ft(Wn)},{getPrefixCls:Pe,direction:Ne}=Ke.useContext(he.E_),{prefixCls:ke,className:Se,showIcon:nt=!0,expandAction:Pt="click"}=Gt,qe=Tt(Gt,["prefixCls","className","showIcon","expandAction"]),Ue=Pe("tree",ke),St=Ae()(`${Ue}-directory`,{[`${Ue}-directory-rtl`]:Ne==="rtl"},Se);return Ke.createElement(ze,Object.assign({icon:Qe,ref:kt,blockNode:!0},qe,{showIcon:nt,expandAction:Pt,prefixCls:Ue,className:St,expandedKeys:En,selectedKeys:Cn,onSelect:Ce,onExpand:Re}))};var Zt=Ke.forwardRef(Nt);const Yt=ze;Yt.DirectoryTree=Zt,Yt.TreeNode=ce.O;var ut=Yt},20648:function(Pn,an,ve){"use strict";ve.d(an,{TM:function(){return dt},Yk:function(){return ht}});var ce=ve(93083),De=ve(98447),_e=ve(17313),Ct=ve(8378),Ze=ve(37613),Ke=ve(83116);const Be=new ce.Keyframes("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),mt=(Ae,te)=>({[`.${Ae}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${te.motionDurationSlow}`}}}),ct=(Ae,te)=>({[`.${Ae}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:te.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${te.lineWidthBold}px solid ${te.colorPrimary}`,borderRadius:"50%",content:'""'}}}),He=(Ae,te)=>{const{treeCls:ee,treeNodeCls:he,treeNodePadding:se,titleHeight:de,nodeSelectedBg:me,nodeHoverBg:we}=te,be=te.paddingXS;return{[ee]:Object.assign(Object.assign({},(0,_e.Wf)(te)),{background:te.colorBgContainer,borderRadius:te.borderRadius,transition:`background-color ${te.motionDurationSlow}`,[`&${ee}-rtl`]:{[`${ee}-switcher`]:{"&_close":{[`${ee}-switcher-icon`]:{svg:{transform:"rotate(90deg)"}}}}},[`&-focused:not(:hover):not(${ee}-active-focused)`]:Object.assign({},(0,_e.oN)(te)),[`${ee}-list-holder-inner`]:{alignItems:"flex-start"},[`&${ee}-block-node`]:{[`${ee}-list-holder-inner`]:{alignItems:"stretch",[`${ee}-node-content-wrapper`]:{flex:"auto"},[`${he}.dragging`]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:se,insetInlineStart:0,border:`1px solid ${te.colorPrimary}`,opacity:0,animationName:Be,animationDuration:te.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},[`${he}`]:{display:"flex",alignItems:"flex-start",padding:`0 0 ${se}px 0`,outline:"none","&-rtl":{direction:"rtl"},"&-disabled":{[`${ee}-node-content-wrapper`]:{color:te.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}}},[`&-active ${ee}-node-content-wrapper`]:Object.assign({},(0,_e.oN)(te)),[`&:not(${he}-disabled).filter-node ${ee}-title`]:{color:"inherit",fontWeight:500},"&-draggable":{[`${ee}-draggable-icon`]:{flexShrink:0,width:de,lineHeight:`${de}px`,textAlign:"center",visibility:"visible",opacity:.2,transition:`opacity ${te.motionDurationSlow}`,[`${he}:hover &`]:{opacity:.45}},[`&${he}-disabled`]:{[`${ee}-draggable-icon`]:{visibility:"hidden"}}}},[`${ee}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:de}},[`${ee}-draggable-icon`]:{visibility:"hidden"},[`${ee}-switcher`]:Object.assign(Object.assign({},mt(Ae,te)),{position:"relative",flex:"none",alignSelf:"stretch",width:de,margin:0,lineHeight:`${de}px`,textAlign:"center",cursor:"pointer",userSelect:"none","&-noop":{cursor:"default"},"&_close":{[`${ee}-switcher-icon`]:{svg:{transform:"rotate(-90deg)"}}},"&-loading-icon":{color:te.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:de/2,bottom:-se,marginInlineStart:-1,borderInlineEnd:`1px solid ${te.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:de/2*.8,height:de/2,borderBottom:`1px solid ${te.colorBorder}`,content:'""'}}}),[`${ee}-checkbox`]:{top:"initial",marginInlineEnd:be},[`${ee}-node-content-wrapper, ${ee}-checkbox + span`]:{position:"relative",zIndex:"auto",minHeight:de,margin:0,padding:`0 ${te.paddingXS/2}px`,color:"inherit",lineHeight:`${de}px`,background:"transparent",borderRadius:te.borderRadius,cursor:"pointer",transition:`all ${te.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,"&:hover":{backgroundColor:we},[`&${ee}-node-selected`]:{backgroundColor:me},[`${ee}-iconEle`]:{display:"inline-block",width:de,height:de,lineHeight:`${de}px`,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${ee}-unselectable ${ee}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${ee}-node-content-wrapper`]:Object.assign({lineHeight:`${de}px`,userSelect:"none"},ct(Ae,te)),[`${he}.drop-container`]:{"> [draggable]":{boxShadow:`0 0 0 2px ${te.colorPrimary}`}},"&-show-line":{[`${ee}-indent`]:{"&-unit":{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:de/2,bottom:-se,borderInlineEnd:`1px solid ${te.colorBorder}`,content:'""'},"&-end":{"&:before":{display:"none"}}}},[`${ee}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${he}-leaf-last`]:{[`${ee}-switcher`]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:`${de/2}px !important`}}}}})}},Et=Ae=>{const{treeCls:te,treeNodeCls:ee,treeNodePadding:he,directoryNodeSelectedBg:se,directoryNodeSelectedColor:de}=Ae;return{[`${te}${te}-directory`]:{[ee]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:he,insetInlineStart:0,transition:`background-color ${Ae.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:Ae.controlItemBgHover}},"> *":{zIndex:1},[`${te}-switcher`]:{transition:`color ${Ae.motionDurationMid}`},[`${te}-node-content-wrapper`]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},[`&${te}-node-selected`]:{color:de,background:"transparent"}},"&-selected":{"\n &:hover::before,\n &::before\n ":{background:se},[`${te}-switcher`]:{color:de},[`${te}-node-content-wrapper`]:{color:de,background:"transparent"}}}}}},ht=(Ae,te)=>{const ee=`.${Ae}`,he=`${ee}-treenode`,se=te.paddingXS/2,de=(0,Ze.TS)(te,{treeCls:ee,treeNodeCls:he,treeNodePadding:se});return[He(Ae,de),Et(de)]},dt=Ae=>{const{controlHeightSM:te}=Ae;return{titleHeight:te,nodeHoverBg:Ae.controlItemBgHover,nodeSelectedBg:Ae.controlItemBgActive}};an.ZP=(0,Ke.Z)("Tree",(Ae,te)=>{let{prefixCls:ee}=te;return[{[Ae.componentCls]:(0,De.C2)(`${ee}-checkbox`,Ae)},ht(ee,Ae),(0,Ct.Z)(Ae)]},Ae=>{const{colorTextLightSolid:te,colorPrimary:ee}=Ae;return Object.assign(Object.assign({},dt(Ae)),{directoryNodeSelectedColor:te,directoryNodeSelectedBg:ee})})},71997:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return he}});var ce=ve(96663),De=ve(59301),_e={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"},Ct=_e,Ze=ve(7657),Ke=function(de,me){return De.createElement(Ze.Z,(0,ce.Z)({},de,{ref:me,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be,ct=ve(52671),He=ve(58617),Et=ve(15075),ht=ve(43531),dt=ve(92310),Ae=ve.n(dt),te=ve(92343),he=se=>{const{prefixCls:de,switcherIcon:me,treeNodeProps:we,showLine:be}=se,{isLeaf:Me,expanded:Ie,loading:ze}=we;if(ze)return De.createElement(He.Z,{className:`${de}-switcher-loading-icon`});let et;if(be&&typeof be=="object"&&(et=be.showLeafIcon),Me){if(!be)return null;if(typeof et!="boolean"&&et){const je=typeof et=="function"?et(we):et,Tt=`${de}-switcher-line-custom-icon`;return(0,te.l$)(je)?(0,te.Tm)(je,{className:Ae()(je.props.className||"",Tt)}):je}return et?De.createElement(ct.Z,{className:`${de}-switcher-line-icon`}):De.createElement("span",{className:`${de}-switcher-leaf-line`})}const $e=`${de}-switcher-icon`,gt=typeof me=="function"?me(we):me;return(0,te.l$)(gt)?(0,te.Tm)(gt,{className:Ae()(gt.props.className||"",$e)}):gt!==void 0?gt:be?Ie?De.createElement(Et.Z,{className:`${de}-switcher-line-icon`}):De.createElement(ht.Z,{className:`${de}-switcher-line-icon`}):De.createElement(mt,{className:$e})}},99498:function(Pn,an,ve){(function(ce){ce(ve(89780))})(function(ce){ce.defineOption("placeholder","",function(mt,ct,He){var Et=He&&He!=ce.Init;if(ct&&!Et)mt.on("blur",Ze),mt.on("change",Ke),mt.on("swapDoc",Ke),ce.on(mt.getInputField(),"compositionupdate",mt.state.placeholderCompose=function(){Ct(mt)}),Ke(mt);else if(!ct&&Et){mt.off("blur",Ze),mt.off("change",Ke),mt.off("swapDoc",Ke),ce.off(mt.getInputField(),"compositionupdate",mt.state.placeholderCompose),De(mt);var ht=mt.getWrapperElement();ht.className=ht.className.replace(" CodeMirror-empty","")}ct&&!mt.hasFocus()&&Ze(mt)});function De(mt){mt.state.placeholder&&(mt.state.placeholder.parentNode.removeChild(mt.state.placeholder),mt.state.placeholder=null)}function _e(mt){De(mt);var ct=mt.state.placeholder=document.createElement("pre");ct.style.cssText="height: 0; overflow: visible",ct.style.direction=mt.getOption("direction"),ct.className="CodeMirror-placeholder CodeMirror-line-like";var He=mt.getOption("placeholder");typeof He=="string"&&(He=document.createTextNode(He)),ct.appendChild(He),mt.display.lineSpace.insertBefore(ct,mt.display.lineSpace.firstChild)}function Ct(mt){setTimeout(function(){var ct=!1,He=mt.getInputField();He.nodeName=="TEXTAREA"?ct=!He.value:mt.lineCount()==1&&(ct=!/[^\u200b]/.test(He.querySelector(".CodeMirror-line").textContent)),ct?_e(mt):De(mt)},20)}function Ze(mt){Be(mt)&&_e(mt)}function Ke(mt){var ct=mt.getWrapperElement(),He=Be(mt);ct.className=ct.className.replace(" CodeMirror-empty","")+(He?" CodeMirror-empty":""),He?_e(mt):De(mt)}function Be(mt){return mt.lineCount()===1&&mt.getLine(0)===""}})},25717:function(Pn,an,ve){(function(ce){ce(ve(89780))})(function(ce){var De={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},_e=ce.Pos;ce.defineOption("autoCloseBrackets",!1,function(te,ee,he){he&&he!=ce.Init&&(te.removeKeyMap(Ze),te.state.closeBrackets=null),ee&&(Ke(Ct(ee,"pairs")),te.state.closeBrackets=ee,te.addKeyMap(Ze))});function Ct(te,ee){return ee=="pairs"&&typeof te=="string"?te:typeof te=="object"&&te[ee]!=null?te[ee]:De[ee]}var Ze={Backspace:ct,Enter:He};function Ke(te){for(var ee=0;ee<te.length;ee++){var he=te.charAt(ee),se="'"+he+"'";Ze[se]||(Ze[se]=Be(he))}}Ke(De.pairs+"`");function Be(te){return function(ee){return ht(ee,te)}}function mt(te){var ee=te.state.closeBrackets;if(!ee||ee.override)return ee;var he=te.getModeAt(te.getCursor());return he.closeBrackets||ee}function ct(te){var ee=mt(te);if(!ee||te.getOption("disableInput"))return ce.Pass;for(var he=Ct(ee,"pairs"),se=te.listSelections(),de=0;de<se.length;de++){if(!se[de].empty())return ce.Pass;var me=dt(te,se[de].head);if(!me||he.indexOf(me)%2!=0)return ce.Pass}for(var de=se.length-1;de>=0;de--){var we=se[de].head;te.replaceRange("",_e(we.line,we.ch-1),_e(we.line,we.ch+1),"+delete")}}function He(te){var ee=mt(te),he=ee&&Ct(ee,"explode");if(!he||te.getOption("disableInput"))return ce.Pass;for(var se=te.listSelections(),de=0;de<se.length;de++){if(!se[de].empty())return ce.Pass;var me=dt(te,se[de].head);if(!me||he.indexOf(me)%2!=0)return ce.Pass}te.operation(function(){var we=te.lineSeparator()||`
|
|
|
`;te.replaceSelection(we+we,null),te.execCommand("goCharLeft"),se=te.listSelections();for(var be=0;be<se.length;be++){var Me=se[be].head.line;te.indentLine(Me,null,!0),te.indentLine(Me+1,null,!0)}})}function Et(te){var ee=ce.cmpPos(te.anchor,te.head)>0;return{anchor:new _e(te.anchor.line,te.anchor.ch+(ee?-1:1)),head:new _e(te.head.line,te.head.ch+(ee?1:-1))}}function ht(te,ee){var he=mt(te);if(!he||te.getOption("disableInput"))return ce.Pass;var se=Ct(he,"pairs"),de=se.indexOf(ee);if(de==-1)return ce.Pass;for(var me=Ct(he,"closeBefore"),we=Ct(he,"triples"),be=se.charAt(de+1)==ee,Me=te.listSelections(),Ie=de%2==0,ze,et=0;et<Me.length;et++){var $e=Me[et],gt=$e.head,je,Tt=te.getRange(gt,_e(gt.line,gt.ch+1));if(Ie&&!$e.empty())je="surround";else if((be||!Ie)&&Tt==ee)be&&Ae(te,gt)?je="both":we.indexOf(ee)>=0&&te.getRange(gt,_e(gt.line,gt.ch+3))==ee+ee+ee?je="skipThree":je="skip";else if(be&>.ch>1&&we.indexOf(ee)>=0&&te.getRange(_e(gt.line,gt.ch-2),gt)==ee+ee){if(gt.ch>2&&/\bstring/.test(te.getTokenTypeAt(_e(gt.line,gt.ch-2))))return ce.Pass;je="addFour"}else if(be){var Qe=gt.ch==0?" ":te.getRange(_e(gt.line,gt.ch-1),gt);if(!ce.isWordChar(Tt)&&Qe!=ee&&!ce.isWordChar(Qe))je="both";else return ce.Pass}else if(Ie&&(Tt.length===0||/\s/.test(Tt)||me.indexOf(Tt)>-1))je="both";else return ce.Pass;if(!ze)ze=je;else if(ze!=je)return ce.Pass}var bt=de%2?se.charAt(de-1):ee,Nt=de%2?ee:se.charAt(de+1);te.operation(function(){if(ze=="skip")te.execCommand("goCharRight");else if(ze=="skipThree")for(var At=0;At<3;At++)te.execCommand("goCharRight");else if(ze=="surround"){for(var Zt=te.getSelections(),At=0;At<Zt.length;At++)Zt[At]=bt+Zt[At]+Nt;te.replaceSelections(Zt,"around"),Zt=te.listSelections().slice();for(var At=0;At<Zt.length;At++)Zt[At]=Et(Zt[At]);te.setSelections(Zt)}else ze=="both"?(te.replaceSelection(bt+Nt,null),te.triggerElectric(bt+Nt),te.execCommand("goCharLeft")):ze=="addFour"&&(te.replaceSelection(bt+bt+bt+bt,"before"),te.execCommand("goCharRight"))})}function dt(te,ee){var he=te.getRange(_e(ee.line,ee.ch-1),_e(ee.line,ee.ch+1));return he.length==2?he:null}function Ae(te,ee){var he=te.getTokenAt(_e(ee.line,ee.ch+1));return/\bstring/.test(he.type)&&he.start==ee.ch&&(ee.ch==0||!/\bstring/.test(te.getTokenTypeAt(ee)))}})},6313:function(Pn,an,ve){(function(ce){ce(ve(89780),ve(32855))})(function(ce){ce.defineOption("autoCloseTags",!1,function(ct,He,Et){if(Et!=ce.Init&&Et&&ct.removeKeyMap("autoCloseTags"),!!He){var ht={name:"autoCloseTags"};(typeof He!="object"||He.whenClosing!==!1)&&(ht["'/'"]=function(dt){return Ke(dt)}),(typeof He!="object"||He.whenOpening!==!1)&&(ht["'>'"]=function(dt){return Ct(dt)}),ct.addKeyMap(ht)}});var De=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],_e=["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 Ct(ct){if(ct.getOption("disableInput"))return ce.Pass;for(var He=ct.listSelections(),Et=[],ht=ct.getOption("autoCloseTags"),dt=0;dt<He.length;dt++){if(!He[dt].empty())return ce.Pass;var Ae=He[dt].head,te=ct.getTokenAt(Ae),ee=ce.innerMode(ct.getMode(),te.state),he=ee.state,se=ee.mode.xmlCurrentTag&&ee.mode.xmlCurrentTag(he),de=se&&se.name;if(!de)return ce.Pass;var me=ee.mode.configuration=="html",we=typeof ht=="object"&&ht.dontCloseTags||me&&De,be=typeof ht=="object"&&ht.indentTags||me&&_e;te.end>Ae.ch&&(de=de.slice(0,de.length-te.end+Ae.ch));var Me=de.toLowerCase();if(!de||te.type=="string"&&(te.end!=Ae.ch||!/[\"\']/.test(te.string.charAt(te.string.length-1))||te.string.length==1)||te.type=="tag"&&se.close||te.string.indexOf("/")==Ae.ch-te.start-1||we&&Be(we,Me)>-1||mt(ct,ee.mode.xmlCurrentContext&&ee.mode.xmlCurrentContext(he)||[],de,Ae,!0))return ce.Pass;var Ie=typeof ht=="object"&&ht.emptyTags;if(Ie&&Be(Ie,de)>-1){Et[dt]={text:"/>",newPos:ce.Pos(Ae.line,Ae.ch+2)};continue}var ze=be&&Be(be,Me)>-1;Et[dt]={indent:ze,text:">"+(ze?`
|
|
|
|
|
|
`:"")+"</"+de+">",newPos:ze?ce.Pos(Ae.line+1,0):ce.Pos(Ae.line,Ae.ch+1)}}for(var et=typeof ht=="object"&&ht.dontIndentOnAutoClose,dt=He.length-1;dt>=0;dt--){var $e=Et[dt];ct.replaceRange($e.text,He[dt].head,He[dt].anchor,"+insert");var gt=ct.listSelections().slice(0);gt[dt]={head:$e.newPos,anchor:$e.newPos},ct.setSelections(gt),!et&&$e.indent&&(ct.indentLine($e.newPos.line,null,!0),ct.indentLine($e.newPos.line+1,null,!0))}}function Ze(ct,He){for(var Et=ct.listSelections(),ht=[],dt=He?"/":"</",Ae=ct.getOption("autoCloseTags"),te=typeof Ae=="object"&&Ae.dontIndentOnSlash,ee=0;ee<Et.length;ee++){if(!Et[ee].empty())return ce.Pass;var he=Et[ee].head,se=ct.getTokenAt(he),de=ce.innerMode(ct.getMode(),se.state),me=de.state;if(He&&(se.type=="string"||se.string.charAt(0)!="<"||se.start!=he.ch-1))return ce.Pass;var we,be=de.mode.name!="xml"&&ct.getMode().name=="htmlmixed";if(be&&de.mode.name=="javascript")we=dt+"script";else if(be&&de.mode.name=="css")we=dt+"style";else{var Me=de.mode.xmlCurrentContext&&de.mode.xmlCurrentContext(me);if(!Me||Me.length&&mt(ct,Me,Me[Me.length-1],he))return ce.Pass;we=dt+Me[Me.length-1]}ct.getLine(he.line).charAt(se.end)!=">"&&(we+=">"),ht[ee]=we}if(ct.replaceSelections(ht),Et=ct.listSelections(),!te)for(var ee=0;ee<Et.length;ee++)(ee==Et.length-1||Et[ee].head.line<Et[ee+1].head.line)&&ct.indentLine(Et[ee].head.line)}function Ke(ct){return ct.getOption("disableInput")?ce.Pass:Ze(ct,!0)}ce.commands.closeTag=function(ct){return Ze(ct)};function Be(ct,He){if(ct.indexOf)return ct.indexOf(He);for(var Et=0,ht=ct.length;Et<ht;++Et)if(ct[Et]==He)return Et;return-1}function mt(ct,He,Et,ht,dt){if(!ce.scanForClosingTag)return!1;var Ae=Math.min(ct.lastLine()+1,ht.line+500),te=ce.scanForClosingTag(ct,ht,null,Ae);if(!te||te.tag!=Et)return!1;for(var ee=dt?1:0,he=He.length-1;he>=0&&He[he]==Et;he--)++ee;ht=te.to;for(var he=1;he<ee;he++){var se=ce.scanForClosingTag(ct,ht,null,Ae);if(!se||se.tag!=Et)return!1;ht=se.to}return!0}})},32855:function(Pn,an,ve){(function(ce){ce(ve(89780))})(function(ce){"use strict";var De=ce.Pos;function _e(he,se){return he.line-se.line||he.ch-se.ch}var Ct="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",Ze=Ct+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Ke=new RegExp("<(/?)(["+Ct+"]["+Ze+"]*)","g");function Be(he,se,de,me){this.line=se,this.ch=de,this.cm=he,this.text=he.getLine(se),this.min=me?Math.max(me.from,he.firstLine()):he.firstLine(),this.max=me?Math.min(me.to-1,he.lastLine()):he.lastLine()}function mt(he,se){var de=he.cm.getTokenTypeAt(De(he.line,se));return de&&/\btag\b/.test(de)}function ct(he){if(!(he.line>=he.max))return he.ch=0,he.text=he.cm.getLine(++he.line),!0}function He(he){if(!(he.line<=he.min))return he.text=he.cm.getLine(--he.line),he.ch=he.text.length,!0}function Et(he){for(;;){var se=he.text.indexOf(">",he.ch);if(se==-1){if(ct(he))continue;return}if(!mt(he,se+1)){he.ch=se+1;continue}var de=he.text.lastIndexOf("/",se),me=de>-1&&!/\S/.test(he.text.slice(de+1,se));return he.ch=se+1,me?"selfClose":"regular"}}function ht(he){for(;;){var se=he.ch?he.text.lastIndexOf("<",he.ch-1):-1;if(se==-1){if(He(he))continue;return}if(!mt(he,se+1)){he.ch=se;continue}Ke.lastIndex=se,he.ch=se;var de=Ke.exec(he.text);if(de&&de.index==se)return de}}function dt(he){for(;;){Ke.lastIndex=he.ch;var se=Ke.exec(he.text);if(!se){if(ct(he))continue;return}if(!mt(he,se.index+1)){he.ch=se.index+1;continue}return he.ch=se.index+se[0].length,se}}function Ae(he){for(;;){var se=he.ch?he.text.lastIndexOf(">",he.ch-1):-1;if(se==-1){if(He(he))continue;return}if(!mt(he,se+1)){he.ch=se;continue}var de=he.text.lastIndexOf("/",se),me=de>-1&&!/\S/.test(he.text.slice(de+1,se));return he.ch=se+1,me?"selfClose":"regular"}}function te(he,se){for(var de=[];;){var me=dt(he),we,be=he.line,Me=he.ch-(me?me[0].length:0);if(!me||!(we=Et(he)))return;if(we!="selfClose")if(me[1]){for(var Ie=de.length-1;Ie>=0;--Ie)if(de[Ie]==me[2]){de.length=Ie;break}if(Ie<0&&(!se||se==me[2]))return{tag:me[2],from:De(be,Me),to:De(he.line,he.ch)}}else de.push(me[2])}}function ee(he,se){for(var de=[];;){var me=Ae(he);if(!me)return;if(me=="selfClose"){ht(he);continue}var we=he.line,be=he.ch,Me=ht(he);if(!Me)return;if(Me[1])de.push(Me[2]);else{for(var Ie=de.length-1;Ie>=0;--Ie)if(de[Ie]==Me[2]){de.length=Ie;break}if(Ie<0&&(!se||se==Me[2]))return{tag:Me[2],from:De(he.line,he.ch),to:De(we,be)}}}}ce.registerHelper("fold","xml",function(he,se){for(var de=new Be(he,se.line,0);;){var me=dt(de);if(!me||de.line!=se.line)return;var we=Et(de);if(!we)return;if(!me[1]&&we!="selfClose"){var be=De(de.line,de.ch),Me=te(de,me[2]);return Me&&_e(Me.from,be)>0?{from:be,to:Me.from}:null}}}),ce.findMatchingTag=function(he,se,de){var me=new Be(he,se.line,se.ch,de);if(!(me.text.indexOf(">")==-1&&me.text.indexOf("<")==-1)){var we=Et(me),be=we&&De(me.line,me.ch),Me=we&&ht(me);if(!(!we||!Me||_e(me,se)>0)){var Ie={from:De(me.line,me.ch),to:be,tag:Me[2]};return we=="selfClose"?{open:Ie,close:null,at:"open"}:Me[1]?{open:ee(me,Me[2]),close:Ie,at:"close"}:(me=new Be(he,be.line,be.ch,de),{open:Ie,close:te(me,Me[2]),at:"open"})}}},ce.findEnclosingTag=function(he,se,de,me){for(var we=new Be(he,se.line,se.ch,de);;){var be=ee(we,me);if(!be)break;var Me=new Be(he,se.line,se.ch,de),Ie=te(Me,be.tag);if(Ie)return{open:be,close:Ie}}},ce.scanForClosingTag=function(he,se,de,me){var we=new Be(he,se.line,se.ch,me?{from:0,to:me}:null);return te(we,de)}})},89780:function(Pn){(function(an,ve){Pn.exports=ve()})(this,function(){"use strict";var an=navigator.userAgent,ve=navigator.platform,ce=/gecko\/\d/i.test(an),De=/MSIE \d/.test(an),_e=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(an),Ct=/Edge\/(\d+)/.exec(an),Ze=De||_e||Ct,Ke=Ze&&(De?document.documentMode||6:+(Ct||_e)[1]),Be=!Ct&&/WebKit\//.test(an),mt=Be&&/Qt\/\d+\.\d+/.test(an),ct=!Ct&&/Chrome\//.test(an),He=/Opera\//.test(an),Et=/Apple Computer/.test(navigator.vendor),ht=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(an),dt=/PhantomJS/.test(an),Ae=!Ct&&/AppleWebKit/.test(an)&&/Mobile\/\w+/.test(an),te=/Android/.test(an),ee=Ae||te||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(an),he=Ae||/Mac/.test(ve),se=/\bCrOS\b/.test(an),de=/win/i.test(ve),me=He&&an.match(/Version\/(\d*\.\d*)/);me&&(me=Number(me[1])),me&&me>=15&&(He=!1,Be=!0);var we=he&&(mt||He&&(me==null||me<12.11)),be=ce||Ze&&Ke>=9;function Me(ie){return new RegExp("(^|\\s)"+ie+"(?:$|\\s)\\s*")}var Ie=function(ie,ae){var ge=ie.className,fe=Me(ae).exec(ge);if(fe){var ye=ge.slice(fe.index+fe[0].length);ie.className=ge.slice(0,fe.index)+(ye?fe[1]+ye:"")}};function ze(ie){for(var ae=ie.childNodes.length;ae>0;--ae)ie.removeChild(ie.firstChild);return ie}function et(ie,ae){return ze(ie).appendChild(ae)}function $e(ie,ae,ge,fe){var ye=document.createElement(ie);if(ge&&(ye.className=ge),fe&&(ye.style.cssText=fe),typeof ae=="string")ye.appendChild(document.createTextNode(ae));else if(ae)for(var Te=0;Te<ae.length;++Te)ye.appendChild(ae[Te]);return ye}function gt(ie,ae,ge,fe){var ye=$e(ie,ae,ge,fe);return ye.setAttribute("role","presentation"),ye}var je;document.createRange?je=function(ie,ae,ge,fe){var ye=document.createRange();return ye.setEnd(fe||ie,ge),ye.setStart(ie,ae),ye}:je=function(ie,ae,ge){var fe=document.body.createTextRange();try{fe.moveToElementText(ie.parentNode)}catch(ye){return fe}return fe.collapse(!0),fe.moveEnd("character",ge),fe.moveStart("character",ae),fe};function Tt(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 Qe(){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 bt(ie,ae){var ge=ie.className;Me(ae).test(ge)||(ie.className+=(ge?" ":"")+ae)}function Nt(ie,ae){for(var ge=ie.split(" "),fe=0;fe<ge.length;fe++)ge[fe]&&!Me(ge[fe]).test(ae)&&(ae+=" "+ge[fe]);return ae}var At=function(ie){ie.select()};Ae?At=function(ie){ie.selectionStart=0,ie.selectionEnd=ie.value.length}:Ze&&(At=function(ie){try{ie.select()}catch(ae){}});function Zt(ie){var ae=Array.prototype.slice.call(arguments,1);return function(){return ie.apply(null,ae)}}function Yt(ie,ae,ge){ae||(ae={});for(var fe in ie)ie.hasOwnProperty(fe)&&(ge!==!1||!ae.hasOwnProperty(fe))&&(ae[fe]=ie[fe]);return ae}function ut(ie,ae,ge,fe,ye){ae==null&&(ae=ie.search(/[^\s\u00a0]/),ae==-1&&(ae=ie.length));for(var Te=fe||0,We=ye||0;;){var st=ie.indexOf(" ",Te);if(st<0||st>=ae)return We+(ae-Te);We+=st-Te,We+=ge-We%ge,Te=st+1}}var Ge=function(){this.id=null,this.f=null,this.time=0,this.handler=Zt(this.onTimeout,this)};Ge.prototype.onTimeout=function(ie){ie.id=0,ie.time<=+new Date?ie.f():setTimeout(ie.handler,ie.time-+new Date)},Ge.prototype.set=function(ie,ae){this.f=ae;var ge=+new Date+ie;(!this.id||ge<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,ie),this.time=ge)};function kt(ie,ae){for(var ge=0;ge<ie.length;++ge)if(ie[ge]==ae)return ge;return-1}var ln=50,sn={toString:function(){return"CodeMirror.Pass"}},Bt={scroll:!1},Gt={origin:"*mouse"},en={origin:"+move"};function Bn(ie,ae,ge){for(var fe=0,ye=0;;){var Te=ie.indexOf(" ",fe);Te==-1&&(Te=ie.length);var We=Te-fe;if(Te==ie.length||ye+We>=ae)return fe+Math.min(We,ae-ye);if(ye+=Te-fe,ye+=ge-ye%ge,fe=Te+1,ye>=ae)return fe}}var rn=[""];function Cn(ie){for(;rn.length<=ie;)rn.push(ft(rn)+" ");return rn[ie]}function ft(ie){return ie[ie.length-1]}function En(ie,ae){for(var ge=[],fe=0;fe<ie.length;fe++)ge[fe]=ae(ie[fe],fe);return ge}function Vn(ie,ae,ge){for(var fe=0,ye=ge(ae);fe<ie.length&&ge(ie[fe])<=ye;)fe++;ie.splice(fe,0,ae)}function Re(){}function Ce(ie,ae){var ge;return Object.create?ge=Object.create(ie):(Re.prototype=ie,ge=new Re),ae&&Yt(ae,ge),ge}var Pe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ne(ie){return/\w/.test(ie)||ie>"\x80"&&(ie.toUpperCase()!=ie.toLowerCase()||Pe.test(ie))}function ke(ie,ae){return ae?ae.source.indexOf("\\w")>-1&&Ne(ie)?!0:ae.test(ie):Ne(ie)}function Se(ie){for(var ae in ie)if(ie.hasOwnProperty(ae)&&ie[ae])return!1;return!0}var nt=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Pt(ie){return ie.charCodeAt(0)>=768&&nt.test(ie)}function qe(ie,ae,ge){for(;(ge<0?ae>0:ae<ie.length)&&Pt(ie.charAt(ae));)ae+=ge;return ae}function Ue(ie,ae,ge){for(var fe=ae>ge?-1:1;;){if(ae==ge)return ae;var ye=(ae+ge)/2,Te=fe<0?Math.ceil(ye):Math.floor(ye);if(Te==ae)return ie(Te)?ae:ge;ie(Te)?ge=Te:ae=Te+fe}}function St(ie,ae,ge,fe){if(!ie)return fe(ae,ge,"ltr",0);for(var ye=!1,Te=0;Te<ie.length;++Te){var We=ie[Te];(We.from<ge&&We.to>ae||ae==ge&&We.to==ae)&&(fe(Math.max(We.from,ae),Math.min(We.to,ge),We.level==1?"rtl":"ltr",Te),ye=!0)}ye||fe(ae,ge,"ltr")}var vt=null;function lt(ie,ae,ge){var fe;vt=null;for(var ye=0;ye<ie.length;++ye){var Te=ie[ye];if(Te.from<ae&&Te.to>ae)return ye;Te.to==ae&&(Te.from!=Te.to&&ge=="before"?fe=ye:vt=ye),Te.from==ae&&(Te.from!=Te.to&&ge!="before"?fe=ye:vt=ye)}return fe!=null?fe:vt}var Dt=function(){var ie="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ae="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function ge(Lt){return Lt<=247?ie.charAt(Lt):1424<=Lt&&Lt<=1524?"R":1536<=Lt&&Lt<=1785?ae.charAt(Lt-1536):1774<=Lt&&Lt<=2220?"r":8192<=Lt&&Lt<=8203?"w":Lt==8204?"b":"L"}var fe=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,ye=/[stwN]/,Te=/[LRr]/,We=/[Lb1n]/,st=/[1n]/;function ot(Lt,dn,Rt){this.level=Lt,this.from=dn,this.to=Rt}return function(Lt,dn){var Rt=dn=="ltr"?"L":"R";if(Lt.length==0||dn=="ltr"&&!fe.test(Lt))return!1;for(var zn=Lt.length,In=[],Ci=0;Ci<zn;++Ci)In.push(ge(Lt.charCodeAt(Ci)));for(var Ti=0,Zi=Rt;Ti<zn;++Ti){var vr=In[Ti];vr=="m"?In[Ti]=Zi:Zi=vr}for(var Kr=0,Br=Rt;Kr<zn;++Kr){var io=In[Kr];io=="1"&&Br=="r"?In[Kr]="n":Te.test(io)&&(Br=io,io=="r"&&(In[Kr]="R"))}for(var Wo=1,Lr=In[0];Wo<zn-1;++Wo){var oa=In[Wo];oa=="+"&&Lr=="1"&&In[Wo+1]=="1"?In[Wo]="1":oa==","&&Lr==In[Wo+1]&&(Lr=="1"||Lr=="n")&&(In[Wo]=Lr),Lr=oa}for(var Ss=0;Ss<zn;++Ss){var ol=In[Ss];if(ol==",")In[Ss]="N";else if(ol=="%"){var Ls=void 0;for(Ls=Ss+1;Ls<zn&&In[Ls]=="%";++Ls);for(var du=Ss&&In[Ss-1]=="!"||Ls<zn&&In[Ls]=="1"?"1":"N",Zl=Ss;Zl<Ls;++Zl)In[Zl]=du;Ss=Ls-1}}for(var qs=0,Lu=Rt;qs<zn;++qs){var Fl=In[qs];Lu=="L"&&Fl=="1"?In[qs]="L":Te.test(Fl)&&(Lu=Fl)}for(var el=0;el<zn;++el)if(ye.test(In[el])){var Da=void 0;for(Da=el+1;Da<zn&&ye.test(In[Da]);++Da);for(var Ts=(el?In[el-1]:Rt)=="L",cl=(Da<zn?In[Da]:Rt)=="L",Bl=Ts==cl?Ts?"L":"R":Rt,mh=el;mh<Da;++mh)In[mh]=Bl;el=Da-1}for(var Fs=[],ih,Zs=0;Zs<zn;)if(We.test(In[Zs])){var bf=Zs;for(++Zs;Zs<zn&&We.test(In[Zs]);++Zs);Fs.push(new ot(0,bf,Zs))}else{var Wu=Zs,Fu=Fs.length,fu=dn=="rtl"?1:0;for(++Zs;Zs<zn&&In[Zs]!="L";++Zs);for(var ls=Wu;ls<Zs;)if(st.test(In[ls])){Wu<ls&&(Fs.splice(Fu,0,new ot(1,Wu,ls)),Fu+=fu);var dl=ls;for(++ls;ls<Zs&&st.test(In[ls]);++ls);Fs.splice(Fu,0,new ot(2,dl,ls)),Fu+=fu,Wu=ls}else++ls;Wu<Zs&&Fs.splice(Fu,0,new ot(1,Wu,Zs))}return dn=="ltr"&&(Fs[0].level==1&&(ih=Lt.match(/^\s+/))&&(Fs[0].from=ih[0].length,Fs.unshift(new ot(0,0,ih[0].length))),ft(Fs).level==1&&(ih=Lt.match(/\s+$/))&&(ft(Fs).to-=ih[0].length,Fs.push(new ot(0,zn-ih[0].length,zn)))),dn=="rtl"?Fs.reverse():Fs}}();function un(ie,ae){var ge=ie.order;return ge==null&&(ge=ie.order=Dt(ie.text,ae)),ge}var Xt=[],$t=function(ie,ae,ge){if(ie.addEventListener)ie.addEventListener(ae,ge,!1);else if(ie.attachEvent)ie.attachEvent("on"+ae,ge);else{var fe=ie._handlers||(ie._handlers={});fe[ae]=(fe[ae]||Xt).concat(ge)}};function wn(ie,ae){return ie._handlers&&ie._handlers[ae]||Xt}function bn(ie,ae,ge){if(ie.removeEventListener)ie.removeEventListener(ae,ge,!1);else if(ie.detachEvent)ie.detachEvent("on"+ae,ge);else{var fe=ie._handlers,ye=fe&&fe[ae];if(ye){var Te=kt(ye,ge);Te>-1&&(fe[ae]=ye.slice(0,Te).concat(ye.slice(Te+1)))}}}function pn(ie,ae){var ge=wn(ie,ae);if(ge.length)for(var fe=Array.prototype.slice.call(arguments,2),ye=0;ye<ge.length;++ye)ge[ye].apply(null,fe)}function Yn(ie,ae,ge){return typeof ae=="string"&&(ae={type:ae,preventDefault:function(){this.defaultPrevented=!0}}),pn(ie,ge||ae.type,ie,ae),gi(ae)||ae.codemirrorIgnore}function ai(ie){var ae=ie._handlers&&ie._handlers.cursorActivity;if(ae)for(var ge=ie.curOp.cursorActivityHandlers||(ie.curOp.cursorActivityHandlers=[]),fe=0;fe<ae.length;++fe)kt(ge,ae[fe])==-1&&ge.push(ae[fe])}function Wn(ie,ae){return wn(ie,ae).length>0}function Rn(ie){ie.prototype.on=function(ae,ge){$t(this,ae,ge)},ie.prototype.off=function(ae,ge){bn(this,ae,ge)}}function ii(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 Ri(ie){ii(ie),pi(ie)}function Ji(ie){return ie.target||ie.srcElement}function Un(ie){var ae=ie.which;return ae==null&&(ie.button&1?ae=1:ie.button&2?ae=3:ie.button&4&&(ae=2)),he&&ie.ctrlKey&&ae==1&&(ae=3),ae}var $n=function(){if(Ze&&Ke<9)return!1;var ie=$e("div");return"draggable"in ie||"dragDrop"in ie}(),ti;function Pi(ie){if(ti==null){var ae=$e("span","\u200B");et(ie,$e("span",[ae,document.createTextNode("x")])),ie.firstChild.offsetHeight!=0&&(ti=ae.offsetWidth<=1&&ae.offsetHeight>2&&!(Ze&&Ke<8))}var ge=ti?$e("span","\u200B"):$e("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ge.setAttribute("cm-text",""),ge}var mi;function nr(ie){if(mi!=null)return mi;var ae=et(ie,document.createTextNode("A\u062EA")),ge=je(ae,0,1).getBoundingClientRect(),fe=je(ae,1,2).getBoundingClientRect();return ze(ie),!ge||ge.left==ge.right?!1:mi=fe.right-ge.right<3}var ji=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(ie){for(var ae=0,ge=[],fe=ie.length;ae<=fe;){var ye=ie.indexOf(`
|
|
|
`,ae);ye==-1&&(ye=ie.length);var Te=ie.slice(ae,ie.charAt(ye-1)=="\r"?ye-1:ye),We=Te.indexOf("\r");We!=-1?(ge.push(Te.slice(0,We)),ae+=We+1):(ge.push(Te),ae=ye+1)}return ge}: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(ge){}return!ae||ae.parentElement()!=ie?!1:ae.compareEndPoints("StartToEnd",ae)!=0},si=function(){var ie=$e("div");return"oncopy"in ie?!0:(ie.setAttribute("oncopy","return;"),typeof ie.oncopy=="function")}(),Hi=null;function hn(ie){if(Hi!=null)return Hi;var ae=et(ie,$e("span","x")),ge=ae.getBoundingClientRect(),fe=je(ae,0,1).getBoundingClientRect();return Hi=Math.abs(ge.left-fe.left)>1}var ni={},vi={};function Fi(ie,ae){arguments.length>2&&(ae.dependencies=Array.prototype.slice.call(arguments,2)),ni[ie]=ae}function _n(ie,ae){vi[ie]=ae}function Dn(ie){if(typeof ie=="string"&&vi.hasOwnProperty(ie))ie=vi[ie];else if(ie&&typeof ie.name=="string"&&vi.hasOwnProperty(ie.name)){var ae=vi[ie.name];typeof ae=="string"&&(ae={name:ae}),ie=Ce(ae,ie),ie.name=ae.name}else{if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(ie))return Dn("application/xml");if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(ie))return Dn("application/json")}return typeof ie=="string"?{name:ie}:ie||{name:"null"}}function Ft(ie,ae){ae=Dn(ae);var ge=ni[ae.name];if(!ge)return Ft(ie,"text/plain");var fe=ge(ie,ae);if(Ot.hasOwnProperty(ae.name)){var ye=Ot[ae.name];for(var Te in ye)ye.hasOwnProperty(Te)&&(fe.hasOwnProperty(Te)&&(fe["_"+Te]=fe[Te]),fe[Te]=ye[Te])}if(fe.name=ae.name,ae.helperType&&(fe.helperType=ae.helperType),ae.modeProps)for(var We in ae.modeProps)fe[We]=ae.modeProps[We];return fe}var Ot={};function Ve(ie,ae){var ge=Ot.hasOwnProperty(ie)?Ot[ie]:Ot[ie]={};Yt(ae,ge)}function Ut(ie,ae){if(ae===!0)return ae;if(ie.copyState)return ie.copyState(ae);var ge={};for(var fe in ae){var ye=ae[fe];ye instanceof Array&&(ye=ye.concat([])),ge[fe]=ye}return ge}function tn(ie,ae){for(var ge;ie.innerMode&&(ge=ie.innerMode(ae),!(!ge||ge.mode==ie));)ae=ge.state,ie=ge.mode;return ge||{mode:ie,state:ae}}function xt(ie,ae,ge){return ie.startState?ie.startState(ae,ge):!0}var rt=function(ie,ae,ge){this.pos=this.start=0,this.string=ie,this.tabSize=ae||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=ge};rt.prototype.eol=function(){return this.pos>=this.string.length},rt.prototype.sol=function(){return this.pos==this.lineStart},rt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},rt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},rt.prototype.eat=function(ie){var ae=this.string.charAt(this.pos),ge;if(typeof ie=="string"?ge=ae==ie:ge=ae&&(ie.test?ie.test(ae):ie(ae)),ge)return++this.pos,ae},rt.prototype.eatWhile=function(ie){for(var ae=this.pos;this.eat(ie););return this.pos>ae},rt.prototype.eatSpace=function(){for(var ie=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>ie},rt.prototype.skipToEnd=function(){this.pos=this.string.length},rt.prototype.skipTo=function(ie){var ae=this.string.indexOf(ie,this.pos);if(ae>-1)return this.pos=ae,!0},rt.prototype.backUp=function(ie){this.pos-=ie},rt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ut(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ut(this.string,this.lineStart,this.tabSize):0)},rt.prototype.indentation=function(){return ut(this.string,null,this.tabSize)-(this.lineStart?ut(this.string,this.lineStart,this.tabSize):0)},rt.prototype.match=function(ie,ae,ge){if(typeof ie=="string"){var fe=function(We){return ge?We.toLowerCase():We},ye=this.string.substr(this.pos,ie.length);if(fe(ye)==fe(ie))return ae!==!1&&(this.pos+=ie.length),!0}else{var Te=this.string.slice(this.pos).match(ie);return Te&&Te.index>0?null:(Te&&ae!==!1&&(this.pos+=Te[0].length),Te)}},rt.prototype.current=function(){return this.string.slice(this.start,this.pos)},rt.prototype.hideFirstChars=function(ie,ae){this.lineStart+=ie;try{return ae()}finally{this.lineStart-=ie}},rt.prototype.lookAhead=function(ie){var ae=this.lineOracle;return ae&&ae.lookAhead(ie)},rt.prototype.baseToken=function(){var ie=this.lineOracle;return ie&&ie.baseToken(this.pos)};function Vt(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 ge=ie;!ge.lines;)for(var fe=0;;++fe){var ye=ge.children[fe],Te=ye.chunkSize();if(ae<Te){ge=ye;break}ae-=Te}return ge.lines[ae]}function on(ie,ae,ge){var fe=[],ye=ae.line;return ie.iter(ae.line,ge.line+1,function(Te){var We=Te.text;ye==ge.line&&(We=We.slice(0,ge.ch)),ye==ae.line&&(We=We.slice(ae.ch)),fe.push(We),++ye}),fe}function xn(ie,ae,ge){var fe=[];return ie.iter(ae,ge,function(ye){fe.push(ye.text)}),fe}function An(ie,ae){var ge=ae-ie.height;if(ge)for(var fe=ie;fe;fe=fe.parent)fe.height+=ge}function yt(ie){if(ie.parent==null)return null;for(var ae=ie.parent,ge=kt(ae.lines,ie),fe=ae.parent;fe;ae=fe,fe=fe.parent)for(var ye=0;fe.children[ye]!=ae;++ye)ge+=fe.children[ye].chunkSize();return ge+ae.first}function cn(ie,ae){var ge=ie.first;e:do{for(var fe=0;fe<ie.children.length;++fe){var ye=ie.children[fe],Te=ye.height;if(ae<Te){ie=ye;continue e}ae-=Te,ge+=ye.chunkSize()}return ge}while(!ie.lines);for(var We=0;We<ie.lines.length;++We){var st=ie.lines[We],ot=st.height;if(ae<ot)break;ae-=ot}return ge+We}function On(ie,ae){return ae>=ie.first&&ae<ie.first+ie.size}function ri(ie,ae){return String(ie.lineNumberFormatter(ae+ie.firstLineNumber))}function Wt(ie,ae,ge){if(ge===void 0&&(ge=null),!(this instanceof Wt))return new Wt(ie,ae,ge);this.line=ie,this.ch=ae,this.sticky=ge}function Jt(ie,ae){return ie.line-ae.line||ie.ch-ae.ch}function hi(ie,ae){return ie.sticky==ae.sticky&&Jt(ie,ae)==0}function ci(ie){return Wt(ie.line,ie.ch)}function ui(ie,ae){return Jt(ie,ae)<0?ae:ie}function qn(ie,ae){return Jt(ie,ae)<0?ie:ae}function di(ie,ae){return Math.max(ie.first,Math.min(ae,ie.first+ie.size-1))}function li(ie,ae){if(ae.line<ie.first)return Wt(ie.first,0);var ge=ie.first+ie.size-1;return ae.line>ge?Wt(ge,Vt(ie,ge).text.length):Ai(ae,Vt(ie,ae.line).text.length)}function Ai(ie,ae){var ge=ie.ch;return ge==null||ge>ae?Wt(ie.line,ae):ge<0?Wt(ie.line,0):ie}function er(ie,ae){for(var ge=[],fe=0;fe<ae.length;fe++)ge[fe]=li(ie,ae[fe]);return ge}var sr=function(ie,ae){this.state=ie,this.lookAhead=ae},vn=function(ie,ae,ge,fe){this.state=ae,this.doc=ie,this.line=ge,this.maxLookAhead=fe||0,this.baseTokens=null,this.baseTokenPos=1};vn.prototype.lookAhead=function(ie){var ae=this.doc.getLine(this.line+ie);return ae!=null&&ie>this.maxLookAhead&&(this.maxLookAhead=ie),ae},vn.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}},vn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},vn.fromSaved=function(ie,ae,ge){return ae instanceof sr?new vn(ie,Ut(ie.mode,ae.state),ge,ae.lookAhead):new vn(ie,Ut(ie.mode,ae),ge)},vn.prototype.save=function(ie){var ae=ie!==!1?Ut(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new sr(ae,this.maxLookAhead):ae};function Nr(ie,ae,ge,fe){var ye=[ie.state.modeGen],Te={};ur(ie,ae.text,ie.doc.mode,ge,function(Lt,dn){return ye.push(Lt,dn)},Te,fe);for(var We=ge.state,st=function(Lt){ge.baseTokens=ye;var dn=ie.state.overlays[Lt],Rt=1,zn=0;ge.state=!0,ur(ie,ae.text,dn.mode,ge,function(In,Ci){for(var Ti=Rt;zn<In;){var Zi=ye[Rt];Zi>In&&ye.splice(Rt,1,In,ye[Rt+1],Zi),Rt+=2,zn=Math.min(In,Zi)}if(Ci)if(dn.opaque)ye.splice(Ti,Rt-Ti,In,"overlay "+Ci),Rt=Ti+2;else for(;Ti<Rt;Ti+=2){var vr=ye[Ti+1];ye[Ti+1]=(vr?vr+" ":"")+"overlay "+Ci}},Te),ge.state=We,ge.baseTokens=null,ge.baseTokenPos=1},ot=0;ot<ie.state.overlays.length;++ot)st(ot);return{styles:ye,classes:Te.bgClass||Te.textClass?Te:null}}function Dr(ie,ae,ge){if(!ae.styles||ae.styles[0]!=ie.state.modeGen){var fe=ir(ie,yt(ae)),ye=ae.text.length>ie.options.maxHighlightLength&&Ut(ie.doc.mode,fe.state),Te=Nr(ie,ae,fe);ye&&(fe.state=ye),ae.stateAfter=fe.save(!ye),ae.styles=Te.styles,Te.classes?ae.styleClasses=Te.classes:ae.styleClasses&&(ae.styleClasses=null),ge===ie.doc.highlightFrontier&&(ie.doc.modeFrontier=Math.max(ie.doc.modeFrontier,++ie.doc.highlightFrontier))}return ae.styles}function ir(ie,ae,ge){var fe=ie.doc,ye=ie.display;if(!fe.mode.startState)return new vn(fe,!0,ae);var Te=Qi(ie,ae,ge),We=Te>fe.first&&Vt(fe,Te-1).stateAfter,st=We?vn.fromSaved(fe,We,Te):new vn(fe,xt(fe.mode),Te);return fe.iter(Te,ae,function(ot){fn(ie,ot.text,st);var Lt=st.line;ot.stateAfter=Lt==ae-1||Lt%5==0||Lt>=ye.viewFrom&&Lt<ye.viewTo?st.save():null,st.nextLine()}),ge&&(fe.modeFrontier=st.line),st}function fn(ie,ae,ge,fe){var ye=ie.doc.mode,Te=new rt(ae,ie.options.tabSize,ge);for(Te.start=Te.pos=fe||0,ae==""&&jn(ye,ge.state);!Te.eol();)Ei(ye,Te,ge.state),Te.start=Te.pos}function jn(ie,ae){if(ie.blankLine)return ie.blankLine(ae);if(ie.innerMode){var ge=tn(ie,ae);if(ge.mode.blankLine)return ge.mode.blankLine(ge.state)}}function Ei(ie,ae,ge,fe){for(var ye=0;ye<10;ye++){fe&&(fe[0]=tn(ie,ge).mode);var Te=ie.token(ae,ge);if(ae.pos>ae.start)return Te}throw new Error("Mode "+ie.name+" failed to advance stream.")}var zi=function(ie,ae,ge){this.start=ie.start,this.end=ie.pos,this.string=ie.current(),this.type=ae||null,this.state=ge};function Ni(ie,ae,ge,fe){var ye=ie.doc,Te=ye.mode,We;ae=li(ye,ae);var st=Vt(ye,ae.line),ot=ir(ie,ae.line,ge),Lt=new rt(st.text,ie.options.tabSize,ot),dn;for(fe&&(dn=[]);(fe||Lt.pos<ae.ch)&&!Lt.eol();)Lt.start=Lt.pos,We=Ei(Te,Lt,ot.state),fe&&dn.push(new zi(Lt,We,Ut(ye.mode,ot.state)));return fe?dn:new zi(Lt,We,ot.state)}function Gi(ie,ae){if(ie)for(;;){var ge=ie.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!ge)break;ie=ie.slice(0,ge.index)+ie.slice(ge.index+ge[0].length);var fe=ge[1]?"bgClass":"textClass";ae[fe]==null?ae[fe]=ge[2]:new RegExp("(?:^|\\s)"+ge[2]+"(?:$|\\s)").test(ae[fe])||(ae[fe]+=" "+ge[2])}return ie}function ur(ie,ae,ge,fe,ye,Te,We){var st=ge.flattenSpans;st==null&&(st=ie.options.flattenSpans);var ot=0,Lt=null,dn=new rt(ae,ie.options.tabSize,fe),Rt,zn=ie.options.addModeClass&&[null];for(ae==""&&Gi(jn(ge,fe.state),Te);!dn.eol();){if(dn.pos>ie.options.maxHighlightLength?(st=!1,We&&fn(ie,ae,fe,dn.pos),dn.pos=ae.length,Rt=null):Rt=Gi(Ei(ge,dn,fe.state,zn),Te),zn){var In=zn[0].name;In&&(Rt="m-"+(Rt?In+" "+Rt:In))}if(!st||Lt!=Rt){for(;ot<dn.start;)ot=Math.min(dn.start,ot+5e3),ye(ot,Lt);Lt=Rt}dn.start=dn.pos}for(;ot<dn.pos;){var Ci=Math.min(dn.pos,ot+5e3);ye(Ci,Lt),ot=Ci}}function Qi(ie,ae,ge){for(var fe,ye,Te=ie.doc,We=ge?-1:ae-(ie.doc.mode.innerMode?1e3:100),st=ae;st>We;--st){if(st<=Te.first)return Te.first;var ot=Vt(Te,st-1),Lt=ot.stateAfter;if(Lt&&(!ge||st+(Lt instanceof sr?Lt.lookAhead:0)<=Te.modeFrontier))return st;var dn=ut(ot.text,null,ie.options.tabSize);(ye==null||fe>dn)&&(ye=st-1,fe=dn)}return ye}function rr(ie,ae){if(ie.modeFrontier=Math.min(ie.modeFrontier,ae),!(ie.highlightFrontier<ae-10)){for(var ge=ie.first,fe=ae-1;fe>ge;fe--){var ye=Vt(ie,fe).stateAfter;if(ye&&(!(ye instanceof sr)||fe+ye.lookAhead<ae)){ge=fe+1;break}}ie.highlightFrontier=Math.min(ie.highlightFrontier,ge)}}var fr=!1,Nn=!1;function Jr(){fr=!0}function Ln(){Nn=!0}function Zr(ie,ae,ge){this.marker=ie,this.from=ae,this.to=ge}function co(ie,ae){if(ie)for(var ge=0;ge<ie.length;++ge){var fe=ie[ge];if(fe.marker==ae)return fe}}function Bi(ie,ae){for(var ge,fe=0;fe<ie.length;++fe)ie[fe]!=ae&&(ge||(ge=[])).push(ie[fe]);return ge}function Po(ie,ae){ie.markedSpans=ie.markedSpans?ie.markedSpans.concat([ae]):[ae],ae.marker.attachLine(ie)}function ao(ie,ae,ge){var fe;if(ie)for(var ye=0;ye<ie.length;++ye){var Te=ie[ye],We=Te.marker,st=Te.from==null||(We.inclusiveLeft?Te.from<=ae:Te.from<ae);if(st||Te.from==ae&&We.type=="bookmark"&&(!ge||!Te.marker.insertLeft)){var ot=Te.to==null||(We.inclusiveRight?Te.to>=ae:Te.to>ae);(fe||(fe=[])).push(new Zr(We,Te.from,ot?null:Te.to))}}return fe}function Vi(ie,ae,ge){var fe;if(ie)for(var ye=0;ye<ie.length;++ye){var Te=ie[ye],We=Te.marker,st=Te.to==null||(We.inclusiveRight?Te.to>=ae:Te.to>ae);if(st||Te.from==ae&&We.type=="bookmark"&&(!ge||Te.marker.insertLeft)){var ot=Te.from==null||(We.inclusiveLeft?Te.from<=ae:Te.from<ae);(fe||(fe=[])).push(new Zr(We,ot?null:Te.from-ae,Te.to==null?null:Te.to-ae))}}return fe}function qi(ie,ae){if(ae.full)return null;var ge=On(ie,ae.from.line)&&Vt(ie,ae.from.line).markedSpans,fe=On(ie,ae.to.line)&&Vt(ie,ae.to.line).markedSpans;if(!ge&&!fe)return null;var ye=ae.from.ch,Te=ae.to.ch,We=Jt(ae.from,ae.to)==0,st=ao(ge,ye,We),ot=Vi(fe,Te,We),Lt=ae.text.length==1,dn=ft(ae.text).length+(Lt?ye:0);if(st)for(var Rt=0;Rt<st.length;++Rt){var zn=st[Rt];if(zn.to==null){var In=co(ot,zn.marker);In?Lt&&(zn.to=In.to==null?null:In.to+dn):zn.to=ye}}if(ot)for(var Ci=0;Ci<ot.length;++Ci){var Ti=ot[Ci];if(Ti.to!=null&&(Ti.to+=dn),Ti.from==null){var Zi=co(st,Ti.marker);Zi||(Ti.from=dn,Lt&&(st||(st=[])).push(Ti))}else Ti.from+=dn,Lt&&(st||(st=[])).push(Ti)}st&&(st=Hr(st)),ot&&ot!=st&&(ot=Hr(ot));var vr=[st];if(!Lt){var Kr=ae.text.length-2,Br;if(Kr>0&&st)for(var io=0;io<st.length;++io)st[io].to==null&&(Br||(Br=[])).push(new Zr(st[io].marker,null,null));for(var Wo=0;Wo<Kr;++Wo)vr.push(Br);vr.push(ot)}return vr}function Hr(ie){for(var ae=0;ae<ie.length;++ae){var ge=ie[ae];ge.from!=null&&ge.from==ge.to&&ge.marker.clearWhenEmpty!==!1&&ie.splice(ae--,1)}return ie.length?ie:null}function ro(ie,ae,ge){var fe=null;if(ie.iter(ae.line,ge.line+1,function(In){if(In.markedSpans)for(var Ci=0;Ci<In.markedSpans.length;++Ci){var Ti=In.markedSpans[Ci].marker;Ti.readOnly&&(!fe||kt(fe,Ti)==-1)&&(fe||(fe=[])).push(Ti)}}),!fe)return null;for(var ye=[{from:ae,to:ge}],Te=0;Te<fe.length;++Te)for(var We=fe[Te],st=We.find(0),ot=0;ot<ye.length;++ot){var Lt=ye[ot];if(!(Jt(Lt.to,st.from)<0||Jt(Lt.from,st.to)>0)){var dn=[ot,1],Rt=Jt(Lt.from,st.from),zn=Jt(Lt.to,st.to);(Rt<0||!We.inclusiveLeft&&!Rt)&&dn.push({from:Lt.from,to:st.from}),(zn>0||!We.inclusiveRight&&!zn)&&dn.push({from:st.to,to:Lt.to}),ye.splice.apply(ye,dn),ot+=dn.length-3}}return ye}function xi(ie){var ae=ie.markedSpans;if(ae){for(var ge=0;ge<ae.length;++ge)ae[ge].marker.detachLine(ie);ie.markedSpans=null}}function tt(ie,ae){if(ae){for(var ge=0;ge<ae.length;++ge)ae[ge].marker.attachLine(ie);ie.markedSpans=ae}}function uo(ie){return ie.inclusiveLeft?-1:0}function Zo(ie){return ie.inclusiveRight?1:0}function ga(ie,ae){var ge=ie.lines.length-ae.lines.length;if(ge!=0)return ge;var fe=ie.find(),ye=ae.find(),Te=Jt(fe.from,ye.from)||uo(ie)-uo(ae);if(Te)return-Te;var We=Jt(fe.to,ye.to)||Zo(ie)-Zo(ae);return We||ae.id-ie.id}function Pa(ie,ae){var ge=Nn&&ie.markedSpans,fe;if(ge)for(var ye=void 0,Te=0;Te<ge.length;++Te)ye=ge[Te],ye.marker.collapsed&&(ae?ye.from:ye.to)==null&&(!fe||ga(fe,ye.marker)<0)&&(fe=ye.marker);return fe}function ia(ie){return Pa(ie,!0)}function Or(ie){return Pa(ie,!1)}function kr(ie,ae){var ge=Nn&&ie.markedSpans,fe;if(ge)for(var ye=0;ye<ge.length;++ye){var Te=ge[ye];Te.marker.collapsed&&(Te.from==null||Te.from<ae)&&(Te.to==null||Te.to>ae)&&(!fe||ga(fe,Te.marker)<0)&&(fe=Te.marker)}return fe}function fo(ie,ae,ge,fe,ye){var Te=Vt(ie,ae),We=Nn&&Te.markedSpans;if(We)for(var st=0;st<We.length;++st){var ot=We[st];if(ot.marker.collapsed){var Lt=ot.marker.find(0),dn=Jt(Lt.from,ge)||uo(ot.marker)-uo(ye),Rt=Jt(Lt.to,fe)||Zo(ot.marker)-Zo(ye);if(!(dn>=0&&Rt<=0||dn<=0&&Rt>=0)&&(dn<=0&&(ot.marker.inclusiveRight&&ye.inclusiveLeft?Jt(Lt.to,ge)>=0:Jt(Lt.to,ge)>0)||dn>=0&&(ot.marker.inclusiveRight&&ye.inclusiveLeft?Jt(Lt.from,fe)<=0:Jt(Lt.from,fe)<0)))return!0}}}function jr(ie){for(var ae;ae=ia(ie);)ie=ae.find(-1,!0).line;return ie}function To(ie){for(var ae;ae=Or(ie);)ie=ae.find(1,!0).line;return ie}function qa(ie){for(var ae,ge;ae=Or(ie);)ie=ae.find(1,!0).line,(ge||(ge=[])).push(ie);return ge}function Mr(ie,ae){var ge=Vt(ie,ae),fe=jr(ge);return ge==fe?ae:yt(fe)}function hr(ie,ae){if(ae>ie.lastLine())return ae;var ge=Vt(ie,ae),fe;if(!Xn(ie,ge))return ae;for(;fe=Or(ge);)ge=fe.find(1,!0).line;return yt(ge)+1}function Xn(ie,ae){var ge=Nn&&ae.markedSpans;if(ge){for(var fe=void 0,ye=0;ye<ge.length;++ye)if(fe=ge[ye],!!fe.marker.collapsed){if(fe.from==null)return!0;if(!fe.marker.widgetNode&&fe.from==0&&fe.marker.inclusiveLeft&&yr(ie,ae,fe))return!0}}}function yr(ie,ae,ge){if(ge.to==null){var fe=ge.marker.find(1,!0);return yr(ie,fe.line,co(fe.line.markedSpans,ge.marker))}if(ge.marker.inclusiveRight&&ge.to==ae.text.length)return!0;for(var ye=void 0,Te=0;Te<ae.markedSpans.length;++Te)if(ye=ae.markedSpans[Te],ye.marker.collapsed&&!ye.marker.widgetNode&&ye.from==ge.to&&(ye.to==null||ye.to!=ge.from)&&(ye.marker.inclusiveLeft||ge.marker.inclusiveRight)&&yr(ie,ae,ye))return!0}function wo(ie){ie=jr(ie);for(var ae=0,ge=ie.parent,fe=0;fe<ge.lines.length;++fe){var ye=ge.lines[fe];if(ye==ie)break;ae+=ye.height}for(var Te=ge.parent;Te;ge=Te,Te=ge.parent)for(var We=0;We<Te.children.length;++We){var st=Te.children[We];if(st==ge)break;ae+=st.height}return ae}function ua(ie){if(ie.height==0)return 0;for(var ae=ie.text.length,ge,fe=ie;ge=ia(fe);){var ye=ge.find(0,!0);fe=ye.from.line,ae+=ye.from.ch-ye.to.ch}for(fe=ie;ge=Or(fe);){var Te=ge.find(0,!0);ae-=fe.text.length-Te.from.ch,fe=Te.to.line,ae+=fe.text.length-Te.to.ch}return ae}function No(ie){var ae=ie.display,ge=ie.doc;ae.maxLine=Vt(ge,ge.first),ae.maxLineLength=ua(ae.maxLine),ae.maxLineChanged=!0,ge.iter(function(fe){var ye=ua(fe);ye>ae.maxLineLength&&(ae.maxLineLength=ye,ae.maxLine=fe)})}var yo=function(ie,ae,ge){this.text=ie,tt(this,ae),this.height=ge?ge(this):1};yo.prototype.lineNo=function(){return yt(this)},Rn(yo);function ta(ie,ae,ge,fe){ie.text=ae,ie.stateAfter&&(ie.stateAfter=null),ie.styles&&(ie.styles=null),ie.order!=null&&(ie.order=null),xi(ie),tt(ie,ge);var ye=fe?fe(ie):1;ye!=ie.height&&An(ie,ye)}function na(ie){ie.parent=null,xi(ie)}var Na={},ka={};function is(ie,ae){if(!ie||/^\s*$/.test(ie))return null;var ge=ae.addModeClass?ka:Na;return ge[ie]||(ge[ie]=ie.replace(/\S+/g,"cm-$&"))}function gn(ie,ae){var ge=gt("span",null,null,Be?"padding-right: .1px":null),fe={pre:gt("pre",[ge],"CodeMirror-line"),content:ge,col:0,pos:0,cm:ie,trailingSpace:!1,splitSpaces:ie.getOption("lineWrapping")};ae.measure={};for(var ye=0;ye<=(ae.rest?ae.rest.length:0);ye++){var Te=ye?ae.rest[ye-1]:ae.line,We=void 0;fe.pos=0,fe.addToken=Vl,nr(ie.display.measure)&&(We=un(Te,ie.doc.direction))&&(fe.addToken=wl(fe.addToken,We)),fe.map=[];var st=ae!=ie.display.externalMeasured&&yt(Te);yu(Te,fe,Dr(ie,Te,st)),Te.styleClasses&&(Te.styleClasses.bgClass&&(fe.bgClass=Nt(Te.styleClasses.bgClass,fe.bgClass||"")),Te.styleClasses.textClass&&(fe.textClass=Nt(Te.styleClasses.textClass,fe.textClass||""))),fe.map.length==0&&fe.map.push(0,0,fe.content.appendChild(Pi(ie.display.measure))),ye==0?(ae.measure.map=fe.map,ae.measure.cache={}):((ae.measure.maps||(ae.measure.maps=[])).push(fe.map),(ae.measure.caches||(ae.measure.caches=[])).push({}))}if(Be){var ot=fe.content.lastChild;(/\bcm-tab\b/.test(ot.className)||ot.querySelector&&ot.querySelector(".cm-tab"))&&(fe.content.className="cm-tab-wrap-hack")}return pn(ie,"renderLine",ie,ae.line,fe.pre),fe.pre.className&&(fe.textClass=Nt(fe.pre.className,fe.textClass||"")),fe}function Oa(ie){var ae=$e("span","\u2022","cm-invalidchar");return ae.title="\\u"+ie.charCodeAt(0).toString(16),ae.setAttribute("aria-label",ae.title),ae}function Vl(ie,ae,ge,fe,ye,Te,We){if(ae){var st=ie.splitSpaces?Hs(ae,ie.trailingSpace):ae,ot=ie.cm.state.specialChars,Lt=!1,dn;if(!ot.test(ae))ie.col+=ae.length,dn=document.createTextNode(st),ie.map.push(ie.pos,ie.pos+ae.length,dn),Ze&&Ke<9&&(Lt=!0),ie.pos+=ae.length;else{dn=document.createDocumentFragment();for(var Rt=0;;){ot.lastIndex=Rt;var zn=ot.exec(ae),In=zn?zn.index-Rt:ae.length-Rt;if(In){var Ci=document.createTextNode(st.slice(Rt,Rt+In));Ze&&Ke<9?dn.appendChild($e("span",[Ci])):dn.appendChild(Ci),ie.map.push(ie.pos,ie.pos+In,Ci),ie.col+=In,ie.pos+=In}if(!zn)break;Rt+=In+1;var Ti=void 0;if(zn[0]==" "){var Zi=ie.cm.options.tabSize,vr=Zi-ie.col%Zi;Ti=dn.appendChild($e("span",Cn(vr),"cm-tab")),Ti.setAttribute("role","presentation"),Ti.setAttribute("cm-text"," "),ie.col+=vr}else zn[0]=="\r"||zn[0]==`
|
|
|
`?(Ti=dn.appendChild($e("span",zn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Ti.setAttribute("cm-text",zn[0]),ie.col+=1):(Ti=ie.cm.options.specialCharPlaceholder(zn[0]),Ti.setAttribute("cm-text",zn[0]),Ze&&Ke<9?dn.appendChild($e("span",[Ti])):dn.appendChild(Ti),ie.col+=1);ie.map.push(ie.pos,ie.pos+1,Ti),ie.pos++}}if(ie.trailingSpace=st.charCodeAt(ae.length-1)==32,ge||fe||ye||Lt||Te||We){var Kr=ge||"";fe&&(Kr+=fe),ye&&(Kr+=ye);var Br=$e("span",[dn],Kr,Te);if(We)for(var io in We)We.hasOwnProperty(io)&&io!="style"&&io!="class"&&Br.setAttribute(io,We[io]);return ie.content.appendChild(Br)}ie.content.appendChild(dn)}}function Hs(ie,ae){if(ie.length>1&&!/ /.test(ie))return ie;for(var ge=ae,fe="",ye=0;ye<ie.length;ye++){var Te=ie.charAt(ye);Te==" "&&ge&&(ye==ie.length-1||ie.charCodeAt(ye+1)==32)&&(Te="\xA0"),fe+=Te,ge=Te==" "}return fe}function wl(ie,ae){return function(ge,fe,ye,Te,We,st,ot){ye=ye?ye+" cm-force-border":"cm-force-border";for(var Lt=ge.pos,dn=Lt+fe.length;;){for(var Rt=void 0,zn=0;zn<ae.length&&(Rt=ae[zn],!(Rt.to>Lt&&Rt.from<=Lt));zn++);if(Rt.to>=dn)return ie(ge,fe,ye,Te,We,st,ot);ie(ge,fe.slice(0,Rt.to-Lt),ye,Te,null,st,ot),Te=null,fe=fe.slice(Rt.to-Lt),Lt=Rt.to}}}function Ma(ie,ae,ge,fe){var ye=!fe&&ge.widgetNode;ye&&ie.map.push(ie.pos,ie.pos+ae,ye),!fe&&ie.cm.display.input.needsContentAttribute&&(ye||(ye=ie.content.appendChild(document.createElement("span"))),ye.setAttribute("cm-marker",ge.id)),ye&&(ie.cm.display.input.setUneditable(ye),ie.content.appendChild(ye)),ie.pos+=ae,ie.trailingSpace=!1}function yu(ie,ae,ge){var fe=ie.markedSpans,ye=ie.text,Te=0;if(!fe){for(var We=1;We<ge.length;We+=2)ae.addToken(ae,ye.slice(Te,Te=ge[We]),is(ge[We+1],ae.cm.options));return}for(var st=ye.length,ot=0,Lt=1,dn="",Rt,zn,In=0,Ci,Ti,Zi,vr,Kr;;){if(In==ot){Ci=Ti=Zi=zn="",Kr=null,vr=null,In=1/0;for(var Br=[],io=void 0,Wo=0;Wo<fe.length;++Wo){var Lr=fe[Wo],oa=Lr.marker;if(oa.type=="bookmark"&&Lr.from==ot&&oa.widgetNode)Br.push(oa);else if(Lr.from<=ot&&(Lr.to==null||Lr.to>ot||oa.collapsed&&Lr.to==ot&&Lr.from==ot)){if(Lr.to!=null&&Lr.to!=ot&&In>Lr.to&&(In=Lr.to,Ti=""),oa.className&&(Ci+=" "+oa.className),oa.css&&(zn=(zn?zn+";":"")+oa.css),oa.startStyle&&Lr.from==ot&&(Zi+=" "+oa.startStyle),oa.endStyle&&Lr.to==In&&(io||(io=[])).push(oa.endStyle,Lr.to),oa.title&&((Kr||(Kr={})).title=oa.title),oa.attributes)for(var Ss in oa.attributes)(Kr||(Kr={}))[Ss]=oa.attributes[Ss];oa.collapsed&&(!vr||ga(vr.marker,oa)<0)&&(vr=Lr)}else Lr.from>ot&&In>Lr.from&&(In=Lr.from)}if(io)for(var ol=0;ol<io.length;ol+=2)io[ol+1]==In&&(Ti+=" "+io[ol]);if(!vr||vr.from==ot)for(var Ls=0;Ls<Br.length;++Ls)Ma(ae,0,Br[Ls]);if(vr&&(vr.from||0)==ot){if(Ma(ae,(vr.to==null?st+1:vr.to)-ot,vr.marker,vr.from==null),vr.to==null)return;vr.to==ot&&(vr=!1)}}if(ot>=st)break;for(var du=Math.min(st,In);;){if(dn){var Zl=ot+dn.length;if(!vr){var qs=Zl>du?dn.slice(0,du-ot):dn;ae.addToken(ae,qs,Rt?Rt+Ci:Ci,Zi,ot+qs.length==In?Ti:"",zn,Kr)}if(Zl>=du){dn=dn.slice(du-ot),ot=du;break}ot=Zl,Zi=""}dn=ye.slice(Te,Te=ge[Lt++]),Rt=is(ge[Lt++],ae.cm.options)}}}function Cl(ie,ae,ge){this.line=ae,this.rest=qa(ae),this.size=this.rest?yt(ft(this.rest))-ge+1:1,this.node=this.text=null,this.hidden=Xn(ie,ae)}function ma(ie,ae,ge){for(var fe=[],ye,Te=ae;Te<ge;Te=ye){var We=new Cl(ie.doc,Vt(ie.doc,Te),Te);ye=Te+We.size,fe.push(We)}return fe}var Fo=null;function Ul(ie){Fo?Fo.ops.push(ie):ie.ownsGroup=Fo={ops:[ie],delayedCallbacks:[]}}function $r(ie){var ae=ie.delayedCallbacks,ge=0;do{for(;ge<ae.length;ge++)ae[ge].call(null);for(var fe=0;fe<ie.ops.length;fe++){var ye=ie.ops[fe];if(ye.cursorActivityHandlers)for(;ye.cursorActivityCalled<ye.cursorActivityHandlers.length;)ye.cursorActivityHandlers[ye.cursorActivityCalled++].call(null,ye.cm)}}while(ge<ae.length)}function Ko(ie,ae){var ge=ie.ownsGroup;if(ge)try{$r(ge)}finally{Fo=null,ae(ge)}}var So=null;function Di(ie,ae){var ge=wn(ie,ae);if(ge.length){var fe=Array.prototype.slice.call(arguments,2),ye;Fo?ye=Fo.delayedCallbacks:So?ye=So:(ye=So=[],setTimeout(Ga,0));for(var Te=function(st){ye.push(function(){return ge[st].apply(null,fe)})},We=0;We<ge.length;++We)Te(We)}}function Ga(){var ie=So;So=null;for(var ae=0;ae<ie.length;++ae)ie[ae]()}function $a(ie,ae,ge,fe){for(var ye=0;ye<ae.changes.length;ye++){var Te=ae.changes[ye];Te=="text"?bi(ie,ae):Te=="gutter"?cs(ie,ae,ge,fe):Te=="class"?Fa(ie,ae):Te=="widget"&&bl(ie,ae,fe)}ae.changes=null}function bs(ie){return ie.node==ie.text&&(ie.node=$e("div",null,null,"position: relative"),ie.text.parentNode&&ie.text.parentNode.replaceChild(ie.node,ie.text),ie.node.appendChild(ie.text),Ze&&Ke<8&&(ie.node.style.zIndex=2)),ie.node}function El(ie,ae){var ge=ae.bgClass?ae.bgClass+" "+(ae.line.bgClass||""):ae.line.bgClass;if(ge&&(ge+=" CodeMirror-linebackground"),ae.background)ge?ae.background.className=ge:(ae.background.parentNode.removeChild(ae.background),ae.background=null);else if(ge){var fe=bs(ae);ae.background=fe.insertBefore($e("div",null,ge),fe.firstChild),ie.display.input.setUneditable(ae.background)}}function Dl(ie,ae){var ge=ie.display.externalMeasured;return ge&&ge.line==ae.line?(ie.display.externalMeasured=null,ae.measure=ge.measure,ge.built):gn(ie,ae)}function bi(ie,ae){var ge=ae.text.className,fe=Dl(ie,ae);ae.text==ae.node&&(ae.node=fe.pre),ae.text.parentNode.replaceChild(fe.pre,ae.text),ae.text=fe.pre,fe.bgClass!=ae.bgClass||fe.textClass!=ae.textClass?(ae.bgClass=fe.bgClass,ae.textClass=fe.textClass,Fa(ie,ae)):ge&&(ae.text.className=ge)}function Fa(ie,ae){El(ie,ae),ae.line.wrapClass?bs(ae).className=ae.line.wrapClass:ae.node!=ae.text&&(ae.node.className="");var ge=ae.textClass?ae.textClass+" "+(ae.line.textClass||""):ae.line.textClass;ae.text.className=ge||""}function cs(ie,ae,ge,fe){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 ye=bs(ae);ae.gutterBackground=$e("div",null,"CodeMirror-gutter-background "+ae.line.gutterClass,"left: "+(ie.options.fixedGutter?fe.fixedPos:-fe.gutterTotalWidth)+"px; width: "+fe.gutterTotalWidth+"px"),ie.display.input.setUneditable(ae.gutterBackground),ye.insertBefore(ae.gutterBackground,ae.text)}var Te=ae.line.gutterMarkers;if(ie.options.lineNumbers||Te){var We=bs(ae),st=ae.gutter=$e("div",null,"CodeMirror-gutter-wrapper","left: "+(ie.options.fixedGutter?fe.fixedPos:-fe.gutterTotalWidth)+"px");if(ie.display.input.setUneditable(st),We.insertBefore(st,ae.text),ae.line.gutterClass&&(st.className+=" "+ae.line.gutterClass),ie.options.lineNumbers&&(!Te||!Te["CodeMirror-linenumbers"])&&(ae.lineNumber=st.appendChild($e("div",ri(ie.options,ge),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+fe.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+ie.display.lineNumInnerWidth+"px"))),Te)for(var ot=0;ot<ie.display.gutterSpecs.length;++ot){var Lt=ie.display.gutterSpecs[ot].className,dn=Te.hasOwnProperty(Lt)&&Te[Lt];dn&&st.appendChild($e("div",[dn],"CodeMirror-gutter-elt","left: "+fe.gutterLeft[Lt]+"px; width: "+fe.gutterWidth[Lt]+"px"))}}}function bl(ie,ae,ge){ae.alignable&&(ae.alignable=null);for(var fe=Me("CodeMirror-linewidget"),ye=ae.node.firstChild,Te=void 0;ye;ye=Te)Te=ye.nextSibling,fe.test(ye.className)&&ae.node.removeChild(ye);Il(ie,ae,ge)}function Ol(ie,ae,ge,fe){var ye=Dl(ie,ae);return ae.text=ae.node=ye.pre,ye.bgClass&&(ae.bgClass=ye.bgClass),ye.textClass&&(ae.textClass=ye.textClass),Fa(ie,ae),cs(ie,ae,ge,fe),Il(ie,ae,fe),ae.node}function Il(ie,ae,ge){if(Qr(ie,ae.line,ae,ge,!0),ae.rest)for(var fe=0;fe<ae.rest.length;fe++)Qr(ie,ae.rest[fe],ae,ge,!1)}function Qr(ie,ae,ge,fe,ye){if(ae.widgets)for(var Te=bs(ge),We=0,st=ae.widgets;We<st.length;++We){var ot=st[We],Lt=$e("div",[ot.node],"CodeMirror-linewidget"+(ot.className?" "+ot.className:""));ot.handleMouseEvents||Lt.setAttribute("cm-ignore-events","true"),Ju(ot,Lt,ge,fe),ie.display.input.setUneditable(Lt),ye&&ot.above?Te.insertBefore(Lt,ge.gutter||ge.text):Te.appendChild(Lt),Di(ot,"redraw")}}function Ju(ie,ae,ge,fe){if(ie.noHScroll){(ge.alignable||(ge.alignable=[])).push(ae);var ye=fe.wrapperWidth;ae.style.left=fe.fixedPos+"px",ie.coverGutter||(ye-=fe.gutterTotalWidth,ae.style.paddingLeft=fe.gutterTotalWidth+"px"),ae.style.width=ye+"px"}ie.coverGutter&&(ae.style.zIndex=5,ae.style.position="relative",ie.noHScroll||(ae.style.marginLeft=-fe.gutterTotalWidth+"px"))}function nl(ie){if(ie.height!=null)return ie.height;var ae=ie.doc.cm;if(!ae)return 0;if(!Tt(document.body,ie.node)){var ge="position: relative;";ie.coverGutter&&(ge+="margin-left: -"+ae.display.gutters.offsetWidth+"px;"),ie.noHScroll&&(ge+="width: "+ae.display.wrapper.clientWidth+"px;"),et(ae.display.measure,$e("div",[ie.node],null,ge))}return ie.height=ie.node.parentNode.offsetHeight}function vs(ie,ae){for(var ge=Ji(ae);ge!=ie.wrapper;ge=ge.parentNode)if(!ge||ge.nodeType==1&&ge.getAttribute("cm-ignore-events")=="true"||ge.parentNode==ie.sizer&&ge!=ie.mover)return!0}function ys(ie){return ie.lineSpace.offsetTop}function Su(ie){return ie.mover.offsetHeight-ie.lineSpace.offsetHeight}function Iu(ie){if(ie.cachedPaddingH)return ie.cachedPaddingH;var ae=et(ie.measure,$e("pre","x","CodeMirror-line-like")),ge=window.getComputedStyle?window.getComputedStyle(ae):ae.currentStyle,fe={left:parseInt(ge.paddingLeft),right:parseInt(ge.paddingRight)};return!isNaN(fe.left)&&!isNaN(fe.right)&&(ie.cachedPaddingH=fe),fe}function Ys(ie){return ln-ie.display.nativeBarWidth}function ul(ie){return ie.display.scroller.clientWidth-Ys(ie)-ie.display.barWidth}function Mh(ie){return ie.display.scroller.clientHeight-Ys(ie)-ie.display.barHeight}function uc(ie,ae,ge){var fe=ie.options.lineWrapping,ye=fe&&ul(ie);if(!ae.measure.heights||fe&&ae.measure.width!=ye){var Te=ae.measure.heights=[];if(fe){ae.measure.width=ye;for(var We=ae.text.firstChild.getClientRects(),st=0;st<We.length-1;st++){var ot=We[st],Lt=We[st+1];Math.abs(ot.bottom-Lt.bottom)>2&&Te.push((ot.bottom+Lt.top)/2-ge.top)}}Te.push(ge.bottom-ge.top)}}function Lh(ie,ae,ge){if(ie.line==ae)return{map:ie.measure.map,cache:ie.measure.cache};for(var fe=0;fe<ie.rest.length;fe++)if(ie.rest[fe]==ae)return{map:ie.measure.maps[fe],cache:ie.measure.caches[fe]};for(var ye=0;ye<ie.rest.length;ye++)if(yt(ie.rest[ye])>ge)return{map:ie.measure.maps[ye],cache:ie.measure.caches[ye],before:!0}}function hc(ie,ae){ae=jr(ae);var ge=yt(ae),fe=ie.display.externalMeasured=new Cl(ie.doc,ae,ge);fe.lineN=ge;var ye=fe.built=gn(ie,fe);return fe.text=ye.pre,et(ie.display.lineMeasure,ye.pre),fe}function Fh(ie,ae,ge,fe){return Rl(ie,Qu(ie,ae),ge,fe)}function Ru(ie,ae){if(ae>=ie.display.viewFrom&&ae<ie.display.viewTo)return ie.display.view[Tr(ie,ae)];var ge=ie.display.externalMeasured;if(ge&&ae>=ge.lineN&&ae<ge.lineN+ge.size)return ge}function Qu(ie,ae){var ge=yt(ae),fe=Ru(ie,ge);fe&&!fe.text?fe=null:fe&&fe.changes&&($a(ie,fe,ge,po(ie)),ie.curOp.forceUpdate=!0),fe||(fe=hc(ie,ae));var ye=Lh(fe,ae,ge);return{line:ae,view:fe,rect:null,map:ye.map,cache:ye.cache,before:ye.before,hasHeights:!1}}function Rl(ie,ae,ge,fe,ye){ae.before&&(ge=-1);var Te=ge+(fe||""),We;return ae.cache.hasOwnProperty(Te)?We=ae.cache[Te]:(ae.rect||(ae.rect=ae.view.text.getBoundingClientRect()),ae.hasHeights||(uc(ie,ae.view,ae.rect),ae.hasHeights=!0),We=Co(ie,ae,ge,fe),We.bogus||(ae.cache[Te]=We)),{left:We.left,right:We.right,top:ye?We.rtop:We.top,bottom:ye?We.rbottom:We.bottom}}var Hh={left:0,right:0,top:0,bottom:0};function qu(ie,ae,ge){for(var fe,ye,Te,We,st,ot,Lt=0;Lt<ie.length;Lt+=3)if(st=ie[Lt],ot=ie[Lt+1],ae<st?(ye=0,Te=1,We="left"):ae<ot?(ye=ae-st,Te=ye+1):(Lt==ie.length-3||ae==ot&&ie[Lt+3]>ae)&&(Te=ot-st,ye=Te-1,ae>=ot&&(We="right")),ye!=null){if(fe=ie[Lt+2],st==ot&&ge==(fe.insertLeft?"left":"right")&&(We=ge),ge=="left"&&ye==0)for(;Lt&&ie[Lt-2]==ie[Lt-3]&&ie[Lt-1].insertLeft;)fe=ie[(Lt-=3)+2],We="left";if(ge=="right"&&ye==ot-st)for(;Lt<ie.length-3&&ie[Lt+3]==ie[Lt+4]&&!ie[Lt+5].insertLeft;)fe=ie[(Lt+=3)+2],We="right";break}return{node:fe,start:ye,end:Te,collapse:We,coverStart:st,coverEnd:ot}}function eh(ie,ae){var ge=Hh;if(ae=="left")for(var fe=0;fe<ie.length&&(ge=ie[fe]).left==ge.right;fe++);else for(var ye=ie.length-1;ye>=0&&(ge=ie[ye]).left==ge.right;ye--);return ge}function Co(ie,ae,ge,fe){var ye=qu(ae.map,ge,fe),Te=ye.node,We=ye.start,st=ye.end,ot=ye.collapse,Lt;if(Te.nodeType==3){for(var dn=0;dn<4;dn++){for(;We&&Pt(ae.line.text.charAt(ye.coverStart+We));)--We;for(;ye.coverStart+st<ye.coverEnd&&Pt(ae.line.text.charAt(ye.coverStart+st));)++st;if(Ze&&Ke<9&&We==0&&st==ye.coverEnd-ye.coverStart?Lt=Te.parentNode.getBoundingClientRect():Lt=eh(je(Te,We,st).getClientRects(),fe),Lt.left||Lt.right||We==0)break;st=We,We=We-1,ot="right"}Ze&&Ke<11&&(Lt=Uo(ie.display.measure,Lt))}else{We>0&&(ot=fe="right");var Rt;ie.options.lineWrapping&&(Rt=Te.getClientRects()).length>1?Lt=Rt[fe=="right"?Rt.length-1:0]:Lt=Te.getBoundingClientRect()}if(Ze&&Ke<9&&!We&&(!Lt||!Lt.left&&!Lt.right)){var zn=Te.parentNode.getClientRects()[0];zn?Lt={left:zn.left,right:zn.left+jo(ie.display),top:zn.top,bottom:zn.bottom}:Lt=Hh}for(var In=Lt.top-ae.rect.top,Ci=Lt.bottom-ae.rect.top,Ti=(In+Ci)/2,Zi=ae.view.measure.heights,vr=0;vr<Zi.length-1&&!(Ti<Zi[vr]);vr++);var Kr=vr?Zi[vr-1]:0,Br=Zi[vr],io={left:(ot=="right"?Lt.right:Lt.left)-ae.rect.left,right:(ot=="left"?Lt.left:Lt.right)-ae.rect.left,top:Kr,bottom:Br};return!Lt.left&&!Lt.right&&(io.bogus=!0),ie.options.singleCursorHeightPerLine||(io.rtop=In,io.rbottom=Ci),io}function Uo(ie,ae){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!hn(ie))return ae;var ge=screen.logicalXDPI/screen.deviceXDPI,fe=screen.logicalYDPI/screen.deviceYDPI;return{left:ae.left*ge,right:ae.right*ge,top:ae.top*fe,bottom:ae.bottom*fe}}function Ws(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 ds(ie){ie.display.externalMeasure=null,ze(ie.display.lineMeasure);for(var ae=0;ae<ie.display.view.length;ae++)Ws(ie.display.view[ae])}function es(ie){ds(ie),ie.display.cachedCharWidth=ie.display.cachedTextHeight=ie.display.cachedPaddingH=null,ie.options.lineWrapping||(ie.display.maxLineChanged=!0),ie.display.lineNumChars=null}function Aa(){return ct&&te?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function za(){return ct&&te?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function rs(ie){var ae=0;if(ie.widgets)for(var ge=0;ge<ie.widgets.length;++ge)ie.widgets[ge].above&&(ae+=nl(ie.widgets[ge]));return ae}function Ka(ie,ae,ge,fe,ye){if(!ye){var Te=rs(ae);ge.top+=Te,ge.bottom+=Te}if(fe=="line")return ge;fe||(fe="local");var We=wo(ae);if(fe=="local"?We+=ys(ie.display):We-=ie.display.viewOffset,fe=="page"||fe=="window"){var st=ie.display.lineSpace.getBoundingClientRect();We+=st.top+(fe=="window"?0:za());var ot=st.left+(fe=="window"?0:Aa());ge.left+=ot,ge.right+=ot}return ge.top+=We,ge.bottom+=We,ge}function Gs(ie,ae,ge){if(ge=="div")return ae;var fe=ae.left,ye=ae.top;if(ge=="page")fe-=Aa(),ye-=za();else if(ge=="local"||!ge){var Te=ie.display.sizer.getBoundingClientRect();fe+=Te.left,ye+=Te.top}var We=ie.display.lineSpace.getBoundingClientRect();return{left:fe-We.left,top:ye-We.top}}function $s(ie,ae,ge,fe,ye){return fe||(fe=Vt(ie.doc,ae.line)),Ka(ie,fe,Fh(ie,fe,ae.ch,ye),ge)}function va(ie,ae,ge,fe,ye,Te){fe=fe||Vt(ie.doc,ae.line),ye||(ye=Qu(ie,fe));function We(Ci,Ti){var Zi=Rl(ie,ye,Ci,Ti?"right":"left",Te);return Ti?Zi.left=Zi.right:Zi.right=Zi.left,Ka(ie,fe,Zi,ge)}var st=un(fe,ie.doc.direction),ot=ae.ch,Lt=ae.sticky;if(ot>=fe.text.length?(ot=fe.text.length,Lt="before"):ot<=0&&(ot=0,Lt="after"),!st)return We(Lt=="before"?ot-1:ot,Lt=="before");function dn(Ci,Ti,Zi){var vr=st[Ti],Kr=vr.level==1;return We(Zi?Ci-1:Ci,Kr!=Zi)}var Rt=lt(st,ot,Lt),zn=vt,In=dn(ot,Rt,Lt=="before");return zn!=null&&(In.other=dn(ot,zn,Lt!="before")),In}function rd(ie,ae){var ge=0;ae=li(ie.doc,ae),ie.options.lineWrapping||(ge=jo(ie.display)*ae.ch);var fe=Vt(ie.doc,ae.line),ye=wo(fe)+ys(ie.display);return{left:ge,right:ge,top:ye,bottom:ye+fe.height}}function Mc(ie,ae,ge,fe,ye){var Te=Wt(ie,ae,ge);return Te.xRel=ye,fe&&(Te.outside=fe),Te}function Kt(ie,ae,ge){var fe=ie.doc;if(ge+=ie.display.viewOffset,ge<0)return Mc(fe.first,0,null,-1,-1);var ye=cn(fe,ge),Te=fe.first+fe.size-1;if(ye>Te)return Mc(fe.first+fe.size-1,Vt(fe,Te).text.length,null,1,1);ae<0&&(ae=0);for(var We=Vt(fe,ye);;){var st=yn(ie,We,ye,ae,ge),ot=kr(We,st.ch+(st.xRel>0||st.outside>0?1:0));if(!ot)return st;var Lt=ot.find(1);if(Lt.line==ye)return Lt;We=Vt(fe,ye=Lt.line)}}function _t(ie,ae,ge,fe){fe-=rs(ae);var ye=ae.text.length,Te=Ue(function(We){return Rl(ie,ge,We-1).bottom<=fe},ye,0);return ye=Ue(function(We){return Rl(ie,ge,We).top>fe},Te,ye),{begin:Te,end:ye}}function mn(ie,ae,ge,fe){ge||(ge=Qu(ie,ae));var ye=Ka(ie,ae,Rl(ie,ge,fe),"line").top;return _t(ie,ae,ge,ye)}function it(ie,ae,ge,fe){return ie.bottom<=ge?!1:ie.top>ge?!0:(fe?ie.left:ie.right)>ae}function yn(ie,ae,ge,fe,ye){ye-=wo(ae);var Te=Qu(ie,ae),We=rs(ae),st=0,ot=ae.text.length,Lt=!0,dn=un(ae,ie.doc.direction);if(dn){var Rt=(ie.options.lineWrapping?Bo:zr)(ie,ae,ge,Te,dn,fe,ye);Lt=Rt.level!=1,st=Lt?Rt.from:Rt.to-1,ot=Lt?Rt.to:Rt.from-1}var zn=null,In=null,Ci=Ue(function(Wo){var Lr=Rl(ie,Te,Wo);return Lr.top+=We,Lr.bottom+=We,it(Lr,fe,ye,!1)?(Lr.top<=ye&&Lr.left<=fe&&(zn=Wo,In=Lr),!0):!1},st,ot),Ti,Zi,vr=!1;if(In){var Kr=fe-In.left<In.right-fe,Br=Kr==Lt;Ci=zn+(Br?0:1),Zi=Br?"after":"before",Ti=Kr?In.left:In.right}else{!Lt&&(Ci==ot||Ci==st)&&Ci++,Zi=Ci==0?"after":Ci==ae.text.length?"before":Rl(ie,Te,Ci-(Lt?1:0)).bottom+We<=ye==Lt?"after":"before";var io=va(ie,Wt(ge,Ci,Zi),"line",ae,Te);Ti=io.left,vr=ye<io.top?-1:ye>=io.bottom?1:0}return Ci=qe(ae.text,Ci,1),Mc(ge,Ci,Zi,vr,fe-Ti)}function zr(ie,ae,ge,fe,ye,Te,We){var st=Ue(function(Rt){var zn=ye[Rt],In=zn.level!=1;return it(va(ie,Wt(ge,In?zn.to:zn.from,In?"before":"after"),"line",ae,fe),Te,We,!0)},0,ye.length-1),ot=ye[st];if(st>0){var Lt=ot.level!=1,dn=va(ie,Wt(ge,Lt?ot.from:ot.to,Lt?"after":"before"),"line",ae,fe);it(dn,Te,We,!0)&&dn.top>We&&(ot=ye[st-1])}return ot}function Bo(ie,ae,ge,fe,ye,Te,We){var st=_t(ie,ae,fe,We),ot=st.begin,Lt=st.end;/\s/.test(ae.text.charAt(Lt-1))&&Lt--;for(var dn=null,Rt=null,zn=0;zn<ye.length;zn++){var In=ye[zn];if(!(In.from>=Lt||In.to<=ot)){var Ci=In.level!=1,Ti=Rl(ie,fe,Ci?Math.min(Lt,In.to)-1:Math.max(ot,In.from)).right,Zi=Ti<Te?Te-Ti+1e9:Ti-Te;(!dn||Rt>Zi)&&(dn=In,Rt=Zi)}}return dn||(dn=ye[ye.length-1]),dn.from<ot&&(dn={from:ot,to:dn.to,level:dn.level}),dn.to>Lt&&(dn={from:dn.from,to:Lt,level:dn.level}),dn}var Ir;function _r(ie){if(ie.cachedTextHeight!=null)return ie.cachedTextHeight;if(Ir==null){Ir=$e("pre",null,"CodeMirror-line-like");for(var ae=0;ae<49;++ae)Ir.appendChild(document.createTextNode("x")),Ir.appendChild($e("br"));Ir.appendChild(document.createTextNode("x"))}et(ie.measure,Ir);var ge=Ir.offsetHeight/50;return ge>3&&(ie.cachedTextHeight=ge),ze(ie.measure),ge||1}function jo(ie){if(ie.cachedCharWidth!=null)return ie.cachedCharWidth;var ae=$e("span","xxxxxxxxxx"),ge=$e("pre",[ae],"CodeMirror-line-like");et(ie.measure,ge);var fe=ae.getBoundingClientRect(),ye=(fe.right-fe.left)/10;return ye>2&&(ie.cachedCharWidth=ye),ye||10}function po(ie){for(var ae=ie.display,ge={},fe={},ye=ae.gutters.clientLeft,Te=ae.gutters.firstChild,We=0;Te;Te=Te.nextSibling,++We){var st=ie.display.gutterSpecs[We].className;ge[st]=Te.offsetLeft+Te.clientLeft+ye,fe[st]=Te.clientWidth}return{fixedPos:Go(ae),gutterTotalWidth:ae.gutters.offsetWidth,gutterLeft:ge,gutterWidth:fe,wrapperWidth:ae.wrapper.clientWidth}}function Go(ie){return ie.scroller.getBoundingClientRect().left-ie.sizer.getBoundingClientRect().left}function ho(ie){var ae=_r(ie.display),ge=ie.options.lineWrapping,fe=ge&&Math.max(5,ie.display.scroller.clientWidth/jo(ie.display)-3);return function(ye){if(Xn(ie.doc,ye))return 0;var Te=0;if(ye.widgets)for(var We=0;We<ye.widgets.length;We++)ye.widgets[We].height&&(Te+=ye.widgets[We].height);return ge?Te+(Math.ceil(ye.text.length/fe)||1)*ae:Te+ae}}function _i(ie){var ae=ie.doc,ge=ho(ie);ae.iter(function(fe){var ye=ge(fe);ye!=fe.height&&An(fe,ye)})}function $i(ie,ae,ge,fe){var ye=ie.display;if(!ge&&Ji(ae).getAttribute("cm-not-content")=="true")return null;var Te,We,st=ye.lineSpace.getBoundingClientRect();try{Te=ae.clientX-st.left,We=ae.clientY-st.top}catch(Rt){return null}var ot=Kt(ie,Te,We),Lt;if(fe&&ot.xRel>0&&(Lt=Vt(ie.doc,ot.line).text).length==ot.ch){var dn=ut(Lt,Lt.length,ie.options.tabSize)-Lt.length;ot=Wt(ot.line,Math.max(0,Math.round((Te-Iu(ie.display).left)/jo(ie.display))-dn))}return ot}function Tr(ie,ae){if(ae>=ie.display.viewTo||(ae-=ie.display.viewFrom,ae<0))return null;for(var ge=ie.display.view,fe=0;fe<ge.length;fe++)if(ae-=ge[fe].size,ae<0)return fe}function Ar(ie,ae,ge,fe){ae==null&&(ae=ie.doc.first),ge==null&&(ge=ie.doc.first+ie.doc.size),fe||(fe=0);var ye=ie.display;if(fe&&ge<ye.viewTo&&(ye.updateLineNumbers==null||ye.updateLineNumbers>ae)&&(ye.updateLineNumbers=ae),ie.curOp.viewChanged=!0,ae>=ye.viewTo)Nn&&Mr(ie.doc,ae)<ye.viewTo&&Cr(ie);else if(ge<=ye.viewFrom)Nn&&hr(ie.doc,ge+fe)>ye.viewFrom?Cr(ie):(ye.viewFrom+=fe,ye.viewTo+=fe);else if(ae<=ye.viewFrom&&ge>=ye.viewTo)Cr(ie);else if(ae<=ye.viewFrom){var Te=Lo(ie,ge,ge+fe,1);Te?(ye.view=ye.view.slice(Te.index),ye.viewFrom=Te.lineN,ye.viewTo+=fe):Cr(ie)}else if(ge>=ye.viewTo){var We=Lo(ie,ae,ae,-1);We?(ye.view=ye.view.slice(0,We.index),ye.viewTo=We.lineN):Cr(ie)}else{var st=Lo(ie,ae,ae,-1),ot=Lo(ie,ge,ge+fe,1);st&&ot?(ye.view=ye.view.slice(0,st.index).concat(ma(ie,st.lineN,ot.lineN)).concat(ye.view.slice(ot.index)),ye.viewTo+=fe):Cr(ie)}var Lt=ye.externalMeasured;Lt&&(ge<Lt.lineN?Lt.lineN+=fe:ae<Lt.lineN+Lt.size&&(ye.externalMeasured=null))}function or(ie,ae,ge){ie.curOp.viewChanged=!0;var fe=ie.display,ye=ie.display.externalMeasured;if(ye&&ae>=ye.lineN&&ae<ye.lineN+ye.size&&(fe.externalMeasured=null),!(ae<fe.viewFrom||ae>=fe.viewTo)){var Te=fe.view[Tr(ie,ae)];if(Te.node!=null){var We=Te.changes||(Te.changes=[]);kt(We,ge)==-1&&We.push(ge)}}}function Cr(ie){ie.display.viewFrom=ie.display.viewTo=ie.doc.first,ie.display.view=[],ie.display.viewOffset=0}function Lo(ie,ae,ge,fe){var ye=Tr(ie,ae),Te,We=ie.display.view;if(!Nn||ge==ie.doc.first+ie.doc.size)return{index:ye,lineN:ge};for(var st=ie.display.viewFrom,ot=0;ot<ye;ot++)st+=We[ot].size;if(st!=ae){if(fe>0){if(ye==We.length-1)return null;Te=st+We[ye].size-ae,ye++}else Te=st-ae;ae+=Te,ge+=Te}for(;Mr(ie.doc,ge)!=ge;){if(ye==(fe<0?0:We.length-1))return null;ge+=fe*We[ye-(fe<0?1:0)].size,ye+=fe}return{index:ye,lineN:ge}}function Rr(ie,ae,ge){var fe=ie.display,ye=fe.view;ye.length==0||ae>=fe.viewTo||ge<=fe.viewFrom?(fe.view=ma(ie,ae,ge),fe.viewFrom=ae):(fe.viewFrom>ae?fe.view=ma(ie,ae,fe.viewFrom).concat(fe.view):fe.viewFrom<ae&&(fe.view=fe.view.slice(Tr(ie,ae))),fe.viewFrom=ae,fe.viewTo<ge?fe.view=fe.view.concat(ma(ie,fe.viewTo,ge)):fe.viewTo>ge&&(fe.view=fe.view.slice(0,Tr(ie,ge)))),fe.viewTo=ge}function tr(ie){for(var ae=ie.display.view,ge=0,fe=0;fe<ae.length;fe++){var ye=ae[fe];!ye.hidden&&(!ye.node||ye.changes)&&++ge}return ge}function cr(ie){ie.display.input.showSelection(ie.display.input.prepareSelection())}function lr(ie,ae){ae===void 0&&(ae=!0);for(var ge=ie.doc,fe={},ye=fe.cursors=document.createDocumentFragment(),Te=fe.selection=document.createDocumentFragment(),We=0;We<ge.sel.ranges.length;We++)if(!(!ae&&We==ge.sel.primIndex)){var st=ge.sel.ranges[We];if(!(st.from().line>=ie.display.viewTo||st.to().line<ie.display.viewFrom)){var ot=st.empty();(ot||ie.options.showCursorWhenSelecting)&&Ii(ie,st.head,ye),ot||Yr(ie,st,Te)}}return fe}function Ii(ie,ae,ge){var fe=va(ie,ae,"div",null,null,!ie.options.singleCursorHeightPerLine),ye=ge.appendChild($e("div","\xA0","CodeMirror-cursor"));if(ye.style.left=fe.left+"px",ye.style.top=fe.top+"px",ye.style.height=Math.max(0,fe.bottom-fe.top)*ie.options.cursorHeight+"px",fe.other){var Te=ge.appendChild($e("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Te.style.display="",Te.style.left=fe.other.left+"px",Te.style.top=fe.other.top+"px",Te.style.height=(fe.other.bottom-fe.other.top)*.85+"px"}}function Do(ie,ae){return ie.top-ae.top||ie.left-ae.left}function Yr(ie,ae,ge){var fe=ie.display,ye=ie.doc,Te=document.createDocumentFragment(),We=Iu(ie.display),st=We.left,ot=Math.max(fe.sizerWidth,ul(ie)-fe.sizer.offsetLeft)-We.right,Lt=ye.direction=="ltr";function dn(Br,io,Wo,Lr){io<0&&(io=0),io=Math.round(io),Lr=Math.round(Lr),Te.appendChild($e("div",null,"CodeMirror-selected","position: absolute; left: "+Br+`px;
|
|
|
top: `+io+"px; width: "+(Wo==null?ot-Br:Wo)+`px;
|
|
|
height: `+(Lr-io)+"px"))}function Rt(Br,io,Wo){var Lr=Vt(ye,Br),oa=Lr.text.length,Ss,ol;function Ls(qs,Lu){return $s(ie,Wt(Br,qs),"div",Lr,Lu)}function du(qs,Lu,Fl){var el=mn(ie,Lr,null,qs),Da=Lu=="ltr"==(Fl=="after")?"left":"right",Ts=Fl=="after"?el.begin:el.end-(/\s/.test(Lr.text.charAt(el.end-1))?2:1);return Ls(Ts,Da)[Da]}var Zl=un(Lr,ye.direction);return St(Zl,io||0,Wo==null?oa:Wo,function(qs,Lu,Fl,el){var Da=Fl=="ltr",Ts=Ls(qs,Da?"left":"right"),cl=Ls(Lu-1,Da?"right":"left"),Bl=io==null&&qs==0,mh=Wo==null&&Lu==oa,Fs=el==0,ih=!Zl||el==Zl.length-1;if(cl.top-Ts.top<=3){var Zs=(Lt?Bl:mh)&&Fs,bf=(Lt?mh:Bl)&&ih,Wu=Zs?st:(Da?Ts:cl).left,Fu=bf?ot:(Da?cl:Ts).right;dn(Wu,Ts.top,Fu-Wu,Ts.bottom)}else{var fu,ls,dl,Yh;Da?(fu=Lt&&Bl&&Fs?st:Ts.left,ls=Lt?ot:du(qs,Fl,"before"),dl=Lt?st:du(Lu,Fl,"after"),Yh=Lt&&mh&&ih?ot:cl.right):(fu=Lt?du(qs,Fl,"before"):st,ls=!Lt&&Bl&&Fs?ot:Ts.right,dl=!Lt&&mh&&ih?st:cl.left,Yh=Lt?du(Lu,Fl,"after"):ot),dn(fu,Ts.top,ls-fu,Ts.bottom),Ts.bottom<cl.top&&dn(st,Ts.bottom,null,cl.top),dn(dl,cl.top,Yh-dl,cl.bottom)}(!Ss||Do(Ts,Ss)<0)&&(Ss=Ts),Do(cl,Ss)<0&&(Ss=cl),(!ol||Do(Ts,ol)<0)&&(ol=Ts),Do(cl,ol)<0&&(ol=cl)}),{start:Ss,end:ol}}var zn=ae.from(),In=ae.to();if(zn.line==In.line)Rt(zn.line,zn.ch,In.ch);else{var Ci=Vt(ye,zn.line),Ti=Vt(ye,In.line),Zi=jr(Ci)==jr(Ti),vr=Rt(zn.line,zn.ch,Zi?Ci.text.length+1:null).end,Kr=Rt(In.line,Zi?0:null,In.ch).start;Zi&&(vr.top<Kr.top-2?(dn(vr.right,vr.top,null,vr.bottom),dn(st,Kr.top,Kr.left,Kr.bottom)):dn(vr.right,vr.top,Kr.left-vr.right,vr.bottom)),vr.bottom<Kr.top&&dn(st,vr.bottom,null,Kr.top)}ge.appendChild(Te)}function ko(ie){if(ie.state.focused){var ae=ie.display;clearInterval(ae.blinker);var ge=!0;ae.cursorDiv.style.visibility="",ie.options.cursorBlinkRate>0?ae.blinker=setInterval(function(){ie.hasFocus()||Bs(ie),ae.cursorDiv.style.visibility=(ge=!ge)?"":"hidden"},ie.options.cursorBlinkRate):ie.options.cursorBlinkRate<0&&(ae.cursorDiv.style.visibility="hidden")}}function Yo(ie){ie.state.focused||(ie.display.input.focus(),Oo(ie))}function br(ie){ie.state.delayingBlurEvent=!0,setTimeout(function(){ie.state.delayingBlurEvent&&(ie.state.delayingBlurEvent=!1,Bs(ie))},100)}function Oo(ie,ae){ie.state.delayingBlurEvent&&(ie.state.delayingBlurEvent=!1),ie.options.readOnly!="nocursor"&&(ie.state.focused||(pn(ie,"focus",ie,ae),ie.state.focused=!0,bt(ie.display.wrapper,"CodeMirror-focused"),!ie.curOp&&ie.display.selForContextMenu!=ie.doc.sel&&(ie.display.input.reset(),Be&&setTimeout(function(){return ie.display.input.reset(!0)},20)),ie.display.input.receivedFocus()),ko(ie))}function Bs(ie,ae){ie.state.delayingBlurEvent||(ie.state.focused&&(pn(ie,"blur",ie,ae),ie.state.focused=!1,Ie(ie.display.wrapper,"CodeMirror-focused")),clearInterval(ie.display.blinker),setTimeout(function(){ie.state.focused||(ie.display.shift=!1)},150))}function Wi(ie){for(var ae=ie.display,ge=ae.lineDiv.offsetTop,fe=0;fe<ae.view.length;fe++){var ye=ae.view[fe],Te=ie.options.lineWrapping,We=void 0,st=0;if(!ye.hidden){if(Ze&&Ke<8){var ot=ye.node.offsetTop+ye.node.offsetHeight;We=ot-ge,ge=ot}else{var Lt=ye.node.getBoundingClientRect();We=Lt.bottom-Lt.top,!Te&&ye.text.firstChild&&(st=ye.text.firstChild.getBoundingClientRect().right-Lt.left-1)}var dn=ye.line.height-We;if((dn>.005||dn<-.005)&&(An(ye.line,We),Ia(ye.line),ye.rest))for(var Rt=0;Rt<ye.rest.length;Rt++)Ia(ye.rest[Rt]);if(st>ie.display.sizerWidth){var zn=Math.ceil(st/jo(ie.display));zn>ie.display.maxLineLength&&(ie.display.maxLineLength=zn,ie.display.maxLine=ye.line,ie.display.maxLineChanged=!0)}}}}function Ia(ie){if(ie.widgets)for(var ae=0;ae<ie.widgets.length;++ae){var ge=ie.widgets[ae],fe=ge.node.parentNode;fe&&(ge.height=fe.offsetHeight)}}function Vr(ie,ae,ge){var fe=ge&&ge.top!=null?Math.max(0,ge.top):ie.scroller.scrollTop;fe=Math.floor(fe-ys(ie));var ye=ge&&ge.bottom!=null?ge.bottom:fe+ie.wrapper.clientHeight,Te=cn(ae,fe),We=cn(ae,ye);if(ge&&ge.ensure){var st=ge.ensure.from.line,ot=ge.ensure.to.line;st<Te?(Te=st,We=cn(ae,wo(Vt(ae,st))+ie.wrapper.clientHeight)):Math.min(ot,ae.lastLine())>=We&&(Te=cn(ae,wo(Vt(ae,ot))-ie.wrapper.clientHeight),We=ot)}return{from:Te,to:Math.max(We,Te+1)}}function _a(ie,ae){if(!Yn(ie,"scrollCursorIntoView")){var ge=ie.display,fe=ge.sizer.getBoundingClientRect(),ye=null;if(ae.top+fe.top<0?ye=!0:ae.bottom+fe.top>(window.innerHeight||document.documentElement.clientHeight)&&(ye=!1),ye!=null&&!dt){var Te=$e("div","\u200B",null,`position: absolute;
|
|
|
top: `+(ae.top-ge.viewOffset-ys(ie.display))+`px;
|
|
|
height: `+(ae.bottom-ae.top+Ys(ie)+ge.barHeight)+`px;
|
|
|
left: `+ae.left+"px; width: "+Math.max(2,ae.right-ae.left)+"px;");ie.display.lineSpace.appendChild(Te),Te.scrollIntoView(ye),ie.display.lineSpace.removeChild(Te)}}}function Is(ie,ae,ge,fe){fe==null&&(fe=0);var ye;!ie.options.lineWrapping&&ae==ge&&(ae=ae.ch?Wt(ae.line,ae.sticky=="before"?ae.ch-1:ae.ch,"after"):ae,ge=ae.sticky=="before"?Wt(ae.line,ae.ch+1,"before"):ae);for(var Te=0;Te<5;Te++){var We=!1,st=va(ie,ae),ot=!ge||ge==ae?st:va(ie,ge);ye={left:Math.min(st.left,ot.left),top:Math.min(st.top,ot.top)-fe,right:Math.max(st.left,ot.left),bottom:Math.max(st.bottom,ot.bottom)+fe};var Lt=Wh(ie,ye),dn=ie.doc.scrollTop,Rt=ie.doc.scrollLeft;if(Lt.scrollTop!=null&&(Nh(ie,Lt.scrollTop),Math.abs(ie.doc.scrollTop-dn)>1&&(We=!0)),Lt.scrollLeft!=null&&(_u(ie,Lt.scrollLeft),Math.abs(ie.doc.scrollLeft-Rt)>1&&(We=!0)),!We)break}return ye}function ju(ie,ae){var ge=Wh(ie,ae);ge.scrollTop!=null&&Nh(ie,ge.scrollTop),ge.scrollLeft!=null&&_u(ie,ge.scrollLeft)}function Wh(ie,ae){var ge=ie.display,fe=_r(ie.display);ae.top<0&&(ae.top=0);var ye=ie.curOp&&ie.curOp.scrollTop!=null?ie.curOp.scrollTop:ge.scroller.scrollTop,Te=Mh(ie),We={};ae.bottom-ae.top>Te&&(ae.bottom=ae.top+Te);var st=ie.doc.height+Su(ge),ot=ae.top<fe,Lt=ae.bottom>st-fe;if(ae.top<ye)We.scrollTop=ot?0:ae.top;else if(ae.bottom>ye+Te){var dn=Math.min(ae.top,(Lt?st:ae.bottom)-Te);dn!=ye&&(We.scrollTop=dn)}var Rt=ie.options.fixedGutter?0:ge.gutters.offsetWidth,zn=ie.curOp&&ie.curOp.scrollLeft!=null?ie.curOp.scrollLeft:ge.scroller.scrollLeft-Rt,In=ul(ie)-ge.gutters.offsetWidth,Ci=ae.right-ae.left>In;return Ci&&(ae.right=ae.left+In),ae.left<10?We.scrollLeft=0:ae.left<zn?We.scrollLeft=Math.max(0,ae.left+Rt-(Ci?0:10)):ae.right>In+zn-3&&(We.scrollLeft=ae.right+(Ci?0:10)-In),We}function Bh(ie,ae){ae!=null&&(Ml(ie),ie.curOp.scrollTop=(ie.curOp.scrollTop==null?ie.doc.scrollTop:ie.curOp.scrollTop)+ae)}function ru(ie){Ml(ie);var ae=ie.getCursor();ie.curOp.scrollToPos={from:ae,to:ae,margin:ie.options.cursorScrollMargin}}function zu(ie,ae,ge){(ae!=null||ge!=null)&&Ml(ie),ae!=null&&(ie.curOp.scrollLeft=ae),ge!=null&&(ie.curOp.scrollTop=ge)}function aa(ie,ae){Ml(ie),ie.curOp.scrollToPos=ae}function Ml(ie){var ae=ie.curOp.scrollToPos;if(ae){ie.curOp.scrollToPos=null;var ge=rd(ie,ae.from),fe=rd(ie,ae.to);Gh(ie,ge,fe,ae.margin)}}function Gh(ie,ae,ge,fe){var ye=Wh(ie,{left:Math.min(ae.left,ge.left),top:Math.min(ae.top,ge.top)-fe,right:Math.max(ae.right,ge.right),bottom:Math.max(ae.bottom,ge.bottom)+fe});zu(ie,ye.scrollLeft,ye.scrollTop)}function Nh(ie,ae){Math.abs(ie.doc.scrollTop-ae)<2||(ce||Ui(ie,{top:ae}),Od(ie,ae,!0),ce&&Ui(ie),Qn(ie,100))}function Od(ie,ae,ge){ae=Math.max(0,Math.min(ie.display.scroller.scrollHeight-ie.display.scroller.clientHeight,ae)),!(ie.display.scroller.scrollTop==ae&&!ge)&&(ie.doc.scrollTop=ae,ie.display.scrollbars.setScrollTop(ae),ie.display.scroller.scrollTop!=ae&&(ie.display.scroller.scrollTop=ae))}function _u(ie,ae,ge,fe){ae=Math.max(0,Math.min(ae,ie.display.scroller.scrollWidth-ie.display.scroller.clientWidth)),!((ge?ae==ie.doc.scrollLeft:Math.abs(ie.doc.scrollLeft-ae)<2)&&!fe)&&(ie.doc.scrollLeft=ae,so(ie),ie.display.scroller.scrollLeft!=ae&&(ie.display.scroller.scrollLeft=ae),ie.display.scrollbars.setScrollLeft(ae))}function ou(ie){var ae=ie.display,ge=ae.gutters.offsetWidth,fe=Math.round(ie.doc.height+Su(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?ge:0,docHeight:fe,scrollHeight:fe+Ys(ie)+ae.barHeight,nativeBarWidth:ae.nativeBarWidth,gutterWidth:ge}}var xu=function(ie,ae,ge){this.cm=ge;var fe=this.vert=$e("div",[$e("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),ye=this.horiz=$e("div",[$e("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");fe.tabIndex=ye.tabIndex=-1,ie(fe),ie(ye),$t(fe,"scroll",function(){fe.clientHeight&&ae(fe.scrollTop,"vertical")}),$t(ye,"scroll",function(){ye.clientWidth&&ae(ye.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Ze&&Ke<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};xu.prototype.update=function(ie){var ae=ie.scrollWidth>ie.clientWidth+1,ge=ie.scrollHeight>ie.clientHeight+1,fe=ie.nativeBarWidth;if(ge){this.vert.style.display="block",this.vert.style.bottom=ae?fe+"px":"0";var ye=ie.viewHeight-(ae?fe:0);this.vert.firstChild.style.height=Math.max(0,ie.scrollHeight-ie.clientHeight+ye)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(ae){this.horiz.style.display="block",this.horiz.style.right=ge?fe+"px":"0",this.horiz.style.left=ie.barLeft+"px";var Te=ie.viewWidth-ie.barLeft-(ge?fe:0);this.horiz.firstChild.style.width=Math.max(0,ie.scrollWidth-ie.clientWidth+Te)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&ie.clientHeight>0&&(fe==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:ge?fe:0,bottom:ae?fe:0}},xu.prototype.setScrollLeft=function(ie){this.horiz.scrollLeft!=ie&&(this.horiz.scrollLeft=ie),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},xu.prototype.setScrollTop=function(ie){this.vert.scrollTop!=ie&&(this.vert.scrollTop=ie),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},xu.prototype.zeroWidthHack=function(){var ie=he&&!ht?"12px":"18px";this.horiz.style.height=this.vert.style.width=ie,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ge,this.disableVert=new Ge},xu.prototype.enableZeroWidthBar=function(ie,ae,ge){ie.style.pointerEvents="auto";function fe(){var ye=ie.getBoundingClientRect(),Te=ge=="vert"?document.elementFromPoint(ye.right-1,(ye.top+ye.bottom)/2):document.elementFromPoint((ye.right+ye.left)/2,ye.bottom-1);Te!=ie?ie.style.pointerEvents="none":ae.set(1e3,fe)}ae.set(1e3,fe)},xu.prototype.clear=function(){var ie=this.horiz.parentNode;ie.removeChild(this.horiz),ie.removeChild(this.vert)};var Pu=function(){};Pu.prototype.update=function(){return{bottom:0,right:0}},Pu.prototype.setScrollLeft=function(){},Pu.prototype.setScrollTop=function(){},Pu.prototype.clear=function(){};function dh(ie,ae){ae||(ae=ou(ie));var ge=ie.display.barWidth,fe=ie.display.barHeight;Lc(ie,ae);for(var ye=0;ye<4&&ge!=ie.display.barWidth||fe!=ie.display.barHeight;ye++)ge!=ie.display.barWidth&&ie.options.lineWrapping&&Wi(ie),Lc(ie,ou(ie)),ge=ie.display.barWidth,fe=ie.display.barHeight}function Lc(ie,ae){var ge=ie.display,fe=ge.scrollbars.update(ae);ge.sizer.style.paddingRight=(ge.barWidth=fe.right)+"px",ge.sizer.style.paddingBottom=(ge.barHeight=fe.bottom)+"px",ge.heightForcer.style.borderBottom=fe.bottom+"px solid transparent",fe.right&&fe.bottom?(ge.scrollbarFiller.style.display="block",ge.scrollbarFiller.style.height=fe.bottom+"px",ge.scrollbarFiller.style.width=fe.right+"px"):ge.scrollbarFiller.style.display="",fe.bottom&&ie.options.coverGutterNextToScrollbar&&ie.options.fixedGutter?(ge.gutterFiller.style.display="block",ge.gutterFiller.style.height=fe.bottom+"px",ge.gutterFiller.style.width=ae.gutterWidth+"px"):ge.gutterFiller.style.display=""}var Fc={native:xu,null:Pu};function Bc(ie){ie.display.scrollbars&&(ie.display.scrollbars.clear(),ie.display.scrollbars.addClass&&Ie(ie.display.wrapper,ie.display.scrollbars.addClass)),ie.display.scrollbars=new Fc[ie.options.scrollbarStyle](function(ae){ie.display.wrapper.insertBefore(ae,ie.display.scrollbarFiller),$t(ae,"mousedown",function(){ie.state.focused&&setTimeout(function(){return ie.display.input.focus()},0)}),ae.setAttribute("cm-not-content","true")},function(ae,ge){ge=="horizontal"?_u(ie,ae):Nh(ie,ae)},ie),ie.display.scrollbars.addClass&&bt(ie.display.wrapper,ie.display.scrollbars.addClass)}var od=0;function Zn(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:++od},Ul(ie.curOp)}function Sr(ie){var ae=ie.curOp;ae&&Ko(ae,function(ge){for(var fe=0;fe<ge.ops.length;fe++)ge.ops[fe].cm.curOp=null;Jo(ge)})}function Jo(ie){for(var ae=ie.ops,ge=0;ge<ae.length;ge++)Je(ae[ge]);for(var fe=0;fe<ae.length;fe++)Ye(ae[fe]);for(var ye=0;ye<ae.length;ye++)jt(ae[ye]);for(var Te=0;Te<ae.length;Te++)zt(ae[Te]);for(var We=0;We<ae.length;We++)nn(ae[We])}function Je(ie){var ae=ie.cm,ge=ae.display;ki(ae),ie.updateMaxLine&&No(ae),ie.mustUpdate=ie.viewChanged||ie.forceUpdate||ie.scrollTop!=null||ie.scrollToPos&&(ie.scrollToPos.from.line<ge.viewFrom||ie.scrollToPos.to.line>=ge.viewTo)||ge.maxLineChanged&&ae.options.lineWrapping,ie.update=ie.mustUpdate&&new Jn(ae,ie.mustUpdate&&{top:ie.scrollTop,ensure:ie.scrollToPos},ie.forceUpdate)}function Ye(ie){ie.updatedDisplay=ie.mustUpdate&&ar(ie.cm,ie.update)}function jt(ie){var ae=ie.cm,ge=ae.display;ie.updatedDisplay&&Wi(ae),ie.barMeasure=ou(ae),ge.maxLineChanged&&!ae.options.lineWrapping&&(ie.adjustWidthTo=Fh(ae,ge.maxLine,ge.maxLine.text.length).left+3,ae.display.sizerWidth=ie.adjustWidthTo,ie.barMeasure.scrollWidth=Math.max(ge.scroller.clientWidth,ge.sizer.offsetLeft+ie.adjustWidthTo+Ys(ae)+ae.display.barWidth),ie.maxScrollLeft=Math.max(0,ge.sizer.offsetLeft+ie.adjustWidthTo-ul(ae))),(ie.updatedDisplay||ie.selectionChanged)&&(ie.preparedSelection=ge.input.prepareSelection())}function zt(ie){var ae=ie.cm;ie.adjustWidthTo!=null&&(ae.display.sizer.style.minWidth=ie.adjustWidthTo+"px",ie.maxScrollLeft<ae.doc.scrollLeft&&_u(ae,Math.min(ae.display.scroller.scrollLeft,ie.maxScrollLeft),!0),ae.display.maxLineChanged=!1);var ge=ie.focus&&ie.focus==Qe();ie.preparedSelection&&ae.display.input.showSelection(ie.preparedSelection,ge),(ie.updatedDisplay||ie.startHeight!=ae.doc.height)&&dh(ae,ie.barMeasure),ie.updatedDisplay&&Xr(ae,ie.barMeasure),ie.selectionChanged&&ko(ae),ae.state.focused&&ie.updateInput&&ae.display.input.reset(ie.typing),ge&&Yo(ie.cm)}function nn(ie){var ae=ie.cm,ge=ae.display,fe=ae.doc;if(ie.updatedDisplay&&Mi(ae,ie.update),ge.wheelStartX!=null&&(ie.scrollTop!=null||ie.scrollLeft!=null||ie.scrollToPos)&&(ge.wheelStartX=ge.wheelStartY=null),ie.scrollTop!=null&&Od(ae,ie.scrollTop,ie.forceScroll),ie.scrollLeft!=null&&_u(ae,ie.scrollLeft,!0,!0),ie.scrollToPos){var ye=Is(ae,li(fe,ie.scrollToPos.from),li(fe,ie.scrollToPos.to),ie.scrollToPos.margin);_a(ae,ye)}var Te=ie.maybeHiddenMarkers,We=ie.maybeUnhiddenMarkers;if(Te)for(var st=0;st<Te.length;++st)Te[st].lines.length||pn(Te[st],"hide");if(We)for(var ot=0;ot<We.length;++ot)We[ot].lines.length&&pn(We[ot],"unhide");ge.wrapper.offsetHeight&&(fe.scrollTop=ae.display.scroller.scrollTop),ie.changeObjs&&pn(ae,"changes",ae,ie.changeObjs),ie.update&&ie.update.finish()}function Ht(ie,ae){if(ie.curOp)return ae();Zn(ie);try{return ae()}finally{Sr(ie)}}function Mn(ie,ae){return function(){if(ie.curOp)return ae.apply(ie,arguments);Zn(ie);try{return ae.apply(ie,arguments)}finally{Sr(ie)}}}function Sn(ie){return function(){if(this.curOp)return ie.apply(this,arguments);Zn(this);try{return ie.apply(this,arguments)}finally{Sr(this)}}}function Fn(ie){return function(){var ae=this.cm;if(!ae||ae.curOp)return ie.apply(this,arguments);Zn(ae);try{return ie.apply(this,arguments)}finally{Sr(ae)}}}function Qn(ie,ae){ie.doc.highlightFrontier<ie.display.viewTo&&ie.state.highlight.set(ae,Zt(kn,ie))}function kn(ie){var ae=ie.doc;if(!(ae.highlightFrontier>=ie.display.viewTo)){var ge=+new Date+ie.options.workTime,fe=ir(ie,ae.highlightFrontier),ye=[];ae.iter(fe.line,Math.min(ae.first+ae.size,ie.display.viewTo+500),function(Te){if(fe.line>=ie.display.viewFrom){var We=Te.styles,st=Te.text.length>ie.options.maxHighlightLength?Ut(ae.mode,fe.state):null,ot=Nr(ie,Te,fe,!0);st&&(fe.state=st),Te.styles=ot.styles;var Lt=Te.styleClasses,dn=ot.classes;dn?Te.styleClasses=dn:Lt&&(Te.styleClasses=null);for(var Rt=!We||We.length!=Te.styles.length||Lt!=dn&&(!Lt||!dn||Lt.bgClass!=dn.bgClass||Lt.textClass!=dn.textClass),zn=0;!Rt&&zn<We.length;++zn)Rt=We[zn]!=Te.styles[zn];Rt&&ye.push(fe.line),Te.stateAfter=fe.save(),fe.nextLine()}else Te.text.length<=ie.options.maxHighlightLength&&fn(ie,Te.text,fe),Te.stateAfter=fe.line%5==0?fe.save():null,fe.nextLine();if(+new Date>ge)return Qn(ie,ie.options.workDelay),!0}),ae.highlightFrontier=fe.line,ae.modeFrontier=Math.max(ae.modeFrontier,fe.line),ye.length&&Ht(ie,function(){for(var Te=0;Te<ye.length;Te++)or(ie,ye[Te],"text")})}}var Jn=function(ie,ae,ge){var fe=ie.display;this.viewport=ae,this.visible=Vr(fe,ie.doc,ae),this.editorIsHidden=!fe.wrapper.offsetWidth,this.wrapperHeight=fe.wrapper.clientHeight,this.wrapperWidth=fe.wrapper.clientWidth,this.oldDisplayWidth=ul(ie),this.force=ge,this.dims=po(ie),this.events=[]};Jn.prototype.signal=function(ie,ae){Wn(ie,ae)&&this.events.push(arguments)},Jn.prototype.finish=function(){for(var ie=0;ie<this.events.length;ie++)pn.apply(null,this.events[ie])};function ki(ie){var ae=ie.display;!ae.scrollbarsClipped&&ae.scroller.offsetWidth&&(ae.nativeBarWidth=ae.scroller.offsetWidth-ae.scroller.clientWidth,ae.heightForcer.style.height=Ys(ie)+"px",ae.sizer.style.marginBottom=-ae.nativeBarWidth+"px",ae.sizer.style.borderRightWidth=Ys(ie)+"px",ae.scrollbarsClipped=!0)}function wi(ie){if(ie.hasFocus())return null;var ae=Qe();if(!ae||!Tt(ie.display.lineDiv,ae))return null;var ge={activeElt:ae};if(window.getSelection){var fe=window.getSelection();fe.anchorNode&&fe.extend&&Tt(ie.display.lineDiv,fe.anchorNode)&&(ge.anchorNode=fe.anchorNode,ge.anchorOffset=fe.anchorOffset,ge.focusNode=fe.focusNode,ge.focusOffset=fe.focusOffset)}return ge}function yi(ie){if(!(!ie||!ie.activeElt||ie.activeElt==Qe())&&(ie.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(ie.activeElt.nodeName)&&ie.anchorNode&&Tt(document.body,ie.anchorNode)&&Tt(document.body,ie.focusNode))){var ae=window.getSelection(),ge=document.createRange();ge.setEnd(ie.anchorNode,ie.anchorOffset),ge.collapse(!1),ae.removeAllRanges(),ae.addRange(ge),ae.extend(ie.focusNode,ie.focusOffset)}}function ar(ie,ae){var ge=ie.display,fe=ie.doc;if(ae.editorIsHidden)return Cr(ie),!1;if(!ae.force&&ae.visible.from>=ge.viewFrom&&ae.visible.to<=ge.viewTo&&(ge.updateLineNumbers==null||ge.updateLineNumbers>=ge.viewTo)&&ge.renderedView==ge.view&&tr(ie)==0)return!1;pr(ie)&&(Cr(ie),ae.dims=po(ie));var ye=fe.first+fe.size,Te=Math.max(ae.visible.from-ie.options.viewportMargin,fe.first),We=Math.min(ye,ae.visible.to+ie.options.viewportMargin);ge.viewFrom<Te&&Te-ge.viewFrom<20&&(Te=Math.max(fe.first,ge.viewFrom)),ge.viewTo>We&&ge.viewTo-We<20&&(We=Math.min(ye,ge.viewTo)),Nn&&(Te=Mr(ie.doc,Te),We=hr(ie.doc,We));var st=Te!=ge.viewFrom||We!=ge.viewTo||ge.lastWrapHeight!=ae.wrapperHeight||ge.lastWrapWidth!=ae.wrapperWidth;Rr(ie,Te,We),ge.viewOffset=wo(Vt(ie.doc,ge.viewFrom)),ie.display.mover.style.top=ge.viewOffset+"px";var ot=tr(ie);if(!st&&ot==0&&!ae.force&&ge.renderedView==ge.view&&(ge.updateLineNumbers==null||ge.updateLineNumbers>=ge.viewTo))return!1;var Lt=wi(ie);return ot>4&&(ge.lineDiv.style.display="none"),Yi(ie,ge.updateLineNumbers,ae.dims),ot>4&&(ge.lineDiv.style.display=""),ge.renderedView=ge.view,yi(Lt),ze(ge.cursorDiv),ze(ge.selectionDiv),ge.gutters.style.height=ge.sizer.style.minHeight=0,st&&(ge.lastWrapHeight=ae.wrapperHeight,ge.lastWrapWidth=ae.wrapperWidth,Qn(ie,400)),ge.updateLineNumbers=null,!0}function Mi(ie,ae){for(var ge=ae.viewport,fe=!0;;fe=!1){if(!fe||!ie.options.lineWrapping||ae.oldDisplayWidth==ul(ie)){if(ge&&ge.top!=null&&(ge={top:Math.min(ie.doc.height+Su(ie.display)-Mh(ie),ge.top)}),ae.visible=Vr(ie.display,ie.doc,ge),ae.visible.from>=ie.display.viewFrom&&ae.visible.to<=ie.display.viewTo)break}else fe&&(ae.visible=Vr(ie.display,ie.doc,ge));if(!ar(ie,ae))break;Wi(ie);var ye=ou(ie);cr(ie),dh(ie,ye),Xr(ie,ye),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 Ui(ie,ae){var ge=new Jn(ie,ae);if(ar(ie,ge)){Wi(ie),Mi(ie,ge);var fe=ou(ie);cr(ie),dh(ie,fe),Xr(ie,fe),ge.finish()}}function Yi(ie,ae,ge){var fe=ie.display,ye=ie.options.lineNumbers,Te=fe.lineDiv,We=Te.firstChild;function st(Ci){var Ti=Ci.nextSibling;return Be&&he&&ie.display.currentWheelTarget==Ci?Ci.style.display="none":Ci.parentNode.removeChild(Ci),Ti}for(var ot=fe.view,Lt=fe.viewFrom,dn=0;dn<ot.length;dn++){var Rt=ot[dn];if(!Rt.hidden)if(!Rt.node||Rt.node.parentNode!=Te){var zn=Ol(ie,Rt,Lt,ge);Te.insertBefore(zn,We)}else{for(;We!=Rt.node;)We=st(We);var In=ye&&ae!=null&&ae<=Lt&&Rt.lineNumber;Rt.changes&&(kt(Rt.changes,"gutter")>-1&&(In=!1),$a(ie,Rt,Lt,ge)),In&&(ze(Rt.lineNumber),Rt.lineNumber.appendChild(document.createTextNode(ri(ie.options,Lt)))),We=Rt.node.nextSibling}Lt+=Rt.size}for(;We;)We=st(We)}function wr(ie){var ae=ie.gutters.offsetWidth;ie.sizer.style.marginLeft=ae+"px"}function Xr(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+Ys(ie)+"px"}function so(ie){var ae=ie.display,ge=ae.view;if(!(!ae.alignWidgets&&(!ae.gutters.firstChild||!ie.options.fixedGutter))){for(var fe=Go(ae)-ae.scroller.scrollLeft+ie.doc.scrollLeft,ye=ae.gutters.offsetWidth,Te=fe+"px",We=0;We<ge.length;We++)if(!ge[We].hidden){ie.options.fixedGutter&&(ge[We].gutter&&(ge[We].gutter.style.left=Te),ge[We].gutterBackground&&(ge[We].gutterBackground.style.left=Te));var st=ge[We].alignable;if(st)for(var ot=0;ot<st.length;ot++)st[ot].style.left=Te}ie.options.fixedGutter&&(ae.gutters.style.left=fe+ye+"px")}}function pr(ie){if(!ie.options.lineNumbers)return!1;var ae=ie.doc,ge=ri(ie.options,ae.first+ae.size-1),fe=ie.display;if(ge.length!=fe.lineNumChars){var ye=fe.measure.appendChild($e("div",[$e("div",ge)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Te=ye.firstChild.offsetWidth,We=ye.offsetWidth-Te;return fe.lineGutter.style.width="",fe.lineNumInnerWidth=Math.max(Te,fe.lineGutter.offsetWidth-We)+1,fe.lineNumWidth=fe.lineNumInnerWidth+We,fe.lineNumChars=fe.lineNumInnerWidth?ge.length:-1,fe.lineGutter.style.width=fe.lineNumWidth+"px",wr(ie.display),!0}return!1}function Ur(ie,ae){for(var ge=[],fe=!1,ye=0;ye<ie.length;ye++){var Te=ie[ye],We=null;if(typeof Te!="string"&&(We=Te.style,Te=Te.className),Te=="CodeMirror-linenumbers")if(ae)fe=!0;else continue;ge.push({className:Te,style:We})}return ae&&!fe&&ge.push({className:"CodeMirror-linenumbers",style:null}),ge}function zo(ie){var ae=ie.gutters,ge=ie.gutterSpecs;ze(ae),ie.lineGutter=null;for(var fe=0;fe<ge.length;++fe){var ye=ge[fe],Te=ye.className,We=ye.style,st=ae.appendChild($e("div",null,"CodeMirror-gutter "+Te));We&&(st.style.cssText=We),Te=="CodeMirror-linenumbers"&&(ie.lineGutter=st,st.style.width=(ie.lineNumWidth||1)+"px")}ae.style.display=ge.length?"":"none",wr(ie)}function Pr(ie){zo(ie.display),Ar(ie),so(ie)}function Wr(ie,ae,ge,fe){var ye=this;this.input=ge,ye.scrollbarFiller=$e("div",null,"CodeMirror-scrollbar-filler"),ye.scrollbarFiller.setAttribute("cm-not-content","true"),ye.gutterFiller=$e("div",null,"CodeMirror-gutter-filler"),ye.gutterFiller.setAttribute("cm-not-content","true"),ye.lineDiv=gt("div",null,"CodeMirror-code"),ye.selectionDiv=$e("div",null,null,"position: relative; z-index: 1"),ye.cursorDiv=$e("div",null,"CodeMirror-cursors"),ye.measure=$e("div",null,"CodeMirror-measure"),ye.lineMeasure=$e("div",null,"CodeMirror-measure"),ye.lineSpace=gt("div",[ye.measure,ye.lineMeasure,ye.selectionDiv,ye.cursorDiv,ye.lineDiv],null,"position: relative; outline: none");var Te=gt("div",[ye.lineSpace],"CodeMirror-lines");ye.mover=$e("div",[Te],null,"position: relative"),ye.sizer=$e("div",[ye.mover],"CodeMirror-sizer"),ye.sizerWidth=null,ye.heightForcer=$e("div",null,null,"position: absolute; height: "+ln+"px; width: 1px;"),ye.gutters=$e("div",null,"CodeMirror-gutters"),ye.lineGutter=null,ye.scroller=$e("div",[ye.sizer,ye.heightForcer,ye.gutters],"CodeMirror-scroll"),ye.scroller.setAttribute("tabIndex","-1"),ye.wrapper=$e("div",[ye.scrollbarFiller,ye.gutterFiller,ye.scroller],"CodeMirror"),Ze&&Ke<8&&(ye.gutters.style.zIndex=-1,ye.scroller.style.paddingRight=0),!Be&&!(ce&&ee)&&(ye.scroller.draggable=!0),ie&&(ie.appendChild?ie.appendChild(ye.wrapper):ie(ye.wrapper)),ye.viewFrom=ye.viewTo=ae.first,ye.reportedViewFrom=ye.reportedViewTo=ae.first,ye.view=[],ye.renderedView=null,ye.externalMeasured=null,ye.viewOffset=0,ye.lastWrapHeight=ye.lastWrapWidth=0,ye.updateLineNumbers=null,ye.nativeBarWidth=ye.barHeight=ye.barWidth=0,ye.scrollbarsClipped=!1,ye.lineNumWidth=ye.lineNumInnerWidth=ye.lineNumChars=null,ye.alignWidgets=!1,ye.cachedCharWidth=ye.cachedTextHeight=ye.cachedPaddingH=null,ye.maxLine=null,ye.maxLineLength=0,ye.maxLineChanged=!1,ye.wheelDX=ye.wheelDY=ye.wheelStartX=ye.wheelStartY=null,ye.shift=!1,ye.selForContextMenu=null,ye.activeTouch=null,ye.gutterSpecs=Ur(fe.gutters,fe.lineNumbers),zo(ye),ge.init(ye)}var xr=0,Ki=null;Ze?Ki=-.53:ce?Ki=15:ct?Ki=-.7:Et&&(Ki=-1/3);function Fr(ie){var ae=ie.wheelDeltaX,ge=ie.wheelDeltaY;return ae==null&&ie.detail&&ie.axis==ie.HORIZONTAL_AXIS&&(ae=ie.detail),ge==null&&ie.detail&&ie.axis==ie.VERTICAL_AXIS?ge=ie.detail:ge==null&&(ge=ie.wheelDelta),{x:ae,y:ge}}function no(ie){var ae=Fr(ie);return ae.x*=Ki,ae.y*=Ki,ae}function xo(ie,ae){var ge=Fr(ae),fe=ge.x,ye=ge.y,Te=ie.display,We=Te.scroller,st=We.scrollWidth>We.clientWidth,ot=We.scrollHeight>We.clientHeight;if(fe&&st||ye&&ot){if(ye&&he&&Be){e:for(var Lt=ae.target,dn=Te.view;Lt!=We;Lt=Lt.parentNode)for(var Rt=0;Rt<dn.length;Rt++)if(dn[Rt].node==Lt){ie.display.currentWheelTarget=Lt;break e}}if(fe&&!ce&&!He&&Ki!=null){ye&&ot&&Nh(ie,Math.max(0,We.scrollTop+ye*Ki)),_u(ie,Math.max(0,We.scrollLeft+fe*Ki)),(!ye||ye&&ot)&&ii(ae),Te.wheelStartX=null;return}if(ye&&Ki!=null){var zn=ye*Ki,In=ie.doc.scrollTop,Ci=In+Te.wrapper.clientHeight;zn<0?In=Math.max(0,In+zn-50):Ci=Math.min(ie.doc.height,Ci+zn+50),Ui(ie,{top:In,bottom:Ci})}xr<20&&(Te.wheelStartX==null?(Te.wheelStartX=We.scrollLeft,Te.wheelStartY=We.scrollTop,Te.wheelDX=fe,Te.wheelDY=ye,setTimeout(function(){if(Te.wheelStartX!=null){var Ti=We.scrollLeft-Te.wheelStartX,Zi=We.scrollTop-Te.wheelStartY,vr=Zi&&Te.wheelDY&&Zi/Te.wheelDY||Ti&&Te.wheelDX&&Ti/Te.wheelDX;Te.wheelStartX=Te.wheelStartY=null,vr&&(Ki=(Ki*xr+vr)/(xr+1),++xr)}},200)):(Te.wheelDX+=fe,Te.wheelDY+=ye))}}var Eo=function(ie,ae){this.ranges=ie,this.primIndex=ae};Eo.prototype.primary=function(){return this.ranges[this.primIndex]},Eo.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 ge=this.ranges[ae],fe=ie.ranges[ae];if(!hi(ge.anchor,fe.anchor)||!hi(ge.head,fe.head))return!1}return!0},Eo.prototype.deepCopy=function(){for(var ie=[],ae=0;ae<this.ranges.length;ae++)ie[ae]=new mr(ci(this.ranges[ae].anchor),ci(this.ranges[ae].head));return new Eo(ie,this.primIndex)},Eo.prototype.somethingSelected=function(){for(var ie=0;ie<this.ranges.length;ie++)if(!this.ranges[ie].empty())return!0;return!1},Eo.prototype.contains=function(ie,ae){ae||(ae=ie);for(var ge=0;ge<this.ranges.length;ge++){var fe=this.ranges[ge];if(Jt(ae,fe.from())>=0&&Jt(ie,fe.to())<=0)return ge}return-1};var mr=function(ie,ae){this.anchor=ie,this.head=ae};mr.prototype.from=function(){return qn(this.anchor,this.head)},mr.prototype.to=function(){return ui(this.anchor,this.head)},mr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ho(ie,ae,ge){var fe=ie&&ie.options.selectionsMayTouch,ye=ae[ge];ae.sort(function(zn,In){return Jt(zn.from(),In.from())}),ge=kt(ae,ye);for(var Te=1;Te<ae.length;Te++){var We=ae[Te],st=ae[Te-1],ot=Jt(st.to(),We.from());if(fe&&!We.empty()?ot>0:ot>=0){var Lt=qn(st.from(),We.from()),dn=ui(st.to(),We.to()),Rt=st.empty()?We.from()==We.head:st.from()==st.head;Te<=ge&&--ge,ae.splice(--Te,2,new mr(Rt?dn:Lt,Rt?Lt:dn))}}return new Eo(ae,ge)}function Vo(ie,ae){return new Eo([new mr(ie,ae||ie)],0)}function wa(ie){return ie.text?Wt(ie.from.line+ie.text.length-1,ft(ie.text).length+(ie.text.length==1?ie.from.ch:0)):ie.to}function sa(ie,ae){if(Jt(ie,ae.from)<0)return ie;if(Jt(ie,ae.to)<=0)return wa(ae);var ge=ie.line+ae.text.length-(ae.to.line-ae.from.line)-1,fe=ie.ch;return ie.line==ae.to.line&&(fe+=wa(ae).ch-ae.to.ch),Wt(ge,fe)}function os(ie,ae){for(var ge=[],fe=0;fe<ie.sel.ranges.length;fe++){var ye=ie.sel.ranges[fe];ge.push(new mr(sa(ye.anchor,ae),sa(ye.head,ae)))}return Ho(ie.cm,ge,ie.sel.primIndex)}function ts(ie,ae,ge){return ie.line==ae.line?Wt(ge.line,ie.ch-ae.ch+ge.ch):Wt(ge.line+(ie.line-ae.line),ie.ch)}function $o(ie,ae,ge){for(var fe=[],ye=Wt(ie.first,0),Te=ye,We=0;We<ae.length;We++){var st=ae[We],ot=ts(st.from,ye,Te),Lt=ts(wa(st),ye,Te);if(ye=st.to,Te=Lt,ge=="around"){var dn=ie.sel.ranges[We],Rt=Jt(dn.head,dn.anchor)<0;fe[We]=new mr(Rt?Lt:ot,Rt?ot:Lt)}else fe[We]=new mr(ot,ot)}return new Eo(fe,ie.sel.primIndex)}function oo(ie){ie.doc.mode=Ft(ie.options,ie.doc.modeOption),pa(ie)}function pa(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,Qn(ie,100),ie.state.modeGen++,ie.curOp&&Ar(ie)}function as(ie,ae){return ae.from.ch==0&&ae.to.ch==0&&ft(ae.text)==""&&(!ie.cm||ie.cm.options.wholeLineUpdateBefore)}function Va(ie,ae,ge,fe){function ye(Kr){return ge?ge[Kr]:null}function Te(Kr,Br,io){ta(Kr,Br,io,fe),Di(Kr,"change",Kr,ae)}function We(Kr,Br){for(var io=[],Wo=Kr;Wo<Br;++Wo)io.push(new yo(Lt[Wo],ye(Wo),fe));return io}var st=ae.from,ot=ae.to,Lt=ae.text,dn=Vt(ie,st.line),Rt=Vt(ie,ot.line),zn=ft(Lt),In=ye(Lt.length-1),Ci=ot.line-st.line;if(ae.full)ie.insert(0,We(0,Lt.length)),ie.remove(Lt.length,ie.size-Lt.length);else if(as(ie,ae)){var Ti=We(0,Lt.length-1);Te(Rt,Rt.text,In),Ci&&ie.remove(st.line,Ci),Ti.length&&ie.insert(st.line,Ti)}else if(dn==Rt)if(Lt.length==1)Te(dn,dn.text.slice(0,st.ch)+zn+dn.text.slice(ot.ch),In);else{var Zi=We(1,Lt.length-1);Zi.push(new yo(zn+dn.text.slice(ot.ch),In,fe)),Te(dn,dn.text.slice(0,st.ch)+Lt[0],ye(0)),ie.insert(st.line+1,Zi)}else if(Lt.length==1)Te(dn,dn.text.slice(0,st.ch)+Lt[0]+Rt.text.slice(ot.ch),ye(0)),ie.remove(st.line+1,Ci);else{Te(dn,dn.text.slice(0,st.ch)+Lt[0],ye(0)),Te(Rt,zn+Rt.text.slice(ot.ch),In);var vr=We(1,Lt.length-1);Ci>1&&ie.remove(st.line+1,Ci-1),ie.insert(st.line+1,vr)}Di(ie,"change",ie,ae)}function Ms(ie,ae,ge){function fe(ye,Te,We){if(ye.linked)for(var st=0;st<ye.linked.length;++st){var ot=ye.linked[st];if(ot.doc!=Te){var Lt=We&&ot.sharedHist;ge&&!Lt||(ae(ot.doc,Lt),fe(ot.doc,ye,Lt))}}}fe(ie,null,!0)}function bo(ie,ae){if(ae.cm)throw new Error("This document is already in use.");ie.doc=ae,ae.cm=ie,_i(ie),oo(ie),mo(ie),ie.options.lineWrapping||No(ie),ie.options.mode=ae.modeOption,Ar(ie)}function mo(ie){(ie.doc.direction=="rtl"?bt:Ie)(ie.display.lineDiv,"CodeMirror-rtl")}function Mo(ie){Ht(ie,function(){mo(ie),Ar(ie)})}function qr(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 ya(ie,ae){var ge={from:ci(ae.from),to:wa(ae),text:on(ie,ae.from,ae.to)};return hl(ie,ge,ae.from.line,ae.to.line+1),Ms(ie,function(fe){return hl(fe,ge,ae.from.line,ae.to.line+1)},!0),ge}function eo(ie){for(;ie.length;){var ae=ft(ie);if(ae.ranges)ie.pop();else break}}function _o(ie,ae){if(ae)return eo(ie.done),ft(ie.done);if(ie.done.length&&!ft(ie.done).ranges)return ft(ie.done);if(ie.done.length>1&&!ie.done[ie.done.length-2].ranges)return ie.done.pop(),ft(ie.done)}function ha(ie,ae,ge,fe){var ye=ie.history;ye.undone.length=0;var Te=+new Date,We,st;if((ye.lastOp==fe||ye.lastOrigin==ae.origin&&ae.origin&&(ae.origin.charAt(0)=="+"&&ye.lastModTime>Te-(ie.cm?ie.cm.options.historyEventDelay:500)||ae.origin.charAt(0)=="*"))&&(We=_o(ye,ye.lastOp==fe)))st=ft(We.changes),Jt(ae.from,ae.to)==0&&Jt(ae.from,st.to)==0?st.to=wa(ae):We.changes.push(ya(ie,ae));else{var ot=ft(ye.done);for((!ot||!ot.ranges)&&Ns(ie.sel,ye.done),We={changes:[ya(ie,ae)],generation:ye.generation},ye.done.push(We);ye.done.length>ye.undoDepth;)ye.done.shift(),ye.done[0].ranges||ye.done.shift()}ye.done.push(ge),ye.generation=++ye.maxGeneration,ye.lastModTime=ye.lastSelTime=Te,ye.lastOp=ye.lastSelOp=fe,ye.lastOrigin=ye.lastSelOrigin=ae.origin,st||pn(ie,"historyAdded")}function ca(ie,ae,ge,fe){var ye=ae.charAt(0);return ye=="*"||ye=="+"&&ge.ranges.length==fe.ranges.length&&ge.somethingSelected()==fe.somethingSelected()&&new Date-ie.history.lastSelTime<=(ie.cm?ie.cm.options.historyEventDelay:500)}function Vs(ie,ae,ge,fe){var ye=ie.history,Te=fe&&fe.origin;ge==ye.lastSelOp||Te&&ye.lastSelOrigin==Te&&(ye.lastModTime==ye.lastSelTime&&ye.lastOrigin==Te||ca(ie,Te,ft(ye.done),ae))?ye.done[ye.done.length-1]=ae:Ns(ae,ye.done),ye.lastSelTime=+new Date,ye.lastSelOrigin=Te,ye.lastSelOp=ge,fe&&fe.clearRedo!==!1&&eo(ye.undone)}function Ns(ie,ae){var ge=ft(ae);ge&&ge.ranges&&ge.equals(ie)||ae.push(ie)}function hl(ie,ae,ge,fe){var ye=ae["spans_"+ie.id],Te=0;ie.iter(Math.max(ie.first,ge),Math.min(ie.first+ie.size,fe),function(We){We.markedSpans&&((ye||(ye=ae["spans_"+ie.id]={}))[Te]=We.markedSpans),++Te})}function Ca(ie){if(!ie)return null;for(var ae,ge=0;ge<ie.length;++ge)ie[ge].marker.explicitlyCleared?ae||(ae=ie.slice(0,ge)):ae&&ae.push(ie[ge]);return ae?ae.length?ae:null:ie}function Us(ie,ae){var ge=ae["spans_"+ie.id];if(!ge)return null;for(var fe=[],ye=0;ye<ae.text.length;++ye)fe.push(Ca(ge[ye]));return fe}function ws(ie,ae){var ge=Us(ie,ae),fe=qi(ie,ae);if(!ge)return fe;if(!fe)return ge;for(var ye=0;ye<ge.length;++ye){var Te=ge[ye],We=fe[ye];if(Te&&We)e:for(var st=0;st<We.length;++st){for(var ot=We[st],Lt=0;Lt<Te.length;++Lt)if(Te[Lt].marker==ot.marker)continue e;Te.push(ot)}else We&&(ge[ye]=We)}return ge}function Rs(ie,ae,ge){for(var fe=[],ye=0;ye<ie.length;++ye){var Te=ie[ye];if(Te.ranges){fe.push(ge?Eo.prototype.deepCopy.call(Te):Te);continue}var We=Te.changes,st=[];fe.push({changes:st});for(var ot=0;ot<We.length;++ot){var Lt=We[ot],dn=void 0;if(st.push({from:Lt.from,to:Lt.to,text:Lt.text}),ae)for(var Rt in Lt)(dn=Rt.match(/^spans_(\d+)$/))&&kt(ae,Number(dn[1]))>-1&&(ft(st)[Rt]=Lt[Rt],delete Lt[Rt])}}return fe}function fh(ie,ae,ge,fe){if(fe){var ye=ie.anchor;if(ge){var Te=Jt(ae,ye)<0;Te!=Jt(ge,ye)<0?(ye=ae,ae=ge):Te!=Jt(ae,ge)<0&&(ae=ge)}return new mr(ye,ae)}else return new mr(ge||ae,ae)}function Ea(ie,ae,ge,fe,ye){ye==null&&(ye=ie.cm&&(ie.cm.display.shift||ie.extend)),Za(ie,new Eo([fh(ie.sel.primary(),ae,ge,ye)],0),fe)}function Ta(ie,ae,ge){for(var fe=[],ye=ie.cm&&(ie.cm.display.shift||ie.extend),Te=0;Te<ie.sel.ranges.length;Te++)fe[Te]=fh(ie.sel.ranges[Te],ae[Te],null,ye);var We=Ho(ie.cm,fe,ie.sel.primIndex);Za(ie,We,ge)}function ja(ie,ae,ge,fe){var ye=ie.sel.ranges.slice(0);ye[ae]=ge,Za(ie,Ho(ie.cm,ye,ie.sel.primIndex),fe)}function ms(ie,ae,ge,fe){Za(ie,Vo(ae,ge),fe)}function js(ie,ae,ge){var fe={ranges:ae.ranges,update:function(ye){this.ranges=[];for(var Te=0;Te<ye.length;Te++)this.ranges[Te]=new mr(li(ie,ye[Te].anchor),li(ie,ye[Te].head))},origin:ge&&ge.origin};return pn(ie,"beforeSelectionChange",ie,fe),ie.cm&&pn(ie.cm,"beforeSelectionChange",ie.cm,fe),fe.ranges!=ae.ranges?Ho(ie.cm,fe.ranges,fe.ranges.length-1):ae}function ra(ie,ae,ge){var fe=ie.history.done,ye=ft(fe);ye&&ye.ranges?(fe[fe.length-1]=ae,zs(ie,ae,ge)):Za(ie,ae,ge)}function Za(ie,ae,ge){zs(ie,ae,ge),Vs(ie,ie.sel,ie.cm?ie.cm.curOp.id:NaN,ge)}function zs(ie,ae,ge){(Wn(ie,"beforeSelectionChange")||ie.cm&&Wn(ie.cm,"beforeSelectionChange"))&&(ae=js(ie,ae,ge));var fe=ge&&ge.bias||(Jt(ae.primary().head,ie.sel.primary().head)<0?-1:1);jl(ie,Yl(ie,ae,fe,!0)),!(ge&&ge.scroll===!1)&&ie.cm&&ru(ie.cm)}function jl(ie,ae){ae.equals(ie.sel)||(ie.sel=ae,ie.cm&&(ie.cm.curOp.updateInput=1,ie.cm.curOp.selectionChanged=!0,ai(ie.cm)),Di(ie,"cursorActivity",ie))}function au(ie){jl(ie,Yl(ie,ie.sel,null,!1))}function Yl(ie,ae,ge,fe){for(var ye,Te=0;Te<ae.ranges.length;Te++){var We=ae.ranges[Te],st=ae.ranges.length==ie.sel.ranges.length&&ie.sel.ranges[Te],ot=Cu(ie,We.anchor,st&&st.anchor,ge,fe),Lt=Cu(ie,We.head,st&&st.head,ge,fe);(ye||ot!=We.anchor||Lt!=We.head)&&(ye||(ye=ae.ranges.slice(0,Te)),ye[Te]=new mr(ot,Lt))}return ye?Ho(ie.cm,ye,ae.primIndex):ae}function wu(ie,ae,ge,fe,ye){var Te=Vt(ie,ae.line);if(Te.markedSpans)for(var We=0;We<Te.markedSpans.length;++We){var st=Te.markedSpans[We],ot=st.marker,Lt="selectLeft"in ot?!ot.selectLeft:ot.inclusiveLeft,dn="selectRight"in ot?!ot.selectRight:ot.inclusiveRight;if((st.from==null||(Lt?st.from<=ae.ch:st.from<ae.ch))&&(st.to==null||(dn?st.to>=ae.ch:st.to>ae.ch))){if(ye&&(pn(ot,"beforeCursorEnter"),ot.explicitlyCleared))if(Te.markedSpans){--We;continue}else break;if(!ot.atomic)continue;if(ge){var Rt=ot.find(fe<0?1:-1),zn=void 0;if((fe<0?dn:Lt)&&(Rt=su(ie,Rt,-fe,Rt&&Rt.line==ae.line?Te:null)),Rt&&Rt.line==ae.line&&(zn=Jt(Rt,ge))&&(fe<0?zn<0:zn>0))return wu(ie,Rt,ae,fe,ye)}var In=ot.find(fe<0?-1:1);return(fe<0?Lt:dn)&&(In=su(ie,In,fe,In.line==ae.line?Te:null)),In?wu(ie,In,ae,fe,ye):null}}return ae}function Cu(ie,ae,ge,fe,ye){var Te=fe||1,We=wu(ie,ae,ge,Te,ye)||!ye&&wu(ie,ae,ge,Te,!0)||wu(ie,ae,ge,-Te,ye)||!ye&&wu(ie,ae,ge,-Te,!0);return We||(ie.cantEdit=!0,Wt(ie.first,0))}function su(ie,ae,ge,fe){return ge<0&&ae.ch==0?ae.line>ie.first?li(ie,Wt(ae.line-1)):null:ge>0&&ae.ch==(fe||Vt(ie,ae.line)).text.length?ae.line<ie.first+ie.size-1?Wt(ae.line+1,0):null:new Wt(ae.line,ae.ch+ge)}function La(ie){ie.setSelection(Wt(ie.firstLine(),0),Wt(ie.lastLine()),Bt)}function Xs(ie,ae,ge){var fe={canceled:!1,from:ae.from,to:ae.to,text:ae.text,origin:ae.origin,cancel:function(){return fe.canceled=!0}};return ge&&(fe.update=function(ye,Te,We,st){ye&&(fe.from=li(ie,ye)),Te&&(fe.to=li(ie,Te)),We&&(fe.text=We),st!==void 0&&(fe.origin=st)}),pn(ie,"beforeChange",ie,fe),ie.cm&&pn(ie.cm,"beforeChange",ie.cm,fe),fe.canceled?(ie.cm&&(ie.cm.curOp.updateInput=2),null):{from:fe.from,to:fe.to,text:fe.text,origin:fe.origin}}function fs(ie,ae,ge){if(ie.cm){if(!ie.cm.curOp)return Mn(ie.cm,fs)(ie,ae,ge);if(ie.cm.state.suppressEdits)return}if(!((Wn(ie,"beforeChange")||ie.cm&&Wn(ie.cm,"beforeChange"))&&(ae=Xs(ie,ae,!0),!ae))){var fe=fr&&!ge&&ro(ie,ae.from,ae.to);if(fe)for(var ye=fe.length-1;ye>=0;--ye)Ha(ie,{from:fe[ye].from,to:fe[ye].to,text:ye?[""]:ae.text,origin:ae.origin});else Ha(ie,ae)}}function Ha(ie,ae){if(!(ae.text.length==1&&ae.text[0]==""&&Jt(ae.from,ae.to)==0)){var ge=os(ie,ae);ha(ie,ae,ge,ie.cm?ie.cm.curOp.id:NaN),Eu(ie,ae,ge,qi(ie,ae));var fe=[];Ms(ie,function(ye,Te){!Te&&kt(fe,ye.history)==-1&&(Ua(ye.history,ae),fe.push(ye.history)),Eu(ye,ae,null,qi(ye,ae))})}}function lu(ie,ae,ge){var fe=ie.cm&&ie.cm.state.suppressEdits;if(!(fe&&!ge)){for(var ye=ie.history,Te,We=ie.sel,st=ae=="undo"?ye.done:ye.undone,ot=ae=="undo"?ye.undone:ye.done,Lt=0;Lt<st.length&&(Te=st[Lt],!(ge?Te.ranges&&!Te.equals(ie.sel):!Te.ranges));Lt++);if(Lt!=st.length){for(ye.lastOrigin=ye.lastSelOrigin=null;;)if(Te=st.pop(),Te.ranges){if(Ns(Te,ot),ge&&!Te.equals(ie.sel)){Za(ie,Te,{clearRedo:!1});return}We=Te}else if(fe){st.push(Te);return}else break;var dn=[];Ns(We,ot),ot.push({changes:dn,generation:ye.generation}),ye.generation=Te.generation||++ye.maxGeneration;for(var Rt=Wn(ie,"beforeChange")||ie.cm&&Wn(ie.cm,"beforeChange"),zn=function(Ti){var Zi=Te.changes[Ti];if(Zi.origin=ae,Rt&&!Xs(ie,Zi,!1))return st.length=0,{};dn.push(ya(ie,Zi));var vr=Ti?os(ie,Zi):ft(st);Eu(ie,Zi,vr,ws(ie,Zi)),!Ti&&ie.cm&&ie.cm.scrollIntoView({from:Zi.from,to:wa(Zi)});var Kr=[];Ms(ie,function(Br,io){!io&&kt(Kr,Br.history)==-1&&(Ua(Br.history,Zi),Kr.push(Br.history)),Eu(Br,Zi,null,ws(Br,Zi))})},In=Te.changes.length-1;In>=0;--In){var Ci=zn(In);if(Ci)return Ci.v}}}}function kh(ie,ae){if(ae!=0&&(ie.first+=ae,ie.sel=new Eo(En(ie.sel.ranges,function(ye){return new mr(Wt(ye.anchor.line+ae,ye.anchor.ch),Wt(ye.head.line+ae,ye.head.ch))}),ie.sel.primIndex),ie.cm)){Ar(ie.cm,ie.first,ie.first-ae,ae);for(var ge=ie.cm.display,fe=ge.viewFrom;fe<ge.viewTo;fe++)or(ie.cm,fe,"gutter")}}function Eu(ie,ae,ge,fe){if(ie.cm&&!ie.cm.curOp)return Mn(ie.cm,Eu)(ie,ae,ge,fe);if(ae.to.line<ie.first){kh(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 ye=ae.text.length-1-(ie.first-ae.from.line);kh(ie,ye),ae={from:Wt(ie.first,0),to:Wt(ae.to.line+ye,ae.to.ch),text:[ft(ae.text)],origin:ae.origin}}var Te=ie.lastLine();ae.to.line>Te&&(ae={from:ae.from,to:Wt(Te,Vt(ie,Te).text.length),text:[ae.text[0]],origin:ae.origin}),ae.removed=on(ie,ae.from,ae.to),ge||(ge=os(ie,ae)),ie.cm?th(ie.cm,ae,fe):Va(ie,ae,fe),zs(ie,ge,Bt),ie.cantEdit&&Cu(ie,Wt(ie.firstLine(),0))&&(ie.cantEdit=!1)}}function th(ie,ae,ge){var fe=ie.doc,ye=ie.display,Te=ae.from,We=ae.to,st=!1,ot=Te.line;ie.options.lineWrapping||(ot=yt(jr(Vt(fe,Te.line))),fe.iter(ot,We.line+1,function(In){if(In==ye.maxLine)return st=!0,!0})),fe.sel.contains(ae.from,ae.to)>-1&&ai(ie),Va(fe,ae,ge,ho(ie)),ie.options.lineWrapping||(fe.iter(ot,Te.line+ae.text.length,function(In){var Ci=ua(In);Ci>ye.maxLineLength&&(ye.maxLine=In,ye.maxLineLength=Ci,ye.maxLineChanged=!0,st=!1)}),st&&(ie.curOp.updateMaxLine=!0)),rr(fe,Te.line),Qn(ie,400);var Lt=ae.text.length-(We.line-Te.line)-1;ae.full?Ar(ie):Te.line==We.line&&ae.text.length==1&&!as(ie.doc,ae)?or(ie,Te.line,"text"):Ar(ie,Te.line,We.line+1,Lt);var dn=Wn(ie,"changes"),Rt=Wn(ie,"change");if(Rt||dn){var zn={from:Te,to:We,text:ae.text,removed:ae.removed,origin:ae.origin};Rt&&Di(ie,"change",ie,zn),dn&&(ie.curOp.changeObjs||(ie.curOp.changeObjs=[])).push(zn)}ie.display.selForContextMenu=null}function gh(ie,ae,ge,fe,ye){var Te;fe||(fe=ge),Jt(fe,ge)<0&&(Te=[fe,ge],ge=Te[0],fe=Te[1]),typeof ae=="string"&&(ae=ie.splitLines(ae)),fs(ie,{from:ge,to:fe,text:ae,origin:ye})}function Xl(ie,ae,ge,fe){ge<ie.line?ie.line+=fe:ae<ie.line&&(ie.line=ae,ie.ch=0)}function Sa(ie,ae,ge,fe){for(var ye=0;ye<ie.length;++ye){var Te=ie[ye],We=!0;if(Te.ranges){Te.copied||(Te=ie[ye]=Te.deepCopy(),Te.copied=!0);for(var st=0;st<Te.ranges.length;st++)Xl(Te.ranges[st].anchor,ae,ge,fe),Xl(Te.ranges[st].head,ae,ge,fe);continue}for(var ot=0;ot<Te.changes.length;++ot){var Lt=Te.changes[ot];if(ge<Lt.from.line)Lt.from=Wt(Lt.from.line+fe,Lt.from.ch),Lt.to=Wt(Lt.to.line+fe,Lt.to.ch);else if(ae<=Lt.to.line){We=!1;break}}We||(ie.splice(0,ye+1),ye=0)}}function Ua(ie,ae){var ge=ae.from.line,fe=ae.to.line,ye=ae.text.length-(fe-ge)-1;Sa(ie.done,ge,fe,ye),Sa(ie.undone,ge,fe,ye)}function ks(ie,ae,ge,fe){var ye=ae,Te=ae;return typeof ae=="number"?Te=Vt(ie,di(ie,ae)):ye=yt(ae),ye==null?null:(fe(Te,ye)&&ie.cm&&or(ie.cm,ye,ge),Te)}function Ya(ie){this.lines=ie,this.parent=null;for(var ae=0,ge=0;ge<ie.length;++ge)ie[ge].parent=this,ae+=ie[ge].height;this.height=ae}Ya.prototype={chunkSize:function(){return this.lines.length},removeInner:function(ie,ae){for(var ge=ie,fe=ie+ae;ge<fe;++ge){var ye=this.lines[ge];this.height-=ye.height,na(ye),Di(ye,"delete")}this.lines.splice(ie,ae)},collapse:function(ie){ie.push.apply(ie,this.lines)},insertInner:function(ie,ae,ge){this.height+=ge,this.lines=this.lines.slice(0,ie).concat(ae).concat(this.lines.slice(ie));for(var fe=0;fe<ae.length;++fe)ae[fe].parent=this},iterN:function(ie,ae,ge){for(var fe=ie+ae;ie<fe;++ie)if(ge(this.lines[ie]))return!0}};function fa(ie){this.children=ie;for(var ae=0,ge=0,fe=0;fe<ie.length;++fe){var ye=ie[fe];ae+=ye.chunkSize(),ge+=ye.height,ye.parent=this}this.size=ae,this.height=ge,this.parent=null}fa.prototype={chunkSize:function(){return this.size},removeInner:function(ie,ae){this.size-=ae;for(var ge=0;ge<this.children.length;++ge){var fe=this.children[ge],ye=fe.chunkSize();if(ie<ye){var Te=Math.min(ae,ye-ie),We=fe.height;if(fe.removeInner(ie,Te),this.height-=We-fe.height,ye==Te&&(this.children.splice(ge--,1),fe.parent=null),(ae-=Te)==0)break;ie=0}else ie-=ye}if(this.size-ae<25&&(this.children.length>1||!(this.children[0]instanceof Ya))){var st=[];this.collapse(st),this.children=[new Ya(st)],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,ge){this.size+=ae.length,this.height+=ge;for(var fe=0;fe<this.children.length;++fe){var ye=this.children[fe],Te=ye.chunkSize();if(ie<=Te){if(ye.insertInner(ie,ae,ge),ye.lines&&ye.lines.length>50){for(var We=ye.lines.length%25+25,st=We;st<ye.lines.length;){var ot=new Ya(ye.lines.slice(st,st+=25));ye.height-=ot.height,this.children.splice(++fe,0,ot),ot.parent=this}ye.lines=ye.lines.slice(0,We),this.maybeSpill()}break}ie-=Te}},maybeSpill:function(){if(!(this.children.length<=10)){var ie=this;do{var ae=ie.children.splice(ie.children.length-5,5),ge=new fa(ae);if(ie.parent){ie.size-=ge.size,ie.height-=ge.height;var ye=kt(ie.parent.children,ie);ie.parent.children.splice(ye+1,0,ge)}else{var fe=new fa(ie.children);fe.parent=ie,ie.children=[fe,ge],ie=fe}ge.parent=ie.parent}while(ie.children.length>10);ie.parent.maybeSpill()}},iterN:function(ie,ae,ge){for(var fe=0;fe<this.children.length;++fe){var ye=this.children[fe],Te=ye.chunkSize();if(ie<Te){var We=Math.min(ae,Te-ie);if(ye.iterN(ie,We,ge))return!0;if((ae-=We)==0)break;ie=0}else ie-=Te}}};var _s=function(ie,ae,ge){if(ge)for(var fe in ge)ge.hasOwnProperty(fe)&&(this[fe]=ge[fe]);this.doc=ie,this.node=ae};_s.prototype.clear=function(){var ie=this.doc.cm,ae=this.line.widgets,ge=this.line,fe=yt(ge);if(!(fe==null||!ae)){for(var ye=0;ye<ae.length;++ye)ae[ye]==this&&ae.splice(ye--,1);ae.length||(ge.widgets=null);var Te=nl(this);An(ge,Math.max(0,ge.height-Te)),ie&&(Ht(ie,function(){zl(ie,ge,-Te),or(ie,fe,"widget")}),Di(ie,"lineWidgetCleared",ie,this,fe))}},_s.prototype.changed=function(){var ie=this,ae=this.height,ge=this.doc.cm,fe=this.line;this.height=null;var ye=nl(this)-ae;ye&&(Xn(this.doc,fe)||An(fe,fe.height+ye),ge&&Ht(ge,function(){ge.curOp.forceUpdate=!0,zl(ge,fe,ye),Di(ge,"lineWidgetChanged",ge,ie,yt(fe))}))},Rn(_s);function zl(ie,ae,ge){wo(ae)<(ie.curOp&&ie.curOp.scrollTop||ie.doc.scrollTop)&&Bh(ie,ge)}function Zu(ie,ae,ge,fe){var ye=new _s(ie,ge,fe),Te=ie.cm;return Te&&ye.noHScroll&&(Te.display.alignWidgets=!0),ks(ie,ae,"widget",function(We){var st=We.widgets||(We.widgets=[]);if(ye.insertAt==null?st.push(ye):st.splice(Math.min(st.length-1,Math.max(0,ye.insertAt)),0,ye),ye.line=We,Te&&!Xn(ie,We)){var ot=wo(We)<ie.scrollTop;An(We,We.height+nl(ye)),ot&&Bh(Te,ye.height),Te.curOp.forceUpdate=!0}return!0}),Te&&Di(Te,"lineWidgetAdded",Te,ye,typeof ae=="number"?ae:yt(ae)),ye}var pf=0,Qt=function(ie,ae){this.lines=[],this.type=ae,this.doc=ie,this.id=++pf};Qt.prototype.clear=function(){if(!this.explicitlyCleared){var ie=this.doc.cm,ae=ie&&!ie.curOp;if(ae&&Zn(ie),Wn(this,"clear")){var ge=this.find();ge&&Di(this,"clear",ge.from,ge.to)}for(var fe=null,ye=null,Te=0;Te<this.lines.length;++Te){var We=this.lines[Te],st=co(We.markedSpans,this);ie&&!this.collapsed?or(ie,yt(We),"text"):ie&&(st.to!=null&&(ye=yt(We)),st.from!=null&&(fe=yt(We))),We.markedSpans=Bi(We.markedSpans,st),st.from==null&&this.collapsed&&!Xn(this.doc,We)&&ie&&An(We,_r(ie.display))}if(ie&&this.collapsed&&!ie.options.lineWrapping)for(var ot=0;ot<this.lines.length;++ot){var Lt=jr(this.lines[ot]),dn=ua(Lt);dn>ie.display.maxLineLength&&(ie.display.maxLine=Lt,ie.display.maxLineLength=dn,ie.display.maxLineChanged=!0)}fe!=null&&ie&&this.collapsed&&Ar(ie,fe,ye+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,ie&&au(ie.doc)),ie&&Di(ie,"markerCleared",ie,this,fe,ye),ae&&Sr(ie),this.parent&&this.parent.clear()}},Qt.prototype.find=function(ie,ae){ie==null&&this.type=="bookmark"&&(ie=1);for(var ge,fe,ye=0;ye<this.lines.length;++ye){var Te=this.lines[ye],We=co(Te.markedSpans,this);if(We.from!=null&&(ge=Wt(ae?Te:yt(Te),We.from),ie==-1))return ge;if(We.to!=null&&(fe=Wt(ae?Te:yt(Te),We.to),ie==1))return fe}return ge&&{from:ge,to:fe}},Qt.prototype.changed=function(){var ie=this,ae=this.find(-1,!0),ge=this,fe=this.doc.cm;!ae||!fe||Ht(fe,function(){var ye=ae.line,Te=yt(ae.line),We=Ru(fe,Te);if(We&&(Ws(We),fe.curOp.selectionChanged=fe.curOp.forceUpdate=!0),fe.curOp.updateMaxLine=!0,!Xn(ge.doc,ye)&&ge.height!=null){var st=ge.height;ge.height=null;var ot=nl(ge)-st;ot&&An(ye,ye.height+ot)}Di(fe,"markerChanged",fe,ie)})},Qt.prototype.attachLine=function(ie){if(!this.lines.length&&this.doc.cm){var ae=this.doc.cm.curOp;(!ae.maybeHiddenMarkers||kt(ae.maybeHiddenMarkers,this)==-1)&&(ae.maybeUnhiddenMarkers||(ae.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(ie)},Qt.prototype.detachLine=function(ie){if(this.lines.splice(kt(this.lines,ie),1),!this.lines.length&&this.doc.cm){var ae=this.doc.cm.curOp;(ae.maybeHiddenMarkers||(ae.maybeHiddenMarkers=[])).push(this)}},Rn(Qt);function $h(ie,ae,ge,fe,ye){if(fe&&fe.shared)return mf(ie,ae,ge,fe,ye);if(ie.cm&&!ie.cm.curOp)return Mn(ie.cm,$h)(ie,ae,ge,fe,ye);var Te=new Qt(ie,ye),We=Jt(ae,ge);if(fe&&Yt(fe,Te,!1),We>0||We==0&&Te.clearWhenEmpty!==!1)return Te;if(Te.replacedWith&&(Te.collapsed=!0,Te.widgetNode=gt("span",[Te.replacedWith],"CodeMirror-widget"),fe.handleMouseEvents||Te.widgetNode.setAttribute("cm-ignore-events","true"),fe.insertLeft&&(Te.widgetNode.insertLeft=!0)),Te.collapsed){if(fo(ie,ae.line,ae,ge,Te)||ae.line!=ge.line&&fo(ie,ge.line,ae,ge,Te))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ln()}Te.addToHistory&&ha(ie,{from:ae,to:ge,origin:"markText"},ie.sel,NaN);var st=ae.line,ot=ie.cm,Lt;if(ie.iter(st,ge.line+1,function(Rt){ot&&Te.collapsed&&!ot.options.lineWrapping&&jr(Rt)==ot.display.maxLine&&(Lt=!0),Te.collapsed&&st!=ae.line&&An(Rt,0),Po(Rt,new Zr(Te,st==ae.line?ae.ch:null,st==ge.line?ge.ch:null)),++st}),Te.collapsed&&ie.iter(ae.line,ge.line+1,function(Rt){Xn(ie,Rt)&&An(Rt,0)}),Te.clearOnEnter&&$t(Te,"beforeCursorEnter",function(){return Te.clear()}),Te.readOnly&&(Jr(),(ie.history.done.length||ie.history.undone.length)&&ie.clearHistory()),Te.collapsed&&(Te.id=++pf,Te.atomic=!0),ot){if(Lt&&(ot.curOp.updateMaxLine=!0),Te.collapsed)Ar(ot,ae.line,ge.line+1);else if(Te.className||Te.startStyle||Te.endStyle||Te.css||Te.attributes||Te.title)for(var dn=ae.line;dn<=ge.line;dn++)or(ot,dn,"text");Te.atomic&&au(ot.doc),Di(ot,"markerAdded",ot,Te)}return Te}var ph=function(ie,ae){this.markers=ie,this.primary=ae;for(var ge=0;ge<ie.length;++ge)ie[ge].parent=this};ph.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var ie=0;ie<this.markers.length;++ie)this.markers[ie].clear();Di(this,"clear")}},ph.prototype.find=function(ie,ae){return this.primary.find(ie,ae)},Rn(ph);function mf(ie,ae,ge,fe,ye){fe=Yt(fe),fe.shared=!1;var Te=[$h(ie,ae,ge,fe,ye)],We=Te[0],st=fe.widgetNode;return Ms(ie,function(ot){st&&(fe.widgetNode=st.cloneNode(!0)),Te.push($h(ot,li(ot,ae),li(ot,ge),fe,ye));for(var Lt=0;Lt<ot.linked.length;++Lt)if(ot.linked[Lt].isParent)return;We=ft(Te)}),new ph(Te,We)}function Nc(ie){return ie.findMarks(Wt(ie.first,0),ie.clipPos(Wt(ie.lastLine())),function(ae){return ae.parent})}function cc(ie,ae){for(var ge=0;ge<ae.length;ge++){var fe=ae[ge],ye=fe.find(),Te=ie.clipPos(ye.from),We=ie.clipPos(ye.to);if(Jt(Te,We)){var st=$h(ie,Te,We,fe.primary,fe.primary.type);fe.markers.push(st),st.parent=fe}}}function Id(ie){for(var ae=function(fe){var ye=ie[fe],Te=[ye.primary.doc];Ms(ye.primary.doc,function(ot){return Te.push(ot)});for(var We=0;We<ye.markers.length;We++){var st=ye.markers[We];kt(Te,st.doc)==-1&&(st.parent=null,ye.markers.splice(We--,1))}},ge=0;ge<ie.length;ge++)ae(ge)}var $g=0,Js=function(ie,ae,ge,fe,ye){if(!(this instanceof Js))return new Js(ie,ae,ge,fe,ye);ge==null&&(ge=0),fa.call(this,[new Ya([new yo("",null)])]),this.first=ge,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ge;var Te=Wt(ge,0);this.sel=Vo(Te),this.history=new qr(null),this.id=++$g,this.modeOption=ae,this.lineSep=fe,this.direction=ye=="rtl"?"rtl":"ltr",this.extend=!1,typeof ie=="string"&&(ie=this.splitLines(ie)),Va(this,{from:Te,to:Te,text:ie}),Za(this,Vo(Te),Bt)};Js.prototype=Ce(fa.prototype,{constructor:Js,iter:function(ie,ae,ge){ge?this.iterN(ie-this.first,ae-ie,ge):this.iterN(this.first,this.first+this.size,ie)},insert:function(ie,ae){for(var ge=0,fe=0;fe<ae.length;++fe)ge+=ae[fe].height;this.insertInner(ie-this.first,ae,ge)},remove:function(ie,ae){this.removeInner(ie-this.first,ae)},getValue:function(ie){var ae=xn(this,this.first,this.first+this.size);return ie===!1?ae:ae.join(ie||this.lineSeparator())},setValue:Fn(function(ie){var ae=Wt(this.first,0),ge=this.first+this.size-1;fs(this,{from:ae,to:Wt(ge,Vt(this,ge).text.length),text:this.splitLines(ie),origin:"setValue",full:!0},!0),this.cm&&zu(this.cm,0,0),Za(this,Vo(ae),Bt)}),replaceRange:function(ie,ae,ge,fe){ae=li(this,ae),ge=ge?li(this,ge):ae,gh(this,ie,ae,ge,fe)},getRange:function(ie,ae,ge){var fe=on(this,li(this,ie),li(this,ae));return ge===!1?fe:fe.join(ge||this.lineSeparator())},getLine:function(ie){var ae=this.getLineHandle(ie);return ae&&ae.text},getLineHandle:function(ie){if(On(this,ie))return Vt(this,ie)},getLineNumber:function(ie){return yt(ie)},getLineHandleVisualStart:function(ie){return typeof ie=="number"&&(ie=Vt(this,ie)),jr(ie)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(ie){return li(this,ie)},getCursor:function(ie){var ae=this.sel.primary(),ge;return ie==null||ie=="head"?ge=ae.head:ie=="anchor"?ge=ae.anchor:ie=="end"||ie=="to"||ie===!1?ge=ae.to():ge=ae.from(),ge},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Fn(function(ie,ae,ge){ms(this,li(this,typeof ie=="number"?Wt(ie,ae||0):ie),null,ge)}),setSelection:Fn(function(ie,ae,ge){ms(this,li(this,ie),li(this,ae||ie),ge)}),extendSelection:Fn(function(ie,ae,ge){Ea(this,li(this,ie),ae&&li(this,ae),ge)}),extendSelections:Fn(function(ie,ae){Ta(this,er(this,ie),ae)}),extendSelectionsBy:Fn(function(ie,ae){var ge=En(this.sel.ranges,ie);Ta(this,er(this,ge),ae)}),setSelections:Fn(function(ie,ae,ge){if(ie.length){for(var fe=[],ye=0;ye<ie.length;ye++)fe[ye]=new mr(li(this,ie[ye].anchor),li(this,ie[ye].head));ae==null&&(ae=Math.min(ie.length-1,this.sel.primIndex)),Za(this,Ho(this.cm,fe,ae),ge)}}),addSelection:Fn(function(ie,ae,ge){var fe=this.sel.ranges.slice(0);fe.push(new mr(li(this,ie),li(this,ae||ie))),Za(this,Ho(this.cm,fe,fe.length-1),ge)}),getSelection:function(ie){for(var ae=this.sel.ranges,ge,fe=0;fe<ae.length;fe++){var ye=on(this,ae[fe].from(),ae[fe].to());ge=ge?ge.concat(ye):ye}return ie===!1?ge:ge.join(ie||this.lineSeparator())},getSelections:function(ie){for(var ae=[],ge=this.sel.ranges,fe=0;fe<ge.length;fe++){var ye=on(this,ge[fe].from(),ge[fe].to());ie!==!1&&(ye=ye.join(ie||this.lineSeparator())),ae[fe]=ye}return ae},replaceSelection:function(ie,ae,ge){for(var fe=[],ye=0;ye<this.sel.ranges.length;ye++)fe[ye]=ie;this.replaceSelections(fe,ae,ge||"+input")},replaceSelections:Fn(function(ie,ae,ge){for(var fe=[],ye=this.sel,Te=0;Te<ye.ranges.length;Te++){var We=ye.ranges[Te];fe[Te]={from:We.from(),to:We.to(),text:this.splitLines(ie[Te]),origin:ge}}for(var st=ae&&ae!="end"&&$o(this,fe,ae),ot=fe.length-1;ot>=0;ot--)fs(this,fe[ot]);st?ra(this,st):this.cm&&ru(this.cm)}),undo:Fn(function(){lu(this,"undo")}),redo:Fn(function(){lu(this,"redo")}),undoSelection:Fn(function(){lu(this,"undo",!0)}),redoSelection:Fn(function(){lu(this,"redo",!0)}),setExtending:function(ie){this.extend=ie},getExtending:function(){return this.extend},historySize:function(){for(var ie=this.history,ae=0,ge=0,fe=0;fe<ie.done.length;fe++)ie.done[fe].ranges||++ae;for(var ye=0;ye<ie.undone.length;ye++)ie.undone[ye].ranges||++ge;return{undo:ae,redo:ge}},clearHistory:function(){var ie=this;this.history=new qr(this.history.maxGeneration),Ms(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:Rs(this.history.done),undone:Rs(this.history.undone)}},setHistory:function(ie){var ae=this.history=new qr(this.history.maxGeneration);ae.done=Rs(ie.done.slice(0),null,!0),ae.undone=Rs(ie.undone.slice(0),null,!0)},setGutterMarker:Fn(function(ie,ae,ge){return ks(this,ie,"gutter",function(fe){var ye=fe.gutterMarkers||(fe.gutterMarkers={});return ye[ae]=ge,!ge&&Se(ye)&&(fe.gutterMarkers=null),!0})}),clearGutter:Fn(function(ie){var ae=this;this.iter(function(ge){ge.gutterMarkers&&ge.gutterMarkers[ie]&&ks(ae,ge,"gutter",function(){return ge.gutterMarkers[ie]=null,Se(ge.gutterMarkers)&&(ge.gutterMarkers=null),!0})})}),lineInfo:function(ie){var ae;if(typeof ie=="number"){if(!On(this,ie)||(ae=ie,ie=Vt(this,ie),!ie))return null}else if(ae=yt(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:Fn(function(ie,ae,ge){return ks(this,ie,ae=="gutter"?"gutter":"class",function(fe){var ye=ae=="text"?"textClass":ae=="background"?"bgClass":ae=="gutter"?"gutterClass":"wrapClass";if(!fe[ye])fe[ye]=ge;else{if(Me(ge).test(fe[ye]))return!1;fe[ye]+=" "+ge}return!0})}),removeLineClass:Fn(function(ie,ae,ge){return ks(this,ie,ae=="gutter"?"gutter":"class",function(fe){var ye=ae=="text"?"textClass":ae=="background"?"bgClass":ae=="gutter"?"gutterClass":"wrapClass",Te=fe[ye];if(Te)if(ge==null)fe[ye]=null;else{var We=Te.match(Me(ge));if(!We)return!1;var st=We.index+We[0].length;fe[ye]=Te.slice(0,We.index)+(!We.index||st==Te.length?"":" ")+Te.slice(st)||null}else return!1;return!0})}),addLineWidget:Fn(function(ie,ae,ge){return Zu(this,ie,ae,ge)}),removeLineWidget:function(ie){ie.clear()},markText:function(ie,ae,ge){return $h(this,li(this,ie),li(this,ae),ge,ge&&ge.type||"range")},setBookmark:function(ie,ae){var ge={replacedWith:ae&&(ae.nodeType==null?ae.widget:ae),insertLeft:ae&&ae.insertLeft,clearWhenEmpty:!1,shared:ae&&ae.shared,handleMouseEvents:ae&&ae.handleMouseEvents};return ie=li(this,ie),$h(this,ie,ie,ge,"bookmark")},findMarksAt:function(ie){ie=li(this,ie);var ae=[],ge=Vt(this,ie.line).markedSpans;if(ge)for(var fe=0;fe<ge.length;++fe){var ye=ge[fe];(ye.from==null||ye.from<=ie.ch)&&(ye.to==null||ye.to>=ie.ch)&&ae.push(ye.marker.parent||ye.marker)}return ae},findMarks:function(ie,ae,ge){ie=li(this,ie),ae=li(this,ae);var fe=[],ye=ie.line;return this.iter(ie.line,ae.line+1,function(Te){var We=Te.markedSpans;if(We)for(var st=0;st<We.length;st++){var ot=We[st];!(ot.to!=null&&ye==ie.line&&ie.ch>=ot.to||ot.from==null&&ye!=ie.line||ot.from!=null&&ye==ae.line&&ot.from>=ae.ch)&&(!ge||ge(ot.marker))&&fe.push(ot.marker.parent||ot.marker)}++ye}),fe},getAllMarks:function(){var ie=[];return this.iter(function(ae){var ge=ae.markedSpans;if(ge)for(var fe=0;fe<ge.length;++fe)ge[fe].from!=null&&ie.push(ge[fe].marker)}),ie},posFromIndex:function(ie){var ae,ge=this.first,fe=this.lineSeparator().length;return this.iter(function(ye){var Te=ye.text.length+fe;if(Te>ie)return ae=ie,!0;ie-=Te,++ge}),li(this,Wt(ge,ae))},indexFromPos:function(ie){ie=li(this,ie);var ae=ie.ch;if(ie.line<this.first||ie.ch<0)return 0;var ge=this.lineSeparator().length;return this.iter(this.first,ie.line,function(fe){ae+=fe.text.length+ge}),ae},copy:function(ie){var ae=new Js(xn(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,ge=this.first+this.size;ie.from!=null&&ie.from>ae&&(ae=ie.from),ie.to!=null&&ie.to<ge&&(ge=ie.to);var fe=new Js(xn(this,ae,ge),ie.mode||this.modeOption,ae,this.lineSep,this.direction);return ie.sharedHist&&(fe.history=this.history),(this.linked||(this.linked=[])).push({doc:fe,sharedHist:ie.sharedHist}),fe.linked=[{doc:this,isParent:!0,sharedHist:ie.sharedHist}],cc(fe,Nc(this)),fe},unlinkDoc:function(ie){if(ie instanceof Ba&&(ie=ie.doc),this.linked)for(var ae=0;ae<this.linked.length;++ae){var ge=this.linked[ae];if(ge.doc==ie){this.linked.splice(ae,1),ie.unlinkDoc(this),Id(Nc(this));break}}if(ie.history==this.history){var fe=[ie.id];Ms(ie,function(ye){return fe.push(ye.id)},!0),ie.history=new qr(null),ie.history.done=Rs(this.history.done,fe),ie.history.undone=Rs(this.history.undone,fe)}},iterLinkedDocs:function(ie){Ms(this,ie)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(ie){return this.lineSep?ie.split(this.lineSep):ji(ie)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:Fn(function(ie){ie!="rtl"&&(ie="ltr"),ie!=this.direction&&(this.direction=ie,this.iter(function(ae){return ae.order=null}),this.cm&&Mo(this.cm))})}),Js.prototype.eachLine=Js.prototype.iter;var ad=0;function Rd(ie){var ae=this;if(Uf(ae),!(Yn(ae,ie)||vs(ae.display,ie))){ii(ie),Ze&&(ad=+new Date);var ge=$i(ae,ie,!0),fe=ie.dataTransfer.files;if(!(!ge||ae.isReadOnly()))if(fe&&fe.length&&window.FileReader&&window.File)for(var ye=fe.length,Te=Array(ye),We=0,st=function(){++We==ye&&Mn(ae,function(){ge=li(ae.doc,ge);var In={from:ge,to:ge,text:ae.doc.splitLines(Te.filter(function(Ci){return Ci!=null}).join(ae.doc.lineSeparator())),origin:"paste"};fs(ae.doc,In),ra(ae.doc,Vo(li(ae.doc,ge),li(ae.doc,wa(In))))})()},ot=function(In,Ci){if(ae.options.allowDropFileTypes&&kt(ae.options.allowDropFileTypes,In.type)==-1){st();return}var Ti=new FileReader;Ti.onerror=function(){return st()},Ti.onload=function(){var Zi=Ti.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Zi)){st();return}Te[Ci]=Zi,st()},Ti.readAsText(In)},Lt=0;Lt<fe.length;Lt++)ot(fe[Lt],Lt);else{if(ae.state.draggingText&&ae.doc.sel.contains(ge)>-1){ae.state.draggingText(ie),setTimeout(function(){return ae.display.input.focus()},20);return}try{var dn=ie.dataTransfer.getData("Text");if(dn){var Rt;if(ae.state.draggingText&&!ae.state.draggingText.copy&&(Rt=ae.listSelections()),zs(ae.doc,Vo(ge,ge)),Rt)for(var zn=0;zn<Rt.length;++zn)gh(ae.doc,"",Rt[zn].anchor,Rt[zn].head,"drag");ae.replaceSelection(dn,"around","paste"),ae.display.input.focus()}}catch(In){}}}}function sd(ie,ae){if(Ze&&(!ie.state.draggingText||+new Date-ad<100)){Ri(ae);return}if(!(Yn(ie,ae)||vs(ie.display,ae))&&(ae.dataTransfer.setData("Text",ie.getSelection()),ae.dataTransfer.effectAllowed="copyMove",ae.dataTransfer.setDragImage&&!Et)){var ge=$e("img",null,null,"position: fixed; left: 0; top: 0;");ge.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",He&&(ge.width=ge.height=1,ie.display.wrapper.appendChild(ge),ge._top=ge.offsetTop),ae.dataTransfer.setDragImage(ge,0,0),He&&ge.parentNode.removeChild(ge)}}function vf(ie,ae){var ge=$i(ie,ae);if(ge){var fe=document.createDocumentFragment();Ii(ie,ge,fe),ie.display.dragCursor||(ie.display.dragCursor=$e("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),ie.display.lineSpace.insertBefore(ie.display.dragCursor,ie.display.cursorDiv)),et(ie.display.dragCursor,fe)}}function Uf(ie){ie.display.dragCursor&&(ie.display.lineSpace.removeChild(ie.display.dragCursor),ie.display.dragCursor=null)}function yf(ie){if(document.getElementsByClassName){for(var ae=document.getElementsByClassName("CodeMirror"),ge=[],fe=0;fe<ae.length;fe++){var ye=ae[fe].CodeMirror;ye&&ge.push(ye)}ge.length&&ge[0].operation(function(){for(var Te=0;Te<ge.length;Te++)ie(ge[Te])})}}var jd=!1;function uu(){jd||(kc(),jd=!0)}function kc(){var ie;$t(window,"resize",function(){ie==null&&(ie=setTimeout(function(){ie=null,yf(Sf)},100))}),$t(window,"blur",function(){return yf(Bs)})}function Sf(ie){var ae=ie.display;ae.cachedCharWidth=ae.cachedTextHeight=ae.cachedPaddingH=null,ae.scrollbarsClipped=!1,ie.setSize()}for(var nh={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"},Kh=0;Kh<10;Kh++)nh[Kh+48]=nh[Kh+96]=String(Kh);for(var Ac=65;Ac<=90;Ac++)nh[Ac]=String.fromCharCode(Ac);for(var dc=1;dc<=12;dc++)nh[dc+111]=nh[dc+63235]="F"+dc;var _l={};_l.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"},_l.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"},_l.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"},_l.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"]},_l.default=he?_l.macDefault:_l.pcDefault;function zd(ie){var ae=ie.split(/-(?!$)/);ie=ae[ae.length-1];for(var ge,fe,ye,Te,We=0;We<ae.length-1;We++){var st=ae[We];if(/^(cmd|meta|m)$/i.test(st))Te=!0;else if(/^a(lt)?$/i.test(st))ge=!0;else if(/^(c|ctrl|control)$/i.test(st))fe=!0;else if(/^s(hift)?$/i.test(st))ye=!0;else throw new Error("Unrecognized modifier name: "+st)}return ge&&(ie="Alt-"+ie),fe&&(ie="Ctrl-"+ie),Te&&(ie="Cmd-"+ie),ye&&(ie="Shift-"+ie),ie}function _d(ie){var ae={};for(var ge in ie)if(ie.hasOwnProperty(ge)){var fe=ie[ge];if(/^(name|fallthrough|(de|at)tach)$/.test(ge))continue;if(fe=="..."){delete ie[ge];continue}for(var ye=En(ge.split(" "),zd),Te=0;Te<ye.length;Te++){var We=void 0,st=void 0;Te==ye.length-1?(st=ye.join(" "),We=fe):(st=ye.slice(0,Te+1).join(" "),We="...");var ot=ae[st];if(!ot)ae[st]=We;else if(ot!=We)throw new Error("Inconsistent bindings for "+st)}delete ie[ge]}for(var Lt in ae)ie[Lt]=ae[Lt];return ie}function hu(ie,ae,ge,fe){ae=Vh(ae);var ye=ae.call?ae.call(ie,fe):ae[ie];if(ye===!1)return"nothing";if(ye==="...")return"multi";if(ye!=null&&ge(ye))return"handled";if(ae.fallthrough){if(Object.prototype.toString.call(ae.fallthrough)!="[object Array]")return hu(ie,ae.fallthrough,ge,fe);for(var Te=0;Te<ae.fallthrough.length;Te++){var We=hu(ie,ae.fallthrough[Te],ge,fe);if(We)return We}}}function Tc(ie){var ae=typeof ie=="string"?ie:nh[ie.keyCode];return ae=="Ctrl"||ae=="Alt"||ae=="Shift"||ae=="Mod"}function Zd(ie,ae,ge){var fe=ie;return ae.altKey&&fe!="Alt"&&(ie="Alt-"+ie),(we?ae.metaKey:ae.ctrlKey)&&fe!="Ctrl"&&(ie="Ctrl-"+ie),(we?ae.ctrlKey:ae.metaKey)&&fe!="Mod"&&(ie="Cmd-"+ie),!ge&&ae.shiftKey&&fe!="Shift"&&(ie="Shift-"+ie),ie}function Hd(ie,ae){if(He&&ie.keyCode==34&&ie.char)return!1;var ge=nh[ie.keyCode];return ge==null||ie.altGraphKey?!1:(ie.keyCode==3&&ie.code&&(ge=ie.code),Zd(ge,ie,ae))}function Vh(ie){return typeof ie=="string"?_l[ie]:ie}function Ll(ie,ae){for(var ge=ie.doc.sel.ranges,fe=[],ye=0;ye<ge.length;ye++){for(var Te=ae(ge[ye]);fe.length&&Jt(Te.from,ft(fe).to)<=0;){var We=fe.pop();if(Jt(We.from,Te.from)<0){Te.from=We.from;break}}fe.push(Te)}Ht(ie,function(){for(var st=fe.length-1;st>=0;st--)gh(ie.doc,"",fe[st].from,fe[st].to,"+delete");ru(ie)})}function Wd(ie,ae,ge){var fe=qe(ie.text,ae+ge,ge);return fe<0||fe>ie.text.length?null:fe}function As(ie,ae,ge){var fe=Wd(ie,ae.ch,ge);return fe==null?null:new Wt(ae.line,fe,ge<0?"after":"before")}function ba(ie,ae,ge,fe,ye){if(ie){ae.doc.direction=="rtl"&&(ye=-ye);var Te=un(ge,ae.doc.direction);if(Te){var We=ye<0?ft(Te):Te[0],st=ye<0==(We.level==1),ot=st?"after":"before",Lt;if(We.level>0||ae.doc.direction=="rtl"){var dn=Qu(ae,ge);Lt=ye<0?ge.text.length-1:0;var Rt=Rl(ae,dn,Lt).top;Lt=Ue(function(zn){return Rl(ae,dn,zn).top==Rt},ye<0==(We.level==1)?We.from:We.to-1,Lt),ot=="before"&&(Lt=Wd(ge,Lt,1))}else Lt=ye<0?We.to:We.from;return new Wt(fe,Lt,ot)}}return new Wt(fe,ye<0?ge.text.length:0,ye<0?"before":"after")}function ns(ie,ae,ge,fe){var ye=un(ae,ie.doc.direction);if(!ye)return As(ae,ge,fe);ge.ch>=ae.text.length?(ge.ch=ae.text.length,ge.sticky="before"):ge.ch<=0&&(ge.ch=0,ge.sticky="after");var Te=lt(ye,ge.ch,ge.sticky),We=ye[Te];if(ie.doc.direction=="ltr"&&We.level%2==0&&(fe>0?We.to>ge.ch:We.from<ge.ch))return As(ae,ge,fe);var st=function(vr,Kr){return Wd(ae,vr instanceof Wt?vr.ch:vr,Kr)},ot,Lt=function(vr){return ie.options.lineWrapping?(ot=ot||Qu(ie,ae),mn(ie,ae,ot,vr)):{begin:0,end:ae.text.length}},dn=Lt(ge.sticky=="before"?st(ge,-1):ge.ch);if(ie.doc.direction=="rtl"||We.level==1){var Rt=We.level==1==fe<0,zn=st(ge,Rt?1:-1);if(zn!=null&&(Rt?zn<=We.to&&zn<=dn.end:zn>=We.from&&zn>=dn.begin)){var In=Rt?"before":"after";return new Wt(ge.line,zn,In)}}var Ci=function(vr,Kr,Br){for(var io=function(Ss,ol){return ol?new Wt(ge.line,st(Ss,1),"before"):new Wt(ge.line,Ss,"after")};vr>=0&&vr<ye.length;vr+=Kr){var Wo=ye[vr],Lr=Kr>0==(Wo.level!=1),oa=Lr?Br.begin:st(Br.end,-1);if(Wo.from<=oa&&oa<Wo.to||(oa=Lr?Wo.from:st(Wo.to,-1),Br.begin<=oa&&oa<Br.end))return io(oa,Lr)}},Ti=Ci(Te+fe,fe,dn);if(Ti)return Ti;var Zi=fe>0?dn.end:st(dn.begin,-1);return Zi!=null&&!(fe>0&&Zi==ae.text.length)&&(Ti=Ci(fe>0?0:ye.length-1,fe,Lt(Zi)),Ti)?Ti:null}var il={selectAll:La,singleSelection:function(ie){return ie.setSelection(ie.getCursor("anchor"),ie.getCursor("head"),Bt)},killLine:function(ie){return Ll(ie,function(ae){if(ae.empty()){var ge=Vt(ie.doc,ae.head.line).text.length;return ae.head.ch==ge&&ae.head.line<ie.lastLine()?{from:ae.head,to:Wt(ae.head.line+1,0)}:{from:ae.head,to:Wt(ae.head.line,ge)}}else return{from:ae.from(),to:ae.to()}})},deleteLine:function(ie){return Ll(ie,function(ae){return{from:Wt(ae.from().line,0),to:li(ie.doc,Wt(ae.to().line+1,0))}})},delLineLeft:function(ie){return Ll(ie,function(ae){return{from:Wt(ae.from().line,0),to:ae.from()}})},delWrappedLineLeft:function(ie){return Ll(ie,function(ae){var ge=ie.charCoords(ae.head,"div").top+5,fe=ie.coordsChar({left:0,top:ge},"div");return{from:fe,to:ae.from()}})},delWrappedLineRight:function(ie){return Ll(ie,function(ae){var ge=ie.charCoords(ae.head,"div").top+5,fe=ie.coordsChar({left:ie.display.lineDiv.offsetWidth+100,top:ge},"div");return{from:ae.from(),to:fe}})},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(Wt(ie.firstLine(),0))},goDocEnd:function(ie){return ie.extendSelection(Wt(ie.lastLine()))},goLineStart:function(ie){return ie.extendSelectionsBy(function(ae){return bu(ie,ae.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(ie){return ie.extendSelectionsBy(function(ae){return Gd(ie,ae.head)},{origin:"+move",bias:1})},goLineEnd:function(ie){return ie.extendSelectionsBy(function(ae){return Mu(ie,ae.head.line)},{origin:"+move",bias:-1})},goLineRight:function(ie){return ie.extendSelectionsBy(function(ae){var ge=ie.cursorCoords(ae.head,"div").top+5;return ie.coordsChar({left:ie.display.lineDiv.offsetWidth+100,top:ge},"div")},en)},goLineLeft:function(ie){return ie.extendSelectionsBy(function(ae){var ge=ie.cursorCoords(ae.head,"div").top+5;return ie.coordsChar({left:0,top:ge},"div")},en)},goLineLeftSmart:function(ie){return ie.extendSelectionsBy(function(ae){var ge=ie.cursorCoords(ae.head,"div").top+5,fe=ie.coordsChar({left:0,top:ge},"div");return fe.ch<ie.getLine(fe.line).search(/\S/)?Gd(ie,ae.head):fe},en)},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=[],ge=ie.listSelections(),fe=ie.options.tabSize,ye=0;ye<ge.length;ye++){var Te=ge[ye].from(),We=ut(ie.getLine(Te.line),Te.ch,fe);ae.push(Cn(fe-We%fe))}ie.replaceSelections(ae)},defaultTab:function(ie){ie.somethingSelected()?ie.indentSelection("add"):ie.execCommand("insertTab")},transposeChars:function(ie){return Ht(ie,function(){for(var ae=ie.listSelections(),ge=[],fe=0;fe<ae.length;fe++)if(ae[fe].empty()){var ye=ae[fe].head,Te=Vt(ie.doc,ye.line).text;if(Te){if(ye.ch==Te.length&&(ye=new Wt(ye.line,ye.ch-1)),ye.ch>0)ye=new Wt(ye.line,ye.ch+1),ie.replaceRange(Te.charAt(ye.ch-1)+Te.charAt(ye.ch-2),Wt(ye.line,ye.ch-2),ye,"+transpose");else if(ye.line>ie.doc.first){var We=Vt(ie.doc,ye.line-1).text;We&&(ye=new Wt(ye.line,1),ie.replaceRange(Te.charAt(0)+ie.doc.lineSeparator()+We.charAt(We.length-1),Wt(ye.line-1,We.length-1),ye,"+transpose"))}}ge.push(new mr(ye,ye))}ie.setSelections(ge)})},newlineAndIndent:function(ie){return Ht(ie,function(){for(var ae=ie.listSelections(),ge=ae.length-1;ge>=0;ge--)ie.replaceRange(ie.doc.lineSeparator(),ae[ge].anchor,ae[ge].head,"+input");ae=ie.listSelections();for(var fe=0;fe<ae.length;fe++)ie.indentLine(ae[fe].from().line,null,!0);ru(ie)})},openLine:function(ie){return ie.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(ie){return ie.toggleOverwrite()}};function bu(ie,ae){var ge=Vt(ie.doc,ae),fe=jr(ge);return fe!=ge&&(ae=yt(fe)),ba(!0,ie,fe,ae,1)}function Mu(ie,ae){var ge=Vt(ie.doc,ae),fe=To(ge);return fe!=ge&&(ae=yt(fe)),ba(!0,ie,ge,ae,-1)}function Gd(ie,ae){var ge=bu(ie,ae.line),fe=Vt(ie.doc,ge.line),ye=un(fe,ie.doc.direction);if(!ye||ye[0].level==0){var Te=Math.max(ge.ch,fe.text.search(/\S/)),We=ae.line==ge.line&&ae.ch<=Te&&ae.ch;return Wt(ge.line,We?0:Te,ge.sticky)}return ge}function Uh(ie,ae,ge){if(typeof ae=="string"&&(ae=il[ae],!ae))return!1;ie.display.input.ensurePolled();var fe=ie.display.shift,ye=!1;try{ie.isReadOnly()&&(ie.state.suppressEdits=!0),ge&&(ie.display.shift=!1),ye=ae(ie)!=sn}finally{ie.display.shift=fe,ie.state.suppressEdits=!1}return ye}function ld(ie,ae,ge){for(var fe=0;fe<ie.state.keyMaps.length;fe++){var ye=hu(ae,ie.state.keyMaps[fe],ge,ie);if(ye)return ye}return ie.options.extraKeys&&hu(ae,ie.options.extraKeys,ge,ie)||hu(ae,ie.options.keyMap,ge,ie)}var Hu=new Ge;function Ah(ie,ae,ge,fe){var ye=ie.state.keySeq;if(ye){if(Tc(ae))return"handled";if(/\'$/.test(ae)?ie.state.keySeq=null:Hu.set(50,function(){ie.state.keySeq==ye&&(ie.state.keySeq=null,ie.display.input.reset())}),Yf(ie,ye+" "+ae,ge,fe))return!0}return Yf(ie,ae,ge,fe)}function Yf(ie,ae,ge,fe){var ye=ld(ie,ae,fe);return ye=="multi"&&(ie.state.keySeq=ae),ye=="handled"&&Di(ie,"keyHandled",ie,ae,ge),(ye=="handled"||ye=="multi")&&(ii(ge),ko(ie)),!!ye}function Xf(ie,ae){var ge=Hd(ae,!0);return ge?ae.shiftKey&&!ie.state.keySeq?Ah(ie,"Shift-"+ge,ae,function(fe){return Uh(ie,fe,!0)})||Ah(ie,ge,ae,function(fe){if(typeof fe=="string"?/^go[A-Z]/.test(fe):fe.motion)return Uh(ie,fe)}):Ah(ie,ge,ae,function(fe){return Uh(ie,fe)}):!1}function Jf(ie,ae,ge){return Ah(ie,"'"+ge+"'",ae,function(fe){return Uh(ie,fe,!0)})}var ud=null;function Kg(ie){var ae=this;if(!(ie.target&&ie.target!=ae.display.input.getField())&&(ae.curOp.focus=Qe(),!Yn(ae,ie))){Ze&&Ke<11&&ie.keyCode==27&&(ie.returnValue=!1);var ge=ie.keyCode;ae.display.shift=ge==16||ie.shiftKey;var fe=Xf(ae,ie);He&&(ud=fe?ge:null,!fe&&ge==88&&!si&&(he?ie.metaKey:ie.ctrlKey)&&ae.replaceSelection("",null,"cut")),ce&&!he&&!fe&&ge==46&&ie.shiftKey&&!ie.ctrlKey&&document.execCommand&&document.execCommand("cut"),ge==18&&!/\bCodeMirror-crosshair\b/.test(ae.display.lineDiv.className)&&Vg(ae)}}function Vg(ie){var ae=ie.display.lineDiv;bt(ae,"CodeMirror-crosshair");function ge(fe){(fe.keyCode==18||!fe.altKey)&&(Ie(ae,"CodeMirror-crosshair"),bn(document,"keyup",ge),bn(document,"mouseover",ge))}$t(document,"keyup",ge),$t(document,"mouseover",ge)}function Ug(ie){ie.keyCode==16&&(this.doc.sel.shift=!1),Yn(this,ie)}function Th(ie){var ae=this;if(!(ie.target&&ie.target!=ae.display.input.getField())&&!(vs(ae.display,ie)||Yn(ae,ie)||ie.ctrlKey&&!ie.altKey||he&&ie.metaKey)){var ge=ie.keyCode,fe=ie.charCode;if(He&&ge==ud){ud=null,ii(ie);return}if(!(He&&(!ie.which||ie.which<10)&&Xf(ae,ie))){var ye=String.fromCharCode(fe==null?ge:fe);ye!="\b"&&(Jf(ae,ie,ye)||ae.display.input.onKeyPress(ie))}}}var rm=400,Yg=function(ie,ae,ge){this.time=ie,this.pos=ae,this.button=ge};Yg.prototype.compare=function(ie,ae,ge){return this.time+rm>ie&&Jt(ae,this.pos)==0&&ge==this.button};var $d,hd;function Xg(ie,ae){var ge=+new Date;return hd&&hd.compare(ge,ie,ae)?($d=hd=null,"triple"):$d&&$d.compare(ge,ie,ae)?(hd=new Yg(ge,ie,ae),$d=null,"double"):($d=new Yg(ge,ie,ae),hd=null,"single")}function Dh(ie){var ae=this,ge=ae.display;if(!(Yn(ae,ie)||ge.activeTouch&&ge.input.supportsTouch())){if(ge.input.ensurePolled(),ge.shift=ie.shiftKey,vs(ge,ie)){Be||(ge.scroller.draggable=!1,setTimeout(function(){return ge.scroller.draggable=!0},100));return}if(!eg(ae,ie)){var fe=$i(ae,ie),ye=Un(ie),Te=fe?Xg(fe,ye):"single";window.focus(),ye==1&&ae.state.selectingText&&ae.state.selectingText(ie),!(fe&&Jg(ae,ye,fe,Te,ie))&&(ye==1?fe?om(ae,fe,Te,ie):Ji(ie)==ge.scroller&&ii(ie):ye==2?(fe&&Ea(ae.doc,fe),setTimeout(function(){return ge.input.focus()},20)):ye==3&&(be?ae.display.input.onContextMenu(ie):br(ae)))}}}function Jg(ie,ae,ge,fe,ye){var Te="Click";return fe=="double"?Te="Double"+Te:fe=="triple"&&(Te="Triple"+Te),Te=(ae==1?"Left":ae==2?"Middle":"Right")+Te,Ah(ie,Zd(Te,ye),ye,function(We){if(typeof We=="string"&&(We=il[We]),!We)return!1;var st=!1;try{ie.isReadOnly()&&(ie.state.suppressEdits=!0),st=We(ie,ge)!=sn}finally{ie.state.suppressEdits=!1}return st})}function Qf(ie,ae,ge){var fe=ie.getOption("configureMouse"),ye=fe?fe(ie,ae,ge):{};if(ye.unit==null){var Te=se?ge.shiftKey&&ge.metaKey:ge.altKey;ye.unit=Te?"rectangle":ae=="single"?"char":ae=="double"?"word":"line"}return(ye.extend==null||ie.doc.extend)&&(ye.extend=ie.doc.extend||ge.shiftKey),ye.addNew==null&&(ye.addNew=he?ge.metaKey:ge.ctrlKey),ye.moveOnDrag==null&&(ye.moveOnDrag=!(he?ge.altKey:ge.ctrlKey)),ye}function om(ie,ae,ge,fe){Ze?setTimeout(Zt(Yo,ie),0):ie.curOp.focus=Qe();var ye=Qf(ie,ge,fe),Te=ie.doc.sel,We;ie.options.dragDrop&&$n&&!ie.isReadOnly()&&ge=="single"&&(We=Te.contains(ae))>-1&&(Jt((We=Te.ranges[We]).from(),ae)<0||ae.xRel>0)&&(Jt(We.to(),ae)>0||ae.xRel<0)?Qg(ie,fe,ae,ye):tv(ie,fe,ae,ye)}function Qg(ie,ae,ge,fe){var ye=ie.display,Te=!1,We=Mn(ie,function(Lt){Be&&(ye.scroller.draggable=!1),ie.state.draggingText=!1,bn(ye.wrapper.ownerDocument,"mouseup",We),bn(ye.wrapper.ownerDocument,"mousemove",st),bn(ye.scroller,"dragstart",ot),bn(ye.scroller,"drop",We),Te||(ii(Lt),fe.addNew||Ea(ie.doc,ge,null,null,fe.extend),Be&&!Et||Ze&&Ke==9?setTimeout(function(){ye.wrapper.ownerDocument.body.focus({preventScroll:!0}),ye.input.focus()},20):ye.input.focus())}),st=function(Lt){Te=Te||Math.abs(ae.clientX-Lt.clientX)+Math.abs(ae.clientY-Lt.clientY)>=10},ot=function(){return Te=!0};Be&&(ye.scroller.draggable=!0),ie.state.draggingText=We,We.copy=!fe.moveOnDrag,ye.scroller.dragDrop&&ye.scroller.dragDrop(),$t(ye.wrapper.ownerDocument,"mouseup",We),$t(ye.wrapper.ownerDocument,"mousemove",st),$t(ye.scroller,"dragstart",ot),$t(ye.scroller,"drop",We),br(ie),setTimeout(function(){return ye.input.focus()},20)}function qg(ie,ae,ge){if(ge=="char")return new mr(ae,ae);if(ge=="word")return ie.findWordAt(ae);if(ge=="line")return new mr(Wt(ae.line,0),li(ie.doc,Wt(ae.line+1,0)));var fe=ge(ie,ae);return new mr(fe.from,fe.to)}function tv(ie,ae,ge,fe){var ye=ie.display,Te=ie.doc;ii(ae);var We,st,ot=Te.sel,Lt=ot.ranges;if(fe.addNew&&!fe.extend?(st=Te.sel.contains(ge),st>-1?We=Lt[st]:We=new mr(ge,ge)):(We=Te.sel.primary(),st=Te.sel.primIndex),fe.unit=="rectangle")fe.addNew||(We=new mr(ge,ge)),ge=$i(ie,ae,!0,!0),st=-1;else{var dn=qg(ie,ge,fe.unit);fe.extend?We=fh(We,dn.anchor,dn.head,fe.extend):We=dn}fe.addNew?st==-1?(st=Lt.length,Za(Te,Ho(ie,Lt.concat([We]),st),{scroll:!1,origin:"*mouse"})):Lt.length>1&&Lt[st].empty()&&fe.unit=="char"&&!fe.extend?(Za(Te,Ho(ie,Lt.slice(0,st).concat(Lt.slice(st+1)),0),{scroll:!1,origin:"*mouse"}),ot=Te.sel):ja(Te,st,We,Gt):(st=0,Za(Te,new Eo([We],0),Gt),ot=Te.sel);var Rt=ge;function zn(Br){if(Jt(Rt,Br)!=0)if(Rt=Br,fe.unit=="rectangle"){for(var io=[],Wo=ie.options.tabSize,Lr=ut(Vt(Te,ge.line).text,ge.ch,Wo),oa=ut(Vt(Te,Br.line).text,Br.ch,Wo),Ss=Math.min(Lr,oa),ol=Math.max(Lr,oa),Ls=Math.min(ge.line,Br.line),du=Math.min(ie.lastLine(),Math.max(ge.line,Br.line));Ls<=du;Ls++){var Zl=Vt(Te,Ls).text,qs=Bn(Zl,Ss,Wo);Ss==ol?io.push(new mr(Wt(Ls,qs),Wt(Ls,qs))):Zl.length>qs&&io.push(new mr(Wt(Ls,qs),Wt(Ls,Bn(Zl,ol,Wo))))}io.length||io.push(new mr(ge,ge)),Za(Te,Ho(ie,ot.ranges.slice(0,st).concat(io),st),{origin:"*mouse",scroll:!1}),ie.scrollIntoView(Br)}else{var Lu=We,Fl=qg(ie,Br,fe.unit),el=Lu.anchor,Da;Jt(Fl.anchor,el)>0?(Da=Fl.head,el=qn(Lu.from(),Fl.anchor)):(Da=Fl.anchor,el=ui(Lu.to(),Fl.head));var Ts=ot.ranges.slice(0);Ts[st]=am(ie,new mr(li(Te,el),Da)),Za(Te,Ho(ie,Ts,st),Gt)}}var In=ye.wrapper.getBoundingClientRect(),Ci=0;function Ti(Br){var io=++Ci,Wo=$i(ie,Br,!0,fe.unit=="rectangle");if(Wo)if(Jt(Wo,Rt)!=0){ie.curOp.focus=Qe(),zn(Wo);var Lr=Vr(ye,Te);(Wo.line>=Lr.to||Wo.line<Lr.from)&&setTimeout(Mn(ie,function(){Ci==io&&Ti(Br)}),150)}else{var oa=Br.clientY<In.top?-20:Br.clientY>In.bottom?20:0;oa&&setTimeout(Mn(ie,function(){Ci==io&&(ye.scroller.scrollTop+=oa,Ti(Br))}),50)}}function Zi(Br){ie.state.selectingText=!1,Ci=1/0,Br&&(ii(Br),ye.input.focus()),bn(ye.wrapper.ownerDocument,"mousemove",vr),bn(ye.wrapper.ownerDocument,"mouseup",Kr),Te.history.lastSelOrigin=null}var vr=Mn(ie,function(Br){Br.buttons===0||!Un(Br)?Zi(Br):Ti(Br)}),Kr=Mn(ie,Zi);ie.state.selectingText=Kr,$t(ye.wrapper.ownerDocument,"mousemove",vr),$t(ye.wrapper.ownerDocument,"mouseup",Kr)}function am(ie,ae){var ge=ae.anchor,fe=ae.head,ye=Vt(ie.doc,ge.line);if(Jt(ge,fe)==0&&ge.sticky==fe.sticky)return ae;var Te=un(ye);if(!Te)return ae;var We=lt(Te,ge.ch,ge.sticky),st=Te[We];if(st.from!=ge.ch&&st.to!=ge.ch)return ae;var ot=We+(st.from==ge.ch==(st.level!=1)?0:1);if(ot==0||ot==Te.length)return ae;var Lt;if(fe.line!=ge.line)Lt=(fe.line-ge.line)*(ie.doc.direction=="ltr"?1:-1)>0;else{var dn=lt(Te,fe.ch,fe.sticky),Rt=dn-We||(fe.ch-ge.ch)*(st.level==1?-1:1);dn==ot-1||dn==ot?Lt=Rt<0:Lt=Rt>0}var zn=Te[ot+(Lt?-1:0)],In=Lt==(zn.level==1),Ci=In?zn.from:zn.to,Ti=In?"after":"before";return ge.ch==Ci&&ge.sticky==Ti?ae:new mr(new Wt(ge.line,Ci,Ti),fe)}function qf(ie,ae,ge,fe){var ye,Te;if(ae.touches)ye=ae.touches[0].clientX,Te=ae.touches[0].clientY;else try{ye=ae.clientX,Te=ae.clientY}catch(zn){return!1}if(ye>=Math.floor(ie.display.gutters.getBoundingClientRect().right))return!1;fe&&ii(ae);var We=ie.display,st=We.lineDiv.getBoundingClientRect();if(Te>st.bottom||!Wn(ie,ge))return gi(ae);Te-=st.top-We.viewOffset;for(var ot=0;ot<ie.display.gutterSpecs.length;++ot){var Lt=We.gutters.childNodes[ot];if(Lt&&Lt.getBoundingClientRect().right>=ye){var dn=cn(ie.doc,Te),Rt=ie.display.gutterSpecs[ot];return pn(ie,ge,ie,dn,Rt.className,ae),gi(ae)}}}function eg(ie,ae){return qf(ie,ae,"gutterClick",!0)}function tg(ie,ae){vs(ie.display,ae)||sm(ie,ae)||Yn(ie,ae,"contextmenu")||be||ie.display.input.onContextMenu(ae)}function sm(ie,ae){return Wn(ie,"gutterContextMenu")?qf(ie,ae,"gutterContextMenu",!1):!1}function ng(ie){ie.display.wrapper.className=ie.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+ie.options.theme.replace(/(^|\s)\s*/g," cm-s-"),es(ie)}var Dc={toString:function(){return"CodeMirror.Init"}},ep={},xf={};function lm(ie){var ae=ie.optionHandlers;function ge(fe,ye,Te,We){ie.defaults[fe]=ye,Te&&(ae[fe]=We?function(st,ot,Lt){Lt!=Dc&&Te(st,ot,Lt)}:Te)}ie.defineOption=ge,ie.Init=Dc,ge("value","",function(fe,ye){return fe.setValue(ye)},!0),ge("mode",null,function(fe,ye){fe.doc.modeOption=ye,oo(fe)},!0),ge("indentUnit",2,oo,!0),ge("indentWithTabs",!1),ge("smartIndent",!0),ge("tabSize",4,function(fe){pa(fe),es(fe),Ar(fe)},!0),ge("lineSeparator",null,function(fe,ye){if(fe.doc.lineSep=ye,!!ye){var Te=[],We=fe.doc.first;fe.doc.iter(function(ot){for(var Lt=0;;){var dn=ot.text.indexOf(ye,Lt);if(dn==-1)break;Lt=dn+ye.length,Te.push(Wt(We,dn))}We++});for(var st=Te.length-1;st>=0;st--)gh(fe.doc,ye,Te[st],Wt(Te[st].line,Te[st].ch+ye.length))}}),ge("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(fe,ye,Te){fe.state.specialChars=new RegExp(ye.source+(ye.test(" ")?"":"| "),"g"),Te!=Dc&&fe.refresh()}),ge("specialCharPlaceholder",Oa,function(fe){return fe.refresh()},!0),ge("electricChars",!0),ge("inputStyle",ee?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),ge("spellcheck",!1,function(fe,ye){return fe.getInputField().spellcheck=ye},!0),ge("autocorrect",!1,function(fe,ye){return fe.getInputField().autocorrect=ye},!0),ge("autocapitalize",!1,function(fe,ye){return fe.getInputField().autocapitalize=ye},!0),ge("rtlMoveVisually",!de),ge("wholeLineUpdateBefore",!0),ge("theme","default",function(fe){ng(fe),Pr(fe)},!0),ge("keyMap","default",function(fe,ye,Te){var We=Vh(ye),st=Te!=Dc&&Vh(Te);st&&st.detach&&st.detach(fe,We),We.attach&&We.attach(fe,st||null)}),ge("extraKeys",null),ge("configureMouse",null),ge("lineWrapping",!1,um,!0),ge("gutters",[],function(fe,ye){fe.display.gutterSpecs=Ur(ye,fe.options.lineNumbers),Pr(fe)},!0),ge("fixedGutter",!0,function(fe,ye){fe.display.gutters.style.left=ye?Go(fe.display)+"px":"0",fe.refresh()},!0),ge("coverGutterNextToScrollbar",!1,function(fe){return dh(fe)},!0),ge("scrollbarStyle","native",function(fe){Bc(fe),dh(fe),fe.display.scrollbars.setScrollTop(fe.doc.scrollTop),fe.display.scrollbars.setScrollLeft(fe.doc.scrollLeft)},!0),ge("lineNumbers",!1,function(fe,ye){fe.display.gutterSpecs=Ur(fe.options.gutters,ye),Pr(fe)},!0),ge("firstLineNumber",1,Pr,!0),ge("lineNumberFormatter",function(fe){return fe},Pr,!0),ge("showCursorWhenSelecting",!1,cr,!0),ge("resetSelectionOnContextMenu",!0),ge("lineWiseCopyCut",!0),ge("pasteLinesPerSelection",!0),ge("selectionsMayTouch",!1),ge("readOnly",!1,function(fe,ye){ye=="nocursor"&&(Bs(fe),fe.display.input.blur()),fe.display.input.readOnlyChanged(ye)}),ge("screenReaderLabel",null,function(fe,ye){ye=ye===""?null:ye,fe.display.input.screenReaderLabelChanged(ye)}),ge("disableInput",!1,function(fe,ye){ye||fe.display.input.reset()},!0),ge("dragDrop",!0,ig),ge("allowDropFileTypes",null),ge("cursorBlinkRate",530),ge("cursorScrollMargin",0),ge("cursorHeight",1,cr,!0),ge("singleCursorHeightPerLine",!0,cr,!0),ge("workTime",100),ge("workDelay",100),ge("flattenSpans",!0,pa,!0),ge("addModeClass",!1,pa,!0),ge("pollInterval",100),ge("undoDepth",200,function(fe,ye){return fe.doc.history.undoDepth=ye}),ge("historyEventDelay",1250),ge("viewportMargin",10,function(fe){return fe.refresh()},!0),ge("maxHighlightLength",1e4,pa,!0),ge("moveInputWithCursor",!0,function(fe,ye){ye||fe.display.input.resetPosition()}),ge("tabindex",null,function(fe,ye){return fe.display.input.getField().tabIndex=ye||""}),ge("autofocus",null),ge("direction","ltr",function(fe,ye){return fe.doc.setDirection(ye)},!0),ge("phrases",null)}function ig(ie,ae,ge){var fe=ge&&ge!=Dc;if(!ae!=!fe){var ye=ie.display.dragFunctions,Te=ae?$t:bn;Te(ie.display.scroller,"dragstart",ye.start),Te(ie.display.scroller,"dragenter",ye.enter),Te(ie.display.scroller,"dragover",ye.over),Te(ie.display.scroller,"dragleave",ye.leave),Te(ie.display.scroller,"drop",ye.drop)}}function um(ie){ie.options.lineWrapping?(bt(ie.display.wrapper,"CodeMirror-wrap"),ie.display.sizer.style.minWidth="",ie.display.sizerWidth=null):(Ie(ie.display.wrapper,"CodeMirror-wrap"),No(ie)),_i(ie),Ar(ie),es(ie),setTimeout(function(){return dh(ie)},100)}function Ba(ie,ae){var ge=this;if(!(this instanceof Ba))return new Ba(ie,ae);this.options=ae=ae?Yt(ae):{},Yt(ep,ae,!1);var fe=ae.value;typeof fe=="string"?fe=new Js(fe,ae.mode,null,ae.lineSeparator,ae.direction):ae.mode&&(fe.modeOption=ae.mode),this.doc=fe;var ye=new Ba.inputStyles[ae.inputStyle](this),Te=this.display=new Wr(ie,fe,ye,ae);Te.wrapper.CodeMirror=this,ng(this),ae.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Bc(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 Ge,keySeq:null,specialChars:null},ae.autofocus&&!ee&&Te.input.focus(),Ze&&Ke<11&&setTimeout(function(){return ge.display.input.reset(!0)},20),Kd(this),uu(),Zn(this),this.curOp.forceUpdate=!0,bo(this,fe),ae.autofocus&&!ee||this.hasFocus()?setTimeout(function(){ge.hasFocus()&&!ge.state.focused&&Oo(ge)},20):Bs(this);for(var We in xf)xf.hasOwnProperty(We)&&xf[We](this,ae[We],Dc);pr(this),ae.finishInit&&ae.finishInit(this);for(var st=0;st<cd.length;++st)cd[st](this);Sr(this),Be&&ae.lineWrapping&&getComputedStyle(Te.lineDiv).textRendering=="optimizelegibility"&&(Te.lineDiv.style.textRendering="auto")}Ba.defaults=ep,Ba.optionHandlers=xf;function Kd(ie){var ae=ie.display;$t(ae.scroller,"mousedown",Mn(ie,Dh)),Ze&&Ke<11?$t(ae.scroller,"dblclick",Mn(ie,function(ot){if(!Yn(ie,ot)){var Lt=$i(ie,ot);if(!(!Lt||eg(ie,ot)||vs(ie.display,ot))){ii(ot);var dn=ie.findWordAt(Lt);Ea(ie.doc,dn.anchor,dn.head)}}})):$t(ae.scroller,"dblclick",function(ot){return Yn(ie,ot)||ii(ot)}),$t(ae.scroller,"contextmenu",function(ot){return tg(ie,ot)}),$t(ae.input.getField(),"contextmenu",function(ot){ae.scroller.contains(ot.target)||tg(ie,ot)});var ge,fe={end:0};function ye(){ae.activeTouch&&(ge=setTimeout(function(){return ae.activeTouch=null},1e3),fe=ae.activeTouch,fe.end=+new Date)}function Te(ot){if(ot.touches.length!=1)return!1;var Lt=ot.touches[0];return Lt.radiusX<=1&&Lt.radiusY<=1}function We(ot,Lt){if(Lt.left==null)return!0;var dn=Lt.left-ot.left,Rt=Lt.top-ot.top;return dn*dn+Rt*Rt>20*20}$t(ae.scroller,"touchstart",function(ot){if(!Yn(ie,ot)&&!Te(ot)&&!eg(ie,ot)){ae.input.ensurePolled(),clearTimeout(ge);var Lt=+new Date;ae.activeTouch={start:Lt,moved:!1,prev:Lt-fe.end<=300?fe:null},ot.touches.length==1&&(ae.activeTouch.left=ot.touches[0].pageX,ae.activeTouch.top=ot.touches[0].pageY)}}),$t(ae.scroller,"touchmove",function(){ae.activeTouch&&(ae.activeTouch.moved=!0)}),$t(ae.scroller,"touchend",function(ot){var Lt=ae.activeTouch;if(Lt&&!vs(ae,ot)&&Lt.left!=null&&!Lt.moved&&new Date-Lt.start<300){var dn=ie.coordsChar(ae.activeTouch,"page"),Rt;!Lt.prev||We(Lt,Lt.prev)?Rt=new mr(dn,dn):!Lt.prev.prev||We(Lt,Lt.prev.prev)?Rt=ie.findWordAt(dn):Rt=new mr(Wt(dn.line,0),li(ie.doc,Wt(dn.line+1,0))),ie.setSelection(Rt.anchor,Rt.head),ie.focus(),ii(ot)}ye()}),$t(ae.scroller,"touchcancel",ye),$t(ae.scroller,"scroll",function(){ae.scroller.clientHeight&&(Nh(ie,ae.scroller.scrollTop),_u(ie,ae.scroller.scrollLeft,!0),pn(ie,"scroll",ie))}),$t(ae.scroller,"mousewheel",function(ot){return xo(ie,ot)}),$t(ae.scroller,"DOMMouseScroll",function(ot){return xo(ie,ot)}),$t(ae.wrapper,"scroll",function(){return ae.wrapper.scrollTop=ae.wrapper.scrollLeft=0}),ae.dragFunctions={enter:function(ot){Yn(ie,ot)||Ri(ot)},over:function(ot){Yn(ie,ot)||(vf(ie,ot),Ri(ot))},start:function(ot){return sd(ie,ot)},drop:Mn(ie,Rd),leave:function(ot){Yn(ie,ot)||Uf(ie)}};var st=ae.input.getField();$t(st,"keyup",function(ot){return Ug.call(ie,ot)}),$t(st,"keydown",Mn(ie,Kg)),$t(st,"keypress",Mn(ie,Th)),$t(st,"focus",function(ot){return Oo(ie,ot)}),$t(st,"blur",function(ot){return Bs(ie,ot)})}var cd=[];Ba.defineInitHook=function(ie){return cd.push(ie)};function rl(ie,ae,ge,fe){var ye=ie.doc,Te;ge==null&&(ge="add"),ge=="smart"&&(ye.mode.indent?Te=ir(ie,ae).state:ge="prev");var We=ie.options.tabSize,st=Vt(ye,ae),ot=ut(st.text,null,We);st.stateAfter&&(st.stateAfter=null);var Lt=st.text.match(/^\s*/)[0],dn;if(!fe&&!/\S/.test(st.text))dn=0,ge="not";else if(ge=="smart"&&(dn=ye.mode.indent(Te,st.text.slice(Lt.length),st.text),dn==sn||dn>150)){if(!fe)return;ge="prev"}ge=="prev"?ae>ye.first?dn=ut(Vt(ye,ae-1).text,null,We):dn=0:ge=="add"?dn=ot+ie.options.indentUnit:ge=="subtract"?dn=ot-ie.options.indentUnit:typeof ge=="number"&&(dn=ot+ge),dn=Math.max(0,dn);var Rt="",zn=0;if(ie.options.indentWithTabs)for(var In=Math.floor(dn/We);In;--In)zn+=We,Rt+=" ";if(zn<dn&&(Rt+=Cn(dn-zn)),Rt!=Lt)return gh(ye,Rt,Wt(ae,0),Wt(ae,Lt.length),"+input"),st.stateAfter=null,!0;for(var Ci=0;Ci<ye.sel.ranges.length;Ci++){var Ti=ye.sel.ranges[Ci];if(Ti.head.line==ae&&Ti.head.ch<Lt.length){var Zi=Wt(ae,Lt.length);ja(ye,Ci,new mr(Zi,Zi));break}}}var cu=null;function dd(ie){cu=ie}function Pf(ie,ae,ge,fe,ye){var Te=ie.doc;ie.display.shift=!1,fe||(fe=Te.sel);var We=+new Date-200,st=ye=="paste"||ie.state.pasteIncoming>We,ot=ji(ae),Lt=null;if(st&&fe.ranges.length>1)if(cu&&cu.text.join(`
|
|
|
`)==ae){if(fe.ranges.length%cu.text.length==0){Lt=[];for(var dn=0;dn<cu.text.length;dn++)Lt.push(Te.splitLines(cu.text[dn]))}}else ot.length==fe.ranges.length&&ie.options.pasteLinesPerSelection&&(Lt=En(ot,function(vr){return[vr]}));for(var Rt=ie.curOp.updateInput,zn=fe.ranges.length-1;zn>=0;zn--){var In=fe.ranges[zn],Ci=In.from(),Ti=In.to();In.empty()&&(ge&&ge>0?Ci=Wt(Ci.line,Ci.ch-ge):ie.state.overwrite&&!st?Ti=Wt(Ti.line,Math.min(Vt(Te,Ti.line).text.length,Ti.ch+ft(ot).length)):st&&cu&&cu.lineWise&&cu.text.join(`
|
|
|
`)==ot.join(`
|
|
|
`)&&(Ci=Ti=Wt(Ci.line,0)));var Zi={from:Ci,to:Ti,text:Lt?Lt[zn%Lt.length]:ot,origin:ye||(st?"paste":ie.state.cutIncoming>We?"cut":"+input")};fs(ie.doc,Zi),Di(ie,"inputRead",ie,Zi)}ae&&!st&&np(ie,ae),ru(ie),ie.curOp.updateInput<2&&(ie.curOp.updateInput=Rt),ie.curOp.typing=!0,ie.state.pasteIncoming=ie.state.cutIncoming=-1}function tp(ie,ae){var ge=ie.clipboardData&&ie.clipboardData.getData("Text");if(ge)return ie.preventDefault(),!ae.isReadOnly()&&!ae.options.disableInput&&Ht(ae,function(){return Pf(ae,ge,0,null,"paste")}),!0}function np(ie,ae){if(!(!ie.options.electricChars||!ie.options.smartIndent))for(var ge=ie.doc.sel,fe=ge.ranges.length-1;fe>=0;fe--){var ye=ge.ranges[fe];if(!(ye.head.ch>100||fe&&ge.ranges[fe-1].head.line==ye.head.line)){var Te=ie.getModeAt(ye.head),We=!1;if(Te.electricChars){for(var st=0;st<Te.electricChars.length;st++)if(ae.indexOf(Te.electricChars.charAt(st))>-1){We=rl(ie,ye.head.line,"smart");break}}else Te.electricInput&&Te.electricInput.test(Vt(ie.doc,ye.head.line).text.slice(0,ye.head.ch))&&(We=rl(ie,ye.head.line,"smart"));We&&Di(ie,"electricInput",ie,ye.head.line)}}}function ip(ie){for(var ae=[],ge=[],fe=0;fe<ie.doc.sel.ranges.length;fe++){var ye=ie.doc.sel.ranges[fe].head.line,Te={anchor:Wt(ye,0),head:Wt(ye+1,0)};ge.push(Te),ae.push(ie.getRange(Te.anchor,Te.head))}return{text:ae,ranges:ge}}function rp(ie,ae,ge,fe){ie.setAttribute("autocorrect",ge?"":"off"),ie.setAttribute("autocapitalize",fe?"":"off"),ie.setAttribute("spellcheck",!!ae)}function op(){var ie=$e("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),ae=$e("div",[ie],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Be?ie.style.width="1000px":ie.setAttribute("wrap","off"),Ae&&(ie.style.border="1px solid black"),rp(ie),ae}function Oc(ie){var ae=ie.optionHandlers,ge=ie.helpers={};ie.prototype={constructor:ie,focus:function(){window.focus(),this.display.input.focus()},setOption:function(fe,ye){var Te=this.options,We=Te[fe];Te[fe]==ye&&fe!="mode"||(Te[fe]=ye,ae.hasOwnProperty(fe)&&Mn(this,ae[fe])(this,ye,We),pn(this,"optionChange",this,fe))},getOption:function(fe){return this.options[fe]},getDoc:function(){return this.doc},addKeyMap:function(fe,ye){this.state.keyMaps[ye?"push":"unshift"](Vh(fe))},removeKeyMap:function(fe){for(var ye=this.state.keyMaps,Te=0;Te<ye.length;++Te)if(ye[Te]==fe||ye[Te].name==fe)return ye.splice(Te,1),!0},addOverlay:Sn(function(fe,ye){var Te=fe.token?fe:ie.getMode(this.options,fe);if(Te.startState)throw new Error("Overlays may not be stateful.");Vn(this.state.overlays,{mode:Te,modeSpec:fe,opaque:ye&&ye.opaque,priority:ye&&ye.priority||0},function(We){return We.priority}),this.state.modeGen++,Ar(this)}),removeOverlay:Sn(function(fe){for(var ye=this.state.overlays,Te=0;Te<ye.length;++Te){var We=ye[Te].modeSpec;if(We==fe||typeof fe=="string"&&We.name==fe){ye.splice(Te,1),this.state.modeGen++,Ar(this);return}}}),indentLine:Sn(function(fe,ye,Te){typeof ye!="string"&&typeof ye!="number"&&(ye==null?ye=this.options.smartIndent?"smart":"prev":ye=ye?"add":"subtract"),On(this.doc,fe)&&rl(this,fe,ye,Te)}),indentSelection:Sn(function(fe){for(var ye=this.doc.sel.ranges,Te=-1,We=0;We<ye.length;We++){var st=ye[We];if(st.empty())st.head.line>Te&&(rl(this,st.head.line,fe,!0),Te=st.head.line,We==this.doc.sel.primIndex&&ru(this));else{var ot=st.from(),Lt=st.to(),dn=Math.max(Te,ot.line);Te=Math.min(this.lastLine(),Lt.line-(Lt.ch?0:1))+1;for(var Rt=dn;Rt<Te;++Rt)rl(this,Rt,fe);var zn=this.doc.sel.ranges;ot.ch==0&&ye.length==zn.length&&zn[We].from().ch>0&&ja(this.doc,We,new mr(ot,zn[We].to()),Bt)}}}),getTokenAt:function(fe,ye){return Ni(this,fe,ye)},getLineTokens:function(fe,ye){return Ni(this,Wt(fe),ye,!0)},getTokenTypeAt:function(fe){fe=li(this.doc,fe);var ye=Dr(this,Vt(this.doc,fe.line)),Te=0,We=(ye.length-1)/2,st=fe.ch,ot;if(st==0)ot=ye[2];else for(;;){var Lt=Te+We>>1;if((Lt?ye[Lt*2-1]:0)>=st)We=Lt;else if(ye[Lt*2+1]<st)Te=Lt+1;else{ot=ye[Lt*2+2];break}}var dn=ot?ot.indexOf("overlay "):-1;return dn<0?ot:dn==0?null:ot.slice(0,dn-1)},getModeAt:function(fe){var ye=this.doc.mode;return ye.innerMode?ie.innerMode(ye,this.getTokenAt(fe).state).mode:ye},getHelper:function(fe,ye){return this.getHelpers(fe,ye)[0]},getHelpers:function(fe,ye){var Te=[];if(!ge.hasOwnProperty(ye))return Te;var We=ge[ye],st=this.getModeAt(fe);if(typeof st[ye]=="string")We[st[ye]]&&Te.push(We[st[ye]]);else if(st[ye])for(var ot=0;ot<st[ye].length;ot++){var Lt=We[st[ye][ot]];Lt&&Te.push(Lt)}else st.helperType&&We[st.helperType]?Te.push(We[st.helperType]):We[st.name]&&Te.push(We[st.name]);for(var dn=0;dn<We._global.length;dn++){var Rt=We._global[dn];Rt.pred(st,this)&&kt(Te,Rt.val)==-1&&Te.push(Rt.val)}return Te},getStateAfter:function(fe,ye){var Te=this.doc;return fe=di(Te,fe==null?Te.first+Te.size-1:fe),ir(this,fe+1,ye).state},cursorCoords:function(fe,ye){var Te,We=this.doc.sel.primary();return fe==null?Te=We.head:typeof fe=="object"?Te=li(this.doc,fe):Te=fe?We.from():We.to(),va(this,Te,ye||"page")},charCoords:function(fe,ye){return $s(this,li(this.doc,fe),ye||"page")},coordsChar:function(fe,ye){return fe=Gs(this,fe,ye||"page"),Kt(this,fe.left,fe.top)},lineAtHeight:function(fe,ye){return fe=Gs(this,{top:fe,left:0},ye||"page").top,cn(this.doc,fe+this.display.viewOffset)},heightAtLine:function(fe,ye,Te){var We=!1,st;if(typeof fe=="number"){var ot=this.doc.first+this.doc.size-1;fe<this.doc.first?fe=this.doc.first:fe>ot&&(fe=ot,We=!0),st=Vt(this.doc,fe)}else st=fe;return Ka(this,st,{top:0,left:0},ye||"page",Te||We).top+(We?this.doc.height-wo(st):0)},defaultTextHeight:function(){return _r(this.display)},defaultCharWidth:function(){return jo(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(fe,ye,Te,We,st){var ot=this.display;fe=va(this,li(this.doc,fe));var Lt=fe.bottom,dn=fe.left;if(ye.style.position="absolute",ye.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(ye),ot.sizer.appendChild(ye),We=="over")Lt=fe.top;else if(We=="above"||We=="near"){var Rt=Math.max(ot.wrapper.clientHeight,this.doc.height),zn=Math.max(ot.sizer.clientWidth,ot.lineSpace.clientWidth);(We=="above"||fe.bottom+ye.offsetHeight>Rt)&&fe.top>ye.offsetHeight?Lt=fe.top-ye.offsetHeight:fe.bottom+ye.offsetHeight<=Rt&&(Lt=fe.bottom),dn+ye.offsetWidth>zn&&(dn=zn-ye.offsetWidth)}ye.style.top=Lt+"px",ye.style.left=ye.style.right="",st=="right"?(dn=ot.sizer.clientWidth-ye.offsetWidth,ye.style.right="0px"):(st=="left"?dn=0:st=="middle"&&(dn=(ot.sizer.clientWidth-ye.offsetWidth)/2),ye.style.left=dn+"px"),Te&&ju(this,{left:dn,top:Lt,right:dn+ye.offsetWidth,bottom:Lt+ye.offsetHeight})},triggerOnKeyDown:Sn(Kg),triggerOnKeyPress:Sn(Th),triggerOnKeyUp:Ug,triggerOnMouseDown:Sn(Dh),execCommand:function(fe){if(il.hasOwnProperty(fe))return il[fe].call(null,this)},triggerElectric:Sn(function(fe){np(this,fe)}),findPosH:function(fe,ye,Te,We){var st=1;ye<0&&(st=-1,ye=-ye);for(var ot=li(this.doc,fe),Lt=0;Lt<ye&&(ot=wf(this.doc,ot,st,Te,We),!ot.hitSide);++Lt);return ot},moveH:Sn(function(fe,ye){var Te=this;this.extendSelectionsBy(function(We){return Te.display.shift||Te.doc.extend||We.empty()?wf(Te.doc,We.head,fe,ye,Te.options.rtlMoveVisually):fe<0?We.from():We.to()},en)}),deleteH:Sn(function(fe,ye){var Te=this.doc.sel,We=this.doc;Te.somethingSelected()?We.replaceSelection("",null,"+delete"):Ll(this,function(st){var ot=wf(We,st.head,fe,ye,!1);return fe<0?{from:ot,to:st.head}:{from:st.head,to:ot}})}),findPosV:function(fe,ye,Te,We){var st=1,ot=We;ye<0&&(st=-1,ye=-ye);for(var Lt=li(this.doc,fe),dn=0;dn<ye;++dn){var Rt=va(this,Lt,"div");if(ot==null?ot=Rt.left:Rt.left=ot,Lt=Ic(this,Rt,st,Te),Lt.hitSide)break}return Lt},moveV:Sn(function(fe,ye){var Te=this,We=this.doc,st=[],ot=!this.display.shift&&!We.extend&&We.sel.somethingSelected();if(We.extendSelectionsBy(function(dn){if(ot)return fe<0?dn.from():dn.to();var Rt=va(Te,dn.head,"div");dn.goalColumn!=null&&(Rt.left=dn.goalColumn),st.push(Rt.left);var zn=Ic(Te,Rt,fe,ye);return ye=="page"&&dn==We.sel.primary()&&Bh(Te,$s(Te,zn,"div").top-Rt.top),zn},en),st.length)for(var Lt=0;Lt<We.sel.ranges.length;Lt++)We.sel.ranges[Lt].goalColumn=st[Lt]}),findWordAt:function(fe){var ye=this.doc,Te=Vt(ye,fe.line).text,We=fe.ch,st=fe.ch;if(Te){var ot=this.getHelper(fe,"wordChars");(fe.sticky=="before"||st==Te.length)&&We?--We:++st;for(var Lt=Te.charAt(We),dn=ke(Lt,ot)?function(Rt){return ke(Rt,ot)}:/\s/.test(Lt)?function(Rt){return/\s/.test(Rt)}:function(Rt){return!/\s/.test(Rt)&&!ke(Rt)};We>0&&dn(Te.charAt(We-1));)--We;for(;st<Te.length&&dn(Te.charAt(st));)++st}return new mr(Wt(fe.line,We),Wt(fe.line,st))},toggleOverwrite:function(fe){fe!=null&&fe==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?bt(this.display.cursorDiv,"CodeMirror-overwrite"):Ie(this.display.cursorDiv,"CodeMirror-overwrite"),pn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Qe()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Sn(function(fe,ye){zu(this,fe,ye)}),getScrollInfo:function(){var fe=this.display.scroller;return{left:fe.scrollLeft,top:fe.scrollTop,height:fe.scrollHeight-Ys(this)-this.display.barHeight,width:fe.scrollWidth-Ys(this)-this.display.barWidth,clientHeight:Mh(this),clientWidth:ul(this)}},scrollIntoView:Sn(function(fe,ye){fe==null?(fe={from:this.doc.sel.primary().head,to:null},ye==null&&(ye=this.options.cursorScrollMargin)):typeof fe=="number"?fe={from:Wt(fe,0),to:null}:fe.from==null&&(fe={from:fe,to:null}),fe.to||(fe.to=fe.from),fe.margin=ye||0,fe.from.line!=null?aa(this,fe):Gh(this,fe.from,fe.to,fe.margin)}),setSize:Sn(function(fe,ye){var Te=this,We=function(ot){return typeof ot=="number"||/^\d+$/.test(String(ot))?ot+"px":ot};fe!=null&&(this.display.wrapper.style.width=We(fe)),ye!=null&&(this.display.wrapper.style.height=We(ye)),this.options.lineWrapping&&ds(this);var st=this.display.viewFrom;this.doc.iter(st,this.display.viewTo,function(ot){if(ot.widgets){for(var Lt=0;Lt<ot.widgets.length;Lt++)if(ot.widgets[Lt].noHScroll){or(Te,st,"widget");break}}++st}),this.curOp.forceUpdate=!0,pn(this,"refresh",this)}),operation:function(fe){return Ht(this,fe)},startOperation:function(){return Zn(this)},endOperation:function(){return Sr(this)},refresh:Sn(function(){var fe=this.display.cachedTextHeight;Ar(this),this.curOp.forceUpdate=!0,es(this),zu(this,this.doc.scrollLeft,this.doc.scrollTop),wr(this.display),(fe==null||Math.abs(fe-_r(this.display))>.5||this.options.lineWrapping)&&_i(this),pn(this,"refresh",this)}),swapDoc:Sn(function(fe){var ye=this.doc;return ye.cm=null,this.state.selectingText&&this.state.selectingText(),bo(this,fe),es(this),this.display.input.reset(),zu(this,fe.scrollLeft,fe.scrollTop),this.curOp.forceScroll=!0,Di(this,"swapDoc",this,ye),ye}),phrase:function(fe){var ye=this.options.phrases;return ye&&Object.prototype.hasOwnProperty.call(ye,fe)?ye[fe]:fe},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}},Rn(ie),ie.registerHelper=function(fe,ye,Te){ge.hasOwnProperty(fe)||(ge[fe]=ie[fe]={_global:[]}),ge[fe][ye]=Te},ie.registerGlobalHelper=function(fe,ye,Te,We){ie.registerHelper(fe,ye,We),ge[fe]._global.push({pred:Te,val:We})}}function wf(ie,ae,ge,fe,ye){var Te=ae,We=ge,st=Vt(ie,ae.line),ot=ye&&ie.direction=="rtl"?-ge:ge;function Lt(){var Kr=ae.line+ot;return Kr<ie.first||Kr>=ie.first+ie.size?!1:(ae=new Wt(Kr,ae.ch,ae.sticky),st=Vt(ie,Kr))}function dn(Kr){var Br;if(fe=="codepoint"){var io=st.text.charCodeAt(ae.ch+(fe>0?0:-1));isNaN(io)?Br=null:Br=new Wt(ae.line,Math.max(0,Math.min(st.text.length,ae.ch+ge*(io>=55296&&io<56320?2:1))),-ge)}else ye?Br=ns(ie.cm,st,ae,ge):Br=As(st,ae,ge);if(Br==null)if(!Kr&&Lt())ae=ba(ye,ie.cm,st,ae.line,ot);else return!1;else ae=Br;return!0}if(fe=="char"||fe=="codepoint")dn();else if(fe=="column")dn(!0);else if(fe=="word"||fe=="group")for(var Rt=null,zn=fe=="group",In=ie.cm&&ie.cm.getHelper(ae,"wordChars"),Ci=!0;!(ge<0&&!dn(!Ci));Ci=!1){var Ti=st.text.charAt(ae.ch)||`
|
|
|
`,Zi=ke(Ti,In)?"w":zn&&Ti==`
|
|
|
`?"n":!zn||/\s/.test(Ti)?null:"p";if(zn&&!Ci&&!Zi&&(Zi="s"),Rt&&Rt!=Zi){ge<0&&(ge=1,dn(),ae.sticky="after");break}if(Zi&&(Rt=Zi),ge>0&&!dn(!Ci))break}var vr=Cu(ie,ae,Te,We,!0);return hi(Te,vr)&&(vr.hitSide=!0),vr}function Ic(ie,ae,ge,fe){var ye=ie.doc,Te=ae.left,We;if(fe=="page"){var st=Math.min(ie.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ot=Math.max(st-.5*_r(ie.display),3);We=(ge>0?ae.bottom:ae.top)+ge*ot}else fe=="line"&&(We=ge>0?ae.bottom+3:ae.top-3);for(var Lt;Lt=Kt(ie,Te,We),!!Lt.outside;){if(ge<0?We<=0:We>=ye.height){Lt.hitSide=!0;break}We+=ge*5}return Lt}var ss=function(ie){this.cm=ie,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ge,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ss.prototype.init=function(ie){var ae=this,ge=this,fe=ge.cm,ye=ge.div=ie.lineDiv;rp(ye,fe.options.spellcheck,fe.options.autocorrect,fe.options.autocapitalize);function Te(st){for(var ot=st.target;ot;ot=ot.parentNode){if(ot==ye)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ot.className))break}return!1}$t(ye,"paste",function(st){!Te(st)||Yn(fe,st)||tp(st,fe)||Ke<=11&&setTimeout(Mn(fe,function(){return ae.updateFromDOM()}),20)}),$t(ye,"compositionstart",function(st){ae.composing={data:st.data,done:!1}}),$t(ye,"compositionupdate",function(st){ae.composing||(ae.composing={data:st.data,done:!1})}),$t(ye,"compositionend",function(st){ae.composing&&(st.data!=ae.composing.data&&ae.readFromDOMSoon(),ae.composing.done=!0)}),$t(ye,"touchstart",function(){return ge.forceCompositionEnd()}),$t(ye,"input",function(){ae.composing||ae.readFromDOMSoon()});function We(st){if(!(!Te(st)||Yn(fe,st))){if(fe.somethingSelected())dd({lineWise:!1,text:fe.getSelections()}),st.type=="cut"&&fe.replaceSelection("",null,"cut");else if(fe.options.lineWiseCopyCut){var ot=ip(fe);dd({lineWise:!0,text:ot.text}),st.type=="cut"&&fe.operation(function(){fe.setSelections(ot.ranges,0,Bt),fe.replaceSelection("",null,"cut")})}else return;if(st.clipboardData){st.clipboardData.clearData();var Lt=cu.text.join(`
|
|
|
`);if(st.clipboardData.setData("Text",Lt),st.clipboardData.getData("Text")==Lt){st.preventDefault();return}}var dn=op(),Rt=dn.firstChild;fe.display.lineSpace.insertBefore(dn,fe.display.lineSpace.firstChild),Rt.value=cu.text.join(`
|
|
|
`);var zn=document.activeElement;At(Rt),setTimeout(function(){fe.display.lineSpace.removeChild(dn),zn.focus(),zn==ye&&ge.showPrimarySelection()},50)}}$t(ye,"copy",We),$t(ye,"cut",We)},ss.prototype.screenReaderLabelChanged=function(ie){ie?this.div.setAttribute("aria-label",ie):this.div.removeAttribute("aria-label")},ss.prototype.prepareSelection=function(){var ie=lr(this.cm,!1);return ie.focus=document.activeElement==this.div,ie},ss.prototype.showSelection=function(ie,ae){!ie||!this.cm.display.view.length||((ie.focus||ae)&&this.showPrimarySelection(),this.showMultipleSelections(ie))},ss.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ss.prototype.showPrimarySelection=function(){var ie=this.getSelection(),ae=this.cm,ge=ae.doc.sel.primary(),fe=ge.from(),ye=ge.to();if(ae.display.viewTo==ae.display.viewFrom||fe.line>=ae.display.viewTo||ye.line<ae.display.viewFrom){ie.removeAllRanges();return}var Te=Cf(ae,ie.anchorNode,ie.anchorOffset),We=Cf(ae,ie.focusNode,ie.focusOffset);if(!(Te&&!Te.bad&&We&&!We.bad&&Jt(qn(Te,We),fe)==0&&Jt(ui(Te,We),ye)==0)){var st=ae.display.view,ot=fe.line>=ae.display.viewFrom&&rg(ae,fe)||{node:st[0].measure.map[2],offset:0},Lt=ye.line<ae.display.viewTo&&rg(ae,ye);if(!Lt){var dn=st[st.length-1].measure,Rt=dn.maps?dn.maps[dn.maps.length-1]:dn.map;Lt={node:Rt[Rt.length-1],offset:Rt[Rt.length-2]-Rt[Rt.length-3]}}if(!ot||!Lt){ie.removeAllRanges();return}var zn=ie.rangeCount&&ie.getRangeAt(0),In;try{In=je(ot.node,ot.offset,Lt.offset,Lt.node)}catch(Ci){}In&&(!ce&&ae.state.focused?(ie.collapse(ot.node,ot.offset),In.collapsed||(ie.removeAllRanges(),ie.addRange(In))):(ie.removeAllRanges(),ie.addRange(In)),zn&&ie.anchorNode==null?ie.addRange(zn):ce&&this.startGracePeriod()),this.rememberSelection()}},ss.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)},ss.prototype.showMultipleSelections=function(ie){et(this.cm.display.cursorDiv,ie.cursors),et(this.cm.display.selectionDiv,ie.selection)},ss.prototype.rememberSelection=function(){var ie=this.getSelection();this.lastAnchorNode=ie.anchorNode,this.lastAnchorOffset=ie.anchorOffset,this.lastFocusNode=ie.focusNode,this.lastFocusOffset=ie.focusOffset},ss.prototype.selectionInEditor=function(){var ie=this.getSelection();if(!ie.rangeCount)return!1;var ae=ie.getRangeAt(0).commonAncestorContainer;return Tt(this.div,ae)},ss.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},ss.prototype.blur=function(){this.div.blur()},ss.prototype.getField=function(){return this.div},ss.prototype.supportsTouch=function(){return!0},ss.prototype.receivedFocus=function(){var ie=this;this.selectionInEditor()?this.pollSelection():Ht(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)},ss.prototype.selectionChanged=function(){var ie=this.getSelection();return ie.anchorNode!=this.lastAnchorNode||ie.anchorOffset!=this.lastAnchorOffset||ie.focusNode!=this.lastFocusNode||ie.focusOffset!=this.lastFocusOffset},ss.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var ie=this.getSelection(),ae=this.cm;if(te&&ct&&this.cm.display.gutterSpecs.length&&ap(ie.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var ge=Cf(ae,ie.anchorNode,ie.anchorOffset),fe=Cf(ae,ie.focusNode,ie.focusOffset);ge&&fe&&Ht(ae,function(){Za(ae.doc,Vo(ge,fe),Bt),(ge.bad||fe.bad)&&(ae.curOp.selectionChanged=!0)})}}},ss.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var ie=this.cm,ae=ie.display,ge=ie.doc.sel.primary(),fe=ge.from(),ye=ge.to();if(fe.ch==0&&fe.line>ie.firstLine()&&(fe=Wt(fe.line-1,Vt(ie.doc,fe.line-1).length)),ye.ch==Vt(ie.doc,ye.line).text.length&&ye.line<ie.lastLine()&&(ye=Wt(ye.line+1,0)),fe.line<ae.viewFrom||ye.line>ae.viewTo-1)return!1;var Te,We,st;fe.line==ae.viewFrom||(Te=Tr(ie,fe.line))==0?(We=yt(ae.view[0].line),st=ae.view[0].node):(We=yt(ae.view[Te].line),st=ae.view[Te-1].node.nextSibling);var ot=Tr(ie,ye.line),Lt,dn;if(ot==ae.view.length-1?(Lt=ae.viewTo-1,dn=ae.lineDiv.lastChild):(Lt=yt(ae.view[ot+1].line)-1,dn=ae.view[ot+1].node.previousSibling),!st)return!1;for(var Rt=ie.doc.splitLines(Ud(ie,st,dn,We,Lt)),zn=on(ie.doc,Wt(We,0),Wt(Lt,Vt(ie.doc,Lt).text.length));Rt.length>1&&zn.length>1;)if(ft(Rt)==ft(zn))Rt.pop(),zn.pop(),Lt--;else if(Rt[0]==zn[0])Rt.shift(),zn.shift(),We++;else break;for(var In=0,Ci=0,Ti=Rt[0],Zi=zn[0],vr=Math.min(Ti.length,Zi.length);In<vr&&Ti.charCodeAt(In)==Zi.charCodeAt(In);)++In;for(var Kr=ft(Rt),Br=ft(zn),io=Math.min(Kr.length-(Rt.length==1?In:0),Br.length-(zn.length==1?In:0));Ci<io&&Kr.charCodeAt(Kr.length-Ci-1)==Br.charCodeAt(Br.length-Ci-1);)++Ci;if(Rt.length==1&&zn.length==1&&We==fe.line)for(;In&&In>fe.ch&&Kr.charCodeAt(Kr.length-Ci-1)==Br.charCodeAt(Br.length-Ci-1);)In--,Ci++;Rt[Rt.length-1]=Kr.slice(0,Kr.length-Ci).replace(/^\u200b+/,""),Rt[0]=Rt[0].slice(In).replace(/\u200b+$/,"");var Wo=Wt(We,In),Lr=Wt(Lt,zn.length?ft(zn).length-Ci:0);if(Rt.length>1||Rt[0]||Jt(Wo,Lr))return gh(ie.doc,Rt,Wo,Lr,"+input"),!0},ss.prototype.ensurePolled=function(){this.forceCompositionEnd()},ss.prototype.reset=function(){this.forceCompositionEnd()},ss.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ss.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))},ss.prototype.updateFromDOM=function(){var ie=this;(this.cm.isReadOnly()||!this.pollContent())&&Ht(this.cm,function(){return Ar(ie.cm)})},ss.prototype.setUneditable=function(ie){ie.contentEditable="false"},ss.prototype.onKeyPress=function(ie){ie.charCode==0||this.composing||(ie.preventDefault(),this.cm.isReadOnly()||Mn(this.cm,Pf)(this.cm,String.fromCharCode(ie.charCode==null?ie.keyCode:ie.charCode),0))},ss.prototype.readOnlyChanged=function(ie){this.div.contentEditable=String(ie!="nocursor")},ss.prototype.onContextMenu=function(){},ss.prototype.resetPosition=function(){},ss.prototype.needsContentAttribute=!0;function rg(ie,ae){var ge=Ru(ie,ae.line);if(!ge||ge.hidden)return null;var fe=Vt(ie.doc,ae.line),ye=Lh(ge,fe,ae.line),Te=un(fe,ie.doc.direction),We="left";if(Te){var st=lt(Te,ae.ch);We=st%2?"right":"left"}var ot=qu(ye.map,ae.ch,We);return ot.offset=ot.collapse=="right"?ot.end:ot.start,ot}function ap(ie){for(var ae=ie;ae;ae=ae.parentNode)if(/CodeMirror-gutter-wrapper/.test(ae.className))return!0;return!1}function Vd(ie,ae){return ae&&(ie.bad=!0),ie}function Ud(ie,ae,ge,fe,ye){var Te="",We=!1,st=ie.doc.lineSeparator(),ot=!1;function Lt(In){return function(Ci){return Ci.id==In}}function dn(){We&&(Te+=st,ot&&(Te+=st),We=ot=!1)}function Rt(In){In&&(dn(),Te+=In)}function zn(In){if(In.nodeType==1){var Ci=In.getAttribute("cm-text");if(Ci){Rt(Ci);return}var Ti=In.getAttribute("cm-marker"),Zi;if(Ti){var vr=ie.findMarks(Wt(fe,0),Wt(ye+1,0),Lt(+Ti));vr.length&&(Zi=vr[0].find(0))&&Rt(on(ie.doc,Zi.from,Zi.to).join(st));return}if(In.getAttribute("contenteditable")=="false")return;var Kr=/^(pre|div|p|li|table|br)$/i.test(In.nodeName);if(!/^br$/i.test(In.nodeName)&&In.textContent.length==0)return;Kr&&dn();for(var Br=0;Br<In.childNodes.length;Br++)zn(In.childNodes[Br]);/^(pre|p)$/i.test(In.nodeName)&&(ot=!0),Kr&&(We=!0)}else In.nodeType==3&&Rt(In.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;zn(ae),ae!=ge;)ae=ae.nextSibling,ot=!1;return Te}function Cf(ie,ae,ge){var fe;if(ae==ie.display.lineDiv){if(fe=ie.display.lineDiv.childNodes[ge],!fe)return Vd(ie.clipPos(Wt(ie.display.viewTo-1)),!0);ae=null,ge=0}else for(fe=ae;;fe=fe.parentNode){if(!fe||fe==ie.display.lineDiv)return null;if(fe.parentNode&&fe.parentNode==ie.display.lineDiv)break}for(var ye=0;ye<ie.display.view.length;ye++){var Te=ie.display.view[ye];if(Te.node==fe)return hm(Te,ae,ge)}}function hm(ie,ae,ge){var fe=ie.text.firstChild,ye=!1;if(!ae||!Tt(fe,ae))return Vd(Wt(yt(ie.line),0),!0);if(ae==fe&&(ye=!0,ae=fe.childNodes[ge],ge=0,!ae)){var Te=ie.rest?ft(ie.rest):ie.line;return Vd(Wt(yt(Te),Te.text.length),ye)}var We=ae.nodeType==3?ae:null,st=ae;for(!We&&ae.childNodes.length==1&&ae.firstChild.nodeType==3&&(We=ae.firstChild,ge&&(ge=We.nodeValue.length));st.parentNode!=fe;)st=st.parentNode;var ot=ie.measure,Lt=ot.maps;function dn(Zi,vr,Kr){for(var Br=-1;Br<(Lt?Lt.length:0);Br++)for(var io=Br<0?ot.map:Lt[Br],Wo=0;Wo<io.length;Wo+=3){var Lr=io[Wo+2];if(Lr==Zi||Lr==vr){var oa=yt(Br<0?ie.line:ie.rest[Br]),Ss=io[Wo]+Kr;return(Kr<0||Lr!=Zi)&&(Ss=io[Wo+(Kr?1:0)]),Wt(oa,Ss)}}}var Rt=dn(We,st,ge);if(Rt)return Vd(Rt,ye);for(var zn=st.nextSibling,In=We?We.nodeValue.length-ge:0;zn;zn=zn.nextSibling){if(Rt=dn(zn,zn.firstChild,0),Rt)return Vd(Wt(Rt.line,Rt.ch-In),ye);In+=zn.textContent.length}for(var Ci=st.previousSibling,Ti=ge;Ci;Ci=Ci.previousSibling){if(Rt=dn(Ci,Ci.firstChild,-1),Rt)return Vd(Wt(Rt.line,Rt.ch+Ti),ye);Ti+=Ci.textContent.length}}var Qs=function(ie){this.cm=ie,this.prevInput="",this.pollingFast=!1,this.polling=new Ge,this.hasSelection=!1,this.composing=null};Qs.prototype.init=function(ie){var ae=this,ge=this,fe=this.cm;this.createField(ie);var ye=this.textarea;ie.wrapper.insertBefore(this.wrapper,ie.wrapper.firstChild),Ae&&(ye.style.width="0px"),$t(ye,"input",function(){Ze&&Ke>=9&&ae.hasSelection&&(ae.hasSelection=null),ge.poll()}),$t(ye,"paste",function(We){Yn(fe,We)||tp(We,fe)||(fe.state.pasteIncoming=+new Date,ge.fastPoll())});function Te(We){if(!Yn(fe,We)){if(fe.somethingSelected())dd({lineWise:!1,text:fe.getSelections()});else if(fe.options.lineWiseCopyCut){var st=ip(fe);dd({lineWise:!0,text:st.text}),We.type=="cut"?fe.setSelections(st.ranges,null,Bt):(ge.prevInput="",ye.value=st.text.join(`
|
|
|
`),At(ye))}else return;We.type=="cut"&&(fe.state.cutIncoming=+new Date)}}$t(ye,"cut",Te),$t(ye,"copy",Te),$t(ie.scroller,"paste",function(We){if(!(vs(ie,We)||Yn(fe,We))){if(!ye.dispatchEvent){fe.state.pasteIncoming=+new Date,ge.focus();return}var st=new Event("paste");st.clipboardData=We.clipboardData,ye.dispatchEvent(st)}}),$t(ie.lineSpace,"selectstart",function(We){vs(ie,We)||ii(We)}),$t(ye,"compositionstart",function(){var We=fe.getCursor("from");ge.composing&&ge.composing.range.clear(),ge.composing={start:We,range:fe.markText(We,fe.getCursor("to"),{className:"CodeMirror-composing"})}}),$t(ye,"compositionend",function(){ge.composing&&(ge.poll(),ge.composing.range.clear(),ge.composing=null)})},Qs.prototype.createField=function(ie){this.wrapper=op(),this.textarea=this.wrapper.firstChild},Qs.prototype.screenReaderLabelChanged=function(ie){ie?this.textarea.setAttribute("aria-label",ie):this.textarea.removeAttribute("aria-label")},Qs.prototype.prepareSelection=function(){var ie=this.cm,ae=ie.display,ge=ie.doc,fe=lr(ie);if(ie.options.moveInputWithCursor){var ye=va(ie,ge.sel.primary().head,"div"),Te=ae.wrapper.getBoundingClientRect(),We=ae.lineDiv.getBoundingClientRect();fe.teTop=Math.max(0,Math.min(ae.wrapper.clientHeight-10,ye.top+We.top-Te.top)),fe.teLeft=Math.max(0,Math.min(ae.wrapper.clientWidth-10,ye.left+We.left-Te.left))}return fe},Qs.prototype.showSelection=function(ie){var ae=this.cm,ge=ae.display;et(ge.cursorDiv,ie.cursors),et(ge.selectionDiv,ie.selection),ie.teTop!=null&&(this.wrapper.style.top=ie.teTop+"px",this.wrapper.style.left=ie.teLeft+"px")},Qs.prototype.reset=function(ie){if(!(this.contextMenuPending||this.composing)){var ae=this.cm;if(ae.somethingSelected()){this.prevInput="";var ge=ae.getSelection();this.textarea.value=ge,ae.state.focused&&At(this.textarea),Ze&&Ke>=9&&(this.hasSelection=ge)}else ie||(this.prevInput=this.textarea.value="",Ze&&Ke>=9&&(this.hasSelection=null))}},Qs.prototype.getField=function(){return this.textarea},Qs.prototype.supportsTouch=function(){return!1},Qs.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ee||Qe()!=this.textarea))try{this.textarea.focus()}catch(ie){}},Qs.prototype.blur=function(){this.textarea.blur()},Qs.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Qs.prototype.receivedFocus=function(){this.slowPoll()},Qs.prototype.slowPoll=function(){var ie=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){ie.poll(),ie.cm.state.focused&&ie.slowPoll()})},Qs.prototype.fastPoll=function(){var ie=!1,ae=this;ae.pollingFast=!0;function ge(){var fe=ae.poll();!fe&&!ie?(ie=!0,ae.polling.set(60,ge)):(ae.pollingFast=!1,ae.slowPoll())}ae.polling.set(20,ge)},Qs.prototype.poll=function(){var ie=this,ae=this.cm,ge=this.textarea,fe=this.prevInput;if(this.contextMenuPending||!ae.state.focused||Le(ge)&&!fe&&!this.composing||ae.isReadOnly()||ae.options.disableInput||ae.state.keySeq)return!1;var ye=ge.value;if(ye==fe&&!ae.somethingSelected())return!1;if(Ze&&Ke>=9&&this.hasSelection===ye||he&&/[\uf700-\uf7ff]/.test(ye))return ae.display.input.reset(),!1;if(ae.doc.sel==ae.display.selForContextMenu){var Te=ye.charCodeAt(0);if(Te==8203&&!fe&&(fe="\u200B"),Te==8666)return this.reset(),this.cm.execCommand("undo")}for(var We=0,st=Math.min(fe.length,ye.length);We<st&&fe.charCodeAt(We)==ye.charCodeAt(We);)++We;return Ht(ae,function(){Pf(ae,ye.slice(We),fe.length-We,null,ie.composing?"*compose":null),ye.length>1e3||ye.indexOf(`
|
|
|
`)>-1?ge.value=ie.prevInput="":ie.prevInput=ye,ie.composing&&(ie.composing.range.clear(),ie.composing.range=ae.markText(ie.composing.start,ae.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Qs.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Qs.prototype.onKeyPress=function(){Ze&&Ke>=9&&(this.hasSelection=null),this.fastPoll()},Qs.prototype.onContextMenu=function(ie){var ae=this,ge=ae.cm,fe=ge.display,ye=ae.textarea;ae.contextMenuPending&&ae.contextMenuPending();var Te=$i(ge,ie),We=fe.scroller.scrollTop;if(!Te||He)return;var st=ge.options.resetSelectionOnContextMenu;st&&ge.doc.sel.contains(Te)==-1&&Mn(ge,Za)(ge.doc,Vo(Te),Bt);var ot=ye.style.cssText,Lt=ae.wrapper.style.cssText,dn=ae.wrapper.offsetParent.getBoundingClientRect();ae.wrapper.style.cssText="position: static",ye.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(ie.clientY-dn.top-5)+"px; left: "+(ie.clientX-dn.left-5)+`px;
|
|
|
z-index: 1000; background: `+(Ze?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Rt;Be&&(Rt=window.scrollY),fe.input.focus(),Be&&window.scrollTo(null,Rt),fe.input.reset(),ge.somethingSelected()||(ye.value=ae.prevInput=" "),ae.contextMenuPending=In,fe.selForContextMenu=ge.doc.sel,clearTimeout(fe.detectingSelectAll);function zn(){if(ye.selectionStart!=null){var Ti=ge.somethingSelected(),Zi="\u200B"+(Ti?ye.value:"");ye.value="\u21DA",ye.value=Zi,ae.prevInput=Ti?"":"\u200B",ye.selectionStart=1,ye.selectionEnd=Zi.length,fe.selForContextMenu=ge.doc.sel}}function In(){if(ae.contextMenuPending==In&&(ae.contextMenuPending=!1,ae.wrapper.style.cssText=Lt,ye.style.cssText=ot,Ze&&Ke<9&&fe.scrollbars.setScrollTop(fe.scroller.scrollTop=We),ye.selectionStart!=null)){(!Ze||Ze&&Ke<9)&&zn();var Ti=0,Zi=function(){fe.selForContextMenu==ge.doc.sel&&ye.selectionStart==0&&ye.selectionEnd>0&&ae.prevInput=="\u200B"?Mn(ge,La)(ge):Ti++<10?fe.detectingSelectAll=setTimeout(Zi,500):(fe.selForContextMenu=null,fe.input.reset())};fe.detectingSelectAll=setTimeout(Zi,200)}}if(Ze&&Ke>=9&&zn(),be){Ri(ie);var Ci=function(){bn(window,"mouseup",Ci),setTimeout(In,20)};$t(window,"mouseup",Ci)}else setTimeout(In,50)},Qs.prototype.readOnlyChanged=function(ie){ie||this.reset(),this.textarea.disabled=ie=="nocursor",this.textarea.readOnly=!!ie},Qs.prototype.setUneditable=function(){},Qs.prototype.needsContentAttribute=!1;function cm(ie,ae){if(ae=ae?Yt(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 ge=Qe();ae.autofocus=ge==ie||ie.getAttribute("autofocus")!=null&&ge==document.body}function fe(){ie.value=st.getValue()}var ye;if(ie.form&&($t(ie.form,"submit",fe),!ae.leaveSubmitMethodAlone)){var Te=ie.form;ye=Te.submit;try{var We=Te.submit=function(){fe(),Te.submit=ye,Te.submit(),Te.submit=We}}catch(ot){}}ae.finishInit=function(ot){ot.save=fe,ot.getTextArea=function(){return ie},ot.toTextArea=function(){ot.toTextArea=isNaN,fe(),ie.parentNode.removeChild(ot.getWrapperElement()),ie.style.display="",ie.form&&(bn(ie.form,"submit",fe),!ae.leaveSubmitMethodAlone&&typeof ie.form.submit=="function"&&(ie.form.submit=ye))}},ie.style.display="none";var st=Ba(function(ot){return ie.parentNode.insertBefore(ot,ie.nextSibling)},ae);return st}function Yd(ie){ie.off=bn,ie.on=$t,ie.wheelEventPixels=no,ie.Doc=Js,ie.splitLines=ji,ie.countColumn=ut,ie.findColumn=Bn,ie.isWordChar=Ne,ie.Pass=sn,ie.signal=pn,ie.Line=yo,ie.changeEnd=wa,ie.scrollbarModel=Fc,ie.Pos=Wt,ie.cmpPos=Jt,ie.modes=ni,ie.mimeModes=vi,ie.resolveMode=Dn,ie.getMode=Ft,ie.modeExtensions=Ot,ie.extendMode=Ve,ie.copyState=Ut,ie.startState=xt,ie.innerMode=tn,ie.commands=il,ie.keyMap=_l,ie.keyName=Hd,ie.isModifierKey=Tc,ie.lookupKey=hu,ie.normalizeKeyMap=_d,ie.StringStream=rt,ie.SharedTextMarker=ph,ie.TextMarker=Qt,ie.LineWidget=_s,ie.e_preventDefault=ii,ie.e_stopPropagation=pi,ie.e_stop=Ri,ie.addClass=bt,ie.contains=Tt,ie.rmClass=Ie,ie.keyNames=nh}lm(Ba),Oc(Ba);var fc="iter insert remove copy getEditor constructor".split(" ");for(var Ef in Js.prototype)Js.prototype.hasOwnProperty(Ef)&&kt(fc,Ef)<0&&(Ba.prototype[Ef]=function(ie){return function(){return ie.apply(this.doc,arguments)}}(Js.prototype[Ef]));return Rn(Js),Ba.inputStyles={textarea:Qs,contenteditable:ss},Ba.defineMode=function(ie){!Ba.defaults.mode&&ie!="null"&&(Ba.defaults.mode=ie),Fi.apply(this,arguments)},Ba.defineMIME=_n,Ba.defineMode("null",function(){return{token:function(ie){return ie.skipToEnd()}}}),Ba.defineMIME("text/plain","null"),Ba.defineExtension=function(ie,ae){Ba.prototype[ie]=ae},Ba.defineDocExtension=function(ie,ae){Js.prototype[ie]=ae},Ba.fromTextArea=cm,Yd(Ba),Ba.version="5.58.2",Ba})},25419:function(Pn,an,ve){(function(ce){ce(ve(89780),ve(15525),ve(98101))})(function(ce){"use strict";ce.defineMode("markdown",function(De,_e){var Ct=ce.getMode(De,"text/html"),Ze=Ct.name=="null";function Ke(ut){if(ce.findModeByName){var Ge=ce.findModeByName(ut);Ge&&(ut=Ge.mime||Ge.mimes[0])}var kt=ce.getMode(De,ut);return kt.name=="null"?null:kt}_e.highlightFormatting===void 0&&(_e.highlightFormatting=!1),_e.maxBlockquoteDepth===void 0&&(_e.maxBlockquoteDepth=0),_e.taskLists===void 0&&(_e.taskLists=!1),_e.strikethrough===void 0&&(_e.strikethrough=!1),_e.emoji===void 0&&(_e.emoji=!1),_e.fencedCodeBlockHighlighting===void 0&&(_e.fencedCodeBlockHighlighting=!0),_e.fencedCodeBlockDefaultMode===void 0&&(_e.fencedCodeBlockDefaultMode="text/plain"),_e.xml===void 0&&(_e.xml=!0),_e.tokenTypeOverrides===void 0&&(_e.tokenTypeOverrides={});var Be={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 mt in Be)Be.hasOwnProperty(mt)&&_e.tokenTypeOverrides[mt]&&(Be[mt]=_e.tokenTypeOverrides[mt]);var ct=/^([*\-_])(?:\s*\1){2,}\s*$/,He=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Et=/^\[(x| )\](?=\s)/i,ht=_e.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,dt=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Ae=/^[^#!\[\]*_\\<>` "'(~:]+/,te=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,ee=/^\s*\[[^\]]+?\]:.*$/,he=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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 de(ut,Ge,kt){return Ge.f=Ge.inline=kt,kt(ut,Ge)}function me(ut,Ge,kt){return Ge.f=Ge.block=kt,kt(ut,Ge)}function we(ut){return!ut||!/\S/.test(ut.string)}function be(ut){if(ut.linkTitle=!1,ut.linkHref=!1,ut.linkText=!1,ut.em=!1,ut.strong=!1,ut.strikethrough=!1,ut.quote=0,ut.indentedCode=!1,ut.f==Ie){var Ge=Ze;if(!Ge){var kt=ce.innerMode(Ct,ut.htmlState);Ge=kt.mode.name=="xml"&&kt.state.tagStart===null&&!kt.state.context&&kt.state.tokenize.isInText}Ge&&(ut.f=gt,ut.block=Me,ut.htmlState=null)}return ut.trailingSpace=0,ut.trailingSpaceNewLine=!1,ut.prevLine=ut.thisLine,ut.thisLine={stream:null},null}function Me(ut,Ge){var kt=ut.column()===Ge.indentation,ln=we(Ge.prevLine.stream),sn=Ge.indentedCode,Bt=Ge.prevLine.hr,Gt=Ge.list!==!1,en=(Ge.listStack[Ge.listStack.length-1]||0)+3;Ge.indentedCode=!1;var Bn=Ge.indentation;if(Ge.indentationDiff===null&&(Ge.indentationDiff=Ge.indentation,Gt)){for(Ge.list=null;Bn<Ge.listStack[Ge.listStack.length-1];)Ge.listStack.pop(),Ge.listStack.length?Ge.indentation=Ge.listStack[Ge.listStack.length-1]:Ge.list=!1;Ge.list!==!1&&(Ge.indentationDiff=Bn-Ge.listStack[Ge.listStack.length-1])}var rn=!ln&&!Bt&&!Ge.prevLine.header&&(!Gt||!sn)&&!Ge.prevLine.fencedCodeEnd,Cn=(Ge.list===!1||Bt||ln)&&Ge.indentation<=en&&ut.match(ct),ft=null;if(Ge.indentationDiff>=4&&(sn||Ge.prevLine.fencedCodeEnd||Ge.prevLine.header||ln))return ut.skipToEnd(),Ge.indentedCode=!0,Be.code;if(ut.eatSpace())return null;if(kt&&Ge.indentation<=en&&(ft=ut.match(ht))&&ft[1].length<=6)return Ge.quote=0,Ge.header=ft[1].length,Ge.thisLine.header=!0,_e.highlightFormatting&&(Ge.formatting="header"),Ge.f=Ge.inline,et(Ge);if(Ge.indentation<=en&&ut.eat(">"))return Ge.quote=kt?1:Ge.quote+1,_e.highlightFormatting&&(Ge.formatting="quote"),ut.eatSpace(),et(Ge);if(!Cn&&!Ge.setext&&kt&&Ge.indentation<=en&&(ft=ut.match(He))){var En=ft[1]?"ol":"ul";return Ge.indentation=Bn+ut.current().length,Ge.list=!0,Ge.quote=0,Ge.listStack.push(Ge.indentation),Ge.em=!1,Ge.strong=!1,Ge.code=!1,Ge.strikethrough=!1,_e.taskLists&&ut.match(Et,!1)&&(Ge.taskList=!0),Ge.f=Ge.inline,_e.highlightFormatting&&(Ge.formatting=["list","list-"+En]),et(Ge)}else{if(kt&&Ge.indentation<=en&&(ft=ut.match(te,!0)))return Ge.quote=0,Ge.fencedEndRE=new RegExp(ft[1]+"+ *$"),Ge.localMode=_e.fencedCodeBlockHighlighting&&Ke(ft[2]||_e.fencedCodeBlockDefaultMode),Ge.localMode&&(Ge.localState=ce.startState(Ge.localMode)),Ge.f=Ge.block=ze,_e.highlightFormatting&&(Ge.formatting="code-block"),Ge.code=-1,et(Ge);if(Ge.setext||(!rn||!Gt)&&!Ge.quote&&Ge.list===!1&&!Ge.code&&!Cn&&!ee.test(ut.string)&&(ft=ut.lookAhead(1))&&(ft=ft.match(dt)))return Ge.setext?(Ge.header=Ge.setext,Ge.setext=0,ut.skipToEnd(),_e.highlightFormatting&&(Ge.formatting="header")):(Ge.header=ft[0].charAt(0)=="="?1:2,Ge.setext=Ge.header),Ge.thisLine.header=!0,Ge.f=Ge.inline,et(Ge);if(Cn)return ut.skipToEnd(),Ge.hr=!0,Ge.thisLine.hr=!0,Be.hr;if(ut.peek()==="[")return de(ut,Ge,Nt)}return de(ut,Ge,Ge.inline)}function Ie(ut,Ge){var kt=Ct.token(ut,Ge.htmlState);if(!Ze){var ln=ce.innerMode(Ct,Ge.htmlState);(ln.mode.name=="xml"&&ln.state.tagStart===null&&!ln.state.context&&ln.state.tokenize.isInText||Ge.md_inside&&ut.current().indexOf(">")>-1)&&(Ge.f=gt,Ge.block=Me,Ge.htmlState=null)}return kt}function ze(ut,Ge){var kt=Ge.listStack[Ge.listStack.length-1]||0,ln=Ge.indentation<kt,sn=kt+3;if(Ge.fencedEndRE&&Ge.indentation<=sn&&(ln||ut.match(Ge.fencedEndRE))){_e.highlightFormatting&&(Ge.formatting="code-block");var Bt;return ln||(Bt=et(Ge)),Ge.localMode=Ge.localState=null,Ge.block=Me,Ge.f=gt,Ge.fencedEndRE=null,Ge.code=0,Ge.thisLine.fencedCodeEnd=!0,ln?me(ut,Ge,Ge.block):Bt}else return Ge.localMode?Ge.localMode.token(ut,Ge.localState):(ut.skipToEnd(),Be.code)}function et(ut){var Ge=[];if(ut.formatting){Ge.push(Be.formatting),typeof ut.formatting=="string"&&(ut.formatting=[ut.formatting]);for(var kt=0;kt<ut.formatting.length;kt++)Ge.push(Be.formatting+"-"+ut.formatting[kt]),ut.formatting[kt]==="header"&&Ge.push(Be.formatting+"-"+ut.formatting[kt]+"-"+ut.header),ut.formatting[kt]==="quote"&&(!_e.maxBlockquoteDepth||_e.maxBlockquoteDepth>=ut.quote?Ge.push(Be.formatting+"-"+ut.formatting[kt]+"-"+ut.quote):Ge.push("error"))}if(ut.taskOpen)return Ge.push("meta"),Ge.length?Ge.join(" "):null;if(ut.taskClosed)return Ge.push("property"),Ge.length?Ge.join(" "):null;if(ut.linkHref?Ge.push(Be.linkHref,"url"):(ut.strong&&Ge.push(Be.strong),ut.em&&Ge.push(Be.em),ut.strikethrough&&Ge.push(Be.strikethrough),ut.emoji&&Ge.push(Be.emoji),ut.linkText&&Ge.push(Be.linkText),ut.code&&Ge.push(Be.code),ut.image&&Ge.push(Be.image),ut.imageAltText&&Ge.push(Be.imageAltText,"link"),ut.imageMarker&&Ge.push(Be.imageMarker)),ut.header&&Ge.push(Be.header,Be.header+"-"+ut.header),ut.quote&&(Ge.push(Be.quote),!_e.maxBlockquoteDepth||_e.maxBlockquoteDepth>=ut.quote?Ge.push(Be.quote+"-"+ut.quote):Ge.push(Be.quote+"-"+_e.maxBlockquoteDepth)),ut.list!==!1){var ln=(ut.listStack.length-1)%3;ln?ln===1?Ge.push(Be.list2):Ge.push(Be.list3):Ge.push(Be.list1)}return ut.trailingSpaceNewLine?Ge.push("trailing-space-new-line"):ut.trailingSpace&&Ge.push("trailing-space-"+(ut.trailingSpace%2?"a":"b")),Ge.length?Ge.join(" "):null}function $e(ut,Ge){if(ut.match(Ae,!0))return et(Ge)}function gt(ut,Ge){var kt=Ge.text(ut,Ge);if(typeof kt!="undefined")return kt;if(Ge.list)return Ge.list=null,et(Ge);if(Ge.taskList){var ln=ut.match(Et,!0)[1]===" ";return ln?Ge.taskOpen=!0:Ge.taskClosed=!0,_e.highlightFormatting&&(Ge.formatting="task"),Ge.taskList=!1,et(Ge)}if(Ge.taskOpen=!1,Ge.taskClosed=!1,Ge.header&&ut.match(/^#+$/,!0))return _e.highlightFormatting&&(Ge.formatting="header"),et(Ge);var sn=ut.next();if(Ge.linkTitle){Ge.linkTitle=!1;var Bt=sn;sn==="("&&(Bt=")"),Bt=(Bt+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Gt="^\\s*(?:[^"+Bt+"\\\\]+|\\\\\\\\|\\\\.)"+Bt;if(ut.match(new RegExp(Gt),!0))return Be.linkHref}if(sn==="`"){var en=Ge.formatting;_e.highlightFormatting&&(Ge.formatting="code"),ut.eatWhile("`");var Bn=ut.current().length;if(Ge.code==0&&(!Ge.quote||Bn==1))return Ge.code=Bn,et(Ge);if(Bn==Ge.code){var rn=et(Ge);return Ge.code=0,rn}else return Ge.formatting=en,et(Ge)}else if(Ge.code)return et(Ge);if(sn==="\\"&&(ut.next(),_e.highlightFormatting)){var Cn=et(Ge),ft=Be.formatting+"-escape";return Cn?Cn+" "+ft:ft}if(sn==="!"&&ut.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Ge.imageMarker=!0,Ge.image=!0,_e.highlightFormatting&&(Ge.formatting="image"),et(Ge);if(sn==="["&&Ge.imageMarker&&ut.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Ge.imageMarker=!1,Ge.imageAltText=!0,_e.highlightFormatting&&(Ge.formatting="image"),et(Ge);if(sn==="]"&&Ge.imageAltText){_e.highlightFormatting&&(Ge.formatting="image");var Cn=et(Ge);return Ge.imageAltText=!1,Ge.image=!1,Ge.inline=Ge.f=Tt,Cn}if(sn==="["&&!Ge.image)return Ge.linkText&&ut.match(/^.*?\]/)||(Ge.linkText=!0,_e.highlightFormatting&&(Ge.formatting="link")),et(Ge);if(sn==="]"&&Ge.linkText){_e.highlightFormatting&&(Ge.formatting="link");var Cn=et(Ge);return Ge.linkText=!1,Ge.inline=Ge.f=ut.match(/\(.*?\)| ?\[.*?\]/,!1)?Tt:gt,Cn}if(sn==="<"&&ut.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Ge.f=Ge.inline=je,_e.highlightFormatting&&(Ge.formatting="link");var Cn=et(Ge);return Cn?Cn+=" ":Cn="",Cn+Be.linkInline}if(sn==="<"&&ut.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Ge.f=Ge.inline=je,_e.highlightFormatting&&(Ge.formatting="link");var Cn=et(Ge);return Cn?Cn+=" ":Cn="",Cn+Be.linkEmail}if(_e.xml&&sn==="<"&&ut.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var En=ut.string.indexOf(">",ut.pos);if(En!=-1){var Vn=ut.string.substring(ut.start,En);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Vn)&&(Ge.md_inside=!0)}return ut.backUp(1),Ge.htmlState=ce.startState(Ct),me(ut,Ge,Ie)}if(_e.xml&&sn==="<"&&ut.match(/^\/\w*?>/))return Ge.md_inside=!1,"tag";if(sn==="*"||sn==="_"){for(var Re=1,Ce=ut.pos==1?" ":ut.string.charAt(ut.pos-2);Re<3&&ut.eat(sn);)Re++;var Pe=ut.peek()||" ",Ne=!/\s/.test(Pe)&&(!he.test(Pe)||/\s/.test(Ce)||he.test(Ce)),ke=!/\s/.test(Ce)&&(!he.test(Ce)||/\s/.test(Pe)||he.test(Pe)),Se=null,nt=null;if(Re%2&&(!Ge.em&&Ne&&(sn==="*"||!ke||he.test(Ce))?Se=!0:Ge.em==sn&&ke&&(sn==="*"||!Ne||he.test(Pe))&&(Se=!1)),Re>1&&(!Ge.strong&&Ne&&(sn==="*"||!ke||he.test(Ce))?nt=!0:Ge.strong==sn&&ke&&(sn==="*"||!Ne||he.test(Pe))&&(nt=!1)),nt!=null||Se!=null){_e.highlightFormatting&&(Ge.formatting=Se==null?"strong":nt==null?"em":"strong em"),Se===!0&&(Ge.em=sn),nt===!0&&(Ge.strong=sn);var rn=et(Ge);return Se===!1&&(Ge.em=!1),nt===!1&&(Ge.strong=!1),rn}}else if(sn===" "&&(ut.eat("*")||ut.eat("_"))){if(ut.peek()===" ")return et(Ge);ut.backUp(1)}if(_e.strikethrough){if(sn==="~"&&ut.eatWhile(sn)){if(Ge.strikethrough){_e.highlightFormatting&&(Ge.formatting="strikethrough");var rn=et(Ge);return Ge.strikethrough=!1,rn}else if(ut.match(/^[^\s]/,!1))return Ge.strikethrough=!0,_e.highlightFormatting&&(Ge.formatting="strikethrough"),et(Ge)}else if(sn===" "&&ut.match(/^~~/,!0)){if(ut.peek()===" ")return et(Ge);ut.backUp(2)}}if(_e.emoji&&sn===":"&&ut.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Ge.emoji=!0,_e.highlightFormatting&&(Ge.formatting="emoji");var Pt=et(Ge);return Ge.emoji=!1,Pt}return sn===" "&&(ut.match(/^ +$/,!1)?Ge.trailingSpace++:Ge.trailingSpace&&(Ge.trailingSpaceNewLine=!0)),et(Ge)}function je(ut,Ge){var kt=ut.next();if(kt===">"){Ge.f=Ge.inline=gt,_e.highlightFormatting&&(Ge.formatting="link");var ln=et(Ge);return ln?ln+=" ":ln="",ln+Be.linkInline}return ut.match(/^[^>]+/,!0),Be.linkInline}function Tt(ut,Ge){if(ut.eatSpace())return null;var kt=ut.next();return kt==="("||kt==="["?(Ge.f=Ge.inline=bt(kt==="("?")":"]"),_e.highlightFormatting&&(Ge.formatting="link-string"),Ge.linkHref=!0,et(Ge)):"error"}var Qe={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function bt(ut){return function(Ge,kt){var ln=Ge.next();if(ln===ut){kt.f=kt.inline=gt,_e.highlightFormatting&&(kt.formatting="link-string");var sn=et(kt);return kt.linkHref=!1,sn}return Ge.match(Qe[ut]),kt.linkHref=!0,et(kt)}}function Nt(ut,Ge){return ut.match(/^([^\]\\]|\\.)*\]:/,!1)?(Ge.f=At,ut.next(),_e.highlightFormatting&&(Ge.formatting="link"),Ge.linkText=!0,et(Ge)):de(ut,Ge,gt)}function At(ut,Ge){if(ut.match(/^\]:/,!0)){Ge.f=Ge.inline=Zt,_e.highlightFormatting&&(Ge.formatting="link");var kt=et(Ge);return Ge.linkText=!1,kt}return ut.match(/^([^\]\\]|\\.)+/,!0),Be.linkText}function Zt(ut,Ge){return ut.eatSpace()?null:(ut.match(/^[^\s]+/,!0),ut.peek()===void 0?Ge.linkTitle=!0:ut.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Ge.f=Ge.inline=gt,Be.linkHref+" url")}var Yt={startState:function(){return{f:Me,prevLine:{stream:null},thisLine:{stream:null},block:Me,htmlState:null,indentation:0,inline:gt,text:$e,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(ut){return{f:ut.f,prevLine:ut.prevLine,thisLine:ut.thisLine,block:ut.block,htmlState:ut.htmlState&&ce.copyState(Ct,ut.htmlState),indentation:ut.indentation,localMode:ut.localMode,localState:ut.localMode?ce.copyState(ut.localMode,ut.localState):null,inline:ut.inline,text:ut.text,formatting:!1,linkText:ut.linkText,linkTitle:ut.linkTitle,linkHref:ut.linkHref,code:ut.code,em:ut.em,strong:ut.strong,strikethrough:ut.strikethrough,emoji:ut.emoji,header:ut.header,setext:ut.setext,hr:ut.hr,taskList:ut.taskList,list:ut.list,listStack:ut.listStack.slice(0),quote:ut.quote,indentedCode:ut.indentedCode,trailingSpace:ut.trailingSpace,trailingSpaceNewLine:ut.trailingSpaceNewLine,md_inside:ut.md_inside,fencedEndRE:ut.fencedEndRE}},token:function(ut,Ge){if(Ge.formatting=!1,ut!=Ge.thisLine.stream){if(Ge.header=0,Ge.hr=!1,ut.match(/^\s*$/,!0))return be(Ge),null;if(Ge.prevLine=Ge.thisLine,Ge.thisLine={stream:ut},Ge.taskList=!1,Ge.trailingSpace=0,Ge.trailingSpaceNewLine=!1,!Ge.localState&&(Ge.f=Ge.block,Ge.f!=Ie)){var kt=ut.match(/^\s*/,!0)[0].replace(/\t/g,se).length;if(Ge.indentation=kt,Ge.indentationDiff=null,kt>0)return null}}return Ge.f(ut,Ge)},innerMode:function(ut){return ut.block==Ie?{state:ut.htmlState,mode:Ct}:ut.localState?{state:ut.localState,mode:ut.localMode}:{state:ut,mode:Yt}},indent:function(ut,Ge,kt){return ut.block==Ie&&Ct.indent?Ct.indent(ut.htmlState,Ge,kt):ut.localState&&ut.localMode.indent?ut.localMode.indent(ut.localState,Ge,kt):ce.Pass},blankLine:be,getType:et,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Yt},"xml"),ce.defineMIME("text/markdown","markdown"),ce.defineMIME("text/x-markdown","markdown")})},98101:function(Pn,an,ve){(function(ce){ce(ve(89780))})(function(ce){"use strict";ce.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 De=0;De<ce.modeInfo.length;De++){var _e=ce.modeInfo[De];_e.mimes&&(_e.mime=_e.mimes[0])}ce.findModeByMIME=function(Ct){Ct=Ct.toLowerCase();for(var Ze=0;Ze<ce.modeInfo.length;Ze++){var Ke=ce.modeInfo[Ze];if(Ke.mime==Ct)return Ke;if(Ke.mimes){for(var Be=0;Be<Ke.mimes.length;Be++)if(Ke.mimes[Be]==Ct)return Ke}}if(/\+xml$/.test(Ct))return ce.findModeByMIME("application/xml");if(/\+json$/.test(Ct))return ce.findModeByMIME("application/json")},ce.findModeByExtension=function(Ct){Ct=Ct.toLowerCase();for(var Ze=0;Ze<ce.modeInfo.length;Ze++){var Ke=ce.modeInfo[Ze];if(Ke.ext){for(var Be=0;Be<Ke.ext.length;Be++)if(Ke.ext[Be]==Ct)return Ke}}},ce.findModeByFileName=function(Ct){for(var Ze=0;Ze<ce.modeInfo.length;Ze++){var Ke=ce.modeInfo[Ze];if(Ke.file&&Ke.file.test(Ct))return Ke}var Be=Ct.lastIndexOf("."),mt=Be>-1&&Ct.substring(Be+1,Ct.length);if(mt)return ce.findModeByExtension(mt)},ce.findModeByName=function(Ct){Ct=Ct.toLowerCase();for(var Ze=0;Ze<ce.modeInfo.length;Ze++){var Ke=ce.modeInfo[Ze];if(Ke.name.toLowerCase()==Ct)return Ke;if(Ke.alias){for(var Be=0;Be<Ke.alias.length;Be++)if(Ke.alias[Be].toLowerCase()==Ct)return Ke}}}})},67549:function(Pn,an,ve){(function(ce){ce(ve(89780))})(function(ce){"use strict";ce.defineMode("stex",function(De,_e){"use strict";function Ct(Ae,te){Ae.cmdState.push(te)}function Ze(Ae){return Ae.cmdState.length>0?Ae.cmdState[Ae.cmdState.length-1]:null}function Ke(Ae){var te=Ae.cmdState.pop();te&&te.closeBracket()}function Be(Ae){for(var te=Ae.cmdState,ee=te.length-1;ee>=0;ee--){var he=te[ee];if(he.name!="DEFAULT")return he}return{styleIdentifier:function(){return null}}}function mt(Ae,te,ee){return function(){this.name=Ae,this.bracketNo=0,this.style=te,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=mt("importmodule","tag",["string","builtin"]),ct.documentclass=mt("documentclass","tag",["","atom"]),ct.usepackage=mt("usepackage","tag",["atom"]),ct.begin=mt("begin","tag",["atom"]),ct.end=mt("end","tag",["atom"]),ct.label=mt("label","tag",["atom"]),ct.ref=mt("ref","tag",["atom"]),ct.eqref=mt("eqref","tag",["atom"]),ct.cite=mt("cite","tag",["atom"]),ct.bibitem=mt("bibitem","tag",["atom"]),ct.Bibitem=mt("Bibitem","tag",["atom"]),ct.RBibitem=mt("RBibitem","tag",["atom"]),ct.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function He(Ae,te){Ae.f=te}function Et(Ae,te){var ee;if(Ae.match(/^\\[a-zA-Z@]+/)){var he=Ae.current().slice(1);return ee=ct.hasOwnProperty(he)?ct[he]:ct.DEFAULT,ee=new ee,Ct(te,ee),He(te,dt),ee.style}if(Ae.match(/^\\[$&%#{}_]/)||Ae.match(/^\\[,;!\/\\]/))return"tag";if(Ae.match("\\["))return He(te,function(de,me){return ht(de,me,"\\]")}),"keyword";if(Ae.match("\\("))return He(te,function(de,me){return ht(de,me,"\\)")}),"keyword";if(Ae.match("$$"))return He(te,function(de,me){return ht(de,me,"$$")}),"keyword";if(Ae.match("$"))return He(te,function(de,me){return ht(de,me,"$")}),"keyword";var se=Ae.next();if(se=="%")return Ae.skipToEnd(),"comment";if(se=="}"||se=="]"){if(ee=Ze(te),ee)ee.closeBracket(se),He(te,dt);else return"error";return"bracket"}else return se=="{"||se=="["?(ee=ct.DEFAULT,ee=new ee,Ct(te,ee),"bracket"):/\d/.test(se)?(Ae.eatWhile(/[\w.%]/),"atom"):(Ae.eatWhile(/[\w\-_]/),ee=Be(te),ee.name=="begin"&&(ee.argument=Ae.current()),ee.styleIdentifier())}function ht(Ae,te,ee){if(Ae.eatSpace())return null;if(ee&&Ae.match(ee))return He(te,Et),"keyword";if(Ae.match(/^\\[a-zA-Z@]+/))return"tag";if(Ae.match(/^[a-zA-Z]+/))return"variable-2";if(Ae.match(/^\\[$&%#{}_]/)||Ae.match(/^\\[,;!\/]/)||Ae.match(/^[\^_&]/))return"tag";if(Ae.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Ae.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var he=Ae.next();return he=="{"||he=="}"||he=="["||he=="]"||he=="("||he==")"?"bracket":he=="%"?(Ae.skipToEnd(),"comment"):"error"}function dt(Ae,te){var ee=Ae.peek(),he;return ee=="{"||ee=="["?(he=Ze(te),he.openBracket(ee),Ae.eat(ee),He(te,Et),"bracket"):/[ \t\r]/.test(ee)?(Ae.eat(ee),null):(He(te,Et),Ke(te),Et(Ae,te))}return{startState:function(){var Ae=_e.inMathMode?function(te,ee){return ht(te,ee)}:Et;return{cmdState:[],f:Ae}},copyState:function(Ae){return{cmdState:Ae.cmdState.slice(),f:Ae.f}},token:function(Ae,te){return te.f(Ae,te)},blankLine:function(Ae){Ae.f=Et,Ae.cmdState.length=0},lineComment:"%"}}),ce.defineMIME("text/x-stex","stex"),ce.defineMIME("text/x-latex","stex")})},15525:function(Pn,an,ve){(function(ce){ce(ve(89780))})(function(ce){"use strict";var De={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},_e={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ce.defineMode("xml",function(Ct,Ze){var Ke=Ct.indentUnit,Be={},mt=Ze.htmlMode?De:_e;for(var ct in mt)Be[ct]=mt[ct];for(var ct in Ze)Be[ct]=Ze[ct];var He,Et;function ht(je,Tt){function Qe(At){return Tt.tokenize=At,At(je,Tt)}var bt=je.next();if(bt=="<")return je.eat("!")?je.eat("[")?je.match("CDATA[")?Qe(te("atom","]]>")):null:je.match("--")?Qe(te("comment","-->")):je.match("DOCTYPE",!0,!0)?(je.eatWhile(/[\w\._\-]/),Qe(ee(1))):null:je.eat("?")?(je.eatWhile(/[\w\._\-]/),Tt.tokenize=te("meta","?>"),"meta"):(He=je.eat("/")?"closeTag":"openTag",Tt.tokenize=dt,"tag bracket");if(bt=="&"){var Nt;return je.eat("#")?je.eat("x")?Nt=je.eatWhile(/[a-fA-F\d]/)&&je.eat(";"):Nt=je.eatWhile(/[\d]/)&&je.eat(";"):Nt=je.eatWhile(/[\w\.\-:]/)&&je.eat(";"),Nt?"atom":"error"}else return je.eatWhile(/[^&<]/),null}ht.isInText=!0;function dt(je,Tt){var Qe=je.next();if(Qe==">"||Qe=="/"&&je.eat(">"))return Tt.tokenize=ht,He=Qe==">"?"endTag":"selfcloseTag","tag bracket";if(Qe=="=")return He="equals",null;if(Qe=="<"){Tt.tokenize=ht,Tt.state=me,Tt.tagName=Tt.tagStart=null;var bt=Tt.tokenize(je,Tt);return bt?bt+" tag error":"tag error"}else return/[\'\"]/.test(Qe)?(Tt.tokenize=Ae(Qe),Tt.stringStartCol=je.column(),Tt.tokenize(je,Tt)):(je.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Ae(je){var Tt=function(Qe,bt){for(;!Qe.eol();)if(Qe.next()==je){bt.tokenize=dt;break}return"string"};return Tt.isInAttribute=!0,Tt}function te(je,Tt){return function(Qe,bt){for(;!Qe.eol();){if(Qe.match(Tt)){bt.tokenize=ht;break}Qe.next()}return je}}function ee(je){return function(Tt,Qe){for(var bt;(bt=Tt.next())!=null;){if(bt=="<")return Qe.tokenize=ee(je+1),Qe.tokenize(Tt,Qe);if(bt==">")if(je==1){Qe.tokenize=ht;break}else return Qe.tokenize=ee(je-1),Qe.tokenize(Tt,Qe)}return"meta"}}function he(je,Tt,Qe){this.prev=je.context,this.tagName=Tt,this.indent=je.indented,this.startOfLine=Qe,(Be.doNotIndent.hasOwnProperty(Tt)||je.context&&je.context.noIndent)&&(this.noIndent=!0)}function se(je){je.context&&(je.context=je.context.prev)}function de(je,Tt){for(var Qe;;){if(!je.context||(Qe=je.context.tagName,!Be.contextGrabbers.hasOwnProperty(Qe)||!Be.contextGrabbers[Qe].hasOwnProperty(Tt)))return;se(je)}}function me(je,Tt,Qe){return je=="openTag"?(Qe.tagStart=Tt.column(),we):je=="closeTag"?be:me}function we(je,Tt,Qe){return je=="word"?(Qe.tagName=Tt.current(),Et="tag",ze):Be.allowMissingTagName&&je=="endTag"?(Et="tag bracket",ze(je,Tt,Qe)):(Et="error",we)}function be(je,Tt,Qe){if(je=="word"){var bt=Tt.current();return Qe.context&&Qe.context.tagName!=bt&&Be.implicitlyClosed.hasOwnProperty(Qe.context.tagName)&&se(Qe),Qe.context&&Qe.context.tagName==bt||Be.matchClosing===!1?(Et="tag",Me):(Et="tag error",Ie)}else return Be.allowMissingTagName&&je=="endTag"?(Et="tag bracket",Me(je,Tt,Qe)):(Et="error",Ie)}function Me(je,Tt,Qe){return je!="endTag"?(Et="error",Me):(se(Qe),me)}function Ie(je,Tt,Qe){return Et="error",Me(je,Tt,Qe)}function ze(je,Tt,Qe){if(je=="word")return Et="attribute",et;if(je=="endTag"||je=="selfcloseTag"){var bt=Qe.tagName,Nt=Qe.tagStart;return Qe.tagName=Qe.tagStart=null,je=="selfcloseTag"||Be.autoSelfClosers.hasOwnProperty(bt)?de(Qe,bt):(de(Qe,bt),Qe.context=new he(Qe,bt,Nt==Qe.indented)),me}return Et="error",ze}function et(je,Tt,Qe){return je=="equals"?$e:(Be.allowMissing||(Et="error"),ze(je,Tt,Qe))}function $e(je,Tt,Qe){return je=="string"?gt:je=="word"&&Be.allowUnquoted?(Et="string",ze):(Et="error",ze(je,Tt,Qe))}function gt(je,Tt,Qe){return je=="string"?gt:ze(je,Tt,Qe)}return{startState:function(je){var Tt={tokenize:ht,state:me,indented:je||0,tagName:null,tagStart:null,context:null};return je!=null&&(Tt.baseIndent=je),Tt},token:function(je,Tt){if(!Tt.tagName&&je.sol()&&(Tt.indented=je.indentation()),je.eatSpace())return null;He=null;var Qe=Tt.tokenize(je,Tt);return(Qe||He)&&Qe!="comment"&&(Et=null,Tt.state=Tt.state(He||Qe,je,Tt),Et&&(Qe=Et=="error"?Qe+" error":Et)),Qe},indent:function(je,Tt,Qe){var bt=je.context;if(je.tokenize.isInAttribute)return je.tagStart==je.indented?je.stringStartCol+1:je.indented+Ke;if(bt&&bt.noIndent)return ce.Pass;if(je.tokenize!=dt&&je.tokenize!=ht)return Qe?Qe.match(/^(\s*)/)[0].length:0;if(je.tagName)return Be.multilineTagIndentPastTag!==!1?je.tagStart+je.tagName.length+2:je.tagStart+Ke*(Be.multilineTagIndentFactor||1);if(Be.alignCDATA&&/<!\[CDATA\[/.test(Tt))return 0;var Nt=Tt&&/^<(\/)?([\w_:\.-]*)/.exec(Tt);if(Nt&&Nt[1])for(;bt;)if(bt.tagName==Nt[2]){bt=bt.prev;break}else if(Be.implicitlyClosed.hasOwnProperty(bt.tagName))bt=bt.prev;else break;else if(Nt)for(;bt;){var At=Be.contextGrabbers[bt.tagName];if(At&&At.hasOwnProperty(Nt[2]))bt=bt.prev;else break}for(;bt&&bt.prev&&!bt.startOfLine;)bt=bt.prev;return bt?bt.indent+Ke:je.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Be.htmlMode?"html":"xml",helperType:Be.htmlMode?"html":"xml",skipAttribute:function(je){je.state==$e&&(je.state=ze)},xmlCurrentTag:function(je){return je.tagName?{name:je.tagName,close:je.type=="closeTag"}:null},xmlCurrentContext:function(je){for(var Tt=[],Qe=je.context;Qe;Qe=Qe.prev)Qe.tagName&&Tt.push(Qe.tagName);return Tt.reverse()}}}),ce.defineMIME("text/xml","xml"),ce.defineMIME("application/xml","xml"),ce.mimeModes.hasOwnProperty("text/html")||ce.defineMIME("text/html",{name:"xml",htmlMode:!0})})},12378:function(Pn,an,ve){"use strict";ve.d(an,{$u:function(){return ct},BD:function(){return Re},E9:function(){return mt},FF:function(){return ti},FJ:function(){return me},Hn:function(){return de},KX:function(){return be},NB:function(){return St},S0:function(){return ft},UL:function(){return He},Vk:function(){return se},Vm:function(){return lt},YI:function(){return En},ZA:function(){return _e},Zt:function(){return Et},al:function(){return Se},bn:function(){return ke},bx:function(){return Ce},g2:function(){return Vn},h1:function(){return $e},hD:function(){return Rn},l4:function(){return Ke},rU:function(){return vt},s_:function(){return Pe},uz:function(){return Ue},z6:function(){return ht}}),Pn=ve.hmd(Pn),function(){var Le;function si(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Hi(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:si(a)}}function hn(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var ni=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},vi;if(typeof Object.setPrototypeOf=="function")vi=Object.setPrototypeOf;else{var Fi;e:{var _n={a:!0},Dn={};try{Dn.__proto__=_n,Fi=Dn.a;break e}catch(a){}Fi=!1}vi=Fi?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var Ft=vi;function Ot(a,y){if(a.prototype=ni(y.prototype),a.prototype.constructor=a,Ft)Ft(a,y);else for(var x in y)if(x!="prototype")if(Object.defineProperties){var E=Object.getOwnPropertyDescriptor(y,x);E&&Object.defineProperty(a,x,E)}else a[x]=y[x];a.QA=y.prototype}var Ve=typeof ve.g!="undefined"&&ve.g!=null?ve.g:self,Ut=typeof Object.assign=="function"?Object.assign:function(a,y){for(var x=1;x<arguments.length;x++){var E=arguments[x];if(E)for(var b in E)Object.prototype.hasOwnProperty.call(E,b)&&(a[b]=E[b])}return a},tn=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function xt(a,y){if(y){var x=Ve;a=a.split(".");for(var E=0;E<a.length-1;E++){var b=a[E];b in x||(x[b]={}),x=x[b]}a=a[a.length-1],E=x[a],y=y(E),y!=E&&y!=null&&tn(x,a,{writable:!0,value:y})}}xt("Object.assign",function(a){return a||Ut}),xt("Array.prototype.fill",function(a){return a||function(y,x,E){var b=this.length||0;for(0>x&&(x=Math.max(0,b+x)),(E==null||E>b)&&(E=b),E=Number(E),0>E&&(E=Math.max(0,b+E)),x=Number(x||0);x<E;x++)this[x]=y;return this}});var rt=typeof globalThis=="object"&&globalThis||typeof ve.g=="object"&&ve.g.global===ve.g&&ve.g||typeof self=="object"&&self.self===self&&self||{};rt.requestAnimationFrame===void 0&&(rt.setImmediate===void 0?rt.requestAnimationFrame=function(a){rt.setTimeout(a,0)}:rt.requestAnimationFrame=rt.setImmediate);function Vt(){}function on(a,y){var x=-1;return function(){var E=this,b=arguments;x!==-1&&rt.clearTimeout(x),x=xn(function(){x=-1,a.apply(E,b)},y)}}function xn(a,y){return rt.setTimeout(a,y)}function An(a){return rt.document.createElement(a)}function yt(a){throw Error(a)}function cn(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),yt(a)}function On(a,y,x,E){x=x===null?"*":typeof x=="string"?x:typeof x=="function"&&typeof x.className=="string"?x.className:"",E!==void 0&&(x+="."+E),yt(x+" is not in the range "+y+": "+a)}function ri(a){rt.console&&rt.console.log(a)}function Wt(a){return typeof a=="object"&&a!==null}function Jt(a){return Array.isArray(a)||rt.NodeList&&a instanceof rt.NodeList||rt.HTMLCollection&&a instanceof rt.HTMLCollection}function hi(a){return Array.prototype.slice.call(a)}function ci(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):yt("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function ui(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):yt("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function qn(){var a=ir.pop();return a===void 0?[]:a}function di(a){a.length=0,ir.push(a)}function li(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(Wt(a)&&a.constructor)return li(a.constructor);return typeof a}function Ai(a){var y=a;return Wt(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 er(a,y){if(a.hasOwnProperty(y))return!0;for(a=Object.getPrototypeOf(a);a&&a!==Function;){if(a.hasOwnProperty(y))return!0;var x=a.CA;if(x&&x[y])return!0;a=Object.getPrototypeOf(a)}return!1}function sr(a,y,x){Object.defineProperty(Vr.prototype,a,{get:y,set:x})}function vn(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 E=0,b=0;b<a.length;b+=2)x[E++]=y[a.substr(b,2)];for(a=x.join(""),a=a===""?"0":a,y=[],x=0;256>x;x++)y[x]=x;for(x=E=0;256>x;x++)E=(E+y[x]+119)%256,b=y[x],y[x]=y[E],y[E]=b;E=x=0;for(var z="",ne=0;ne<a.length;ne++)x=(x+1)%256,E=(E+y[x])%256,b=y[x],y[x]=y[E],y[E]=b,z+=String.fromCharCode(a.charCodeAt(ne)^y[(y[x]+y[E])%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 Nr=rt.navigator!==void 0&&0<rt.navigator.userAgent.indexOf("Trident/7"),Dr=rt.navigator!==void 0&&rt.navigator.platform!==void 0&&rt.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,ir=[];Object.freeze([]),Vt.className="Util",Vt.Dx="32ab5ff3b26f42dc0ed90f21472913b5",Vt.adym="gojs.net",Vt.vfo="28e645fdb266",Vt.className="Util";function fn(a,y,x){Zr(this),this.j=a,this.xa=y,this.o=x}fn.prototype.toString=function(){return"EnumValue."+this.xa};function jn(a,y){return y==null||y===""?null:a[y]}Ve.Object.defineProperties(fn.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),fn.className="EnumValue";function Ei(){this.ew=[]}Ei.prototype.toString=function(){return this.ew.join("")},Ei.prototype.add=function(a){a!==""&&this.ew.push(a)},Ei.className="StringBuilder";function zi(){}zi.className="PropertyCollection";var Ni={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){rt.console&&rt.console.log(a)},HA:function(a,y,x,E){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(E.left,E.top+20),a.lineTo(E.left,E.top),a.lineTo(E.left+20,E.top),a.moveTo(E.right,E.bottom-20),a.lineTo(E.right,E.bottom),a.lineTo(E.right-20,E.bottom),a.stroke(),a.fillText("DB: "+Math.round(E.x)+", "+Math.round(E.y)+", "+Math.round(E.width)+", "+Math.round(E.height),E.left,E.top-5)},DA:function(a){var y={},x;for(x in a){if(y.x=x,y.x!=="licenseKey"){var E=a[y.x];if(E.prototype!==void 0){y.Zl=Object.getOwnPropertyNames(E.prototype);for(var b={Tj:0};b.Tj<y.Zl.length;b={Tj:b.Tj},b.Tj++){var z=Object.getOwnPropertyDescriptor(E.prototype,y.Zl[b.Tj]);z.get!==void 0&&z.set===void 0&&Object.defineProperty(E.prototype,y.Zl[b.Tj],{set:function(ne,re){return function(){throw Error("Property "+ne.Zl[re.Tj]+" of "+ne.x+" is read-only.")}}(y,b)})}}}y={Zl:y.Zl,x:y.x}}}};function Gi(){}Gi.prototype.reset=function(){},Gi.prototype.next=function(){return!1},Gi.prototype.Ad=function(){return!1},Gi.prototype.first=function(){return null},Gi.prototype.any=function(){return!1},Gi.prototype.all=function(){return!0},Gi.prototype.each=function(){return this},Gi.prototype.map=function(){return this},Gi.prototype.filter=function(){return this},Gi.prototype.de=function(){},Gi.prototype.toString=function(){return"EmptyIterator"},Ve.Object.defineProperties(Gi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Gi.prototype.first=Gi.prototype.first,Gi.prototype.hasNext=Gi.prototype.Ad,Gi.prototype.next=Gi.prototype.next,Gi.prototype.reset=Gi.prototype.reset;var ur=null;Gi.className="EmptyIterator",ur=new Gi;function Qi(a){this.key=-1,this.value=a}Qi.prototype.reset=function(){this.key=-1},Qi.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},Qi.prototype.Ad=function(){return this.next()},Qi.prototype.first=function(){return this.key=0,this.value},Qi.prototype.any=function(a){return this.key=-1,a(this.value)},Qi.prototype.all=function(a){return this.key=-1,a(this.value)},Qi.prototype.each=function(a){return this.key=-1,a(this.value),this},Qi.prototype.map=function(a){return new Qi(a(this.value))},Qi.prototype.filter=function(a){return a(this.value)?new Qi(this.value):ur},Qi.prototype.de=function(){this.value=null},Qi.prototype.toString=function(){return"SingletonIterator("+this.value+")"},Ve.Object.defineProperties(Qi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),Qi.prototype.first=Qi.prototype.first,Qi.prototype.hasNext=Qi.prototype.Ad,Qi.prototype.next=Qi.prototype.next,Qi.prototype.reset=Qi.prototype.reset,Qi.className="SingletonIterator";function rr(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}rr.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},rr.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,E=this.qf;if(E!==null)for(;x<y;){var b=a[x];if(E(b))return this.key=this.Za=x,this.value=b,!0;x++}else{if(x<y)return this.key=x,this.value=a[x],!0;this.de()}return!1},rr.prototype.Ad=function(){return this.next()},rr.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 E=0;E<y;){var b=a[E];if(x(b))return this.key=this.Za=E,this.value=b;E++}return null}return 0<y?(a=a[0],this.key=0,this.value=a):null},rr.prototype.any=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];if((E===null||E(z))&&a(z))return!0}return!1},rr.prototype.all=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];if((E===null||E(z))&&!a(z))return!1}return!0},rr.prototype.each=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];(E===null||E(z))&&a(z)}return this},rr.prototype.map=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var E=y.length,b=this.qf,z=0;z<E;z++){var ne=y[z];(b===null||b(ne))&&x.push(a(ne))}return a=new Nn,a.s=x,a.xb(),a.iterator},rr.prototype.filter=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var E=y.length,b=this.qf,z=0;z<E;z++){var ne=y[z];(b===null||b(ne))&&a(ne)&&x.push(ne)}return a=new Nn,a.s=x,a.xb(),a.iterator},rr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},rr.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},Ve.Object.defineProperties(rr.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,E=x.length,b=0;b<E;b++)a(x[b])&&y++;return y}return this.Bb.s.length}}}),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="ListIterator";function fr(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}fr.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},fr.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)},fr.prototype.Ad=function(){return this.next()},fr.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},fr.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},fr.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},fr.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},fr.prototype.map=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var E=y.length;for(this.Za=E,--E;0<=E;E--)x.push(a(y[E]));return a=new Nn,a.s=x,a.xb(),a.iterator},fr.prototype.filter=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var E=y.length;for(this.Za=E,--E;0<=E;E--){var b=y[E];a(b)&&x.push(b)}return a=new Nn,a.s=x,a.xb(),a.iterator},fr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},fr.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},Ve.Object.defineProperties(fr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),fr.prototype.first=fr.prototype.first,fr.prototype.hasNext=fr.prototype.Ad,fr.prototype.next=fr.prototype.next,fr.prototype.reset=fr.prototype.reset,fr.className="ListIteratorBackwards";function Nn(a){Zr(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&yt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Le=Nn.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()#"+Bi(this)},Le.add=function(a){return a===null?this:(this._isFrozen&&cn(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&&cn(this);var y=this.s;if(Jt(a))for(var x=a.length,E=0;E<x;E++)y.push(a[E]);else for(a=a.iterator;a.next();)y.push(a.value);return this.xb(),this},Le.clear=function(){this._isFrozen&&cn(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)&&On(a,"0 <= i < length",Nn,"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)&&On(a,"0 <= i < length",Nn,"setElt:i"),this._isFrozen&&cn(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&&cn(this);var a=this.s;return 0<a.length?a.pop():null},Nn.prototype.any=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)if(a(y[E]))return!0;return!1},Nn.prototype.all=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)if(!a(y[E]))return!1;return!0},Nn.prototype.each=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)a(y[E]);return this},Nn.prototype.map=function(a){for(var y=new Nn,x=[],E=this.s,b=E.length,z=0;z<b;z++)x.push(a(E[z]));return y.s=x,y.xb(),y},Nn.prototype.filter=function(a){for(var y=new Nn,x=[],E=this.s,b=E.length,z=0;z<b;z++){var ne=E[z];a(ne)&&x.push(ne)}return y.s=x,y.xb(),y},Le=Nn.prototype,Le.Gb=function(a,y){0>a&&On(a,">= 0",Nn,"insertAt:i"),this._isFrozen&&cn(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&&cn(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)&&On(a,"0 <= i < length",Nn,"removeAt:i"),this._isFrozen&&cn(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},Le.removeRange=function(a,y){var x=this.s,E=x.length;if(0>a)a=0;else if(a>=E)return this;if(0>y)return this;if(y>=E&&(y=E-1),a>y)return this;this._isFrozen&&cn(this);for(var b=a,z=y+1;z<E;)x[b++]=x[z++];return x.length=E-(y-a+1),this.xb(),this},Nn.prototype.copy=function(){var a=new Nn,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},Le=Nn.prototype,Le.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),E=0;E<y;E++)x[E]=a[E];return x},Le.Iv=function(){for(var a=new Ln,y=this.s,x=this.count,E=0;E<x;E++)a.add(y[E]);return a},Le.sort=function(a){return this._isFrozen&&cn(this),this.s.sort(a),this.xb(),this},Le.zi=function(a,y,x){var E=this.s,b=E.length;y===void 0&&(y=0),x===void 0&&(x=b),this._isFrozen&&cn(this);var z=x-y;if(1>=z)return this;if((0>y||y>=b-1)&&On(y,"0 <= from < length",Nn,"sortRange:from"),z===2)return x=E[y],b=E[y+1],0<a(x,b)&&(E[y]=b,E[y+1]=x,this.xb()),this;if(y===0)if(x>=b)E.sort(a);else for(y=E.slice(0,x),y.sort(a),a=0;a<x;a++)E[a]=y[a];else if(x>=b)for(x=E.slice(y),x.sort(a),a=y;a<b;a++)E[a]=x[a-y];else for(b=E.slice(y,x),b.sort(a),a=y;a<x;a++)E[a]=b[a-y];return this.xb(),this},Le.reverse=function(){return this._isFrozen&&cn(this),this.s.reverse(),this.xb(),this},Ve.Object.defineProperties(Nn.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 ur;var a=this.Sa;return a!==null?(a.reset(),a):new rr(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return ur;var a=this.Hg;return a!==null?(a.reset(),a):new fr(this)}}}),Nn.prototype.reverse=Nn.prototype.reverse,Nn.prototype.sortRange=Nn.prototype.zi,Nn.prototype.sort=Nn.prototype.sort,Nn.prototype.toSet=Nn.prototype.Iv,Nn.prototype.toArray=Nn.prototype.Fa,Nn.prototype.removeRange=Nn.prototype.removeRange,Nn.prototype.removeAt=Nn.prototype.mb,Nn.prototype.delete=Nn.prototype.delete,Nn.prototype.remove=Nn.prototype.remove,Nn.prototype.insertAt=Nn.prototype.Gb,Nn.prototype.pop=Nn.prototype.pop,Nn.prototype.last=Nn.prototype.jc,Nn.prototype.first=Nn.prototype.first,Nn.prototype.set=Nn.prototype.set,Nn.prototype.setElt=Nn.prototype.cd,Nn.prototype.get=Nn.prototype.get,Nn.prototype.elt=Nn.prototype.M,Nn.prototype.indexOf=Nn.prototype.indexOf,Nn.prototype.has=Nn.prototype.has,Nn.prototype.contains=Nn.prototype.contains,Nn.prototype.clear=Nn.prototype.clear,Nn.prototype.addAll=Nn.prototype.addAll,Nn.prototype.push=Nn.prototype.push,Nn.prototype.add=Nn.prototype.add,Nn.prototype.thaw=Nn.prototype.ka,Nn.prototype.freeze=Nn.prototype.freeze,Nn.className="List";function Jr(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Jr.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Jr.prototype.next=function(){var a=this.eg;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=y.value,this.key=y.key,!0):(this.de(),!1)},Jr.prototype.Ad=function(){return this.next()},Jr.prototype.first=function(){var a=this.eg;if(this.qa=a.Ja,a=a.ea,a!==null){this.sa=a;var y=a.value;return this.key=a.key,this.value=y}return null},Jr.prototype.any=function(a){var y=this.eg;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Jr.prototype.all=function(a){var y=this.eg;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Jr.prototype.each=function(a){var y=this.eg;for(this.sa=y.Sa=null,y=y.ea;y!==null;)a(y.value),y=y.va;return this},Jr.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new Nn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Jr.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new Nn;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},Jr.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Jr.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},Ve.Object.defineProperties(Jr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Jr.prototype.first=Jr.prototype.first,Jr.prototype.hasNext=Jr.prototype.Ad,Jr.prototype.next=Jr.prototype.next,Jr.prototype.reset=Jr.prototype.reset,Jr.className="SetIterator";function Ln(a){Zr(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&yt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Le=Ln.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()#"+Bi(this)},Le.add=function(a){if(a===null)return this;this._isFrozen&&cn(this,a);var y=a;return Wt(a)&&(y=co(a)),this.Tb[y]===void 0&&(this.Sb++,a=new Hr(a,a),this.Tb[y]=a,y=this.kf,y===null?this.ea=a:(a.ll=y,y.va=a),this.kf=a,this.xb()),this},Le.addAll=function(a){if(a===null)return this;if(this._isFrozen&&cn(this),Jt(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 Wt(a)&&(y=Bi(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},Ln.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Ln.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Ln.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},Ln.prototype.map=function(a){for(var y=new Ln,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},Ln.prototype.filter=function(a){for(var y=new Ln,x=this.ea;x!==null;){var E=x.value;a(E)&&y.add(E),x=x.va}return y},Le=Ln.prototype,Le.remove=function(a){if(a===null)return!1;this._isFrozen&&cn(this,a);var y=a;if(Wt(a)&&(y=Bi(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,E=a.ll;return x!==null&&(x.ll=E),E!==null&&(E.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=E),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&&cn(this),Jt(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&&cn(this);var y=new Ln;y.addAll(a),a=[];for(var x=this.iterator;x.next();){var E=x.value;y.contains(E)||a.push(E)}return this.hp(a),this},Le.clear=function(){this._isFrozen&&cn(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},Ln.prototype.copy=function(){var a=new Ln,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},Ln.prototype.Fa=function(){var a=Array(this.Sb),y=this.Tb,x=0,E;for(E in y)a[x]=y[E].value,x++;return a},Ln.prototype.Hv=function(){var a=new Nn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function Zr(a){a.__gohashid=Po++}function co(a){var y=a.__gohashid;return y===void 0&&(y=Po++,a.__gohashid=y),y}function Bi(a){return a.__gohashid}Ve.Object.defineProperties(Ln.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return ur;var a=this.Sa;return a!==null?(a.reset(),a):new Jr(this)}}}),Ln.prototype.toList=Ln.prototype.Hv,Ln.prototype.toArray=Ln.prototype.Fa,Ln.prototype.clear=Ln.prototype.clear,Ln.prototype.retainAll=Ln.prototype.pA,Ln.prototype.removeAll=Ln.prototype.hp,Ln.prototype.delete=Ln.prototype.delete,Ln.prototype.remove=Ln.prototype.remove,Ln.prototype.first=Ln.prototype.first,Ln.prototype.containsAny=Ln.prototype.Ty,Ln.prototype.containsAll=Ln.prototype.Sy,Ln.prototype.has=Ln.prototype.has,Ln.prototype.contains=Ln.prototype.contains,Ln.prototype.addAll=Ln.prototype.addAll,Ln.prototype.add=Ln.prototype.add,Ln.prototype.thaw=Ln.prototype.ka,Ln.prototype.freeze=Ln.prototype.freeze;var Po=1;Ln.className="Set",Ln.uniqueHash=Zr,Ln.hashIdUnique=co,Ln.hashId=Bi;function ao(a){this.ma=a,this.qa=a.Ja,this.sa=null}ao.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},ao.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)},ao.prototype.Ad=function(){return this.next()},ao.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},ao.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},ao.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},ao.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},ao.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new Nn;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},ao.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new Nn;for(y=y.ea;y!==null;){var E=y.key;a(E)&&x.add(E),y=y.va}return x.iterator},ao.prototype.de=function(){this.value=this.key=null,this.qa=-1},ao.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},Ve.Object.defineProperties(ao.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),ao.prototype.first=ao.prototype.first,ao.prototype.hasNext=ao.prototype.Ad,ao.prototype.next=ao.prototype.next,ao.prototype.reset=ao.prototype.reset,ao.className="MapKeySetIterator";function Vi(a){Ln.call(this),Zr(this),this._isFrozen=!0,this.ma=a}Ot(Vi,Ln),Le=Vi.prototype,Le.freeze=function(){return this},Le.ka=function(){return this},Le.toString=function(){return"MapKeySet("+this.ma.toString()+")"},Le.add=function(){yt("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(){yt("This Set is read-only: "+this.toString())},Le.delete=function(a){return this.remove(a)},Le.clear=function(){yt("This Set is read-only: "+this.toString())},Le.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Vi.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Vi.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Vi.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Vi.prototype.map=function(a){for(var y=new Ln,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Vi.prototype.filter=function(a){for(var y=new Ln,x=this.ma.ea;x!==null;){var E=x.key;a(E)&&y.add(E),x=x.va}return y},Vi.prototype.copy=function(){return new Vi(this.ma)},Vi.prototype.Iv=function(){var a=new Ln,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Vi.prototype.Fa=function(){var a=this.ma.Tb,y=Array(this.ma.Sb),x=0,E;for(E in a)y[x]=a[E].key,x++;return y},Vi.prototype.Hv=function(){var a=new Nn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Ve.Object.defineProperties(Vi.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?ur:new ao(this.ma)}}}),Vi.prototype.toList=Vi.prototype.Hv,Vi.prototype.toArray=Vi.prototype.Fa,Vi.prototype.toSet=Vi.prototype.Iv,Vi.prototype.first=Vi.prototype.first,Vi.prototype.clear=Vi.prototype.clear,Vi.prototype.delete=Vi.prototype.delete,Vi.prototype.remove=Vi.prototype.remove,Vi.prototype.has=Vi.prototype.has,Vi.prototype.contains=Vi.prototype.contains,Vi.prototype.add=Vi.prototype.add,Vi.prototype.thaw=Vi.prototype.ka,Vi.prototype.freeze=Vi.prototype.freeze,Vi.className="MapKeySet";function qi(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}qi.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},qi.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)},qi.prototype.Ad=function(){return this.next()},qi.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},qi.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},qi.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},qi.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},qi.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Nn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},qi.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Nn;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},qi.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},qi.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},Ve.Object.defineProperties(qi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),qi.prototype.first=qi.prototype.first,qi.prototype.hasNext=qi.prototype.Ad,qi.prototype.next=qi.prototype.next,qi.prototype.reset=qi.prototype.reset,qi.className="MapValueSetIterator";function Hr(a,y){this.key=a,this.value=y,this.ll=this.va=null}Hr.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},Hr.className="KeyValuePair";function ro(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}ro.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},ro.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.key=y.key,this.value=y.value,!0):(this.de(),!1)},ro.prototype.Ad=function(){return this.next()},ro.prototype.first=function(){var a=this.ma;return this.qa=a.Ja,a=a.ea,a!==null?(this.sa=a,this.key=a.key,this.value=a.value,a):null},ro.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},ro.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},ro.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},ro.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Nn;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},ro.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Nn;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},ro.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},ro.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},Ve.Object.defineProperties(ro.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),ro.prototype.first=ro.prototype.first,ro.prototype.hasNext=ro.prototype.Ad,ro.prototype.next=ro.prototype.next,ro.prototype.reset=ro.prototype.reset,ro.className="MapIterator";function xi(a){Zr(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.jf=this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&yt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Le=xi.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()#"+Bi(this)},Le.add=function(a,y){this._isFrozen&&cn(this,a);var x=a;Wt(a)&&(x=co(a));var E=this.Tb[x];return E===void 0?(this.Sb++,a=new Hr(a,y),this.Tb[x]=a,x=this.kf,x===null?this.ea=a:(a.ll=x,x.va=a),this.kf=a,this.xb()):E.value=y,this},Le.set=function(a,y){return this.add(a,y)},Le.addAll=function(a){if(a===null)return this;if(Jt(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];this.add(E.key,E.value)}else if(a instanceof xi)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},xi.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},xi.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},xi.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},xi.prototype.map=function(a){for(var y=new xi,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},xi.prototype.filter=function(a){for(var y=new xi,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},Le=xi.prototype,Le.contains=function(a){var y=a;return Wt(a)&&(y=Bi(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 Wt(a)&&(y=Bi(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&&cn(this,a);var y=a;if(Wt(a)&&(y=Bi(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,E=a.ll;return x!==null&&(x.ll=E),E!==null&&(E.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=E),delete this.Tb[y],this.Sb--,this.xb(),!0},Le.delete=function(a){return this.remove(a)},Le.clear=function(){this._isFrozen&&cn(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()},xi.prototype.copy=function(){var a=new xi,y=this.Tb,x;for(x in y){var E=y[x];a.add(E.key,E.value)}return a},xi.prototype.Fa=function(){var a=this.Tb,y=Array(this.Sb),x=0,E;for(E in a){var b=a[E];y[x]=new Hr(b.key,b.value),x++}return y},xi.prototype.Lf=function(){return new Vi(this)},Ve.Object.defineProperties(xi.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return ur;var a=this.Sa;return a!==null?(a.reset(),a):new ro(this)}},iteratorKeys:{get:function(){return 0>=this.count?ur:new ao(this)}},iteratorValues:{get:function(){if(0>=this.count)return ur;var a=this.jf;return a!==null?(a.reset(),a):new qi(this)}}}),xi.prototype.toKeySet=xi.prototype.Lf,xi.prototype.toArray=xi.prototype.Fa,xi.prototype.clear=xi.prototype.clear,xi.prototype.delete=xi.prototype.delete,xi.prototype.remove=xi.prototype.remove,xi.prototype.get=xi.prototype.get,xi.prototype.getValue=xi.prototype.I,xi.prototype.has=xi.prototype.has,xi.prototype.contains=xi.prototype.contains,xi.prototype.first=xi.prototype.first,xi.prototype.addAll=xi.prototype.addAll,xi.prototype.set=xi.prototype.set,xi.prototype.add=xi.prototype.add,xi.prototype.thaw=xi.prototype.ka,xi.prototype.freeze=xi.prototype.freeze,xi.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):yt("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var uo,Zo,ga,Pa,ia;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)&&yt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Or(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;return(E=a[y++])&&(b=parseFloat(E)),new tt(x,b)}return new tt}function kr(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 it.B(this.x,a.x)&&it.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 E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));return this.x=a*y-E*x,this.y=E*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 fo(a.x-this.x,a.y-this.y)},Le.direction=function(a,y){return fo(a-this.x,y-this.y)};function fo(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 it.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},Le.fA=function(a,y,x,E){return it.qh(a,y,x,E,this.x,this.y,this),this},Le.gA=function(a,y){return it.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},Le.uA=function(a,y,x,E){return it.No(this.x,this.y,a,y,x,E,this),this},Le.vA=function(a,y){return it.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,E,b){return this.x=a+b.x*x+b.offsetX,this.y=y+b.y*E+b.offsetY,this},Le.transform=function(a){return a.Ga(this),this};function jr(a,y){return y.Cd(a),a}function To(a,y,x,E,b,z){var ne=b-x,re=z-E,oe=ne*ne+re*re;x-=a,E-=y;var le=-x*ne-E*re;return 0>=le||le>=oe?(ne=b-a,re=z-y,Math.min(x*x+E*E,ne*ne+re*re)):(a=ne*E-re*x,a*a/oe)}function qa(a,y,x,E){return a=x-a,y=E-y,a*a+y*y}function Mr(a,y,x,E){return a=x-a,y=E-y,a===0?0<y?90:0>y?270:0:y===0?0<a?0:180:isNaN(a)||isNaN(y)?0:(E=180*Math.atan(Math.abs(y/a))/Math.PI,0>a?E=0>y?E+180:180-E:0>y&&(E=360-E),E)}Le.w=function(){return isFinite(this.x)&&isFinite(this.y)},tt.alloc=function(){var a=hr.pop();return a===void 0?new tt:a},tt.allocAt=function(a,y){var x=hr.pop();return x===void 0?new tt(a,y):(x.x=a,x.y=y,x)},tt.free=function(a){hr.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,E,b,z,ne,re){return it.Rl(a,y,x,E,b,z,ne,re)},tt.prototype.compareWithLineSegmentPoint=tt.prototype.Ry,tt.compareWithLineSegment=function(a,y,x,E,b,z){return it.Fl(a,y,x,E,b,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 hr=[];tt.className="Point",tt.parse=Or,tt.stringify=kr,tt.distanceLineSegmentSquared=To,tt.distanceSquared=qa,tt.direction=Mr,tt.Origin=uo=new tt(0,0).ja(),tt.InfiniteTopLeft=Zo=new tt(-1/0,-1/0).ja(),tt.InfiniteBottomRight=ga=new tt(1/0,1/0).ja(),tt.SixPoint=Pa=new tt(6,6).ja(),tt.NoPoint=ia=new tt(NaN,NaN).ja(),tt.parse=Or,tt.stringify=kr,tt.distanceLineSegmentSquared=To,tt.distanceSquared=qa,tt.direction=Mr;function Xn(a,y){a===void 0?this.height=this.width=0:typeof a=="number"&&(0<=a||isNaN(a))&&typeof y=="number"&&(0<=y||isNaN(y))?(this.width=a,this.height=y):yt("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var yr,wo,ua,No,yo,ta,na;Xn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},Xn.prototype.h=function(a,y){return this.width=a,this.height=y,this},Xn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},Xn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},Xn.prototype.copy=function(){var a=new Xn;return a.width=this.width,a.height=this.height,a},Le=Xn.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)&&yt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Na(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;return(E=a[y++])&&(b=parseFloat(E)),new Xn(x,b)}return new Xn}function ka(a){return a.width.toString()+" "+a.height.toString()}Le.toString=function(){return"Size("+this.width+","+this.height+")"},Le.D=function(a){return a instanceof Xn?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 it.B(this.width,a.width)&&it.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)},Xn.alloc=function(){var a=is.pop();return a===void 0?new Xn:a},Xn.free=function(a){is.push(a)},Xn.prototype.isReal=Xn.prototype.w,Xn.prototype.inflate=Xn.prototype.Bc,Xn.prototype.equalsApprox=Xn.prototype.Xa,Xn.prototype.equalTo=Xn.prototype.hi,Xn.prototype.equals=Xn.prototype.D,Xn.prototype.set=Xn.prototype.set,Xn.prototype.setTo=Xn.prototype.sg;var is=[];Xn.className="Size",Xn.parse=Na,Xn.stringify=ka,Xn.ZeroSize=yr=new Xn(0,0).ja(),Xn.OneSize=wo=new Xn(1,1).ja(),Xn.SixSize=ua=new Xn(6,6).ja(),Xn.EightSize=No=new Xn(8,8).ja(),Xn.TenSize=yo=new Xn(10,10).ja(),Xn.InfiniteSize=ta=new Xn(1/0,1/0).ja(),Xn.NoSize=na=new Xn(NaN,NaN).ja(),Xn.parse=Na,Xn.stringify=ka;function gn(a,y,x,E){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 E=="number"&&(0<=E||isNaN(E))?(this.x=a,this.y=y,this.width=x,this.height=E):a instanceof tt?(x=a.x,a=a.y,y instanceof tt?(E=y.x,y=y.y,this.x=Math.min(x,E),this.y=Math.min(a,y),this.width=Math.abs(x-E),this.height=Math.abs(a-y)):y instanceof Xn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):yt("Incorrect second argument supplied to Rect constructor "+y)):yt("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}Le=gn.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,E){return this.x=a,this.y=y,this.width=x,this.height=E,this};function Oa(a,y,x){a.width=y,a.height=x}Le.sg=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,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},gn.prototype.copy=function(){var a=new gn;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},Le=gn.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)&&yt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Vl(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;(E=a[y++])&&(b=parseFloat(E));for(var z=0;a[y]==="";)y++;(E=a[y++])&&(z=parseFloat(E));for(var ne=0;a[y]==="";)y++;return(E=a[y++])&&(ne=parseFloat(E)),new gn(x,b,z,ne)}return new gn}function Hs(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 gn?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},Le.hi=function(a,y,x,E){return this.x===a&&this.y===y&&this.width===x&&this.height===E},Le.Xa=function(a){return it.B(this.x,a.x)&&it.B(this.y,a.y)&&it.B(this.width,a.width)&&it.B(this.height,a.height)};function wl(a,y){return it.$(a.x,y.x)&&it.$(a.y,y.y)&&it.$(a.width,y.width)&&it.$(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,E){return x===void 0&&(x=0),E===void 0&&(E=0),this.x<=a&&a+x<=this.x+this.width&&this.y<=y&&y+E<=this.y+this.height},Le.offset=function(a,y){return this.x+=a,this.y+=y,this},Le.Bc=function(a,y){return Ma(this,y,a,y,a)},Le.Co=function(a){return Ma(this,a.top,a.right,a.bottom,a.left)},Le.Fv=function(a){return Ma(this,-a.top,-a.right,-a.bottom,-a.left)},Le.Hz=function(a,y,x,E){return Ma(this,a,y,x,E)};function Ma(a,y,x,E,b){var z=a.width;return x+b<=-z?(a.x+=z/2,a.width=0):(a.x-=b,a.width+=x+b),x=a.height,y+E<=-x?(a.y+=x/2,a.height=0):(a.y-=y,a.height+=y+E),a}Le.Ex=function(a){return yu(this,a.x,a.y,a.width,a.height)},Le.Uu=function(a,y,x,E){return yu(this,a,y,x,E)};function yu(a,y,x,E,b){var z=Math.max(a.x,y),ne=Math.max(a.y,x);return y=Math.min(a.x+a.width,y+E),x=Math.min(a.y+a.height,x+b),a.x=z,a.y=ne,a.width=Math.max(0,y-z),a.height=Math.max(0,x-ne),a}Le.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},Le.Vu=function(a,y,x,E){var b=this.width,z=this.x;return b!==1/0&&x!==1/0&&(b+=z,x+=a,isNaN(x)||isNaN(b)||z>x||a>b)?!1:(a=this.height,x=this.y,!(a!==1/0&&E!==1/0&&(a+=x,E+=y,isNaN(E)||isNaN(a)||x>E||y>a)))};function Cl(a,y){var x=a.width,E=a.x,b=y.x-10;return E>y.width+10+10+b||b>x+E?!1:(x=a.height,a=a.y,E=y.y-10,!(a>y.height+10+10+E||E>x+a))}Le.Ye=function(a){return ma(this,a.x,a.y,0,0)},Le.ed=function(a){return ma(this,a.x,a.y,a.width,a.height)},Le.Kv=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),ma(this,a,y,x,E)};function ma(a,y,x,E,b){var z=Math.min(a.x,y),ne=Math.min(a.y,x);return y=Math.max(a.x+a.width,y+E),x=Math.max(a.y+a.height,x+b),a.x=z,a.y=ne,a.width=y-z,a.height=x-ne,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 Fo(a,y,x,E,b,z,ne,re){return ne===void 0&&(ne=0),re===void 0&&(re=0),a<=b&&b+ne<=a+x&&y<=z&&z+re<=y+E}function Ul(a,y,x,E,b,z,ne,re){return a>ne+b||b>x+a?!1:!(y>re+z||z>E+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},gn.alloc=function(){var a=So.pop();return a===void 0?new gn:a},gn.allocAt=function(a,y,x,E){var b=So.pop();return b===void 0?new gn(a,y,x,E):b.h(a,y,x,E)},gn.free=function(a){So.push(a)},Ve.Object.defineProperties(gn.prototype,{left:{get:function(){return this.x},set:function(a){this.x=a}},top:{get:function(){return this.y},set:function(a){this.y=a}},right:{get:function(){return this.x+this.width},set:function(a){this.x+=a-(this.x+this.width)}},bottom:{get:function(){return this.y+this.height},set:function(a){this.y+=a-(this.y+this.height)}},position:{get:function(){return new tt(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new Xn(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new tt(this.x+this.width/2,this.y+this.height/2)},set:function(a){this.x=a.x-this.width/2,this.y=a.y-this.height/2}},centerX:{get:function(){return this.x+this.width/2},set:function(a){this.x=a-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(a){this.y=a-this.height/2}}}),gn.prototype.isEmpty=gn.prototype.Mz,gn.prototype.isReal=gn.prototype.w,gn.intersectsLineSegment=function(a,y,x,E,b,z,ne,re){return it.Fx(a,y,x,E,b,z,ne,re)},gn.prototype.setSpot=gn.prototype.yi,gn.prototype.union=gn.prototype.Kv,gn.prototype.unionRect=gn.prototype.ed,gn.prototype.unionPoint=gn.prototype.Ye,gn.prototype.intersects=gn.prototype.Vu,gn.prototype.intersectsRect=gn.prototype.Yc,gn.prototype.intersect=gn.prototype.Uu,gn.prototype.intersectRect=gn.prototype.Ex,gn.prototype.grow=gn.prototype.Hz,gn.prototype.subtractMargin=gn.prototype.Fv,gn.prototype.addMargin=gn.prototype.Co,gn.prototype.inflate=gn.prototype.Bc,gn.prototype.offset=gn.prototype.offset,gn.prototype.contains=gn.prototype.contains,gn.prototype.containsRect=gn.prototype.Re,gn.prototype.containsPoint=gn.prototype.ca,gn.prototype.equalsApprox=gn.prototype.Xa,gn.prototype.equalTo=gn.prototype.hi,gn.prototype.equals=gn.prototype.D,gn.prototype.setSize=gn.prototype.tA,gn.prototype.setPoint=gn.prototype.dd,gn.prototype.set=gn.prototype.set,gn.prototype.setTo=gn.prototype.sg;var $r=null,Ko=null,So=[];gn.className="Rect",gn.parse=Vl,gn.stringify=Hs,gn.contains=Fo,gn.intersects=Ul,gn.ZeroRect=$r=new gn(0,0,0,0).ja(),gn.NoRect=Ko=new gn(NaN,NaN,NaN,NaN).ja(),gn.parse=Vl,gn.stringify=Hs,gn.contains=Fo,gn.intersects=Ul;function Di(a,y,x,E){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):E!==void 0?(this.top=a,this.right=y,this.bottom=x,this.left=E):yt("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}Di.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Di.prototype.sg=function(a,y,x,E){return this.top=a,this.right=y,this.bottom=x,this.left=E,this},Di.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Di.prototype.copy=function(){var a=new Di;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},Le=Di.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)&&yt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ga(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=NaN;a[y]==="";)y++;var E=a[y++];if(E&&(x=parseFloat(E)),isNaN(x))return new Di;for(var b=NaN;a[y]==="";)y++;if((E=a[y++])&&(b=parseFloat(E)),isNaN(b))return new Di(x);for(var z=NaN;a[y]==="";)y++;if((E=a[y++])&&(z=parseFloat(E)),isNaN(z))return new Di(x,b);for(var ne=NaN;a[y]==="";)y++;return(E=a[y++])&&(ne=parseFloat(E)),isNaN(ne)?new Di(x,b):new Di(x,b,z,ne)}return new Di}function $a(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 Di?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},Le.hi=function(a,y,x,E){return this.top===a&&this.right===y&&this.bottom===x&&this.left===E},Le.Xa=function(a){return it.B(this.top,a.top)&&it.B(this.right,a.right)&&it.B(this.bottom,a.bottom)&&it.B(this.left,a.left)},Le.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Di.alloc=function(){var a=Dl.pop();return a===void 0?new Di:a},Di.free=function(a){Dl.push(a)},Di.prototype.isReal=Di.prototype.w,Di.prototype.equalsApprox=Di.prototype.Xa,Di.prototype.equalTo=Di.prototype.hi,Di.prototype.equals=Di.prototype.D,Di.prototype.set=Di.prototype.set,Di.prototype.setTo=Di.prototype.sg;var bs=null,El=null,Dl=[];Di.className="Margin",Di.parse=Ga,Di.stringify=$a,Di.ZeroMargin=bs=new Di(0,0,0,0).ja(),Di.TwoMargin=El=new Di(2,2,2,2).ja(),Di.parse=Ga,Di.stringify=$a;function bi(a,y,x,E){a===void 0?this.offsetY=this.offsetX=this.y=this.x=0:(y===void 0&&(y=0),x===void 0&&(x=0),E===void 0&&(E=0),this.x=a,this.y=y,this.offsetX=x,this.offsetY=E),this._isFrozen=!1}var Fa,cs,bl,Ol,Il,Qr,Ju,nl,vs,ys,Su,Iu,Ys,ul,Mh,uc,Lh,hc,Fh,Ru,Qu,Rl,Hh,qu,eh,Co,Uo,Ws,ds,es,Aa,za,rs,Ka,Gs,$s;bi.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},bi.prototype.sg=function(a,y,x,E){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=E,this},bi.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},bi.prototype.copy=function(){var a=new bi;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},Le=bi.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)&&yt("cannot thaw constant: "+this),this._isFrozen=!1,this};function va(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function rd(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return Fa;if(a==="TopLeft")return cs;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return bl;if(a==="TopRight")return Ol;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return Il;if(a==="Center")return Qr;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return Ju;if(a==="BottomLeft")return nl;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return vs;if(a==="BottomRight")return ys;if(a==="TopSide")return Su;if(a==="LeftSide")return Iu;if(a==="RightSide")return Ys;if(a==="BottomSide")return ul;if(a==="TopBottomSides")return Mh;if(a==="LeftRightSides")return uc;if(a==="TopLeftSides")return Lh;if(a==="TopRightSides")return hc;if(a==="BottomLeftSides")return Fh;if(a==="BottomRightSides")return Ru;if(a==="NotTopSide")return Qu;if(a==="NotLeftSide")return Rl;if(a==="NotRightSide")return Hh;if(a==="NotBottomSide")return qu;if(a==="AllSides")return eh;if(a==="Default")return Co;a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E!==void 0&&0<E.length&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;E=a[y++],E!==void 0&&0<E.length&&(b=parseFloat(E));for(var z=0;a[y]==="";)y++;E=a[y++],E!==void 0&&0<E.length&&(z=parseFloat(E));for(var ne=0;a[y]==="";)y++;return E=a[y++],E!==void 0&&0<E.length&&(ne=parseFloat(E)),new bi(x,b,z,ne)}return new bi}function Mc(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(Fa)?"None":this.D(cs)?"TopLeft":this.D(bl)?"Top":this.D(Ol)?"TopRight":this.D(Il)?"Left":this.D(Qr)?"Center":this.D(Ju)?"Right":this.D(nl)?"BottomLeft":this.D(vs)?"Bottom":this.D(ys)?"BottomRight":this.D(Su)?"TopSide":this.D(Iu)?"LeftSide":this.D(Ys)?"RightSide":this.D(ul)?"BottomSide":this.D(Mh)?"TopBottomSides":this.D(uc)?"LeftRightSides":this.D(Lh)?"TopLeftSides":this.D(hc)?"TopRightSides":this.D(Fh)?"BottomLeftSides":this.D(Ru)?"BottomRightSides":this.D(Qu)?"NotTopSide":this.D(Rl)?"NotLeftSide":this.D(Hh)?"NotRightSide":this.D(qu)?"NotBottomSide":this.D(eh)?"AllSides":this.D(Co)?"Default":"None"},Le.D=function(a){return a instanceof bi?(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 bi(.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(Uo))a=Iu;else if(a.D(Ws))a=Ys;else if(a.D(ds))a=Su;else if(a.D(es))a=ul;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},bi.alloc=function(){var a=Kt.pop();return a===void 0?new bi:a},bi.free=function(a){Kt.push(a)},bi.prototype.isDefault=bi.prototype.Xb,bi.prototype.isNone=bi.prototype.ys,bi.prototype.isSide=bi.prototype.$c,bi.prototype.isNoSpot=bi.prototype.Mc,bi.prototype.isSpot=bi.prototype.sb,bi.prototype.includesSide=bi.prototype.Hf,bi.prototype.opposite=bi.prototype.gv,bi.prototype.equals=bi.prototype.D,bi.prototype.set=bi.prototype.set,bi.prototype.setTo=bi.prototype.sg;var Kt=[];bi.className="Spot",bi.parse=rd,bi.stringify=Mc,bi.None=Fa=va(new bi(0,0,0,0),0).ja(),bi.Default=Co=va(new bi(0,0,-1,0),-1).ja(),bi.TopLeft=cs=new bi(0,0,0,0).ja(),bi.TopCenter=bl=new bi(.5,0,0,0).ja(),bi.TopRight=Ol=new bi(1,0,0,0).ja(),bi.LeftCenter=Il=new bi(0,.5,0,0).ja(),bi.Center=Qr=new bi(.5,.5,0,0).ja(),bi.RightCenter=Ju=new bi(1,.5,0,0).ja(),bi.BottomLeft=nl=new bi(0,1,0,0).ja(),bi.BottomCenter=vs=new bi(.5,1,0,0).ja(),bi.BottomRight=ys=new bi(1,1,0,0).ja(),bi.MiddleTop=Aa=bl,bi.MiddleLeft=za=Il,bi.MiddleRight=rs=Ju,bi.MiddleBottom=Ka=vs,bi.Top=ds=bl,bi.Left=Uo=Il,bi.Right=Ws=Ju,bi.Bottom=es=vs,bi.TopSide=Su=va(new bi(0,0,1,1),1).ja(),bi.LeftSide=Iu=va(new bi(0,0,1,2),1).ja(),bi.RightSide=Ys=va(new bi(0,0,1,4),1).ja(),bi.BottomSide=ul=va(new bi(0,0,1,8),1).ja(),bi.TopBottomSides=Mh=va(new bi(0,0,1,9),1).ja(),bi.LeftRightSides=uc=va(new bi(0,0,1,6),1).ja(),bi.TopLeftSides=Lh=va(new bi(0,0,1,3),1).ja(),bi.TopRightSides=hc=va(new bi(0,0,1,5),1).ja(),bi.BottomLeftSides=Fh=va(new bi(0,0,1,10),1).ja(),bi.BottomRightSides=Ru=va(new bi(0,0,1,12),1).ja(),bi.NotTopSide=Qu=va(new bi(0,0,1,14),1).ja(),bi.NotLeftSide=Rl=va(new bi(0,0,1,13),1).ja(),bi.NotRightSide=Hh=va(new bi(0,0,1,11),1).ja(),bi.NotBottomSide=qu=va(new bi(0,0,1,7),1).ja(),bi.AllSides=eh=va(new bi(0,0,1,15),1).ja(),Gs=new bi(.156,.156).ja(),$s=new bi(.844,.844).ja(),bi.parse=rd,bi.stringify=Mc;function _t(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}_t.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},_t.prototype.setTransform=function(a,y,x,E,b,z){return this.m11=a,this.m12=y,this.m21=x,this.m22=E,this.dx=b,this.dy=z,this},_t.prototype.copy=function(){var a=new _t;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},_t.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},_t.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},_t.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},_t.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},_t.prototype.multiply=function(a){var y=this.m11*a.m11+this.m21*a.m12,x=this.m12*a.m11+this.m22*a.m12,E=this.m11*a.m21+this.m21*a.m22,b=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=E,this.m22=b,this},_t.prototype.bv=function(a){var y=1/(a.m11*a.m22-a.m12*a.m21),x=a.m22*y,E=-a.m12*y,b=-a.m21*y,z=a.m11*y,ne=y*(a.m21*a.dy-a.m22*a.dx);return a=y*(a.m12*a.dx-a.m11*a.dy),y=this.m11*x+this.m21*E,x=this.m12*x+this.m22*E,E=this.m11*b+this.m21*z,b=this.m12*b+this.m22*z,this.dx=this.m11*ne+this.m21*a+this.dx,this.dy=this.m12*ne+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=E,this.m22=b,this},_t.prototype.Vj=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),y=-this.m12*a,x=-this.m21*a,E=this.m11*a,b=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=E,this.dx=b,this.dy=z,this},_t.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 E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));var b=this.m12*a+this.m22*E,z=this.m11*-E+this.m21*a,ne=this.m12*-E+this.m22*a;return this.m11=this.m11*a+this.m21*E,this.m12=b,this.m21=z,this.m22=ne,this.translate(-y,-x),this},Le=_t.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,E=a.y;return a.h(x*this.m22*y+E*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+E*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,E=1.2*a.y;return a.h(x*this.m22*y+E*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+E*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Le.pp=function(a){var y=a.x,x=a.y,E=y+a.width,b=x+a.height,z=this.m11,ne=this.m12,re=this.m21,oe=this.m22,le=this.dx,ue=this.dy,pe=y*z+x*re+le,xe=y*ne+x*oe+ue,Ee=E*z+x*re+le,Fe=E*ne+x*oe+ue;return x=y*z+b*re+le,y=y*ne+b*oe+ue,z=E*z+b*re+le,E=E*ne+b*oe+ue,b=Math.min(pe,Ee),pe=Math.max(pe,Ee),Ee=Math.min(xe,Fe),xe=Math.max(xe,Fe),b=Math.min(b,x),pe=Math.max(pe,x),Ee=Math.min(Ee,y),xe=Math.max(xe,y),b=Math.min(b,z),pe=Math.max(pe,z),Ee=Math.min(Ee,E),xe=Math.max(xe,E),a.h(b,Ee,pe-b,xe-Ee),a},_t.alloc=function(){var a=mn.pop();return a===void 0?new _t:a},_t.free=function(a){mn.push(a)},_t.prototype.transformRect=_t.prototype.pp,_t.prototype.transformPoint=_t.prototype.Ga,_t.prototype.scale=_t.prototype.scale,_t.prototype.translate=_t.prototype.translate,_t.prototype.rotate=_t.prototype.rotate,_t.prototype.invert=_t.prototype.Vj,_t.prototype.multiplyInverted=_t.prototype.bv,_t.prototype.multiply=_t.prototype.multiply,_t.prototype.reset=_t.prototype.reset,_t.prototype.isIdentity=_t.prototype.ws,_t.prototype.equals=_t.prototype.D,_t.prototype.setTransform=_t.prototype.setTransform,_t.prototype.set=_t.prototype.set;var mn=[];_t.className="Transform",_t.xF="54a702f3e53909c447824c6706603faf4c";var it={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=it.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);it.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,E,b,z,ne){if(0>=b&&(b=1e-6),a<x)var re=a,oe=x;else re=x,oe=a;if(y<E)var le=y,ue=E;else le=E,ue=y;if(a===x)return le<=ne&&ne<=ue&&a-b<=z&&z<=a+b;if(y===E)return re<=z&&z<=oe&&y-b<=ne&&ne<=y+b;if(oe+=b,re-=b,re<=z&&z<=oe&&(ue+=b,le-=b,le<=ne&&ne<=ue))if(oe-re>ue-le)if(a-x>b||x-a>b){if(z=(E-y)/(x-a)*(z-a)+y,z-b<=ne&&ne<=z+b)return!0}else return!0;else if(y-E>b||E-y>b){if(ne=(x-a)/(E-y)*(ne-y)+a,ne-b<=z&&z<=ne+b)return!0}else return!0;return!1},cs:function(a,y,x,E,b,z,ne,re,oe,le,ue,pe){if(it.Yb(a,y,ne,re,pe,x,E)&&it.Yb(a,y,ne,re,pe,b,z))return it.Yb(a,y,ne,re,pe,le,ue);var xe=(a+x)/2,Ee=(y+E)/2,Fe=(x+b)/2,Oe=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(xe+Fe)/2,x=(Ee+Oe)/2,Fe=(Fe+b)/2,Oe=(Oe+z)/2;var at=(E+Fe)/2,Xe=(x+Oe)/2;return it.cs(a,y,xe,Ee,E,x,at,Xe,oe,le,ue,pe)||it.cs(at,Xe,Fe,Oe,b,z,ne,re,oe,le,ue,pe)},ax:function(a,y,x,E,b,z,ne,re,oe){var le=(x+b)/2,ue=(E+z)/2;return oe.h((((a+x)/2+le)/2+(le+(b+ne)/2)/2)/2,(((y+E)/2+ue)/2+(ue+(z+re)/2)/2)/2),oe},My:function(a,y,x,E,b,z,ne,re){var oe=(x+b)/2,le=(E+z)/2;return Mr(((a+x)/2+oe)/2,((y+E)/2+le)/2,(oe+(b+ne)/2)/2,(le+(z+re)/2)/2)},Dl:function(a,y,x,E,b,z,ne,re,oe,le){if(it.Yb(a,y,ne,re,oe,x,E)&&it.Yb(a,y,ne,re,oe,b,z))ma(le,a,y,0,0),ma(le,ne,re,0,0);else{var ue=(a+x)/2,pe=(y+E)/2,xe=(x+b)/2,Ee=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(ue+xe)/2,x=(pe+Ee)/2,xe=(xe+b)/2,Ee=(Ee+z)/2;var Fe=(E+xe)/2,Oe=(x+Ee)/2;it.Dl(a,y,ue,pe,E,x,Fe,Oe,oe,le),it.Dl(Fe,Oe,xe,Ee,b,z,ne,re,oe,le)}return le},Qe:function(a,y,x,E,b,z,ne,re,oe,le){if(it.Yb(a,y,ne,re,oe,x,E)&&it.Yb(a,y,ne,re,oe,b,z))le.length===0&&(le.push(a),le.push(y)),le.push(ne),le.push(re);else{var ue=(a+x)/2,pe=(y+E)/2,xe=(x+b)/2,Ee=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(ue+xe)/2,x=(pe+Ee)/2,xe=(xe+b)/2,Ee=(Ee+z)/2;var Fe=(E+xe)/2,Oe=(x+Ee)/2;it.Qe(a,y,ue,pe,E,x,Fe,Oe,oe,le),it.Qe(Fe,Oe,xe,Ee,b,z,ne,re,oe,le)}return le},jv:function(a,y,x,E,b,z,ne,re,oe,le){if(it.Yb(a,y,b,z,le,x,E))return it.Yb(a,y,b,z,le,re,oe);var ue=(a+x)/2,pe=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var xe=(ue+x)/2,Ee=(pe+E)/2;return it.jv(a,y,ue,pe,xe,Ee,ne,re,oe,le)||it.jv(xe,Ee,x,E,b,z,ne,re,oe,le)},OA:function(a,y,x,E,b,z,ne){return ne.h(((a+x)/2+(x+b)/2)/2,((y+E)/2+(E+z)/2)/2),ne},iv:function(a,y,x,E,b,z,ne,re){if(it.Yb(a,y,b,z,ne,x,E))ma(re,a,y,0,0),ma(re,b,z,0,0);else{var oe=(a+x)/2,le=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ue=(oe+x)/2,pe=(le+E)/2;it.iv(a,y,oe,le,ue,pe,ne,re),it.iv(ue,pe,x,E,b,z,ne,re)}return re},ep:function(a,y,x,E,b,z,ne,re){if(it.Yb(a,y,b,z,ne,x,E))re.length===0&&(re.push(a),re.push(y)),re.push(b),re.push(z);else{var oe=(a+x)/2,le=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ue=(oe+x)/2,pe=(le+E)/2;it.ep(a,y,oe,le,ue,pe,ne,re),it.ep(ue,pe,x,E,b,z,ne,re)}return re},Eo:function(a,y,x,E,b,z,ne,re,oe,le,ue,pe,xe,Ee){if(it.Yb(a,y,ne,re,xe,x,E)&&it.Yb(a,y,ne,re,xe,b,z))return!it.Rl(a,y,ne,re,oe,le,ue,pe)||(xe=(a-ne)*(le-pe)-(y-re)*(oe-ue),xe===0)?!1:(Ee.h(((a*re-y*ne)*(oe-ue)-(a-ne)*(oe*pe-le*ue))/xe,((a*re-y*ne)*(le-pe)-(y-re)*(oe*pe-le*ue))/xe),!0);var Fe=(a+x)/2,Oe=(y+E)/2,at=(x+b)/2,Xe=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(Fe+at)/2,x=(Oe+Xe)/2,at=(at+b)/2,Xe=(Xe+z)/2;var pt=(E+at)/2,wt=(x+Xe)/2,Mt=1/0,It=!1,qt=0,ei=0;return it.Eo(a,y,Fe,Oe,E,x,pt,wt,oe,le,ue,pe,xe,Ee)&&(a=(Ee.x-oe)*(Ee.x-oe)+(Ee.y-le)*(Ee.y-le),a<Mt&&(Mt=a,It=!0,qt=Ee.x,ei=Ee.y)),it.Eo(pt,wt,at,Xe,b,z,ne,re,oe,le,ue,pe,xe,Ee)&&(Ee.x-oe)*(Ee.x-oe)+(Ee.y-le)*(Ee.y-le)<Mt&&(It=!0,qt=Ee.x,ei=Ee.y),It&&(Ee.x=qt,Ee.y=ei),It},Fo:function(a,y,x,E,b,z,ne,re,oe,le,ue,pe,xe){var Ee=0;if(it.Yb(a,y,ne,re,xe,x,E)&&it.Yb(a,y,ne,re,xe,b,z)){if(xe=(a-ne)*(le-pe)-(y-re)*(oe-ue),xe===0)return Ee;var Fe=((a*re-y*ne)*(oe-ue)-(a-ne)*(oe*pe-le*ue))/xe,Oe=((a*re-y*ne)*(le-pe)-(y-re)*(oe*pe-le*ue))/xe;if(Fe>=ue)return Ee;if((oe>ue?oe-ue:ue-oe)<(le>pe?le-pe:pe-le)){if(y<re?(oe=y,a=re):(oe=re,a=y),Oe<oe||Oe>a)return Ee}else if(a<ne?(oe=a,a=ne):oe=ne,Fe<oe||Fe>a)return Ee;0<xe?Ee++:0>xe&&Ee--}else{Fe=(a+x)/2,Oe=(y+E)/2;var at=(x+b)/2,Xe=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(Fe+at)/2,x=(Oe+Xe)/2,at=(at+b)/2,Xe=(Xe+z)/2;var pt=(E+at)/2,wt=(x+Xe)/2;Ee+=it.Fo(a,y,Fe,Oe,E,x,pt,wt,oe,le,ue,pe,xe),Ee+=it.Fo(pt,wt,at,Xe,b,z,ne,re,oe,le,ue,pe,xe)}return Ee},qh:function(a,y,x,E,b,z,ne){return it.$(a,x)?(y<E?(x=y,y=E):x=E,z<x?(ne.h(a,x),!1):z>y?(ne.h(a,y),!1):(ne.h(a,z),!0)):it.$(y,E)?(a<x?(E=a,a=x):E=x,b<E?(ne.h(E,y),!1):b>a?(ne.h(a,y),!1):(ne.h(b,y),!0)):(b=((a-b)*(a-x)+(y-z)*(y-E))/((x-a)*(x-a)+(E-y)*(E-y)),-5e-6>b?(ne.h(a,y),!1):1.000005<b?(ne.h(x,E),!1):(ne.h(a+b*(x-a),y+b*(E-y)),!0))},Ve:function(a,y,x,E,b,z,ne,re,oe){return it.B(a,x)&&it.B(y,E)?(oe.h(a,y),!1):it.$(b,ne)?it.$(a,x)?(it.qh(a,y,x,E,b,z,oe),!1):it.qh(a,y,x,E,b,(E-y)/(x-a)*(b-a)+y,oe):(re=(re-z)/(ne-b),it.$(a,x)?(x=re*(a-b)+z,y<E?(b=y,y=E):b=E,x<b?(oe.h(a,b),!1):x>y?(oe.h(a,y),!1):(oe.h(a,x),!0)):(ne=(E-y)/(x-a),it.$(re,ne)?(it.qh(a,y,x,E,b,z,oe),!1):(b=(ne*a-re*b+z-y)/(ne-re),it.$(ne,0)?(a<x?(E=a,a=x):E=x,b<E?(oe.h(E,y),!1):b>a?(oe.h(a,y),!1):(oe.h(b,y),!0)):it.qh(a,y,x,E,b,ne*(b-a)+y,oe))))},MA:function(a,y,x,E,b){return it.Ve(x.x,x.y,E.x,E.y,a.x,a.y,y.x,y.y,b)},KA:function(a,y,x,E,b,z,ne,re,oe,le){function ue(at,Xe){var pt=(at-a)*(at-a)+(Xe-y)*(Xe-y);pt<pe&&(pe=pt,oe.h(at,Xe))}var pe=1/0;ue(oe.x,oe.y);var xe=0,Ee=0,Fe=0,Oe=0;if(b<ne?(xe=b,Ee=ne):(xe=ne,Ee=b),z<re?(Fe=b,Oe=ne):(Fe=ne,Oe=b),xe=(Ee-xe)/2+le,le=(Oe-Fe)/2+le,b=(b+ne)/2,z=(z+re)/2,xe===0||le===0)return oe;if(.5>(x>a?x-a:a-x)){if(xe=1-(x-b)*(x-b)/(xe*xe),0>xe)return oe;xe=Math.sqrt(xe),E=-le*xe+z,ue(x,le*xe+z),ue(x,E)}else{if(x=(E-y)/(x-a),E=1/(xe*xe)+x*x/(le*le),re=2*x*(y-x*a)/(le*le)-2*x*z/(le*le)-2*b/(xe*xe),xe=re*re-4*E*(2*x*a*z/(le*le)-2*y*z/(le*le)+z*z/(le*le)+b*b/(xe*xe)-1+(y-x*a)*(y-x*a)/(le*le)),0>xe)return oe;xe=Math.sqrt(xe),le=(-re+xe)/(2*E),ue(le,x*le-x*a+y),xe=(-re-xe)/(2*E),ue(xe,x*xe-x*a+y)}return oe},Ff:function(a,y,x,E,b,z,ne,re,oe){var le=1e21,ue=a,pe=y;if(it.Ve(a,y,a,E,b,z,ne,re,oe)){var xe=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z);xe<le&&(le=xe,ue=oe.x,pe=oe.y)}return it.Ve(x,y,x,E,b,z,ne,re,oe)&&(xe=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z),xe<le&&(le=xe,ue=oe.x,pe=oe.y)),it.Ve(a,y,x,y,b,z,ne,re,oe)&&(y=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z),y<le&&(le=y,ue=oe.x,pe=oe.y)),it.Ve(a,E,x,E,b,z,ne,re,oe)&&(a=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z),a<le&&(le=a,ue=oe.x,pe=oe.y)),oe.h(ue,pe),1e21>le},us:function(a,y,x){return it.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,E,b,z,ne,re){var oe=a+x,le=y+E;return b===ne?(z<re?(ne=z,z=re):ne=re,a<=b&&b<=oe&&ne<=le&&z>=y):z===re?(b<ne?(re=b,b=ne):re=ne,y<=z&&z<=le&&re<=oe&&b>=a):!!(Fo(a,y,x,E,b,z)||Fo(a,y,x,E,ne,re)||it.Rl(a,y,oe,y,b,z,ne,re)||it.Rl(oe,y,oe,le,b,z,ne,re)||it.Rl(oe,le,a,le,b,z,ne,re)||it.Rl(a,le,a,y,b,z,ne,re))},Rl:function(a,y,x,E,b,z,ne,re){return a===x&&y===E&&b===ne&&z===re?a===b&&y===z:0>=it.Fl(a,y,x,E,b,z)*it.Fl(a,y,x,E,ne,re)&&0>=it.Fl(b,z,ne,re,a,y)*it.Fl(b,z,ne,re,x,E)},Fl:function(a,y,x,E,b,z){return x-=a,E-=y,a=b-a,y=z-y,z=a*E-y*x,z===0&&(z=a*x+y*E,0<z&&(z=(a-x)*x+(y-E)*E,0>z&&(z=0))),z},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,E,b,z){var ne=Math.PI;z||(E*=ne/180,b*=ne/180);var re=E>b?-1:1;z=[];var oe=ne/2,le=E;if(E=Math.min(2*ne,Math.abs(b-E)),1e-5>E)return oe=le+re*Math.min(E,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<E;)b=le+re*Math.min(E,oe),z.push(it.Vy(x,le,b,a,y)),E-=Math.abs(b-le),le=b;return z},Vy:function(a,y,x,E,b){var z=(x-y)/2,ne=a*Math.cos(z),re=a*Math.sin(z),oe=-re,le=ne*ne+oe*oe,ue=le+ne*ne+oe*re;return le=4/3*(Math.sqrt(2*le*ue)-ue)/(ne*re-oe*ne),re=ne-le*oe,ne=oe+le*ne,oe=-ne,le=z+y,z=Math.cos(le),le=Math.sin(le),[E+a*Math.cos(y),b+a*Math.sin(y),E+re*z-ne*le,b+re*le+ne*z,E+re*z-oe*le,b+re*le+oe*z,E+a*Math.cos(x),b+a*Math.sin(x)]},No:function(a,y,x,E,b,z,ne){x=Math.floor((a-x)/b)*b+x,E=Math.floor((y-E)/z)*z+E;var re=x;return x+b-a<b/2&&(re=x+b),a=E,E+z-y<z/2&&(a=E+z),ne.h(re,a),ne},vx:function(a,y){var x=Math.max(a,y);a=Math.min(a,y);var E;do y=x%a,x=E=a,a=y;while(0<y);return E},$y:function(a,y,x,E){var b=0>x,z=0>E;if(a<y)var ne=1,re=0;else ne=0,re=1;var oe=ne===0?a:y,le=ne===0?x:E;return(ne===0?b:z)&&(le=-le),ne=re,x=ne===0?x:E,(ne===0?b:z)&&(x=-x),it.az(oe,ne===0?a:y,le,x,0,0)},az:function(a,y,x,E,b,z){if(0<E)if(0<x){b=a*a,z=y*y,a*=x;var ne=y*E,re=-z+ne,oe=-z+Math.sqrt(a*a+ne*ne);y=re;for(var le=0;9999999999>le&&(y=.5*(re+oe),!(y===re||y===oe));++le){var ue=a/(y+b),pe=ne/(y+z);if(ue=ue*ue+pe*pe-1,0<ue)re=y;else if(0>ue)oe=y;else break}x=b*x/(y+b)-x,E=z*E/(y+z)-E,x=Math.sqrt(x*x+E*E)}else x=Math.abs(E-y);else E=a*a-y*y,z=a*x,z<E?(E=z/E,z=y*Math.sqrt(Math.abs(1-E*E)),x=a*E-x,x=Math.sqrt(x*x+z*z)):x=Math.abs(x-a);return x},Ze:new zi,um:new zi,Mf:new zi,Nf:0,vm:100};it.za=it.AA;function yn(a){Zr(this),this.l=2,a===void 0&&(a=yn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===yn.o?this.ee=new Nn:(yn.V===null&&(yn.V=new Nn().freeze()),this.ee=yn.V),this.aq=this.ee.Ja,this.Ip=new gn().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=cs,this.gg=ys,this.Rk=this.Sk=NaN,this.Uf=zn}yn.prototype.copy=function(){var a=new yn;if(a.l=this.l&-2,a.na=this.na,a.od=this.od,a.pd=this.pd,a.Dc=this.Dc,a.Ec=this.Ec,this.na===yn.o){for(var y=this.ee.s,x=a.ee,E=0;E<y.length;E++)x.add(y[E].copy());a.ee=x}else a.ee=this.ee;return a.aq=this.aq,a.Ip.assign(this.Ip),a.tk=this.tk,a.ym=this.ym,a.zm=this.zm,a.fg=this.fg.J(),a.gg=this.gg.J(),a.Sk=this.Sk,a.Rk=this.Rk,a.Uf=this.Uf,a},yn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},yn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==yn.o)return this;var a=this.figures;a.freeze(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].freeze();return this},yn.prototype.ka=function(){if(Object.isFrozen(this)&&yt("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==yn.o)return this;var a=this.figures;a.ka(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].ka();return this},yn.prototype.Xa=function(a){if(!(a instanceof yn))return!1;if(this.type!==a.type)return this.type===yn.j&&a.type===yn.o?zr(this,a):a.type===yn.j&&this.type===yn.o?zr(a,this):!1;if(this.type===yn.o){var y=this.figures.s;a=a.figures.s;var x=y.length;if(x!==a.length)return!1;for(var E=0;E<x;E++)if(!y[E].Xa(a[E]))return!1;return!0}return it.B(this.startX,a.startX)&&it.B(this.startY,a.startY)&&it.B(this.endX,a.endX)&&it.B(this.endY,a.endY)};function zr(a,y){return a.type!==yn.j||y.type!==yn.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&it.B(a.startX,y.startX)&&it.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===or&&it.B(a.endX,y.endX)&&it.B(a.endY,y.endY))))}yn.ia=function(a){return a.toString()},yn.prototype.qb=function(a){a.classType===yn&&(this.type=a)},yn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case yn.j:return 0>a?"M"+this.startX.toString()+" "+this.startY.toString()+"L"+this.endX.toString()+" "+this.endY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a)+"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);case yn.u:var y=new gn(this.startX,this.startY,0,0);return y.Kv(this.endX,this.endY,0,0),0>a?"M"+y.x.toString()+" "+y.y.toString()+"H"+y.right.toString()+"V"+y.bottom.toString()+"H"+y.left.toString()+"z":"M"+y.x.toFixed(a)+" "+y.y.toFixed(a)+"H"+y.right.toFixed(a)+"V"+y.bottom.toFixed(a)+"H"+y.left.toFixed(a)+"z";case yn.F:if(y=new gn(this.startX,this.startY,0,0),y.Kv(this.endX,this.endY,0,0),0>a)return a=y.left.toString()+" "+(y.y+y.height/2).toString(),"M"+a+"A"+(y.width/2).toString()+" "+(y.height/2).toString()+" 0 0 1 "+(y.right.toString()+" "+(y.y+y.height/2).toString())+"A"+(y.width/2).toString()+" "+(y.height/2).toString()+" 0 0 1 "+a;var x=y.left.toFixed(a)+" "+(y.y+y.height/2).toFixed(a);return"M"+x+"A"+(y.width/2).toFixed(a)+" "+(y.height/2).toFixed(a)+" 0 0 1 "+(y.right.toFixed(a)+" "+(y.y+y.height/2).toFixed(a))+"A"+(y.width/2).toFixed(a)+" "+(y.height/2).toFixed(a)+" 0 0 1 "+x;case yn.o:y="",x=this.figures.s;for(var E=x.length,b=0;b<E;b++){var z=x[b];0<b&&(y+=" x "),z.isFilled&&(y+="F "),y+=z.toString(a)}return y;default:return this.type.toString()}},yn.nb=function(a){a=a.split(/[Xx]/);for(var y=a.length,x="",E=0;E<y;E++){var b=a[E];x=b.match(/[Ff]/)!==null?E===0?x+b:x+("X"+(b[0]===" "?"":" ")+b):x+((E===0?"":"X ")+"F"+(b[0]===" "?"":" ")+b)}return x},yn.parse=function(a,y){function x(){return Oe>=Mt-1?!0:le[Oe+1].match(It)!==null}function E(){return Oe++,le[Oe]}function b(dr){var Xi=parseFloat(E()),vo=parseFloat(E());at===at.toLowerCase()&&(Xi=wt.x+Xi,vo=wt.y+vo),dr.h(Xi,vo)}function z(){return b(wt),wt}function ne(){return b(pt),pt}function re(){var dr=Xe.toLowerCase();return dr!=="c"&&dr!=="s"&&dr!=="q"&&dr!=="t"?wt:new tt(2*wt.x-pt.x,2*wt.y-pt.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=qn();for(var pe="",xe=!1,Ee=0;Ee<ue.length;Ee++){var Fe=ue[Ee];Fe!=="."||xe?Fe==="."?(oe.push(pe),pe="."):pe+=Fe:(xe=!0,pe+=Fe)}for(oe.push(pe),le.splice(a,1),ue=0;ue<oe.length;ue++)le.splice(a+ue,0,oe[ue]);a+=oe.length-1,di(oe)}}var Oe=-1,at="",Xe="";oe=new tt(0,0);var pt=new tt(0,0),wt=new tt(0,0),Mt=le.length;a=N1(null),xe=pe=ue=!1,Ee=!0,Fe=null;for(var It=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(Oe>=Mt-1);)if(Xe=at,at=E(),at!=="")switch(at.toUpperCase()){case"X":Ee=!0,pe=ue=!1;break;case"M":for(Fe=z(),a.mc===null||Ee===!0?(yg(a,Fe.x,Fe.y,ue,!pe,xe),Ee=!1):a.moveTo(Fe.x,Fe.y),oe.assign(wt);!x();)Fe=z(),a.lineTo(Fe.x,Fe.y);break;case"L":for(;!x();)Fe=z(),a.lineTo(Fe.x,Fe.y);break;case"H":for(;!x();)wt=new tt((at===at.toLowerCase()?wt.x:0)+parseFloat(E()),wt.y),a.lineTo(wt.x,wt.y);break;case"V":for(;!x();)wt=new tt(wt.x,(at===at.toLowerCase()?wt.y:0)+parseFloat(E())),a.lineTo(wt.x,wt.y);break;case"C":for(;!x();){Fe=new tt,b(Fe);var qt=ne(),ei=z();_c(a,Fe.x,Fe.y,qt.x,qt.y,ei.x,ei.y)}break;case"S":for(;!x();)Fe=re(),qt=ne(),ei=z(),_c(a,Fe.x,Fe.y,qt.x,qt.y,ei.x,ei.y);break;case"Q":for(;!x();)Fe=ne(),qt=z(),Zm(a,Fe.x,Fe.y,qt.x,qt.y);break;case"T":for(;!x();)pt=Fe=re(),qt=z(),Zm(a,Fe.x,Fe.y,qt.x,qt.y);break;case"B":for(;!x();){Fe=parseFloat(E()),qt=parseFloat(E()),ei=parseFloat(E());var Si=parseFloat(E()),fi=parseFloat(E()),Gn=fi,Tn=!1;x()||(Gn=parseFloat(E()),x()||(Tn=parseFloat(E())!==0)),at===at.toLowerCase()&&(ei+=wt.x,Si+=wt.y),a.arcTo(Fe,qt,ei,Si,fi,Gn,Tn)}break;case"A":for(;!x();)Fe=Math.abs(parseFloat(E())),qt=Math.abs(parseFloat(E())),ei=parseFloat(E()),fi=Si=!1,Tn=Gn=0,Gn=E(),Gn.length===1?(Si=!!parseFloat(Gn),fi=!!parseFloat(E()),Gn=parseFloat(E())):Gn.length===2?(Si=!!parseFloat(Gn[0]),fi=!!parseFloat(Gn[1]),Gn=parseFloat(E())):(Si=!!parseFloat(Gn[0]),fi=!!parseFloat(Gn[1]),Gn=parseFloat(Gn.slice(2))),Tn=parseFloat(E()),at===at.toLowerCase()&&(Gn=wt.x+Gn,Tn=wt.y+Tn),wt.h(Gn,Tn),wx(a,Fe,qt,ei,Si,fi,Gn,Tn);break;case"Z":Px(a),wt.assign(oe);break;case"F":for(Fe="",qt=1;le[Oe+qt];)if(le[Oe+qt]==="0")xe=!0,qt++;else if(le[Oe+qt].match(/[Uu]/)!==null)qt++;else if(le[Oe+qt].match(It)===null)qt++;else{Fe=le[Oe+qt];break}Fe.match(/[Mm]/)?ue=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Fe="",qt=1;le[Oe+qt];)if(le[Oe+qt].match(/[Ff]/)!==null)qt++;else if(le[Oe+qt].match(It)===null)qt++;else{Fe=le[Oe+qt];break}Fe.match(/[Mm]/)?pe=!0:a.mc.isShadowed=!1}if(oe=a.os,Hm=a,y)for(y=oe.figures.iterator;y.next();)y.value.isFilled=!0;return oe},yn.Ha=function(a,y){for(var x=a.length,E=tt.alloc(),b=0;b<x;b++){var z=a[b];E.x=z[0],E.y=z[1],y.Ga(E),z[0]=E.x,z[1]=E.y,E.x=z[2],E.y=z[3],y.Ga(E),z[2]=E.x,z[3]=E.y,E.x=z[4],E.y=z[5],y.Ga(E),z[4]=E.x,z[5]=E.y,E.x=z[6],E.y=z[7],y.Ga(E),z[6]=E.x,z[7]=E.y}tt.free(E)},yn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===yn.o){if(this.aq!==this.figures.Ja)return!0;for(var a=this.figures.s,y=a.length,x=0;x<y;x++)if(a[x].Zu())return!0}return!1},yn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===yn.o){this.aq=this.figures.Ja;for(var a=this.figures.s,y=a.length,x=0;x<y;x++){var E=a[x];E._isInvalidBounds=!1;var b=E.segments;E.sr=b.Ja,E=b.s,b=E.length;for(var z=0;z<b;z++){var ne=E[z];ne._isInvalidBounds=!1,ne.ae=null}}}a=this.Ip,a.ka(),isNaN(this.Sk)||isNaN(this.Rk)?a.h(0,0,0,0):a.h(0,0,this.Sk,this.Rk),Bo(this,a,!1),ma(a,0,0,0,0),a.freeze()},yn.prototype.ix=function(){var a=new gn;return Bo(this,a,!0),a};function Bo(a,y,x){switch(a.type){case yn.j:case yn.u:case yn.F:x?y.h(a.od,a.pd,0,0):ma(y,a.od,a.pd,0,0),ma(y,a.Dc,a.Ec,0,0);break;case yn.o:var E=a.figures;a=E.s,E=E.length;for(var b=0;b<E;b++){var z=a[b];x&&b===0?y.h(z.startX,z.startY,0,0):ma(y,z.startX,z.startY,0,0);for(var ne=z.segments.s,re=ne.length,oe=z.startX,le=z.startY,ue=0;ue<re;ue++){var pe=ne[ue];switch(pe.type){case or:case Ar:oe=pe.endX,le=pe.endY,ma(y,oe,le,0,0);break;case Cr:it.Dl(oe,le,pe.point1X,pe.point1Y,pe.point2X,pe.point2Y,pe.endX,pe.endY,.5,y),oe=pe.endX,le=pe.endY;break;case Lo:it.iv(oe,le,pe.point1X,pe.point1Y,pe.endX,pe.endY,.5,y),oe=pe.endX,le=pe.endY;break;case Rr:case tr:var xe=pe.type===Rr?$i(pe,z):Tr(pe,z,oe,le),Ee=xe.length;if(Ee===0){oe=pe.type===Rr?pe.centerX:pe.endX,le=pe.type===Rr?pe.centerY:pe.endY,ma(y,oe,le,0,0);break}pe=null;for(var Fe=0;Fe<Ee;Fe++)pe=xe[Fe],it.Dl(pe[0],pe[1],pe[2],pe[3],pe[4],pe[5],pe[6],pe[7],.5,y);pe!==null&&(oe=pe[6],le=pe[7]);break;default:yt("Unknown Segment type: "+pe.type)}}}break;default:yt("Unknown Geometry type: "+a.type)}}yn.prototype.normalize=function(){this._isFrozen&&cn(this);var a=this.ix();return this.offset(-a.x,-a.y),new tt(-a.x,-a.y)},yn.prototype.offset=function(a,y){return this._isFrozen&&cn(this),this.transform(1,0,0,1,a,y),this},yn.prototype.scale=function(a,y){return this._isFrozen&&cn(this),this.transform(a,0,0,y,0,0),this},yn.prototype.rotate=function(a,y,x){this._isFrozen&&cn(this),y===void 0&&(y=0),x===void 0&&(x=0);var E=_t.alloc();return E.reset(),E.rotate(a,y,x),this.transform(E.m11,E.m12,E.m21,E.m22,E.dx,E.dy),_t.free(E),this},Le=yn.prototype,Le.transform=function(a,y,x,E,b,z){switch(this.type){case yn.j:case yn.u:case yn.F:var ne=this.od,re=this.pd;this.od=ne*a+re*x+b,this.pd=ne*y+re*E+z,ne=this.Dc,re=this.Ec,this.Dc=ne*a+re*x+b,this.Ec=ne*y+re*E+z;break;case yn.o:for(var oe=this.figures.s,le=oe.length,ue=0;ue<le;ue++){var pe=oe[ue];ne=pe.startX,re=pe.startY,pe.startX=ne*a+re*x+b,pe.startY=ne*y+re*E+z,pe=pe.segments.s;for(var xe=pe.length,Ee=0;Ee<xe;Ee++){var Fe=pe[Ee];switch(Fe.type){case or:case Ar:ne=Fe.endX,re=Fe.endY,Fe.endX=ne*a+re*x+b,Fe.endY=ne*y+re*E+z;break;case Cr:ne=Fe.point1X,re=Fe.point1Y,Fe.point1X=ne*a+re*x+b,Fe.point1Y=ne*y+re*E+z,ne=Fe.point2X,re=Fe.point2Y,Fe.point2X=ne*a+re*x+b,Fe.point2Y=ne*y+re*E+z,ne=Fe.endX,re=Fe.endY,Fe.endX=ne*a+re*x+b,Fe.endY=ne*y+re*E+z;break;case Lo:ne=Fe.point1X,re=Fe.point1Y,Fe.point1X=ne*a+re*x+b,Fe.point1Y=ne*y+re*E+z,ne=Fe.endX,re=Fe.endY,Fe.endX=ne*a+re*x+b,Fe.endY=ne*y+re*E+z;break;case Rr:ne=Fe.centerX,re=Fe.centerY,Fe.centerX=ne*a+re*x+b,Fe.centerY=ne*y+re*E+z,y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),Fe.startAngle+=ne),0>a&&(Fe.startAngle=180-Fe.startAngle,Fe.sweepAngle=-Fe.sweepAngle),0>E&&(Fe.startAngle=-Fe.startAngle,Fe.sweepAngle=-Fe.sweepAngle),Fe.radiusX*=Math.sqrt(a*a+x*x),Fe.radiusY!==void 0&&(Fe.radiusY*=Math.sqrt(y*y+E*E));break;case tr:if(ne=Fe.endX,re=Fe.endY,Fe.endX=ne*a+re*x+b,Fe.endY=ne*y+re*E+z,Fe.radiusX===0||Fe.radiusY===0)break;y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),Fe.xAxisRotation+=ne),0>a&&(Fe.xAxisRotation=180-Fe.xAxisRotation,Fe.isClockwiseArc=!Fe.isClockwiseArc),0>E&&(Fe.xAxisRotation=-Fe.xAxisRotation,Fe.isClockwiseArc=!Fe.isClockwiseArc),Fe.radiusX*=Math.sqrt(a*a+x*x),Fe.radiusY*=Math.sqrt(y*y+E*E);break;default:yt("Unknown Segment type: "+Fe.type)}}}}return this._isInvalidBounds=!0,this},Le.ca=function(a,y){y===void 0&&(y=0);var x=this.od,E=this.pd,b=this.Dc,z=this.Ec;switch(this.type){case yn.j:return it.Yb(x,E,b,z,y,a.x,a.y);case yn.u:var ne=gn.allocAt(Math.min(x,b)-y,Math.min(E,z)-y,Math.abs(b-x)+2*y,Math.abs(z-E)+2*y);return a=ne.ca(a),gn.free(ne),a;case yn.F:ne=Math.min(x,b)-y;var re=Math.min(E,z)-y;return x=(Math.abs(b-x)+2*y)/2,y=(Math.abs(z-E)+2*y)/2,0>=x||0>=y?!1:(ne=a.x-(ne+x),re=a.y-(re+y),1>=ne*ne/(x*x)+re*re/(y*y));case yn.o:return Ir(this,a,y,!0,!1);default:return!1}};function Ir(a,y,x,E,b){var z=y.x;y=y.y;for(var ne=a.bounds.x-20,re=0,oe,le,ue,pe,xe=a.figures.s,Ee=xe.length,Fe=0;Fe<Ee;Fe++){var Oe=xe[Fe],at=!Oe.isEvenOdd;if(Oe.isFilled){if(E&&Oe.ca(z,y,x))return!0;var Xe=Oe.segments;oe=Oe.startX,le=Oe.startY;for(var pt=oe,wt=le,Mt=Xe.s,It=0;It<=Xe.length;It++){var qt=void 0;if(It!==Xe.length){qt=Mt[It];var ei=qt.type;a=qt.endX,pe=qt.endY}else ei=or,a=pt,pe=wt;switch(ei){case Ar:if(pt=_r(z,y,ne,y,oe,le,pt,wt),isNaN(pt))return!0;re+=pt,pt=a,wt=pe;break;case or:if(oe=_r(z,y,ne,y,oe,le,a,pe),isNaN(oe))return!0;re+=oe;break;case Cr:ue=it.Fo(oe,le,qt.point1X,qt.point1Y,qt.point2X,qt.point2Y,a,pe,ne,y,z,y,.5),re+=ue;break;case Lo:ue=it.Fo(oe,le,(oe+2*qt.point1X)/3,(le+2*qt.point1Y)/3,(2*qt.point1X+a)/3,(2*qt.point1Y+pe)/3,a,pe,ne,y,z,y,.5),re+=ue;break;case Rr:case tr:ei=qt.type===Rr?$i(qt,Oe):Tr(qt,Oe,oe,le);var Si=ei.length;if(Si===0){if(oe=_r(z,y,ne,y,oe,le,qt.type===Rr?qt.centerX:qt.endX,qt.type===Rr?qt.centerY:qt.endY),isNaN(oe))return!0;re+=oe;break}qt=null;for(var fi=0;fi<Si;fi++){if(qt=ei[fi],fi===0){if(ue=_r(z,y,ne,y,oe,le,qt[0],qt[1]),isNaN(ue))return!0;re+=ue}ue=it.Fo(qt[0],qt[1],qt[2],qt[3],qt[4],qt[5],qt[6],qt[7],ne,y,z,y,.5),re+=ue}qt!==null&&(a=qt[6],pe=qt[7]);break;default:yt("Unknown Segment type: "+qt.type)}oe=a,le=pe}if(at){if(re!==0)return!0}else if(re%2!==0)return!0;re=0}else if(Oe.ca(z,y,b?x:x+2))return!0}return!1}function _r(a,y,x,E,b,z,ne,re){if(it.Yb(b,z,ne,re,.05,a,y))return NaN;var oe=(a-x)*(z-re);if(oe===0)return 0;var le=((a*E-y*x)*(b-ne)-(a-x)*(b*re-z*ne))/oe;if(y=(a*E-y*x)*(z-re)/oe,le>=a)return 0;if((b>ne?b-ne:ne-b)<(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(b<ne){if(le<b||le>ne)return 0}else if(le<ne||le>b)return 0;return 0<oe?1:-1}function jo(a,y,x,E){a=a.figures.s;for(var b=a.length,z=0;z<b;z++)if(a[z].ca(y,x,E))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===yn.j)return y.h(this.startX+a*(this.endX-this.startX),this.startY+a*(this.endY-this.startY)),y;for(var x=this.flattenedSegments,E=this.flattenedLengths,b=x.length,z=this.flattenedTotalLength*a,ne=0,re=0;re<b;re++){var oe=E[re],le=oe.length;for(a=0;a<le;a++){var ue=oe[a];if(ne+ue>=z)return E=z-ne,E=ue===0?0:E/ue,x=x[re],re=x[2*a],b=x[2*a+1],y.h(re+(x[2*a+2]-re)*E,b+(x[2*a+3]-b)*E),y;ne+=ue}}return y},Le.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===yn.j)return 180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI;for(var y=this.flattenedSegments,x=this.flattenedLengths,E=y.length,b=this.flattenedTotalLength*a,z=0,ne=0;ne<E;ne++){var re=x[ne],oe=re.length;for(a=0;a<oe;a++){var le=re[a];if(z+le>=b)return b=y[ne],y=b[2*a],x=b[2*a+1],E=b[2*a+2],a=b[2*a+3],1>Math.abs(E-y)&&1>Math.abs(a-x)?0:1>Math.abs(E-y)?0<=a-x?90:270:1>Math.abs(a-x)?0<=E-y?0:180:180*Math.atan2(a-x,E-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===yn.j)return y[0]=this.startX+a*(this.endX-this.startX),y[1]=this.startY+a*(this.endY-this.startY),y[2]=180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI,y;for(var x=this.flattenedSegments,E=this.flattenedLengths,b=x.length,z=this.flattenedTotalLength*a,ne=0,re=0;re<b;re++){var oe=E[re],le=oe.length;for(a=0;a<le;a++){var ue=oe[a];if(ne+ue>=z)return E=z-ne,E=ue===0?0:E/ue,ue=x[re],x=ue[2*a],re=ue[2*a+1],b=ue[2*a+2],a=ue[2*a+3],y[0]=x+(b-x)*E,y[1]=re+(a-re)*E,y[2]=1>Math.abs(b-x)&&1>Math.abs(a-re)?0:1>Math.abs(b-x)?0<=a-re?90:270:1>Math.abs(a-re)?0<=b-x?0:180:180*Math.atan2(a-re,b-x)/Math.PI,y;ne+=ue}}return y},Le.xx=function(a){if(this.type===yn.j){var y=this.startX,x=this.startY,E=this.endX,b=this.endY;if(y!==E||x!==b){var z=a.x;if(a=a.y,y===E){if(x<b){var ne=x;E=b}else ne=b,E=x;return a<=ne?ne===x?0:1:a>=E?E===x?0:1:Math.abs(a-x)/(E-ne)}if(x===b)return y<E?ne=y:(ne=E,E=y),z<=ne?ne===y?0:1:z>=E?E===y?0:1:Math.abs(z-y)/(E-ne);ne=(E-y)*(E-y)+(b-x)*(b-x);var re=tt.alloc();return it.qh(y,x,E,b,z,a,re),a=re.x,z=re.y,tt.free(re),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/ne)}}else if(this.type===yn.u){ne=this.startX,re=this.startY;var oe=this.endX;if(b=this.endY,ne!==oe||re!==b){y=oe-ne,x=b-re,z=2*y+2*x,E=a.x,a=a.y,E=Math.min(Math.max(E,ne),oe),a=Math.min(Math.max(a,re),b),ne=Math.abs(E-ne),oe=Math.abs(E-oe),re=Math.abs(a-re),b=Math.abs(a-b);var le=Math.min(ne,oe,re,b);if(le===re)return E/z;if(le===oe)return(y+a)/z;if(le===b)return(2*y+x-E)/z;if(le===ne)return(2*y+2*x-a)/z}}else{y=this.flattenedSegments,x=this.flattenedLengths,z=this.flattenedTotalLength,E=tt.alloc(),b=1/0,re=ne=0,oe=y.length;for(var ue=le=0,pe=0;pe<oe;pe++)for(var xe=y[pe],Ee=x[pe],Fe=xe.length,Oe=0;Oe<Fe;Oe+=2){var at=xe[Oe],Xe=xe[Oe+1];if(Oe!==0){it.qh(le,ue,at,Xe,a.x,a.y,E);var pt=(E.x-a.x)*(E.x-a.x)+(E.y-a.y)*(E.y-a.y);pt<b&&(b=pt,ne=re,ne+=Math.sqrt((E.x-le)*(E.x-le)+(E.y-ue)*(E.y-ue))),re+=Ee[(Oe-2)/2]}le=at,ue=Xe}return tt.free(E),a=ne/z,0>a?0:1<a?1:a}return 0};function po(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],E=[],b=[];if(a.type===yn.j)E.push(a.startX),E.push(a.startY),E.push(a.endX),E.push(a.endY),y.push(E),b.push(Math.sqrt((a.startX-a.endX)*(a.startX-a.endX)+(a.startY-a.endY)*(a.startY-a.endY))),x.push(b);else if(a.type===yn.u)E.push(a.startX),E.push(a.startY),E.push(a.endX),E.push(a.startY),E.push(a.endX),E.push(a.endY),E.push(a.startX),E.push(a.endY),E.push(a.startX),E.push(a.startY),y.push(E),b.push(Math.abs(a.startX-a.endX)),b.push(Math.abs(a.startY-a.endY)),b.push(Math.abs(a.startX-a.endX)),b.push(Math.abs(a.startY-a.endY)),x.push(b);else if(a.type===yn.F){var z=new ho;z.startX=a.endX,z.startY=(a.startY+a.endY)/2;var ne=new _i(Rr);if(ne.startAngle=0,ne.sweepAngle=360,ne.centerX=(a.startX+a.endX)/2,ne.centerY=(a.startY+a.endY)/2,ne.radiusX=Math.abs(a.startX-a.endX)/2,ne.radiusY=Math.abs(a.startY-a.endY)/2,z.add(ne),a=$i(ne,z),b=a.length,b===0)E.push(ne.centerX),E.push(ne.centerY);else{ne=z.startX,z=z.startY;for(var re=0;re<b;re++){var oe=a[re];it.Qe(ne,z,oe[2],oe[3],oe[4],oe[5],oe[6],oe[7],.5,E),ne=oe[6],z=oe[7]}}y.push(E),x.push(Go(E))}else for(a=a.figures.iterator;a.next();){b=a.value,E=[],E.push(b.startX),E.push(b.startY),ne=b.startX,z=b.startY,re=ne,oe=z;for(var le=b.segments.s,ue=le.length,pe=0;pe<ue;pe++){var xe=le[pe];switch(xe.type){case Ar:4<=E.length&&(y.push(E),x.push(Go(E))),E=[],E.push(xe.endX),E.push(xe.endY),ne=xe.endX,z=xe.endY,re=ne,oe=z;break;case or:E.push(xe.endX),E.push(xe.endY),ne=xe.endX,z=xe.endY;break;case Cr:it.Qe(ne,z,xe.point1X,xe.point1Y,xe.point2X,xe.point2Y,xe.endX,xe.endY,.5,E),ne=xe.endX,z=xe.endY;break;case Lo:it.ep(ne,z,xe.point1X,xe.point1Y,xe.endX,xe.endY,.5,E),ne=xe.endX,z=xe.endY;break;case Rr:var Ee=$i(xe,b),Fe=Ee.length;if(Fe===0){E.push(xe.centerX),E.push(xe.centerY),ne=xe.centerX,z=xe.centerY;break}for(var Oe=0;Oe<Fe;Oe++){var at=Ee[Oe];it.Qe(ne,z,at[2],at[3],at[4],at[5],at[6],at[7],.5,E),ne=at[6],z=at[7]}break;case tr:if(Ee=Tr(xe,b,ne,z),Fe=Ee.length,Oe=xe.endX,at=xe.endY,Fe===0){E.push(Oe),E.push(at),ne=Oe,z=at;break}for(Oe=0;Oe<Fe;Oe++)at=Ee[Oe],it.Qe(ne,z,at[2],at[3],at[4],at[5],at[6],at[7],.5,E),ne=at[6],z=at[7];break;default:yt("Segment not of valid type: "+xe.type)}xe.isClosed&&(E.push(re),E.push(oe))}4<=E.length&&(y.push(E),x.push(Go(E)))}}}function Go(a){for(var y=[],x=0,E=0,b=a.length,z=0;z<b;z+=2){var ne=a[z],re=a[z+1];z!==0&&y.push(Math.sqrt(qa(x,E,ne,re))),x=ne,E=re}return y}Le.add=function(a){return this.ee.add(a),this},Le.pm=function(a,y,x,E,b,z,ne,re){return this._isFrozen&&cn(this),this.fg=new bi(a,y,b,z).freeze(),this.gg=new bi(x,E,ne,re).freeze(),this},Ve.Object.defineProperties(yn.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},flattenedSegments:{get:function(){return po(this),this.tk}},flattenedLengths:{get:function(){return po(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===yn.j){a=Math.abs(this.endX-this.startX);var y=Math.abs(this.endY-this.startY);a=Math.sqrt(a*a+y*y)}else if(this.type===yn.u)a=2*Math.abs(this.endX-this.startX)+2*Math.abs(this.endY-this.startY);else{y=this.flattenedLengths;for(var x=y.length,E=a=0;E<x;E++)for(var b=y[E],z=b.length,ne=0;ne<z;ne++)a+=b[ne]}this.zm=a}return a}},type:{get:function(){return this.na},set:function(a){this.na!==a&&(this._isFrozen&&cn(this,a),this.na=a,a===yn.o?this.ee=new Nn:(yn.V===null&&(yn.V=new Nn().freeze()),this.ee=yn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&cn(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&cn(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&cn(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&cn(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&cn(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&cn(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&cn(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&cn(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),yn.prototype.setSpots=yn.prototype.pm,yn.prototype.add=yn.prototype.add,yn.prototype.getFractionForPoint=yn.prototype.xx,yn.prototype.getPointAndAngleAlongPath=yn.prototype.Qu,yn.prototype.getAngleAlongPath=yn.prototype.wx,yn.prototype.getPointAlongPath=yn.prototype.Pu,yn.prototype.containsPoint=yn.prototype.ca,yn.prototype.transform=yn.prototype.transform,yn.prototype.rotate=yn.prototype.rotate,yn.prototype.scale=yn.prototype.scale,yn.prototype.offset=yn.prototype.offset,yn.prototype.normalize=yn.prototype.normalize,yn.prototype.computeBoundsWithoutOrigin=yn.prototype.ix,yn.prototype.equalsApprox=yn.prototype.Xa,yn.className="Geometry",yn.j=new fn(yn,"Line",0),yn.u=new fn(yn,"Rectangle",1),yn.F=new fn(yn,"Ellipse",2),yn.o=new fn(yn,"Path",3),yn.V=null,yn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",yn.className="Geometry",yn.stringify=yn.ia,yn.fillPath=yn.nb,yn.parse=yn.parse,yn.Line=yn.j,yn.Rectangle=yn.u,yn.Ellipse=yn.F,yn.Path=yn.o;function ho(a,y,x,E,b){Zr(this),x===void 0&&(x=!0),E===void 0&&(E=!0),b===void 0&&(b=!1),this.l=2|(x?4:0)|(E?8:0)|(b?16:0),a!==void 0?this.od=a:this.od=0,y!==void 0?this.pd=y:this.pd=0,this.pl=new Nn,this.sr=this.pl.Ja,this.fw=null}ho.prototype.copy=function(){var a=new ho;a.l=this.l&-2,a.od=this.od,a.pd=this.pd;for(var y=this.pl.s,x=y.length,E=a.pl,b=0;b<x;b++){var z=y[b].copy();E.add(z)}return a.sr=this.sr,a.fw=this.fw,a},Le=ho.prototype,Le.Xa=function(a){if(!(a instanceof ho&&it.B(this.startX,a.startX)&&it.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 E=0;E<x;E++)if(!y[E].Xa(a[E]))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,E=x.length,b=0;b<E;b++)y+=" "+x[b].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 E=this.startX,b=this.startY,z=E,ne=b,re=this.segments.s,oe=re.length,le=0;le<oe;le++){var ue=re[le];switch(ue.type){case Ar:z=ue.endX,ne=ue.endY,E=ue.endX,b=ue.endY;break;case or:if(it.Yb(E,b,ue.endX,ue.endY,x,a,y))return!0;E=ue.endX,b=ue.endY;break;case Cr:if(it.cs(E,b,ue.point1X,ue.point1Y,ue.point2X,ue.point2Y,ue.endX,ue.endY,.5,a,y,x))return!0;E=ue.endX,b=ue.endY;break;case Lo:if(it.jv(E,b,ue.point1X,ue.point1Y,ue.endX,ue.endY,.5,a,y,x))return!0;E=ue.endX,b=ue.endY;break;case Rr:case tr:var pe=ue.type===Rr?$i(ue,this):Tr(ue,this,E,b),xe=pe.length,Ee=ue.type===Rr?ue.centerX:ue.endX,Fe=ue.type===Rr?ue.centerY:ue.endY;if(xe===0){if(it.Yb(E,b,Ee,Fe,x,a,y))return!0;E=Ee,b=Fe;break}for(Ee=null,Fe=0;Fe<xe;Fe++)if(Ee=pe[Fe],Fe===0&&it.Yb(E,b,Ee[0],Ee[1],x,a,y)||it.cs(Ee[0],Ee[1],Ee[2],Ee[3],Ee[4],Ee[5],Ee[6],Ee[7],.5,a,y,x))return!0;Ee!==null&&(E=Ee[6],b=Ee[7]);break;default:yt("Unknown Segment type: "+ue.type)}if(ue.isClosed&&(E!==z||b!==ne)&&it.Yb(E,b,z,ne,x,a,y))return!0}return!1},Ve.Object.defineProperties(ho.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&&cn(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&cn(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&cn(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&cn(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&cn(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&cn(this,a),this.pl=a,this._isInvalidBounds=!0}}}),ho.prototype.add=ho.prototype.add,ho.prototype.equalsApprox=ho.prototype.Xa,ho.className="PathFigure";function _i(a,y,x,E,b,z,ne,re){Zr(this),a===void 0&&(a=or),this.na=a,this.l=2,y!==void 0?this.Dc=y:this.Dc=0,x!==void 0?this.Ec=x:this.Ec=0,E===void 0&&(E=0),b===void 0&&(b=0),z===void 0&&(z=0),ne===void 0&&(ne=0),a===tr?(a=z%360,0>a&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(E,0),this.Pg=Math.max(b,0),typeof ne=="boolean"?ne&&(this.isLargeArc=!0):typeof ne=="number"&&ne&&(this.isLargeArc=!0),re&&(this.isClockwiseArc=!0)):(this.Ne=E,this.Vh=b,a===Rr&&(z=Math.max(z,0)),this.Wh=z,typeof ne=="number"?(a===Rr&&(ne=Math.max(ne,0)),this.Pg=ne):this.Pg=0),this.ae=null}_i.prototype.copy=function(){var a=new _i;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=_i.prototype,Le.Xa=function(a){if(!(a instanceof _i)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Ar:case or:return it.B(this.endX,a.endX)&&it.B(this.endY,a.endY);case Cr:return it.B(this.endX,a.endX)&&it.B(this.endY,a.endY)&&it.B(this.point1X,a.point1X)&&it.B(this.point1Y,a.point1Y)&&it.B(this.point2X,a.point2X)&&it.B(this.point2Y,a.point2Y);case Lo:return it.B(this.endX,a.endX)&&it.B(this.endY,a.endY)&&it.B(this.point1X,a.point1X)&&it.B(this.point1Y,a.point1Y);case Rr:return it.B(this.startAngle,a.startAngle)&&it.B(this.sweepAngle,a.sweepAngle)&&it.B(this.centerX,a.centerX)&&it.B(this.centerY,a.centerY)&&it.B(this.radiusX,a.radiusX)&&it.B(this.radiusY,a.radiusY);case tr:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&it.B(this.xAxisRotation,a.xAxisRotation)&&it.B(this.endX,a.endX)&&it.B(this.endY,a.endY)&&it.B(this.radiusX,a.radiusX)&&it.B(this.radiusY,a.radiusY);default:return!1}},Le.qb=function(a){a.classType===_i&&(this.type=a)},Le.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Ar:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case or:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Cr: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 Lo: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 Rr: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 tr: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 $i(a,y){if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;var x=a.radiusX,E=a.radiusY;if(E===void 0&&(E=x),x===0||E===0)return a.ae=[],a.ae;y=a.Ne;var b=a.Vh,z=it.jx(0,0,x<E?x:E,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==E){var ne=_t.alloc();ne.reset(),x<E?ne.scale(1,E/x):ne.scale(x/E,1),yn.Ha(z,ne),_t.free(ne)}for(x=z.length,E=0;E<x;E++)ne=z[E],ne[0]+=y,ne[1]+=b,ne[2]+=y,ne[3]+=b,ne[4]+=y,ne[5]+=b,ne[6]+=y,ne[7]+=b;return a.ae=z,a.ae}function Tr(a,y,x,E){function b(Oe,at,Xe,pt){return(Oe*pt<at*Xe?-1:1)*Math.acos((Oe*Xe+at*pt)/(Math.sqrt(Oe*Oe+at*at)*Math.sqrt(Xe*Xe+pt*pt)))}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 ne=Math.PI/180*a.Ne,re=a.isLargeArc,oe=a.isClockwiseArc,le=a.Dc,ue=a.Ec,pe=Math.cos(ne),xe=Math.sin(ne),Ee=pe*(x-le)/2+xe*(E-ue)/2;ne=-xe*(x-le)/2+pe*(E-ue)/2;var Fe=Ee*Ee/(y*y)+ne*ne/(z*z);return 1<Fe&&(y*=Math.sqrt(Fe),z*=Math.sqrt(Fe)),Fe=(re===oe?-1:1)*Math.sqrt((y*y*z*z-y*y*ne*ne-z*z*Ee*Ee)/(y*y*ne*ne+z*z*Ee*Ee)),isNaN(Fe)&&(Fe=0),re=Fe*y*ne/z,Fe=Fe*-z*Ee/y,isNaN(re)&&(re=0),isNaN(Fe)&&(Fe=0),x=(x+le)/2+pe*re-xe*Fe,E=(E+ue)/2+xe*re+pe*Fe,ue=b(1,0,(Ee-re)/y,(ne-Fe)/z),pe=(Ee-re)/y,le=(ne-Fe)/z,Ee=(-Ee-re)/y,re=(-ne-Fe)/z,ne=b(pe,le,Ee,re),Ee=(pe*Ee+le*re)/(Math.sqrt(pe*pe+le*le)*Math.sqrt(Ee*Ee+re*re)),-1>=Ee?ne=Math.PI:1<=Ee&&(ne=0),!oe&&0<ne&&(ne-=2*Math.PI),oe&&0>ne&&(ne+=2*Math.PI),oe=y>z?1:y/z,Ee=y>z?z/y:1,y=it.jx(0,0,y>z?y:z,ue,ue+ne,!0),z=_t.alloc(),z.reset(),z.translate(x,E),z.rotate(a.Ne,0,0),z.scale(oe,Ee),yn.Ha(y,z),_t.free(z),a.ae=y,a.ae}Ve.Object.defineProperties(_i.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&&cn(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&cn(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&cn(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&cn(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&cn(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&cn(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&cn(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&cn(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&cn(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&On(a,">= zero",_i,"radiusX"),this._isFrozen&&cn(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&On(a,">= zero",_i,"radiusY"),this._isFrozen&&cn(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&cn(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&&cn(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&&cn(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&&cn(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&&cn(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),_i.prototype.equalsApprox=_i.prototype.Xa;var Ar=new fn(_i,"Move",0),or=new fn(_i,"Line",1),Cr=new fn(_i,"Bezier",2),Lo=new fn(_i,"QuadraticBezier",3),Rr=new fn(_i,"Arc",4),tr=new fn(_i,"SvgArc",4);_i.className="PathSegment",_i.Move=Ar,_i.Line=or,_i.Bezier=Cr,_i.QuadraticBezier=Lo,_i.Arc=Rr,_i.SvgArc=tr;function cr(){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}cr.prototype.copy=function(){var a=new cr;return this.clone(a)},cr.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},cr.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},cr.prototype.So=function(a,y){var x=this.diagram;return x===null||Zd(x,a,y),y},cr.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(Zd(x,a,y),y.assign(x.Ps(y))),y},Ve.Object.defineProperties(cr.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}}}),cr.prototype.getMultiTouchDocumentPoint=cr.prototype.Bz,cr.prototype.getMultiTouchViewPoint=cr.prototype.So,cr.className="InputEvent";function lr(){this.H=null,this.xa="",this.ar=this.Lr=null}lr.prototype.copy=function(){var a=new lr;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},lr.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},Ve.Object.defineProperties(lr.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}}}),lr.className="DiagramEvent";function Ii(){this.Fm=Yr,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}Ii.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},Ii.prototype.copy=function(){var a=new Ii;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=Wt(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=Wt(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=Wt(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=Wt(y)&&typeof y.J=="function"?y.J():y,a},Ii.prototype.qb=function(a){a.classType===Ii&&(this.change=a)},Ii.prototype.toString=function(){var a="";return a=this.change===Do?a+"* ":this.change===Yr?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===Do?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=Ai(this.object)),this.oldValue!==null&&(a+=" old: "+Ai(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+Ai(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},Ii.prototype.I=function(a){return a?this.oldValue:this.newValue},Ii.prototype.Dz=function(a){return a?this.oldParam:this.newParam},Ii.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},Ii.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},Ii.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},Ii.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},Ve.Object.defineProperties(Ii.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===Do&&(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}}}),Ii.prototype.redo=Ii.prototype.redo,Ii.prototype.canRedo=Ii.prototype.canRedo,Ii.prototype.undo=Ii.prototype.undo,Ii.prototype.canUndo=Ii.prototype.canUndo,Ii.prototype.getParam=Ii.prototype.Dz,Ii.prototype.getValue=Ii.prototype.I,Ii.prototype.clear=Ii.prototype.clear;var Do=new fn(Ii,"Transaction",-1),Yr=new fn(Ii,"Property",0),ko=new fn(Ii,"Insert",1),Yo=new fn(Ii,"Remove",2);Ii.className="ChangedEvent",Ii.Transaction=Do,Ii.Property=Yr,Ii.Insert=ko,Ii.Remove=Yo;function br(){this.o=new Nn().freeze(),this.xa="",this.j=!1}br.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 E=this.changes.M(x);E!==null&&(y+=`
|
|
|
`+E.toString())}}return y},br.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()},br.prototype.canUndo=function(){return this.isComplete},br.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()}},br.prototype.canRedo=function(){return this.isComplete},br.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()}},br.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new xi,x=0;x<a.count;x++){var E=a.M(x);if(E!==null&&E.change===Yr&&E.object){var b=y.get(E.object);b||(b=new xi,y.set(E.object,b));var z=b.get(E.propertyName);z===null?b.set(E.propertyName,-1):(0<z&&a.cd(z,null),b.set(E.propertyName,x))}}for(x=y=0;x<a.count;x++)E=a.M(x),E!==null&&(x>y&&a.cd(y,E),y++);for(;a.length>y;)a.pop();a.freeze()}},Ve.Object.defineProperties(br.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}}}),br.prototype.optimize=br.prototype.ak,br.prototype.redo=br.prototype.redo,br.prototype.canRedo=br.prototype.canRedo,br.prototype.undo=br.prototype.undo,br.prototype.canUndo=br.prototype.canUndo,br.prototype.clear=br.prototype.clear,br.className="Transaction";function Oo(){this.Pt=new Ln,this.Jd=!1,this.u=new Nn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new Nn().freeze(),this.hl=new Nn,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}Oo.prototype.toString=function(a){var y="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;y+="[";for(var x=this.nestedTransactionNames.count,E=0;E<x;E++)0<E&&(y+=" "),y+=this.nestedTransactionNames.M(E);if(y+="]",a!==void 0&&0<a)for(x=this.history.count,E=0;E<x;E++)y+=`
|
|
|
`+this.history.M(E).toString(a-1);return y},Oo.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},Oo.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},Le=Oo.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=""),Bs(this,!0,a)},Le.Kf=function(){return Bs(this,!1,"")};function Bs(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&ri("Ending transaction without having started a transaction: "+x);var E=a.transactionLevel===1,b=a.currentTransaction;E&&y&&(a.isInternalTransaction||a.Ob("CommittingTransaction",x,b));var z=0;if(0<a.transactionLevel&&(a.bi--,a.isEnabled)){var ne=a.Ie.count;0<ne&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(ne-1),a.Ie.freeze()),ne=a.hl.count,0<ne&&(z=a.hl.M(ne-1),a.hl.mb(ne-1))}if(E){if(y)a.rq=!1,b===null&&x!==""&&(b=a.currentTransaction),a.isEnabled&&b!==null&&(b.isComplete||(b.isComplete=!0,b.name=x),a.lx(),y=a.history,y.ka(),E=a.maxHistoryLength,0<=E&&(E===0?y.clear():y.count>=E&&(z=y.M(0),z!==null&&z.clear(),y.mb(0),a.Ce--)),E===0||y.count!==0&&y.get(y.count-1)===b||(y.add(b),a.Ce++),y.freeze()),a.isInternalTransaction||a.Ob("CommittedTransaction",x,b);else{a.Fe=!0;try{a.isEnabled&&b!==null&&(b.isComplete=!0,b.undo())}finally{a.isInternalTransaction||a.Ob("RolledBackTransaction",x,b),a.Fe=!1}b!==null&&b.clear()}return a.Np=null,a.isPendingClear&&a.clear(),a.isPendingClear=!1,a.isPendingUnmodified=!1,!0}if(a.isEnabled&&!y&&b!==null){for(a=z,x=b.changes,b=x.count-1;b>=a;b--)y=x.M(b),y!==null&&y.undo(),x.ka(),x.mb(b);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()}},Oo.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},Oo.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){ri("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},Oo.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},Oo.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){ri("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},Oo.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var E=new Ii;for(E.change=Do,E.propertyName=a,E.object=x,E.oldValue=y,a=this.models;a.next();)y=a.value,E.model=y,y.ds(E)},Oo.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new br);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||ri("Change not within a transaction: "+x.toString()))}},Oo.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},Ve.Object.defineProperties(Oo.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}}}),Oo.prototype.handleChanged=Oo.prototype.Tu,Oo.prototype.redo=Oo.prototype.redo,Oo.prototype.undo=Oo.prototype.undo,Oo.prototype.canUndo=Oo.prototype.canUndo,Oo.prototype.discardHistoryAfterIndex=Oo.prototype.lx,Oo.prototype.rollbackTransaction=Oo.prototype.Kf,Oo.prototype.commitTransaction=Oo.prototype.eb,Oo.prototype.startTransaction=Oo.prototype.Ea,Oo.prototype.removeModel=Oo.prototype.Rx,Oo.prototype.addModel=Oo.prototype.Xw,Oo.prototype.clear=Oo.prototype.clear,Oo.className="UndoManager";function Wi(){Zr(this),this.H=ph,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new cr,this.Zr=-1}Wi.prototype.toString=function(){return this.name!==""?this.name+" Tool":li(this.constructor)},Wi.prototype.updateAdornments=function(){},Wi.prototype.canStart=function(){return this.isEnabled},Wi.prototype.doStart=function(){},Wi.prototype.doActivate=function(){this.isActive=!0},Wi.prototype.doDeactivate=function(){this.isActive=!1},Wi.prototype.doStop=function(){},Wi.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},Wi.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},Wi.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},Wi.prototype.doMouseMove=function(){},Wi.prototype.doMouseUp=function(){this.stopTool()},Wi.prototype.doMouseWheel=function(){},Wi.prototype.canStartMultiTouch=function(){return!0},Wi.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,tt.allocAt(NaN,NaN)),E=y.So(1,tt.allocAt(NaN,NaN));if(x.w()&&E.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){a.Bw=a.scale;var b=E.x-x.x,z=E.y-x.y;a.Jw=Math.sqrt(b*b+z*z),y.bubbles=!1}tt.free(x),tt.free(E)},Wi.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,tt.allocAt(NaN,NaN)),E=y.So(1,tt.allocAt(NaN,NaN));if(x.w()&&E.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){var b=E.x-x.x,z=E.y-x.y;z=Math.sqrt(b*b+z*z)/a.Jw,b=new tt((Math.min(E.x,x.x)+Math.max(E.x,x.x))/2,(Math.min(E.y,x.y)+Math.max(E.y,x.y))/2),z*=a.Bw;var ne=a.commandHandler;if(z!==a.scale&&ne.canResetZoom(z)){var re=a.zoomPoint;a.zoomPoint=b,ne.resetZoom(z),a.zoomPoint=re}y.bubbles=!1}tt.free(x),tt.free(E)},Wi.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},Wi.prototype.doKeyUp=function(){},Wi.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},Wi.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},Wi.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(Dr?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||(Dr?y.meta:y.control)||y.shift||a.clearSelection()}},Wi.prototype.standardMouseClick=function(a,y){a===void 0&&(a=null),y===void 0&&(y=function(b){return!b.layer.isTemporary});var x=this.diagram,E=x.lastInput;return a=x.ic(E.documentPoint,a,y),E.targetObject=a,Ia(a,E,x),E.handled};function Ia(a,y,x){if(y.handled=!1,a===null||a.If()){var E=0;y.left?E=y.clickCount===1?1:y.clickCount===2?2:1:y.right&&y.clickCount===1&&(E=3);var b="ObjectSingleClicked";if(a!==null){switch(E){case 1:b="ObjectSingleClicked";break;case 2:b="ObjectDoubleClicked";break;case 3:b="ObjectContextClicked"}E!==0&&x.R(b,a)}else{switch(E){case 1:b="BackgroundSingleClicked";break;case 2:b="BackgroundDoubleClicked";break;case 3:b="BackgroundContextClicked"}E!==0&&x.R(b)}if(a!==null)for(;a!==null;){switch(x=null,E){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,E){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)}}}Wi.prototype.standardMouseOver=function(){var a=this.diagram,y=a.lastInput;if(a.animationManager.zb!==!0){var x=a.skipsUndoManager;a.skipsUndoManager=!0;var E=a.viewportBounds.ca(y.documentPoint)?a.ic(y.documentPoint,null,null):null;!y.event||y.event.type!=="pointercancel"&&y.event.type!=="pointerout"||(E=null),y.targetObject=E;var b=!1;if(E!==a.Ck){var z=a.Ck,ne=z;for(a.Ck=E,this.doCurrentObjectChanged(z,E),y.handled=!1;z!==null;){var re=z.mouseLeave;if(re!==null&&(E===z||E!==null&&E.rg(z)||(re(y,z,E),b=!0,y.handled)))break;z=z.panel}for(z=ne,y.handled=!1;E!==null&&(ne=E.mouseEnter,!(ne!==null&&(z===E||z!==null&&z.rg(E)||(ne(y,E,z),b=!0,y.handled))));)E=E.panel;E=a.Ck}if(E!==null){for(z=E,ne="";z!==null&&(ne=z.cursor,ne==="");)z=z.panel;for(a.currentCursor=ne,y.handled=!1,z=E;z!==null&&(E=z.mouseOver,!(E!==null&&(E(y,z),b=!0,y.handled)));)z=z.panel}else this.doUpdateCursor(null),E=a.mouseOver,E!==null&&(E(y),b=!0);b&&a.$b(),a.skipsUndoManager=x}},Wi.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},Wi.prototype.doCurrentObjectChanged=function(){},Wi.prototype.standardMouseWheel=function(){var a=this.diagram,y=a.lastInput,x=y.delta;if(x!==0&&a.documentBounds.w()){var E=a.commandHandler,b=a.toolManager.mouseWheelBehavior;if(E!==null&&(b===ju&&!y.shift||b===Is&&y.control))(0<x?E.canIncreaseZoom():E.canDecreaseZoom())&&(b=a.zoomPoint,a.zoomPoint=y.viewPoint,0<x?E.increaseZoom():E.decreaseZoom(),a.zoomPoint=b),y.bubbles=!1;else if(b===ju&&y.shift||b===Is&&!y.control){E=a.position.copy();var z=y.event;b=z.deltaMode;var ne=z.deltaX;z=z.deltaY;var re="pixel";if(ne===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(b){case 0:re="pixel";break;case 1:re="line";break;case 2:re="page"}ne!==0&&a.allowHorizontalScroll&&(ne*=a.scrollHorizontalLineChange/16,a.scroll(re,0<ne?"right":"left",Math.abs(ne))),z!==0&&a.allowVerticalScroll&&(z*=a.scrollVerticalLineChange/16,a.scroll(re,0<z?"down":"up",Math.abs(z)))}this.doWheelChange(a,E,y)}}},Wi.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},Wi.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,E=y.clone(this.yy);this.Zr=xn(function(){x.doWaitAfter(E)},a)},Wi.prototype.cancelWaitAfter=function(){this.Zr!==-1&&rt.clearTimeout(this.Zr),this.Zr=-1},Wi.prototype.doWaitAfter=function(){},Wi.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof lo);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},Wi.prototype.isBeyondDragSize=function(a,y){var x=this.diagram;a===void 0&&(a=x.firstInput.viewPoint),y===void 0&&(y=x.lastInput.viewPoint);var E=x.toolManager.dragSize,b=E.width;return E=E.height,x.firstInput.isTouchEvent&&(b+=6,E+=6),Math.abs(y.x-a.x)>b||Math.abs(y.y-a.y)>E},Ve.Object.defineProperties(Wi.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Qt&&(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}}}),Wi.prototype.startTransaction=Wi.prototype.Ea,Wi.className="Tool";function Vr(){Wi.call(this),this.name="ToolManager",this.hb=new Nn,this.ob=new Nn,this.Hb=new Nn,this.F=this.V=850,this.o=new Xn(2,2).ja(),this.Ha=5e3,this.ia=Is,this.u=Bh,this.Mp=this.j=null,this.zj=-1}Ot(Vr,Wi),Vr.prototype.initializeStandardTools=function(){},Vr.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof lo&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},Vr.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===ru&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===zu){y.bubbles=!0;return}if(this.gestureBehavior===ru)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var x=this.mouseDownTools.length,E=0;E<x;E++){var b=this.mouseDownTools.M(E);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseDown());return}}a.lastInput.button===1&&(this.mouseWheelBehavior===Is?this.mouseWheelBehavior=ju:this.mouseWheelBehavior===ju&&(this.mouseWheelBehavior=Is)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},Vr.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===zu){y.bubbles=!0;return}if(this.gestureBehavior===ru)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomMove();return}}if(this.isActive)for(var x=this.mouseMoveTools.length,E=0;E<x;E++){var b=this.mouseMoveTools.M(E);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseMove());return}}_a(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function _a(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}Vr.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof lo&&(y===a||y.rg(a))||this.hideToolTip()},Vr.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()))},Vr.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)},Vr.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 lo)||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()},Vr.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof lo){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category="ToolTip",a.placeholder!==null&&(a.placeholder.scale=x.scale);var E=a.diagram;E!==null&&E!==x&&E.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionToolTip(a,y)}else a instanceof Fr&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(rt.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var b=this;this.zj=xn(function(){b.hideToolTip()},a)}},Vr.prototype.positionToolTip=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),E=a.measuredBounds,b=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=E.width),x.x+E.width>b.right&&(x.x-=E.width+5/y.scale),x.x<b.x&&(x.x=b.x),x.y=x.y+20/y.scale+E.height>b.bottom?x.y-(E.height+5/y.scale):x.y+20/y.scale,x.y<b.y&&(x.y=b.y),a.position=x}},Vr.prototype.hideToolTip=function(){this.zj!==-1&&(rt.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof lo?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Fr&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},Vr.prototype.doMouseUp=function(){this.cancelWaitAfter();var a=this.diagram;if(this.isActive)for(var y=this.mouseUpTools.length,x=0;x<y;x++){var E=this.mouseUpTools.M(x);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseUp());return}}a.doFocus(),this.doDeactivate()},Vr.prototype.doMouseWheel=function(){this.standardMouseWheel()},Vr.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},Vr.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},Vr.prototype.findTool=function(a){for(var y=this.mouseDownTools.length,x=0;x<y;x++){var E=this.mouseDownTools.M(x);if(E.name===a)return E}for(y=this.mouseMoveTools.length,x=0;x<y;x++)if(E=this.mouseMoveTools.M(x),E.name===a)return E;for(y=this.mouseUpTools.length,x=0;x<y;x++)if(E=this.mouseUpTools.M(x),E.name===a)return E;return null},Vr.prototype.replaceTool=function(a,y){y!==null&&(y.diagram=this.diagram);for(var x=this.mouseDownTools.length,E=0;E<x;E++){var b=this.mouseDownTools.M(E);if(b.name===a)return y!==null?this.mouseDownTools.cd(E,y):this.mouseDownTools.mb(E),b}for(x=this.mouseMoveTools.length,E=0;E<x;E++)if(b=this.mouseMoveTools.M(E),b.name===a)return y!==null?this.mouseMoveTools.cd(E,y):this.mouseMoveTools.mb(E),b;for(x=this.mouseUpTools.length,E=0;E<x;E++)if(b=this.mouseUpTools.M(E),b.name===a)return y!==null?this.mouseUpTools.cd(E,y):this.mouseUpTools.mb(E),b;return null},Vr.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)},Ve.Object.defineProperties(Vr.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 lo?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}}}),Vr.prototype.replaceStandardTool=Vr.prototype.gb;var Is=new fn(Vr,"WheelScroll",0),ju=new fn(Vr,"WheelZoom",1),Wh=new fn(Vr,"WheelNone",2),Bh=new fn(Vr,"GestureZoom",3),ru=new fn(Vr,"GestureCancel",4),zu=new fn(Vr,"GestureNone",5);Vr.className="ToolManager",Vr.WheelScroll=Is,Vr.WheelZoom=ju,Vr.WheelNone=Wh,Vr.GestureZoom=Bh,Vr.GestureCancel=ru,Vr.GestureNone=zu;function aa(){Wi.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 Ln().freeze(),this.ia=new ae,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var Ml;Ot(aa,Wi),aa.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},aa.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},aa.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,(Dr?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},aa.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),zt=null,this.isActive=!0,this.tl.set(a.position),Gh(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&&Js(a),Jf(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,zt=this,nn=this.diagram,this.doSimulatedDragOut()))};function Gh(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof Kn?(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 yi,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}aa.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},aa.prototype.Pd=function(a){return a===void 0?new fc(uo):this.isGridSnapEnabled?new fc(new tt(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new fc(a.copy())},aa.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),Nh(this),ud(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<Ml.count){for(var y=Ml,x=y.length,E=0;E<x;E++){var b=y.M(E);xu(b),ou(b),Nh(b),b.diagram.ug()}y.clear()}xu(this),this.tl.h(NaN,NaN),nn!==null&&(nn.currentCursor=""),zt=nn=null,ou(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),ad(a,!0)},aa.prototype.stopTransaction=function(){var a=this.diagram,y=Wi.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function Nh(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,Fc(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function Od(){var a=zt;ou(a),dh(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}aa.prototype.doCancel=function(){ou(this),dh(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},aa.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},aa.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function _u(a,y){if(a.copiedParts===null){var x=a.diagram;if((!y||!x.isReadOnly&&!x.isModelReadOnly)&&a.draggedParts!==null){var E=x.undoManager;for(E.isEnabled&&E.isInTransaction?E.currentTransaction!==null&&0<E.currentTransaction.changes.count&&(x.undoManager.Kf(),x.Ea("Drag")):dh(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 xi,E=a.draggedParts.iterator;E.next();){var b=E.key;if(b.Zc()&&b.canCopy()){var z=y.I(b);z!==null&&(z.location=b.location,z.Va(),x.add(z,a.Pd(z.location)))}}for(y=y.iterator;y.next();)E=y.value,E instanceof Kn&&E.canCopy()&&x.add(E,a.Pd());a.copiedParts=x,Gh(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Wc(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function ou(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 Kn&&(x.value.point=new tt(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function xu(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 Pu(a,y,x){var E=a.diagram,b=a.startPoint,z=tt.alloc();z.assign(E.lastInput.documentPoint),a.moveParts(y,z.re(b),x),tt.free(z),E.Gf("temporaryPixelRatio")===!0&&E.Yh===null&&30<E.$w&&(Js(E),E.hk())}aa.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var E=this.diagram;E!==null&&Ah(E,a,y,this.dragOptions,x)};function dh(a){if(a.draggedParts!==null){for(var y=a.diagram,x=a.draggedParts.iterator;x.next();){var E=x.key;E.Zc()&&(E.location=x.value.point)}for(x=a.draggedParts.iterator;x.next();)if(E=x.key,E instanceof Kn&&E.suspendsRouting){var b=x.value.point;a.draggedParts.add(E,a.Pd()),Wc(E,-b.x,-b.y)}y.bd()}}function Lc(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),Zn(a,!1));var E=a.findDragOverObject(y),b=x.lastInput;b.targetObject=E,a.doUpdateCursor(E);var z=x.skipsUndoManager,ne=!1;try{if(x.skipsUndoManager=!0,ne=Fc(a,b,E),!a.isActive&&zt===null)return;var re=E!==null?E.part:null;if(re===null||x.handlesDragDropForTopLevelParts&&re.isTopLevel&&!(re instanceof gr)){var oe=x.mouseDragOver;oe!==null&&(oe(b),ne=!0)}if(!a.isActive&&zt===null||(a.doDragOver(y,E),!a.isActive&&zt===null))return}finally{x.skipsUndoManager=z,ne&&x.bd()}a.Bn=E,x.isReadOnly||!x.allowMove&&!x.allowCopy||!x.allowHorizontalScroll&&!x.allowVerticalScroll||x.gs(b.viewPoint)}aa.prototype.findDragOverObject=function(a){var y=this;return nh(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof lo||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},aa.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 Fc(a,y,x){var E=!1,b=a.Cg.length,z=0<b?a.Cg[0]:null;if(x===z)return!1;y.handled=!1;for(var ne=0;ne<b;ne++){var re=a.Cg[ne],oe=re.mouseDragLeave;if(oe!==null&&(oe(y,re,x),E=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&zt===null||x===null)return E;for(y.handled=!1,b=x;b!==null;)a.Cg.push(b),b=Bc(b);for(b=a.Cg.length,x=0;x<b&&(ne=a.Cg[x],re=ne.mouseDragEnter,re===null||(re(y,ne,z),E=!0,!y.handled));x++);return E}function Bc(a){var y=a.panel;return y!==null?y:a instanceof Oi&&!(a instanceof gr)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function od(a,y,x){var E=a.Oe;if(E===null)return null;var b=a.diagram.og(y,E.portGravity,function(le){return E.findValidLinkablePort(le,x)});a=tt.alloc();var z=1/0,ne=null;for(b=b.iterator;b.next();){var re=b.value;if(re.part!==null){var oe=re.ga(Qr,a);oe=y.Bf(oe),oe<z&&(ne=re,z=oe)}}return tt.free(a),ne}function Zn(a,y){var x=a.draggedLink;if(x!==null&&!(2>x.pointsCount)){var E=a.diagram;if(!E.isReadOnly){var b=a.Oe;if(b!==null){var z=null,ne=null;x.fromNode===null&&(z=od(a,x.i(0),!1),z!==null&&(ne=z.part));var re=null,oe=null;x.toNode===null&&(re=od(a,x.i(x.pointsCount-1),!0),re!==null&&(oe=re.part)),b.isValidLink(ne,z,oe,re)?y?(x.defaultFromPoint=x.i(0),x.defaultToPoint=x.i(x.pointsCount-1),x.suspendsRouting=!1,x.fromNode=ne,z!==null&&(x.fromPortId=z.portId),x.toNode=oe,re!==null&&(x.toPortId=re.portId),x.fromPort!==E.Mx&&E.R("LinkRelinked",x,E.Mx),x.toPort!==E.Nx&&E.R("LinkRelinked",x,E.Nx)):ar(b,ne,z,oe,re):ar(b,null,null,null,null)}}}}aa.prototype.doDragOver=function(){};function Sr(a,y){var x=a.diagram;a.dragsLink&&Zn(a,!0),Nh(a);var E=a.findDragOverObject(y),b=x.lastInput;if(b.targetObject=E,E!==null){b.handled=!1;for(var z=E;z!==null;){var ne=z.mouseDrop;if(ne!==null&&(ne(b,z),b.handled))break;Jo(a,b,z),z=Bc(z)}}else z=x.mouseDrop,z!==null&&z(b);if(a.isActive||zt!==null){for(b=(a.copiedParts||a.draggedParts).iterator;b.next();)z=b.key,z instanceof oi&&z.linksConnected.each(function(re){re.suspendsRouting=!1});if(a.doDropOnto(y,E),a.isActive||zt!==null){for(a=gn.alloc(),y=x.selection.iterator;y.next();)E=y.value,E instanceof oi&&Je(x,E,a);gn.free(a)}}}function Jo(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof gr||(x=a.mouseDrop,x!==null&&x(y))}function Je(a,y,x){var E=!1;if(x=y.getAvoidableRect(x),a.viewportBounds.Re(x)&&(E=!0),a=a.Nu(x,function(b){return b.part},function(b){return b instanceof Kn},!0,function(b){return b instanceof Kn},E),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}aa.prototype.doDropOnto=function(){},aa.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()?(_u(this,!1),Jf(a,this.copiedParts),Pu(this,this.copiedParts,!1),ud(a,this.copiedParts)):this.mayMove()?(ou(this),Pu(this,this.draggedParts,!0)):this.mayDragOut()?(_u(this,!1),Pu(this,this.copiedParts,!1)):ou(this),Lc(this,a.lastInput.documentPoint))}},aa.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?(ou(this),_u(this,!0),Jf(a,this.copiedParts),Pu(this,this.copiedParts,!1),ud(a,this.copiedParts),this.copiedParts!==null&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0}))):(y=!0,ou(this),this.mayMove()&&(Pu(this,this.draggedParts,!0),Lc(this,a.lastInput.documentPoint))),this.Ym=!0,Sr(this,a.lastInput.documentPoint),this.isActive){var E=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&Ye(this),a.Ya(),ud(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",E)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},aa.prototype.simulatedMouseMove=function(a,y,x){if(zt===null)return!1;var E=zt.diagram;x instanceof Qt||(x=null);var b=nn;return x!==b&&(b!==null&&b!==E&&(b.ug(),zt.isDragOutStarted=!1,b=b.toolManager.findTool("Dragging"),b!==null&&b.doSimulatedDragLeave()),nn=x,x!==null&&x!==E&&(Od(),b=x.toolManager.findTool("Dragging"),b!==null&&(Ml.contains(b)||Ml.add(b),b.doSimulatedDragEnter())),this.doUpdateCursor(null)),x===null||x===E||!x.allowDrop||x.isReadOnly||!x.allowInsert?!1:(E=x.toolManager.findTool("Dragging"),E!==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,E.doSimulatedDragOver()),!0)},aa.prototype.simulatedMouseUp=function(a,y,x){if(zt===null)return!1;var E=nn,b=zt.diagram;if(x===null)return zt.doCancel(),!0;if(x!==E){var z=E.toolManager.findTool("Dragging");if(E!==null&&E!==b&&z!==null)return E.ug(),zt.isDragOutStarted=!1,z.doSimulatedDragLeave(),!1;nn=x,E=x.toolManager.findTool("Dragging"),E!==null&&(Od(),Ml.contains(E)||Ml.add(E),E.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=zt,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function Ye(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof oi&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}aa.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(Dr?!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())},aa.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())},aa.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())},aa.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},aa.prototype.Az=function(){return zt},aa.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=zt;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},aa.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),Ll(a),a.animationManager.Cc(),a=zt,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},aa.prototype.doSimulatedDragLeave=function(){var a=zt;a!==null&&a.doSimulatedDragOut(),this.doCancel()},aa.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=zt;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;jt(this,y.draggedParts.Lf(),!1,a.firstInput),Pu(this,this.copiedParts,!1),Lc(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},aa.prototype.doSimulatedDrop=function(){var a=this.diagram,y=zt;if(y!==null){var x=y.diagram;if(y.Ym=!0,ou(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),jt(this,y.draggedParts.Lf(),!0,a.lastInput),Pu(this,this.copiedParts,!1);var E=new Ln;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0,E.add(b)})),Sr(this,a.lastInput.documentPoint),a.Ya(),this.copiedParts!==null&&(this.transactionResult="ExternalCopy"),this.copiedParts=null,a.doFocus(),a.R("ExternalObjectsDropped",E,x),this.stopTransaction(),a.R("ChangedSelection",a.selection)}a.animationManager.Dm=!1};function jt(a,y,x,E){if(a.copiedParts===null){var b=a.diagram;if(!b.isReadOnly&&!b.isModelReadOnly){b.skipsUndoManager=!x,b.partManager.addsToTemporaryLayer=!x,a.startPoint=E.documentPoint,x=b.Kj(y,b,!0);var z=gn.alloc();b=E=1/0;for(var ne=-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<E&&(E=le),ue<b&&(b=ue),le>ne&&(ne=le),ue>re&&(re=ue))}}for(E===1/0?z.h(0,0,0,0):z.h(E,b,ne-E,re-b),E=z.x+z.width/2,b=z.y+z.height/2,gn.free(z),z=a.Fr,ne=new xi,re=tt.alloc(),oe=y.iterator;oe.next();)le=oe.value,le instanceof Kn&&le.canCopy()&&(ue=x.I(le),ue!==null&&(ue.points=le.points,Wc(ue,z.x-E,z.y-b),ue.suspendsRouting=!0,ne.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-(E-le.x),z.y-(b-le.y)),oe.location=re,oe.Va(),ne.add(oe,a.Pd(re))));tt.free(re),a.copiedParts=ne,Gh(a,ne.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Wc(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}aa.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},aa.prototype.computeMove=function(a,y,x,E){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,E):new tt},Ve.Object.defineProperties(aa.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}}}),aa.prototype.getDraggingSource=aa.prototype.Az;var zt=null,nn=null;aa.className="DraggingTool",Ml=new Nn,sr("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Vr.prototype.doCancel=function(){zt!==null&&zt.doCancel(),Wi.prototype.doCancel.call(this)};function Ht(){Wi.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new Kn,y=new Er;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new Er,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new oi,y=new Er,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=wo,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new oi,y=new Er,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=wo,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 xi,this.Of=this.gj=this.Pf=null}Ot(Ht,Wi),Ht.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},Ht.prototype.copyPortProperties=function(a,y,x,E,b){if(a!==null&&y!==null&&x!==null&&E!==null){var z=y.Df(),ne=Xn.alloc();ne.width=y.naturalBounds.width*z,ne.height=y.naturalBounds.height*z,E.desiredSize=ne,Xn.free(ne),b?(E.toSpot=y.toSpot,E.toEndSegmentLength=y.toEndSegmentLength):(E.fromSpot=y.fromSpot,E.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=Qr,z=tt.alloc(),x.location=y.ga(Qr,z),tt.free(z),E.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,E,b)}},Ht.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=wo,y.fromSpot=Fa,y.toSpot=Fa),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},Ht.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},Ht.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof oi){var y=this.targetPort.part;this.isForwards?this.copyPortProperties(y,this.targetPort,this.temporaryToNode,this.temporaryToPort,!0):this.copyPortProperties(y,this.targetPort,this.temporaryFromNode,this.temporaryFromPort,!1)}else this.isForwards?this.setNoTargetPortProperties(this.temporaryToNode,this.temporaryToPort,!0):this.setNoTargetPortProperties(this.temporaryFromNode,this.temporaryFromPort,!1);(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},Ht.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof oi))return null;for(;a!==null;){var E=y?a.toLinkable:a.fromLinkable;if(E===!0&&(a.portId!==null||a instanceof oi)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(E===!1)break;a=a.panel}return null},Ht.prototype.findTargetPort=function(a){var y=this.diagram,x=y.lastInput.documentPoint,E=this.portGravity;0>=E&&(E=.1);var b=this,z=y.og(x,E,function(pe){return b.findValidLinkablePort(pe,a)},null,!0);for(E=1/0,y=null,z=z.iterator;z.next();){var ne=z.value,re=ne.part;if(re instanceof oi){var oe=ne.ga(Qr,tt.alloc()),le=x.x-oe.x,ue=x.y-oe.y;tt.free(oe),oe=le*le+ue*ue,oe<E&&(le=this.validPortsCache.I(ne),le!==null?le&&(y=ne,E=oe):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,re,ne)||!a&&this.isValidLink(re,ne,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(ne,!0),y=ne,E=oe):this.validPortsCache.add(ne,!1))}}return y!==null&&(x=y.part,x instanceof oi&&(x.layer===null||x.layer.allowLink))?y:null},Ht.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},Ht.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},Ht.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},Ht.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof oi))return!1;a=a.portId,a===null&&(a="");var E=y.part;if(!(E instanceof oi))return!1;for(y=y.portId,y===null&&(y=""),y=E.Sd(y);y.next();)if(E=y.value,E.fromNode===x&&E.fromPortId===a)return!0;return!1},Ht.prototype.isValidLink=function(a,y,x,E){if(!this.isValidFrom(a,y)||!this.isValidTo(x,E)||!(y===null||E===null||(y.fromLinkableSelfNode&&E.toLinkableSelfNode||!this.isInSameNode(y,E))&&(y.fromLinkableDuplicates&&E.toLinkableDuplicates||!this.isLinked(y,E)))||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 b=a.linkValidation;if(b!==null&&!b(a,y,x,E,this.originalLink))return!1}return x!==null&&(b=x.linkValidation,b!==null&&!b(a,y,x,E,this.originalLink))?!1:(b=this.linkValidation,b!==null?b(a,y,x,E,this.originalLink):!0)},Ht.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 E=new Ln;return E.add(a),Mn(this,x,y,E)};function Mn(a,y,x,E){if(y===x)return!0;var b=y.fromNode;return b!==null&&b.isLinkLabel&&(E.add(b),Mn(a,b.labeledLink,x,E))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(E.add(y),Mn(a,y.labeledLink,x,E))))}Ht.prototype.isValidCycle=function(a,y,x){if(x===void 0&&(x=null),a===null||y===null)return this.isUnconnectedLinkValid;var E=this.diagram.validCycle;if(E!==Pf){if(E===rp){if(E=x||this.temporaryLink,E!==null&&!E.isTreeLink)return!0;for(E=y.linksConnected;E.next();){var b=E.value;if(b!==x&&b.isTreeLink&&b.toNode===y)return!1}return!Sn(this,a,y,x,!0)}if(E===op){if(E=x||this.temporaryLink,E!==null&&!E.isTreeLink)return!0;for(E=a.linksConnected;E.next();)if(b=E.value,b!==x&&b.isTreeLink&&b.fromNode===a)return!1;return!Sn(this,a,y,x,!0)}if(E===tp)return a===y?a=!0:(E=new Ln,E.add(y),a=Fn(this,E,a,y,x)),!a;if(E===np)return!Sn(this,a,y,x,!1);if(E===ip)return a===y?a=!0:(E=new Ln,E.add(y),a=Qn(this,E,a,y,x)),!a}return!0};function Sn(a,y,x,E,b){if(y===x)return!0;if(y===null||x===null)return!1;for(var z=y.linksConnected;z.next();){var ne=z.value;if(ne!==E&&(!b||ne.isTreeLink)&&ne.toNode===y&&(ne=ne.fromNode,ne!==y&&Sn(a,ne,x,E,b)))return!0}return!1}function Fn(a,y,x,E,b){if(x===E)return!0;if(x===null||E===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var ne=z.value;if(ne!==b&&ne.toNode===x&&(ne=ne.fromNode,ne!==x&&Fn(a,y,ne,E,b)))return!0}return!1}function Qn(a,y,x,E,b){if(x===E)return!0;if(x===null||E===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var ne=z.value;if(ne!==b){var re=ne.fromNode;if(ne=ne.toNode,re=re===x?ne:re,re!==x&&Qn(a,y,re,E,b))return!0}}return!1}Ve.Object.defineProperties(Ht.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}}}),Ht.className="LinkingBaseTool";function kn(){Ht.call(this),this.name="Linking",this.V={},this.F=null,this.K=Jn,this.Xd=null}Ot(kn,Ht),kn.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},kn.prototype.findLinkablePort=function(){var a=this.diagram,y=this.startObject;if(y===null&&(y=a.ic(a.firstInput.documentPoint,null,null)),y===null||(a=y.part,!(a instanceof oi)))return null;var x=this.direction;if(x===Jn||x===ki){var E=this.findValidLinkablePort(y,!1);if(E!==null||this.startObject===a&&(E=a.port,this.findValidLinkablePort(E,!1)))return this.isForwards=!0,E}return(x===Jn||x===wi)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},kn.prototype.doActivate=function(){var a=this.diagram,y=this.findLinkablePort();y===null?this.stopTool():(this.Ea(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.isForwards?(this.temporaryToNode!==null&&(this.temporaryToNode.location=a.lastInput.documentPoint),this.originalFromPort=y,y=this.originalFromPort.part,y instanceof oi&&(this.originalFromNode=y),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode,this.temporaryFromPort,!1)):(this.temporaryFromNode!==null&&(this.temporaryFromNode.location=a.lastInput.documentPoint),this.originalToPort=y,y=this.originalToPort.part,y instanceof oi&&(this.originalToNode=y),this.copyPortProperties(this.originalToNode,this.originalToPort,this.temporaryToNode,this.temporaryToPort,!0)),a.add(this.temporaryFromNode),this.temporaryFromNode&&this.temporaryFromNode.Va(),a.add(this.temporaryToNode),this.temporaryToNode&&this.temporaryToNode.Va(),this.temporaryLink!==null&&(this.temporaryFromNode!==null&&(this.temporaryLink.fromNode=this.temporaryFromNode),this.temporaryToNode!==null&&(this.temporaryLink.toNode=this.temporaryToNode),this.temporaryLink.isTreeLink=this.isNewTreeLink(),this.temporaryLink.bb(),a.add(this.temporaryLink)),this.isActive=!0)},kn.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;a.remove(this.temporaryLink),a.remove(this.temporaryFromNode),a.remove(this.temporaryToNode),a.isMouseCaptured=!1,a.currentCursor="",this.stopTransaction()},kn.prototype.doStop=function(){Ht.prototype.doStop.call(this),this.startObject=null},kn.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,E=null,b=null,z=null;try{var ne=this.targetPort=this.findTargetPort(this.isForwards);if(ne!==null){var re=ne.part;re instanceof oi&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),E=re,b=ne):(y=re,x=ne,this.originalToNode!==null&&(E=this.originalToNode,b=this.originalToPort)))}else this.isForwards?this.originalFromNode!==null&&this.isUnconnectedLinkValid&&(y=this.originalFromNode,x=this.originalFromPort):this.originalToNode!==null&&this.isUnconnectedLinkValid&&(E=this.originalToNode,b=this.originalToPort);y!==null||E!==null?(z=this.insertLink(y,x,E,b),z!==null?(ne===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,E,b)):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)}}},kn.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof Kn)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)},kn.prototype.insertLink=function(a,y,x,E){return this.diagram.partManager.insertLink(a,y,x,E)},kn.prototype.doNoLink=function(){},Ve.Object.defineProperties(kn.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 Jn=new fn(kn,"Either",0),ki=new fn(kn,"ForwardsOnly",0),wi=new fn(kn,"BackwardsOnly",0);kn.className="LinkingTool",kn.Either=Jn,kn.ForwardsOnly=ki,kn.BackwardsOnly=wi;function yi(){Ht.call(this),this.name="Relinking";var a=new Er;a.figure="Diamond",a.desiredSize=No,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new Er,a.figure="Diamond",a.desiredSize=No,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new gn}Ot(yi,Ht),yi.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Kn){var y="RelinkFrom",x=null;if(a.isSelected&&!this.diagram.isReadOnly){var E=a.selectionObject;E!==null&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&E.actualBounds.w()&&E.Ed()&&(x=a.Pj(y),x===null&&(x=this.makeAdornment(E,!1),a.bh(y,x)))}x===null&&a.Jf(y),y="RelinkTo",x=null,a.isSelected&&!this.diagram.isReadOnly&&(E=a.selectionObject,E!==null&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&E.actualBounds.w()&&E.Ed()&&(x=a.Pj(y),x===null?(x=this.makeAdornment(E,!0),a.bh(y,x)):x.v())),x===null&&a.Jf(y)}},yi.prototype.makeAdornment=function(a,y){var x=new lo;return x.type=Hn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},yi.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},yi.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 lo&&x.adornedPart instanceof Kn))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=yr),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=yr),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},yi.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===Pg||x===Gc)&&(x=pl),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}},yi.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()},yi.prototype.doStop=function(){Ht.prototype.doStop.call(this),this.handle=null},yi.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;this.transactionResult=null;var y=this.originalFromNode,x=this.originalFromPort,E=this.originalToNode,b=this.originalToPort,z=this.originalLink;try{if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null){var ne=this.targetPort.part;ne instanceof oi&&(this.isForwards?(E=ne,b=this.targetPort):(y=ne,x=this.targetPort))}else this.isUnconnectedLinkValid?this.isForwards?b=E=null:x=y=null:z=null;z!==null?(this.reconnectLink(z,this.isForwards?E:y,this.isForwards?b: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()}}},yi.prototype.reconnectLink=function(a,y,x,E){return x=x!==null&&x.portId!==null?x.portId:"",E?(a.toNode=y,a.toPortId=x):(a.fromNode=y,a.fromPortId=x),!0},yi.prototype.doNoRelink=function(){};function ar(a,y,x,E,b){y!==null?(a.copyPortProperties(y,x,a.temporaryFromNode,a.temporaryFromPort,!1),a.diagram.add(a.temporaryFromNode)):a.diagram.remove(a.temporaryFromNode),E!==null?(a.copyPortProperties(E,b,a.temporaryToNode,a.temporaryToPort,!0),a.diagram.add(a.temporaryToNode)):a.diagram.remove(a.temporaryToNode)}Ve.Object.defineProperties(yi.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 lo))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),yi.className="RelinkingTool",sr("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),sr("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function Mi(){Wi.call(this),this.name="LinkReshaping";var a=new Er;a.figure="Rectangle",a.desiredSize=ua,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new Er,a.figure="Diamond",a.desiredSize=No,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 Nn}Ot(Mi,Wi),Mi.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:Yi},Mi.prototype.om=function(a,y){a.reshapingBehavior=y},Mi.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Kn){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)}},Mi.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,E=y.isOrthogonal,b=null;if(y.points!==null&&1<x){b=new lo,b.type=Hn.Link,x=y.firstPickIndex;var z=y.lastPickIndex,ne=E?1:0;if(y.resegmentable&&y.computeCurve()!==pu)for(var re=x+ne;re<z-ne;re++){var oe=this.makeResegmentHandle(a,re);oe!==null&&(oe.segmentIndex=re,oe.segmentFraction=.5,oe.fromMaxLinks=999,b.add(oe))}for(ne=x+1;ne<z;ne++)if(re=this.makeHandle(a,ne),re!==null){if(re.segmentIndex=ne,ne!==x)if(ne===x+1&&E){oe=y.i(x);var le=y.i(x+1);it.B(oe.x,le.x)&&it.B(oe.y,le.y)&&(le=y.i(x-1)),it.B(oe.x,le.x)?(this.om(re,Xr),re.cursor="n-resize"):it.B(oe.y,le.y)&&(this.om(re,wr),re.cursor="w-resize")}else ne===z-1&&E?(oe=y.i(z-1),le=y.i(z),it.B(oe.x,le.x)&&it.B(oe.y,le.y)&&(oe=y.i(z+1)),it.B(oe.x,le.x)?(this.om(re,Xr),re.cursor="n-resize"):it.B(oe.y,le.y)&&(this.om(re,wr),re.cursor="w-resize")):ne!==z&&(this.om(re,so),re.cursor="move");b.add(re)}b.adornedObject=a}return b},Mi.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},Mi.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},Mi.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},Mi.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 Kn){if(this.Ts=y,a.isMouseCaptured=!0,this.Ea(this.name),y.resegmentable&&this.handle.fromMaxLinks===999){var x=y.points.copy(),E=this.getResegmentingPoint();if(x.Gb(this.handle.segmentIndex+1,E),y.isOrthogonal&&x.Gb(this.handle.segmentIndex+1,E),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}}},Mi.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},Mi.prototype.stopTransaction=function(){var a=this.diagram,y=Wi.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Mi.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},Mi.prototype.getResegmentingPoint=function(){return this.handle.ga(Qr)},Mi.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},Mi.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,E=y.i(x-1),b=y.i(x),z=y.i(x+1);if(y.isOrthogonal){if(x>y.firstPickIndex+1&&x<y.lastPickIndex-1){var ne=y.i(x-2);if(Math.abs(E.x-b.x)<this.resegmentingDistance&&Math.abs(E.y-b.y)<this.resegmentingDistance&&(Ui(this,ne,E,b,z,!0)||Ui(this,ne,E,b,z,!1))){var re=y.points.copy();Ui(this,ne,E,b,z,!0)?(re.cd(x-2,new tt(ne.x,(z.y+ne.y)/2)),re.cd(x+1,new tt(z.x,(z.y+ne.y)/2))):(re.cd(x-2,new tt((z.x+ne.x)/2,ne.y)),re.cd(x+1,new tt((z.x+ne.x)/2,z.y))),re.mb(x),re.mb(x-1),y.points=re,y.Wb()}else ne=y.i(x+2),Math.abs(b.x-z.x)<this.resegmentingDistance&&Math.abs(b.y-z.y)<this.resegmentingDistance&&(Ui(this,E,b,z,ne,!0)||Ui(this,E,b,z,ne,!1))&&(re=y.points.copy(),Ui(this,E,b,z,ne,!0)?(re.cd(x-1,new tt(E.x,(E.y+ne.y)/2)),re.cd(x+2,new tt(ne.x,(E.y+ne.y)/2))):(re.cd(x-1,new tt((E.x+ne.x)/2,E.y)),re.cd(x+2,new tt((E.x+ne.x)/2,ne.y))),re.mb(x+1),re.mb(x),y.points=re,y.Wb())}}else ne=tt.alloc(),it.qh(E.x,E.y,z.x,z.y,b.x,b.y,ne)&&ne.Bf(b)<this.resegmentingDistance*this.resegmentingDistance&&(E=y.points.copy(),E.mb(x),y.points=E,y.Wb()),tt.free(ne)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function Ui(a,y,x,E,b,z){return z?Math.abs(y.y-x.y)<a.resegmentingDistance&&Math.abs(x.y-E.y)<a.resegmentingDistance&&Math.abs(E.y-b.y)<a.resegmentingDistance:Math.abs(y.x-x.x)<a.resegmentingDistance&&Math.abs(x.x-E.x)<a.resegmentingDistance&&Math.abs(E.x-b.x)<a.resegmentingDistance}Mi.prototype.reshape=function(a){var y=this.adornedLink;y.uh();var x=this.handle.segmentIndex,E=this.Ru(this.handle);if(y.isOrthogonal)if(x===y.firstPickIndex+1)x=y.firstPickIndex+1,E===Xr?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):E===wr&&(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,E===Xr?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):E===wr&&(y.L(x-1,a.x,y.i(x-2).y),y.L(x,a.x,y.i(x+1).y));else{E=x;var b=y.i(E),z=y.i(E-1),ne=y.i(E+1);it.B(z.x,b.x)&&it.B(b.y,ne.y)?(it.B(z.x,y.i(E-2).x)&&!it.B(z.y,y.i(E-2).y)?(y.m(E,a.x,z.y),x++,E++):y.L(E-1,a.x,z.y),it.B(ne.y,y.i(E+2).y)&&!it.B(ne.x,y.i(E+2).x)?y.m(E+1,ne.x,a.y):y.L(E+1,ne.x,a.y)):it.B(z.y,b.y)&&it.B(b.x,ne.x)?(it.B(z.y,y.i(E-2).y)&&!it.B(z.x,y.i(E-2).x)?(y.m(E,z.x,a.y),x++,E++):y.L(E-1,z.x,a.y),it.B(ne.x,y.i(E+2).x)&&!it.B(ne.y,y.i(E+2).y)?y.m(E+1,a.x,ne.y):y.L(E+1,a.x,ne.y)):it.B(z.x,b.x)&&it.B(b.x,ne.x)?(it.B(z.x,y.i(E-2).x)&&!it.B(z.y,y.i(E-2).y)?(y.m(E,a.x,z.y),x++,E++):y.L(E-1,a.x,z.y),it.B(ne.x,y.i(E+2).x)&&!it.B(ne.y,y.i(E+2).y)?y.m(E+1,a.x,ne.y):y.L(E+1,a.x,ne.y)):it.B(z.y,b.y)&&it.B(b.y,ne.y)&&(it.B(z.y,y.i(E-2).y)&&!it.B(z.x,y.i(E-2).x)?(y.m(E,z.x,a.y),x++,E++):y.L(E-1,z.x,a.y),it.B(ne.y,y.i(E+2).y)&&!it.B(ne.x,y.i(E+2).x)?y.m(E+1,ne.x,a.y):y.L(E+1,ne.x,a.y)),y.L(x,a.x,a.y)}else y.L(x,a.x,a.y),E=y.fromNode,b=y.fromPort,E!==null&&(z=E.findVisibleNode(),z!==null&&z!==E&&(E=z,b=E.port)),x===1&&y.computeSpot(!0,b).Mc()&&(z=b.ga(Qr,tt.alloc()),E=y.getLinkPointFromPoint(E,b,z,a,!0,tt.alloc()),y.L(0,E.x,E.y),tt.free(z),tt.free(E)),E=y.toNode,b=y.toPort,E!==null&&(z=E.findVisibleNode(),z!==null&&z!==E&&(E=z,b=E.port)),x===y.pointsCount-2&&y.computeSpot(!1,b).Mc()&&(x=b.ga(Qr,tt.alloc()),a=y.getLinkPointFromPoint(E,b,x,a,!1,tt.alloc()),y.L(y.pointsCount-1,a.x,a.y),tt.free(x),tt.free(a));y.zf()},Mi.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case so:return a;case Xr:return new tt(y.i(x).x,a.y);case wr:return new tt(a.x,y.i(x).y);default:case Yi:return y.i(x)}},Ve.Object.defineProperties(Mi.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 lo))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}}}),Mi.prototype.setReshapingBehavior=Mi.prototype.om,Mi.prototype.getReshapingBehavior=Mi.prototype.Ru;var Yi=new fn(Mi,"None",0),wr=new fn(Mi,"Horizontal",1),Xr=new fn(Mi,"Vertical",2),so=new fn(Mi,"All",3);Mi.className="LinkReshapingTool",Mi.None=Yi,Mi.Horizontal=wr,Mi.Vertical=Xr,Mi.All=so,sr("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function pr(){Wi.call(this),this.name="Resizing",this.o=new Xn(1,1).freeze(),this.j=new Xn(9999,9999).freeze(),this.yg=new Xn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new Er;a.alignmentFocus=Qr,a.figure="Rectangle",a.desiredSize=ua,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new tt,this.Dw=new Xn,this.Tn=new tt,this.rt=new Xn(0,0),this.qt=new Xn(1/0,1/0),this.pt=new Xn(1,1)}Ot(pr,Wi),pr.prototype.updateAdornments=function(a){if(!(a===null||a instanceof Kn)){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(),pd(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},pr.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new lo,y.type=Hn.Spot,y.locationSpot=Qr;var x=new gl;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,cs)),y.add(this.makeHandle(a,Ol)),y.add(this.makeHandle(a,ys)),y.add(this.makeHandle(a,nl)),y.add(this.makeHandle(a,Aa)),y.add(this.makeHandle(a,rs)),y.add(this.makeHandle(a,Ka)),y.add(this.makeHandle(a,za))}else if($u(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},pr.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},pr.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=Qr),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 Hn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},pr.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},pr.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))},pr.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},pr.prototype.stopTransaction=function(){var a=this.diagram,y=Wi.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},pr.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},pr.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,E=this.pt,b=this.adornedObject.qs(a.lastInput.documentPoint,tt.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),a.bd(),tt.free(b)}},pr.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,E=this.pt,b=this.adornedObject.qs(a.lastInput.documentPoint,tt.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),tt.free(b),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},pr.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 gr){var E=new Nn;if(E.add(a),!this.dragsMembers&&a.placeholder===null){var b=new ae;b.dragsMembers=!1}y.moveParts(E,this.oppositePoint.copy().re(x),!0,b)}else a.location=a.location.copy().re(x).add(this.oppositePoint);y.bd()}},pr.prototype.computeResize=function(a,y,x,E,b,z){y.Mc()&&(y=Qr);var ne=this.adornedObject.naturalBounds,re=ne.x,oe=ne.y,le=ne.x+ne.width,ue=ne.y+ne.height,pe=1;if(!z){pe=ne.width;var xe=ne.height;0>=pe&&(pe=1),0>=xe&&(xe=1),pe=xe/pe}return xe=tt.alloc(),it.No(a.x,a.y,re,oe,b.width,b.height,xe),a=ne.copy(),0>=y.x?0>=y.y?(a.x=Math.max(xe.x,le-E.width),a.x=Math.min(a.x,le-x.width),a.width=Math.max(le-a.x,x.width),a.y=Math.max(xe.y,ue-E.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(pe*a.width,E.height),x.height),a.width=a.height/pe):(a.width=Math.max(Math.min(a.height/pe,E.width),x.width),a.height=pe*a.width),a.x=le-a.width,a.y=ue-a.height)):1<=y.y?(a.x=Math.max(xe.x,le-E.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(xe.y-oe,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(pe*a.width,E.height),x.height),a.width=a.height/pe):(a.width=Math.max(Math.min(a.height/pe,E.width),x.width),a.height=pe*a.width),a.x=le-a.width)):(a.x=Math.max(xe.x,le-E.width),a.x=Math.min(a.x,le-x.width),a.width=le-a.x,z||(a.height=Math.max(Math.min(pe*a.width,E.height),x.height),a.width=a.height/pe,a.y=oe+.5*(ue-oe-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(xe.x-re,E.width),x.width),a.y=Math.max(xe.y,ue-E.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(pe*a.width,E.height),x.height),a.width=a.height/pe):(a.width=Math.max(Math.min(a.height/pe,E.width),x.width),a.height=pe*a.width),a.y=ue-a.height)):1<=y.y?(a.width=Math.max(Math.min(xe.x-re,E.width),x.width),a.height=Math.max(Math.min(xe.y-oe,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(pe*a.width,E.height),x.height),a.width=a.height/pe):(a.width=Math.max(Math.min(a.height/pe,E.width),x.width),a.height=pe*a.width))):(a.width=Math.max(Math.min(xe.x-re,E.width),x.width),z||(a.height=Math.max(Math.min(pe*a.width,E.height),x.height),a.width=a.height/pe,a.y=oe+.5*(ue-oe-a.height))):0>=y.y?(a.y=Math.max(xe.y,ue-E.height),a.y=Math.min(a.y,ue-x.height),a.height=ue-a.y,z||(a.width=Math.max(Math.min(a.height/pe,E.width),x.width),a.height=pe*a.width,a.x=re+.5*(le-re-a.width))):1<=y.y&&(a.height=Math.max(Math.min(xe.y-oe,E.height),x.height),z||(a.width=Math.max(Math.min(a.height/pe,E.width),x.width),a.height=pe*a.width,a.x=re+.5*(le-re-a.width))),tt.free(xe),a},pr.prototype.computeReshape=function(){var a=In;return this.adornedObject instanceof Er&&(a=Ev(this.adornedObject)),!(a===Ci||this.diagram.lastInput.shift)},pr.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},pr.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},pr.prototype.computeCellSize=function(){var a=new Xn(NaN,NaN),y=this.adornedObject.part;return y!==null&&(y=y.resizeCellSize,!isNaN(y.width)&&0<y.width&&(a.width=y.width),!isNaN(y.height)&&0<y.height&&(a.height=y.height)),y=this.cellSize,isNaN(a.width)&&!isNaN(y.width)&&0<y.width&&(a.width=y.width),isNaN(a.height)&&!isNaN(y.height)&&0<y.height&&(a.height=y.height),y=this.diagram,(isNaN(a.width)||isNaN(a.height))&&y&&(y=y.grid,y!==null&&y.visible&&this.isGridSnapEnabled&&(y=y.gridCellSize,isNaN(a.width)&&!isNaN(y.width)&&0<y.width&&(a.width=y.width),isNaN(a.height)&&!isNaN(y.height)&&0<y.height&&(a.height=y.height))),(isNaN(a.width)||a.width===0||a.width===1/0)&&(a.width=1),(isNaN(a.height)||a.height===0||a.height===1/0)&&(a.height=1),a},Ve.Object.defineProperties(pr.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 lo))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 lo)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}}}),pr.className="ResizingTool",sr("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Ur(){Wi.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new tt,this.ue=null;var a=new Er;a.figure="Ellipse",a.desiredSize=No,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}Ot(Ur,Wi),Ur.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)}},Ur.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new lo,y.type=Hn.Position,y.locationSpot=Qr;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if($u(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Ur.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},Ur.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)},Ur.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(Qr)},Ur.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 E=this.handleDistance;return x===0?y.x=a.naturalBounds.width+E:x===45?(y.x=a.naturalBounds.width+E,y.y=a.naturalBounds.height+E):x===90?y.y=a.naturalBounds.height+E:x===135?(y.x=-E,y.y=a.naturalBounds.height+E):x===180?y.x=-E:x===225?(y.x=-E,y.y=-E):x===270?y.y=-E:x===315&&(y.x=a.naturalBounds.width+E,y.y=-E),a.ga(y)},Ur.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},Ur.prototype.stopTransaction=function(){var a=this.diagram,y=Wi.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ur.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Ur.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},Ur.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()},Ur.prototype.rotate=function(a){var y=this.adornedObject;if(y!==null){y.angle=a,y=y.part,y.Va();var x=y.locationObject,E=y.rotateObject;(x===E||x.rg(E))&&(x=this.Tn.copy(),y.location=x.re(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint)),this.diagram.bd()}},Ur.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},Ve.Object.defineProperties(Ur.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 lo))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 lo)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}}}),Ur.className="RotatingTool",sr("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function zo(){Wi.call(this),this.name="ClickSelecting"}Ot(zo,Wi),zo.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},zo.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},zo.className="ClickSelectingTool";function Pr(){Wi.call(this),this.name="Action",this.pk=null}Ot(Pr,Wi),Pr.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram,y=a.lastInput,x=a.ic(y.documentPoint,function(E){for(;E.panel!==null&&!E.isActionable;)E=E.panel;return E});return x!==null&&x.isActionable?(this.pk=x,a.Ck=a.ic(y.documentPoint,null,null),!0):!1},Pr.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()},Pr.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))}},Pr.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()},Pr.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())},Pr.prototype.doStop=function(){this.pk=null},Pr.className="ActionTool";function Wr(){Wi.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new tt(0,0)}Ot(Wr,Wi),Wr.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)},Wr.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},Wr.prototype.insertPart=function(a){var y=this.diagram,x=this.archetypeNodeData;if(x===null)return null;var E=null;try{if(y.R("ChangingSelection",y.selection),this.Ea(this.name),x instanceof Oi)x.Zc()&&($u(x),E=x.copy(),E!==null&&y.add(E));else if(x!==null){var b=y.model.copyNodeData(x);Wt(b)&&(y.model.xf(b),E=y.Lc(b))}if(E!==null){var z=tt.allocAt(a.x,a.y);this.isGridSnapEnabled&&Xf(this.diagram,E,a,z),E.location=z,y.allowSelect&&(y.clearSelection(!0),E.isSelected=!0),tt.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",E)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return E},Ve.Object.defineProperties(Wr.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}}}),Wr.className="ClickCreatingTool";function xr(){Wi.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new Oi;a.layerName="Tool",a.selectable=!1;var y=new Er;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Ot(xr,Wi),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 E=Xn.alloc().h(y.width,y.height);x.desiredSize=E,this.box.mm(y.x,y.y,!1),Xn.free(E),(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 gn(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),Dr?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 Nn,y=y.selection.iterator;y.next();){var E=y.value;a.contains(E)||x.add(E)}for(y=x.iterator;y.next();)y.value.isSelected=!1;for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0)}},Ve.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 Ki(){Wi.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(rt.document,"scroll",a.Kw,!1),a.stopTool()}}Ot(Ki,Wi),Ki.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())},Ki.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(rt.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},Ki.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},Ki.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},Ki.prototype.doMouseMove=function(){this.move()},Ki.prototype.doMouseUp=function(){this.move(),this.stopTool()},Ki.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,E=a.lastInput.documentPoint,b=y.x+x.x-E.x;x=y.y+x.y-E.y,a.allowHorizontalScroll||(b=y.x),a.allowVerticalScroll||(x=y.y),a.position=this.xy.h(b,x)}},Ve.Object.defineProperties(Ki.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),Ki.className="PanningTool",sr("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),sr("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),sr("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),sr("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),sr("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Fr(){this.F=this.u=this.j=this.o=null}Ve.Object.defineProperties(Fr.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}}}),Fr.className="HTMLInfo";function no(a,y,x){this.text=a,this.hx=y,this.visible=x}no.className="ContextMenuButtonInfo";function xo(){Wi.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()}}Ot(xo,Wi);function Eo(a){var y=new Fr;y.show=function(b,z,ne){ne.showDefaultContextMenu()},y.hide=function(b,z){z.hideDefaultContextMenu()},sa=y,a.tu=function(){a.stopTool()},y=An("div");var x=An("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 E=An("style");rt.document.getElementsByTagName("head")[0].appendChild(E),E.sheet.insertRule(".goCXul { list-style: none; }",0),E.sheet.insertRule(".goCXli {font:700 1.5em Helvetica, Arial, sans-serif;position: relative;min-width: 60px; }",0),E.sheet.insertRule(".goCXa {color: #444;display: inline-block;padding: 4px;text-decoration: none;margin: 2px;border: 1px solid gray;border-radius: 10px; }",0),E=a.diagram,E!==null&&(E.addEventListener(y,"contextmenu",mr,!1),E.addEventListener(y,"selectstart",mr,!1),E.addEventListener(x,"contextmenu",mr,!1)),y.className="goCXforeground",x.className="goCXbackground",rt.document.body&&(rt.document.body.appendChild(y),rt.document.body.appendChild(x)),$o=y,ts=x,os=!0}function mr(a){return a.preventDefault(),!1}xo.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)},xo.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},xo.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},xo.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,E=null;if(a instanceof Qt||(a instanceof Rt?E=a:E=y.ic(x.documentPoint,null,function(b){return!b.layer.isTemporary})),E!==null){for(a=E;a!==null;){if(a.contextMenu!==null)return a;a=a.panel}if(y.lastInput.isTouchEvent&&this.defaultTouchContextMenu)return E.part}else if(y.contextMenu!==null)return y;return null},xo.prototype.doActivate=function(){},xo.prototype.doMouseDown=function(){if(Wi.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof lo){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&Ho(this)},xo.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof lo){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}Ho(this)};function Ho(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var E=null;x instanceof Fr||(E=y.ic(y.lastInput.documentPoint,null,null),E!==null&&E.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(E)}}else a.canStart()&&(Vo(a,!0),a.isActive||a.stopTool())}xo.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function Vo(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=sa,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var E=x.contextMenu;E!==null?(a.currentObject=x instanceof Rt?x:null,a.showContextMenu(E,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof lo&&!a.currentContextMenu.visible&&a.stopTool()}}xo.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},xo.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof lo){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category=this.name,a.placeholder!==null&&(a.placeholder.scale=x.scale);var E=a.diagram;E!==null&&E!==x&&E.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionContextMenu(a,y)}else a instanceof Fr&&a.show(y,x,this);this.currentContextMenu=a},xo.prototype.positionContextMenu=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),E=a.measuredBounds,b=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=E.width),x.x+E.width>b.right&&(x.x-=E.width+5/y.scale),x.x<b.x&&(x.x=b.x),x.y+E.height>b.bottom&&(x.y-=E.height+5/y.scale),x.y<b.y&&(x.y=b.y),a.position=x}},xo.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof lo?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Fr&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function wa(a){var y=new Nn;return y.add(new no("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new no("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new no("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new no("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new no("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new no("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new no("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new no("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new no("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new no("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new no("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new no("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new no("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}xo.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=wa(this)),$o.innerHTML="",ts.addEventListener("pointerdown",this.tu,!1);var y=this,x=An("ul");x.className="goCXul",$o.appendChild(x),x.innerHTML="";for(var E=this.jt.iterator;E.next();){var b=E.value,z=b.visible;if(typeof b.hx=="function"&&(typeof z!="function"||z(a))){z=An("li"),z.className="goCXli";var ne=An("a");ne.className="goCXa",ne.href="#",ne.ky=b.hx,ne.addEventListener("pointerdown",function(re){return this.ky(a),y.stopTool(),re.preventDefault(),!1},!1),ne.textContent=b.text,z.appendChild(ne),x.appendChild(z)}}$o.style.display="block",ts.style.display="block"},xo.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===sa){$o.style.display="none",ts.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(ts,"pointerdown",this.tu,!1),this.currentContextMenu=null}},Ve.Object.defineProperties(xo.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof lo?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return os===!1&&sa===null&&Ba&&Eo(this),sa},set:function(a){a===null&&(os=!0),sa=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var sa=null,os=!1,ts=null,$o=null;xo.className="ContextMenuTool",sr("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function oo(){Wi.call(this),this.name="TextEditing",this.Zh=new Qo,this.ia=null,this.V=qr,this.vj=null,this.qa=eo,this.u=1,this.F=!0,this.o=null,this.j=new Fr,this.kt=null,pa(this,this.j)}Ot(oo,Wi);function pa(a,y){if(Ba){var x=An("textarea");a.kt=x,x.addEventListener("input",function(){if(a.textBlock!==null){var E=a.Lx(this.value);this.style.width=20+E.measuredBounds.width*this.wA+"px",this.rows=E.lineCount}},!1),x.addEventListener("keydown",function(E){if(!E.isComposing&&a.textBlock!==null){var b=E.key;b==="Enter"?(a.textBlock.isMultiline===!1&&E.preventDefault(),a.acceptText(mo)):b==="Tab"?(a.acceptText(bo),E.preventDefault()):b==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==eo){var E=a.kt;a.qa===_o&&(a.qa=ha),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==eo){var E=a.kt;typeof E.focus=="function"&&E.focus(),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),y.valueFunction=function(){return x.value},y.mainElement=x,y.show=function(E,b,z){if(E instanceof Qo&&z instanceof oo)if(z.state===Vs)x.style.border="3px solid red",x.focus();else{var ne=E.ga(Qr),re=b.position,oe=b.scale,le=E.Df()*oe;le<z.minimumEditorScale&&(le=z.minimumEditorScale);var ue=E.naturalBounds.width*le+6,pe=E.naturalBounds.height*le+2,xe=(ne.x-re.x)*oe;ne=(ne.y-re.y)*oe,re=E.verticalAlignment,oe=(E.lineHeight+E.spacingAbove+E.spacingBelow)*E.lineCount*le,pe=re.y*pe-re.y*oe+re.offsetY-(.5*pe-.5*oe)-oe/2,x.value=E.text,b.div.style.font=E.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=(xe-ue/2|0)-1+"px",x.style.top=(ne+pe|0)-1+"px",x.style.textAlign=E.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=E.lineCount,x.wA=le,x.className="goTXarea",b.div.appendChild(x),x.focus(),z.selectsTextOnActivate&&(x.select(),x.setSelectionRange(0,9999))}},y.hide=function(E){E.div.removeChild(x)}}}oo.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||hl&&hl!==this&&(hl.acceptText(Ms),hl&&hl!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Qo&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===qr&&!y.isSelected||this.starting===ya&&2>a.lastInput.clickCount)):!1},oo.prototype.doStart=function(){hl=this,this.textBlock!==null&&this.doActivate()},oo.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 Qo&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=_o;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var E=new gn(this.textBlock.ga(cs),this.textBlock.ga(ys));a.tv(E),x.show(y,a,this),this.currentTextEditor=x}}}},oo.prototype.doCancel=function(){this.stopTool()},oo.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},oo.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Ms)},oo.prototype.acceptText=function(a){switch(a){case Ms:this.qa===Ns?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===_o||this.qa===Vs||this.qa===ha)&&(this.qa=ca,as(this));break;case Va:case mo:case bo:(mo!==a||this.textBlock.isMultiline!==!0)&&(this.qa===_o||this.qa===Vs||this.qa===ha)&&(this.qa=ca,as(this))}};function as(a){var y=a.textBlock,x=a.diagram,E=a.currentTextEditor;if(y!==null&&E!==null){var b=y.text,z="";E.valueFunction!==null&&(z=E.valueFunction()),a.isValidText(y,b,z)?(a.Ea(a.name),a.qa=Ns,a.transactionResult=a.name,y.text=z,a.doSuccess(b,z),x!==null&&x.R("TextEdited",y,b),a.stopTransaction(),a.stopTool(),x!==null&&x.doFocus()):(a.qa=Vs,a.doError(b,z))}}oo.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)},oo.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},oo.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=eo,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},oo.prototype.doStop=function(){hl=null},oo.prototype.isValidText=function(a,y,x){var E=this.textValidation;return E!==null&&!E(a,y,x)?!1:(E=a.textValidation,!!(E===null||E(a,y,x)))},oo.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},Ve.Object.defineProperties(oo.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)}}}),oo.prototype.measureTemporaryTextBlock=oo.prototype.Lx;var Va=new fn(oo,"LostFocus",0),Ms=new fn(oo,"MouseDown",1),bo=new fn(oo,"Tab",2),mo=new fn(oo,"Enter",3),Mo=new fn(oo,"SingleClick",0),qr=new fn(oo,"SingleClickSelected",1),ya=new fn(oo,"DoubleClick",2),eo=new fn(oo,"StateNone",0),_o=new fn(oo,"StateActive",1),ha=new fn(oo,"StateEditing",2),ca=new fn(oo,"StateValidating",3),Vs=new fn(oo,"StateInvalid",4),Ns=new fn(oo,"StateValidated",5),hl=null;oo.className="TextEditingTool",oo.LostFocus=Va,oo.MouseDown=Ms,oo.Tab=bo,oo.Enter=mo,oo.SingleClick=Mo,oo.SingleClickSelected=qr,oo.DoubleClick=ya,oo.StateNone=eo,oo.StateActive=_o,oo.StateEditing=ha,oo.StateValidating=ca,oo.StateInvalid=Vs,oo.StateValidated=Ns,sr("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function Ca(a){Yl||(jl(),Yl=!0),this.H=ph,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=wu,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new Ln,this.ce=new La,this.ce.Yd=this,this.Ei=new Ln,this.pu=new Ln,this.Sr=new Ln,this.pr=new Ln,a&&Object.assign(this,a)}Ca.prototype.Xe=function(a){this.H=a},Ca.prototype.canStart=function(){return!0};function Us(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),As(a.H),a.zb=!0)}function ws(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,E=a.Zd.contains("Model");E&&(a.Ok=!0,a.Pk===wu?(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===su&&y.vc.clear(),a.Qw=!!(a.Pk===Cu&&x.du.D(x.pa)),x.R("InitialAnimationStarting",a)),E&&!a.Gh||y.vc.count===0?(a.Zd.clear(),a.zb=!1,y.vc.clear(),Xs(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,E=y.vc.get(x),x.autoScale!==rl&&E!==null&&(delete E.start.scale,delete E.end.scale),rt.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Js(x),Rd(x),a.zb=!1,y.start(),y.bc&&(ja(a),x.Ya(),kh(y,0),Ll(x,!0),ms(a),x.R("AnimationStarting",a)))}))}}function Rs(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function fh(a,y,x,E){a.isTicking||Rs(a)||y instanceof Kn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,E,!1)}Le=Ca.prototype,Le.fv=function(a){return this.ce.fv(a)},Le.Xu=function(a){return this.ce.Xu(a)};function Ea(a,y){function x(){if(0<b.Sr.count&&(E.addAll(b.Sr),b.Sr.clear(),b.bc=!0),b.bc!==!1&&E.count!==0){b.pu.addAll(E);for(var z=b.pu.iterator;z.next();){var ne=z.value;if(ne.bc!==!1){e:if(0<ne.yl.count)var re=!0;else{for(re=ne.vc.iterator;re.next();){var oe=re.key;if(oe instanceof Rt&&oe.diagram!==null||oe instanceof Qt){re=!0;break e}}re=!1}re?lu(ne,!1):ne.Xk=!0}}b.pu.clear(),b.bc!==!1&&(ja(b),Ll(b.H),ms(b)),rt.requestAnimationFrame(x)}}var E=a.Ei,b=a;a.bc?a.Sr.add(y):(a.bc=!0,E.add(y),rt.requestAnimationFrame(function(){x()}))}function Ta(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function ja(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 ms(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(),Xs(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),Xs(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),Za(this,a))},Le.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),fs(this.ce,y,"position",y.position,y.position),Za(this,a))};function js(a,y,x){!a.zb||y.D(x)||Rs(a)||(a.H.pi||(y=x.copy()),fs(a.ce,a.H,"position",y,x))}function ra(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function Za(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function zs(a,y,x,E,b){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var z=a[0],ne=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,ne=le):(ue===0||ue===100)&&(oe=z,le=ne),180<Math.abs(oe-z)&&(oe>z?z+=360:oe+=360),z=b(x,z,oe-z,E)%360,ne=b(x,ne,le-ne,E),re=b(x,re,ue-re,E),x=b(x,a,y-a,E),"hsla("+z+", "+ne+"%, "+re+"%, "+x+")"}function jl(){function a(x,E,b,z,ne,re){x.position=new tt(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re))}var y=new xi;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,E,b,z,ne,re){ne<re?x.mm(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re),!1):x.position=new tt(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re))}),y.add("location",function(x,E,b,z,ne,re){ne<re?x.mm(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re),!0):x.location=new tt(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re))}),y.add("position:placeholder",function(x,E,b,z,ne,re){ne<re?x.mm(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re),!1):x.position=new tt(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re))}),y.add("position:nodeCollapse",function(x,E,b,z,ne,re){var oe=x.actualBounds,le=b.actualBounds;b=le.x+le.width/2-oe.width/2,oe=le.y+le.height/2-oe.height/2,ne<re?x.mm(z(ne,E.x,b-E.x,re),z(ne,E.y,oe-E.y,re),!1):x.position=new tt(z(ne,E.x,b-E.x,re),z(ne,E.y,oe-E.y,re))}),y.add("desiredSize",function(x,E,b,z,ne,re){x.desiredSize=new gn(z(ne,E.width,b.width-E.width,re),z(ne,E.height,b.height-E.height,re))}),y.add("width",function(x,E,b,z,ne,re){x.width=z(ne,E,b-E,re)}),y.add("height",function(x,E,b,z,ne,re){x.height=z(ne,E,b-E,re)}),y.add("fill",function(x,E,b,z,ne,re){x.fill=zs(E,b,ne,re,z)}),y.add("stroke",function(x,E,b,z,ne,re){x.stroke=zs(E,b,ne,re,z)}),y.add("strokeWidth",function(x,E,b,z,ne,re){x.strokeWidth=z(ne,E,b-E,re)}),y.add("strokeDashOffset",function(x,E,b,z,ne,re){x.strokeDashOffset=z(ne,E,b-E,re)}),y.add("background",function(x,E,b,z,ne,re){x.background=zs(E,b,ne,re,z)}),y.add("areaBackground",function(x,E,b,z,ne,re){x.areaBackground=zs(E,b,ne,re,z)}),y.add("opacity",function(x,E,b,z,ne,re){x.opacity=z(ne,E,b-E,re)}),y.add("scale",function(x,E,b,z,ne,re){x.scale=z(ne,E,b-E,re)}),y.add("angle",function(x,E,b,z,ne,re){x.angle=z(ne,E,b-E,re)}),au=y}Ve.Object.defineProperties(Ca.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&&On(a,">= 1",Ca,"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}}}),Ca.prototype.stopAnimation=Ca.prototype.Cc;var au=null,Yl=!1,wu=new fn(Ca,"Default",1),Cu=new fn(Ca,"AnimateLocations",2),su=new fn(Ca,"None",3);Ca.className="AnimationManager",Ca.defineAnimationEffect=function(a,y){Yl||(jl(),Yl=!0),au.add(a,y)},Ca.Default=wu,Ca.AnimateLocations=Cu,Ca.None=su;function La(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=Eu,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=uo,this.vc=new xi,this.Tt=new xi,this.yl=new Ln,this.Ut=new Ln,this.dw=Oc,a&&Object.assign(this,a)}La.prototype.suspend=function(){this.Xk=!0},La.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,lu(this,!0),ja(this.Yd),Ll(this.H),ms(this.Yd),this.H.redraw()};function Xs(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=La.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 Qt?a=x:x instanceof Rt&&(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===wu&&this===y.defaultAnimation&&(this.Lp=th,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=wf),ja(y),this.yl.each(function(E){E.data=null,a.add(E)}),ms(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,Ea(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,E,b){if(y==="position"&&x.Xa(E))return this;if(this.H===null&&(a instanceof Qt?this.H=a:a instanceof Rt&&a.diagram!==null&&(this.H=a.diagram)),a instanceof Oi){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return fs(this,a,y,x,E,b),this};function fs(a,y,x,E,b,z){var ne=a.vc;if(y instanceof Qt&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(pc(E),av(),E=[gu.j,gu.u,gu.o,gu.F],pc(b),av(),b=[gu.j,gu.u,gu.o,gu.F]),ne.contains(y)){var re=ne.I(y),oe=re.start,le=re.end;oe[x]===void 0&&(oe[x]=Ha(E)),le[x]=Ha(b)}else oe={},le={},oe[x]=Ha(E),le[x]=Ha(b),re=oe.position,y instanceof Rt&&re instanceof tt&&!re.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&re.assign(le.position),re=new gh(oe,le,z),ne.add(y,re);ne=oe[x],ne instanceof tt&&!ne.w()&&ne.assign(a.o),z&&x.indexOf("position:")===0&&y instanceof Oi?re.Ku.location=Ha(y.location):z&&(re.Ku[x]=Ha(E))}function Ha(a){return a instanceof tt||a instanceof Xn?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 lu(a,y){if(!a.Xk||y){var x=a.Yd;if(a.bc!==!1){var E=+new Date,b=E>a.cn?a.Gd:E-a.Qd;y&&(b=a.gw,b<a.Gd?(a.Qd=+new Date-b,a.cn=a.Qd+a.Gd):b=a.Gd),ja(x),kh(a,b),Ll(a.H,!0),ms(x),E>a.cn&&(a.ho&&!a.Wk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Wk=!0):a.Ml(!1))}}}function kh(a,y){for(var x=a.Gd,E=a.vc.iterator,b=a.Wk;E.next();){var z=E.key;if(!(z instanceof Rt&&z.diagram===null)){var ne=E.value,re=b?ne.end:ne.start;ne=b?ne.start:ne.end;var oe=au,le;for(le in ne)le==="position"&&(ne["position:placeholder"]||ne["position:nodeCollapse"])||oe.get(le)===null||oe.get(le)(z,re[le],ne[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,ja(x);for(var E=this.vc,b=this.yl.iterator;b.next();)y.remove(b.value);for(b=this.Ut.iterator;b.next();)b.value.v();b=this.ho,E=E.iterator;for(var z=au;E.next();){var ne=E.key,re=E.value,oe=b?re.end:re.start,le=b?re.start:re.end,ue=re.Ku,pe;for(pe in le)if(z.get(pe)!==null){var xe=pe;!re.Hu||xe!=="position:nodeCollapse"&&xe!=="position:placeholder"||(xe="position"),z.get(xe)(ne,oe[pe],ue[pe]!==void 0?ue[pe]:re.Hu?oe[pe]:le[pe],this.Lp,this.Gd,this.Gd,this)}re.Hu&&ue.location!==void 0&&ne instanceof Oi&&(ne.location=ue.location),re.nv&&ne instanceof Oi&&ne.Zb(!1)}if(y.As.clear(),ad(y,!1),y.Ya(),y.N(),Ll(y,!0),x.defaultAnimation===this){for(pe=x.pr.iterator;pe.next();)b=pe.value,b.Tg!==null&&(b.points=b.Tg,b.Tg=null);x.pr.clear()}Ll(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),ms(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),Xs(this,null),x.Ml(this),y.$b())}},Le.Cj=function(a,y){var x=y.actualBounds,E=null;if(y instanceof gr&&(E=y.placeholder),E!==null?(x=E.ga(cs),E=E.padding,x.x+=E.left,x.y+=E.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 gr)for(a=a.memberParts;a.next();)E=a.value,E instanceof oi&&this.Cj(E,y)},Le.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof gr&&(x=y.placeholder),x!==null){var E=x.ga(cs);x=x.padding,E.x+=x.left,E.y+=x.top,this.add(a,"position:placeholder",a.position,E,!0)}else this.add(a,"position:nodeCollapse",a.position,y,!0);if(this.add(a,"scale",a.scale,.01,!0),E=this.vc,E.contains(a)&&(E.I(a).nv=!0),a instanceof gr)for(a=a.memberParts;a.next();)E=a.value,E instanceof oi&&this.Aj(E,y)}},Le.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},Ve.Object.defineProperties(La.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&On(a,">= 1",La,"duration"),this.Dg=a}},reversible:{get:function(){return this.ho},set:function(a){this.ho=a}},runCount:{get:function(){return this.cu},set:function(a){0<a?this.cu=a:yt("Animation.runCount value must be a positive integer.")}},finished:{get:function(){return this.dn},set:function(a){this.dn!==a&&(this.dn=a)}},easing:{get:function(){return this.ot},set:function(a){this.ot=a}},isViewportUnconstrained:{get:function(){return this.j},set:function(a){this.j=a}},isAnimating:{get:function(){return this.bc}}}),La.prototype.getTemporaryState=La.prototype.Ez,La.prototype.stop=La.prototype.stop,La.prototype.add=La.prototype.add,La.prototype.addTemporaryPart=La.prototype.Iy;function Eu(a,y,x,E){return a/=E/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function th(a,y,x,E){return a===E?y+x:x*(-Math.pow(2,-10*a/E)+1)+y}La.className="Animation",La.EaseLinear=function(a,y,x,E){return x*a/E+y},La.EaseInOutQuad=Eu,La.EaseInQuad=function(a,y,x,E){return x*(a/=E)*a+y},La.EaseOutQuad=function(a,y,x,E){return-x*(a/=E)*(a-2)+y},La.EaseInExpo=function(a,y,x,E){return a===0?y:x*Math.pow(2,10*(a/E-1))+y},La.EaseOutExpo=th;function gh(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}gh.className="AnimationState";function Xl(a,y,x){this.xd=null,this.rf=a,this.so=x||Ua,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=ks))}Xl.prototype.copy=function(){var a=new Xl(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 Sa(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))}Ve.Object.defineProperties(Xl.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 Ua=new fn(Xl,"Default",1),ks=new fn(Xl,"Immediate",2),Ya=new fn(Xl,"Bundled",3);Xl.className="AnimationTrigger",Xl.Default=Ua,Xl.Immediate=ks,Xl.Bundled=Ya;function fa(a){Zr(this),this.H=null,this.Pa=new Nn,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=fa.prototype,Le.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,el(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,E=0,b=0,z=0,ne=0,re=this.Pa.iterator;re.next();){var oe=re.value;oe instanceof gr?b++:oe instanceof oi?E++:oe instanceof Kn?z++:oe instanceof lo?ne++:x++}if(re="",0<x&&(re+=x+" Parts "),0<E&&(re+=E+" Nodes "),0<b&&(re+=b+" Groups "),0<z&&(re+=z+" Links "),0<ne&&(re+=ne+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,re+=`
|
|
|
`+x.toString(),E=x.data,E!==null&&Bi(E)&&(re+=" #"+Bi(E)),x instanceof oi?re+=" "+Ai(E):x instanceof Kn&&(re+=" "+Ai(x.fromNode)+" "+Ai(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 E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var b=tt.alloc(),z=this.Pa.s,ne=z.length;ne--;){var re=z[ne];if((E!==!0||pd(re)!==!1)&&re.isVisible()&&(b.assign(a),jr(b,re.oe),re=re.ic(b,y,x),re!==null&&(y!==null&&(re=y(re)),re!==null&&(x===null||x(re)))))return tt.free(b),re}return tt.free(b),null},Le.ji=function(a,y,x,E){if(y===void 0&&(y=null),x===void 0&&(x=null),E instanceof Nn||E instanceof Ln||(E=new Ln),this.Uh===!1)return E;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var z=tt.alloc(),ne=this.Pa.s,re=ne.length;re--;){var oe=ne[re];if((b!==!0||pd(oe)!==!1)&&oe.isVisible()){z.assign(a),jr(z,oe.oe);var le=oe;oe.ji(z,y,x,E)&&(y!==null&&(le=y(le)),le===null||x!==null&&!x(le)||E.add(le))}}return tt.free(z),E},Le.Cf=function(a,y,x,E,b){if(y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof Nn||b instanceof Ln||(b=new Ln),this.Uh===!1)return b;var z=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(z=!0);for(var ne=this.Pa.s,re=ne.length;re--;){var oe=ne[re];if((z!==!0||pd(oe)!==!1)&&oe.isVisible()){var le=oe;oe.Cf(a,y,x,E,b)&&(y!==null&&(le=y(le)),le===null||x!==null&&!x(le)||b.add(le))}}return b},Le.Nu=function(a,y,x,E,b,z,ne){if(this.Uh===!1)return b;for(var re=this.Pa.s,oe=re.length;oe--;){var le=re[oe];if((ne!==!0||pd(le)!==!1)&&z(le)&&le.isVisible()){var ue=le;le.Cf(a,y,x,E,b)&&(y!==null&&(ue=y(ue)),ue===null||x!==null&&!x(ue)||b.add(ue))}}return b},Le.og=function(a,y,x,E,b,z){if(x===void 0&&(x=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof Nn||b instanceof Ln)&&(z=b),b=!0),z instanceof Nn||z instanceof Ln||(z=new Ln),this.Uh===!1)return z;var ne=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(ne=!0);for(var re=tt.alloc(),oe=tt.alloc(),le=this.Pa.s,ue=le.length;ue--;){var pe=le[ue];if((ne!==!0||pd(pe)!==!1)&&pe.isVisible()){re.assign(a),jr(re,pe.oe),oe.h(a.x+y,a.y),jr(oe,pe.oe);var xe=pe;pe.og(re,oe,x,E,b,z)&&(x!==null&&(xe=x(xe)),xe===null||E!==null&&!E(xe)||z.add(xe))}}return tt.free(re),tt.free(oe),z},Le.Fd=function(a,y){if(this.visible){var x=this.Pa.s,E=x.length;if(E!==0){a=qn();for(var b=qn(),z=0;z<E;z++){var ne=x[z];if(ne.vw=z,ne instanceof Kn){if(ne.fd===!1)continue}else if(ne instanceof lo&&ne.adornedPart!==null)continue;var re=ne.actualBounds;ne.isVisible()&&Cl(re,y)?(ne.Fd(!0),a.push(ne)):(ne.Fd(!1),ne.adornments!==null&&0<ne.adornments.count&&b.push(ne))}for(y=0;y<a.length;y++)for(x=a[y],Ov(x),x=x.adornments;x.next();)E=x.value,E.measure(1/0,1/0),E.arrange(),E.Fd(!0);for(y=0;y<b.length;y++)Ov(b[y]);di(a),di(b)}}};function _s(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 E=x.length;if(E!==0){if(a.isTemporary)for(var b=0;b<E;b++)x[b].Gj();b=_s(this,a);var z=this.Zq;z.length=0;for(var ne=y.scale,re=gn.alloc(),oe=0;oe<E;oe++)this.Oj(a,x[oe],y,z,ne,re,!0);if(gn.free(re),a.isTemporary)for(y=0;y<E;y++)x[y].Gj();a.globalAlpha=b}}};function zl(a,y,x,E,b){if(a.visible&&a.pb!==0&&(b||!a.isTemporary)){b=a.Pa.s;var z=b.length;if(z!==0){var ne=_s(a,y),re=a.Zq;re.length=0;for(var oe=x.scale,le=gn.alloc(),ue=0;ue<z;ue++){var pe=b[ue];E.contains(pe)&&a.Oj(y,pe,x,re,oe,le,!1)}gn.free(le),y.globalAlpha=ne}}}Le.Oj=function(a,y,x,E,b,z,ne){if(ne&&!pd(y))a.Hs(y);else{if(E!==null&&y instanceof Kn&&(y.isOrthogonal&&E.push(y),y.fd===!1)){a.Hs(y);return}for(ne=!1,E=y.containingGroup;E!==null;)ne?E.tb!==null&&z.Ex(E.tb):E.tb!==null&&(ne=!0,z.assign(E.tb)),E=E.containingGroup;var re=y.actualBounds;if(E=!1,ne&&y.isVisible()){if(!z.Yc(re)){a.Hs(y);return}E=!z.Re(re)}E&&(a.save(),a instanceof Jl?a.bk=z.copy():(a.beginPath(),a.rect(z.x,z.y,z.width,z.height),a.clip())),re.width*b>x.Oq||re.height*b>x.Oq?y.gc(a,x):(b=y.actualBounds,z=y.naturalBounds,b.width===0||b.height===0||isNaN(b.x)||isNaN(b.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(Da(y,a,y.areaBackground,!0,!0,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.areaBackground===null&&y.background===null&&(Da(y,a,"rgba(0,0,0,0.3)",!0,!1,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.background!==null&&(a.transform(x.m11,x.m12,x.m21,x.m22,x.dx,x.dy),Da(y,a,y.background,!0,!1,z,b),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)))))),E&&(a.restore(),a.Vc(!0))}},Le.g=function(a,y,x,E,b){var z=this.diagram;z!==null&&z.cb(Yr,a,this,y,x,E,b)},Le.oi=function(a,y,x){var E=this.Pa;if(y.Ig=this,this===null&&el(y),a>=E.count)a=E.count;else if(E.M(a)===y)return-1;return E.Gb(a,y),y.Vo(x),E=this.diagram,E!==null&&(x?E.N():E.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 E=this.Pa;if(0>a||a>=E.length){if(a=E.indexOf(y),0>a)return-1}else if(E.M(a)!==y&&(a=E.indexOf(y),0>a))return-1;return y.Wo(x),E.mb(a),E=this.diagram,E!==null&&(x?E.N():E.pc(y)),y.Ig=null,el(y),a};function Zu(a,y,x){if(y=pf(a,y,x),x instanceof gr&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var E=-1,b=a.Pa.s,z=b.length,ne=0;ne<z;ne++){var re=b[ne];if(re===x&&(y=ne,0<=E)||0>E&&re.containingGroup===x&&(E=ne,0<=y))break}!(0>E)&&E<y&&(b=a.Pa,b.mb(y),b.Gb(E,x))}y=x.containingGroup,y!==null&&Zu(a,-1,y)}x.svg!==null&&x.svg.remove()}function pf(a,y,x){var E=x.zOrder;if(isNaN(E))return y;a=a.Pa;var b=a.count;if(1>=b)return y;if(0>y&&(y=a.indexOf(x)),0>y)return-1;for(var z=y-1,ne=NaN;0<=z&&(ne=a.M(z).zOrder,!!isNaN(ne));)z--;for(var re=y+1,oe=NaN;re<b&&(oe=a.M(re).zOrder,!!isNaN(oe));)re++;if(!isNaN(ne)&&ne>E)for(;;){if(z===-1||ne<=E){if(z++,z===y)break;return a.mb(y),a.Gb(z,x),z}for(ne=NaN;0<=--z&&(ne=a.M(z).zOrder,isNaN(ne)););}else if(!isNaN(oe)&&oe<E)for(;;){if(re===b||oe>=E){if(re--,re===y)break;return a.mb(y),a.Gb(re,x),re}for(oe=NaN;++re<b&&(oe=a.M(re).zOrder,isNaN(oe)););}return y}Ve.Object.defineProperties(fa.prototype,{parts:{get:function(){return this.Pa.iterator}},partsBackwards:{get:function(){return this.Pa.iteratorBackwards}},diagram:{get:function(){return this.H}},name:{get:function(){return this.xa},set:function(a){var y=this.xa;if(y!==a){var x=this.diagram;if(x!==null)for(y===""&&yt("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&yt("Layer.name is already present in this diagram: "+a);for(this.xa=a,this.g("name",y,a),a=this.Pa.iterator;a.next();)a.value.layerName=this.xa}}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&On(a,"0 <= value <= 1",fa,"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))}}}),fa.prototype.findObjectsNear=fa.prototype.og,fa.prototype.findObjectsIn=fa.prototype.Cf,fa.prototype.findObjectsAt=fa.prototype.ji,fa.prototype.findObjectAt=fa.prototype.ic,fa.className="Layer";function Qt(a,y){if(hm||(Qs(),hm=!0),Zr(this),ph=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,Ba){var x=this,E=function(){x.removeEventListener(rt.document,"DOMContentLoaded",E,!1),x.setRTL()};rt.document.body!==null?this.setRTL():x.addEventListener(rt.document,"DOMContentLoaded",E,!1)}this.ol=null,ig.add("Model",Io);var b=this;return this.Hb=function(z){var ne=b.partManager;if(z.model===ne.diagram.model&&ne.diagram.aa){ne.diagram.aa=!1;try{var re=z.change;z.modelChange===""&&re===Yr&&ne.updateDataBindings(z.object,z.propertyName)}finally{ne.diagram.aa=!0}}},this.Oc=function(z){b.partManager.doModelChanged(z)},this.hu=this.ku=null,mf(this),this.model=hy(),this.Wg=!0,sd(this),this.layout=new da,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 cm,a!==void 0&&(typeof a=="string"||rt.Element&&a instanceof Element?Id(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var $h,ph;function mf(a){a.Yd=new Ca,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new Nn,a.pj=new xi,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 _t,a.zu=new tt(NaN,NaN).freeze(),a.ut=new gn(NaN,NaN,NaN,NaN).freeze(),a.rj=new Di(0,0,0,0).freeze(),a.sj=Oc,a.nu=!1,a.Zt=null,a.fu=null,a.yh=rl,a.zk=Co,a.Fg=rl,a.pq=Co,a.yt=cs,a.Bt=cs,a.Fc=!0,a.pn=!1,a.De=new Ln,a.Eh=new xi,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Di(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new cr,a.bq.diagram=a,a.Qg=new cr,a.Qg.diagram=a,a.cj=new cr,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,tv(a),a.ai=new Ln,a.Ht=!0,a.uu=Ic,a.pw=!1,a.wu=Pf,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 xi,a.Xn=new Nn,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 Di(5).freeze(),a.Hw=new Ln().freeze(),a.Nt=999999999,a.nw=new Ln().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 Ln,a.ow=new Ln,a.Xh=null,a.aw=new Xn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new tt,bounds:new gn,Py:new Xn,bA:new Xn,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new gn(NaN,NaN,NaN,NaN).freeze(),a.wo=new Xn(NaN,NaN).freeze(),a.Sp=new gn(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new xi;var y=new oi,x=new Qo;x.bind(new Xa("text","",Ai)),y.add(x),a.ny=y,a.Lg.add("",y),y=new oi,x=new Qo,x.stroke="brown",x.bind(new Xa("text","",Ai)),y.add(x),a.Lg.add("Comment",y),y=new oi,y.selectable=!1,y.avoidable=!1,x=new Er,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new Xn(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new xi,y=new gr,y.selectionObjectName="GROUPPANEL",y.type=Hn.Vertical,x=new Qo,x.font="bold 12pt sans-serif",x.bind(new Xa("text","",Ai)),y.add(x),x=new Hn(Hn.Auto),x.name="GROUPPANEL";var E=new Er;E.figure="Rectangle",E.fill="rgba(128,128,128,0.2)",E.stroke="black",x.add(E),E=new gl,E.padding=new Di(5,5,5,5).ja(),x.add(E),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new xi,y=new Kn,x=new Er,x.isPanelMain=!0,y.add(x),x=new Er,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new Kn,x=new Er,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new lo,y.type=Hn.Auto,x=new Er,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new gl,x.margin=new Di(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new lo,y.type=Hn.Link,x=new Er,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 Io,a.toolManager=new Vr,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=cc(),a.eq=null,a.fq=ia,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}Qt.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),Kd=null,cd="",Nc(this,!1),this.Xn.clear(),mg(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function Nc(a,y){a.animationManager.Cc(!0),a.Hw=new Ln().freeze(),a.nw=new Ln().freeze();var x=a.skipsUndoManager,E=a.cc!==null&&a.cc!==void 0;E&&(a.skipsUndoManager=!0);var b=null;a.fe!==null&&(b=a.fe.part,b!==null&&a.remove(b));var z=[],ne=a.Wa.length;if(y){for(y=0;y<ne;y++)for(var re=a.Wa.s[y].parts;re.next();){var oe=re.value;oe!==b&&oe.data===null&&z.push(oe)}for(y=0;y<z.length;y++)a.remove(z[y])}for(y=0;y<ne;y++)a.Wa.s[y].clear();return a.partManager.clear(),a.De.clear(),a.Eh.clear(),a.ai.clear(),a.Ck=null,a.Xn.clear(),mg(),a.Og.clear(),ir=[],b!==null&&(a.add(b),a.partManager.parts.remove(b)),E&&(a.skipsUndoManager=x),z}function cc(){return null}Qt.prototype.reset=function(){this.clear(),this.vb=!0,mf(this),Dh(this),this.Wg=!0,sd(this),this.layout=new da,this.Wg=!1,this.model=hy(),this.model.undoManager=new Oo,this.vb=this.rn=!1,this.N()},Qt.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=rt.document.body);var y=An("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},Qt.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=rt.document.body);var y=0;if(Ba){var x=um;y=$h,x===null&&(x=um=An("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=$h=An("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 E=x.offsetWidth;y.style.overflow="scroll",x=x.offsetWidth,E===x&&(x=y.clientWidth),a.removeChild(y),y=E-x,y!==0||Dr||(y=11)}this.Db=y,this.Gw=!0},Qt.prototype.qb=function(a){a.classType===Qt&&(this.autoScale=a)},Qt.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 Id(a,y){if(Ba){if(y!=null||yt("Diagram setup requires an argument DIV."),a.Ka!==null&&yt("Diagram has already completed setup."),typeof y=="string"?a.Ka=rt.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:yt("No DIV or DIV id supplied: "+y),a.Ka===null&&yt("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&yt("Invalid div id; div already has a Diagram associated with it."),!a.ol&&rt.ResizeObserver){var x=on(function(){a.$b()},250);a.ol=new rt.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}rt.getComputedStyle(a.Ka,null).position==="static"&&(a.Ka.style.position="relative"),y=5;var E="rgba(2"+y+"5, 255, 255, 0)";y--,a.Ka.style["-webkit-tap-highlight-color"]=E,a.Ka.innerHTML="",a.Ka.H=a,a.Ka.goDiagram=a,a.Ka.go=rt.go;var b=new Gu(a);if(b.style!==void 0&&(b.style.position="absolute",b.style.top="0px",b.style.left="0px",rt.getComputedStyle(a.Ka,null).getPropertyValue("direction")==="rtl"&&(a.tn=!0),b.style.zIndex="2",b.style.userSelect="none",b.style.MozUserSelect="none",b.style.touchAction="none",b.style.letterSpacing="normal !important",b.style.wordSpacing="normal !important"),a.ta=b,a.ib=b.context,E=a.ib,a.Mb=a.computePixelRatio(),a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1),Gd(a,a.Aa,a.ya),a.Ka.insertBefore(b.Oa,a.Ka.firstChild),b=new Gu(null),b.width=1,b.height=1,a.jw=b,a.oy=b.context,Ba){b=An("div");var z=An("div");b.style.position="absolute",b.style.overflow="auto",b.style.width=a.Aa+"px",b.style.height=a.ya+"px",b.style.zIndex="1",z.style.position="absolute",z.style.width="1px",z.style.height="1px",a.Ka.appendChild(b),b.appendChild(z),b.onscroll=Uf,b.addEventListener("pointerdown",yf),b.H=a,b.uy=!0,b.vy=!0,a.ku=b,a.hu=z}a.hk=on(function(){a.Yh=null,a.N()},300),a.Ov=on(function(){Rd(a)},250),a.preventDefault=function(ne){return ne.preventDefault(),!1},a.$j=function(ne){if(a.isEnabled){var re=_l(a,ne,!0);re.bubbles=!0;var oe=0,le=0;re.delta=0,ne.deltaX!==void 0?(ne.deltaX!==0&&(oe=0<ne.deltaX?1:-1),ne.deltaY!==0&&(le=0<ne.deltaY?1:-1),re.delta=Math.abs(ne.deltaX)>Math.abs(ne.deltaY)?-oe:-le):ne.wheelDeltaX!==void 0?(ne.wheelDeltaX!==0&&(oe=0<ne.wheelDeltaX?-1:1),ne.wheelDeltaY!==0&&(le=0<ne.wheelDeltaY?-1:1),re.delta=Math.abs(ne.wheelDeltaX)>Math.abs(ne.wheelDeltaY)?-oe:-le):ne.wheelDelta!==void 0&&ne.wheelDelta!==0&&(re.delta=0<ne.wheelDelta?1:-1),a.doMouseWheel(),hu(re,ne)}},a.aA=function(ne){a.isEnabled&&(a.Vk=!1,_l(a,ne,!0),ne=a.currentTool,ne.cancelWaitAfter(),ne.standardMouseOver())},a.ui=function(ne){if(a.isEnabled){a.Vk=!0;var re=a.Yt;re[ne.pointerId]===void 0&&(re[ne.pointerId]=ne),re=a.oj;var oe=!1;if(re[0]===null||re[0].pointerId!==ne.pointerId&&re[0].pointerType===ne.pointerType)if(re[1]!==null&&re[1].pointerId===ne.pointerId)re[1]=ne,oe=!0;else if(re[0]===null)re[0]=ne;else if(re[1]===null)re[1]=ne,oe=!0;else{ne.preventDefault();return}else re[0]=ne;(re=ne.pointerType==="touch"||ne.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var le=oe;oe=_d(a,ne,!0,!1,!0,le),Tc(a,ne,oe),oe.targetDiagram=zd(ne,ne.target),oe.targetObject=null,le||oe.clone(a.bq),le=a.uw,re=re?25:10,ne.timeStamp-a.tw<a.zy&&!(Math.abs(le.x-ne.screenX)>re||Math.abs(le.y-ne.screenY)>re)?a.yq++:a.yq=1,oe.clickCount=a.yq,a.tw=ne.timeStamp,a.uw.sg(ne.screenX,ne.screenY),a.doMouseDown(),ne.button===1?ne.preventDefault():hu(oe,ne)}},a.dk=function(ne){if(a.isEnabled){a.Vk=!0;var re=a.oj;if(re[0]===null||re[0].pointerId!==ne.pointerId&&re[0].pointerType===ne.pointerType){if(re[1]!==null&&re[1].pointerId===ne.pointerId){re[1]=ne;return}if(re[0]===null)re[0]=ne;else return}else re[0]=ne;if(re[0].pointerId===ne.pointerId){re=_d(a,ne,!1,!1,!1,re[1]!==null);var oe=rt.document.elementFromPoint(ne.clientX,ne.clientY)||null;oe!==null&&oe.shadowRoot!==void 0&&oe.shadowRoot!==null&&(oe=oe.shadowRoot.elementFromPoint(ne.clientX,ne.clientY));var le=a,ue=ne;oe&&oe.H&&(ue=ne,le=oe.H),re.targetDiagram=le,Tc(a,ue,re),re.targetObject=null,a.doMouseMove(),hu(re,ne)}}},a.fk=function(ne){if(a.isEnabled){a.Vk=!0;var re=ne.pointerType==="touch"||ne.pointerType==="pen",oe=a.Yt;if(re&&a.qu)delete oe[ne.pointerId],ne.preventDefault();else if(oe=a.oj,oe[0]===null||oe[0].pointerId!==ne.pointerId&&oe[0].pointerType===ne.pointerType)oe[1]!==null&&oe[1].pointerId===ne.pointerId&&(oe[1]=null);else{oe[0]=null,oe=_d(a,ne,!1,!0,!0,!1);var le=rt.document.elementFromPoint(ne.clientX,ne.clientY)||null;le!==null&&le.shadowRoot!==void 0&&le.shadowRoot!==null&&(le=le.shadowRoot.elementFromPoint(ne.clientX,ne.clientY)),le!==null&&le.H instanceof Qt&&le.H!==a&&Tc(le.H,ne,oe),le===null&&(le=ne.target),Tc(a,ne,oe),oe.clickCount=a.yq,oe.targetDiagram=zd(ne,le),oe.targetObject=null,a.doMouseUp(),hu(oe,ne),re&&(a.wq=!1)}}},a.ek=function(ne){if(a.isEnabled){a.Vk=!1;var re=a.Yt;re[ne.pointerId]&&delete re[ne.pointerId],re=a.oj,re[0]!==null&&re[0].pointerId===ne.pointerId&&(re[0]=null),re[1]!==null&&re[1].pointerId===ne.pointerId&&(re[1]=null),ne.pointerType!=="touch"&&ne.pointerType!=="pen"&&(ne=a.currentTool,ne.cancelWaitAfter(),ne.standardMouseOver())}},a.ck=function(ne){var re=a.oj;re[0]!==null&&re[0].pointerId===ne.pointerId?(re[0]=null,a.wq=!1):re[1]!==null&&re[1].pointerId===ne.pointerId&&(re[1]=null)},a.Vp=E.Z["d"+Ef[1]+Ef[2]+"wI"+Ud.slice(1,5)]["b"+Ax.slice(1,y)](E.Z,Cf,y,y),E.Vc(!0),$g(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}Qt.prototype.addEventListener=function(a,y,x,E){a.addEventListener(y,x,{capture:E,passive:!1})},Qt.prototype.removeEventListener=function(a,y,x,E){a.removeEventListener(y,x,{capture:E})};function $g(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(rt,"resize",a.Ov,!1)}function Js(a){30<a.Sq&&(a.Yh=1)}function ad(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),Ni&&Ni.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}Qt.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:rt.devicePixelRatio||1},Qt.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},Qt.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},Qt.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},Qt.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},Qt.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},Qt.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},Qt.prototype.doFocus=function(){this.focus()},Qt.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=rt.scrollX||rt.pageXOffset,y=rt.scrollY||rt.pageYOffset;this.ta.focus(),rt.scrollTo(a,y)}},Qt.prototype.Oy=function(){this.H.R("GainedFocus")},Qt.prototype.Ny=function(){this.H.R("LostFocus")};function Rd(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,E=a.Be?a.Db:0,b=a.Mb;a.Mb=a.computePixelRatio(),a.Mb!==b&&(a.pn=!0,a.$b()),(y.clientWidth!==a.Aa+x||y.clientHeight!==a.ya+E)&&(a.Ee=!0,a.Fc=!0,y=a.layout,y!==null&&y.isViewportSized&&a.autoScale===rl&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function sd(a){var y=new fa;y.name="Background",a.Al(y),y=new fa,y.name="",a.Al(y),y=new fa,y.name="Foreground",a.Al(y),y=new fa,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new fa,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new fa,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function vf(a){var y=new Hn(Hn.Grid);y.name="GRID";var x=new Er;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Er,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Er,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Er,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Er,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Er,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Oi,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 Uf(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):Uh(this.H)}function yf(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):Uh(this.H)}Qt.prototype.kx=function(a){if(this.ta!==null){var y=this.ku,x=this.hu;this.qr=!0;var E=this.documentBounds,b=this.viewportBounds,z=this.rj,ne=E.x-z.left,re=E.y-z.top,oe=E.width+z.left+z.right,le=E.height+z.top+z.bottom,ue=E.right+z.right;z=E.bottom+z.bottom;var pe=b.x;E=b.y;var xe=b.width,Ee=b.height,Fe=b.right,Oe=b.bottom;b=this.scale;var at=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":at=at+a.scrollWidth-a.clientWidth;break;case"reverse":at=a.scrollWidth-at-a.clientWidth}var Xe=at;xe<oe||Ee<le?(at=tt.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==Xe&&(at.x=Xe/b+ne,this.ju=Xe),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(at.y=a.scrollTop/b+re,this.lu=a.scrollTop),this.position=at,tt.free(at),this.Ee=this.qr=!1):(at=tt.alloc(),a.uy&&this.allowHorizontalScroll&&(ne<pe&&(this.position=at.h(Xe+ne,this.position.y)),ue>Fe&&(this.position=at.h(-(y.scrollWidth-this.Aa)+Xe-this.Aa/b+ue,this.position.y))),a.vy&&this.allowVerticalScroll&&(re<E&&(this.position=at.h(this.position.x,a.scrollTop+re)),z>Oe&&(this.position=at.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/b+z))),tt.free(at),this.vd=!0,this.Ee=this.qr=!1,E=this.documentBounds,b=this.viewportBounds,ue=E.right,Fe=b.right,z=E.bottom,Oe=b.bottom,ne=E.x,pe=b.x,re=E.y,E=b.y,xe>=oe&&ne>=pe&&ue<=Fe&&(x.style.width="1px"),Ee>=le&&re>=E&&z<=Oe&&(x.style.height="1px"))}},Qt.prototype.computeBounds=function(a){return a===void 0&&(a=new gn),As(this),jd(this,a)};function jd(a,y){if(a.fixedBounds.w())return y.assign(a.fixedBounds),y.Co(a.yb),y;for(var x=!0,E=a.Wa.s,b=E.length,z=0;z<b;z++){var ne=E[z];if(ne.visible&&ne.isInDocumentBounds){ne=ne.Pa.s;for(var re=ne.length,oe=0;oe<re;oe++){var le=ne[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}Qt.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(Jt(a))for(var E=0;E<a.length;E++){var b=a[E];!y&&b instanceof Kn||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds))}else for(a=a.iterator;a.next();)E=a.value,!y&&E instanceof Kn||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds));return x===null?new gn(NaN,NaN,0,0):x};function uu(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 E=a.viewportBounds;E=gn.allocAt(0,0,E.width,E.height);var b=tt.alloc();b.xi(E,a.initialViewportSpot),b.h(x.x-b.x,x.y-b.y),a.position=b,gn.free(E),tt.free(b),tt.free(x)}x=a.yh,y&&a.Fg!==rl&&(x=a.Fg);var z=x!==rl?kc(a,x):a.scale;x=a.pa.x,E=a.pa.y,b=a.Aa/z;var ne=a.ya/z,re=a.zk,oe=a.pq;y&&!re.sb()&&(oe.sb()||oe.Xb())&&(re=oe.Xb()?Qr:oe),Sf(a,a.documentBounds,b,ne,re,y),y=a.scale,a.scale=z,a.vb=!1,z=a.viewportBounds,it.B(z.x,x)&&it.B(z.y,E)&&it.B(z.width,b)&&it.B(z.height,ne)||a.onViewportBoundsChanged(new gn(x,E,b,ne),z,y,!1)}}function kc(a,y){var x=a.Pp;if(a.ta===null)return x;a.Va();var E=a.documentBounds;if(!E.w())return x;var b=E.width;E=E.height;var z=a.Aa+(a.gf?a.Db:0),ne=a.ya+(a.Be?a.Db:0),re=z/b,oe=ne/E;return y===cu?(y=Math.min(oe,re),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===dd?(y=oe>re?(ne-a.Db)/E:(z-a.Db)/b,y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):a.scale}Qt.prototype.zoomToFit=function(){var a=this.sj;this.sj=Oc,this.scale=kc(this,cu),a!==Oc&&(uu(this,!1),Sf(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},Le=Qt.prototype,Le.BA=function(a,y){y===void 0&&(y=cu);var x=a.width,E=a.height;if(!(x===0||E===0||isNaN(x)&&isNaN(E))){var b=1;if(y===cu||y===dd)if(isNaN(x))b=this.viewportBounds.height*this.scale/E;else if(isNaN(E))b=this.viewportBounds.width*this.scale/x;else{b=this.Aa;var z=this.ya;b=y===dd?z/E>b/x?(z-(this.Be?this.Db:0))/E:(b-(this.gf?this.Db:0))/x:Math.min(z/E,b/x)}this.scale=b,this.position=new tt(a.x,a.y)}},Le.Jy=function(a,y){this.Va();var x=this.documentBounds,E=this.viewportBounds;this.position=new tt(x.x+(a.x*x.width+a.offsetX)-(y.x*E.width-y.offsetX),x.y+(a.y*x.height+a.offsetY)-(y.y*E.height-y.offsetY))},Le.zz=function(a){if(a instanceof Rt){this.eq=a;var y=tt.alloc();this.fq=this.op(a.ga(cs,y)),tt.free(y)}else this.eq=null,this.fq=ia};function Sf(a,y,x,E,b,z){var ne=tt.allocAt(a.pa.x,a.pa.y),re=ne.x,oe=ne.y;if(a.eq!==null){var le=tt.alloc();le=a.eq.ga(cs,le),re=le.x-a.fq.x/a.scale,oe=le.y-a.fq.y/a.scale,b=Fa,tt.free(le)}(z||a.scrollMode===Oc)&&(b.sb()&&(x>y.width&&(re=y.x+(b.x*y.width+b.offsetX)-(b.x*x-b.offsetX)),E>y.height&&(oe=y.y+(b.y*y.height+b.offsetY)-(b.y*E-b.offsetY))),b=a.rj,z=x-y.width,x<y.width+b.left+b.right?(re=Math.min(re+x/2,y.right+Math.max(z,b.right)-x/2),re=Math.max(re,y.left-Math.max(z,b.left)+x/2),re-=x/2):re>y.left?re=y.left:re<y.right-x&&(re=y.right-x),x=E-y.height,E<y.height+b.top+b.bottom?(oe=Math.min(oe+E/2,y.bottom+Math.max(x,b.bottom)-E/2),oe=Math.max(oe,y.top-Math.max(x,b.top)+E/2),oe-=E/2):oe>y.top?oe=y.top:oe<y.bottom-E&&(oe=y.bottom-E)),ne.x=isFinite(re)?re:-a.yb.left,ne.y=isFinite(oe)?oe:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,ne),ne.x=y.x,ne.y=y.y),js(a.Yd,a.pa,ne),a.pa.h(ne.x,ne.y),Dh(a),tt.free(ne)}Le.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=nh(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof Oi)return a}else if(a=nh(this,a,function(x){return x.part}),a instanceof Oi)return a;return null},Le.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),As(this);for(var E=this.Wa.iteratorBackwards;E.next();){var b=E.value;if(b.visible&&(b=b.ic(a,y,x),b!==null))return b}return null};function nh(a,y,x,E){for(x===void 0&&(x=null),E===void 0&&(E=null),As(a),a=a.Wa.iteratorBackwards;a.next();){var b=a.value;if(b.visible&&!b.isTemporary&&(b=b.ic(y,x,E),b!==null))return b}return null}Le.lz=function(a,y,x){return y===void 0&&(y=!0),Kh(this,a,function(E){return E.part},y?function(E){return E instanceof Oi&&E.canSelect()}:null,x)};function Kh(a,y,x,E,b){for(x===void 0&&(x=null),E===void 0&&(E=null),b instanceof Nn||b instanceof Ln||(b=new Ln),As(a),a=a.Wa.iteratorBackwards;a.next();){var z=a.value;z.visible&&!z.isTemporary&&z.ji(y,x,E,b)}return b}Le.ji=function(a,y,x,E){y===void 0&&(y=null),x===void 0&&(x=null),E instanceof Nn||E instanceof Ln||(E=new Ln),As(this);for(var b=this.Wa.iteratorBackwards;b.next();){var z=b.value;z.visible&&z.ji(a,y,x,E)}return E},Le.ux=function(a,y,x,E){return y===void 0&&(y=!1),x===void 0&&(x=!0),Ac(this,a,function(b){return b instanceof Oi&&(!x||b.canSelect())},y,E)},Le.Cf=function(a,y,x,E,b){y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof Nn||b instanceof Ln||(b=new Ln),As(this);for(var z=this.Wa.iteratorBackwards;z.next();){var ne=z.value;ne.visible&&ne.Cf(a,y,x,E,b)}return b},Le.Nu=function(a,y,x,E,b,z){var ne=new Ln;As(this);for(var re=this.Wa.iteratorBackwards;re.next();){var oe=re.value;oe.visible&&oe.Nu(a,y,x,E,ne,b,z)}return ne};function Ac(a,y,x,E,b){var z=null;for(z===void 0&&(z=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof Nn||b instanceof Ln||(b=new Ln),As(a),a=a.Wa.iteratorBackwards;a.next();){var ne=a.value;ne.visible&&!ne.isTemporary&&ne.Cf(y,z,x,E,b)}return b}Le.mz=function(a,y,x,E,b){return x===void 0&&(x=!0),E===void 0&&(E=!0),dc(this,a,y,function(z){return z instanceof Oi&&(!E||z.canSelect())},x,b)},Le.og=function(a,y,x,E,b,z){x===void 0&&(x=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof Nn||b instanceof Ln)&&(z=b),b=!0),z instanceof Nn||z instanceof Ln||(z=new Ln),As(this);for(var ne=this.Wa.iteratorBackwards;ne.next();){var re=ne.value;re.visible&&re.og(a,y,x,E,b,z)}return z};function dc(a,y,x,E,b,z){var ne=null;for(ne===void 0&&(ne=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof Nn||b instanceof Ln)&&(z=b),b=!0),z instanceof Nn||z instanceof Ln||(z=new Ln),As(a),a=a.Wa.iteratorBackwards;a.next();){var re=a.value;re.visible&&!re.isTemporary&&re.og(y,x,ne,E,b,z)}return z}Qt.prototype.acceptEvent=function(a){return _l(this,a,a instanceof MouseEvent)};function _l(a,y,x){var E=a.Qg;return a.Qg=a.cj,a.cj=E,E.diagram=a,E.event=y,x?Tc(a,y,E):(E.viewPoint=a.Qg.viewPoint,E.documentPoint=a.Qg.documentPoint),a=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),E.modifiers=a,E.button=y.button,y.buttons!==void 0&&(E.buttons=y.buttons),Dr&&y.button===0&&y.ctrlKey&&(E.button=2),E.down=!1,E.up=!1,E.clickCount=1,E.delta=0,E.handled=!1,E.bubbles=!1,E.timestamp=y.timeStamp,E.isMultiTouch=!1,E.targetDiagram=zd(y,y.target),E.targetObject=null,E}function zd(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 _d(a,y,x,E,b,z){var ne=a.Qg;return a.Qg=a.cj,a.cj=ne,ne.diagram=a,ne.clickCount=1,a=ne.delta=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),ne.modifiers=a,ne.event=y,ne.timestamp=y.timeStamp,ne.button=y.button,ne.buttons=y.buttons,Dr&&y.button===0&&y.ctrlKey&&(ne.button=2),ne.down=x,ne.up=E,ne.handled=!1,ne.bubbles=b,ne.isMultiTouch=z,ne}function hu(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}Qt.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=_l(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(),hu(x,a)},Qt.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=_l(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(),hu(x,a)},Qt.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=_l(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),hu(x,a)},Qt.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=_l(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),hu(x,a)},Qt.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?jr(new tt(y,a),this.Ab):new tt(y,a)};function Tc(a,y,x){var E=a.ta,b=a.Aa,z=a.ya,ne=0,re=0;E!==null&&(E=E.getBoundingClientRect(),ne=y.clientX-b/E.width*E.left,re=y.clientY-z/E.height*E.top),x.viewPoint.h(ne,re),a.Ab!==null?(y=tt.allocAt(ne,re),a.Ab.Cd(y),x.documentPoint.assign(y),tt.free(y)):x.documentPoint.h(ne,re)}function Zd(a,y,x){if(a.oj[0]!==null){y=a.oj[y];var E=a.ta;E!==null&&(E=E.getBoundingClientRect(),x.h(y.clientX-a.Aa/E.width*E.left,y.clientY-a.ya/E.height*E.top))}}Qt.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function Hd(a){a.ld||As(a),a.Va()}Qt.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},Le=Qt.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,Ll(this),this.hf=!1,this.du=new tt(NaN,NaN),y.isEnabled=x,this.ld=!0;var E=this;a!==null&&xn(function(){E.ld=!1,Us(y,"Model"),a(E)},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;rt.requestAnimationFrame(function(){y.kg&&y.bd()})}},Le.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),Ll(this))};function Vh(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||Uh(a)||(y&&As(a),x&&uu(a,!1))}function Ll(a,y){if(!a.ld&&(a.kg=!1,a.Ka!==null||a.wo.w())){a.ld=!0;var x=a.animationManager,E=a.Xn;if(!x.isAnimating&&E.length!==0){for(var b=E.s,z=b.length,ne=0;ne<z;ne++){var re=b[ne];ls(re,!1),re.v()}E.clear()}E=a.ow,0<E.count&&(E.each(function(oe){oe.Nv()}),E.clear()),b=E=!1,x.defaultAnimation.isAnimating&&(b=!0,E=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||Rd(a),Vh(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(Th(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),As(a),z=!1,(!a.hf||a.xh)&&(a.hf?Qg(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),Qg(a,!1)),z=!0),a.Jk=!1,As(a),a.ou||Hd(a),Vh(a,!0,!1),ne=!1,z?(x=gn.alloc(),x.assign(a.viewportBounds),a.hf||(ne=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,Wd(a)),a.R("LayoutCompleted"),Vh(a,!0,!1),gn.free(x)):x.Ok&&x.Qw&&(a.Fg!==rl?a.scale=kc(a,a.Fg):a.yh!==rl?a.scale=kc(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),uu(a,!0)),z&&ne&&a.eb("Initial Layout"),As(a),y||a.gc(a.ib),b&&(a.skipsUndoManager=E),a.ld=!1}}function Wd(a){if(a.Fg!==rl)a.scale=kc(a,a.Fg);else if(a.yh!==rl)a.scale=kc(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}uu(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),Th(a)}function As(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 Ln,a.Nv(x,a.De)}a.nodes.each(function(E){E instanceof gr&&E.U&65536&&(E.U=E.U^65536)})}}Le.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof gr||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof gr&&x.isVisible()&&ba(this,x);for(a.reset();a.next();)x=a.value,x instanceof Kn&&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 lo&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function ba(a,y){for(var x=qn(),E=qn(),b=y.memberParts;b.next();){var z=b.value;z.isVisible()&&(z instanceof gr?(fu(z)||dl(z)||gd(z))&&ba(a,z):z instanceof Kn?z.fromNode===y||z.toNode===y?E.push(z):x.push(z):(z.measure(1/0,1/0),z.arrange()))}for(a=x.length,b=0;b<a;b++)z=x[b],z.measure(1/0,1/0),z.arrange();for(di(x),y.measure(1/0,1/0),y.arrange(),a=E.length,y=0;y<a;y++)x=E[y],x.measure(1/0,1/0),x.arrange();di(E)}Le.Fd=function(a,y,x,E){if(this.vd||this.animationManager.isAnimating)for(var b=0;b<y;b++)a[b].Fd(x,E)},Le.gc=function(a){if(this.Ka!==null){if(this.ta===null&&yt("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){Mu(this);var x=this.Aa,E=this.ya;if(a.Gv.resize(x,E,x,E),x=this.Wa.s,E=x.length,this.Fd(x,E,this,this.viewportBounds),this.Fc||y.isAnimating){y=this.pa;var b=this.Ca,z=Math.round(y.x*b)/b,ne=Math.round(y.y*b)/b,re=this.Ab;for(re.reset(),b!==1&&re.scale(b),y.x===0&&y.y===0||re.translate(-z,-ne),a.ti=null,Uy(a,re.m11,re.m12,re.m21,re.m22,re.dx,re.dy),this.pb!==1&&(a.globalAlpha=this.pb),il(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<E;y++)x[y].gc(a,this);a=!1,this.Yf?Yd(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(_t.prototype.Cd=_t.prototype.Eu),this.Fc=this.vd=!1}}}}else e:if(z=this.animationManager,!z.zb&&(!z.isAnimating||z.isTicking)&&(x=new Date,Mu(this),this.Ka.style.opacity!=="0")){if(E=a!==this.ib,y=this.Wa.s,b=y.length,this.Fd(y,b,this,this.viewportBounds),E)a.Vc(!0),this.vd=!0;else if(!this.Fc&&!z.isAnimating)break e;z=this.Ab,z.reset(),ne=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(ne,0,0,ne,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),il(this,a),re=0;re<b;re++)a.setTransform(ne,0,0,ne,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?Yd(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(_t.prototype.Cd=_t.prototype.Eu),E?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,E=Ni&&Ni.nx,x=this.zw,E||this.Yh===null){for(x[this.Tq]=y,this.Tq=(this.Tq+1)%x.length,b=y=0;b<x.length;b++)y+=x[b];this.Sq=y/x.length}if(this.pb!==1&&(a.globalAlpha=1),E)for(a.setTransform(1,0,0,1,0,0),E=0;E<x.length;E++)a.fillText(x[E].toString(),20,150+ +(20*E))}}};function ns(a,y,x,E,b,z,ne,re,oe,le){if(a.Ka!==null){a.ta===null&&yt("No canvas specified"),ne===void 0&&(ne=null),re===void 0&&(re=null),oe===void 0&&(oe=!1),le===void 0&&(le=!1),Mu(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var ue=a.Ca;a.Ca=b;var pe=a.Wa.s,xe=pe.length;try{var Ee=new gn(z.x,z.y,E.width/b,E.height/b),Fe=Ee.copy();Fe.Co(x),Th(a,Fe),As(a),a.Fd(pe,xe,a,Ee),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,E.width,E.height),re!==null&&re!==""&&(y.fillStyle=re,y.ox(0,0,E.width,E.height));var Oe=a.Mb;y.scale(Oe,Oe);var at=_t.alloc();at.reset(),at.translate(x.left,x.top),at.scale(b),z.x===0&&z.y===0||at.translate(-z.x,-z.y),y.setTransform(at.m11,at.m12,at.m21,at.m22,at.dx,at.dy),y.yc(),y instanceof Jl&&Uy(y,at.m11,at.m12,at.m21,at.m22,at.dx,at.dy),_t.free(at),il(a,y),y.globalAlpha=a.pb;var Xe=a.Qj("Grid");if(ne){var pt=new Ln,wt=ne.iterator;for(wt.reset();wt.next();){var Mt=wt.value;Mt instanceof Oi&&(le||Mt.layer!==Xe)&&(Mt.Gj(),pt.add(Mt))}for(le=0;le<xe;le++)zl(pe[le],y,a,pt,oe);pt.each(function(qt){return qt.Gj()})}else for(pt=0;pt<xe;pt++){var It=pe[pt];It===Xe?le&&It.gc(y,a,!0):It.gc(y,a,oe)}a.$i=!1,a.Yf&&Yd(a.Yf,a)&&a.Vp()}finally{a.Ca=ue,a.ib.Vc(!0),a.vd=!0,a.Fd(pe,xe,a,a.viewportBounds),Th(a),a.ib instanceof Jl&&(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 zi,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(Dr||Nr),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function il(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 zi,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 bu(this,a),this};function bu(a,y){var x=a instanceof Hn,E=a instanceof Qt,b;for(b in y){b===""&&yt("Setting properties requires non-empty property names");var z=a,ne=b;if(x||E){var re=b.indexOf(".");if(0<re){var oe=b.substring(0,re);x?z=a.fb(oe):(z=a[oe],z==null&&(z=a.toolManager[oe])),Wt(z)?ne=b.substr(re+1):yt("Unable to find object named: "+oe+" in "+a.toString()+" when trying to set property: "+b)}}if(ne[0]!=="_"&&!er(z,ne))if(E&&ne==="ModelChanged"){a.Yw(y[ne]);continue}else if(E&&ne==="Changed"){a.Pe(y[ne]);continue}else if(E&&er(a.toolManager,ne))z=a.toolManager;else if(E&&am(a,ne)){a.Bj(ne,y[ne]);continue}else if(a instanceof Li&&ne==="Changed"){a.Pe(y[ne]);continue}else yt('Trying to set undefined property "'+ne+'" on object: '+z.toString());z[ne]=y[b],ne[0]==="_"&&z instanceof Rt&&z.Vw(ne)}}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 xi,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")},Qt.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!==wf&&this.rj.hi(0,0,0,0)&&y.width===a.width&&y.height===a.height){var E=this.scale,b=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))*E&&0<Math.max(0,z-b)*E){if(!(this.ld||(this.kg=!1,this.Ka===null||(this.ld=!0,this.documentBounds.w()||(E=gn.alloc(),Jg(this,this.computeBounds(E)),gn.free(E)),E=this.ta,E===null||E instanceof Oh)))){var ne=this.Mb;b=this.Aa*ne;var re=this.ya*ne,oe=this.scale*ne;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!==b&&(oe.width=b),oe.height!==re&&(oe.height=re),a.clearRect(0,0,b,re),oe=190*ne;var le=70*ne,ue=Math.max(z,0),pe=Math.max(y,0),xe=Math.floor(b-ue),Ee=Math.floor(re-pe);a.drawImage(E.Oa,ue,pe,xe,Ee,0,0,xe,Ee),Yd(this.Yf,this)&&a.clearRect(0,0,oe,le),E=qn(),a=qn(),Ee=Math.abs(z),xe=Math.abs(y);var Fe=ue===0?0:b-Ee;ue=tt.allocAt(Fe,0),Ee=tt.allocAt(Ee+Fe,re),a.push(new gn(Math.min(ue.x,Ee.x),Math.min(ue.y,Ee.y),Math.abs(ue.x-Ee.x),Math.abs(ue.y-Ee.y)));var Oe=this.Ab;if(Oe.reset(),Oe.scale(ne,ne),this.Ca!==1&&Oe.scale(this.Ca),ne=this.pa,(ne.x!==0||ne.y!==0)&&isFinite(ne.x)&&isFinite(ne.y)&&Oe.translate(-ne.x,-ne.y),jr(ue,Oe),jr(Ee,Oe),E.push(new gn(Math.min(ue.x,Ee.x),Math.min(ue.y,Ee.y),Math.abs(ue.x-Ee.x),Math.abs(ue.y-Ee.y))),Fe=pe===0?0:re-xe,ue.h(0,Fe),Ee.h(b,xe+Fe),a.push(new gn(Math.min(ue.x,Ee.x),Math.min(ue.y,Ee.y),Math.abs(ue.x-Ee.x),Math.abs(ue.y-Ee.y))),jr(ue,Oe),jr(Ee,Oe),E.push(new gn(Math.min(ue.x,Ee.x),Math.min(ue.y,Ee.y),Math.abs(ue.x-Ee.x),Math.abs(ue.y-Ee.y))),Yd(this.Yf,this)&&(b=0<z?0:-z,re=0<y?0:-y,ue.h(b,re),Ee.h(oe+b,le+re),a.push(new gn(Math.min(ue.x,Ee.x),Math.min(ue.y,Ee.y),Math.abs(ue.x-Ee.x),Math.abs(ue.y-Ee.y))),jr(ue,Oe),jr(Ee,Oe),E.push(new gn(Math.min(ue.x,Ee.x),Math.min(ue.y,Ee.y),Math.abs(ue.x-Ee.x),Math.abs(ue.y-Ee.y)))),tt.free(ue),tt.free(Ee),Vh(this,!1,!0),this.Ka===null&&yt("No div specified"),this.ta===null&&yt("No canvas specified"),!this.animationManager.zb&&(b=this.ib,this.Fc)){for(Mu(this),re=this.Mb,b.setTransform(1,0,0,1,0,0),b.clearRect(0,0,this.Aa*re,this.ya*re),b.drawImage(this.jw.Oa,0<z?0:Math.round(-z),0<y?0:Math.round(-y)),z=this.pa,ne=this.Ca,oe=Math.round(z.x*ne)/ne,le=Math.round(z.y*ne)/ne,y=this.Ab,y.reset(),ne!==1&&y.scale(ne),z.x===0&&z.y===0||y.translate(-oe,-le),b.save(),b.beginPath(),z=a.length,ne=0;ne<z;ne++)oe=a[ne],oe.width!==0&&oe.height!==0&&b.rect(Math.floor(oe.x),Math.floor(oe.y),Math.ceil(oe.width),Math.ceil(oe.height));for(b.clip(),b.setTransform(re,0,0,re,0,0),b.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),b.yc(),y=this.Wa.s,z=y.length,this.Fd(y,z,this,this.viewportBounds),il(this,b),b.globalAlpha=this.pb,re=0;re<z;re++)if(ne=y[re],oe=E,ne.visible&&ne.pb!==0){le=_s(ne,b),pe=ne.Zq,pe.length=0,ue=this.scale,xe=gn.alloc(),Ee=ne.Pa.s,Oe=Ee.length,Fe=oe.length;for(var at=0;at<Oe;at++){var Xe=Ee[at],pt=nf(Xe,Xe.actualBounds);e:{for(var wt=2/ue,Mt=4/ue,It=0;It<Fe;It++){var qt=oe[It];if(qt.width!==0&&qt.height!==0&&pt.Vu(qt.x-wt,qt.y-wt,qt.width+Mt,qt.height+Mt)){pt=!0;break e}}pt=!1}pt&&ne.Oj(b,Xe,this,pe,ue,xe,!0)}gn.free(xe),b.globalAlpha=le}b.restore(),b.Vc(!0),this.Yf&&Yd(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}di(E),di(a),this.ld=!1}}else this.bd();x&&(Js(this),this.bd(),ad(this,!0))}else x?(Js(this),this.bd(),ad(this,!0)):this.bd()}};function Mu(a){a.pn!==!1&&(a.pn=!1,Gd(a,a.Aa,a.ya))}function Gd(a,y,x){Dh(a);var E=a.Mb;a.ta.resize(y*E,x*E,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function Uh(a){var y=a.ta;if(y===null||a.wo.w())return!0;var x=a.Aa,E=a.ya,b=a.Ka,z=!1,ne=a.gf?a.Db:0,re=a.Be?a.Db:0,oe=b.clientWidth||x+ne,le=b.clientHeight||E+re,ue=a.viewportBounds;b=ue.x;var pe=ue.y,xe=ue.width,Ee=ue.height;if((oe!==x+ne||le!==E+re)&&(a.gf=!1,a.Be=!1,re=ne=0,a.Aa=oe,a.ya=le,z=a.pn=!0,Dh(a)),!a.hf||!a.viewportBounds.w())return!0;var Fe=a.ku,Oe=a.hu;if(a.Ee=!1,!(z||a.gf||a.Be||a.mn||a.nn))return!0;var at=a.documentBounds,Xe=0,pt=0,wt=0,Mt=0,It=ue.width,qt=ue.height,ei=a.rj;a.contentAlignment.sb()?(at.width>It&&(Xe=ei.left,pt=ei.right),at.height>qt&&(wt=ei.top,Mt=ei.bottom)):(Xe=ei.left,pt=ei.right,wt=ei.top,Mt=ei.bottom);var Si=at.width+Xe+pt,fi=at.height+wt+Mt;ei=a.scale;var Gn=Si>oe/ei,Tn=fi>le/ei;if(!(z||a.gf||a.Be||Gn||Tn))return!0;Xe=at.x-Xe,oe=ue.x,pt=at.right+pt,le=ue.right+ne,wt=at.y-wt;var dr=ue.y;at=at.bottom+Mt,ue=ue.bottom+re;var Xi="1px";if(Mt="1px",a.scrollMode===Oc&&(Gn||Tn)&&(Gn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Gn=1,Xe+1<oe&&(Gn=Math.max((oe-Xe)*ei+a.Aa,Gn)),pt>le+1&&(Gn=Math.max((pt-le)*ei+a.Aa,Gn)),It+ne+1<Si&&(Gn=Math.max((Si-It)*ei+a.Aa,Gn)),Xi=Gn.toString()+"px"),Tn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Gn=1,wt+1<dr&&(Gn=Math.max((dr-wt)*ei+a.ya,Gn)),at>ue+1&&(Gn=Math.max((at-ue)*ei+a.ya,Gn)),qt+re+1<fi&&(Gn=Math.max((fi-qt)*ei+a.ya,Gn)),Mt=Gn.toString()+"px")),Gn=Xi!=="1px",Tn=Mt!=="1px",Gn&&Tn||!Gn&&!Tn||(Tn&&(le-=a.Db),Gn&&(ue-=a.Db),Si<It+ne||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ne=1,Xe+1<oe&&(ne=Math.max((oe-Xe)*ei+a.Aa,ne)),pt>le+1&&(ne=Math.max((pt-le)*ei+a.Aa,ne)),It+1<Si&&(ne=Math.max((Si-It)*ei+a.Aa,ne)),Xi=ne.toString()+"px"),Gn=Xi!=="1px",ne=a.ya,Gn!==a.Be&&(ne=Gn?a.ya-a.Db:a.ya+a.Db),fi<qt+re||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(re=1,wt+1<dr&&(re=Math.max((dr-wt)*ei+ne,re)),at>ue+1&&(re=Math.max((at-ue)*ei+ne,re)),qt+1<fi&&(re=Math.max((fi-qt)*ei+ne,re)),Mt=re.toString()+"px"),Tn=Mt!=="1px"),a.qr&&Gn===a.Be&&Tn===a.gf)return x===a.Aa&&E===a.ya||a.bd(),!1;if(Gn!==a.Be&&(Xi==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=Gn,Oe.style.width=Xi,Tn!==a.gf&&(Mt==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),z=!0,a.tn&&(re=tt.alloc(),Tn?(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&&Dh(a),a.gf=Tn,Oe.style.height=Mt,a.gu=!0,z&&(a.pn=!0),y=Fe.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(It+1<Si?y=(a.position.x-Xe)*ei:Xe+1<oe?y=Fe.scrollWidth-Fe.clientWidth:pt>le+1&&(y=a.position.x*ei)),a.tn)switch(a.bu){case"negative":y=-(Fe.scrollWidth-y-Fe.clientWidth);break;case"reverse":y=Fe.scrollWidth-y-Fe.clientWidth}return Fe.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(qt+1<fi?Fe.scrollTop=(a.position.y-wt)*ei:wt+1<dr?Fe.scrollTop=Fe.scrollHeight-Fe.clientHeight:at>ue+1&&(Fe.scrollTop=a.position.y*ei)),oe=a.Aa,le=a.ya,Fe.style.width=oe+(a.gf?a.Db:0)+"px",Fe.style.height=le+(a.Be?a.Db:0)+"px",x!==oe||E!==le||a.animationManager.zb?(x=gn.allocAt(b,pe,xe,Ee),a.onViewportBoundsChanged(x,a.viewportBounds,ei,z),gn.free(x),!1):!0}Le=Qt.prototype,Le.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&yt("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+y.toString()),y=this.Qj(a.layerName),y===null&&(y=this.Qj("")),y===null&&yt('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==y)){var x=y.oi(99999999,a,a.diagram===this);0<=x&&this.cb(ko,"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;qd(a,function(x){$d(y,x)}),(a instanceof lo||a instanceof gr&&a.placeholder!==null)&&a.v(),a.data!==null&&qd(a,function(x){sy(y.partManager,x)}),dl(a)!==!0&&gd(a)!==!0||this.De.add(a),R1(a,!0,this),z1(a)?(a.actualBounds.w()&&this.N(nf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(nf(a,a.actualBounds)),this.$b()},Le.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&qd(a,function(x){ly(y.partManager,x,y)}),this.De.remove(a),z1(a)?(a.actualBounds.w()&&this.N(nf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(nf(a,a.actualBounds)),this.$b()},Le.remove=function(a){ld(this,a,!0)};function ld(a,y,x){var E=y.layer;E!==null&&E.diagram===a&&(y.isSelected=!1,y.isHighlighted=!1,y.C(2),x&&y.Lj(),x=E.pc(-1,y,!1),0<=x&&a.cb(Yo,"parts",E,y,null,x,null),a=y.layerChanged,a!==null&&a(y,E,null))}Le.Is=function(a,y){if(y===void 0&&(y=!1),Jt(a))for(var x=a.length,E=0;E<x;E++){var b=a[E];y&&!b.canDelete()||this.remove(b)}else for(x=new Ln,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)},Qt.prototype.moveParts=function(a,y,x,E){if(x===void 0&&(x=!1),E===void 0&&(E=Yf(this)),this.toolManager!==null){var b=new xi;if(a!==null)if(Jt(a))for(var z=0;z<a.length;z++)Hu(this,b,a[z],x,E);else for(a=a.iterator;a.next();)Hu(this,b,a.value,x,E);else{for(a=this.parts;a.next();)Hu(this,b,a.value,x,E);for(a=this.nodes;a.next();)Hu(this,b,a.value,x,E);for(a=this.links;a.next();)Hu(this,b,a.value,x,E)}Ah(this,b,y,E,x)}};function Hu(a,y,x,E,b,z){if(!y.contains(x)&&(z===void 0&&(z=!1),!E||z||x.canMove()||x.canCopy()))if(b===void 0&&(b=Yf(a)),x instanceof oi){if(y.add(x,a.Pd(b,x,x.location)),x instanceof gr&&(x.placeholder!==null||b.dragsMembers))for(z=x.memberParts;z.next();)Hu(a,y,z.value,E,b,b.groupsAlwaysMove);for(z=x.linksConnected;z.next();){var ne=z.value;if(!y.contains(ne)){var re=ne.fromNode,oe=ne.toNode;re!==null&&y.contains(re)&&oe!==null&&y.contains(oe)&&Hu(a,y,ne,E,b)}}if(b.dragsTree)for(x=x.Ou();x.next();)Hu(a,y,x.value,E,b)}else if(x instanceof Kn)for(y.add(x,a.Pd(b,x)),x=x.labelNodes;x.next();)Hu(a,y,x.value,E,b);else x instanceof lo||y.add(x,a.Pd(b,x,x.location))}function Ah(a,y,x,E,b){if(y!==null&&y.count!==0){var z=tt.alloc(),ne=tt.alloc();ne.assign(x),isNaN(ne.x)&&(ne.x=0),isNaN(ne.y)&&(ne.y=0),(x=a.Mr)||Jf(a,y);for(var re=qn(),oe=qn(),le=y.iterator,ue=tt.alloc();le.next();){var pe=le.key,xe=le.value;if(pe.Zc()){var Ee=Kg(a,pe,y);Ee!==null?re.push(new ie(pe,xe,Ee)):(!b||pe.canMove())&&(Ee=xe.point,z.assign(Ee),a.computeMove(pe,z.add(ne),E,ue),pe.location=ue,xe.shifted===void 0&&(xe.shifted=new tt),xe.shifted.assign(ue.re(Ee)))}else le.key instanceof Kn&&oe.push(le.sa)}for(tt.free(ue),b=re.length,le=0;le<b;le++)pe=re[le],z.assign(pe.info.point),pe.Su.shifted===void 0&&(pe.Su.shifted=new tt),pe.node.location=z.add(pe.Su.shifted);for(b=tt.alloc(),le=tt.alloc(),pe=oe.length,xe=0;xe<pe;xe++){var Fe=oe[xe];if(Ee=Fe.key,Ee instanceof Kn)if(Ee.suspendsRouting){Ee.Tg=null,ue=Ee.fromNode;var Oe=Ee.toNode;if(a.draggedLink!==null&&E.dragsLink)if(Oe=Fe.value.point,Ee.dragComputation===null)y.add(Ee,a.Pd(E,Ee,ne)),Wc(Ee,ne.x-Oe.x,ne.y-Oe.y);else{Fe=tt.allocAt(0,0),(ue=Ee.i(0))&&ue.w()&&Fe.assign(ue);var at=ue=tt.alloc().assign(Fe).add(ne);E.isGridSnapEnabled&&(E.isGridSnapRealtime||a.lastInput.up)&&(at=tt.alloc(),Xf(a,Ee,ue,at,E)),ue.assign(Ee.dragComputation(Ee,ue,at)).re(Fe),y.add(Ee,a.Pd(E,Ee,ue)),Wc(Ee,ue.x-Oe.x,ue.y-Oe.y),tt.free(Fe),tt.free(ue),at!==ue&&tt.free(at)}else ue!==null&&(b.assign(ue.location),at=y.I(ue),at!==null&&b.re(at.point)),Oe!==null&&(le.assign(Oe.location),at=y.I(Oe),at!==null&&le.re(at.point)),ue!==null&&Oe!==null?b.Xa(le)?(ue=Fe.value.point,Oe=z,Oe.assign(b),Oe.re(ue),y.add(Ee,a.Pd(E,Ee,b)),Wc(Ee,Oe.x,Oe.y)):(Ee.suspendsRouting=!1,Ee.bb()):(Fe=Fe.value.point,ue=ue!==null?b:Oe!==null?le:ne,y.add(Ee,a.Pd(E,Ee,ue)),Wc(Ee,ue.x-Fe.x,ue.y-Fe.y))}else(Ee.fromNode===null||Ee.toNode===null)&&(ue=Fe.value.point,y.add(Ee,a.Pd(E,Ee,ne)),Wc(Ee,ne.x-ue.x,ne.y-ue.y))}tt.free(z),tt.free(ne),tt.free(b),tt.free(le),di(re),di(oe),x||(As(a),ud(a,y))}}Qt.prototype.computeMove=function(a,y,x,E){if(E===void 0&&(E=new tt),E.assign(y),a===null)return E;var b=y,z=x.isGridSnapEnabled;z&&(x.isGridSnapRealtime||this.lastInput.up)&&(b=tt.alloc(),Xf(this,a,y,b,x)),x=a.dragComputation!==null?a.dragComputation(a,y,b):b;var ne=a.minLocation,re=ne.x;isNaN(re)&&(re=z?Math.round(1e3*a.location.x)/1e3:a.location.x),ne=ne.y,isNaN(ne)&&(ne=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),E.h(Math.max(re,Math.min(x.x,le)),Math.max(ne,Math.min(x.y,oe))),b!==y&&tt.free(b),E};function Yf(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function Xf(a,y,x,E,b){if(b===void 0&&(b=Yf(a)),E.assign(x),y!==null){var z=a.grid;y=b.gridSnapCellSize,a=y.width,y=y.height;var ne=b.gridSnapOrigin,re=ne.x;if(ne=ne.y,b=b.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(ne)&&(ne=z.y)}z=tt.allocAt(0,0),z.yi(0,0,a,y,b),it.No(x.x,x.y,re+z.x,ne+z.y,a,y,E),tt.free(z)}}function Jf(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof Kn&&(y.suspendsRouting=!0)}function ud(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof Kn&&(x.suspendsRouting=!1,Vv(x)&&x.bb())}a.Mr=!1}}function Kg(a,y,x){return y=y.containingGroup,y!==null&&(a=Kg(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}Le=Qt.prototype,Le.Pd=function(a,y,x){if(x===void 0)return new fc(uo);var E=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(E=!1),E?new fc(new tt(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new fc(x.copy())};function Vg(a,y,x){if(y.diagram!==null&&y.diagram!==a&&yt("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&yt("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&yt("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&yt("Cannot move a Layer before or after itself: "+y)),y.diagram!==a){y=y.name,a=a.Wa,x=a.count;for(var E=0;E<x;E++)a.M(E).name===y&&yt("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}Le.Al=function(a){Vg(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(ko,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},Le.Ww=function(a,y){Vg(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(Yo,"layers",this,a,null,E,null));var b=x.count,z;for(z=0;z<b;z++)if(x.M(z)===y){x.Gb(z,a);break}return this.cc!==null&&this.cb(ko,"layers",this,null,a,null,z),this.N(),0>E&&this.Ya(),this},Le.Cy=function(a,y){Vg(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(Yo,"layers",this,a,null,E,null));var b=x.count,z;for(z=0;z<b;z++)if(x.M(z)===y){x.Gb(z+1,a);break}return this.cc!==null&&this.cb(ko,"layers",this,null,a,null,z+1),this.N(),0>E&&this.Ya(),this},Le.kA=function(a){if(a.diagram!==this&&yt("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram),a.name!==""){var y=this.Wa,x=y.indexOf(a);if(y.remove(a)){for(y=a.Pa.copy().iterator;y.next();){var E=y.value,b=E.layerName;b!==a.name?E.layerName=b:E.layerName=""}this.cc!==null&&this.cb(Yo,"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 Nn),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 Nn),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!==Do&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,E=0;E<x;E++)y.M(E)(a)},Le.cb=function(a,y,x,E,b,z,ne){z===void 0&&(z=null),ne===void 0&&(ne=null);var re=new Ii;re.diagram=this,re.change=a,re.propertyName=y,re.object=x,re.oldValue=E,re.oldParam=z,re.newValue=b,re.newParam=ne,this.ds(re)},Le.g=function(a,y,x,E,b){this.cb(Yr,a,this,y,x,E,b)},Qt.prototype.changeState=function(a,y){if(a!==null&&a.diagram===this){var x=this.skipsModelSourceBindings;try{this.skipsModelSourceBindings=!0;var E=a.change;if(E===Yr){var b=a.object;if(la(b,a.propertyName,a.I(y)),b instanceof Rt){var z=b.part;z!==null&&z.Wb()}this.isModified=!0}else if(E===ko){var ne=a.object,re=a.newParam,oe=a.newValue;if(ne instanceof Hn)if(typeof re=="number"&&oe instanceof Rt){y?ne.pc(re):ne.Gb(re,oe);var le=ne.part;le!==null&&le.Wb()}else typeof re=="number"&&oe instanceof us&&(oe.isRow?h1(ne,re,y?void 0:oe):c1(ne,re,y?void 0:oe));else if(ne instanceof fa){var ue=a.oldParam===!0;typeof re=="number"&&oe instanceof Oi&&(y?(oe.isSelected=!1,oe.isHighlighted=!1,oe.Wb(),ne.pc(ue?re:-1,oe,ue)):ne.oi(re,oe,ue))}else ne instanceof Qt?typeof re=="number"&&oe instanceof fa&&(y?this.Wa.mb(re):(oe.Xe(this),this.Wa.Gb(re,oe))):yt("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(E===Yo){var pe=a.object,xe=a.oldParam,Ee=a.oldValue;if(pe instanceof Hn)typeof xe=="number"&&Ee instanceof Rt?y?pe.Gb(xe,Ee):pe.pc(xe):typeof xe=="number"&&Ee instanceof us&&(Ee.isRow?h1(pe,xe,y?Ee:void 0):c1(pe,xe,y?Ee:void 0));else if(pe instanceof fa){var Fe=a.newParam===!0;typeof xe=="number"&&Ee instanceof Oi&&(y?0>pe.Pa.indexOf(Ee)&&pe.oi(xe,Ee,Fe):(Ee.isSelected=!1,Ee.isHighlighted=!1,Ee.Wb(),pe.pc(Fe?xe:-1,Ee,Fe)))}else pe instanceof Qt?typeof xe=="number"&&Ee instanceof fa&&(y?(Ee.Xe(this),this.Wa.Gb(xe,Ee)):this.Wa.mb(xe)):yt("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else E!==Do&&yt("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},Qt.prototype.Ea=function(a){return this.undoManager.Ea(a)},Qt.prototype.eb=function(a){return this.undoManager.eb(a)},Qt.prototype.Kf=function(){return this.undoManager.Kf()},Qt.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var E=!1;try{a(this),E=!0}finally{E?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},Qt.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},Qt.prototype.rp=function(){this.partManager.rp()};function Ug(a,y,x){var E=a.animationManager;if(a.vb||a.ld)a.Ca=x,Dh(a),a.N(),a.Ee=!0,E.zb&&(Rs(E)||E.ce.add(E.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,Dh(a);else{a.vb=!0;var b=a.viewportBounds.copy(),z=a.Aa,ne=a.ya,re=a.zoomPoint.x,oe=a.zoomPoint.y,le=a.contentAlignment;isNaN(re)&&(le.$c()?le.Hf(Iu)?re=0:le.Hf(Ys)&&(re=z-1):re=le.sb()?le.x*(z-1):z/2),isNaN(oe)&&(le.$c()?le.Hf(Su)?oe=0:le.Hf(ul)&&(oe=ne-1):oe=le.sb()?le.y*(ne-1):ne/2),a.scaleComputation===null||a.animationManager.defaultAnimation.isAnimating||(x=a.scaleComputation(a,x)),x<a.minScale&&(x=a.minScale),x>a.maxScale&&(x=a.maxScale),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,Dh(a),a.vb=!1,a.onViewportBoundsChanged(b,a.viewportBounds,y,!1),uu(a,!1),E.zb&&(Rs(E)||E.ce.add(E.H,"scale",y,a.Ca))}}Qt.prototype.onViewportBoundsChanged=function(a,y,x,E){if(!a.D(y)){E===void 0&&(E=!1),E||(this.Ee=!0),this.vd=!0;var b=this.layout;b===null||!b.isViewportSized||this.autoScale!==rl||a.width===y.width&&a.height===y.height||b.C(),b=this.currentTool,this.Vk===!0&&b instanceof Vr&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),_a(b,this)),this.vb||this.invalidateViewport(a,y),Th(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=E,this.R("ViewportBoundsChanged",this.fc,a),this.isVirtualized&&this.links.each(function(z){z.isAvoiding&&z.actualBounds.Yc(y)&&z.bb()})}};function Th(a,y){var x=a.fe;if(x!==null&&x.visible){for(var E=Xn.alloc(),b=1,z=1,ne=x.O.s,re=ne.length,oe=0;oe<re;oe++){var le=ne[oe],ue=Math.abs(le.interval);2>ue||(pv(le.figure)?z=z*ue/it.vx(z,ue):b=b*ue/it.vx(b,ue))}if(ne=x.gridCellSize,E.h(z*ne.width,b*ne.height),y!==void 0)b=y.width,z=y.height,a=y.x,ne=y.y;else{if(y=gn.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){gn.free(y);return}b=y.width,z=y.height,a=y.x,ne=y.y,gn.free(y)}x.width=b+2*E.width,x.height=z+2*E.height,y=tt.alloc(),it.No(a,ne,0,0,E.width,E.height,y),y.offset(-E.width,-E.height),Xn.free(E),x.part.location=y,tt.free(y)}}Qt.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(),E=x.length,b=0;b<E;b++)x[b].isSelected=!1;y.ka(),y.clear(),y.freeze(),a||this.R("ChangedSelection",y)}},Qt.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))},Qt.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),Jt(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];E instanceof Oi||yt("Diagram.selectCollection given something that is not a Part: "+E),E.isSelected=!0}else for(a=a.iterator;a.next();)y=a.value,y instanceof Oi||yt("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},Qt.prototype.clearHighlighteds=function(){var a=this.highlighteds;if(0<a.count){for(var y=a.Fa(),x=y.length,E=0;E<x;E++)y[E].isHighlighted=!1;a.ka(),a.clear(),a.freeze()}},Le=Qt.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 Ln().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 Oi||yt("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 E=y==="up"||y==="down",b=0,z=tt.alloc();if(a==="pixel")b=x;else if(a==="line")b=x*(E?this.scrollVerticalLineChange:this.scrollHorizontalLineChange);else if(a==="page")a=E?this.viewportBounds.height:this.viewportBounds.width,a*=this.scale,a!==0&&(b=x*Math.max(a-(E?this.scrollVerticalLineChange:this.scrollHorizontalLineChange),0));else{if(a==="document"){b=this.documentBounds,x=this.viewportBounds,y==="up"?this.position=z.h(x.x,b.y):y==="left"?this.position=z.h(b.x,x.y):y==="down"?this.position=z.h(x.x,b.bottom-x.height):y==="right"&&(this.position=z.h(b.right-x.width,x.y)),tt.free(z);return}yt("scrolling unit must be 'pixel', 'line', 'page', or 'document', not: "+a)}b/=this.scale,x=this.position,y==="up"?this.position=z.h(x.x,x.y-b):y==="down"?this.position=z.h(x.x,x.y+b):y==="left"?this.position=z.h(x.x-b,x.y):y==="right"?this.position=z.h(x.x+b,x.y):yt("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,E=a.y,b=x+a.width,z=E+a.height,ne=y.m11,re=y.m12,oe=y.m21,le=y.m22,ue=y.dx,pe=y.dy,xe=x*ne+E*oe+ue;y=x*re+E*le+pe;var Ee=b*ne+E*oe+ue;return a=b*re+E*le+pe,E=x*ne+z*oe+ue,x=x*re+z*le+pe,ne=b*ne+z*oe+ue,b=b*re+z*le+pe,z=Math.min(xe,Ee),xe=Math.max(xe,Ee),Ee=Math.min(y,a),y=Math.max(y,a),z=Math.min(z,E),xe=Math.max(xe,E),Ee=Math.min(Ee,x),y=Math.max(y,x),z=Math.min(z,ne),xe=Math.max(xe,ne),Ee=Math.min(Ee,b),y=Math.max(y,b),new gn(z,Ee,xe-z,y-Ee)},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),jr(a.copy(),this.Ab)};function rm(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function Yg(a){return a=ig.get(a),a!==null?new a:new Io}Qt.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,E=a.propertyName;if(x===Do&&E[0]==="S")if(E==="StartingFirstTransaction"){var b=this;a=this.toolManager,a.mouseDownTools.each(function(oe){return oe.diagram=b}),a.mouseMoveTools.each(function(oe){return oe.diagram=b}),a.mouseUpTools.each(function(oe){return oe.diagram=b}),this.ld||this.hf||(this.Jk=!0,this.fn&&(this.kg=!0))}else E==="StartingUndo"||E==="StartingRedo"?(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc(),this.R("ChangingSelection",this.selection)):E==="StartedTransaction"&&(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc());else if(this.aa){this.aa=!1;try{if(a.modelChange===""&&x===Do){(E==="FinishedUndo"||E==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),As(this));var z=this.animationManager;E==="RolledBackTransaction"&&z.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||ws(z),E==="CommittedTransaction"&&this.undoManager.isJustDiscarded&&(this.Ce=Math.min(this.Ce,this.undoManager.historyIndex-1)),E!=="CommittedTransaction"&&E!=="RolledBackTransaction"||!this.undoManager.isPendingUnmodified||setTimeout(function(){y.isModified=!1},1);var ne=a.isTransactionFinished;if(ne&&(rm(this),this.As.clear(),Ta(this.animationManager)),!this.Rt&&ne&&this.lastInput.targetDiagram){this.Rt=!0;var re=this;xn(function(){re.currentTool.standardMouseOver(),re.Rt=!1},10)}}}finally{this.aa=!0}}}};function $d(a,y){y=y.O.s;for(var x=y.length,E=0;E<x;E++)hd(a,y[E])}function hd(a,y){if(y instanceof kl){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof Ln&&x.Bg.add(a);var E=y.Eg;if(E!==null&&E.sq===!0&&y.diagram!==null&&y.diagram.Xn.add(y),x.hn)if(x=x.getAttribute("src")||"",E=a.Og.I(x),E===null)E=[],E.push(y),a.Og.add(x,E);else{for(a=0;a<E.length;a++)if(E[a]===y)return;E.push(y)}}}}function Xg(a,y){if(y instanceof kl){var x=y.element;if(x!==null&&x instanceof HTMLImageElement&&x.hn){var E=x.getAttribute("src")||"",b=a.Og.I(E);if(b!==null){for(var z=0;z<b.length;z++)if(b[z]===y){b.splice(z,1),b.length===0&&(a.Og.remove(E),x.Fq&&x.removeEventListener("load",x.Fq),x.Yp&&x.removeEventListener("error",x.Yp),delete x.Fq,delete x.Yp,x.Bg instanceof Ln&&x.Bg.remove(a),mg(E));break}}}}}Qt.prototype.Wd=function(){this.partManager.Wd()},Qt.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},Qt.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},Qt.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},Qt.prototype.Vb=function(a){return this.partManager.Vb(a)},Qt.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},Le=Qt.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:hn(Hi(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:hn(Hi(y)))};function Dh(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 Jg(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),uu(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}Le.Va=function(){if(this.Zi){var a=gn.alloc();Jg(this,this.computeBounds(a)),gn.free(a)}},Le.rz=function(){for(var a=new Ln,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){As(this),a&&Qf(this,!0),this.ld?Qg(this,!1):(this.Jk=!0,Ll(this))};function Qf(a,y){for(var x=a.ai.iterator;x.next();)om(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function om(a,y,x){if(y!==null){for(var E=y.gl.iterator;E.next();)om(a,E.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function Qg(a,y){if(a.xh&&!a.lt){var x=a.aa;a.aa=!0;var E=a.undoManager.transactionLevel,b=a.layout,z=a.animationManager;try{E===0&&(a.undoManager.isInternalTransaction=!0,a.Ea("Layout")),1>=E&&!z.defaultAnimation.isAnimating&&!z.zb&&(y||Us(z,"Layout")),a.xh=!1;for(var ne=a.ai.iterator;ne.next();)qg(a,ne.value,y,E);b.isValidLayout||(!y||b.isRealtime||b.isRealtime===null||E===0?(b.doLayout(a),As(a),b.isValidLayout=!0):a.xh=!0)}finally{y=a.undoManager.isInternalTransaction,E===0&&(a.eb("Layout"),a.undoManager.isInternalTransaction=!1),!y||E!==0&&E!==1||ws(z),a.aa=x}}}function qg(a,y,x,E){if(y!==null){for(var b=y.gl.iterator;b.next();)qg(a,b.value,x,E);b=y.layout,b===null||b.isValidLayout||(!x||b.isRealtime||E===0?(y.rh=!y.location.w(),b.doLayout(y),y.C(32),ba(a,y),b.isValidLayout=!0):a.xh=!0)}}Le.yz=function(){for(var a=new Nn,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function tv(a){function y(b){var z=b.toLowerCase(),ne=new Nn;x.add(b,ne),x.add(z,ne),E.add(b,b),E.add(z,b)}var x=new xi,E=new xi;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=E}function am(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function qf(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;yt("Unknown DiagramEvent name: "+y)}Le.Bj=function(a,y){return a=qf(this,a),a!==null&&a.add(y),this},Le.am=function(a,y){a=qf(this,a),a!==null&&a.remove(y)},Le.R=function(a,y,x){var E=qf(this,a),b=new lr;if(b.diagram=this,a=am(this,a),a!==null&&(b.name=a),y!==void 0&&(b.subject=y),x!==void 0&&(b.parameter=x),y=E.length,y===1)E.M(0)(b);else if(y!==0)for(E=E.Fa(),x=0;x<y;x++)(0,E[x])(b)};function eg(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 tg(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},Qt.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?jd(this,a):a.assign(this.documentBounds)};function tg(a,y,x,E){var b=a.Xh;if(b===null&&(a.Xh=b=new Fp(a.avoidanceCellSize)),b.vs||b.group!==x||b.Yx!==E){if(b.Hx=Math.max(b.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.width)),b.Ix=Math.max(b.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.height)),x!==null&&(x=sm(a,x)),x===null){y=gn.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),b.initialize(y);for(var z=a.nodes;z.next();){var ne=z.value,re=ne.layer;re!==null&&re.visible&&!re.isTemporary&&ng(a,ne,E,y)}gn.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),b.initialize(y)),y=gn.alloc(),z=x.memberParts;z.next();)ne=z.value,ne instanceof oi&&ng(a,ne,E,y);gn.free(y)}b.group=x,b.Yx=E,b.vs=!1}else y&&rS(b);return b}function sm(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?sm(a,y.containingGroup):null}function ng(a,y,x,E){if(y!==x&&y.isVisible()){if(y.avoidable&&!y.isLinkLabel){y=y.getAvoidableRect(E),a=a.Xh;var b=y.x,z=y.y;if(wg(a,b,z))for(x=(z-a.Od)/a.sc|0,E=Math.min((b+y.width-a.Nd)/a.rc|0,a.di),y=Math.min((z+y.height-a.Od)/a.sc|0,a.ei),b=(b-a.Nd)/a.rc|0;b<=E;b++)if(z=a.ac[b],z.fill)z.fill($c,x,y+1);else for(var ne=x;ne<=y;ne++)z[ne]=$c}else if(y instanceof gr)for(y=y.memberParts;y.next();)b=y.value,b instanceof oi&&ng(a,b,x,E)}}function Dc(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}Qt.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():ep(this)};function ep(a){a.vk===-1&&(a.vk=xn(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=gn.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Jg(a,y),gn.free(y),a.Fc=!0,a.bd(),ep(a))}},a.vp))}Qt.prototype.ug=function(){this.vk!==-1&&(rt.clearTimeout(this.vk),this.vk=-1)},Qt.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 E=this.viewportBounds,b=this.scale;E=gn.allocAt(0,0,E.width*b,E.height*b);var z=tt.allocAt(0,0);if(a.x>=E.x&&a.x<E.x+x.left&&this.allowHorizontalScroll){var ne=Math.max(this.scrollHorizontalLineChange,1);ne|=0,z.x-=ne,a.x<E.x+x.left/2&&(z.x-=ne),a.x<E.x+x.left/4&&(z.x-=4*ne)}else a.x<=E.x+E.width&&a.x>E.x+E.width-x.right&&this.allowHorizontalScroll&&(ne=Math.max(this.scrollHorizontalLineChange,1),ne|=0,z.x+=ne,a.x>E.x+E.width-x.right/2&&(z.x+=ne),a.x>E.x+E.width-x.right/4&&(z.x+=4*ne));return a.y>=E.y&&a.y<E.y+x.top&&this.allowVerticalScroll?(ne=Math.max(this.scrollVerticalLineChange,1),ne|=0,z.y-=ne,a.y<E.y+x.top/2&&(z.y-=ne),a.y<E.y+x.top/4&&(z.y-=4*ne)):a.y<=E.y+E.height&&a.y>E.y+E.height-x.bottom&&this.allowVerticalScroll&&(ne=Math.max(this.scrollVerticalLineChange,1),ne|=0,z.y+=ne,a.y>E.y+E.height-x.bottom/2&&(z.y+=ne),a.y>E.y+E.height-x.bottom/4&&(z.y+=4*ne)),z.Xa(uo)||(y=new tt(y.x+z.x/b,y.y+z.y/b)),gn.free(E),tt.free(z),y},Le=Qt.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 gr&&(y.$p=null)})};function xf(a,y,x){function E(){var ue=+new Date;for(z=!0,ne.reset();ne.next();)if(!ne.value[0].al){z=!1;break}z||ue-le>oe?y(x,b,re):rt.requestAnimationFrame(E)}for(var b=x.callback,z=!0,ne=a.Og.iterator;ne.next();)if(!ne.value[0].al){z=!1;break}if(typeof b!="function"||z)return y(x,b,a);var re=a,oe=x.callbackTimeout||300,le=+new Date;return rt.requestAnimationFrame(function(){E()}),null}Le.Wz=function(a){return Ba?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},Le.Jx=function(a){return a===void 0&&(a={}),xf(this,this.Xz,a)},Le.Xz=function(a,y,x){var E=lm(x,a,"canvas",null);if(E===null)return null;x=E.Z.canvas;var b=null;if(x!==null)switch(b=a.returnType,b===void 0?b="string":b=b.toLowerCase(),b){case Ud+"data":b=E.getImageData(0,0,x.width,x.height);break;case Ud:E=(a.document||document).createElement("img"),E.src=x.toDataURL(a.type,a.details),b=E;break;case"blob":return typeof y!="function"&&yt('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.'),typeof x.toBlob=="function"?(x.toBlob(y,a.type,a.details),"toBlob"):(y(null),null);default:b=x.toDataURL(a.type,a.details)}return typeof y=="function"?(y(b),null):b};function lm(a,y,x,E){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&yt("properties argument must be an Object.");var b=y.size||null,z=y.scale||null;y.scale!==void 0&&isNaN(y.scale)&&(z="NaN");var ne=y.maxSize;y.maxSize===void 0&&(ne=x==="SVG"?new Xn(1/0,1/0):new Xn(2e3,2e3));var re=y.position||null,oe=y.parts||null,le=y.padding===void 0?1:y.padding,ue=y.background||null,pe=y.omitTemporary;pe===void 0&&(pe=!0);var xe=y.document||document,Ee=y.elementFinished||null,Fe=y.showTemporary;Fe===void 0&&(Fe=!pe),y=y.showGrid,y===void 0&&(y=Fe),b!==null&&isNaN(b.width)&&isNaN(b.height)&&(b=null),typeof le=="number"?le=new Di(le):le instanceof Di||yt("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),pe=new Gu(null,xe,void 0,!0);var Oe=pe.context;if(!(b||z||oe||re))return pe.width=a.Aa+Math.ceil(le.left+le.right),pe.height=a.ya+Math.ceil(le.top+le.bottom),x==="SVG"?E===null?null:(E.resize(pe.width,pe.height,pe.width,pe.height),E.ownerDocument=xe,E.hs=Ee,ns(a,E.context,le,new Xn(pe.width,pe.height),a.Ca,a.pa,oe,ue,Fe,y),E.context):(a.Xm=!1,ns(a,Oe,le,new Xn(pe.width,pe.height),a.Ca,a.pa,oe,ue,Fe,y),a.Xm=!0,pe.context);var at=a.Pp,Xe=a.documentBounds.copy();if(Xe.Fv(a.yb),Fe)for(var pt=a.Wa.s,wt=pt.length,Mt=0;Mt<wt;Mt++){var It=pt[Mt];if(It.visible&&It.isTemporary){It=It.Pa.s;for(var qt=It.length,ei=0;ei<qt;ei++){var Si=It[ei];Si.isInDocumentBounds&&Si.isVisible()&&(Si=Si.actualBounds,Si.w()&&Xe.ed(Si))}}}if(pt=new tt(Xe.x,Xe.y),oe!==null){for(wt=new gn(0,0,0,0),Mt=!0,It=oe.iterator,It.reset();It.next();)qt=It.value,qt instanceof Oi&&(ei=qt.layer,ei!==null&&!ei.visible||ei!==null&&!Fe&&ei.isTemporary||!qt.isVisible()||(qt=qt.actualBounds,qt.w()&&(Mt?(Mt=!1,wt.assign(qt)):wt.ed(qt))));Xe.width=wt.width,Xe.height=wt.height,pt.x=wt.x,pt.y=wt.y}return re!==null&&re.w()&&(pt=re,z||(z=at)),wt=re=0,le!==null&&(re=le.left+le.right,wt=le.top+le.bottom),Mt=It=0,b!==null&&(It=b.width,Mt=b.height,isFinite(It)&&(It=Math.max(0,It-re)),isFinite(Mt)&&(Mt=Math.max(0,Mt-wt))),b!==null&&z!==null?(z==="NaN"&&(z=at),b.w()?(b=It,Xe=Mt):isNaN(Mt)?(b=It,Xe=Xe.height*z):(b=Xe.width*z,Xe=Mt)):b!==null?b.w()?(z=Math.min(It/Xe.width,Mt/Xe.height),b=It,Xe=Mt):isNaN(Mt)?(z=It/Xe.width,b=It,Xe=Xe.height*z):(z=Mt/Xe.height,b=Xe.width*z,Xe=Mt):z!==null?z==="NaN"&&ne.w()?(z=Math.min((ne.width-re)/Xe.width,(ne.height-wt)/Xe.height),z>at?(z=at,b=Xe.width,Xe=Xe.height):(b=ne.width,Xe=ne.height)):(b=Xe.width*z,Xe=Xe.height*z):(z=at,b=Xe.width,Xe=Xe.height),le!==null?(b+=re,Xe+=wt):le=new Di(0),ne!==null&&(at=ne.width,ne=ne.height,isNaN(at)&&(at=2e3),isNaN(ne)&&(ne=2e3),isFinite(at)&&(b=Math.min(b,at)),isFinite(ne)&&(Xe=Math.min(Xe,ne))),pe.width=Math.ceil(b),pe.height=Math.ceil(Xe),x==="SVG"?E===null?null:(E.resize(pe.width,pe.height,pe.width,pe.height),E.ownerDocument=xe,E.hs=Ee,ns(a,E.context,le,new Xn(Math.ceil(b),Math.ceil(Xe)),z,pt,oe,ue,Fe,y),E.context):(a.Xm=!1,ns(a,Oe,le,new Xn(Math.ceil(b),Math.ceil(Xe)),z,pt,oe,ue,Fe,y),a.Xm=!0,pe.context)}Ve.Object.defineProperties(Qt.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof ye||(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 Oh(this,rt.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 Oh(this,rt.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(rt,"resize",this.Ov,!1),this.removeEventListener(rt,"wheel",this.$j,!0),ph===this&&(ph=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),Id(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)&&On(a,"0 <= value <= 1",Qt,"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),uu(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),uu(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),uu(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),uu(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&On(a,">= 0",Qt,"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&&On(a,">= 0",Qt,"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 E=y.style.cursor;y.style.cursor=a,x.style.cursor=a,y.style.cursor===E&&(y.style.cursor="-webkit-"+a,x.style.cursor="-webkit-"+a,y.style.cursor===E&&(y.style.cursor="-moz-"+a,x.style.cursor="-moz-"+a,y.style.cursor===E&&(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 On(a,">= 0",Qt,"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||rm(this)}}},model:{get:function(){return this.cc},set:function(a){var y=this.cc;if(y!==a){this.currentTool.doCancel(),y&&y.undoManager!==a.undoManager&&y.undoManager.isInTransaction&&yt("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=Nc(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var E=this.vb;this.vb=!0,Us(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=Yg(this.cc.type);for(var b=0;b<x.length;b++)this.add(x[b]);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=E,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(rt,"pointermove",this.dk,!0),this.addEventListener(rt,"pointerdown",this.ui,!0),this.addEventListener(rt,"pointerup",this.fk,!0),this.addEventListener(rt,"pointerout",this.ek,!0),this.addEventListener(rt,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(rt,"wheel",this.$j,!0),this.addEventListener(rt,"selectstart",this.preventDefault,!1)):(this.removeEventListener(rt,"pointermove",this.dk,!0),this.removeEventListener(rt,"pointerdown",this.ui,!0),this.removeEventListener(rt,"pointerup",this.fk,!0),this.removeEventListener(rt,"pointerout",this.ek,!0),this.removeEventListener(rt,"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(rt,"wheel",this.$j,!0),this.removeEventListener(rt,"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),js(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?Dh(this):(this.vb=!0,a=this.scale,Sf(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=vf(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=vf(this)),a.type!==Hn.Grid&&yt("Diagram.grid must be a Panel of type Panel.Grid");var x=y.panel;x!==null&&x.remove(y),this.fe=a,a.name="GRID",x!==null&&x.add(a),Th(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),Dh(this),this.Ya(),this.g("viewSize",y,a),this.redraw())}},fixedBounds:{get:function(){return this.ut},set:function(a){var y=this.ut;y.D(a)||(a.width!==-1/0&&a.height!==1/0&&a.height!==-1/0||yt("fixedBounds width/height must not be Infinity"),this.ut=a=a.J(),this.Ya(),this.g("fixedBounds",y,a))}},scrollMargin:{get:function(){return this.rj},set:function(a){typeof a=="number"&&(a=new Di(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===Oc&&uu(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,uu(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,Ug(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&&Ug(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!==rl&&uu(this,!1))}},initialAutoScale:{get:function(){return this.Fg},set:function(a){var y=this.Fg;y!==a&&(this.Fg=a,this.g("initialAutoScale",y,a))}},initialViewportSpot:{get:function(){return this.Bt},set:function(a){var y=this.Bt;y!==a&&(a.sb()||yt("initialViewportSpot must be a specific Spot: "+a),this.Bt=a,this.g("initialViewportSpot",y,a))}},initialDocumentSpot:{get:function(){return this.yt},set:function(a){var y=this.yt;y!==a&&(a.sb()||yt("initialViewportSpot must be a specific Spot: "+a),this.yt=a,this.g("initialDocumentSpot",y,a))}},minScale:{get:function(){return this.Ot},set:function(a){var y=this.Ot;y!==a&&(0<a?(this.Ot=a,this.g("minScale",y,a),a>this.scale&&(this.scale=a)):On(a,"> 0",Qt,"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)):On(a,"> 0",Qt,"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),uu(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 Di(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.Ya(),this.g("padding",y,a))}},partManager:{get:function(){return this.Pc},set:function(a){var y=this.Pc;y!==a&&(a.diagram!==null&&yt("Cannot share PartManagers between Diagrams: "+a.toString()),y&&y.Xe(null),this.Pc=a,a.Xe(this))}},nodes:{get:function(){return this.partManager.nodes.iterator}},links:{get:function(){return this.partManager.links.iterator}},parts:{get:function(){return this.partManager.parts.iterator}},layout:{get:function(){return this.Sc},set:function(a){var y=this.Sc;y!==a&&(this.Sc=a,a.diagram=this,a.group=null,this.xh=!0,this.g("layout",y,a),this.$b())}},isTreePathToChildren:{get:function(){return this.Ht},set:function(a){var y=this.Ht;if(y!==a&&(this.Ht=a,this.g("isTreePathToChildren",y,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)yp(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==Ic&&a!==ss&&a!==rg&&yt("Unknown Diagram.treeCollapsePolicy: "+a),this.uu=a,this.g("treeCollapsePolicy",y,a))}},Ue:{get:function(){return this.pw},set:function(a){this.pw=a}},avoidanceCellSize:{get:function(){return this.aw},set:function(a){this.Xh=null,this.aw=new Xn(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{get:function(){return this.bw},set:function(a){this.bw=Math.max(1,a)}},autoScrollInterval:{get:function(){return this.vp},set:function(a){var y=this.vp;y!==a&&(this.vp=a,this.g("autoScrollInterval",y,a))}},autoScrollRegion:{get:function(){return this.xp},set:function(a){typeof a=="number"&&(a=new Di(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),Ve.Object.defineProperties(Qt,{licenseKey:{get:function(){return ap.jc()},set:function(a){ap.add(a.replace(/\s/g,""))}},version:{get:function(){return Vd}}}),Qt.prototype.makeImageData=Qt.prototype.Jx,Qt.prototype.makeImage=Qt.prototype.Wz,Qt.prototype.cacheGroupExternalLinks=Qt.prototype.Fu,Qt.prototype.addRenderer=Qt.prototype.bs,Qt.prototype.makeSVG=Qt.prototype.av,Qt.prototype.makeSvg=Qt.prototype.Cs,Qt.prototype.stopAutoScroll=Qt.prototype.ug,Qt.prototype.doAutoScroll=Qt.prototype.gs,Qt.prototype.isUnoccupied=Qt.prototype.Yj,Qt.prototype.raiseDiagramEvent=Qt.prototype.R,Qt.prototype.removeDiagramListener=Qt.prototype.am,Qt.prototype.addDiagramListener=Qt.prototype.Bj,Qt.prototype.findTreeRoots=Qt.prototype.yz,Qt.prototype.layoutDiagram=Qt.prototype.Uz,Qt.prototype.findTopLevelGroups=Qt.prototype.qz,Qt.prototype.findTopLevelNodesAndLinks=Qt.prototype.rz,Qt.prototype.ensureBounds=Qt.prototype.Va,Qt.prototype.findLinksByExample=Qt.prototype.ls,Qt.prototype.findNodesByExample=Qt.prototype.ms,Qt.prototype.findLinkForData=Qt.prototype.Kc,Qt.prototype.findNodeForData=Qt.prototype.ii,Qt.prototype.findPartForData=Qt.prototype.Lc,Qt.prototype.findLinkForKey=Qt.prototype.findLinkForKey,Qt.prototype.findNodeForKey=Qt.prototype.Vb,Qt.prototype.findPartForKey=Qt.prototype.findPartForKey,Qt.prototype.rebuildParts=Qt.prototype.Wd,Qt.prototype.transformViewToDoc=Qt.prototype.Ps,Qt.prototype.transformRectDocToView=Qt.prototype.zA,Qt.prototype.transformDocToView=Qt.prototype.op,Qt.prototype.centerRect=Qt.prototype.es,Qt.prototype.scrollToRect=Qt.prototype.tv,Qt.prototype.scroll=Qt.prototype.scroll,Qt.prototype.highlightCollection=Qt.prototype.Jz,Qt.prototype.highlight=Qt.prototype.Iz,Qt.prototype.selectCollection=Qt.prototype.rA,Qt.prototype.select=Qt.prototype.select,Qt.prototype.updateAllRelationshipsFromData=Qt.prototype.rp,Qt.prototype.updateAllTargetBindings=Qt.prototype.updateAllTargetBindings,Qt.prototype.commit=Qt.prototype.commit,Qt.prototype.rollbackTransaction=Qt.prototype.Kf,Qt.prototype.commitTransaction=Qt.prototype.eb,Qt.prototype.startTransaction=Qt.prototype.Ea,Qt.prototype.raiseChanged=Qt.prototype.g,Qt.prototype.raiseChangedEvent=Qt.prototype.cb,Qt.prototype.removeChangedListener=Qt.prototype.ik,Qt.prototype.addChangedListener=Qt.prototype.Pe,Qt.prototype.removeModelChangedListener=Qt.prototype.mA,Qt.prototype.addModelChangedListener=Qt.prototype.Yw,Qt.prototype.findLayer=Qt.prototype.Qj,Qt.prototype.removeLayer=Qt.prototype.kA,Qt.prototype.addLayerAfter=Qt.prototype.Cy,Qt.prototype.addLayerBefore=Qt.prototype.Ww,Qt.prototype.addLayer=Qt.prototype.Al,Qt.prototype.moveParts=Qt.prototype.moveParts,Qt.prototype.copyParts=Qt.prototype.Kj,Qt.prototype.removeParts=Qt.prototype.Is,Qt.prototype.remove=Qt.prototype.remove,Qt.prototype.add=Qt.prototype.add,Qt.prototype.clearDelayedGeometries=Qt.prototype.bx,Qt.prototype.setProperties=Qt.prototype.nm,Qt.prototype.attach=Qt.prototype.Du,Qt.prototype.set=Qt.prototype.set,Qt.prototype.resetInputOptions=Qt.prototype.Sx,Qt.prototype.setInputOption=Qt.prototype.sA,Qt.prototype.getInputOption=Qt.prototype.Ql,Qt.prototype.resetRenderingHints=Qt.prototype.Tx,Qt.prototype.setRenderingHint=Qt.prototype.Xx,Qt.prototype.getRenderingHint=Qt.prototype.Gf,Qt.prototype.maybeUpdate=Qt.prototype.bd,Qt.prototype.requestUpdate=Qt.prototype.$b,Qt.prototype.delayInitialization=Qt.prototype.Xy,Qt.prototype.isUpdateRequested=Qt.prototype.Pz,Qt.prototype.invalidateDocumentBounds=Qt.prototype.Ya,Qt.prototype.findObjectsNear=Qt.prototype.og,Qt.prototype.findPartsNear=Qt.prototype.mz,Qt.prototype.findObjectsIn=Qt.prototype.Cf,Qt.prototype.findPartsIn=Qt.prototype.ux,Qt.prototype.findObjectsAt=Qt.prototype.ji,Qt.prototype.findPartsAt=Qt.prototype.lz,Qt.prototype.findObjectAt=Qt.prototype.ic,Qt.prototype.findPartAt=Qt.prototype.Ol,Qt.prototype.focusObject=Qt.prototype.zz,Qt.prototype.alignDocument=Qt.prototype.Jy,Qt.prototype.zoomToRect=Qt.prototype.BA,Qt.prototype.zoomToFit=Qt.prototype.zoomToFit,Qt.prototype.diagramScroll=Qt.prototype.kx,Qt.prototype.focus=Qt.prototype.focus;var ig=new xi,um=null,Ba=rt.document!==void 0,Kd=null,cd="",rl=new fn(Qt,"None",0),cu=new fn(Qt,"Uniform",1),dd=new fn(Qt,"UniformToFill",2),Pf=new fn(Qt,"CycleAll",10),tp=new fn(Qt,"CycleNotDirected",11),np=new fn(Qt,"CycleNotDirectedFast",12),ip=new fn(Qt,"CycleNotUndirected",13),rp=new fn(Qt,"CycleDestinationTree",14),op=new fn(Qt,"CycleSourceTree",15),Oc=new fn(Qt,"DocumentScroll",1),wf=new fn(Qt,"InfiniteScroll",2),Ic=new fn(Qt,"TreeParentCollapsed",21),ss=new fn(Qt,"AllParentsCollapsed",22),rg=new fn(Qt,"AnyParentsCollapsed",23),ap=new Nn,Vd="2.3.10",Ud="image",Cf=null,hm=!1;function Qs(){if(Ba){var a=rt.document.createElement("canvas"),y=a.getContext("2d"),x=vn("7ca11abfd022028846");y[x]=vn("398c3597c01238");for(var E=["5da73c80a36455d7038e4972187c3cae51fd22",Vt.Dx+"4ae6247590da4bb21c324ba3a84e385776",_t.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",it.za],b=1;5>b;b++)y[vn("7ca11abfd7330390")](vn(E[b-1]),10,15*b);for(y[x]=vn("39f046ebb36e4b"),x=1;5>x;x++)y[vn("7ca11abfd7330390")](vn(E[x-1]),10,15*x);(E.length!==4||E[0][0]!=="5"||E[3][0]!=="7")&&(_t.prototype.Cd=_t.prototype.Eu),Cf=a}}Qt.className="Diagram",Qt.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=rt.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof Qt?y.H:null},Qt.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},Qt.useDOM=function(a){Ba=a?rt.document!==void 0:!1},Qt.isUsingDOM=function(){return Ba},Qt.None=rl,Qt.Uniform=cu,Qt.UniformToFill=dd,Qt.CycleAll=Pf,Qt.CycleNotDirected=tp,Qt.CycleNotDirectedFast=np,Qt.CycleNotUndirected=ip,Qt.CycleDestinationTree=rp,Qt.CycleSourceTree=op,Qt.DocumentScroll=Oc,Qt.InfiniteScroll=wf,Qt.TreeParentCollapsed=Ic,Qt.AllParentsCollapsed=ss,Qt.AnyParentsCollapsed=rg;function cm(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Yd(a,y){if(y.ib.setTransform(y.Mb,0,0,y.Mb,0,0),y.ib.yc(),a.Rc===null)e:{y="f";var x=rt[vn("76a715b2f73f148a")][vn("72ba13b5")]||"";if(a.Rc=!0,Ba){var E=Qt[vn("76a115b6ed251eaf4692")];if(E)for(var b=ap.iterator;b.next()&&(E=b.value,E=vn(E).split(vn("39e9")),!(6>E.length));){var z=vn(E[1]).split(".");if(E[4]!=="7da71ca0")break;var ne=vn(Vt[vn("6cae19")]).split(".");if(z[0]>ne[0]||z[0]===ne[0]&&z[1]>=ne[1]){var re=rt[vn("74a900bae4370f8b51")][vn("6fbb13a1c2311e8a57")].toLowerCase();if(ne=re[vn("73a612b6fb191d")](vn("3aad1ab6e022098b4dc4")),z=vn(E[2]),-1<ne&&(re=re[vn("73a612b6fb191d")](z.toLowerCase()+"/"),a.Rc=!(-1<re&&re<ne),!a.Rc))break;for(ne=x[vn("76ad18b4f73e")],re=x[vn("73a612b6fb191d")](vn("35e7"))+2;re<ne;re++)y+=x[re];if(ne=y[vn("73a612b6fb191d")](z),0>ne&&z!==vn("7da71ca0ad381e90")&&(ne=y[vn("73a612b6fb191d")](vn("76a715b2ef3e149757"))),0>ne&&(ne=y[vn("73a612b6fb191d")](vn("76a715b2ef3e149757"))),0>ne&&(ne=y[vn("73a612b6fb191d")](vn("2bfa41fdb3784bca12"))),0>ne&&(ne=x[vn("73a612b6fb191d")](vn("7baa19a6f76c1988428554"))),a.Rc=!(0<=ne&&ne<y[vn("73a612b6fb191d")](vn("35"))||y[vn("73a612b6fb191d")](vn("35"))===-1),!a.Rc||x[vn("73a612b6fb191d")](vn("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[vn("73a612b6fb191d")](z)),!a.Rc)||(ne=rt[vn("76a715b2f73f148a")][vn("69ad17a1e03e")],re=ne[vn("73a612b6fb191d")](vn("7fb002b6ed25128b4da25b2e")),-1<re&&(a.Rc=!(ne[vn("73a612b6fb191d")](z)>re),!a.Rc)))break;if(z[0]==="#"){ne=rt.document.createElement("div");for(var oe=E[0].replace(/[A-Za-z]/g,"");4>oe.length;)oe+="9";if(re=oe,oe=oe.substr(oe.length-4),E="",E+=["gsh","gsf"][parseInt(oe.substr(0,1),10)%2],E+=["Header","Background","Display","Feedback"][parseInt(oe.substr(0,1),10)%4],ne[vn("79a417a0f0181a8946")]=E,rt.document[vn("78a712aa")]){rt.document[vn("78a712aa")][vn("7bb806b6ed32388c4a875b")](ne),oe=rt.getComputedStyle(ne).getPropertyValue(vn("78a704b7e62456904c9b12701b6532a8"));var le=rt.getComputedStyle(ne).getPropertyValue(vn("75b817b0ea2202"));if(rt.document[vn("78a712aa")][vn("68ad1bbcf533388c4a875b")](ne),oe){if(ne=rt[vn("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(ne&&ne(vn("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(E="."+E,z=0;z<document.styleSheets.length;z++){ne=document.styleSheets[z].rules||document.styleSheets[z].cssRules;for(var ue in ne)if(E===ne[ue].selectorText){a.Rc=!1;break e}}}}else a.Rc=null,a.Rc=!1}}}else{for(ue=x[vn("76ad18b4f73e")],b=x[vn("73a612b6fb191d")](vn("35e7"))+2;b<ue;b++)y+=x[b];x=y[vn("73a612b6fb191d")](vn("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[vn("73a612b6fb191d")](vn("35")))}}}return 0<a.Rc&&a!==a.wy}cm.className="DiagramHelper";function fc(a){this.j=a===void 0?new tt:a,this.o=new tt}Ve.Object.defineProperties(fc.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 Ef="DraggingInfo";fc.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 Xn(NaN,NaN).freeze(),this.gridSnapCellSpot=cs,this.gridSnapOrigin=new tt(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},ae.className="DraggingOptions";function ge(a,y){if(typeof a=="string"||rt.Element&&a instanceof Element)var x=Qt.call(this,a)||this;else x=Qt.call(this)||this,y=a;return fe(x),y&&x.nm(y),x}Ot(ge,Qt);function fe(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=bl,a.layout=new Ds}ge.prototype.reset=function(){Qt.prototype.reset.call(this),fe(this)},ge.className="Palette";function ye(a,y){if(typeof a=="string"||rt.Element&&a instanceof Element)var x=Qt.call(this,a)||this;else x=Qt.call(this)||this,y=a;var E=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 Oi;var b=new Er;return b.stroke="magenta",b.strokeWidth=2,b.fill="transparent",b.name="BOXSHAPE",a.selectable=!0,a.selectionAdorned=!1,a.selectionObjectName="BOXSHAPE",a.locationObjectName="BOXSHAPE",a.resizeObjectName="BOXSHAPE",a.cursor="move",a.add(b),x.j=a,x.allowCopy=!1,x.allowDelete=!1,x.allowSelect=!0,x.autoScrollRegion=new Di(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new st,x.toolManager.mouseMoveTools),x.click=function(){var z=E.observed;if(z!==null){var ne=z.viewportBounds,re=E.lastInput.documentPoint;z.position=new tt(re.x-ne.width/2,re.y-ne.height/2)}},x.Pf=function(){E.Ya(),We(E)},x.Xd=function(){E.observed!==null&&(E.Ya(),E.N())},x.Ha=function(){1>E.updateDelay?E.N():E.o||(E.o=!0,setTimeout(function(){return E.redraw()},E.updateDelay))},x.Of=function(){E.observed!==null&&We(E)},x.autoScale=cu,x.vb=!1,y&&Object.assign(x,y),x}Ot(ye,Qt),ye.prototype.computePixelRatio=function(){return 1},ye.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(Mu(this),this.ql===null){var x=new Gu(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),Te(this)}finally{this.ta=a,this.ib=y}}}Qt.prototype.redraw.call(this)},ye.prototype.gc=function(){if(this.Ka===null&&yt("No div specified"),this.ta===null&&yt("No canvas specified"),!(this.ta instanceof Oh)&&(Ov(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){Mu(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?Te(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,E=0;E<x;E++)y[E].gc(a,this);this.Fc=this.vd=!1}}};function Te(a){var y=a.observed;if(y!==null){var x=a.drawsTemporaryLayers,E=a.drawsGrid&&x,b=y.grid;E&&b!==null&&b.visible&&!isNaN(b.width)&&!isNaN(b.height)&&(b=gn.alloc().assign(a.viewportBounds).ed(y.viewportBounds),Th(y,b),gn.free(b),As(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),b=a.ib,b.scale(a.Mb,a.Mb),b.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),b.yc(),y=y.Wa.s,z=y.length;for(var ne=0;ne<z;ne++){var re=y[ne],oe=a;if(re.visible&&re.opacity!==0){var le=re.diagram.grid.part;if(!x&&re.isTemporary)E&&le.layer===re&&(re=_s(re,b),le.gc(b,oe),b.globalAlpha=re);else{for(var ue=_s(re,b),pe=oe.scale,xe=gn.alloc(),Ee=re.Pa.s,Fe=Ee.length,Oe=0;Oe<Fe;Oe++){var at=Ee[Oe];(E||at!==le)&&re.Oj(b,at,oe,null,pe,xe,!1)}gn.free(xe),b.globalAlpha=ue}}}}}function We(a){var y=a.box;if(y!==null){var x=a.observed;if(x!==null){a.Fc=!0,x=x.viewportBounds;var E=y.selectionObject,b=Xn.alloc();b.h(x.width,x.height),E.desiredSize=b,Xn.free(b),a=2/a.scale,E instanceof Er&&(E.strokeWidth=a),y.location=new tt(x.x-a/2,x.y-a/2),y.isSelected=!0}}}ye.prototype.computeBounds=function(){var a=this.observed;if(a===null)return $r;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},ye.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},ye.prototype.onViewportBoundsChanged=function(a,y,x,E){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),We(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=E,this.R("ViewportBoundsChanged",this.fc,a))},Ve.Object.defineProperties(ye.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof ye&&yt("Overview.observed Diagram may not be an Overview itself: "+a),y!==a){if(y!==null&&(this.remove(this.box),y.am("ViewportBoundsChanged",this.Pf),y.am("DocumentBoundsChanged",this.Xd),y.am("InvalidateDraw",this.Ha),y.am("AnimationFinished",this.Of)),this.V=a,a!==null&&(a.Bj("ViewportBoundsChanged",this.Pf),a.Bj("DocumentBoundsChanged",this.Xd),a.Bj("InvalidateDraw",this.Ha),a.Bj("AnimationFinished",this.Of),this.add(this.box)),this.Ya(),a===null){this.ql=null;var x=this.ta,E=this.ib;x&&E&&(E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,x.width,x.height))}else this.Ha(null),We(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),We(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)}}}),ye.className="Overview";function st(){aa.call(this),this.j=null}Ot(st,aa),st.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)},st.prototype.doActivate=function(){this.j=null,aa.prototype.doActivate.call(this)},st.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},st.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 E=a.firstInput.documentPoint;x=x.location,this.j=new tt(E.x-x.x,E.y-x.y)}a=a.lastInput.documentPoint,y.position=new tt(a.x-this.j.x,a.y-this.j.y)}}},st.className="OverviewDraggingTool";function ot(){Zr(this),this.H=ph,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=$r,this.hb=!0,this.cg=null,this.ob=200}ot.prototype.toString=function(){return"CommandHandler"},ot.prototype.Xe=function(a){this.H=a},ot.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=Dr?y.meta:y.control,E=y.shift,b=y.alt,z=y.key;!x||z!=="C"&&z!=="Insert"?x&&z==="X"||E&&z==="Del"?this.canCutSelection()&&this.cutSelection():x&&z==="V"||E&&z==="Insert"?this.canPasteSelection()&&this.pasteSelection():x&&z==="Y"||b&&E&&z==="Backspace"?this.canRedo()&&this.redo():x&&z==="Z"||b&&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"?E&&a.allowHorizontalScroll?a.scroll("page","left"):a.allowVerticalScroll&&a.scroll("page","up"):z==="PageDown"?E&&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():E&&z==="Z"?this.canZoomToFit()&&this.zoomToFit():x&&!E&&z==="G"?this.canGroupSelection()&&this.groupSelection():x&&E&&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()},ot.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},ot.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof Vr&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},ot.prototype.canStopCommand=function(){return!0},ot.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 E=a.links;E.next();)E.value.isSelected=!0}finally{a.R("ChangedSelection",a.selection),a.currentCursor=""}},ot.prototype.canSelectAll=function(){return this.diagram.allowSelect},ot.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 Ln,x=a.selection.iterator;x.next();)md(y,x.value,!0,this.deletesTree?1/0:0,this.deletesConnectedLinks?null:!1,function(E){return E.canDelete()});a.Is(y,!0),a.R("SelectionDeleted",y)}finally{a.eb("Delete"),a.R("ChangedSelection",a.selection),a.currentCursor=""}},ot.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},ot.prototype.copySelection=function(){var a=this.diagram,y=new Ln;for(a=a.selection.iterator;a.next();)md(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},ot.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},ot.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},ot.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},ot.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)Kd=null,cd="";else{x=y.model;var E=!1,b=!1,z=null;try{x.Tl()&&(E=x.Jj,x.Jj=this.copiesParentKey),x.Wj()&&(b=x.Ij,x.Ij=this.copiesGroupKey),z=y.Kj(a,null,!0)}finally{x.Tl()&&(x.Jj=E),x.Wj()&&(x.Ij=b),x=new Nn,x.addAll(z),Kd=x,cd=y.model.dataFormat}}y.R("ClipboardChanged",x)},ot.prototype.pasteFromClipboard=function(){var a=new Ln,y=Kd;if(y===null)return a;var x=this.diagram;if(cd!==x.model.dataFormat)return a;var E=x.model,b=!1,z=!1,ne=null;try{E.Tl()&&(b=E.Jj,E.Jj=this.copiesParentKey),E.Wj()&&(z=E.Ij,E.Ij=this.copiesGroupKey),ne=x.Kj(y,x,!1)}finally{for(E.Tl()&&(E.Jj=b),E.Wj()&&(E.Ij=z),y=ne.iterator;y.next();)x=y.value,E=y.key,x.location.w()||(E.location.w()?x.location=E.location:!x.position.w()&&E.position.w()&&(x.position=E.position)),a.add(x)}return a},ot.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 E=x.iterator;E.next();)E.value.isSelected=!0;if(a!==null){var b=y.computePartsBounds(y.selection);if(b.w()){var z=this.computeEffectiveCollection(y.selection,y.Wm);Ah(y,z,new tt(a.x-b.centerX,a.y-b.centerY),y.Wm,!1)}}y.R("ClipboardPasted",x)}finally{y.eb("Paste"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},ot.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||Kd===null||Kd.count===0||cd!==a.model.dataFormat)},ot.prototype.undo=function(){this.diagram.undoManager.undo()},ot.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},ot.prototype.redo=function(){this.diagram.undoManager.redo()},ot.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},ot.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===rl&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},ot.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==rl?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},ot.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===rl&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},ot.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==rl?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},ot.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},ot.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},ot.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,E=a.scale;Us(y,"Zoom To Fit"),this.isZoomToFitRestoreEnabled&&E===this.Au&&!isNaN(this.Jt)&&a.documentBounds.D(this.yu)?(a.scale=this.Jt,a.position=this.sw,this.Au=NaN,this.yu=$r):(this.Jt=E,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),ws(y)},ot.prototype.canZoomToFit=function(){return this.diagram.allowZoom},ot.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;Us(x,"Scroll To Part");var E=this.scrollToPartPause;if(0<E){var b=Lt(this,a,[a]);if(b.length===1)y.Ea(),y.es(a.actualBounds),y.eb("Scroll To Part");else{var z=function(){y.Ea();for(var oe=b.pop();0<b.length&&oe instanceof oi&&oe.isTreeExpanded&&(!(oe instanceof gr)||oe.isSubGraphExpanded);)oe=b.pop();0<b.length?(oe instanceof Oi&&y.tv(oe.actualBounds),oe instanceof oi&&!oe.isTreeExpanded&&(oe.isTreeExpanded=!0),oe instanceof gr&&!oe.isSubGraphExpanded&&(oe.isSubGraphExpanded=!0)):(oe instanceof Oi&&y.es(oe.actualBounds),y.am("LayoutCompleted",ne)),y.eb("Scroll To Part")},ne=function(){xn(z,(x.isEnabled?x.duration:0)+E)};y.Bj("LayoutCompleted",ne),z()}}else{var re=y.position.copy();y.es(a.actualBounds),re.Xa(y.position)&&x.Cc()}}};function Lt(a,y,x){if(y.isVisible())return x;if(y instanceof lo)Lt(a,y.adornedPart,x);else if(y instanceof Kn){var E=y.fromNode;E!==null&&Lt(a,E,x),y=y.toNode,y!==null&&Lt(a,y,x)}else y instanceof oi&&(E=y.labeledLink,E!==null&&Lt(a,E,x),E=y.pg(),E!==null&&(E.isTreeExpanded||E.wasTreeExpanded||x.push(E),Lt(a,E,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),Lt(a,y,x));return x}ot.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof Oi)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},ot.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),Us(y.animationManager,"Collapse Tree");var x=new Nn;if(a!==null&&a.isTreeExpanded)a.collapseTree(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof oi&&b.isTreeExpanded&&(b.collapseTree(),x.add(b))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},ot.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof oi&&a.isTreeExpanded))return!1;if(0<a.Qo().count)return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof oi&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},ot.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),Us(y.animationManager,"Expand Tree");var x=new Nn;if(a!==null&&!a.isTreeExpanded)a.expandTree(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof oi&&!b.isTreeExpanded&&(b.expandTree(),x.add(b))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},ot.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof oi)||a.isTreeExpanded)return!1;if(0<a.Qo().count)return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof oi&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},ot.prototype.groupSelection=function(){var a=this.diagram,y=a.model;if(y.Xj()){var x=this.archetypeGroupData;if(x!==null){var E=null;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Group");for(var b=new Nn,z=a.selection.iterator;z.next();){var ne=z.value;ne.Zc()&&ne.canGroup()&&b.add(ne)}for(var re=new Nn,oe=b.iterator;oe.next();){var le=oe.value;z=!1;for(var ue=b.iterator;ue.next();)if(le.Td(ue.value)){z=!0;break}z||re.add(le)}if(0<re.count){var pe=re.first().containingGroup;if(pe!==null)for(;pe!==null;){b=!1;for(var xe=re.iterator;xe.next();)if(!xe.value.Td(pe)){b=!0;break}if(b)pe=pe.containingGroup;else break}if(x instanceof gr)$u(x),E=x.copy(),E!==null&&a.add(E);else if(y.Yu(x)){var Ee=y.copyNodeData(x);Wt(Ee)&&(y.xf(Ee),E=a.ii(Ee))}if(E!==null){pe!==null&&this.isValidMember(pe,E)&&(E.containingGroup=pe);for(var Fe=re.iterator;Fe.next();){var Oe=Fe.value;this.isValidMember(E,Oe)&&(Oe.containingGroup=E)}a.clearSelection(!0),E.isSelected=!0}}a.R("SelectionGrouped",E)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},ot.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 dn(a){var y=qn();for(a=a.iterator;a.next();){var x=a.value;x instanceof Kn||y.push(x)}a=new Ln,x=y.length;for(var E=0;E<x;E++){for(var b=y[E],z=!0,ne=0;ne<x;ne++)if(b.Td(y[ne])){z=!1;break}z&&a.add(b)}return di(y),a}ot.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof Kn)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},ot.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 E=new Nn;if(a!==null)E.add(a);else for(var b=y.selection.iterator;b.next();){var z=b.value;z instanceof gr&&z.canUngroup()&&E.add(z)}var ne=new Nn;if(0<E.count){y.clearSelection(!0);for(var re=E.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;ne.addAll(oe.memberParts);for(var pe=ne.iterator;pe.next();){var xe=pe.value;if(xe.isSelected=!0,!(xe instanceof Kn)){var Ee=xe.data;Ee!==null?x.mp(Ee,ue):xe.containingGroup=le}}y.remove(oe)}}y.R("SelectionUngrouped",E,ne)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},ot.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 gr))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof gr&&y.canUngroup())return!0;return!1},ot.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=dn(a).iterator;a.next();){var E=a.value;E.containingGroup!==null&&(!y||this.isValidMember(null,E)?E.containingGroup=null:x=!1)}return x},ot.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),Us(y.animationManager,"Collapse SubGraph");var x=new Nn;if(a!==null&&a.isSubGraphExpanded)a.collapseSubGraph(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof gr&&b.isSubGraphExpanded&&(b.collapseSubGraph(),x.add(b))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},ot.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof gr&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof gr&&y.isSubGraphExpanded)return!0;return!1},ot.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),Us(y.animationManager,"Expand SubGraph");var x=new Nn;if(a!==null&&!a.isSubGraphExpanded)a.expandSubGraph(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof gr&&!b.isSubGraphExpanded&&(b.expandSubGraph(),x.add(b))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},ot.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof gr&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof gr&&!y.isSubGraphExpanded)return!0;return!1},ot.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 E=y.selection.iterator;E.next();){var b=E.value;if(b.canEdit()){a=b;break}}if(a===null)return;a=a.Nl(function(z){return z instanceof Qo&&z.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},ot.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 Qo))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 Qo&&x.editable}),a!==null))return!0;return!1},ot.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 E=y.lastInput,b=null;a instanceof Rt?b=a.ga(Qr):y.viewportBounds.ca(E.documentPoint)||(b=y.viewportBounds,b=new tt(b.x+b.width/2,b.y+b.height/2)),b!==null&&(E.viewPoint=y.op(b),E.documentPoint=b,E.left=!1,E.right=!0,E.up=!0),y.currentTool=x,Vo(x,!1,a)}},ot.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)},ot.prototype.computeEffectiveCollection=function(a,y){var x=this.diagram,E=x.toolManager.findTool("Dragging"),b=x.currentTool===E;if(y===void 0&&(y=b?E.dragOptions:x.Wm),E=new xi,a===null)return E;for(var z=a.iterator;z.next();)Hu(x,E,z.value,b,y);if(x.draggedLink!==null&&y.dragsLink)return E;for(z=a.iterator;z.next();)a=z.value,a instanceof Kn&&(y=a.fromNode,y===null||E.contains(y)?(y=a.toNode,y===null||E.contains(y)||E.remove(a)):E.remove(a));return E},Ve.Object.defineProperties(ot.prototype,{diagram:{get:function(){return this.H}},copiesClipboardData:{get:function(){return this.o},set:function(a){this.o=a}},copiesConnectedLinks:{get:function(){return this.u},set:function(a){this.u=a}},deletesConnectedLinks:{get:function(){return this.Ha},set:function(a){this.Ha=a}},copiesTree:{get:function(){return this.ia},set:function(a){this.ia=a}},deletesTree:{get:function(){return this.nb},set:function(a){this.nb=a}},copiesParentKey:{get:function(){return this.V},set:function(a){this.V=a}},copiesGroupKey:{get:function(){return this.F},set:function(a){this.F=a}},archetypeGroupData:{get:function(){return this.j},set:function(a){this.j=a}},memberValidation:{get:function(){return this.ij},set:function(a){this.ij=a}},defaultScale:{get:function(){return this.diagram.defaultScale},set:function(a){this.diagram.defaultScale=a}},zoomFactor:{get:function(){return this.Hb},set:function(a){1<a||yt("zoomFactor must be larger than 1.0, not: "+a),this.Hb=a}},isZoomToFitRestoreEnabled:{get:function(){return this.hb},set:function(a){this.hb=a}},scrollToPartPause:{get:function(){return this.ob},set:function(a){this.ob=a}}}),ot.className="CommandHandler",cc=function(){return new ot};function Rt(){Zr(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new tt(NaN,NaN).freeze(),this.jd=na,this.Ab=new _t,this.wh=new _t,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=bs,this.uc=new gn(NaN,NaN,NaN,NaN).freeze(),this.Ib=new gn(NaN,NaN,NaN,NaN).freeze(),this.dc=new gn(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=Co,this.Ag=this.io=0,this.V=this.tb=this.Dh=this.A=this.Ua=null,this.Uc=!1,this.jo=this.Ng=null}var zn,In,Ci,Ti,Zi,vr,Kr,Br,io,Wo;Rt.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=hi(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},Rt.prototype.Vw=function(a){var y=this.Dh;if(Jt(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},Rt.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},Rt.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},Rt.prototype.copy=function(){return this.clone()},Le=Rt.prototype,Le.qb=function(a){a.classType===Kn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:yt("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===Rt&&(this.stretch=a)},Le.toString=function(){return li(this.constructor)+"#"+Bi(this)},Le.th=function(){this.A!==null&&(this.A.nc=!0)};function Lr(a){a.A===null?a.A=new Mf:a.A.nc&&(a.A=a.A.copy())}Le.Xc=function(){if(this.ba===null){var a=new sp;a.Xi=Fa,a.yj=Fa,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},Le.cb=function(a,y,x,E,b,z,ne){var re=this.part;if(re!==null&&(re.gk(a,y,x,E,b,z,ne),x===this&&a===Yr&&Zs(this)&&oa(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 xi),ne=z.undoManager.transactionLevel===0,a.startCondition===ks?ne=!0:a.startCondition===Ya&&(ne=!1),ne?(z=new La,Sa(a,z),ne=this.jo.get(a),ne!==null&&ne.stop(),this.jo.add(a,z),z.vu=this,z.Nw=a,z.add(this,y,E,b),z.start()):(Us(z.animationManager,"Trigger"),z.animationManager.defaultAnimation.add(this,y,E,b)))),this instanceof Hn&&x===re&&(re.l&16777216)!==0&&re.data!==null))for(x=this.O.s,E=x.length,b=0;b<E;b++)re=x[b],re instanceof Hn&&qd(re,function(oe){oe.data!==null&&oe.l&16777216&&oe.La(y)})};function oa(a,y,x){var E=a.ih();if(E!==null)for(var b=a.localBindings.iterator;b.next();){var z=b.value,ne=null;if(z.sourceName!==null){if(ne=MS(z,E,a),ne===null)continue;z.sp(a,ne,x,null)}else if(z.isToModel){var re=y.diagram;re===null||re.skipsModelSourceBindings||z.sp(a,re.model.modelData,x,E)}else{if(re=E.data,re===null)continue;var oe=y.diagram;oe===null||oe.skipsModelSourceBindings||z.sp(a,re,x,E)}ne===a&&(re=E.ks(z.Ai),re!==null&&z.Mv(re,ne,x))}}Le.ks=function(a){return this.bindingId===a?this:null},Le.g=function(a,y,x){this.cb(Yr,a,this,y,x)},Le.Ge=function(a,y,x,E){var b=this.uc;if(b.h(a,y,x,E),this.Ca!==1||this.Kb!==0){this.Lb===null&&(this.Lb=new _t);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),z.pp(b)}};function Ss(a,y,x,E){return a.pickable===!1?!1:(E.multiply(a.transform),x?a.Yc(y,E):a.fh(y,E))}Le.tx=function(a,y,x){if(this.pickable===!1)return!1;var E=this.naturalBounds;return y=a.Bf(y),x?To(a.x,a.y,0,0,0,E.height)<=y||To(a.x,a.y,0,E.height,E.width,E.height)<=y||To(a.x,a.y,E.width,E.height,E.width,0)<=y||To(a.x,a.y,E.width,0,0,0)<=y:a.zd(0,0)<=y&&a.zd(0,E.height)<=y&&a.zd(E.width,0)<=y&&a.zd(E.width,E.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 E=this.diagram;if(E!==null&&E.wq){var b=E.Ql("extraTouchThreshold"),z=E.Ql("extraTouchArea"),ne=z/2,re=this.naturalBounds;E=this.Df()*E.scale;var oe=1/E;if(re.width*E<b&&re.height*E<b)return a=Fo(x.x-ne*oe,x.y-ne*oe,x.width+z*oe,x.height+z*oe,y.x,y.y),tt.free(y),a}return b=!1,(this instanceof lo||this instanceof Er?Fo(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)?b=!1:this.areaBackground!==null&&x.ca(y)||this.Ma!==null&&this.dc.ca(a)?b=!0:b=this.gh(a)),tt.free(y),b},Le.gh=function(a){var y=this.naturalBounds;return Fo(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=gn.allocAt(0,0,y.width,y.height);var x=this.transform,E=!1,b=tt.allocAt(a.x,a.y);return y.ca(x.Cd(b))&&(b.h(a.x,a.bottom),y.ca(x.Cd(b))&&(b.h(a.right,a.bottom),y.ca(x.Cd(b))&&(b.h(a.right,a.y),y.ca(x.Cd(b))&&(E=!0)))),tt.free(b),gn.free(y),E},Le.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,E=!1,b=tt.allocAt(0,0);return a.ca(y.Ga(b))&&(b.h(0,x.height),a.ca(y.Ga(b))&&(b.h(x.width,x.height),a.ca(y.Ga(b))&&(b.h(x.width,0),a.ca(y.Ga(b))&&(E=!0)))),tt.free(b),E},Le.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,E=tt.allocAt(0,0),b=tt.allocAt(0,x.height),z=tt.allocAt(x.width,x.height),ne=tt.allocAt(x.width,0),re=!1;if(a.ca(y.Ga(E))||a.ca(y.Ga(b))||a.ca(y.Ga(z))||a.ca(y.Ga(ne)))re=!0;else{x=gn.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),gn.free(x),!re&&(it.us(a,E,b)||it.us(a,b,z)||it.us(a,z,ne)||it.us(a,ne,E))&&(re=!0)}return tt.free(E),tt.free(b),tt.free(z),tt.free(ne),re},Le.ga=function(a,y){if(y===void 0&&(y=new tt),a instanceof bi){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 gn);var y=this.naturalBounds,x=this.oe,E=tt.allocAt(0,0).transform(x);return a.h(E.x,E.y,0,0),E.h(y.width,0).transform(x),ma(a,E.x,E.y,0,0),E.h(y.width,y.height).transform(x),ma(a,E.x,E.y,0,0),E.h(0,y.height).transform(x),ma(a,E.x,E.y,0,0),tt.free(E),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,E,b){var z=this.transform,ne=1/(z.m11*z.m22-z.m12*z.m21),re=z.m22*ne,oe=-z.m12*ne,le=-z.m21*ne,ue=z.m11*ne,pe=ne*(z.m21*z.dy-z.m22*z.dx),xe=ne*(z.m12*z.dx-z.m11*z.dy);return this.areaBackground!==null?(z=this.actualBounds,it.Ff(z.left,z.top,z.right,z.bottom,a,y,x,E,b)):(ne=a*re+y*le+pe,a=a*oe+y*ue+xe,y=x*re+E*le+pe,x=x*oe+E*ue+xe,b.h(0,0),E=this.naturalBounds,x=it.Ff(0,0,E.width,E.height,ne,a,y,x,b),b.transform(z),x)},Rt.prototype.measure=function(a,y,x,E){if(fu(this)!==!1){var b=this.Kg,z=b.right+b.left;b=b.top+b.bottom,a=Math.max(a-z,0),y=Math.max(y-b,0),x=Math.max((x||0)-z,0),E=Math.max((E||0)-b,0),z=this.angle,b=this.desiredSize;var ne=this.kq();z===90||z===270?(a=isFinite(b.height)?b.height+ne:a,y=isFinite(b.width)?b.width+ne:y):(a=isFinite(b.width)?b.width+ne:a,y=isFinite(b.height)?b.height+ne:y),b=x||0,ne=E||0;var re=this instanceof Hn;switch(Bl(this,!0)){case In:ne=b=0,re&&(y=a=1/0);break;case zn:isFinite(a)&&a>x&&(b=a),isFinite(y)&&y>E&&(ne=y);break;case Ti:isFinite(a)&&a>x&&(b=a),ne=0,re&&(y=1/0);break;case Zi:isFinite(y)&&y>E&&(ne=y),b=0,re&&(a=1/0)}re=this.maxSize;var oe=this.minSize;b>re.width&&oe.width<re.width&&(b=re.width),ne>re.height&&oe.height<re.height&&(ne=re.height),x=Math.max(b,oe.width),E=Math.max(ne,oe.height),re.width<x&&(x=Math.min(oe.width,x)),re.height<E&&(E=Math.min(oe.height,E)),a=Math.min(re.width,a),y=Math.min(re.height,y),a=Math.max(x,a),y=Math.max(E,y),(z===90||z===270)&&(z=a,a=y,y=z,z=x,x=E,E=z),this.uc.ka(),this.Wl(a,y,x,E),this.uc.freeze(),this.uc.w()||yt("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),ls(this,!1)}},Rt.prototype.Wl=function(){},Rt.prototype.Dd=function(){return!1},Rt.prototype.arrange=function(a,y,x,E,b){this.Uk();var z=gn.alloc();z.assign(this.Ib),this.Ib.ka(),dl(this)===!1?this.Ib.h(a,y,x,E):this.eh(a,y,x,E),this.Ib.freeze(),b===void 0?this.tb=null:this.tb=b,x=!1,b!==void 0?x=!0:(b=this.panel,b!==null&&zc(b)&&(b=b.panel),b!==null&&(b=b.dc,E=this.measuredBounds,this.areaBackground!==null&&(E=this.Ib),x=y+E.height,E=a+E.width,x=!(0<=a+.05&&E<=b.width+.05&&0<=y+.05&&x<=b.height+.05),this instanceof Qo&&(a=this.naturalBounds,this.Lq>a.height||this.Cb>a.width))&&(x=!0)),this.l=x?this.l|256:this.l&-257,this.Ib.w()||yt("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),Yh(this,!1),gn.free(z)},Le=Rt.prototype,Le.eh=function(){};function ol(a,y,x,E,b){if(a.Ib.h(y,x,E,b),!a.desiredSize.w()){var z=a.uc;x=a.Kg,y=x.right+x.left;var ne=x.top+x.bottom;switch(x=z.width+y,z=z.height+ne,E+=y,b+=ne,y=Bl(a,!0),x===E&&z===b&&(y=In),y){case In:(x>E||z>b)&&(ls(a,!0),a.measure(x>E?E:x,z>b?b:z,0,0));break;case zn:ls(a,!0),a.measure(E,b,0,0);break;case Ti:ls(a,!0),a.measure(E,z,0,0);break;case Zi:ls(a,!0),a.measure(x,b,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||jv(x,!0),this.N(),wl(a,y)||(x.oh(),this.Pn(x)))},Le.Pn=function(a){this.portId!==null&&(jv(a,!0),a instanceof oi&&W1(a,this))},Le.gc=function(a,y){if(!Lu(this,a,y)&&this.visible){var x=this.opacity;if(x!==0){var E=1;x!==1&&(E=a.globalAlpha,a.globalAlpha=E*x);var b="";this.filter!==""&&(b=a.filter,a.filter=this.filter);var z=this instanceof Hn&&zc(this),ne=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&&(Da(this,a,le,!0,!0,oe,re),le instanceof Ao&&le.type===Nu?(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&&(Da(this,a,ue,!0,!1,oe,re),ue instanceof Ao&&ue.type===Nu?(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||ne.width!==0&&ne.height!==0&&!isNaN(ne.x)&&!isNaN(ne.y))){z=this.transform,re=this.panel,this.l&4096&&Ts(this),le=this.part,oe=!1;var pe=0;le&&y.Gf("drawShadows")&&(oe=le.isShadowed)&&(ue=le.shadowOffset,pe=Math.max(ue.y,ue.x)*y.scale*y.Mb),ue=this.Dd();var xe;if(!(xe=y.$i||!ue)){var Ee=this.naturalBounds;xe=this.wh;var Fe=xe.m11,Oe=xe.m21,at=xe.dx,Xe=xe.m12,pt=xe.m22,wt=xe.dy,Mt,It=Mt=0;xe=Mt*Fe+It*Oe+at;var qt=Mt*Xe+It*pt+wt;Mt=Ee.width+pe,It=0;var ei=Mt*Fe+It*Oe+at;Mt=Mt*Xe+It*pt+wt,It=Math.min(xe,ei);var Si=Math.min(qt,Mt),fi=Math.max(xe+0,ei)-It,Gn=Math.max(qt+0,Mt)-Si;xe=It,qt=Si,Mt=Ee.width+pe,It=Ee.height+pe,ei=Mt*Fe+It*Oe+at,Mt=Mt*Xe+It*pt+wt,It=Math.min(xe,ei),Si=Math.min(qt,Mt),fi=Math.max(xe+fi,ei)-It,Gn=Math.max(qt+Gn,Mt)-Si,xe=It,qt=Si,Mt=0,It=Ee.height+pe,ei=Mt*Fe+It*Oe+at,Mt=Mt*Xe+It*pt+wt,It=Math.min(xe,ei),Si=Math.min(qt,Mt),fi=Math.max(xe+fi,ei)-It,Gn=Math.max(qt+Gn,Mt)-Si,xe=It,qt=Si,pe=y.viewportBounds,Ee=pe.x,Fe=pe.y,xe=!(xe>pe.width+Ee||Ee>fi+xe||qt>pe.height+Fe||Fe>Gn+qt)}if(xe){if(xe=(this.l&256)!==0,a.clipInsteadOfFill&&(xe=!1),this instanceof Qo&&(a.font=this.font),xe){if(qt=re.se()?re.naturalBounds:re.actualBounds,fi=Math.max(ne.x,qt.x),Gn=Math.max(ne.y,qt.y),pe=Math.min(ne.right,qt.right)-fi,Ee=Math.min(ne.bottom,qt.bottom)-Gn,Fe=this.tb,Fe!==null&&(fi=Fe.x,Gn=Fe.y,pe=Fe.width,Ee=Fe.height),fi>ne.width+ne.x||ne.x>qt.width+qt.x){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}a.save(),a.beginPath(),a.rect(fi,Gn,pe,Ee),a.clip()}if(ue){if(!le.isVisible()){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}oe&&(qt=le.shadowOffset,a.Ev(qt.x*y.scale*this.scale*y.Mb,qt.y*y.scale*this.scale*y.Mb,le.shadowBlur),gc(a),a.shadowColor=le.shadowColor)}oe&&this.shadowVisible===!0?gc(a):oe&&this.shadowVisible===!1&&Xh(a),le=this.naturalBounds,this.areaBackground!==null&&(a.yc(),du(this,a,le,ne)),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),oe&&Ls(this,re)&&this.shadowVisible===null&&Xh(a),this.Ma!==null&&(a.yc(),Zl(this,a,le,ne)),oe&&(this.Ma!==null||this.areaBackground!==null||Ls(this,re))?(ih(this,!0),this.shadowVisible===null&&Xh(a)):ih(this,!1),this.hh(a,y),oe&&this.l&512&&gc(a),ue&&oe&&Xh(a),xe&&(a.restore(),a.Vc(this instanceof Hn)),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=E),this.filter!==""&&(a.filter=b)}}};function Ls(a,y){return y===null?!1:(zc(y)&&(y=y.panel),(y.l&512)!==0||(y.type===Hn.Auto||y.type===Hn.Spot)&&y.Pb()!==a)}Le.Dv=function(){};function du(a,y,x,E){Da(a,y,a.areaBackground,!0,!0,x,E),a.areaBackground instanceof Ao&&a.areaBackground.type===Nu?(y.beginPath(),y.rect(E.x,E.y,E.width,E.height),y.ng(a.areaBackground)):y.fillRect(E.x,E.y,E.width,E.height)}function Zl(a,y,x,E){var b=a.kq(),z=x.x,ne=x.y,re=x.width+b,oe=x.height+b;Da(a,y,a.Ma,!0,!1,x,E),a.Ma instanceof Ao&&a.Ma.type===Nu?(y.beginPath(),y.rect(z-b/2,ne-b/2,re,oe),y.ng(a.Ma)):y.fillRect(z-b/2,ne-b/2,re,oe)}function qs(a,y,x){for(var E=y.O.s,b=E.length,z=-1,ne=0;ne<b;ne++)if(E[ne]===a){z=ne;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===Hn.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 Lu(a,y,x){if(!(y instanceof Jl))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 E=a.panel,b=a.nk(y);if(a.kk(y,x,b))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):E&&qs(a,E,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),gc(y),y.shadowColor=a.shadowColor}a instanceof Qo&&(y.font=a.font),y.yd=null;var ne=a.transform;z=a instanceof Hn;var re=a instanceof Hn?zc(a):!1;a.l&4096&&Ts(a);var oe=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,b&&(y.o=!0,z&&re?(lp(y,1,0,0,1,0,0),a.svg=y.ad):z?(lp(y,ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy),a.svg=y.ad):lp(y,1,0,0,1,0,0)),b=a.naturalBounds,a.areaBackground!==null){var le=ne.copy().Vj();y.rb.ha=[le.m11,le.m12,le.m21,le.m22,le.dx,le.dy],du(a,y,b,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=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy]),a.background!==null&&(z?(re&&(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy]),Zl(a,y,b,oe),re&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy],Zl(a,y,b,oe)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),ne=y.yd,b=a.part,re=!1,b&&x.Gf("drawShadows")&&(re=b.isShadowed),y.clipInsteadOfFill&&(re=!1),a.Dd()&&re&&gc(y),re&&a.shadowVisible===!0?gc(y):re&&a.shadowVisible===!1&&Xh(y),b=a.panel,re&&Ls(a,b)&&a.shadowVisible===null&&Xh(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&&ne.Ma.setAttributeNS(null,"filter",le),a.areaBackground!==null&&ne.gd.setAttributeNS(null,"filter",le)),re&&(a.Ma!==null||a.areaBackground!==null||Ls(a,b))?(ih(a,!0),a.shadowVisible===null&&Xh(y)):ih(a,!1),b=re,a.hh(y,x),z&&y.nh.pop(),y.o&&y.nh.pop(),ne=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,E,oe,re),Fl(y,le),!0):(a.svg=re,ne!==null&&re===null&&(fm(y),y.nh.pop()),re===null||(a.$o(y,E,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+")")),b&&a.l&512&&gc(y),a.Dd()&&Xh(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):E!==null&&qs(a,E,re),ne!==null&&ne(a,re)),!0)}Le.$o=function(a,y,x,E){var b=(this.l&256)!==0;if(a.clipInsteadOfFill&&(b=!1),b){var z=y.se()?y.naturalBounds:y.actualBounds;y=Math.max(x.x,z.x),b=Math.max(x.y,z.y);var ne=Math.min(x.right,z.right)-y;x=Math.min(x.bottom,z.bottom)-b,z=this.tb,z!==null&&(y=z.x,b=z.y,ne=z.width,x=z.height),z=E.getAttribute("clip-path");var re=null;z!==null&&(re=a.svg.getElementById(z.split("#")[1].slice(0,-1))),re===null?(z="CLIP"+Po++,re=a.Ud("clipPath",{id:z}),y=a.Ud("rect",{x:y,y:b,width:ne,height:x}),this instanceof Hn&&(b=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")")),re.appendChild(y),a.svg.appendChild(re),E.setAttributeNS(null,"clip-path","url(#"+z+")")):(a=re.firstElementChild,a.setAttribute("x",y.toString()),a.setAttribute("y",b.toString()),a.setAttribute("width",ne.toString()),a.setAttribute("height",x.toString()))}else E.removeAttributeNS(null,"clip-path"),Fl(a,E)};function Fl(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function el(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=Hi(y);for(var E=y.next();!E.done;E=y.next())E=x.getElementById(E.value.split("#")[1].slice(0,-1)),E!==null&&E.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 E=this.transform,b=this instanceof Hn?zc(this):!1;if(!(this instanceof Hn&&b))if(this instanceof kl){var z=this.bt;a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy],z!==null&&Yy(a,z[0],z[1],z[2],z[3],z[4],z[5],z[6],z[7]),x?y.lastElementChild.setAttributeNS(null,"transform",Xy(a)):y.setAttributeNS(null,"transform",Xy(a))}else if(!x||this instanceof Hn)y.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");else if(this instanceof Er){z=y.getElementsByTagName("path");for(var ne=0;ne<z.length;ne++)z[ne].setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")}else y.lastElementChild.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.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):(ne=E.copy().Vj(),a.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy],du(this,a,this.naturalBounds,this.actualBounds),a.rb.ha=[1,0,0,1,0,0],y.gd?(ne=y.gd.getAttribute("filter"),ne!==null&&a.ad.setAttribute("filter",ne),y.gd.replaceWith(a.ad)):y.prepend(a.ad),y.gd=a.ad),z&&gm(a,z)),(this.background!==null||y.Ma!==void 0)&&(z=y.Ma,this.background===null?(gm(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((b||x&&!(this instanceof Hn))&&(a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy]),Zl(this,a,this.naturalBounds,this.actualBounds),y.Ma?(gm(a,y.Ma),x=y.Ma.getAttribute("filter"),x!==null&&a.ad.setAttribute("filter",x),y.Ma.replaceWith(a.ad)):y.prepend(a.ad),y.Ma=a.ad),z&&gm(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 Da(a,y,x,E,b,z,ne){if(x!==null){var re=1,oe=1;if(typeof x=="string")E?y.fillStyle=x:y.strokeStyle=x;else if(x.type===jc)E?y.fillStyle=x.color:y.strokeStyle=x.color;else{var le=a.kq();if(re=z.width,oe=z.height,b?(re=ne.width,oe=ne.height):E||(re+=le,oe+=le),(z=y instanceof Qd)&&x.xe&&(x.type===cg||x.yk===re&&x.ft===oe))var ue=x.xe;else{var pe=0,xe=0,Ee=0,Fe=0,Oe=0,at=0;if(at=Oe=0,b?(Oe=ne.x,at=ne.y):E||(Oe-=le/2,at-=le/2),pe=x.start.x*re+x.start.offsetX,xe=x.start.y*oe+x.start.offsetY,Ee=x.end.x*re+x.end.offsetX,Fe=x.end.y*oe+x.end.offsetY,pe+=Oe,Ee+=Oe,xe+=at,Fe+=at,x.type===mc)ue=y.createLinearGradient(pe,xe,Ee,Fe);else if(x.type===Nu)at=isNaN(x.endRadius)?Math.max(re,oe)/2:x.endRadius,isNaN(x.startRadius)?(Oe=0,at=Math.max(re,oe)/2):Oe=x.startRadius,ue=y.createRadialGradient(pe,xe,Oe,Ee,Fe,at);else if(x.type===cg)try{ue=y.createPattern(x.pattern,"repeat")}catch(pt){ue=null}if(x.type!==cg&&(b=x.colorStops,b!==null))for(b=b.iterator;b.next();)ue.addColorStop(b.key,b.value);if(z&&(x.xe=ue,ue!==null&&(x.yk=re,x.ft=oe),ue===null&&x.type===cg&&x.yk!==-1)){x.yk=-1;var Xe=a.diagram;Xe!==null&&x.yk===-1&&xn(function(){Xe.redraw()},600)}}E?y.fillStyle=ue:y.strokeStyle=ue}}}Le.rg=function(a){if(a instanceof Hn)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 Hn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function Ts(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){Wu(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)}Wu(a,!1),Fu(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,Fu(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,Fu(a,!1)))}Le.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=tt.alloc();z.yi(y,x,E,b,Qr),a.rotate(this.Kb,z.x,z.y),tt.free(z)}},Le.v=function(a){if(!fu(this)){a===void 0&&(a=!1),ls(this,!0),Yh(this,!0);var y=this.panel;y===null||a||y.v()}},Le.Uj=function(){fu(this)||(ls(this,!0),Yh(this,!0))};function cl(a){if(!dl(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof oi&&a.Bd(),y.$b())),Yh(a,!0)}}Le.Uk=function(){!(this.l&2048)&&(Wu(this,!0),Fu(this,!0))},Le.Wu=function(){Fu(this,!0)},Le.N=function(){var a=this.part;a!==null&&a.N()};function Bl(a,y){var x=a.stretch,E=a.panel;return E!==null&&E.type===Hn.Table?mh(a,E.Fb(a.row),E.Eb(a.column),y):E!==null&&E.type===Hn.Auto&&E.Pb()===a?Fs(a,zn,y):x===vr?E!==null?E.type===Hn.Spot&&E.Pb()===a?Fs(a,zn,y):(x=E.defaultStretch,x===vr?Fs(a,In,y):Fs(a,x,y)):Fs(a,In,y):Fs(a,x,y)}function mh(a,y,x,E){var b=a.stretch;if(b!==vr)return Fs(a,b,E);var z=b=null;switch(y.stretch){case Zi:z=!0;break;case zn:z=!0}switch(x.stretch){case Ti:b=!0;break;case zn:b=!0}return y=a.panel.defaultStretch,b===null&&(b=y===Ti||y===zn),z===null&&(z=y===Zi||y===zn),b===!0&&z===!0?Fs(a,zn,E):b===!0?Fs(a,Ti,E):z===!0?Fs(a,Zi,E):Fs(a,In,E)}function Fs(a,y,x){if(x)return y;if(y===In||(x=a.desiredSize,x.w()))return In;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===Ti)return In;if(y===zn)return Zi}else{if(y===Zi)return In;if(y===zn)return Ti}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===Zi)return In;if(y===zn)return Ti}else{if(y===Ti)return In;if(y===zn)return Zi}return y}function ih(a,y){a.l=y?a.l|512:a.l&-513}function Zs(a){return(a.l&1024)!==0}function bf(a,y){a.l=y?a.l|1024:a.l&-1025}function Wu(a,y){a.l=y?a.l|2048:a.l&-2049}function Fu(a,y){a.l=y?a.l|4096:a.l&-4097}function fu(a){return(a.l&8192)!==0}function ls(a,y){a.l=y?a.l|8192:a.l&-8193}function dl(a){return(a.l&16384)!==0}function Yh(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,cl(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 Xd(a){var y=a.part;if(y instanceof oi&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||W1(y,a)}}function Vy(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof Hn?a instanceof oi?a.Bd():a.qm(a,function(x){Xd(x)}):Xd(a))}Le.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Xa(a,y,x,E):b=a,b.xd=this,a=this.ih(),a!==null&&d1(a)&&yt("Cannot add a Binding to a template that has already been copied: "+b),this.localBindings===null&&(this.localBindings=new Nn),this.localBindings.add(b),this},Le.set=function(a){return Object.assign(this,a),this},Le.Du=function(a){return nv(this,a),this},Le.apply=function(a){return a(this),this},Le.nm=function(a){return bu(this,a),this},Le.pz=function(){return this.ih()},Le.ih=function(){for(var a=this instanceof Hn?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 xi),this.animationTriggers.add(a.propertyName,a),this};function Bu(a,y){for(var x=1;x<arguments.length;++x);x=arguments;var E=null,b=null;if(typeof a=="function")b=a;else if(typeof a=="string"){var z=og.I(a);typeof z=="function"?(x=hi(arguments),E=z(x),Wt(E)||yt('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):b=rt.go[a]}if(E===null&&(b!=null&&b.constructor||yt("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),E=new b),b=1,E instanceof Qt&&1<x.length){z=E;var ne=x[1];(typeof ne=="string"||ne instanceof HTMLDivElement)&&(Id(z,ne),b++)}for(;b<x.length;b++)z=x[b],z===void 0?yt("Undefined value at argument "+b+" for object being constructed by GraphObject.make: "+E):nv(E,z);return E}function nv(a,y){if(typeof y=="string")if(a instanceof Qo)a.text=y;else if(a instanceof Er)a.figure=y;else if(a instanceof kl)a.source=y;else if(a instanceof Hn)y=rh.I(y),y!==null&&(a.type=y);else if(a instanceof Ao){var x=jn(Ao,y);x!==null?a.type=x:yt("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof yn?(y=jn(yn,y),y!==null&&(a.type=y)):a instanceof _i&&(y=jn(_i,y),y!==null&&(a.type=y));else if(y instanceof Rt)a instanceof Hn||yt("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof us){var E;y.isRow&&typeof a.getRowDefinition=="function"?E=a.getRowDefinition(y.index):y.isRow||typeof a.getColumnDefinition!="function"||(E=a.getColumnDefinition(y.index)),E instanceof us?Nm(E,y):yt("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof fn)typeof a.qb=="function"&&a.qb(y);else if(y instanceof gs)a.type=y;else if(y instanceof Xa)a instanceof Rt||a instanceof us?a.bind(y):yt("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof Xl)a instanceof Rt?a.Jv(y):yt("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof ho)a instanceof yn&&a.type===yn.o?a.figures.add(y):yt("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof _i)a instanceof ho?a.segments.add(y):yt("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof da)a instanceof Qt||a instanceof gr?a.layout=y:yt("A Layout can only be assigned to a Diagram or a Group, not to: "+a);else if(Array.isArray(y))for(x=0;x<y.length;x++)nv(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof Ao){x=new zi;for(var b in y)E=parseFloat(b),isNaN(E)?x[b]=y[b]:a.addColorStop(E,y[b]);bu(a,x)}else if(a instanceof us){y.row!==void 0?(b=y.row,(b==null||b===1/0||isNaN(b)||0>b)&&yt("Must specify non-negative integer row for RowColumnDefinition "+y+", not: "+b),a.isRow=!0,a.index=b):y.column!==void 0&&(b=y.column,(b==null||b===1/0||isNaN(b)||0>b)&&yt("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+b),a.isRow=!1,a.index=b),b=new zi;for(x in y)x!=="row"&&x!=="column"&&(b[x]=y[x]);bu(a,b)}else bu(a,y);else yt('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function Rc(a,y){og.add(a,y)}function dm(a,y,x){x===void 0&&(x=null);var E=a[1];if(typeof x=="function"?x(E):typeof E=="string")return a.splice(1,1),E;if(y===void 0)throw Error("no "+(typeof x=="function"?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return y}Ve.Object.defineProperties(Rt.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new Mf),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 Mf),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 Mf),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(Lr(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&&(Lr(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:pl},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new fd),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===pl&&(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 fd),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 fd),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:uo},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new fd),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&&(Lr(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&&(Lr(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)&&On(a,"0 <= value <= 1",Rt,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(nf(y,y.actualBounds)))}},filter:{get:function(){return this.bn},set:function(a){var y=this.bn;y!==a&&(this.bn=a,this.Uc=!0,this.g("filter",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(nf(y,y.actualBounds)))}},visible:{get:function(){return(this.l&1)!==0},set:function(a){var y=(this.l&1)!==0;y!==a&&(this.l^=1,this.g("visible",y,a),y=this.panel,y!==null?y.v():this.Dd()&&this.Zb(a),this.N(),Vy(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 Ao&&a.freeze(),Lr(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 Ao&&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 Oi)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,E=this.pa,b=E.x;E=E.y,(b===y||isNaN(b)&&isNaN(y))&&(E===x||isNaN(E)&&isNaN(x))?this.Av():(a=a.copy(),this.zv(a,b,E)&&this.g("position",new tt(b,E),a))}},actualBounds:{get:function(){return this.Ib}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&(0>=a&&yt("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Ca=a,this.v(),this.g("scale",y,a))}},angle:{get:function(){return this.Kb},set:function(a){var y=this.Kb;y!==a&&(a%=360,0>a&&(a+=360),y!==a&&(this.Kb=a,Vy(this),this.v(),this.g("angle",y,a)))}},desiredSize:{get:function(){return this.jd},set:function(a){var y=a.width,x=a.height,E=this.jd,b=E.width,z=E.height;(b===y||isNaN(b)&&isNaN(y))&&(z===x||isNaN(z)&&isNaN(x))||(this.jd=a=a.J(),this.v(),this instanceof Er&&this.qc(),this.g("desiredSize",E,a),Zs(this)&&(a=this.part,a!==null&&(oa(this,a,"width"),oa(this,a,"height"))))}},width:{get:function(){return this.jd.width},set:function(a){var y=this.jd.width;y===a||isNaN(y)&&isNaN(a)||(y=this.jd,this.jd=a=new Xn(a,this.jd.height).freeze(),this.v(),this instanceof Er&&this.qc(),this.g("desiredSize",y,a),Zs(this)&&(a=this.part,a!==null&&oa(this,a,"width")))}},height:{get:function(){return this.jd.height},set:function(a){var y=this.jd.height;y===a||isNaN(y)&&isNaN(a)||(y=this.jd,this.jd=a=new Xn(this.jd.width,a).freeze(),this.v(),this instanceof Er&&this.qc(),this.g("desiredSize",y,a),Zs(this)&&(a=this.part,a!==null&&oa(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:yr},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(),Lr(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:ta},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(),Lr(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 Di(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&&Ts(this),this.Ab}},oe:{get:function(){return this.l&4096&&Ts(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(Lr(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:In},set:function(a){this.reshapingBehavior!==a&&(Lr(this),this.A.Pf=a)}},alignment:{get:function(){return this.Jb},set:function(a){var y=this.Jb;y.D(a)||(a.Mc()&&!a.Xb()&&yt("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),cl(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&&On(a,">= 0",Rt,"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&&On(a,">= 1",Rt,"columnSpan"),Lr(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&&On(a,">= 0",Rt,"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&&On(a,">= 1",Rt,"rowSpan"),Lr(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&&(Lr(this),this.A.Di=a,this.v(),this.g("spanAllocation",y,a))}},alignmentFocus:{get:function(){return this.sk},set:function(a){var y=this.sk;y.D(a)||(this.sk=a=a.J(),this.v(),this.g("alignmentFocus",y,a))}},portId:{get:function(){return this.Yn},set:function(a){var y=this.Yn;if(y!==a){var x=this.part;x===null||x instanceof oi||yt("Cannot set portID on a Link: "+a),y!==null&&x!==null&&Hv(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,K1(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:Fa},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Xd(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&On(a,">= 0",Rt,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Xd(this))}},toShortLength:{get:function(){return this.ba!==null?this.ba.xj:0},set:function(a){var y=this.toShortLength;y!==a&&(this.Xc(),this.ba.xj=a,this.g("toShortLength",y,a),Xd(this))}},toLinkable:{get:function(){return this.ba!==null?this.ba.Tr:null},set:function(a){var y=this.toLinkable;y!==a&&(this.Xc(),this.ba.Tr=a,this.g("toLinkable",y,a))}},toMaxLinks:{get:function(){return this.ba!==null?this.ba.Ur:1/0},set:function(a){var y=this.toMaxLinks;y!==a&&(0>a&&On(a,">= 0",Rt,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:Fa},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Xd(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&On(a,">= 0",Rt,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Xd(this))}},fromShortLength:{get:function(){return this.ba!==null?this.ba.Wi:0},set:function(a){var y=this.fromShortLength;y!==a&&(this.Xc(),this.ba.Wi=a,this.g("fromShortLength",y,a),Xd(this))}},fromLinkable:{get:function(){return this.ba!==null?this.ba.hq:null},set:function(a){var y=this.fromLinkable;y!==a&&(this.Xc(),this.ba.hq=a,this.g("fromLinkable",y,a))}},fromMaxLinks:{get:function(){return this.ba!==null?this.ba.iq:1/0},set:function(a){var y=this.fromMaxLinks;y!==a&&(0>a&&On(a,">= 0",Rt,"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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),Rt.prototype.trigger=Rt.prototype.Jv,Rt.prototype.findBindingPanel=Rt.prototype.ih,Rt.prototype.findTemplateBinder=Rt.prototype.pz,Rt.prototype.setProperties=Rt.prototype.nm,Rt.prototype.apply=Rt.prototype.apply,Rt.prototype.attach=Rt.prototype.Du,Rt.prototype.set=Rt.prototype.set,Rt.prototype.isEnabledObject=Rt.prototype.If,Rt.prototype.isVisibleObject=Rt.prototype.Ed,Rt.prototype.isContainedBy=Rt.prototype.rg,Rt.prototype.getNearestIntersectionPoint=Rt.prototype.rs,Rt.prototype.getLocalPoint=Rt.prototype.qs,Rt.prototype.getDocumentScale=Rt.prototype.Df,Rt.prototype.getDocumentAngle=Rt.prototype.li,Rt.prototype.getDocumentBounds=Rt.prototype.mi,Rt.prototype.getDocumentPoint=Rt.prototype.ga,Rt.prototype.intersectsRect=Rt.prototype.Yc,Rt.prototype.containedInRect=Rt.prototype.fh,Rt.prototype.containsRect=Rt.prototype.Re,Rt.prototype.containsPoint=Rt.prototype.ca,Rt.prototype.raiseChanged=Rt.prototype.g,Rt.prototype.raiseChangedEvent=Rt.prototype.cb,Rt.prototype.addCopyProperty=Rt.prototype.Vw;var og=null;Rt.className="GraphObject",og=new xi,Rc("Button",function(){function a(x,E){return x.diagram.ic(x.documentPoint,function(b){for(;b.panel!==null&&!b.isActionable;)b=b.panel;return b},function(b){return b===E})!==null}var y=Bu(Hn,Hn.Auto,{isActionable:!0,enabledChanged:function(x,E){if(x instanceof Hn){var b=x.fb("ButtonBorder");b!==null&&(b.fill=E?x._buttonFillNormal:x._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD",_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},Bu(Er,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new bi(0,0,2.76142374915397,2.761423749153969),spot2:new bi(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));return y.mouseEnter=function(x,E){if(E.If()&&E instanceof Hn&&(x=E.fb("ButtonBorder"),x instanceof Er)){var b=E._buttonFillOver;E._buttonFillNormal=x.fill,x.fill=b,b=E._buttonStrokeOver,E._buttonStrokeNormal=x.stroke,x.stroke=b}},y.mouseLeave=function(x,E){E.If()&&E instanceof Hn&&(x=E.fb("ButtonBorder"),x instanceof Er&&(x.fill=E._buttonFillNormal,x.stroke=E._buttonStrokeNormal))},y.actionDown=function(x,E){if(E.If()&&E instanceof Hn&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof Er){x=x.diagram;var z=x.skipsUndoManager;x.skipsUndoManager=!0;var ne=E._buttonFillPressed;E._buttonFillOver=b.fill,b.fill=ne,ne=E._buttonStrokePressed,E._buttonStrokeOver=b.stroke,b.stroke=ne,x.skipsUndoManager=z}}},y.actionUp=function(x,E){if(E.If()&&E instanceof Hn&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof Er){var z=x.diagram,ne=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,E)?(b.fill=E._buttonFillOver,b.stroke=E._buttonStrokeOver):(b.fill=E._buttonFillNormal,b.stroke=E._buttonStrokeNormal),z.skipsUndoManager=ne}}},y.actionCancel=function(x,E){if(E.If()&&E instanceof Hn&&E._buttonFillPressed!==null){var b=E.fb("ButtonBorder");if(b instanceof Er){var z=x.diagram,ne=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,E)?(b.fill=E._buttonFillOver,b.stroke=E._buttonStrokeOver):(b.fill=E._buttonFillNormal,b.stroke=E._buttonStrokeNormal),z.skipsUndoManager=ne}}},y.actionMove=function(x,E){if(E.If()&&E instanceof Hn&&E._buttonFillPressed!==null){var b=x.diagram;if(b.firstInput.button===0&&(b.currentTool.standardMouseOver(),a(x,E)&&(x=E.fb("ButtonBorder"),x instanceof Er))){var z=b.skipsUndoManager;b.skipsUndoManager=!0;var ne=E._buttonFillPressed;x.fill!==ne&&(x.fill=ne),ne=E._buttonStrokePressed,x.stroke!==ne&&(x.stroke=ne),b.skipsUndoManager=z}}},y}),Rc("TreeExpanderButton",function(){var a=Bu("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Bu(Er,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:No},new Xa("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Xa("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof lo&&(x=x.adornedPart),x instanceof oi){var E=x.diagram;if(E!==null){if(E=E.commandHandler,x.isTreeExpanded){if(!E.canCollapseTree(x))return}else if(!E.canExpandTree(x))return;y.handled=!0,x.isTreeExpanded?E.collapseTree(x):E.expandTree(x)}}},a}),Rc("SubGraphExpanderButton",function(){var a=Bu("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Bu(Er,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:No},new Xa("figure","isSubGraphExpanded",function(y,x){return x=x.panel,y?x._subGraphExpandedFigure:x._subGraphCollapsedFigure}).cp()));return a.click=function(y,x){if(x=x.part,x instanceof lo&&(x=x.adornedPart),x instanceof gr){var E=x.diagram;if(E!==null){if(E=E.commandHandler,x.isSubGraphExpanded){if(!E.canCollapseSubGraph(x))return}else if(!E.canExpandSubGraph(x))return;y.handled=!0,x.isSubGraphExpanded?E.collapseSubGraph(x):E.expandSubGraph(x)}}},a}),Rc("ToolTip",function(){return Bu(lo,Hn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new tt(0,3),shadowBlur:5},Bu(Er,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new bi(0,0,4,6),spot2:new bi(1,1,-4,-4)}))}),Rc("ContextMenu",function(){return Bu(lo,Hn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new tt(0,3),shadowBlur:5},new Xa("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),Rc("ContextMenuButton",function(){var a=Bu("Button");a.stretch=Ti;var y=a.fb("ButtonBorder");return y instanceof Er&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new bi(0,0,2,3),y.spot2=new bi(1,1,-2,-2)),a}),Rc("PanelExpanderButton",function(a){var y=dm(a,"COLLAPSIBLE"),x=Bu("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},Bu(Er,{name:"ButtonIcon",strokeWidth:2},new Xa("geometryString","visible",function(E){return E?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof Er&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(E,b){var z=b.diagram;if(z!==null&&!z.isReadOnly){var ne=b.ih();ne===null&&(ne=b.part),ne!==null&&(b=ne.fb(y),b!==null&&(E.handled=!0,z.Ea("Collapse/Expand Panel"),b.visible=!b.visible,z.eb("Collapse/Expand Panel")))}},x}),Rc("CheckBoxButton",function(a){var y=dm(a);return a=Bu("Button",{desiredSize:new Xn(14,14)},Bu(Er,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:zn,geometryStretch:Ci,visible:!1},y!==""?new Xa("visible",y).Kx():[])),a.click=function(x,E){if(E instanceof Hn){var b=x.diagram;if(!(b===null||b.isReadOnly||y!==""&&b.model.isReadOnly)){x.handled=!0;var z=E.fb("ButtonIcon");b.Ea("checkbox"),z.visible=!z.visible,typeof E._doClick=="function"&&E._doClick(x,E),b.eb("checkbox")}}},a}),Rc("CheckBox",function(a){a=dm(a),a=Bu("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new Di(0,1,0,0)});var y=Bu(Hn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Di(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}),Rt.None=In=new fn(Rt,"None",0),Rt.Default=vr=new fn(Rt,"Default",0),Rt.Vertical=Zi=new fn(Rt,"Vertical",4),Rt.Horizontal=Ti=new fn(Rt,"Horizontal",5),Rt.Fill=zn=new fn(Rt,"Fill",3),Rt.Uniform=Ci=new fn(Rt,"Uniform",1),Rt.UniformToFill=Kr=new fn(Rt,"UniformToFill",2),Rt.FlipVertical=Br=new fn(Rt,"FlipVertical",1),Rt.FlipHorizontal=io=new fn(Rt,"FlipHorizontal",2),Rt.FlipBoth=Wo=new fn(Rt,"FlipBoth",3),Rt.make=Bu,Rt.getBuilders=function(){var a=new xi,y;for(y in og)if(y!==y.toLowerCase()){var x=og.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},Rt.defineBuilder=Rc,Rt.build=function(a,y,x){for(var E=[],b=2;b<arguments.length;++b)E[b-2]=arguments[b];if(b=og.I(a),typeof b=="function"&&(E=b([a].concat(E)),E instanceof Rt))return y&&E.set(y),E;yt('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},Rt.takeBuilderArgument=dm;function Mf(){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=yr,this.o=ta,this.hg=vr,this.ob=this.Bi=1,this.Pf=In,this.Pc=this.Ci=this.gd=null,this.Oc="category"}Mf.prototype.copy=function(){var a=new Mf;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 fd(){this.u=-1/0,this.o=0,this.F=uo,this.rr=pl,this.j=this.V="None"}fd.prototype.copy=function(){var a=new fd;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},fd.className="LinkElementSettings";function sp(){this.yj=this.Xi=Co,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}sp.prototype.copy=function(){var a=new sp;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},sp.className="LinkSettings";function Jd(){this.ha=[1,0,0,1,0,0]}Jd.prototype.copy=function(){var a=new Jd;return a.ha[0]=this.ha[0],a.ha[1]=this.ha[1],a.ha[2]=this.ha[2],a.ha[3]=this.ha[3],a.ha[4]=this.ha[4],a.ha[5]=this.ha[5],a},Jd.prototype.translate=function(a,y){this.ha[4]+=this.ha[0]*a+this.ha[2]*y,this.ha[5]+=this.ha[1]*a+this.ha[3]*y},Jd.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},Jd.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a!==0){if(this.translate(y,x),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));var b=this.ha[1]*a+this.ha[3]*E,z=this.ha[0]*-E+this.ha[2]*a,ne=this.ha[1]*-E+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*E,this.ha[1]=b,this.ha[2]=z,this.ha[3]=ne,this.translate(-y,-x)}},Jd.className="STransform";function Lf(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}Lf.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},Lf.className="SGradient";function Oh(a,y,x){this.ownerDocument=a=y===void 0?rt.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 Jl(this,x)}Oh.prototype.resize=function(a,y,x,E){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=E+"px",this.Oa.setAttributeNS(null,"width",x+"px"),this.Oa.setAttributeNS(null,"height",E+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+x+" "+E),this.context.ww.firstElementChild.setAttributeNS(null,"width",x+"px"),this.context.ww.firstElementChild.setAttributeNS(null,"height",E+"px"),!0):!1},Oh.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),Wt(y))for(var E in y)a.setAttributeNS(E==="href"?"http://www.w3.org/1999/xlink":"",E,y[E]);return x!==void 0&&(a.textContent=x),a},Oh.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Oh.prototype.focus=function(){this.Oa.focus()},Oh.prototype.mx=function(){this.ownerDocument=null},Ve.Object.defineProperties(Oh.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}}}),Oh.className="SVGSurface";function Jl(a,y){this.Gv=a,this.svg=a.Oa,this.stack=[],this.nh=[],this.fillStyle="#000000",this.font="10px sans-serif",this.globalAlpha=1,this.lineCap="butt",this.lineDashOffset=0,this.lineJoin="miter",this.lineWidth=1,this.miterLimit=10,this.shadowBlur=0,this.shadowColor="rgba(0, 0, 0, 0)",this.shadowOffsetY=this.shadowOffsetX=0,this.Il=!1,this.strokeStyle="#000000",this.textAlign="start",this.clipInsteadOfFill=!1,this.Vg=this.Br=this.Ar=0,this.yd=this.ad=null,this.path=[],this.Yl={},this.Ct=!1,this.Yg=null,this.uj=0,this.rb=new Jd,this.j=fm(this),this.Nj=fm(this,"gojs-diagram"),this.Hl=this.ti=null;var x=Po++,E=this.Ud("clipPath",{id:"mainClip"+x});E.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height})),this.ww=E,this.svg.appendChild(this.j),this.j.appendChild(this.Nj),this.svg.appendChild(E),this.j.setAttributeNS(null,"clip-path","url(#mainClip"+x+")"),this.eA={},this.isTemporary=!!y,this.filter="",this.bk=null}function Uy(a,y,x,E,b,z,ne){a.Nj===void 0?lp(a,y,x,E,b,z,ne):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+E+", "+b+", "+z+", "+ne+")")}Le=Jl.prototype,Le.arc=function(a,y,x,E,b,z,ne,re){var oe=2*Math.PI,le=oe-1e-6,ue=x*Math.cos(E),pe=x*Math.sin(E),xe=a+ue,Ee=y+pe,Fe=z?0:1;E=z?E-b:b-E,(1e-6<Math.abs(ne-xe)||1e-6<Math.abs(re-Ee))&&this.path.push(["L",xe,+Ee]),0>E&&(E=E%oe+oe),E>le?(this.path.push(["A",x,x,0,1,Fe,a-ue,y-pe]),this.path.push(["A",x,x,0,1,Fe,xe,Ee])):1e-6<E&&this.path.push(["A",x,x,0,+(E>=Math.PI),Fe,a+x*Math.cos(b),y+x*Math.sin(b)])},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,E,b,z){this.path.push(["C",a,y,x,E,b,z])},Le.clearRect=function(){},Le.clip=function(){this.Yl.clipPath=!0},Le.closePath=function(){this.path.push(["z"])},Le.createLinearGradient=function(a,y,x,E){var b=new Lf("linear");return b.x1=a,b.y1=y,b.x2=x,b.y2=E,b},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 E="PATTERN"+Po++,b={x:0,y:0,width:a.width,height:a.height,href:y};return a=this.Ud("pattern",{width:a.width,height:a.height,id:E,patternUnits:"userSpaceOnUse"}),a.appendChild(this.Ud(Ud,b)),this.svg.appendChild(a),x[y]=E,"url(#"+E+")"},Le.createRadialGradient=function(a,y,x,E,b,z){var ne=new Lf("radial");return ne.x1=a,ne.y1=y,ne.r1=x,ne.x2=E,ne.y2=b,ne.r2=z,ne};function Yy(a,y,x,E,b,z,ne,re,oe){E=re/E,b=oe/b,z===0&&ne===0||a.rb.translate(z,ne),E===1&&b===1||a.rb.scale(E,b),y===0&&x===0||a.rb.translate(-y,-x)}Le.drawImage=function(a,y,x,E,b,z,ne,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,E===void 0&&(z=y,ne=x,re=E=ue,oe=b=a),E=E||0,b=b||0,re=re||0,oe=oe||0,Yy(this,y,x,E,b,z||0,ne||0,re,oe),z={x:0,y:0,width:ue||E,height:a||b,href:le},it.$(E,re)&&it.$(b,oe)?le.toLowerCase().indexOf(".svg")===-1&&le.toLowerCase().indexOf("data:image/svg")===-1&&(z.preserveAspectRatio="xMidYMid slice"):z.preserveAspectRatio="none",(y!==0||x!==0||E!==ue||b!==a)&&(E+=y,b+=x,z["clip-path"]="path('M "+y+","+x+" L "+E+" "+x+" L "+E+" "+b+" L "+y+" "+b+" z')"),ag(this,Ud,z,this.rb),this.addElement(Ud,z)},Le.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),iv(this,this.Yl)},Le.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},Le.fillRect=function(a,y,x,E){a=[a,y,x,E],a={x:a[0],y:a[1],width:a[2],height:a[3]},ag(this,"fill",a,this.rb),this.addElement("rect",a)},Le.ox=function(a,y,x,E){a={x:a,y,width:x,height:E},ag(this,"fill",a,this.rb),iv(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},ag(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,E){this.path.push(["Q",a,y,x,E])},Le.rect=function(a,y,x,E){this.path.push(["M",a,y],["L",a+x,y],["L",a+x,y+E],["L",a,y+E],["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,E,b,z){a===1&&y===0&&x===0&&E===1&&b===0&&z===0||lp(this,a,y,x,E,b,z)};function Xy(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(){Qy(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 ag(a,y,x,E){y==="fill"?iv(a,x):y==="stroke"&&Qy(a,x),E!==null&&(a=E.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function iv(a,y){a.fillStyle instanceof Lf?y.fill=rv(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 Jy(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof Lf?y.setAttributeNS(null,"fill",rv(a,a.fillStyle,!0)):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.setAttributeNS(null,x,"rgb("+a[1]+","+a[2]+","+a[3]+")"),y.setAttributeNS(null,x+"-opacity",a[4])):y.setAttributeNS(null,x,a.fillStyle)}function Qy(a,y){if(a.strokeStyle instanceof Lf)y.stroke=rv(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 rv(a,y,x){var E="";if(E=a.Hl!==null?a.Hl.getAttribute(x?"fill":"stroke"):null,E!==null&&E.indexOf("GRAD")!==-1?(E=E.split("#")[1].slice(0,-1),x=a.svg.getElementById(E),x!==null&&x.remove()):E="GRAD"+Po++,y.type==="linear")x=a.Ud("linearGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,id:E,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:E});else throw Error("invalid gradient");var b=y.gx;y=b.length;for(var z=[],ne=0;ne<y;ne++){var re=b[ne],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}),b=0;b<y;b++)x.appendChild(a.Ud("stop",z[b]));return a.svg.appendChild(x),"url(#"+E+")"}Le.addPath=function(a,y,x){for(var E=[],b=0;b<a.length;b++){var z=hi(a[b]),ne=[z.shift()];if(ne[0]==="A")ne.push(z.shift()+","+z.shift(),z.shift(),z.shift()+","+z.shift(),z.shift()+","+z.shift());else for(;z.length;)ne.push(z.shift()+","+z.shift());E.push(ne.join(" "))}if(E=E.join(" "),a=this.Yl,a.clipPath)0<this.nh.length&&this.nh[this.nh.length-1].setAttributeNS(null,"clip-path",'path("'+E+'")');else if(a.d=E,ag(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 lp(a,y,x,E,b,z,ne){var re=new Jd;re.ha=[y,x,E,b,z,ne],y={},ag(a,"g",y,re),re=a.addElement("g",y),a.nh.push(re)}function fm(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 Xh(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function gc(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(){},Jl.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},Jl.prototype.getImageData=function(){return null},Jl.prototype.measureText=function(){return null};function gm(a,y){y=y.getAttribute("fill"),y!==null&&(y=y.split("#"),y.length!==1&&(y=a.svg.getElementById(y[1].slice(0,-1)),y!==null&&a.svg.innerHTML.match(new RegExp(y.id,"g")).length===1&&y.remove()))}Jl.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},Jl.className="SVGContext",Qt.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new Oh(this,rt.document));var y=new Oh(this,rt.document,!0);a===void 0&&(a=new zi);var x=this;return xf(this,function(E,b){return E=lm(x,E,"SVG",y),E=E!==null?E.svg:null,typeof b=="function"?(b(E),null):E},a)},Qt.prototype.makeSvg=Qt.prototype.Cs,Qt.prototype.av=function(a){return this.Cs(a)},Qt.prototype.makeSVG=Qt.prototype.av;function Gu(a,y,x,E){this.ownerDocument=y=y===void 0?rt.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new Qd(y,x,E),y.H=a}Gu.prototype.resize=function(a,y,x,E){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=E+"px",!0):!1},Gu.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},Gu.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Gu.prototype.focus=function(){this.Oa.focus()},Gu.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},Ve.Object.defineProperties(Gu.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}}}),Gu.className="CanvasSurface";function Qd(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&yt("Browser does not support HTML Canvas Element"),this.ct=this.et=this.dt="",this.Hm=!1,this.Vg=this.Br=this.Ar=0,this.Il=!1,this.El=new _t,this.isTemporary=!!x}Le=Qd.prototype,Le.Wx=function(a){this.Z.imageSmoothingEnabled=a},Le.arc=function(a,y,x,E,b,z){this.Z.arc(a,y,x,E,b,z)},Le.beginPath=function(){this.Z.beginPath()},Le.Se=function(){},Le.bezierCurveTo=function(a,y,x,E,b,z){this.Z.bezierCurveTo(a,y,x,E,b,z)},Le.clearRect=function(a,y,x,E){this.yc(),this.Z.clearRect(a,y,x,E)},Le.clip=function(){this.Z.clip()},Le.closePath=function(){this.Z.closePath()},Le.createLinearGradient=function(a,y,x,E){return this.Z.createLinearGradient(a,y,x,E)},Le.createPattern=function(a,y){return this.Z.createPattern(a,y)},Le.createRadialGradient=function(a,y,x,E,b,z){return this.Z.createRadialGradient(a,y,x,E,b,z)},Le.drawImage=function(a,y,x,E,b,z,ne,re,oe){E===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,E,b,z,ne,re,oe)},Le.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},Le.fillRect=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Le.ox=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Le.fillText=function(a,y,x){this.Z.fillText(a,y,x)},Le.getImageData=function(a,y,x,E){return this.Z.getImageData(a,y,x,E)},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,E){this.Z.quadraticCurveTo(a,y,x,E)},Le.rect=function(a,y,x,E){this.Z.rect(a,y,x,E)},Le.restore=function(){this.Z.restore()},Le.save=function(){this.yc(),this.Z.save()},Qd.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},Le=Qd.prototype,Le.setTransform=function(a,y,x,E,b,z){this.El.setTransform(a,y,x,E,b,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,E,b,z){if(a!==1||y!==0||x!==0||E!==1||b!==0||z!==0){var ne=this.El,re=ne.m11*a+ne.m21*y;a=ne.m12*a+ne.m22*y,y=ne.m11*x+ne.m21*E,x=ne.m12*x+ne.m22*E,ne.dx=ne.m11*b+ne.m21*z+ne.dx,ne.dy=ne.m12*b+ne.m22*z+ne.dy,ne.m11=re,ne.m12=a,ne.m21=y,ne.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 Ao&&a.type===Nu){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(mx),a.lineDashOffset=0)},Le.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},Le.Hs=function(){},Ve.Object.defineProperties(Qd.prototype,{fillStyle:{get:function(){return this.Z.fillStyle},set:function(a){this.ct!==a&&(this.ct=this.Z.fillStyle=a)}},font:{get:function(){return this.Z.font},set:function(a){this.dt!==a&&(this.dt=this.Z.font=a)}},globalAlpha:{get:function(){return this.Z.globalAlpha},set:function(a){this.Z.globalAlpha=a}},lineCap:{get:function(){return this.Z.lineCap},set:function(a){this.Z.lineCap=a}},lineDashOffset:{get:function(){return this.Z.lineDashOffset},set:function(a){this.Z.lineDashOffset=a}},lineJoin:{get:function(){return this.Z.lineJoin},set:function(a){this.Z.lineJoin=a}},lineWidth:{get:function(){return this.Z.lineWidth},set:function(a){this.Z.lineWidth=a}},miterLimit:{get:function(){return this.Z.miterLimit},set:function(a){this.Z.miterLimit=a}},shadowBlur:{get:function(){return this.Z.shadowBlur},set:function(a){this.Z.shadowBlur=a}},shadowColor:{get:function(){return this.Z.shadowColor},set:function(a){this.Z.shadowColor=a}},shadowOffsetX:{get:function(){return this.Z.shadowOffsetX},set:function(a){this.Z.shadowOffsetX=a}},shadowOffsetY:{get:function(){return this.Z.shadowOffsetY},set:function(a){this.Z.shadowOffsetY=a}},strokeStyle:{get:function(){return this.Z.strokeStyle},set:function(a){this.et!==a&&(this.et=this.Z.strokeStyle=a)}},textAlign:{get:function(){return this.Z.textAlign},set:function(a){this.Z.textAlign=a}},imageSmoothingEnabled:{get:function(){return this.Z.imageSmoothingEnabled},set:function(a){this.Z.imageSmoothingEnabled=a}},filter:{get:function(){return this.Z.filter},set:function(a){this.Z.filter=a===""?"none":a}},clipInsteadOfFill:{get:function(){return this.Hm},set:function(a){this.Hm=a}}});var mx=Object.freeze([]);Qd.className="CanvasSurfaceContext";function up(){this.F=this.o=this.u=this.j=0}up.className="ColorNumbers";function Ao(a,y){hg||(hv(),hg=!0),Zr(this),this._isFrozen=!1,a===void 0?(this.na=jc,this.xk="black"):typeof a=="string"?(this.na=jc,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===mc?(this.Qd=bl,this.Lk=vs):this.Lk=a===Nu?this.Qd=Qr:this.Qd=Fa,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}Ao.prototype.copy=function(){var a=new Ao;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=Ao.prototype,Le.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},Le.ka=function(){return Object.isFrozen(this)&&yt("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},Le.qb=function(a){a.classType===Ao&&(this.type=a)},Le.toString=function(){var a="Brush(";if(this.type===jc)a+=this.color;else if(a=this.type===mc?a+"Linear ":this.type===Nu?a+"Radial ":this.type===cg?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&&cn(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&On(a,"0 <= loc <= 1",Ao,"addColorStop:loc"),this.we===null&&(this.we=new xi),this.we.add(a,y),this.na===jc&&(this.type=mc),this.xe=null,this},Le.Vz=function(a,y){if(this._isFrozen&&cn(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?dg:y,this.type===jc)pc(this.color),this.color=lg(a,y);else if((this.type===mc||this.type===Nu)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)pc(x.value),this.addColorStop(x.key,lg(a,y));return this};function qy(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?dg:x,pc(a),lg(y,x)}Le.Wy=function(a,y){if(this._isFrozen&&cn(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?dg:y,this.type===jc)pc(this.color),this.color=lg(-a,y);else if((this.type===mc||this.type===Nu)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)pc(x.value),this.addColorStop(x.key,lg(-a,y));return this};function e1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?dg:x,pc(a),lg(-y,x)}function ov(a,y,x){pc(a),a=ea.j;var E=ea.u,b=ea.o,z=ea.F;return pc(y),x===void 0&&(x=.5),"rgba("+Math.round((ea.j-a)*x+a)+", "+Math.round((ea.u-E)*x+E)+", "+Math.round((ea.o-b)*x+b)+", "+Math.round((ea.F-z)*x+z)+")"}Le.Gx=function(){if(this.type===jc)return sg(this.color);if((this.type===mc||this.type===Nu)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Nu)return sg(a.first().value);if(a.get(.5)!==null)return sg(a.get(.5));if(a.count===2)return a=a.Fa(),sg(ov(a[0].value,a[1].value));for(var y=a.iterator,x=-1,E=-1,b=1,z=1;y.next();){var ne=y.key,re=Math.abs(.5-y.key);b>z&&re<b?(x=ne,b=re):z>=b&&re<z&&(E=ne,z=re)}return x>E&&(z=x,x=E,E=z,z=b),b=E-x,sg(ov(a.get(x),a.get(E),1-z/b))}return!1};function sg(a){return a?a instanceof Ao?a.Gx():(pc(a),128>(299*ea.j+587*ea.u+114*ea.o)/1e3):!1}function lg(a,y){switch(y){case dg:y=100*sv(ea.j);var x=100*sv(ea.u),E=100*sv(ea.o);return fl.j=.4124564*y+.3575761*x+.1804375*E,fl.u=.2126729*y+.7151522*x+.072175*E,fl.o=.0193339*y+.119192*x+.9503041*E,fl.F=ea.F,y=uv(fl.j/ug[0]),x=uv(fl.u/ug[1]),E=uv(fl.o/ug[2]),Jh.j=116*x-16,Jh.u=500*(y-x),Jh.o=200*(x-E),Jh.F=fl.F,Jh.j=Math.min(100,Math.max(0,Jh.j+100*a)),a=(Jh.j+16)/116,y=a-Jh.o/200,fl.j=ug[0]*t1(Jh.u/500+a),fl.u=ug[1]*(Jh.j>pm*cv?Math.pow(a,3):Jh.j/pm),fl.o=ug[2]*t1(y),fl.F=Jh.F,a=-.969266*fl.j+1.8760108*fl.u+.041556*fl.o,y=.0556434*fl.j+-.2040259*fl.u+1.0572252*fl.o,ea.j=255*lv((3.2404542*fl.j+-1.5371385*fl.u+-.4985314*fl.o)/100),ea.u=255*lv(a/100),ea.o=255*lv(y/100),ea.F=fl.F,ea.j=Math.round(ea.j),255<ea.j?ea.j=255:0>ea.j&&(ea.j=0),ea.u=Math.round(ea.u),255<ea.u?ea.u=255:0>ea.u&&(ea.u=0),ea.o=Math.round(ea.o),255<ea.o?ea.o=255:0>ea.o&&(ea.o=0),"rgba("+ea.j+", "+ea.u+", "+ea.o+", "+ea.F+")";case n1:return av(),gu.o=Math.min(100,Math.max(0,gu.o+100*a)),"hsla("+gu.j+", "+gu.u+"%, "+gu.o+"%, "+gu.F+")";default:yt("Unknown color space: "+y)}}function pc(a){hg||(hv(),hg=!0);var y=dv;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,ea.j=a[0],ea.u=a[1],ea.o=a[2],ea.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,ea.j=0,ea.u=0,ea.o=0,ea.F=1)}}function av(){var a=ea.j/255,y=ea.u/255,x=ea.o/255,E=Math.max(a,y,x),b=Math.min(a,y,x),z=E-b;if(b=(E+b)/2,z===0)var ne=a=0;else{switch(E){case a:ne=(y-x)/z%6;break;case y:ne=(x-a)/z+2;break;case x:ne=(a-y)/z+4}ne*=60,0>ne&&(ne+=360),a=z/(1-Math.abs(2*b-1))}gu.j=Math.round(ne),gu.u=Math.round(100*a),gu.o=Math.round(100*b),gu.F=ea.F}function sv(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function lv(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function uv(a){return a>cv?Math.pow(a,1/3):(pm*a+16)/116}function t1(a){var y=a*a*a;return y>cv?y:(116*a-16)/pm}function Ff(a,y){typeof a!="string"&&(a instanceof Ao||yt("Value for "+y+" must be a color string or a Brush, not "+a))}function hv(){dv=Ba?new Gu(null,void 0,{willReadFrequently:!0}).context:null}Ve.Object.defineProperties(Ao.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&cn(this,a),this.na=a,this.start.Mc()&&(a===mc?this.start=bl:a===Nu&&(this.start=Qr)),this.end.Mc()&&(a===mc?this.end=vs:a===Nu&&(this.end=Qr)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&cn(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&cn(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&cn(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&cn(this,a),0>a&&On(a,">= zero",Ao,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&cn(this,a),0>a&&On(a,">= zero",Ao,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&cn(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&cn(this,a),this.cr=a,this.xe=null}}}),Ao.prototype.isDark=Ao.prototype.Gx,Ao.prototype.darkenBy=Ao.prototype.Wy,Ao.prototype.lightenBy=Ao.prototype.Vz,Ao.prototype.addColorStop=Ao.prototype.addColorStop;var cv=216/24389,pm=24389/27,ug=[95.047,100,108.883],dv=null,ea=new up,gu=new up,fl=new up,Jh=new up,hg=!1;Ao.className="Brush";var jc;Ao.Solid=jc=new fn(Ao,"Solid",0);var mc;Ao.Linear=mc=new fn(Ao,"Linear",1);var Nu;Ao.Radial=Nu=new fn(Ao,"Radial",2);var cg;Ao.Pattern=cg=new fn(Ao,"Pattern",4);var dg;Ao.Lab=dg=new fn(Ao,"Lab",5);var n1;Ao.HSL=n1=new fn(Ao,"HSL",6),Ao.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 E=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>E.length&&(E="0"+E),2>a.length&&(a="0"+a),"#"+y+E+a},Ao.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;hg||(hv(),hg=!0);var y=dv;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)},Ao.lighten=function(a){return qy(a)},Ao.lightenBy=qy,Ao.darken=function(a){return e1(a)},Ao.darkenBy=e1,Ao.mix=ov,Ao.isDark=sg;function gs(){this.xa="Base"}gs.prototype.measure=function(){},gs.prototype.Yz=function(a,y,x,E,b){a.measure(y,x,E,b)},gs.prototype.arrange=function(){},gs.prototype.Ly=function(a,y,x,E,b,z){a.arrange(y,x,E,b,z)},gs.prototype.iA=function(a){a.Uj()},gs.prototype.gc=function(){},Ve.Object.defineProperties(gs.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return Hn}}}),gs.prototype.remeasureObject=gs.prototype.iA,gs.prototype.arrangeElement=gs.prototype.Ly,gs.prototype.measureElement=gs.prototype.Yz,gs.className="PanelLayout";function mm(){this.xa="Base"}Ot(mm,gs),mm.prototype.measure=function(a,y,x,E,b,z,ne){var re=E.length;a=vc(a);for(var oe=0;oe<re;oe++){var le=E[oe];if(le.visible||le===a){var ue=le.margin,pe=ue.right+ue.left;ue=ue.top+ue.bottom,le.measure(y,x,z,ne);var xe=le.measuredBounds;pe=Math.max(xe.width+pe,0),ue=Math.max(xe.height+ue,0),xe=le.position.x;var Ee=le.position.y;isFinite(xe)||(xe=0),isFinite(Ee)||(Ee=0),le instanceof Er&&le.isGeometryPositioned&&(le=le.strokeWidth/2,xe-=le,Ee-=le),ma(b,xe,Ee,pe,ue)}}},mm.prototype.arrange=function(a,y,x){var E=y.length,b=a.padding;for(a=x.x-b.left,x=x.y-b.top,b=0;b<E;b++){var z=y[b],ne=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 Er&&z.isGeometryPositioned){var ue=z.strokeWidth/2;oe-=ue,le-=ue}z.visible&&z.arrange(oe+re.left,le+re.top,ne.width,ne.height)}};function vm(){this.xa="Base"}Ot(vm,gs),vm.prototype.measure=function(a,y,x,E,b,z,ne){var re=E.length;y=qn(),z=vc(a);for(var oe=0;oe<re;oe++){var le=E[oe];if(le.visible||le===z){var ue=Bl(le,!1);if(ue!==In&&ue!==Ti)y.push(le);else{le.measure(1/0,x,0,ne),ue=le.margin,le=le.measuredBounds;var pe=Math.max(le.height+ue.top+ue.bottom,0);b.width+=Math.max(le.width+ue.right+ue.left,0),b.height=Math.max(b.height,pe)}}}for(E=y.length,a.desiredSize.height?x=Math.min(a.desiredSize.height,a.maxSize.height):b.height!==0&&(x=Math.min(b.height,a.maxSize.height)),a=0;a<E;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,ne),oe=oe.measuredBounds,ue=Math.max(oe.height+ue,0),b.width+=Math.max(oe.width+re,0),b.height=Math.max(b.height,ue));di(y)},vm.prototype.arrange=function(a,y,x){for(var E=y.length,b=a.padding,z=b.top,ne=a.isOpposite,re=ne?x.width:b.left,oe=0;oe<E;oe++){var le=z,ue=y[oe];if(ue.visible){var pe=ue.measuredBounds,xe=ue.margin,Ee=xe.top+xe.bottom,Fe=z+b.bottom,Oe=pe.height,at=Bl(ue,!1);(isNaN(ue.desiredSize.height)&&at===zn||at===Zi)&&(Oe=Math.max(x.height-Ee-Fe,0)),Ee=Oe+Ee+Fe,Fe=ue.alignment,Fe.Xb()&&(Fe=a.defaultAlignment),Fe.sb()||(Fe=Qr),ne&&(re-=pe.width+xe.left+xe.right),ue.arrange(re+Fe.offsetX+xe.left,le+Fe.offsetY+xe.top+(x.height*Fe.y-Ee*Fe.y),pe.width,Oe),ne||(re+=pe.width+xe.left+xe.right)}}};function ym(){this.xa="Base"}Ot(ym,gs),ym.prototype.measure=function(a,y,x,E,b,z){var ne=E.length;x=qn();for(var re=vc(a),oe=0;oe<ne;oe++){var le=E[oe];if(le.visible||le===re){var ue=Bl(le,!1);if(ue!==In&&ue!==Zi)x.push(le);else{var pe=le.margin;ue=pe.right+pe.left,pe=pe.top+pe.bottom,le.measure(y,1/0,z,0),le=le.measuredBounds,Oa(b,Math.max(b.width,Math.max(le.width+ue,0)),b.height+Math.max(le.height+pe,0))}}}if(E=x.length,E!==0){for(a.desiredSize.width?y=Math.min(a.desiredSize.width,a.maxSize.width):b.width!==0&&(y=Math.min(b.width,a.maxSize.width)),a=0;a<E;a++)oe=x[a],(oe.visible||oe===re)&&(le=oe.margin,ne=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),b.width=Math.max(b.width,Math.max(oe.width+ne,0)),b.height+=le);di(x)}},ym.prototype.arrange=function(a,y,x){for(var E=y.length,b=a.padding,z=b.left,ne=a.isOpposite,re=ne?x.height:b.top,oe=0;oe<E;oe++){var le=z,ue=y[oe];if(ue.visible){var pe=ue.measuredBounds,xe=ue.margin,Ee=xe.left+xe.right,Fe=z+b.right,Oe=pe.width,at=Bl(ue,!1);(isNaN(ue.desiredSize.width)&&at===zn||at===Ti)&&(Oe=Math.max(x.width-Ee-Fe,0)),Ee=Oe+Ee+Fe,Fe=ue.alignment,Fe.Xb()&&(Fe=a.defaultAlignment),Fe.sb()||(Fe=Qr),ne&&(re-=pe.height+xe.bottom+xe.top),ue.arrange(le+Fe.offsetX+xe.left+(x.width*Fe.x-Ee*Fe.x),re+Fe.offsetY+xe.top,Oe,pe.height),ne||(re+=pe.height+xe.bottom+xe.top)}}};function Sm(){this.xa="Base"}Ot(Sm,gs),Sm.prototype.measure=function(a,y,x,E,b,z,ne){var re=E.length,oe=a.Pb(),le=oe.margin,ue=le.right+le.left,pe=le.top+le.bottom;oe.measure(y,x,z,ne);var xe=oe.measuredBounds;z=xe.width,ne=xe.height;var Ee=Math.max(z+ue,0),Fe=Math.max(ne+pe,0),Oe=a.isClipping,at=gn.allocAt(-le.left,-le.top,Ee,Fe),Xe=gn.allocAt(0,0,z,ne);fv(oe,Xe,!0),z=Xe.width,ne=Xe.height;for(var pt=!0,wt=vc(a),Mt=0;Mt<re;Mt++){var It=E[Mt];xe=y;var qt=x;if(It!==oe&&(It.visible||It===wt)){le=It.margin;var ei=le.left,Si=le.top;switch(Ee=le.right+le.left,Fe=le.top+le.bottom,le=Bl(It,!1),le){case zn:xe=z,qt=ne,Si=ei=Fe=Ee=0;break;case Ti:xe=z,ei=Ee=0;break;case Zi:qt=ne,Si=Fe=0}It.measure(xe,qt,0,0),xe=It.measuredBounds,Ee=Math.max(xe.width+Ee,0),Fe=Math.max(xe.height+Fe,0),le=It.alignment,le.Xb()&&(le=a.defaultAlignment),le.sb()||(le=Qr);var fi=It.alignmentFocus;if(fi.Xb()&&(fi=Qr),qt=null,It instanceof Hn&&It.$e!==""&&(qt=It.fb(It.$e),qt===It&&(qt=null)),ei=Xe.x-ei,Si=Xe.y-Si,qt!==null){for(It.arrange(0,0,xe.width,xe.height),xe=qt.actualBounds,xe=tt.allocAt(xe.x+(fi.x*xe.width-fi.offsetX),xe.y+(fi.y*xe.height-fi.offsetY)),qt=qt.panel;qt!==It;)qt.transform.Ga(xe),qt=qt.panel;ei+=le.x*z+le.offsetX-xe.x,Si+=le.y*ne+le.offsetY-xe.y,tt.free(xe)}else ei+=le.x*z+le.offsetX-(fi.x*xe.width+fi.offsetX),Si+=le.y*ne+le.offsetY-(fi.y*xe.height+fi.offsetY);pt?(pt=!1,b.h(ei,Si,Ee,Fe)):ma(b,ei,Si,Ee,Fe)}}switch(pt?b.assign(at):Oe?b.Uu(Xe.x,Xe.y,Xe.width,Xe.height):ma(b,at.x,at.y,at.width,at.height),gn.free(at),gn.free(Xe),le=oe.stretch,le===vr&&(le=Bl(oe,!1)),le){case In:return;case zn:if(!isFinite(y)&&!isFinite(x))return;break;case Ti:if(!isFinite(y))return;break;case Zi:if(!isFinite(x))return}for(xe=oe.measuredBounds,z=xe.width,ne=xe.height,Ee=Math.max(z+ue,0),Fe=Math.max(ne+pe,0),le=oe.margin,Xe=gn.allocAt(-le.left,-le.top,Ee,Fe),fv(oe,Xe,!0),z=Xe.width,ne=Xe.height,y=0;y<re;y++)x=E[y],x===oe||!x.visible&&x!==wt||(le=x.margin,Ee=le.right+le.left,Fe=le.top+le.bottom,xe=x.measuredBounds,Ee=Math.max(xe.width+Ee,0),Fe=Math.max(xe.height+Fe,0),ue=x.alignment,ue.Xb()&&(ue=a.defaultAlignment),ue.sb()||(ue=Qr),x=x.alignmentFocus,x.Xb()&&(x=Qr),pt?(pt=!1,b.h(ue.x*z+ue.offsetX-(x.x*xe.width+x.offsetX)-le.left,ue.y*ne+ue.offsetY-(x.y*xe.height+x.offsetY)-le.top,Ee,Fe)):ma(b,ue.x*z+ue.offsetX-(x.x*xe.width+x.offsetX)-le.left,ue.y*ne+ue.offsetY-(x.y*xe.height+x.offsetY)-le.top,Ee,Fe));pt?b.assign(at):Oe?b.Uu(Xe.x,Xe.y,Xe.width,Xe.height):ma(b,at.x,at.y,at.width,at.height),gn.free(Xe)},Sm.prototype.arrange=function(a,y,x){var E=y.length,b=a.Pb(),z=b.measuredBounds,ne=z.width,re=z.height,oe=a.padding;z=oe.left,oe=oe.top;var le=z-x.x,ue=oe-x.y;for(b.arrange(le,ue,ne,re),ne=gn.allocAt(0,0,ne,re),fv(b,ne,!1),re=0;re<E;re++){var pe=y[re];if(pe!==b){le=pe.measuredBounds;var xe=le.width,Ee=le.height;ue=pe.alignment,ue.Xb()&&(ue=a.defaultAlignment),ue.sb()||(ue=Qr);var Fe=pe.alignmentFocus;if(Fe.Xb()&&(Fe=Qr),le=null,pe instanceof Hn&&pe.$e!==""&&(le=pe.fb(pe.$e),le===pe&&(le=null)),le!==null){var Oe=le.actualBounds;for(Fe=tt.allocAt(Oe.x+(Fe.x*Oe.width-Fe.offsetX),Oe.y+(Fe.y*Oe.height-Fe.offsetY)),le=le.panel;le!==pe;)le.transform.Ga(Fe),le=le.panel;le=ue.x*ne.width+ue.offsetX-Fe.x,ue=ue.y*ne.height+ue.offsetY-Fe.y,tt.free(Fe)}else le=ue.x*ne.width+ue.offsetX-(Fe.x*xe+Fe.offsetX),ue=ue.y*ne.height+ue.offsetY-(Fe.y*Ee+Fe.offsetY);le+=ne.x-x.x,ue+=ne.y-x.y,pe.visible&&pe.arrange(z+le,oe+ue,xe,Ee)}}gn.free(ne)};function fv(a,y,x){var E=null;if(a instanceof Hn&&a.$e!==""&&(E=a.fb(a.$e),E===a&&(E=null)),E!==null)for(x&&a.arrange(0,0,y.width,y.height),y.assign(E.actualBounds),E=E.panel;E!==a;)E.transform.pp(y),E=E.panel}function xm(){this.xa="Base"}Ot(xm,gs),xm.prototype.measure=function(a,y,x,E,b,z,ne){var re=E.length,oe=a.Pb(),le=oe.margin,ue=y,pe=x,xe=le.right+le.left,Ee=le.top+le.bottom;oe.measure(y,x,z,ne),le=oe.measuredBounds;var Fe=0,Oe=null;oe instanceof Er&&(Oe=oe,Fe=Oe.strokeWidth*Oe.scale);var at=Math.max(le.width+xe,0);le=Math.max(le.height+Ee,0);var Xe=vv(oe),pt=Xe.x*at+Xe.offsetX;Xe=Xe.y*le+Xe.offsetY;var wt=yv(oe),Mt=wt.x*at+wt.offsetX;for(wt=wt.y*le+wt.offsetY,isFinite(y)&&(ue=Math.max(Math.abs(pt-Mt)-Fe,0)),isFinite(x)&&(pe=Math.max(Math.abs(Xe-wt)-Fe,0)),Fe=Xn.alloc(),Fe.h(0,0),a=vc(a),wt=0;wt<re;wt++)Xe=E[wt],Xe===oe||!Xe.visible&&Xe!==a||(le=Xe.margin,at=le.right+le.left,pt=le.top+le.bottom,Xe.measure(ue,pe,0,0),le=Xe.measuredBounds,at=Math.max(le.width+at,0),le=Math.max(le.height+pt,0),Fe.h(Math.max(at,Fe.width),Math.max(le,Fe.height)));if(re===1)b.width=at,b.height=le,Xn.free(Fe);else{switch(Xe=vv(oe),wt=yv(oe),re=E=0,wt.x!==Xe.x&&wt.y!==Xe.y&&(E=Fe.width/Math.abs(wt.x-Xe.x),re=Fe.height/Math.abs(wt.y-Xe.y)),Xn.free(Fe),Fe=0,Oe!==null&&(Fe=Oe.strokeWidth*Oe.scale,Ev(Oe)===Ci&&(E=re=Math.max(E,re))),E+=Math.abs(Xe.offsetX)+Math.abs(wt.offsetX)+Fe,re+=Math.abs(Xe.offsetY)+Math.abs(wt.offsetY)+Fe,Oe=oe.stretch,Oe===vr&&(Oe=Bl(oe,!1)),Oe){case In:ne=z=0;break;case zn:isFinite(y)&&(E=y),isFinite(x)&&(re=x);break;case Ti:isFinite(y)&&(E=y),ne=0;break;case Zi:z=0,isFinite(x)&&(re=x)}oe.Uj(),oe.measure(E,re,z,ne),b.width=oe.measuredBounds.width+xe,b.height=oe.measuredBounds.height+Ee}},xm.prototype.arrange=function(a,y){var x=y.length,E=a.Pb(),b=E.measuredBounds,z=gn.alloc();z.h(0,0,1,1);var ne=E.margin,re=ne.left;ne=ne.top;var oe=a.padding,le=oe.left;oe=oe.top,E.arrange(le+re,oe+ne,b.width,b.height);var ue=vv(E),pe=yv(E),xe=ue.y*b.height+ue.offsetY,Ee=pe.x*b.width+pe.offsetX;for(pe=pe.y*b.height+pe.offsetY,z.x=ue.x*b.width+ue.offsetX,z.y=xe,ma(z,Ee,pe,0,0),z.x+=re+le,z.y+=ne+oe,b=0;b<x;b++)re=y[b],re!==E&&(le=re.measuredBounds,ne=re.margin,oe=Math.max(le.width+ne.right+ne.left,0),ue=Math.max(le.height+ne.top+ne.bottom,0),xe=re.alignment,xe.Xb()&&(xe=a.defaultAlignment),xe.sb()||(xe=Qr),oe=z.width*xe.x+xe.offsetX-oe*xe.x+ne.left+z.x,ne=z.height*xe.y+xe.offsetY-ue*xe.y+ne.top+z.y,re.visible&&(Fo(z.x,z.y,z.width,z.height,oe,ne,le.width,le.height)?re.arrange(oe,ne,le.width,le.height):re.arrange(oe,ne,le.width,le.height,new gn(z.x,z.y,z.width,z.height))));gn.free(z)};function Pm(){this.xa="Base",this.name="Table"}Ot(Pm,gs),Pm.prototype.measure=function(a,y,x,E,b){for(var z=E.length,ne=qn(),re=qn(),oe=0;oe<z;oe++){var le=E[oe],ue=le instanceof Hn?le:null;if(ue!==null&&zc(ue)&&le.visible){re.push(ue);for(var pe=ue.O.s,xe=pe.length,Ee=0;Ee<xe;Ee++){var Fe=pe[Ee];ue.type===Hn.TableRow?Fe.row=le.row:ue.type===Hn.TableColumn&&(Fe.column=le.column),ne.push(Fe)}}else ne.push(le)}z=ne.length,z===0&&(a.Fb(0),a.Eb(0));for(var Oe=[],at=0;at<z;at++){var Xe=ne[at];Xe.visible&&(ls(Xe,!0),Yh(Xe,!0),Oe[Xe.row]||(Oe[Xe.row]=[]),Oe[Xe.row][Xe.column]||(Oe[Xe.row][Xe.column]=[]),Oe[Xe.row][Xe.column].push(Xe))}di(ne);var pt=qn(),wt=qn(),Mt=qn(),It={count:0},qt={count:0},ei=y,Si=x,fi=a.rowDefs,Gn=a.colDefs,Tn=null;z=fi.length;for(var dr=0;dr<z;dr++)Tn=fi[dr],Tn!==void 0&&(Tn.actual=0);z=Gn.length;for(var Xi=0;Xi<z;Xi++)Tn=Gn[Xi],Tn!==void 0&&(Tn.actual=0);for(var vo=Oe.length,Xo=0,xs=0;xs<vo;xs++)Oe[xs]&&(Xo=Math.max(Xo,Oe[xs].length));var Es=Math.min(a.topIndex,vo-1),al=Math.min(a.leftIndex,Xo-1),Ps=0;vo=Oe.length;for(var Yc=vc(a),Ja=0;Ja<vo;Ja++)if(Oe[Ja]){Xo=Oe[Ja].length;var Ph=a.Fb(Ja);Ph.actual=0;for(var sl=Ph.oc=0;sl<Xo;sl++)if(Oe[Ja][sl]){var Xc=a.Eb(sl);pt[sl]===void 0&&(Xc.actual=0,Xc.oc=0,pt[sl]=!0);for(var vu=Oe[Ja][sl],Uu=vu.length,eu=0;eu<Uu;eu++){var Wl=vu[eu];if(Wl.visible||Wl===Yc){var Ld=1<Wl.rowSpan||1<Wl.columnSpan;Ld&&(Ja<Es||sl<al||wt.push(Wl));var wh=Wl.margin,Og=wh.right+wh.left,tu=wh.top+wh.bottom,ll=mh(Wl,Ph,Xc,!1),Xp=Wl.desiredSize,_f=!isNaN(Xp.height),jh=!isNaN(Xp.width)&&_f;if(Ld||ll===In||jh||Ja<Es||sl<al||(It[sl]!==void 0||ll!==zn&&ll!==Ti||(It[sl]=-1,It.count++),qt[Ja]!==void 0||ll!==zn&&ll!==Zi||(qt[Ja]=-1,qt.count++),Mt.push(Wl)),Wl.measure(1/0,1/0,0,0),!(Ja<Es||sl<al)){var Gl=Wl.measuredBounds,lf=Math.max(Gl.width+Og,0),nu=Math.max(Gl.height+tu,0);if(Wl.rowSpan===1&&(ll===In||ll===Ti)){Tn=a.Fb(Ja);var Fd=Tn.Wc();Ps=Math.max(nu-Tn.actual,0),Ps+Fd>Si&&(Ps=Math.max(Si-Fd,0));var G0=Tn.oa===0;Tn.oc=Tn.oc+Ps,Tn.actual=Tn.oa+Ps,Si=Math.max(Si-(Ps+(G0?Fd:0)),0)}if(Wl.columnSpan===1&&(ll===In||ll===Zi)){Tn=a.Eb(sl);var Jp=Tn.Wc();Ps=Math.max(lf-Tn.actual,0),Ps+Jp>ei&&(Ps=Math.max(ei-Jp,0));var _y=Tn.oa===0;Tn.oc=Tn.oc+Ps,Tn.actual=Tn.oa+Ps,ei=Math.max(ei-(Ps+(_y?Jp:0)),0)}Ld&&Wl.Uj()}}}}}di(pt);var ac=0,xc=0;z=a.columnCount;for(var Zf=0;Zf<z;Zf++){var Bd=Gn[Zf];Bd!==void 0&&(ac+=isNaN(Bd.Hc)?Bd.oc:Bd.Hc,Bd.oc!==0&&(ac+=Bd.Wc()))}z=a.rowCount;for(var Ig=0;Ig<z;Ig++){var Nd=fi[Ig];Nd!==void 0&&(xc+=isNaN(Nd.Hc)?Nd.oc:Nd.Hc,Nd.oc!==0&&(xc+=Nd.Wc()))}ei=Math.max(y-ac,0);var sc=Si=Math.max(x-xc,0),Jc=ei;z=Mt.length;for(var $l=0;$l<z;$l++){var zh=Mt[$l],$0=a.Fb(zh.row),Pc=a.Eb(zh.column),Rg=zh.measuredBounds,Ch=zh.margin,uf=Ch.right+Ch.left,_h=Ch.top+Ch.bottom;It[zh.column]=Pc.oc===0&&It[zh.column]!==void 0?Math.max(Rg.width+uf,It[zh.column]):null,qt[zh.row]=$0.oc===0&&qt[zh.row]!==void 0?Math.max(Rg.height+_h,qt[zh.row]):null}var Hf=0,jg=0,hh;for(hh in qt)hh!=="count"&&(Hf+=qt[hh]);for(hh in It)hh!=="count"&&(jg+=It[hh]);for(var Os=Xn.alloc(),Qp=0;Qp<z;Qp++){var xl=Mt[Qp];if(xl.visible||xl===Yc){var Qa=a.Fb(xl.row),Pl=a.Eb(xl.column),wc=0;isFinite(Pl.width)?wc=Pl.width:(isFinite(ei)&&It[xl.column]!==null?jg===0?wc=Pl.actual+ei:wc=It[xl.column]/jg*Jc:It[xl.column]!==null?wc=ei:wc=Pl.actual||ei,wc=Math.max(0,wc-Pl.Wc()));var Qc=0;switch(isFinite(Qa.height)?Qc=Qa.height:(isFinite(Si)&&qt[xl.row]!==null?Hf===0?Qc=Qa.actual+Si:Qc=qt[xl.row]/Hf*sc:qt[xl.row]!==null?Qc=Si:Qc=Qa.actual||Si,Qc=Math.max(0,Qc-Qa.Wc())),Os.h(Math.max(Pl.minimum,Math.min(wc,Pl.maximum)),Math.max(Qa.minimum,Math.min(Qc,Qa.maximum))),ll=mh(xl,Qa,Pl,!1),ll){case Ti:Os.height=Math.max(Os.height,Qa.actual+Si);break;case Zi:Os.width=Math.max(Os.width,Pl.actual+ei)}var hf=xl.margin,Zy=hf.right+hf.left,K0=hf.top+hf.bottom;xl.Uj(),xl.measure(Os.width,Os.height,Pl.minimum,Qa.minimum);var zg=xl.measuredBounds,cf=Math.max(zg.width+Zy,0),Wf=Math.max(zg.height+K0,0);isFinite(ei)&&(cf=Math.min(cf,Os.width)),isFinite(Si)&&(Wf=Math.min(Wf,Os.height));var Kl=0;Kl=Qa.actual,Qa.actual=Math.max(Qa.actual,Wf),Qa.oc=Math.max(Qa.oc,Wf),Ps=Qa.actual-Kl,Si=Math.max(Si-Ps,0),qt[xl.row]===null&&(sc=Math.max(sc-Ps,0)),Kl=Pl.actual,Pl.actual=Math.max(Pl.actual,cf),Pl.oc=Math.max(Pl.oc,cf),Ps=Pl.actual-Kl,ei=Math.max(ei-Ps,0),It[xl.column]===null&&(Jc=Math.max(Jc-Ps,0))}}di(Mt);var Cc=Xn.alloc(),Eh=qn(),Ou=qn();if(z=wt.length,z!==0){for(var kd=0;kd<vo;kd++)if(Oe[kd]){Xo=Oe[kd].length;var _g=a.Fb(kd);Eh[kd]=_g.actual;for(var Ad=0;Ad<Xo;Ad++)if(Oe[kd][Ad]){var V0=a.Eb(Ad);Ou[Ad]=V0.actual}}}for(var Zg=0;Zg<z;Zg++){var Ra=wt[Zg];if(Ra.visible||Ra===Yc){var ch=a.Fb(Ra.row),Yu=a.Eb(Ra.column);switch(Os.h(Math.max(Yu.minimum,Math.min(y,Yu.maximum)),Math.max(ch.minimum,Math.min(x,ch.maximum))),ll=mh(Ra,ch,Yu,!1),ll){case zn:Ou[Yu.index]!==0&&(Os.width=Math.min(Os.width,Ou[Yu.index])),Eh[ch.index]!==0&&(Os.height=Math.min(Os.height,Eh[ch.index]));break;case Ti:Ou[Yu.index]!==0&&(Os.width=Math.min(Os.width,Ou[Yu.index]));break;case Zi:Eh[ch.index]!==0&&(Os.height=Math.min(Os.height,Eh[ch.index]))}isFinite(Yu.width)&&(Os.width=Yu.width),isFinite(ch.height)&&(Os.height=ch.height),Cc.h(0,0);for(var U0=Yu.minimum,iu=ch.minimum,qc=1;qc<Ra.rowSpan&&!(Ra.row+qc>=a.rowCount);qc++)Tn=a.Fb(Ra.row+qc),Ps=0,Ps=ll===zn||ll===Zi?Math.max(Tn.minimum,Eh[Ra.row+qc]===0?Tn.maximum:Math.min(Eh[Ra.row+qc],Tn.maximum)):Math.max(Tn.minimum,isNaN(Tn.Hc)?Tn.maximum:Math.min(Tn.Hc,Tn.maximum)),Cc.height+=Ps,iu+=Tn.minimum;for(var Xu=1;Xu<Ra.columnSpan&&!(Ra.column+Xu>=a.columnCount);Xu++)Tn=a.Eb(Ra.column+Xu),Ps=0,Ps=ll===zn||ll===Ti?Math.max(Tn.minimum,Ou[Ra.column+Xu]===0?Tn.maximum:Math.min(Ou[Ra.column+Xu],Tn.maximum)):Math.max(Tn.minimum,isNaN(Tn.Hc)?Tn.maximum:Math.min(Tn.Hc,Tn.maximum)),Cc.width+=Ps,U0+=Tn.minimum;Os.width+=Cc.width,Os.height+=Cc.height;var Hg=Ra.margin,Td=Hg.right+Hg.left,qp=Hg.top+Hg.bottom;Ra.measure(Os.width,Os.height,U0,iu);for(var Wg=Ra.measuredBounds,Zh=Math.max(Wg.width+Td,0),df=Math.max(Wg.height+qp,0),Dd=0,Gg=0;Gg<Ra.rowSpan&&!(Ra.row+Gg>=a.rowCount);Gg++)Tn=a.Fb(Ra.row+Gg),Dd+=Tn.total||0;if(Dd<df){var ed=df-Dd,lc=df-Dd;if(Ra.spanAllocation!==null)for(var td=Ra.spanAllocation,Ec=0;Ec<Ra.rowSpan&&!(0>=ed)&&!(Ra.row+Ec>=a.rowCount);Ec++){Tn=a.Fb(Ra.row+Ec);var nd=Tn.oa||0,ff=td(Ra,Tn,lc);Tn.actual=Math.min(Tn.maximum,nd+ff),Tn.oa!==nd&&(ed-=Tn.oa-nd)}for(;0<ed;){var bh=Tn.oa||0;if(isNaN(Tn.height)&&Tn.maximum>bh&&(Tn.actual=Math.min(Tn.maximum,bh+ed),Tn.oa!==bh&&(ed-=Tn.oa-bh)),Tn.index===0)break;Tn=a.Fb(Tn.index-1)}}for(var Gf=0,id=0;id<Ra.columnSpan&&!(Ra.column+id>=a.columnCount);id++)Tn=a.Eb(Ra.column+id),Gf+=Tn.total||0;if(Gf<Zh){var $f=Zh-Gf,Hy=Zh-Gf;if(Ra.spanAllocation!==null)for(var bc=Ra.spanAllocation,gf=0;gf<Ra.columnSpan&&!(0>=$f)&&!(Ra.column+gf>=a.columnCount);gf++){Tn=a.Eb(Ra.column+gf);var em=Tn.oa||0,Wy=bc(Ra,Tn,Hy);Tn.actual=Math.min(Tn.maximum,em+Wy),Tn.oa!==em&&($f-=Tn.oa-em)}for(;0<$f;){var Y0=Tn.oa||0;if(isNaN(Tn.width)&&Tn.maximum>Y0&&(Tn.actual=Math.min(Tn.maximum,Y0+$f),Tn.oa!==Y0&&($f-=Tn.oa-Y0)),Tn.index===0)break;Tn=a.Eb(Tn.index-1)}}}}di(wt),Xn.free(Cc),Xn.free(Os),Eh!==void 0&&di(Eh),Ou!==void 0&&di(Ou);var Kf=0,Vf=0,X0=a.desiredSize,gx=a.maxSize;ll=Bl(a,!0);var tm=xc=ac=0,nm=0;z=a.columnCount;for(var J0=0;J0<z;J0++)Gn[J0]!==void 0&&(Tn=a.Eb(J0),isFinite(Tn.width)?(tm+=Tn.width,tm+=Tn.Wc()):km(Tn)===fp?(tm+=Tn.oa,tm+=Tn.Wc()):Tn.oa!==0&&(ac+=Tn.oa,ac+=Tn.Wc()));isFinite(X0.width)?Kf=Math.min(X0.width,gx.width):Kf=ll!==In&&isFinite(y)?y:ac,Kf=Math.max(Kf,a.minSize.width),Kf=Math.max(Kf-tm,0);for(var Jx=ac===0?1:Math.max(Kf/ac,1),Q0=0;Q0<z;Q0++)Gn[Q0]!==void 0&&(Tn=a.Eb(Q0),isFinite(Tn.width)||km(Tn)===fp||(Tn.actual=Tn.oa*Jx),Tn.position=b.width,Tn.oa!==0&&(b.width+=Tn.oa,b.width+=Tn.Wc()));z=a.rowCount;for(var q0=0;q0<z;q0++)fi[q0]!==void 0&&(Tn=a.Fb(q0),isFinite(Tn.height)?(nm+=Tn.height,nm+=Tn.Wc()):km(Tn)===fp?(nm+=Tn.oa,nm+=Tn.Wc()):Tn.oa!==0&&(xc+=Tn.oa,xc+=Tn.Wc()));isFinite(X0.height)?Vf=Math.min(X0.height,gx.height):Vf=ll!==In&&isFinite(x)?x:xc,Vf=Math.max(Vf,a.minSize.height),Vf=Math.max(Vf-nm,0);for(var Qx=xc===0?1:Math.max(Vf/xc,1),ev=0;ev<z;ev++)fi[ev]!==void 0&&(Tn=a.Fb(ev),isFinite(Tn.height)||km(Tn)===fp||(Tn.actual=Tn.oa*Qx),Tn.position=b.height,Tn.oa!==0&&(b.height+=Tn.oa,b.height+=Tn.Wc()));z=re.length;for(var Gy=0;Gy<z;Gy++){var im=re[Gy],$y=0,Ky=0;im.type===Hn.TableRow?($y=b.width,Tn=a.Fb(im.row),Ky=Tn.actual):(Tn=a.Eb(im.column),$y=Tn.actual,Ky=b.height),im.measuredBounds.h(0,0,$y,Ky),ls(im,!1)}di(re),a.inRowsCols=Oe},Pm.prototype.arrange=function(a,y,x){var E=y.length,b=a.padding,z=b.left;b=b.top;var ne=a.inRowsCols;if(ne!==null){for(var re,oe,le=ne.length,ue=0,pe=0;pe<le;pe++)ne[pe]&&(ue=Math.max(ue,ne[pe].length));oe=a.rowDefs,re=a.colDefs;var xe=pe=0,Ee=Math.min(a.topIndex,le-1);if(0<oe.length){for(;Ee!==le&&(oe[Ee]===void 0||oe[Ee].oa===0);)Ee++;Ee=Math.max(Math.min(Ee,le-1),0),pe=-oe[Ee].position}var Fe=Math.min(a.leftIndex,ue-1);if(0<re.length){for(;Fe!==ue&&(re[Fe]===void 0||re[Fe].oa===0);)Fe++;Fe=Math.max(Math.min(Fe,ue-1),0),xe=-re[Fe].position}for(var Oe=0,at=0;Oe!==le&&oe[Oe]===void 0;)Oe++;for(;at!==le&&re[at]===void 0;)at++;ue=a.part,a.Fb(Oe),a.Eb(at);for(var Xe=0;Xe<y.length;Xe++){var pt=y[Xe];if(pt instanceof Hn&&pt.visible&&zc(pt)){if(pt.type===Hn.TableRow){re=a.Fb(pt.row);var wt=a.Eb(at)}else re=a.Fb(Oe),wt=a.Eb(pt.column);oe=re.position+pe+b,re.oa!==0&&(oe+=re.Io(Math.max(Oe,Ee))),re=wt.position+xe+z,wt.oa!==0&&(re+=wt.Io(Math.max(at,Fe))),wt=pt.measuredBounds,pt.Uk(),pt.actualBounds.ka();var Mt=pt.actualBounds,It=gn.allocAt(Mt.x,Mt.y,Mt.width,Mt.height);Mt.x=pt.type===Hn.TableRow?z:re,Mt.y=pt.type===Hn.TableColumn?b:oe,Mt.width=wt.width,Mt.height=wt.height,pt.actualBounds.freeze(),Yh(pt,!1),wl(It,Mt)||ue===null||(ue.oh(),pt.Pn(ue)),gn.free(It)}}for(Xe=Xn.alloc(),pt=0;pt<le;pt++)if(ne[pt]){for(ue=ne[pt].length,wt=a.Fb(pt),oe=wt.position+pe+b,wt.oa!==0&&(oe+=wt.Io(Math.max(Oe,Ee))),Mt=0;Mt<ue;Mt++)if(ne[pt][Mt]){It=a.Eb(Mt),re=It.position+xe+z,It.oa!==0&&(re+=It.Io(Math.max(at,Fe)));for(var qt=ne[pt][Mt],ei=qt.length,Si=0;Si<ei;Si++){var fi=qt[Si],Gn=fi.measuredBounds;Xe.h(0,0);for(var Tn=1;Tn<fi.rowSpan&&!(pt+Tn>=a.rowCount);Tn++){var dr=a.Fb(pt+Tn);dr.oa!==0&&(Xe.height+=dr.total)}for(Tn=1;Tn<fi.columnSpan&&!(Mt+Tn>=a.columnCount);Tn++)dr=a.Eb(Mt+Tn),dr.oa!==0&&(Xe.width+=dr.total);var Xi=It.oa+Xe.width,vo=wt.oa+Xe.height;Tn=re,dr=oe;var Xo=Xi,xs=vo,Es=re,al=oe,Ps=Xi,Yc=vo;re+Xi>x.width&&(Ps=Math.max(x.width-re,0)),oe+vo>x.height&&(Yc=Math.max(x.height-oe,0));var Ja=fi.alignment;if(Ja.Xb()){Ja=a.defaultAlignment,Ja.sb()||(Ja=Qr);var Ph=Ja.x,sl=Ja.y,Xc=Ja.offsetX;Ja=Ja.offsetY;var vu=It.alignment,Uu=wt.alignment;vu.sb()&&(Ph=vu.x,Xc=vu.offsetX),Uu.sb()&&(sl=Uu.y,Ja=Uu.offsetY)}else Ph=Ja.x,sl=Ja.y,Xc=Ja.offsetX,Ja=Ja.offsetY;(isNaN(Ph)||isNaN(sl))&&(sl=Ph=.5,Ja=Xc=0),vu=Gn.width,Uu=Gn.height;var eu=fi.margin,Wl=eu.left+eu.right,Ld=eu.top+eu.bottom,wh=mh(fi,wt,It,!1);!isNaN(fi.desiredSize.width)||wh!==zn&&wh!==Ti||(vu=Math.max(Xi-Wl,0)),!isNaN(fi.desiredSize.height)||wh!==zn&&wh!==Zi||(Uu=Math.max(vo-Ld,0)),Xi=fi.maxSize,vo=fi.minSize,vu=Math.min(Xi.width,vu),Uu=Math.min(Xi.height,Uu),vu=Math.max(vo.width,vu),Uu=Math.max(vo.height,Uu),Xi=Uu+Ld,Tn+=Xo*Ph-(vu+Wl)*Ph+Xc+eu.left,dr+=xs*sl-Xi*sl+Ja+eu.top,fi.visible&&(Fo(Es,al,Ps,Yc,Tn,dr,Gn.width,Gn.height)?fi.arrange(Tn,dr,vu,Uu):fi.arrange(Tn,dr,vu,Uu,new gn(Es,al,Ps,Yc)))}}}for(Xn.free(Xe),a=0;a<E;a++)x=y[a],z=x instanceof Hn?x:null,z!==null&&zc(z)&&(z=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,z.width,z.height),x.naturalBounds.freeze())}};function wm(){this.xa="Base"}Ot(wm,gs),wm.prototype.measure=function(){},wm.prototype.arrange=function(){};function Cm(){this.xa="Base"}Ot(Cm,gs),Cm.prototype.measure=function(){},Cm.prototype.arrange=function(){};function Em(){this.xa="Base"}Ot(Em,gs),Em.prototype.measure=function(a,y,x,E,b,z,ne){1<E.length&&yt("Viewbox Panel cannot contain more than one GraphObject."),E=E[0],E.Ca=1,E.Uj(),E.measure(1/0,1/0,z,ne);var re=E.measuredBounds,oe=E.margin,le=oe.right+oe.left;if(oe=oe.top+oe.bottom,isFinite(y)||isFinite(x)){var ue=E.scale,pe=re.width;re=re.height;var xe=Math.max(y-le,0),Ee=Math.max(x-oe,0),Fe=1;a.viewboxStretch===Ci?pe!==0&&re!==0&&(Fe=Math.min(xe/pe,Ee/re)):pe!==0&&re!==0&&(Fe=Math.max(xe/pe,Ee/re)),Fe===0&&(Fe=1e-4),E.Ca*=Fe,ue!==E.scale&&(ls(E,!0),E.measure(1/0,1/0,z,ne))}re=E.measuredBounds,b.width=isFinite(y)?y:Math.max(re.width+le,0),b.height=isFinite(x)?x:Math.max(re.height+oe,0)},Em.prototype.arrange=function(a,y,x){y=y[0];var E=y.measuredBounds,b=y.margin,z=Math.max(E.width+(b.right+b.left),0);b=Math.max(E.height+(b.top+b.bottom),0);var ne=y.alignment;ne.Xb()&&(ne=a.defaultAlignment),ne.sb()||(ne=Qr),y.arrange(x.width*ne.x-z*ne.x+ne.offsetX,x.height*ne.y-b*ne.y+ne.offsetY,E.width,E.height)};function hp(){this.xa="Base"}Ot(hp,gs),hp.prototype.measure=function(){},hp.prototype.arrange=function(){},hp.prototype.gc=function(a,y,x){x=a.Df()*x.scale,0>=x&&(x=1);var E=a.gridCellSize,b=E.width;E=E.height;var z=a.naturalBounds,ne=a.actualBounds,re=z.width,oe=z.height,le=Math.ceil(re/b),ue=Math.ceil(oe/E),pe=a.gridOrigin,xe=pe.x;pe=pe.y,y.save(),y.beginPath(),y.rect(0,0,re,oe),y.clip(),y.Se();for(var Ee=[],Fe=a.O.s,Oe=Fe.length,at=0;at<Oe;at++){var Xe=Fe[at],pt=[];if(Ee.push(pt),Xe.visible){var wt=Xe.interval;if(!(0>wt)){Xe=pv(Xe.figure);for(var Mt=0;Mt<Oe;Mt++)if(Mt!==at){var It=Fe[Mt];It.visible&&pv(It.figure)===Xe&&(It=It.interval,It>wt&&pt.push(It))}}}}for(Fe=a.O.s,Oe=Fe.length,at=0;at<Oe;at++){var qt=Fe[at];if(qt.visible&&(pt=qt.interval||1,Xe=Math.abs(pt),!(2>b*Xe*x))){if(wt=qt.segmentIndex,(!isFinite(wt)||isNaN(wt))&&(wt=0),0>wt&&(wt=Xe-Math.min(-wt,Xe)),wt=Math.round(wt%Xe),Xe=qt.opacity,Mt=1,Xe!==1){if(Xe===0)continue;Mt=y.globalAlpha,y.globalAlpha=Mt*Xe}It=Ee[at];var ei=!1,Si=qt.strokeDashArray;if(Si!==null&&(ei=!0,y.js(Si,qt.strokeDashOffset)),qt.figure==="LineV"&&qt.stroke!==null&&0<qt.strokeWidth){for(y.lineWidth=qt.strokeWidth,Da(a,y,qt.stroke,!1,!1,z,ne),y.beginPath(),Si=qt=Math.floor((xe-b)/b);Si<=qt+le;Si++){var fi=Si*b+xe;0<=fi&&fi<=re&&bm(Si,pt,wt,It)&&(y.moveTo(fi,0),y.lineTo(fi,oe))}y.stroke(),y.Se()}else if(qt.figure==="LineH"&&qt.stroke!==null&&0<qt.strokeWidth){for(y.lineWidth=qt.strokeWidth,Da(a,y,qt.stroke,!1,!1,z,ne),y.beginPath(),Si=qt=Math.floor((pe-E)/E);Si<=qt+ue;Si++)fi=Si*E+pe,0<=fi&&fi<=oe&&bm(Si,pt,wt,It)&&(y.moveTo(0,fi),y.lineTo(re,fi));y.stroke(),y.Se()}else if(qt.figure==="BarV"&&qt.fill!==null)for(Da(a,y,qt.fill,!0,!1,z,ne),qt=qt.width,isNaN(qt)&&(qt=b),fi=Si=Math.floor((xe-b)/b);fi<=Si+le;fi++){var Gn=fi*b+xe;0<=Gn+qt&&Gn<=re&&bm(fi,pt,wt,It)&&y.fillRect(Gn,0,qt,oe)}else if(qt.figure==="BarH"&&qt.fill!==null)for(Da(a,y,qt.fill,!0,!1,z,ne),qt=qt.height,isNaN(qt)&&(qt=E),fi=Si=Math.floor((pe-E)/E);fi<=Si+ue;fi++)Gn=fi*E+pe,0<=Gn+qt&&Gn<=oe&&bm(fi,pt,wt,It)&&y.fillRect(0,Gn,re,qt);ei&&y.fs(),Xe!==1&&(y.globalAlpha=Mt)}}y.restore(),y.Vc(!1)};function bm(a,y,x,E){if(0>y)return a%y===x;if(a%y!==x)return!1;y=E.length;for(var b=0;b<y;b++)if(a%E[b]===x)return!1;return!0}function Mm(){this.xa="Base"}Ot(Mm,gs),Mm.prototype.measure=function(a,y,x,E,b){var z=E.length;if(a instanceof lo||a instanceof Kn){var ne=null,re=null;if(a instanceof Kn&&(ne=a),a instanceof lo&&(re=a,ne=re.adornedPart,a.j===null&&(a.j=[])),ne instanceof Kn){var oe=ne;if(z===0)Oa(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var le=a instanceof lo?null:ne.path;y=ne.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var ue=oe.points,pe=ne.pointsCount;re!==null?re.Ul(!1):ne!==null&&ne.Ul(!1),re=y.width;var xe=y.height,Ee=a.j;if(Ee.length=0,le!==null){i1(a,re,xe,le);var Fe=le.measuredBounds;x.ed(Fe),Ee.push(Fe)}Fe=_t.alloc();for(var Oe=tt.alloc(),at=tt.alloc(),Xe=0;Xe<z;Xe++){var pt=E[Xe];if(pt!==le)if(pt.isPanelMain&&pt instanceof Er){i1(a,re,xe,pt);var wt=pt.measuredBounds;x.ed(wt),Ee.push(wt)}else if(2>pe)pt.measure(1/0,1/0,0,0),wt=pt.measuredBounds,x.ed(wt),Ee.push(wt);else{var Mt=pt.segmentIndex,It=pt.segmentFraction,qt=pt.alignmentFocus;qt.Mc()&&(qt=Qr);var ei=pt.segmentOrientation,Si=pt.segmentOffset;if(isNaN(Mt)){var fi=oe.ua;wt=qn(),fi.Qu(It,wt);var Gn=tt.allocAt(wt[0],wt[1]);if(Gn.add(oe.i(0)),fi.type===yn.j?Gn.offset(-fi.startX,-fi.startY):(fi=fi.figures.first(),fi!==null&&Gn.offset(-fi.startX,-fi.startY)),fi=wt[2],ei!==pl){var Tn=oe.computeAngle(pt,ei,fi);pt.Kb=Tn}Tn=Gn.x-y.x;var dr=Gn.y-y.y;tt.free(Gn),di(wt)}else if(Mt<-pe||Mt>=pe)wt=tt.alloc(),oe.vg(),oe.computeMidPoint(wt),fi=oe.midAngle,ei!==pl&&(Tn=oe.computeAngle(pt,ei,fi),pt.Kb=Tn),Tn=wt.x-y.x,dr=wt.y-y.y,tt.free(wt);else{if(Tn=0,0<=Mt?(dr=ue.M(Mt),wt=Mt<pe-1?ue.M(Mt+1):dr):(Tn=pe+Mt,dr=ue.M(Tn),wt=0<Tn?ue.M(Tn-1):dr),dr.Xa(wt)){0<=Mt?(fi=0<Mt?ue.M(Mt-1):dr,Tn=Mt<pe-2?ue.M(Mt+2):wt):(fi=Tn<pe-1?ue.M(Tn+1):dr,Tn=1<Tn?ue.M(Tn-2):wt),Gn=fi.Bf(dr);var Xi=wt.Bf(Tn);fi=Gn>Xi+10?0<=Mt?fi.ab(dr):dr.ab(fi):Xi>Gn+10?0<=Mt?wt.ab(Tn):Tn.ab(wt):0<=Mt?fi.ab(Tn):Tn.ab(fi)}else fi=0<=Mt?dr.ab(wt):wt.ab(dr);ei!==pl&&(Tn=oe.computeAngle(pt,ei,fi),pt.Kb=Tn),Tn=dr.x+(wt.x-dr.x)*It-y.x,dr=dr.y+(wt.y-dr.y)*It-y.y}pt.measure(1/0,1/0,0,0),wt=pt.measuredBounds,Gn=pt.naturalBounds;var vo=0;pt instanceof Er&&(vo=pt.strokeWidth),Xi=Gn.width+vo;var Xo=Gn.height+vo;Fe.reset(),Fe.translate(-wt.x,-wt.y),Fe.scale(pt.scale,pt.scale),Fe.rotate(ei===pl?pt.angle:fi,Xi/2,Xo/2),ei!==Cp&&ei!==bp||Fe.rotate(90,Xi/2,Xo/2),ei!==Ep&&ei!==Mp||Fe.rotate(-90,Xi/2,Xo/2),ei===n0&&(45<fi&&135>fi||225<fi&&315>fi)&&Fe.rotate(-fi,Xi/2,Xo/2),Gn=new gn(0,0,Xi,Xo),Oe.xi(Gn,qt),Fe.Ga(Oe),qt=-Oe.x+vo/2*pt.scale,pt=-Oe.y+vo/2*pt.scale,at.assign(Si),vo=isNaN(Si.x);var xs=isNaN(Si.y);if(vo||xs){Xi=Xi/2+3,Xo=Xo/2+3;var Es=45<=fi&&135>=fi,al=225<=fi&&315>=fi;ei===pl&&(Es||al)?(at.x=xs?Xi:Si.y,at.y=vo?Xo:Si.x,Es?0<=Mt||isNaN(Mt)&&.5>It||!vo||(at.y=-Xo):al&&((0<=Mt||isNaN(Mt)&&.5>It)&&vo&&(at.y=-Xo),xs&&(at.x=-Xi))):(vo&&(at.x=0<=Mt||isNaN(Mt)&&.5>It?Xi:-Xi),xs&&(at.y=-Xo),at.rotate(fi))}else at.rotate(fi);Tn+=at.x,dr+=at.y,Gn.set(wt),Gn.h(Tn+qt,dr+pt,wt.width,wt.height),Ee.push(Gn),x.ed(Gn)}}if(ne!==null)for(E=ne.labelNodes;E.next();)E.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),Oa(b,x.width||0,x.height||0),_t.free(Fe),tt.free(Oe),tt.free(at)}}}},Mm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof lo||a instanceof Kn){var E=a,b=null;a instanceof lo&&(b=a,E=b.adornedPart);var z=a instanceof lo?null:E.path,ne=a.j;if(ne.length!==0){var re=0;if(z!==null&&re<ne.length){var oe=ne[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<ne.length){var ue=ne[re];re++,le.arrange(ue.x-a.jg.x,ue.y-a.jg.y,ue.width,ue.height)}}}if(y=E.points,x=y.count,2<=x&&a instanceof Kn)for(z=a.labelNodes;z.next();){var pe=a;ne=z.value,re=ne.segmentIndex,oe=ne.segmentFraction;var xe=ne.alignmentFocus;if(le=ne.segmentOrientation,ue=ne.segmentOffset,isNaN(re)){var Ee=pe.ua,Fe=qn();Ee.Qu(oe,Fe);var Oe=tt.allocAt(Fe[0],Fe[1]);Oe.add(pe.i(0)),Ee.type===yn.j||(Ee=Ee.figures.first()),Oe.offset(-Ee.startX,-Ee.startY),Ee=Fe[2],le!==pl&&(pe=pe.computeAngle(ne,le,Ee),ne.angle=pe),pe=Oe.x;var at=Oe.y;tt.free(Oe),di(Fe)}else if(re<-x||re>=x)Fe=tt.alloc(),Ee=pe,at=Fe,Ee.vg(),Ee.computeMidPoint(at),Ee=pe.midAngle,le!==pl&&(pe=pe.computeAngle(ne,le,Ee),ne.angle=pe),pe=Fe.x,at=Fe.y,tt.free(Fe);else{if(Oe=0,0<=re?(Fe=y.s[re],at=re<x-1?y.s[re+1]:Fe):(Oe=x+re,Fe=y.s[Oe],at=0<Oe?y.s[Oe-1]:Fe),Fe.Xa(at)){0<=re?(Ee=0<re?y.s[re-1]:Fe,Oe=re<x-2?y.s[re+2]:at):(Ee=Oe<x-1?y.s[Oe+1]:Fe,Oe=1<Oe?y.s[Oe-2]:at);var Xe=Ee.Bf(Fe),pt=at.Bf(Oe);Ee=Xe>pt+10?0<=re?Ee.ab(Fe):Fe.ab(Ee):pt>Xe+10?0<=re?at.ab(Oe):Oe.ab(at):0<=re?Ee.ab(Oe):Oe.ab(Ee)}else Ee=0<=re?Fe.ab(at):at.ab(Fe);le!==pl&&(pe=pe.computeAngle(ne,le,Ee),ne.angle=pe),pe=Fe.x+(at.x-Fe.x)*oe,at=Fe.y+(at.y-Fe.y)*oe}if(xe.ys())ne.location=new tt(pe,at);else{xe.Mc()&&(xe=Qr),Fe=_t.alloc(),Fe.reset(),Fe.scale(ne.scale,ne.scale),Fe.rotate(ne.angle,0,0);var wt=ne.naturalBounds;Oe=gn.allocAt(0,0,wt.width,wt.height),Xe=tt.alloc(),Xe.xi(Oe,xe),Fe.Ga(Xe),xe=-Xe.x,pt=-Xe.y;var Mt=wt.width,It=wt.height;wt=tt.alloc(),wt.assign(ue);var qt=isNaN(ue.x),ei=isNaN(ue.y);if(qt||ei){Mt=Mt/2+3,It=It/2+3;var Si=45<=Ee&&135>=Ee,fi=225<=Ee&&315>=Ee;le===pl&&(Si||fi)?(wt.x=ei?Mt:ue.y,wt.y=qt?It:ue.x,Si?0<=re||isNaN(re)&&.5>oe||!qt||(wt.y=-It):fi&&((0<=re||isNaN(re)&&.5>oe)&&qt&&(wt.y=-It),ei&&(wt.x=-Mt))):(qt&&(wt.x=0<=re||isNaN(re)&&.5>oe?Mt:-Mt),ei&&(wt.y=-It),wt.rotate(Ee))}else wt.rotate(Ee);pe+=wt.x,at+=wt.y,Fe.pp(Oe),xe+=Oe.x,pt+=Oe.y,re=tt.allocAt(pe+xe,at+pt),ne.move(re),tt.free(re),tt.free(wt),tt.free(Xe),gn.free(Oe),_t.free(Fe)}}b!==null?b.Ul(!1):E.Ul(!1),E=A1(a),a.location.h(a.position.x+E.x,a.position.y+E.y),tt.free(E)}};function i1(a,y,x,E){if(fu(E)!==!1){var b=E.strokeWidth;b===0&&a instanceof lo&&a.type===Hn.Link&&a.adornedObject instanceof Er&&(b=a.adornedObject.strokeWidth),b*=E.Ca,a instanceof Kn&&a.ua!==null?(a=a.geometry.bounds,E.Ge(a.x-b/2,a.y-b/2,a.width+b,a.height+b)):a instanceof lo&&a.adornedPart.ua!==null?(a=a.adornedPart.ua.bounds,E.Ge(a.x-b/2,a.y-b/2,a.width+b,a.height+b)):E.Ge(-(b/2),-(b/2),y+b,x+b),b=E.desiredSize,b.w()||E.ua===null?E.dc.h(0,0,b.width,b.height):E.dc.assign(E.ua.bounds),ls(E,!1)}}function cp(){this.xa="Base"}Ot(cp,gs),cp.prototype.measure=function(a,y,x,E,b,z,ne){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,ne);var pe=re.measuredBounds,xe=new gn(-oe.left,-oe.top,Math.max(pe.width+le,0),Math.max(pe.height+ue,0));a.graduatedBounds.push(xe),b.assign(xe);for(var Ee=re.geometry,Fe=re.strokeWidth,Oe=Ee.flattenedSegments,at=Ee.flattenedLengths,Xe=Ee.flattenedTotalLength,pt=Oe.length,wt=0,Mt=0,It=qn(),qt=0;qt<pt;qt++){var ei=Oe[qt],Si=[];Mt=wt=0;for(var fi=ei.length,Gn=0;Gn<fi;Gn+=2){var Tn=ei[Gn],dr=ei[Gn+1];if(Gn!==0){var Xi=180*Math.atan2(dr-Mt,Tn-wt)/Math.PI;0>Xi&&(Xi+=360),Si.push(Xi)}wt=Tn,Mt=dr}It.push(Si)}if(a.graduatedIntervals===null){for(var vo=[],Xo=a.O.s,xs=Xo.length,Es=0;Es<xs;Es++){var al=Xo[Es],Ps=[];if(vo.push(Ps),al.visible){var Yc=al.interval;if(!(0>Yc)){for(var Ja=0;Ja<xs;Ja++)if(Ja!==Es){var Ph=Xo[Ja];if(Ph.visible&&al.constructor===Ph.constructor){var sl=Ph.interval;sl>Yc&&Ps.push(sl)}}}}}a.graduatedIntervals=vo}var Xc=a.graduatedIntervals,vu=a.O.s,Uu=vu.length,eu=0,Wl=0,Ld=Xe;a.graduatedMarks=[];for(var wh,Og=0;Og<Uu;Og++){var tu=vu[Og];if(wh=[],tu.visible&&tu!==re){var ll=Math.abs(tu.interval),Xp=a.graduatedTickUnit;if(!(2>Xp*ll*Xe/a.graduatedRange&&tu.graduatedSkip===null)){var _f=at[0][0],jh=0,Gl=0;Wl=Xe*tu.graduatedStart-1e-4,Ld=Xe*tu.graduatedEnd+1e-4;var lf=Xp*ll,nu=a.graduatedTickBase;if(nu<a.graduatedMin){var Fd=(a.graduatedMin-nu)/lf;Fd=Fd%1===0?Fd:Math.floor(Fd+1),nu+=Fd*lf}else nu>a.graduatedMin+lf&&(nu-=Math.floor((nu-a.graduatedMin)/lf)*lf);for(var G0=Xc[Og],Jp=nu,_y=1e-6*a.graduatedMax,ac=1;nu<=a.graduatedMax+_y;ac++){e:{for(var xc=G0.length,Zf=0;Zf<xc;Zf++){var Bd=(nu-a.graduatedTickBase)%(G0[Zf]*a.graduatedTickUnit),Ig=1e-6*a.graduatedTickUnit;if(Bd<Ig&&Bd>-Ig){var Nd=!1;break e}}Nd=!0}if(Nd&&(nu>a.graduatedMax&&(nu=a.graduatedMax),tu.graduatedSkip===null||tu instanceof Qo&&!tu.graduatedSkip(nu,tu)||tu instanceof Er&&!tu.graduatedSkip(nu,tu))&&(eu=(nu-a.graduatedMin)*Xe/a.graduatedRange,eu>Xe&&(eu=Xe),Wl<=eu&&eu<=Ld)){for(var sc=It[jh][Gl],Jc=at[jh][Gl];jh<at.length;){for(;eu>_f&&Gl<at[jh].length-1;)Gl++,sc=It[jh][Gl],Jc=at[jh][Gl],_f+=Jc;if(eu<=_f)break;jh++,Gl=0,sc=It[jh][Gl],Jc=at[jh][Gl],_f+=Jc}var $l=Oe[jh],zh=$l[2*Gl],$0=$l[2*Gl+1],Pc=(eu-(_f-Jc))/Jc,Rg=new tt(zh+($l[2*Gl+2]-zh)*Pc+Fe/2-Ee.bounds.x,$0+($l[2*Gl+3]-$0)*Pc+Fe/2-Ee.bounds.y);Rg.scale(re.scale,re.scale);e:{var Ch=sc,uf=It[jh];if(!(.5005>Pc&&.4995<Pc)){var _h=Ch;if(.5>Pc?0<Gl?_h=uf[Gl-1]:it.$($l[0],$l[$l.length-2])&&it.$($l[1],$l[$l.length-1])&&(_h=uf[uf.length-1]):.5<Pc&&(Gl+1<uf.length?_h=uf[Gl+1]:it.$($l[0],$l[$l.length-2])&&it.$($l[1],$l[$l.length-1])&&(_h=uf[0])),Ch!==_h){var Hf=Math.abs(Ch-_h);if(180<Hf&&(Ch<_h?Ch+=360:_h+=360,Hf=Math.abs(Ch-_h)),5e-4>Pc||.9995<Pc){sc=(Ch+_h)/2%360;break e}if(10>Hf){var jg=1-Math.abs(.5-Pc);sc=(Ch*jg+_h*(1-jg))%360;break e}}}sc=Ch}if(tu instanceof Qo){var hh="";tu.graduatedFunction!==null?(hh=tu.graduatedFunction(nu,tu),hh=hh!=null?hh.toString():""):hh=(+nu.toFixed(2)).toString(),hh!==""&&wh.push({$l:Rg,angle:sc,text:hh})}else wh.push({$l:Rg,angle:sc})}nu=Jp+ac*lf}}}a.graduatedMarks.push(wh)}di(It);var Os=a.graduatedMarks;if(Os!==null)for(var Qp=E.length,xl=0;xl<Qp;xl++){var Qa=E[xl],Pl=Os[xl];if(Qa.visible&&Qa!==re&&Pl.length!==0){if(Qa instanceof Er){var wc=a,Qc=b,hf=Qa.alignmentFocus;hf.Mc()&&(hf=bl);var Zy=Qa.angle;Qa.Kb=0,Qa.measure(1/0,1/0,0,0),Qa.Kb=Zy;var K0=Qa.measuredBounds,zg=K0.width,cf=K0.height,Wf=gn.allocAt(0,0,zg,cf),Kl=tt.alloc();Kl.xi(Wf,hf),gn.free(Wf);for(var Cc=-Kl.x,Eh=-Kl.y,Ou=new gn,kd=Pl.length,_g=0;_g<kd;_g++)for(var Ad=Pl[_g],V0=Ad.$l.x,Zg=Ad.$l.y,Ra=Ad.angle,ch=0;4>ch;ch++){switch(ch){case 0:Kl.h(Cc,Eh);break;case 1:Kl.h(Cc+zg,Eh);break;case 2:Kl.h(Cc,Eh+cf);break;case 3:Kl.h(Cc+zg,Eh+cf)}Kl.rotate(Ra+Qa.angle),Kl.offset(V0,Zg),_g===0&&ch===0?Ou.h(Kl.x,Kl.y,0,0):Ou.Ye(Kl),Kl.offset(-V0,-Zg),Kl.rotate(-Ra-Qa.angle)}tt.free(Kl),wc.graduatedBounds!==null&&wc.graduatedBounds.push(Ou),ma(Qc,Ou.x,Ou.y,Ou.width,Ou.height)}else if(Qa instanceof Qo){var Yu=a,U0=b;Yu.temporaryTextBlock===null&&(Yu.temporaryTextBlock=new Qo);var iu=Yu.temporaryTextBlock;y1(iu,Qa);var qc=Qa.alignmentFocus;qc.Mc()&&(qc=bl);for(var Xu=Qa.segmentOrientation,Hg=Qa.segmentOffset,Td=new gn,qp=0,Wg=0,Zh=0,df=0,Dd=0,Gg=Pl.length,ed=0;ed<Gg;ed++){var lc=Pl[ed];qp=lc.$l.x,Wg=lc.$l.y,Zh=lc.angle,Dd=df=Qa.angle,Xu!==pl&&(Dd=Xu===wp||Xu===t0?Zh+Qa.angle:Zh,df=Kn.computeAngle(Xu,Dd)),iu.Kb=df,iu.text=lc.text||"",iu.measure(1/0,1/0,0,0);var td=iu.measuredBounds,Ec=iu.naturalBounds,nd=Ec.width,ff=Ec.height,bh=_t.alloc();bh.reset(),bh.translate(-td.x,-td.y),bh.scale(iu.scale,iu.scale),bh.rotate(Dd,nd/2,ff/2),Xu!==Cp&&Xu!==bp||bh.rotate(90,nd/2,ff/2),Xu!==Ep&&Xu!==Mp||bh.rotate(-90,nd/2,ff/2),Xu===n0&&(45<Zh&&135>Zh||225<Zh&&315>Zh)&&bh.rotate(-Zh,nd/2,ff/2);var Gf=gn.allocAt(0,0,nd,ff),id=tt.alloc();id.xi(Gf,qc),bh.Ga(id);var $f=-id.x,Hy=-id.y,bc=tt.alloc();bc.assign(Hg),isNaN(bc.x)&&(bc.x=nd/2+3),isNaN(bc.y)&&(bc.y=-(ff/2+3)),bc.rotate(Zh),qp+=bc.x+$f,Wg+=bc.y+Hy;var gf=new gn(qp,Wg,td.width,td.height),em=new gn(td.x,td.y,td.width,td.height),Wy=new gn(Ec.x,Ec.y,Ec.width,Ec.height);lc.Sz=df,lc.lineCount=iu.lineCount,lc.lines=[iu.Cb,iu.Ih,iu.df,iu.Le,iu.Qc,iu.Qb,iu.ze],lc.actualBounds=gf,lc.measuredBounds=em,lc.naturalBounds=Wy,ed===0?Td.assign(gf):Td.ed(gf),tt.free(bc),tt.free(id),gn.free(Gf),_t.free(bh)}Yu.graduatedBounds!==null&&Yu.graduatedBounds.push(Td),ma(U0,Td.x,Td.y,Td.width,Td.height)}ls(Qa,!1)}}},cp.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var E=a.Pb(),b=a.graduatedMarks;if(b!==null){var z=a.graduatedBounds,ne=0,re=z[ne];ne++,E!==null&&E.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=b[le],ue.visible&&ue!==E&&re.length!==0&&(re=z[ne],ne++,ue.arrange(re.x-x.x,re.y-x.y,re.width,re.height))}a.graduatedBounds=null}}},cp.prototype.gc=function(a,y,x){var E=x.$i;x.$i=!0;var b=a.naturalBounds,z=b.width,ne=b.height;b=y instanceof Jl,y.save(),y.beginPath(),y.rect(-1,-1,z+1,ne+1),y.clip(),y.Se(),z=a.Pb(),z.gc(y,x),ne=a.Df()*x.scale,0>=ne&&(ne=1);for(var re=z.actualBounds,oe=a.O.s,le=a.graduatedMarks,ue=oe.length,pe=0;pe<ue;pe++){var xe=oe[pe],Ee=le[pe],Fe=Ee.length;if(xe.visible&&xe!==z&&Ee.length!==0){if(xe instanceof Er){if(!(2>a.graduatedTickUnit*xe.interval*z.geometry.flattenedTotalLength/a.graduatedRange*ne&&xe.graduatedSkip===null)){var Oe=xe.measuredBounds,at=xe.strokeWidth*xe.scale,Xe=xe.alignmentFocus;Xe.Mc()&&(Xe=bl);for(var pt=0;pt<Fe;pt++){var wt=Ee[pt].$l,Mt=Ee[pt].angle,It=Xe,qt=xe.Ab;qt.reset(),qt.translate(wt.x+re.x,wt.y+re.y),qt.rotate(Mt+xe.angle,0,0),qt.translate(-Oe.width*It.x+It.offsetX+at/2,-Oe.height*It.y+It.offsetY+at/2),qt.scale(xe.scale,xe.scale),Wu(xe,!1),xe.wh.set(xe.Ab),xe.Kk=xe.scale,Fu(xe,!1),xe.gc(y,x),b&&(a.svg.appendChild(xe.svg),xe.svg=null),xe.Ab.reset()}}}else if(xe instanceof Qo)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Qo),Oe=a.temporaryTextBlock,y1(Oe,xe),at=0;at<Fe;at++)Xe=Ee[at],Xe.actualBounds&&Xe.measuredBounds&&Xe.naturalBounds&&(Oe.ec=Xe.text||"",Oe.Kb=Xe.Sz||0,Oe.Gc=Xe.lineCount||0,pt=Xe.lines,pt!==void 0&&(Oe.Cb=pt[0],Oe.Ih=pt[1],Oe.df=pt[2],Oe.Le=pt[3],Oe.Qc=pt[4],Oe.Qb=pt[5],Oe.ze=pt[6]),Xe.naturalBounds&&(Oe.dc=Xe.naturalBounds),Xe.actualBounds&&(pt=Xe.actualBounds,Oe.arrange(pt.x,pt.y,pt.width,pt.height)),pt=Xe.actualBounds,Oe.arrange(pt.x,pt.y,pt.width,pt.height),wt=Xe.measuredBounds,Xe=Xe.naturalBounds,Mt=Oe.Ab,Mt.reset(),Mt.translate(pt.x+re.x,pt.y+re.y),Mt.translate(-wt.x,-wt.y),Oe.no(Mt,Xe.x,Xe.y,Xe.width,Xe.height),Wu(Oe,!1),Oe.wh.set(Oe.Ab),Oe.Kk=Oe.scale,Fu(Oe,!1),Oe.Ng=xe.part,Oe.Me=xe.panel,Oe.gc(y,x),Oe.Me=null,Oe.Ng=null,b&&(a.svg.appendChild(Oe.svg),Oe.svg=null))}}x.$i=E,y.restore(),y.Vc(!0)};function Hn(a,y){if(Rt.call(this),this.na=null,a===void 0)this.na=Hn.Position;else if(typeof a=="string"){var x=rh.I(a);x!==null&&(this.na=x)}else a instanceof gs?this.na=a:a&&(this.na=Hn.Position,y=a);this.na===null&&yt("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===Hn.Grid?1048576:0),this.O=new Nn,this.yb=bs,this.Tm=Co,this.Uf=vr,this.$g=null,this.$e="",this.jg=new gn(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=Ci,this.jn=yo,this.kn=uo,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Ot(Hn,Rt),Hn.prototype.cloneProtected=function(a){Rt.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},Hn.prototype.Af=function(a){Rt.prototype.Af.call(this,a),a.O=this.O;for(var y=a.O.s,x=y.length,E=0;E<x;E++)y[E].Me=a;a.$g=null},Hn.prototype.copy=function(){var a=Rt.prototype.copy.call(this);if(a!==null){for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E].copy();b.wi(a),b.Ng=null;var z=a.O,ne=z.count;if(z.Gb(ne,b),z=a.part,z!==null){z.Rh=null,b.portId!==null&&z instanceof oi&&(z.Te=!0);var re=a.diagram;re!==null&&re.undoManager.isUndoingRedoing||z.cb(ko,"elements",a,null,b,null,ne)}}return a}return null},Le=Hn.prototype,Le.toString=function(){return"Panel("+this.type.name+")#"+Bi(this)},Le.Pn=function(a){Rt.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,E=0;E<x;E++)y[E].Pn(a)},Le.hh=function(a,y){if(this.na===Hn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===Hn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===Hn.Table)if(a.yc(),a instanceof Jl){var x=a.yd;a.yd=fm(a,"gojs-ts"),gv(this,a),a.nh.pop(),a.yd=x}else gv(this,a);(x=this.isClipping&&this.na===Hn.Spot)&&a.save();for(var E=this.Pb(),b=this.O.s,z=b.length,ne=0;ne<z;ne++){var re=b[ne];x&&re===E&&(a.clipInsteadOfFill=!0),re.gc(a,y),x&&re===E&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function gv(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,E=0<a.columnCount?a.colDefs:null;x!==null&&Lm(a,y,!0,x,!0),E!==null&&Lm(a,y,!1,E,!0),x!==null&&r1(a,y,!0,x),E!==null&&r1(a,y,!1,E),x!==null&&Lm(a,y,!0,x,!1),E!==null&&Lm(a,y,!1,E,!1)}function r1(a,y,x,E){for(var b=E.length,z=a.actualBounds,ne=a.naturalBounds,re=!0,oe=0;oe<b;oe++){var le=E[oe];if(le!==void 0&&le.actual!==0)if(re)re=!1;else{if(x){if(le.position>ne.height)continue}else if(le.position>ne.width)continue;var ue=le.separatorStrokeWidth;isNaN(ue)&&(ue=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var pe=le.separatorStroke;if(pe===null&&(pe=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ue!==0&&pe!==null){Da(a,y,pe,!1,!1,ne,z),pe=!1;var xe=le.separatorDashArray;xe===null&&(xe=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),xe!==null&&(pe=!0,y.js(xe,0)),y.beginPath(),xe=le.position+ue,x?xe>ne.height&&(ue-=xe-ne.height):xe>ne.width&&(ue-=xe-ne.width),le=le.position+ue/2,y.lineWidth=ue,ue=a.yb,x?(le+=ue.top,xe=ne.width-ue.right,y.moveTo(ue.left,le),y.lineTo(xe,le)):(le+=ue.left,xe=ne.height-ue.bottom,y.moveTo(le,ue.top),y.lineTo(le,xe)),y.stroke(),y.Se(),pe&&y.fs()}}}}function Lm(a,y,x,E,b){for(var z=E.length,ne=a.actualBounds,re=a.naturalBounds,oe=o1(a,!0),le=o1(a,!1),ue=0;ue<z;ue++){var pe=E[ue];if(pe!==void 0&&pe.background!==null&&pe.coversSeparators!==b&&pe.actual!==0){var xe=x?ne.height:ne.width;if(!(pe.position>xe)){var Ee=pe.Wc(),Fe=pe.separatorStrokeWidth;isNaN(Fe)&&(Fe=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Oe=pe.separatorStroke;Oe===null&&(Oe=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(Oe===null||pe.index===(x?oe:le))&&(Fe=0),Ee-=Fe,Fe=pe.position+Fe,Ee+=pe.actual,Fe+Ee>xe&&(Ee=xe-Fe),0>=Ee||(xe=a.yb,Da(a,y,pe.background,!0,!1,re,ne),x?y.fillRect(xe.left,Fe+xe.top,ne.width-(xe.left+xe.right),Ee):y.fillRect(Fe+xe.left,xe.top,Ee,ne.height-(xe.top+xe.bottom)))}}}}function o1(a,y){for(var x=y?a.rowCount:a.columnCount,E=0;E<x;E++){var b=y?a.rowDefs[E]:a.colDefs[E];if(b!==void 0)return b.index}return 0}function pv(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(!Rt.prototype.kk.call(this,a,y,x))return!1;if(this.type===Hn.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,gv(this,a),a.yd=null;else if(this.na===Hn.Grid||this.na===Hn.Graduated)return this.svg.innerHTML="",this.svg.remove(),!1;x=this.O.s;for(var E=x.length,b=0;b<E;b++)x[b].gc(a,y);return!0},Le.nk=function(){return!0},Le.$o=function(a,y,x,E){if(!this.isClipping)if(this.Dd()&&a.bk!==null){a=a.bk,y=this.O.s;for(var b=0,z=0,ne=0;ne<y.length;ne++)if(y[ne].Ed()){var re=y[ne].actualBounds;b=ne===0?re.x:Math.min(re.x,b),z=ne===0?re.y:Math.min(re.y,z)}E.setAttributeNS(null,"clip-path","path('M "+(a.x-x.x-b)+","+(a.y-x.y-z)+" l "+a.width+" 0 l 0 "+a.height+" l -"+a.width+" 0 z')")}else Rt.prototype.$o.call(this,a,y,x,E)},Le.Sj=function(a,y,x,E,b){var z=this.se(),ne=this.transform,re=1/(ne.m11*ne.m22-ne.m12*ne.m21),oe=ne.m22*re,le=-ne.m12*re,ue=-ne.m21*re,pe=ne.m11*re,xe=re*(ne.m21*ne.dy-ne.m22*ne.dx),Ee=re*(ne.m12*ne.dx-ne.m11*ne.dy);if(this.areaBackground!==null)return ne=this.actualBounds,it.Ff(ne.left,ne.top,ne.right,ne.bottom,a,y,x,E,b);if(this.background!==null)return z=a*oe+y*ue+xe,re=a*le+y*pe+Ee,a=x*oe+E*ue+xe,oe=x*le+E*pe+Ee,b.h(0,0),x=this.naturalBounds,z=it.Ff(0,0,x.width,x.height,z,re,a,oe,b),b.transform(ne),z;z||(oe=1,ue=le=0,pe=1,Ee=xe=0),re=a*oe+y*ue+xe,a=a*le+y*pe+Ee,oe=x*oe+E*ue+xe,x=x*le+E*pe+Ee,b.h(oe,x),E=(oe-re)*(oe-re)+(x-a)*(x-a),le=!1,pe=this.O.s,Ee=pe.length,ue=tt.alloc(),xe=null,y=1/0;var Fe=null,Oe=this.isClipping&&this.na===Hn.Spot;Oe&&(Fe=tt.alloc(),xe=this.Pb(),(le=xe.Sj(re,a,oe,x,Fe))&&(y=(re-Fe.x)*(re-Fe.x)+(a-Fe.y)*(a-Fe.y)));for(var at=0;at<Ee;at++){var Xe=pe[at];Xe.visible&&Xe!==xe&&Xe.Sj(re,a,oe,x,ue)&&(le=!0,Xe=(re-ue.x)*(re-ue.x)+(a-ue.y)*(a-ue.y),Xe<E&&(E=Xe,b.set(ue)))}return Oe&&(y>E&&b.set(Fe),tt.free(Fe)),tt.free(ue),z&&b.transform(ne),le},Le.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();Rt.prototype.Gj.call(this)},Le.v=function(a){if(!fu(this)){Rt.prototype.v.call(this,a),a=null,(this.na===Hn.Auto||this.na===Hn.Link)&&(a=this.Pb());for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];if((b===a||b.isPanelMain)&&b.v(!0),!b.desiredSize.w()){var z=Bl(b,!1);(b instanceof gl||b instanceof Hn||b instanceof Qo||z!==In)&&b.v(!0)}}}},Le.Uj=function(){if(!fu(this)){ls(this,!0),Yh(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)){Wu(this,!0),Fu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},Le.Wu=function(){Fu(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,E){var b=this.jg;b.h(0,0,0,0);var z=this.desiredSize,ne=this.minSize;x===void 0&&(x=ne.width,E=ne.height),x=Math.max(x,ne.width),E=Math.max(E,ne.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(E,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,b,x,E),a=b.width+oe.left+oe.right,oe=b.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(ne.width,a),oe=Math.max(ne.height,oe),a=Math.max(x,a),oe=Math.max(E,oe),Oa(b,a,oe),Oa(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 E=a[x];if(E.isPanelMain===!0)return this.$g=E}this.$g=a[0]}return this.$g};function vc(a){return a.part!==null?a.part.locationObject:null}Le.eh=function(a,y,x,E){var b=this.O.s;if(this.actualBounds.h(a,y,x,E),b.length!==0){if(!this.desiredSize.w()){a=Bl(this,!0);var z=this.measuredBounds;y=z.width,z=z.height;var ne=this.Kg,re=ne.left+ne.right;switch(ne=ne.top+ne.bottom,y===x&&z===E&&(a=In),a){case In:(y>x||z>E)&&(this.v(),this.measure(y>x?x:y,z>E?E:z,0,0));break;case zn:this.v(!0),this.measure(x+re,E+ne,0,0);break;case Ti:this.v(!0),this.measure(x+re,z+ne,0,0);break;case Zi:this.v(!0),this.measure(y+re,E+ne,0,0)}}this.na.arrange(this,b,this.jg)}},Le.gh=function(a){var y=this.naturalBounds,x=vc(this);if(Fo(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var E=y.length,b=tt.allocAt(0,0);E--;){var z=y[E];if((z.visible||z===x)&&(jr(b.set(a),z.transform),z.ca(b)))return tt.free(b),!0}return tt.free(b),!(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,E=0;E<x;E++){var b=y[E].ks(a);if(b!==null)return b}return null},Le.qm=function(a,y){if(y(this,a),a instanceof Hn){a=a.O.s;for(var x=a.length,E=0;E<x;E++)this.qm(a[E],y)}};function qd(a,y){a1(a,a,y)}function a1(a,y,x){x(y),y=y.O.s;for(var E=y.length,b=0;b<E;b++){var z=y[b];z instanceof Hn&&a1(a,z,x)}}function vx(a,y){s1(a,a,y)}function s1(a,y,x){if(x(y),y instanceof Hn){y=y.O.s;for(var E=y.length,b=0;b<E;b++)s1(a,y[b],x)}}Le.Nl=function(a){return l1(this,this,a)};function l1(a,y,x){if(x(y))return y;if(y instanceof Hn){y=y.O.s;for(var E=y.length,b=0;b<E;b++){var z=l1(a,y[b],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=dp(this));for(var E=0;E<x;E++){var b=y[E];if(b instanceof Hn){var z=b.fb(a);if(z!==null)return z}if(b.name===a)return b}return null};function u1(a){a=a.O.s;for(var y=a.length,x=0,E=0;E<y;E++){var b=a[E];b instanceof Hn?x=Math.max(x,u1(b)):b instanceof Er&&(x=Math.max(x,b.ig/2*b.strokeMiterLimit*b.Df()))}return x}Le.se=function(){return!(this.type===Hn.TableRow||this.type===Hn.TableColumn)};function zc(a){return a.type===Hn.TableRow||a.type===Hn.TableColumn}Le.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),dl(this)))return null;var E=this.naturalBounds,b=1/this.Df(),z=this.se(),ne=z?a:jr(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),Fo(-(le*b),-(le*b),E.width+oe*b,E.height+oe*b,ne.x,ne.y)){if(!this.isAtomic){b=this.O.s;var ue=b.length;if(re=tt.alloc(),le=(oe=this.isClipping&&this.na===Hn.Spot)?this.Pb():null,oe&&(le.se()?jr(re.set(a),le.transform):re.set(a),!le.ca(re)))return tt.free(re),z||tt.free(ne),null;for(var pe=vc(this);ue--;){var xe=b[ue];if((xe.visible||xe===pe)&&(xe.se()?jr(re.set(a),xe.transform):re.set(a),!oe||xe!==le)){var Ee=null;if(xe instanceof Hn?Ee=xe.ic(re,y,x):xe.pickable===!0&&xe.ca(re)&&(Ee=xe),Ee!==null&&(y!==null&&(Ee=y(Ee)),Ee!==null&&(x===null||x(Ee))))return tt.free(re),z||tt.free(ne),Ee}}tt.free(re)}return this.background===null&&this.areaBackground===null?(z||tt.free(ne),null):(a=Fo(0,0,E.width,E.height,ne.x,ne.y)?this:null,z||tt.free(ne),a)}return z||tt.free(ne),null},Le.ji=function(a,y,x,E){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var b=this.naturalBounds,z=this.se(),ne=z?a:jr(tt.allocAt(a.x,a.y),this.transform);if(b=Fo(0,0,b.width,b.height,ne.x,ne.y),zc(this)||b){if(!this.isAtomic){for(var re=this.O.s,oe=re.length,le=tt.alloc(),ue=vc(this);oe--;){var pe=re[oe];if(pe.visible||pe===ue){pe.se()?jr(le.set(a),pe.transform):le.set(a);var xe=pe;pe=pe instanceof Hn?pe:null,(pe!==null?pe.ji(le,y,x,E):xe.ca(le))&&xe.pickable!==!1&&(y!==null&&(xe=y(xe)),xe===null||x!==null&&!x(xe)||E.add(xe))}}tt.free(le)}return z||tt.free(ne),b&&(this.background!==null||this.areaBackground!==null)}return z||tt.free(ne),!1},Le.Cf=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var ne=z;if(z===void 0&&(ne=_t.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return mv(this,y,x,b),z===void 0&&_t.free(ne),!0;if(this.Yc(a,ne)){if(!this.isAtomic)for(var re=vc(this),oe=this.O.s,le=oe.length;le--;){var ue=oe[le];if(ue.visible||ue===re){var pe=ue.actualBounds,xe=this.naturalBounds;pe.x>xe.width||pe.y>xe.height||0>pe.x+pe.width||0>pe.y+pe.height||(pe=ue,ue=ue instanceof Hn?ue:null,xe=_t.alloc(),xe.set(ne),(ue!==null?ue.Cf(a,y,x,E,b,xe):Ss(pe,a,E,xe))&&(y!==null&&(pe=y(pe)),pe===null||x!==null&&!x(pe)||b.add(pe)),_t.free(xe))}}return z===void 0&&_t.free(ne),E}return z===void 0&&_t.free(ne),!1};function mv(a,y,x,E){for(var b=a.O.s,z=b.length;z--;){var ne=b[z];if(ne.visible){var re=ne.actualBounds,oe=a.naturalBounds;re.x>oe.width||re.y>oe.height||0>re.x+re.width||0>re.y+re.height||(ne instanceof Hn&&mv(ne,y,x,E),y!==null&&(ne=y(ne)),ne===null||x!==null&&!x(ne)||E.add(ne))}}}Le.og=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;x===void 0&&(x=null),E===void 0&&(E=null);var ne=this.naturalBounds,re=this.se(),oe=re?a:jr(tt.allocAt(a.x,a.y),this.transform),le=re?y:jr(tt.allocAt(y.x,y.y),this.transform),ue=oe.Bf(le),pe=0<oe.x&&oe.x<ne.width&&0<oe.y&&oe.y<ne.height||To(oe.x,oe.y,0,0,0,ne.height)<=ue||To(oe.x,oe.y,0,ne.height,ne.width,ne.height)<=ue||To(oe.x,oe.y,ne.width,ne.height,ne.width,0)<=ue||To(oe.x,oe.y,ne.width,0,0,0)<=ue;if(ne=oe.zd(0,0)<=ue&&oe.zd(0,ne.height)<=ue&&oe.zd(ne.width,0)<=ue&&oe.zd(ne.width,ne.height)<=ue,re||(tt.free(oe),tt.free(le)),pe){if(!this.isAtomic){oe=tt.alloc(),le=tt.alloc(),ue=vc(this);for(var xe=this.O.s,Ee=xe.length;Ee--;){var Fe=xe[Ee];if(Fe.visible||Fe===ue){var Oe=Fe.actualBounds,at=this.naturalBounds;(!re||!(Oe.x>at.width||Oe.y>at.height||0>Oe.x+Oe.width||0>Oe.y+Oe.height))&&(Fe.se()?(Oe=Fe.transform,jr(oe.set(a),Oe),jr(le.set(y),Oe)):(oe.set(a),le.set(y)),Oe=Fe,Fe=Fe instanceof Hn?Fe:null,(Fe!==null?Fe.og(oe,le,x,E,b,z):Oe.tx(oe,le,b))&&(x!==null&&(Oe=x(Oe)),Oe===null||E!==null&&!E(Oe)||z.add(Oe)))}}tt.free(oe),tt.free(le)}return b?pe:ne}return!1};function vv(a){var y=null;return a instanceof Er&&(y=a.spot1,y===Co&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=cs),y}function yv(a){var y=null;return a instanceof Er&&(y=a.spot2,y===Co&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=ys),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 Oi&&yt("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&yt("Cannot make a Panel contain itself: "+this.toString()),yt("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&yt("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+y.toString()+", already contained by "+x.toString()+", cannot be shared by this Panel: "+this.toString()),this.na!==Hn.Grid||y instanceof Er||yt("Can only add Shapes to a Grid Panel, not: "+y),this.na!==Hn.Graduated||y instanceof Er||y instanceof Qo||yt("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+y),y.wi(this),y.Ng=null,this.itemArray!==null){var E=y.data;E!==null&&typeof E=="object"&&(this.ge===null&&(this.ge=new xi),this.ge.add(E,y))}var b=this.O;if(E=-1,x===this){for(var z=-1,ne=this.O.s,re=ne.length,oe=0;oe<re;oe++)if(ne[oe]===y){z=oe;break}if(z!==-1){if(z===a||z+1>=b.count&&a>=b.count)return;b.mb(z),E=z}else yt("element "+y.toString()+" has panel "+x.toString()+" but is not contained by it.")}(0>a||a>b.count)&&(a=b.count),b.Gb(a,y),(a===0||y.isPanelMain)&&(this.$g=null),fu(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof Hn&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||Bm(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof oi&&(x.Te=!0),x.Te&&x instanceof oi&&(x.wc=null),b=this.diagram,b!==null&&b.undoManager.isUndoingRedoing||(E!==-1&&x.cb(Yo,"elements",this,y,null,E,null),x.cb(ko,"elements",this,null,y,null,a)))};function Sv(a,y){a.l=y?a.l|16777216:a.l&-16777217}Le.remove=function(a){for(var y=this.O.s,x=y.length,E=-1,b=0;b<x;b++)if(y[b]===a){E=b;break}E!==-1&&this.pc(E,!0)},Le.mb=function(a){0<=a&&this.pc(a,!0)},Le.pc=function(a,y){var x=this.O,E=x.M(a);if(E.Ng=null,E.wi(null),this.ge!==null){var b=E.data;typeof b=="object"&&this.ge.remove(b)}x.mb(a),ls(this,!1),this.v(),this.$g===E&&(this.$g=null),this.graduatedIntervals=null;var z=this.part;z!==null&&(z.Rh=null,z.ag=NaN,z.Wb(),z instanceof oi&&(E instanceof Hn?E.qm(E,function(ne,re){Hv(z,re,y)}):Hv(z,E,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||z.cb(Yo,"elements",this,E,null,a,null))},Le.Fb=function(a){0>a&&On(a,">= 0",Hn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new us;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(ko,"rowdefs",this,null,x,null,a)}return y[a]},Le.oA=function(a){if(0>a&&On(a,">= 0",Hn,"removeRowDefinition:idx"),this.rowCount!==0){a=Math.round(a);var y=this.rowDefs,x=y[a];if(x){y[a]=void 0;for(var E=y.length-1;0<=E&&y[E--]===void 0;)y.length--;this.cb(Yo,"rowdefs",this,x,null,a,null),this.v()}}};function h1(a,y,x){var E=a.rowDefs;if(!(0>y)){if(E[y]=x instanceof us?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}Le.Eb=function(a){0>a&&On(a,">= 0",Hn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new us;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(ko,"coldefs",this,null,x,null,a)}return y[a]},Le.jA=function(a){if(0>a&&On(a,">= 0",Hn,"removeColumnDefinition:idx"),this.columnCount!==0){a=Math.round(a);var y=this.colDefs,x=y[a];if(x){y[a]=void 0;for(var E=y.length-1;0<=E&&y[E--]===void 0;)y.length--;this.cb(Yo,"coldefs",this,x,null,a,null),this.v()}}};function c1(a,y,x){var E=a.colDefs;if(!(0>y)){if(E[y]=x instanceof us?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.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&&Nm(y,a),this},Le.Hy=function(a,y){return(a=this.Fb(a))&&Nm(a,new us(y)),this},Le.By=function(a,y){return(a=this.Eb(a))&&Nm(a,new us(y)),this},Le.nz=function(a){if(0>a||this.type!==Hn.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,E=x.length,b=this.topIndex;b<E;b++){var z=x[b];if(z!==void 0&&(y+=z.total,a<y))break}return b},Le.fz=function(a){if(0>a||this.type!==Hn.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,E=x.length,b=this.leftIndex;b<E;b++){var z=x[b];if(z!==void 0&&(y+=z.total,a<y))break}return b},Le.Fz=function(a,y){if(y===void 0&&(y=new tt(NaN,NaN)),this.type!==Hn.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!==Hn.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function d1(a){return a=a.allBindings,a!==null&&a._isFrozen}function $u(a){var y=a.allBindings;if(y===null)a.data!==null&&yt("Template cannot have .data be non-null: "+a),a.allBindings=y=new Nn;else if(y._isFrozen)return;var x=new Nn;Sv(a,!1),a.qm(a,function(le,ue){ue.th();var pe=ue.localBindings;if(pe!==null)for(bf(ue,!1),pe=pe.iterator;pe.next();){var xe=pe.value;xe.mode===Dp&&bf(ue,!0);var Ee=xe.sourceName;Ee!==null&&(Ee==="/"&&Sv(le,!0),Ee=MS(xe,le,ue),Ee!==null&&(x.add(Ee),Ee.srcBindings===null&&(Ee.srcBindings=new Nn),Ee.srcBindings.add(xe))),y.add(xe)}if(ue instanceof Hn&&ue.type===Hn.Table){if(0<ue.rowCount){for(le=ue.rowDefs,pe=le.length,xe=0;xe<pe;xe++)if(Ee=le[xe],Ee!==void 0&&Ee.be!==null)for(var Fe=Ee.be.iterator;Fe.next();){var Oe=Fe.value;Oe.xd=Ee,Oe.to=2,Oe.wl=Ee.index,y.add(Oe)}}if(0<ue.columnCount){for(ue=ue.colDefs,le=ue.length,pe=0;pe<le;pe++)if(xe=ue[pe],xe!==void 0&&xe.be!==null)for(Ee=xe.be.iterator;Ee.next();)Fe=Ee.value,Fe.xd=xe,Fe.to=1,Fe.wl=xe.index,y.add(Fe)}}});for(var E=x.iterator;E.next();){var b=E.value;if(b.srcBindings!==null){bf(b,!0);for(var z=b.srcBindings.iterator;z.next();){var ne=z.value;b.localBindings===null&&(b.localBindings=new Nn),b.localBindings.add(ne)}}b.srcBindings=null}for(E=y.iterator;E.next();)if(b=E.value,z=b.xd,z!==null){b.xd=null;var re=b.targetProperty,oe=re.indexOf(".");0<oe&&z instanceof Hn&&(ne=re.substring(0,oe),re=re.substr(oe+1),oe=z.fb(ne),oe!==null?(z=oe,b.targetProperty=re):ri('Warning: unable to find GraphObject named "'+ne+'" for Binding: '+b.toString())),z instanceof us?(ne=Bi(z.panel),b.Ai=ne===void 0?-1:ne,z.panel.bindingId=b.Ai):z instanceof Rt?(ne=Bi(z),b.Ai=ne===void 0?-1:ne,z.bindingId=b.Ai):yt("Unknown type of binding target: "+z)}y.freeze(),a instanceof Oi&&a.Zc()&&a.Va()}Le.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return vx(y,function(x){x instanceof Hn&&(x.allBindings=null,x.ub=null);var E=x.localBindings;E!==null&&(x.localBindings=null,E.each(function(b){x.bind(b.copy())})),E=x.animationTriggers,E!==null&&(x.animationTriggers=null,E.each(function(b){x.Jv(b.value.copy())}))}),a&&$u(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,E=x.sourceProperty;if((a===""||E===""||E===a)&&(E=x.targetProperty,x.converter!==null||E!=="")){E=this.data;var b=x.sourceName;if(b!==null){if(b==="")E=this;else if(b==="/")E=this;else if(b===".")E=this;else if(b==="..")E=this;else if(E=this.fb(b),E===null)continue}else if(x.isToModel)if(E=this.diagram,E!==null)E=E.model.modelData;else continue;var z=this,ne=x.Ai;if(ne!==-1){if(z=this.ks(ne),z===null)continue}else x.xd!==null&&(z=x.xd);if(b==="/"?E=z.part:b==="."?E=z:b===".."&&(E=z.panel),b=x.to,b!==0){if(!(z instanceof Hn))continue;b===1?z=z.Eb(x.wl):b===2&&(z=z.Fb(x.wl))}z!==void 0&&x.Mv(z,E)}}},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,E=y.length,b=0,z=null;b<x&&(z=a[b],!(z instanceof Hn&&z.data!==null));)b++,z=a[b];if(x-b!==E)return!0;if(z===null)return 0<E;for(var ne=0;b<x&&ne<E;){if(z=a[b],!(z instanceof Hn)||z.data!==y[ne])return!0;b++,ne++}return!1}function dp(a){if(a.type===Hn.Spot||a.type===Hn.Auto)return Math.min(a.O.length,1);if(a.type===Hn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var E=a.M(x);if(!(E instanceof Er&&E.isPanelMain))break}return x}return a.type===Hn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof Hn&&zc(a))?1:0}Le.mv=function(){for(var a=dp(this);this.O.length>a;)this.pc(this.O.length-1,!1);f1(this,this.itemArray)};function f1(a,y){var x=dp(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 E=0;E<x;E++)Fm(a,y[E],E,!0)}else{E=x;for(var b=0;b<y.length;b++,E++){var z=y[b],ne=E<a.O.length?a.O.M(E):null;if(ne instanceof Hn){if(ne.data!==z){var re=Pv(a,ne.data),oe=Pv(a,z),le=oe!==re;le||(re=wv(a,re),le=wv(a,oe)!==re),le?(a.pc(E,!1),Fm(a,z,b,!1)):ne.data=z}}else Fm(a,z,b,!1)}for(;E<a.O.length;)a.pc(E,!1);a.$g=null,xv(a,x,0),fu(a)||a.v(),a.graduatedIntervals=null,a.If()||Bm(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof oi&&(y.Te=!0),y.Te&&y instanceof oi&&(y.wc=null))}}function Fm(a,y,x,E){if(!(y==null||0>x)){var b=Pv(a,y);if(b=wv(a,b),b!==null){if($u(b),b=b.copy(),b.l&16777216){var z=a.ih();z!==null&&Sv(z,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new xi),a.ge.add(y,b)),z=x+dp(a),a.Gb(z,b),E&&(b.ub=y,xv(a,z,x),b.ub=null),b.data=y}}}function xv(a,y,x){for(a=a.O;y<a.length;){var E=a.M(y);if(E instanceof Hn){var b=y,z=x;E.type===Hn.TableRow?E.row=b:E.type===Hn.TableColumn&&(E.column=b),E.itemIndex=z}y++,x++}}function Pv(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=Wa(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;yt("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function wv(a,y){var x=a.itemTemplateMap,E=null;return x!==null&&(E=x.I(y)),E===null&&(x!==null&&(E=x.I("")),E===null&&(g1||(g1=!0,ri('No item template Panel found for category "'+y+'" on '+a),ri(" Using default item template."),a=new Hn,y=new Qo,y.bind(new Xa("text","",Ai)),a.add(y),p1=a),E=p1)),E}function Bm(a,y,x){var E=y.enabledChanged;if(E!==null&&E(y,x),y instanceof Hn){y=y.O.s,E=y.length;for(var b=0;b<E;b++){var z=y[b];x&&z instanceof Hn&&!z.isEnabled||Bm(a,z,x)}}}function Ih(a,y){y.name=a,rh.add(a,y)}Ve.Object.defineProperties(Hn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===Hn.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&&On(a,">= 0",Hn,"padding"),a=new Di(a)):(0>a.left&&On(a.left,">= 0",Hn,"padding:value.left"),0>a.right&&On(a.right,">= 0",Hn,"padding:value.right"),0>a.top&&On(a.top,">= 0",Hn,"padding:value.top"),0>a.bottom&&On(a.bottom,">= 0",Hn,"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:bs},set:function(a){typeof a=="number"&&(a=new Di(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new ku),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 Ao)&&(a instanceof Ao&&a.freeze(),this.T===null&&(this.T=new ku),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 ku),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,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||yt("defaultRowSeparatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.T===null&&(this.T=new ku),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 Ao)&&(a instanceof Ao&&a.freeze(),this.T===null&&(this.T=new ku),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 ku),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,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||yt("defaultColumnSeparatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.T===null&&(this.T=new ku),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 ku),this.T.nb=a}},viewboxStretch:{get:function(){return this.xo},set:function(a){var y=this.xo;y!==a&&(this.xo=a,this.v(),this.g("viewboxStretch",y,a))}},gridCellSize:{get:function(){return this.jn},set:function(a){var y=this.jn;if(!y.D(a)){a.w()&&a.width!==0&&a.height!==0||yt("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Th(x),this.N(),this.g("gridCellSize",y,a)}}},gridOrigin:{get:function(){return this.kn},set:function(a){var y=this.kn;if(!y.D(a)){a.w()||yt("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Th(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 yc),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),Zs(this)&&(a=this.part,a!==null&&oa(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 yc),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),Zs(this)&&(a=this.part,a!==null&&oa(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 yc),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 yc),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 yc,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 yc,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 yc,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 yc,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 ku),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new ku),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:Am},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new ku),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:Am},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new ku),this.T.j=a,this.v(),this.g("columnSizing",y,a))}},topIndex:{get:function(){return this.T!==null?this.T.Hb:0},set:function(a){var y=this.topIndex;y!==a&&((!isFinite(a)||0>a)&&yt("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new ku),this.T.Hb=a,this.v(),this.g("topIndex",y,a))}},leftIndex:{get:function(){return this.T!==null?this.T.hb:0},set:function(a){var y=this.leftIndex;y!==a&&((!isFinite(a)||0>a)&&yt("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new ku),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 Oi&&!(this instanceof lo);$u(this),this.ub=a;var E=this.diagram;E!==null&&(x?(x=E.partManager,this instanceof Kn?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof Oi&&(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),E!==null&&E.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 Mf),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&&ly(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&sy(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||f1(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 xi}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof Oi||a.isPanelMain)&&yt("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.itemTemplateMap.add("",a),this.g("itemTemplate",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.mv())}},itemTemplateMap:{get:function(){return this.A!==null?this.A.Pc:null},set:function(a){var y=this.itemTemplateMap;if(y!==a){for(var x=a.iterator;x.next(););Lr(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&&(Lr(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 gr&&(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&&Bm(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))}}}),Ve.Object.defineProperties(Hn,{Position:{get:function(){return rh.I("Position")}},Horizontal:{get:function(){return rh.I("Horizontal")}},Vertical:{get:function(){return rh.I("Vertical")}},Spot:{get:function(){return rh.I("Spot")}},Auto:{get:function(){return rh.I("Auto")}},Table:{get:function(){return rh.I("Table")}},Viewbox:{get:function(){return rh.I("Viewbox")}},TableRow:{get:function(){return rh.I("TableRow")}},TableColumn:{get:function(){return rh.I("TableColumn")}},Link:{get:function(){return rh.I("Link")}},Grid:{get:function(){return rh.I("Grid")}},Graduated:{get:function(){return rh.I("Graduated")}}}),Hn.prototype.rebuildItemElements=Hn.prototype.mv,Hn.prototype.findItemPanelForData=Hn.prototype.sx,Hn.prototype.updateTargetBindings=Hn.prototype.La,Hn.prototype.copyTemplate=Hn.prototype.Uy,Hn.prototype.graduatedValueForPoint=Hn.prototype.Gz,Hn.prototype.graduatedPointForValue=Hn.prototype.Fz,Hn.prototype.findColumnForLocalX=Hn.prototype.fz,Hn.prototype.findRowForLocalY=Hn.prototype.nz,Hn.prototype.addColumnDefinition=Hn.prototype.By,Hn.prototype.addRowDefinition=Hn.prototype.Hy,Hn.prototype.addRowColumnDefinition=Hn.prototype.Gy,Hn.prototype.removeColumnDefinition=Hn.prototype.jA,Hn.prototype.getColumnDefinition=Hn.prototype.Eb,Hn.prototype.removeRowDefinition=Hn.prototype.oA,Hn.prototype.getRowDefinition=Hn.prototype.Fb,Hn.prototype.removeAt=Hn.prototype.mb,Hn.prototype.remove=Hn.prototype.remove,Hn.prototype.insertAt=Hn.prototype.Gb,Hn.prototype.elt=Hn.prototype.M,Hn.prototype.add=Hn.prototype.add,Hn.prototype.findObject=Hn.prototype.fb,Hn.prototype.findInVisualTree=Hn.prototype.Nl,Hn.prototype.walkVisualTreeFrom=Hn.prototype.qm,Hn.prototype.findMainElement=Hn.prototype.Pb;var g1=!1,p1=null,rh=new xi;Hn.className="Panel",Hn.definePanelLayout=Ih,Ih("Position",new mm),Ih("Vertical",new ym),Ih("Auto",new xm),Ih("Link",new Mm);function yc(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}yc.prototype.copy=function(){var a=new yc;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},yc.className="GradPanelSettings";function ku(){this.Pc=[],this.Oc=[],this.j=this.ob=Am,this.hb=this.Hb=0,this.Qp=bs,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}ku.prototype.copy=function(a){for(var y=new ku,x=this.Pc,E=x.length,b=y.Pc,z=0;z<E;z++)if(x[z]!==void 0){var ne=x[z].copy();ne.wi(a),b[z]=ne}for(x=this.Oc,E=x.length,b=y.Oc,z=0;z<E;z++)x[z]!==void 0&&(ne=x[z].copy(),ne.wi(a),b[z]=ne);return y.ob=this.ob,y.j=this.j,y.Hb=this.Hb,y.hb=this.hb,y.Qp=this.Qp.J(),y.Ha=this.Ha,y.ia=this.ia,y.V=this.V,y.F=this.F,y.u=this.u,y.o=this.o,y.nb=this.nb,y},ku.className="TablePanelSettings";function us(a){Zr(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=Co,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Cv,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))}us.prototype.copy=function(){var a=new us;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=hi(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function Nm(a,y){y.isRow?a.height=y.height:a.width=y.width,a.minimum=y.minimum,a.maximum=y.maximum,a.alignment=y.alignment,a.stretch=y.stretch,a.sizing=y.sizing,a.dg=y.separatorPadding===null?null:y.separatorPadding.J(),a.separatorStroke=y.separatorStroke,a.separatorStrokeWidth=y.separatorStrokeWidth,a.tj=null,y.separatorDashArray&&(a.tj=hi(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}Le=us.prototype,Le.qb=function(a){a.classType===us&&(this.sizing=a)},Le.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+Bi(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,E=this.isRow;if(y!==null&&y.type===Hn.Table)for(var b=E?y.rowDefs.length:y.colDefs.length,z=0;z<b;z++){var ne=E?y.rowDefs[z]:y.colDefs[z];if(ne!==void 0&&ne.oa!==0){x=ne.index;break}}if(this.index!==x&&(x=this.separatorStroke,x===null&&y!==null&&(x=E?y.defaultRowSeparatorStroke:y.defaultColumnSeparatorStroke),x!==null&&(a=this.separatorStrokeWidth,isNaN(a)&&(y!==null?a=E?y.defaultRowSeparatorStrokeWidth:y.defaultColumnSeparatorStrokeWidth:a=0))),E=this.dg,E===null)if(y!==null)E=y.defaultSeparatorPadding;else return a;return a+(this.isRow?E.top+E.bottom:E.left+E.right)},Le.Ob=function(a,y,x){var E=this.Me;if(E!==null&&(E.cb(Yr,a,this,y,x,void 0,void 0),this.be!==null&&(y=E.diagram,y!==null&&!y.skipsModelSourceBindings&&(E=E.ih(),E!==null&&(y=E.data,y!==null)))))for(x=this.be.iterator;x.next();)x.value.sp(this,y,a,E)};function km(a){if(a.sizing===Cv){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}Le.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Xa(a,y,x,E):b=a,b.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&d1(y)&&yt("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+b+" on "+a)),this.be===null&&(this.be=new Nn),this.be.add(b),this},Ve.Object.defineProperties(us.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&&On(a,">= 0",us,"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&&On(a,">= 0",us,"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))&&On(a,">= 0",us,"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&&On(a,">= 0",us,"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 Di(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 Ao&&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,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||yt("separatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===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 Ao&&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}}}),us.prototype.computeEffectiveSpacing=us.prototype.Wc,us.prototype.computeEffectiveSpacingTop=us.prototype.Io;var Cv=new fn(us,"Default",0),fp=new fn(us,"None",1),Am=new fn(us,"ProportionalExtra",2);us.className="RowColumnDefinition",us.Default=Cv,us.None=fp,us.ProportionalExtra=Am;function Er(a,y){Rt.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)}Ot(Er,Rt),Er.prototype.cloneProtected=function(a){Rt.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=hi(this.Yg)),this.Na!==null&&(a.Na=this.Na.nc?this.Na:this.Na.copy()),a.Un=this.Un,a.Vn=this.Vn,this.fa!==null&&(a.fa=this.fa.copy())};function ef(a){a.Na===null?a.Na=new Mv:a.Na.nc&&(a.Na=a.Na.copy())}Le=Er.prototype,Le.th=function(){Rt.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},Le.qb=function(a){a===In||a===Ci||a===Kr||a===vr?this.geometryStretch=a:Rt.prototype.qb.call(this,a)},Le.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+Bi(this)};function fg(a,y,x,E){var b=x.length;if(!(4>b)){var z=E.measuredBounds,ne=Math.max(1,z.width);z=z.height;for(var re=x[0],oe=x[1],le,ue,pe,xe,Ee,Fe,Oe=0,at=qn(),Xe=2;Xe<b;Xe+=2)le=x[Xe],ue=x[Xe+1],pe=le-re,re=ue-oe,pe===0&&(pe=.001),xe=re/pe,Ee=Math.atan2(re,pe),Fe=Math.sqrt(pe*pe+re*re),at.push([pe,Ee,xe,Fe]),Oe+=Fe,re=le,oe=ue;re=x[0],oe=x[1],pe=E.measuredBounds.width,E instanceof Er&&(pe-=E.strokeWidth),1>pe&&(pe=1),b=x=pe,le=ne/2,ue=le!==0,Xe=0,Fe=at[Xe],pe=Fe[0],Ee=Fe[1],xe=Fe[2],Fe=Fe[3];for(var pt=0;.1<=Oe;){if(pt===0&&(ue?(b=x,b-=le,Oe-=le,ue=!1):b=x,b===0&&(b=1)),b>Oe){di(at);return}b>Fe?(pt=b-Fe,b=Fe):pt=0;var wt=Math.sqrt(b*b/(1+xe*xe));if(0>pe&&(wt=-wt),re+=wt,oe+=xe*wt,a.translate(re,oe),a.rotate(Ee),a.translate(-(ne/2),-(z/2)),pt===0&&E.hh(a,y),a.translate(ne/2,z/2),a.rotate(-Ee),a.translate(-re,-oe),Oe-=b,Fe-=b,pt!==0){if(Xe++,Xe===at.length){di(at);return}Fe=at[Xe],pe=Fe[0],Ee=Fe[1],xe=Fe[2],Fe=Fe[3],b=pt}}di(at)}}Le.hh=function(a,y){var x=this.xc,E=this.Ui;if(x!==null||E!==null){var b=this.ua;if(b!==null){a.yc();var z=this.actualBounds,ne=this.naturalBounds;E!==null&&Da(this,a,E,!0,!1,ne,z);var re=this.part,oe=this.ig;if(x===null||oe!==0||re===null||!this.isPanelMain&&re.Pb()!==this||(oe=re.type===Hn.Link&&re instanceof lo&&re.category==="Selection"&&re.adornedObject instanceof Er&&re.adornedPart.Pb()===re.adornedObject?re.adornedObject.strokeWidth:0),oe===0&&(x=null),x!==null&&oe!==0&&(Da(this,a,x,!1,!1,ne,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||E!==null&&E!=="transparent"||(re=!1),ne=!1,oe=this.strokeDashArray,oe!==null&&(ne=!0,a.js(oe,this.strokeDashOffset)),b.type===yn.j)a.beginPath(),a.moveTo(b.startX,b.startY),a.lineTo(b.endX,b.endY),x!==null&&a.jk(),a.Se();else if(b.type===yn.u){var le=b.startX;oe=b.startY;var ue=b.endX,pe=b.endY;b=Math.min(le,ue);var xe=Math.min(oe,pe);le=Math.abs(ue-le),oe=Math.abs(pe-oe),a.beginPath(),a.rect(b,xe,le,oe),E!==null&&a.ng(E),x!==null&&(re&&z&&Xh(a),a.jk(),re&&z&&gc(a)),a.Se()}else if(b.type===yn.F)le=b.startX,oe=b.startY,ue=b.endX,pe=b.endY,b=Math.abs(ue-le)/2,xe=Math.abs(pe-oe)/2,le=Math.min(le,ue)+b,oe=Math.min(oe,pe)+xe,a.beginPath(),a.moveTo(le,oe-xe),a.bezierCurveTo(le+it.wg*b,oe-xe,le+b,oe-it.wg*xe,le+b,oe),a.bezierCurveTo(le+b,oe+it.wg*xe,le+it.wg*b,oe+xe,le,oe+xe),a.bezierCurveTo(le-it.wg*b,oe+xe,le-b,oe+it.wg*xe,le-b,oe),a.bezierCurveTo(le-b,oe-it.wg*xe,le-it.wg*b,oe-xe,le,oe-xe),a.closePath(),E!==null&&a.ng(E),x!==null&&(re&&z&&Xh(a),a.jk(),re&&z&&gc(a)),a.Se();else if(b.type===yn.o)for(b=b.figures,oe=b.length,xe=0;xe<oe;xe++){le=b.s[xe],a.beginPath(),a.moveTo(le.startX,le.startY),ue=le.segments.s,pe=ue.length;for(var Ee=null,Fe=0;Fe<pe;Fe++){var Oe=ue[Fe];switch(Oe.type){case Ar:a.moveTo(Oe.endX,Oe.endY);break;case or:a.lineTo(Oe.endX,Oe.endY);break;case Cr:a.bezierCurveTo(Oe.point1X,Oe.point1Y,Oe.point2X,Oe.point2Y,Oe.endX,Oe.endY);break;case Lo:a.quadraticCurveTo(Oe.point1X,Oe.point1Y,Oe.endX,Oe.endY);break;case Rr:if(Oe.radiusX===Oe.radiusY){var at=Math.PI/180;a.arc(Oe.point1X,Oe.point1Y,Oe.radiusX,Oe.startAngle*at,(Oe.startAngle+Oe.sweepAngle)*at,0>Oe.sweepAngle,Ee!==null?Ee.endX:le.startX,Ee!==null?Ee.endY:le.startY)}else if(Ee=$i(Oe,le),at=Ee.length,at===0)a.lineTo(Oe.centerX,Oe.centerY);else for(var Xe=0;Xe<at;Xe++){var pt=Ee[Xe];Xe===0&&a.lineTo(pt[0],pt[1]),a.bezierCurveTo(pt[2],pt[3],pt[4],pt[5],pt[6],pt[7])}break;case tr:if(Xe=at=0,Ee!==null&&Ee.type===Rr){if(Ee=$i(Ee,le),pt=Ee.length,pt===0){a.lineTo(Oe.endX,Oe.endY);break}Ee=Ee[pt-1]||null,Ee!==null&&(at=Ee[6],Xe=Ee[7])}else at=Ee!==null?Ee.endX:le.startX,Xe=Ee!==null?Ee.endY:le.startY;if(Ee=Tr(Oe,le,at,Xe),at=Ee.length,at===0){a.lineTo(Oe.endX,Oe.endY);break}for(Xe=0;Xe<at;Xe++)pt=Ee[Xe],a.bezierCurveTo(pt[2],pt[3],pt[4],pt[5],pt[6],pt[7]);break;default:yt("Segment not of valid type: "+Oe.type)}Oe.isClosed&&a.closePath(),Ee=Oe}ue=le.isFilled,z?le.isShadowed?(ue===!0&&E!=="transparent"&&E!==null&&a.ng(E,le.isEvenOdd),x!==null&&(ue&&re&&Xh(a),a.jk(),ue&&re&&gc(a))):(Xh(a),ue&&E!=="transparent"&&E!==null&&a.ng(E,le.isEvenOdd),x!==null&&a.jk(),gc(a)):(ue&&E!==null&&a.ng(E,le.isEvenOdd),x!==null&&a.jk()),a.Se(xe)}if(ne&&a.fs(),this.pathPattern!==null){if(x=this.pathPattern,x.measure(1/0,1/0),E=x.measuredBounds,x.arrange(0,0,E.width,E.height),z=this.geometry,a.save(),a.beginPath(),E=qn(),z.type===yn.j)E.push(z.startX),E.push(z.startY),E.push(z.endX),E.push(z.endY),fg(a,y,E,x);else if(z.type===yn.o)for(z=z.figures.iterator;z.next();){for(re=z.value,E.length=0,E.push(re.startX),E.push(re.startY),ne=re.startX,b=re.startY,oe=ne,xe=b,le=re.segments.s,ue=le.length,pe=0;pe<ue;pe++){switch(Fe=le[pe],Fe.type){case Ar:fg(a,y,E,x),E.length=0,E.push(Fe.endX),E.push(Fe.endY),ne=Fe.endX,b=Fe.endY,oe=ne,xe=b;break;case or:E.push(Fe.endX),E.push(Fe.endY),ne=Fe.endX,b=Fe.endY;break;case Cr:it.Qe(ne,b,Fe.point1X,Fe.point1Y,Fe.point2X,Fe.point2Y,Fe.endX,Fe.endY,.5,E),ne=Fe.endX,b=Fe.endY;break;case Lo:it.ep(ne,b,Fe.point1X,Fe.point1Y,Fe.endX,Fe.endY,.5,E),ne=Fe.endX,b=Fe.endY;break;case Rr:if(Oe=$i(Fe,re),Ee=Oe.length,Ee===0){E.push(Fe.centerX),E.push(Fe.centerY),ne=Fe.centerX,b=Fe.centerY;break}for(at=0;at<Ee;at++)Xe=Oe[at],it.Qe(ne,b,Xe[2],Xe[3],Xe[4],Xe[5],Xe[6],Xe[7],.5,E),ne=Xe[6],b=Xe[7];break;case tr:if(Oe=Tr(Fe,re,ne,b),Ee=Oe.length,Ee===0){E.push(Fe.endX),E.push(Fe.endY),ne=Fe.endX,b=Fe.endY;break}for(at=0;at<Ee;at++)Xe=Oe[at],it.Qe(ne,b,Xe[2],Xe[3],Xe[4],Xe[5],Xe[6],Xe[7],.5,E),ne=Xe[6],b=Xe[7];break;default:yt("Segment not of valid type: "+Fe.type)}Fe.isClosed&&(E.push(oe),E.push(xe),fg(a,y,E,x))}fg(a,y,E,x)}else if(z.type===yn.u)E.push(z.startX),E.push(z.startY),E.push(z.endX),E.push(z.startY),E.push(z.endX),E.push(z.endY),E.push(z.startX),E.push(z.endY),E.push(z.startX),E.push(z.startY),fg(a,y,E,x);else if(z.type===yn.F){if(b=new ho,b.startX=z.endX,b.startY=(z.startY+z.endY)/2,ne=new _i(Rr),ne.startAngle=0,ne.sweepAngle=360,ne.centerX=(z.startX+z.endX)/2,ne.centerY=(z.startY+z.endY)/2,ne.radiusX=Math.abs(z.startX-z.endX)/2,ne.radiusY=Math.abs(z.startY-z.endY)/2,b.add(ne),z=$i(ne,b),re=z.length,re===0)E.push(ne.centerX),E.push(ne.centerY);else for(ne=b.startX,b=b.startY,oe=0;oe<re;oe++)xe=z[oe],it.Qe(ne,b,xe[2],xe[3],xe[4],xe[5],xe[6],xe[7],.5,E),ne=xe[6],b=xe[7];fg(a,y,E,x)}di(E),a.restore(),a.Vc(!1)}}}},Le.kk=function(a,y,x){return!Rt.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:Rt.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 bi){a.Mc()&&yt("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var x=this.naturalBounds,E=this.strokeWidth;y.h(a.x*(x.width+E)-E/2+x.x+a.offsetX,a.y*(x.height+E)-E/2+x.y+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},Le.mi=function(a){a===void 0&&(a=new gn);var y=this.naturalBounds,x=this.oe;y=gn.allocAt(y.x,y.y,y.width,y.height);var E=this.strokeWidth;return y.Bc(E/2,E/2),E=tt.allocAt(y.x,y.y).transform(x),a.h(E.x,E.y,0,0),E.h(y.right,y.y).transform(x),ma(a,E.x,E.y,0,0),E.h(y.right,y.bottom).transform(x),ma(a,E.x,E.y,0,0),E.h(y.x,y.bottom).transform(x),ma(a,E.x,E.y,0,0),gn.free(y),tt.free(E),a},Le.gh=function(a,y){var x=this.geometry;if(x===null||this.fill===null&&this.stroke===null)return!1;var E=x.bounds,b=this.strokeWidth/2;x.type!==yn.j||y||(b+=2);var z=gn.alloc();if(z.assign(E),z.Bc(b+2,b+2),!z.ca(a))return gn.free(z),!1;if(E=b+1e-4,x.type===yn.j)return this.stroke===null||(E=(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>E)?!1:(gn.free(z),it.Yb(x.startX,x.startY,x.endX,x.endY,b,a.x,a.y));if(x.type===yn.u){y=x.startX;var ne=x.startY,re=x.endX;if(x=x.endY,z.x=Math.min(y,re),z.y=Math.min(ne,x),z.width=Math.abs(re-y),z.height=Math.abs(x-ne),this.fill===null){if(z.Bc(-E,-E),z.ca(a))return gn.free(z),!1;z.Bc(E,E)}return this.stroke!==null&&z.Bc(b,b),a=z.ca(a),gn.free(z),a}if(x.type===yn.F){ne=x.startX,b=x.startY,re=x.endX;var oe=x.endY;if(x=Math.min(ne,re),y=Math.min(b,oe),ne=Math.abs(re-ne)/2,b=Math.abs(oe-b)/2,x=a.x-(x+ne),y=a.y-(y+b),this.fill===null){if(ne-=E,b-=E,0>=ne||0>=b||1>=x*x/(ne*ne)+y*y/(b*b))return gn.free(z),!1;ne+=E,b+=E}return this.stroke!==null&&(ne+=E,b+=E),gn.free(z),0>=ne||0>=b?!1:1>=x*x/(ne*ne)+y*y/(b*b)}if(x.type===yn.o)return gn.free(z),this.fill===null?jo(x,a.x,a.y,b):Ir(x,a,b,1<this.strokeWidth,y);yt("Unknown Geometry type: "+x.type)},Le.Wl=function(a,y,x,E){var b=this.desiredSize,z=this.ig;if(a=Math.max(a,0),y=Math.max(y,0),this.Rd!==null)var ne=this.geometry.bounds;else{var re=this.figure,oe=bv[re];if(oe===void 0){var le=it.Ze[re];typeof le=="string"&&(le=it.Ze[le]),typeof le=="function"?(oe=le(null,100,100),bv[re]=oe):yt("Unsupported Figure: "+re)}ne=oe.bounds}re=ne.width,oe=ne.height,le=ne.width;var ue=ne.height;switch(Bl(this,!0)){case In:E=x=0;break;case zn:le=Math.max(a-z,0),ue=Math.max(y-z,0);break;case Ti:le=Math.max(a-z,0),E=0;break;case Zi:x=0,ue=Math.max(y-z,0)}isFinite(b.width)&&(le=b.width),isFinite(b.height)&&(ue=b.height);var pe=this.maxSize,xe=this.minSize;switch(x=Math.max(x-z,xe.width),E=Math.max(E-z,xe.height),le=Math.min(pe.width,le),ue=Math.min(pe.height,ue),le=isFinite(le)?Math.max(x,le):Math.max(re,x),ue=isFinite(ue)?Math.max(E,ue):Math.max(oe,E),x=Ev(this),x){case In:break;case zn:re=le,oe=ue;break;case Ci:x=Math.min(le/re,ue/oe),isFinite(x)||(x=1),re*=x,oe*=x;break;default:yt(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,ne=x.bounds,E=re/ne.width,ne=oe/ne.height,isFinite(E)||(E=1),isFinite(ne)||(ne=1),this.ua=E===1&&ne===1?x:x.copy().scale(E,ne)):this.ua!==null&&it.$(this.ua.Sk,a-z)&&it.$(this.ua.Rk,y-z)||(this.ua=Er.makeGeometry(this,re,oe)),ne=this.ua.bounds,a===1/0||y===1/0?this.Ge(ne.x-z/2,ne.y-z/2,a===0&&re===0?0:ne.width+z,y===0&&oe===0?0:ne.height+z):this.Ge(-(z/2),-(z/2),le+z,ue+z),b.w()?(le=b.width,ue=b.height,le=Math.min(pe.width,le),ue=Math.min(pe.height,ue),le=Math.max(xe.width,le),ue=Math.max(xe.height,ue),this.dc.h(0,0,le,ue)):this.dc.assign(ne)};function Ev(a){var y=a.geometryStretch;return a.Rd!==null?y===vr?zn:y:y===vr?bv[a.figure].defaultStretch:y}Le.eh=function(a,y,x,E){ol(this,a,y,x,E)},Le.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Le.Sj=function(a,y,x,E,b){var z=this.transform,ne=1/(z.m11*z.m22-z.m12*z.m21),re=z.m22*ne,oe=-z.m12*ne,le=-z.m21*ne,ue=z.m11*ne,pe=ne*(z.m21*z.dy-z.m22*z.dx),xe=ne*(z.m12*z.dx-z.m11*z.dy);z=a*re+y*le+pe,ne=a*oe+y*ue+xe,re=x*re+E*le+pe,oe=x*oe+E*ue+xe,pe=this.ig/2,le=this.ua,le===null&&(this.measure(1/0,1/0),le=this.ua);var Ee=le.bounds;if(ue=!1,le.type===yn.j)if(1.5>=this.strokeWidth)ue=it.Ve(le.startX,le.startY,le.endX,le.endY,z,ne,re,oe,b);else{if(le.startX===le.endX?(E=pe,ue=0):(y=(le.endY-le.startY)/(le.endX-le.startX),ue=pe/Math.sqrt(1+y*y),E=ue*y),y=qn(),a=new tt,it.Ve(le.startX+E,le.startY+ue,le.endX+E,le.endY+ue,z,ne,re,oe,a)&&y.push(a),a=new tt,it.Ve(le.startX-E,le.startY-ue,le.endX-E,le.endY-ue,z,ne,re,oe,a)&&y.push(a),a=new tt,it.Ve(le.startX+E,le.startY+ue,le.startX-E,le.startY-ue,z,ne,re,oe,a)&&y.push(a),a=new tt,it.Ve(le.endX+E,le.endY+ue,le.endX-E,le.endY-ue,z,ne,re,oe,a)&&y.push(a),re=y.length,re===0)return di(y),!1;for(ue=!0,oe=1/0,E=0;E<re;E++)a=y[E],x=(a.x-z)*(a.x-z)+(a.y-ne)*(a.y-ne),x<oe&&(oe=x,b.x=a.x,b.y=a.y);di(y)}else if(le.type===yn.u)ue=it.Ff(Ee.x-pe,Ee.y-pe,Ee.x+Ee.width+pe,Ee.y+Ee.height+pe,z,ne,re,oe,b);else if(le.type===yn.F){y=gn.allocAt(Ee.x,Ee.y,Ee.width,Ee.height).Bc(pe,pe);e:if(y.width===0)ue=it.Ve(y.x,y.y,y.x,y.y+y.height,z,ne,re,oe,b);else if(y.height===0)ue=it.Ve(y.x,y.y,y.x+y.width,y.y,z,ne,re,oe,b);else{if(a=y.width/2,le=y.height/2,E=y.x+a,ue=y.y+le,x=9999,z!==re&&(x=(ne-oe)/(z-re)),9999>Math.abs(x)){if(oe=ne-ue-x*(z-E),0>a*a*x*x+le*le-oe*oe){b.x=NaN,b.y=NaN,ue=!1;break e}pe=Math.sqrt(a*a*x*x+le*le-oe*oe),re=(-(a*a*x*oe)+a*le*pe)/(le*le+a*a*x*x)+E,a=(-(a*a*x*oe)-a*le*pe)/(le*le+a*a*x*x)+E,le=x*(re-E)+oe+ue,oe=x*(a-E)+oe+ue,Math.abs((z-re)*(z-re))+Math.abs((ne-le)*(ne-le))<Math.abs((z-a)*(z-a))+Math.abs((ne-oe)*(ne-oe))?(b.x=re,b.y=le):(b.x=a,b.y=oe)}else{if(re=le*le,oe=z-E,re-=re/(a*a)*oe*oe,0>re){b.x=NaN,b.y=NaN,ue=!1;break e}oe=Math.sqrt(re),re=ue+oe,oe=ue-oe,Math.abs(re-ne)<Math.abs(oe-ne)?(b.x=z,b.y=re):(b.x=z,b.y=oe)}ue=!0}gn.free(y)}else if(le.type===yn.o){xe=tt.alloc();var Fe=re-z,Oe=oe-ne,at=Fe*Fe+Oe*Oe,Xe=z,pt=ne;if(0<at&&Ee.contains(Xe,pt)&&(xe.x=Xe,xe.y=pt,this.ca(xe)))for(Fe!==0&&.5>Math.abs(Fe)?(Oe*=.5/Fe,Fe=.5):Oe!==0&&.5>Math.abs(Oe)&&(Fe*=.5/Oe,Oe=.5),Xe-=Fe,pt-=Oe;Ee.contains(Xe,pt);)Xe-=Fe,pt-=Oe;for(b.x=re,b.y=oe,Oe=0;Oe<le.figures.count;Oe++){var wt=le.figures.s[Oe],Mt=wt.isFilled?Xe:z,It=wt.isFilled?pt:ne,qt=wt.segments;Ee=wt.startX,Fe=wt.startY;for(var ei=Ee,Si=Fe,fi=0;fi<qt.count;fi++){var Gn=qt.s[fi],Tn=Gn.type,dr=Gn.endX,Xi=Gn.endY,vo=!1;switch(Tn){case Ar:ei=dr,Si=Xi;break;case or:vo=Dm(Ee,Fe,dr,Xi,Mt,It,re,oe,xe);break;case Cr:vo=it.Eo(Ee,Fe,Gn.point1X,Gn.point1Y,Gn.point2X,Gn.point2Y,dr,Xi,Mt,It,re,oe,.6,xe);break;case Lo:vo=it.Eo(Ee,Fe,Ee+2/3*(Gn.point1X-Ee),Fe+2/3*(Gn.point1Y-Fe),dr+2/3*(Gn.point1X-dr),Xi+2/3*(Gn.point1Y-Xi),dr,Xi,Mt,It,re,oe,.6,xe);break;case Rr:case tr:Tn=Gn.type===Rr?$i(Gn,wt):Tr(Gn,wt,Ee,Fe);var Xo=Tn.length;if(Xo===0){vo=Dm(Ee,Fe,Gn.type===Rr?Gn.centerX:Gn.endX,Gn.type===Rr?Gn.centerY:Gn.endY,Mt,It,re,oe,xe);break}for(Xi=null,dr=0;dr<Xo;dr++){if(Xi=Tn[dr],dr===0&&Dm(Ee,Fe,Xi[0],Xi[1],Mt,It,re,oe,xe)){var xs=Tm(Mt,It,xe,at,b);xs<at&&(at=xs,ue=!0)}it.Eo(Xi[0],Xi[1],Xi[2],Xi[3],Xi[4],Xi[5],Xi[6],Xi[7],Mt,It,re,oe,.6,xe)&&(xs=Tm(Mt,It,xe,at,b),xs<at&&(at=xs,ue=!0))}dr=Xi[6],Xi=Xi[7];break;default:yt("Unknown Segment type: "+Tn)}Ee=dr,Fe=Xi,vo&&(vo=Tm(Mt,It,xe,at,b),vo<at&&(at=vo,ue=!0)),Gn.isClosed&&(dr=ei,Xi=Si,Dm(Ee,Fe,dr,Xi,Mt,It,re,oe,xe)&&(Gn=Tm(Mt,It,xe,at,b),Gn<at&&(at=Gn,ue=!0)))}}z=x-a,ne=E-y,re=Math.sqrt(z*z+ne*ne),re!==0&&(z/=re,ne/=re),b.x-=z*pe,b.y-=ne*pe,tt.free(xe)}else yt("Unknown Geometry type: "+le.type);return ue?(this.transform.Ga(b),!0):!1};function Tm(a,y,x,E,b){return a=x.x-a,y=x.y-y,y=a*a+y*y,y<E?(b.x=x.x,b.y=x.y,y):E}function Dm(a,y,x,E,b,z,ne,re,oe){if(it.$(a,x)&&it.$(y,E)||it.$(b,ne)&&it.$(z,re))return!1;var le=!1,ue=(b-ne)*(y-E)-(z-re)*(a-x);return ue===0?!1:(oe.x=((b*re-z*ne)*(a-x)-(b-ne)*(a*E-y*x))/ue,oe.y=((b*re-z*ne)*(y-E)-(z-re)*(a*E-y*x))/ue,(a>x?a-x:x-a)<(y>E?y-E:E-y)?(a=y<E?y:E,y=y<E?E:y,(oe.y>a||it.$(oe.y,a))&&(oe.y<y||it.$(oe.y,y))&&(le=!0)):(y=a<x?a:x,a=a<x?x:a,(oe.x>y||it.$(oe.x,y))&&(oe.x<a||it.$(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 E=this.strokeWidth/2,b=!1,z=tt.alloc();return z.h(x.x-E,x.y-E),a.ca(y.Ga(z))&&(z.h(x.x-E,x.bottom+E),a.ca(y.Ga(z))&&(z.h(x.right+E,x.bottom+E),a.ca(y.Ga(z))&&(z.h(x.right+E,x.y-E),a.ca(y.Ga(z))&&(b=!0)))),tt.free(z),b},Le.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=_t.alloc();x.set(y),x.Vj();var E=a.left,b=a.right,z=a.top;a=a.bottom;var ne=tt.alloc();if(ne.h(E,z),x.Ga(ne),this.gh(ne,!0)||(ne.h(b,z),x.Ga(ne),this.gh(ne,!0))||(ne.h(E,a),x.Ga(ne),this.gh(ne,!0))||(ne.h(b,a),x.Ga(ne),this.gh(ne,!0)))return tt.free(ne),!0;var re=tt.alloc(),oe=tt.alloc();return x.set(y),x.bv(this.transform),x.Vj(),re.x=b,re.y=z,re.transform(x),ne.x=E,ne.y=z,ne.transform(x),y=!1,tf(this,ne,re,oe)?y=!0:(ne.x=b,ne.y=a,ne.transform(x),tf(this,ne,re,oe)?y=!0:(re.x=E,re.y=a,re.transform(x),tf(this,ne,re,oe)?y=!0:(ne.x=E,ne.y=z,ne.transform(x),tf(this,ne,re,oe)&&(y=!0)))),tt.free(ne),_t.free(x),tt.free(re),tt.free(oe),y};function tf(a,y,x,E){if(!a.rs(y,x,E))return!1;a=y.x,y=y.y;var b=x.x,z=x.y;return x=E.x,E=E.y,a===b?(y<z?(a=y,y=z):a=z,E>=a&&E<=y):(a<b?(E=a,a=b):E=b,x>=E&&x<=a)}Le.tx=function(a,y,x){function E(at,Xe){for(var pt=at.length,wt=0;wt<pt;wt+=2)if(Xe.zd(at[wt],at[wt+1])>b)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var b=a.Bf(y),z=b;if(1.5<this.strokeWidth&&(b=this.strokeWidth/2+Math.sqrt(b),b*=b),y=this.ua,y===null&&(this.measure(1/0,1/0),y=this.ua,y===null))return!1;if(!x){var ne=y.bounds,re=ne.x,oe=ne.y,le=ne.x+ne.width;if(ne=ne.y+ne.height,qa(a.x,a.y,re,oe)<=b&&qa(a.x,a.y,le,oe)<=b&&qa(a.x,a.y,re,ne)<=b&&qa(a.x,a.y,le,ne)<=b)return!0}if(re=y.startX,oe=y.startY,le=y.endX,ne=y.endY,y.type===yn.j){if(x=(re-le)*(a.x-le)+(oe-ne)*(a.y-ne),To(a.x,a.y,re,oe,le,ne)<=(0<=(le-re)*(a.x-re)+(ne-oe)*(a.y-oe)&&0<=x?b:z))return!0}else{if(y.type===yn.u)return y=!1,x&&(y=To(a.x,a.y,re,oe,re,ne)<=b||To(a.x,a.y,re,oe,le,oe)<=b||To(a.x,a.y,le,oe,le,ne)<=b||To(a.x,a.y,re,ne,le,ne)<=b),y;if(y.type===yn.F){y=a.x-(re+le)/2,z=a.y-(oe+ne)/2;var ue=Math.abs(le-re)/2,pe=Math.abs(ne-oe)/2;if(ue===0||pe===0)return To(a.x,a.y,re,oe,le,ne)<=b;if(x){if(a=it.$y(ue,pe,y,z),a*a<=b)return!0}else return!(qa(y,z,-ue,0)>=b||qa(y,z,0,-pe)>=b||qa(y,z,0,pe)>=b||qa(y,z,ue,0)>=b)}else if(y.type===yn.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&&To(a.x,a.y,z,re,z,le)>b&&To(a.x,a.y,z,re,oe,re)>b&&To(a.x,a.y,oe,le,z,le)>b&&To(a.x,a.y,oe,le,oe,re)>b)return!1;if(z=Math.sqrt(b),x){if(this.fill===null?jo(y,a.x,a.y,z):Ir(y,a,z,!0,!1))return!0}else{for(x=y.figures,y=0;y<x.count;y++){if(z=x.s[y],ne=z.startX,ue=z.startY,a.zd(ne,ue)>b)return!1;for(re=z.segments.s,oe=re.length,le=0;le<oe;le++)switch(pe=re[le],pe.type){case Ar:case or:if(ne=pe.endX,ue=pe.endY,a.zd(ne,ue)>b)return!1;break;case Cr:var xe=qn();if(it.Qe(ne,ue,pe.point1X,pe.point1Y,pe.point2X,pe.point2Y,pe.endX,pe.endY,.8,xe),ne=E(xe,a),di(xe),ne||(ne=pe.endX,ue=pe.endY,a.zd(ne,ue)>b))return!1;break;case Lo:if(xe=qn(),it.ep(ne,ue,pe.point1X,pe.point1Y,pe.endX,pe.endY,.8,xe),ne=E(xe,a),di(xe),ne||(ne=pe.endX,ue=pe.endY,a.zd(ne,ue)>b))return!1;break;case Rr:case tr:xe=pe.type===Rr?$i(pe,z):Tr(pe,z,ne,ue);var Ee=xe.length;if(Ee===0){if(ne=pe.type===Rr?pe.centerX:pe.endX,ue=pe.type===Rr?pe.centerY:pe.endY,a.zd(ne,ue)>b)return!1;break}pe=null;for(var Fe=qn(),Oe=0;Oe<Ee;Oe++)if(pe=xe[Oe],Fe.length=0,it.Qe(pe[0],pe[1],pe[2],pe[3],pe[4],pe[5],pe[6],pe[7],.8,Fe),E(Fe,a))return di(Fe),!1;di(Fe),pe!==null&&(ne=pe[6],ue=pe[7]);break;default:yt("Unknown Segment type: "+pe.type)}}return!0}}}return!1},Le.qc=function(){this.ua=null},Le.kq=function(){return this.ig};function m1(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=wp,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=rs):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new bi(1-rs.x,rs.y)))}Er.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var E=Qh[a.toArrow];else a.fromArrow!=="None"?E=Qh[a.fromArrow]:(E=it.Ze[a.figure],typeof E=="string"&&(E=it.Ze[E]),E===void 0&&yt("Unknown Shape.figure: "+a.figure),E=E(a,y,x),E.Sk=y,E.Rk=x);if(E===null){var b=it.Ze.Rectangle;typeof b=="function"&&(E=b(a,y,x))}return E};function v1(a){var y=Qh[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=Qh[x],y===void 0){var E=null,b;for(b in it.um)if(b.toLowerCase()===x){E=b;break}if(E!==null)return a=yn.parse(it.um[E],!1),Qh[E]=a,x!==E&&(Qh[x]=E),E}}return typeof y=="string"?y:y instanceof yn?a:null}Ve.Object.defineProperties(Er.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 E=this.part;E!==null&&(E.ag=NaN),this.v(),this.g("geometry",y||x,a),Zs(this)&&(a=this.part,a!==null&&oa(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=yn.parse(a);var y=a.normalize();this.geometry=a,this.position=a=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 Ao&&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 Ao&&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 On(a,"value >= 0",Er,"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"?On(a,'"butt", "round", or "square"',Er,"strokeCap"):(ef(this),this.Na.Hr=a,this.N(),this.g("strokeCap",y,a)))}},strokeJoin:{get:function(){return this.Na!==null?this.Na.Ir:"miter"},set:function(a){var y=this.strokeJoin;y!==a&&(typeof a!="string"||a!=="miter"&&a!=="bevel"&&a!=="round"?On(a,'"miter", "bevel", or "round"',Er,"strokeJoin"):(ef(this),this.Na.Ir=a,this.N(),this.g("strokeJoin",y,a)))}},strokeMiterLimit:{get:function(){return this.Na!==null?this.Na.Jr:10},set:function(a){var y=this.strokeMiterLimit;if(y!==a&&1<=a){ef(this),this.Na.Jr=a,this.N();var x=this.part;x!==null&&(x.ag=NaN),this.g("strokeMiterLimit",y,a)}}},strokeDashArray:{get:function(){return this.Yg},set:function(a){var y=this.Yg;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];0<=z&&isFinite(z)||yt("strokeDashArray:value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.Yg=a,this.N(),this.g("strokeDashArray",y,a)}}},strokeDashOffset:{get:function(){return this.Na!==null?this.Na.uj:0},set:function(a){var y=this.strokeDashOffset;y!==a&&0<=a&&(ef(this),this.Na.uj=a,this.N(),this.g("strokeDashOffset",y,a))}},figure:{get:function(){return this.an},set:function(a){var y=this.an;if(y!==a){var x=it.Ze[a];typeof x=="function"?x=a:(x=it.Ze[a.toLowerCase()])||yt("Unknown Shape.figure: "+a),y!==x&&(a=this.part,a!==null&&(a.ag=NaN),this.an=x,this.Rd=null,this.qc(),this.v(),this.g("figure",y,x))}}},toArrow:{get:function(){return this.Ua!==null?this.Ua.V:"None"},set:function(a){var y=this.toArrow;if(a===!0?a="Standard":a===!1&&(a=""),y!==a){var x=v1(a);x===null?yt("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new fd),this.Ua.V=x,this.Rd=null,this.qc(),this.v(),m1(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=v1(a);x===null?yt("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new fd),this.Ua.j=x,this.Rd=null,this.qc(),this.v(),m1(this),this.g("fromArrow",y,x))}}},spot1:{get:function(){return this.Na!==null?this.Na.fg:Co},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),ef(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:Co},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),ef(this),this.Na.gg=a,this.v(),this.g("spot2",y,a))}},parameter1:{get:function(){return this.Un},set:function(a){var y=this.Un;y!==a&&(this.Un=a,this.qc(),this.v(),this.g("parameter1",y,a))}},parameter2:{get:function(){return this.Vn},set:function(a){var y=this.Vn;y!==a&&(this.Vn=a,this.qc(),this.v(),this.g("parameter2",y,a))}},naturalBounds:{get:function(){return this.dc}},pathPattern:{get:function(){return this.Na!==null?this.Na.br:null},set:function(a){var y=this.pathPattern;y!==a&&(ef(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:vr},set:function(a){var y=this.geometryStretch;y!==a&&(ef(this),this.Na.jq=a,this.v(),this.g("geometryStretch",y,a))}},interval:{get:function(){return this.fa!==null?this.fa.Tk:1},set:function(a){var y=this.interval;if(a=Math.round(a),y!==a&&a!==0&&isFinite(a)){this.fa===null&&(this.fa=new qh),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&Th(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 qh),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 qh),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 qh),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),Er.prototype.intersectsRect=Er.prototype.Yc,Er.prototype.containedInRect=Er.prototype.fh,Er.prototype.getNearestIntersectionPoint=Er.prototype.rs,Er.prototype.getDocumentBounds=Er.prototype.mi,Er.prototype.getDocumentPoint=Er.prototype.ga;var Qh=new zi,bv=new zi;Er.className="Shape",Er.getFigureGenerators=function(){var a=new xi,y;for(y in it.Ze)y!==y.toLowerCase()&&a.add(y,it.Ze[y]);return a.freeze(),a},Er.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),E=it.Ze;E[a]=y,E[x]=a},Er.getArrowheadGeometries=function(){var a=new xi;for(E in it.um)if(Qh[E]===void 0){var y=yn.parse(it.um[E],!1);Qh[E]=y,y=E.toLowerCase(),y!==E&&(Qh[y]=E)}for(var x in Qh)if(x!==x.toLowerCase()){var E=Qh[x];E instanceof yn&&a.add(x,E)}return a.freeze(),a},Er.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=yn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||yt("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var E=Qh;E[a]=x,E[y]=a};function Mv(){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=Co}Mv.prototype.copy=function(){var a=new Mv;return a.Hr=this.Hr,a.Ir=this.Ir,a.Jr=this.Jr,a.uj=this.uj,a.br=this.br,a.jq=this.jq,a.fg=this.fg.J(),a.gg=this.gg.J(),a};function Qo(a,y){return Rt.call(this),zm||(Nl=Ba?new Gu(null).context:null,zm=!0),this.l|=2097152,this.ec="",this.xc="black",this.Ae="13px sans-serif",this.Lq=this.Cb=this.Gc=0,this.da=this.fa=this.Gm=null,this.Ih=0,this.df=null,this.Le=0,this.ze=this.Qb=this.Qc=null,typeof a=="string"?this.text=a:a&&Object.assign(this,a),y&&Object.assign(this,y),this}Ot(Qo,Rt),Qo.prototype.cloneProtected=function(a){Rt.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 Rh(a){a.da===null?a.da=new Tv:a.da.nc&&(a.da=a.da.copy())}Le=Qo.prototype,Le.th=function(){Rt.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function y1(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===Qo?this.wrap=a:Rt.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(){Rt.prototype.v.call(this)},Le.hh=function(a,y){if(this.xc!==null&&this.ec.length!==0&&this.Ae!==null){var x=this.naturalBounds,E=this.actualBounds,b=x.width,z=x.height,ne=pp(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;Da(this,a,this.xc,!0,!1,x,E),(oe||le)&&Da(this,a,this.xc,!1,!1,x,E),E=0,x=!1;var ue=this.oe,pe=ue.dx-(ne*ue.m21+ue.dx);ue=ue.dy-(ne*ue.m22+ue.dy);var xe=y.scale;switch(8>(pe*pe+ue*ue)*xe*xe&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Jl&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,pe=this.spacingBelow,this.flip){case io:a.translate(b,0),a.scale(-1,1);break;case Br:a.translate(0,z),a.scale(1,-1);break;case Wo:a.translate(b,z),a.scale(-1,-1)}if(a.yc(),ue=this.Gc,xe=(y+ne+pe)*ue,z>xe&&(E=this.verticalAlignment,E=E.y*z-E.y*xe+E.offsetY),ue===1&&this.ze!==null)pe=this.Cb,pe>b&&(pe=b),this.Oj(this.ze,a,0,E+y,b,ne,pe,x,re,oe,le);else if(this.Qc!==null&&this.Qb!==null)for(xe=0;xe<ue;xe++){var Ee=this.Qc[xe];Ee>b&&(Ee=b),E+=y,this.Oj(this.Qb[xe],a,0,E,b,ne,Ee,x,re,oe,le),E+=ne+pe}switch(this.flip){case io:a.scale(-1,1),a.translate(-b,0);break;case Br:a.scale(1,-1),a.translate(0,-z);break;case Wo:a.scale(-1,-1),a.translate(-b,-z)}}},Le.Oj=function(a,y,x,E,b,z,ne,re,oe,le,ue){var pe=0;if(re)oe==="left"?pe=0:oe==="right"?pe=b-ne:oe==="center"&&(pe=(b-ne)/2),y.fillRect(x+pe,E+.25*z,ne,1);else{if(oe==="left"?pe=0:oe==="right"?pe=b:oe==="center"&&(pe=b/2),b=Om!==null?Om(this,z):.75*z,y.fillText(a,x+pe,E+b),a=z/20|0,a===0&&(a=1),oe==="right"?pe-=ne:oe==="center"&&(pe-=ne/2),le){re=Im!==null?Im(this,z):.8*z,oe=x+pe,le=E+re,b=x+pe+ne,re=E+re;var xe=a;y.beginPath(),y.lineWidth=xe,y.moveTo(oe,le),y.lineTo(b,re),y.stroke(),y.Se(),y instanceof Jl&&y.ad.classList.add("gojs-td")}ue&&(ue=E+z-z/2.2|0,a%2!==0&&(ue+=.5),E=x+pe,z=ue,x=x+pe+ne,ne=ue,pe=a,y.beginPath(),y.lineWidth=pe,y.moveTo(E,z),y.lineTo(x,ne),y.stroke(),y.Se(),y instanceof Jl&&y.ad.classList.add("gojs-td"))}},Le.kk=function(a,y,x){if(!Rt.prototype.kk.call(this,a,y,x))return!1;if(Da(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++)Jy(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,Jy(a,y,!0);return!0},Le.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:Rt.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,E){var b=this.Gc;this.Ih=a,this.l&=-16777217;var z=this.Ae;Nl!==null&&b1!==z&&(b1=Nl.font=z),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var ne;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=ne=0,oe=!1;!oe;){var le=z.indexOf(`
|
|
|
`,re);le===-1&&(le=z.length,oe=!0),re=z.substr(re,le-re),this.formatting===mp&&(re=re.trim()),ne=Math.max(ne,oh(re)),re=le+1}z=ne}else ne=z.indexOf(`
|
|
|
`,0),0<=ne&&(z=z.substr(0,ne)),z=oh(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)),ne=x1(this,z),isNaN(this.desiredSize.height)?ne=Math.min(ne,y/this.scale):ne=this.desiredSize.height,oe=ne,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===Rm&&(y=this.Ae,y=this.overflow===Rm?S1(y):0,le=this.spacingAbove+this.spacingBelow,le=Math.max(0,pp(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);oh(le)>y&&1<le.length;)le=le.substr(0,le.length-1);le+=vp,y=oh(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===P1||isNaN(this.desiredSize.width))&&(z=isNaN(a)?this.Cb:Math.min(a,this.Cb)),z=Math.max(x,z),ne=Math.max(E,ne),Oa(this.dc,z,ne),this.Ge(0,0,z,ne),this.svg!==null&&b!==this.Gc&&(this.Uc=!0)},Le.eh=function(a,y,x,E){ol(this,a,y,x,E)};function gp(a,y,x){a.ze===null?(a.ze=y,a.Cb=x):((a.Qb===null||a.Qc===null)&&(a.Qb=[],a.Qc=[],a.Qb.push(a.ze),a.Qc.push(a.Cb)),a.Qb.push(y),a.Qc.push(x),a.Qb.length>a.maxLines&&(a.l|=16777216))}function Lv(a,y,x,E){var b=a.formatting===mp;b&&(y=y.trim());var z=0,ne=a.Ae,re=a.spacingAbove+a.spacingBelow;re=Math.max(0,pp(a)+re);var oe=a.overflow===Rm?S1(ne):0;if(a.Gc>=a.maxLines)E!==null&&E.h(0,re);else if(ne=y,a.wrap===Fv){a.Le=1;var le=oh(y);if(oe===0||le<=x)a.Cb=Math.max(a.Cb,le),gp(a,y,a.Cb),E!==null&&E.h(le,re);else{for(z=gg(a,ne),ne=ne.substr(z.length),y=gg(a,ne),le=oh(z+y);0<y.length&&le<=x;)z+=y,ne=ne.substr(y.length),y=gg(a,ne),le=z+y,b&&(le=le.trim()),le=oh(le);for(b&&(y=y.trim()),z+=y,x=Math.max(1,x-oe);oh(z)>x&&1<z.length;)z=z.substr(0,z.length-1);a.l|=16777216,z+=vp;var ue=oh(z);a.Cb=ue,gp(a,z,ue),E!==null&&E.h(ue,re)}}else{for(oe=0,ne.length===0&&(oe=1,gp(a,ne,0));0<ne.length;){for(y=gg(a,ne),ne=ne.substr(y.length);oh(y)>x;){var pe=1;for(le=oh(y.substr(0,pe)),ue=0;le<=x;)pe++,ue=le,le=oh(y.substr(0,pe));if(pe===1){var xe=le;z=Math.max(z,le)}else xe=ue,z=Math.max(z,ue);if(pe--,1>pe&&(pe=1),gp(a,y.substr(0,pe),xe),oe++,y=y.substr(pe),a.Gc+oe>a.maxLines)break}for(ue=gg(a,ne),le=oh(y+ue);0<ue.length&&le<=x;)y+=ue,ne=ne.substr(ue.length),ue=gg(a,ne),le=y+ue,b&&(le=le.trim()),le=oh(le);if(b&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),ue.length===0?(pe=le,z=Math.max(z,le)):(pe=ue=oh(y),z=Math.max(z,ue)),gp(a,y,pe),oe++,a.Gc+oe>a.maxLines))break}a.Le=Math.min(a.maxLines,oe),a.Cb=Math.max(a.Cb,z),E!==null&&E.h(a.Cb,re*a.Le)}}function gg(a,y){if(a.wrap===w1)return y.substr(0,1);for(var x=y.length,E=0,b=Sx;E<x&&!b.test(y.charAt(E));)E++;for(a.formatting===C1&&(x=Math.min(x,E+1));E<x&&b.test(y.charAt(E));)E++;return E>=y.length?y:y.substr(0,E)}function oh(a){return Nl===null?8*a.length:Nl.measureText(a).width}function pp(a){if(a.df!==null)return a.df;var y=a.Ae;if(Nl===null){var x=16;return a.df=x}return kv[y]!==void 0&&5e3>E1?x=kv[y]:(x=1.3*Nl.measureText("M").width,kv[y]=x,E1++),a.df=x}function S1(a){if(Nl===null)return 6;if(jm[a]!==void 0&&5e3>Av)var y=jm[a];else y=Nl.measureText(vp).width,jm[a]=y,Av++;return y}function x1(a,y){var x=a.ec.replace(/\r\n/g,`
|
|
|
`).replace(/\r/g,`
|
|
|
`),E=a.spacingAbove+a.spacingBelow;if(E=Math.max(0,pp(a)+E),x.length===0)return a.Cb=0,a.Gc=1,E;if(!a.isMultiline){var b=x.indexOf(`
|
|
|
`,0);0<=b&&(x=x.substr(0,b))}b=0;for(var z=a.Gc=0,ne,re=!1;!re;){if(ne=x.indexOf(`
|
|
|
`,z),ne===-1&&(ne=x.length,re=!0),z<=ne){if(z=x.substr(z,ne-z),a.wrap!==Fv){a.Le=0;var oe=Xn.alloc();Lv(a,z,y,oe),b+=oe.height,Xn.free(oe),a.Gc+=a.Le}else Lv(a,z,y,null),b+=E,a.Gc++;a.Gc===a.maxLines&&(re=!0)}z=ne+1}return a.Lq=b}Ve.Object.defineProperties(Qo.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"||(Rh(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:In},set:function(a){var y=this.flip;y!==a&&(Rh(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:ds},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),Rh(this),this.da.Yr=a,cl(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=Xn.alloc();Lv(this,this.ec,999999,a);var y=a.width;Xn.free(a),a=x1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Oa(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:Bv},set:function(a){var y=this.wrap;y!==a&&(Rh(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:Nv},set:function(a){var y=this.overflow;y!==a&&(Rh(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 Ao&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return pp(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&&(Rh(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&&(Rh(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 qh),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 qh),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 qh),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 qh),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 qh),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&&(Rh(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&&(Rh(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&&(Rh(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&&(Rh(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:mp},set:function(a){var y=this.formatting;y!==a&&(Rh(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&&On(a,"> 0",Qo,"maxLines"),Rh(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 Om=null,Im=null,Fv=new fn(Qo,"None",0),P1=new fn(Qo,"WrapFit",1),Bv=new fn(Qo,"WrapDesiredSize",2),w1=new fn(Qo,"WrapBreakAll",3),Nv=new fn(Qo,"OverflowClip",0),Rm=new fn(Qo,"OverflowEllipsis",1),mp=new fn(Qo,"FormatTrim",0),C1=new fn(Qo,"FormatNone",0),Sx=/[ \u200b\u00ad]/,kv=new zi,E1=0,jm=new zi,Av=0,vp="...",b1="",Nl=null,zm=!1;Qo.className="TextBlock";function Tv(){this.nc=!1,this.Hd=null,this.Xf=In,this.gq=mp,this.Jq=1/0,this.$q=Nv,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=ds,this.$r=Bv}Tv.prototype.copy=function(){var a=new Tv;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},Qo.getEllipsis=function(){return vp},Qo.setEllipsis=function(a){vp=a,jm=new zi,Av=0},Qo.getBaseline=function(){return Om},Qo.setBaseline=function(a){Om=a},Qo.getUnderline=function(){return Im},Qo.setUnderline=function(a){Im=a},Qo.isValidFont=function(a){if(zm||(Nl=Ba?new Gu(null).context:null,zm=!0),Nl===null)return!0;var y=Nl.font;if(a===y||a==="10px sans-serif")return!0;Nl.font="10px sans-serif",Nl.font=a;var x=Nl.font;if(x!=="10px sans-serif")return Nl.font=y,!0;Nl.font="19px serif";var E=Nl.font;return Nl.font=a,x=Nl.font,Nl.font=y,x!==E},Qo.FormatNone=C1,Qo.FormatTrim=mp,Qo.None=Fv,Qo.OverflowClip=Nv,Qo.OverflowEllipsis=Rm,Qo.WrapBreakAll=w1,Qo.WrapDesiredSize=Bv,Qo.WrapFit=P1;function qh(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}qh.prototype.copy=function(){var a=new qh;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},qh.className="GradElementSettings";function kl(a,y){Rt.call(this),this.Eg=null,this.qo="",this.Xg=Ko,this.Nk=zn,this.Zg=this.Hd=null,this.Mk=Qr,this.Xf=In,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 pg;Ot(kl,Rt),kl.prototype.cloneProtected=function(a){Rt.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},kl.prototype.qb=function(a){a===In||a===Ci||a===Kr?this.imageStretch=a:Rt.prototype.qb.call(this,a)},kl.prototype.toString=function(){return"Picture("+this.source+")#"+Bi(this)};function mg(a){a===void 0&&(a=""),a!==""?pg[a]&&(delete pg[a],_m--):(pg=new zi,_m=0)}function M1(a,y){y.qy||(y.Fq=function(x){y.sq=!0,y.ln=!1;var E=y.Bg.copy();if(E!=null){for(E=E.iterator;E.next();){var b=E.value;b.N();var z=y.getAttribute("src")||"",ne=b.Og.I(z);if(ne!==null)for(var re=ne.length,oe=0;oe<re;oe++)z=ne[oe],b.Xn.add(z),z.Uc=!0,b.$b(),y.hn&&(y.eu===void 0&&(y.eu=x),z.Zg!==null&&z.Zg(z,x))}y.Bg.clear()}a.desiredSize.w()||(ls(a,!1),a.v())},y.Yp=function(x){y.ln=x;var E=y.Bg.copy();if(E!=null){for(E=E.iterator;E.next();){var b=E.value,z=y.getAttribute("src")||"",ne=b.Og.I(z);if(ne!==null){b=ne.length,z=qn();for(var re=0;re<b;re++)z.push(ne[re]);if(y.hn)for(re=0;re<b;re++)ne=z[re],ne.Hd!==null&&ne.Hd(ne,x);di(z)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}kl.prototype.hA=function(){if(this.source!==""){mg(this.source);var a=this.source;this.source="",this.source=a}},kl.prototype.redraw=function(){this.N(),this.Uc=!0},kl.prototype.hh=function(a,y){var x=this.Eg;if(x!==null){var E=x.getAttribute("src");if(!(x instanceof HTMLImageElement&&(E===null||E==="")||x.ln instanceof Event&&a instanceof Qd)){var b=a instanceof Jl;E=this.naturalBounds;var z=0,ne=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||E.width,re=re||E.height,oe!==0&&re!==0){var le=oe,ue=re;this.sourceRect.w()&&(z=this.Xg.x,ne=this.Xg.y,oe=this.Xg.width,re=this.Xg.height);var pe=oe,xe=re,Ee=this.Nk,Fe=this.Mk;switch(Ee){case In:if(this.sourceRect.w())break;pe>=E.width&&(z=z+Fe.offsetX+(pe*Fe.x-E.width*Fe.x)),xe>=E.height&&(ne=ne+Fe.offsetY+(xe*Fe.y-E.height*Fe.y)),oe=Math.min(E.width,pe),re=Math.min(E.height,xe);break;case zn:pe=E.width,xe=E.height;break;case Ci:case Kr:Ee===Ci?(Ee=Math.min(E.height/xe,E.width/pe),pe*=Ee,xe*=Ee):Ee===Kr&&(Ee=Math.max(E.height/xe,E.width/pe),pe*=Ee,xe*=Ee,pe>=E.width&&(z=(z+Fe.offsetX+(pe*Fe.x-E.width*Fe.x)/pe)*oe),xe>=E.height&&(ne=(ne+Fe.offsetY+(xe*Fe.y-E.height*Fe.y)/xe)*re),oe*=1/(pe/E.width),re*=1/(xe/E.height),pe=E.width,xe=E.height)}Ee=this.Df()*y.scale;var Oe=pe*Ee*xe*Ee,at=oe*re/Oe,Xe=x.__goCache;Ee=null;var pt=xx;if(!b){if(x.sq&&Xe!==void 0&&4<Oe&&at>pt*pt)for(Xe.gi===null&&(F1(Xe,4,le,ue,x),F1(Xe,16,le,ue,x)),b=Xe.gi,le=b.length,ue=0;ue<le&&b[ue].ratio*b[ue].ratio<at;ue++)Ee=b[ue];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{b=new Gu(null).context;try{b.drawImage(this.Eg,0,0)}catch(wt){this.en=!1}try{b.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(wt){this.vl=!0}}if(this.vl)return}}switch(b=pe<E.width?Fe.offsetX+(E.width*Fe.x-pe*Fe.x):0,Fe=xe<E.height?Fe.offsetY+(E.height*Fe.y-xe*Fe.y):0,this.flip){case io:a.translate(Math.min(E.width,pe),0),a.scale(-1,1);break;case Br:a.translate(0,Math.min(E.height,xe)),a.scale(1,-1);break;case Wo:a.translate(Math.min(E.width,pe),Math.min(E.height,xe)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&Xe!==void 0&&Ee!==null&&Ee.ratio!==1){a.save(),y=Ee.ratio;try{a.drawImage(Ee.source,z/y,ne/y,Math.min(Ee.source.width,oe/y),Math.min(Ee.source.height,re/y),b,Fe,Math.min(E.width,pe),Math.min(E.height,xe)),a instanceof Jl&&(this.bt=[z/y,ne/y,Math.min(Ee.source.width,oe/y),Math.min(Ee.source.height,re/y),b,Fe,Math.min(E.width,pe),Math.min(E.height,xe)])}catch(wt){this.en=!1}a.restore()}else try{a.drawImage(x,z,ne,oe,re,b,Fe,Math.min(E.width,pe),Math.min(E.height,xe)),a instanceof Jl&&(this.bt=[z,ne,oe,re,b,Fe,Math.min(E.width,pe),Math.min(E.height,xe)])}catch(wt){this.en=!1}switch(this.flip){case io:a.scale(-1,1),a.translate(-Math.min(E.width,pe),0);break;case Br:a.scale(1,-1),a.translate(0,-Math.min(E.height,xe));break;case Wo:a.scale(-1,-1),a.translate(-Math.min(E.width,pe),-Math.min(E.height,xe))}}}}},kl.prototype.Wl=function(a,y,x,E){var b=this.desiredSize,z=Bl(this,!0),ne=this.Eg,re=this.qn,oe=0,le=0;(re||!this.al&&ne&&ne.complete)&&(this.al=!0),ne===null?(isFinite(b.width)||(a=0),isFinite(b.height)||(y=0)):(oe=re?+ne.width:ne.naturalWidth,le=re?+ne.height:ne.naturalHeight),isFinite(b.width)||z===zn||z===Ti?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:ne!==null&&(a=oe)),x=0):ne!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:oe),isFinite(b.height)||z===zn||z===Zi?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:ne!==null&&(y=le)),E=0):ne!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:le),isFinite(b.width)&&(a=b.width),isFinite(b.height)&&(y=b.height),b=this.maxSize,z=this.minSize,x=Math.max(x||0,z.width),E=Math.max(E||0,z.height),a=Math.min(b.width,a),y=Math.min(b.height,y),a=Math.max(x,a),y=Math.max(E,y),ne===null||ne.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),Oa(this.dc,a,y),this.Ge(0,0,a,y)},kl.prototype.eh=function(a,y,x,E){ol(this,a,y,x,E)},Ve.Object.defineProperties(kl.prototype,{element:{get:function(){return this.Eg},set:function(a){var y=this.Eg;if(this.Uc=!0,y!==a){this.qn=a instanceof HTMLCanvasElement;var x=a instanceof HTMLImageElement;a===null||x||a instanceof HTMLVideoElement||this.qn||yt("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var E=this.diagram;E!==null&&Xg(E,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new Ln),E!==null&&x&&hd(E,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()||(ls(this,!1),this.v())):x&&M1(this,a)),this.g("element",y,a),this.N()}}},source:{get:function(){return this.qo},set:function(a){var y=this.qo;if(y!==a){this.Uc=!0,this.qo=a;var x=pg;if(Ba){var E=null;if(x[a]!==void 0)E=x[a];else if(a!==""){30<_m&&(mg(),x=pg),E=An("img"),E.hn=!0,M1(this,E);var b=this.rl;b!==null&&(E.crossOrigin=b(this)),E.src=a,x[a]=E,_m++}this.element=E,E!==null&&E.__goCache===void 0&&(E.__goCache=new L1),this.v(),this.N()}this.g("source",y,a)}}},sourceCrossOrigin:{get:function(){return this.rl},set:function(a){if(this.rl!==a&&(this.rl=a,this.element!==null)){var y=this.element.getAttribute("src");a===null&&typeof y=="string"?this.element.crossOrigin=null:a!==null&&(this.element.crossOrigin=a(this)),this.element.src=y}}},sourceRect:{get:function(){return this.Xg},set:function(a){var y=this.Xg;y.D(a)||(this.Xg=a=a.J(),this.N(),this.g("sourceRect",y,a))}},imageStretch:{get:function(){return this.Nk},set:function(a){var y=this.Nk;y!==a&&(this.Nk=a,this.N(),this.g("imageStretch",y,a))}},flip:{get:function(){return this.Xf},set:function(a){var y=this.Xf;y!==a&&(this.Xf=a,this.N(),this.g("flip",y,a))}},imageAlignment:{get:function(){return this.Mk},set:function(a){var y=this.Mk;y.D(a)||(this.Mk=a=a.J(),this.N(),this.g("imageAlignment",y,a))}},errorFunction:{get:function(){return this.Hd},set:function(a){var y=this.Hd;y!==a&&(this.Hd=a,this.g("errorFunction",y,a))}},successFunction:{get:function(){return this.Zg},set:function(a){var y=this.Zg;y!==a&&(this.Zg=a,this.g("successFunction",y,a))}},naturalBounds:{get:function(){return this.dc}}}),kl.prototype.redraw=kl.prototype.redraw,kl.prototype.reloadSource=kl.prototype.hA;var _m=0,xx=4;kl.className="Picture",pg=new zi,kl.clearCache=mg;function L1(){this.gi=null}function F1(a,y,x,E,b){a.gi===null&&(a.gi=[]);var z=new Gu(null),ne=z.context,re=1/y;z.width=x/y,z.height=E/y,z.width!==0&&z.height!==0&&(y=new B1(z.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],b=x.source,x=x.ratio),ne.setTransform(re*x,0,0,re*x,0,0),ne.yc(),ne.drawImage(b,0,0),a.gi.push(y))}L1.className="PictureCacheArray";function B1(a,y){this.source=a,this.ratio=y}B1.className="PictureCacheInstance";function vg(){this.os=new yn,this.mc=null}vg.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new yn,this.mc=null};function yg(a,y,x,E,b,z){a.mc=new ho,a.mc.startX=y,a.mc.startY=x,a.mc.isFilled=E,a.mc.isEvenOdd=z||!1,a.os.figures.add(a.mc),b!==void 0&&(a.mc.isShadowed=b)}function Px(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}vg.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var E=new _i(Ar);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)},vg.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var E=new _i(or);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)};function _c(a,y,x,E,b,z,ne){var re;re===void 0&&(re=!1);var oe=new _i(Cr);oe.point1X=y,oe.point1Y=x,oe.point2X=E,oe.point2Y=b,oe.endX=z,oe.endY=ne,re&&oe.close(),a.mc.segments.add(oe)}function Zm(a,y,x,E,b){var z;z===void 0&&(z=!1);var ne=new _i(Lo);ne.point1X=y,ne.point1Y=x,ne.endX=E,ne.endY=b,z&&ne.close(),a.mc.segments.add(ne)}vg.prototype.arcTo=function(a,y,x,E,b,z,ne){z===void 0&&(z=0),ne===void 0&&(ne=!1);var re=new _i(Rr);re.startAngle=a,re.sweepAngle=y,re.centerX=x,re.centerY=E,re.radiusX=b,re.radiusY=z!==0?z:b,ne&&re.close(),this.mc.segments.add(re)};function wx(a,y,x,E,b,z,ne,re){var oe;oe===void 0&&(oe=!1),y=new _i(tr,ne,re,y,x,E,b,z),oe&&y.close(),a.mc.segments.add(y)}function N1(a){var y=Hm;return y!==null?(Hm=null,y.reset(a),y):(y=new vg,y.reset(a),y)}var Hm=null;vg.className="StreamGeometryContext";function tl(a,y){var x=a.toLowerCase(),E=it.Ze;E[a]=y,E[x]=a}tl("Rectangle",function(a,y,x){a="r"+y+","+x;var E=it.Mf[a];return E!==void 0||(E=new yn(yn.u),E.endX=y,E.endY=x,it.Nf<it.vm&&(it.Mf[a]=E,it.Nf++)),E}),tl("Square",function(a,y,x){a="s"+y+","+x;var E=it.Mf[a];return E!==void 0||(E=new yn(yn.u),E.endX=y,E.endY=x,E.defaultStretch=Ci,it.Nf<it.vm&&(it.Mf[a]=E,it.Nf++)),E}),tl("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 E="rr"+y+","+x+","+a,b=it.Mf[E];if(b!==void 0)return b;var z=a*it.wg;return b=new yn().add(new ho(a,0,!0).add(new _i(or,y-a,0)).add(new _i(Cr,y,a,y-z,0,y,z)).add(new _i(or,y,x-a)).add(new _i(Cr,y-a,x,y,x-z,y-z,x)).add(new _i(or,a,x)).add(new _i(Cr,0,x-a,z,x,0,x-z)).add(new _i(or,0,a)).add(new _i(Cr,a,0,0,z,z,0).close())),1<z&&(b.spot1=new bi(0,0,z,z),b.spot2=new bi(1,1,-z,-z)),it.Nf<it.vm&&(it.Mf[E]=b,it.Nf++),b}),tl("Border","RoundedRectangle"),tl("Ellipse",function(a,y,x){a="e"+y+","+x;var E=it.Mf[a];return E!==void 0||(E=new yn(yn.F),E.endX=y,E.endY=x,E.spot1=Gs,E.spot2=$s,it.Nf<it.vm&&(it.Mf[a]=E,it.Nf++)),E}),tl("Circle",function(a,y,x){a="c"+y+","+x;var E=it.Mf[a];return E!==void 0||(E=new yn(yn.F),E.endX=y,E.endY=x,E.spot1=Gs,E.spot2=$s,E.defaultStretch=Ci,it.Nf<it.vm&&(it.Mf[a]=E,it.Nf++)),E}),tl("TriangleRight",function(a,y,x){return new yn().add(new ho(0,0).add(new _i(or,y,.5*x)).add(new _i(or,0,x).close())).pm(0,.25,.5,.75)}),tl("TriangleDown",function(a,y,x){return new yn().add(new ho(0,0).add(new _i(or,y,0)).add(new _i(or,.5*y,x).close())).pm(.25,0,.75,.5)}),tl("TriangleLeft",function(a,y,x){return new yn().add(new ho(y,x).add(new _i(or,0,.5*x)).add(new _i(or,y,0).close())).pm(.5,.25,1,.75)}),tl("TriangleUp",function(a,y,x){return new yn().add(new ho(y,x).add(new _i(or,0,x)).add(new _i(or,.5*y,0).close())).pm(.25,.5,.75,1)}),tl("Triangle","TriangleUp"),tl("Diamond",function(a,y,x){return new yn().add(new ho(.5*y,0).add(new _i(or,0,.5*x)).add(new _i(or,.5*y,x)).add(new _i(or,y,.5*x).close())).pm(.25,.25,.75,.75)}),tl("LineH",function(a,y,x){return a=new yn(yn.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),tl("LineV",function(a,y,x){return a=new yn(yn.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),tl("None","Rectangle"),tl("BarH","Rectangle"),tl("BarV","Rectangle"),tl("MinusLine","LineH"),tl("PlusLine",function(a,y,x){return new yn().add(new ho(0,x/2,!1).add(new _i(or,y,x/2)).add(new _i(Ar,y/2,0)).add(new _i(or,y/2,x)))}),tl("XLine",function(a,y,x){return new yn().add(new ho(0,x,!1).add(new _i(or,y,0)).add(new _i(Ar,0,0)).add(new _i(or,y,x)))}),tl("LineRight",function(a,y,x){return new yn().add(new ho(.25*y,0,!1).add(new _i(or,.75*y,.5*x)).add(new _i(or,.25*y,x)))}),tl("LineDown",function(a,y,x){return new yn().add(new ho(0,.25*x,!1).add(new _i(or,.5*y,.75*x)).add(new _i(or,y,.25*x)))}),tl("LineLeft",function(a,y,x){return new yn().add(new ho(.75*y,0,!1).add(new _i(or,.25*y,.5*x)).add(new _i(or,.75*y,x)))}),tl("LineUp",function(a,y,x){return new yn().add(new ho(0,.75*x,!1).add(new _i(or,.5*y,.25*x)).add(new _i(or,y,.75*x)))}),it.um={"":"",Standard:"F1 m 0,0 l 8,4 -8,4 2,-4 z",Backward:"F1 m 8,0 l -2,4 2,4 -8,-4 z",Triangle:"F1 m 0,0 l 8,4.62 -8,4.62 z",BackwardTriangle:"F1 m 8,4 l 0,4 -8,-4 8,-4 0,4 z",Boomerang:"F1 m 0,0 l 8,4 -8,4 4,-4 -4,-4 z",BackwardBoomerang:"F1 m 8,0 l -8,4 8,4 -4,-4 4,-4 z",SidewaysV:"m 0,0 l 8,4 -8,4 0,-1 6,-3 -6,-3 0,-1 z",BackwardV:"m 8,0 l -8,4 8,4 0,-1 -6,-3 6,-3 0,-1 z",OpenTriangle:"m 0,0 l 8,4 -8,4",BackwardOpenTriangle:"m 8,0 l -8,4 8,4",OpenTriangleLine:"m 0,0 l 8,4 -8,4 m 8.5,0 l 0,-8",BackwardOpenTriangleLine:"m 8,0 l -8,4 8,4 m -8.5,0 l 0,-8",OpenTriangleTop:"m 0,0 l 8,4 m 0,4",BackwardOpenTriangleTop:"m 8,0 l -8,4 m 0,4",OpenTriangleBottom:"m 0,8 l 8,-4",BackwardOpenTriangleBottom:"m 0,4 l 8,4",HalfTriangleTop:"F1 m 0,0 l 0,4 8,0 z m 0,8",BackwardHalfTriangleTop:"F1 m 8,0 l 0,4 -8,0 z m 0,8",HalfTriangleBottom:"F1 m 0,4 l 0,4 8,-4 z",BackwardHalfTriangleBottom:"F1 m 8,4 l 0,4 -8,-4 z",ForwardSemiCircle:"m 4,0 b 270 180 0 4 4",BackwardSemiCircle:"m 4,8 b 90 180 0 -4 4",Feather:"m 0,0 l 3,4 -3,4",BackwardFeather:"m 3,0 l -3,4 3,4",DoubleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardDoubleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4",TripleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardTripleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4 m 3,-8 l -3,4 3,4",ForwardSlash:"m 0,8 l 5,-8",BackSlash:"m 0,0 l 5,8",DoubleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8",DoubleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8",TripleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8 m -2,8 l 4,-8",TripleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8 m -2,-8 l 4,8",Fork:"m 0,4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4",LineFork:"m 0,0 l 0,8 m 0,-4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardLineFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4 m 8,-8 l 0,8",CircleFork:"F1 m 6,4 b 0 360 -3 0 3 z m 0,0 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 6,0 b 0 360 -3 0 3",CircleLineFork:"F1 m 6,4 b 0 360 -3 0 3 z m 1,-4 l 0,8 m 0,-4 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleLineFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 0,-4 l 0,8 m 7,-4 b 0 360 -3 0 3",Circle:"F1 m 8,4 b 0 360 -4 0 4 z",Block:"F1 m 0,0 l 0,8 8,0 0,-8 z",StretchedDiamond:"F1 m 0,3 l 5,-3 5,3 -5,3 -5,-3 z",Diamond:"F1 m 0,4 l 4,-4 4,4 -4,4 -4,-4 z",Chevron:"F1 m 0,0 l 5,0 3,4 -3,4 -5,0 3,-4 -3,-4 z",StretchedChevron:"F1 m 0,0 l 8,0 3,4 -3,4 -8,0 3,-4 -3,-4 z",NormalArrow:"F1 m 0,2 l 4,0 0,-2 4,4 -4,4 0,-2 -4,0 z",X:"m 0,0 l 8,8 m 0,-8 l -8,8",TailedNormalArrow:"F1 m 0,0 l 2,0 1,2 3,0 0,-2 2,4 -2,4 0,-2 -3,0 -1,2 -2,0 1,-4 -1,-4 z",DoubleTriangle:"F1 m 0,0 l 4,4 -4,4 0,-8 z m 4,0 l 4,4 -4,4 0,-8 z",BigEndArrow:"F1 m 0,0 l 5,2 0,-2 3,4 -3,4 0,-2 -5,2 0,-8 z",ConcaveTailArrow:"F1 m 0,2 h 4 v -2 l 4,4 -4,4 v -2 h -4 l 2,-2 -2,-2 z",RoundedTriangle:"F1 m 0,1 a 1,1 0 0 1 1,-1 l 7,3 a 0.5,1 0 0 1 0,2 l -7,3 a 1,1 0 0 1 -1,-1 l 0,-6 z",SimpleArrow:"F1 m 1,2 l -1,-2 2,0 1,2 -1,2 -2,0 1,-2 5,0 0,-2 2,2 -2,2 0,-2 z",AccelerationArrow:"F1 m 0,0 l 0,8 0.2,0 0,-8 -0.2,0 z m 2,0 l 0,8 1,0 0,-8 -1,0 z m 3,0 l 2,0 2,4 -2,4 -2,0 0,-8 z",BoxArrow:"F1 m 0,0 l 4,0 0,2 2,0 0,-2 2,4 -2,4 0,-2 -2,0 0,2 -4,0 0,-8 z",TriangleLine:"F1 m 8,4 l -8,-4 0,8 8,-4 z m 0.5,4 l 0,-8",CircleEndedArrow:"F1 m 10,4 l -2,-3 0,2 -2,0 0,2 2,0 0,2 2,-3 z m -4,0 b 0 360 -3 0 3 z",DynamicWidthArrow:"F1 m 0,3 l 2,0 2,-1 2,-2 2,4 -2,4 -2,-2 -2,-1 -2,0 0,-2 z",EquilibriumArrow:"m 0,3 l 8,0 -3,-3 m 3,5 l -8,0 3,3",FastForward:"F1 m 0,0 l 3.5,4 0,-4 3.5,4 0,-4 1,0 0,8 -1,0 0,-4 -3.5,4 0,-4 -3.5,4 0,-8 z",Kite:"F1 m 0,4 l 2,-4 6,4 -6,4 -2,-4 z",HalfArrowTop:"F1 m 0,0 l 4,4 4,0 -8,-4 z m 0,8",HalfArrowBottom:"F1 m 0,8 l 4,-4 4,0 -8,4 z",OpposingDirectionDoubleArrow:"F1 m 0,4 l 2,-4 0,2 4,0 0,-2 2,4 -2,4 0,-2 -4,0 0,2 -2,-4 z",PartialDoubleTriangle:"F1 m 0,0 4,3 0,-3 4,4 -4,4 0,-3 -4,3 0,-8 z",LineCircle:"F1 m 0,0 l 0,8 m 7 -4 b 0 360 -3 0 3 z",DoubleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",TripleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",CircleLine:"F1 m 6 4 b 0 360 -3 0 3 z m 1,-4 l 0,8",DiamondCircle:"F1 m 8,4 l -4,4 -4,-4 4,-4 4,4 m 8,0 b 0 360 -4 0 4 z",PlusCircle:"F1 m 8,4 b 0 360 -4 0 4 l -8 0 z m -4 -4 l 0 8",OpenRightTriangleTop:"m 8,0 l 0,4 -8,0 m 0,4",OpenRightTriangleBottom:"m 8,8 l 0,-4 -8,0",Line:"m 0,0 l 0,8",DoubleLine:"m 0,0 l 0,8 m 2,0 l 0,-8",TripleLine:"m 0,0 l 0,8 m 2,0 l 0,-8 m 2,0 l 0,8",PentagonArrow:"F1 m 8,4 l -4,-4 -4,0 0,8 4,0 4,-4 z"};function Dv(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=na,this.ir=null,this.jr="",this.lr=Co,this.Gq="",this.Hq=cs,this.Pq=Zo,this.Kq=ga,this.Up=null,this.Cq=127,this.zr=Pa,this.yr="gray",this.Vg=4}Dv.prototype.copy=function(){var a=new Dv;return a.zq=this.zq,a.Kp=this.Kp,a.tr=this.tr,a.vr=this.vr,a.ur=this.ur,a.oq=this.oq,a.fr=this.fr,a.hr=this.hr,a.gr=this.gr.J(),a.ir=this.ir,a.jr=this.jr,a.lr=this.lr.J(),a.Gq=this.Gq,a.Hq=this.Hq.J(),a.Pq=this.Pq.J(),a.Kq=this.Kq.J(),a.Up=this.Up,a.Cq=this.Cq,a.zr=this.zr.J(),a.yr=this.yr,a.Vg=this.Vg,a};function Oi(a,y){a===void 0||a instanceof gs||typeof a=="string"?Hn.call(this,a):(Hn.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 gn,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Ot(Oi,Hn),Oi.prototype.cloneProtected=function(a){Hn.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=Oi.prototype,Le.Af=function(a){Hn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},Le.toString=function(){var a=li(this.constructor)+"#"+Bi(this);return this.data!==null&&(a+="("+Ai(this.data)+")"),a};function Al(a){a.P===null?a.P=new Dv:a.P.nc&&(a.P=a.P.copy())}Le.th=function(){Hn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},Le.gk=function(a,y,x,E,b,z,ne){var re=this.diagram;re!==null&&(a===ko&&y==="elements"?b instanceof Hn?qd(b,function(oe){sy(re.partManager,oe),$d(re,oe)}):hd(re,b):a===Yo&&y==="elements"&&(b instanceof Hn?qd(b,function(oe){ly(re.partManager,oe,re)}):Xg(re,b)),re.cb(a,y,x,E,b,z,ne))},Le.La=function(a){if(Hn.prototype.La.call(this,a),this.data!==null){for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];b instanceof Hn&&qd(b,function(z){z.data!==null&&z.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},Oi.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},Oi.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},Oi.prototype.bh=function(a,y){if(y!==null){var x=null,E=this.Qf;if(E!==null&&(x=E.I(a)),x!==y){if(x!==null){var b=x.diagram;b!==null&&b.remove(x)}E===null&&(this.Qf=E=new xi),y.Tf!==a&&(y.category=a),E.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)))}}},Oi.prototype.Jf=function(a){var y=this.Qf;if(y!==null){var x=y.I(a);if(x!==null){var E=x.diagram;E!==null&&E.remove(x)}y.remove(a),y.count===0&&(this.Qf=null)}},Oi.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=qn();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);di(y)}},Oi.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 gr?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof lo))break e;$u(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=Hn.Link),x.adornedObject=y)}if(x!==null){x.type===Hn.Link&&x.v(),this.bh("Selection",x);break e}}this.Jf("Selection")}for(Cx(this,a),y=this.adornments;y.next();)y.value.La()}},Oi.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function Ov(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 Wm(a){if(gd(a)===!1){Rv(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function k1(a){if(a.G|=2097152,gd(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||D1(a,y,x),x=a.Ib;var E=gn.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(E,x),gn.free(E),Rv(a,!1)}}Oi.prototype.Ge=function(a,y,x,E){var b=this.uc;b.h(a,y,x,E),this.Lb===null&&(this.Lb=new _t);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),this.Lb=z,z.ws()||z.pp(b)},Oi.prototype.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=Qr;this.locationSpot.sb()&&(z=this.locationSpot);var ne=tt.alloc();if(this.locationObject!==this)for(y=this.locationObject,x=y.naturalBounds,ne.yi(x.x,x.y,x.width,x.height,z),y.Lb!==null&&y.Lb.Ga(ne),ne.offset(-y.measuredBounds.x,-y.measuredBounds.y),z=y.panel;z!==null&&z!==this;)z.Lb!==null&&z.Lb.Ga(ne),ne.offset(-z.measuredBounds.x,-z.measuredBounds.y),z=z.panel;else ne.yi(y,x,E,b,z);a.rotate(this.Kb,ne.x,ne.y),tt.free(ne)}},Oi.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},Oi.prototype.moveTo=function(a,y,x){a=tt.allocAt(a,y),this.move(a,x),tt.free(a)},Oi.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())},Oi.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())},Oi.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new xi),y.I(a)!==null)return y.I(a);var x=Hn.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function Zc(a,y,x,E){E===void 0&&(E=new tt),x=x.Mc()?Qr:x;var b=y.naturalBounds;if(E.h(b.width*x.x+x.offsetX,b.height*x.y+x.offsetY),y===null||y===a)return E;for(y.transform.Ga(E),y=y.panel;y!==null&&y!==a;)y.transform.Ga(E),y=y.panel;return a.Lb!==null&&a.Lb.Ga(E),E.offset(-a.uc.x,-a.uc.y),E}Oi.prototype.mi=function(a){return a===void 0&&(a=new gn),a.assign(this.actualBounds)},Oi.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function A1(a){var y=tt.alloc(),x=a.locationObject,E=x.naturalBounds,b=x instanceof Er?x.strokeWidth:0;if(y.yi(0,0,E.width+b,E.height+b,a.locationSpot),x!==a)for(y.offset(-b/2,-b/2),x.transform.Ga(y),x=x.panel;x!==null&&x!==a;)x.transform.Ga(y),x=x.panel;return a.Lb!==null&&a.Lb.Ga(y),y.offset(-a.uc.x,-a.uc.y),y}function nf(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=u1(a));var E=a.ag,b=2*E;if(!a.isShadowed)return x.h(y.x-1-E,y.y-1-E,y.width+2+b,y.height+2+b),x;E=y.x,b=y.y;var z=y.width;y=y.height;var ne=a.shadowBlur;return a=a.shadowOffset,z+=ne,y+=ne,E-=ne/2,b-=ne/2,0<a.x?z+=a.x:(E+=a.x,z-=a.x),0<a.y?y+=a.y:(b+=a.y,y-=a.y),x.h(E-1,b-1,z+2,y+2),x}Oi.prototype.arrange=function(){if(dl(this)===!1)k1(this);else{Yh(this,!1);var a=this.Ib,y=gn.alloc();y.assign(a);var x=pd(this);this.eh(0,0,this.uc.width,this.uc.height);var E=this.position;D1(this,E,this.location),a.ka(),a.x=E.x,a.y=E.y,a.freeze(),this.Xl(y,a),y.D(a)?this.Fd(x):!this.Zc()||it.B(y.width,a.width)&&it.B(y.height,a.height)||0<=this.vw&&this.C(16),gn.free(y),Rv(this,!1)}},Le=Oi.prototype,Le.Xl=function(a,y){var x=this.diagram;if(x!==null){var E=!1;if(x.Zi===!1&&a.w()){var b=gn.alloc();b.assign(x.documentBounds),b.Fv(x.padding),a.x>b.x&&a.y>b.y&&a.right<b.right&&a.bottom<b.bottom&&y.x>b.x&&y.y>b.y&&y.right<b.right&&y.bottom<b.bottom&&(E=!0),gn.free(b)}!(this.G&65536)&&a.D(y)||R1(this,E,x),x.N(),!a.w()&&!y.w()||wl(a,y)||(this instanceof oi&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},Le.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var E=this.diagram;return E!==null&&T1(this,E,a,y,x),this.pa=a,this.G&=-2097153,!this.ke.w()||E!==null&&!E.animationManager.isTicking&&E.undoManager.isUndoingRedoing||(E=this.ke,this.ke=new tt(E.x+(a.x-y),E.y+(a.y-x)),this.g("location",E,this.ke.copy())),gd(this)===!1&&dl(this)===!1&&(Wm(this),k1(this)),!0};function T1(a,y,x,E,b){y===null||a instanceof lo||(y=y.animationManager,y.zb&&fh(y,a,new tt(E,b),x))}Le.mm=function(a,y,x){var E=this.ke,b=this.pa;if(x){if(E.x===a&&E.y===y)return;gd(this)||dl(this)?b.h(NaN,NaN):b.h(b.x+a-E.x,b.y+y-E.y),E.h(a,y)}else{if(b.x===a&&b.y===y)return;E.h(E.x+a-b.x,E.y+y-b.y),b.h(a,y)}Wm(this)},Le.Av=function(){this.G&=-2097153,Wm(this)};function D1(a,y,x){var E=A1(a),b=a.diagram,z=x.w(),ne=y.w();z&&ne?a.G&2097152?O1(a,y,x,b,E):I1(a,y,x,b,E):z?O1(a,y,x,b,E):ne&&I1(a,y,x,b,E),a.G|=2097152,tt.free(E),a.Uk()}function O1(a,y,x,E,b){var z=y.x,ne=y.y;y.h(x.x-b.x,x.y-b.y),E!==null&&(x=E.animationManager,(E=x.defaultAnimation.isAnimating)||!x.zb||a instanceof lo||fh(x,a,new tt(z,ne),y),E||y.x===z&&y.y===ne||a.g("position",new tt(z,ne),y.copy()))}function I1(a,y,x,E,b){var z=x.copy();x.h(y.x+b.x,y.y+b.y),x.D(z)||E===null||a.g("location",z,x.copy())}function R1(a,y,x){jv(a,!1),a instanceof oi&&Dc(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var E=x.viewportBounds;E.w()?pd(a)?(Cl(y,E)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(E)?(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 Iv(a,y,x,E){y.constructor===a.constructor||_1||(_1=!0,ri('Should not change the class of the Part when changing category from "'+x+'" to "'+E+'"'),ri(" Old class: "+li(a.constructor)+", new class: "+li(y.constructor)+", part: "+a.toString())),a.Ej();var b=a.data;x=a.layerName;var z=a.isSelected,ne=a.isHighlighted,re=!0,oe=!0,le=!1;a instanceof oi&&(re=a.isTreeLeaf,oe=a.isTreeExpanded,le=a.wasTreeExpanded),y.Af(a),y.cloneProtected(a),a.Tf=E,a.svg!==null&&(a.svg.remove(),a.svg=null,a.Uc=!0),a.v(),a.N(),y=a.diagram,E=!0,y!==null&&(E=y.skipsUndoManager,y.skipsUndoManager=!0),a.ub=b,a.G=z?a.G|4096:a.G&-4097,a.G=ne?a.G|524288:a.G&-524289,a instanceof oi&&(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),b!==null&&a.La(),b=a.layerName,b!==x&&(a.Jg=x,a.layerName=b),y!==null&&(y.skipsUndoManager=E),a.Zc()&&a.C(64)}Oi.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},Oi.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},Oi.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},Oi.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},Oi.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},Oi.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},Oi.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},Oi.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},Oi.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 gd(a){return(a.G&32768)!==0}function Rv(a,y){a.G=y?a.G|32768:a.G&-32769}function jv(a,y){a.G=y?a.G|65536:a.G&-65537}function pd(a){return(a.G&131072)!==0}Le=Oi.prototype,Le.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function Gm(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&&!dl(this)&&!gd(this)&&this.isVisible()&&this.Ib.w()&&a.N(nf(this,this.Ib))},Le.v=function(){Hn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof oi&&this.labeledLink!==null&&cl(this.labeledLink),a.$b(!0))},Le.Vo=function(a){a||(a=this.Ah,a!==null&&Gv(a,this))},Le.Wo=function(a){a||(a=this.Ah,a!==null&&$v(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 zv(this,this)};function zv(a,y){var x=y.containingGroup;return x!==null?1+zv(a,x):y instanceof oi&&(y=y.labeledLink,y!==null)?zv(a,y):0}Le.sz=function(){return j1(this,this)};function j1(a,y){var x=y.containingGroup;return x!==null||y instanceof oi&&(x=y.labeledLink,x!==null)?j1(a,x):y}Le.Td=function(a){return a instanceof gr?_v(this,this,a):!1};function _v(a,y,x){if(y===x||x===null)return!1;var E=y.containingGroup;return E===null||E!==x&&!_v(a,E,x)?y instanceof oi&&(y=y.labeledLink,y!==null)?_v(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 gr&&Gm(y,!0),y instanceof oi){var x=y.labeledLink;x!==null&&(y=x)}y=y.containingGroup}for(x=null,y=a;y!==null;){if(y.G&1048576){x=y;break}y instanceof oi&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof gr&&Gm(y,!1),y instanceof oi&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},Oi.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof oi&&this.isLinkLabel)},Oi.prototype.C=function(a){if(a===void 0&&(a=16777215),this.isLayoutPositioned&&a&this.layoutConditions){var y=this.layer;y!==null&&y.isTemporary||this instanceof oi&&this.isLinkLabel?y=!1:(y=this.diagram,y=!(y!==null&&y.undoManager.isUndoingRedoing))}else y=!1;if(y)if(y=this.Ah,y!==null){var x=y.layout;x!==null?x.C():y.C(a)}else a=this.diagram,a!==null&&(a=a.layout,a!==null&&a.C())};function z1(a){return a.isVisible()?(a=a.layer,!(a!==null&&a.isTemporary)):!1}function md(a,y,x,E,b,z){if(z===void 0&&(z=null),!(a.contains(y)||z!==null&&!z(y)||y instanceof lo)){if(a.add(y),y instanceof oi){if(x&&y instanceof gr)for(var ne=y.memberParts;ne.next();)md(a,ne.value,x,E,b,z);if(b!==!1)for(ne=y.linksConnected;ne.next();){var re=ne.value;if(!a.contains(re)){var oe=re.fromNode,le=re.toNode;oe=oe===null||a.contains(oe),le=le===null||a.contains(le),(b?oe&&le:oe||le)&&md(a,re,x,E,b,z)}}if(1<E)for(y=y.Ou();y.next();)md(a,y.value,x,E-1,b,z)}else if(y instanceof Kn)for(y=y.labelNodes;y.next();)md(a,y.value,x,E,b,z)}}Ve.Object.defineProperties(Oi.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?ur: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 E=y.pc(-1,this,!0);if(0<=E&&x.cb(Yo,"parts",y,this,null,E,!0),E=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=E&&x.cb(ko,"parts",a,null,this,!0,E),E=this.layerChanged,E!==null){var b=x.aa;x.aa=!0,E(this,y,a),x.aa=b}}}}},layerChanged:{get:function(){return this.P!==null?this.P.zq:null},set:function(a){var y=this.layerChanged;y!==a&&(Al(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 lo?this.type!==Hn.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:Zo},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),Al(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:ga},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),Al(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&&(Al(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:cs},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),Al(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,E=this.ke;if(!(E.x===y||isNaN(E.x)&&isNaN(y))||!(E.y===x||isNaN(E.y)&&isNaN(x))){if(a=a.copy(),y=a,this.ph())y=!1;else{if(this.ke=y,this.G|=2097152,dl(this)===!1&&(Wm(this),x=this.pa,x.w())){var b=this.diagram;if(b===null||b.animationManager.isTicking||!b.undoManager.isUndoingRedoing){var z=x.copy();x.h(x.x+(y.x-E.x),x.y+(y.y-E.y)),T1(this,b,x,z.x,z.y),this.g("position",z,x.copy())}}y=!0}y&&this.g("location",E,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,E=this.data,b=null;if(x!==null&&E!==null&&!(this instanceof lo)){var z=x.model.undoManager;z.isEnabled&&!z.isUndoingRedoing&&(b=this.clone(),b.O.addAll(this.O))}this.Tf=a,this.g("category",y,a),x===null||E===null||this instanceof lo?this instanceof lo&&(b=this.adornedPart,b!==null&&(a=b.Qf,a!==null&&a.remove(y),b.bh(this.category,this))):(z=x.model,z.undoManager.isUndoingRedoing||(this.ph()?(x.partManager.setLinkCategoryForData(E,a),x=x.partManager.findLinkTemplateForCategory(a),x!==null&&($u(x),x=x.copy(),x!==null&&Iv(this,x,y,a))):(z!==null&&z.jm(E,a),x=cS(x.partManager,E,a),x!==null&&($u(x),x=x.copy(),x===null||x instanceof Kn||(E=this.location.copy(),Iv(this,x,y,a),this.location.w()||(this.location=E)))),b!==null&&(y=this.clone(),y.O.addAll(this.O),this.g("self",b,y))))}}},self:{get:function(){return this},set:function(a){Iv(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 E=!1;if(x!==null){E=x.skipsUndoManager,x.skipsUndoManager=!0;var b=x.selection;b.ka(),a?b.add(this):b.remove(this),b.freeze()}this.g("isSelected",y,a),this.Wb(),a=this.selectionChanged,a!==null&&a(this),x!==null&&(x.$b(),x.skipsUndoManager=E)}}}},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&&(Al(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&&(Al(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&&(Al(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 Kn?(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&&(Al(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&&(Al(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&&(Al(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:na},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),Al(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&&(Al(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&&(Al(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:Co},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),Al(this),this.P.lr=a,this.g("rotationSpot",y,a))}},text:{get:function(){return this.ec},set:function(a){var y=this.ec;y!==a&&(this.ec=a,this.g("text",y,a))}},containingGroup:{get:function(){return this.Ah},set:function(a){if(this.Zc()){var y=this.Ah;if(y!==a){a===null||this!==a&&!a.Td(this)||(this===a&&yt("Cannot make a Group a member of itself: "+this.toString()),yt("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?$v(y,this):this instanceof gr&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?Gv(a,this):this instanceof gr&&x!==null&&x.ai.add(this),this.C(1),x!==null&&x.aa){var E=this.data,b=x.model;if(E!==null&&b.Xj()){var z=b.wa(a!==null?a.data:null);b.mp(E,z)}}if(E=this.containingGroupChanged,E!==null&&(b=!0,x!==null&&(b=x.aa,x.aa=!0),E(this,y,a),x!==null&&(x.aa=b)),this instanceof gr){for(x=new Ln,md(x,this,!0,0,!0),x=x.iterator;x.next();)if(E=x.value,E instanceof oi)for(E=E.linksConnected;E.next();)Sg(E.value)}if(this instanceof oi){for(x=this.linksConnected;x.next();)Sg(x.value);x=this.labeledLink,x!==null&&Sg(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&Zu(y,-1,a))}}else yt("cannot set the Part.containingGroup of a Link or Adornment")}},containingGroupChanged:{get:function(){return this.P!==null?this.P.Kp:null},set:function(a){var y=this.containingGroupChanged;y!==a&&(Al(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof oi&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(Al(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&&(Al(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:Pa},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),Al(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&&(Al(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&&(Al(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),Oi.prototype.invalidateLayout=Oi.prototype.C,Oi.prototype.findCommonContainingGroup=Oi.prototype.px,Oi.prototype.isMemberOf=Oi.prototype.Td,Oi.prototype.findTopLevelPart=Oi.prototype.sz,Oi.prototype.findSubGraphLevel=Oi.prototype.oz,Oi.prototype.ensureBounds=Oi.prototype.Va,Oi.prototype.getDocumentBounds=Oi.prototype.mi,Oi.prototype.findObject=Oi.prototype.fb,Oi.prototype.moveTo=Oi.prototype.moveTo,Oi.prototype.invalidateAdornments=Oi.prototype.Wb,Oi.prototype.clearAdornments=Oi.prototype.Ej,Oi.prototype.removeAdornment=Oi.prototype.Jf,Oi.prototype.addAdornment=Oi.prototype.bh,Oi.prototype.findAdornment=Oi.prototype.Pj,Oi.prototype.updateTargetBindings=Oi.prototype.La;var _1=!1;Oi.className="Part",Oi.LayoutNone=0,Oi.LayoutAdded=1,Oi.LayoutRemoved=2,Oi.LayoutShown=4,Oi.LayoutHidden=8,Oi.LayoutNodeSized=16,Oi.LayoutGroupLayout=32,Oi.LayoutNodeReplaced=64,Oi.LayoutStandard=127,Oi.LayoutAll=16777215;function lo(a,y){a===void 0||a instanceof gs||typeof a=="string"?Oi.call(this,a):(Oi.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)}Ot(lo,Oi),lo.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},lo.prototype.updateRelationshipsFromData=function(){},lo.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof Kn&&y instanceof Er){y=x.path,x.Ul(a),a=y.geometry,x=this.O.s,y=x.length;for(var E=0;E<y;E++){var b=x[E];b.isPanelMain&&b instanceof Er&&(b.ua=a)}}},lo.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!dl(a))},lo.prototype.Zc=function(){return!1},lo.prototype.gk=function(a,y,x,E,b,z,ne){if(a===ko&&y==="elements"){if(b instanceof gl)this.$a===null&&(this.$a=b);else if(b instanceof Hn){var re=b.Nl(function(oe){return oe instanceof gl});re instanceof gl&&this.$a===null&&(this.$a=re)}}else a===Yo&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof Hn&&this.$a.rg(E)&&(this.$a=null));Oi.prototype.gk.call(this,a,y,x,E,b,z,ne)},lo.prototype.updateAdornments=function(){},lo.prototype.Lj=function(){},Ve.Object.defineProperties(lo.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}}}),lo.className="Adornment";function Zv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=El,this.er=Vm,this.Kr=this.ij=this.Nq=this.Mq=null}Zv.prototype.copy=function(){var a=new Zv;return a.Dq=this.Dq,a.Eq=this.Eq,a.gj=this.gj,a.Vr=this.Vr,a.yp=this.yp.J(),a.er=this.er,a.Mq=this.Mq,a.Nq=this.Nq,a.ij=this.ij,a.Kr=this.Kr,a};function oi(a,y){a===void 0||a instanceof gs||typeof a=="string"?Oi.call(this,a):(Oi.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new Nn,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}Ot(oi,Oi),oi.prototype.cloneProtected=function(a){Oi.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},Le=oi.prototype,Le.Af=function(a){Oi.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function Hc(a){a.Ba===null?a.Ba=new Zv:a.Ba.nc&&(a.Ba=a.Ba.copy())}Le.th=function(){Oi.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function Z1(a,y){y!==null&&(a.af===null&&(a.af=new Ln),a.af.add(y))}function H1(a,y,x,E){if(y===null||a.af===null)return null;for(var b=a.af.iterator;b.next();){var z=b.value;if(z.Ds===a&&z.cv===y&&z.Ox===x&&z.Px===E||z.Ds===y&&z.cv===a&&z.Ox===E&&z.Px===x)return z}return null}Le.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=H1(this,a,y,x),a!==null&&a.Sl()},Le.gk=function(a,y,x,E,b,z,ne){a===ko&&y==="elements"?this.wc=null:a===Yo&&y==="elements"&&(this.wc=null),Oi.prototype.gk.call(this,a,y,x,E,b,z,ne)},Le.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(Ql(x.fromPort),Ql(x.toPort),x.bb())}};function W1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(Ql(x.fromPort),Ql(x.toPort),x.bb())}}function Ql(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||Ql(y.port)}}Le.si=function(){return!0},oi.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},oi.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},oi.prototype.isVisible=function(){if(!Oi.prototype.isVisible.call(this))return!1;var a=!0,y=Ic,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===Ic){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===ss){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(E){return!E.isTreeExpanded}))return!1}else if(y===rg&&(a=a?this.Oo():this.Po(),0<a.count&&a.any(function(E){return!E.isTreeExpanded})))return!1;return a=this.labeledLink,a!==null?a.isVisible():!0},oi.prototype.Zb=function(a){Oi.prototype.Zb.call(this,a);for(var y=this.linksConnected;y.next();){var x=y.value;if(a&&this.containingGroup!==null){var E=x.To(this);E===null||E.Td(this.containingGroup)||x.bb()}x.Zb(a)}},oi.prototype.qx=function(){var a=new Ln,y=new Ln;return G1(this,this,a,y),y.iterator};function G1(a,y,x,E){if(y!==null&&!x.has(y)){x.add(y);var b=!0,z=a.diagram;z!==null&&(b=z.isTreePathToChildren),y.linksConnected.each(function(ne){ne.isTreeLink?(b?ne.fromNode===y:ne.toNode===y)&&G1(a,b?ne.toNode:ne.fromNode,x,E):E.add(ne)})}}oi.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new rr(this.jb),x=this;return y.predicate=function(E){return E.fromNode===x&&E.fromPortId===a||E.toNode===x&&E.toPortId===a},y},Le=oi.prototype,Le.Mo=function(a){a===void 0&&(a=null);var y=new rr(this.jb),x=this;return y.predicate=function(E){return E.fromNode!==x?!1:a===null?!0:E.fromPortId===a},y},Le.Sd=function(a){a===void 0&&(a=null);var y=new rr(this.jb),x=this;return y.predicate=function(E){return E.toNode!==x?!1:a===null?!0:E.toPortId===a},y},Le.Mu=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.fromNode===this?(a===null||b.fromPortId===a)&&(b=b.toNode,y!==null?y.add(b):x!==null&&x!==b?(y=new Ln,y.add(x),y.add(b)):x=b):b.toNode!==this||a!==null&&b.toPortId!==a||(b=b.fromNode,y!==null?y.add(b):x!==null&&x!==b?(y=new Ln,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new Qi(x):ur},Le.Po=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.fromNode!==this||a!==null&&b.fromPortId!==a||(b=b.toNode,y!==null?y.add(b):x!==null&&x!==b?(y=new Ln,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new Qi(x):ur},Le.Oo=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.toNode!==this||a!==null&&b.toPortId!==a||(b=b.fromNode,y!==null?y.add(b):x!==null&&x!==b?(y=new Ln,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new Qi(x):ur},Le.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new rr(this.jb),b=this;return E.predicate=function(z){return!((z.fromNode!==b||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)&&(z.fromNode!==a||z.toNode!==b||x!==null&&z.fromPortId!==x||y!==null&&z.toPortId!==y))},E},Le.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new rr(this.jb),b=this;return E.predicate=function(z){return!(z.fromNode!==b||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)},E};function $m(a,y,x){Ql(x);var E=a.jb.contains(y);if(E||a.jb.add(y),!E||y.fromNode===y.toNode){var b=a.linkConnected;if(b!==null){var z=!0,ne=a.diagram;ne!==null&&(z=ne.aa,ne.aa=!0),b(a,y,x),ne!==null&&(ne.aa=z)}}!E&&y.isTreeLink&&(x=y.fromNode,y=y.toNode,x!==null&&y!==null&&x!==y&&(E=!0,a=a.diagram,a!==null&&(E=a.isTreePathToChildren),b=E?y:x,z=E?x:y,b.ci||(b.ci=z),!z.isTreeLeaf||a!==null&&a.undoManager.isUndoingRedoing||(E?x===z&&(z.isTreeLeaf=!1):y===z&&(z.isTreeLeaf=!1))))}function Km(a,y,x){Ql(x);var E=a.jb.remove(y),b=null;if(E||y.toNode===y.fromNode){var z=a.linkDisconnected;if(b=a.diagram,z!==null){var ne=!0;b!==null&&(ne=b.aa,b.aa=!0),z(a,y,x),b!==null&&(b.aa=ne)}}E&&y.isTreeLink&&(x=!0,b!==null&&(x=b.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,b!==null&&b.undoManager.isUndoingRedoing||(y.isTreeLeaf=!0)):yp(y)))}function yp(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 E=x.value;if(E.isTreeLink){if(y){if(E.fromNode===a){a.isTreeLeaf=!1;return}}else if(E.toNode===a){a.isTreeLeaf=!1;return}}}a.isTreeLeaf=!0}}}oi.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},Le=oi.prototype,Le.Vo=function(a){Oi.prototype.Vo.call(this,a),a||(yp(this),a=this.Yk,a!==null&&q1(a,this))},Le.Wo=function(a){Oi.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 E=x.value;y?a.remove(E):(E.fromNode===this&&(E.fromNode=null),E.toNode===this&&(E.toNode=null))}}this.labeledLink=null,Oi.prototype.Lj.call(this)},Le.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;$1(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function $1(a){a.wc===null?a.wc=new xi:a.wc.clear(),a.qm(a,function(y,x){K1(y,x)}),a.wc.count===0&&a.wc.add("",a)}function K1(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function Hv(a,y,x){var E=y.portId;if(E!==null&&(a.wc!==null&&a.wc.remove(E),y=a.diagram,y!==null&&x)){for(x=null,a=a.findLinksConnected(E);a.next();)E=a.value,x===null&&(x=qn()),x.push(E);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);di(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 E=x.jb.iterator;E.next();){var b=E.value;if(b.isTreeLink&&(y=b.fromNode,y!==x&&y!==this))break}if(y===this||y===null||y===x)return!1;x=y}else for(;x!==a;){for(y=null,E=x.jb.iterator;E.next()&&(b=E.value,!b.isTreeLink||(y=b.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 E=x.value;if(E.isTreeLink&&(a=E.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()&&(E=x.value,!E.isTreeLink||(a=E.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;)Gm(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;)Gm(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 oi)return a;a=this.diagram,a=a!==null?a.isTreePathToChildren:!0;for(var y=this.jb.iterator;y.next();){var x=y.value;if(x.isTreeLink&&(x=a?x.fromNode:x.toNode,x!==this))return this.ci=x}return this.ci=null},Le.vz=function(){function a(x,E){E.add(x);var b=x.kh();b!==null&&(E.add(b),x=x.pg(),x!==null&&a(x,E))}var y=new Ln;return a(this,y),y},Le.uz=function(){return V1(this,this)};function V1(a,y){return y=y.pg(),y===null?0:1+V1(a,y)}Le.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new rr(this.jb);var x=this;return y.predicate=a?function(E){return!!(E.isTreeLink&&E.fromNode===x)}:function(E){return!!(E.isTreeLink&&E.toNode===x)},y},Le.Ou=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren);var x=y=null,E=this.jb.iterator;if(a)for(;E.next();)a=E.value,a.isTreeLink&&a.fromNode===this&&(a=a.toNode,y!==null?y.add(a):x!==null&&x!==a?(y=new Nn,y.add(x),y.add(a)):x=a);else for(;E.next();)a=E.value,a.isTreeLink&&a.toNode===this&&(a=a.fromNode,y!==null?y.add(a):x!==null&&x!==a?(y=new Nn,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new Qi(x):ur},Le.wz=function(a){a===void 0&&(a=1/0);var y=new Ln;return md(y,this,!1,a,!0),y},oi.prototype.collapseTree=function(a){a===void 0&&(a=1),1>a&&(a=1);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new Ln;x.add(this),U1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Ic),y.Ue=!1}};function U1(a,y,x,E,b,z,ne){if(1<E)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),U1(oe,y,x,E-1,b,z,ne)))}else Y1(a,y,x,b,z,ne)}function Y1(a,y,x,E,b,z){for(var ne=b===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),ne){var pe=x?le.Oo():le.Po();oe.uv=a,pe.all(function(xe){return function(Ee){return Ee===xe.uv||!Ee.isTreeExpanded}}(oe))&&E.Aj(le,b),le.oh(),le.Zb(!1)}le.isTreeExpanded&&(le.wasTreeExpanded=le.isTreeExpanded,ue||Y1(le,y,x,E,b,z))}oe={uv:oe.uv}}a.isTreeExpanded=!1}oi.prototype.expandTree=function(a){a===void 0&&(a=2),2>a&&(a=2);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new Ln;x.add(this),X1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Ic),y.Ue=!1}};function X1(a,y,x,E,b,z,ne){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 pe=x?ue.Oo():ue.Po();le.vv=a,pe.all(function(xe){return function(Ee){return Ee===xe.vv||!Ee.isTreeExpanded}}(le))&&b.Cj(ue,z)}(2<E||ue.wasTreeExpanded)&&(ue.wasTreeExpanded=!1,X1(ue,y,x,E-1,b,z,ne))}le={vv:le.vv}}a.isTreeExpanded=!0}Ve.Object.defineProperties(oi.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:Vm},set:function(a){var y=this.portSpreading;y!==a&&(Hc(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&&Dc(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:El},set:function(a){typeof a=="number"&&(a=new Di(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),Hc(this),this.Ba.yp=a;var x=this.diagram;x!==null&&Dc(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&&(Hc(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&&(Hc(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&&(Hc(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,E=this.data;if(y!==null){if(y.wd!==null&&(y.wd.remove(this),y.v()),x!==null&&E!==null&&!x.undoManager.isUndoingRedoing){var b=y.data,z=x.model;if(b!==null&&z.ri()){var ne=z.wa(E);ne!==void 0&&z.Qx(b,ne)}}this.containingGroup=null}this.Yk=a,a!==null&&(q1(a,this),x===null||E===null||x.undoManager.isUndoingRedoing||(b=a.data,x=x.model,b!==null&&x.ri()&&(E=x.wa(E),E!==void 0&&x.Bu(b,E))),this.containingGroup=a.containingGroup),cl(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&$1(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 E=!0;x!==null&&(E=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=E)}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&&(Hc(this),this.Ba.Vr=a,this.g("treeExpandedChanged",y,a))}},isTreeLeaf:{get:function(){return(this.U&4)!==0},set:function(a){var y=(this.U&4)!==0;y!==a&&(this.U^=4,this.g("isTreeLeaf",y,a))}}}),oi.prototype.expandTree=oi.prototype.expandTree,oi.prototype.collapseTree=oi.prototype.collapseTree,oi.prototype.findTreeParts=oi.prototype.wz,oi.prototype.findTreeChildrenNodes=oi.prototype.Ou,oi.prototype.findTreeChildrenLinks=oi.prototype.Qo,oi.prototype.findTreeLevel=oi.prototype.uz,oi.prototype.findTreeParentChain=oi.prototype.vz,oi.prototype.findTreeParentNode=oi.prototype.pg,oi.prototype.findTreeParentLink=oi.prototype.kh,oi.prototype.findCommonTreeParent=oi.prototype.gz,oi.prototype.findTreeRoot=oi.prototype.xz,oi.prototype.isInTreeOf=oi.prototype.Nz,oi.prototype.findPort=oi.prototype.ns,oi.prototype.findLinksTo=oi.prototype.kz,oi.prototype.findLinksBetween=oi.prototype.jz,oi.prototype.findNodesInto=oi.prototype.Oo,oi.prototype.findNodesOutOf=oi.prototype.Po,oi.prototype.findNodesConnected=oi.prototype.Mu,oi.prototype.findLinksInto=oi.prototype.Sd,oi.prototype.findLinksOutOf=oi.prototype.Mo,oi.prototype.findExternalTreeLinksConnected=oi.prototype.qx,oi.prototype.invalidateConnectedLinks=oi.prototype.Bd,oi.prototype.invalidateLinkBundle=oi.prototype.Lz;var Ex=new fn(oi,"SpreadingNone",10),Vm=new fn(oi,"SpreadingEvenly",11),Wv=new fn(oi,"SpreadingPacked",12);oi.className="Node",oi.SpreadingNone=Ex,oi.SpreadingEvenly=Vm,oi.SpreadingPacked=Wv;function gr(a,y){a===void 0||a instanceof gs||typeof a=="string"?oi.call(this,a):(oi.call(this),a&&(y=a)),this.U|=4608,this.Gn=new Ln,this.$a=null,this.Sc=new da,this.Sc.group=this,this.gl=new Ln,this.tb=this.$p=null,y&&Object.assign(this,y)}Ot(gr,oi),gr.prototype.cloneProtected=function(a){oi.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof gl});y instanceof gl?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=gr.prototype,Le.Af=function(a){oi.prototype.Af.call(this,a);var y=a.Rj();for(a=a.memberParts;a.next();){var x=a.value;if(x.v(),x.C(8),x.Ej(),x instanceof oi)x.Bd(y);else if(x instanceof Kn)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},Le.gk=function(a,y,x,E,b,z,ne){if(a===ko&&y==="elements"){if(b instanceof gl)this.$a===null?this.$a=b:this.$a!==b&&yt("Cannot insert a second Placeholder into the visual tree of a Group.");else if(b instanceof Hn){var re=b.Nl(function(oe){return oe instanceof gl});re instanceof gl&&(this.$a===null?this.$a=re:this.$a!==re&&yt("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===Yo&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof Hn&&this.$a.rg(E)&&(this.$a=null));oi.prototype.gk.call(this,a,y,x,E,b,z,ne)},Le.Xl=function(a,y){oi.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==Hn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof Hn&&(a=a.Pb()),this.tb===null&&(this.tb=new gn),a.mi(this.tb),a instanceof Er&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},Le.eh=function(a,y,x,E){this.nf=this.$a,oi.prototype.eh.call(this,a,y,x,E)},Le.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof Kn||y.Va()}),oi.prototype.Va.call(this)},Le.si=function(){if(!oi.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof oi){if(y.isVisible()&&dl(y))return!1}else if(y instanceof Kn&&y.isVisible()&&dl(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function Gv(a,y){if(a.Gn.add(y)){y instanceof gr&&a.gl.add(y);var x=a.memberAdded;if(x!==null){var E=!0,b=a.diagram;b!==null&&(E=b.aa,b.aa=!0),x(a,y),b!==null&&(b.aa=E)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!1)}y instanceof Kn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function $v(a,y){if(a.Gn.remove(y)){y instanceof gr&&a.gl.remove(y);var x=a.memberRemoved;if(x!==null){var E=!0,b=a.diagram;b!==null&&(E=b.aa,b.aa=!0),x(a,y),b!==null&&(b.aa=E)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!0)}y instanceof Kn&&!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)}oi.prototype.Lj.call(this)},gr.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=dn(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},gr.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var E=!0;for(a=dn(a).iterator;a.next();){var b=a.value;!y||x.isValidMember(this,b)?b.containingGroup=this:E=!1}return E},gr.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=gr.prototype,Le.Bd=function(a){var y=(this.U&65536)!==0;if(oi.prototype.Bd.call(this,a),!y)for(!(this.U&65536)&&(this.U=this.U^65536),y=this.Lu();y.next();){var x=y.value;if(a===void 0||!a.contains(x)){var E=x.fromNode;E!==null&&E!==this&&E.Td(this)&&!E.isVisible()?(Ql(x.fromPort),Ql(x.toPort),x.bb()):(E=x.toNode,E!==null&&E!==this&&E.Td(this)&&!E.isVisible()&&(Ql(x.fromPort),Ql(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 Ln,E=y.iterator;E.next();){var b=E.value;if(b instanceof oi)for(b=b.linksConnected;b.next();){var z=b.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 Ln,x=a.iterator;x.next();){var E=x.value;if(E instanceof oi)for(E=E.linksConnected;E.next();){var b=E.value,z=b.fromNode;z===null||a.contains(z)&&z!==this||y.add(z),b=b.toNode,b===null||a.contains(b)&&b!==this||y.add(b)}}return y.iterator},Le.hz=function(){function a(x,E){x!==null&&(E.add(x),a(x.containingGroup,E))}var y=new Ln;return a(this,y),y},Le.Rj=function(){var a=new Ln;return md(a,this,!0,0,!0),a.remove(this),a},Le.Zb=function(a){oi.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},gr.prototype.collapseSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();J1(this,y,a,this),a.Ue=!1}};function J1(a,y,x,E){for(var b=a.memberParts;b.next();){var z=b.value;if(z.Zb(!1),z instanceof gr&&z.isSubGraphExpanded&&(z.wasSubGraphExpanded=z.isSubGraphExpanded,J1(z,y,x,E)),z instanceof oi)z.Bd(y),x.Aj(z,E);else if(z instanceof Kn)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!1}gr.prototype.expandSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();Q1(this,y,a,this),a.Ue=!1}};function Q1(a,y,x,E){for(var b=a.memberParts;b.next();){var z=b.value;if(z.Zb(!0),z instanceof gr&&z.wasSubGraphExpanded&&(z.wasSubGraphExpanded=!1,Q1(z,y,x,E)),z instanceof oi)z.Bd(y),x.Cj(z,E);else if(z instanceof Kn)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!0}gr.prototype.move=function(a,y){y===void 0&&(y=!1);var x=y?this.location:this.position,E=x.x;x=x.y;var b=a.x,z=a.y;if(!(E===b||isNaN(E)&&isNaN(b))||!(x===z||isNaN(x)&&isNaN(z))){for(E=b-(isNaN(E)?0:E),x=z-(isNaN(x)?0:x),z=tt.alloc(),oi.prototype.move.call(this,a,y),a=new Ln,y=this.Rj().iterator;y.next();)b=y.value,b instanceof Kn&&(b.suspendsRouting&&a.add(b),b.fd||b.fromNode!==this&&b.toNode!==this)&&(b.suspendsRouting=!0);for(y.reset();y.next();)if(b=y.value,!(b.ph()||b instanceof oi&&b.isLinkLabel)){var ne=b.position,re=b.location;ne.w()?(z.x=ne.x+E,z.y=ne.y+x,b.position=z):re.w()&&(z.x=re.x+E,z.y=re.y+x,b.location=z)}for(y.reset();y.next();)b=y.value,b instanceof Kn&&(b.suspendsRouting=a.contains(b),b.fd||b.fromNode!==this&&b.toNode!==this)&&(ne=b.position,z.x=ne.x+E,z.y=ne.y+x,z.w()?b.move(z):b.bb(),Vv(b)&&b.bb());tt.free(z)}},Ve.Object.defineProperties(gr.prototype,{placeholder:{get:function(){return this.$a}},computesBoundsAfterDrag:{get:function(){return(this.U&2048)!==0},set:function(a){var y=(this.U&2048)!==0;y!==a&&(this.U^=2048,this.g("computesBoundsAfterDrag",y,a))}},computesBoundsIncludingLinks:{get:function(){return(this.U&4096)!==0},set:function(a){var y=(this.U&4096)!==0;y!==a&&(this.U^=4096,this.g("computesBoundsIncludingLinks",y,a))}},computesBoundsIncludingLocation:{get:function(){return(this.U&8192)!==0},set:function(a){var y=(this.U&8192)!==0;y!==a&&(this.U^=8192,this.g("computesBoundsIncludingLocation",y,a))}},handlesDragDropForMembers:{get:function(){return(this.U&16384)!==0},set:function(a){var y=(this.U&16384)!==0;y!==a&&(this.U^=16384,this.g("handlesDragDropForMembers",y,a))}},memberParts:{get:function(){return this.Gn.iterator}},layout:{get:function(){return this.Sc},set:function(a){var y=this.Sc;if(y!==a){a!==null&&a.diagram!==null&&a.diagram.layout===a&&yt("A layout cannot be both the Diagram.layout and a Group.layout: "+a),y!==null&&(y.diagram=null,y.group=null),this.Sc=a;var x=this.diagram;a!==null&&(a.diagram=x,a.group=this),x!==null&&(x.xh=!0),this.g("layout",y,a),x!==null&&x.$b()}}},memberAdded:{get:function(){return this.Ba!==null?this.Ba.Mq:null},set:function(a){var y=this.memberAdded;y!==a&&(Hc(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&&(Hc(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&&(Hc(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 E=!0;x!==null&&(E=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=E)}x!==null&&x.undoManager.isUndoingRedoing?(this.$a!==null&&this.$a.v(),this.memberParts.each(function(b){b.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&&(Hc(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)}}}),gr.prototype.expandSubGraph=gr.prototype.expandSubGraph,gr.prototype.collapseSubGraph=gr.prototype.collapseSubGraph,gr.prototype.findSubGraphParts=gr.prototype.Rj,gr.prototype.findContainingGroupChain=gr.prototype.hz,gr.prototype.findExternalNodesConnected=gr.prototype.iz,gr.prototype.findExternalLinksConnected=gr.prototype.Lu,gr.prototype.ensureBounds=gr.prototype.Va,gr.className="Group";function gl(a){Rt.call(this),this.yb=bs,this.ko=new gn(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Ot(gl,Rt),gl.prototype.cloneProtected=function(a){Rt.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},gl.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return Fo(0,0,y.width,y.height,a.x,a.y)},gl.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof gr||a instanceof lo)||yt("Placeholder is not inside a Group or Adornment."),a instanceof gr){var y=this.computeBorder(this.ko),x=this.minSize,E=this.dc;for(Oa(E,(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,E.width,E.height),E=a.memberParts,x=!1;E.next();)if(E.value.isVisible()){x=!0;break}E=a.diagram,!x||E===null||E.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,E=x.left+x.right;var b=x.top+x.bottom,z=a.adornedObject;a.angle=z.li();var ne=0;z instanceof Er&&(ne=z.strokeWidth);var re=z.Df(),oe=z.naturalBounds,le=(oe.width+ne)*re;ne=(oe.height+ne)*re,a.type!==Hn.Link&&(re=z.ga(a.category==="Selection"?cs:a.locationSpot,tt.alloc()),a.location=re,tt.free(re)),isNaN(le)||isNaN(ne)?(a=z.ga(cs,tt.alloc()),le=gn.allocAt(a.x,a.y,0,0),le.Ye(z.ga(ys,a)),le.Ye(z.ga(Ol,a)),le.Ye(z.ga(nl,a)),Oa(y,le.width+E||0,le.height+b||0),this.Ge(-x.left,-x.top,y.width,y.height),tt.free(a),gn.free(le)):(Oa(y,le+E||0,ne+b||0),this.Ge(-x.left,-x.top,y.width,y.height))}},gl.prototype.eh=function(a,y,x,E){this.actualBounds.h(a,y,x,E)},gl.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,E=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof gr&&!y.layer.isTemporary&&y.computesBoundsAfterDrag&&this.ko.w()){var b=x.toolManager.findTool("Dragging");if(b===x.currentTool&&(x=b.computeBorder(y,this.ko,a),x!==null))return x}x=gn.alloc(),b=this.computeMemberBounds(x);var z=this.yb;return y instanceof gr&&!y.isSubGraphExpanded?a.h(b.x-z.left,b.y-z.top,0,0):a.h(b.x-z.left,b.y-z.top,Math.max(b.width+z.left+z.right,0),Math.max(b.height+z.top+z.bottom,0)),gn.free(x),E&&y instanceof gr&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},gl.prototype.computeMemberBounds=function(a){if(!(this.part instanceof gr))return a.h(0,0,0,0),a;for(var y=this.part,x=1/0,E=1/0,b=-1/0,z=-1/0,ne=y.memberParts;ne.next();){var re=ne.value;if(re.isVisible()){if(re instanceof Kn&&(!y.computesBoundsIncludingLinks||fu(re)||re.fromNode===y||re.toNode===y))continue;re=re.actualBounds,re.left<x&&(x=re.left),re.top<E&&(E=re.top),re.right>b&&(b=re.right),re.bottom>z&&(z=re.bottom)}}return isFinite(x)&&isFinite(E)?a.h(x,E,b-x,z-E):(y=y.location,a.h(y.x,y.y,0,0)),a},Ve.Object.defineProperties(gl.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Di(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),gl.className="Placeholder";function Kn(a){Oi.call(this,Hn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=pl,this.Om=0,this.Qm=pl,this.Rm=NaN,this.qj=Xv,this.po=.5,this.wd=null,this.Nb=new Nn().freeze(),this.Tg=this.Mg=null,this.ml=new gn,this.ua=new yn,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)}Ot(Kn,Oi),Kn.prototype.cloneProtected=function(a){Oi.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=Kn.prototype,Le.Af=function(a){Oi.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&&Ql(y),a=a.toPort,a!==null&&Ql(a)},Le.qb=function(a){a.classType===Kn?(a.value&2)===2?this.routing=a:a===pu||a===Gc||a===Pg?this.curve=a:a===Pp||a===qm||a===e0?this.adjusting=a:a!==Xv&&a!==pl&&yt("Unknown Link enum value for a Link property: "+a):Oi.prototype.qb.call(this,a)},Le.Xc=function(){this.ba===null&&(this.ba=new sp)},Le.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),dl(a)||gd(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),dl(a)||gd(a)))},Le.zv=function(){return!1},Le.Av=function(){},Le.Zc=function(){return!1},Kn.prototype.computeAngle=function(a,y,x){return Kn.computeAngle(y,x)},Kn.computeAngle=function(a,y){switch(a){default:case pl:a=0;break;case wp:a=y;break;case Cp:a=y+90;break;case Ep:a=y-90;break;case Jv:a=y+180;break;case t0:a=it.bp(y),90<a&&270>a&&(a-=180);break;case bp:a=it.bp(y+90),90<a&&270>a&&(a-=180);break;case Mp:a=it.bp(y-90),90<a&&270>a&&(a-=180);break;case n0:if(a=it.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return it.bp(a)};function Sg(a){var y=a.fromNode,x=a.toNode,E=null;if(y!==null?E=x!==null?y.px(x):y.containingGroup:x!==null?E=x.containingGroup:E=null,y=E,x=a.Ah,x!==y){x!==null&&$v(x,a),a.Ah=y,y!==null&&Gv(y,a);var b=a.containingGroupChanged;if(b!==null){var z=!0,ne=a.diagram;ne!==null&&(z=ne.aa,ne.aa=!0),b(a,x,y),ne!==null&&(ne.aa=z)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=E}Le=Kn.prototype,Le.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Oi.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 q1(a,y){a.wd===null&&(a.wd=new Ln),a.wd.add(y),a.v()}Le.Vo=function(a){if(Oi.prototype.Vo.call(this,a),rf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,$m(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||$m(x,this,E)}Sp(this)}},Le.Wo=function(a){if(Oi.prototype.Wo.call(this,a),rf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Km(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||Km(x,this,E)}xp(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))},Kn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},Kn.prototype.move=function(a,y){var x=y?this.location:this.position,E=x.x;isNaN(E)&&(E=0);var b=x.y;for(isNaN(b)&&(b=0),E=a.x-E,b=a.y-b,y===!0?Oi.prototype.move.call(this,a,!1):(a=tt.allocAt(x.x+E,x.y+b),Oi.prototype.move.call(this,a,!1),tt.free(a)),Wc(this,E,b),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+E,x.y+b)},Kn.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},Kn.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},Kn.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(ia),a;if(y===1)return a.assign(this.i(0)),a;if(y===2){var x=this.i(0),E=this.i(1);return a.h((x.x+E.x)/2,(x.y+E.y)/2),a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===pu))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()===pu){if(y===3){x=this.i(0),E=this.i(1);var b=this.i(2);return it.ax(x.x,x.y,E.x,E.y,E.x,E.y,b.x,b.y,a),a}if(E=(y-1)/3|0,x=3*(E/2|0),E%2===1){E=this.i(x),b=this.i(x+1);var z=this.i(x+2);x=this.i(x+3),it.ax(E.x,E.y,b.x,b.y,z.x,z.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var ne=this.flattenedLengths;for(x=this.flattenedTotalLength,b=z=E=0;E<x/2&&z<y&&(b=ne[z],!(E+b>x/2));)E+=b,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-E)):a.h(y.x,y.y+(x/2-E)):1>Math.abs(y.y-z.y)?y.x>z.x?a.h(y.x-(x/2-E),y.y):a.h(y.x+(x/2-E),y.y):(x=(x/2-E)/b,a.h(y.x+x*(z.x-y.x),y.y+x*(z.y-y.y))),a},Kn.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()===pu))return this.ua.wx(.5);if(this.computeCurve()===pu&&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 E=this.i(x+2);return x=this.i(x+3),it.My(a.x,a.y,y.x,y.y,E.x,E.y,x.x,x.y)}if(0<x&&x+1<a)return this.i(x-1).ab(this.i(x+1))}y=this.flattenedLengths,E=this.flattenedTotalLength;var b=0;x=0;for(var z;b<E/2&&x<a&&(z=y[x],!(b+z>E/2));)b+=z,x++;if(y=this.i(x),E=this.i(x+1),1>Math.abs(y.x-E.x)&&1>Math.abs(y.y-E.y)){if(0<x&&x+2<a)return this.i(x-1).ab(this.i(x+2))}else{if(1>Math.abs(y.x-E.x))return y.y>E.y?270:90;if(1>Math.abs(y.y-E.y))return y.x>E.x?180:0}return y.ab(E)},Le=Kn.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 Wc(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 E=a.fd,b=new Nn,z=a.Nb.iterator;z.next();){var ne=z.value;b.add(new tt(ne.x+y,ne.y+x).freeze())}b.freeze(),z=a.Nb,a.Nb=b,ne=a.diagram,isNaN(y)||isNaN(x)||ne!==null&&ne.animationManager.zb?a.v():(a.ke.h(a.ke.x+y,a.ke.y+x),a.pa.h(a.pa.x+y,a.pa.y+x),cl(a)),E?Um(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),ne!==null&&ne.animationManager.zb&&ra(ne.animationManager,a,b),a.g("points",z,b)}}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,E=1/0,b=a.s,z=b.length,ne=0;ne<z;ne++){var re=b[ne];x=Math.min(re.x,x),E=Math.min(re.y,E)}re=ne=1/0;for(var oe=y.s,le=oe.length,ue=0;ue<le;ue++){var pe=oe[ue];ne=Math.min(pe.x,ne),re=Math.min(pe.y,re),pe.freeze()}if(y.freeze(),le===z){for(z=0;z<le;z++)if(ue=b[z],pe=oe[z],ue.x-x!==pe.x-ne||ue.y-E!==pe.y-re){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&ra(x.animationManager,this,y),Um(this),this.g("points",a,y)}},Le.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function Um(a){a.Nb.count===0?a.fd=!1:(a.fd=!0,a.cq=null,a.vt=NaN,a.defaultFromPoint=a.i(0),a.defaultToPoint=a.i(a.pointsCount-1),Qm(a,!1))}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()}}},Kn.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(kf||(kf=new oi,kf.desiredSize=yr,kf.Va()),this.defaultFromPoint&&(kf.location=this.defaultFromPoint,kf.Va(),y=a=kf)):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 E=this.toNode,b=null;if(E===null?(Af||(Af=new oi,Af.desiredSize=yr,Af.Va()),this.defaultToPoint&&(Af.location=this.defaultToPoint,Af.Va(),b=E=Af)):b=this.toPort,b===null||E.isVisible()||(x=E.findVisibleNode(),x!==null&&x!==E?(E=x,b=x.port):E=x),this.Mw=E,E===null||!E.location.w())return!1;for(;!(b===null||b.actualBounds.w()&&b.Ed());)b=b.panel;if(b===null)return!1;var z=this.pointsCount,ne=this.computeSpot(!0,y);x=this.computeSpot(!1,b);var re=xg(ne),oe=xg(x),le=y===b&&y!==null,ue=this.isOrthogonal,pe=this.curve===pu;this.Wf=le&&!ue?pe=!0:!1;var xe=this.computeAdjusting()===pl||le;if(!ue&&!le&&re&&oe){if(re=!1,!xe&&3<=z&&(xe=this.getLinkPoint(a,y,ne,!0,!1,E,b),oe=this.getLinkPoint(E,b,x,!1,!1,a,y),re=this.adjustPoints(0,xe,z-1,oe))&&(xe=this.getLinkPoint(a,y,ne,!0,!1,E,b),oe=this.getLinkPoint(E,b,x,!1,!1,a,y),this.adjustPoints(0,xe,z-1,oe)),!re)if(this.Fj(),pe){z=this.getLinkPoint(a,y,ne,!0,!1,E,b),xe=this.getLinkPoint(E,b,x,!1,!1,a,y),re=xe.x-z.x,oe=xe.y-z.y,le=this.computeCurviness(),pe=ue=0;var Ee=z.x+re/3,Fe=z.y+oe/3,Oe=Ee,at=Fe;it.B(oe,0)?at=0<re?at-le:at+le:(ue=-re/oe,pe=Math.sqrt(le*le/(ue*ue+1)),0>le&&(pe=-pe),Oe=(0>oe?-1:1)*pe+Ee,at=ue*(Oe-Ee)+Fe),Ee=z.x+2*re/3,Fe=z.y+2*oe/3;var Xe=Ee,pt=Fe;it.B(oe,0)?pt=0<re?pt-le:pt+le:(Xe=(0>oe?-1:1)*pe+Ee,pt=ue*(Xe-Ee)+Fe),this.Fj(),this.ne(z),this.yf(Oe,at),this.yf(Xe,pt),this.ne(xe),this.dd(0,this.getLinkPoint(a,y,ne,!0,!1,E,b)),this.dd(3,this.getLinkPoint(E,b,x,!1,!1,a,y))}else z=E,xe=b,E=this.getLinkPoint(a,y,ne,!0,!1,z,xe),b=this.getLinkPoint(z,xe,x,!1,!1,a,y),this.hasCurviness()?(xe=b.x-E.x,x=b.y-E.y,ne=this.computeCurviness(),a=E.x+xe/2,y=E.y+x/2,z=a,re=y,it.B(x,0)?re=0<xe?re-ne:re+ne:(xe=-xe/x,z=Math.sqrt(ne*ne/(xe*xe+1)),0>ne&&(z=-z),z=(0>x?-1:1)*z+a,re=xe*(z-a)+y),this.ne(E),this.yf(z,re),this.ne(b)):(this.ne(E),this.ne(b),re=gn.alloc(),y.mi(re),oe=re.ca(b),xe.mi(re),le=re.ca(E),(oe||le)&&(ne=y.ga(Xm(ne),new tt),this.dd(0,this.getLinkPointFromPoint(a,y,ne,b,!0,ne)),x=xe.ga(Xm(x),new tt),this.dd(1,this.getLinkPointFromPoint(z,xe,x,E,!1,x))),gn.free(re))}else{pe=this.isAvoiding,xe&&(ue&&pe||le)&&this.Fj();var wt=le?this.computeCurviness():0;pe=this.getLinkPoint(a,y,ne,!0,ue,E,b),Ee=Oe=Fe=0,(ue||!re||le)&&(at=this.computeEndSegmentLength(a,y,ne,!0),Ee=this.getLinkDirection(a,y,pe,ne,!0,ue,E,b),le&&(re||ne.D(x)||!ue&&ne.x+x.x===1&&ne.y+x.y===1)&&(Ee-=ue?90:30,0>wt&&(Ee-=180)),0>Ee?Ee+=360:360<=Ee&&(Ee-=360),le&&(at+=Math.abs(wt)*(ue?1:2)),Ee===0?Fe=at:Ee===90?Oe=at:Ee===180?Fe=-at:Ee===270?Oe=-at:(Fe=at*Math.cos(Ee*Math.PI/180),Oe=at*Math.sin(Ee*Math.PI/180)),ne.Mc()&&le&&(at=y.ga(Qr,tt.alloc()),Xe=tt.allocAt(at.x+1e3*Fe,at.y+1e3*Oe),this.getLinkPointFromPoint(a,y,at,Xe,!0,pe),tt.free(at),tt.free(Xe))),at=this.getLinkPoint(E,b,x,!1,ue,a,y);var Mt=pt=Xe=0;if(ue||!oe||le){var It=this.computeEndSegmentLength(E,b,x,!1);Mt=this.getLinkDirection(E,b,at,x,!1,ue,a,y),le&&(oe||ne.D(x)||!ue&&ne.x+x.x===1&&ne.y+x.y===1)&&(Mt+=ue?0:30,0>wt&&(Mt+=180)),0>Mt?Mt+=360:360<=Mt&&(Mt-=360),le&&(It+=Math.abs(wt)*(ue?1:2)),Mt===0?Xe=It:Mt===90?pt=It:Mt===180?Xe=-It:Mt===270?pt=-It:(Xe=It*Math.cos(Mt*Math.PI/180),pt=It*Math.sin(Mt*Math.PI/180)),x.Mc()&&le&&(x=b.ga(Qr,tt.alloc()),ne=tt.allocAt(x.x+1e3*Xe,x.y+1e3*pt),this.getLinkPointFromPoint(E,b,x,ne,!1,at),tt.free(x),tt.free(ne))}x=pe,(ue||!re||le)&&(x=new tt(pe.x+Fe,pe.y+Oe)),ne=at,(ue||!oe||le)&&(ne=new tt(at.x+Xe,at.y+pt)),!xe&&!ue&&re&&3<z&&this.adjustPoints(0,pe,z-2,ne)?this.dd(z-1,at):!xe&&!ue&&oe&&3<z&&this.adjustPoints(1,x,z-1,at)?this.dd(0,pe):!xe&&(ue?6<=z:4<z)&&this.adjustPoints(1,x,z-2,ne)?(this.dd(0,pe),this.dd(z-1,at)):(this.Fj(),this.ne(pe),(ue||!re||le)&&this.ne(x),ue&&this.addOrthoPoints(x,Ee,ne,Mt,a,E),(ue||!oe||le)&&this.ne(ne),this.ne(at))}return!0};function Kv(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}Kn.prototype.getLinkPointFromPoint=function(a,y,x,E,b,z){if(z===void 0&&(z=new tt),a===null||y===null)return z.assign(x),z;if(a.isVisible()||(b=a.findVisibleNode(),b!==null&&b!==a&&(y=b.port)),a=null,b=y.panel,b===null||b.se()||(b=b.panel),b===null){b=E.x,E=E.y;var ne=x.x;x=x.y}else{a=b.oe,b=1/(a.m11*a.m22-a.m12*a.m21),ne=a.m22*b;var re=-a.m12*b,oe=-a.m21*b,le=a.m11*b,ue=b*(a.m21*a.dy-a.m22*a.dx),pe=b*(a.m12*a.dx-a.m11*a.dy);b=E.x*ne+E.y*oe+ue,E=E.x*re+E.y*le+pe,ne=x.x*ne+x.y*oe+ue,x=x.x*re+x.y*le+pe}return y.Sj(b,E,ne,x,z),a!==null&&z.transform(a),z};function Ym(a,y){var x=y.Zn;return x===null&&(x=new Tf,x.port=y,x.node=y.part,y.Zn=x),sS(x,a)}Kn.prototype.getLinkPoint=function(a,y,x,E,b,z,ne,re){if(re===void 0&&(re=new tt),x.sb()&&!xg(x))return y.ga(x,re),re;if(x.$c()){var oe=Ym(this,y);if(oe!==null){if(re.assign(oe.Zo),b&&this.routing===tS){var le=Ym(this,ne);if(le!==null&&oe.Gl<le.Gl){oe=tt.alloc(),le=tt.alloc();var ue=new gn(y.ga(cs,oe),y.ga(ys,le)),pe=this.computeSpot(!E,ne);a=this.getLinkPoint(z,ne,pe,!E,b,a,y,le),(x.Hf(Iu)||x.Hf(Ys))&&a.y>=ue.y&&a.y<=ue.y+ue.height?re.y=a.y:(x.Hf(Su)||x.Hf(ul))&&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(Xm(x),tt.alloc()),this.pointsCount>(b?6:2)?(ne=E?this.i(1):this.i(this.pointsCount-2),b&&(ne=Kv(x,ne.copy()))):(oe=this.computeSpot(!E,ne),z=tt.alloc(),ne=ne.ga(Xm(oe),z),b&&(ne=Kv(x,ne)),tt.free(z)),this.getLinkPointFromPoint(a,y,x,ne,E,re),tt.free(x),re},Kn.prototype.getLinkDirection=function(a,y,x,E,b,z,ne,re){e:if(E.sb())var oe=E.x>E.y?E.x>1-E.y?0:E.x<1-E.y?270:315:E.x<E.y?E.x>1-E.y?90:E.x<1-E.y?180:135:.5>E.x?225:.5<E.x?45:0;else{if(E.$c()&&(oe=Ym(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(Qr,tt.alloc()),this.pointsCount>(z?6:2)?(re=b?this.i(1):this.i(this.pointsCount-2),re=z?Kv(oe,re.copy()):x):(x=tt.alloc(),re=re.ga(Qr,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 E.Mc()&&ne.Td(a)&&(oe+=180,360<=oe&&(oe-=360)),xg(E)||(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},Kn.prototype.computeEndSegmentLength=function(a,y,x,E){return y!==null&&x.$c()&&(a=Ym(this,y),a!==null)?a.Ju:(a=E?this.fromEndSegmentLength:this.toEndSegmentLength,y!==null&&isNaN(a)&&(a=E?y.fromEndSegmentLength:y.toEndSegmentLength),isNaN(a)&&(a=10),a)},Kn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=Qr:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===Co?Fa:y)):(a=y||this.toPort,a===null?a=Qr:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===Co?Fa:y)),a};function xg(a){return a===Fa||a.x===.5&&a.y===.5}function Xm(a){return a.x===.5&&a.y===.5?a:Qr}Kn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==pl&&4<this.pointsCount?this.computeMidPoint(new tt):(a=y.Zn,a=a!==null?sS(a,this):null,a!==null?a.Zo:y.ga(Qr))},Kn.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},Kn.prototype.Cf=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var ne=z;if(z===void 0&&(ne=_t.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return mv(this,y,x,b),z===void 0&&_t.free(ne),!0;if(this.Yc(a,ne)){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 pe=ue.actualBounds,xe=this.naturalBounds;if(!(pe.x>xe.width||pe.y>xe.height||0>pe.x+pe.width||0>pe.y+pe.height)){if(pe=_t.alloc(),pe.set(ne),ue instanceof Hn)re=ue.Cf(a,y,x,E,b,pe);else if(this.path===ue){if(ue instanceof Er)if(re=a,xe=E,ue.pickable===!1)re=!1;else if(pe.multiply(ue.transform),xe)e:{var Ee=re,Fe=pe;if(ue.fh(Ee,Fe))re=!0;else{if(Fe===void 0&&(Fe=ue.transform,Ee.Re(ue.actualBounds))){re=!0;break e}re=Ee.left,xe=Ee.right;var Oe=Ee.top;Ee=Ee.bottom;var at=tt.alloc(),Xe=tt.alloc(),pt=tt.alloc(),wt=_t.alloc();wt.set(Fe),wt.bv(ue.transform),wt.Vj(),Xe.x=xe,Xe.y=Oe,Xe.transform(wt),at.x=re,at.y=Oe,at.transform(wt),Fe=!1,tf(ue,at,Xe,pt)?Fe=!0:(at.x=xe,at.y=Ee,at.transform(wt),tf(ue,at,Xe,pt)?Fe=!0:(Xe.x=re,Xe.y=Ee,Xe.transform(wt),tf(ue,at,Xe,pt)?Fe=!0:(at.x=re,at.y=Oe,at.transform(wt),tf(ue,at,Xe,pt)&&(Fe=!0)))),_t.free(wt),tt.free(at),tt.free(Xe),tt.free(pt),re=Fe}}else re=ue.fh(re,pe)}else re=Ss(ue,a,E,pe);re&&(xe=ue,y!==null&&(xe=y(ue)),xe&&(x===null||x(xe))&&b.add(xe)),_t.free(pe)}}}return z===void 0&&_t.free(ne),re||this.background!==null||this.areaBackground!==null}return z===void 0&&_t.free(ne),!1},Kn.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?pu:this.curve},Kn.prototype.computeCorner=function(){if(this.curve===pu)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},Kn.prototype.findMidLabel=function(){for(var a=this.path,y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];if(b!==a&&!b.isPanelMain&&(b.segmentIndex===-1/0||isNaN(b.segmentIndex)))return b}for(a=this.labelNodes;a.next();)if(y=a.value,y.segmentIndex===-1/0||isNaN(y.segmentIndex))return y;return null},Kn.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=iS;a=Math.max(a,this.computeThickness());var y=this.fromPort,x=this.toPort;if(y!==null&&x!==null){var E=this.findMidLabel();if(E!==null){var b=E.naturalBounds,z=E.margin,ne=isNaN(b.width)?30:b.width*E.scale+z.left+z.right;b=isNaN(b.height)?14:b.height*E.scale+z.top+z.bottom,E=E.segmentOrientation,E===wp||E===t0||E===Jv?a=Math.max(a,b):E===Ep||E===Mp||E===Cp||E===bp?a=Math.max(a,ne):(y=y.ga(Qr).ab(x.ga(Qr))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*ne)+Math.abs(Math.cos(y)*b)+1)),this.curve===pu&&(a*=1.333)}}return a},Kn.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===pl&&x.bb()}},Kn.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=nS;var y=this.Sf;if(y!==null){for(var x=qn(),E=0,b=y.links,z=0;z<b.length;z++){var ne=b[z].computeSpacing();x.push(ne),E+=ne}for(E=-E/2,z=0;z<b.length;z++){if(b[z]===this){a=E+x[z]/2;break}E+=x[z]}y.Ds===this.fromNode&&(a=-a),di(x)}}return a},Kn.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},Kn.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},Kn.prototype.adjustPoints=function(a,y,x,E){var b=this.computeAdjusting();if(this.isOrthogonal){if(b===qm)return!1;b===e0&&(b=Pp)}switch(b){case qm:var z=this.i(a),ne=this.i(x);if(!z.Xa(y)||!ne.Xa(E)){b=z.x,z=z.y;var re=ne.x-b,oe=ne.y-z,le=Math.sqrt(re*re+oe*oe);if(!it.$(le,0)){if(it.$(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);ne=y.x;var pe=y.y;re=E.x-ne;var xe=E.y-pe;for(oe=Math.sqrt(re*re+xe*xe),it.$(re,0)?xe=0>xe?-Math.PI/2:Math.PI/2:(xe=Math.atan(xe/Math.abs(re)),0>re&&(xe=Math.PI-xe)),le=oe/le,ue=xe-ue,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),re=y.x-b,oe=y.y-z,y=Math.sqrt(re*re+oe*oe),it.$(y,0)||(it.$(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,ne+y*Math.cos(re),pe+y*Math.sin(re)));this.dd(x,E)}}return!0;case e0:if(z=this.i(a),pe=this.i(x),!z.Xa(y)||!pe.Xa(E)){b=z.x,z=z.y,ne=pe.x,pe=pe.y,le=(ne-b)*(ne-b)+(pe-z)*(pe-z),re=y.x,ue=y.y,oe=E.x,xe=E.y;var Ee=1;if(oe-re!==0){var Fe=(xe-ue)/(oe-re);Ee=Math.sqrt(1+1/(Fe*Fe))}else Fe=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var Oe=y.x,at=y.y,Xe=.5;le!==0&&(Xe=((b-Oe)*(b-ne)+(z-at)*(z-pe))/le);var pt=b+Xe*(ne-b),wt=z+Xe*(pe-z);y=Math.sqrt((Oe-pt)*(Oe-pt)+(at-wt)*(at-wt)),at<Fe*(Oe-pt)+wt&&(y=-y),0<Fe&&(y=-y),Oe=re+Xe*(oe-re),Xe=ue+Xe*(xe-ue),Fe!==0?(y=Oe+y/Ee,this.L(a,y,Xe-(y-Oe)/Fe)):this.L(a,Oe,Xe+y)}this.dd(x,E)}return!0;case Pp:e:{if(this.isOrthogonal&&(b=this.i(a),z=this.i(a+1),ne=this.i(a+2),re=z.x,ue=z.y,pe=re,le=ue,it.B(b.y,z.y)?it.B(z.x,ne.x)?ue=y.y:it.B(z.y,ne.y)&&(re=y.x):it.B(b.x,z.x)&&(it.B(z.y,ne.y)?re=y.x:it.B(z.x,ne.x)&&(ue=y.y)),this.L(a+1,re,ue),b=this.i(x),z=this.i(x-1),ne=this.i(x-2),re=z.x,ue=z.y,oe=re,xe=ue,it.B(b.y,z.y)?it.B(z.x,ne.x)?ue=E.y:it.B(z.y,ne.y)&&(re=E.x):it.B(b.x,z.x)&&(it.B(z.y,ne.y)?re=E.x:it.B(z.x,ne.x)&&(ue=E.y)),this.L(x-1,re,ue),Vv(this))){this.L(a+1,pe,le),this.L(x-1,oe,xe),x=!1;break e}this.dd(a,y),this.dd(x,E),x=!0}return x;default:return!1}},Kn.prototype.addOrthoPoints=function(a,y,x,E,b,z){0>y?y+=360:360<=y&&(y-=360),0>E?E+=360:360<=E&&(E-=360);var ne=E;y=315<=y||45>y?0:45<=y&&135>y?90:135<=y&&225>y?180:270,E=315<=E||45>E?0:45<=E&&135>E?90:135<=E&&225>E?180:270;var re=b.actualBounds.copy(),oe=z.actualBounds.copy();if(re.w()&&oe.w()){re.Bc(Lp,Lp),oe.Bc(Lp,Lp),re.Ye(a),oe.Ye(x);var le=tt.alloc(),ue=tt.alloc();y===0?x.x>a.x||E===270&&x.y<a.y&&oe.right>a.x||E===90&&x.y>a.y&&oe.right>a.x?(le.h(x.x,a.y),ue.h(x.x,(a.y+x.y)/2),E===180?(le.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ue.x=le.x,ue.y=x.y):E===270&&x.y<a.y||E===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&&(E===270&&a.y<oe.top||E===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):E===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),(E===180||E===90&&x.y<re.top||E===270&&x.y>re.bottom)&&(E===180&&(oe.ca(a)||re.ca(x))?le.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===180||E===90)?le.y=this.computeMidOrthoPosition(a.x,re.top,x.x,Math.max(x.y,oe.bottom),!0):x.y>a.y&&(E===180||E===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?(E===90||E===270)&&(le.h(Math.max((a.x+x.x)/2,a.x),a.y),ue.h(le.x,x.y)):(le.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===0?re.top:Math.min(re.top,oe.top)):Math.max(x.y,E===0?re.bottom:Math.max(re.bottom,oe.bottom)),ue.x=x.x,ue.y=le.y))):y===180?x.x<a.x||E===270&&x.y<a.y&&oe.left<a.x||E===90&&x.y>a.y&&oe.left<a.x?(le.h(x.x,a.y),ue.h(x.x,(a.y+x.y)/2),E===0?(le.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ue.x=le.x,ue.y=x.y):E===270&&x.y<a.y||E===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&&(E===270&&a.y<oe.top||E===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):E===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),(E===0||E===90&&x.y<re.top||E===270&&x.y>re.bottom)&&(E===0&&(oe.ca(a)||re.ca(x))?le.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===0||E===90)?le.y=this.computeMidOrthoPosition(a.x,re.top,x.x,Math.max(x.y,oe.bottom),!0):x.y>a.y&&(E===0||E===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?(E===90||E===270)&&(le.h(Math.min((a.x+x.x)/2,a.x),a.y),ue.h(le.x,x.y)):(le.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===180?re.top:Math.min(re.top,oe.top)):Math.max(x.y,E===180?re.bottom:Math.max(re.bottom,oe.bottom)),ue.x=x.x,ue.y=le.y))):y===90?x.y>a.y||E===180&&x.x<a.x&&oe.bottom>a.y||E===0&&x.x>a.x&&oe.bottom>a.y?(le.h(a.x,x.y),ue.h((a.x+x.x)/2,x.y),E===270?(le.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ue.x=x.x,ue.y=le.y):E===180&&x.x<a.x||E===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&&(E===180&&a.x<oe.left||E===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):E===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),(E===270||E===0&&x.x<re.left||E===180&&x.x>re.right)&&(E===270&&(oe.ca(a)||re.ca(x))?le.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===270||E===0)?le.x=this.computeMidOrthoPosition(re.left,a.y,Math.max(x.x,oe.right),x.y,!1):x.x>a.x&&(E===270||E===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?(E===0||E===180)&&(le.h(a.x,Math.max((a.y+x.y)/2,a.y)),ue.h(x.x,le.y)):(le.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===90?re.left:Math.min(re.left,oe.left)):Math.max(x.x,E===90?re.right:Math.max(re.right,oe.right)),ue.x=le.x,ue.y=x.y))):x.y<a.y||E===180&&x.x<a.x&&oe.top<a.y||E===0&&x.x>a.x&&oe.top<a.y?(le.h(a.x,x.y),ue.h((a.x+x.x)/2,x.y),E===90?(le.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ue.x=x.x,ue.y=le.y):E===180&&x.x<a.x||E===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&&(E===180&&a.x<oe.left||E===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):E===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),(E===90||E===0&&x.x<re.left||E===180&&x.x>re.right)&&(E===90&&(oe.ca(a)||re.ca(x))?le.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===90||E===0)?le.x=this.computeMidOrthoPosition(re.left,a.y,Math.max(x.x,oe.right),x.y,!1):x.x>a.x&&(E===90||E===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?(E===0||E===180)&&(le.h(a.x,Math.min((a.y+x.y)/2,a.y)),ue.h(x.x,le.y)):(le.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===270?re.left:Math.min(re.left,oe.left)):Math.max(x.x,E===270?re.right:Math.max(re.right,oe.right)),ue.x=le.x,ue.y=x.y)));var pe=x;if(this.isAvoiding){var xe=this.diagram;if(xe===null||b===z||this.layer.isTemporary||!eg(xe)||re.ca(pe)&&!z.Td(b)||oe.ca(a)&&!b.Td(z))y=!1;else{var Ee=tg(xe,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Ee.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))&&Ee.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))&&Ee.Yj(Math.min(ue.x,pe.x),Math.min(ue.y,pe.y),Math.abs(ue.x-pe.x),Math.abs(ue.y-pe.y)))y=!1;else{b=a,z=pe;var Fe=x=null;if(xe.isVirtualized){xe=Ee.bounds.copy(),xe.Bc(-Ee.Ho,-Ee.Go);var Oe=tt.alloc();wg(Ee,a.x,a.y)||(it.Ff(xe.x,xe.y,xe.x+xe.width,xe.y+xe.height,a.x,a.y,le.x,le.y,Oe)?(x=a=Oe.copy(),y=Oe.ab(le)):it.Ff(xe.x,xe.y,xe.x+xe.width,xe.y+xe.height,le.x,le.y,ue.x,ue.y,Oe)?(x=a=Oe.copy(),y=Oe.ab(ue)):it.Ff(xe.x,xe.y,xe.x+xe.width,xe.y+xe.height,ue.x,ue.y,pe.x,pe.y,Oe)&&(x=a=Oe.copy(),y=Oe.ab(pe))),wg(Ee,pe.x,pe.y)||(it.Ff(xe.x,xe.y,xe.x+xe.width,xe.y+xe.height,pe.x,pe.y,ue.x,ue.y,Oe)?(Fe=pe=Oe.copy(),E=ue.ab(Oe)):it.Ff(xe.x,xe.y,xe.x+xe.width,xe.y+xe.height,ue.x,ue.y,le.x,le.y,Oe)?(Fe=pe=Oe.copy(),E=le.ab(Oe)):it.Ff(xe.x,xe.y,xe.x+xe.width,xe.y+xe.height,le.x,le.y,a.x,a.y,Oe)&&(Fe=pe=Oe.copy(),E=a.ab(Oe))),tt.free(Oe)}re=re.copy().ed(oe),re.Bc(Ee.Ho*Ee.Os,Ee.Go*Ee.Os),oS(Ee,a,y,pe,E,re,!0),oe=ec(Ee,pe.x,pe.y),!Ee.abort&&oe>=Cg&&(rS(Ee),re.Bc(Ee.Ho*Ee.Hx,Ee.Go*Ee.Ix),oS(Ee,a,y,pe,E,re,!1),oe=ec(Ee,pe.x,pe.y)),!Ee.abort&&oe<Cg&&ec(Ee,pe.x,pe.y)!==$c?(Uv(this,Ee,pe.x,pe.y,E,!0,ne),re=this.i(2),4>this.pointsCount?(y===0||y===180?(re.x=a.x,re.y=pe.y):(re.x=pe.x,re.y=a.y),this.L(2,re.x,re.y),this.m(3,re.x,re.y)):(ne=this.i(3),y===0||y===180?it.B(re.x,ne.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,ne.y)):it.B(re.y,ne.y)?(Math.abs(a.y-re.y)<=Ee.Go/2&&(this.L(2,re.x,a.y),this.L(3,ne.x,a.y)),this.m(2,re.x,a.y)):this.L(2,a.x,re.y):(y===90||y===270)&&(it.B(re.y,ne.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,ne.x,re)):it.B(re.x,ne.x)?(Math.abs(a.x-re.x)<=Ee.Ho/2&&(this.L(2,a.x,re.y),this.L(3,a.x,ne.y)),this.m(2,a.x,re.y)):this.L(2,re.x,a.y))),x!==null&&(a=this.i(1),ne=this.i(2),a.x!==ne.x&&a.y!==ne.y?y===0||y===180?this.m(2,a.x,ne.y):this.m(2,ne.x,a.y):y===0||y===180?this.m(2,b.x,x.y):this.m(2,x.x,b.y)),Fe!==null&&(E===0||E===180?this.yf(z.x,Fe.y):this.yf(Fe.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)}},Kn.prototype.computeMidOrthoPosition=function(a,y,x,E,b){var z=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(z=this.computeCurviness()),b?(y+E)/2+z:(a+x)/2+z};function Vv(a){if(a.diagram===null||!a.isAvoiding||!eg(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=tg(a.diagram,!0,a.containingGroup,null);for(var E=1;E<x-2;E++){var b=y[E],z=y[E+1];if(!a.Yj(Math.min(b.x,z.x),Math.min(b.y,z.y),Math.abs(b.x-z.x),Math.abs(b.y-z.y)))return!0}return!1}function Uv(a,y,x,E,b,z,ne){var re=y.Ho,oe=y.Go,le=ec(y,x,E),ue=x,pe=E;for(b===0?ue+=re:b===90?pe+=oe:b===180?ue-=re:pe-=oe,b!==ne&&le>of&&ec(y,ue,pe)!==le-1&&(ec(y,x-re,E)===le-1?(b=180,ue=x-re,pe=E):ec(y,x+re,E)===le-1?(b=0,ue=x+re,pe=E):ec(y,x,E-oe)===le-1?(b=270,ue=x,pe=E-oe):ec(y,x,E+oe)===le-1&&(b=90,ue=x,pe=E+oe));le>of&&ec(y,ue,pe)===le-1;)x=ue,E=pe,b===0?ue+=re:b===90?pe+=oe:b===180?ue-=re:pe-=oe,--le;z?le>of&&(b===180||b===0?x=Math.floor(x/re)*re+re/2:(b===90||b===270)&&(E=Math.floor(E/oe)*oe+oe/2)):(x=Math.floor(x/re)*re+re/2,E=Math.floor(E/oe)*oe+oe/2),le>of&&(z=b,ne=x,ue=E,b===0?(z=90,ue+=oe):b===90?(z=180,ne-=re):b===180?(z=270,ue-=oe):b===270&&(z=0,ne+=re),ec(y,ne,ue)===le-1?Uv(a,y,ne,ue,z,!1,z):(ne=x,ue=E,b===0?(z=270,ue-=oe):b===90?(z=0,ne+=re):b===180?(z=90,ue+=oe):b===270&&(z=180,ne-=re),ec(y,ne,ue)===le-1&&Uv(a,y,ne,ue,z,!1,z))),a.yf(x,E)}Kn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),E=this.i(1),b=To(y,a,x.x,x.y,E.x,E.y),z=0,ne=1;ne<this.pointsCount-1;ne++){x=this.i(ne+1);var re=To(y,a,E.x,E.y,x.x,x.y);E=x,re<b&&(z=ne,b=re)}return z},Kn.prototype.qc=function(){this.lk=!1,this.v()},Kn.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,E=0;E<x;E++){var b=y[E];b!==a&&b.isPanelMain&&b instanceof Er&&(b.ua=this.ua)}}},Kn.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,E=this.diagram;E!==null&&rf(this)&&E.Eh.contains(this)&&(this.ml.width!==0||this.ml.height!==0)&&(E.animationManager.isAnimating||E.currentTool!==E.toolManager)&&(x=!0);var b=this.i(0).copy(),z=b.copy();E=this.Nb.s;var ne=this.computeCurve();if(ne===pu&&3<=y&&!it.$(this.smoothness,0))if(y===3){var re=this.i(1);E=Math.min(b.x,re.x);var oe=Math.min(b.y,re.y);re=this.i(2),E=Math.min(E,re.x),oe=Math.min(oe,re.y)}else{if(this.isOrthogonal)for(oe=0;oe<y;oe++)re=E[oe],z.x=Math.min(re.x,z.x),z.y=Math.min(re.y,z.y);else for(E=3;E<y;E+=3)E+3>=y&&(E=y-1),oe=this.i(E),z.x=Math.min(oe.x,z.x),z.y=Math.min(oe.y,z.y);E=z.x,oe=z.y}else{for(oe=0;oe<y;oe++)re=E[oe],z.x=Math.min(re.x,z.x),z.y=Math.min(re.y,z.y);E=z.x,oe=z.y}if(E-=this.su.x,oe-=this.su.y,b.x-=E,b.y-=oe,y!==2||rf(this)){if(a.type=yn.o,re=N1(a),this.computeShortLength(!0)!==0&&(b=Bf(this,b,!0,z)),yg(re,b.x,b.y,!1),ne===pu&&3<=y&&!it.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-E,x=x.y-oe,b=this.i(2).copy(),b.x-=E,b.y-=oe,this.computeShortLength(!1)!==0&&(b=Bf(this,b,!1,z)),_c(re,y,x,y,x,b.x,b.y);else if(this.isOrthogonal){y=tt.allocAt(E,oe),x=tt.alloc(),x.assign(this.i(1)),z=tt.allocAt(E,oe),b=tt.allocAt(E,oe),ne=this.i(0);for(var le,ue=this.smoothness/3,pe=1;pe<this.pointsCount-1;pe++){le=this.i(pe);var xe=ne,Ee=le,Fe=this.i(Yv(this,le,pe,!1));if((!it.$(xe.x,Ee.x)||!it.$(Ee.x,Fe.x))&&(!it.$(xe.y,Ee.y)||!it.$(Ee.y,Fe.y))){var Oe=ue;isNaN(Oe)&&(Oe=this.smoothness/3);var at=xe.x;xe=xe.y;var Xe=Ee.x;Ee=Ee.y;var pt=Fe.x;Fe=Fe.y;var wt=Oe*Jm(at,xe,Xe,Ee);Oe*=Jm(Xe,Ee,pt,Fe),it.$(xe,Ee)&&it.$(Xe,pt)&&(Xe>at?Fe>Ee?(z.x=Xe-wt,z.y=Ee-wt,b.x=Xe+Oe,b.y=Ee+Oe):(z.x=Xe-wt,z.y=Ee+wt,b.x=Xe+Oe,b.y=Ee-Oe):Fe>Ee?(z.x=Xe+wt,z.y=Ee-wt,b.x=Xe-Oe,b.y=Ee+Oe):(z.x=Xe+wt,z.y=Ee+wt,b.x=Xe-Oe,b.y=Ee-Oe)),it.$(at,Xe)&&it.$(Ee,Fe)&&(Ee>xe?(pt>Xe?(z.x=Xe-wt,z.y=Ee-wt,b.x=Xe+Oe):(z.x=Xe+wt,z.y=Ee-wt,b.x=Xe-Oe),b.y=Ee+Oe):(pt>Xe?(z.x=Xe-wt,z.y=Ee+wt,b.x=Xe+Oe):(z.x=Xe+wt,z.y=Ee+wt,b.x=Xe-Oe),b.y=Ee-Oe)),(it.$(at,Xe)&&it.$(Xe,pt)||it.$(xe,Ee)&&it.$(Ee,Fe))&&(at=.5*(at+pt),xe=.5*(xe+Fe),z.x=at,z.y=xe,b.x=at,b.y=xe),(pe===1||pe===2&&it.$(ne.x,this.i(0).x)&&it.$(ne.y,this.i(0).y))&&(x.x=.5*(ne.x+le.x),x.y=.5*(ne.y+le.y)),_c(re,x.x-E,x.y-oe,z.x-E,z.y-oe,le.x-E,le.y-oe),y.set(z),x.set(b),ne=le}}le=ne.x,ne=ne.y,ue=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(ue=Bf(this,ue.copy(),!1,uo)),le=.5*(le+ue.x),ne=.5*(ne+ue.y),_c(re,b.x-E,b.y-oe,le-E,ne-oe,ue.x-E,ue.y-oe),tt.free(y),tt.free(x),tt.free(z),tt.free(b)}else for(x=3;x<y;x+=3)z=this.i(x-2),x+3>=y&&(x=y-1),b=this.i(x-1),ne=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(ne=Bf(this,ne.copy(),!1,uo)),_c(re,z.x-E,z.y-oe,b.x-E,b.y-oe,ne.x-E,ne.y-oe);else{for(z=tt.alloc(),z.assign(this.i(0)),b=tt.alloc(),b.assign(z),ne=this.computeCorner(),pe=1,le=0;pe<y;){if(pe=Yv(this,z,pe,1<pe),ue=this.i(pe),pe>=y-1){if(!z.D(ue))this.computeShortLength(!1)!==0&&(ue=Bf(this,ue.copy(),!1,uo)),Nf(this,re,-E,-oe,z,ue,x);else if(le===0)for(pe=1;pe<y;)b.assign(z),ue=this.i(pe++),Nf(this,re,-E,-oe,z,ue,x),z.assign(ue);break}if(le=Yv(this,ue,pe+1,pe<y-3),pe=-E,at=-oe,xe=ue,Xe=this.i(le),Oe=x,it.B(z.y,xe.y)&&it.B(xe.x,Xe.x))if(Fe=Math.min(ne,Math.abs(xe.x-b.x)/2),Fe=wt=Math.min(Fe,Math.abs(Xe.y-xe.y)/2),it.B(Fe,0))Nf(this,re,pe,at,z,xe,Oe),z.assign(xe);else{var Mt=xe.x,It=xe.y;Ee=Mt,pt=It,xe.x>z.x?Mt=xe.x-Fe:Mt=xe.x+Fe,Xe.y>xe.y?pt=xe.y+wt:pt=xe.y-wt,Xe=tt.allocAt(Mt,It),Nf(this,re,pe,at,z,Xe,Oe),tt.free(Xe),Zm(re,xe.x+pe,xe.y+at,Ee+pe,pt+at),z.h(Ee,pt)}else it.B(z.x,xe.x)&&it.B(xe.y,Xe.y)?(Fe=Math.min(ne,Math.abs(xe.y-b.y)/2),Fe=wt=Math.min(Fe,Math.abs(Xe.x-xe.x)/2),it.B(wt,0)?(Nf(this,re,pe,at,z,xe,Oe),z.assign(xe)):(Mt=xe.x,It=xe.y,Ee=Mt,pt=It,xe.y>z.y?It=xe.y-Fe:It=xe.y+Fe,Xe.x>xe.x?Ee=xe.x+wt:Ee=xe.x-wt,Xe=tt.allocAt(Mt,It),Nf(this,re,pe,at,z,Xe,Oe),tt.free(Xe),Zm(re,xe.x+pe,xe.y+at,Ee+pe,pt+at),z.h(Ee,pt))):(Nf(this,re,pe,at,z,xe,Oe),z.assign(xe));b.assign(ue),pe=le}tt.free(z)}Hm=re}else re=this.i(1).copy(),re.x-=E,re.y-=oe,this.computeShortLength(!0)!==0&&(b=Bf(this,b,!0,z)),this.computeShortLength(!1)!==0&&(re=Bf(this,re,!1,z)),a.type=yn.j,a.startX=b.x,a.startY=b.y,a.endX=re.x,a.endY=re.y;return this.lk=!0,a};function Jm(a,y,x,E){return a=x-a,isNaN(a)||a===1/0||a===-1/0?NaN:(0>a&&(a=-a),y=E-y,isNaN(y)||y===1/0||y===-1/0?NaN:(0>y&&(y=-y),it.$(a,0)?y:it.$(y,0)?a:Math.sqrt(a*a+y*y)))}function Bf(a,y,x,E){var b=a.pointsCount;if(2>b)return y;if(x){var z=a.i(1);if(x=z.x-E.x,z=z.y-E.y,E=Jm(y.x,y.y,x,z),E===0)return y;b=b===2?.5*E:E,a=a.computeShortLength(!0),a>b&&(a=b),b=a*(z-y.y)/E,y.x+=a*(x-y.x)/E,y.y+=b}else{if(z=a.i(b-2),x=z.x-E.x,z=z.y-E.y,E=Jm(y.x,y.y,x,z),E===0)return y;b=b===2?.5*E:E,a=a.computeShortLength(!1),a>b&&(a=b),b=a*(y.y-z)/E,y.x-=a*(y.x-x)/E,y.y-=b}return y}function Yv(a,y,x,E){for(var b=a.pointsCount,z=y;it.$(y.x,z.x)&&it.$(y.y,z.y);){if(x>=b)return b-1;z=a.i(x++)}if(!it.$(y.x,z.x)&&!it.$(y.y,z.y))return x-1;for(var ne=z;it.$(y.x,z.x)&&it.$(z.x,ne.x)&&(!E||(y.y>=z.y?z.y>=ne.y:z.y<=ne.y))||it.$(y.y,z.y)&&it.$(z.y,ne.y)&&(!E||(y.x>=z.x?z.x>=ne.x:z.x<=ne.x));){if(x>=b)return b-1;ne=a.i(x++)}return x-2}Kn.prototype.computeJumpLength=function(){return 10};function Nf(a,y,x,E,b,z,ne){if(!ne&&rf(a)){ne=a.computeJumpLength();var re=ne/2,oe=[],le=0;if(a.isVisible()&&(le=bx(a,b,z,oe)),0<le){if(it.B(b.y,z.y))if(b.x<z.x)for(var ue=0;ue<le;){var pe=Math.max(b.x,Math.min(oe[ue++]-re,z.x-ne));y.lineTo(pe+x,z.y+E);for(var xe=pe+x,Ee=Math.min(pe+ne,z.x);ue<le&&(pe=oe[ue],pe<Ee+ne);)ue++,Ee=Math.min(pe+re,z.x);pe=z.y-ne+E,Ee+=x;var Fe=z.y+E;a.curve===Gc?yg(y,Ee,Fe,!1):_c(y,xe,pe,Ee,pe,Ee,Fe)}else for(--le;0<=le;){for(ue=Math.min(b.x,Math.max(oe[le--]+re,z.x+ne)),y.lineTo(ue+x,z.y+E),xe=ue+x,pe=Math.max(ue-ne,z.x);0<=le&&(ue=oe[le],ue>pe-ne);)le--,pe=Math.max(ue-re,z.x);ue=z.y-ne+E,pe+=x,Ee=z.y+E,a.curve===Gc?yg(y,pe,Ee,!1):_c(y,xe,ue,pe,ue,pe,Ee)}else if(it.B(b.x,z.x))if(b.y<z.y)for(ue=0;ue<le;){for(pe=Math.max(b.y,Math.min(oe[ue++]-re,z.y-ne)),y.lineTo(z.x+x,pe+E),xe=pe+E,pe=Math.min(pe+ne,z.y);ue<le&&(Ee=oe[ue],Ee<pe+ne);)ue++,pe=Math.min(Ee+re,z.y);Ee=z.x-ne+x,Fe=z.x+x,pe+=E,a.curve===Gc?yg(y,Fe,pe,!1):_c(y,Ee,xe,Ee,pe,Fe,pe)}else for(--le;0<=le;){for(ue=Math.min(b.y,Math.max(oe[le--]+re,z.y+ne)),y.lineTo(z.x+x,ue+E),xe=ue+E,ue=Math.max(ue-ne,z.y);0<=le&&(pe=oe[le],pe>ue-ne);)le--,ue=Math.max(pe-re,z.y);pe=z.x-ne+x,Ee=z.x+x,ue+=E,a.curve===Gc?yg(y,Ee,ue,!1):_c(y,pe,xe,pe,ue,Ee,ue)}}}y.lineTo(z.x+x,z.y+E)}function bx(a,y,x,E){var b=a.diagram;if(b===null||y.D(x))return 0;for(b=b.layers;b.next();){var z=b.value;if(z!==null&&z.visible){z=z.Pa.s;for(var ne=z.length,re=0;re<ne;re++){var oe=z[re];if(oe instanceof Kn){if(oe===a)return 0<E.length&&E.sort(function(ue,pe){return ue-pe}),E.length;if(oe.isVisible()&&rf(oe)){var le=oe.routeBounds;le.w()&&a.routeBounds.Yc(le)&&!a.usesSamePort(oe)&&(le=oe.path,le!==null&&le.Ed()&&Mx(y,x,E,oe))}}}}}return 0<E.length&&E.sort(function(ue,pe){return ue-pe}),E.length}function Mx(a,y,x,E){for(var b=it.B(a.y,y.y),z=E.pointsCount,ne=E.i(0),re=tt.alloc(),oe=1;oe<z;oe++){var le=E.i(oe);if(oe<z-1){var ue=E.i(oe+1);if(ne.y===le.y&&le.y===ue.y){if(le.x>ne.x&&ue.x>=le.x||le.x<ne.x&&ue.x<=le.x)continue}else if(ne.x===le.x&&le.x===ue.x&&(le.y>ne.y&&ue.y>=le.y||le.y<ne.y&&ue.y<=le.y))continue}e:{ue=a.x;var pe=a.y,xe=y.x,Ee=y.y,Fe=ne.x;ne=ne.y;var Oe=le.x,at=le.y;if(it.B(ue,xe)){if(!it.B(pe,Ee)&&it.B(ne,at)&&Math.min(pe,Ee)<ne&&Math.max(pe,Ee)>ne&&Math.min(Fe,Oe)<ue&&Math.max(Fe,Oe)>ue&&!it.B(Fe,Oe)){re.x=ue,re.y=ne,ue=!0;break e}}else if(it.B(pe,Ee)&&it.B(Fe,Oe)&&Math.min(ue,xe)<Fe&&Math.max(ue,xe)>Fe&&Math.min(ne,at)<pe&&Math.max(ne,at)>pe&&!it.B(ne,at)){re.x=Fe,re.y=pe,ue=!0;break e}re.x=0,re.y=0,ue=!1}ue&&(b?x.push(re.x):x.push(re.y)),ne=le}tt.free(re)}function rf(a){return a=a.curve,a===Pg||a===Gc}function Qm(a,y){(y||rf(a))&&(y=a.diagram,y===null||y.animationManager.isTicking||y.Eh.contains(a)||a.ml.width===0&&a.ml.height===0||y.Eh.add(a,a.ml.copy()))}Kn.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 E=!1;for(x=x.layers;x.next();){var b=x.value;if(b.visible){if(b===y){E=!0;var z=!1;b=b.Pa.s;for(var ne=b.length,re=0;re<ne;re++){var oe=b[re];oe instanceof Kn&&(oe===this?z=!0:z&&eS(this,oe,a))}}else if(E)for(z=b.Pa.s,b=z.length,ne=0;ne<b;ne++)re=z[ne],re instanceof Kn&&eS(this,re,a)}}}}};function eS(a,y,x){if(y!==null&&y.lk&&y.fd&&rf(y)){var E=y.routeBounds;E.w()&&(a.routeBounds.Yc(E)||x.Yc(E))&&(a.usesSamePort(y)||y.qc())}}Kn.prototype.usesSamePort=function(a){var y=this.pointsCount,x=a.pointsCount;if(0<y&&0<x){var E=this.i(0),b=a.i(0);if(E.Xa(b)||(y=this.i(y-1),a=a.i(x-1),y.Xa(a)||E.Xa(a)||y.Xa(b)))return!0}else if(this.fromNode===a.fromNode||this.toNode===a.toNode||this.fromNode===a.toNode||this.toNode===a.fromNode)return!0;return!1},Kn.prototype.isVisible=function(){if(!Oi.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 E=x;E!==null;){if(E.labeledLink===this)return!0;E=E.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},Kn.prototype.Zb=function(a){if(Oi.prototype.Zb.call(this,a),a&&Qm(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},Kn.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?Pp:this.qk};function Sp(a){var y=a.ef;if(y!==null){var x=a.uf;if(x!==null&&isNaN(a.curviness)){for(var E=a.ff,b=a.vf,z=a=null,ne=y.jb.s,re=ne.length,oe=0;oe<re;oe++){var le=ne[oe];(le.ef===y&&le.ff===E&&le.uf===x&&le.vf===b||le.ef===x&&le.ff===b&&le.uf===y&&le.vf===E)&&(z===null?z=le:(a===null&&(a=[],a.push(z)),a.push(le)))}if(a!==null){for(z=H1(y,x,E,b),z===null&&(z=new i0(y,E,x,b),Z1(y,z),Z1(x,z)),z.links=a,y=0;y<a.length;y++)a[y].Sf=z;z.Sl()}}}}function xp(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(ui(y.links,a),y.Sl()))}Kn.prototype.ph=function(){return!0},Ve.Object.defineProperties(Kn.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&&Km(y,this,x),xp(this),this.C(2)),this.ef=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var E=this.diagram;E!==null&&E.aa&&E.partManager.setFromNodeForLink(this,a,y);var b=this.fromPort,z=this.fromPortChanged;if(z!==null){var ne=!0;E!==null&&(ne=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=ne)}a!==null&&(this.uf!==a&&$m(a,this,b),Sp(this),this.C(1)),this.g("fromNode",y,a),Sg(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&Ql(x),xp(this),this.ff=a;var E=this.fromPort;E!==null&&Ql(E);var b=this.diagram;if(b!==null){var z=this.data,ne=b.model;z!==null&&ne.ri()&&ne.xv(z,a)}x!==E&&(this.Wf=null,this.bb(),z=this.fromPortChanged,z!==null&&(ne=!0,b!==null&&(ne=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=ne))),Sp(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&&Km(y,this,x),xp(this),this.C(2)),this.uf=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var E=this.diagram;E!==null&&E.aa&&E.partManager.setToNodeForLink(this,a,y);var b=this.toPort,z=this.toPortChanged;if(z!==null){var ne=!0;E!==null&&(ne=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=ne)}a!==null&&(this.ef!==a&&$m(a,this,b),Sp(this),this.C(1)),this.g("toNode",y,a),Sg(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&Ql(x),xp(this),this.vf=a;var E=this.toPort;E!==null&&Ql(E);var b=this.diagram;if(b!==null){var z=this.data,ne=b.model;z!==null&&ne.ri()&&ne.Cv(z,a)}x!==E&&(this.Wf=null,this.bb(),z=this.toPortChanged,z!==null&&(ne=!0,b!==null&&(ne=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=ne))),Sp(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:Co},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&&Ql(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&&On(a,">= 0",Kn,"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:Co},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&&Ql(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&&On(a,">= 0",Kn,"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?ur: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&&yp(this.fromNode),this.toNode!==null&&yp(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof Er?a:null}},routeBounds:{get:function(){this.vg();var a=this.ml,y=1/0,x=1/0,E=this.pointsCount;if(E===0)a.h(NaN,NaN,0,0);else{if(E===1)E=this.i(0),y=Math.min(E.x,y),x=Math.min(E.y,x),a.h(E.x,E.y,0,0);else if(E===2){E=this.i(0);var b=this.i(1);y=Math.min(E.x,b.x),x=Math.min(E.y,b.y),a.h(E.x,E.y,0,0),a.Ye(b)}else if(this.computeCurve()===pu&&3<=E&&!this.isOrthogonal)if(b=this.i(0),y=b.x,x=b.y,a.h(y,x,0,0),E===3){E=this.i(1),y=Math.min(E.x,y),x=Math.min(E.y,x);var z=this.i(2);y=Math.min(z.x,y),x=Math.min(z.y,x),it.Dl(b.x,b.y,E.x,E.y,E.x,E.y,z.x,z.y,.5,a)}else for(z=3;z<E;z+=3){var ne=this.i(z-2);z+3>=E&&(z=E-1);var re=this.i(z-1),oe=this.i(z);it.Dl(b.x,b.y,ne.x,ne.y,re.x,re.y,oe.x,oe.y,.5,a),y=Math.min(oe.x,y),x=Math.min(oe.y,x),b=oe}else for(b=this.i(0),z=this.i(1),y=Math.min(b.x,z.x),x=Math.min(b.y,z.y),a.h(b.x,b.y,0,0),a.Ye(z),b=2;b<E;b++)z=this.i(b),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||Um(this);for(var a=this.cq=[],y=this.pointsCount,x=0;x<y-1;x++){var E=this.i(x),b=this.i(x+1);it.$(E.x,b.x)?(E=b.y-E.y,0>E&&(E=-E)):it.$(E.y,b.y)?(E=b.x-E.x,0>E&&(E=-E)):E=Math.sqrt(E.Bf(b)),a.push(E)}}return this.cq}},flattenedTotalLength:{get:function(){var a=this.vt;if(isNaN(a)){for(var y=this.flattenedLengths,x=y.length,E=a=0;E<x;E++)a+=y[E];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 E=a.length%2===0;if(E){for(var b=0;b<a.length;b++)if(typeof a[b]!="number"||isNaN(a[b])){E=!1;break}}if(E)for(x=new Nn,E=0;E<a.length/2;E++)b=new tt(a[2*E],a[2*E+1]).freeze(),x.add(b);else{for(E=!0,b=0;b<a.length;b++){var z=a[b];if(!Wt(z)||typeof z.x!="number"||isNaN(z.x)||typeof z.y!="number"||isNaN(z.y)){E=!1;break}}if(E)for(x=new Nn,E=0;E<a.length;E++)b=a[E],x.add(new tt(b.x,b.y).freeze())}}else if(a instanceof Nn)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else yt("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),Um(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&ra(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||!xg(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!xg(this.computeSpot(!1))?a-2:a-1}},adjusting:{get:function(){return this.qk},set:function(a){var y=this.qk;y!==a&&(this.qk=a,this.g("adjusting",y,a))}},corner:{get:function(){return this.Om},set:function(a){var y=this.Om;y!==a&&(this.Om=a,this.qc(),this.g("corner",y,a))}},curve:{get:function(){return this.Qm},set:function(a){var y=this.Qm;y!==a&&(this.Qm=a,this.bb(),this.qc(),Qm(this,y===Gc||y===Pg||a===Gc||a===Pg),this.g("curve",y,a))}},curviness:{get:function(){return this.Rm},set:function(a){var y=this.Rm;y!==a&&(this.Rm=a,this.bb(),this.qc(),this.g("curviness",y,a))}},routing:{get:function(){return this.qj},set:function(a){var y=this.qj;y!==a&&(this.qj=a,this.Wf=null,this.bb(),Qm(this,(y.value&2)===2||(a.value&2)===2),this.g("routing",y,a))}},smoothness:{get:function(){return this.po},set:function(a){var y=this.po;y!==a&&(this.po=a,this.qc(),this.g("smoothness",y,a))}},key:{get:function(){var a=this.diagram;if(a!==null&&a.model.ri())return a.model.Ac(this.data)}}}),Kn.prototype.invalidateOtherJumpOvers=Kn.prototype.Xo,Kn.prototype.findClosestSegment=Kn.prototype.ez,Kn.prototype.updateRoute=Kn.prototype.vg,Kn.prototype.invalidateRoute=Kn.prototype.bb,Kn.prototype.rollbackRoute=Kn.prototype.rv,Kn.prototype.commitRoute=Kn.prototype.zf,Kn.prototype.startRoute=Kn.prototype.uh,Kn.prototype.clearPoints=Kn.prototype.Fj,Kn.prototype.removePoint=Kn.prototype.pv,Kn.prototype.addPointAt=Kn.prototype.yf,Kn.prototype.addPoint=Kn.prototype.ne,Kn.prototype.insertPointAt=Kn.prototype.m,Kn.prototype.insertPoint=Kn.prototype.Kz,Kn.prototype.setPointAt=Kn.prototype.L,Kn.prototype.setPoint=Kn.prototype.dd,Kn.prototype.getPoint=Kn.prototype.i,Kn.prototype.getOtherPort=Kn.prototype.Cz,Kn.prototype.getOtherNode=Kn.prototype.To;var kf=null,Af=null,Xv=new fn(Kn,"Normal",1),Lx=new fn(Kn,"Orthogonal",2),Fx=new fn(Kn,"AvoidsNodes",6),tS=new fn(Kn,"AvoidsNodesStraight",7),pl=new fn(Kn,"None",0),pu=new fn(Kn,"Bezier",9),Gc=new fn(Kn,"JumpGap",10),Pg=new fn(Kn,"JumpOver",11),Pp=new fn(Kn,"End",17),qm=new fn(Kn,"Scale",18),e0=new fn(Kn,"Stretch",19),wp=new fn(Kn,"OrientAlong",21),Cp=new fn(Kn,"OrientPlus90",22),Ep=new fn(Kn,"OrientMinus90",23),Jv=new fn(Kn,"OrientOpposite",24),t0=new fn(Kn,"OrientUpright",25),bp=new fn(Kn,"OrientPlus90Upright",26),Mp=new fn(Kn,"OrientMinus90Upright",27),n0=new fn(Kn,"OrientUpright45",28),nS=16,iS=14,Lp=8;Kn.className="Link",Kn.Normal=Xv,Kn.Orthogonal=Lx,Kn.AvoidsNodes=Fx,Kn.AvoidsNodesStraight=tS,Kn.None=pl,Kn.Bezier=pu,Kn.JumpGap=Gc,Kn.JumpOver=Pg,Kn.End=Pp,Kn.Scale=qm,Kn.Stretch=e0,Kn.OrientAlong=wp,Kn.OrientPlus90=Cp,Kn.OrientMinus90=Ep,Kn.OrientOpposite=Jv,Kn.OrientUpright=t0,Kn.OrientPlus90Upright=bp,Kn.OrientMinus90Upright=Mp,Kn.OrientUpright45=n0,Kn.EndSegmentStep=8,Kn.CurvinessStart=nS,Kn.SpacingMin=iS,Kn.OrthoShortCut=Lp;function i0(a,y,x,E){Zr(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=E,this.links=[]}i0.prototype.Sl=function(){if(!this.qq){var a=this.links;0<a.length&&(a=a[0].diagram,a!==null&&(a.ow.add(this),this.Fe=a.undoManager.isUndoingRedoing))}this.qq=!0},i0.prototype.Nv=function(){if(this.qq){this.qq=!1;var a=this.links;if(0<a.length){var y=a[0],x=y.diagram;x=x===null||x.pi&&!this.Fe,this.Fe=!1,y.arrangeBundledLinks(a,x),a.length===1&&(y.Sf=null,a.length=0)}a.length===0&&(a=this.Ds,this!==null&&a.af!==null&&a.af.remove(this),a=this.cv,this!==null&&a.af!==null&&a.af.remove(this))}},i0.className="LinkBundle";function Fp(a){Zr(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}Fp.prototype.initialize=function(a){if(!(0>=a.width||0>=a.height)){var y=a.y,x=a.x+a.width,E=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((E+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=[],E=0;E<=a;E++)x[E]=new Uint32Array(y);this.ac=x,this.di=a-1,this.ei=y-1}if(a=Qv,this.ac!==null)for(y=0;y<=this.di;y++)if(x=this.ac[y],x.fill)x.fill(a);else for(E=0;E<=this.ei;E++)x[E]=a}};function wg(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function ec(a,y,x){return wg(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):Qv}function rS(a){if(a.ac!==null)for(var y=0;y<=a.di;y++)for(var x=a.ac[y],E=0;E<=a.ei;E++)x[E]>=of&&(x[E]=Qv)}Fp.prototype.Yj=function(a,y,x,E){if(a>this.En||a+x<this.Nd||y>this.Fn||y+E<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 b=Math.max(0,E)/this.sc+1|0;if(0>a&&(x+=a,a=0),0>y&&(b+=y,y=0),0>x||0>b)return!0;for(E=Math.min(a+x-1,this.di)|0,x=Math.min(y+b-1,this.ei)|0;a<=E;a++){b=this.ac[a];for(var z=y;z<=x;z++)if(b[z]===$c)return!1}return!0};function tc(a,y,x,E,b,z,ne,re,oe){if(!(y<z||y>ne||x<re||x>oe)){var le=y|0,ue=x|0,pe=a.ac[le][ue];if(pe>=of&&pe<Cg)for(b?ue+=E:le+=E,pe+=1;z<=le&&le<=ne&&re<=ue&&ue<=oe&&!(pe>=a.ac[le][ue]);)a.ac[le][ue]=pe,pe+=1,b?ue+=E:le+=E;if(le=b?ue:le,b)if(0<E)for(x+=E;x<le;x+=E)tc(a,y,x,1,!b,z,ne,re,oe),tc(a,y,x,-1,!b,z,ne,re,oe);else for(x+=E;x>le;x+=E)tc(a,y,x,1,!b,z,ne,re,oe),tc(a,y,x,-1,!b,z,ne,re,oe);else if(0<E)for(y+=E;y<le;y+=E)tc(a,y,x,1,!b,z,ne,re,oe),tc(a,y,x,-1,!b,z,ne,re,oe);else for(y+=E;y>le;y+=E)tc(a,y,x,1,!b,z,ne,re,oe),tc(a,y,x,-1,!b,z,ne,re,oe)}}function r0(a,y,x,E,b,z,ne,re,oe){y|=0,x|=0;var le=$c,ue=of;for(a.ac[y][x]=ue;le===$c&&y>z&&y<ne&&x>re&&x<oe;)ue+=1,a.ac[y][x]=ue,b?x+=E:y+=E,le=a.ac[y][x]}function o0(a,y,x,E,b,z,ne,re,oe){y|=0,x|=0;var le=$c,ue=Cg;for(a.ac[y][x]=ue;le===$c&&y>z&&y<ne&&x>re&&x<oe;)a.ac[y][x]=ue,b?x+=E:y+=E,le=a.ac[y][x]}function oS(a,y,x,E,b,z,ne){if(a.ac!==null){a.abort=!1;var re=y.x,oe=y.y;if(wg(a,re,oe)){re-=a.Nd,re/=a.rc,oe-=a.Od,oe/=a.sc;var le=E.x,ue=E.y;if(wg(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 pe=z.x;E=z.y,y=z.x+z.width;var xe=z.y+z.height;pe-=a.Nd,pe/=a.rc,E-=a.Od,E/=a.sc,y-=a.Nd,y/=a.rc,xe-=a.Od,xe/=a.sc,z=Math.max(0,Math.min(a.di,pe|0)),y=Math.min(a.di,Math.max(0,y|0)),pe=Math.max(0,Math.min(a.ei,E|0)),xe=Math.min(a.ei,Math.max(0,xe|0)),E=a.ac,re|=0,oe|=0,le|=0,ue|=0;var Ee=x===0||x===90?1:-1;if(x=x===90||x===270,E[re][oe]===$c?(r0(a,re,oe,Ee,x,z,y,pe,xe),r0(a,re,oe,1,!x,z,y,pe,xe),r0(a,re,oe,-1,!x,z,y,pe,xe)):r0(a,re,oe,Ee,x,re,oe,re,oe),E[le][ue]===$c?(o0(a,le,ue,b===0||b===90?1:-1,b===90||b===270,z,y,pe,xe),o0(a,le,ue,1,!(b===90||b===270),z,y,pe,xe),o0(a,le,ue,-1,!(b===90||b===270),z,y,pe,xe)):o0(a,le,ue,Ee,x,le,ue,le,ue),x=qn(),ne&&aS(a,le,ue,b,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=of,b=x[x.length-2],ne=x[x.length-1],E[b][ne]=a++,z=x.length-4;0<=z;z-=2)for(b=x[z+2],ne=x[z+3],y=x[z],le=x[z+1];y>b?b++:y<b?b--:le>ne?ne++:le<ne&&ne--,E[b][ne]=a++,b!==y||ne!==le;);else tc(a,re,oe,1,!1,z,y,pe,xe),tc(a,re,oe,-1,!1,z,y,pe,xe),tc(a,re,oe,1,!0,z,y,pe,xe),tc(a,re,oe,-1,!0,z,y,pe,xe);di(x)}}}}function aS(a,y,x,E,b,z,ne){for(var re=a.ac,oe=y,le=x;;){if(oe===b&&le===z)return!0;var ue=oe,pe=le;if(E===0)if(ue<b)ue++;else break;else if(E===90)if(pe<z)pe++;else break;else if(E===180)if(ue>b)ue--;else break;else if(pe>z)pe--;else break;var xe=re[ue][pe];if(xe===0||xe===qv)break;oe=ue,le=pe}for(;;){if(ue=E,pe=oe,xe=le,E===0?xe<z?(ue=90,xe++):xe>z&&(ue=270,xe--):E===90?pe<b?(ue=0,pe++):pe>b&&(ue=180,pe--):E===180?xe<z?(ue=90,xe++):xe>z&&(ue=270,xe--):pe<b?(ue=0,pe++):pe>b&&(ue=180,pe--),pe=re[pe][xe],ue!==E&&pe!==0&&pe!==qv){if(ne.push(oe),ne.push(le),aS(a,oe,le,ue,b,z,ne))return!0;ne.pop(),ne.pop()}if(re[oe][le]=qv,E===0){if(oe===y)return!1;oe--}else if(E===90){if(le===x)return!1;le--}else if(E===180){if(oe===y)return!1;oe++}else{if(le===x)return!1;le++}}}Ve.Object.defineProperties(Fp.prototype,{bounds:{get:function(){return new gn(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 $c=0,of=1,Cg=999999,Qv=Cg+1,qv=Cg+2;Fp.className="PositionArray";function Tf(){Zr(this),this.port=this.node=null,this.pe=[],this.ap=!1}Tf.prototype.toString=function(){for(var a=this.pe,y=this.node.toString()+" "+a.length.toString()+":",x=0;x<a.length;x++){var E=a[x];E!==null&&(y+=`
|
|
|
`+E.toString())}return y};function Bx(a,y,x,E){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 E&&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}Tf.prototype.Sl=function(){this.pe.length=0};function sS(a,y){var x=a.pe;if(x.length===0){e:if(!a.ap){x=a.ap,a.ap=!0;var E=null,b=a.node,z=b instanceof gr?b:null;if(z===null||z.isSubGraphExpanded)var ne=b.isTreeExpanded?b.findLinksConnected(a.port.portId):b.qx();else{if(!z.actualBounds.w()){a.ap=x;break e}E=z,ne=E.Lu()}z=a.pe.length=0;var re=a.port.ga(cs,tt.alloc()),oe=a.port.ga(ys,tt.alloc());for(b=gn.allocAt(re.x,re.y,0,0),b.Ye(oe),tt.free(re),tt.free(oe),re=tt.allocAt(b.x+b.width/2,b.y+b.height/2),oe=a.port.li(),ne=ne.iterator;ne.next();){var le=ne.value;if(le.isVisible()&&le.fromPort!==le.toPort){var ue=le.fromPort===a.port||le.fromNode!==null&&le.fromNode.Td(E),pe=le.computeSpot(ue,a.port);if(pe.$c()&&(ue=ue?le.toPort:le.fromPort,ue!==null)){var xe=ue.part;if(xe!==null){var Ee=xe.findVisibleNode();Ee!==null&&Ee!==xe&&(xe=Ee,ue=xe.port),ue=le.computeOtherPoint(xe,ue),xe=re.ab(ue),xe-=oe,0>xe?xe+=360:360<=xe&&(xe-=360),pe=Bx(b,pe,xe,le.isOrthogonal),pe===0?(pe=4,180<xe&&(xe-=360)):pe===90?(pe=8,270<xe&&(xe-=360)):pe===180?pe=2:(pe=1,90>xe&&(xe+=360)),Ee=a.pe[z],Ee===void 0?(Ee=new ey(le,xe,pe),a.pe[z]=Ee):(Ee.link=le,Ee.angle=xe,Ee.Nc=pe),Ee.hv.set(ue),z++}}}}for(tt.free(re),a.pe.sort(Tf.prototype.j),oe=a.pe.length,E=-1,z=re=0;z<oe;z++)ne=a.pe[z],ne!==void 0&&(ne.Nc!==E&&(E=ne.Nc,re=0),ne.Uo=re,re++);for(E=-1,re=0,z=oe-1;0<=z;z--)oe=a.pe[z],oe!==void 0&&(oe.Nc!==E&&(E=oe.Nc,re=oe.Uo+1),oe.Gl=re);if(z=a.pe,pe=a.port,E=a.node.portSpreading,re=tt.alloc(),oe=tt.alloc(),ne=tt.alloc(),le=tt.alloc(),pe.ga(cs,re),pe.ga(Ol,oe),pe.ga(ys,ne),pe.ga(nl,le),Ee=xe=ue=pe=0,E===Wv)for(var Fe=0;Fe<z.length;Fe++){var Oe=z[Fe];if(Oe!==null){var at=Oe.link.computeThickness();switch(Oe.Nc){case 8:xe+=at;break;case 2:Ee+=at;break;case 1:pe+=at;break;default:case 4:ue+=at}}}var Xe=Fe=0,pt=1,wt=Oe=0;for(at=0;at<z.length;at++){var Mt=z[at];if(Mt!==null){if(Fe!==Mt.Nc){switch(Fe=Mt.Nc,Fe){case 8:var It=ne;Xe=le;break;case 2:It=le,Xe=re;break;case 1:It=re,Xe=oe;break;default:case 4:It=oe,Xe=ne}switch(Oe=Xe.x-It.x,wt=Xe.y-It.y,Fe){case 8:xe>Math.abs(Oe)?(pt=Math.abs(Oe)/xe,xe=Math.abs(Oe)):pt=1;break;case 2:Ee>Math.abs(wt)?(pt=Math.abs(wt)/Ee,Ee=Math.abs(wt)):pt=1;break;case 1:pe>Math.abs(Oe)?(pt=Math.abs(Oe)/pe,pe=Math.abs(Oe)):pt=1;break;default:case 4:ue>Math.abs(wt)?(pt=Math.abs(wt)/ue,ue=Math.abs(wt)):pt=1}Xe=0}var qt=Mt.Zo;if(E===Wv){switch(Mt=Mt.link.computeThickness(),Mt*=pt,qt.set(It),Fe){case 8:qt.x=It.x+Oe/2+xe/2-Xe-Mt/2;break;case 2:qt.y=It.y+wt/2+Ee/2-Xe-Mt/2;break;case 1:qt.x=It.x+Oe/2-pe/2+Xe+Mt/2;break;default:case 4:qt.y=It.y+wt/2-ue/2+Xe+Mt/2}Xe+=Mt}else{var ei=.5;E===Vm&&(ei=(Mt.Uo+1)/(Mt.Gl+1)),qt.x=It.x+Oe*ei,qt.y=It.y+wt*ei}}}for(tt.free(re),tt.free(oe),tt.free(ne),tt.free(le),It=a.pe,z=0;z<It.length;z++)E=It[z],E!==null&&(E.Ju=a.computeEndSegmentLength(E));a.ap=x,gn.free(b)}x=a.pe}for(a=0;a<x.length;a++)if(b=x[a],b!==null&&b.link===y)return b;return null}Tf.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},Tf.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,Fa,y.fromPort===this.port),E=a.Uo;if(0>E)return x;var b=a.Gl;if(1>=b||!y.isOrthogonal)return x;y=a.hv;var z=a.Zo;return(a.Nc===2||a.Nc===8)&&(E=b-1-E),((a=a.Nc===2||a.Nc===4)?y.y<z.y:y.x<z.x)?x+8*E:(a?y.y===z.y:y.x===z.x)?x:x+8*(b-1-E)},Tf.className="Knot";function ey(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}ey.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()},ey.className="LinkInfo";function da(a){Zr(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)}da.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},da.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},da.prototype.qb=function(){},da.prototype.toString=function(){var a=li(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},da.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())}}},da.prototype.createNetwork=function(){return new qo(this)},da.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof Qt?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof gr?y.lg(a.memberParts):y.lg(a.iterator),y},da.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")}},da.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()}},da.prototype.doLayout=function(a){var y=new Ln;a instanceof Qt?(vd(this,y,a.nodes,!0,this.rh,!0,!1,!0),vd(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof gr?vd(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},da.prototype.doMinimalNoNetworkLayout=function(a){var y=Math.ceil(Math.sqrt(a.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var x=this.arrangementOrigin.x,E=x,b=this.arrangementOrigin.y,z=0,ne=0;for(a=a.iterator;a.next();){var re=a.value;Bp(re);var oe=re.measuredBounds,le=oe.width;oe=oe.height,re.moveTo(E,b),re instanceof gr&&(re.rh=!1),E+=Math.max(le,50)+20,ne=Math.max(ne,Math.max(oe,50)),z>=y-1?(z=0,E=x,b+=ne+20,ne=0):z++}},da.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,E=this.arrangementOrigin.y,b=0,z=0,ne=this.network.vertexes.iterator;ne.next();){var re=ne.value.node;if(!(re===null||re instanceof Kn)&&(Bp(re),this.rh(re))){var oe=re.measuredBounds,le=oe.width;oe=oe.height,re.moveTo(x,E),re instanceof gr&&(re.rh=!1),x+=Math.max(le,50)+20,z=Math.max(z,Math.max(oe,50)),b>=a-1?(b=0,x=y,E+=z+20,z=0):b++}}},da.prototype.rh=function(a){return!!(!a.location.w()||a instanceof gr&&a.rh)};function vd(a,y,x,E,b,z,ne,re){for(x=x.iterator;x.next();){var oe=x.value;E&&!oe.isTopLevel||b!==null&&!b(oe)||!oe.canLayout()||(z&&oe instanceof oi?oe.isLinkLabel||(oe instanceof gr&&oe.layout===null?vd(a,y,oe.memberParts,!1,b,z,ne,re):(Bp(oe),y.add(oe))):ne&&oe instanceof Kn?y.add(oe):!re||!oe.Zc()||oe instanceof oi||(Bp(oe),y.add(oe)))}}function Bp(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}da.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new gn),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},da.prototype.ex=function(a){var y=new Ln;return a instanceof Qt?(vd(this,y,a.nodes,!0,null,!0,!0,!0),vd(this,y,a.links,!0,null,!0,!0,!0),vd(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof gr?vd(this,y,a.memberParts,!1,null,!0,!0,!0):vd(this,y,a.iterator,!1,null,!0,!0,!0),y},da.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(cs),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},Ve.Object.defineProperties(da.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())}}}),da.prototype.collectParts=da.prototype.ex,da.prototype.getLayoutBounds=da.prototype.ni,da.prototype.invalidateLayout=da.prototype.C,da.className="Layout";function qo(a){Zr(this),this.Sc=a,this.wf=new Ln,this.ye=new Ln,this.Es=new xi,this.zs=new xi}qo.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 Ln,this.ye=new Ln,this.Es=new xi,this.zs=new xi},qo.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},qo.prototype.createVertex=function(){return new ps(this)},qo.prototype.createEdge=function(){return new ql(this)},qo.prototype.lg=function(a,y,x){if(a!==null){for(y===void 0&&(y=!1),x===void 0&&(x=null),x===null&&(x=function(ne){if(ne instanceof oi)return!ne.isLinkLabel;if(ne instanceof Kn){var re=ne.fromNode;return re===null||re.isLinkLabel?!1:(ne=ne.toNode,!(ne===null||ne.isLinkLabel))}return!1}),a=a.iterator;a.next();){var E=a.value;if(E instanceof oi&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)){if(E instanceof gr&&E.layout===null)this.lg(E.memberParts,!1);else if(this.ki(E)===null){var b=this.createVertex();b.node=E,this.dh(b)}}}for(a.reset();a.next();)if(E=a.value,E instanceof Kn&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)&&this.Lo(E)===null){var z=E.fromNode;b=E.toNode,z!==null&&b!==null&&z!==b&&(z=this.findGroupVertex(z),b=this.findGroupVertex(b),z!==null&&b!==null&&this.Zj(z,b,E))}}},qo.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=qo.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&&lS(this,a)){for(var y=a.tg,x=y.count-1;0<=x;x--){var E=y.M(x);this.Mj(E)}for(y=a.mg,a=y.count-1;0<=a;a--)x=y.M(a),this.Mj(x)}};function lS(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){ty(this,a);var y=a.toVertex;y!==null&&y.Cl(a),y=a.fromVertex,y!==null&&y.zl(a)}};function ty(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,E=this.Lo(a);return E===null?(E=this.createEdge(),E.link=a,y!==null&&(E.fromVertex=this.Bl(y)),x!==null&&(E.toVertex=this.Bl(x)),this.Bo(E)):(y!==null?E.fromVertex=this.Bl(y):E.fromVertex=null,x!==null?E.toVertex=this.Bl(x):E.toVertex=null),E},Le.Mj=function(a){if(a!==null){var y=a.toVertex;y!==null&&y.Kl(a),y=a.fromVertex,y!==null&&y.Jl(a),ny(this,a)}};function ny(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 E=this.createEdge();return E.link=x,E.fromVertex=a,E.toVertex=y,this.Bo(E),E}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=qn(),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]);di(a)},qo.prototype.deleteArtificialVertexes=function(){for(var a=qn(),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=qn(),x=this.ye.iterator;x.next();){var E=x.value;E.link===null&&E.data===null&&y.push(E)}for(x=y.length,E=0;E<x;E++)this.Mj(y[E]);di(a),di(y)};function Nx(a){for(var y=qn(),x=a.ye.iterator;x.next();){var E=x.value;E.fromVertex!==null&&E.toVertex!==null||y.push(E)}for(x=y.length,E=0;E<x;E++)a.Mj(y[E]);di(y)}qo.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Nx(this),this.Ko()),a=new Nn;for(var y=!0;y;){y=!1;for(var x=this.wf.iterator;x.next();){var E=x.value;if(0<E.tg.count||0<E.mg.count){y=this.layout.createNetwork(),a.add(y),iy(this,y,E),y=!0;break}}}return a.sort(function(b,z){return b===null||z===null||b===z?0:z.vertexes.count-b.vertexes.count}),a};function iy(a,y,x){if(x!==null&&x.network!==y){lS(a,x),y.dh(x);for(var E=x.sourceEdges;E.next();){var b=E.value;b.network!==y&&(ny(a,b),ty(y,b),iy(a,y,b.fromVertex))}for(E=x.destinationEdges;E.next();)x=E.value,x.network!==y&&(ny(a,x),ty(y,x),iy(a,y,x.toVertex))}}qo.prototype.dz=function(){for(var a=new Ln,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},Ve.Object.defineProperties(qo.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}}}),qo.prototype.findAllParts=qo.prototype.dz,qo.prototype.splitIntoSubNetworks=qo.prototype.Zx,qo.prototype.deleteSelfEdges=qo.prototype.Ko,qo.prototype.reverseEdge=qo.prototype.gm,qo.prototype.linkVertexes=qo.prototype.Zj,qo.prototype.findEdge=qo.prototype.Lo,qo.prototype.deleteLink=qo.prototype.Yy,qo.prototype.deleteEdge=qo.prototype.Mj,qo.prototype.addLink=qo.prototype.Dy,qo.prototype.addEdge=qo.prototype.Bo,qo.prototype.findVertex=qo.prototype.ki,qo.prototype.deleteNode=qo.prototype.Zy,qo.prototype.deleteVertex=qo.prototype.Iu,qo.prototype.addNode=qo.prototype.Bl,qo.prototype.addVertex=qo.prototype.dh,qo.prototype.addParts=qo.prototype.lg,qo.className="LayoutNetwork";function ps(a){Zr(this),this.ob=a,this.j=new gn(0,0,10,10).freeze(),this.o=new tt(5,5).freeze(),this.Sh=this.ub=null,this.tg=new Nn,this.mg=new Nn}ps.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new Nn,this.mg=new Nn},ps.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+Bi(this);if(0<a&&(y+=this.node!==null?"("+this.node.toString()+")":"",1<a)){a="";for(var x=!0,E=this.tg.iterator;E.next();){var b=E.value;x?x=!1:a+=",",a+=b.toString(0)}for(b="",x=!0,E=this.mg.iterator;E.next();){var z=E.value;x?x=!1:b+=",",b+=z.toString(0)}y+=" sources: "+a+" destinations: "+b}return y},ps.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;Wt(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 gr)){x=gn.alloc(),a.Va();var E=this.network.layout.ni(a,x),b=a.locationObject.ga(Qr);if(E.w()&&b.w()){a.moveTo(y.x+this.focusX-(b.x-E.x),y.y+this.focusY-(b.y-E.y)),gn.free(x);return}gn.free(x)}a.moveTo(y.x,y.y)}},ps.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},ps.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},ps.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},ps.prototype.Jl=function(a){a!==null&&this.mg.remove(a)};function ry(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}Ve.Object.defineProperties(ps.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,E=y.width;y=y.height,this.o.h(E/2,y/2),this.j.h(a,x,E,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=gn.alloc(),E=y.ni(a,x);y=E.x;var b=E.y,z=E.width;if(E=E.height,isNaN(y)&&(y=0),isNaN(b)&&(b=0),this.j.h(y,b,z,E),gn.free(x),!(a instanceof gr)&&(a=a.locationObject.ga(Qr),a.w())){this.o.h(a.x-y,a.y-b);return}this.o.h(z/2,E/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 Ln,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new Ln,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new Ln,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 Nn,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}}}),ps.prototype.deleteDestinationEdge=ps.prototype.Jl,ps.prototype.addDestinationEdge=ps.prototype.zl,ps.prototype.deleteSourceEdge=ps.prototype.Kl,ps.prototype.addSourceEdge=ps.prototype.Cl,ps.className="LayoutVertex",ps.standardComparer=ry,ps.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 E=parseFloat(y[x]),b=parseFloat(a[x]);if(isNaN(E))if(isNaN(b)){if(y[x].localeCompare(a[x])!==0)return y[x].localeCompare(a[x])}else return 1;else{if(isNaN(b))return-1;if(E-b!==0)return E-b}}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 ql(a){Zr(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}ql.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},ql.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+Bi(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},ql.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},ql.prototype.commit=function(){},ql.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},Ve.Object.defineProperties(ql.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)}}}),ql.prototype.getOtherVertex=ql.prototype.Ax,ql.className="LayoutEdge";function Ds(a){da.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new Xn(NaN,NaN).freeze(),this.tf=new Xn(10,10).freeze(),this.Jb=Np,this.Rb=s0,this.nd=kp,this.hd=uS,a&&Object.assign(this,a)}Ot(Ds,da),Ds.prototype.cloneProtected=function(a){da.prototype.cloneProtected.call(this,a),a.zo=this.zo,a.yo=this.yo,a.yg.assign(this.yg),a.tf.assign(this.tf),a.Jb=this.Jb,a.Rb=this.Rb,a.nd=this.nd,a.hd=this.hd},Ds.prototype.qb=function(a){a.classType===Ds?a===kp||a===u0||a===oy||a===l0?this.sorting=a:a===s0||a===vh?this.arrangement=a:a===Np||a===a0?this.alignment=a:yt("Unknown enum value: "+a):da.prototype.qb.call(this,a)},Ds.prototype.doLayout=function(a){this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var y=this.ex(a);a=this.diagram;for(var x=y.copy().iterator;x.next();){var E=x.value;if(!E.ph()||E.fromNode===null&&E.toNode===null){if(E.Va(),E instanceof gr)for(E=E.memberParts;E.next();)y.remove(E.value)}else y.remove(E)}var b=y.Fa();if(b.length!==0){switch(this.sorting){case l0:b.reverse();break;case kp:b.sort(this.comparer);break;case u0:b.sort(this.comparer),b.reverse()}var z=this.wrappingColumn;isNaN(z)&&(z=0);var ne=this.wrappingWidth;switch(isNaN(ne)&&a!==null?(y=a.padding,ne=Math.max(a.viewportBounds.width-y.left-y.right,0)):ne=Math.max(this.wrappingWidth,0),0>=z&&0>=ne&&(z=1),y=this.spacing.width,isFinite(y)||(y=0),x=this.spacing.height,isFinite(x)||(x=0),a!==null&&a.Ea("Layout"),E=[],this.alignment){case a0:var re=y,oe=x,le=gn.alloc(),ue=Math.max(this.cellSize.width,1);if(!isFinite(ue))for(var pe=ue=0;pe<b.length;pe++){var xe=this.ni(b[pe],le);ue=Math.max(ue,xe.width)}if(ue=Math.max(ue+re,1),pe=Math.max(this.cellSize.height,1),!isFinite(pe))for(xe=pe=0;xe<b.length;xe++){var Ee=this.ni(b[xe],le);pe=Math.max(pe,Ee.height)}pe=Math.max(pe+oe,1),xe=this.arrangement;for(var Fe=Ee=this.arrangementOrigin.x,Oe=this.arrangementOrigin.y,at=0,Xe=0,pt=0;pt<b.length;pt++){var wt=b[pt],Mt=this.ni(wt,le),It=Math.ceil((Mt.width+re)/ue)*ue,qt=Math.ceil((Mt.height+oe)/pe)*pe;switch(xe){case vh:var ei=Math.abs(Fe-Mt.width);break;default:ei=Fe+Mt.width}switch((0<z&&at>z-1||0<ne&&0<at&&ei-Ee>ne)&&(E.push(new gn(0,Oe,ne+re,Xe)),at=0,Fe=Ee,Oe+=Xe,Xe=0),Xe=Math.max(Xe,qt),xe){case vh:Mt=-Mt.width;break;default:Mt=0}switch(wt.moveTo(Fe+Mt,Oe),xe){case vh:Fe-=It;break;default:Fe+=It}at++}E.push(new gn(0,Oe,ne+re,Xe)),gn.free(le);break;case Np:for(oe=ne,ue=z,pe=y,xe=x,ne=gn.alloc(),Ee=Math.max(this.cellSize.width,1),z=Oe=le=0,re=tt.alloc(),Fe=0;Fe<b.length;Fe++)Xe=b[Fe],at=this.ni(Xe,ne),Xe=Zc(Xe,Xe.locationObject,Xe.locationSpot,re),le=Math.max(le,Xe.x),Oe=Math.max(Oe,at.width-Xe.x),z=Math.max(z,Xe.y);switch(Fe=this.arrangement,Fe){case vh:le+=pe;break;default:Oe+=pe}Ee=isFinite(Ee)?Math.max(Ee+pe,1):Math.max(le+Oe,1);var Si=Xe=this.arrangementOrigin.x;for(pt=this.arrangementOrigin.y,Oe=0,oe>=le&&(oe-=le),le=wt=0,It=Math.max(this.cellSize.height,1),Mt=z=0,qt=!0,at=tt.alloc(),ei=0;ei<b.length;ei++){var fi=b[ei],Gn=this.ni(fi,ne),Tn=Zc(fi,fi.locationObject,fi.locationSpot,re);if(0<Oe)switch(Fe){case vh:Si=(Si-Xe-(Gn.width-Tn.x))/Ee,Si=it.$(Math.round(Si),Si)?Math.round(Si):Math.floor(Si),Si=Si*Ee+Xe;break;default:Si=(Si-Xe+Tn.x)/Ee,Si=it.$(Math.round(Si),Si)?Math.round(Si):Math.ceil(Si),Si=Si*Ee+Xe}else switch(Fe){case vh:wt=Si+Tn.x+Gn.width;break;default:wt=Si-Tn.x}switch(Fe){case vh:var dr=-(Si+Tn.x)+wt;break;default:dr=Si+Gn.width-Tn.x-wt}if(0<ue&&Oe>ue-1||0<oe&&0<Oe&&dr>oe){for(E.push(new gn(0,qt?pt-z:pt,oe+pe,Mt+z+xe)),Si=0;Si<Oe&&ei!==Oe;Si++){dr=b[ei-Oe+Si];var Xi=Zc(dr,dr.locationObject,dr.locationSpot,at);dr.moveTo(dr.position.x,dr.position.y+z-Xi.y)}Mt+=xe,pt=qt?pt+Mt:pt+(Mt+z),Oe=Mt=z=0,Si=Xe,qt=!1}switch(Si===Xe&&(le=Fe===vh?Math.max(le,Gn.width-Tn.x):Math.min(le,-Tn.x)),z=Math.max(z,Tn.y),Mt=Math.max(Mt,Gn.height-Tn.y),isFinite(It)&&(Mt=Math.max(Mt,Math.max(Gn.height,It)-Tn.y)),qt?fi.moveTo(Si-Tn.x,pt-Tn.y):fi.moveTo(Si-Tn.x,pt),Fe){case vh:Si-=Tn.x+pe;break;default:Si+=Gn.width-Tn.x+pe}Oe++}if(E.push(new gn(0,pt,oe+pe,(qt?Mt:Mt+z)+xe)),b.length!==Oe)for(oe=0;oe<Oe;oe++)ue=b[b.length-Oe+oe],pe=Zc(ue,ue.locationObject,ue.locationSpot,re),ue.moveTo(ue.position.x,ue.position.y+z-pe.y);if(tt.free(re),tt.free(at),Fe===vh)for(b=0;b<E.length;b++)z=E[b],z.width+=le,z.x-=le;else for(b=0;b<E.length;b++)z=E[b],z.x>le&&(z.width+=z.x-le,z.x=le);gn.free(ne)}for(re=z=ne=b=0;re<E.length;re++)oe=E[re],b=Math.min(b,oe.x),ne=Math.min(ne,oe.y),z=Math.max(z,oe.x+oe.width);this.arrangement===vh?this.commitLayers(E,new tt(b+y/2-(z+b),ne-x/2)):this.commitLayers(E,new tt(b-y/2,ne-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},Ds.prototype.commitLayers=function(){};function uS(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}Ve.Object.defineProperties(Ds.prototype,{wrappingWidth:{get:function(){return this.zo},set:function(a){this.zo!==a&&(0<a||isNaN(a))&&(this.zo=a,this.isViewportSized=isNaN(a),this.C())}},wrappingColumn:{get:function(){return this.yo},set:function(a){this.yo!==a&&(0<a||isNaN(a))&&(this.yo=a,this.C())}},cellSize:{get:function(){return this.yg},set:function(a){this.yg.D(a)||(this.yg.assign(a),this.C())}},spacing:{get:function(){return this.tf},set:function(a){this.tf.D(a)||(this.tf.assign(a),this.C())}},alignment:{get:function(){return this.Jb},set:function(a){this.Jb===a||a!==Np&&a!==a0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==s0&&a!==vh||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==oy&&a!==l0&&a!==kp&&a!==u0||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var a0=new fn(Ds,"Position",0),Np=new fn(Ds,"Location",1),s0=new fn(Ds,"LeftToRight",2),vh=new fn(Ds,"RightToLeft",3),oy=new fn(Ds,"Forward",4),l0=new fn(Ds,"Reverse",5),kp=new fn(Ds,"Ascending",6),u0=new fn(Ds,"Descending",7);Ds.className="GridLayout",Ds.standardComparer=uS,Ds.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),y=y.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);for(var x=0;x<a.length;x++)if(y[x]!==""&&y[x]!==void 0){var E=parseFloat(a[x]),b=parseFloat(y[x]);if(isNaN(E))if(isNaN(b)){if(a[x].localeCompare(y[x])!==0)return a[x].localeCompare(y[x])}else return 1;else{if(isNaN(b))return-1;if(E-b!==0)return E-b}}else if(a[x]!=="")return 1;return y[x]!==""&&y[x]!==void 0?-1:0}return 1}return y!==null?-1:0},Ds.Position=a0,Ds.Location=Np,Ds.LeftToRight=s0,Ds.RightToLeft=vh,Ds.Forward=oy,Ds.Reverse=l0,Ds.Ascending=kp,Ds.Descending=u0;function Io(){this.On=new Ln,this.Dn=new Ln,this.Pa=new Ln,this.cf=new xi,this.bf=new xi,this.aj=new xi,this.H=null,this.tp=!1}Le=Io.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 oi){if(this.On.add(a),a instanceof gr){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 Kn?this.Dn.add(a):a instanceof lo||this.Pa.add(a);y=a.data,y===null||a instanceof lo||(a instanceof Kn?this.bf.add(y,a):this.cf.add(y,a))},Le.pc=function(a){if(a.Ej(),a instanceof oi){if(this.On.remove(a),a instanceof gr){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 Kn?this.Dn.remove(a):a instanceof lo||this.Pa.remove(a);y=a.data,y===null||a instanceof lo||(a instanceof Kn?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,E=y.key;(!x.Zc()||x instanceof gr)&&yt('Invalid node template in Diagram.nodeTemplateMap: template for "'+E+'" must be a Node or a simple Part, not a Group or Link: '+x)}for(y=a.groupTemplateMap.iterator;y.next();)x=y.value,E=y.key,x instanceof gr||yt('Invalid group template in Diagram.groupTemplateMap: template for "'+E+'" must be a Group, not a normal Node or Link: '+x);for(y=a.linkTemplateMap.iterator;y.next();)x=y.value,E=y.key,x instanceof Kn||yt('Invalid link template in Diagram.linkTemplateMap: template for "'+E+'" must be a Link, not a normal Node or simple Part: '+x);for(y=qn(),x=a.selection.iterator;x.next();)(E=x.value.data)&&y.push(E);for(x=qn(),a=a.highlighteds.iterator;a.next();)(E=a.value.data)&&x.push(E);for(a=qn(),E=this.nodes.iterator;E.next();){var b=E.value;b.data!==null&&(a.push(b.data),a.push(b.location))}for(E=this.links.iterator;E.next();)b=E.value,b.data!==null&&(a.push(b.data),a.push(b.location));for(E=this.parts.iterator;E.next();)b=E.value,b.data!==null&&(a.push(b.data),a.push(b.location));for(this.removeAllModeledParts(),this.addAllModeledParts(),E=0;E<y.length;E++)b=this.Lc(y[E]),b!==null&&(b.isSelected=!0);for(E=0;E<x.length;E++)b=this.Lc(x[E]),b!==null&&(b.isHighlighted=!0);for(E=0;E<a.length;E+=2)b=this.Lc(a[E]),b!==null&&(b.location=a[E+1]);di(y),di(x),di(a)}},Io.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},Io.prototype.addModeledParts=function(a,y){var x=this,E=this.diagram.model;a.forEach(function(b){E.lb(b)&&hS(x,b,!1)}),a.forEach(function(b){E.lb(b)&&x.resolveReferencesForData(b)}),y!==!1&&Qf(this.diagram,!1)};function hS(a,y,x){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.cf.contains(y)){x===void 0&&(x=!0);e:{if(y!=null&&!a.H.undoManager.isUndoingRedoing&&!a.cf.contains(y)){var E=a.Ro(y),b=cS(a,y,E);if(b!==null&&($u(b),b=b.copy(),b!==null)){var z=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,b.Tf=E,b.ub=y,a.tp&&(b.Jg="Tool"),a.diagram.add(b),b.ub=null,b.data=y,a.diagram.skipsModelSourceBindings=z,E=b;break e}}E=null}E!==null&&x&&a.resolveReferencesForData(y)}}Io.prototype.insertLink=function(){return null},Io.prototype.resolveReferencesForData=function(){},Io.prototype.Ro=function(a){return this.H.model.Ro(a)};function cS(a,y,x){a=a.H;var E=a.model;return E.Xj()&&E.Yu(y)?(y=a.groupTemplateMap.I(x),y===null&&(y=a.groupTemplateMap.I(""),y===null&&(gS||(gS=!0,ri('No Group template found for category "'+x+'"'),ri(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(fS||(fS=!0,ri('No Node template found for category "'+x+'"'),ri(" Using default node template")),y=a.ny))),y}Io.prototype.getLinkCategoryForData=function(){return""},Io.prototype.setLinkCategoryForData=function(){},Io.prototype.setFromNodeForLink=function(){},Io.prototype.setToNodeForLink=function(){},Io.prototype.findLinkTemplateForCategory=function(a){var y=this.H,x=y.linkTemplateMap.I(a);return x===null&&(x=y.linkTemplateMap.I(""),x===null&&(pS||(pS=!0,ri('No Link template found for category "'+a+'"'),ri(" Using default link template")),x=y.my)),x},Io.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},Io.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},Io.prototype.ip=function(a){a=this.Lc(a),a!==null&&(ld(this.diagram,a,!1),this.unresolveReferencesForPart(a))},Io.prototype.unresolveReferencesForPart=function(){},Io.prototype.removeDataForLink=function(){},Io.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},Io.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof oi?a:null)},Io.prototype.findLinkForKey=function(){return null},Le=Io.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 oi?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 Ln;for(var x=this.On.iterator;x.next();){var E=x.value,b=E.data;if(b!==null)for(var z=0;z<arguments.length;z++){var ne=arguments[z];if(Wt(ne)&&ay(this,b,ne)){y.add(E);break}}}return y.iterator},Le.ls=function(a){for(var y=0;y<arguments.length;++y);y=new Ln;for(var x=this.Dn.iterator;x.next();){var E=x.value,b=E.data;if(b!==null)for(var z=0;z<arguments.length;z++){var ne=arguments[z];if(Wt(ne)&&ay(this,b,ne)){y.add(E);break}}}return y.iterator};function ay(a,y,x){for(var E in x){var b=y[E],z=x[E];if(Jt(z)){if(!Jt(b)||b.length<z.length)return!1;for(var ne=0;ne<b.length;ne++){var re=z[ne];if(re!==void 0&&!dS(a,b[ne],re))return!1}}else if(!dS(a,b,z))return!1}return!0}function dS(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(Wt(y)&&Wt(x)){if(!ay(a,y,x))return!1}else if(y!==x)return!1;return!0}Io.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 E=a.modelChange;if(E!=="")if(x===Yr){if(E==="nodeCategory"){var b=this.Lc(a.object),z=a.newValue;b!==null&&typeof z=="string"&&(b.category=z)}else E==="nodeDataArray"&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));y.isModified=!0}else if(x===ko){var ne=a.newValue;E==="nodeDataArray"&&Wt(ne)&&hS(this,ne),y.isModified=!0}else if(x===Yo){var re=a.oldValue;E==="nodeDataArray"&&Wt(re)&&this.ip(re),y.isModified=!0}else x===Do&&(E==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):E==="ModelDisplaced"&&this.Wd());else if(x===Yr){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===ko||x===Yo){var ue=a.change===ko,pe=ue?a.newParam:a.oldParam,xe=ue?a.newValue:a.oldValue,Ee=this.aj.I(a.object);if(Array.isArray(Ee))for(a=0;a<Ee.length;a++){var Fe=Ee[a];if(ue)Fm(Fe,xe,pe,!0);else if(!(0>pe)){var Oe=pe+dp(Fe);Fe.pc(Oe,!0),xv(Fe,Oe,pe)}}y.isModified=!0}}finally{y.aa=!0}}}}},Io.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)},Io.prototype.rp=function(){for(var a=this.H.model,y=new Ln,x=a.nodeDataArray,E=0;E<x.length;E++)y.add(x[E]);var b=[];for(this.nodes.each(function(ne){ne.data===null||y.contains(ne.data)||b.push(ne.data)}),this.parts.each(function(ne){ne.data===null||y.contains(ne.data)||b.push(ne.data)}),b.forEach(function(ne){ES(a,ne,!1)}),E=0;E<x.length;E++){var z=x[E];this.Lc(z)===null&&CS(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()},Io.prototype.refreshDataBoundLinks=function(){},Io.prototype.updateRelationshipsFromData=function(){},Io.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 E=this.aj.iterator;E.next();){for(var b=E.value,z=0;z<b.length;z++){var ne=b[z].sx(a);ne!==null&&(x===null&&(x=qn()),x.push(ne))}if(x!==null)break}if(x!==null){for(E=0;E<x.length;E++)x[E].La(y);di(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function sy(a,y){var x=y.Hh;if(Jt(x)){var E=a.aj.I(x);if(E===null)E=[],E.push(y),a.aj.add(x,E);else{for(a=0;a<E.length;a++)if(E[a]===y)return;E.push(y)}}}function ly(a,y,x){qd(y,function(ne){ne=ne.O.s;for(var re=ne.length,oe=0;oe<re;oe++)Xg(x,ne[oe])});var E=y.Hh;if(Jt(E)){var b=a.aj.I(E);if(b!==null){for(var z=0;z<b.length;z++)if(b[z]===y){b.splice(z,1),b.length===0&&a.aj.remove(E);break}}}}Io.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var E=new xi;if(Jt(a))for(var b=0;b<a.length;b++)h0(this,a[b],y,E,x);else for(a=a.iterator;a.next();)h0(this,a.value,y,E,x);if(y!==null){x=y.model,a=y.toolManager.findTool("Dragging"),a=a!==null?a.dragOptions.dragsLink:y.Wm.dragsLink,b=new Ln;for(var z=new xi,ne=E.iterator;ne.next();){var re=ne.value;if(re instanceof Kn)a||re.fromNode!==null&&re.toNode!==null||b.add(re);else if(re instanceof oi&&re.data!==null&&x.Tl()){var oe=re;re=ne.key;var le=re.pg();le!==null&&(le=E.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<b.count&&y.Is(b,!1),0<z.count)for(x=z.iterator;x.next();)E.add(x.key,x.value)}if(y!==null&&this.H!==null&&(y=y.model,x=y.afterCopyFunction,x!==null)){var ue=new xi;E.each(function(pe){pe.key.data!==null&&ue.add(pe.key.data,pe.value.data)}),x(ue,y,this.H.model)}for(y=E.iterator;y.next();)y.value.La();return E};function h0(a,y,x,E,b){if(y===null||b&&!y.canCopy())return null;if(E.contains(y))return E.I(y);var z=a.copyPartData(y,x);if(!(z instanceof Oi))return null;if(z.isSelected=!1,z.isHighlighted=!1,E.add(y,z),y instanceof oi){for(var ne=y.linksConnected;ne.next();){var re=ne.value;if(re.fromNode===y){var oe=E.I(re);oe!==null&&(oe.fromNode=z)}re.toNode===y&&(re=E.I(re),re!==null&&(re.toNode=z))}if(y instanceof gr&&z instanceof gr)for(y=y.memberParts;y.next();)ne=h0(a,y.value,x,E,b),ne instanceof Kn||ne===null||(ne.containingGroup=z)}else if(y instanceof Kn&&z instanceof Kn)for(ne=y.fromNode,ne!==null&&(ne=E.I(ne),ne!==null&&(z.fromNode=ne)),ne=y.toNode,ne!==null&&(ne=E.I(ne),ne!==null&&(z.toNode=ne)),y=y.labelNodes;y.next();)ne=h0(a,y.value,x,E,b),ne!==null&&ne instanceof oi&&(ne.labeledLink=z);return z}Io.prototype.copyPartData=function(a,y){var x=null,E=a.data;if(E!==null&&y!==null){var b=y.model;a instanceof Kn||(E=b.copyNodeData(E),Wt(E)&&(b.xf(E),x=y.Lc(E)))}else $u(a),x=a.copy(),x!==null&&(b=this.H,y!==null?y.add(x):E!==null&&b!==null&&b.commandHandler!==null&&b.commandHandler.copiesClipboardData&&(y=b.model,b=null,x instanceof Kn||(b=y.copyNodeData(E)),Wt(b)&&(x.data=b)));return x},Ve.Object.defineProperties(Io.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}}}),Io.prototype.updateAllRelationshipsFromData=Io.prototype.rp,Io.prototype.findLinksByExample=Io.prototype.ls,Io.prototype.findNodesByExample=Io.prototype.ms,Io.prototype.findLinkForData=Io.prototype.Kc,Io.prototype.findNodeForData=Io.prototype.ii,Io.prototype.findPartForData=Io.prototype.Lc,Io.prototype.findNodeForKey=Io.prototype.Vb,Io.prototype.removeModeledPart=Io.prototype.ip,Io.prototype.removeModeledParts=Io.prototype.Gs,Io.prototype.rebuildParts=Io.prototype.Wd;var fS=!1,gS=!1,pS=!1;Io.className="PartManager";function Cs(a){Io.apply(this,arguments)}Ot(Cs,Io),Cs.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),mS(this,a.linkDataArray)},Cs.prototype.addModeledParts=function(a){for(Io.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)Sg(a.value);Qf(this.diagram,!1)};function mS(a,y){y.forEach(function(x){vS(a,x)}),Qf(a.diagram,!1)}function vS(a,y){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.bf.contains(y)){var x=a.getLinkCategoryForData(y),E=a.findLinkTemplateForCategory(x);if(E!==null){$u(E);var b=E.copy();if(b!==null){E=a.diagram.skipsModelSourceBindings,a.diagram.skipsModelSourceBindings=!0,b.Tf=x,b.ub=y,x=a.diagram.model;var z=g0(x,y,!0);z!==""&&(b.fromPortId=z),z=mu(x,y,!0),z!==void 0&&(z=a.Vb(z),z instanceof oi&&(b.fromNode=z)),z=g0(x,y,!1),z!==""&&(b.toPortId=z),z=mu(x,y,!1),z!==void 0&&(z=a.Vb(z),z instanceof oi&&(b.toNode=z)),x=x.Ef(y),Array.isArray(x)&&x.forEach(function(ne){ne=a.Vb(ne),ne!==null&&(ne.labeledLink=b)}),a.tp&&(b.Jg="Tool"),a.diagram.add(b),b.ub=null,b.data=y,a.diagram.skipsModelSourceBindings=E}}}}Cs.prototype.removeAllModeledParts=function(){var a=this.diagram.model;yS(this,a.linkDataArray),this.Gs(a.nodeDataArray)};function yS(a,y){y.forEach(function(x){a.ip(x)})}Cs.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},Cs.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},Cs.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},Cs.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},Cs.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},Cs.prototype.findPartForKey=function(a){var y=Io.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},Cs.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},Cs.prototype.doModelChanged=function(a){var y=this;if(Io.prototype.doModelChanged.call(this,a),this.diagram){var x=this.diagram;if(a.model===x.model){var E=a.change;if(x.aa){x.aa=!1;try{var b=a.modelChange;if(b!==""){if(E===Yr){if(b==="linkFromKey"){var z=this.Kc(a.object);if(z!==null){var ne=this.Vb(a.newValue);z.fromNode=ne}}else if(b==="linkToKey"){var re=this.Kc(a.object);if(re!==null){var oe=this.Vb(a.newValue);re.toNode=oe}}else if(b==="linkFromPortId"){var le=this.Kc(a.object);if(le!==null){var ue=a.newValue;typeof ue=="string"&&(le.fromPortId=ue)}}else if(b==="linkToPortId"){var pe=this.Kc(a.object);if(pe!==null){var xe=a.newValue;typeof xe=="string"&&(pe.toPortId=xe)}}else if(b==="nodeGroupKey"){var Ee=this.Lc(a.object);if(Ee!==null){var Fe=a.newValue;if(Fe!==void 0){var Oe=this.Vb(Fe);Oe instanceof gr?Ee.containingGroup=Oe:Ee.containingGroup=null}else Ee.containingGroup=null}}else if(b==="linkLabelKeys"){var at=this.Kc(a.object);if(at!==null){var Xe=a.oldValue,pt=a.newValue;Array.isArray(Xe)&&Xe.forEach(function(Tn){0<=pt.indexOf(Tn)||(Tn=y.Vb(Tn),Tn!==null&&(Tn.labeledLink=null))}),Array.isArray(pt)&&pt.forEach(function(Tn){Tn=y.Vb(Tn),Tn!==null&&(Tn.labeledLink=at)})}}else if(b==="linkCategory"){var wt=this.Kc(a.object),Mt=a.newValue;wt!==null&&typeof Mt=="string"&&(wt.category=Mt)}else b==="linkDataArray"&&(yS(this,a.oldValue),mS(this,a.newValue));x.isModified=!0}else if(E===ko){var It=a.newValue;if(b==="linkDataArray"&&typeof It=="object"&&It!==null)vS(this,It);else if(b==="linkLabelKeys"&&Sd(It)){var qt=this.Kc(a.object),ei=this.Vb(It);qt!==null&&ei!==null&&(ei.labeledLink=qt)}x.isModified=!0}else if(E===Yo){var Si=a.oldValue;if(b==="linkDataArray"&&typeof Si=="object"&&Si!==null)this.ip(Si);else if(b==="linkLabelKeys"&&Sd(Si)){var fi=this.Vb(Si);fi!==null&&(fi.labeledLink=null)}x.isModified=!0}}else if(E===Yr){var Gn=a.propertyName;a.object!==x.model||Gn!=="linkFromKeyProperty"&&Gn!=="linkToKeyProperty"&&Gn!=="linkFromPortIdProperty"&&Gn!=="linkToPortIdProperty"&&Gn!=="linkLabelKeysProperty"&&Gn!=="nodeIsGroupProperty"&&Gn!=="nodeGroupKeyProperty"&&Gn!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},Cs.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new Ln,E=y.linkDataArray;E.forEach(function(z){x.add(z)});var b=[];this.links.each(function(z){z.data===null||x.contains(z.data)||b.push(z.data)}),b.forEach(function(z){NS(y,z,!1)}),E.forEach(function(z){a.Kc(z)===null&&BS(y,z,!1)})},Cs.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var E=x.model;if(a instanceof Kn){var b=mu(E,y,!0);if(b=x.Vb(b),a.fromNode=b,b=mu(E,y,!1),b=x.Vb(b),a.toNode=b,y=E.Ef(y),0<y.length||0<a.labelNodes.count){if(y.length===1&&a.labelNodes.count===1){b=y[0];var z=a.labelNodes.first();if(E.wa(z.data)===b)return}b=new Ln().addAll(y);var ne=new Ln;a.labelNodes.each(function(re){re.data!==null&&(re=E.wa(re.data),re!==void 0&&ne.add(re))}),y=ne.copy(),y.hp(b),b=b.copy(),b.hp(ne),(0<y.count||0<b.count)&&(y.each(function(re){re=x.Vb(re),re!==null&&re.labeledLink===a&&(re.labeledLink=null)}),b.each(function(re){re=x.Vb(re),re!==null&&re.labeledLink!==a&&(re.labeledLink=a)}))}}else!(a instanceof lo)&&(y=E.lh(y),y=x.findPartForKey(y),y===null||y instanceof gr)&&(a.containingGroup=y)}}},Cs.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=Ap(y,x),b=this.Lc(a);if(E!==null&&b!==null){E=E.iterator;for(var z={};E.next();){var ne=E.value;y.lb(ne)?b instanceof gr&&y.lh(ne)===x&&(ne=this.Lc(ne),ne!==null&&(ne.containingGroup=b)):(z.link=this.Kc(ne),z.link!==null&&b instanceof oi&&(mu(y,ne,!0)===x&&(z.link.fromNode=b),mu(y,ne,!1)===x&&(z.link.toNode=b),ne=y.Ef(ne),Array.isArray(ne)&&ne.some(function(re){return function(oe){return oe===x?(b.labeledLink=re.link,!0):!1}}(z)))),z={link:z.link}}Sh(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof gr&&(b.containingGroup=a))}},Cs.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof oi){var x=y.wa(a.data);if(x!==void 0){for(var E=a.linksConnected;E.next();)yh(y,x,E.value.data);if(a.isLinkLabel&&(E=a.labeledLink,E!==null&&yh(y,x,E.data)),a instanceof gr)for(a=a.memberParts;a.next();)E=a.value.data,y.lb(E)&&yh(y,x,E)}}},Cs.prototype.copyPartData=function(a,y){var x=Io.prototype.copyPartData.call(this,a,y);if(a instanceof Kn)if(a=a.data,a!==null&&y!==null){var E=y.model;a=E.Jo(a),typeof a=="object"&&a!==null&&(E.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},Cs.prototype.insertLink=function(a,y,x,E){var b=this.diagram,z=b.model,ne=b.toolManager.findTool("Linking"),re="";if(a!==null&&(y===null&&(y=a),re=y.portId,re===null&&(re="")),y="",x!==null&&(E===null&&(E=x),y=E.portId,y===null&&(y="")),E=ne.archetypeLinkData,E instanceof Kn){if($u(E),z=E.copy(),z!==null)return z.fromNode=a,z.fromPortId=re,z.toNode=x,z.toPortId=y,b.add(z),a=ne.archetypeLabelNodeData,a instanceof oi&&($u(a),a=a.copy(),a!==null&&(a.labeledLink=z,b.add(a))),z}else if(E!==null&&(E=z.Jo(E),typeof E=="object"&&E!==null))return a!==null&&bg(z,E,z.wa(a.data),!0),Mg(z,E,re,!0),x!==null&&bg(z,E,z.wa(x.data),!1),Mg(z,E,y,!1),z.fi(E),a=ne.archetypeLabelNodeData,a===null||a instanceof oi||(a=z.copyNodeData(a),typeof a=="object"&&a!==null&&(z.xf(a),a=z.wa(a),a!==void 0&&z.Bu(E,a))),b.Kc(E);return null},Cs.prototype.findLinkForKey=Cs.prototype.findLinkForKey,Cs.prototype.findPartForKey=Cs.prototype.findPartForKey,Cs.prototype.removeAllModeledParts=Cs.prototype.removeAllModeledParts,Cs.prototype.addModeledParts=Cs.prototype.addModeledParts,Cs.prototype.addAllModeledParts=Cs.prototype.addAllModeledParts,Cs.className="GraphLinksPartManager";function Au(){Io.apply(this,arguments),this.Sg=null}Ot(Au,Io);function c0(a,y,x){if(y!==null&&x!==null&&x.kh()===null){var E=a.diagram.toolManager.findTool("Linking"),b=y,z=x;if(a.diagram.isTreePathToChildren||(b=x,z=y),(E===null||!Sn(E,b,z,null,!0))&&(y=a.getLinkCategoryForData(x.data),E=a.findLinkTemplateForCategory(y),E!==null&&($u(E),E=E.copy(),E!==null))){var ne=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,E.Tf=y,E.ub=x.data,E.fromNode=b,E.toNode=z,a.diagram.add(E),E.ub=null,E.data=x.data,a.diagram.skipsModelSourceBindings=ne}}}Au.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},Au.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},Au.prototype.setFromNodeForLink=function(a,y,x){var E=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren)E.qe(a.data,E.wa(y));else{var b=this.Sg;this.Sg=a,x!==null&&E.qe(x.data,void 0),E.qe(y,E.wa(a.toNode!==null?a.toNode.data:null)),this.Sg=b}},Au.prototype.setToNodeForLink=function(a,y,x){var E=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren){var b=this.Sg;this.Sg=a,x!==null&&E.qe(x.data,void 0),E.qe(y,E.wa(a.fromNode!==null?a.fromNode.data:null)),this.Sg=b}else E.qe(a.data,E.wa(y))},Au.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},Au.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},Au.prototype.doModelChanged=function(a){if(Io.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 E=a.modelChange;if(E!==""){if(x===Yr){if(E==="nodeParentKey"){var b=a.object,z=this.Vb(a.newValue),ne=this.ii(b);if(this.Sg!==null)z!==null&&(this.Sg.data=b,this.Sg.category=this.getLinkCategoryForData(b));else if(ne!==null){var re=ne.kh();re!==null?z===null?y.remove(re):y.isTreePathToChildren?re.fromNode=z:re.toNode=z:c0(this,z,ne)}}else if(E==="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===Yr){var pe=a.propertyName;a.object===y.model&&pe==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},Au.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var E=x.model;a instanceof oi&&(y=E.mh(y),y=x.Vb(y),E=a.pg(),y!==E&&(E=a.kh(),y!==null?E!==null?x.isTreePathToChildren?E.fromNode=y:E.toNode=y:c0(this,y,a):E!==null&&ld(x,E,!1)))}}},Au.prototype.updateDataBindings=function(a,y){Io.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},Au.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=Ap(y,x),b=this.Lc(a);if(E!==null&&b!==null){for(E=E.iterator;E.next();){var z=E.value;y.lb(z)&&b instanceof oi&&y.mh(z)===x&&c0(this,b,this.ii(z))}Sh(y,x)}a=y.mh(a),a!==void 0&&b instanceof oi&&(a=this.Vb(a),c0(this,a,b))}},Au.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof oi){var x=y.wa(a.data),E=this.Kc(a.data);if(E!==null){E.isSelected=!1,E.isHighlighted=!1;var b=E.layer;if(b!==null){var z=b.pc(-1,E,!1);0<=z&&this.diagram.cb(Yo,"parts",b,E,null,z,null),z=E.layerChanged,z!==null&&z(E,b,null)}}for(E=this.diagram.isTreePathToChildren,a=a.linksConnected;a.next();)b=a.value,b=(E?b.toNode:b.fromNode).data,y.lb(b)&&yh(y,x,b)}},Au.prototype.insertLink=function(a,y,x){y=this.diagram.model;var E=a,b=x;return this.diagram.isTreePathToChildren||(E=x,b=a),E!==null&&b!==null?(y.qe(b.data,y.wa(E.data)),b.kh()):null},Au.prototype.findLinkForKey=Au.prototype.findLinkForKey,Au.className="TreePartManager";function Li(a,y){this.kl=new Ln,this.il=new Ln,this.Wv=`,
|
|
|
"insertedNodeKeys": `,this.jy=`,
|
|
|
"modifiedNodeData": `,this.Yv=`,
|
|
|
"removedNodeKeys": `,this.vh=null,Zr(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new xi,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 xi,this.Lt=new Nn,this.Wg=!1,this.o=null,this.undoManager=new Oo,a!==void 0&&(Jt(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Li.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},Li.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Li.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},Li.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,E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+Ai(b)}}return y},Li.prototype.xA=function(a){a.change!==Do&&yt("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof br?(xS(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},Li.prototype.Qv=function(a,y){var x=this,E=!1,b=new Ln,z=new Ln,ne=new Ln,re=this.vh;a.changes.each(function(pe){pe.model===x&&(pe.modelChange==="nodeDataArray"?pe.change===ko?b.add(pe.newValue):pe.change===Yo&&ne.add(pe.oldValue):x.lb(pe.object)?z.add(pe.object):pe.change!==Yr||x.modelData!==pe.object&&pe.propertyName!=="modelData"?pe.object!==null&&(re&&re.contains(pe.object)?re.get(pe.object).each(function(xe){x.lb(xe)&&z.add(xe)}):pe.object instanceof Li||x.ri()&&x.Jc(pe.object)||PS(x,pe.object).each(function(xe){z.add(xe)})):E=!0)});var oe=this.il;oe.clear(),b.each(function(pe){oe.add(x.wa(pe)),y||z.add(pe)});var le=this.kl;le.clear(),ne.each(function(pe){le.add(x.wa(pe)),y&&z.add(pe)}),a=x.cloneDeep(z.Fa());var ue=null;return E&&(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},Li.prototype.cloneDeep=function(a){return Eg(this,a,!0)};function Eg(a,y,x,E,b,z){function ne(pe,xe){re?(pe.__gohashid===void 0&&z.push(pe),E.set(pe,xe)):(pe=Po++,E.set(pe,xe),b.set(pe,y))}if(!Wt(y))return y;z||(z=[]);var re=Object.isExtensible(y);if(E||(E=new xi),re){var oe=E.get(y);if(oe)return oe}else for(b||(b=new xi),oe=b.iterator;oe.next();){var le=oe.key;if(oe.value===y&&(le=E.get(le)))return le}if(Array.isArray(y)){oe=[],ne(y,oe);for(var ue=0;ue<y.length;ue++)oe.push(Eg(a,y[ue],!1,E,b,z))}else if(y instanceof tt||y instanceof Xn||y instanceof gn||y instanceof Di||y instanceof bi)oe=y.copy(),ne(y,oe);else{if(y instanceof Ao||y instanceof yn||y instanceof fn)return y;if(y instanceof Nn)oe=new Nn().addAll(Eg(a,y.Fa(),!1,E,b,z)),ne(y,oe);else if(y instanceof Ln)oe=new Ln().addAll(Eg(a,y.Fa(),!1,E,b,z)),ne(y,oe);else if(y instanceof xi)oe=new xi().addAll(Eg(a,y.Fa(),!1,E,b,z)),ne(y,oe);else if(y instanceof Date)oe=new Date(y.getTime()),ne(y,oe);else if(y instanceof RegExp)oe=new RegExp(y),ne(y,oe),oe.lastIndex=y.lastIndex;else if(typeof y.copy=="function")oe=y.copy(),ne(y,oe);else for(ue in oe={},ne(y,oe),y)ue!=="__gohashid"&&(oe[ue]=Eg(a,y[ue],!1,E,b,z))}return x&&z.forEach(function(pe){delete pe.__gohashid}),oe}Le=Li.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 SS(a,y){y=y.modelData,Wt(y)&&(a.dm(y),a.modelData=y)}Le.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!wS(x,a[x])){y=!0;break}return a="",y&&(a=`,
|
|
|
"modelData": `+uy(this,this.modelData)),a+`,
|
|
|
"nodeDataArray": `+yd(this,this.nodeDataArray,!0)},Le.kv=function(a){SS(this,a),a=a.nodeDataArray,Jt(a)&&(this.dm(a),this.nodeDataArray=a)};function xS(a,y){function x(b,z){if((z=z.part)&&(z=z.data,b!==z)){var ne=E.get(b);ne===null?(ne=new Ln,ne.add(z),E.add(b,ne)):ne.add(z)}}var E=a.vh;E===null&&(E=new xi,y.changes.each(function(b){if(b.diagram!==null){var z=b.change;z===Yr?(b=b.object.panel)&&(z=b.data)&&x(z,b):(z===ko||z===Yo)&&(b=b.object,(z=b.itemArray)&&x(z,b))}}),a.vh=E)}function PS(a,y){for(var x=new Ln,E=0;E<a.nodeDataArray.length;E++){var b=a.nodeDataArray[E];d0(a,y,b,b,x)}return x}function d0(a,y,x,E,b){if(Array.isArray(x))for(var z=0;z<x.length;z++){var ne=x[z];if(ne===y)return b.add(E),!0;if(d0(a,y,ne,E,b))return!0}else if(Wt(x)&&Object.getPrototypeOf(x)===Object.prototype)for(z in x){if(ne=x[z],ne===y)return b.add(E),!0;if(d0(a,y,ne,E,b))return!0}return!1}Le.Pv=function(a,y){var x=this,E=!1,b=new Ln,z=new Ln,ne=new Ln,re=this.vh;a.changes.each(function(ue){ue.model===x&&(ue.modelChange==="nodeDataArray"?ue.change===ko?b.add(ue.newValue):ue.change===Yo&&ne.add(ue.oldValue):x.lb(ue.object)?z.add(ue.object):ue.change!==Yr||x.modelData!==ue.object&&ue.propertyName!=="modelData"?ue.object!==null&&(re&&re.contains(ue.object)?re.get(ue.object).each(function(pe){x.lb(pe)&&z.add(pe)}):ue.object instanceof Li||x.ri()&&x.Jc(ue.object)||PS(x,ue.object).each(function(pe){z.add(pe)})):E=!0)});var oe=this.il;oe.clear(),b.each(function(ue){oe.add(x.wa(ue)),y||z.add(ue)});var le=this.kl;return le.clear(),ne.each(function(ue){le.add(x.wa(ue)),y&&z.add(ue)}),a="",E&&(a+=`,
|
|
|
"modelData": `+uy(this,this.modelData)),0<oe.count&&(a+=(y?this.Yv:this.Wv)+yd(this,oe.Fa(),!0)),0<z.count&&(a+=this.jy+yd(this,z.Fa(),!0)),0<le.count&&(a+=(y?this.Wv:this.Yv)+yd(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)&&yt("applyIncrementalJson cannot change Model properties"),SS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,E=new xi;if(Array.isArray(x))for(var b=0;b<x.length;b++){var z=x[b],ne=this.wa(z);ne!=null&&E.set(ne,z)}if(Array.isArray(y))for(b=y.length,z=0;z<b;z++){ne=y[z];var re=this.hc(ne);re===null&&(re=(re=E.get(ne))?re:this.copyNodeData({}),this.km(re,ne),this.xf(re))}if(Array.isArray(x)){for(y=x.length,E=0;E<y;E++)if(b=x[E],z=this.wa(b),z=this.hc(z),z!==null){for(var oe in b)oe==="__gohashid"||oe===this.nodeKeyProperty||this.Wj()&&oe===this.nodeIsGroupProperty||this.setDataProperty(z,oe,b[oe]);this.lm(b,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!==Do&&yt("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof br?(y===void 0&&(y=Tp(this,this)),xS(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=Tp(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=rt.JSON.parse(a)}catch(E){}else typeof a=="object"?y=a:yt("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&yt("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},Le.Ky=function(a){return this.Zw(a)},Li.constructGraphLinksModel=function(){return new Li},Le=Li.prototype,Le.dm=function(a){if(Jt(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];if(Wt(E)){var b=x;E=this.dm(E),Array.isArray(a)?a[b]=E:yt("Cannot replace an object in an HTMLCollection or NodeList at "+b)}}else if(Wt(a)){for(y in a)if(x=a[y],Wt(x)&&(x=this.dm(x),a[y]=x,y==="points"&&Array.isArray(x))){for(b=x.length%2===0,E=0;E<x.length;E++)if(typeof x[E]!="number"){b=!1;break}if(b){for(b=new Nn,E=0;E<x.length/2;E++)b.add(new tt(x[2*E],x[2*E+1]));b.freeze(),a[y]=b}}return kx(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()):Jt(a)?yd(this,a):Wt(a)?uy(this,a):typeof a=="function"?"null":a.toString()};function yd(a,y,x){x===void 0&&(x=!1);var E=y.length;if(0>=E)return"[]";var b=new Ei;b.add("["),x&&1<E&&b.add(`
|
|
|
`);for(var z=0;z<E;z++){var ne=y[z];ne!==void 0&&(0<z&&(b.add(","),x&&b.add(`
|
|
|
`)),b.add(a.sm(ne)))}return x&&1<E&&b.add(`
|
|
|
`),b.add("]"),b.toString()}function wS(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function ml(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function uy(a,y){var x=y;if(x instanceof tt)y={class:"go.Point",x:ml(x.x),y:ml(x.y)};else if(x instanceof Xn)y={class:"go.Size",width:ml(x.width),height:ml(x.height)};else if(x instanceof gn)y={class:"go.Rect",x:ml(x.x),y:ml(x.y),width:ml(x.width),height:ml(x.height)};else if(x instanceof Di)y={class:"go.Margin",top:ml(x.top),right:ml(x.right),bottom:ml(x.bottom),left:ml(x.left)};else if(x instanceof bi)x.sb()?y={class:"go.Spot",x:ml(x.x),y:ml(x.y),offsetX:ml(x.offsetX),offsetY:ml(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof Ao){if(y={class:"go.Brush",type:x.type.name},x.type===jc?y.color=x.color:(x.type===mc||x.type===Nu)&&(y.start=x.start,y.end=x.end,x.type===Nu&&(x.startRadius!==0&&(y.startRadius=ml(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=ml(x.endRadius)))),x.colorStops!==null){var E={};for(x=x.colorStops.iterator;x.next();)E[x.key]=x.value;y.colorStops=E}}else x instanceof yn?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=ml(x.startX)),x.startY!==0&&(y.startY=ml(x.startY)),x.endX!==0&&(y.endX=ml(x.endX)),x.endY!==0&&(y.endY=ml(x.endY)),x.spot1.D(cs)||(y.spot1=x.spot1),x.spot2.D(ys)||(y.spot2=x.spot2),x.type===yn.o&&(y.path=yn.ia(x))):x instanceof fn&&(y={class:"go.EnumValue",classType:Tp(a,x.classType),name:x.name});E="{",x=!0;for(var b in y){var z=Wa(y,b);if(!wS(b,z))if(x?x=!1:E+=",",E+=a.quote(b)+":",b==="points"&&z instanceof Nn){var ne="[";for(z=z.iterator;z.next();){var re=z.value;1<ne.length&&(ne+=","),ne+=a.sm(re.x),ne+=",",ne+=a.sm(re.y)}ne+="]",E+=ne}else E+=a.sm(z)}return E+"}"}function vl(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function kx(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(vl(a.x),vl(a.y));else if(y==="Size")x=new Xn(vl(a.width),vl(a.height));else if(y==="Rect")x=new gn(vl(a.x),vl(a.y),vl(a.width),vl(a.height));else if(y==="Margin")x=new Di(vl(a.top),vl(a.right),vl(a.bottom),vl(a.left));else if(y==="Spot")typeof a.enum=="string"?x=rd(a.enum):x=new bi(vl(a.x),vl(a.y),vl(a.offsetX),vl(a.offsetY));else if(y==="Brush"){if(x=new Ao,x.type=jn(Ao,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof bi&&(x.start=a.start),a.end instanceof bi&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=vl(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=vl(a.endRadius)),a=a.colorStops,Wt(a))for(var E in a)x.addColorStop(parseFloat(E),a[E])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=yn.parse(a.path):x=new yn,x.type=jn(yn,a.type),typeof a.startX=="number"&&(x.startX=vl(a.startX)),typeof a.startY=="number"&&(x.startY=vl(a.startY)),typeof a.endX=="number"&&(x.endX=vl(a.endX)),typeof a.endY=="number"&&(x.endY=vl(a.endY)),a.spot1 instanceof bi&&(x.spot1=a.spot1),a.spot2 instanceof bi&&(x.spot2=a.spot2)):y==="EnumValue"&&(E=a.classType,E.indexOf("go.")===0&&(E=E.substr(3)),E=cy(E),typeof E=="function"&&(x=jn(E,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,E=0;E<x;E++)y.M(E)(a)},Le.cb=function(a,y,x,E,b,z,ne){hs(this,"",a,y,x,E,b,z,ne)},Le.g=function(a,y,x,E,b){hs(this,"",Yr,a,this,y,x,E,b)},Le.Fs=function(a,y,x,E,b,z){hs(this,"",Yr,y,a,x,E,b,z)};function hs(a,y,x,E,b,z,ne,re,oe){re===void 0&&(re=null),oe===void 0&&(oe=null);var le=new Ii;le.model=a,le.change=x,le.modelChange=y,le.propertyName=E,le.object=b,le.oldValue=z,le.oldParam=re,le.newValue=ne,le.newParam=oe,a.ds(le)}Li.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===Yr){var x=a.object,E=a.propertyName,b=a.I(y);E===this.nodeKeyProperty&&this.lb(x)&&(y=a.I(!y),y!==void 0&&this.kb.remove(y),b!==void 0&&this.kb.add(b,x)),la(x,E,b)}else a.change===ko?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,Wt(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]===a&&ui(this.Tc,x),E!==void 0&&this.kb.remove(E)):(this.Tc[x]!==a&&ci(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)))):a.modelChange===""?((E=a.object)&&!Jt(E)&&a.propertyName&&(E=Wa(a.object,a.propertyName)),Jt(E)&&typeof x=="number"&&(a=a.newValue,y?ui(E,x):ci(E,x,a))):yt("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===Yo?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,Wt(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]!==a&&ci(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)):(this.Tc[x]===a&&ui(this.Tc,x),E!==void 0&&this.kb.remove(E)))):a.modelChange===""?((E=a.object)&&!Jt(E)&&a.propertyName&&(E=Wa(a.object,a.propertyName)),Jt(E)&&typeof x=="number"&&(a=a.oldValue,y?ci(E,x,a):ui(E,x))):yt("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==Do&&yt("unknown ChangedEvent: "+a.toString())},Li.prototype.Ea=function(a){return this.undoManager.Ea(a)},Li.prototype.eb=function(a){return this.undoManager.eb(a)},Li.prototype.Kf=function(){return this.undoManager.Kf()},Li.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var E=!1;try{a(this),E=!0}finally{E?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},Le=Li.prototype,Le.La=function(a,y){y===void 0&&(y=""),hs(this,"SourceChanged",Do,y,a,null,null)},Le.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=Wa(a,y),y!==void 0)){if(Sd(y))return y;yt("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 E=Wa(a,x);E!==y&&this.hc(y)===null&&(la(a,x,y),E!==void 0&&this.kb.remove(E),this.kb.add(y,a),hs(this,"nodeKey",Yr,x,a,E,y),typeof x=="string"&&this.La(a,x),this.jp(E,y))}else la(a,x,y)}};function Sd(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&&yt("Model.findNodeDataForKey:key must not be null"),a!==void 0&&Sd(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 E=this.bl;if(E!==null&&(x=E(this,a),x!=null&&!this.kb.contains(x))){la(a,y,x);return}if(typeof x=="string"){for(E=2;this.kb.contains(x+E);)E++;la(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;la(a,y,x)}}}}},Le.xf=function(a){a!==null&&(co(a),this.lb(a)||CS(this,a,!0))};function CS(a,y,x){var E=a.wa(y);(E===void 0||a.kb.I(E)!==y)&&(a.$u(y),E=a.wa(y),E===void 0&&yt("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(E,y),E=null,x&&(E=a.Tc.length,ci(a.Tc,E,y)),hs(a,"nodeDataArray",ko,"nodeDataArray",a,null,y,null,E),a.fm(y),a.em(y))}Le.Fy=function(a){if(Jt(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&&ES(this,a,!0)};function ES(a,y,x){var E=a.wa(y);if(E!==void 0&&a.kb.remove(E),E=null,x){e:if(x=a.Tc,Array.isArray(x))E=x.indexOf(y);else{E=x.length;for(var b=0;b<E;b++)if(x[b]===y){E=b;break e}E=-1}if(0>E)return;ui(a.Tc,E)}hs(a,"nodeDataArray",Yo,"nodeDataArray",a,y,null,E,null),a.qp(y)}Le.nA=function(a){if(Jt(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&&Jt(a)){var y=this.kl;y.clear(),y.addAll(this.kb.iteratorKeys);var x=this.il;x.clear();for(var E=a.length,b=0;b<E;b++){var z=a[b],ne=this.wa(z);if(ne!==void 0){x.add(ne);var re=this.hc(ne);re!==z&&(re!==null?(this.Do(re,z),this.lm(z,re)):(z=this.cloneDeep(z),this.km(z,ne),this.xf(z)))}else ne=this.cloneDeep(z),this.xf(ne),x.add(this.wa(ne))}for(a=y.iterator;a.next();)E=a.value,x.contains(E)||(E=this.hc(E))&&this.cm(E);y.clear(),x.clear()}},Le.jp=function(a,y){y!==void 0&&(a=Ap(this,a),a instanceof Ln&&this.Vf.add(y,a))},Le.Lv=function(){},Le.fm=function(){},Le.em=function(){},Le.qp=function(){};function yh(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E===null&&(E=new Ln,a.Vf.add(y,E)),E.add(x)}}function Sh(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E instanceof Ln&&(x==null?a.Vf.remove(y):(E.remove(x),E.count===0&&a.Vf.remove(y)))}}function Ap(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof Ln?a:null)}Le.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},Li.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):f0(this,a,!0),Wt(a)&&Zr(a),a};function f0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var E=[];for(x=0;x<y.length;x++){var b=f0(a,y[x],a.copiesArrayObjects);E.push(b)}return Zr(E),E}if(x&&Wt(y)){x=(x=y.constructor)?new x:{},b=a.copiesKey||typeof a.nodeKeyProperty!="string"?null:a.nodeKeyProperty;for(E in y)if(E==="__gohashid")x.__gohashid=void 0;else if(E===b)x[b]=void 0;else{var z=Wa(y,E),ne=Tp(a,z);ne==="GraphObject"||ne==="Diagram"||ne==="Layer"||ne==="RowColumnDefinition"||ne==="AnimationManager"||ne==="Tool"||ne==="CommandHandler"||ne==="Layout"||ne==="InputEvent"||ne==="DiagramEvent"||z instanceof Li||z instanceof Oo||z instanceof br||z instanceof Ii||(z=f0(a,z,!1)),la(x,E,z)}return Zr(x),x}return y instanceof tt||y instanceof Xn||y instanceof gn||y instanceof bi||y instanceof Di?y.copy():y}Li.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!bS&&a instanceof Rt&&(bS=!0,ri('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),ri(" Is that really your intent?"));var E=Wa(a,y);E!==x&&(la(a,y,x),this.Fs(a,y,E,x))},Le=Li.prototype,Le.set=function(a,y,x){this.setDataProperty(a,y,x)},Le.Do=function(a,y){if(y){var x=this.lb(a),E;for(E in y)E==="__gohashid"||x&&E===this.nodeKeyProperty||this.setDataProperty(a,E,y[E])}},Le.Ay=function(a,y){this.ts(a,-1,y)},Le.ts=function(a,y,x){0>y&&(y=a.length),ci(a,y,x),hs(this,"",ko,"",a,null,x,null,y)},Le.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&yt("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];ui(a,y),hs(this,"",Yo,"",a,x,null,y,null)},Le.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=Wa(a,y),y===void 0))return"";if(typeof y=="string")return y;yt("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 E=Wa(a,x);E===void 0&&(E=""),E!==y&&(la(a,x,y),hs(this,"nodeCategory",Yr,x,a,E,y))}else la(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 hy(){return new Li}function Tp(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 Tp(a,y.constructor);return typeof y}function cy(a){return ah[a]?ah[a]:rt.go!==void 0&&rt.go[a]?rt.go[a]:null}function Wa(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(E){}return x}function la(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(E){}}Ve.Object.defineProperties(Li.prototype,{name:{get:function(){return this.xa},set:function(a){var y=this.xa;y!==a&&(this.xa=a,this.g("name",y,a))}},dataFormat:{get:function(){return this.Sm},set:function(a){var y=this.Sm;y!==a&&(this.Sm=a,this.g("dataFormat",y,a))}},isReadOnly:{get:function(){return this.Gg},set:function(a){var y=this.Gg;y!==a&&(this.Gg=a,this.g("isReadOnly",y,a))}},modelData:{get:function(){return this.j},set:function(a){var y=this.j;y!==a&&(this.j=a,this.g("modelData",y,a),this.La(a))}},undoManager:{get:function(){return this.o},set:function(a){var y=this.o;y!==a&&(y!==null&&y.Rx(this),this.o=a,a!==null&&a.Xw(this))}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a}},nodeKeyProperty:{get:function(){return this.Th},set:function(a){var y=this.Th;y!==a&&(a===""&&yt("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&yt("Cannot set Model.nodeKeyProperty when there is existing node data"),this.Th=a,this.g("nodeKeyProperty",y,a))}},makeUniqueKeyFunction:{get:function(){return this.bl},set:function(a){var y=this.bl;y!==a&&(this.bl=a,this.g("makeUniqueKeyFunction",y,a))}},nodeDataArray:{get:function(){return this.Tc},set:function(a){var y=this.Tc;if(y!==a){this.kb.clear(),this.Lv();for(var x=a.length,E=0;E<x;E++){var b=a[E];Wt(b)||yt("Model.nodeDataArray must only contain Objects, not: "+b),co(b)}for(this.Tc=a,E=new Nn,b=0;b<x;b++){var z=a[b],ne=this.wa(z);ne===void 0||this.kb.I(ne)!==null?E.add(z):this.kb.add(ne,z)}for(E=E.iterator;E.next();)b=E.value,this.$u(b),z=this.wa(b),z!==void 0&&this.kb.add(z,b);for(hs(this,"nodeDataArray",Yr,"nodeDataArray",this,y,a),y=0;y<x;y++)E=a[y],this.fm(E),this.em(E);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"}}}),Li.prototype.setCategoryForNodeData=Li.prototype.jm,Li.prototype.getCategoryForNodeData=Li.prototype.Ro,Li.prototype.removeArrayItem=Li.prototype.ov,Li.prototype.insertArrayItem=Li.prototype.ts,Li.prototype.addArrayItem=Li.prototype.Ay,Li.prototype.assignAllDataProperties=Li.prototype.Do,Li.prototype.set=Li.prototype.set,Li.prototype.clearUnresolvedReferences=Li.prototype.Qy,Li.prototype.mergeNodeDataArray=Li.prototype.$z,Li.prototype.removeNodeDataCollection=Li.prototype.nA,Li.prototype.removeNodeData=Li.prototype.cm,Li.prototype.addNodeDataCollection=Li.prototype.Fy,Li.prototype.addNodeData=Li.prototype.xf,Li.prototype.makeNodeDataKeyUnique=Li.prototype.$u,Li.prototype.findNodeDataForKey=Li.prototype.hc,Li.prototype.containsNodeData=Li.prototype.lb,Li.prototype.setKeyForNodeData=Li.prototype.km,Li.prototype.getKeyForNodeData=Li.prototype.wa,Li.prototype.updateTargetBindings=Li.prototype.La,Li.prototype.commit=Li.prototype.commit,Li.prototype.rollbackTransaction=Li.prototype.Kf,Li.prototype.commitTransaction=Li.prototype.eb,Li.prototype.startTransaction=Li.prototype.Ea,Li.prototype.raiseDataChanged=Li.prototype.Fs,Li.prototype.raiseChanged=Li.prototype.g,Li.prototype.raiseChangedEvent=Li.prototype.cb,Li.prototype.removeChangedListener=Li.prototype.ik,Li.prototype.addChangedListener=Li.prototype.Pe,Li.prototype.writeJsonValue=Li.prototype.sm,Li.prototype.replaceJsonObjects=Li.prototype.dm,Li.prototype.applyIncrementalJSON=Li.prototype.Ky,Li.prototype.applyIncrementalJson=Li.prototype.Zw,Li.prototype.toJSON=Li.prototype.toJSON,Li.prototype.toJson=Li.prototype.np,Li.prototype.toIncrementalJSON=Li.prototype.yA,Li.prototype.toIncrementalJson=Li.prototype.$x,Li.prototype.toIncrementalData=Li.prototype.xA,Li.prototype.clear=Li.prototype.clear;var bS=!1,ah={};Li.className="Model",Li.fromJSON=Li.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=rt.JSON.parse(a)}catch(z){}else typeof a=="object"?x=a:yt("Unable to construct a Model from: "+a);if(y===null){a=null;var E=x.class;if(typeof E=="string")try{var b=null;E.indexOf("go.")===0?(E=E.substr(3),b=cy(E)):(b=cy(E),b===null&&(b=rt[E])),typeof b=="function"&&(a=new b)}catch(z){}a===null||a instanceof Li?y=a:yt("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=Li.constructGraphLinksModel()),y.gp(x),y.kv(x),y},Li.safePropertyValue=Wa,Li.safePropertySet=la,ah.Brush=Ao,ah.ChangedEvent=Ii,ah.Geometry=yn,ah.Margin=Di,ah.Panel=Hn,ah.Point=tt,ah.Rect=gn,ah.Size=Xn,ah.Spot=bi,ah.Transaction=br,ah.UndoManager=Oo;function Xa(a,y,x,E){Zr(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,E===void 0?(this.el=LS,this.wk=null):(this.el=Dp,this.wk=E),this.st=new Ln}Xa.prototype.copy=function(){var a=new Xa;return a.xl=this.xl,a.to=this.to,a.wl=this.wl,a.Cr=this.Cr,a.wn=this.wn,a.sl=this.sl,a.Im=this.Im,a.el=this.el,a.wk=this.wk,a},Le=Xa.prototype,Le.qb=function(a){a.classType===Xa&&(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=Dp,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 MS(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 E=this.sl;if(x===void 0||E===""||E===x){x=this.xl;var b=this.Im;if(b===null&&x==="")ri("Binding error: target property is the empty string: "+this.toString());else{var z=y;if(E!==""&&(z=Wa(y,E)),z!==void 0)if(b===null)x!==""&&la(a,x,z);else try{if(x!==""){var ne=b(z,a);la(a,x,ne)}else b(z,a)}catch(re){}}}},Le.sp=function(a,y,x,E){if(this.el===Dp){var b=this.xl;if(x===void 0||b===x){x=this.sl;var z=this.wk,ne=a;if(b!==""&&(ne=Wa(a,b)),ne!==void 0&&!this.st.contains(a))try{this.st.add(a);var re=E!==null?E.diagram:null,oe=re!==null?re.model:null;if(z===null){if(x!=="")oe!==null?oe.setDataProperty(y,x,ne):la(y,x,ne);else if(oe!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var le=E.itemIndex,ue=E.panel.itemArray;oe.ov(ue,le),oe.ts(ue,le,ne)}}else try{if(x!==""){var pe=z(ne,y,oe);oe!==null?oe.setDataProperty(y,x,pe):la(y,x,pe)}else{var xe=z(ne,y,oe);if(xe!==void 0&&oe!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var Ee=E.itemIndex,Fe=E.panel.itemArray;oe.ov(Fe,Ee),oe.ts(Fe,Ee,xe)}}}catch(Oe){}}finally{this.st.remove(a)}}}},Ve.Object.defineProperties(Xa.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&cn(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&cn(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&cn(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&cn(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&cn(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&cn(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&cn(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&cn(this),this.el=a}}}),Xa.prototype.updateSource=Xa.prototype.sp,Xa.prototype.updateTarget=Xa.prototype.Mv,Xa.prototype.ofModel=Xa.prototype.dA,Xa.prototype.ofObject=Xa.prototype.cp,Xa.prototype.makeTwoWay=Xa.prototype.Kx;var Ax="Binding",LS=new fn(Xa,"OneWay",1),Dp=new fn(Xa,"TwoWay",2);Xa.className="Binding",Xa.parseEnum=function(a,y){return function(x){return x=jn(a,x),x===null?y:x}},Xa.toString=Ai,Xa.OneWay=LS,Xa.TwoWay=Dp;function to(a,y,x){Li.call(this),this.Vv=`,
|
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
|
"removedLinkKeys": `,this.md=[],this.$f=new Ln,this.wb=new xi,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&&(Jt(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Ot(to,Li),to.constructGraphLinksModel=Li.constructGraphLinksModel,to.prototype.cloneProtected=function(a){Li.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=to.prototype,Le.clear=function(){Li.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,E;for(E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+Ai(b)}for(y+=`
|
|
|
link data:`,a=this.linkDataArray,x=a.length,E=0;E<x;E++)b=a[E],y+=" "+mu(this,b,!0)+"-->"+mu(this,b,!1)}return y},Le.Qv=function(a,y){this.linkKeyProperty===""&&yt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=Li.prototype.Qv.call(this,a,y),E=this,b=new Ln,z=new Ln,ne=new Ln,re=this.vh;a.changes.each(function(ue){ue.model===E&&(ue.modelChange==="linkDataArray"?ue.change===ko?b.add(ue.newValue):ue.change===Yo&&ne.add(ue.oldValue):E.Jc(ue.object)?z.add(ue.object):ue.object!==null&&(ue.object!==null&&re&&re.contains(ue.object)?re.get(ue.object).each(function(pe){E.Jc(pe)&&z.add(pe)}):ue.object instanceof Li||E.lb(ue.object)||FS(E,ue.object).each(function(pe){z.add(pe)})))});var oe=this.il;oe.clear(),b.each(function(ue){oe.add(E.Ac(ue)),y||z.add(ue)});var le=this.kl;return le.clear(),ne.each(function(ue){le.add(E.Ac(ue)),y&&z.add(ue)}),a=E.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=Li.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){Li.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=Li.prototype.Rv.call(this),y=`,
|
|
|
"linkDataArray": `+yd(this,this.linkDataArray,!0);return a+y},Le.kv=function(a){Li.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function FS(a,y){for(var x=new Ln,E=0;E<a.linkDataArray.length;E++){var b=a.linkDataArray[E];d0(a,y,b,b,x)}return x}Le.Pv=function(a,y){this.linkKeyProperty===""&&yt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=Li.prototype.Pv.call(this,a,y),E=this,b=new Ln,z=new Ln,ne=new Ln,re=this.vh;a.changes.each(function(ue){ue.model===E&&(ue.modelChange==="linkDataArray"?ue.change===ko?b.add(ue.newValue):ue.change===Yo&&ne.add(ue.oldValue):E.Jc(ue.object)?z.add(ue.object):ue.object!==null&&(ue.object!==null&&re&&re.contains(ue.object)?re.get(ue.object).each(function(pe){E.Jc(pe)&&z.add(pe)}):ue.object instanceof Li||E.lb(ue.object)||FS(E,ue.object).each(function(pe){z.add(pe)})))});var oe=this.il;oe.clear(),b.each(function(ue){oe.add(E.Ac(ue)),y||z.add(ue)});var le=this.kl;return le.clear(),ne.each(function(ue){le.add(E.Ac(ue)),y&&z.add(ue)}),a=x,0<oe.count&&(a+=(y?this.Xv:this.Vv)+yd(this,oe.Fa(),!0)),0<z.count&&(a+=this.iy+yd(this,z.Fa(),!0)),0<le.count&&(a+=(y?this.Vv:this.Xv)+yd(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)&&yt("applyIncrementalJson cannot change Model properties"),Li.prototype.fp.call(this,a);var y=a.insertedLinkKeys;if(Array.isArray(y))for(var x=y.length,E=0;E<x;E++){var b=y[E],z=this.jh(b);z===null&&(z=this.Jo({}),this.Ks(z,b),this.fi(z))}if(y=a.modifiedLinkData,Array.isArray(y)){for(x=y.length,E=0;E<x;E++)if(b=y[E],z=this.Ac(b),z=this.jh(z),z!==null){for(var ne in b)ne!=="__gohashid"&&ne!==this.linkKeyProperty&&this.setDataProperty(z,ne,b[ne]);kS(this,b,z)}}if(a=a.removedLinkKeys,Array.isArray(a))for(ne=a.length,y=0;y<ne;y++)x=this.jh(a[y]),x!==null&&this.bm(x)},to.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===Yr){var x=a.object,E=a.propertyName;if(E===this.linkKeyProperty&&this.Jc(x)){var b=a.I(y);y=a.I(!y),y!==void 0&&this.wb.remove(y),b!==void 0&&this.wb.add(b,x),la(x,E,b);return}}else if(a.change===ko){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,Wt(a)&&typeof x=="number"&&(E=this.Ac(a),y?(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),E!==void 0&&this.wb.remove(E)):(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),E!==void 0&&this.wb.add(E,a)));return}if(a.modelChange==="linkLabelKeys"){E=this.Ef(a.object),Array.isArray(E)&&typeof x=="number"&&(y?(x=E.indexOf(a.newValue),0<=x&&E.splice(x,1)):0>E.indexOf(a.newValue)&&E.splice(x,0,a.newValue));return}}else if(a.change===Yo){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,Wt(a)&&typeof x=="number"&&(E=this.Ac(a),y?(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),E!==void 0&&this.wb.add(E,a)):(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),E!==void 0&&this.wb.remove(E)));return}if(a.modelChange==="linkLabelKeys"){E=this.Ef(a.object),Array.isArray(E)&&typeof x=="number"&&(y?0>E.indexOf(a.newValue)&&E.splice(x,0,a.newValue):(x=E.indexOf(a.newValue),0<=x&&E.splice(x,1)));return}}Li.prototype.changeState.call(this,a,y)}},Le=to.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),la(x,this.nodeKeyProperty,a),this.xf(x))}return a}},Le.yx=function(a){return mu(this,a,!0)},Le.wv=function(a,y){bg(this,a,y,!0)},Le.Bx=function(a){return mu(this,a,!1)},Le.Bv=function(a,y){bg(this,a,y,!1)};function mu(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=Wa(y,a),a!==void 0))){if(Sd(a))return a;yt((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function bg(a,y,x,E){if(x===null&&(x=void 0),y!==null){var b=E?a.lf:a.mf;if(b!=="")if(x=a.Vl(x),a.Jc(y)){var z=Wa(y,b);z!==x&&(Sh(a,z,y),la(y,b,x),a.hc(x)===null&&yh(a,x,y),hs(a,E?"linkFromKey":"linkToKey",Yr,b,y,z,x),typeof b=="string"&&a.La(y,b))}else la(y,b,x)}}Le.zx=function(a){return g0(this,a,!0)},Le.xv=function(a,y){Mg(this,a,y,!0)},Le.Cx=function(a){return g0(this,a,!1)},Le.Cv=function(a,y){Mg(this,a,y,!1)};function g0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=Wa(y,a),y===void 0?"":y)}function Mg(a,y,x,E){if(y!==null){var b=E?a.ej:a.fj;if(b!=="")if(a.Jc(y)){var z=Wa(y,b);z===void 0&&(z=""),z!==x&&(la(y,b,x),hs(a,E?"linkFromPortId":"linkToPortId",Yr,b,y,z,x),typeof b=="string"&&a.La(y,b))}else la(y,b,x)}}Le.Ef=function(a){if(a===null)return p0;var y=this.je;return y===""?p0:(a=Wa(a,y),a===void 0?p0:a)},Le.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var E=Wa(a,x);if(E===void 0&&(E=p0),E!==y){if(Array.isArray(E))for(var b=E.length,z=0;z<b;z++)Sh(this,E[z],a);for(la(a,x,y),b=y.length,z=0;z<b;z++){var ne=y[z];this.hc(ne)===null&&yh(this,ne,a)}hs(this,"linkLabelKeys",Yr,x,a,E,y),typeof x=="string"&&this.La(a,x)}}else la(a,x,y)}},Le.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=Wa(a,x);if(E===void 0)x=[],x.push(y),this.Ls(a,x);else if(Array.isArray(E)){var b=E.indexOf(y);0<=b||(b=E.length,E.push(y),this.Jc(a)&&(this.hc(y)===null&&yh(this,y,a),hs(this,"linkLabelKeys",ko,x,a,null,y,null,b)))}else yt(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 E=Wa(a,x);if(Array.isArray(E)){var b=E.indexOf(y);0>b||(E.splice(b,1),this.Jc(a)&&(Sh(this,y,a),hs(this,"linkLabelKeys",Yo,x,a,y,null,b,null)))}else E!==void 0&&yt(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},Le.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=Wa(a,y),y!==void 0)){if(Sd(y))return y;yt("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 E=Wa(a,x);E!==y&&this.jh(y)===null&&(la(a,x,y),E!==void 0&&this.wb.remove(E),this.wb.add(y,a),hs(this,"linkKey",Yr,x,a,E,y),typeof x=="string"&&this.La(a,x))}else la(a,x,y)}},Le.jh=function(a){return a===null&&yt("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&Sd(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 E=this.cl;if(E!==null&&(x=E(this,a),x!=null&&!this.wb.contains(x))){la(a,y,x);return}if(typeof x=="string"){for(E=2;this.wb.contains(x+E);)E++;la(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;la(a,y,x)}}}}},Le.Jc=function(a){return a===null?!1:this.$f.contains(a)},Le.fi=function(a){a!==null&&(co(a),this.Jc(a)||BS(this,a,!0))};function BS(a,y,x){if(a.linkKeyProperty!==""){var E=a.Ac(y);if(E!==void 0&&a.wb.I(E)===y)return;a.Bs(y),E=a.Ac(y),E===void 0&&yt("GraphLinksModel.makeLinkDataKeyUnique failed on "+y+". Data not added to model."),a.wb.add(E,y)}a.$f.add(y),E=null,x&&(E=a.md.length,a.md.splice(E,0,y)),hs(a,"linkDataArray",ko,"linkDataArray",a,null,y,null,E),dy(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&&NS(this,a,!0)};function NS(a,y,x){a.$f.remove(y);var E=a.Ac(y);if(E!==void 0&&a.wb.remove(E),E=null,x){if(E=a.md.indexOf(y),0>E)return;a.md.splice(E,1)}if(hs(a,"linkDataArray",Yo,"linkDataArray",a,y,null,E,null),x=mu(a,y,!0),Sh(a,x,y),x=mu(a,y,!1),Sh(a,x,y),E=a.Ef(y),Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],Sh(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===""&&yt("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&Jt(a)){var y=this.kl;y.clear(),y.addAll(this.wb.iteratorKeys);var x=this.il;x.clear();for(var E=a.length,b=0;b<E;b++){var z=a[b],ne=this.Ac(z);if(ne!==void 0){x.add(ne);var re=this.jh(ne);re!==z&&(re!==null?(this.Do(re,z),kS(this,z,re)):(z=this.cloneDeep(z),this.Ks(z,ne),this.fi(z)))}else ne=this.cloneDeep(z),this.fi(ne),x.add(this.Ac(ne))}for(a=y.iterator;a.next();)E=a.value,x.contains(E)||(E=this.jh(E))&&this.bm(E);y.clear(),x.clear()}};function dy(a,y){var x=mu(a,y,!0);x=a.Vl(x),a.hc(x)===null&&yh(a,x,y),x=mu(a,y,!1),x=a.Vl(x),a.hc(x)===null&&yh(a,x,y);var E=a.Ef(y);if(Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],a.hc(x)===null&&yh(a,x,y)}Le.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):f0(this,a,!0),Wt(a)&&(Zr(a),this.lf!==""&&la(a,this.lf,void 0),this.mf!==""&&la(a,this.mf,void 0),this.je!==""&&la(a,this.je,[])),a},Le.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!Wa(a,y)},Le.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=Wa(a,y),y!==void 0)){if(Sd(y))return y;yt("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 E=Wa(a,x);E!==y&&(Sh(this,E,a),la(a,x,y),this.hc(y)===null&&yh(this,y,a),hs(this,"nodeGroupKey",Yr,x,a,E,y),typeof x=="string"&&this.La(a,x))}else la(a,x,y)}},to.prototype.copyNodeData=function(a){return a===null?null:(a=Li.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||Wa(a,this.Je)===void 0||la(a,this.Je,void 0),a)},to.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){bg(this,a,x,!0);return}if(y===this.linkToKeyProperty){bg(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Mg(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Mg(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 E=Wa(a,y);E!==x&&(la(a,y,x),this.Fs(a,y,E,x))},Le=to.prototype,Le.Do=function(a,y){if(y){var x=this.lb(a),E=this.Jc(a),b;for(b in y)b==="__gohashid"||x&&b===this.nodeKeyProperty||x&&b===this.nodeIsGroupProperty&&Wa(a,b)===y[b]||E&&b===this.linkKeyProperty||this.setDataProperty(a,b,y[b])}},Le.jp=function(a,y){Li.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 E=x.value,b=a,z=y;if(mu(this,E,!0)===b){var ne=this.lf;la(E,ne,z),hs(this,"linkFromKey",Yr,ne,E,b,z),typeof ne=="string"&&this.La(E,ne)}if(mu(this,E,!1)===b&&(ne=this.mf,la(E,ne,z),hs(this,"linkToKey",Yr,ne,E,b,z),typeof ne=="string"&&this.La(E,ne)),ne=this.Ef(E),Array.isArray(ne))for(var re=ne.length,oe=this.je,le=0;le<re;le++)ne[le]===b&&(ne[le]=z,hs(this,"linkLabelKeys",ko,oe,E,b,z,le,le))}},Le.qv=function(a,y,x){if(this.lh(a)===y){var E=this.Je;la(a,E,x),hs(this,"nodeGroupKey",Yr,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Le.Lv=function(){Li.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)dy(this,a[x])},Le.fm=function(a){Li.prototype.fm.call(this,a),a=this.wa(a);var y=Ap(this,a);if(y!==null){var x=qn();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)){if(this.lh(E)===a){var b=this.Je;hs(this,"nodeGroupKey",Yr,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}else if(mu(this,E,!0)===a&&(b=this.lf,hs(this,"linkFromKey",Yr,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),mu(this,E,!1)===a&&(b=this.mf,hs(this,"linkToKey",Yr,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),b=this.Ef(E),Array.isArray(b))for(var z=b.length,ne=this.je,re=0;re<z;re++)b[re]===a&&(hs(this,"linkLabelKeys",ko,ne,E,a,a,re,re),x.push(E))}for(y=0;y<x.length;y++)Sh(this,a,x[y]);di(x)}},Le.em=function(a){Li.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&yh(this,y,a)},Le.qp=function(a){Li.prototype.qp.call(this,a);var y=this.lh(a);Sh(this,y,a)},Le.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=Wa(a,y),y===void 0))return"";if(typeof y=="string")return y;yt("getCategoryForLinkData found a non-string category for "+a+": "+y)},to.prototype.getLinkCategoryForData=function(a){return this.ps(a)},to.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var E=Wa(a,x);E===void 0&&(E=""),E!==y&&(la(a,x,y),hs(this,"linkCategory",Yr,x,a,E,y),typeof x=="string"&&this.La(a,x))}else la(a,x,y)}},to.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},Le=to.prototype,Le.lm=function(a,y){Li.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function kS(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},Ve.Object.defineProperties(to.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,E=0;E<x;E++){var b=a[E];Wt(b)||yt("GraphLinksModel.linkDataArray must only contain Objects, not: "+b),co(b)}if(this.md=a,this.linkKeyProperty!==""){for(E=new Nn,b=0;b<x;b++){var z=a[b],ne=this.Ac(z);ne===void 0||this.wb.I(ne)!==null?E.add(z):this.wb.add(ne,z)}for(E=E.iterator;E.next();)b=E.value,this.Bs(b),z=this.Ac(b),z!==void 0&&this.wb.add(z,b)}for(E=new Ln,b=0;b<x;b++)E.add(a[b]);for(this.$f=E,hs(this,"linkDataArray",Yr,"linkDataArray",this,y,a),y=0;y<x;y++)dy(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,E=0;E<x;E++){var b=this.linkDataArray[E],z=this.Ac(b);z===void 0&&(this.Bs(b),z=this.Ac(b)),z!==void 0&&this.wb.add(z,b)}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"}}}),to.prototype.setCategoryForLinkData=to.prototype.lp,to.prototype.getCategoryForLinkData=to.prototype.ps,to.prototype.assignAllDataProperties=to.prototype.Do,to.prototype.setGroupKeyForNodeData=to.prototype.mp,to.prototype.getGroupKeyForNodeData=to.prototype.lh,to.prototype.isGroupForNodeData=to.prototype.Yu,to.prototype.copyLinkData=to.prototype.Jo,to.prototype.mergeLinkDataArray=to.prototype.Zz,to.prototype.removeLinkDataCollection=to.prototype.lA,to.prototype.removeLinkData=to.prototype.bm,to.prototype.addLinkDataCollection=to.prototype.Ey,to.prototype.addLinkData=to.prototype.fi,to.prototype.containsLinkData=to.prototype.Jc,to.prototype.makeLinkDataKeyUnique=to.prototype.Bs,to.prototype.findLinkDataForKey=to.prototype.jh,to.prototype.setKeyForLinkData=to.prototype.Ks,to.prototype.getKeyForLinkData=to.prototype.Ac,to.prototype.removeLabelKeyForLinkData=to.prototype.Qx,to.prototype.addLabelKeyForLinkData=to.prototype.Bu,to.prototype.setLabelKeysForLinkData=to.prototype.Ls,to.prototype.getLabelKeysForLinkData=to.prototype.Ef,to.prototype.setToPortIdForLinkData=to.prototype.Cv,to.prototype.getToPortIdForLinkData=to.prototype.Cx,to.prototype.setFromPortIdForLinkData=to.prototype.xv,to.prototype.getFromPortIdForLinkData=to.prototype.zx,to.prototype.setToKeyForLinkData=to.prototype.Bv,to.prototype.getToKeyForLinkData=to.prototype.Bx,to.prototype.setFromKeyForLinkData=to.prototype.wv,to.prototype.getFromKeyForLinkData=to.prototype.yx,to.prototype.clear=to.prototype.clear;var p0=Object.freeze([]);to.className="GraphLinksModel",ah.GraphLinksModel=to,Li.constructGraphLinksModel=Li.constructGraphLinksModel=function(){return new to},Li.initDiagramModel=hy=function(){return new to};function yl(a,y){Li.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(Jt(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Ot(yl,Li),yl.constructGraphLinksModel=Li.constructGraphLinksModel,yl.prototype.cloneProtected=function(a){Li.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},Le=yl.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,E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+Ai(b)}}return y},Le.rm=function(){var a=Li.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){Li.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},Le.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&yt("applyIncrementalJson cannot change Model properties"),Li.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=Wa(a,y),y!==void 0)){if(Sd(y))return y;yt("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 E=Wa(a,x);E!==y&&(Sh(this,E,a),la(a,x,y),this.hc(y)===null&&yh(this,y,a),hs(this,"nodeParentKey",Yr,x,a,E,y),typeof x=="string"&&this.La(a,x))}else la(a,x,y)}},Le.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=Wa(a,y),y===void 0)?"":typeof y=="string"?y:(yt("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},yl.prototype.getLinkCategoryForData=function(a){return this.ss(a)},yl.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var E=Wa(a,x);E===void 0&&(E=""),E!==y&&(la(a,x,y),hs(this,"parentLinkCategory",Yr,x,a,E,y),typeof x=="string"&&this.La(a,x))}else la(a,x,y)}},yl.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},yl.prototype.copyNodeData=function(a){return a===null?null:(a=Li.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||Wa(a,this.Ke)===void 0||la(a,this.Ke,void 0),a)},yl.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 E=Wa(a,y);E!==x&&(la(a,y,x),this.Fs(a,y,E,x))},Le=yl.prototype,Le.jp=function(a,y){Li.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 E=this.Ke;la(a,E,x),hs(this,"nodeParentKey",Yr,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Le.fm=function(a){Li.prototype.fm.call(this,a),a=this.wa(a);var y=Ap(this,a);if(y!==null){var x=qn();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)&&this.mh(E)===a){var b=this.Ke;hs(this,"nodeParentKey",Yr,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}for(y=0;y<x.length;y++)Sh(this,a,x[y]);di(x)}},Le.em=function(a){Li.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&yh(this,y,a)},Le.qp=function(a){Li.prototype.qp.call(this,a);var y=this.mh(a);Sh(this,y,a)},Le.lm=function(a,y){Li.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},Ve.Object.defineProperties(yl.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"}}}),yl.prototype.setParentLinkCategoryForNodeData=yl.prototype.Ms,yl.prototype.getParentLinkCategoryForNodeData=yl.prototype.ss,yl.prototype.setParentKeyForNodeData=yl.prototype.qe,yl.prototype.getParentKeyForNodeData=yl.prototype.mh,yl.className="TreeModel",ah.TreeModel=yl;function xa(a){da.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=sh,this.Ti=0,this.Zv=new tt,this.Jp=this.me=0,this.Xr=new jp,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=sh,this.K=Sl,this.nd=Fg,this.hd=ry,this.tf=6,this.Nn=w0,a&&Object.assign(this,a)}Ot(xa,da),xa.prototype.cloneProtected=function(a){da.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},xa.prototype.qb=function(a){a.classType===xa?a===x0||a===P0||a===y0||a===S0||a===Fg?this.sorting=a:a===af||a===Lg||a===Sl||a===Pd?this.direction=a:a===Kc||a===xd||a===sh||a===lh?this.arrangement=a:(a===Df||a===w0)&&(this.nodeDiameterFormula=a):da.prototype.qb.call(this,a)},xa.prototype.createNetwork=function(){return new Bg(this)},xa.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 Nn;y.addAll(a.iterator),a=new Nn;var x=new Nn,E=this.sort(y),b,z,ne=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 pe=this.startAngle;isFinite(pe)||(pe=0);var xe=this.sweepAngle;if((!isFinite(xe)||360<xe||1>xe)&&(xe=360),y=this.spacing,isFinite(y)||(y=NaN),re===lh&&oe===Df?re=sh:re===lh&&oe!==Df&&(re=this.arrangement),(this.direction===af||this.direction===Lg)&&this.sorting!==Fg){for(oe=0;!(oe>=E.length)&&(a.add(E.M(oe)),!(oe+1>=E.length));oe+=2)x.add(E.M(oe+1));this.direction===af?(this.arrangement===lh&&a.reverse(),E=new Nn,E.addAll(a),E.addAll(x)):(this.arrangement===lh&&x.reverse(),E=new Nn,E.addAll(x),E.addAll(a))}oe=E.length;for(var Ee=z=b=0;Ee<E.length;Ee++){var Fe=pe+xe*z*(this.direction===Sl?1:-1)/oe,Oe=E.M(Ee).diameter;isNaN(Oe)&&(Oe=wd(E.M(Ee),Fe)),360>xe&&(Ee===0||Ee===E.length-1)&&(Oe/=2),b+=Oe,z++}if(isNaN(le)||re===lh){if(isNaN(y)&&(y=6),re!==sh&&re!==lh){for(z=-1/0,ne=0;ne<oe;ne++)Ee=E.M(ne),b=E.M(ne===oe-1?0:ne+1),isNaN(Ee.diameter)&&wd(Ee,0),isNaN(b.diameter)&&wd(b,0),z=Math.max(z,(Ee.diameter+b.diameter)/2);ne=z+y,re===Kc?le=(z+y)/(2*Math.PI/oe):le=m0(this,ne*(360<=xe?oe:oe-1),ue,pe*Math.PI/180,xe*Math.PI/180)}else le=m0(this,b+(360<=xe?oe:oe-1)*(re!==lh?y:1.6*y),ue,pe*Math.PI/180,xe*Math.PI/180);z=le*ue}else if(z=le*ue,Ee=fy(this,le,z,pe*Math.PI/180,xe*Math.PI/180),isNaN(y))(re===sh||re===lh)&&(y=(Ee-b)/(360<=xe?oe:oe-1));else if(re===sh||re===lh)Ee=(Ee-b)/(360<=xe?oe:oe-1),Ee<y?(le=m0(this,b+y*(360<=xe?oe:oe-1),ue,pe*Math.PI/180,xe*Math.PI/180),z=le*ue):y=Ee;else{for(ne=-1/0,b=0;b<oe;b++)Fe=E.M(b),Oe=E.M(b===oe-1?0:b+1),isNaN(Fe.diameter)&&wd(Fe,0),isNaN(Oe.diameter)&&wd(Oe,0),ne=Math.max(ne,(Fe.diameter+Oe.diameter)/2);ne+=y,b=m0(this,ne*(360<=xe?oe:oe-1),ue,pe*Math.PI/180,xe*Math.PI/180),b>le?(le=b,z=le*ue):ne=Ee/(360<=xe?oe:oe-1)}if(this.kw=re,this.lc=le,this.Zm=ue,this.lw=pe,this.Wp=xe,this.Ti=y,this.me=z,this.Jp=ne,y=E,E=this.kw,re=this.lc,le=this.lw,ue=this.Wp,pe=this.Ti,xe=this.me,oe=this.Jp,this.direction!==af&&this.direction!==Lg||E!==lh)if(this.direction===af||this.direction===Lg){switch(ne=0,E){case xd:ne=180*v0(this,re,xe,le,oe)/Math.PI;break;case sh:oe=y=0,ne=a.first(),ne!==null&&(y=wd(ne,Math.PI/2)),ne=x.first(),ne!==null&&(oe=wd(ne,Math.PI/2)),ne=180*v0(this,re,xe,le,pe+(y+oe)/2)/Math.PI;break;case Kc:ne=ue/y.length}if(this.direction===af){switch(E){case xd:Rp(this,a,le,Pd);break;case sh:Ip(this,a,le,Pd);break;case Kc:Op(this,a,ue/2,le,Pd)}switch(E){case xd:Rp(this,x,le+ne,Sl);break;case sh:Ip(this,x,le+ne,Sl);break;case Kc:Op(this,x,ue/2,le+ne,Sl)}}else{switch(E){case xd:Rp(this,x,le,Pd);break;case sh:Ip(this,x,le,Pd);break;case Kc:Op(this,x,ue/2,le,Pd)}switch(E){case xd:Rp(this,a,le+ne,Sl);break;case sh:Ip(this,a,le+ne,Sl);break;case Kc:Op(this,a,ue/2,le+ne,Sl)}}}else switch(E){case xd:Rp(this,y,le,this.direction);break;case sh:Ip(this,y,le,this.direction);break;case Kc:Op(this,y,ue,le,this.direction);break;case lh:AS(this,y,ue,le,this.direction)}else AS(this,y,ue,le-ue/2,Sl)}this.updateParts(),this.network=null,this.isValidLayout=!0};function Op(a,y,x,E,b){var z=a.Wp,ne=a.lc;a=a.me,E=E*Math.PI/180,x=x*Math.PI/180;for(var re=y.length,oe=0;oe<re;oe++){var le=E+(b===Sl?oe*x/(360<=z?re:re-1):-(oe*x)/re),ue=y.M(oe),pe=ne*Math.tan(le)/a;pe=Math.sqrt((ne*ne+a*a*pe*pe)/(1+pe*pe)),ue.centerX=pe*Math.cos(le),ue.centerY=pe*Math.sin(le),ue.actualAngle=180*le/Math.PI}}function Ip(a,y,x,E){var b=a.lc,z=a.me,ne=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),pe=z*Math.sin(x);le.centerX=b*Math.cos(x),le.centerY=pe,le.actualAngle=180*x/Math.PI,isNaN(le.diameter)&&wd(le,0),isNaN(ue.diameter)&&wd(ue,0),le=v0(a,b,z,E===Sl?x:-x,(le.diameter+ue.diameter)/2+ne),x+=E===Sl?le:-le}}function Rp(a,y,x,E){var b=a.lc,z=a.me,ne=a.Jp;x=x*Math.PI/180;for(var re=y.length,oe=0;oe<re;oe++){var le=y.M(oe);le.centerX=b*Math.cos(x),le.centerY=z*Math.sin(x),le.actualAngle=180*x/Math.PI,le=v0(a,b,z,E===Sl?x:-x,ne),x+=E===Sl?le:-le}}function AS(a,y,x,E,b){var z=a.Wp;if(a.mj=0,a.Xr=new jp,360>x){for(z=E+(b===Sl?z:-z);0>z;)z+=360;z%=360,180<z&&(z-=360),z*=Math.PI/180,a.gt=z,DS(a,y,x,E,b)}else TS(a,y,x,E,b);a.Xr.commit(y)}function TS(a,y,x,E,b){var z=a.lc,ne=a.Ti,re=a.Zm,oe=z*Math.cos(E*Math.PI/180),le=a.me*Math.sin(E*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-ne,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-ne;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-ne,ue[3].centerX=0,ue[3].y=Math.max(ue[0].y+ue[0].height+ne,ue[2].y+ue[2].height+ne);else{z=tt.alloc();for(var pe=0;pe<ue.length&&(ue[pe].centerX=oe,ue[pe].centerY=le,!(pe>=ue.length-1));pe++)OS(a,oe,le,ue,pe,b,z)||IS(a,oe,le,ue,pe,b,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,pe=ue[ue.length-1].centerY;var xe=Math.abs(oe-z)-((ue[0].width+ue[ue.length-1].width)/2+ne),Ee=Math.abs(le-pe)-((ue[0].height+ue[ue.length-1].height)/2+ne);ne=0,1>Math.abs(Ee)?Math.abs(oe-z)<(ue[0].width+ue[ue.length-1].width)/2&&(ne=0):ne=0<Ee?Ee:1>Math.abs(xe)?0:xe,oe=Math.abs(z)>Math.abs(pe)?0<z!=le>pe:0<pe!=oe<z,(oe=b===Sl?oe:!oe)&&(ne=-Math.abs(ne),ne=Math.min(ne,-ue[ue.length-1].width),ne=Math.min(ne,-ue[ue.length-1].height)),a.Xr.compare(ne,ue),1<Math.abs(ne)&&(a.lc=8>a.mj?a.lc-ne/(2*Math.PI):5>ue.length&&10<ne?a.lc/2:a.lc-(0<ne?1.7:-2.3),a.me=a.lc*re,TS(a,y,x,E,b))}}}function DS(a,y,x,E,b){for(var z=a.lc,ne=a.me,re=a.Zm,oe=z*Math.cos(E*Math.PI/180),le=ne*Math.sin(E*Math.PI/180),ue=tt.alloc(),pe=y.Fa(),xe=0;xe<pe.length&&(pe[xe].centerX=oe,pe[xe].centerY=le,!(xe>=pe.length-1));xe++)OS(a,oe,le,pe,xe,b,ue)||IS(a,oe,le,pe,xe,b,ue),oe=ue.x,le=ue.y;if(tt.free(ue),a.mj++,!(23<a.mj)){if(oe=Math.atan2(le,oe),oe=b===Sl?a.gt-oe:oe-a.gt,oe=Math.abs(oe)<Math.abs(oe-2*Math.PI)?oe:oe-2*Math.PI,z=oe*(z+ne)/2,ne=a.Xr,Math.abs(z)<Math.abs(ne.Pl))for(ne.Pl=z,ne.mk=[],ne.tm=[],oe=0;oe<pe.length;oe++)ne.mk[oe]=pe[oe].bounds.x,ne.tm[oe]=pe[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,DS(a,y,x,E,b))}}function OS(a,y,x,E,b,z,ne){var re=a.lc,oe=a.me,le=0;a=(E[b].width+E[b+1].width)/2+a.Ti;var ue=!1;if(0<=x!=(z===Sl)){if(z=y+a,z>re){if(z=y-a,z<-re)return ne.x=z,ne.y=le,!1;ue=!0}}else if(z=y-a,z<-re){if(z=y+a,z>re)return ne.x=z,ne.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)>(E[b].height+E[b+1].height)/2?(ne.x=z,ne.y=le,!1):(ne.x=z,ne.y=le,!0)}function IS(a,y,x,E,b,z,ne){var re=a.lc,oe=a.me,le=0;if(a=(E[b].height+E[b+1].height)/2+a.Ti,E=!1,0<=y!=(z===Sl)){if(z=x-a,z<-oe){if(z=x+a,z>oe){ne.x=le,ne.y=z;return}E=!0}}else if(z=x+a,z>oe){if(z=x-a,z<-oe){ne.x=le,ne.y=z;return}E=!0}le=Math.sqrt(1-Math.min(1,z*z/(oe*oe)))*re,0>y!==E&&(le=-le),ne.x=le,ne.y=z}xa.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},xa.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 E=this.network.vertexes.iterator;E.next();){var b=E.value;b.x+=x.x,b.y+=x.y,b.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))},xa.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function fy(a,y,x,E,b){var z=a.ty;if(.001>Math.abs(a.Zm-1))return E!==void 0&&b!==void 0?b*y:2*Math.PI*y;a=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x;for(var ne=0,re=E!==void 0&&b!==void 0?b/(z+1):Math.PI/(2*(z+1)),oe=0,le=0;le<=z;le++){E!==void 0&&b!==void 0?oe=E+le*b/z:oe=le*Math.PI/(2*z);var ue=Math.sin(oe);ne+=Math.sqrt(1-a*a*ue*ue)*re}return E!==void 0&&b!==void 0?(y>x?y:x)*ne:4*(y>x?y:x)*ne}function m0(a,y,x,E,b){return y/(E!==void 0&&b!==void 0?fy(a,1,x,E,b):fy(a,1,x))}function v0(a,y,x,E,b){if(.001>Math.abs(a.Zm-1))return b/y;var z=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x,ne=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(E+=Math.PI/2);for(var re=0;;re++){var oe=Math.sin(E+re*a);if(ne+=(y>x?y:x)*Math.sqrt(1-z*z*oe*oe)*a,ne>=b)return re*a}}xa.prototype.sort=function(a){switch(this.sorting){case y0:break;case S0:a.reverse();break;case x0:a.sort(this.comparer);break;case P0:a.sort(this.comparer),a.reverse();break;case Fg:return this.ak(Tx(a));default:yt("Invalid sorting type.")}return a};function Tx(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new Nn;for(var E=0;E<a.length;E++){var b=-1,z=-1;if(E===0)for(var ne=0;ne<a.length;ne++){var re=a.M(ne).edgesCount;re>b&&(b=re,z=ne)}else for(ne=0;ne<a.length;ne++)re=y[ne],re>b&&(b=re,z=ne);for(x.add(a.M(z)),y[z]=-1,z=a.M(z),ne=z.sourceEdges;ne.next();)b=a.indexOf(ne.value.fromVertex),0>b||0<=y[b]&&y[b]++;for(z=z.destinationEdges;z.next();)b=a.indexOf(z.value.toVertex),0>b||0<=y[b]&&y[b]++}return x}xa.prototype.ak=function(a){for(var y=[],x=0;x<a.length;x++){var E=a.M(x);y[x]=[];for(var b,z=E.destinationEdges;z.next();)b=a.indexOf(z.value.toVertex),b!==x&&0>y[x].indexOf(b)&&y[x].push(b);for(E=E.sourceEdges;E.next();)b=a.indexOf(E.value.fromVertex),b!==x&&0>y[x].indexOf(b)&&y[x].push(b)}for(z=[],x=0;x<y.length;x++)z[x]=0;x=[];var ne=[],re=[];E=[],b=new Nn;for(var oe=0,le=0;le<y.length;le++){var ue=y[le].length;if(ue===1)E.push(le);else if(ue===0)b.add(a.M(le));else{if(oe===0)x.push(le);else{for(var pe=ue=1/0,xe=-1,Ee=[],Fe=0;Fe<x.length;Fe++)0>y[x[Fe]].indexOf(x[Fe===x.length-1?0:Fe+1])&&Ee.push(Fe===x.length-1?0:Fe+1);if(Ee.length===0)for(Fe=0;Fe<x.length;Fe++)Ee.push(Fe);for(Fe=0;Fe<Ee.length;Fe++){for(var Oe=Ee[Fe],at=y[le],Xe=0,pt=0;pt<ne.length;pt++){var wt=z[ne[pt]],Mt=z[re[pt]];if(wt<Mt){var It=wt;wt=Mt}else It=Mt;if(It<Oe&&Oe<=wt)for(Mt=0;Mt<at.length;Mt++){var qt=at[Mt];0>x.indexOf(qt)||It<z[qt]&&z[qt]<wt||It===z[qt]||wt===z[qt]||Xe++}else for(Mt=0;Mt<at.length;Mt++)qt=at[Mt],0>x.indexOf(qt)||It<z[qt]&&z[qt]<wt&&It!==z[qt]&&wt!==z[qt]&&Xe++}for(at=Xe,pt=Xe=0;pt<y[le].length;pt++)It=x.indexOf(y[le][pt]),0<=It&&(It=Math.abs(Oe-(It>=Oe?It+1:It)),Xe+=It<x.length+1-It?It:x.length+1-It);for(pt=0;pt<ne.length;pt++)It=z[ne[pt]],wt=z[re[pt]],It>=Oe&&It++,wt>=Oe&&wt++,It>wt&&(Mt=wt,wt=It,It=Mt),wt-It<(x.length+2)/2==(It<Oe&&Oe<=wt)&&Xe++;(at<ue||at===ue&&Xe<pe)&&(ue=at,pe=Xe,xe=Oe)}for(x.splice(xe,0,le),ue=0;ue<x.length;ue++)z[x[ue]]=ue;for(ue=0;ue<y[le].length;ue++)pe=y[le][ue],0<=x.indexOf(pe)&&(ne.push(le),re.push(pe))}oe++}}for(ne=x.length;;){for(z=!0,re=0;re<E.length;re++)if(oe=E[re],le=y[oe][0],ue=x.indexOf(le),0<=ue){for(xe=pe=0;xe<y[le].length;xe++)Ee=x.indexOf(y[le][xe]),0>Ee||Ee===ue||(Fe=Ee>ue?Ee-ue:ue-Ee,pe+=Ee<ue!=Fe>ne-Fe?1:-1);x.splice(0>pe?ue:ue+1,0,oe),E.splice(re,1),re--}else z=!1;if(z)break;x.push(E[0]),E.splice(0,1)}for(y=0;y<x.length;y++)b.add(a.M(x[y]));return b},Ve.Object.defineProperties(xa.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!==lh&&a!==sh&&a!==xd&&a!==Kc||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==Sl&&a!==Pd&&a!==af&&a!==Lg||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==y0&&a!==S0&&a!==x0&&!P0&&a!==Fg||(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!==w0&&a!==Df||(this.Nn=a,this.C())}},actualXRadius:{get:function(){return this.lc}},actualYRadius:{get:function(){return this.me}},actualSpacing:{get:function(){return this.Ti}},actualCenter:{get:function(){return this.Zv}}});var sh=new fn(xa,"ConstantSpacing",0),xd=new fn(xa,"ConstantDistance",1),Kc=new fn(xa,"ConstantAngle",2),lh=new fn(xa,"Packed",3),Sl=new fn(xa,"Clockwise",4),Pd=new fn(xa,"Counterclockwise",5),af=new fn(xa,"BidirectionalLeft",6),Lg=new fn(xa,"BidirectionalRight",7),y0=new fn(xa,"Forwards",8),S0=new fn(xa,"Reverse",9),x0=new fn(xa,"Ascending",10),P0=new fn(xa,"Descending",11),Fg=new fn(xa,"Optimized",12),w0=new fn(xa,"Pythagorean",13),Df=new fn(xa,"Circular",14);xa.className="CircularLayout",xa.ConstantSpacing=sh,xa.ConstantDistance=xd,xa.ConstantAngle=Kc,xa.Packed=lh,xa.Clockwise=Sl,xa.Counterclockwise=Pd,xa.BidirectionalLeft=af,xa.BidirectionalRight=Lg,xa.Forwards=y0,xa.Reverse=S0,xa.Ascending=x0,xa.Descending=P0,xa.Optimized=Fg,xa.Pythagorean=w0,xa.Circular=Df;function jp(){this.Pl=-1/0,this.tm=this.mk=null}jp.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},jp.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]}},jp.className="VertexArrangement";function Bg(a){qo.call(this,a)}Ot(Bg,qo),Bg.prototype.createVertex=function(){return new zp(this)},Bg.prototype.createEdge=function(){return new C0(this)},Bg.className="CircularNetwork";function zp(a){ps.call(this,a),this.u=this.Si=NaN}Ot(zp,ps);function wd(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===lh)if(x.nodeDiameterFormula===Df)a.Si=Math.max(a.width,a.height);else{if(x=Math.abs(Math.sin(y)),y=Math.abs(Math.cos(y)),x===0)return a.width;if(y===0)return a.height;a.Si=Math.min(a.height/x,a.width/y)}else a.Si=x.nodeDiameterFormula===Df?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}Ve.Object.defineProperties(zp.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)}}}),zp.className="CircularVertex";function C0(a){ql.call(this,a)}Ot(C0,ql),C0.className="CircularEdge";function Ks(a){da.call(this),this.ah=null,this.An=0,this.$d=new Xn(100,100).freeze(),this.Bm=!1,this.sf=!0,this.td=!1,this.dl=100,this.$m=1,this.Zf=1e3,this.In=10,this.fo=Math,this.Hk=.05,this.Gk=50,this.Ek=150,this.Fk=0,this.Vm=10,this.Um=5,a&&Object.assign(this,a)}Ot(Ks,da),Ks.prototype.cloneProtected=function(a){da.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},Ks.prototype.createNetwork=function(){return new Of(this)},Ks.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 E=x.iterator;E.next();){this.network=E.value;for(var b=this.network.vertexes.iterator;b.next();){var z=b.value;z.Vd=z.vertexes.count,z.sh=1,z.Hj=null,z.We=null}RS(this,0,a)}this.network=y;var ne=E=x.iterator;E=this.arrangementSpacing;var re=ne.count,oe=!0;z=b=0;for(var le=qn(),ue=0;ue<re+y.vertexes.count+2;ue++)le[ue]=null;re=0,ne.reset();for(var pe=gn.alloc();ne.next();)if(ue=ne.value,this.computeBounds(ue,pe),oe)oe=!1,b=pe.x+pe.width/2,z=pe.y+pe.height/2,le[0]=new tt(pe.x+pe.width+E.width,pe.y),le[1]=new tt(pe.x,pe.y+pe.height+E.height),re=2;else{var xe=jS(le,re,b,z,pe.width,pe.height,E),Ee=le[xe],Fe=new tt(Ee.x+pe.width+E.width,Ee.y),Oe=new tt(Ee.x,Ee.y+pe.height+E.height);for(xe+1<re&&le.splice(xe+1,0,null),le[xe]=Fe,le[xe+1]=Oe,re++,xe=Ee.x-pe.x,Ee=Ee.y-pe.y,ue=ue.vertexes.iterator;ue.next();)Fe=ue.value,Fe.centerX+=xe,Fe.centerY+=Ee}for(gn.free(pe),ue=y.vertexes.iterator;ue.next();)ne=ue.value,xe=ne.bounds,2>re?(b=xe.x+xe.width/2,z=xe.y+xe.height/2,le[0]=new tt(xe.x+xe.width+E.width,xe.y),le[1]=new tt(xe.x,xe.y+xe.height+E.height),re=2):(oe=jS(le,re,b,z,xe.width,xe.height,E),pe=le[oe],Ee=new tt(pe.x+xe.width+E.width,pe.y),xe=new tt(pe.x,pe.y+xe.height+E.height),oe+1<re&&le.splice(oe+1,0,null),le[oe]=Ee,le[oe+1]=xe,re++,ne.centerX=pe.x+ne.width/2,ne.centerY=pe.y+ne.height/2);for(di(le),E=x.iterator;E.next();){for(x=E.value,b=x.vertexes.iterator;b.next();)y.dh(b.value);for(x=x.edges.iterator;x.next();)y.Bo(x.value)}}_S(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},Ks.prototype.needsClusterLayout=function(){if(3>this.network.vertexes.count)return!1;for(var a=0,y=0,x=this.network.vertexes.first().bounds,E=this.network.vertexes.iterator;E.next();){if(E.value.bounds.Yc(x)&&(a++,2<a))return!0;if(10<y)break;y++}return!1},Ks.prototype.computeBounds=function(a,y){var x=!0;for(a=a.vertexes.iterator;a.next();){var E=a.value;x?(x=!1,y.set(E.bounds)):y.ed(E.bounds)}return y};function RS(a,y,x){if(Dx(a,y)){var E=a.Zf;a.Zf*=1+1/(y+1);var b=Ox(a,y),z=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=z,RS(a,y+1,x),_S(a,z),Ix(a,b),y=b.vertexes.Fa(),y.sort(function(ne,re){return ne===null||re===null||ne===re?0:re.Vd-ne.Vd}),x=0;x<y.length;x++)Rx(a,y[x]);a.Zf=E}}function Dx(a,y){if(10<y||3>a.network.vertexes.count)return!1;for(a.ah=a.network.vertexes.Fa(),a=a.ah,a.sort(function(x,E){return x===null||E===null||x===E?0:E.Vd-x.Vd}),y=a.length-1;0<=y&&1>=a[y].Vd;)y--;return 1<a.length-y}function Ox(a,y){for(var x=a.network,E=new Of(a),b=0;b<a.ah.length;b++){var z=a.ah[b];if(1<z.Vd){E.dh(z);var ne=new ZS;ne.Rs=z.Vd,ne.Ss=z.width,ne.Qs=z.height,ne.Sv=z.focus.x,ne.Tv=z.focus.y,z.We===null&&(z.We=new Nn),z.We.add(ne),z.sv=z.We.count-1}else break}for(z=x.edges.iterator;z.next();){var re=z.value;b=re.fromVertex,ne=re.toVertex,b.network===E&&ne.network===E?E.Bo(re):b.network===E?(re=b.Hj,re===null&&(re=new Nn,b.Hj=re),re.add(ne),b.Vd--,b.sh+=ne.sh):ne.network===E&&(re=ne.Hj,re===null&&(re=new Nn,ne.Hj=re),re.add(b),ne.Vd--,ne.sh+=b.sh)}for(b=E.edges.iterator;b.next();)z=b.value,z.length*=Math.max(1,it.sqrt((z.fromVertex.sh+z.toVertex.sh)/(4*y+1)));for(y=E.vertexes.iterator;y.next();){b=y.value;var oe=b.Hj;if(oe!==null&&0<oe.count&&(ne=b.We.M(b.We.count-1).Rs-b.Vd,!(0>=ne))){for(var le=re=0,ue=oe.count-ne;ue<oe.count;ue++){var pe=oe.M(ue),xe=null;for(z=pe.edges.iterator;z.next();){var Ee=z.value;if(Ee.Ax(pe)===b){xe=Ee;break}}xe!==null&&(le+=xe.length,re+=pe.width*pe.height)}z=b.centerX,oe=b.centerY,ue=b.width,pe=b.height,xe=b.focus,Ee=ue*pe,1>Ee&&(Ee=1),re=it.sqrt((re+Ee+le*le*4/(ne*ne))/Ee),ne=(re-1)*ue/2,re=(re-1)*pe/2,b.bounds=new gn(z-xe.x-ne,oe-xe.y-re,ue+2*ne,pe+2*re),b.focus=new tt(xe.x+ne,xe.y+re)}}return a.network=E,x}function Ix(a,y){for(var x=a.network.vertexes.iterator;x.next();){var E=x.value;if(E.network=y,E.We!==null){var b=E.We.M(E.sv);E.Vd=b.Rs;var z=b.Sv,ne=b.Tv;E.bounds=new gn(E.centerX-z,E.centerY-ne,b.Ss,b.Qs),E.focus=new tt(z,ne),E.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 E=y.centerX,b=y.centerY,z=y.width,ne=y.height;y.We!==null&&0<y.We.count&&(ne=y.We.M(0),z=ne.Ss,ne=ne.Qs),z=it.sqrt(z*z+ne*ne)/2;for(var re=!1,oe=ne=0,le=0,ue=y.vertexes.iterator;ue.next();){var pe=ue.value;1>=pe.Vd?oe++:(re=!0,le++,ne+=Math.atan2(y.centerY-pe.centerY,y.centerX-pe.centerX))}if(oe!==0){for(0<le&&(ne/=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(Ee,Fe){return Ee===null||Fe===null||Ee===Fe?0:Fe.width*Fe.height-Ee.width*Ee.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,pe=oe.edges.iterator;pe.next();){ue=pe.value;break}pe=oe.width;var xe=oe.height;pe=it.sqrt(pe*pe+xe*xe)/2,ue=z+ue.length+pe,pe=ne+(y*(re/2>>1)+le)*(re%2===0?1:-1),oe.centerX=E+ue*Math.cos(pe),oe.centerY=b+ue*Math.sin(pe),re++}}}}function jS(a,y,x,E,b,z,ne){var re=9e19,oe=-1,le=0;e:for(;le<y;le++){var ue=a[le],pe=ue.x-x,xe=ue.y-E;if(pe=pe*pe+xe*xe,pe<re){for(xe=le-1;0<=xe;xe--)if(a[xe].y>ue.y&&a[xe].x-ue.x<b+ne.width)continue e;for(xe=le+1;xe<y;xe++)if(a[xe].x>ue.x&&a[xe].y-ue.y<z+ne.height)continue e;oe=le,re=pe}}return oe}Ks.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Ks.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 E=this.network.ki(x);E===null&&(E=this.network.Bl(x)),E.charge=this.defaultCommentElectricalCharge,x=null;for(var b=E.destinationEdges;b.next();){var z=b.value;if(z.toVertex===a){x=z;break}}if(x===null){for(b=E.sourceEdges;b.next();)if(z=b.value,z.fromVertex===a){x=z;break}}x===null&&(x=this.network.Zj(a,E,null)),x.length=this.defaultCommentSpringLength}}};function zS(a,y){var x=a.bounds,E=x.x;a=x.y;var b=x.width;x=x.height;var z=y.bounds,ne=z.x;y=z.y;var re=z.width;return z=z.height,E+b<ne?a>y+z?(x=E+b-ne,a=a-y-z,it.sqrt(x*x+a*a)):a+x<y?(E=E+b-ne,a=a+x-y,it.sqrt(E*E+a*a)):ne-(E+b):E>ne+re?a>y+z?(x=E-ne-re,a=a-y-z,it.sqrt(x*x+a*a)):a+x<y?(E=E-ne-re,a=a+x-y,it.sqrt(E*E+a*a)):E-(ne+re):a>y+z?a-(y+z):a+x<y?y-(a+x):.1}function _S(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 E=x.centerX,b=E,z=x=x.centerY,ne=1;ne<y.length;ne++){var re=y[ne];re.forceX=0,re.forceY=0;var oe=re.centerX;re=re.centerY,E=Math.min(E,oe),b=Math.max(b,oe),x=Math.min(x,re),z=Math.max(z,re)}(b=b-E>z-x)?y.sort(function(Oe,at){return Oe===null||at===null||Oe===at?0:Oe.centerX-at.centerX}):y.sort(function(Oe,at){return Oe===null||at===null||Oe===at?0:Oe.centerY-at.centerY}),x=a.Zf;var le=E=re=0;for(z=0;z<y.length;z++){ne=y[z],E=ne.bounds,re=ne.focus,oe=E.x+re.x;var ue=E.y+re.y;E=ne.charge*a.electricalFieldX(oe,ue),le=ne.charge*a.electricalFieldY(oe,ue),E+=ne.mass*a.gravitationalFieldX(oe,ue),le+=ne.mass*a.gravitationalFieldY(oe,ue),ne.forceX+=E,ne.forceY+=le;for(var pe=z+1;pe<y.length;pe++){var xe=y[pe];if(xe!==ne){E=xe.bounds,re=xe.focus,le=E.x+re.x;var Ee=E.y+re.y;if(oe-le>x||le-oe>x){if(b)break}else if(ue-Ee>x||Ee-ue>x){if(!b)break}else{var Fe=zS(ne,xe);1>Fe?(E=a.randomNumberGenerator,E===null&&(a.randomNumberGenerator=E=new E0),Fe=E.random(),re=E.random(),oe>le?(E=Math.abs(xe.bounds.right-ne.bounds.x),E=(1+E)*Fe):oe<le?(E=Math.abs(xe.bounds.x-ne.bounds.right),E=-(1+E)*Fe):(E=Math.max(xe.width,ne.width),E=(1+E)*Fe-E/2),ue>Ee?(le=Math.abs(xe.bounds.bottom-ne.bounds.y),le=(1+le)*re):oe<le?(le=Math.abs(xe.bounds.y-ne.bounds.bottom),le=-(1+le)*re):(le=Math.max(xe.height,ne.height),le=(1+le)*re-le/2)):(re=-(ne.charge*xe.charge)/(Fe*Fe),E=(le-oe)/Fe*re,le=(Ee-ue)/Fe*re),ne.forceX+=E,ne.forceY+=le,xe.forceX-=E,xe.forceY-=le}}}}for(b=a.network.edges.iterator;b.next();)re=b.value,x=re.fromVertex,z=re.toVertex,ne=x.bounds,oe=x.focus,E=ne.x+oe.x,ne=ne.y+oe.y,ue=z.bounds,pe=z.focus,oe=ue.x+pe.x,ue=ue.y+pe.y,pe=zS(x,z),1>pe?(pe=a.randomNumberGenerator,pe===null&&(a.randomNumberGenerator=pe=new E0),re=pe.random(),pe=pe.random(),E=(E>oe?1:-1)*(1+(z.width>x.width?z.width:x.width))*re,le=(ne>ue?1:-1)*(1+(z.height>x.height?z.height:x.height))*pe):(re=re.stiffness*(pe-re.length),E=(oe-E)/pe*re,le=(ue-ne)/pe*re),x.forceX+=E,x.forceY+=le,z.forceX-=E,z.forceY-=le;for(b=E=0;b<y.length;b++)x=y[b],a.isFixed(x)?a.moveFixedVertex(x):E=Math.max(E,a.moveVertex(x)||0);return E>a.epsilonDistance*a.epsilonDistance}Ks.prototype.moveVertex=function(a){var y=a.forceX,x=a.forceY,E=this.moveLimit;return y<-E?y=-E:y>E&&(y=E),x<-E?x=-E:x>E&&(x=E),a.centerX+=y,a.centerY+=x,y*y+x*x},Ks.prototype.moveFixedVertex=function(){},Ks.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},Ks.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=Co,y.toSpot=Co)}},Ks.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=gn.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,gn.free(x)}x=gn.alloc();for(var E=this.network.vertexes.iterator;E.next();){var b=E.value;(a!==0||y!==0)&&(x.assign(b.bounds),x.x+=a,x.y+=y,b.bounds=x),b.commit()}gn.free(x)},Ks.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Ks.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},Ks.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},Ks.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},Ks.prototype.electricalFieldX=function(){return 0},Ks.prototype.electricalFieldY=function(){return 0},Ks.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},Ks.prototype.gravitationalFieldX=function(){return 0},Ks.prototype.gravitationalFieldY=function(){return 0},Ks.prototype.isFixed=function(a){return a.isFixed},Ve.Object.defineProperties(Ks.prototype,{currentIteration:{get:function(){return this.An}},arrangementSpacing:{get:function(){return this.$d},set:function(a){this.$d.D(a)||(this.$d.assign(a),this.C())}},arrangesToOrigin:{get:function(){return this.Bm},set:function(a){this.Bm!==a&&(this.Bm=a,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(a){this.sf!==a&&(this.sf=a,this.C())}},comments:{get:function(){return this.td},set:function(a){this.td!==a&&(this.td=a,this.C())}},maxIterations:{get:function(){return this.dl},set:function(a){this.dl!==a&&0<=a&&(this.dl=a,this.C())}},epsilonDistance:{get:function(){return this.$m},set:function(a){this.$m!==a&&0<a&&(this.$m=a,this.C())}},infinityDistance:{get:function(){return this.Zf},set:function(a){this.Zf!==a&&1<a&&(this.Zf=a,this.C())}},moveLimit:{get:function(){return this.In},set:function(a){this.In!==a&&1<a&&(this.In=a,this.C())}},randomNumberGenerator:{get:function(){return this.fo},set:function(a){this.fo!==a&&(a!==null&&typeof a.random!="function"&&yt('ForceDirectedLayout.randomNumberGenerator must have a "random()" function on it: '+a),this.fo=a)}},defaultSpringStiffness:{get:function(){return this.Hk},set:function(a){this.Hk!==a&&(this.Hk=a,this.C())}},defaultSpringLength:{get:function(){return this.Gk},set:function(a){this.Gk!==a&&(this.Gk=a,this.C())}},defaultElectricalCharge:{get:function(){return this.Ek},set:function(a){this.Ek!==a&&(this.Ek=a,this.C())}},defaultGravitationalMass:{get:function(){return this.Fk},set:function(a){this.Fk!==a&&(this.Fk=a,this.C())}},defaultCommentSpringLength:{get:function(){return this.Vm},set:function(a){this.Vm!==a&&(this.Vm=a,this.C())}},defaultCommentElectricalCharge:{get:function(){return this.Um},set:function(a){this.Um!==a&&(this.Um=a,this.C())}}}),Ks.className="ForceDirectedLayout";function ZS(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}ZS.className="ForceDirectedSubnet";function Of(a){qo.call(this,a)}Ot(Of,qo),Of.prototype.createVertex=function(){return new _p(this)},Of.prototype.createEdge=function(){return new Zp(this)},Of.className="ForceDirectedNetwork";function _p(a){ps.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}Ot(_p,ps),Ve.Object.defineProperties(_p.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)}}}),_p.className="ForceDirectedVertex";function Zp(a){ql.call(this,a),this.j=this.o=NaN}Ot(Zp,ql),Ve.Object.defineProperties(Zp.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)}}}),Zp.className="ForceDirectedEdge";function E0(){var a=0;a===void 0&&(a=42),this.seed=a,this.ay=48271,this.ey=2147483647,this.Q=44488.07041494893,this.gy=3399,this.by=1/2147483647,this.random()}E0.prototype.random=function(){var a=this.seed%this.Q*this.ay-this.seed/this.Q*this.gy;return 0<a?this.seed=a:this.seed=a+this.ey,this.seed*this.by},E0.className="RandomNumberGenerator";function Ro(a){da.call(this),this.kc=this.ie=25,this.K=0,this.Dk=B0,this.Zk=N0,this.Qk=k0,this.bj=4,this.rk=A0,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)}Ot(Ro,da),Ro.prototype.cloneProtected=function(a){da.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},Ro.prototype.qb=function(a){a.classType===Ro?a.name.indexOf("Aggressive")===0?this.aggressiveOption=a:a.name.indexOf("Cycle")===0?this.cycleRemoveOption=a:a.name.indexOf("Init")===0?this.initializeOption=a:a.name.indexOf("Layer")===0?this.layeringOption=a:yt("Unknown enum value: "+a):da.prototype.qb.call(this,a)},Ro.prototype.createNetwork=function(){return new kg(this)},Ro.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!==Wp&&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===Wp&&this.removeCycles(),a=this.network;for(var y=[],x=a.edges.iterator;x.next();){var E=x.value;E.valid=!1,y.push(E)}for(x=0;x<y.length;x++){E=y[x];var b=E.fromVertex,z=E.toVertex;if(!(E.valid||(b.node===null&&b.data===null||z.node===null&&z.data===null)&&b.layer===z.layer)){var ne=0,re=0,oe=0,le=0;if(E.link!==null){if(re=E.link,re===null)continue;var ue=b.node;if(ne=z.node,ue===null||ne===null)continue;var pe=re.fromNode;oe=re.toNode;for(var xe=re.fromPort;xe!==null&&!xe.Ed();)xe=xe.panel;for(re=re.toPort;re!==null&&!re.Ed();)re=re.panel;if(E.rev){le=pe;var Ee=xe;pe=oe,xe=re,oe=le,re=Ee}var Fe=b.focus;le=z.focus;var Oe=E.rev?z.bounds:b.bounds;Ee=tt.alloc(),ue!==pe?Oe.w()&&pe.isVisible()?pe.actualBounds.w()?(Zc(pe,xe,Qr,Ee),Ee.x+=pe.actualBounds.x-Oe.x,Ee.y+=pe.actualBounds.y-Oe.y):(Zc(pe,xe,Qr,Ee),Ee.w()||Ee.assign(Fe)):Ee.assign(Fe):Oe.w()?(Zc(pe,xe,Qr,Ee),Ee.w()||Ee.assign(Fe)):Ee.assign(Fe),pe=E.rev?b.bounds:z.bounds,ue=tt.alloc(),ne!==oe?pe.w()&&oe.isVisible()?oe.actualBounds.w()?(Zc(oe,re,Qr,ue),ue.x+=oe.actualBounds.x-pe.x,ue.y+=oe.actualBounds.y-pe.y):(Zc(oe,re,Qr,ue),ue.w()||ue.assign(le)):ue.assign(le):pe.w()?(Zc(oe,re,Qr,ue),ue.w()||ue.assign(le)):ue.assign(le),this.K===90||this.K===270?(ne=Math.round((Ee.x-Fe.x)/this.kc),oe=Ee.x,re=Math.round((ue.x-le.x)/this.kc),le=ue.x):(ne=Math.round((Ee.y-Fe.y)/this.kc),oe=Ee.y,re=Math.round((ue.y-le.y)/this.kc),le=ue.y),tt.free(Ee),tt.free(ue),E.portFromColOffset=ne,E.portFromPos=oe,E.portToColOffset=re,E.portToPos=le}else E.portFromColOffset=0,E.portFromPos=0,E.portToColOffset=0,E.portToPos=0;if(Ee=b.layer,ue=z.layer,pe=0,Oe=E.link,Oe!==null){var at=Oe.fromPort,Xe=Oe.toPort;if(at!==null&&Xe!==null){var pt=Oe.fromNode;if(xe=Oe.toNode,pt!==null&&xe!==null){var wt=F0(this,!0),Mt=F0(this,!1),It=this.setsPortSpots?wt:Oe.computeSpot(!0,at);Fe=this.setsPortSpots?Mt:Oe.computeSpot(!1,Xe);var qt=Oe.isOrthogonal;It.$c()&&It.Hf(Mt)&&Fe.$c()&&Fe.Hf(wt)?pe=0:(wt=Oe.getLinkPoint(pt,at,It,!0,qt,xe,Xe,tt.alloc()),Mt=Oe.getLinkDirection(pt,at,wt,It,!0,qt,xe,Xe),tt.free(wt),It.ys()||Mt!==XS(this,E,!0)?this.setsPortSpots&&pt!==null&&pt.ports.count===1&&E.rev&&(pe+=1):pe+=1,It=Oe.getLinkPoint(xe,Xe,Fe,!1,qt,pt,at,tt.alloc()),Oe=Oe.getLinkDirection(xe,Xe,It,Fe,!1,qt,pt,at),tt.free(It),Fe.ys()||Oe!==XS(this,E,!1)?this.setsPortSpots&&xe!==null&&xe.ports.count===1&&E.rev&&(pe+=2):pe+=2)}}}if(xe=pe,pe=xe===1||xe===3,(xe=xe===2||xe===3)&&(Fe=a.createVertex(),Fe.node=null,Fe.Dj=1,Fe.layer=Ee,Fe.near=b,a.dh(Fe),b=a.Zj(b,Fe,E.link),b.valid=!1,b.rev=E.rev,b.portFromColOffset=ne,b.portToColOffset=0,b.portFromPos=oe,b.portToPos=0,b=Fe),Oe=1,pe&&Oe--,Ee-ue>Oe&&0<Ee){for(E.valid=!1,Fe=a.createVertex(),Fe.node=null,Fe.Dj=2,Fe.layer=Ee-1,a.dh(Fe),b=a.Zj(b,Fe,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=xe?0:ne,b.portToColOffset=0,b.portFromPos=xe?0:oe,b.portToPos=0,b=Fe,Ee--;Ee-ue>Oe&&0<Ee;)Fe=a.createVertex(),Fe.node=null,Fe.Dj=3,Fe.layer=Ee-1,a.dh(Fe),b=a.Zj(b,Fe,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=0,b.portFromPos=0,b.portToPos=0,b=Fe,Ee--;b=a.Zj(Fe,z,E.link),b.valid=!pe,pe&&(Fe.near=z),b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=re,b.portFromPos=0,b.portToPos=le}else E.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=Cd(this,a),x=0,E=this.tc[a],z=0;z<E;z++)b=y[z],x+=this.nodeMinColumnSpace(b,!0),b.column=x,x+=1,x+=this.nodeMinColumnSpace(b,!1);this.Ra=Math.max(this.Ra,x-1),Ed(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},Ro.prototype.linkMinLength=function(){return 1};function gy(a){var y=a.fromVertex.node||a.fromVertex.data;return a=a.toVertex.node||a.toVertex.data,y===null&&a===null?8:y===null||a===null?4:1}Ro.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},Ro.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 Tl(a){a.kj===null&&(a.kj=[]);for(var y=0,x=a.network.vertexes.iterator;x.next();){var E=x.value;a.kj[y]=E.layer,y++,a.kj[y]=E.column,y++,a.kj[y]=E.index,y++}return a.kj}function Tu(a,y){var x=0;for(a=a.network.vertexes.iterator;a.next();){var E=a.value;E.layer=y[x],x++,E.column=y[x],x++,E.index=y[x],x++}}function HS(a,y,x){var E=Cd(a,y),b=a.tc[y];(a.Jn===null||a.Jn.length<b*b)&&(a.Jn=[]);for(var z=a.Jn,ne=0;ne<b;ne++){var re=0,oe=E[ne],le=oe.near;if(le!==null&&le.layer===oe.layer)if(oe=le.index,oe>ne)for(var ue=ne+1;ue<oe;ue++){var pe=E[ue];pe.near===le&&pe.Dj===le.Dj||re++}else for(ue=ne-1;ue>oe;ue--)pe=E[ue],pe.near===le&&pe.Dj===le.Dj||re++;var xe;if(0<=x)for(oe=E[ne].sourceEdgesArrayAccess,le=0;le<oe.length;le++){var Ee=oe[le];if(Ee.valid&&Ee.fromVertex.layer!==y)for(pe=Ee.fromVertex.index,ue=Ee.portToPos,Ee=Ee.portFromPos,xe=le+1;xe<oe.length;xe++){var Fe=oe[xe];if(Fe.valid&&Fe.fromVertex.layer!==y){var Oe=Fe.fromVertex.index,at=Fe.portToPos;Fe=Fe.portFromPos,ue<at&&(pe>Oe||pe===Oe&&Ee>Fe)&&re++,at<ue&&(Oe>pe||Oe===pe&&Fe>Ee)&&re++}}}if(0>=x){for(oe=E[ne].destinationEdgesArrayAccess,le=0;le<oe.length;le++)if(Ee=oe[le],Ee.valid&&Ee.toVertex.layer!==y)for(pe=Ee.toVertex.index,ue=Ee.portToPos,Ee=Ee.portFromPos,xe=le+1;xe<oe.length;xe++)Fe=oe[xe],Fe.valid&&Fe.toVertex.layer!==y&&(Oe=Fe.toVertex.index,at=Fe.portToPos,Fe=Fe.portFromPos,Ee<Fe&&(pe>Oe||pe===Oe&&ue>at)&&re++,Fe<Ee&&(Oe>pe||Oe===pe&&at>ue)&&re++)}for(z[ne*b+ne]=re,oe=ne+1;oe<b;oe++){var Xe=0,pt=0;if(0<=x){re=E[ne].sourceEdgesArrayAccess;var wt=E[oe].sourceEdgesArrayAccess;for(le=0;le<re.length;le++)if(Ee=re[le],Ee.valid&&Ee.fromVertex.layer!==y)for(pe=Ee.fromVertex.index,Ee=Ee.portFromPos,xe=0;xe<wt.length;xe++)Fe=wt[xe],Fe.valid&&Fe.fromVertex.layer!==y&&(Oe=Fe.fromVertex.index,Fe=Fe.portFromPos,(pe<Oe||pe===Oe&&Ee<Fe)&&pt++,(Oe<pe||Oe===pe&&Fe<Ee)&&Xe++)}if(0>=x){for(re=E[ne].destinationEdgesArrayAccess,wt=E[oe].destinationEdgesArrayAccess,le=0;le<re.length;le++)if(Ee=re[le],Ee.valid&&Ee.toVertex.layer!==y)for(pe=Ee.toVertex.index,ue=Ee.portToPos,xe=0;xe<wt.length;xe++)Fe=wt[xe],Fe.valid&&Fe.toVertex.layer!==y&&(Oe=Fe.toVertex.index,at=Fe.portToPos,(pe<Oe||pe===Oe&&ue<at)&&pt++,(Oe<pe||Oe===pe&&at<ue)&&Xe++)}z[ne*b+oe]=Xe,z[oe*b+ne]=pt}}return Ed(a,y,E),z}Ro.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=HS(this,y,1),E=this.tc[y],b=0;b<E;b++)for(var z=b;z<E;z++)a+=x[b*E+z];return a};function b0(a){for(var y=0,x=0;x<=a.Ia;x++){for(var E=a,b=x,z=Cd(E,b),ne=E.tc[b],re=0,oe=0;oe<ne;oe++){var le=z[oe].destinationEdgesArrayAccess;if(le!==null)for(var ue=0;ue<le.length;ue++){var pe=le[ue];if(pe.valid&&pe.toVertex.layer!==b){var xe=pe.fromVertex.column+pe.portFromColOffset,Ee=pe.toVertex.column+pe.portToColOffset;re+=(Math.abs(xe-Ee)+1)*gy(pe)}}}Ed(E,b,z),y+=re}return y}Ro.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 py(a,y,x){for(var E=Cd(a,y),b=a.tc[y],z=[],ne=0;ne<b;ne++){var re=E[ne],oe=null;0>=x&&(oe=re.sourceEdgesArrayAccess);var le=null;0<=x&&(le=re.destinationEdgesArrayAccess);var ue=0,pe=0,xe=re.near;if(xe!==null&&xe.layer===re.layer&&(ue+=xe.column-1,pe++),oe!==null)for(xe=0;xe<oe.length;xe++){re=oe[xe];var Ee=re.fromVertex;re.valid&&!re.rev&&Ee.layer!==y&&(ue+=Ee.column,pe++)}if(le!==null)for(oe=0;oe<le.length;oe++)re=le[oe],xe=re.toVertex,re.valid&&!re.rev&&xe.layer!==y&&(ue+=xe.column,pe++);z[ne]=pe===0?-1:ue/pe}return Ed(a,y,E),z}function WS(a,y,x){for(var E=Cd(a,y),b=a.tc[y],z=[],ne=0;ne<b;ne++){var re=E[ne],oe=null;0>=x&&(oe=re.sourceEdgesArrayAccess);var le=null;0<=x&&(le=re.destinationEdgesArrayAccess);var ue=0,pe=[],xe=re.near;if(xe!==null&&xe.layer===re.layer&&(pe[ue]=xe.column-1,ue++),re=void 0,oe!==null)for(xe=0;xe<oe.length;xe++){re=oe[xe];var Ee=re.fromVertex;re.valid&&!re.rev&&Ee.layer!==y&&(pe[ue]=Ee.column+re.portFromColOffset,ue++)}if(le!==null)for(oe=0;oe<le.length;oe++)re=le[oe],xe=re.toVertex,re.valid&&!re.rev&&xe.layer!==y&&(pe[ue]=xe.column+re.portToColOffset,ue++);ue===0?z[ne]=-1:(pe.sort(function(Fe,Oe){return Fe-Oe}),le=ue>>1,z[ne]=ue&1?pe[le]:pe[le-1]+pe[le]>>1)}return Ed(a,y,E),z}function Hp(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var ne=y.destinationEdges;ne.next();){var re=ne.value,oe=re.toVertex,le=y.layer-oe.layer;re=a.linkMinLength(re),le===re&&Hp(a,oe,x,E,b,z)}if(z)for(ne=y.sourceEdges;ne.next();)re=ne.value,oe=re.fromVertex,le=oe.layer-y.layer,re=a.linkMinLength(re),le===re&&Hp(a,oe,x,E,b,z)}}function my(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var ne=y.destinationEdges;ne.next();)my(a,ne.value.toVertex,x,E,b,z);if(z)for(y=y.sourceEdges;y.next();)my(a,y.value.fromVertex,x,E,b,z)}}Ro.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case Sy:a=this.network;var y=0,x=a.vertexes.count-1,E=[];E.length=x+1;for(var b=a.vertexes.iterator;b.next();)b.value.valid=!0;for(;zx(a)!==null;){for(b=GS(a);b!==null;)E[x]=b,x--,b.valid=!1,b=GS(a);for(b=$S(a);b!==null;)E[y]=b,y++,b.valid=!1,b=$S(a);b=null;for(var z=0,ne=this.network.vertexes.iterator;ne.next();){var re=ne.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++;(b===null||z<oe-le)&&(b=re,z=oe-le)}}b!==null&&(E[y]=b,y++,b.valid=!1)}for(y=0;y<a.vertexes.count;y++)E[y].index=y;for(E=a.edges.iterator;E.next();)y=E.value,y.fromVertex.index>y.toVertex.index&&(a.gm(y),y.rev=!0);break;case B0:for(E=this.network.vertexes.iterator;E.next();)a=E.value,a.Ll=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;for(this.Kn=0,E.reset();E.next();)y=E.value,y.sourceEdges.count===0&&vy(this,y);for(E.reset();E.next();)y=E.value,y.Ll===-1&&vy(this,y);for(a.reset();a.next();)E=a.value,E.forest||(y=E.fromVertex,x=y.finish,b=E.toVertex,z=b.finish,b.Ll<y.Ll&&x<z&&(this.network.gm(E),E.rev=!0));break;case Wp:for(a=this.network,y=a.vertexes.iterator,E=1/0;y.next();)E=Math.min(E,y.value.layer);if(1/0>E){if(0>E)for(y.reset();y.next();)y.value.layer-=E;for(E=[],y.reset();y.next();)x=y.value,b=E[x.layer],b===void 0?E[x.layer]=[x]:b.push(x);for(x=y=0;x<E.length;x++)if(b=E[x],!b||b.length===0)y++;else if(0<x)for(z=0;z<b.length;z++)b[z].layer-=y;for(E=a.edges.iterator;E.next();)y=E.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 GS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,E=y.destinationEdges;E.next();)if(E.value.toVertex.valid){x=!1;break}if(x)return y}}return null}function $S(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,E=y.sourceEdges;E.next();)if(E.value.fromVertex.valid){x=!1;break}if(x)return y}}return null}function vy(a,y){y.Ll=a.Kn,a.Kn++;for(var x=y.destinationEdges;x.next();){var E=x.value,b=E.toVertex;b.Ll===-1&&(E.forest=!0,vy(a,b))}y.finish=a.Kn,a.Kn++}Ro.prototype.assignLayers=function(){switch(this.Zk){case xy:KS(this);break;case Py:for(var a,y=this.network.vertexes.iterator;y.next();)a=US(this,y.value),this.Ia=Math.max(a,this.Ia);for(y.reset();y.next();)a=y.value,a.layer=this.Ia-a.layer;break;default:case N0:for(KS(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&YS(this,a);for(a=1/0,y.reset();y.next();)a=Math.min(a,y.value.layer);for(this.Ia=-1,y.reset();y.next();){var x=y.value;x.layer-=a,this.Ia=Math.max(this.Ia,x.layer)}}};function KS(a){for(var y=a.network.vertexes.iterator;y.next();){var x=VS(a,y.value);a.Ia=Math.max(x,a.Ia)}}function VS(a,y){var x=0;if(y.layer===-1){for(var E=y.destinationEdges;E.next();){var b=E.value,z=b.toVertex;b=a.linkMinLength(b),x=Math.max(x,VS(a,z)+b)}y.layer=x}else x=y.layer;return x}function US(a,y){var x=0;if(y.layer===-1){for(var E=y.sourceEdges;E.next();){var b=E.value,z=b.fromVertex;b=a.linkMinLength(b),x=Math.max(x,US(a,z)+b)}y.layer=x}else x=y.layer;return x}function YS(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)YS(a,x.value.toVertex);for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(var E=y.sourceEdgesArrayAccess,b=E.length,z=0;z<b;z++){var ne=E[z],re=ne.fromVertex,oe=ne.toVertex;ne=a.linkMinLength(ne),re.layer-oe.layer>ne&&Hp(a,re,0,-1,!0,!1)}for(Hp(a,y,1,-1,!0,!0);y.component!==0;){for(z=0,E=1/0,re=0,oe=null,ne=a.network.vertexes.iterator;ne.next();){var le=ne.value;if(le.component===1){var ue=0,pe=!1,xe=le.sourceEdgesArrayAccess;b=xe.length;for(var Ee=0;Ee<b;Ee++){var Fe=xe[Ee],Oe=Fe.fromVertex;ue+=1,Oe.component!==1&&(z+=1,Oe=Oe.layer-le.layer,Fe=a.linkMinLength(Fe),E=Math.min(E,Oe-Fe))}for(xe=le.destinationEdgesArrayAccess,b=xe.length,Ee=0;Ee<b;Ee++)Fe=xe[Ee].toVertex,--ue,Fe.component!==1?--z:pe=!0;(oe===null||ue<re)&&!pe&&(oe=le,re=ue)}}if(0<z){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer+=E);y.component=0}else oe.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(Hp(a,y,1,-1,!0,!1);y.component!==0;){for(E=0,b=1/0,z=0,re=null,oe=a.network.vertexes.iterator;oe.next();)if(ne=oe.value,ne.component===1){for(le=0,ue=!1,xe=ne.sourceEdgesArrayAccess,pe=xe.length,Ee=0;Ee<pe;Ee++)Fe=xe[Ee].fromVertex,le+=1,Fe.component!==1?E+=1:ue=!0;for(xe=ne.destinationEdgesArrayAccess,pe=xe.length,Ee=0;Ee<pe;Ee++)Fe=xe[Ee],Oe=Fe.toVertex,--le,Oe.component!==1&&(--E,Oe=ne.layer-Oe.layer,Fe=a.linkMinLength(Fe),b=Math.min(b,Oe-Fe));(re===null||le>z)&&!ue&&(re=ne,z=le)}if(0>E){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer-=b);y.component=0}else re.component=0}}}function XS(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}Ro.prototype.initializeIndices=function(){switch(this.Qk){default:case Cy:for(var a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;y.index=this.tc[x],this.tc[x]++}break;case k0: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&&JS(this,x);break;case wy:for(a=this.network.vertexes.iterator,y=0;y<=this.Ia;y++)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&QS(this,x)}};function JS(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 E=0;E<y.length-1;E++){var b=y[E],z=y[E+1];b.portFromColOffset>z.portFromColOffset&&(x=!0,y[E]=z,y[E+1]=b)}}for(x=0;x<y.length;x++)E=y[x],E.valid&&(E=E.toVertex,E.index===-1&&JS(a,E))}function QS(a,y){var x=y.layer;y.index=a.tc[x],a.tc[x]++,y=y.sourceEdgesArrayAccess;for(var E=!0;E;)for(E=!1,x=0;x<y.length-1;x++){var b=y[x],z=y[x+1];b.portToColOffset>z.portToColOffset&&(E=!0,y[x]=z,y[x+1]=b)}for(x=0;x<y.length;x++)E=y[x],E.valid&&(E=E.fromVertex,E.index===-1&&QS(a,E))}Ro.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=Tl(this),x,E;for(x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)M0(this,E,1),Ku(this,E,1);var b=this.countCrossings();for(b<a&&(a=b,y=Tl(this)),E=this.Ia;0<=E;E--)M0(this,E,-1),Ku(this,E,-1);b=this.countCrossings(),b<a&&(a=b,y=Tl(this))}for(Tu(this,y),x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)M0(this,E,0),Ku(this,E,0);for(b=this.countCrossings(),b<a&&(a=b,y=Tl(this)),E=this.Ia;0<=E;E--)M0(this,E,0),Ku(this,E,0);b=this.countCrossings(),b<a&&(a=b,y=Tl(this))}Tu(this,y);var z,ne,re;switch(this.rk){case Ey:break;case by:for(re=a+1;(E=this.countCrossings())<re;)for(re=E,x=this.Ia;0<=x;x--)for(ne=0;ne<=x;ne++){for(z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Ku(this,E,-1)||z;for(b=this.countCrossings(),b>=a?Tu(this,y):(a=b,y=Tl(this)),z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Ku(this,E,1)||z;for(b=this.countCrossings(),b>=a?Tu(this,y):(a=b,y=Tl(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Ku(this,E,1)||z;for(b>=a?Tu(this,y):(a=b,y=Tl(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Ku(this,E,-1)||z;for(b>=a?Tu(this,y):(a=b,y=Tl(this)),z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Ku(this,E,0)||z;for(b>=a?Tu(this,y):(a=b,y=Tl(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Ku(this,E,0)||z;b>=a?Tu(this,y):(a=b,y=Tl(this))}break;default:case A0:for(x=this.Ia,ne=0,re=a+1;(E=this.countCrossings())<re;){for(re=E,z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Ku(this,E,-1)||z;for(b=this.countCrossings(),b>=a?Tu(this,y):(a=b,y=Tl(this)),z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Ku(this,E,1)||z;for(b=this.countCrossings(),b>=a?Tu(this,y):(a=b,y=Tl(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Ku(this,E,1)||z;for(b>=a?Tu(this,y):(a=b,y=Tl(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Ku(this,E,-1)||z;for(b>=a?Tu(this,y):(a=b,y=Tl(this)),z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Ku(this,E,0)||z;for(b>=a?Tu(this,y):(a=b,y=Tl(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Ku(this,E,0)||z;b>=a?Tu(this,y):(a=b,y=Tl(this))}}Tu(this,y)};function M0(a,y,x){var E=Cd(a,y),b=a.tc[y],z=WS(a,y,x),ne=py(a,y,x);for(x=0;x<b;x++)ne[x]===-1&&(ne[x]=E[x].column),z[x]===-1&&(z[x]=E[x].column);for(var re=!0,oe;re;)for(re=!1,x=0;x<b-1;x++)(z[x+1]<z[x]||z[x+1]===z[x]&&ne[x+1]<ne[x])&&(re=!0,oe=z[x],z[x]=z[x+1],z[x+1]=oe,oe=ne[x],ne[x]=ne[x+1],ne[x+1]=oe,oe=E[x],E[x]=E[x+1],E[x+1]=oe);for(x=z=0;x<b;x++)oe=E[x],oe.index=x,z+=a.nodeMinColumnSpace(oe,!0),oe.column=z,z+=1,z+=a.nodeMinColumnSpace(oe,!1);Ed(a,y,E)}function Ku(a,y,x){var E=Cd(a,y),b=a.tc[y];x=HS(a,y,x);var z,ne=[];for(z=0;z<b;z++)ne[z]=-1;var re=[];for(z=0;z<b;z++)re[z]=-1;for(var oe=!1,le=!0;le;)for(le=!1,z=0;z<b-1;z++){var ue=x[E[z].index*b+E[z+1].index],pe=x[E[z+1].index*b+E[z].index],xe=0,Ee=0,Fe=E[z].column,Oe=E[z+1].column,at=a.nodeMinColumnSpace(E[z],!0),Xe=a.nodeMinColumnSpace(E[z],!1),pt=a.nodeMinColumnSpace(E[z+1],!0),wt=a.nodeMinColumnSpace(E[z+1],!1);at=Fe-at+pt,Xe=Oe-Xe+wt;var Mt=E[z].sourceEdges.iterator;for(Mt.reset();Mt.next();)if(pt=Mt.value,wt=pt.fromVertex,pt.valid&&wt.layer===y){for(pt=0;E[pt]!==wt;)pt++;pt<z&&(xe+=2*(z-pt),Ee+=2*(z+1-pt)),pt===z+1&&(xe+=1),pt>z+1&&(xe+=4*(pt-z),Ee+=4*(pt-(z+1)))}for(Mt=E[z].destinationEdges.iterator,Mt.reset();Mt.next();)if(pt=Mt.value,wt=pt.toVertex,pt.valid&&wt.layer===y){for(pt=0;E[pt]!==wt;)pt++;pt===z+1&&(Ee+=1)}for(Mt=E[z+1].sourceEdges.iterator,Mt.reset();Mt.next();)if(pt=Mt.value,wt=pt.fromVertex,pt.valid&&wt.layer===y){for(pt=0;E[pt]!==wt;)pt++;pt<z&&(xe+=2*(z+1-pt),Ee+=2*(z-pt)),pt===z&&(Ee+=1),pt>z+1&&(xe+=4*(pt-(z+1)),Ee+=4*(pt-z))}for(Mt=E[z+1].destinationEdges.iterator,Mt.reset();Mt.next();)if(pt=Mt.value,wt=pt.toVertex,pt.valid&&wt.layer===y){for(pt=0;E[pt]!==wt;)pt++;pt===z&&(xe+=1)}pt=wt=0,Mt=ne[E[z].index];var It=re[E[z].index],qt=ne[E[z+1].index],ei=re[E[z+1].index];Mt!==-1&&(wt+=Math.abs(Mt-Fe),pt+=Math.abs(Mt-Xe)),It!==-1&&(wt+=Math.abs(It-Fe),pt+=Math.abs(It-Xe)),qt!==-1&&(wt+=Math.abs(qt-Oe),pt+=Math.abs(qt-at)),ei!==-1&&(wt+=Math.abs(ei-Oe),pt+=Math.abs(ei-at)),(Ee<xe-.5||Ee===xe&&pe<ue-.5||Ee===xe&&pe===ue&&pt<wt-.5)&&(le=oe=!0,E[z].column=Xe,E[z+1].column=at,ue=E[z],E[z]=E[z+1],E[z+1]=ue)}for(z=0;z<b;z++)E[z].index=z;return Ed(a,y,E),oe}Ro.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&Vx)!==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 E,b=this.network.vertexes.iterator;b.next();){var z=b.value;y=z.layer,E=z.column,z=this.nodeMinColumnSpace(z,!1),x[y]=Math.max(x[y],E+z)}for(b.reset();b.next();)z=b.value,y=z.layer,E=z.column,z.column=(8*(this.Ra-x[y])>>1)+8*E;this.Ra*=8}if(this.bg&2)for(x=!0;x;){for(x=!1,y=this.Md+1;y<=this.Ia;y++)x=Ng(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Ng(this,y,-1)||x;x=Ng(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)yy(this,y,1);for(y=this.Md-1;0<=y;y--)yy(this,y,-1);yy(this,this.Md,0)}if(a&&(qS(this,-1),qS(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=Ng(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Ng(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Ng(this,y,0)||x}}else Wx(this)};function Ng(a,y,x){for(var E=!1;_x(a,y,x);)E=!0;return E}function _x(a,y,x){var E,b=Cd(a,y),z=a.tc[y],ne=py(a,y,-1);if(0<x)for(E=0;E<z;E++)ne[E]=-1;var re=py(a,y,1);if(0>x)for(E=0;E<z;E++)re[E]=-1;for(var oe=!1,le=!0;le;)for(le=!1,E=0;E<z;E++){var ue=b[E].column,pe=a.nodeMinColumnSpace(b[E],!0),xe=a.nodeMinColumnSpace(b[E],!1),Ee=0;0>E-1||ue-b[E-1].column-1>pe+a.nodeMinColumnSpace(b[E-1],!1)?Ee=ue-1:Ee=ue,pe=E+1>=z||b[E+1].column-ue-1>xe+a.nodeMinColumnSpace(b[E+1],!0)?ue+1:ue;var Fe=xe=0,Oe=0;if(0>=x)for(var at=b[E].sourceEdges.iterator;at.next();){var Xe=at.value,pt=Xe.fromVertex;if(Xe.valid&&pt.layer!==y){var wt=gy(Xe),Mt=Xe.portFromColOffset;Xe=Xe.portToColOffset,pt=pt.column,xe+=(Math.abs(ue+Xe-(pt+Mt))+1)*wt,Fe+=(Math.abs(Ee+Xe-(pt+Mt))+1)*wt,Oe+=(Math.abs(pe+Xe-(pt+Mt))+1)*wt}}if(0<=x)for(at=b[E].destinationEdges.iterator;at.next();)Xe=at.value,pt=Xe.toVertex,Xe.valid&&pt.layer!==y&&(wt=gy(Xe),Mt=Xe.portFromColOffset,Xe=Xe.portToColOffset,pt=pt.column,xe+=(Math.abs(ue+Mt-(pt+Xe))+1)*wt,Fe+=(Math.abs(Ee+Mt-(pt+Xe))+1)*wt,Oe+=(Math.abs(pe+Mt-(pt+Xe))+1)*wt);Xe=Mt=wt=0,at=ne[b[E].index],pt=re[b[E].index],at!==-1&&(wt+=Math.abs(at-ue),Mt+=Math.abs(at-Ee),Xe+=Math.abs(at-pe)),pt!==-1&&(wt+=Math.abs(pt-ue),Mt+=Math.abs(pt-Ee),Xe+=Math.abs(pt-pe)),Fe<xe||Fe===xe&&Mt<wt?(le=oe=!0,b[E].column=Ee):(Oe<xe||Oe===xe&&Xe<wt)&&(le=oe=!0,b[E].column=pe)}return Ed(a,y,b),a.normalize(),oe}function yy(a,y,x){var E=Cd(a,y),b=a.tc[y],z=WS(a,y,x),ne=[];for(x=0;x<b;x++)ne[x]=z[x];for(z=!0;z;)for(z=!1,x=0;x<b;x++){var re=E[x].column,oe=a.nodeMinColumnSpace(E[x],!0),le=a.nodeMinColumnSpace(E[x],!1),ue=0;if(ne[x]===-1)if(x===0&&x===b-1)ue=re;else if(x===0){var pe=E[x+1].column;pe-re===le+a.nodeMinColumnSpace(E[x+1],!0)?ue=re-1:ue=re}else x===b-1?(pe=E[x-1].column,ue=re-pe===oe+a.nodeMinColumnSpace(E[x-1],!1)?re+1:re):(pe=E[x-1].column,oe=pe+a.nodeMinColumnSpace(E[x-1],!1)+oe+1,pe=E[x+1].column,le=pe-a.nodeMinColumnSpace(E[x+1],!0)-le-1,ue=(oe+le)/2|0);else x===0&&x===b-1?ue=ne[x]:x===0?(pe=E[x+1].column,le=pe-a.nodeMinColumnSpace(E[x+1],!0)-le-1,ue=Math.min(ne[x],le)):x===b-1?(pe=E[x-1].column,oe=pe+a.nodeMinColumnSpace(E[x-1],!1)+oe+1,ue=Math.max(ne[x],oe)):(pe=E[x-1].column,oe=pe+a.nodeMinColumnSpace(E[x-1],!1)+oe+1,pe=E[x+1].column,le=pe-a.nodeMinColumnSpace(E[x+1],!0)-le-1,oe<ne[x]&&ne[x]<le?ue=ne[x]:oe>=ne[x]?ue=oe:le<=ne[x]&&(ue=le));ue!==re&&(z=!0,E[x].column=ue)}Ed(a,y,E),a.normalize()}function Zx(a,y){for(var x=!0,E=a.network.vertexes.iterator;E.next();){var b=E.value,z=a.nodeMinColumnSpace(b,!0),ne=a.nodeMinColumnSpace(b,!1);if(b.column-z<=y&&b.column+ne>=y){x=!1;break}}if(a=!1,x)for(E.reset();E.next();)x=E.value,x.column>y&&(--x.column,a=!0);return a}function Hx(a,y){var x=y+1,E,b=[],z=[];for(E=0;E<=a.Ia;E++)b[E]=!1,z[E]=!1;for(var ne=a.network.vertexes.iterator;ne.next();){E=ne.value;var re=E.column-a.nodeMinColumnSpace(E,!0),oe=E.column+a.nodeMinColumnSpace(E,!1);re<=y&&oe>=y&&(b[E.layer]=!0),re<=x&&oe>=x&&(z[E.layer]=!0)}for(re=!0,x=!1,E=0;E<=a.Ia;E++)re=re&&!(b[E]&&z[E]);if(re)for(ne.reset();ne.next();)a=ne.value,a.column>y&&(--a.column,x=!0);return x}function qS(a,y){for(var x=0;x<=a.Ra;x++)for(;Zx(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;Hx(a,x););a.normalize();var E;if(0<y)for(x=0;x<=a.Ra;x++){var b=Tl(a),z=b0(a);for(E=z+1;z<E;){E=z,ex(a,x,1);var ne=b0(a);ne>z?Tu(a,b):ne<z&&(z=ne,b=Tl(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(b=Tl(a),z=b0(a),E=z+1;z<E;)E=z,ex(a,x,-1),ne=b0(a),ne>z?Tu(a,b):ne<z&&(z=ne,b=Tl(a));a.normalize()}function ex(a,y,x){a.le=0;for(var E=a.network.vertexes.iterator;E.next();)E.value.component=-1;if(0<x)for(E.reset();E.next();){var b=E.value;b.column-a.nodeMinColumnSpace(b,!0)<=y&&(b.component=a.le)}if(0>x)for(E.reset();E.next();)b=E.value,b.column+a.nodeMinColumnSpace(b,!1)>=y&&(b.component=a.le);for(a.le++,E.reset();E.next();)y=E.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(b=[],z=0;z<(a.Ia+1)*(a.Ra+1);z++)b[z]=-1;for(E.reset();E.next();){z=E.value;for(var ne=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++)b[ne*(a.Ra+1)+re]=z.component}for(z=0;z<=a.Ia;z++){if(0<x)for(ne=0;ne<a.Ra;ne++)b[z*(a.Ra+1)+ne]!==-1&&b[z*(a.Ra+1)+ne+1]!==-1&&b[z*(a.Ra+1)+ne]!==b[z*(a.Ra+1)+ne+1]&&(y[b[z*(a.Ra+1)+ne]*a.le+b[z*(a.Ra+1)+ne+1]]=!0);if(0>x)for(ne=a.Ra;0<ne;ne--)b[z*(a.Ra+1)+ne]!==-1&&b[z*(a.Ra+1)+ne-1]!==-1&&b[z*(a.Ra+1)+ne]!==b[z*(a.Ra+1)+ne-1]&&(y[b[z*(a.Ra+1)+ne]*a.le+b[z*(a.Ra+1)+ne-1]]=!0)}for(b=[],z=0;z<a.le;z++)b[z]=!0;for(ne=[],ne.push(0);ne.length!==0;)if(oe=ne[ne.length-1],ne.pop(),b[oe])for(b[oe]=!1,z=0;z<a.le;z++)y[oe*a.le+z]&&ne.splice(0,0,z);if(0<x)for(E.reset();E.next();)a=E.value,b[a.component]&&--a.column;if(0>x)for(E.reset();E.next();)x=E.value,b[x.component]&&(x.column+=1)}function Wx(a){for(var y=qn(),x=a.fl.length,E=0;E<=x;E++)y[E]=[];for(E=a.network.vertexes.iterator;E.next();){var b=E.value;y[x-b.layer][b.index]=b}x=new Ln,Gx(y,x);var z=null,ne=null,re=null,oe=null,le=(a.ve&1)!==0,ue=(a.ve&2)!==0,pe=(a.ve&4)!==0,xe=(a.ve&8)!==0;for(le&&(a.verticalAlignment(y,x,!0),z=L0(a,y,!0,!1)),y.reverse(),pe&&(a.verticalAlignment(y,x,!1),re=L0(a,y,!1,!1)),E=Hi(y),b=E.next();!b.done;b=E.next())b.value.reverse();xe&&(a.verticalAlignment(y,x,!1),oe=L0(a,y,!1,!0)),y.reverse(),ue&&(a.verticalAlignment(y,x,!0),ne=L0(a,y,!0,!0)),di(y),a.u(z,ne,re,oe),a.network.vertexes.each(function(Ee){var Fe=qn();le&&Fe.push(z.get(Ee)),ue&&Fe.push(ne.get(Ee)),pe&&Fe.push(re.get(Ee)),xe&&Fe.push(oe.get(Ee)),Fe.sort(function(at,Xe){return at-Xe});var Oe=Fe.length;Oe=(Fe[Math.floor((Oe-1)/2)]+Fe[Math.ceil((Oe-1)/2)])/2,di(Fe),Ee.zc=Oe})}function Gx(a,y){for(var x=a.length,E=1;E<x-1;E++)for(var b=0,z=0,ne=a[E],re=a[E+1],oe=0;z<re.length;oe++){var le=re[oe];e:{if(le.node===null){var ue=My(le);if(0<ue.length){ue=ue[0].node===null;break e}}ue=!1}var pe=ue;if(oe===re.length-1||pe){for(ue=ne.length-1,pe&&(ue=My(le)[0].index);z<=oe;){if(le=re[z],!le.bo){pe=[];for(var xe=Hi(le.sourceEdgesArrayAccess),Ee=xe.next();!Ee.done;Ee=xe.next())Ee=Ee.value,Ee.valid&&pe.push(Ee);le.bo=pe}for(le=Hi(le.bo),pe=le.next();!pe.done;pe=le.next())pe=pe.value,xe=pe.fromVertex.index,(xe<b||xe>ue)&&y.add(pe);z++}b=ue}}}Ro.prototype.verticalAlignment=function(a,y,x){$x(a),a=Hi(a);for(var E=a.next();!E.done;E=a.next()){var b=-1;E=Hi(E.value);for(var z=E.next();!z.done;z=E.next()){z=z.value;var ne=x?My(z):Ux(z),re=ne.length;if(0<re){ne.sort(function(pe,xe){return pe.vi-xe.vi});var oe=(re-1)/2;for(re=Math.floor(oe),oe=Math.ceil(oe);re<=oe;re++)if(z.align===z){var le=ne[re],ue=void 0;ue=x?T0(le,z):T0(z,le),!y.contains(ue)&&b<le.vi&&(le.align=z,z.root=le.root,z.align=le.root,b=le.vi)}}}}};function $x(a){for(var y=0;y<a.length;y++)for(var x=a[y],E=0;E<x.length;E++){var b=x[E];b.root=b,b.align=b,b.Tz=y,b.vi=E}}function L0(a,y,x,E){for(var b=a.K===90||a.K===270,z=Hi(y),ne=z.next();!ne.done;ne=z.next()){var re=Hi(ne.value);for(ne=re.next();!ne.done;ne=re.next())ne=ne.value,ne.sd=ne,ne.shift=1/0,ne.zc=NaN,ne.qg=0}for(ne=a.K===90||a.K===270,z=Hi(y),re=z.next();!re.done;re=z.next()){re=Hi(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 pe=ue.align,xe=ne?ue.width:ue.height,Ee=ne?pe.width:pe.height;if(x){var Fe=T0(ue,pe),Oe=Fe.portFromPos,at=Fe.portToPos;Fe.link!==null&&(ue.node&&ue.node!==Fe.link.fromNode&&(Oe=ne?ue.focusX:ue.focusY),pe.node&&pe.node!==Fe.link.toNode&&(at=ne?pe.focusX:pe.focusY))}else Fe=T0(pe,ue),Oe=Fe.portToPos,at=Fe.portFromPos,Fe.link!==null&&(ue.node&&ue.node!==Fe.link.toNode&&(Oe=ne?ue.focusX:ue.focusY),pe.node&&pe.node!==Fe.link.fromNode&&(at=ne?pe.focusX:pe.focusY));xe=E?ue.qg+(xe-Oe)-(Ee-at):ue.qg+Oe-at,pe.qg=xe,le=Math.min(le,xe),ue=ue.align}ue=oe;do ue.qg=ue.qg-le,ue=ue.align;while(ue!==oe)}}for(x=Hi(y),ne=x.next();!ne.done;ne=x.next())for(z=Hi(ne.value),ne=z.next();!ne.done;ne=z.next())ne=ne.value,ne.root===ne&&tx(a,ne,y);for(x=0;x<y.length;x++)if(!(0>=y[x].length)&&(ne=y[x][0],ne.sd===ne)){ne.sd.shift===1/0&&(ne.sd.shift=0),ne=x,re=0;do{for(z=y[ne][re];z.align!==z.root;)z=z.align,ne++,0<z.vi&&(re=nx(z,y),re.sd.shift=Math.min(re.sd.shift,z.sd.shift+z.zc+z.qg-(re.zc+re.qg+(b?re.width:re.height)+a.columnSpacing)));re=z.vi+1}while(ne<y.length&&re<y[ne].length&&z.sd===y[ne][re].sd)}for(a=new xi,y=Hi(y),ne=y.next();!ne.done;ne=y.next())for(x=Hi(ne.value),ne=x.next();!ne.done;ne=x.next())ne=ne.value,ne.zc=ne.zc+ne.sd.shift+ne.qg,z=b?ne.width:ne.height,a.add(ne,E?-ne.zc-z:ne.zc);return a}function tx(a,y,x){if(isNaN(y.zc)){y.zc=0;var E=y;do{if(0<E.vi){var b=nx(E,x),z=b.root;tx(a,z,x),y.sd===y&&(y.sd=z.sd);var ne=a.K===90||a.K===270?b.width:b.height;y.sd===z.sd&&(y.zc=Math.max(y.zc,z.zc+b.qg+ne-E.qg+a.columnSpacing))}E=E.align}while(E!==y);for(;E.align!==y;)E=E.align,E.zc=y.zc,E.sd=y.sd}}function nx(a,y){var x=a.Tz;return a=a.vi,1>a&&yt("Could not determine previous vertex in layer"),y[x][a-1]}Ro.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var E=qn(),b=qn(),z=1/0,ne=0;4>ne;ne++)if(y[ne]){var re=Kx(this,y[ne],E,b,ne);re<z&&(x=ne,z=re)}for(z={},ne=0;4>ne;z={delta:z.delta},ne++)y[ne]&&(z.delta=ne===0||ne===2?E[x]-E[ne]:b[x]-b[ne],z.delta!==0&&y[ne].each(function(oe){return function(le){le.value+=oe.delta}}(z)));di(E),di(b)};function Kx(a,y,x,E,b){if(!y||y.count===0)return x[b]=0,E[b]=0,1/0;var z=1/0,ne=-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>ne&&(ne=re+oe)}),x[b]=z,E[b]=ne,ne-z}Ro.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=F0(this,!0),y=F0(this,!1),x=this.network.edges.iterator;x.next();){var E=x.value.link;E!==null&&(E.fromSpot=a,E.toSpot=y)}this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()};function F0(a,y){return a.K===270?y?Aa:Ka:a.K===90?y?Ka:Aa:a.K===180?y?za:rs:y?rs:za}Ro.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 E=0;E<=this.Ia;E++){var b=x;0>=this.he[E]+this.Ld[E]&&(b=0),0<E&&(y+=b/2),this.K===90||this.K===0?(y+=this.Ld[E],this.Kd[E]=y,y+=this.he[E]):(y+=this.he[E],this.Kd[E]=y,y+=this.Ld[E]),E<this.Ia&&(y+=b/2),this.Ta[E]=y}for(x=y,y=this.arrangementOrigin,E=0;E<=this.Ia;E++)this.K===270?this.Kd[E]=y.y+this.Kd[E]:this.K===90?(this.Kd[E]=y.y+x-this.Kd[E],this.Ta[E]=x-this.Ta[E]):this.K===180?this.Kd[E]=y.x+this.Kd[E]:(this.Kd[E]=y.x+x-this.Kd[E],this.Ta[E]=x-this.Ta[E]);x=this.ve!==0,a.reset(),E=this.K===270||this.K===90;for(var z=1/0,ne=b=1/0,re=-1/0;a.next();){var oe=a.value,le=oe.layer,ue=oe.column|0;E?(ne=y.x+this.kc*ue,le=this.Kd[le]):(ne=this.Kd[le],le=y.y+this.kc*ue),oe.centerX=ne,oe.centerY=le,x&&isFinite(oe.zc)&&(E?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),b=Math.min(oe.y,b),E?(ne=z,re=Math.max(re,oe.bounds.right)):(ne=b,re=Math.max(re,oe.bounds.bottom))}for(this.xw=re-ne,z=y.x-z,y=y.y-b,this.Rf=new tt(x&&E?0:z,x&&!E?0:y),a.reset();a.next();)x=a.value,x.x+=z,x.y+=y,x.commit()},Ro.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 E=this.maxLayer;0<=E;E--)this.K===270?E===0?y.push(new gn(0,0,x,Math.abs(this.Ta[0]))):y.push(new gn(0,this.Ta[E-1],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===90?E===0?y.push(new gn(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new gn(0,this.Ta[E],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===180?E===0?y.push(new gn(0,0,Math.abs(this.Ta[0]),x)):y.push(new gn(this.Ta[E-1],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x)):E===0?y.push(new gn(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new gn(this.Ta[E],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x));this.commitLayers(y,this.Rf)},Ro.prototype.commitLayers=function(){},Ro.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 E=y,b=E.fromNode,z=E.toNode,ne=E.fromPort,re=E.toPort;if(b!==null){var oe=b.findVisibleNode();oe!==null&&oe!==b&&(b=oe,ne=oe.port)}z!==null&&(oe=z.findVisibleNode(),oe!==null&&oe!==z&&(z=oe,re=oe.port));var le=y.computeSpot(!0,ne);oe=y.computeSpot(!1,re);var ue=x.fromVertex,pe=x.toVertex;if(x.valid)y.curve===pu&&y.pointsCount===4&&(ue.column===pe.column&&this.alignOption===0?(x=y.getLinkPoint(b,ne,le,!0,!1,z,re),re=y.getLinkPoint(z,re,oe,!1,!1,b,ne),x.w()||x.set(b.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=E=!1,ne!==null&&le===Fa&&(E=!0),re!==null&&oe===Fa&&(x=!0),(E||x)&&(oe=null,E&&(oe=y.getLinkPointFromPoint(b,ne,ne.ga(Qr),y.i(3),!0),oe.w()||oe.set(b.actualBounds.center),y.L(0,oe.x,oe.y)),b=null,x&&(b=y.getLinkPointFromPoint(z,re,re.ga(Qr),y.i(0),!1),b.w()||b.set(z.actualBounds.center),y.L(3,b.x,b.y)),oe&&(z=y.i(2),y.L(1,(2*oe.x+z.x)/3,(2*oe.y+z.y)/3)),b&&(z=y.i(1),y.L(2,(2*b.x+z.x)/3,(2*b.y+z.y)/3))))),y.zf();else if(ue.layer===pe.layer)y.zf();else{var xe=!1,Ee=!1,Fe=this.ie,Oe=y.firstPickIndex+1;if(y.isOrthogonal){Ee=!0;var at=y.pointsCount;4<at&&y.points.removeRange(2,at-3)}else if(y.curve===pu)xe=!0,at=y.pointsCount,4<at&&y.points.removeRange(2,at-3),at===4&&(Oe=2);else{at=y.pointsCount;var Xe=le===Fa,pt=oe===Fa;2<at&&Xe&&pt?y.points.removeRange(1,at-2):3<at&&Xe&&!pt?y.points.removeRange(1,at-3):3<at&&!Xe&&pt?y.points.removeRange(2,at-2):4<at&&!Xe&&!pt&&y.points.removeRange(2,at-3)}if(x.rev){for(;pe!==null&&ue!==pe;){var wt=at=null;for(Xe=pe.sourceEdges.iterator;Xe.next()&&(pt=Xe.value,pt.link!==x.link||(at=pt.fromVertex,wt=pt.toVertex,at.node!==null)););if(at===null)break;if(at!==ue){Xe=y.i(Oe-1).x,pt=y.i(Oe-1).y;var Mt=at.centerX,It=at.centerY;if(Ee)this.K===180||this.K===0?Oe===y.firstPickIndex+1?(y.m(Oe++,Xe,pt),y.m(Oe++,Xe,It)):(wt!==null?wt.centerY:pt)!==It&&(wt=this.Ta[at.layer-1]+this.Rf.x,y.m(Oe++,wt,pt),y.m(Oe++,wt,It)):Oe===y.firstPickIndex+1?(y.m(Oe++,Xe,pt),y.m(Oe++,Mt,pt)):(wt!==null?wt.centerX:Xe)!==Mt&&(wt=this.Ta[at.layer-1]+this.Rf.y,y.m(Oe++,Xe,wt),y.m(Oe++,Mt,wt));else if(Oe===y.firstPickIndex+1){wt=Math.max(10,this.he[pe.layer]);var qt=Math.max(10,this.Ld[pe.layer]);if(xe)this.K===180?Mt<=pe.bounds.x?(pe=pe.bounds.x,y.m(Oe++,pe-wt,It),y.m(Oe++,pe,It),y.m(Oe++,pe+qt,It)):(y.m(Oe++,Mt-wt,It),y.m(Oe++,Mt,It),y.m(Oe++,Mt+qt,It)):this.K===90?It>=pe.bounds.bottom?(pe=pe.bounds.y+pe.bounds.height,y.m(Oe++,Mt,pe+qt),y.m(Oe++,Mt,pe),y.m(Oe++,Mt,pe-wt)):(y.m(Oe++,Mt,It+qt),y.m(Oe++,Mt,It),y.m(Oe++,Mt,It-wt)):this.K===270?It<=pe.bounds.y?(pe=pe.bounds.y,y.m(Oe++,Mt,pe-wt),y.m(Oe++,Mt,pe),y.m(Oe++,Mt,pe+qt)):(y.m(Oe++,Mt,It-wt),y.m(Oe++,Mt,It),y.m(Oe++,Mt,It+qt)):this.K===0&&(Mt>=pe.bounds.right?(pe=pe.bounds.x+pe.bounds.width,y.m(Oe++,pe+qt,It),y.m(Oe++,pe,It),y.m(Oe++,pe-wt,It)):(y.m(Oe++,Mt+qt,It),y.m(Oe++,Mt,It),y.m(Oe++,Mt-wt,It)));else{y.m(Oe++,Xe,pt);var ei=0;this.K===180||this.K===0?((this.K===180?Mt>=pe.bounds.right:Mt<=pe.bounds.x)&&(ei=(this.K===0?-wt:qt)/2),y.m(Oe++,Xe+ei,It)):((this.K===270?It>=pe.bounds.bottom:It<=pe.bounds.y)&&(ei=(this.K===90?-wt:qt)/2),y.m(Oe++,Mt,pt+ei)),y.m(Oe++,Mt,It)}}else wt=Math.max(10,this.he[at.layer]),qt=Math.max(10,this.Ld[at.layer]),xe?this.K===180?(y.m(Oe++,Mt-wt-Fe,It),y.m(Oe++,Math.min(Mt-wt+Fe/2,Mt),It),y.m(Oe++,Mt,It),y.m(Oe++,Mt,It),y.m(Oe++,Math.max(Mt+qt-Fe/2,Mt),It),y.m(Oe++,Mt+qt+Fe,It)):this.K===90?(y.m(Oe++,Mt,It+qt+Fe),y.m(Oe++,Mt,Math.max(It+qt-Fe/2,It)),y.m(Oe++,Mt,It),y.m(Oe++,Mt,It),y.m(Oe++,Mt,Math.min(It-wt+Fe/2,It)),y.m(Oe++,Mt,It-wt-Fe)):this.K===270?(y.m(Oe++,Mt,It-wt-Fe),y.m(Oe++,Mt,Math.min(It-wt+Fe/2,It)),y.m(Oe++,Mt,It),y.m(Oe++,Mt,It),y.m(Oe++,Mt,Math.max(It+qt-Fe/2,It)),y.m(Oe++,Mt,It+qt+Fe)):(y.m(Oe++,Mt+qt+Fe,It),y.m(Oe++,Math.max(Mt+qt-Fe/2,Mt),It),y.m(Oe++,Mt,It),y.m(Oe++,Mt,It),y.m(Oe++,Math.min(Mt-wt+Fe/2,Mt),It),y.m(Oe++,Mt-wt-Fe,It)):y.m(Oe++,Mt,It)}pe=at}(re===null||le!==Fa||Ee)&&(Xe=y.i(Oe-1).x,pt=y.i(Oe-1).y,Mt=y.i(Oe).x,It=y.i(Oe).y,Ee?(Fe=this.Ld[ue.layer],this.K===180||this.K===0?(Ee=pt,Ee>=ue.bounds.y&&Ee<=ue.bounds.bottom&&(this.K===180?Mt>=ue.bounds.x:Mt<=ue.bounds.right)&&(pe=ue.centerX+(this.K===180?-Fe:Fe),Ee<ue.bounds.y+ue.bounds.height/2?Ee=ue.bounds.y-this.kc/2:Ee=ue.bounds.bottom+this.kc/2,y.m(Oe++,pe,pt),y.m(Oe++,pe,Ee)),y.m(Oe++,Mt,Ee)):(Ee=Xe,Ee>=ue.bounds.x&&Ee<=ue.bounds.right&&(this.K===270?It>=ue.bounds.y:It<=ue.bounds.bottom)&&(pe=ue.centerY+(this.K===270?-Fe:Fe),Ee<ue.bounds.x+ue.bounds.width/2?Ee=ue.bounds.x-this.kc/2:Ee=ue.bounds.right+this.kc/2,y.m(Oe++,Xe,pe),y.m(Oe++,Ee,pe)),y.m(Oe++,Ee,It)),y.m(Oe++,Mt,It)):xe?(wt=Math.max(10,this.he[ue.layer]),qt=Math.max(10,this.Ld[ue.layer]),this.K===180&&Mt>=ue.bounds.x?(pe=ue.bounds.x+ue.bounds.width,y.L(Oe-2,pe,pt),y.L(Oe-1,pe+qt,pt)):this.K===90&&It<=ue.bounds.bottom?(pe=ue.bounds.y,y.L(Oe-2,Xe,pe),y.L(Oe-1,Xe,pe-wt)):this.K===270&&It>=ue.bounds.y?(pe=ue.bounds.y+ue.bounds.height,y.L(Oe-2,Xe,pe),y.L(Oe-1,Xe,pe+qt)):this.K===0&&Mt<=ue.bounds.right&&(pe=ue.bounds.x,y.L(Oe-2,pe,pt),y.L(Oe-1,pe-wt,pt))):(wt=Math.max(10,this.he[ue.layer]),qt=Math.max(10,this.Ld[ue.layer]),Ee=0,this.K===180||this.K===0?((this.K===180?Mt<=ue.bounds.x:Mt>=ue.bounds.right)&&(Ee=(this.K===0?qt:-wt)/2),y.m(Oe++,Mt+Ee,pt)):((this.K===270?It<=ue.bounds.y:It>=ue.bounds.bottom)&&(Ee=(this.K===90?qt:-wt)/2),y.m(Oe++,Xe,It+Ee)),y.m(Oe++,Mt,It)))}else{for(;ue!==null&&ue!==pe;){for(wt=at=null,ue=ue.destinationEdges.iterator;ue.next()&&(Xe=ue.value,Xe.link!==x.link||(at=Xe.toVertex,wt=Xe.fromVertex,wt.node!==null&&(wt=null),at.node!==null)););if(at===null)break;at!==pe&&(Xe=y.i(Oe-1).x,pt=y.i(Oe-1).y,Mt=at.centerX,It=at.centerY,Ee?this.K===180||this.K===0?(wt!==null?wt.centerY:pt)!==It&&(wt=this.Ta[at.layer]+this.Rf.x,Oe===y.firstPickIndex+1&&(wt=this.K===0?Math.max(wt,Xe):Math.min(wt,Xe)),y.m(Oe++,wt,pt),y.m(Oe++,wt,It)):(wt!==null?wt.centerX:Xe)!==Mt&&(wt=this.Ta[at.layer]+this.Rf.y,Oe===y.firstPickIndex+1&&(wt=this.K===90?Math.max(wt,pt):Math.min(wt,pt)),y.m(Oe++,Xe,wt),y.m(Oe++,Mt,wt)):(wt=Math.max(10,this.he[at.layer]),qt=Math.max(10,this.Ld[at.layer]),xe?this.K===180?(y.m(Oe++,Mt+qt+Fe,It),y.m(Oe++,Math.max(Mt+qt-Fe/2,Mt),It),y.m(Oe++,Mt,It),y.m(Oe++,Mt,It),y.m(Oe++,Math.min(Mt-wt+Fe/2,Mt),It),y.m(Oe++,Mt-wt-Fe,It)):this.K===90?(y.m(Oe++,Mt,It-wt-Fe),y.m(Oe++,Mt,Math.min(It-wt+Fe/2,It)),y.m(Oe++,Mt,It),y.m(Oe++,Mt,It),y.m(Oe++,Mt,Math.max(It+qt-Fe/2,It)),y.m(Oe++,Mt,It+qt+Fe)):this.K===270?(y.m(Oe++,Mt,It+qt+Fe),y.m(Oe++,Mt,Math.max(It+qt-Fe/2,It)),y.m(Oe++,Mt,It),y.m(Oe++,Mt,It),y.m(Oe++,Mt,Math.min(It-wt+Fe/2,It)),y.m(Oe++,Mt,It-wt-Fe)):(y.m(Oe++,Mt-wt-Fe,It),y.m(Oe++,Math.min(Mt-wt+Fe/2,Mt),It),y.m(Oe++,Mt,It),y.m(Oe++,Mt,It),y.m(Oe++,Math.max(Mt+qt-Fe/2,Mt),It),y.m(Oe++,Mt+qt+Fe,It)):this.K===180?(y.m(Oe++,Mt+qt,It),y.m(Oe++,Mt-wt,It)):this.K===90?(y.m(Oe++,Mt,It-wt),y.m(Oe++,Mt,It+qt)):this.K===270?(y.m(Oe++,Mt,It+qt),y.m(Oe++,Mt,It-wt)):(y.m(Oe++,Mt-wt,It),y.m(Oe++,Mt+qt,It)))),ue=at}Ee&&(Xe=y.i(Oe-1).x,pt=y.i(Oe-1).y,Mt=y.i(Oe).x,It=y.i(Oe).y,this.K===180||this.K===0?pt!==It&&(wt=this.K===0?Math.min(Math.max((Mt+Xe)/2,this.Ta[pe.layer]+this.Rf.x),Mt):Math.max(Math.min((Mt+Xe)/2,this.Ta[pe.layer]+this.Rf.x),Mt),y.m(Oe++,wt,pt),y.m(Oe++,wt,It)):Xe!==Mt&&(wt=this.K===90?Math.min(Math.max((It+pt)/2,this.Ta[pe.layer]+this.Rf.y),It):Math.max(Math.min((It+pt)/2,this.Ta[pe.layer]+this.Rf.y),It),y.m(Oe++,Xe,wt),y.m(Oe++,Mt,wt)))}E!==null&&xe&&4<=y.pointsCount&&(ne!==null&&(ne=le===Fa?y.getLinkPointFromPoint(b,ne,ne.ga(Qr),y.i(3),!0):y.i(0),le===Fa&&(le=y.i(2),E=y.i(3),this.direction===90||this.direction===270?(y.L(1,(ne.x+le.x)/2,le.y),y.L(2,E.x,(le.y+E.y)/2)):(y.L(1,le.x,(ne.y+le.y)/2),y.L(2,(le.x+E.x)/2,E.y))),ne.w()||ne.set(b.actualBounds.center),y.L(0,ne.x,ne.y)),re!==null&&(b=oe===Fa?y.getLinkPointFromPoint(z,re,re.ga(Qr),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),oe===Fa&&(re=y.i(y.pointsCount-3),oe=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(b.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,(b.y+re.y)/2),y.L(y.pointsCount-3,(re.x+oe.x)/2,oe.y))),b.w()||b.set(z.actualBounds.center),y.L(y.pointsCount-1,b.x,b.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},Ro.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new Nn,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 E=a.value;if(E!==null&&E.isOrthogonal)for(var b=2;b<E.pointsCount-3;b++){var z=E.i(b),ne=E.i(b+1);if(this.B(z.y,ne.y)&&!this.B(z.x,ne.x)){var re=new bd;re.layer=Math.floor(z.y/2);var oe=E.i(0),le=E.i(E.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,ne.x),re.Ic=Math.max(z.x,ne.x),re.index=b,re.link=E,b+2<E.pointsCount){oe=E.i(b-1),le=E.i(b+2);var ue=0;oe.y<z.y?ue=le.y<z.y?3:z.x<ne.x?2:1:oe.y>z.y&&(ue=le.y>z.y?0:ne.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,E=a+1;E<x.length&&x[E].layer===z;)E++;if(1<E-a)for(z=a;z<E;){for(ne=x[z].Ic,b=a+1;b<E&&x[b].rd<ne;)ne=Math.max(ne,x[b].Ic),b++;if(ne=b-z,1<ne){for(this.zi(x,this.Js,z,z+ne),ue=1,re=x[z].jc,oe=z;oe<b;oe++)le=x[oe],le.jc!==re&&(ue++,re=le.jc);this.zi(x,this.Ux,z,z+ne);var pe=1;for(re=x[z].first,oe=z;oe<b;oe++)le=x[oe],le.first!==re&&(pe++,re=le.first);for(oe=!0,le=pe,ue<pe?(oe=!1,le=ue,re=x[z].jc,this.zi(x,this.Js,z,z+ne)):re=x[z].first,ue=0,pe=z;pe<b;pe++){var xe=x[pe];(oe?xe.first:xe.jc)!==re&&(ue++,re=oe?xe.first:xe.jc);var Ee=xe.link;z=Ee.i(xe.index),ne=Ee.i(xe.index+1);var Fe=this.linkSpacing*(ue-(le-1)/2);y++,Ee.uh(),Ee.L(xe.index,z.x,z.y+Fe),Ee.L(xe.index+1,ne.x,ne.y+Fe),Ee.zf()}}z=b}a=E}}else{for(y=0,x=[],a=a.iterator;a.next();)if(E=a.value,E!==null&&E.isOrthogonal)for(b=2;b<E.pointsCount-3;b++)z=E.i(b),ne=E.i(b+1),this.B(z.x,ne.x)&&!this.B(z.y,ne.y)&&(re=new bd,re.layer=Math.floor(z.x/2),oe=E.i(0),le=E.i(E.pointsCount-1),re.first=oe.x+oe.y*oe.y,re.jc=le.x+le.y*le.y,re.rd=Math.min(z.y,ne.y),re.Ic=Math.max(z.y,ne.y),re.index=b,re.link=E,b+2<E.pointsCount&&(oe=E.i(b-1),le=E.i(b+2),ue=0,oe.x<z.x?ue=le.x<z.x?3:z.y<ne.y?2:1:oe.x>z.x&&(ue=le.x>z.x?0:ne.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,E=a+1;E<x.length&&x[E].layer===z;)E++;if(1<E-a)for(z=a;z<E;){for(ne=x[z].Ic,b=a+1;b<E&&x[b].rd<ne;)ne=Math.max(ne,x[b].Ic),b++;if(ne=b-z,1<ne){for(this.zi(x,this.Js,z,z+ne),ue=1,re=x[z].jc,oe=z;oe<b;oe++)le=x[oe],le.jc!==re&&(ue++,re=le.jc);for(this.zi(x,this.Ux,z,z+ne),pe=1,re=x[z].first,oe=z;oe<b;oe++)le=x[oe],le.first!==re&&(pe++,re=le.first);for(oe=!0,le=pe,ue<pe?(oe=!1,le=ue,re=x[z].jc,this.zi(x,this.Js,z,z+ne)):re=x[z].first,ue=0,pe=z;pe<b;pe++)xe=x[pe],(oe?xe.first:xe.jc)!==re&&(ue++,re=oe?xe.first:xe.jc),Ee=xe.link,z=Ee.i(xe.index),ne=Ee.i(xe.index+1),Fe=this.linkSpacing*(ue-(le-1)/2),y++,Ee.uh(),Ee.L(xe.index,z.x+Fe,z.y),Ee.L(xe.index+1,ne.x+Fe,ne.y),Ee.zf()}z=b}a=E}}}},Le=Ro.prototype,Le.Vx=function(a,y){return a instanceof bd&&y instanceof bd&&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 bd&&y instanceof bd&&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 bd&&y instanceof bd&&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,E){var b=a.length,z=E-x;if(!(1>=z))if((0>x||x>=b-1)&&yt("not in range 0 <= from < length: "+x),z===2)E=a[x],b=a[x+1],0<y(E,b)&&(a[x]=b,a[x+1]=E);else if(x===0)if(E>=b)a.sort(y);else for(x=a.slice(0,E),x.sort(y),y=0;y<E;y++)a[y]=x[y];else if(E>=b)for(E=a.slice(x),E.sort(y),y=x;y<b;y++)a[y]=E[y-x];else for(b=a.slice(x,E),b.sort(y),y=x;y<E;y++)a[y]=b[y-x]};function Cd(a,y){var x=a.tc[y];if(x>=a.He.length){for(var E=[],b=0;b<a.He.length;b++)E[b]=a.He[b];a.He=E}for(a.He[x]===void 0||a.He[x]===null?E=[]:(E=a.He[x],a.He[x]=null),a=a.fl[y],y=0;y<a.length;y++)x=a[y],E[x.index]=x;return E}function Ed(a,y,x){a.He[a.tc[y]]=x}Ve.Object.defineProperties(Ro.prototype,{layerSpacing:{get:function(){return this.ie},set:function(a){this.ie!==a&&0<=a&&(this.ie=a,this.C())}},columnSpacing:{get:function(){return this.kc},set:function(a){this.kc!==a&&0<a&&(this.kc=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K!==a&&(a===0||a===90||a===180||a===270?(this.K=a,this.C()):yt("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==Sy&&a!==B0&&a!==Wp||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==N0&&a!==xy&&a!==Py||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==k0&&a!==wy&&a!==Cy||(this.Qk=a,this.C())}},iterations:{get:function(){return this.bj},set:function(a){this.bj!==a&&0<=a&&(this.bj=a,this.C())}},aggressiveOption:{get:function(){return this.rk},set:function(a){this.rk===a||a!==Ey&&a!==A0&&a!==by||(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 B0=new fn(Ro,"CycleDepthFirst",0),Sy=new fn(Ro,"CycleGreedy",1),Wp=new fn(Ro,"CycleFromLayers",2),N0=new fn(Ro,"LayerOptimalLinkLength",0),xy=new fn(Ro,"LayerLongestPathSink",1),Py=new fn(Ro,"LayerLongestPathSource",2),k0=new fn(Ro,"InitDepthFirstOut",0),wy=new fn(Ro,"InitDepthFirstIn",1),Cy=new fn(Ro,"InitNaive",2),Ey=new fn(Ro,"AggressiveNone",0),A0=new fn(Ro,"AggressiveLess",1),by=new fn(Ro,"AggressiveMore",2),Vx=8;Ro.className="LayeredDigraphLayout",Ro.CycleDepthFirst=B0,Ro.CycleGreedy=Sy,Ro.CycleFromLayers=Wp,Ro.LayerOptimalLinkLength=N0,Ro.LayerLongestPathSink=xy,Ro.LayerLongestPathSource=Py,Ro.InitDepthFirstOut=k0,Ro.InitDepthFirstIn=wy,Ro.InitNaive=Cy,Ro.AggressiveNone=Ey,Ro.AggressiveLess=A0,Ro.AggressiveMore=by,Ro.PackNone=0,Ro.PackExpand=1,Ro.PackStraighten=2,Ro.PackMedian=4,Ro.PackAll=15,Ro.AlignNone=0,Ro.AlignUpperLeft=1,Ro.AlignUpperRight=2,Ro.AlignLowerLeft=4,Ro.AlignLowerRight=8,Ro.AlignAll=15;function bd(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}bd.className="SegInfo";function kg(a){qo.call(this,a)}Ot(kg,qo),kg.prototype.createVertex=function(){return new Du(this)},kg.prototype.createEdge=function(){return new Gp(this)},kg.className="LayeredDigraphNetwork";function Du(a){ps.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}Ot(Du,ps);function ix(a,y){return a.index-y.index}function T0(a,y){if(!a.$n){for(var x=[],E=Hi(a.destinationEdgesArrayAccess),b=E.next();!b.done;b=E.next())b=b.value,b.valid&&x.push(b);a.$n=x}for(a=Hi(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;yt("Unable to find destination edge to given vertex")}function My(a){if(!a.co){for(var y=[],x=Hi(a.sourceEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.fromVertex);y.sort(ix),a.co=y}return a.co}function Ux(a){if(!a.ao){for(var y=[],x=Hi(a.destinationEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.toVertex);y.sort(ix),a.ao=y}return a.ao}Du.prototype.Cl=function(a){ps.prototype.Cl.call(this,a),this.bo=this.co=null},Du.prototype.Kl=function(a){ps.prototype.Kl.call(this,a),this.bo=this.co=null},Du.prototype.zl=function(a){ps.prototype.zl.call(this,a),this.$n=this.ao=null},Du.prototype.Jl=function(a){ps.prototype.Jl.call(this,a),this.$n=this.ao=null},Ve.Object.defineProperties(Du.prototype,{layer:{get:function(){return this.Ig},set:function(a){this.Ig!==a&&(this.Ig=a)}},column:{get:function(){return this.Ag},set:function(a){this.Ag!==a&&(this.Ag=a)}},index:{get:function(){return this.Za},set:function(a){this.Za!==a&&(this.Za=a)}},component:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},near:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}}}),Du.prototype.deleteDestinationEdge=Du.prototype.Jl,Du.prototype.addDestinationEdge=Du.prototype.zl,Du.prototype.deleteSourceEdge=Du.prototype.Kl,Du.prototype.addSourceEdge=Du.prototype.Cl,Du.className="LayeredDigraphVertex";function Gp(a){ql.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Ot(Gp,ql),Ve.Object.defineProperties(Gp.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)}}}),Gp.className="LayeredDigraphEdge";function Gr(a){da.call(this),this.Ub=new Ln,this.Wn=R0,this.ud=nc,this.vo=z0,this.Bq=Ry,this.$v=[],this.td=!0,this.Rb=_0,this.$d=new Xn(10,10).freeze();var y=new zf(this);this.W=new Vu(y),this.Y=new Vu(y),this.ru=[],a&&Object.assign(this,a)}Ot(Gr,da),Gr.prototype.cloneProtected=function(a){da.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)},Gr.prototype.qb=function(a){a.classType===Gr?a.name.indexOf("Alignment")===0?this.alignment=a:a.name.indexOf("Arrangement")===0?this.arrangement=a:a.name.indexOf("Compaction")===0?this.compaction=a:a.name.indexOf("Path")===0?this.path=a:a.name.indexOf("Sorting")===0?this.sorting=a:a.name.indexOf("Style")===0?this.treeStyle=a:yt("Unknown enum value: "+a):da.prototype.qb.call(this,a)},Gr.prototype.createNetwork=function(){return new zf(this)},Gr.prototype.makeNetwork=function(a){function y(E){if(E instanceof oi)return!E.isLinkLabel&&E.category!=="Comment";if(E instanceof Kn){var b=E.fromNode;return b===null||b.isLinkLabel||b.category==="Comment"?!1:(E=E.toNode,!(E===null||E.isLinkLabel||E.category==="Comment"))}return!1}var x=this.createNetwork();return a instanceof Qt?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof gr?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},Gr.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==Z0&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof Qt&&(y=a),this.path===R0&&y!==null?this.ud=y.isTreePathToChildren?nc:Rf:this.ud=this.path===R0?nc: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 Ln,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof oi?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof Vu&&a.add(x)}this.Ub=a}for(this.Ub.count===0&&this.findRoots(),a=this.Ub.copy().iterator;a.next();)y=a.value,y.initialized||(y.initialized=!0,Ly(this,y));for(y=this.network.vertexes,a=null;a=Yx(y),0<a.count;)y=rx(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,Ly(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Vu&&ax(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Vu&&sx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Vu&&lx(this,y);if(this.Cu(),this.layerStyle===H0){for(a=[],y=this.network.vertexes.iterator;y.next();){x=y.value;var E=x.parent;E===null&&(E=x),E=E.angle===0||E.angle===180;var b=a[x.level];b===void 0&&(b=0),a[x.level]=Math.max(b,E?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,E=x.parent,E===null&&(E=x),E.angle===0||E.angle===180?(E.angle===180&&(x.focusX+=a[x.level]-x.width),x.width=a[x.level]):(E.angle===270&&(x.focusY+=a[x.level]-x.height),x.height=a[x.level])}else if(this.layerStyle===jy)for(a=this.network.vertexes.iterator;a.next();){for(y=a.value,x=y.angle===0||y.angle===180,E=-1,b=0;b<y.children.length;b++){var z=y.children[b];E=Math.max(E,x?z.width:z.height)}if(0<=E)for(b=0;b<y.children.length;b++)z=y.children[b],x?(y.angle===180&&(z.focusX+=E-z.width),z.width=E):(y.angle===270&&(z.focusY+=E-z.height),z.height=E)}for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Vu&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new Ln,this.isValidLayout=!0};function Yx(a){var y=new Ln;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}Gr.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case nc:x.sourceEdges.count===0&&this.Ub.add(x);break;case Rf:x.destinationEdges.count===0&&this.Ub.add(x);break;default:yt("Unhandled path value "+this.ud.toString())}}this.Ub.count===0&&(a=rx(this,a),a!==null&&this.Ub.add(a))};function rx(a,y){var x=999999,E=null;for(y=y.iterator;y.next();){var b=y.value;switch(a.ud){case nc:b.sourceEdges.count<x&&(x=b.sourceEdges.count,E=b);break;case Rf:b.destinationEdges.count<x&&(x=b.destinationEdges.count,E=b);break;default:yt("Unhandled path value "+a.ud.toString())}}return E}function Ly(a,y){if(y!==null){switch(a.ud){case nc:if(0<y.destinationEdges.count){for(var x=new Nn,E=y.destinationVertexes;E.next();){var b=E.value;ox(a,y,b)&&x.add(b)}0<x.count&&(y.children=x.Fa())}break;case Rf:if(0<y.sourceEdges.count){for(x=new Nn,E=y.sourceVertexes;E.next();)b=E.value,ox(a,y,b)&&x.add(b);0<x.count&&(y.children=x.Fa())}break;default:yt("Unhandled path value"+a.ud.toString())}for(x=y.children,E=x.length,b=0;b<E;b++){var z=x[b];z.initialized=!0,z.level=y.level+1,z.parent=y,a.Ub.remove(z)}for(y=0;y<E;y++)Ly(a,x[y])}}function ox(a,y,x){if(x.initialized){if(y===null)var E=!1;else{for(E=y.parent;E!==null&&E!==x;)E=E.parent;E=E===x}if(E||x.level>y.level)return!1;a.removeChild(x.parent,x)}return!0}Gr.prototype.removeChild=function(a,y){if(a!==null&&y!==null){for(var x=a.children,E=0,b=0;b<x.length;b++)x[b]===y&&E++;if(0<E){E=Array(x.length-E);for(var z=b=0;z<x.length;z++)x[z]!==y&&(E[b++]=x[z]);a.children=E}}};function ax(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===oc&&a.sortTreeVertexChildren(y);for(var x=0,E=y.childrenCount,b=0,z=y.children,ne=z.length,re=0;re<ne;re++){var oe=z[re];ax(a,oe),x+=oe.descendantCount+1,E=Math.max(E,oe.maxChildrenCount),b=Math.max(b,oe.maxGenerationCount)}y.descendantCount=x,y.maxChildrenCount=E,y.maxGenerationCount=0<E?b+1:0}}function Xx(a,y){switch(a.vo){default:case z0:return y.parent!==null?y.parent:a.W;case Oy:return y.parent===null?a.W:y.parent.parent===null?a.Y:y.parent;case Dy:return y.parent!==null?y.parent.parent!==null?y.parent.parent:a.Y:a.W;case Ty:var x=!0;if(y.childrenCount===0)x=!1;else for(var E=y.children,b=E.length,z=0;z<b;z++)if(0<E[z].childrenCount){x=!1;break}return x&&y.parent!==null?a.Y:y.parent!==null?y.parent:a.W}}Gr.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(Xx(this,a)),a.parent!==null&&a.parent.alignment===oc){for(var y=a.angle,x=a.parent.children,E=0;E<x.length&&a!==x[E];)E++;E%2===0?E!==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 sx(a,y){if(y!==null){a.assignTreeVertexValues(y),y=y.children;for(var x=y.length,E=0;E<x;E++)sx(a,y[E])}}Gr.prototype.assignTreeVertexValues=function(){};function lx(a,y){if(y!==null){y.alignment!==oc&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,E=0;E<x;E++)lx(a,y[E])}}Gr.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Ag:break;case Kp:a.children.reverse();break;case Vp:a.children.sort(a.comparer);break;case Up:a.children.sort(a.comparer),a.children.reverse();break;default:yt("Unhandled sorting value "+a.sorting.toString())}},Gr.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Gr.prototype.addComments=function(a){var y=a.angle,x=a.parent,E=0,b=!1;x!==null&&(E=x.angle,b=x.alignment,b=Md(b)),y=y===90||y===270,E=E===90||E===270,x=a.childrenCount===0;var z=0,ne=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||!b&&!E&&x||b&&E&&x?(z=Math.max(z,ue.width),ne+=ue.height+Math.abs(re)):(z+=ue.width+Math.abs(re),ne=Math.max(ne,ue.height)),re=oe)}a.comments!==null&&(y&&!x||!b&&!E&&x||b&&E&&x?(z+=Math.abs(a.commentMargin),ne=Math.max(0,ne-a.height)):(ne+=Math.abs(a.commentMargin),z=Math.max(0,z-a.width)),b=gn.allocAt(0,0,a.bounds.width+z,a.bounds.height+ne),a.bounds=b,gn.free(b))};function Md(a){return a===Vc||a===oc||a===Uc||a===Sc}function $p(a){return a===Vc||a===oc}function Fy(a){var y=a.parent;if(y!==null){var x=y.alignment;if(Md(x)){if($p(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===Uc)return!0}}return!1}Gr.prototype.layoutComments=function(a){if(a.comments!==null){var y=a.node.measuredBounds,x=a.parent,E=a.angle,b=0,z=!1;x!==null&&(b=x.angle,z=x.alignment,z=Md(z)),E=E===90||E===270,x=b===90||b===270;for(var ne=a.childrenCount===0,re=Fy(a),oe=0,le=a.comments,ue=le.length,pe=tt.alloc(),xe=0;xe<ue;xe++){var Ee=le[xe],Fe=Ee.measuredBounds;if(E&&!ne||!z&&!x&&ne||z&&x&&ne){if(135<b&&!z||x&&re)if(0<=a.commentMargin)for(pe.h(a.bounds.x-a.commentMargin-Fe.width,a.bounds.y+oe),Ee.move(pe),Ee=Ee.Sd();Ee.next();){var Oe=Ee.value;Oe.fromSpot=za,Oe.toSpot=rs}else for(pe.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+oe),Ee.move(pe),Ee=Ee.Sd();Ee.next();)Oe=Ee.value,Oe.fromSpot=rs,Oe.toSpot=za;else if(0<=a.commentMargin)for(pe.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+oe),Ee.move(pe),Ee=Ee.Sd();Ee.next();)Oe=Ee.value,Oe.fromSpot=rs,Oe.toSpot=za;else for(pe.h(a.bounds.x+a.commentMargin-Fe.width,a.bounds.y+oe),Ee.move(pe),Ee=Ee.Sd();Ee.next();)Oe=Ee.value,Oe.fromSpot=za,Oe.toSpot=rs;oe=0<=a.commentSpacing?oe+(Fe.height+a.commentSpacing):oe+(a.commentSpacing-Fe.height)}else{if(135<b&&!z||!x&&re)if(0<=a.commentMargin)for(pe.h(a.bounds.x+oe,a.bounds.y-a.commentMargin-Fe.height),Ee.move(pe),Ee=Ee.Sd();Ee.next();)Oe=Ee.value,Oe.fromSpot=Aa,Oe.toSpot=Ka;else for(pe.h(a.bounds.x+oe,a.bounds.y+2*a.focus.y-a.commentMargin),Ee.move(pe),Ee=Ee.Sd();Ee.next();)Oe=Ee.value,Oe.fromSpot=Ka,Oe.toSpot=Aa;else if(0<=a.commentMargin)for(pe.h(a.bounds.x+oe,a.bounds.y+2*a.focus.y+a.commentMargin),Ee.move(pe),Ee=Ee.Sd();Ee.next();)Oe=Ee.value,Oe.fromSpot=Ka,Oe.toSpot=Aa;else for(pe.h(a.bounds.x+oe,a.bounds.y+a.commentMargin-Fe.height),Ee.move(pe),Ee=Ee.Sd();Ee.next();)Oe=Ee.value,Oe.fromSpot=Aa,Oe.toSpot=Ka;oe=0<=a.commentSpacing?oe+(Fe.width+a.commentSpacing):oe+(a.commentSpacing-Fe.width)}}if(tt.free(pe),y=oe-a.commentSpacing-(E?y.height:y.width),this.ud===nc)for(a=a.destinationEdges;a.next();)b=a.value.link,b===null||b.isAvoiding||(b.fromEndSegmentLength=0<y?y:NaN);else for(a=a.sourceEdges;a.next();)b=a.value.link,b===null||b.isAvoiding||(b.toEndSegmentLength=0<y?y:NaN)}},Gr.prototype.layoutTree=function(a){if(a!==null){for(var y=a.children,x=y.length,E=0;E<x;E++)this.layoutTree(y[E]);switch(a.compaction){case j0:ux(this,a);break;case Yp:if(a.alignment===oc)ux(this,a);else if(a.childrenCount===0)E=a.parent,x=!1,y=0,E!==null&&(y=E.angle,x=E.alignment,x=Md(x)),E=Fy(a),a.S.h(0,0),a.Da.h(a.width,a.height),a.parent===null||a.comments===null||(y!==180&&y!==270||x)&&!E?a.la.h(0,0):y===180&&!x||(y===90||y===270)&&E?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 b=uh(a);y=b===90||b===270;var z=0,ne=a.children,re=ne.length;for(x=0;x<re;x++)E=ne[x],z=Math.max(z,y?E.Da.width:E.Da.height);var oe=a.alignment;E=oe===ic;var le=oe===rc,ue=Md(oe),pe=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var xe=a.nodeSpacing,Ee=this.computeNodeIndent(a),Fe=a.rowSpacing,Oe=0;(E||le||a.hm||a.im&&a.maxGenerationCount===1)&&(Oe=Math.max(0,a.rowIndent)),E=a.width;var at=a.height,Xe=0,pt=0,wt=0,Mt=null,It=null,qt=0,ei=0,Si=0,fi=0,Gn=0,Tn=0,dr=0,Xi=0;if(ue&&!$p(oe)&&135<b&&ne.reverse(),$p(oe))if(1<re)for(var vo=0;vo<re;vo++)vo%2===0&&vo!==re-1&&(Xi=Math.max(Xi,y?ne[vo].Da.width:ne[vo].Da.height));else re===1&&(Xi=y?ne[0].Da.width:ne[0].Da.height);if(ue){switch(oe){case Vc:pt=135>b?hx(this,a,ne,Xi,Xe,pt):cx(this,a,ne,Xi,Xe,pt),Xi=pt.x,Xe=pt.width,pt=pt.height;break;case Uc:for(Mt=0;Mt<re;Mt++)It=ne[Mt],pe=It.Da,wt=Tn===0?0:Fe,y?(It.S.h(z-pe.width,fi+wt),Xe=Math.max(Xe,pe.width),pt=Math.max(pt,fi+wt+pe.height),fi+=wt+pe.height):(It.S.h(Si+wt,z-pe.height),Xe=Math.max(Xe,Si+wt+pe.width),pt=Math.max(pt,pe.height),Si+=wt+pe.width),Tn++;break;case Sc:for(Mt=0;Mt<re;Mt++)It=ne[Mt],z=It.Da,pe=Tn===0?0:Fe,y?(It.S.h(xe/2+a.focus.x,fi+pe),Xe=Math.max(Xe,z.width),pt=Math.max(pt,fi+pe+z.height),fi+=pe+z.height):(It.S.h(Si+pe,xe/2+a.focus.y),Xe=Math.max(Xe,Si+pe+z.width),pt=Math.max(pt,z.height),Si+=pe+z.width),Tn++}Mt=Hl(this,2),It=Hl(this,2),y?(Mt[0].h(0,0),Mt[1].h(0,pt),It[0].h(Xe,0)):(Mt[0].h(0,0),Mt[1].h(Xe,0),It[0].h(0,pt)),It[1].h(Xe,pt)}else for(vo=0;vo<re;vo++){var Xo=ne[vo],xs=Xo.Da;if(y){0<pe&&0<Tn&&Si+xe+xs.width>pe&&(Si<z&&sf(a,oe,z-Si,0,dr,vo-1),Gn++,Tn=0,dr=vo,wt=pt,Si=0,fi=135<b?-pt-Fe:pt+Fe),O0(this,Xo,0,fi);var Es=0;if(Tn===0)Mt=Xo.Yo,It=Xo.kp,qt=xs.width,ei=xs.height,(Mt===null||It===null||b!==uh(Xo))&&(Mt=Hl(this,2),It=Hl(this,2),Mt[0].h(0,0),Mt[1].h(0,ei),It[0].h(qt,0),It[1].h(qt,ei));else{var al=qn();ei=dx(this,a,Xo,Mt,It,qt,ei,al),Es=ei.x,Mt=al[0],It=al[1],qt=ei.width,ei=ei.height,di(al),Si<xs.width&&0>Es&&(If(a,-Es,0,dr,vo-1),I0(Mt,-Es,0),I0(It,-Es,0),Es=0)}Xo.S.h(Es,fi),Xe=Math.max(Xe,qt),pt=Math.max(pt,wt+(Gn===0?0:Fe)+xs.height),Si=qt}else 0<pe&&0<Tn&&fi+xe+xs.height>pe&&(fi<z&&sf(a,oe,0,z-fi,dr,vo-1),Gn++,Tn=0,dr=vo,wt=Xe,fi=0,Si=135<b?-Xe-Fe:Xe+Fe),O0(this,Xo,Si,0),Es=0,Tn===0?(Mt=Xo.Yo,It=Xo.kp,qt=xs.width,ei=xs.height,(Mt===null||It===null||b!==uh(Xo))&&(Mt=Hl(this,2),It=Hl(this,2),Mt[0].h(0,0),Mt[1].h(qt,0),It[0].h(0,ei),It[1].h(qt,ei))):(al=qn(),ei=dx(this,a,Xo,Mt,It,qt,ei,al),Es=ei.x,Mt=al[0],It=al[1],qt=ei.width,ei=ei.height,di(al),fi<xs.height&&0>Es&&(If(a,0,-Es,dr,vo-1),I0(Mt,0,-Es),I0(It,0,-Es),Es=0)),Xo.S.h(Si,Es),pt=Math.max(pt,ei),Xe=Math.max(Xe,wt+(Gn===0?0:Fe)+xs.width),fi=ei;Tn++}switch(0<Gn&&(y?(pt+=Math.max(0,x),Si<Xe&&sf(a,oe,Xe-Si,0,dr,re-1),0<Oe&&(le||If(a,Oe,0,0,re-1),Xe+=Oe)):(Xe+=Math.max(0,x),fi<pt&&sf(a,oe,0,pt-fi,dr,re-1),0<Oe&&(le||If(a,0,Oe,0,re-1),pt+=Oe))),Oe=le=0,oe){case Tg:y?le+=Xe/2-a.focus.x-Ee/2:Oe+=pt/2-a.focus.y-Ee/2;break;case jf:0<Gn?y?le+=Xe/2-a.focus.x-Ee/2:Oe+=pt/2-a.focus.y-Ee/2:y?(Xi=ne[0].S.x+ne[0].la.x,le+=Xi+(ne[re-1].S.x+ne[re-1].la.x+2*ne[re-1].focus.x-Xi)/2-a.focus.x-Ee/2):(Xi=ne[0].S.y+ne[0].la.y,Oe+=Xi+(ne[re-1].S.y+ne[re-1].la.y+2*ne[re-1].focus.y-Xi)/2-a.focus.y-Ee/2);break;case ic:y?(le-=Ee,Xe+=Ee):(Oe-=Ee,pt+=Ee);break;case rc:y?(le+=Xe-a.width+Ee,Xe+=Ee):(Oe+=pt-a.height+Ee,pt+=Ee);break;case Vc:y?1<re?le+=Xi+xe/2-a.focus.x:le+=ne[0].focus.x-a.focus.x+ne[0].la.x:1<re?Oe+=Xi+xe/2-a.focus.y:Oe+=ne[0].focus.y-a.focus.y+ne[0].la.y;break;case Uc:y?le+=Xe+xe/2-a.focus.x:Oe+=pt+xe/2-a.focus.y;break;case Sc:break;default:pt=this.customAlignment(a,le,Oe,Xe,pt),le=pt[0],Oe=pt[1],Xe=pt[2],pt=pt[3]}for(Ee=0;Ee<re;Ee++)Xi=ne[Ee],y?Xi.S.h(Xi.S.x+Xi.la.x-le,Xi.S.y+(135<b?(ue?-pt:-Xi.Da.height)+Xi.la.y-x:at+x+Xi.la.y)):Xi.S.h(Xi.S.x+(135<b?(ue?-Xe:-Xi.Da.width)+Xi.la.x-x:E+x+Xi.la.x),Xi.S.y+Xi.la.y-Oe);if(re=ne=0,ue?y?(Xe=By(a,Xe,le),0>le&&(le=0),135<b&&(Oe+=pt+x),pt+=at+x,oe===Sc&&(ne+=xe/2+a.focus.x),re+=at+x):(135<b&&(le+=Xe+x),Xe+=E+x,pt=Ny(a,pt,Oe),0>Oe&&(Oe=0),oe===Sc&&(re+=xe/2+a.focus.y),ne+=E+x):y?(a.comments===null?E>Xe&&(Xe=ky(oe,E-Xe,0),ne=Xe.x,re=Xe.y,Xe=E,le=0):Xe=By(a,Xe,le),0>le&&(ne-=le,le=0),135<b&&(Oe+=pt+x),pt=Math.max(Math.max(pt,at),pt+at+x),re+=at+x):(135<b&&(le+=Xe+x),Xe=Math.max(Math.max(Xe,E),Xe+E+x),a.comments===null?at>pt&&(pt=ky(oe,0,at-pt),ne=pt.x,re=pt.y,pt=at,Oe=0):pt=Ny(a,pt,Oe),0>Oe&&(re-=Oe,Oe=0),ne+=E+x),0<Gn)b=Hl(this,4),Gn=Hl(this,4),y?(b[2].h(0,at+x),b[3].h(b[2].x,pt),Gn[2].h(Xe,b[2].y),Gn[3].h(Gn[2].x,b[3].y)):(b[2].h(E+x,0),b[3].h(Xe,b[2].y),Gn[2].h(b[2].x,pt),Gn[3].h(b[3].x,Gn[2].y));else{for(b=Hl(this,Mt.length+2),Gn=Hl(this,It.length+2),oe=0;oe<Mt.length;oe++)ue=Mt[oe],b[oe+2].h(ue.x+ne,ue.y+re);for(oe=0;oe<It.length;oe++)ue=It[oe],Gn[oe+2].h(ue.x+ne,ue.y+re)}y?(b[0].h(le,0),b[1].h(b[0].x,at),b[2].y<b[1].y&&(b[2].x>b[0].x?b[2].assign(b[1]):b[1].assign(b[2])),b[3].y<b[2].y&&(b[3].x>b[0].x?b[3].assign(b[2]):b[2].assign(b[3])),Gn[0].h(le+E,0),Gn[1].h(Gn[0].x,at),Gn[2].y<Gn[1].y&&(Gn[2].x<Gn[0].x?Gn[2].assign(Gn[1]):Gn[1].assign(Gn[2])),Gn[3].y<Gn[2].y&&(Gn[3].x<Gn[0].x?Gn[3].assign(Gn[2]):Gn[2].assign(Gn[3])),b[2].y-=x/2,Gn[2].y-=x/2):(b[0].h(0,Oe),b[1].h(E,b[0].y),b[2].x<b[1].x&&(b[2].y>b[0].y?b[2].assign(b[1]):b[1].assign(b[2])),b[3].x<b[2].x&&(b[3].y>b[0].y?b[3].assign(b[2]):b[2].assign(b[3])),Gn[0].h(0,Oe+at),Gn[1].h(E,Gn[0].y),Gn[2].x<Gn[1].x&&(Gn[2].y<Gn[0].y?Gn[2].assign(Gn[1]):Gn[1].assign(Gn[2])),Gn[3].x<Gn[2].x&&(Gn[3].y<Gn[0].y?Gn[3].assign(Gn[2]):Gn[2].assign(Gn[3])),b[2].x-=x/2,Gn[2].x-=x/2),xh(this,Mt),xh(this,It),a.Yo=b,a.kp=Gn,a.la.h(le,Oe),a.Da.h(Xe,pt)}break;default:yt("Unhandled compaction value "+a.compaction.toString())}}};function ux(a,y){if(y.childrenCount===0){var x=!1,E=0;y.parent!==null&&(E=y.parent.angle,x=y.parent.alignment,x=Md(x));var b=Fy(y);y.S.h(0,0),y.Da.h(y.width,y.height),y.parent===null||y.comments===null||(E!==180&&E!==270||x)&&!b?y.la.h(0,0):E===180&&!x||(E===90||E===270)&&b?y.la.h(y.width-2*y.focus.x,0):y.la.h(0,y.height-2*y.focus.y)}else{E=uh(y),x=E===90||E===270;var z=0;b=y.children;for(var ne=b.length,re=0;re<ne;re++){var oe=b[re];z=Math.max(z,x?oe.Da.width:oe.Da.height)}var le=y.alignment,ue=le===ic,pe=le===rc;re=Md(le);var xe=Math.max(0,y.breadthLimit);oe=a.computeLayerSpacing(y);var Ee=y.nodeSpacing,Fe=a.computeNodeIndent(y),Oe=ue||pe?0:Fe/2,at=y.rowSpacing,Xe=0;(ue||pe||y.hm||y.im&&y.maxGenerationCount===1)&&(Xe=Math.max(0,y.rowIndent)),ue=y.width;var pt=y.height,wt=0,Mt=0,It=0,qt=0,ei=0,Si=0,fi=0,Gn=0,Tn=0,dr=0;if(re&&!$p(le)&&135<E&&b.reverse(),$p(le))if(1<ne)for(var Xi=0;Xi<ne;Xi++){var vo=b[Xi],Xo=vo.Da;Xi%2===0&&Xi!==ne-1?Tn=Math.max(Tn,(x?Xo.width:Xo.height)+a.computeBusNodeSpacing(vo)-Ee):Xi%2!==0&&(dr=Math.max(dr,(x?Xo.width:Xo.height)+a.computeBusNodeSpacing(vo)-Ee))}else ne===1&&(Tn=x?b[0].Da.width:b[0].Da.height);if(re)switch(le){case Vc:case oc:Mt=135>E?hx(a,y,b,Tn,wt,Mt):cx(a,y,b,Tn,wt,Mt),Tn=Mt.x,wt=Mt.width,Mt=Mt.height;break;case Uc:for(xe=0;xe<ne;xe++)Oe=b[xe],It=Oe.Da,dr=fi===0?0:at,x?(Oe.S.h(z-It.width,ei+dr),wt=Math.max(wt,It.width),Mt=Math.max(Mt,ei+dr+It.height),ei+=dr+It.height):(Oe.S.h(qt+dr,z-It.height),wt=Math.max(wt,qt+dr+It.width),Mt=Math.max(Mt,It.height),qt+=dr+It.width),fi++;break;case Sc:for(z=0;z<ne;z++)xe=b[z],Oe=xe.Da,It=fi===0?0:at,x?(xe.S.h(Ee/2+y.focus.x,ei+It),wt=Math.max(wt,Oe.width),Mt=Math.max(Mt,ei+It+Oe.height),ei+=It+Oe.height):(xe.S.h(qt+It,Ee/2+y.focus.y),wt=Math.max(wt,qt+It+Oe.width),Mt=Math.max(Mt,Oe.height),qt+=It+Oe.width),fi++}else for(dr=0;dr<ne;dr++)Xi=b[dr],vo=Xi.Da,x?(0<xe&&0<fi&&qt+Ee+vo.width>xe&&(qt<z&&sf(y,le,z-qt,0,Gn,dr-1),Si++,fi=0,Gn=dr,It=Mt,qt=0,ei=135<E?-Mt-at:Mt+at),Xo=fi===0?Oe:Ee,O0(a,Xi,0,ei),Xi.S.h(qt+Xo,ei),wt=Math.max(wt,qt+Xo+vo.width),Mt=Math.max(Mt,It+(Si===0?0:at)+vo.height),qt+=Xo+vo.width):(0<xe&&0<fi&&ei+Ee+vo.height>xe&&(ei<z&&sf(y,le,0,z-ei,Gn,dr-1),Si++,fi=0,Gn=dr,It=wt,ei=0,qt=135<E?-wt-at:wt+at),Xo=fi===0?Oe:Ee,O0(a,Xi,qt,0),Xi.S.h(qt,ei+Xo),Mt=Math.max(Mt,ei+Xo+vo.height),wt=Math.max(wt,It+(Si===0?0:at)+vo.width),ei+=Xo+vo.height),fi++;switch(0<Si&&(x?(Mt+=Math.max(0,oe),qt<wt&&sf(y,le,wt-qt,0,Gn,ne-1),0<Xe&&(pe||If(y,Xe,0,0,ne-1),wt+=Xe)):(wt+=Math.max(0,oe),ei<Mt&&sf(y,le,0,Mt-ei,Gn,ne-1),0<Xe&&(pe||If(y,0,Xe,0,ne-1),Mt+=Xe))),Xe=pe=0,le){case Tg:x?pe+=wt/2-y.focus.x-Fe/2:Xe+=Mt/2-y.focus.y-Fe/2;break;case jf:0<Si?x?pe+=wt/2-y.focus.x-Fe/2:Xe+=Mt/2-y.focus.y-Fe/2:x?(a=b[0].S.x+b[0].la.x,pe+=a+(b[ne-1].S.x+b[ne-1].la.x+2*b[ne-1].focus.x-a)/2-y.focus.x-Fe/2):(a=b[0].S.y+b[0].la.y,Xe+=a+(b[ne-1].S.y+b[ne-1].la.y+2*b[ne-1].focus.y-a)/2-y.focus.y-Fe/2);break;case ic:x?(pe-=Fe,wt+=Fe):(Xe-=Fe,Mt+=Fe);break;case rc:x?(pe+=wt-y.width+Fe,wt+=Fe):(Xe+=Mt-y.height+Fe,Mt+=Fe);break;case Vc:case oc:x?1<ne?pe+=Tn+Ee/2-y.focus.x:pe+=b[0].focus.x-y.focus.x+b[0].la.x:1<ne?Xe+=Tn+Ee/2-y.focus.y:Xe+=b[0].focus.y-y.focus.y+b[0].la.y;break;case Uc:x?pe+=wt+Ee/2-y.focus.x:Xe+=Mt+Ee/2-y.focus.y;break;case Sc:break;default:a=a.customAlignment(y,pe,Xe,wt,Mt),pe=a[0],Xe=a[1],wt=a[2],Mt=a[3]}for(a=0;a<ne;a++)Fe=b[a],x?Fe.S.h(Fe.S.x+Fe.la.x-pe,Fe.S.y+(135<E?(re?-Mt:-Fe.Da.height)+Fe.la.y-oe:pt+oe+Fe.la.y)):Fe.S.h(Fe.S.x+(135<E?(re?-wt:-Fe.Da.width)+Fe.la.x-oe:ue+oe+Fe.la.x),Fe.S.y+Fe.la.y-Xe);x?(wt=By(y,wt,pe),0>pe&&(pe=0),135<E&&(Xe+=Mt+oe),Mt=Math.max(Math.max(Mt,pt),Mt+pt+oe)):(135<E&&(pe+=wt+oe),wt=Math.max(Math.max(wt,ue),wt+ue+oe),Mt=Ny(y,Mt,Xe),0>Xe&&(Xe=0)),y.la.h(pe,Xe),y.Da.h(wt,Mt)}}Gr.prototype.customAlignment=function(a,y,x,E,b){return[y,x,E,b]};function hx(a,y,x,E,b,z){var ne=x.length;if(ne===0)return new gn(E,0,b,z);if(ne===1)return y=x[0],b=y.Da.width,z=y.Da.height,new gn(E,0,b,z);for(var re=y.nodeSpacing,oe=y.rowSpacing,le=uh(y)===90,ue=0,pe=0,xe=0,Ee=0;Ee<ne;Ee++)if(!(Ee%2!==0||1<ne&&Ee===ne-1)){var Fe=x[Ee],Oe=Fe.Da,at=ue===0?0:oe;if(le){var Xe=a.computeBusNodeSpacing(Fe)-re;Fe.S.h(E-(Oe.width+Xe),xe+at),b=Math.max(b,Oe.width+Xe),z=Math.max(z,xe+at+Oe.height),xe+=at+Oe.height}else Xe=a.computeBusNodeSpacing(Fe)-re,Fe.S.h(pe+at,E-(Oe.height+Xe)),z=Math.max(z,Oe.height+Xe),b=Math.max(b,pe+at+Oe.width),pe+=at+Oe.width;ue++}for(ue=0,Fe=pe,Ee=xe,le?(pe=E+re,xe=0):(pe=0,xe=E+re),Oe=0;Oe<ne;Oe++)if(Oe%2!==0){at=x[Oe],Xe=at.Da;var pt=ue===0?0:oe;if(le){var wt=a.computeBusNodeSpacing(at)-re;at.S.h(pe+wt,xe+pt),b=Math.max(b,pe+Xe.width+wt),z=Math.max(z,xe+pt+Xe.height),xe+=pt+Xe.height}else wt=a.computeBusNodeSpacing(at)-re,at.S.h(pe+pt,xe+wt),b=Math.max(b,pe+pt+Xe.width),z=Math.max(z,xe+Xe.height+wt),pe+=pt+Xe.width;ue++}return 1<ne&&ne%2===1&&(x=x[ne-1],ne=x.Da,a=a.computeBusLastRowSpacing(x,le?Math.max(Math.abs(Ee),Math.abs(xe)):Math.max(Math.abs(Fe),Math.abs(pe))),le?(x.S.h(E+re/2-x.focus.x-x.la.x,z+a),le=E+re/2-x.focus.x-x.la.x,b=Math.max(b,le+ne.width),0>le&&(b-=le),z=Math.max(z,Math.max(Ee,xe)+a+ne.height),0>x.S.x&&(E=D0(y,x.S.x,!1,E,re))):(x.S.h(b+a,E+re/2-x.focus.y-x.la.y),b=Math.max(b,Math.max(Fe,pe)+a+ne.width),xe=E+re/2-x.focus.y-x.la.y,z=Math.max(z,xe+ne.height),0>xe&&(z-=xe),0>x.S.y&&(E=D0(y,x.S.y,!0,E,re)))),new gn(E,0,b,z)}function cx(a,y,x,E,b,z){var ne=x.length;if(ne===0)return new gn(E,0,b,z);if(ne===1)return x=x[0],b=x.Da.width,z=x.Da.height,new gn(E,0,b,z);for(var re=y.nodeSpacing,oe=y.rowSpacing,le=uh(y)===270,ue=0,pe=0,xe=0,Ee=0;Ee<ne;Ee++)if(!(Ee%2!==0||1<ne&&Ee===ne-1)){var Fe=x[Ee],Oe=Fe.Da,at=ue===0?0:oe;if(le){var Xe=a.computeBusNodeSpacing(Fe)-re;xe-=at+Oe.height,Fe.S.h(E-(Oe.width+Xe),xe),b=Math.max(b,Oe.width+Xe),z=Math.max(z,Math.abs(xe))}else Xe=a.computeBusNodeSpacing(Fe)-re,pe-=at+Oe.width,Fe.S.h(pe,E-(Oe.height+Xe)),z=Math.max(z,Oe.height+Xe),b=Math.max(b,Math.abs(pe));ue++}for(ue=0,Fe=pe,Ee=xe,le?(pe=E+re,xe=0):(pe=0,xe=E+re),Oe=0;Oe<ne;Oe++)if(Oe%2!==0){at=x[Oe],Xe=at.Da;var pt=ue===0?0:oe;if(le){var wt=a.computeBusNodeSpacing(at)-re;xe-=pt+Xe.height,at.S.h(pe+wt,xe),b=Math.max(b,pe+Xe.width+wt),z=Math.max(z,Math.abs(xe))}else wt=a.computeBusNodeSpacing(at)-re,pe-=pt+Xe.width,at.S.h(pe,xe+wt),z=Math.max(z,xe+Xe.height+wt),b=Math.max(b,Math.abs(pe));ue++}for(1<ne&&ne%2===1&&(oe=x[ne-1],ue=oe.Da,a=a.computeBusLastRowSpacing(oe,le?Math.max(Math.abs(Ee),Math.abs(xe)):Math.max(Math.abs(Fe),Math.abs(pe))),le?(oe.S.h(E+re/2-oe.focus.x-oe.la.x,-z-ue.height-a),pe=E+re/2-oe.focus.x-oe.la.x,b=Math.max(b,pe+ue.width),0>pe&&(b-=pe),z=Math.max(z,Math.abs(Math.min(Ee,xe))+a+ue.height),0>oe.S.x&&(E=D0(y,oe.S.x,!1,E,re))):(oe.S.h(-b-ue.width-a,E+re/2-oe.focus.y-oe.la.y),b=Math.max(b,Math.abs(Math.min(Fe,pe))+a+ue.width),xe=E+re/2-oe.focus.y-oe.la.y,z=Math.max(z,xe+ue.height),0>xe&&(z-=xe),0>oe.S.y&&(E=D0(y,oe.S.y,!0,E,re)))),y=0;y<ne;y++)re=x[y],le?re.S.h(re.S.x,re.S.y+z):re.S.h(re.S.x+b,re.S.y);return new gn(E,0,b,z)}Gr.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},Gr.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function D0(a,y,x,E,b){a=a.children;for(var z=a.length,ne=0;ne<z;ne++)x?a[ne].S.h(a[ne].S.x,a[ne].S.y-y):a[ne].S.h(a[ne].S.x-y,a[ne].S.y);return y=a[z-1],Math.max(E,x?y.la.y+y.focus.y-b/2:y.la.x+y.focus.x-b/2)}function By(a,y,x){switch(a.alignment){case jf:case Tg:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case ic:return a.width>y?a.width:y;case rc:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case Vc:case oc:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case Uc:return a.width-a.focus.x+a.nodeSpacing/2+y;case Sc:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Ny(a,y,x){switch(a.alignment){case jf:case Tg:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case ic:return a.height>y?a.height:y;case rc:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case Vc:case oc:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case Uc:return a.height-a.focus.y+a.nodeSpacing/2+y;case Sc:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function ky(a,y,x){switch(a){case Tg:y/=2,x/=2;break;case jf:y/=2,x/=2;break;case ic:x=y=0;break;case rc:break;default:yt("Unhandled alignment value "+a.toString())}return new tt(y,x)}function sf(a,y,x,E,b,z){y=ky(y,x,E),If(a,y.x,y.y,b,z)}function If(a,y,x,E,b){if(y!==0||x!==0)for(a=a.children;E<=b;E++){var z=a[E].S;z.x+=y,z.y+=x}}function O0(a,y,x,E){var b=y.parent;switch(a.ud){case nc:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===b&&y.relativePoint.h(x,E);break;case Rf:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===b&&y.relativePoint.h(x,E);break;default:yt("Unhandled path value "+a.ud.toString())}}function I0(a,y,x){for(var E=0;E<a.length;E++){var b=a[E];b.x+=y,b.y+=x}}function dx(a,y,x,E,b,z,ne,re){var oe=uh(y),le=oe===90||oe===270,ue=y.nodeSpacing;y=E;var pe=b;E=z;var xe=ne,Ee=x.Yo,Fe=x.kp;ne=x.Da;var Oe=le?Math.max(xe,ne.height):Math.max(E,ne.width);if((Ee===null||oe!==uh(x))&&(Ee=Hl(a,2),Fe=Hl(a,2),le?(Ee[0].h(0,0),Ee[1].h(0,ne.height),Fe[0].h(ne.width,0),Fe[1].h(Fe[0].x,Ee[1].y)):(Ee[0].h(0,0),Ee[1].h(ne.width,0),Fe[0].h(0,ne.height),Fe[1].h(Ee[1].x,Fe[0].y))),le){if(xe=9999999,!(pe===null||2>pe.length||Ee===null||2>Ee.length))for(b=x=0;x<pe.length&&b<Ee.length;){z=pe[x];var at=Ee[b];oe=at.x,le=at.y,oe+=E;var Xe=z;x+1<pe.length&&(Xe=pe[x+1]);var pt=at;at=pt.x,pt=pt.y,b+1<Ee.length&&(pt=Ee[b+1],at=pt.x,pt=pt.y,at+=E);var wt=xe;z.y===le?wt=oe-z.x:z.y>le&&z.y<pt?wt=oe+(z.y-le)/(pt-le)*(at-oe)-z.x:le>z.y&&le<Xe.y&&(wt=oe-(z.x+(le-z.y)/(Xe.y-z.y)*(Xe.x-z.x))),wt<xe&&(xe=wt),Xe.y<=z.y?x++:pt<=le?b++:(Xe.y<=pt&&x++,pt<=Xe.y&&b++)}if(xe=E-xe,xe+=ue,x=Ee,b=xe,y===null||2>y.length||x===null||2>x.length)E=null;else{for(ue=Hl(a,y.length+x.length),E=z=oe=0;z<x.length&&x[z].y<y[0].y;)le=x[z++],ue[E++].h(le.x+b,le.y);for(;oe<y.length;)le=y[oe++],ue[E++].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[E++].h(le.x+b,le.y);for(x=Hl(a,E),oe=0;oe<E;oe++)x[oe].assign(ue[oe]);xh(a,ue),E=x}if(z=Fe,oe=xe,pe===null||2>pe.length||z===null||2>z.length)b=null;else{for(ue=Hl(a,pe.length+z.length),b=le=x=0;x<pe.length&&pe[x].y<z[0].y;)Xe=pe[x++],ue[b++].h(Xe.x,Xe.y);for(;le<z.length;)Xe=z[le++],ue[b++].h(Xe.x+oe,Xe.y);for(z=z[z.length-1].y;x<pe.length&&pe[x].y<=z;)x++;for(;x<pe.length&&pe[x].y>z;)oe=pe[x++],ue[b++].h(oe.x,oe.y);for(z=Hl(a,b),x=0;x<b;x++)z[x].assign(ue[x]);xh(a,ue),b=z}return z=Math.max(0,xe)+ne.width,ne=Oe,xh(a,y),xh(a,Ee),xh(a,pe),xh(a,Fe),re[0]=E,re[1]=b,new gn(xe,0,z,ne)}if(E=9999999,!(pe===null||2>pe.length||Ee===null||2>Ee.length))for(b=x=0;x<pe.length&&b<Ee.length;)z=pe[x],at=Ee[b],oe=at.x,le=at.y,le+=xe,Xe=z,x+1<pe.length&&(Xe=pe[x+1]),pt=at,at=pt.x,pt=pt.y,b+1<Ee.length&&(pt=Ee[b+1],at=pt.x,pt=pt.y,pt+=xe),wt=E,z.x===oe?wt=le-z.y:z.x>oe&&z.x<at?wt=le+(z.x-oe)/(at-oe)*(pt-le)-z.y:oe>z.x&&oe<Xe.x&&(wt=le-(z.y+(oe-z.x)/(Xe.x-z.x)*(Xe.y-z.y))),wt<E&&(E=wt),Xe.x<=z.x?x++:at<=oe?b++:(Xe.x<=at&&x++,at<=Xe.x&&b++);if(xe-=E,xe+=ue,x=Ee,b=xe,y===null||2>y.length||x===null||2>x.length)E=null;else{for(ue=Hl(a,y.length+x.length),E=z=oe=0;z<x.length&&x[z].x<y[0].x;)le=x[z++],ue[E++].h(le.x,le.y+b);for(;oe<y.length;)le=y[oe++],ue[E++].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[E++].h(le.x,le.y+b);for(x=Hl(a,E),oe=0;oe<E;oe++)x[oe].assign(ue[oe]);xh(a,ue),E=x}if(z=Fe,oe=xe,pe===null||2>pe.length||z===null||2>z.length)b=null;else{for(ue=Hl(a,pe.length+z.length),b=le=x=0;x<pe.length&&pe[x].x<z[0].x;)Xe=pe[x++],ue[b++].h(Xe.x,Xe.y);for(;le<z.length;)Xe=z[le++],ue[b++].h(Xe.x,Xe.y+oe);for(z=z[z.length-1].x;x<pe.length&&pe[x].x<=z;)x++;for(;x<pe.length&&pe[x].x>z;)oe=pe[x++],ue[b++].h(oe.x,oe.y);for(z=Hl(a,b),x=0;x<b;x++)z[x].assign(ue[x]);xh(a,ue),b=z}return z=Oe,ne=Math.max(0,xe)+ne.height,xh(a,y),xh(a,Ee),xh(a,pe),xh(a,Fe),re[0]=E,re[1]=b,new gn(xe,0,z,ne)}function Hl(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 xh(a,y){var x=y.length,E=a.ru[x];E===void 0&&(E=[],a.ru[x]=E),E.push(y)}Gr.prototype.arrangeTrees=function(){if(this.Rb===Z0)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof Vu){var x=y.node;if(x!==null){var E=x.position;x=E.x,E=E.y,isFinite(x)||(x=0),isFinite(E)||(E=0),Ay(this,y,x,E)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof Vu&&a.push(x);switch(this.sorting){case Ag:break;case Kp:a.reverse();break;case Vp:a.sort(this.comparer);break;case Up:a.sort(this.comparer),a.reverse();break;default:yt("Unhandled sorting value "+this.sorting.toString())}for(x=this.arrangementOrigin,y=x.x,x=x.y,E=0;E<a.length;E++){var b=a[E];switch(Ay(this,b,y+b.la.x,x+b.la.y),this.Rb){case _0:x+=b.Da.height+this.$d.height;break;case Iy:y+=b.Da.width+this.$d.width;break;default:yt("Unhandled arrangement value "+this.Rb.toString())}}}};function Ay(a,y,x,E){if(y!==null){y.x=x,y.y=E,y=y.children;for(var b=y.length,z=0;z<b;z++){var ne=y[z];Ay(a,ne,x+ne.S.x,E+ne.S.y)}}}Gr.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},Gr.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},Gr.prototype.Gu=function(){if(this.layerStyle===H0){for(var a=this.$v,y=[],x=null,E=this.network.vertexes.iterator;E.next();){var b=E.value;x===null?x=b.bounds.copy():x.ed(b.bounds);var z=y[b.level];z===void 0?z=this.computeLayerSpacing(b):z=Math.max(z,this.computeLayerSpacing(b)),y[b.level]=z}for(E=0;E<y.length;E++)y[E]===void 0&&(y[E]=0);if(this.angle===90||this.angle===270?(x.Bc(this.nodeSpacing/2,this.layerSpacing),E=new tt(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),E=new tt(-this.layerSpacing/2,-this.nodeSpacing/2)),b=[],x=this.angle===90||this.angle===270?x.width:x.height,z=0,this.angle===180||this.angle===270)for(var ne=0;ne<a.length;ne++)z+=a[ne]+y[ne];for(ne=0;ne<a.length;ne++){var re=a[ne]+y[ne];this.angle===270?(z-=re,b.push(new gn(0,z,x,re))):this.angle===90?(b.push(new gn(0,z,x,re)),z+=re):this.angle===180?(z-=re,b.push(new gn(z,0,re,x))):(b.push(new gn(z,0,re,x)),z+=re)}this.commitLayers(b,E)}},Gr.prototype.commitLayers=function(){},Gr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Gr.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof Vu&&fx(this,y)}};function fx(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,E=0;E<x;E++)fx(a,y[E])}}Gr.prototype.setPortSpots=function(a){var y=a.alignment;if(Md(y)){var x=this.ud===nc,E=uh(a);switch(E){case 0:var b=rs;break;case 90:b=Ka;break;case 180:b=za;break;default:b=Aa}var z=a.children,ne=z.length;switch(y){case Vc:case oc:for(y=0;y<ne;y++){var re=z[y];if(re=(x?re.sourceEdges:re.destinationEdges).first(),re!==null&&(re=re.link,re!==null)){var oe=E===90||E===270?za:Aa;if(ne===1||y===ne-1&&ne%2===1)switch(E){case 0:oe=za;break;case 90:oe=Aa;break;case 180:oe=rs;break;default:oe=Ka}else y%2===0&&(oe=E===90||E===270?rs:Ka);x?(a.setsPortSpot&&(re.fromSpot=b),a.setsChildPortSpot&&(re.toSpot=oe)):(a.setsPortSpot&&(re.fromSpot=oe),a.setsChildPortSpot&&(re.toSpot=b))}}break;case Uc:for(E=E===90||E===270?rs:Ka,z=x?a.destinationEdges:a.sourceEdges;z.next();)ne=z.value.link,ne!==null&&(x?(a.setsPortSpot&&(ne.fromSpot=b),a.setsChildPortSpot&&(ne.toSpot=E)):(a.setsPortSpot&&(ne.fromSpot=E),a.setsChildPortSpot&&(ne.toSpot=b)));break;case Sc:for(E=E===90||E===270?za:Aa,z=x?a.destinationEdges:a.sourceEdges;z.next();)ne=z.value.link,ne!==null&&(x?(a.setsPortSpot&&(ne.fromSpot=b),a.setsChildPortSpot&&(ne.toSpot=E)):(a.setsPortSpot&&(ne.fromSpot=E),a.setsChildPortSpot&&(ne.toSpot=b)))}}else if(x=uh(a),this.ud===nc){for(b=a.destinationEdges;b.next();)if(E=b.value.link,E!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:E.fromSpot=rs;break;case 90:E.fromSpot=Ka;break;case 180:E.fromSpot=za;break;default:E.fromSpot=Aa}else E.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.toSpot=za;break;case 90:E.toSpot=Aa;break;case 180:E.toSpot=rs;break;default:E.toSpot=Ka}else E.toSpot=a.childPortSpot}}else for(b=a.sourceEdges;b.next();)if(E=b.value.link,E!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:E.toSpot=rs;break;case 90:E.toSpot=Ka;break;case 180:E.toSpot=za;break;default:E.toSpot=Aa}else E.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.fromSpot=za;break;case 90:E.fromSpot=Aa;break;case 180:E.fromSpot=rs;break;default:E.fromSpot=Ka}else E.fromSpot=a.childPortSpot}};function uh(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}Gr.prototype.computeLayerSpacing=function(a){var y=uh(a);y=y===90||y===270;var x=a.layerSpacing;if(0<a.layerSpacingParentOverlap){var E=Math.min(1,a.layerSpacingParentOverlap);x-=y?a.height*E:a.width*E}return x<(y?-a.height:-a.width)&&(x=y?-a.height:-a.width),x},Gr.prototype.computeNodeIndent=function(a){var y=uh(a),x=a.nodeIndent;if(0<a.nodeIndentPastParent){var E=Math.min(1,a.nodeIndentPastParent);x+=y===90||y===270?a.width*E:a.height*E}return x=Math.max(0,x)},Ve.Object.defineProperties(Gr.prototype,{roots:{get:function(){return this.Ub},set:function(a){this.Ub!==a&&(this.Ub=a,this.C())}},path:{get:function(){return this.Wn},set:function(a){this.Wn!==a&&(this.Wn=a,this.C())}},treeStyle:{get:function(){return this.vo},set:function(a){this.Rb===a||a!==z0&&a!==Dy&&a!==Ty&&a!==Oy||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==Ry&&a!==jy&&a!==H0||(this.Bq=a,this.C())}},comments:{get:function(){return this.td},set:function(a){this.td!==a&&(this.td=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==_0&&a!==Iy&&a!==Z0||(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!==Ag&&a!==Kp&&a!==Vp&&!Up||(this.W.sorting=a,this.C())}},comparer:{get:function(){return this.W.comparer},set:function(a){this.W.comparer!==a&&(this.W.comparer=a,this.C())}},angle:{get:function(){return this.W.angle},set:function(a){this.W.angle!==a&&(a===0||a===90||a===180||a===270?(this.W.angle=a,this.C()):yt("TreeLayout.angle must be 0, 90, 180, or 270"))}},alignment:{get:function(){return this.W.alignment},set:function(a){this.W.alignment!==a&&(this.W.alignment=a,this.C())}},nodeIndent:{get:function(){return this.W.nodeIndent},set:function(a){this.W.nodeIndent!==a&&0<=a&&(this.W.nodeIndent=a,this.C())}},nodeIndentPastParent:{get:function(){return this.W.nodeIndentPastParent},set:function(a){this.W.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.W.nodeIndentPastParent=a,this.C())}},nodeSpacing:{get:function(){return this.W.nodeSpacing},set:function(a){this.W.nodeSpacing!==a&&(this.W.nodeSpacing=a,this.C())}},layerSpacing:{get:function(){return this.W.layerSpacing},set:function(a){this.W.layerSpacing!==a&&(this.W.layerSpacing=a,this.C())}},layerSpacingParentOverlap:{get:function(){return this.W.layerSpacingParentOverlap},set:function(a){this.W.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.W.layerSpacingParentOverlap=a,this.C())}},compaction:{get:function(){return this.W.compaction},set:function(a){this.W.compaction===a||a!==j0&&a!==Yp||(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!==Ag&&a!==Kp&&a!==Vp&&!Up||(this.Y.sorting=a,this.C())}},alternateComparer:{get:function(){return this.Y.comparer},set:function(a){this.Y.comparer!==a&&(this.Y.comparer=a,this.C())}},alternateAngle:{get:function(){return this.Y.angle},set:function(a){this.Y.angle===a||a!==0&&a!==90&&a!==180&&a!==270||(this.Y.angle=a,this.C())}},alternateAlignment:{get:function(){return this.Y.alignment},set:function(a){this.Y.alignment!==a&&(this.Y.alignment=a,this.C())}},alternateNodeIndent:{get:function(){return this.Y.nodeIndent},set:function(a){this.Y.nodeIndent!==a&&0<=a&&(this.Y.nodeIndent=a,this.C())}},alternateNodeIndentPastParent:{get:function(){return this.Y.nodeIndentPastParent},set:function(a){this.Y.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.Y.nodeIndentPastParent=a,this.C())}},alternateNodeSpacing:{get:function(){return this.Y.nodeSpacing},set:function(a){this.Y.nodeSpacing!==a&&(this.Y.nodeSpacing=a,this.C())}},alternateLayerSpacing:{get:function(){return this.Y.layerSpacing},set:function(a){this.Y.layerSpacing!==a&&(this.Y.layerSpacing=a,this.C())}},alternateLayerSpacingParentOverlap:{get:function(){return this.Y.layerSpacingParentOverlap},set:function(a){this.Y.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.Y.layerSpacingParentOverlap=a,this.C())}},alternateCompaction:{get:function(){return this.Y.compaction},set:function(a){this.Y.compaction===a||a!==j0&&a!==Yp||(this.Y.compaction=a,this.C())}},alternateBreadthLimit:{get:function(){return this.Y.breadthLimit},set:function(a){this.Y.breadthLimit!==a&&0<=a&&(this.Y.breadthLimit=a,this.C())}},alternateRowSpacing:{get:function(){return this.Y.rowSpacing},set:function(a){this.Y.rowSpacing!==a&&(this.Y.rowSpacing=a,this.C())}},alternateRowIndent:{get:function(){return this.Y.rowIndent},set:function(a){this.Y.rowIndent!==a&&0<=a&&(this.Y.rowIndent=a,this.C())}},alternateCommentSpacing:{get:function(){return this.Y.commentSpacing},set:function(a){this.Y.commentSpacing!==a&&(this.Y.commentSpacing=a,this.C())}},alternateCommentMargin:{get:function(){return this.Y.commentMargin},set:function(a){this.Y.commentMargin!==a&&(this.Y.commentMargin=a,this.C())}},alternateSetsPortSpot:{get:function(){return this.Y.setsPortSpot},set:function(a){this.Y.setsPortSpot!==a&&(this.Y.setsPortSpot=a,this.C())}},alternatePortSpot:{get:function(){return this.Y.portSpot},set:function(a){this.Y.portSpot.D(a)||(this.Y.portSpot=a,this.C())}},alternateSetsChildPortSpot:{get:function(){return this.Y.setsChildPortSpot},set:function(a){this.Y.setsChildPortSpot!==a&&(this.Y.setsChildPortSpot=a,this.C())}},alternateChildPortSpot:{get:function(){return this.Y.childPortSpot},set:function(a){this.Y.childPortSpot.D(a)||(this.Y.childPortSpot=a,this.C())}}});var R0=new fn(Gr,"PathDefault",-1),nc=new fn(Gr,"PathDestination",0),Rf=new fn(Gr,"PathSource",1),Ag=new fn(Gr,"SortingForwards",10),Kp=new fn(Gr,"SortingReverse",11),Vp=new fn(Gr,"SortingAscending",12),Up=new fn(Gr,"SortingDescending",13),Tg=new fn(Gr,"AlignmentCenterSubtrees",20),jf=new fn(Gr,"AlignmentCenterChildren",21),ic=new fn(Gr,"AlignmentStart",22),rc=new fn(Gr,"AlignmentEnd",23),Vc=new fn(Gr,"AlignmentBus",24),oc=new fn(Gr,"AlignmentBusBranching",25),Uc=new fn(Gr,"AlignmentTopLeftBus",26),Sc=new fn(Gr,"AlignmentBottomRightBus",27),j0=new fn(Gr,"CompactionNone",30),Yp=new fn(Gr,"CompactionBlock",31),z0=new fn(Gr,"StyleLayered",40),Ty=new fn(Gr,"StyleLastParents",41),Dy=new fn(Gr,"StyleAlternating",42),Oy=new fn(Gr,"StyleRootOnly",43),_0=new fn(Gr,"ArrangementVertical",50),Iy=new fn(Gr,"ArrangementHorizontal",51),Z0=new fn(Gr,"ArrangementFixedRoots",52),Ry=new fn(Gr,"LayerIndividual",60),jy=new fn(Gr,"LayerSiblings",61),H0=new fn(Gr,"LayerUniform",62);Gr.className="TreeLayout",Gr.PathDefault=R0,Gr.PathDestination=nc,Gr.PathSource=Rf,Gr.SortingForwards=Ag,Gr.SortingReverse=Kp,Gr.SortingAscending=Vp,Gr.SortingDescending=Up,Gr.AlignmentCenterSubtrees=Tg,Gr.AlignmentCenterChildren=jf,Gr.AlignmentStart=ic,Gr.AlignmentEnd=rc,Gr.AlignmentBus=Vc,Gr.AlignmentBusBranching=oc,Gr.AlignmentTopLeftBus=Uc,Gr.AlignmentBottomRightBus=Sc,Gr.CompactionNone=j0,Gr.CompactionBlock=Yp,Gr.StyleLayered=z0,Gr.StyleLastParents=Ty,Gr.StyleAlternating=Dy,Gr.StyleRootOnly=Oy,Gr.ArrangementVertical=_0,Gr.ArrangementHorizontal=Iy,Gr.ArrangementFixedRoots=Z0,Gr.LayerIndividual=Ry,Gr.LayerSiblings=jy,Gr.LayerUniform=H0;function zf(a){qo.call(this,a)}Ot(zf,qo),zf.prototype.createVertex=function(){return new Vu(this)},zf.prototype.createEdge=function(){return new Dg(this)},zf.className="TreeNetwork";function Vu(a){ps.call(this,a),this.V=!1,this.hb=null,this.u=[],this.nb=this.Ha=this.F=this.ia=0,this.td=null,this.S=new tt(0,0),this.Da=new Xn(0,0),this.la=new tt(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Ag,this.hd=ry,this.Kb=0,this.Jb=jf,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Yp,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=Co,this.wr=!0,this.Dp=Co}Ot(Vu,ps),Vu.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)},Ve.Object.defineProperties(Vu.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)}}}),Vu.className="TreeVertex";function Dg(a){ql.call(this,a),this.$t=new tt(0,0)}Ot(Dg,ql),Dg.prototype.commit=function(){var a=this.link;if(a!==null&&!a.isAvoiding){var y=this.network.layout,x=null,E=null;switch(y.ud){case nc:x=this.fromVertex,E=this.toVertex;break;case Rf:x=this.toVertex,E=this.fromVertex;break;default:yt("Unhandled path value "+y.ud.toString())}if(x!==null&&E!==null){var b=this.$t;if(b.x!==0||b.y!==0||x.qA){E=x.bounds;var z=uh(x),ne=y.computeLayerSpacing(x),re=x.rowSpacing;a.vg();var oe=a.curve===pu,le=a.isOrthogonal,ue;if(a.uh(),le||oe){for(ue=2;4<a.pointsCount;)a.pv(2);var pe=a.i(1),xe=a.i(2)}else{for(ue=1;3<a.pointsCount;)a.pv(1);pe=a.i(0),xe=a.i(a.pointsCount-1)}var Ee=a.i(a.pointsCount-1);z===0?(x.alignment===rc?(z=E.bottom+b.y,b.y===0&&pe.y>Ee.y+x.rowIndent&&(z=Math.min(z,Math.max(pe.y,z-y.computeNodeIndent(x))))):x.alignment===ic?(z=E.top+b.y,b.y===0&&pe.y<Ee.y-x.rowIndent&&(z=Math.max(z,Math.min(pe.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.top-x.la.y+b.y:E.y+E.height/2+b.y,oe?(a.m(ue,pe.x,z),ue++,a.m(ue,E.right+ne,z),ue++,a.m(ue,E.right+ne+(b.x-re)/3,z),ue++,a.m(ue,E.right+ne+2*(b.x-re)/3,z),ue++,a.m(ue,E.right+ne+(b.x-re),z),ue++,a.m(ue,xe.x,z)):(le&&(a.m(ue,E.right+ne/2,pe.y),ue++),a.m(ue,E.right+ne/2,z),ue++,a.m(ue,E.right+ne+b.x-(le?re/2:re),z),ue++,le&&a.m(ue,a.i(ue-1).x,xe.y))):z===90?(x.alignment===rc?(z=E.right+b.x,b.x===0&&pe.x>Ee.x+x.rowIndent&&(z=Math.min(z,Math.max(pe.x,z-y.computeNodeIndent(x))))):x.alignment===ic?(z=E.left+b.x,b.x===0&&pe.x<Ee.x-x.rowIndent&&(z=Math.max(z,Math.min(pe.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.left-x.la.x+b.x:E.x+E.width/2+b.x,oe?(a.m(ue,z,pe.y),ue++,a.m(ue,z,E.bottom+ne),ue++,a.m(ue,z,E.bottom+ne+(b.y-re)/3),ue++,a.m(ue,z,E.bottom+ne+2*(b.y-re)/3),ue++,a.m(ue,z,E.bottom+ne+(b.y-re)),ue++,a.m(ue,z,xe.y)):(le&&(a.m(ue,pe.x,E.bottom+ne/2),ue++),a.m(ue,z,E.bottom+ne/2),ue++,a.m(ue,z,E.bottom+ne+b.y-(le?re/2:re)),ue++,le&&a.m(ue,xe.x,a.i(ue-1).y))):z===180?(x.alignment===rc?(z=E.bottom+b.y,b.y===0&&pe.y>Ee.y+x.rowIndent&&(z=Math.min(z,Math.max(pe.y,z-y.computeNodeIndent(x))))):x.alignment===ic?(z=E.top+b.y,b.y===0&&pe.y<Ee.y-x.rowIndent&&(z=Math.max(z,Math.min(pe.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.top-x.la.y+b.y:E.y+E.height/2+b.y,oe?(a.m(ue,pe.x,z),ue++,a.m(ue,E.left-ne,z),ue++,a.m(ue,E.left-ne+(b.x+re)/3,z),ue++,a.m(ue,E.left-ne+2*(b.x+re)/3,z),ue++,a.m(ue,E.left-ne+(b.x+re),z),ue++,a.m(ue,xe.x,z)):(le&&(a.m(ue,E.left-ne/2,pe.y),ue++),a.m(ue,E.left-ne/2,z),ue++,a.m(ue,E.left-ne+b.x+(le?re/2:re),z),ue++,le&&a.m(ue,a.i(ue-1).x,xe.y))):z===270?(x.alignment===rc?(z=E.right+b.x,b.x===0&&pe.x>Ee.x+x.rowIndent&&(z=Math.min(z,Math.max(pe.x,z-y.computeNodeIndent(x))))):x.alignment===ic?(z=E.left+b.x,b.x===0&&pe.x<Ee.x-x.rowIndent&&(z=Math.max(z,Math.min(pe.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.left-x.la.x+b.x:E.x+E.width/2+b.x,oe?(a.m(ue,z,pe.y),ue++,a.m(ue,z,E.top-ne),ue++,a.m(ue,z,E.top-ne+(b.y+re)/3),ue++,a.m(ue,z,E.top-ne+2*(b.y+re)/3),ue++,a.m(ue,z,E.top-ne+(b.y+re)),ue++,a.m(ue,z,xe.y)):(le&&(a.m(ue,pe.x,E.top-ne/2),ue++),a.m(ue,z,E.top-ne/2),ue++,a.m(ue,z,E.top-ne+b.y+(le?re/2:re)),ue++,le&&a.m(ue,xe.x,a.i(ue-1).y))):yt("Invalid angle "+z),a.zf()}else b=E,a=this.link,E=this.network.layout,y=uh(x),y!==uh(b)&&(ne=E.computeLayerSpacing(x),re=x.bounds,x=b.bounds,y===0&&x.left-re.right<ne+1||y===90&&x.top-re.bottom<ne+1||y===180&&re.left-x.right<ne+1||y===270&&re.top-x.bottom<ne+1||(a.vg(),x=a.curve===pu,b=a.isOrthogonal,E=Md(this.fromVertex.alignment),a.uh(),y===0?(y=re.right+ne/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y-20,a.i(1).y),a.m(2,y-20,x),a.m(3,y,x),a.m(4,y+20,x),a.L(5,a.i(5).x,x)):b?E?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+ne/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y-20),a.m(2,x,y-20),a.m(3,x,y),a.m(4,x,y+20),a.L(5,x,a.i(5).y)):b?E?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-ne/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y+20,a.i(1).y),a.m(2,y+20,x),a.m(3,y,x),a.m(4,y-20,x),a.L(5,a.i(5).x,x)):b?E?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-ne/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y+20),a.m(2,x,y+20),a.m(3,x,y),a.m(4,x,y-20),a.L(5,x,a.i(5).y)):b?E?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()))}}},Ve.Object.defineProperties(Dg.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)}}}),Dg.className="TreeEdge",Vr.prototype.initializeStandardTools=function(){this.gb("Action",new Pr,this.mouseDownTools),this.gb("Relinking",new yi,this.mouseDownTools),this.gb("LinkReshaping",new Mi,this.mouseDownTools),this.gb("Rotating",new Ur,this.mouseDownTools),this.gb("Resizing",new pr,this.mouseDownTools),this.gb("Linking",new kn,this.mouseMoveTools),this.gb("Dragging",new aa,this.mouseMoveTools),this.gb("DragSelecting",new xr,this.mouseMoveTools),this.gb("Panning",new Ki,this.mouseMoveTools),this.gb("ContextMenu",new xo,this.mouseUpTools),this.gb("TextEditing",new oo,this.mouseUpTools),this.gb("ClickCreating",new Wr,this.mouseUpTools),this.gb("ClickSelecting",new zo,this.mouseUpTools)},Ih("Horizontal",new vm),Ih("Spot",new Sm),Ih("Table",new Pm),Ih("Viewbox",new Em),Ih("TableRow",new wm),Ih("TableColumn",new Cm),Ih("Graduated",new cp),Ih("Grid",new hp),ig.add("GraphLinksModel",Cs),ig.add("TreeModel",Au);var W0=rt.go,zy={get licenseKey(){return Qt.licenseKey},set licenseKey(a){Qt.licenseKey=a},get version(){return Qt.version},Group:gr,EnumValue:fn,List:Nn,Set:Ln,Map:xi,Point:tt,Size:Xn,Rect:gn,Margin:Di,Spot:bi,Geometry:yn,PathFigure:ho,PathSegment:_i,InputEvent:cr,DiagramEvent:lr,ChangedEvent:Ii,Model:Li,GraphLinksModel:to,TreeModel:yl,Binding:Xa,Transaction:br,UndoManager:Oo,CommandHandler:ot,Tool:Wi,DraggingTool:aa,DraggingInfo:fc,DraggingOptions:ae,LinkingBaseTool:Ht,LinkingTool:kn,RelinkingTool:yi,LinkReshapingTool:Mi,ResizingTool:pr,RotatingTool:Ur,ClickSelectingTool:zo,ActionTool:Pr,ClickCreatingTool:Wr,HTMLInfo:Fr,ContextMenuTool:xo,DragSelectingTool:xr,PanningTool:Ki,TextEditingTool:oo,ToolManager:Vr,Animation:La,AnimationManager:Ca,AnimationTrigger:Xl,Layer:fa,Diagram:Qt,Palette:ge,Overview:ye,Brush:Ao,GraphObject:Rt,Panel:Hn,RowColumnDefinition:us,Shape:Er,TextBlock:Qo,Picture:kl,Part:Oi,Adornment:lo,Node:oi,Link:Kn,Placeholder:gl,Layout:da,LayoutNetwork:qo,LayoutVertex:ps,LayoutEdge:ql,GridLayout:Ds,PanelLayout:gs,CircularLayout:xa,CircularNetwork:Bg,CircularVertex:zp,CircularEdge:C0,ForceDirectedLayout:Ks,ForceDirectedNetwork:Of,ForceDirectedVertex:_p,ForceDirectedEdge:Zp,LayeredDigraphLayout:Ro,LayeredDigraphNetwork:kg,LayeredDigraphVertex:Du,LayeredDigraphEdge:Gp,TreeLayout:Gr,TreeNetwork:zf,TreeVertex:Vu,TreeEdge:Dg};typeof W0=="object"&&W0.version&&ri("WARNING: a `go` object on the root object is already defined. "+("Debug"in W0?"debug ":"")+"version: "+W0.version+", replaced with version: "+zy.version),Qt.prototype.go=zy,rt.go=zy,typeof Pn.exports=="object"&&(Pn.exports=typeof ve.g!="undefined"?ve.g.go:self.go)}();var ce=typeof ve.g!="undefined"?ve.g.go:self.go;const De=typeof ve.g!="undefined"?ve.g.go:self.go,_e=De.Group,Ct=De.EnumValue,Ze=De.List,Ke=De.Set,Be=De.Map,mt=De.Point,ct=De.Size,He=De.Rect,Et=De.Margin,ht=De.Spot,dt=De.Geometry,Ae=De.PathFigure,te=De.PathSegment,ee=De.InputEvent,he=De.DiagramEvent,se=De.ChangedEvent,de=De.Model,me=De.GraphLinksModel,we=De.TreeModel,be=De.Binding,Me=De.Transaction,Ie=De.UndoManager,ze=De.CommandHandler,et=De.Tool,$e=De.DraggingTool,gt=De.DraggingInfo,je=De.LinkingBaseTool,Tt=De.LinkingTool,Qe=De.RelinkingTool,bt=De.LinkReshapingTool,Nt=De.ResizingTool,At=De.RotatingTool,Zt=De.ClickSelectingTool,Yt=De.ActionTool,ut=De.ClickCreatingTool,Ge=De.HTMLInfo,kt=De.ContextMenuTool,ln=De.DragSelectingTool,sn=De.PanningTool,Bt=De.TextEditingTool,Gt=De.ToolManager,en=De.Animation,Bn=De.AnimationManager,rn=De.AnimationTrigger,Cn=De.Layer,ft=De.Diagram,En=De.Palette,Vn=De.Overview,Re=De.Brush,Ce=De.GraphObject,Pe=De.Panel,Ne=De.RowColumnDefinition,ke=De.Shape,Se=De.TextBlock,nt=De.TextBlockMetrics,Pt=De.Picture,qe=De.Part,Ue=De.Adornment,St=De.Node,vt=De.Link,lt=De.Placeholder,Dt=De.Layout,un=De.LayoutNetwork,Xt=De.LayoutVertex,$t=De.LayoutEdge,wn=De.GridLayout,bn=De.PanelLayout,pn=De.CircularLayout,Yn=De.CircularNetwork,ai=De.CircularVertex,Wn=De.CircularEdge,Rn=De.ForceDirectedLayout,ii=De.ForceDirectedNetwork,pi=De.ForceDirectedVertex,gi=De.ForceDirectedEdge,Ri=De.LayeredDigraphLayout,Ji=De.LayeredDigraphNetwork,Un=De.LayeredDigraphVertex,$n=De.LayeredDigraphEdge,ti=De.TreeLayout,Pi=De.TreeNetwork,mi=De.TreeVertex,nr=De.TreeEdge,ji=De.version},24334:function(Pn,an,ve){var ce,De;(function(_e,Ct){Pn.exports=Ct(_e)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof ve.g!="undefined"?ve.g:this,function(_e){"use strict";_e=_e||{};var Ct=_e.Base64,Ze="2.6.4",Ke="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Be=function(Qe){for(var bt={},Nt=0,At=Qe.length;Nt<At;Nt++)bt[Qe.charAt(Nt)]=Nt;return bt}(Ke),mt=String.fromCharCode,ct=function(Qe){if(Qe.length<2){var bt=Qe.charCodeAt(0);return bt<128?Qe:bt<2048?mt(192|bt>>>6)+mt(128|bt&63):mt(224|bt>>>12&15)+mt(128|bt>>>6&63)+mt(128|bt&63)}else{var bt=65536+(Qe.charCodeAt(0)-55296)*1024+(Qe.charCodeAt(1)-56320);return mt(240|bt>>>18&7)+mt(128|bt>>>12&63)+mt(128|bt>>>6&63)+mt(128|bt&63)}},He=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Et=function(Qe){return Qe.replace(He,ct)},ht=function(Qe){var bt=[0,2,1][Qe.length%3],Nt=Qe.charCodeAt(0)<<16|(Qe.length>1?Qe.charCodeAt(1):0)<<8|(Qe.length>2?Qe.charCodeAt(2):0),At=[Ke.charAt(Nt>>>18),Ke.charAt(Nt>>>12&63),bt>=2?"=":Ke.charAt(Nt>>>6&63),bt>=1?"=":Ke.charAt(Nt&63)];return At.join("")},dt=_e.btoa&&typeof _e.btoa=="function"?function(Qe){return _e.btoa(Qe)}:function(Qe){if(Qe.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return Qe.replace(/[\s\S]{1,3}/g,ht)},Ae=function(Qe){return dt(Et(String(Qe)))},te=function(Qe){return Qe.replace(/[+\/]/g,function(bt){return bt=="+"?"-":"_"}).replace(/=/g,"")},ee=function(Qe,bt){return bt?te(Ae(Qe)):Ae(Qe)},he=function(Qe){return ee(Qe,!0)},se;_e.Uint8Array&&(se=function(Qe,bt){for(var Nt="",At=0,Zt=Qe.length;At<Zt;At+=3){var Yt=Qe[At],ut=Qe[At+1],Ge=Qe[At+2],kt=Yt<<16|ut<<8|Ge;Nt+=Ke.charAt(kt>>>18)+Ke.charAt(kt>>>12&63)+(typeof ut!="undefined"?Ke.charAt(kt>>>6&63):"=")+(typeof Ge!="undefined"?Ke.charAt(kt&63):"=")}return bt?te(Nt):Nt});var de=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,me=function(Qe){switch(Qe.length){case 4:var bt=(7&Qe.charCodeAt(0))<<18|(63&Qe.charCodeAt(1))<<12|(63&Qe.charCodeAt(2))<<6|63&Qe.charCodeAt(3),Nt=bt-65536;return mt((Nt>>>10)+55296)+mt((Nt&1023)+56320);case 3:return mt((15&Qe.charCodeAt(0))<<12|(63&Qe.charCodeAt(1))<<6|63&Qe.charCodeAt(2));default:return mt((31&Qe.charCodeAt(0))<<6|63&Qe.charCodeAt(1))}},we=function(Qe){return Qe.replace(de,me)},be=function(Qe){var bt=Qe.length,Nt=bt%4,At=(bt>0?Be[Qe.charAt(0)]<<18:0)|(bt>1?Be[Qe.charAt(1)]<<12:0)|(bt>2?Be[Qe.charAt(2)]<<6:0)|(bt>3?Be[Qe.charAt(3)]:0),Zt=[mt(At>>>16),mt(At>>>8&255),mt(At&255)];return Zt.length-=[0,0,2,1][Nt],Zt.join("")},Me=_e.atob&&typeof _e.atob=="function"?function(Qe){return _e.atob(Qe)}:function(Qe){return Qe.replace(/\S{1,4}/g,be)},Ie=function(Qe){return Me(String(Qe).replace(/[^A-Za-z0-9\+\/]/g,""))},ze=function(Qe){return we(Me(Qe))},et=function(Qe){return String(Qe).replace(/[-_]/g,function(bt){return bt=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},$e=function(Qe){return ze(et(Qe))},gt;_e.Uint8Array&&(gt=function(Qe){return Uint8Array.from(Ie(et(Qe)),function(bt){return bt.charCodeAt(0)})});var je=function(){var Qe=_e.Base64;return _e.Base64=Ct,Qe};if(_e.Base64={VERSION:Ze,atob:Ie,btoa:dt,fromBase64:$e,toBase64:ee,utob:Et,encode:ee,encodeURI:he,btou:we,decode:$e,noConflict:je,fromUint8Array:se,toUint8Array:gt},typeof Object.defineProperty=="function"){var Tt=function(Qe){return{value:Qe,enumerable:!1,writable:!0,configurable:!0}};_e.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",Tt(function(){return $e(this)})),Object.defineProperty(String.prototype,"toBase64",Tt(function(Qe){return ee(this,Qe)})),Object.defineProperty(String.prototype,"toBase64URI",Tt(function(){return ee(this,!0)}))}}return _e.Meteor&&(Base64=_e.Base64),Pn.exports?Pn.exports.Base64=_e.Base64:(ce=[],De=function(){return _e.Base64}.apply(an,ce),De!==void 0&&(Pn.exports=De)),{Base64:_e.Base64}})},2859:function(Pn,an,ve){"use strict";ve.d(an,{hP:function(){return Vn}});var ce=function(Re,Ce){return(ce=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Pe,Ne){Pe.__proto__=Ne}||function(Pe,Ne){for(var ke in Ne)Object.prototype.hasOwnProperty.call(Ne,ke)&&(Pe[ke]=Ne[ke])})(Re,Ce)};function De(Re,Ce){function Pe(){this.constructor=Re}ce(Re,Ce),Re.prototype=Ce===null?Object.create(Ce):(Pe.prototype=Ce.prototype,new Pe)}function _e(Re,Ce,Pe,Ne){return new(Pe||(Pe=Promise))(function(ke,Se){function nt(Ue){try{qe(Ne.next(Ue))}catch(St){Se(St)}}function Pt(Ue){try{qe(Ne.throw(Ue))}catch(St){Se(St)}}function qe(Ue){var St;Ue.done?ke(Ue.value):(St=Ue.value,St instanceof Pe?St:new Pe(function(vt){vt(St)})).then(nt,Pt)}qe((Ne=Ne.apply(Re,Ce||[])).next())})}function Ct(Re,Ce){var Pe,Ne,ke,Se,nt={label:0,sent:function(){if(1&ke[0])throw ke[1];return ke[1]},trys:[],ops:[]};return Se={next:Pt(0),throw:Pt(1),return:Pt(2)},typeof Symbol=="function"&&(Se[Symbol.iterator]=function(){return this}),Se;function Pt(qe){return function(Ue){return function(St){if(Pe)throw new TypeError("Generator is already executing.");for(;nt;)try{if(Pe=1,Ne&&(ke=2&St[0]?Ne.return:St[0]?Ne.throw||((ke=Ne.return)&&ke.call(Ne),0):Ne.next)&&!(ke=ke.call(Ne,St[1])).done)return ke;switch(Ne=0,ke&&(St=[2&St[0],ke.value]),St[0]){case 0:case 1:ke=St;break;case 4:return nt.label++,{value:St[1],done:!1};case 5:nt.label++,Ne=St[1],St=[0];continue;case 7:St=nt.ops.pop(),nt.trys.pop();continue;default:if(ke=nt.trys,!((ke=ke.length>0&&ke[ke.length-1])||St[0]!==6&&St[0]!==2)){nt=0;continue}if(St[0]===3&&(!ke||St[1]>ke[0]&&St[1]<ke[3])){nt.label=St[1];break}if(St[0]===6&&nt.label<ke[1]){nt.label=ke[1],ke=St;break}if(ke&&nt.label<ke[2]){nt.label=ke[2],nt.ops.push(St);break}ke[2]&&nt.ops.pop(),nt.trys.pop();continue}St=Ce.call(Re,nt)}catch(vt){St=[6,vt],Ne=0}finally{Pe=ke=0}if(5&St[0])throw St[1];return{value:St[0]?St[1]:void 0,done:!0}}([qe,Ue])}}}function Ze(){for(var Re=0,Ce=0,Pe=arguments.length;Ce<Pe;Ce++)Re+=arguments[Ce].length;var Ne=Array(Re),ke=0;for(Ce=0;Ce<Pe;Ce++)for(var Se=arguments[Ce],nt=0,Pt=Se.length;nt<Pt;nt++,ke++)Ne[ke]=Se[nt];return Ne}var Ke=function(){function Re(){}return Re.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Re.setAttributes=function(Ce,Pe){for(var Ne=0,ke=Pe;Ne<ke.length;Ne++){var Se=ke[Ne],nt=Se[0],Pt=Se[1];Ce.setAttribute(nt,Pt)}},Re.createRect=function(Ce,Pe,Ne){var ke=document.createElementNS("http://www.w3.org/2000/svg","rect");return ke.setAttribute("width",Ce.toString()),ke.setAttribute("height",Pe.toString()),Ne&&Re.setAttributes(ke,Ne),ke},Re.createLine=function(Ce,Pe,Ne,ke,Se){var nt=document.createElementNS("http://www.w3.org/2000/svg","line");return nt.setAttribute("x1",Ce.toString()),nt.setAttribute("y1",Pe.toString()),nt.setAttribute("x2",Ne.toString()),nt.setAttribute("y2",ke.toString()),Se&&Re.setAttributes(nt,Se),nt},Re.createPolygon=function(Ce,Pe){var Ne=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Ne.setAttribute("points",Ce),Pe&&Re.setAttributes(Ne,Pe),Ne},Re.createCircle=function(Ce,Pe){var Ne=document.createElementNS("http://www.w3.org/2000/svg","circle");return Ne.setAttribute("cx",(Ce/2).toString()),Ne.setAttribute("cy",(Ce/2).toString()),Ne.setAttribute("r",Ce.toString()),Pe&&Re.setAttributes(Ne,Pe),Ne},Re.createEllipse=function(Ce,Pe,Ne){var ke=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ke.setAttribute("cx",(Ce/2).toString()),ke.setAttribute("cy",(Pe/2).toString()),ke.setAttribute("rx",(Ce/2).toString()),ke.setAttribute("ry",(Pe/2).toString()),Ne&&Re.setAttributes(ke,Ne),ke},Re.createGroup=function(Ce){var Pe=document.createElementNS("http://www.w3.org/2000/svg","g");return Ce&&Re.setAttributes(Pe,Ce),Pe},Re.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Re.createMarker=function(Ce,Pe,Ne,ke,Se,nt,Pt){var qe=document.createElementNS("http://www.w3.org/2000/svg","marker");return Re.setAttributes(qe,[["id",Ce],["orient",Pe],["markerWidth",Ne.toString()],["markerHeight",ke.toString()],["refX",Se.toString()],["refY",nt.toString()]]),qe.appendChild(Pt),qe},Re.createText=function(Ce){var Pe=document.createElementNS("http://www.w3.org/2000/svg","text");return Pe.setAttribute("x","0"),Pe.setAttribute("y","0"),Ce&&Re.setAttributes(Pe,Ce),Pe},Re.createTSpan=function(Ce,Pe){var Ne=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Ne.textContent=Ce,Pe&&Re.setAttributes(Ne,Pe),Ne},Re.createImage=function(Ce){var Pe=document.createElementNS("http://www.w3.org/2000/svg","image");return Ce&&Re.setAttributes(Pe,Ce),Pe},Re.createPoint=function(Ce,Pe){var Ne=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Ne.x=Ce,Ne.y=Pe,Ne},Re.createPath=function(Ce,Pe){var Ne=document.createElementNS("http://www.w3.org/2000/svg","path");return Ne.setAttribute("d",Ce),Pe&&Re.setAttributes(Ne,Pe),Ne},Re}(),Be=function(){function Re(){}return Re.addKey=function(Ce){Re.key=Ce},Object.defineProperty(Re,"isLicensed",{get:function(){return!!Re.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Re.key)},enumerable:!1,configurable:!0}),Re}(),mt=function(){function Re(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Re.prototype.rasterize=function(Ce,Pe,Ne){var ke=this;return new Promise(function(Se){var nt=Ne!==void 0?Ne:document.createElement("canvas");Ce===null&&(ke.markersOnly=!0,ke.naturalSize=!1);var Pt=document.createElementNS("http://www.w3.org/2000/svg","svg");Pt.setAttribute("xmlns","http://www.w3.org/2000/svg"),Pt.setAttribute("width",Pe.width.baseVal.valueAsString),Pt.setAttribute("height",Pe.height.baseVal.valueAsString),Pt.setAttribute("viewBox","0 0 "+Pe.viewBox.baseVal.width.toString()+" "+Pe.viewBox.baseVal.height.toString()),Pt.innerHTML=Pe.innerHTML,ke.naturalSize===!0?(Pt.width.baseVal.value=Ce.naturalWidth,Pt.height.baseVal.value=Ce.naturalHeight):ke.width!==void 0&&ke.height!==void 0&&(Pt.width.baseVal.value=ke.width,Pt.height.baseVal.value=ke.height),nt.width=Pt.width.baseVal.value,nt.height=Pt.height.baseVal.value;var qe=Pt.outerHTML,Ue=nt.getContext("2d");ke.markersOnly!==!0&&Ue.drawImage(Ce,0,0,nt.width,nt.height);var St=window.URL,vt=new Image(nt.width,nt.height);vt.setAttribute("crossOrigin","anonymous");var lt=new Blob([qe],{type:"image/svg+xml"}),Dt=St.createObjectURL(lt);vt.onload=function(){Ue.drawImage(vt,0,0),St.revokeObjectURL(Dt);var un=nt.toDataURL(ke.imageType,ke.imageQuality);Se(un)},vt.src=Dt})},Re}(),ct=function(){},He=function(){function Re(Ce){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+Ce+"_"}return Object.defineProperty(Re.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Re.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(Re.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Re.prototype.addClass=function(Ce){return this.styleSheet===void 0&&this.addStyleSheet(),Ce.name=""+this.classNamePrefix+Ce.localName,this.classes.push(Ce),this.styleSheet.sheet.insertRule("."+Ce.name+" {"+Ce.style+"}",this.styleSheet.sheet.cssRules.length),Ce},Re.prototype.addRule=function(Ce){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(Ce),this.styleSheet.sheet.insertRule(Ce.selector+" {"+Ce.style+"}",this.styleSheet.sheet.cssRules.length)},Re.prototype.addStyleSheet=function(){var Ce;this.styleSheet=document.createElement("style"),((Ce=this.styleSheetRoot)!==null&&Ce!==void 0?Ce:document.head).appendChild(this.styleSheet),this.addRule(new Et("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Et("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new Et("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new ht("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new ht("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},Re.prototype.removeStyleSheet=function(){var Ce;this.styleSheet&&(((Ce=this.styleSheetRoot)!==null&&Ce!==void 0?Ce:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Re}(),Et=function(Re,Ce){this.selector=Re,this.style=Ce},ht=function(Re,Ce){this.localName=Re,this.style=Ce},dt=function(){function Re(Ce,Pe,Ne,ke,Se){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=Ce,this.displayMode=Pe,this.markerItems=Ne,this.uiStyleSettings=ke,this.styles=Se,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Re.prototype.show=function(Ce){var Pe=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Ce,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Ne=document.createElement("div");Ne.className=this.toolbarBlockStyleClass.name,Ne.style.whiteSpace="nowrap",this.uiContainer.appendChild(Ne),this.addActionButton(Ne,'<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(Ne,'<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(Ne,'<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(Ne,'<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(Ne,'<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(Ne,'<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(Ne,'<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(Ne,'<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(Se){var nt=document.createElement("div");nt.className=""+Pe.toolbarButtonStyleClass.name,nt.setAttribute("data-type-name",Se.typeName),nt.innerHTML=Se.icon,nt.addEventListener("click",function(){Pe.markerToolbarButtonClicked(nt,Se)}),Pe.buttons.push(nt),Pe.markerButtons.push(nt)}),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 ke=document.createElement("div");ke.className=this.toolbarBlockStyleClass.name,ke.style.whiteSpace="nowrap",ke.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ke),this.addActionButton(ke,'<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(ke,'<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()},Re.prototype.addButtonClickListener=function(Ce){this.buttonClickListeners.push(Ce)},Re.prototype.removeButtonClickListener=function(Ce){this.buttonClickListeners.indexOf(Ce)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Ce),1)},Re.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Re.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var Ce=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<Ce||Pe===Ce&&this.markerButtons.length-1===Ce?this.markerButtonBlock.appendChild(this.markerButtons[Pe]):(Pe===Ce&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Pe]))}},Re.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")},Re.prototype.resetButtonStyles=function(){var Ce=this;this.buttons.forEach(function(Pe){Pe.className=Pe.className.replace(Ce.uiStyleSettings.toolbarButtonStyleColorsClassName?Ce.uiStyleSettings.toolbarButtonStyleColorsClassName:Ce.toolbarButtonStyleColorsClass.name,"").trim(),Pe.className=Pe.className.replace(Ce.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?Ce.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:Ce.toolbarActiveButtonStyleColorsClass.name,"").trim(),Pe.className+=" "+(Ce.uiStyleSettings.toolbarButtonStyleColorsClassName?Ce.uiStyleSettings.toolbarButtonStyleColorsClassName:Ce.toolbarButtonStyleColorsClass.name)})},Re.prototype.addActionButton=function(Ce,Pe,Ne){var ke=this,Se=document.createElement("div");switch(Se.className=""+this.toolbarButtonStyleClass.name,Se.innerHTML=Pe,Se.setAttribute("data-action",Ne),Se.addEventListener("click",function(){ke.actionToolbarButtonClicked(Se,Ne)}),Ne){case"select":Se.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Se.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Se.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Se.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Se.style.fill=this.uiStyleSettings.closeButtonColor}Ce.appendChild(Se),this.buttons.push(Se)},Re.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ht("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 ht("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ht("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ht("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 ht("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var Ce=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ht("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*Ce)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*Ce)+`px;
|
|
|
padding: `+Ce+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new ht("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ht("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new Et("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new Et("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},Re.prototype.markerToolbarButtonClicked=function(Ce,Pe){this.setActiveButton(Ce),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Ne){return Ne("marker",Pe)}),this.markerButtonOverflowBlock.style.display="none"},Re.prototype.actionToolbarButtonClicked=function(Ce,Pe){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Ne){return Ne("action",Pe)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Re.prototype.setActiveButton=function(Ce){this.resetButtonStyles(),Ce.className=Ce.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),Ce.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Re.prototype.setActiveMarkerButton=function(Ce){var Pe=this.markerButtons.find(function(Ne){return Ne.getAttribute("data-type-name")===Ce});Pe&&this.setActiveButton(Pe)},Re.prototype.setCurrentMarker=function(Ce){var Pe=this;this.currentMarker=Ce,this.buttons.filter(function(Ne){return/delete|notes/.test(Ne.getAttribute("data-action"))}).forEach(function(Ne){Pe.currentMarker===void 0?(Ne.style.fillOpacity="0.4",Ne.style.pointerEvents="none"):(Ne.style.fillOpacity="1",Ne.style.pointerEvents="all")})},Re}(),Ae=function(){function Re(Ce,Pe,Ne,ke){this.panels=[],this.panelButtons=[],this.markerjsContainer=Ce,this.displayMode=Pe,this.uiStyleSettings=Ne,this.styles=ke,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Re.prototype.addStyles=function(){var Ce;this.toolboxStyleClass=this.styles.addClass(new ht("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 ht("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var Pe=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ht("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ht("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ht("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 ht("toolbox-panel-row_colors",`
|
|
|
background-color: `+((Ce=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Ce!==void 0?Ce:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ht("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 ht("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ht("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new Et("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new Et("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},Re.prototype.show=function(Ce){var Pe;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Ce,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Pe=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Pe!==void 0?Pe:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Re.prototype.setPanelButtons=function(Ce){var Pe,Ne,ke=this;this.panels=Ce,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+" "+((Ne=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Ne!==void 0?Ne:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Se){var nt;Se.uiStyleSettings=ke.uiStyleSettings;var Pt=document.createElement("div");Pt.className=ke.toolboxButtonStyleClass.name+" "+((nt=ke.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&nt!==void 0?nt:ke.toolboxButtonStyleColorsClass.name),Pt.innerHTML=Se.icon,Pt.title=Se.title,Pt.addEventListener("click",function(){ke.panelButtonClick(Se)}),ke.panelButtons.push(Pt),ke.buttonRow.appendChild(Pt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Re.prototype.panelButtonClick=function(Ce){var Pe=this,Ne=-1;if(Ce!==this.activePanel){Ne=this.panels.indexOf(Ce),this.panelRow.innerHTML="";var ke=Ce.getUi();ke.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ke),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=Ce}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(Se,nt){var Pt,qe;Se.className=Pe.toolboxButtonStyleClass.name+" "+(nt===Ne?""+((Pt=Pe.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Pt!==void 0?Pt:Pe.toolboxActiveButtonStyleColorsClass.name):""+((qe=Pe.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&qe!==void 0?qe:Pe.toolboxButtonStyleColorsClass.name))})},Re}(),te=function(Re,Ce){this.title=Re,this.icon=Ce},ee=function(Re){function Ce(Pe,Ne,ke,Se){var nt=Re.call(this,Pe,Se||'<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 nt.colors=[],nt.addTransparent=!1,nt.colorBoxes=[],nt.colors=Ne,nt.currentColor=ke,nt.setCurrentColor=nt.setCurrentColor.bind(nt),nt.getColorBox=nt.getColorBox.bind(nt),nt}return De(Ce,Re),Ce.prototype.getUi=function(){var Pe=this,Ne=document.createElement("div");return Ne.style.overflow="hidden",Ne.style.whiteSpace="nowrap",this.colors.forEach(function(ke){var Se=Pe.getColorBox(ke);Ne.appendChild(Se),Pe.colorBoxes.push(Se)}),Ne},Ce.prototype.getColorBox=function(Pe){var Ne=this,ke=this.uiStyleSettings.toolbarHeight/4,Se=this.uiStyleSettings.toolbarHeight-ke,nt=document.createElement("div");nt.style.display="inline-block",nt.style.boxSizing="content-box",nt.style.width=Se-2+"px",nt.style.height=Se-2+"px",nt.style.padding="1px",nt.style.marginRight="2px",nt.style.marginBottom="2px",nt.style.borderWidth="2px",nt.style.borderStyle="solid",nt.style.borderRadius=(Se+2)/2+"px",nt.style.borderColor=Pe===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",nt.addEventListener("click",function(){Ne.setCurrentColor(Pe,nt)});var Pt=document.createElement("div");return Pt.style.display="inline-block",Pt.style.width=Se-2+"px",Pt.style.height=Se-2+"px",Pt.style.backgroundColor=Pe,Pt.style.borderRadius=Se/2+"px",Pe==="transparent"&&(Pt.style.fill=this.uiStyleSettings.toolboxAccentColor,Pt.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>`),nt.appendChild(Pt),nt},Ce.prototype.setCurrentColor=function(Pe,Ne){var ke=this;this.currentColor=Pe,this.colorBoxes.forEach(function(Se){Se.style.borderColor=Se===Ne?ke.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Pe)},Ce}(te),he=function(){function Re(Ce,Pe,Ne){this._state="new",this._isSelected=!1,this._container=Ce,this._overlayContainer=Pe,this.globalSettings=Ne,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Re.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Re.prototype.ownsTarget=function(Ce){return!1},Object.defineProperty(Re.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Re.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Re.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Re.prototype.pointerDown=function(Ce,Pe){},Re.prototype.dblClick=function(Ce,Pe){},Re.prototype.manipulate=function(Ce){},Re.prototype.pointerUp=function(Ce){this.stateChanged()},Re.prototype.dispose=function(){},Re.prototype.addMarkerVisualToContainer=function(Ce){this.container.childNodes.length>0?this.container.insertBefore(Ce,this.container.childNodes[0]):this.container.appendChild(Ce)},Re.prototype.getState=function(){return{typeName:Re.typeName,state:this.state,notes:this.notes}},Re.prototype.restoreState=function(Ce){this._state=Ce.state,this.notes=Ce.notes},Re.prototype.scale=function(Ce,Pe){},Re.prototype.colorChanged=function(Ce){this.onColorChanged&&this.onColorChanged(Ce),this.stateChanged()},Re.prototype.fillColorChanged=function(Ce){this.onFillColorChanged&&this.onFillColorChanged(Ce),this.stateChanged()},Re.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var Ce=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),Ce.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(Ce)&&this.onStateChanged(this)}},Re.typeName="MarkerBase",Re}(),se=function(){function Re(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Re.prototype.findGripByVisual=function(Ce){return this.topLeft.ownsTarget(Ce)?this.topLeft:this.topCenter.ownsTarget(Ce)?this.topCenter:this.topRight.ownsTarget(Ce)?this.topRight:this.centerLeft.ownsTarget(Ce)?this.centerLeft:this.centerRight.ownsTarget(Ce)?this.centerRight:this.bottomLeft.ownsTarget(Ce)?this.bottomLeft:this.bottomCenter.ownsTarget(Ce)?this.bottomCenter:this.bottomRight.ownsTarget(Ce)?this.bottomRight:void 0},Re}(),de=function(){function Re(){this.GRIP_SIZE=10,this.visual=Ke.createGroup(),this.visual.appendChild(Ke.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Ke.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Re.prototype.ownsTarget=function(Ce){return Ce===this.visual||Ce===this.visual.childNodes[0]||Ce===this.visual.childNodes[1]},Re}(),me=function(){function Re(){}return Re.toITransformMatrix=function(Ce){return{a:Ce.a,b:Ce.b,c:Ce.c,d:Ce.d,e:Ce.e,f:Ce.f}},Re.toSVGMatrix=function(Ce,Pe){return Ce.a=Pe.a,Ce.b=Pe.b,Ce.c=Pe.c,Ce.d=Pe.d,Ce.e=Pe.e,Ce.f=Pe.f,Ce},Re}(),we=function(Re){function Ce(Pe,Ne,ke){var Se=Re.call(this,Pe,Ne,ke)||this;return Se.left=0,Se.top=0,Se.width=0,Se.height=0,Se.defaultSize={x:50,y:20},Se.offsetX=0,Se.offsetY=0,Se.rotationAngle=0,Se.CB_DISTANCE=10,Se._suppressMarkerCreateEvent=!1,Se.container.transform.baseVal.appendItem(Ke.createTransform()),Se.setupControlBox(),Se}return De(Ce,Re),Object.defineProperty(Ce.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"visual",{get:function(){return this._visual},set:function(Pe){this._visual=Pe;var Ne=Ke.createTransform();this._visual.transform.baseVal.appendItem(Ne)},enumerable:!1,configurable:!0}),Ce.prototype.ownsTarget=function(Pe){return!!Re.prototype.ownsTarget.call(this,Pe)||!!(this.controlGrips.findGripByVisual(Pe)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Pe))},Ce.prototype.pointerDown=function(Pe,Ne){Re.prototype.pointerDown.call(this,Pe,Ne),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 ke=this.unrotatePoint(Pe);if(this.manipulationStartX=ke.x,this.manipulationStartY=ke.y,this.offsetX=ke.x-this.left,this.offsetY=ke.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Ne),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Ne)){this.activeGrip=this.rotatorGrip;var Se=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Se.x-this.width/2,this.top=Se.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var nt=this.container.transform.baseVal.getItem(0);nt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(nt,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},Ce.prototype.pointerUp=function(Pe){var Ne=this.state;Re.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",Ne==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},Ce.prototype.moveVisual=function(Pe){this.visual.style.transform="translate("+Pe.x+"px, "+Pe.y+"px)"},Ce.prototype.manipulate=function(Pe){var Ne=this.unrotatePoint(Pe);this.state==="creating"?this.resize(Pe):this.state==="move"?(this.left=this.manipulationStartLeft+(Ne.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Ne.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Ne):this.state==="rotate"&&this.rotate(Pe)},Ce.prototype.resize=function(Pe){var Ne=this.manipulationStartLeft,ke=this.manipulationStartWidth,Se=this.manipulationStartTop,nt=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Ne=this.manipulationStartLeft+Pe.x-this.manipulationStartX,ke=this.manipulationStartWidth+this.manipulationStartLeft-Ne;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ke=this.manipulationStartWidth+Pe.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Se=this.manipulationStartTop+Pe.y-this.manipulationStartY,nt=this.manipulationStartHeight+this.manipulationStartTop-Se;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:nt=this.manipulationStartHeight+Pe.y-this.manipulationStartY}ke>=0?(this.left=Ne,this.width=ke):(this.left=Ne+ke,this.width=-ke),nt>=0?(this.top=Se,this.height=nt):(this.top=Se+nt,this.height=-nt),this.setSize()},Ce.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Ce.prototype.rotate=function(Pe){if(Math.abs(Pe.x-this.centerX)>.1){var Ne=Math.sign(Pe.x-this.centerX);this.rotationAngle=180*Math.atan((Pe.y-this.centerY)/(Pe.x-this.centerX))/Math.PI+90*Ne,this.applyRotation()}},Ce.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)},Ce.prototype.rotatePoint=function(Pe){if(this.rotationAngle===0)return Pe;var Ne=this.container.getCTM(),ke=Ke.createPoint(Pe.x,Pe.y);return{x:(ke=ke.matrixTransform(Ne)).x,y:ke.y}},Ce.prototype.unrotatePoint=function(Pe){if(this.rotationAngle===0)return Pe;var Ne=this.container.getCTM();Ne=Ne.inverse();var ke=Ke.createPoint(Pe.x,Pe.y);return{x:(ke=ke.matrixTransform(Ne)).x,y:ke.y}},Ce.prototype.select=function(){Re.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Ce.prototype.deselect=function(){Re.prototype.deselect.call(this),this.controlBox.style.display="none"},Ce.prototype.setupControlBox=function(){this.controlBox=Ke.createGroup();var Pe=Ke.createTransform();Pe.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Pe),this.container.appendChild(this.controlBox),this.controlRect=Ke.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=Ke.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"},Ce.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()},Ce.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()},Ce.prototype.createGrip=function(){var Pe=new de;return Pe.visual.transform.baseVal.appendItem(Ke.createTransform()),this.controlBox.appendChild(Pe.visual),Pe},Ce.prototype.positionGrips=function(){var Pe=this.controlGrips.topLeft.GRIP_SIZE,Ne=-Pe/2,ke=Ne,Se=(this.width+this.CB_DISTANCE)/2-Pe/2,nt=(this.height+this.CB_DISTANCE)/2-Pe/2,Pt=this.height+this.CB_DISTANCE-Pe/2,qe=this.width+this.CB_DISTANCE-Pe/2;this.positionGrip(this.controlGrips.topLeft.visual,Ne,ke),this.positionGrip(this.controlGrips.topCenter.visual,Se,ke),this.positionGrip(this.controlGrips.topRight.visual,qe,ke),this.positionGrip(this.controlGrips.centerLeft.visual,Ne,nt),this.positionGrip(this.controlGrips.centerRight.visual,qe,nt),this.positionGrip(this.controlGrips.bottomLeft.visual,Ne,Pt),this.positionGrip(this.controlGrips.bottomCenter.visual,Se,Pt),this.positionGrip(this.controlGrips.bottomRight.visual,qe,Pt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Se,ke-3*this.CB_DISTANCE)},Ce.prototype.positionGrip=function(Pe,Ne,ke){var Se=Pe.transform.baseVal.getItem(0);Se.setTranslate(Ne,ke),Pe.transform.baseVal.replaceItem(Se,0)},Ce.prototype.hideControlBox=function(){this.controlBox.style.display="none"},Ce.prototype.showControlBox=function(){this.controlBox.style.display=""},Ce.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:me.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:me.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Re.prototype.getState.call(this))},Ce.prototype.restoreState=function(Pe){Re.prototype.restoreState.call(this,Pe);var Ne=Pe;this.left=Ne.left,this.top=Ne.top,this.width=Ne.width,this.height=Ne.height,this.rotationAngle=Ne.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(me.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Ne.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(me.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Ne.containerTransformMatrix))},Ce.prototype.scale=function(Pe,Ne){Re.prototype.scale.call(this,Pe,Ne);var ke=this.rotatePoint({x:this.left,y:this.top}),Se=this.unrotatePoint({x:ke.x*Pe,y:ke.y*Ne});this.left=Se.x,this.top=Se.y,this.width=this.width*Pe,this.height=this.height*Ne,this.adjustControlBox()},Ce}(he),be=function(Re){function Ce(Pe,Ne,ke){var Se=Re.call(this,Pe,Ne,ke)||this;return Se.fillColor="transparent",Se.strokeColor="transparent",Se.strokeWidth=0,Se.strokeDasharray="",Se.opacity=1,Se.setStrokeColor=Se.setStrokeColor.bind(Se),Se.setFillColor=Se.setFillColor.bind(Se),Se.setStrokeWidth=Se.setStrokeWidth.bind(Se),Se.setStrokeDasharray=Se.setStrokeDasharray.bind(Se),Se.createVisual=Se.createVisual.bind(Se),Se}return De(Ce,Re),Ce.prototype.ownsTarget=function(Pe){return!(!Re.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual)},Ce.prototype.createVisual=function(){this.visual=Ke.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)},Ce.prototype.pointerDown=function(Pe,Ne){Re.prototype.pointerDown.call(this,Pe,Ne),this.state==="new"&&(this.createVisual(),this.moveVisual(Pe),this._state="creating")},Ce.prototype.manipulate=function(Pe){Re.prototype.manipulate.call(this,Pe)},Ce.prototype.resize=function(Pe){Re.prototype.resize.call(this,Pe),this.setSize()},Ce.prototype.setSize=function(){Re.prototype.setSize.call(this),Ke.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Ce.prototype.pointerUp=function(Pe){Re.prototype.pointerUp.call(this,Pe),this.setSize()},Ce.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.visual&&Ke.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Pe),this.stateChanged()},Ce.prototype.setFillColor=function(Pe){this.fillColor=Pe,this.visual&&Ke.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Ce.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.visual&&Ke.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ce.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.visual&&Ke.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Ce.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Re.prototype.getState.call(this))},Ce.prototype.restoreState=function(Pe){var Ne=Pe;this.fillColor=Ne.fillColor,this.strokeColor=Ne.strokeColor,this.strokeWidth=Ne.strokeWidth,this.strokeDasharray=Ne.strokeDasharray,this.opacity=Ne.opacity,this.createVisual(),Re.prototype.restoreState.call(this,Pe),this.setSize()},Ce.prototype.scale=function(Pe,Ne){Re.prototype.scale.call(this,Pe,Ne),this.setSize()},Ce.title="Rectangle marker",Ce}(we),Me=function(Re){function Ce(Pe,Ne,ke,Se){var nt=Re.call(this,Pe,Se||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return nt.widths=[],nt.widthBoxes=[],nt.widths=Ne,nt.currentWidth=ke,nt.setCurrentWidth=nt.setCurrentWidth.bind(nt),nt}return De(Ce,Re),Ce.prototype.getUi=function(){var Pe=this,Ne=document.createElement("div");return Ne.style.display="flex",Ne.style.overflow="hidden",Ne.style.flexGrow="2",this.widths.forEach(function(ke){var Se=document.createElement("div");Se.style.display="flex",Se.style.flexGrow="2",Se.style.alignItems="center",Se.style.justifyContent="space-between",Se.style.padding="5px",Se.style.borderWidth="2px",Se.style.borderStyle="solid",Se.style.borderColor=ke===Pe.currentWidth?Pe.uiStyleSettings.toolboxAccentColor:"transparent",Se.addEventListener("click",function(){Pe.setCurrentWidth(ke,Se)}),Ne.appendChild(Se);var nt=document.createElement("div");nt.innerText=ke.toString(),nt.style.marginRight="5px",Se.appendChild(nt);var Pt=document.createElement("div");Pt.style.minHeight="20px",Pt.style.flexGrow="2",Pt.style.display="flex",Pt.style.alignItems="center";var qe=document.createElement("hr");qe.style.minWidth="20px",qe.style.border="0px",qe.style.borderTop=ke+"px solid "+Pe.uiStyleSettings.toolboxColor,qe.style.flexGrow="2",Pt.appendChild(qe),Se.appendChild(Pt),Pe.widthBoxes.push(Se)}),Ne},Ce.prototype.setCurrentWidth=function(Pe,Ne){var ke=this;this.currentWidth=Pe,this.widthBoxes.forEach(function(Se){Se.style.borderColor=Se===Ne?ke.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},Ce}(te),Ie=function(Re){function Ce(Pe,Ne,ke,Se){var nt=Re.call(this,Pe,Se||'<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 nt.styles=[],nt.styleBoxes=[],nt.styles=Ne,nt.currentStyle=ke,nt.setCurrentStyle=nt.setCurrentStyle.bind(nt),nt}return De(Ce,Re),Ce.prototype.getUi=function(){var Pe=this,Ne=document.createElement("div");return Ne.style.display="flex",Ne.style.overflow="hidden",Ne.style.flexGrow="2",this.styles.forEach(function(ke){var Se=document.createElement("div");Se.style.display="flex",Se.style.alignItems="center",Se.style.justifyContent="space-between",Se.style.padding="5px",Se.style.borderWidth="2px",Se.style.borderStyle="solid",Se.style.overflow="hidden",Se.style.maxWidth=100/Pe.styles.length-5+"%",Se.style.borderColor=ke===Pe.currentStyle?Pe.uiStyleSettings.toolboxAccentColor:"transparent",Se.addEventListener("click",function(){Pe.setCurrentStyle(ke,Se)}),Ne.appendChild(Se);var nt=document.createElement("div");nt.style.minHeight="20px",nt.style.flexGrow="2",nt.style.overflow="hidden";var Pt=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Pe.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(ke!==""?'stroke-dasharray="'+ke+'"':"")+` />
|
|
|
</svg>`;nt.innerHTML=Pt,Se.appendChild(nt),Pe.styleBoxes.push(Se)}),Ne},Ce.prototype.setCurrentStyle=function(Pe,Ne){var ke=this;this.currentStyle=Pe,this.styleBoxes.forEach(function(Se){Se.style.borderColor=Se===Ne?ke.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},Ce}(te),ze=function(Re){function Ce(Pe,Ne,ke){var Se=Re.call(this,Pe,Ne,ke)||this;return Se.strokeColor=ke.defaultColor,Se.strokeWidth=ke.defaultStrokeWidth,Se.strokeDasharray=ke.defaultStrokeDasharray,Se.strokePanel=new ee("Line color",ke.defaultColorSet,ke.defaultColor),Se.strokePanel.onColorChanged=Se.setStrokeColor,Se.strokeWidthPanel=new Me("Line width",ke.defaultStrokeWidths,ke.defaultStrokeWidth),Se.strokeWidthPanel.onWidthChanged=Se.setStrokeWidth,Se.strokeStylePanel=new Ie("Line style",ke.defaultStrokeDasharrays,ke.defaultStrokeDasharray),Se.strokeStylePanel.onStyleChanged=Se.setStrokeDasharray,Se}return De(Ce,Re),Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Pe=Re.prototype.getState.call(this);return Pe.typeName=Ce.typeName,Pe},Ce.typeName="FrameMarker",Ce.title="Frame marker",Ce.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',Ce}(be),et=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"},$e=function(Re){function Ce(Pe,Ne,ke){var Se=Re.call(this,Pe,Ne,ke)||this;return Se.x1=0,Se.y1=0,Se.x2=0,Se.y2=0,Se.defaultLength=50,Se.manipulationStartX=0,Se.manipulationStartY=0,Se.manipulationStartX1=0,Se.manipulationStartY1=0,Se.manipulationStartX2=0,Se.manipulationStartY2=0,Se.setupControlBox(),Se}return De(Ce,Re),Ce.prototype.ownsTarget=function(Pe){return!!Re.prototype.ownsTarget.call(this,Pe)||!(!this.grip1.ownsTarget(Pe)&&!this.grip2.ownsTarget(Pe))},Ce.prototype.pointerDown=function(Pe,Ne){Re.prototype.pointerDown.call(this,Pe,Ne),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(Ne)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Ne)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},Ce.prototype.pointerUp=function(Pe){var Ne=this.state;Re.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",Ne==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},Ce.prototype.adjustVisual=function(){},Ce.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)},Ce.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()},Ce.prototype.select=function(){Re.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Ce.prototype.deselect=function(){Re.prototype.deselect.call(this),this.controlBox.style.display="none"},Ce.prototype.setupControlBox=function(){this.controlBox=Ke.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},Ce.prototype.adjustControlBox=function(){this.positionGrips()},Ce.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},Ce.prototype.createGrip=function(){var Pe=new de;return Pe.visual.transform.baseVal.appendItem(Ke.createTransform()),this.controlBox.appendChild(Pe.visual),Pe},Ce.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)},Ce.prototype.positionGrip=function(Pe,Ne,ke){var Se=Pe.transform.baseVal.getItem(0);Se.setTranslate(Ne,ke),Pe.transform.baseVal.replaceItem(Se,0)},Ce.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Re.prototype.getState.call(this))},Ce.prototype.restoreState=function(Pe){Re.prototype.restoreState.call(this,Pe);var Ne=Pe;this.x1=Ne.x1,this.y1=Ne.y1,this.x2=Ne.x2,this.y2=Ne.y2},Ce.prototype.scale=function(Pe,Ne){Re.prototype.scale.call(this,Pe,Ne),this.x1=this.x1*Pe,this.y1=this.y1*Ne,this.x2=this.x2*Pe,this.y2=this.y2*Ne,this.adjustVisual(),this.adjustControlBox()},Ce}(he),gt=function(Re){function Ce(Pe,Ne,ke){var Se=Re.call(this,Pe,Ne,ke)||this;return Se.strokeColor="transparent",Se.strokeWidth=0,Se.strokeDasharray="",Se.setStrokeColor=Se.setStrokeColor.bind(Se),Se.setStrokeWidth=Se.setStrokeWidth.bind(Se),Se.setStrokeDasharray=Se.setStrokeDasharray.bind(Se),Se.strokeColor=ke.defaultColor,Se.strokeWidth=ke.defaultStrokeWidth,Se.strokeDasharray=ke.defaultStrokeDasharray,Se.strokePanel=new ee("Line color",ke.defaultColorSet,ke.defaultColor),Se.strokePanel.onColorChanged=Se.setStrokeColor,Se.strokeWidthPanel=new Me("Line width",ke.defaultStrokeWidths,ke.defaultStrokeWidth),Se.strokeWidthPanel.onWidthChanged=Se.setStrokeWidth,Se.strokeStylePanel=new Ie("Line style",ke.defaultStrokeDasharrays,ke.defaultStrokeDasharray),Se.strokeStylePanel.onStyleChanged=Se.setStrokeDasharray,Se}return De(Ce,Re),Ce.prototype.ownsTarget=function(Pe){return!(!Re.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual&&Pe!==this.selectorLine&&Pe!==this.visibleLine)},Ce.prototype.createVisual=function(){this.visual=Ke.createGroup(),this.selectorLine=Ke.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Ke.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)},Ce.prototype.pointerDown=function(Pe,Ne){Re.prototype.pointerDown.call(this,Pe,Ne),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},Ce.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()),Ke.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Ke.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Ke.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Ce.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.adjustVisual(),this.colorChanged(Pe)},Ce.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.adjustVisual()},Ce.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Pe=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Re.prototype.getState.call(this));return Pe.typeName=Ce.typeName,Pe},Ce.prototype.restoreState=function(Pe){Re.prototype.restoreState.call(this,Pe);var Ne=Pe;this.strokeColor=Ne.strokeColor,this.strokeWidth=Ne.strokeWidth,this.strokeDasharray=Ne.strokeDasharray,this.createVisual(),this.adjustVisual()},Ce.typeName="LineMarker",Ce.title="Line marker",Ce.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',Ce}($e),je=function(Re){function Ce(Pe,Ne,ke,Se){var nt=Re.call(this,Pe,Se||'<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 nt.fonts=[],nt.fontBoxes=[],nt.fonts=Ne,nt.currentFont=ke,nt.setCurrentFont=nt.setCurrentFont.bind(nt),nt}return De(Ce,Re),Ce.prototype.getUi=function(){var Pe=this,Ne=document.createElement("div");return Ne.style.overflow="hidden",Ne.style.flexGrow="2",this.fonts.forEach(function(ke){var Se=document.createElement("div");Se.style.display="inline-block",Se.style.alignItems="center",Se.style.justifyContent="space-between",Se.style.padding="5px",Se.style.borderWidth="2px",Se.style.borderStyle="solid",Se.style.overflow="hidden",Se.style.maxWidth=100/Pe.fonts.length-5+"%",Se.style.borderColor=ke===Pe.currentFont?Pe.uiStyleSettings.toolboxAccentColor:"transparent",Se.addEventListener("click",function(){Pe.setCurrentFont(ke,Se)}),Ne.appendChild(Se);var nt=document.createElement("div");nt.style.display="flex",nt.style.minHeight="20px",nt.style.flexGrow="2",nt.style.fontFamily=ke,nt.style.overflow="hidden";var Pt=document.createElement("div");Pt.style.whiteSpace="nowrap",Pt.style.overflow="hidden",Pt.style.textOverflow="ellipsis",Pt.innerHTML="The quick brown fox jumps over the lazy dog",nt.appendChild(Pt),Se.appendChild(nt),Pe.fontBoxes.push(Se)}),Ne},Ce.prototype.setCurrentFont=function(Pe,Ne){var ke=this;this.currentFont=Pe,this.fontBoxes.forEach(function(Se){Se.style.borderColor=Se===Ne?ke.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},Ce}(te),Tt=function(Re){function Ce(Pe,Ne,ke){var Se=Re.call(this,Pe,Ne,ke)||this;return Se.color="transparent",Se.padding=5,Se.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Se.text=Se.DEFAULT_TEXT,Se.isMoved=!1,Se.color=ke.defaultColor,Se.fontFamily=ke.defaultFontFamily,Se.defaultSize={x:100,y:30},Se.setColor=Se.setColor.bind(Se),Se.setFont=Se.setFont.bind(Se),Se.renderText=Se.renderText.bind(Se),Se.sizeText=Se.sizeText.bind(Se),Se.textEditDivClicked=Se.textEditDivClicked.bind(Se),Se.showTextEditor=Se.showTextEditor.bind(Se),Se.setSize=Se.setSize.bind(Se),Se.positionTextEditor=Se.positionTextEditor.bind(Se),Se.colorPanel=new ee("Color",ke.defaultColorSet,ke.defaultColor),Se.colorPanel.onColorChanged=Se.setColor,Se.fontFamilyPanel=new je("Font",ke.defaultFontFamilies,ke.defaultFontFamily),Se.fontFamilyPanel.onFontChanged=Se.setFont,Se}return De(Ce,Re),Ce.prototype.ownsTarget=function(Pe){if(Re.prototype.ownsTarget.call(this,Pe)||Pe===this.visual||Pe===this.textElement||Pe===this.bgRectangle)return!0;var Ne=!1;return this.textElement.childNodes.forEach(function(ke){ke===Pe&&(Ne=!0)}),Ne},Ce.prototype.createVisual=function(){this.visual=Ke.createGroup(),this.bgRectangle=Ke.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Ke.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Ke.createTransform()),this.textElement.transform.baseVal.appendItem(Ke.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},Ce.prototype.pointerDown=function(Pe,Ne){Re.prototype.pointerDown.call(this,Pe,Ne),this.isMoved=!1,this.pointerDownPoint=Pe,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Pe),this._state="creating")},Ce.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(Ne){Pe.textElement.appendChild(Ke.createTSpan(Ne.trim()===""?" ":Ne.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},Ce.prototype.getTextScale=function(){var Pe=this.textElement.getBBox(),Ne=1;if(Pe.width>0&&Pe.height>0){var ke=(1*this.width-this.width*this.padding*2/100)/Pe.width,Se=(1*this.height-this.height*this.padding*2/100)/Pe.height;Ne=Math.min(ke,Se)}return Ne},Ce.prototype.getTextPosition=function(Pe){var Ne=this.textElement.getBBox(),ke=0,Se=0;return Ne.width>0&&Ne.height>0&&(ke=(this.width-Ne.width*Pe)/2,Se=this.height/2-Ne.height*Pe/2),{x:ke,y:Se}},Ce.prototype.sizeText=function(){var Pe=this.textElement.getBBox(),Ne=this.getTextScale(),ke=this.getTextPosition(Ne);ke.y-=Pe.y*Ne,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ke.x+"px, "+ke.y+"px) scale("+Ne+", "+Ne+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ke.x,ke.y),this.textElement.transform.baseVal.getItem(1).setScale(Ne,Ne))},Ce.prototype.manipulate=function(Pe){Re.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)},Ce.prototype.resize=function(Pe){Re.prototype.resize.call(this,Pe),this.isMoved=!0,this.setSize(),this.sizeText()},Ce.prototype.setSize=function(){Re.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Ke.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ke.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},Ce.prototype.pointerUp=function(Pe){var Ne=this.state;Ne==="creating"&&(this._suppressMarkerCreateEvent=!0),Re.prototype.pointerUp.call(this,Pe),this.setSize(),(Ne==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},Ce.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(Ne){Ne.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Ne=Number.parseFloat(Pe.textEditor.style.fontSize);Pe.textEditor.clientWidth>=Number.parseInt(Pe.textEditor.style.maxWidth)&&Ne>.9;)Ne-=.1,Pe.textEditor.style.fontSize=Math.max(Ne,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Ne){Ne.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Ne){if(Ne.clipboardData){var ke=Ne.clipboardData.getData("text"),Se=window.getSelection();if(!Se.rangeCount)return!1;Se.deleteFromDocument(),Se.getRangeAt(0).insertNode(document.createTextNode(ke)),Ne.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")},Ce.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Pe=this.getTextScale(),Ne=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ke=this.textElement.getBBox(),Se={x:ke.width*Pe,y:ke.height*Pe};Ne.x-=Se.x/2,Ne.y-=Se.y/2,this.textEditor.style.top=Ne.y+"px",this.textEditor.style.left=Ne.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Ne.x+"px",this.textEditor.style.fontSize=Math.max(16*Pe,12)+"px",this.textElement.style.display="none"}},Ce.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()},Ce.prototype.select=function(){Re.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Ce.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Re.prototype.deselect.call(this)},Ce.prototype.dblClick=function(Pe,Ne){Re.prototype.dblClick.call(this,Pe,Ne),this.showTextEditor()},Ce.prototype.setColor=function(Pe){this.textElement&&Ke.setAttributes(this.textElement,[["fill",Pe]]),this.color=Pe,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Pe)},Ce.prototype.setFont=function(Pe){this.textElement&&Ke.setAttributes(this.textElement,[["font-family",Pe]]),this.fontFamily=Pe,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},Ce.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},Ce.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Pe=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Re.prototype.getState.call(this));return Pe.typeName=Ce.typeName,Pe},Ce.prototype.restoreState=function(Pe){var Ne=Pe;this.color=Ne.color,this.fontFamily=Ne.fontFamily,this.padding=Ne.padding,this.text=Ne.text,this.createVisual(),Re.prototype.restoreState.call(this,Pe),this.setSize()},Ce.prototype.scale=function(Pe,Ne){Re.prototype.scale.call(this,Pe,Ne),this.setSize(),this.sizeText(),this.positionTextEditor()},Ce.typeName="TextMarker",Ce.title="Text marker",Ce.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>',Ce}(we),Qe=function(Re){function Ce(Pe,Ne,ke){var Se=Re.call(this,Pe,Ne,ke)||this;return Se.color="transparent",Se.lineWidth=3,Se.drawing=!1,Se.pixelRatio=1,Se.color=ke.defaultColor,Se.lineWidth=ke.defaultStrokeWidth,Se.pixelRatio=ke.freehandPixelRatio,Se.setColor=Se.setColor.bind(Se),Se.addCanvas=Se.addCanvas.bind(Se),Se.finishCreation=Se.finishCreation.bind(Se),Se.setLineWidth=Se.setLineWidth.bind(Se),Se.colorPanel=new ee("Color",ke.defaultColorSet,ke.defaultColor),Se.colorPanel.onColorChanged=Se.setColor,Se.lineWidthPanel=new Me("Line width",ke.defaultStrokeWidths,ke.defaultStrokeWidth),Se.lineWidthPanel.onWidthChanged=Se.setLineWidth,Se}return De(Ce,Re),Ce.prototype.ownsTarget=function(Pe){return!(!Re.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual&&Pe!==this.drawingImage)},Ce.prototype.createVisual=function(){this.visual=Ke.createGroup(),this.drawingImage=Ke.createImage(),this.visual.appendChild(this.drawingImage);var Pe=Ke.createTransform();this.visual.transform.baseVal.appendItem(Pe),this.addMarkerVisualToContainer(this.visual)},Ce.prototype.pointerDown=function(Pe,Ne){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):Re.prototype.pointerDown.call(this,Pe,Ne)},Ce.prototype.manipulate=function(Pe){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Pe.x,Pe.y),this.canvasContext.stroke()):Re.prototype.manipulate.call(this,Pe)},Ce.prototype.resize=function(Pe){Re.prototype.resize.call(this,Pe),Ke.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ke.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},Ce.prototype.pointerUp=function(Pe){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Re.prototype.pointerUp.call(this,Pe)},Ce.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)},Ce.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Re.prototype.select.call(this)},Ce.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Re.prototype.deselect.call(this)},Ce.prototype.finishCreation=function(){for(var Pe=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Ne=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ke=Ne[0],Se=Ne[1],nt=Ne[2],Pt=Ne[3],qe=!1,Ue=0;Ue<this.canvasElement.height;Ue++)for(var St=0;St<this.canvasElement.width;St++)Pe.data[Ue*this.canvasElement.width*4+4*St+3]>0&&(qe=!0,Ue<Se&&(Se=Ue),St<ke&&(ke=St),Ue>Pt&&(Pt=Ue),St>nt&&(nt=St));if(qe){this.left=ke/this.pixelRatio,this.top=Se/this.pixelRatio,this.width=(nt-ke)/this.pixelRatio,this.height=(Pt-Se)/this.pixelRatio;var vt=document.createElement("canvas");vt.width=nt-ke,vt.height=Pt-Se,vt.getContext("2d").putImageData(this.canvasContext.getImageData(ke,Se,nt-ke,Pt-Se),0,0),this.drawingImgUrl=vt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Ce.prototype.setDrawingImage=function(){Ke.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Ke.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},Ce.prototype.setColor=function(Pe){this.color=Pe,this.colorChanged(Pe)},Ce.prototype.setLineWidth=function(Pe){this.lineWidth=Pe},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Pe=Object.assign({drawingImgUrl:this.drawingImgUrl},Re.prototype.getState.call(this));return Pe.typeName=Ce.typeName,Pe},Ce.prototype.restoreState=function(Pe){this.createVisual(),Re.prototype.restoreState.call(this,Pe),this.drawingImgUrl=Pe.drawingImgUrl,this.setDrawingImage()},Ce.prototype.scale=function(Pe,Ne){Re.prototype.scale.call(this,Pe,Ne),this.setDrawingImage()},Ce.typeName="FreehandMarker",Ce.title="Freehand marker",Ce.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>',Ce}(we),bt=function(Re){function Ce(Pe,Ne,ke){var Se=Re.call(this,Pe,ke||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Se.typeBoxes=[],Se.currentType=Ne,Se.setCurrentType=Se.setCurrentType.bind(Se),Se}return De(Ce,Re),Ce.prototype.getUi=function(){var Pe=this,Ne=document.createElement("div");Ne.style.display="flex",Ne.style.overflow="hidden",Ne.style.flexGrow="2";for(var ke=function(Pt){var qe="both";switch(Pt){case 0:qe="both";break;case 1:qe="start";break;case 2:qe="end";break;case 3:qe="none"}var Ue=document.createElement("div");if(Ue.style.display="flex",Ue.style.flexGrow="2",Ue.style.alignItems="center",Ue.style.justifyContent="space-between",Ue.style.padding="5px",Ue.style.borderWidth="2px",Ue.style.borderStyle="solid",Ue.style.borderColor=qe===Se.currentType?Se.uiStyleSettings.toolboxAccentColor:"transparent",Ue.addEventListener("click",function(){Pe.setCurrentType(qe,Ue)}),Ne.appendChild(Ue),qe==="both"||qe==="start"){var St=document.createElement("div");St.style.display="flex",St.style.alignItems="center",St.style.minHeight="20px",St.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="`+(Se.uiStyleSettings!==void 0?Se.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,St.style.marginLeft="5px",Ue.appendChild(St)}var vt=document.createElement("div");vt.style.display="flex",vt.style.alignItems="center",vt.style.minHeight="20px",vt.style.flexGrow="2";var lt=document.createElement("hr");if(lt.style.minWidth="20px",lt.style.border="0px",lt.style.borderTop="3px solid "+(Se.uiStyleSettings!==void 0?Se.uiStyleSettings.toolboxColor:"#eeeeee"),lt.style.flexGrow="2",vt.appendChild(lt),Ue.appendChild(vt),qe==="both"||qe==="end"){var Dt=document.createElement("div");Dt.style.display="flex",Dt.style.alignItems="center",Dt.style.minHeight="20px",Dt.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="`+(Se.uiStyleSettings!==void 0?Se.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Dt.style.marginRight="5px",Ue.appendChild(Dt)}Se.typeBoxes.push(Ue)},Se=this,nt=0;nt<4;nt++)ke(nt);return Ne},Ce.prototype.setCurrentType=function(Pe,Ne){var ke=this;this.currentType=Pe,this.typeBoxes.forEach(function(Se){Se.style.borderColor=Se===Ne?ke.uiStyleSettings!==void 0?ke.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},Ce}(te),Nt=function(Re){function Ce(Pe,Ne,ke){var Se=Re.call(this,Pe,Ne,ke)||this;return Se.arrowType="end",Se.arrowBaseHeight=10,Se.arrowBaseWidth=10,Se.getArrowPoints=Se.getArrowPoints.bind(Se),Se.setArrowType=Se.setArrowType.bind(Se),Se.arrowTypePanel=new bt("Arrow type","end"),Se.arrowTypePanel.onArrowTypeChanged=Se.setArrowType,Se}return De(Ce,Re),Ce.prototype.ownsTarget=function(Pe){return!(!Re.prototype.ownsTarget.call(this,Pe)&&Pe!==this.arrow1&&Pe!==this.arrow2)},Ce.prototype.getArrowPoints=function(Pe,Ne){var ke=this.arrowBaseWidth+2*this.strokeWidth,Se=this.arrowBaseHeight+2*this.strokeWidth;return Pe-ke/2+","+(Ne+Se/2)+" "+Pe+","+(Ne-Se/2)+" "+(Pe+ke/2)+","+(Ne+Se/2)},Ce.prototype.createTips=function(){this.arrow1=Ke.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Ke.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Ke.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Ke.createTransform()),this.visual.appendChild(this.arrow2)},Ce.prototype.pointerDown=function(Pe,Ne){Re.prototype.pointerDown.call(this,Pe,Ne),this.state==="creating"&&this.createTips()},Ce.prototype.adjustVisual=function(){if(Re.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",Ke.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Ke.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 Ne=this.arrow1.transform.baseVal.getItem(0);Ne.setRotate(Pe,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Ne,0);var ke=this.arrow2.transform.baseVal.getItem(0);ke.setRotate(Pe+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ke,0)}},Ce.prototype.setArrowType=function(Pe){this.arrowType=Pe,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Pe=Object.assign({arrowType:this.arrowType},Re.prototype.getState.call(this));return Pe.typeName=Ce.typeName,Pe},Ce.prototype.restoreState=function(Pe){Re.prototype.restoreState.call(this,Pe);var Ne=Pe;this.arrowType=Ne.arrowType,this.createTips(),this.adjustVisual()},Ce.typeName="ArrowMarker",Ce.title="Arrow marker",Ce.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',Ce}(gt),At=function(Re){function Ce(Pe,Ne,ke){var Se=Re.call(this,Pe,Ne,ke)||this;return Se.fillColor=ke.defaultFillColor,Se.strokeWidth=0,Se.fillPanel=new ee("Color",ke.defaultColorSet,ke.defaultFillColor),Se.fillPanel.onColorChanged=Se.setFillColor,Se}return De(Ce,Re),Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Pe=Re.prototype.getState.call(this);return Pe.typeName=Ce.typeName,Pe},Ce.typeName="CoverMarker",Ce.title="Cover marker",Ce.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',Ce}(be),Zt=function(Re){function Ce(Pe,Ne,ke,Se){var nt=Re.call(this,Pe,Se||'<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 nt.opacities=[],nt.opacityBoxes=[],nt.opacities=Ne,nt.currentOpacity=ke,nt.setCurrentOpacity=nt.setCurrentOpacity.bind(nt),nt}return De(Ce,Re),Ce.prototype.getUi=function(){var Pe=this,Ne=document.createElement("div");return Ne.style.display="flex",Ne.style.overflow="hidden",Ne.style.flexGrow="2",Ne.style.justifyContent="space-between",this.opacities.forEach(function(ke){var Se=document.createElement("div");Se.style.display="flex",Se.style.alignItems="center",Se.style.justifyContent="center",Se.style.padding="5px",Se.style.borderWidth="2px",Se.style.borderStyle="solid",Se.style.borderColor=ke===Pe.currentOpacity?Pe.uiStyleSettings.toolboxAccentColor:"transparent",Se.addEventListener("click",function(){Pe.setCurrentOpacity(ke,Se)}),Ne.appendChild(Se);var nt=document.createElement("div");nt.innerText=100*ke+"%",Se.appendChild(nt),Pe.opacityBoxes.push(Se)}),Ne},Ce.prototype.setCurrentOpacity=function(Pe,Ne){var ke=this;this.currentOpacity=Pe,this.opacityBoxes.forEach(function(Se){Se.style.borderColor=Se===Ne?ke.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},Ce}(te),Yt=function(Re){function Ce(Pe,Ne,ke){var Se=Re.call(this,Pe,Ne,ke)||this;return Se.setOpacity=Se.setOpacity.bind(Se),Se.fillColor=ke.defaultHighlightColor,Se.strokeWidth=0,Se.opacity=ke.defaultHighlightOpacity,Se.fillPanel=new ee("Color",ke.defaultColorSet,Se.fillColor),Se.fillPanel.onColorChanged=Se.setFillColor,Se.opacityPanel=new Zt("Opacity",ke.defaultOpacitySteps,Se.opacity),Se.opacityPanel.onOpacityChanged=Se.setOpacity,Se}return De(Ce,Re),Ce.prototype.setOpacity=function(Pe){this.opacity=Pe,this.visual&&Ke.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Pe=Re.prototype.getState.call(this);return Pe.typeName=Ce.typeName,Pe},Ce.typeName="HighlightMarker",Ce.title="Highlight marker",Ce.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>',Ce}(At),ut='<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>',Ge='<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>',kt=function(Re){function Ce(Pe,Ne,ke){var Se=Re.call(this,Pe,Ne,ke)||this;return Se.bgColor="transparent",Se.tipPosition={x:0,y:0},Se.tipBase1Position={x:0,y:0},Se.tipBase2Position={x:0,y:0},Se.tipMoving=!1,Se.color=ke.defaultStrokeColor,Se.bgColor=ke.defaultFillColor,Se.fontFamily=ke.defaultFontFamily,Se.defaultSize={x:100,y:30},Se.setBgColor=Se.setBgColor.bind(Se),Se.getTipPoints=Se.getTipPoints.bind(Se),Se.positionTip=Se.positionTip.bind(Se),Se.setTipPoints=Se.setTipPoints.bind(Se),Se.colorPanel=new ee("Text color",ke.defaultColorSet,Se.color,ut),Se.colorPanel.onColorChanged=Se.setColor,Se.bgColorPanel=new ee("Fill color",ke.defaultColorSet,Se.bgColor,Ge),Se.bgColorPanel.onColorChanged=Se.setBgColor,Se.fontFamilyPanel=new je("Font",ke.defaultFontFamilies,ke.defaultFontFamily),Se.fontFamilyPanel.onFontChanged=Se.setFont,Se.tipGrip=new de,Se.tipGrip.visual.transform.baseVal.appendItem(Ke.createTransform()),Se.controlBox.appendChild(Se.tipGrip.visual),Se}return De(Ce,Re),Ce.prototype.ownsTarget=function(Pe){return Re.prototype.ownsTarget.call(this,Pe)||this.tipGrip.ownsTarget(Pe)||this.tip===Pe},Ce.prototype.createTip=function(){Ke.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Ke.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},Ce.prototype.pointerDown=function(Pe,Ne){this.state==="new"&&Re.prototype.pointerDown.call(this,Pe,Ne),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Ne)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Re.prototype.pointerDown.call(this,Pe,Ne)},Ce.prototype.pointerUp=function(Pe){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Re.prototype.pointerUp.call(this,Pe);else{var Ne=this.state==="creating";Re.prototype.pointerUp.call(this,Pe),this.setTipPoints(Ne),this.positionTip()}},Ce.prototype.manipulate=function(Pe){if(this.tipMoving){var Ne=this.unrotatePoint(Pe);this.tipPosition={x:Ne.x-this.manipulationStartLeft,y:Ne.y-this.manipulationStartTop},this.positionTip()}else Re.prototype.manipulate.call(this,Pe)},Ce.prototype.setBgColor=function(Pe){this.bgRectangle&&this.tip&&(Ke.setAttributes(this.bgRectangle,[["fill",Pe]]),Ke.setAttributes(this.tip,[["fill",Pe]])),this.bgColor=Pe,this.fillColorChanged(Pe)},Ce.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},Ce.prototype.setTipPoints=function(Pe){Pe===void 0&&(Pe=!1);var Ne=Math.min(this.height/2,15),ke=this.height/5;Pe&&(this.tipPosition={x:Ne+ke/2,y:this.height+20});var Se=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Se<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(ke=this.width/5,Ne=Math.min(this.width/2,15),this.tipBase1Position={x:Ne,y:0},this.tipBase2Position={x:Ne+ke,y:0}):(this.tipBase1Position={x:0,y:Ne},this.tipBase2Position={x:0,y:Ne+ke}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Se<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(ke=this.width/5,Ne=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Ne-ke,y:0},this.tipBase2Position={x:this.width-Ne,y:0}):(this.tipBase1Position={x:this.width,y:Ne},this.tipBase2Position={x:this.width,y:Ne+ke}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Se<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(ke=this.width/5,Ne=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Ne-ke,y:this.height},this.tipBase2Position={x:this.width-Ne,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Ne-ke},this.tipBase2Position={x:this.width,y:this.height-Ne}):Se<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(ke=this.width/5,Ne=Math.min(this.width/2,15),this.tipBase1Position={x:Ne,y:this.height},this.tipBase2Position={x:Ne+ke,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Ne},this.tipBase2Position={x:0,y:this.height-Ne-ke})},Ce.prototype.resize=function(Pe){Re.prototype.resize.call(this,Pe),this.positionTip()},Ce.prototype.positionTip=function(){Ke.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(Ce.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Ce.prototype.select=function(){this.positionTip(),Re.prototype.select.call(this)},Ce.prototype.getState=function(){var Pe=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Re.prototype.getState.call(this));return Pe.typeName=Ce.typeName,Pe},Ce.prototype.restoreState=function(Pe){var Ne=Pe;this.bgColor=Ne.bgColor,this.tipPosition=Ne.tipPosition,Re.prototype.restoreState.call(this,Pe),this.createTip(),this.setTipPoints()},Ce.prototype.scale=function(Pe,Ne){Re.prototype.scale.call(this,Pe,Ne),this.tipPosition={x:this.tipPosition.x*Pe,y:this.tipPosition.y*Ne},this.positionTip()},Ce.typeName="CalloutMarker",Ce.title="Callout marker",Ce.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>',Ce}(Tt),ln=function(Re){function Ce(Pe,Ne,ke){var Se=Re.call(this,Pe,Ne,ke)||this;return Se.fillColor="transparent",Se.strokeColor="transparent",Se.strokeWidth=0,Se.strokeDasharray="",Se.opacity=1,Se.strokeColor=ke.defaultColor,Se.strokeWidth=ke.defaultStrokeWidth,Se.strokeDasharray=ke.defaultStrokeDasharray,Se.fillColor=ke.defaultFillColor,Se.setStrokeColor=Se.setStrokeColor.bind(Se),Se.setFillColor=Se.setFillColor.bind(Se),Se.setStrokeWidth=Se.setStrokeWidth.bind(Se),Se.setStrokeDasharray=Se.setStrokeDasharray.bind(Se),Se.setOpacity=Se.setOpacity.bind(Se),Se.createVisual=Se.createVisual.bind(Se),Se.strokePanel=new ee("Line color",Ze(ke.defaultColorSet,["transparent"]),ke.defaultColor),Se.strokePanel.onColorChanged=Se.setStrokeColor,Se.fillPanel=new ee("Fill color",Ze(ke.defaultColorSet,["transparent"]),Se.fillColor,Ge),Se.fillPanel.onColorChanged=Se.setFillColor,Se.strokeWidthPanel=new Me("Line width",ke.defaultStrokeWidths,ke.defaultStrokeWidth),Se.strokeWidthPanel.onWidthChanged=Se.setStrokeWidth,Se.strokeStylePanel=new Ie("Line style",ke.defaultStrokeDasharrays,ke.defaultStrokeDasharray),Se.strokeStylePanel.onStyleChanged=Se.setStrokeDasharray,Se.opacityPanel=new Zt("Opacity",ke.defaultOpacitySteps,Se.opacity),Se.opacityPanel.onOpacityChanged=Se.setOpacity,Se}return De(Ce,Re),Ce.prototype.ownsTarget=function(Pe){return!(!Re.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual)},Ce.prototype.createVisual=function(){this.visual=Ke.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)},Ce.prototype.pointerDown=function(Pe,Ne){Re.prototype.pointerDown.call(this,Pe,Ne),this.state==="new"&&(this.createVisual(),this.moveVisual(Pe),this._state="creating")},Ce.prototype.manipulate=function(Pe){Re.prototype.manipulate.call(this,Pe)},Ce.prototype.resize=function(Pe){Re.prototype.resize.call(this,Pe),this.setSize()},Ce.prototype.setSize=function(){Re.prototype.setSize.call(this),Ke.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},Ce.prototype.pointerUp=function(Pe){Re.prototype.pointerUp.call(this,Pe),this.setSize()},Ce.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.visual&&Ke.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Pe),this.stateChanged()},Ce.prototype.setFillColor=function(Pe){this.fillColor=Pe,this.visual&&Ke.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Pe),this.stateChanged()},Ce.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.visual&&Ke.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ce.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.visual&&Ke.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Ce.prototype.setOpacity=function(Pe){this.opacity=Pe,this.visual&&Ke.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Pe=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Re.prototype.getState.call(this));return Pe.typeName=Ce.typeName,Pe},Ce.prototype.restoreState=function(Pe){var Ne=Pe;this.fillColor=Ne.fillColor,this.strokeColor=Ne.strokeColor,this.strokeWidth=Ne.strokeWidth,this.strokeDasharray=Ne.strokeDasharray,this.opacity=Ne.opacity,this.createVisual(),Re.prototype.restoreState.call(this,Pe),this.setSize()},Ce.prototype.scale=function(Pe,Ne){Re.prototype.scale.call(this,Pe,Ne),this.setSize()},Ce.typeName="EllipseMarker",Ce.title="Ellipse marker",Ce.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>',Ce}(we),sn=function(Re){function Ce(Pe,Ne,ke){return Re.call(this,Pe,Ne,ke)||this}return De(Ce,Re),Object.defineProperty(Ce.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),Ce.prototype.ownsTarget=function(Pe){return!(!Re.prototype.ownsTarget.call(this,Pe)&&Pe!==this.tip1&&Pe!==this.tip2)},Ce.prototype.createTips=function(){this.tip1=Ke.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(Ke.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Ke.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(Ke.createTransform()),this.visual.appendChild(this.tip2)},Ce.prototype.pointerDown=function(Pe,Ne){Re.prototype.pointerDown.call(this,Pe,Ne),this.state==="creating"&&this.createTips()},Ce.prototype.adjustVisual=function(){if(Re.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Ke.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()]]),Ke.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),Ne=this.tip1.transform.baseVal.getItem(0);Ne.setRotate(Pe,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Ne,0);var ke=this.tip2.transform.baseVal.getItem(0);ke.setRotate(Pe+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ke,0)}},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Pe=Re.prototype.getState.call(this);return Pe.typeName=Ce.typeName,Pe},Ce.prototype.restoreState=function(Pe){Re.prototype.restoreState.call(this,Pe),this.createTips(),this.adjustVisual()},Ce.typeName="MeasurementMarker",Ce.title="Measurement marker",Ce.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>',Ce}(gt),Bt=function(Re){function Ce(Pe,Ne,ke){var Se=Re.call(this,Pe,Ne,ke)||this;return Se.strokePanel.colors=ke.defaultColorSet,Se.fillColor="transparent",Se}return De(Ce,Re),Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Pe=Re.prototype.getState.call(this);return Pe.typeName=Ce.typeName,Pe},Ce.typeName="EllipseFrameMarker",Ce.title="Ellipse frame marker",Ce.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>',Ce}(ln),Gt=function(){function Re(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Re.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Re.prototype.addUndoStep=function(Ce){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(Ce)||(this.undoStack.push(Ce),JSON.stringify(this.lastRedoStep)!==JSON.stringify(Ce)&&this.redoStack.splice(0,this.redoStack.length))},Re.prototype.replaceLastUndoStep=function(Ce){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Ce)},Re.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Re.prototype.undo=function(){if(this.undoStack.length>1){var Ce=this.undoStack.pop();return Ce!==void 0&&this.redoStack.push(Ce),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Re.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Re}(),en=function(Re){function Ce(Pe,Ne,ke){var Se=Re.call(this,Pe,Ne,ke)||this;return Se.strokeColor="transparent",Se.strokeWidth=0,Se.strokeDasharray="",Se.curveX=0,Se.curveY=0,Se.manipulationStartCurveX=0,Se.manipulationStartCurveY=0,Se.setStrokeColor=Se.setStrokeColor.bind(Se),Se.setStrokeWidth=Se.setStrokeWidth.bind(Se),Se.setStrokeDasharray=Se.setStrokeDasharray.bind(Se),Se.positionGrips=Se.positionGrips.bind(Se),Se.addControlGrips=Se.addControlGrips.bind(Se),Se.adjustVisual=Se.adjustVisual.bind(Se),Se.setupControlBox=Se.setupControlBox.bind(Se),Se.resize=Se.resize.bind(Se),Se.strokeColor=ke.defaultColor,Se.strokeWidth=ke.defaultStrokeWidth,Se.strokeDasharray=ke.defaultStrokeDasharray,Se.strokePanel=new ee("Line color",ke.defaultColorSet,ke.defaultColor),Se.strokePanel.onColorChanged=Se.setStrokeColor,Se.strokeWidthPanel=new Me("Line width",ke.defaultStrokeWidths,ke.defaultStrokeWidth),Se.strokeWidthPanel.onWidthChanged=Se.setStrokeWidth,Se.strokeStylePanel=new Ie("Line style",ke.defaultStrokeDasharrays,ke.defaultStrokeDasharray),Se.strokeStylePanel.onStyleChanged=Se.setStrokeDasharray,Se}return De(Ce,Re),Ce.prototype.ownsTarget=function(Pe){return!(!Re.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual&&Pe!==this.selectorCurve&&Pe!==this.visibleCurve&&!this.curveGrip.ownsTarget(Pe))},Ce.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},Ce.prototype.createVisual=function(){this.visual=Ke.createGroup(),this.selectorCurve=Ke.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Ke.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)},Ce.prototype.pointerDown=function(Pe,Ne){Re.prototype.pointerDown.call(this,Pe,Ne),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(Ne)&&(this.activeGrip=this.curveGrip,this._state="resize")},Ce.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Ke.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Ke.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Ke.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Ce.prototype.setupControlBox=function(){Re.prototype.setupControlBox.call(this),this.curveControlLine1=Ke.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Ke.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)},Ce.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Re.prototype.addControlGrips.call(this)},Ce.prototype.positionGrips=function(){Re.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()))},Ce.prototype.manipulate=function(Pe){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Pe.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Pe.y-this.manipulationStartY),Re.prototype.manipulate.call(this,Pe)},Ce.prototype.resize=function(Pe){this.activeGrip===this.curveGrip&&(this.curveX=Pe.x,this.curveY=Pe.y),Re.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)},Ce.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.adjustVisual(),this.colorChanged(Pe)},Ce.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.adjustVisual()},Ce.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.adjustVisual()},Ce.prototype.scale=function(Pe,Ne){this.curveX=this.curveX*Pe,this.curveY=this.curveY*Ne,Re.prototype.scale.call(this,Pe,Ne)},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Pe=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Re.prototype.getState.call(this));return Pe.typeName=Ce.typeName,Pe},Ce.prototype.restoreState=function(Pe){Re.prototype.restoreState.call(this,Pe);var Ne=Pe;this.strokeColor=Ne.strokeColor,this.strokeWidth=Ne.strokeWidth,this.strokeDasharray=Ne.strokeDasharray,this.curveX=Ne.curveX,this.curveY=Ne.curveY,this.createVisual(),this.adjustVisual()},Ce.typeName="CurveMarker",Ce.title="Curve marker",Ce.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>',Ce}($e),Bn=function(Re){function Ce(Pe,Ne,ke){var Se=Re.call(this,Pe,Ne,ke)||this;return Se.fillColor="transparent",Se.strokeColor="transparent",Se.strokeWidth=0,Se.strokeDasharray="",Se.textColor="transparent",Se.fontSize="1rem",Se.isMoved=!1,Se.captionText="Caption",Se.PADDING=5,Se.captionBoxWidth=0,Se.captionBoxHeight=0,Se.strokeColor=ke.defaultColor,Se.strokeWidth=ke.defaultStrokeWidth,Se.strokeDasharray=ke.defaultStrokeDasharray,Se.fillColor=ke.defaultFillColor,Se.textColor=ke.defaultStrokeColor,Se.fontFamily=ke.defaultFontFamily,Se.fontSize=ke.defaultCaptionFontSize,Se.captionText=ke.defaultCaptionText,Se.setStrokeColor=Se.setStrokeColor.bind(Se),Se.setFillColor=Se.setFillColor.bind(Se),Se.setStrokeWidth=Se.setStrokeWidth.bind(Se),Se.setStrokeDasharray=Se.setStrokeDasharray.bind(Se),Se.createVisual=Se.createVisual.bind(Se),Se.sizeCaption=Se.sizeCaption.bind(Se),Se.setCaptionText=Se.setCaptionText.bind(Se),Se.showTextEditor=Se.showTextEditor.bind(Se),Se.positionTextEditor=Se.positionTextEditor.bind(Se),Se.finishTextEditing=Se.finishTextEditing.bind(Se),Se.setFont=Se.setFont.bind(Se),Se.setTextColor=Se.setTextColor.bind(Se),Se.strokePanel=new ee("Line color",Ze(ke.defaultColorSet,["transparent"]),Se.strokeColor),Se.strokePanel.onColorChanged=Se.setStrokeColor,Se.fillPanel=new ee("Fill color",Ze(ke.defaultColorSet,["transparent"]),Se.fillColor,Ge),Se.fillPanel.onColorChanged=Se.setFillColor,Se.strokeWidthPanel=new Me("Line width",ke.defaultStrokeWidths,ke.defaultStrokeWidth),Se.strokeWidthPanel.onWidthChanged=Se.setStrokeWidth,Se.strokeStylePanel=new Ie("Line style",ke.defaultStrokeDasharrays,ke.defaultStrokeDasharray),Se.strokeStylePanel.onStyleChanged=Se.setStrokeDasharray,Se.fontFamilyPanel=new je("Font",ke.defaultFontFamilies,ke.defaultFontFamily),Se.fontFamilyPanel.onFontChanged=Se.setFont,Se.textColorPanel=new ee("Text color",ke.defaultColorSet,Se.textColor,ut),Se.textColorPanel.onColorChanged=Se.setTextColor,Se}return De(Ce,Re),Ce.prototype.ownsTarget=function(Pe){return!(!Re.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual&&Pe!==this.frame&&Pe!==this.captionBg&&Pe!==this.captionElement)},Ce.prototype.createVisual=function(){this.visual=Ke.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Ke.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Ke.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=Ke.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()},Ce.prototype.setCaptionText=function(Pe){this.captionText=Pe,this.captionElement.textContent=this.captionText,this.sizeCaption()},Ce.prototype.pointerDown=function(Pe,Ne){Re.prototype.pointerDown.call(this,Pe,Ne),this.isMoved=!1,this.pointerDownPoint=Pe,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Pe),this._state="creating")},Ce.prototype.manipulate=function(Pe){Re.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)},Ce.prototype.resize=function(Pe){Re.prototype.resize.call(this,Pe),this.setSize()},Ce.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),Ke.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')"]]),Ke.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')"]])},Ce.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(Ne){Ne.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Ne){Ne.key==="Enter"&&Pe.finishTextEditing(Pe.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Ne){Ne.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()},Ce.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"))},Ce.prototype.finishTextEditing=function(Pe){this.setCaptionText(Pe.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Ce.prototype.setFont=function(Pe){this.captionElement&&Ke.setAttributes(this.captionElement,[["font-family",Pe]]),this.fontFamily=Pe,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},Ce.prototype.setTextColor=function(Pe){this.captionElement&&Ke.setAttributes(this.captionElement,[["fill",Pe]]),this.textColor=Pe,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},Ce.prototype.setSize=function(){Re.prototype.setSize.call(this),Ke.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Ce.prototype.pointerUp=function(Pe){Re.prototype.pointerUp.call(this,Pe),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},Ce.prototype.dblClick=function(Pe,Ne){Re.prototype.dblClick.call(this,Pe,Ne),this.showTextEditor()},Ce.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.frame&&Ke.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Pe),this.stateChanged()},Ce.prototype.setFillColor=function(Pe){this.fillColor=Pe,this.captionBg&&Ke.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Pe),this.stateChanged()},Ce.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.frame&&Ke.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ce.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.frame&&Ke.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),Ce.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},Re.prototype.getState.call(this));return Pe.typeName=this.typeName,Pe},Ce.prototype.restoreState=function(Pe){var Ne=Pe;this.fillColor=Ne.fillColor,this.strokeColor=Ne.strokeColor,this.strokeWidth=Ne.strokeWidth,this.strokeDasharray=Ne.strokeDasharray,this.textColor=Ne.textColor,this.fontFamily=Ne.fontFamily,this.captionText=Ne.captionText,this.fontSize=Ne.fontSize,this.createVisual(),Re.prototype.restoreState.call(this,Pe),this.setSize()},Ce.prototype.scale=function(Pe,Ne){Re.prototype.scale.call(this,Pe,Ne),this.setSize()},Ce.typeName="CaptionFrameMarker",Ce.title="Caption frame marker",Ce.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>',Ce}(we),rn=function(){function Re(Ce,Pe){Pe===void 0&&(Pe=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Ce,this.cancelable=Pe}return Object.defineProperty(Re.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Re.prototype.preventDefault=function(){this._defaultPrevented=!0},Re}(),Cn=function(Re){function Ce(Pe,Ne,ke){var Se=Re.call(this,Pe,!1)||this;return Se.dataUrl=Ne,Se.state=ke,Se}return De(Ce,Re),Ce}(rn),ft=function(Re){function Ce(Pe,Ne,ke){ke===void 0&&(ke=!1);var Se=Re.call(this,Pe,ke)||this;return Se.marker=Ne,Se}return De(Ce,Re),Ce}(rn),En=function(){function Re(){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 Re.prototype.addEventListener=function(Ce,Pe){this[Ce].push(Pe)},Re.prototype.removeEventListener=function(Ce,Pe){var Ne=this[Ce].indexOf(Pe);Ne>-1&&this[Ce].splice(Ne,1)},Re}(),Vn=function(){function Re(Ce){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new et,this._isOpen=!1,this.undoRedoManager=new Gt,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 En,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Re.instanceCounter++,this.styles=new He(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=Ce,this.targetRoot=document.body,this.width=Ce.clientWidth,this.height=Ce.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(Re.prototype,"ALL_MARKER_TYPES",{get:function(){return[ze,Qe,Nt,Tt,Bt,ln,Yt,kt,sn,At,gt,en,Bn]},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[ze,Qe,Nt,Tt,ln,Yt,kt]},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"BASIC_MARKER_TYPES",{get:function(){return[ze,Qe,Nt,Tt,Yt]},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Ce){var Pe=this;this._availableMarkerTypes.splice(0),Ce.forEach(function(Ne){if(typeof Ne=="string"){var ke=Pe.ALL_MARKER_TYPES.find(function(Se){return Se.typeName===Ne});ke!==void 0&&Pe._availableMarkerTypes.push(ke)}else Pe._availableMarkerTypes.push(Ne)})},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(Ce){this._zoomLevel=Ce,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(Re.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Re.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Be.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Re.prototype.show=function(){var Ce=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 rn(Ce))})},Re.prototype.render=function(){return _e(this,void 0,void 0,function(){var Ce;return Ct(this,function(Pe){switch(Pe.label){case 0:return this.setCurrentMarker(),(Ce=new mt).naturalSize=this.renderAtNaturalSize,Ce.imageType=this.renderImageType,Ce.imageQuality=this.renderImageQuality,Ce.markersOnly=this.renderMarkersOnly,Ce.width=this.renderWidth,Ce.height=this.renderHeight,[4,Ce.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Pe.sent(),[4,Ce.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Pe.sent()]}})})},Re.prototype.close=function(Ce){var Pe=this;if(Ce===void 0&&(Ce=!1),this.isOpen){var Ne=!1;Ce||this.eventListeners.beforeclose.forEach(function(ke){var Se=new rn(Pe,!0);ke(Se),Se.defaultPrevented&&(Ne=!0)}),Ne||(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(ke){return ke(new rn(Pe))}),this.detachEvents(),this._isOpen=!1)}},Re.prototype.addMarkersToToolbar=function(){for(var Ce,Pe=[],Ne=0;Ne<arguments.length;Ne++)Pe[Ne]=arguments[Ne];(Ce=this._availableMarkerTypes).push.apply(Ce,Pe)},Re.prototype.addRenderEventListener=function(Ce){this.addEventListener("render",function(Pe){Ce(Pe.dataUrl,Pe.state)})},Re.prototype.removeRenderEventListener=function(Ce){},Re.prototype.addCloseEventListener=function(Ce){this.addEventListener("close",function(){Ce()})},Re.prototype.removeCloseEventListener=function(Ce){},Re.prototype.setupResizeObserver=function(){var Ce=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){Ce.resize(Ce.target.clientWidth,Ce.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return Ce.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Re.prototype.onPopupTargetResize=function(){var Ce=1*this.target.clientWidth/this.target.clientHeight,Pe=this.editorCanvas.clientWidth/Ce>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Ce:this.editorCanvas.clientWidth,Ne=Pe<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/Ce;this.resize(Pe,Ne)},Re.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Re.prototype.resize=function(Ce,Pe){this._isResizing=!0;var Ne=Ce/this.imageWidth,ke=Pe/this.imageHeight;this.imageWidth=Math.round(Ce),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(Ne,ke),this._isResizing=!1},Re.prototype.scaleMarkers=function(Ce,Pe){var Ne,ke=this;this._currentMarker&&this._currentMarker instanceof Tt?this._currentMarker.scale(Ce,Pe):(Ne=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Se){Se!==ke._currentMarker&&Se.scale(Ce,Pe)}),Ne!==void 0&&this.setCurrentMarker(Ne)},Re.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"},Re.prototype.setTopLeft=function(){var Ce=this.editingTarget.getBoundingClientRect(),Pe=this.editorCanvas.getBoundingClientRect();this.left=Ce.left-Pe.left,this.top=Ce.top-Pe.top},Re.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)},Re.prototype.addDefs=function(){for(var Ce,Pe=[],Ne=0;Ne<arguments.length;Ne++)Pe[Ne]=arguments[Ne];this.defs=Ke.createDefs(),this.addDefsToImage(),(Ce=this.defs).append.apply(Ce,Pe)},Re.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Re.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)},Re.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Re.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Re.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)},Re.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Re.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)},Re.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 Ce=document.createElement("a");Ce.href="https://markerjs.com/",Ce.target="_blank",Ce.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>',Ce.title="Powered by marker.js",Ce.style.display="grid",Ce.style.alignItems="center",Ce.style.justifyItems="center",Ce.style.padding="3px",Ce.style.width="20px",Ce.style.height="20px",this.logoUI.appendChild(Ce),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Re.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")},Re.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"},Re.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Re.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 Ce=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=Ce+"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 dt(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 Ae(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Re.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Re.prototype.removeMarker=function(Ce){this.markerImage.removeChild(Ce.container),this.markers.indexOf(Ce)>-1&&this.markers.splice(this.markers.indexOf(Ce),1),Ce.dispose()},Re.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())},Re.prototype.toolbarButtonClicked=function(Ce,Pe){if(Ce==="marker"&&Pe!==void 0)this.createNewMarker(Pe);else if(Ce==="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()}},Re.prototype.deleteSelectedMarker=function(){var Ce=this;if(this._currentMarker!==void 0){var Pe=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ke){var Se=new ft(Ce,Ce._currentMarker,!0);ke(Se),Se.defaultPrevented&&(Pe=!0)}),!Pe){var Ne=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(ke){return ke(new ft(Ce,Ne))})}}},Re.prototype.clear=function(){var Ce=this,Pe=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(nt){var Pt=new ft(Ce,void 0,!0);nt(Pt),Pt.defaultPrevented&&(Pe=!0)}),!Pe)){this.setCurrentMarker();for(var Ne=function(nt){var Pt=ke.markers[nt];ke.setCurrentMarker(ke.markers[nt]),ke._currentMarker.dispose(),ke.markerImage.removeChild(ke._currentMarker.container),ke.markers.splice(ke.markers.indexOf(ke._currentMarker),1),ke.eventListeners.markerdelete.forEach(function(qe){return qe(new ft(Ce,Pt))})},ke=this,Se=this.markers.length-1;Se>=0;Se--)Ne(Se);this.addUndoStep()}},Object.defineProperty(Re.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Re.prototype.showNotesEditor=function(){var Ce;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=(Ce=this._currentMarker.notes)!==null&&Ce!==void 0?Ce:"",this.overlayContainer.appendChild(this.notesArea))},Re.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)},Re.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Re.prototype.addUndoStep=function(){var Ce=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Pe=this.getState(),Ne=this.undoRedoManager.getLastUndoStep();if(!Ne||Ne.width===Pe.width&&Ne.height===Pe.height){var ke=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Pe),ke<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Se){return Se(new rn(Ce))})}else this.undoRedoManager.replaceLastUndoStep(Pe),this.eventListeners.statechange.forEach(function(Se){return Se(new rn(Ce))})}},Re.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Re.prototype.undoStep=function(){var Ce=this,Pe=this.undoRedoManager.undo();Pe!==void 0&&(this.restoreState(Pe),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Ne){return Ne(new rn(Ce))}))},Re.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Re.prototype.redoStep=function(){var Ce=this,Pe=this.undoRedoManager.redo();Pe!==void 0&&(this.restoreState(Pe),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Ne){return Ne(new rn(Ce))}))},Re.prototype.stepZoom=function(){var Ce=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=Ce<this.zoomSteps.length-1?this.zoomSteps[Ce+1]:this.zoomSteps[0]},Re.prototype.panTo=function(Ce){this.contentDiv.scrollBy({left:this.prevPanPoint.x-Ce.x,top:this.prevPanPoint.y-Ce.y}),this.prevPanPoint=Ce},Re.prototype.startRenderAndClose=function(){return _e(this,void 0,void 0,function(){var Ce,Pe,Ne=this;return Ct(this,function(ke){switch(ke.label){case 0:return[4,this.render()];case 1:return Ce=ke.sent(),Pe=this.getState(),this.eventListeners.render.forEach(function(Se){return Se(new Cn(Ne,Ce,Pe))}),this.close(!0),[2]}})})},Re.prototype.getState=function(Ce){Ce===!0&&this.setCurrentMarker();var Pe={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Ne){return Pe.markers.push(Ne.getState())}),Pe},Re.prototype.restoreState=function(Ce){var Pe=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);Ce.markers.forEach(function(Ne){var ke=Pe._availableMarkerTypes.find(function(nt){return nt.typeName===Ne.typeName});if(ke!==void 0){var Se=Pe.addNewMarker(ke);Se.restoreState(Ne),Pe.markers.push(Se)}}),Ce.width&&Ce.height&&(Ce.width!==this.imageWidth||Ce.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/Ce.width,this.imageHeight/Ce.height),this.eventListeners.restorestate.forEach(function(Ne){return Ne(new rn(Pe))})},Re.prototype.addNewMarker=function(Ce){var Pe=Ke.createGroup();return this.markerImage.appendChild(Pe),new Ce(Pe,this.overlayContainer,this.settings)},Re.prototype.createNewMarker=function(Ce){var Pe,Ne=this;(Pe=typeof Ce=="string"?this._availableMarkerTypes.find(function(ke){return ke.typeName===Ce}):Ce)&&(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(ke){return ke(new ft(Ne,Ne._currentMarker))}))},Re.prototype.markerCreated=function(Ce){var Pe=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(Ce),this.setCurrentMarker(Ce),Ce instanceof Qe&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Qe):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Ne){return Ne(new ft(Pe,Pe._currentMarker))})},Re.prototype.colorChanged=function(Ce){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=Ce,this.settings.defaultStrokeColor=Ce)},Re.prototype.fillColorChanged=function(Ce){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=Ce)},Re.prototype.markerStateChanged=function(Ce){var Pe=this;this.eventListeners.markerchange.forEach(function(Ne){return Ne(new ft(Pe,Ce))})},Re.prototype.setCurrentMarker=function(Ce){var Pe=this;this._currentMarker!==Ce&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Ne){return Ne(new ft(Pe,Pe._currentMarker))})),this._currentMarker=Ce,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(Ne){return Ne(new ft(Pe,Pe._currentMarker))}))},Re.prototype.onPointerDown=function(Ce){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||Ce.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(Ne){return Ne.ownsTarget(Ce.target)});Pe!==void 0?(this.setCurrentMarker(Pe),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Ce.clientX,Ce.clientY),Ce.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:Ce.clientX,y:Ce.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Ce.clientX,Ce.clientY))},Re.prototype.onDblClick=function(Ce){if(this._isFocused||this.focus(),this.mode==="select"){var Pe=this.markers.find(function(Ne){return Ne.ownsTarget(Ce.target)});Pe!==void 0&&Pe!==this._currentMarker&&this.setCurrentMarker(Pe),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(Ce.clientX,Ce.clientY),Ce.target):this.setCurrentMarker()}},Re.prototype.onPointerMove=function(Ce){this.touchPoints!==1&&Ce.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||Ce.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(Ce.clientX,Ce.clientY)):this.zoomLevel>1&&this.panTo({x:Ce.clientX,y:Ce.clientY}))},Re.prototype.onPointerUp=function(Ce){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(Ce.clientX,Ce.clientY)),this.isDragging=!1,this.addUndoStep()},Re.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Re.prototype.onKeyUp=function(Ce){this._currentMarker===void 0||this.notesArea!==void 0||Ce.key!=="Delete"&&Ce.key!=="Backspace"||this.deleteSelectedMarker()},Re.prototype.clientToLocalCoordinates=function(Ce,Pe){var Ne=this.markerImage.getBoundingClientRect();return{x:(Ce-Ne.left)/this.zoomLevel,y:(Pe-Ne.top)/this.zoomLevel}},Re.prototype.onWindowResize=function(){this.positionUI()},Re.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var Ce=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Ce+"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()},Re.prototype.addLicenseKey=function(Ce){Be.addKey(Ce)},Re.prototype.addEventListener=function(Ce,Pe){this.eventListeners.addEventListener(Ce,Pe)},Re.prototype.removeEventListener=function(Ce,Pe){this.eventListeners.removeEventListener(Ce,Pe)},Re.prototype.renderState=function(Ce){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(Ce),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Re.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Re.prototype.focus=function(){var Ce=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 rn(Ce))}))},Re.prototype.blur=function(){var Ce=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Pe){return Pe(new rn(Ce))}))},Re.instanceCounter=0,Re}()},17115:function(Pn,an,ve){"use strict";ve.d(an,{ZP:function(){return Be}});var ce=ve(72071),De=ve(59301),_e=ve(47273),Ct=0,Ze=(0,_e.Z)();function Ke(){var mt;return Ze?(mt=Ct,Ct+=1):mt="TEST_OR_SSR",mt}function Be(mt){var ct=De.useState(),He=(0,ce.Z)(ct,2),Et=He[0],ht=He[1];return De.useEffect(function(){ht("rc_select_".concat(Ke()))},[]),mt||Et}},77861:function(Pn,an,ve){"use strict";ve.d(an,{Ac:function(){return Dt},Xo:function(){return gi},Wx:function(){return Ji},ZP:function(){return tn},lk:function(){return we}});var ce=ve(96663),De=ve(19127),_e=ve(90493),Ct=ve(44127),Ze=ve(72071),Ke=ve(6620),Be=ve(20135),mt=ve(18929),ct=ve(48736),He=ve(59301),Et=ve(92310),ht=ve.n(Et),dt=ve(34280),Ae=ve(49658),te=ve(10228),ee=ve(8654),he=function(rt){var Vt=rt.className,on=rt.customizeIcon,xn=rt.customizeIconProps,An=rt.onMouseDown,yt=rt.onClick,cn=rt.children,On;return typeof on=="function"?On=on(xn):On=on,He.createElement("span",{className:Vt,onMouseDown:function(Wt){Wt.preventDefault(),An&&An(Wt)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:yt,"aria-hidden":!0},On!==void 0?On:He.createElement("span",{className:ht()(Vt.split(/\s+/).map(function(ri){return"".concat(ri,"-icon")}))},cn))},se=he;function de(xt,rt,Vt,on,xn){var An=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,yt=arguments.length>6?arguments[6]:void 0,cn=arguments.length>7?arguments[7]:void 0,On=He.useMemo(function(){if((0,Be.Z)(on)==="object")return on.clearIcon;if(xn)return xn},[on,xn]),ri=He.useMemo(function(){return!!(!An&&on&&(Vt.length||yt)&&!(cn==="combobox"&&yt===""))},[on,An,Vt.length,yt,cn]);return{allowClear:ri,clearIcon:He.createElement(se,{className:"".concat(xt,"-clear"),onMouseDown:rt,customizeIcon:On},"\xD7")}}var me=He.createContext(null);function we(){return He.useContext(me)}function be(){var xt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,rt=He.useState(!1),Vt=(0,Ze.Z)(rt,2),on=Vt[0],xn=Vt[1],An=He.useRef(null),yt=function(){window.clearTimeout(An.current)};He.useEffect(function(){return yt},[]);var cn=function(ri,Wt){yt(),An.current=window.setTimeout(function(){xn(ri),Wt&&Wt()},xt)};return[on,cn,yt]}function Me(){var xt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,rt=He.useRef(null),Vt=He.useRef(null);He.useEffect(function(){return function(){window.clearTimeout(Vt.current)}},[]);function on(xn){(xn||rt.current===null)&&(rt.current=xn),window.clearTimeout(Vt.current),Vt.current=window.setTimeout(function(){rt.current=null},xt)}return[function(){return rt.current},on]}function Ie(xt,rt,Vt,on){var xn=He.useRef(null);xn.current={open:rt,triggerOpen:Vt,customizedTrigger:on},He.useEffect(function(){function An(yt){var cn;if(!((cn=xn.current)!==null&&cn!==void 0&&cn.customizedTrigger)){var On=yt.target;On.shadowRoot&&yt.composed&&(On=yt.composedPath()[0]||On),xn.current.open&&xt().filter(function(ri){return ri}).every(function(ri){return!ri.contains(On)&&ri!==On})&&xn.current.triggerOpen(!1)}}return window.addEventListener("mousedown",An),function(){return window.removeEventListener("mousedown",An)}},[])}var ze=ve(26112),et=ve(11780),$e=function(rt,Vt){var on,xn,An=rt.prefixCls,yt=rt.id,cn=rt.inputElement,On=rt.disabled,ri=rt.tabIndex,Wt=rt.autoFocus,Jt=rt.autoComplete,hi=rt.editable,ci=rt.activeDescendantId,ui=rt.value,qn=rt.maxLength,di=rt.onKeyDown,li=rt.onMouseDown,Ai=rt.onChange,er=rt.onPaste,sr=rt.onCompositionStart,vn=rt.onCompositionEnd,Nr=rt.open,Dr=rt.attrs,ir=cn||He.createElement("input",null),fn=ir,jn=fn.ref,Ei=fn.props,zi=Ei.onKeyDown,Ni=Ei.onChange,Gi=Ei.onMouseDown,ur=Ei.onCompositionStart,Qi=Ei.onCompositionEnd,rr=Ei.style;return(0,ct.Kp)(!("maxLength"in ir.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),ir=He.cloneElement(ir,(0,Ct.Z)((0,Ct.Z)((0,Ct.Z)({type:"search"},Ei),{},{id:yt,ref:(0,ee.sQ)(Vt,jn),disabled:On,tabIndex:ri,autoComplete:Jt||"off",autoFocus:Wt,className:ht()("".concat(An,"-selection-search-input"),(on=ir)===null||on===void 0||(xn=on.props)===null||xn===void 0?void 0:xn.className),role:"combobox","aria-label":"Search","aria-expanded":Nr||!1,"aria-haspopup":"listbox","aria-owns":"".concat(yt,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(yt,"_list"),"aria-activedescendant":Nr?ci:void 0},Dr),{},{value:hi?ui:"",maxLength:qn,readOnly:!hi,unselectable:hi?null:"on",style:(0,Ct.Z)((0,Ct.Z)({},rr),{},{opacity:hi?null:0}),onKeyDown:function(Nn){di(Nn),zi&&zi(Nn)},onMouseDown:function(Nn){li(Nn),Gi&&Gi(Nn)},onChange:function(Nn){Ai(Nn),Ni&&Ni(Nn)},onCompositionStart:function(Nn){sr(Nn),ur&&ur(Nn)},onCompositionEnd:function(Nn){vn(Nn),Qi&&Qi(Nn)},onPaste:er})),ir},gt=He.forwardRef($e);gt.displayName="Input";var je=gt;function Tt(xt){return Array.isArray(xt)?xt:xt!==void 0?[xt]:[]}var Qe=typeof window!="undefined"&&window.document&&window.document.documentElement,bt=Qe;function Nt(xt){return xt!=null}function At(xt){return!xt&&xt!==0}function Zt(xt){return["string","number"].includes((0,Be.Z)(xt))}function Yt(xt){var rt=void 0;return xt&&(Zt(xt.title)?rt=xt.title.toString():Zt(xt.label)&&(rt=xt.label.toString())),rt}function ut(xt,rt){bt?He.useLayoutEffect(xt,rt):He.useEffect(xt,rt)}function Ge(xt){var rt;return(rt=xt.key)!==null&&rt!==void 0?rt:xt.value}var kt=function(rt){rt.preventDefault(),rt.stopPropagation()},ln=function(rt){var Vt=rt.id,on=rt.prefixCls,xn=rt.values,An=rt.open,yt=rt.searchValue,cn=rt.autoClearSearchValue,On=rt.inputRef,ri=rt.placeholder,Wt=rt.disabled,Jt=rt.mode,hi=rt.showSearch,ci=rt.autoFocus,ui=rt.autoComplete,qn=rt.activeDescendantId,di=rt.tabIndex,li=rt.removeIcon,Ai=rt.maxTagCount,er=rt.maxTagTextLength,sr=rt.maxTagPlaceholder,vn=sr===void 0?function(uo){return"+ ".concat(uo.length," ...")}:sr,Nr=rt.tagRender,Dr=rt.onToggleOpen,ir=rt.onRemove,fn=rt.onInputChange,jn=rt.onInputPaste,Ei=rt.onInputKeyDown,zi=rt.onInputMouseDown,Ni=rt.onInputCompositionStart,Gi=rt.onInputCompositionEnd,ur=He.useRef(null),Qi=(0,He.useState)(0),rr=(0,Ze.Z)(Qi,2),fr=rr[0],Nn=rr[1],Jr=(0,He.useState)(!1),Ln=(0,Ze.Z)(Jr,2),Zr=Ln[0],co=Ln[1],Bi="".concat(on,"-selection"),Po=An||Jt==="multiple"&&cn===!1||Jt==="tags"?yt:"",ao=Jt==="tags"||Jt==="multiple"&&cn===!1||hi&&(An||Zr);ut(function(){Nn(ur.current.scrollWidth)},[Po]);function Vi(uo,Zo,ga,Pa,ia){return He.createElement("span",{className:ht()("".concat(Bi,"-item"),(0,_e.Z)({},"".concat(Bi,"-item-disabled"),ga)),title:Yt(uo)},He.createElement("span",{className:"".concat(Bi,"-item-content")},Zo),Pa&&He.createElement(se,{className:"".concat(Bi,"-item-remove"),onMouseDown:kt,onClick:ia,customizeIcon:li},"\xD7"))}function qi(uo,Zo,ga,Pa,ia){var Or=function(fo){kt(fo),Dr(!An)};return He.createElement("span",{onMouseDown:Or},Nr({label:Zo,value:uo,disabled:ga,closable:Pa,onClose:ia}))}function Hr(uo){var Zo=uo.disabled,ga=uo.label,Pa=uo.value,ia=!Wt&&!Zo,Or=ga;if(typeof er=="number"&&(typeof ga=="string"||typeof ga=="number")){var kr=String(Or);kr.length>er&&(Or="".concat(kr.slice(0,er),"..."))}var fo=function(To){To&&To.stopPropagation(),ir(uo)};return typeof Nr=="function"?qi(Pa,Or,Zo,ia,fo):Vi(uo,Or,Zo,ia,fo)}function ro(uo){var Zo=typeof vn=="function"?vn(uo):vn;return Vi({title:Zo},Zo,!1)}var xi=He.createElement("div",{className:"".concat(Bi,"-search"),style:{width:fr},onFocus:function(){co(!0)},onBlur:function(){co(!1)}},He.createElement(je,{ref:On,open:An,prefixCls:on,id:Vt,inputElement:null,disabled:Wt,autoFocus:ci,autoComplete:ui,editable:ao,activeDescendantId:qn,value:Po,onKeyDown:Ei,onMouseDown:zi,onChange:fn,onPaste:jn,onCompositionStart:Ni,onCompositionEnd:Gi,tabIndex:di,attrs:(0,ze.Z)(rt,!0)}),He.createElement("span",{ref:ur,className:"".concat(Bi,"-search-mirror"),"aria-hidden":!0},Po,"\xA0")),tt=He.createElement(et.Z,{prefixCls:"".concat(Bi,"-overflow"),data:xn,renderItem:Hr,renderRest:ro,suffix:xi,itemKey:Ge,maxCount:Ai});return He.createElement(He.Fragment,null,tt,!xn.length&&!Po&&He.createElement("span",{className:"".concat(Bi,"-placeholder")},ri))},sn=ln,Bt=function(rt){var Vt=rt.inputElement,on=rt.prefixCls,xn=rt.id,An=rt.inputRef,yt=rt.disabled,cn=rt.autoFocus,On=rt.autoComplete,ri=rt.activeDescendantId,Wt=rt.mode,Jt=rt.open,hi=rt.values,ci=rt.placeholder,ui=rt.tabIndex,qn=rt.showSearch,di=rt.searchValue,li=rt.activeValue,Ai=rt.maxLength,er=rt.onInputKeyDown,sr=rt.onInputMouseDown,vn=rt.onInputChange,Nr=rt.onInputPaste,Dr=rt.onInputCompositionStart,ir=rt.onInputCompositionEnd,fn=rt.title,jn=He.useState(!1),Ei=(0,Ze.Z)(jn,2),zi=Ei[0],Ni=Ei[1],Gi=Wt==="combobox",ur=Gi||qn,Qi=hi[0],rr=di||"";Gi&&li&&!zi&&(rr=li),He.useEffect(function(){Gi&&Ni(!1)},[Gi,li]);var fr=Wt!=="combobox"&&!Jt&&!qn?!1:!!rr,Nn=fn===void 0?Yt(Qi):fn,Jr=function(){if(Qi)return null;var Zr=fr?{visibility:"hidden"}:void 0;return He.createElement("span",{className:"".concat(on,"-selection-placeholder"),style:Zr},ci)};return He.createElement(He.Fragment,null,He.createElement("span",{className:"".concat(on,"-selection-search")},He.createElement(je,{ref:An,prefixCls:on,id:xn,open:Jt,inputElement:Vt,disabled:yt,autoFocus:cn,autoComplete:On,editable:ur,activeDescendantId:ri,value:rr,onKeyDown:er,onMouseDown:sr,onChange:function(Zr){Ni(!0),vn(Zr)},onPaste:Nr,onCompositionStart:Dr,onCompositionEnd:ir,tabIndex:ui,attrs:(0,ze.Z)(rt,!0),maxLength:Gi?Ai:void 0})),!Gi&&Qi?He.createElement("span",{className:"".concat(on,"-selection-item"),title:Nn,style:fr?{visibility:"hidden"}:void 0},Qi.label):null,Jr())},Gt=Bt;function en(xt){return![te.Z.ESC,te.Z.SHIFT,te.Z.BACKSPACE,te.Z.TAB,te.Z.WIN_KEY,te.Z.ALT,te.Z.META,te.Z.WIN_KEY_RIGHT,te.Z.CTRL,te.Z.SEMICOLON,te.Z.EQUALS,te.Z.CAPS_LOCK,te.Z.CONTEXT_MENU,te.Z.F1,te.Z.F2,te.Z.F3,te.Z.F4,te.Z.F5,te.Z.F6,te.Z.F7,te.Z.F8,te.Z.F9,te.Z.F10,te.Z.F11,te.Z.F12].includes(xt)}var Bn=function(rt,Vt){var on=(0,He.useRef)(null),xn=(0,He.useRef)(!1),An=rt.prefixCls,yt=rt.open,cn=rt.mode,On=rt.showSearch,ri=rt.tokenWithEnter,Wt=rt.autoClearSearchValue,Jt=rt.onSearch,hi=rt.onSearchSubmit,ci=rt.onToggleOpen,ui=rt.onInputKeyDown,qn=rt.domRef;He.useImperativeHandle(Vt,function(){return{focus:function(){on.current.focus()},blur:function(){on.current.blur()}}});var di=Me(0),li=(0,Ze.Z)(di,2),Ai=li[0],er=li[1],sr=function(rr){var fr=rr.which;(fr===te.Z.UP||fr===te.Z.DOWN)&&rr.preventDefault(),ui&&ui(rr),fr===te.Z.ENTER&&cn==="tags"&&!xn.current&&!yt&&(hi==null||hi(rr.target.value)),en(fr)&&ci(!0)},vn=function(){er(!0)},Nr=(0,He.useRef)(null),Dr=function(rr){Jt(rr,!0,xn.current)!==!1&&ci(!0)},ir=function(){xn.current=!0},fn=function(rr){xn.current=!1,cn!=="combobox"&&Dr(rr.target.value)},jn=function(rr){var fr=rr.target.value;if(ri&&Nr.current&&/[\r\n]/.test(Nr.current)){var Nn=Nr.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");fr=fr.replace(Nn,Nr.current)}Nr.current=null,Dr(fr)},Ei=function(rr){var fr=rr.clipboardData,Nn=fr.getData("text");Nr.current=Nn},zi=function(rr){var fr=rr.target;if(fr!==on.current){var Nn=document.body.style.msTouchAction!==void 0;Nn?setTimeout(function(){on.current.focus()}):on.current.focus()}},Ni=function(rr){var fr=Ai();rr.target!==on.current&&!fr&&cn!=="combobox"&&rr.preventDefault(),(cn!=="combobox"&&(!On||!fr)||!yt)&&(yt&&Wt!==!1&&Jt("",!0,!1),ci())},Gi={inputRef:on,onInputKeyDown:sr,onInputMouseDown:vn,onInputChange:jn,onInputPaste:Ei,onInputCompositionStart:ir,onInputCompositionEnd:fn},ur=cn==="multiple"||cn==="tags"?He.createElement(sn,(0,ce.Z)({},rt,Gi)):He.createElement(Gt,(0,ce.Z)({},rt,Gi));return He.createElement("div",{ref:qn,className:"".concat(An,"-selector"),onClick:zi,onMouseDown:Ni},ur)},rn=He.forwardRef(Bn);rn.displayName="Selector";var Cn=rn,ft=ve(35593),En=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Vn=function(rt){var Vt=rt===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Vt,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Vt,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Vt,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Vt,adjustY:1},htmlRegion:"scroll"}}},Re=function(rt,Vt){var on=rt.prefixCls,xn=rt.disabled,An=rt.visible,yt=rt.children,cn=rt.popupElement,On=rt.animation,ri=rt.transitionName,Wt=rt.dropdownStyle,Jt=rt.dropdownClassName,hi=rt.direction,ci=hi===void 0?"ltr":hi,ui=rt.placement,qn=rt.builtinPlacements,di=rt.dropdownMatchSelectWidth,li=rt.dropdownRender,Ai=rt.dropdownAlign,er=rt.getPopupContainer,sr=rt.empty,vn=rt.getTriggerDOMNode,Nr=rt.onPopupVisibleChange,Dr=rt.onPopupMouseEnter,ir=(0,Ke.Z)(rt,En),fn="".concat(on,"-dropdown"),jn=cn;li&&(jn=li(cn));var Ei=He.useMemo(function(){return qn||Vn(di)},[qn,di]),zi=On?"".concat(fn,"-").concat(On):ri,Ni=typeof di=="number",Gi=He.useMemo(function(){return Ni?null:di===!1?"minWidth":"width"},[di,Ni]),ur=Wt;Ni&&(ur=(0,Ct.Z)((0,Ct.Z)({},ur),{},{width:di}));var Qi=He.useRef(null);return He.useImperativeHandle(Vt,function(){return{getPopupElement:function(){return Qi.current}}}),He.createElement(ft.Z,(0,ce.Z)({},ir,{showAction:Nr?["click"]:[],hideAction:Nr?["click"]:[],popupPlacement:ui||(ci==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Ei,prefixCls:fn,popupTransitionName:zi,popup:He.createElement("div",{ref:Qi,onMouseEnter:Dr},jn),stretch:Gi,popupAlign:Ai,popupVisible:An,getPopupContainer:er,popupClassName:ht()(Jt,(0,_e.Z)({},"".concat(fn,"-empty"),sr)),popupStyle:ur,getTriggerDOMNode:vn,onPopupVisibleChange:Nr}),yt)},Ce=He.forwardRef(Re);Ce.displayName="SelectTrigger";var Pe=Ce,Ne=ve(4537);function ke(xt,rt){var Vt=xt.key,on;return"value"in xt&&(on=xt.value),Vt!=null?Vt:on!==void 0?on:"rc-index-key-".concat(rt)}function Se(xt,rt){var Vt=xt||{},on=Vt.label,xn=Vt.value,An=Vt.options,yt=Vt.groupLabel,cn=on||(rt?"children":"label");return{label:cn,value:xn||"value",options:An||"options",groupLabel:yt||cn}}function nt(xt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Vt=rt.fieldNames,on=rt.childrenAsData,xn=[],An=Se(Vt,!1),yt=An.label,cn=An.value,On=An.options,ri=An.groupLabel;function Wt(Jt,hi){Jt.forEach(function(ci){if(hi||!(On in ci)){var ui=ci[cn];xn.push({key:ke(ci,xn.length),groupOption:hi,data:ci,label:ci[yt],value:ui})}else{var qn=ci[ri];qn===void 0&&on&&(qn=ci.label),xn.push({key:ke(ci,xn.length),group:!0,data:ci,label:qn}),Wt(ci[On],!0)}})}return Wt(xt,!1),xn}function Pt(xt){var rt=(0,Ct.Z)({},xt);return"props"in rt||Object.defineProperty(rt,"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`."),rt}}),rt}function qe(xt,rt){if(!rt||!rt.length)return null;var Vt=!1;function on(An,yt){var cn=(0,Ne.Z)(yt),On=cn[0],ri=cn.slice(1);if(!On)return[An];var Wt=An.split(On);return Vt=Vt||Wt.length>1,Wt.reduce(function(Jt,hi){return[].concat((0,De.Z)(Jt),(0,De.Z)(on(hi,ri)))},[]).filter(function(Jt){return Jt})}var xn=on(xt,rt);return Vt?xn:null}var Ue=["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"],St=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function vt(xt){return xt==="tags"||xt==="multiple"}var lt=He.forwardRef(function(xt,rt){var Vt,on,xn=xt.id,An=xt.prefixCls,yt=xt.className,cn=xt.showSearch,On=xt.tagRender,ri=xt.direction,Wt=xt.omitDomProps,Jt=xt.displayValues,hi=xt.onDisplayValuesChange,ci=xt.emptyOptions,ui=xt.notFoundContent,qn=ui===void 0?"Not Found":ui,di=xt.onClear,li=xt.mode,Ai=xt.disabled,er=xt.loading,sr=xt.getInputElement,vn=xt.getRawInputElement,Nr=xt.open,Dr=xt.defaultOpen,ir=xt.onDropdownVisibleChange,fn=xt.activeValue,jn=xt.onActiveValueChange,Ei=xt.activeDescendantId,zi=xt.searchValue,Ni=xt.autoClearSearchValue,Gi=xt.onSearch,ur=xt.onSearchSplit,Qi=xt.tokenSeparators,rr=xt.allowClear,fr=xt.suffixIcon,Nn=xt.clearIcon,Jr=xt.OptionList,Ln=xt.animation,Zr=xt.transitionName,co=xt.dropdownStyle,Bi=xt.dropdownClassName,Po=xt.dropdownMatchSelectWidth,ao=xt.dropdownRender,Vi=xt.dropdownAlign,qi=xt.placement,Hr=xt.builtinPlacements,ro=xt.getPopupContainer,xi=xt.showAction,tt=xi===void 0?[]:xi,uo=xt.onFocus,Zo=xt.onBlur,ga=xt.onKeyUp,Pa=xt.onKeyDown,ia=xt.onMouseDown,Or=(0,Ke.Z)(xt,Ue),kr=vt(li),fo=(cn!==void 0?cn:kr)||li==="combobox",jr=(0,Ct.Z)({},Or);St.forEach(function(Co){delete jr[Co]}),Wt==null||Wt.forEach(function(Co){delete jr[Co]});var To=He.useState(!1),qa=(0,Ze.Z)(To,2),Mr=qa[0],hr=qa[1];He.useEffect(function(){hr((0,Ae.Z)())},[]);var Xn=He.useRef(null),yr=He.useRef(null),wo=He.useRef(null),ua=He.useRef(null),No=He.useRef(null),yo=be(),ta=(0,Ze.Z)(yo,3),na=ta[0],Na=ta[1],ka=ta[2];He.useImperativeHandle(rt,function(){var Co,Uo;return{focus:(Co=ua.current)===null||Co===void 0?void 0:Co.focus,blur:(Uo=ua.current)===null||Uo===void 0?void 0:Uo.blur,scrollTo:function(ds){var es;return(es=No.current)===null||es===void 0?void 0:es.scrollTo(ds)}}});var is=He.useMemo(function(){var Co;if(li!=="combobox")return zi;var Uo=(Co=Jt[0])===null||Co===void 0?void 0:Co.value;return typeof Uo=="string"||typeof Uo=="number"?String(Uo):""},[zi,li,Jt]),gn=li==="combobox"&&typeof sr=="function"&&sr()||null,Oa=typeof vn=="function"&&vn(),Vl=(0,ee.x1)(yr,Oa==null||(Vt=Oa.props)===null||Vt===void 0?void 0:Vt.ref),Hs=He.useState(!1),wl=(0,Ze.Z)(Hs,2),Ma=wl[0],yu=wl[1];(0,dt.Z)(function(){yu(!0)},[]);var Cl=(0,mt.Z)(!1,{defaultValue:Dr,value:Nr}),ma=(0,Ze.Z)(Cl,2),Fo=ma[0],Ul=ma[1],$r=Ma?Fo:!1,Ko=!qn&&ci;(Ai||Ko&&$r&&li==="combobox")&&($r=!1);var So=Ko?!1:$r,Di=He.useCallback(function(Co){var Uo=Co!==void 0?Co:!$r;Ai||(Ul(Uo),$r!==Uo&&(ir==null||ir(Uo)))},[Ai,$r,Ul,ir]),Ga=He.useMemo(function(){return(Qi||[]).some(function(Co){return[`
|
|
|
`,`\r
|
|
|
`].includes(Co)})},[Qi]),$a=function(Uo,Ws,ds){var es=!0,Aa=Uo;jn==null||jn(null);var za=ds?null:qe(Uo,Qi);return li!=="combobox"&&za&&(Aa="",ur==null||ur(za),Di(!1),es=!1),Gi&&is!==Aa&&Gi(Aa,{source:Ws?"typing":"effect"}),es},bs=function(Uo){!Uo||!Uo.trim()||Gi(Uo,{source:"submit"})};He.useEffect(function(){!$r&&!kr&&li!=="combobox"&&$a("",!1,!1)},[$r]),He.useEffect(function(){Fo&&Ai&&Ul(!1),Ai&&Na(!1)},[Ai]);var El=Me(),Dl=(0,Ze.Z)(El,2),bi=Dl[0],Fa=Dl[1],cs=function(Uo){var Ws=bi(),ds=Uo.which;if(ds===te.Z.ENTER&&(li!=="combobox"&&Uo.preventDefault(),$r||Di(!0)),Fa(!!is),ds===te.Z.BACKSPACE&&!Ws&&kr&&!is&&Jt.length){for(var es=(0,De.Z)(Jt),Aa=null,za=es.length-1;za>=0;za-=1){var rs=es[za];if(!rs.disabled){es.splice(za,1),Aa=rs;break}}Aa&&hi(es,{type:"remove",values:[Aa]})}for(var Ka=arguments.length,Gs=new Array(Ka>1?Ka-1:0),$s=1;$s<Ka;$s++)Gs[$s-1]=arguments[$s];if($r&&No.current){var va;(va=No.current).onKeyDown.apply(va,[Uo].concat(Gs))}Pa==null||Pa.apply(void 0,[Uo].concat(Gs))},bl=function(Uo){for(var Ws=arguments.length,ds=new Array(Ws>1?Ws-1:0),es=1;es<Ws;es++)ds[es-1]=arguments[es];if($r&&No.current){var Aa;(Aa=No.current).onKeyUp.apply(Aa,[Uo].concat(ds))}ga==null||ga.apply(void 0,[Uo].concat(ds))},Ol=function(Uo){var Ws=Jt.filter(function(ds){return ds!==Uo});hi(Ws,{type:"remove",values:[Uo]})},Il=He.useRef(!1),Qr=function(){Na(!0),Ai||(uo&&!Il.current&&uo.apply(void 0,arguments),tt.includes("focus")&&Di(!0)),Il.current=!0},Ju=function(){Na(!1,function(){Il.current=!1,Di(!1)}),!Ai&&(is&&(li==="tags"?Gi(is,{source:"submit"}):li==="multiple"&&Gi("",{source:"blur"})),Zo&&Zo.apply(void 0,arguments))},nl=[];He.useEffect(function(){return function(){nl.forEach(function(Co){return clearTimeout(Co)}),nl.splice(0,nl.length)}},[]);var vs=function(Uo){var Ws,ds=Uo.target,es=(Ws=wo.current)===null||Ws===void 0?void 0:Ws.getPopupElement();if(es&&es.contains(ds)){var Aa=setTimeout(function(){var Gs=nl.indexOf(Aa);if(Gs!==-1&&nl.splice(Gs,1),ka(),!Mr&&!es.contains(document.activeElement)){var $s;($s=ua.current)===null||$s===void 0||$s.focus()}});nl.push(Aa)}for(var za=arguments.length,rs=new Array(za>1?za-1:0),Ka=1;Ka<za;Ka++)rs[Ka-1]=arguments[Ka];ia==null||ia.apply(void 0,[Uo].concat(rs))},ys=He.useState({}),Su=(0,Ze.Z)(ys,2),Iu=Su[1];function Ys(){Iu({})}var ul;Oa&&(ul=function(Uo){Di(Uo)}),Ie(function(){var Co;return[Xn.current,(Co=wo.current)===null||Co===void 0?void 0:Co.getPopupElement()]},So,Di,!!Oa);var Mh=He.useMemo(function(){return(0,Ct.Z)((0,Ct.Z)({},xt),{},{notFoundContent:qn,open:$r,triggerOpen:So,id:xn,showSearch:fo,multiple:kr,toggleOpen:Di})},[xt,qn,So,$r,xn,fo,kr,Di]),uc=!!fr||er,Lh;uc&&(Lh=He.createElement(se,{className:ht()("".concat(An,"-arrow"),(0,_e.Z)({},"".concat(An,"-arrow-loading"),er)),customizeIcon:fr,customizeIconProps:{loading:er,searchValue:is,open:$r,focused:na,showSearch:fo}}));var hc=function(){var Uo;di==null||di(),(Uo=ua.current)===null||Uo===void 0||Uo.focus(),hi([],{type:"clear",values:Jt}),$a("",!1,!1)},Fh=de(An,hc,Jt,rr,Nn,Ai,is,li),Ru=Fh.allowClear,Qu=Fh.clearIcon,Rl=He.createElement(Jr,{ref:No}),Hh=ht()(An,yt,(on={},(0,_e.Z)(on,"".concat(An,"-focused"),na),(0,_e.Z)(on,"".concat(An,"-multiple"),kr),(0,_e.Z)(on,"".concat(An,"-single"),!kr),(0,_e.Z)(on,"".concat(An,"-allow-clear"),rr),(0,_e.Z)(on,"".concat(An,"-show-arrow"),uc),(0,_e.Z)(on,"".concat(An,"-disabled"),Ai),(0,_e.Z)(on,"".concat(An,"-loading"),er),(0,_e.Z)(on,"".concat(An,"-open"),$r),(0,_e.Z)(on,"".concat(An,"-customize-input"),gn),(0,_e.Z)(on,"".concat(An,"-show-search"),fo),on)),qu=He.createElement(Pe,{ref:wo,disabled:Ai,prefixCls:An,visible:So,popupElement:Rl,animation:Ln,transitionName:Zr,dropdownStyle:co,dropdownClassName:Bi,direction:ri,dropdownMatchSelectWidth:Po,dropdownRender:ao,dropdownAlign:Vi,placement:qi,builtinPlacements:Hr,getPopupContainer:ro,empty:ci,getTriggerDOMNode:function(){return yr.current},onPopupVisibleChange:ul,onPopupMouseEnter:Ys},Oa?He.cloneElement(Oa,{ref:Vl}):He.createElement(Cn,(0,ce.Z)({},xt,{domRef:yr,prefixCls:An,inputElement:gn,ref:ua,id:xn,showSearch:fo,autoClearSearchValue:Ni,mode:li,activeDescendantId:Ei,tagRender:On,values:Jt,open:$r,onToggleOpen:Di,activeValue:fn,searchValue:is,onSearch:$a,onSearchSubmit:bs,onRemove:Ol,tokenWithEnter:Ga}))),eh;return Oa?eh=qu:eh=He.createElement("div",(0,ce.Z)({className:Hh},jr,{ref:Xn,onMouseDown:vs,onKeyDown:cs,onKeyUp:bl,onFocus:Qr,onBlur:Ju}),na&&!$r&&He.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(Jt.map(function(Co){var Uo=Co.label,Ws=Co.value;return["number","string"].includes((0,Be.Z)(Uo))?Uo:Ws}).join(", "))),qu,Lh,Ru&&Qu),He.createElement(me.Provider,{value:Mh},eh)}),Dt=lt,un=function(xt,rt){var Vt=He.useRef({values:new Map,options:new Map}),on=He.useMemo(function(){var An=Vt.current,yt=An.values,cn=An.options,On=xt.map(function(Jt){if(Jt.label===void 0){var hi;return(0,Ct.Z)((0,Ct.Z)({},Jt),{},{label:(hi=yt.get(Jt.value))===null||hi===void 0?void 0:hi.label})}return Jt}),ri=new Map,Wt=new Map;return On.forEach(function(Jt){ri.set(Jt.value,Jt),Wt.set(Jt.value,rt.get(Jt.value)||cn.get(Jt.value))}),Vt.current.values=ri,Vt.current.options=Wt,On},[xt,rt]),xn=He.useCallback(function(An){return rt.get(An)||Vt.current.options.get(An)},[rt]);return[on,xn]};function Xt(xt,rt){return Tt(xt).join("").toUpperCase().includes(rt)}var $t=function(xt,rt,Vt,on,xn){return He.useMemo(function(){if(!Vt||on===!1)return xt;var An=rt.options,yt=rt.label,cn=rt.value,On=[],ri=typeof on=="function",Wt=Vt.toUpperCase(),Jt=ri?on:function(ci,ui){return xn?Xt(ui[xn],Wt):ui[An]?Xt(ui[yt!=="children"?yt:"label"],Wt):Xt(ui[cn],Wt)},hi=ri?function(ci){return Pt(ci)}:function(ci){return ci};return xt.forEach(function(ci){if(ci[An]){var ui=Jt(Vt,hi(ci));if(ui)On.push(ci);else{var qn=ci[An].filter(function(di){return Jt(Vt,hi(di))});qn.length&&On.push((0,Ct.Z)((0,Ct.Z)({},ci),{},(0,_e.Z)({},An,qn)))}return}Jt(Vt,hi(ci))&&On.push(ci)}),On},[xt,on,xn,Vt,rt])},wn=ve(17115),bn=ve(11592),pn=["children","value"],Yn=["children"];function ai(xt){var rt=xt,Vt=rt.key,on=rt.props,xn=on.children,An=on.value,yt=(0,Ke.Z)(on,pn);return(0,Ct.Z)({key:Vt,value:An!==void 0?An:Vt,children:xn},yt)}function Wn(xt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,bn.Z)(xt).map(function(Vt,on){if(!He.isValidElement(Vt)||!Vt.type)return null;var xn=Vt,An=xn.type.isSelectOptGroup,yt=xn.key,cn=xn.props,On=cn.children,ri=(0,Ke.Z)(cn,Yn);return rt||!An?ai(Vt):(0,Ct.Z)((0,Ct.Z)({key:"__RC_SELECT_GRP__".concat(yt===null?on:yt,"__"),label:yt},ri),{},{options:Wn(On)})}).filter(function(Vt){return Vt})}function Rn(xt,rt,Vt,on,xn){return He.useMemo(function(){var An=xt,yt=!xt;yt&&(An=Wn(rt));var cn=new Map,On=new Map,ri=function(hi,ci,ui){ui&&typeof ui=="string"&&hi.set(ci[ui],ci)};function Wt(Jt){for(var hi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ci=0;ci<Jt.length;ci+=1){var ui=Jt[ci];!ui[Vt.options]||hi?(cn.set(ui[Vt.value],ui),ri(On,ui,Vt.label),ri(On,ui,on),ri(On,ui,xn)):Wt(ui[Vt.options],!0)}}return Wt(An),{options:An,valueOptions:cn,labelOptions:On}},[xt,rt,Vt,on,xn])}function ii(xt){var rt=He.useRef();rt.current=xt;var Vt=He.useCallback(function(){return rt.current.apply(rt,arguments)},[]);return Vt}var pi=function(){return null};pi.isSelectOptGroup=!0;var gi=pi,Ri=function(){return null};Ri.isSelectOption=!0;var Ji=Ri,Un=ve(80547),$n=ve(2738),ti=ve(24916),Pi=He.createContext(null),mi=Pi;function nr(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var ji=["disabled","title","children","style","className"];function Le(xt){return typeof xt=="string"||typeof xt=="number"}var si=function(rt,Vt){var on=we(),xn=on.prefixCls,An=on.id,yt=on.open,cn=on.multiple,On=on.mode,ri=on.searchValue,Wt=on.toggleOpen,Jt=on.notFoundContent,hi=on.onPopupScroll,ci=He.useContext(mi),ui=ci.flattenOptions,qn=ci.onActiveValue,di=ci.defaultActiveFirstOption,li=ci.onSelect,Ai=ci.menuItemSelectedIcon,er=ci.rawValues,sr=ci.fieldNames,vn=ci.virtual,Nr=ci.direction,Dr=ci.listHeight,ir=ci.listItemHeight,fn="".concat(xn,"-item"),jn=(0,Un.Z)(function(){return ui},[yt,ui],function(Vi,qi){return qi[0]&&Vi[1]!==qi[1]}),Ei=He.useRef(null),zi=function(qi){qi.preventDefault()},Ni=function(qi){Ei.current&&Ei.current.scrollTo(typeof qi=="number"?{index:qi}:qi)},Gi=function(qi){for(var Hr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ro=jn.length,xi=0;xi<ro;xi+=1){var tt=(qi+xi*Hr+ro)%ro,uo=jn[tt],Zo=uo.group,ga=uo.data;if(!Zo&&!ga.disabled)return tt}return-1},ur=He.useState(function(){return Gi(0)}),Qi=(0,Ze.Z)(ur,2),rr=Qi[0],fr=Qi[1],Nn=function(qi){var Hr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;fr(qi);var ro={source:Hr?"keyboard":"mouse"},xi=jn[qi];if(!xi){qn(null,-1,ro);return}qn(xi.value,qi,ro)};(0,He.useEffect)(function(){Nn(di!==!1?Gi(0):-1)},[jn.length,ri]);var Jr=He.useCallback(function(Vi){return er.has(Vi)&&On!=="combobox"},[On,(0,De.Z)(er).toString(),er.size]);(0,He.useEffect)(function(){var Vi=setTimeout(function(){if(!cn&&yt&&er.size===1){var Hr=Array.from(er)[0],ro=jn.findIndex(function(xi){var tt=xi.data;return tt.value===Hr});ro!==-1&&(Nn(ro),Ni(ro))}});if(yt){var qi;(qi=Ei.current)===null||qi===void 0||qi.scrollTo(void 0)}return function(){return clearTimeout(Vi)}},[yt,ri,ui.length]);var Ln=function(qi){qi!==void 0&&li(qi,{selected:!er.has(qi)}),cn||Wt(!1)};if(He.useImperativeHandle(Vt,function(){return{onKeyDown:function(qi){var Hr=qi.which,ro=qi.ctrlKey;switch(Hr){case te.Z.N:case te.Z.P:case te.Z.UP:case te.Z.DOWN:{var xi=0;if(Hr===te.Z.UP?xi=-1:Hr===te.Z.DOWN?xi=1:nr()&&ro&&(Hr===te.Z.N?xi=1:Hr===te.Z.P&&(xi=-1)),xi!==0){var tt=Gi(rr+xi,xi);Ni(tt),Nn(tt,!0)}break}case te.Z.ENTER:{var uo=jn[rr];uo&&!uo.data.disabled?Ln(uo.value):Ln(void 0),yt&&qi.preventDefault();break}case te.Z.ESC:Wt(!1),yt&&qi.stopPropagation()}},onKeyUp:function(){},scrollTo:function(qi){Ni(qi)}}}),jn.length===0)return He.createElement("div",{role:"listbox",id:"".concat(An,"_list"),className:"".concat(fn,"-empty"),onMouseDown:zi},Jt);var Zr=Object.keys(sr).map(function(Vi){return sr[Vi]}),co=function(qi){return qi.label};function Bi(Vi,qi){var Hr=Vi.group;return{role:Hr?"presentation":"option",id:"".concat(An,"_list_").concat(qi)}}var Po=function(qi){var Hr=jn[qi];if(!Hr)return null;var ro=Hr.data||{},xi=ro.value,tt=Hr.group,uo=(0,ze.Z)(ro,!0),Zo=co(Hr);return Hr?He.createElement("div",(0,ce.Z)({"aria-label":typeof Zo=="string"&&!tt?Zo:null},uo,{key:qi},Bi(Hr,qi),{"aria-selected":Jr(xi)}),xi):null},ao={role:"listbox",id:"".concat(An,"_list")};return He.createElement(He.Fragment,null,vn&&He.createElement("div",(0,ce.Z)({},ao,{style:{height:0,width:0,overflow:"hidden"}}),Po(rr-1),Po(rr),Po(rr+1)),He.createElement(ti.Z,{itemKey:"key",ref:Ei,data:jn,height:Dr,itemHeight:ir,fullHeight:!1,onMouseDown:zi,onScroll:hi,virtual:vn,direction:Nr,innerProps:vn?null:ao},function(Vi,qi){var Hr,ro=Vi.group,xi=Vi.groupOption,tt=Vi.data,uo=Vi.label,Zo=Vi.value,ga=tt.key;if(ro){var Pa,ia=(Pa=tt.title)!==null&&Pa!==void 0?Pa:Le(uo)?uo.toString():void 0;return He.createElement("div",{className:ht()(fn,"".concat(fn,"-group")),title:ia},uo!==void 0?uo:ga)}var Or=tt.disabled,kr=tt.title,fo=tt.children,jr=tt.style,To=tt.className,qa=(0,Ke.Z)(tt,ji),Mr=(0,$n.Z)(qa,Zr),hr=Jr(Zo),Xn="".concat(fn,"-option"),yr=ht()(fn,Xn,To,(Hr={},(0,_e.Z)(Hr,"".concat(Xn,"-grouped"),xi),(0,_e.Z)(Hr,"".concat(Xn,"-active"),rr===qi&&!Or),(0,_e.Z)(Hr,"".concat(Xn,"-disabled"),Or),(0,_e.Z)(Hr,"".concat(Xn,"-selected"),hr),Hr)),wo=co(Vi),ua=!Ai||typeof Ai=="function"||hr,No=typeof wo=="number"?wo:wo||Zo,yo=Le(No)?No.toString():void 0;return kr!==void 0&&(yo=kr),He.createElement("div",(0,ce.Z)({},(0,ze.Z)(Mr),vn?{}:Bi(Vi,qi),{"aria-selected":hr,className:yr,title:yo,onMouseMove:function(){rr===qi||Or||Nn(qi)},onClick:function(){Or||Ln(Zo)},style:jr}),He.createElement("div",{className:"".concat(Xn,"-content")},No),He.isValidElement(Ai)||hr,ua&&He.createElement(se,{className:"".concat(fn,"-option-state"),customizeIcon:Ai,customizeIconProps:{isSelected:hr}},hr?"\u2713":null))}))},Hi=He.forwardRef(si);Hi.displayName="OptionList";var hn=Hi;function ni(xt){var rt=xt.mode,Vt=xt.options,on=xt.children,xn=xt.backfill,An=xt.allowClear,yt=xt.placeholder,cn=xt.getInputElement,On=xt.showSearch,ri=xt.onSearch,Wt=xt.defaultOpen,Jt=xt.autoFocus,hi=xt.labelInValue,ci=xt.value,ui=xt.inputValue,qn=xt.optionLabelProp,di=isMultiple(rt),li=On!==void 0?On:di||rt==="combobox",Ai=Vt||convertChildrenToData(on);if(warning(rt!=="tags"||Ai.every(function(Nr){return!Nr.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),rt==="tags"||rt==="combobox"){var er=Ai.some(function(Nr){return Nr.options?Nr.options.some(function(Dr){return typeof("value"in Dr?Dr.value:Dr.key)=="number"}):typeof("value"in Nr?Nr.value:Nr.key)=="number"});warning(!er,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(rt!=="combobox"||!qn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(rt==="combobox"||!xn,"`backfill` only works with `combobox` mode."),warning(rt==="combobox"||!cn,"`getInputElement` only work with `combobox` mode."),noteOnce(rt!=="combobox"||!cn||!An||!yt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),ri&&!li&&rt!=="combobox"&&rt!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Wt||Jt,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),ci!=null){var sr=toArray(ci);warning(!hi||sr.every(function(Nr){return _typeof(Nr)==="object"&&("key"in Nr||"value"in Nr)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!di||Array.isArray(ci),"`value` should be array when `mode` is `multiple` or `tags`")}if(on){var vn=null;toNodeArray(on).some(function(Nr){if(!React.isValidElement(Nr)||!Nr.type)return!1;var Dr=Nr,ir=Dr.type;if(ir.isSelectOption)return!1;if(ir.isSelectOptGroup){var fn=toNodeArray(Nr.props.children).every(function(jn){return!React.isValidElement(jn)||!Nr.type||jn.type.isSelectOption?!0:(vn=jn.type,!1)});return!fn}return vn=ir,!0}),vn&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(vn.displayName||vn.name||vn,"`.")),warning(ui===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function vi(xt,rt){if(xt){var Vt=function on(xn){for(var An=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,yt=0;yt<xn.length;yt++){var cn=xn[yt];if(cn[rt==null?void 0:rt.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!An&&Array.isArray(cn[rt==null?void 0:rt.options])&&on(cn[rt==null?void 0:rt.options],!0))break}};Vt(xt)}}var Fi=null,_n=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"],Dn=["inputValue"];function Ft(xt){return!xt||(0,Be.Z)(xt)!=="object"}var Ot=He.forwardRef(function(xt,rt){var Vt=xt.id,on=xt.mode,xn=xt.prefixCls,An=xn===void 0?"rc-select":xn,yt=xt.backfill,cn=xt.fieldNames,On=xt.inputValue,ri=xt.searchValue,Wt=xt.onSearch,Jt=xt.autoClearSearchValue,hi=Jt===void 0?!0:Jt,ci=xt.onSelect,ui=xt.onDeselect,qn=xt.dropdownMatchSelectWidth,di=qn===void 0?!0:qn,li=xt.filterOption,Ai=xt.filterSort,er=xt.optionFilterProp,sr=xt.optionLabelProp,vn=xt.options,Nr=xt.children,Dr=xt.defaultActiveFirstOption,ir=xt.menuItemSelectedIcon,fn=xt.virtual,jn=xt.direction,Ei=xt.listHeight,zi=Ei===void 0?200:Ei,Ni=xt.listItemHeight,Gi=Ni===void 0?20:Ni,ur=xt.value,Qi=xt.defaultValue,rr=xt.labelInValue,fr=xt.onChange,Nn=(0,Ke.Z)(xt,_n),Jr=(0,wn.ZP)(Vt),Ln=vt(on),Zr=!!(!vn&&Nr),co=He.useMemo(function(){return li===void 0&&on==="combobox"?!1:li},[li,on]),Bi=He.useMemo(function(){return Se(cn,Zr)},[JSON.stringify(cn),Zr]),Po=(0,mt.Z)("",{value:ri!==void 0?ri:On,postState:function(Ko){return Ko||""}}),ao=(0,Ze.Z)(Po,2),Vi=ao[0],qi=ao[1],Hr=Rn(vn,Nr,Bi,er,sr),ro=Hr.valueOptions,xi=Hr.labelOptions,tt=Hr.options,uo=He.useCallback(function($r){var Ko=Tt($r);return Ko.map(function(So){var Di,Ga,$a,bs,El;if(Ft(So))Di=So;else{var Dl;$a=So.key,Ga=So.label,Di=(Dl=So.value)!==null&&Dl!==void 0?Dl:$a}var bi=ro.get(Di);if(bi){var Fa;if(Ga===void 0&&(Ga=bi==null?void 0:bi[sr||Bi.label]),$a===void 0&&($a=(Fa=bi==null?void 0:bi.key)!==null&&Fa!==void 0?Fa:Di),bs=bi==null?void 0:bi.disabled,El=bi==null?void 0:bi.title,0)var cs}return{label:Ga,value:Di,key:$a,disabled:bs,title:El}})},[Bi,sr,ro]),Zo=(0,mt.Z)(Qi,{value:ur}),ga=(0,Ze.Z)(Zo,2),Pa=ga[0],ia=ga[1],Or=He.useMemo(function(){var $r,Ko=uo(Pa);return on==="combobox"&&At(($r=Ko[0])===null||$r===void 0?void 0:$r.value)?[]:Ko},[Pa,uo,on]),kr=un(Or,ro),fo=(0,Ze.Z)(kr,2),jr=fo[0],To=fo[1],qa=He.useMemo(function(){if(!on&&jr.length===1){var $r=jr[0];if($r.value===null&&($r.label===null||$r.label===void 0))return[]}return jr.map(function(Ko){var So;return(0,Ct.Z)((0,Ct.Z)({},Ko),{},{label:(So=Ko.label)!==null&&So!==void 0?So:Ko.value})})},[on,jr]),Mr=He.useMemo(function(){return new Set(jr.map(function($r){return $r.value}))},[jr]);He.useEffect(function(){if(on==="combobox"){var $r,Ko=($r=jr[0])===null||$r===void 0?void 0:$r.value;qi(Nt(Ko)?String(Ko):"")}},[jr]);var hr=ii(function($r,Ko){var So,Di=Ko!=null?Ko:$r;return So={},(0,_e.Z)(So,Bi.value,$r),(0,_e.Z)(So,Bi.label,Di),So}),Xn=He.useMemo(function(){if(on!=="tags")return tt;var $r=(0,De.Z)(tt),Ko=function(Di){return ro.has(Di)};return(0,De.Z)(jr).sort(function(So,Di){return So.value<Di.value?-1:1}).forEach(function(So){var Di=So.value;Ko(Di)||$r.push(hr(Di,So.label))}),$r},[hr,tt,ro,jr,on]),yr=$t(Xn,Bi,Vi,co,er),wo=He.useMemo(function(){return on!=="tags"||!Vi||yr.some(function($r){return $r[er||"value"]===Vi})||yr.some(function($r){return $r[Bi.value]===Vi})?yr:[hr(Vi)].concat((0,De.Z)(yr))},[hr,er,on,yr,Vi,Bi]),ua=He.useMemo(function(){return Ai?(0,De.Z)(wo).sort(function($r,Ko){return Ai($r,Ko)}):wo},[wo,Ai]),No=He.useMemo(function(){return nt(ua,{fieldNames:Bi,childrenAsData:Zr})},[ua,Bi,Zr]),yo=function(Ko){var So=uo(Ko);if(ia(So),fr&&(So.length!==jr.length||So.some(function($a,bs){var El;return((El=jr[bs])===null||El===void 0?void 0:El.value)!==($a==null?void 0:$a.value)}))){var Di=rr?So:So.map(function($a){return $a.value}),Ga=So.map(function($a){return Pt(To($a.value))});fr(Ln?Di:Di[0],Ln?Ga:Ga[0])}},ta=He.useState(null),na=(0,Ze.Z)(ta,2),Na=na[0],ka=na[1],is=He.useState(0),gn=(0,Ze.Z)(is,2),Oa=gn[0],Vl=gn[1],Hs=Dr!==void 0?Dr:on!=="combobox",wl=He.useCallback(function($r,Ko){var So=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Di=So.source,Ga=Di===void 0?"keyboard":Di;Vl(Ko),yt&&on==="combobox"&&$r!==null&&Ga==="keyboard"&&ka(String($r))},[yt,on]),Ma=function(Ko,So,Di){var Ga=function(){var Il,Qr=To(Ko);return[rr?{label:Qr==null?void 0:Qr[Bi.label],value:Ko,key:(Il=Qr==null?void 0:Qr.key)!==null&&Il!==void 0?Il:Ko}:Ko,Pt(Qr)]};if(So&&ci){var $a=Ga(),bs=(0,Ze.Z)($a,2),El=bs[0],Dl=bs[1];ci(El,Dl)}else if(!So&&ui&&Di!=="clear"){var bi=Ga(),Fa=(0,Ze.Z)(bi,2),cs=Fa[0],bl=Fa[1];ui(cs,bl)}},yu=ii(function($r,Ko){var So,Di=Ln?Ko.selected:!0;Di?So=Ln?[].concat((0,De.Z)(jr),[$r]):[$r]:So=jr.filter(function(Ga){return Ga.value!==$r}),yo(So),Ma($r,Di),on==="combobox"?ka(""):(!vt||hi)&&(qi(""),ka(""))}),Cl=function(Ko,So){yo(Ko);var Di=So.type,Ga=So.values;(Di==="remove"||Di==="clear")&&Ga.forEach(function($a){Ma($a.value,!1,Di)})},ma=function(Ko,So){if(qi(Ko),ka(null),So.source==="submit"){var Di=(Ko||"").trim();if(Di){var Ga=Array.from(new Set([].concat((0,De.Z)(Mr),[Di])));yo(Ga),Ma(Di,!0),qi("")}return}So.source!=="blur"&&(on==="combobox"&&yo(Ko),Wt==null||Wt(Ko))},Fo=function(Ko){var So=Ko;on!=="tags"&&(So=Ko.map(function(Ga){var $a=xi.get(Ga);return $a==null?void 0:$a.value}).filter(function(Ga){return Ga!==void 0}));var Di=Array.from(new Set([].concat((0,De.Z)(Mr),(0,De.Z)(So))));yo(Di),Di.forEach(function(Ga){Ma(Ga,!0)})},Ul=He.useMemo(function(){var $r=fn!==!1&&di!==!1;return(0,Ct.Z)((0,Ct.Z)({},Hr),{},{flattenOptions:No,onActiveValue:wl,defaultActiveFirstOption:Hs,onSelect:yu,menuItemSelectedIcon:ir,rawValues:Mr,fieldNames:Bi,virtual:$r,direction:jn,listHeight:zi,listItemHeight:Gi,childrenAsData:Zr})},[Hr,No,wl,Hs,yu,ir,Mr,Bi,fn,di,zi,Gi,Zr]);return He.createElement(mi.Provider,{value:Ul},He.createElement(Dt,(0,ce.Z)({},Nn,{id:Jr,prefixCls:An,ref:rt,omitDomProps:Dn,mode:on,displayValues:qa,onDisplayValuesChange:Cl,direction:jn,searchValue:Vi,onSearch:ma,autoClearSearchValue:hi,onSearchSplit:Fo,dropdownMatchSelectWidth:di,OptionList:hn,emptyOptions:!No.length,activeValue:Na,activeDescendantId:"".concat(Jr,"_list_").concat(Oa)})))}),Ve=Ot;Ve.Option=Ji,Ve.OptGroup=gi;var Ut=Ve,tn=Ut},9296:function(Pn,an,ve){"use strict";ve.r(an),ve.d(an,{ResizableTextArea:function(){return gt},default:function(){return At}});var ce=ve(96663),De=ve(44127),_e=ve(90493),Ct=ve(20135),Ze=ve(72071),Ke=ve(6620),Be=ve(19127),mt=ve(92310),ct=ve.n(mt),He=ve(93681),Et=ve(5643),ht=ve(18929),dt=ve(59301),Ae=ve(29301),te=ve(34280),ee=ve(16089),he=`
|
|
|
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"],de={},me;function we(Zt){var Yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ut=Zt.getAttribute("id")||Zt.getAttribute("data-reactid")||Zt.getAttribute("name");if(Yt&&de[ut])return de[ut];var Ge=window.getComputedStyle(Zt),kt=Ge.getPropertyValue("box-sizing")||Ge.getPropertyValue("-moz-box-sizing")||Ge.getPropertyValue("-webkit-box-sizing"),ln=parseFloat(Ge.getPropertyValue("padding-bottom"))+parseFloat(Ge.getPropertyValue("padding-top")),sn=parseFloat(Ge.getPropertyValue("border-bottom-width"))+parseFloat(Ge.getPropertyValue("border-top-width")),Bt=se.map(function(en){return"".concat(en,":").concat(Ge.getPropertyValue(en))}).join(";"),Gt={sizingStyle:Bt,paddingSize:ln,borderSize:sn,boxSizing:kt};return Yt&&ut&&(de[ut]=Gt),Gt}function be(Zt){var Yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ut=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ge=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;me||(me=document.createElement("textarea"),me.setAttribute("tab-index","-1"),me.setAttribute("aria-hidden","true"),document.body.appendChild(me)),Zt.getAttribute("wrap")?me.setAttribute("wrap",Zt.getAttribute("wrap")):me.removeAttribute("wrap");var kt=we(Zt,Yt),ln=kt.paddingSize,sn=kt.borderSize,Bt=kt.boxSizing,Gt=kt.sizingStyle;me.setAttribute("style","".concat(Gt,";").concat(he)),me.value=Zt.value||Zt.placeholder||"";var en=void 0,Bn=void 0,rn,Cn=me.scrollHeight;if(Bt==="border-box"?Cn+=sn:Bt==="content-box"&&(Cn-=ln),ut!==null||Ge!==null){me.value=" ";var ft=me.scrollHeight-ln;ut!==null&&(en=ft*ut,Bt==="border-box"&&(en=en+ln+sn),Cn=Math.max(en,Cn)),Ge!==null&&(Bn=ft*Ge,Bt==="border-box"&&(Bn=Bn+ln+sn),rn=Cn>Bn?"":"hidden",Cn=Math.min(Bn,Cn))}var En={height:Cn,overflowY:rn,resize:"none"};return en&&(En.minHeight=en),Bn&&(En.maxHeight=Bn),En}var Me=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Ie=0,ze=1,et=2,$e=dt.forwardRef(function(Zt,Yt){var ut=Zt,Ge=ut.prefixCls,kt=ut.onPressEnter,ln=ut.defaultValue,sn=ut.value,Bt=ut.autoSize,Gt=ut.onResize,en=ut.className,Bn=ut.style,rn=ut.disabled,Cn=ut.onChange,ft=ut.onInternalAutoSize,En=(0,Ke.Z)(ut,Me),Vn=(0,ht.Z)(ln,{value:sn,postState:function(gi){return gi!=null?gi:""}}),Re=(0,Ze.Z)(Vn,2),Ce=Re[0],Pe=Re[1],Ne=function(gi){Pe(gi.target.value),Cn==null||Cn(gi)},ke=dt.useRef();dt.useImperativeHandle(Yt,function(){return{textArea:ke.current}});var Se=dt.useMemo(function(){return Bt&&(0,Ct.Z)(Bt)==="object"?[Bt.minRows,Bt.maxRows]:[]},[Bt]),nt=(0,Ze.Z)(Se,2),Pt=nt[0],qe=nt[1],Ue=!!Bt,St=function(){try{if(document.activeElement===ke.current){var gi=ke.current,Ri=gi.selectionStart,Ji=gi.selectionEnd,Un=gi.scrollTop;ke.current.setSelectionRange(Ri,Ji),ke.current.scrollTop=Un}}catch($n){}},vt=dt.useState(et),lt=(0,Ze.Z)(vt,2),Dt=lt[0],un=lt[1],Xt=dt.useState(),$t=(0,Ze.Z)(Xt,2),wn=$t[0],bn=$t[1],pn=function(){un(Ie)};(0,te.Z)(function(){Ue&&pn()},[sn,Pt,qe,Ue]),(0,te.Z)(function(){if(Dt===Ie)un(ze);else if(Dt===ze){var pi=be(ke.current,!1,Pt,qe);un(et),bn(pi)}else St()},[Dt]);var Yn=dt.useRef(),ai=function(){ee.Z.cancel(Yn.current)},Wn=function(gi){Dt===et&&(Gt==null||Gt(gi),Bt&&(ai(),Yn.current=(0,ee.Z)(function(){pn()})))};dt.useEffect(function(){return ai},[]);var Rn=Ue?wn:null,ii=(0,De.Z)((0,De.Z)({},Bn),Rn);return(Dt===Ie||Dt===ze)&&(ii.overflowY="hidden",ii.overflowX="hidden"),dt.createElement(Ae.Z,{onResize:Wn,disabled:!(Bt||Gt)},dt.createElement("textarea",(0,ce.Z)({},En,{ref:ke,style:ii,className:ct()(Ge,en,(0,_e.Z)({},"".concat(Ge,"-disabled"),rn)),disabled:rn,value:Ce,onChange:Ne})))}),gt=$e,je=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Tt(Zt,Yt){return(0,Be.Z)(Zt||"").slice(0,Yt).join("")}function Qe(Zt,Yt,ut,Ge){var kt=ut;return Zt?kt=Tt(ut,Ge):(0,Be.Z)(Yt||"").length<ut.length&&(0,Be.Z)(ut||"").length>Ge&&(kt=Yt),kt}var bt=dt.forwardRef(function(Zt,Yt){var ut,Ge=Zt.defaultValue,kt=Zt.value,ln=Zt.onFocus,sn=Zt.onBlur,Bt=Zt.onChange,Gt=Zt.allowClear,en=Zt.maxLength,Bn=Zt.onCompositionStart,rn=Zt.onCompositionEnd,Cn=Zt.suffix,ft=Zt.prefixCls,En=ft===void 0?"rc-textarea":ft,Vn=Zt.classes,Re=Zt.showCount,Ce=Zt.className,Pe=Zt.style,Ne=Zt.disabled,ke=Zt.hidden,Se=Zt.classNames,nt=Zt.styles,Pt=Zt.onResize,qe=(0,Ke.Z)(Zt,je),Ue=(0,ht.Z)(Ge,{value:kt,defaultValue:Ge}),St=(0,Ze.Z)(Ue,2),vt=St[0],lt=St[1],Dt=(0,dt.useRef)(null),un=dt.useState(!1),Xt=(0,Ze.Z)(un,2),$t=Xt[0],wn=Xt[1],bn=dt.useState(!1),pn=(0,Ze.Z)(bn,2),Yn=pn[0],ai=pn[1],Wn=dt.useRef(),Rn=dt.useRef(0),ii=dt.useState(null),pi=(0,Ze.Z)(ii,2),gi=pi[0],Ri=pi[1],Ji=function(){var Ft;(Ft=Dt.current)===null||Ft===void 0||Ft.textArea.focus()};(0,dt.useImperativeHandle)(Yt,function(){return{resizableTextArea:Dt.current,focus:Ji,blur:function(){var Ft;(Ft=Dt.current)===null||Ft===void 0||Ft.textArea.blur()}}}),(0,dt.useEffect)(function(){wn(function(Dn){return!Ne&&Dn})},[Ne]);var Un=Number(en)>0,$n=function(Ft){ai(!0),Wn.current=vt,Rn.current=Ft.currentTarget.selectionStart,Bn==null||Bn(Ft)},ti=function(Ft){ai(!1);var Ot=Ft.currentTarget.value;if(Un){var Ve,Ut=Rn.current>=en+1||Rn.current===((Ve=Wn.current)===null||Ve===void 0?void 0:Ve.length);Ot=Qe(Ut,Wn.current,Ot,en)}Ot!==vt&&(lt(Ot),(0,Et.rJ)(Ft.currentTarget,Ft,Bt,Ot)),rn==null||rn(Ft)},Pi=function(Ft){var Ot=Ft.target.value;if(!Yn&&Un){var Ve=Ft.target.selectionStart>=en+1||Ft.target.selectionStart===Ot.length||!Ft.target.selectionStart;Ot=Qe(Ve,vt,Ot,en)}lt(Ot),(0,Et.rJ)(Ft.currentTarget,Ft,Bt,Ot)},mi=function(Ft){var Ot=qe.onPressEnter,Ve=qe.onKeyDown;Ft.key==="Enter"&&Ot&&Ot(Ft),Ve==null||Ve(Ft)},nr=function(Ft){wn(!0),ln==null||ln(Ft)},ji=function(Ft){wn(!1),sn==null||sn(Ft)},Le=function(Ft){var Ot;lt(""),Ji(),(0,Et.rJ)((Ot=Dt.current)===null||Ot===void 0?void 0:Ot.textArea,Ft,Bt)},si=(0,Et.D7)(vt);!Yn&&Un&&kt==null&&(si=Tt(si,en));var Hi=Cn,hn;if(Re){var ni=(0,Be.Z)(si).length;(0,Ct.Z)(Re)==="object"?hn=Re.formatter({value:si,count:ni,maxLength:en}):hn="".concat(ni).concat(Un?" / ".concat(en):""),Hi=dt.createElement(dt.Fragment,null,Hi,dt.createElement("span",{className:ct()("".concat(En,"-data-count"),Se==null?void 0:Se.count),style:nt==null?void 0:nt.count},hn))}var vi=function(Ft){var Ot;Pt==null||Pt(Ft),(Ot=Dt.current)!==null&&Ot!==void 0&&Ot.textArea.style.height&&Ri(!0)},Fi=!qe.autoSize&&!Re&&!Gt,_n=dt.createElement(He.BaseInput,{value:si,allowClear:Gt,handleReset:Le,suffix:Hi,prefixCls:En,classes:{affixWrapper:ct()(Vn==null?void 0:Vn.affixWrapper,(ut={},(0,_e.Z)(ut,"".concat(En,"-show-count"),Re),(0,_e.Z)(ut,"".concat(En,"-textarea-allow-clear"),Gt),ut))},disabled:Ne,focused:$t,className:Ce,style:(0,De.Z)((0,De.Z)({},Pe),gi&&!Fi?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof hn=="string"?hn:void 0}},hidden:ke,inputElement:dt.createElement(gt,(0,ce.Z)({},qe,{onKeyDown:mi,onChange:Pi,onFocus:nr,onBlur:ji,onCompositionStart:$n,onCompositionEnd:ti,className:Se==null?void 0:Se.textarea,style:(0,De.Z)((0,De.Z)({},nt==null?void 0:nt.textarea),{},{resize:Pe==null?void 0:Pe.resize}),disabled:Ne,prefixCls:En,onResize:vi,ref:Dt}))});return _n}),Nt=bt,At=Nt},39417:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return ze}});var ce=ve(96663),De=ve(90493),_e=ve(6620),Ct=ve(44127),Ze=ve(52884),Ke=ve(95727),Be=ve(89866),mt=ve(65711),ct=ve(85745),He=ve(92310),Et=ve.n(He),ht=ve(26112),dt=ve(59301),Ae=ve(39378),te=function($e){for(var gt=$e.prefixCls,je=$e.level,Tt=$e.isStart,Qe=$e.isEnd,bt="".concat(gt,"-indent-unit"),Nt=[],At=0;At<je;At+=1){var Zt;Nt.push(dt.createElement("span",{key:At,className:Et()(bt,(Zt={},(0,De.Z)(Zt,"".concat(bt,"-start"),Tt[At]),(0,De.Z)(Zt,"".concat(bt,"-end"),Qe[At]),Zt))}))}return dt.createElement("span",{"aria-hidden":"true",className:"".concat(gt,"-indent")},Nt)},ee=dt.memo(te),he=ve(67841),se=ve(71430),de=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],me="open",we="close",be="---",Me=function(et){(0,mt.Z)(gt,et);var $e=(0,ct.Z)(gt);function gt(){var je;(0,Ze.Z)(this,gt);for(var Tt=arguments.length,Qe=new Array(Tt),bt=0;bt<Tt;bt++)Qe[bt]=arguments[bt];return je=$e.call.apply($e,[this].concat(Qe)),je.state={dragNodeHighlight:!1},je.selectHandle=void 0,je.cacheIndent=void 0,je.onSelectorClick=function(Nt){var At=je.props.context.onNodeClick;At(Nt,(0,se.F)(je.props)),je.isSelectable()?je.onSelect(Nt):je.onCheck(Nt)},je.onSelectorDoubleClick=function(Nt){var At=je.props.context.onNodeDoubleClick;At(Nt,(0,se.F)(je.props))},je.onSelect=function(Nt){if(!je.isDisabled()){var At=je.props.context.onNodeSelect;At(Nt,(0,se.F)(je.props))}},je.onCheck=function(Nt){if(!je.isDisabled()){var At=je.props,Zt=At.disableCheckbox,Yt=At.checked,ut=je.props.context.onNodeCheck;if(!(!je.isCheckable()||Zt)){var Ge=!Yt;ut(Nt,(0,se.F)(je.props),Ge)}}},je.onMouseEnter=function(Nt){var At=je.props.context.onNodeMouseEnter;At(Nt,(0,se.F)(je.props))},je.onMouseLeave=function(Nt){var At=je.props.context.onNodeMouseLeave;At(Nt,(0,se.F)(je.props))},je.onContextMenu=function(Nt){var At=je.props.context.onNodeContextMenu;At(Nt,(0,se.F)(je.props))},je.onDragStart=function(Nt){var At=je.props.context.onNodeDragStart;Nt.stopPropagation(),je.setState({dragNodeHighlight:!0}),At(Nt,(0,Be.Z)(je));try{Nt.dataTransfer.setData("text/plain","")}catch(Zt){}},je.onDragEnter=function(Nt){var At=je.props.context.onNodeDragEnter;Nt.preventDefault(),Nt.stopPropagation(),At(Nt,(0,Be.Z)(je))},je.onDragOver=function(Nt){var At=je.props.context.onNodeDragOver;Nt.preventDefault(),Nt.stopPropagation(),At(Nt,(0,Be.Z)(je))},je.onDragLeave=function(Nt){var At=je.props.context.onNodeDragLeave;Nt.stopPropagation(),At(Nt,(0,Be.Z)(je))},je.onDragEnd=function(Nt){var At=je.props.context.onNodeDragEnd;Nt.stopPropagation(),je.setState({dragNodeHighlight:!1}),At(Nt,(0,Be.Z)(je))},je.onDrop=function(Nt){var At=je.props.context.onNodeDrop;Nt.preventDefault(),Nt.stopPropagation(),je.setState({dragNodeHighlight:!1}),At(Nt,(0,Be.Z)(je))},je.onExpand=function(Nt){var At=je.props,Zt=At.loading,Yt=At.context.onNodeExpand;Zt||Yt(Nt,(0,se.F)(je.props))},je.setSelectHandle=function(Nt){je.selectHandle=Nt},je.getNodeState=function(){var Nt=je.props.expanded;return je.isLeaf()?null:Nt?me:we},je.hasChildren=function(){var Nt=je.props.eventKey,At=je.props.context.keyEntities,Zt=(0,he.Z)(At,Nt)||{},Yt=Zt.children;return!!(Yt||[]).length},je.isLeaf=function(){var Nt=je.props,At=Nt.isLeaf,Zt=Nt.loaded,Yt=je.props.context.loadData,ut=je.hasChildren();return At===!1?!1:At||!Yt&&!ut||Yt&&Zt&&!ut},je.isDisabled=function(){var Nt=je.props.disabled,At=je.props.context.disabled;return!!(At||Nt)},je.isCheckable=function(){var Nt=je.props.checkable,At=je.props.context.checkable;return!At||Nt===!1?!1:At},je.syncLoadData=function(Nt){var At=Nt.expanded,Zt=Nt.loading,Yt=Nt.loaded,ut=je.props.context,Ge=ut.loadData,kt=ut.onNodeLoad;Zt||Ge&&At&&!je.isLeaf()&&!je.hasChildren()&&!Yt&&kt((0,se.F)(je.props))},je.isDraggable=function(){var Nt=je.props,At=Nt.data,Zt=Nt.context.draggable;return!!(Zt&&(!Zt.nodeDraggable||Zt.nodeDraggable(At)))},je.renderDragHandler=function(){var Nt=je.props.context,At=Nt.draggable,Zt=Nt.prefixCls;return At!=null&&At.icon?dt.createElement("span",{className:"".concat(Zt,"-draggable-icon")},At.icon):null},je.renderSwitcherIconDom=function(Nt){var At=je.props.switcherIcon,Zt=je.props.context.switcherIcon,Yt=At||Zt;return typeof Yt=="function"?Yt((0,Ct.Z)((0,Ct.Z)({},je.props),{},{isLeaf:Nt})):Yt},je.renderSwitcher=function(){var Nt=je.props.expanded,At=je.props.context.prefixCls;if(je.isLeaf()){var Zt=je.renderSwitcherIconDom(!0);return Zt!==!1?dt.createElement("span",{className:Et()("".concat(At,"-switcher"),"".concat(At,"-switcher-noop"))},Zt):null}var Yt=Et()("".concat(At,"-switcher"),"".concat(At,"-switcher_").concat(Nt?me:we)),ut=je.renderSwitcherIconDom(!1);return ut!==!1?dt.createElement("span",{onClick:je.onExpand,className:Yt},ut):null},je.renderCheckbox=function(){var Nt=je.props,At=Nt.checked,Zt=Nt.halfChecked,Yt=Nt.disableCheckbox,ut=je.props.context.prefixCls,Ge=je.isDisabled(),kt=je.isCheckable();if(!kt)return null;var ln=typeof kt!="boolean"?kt:null;return dt.createElement("span",{className:Et()("".concat(ut,"-checkbox"),At&&"".concat(ut,"-checkbox-checked"),!At&&Zt&&"".concat(ut,"-checkbox-indeterminate"),(Ge||Yt)&&"".concat(ut,"-checkbox-disabled")),onClick:je.onCheck},ln)},je.renderIcon=function(){var Nt=je.props.loading,At=je.props.context.prefixCls;return dt.createElement("span",{className:Et()("".concat(At,"-iconEle"),"".concat(At,"-icon__").concat(je.getNodeState()||"docu"),Nt&&"".concat(At,"-icon_loading"))})},je.renderSelector=function(){var Nt=je.state.dragNodeHighlight,At=je.props,Zt=At.title,Yt=Zt===void 0?be:Zt,ut=At.selected,Ge=At.icon,kt=At.loading,ln=At.data,sn=je.props.context,Bt=sn.prefixCls,Gt=sn.showIcon,en=sn.icon,Bn=sn.loadData,rn=sn.titleRender,Cn=je.isDisabled(),ft="".concat(Bt,"-node-content-wrapper"),En;if(Gt){var Vn=Ge||en;En=Vn?dt.createElement("span",{className:Et()("".concat(Bt,"-iconEle"),"".concat(Bt,"-icon__customize"))},typeof Vn=="function"?Vn(je.props):Vn):je.renderIcon()}else Bn&&kt&&(En=je.renderIcon());var Re;typeof Yt=="function"?Re=Yt(ln):rn?Re=rn(ln):Re=Yt;var Ce=dt.createElement("span",{className:"".concat(Bt,"-title")},Re);return dt.createElement("span",{ref:je.setSelectHandle,title:typeof Yt=="string"?Yt:"",className:Et()("".concat(ft),"".concat(ft,"-").concat(je.getNodeState()||"normal"),!Cn&&(ut||Nt)&&"".concat(Bt,"-node-selected")),onMouseEnter:je.onMouseEnter,onMouseLeave:je.onMouseLeave,onContextMenu:je.onContextMenu,onClick:je.onSelectorClick,onDoubleClick:je.onSelectorDoubleClick},En,Ce,je.renderDropIndicator())},je.renderDropIndicator=function(){var Nt=je.props,At=Nt.disabled,Zt=Nt.eventKey,Yt=je.props.context,ut=Yt.draggable,Ge=Yt.dropLevelOffset,kt=Yt.dropPosition,ln=Yt.prefixCls,sn=Yt.indent,Bt=Yt.dropIndicatorRender,Gt=Yt.dragOverNodeKey,en=Yt.direction,Bn=!!ut,rn=!At&&Bn&&Gt===Zt,Cn=sn!=null?sn:je.cacheIndent;return je.cacheIndent=sn,rn?Bt({dropPosition:kt,dropLevelOffset:Ge,indent:Cn,prefixCls:ln,direction:en}):null},je}return(0,Ke.Z)(gt,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var Tt=this.props.selectable,Qe=this.props.context.selectable;return typeof Tt=="boolean"?Tt:Qe}},{key:"render",value:function(){var Tt,Qe=this.props,bt=Qe.eventKey,Nt=Qe.className,At=Qe.style,Zt=Qe.dragOver,Yt=Qe.dragOverGapTop,ut=Qe.dragOverGapBottom,Ge=Qe.isLeaf,kt=Qe.isStart,ln=Qe.isEnd,sn=Qe.expanded,Bt=Qe.selected,Gt=Qe.checked,en=Qe.halfChecked,Bn=Qe.loading,rn=Qe.domRef,Cn=Qe.active,ft=Qe.data,En=Qe.onMouseMove,Vn=Qe.selectable,Re=(0,_e.Z)(Qe,de),Ce=this.props.context,Pe=Ce.prefixCls,Ne=Ce.filterTreeNode,ke=Ce.keyEntities,Se=Ce.dropContainerKey,nt=Ce.dropTargetKey,Pt=Ce.draggingNodeKey,qe=this.isDisabled(),Ue=(0,ht.Z)(Re,{aria:!0,data:!0}),St=(0,he.Z)(ke,bt)||{},vt=St.level,lt=ln[ln.length-1],Dt=this.isDraggable(),un=!qe&&Dt,Xt=Pt===bt,$t=Vn!==void 0?{"aria-selected":!!Vn}:void 0;return dt.createElement("div",(0,ce.Z)({ref:rn,className:Et()(Nt,"".concat(Pe,"-treenode"),(Tt={},(0,De.Z)(Tt,"".concat(Pe,"-treenode-disabled"),qe),(0,De.Z)(Tt,"".concat(Pe,"-treenode-switcher-").concat(sn?"open":"close"),!Ge),(0,De.Z)(Tt,"".concat(Pe,"-treenode-checkbox-checked"),Gt),(0,De.Z)(Tt,"".concat(Pe,"-treenode-checkbox-indeterminate"),en),(0,De.Z)(Tt,"".concat(Pe,"-treenode-selected"),Bt),(0,De.Z)(Tt,"".concat(Pe,"-treenode-loading"),Bn),(0,De.Z)(Tt,"".concat(Pe,"-treenode-active"),Cn),(0,De.Z)(Tt,"".concat(Pe,"-treenode-leaf-last"),lt),(0,De.Z)(Tt,"".concat(Pe,"-treenode-draggable"),Dt),(0,De.Z)(Tt,"dragging",Xt),(0,De.Z)(Tt,"drop-target",nt===bt),(0,De.Z)(Tt,"drop-container",Se===bt),(0,De.Z)(Tt,"drag-over",!qe&&Zt),(0,De.Z)(Tt,"drag-over-gap-top",!qe&&Yt),(0,De.Z)(Tt,"drag-over-gap-bottom",!qe&&ut),(0,De.Z)(Tt,"filter-node",Ne&&Ne((0,se.F)(this.props))),Tt)),style:At,draggable:un,"aria-grabbed":Xt,onDragStart:un?this.onDragStart:void 0,onDragEnter:Dt?this.onDragEnter:void 0,onDragOver:Dt?this.onDragOver:void 0,onDragLeave:Dt?this.onDragLeave:void 0,onDrop:Dt?this.onDrop:void 0,onDragEnd:Dt?this.onDragEnd:void 0,onMouseMove:En},$t,Ue),dt.createElement(ee,{prefixCls:Pe,level:vt,isStart:kt,isEnd:ln}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),gt}(dt.Component),Ie=function($e){return dt.createElement(Ae.k.Consumer,null,function(gt){return dt.createElement(Me,(0,ce.Z)({},$e,{context:gt}))})};Ie.displayName="TreeNode",Ie.isTreeNode=1;var ze=Ie},39378:function(Pn,an,ve){"use strict";ve.d(an,{k:function(){return De}});var ce=ve(59301),De=ce.createContext(null)},43858:function(Pn,an,ve){"use strict";ve.d(an,{O:function(){return ze.Z},Z:function(){return Ce}});var ce=ve(96663),De=ve(90493),_e=ve(20135),Ct=ve(44127),Ze=ve(19127),Ke=ve(52884),Be=ve(95727),mt=ve(89866),ct=ve(65711),He=ve(85745),Et=ve(92310),ht=ve.n(Et),dt=ve(10228),Ae=ve(26112),te=ve(48736),ee=ve(59301),he=ve(39378);function se(Pe){var Ne=Pe.dropPosition,ke=Pe.dropLevelOffset,Se=Pe.indent,nt={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Ne){case-1:nt.top=0,nt.left=-ke*Se;break;case 1:nt.bottom=0,nt.left=-ke*Se;break;case 0:nt.bottom=0,nt.left=Se;break}return ee.createElement("div",{style:nt})}function de(Pe){if(Pe==null)throw new TypeError("Cannot destructure "+Pe)}var me=ve(72071),we=ve(6620),be=ve(34280),Me=ve(24916),Ie=ve(77900),ze=ve(39417);function et(Pe,Ne){var ke=ee.useState(!1),Se=(0,me.Z)(ke,2),nt=Se[0],Pt=Se[1];ee.useLayoutEffect(function(){if(nt)return Pe(),function(){Ne()}},[nt]),ee.useLayoutEffect(function(){return Pt(!0),function(){Pt(!1)}},[])}var $e=ve(71430),gt=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],je=function(Ne,ke){var Se=Ne.className,nt=Ne.style,Pt=Ne.motion,qe=Ne.motionNodes,Ue=Ne.motionType,St=Ne.onMotionStart,vt=Ne.onMotionEnd,lt=Ne.active,Dt=Ne.treeNodeRequiredProps,un=(0,we.Z)(Ne,gt),Xt=ee.useState(!0),$t=(0,me.Z)(Xt,2),wn=$t[0],bn=$t[1],pn=ee.useContext(he.k),Yn=pn.prefixCls,ai=qe&&Ue!=="hide";(0,be.Z)(function(){qe&&ai!==wn&&bn(ai)},[qe]);var Wn=function(){qe&&St()},Rn=ee.useRef(!1),ii=function(){qe&&!Rn.current&&(Rn.current=!0,vt())};et(Wn,ii);var pi=function(Ri){ai===Ri&&ii()};return qe?ee.createElement(Ie.default,(0,ce.Z)({ref:ke,visible:wn},Pt,{motionAppear:Ue==="show",onVisibleChanged:pi}),function(gi,Ri){var Ji=gi.className,Un=gi.style;return ee.createElement("div",{ref:Ri,className:ht()("".concat(Yn,"-treenode-motion"),Ji),style:Un},qe.map(function($n){var ti=(0,ce.Z)({},(de($n.data),$n.data)),Pi=$n.title,mi=$n.key,nr=$n.isStart,ji=$n.isEnd;delete ti.children;var Le=(0,$e.H8)(mi,Dt);return ee.createElement(ze.Z,(0,ce.Z)({},ti,Le,{title:Pi,active:lt,data:$n.data,key:mi,isStart:nr,isEnd:ji}))}))}):ee.createElement(ze.Z,(0,ce.Z)({domRef:ke,className:Se,style:nt},un,{active:lt}))};je.displayName="MotionTreeNode";var Tt=ee.forwardRef(je),Qe=Tt;function bt(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],ke=Pe.length,Se=Ne.length;if(Math.abs(ke-Se)!==1)return{add:!1,key:null};function nt(Pt,qe){var Ue=new Map;Pt.forEach(function(vt){Ue.set(vt,!0)});var St=qe.filter(function(vt){return!Ue.has(vt)});return St.length===1?St[0]:null}return ke<Se?{add:!0,key:nt(Pe,Ne)}:{add:!1,key:nt(Ne,Pe)}}function Nt(Pe,Ne,ke){var Se=Pe.findIndex(function(Ue){return Ue.key===ke}),nt=Pe[Se+1],Pt=Ne.findIndex(function(Ue){return Ue.key===ke});if(nt){var qe=Ne.findIndex(function(Ue){return Ue.key===nt.key});return Ne.slice(Pt+1,qe)}return Ne.slice(Pt+1)}var At=["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"],Zt={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Yt=function(){},ut="RC_TREE_MOTION_".concat(Math.random()),Ge={key:ut},kt={key:ut,level:0,index:0,pos:"0",node:Ge,nodes:[Ge]},ln={parent:null,children:[],pos:kt.pos,data:Ge,title:null,key:ut,isStart:[],isEnd:[]};function sn(Pe,Ne,ke,Se){return Ne===!1||!ke?Pe:Pe.slice(0,Math.ceil(ke/Se)+1)}function Bt(Pe){var Ne=Pe.key,ke=Pe.pos;return(0,$e.km)(Ne,ke)}function Gt(Pe){for(var Ne=String(Pe.data.key),ke=Pe;ke.parent;)ke=ke.parent,Ne="".concat(ke.data.key," > ").concat(Ne);return Ne}var en=ee.forwardRef(function(Pe,Ne){var ke=Pe.prefixCls,Se=Pe.data,nt=Pe.selectable,Pt=Pe.checkable,qe=Pe.expandedKeys,Ue=Pe.selectedKeys,St=Pe.checkedKeys,vt=Pe.loadedKeys,lt=Pe.loadingKeys,Dt=Pe.halfCheckedKeys,un=Pe.keyEntities,Xt=Pe.disabled,$t=Pe.dragging,wn=Pe.dragOverNodeKey,bn=Pe.dropPosition,pn=Pe.motion,Yn=Pe.height,ai=Pe.itemHeight,Wn=Pe.virtual,Rn=Pe.focusable,ii=Pe.activeItem,pi=Pe.focused,gi=Pe.tabIndex,Ri=Pe.onKeyDown,Ji=Pe.onFocus,Un=Pe.onBlur,$n=Pe.onActiveChange,ti=Pe.onListChangeStart,Pi=Pe.onListChangeEnd,mi=(0,we.Z)(Pe,At),nr=ee.useRef(null),ji=ee.useRef(null);ee.useImperativeHandle(Ne,function(){return{scrollTo:function(Jt){nr.current.scrollTo(Jt)},getIndentWidth:function(){return ji.current.offsetWidth}}});var Le=ee.useState(qe),si=(0,me.Z)(Le,2),Hi=si[0],hn=si[1],ni=ee.useState(Se),vi=(0,me.Z)(ni,2),Fi=vi[0],_n=vi[1],Dn=ee.useState(Se),Ft=(0,me.Z)(Dn,2),Ot=Ft[0],Ve=Ft[1],Ut=ee.useState([]),tn=(0,me.Z)(Ut,2),xt=tn[0],rt=tn[1],Vt=ee.useState(null),on=(0,me.Z)(Vt,2),xn=on[0],An=on[1],yt=ee.useRef(Se);yt.current=Se;function cn(){var Wt=yt.current;_n(Wt),Ve(Wt),rt([]),An(null),Pi()}(0,be.Z)(function(){hn(qe);var Wt=bt(Hi,qe);if(Wt.key!==null)if(Wt.add){var Jt=Fi.findIndex(function(li){var Ai=li.key;return Ai===Wt.key}),hi=sn(Nt(Fi,Se,Wt.key),Wn,Yn,ai),ci=Fi.slice();ci.splice(Jt+1,0,ln),Ve(ci),rt(hi),An("show")}else{var ui=Se.findIndex(function(li){var Ai=li.key;return Ai===Wt.key}),qn=sn(Nt(Se,Fi,Wt.key),Wn,Yn,ai),di=Se.slice();di.splice(ui+1,0,ln),Ve(di),rt(qn),An("hide")}else Fi!==Se&&(_n(Se),Ve(Se))},[qe,Se]),ee.useEffect(function(){$t||cn()},[$t]);var On=pn?Ot:Se,ri={expandedKeys:qe,selectedKeys:Ue,loadedKeys:vt,loadingKeys:lt,checkedKeys:St,halfCheckedKeys:Dt,dragOverNodeKey:wn,dropPosition:bn,keyEntities:un};return ee.createElement(ee.Fragment,null,pi&&ii&&ee.createElement("span",{style:Zt,"aria-live":"assertive"},Gt(ii)),ee.createElement("div",null,ee.createElement("input",{style:Zt,disabled:Rn===!1||Xt,tabIndex:Rn!==!1?gi:null,onKeyDown:Ri,onFocus:Ji,onBlur:Un,value:"",onChange:Yt,"aria-label":"for screen reader"})),ee.createElement("div",{className:"".concat(ke,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},ee.createElement("div",{className:"".concat(ke,"-indent")},ee.createElement("div",{ref:ji,className:"".concat(ke,"-indent-unit")}))),ee.createElement(Me.Z,(0,ce.Z)({},mi,{data:On,itemKey:Bt,height:Yn,fullHeight:!1,virtual:Wn,itemHeight:ai,prefixCls:"".concat(ke,"-list"),ref:nr,onVisibleChange:function(Jt,hi){var ci=new Set(Jt),ui=hi.filter(function(qn){return!ci.has(qn)});ui.some(function(qn){return Bt(qn)===ut})&&cn()}}),function(Wt){var Jt=Wt.pos,hi=(0,ce.Z)({},(de(Wt.data),Wt.data)),ci=Wt.title,ui=Wt.key,qn=Wt.isStart,di=Wt.isEnd,li=(0,$e.km)(ui,Jt);delete hi.key,delete hi.children;var Ai=(0,$e.H8)(li,ri);return ee.createElement(Qe,(0,ce.Z)({},hi,Ai,{title:ci,active:!!ii&&ui===ii.key,pos:Jt,data:Wt.data,isStart:qn,isEnd:di,motion:pn,motionNodes:ui===ut?xt:null,motionType:xn,onMotionStart:ti,onMotionEnd:cn,treeNodeRequiredProps:ri,onMouseMove:function(){$n(null)}}))}))});en.displayName="NodeList";var Bn=en,rn=ve(35654),Cn=ve(90782),ft=ve(67841),En=10,Vn=function(Pe){(0,ct.Z)(ke,Pe);var Ne=(0,He.Z)(ke);function ke(){var Se;(0,Ke.Z)(this,ke);for(var nt=arguments.length,Pt=new Array(nt),qe=0;qe<nt;qe++)Pt[qe]=arguments[qe];return Se=Ne.call.apply(Ne,[this].concat(Pt)),Se.destroyed=!1,Se.delayedDragEnterLogic=void 0,Se.loadingRetryTimes={},Se.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,$e.w$)()},Se.dragStartMousePosition=null,Se.dragNode=void 0,Se.currentMouseOverDroppableNodeKey=null,Se.listRef=ee.createRef(),Se.onNodeDragStart=function(Ue,St){var vt=Se.state,lt=vt.expandedKeys,Dt=vt.keyEntities,un=Se.props.onDragStart,Xt=St.props.eventKey;Se.dragNode=St,Se.dragStartMousePosition={x:Ue.clientX,y:Ue.clientY};var $t=(0,rn._5)(lt,Xt);Se.setState({draggingNodeKey:Xt,dragChildrenKeys:(0,rn.wA)(Xt,Dt),indent:Se.listRef.current.getIndentWidth()}),Se.setExpandedKeys($t),window.addEventListener("dragend",Se.onWindowDragEnd),un==null||un({event:Ue,node:(0,$e.F)(St.props)})},Se.onNodeDragEnter=function(Ue,St){var vt=Se.state,lt=vt.expandedKeys,Dt=vt.keyEntities,un=vt.dragChildrenKeys,Xt=vt.flattenNodes,$t=vt.indent,wn=Se.props,bn=wn.onDragEnter,pn=wn.onExpand,Yn=wn.allowDrop,ai=wn.direction,Wn=St.props,Rn=Wn.pos,ii=Wn.eventKey,pi=(0,mt.Z)(Se),gi=pi.dragNode;if(Se.currentMouseOverDroppableNodeKey!==ii&&(Se.currentMouseOverDroppableNodeKey=ii),!gi){Se.resetDragState();return}var Ri=(0,rn.OM)(Ue,gi,St,$t,Se.dragStartMousePosition,Yn,Xt,Dt,lt,ai),Ji=Ri.dropPosition,Un=Ri.dropLevelOffset,$n=Ri.dropTargetKey,ti=Ri.dropContainerKey,Pi=Ri.dropTargetPos,mi=Ri.dropAllowed,nr=Ri.dragOverNodeKey;if(un.indexOf($n)!==-1||!mi){Se.resetDragState();return}if(Se.delayedDragEnterLogic||(Se.delayedDragEnterLogic={}),Object.keys(Se.delayedDragEnterLogic).forEach(function(ji){clearTimeout(Se.delayedDragEnterLogic[ji])}),gi.props.eventKey!==St.props.eventKey&&(Ue.persist(),Se.delayedDragEnterLogic[Rn]=window.setTimeout(function(){if(Se.state.draggingNodeKey!==null){var ji=(0,Ze.Z)(lt),Le=(0,ft.Z)(Dt,St.props.eventKey);Le&&(Le.children||[]).length&&(ji=(0,rn.L0)(lt,St.props.eventKey)),"expandedKeys"in Se.props||Se.setExpandedKeys(ji),pn==null||pn(ji,{node:(0,$e.F)(St.props),expanded:!0,nativeEvent:Ue.nativeEvent})}},800)),gi.props.eventKey===$n&&Un===0){Se.resetDragState();return}Se.setState({dragOverNodeKey:nr,dropPosition:Ji,dropLevelOffset:Un,dropTargetKey:$n,dropContainerKey:ti,dropTargetPos:Pi,dropAllowed:mi}),bn==null||bn({event:Ue,node:(0,$e.F)(St.props),expandedKeys:lt})},Se.onNodeDragOver=function(Ue,St){var vt=Se.state,lt=vt.dragChildrenKeys,Dt=vt.flattenNodes,un=vt.keyEntities,Xt=vt.expandedKeys,$t=vt.indent,wn=Se.props,bn=wn.onDragOver,pn=wn.allowDrop,Yn=wn.direction,ai=(0,mt.Z)(Se),Wn=ai.dragNode;if(Wn){var Rn=(0,rn.OM)(Ue,Wn,St,$t,Se.dragStartMousePosition,pn,Dt,un,Xt,Yn),ii=Rn.dropPosition,pi=Rn.dropLevelOffset,gi=Rn.dropTargetKey,Ri=Rn.dropContainerKey,Ji=Rn.dropAllowed,Un=Rn.dropTargetPos,$n=Rn.dragOverNodeKey;lt.indexOf(gi)!==-1||!Ji||(Wn.props.eventKey===gi&&pi===0?Se.state.dropPosition===null&&Se.state.dropLevelOffset===null&&Se.state.dropTargetKey===null&&Se.state.dropContainerKey===null&&Se.state.dropTargetPos===null&&Se.state.dropAllowed===!1&&Se.state.dragOverNodeKey===null||Se.resetDragState():ii===Se.state.dropPosition&&pi===Se.state.dropLevelOffset&&gi===Se.state.dropTargetKey&&Ri===Se.state.dropContainerKey&&Un===Se.state.dropTargetPos&&Ji===Se.state.dropAllowed&&$n===Se.state.dragOverNodeKey||Se.setState({dropPosition:ii,dropLevelOffset:pi,dropTargetKey:gi,dropContainerKey:Ri,dropTargetPos:Un,dropAllowed:Ji,dragOverNodeKey:$n}),bn==null||bn({event:Ue,node:(0,$e.F)(St.props)}))}},Se.onNodeDragLeave=function(Ue,St){Se.currentMouseOverDroppableNodeKey===St.props.eventKey&&!Ue.currentTarget.contains(Ue.relatedTarget)&&(Se.resetDragState(),Se.currentMouseOverDroppableNodeKey=null);var vt=Se.props.onDragLeave;vt==null||vt({event:Ue,node:(0,$e.F)(St.props)})},Se.onWindowDragEnd=function(Ue){Se.onNodeDragEnd(Ue,null,!0),window.removeEventListener("dragend",Se.onWindowDragEnd)},Se.onNodeDragEnd=function(Ue,St){var vt=Se.props.onDragEnd;Se.setState({dragOverNodeKey:null}),Se.cleanDragState(),vt==null||vt({event:Ue,node:(0,$e.F)(St.props)}),Se.dragNode=null,window.removeEventListener("dragend",Se.onWindowDragEnd)},Se.onNodeDrop=function(Ue,St){var vt,lt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Dt=Se.state,un=Dt.dragChildrenKeys,Xt=Dt.dropPosition,$t=Dt.dropTargetKey,wn=Dt.dropTargetPos,bn=Dt.dropAllowed;if(bn){var pn=Se.props.onDrop;if(Se.setState({dragOverNodeKey:null}),Se.cleanDragState(),$t!==null){var Yn=(0,Ct.Z)((0,Ct.Z)({},(0,$e.H8)($t,Se.getTreeNodeRequiredProps())),{},{active:((vt=Se.getActiveItem())===null||vt===void 0?void 0:vt.key)===$t,data:(0,ft.Z)(Se.state.keyEntities,$t).node}),ai=un.indexOf($t)!==-1;(0,te.ZP)(!ai,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Wn=(0,rn.yx)(wn),Rn={event:Ue,node:(0,$e.F)(Yn),dragNode:Se.dragNode?(0,$e.F)(Se.dragNode.props):null,dragNodesKeys:[Se.dragNode.props.eventKey].concat(un),dropToGap:Xt!==0,dropPosition:Xt+Number(Wn[Wn.length-1])};lt||pn==null||pn(Rn),Se.dragNode=null}}},Se.cleanDragState=function(){var Ue=Se.state.draggingNodeKey;Ue!==null&&Se.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),Se.dragStartMousePosition=null,Se.currentMouseOverDroppableNodeKey=null},Se.triggerExpandActionExpand=function(Ue,St){var vt=Se.state,lt=vt.expandedKeys,Dt=vt.flattenNodes,un=St.expanded,Xt=St.key,$t=St.isLeaf;if(!($t||Ue.shiftKey||Ue.metaKey||Ue.ctrlKey)){var wn=Dt.filter(function(pn){return pn.key===Xt})[0],bn=(0,$e.F)((0,Ct.Z)((0,Ct.Z)({},(0,$e.H8)(Xt,Se.getTreeNodeRequiredProps())),{},{data:wn.data}));Se.setExpandedKeys(un?(0,rn._5)(lt,Xt):(0,rn.L0)(lt,Xt)),Se.onNodeExpand(Ue,bn)}},Se.onNodeClick=function(Ue,St){var vt=Se.props,lt=vt.onClick,Dt=vt.expandAction;Dt==="click"&&Se.triggerExpandActionExpand(Ue,St),lt==null||lt(Ue,St)},Se.onNodeDoubleClick=function(Ue,St){var vt=Se.props,lt=vt.onDoubleClick,Dt=vt.expandAction;Dt==="doubleClick"&&Se.triggerExpandActionExpand(Ue,St),lt==null||lt(Ue,St)},Se.onNodeSelect=function(Ue,St){var vt=Se.state.selectedKeys,lt=Se.state,Dt=lt.keyEntities,un=lt.fieldNames,Xt=Se.props,$t=Xt.onSelect,wn=Xt.multiple,bn=St.selected,pn=St[un.key],Yn=!bn;Yn?wn?vt=(0,rn.L0)(vt,pn):vt=[pn]:vt=(0,rn._5)(vt,pn);var ai=vt.map(function(Wn){var Rn=(0,ft.Z)(Dt,Wn);return Rn?Rn.node:null}).filter(function(Wn){return Wn});Se.setUncontrolledState({selectedKeys:vt}),$t==null||$t(vt,{event:"select",selected:Yn,node:St,selectedNodes:ai,nativeEvent:Ue.nativeEvent})},Se.onNodeCheck=function(Ue,St,vt){var lt=Se.state,Dt=lt.keyEntities,un=lt.checkedKeys,Xt=lt.halfCheckedKeys,$t=Se.props,wn=$t.checkStrictly,bn=$t.onCheck,pn=St.key,Yn,ai={event:"check",node:St,checked:vt,nativeEvent:Ue.nativeEvent};if(wn){var Wn=vt?(0,rn.L0)(un,pn):(0,rn._5)(un,pn),Rn=(0,rn._5)(Xt,pn);Yn={checked:Wn,halfChecked:Rn},ai.checkedNodes=Wn.map(function(Un){return(0,ft.Z)(Dt,Un)}).filter(function(Un){return Un}).map(function(Un){return Un.node}),Se.setUncontrolledState({checkedKeys:Wn})}else{var ii=(0,Cn.S)([].concat((0,Ze.Z)(un),[pn]),!0,Dt),pi=ii.checkedKeys,gi=ii.halfCheckedKeys;if(!vt){var Ri=new Set(pi);Ri.delete(pn);var Ji=(0,Cn.S)(Array.from(Ri),{checked:!1,halfCheckedKeys:gi},Dt);pi=Ji.checkedKeys,gi=Ji.halfCheckedKeys}Yn=pi,ai.checkedNodes=[],ai.checkedNodesPositions=[],ai.halfCheckedKeys=gi,pi.forEach(function(Un){var $n=(0,ft.Z)(Dt,Un);if($n){var ti=$n.node,Pi=$n.pos;ai.checkedNodes.push(ti),ai.checkedNodesPositions.push({node:ti,pos:Pi})}}),Se.setUncontrolledState({checkedKeys:pi},!1,{halfCheckedKeys:gi})}bn==null||bn(Yn,ai)},Se.onNodeLoad=function(Ue){var St=Ue.key,vt=new Promise(function(lt,Dt){Se.setState(function(un){var Xt=un.loadedKeys,$t=Xt===void 0?[]:Xt,wn=un.loadingKeys,bn=wn===void 0?[]:wn,pn=Se.props,Yn=pn.loadData,ai=pn.onLoad;if(!Yn||$t.indexOf(St)!==-1||bn.indexOf(St)!==-1)return null;var Wn=Yn(Ue);return Wn.then(function(){var Rn=Se.state.loadedKeys,ii=(0,rn.L0)(Rn,St);ai==null||ai(ii,{event:"load",node:Ue}),Se.setUncontrolledState({loadedKeys:ii}),Se.setState(function(pi){return{loadingKeys:(0,rn._5)(pi.loadingKeys,St)}}),lt()}).catch(function(Rn){if(Se.setState(function(pi){return{loadingKeys:(0,rn._5)(pi.loadingKeys,St)}}),Se.loadingRetryTimes[St]=(Se.loadingRetryTimes[St]||0)+1,Se.loadingRetryTimes[St]>=En){var ii=Se.state.loadedKeys;(0,te.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),Se.setUncontrolledState({loadedKeys:(0,rn.L0)(ii,St)}),lt()}Dt(Rn)}),{loadingKeys:(0,rn.L0)(bn,St)}})});return vt.catch(function(){}),vt},Se.onNodeMouseEnter=function(Ue,St){var vt=Se.props.onMouseEnter;vt==null||vt({event:Ue,node:St})},Se.onNodeMouseLeave=function(Ue,St){var vt=Se.props.onMouseLeave;vt==null||vt({event:Ue,node:St})},Se.onNodeContextMenu=function(Ue,St){var vt=Se.props.onRightClick;vt&&(Ue.preventDefault(),vt({event:Ue,node:St}))},Se.onFocus=function(){var Ue=Se.props.onFocus;Se.setState({focused:!0});for(var St=arguments.length,vt=new Array(St),lt=0;lt<St;lt++)vt[lt]=arguments[lt];Ue==null||Ue.apply(void 0,vt)},Se.onBlur=function(){var Ue=Se.props.onBlur;Se.setState({focused:!1}),Se.onActiveChange(null);for(var St=arguments.length,vt=new Array(St),lt=0;lt<St;lt++)vt[lt]=arguments[lt];Ue==null||Ue.apply(void 0,vt)},Se.getTreeNodeRequiredProps=function(){var Ue=Se.state,St=Ue.expandedKeys,vt=Ue.selectedKeys,lt=Ue.loadedKeys,Dt=Ue.loadingKeys,un=Ue.checkedKeys,Xt=Ue.halfCheckedKeys,$t=Ue.dragOverNodeKey,wn=Ue.dropPosition,bn=Ue.keyEntities;return{expandedKeys:St||[],selectedKeys:vt||[],loadedKeys:lt||[],loadingKeys:Dt||[],checkedKeys:un||[],halfCheckedKeys:Xt||[],dragOverNodeKey:$t,dropPosition:wn,keyEntities:bn}},Se.setExpandedKeys=function(Ue){var St=Se.state,vt=St.treeData,lt=St.fieldNames,Dt=(0,$e.oH)(vt,Ue,lt);Se.setUncontrolledState({expandedKeys:Ue,flattenNodes:Dt},!0)},Se.onNodeExpand=function(Ue,St){var vt=Se.state.expandedKeys,lt=Se.state,Dt=lt.listChanging,un=lt.fieldNames,Xt=Se.props,$t=Xt.onExpand,wn=Xt.loadData,bn=St.expanded,pn=St[un.key];if(!Dt){var Yn=vt.indexOf(pn),ai=!bn;if((0,te.ZP)(bn&&Yn!==-1||!bn&&Yn===-1,"Expand state not sync with index check"),ai?vt=(0,rn.L0)(vt,pn):vt=(0,rn._5)(vt,pn),Se.setExpandedKeys(vt),$t==null||$t(vt,{node:St,expanded:ai,nativeEvent:Ue.nativeEvent}),ai&&wn){var Wn=Se.onNodeLoad(St);Wn&&Wn.then(function(){var Rn=(0,$e.oH)(Se.state.treeData,vt,un);Se.setUncontrolledState({flattenNodes:Rn})}).catch(function(){var Rn=Se.state.expandedKeys,ii=(0,rn._5)(Rn,pn);Se.setExpandedKeys(ii)})}}},Se.onListChangeStart=function(){Se.setUncontrolledState({listChanging:!0})},Se.onListChangeEnd=function(){setTimeout(function(){Se.setUncontrolledState({listChanging:!1})})},Se.onActiveChange=function(Ue){var St=Se.state.activeKey,vt=Se.props.onActiveChange;St!==Ue&&(Se.setState({activeKey:Ue}),Ue!==null&&Se.scrollTo({key:Ue}),vt==null||vt(Ue))},Se.getActiveItem=function(){var Ue=Se.state,St=Ue.activeKey,vt=Ue.flattenNodes;return St===null?null:vt.find(function(lt){var Dt=lt.key;return Dt===St})||null},Se.offsetActiveKey=function(Ue){var St=Se.state,vt=St.flattenNodes,lt=St.activeKey,Dt=vt.findIndex(function($t){var wn=$t.key;return wn===lt});Dt===-1&&Ue<0&&(Dt=vt.length),Dt=(Dt+Ue+vt.length)%vt.length;var un=vt[Dt];if(un){var Xt=un.key;Se.onActiveChange(Xt)}else Se.onActiveChange(null)},Se.onKeyDown=function(Ue){var St=Se.state,vt=St.activeKey,lt=St.expandedKeys,Dt=St.checkedKeys,un=St.fieldNames,Xt=Se.props,$t=Xt.onKeyDown,wn=Xt.checkable,bn=Xt.selectable;switch(Ue.which){case dt.Z.UP:{Se.offsetActiveKey(-1),Ue.preventDefault();break}case dt.Z.DOWN:{Se.offsetActiveKey(1),Ue.preventDefault();break}}var pn=Se.getActiveItem();if(pn&&pn.data){var Yn=Se.getTreeNodeRequiredProps(),ai=pn.data.isLeaf===!1||!!(pn.data[un.children]||[]).length,Wn=(0,$e.F)((0,Ct.Z)((0,Ct.Z)({},(0,$e.H8)(vt,Yn)),{},{data:pn.data,active:!0}));switch(Ue.which){case dt.Z.LEFT:{ai&<.includes(vt)?Se.onNodeExpand({},Wn):pn.parent&&Se.onActiveChange(pn.parent.key),Ue.preventDefault();break}case dt.Z.RIGHT:{ai&&!lt.includes(vt)?Se.onNodeExpand({},Wn):pn.children&&pn.children.length&&Se.onActiveChange(pn.children[0].key),Ue.preventDefault();break}case dt.Z.ENTER:case dt.Z.SPACE:{wn&&!Wn.disabled&&Wn.checkable!==!1&&!Wn.disableCheckbox?Se.onNodeCheck({},Wn,!Dt.includes(vt)):!wn&&bn&&!Wn.disabled&&Wn.selectable!==!1&&Se.onNodeSelect({},Wn);break}}}$t==null||$t(Ue)},Se.setUncontrolledState=function(Ue){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,vt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Se.destroyed){var lt=!1,Dt=!0,un={};Object.keys(Ue).forEach(function(Xt){if(Xt in Se.props){Dt=!1;return}lt=!0,un[Xt]=Ue[Xt]}),lt&&(!St||Dt)&&Se.setState((0,Ct.Z)((0,Ct.Z)({},un),vt))}},Se.scrollTo=function(Ue){Se.listRef.current.scrollTo(Ue)},Se}return(0,Be.Z)(ke,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var nt=this.props.activeKey;nt!==void 0&&nt!==this.state.activeKey&&(this.setState({activeKey:nt}),nt!==null&&this.scrollTo({key:nt}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var nt,Pt=this.state,qe=Pt.focused,Ue=Pt.flattenNodes,St=Pt.keyEntities,vt=Pt.draggingNodeKey,lt=Pt.activeKey,Dt=Pt.dropLevelOffset,un=Pt.dropContainerKey,Xt=Pt.dropTargetKey,$t=Pt.dropPosition,wn=Pt.dragOverNodeKey,bn=Pt.indent,pn=this.props,Yn=pn.prefixCls,ai=pn.className,Wn=pn.style,Rn=pn.showLine,ii=pn.focusable,pi=pn.tabIndex,gi=pi===void 0?0:pi,Ri=pn.selectable,Ji=pn.showIcon,Un=pn.icon,$n=pn.switcherIcon,ti=pn.draggable,Pi=pn.checkable,mi=pn.checkStrictly,nr=pn.disabled,ji=pn.motion,Le=pn.loadData,si=pn.filterTreeNode,Hi=pn.height,hn=pn.itemHeight,ni=pn.virtual,vi=pn.titleRender,Fi=pn.dropIndicatorRender,_n=pn.onContextMenu,Dn=pn.onScroll,Ft=pn.direction,Ot=pn.rootClassName,Ve=pn.rootStyle,Ut=(0,Ae.Z)(this.props,{aria:!0,data:!0}),tn;return ti&&((0,_e.Z)(ti)==="object"?tn=ti:typeof ti=="function"?tn={nodeDraggable:ti}:tn={}),ee.createElement(he.k.Provider,{value:{prefixCls:Yn,selectable:Ri,showIcon:Ji,icon:Un,switcherIcon:$n,draggable:tn,draggingNodeKey:vt,checkable:Pi,checkStrictly:mi,disabled:nr,keyEntities:St,dropLevelOffset:Dt,dropContainerKey:un,dropTargetKey:Xt,dropPosition:$t,dragOverNodeKey:wn,indent:bn,direction:Ft,dropIndicatorRender:Fi,loadData:Le,filterTreeNode:si,titleRender:vi,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:ht()(Yn,ai,Ot,(nt={},(0,De.Z)(nt,"".concat(Yn,"-show-line"),Rn),(0,De.Z)(nt,"".concat(Yn,"-focused"),qe),(0,De.Z)(nt,"".concat(Yn,"-active-focused"),lt!==null),nt)),style:Ve},ee.createElement(Bn,(0,ce.Z)({ref:this.listRef,prefixCls:Yn,style:Wn,data:Ue,disabled:nr,selectable:Ri,checkable:!!Pi,motion:ji,dragging:vt!==null,height:Hi,itemHeight:hn,virtual:ni,focusable:ii,focused:qe,tabIndex:gi,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:_n,onScroll:Dn},this.getTreeNodeRequiredProps(),Ut))))}}],[{key:"getDerivedStateFromProps",value:function(nt,Pt){var qe=Pt.prevProps,Ue={prevProps:nt};function St(ii){return!qe&&ii in nt||qe&&qe[ii]!==nt[ii]}var vt,lt=Pt.fieldNames;if(St("fieldNames")&&(lt=(0,$e.w$)(nt.fieldNames),Ue.fieldNames=lt),St("treeData")?vt=nt.treeData:St("children")&&((0,te.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),vt=(0,$e.zn)(nt.children)),vt){Ue.treeData=vt;var Dt=(0,$e.I8)(vt,{fieldNames:lt});Ue.keyEntities=(0,Ct.Z)((0,De.Z)({},ut,kt),Dt.keyEntities)}var un=Ue.keyEntities||Pt.keyEntities;if(St("expandedKeys")||qe&&St("autoExpandParent"))Ue.expandedKeys=nt.autoExpandParent||!qe&&nt.defaultExpandParent?(0,rn.r7)(nt.expandedKeys,un):nt.expandedKeys;else if(!qe&&nt.defaultExpandAll){var Xt=(0,Ct.Z)({},un);delete Xt[ut],Ue.expandedKeys=Object.keys(Xt).map(function(ii){return Xt[ii].key})}else!qe&&nt.defaultExpandedKeys&&(Ue.expandedKeys=nt.autoExpandParent||nt.defaultExpandParent?(0,rn.r7)(nt.defaultExpandedKeys,un):nt.defaultExpandedKeys);if(Ue.expandedKeys||delete Ue.expandedKeys,vt||Ue.expandedKeys){var $t=(0,$e.oH)(vt||Pt.treeData,Ue.expandedKeys||Pt.expandedKeys,lt);Ue.flattenNodes=$t}if(nt.selectable&&(St("selectedKeys")?Ue.selectedKeys=(0,rn.BT)(nt.selectedKeys,nt):!qe&&nt.defaultSelectedKeys&&(Ue.selectedKeys=(0,rn.BT)(nt.defaultSelectedKeys,nt))),nt.checkable){var wn;if(St("checkedKeys")?wn=(0,rn.E6)(nt.checkedKeys)||{}:!qe&&nt.defaultCheckedKeys?wn=(0,rn.E6)(nt.defaultCheckedKeys)||{}:vt&&(wn=(0,rn.E6)(nt.checkedKeys)||{checkedKeys:Pt.checkedKeys,halfCheckedKeys:Pt.halfCheckedKeys}),wn){var bn=wn,pn=bn.checkedKeys,Yn=pn===void 0?[]:pn,ai=bn.halfCheckedKeys,Wn=ai===void 0?[]:ai;if(!nt.checkStrictly){var Rn=(0,Cn.S)(Yn,!0,un);Yn=Rn.checkedKeys,Wn=Rn.halfCheckedKeys}Ue.checkedKeys=Yn,Ue.halfCheckedKeys=Wn}}return St("loadedKeys")&&(Ue.loadedKeys=nt.loadedKeys),Ue}}]),ke}(ee.Component);Vn.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},Vn.TreeNode=ze.Z;var Re=Vn,Ce=Re},35654:function(Pn,an,ve){"use strict";ve.d(an,{BT:function(){return ee},E6:function(){return de},L0:function(){return He},OM:function(){return te},_5:function(){return ct},r7:function(){return me},wA:function(){return ht},yx:function(){return Et}});var ce=ve(19127),De=ve(20135),_e=ve(48736),Ct=ve(59301),Ze=ve(39417),Ke=ve(67841),Be=ve(71430),mt=null;function ct(we,be){if(!we)return[];var Me=we.slice(),Ie=Me.indexOf(be);return Ie>=0&&Me.splice(Ie,1),Me}function He(we,be){var Me=(we||[]).slice();return Me.indexOf(be)===-1&&Me.push(be),Me}function Et(we){return we.split("-")}function ht(we,be){var Me=[],Ie=(0,Ke.Z)(be,we);function ze(){var et=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];et.forEach(function($e){var gt=$e.key,je=$e.children;Me.push(gt),ze(je)})}return ze(Ie.children),Me}function dt(we){if(we.parent){var be=Et(we.pos);return Number(be[be.length-1])===we.parent.children.length-1}return!1}function Ae(we){var be=Et(we.pos);return Number(be[be.length-1])===0}function te(we,be,Me,Ie,ze,et,$e,gt,je,Tt){var Qe,bt=we.clientX,Nt=we.clientY,At=we.target.getBoundingClientRect(),Zt=At.top,Yt=At.height,ut=(Tt==="rtl"?-1:1)*(((ze==null?void 0:ze.x)||0)-bt),Ge=(ut-12)/Ie,kt=(0,Ke.Z)(gt,Me.props.eventKey);if(Nt<Zt+Yt/2){var ln=$e.findIndex(function(Ce){return Ce.key===kt.key}),sn=ln<=0?0:ln-1,Bt=$e[sn].key;kt=(0,Ke.Z)(gt,Bt)}var Gt=kt.key,en=kt,Bn=kt.key,rn=0,Cn=0;if(!je.includes(Gt))for(var ft=0;ft<Ge&&dt(kt);ft+=1)kt=kt.parent,Cn+=1;var En=be.props.data,Vn=kt.node,Re=!0;return Ae(kt)&&kt.level===0&&Nt<Zt+Yt/2&&et({dragNode:En,dropNode:Vn,dropPosition:-1})&&kt.key===Me.props.eventKey?rn=-1:(en.children||[]).length&&je.includes(Bn)?et({dragNode:En,dropNode:Vn,dropPosition:0})?rn=0:Re=!1:Cn===0?Ge>-1.5?et({dragNode:En,dropNode:Vn,dropPosition:1})?rn=1:Re=!1:et({dragNode:En,dropNode:Vn,dropPosition:0})?rn=0:et({dragNode:En,dropNode:Vn,dropPosition:1})?rn=1:Re=!1:et({dragNode:En,dropNode:Vn,dropPosition:1})?rn=1:Re=!1,{dropPosition:rn,dropLevelOffset:Cn,dropTargetKey:kt.key,dropTargetPos:kt.pos,dragOverNodeKey:Bn,dropContainerKey:rn===0?null:((Qe=kt.parent)===null||Qe===void 0?void 0:Qe.key)||null,dropAllowed:Re}}function ee(we,be){if(we){var Me=be.multiple;return Me?we.slice():we.length?[we[0]]:we}}var he=function(be){return be};function se(we,be){if(!we)return[];var Me=be||{},Ie=Me.processProps,ze=Ie===void 0?he:Ie,et=Array.isArray(we)?we:[we];return et.map(function($e){var gt=$e.children,je=_objectWithoutProperties($e,mt),Tt=se(gt,be);return React.createElement(TreeNode,_extends({key:je.key},ze(je)),Tt)})}function de(we){if(!we)return null;var be;if(Array.isArray(we))be={checkedKeys:we,halfCheckedKeys:void 0};else if((0,De.Z)(we)==="object")be={checkedKeys:we.checked||void 0,halfCheckedKeys:we.halfChecked||void 0};else return(0,_e.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return be}function me(we,be){var Me=new Set;function Ie(ze){if(!Me.has(ze)){var et=(0,Ke.Z)(be,ze);if(et){Me.add(ze);var $e=et.parent,gt=et.node;gt.disabled||$e&&Ie($e.key)}}}return(we||[]).forEach(function(ze){Ie(ze)}),(0,ce.Z)(Me)}},90782:function(Pn,an,ve){"use strict";ve.d(an,{S:function(){return Be}});var ce=ve(48736),De=ve(67841);function _e(mt,ct){var He=new Set;return mt.forEach(function(Et){ct.has(Et)||He.add(Et)}),He}function Ct(mt){var ct=mt||{},He=ct.disabled,Et=ct.disableCheckbox,ht=ct.checkable;return!!(He||Et)||ht===!1}function Ze(mt,ct,He,Et){for(var ht=new Set(mt),dt=new Set,Ae=0;Ae<=He;Ae+=1){var te=ct.get(Ae)||new Set;te.forEach(function(de){var me=de.key,we=de.node,be=de.children,Me=be===void 0?[]:be;ht.has(me)&&!Et(we)&&Me.filter(function(Ie){return!Et(Ie.node)}).forEach(function(Ie){ht.add(Ie.key)})})}for(var ee=new Set,he=He;he>=0;he-=1){var se=ct.get(he)||new Set;se.forEach(function(de){var me=de.parent,we=de.node;if(!(Et(we)||!de.parent||ee.has(de.parent.key))){if(Et(de.parent.node)){ee.add(me.key);return}var be=!0,Me=!1;(me.children||[]).filter(function(Ie){return!Et(Ie.node)}).forEach(function(Ie){var ze=Ie.key,et=ht.has(ze);be&&!et&&(be=!1),!Me&&(et||dt.has(ze))&&(Me=!0)}),be&&ht.add(me.key),Me&&dt.add(me.key),ee.add(me.key)}})}return{checkedKeys:Array.from(ht),halfCheckedKeys:Array.from(_e(dt,ht))}}function Ke(mt,ct,He,Et,ht){for(var dt=new Set(mt),Ae=new Set(ct),te=0;te<=Et;te+=1){var ee=He.get(te)||new Set;ee.forEach(function(me){var we=me.key,be=me.node,Me=me.children,Ie=Me===void 0?[]:Me;!dt.has(we)&&!Ae.has(we)&&!ht(be)&&Ie.filter(function(ze){return!ht(ze.node)}).forEach(function(ze){dt.delete(ze.key)})})}Ae=new Set;for(var he=new Set,se=Et;se>=0;se-=1){var de=He.get(se)||new Set;de.forEach(function(me){var we=me.parent,be=me.node;if(!(ht(be)||!me.parent||he.has(me.parent.key))){if(ht(me.parent.node)){he.add(we.key);return}var Me=!0,Ie=!1;(we.children||[]).filter(function(ze){return!ht(ze.node)}).forEach(function(ze){var et=ze.key,$e=dt.has(et);Me&&!$e&&(Me=!1),!Ie&&($e||Ae.has(et))&&(Ie=!0)}),Me||dt.delete(we.key),Ie&&Ae.add(we.key),he.add(we.key)}})}return{checkedKeys:Array.from(dt),halfCheckedKeys:Array.from(_e(Ae,dt))}}function Be(mt,ct,He,Et){var ht=[],dt;Et?dt=Et:dt=Ct;var Ae=new Set(mt.filter(function(se){var de=!!(0,De.Z)(He,se);return de||ht.push(se),de})),te=new Map,ee=0;Object.keys(He).forEach(function(se){var de=He[se],me=de.level,we=te.get(me);we||(we=new Set,te.set(me,we)),we.add(de),ee=Math.max(ee,me)}),(0,ce.ZP)(!ht.length,"Tree missing follow keys: ".concat(ht.slice(0,100).map(function(se){return"'".concat(se,"'")}).join(", ")));var he;return ct===!0?he=Ze(Ae,te,ee,dt):he=Ke(Ae,ct.halfCheckedKeys,te,ee,dt),he}},67841:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return ce}});function ce(De,_e){return De[_e]}},71430:function(Pn,an,ve){"use strict";ve.d(an,{F:function(){return me},H8:function(){return de},I8:function(){return se},km:function(){return ht},oH:function(){return ee},w$:function(){return dt},zn:function(){return te}});var ce=ve(20135),De=ve(19127),_e=ve(44127),Ct=ve(6620),Ze=ve(11592),Ke=ve(2738),Be=ve(48736),mt=ve(67841),ct=["children"];function He(we,be){return"".concat(we,"-").concat(be)}function Et(we){return we&&we.type&&we.type.isTreeNode}function ht(we,be){return we!=null?we:be}function dt(we){var be=we||{},Me=be.title,Ie=be._title,ze=be.key,et=be.children,$e=Me||"title";return{title:$e,_title:Ie||[$e],key:ze||"key",children:et||"children"}}function Ae(we,be){var Me=new Map;function Ie(ze){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(ze||[]).forEach(function($e){var gt=$e[be.key],je=$e[be.children];warning(gt!=null,"Tree node must have a certain key: [".concat(et).concat(gt,"]"));var Tt=String(gt);warning(!Me.has(Tt)||gt===null||gt===void 0,"Same 'key' exist in the Tree: ".concat(Tt)),Me.set(Tt,!0),Ie(je,"".concat(et).concat(Tt," > "))})}Ie(we)}function te(we){function be(Me){var Ie=(0,Ze.Z)(Me);return Ie.map(function(ze){if(!Et(ze))return(0,Be.ZP)(!ze,"Tree/TreeNode can only accept TreeNode as children."),null;var et=ze.key,$e=ze.props,gt=$e.children,je=(0,Ct.Z)($e,ct),Tt=(0,_e.Z)({key:et},je),Qe=be(gt);return Qe.length&&(Tt.children=Qe),Tt}).filter(function(ze){return ze})}return be(we)}function ee(we,be,Me){var Ie=dt(Me),ze=Ie._title,et=Ie.key,$e=Ie.children,gt=new Set(be===!0?[]:be),je=[];function Tt(Qe){var bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return Qe.map(function(Nt,At){for(var Zt=He(bt?bt.pos:"0",At),Yt=ht(Nt[et],Zt),ut,Ge=0;Ge<ze.length;Ge+=1){var kt=ze[Ge];if(Nt[kt]!==void 0){ut=Nt[kt];break}}var ln=(0,_e.Z)((0,_e.Z)({},(0,Ke.Z)(Nt,[].concat((0,De.Z)(ze),[et,$e]))),{},{title:ut,key:Yt,parent:bt,pos:Zt,children:null,data:Nt,isStart:[].concat((0,De.Z)(bt?bt.isStart:[]),[At===0]),isEnd:[].concat((0,De.Z)(bt?bt.isEnd:[]),[At===Qe.length-1])});return je.push(ln),be===!0||gt.has(Yt)?ln.children=Tt(Nt[$e]||[],ln):ln.children=[],ln})}return Tt(we),je}function he(we,be,Me){var Ie={};(0,ce.Z)(Me)==="object"?Ie=Me:Ie={externalGetKey:Me},Ie=Ie||{};var ze=Ie,et=ze.childrenPropName,$e=ze.externalGetKey,gt=ze.fieldNames,je=dt(gt),Tt=je.key,Qe=je.children,bt=et||Qe,Nt;$e?typeof $e=="string"?Nt=function(Yt){return Yt[$e]}:typeof $e=="function"&&(Nt=function(Yt){return $e(Yt)}):Nt=function(Yt,ut){return ht(Yt[Tt],ut)};function At(Zt,Yt,ut,Ge){var kt=Zt?Zt[bt]:we,ln=Zt?He(ut.pos,Yt):"0",sn=Zt?[].concat((0,De.Z)(Ge),[Zt]):[];if(Zt){var Bt=Nt(Zt,ln),Gt={node:Zt,index:Yt,pos:ln,key:Bt,parentPos:ut.node?ut.pos:null,level:ut.level+1,nodes:sn};be(Gt)}kt&&kt.forEach(function(en,Bn){At(en,Bn,{node:Zt,pos:ln,level:ut?ut.level+1:-1},sn)})}At(null)}function se(we){var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Me=be.initWrapper,Ie=be.processEntity,ze=be.onProcessFinished,et=be.externalGetKey,$e=be.childrenPropName,gt=be.fieldNames,je=arguments.length>2?arguments[2]:void 0,Tt=et||je,Qe={},bt={},Nt={posEntities:Qe,keyEntities:bt};return Me&&(Nt=Me(Nt)||Nt),he(we,function(At){var Zt=At.node,Yt=At.index,ut=At.pos,Ge=At.key,kt=At.parentPos,ln=At.level,sn=At.nodes,Bt={node:Zt,nodes:sn,index:Yt,key:Ge,pos:ut,level:ln},Gt=ht(Ge,ut);Qe[ut]=Bt,bt[Gt]=Bt,Bt.parent=Qe[kt],Bt.parent&&(Bt.parent.children=Bt.parent.children||[],Bt.parent.children.push(Bt)),Ie&&Ie(Bt,Nt)},{externalGetKey:Tt,childrenPropName:$e,fieldNames:gt}),ze&&ze(Nt),Nt}function de(we,be){var Me=be.expandedKeys,Ie=be.selectedKeys,ze=be.loadedKeys,et=be.loadingKeys,$e=be.checkedKeys,gt=be.halfCheckedKeys,je=be.dragOverNodeKey,Tt=be.dropPosition,Qe=be.keyEntities,bt=(0,mt.Z)(Qe,we),Nt={eventKey:we,expanded:Me.indexOf(we)!==-1,selected:Ie.indexOf(we)!==-1,loaded:ze.indexOf(we)!==-1,loading:et.indexOf(we)!==-1,checked:$e.indexOf(we)!==-1,halfChecked:gt.indexOf(we)!==-1,pos:String(bt?bt.pos:""),dragOver:je===we&&Tt===0,dragOverGapTop:je===we&&Tt===-1,dragOverGapBottom:je===we&&Tt===1};return Nt}function me(we){var be=we.data,Me=we.expanded,Ie=we.selected,ze=we.checked,et=we.loaded,$e=we.loading,gt=we.halfChecked,je=we.dragOver,Tt=we.dragOverGapTop,Qe=we.dragOverGapBottom,bt=we.pos,Nt=we.active,At=we.eventKey,Zt=(0,_e.Z)((0,_e.Z)({},be),{},{expanded:Me,selected:Ie,checked:ze,loaded:et,loading:$e,halfChecked:gt,dragOver:je,dragOverGapTop:Tt,dragOverGapBottom:Qe,pos:bt,active:Nt,key:At});return"props"in Zt||Object.defineProperty(Zt,"props",{get:function(){return(0,Be.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),we}}),Zt}},8224:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return De}});var ce=ve(4676);function De(_e,Ct,Ze,Ke){var Be=ce.unstable_batchedUpdates?function(ct){ce.unstable_batchedUpdates(Ze,ct)}:Ze;return _e!=null&&_e.addEventListener&&_e.addEventListener(Ct,Be,Ke),{remove:function(){_e!=null&&_e.removeEventListener&&_e.removeEventListener(Ct,Be,Ke)}}}},55468:function(Pn,an,ve){"use strict";ve.d(an,{g1:function(){return Et},os:function(){return dt}});var ce=/margin|padding|width|height|max|min|offset/,De={left:!0,top:!0},_e={cssFloat:1,styleFloat:1,float:1};function Ct(Ae){return Ae.nodeType===1?Ae.ownerDocument.defaultView.getComputedStyle(Ae,null):{}}function Ze(Ae,te,ee){if(te=te.toLowerCase(),ee==="auto"){if(te==="height")return Ae.offsetHeight;if(te==="width")return Ae.offsetWidth}return te in De||(De[te]=ce.test(te)),De[te]?parseFloat(ee)||0:ee}function Ke(Ae,te){var ee=arguments.length,he=Ct(Ae);return te=_e[te]?"cssFloat"in Ae.style?"cssFloat":"styleFloat":te,ee===1?he:Ze(Ae,te,he[te]||Ae.style[te])}function Be(Ae,te,ee){var he=arguments.length;if(te=_e[te]?"cssFloat"in Ae.style?"cssFloat":"styleFloat":te,he===3)return typeof ee=="number"&&ce.test(te)&&(ee="".concat(ee,"px")),Ae.style[te]=ee,ee;for(var se in te)te.hasOwnProperty(se)&&Be(Ae,se,te[se]);return Ct(Ae)}function mt(Ae){return Ae===document.body?document.documentElement.clientWidth:Ae.offsetWidth}function ct(Ae){return Ae===document.body?window.innerHeight||document.documentElement.clientHeight:Ae.offsetHeight}function He(){var Ae=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),te=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:Ae,height:te}}function Et(){var Ae=document.documentElement.clientWidth,te=window.innerHeight||document.documentElement.clientHeight;return{width:Ae,height:te}}function ht(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function dt(Ae){var te=Ae.getBoundingClientRect(),ee=document.documentElement;return{left:te.left+(window.pageXOffset||ee.scrollLeft)-(ee.clientLeft||document.body.clientLeft||0),top:te.top+(window.pageYOffset||ee.scrollTop)-(ee.clientTop||document.body.clientTop||0)}}},24514:function(Pn,an,ve){"use strict";ve.d(an,{G:function(){return Ct}});var ce=ve(47273),De=function(Ke){if((0,ce.Z)()&&window.document.documentElement){var Be=Array.isArray(Ke)?Ke:[Ke],mt=window.document.documentElement;return Be.some(function(ct){return ct in mt.style})}return!1},_e=function(Ke,Be){if(!De(Ke))return!1;var mt=document.createElement("div"),ct=mt.style[Ke];return mt.style[Ke]=Be,mt.style[Ke]!==ct};function Ct(Ze,Ke){return!Array.isArray(Ze)&&Ke!==void 0?_e(Ze,Ke):De(Ze)}},24916:function(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return Vn}});var ce=ve(96663),De=ve(20135),_e=ve(44127),Ct=ve(90493),Ze=ve(72071),Ke=ve(6620),Be=ve(92310),mt=ve.n(Be),ct=ve(29301),He=ve(70425),Et=ve(34280),ht=ve(59301),dt=ve(4676),Ae=ht.forwardRef(function(Re,Ce){var Pe=Re.height,Ne=Re.offsetY,ke=Re.offsetX,Se=Re.children,nt=Re.prefixCls,Pt=Re.onInnerResize,qe=Re.innerProps,Ue=Re.rtl,St=Re.extra,vt={},lt={display:"flex",flexDirection:"column"};return Ne!==void 0&&(vt={height:Pe,position:"relative",overflow:"hidden"},lt=(0,_e.Z)((0,_e.Z)({},lt),{},(0,Ct.Z)((0,Ct.Z)((0,Ct.Z)((0,Ct.Z)((0,Ct.Z)({transform:"translateY(".concat(Ne,"px)")},Ue?"marginRight":"marginLeft",-ke),"position","absolute"),"left",0),"right",0),"top",0))),ht.createElement("div",{style:vt},ht.createElement(ct.Z,{onResize:function(un){var Xt=un.offsetHeight;Xt&&Pt&&Pt()}},ht.createElement("div",(0,ce.Z)({style:lt,className:mt()((0,Ct.Z)({},"".concat(nt,"-holder-inner"),nt)),ref:Ce},qe),Se,St)))});Ae.displayName="Filler";var te=Ae;function ee(Re){var Ce=Re.children,Pe=Re.setRef,Ne=ht.useCallback(function(ke){Pe(ke)},[]);return ht.cloneElement(Ce,{ref:Ne})}function he(Re,Ce,Pe,Ne,ke,Se,nt,Pt){var qe=Pt.getKey;return Re.slice(Ce,Pe+1).map(function(Ue,St){var vt=Ce+St,lt=nt(Ue,vt,{style:{width:Ne},offsetX:ke}),Dt=qe(Ue);return ht.createElement(ee,{key:Dt,setRef:function(Xt){return Se(Ue,Xt)}},lt)})}function se(Re,Ce,Pe,Ne){var ke=Pe-Re,Se=Ce-Pe,nt=Math.min(ke,Se)*2;if(Ne<=nt){var Pt=Math.floor(Ne/2);return Ne%2?Pe+Pt+1:Pe-Pt}return ke>Se?Pe-(Ne-Se):Pe+(Ne-ke)}function de(Re,Ce,Pe){var Ne=Re.length,ke=Ce.length,Se,nt;if(Ne===0&&ke===0)return null;Ne<ke?(Se=Re,nt=Ce):(Se=Ce,nt=Re);var Pt={__EMPTY_ITEM__:!0};function qe(un){return un!==void 0?Pe(un):Pt}for(var Ue=null,St=Math.abs(Ne-ke)!==1,vt=0;vt<nt.length;vt+=1){var lt=qe(Se[vt]),Dt=qe(nt[vt]);if(lt!==Dt){Ue=vt,St=St||lt!==qe(nt[vt+1]);break}}return Ue===null?null:{index:Ue,multiple:St}}function me(Re,Ce,Pe){var Ne=ht.useState(Re),ke=(0,Ze.Z)(Ne,2),Se=ke[0],nt=ke[1],Pt=ht.useState(null),qe=(0,Ze.Z)(Pt,2),Ue=qe[0],St=qe[1];return ht.useEffect(function(){var vt=de(Se||[],Re||[],Ce);(vt==null?void 0:vt.index)!==void 0&&(Pe==null||Pe(vt.index),St(Re[vt.index])),nt(Re)},[Re]),[Ue]}var we=ve(16089),be=(typeof navigator=="undefined"?"undefined":(0,De.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Me=be,Ie=function(Re,Ce,Pe,Ne){var ke=(0,ht.useRef)(!1),Se=(0,ht.useRef)(null);function nt(){clearTimeout(Se.current),ke.current=!0,Se.current=setTimeout(function(){ke.current=!1},50)}var Pt=(0,ht.useRef)({top:Re,bottom:Ce,left:Pe,right:Ne});return Pt.current.top=Re,Pt.current.bottom=Ce,Pt.current.left=Pe,Pt.current.right=Ne,function(qe,Ue){var St=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,vt=qe?Ue<0&&Pt.current.left||Ue>0&&Pt.current.right:Ue<0&&Pt.current.top||Ue>0&&Pt.current.bottom;return St&&vt?(clearTimeout(Se.current),ke.current=!1):(!vt||ke.current)&&nt(),!ke.current&&vt}};function ze(Re,Ce,Pe,Ne,ke,Se,nt){var Pt=(0,ht.useRef)(0),qe=(0,ht.useRef)(null),Ue=(0,ht.useRef)(null),St=(0,ht.useRef)(!1),vt=Ie(Ce,Pe,Ne,ke);function lt(bn,pn){if(we.Z.cancel(qe.current),!vt(!1,pn)){var Yn=bn;if(!Yn._virtualHandled)Yn._virtualHandled=!0;else return;Pt.current+=pn,Ue.current=pn,Me||Yn.preventDefault(),qe.current=(0,we.Z)(function(){var ai=St.current?10:1;nt(Pt.current*ai,!1),Pt.current=0})}}function Dt(bn,pn){nt(pn,!0),Me||bn.preventDefault()}var un=(0,ht.useRef)(null),Xt=(0,ht.useRef)(null);function $t(bn){if(Re){we.Z.cancel(Xt.current),Xt.current=(0,we.Z)(function(){un.current=null},2);var pn=bn.deltaX,Yn=bn.deltaY,ai=bn.shiftKey,Wn=pn,Rn=Yn;(un.current==="sx"||!un.current&&ai&&Yn&&!pn)&&(Wn=Yn,Rn=0,un.current="sx");var ii=Math.abs(Wn),pi=Math.abs(Rn);un.current===null&&(un.current=Se&&ii>pi?"x":"y"),un.current==="y"?lt(bn,Rn):Dt(bn,Wn)}}function wn(bn){Re&&(St.current=bn.detail===Ue.current)}return[$t,wn]}function et(Re,Ce,Pe,Ne){var ke=ht.useMemo(function(){return[new Map,[]]},[Re,Pe.id,Ne]),Se=(0,Ze.Z)(ke,2),nt=Se[0],Pt=Se[1],qe=function(St){var vt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:St,lt=nt.get(St),Dt=nt.get(vt);if(lt===void 0||Dt===void 0)for(var un=Re.length,Xt=Pt.length;Xt<un;Xt+=1){var $t,wn=Re[Xt],bn=Ce(wn);nt.set(bn,Xt);var pn=($t=Pe.get(bn))!==null&&$t!==void 0?$t:Ne;if(Pt[Xt]=(Pt[Xt-1]||0)+pn,bn===St&&(lt=Xt),bn===vt&&(Dt=Xt),lt!==void 0&&Dt!==void 0)break}return{top:Pt[lt-1]||0,bottom:Pt[Dt]}};return qe}var $e=ve(52884),gt=ve(95727),je=function(){function Re(){(0,$e.Z)(this,Re),(0,Ct.Z)(this,"maps",void 0),(0,Ct.Z)(this,"id",0),(0,Ct.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,gt.Z)(Re,[{key:"set",value:function(Pe,Ne){this.maps[Pe]=Ne,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}}]),Re}(),Tt=je;function Qe(Re){var Ce=parseFloat(Re);return isNaN(Ce)?0:Ce}function bt(Re,Ce,Pe){var Ne=ht.useState(0),ke=(0,Ze.Z)(Ne,2),Se=ke[0],nt=ke[1],Pt=(0,ht.useRef)(new Map),qe=(0,ht.useRef)(new Tt),Ue=(0,ht.useRef)(0);function St(){Ue.current+=1}function vt(){var Dt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;St();var un=function(){var wn=!1;Pt.current.forEach(function(bn,pn){if(bn&&bn.offsetParent){var Yn=bn.offsetHeight,ai=getComputedStyle(bn),Wn=ai.marginTop,Rn=ai.marginBottom,ii=Qe(Wn),pi=Qe(Rn),gi=Yn+ii+pi;qe.current.get(pn)!==gi&&(qe.current.set(pn,gi),wn=!0)}}),wn&&nt(function(bn){return bn+1})};if(Dt)un();else{Ue.current+=1;var Xt=Ue.current;Promise.resolve().then(function(){Xt===Ue.current&&un()})}}function lt(Dt,un){var Xt=Re(Dt),$t=Pt.current.get(Xt);un?(Pt.current.set(Xt,un),vt()):Pt.current.delete(Xt),!$t!=!un&&(un?Ce==null||Ce(Dt):Pe==null||Pe(Dt))}return(0,ht.useEffect)(function(){return St},[]),[lt,vt,qe.current,Se]}var Nt=14/15;function At(Re,Ce,Pe){var Ne=(0,ht.useRef)(!1),ke=(0,ht.useRef)(0),Se=(0,ht.useRef)(0),nt=(0,ht.useRef)(null),Pt=(0,ht.useRef)(null),qe,Ue=function(Dt){if(Ne.current){var un=Math.ceil(Dt.touches[0].pageX),Xt=Math.ceil(Dt.touches[0].pageY),$t=ke.current-un,wn=Se.current-Xt,bn=Math.abs($t)>Math.abs(wn);bn?ke.current=un:Se.current=Xt;var pn=Pe(bn,bn?$t:wn,!1,Dt);pn&&Dt.preventDefault(),clearInterval(Pt.current),pn&&(Pt.current=setInterval(function(){bn?$t*=Nt:wn*=Nt;var Yn=Math.floor(bn?$t:wn);(!Pe(bn,Yn,!0)||Math.abs(Yn)<=.1)&&clearInterval(Pt.current)},16))}},St=function(){Ne.current=!1,qe()},vt=function(Dt){qe(),Dt.touches.length===1&&!Ne.current&&(Ne.current=!0,ke.current=Math.ceil(Dt.touches[0].pageX),Se.current=Math.ceil(Dt.touches[0].pageY),nt.current=Dt.target,nt.current.addEventListener("touchmove",Ue,{passive:!1}),nt.current.addEventListener("touchend",St,{passive:!0}))};qe=function(){nt.current&&(nt.current.removeEventListener("touchmove",Ue),nt.current.removeEventListener("touchend",St))},(0,Et.Z)(function(){return Re&&Ce.current.addEventListener("touchstart",vt,{passive:!0}),function(){var lt;(lt=Ce.current)===null||lt===void 0||lt.removeEventListener("touchstart",vt),qe(),clearInterval(Pt.current)}},[Re])}function Zt(Re){return Math.floor(Math.pow(Re,.5))}function Yt(Re,Ce){var Pe="touches"in Re?Re.touches[0]:Re;return Pe[Ce?"pageX":"pageY"]-window[Ce?"scrollX":"scrollY"]}function ut(Re,Ce,Pe){ht.useEffect(function(){var Ne=Ce.current;if(Re&&Ne){var ke=!1,Se,nt,Pt=function(){we.Z.cancel(Se)},qe=function lt(){Pt(),Se=(0,we.Z)(function(){Pe(nt),lt()})},Ue=function(Dt){if(!Dt.target.draggable){var un=Dt;un._virtualHandled||(un._virtualHandled=!0,ke=!0)}},St=function(){ke=!1,Pt()},vt=function(Dt){if(ke){var un=Yt(Dt,!1),Xt=Ne.getBoundingClientRect(),$t=Xt.top,wn=Xt.bottom;if(un<=$t){var bn=$t-un;nt=-Zt(bn),qe()}else if(un>=wn){var pn=un-wn;nt=Zt(pn),qe()}else Pt()}};return Ne.addEventListener("mousedown",Ue),Ne.ownerDocument.addEventListener("mouseup",St),Ne.ownerDocument.addEventListener("mousemove",vt),function(){Ne.removeEventListener("mousedown",Ue),Ne.ownerDocument.removeEventListener("mouseup",St),Ne.ownerDocument.removeEventListener("mousemove",vt),Pt()}}},[Re])}var Ge=10;function kt(Re,Ce,Pe,Ne,ke,Se,nt,Pt){var qe=ht.useRef(),Ue=ht.useState(null),St=(0,Ze.Z)(Ue,2),vt=St[0],lt=St[1];return(0,Et.Z)(function(){if(vt&&vt.times<Ge){if(!Re.current){lt(function(ji){return(0,_e.Z)({},ji)});return}Se();var Dt=vt.targetAlign,un=vt.originAlign,Xt=vt.index,$t=vt.offset,wn=Re.current.clientHeight,bn=!1,pn=Dt,Yn=null;if(wn){for(var ai=Dt||un,Wn=0,Rn=0,ii=0,pi=Math.min(Ce.length-1,Xt),gi=0;gi<=pi;gi+=1){var Ri=ke(Ce[gi]);Rn=Wn;var Ji=Pe.get(Ri);ii=Rn+(Ji===void 0?Ne:Ji),Wn=ii}for(var Un=ai==="top"?$t:wn-$t,$n=pi;$n>=0;$n-=1){var ti=ke(Ce[$n]),Pi=Pe.get(ti);if(Pi===void 0){bn=!0;break}if(Un-=Pi,Un<=0)break}switch(ai){case"top":Yn=Rn-$t;break;case"bottom":Yn=ii-wn+$t;break;default:{var mi=Re.current.scrollTop,nr=mi+wn;Rn<mi?pn="top":ii>nr&&(pn="bottom")}}Yn!==null&&nt(Yn),Yn!==vt.lastTop&&(bn=!0)}bn&<((0,_e.Z)((0,_e.Z)({},vt),{},{times:vt.times+1,targetAlign:pn,lastTop:Yn}))}},[vt,Re.current]),function(Dt){if(Dt==null){Pt();return}if(we.Z.cancel(qe.current),typeof Dt=="number")nt(Dt);else if(Dt&&(0,De.Z)(Dt)==="object"){var un,Xt=Dt.align;"index"in Dt?un=Dt.index:un=Ce.findIndex(function(bn){return ke(bn)===Dt.key});var $t=Dt.offset,wn=$t===void 0?0:$t;lt({times:0,index:un,offset:wn,originAlign:Xt})}}}var ln=ht.forwardRef(function(Re,Ce){var Pe=Re.prefixCls,Ne=Re.rtl,ke=Re.scrollOffset,Se=Re.scrollRange,nt=Re.onStartMove,Pt=Re.onStopMove,qe=Re.onScroll,Ue=Re.horizontal,St=Re.spinSize,vt=Re.containerSize,lt=Re.style,Dt=Re.thumbStyle,un=Re.showScrollBar,Xt=ht.useState(!1),$t=(0,Ze.Z)(Xt,2),wn=$t[0],bn=$t[1],pn=ht.useState(null),Yn=(0,Ze.Z)(pn,2),ai=Yn[0],Wn=Yn[1],Rn=ht.useState(null),ii=(0,Ze.Z)(Rn,2),pi=ii[0],gi=ii[1],Ri=!Ne,Ji=ht.useRef(),Un=ht.useRef(),$n=ht.useState(un),ti=(0,Ze.Z)($n,2),Pi=ti[0],mi=ti[1],nr=ht.useRef(),ji=function(){un===!0||un===!1||(clearTimeout(nr.current),mi(!0),nr.current=setTimeout(function(){mi(!1)},3e3))},Le=Se-vt||0,si=vt-St||0,Hi=ht.useMemo(function(){if(ke===0||Le===0)return 0;var Ve=ke/Le;return Ve*si},[ke,Le,si]),hn=function(Ut){Ut.stopPropagation(),Ut.preventDefault()},ni=ht.useRef({top:Hi,dragging:wn,pageY:ai,startTop:pi});ni.current={top:Hi,dragging:wn,pageY:ai,startTop:pi};var vi=function(Ut){bn(!0),Wn(Yt(Ut,Ue)),gi(ni.current.top),nt(),Ut.stopPropagation(),Ut.preventDefault()};ht.useEffect(function(){var Ve=function(rt){rt.preventDefault()},Ut=Ji.current,tn=Un.current;return Ut.addEventListener("touchstart",Ve,{passive:!1}),tn.addEventListener("touchstart",vi,{passive:!1}),function(){Ut.removeEventListener("touchstart",Ve),tn.removeEventListener("touchstart",vi)}},[]);var Fi=ht.useRef();Fi.current=Le;var _n=ht.useRef();_n.current=si,ht.useEffect(function(){if(wn){var Ve,Ut=function(rt){var Vt=ni.current,on=Vt.dragging,xn=Vt.pageY,An=Vt.startTop;we.Z.cancel(Ve);var yt=Ji.current.getBoundingClientRect(),cn=vt/(Ue?yt.width:yt.height);if(on){var On=(Yt(rt,Ue)-xn)*cn,ri=An;!Ri&&Ue?ri-=On:ri+=On;var Wt=Fi.current,Jt=_n.current,hi=Jt?ri/Jt:0,ci=Math.ceil(hi*Wt);ci=Math.max(ci,0),ci=Math.min(ci,Wt),Ve=(0,we.Z)(function(){qe(ci,Ue)})}},tn=function(){bn(!1),Pt()};return window.addEventListener("mousemove",Ut,{passive:!0}),window.addEventListener("touchmove",Ut,{passive:!0}),window.addEventListener("mouseup",tn,{passive:!0}),window.addEventListener("touchend",tn,{passive:!0}),function(){window.removeEventListener("mousemove",Ut),window.removeEventListener("touchmove",Ut),window.removeEventListener("mouseup",tn),window.removeEventListener("touchend",tn),we.Z.cancel(Ve)}}},[wn]),ht.useEffect(function(){return ji(),function(){clearTimeout(nr.current)}},[ke]),ht.useImperativeHandle(Ce,function(){return{delayHidden:ji}});var Dn="".concat(Pe,"-scrollbar"),Ft={position:"absolute",visibility:Pi?null:"hidden"},Ot={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return Ue?(Ft.height=8,Ft.left=0,Ft.right=0,Ft.bottom=0,Ot.height="100%",Ot.width=St,Ri?Ot.left=Hi:Ot.right=Hi):(Ft.width=8,Ft.top=0,Ft.bottom=0,Ri?Ft.right=0:Ft.left=0,Ot.width="100%",Ot.height=St,Ot.top=Hi),ht.createElement("div",{ref:Ji,className:mt()(Dn,(0,Ct.Z)((0,Ct.Z)((0,Ct.Z)({},"".concat(Dn,"-horizontal"),Ue),"".concat(Dn,"-vertical"),!Ue),"".concat(Dn,"-visible"),Pi)),style:(0,_e.Z)((0,_e.Z)({},Ft),lt),onMouseDown:hn,onMouseMove:ji},ht.createElement("div",{ref:Un,className:mt()("".concat(Dn,"-thumb"),(0,Ct.Z)({},"".concat(Dn,"-thumb-moving"),wn)),style:(0,_e.Z)((0,_e.Z)({},Ot),Dt),onMouseDown:vi}))}),sn=ln,Bt=20;function Gt(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Pe=Re/Ce*Re;return isNaN(Pe)&&(Pe=0),Pe=Math.max(Pe,Bt),Math.floor(Pe)}var en=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Bn=[],rn={overflowY:"auto",overflowAnchor:"none"};function Cn(Re,Ce){var Pe=Re.prefixCls,Ne=Pe===void 0?"rc-virtual-list":Pe,ke=Re.className,Se=Re.height,nt=Re.itemHeight,Pt=Re.fullHeight,qe=Pt===void 0?!0:Pt,Ue=Re.style,St=Re.data,vt=Re.children,lt=Re.itemKey,Dt=Re.virtual,un=Re.direction,Xt=Re.scrollWidth,$t=Re.component,wn=$t===void 0?"div":$t,bn=Re.onScroll,pn=Re.onVirtualScroll,Yn=Re.onVisibleChange,ai=Re.innerProps,Wn=Re.extraRender,Rn=Re.styles,ii=Re.showScrollBar,pi=ii===void 0?"optional":ii,gi=(0,Ke.Z)(Re,en),Ri=ht.useCallback(function(Or){return typeof lt=="function"?lt(Or):Or==null?void 0:Or[lt]},[lt]),Ji=bt(Ri,null,null),Un=(0,Ze.Z)(Ji,4),$n=Un[0],ti=Un[1],Pi=Un[2],mi=Un[3],nr=!!(Dt!==!1&&Se&&nt),ji=ht.useMemo(function(){return Object.values(Pi.maps).reduce(function(Or,kr){return Or+kr},0)},[Pi.id,Pi.maps]),Le=nr&&St&&(Math.max(nt*St.length,ji)>Se||!!Xt),si=un==="rtl",Hi=mt()(Ne,(0,Ct.Z)({},"".concat(Ne,"-rtl"),si),ke),hn=St||Bn,ni=(0,ht.useRef)(),vi=(0,ht.useRef)(),Fi=(0,ht.useRef)(),_n=(0,ht.useState)(0),Dn=(0,Ze.Z)(_n,2),Ft=Dn[0],Ot=Dn[1],Ve=(0,ht.useState)(0),Ut=(0,Ze.Z)(Ve,2),tn=Ut[0],xt=Ut[1],rt=(0,ht.useState)(!1),Vt=(0,Ze.Z)(rt,2),on=Vt[0],xn=Vt[1],An=function(){xn(!0)},yt=function(){xn(!1)},cn={getKey:Ri};function On(Or){Ot(function(kr){var fo;typeof Or=="function"?fo=Or(kr):fo=Or;var jr=Gi(fo);return ni.current.scrollTop=jr,jr})}var ri=(0,ht.useRef)({start:0,end:hn.length}),Wt=(0,ht.useRef)(),Jt=me(hn,Ri),hi=(0,Ze.Z)(Jt,1),ci=hi[0];Wt.current=ci;var ui=ht.useMemo(function(){if(!nr)return{scrollHeight:void 0,start:0,end:hn.length-1,offset:void 0};if(!Le){var Or;return{scrollHeight:((Or=vi.current)===null||Or===void 0?void 0:Or.offsetHeight)||0,start:0,end:hn.length-1,offset:void 0}}for(var kr=0,fo,jr,To,qa=hn.length,Mr=0;Mr<qa;Mr+=1){var hr=hn[Mr],Xn=Ri(hr),yr=Pi.get(Xn),wo=kr+(yr===void 0?nt:yr);wo>=Ft&&fo===void 0&&(fo=Mr,jr=kr),wo>Ft+Se&&To===void 0&&(To=Mr),kr=wo}return fo===void 0&&(fo=0,jr=0,To=Math.ceil(Se/nt)),To===void 0&&(To=hn.length-1),To=Math.min(To+1,hn.length-1),{scrollHeight:kr,start:fo,end:To,offset:jr}},[Le,nr,Ft,hn,mi,Se]),qn=ui.scrollHeight,di=ui.start,li=ui.end,Ai=ui.offset;ri.current.start=di,ri.current.end=li,ht.useLayoutEffect(function(){var Or=Pi.getRecord();if(Or.size===1){var kr=Array.from(Or)[0],fo=hn[di];if(fo){var jr=Ri(fo);if(jr===kr){var To=Pi.get(kr),qa=To-nt;On(function(Mr){return Mr+qa})}}}Pi.resetRecord()},[qn]);var er=ht.useState({width:0,height:Se}),sr=(0,Ze.Z)(er,2),vn=sr[0],Nr=sr[1],Dr=function(kr){Nr({width:kr.offsetWidth,height:kr.offsetHeight})},ir=(0,ht.useRef)(),fn=(0,ht.useRef)(),jn=ht.useMemo(function(){return Gt(vn.width,Xt)},[vn.width,Xt]),Ei=ht.useMemo(function(){return Gt(vn.height,qn)},[vn.height,qn]),zi=qn-Se,Ni=(0,ht.useRef)(zi);Ni.current=zi;function Gi(Or){var kr=Or;return Number.isNaN(Ni.current)||(kr=Math.min(kr,Ni.current)),kr=Math.max(kr,0),kr}var ur=Ft<=0,Qi=Ft>=zi,rr=tn<=0,fr=tn>=Xt,Nn=Ie(ur,Qi,rr,fr),Jr=function(){return{x:si?-tn:tn,y:Ft}},Ln=(0,ht.useRef)(Jr()),Zr=(0,He.useEvent)(function(Or){if(pn){var kr=(0,_e.Z)((0,_e.Z)({},Jr()),Or);(Ln.current.x!==kr.x||Ln.current.y!==kr.y)&&(pn(kr),Ln.current=kr)}});function co(Or,kr){var fo=Or;kr?((0,dt.flushSync)(function(){xt(fo)}),Zr()):On(fo)}function Bi(Or){var kr=Or.currentTarget.scrollTop;kr!==Ft&&On(kr),bn==null||bn(Or),Zr()}var Po=function(kr){var fo=kr,jr=Xt?Xt-vn.width:0;return fo=Math.max(fo,0),fo=Math.min(fo,jr),fo},ao=(0,He.useEvent)(function(Or,kr){kr?((0,dt.flushSync)(function(){xt(function(fo){var jr=fo+(si?-Or:Or);return Po(jr)})}),Zr()):On(function(fo){var jr=fo+Or;return jr})}),Vi=ze(nr,ur,Qi,rr,fr,!!Xt,ao),qi=(0,Ze.Z)(Vi,2),Hr=qi[0],ro=qi[1];At(nr,ni,function(Or,kr,fo,jr){var To=jr;return Nn(Or,kr,fo)?!1:!To||!To._virtualHandled?(To&&(To._virtualHandled=!0),Hr({preventDefault:function(){},deltaX:Or?kr:0,deltaY:Or?0:kr}),!0):!1}),ut(Le,ni,function(Or){On(function(kr){return kr+Or})}),(0,Et.Z)(function(){function Or(fo){var jr=ur&&fo.detail<0,To=Qi&&fo.detail>0;nr&&!jr&&!To&&fo.preventDefault()}var kr=ni.current;return kr.addEventListener("wheel",Hr,{passive:!1}),kr.addEventListener("DOMMouseScroll",ro,{passive:!0}),kr.addEventListener("MozMousePixelScroll",Or,{passive:!1}),function(){kr.removeEventListener("wheel",Hr),kr.removeEventListener("DOMMouseScroll",ro),kr.removeEventListener("MozMousePixelScroll",Or)}},[nr,ur,Qi]),(0,Et.Z)(function(){if(Xt){var Or=Po(tn);xt(Or),Zr({x:Or})}},[vn.width,Xt]);var xi=function(){var kr,fo;(kr=ir.current)===null||kr===void 0||kr.delayHidden(),(fo=fn.current)===null||fo===void 0||fo.delayHidden()},tt=kt(ni,hn,Pi,nt,Ri,function(){return ti(!0)},On,xi);ht.useImperativeHandle(Ce,function(){return{nativeElement:Fi.current,getScrollInfo:Jr,scrollTo:function(kr){function fo(jr){return jr&&(0,De.Z)(jr)==="object"&&("left"in jr||"top"in jr)}fo(kr)?(kr.left!==void 0&&xt(Po(kr.left)),tt(kr.top)):tt(kr)}}}),(0,Et.Z)(function(){if(Yn){var Or=hn.slice(di,li+1);Yn(Or,hn)}},[di,li,hn]);var uo=et(hn,Ri,Pi,nt),Zo=Wn==null?void 0:Wn({start:di,end:li,virtual:Le,offsetX:tn,offsetY:Ai,rtl:si,getSize:uo}),ga=he(hn,di,li,Xt,tn,$n,vt,cn),Pa=null;Se&&(Pa=(0,_e.Z)((0,Ct.Z)({},qe?"height":"maxHeight",Se),rn),nr&&(Pa.overflowY="hidden",Xt&&(Pa.overflowX="hidden"),on&&(Pa.pointerEvents="none")));var ia={};return si&&(ia.dir="rtl"),ht.createElement("div",(0,ce.Z)({ref:Fi,style:(0,_e.Z)((0,_e.Z)({},Ue),{},{position:"relative"}),className:Hi},ia,gi),ht.createElement(ct.Z,{onResize:Dr},ht.createElement(wn,{className:"".concat(Ne,"-holder"),style:Pa,ref:ni,onScroll:Bi,onMouseEnter:xi},ht.createElement(te,{prefixCls:Ne,height:qn,offsetX:tn,offsetY:Ai,scrollWidth:Xt,onInnerResize:ti,ref:vi,innerProps:ai,rtl:si,extra:Zo},ga))),Le&&qn>Se&&ht.createElement(sn,{ref:ir,prefixCls:Ne,scrollOffset:Ft,scrollRange:qn,rtl:si,onScroll:co,onStartMove:An,onStopMove:yt,spinSize:Ei,containerSize:vn.height,style:Rn==null?void 0:Rn.verticalScrollBar,thumbStyle:Rn==null?void 0:Rn.verticalScrollBarThumb,showScrollBar:pi}),Le&&Xt>vn.width&&ht.createElement(sn,{ref:fn,prefixCls:Ne,scrollOffset:tn,scrollRange:Xt,rtl:si,onScroll:co,onStartMove:An,onStopMove:yt,spinSize:jn,containerSize:vn.width,horizontal:!0,style:Rn==null?void 0:Rn.horizontalScrollBar,thumbStyle:Rn==null?void 0:Rn.horizontalScrollBarThumb,showScrollBar:pi}))}var ft=ht.forwardRef(Cn);ft.displayName="List";var En=ft,Vn=En},32637:function(Pn,an,ve){"use strict";Pn.exports=ve.p+"static/AssistantCode3.a8740efb.jpeg"},93314:function(Pn){"use strict";Pn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},96908:function(Pn){"use strict";Pn.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(Pn){"use strict";Pn.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(Pn){"use strict";Pn.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(Pn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});const ce=ct=>typeof ct=="object"&&ct!=null&&ct.nodeType===1,De=(ct,He)=>(!He||ct!=="hidden")&&ct!=="visible"&&ct!=="clip",_e=(ct,He)=>{if(ct.clientHeight<ct.scrollHeight||ct.clientWidth<ct.scrollWidth){const Et=getComputedStyle(ct,null);return De(Et.overflowY,He)||De(Et.overflowX,He)||(ht=>{const dt=(Ae=>{if(!Ae.ownerDocument||!Ae.ownerDocument.defaultView)return null;try{return Ae.ownerDocument.defaultView.frameElement}catch(te){return null}})(ht);return!!dt&&(dt.clientHeight<ht.scrollHeight||dt.clientWidth<ht.scrollWidth)})(ct)}return!1},Ct=(ct,He,Et,ht,dt,Ae,te,ee)=>Ae<ct&&te>He||Ae>ct&&te<He?0:Ae<=ct&&ee<=Et||te>=He&&ee>=Et?Ae-ct-ht:te>He&&ee<Et||Ae<ct&&ee>Et?te-He+dt:0,Ze=ct=>{const He=ct.parentElement;return He==null?ct.getRootNode().host||null:He},Ke=(ct,He)=>{var Et,ht,dt,Ae;if(typeof document=="undefined")return[];const{scrollMode:te,block:ee,inline:he,boundary:se,skipOverflowHiddenElements:de}=He,me=typeof se=="function"?se:sn=>sn!==se;if(!ce(ct))throw new TypeError("Invalid target");const we=document.scrollingElement||document.documentElement,be=[];let Me=ct;for(;ce(Me)&&me(Me);){if(Me=Ze(Me),Me===we){be.push(Me);break}Me!=null&&Me===document.body&&_e(Me)&&!_e(document.documentElement)||Me!=null&&_e(Me,de)&&be.push(Me)}const Ie=(ht=(Et=window.visualViewport)==null?void 0:Et.width)!=null?ht:innerWidth,ze=(Ae=(dt=window.visualViewport)==null?void 0:dt.height)!=null?Ae:innerHeight,{scrollX:et,scrollY:$e}=window,{height:gt,width:je,top:Tt,right:Qe,bottom:bt,left:Nt}=ct.getBoundingClientRect(),{top:At,right:Zt,bottom:Yt,left:ut}=(sn=>{const Bt=window.getComputedStyle(sn);return{top:parseFloat(Bt.scrollMarginTop)||0,right:parseFloat(Bt.scrollMarginRight)||0,bottom:parseFloat(Bt.scrollMarginBottom)||0,left:parseFloat(Bt.scrollMarginLeft)||0}})(ct);let Ge=ee==="start"||ee==="nearest"?Tt-At:ee==="end"?bt+Yt:Tt+gt/2-At+Yt,kt=he==="center"?Nt+je/2-ut+Zt:he==="end"?Qe+Zt:Nt-ut;const ln=[];for(let sn=0;sn<be.length;sn++){const Bt=be[sn],{height:Gt,width:en,top:Bn,right:rn,bottom:Cn,left:ft}=Bt.getBoundingClientRect();if(te==="if-needed"&&Tt>=0&&Nt>=0&&bt<=ze&&Qe<=Ie&&(Bt===we&&!_e(Bt)||Tt>=Bn&&bt<=Cn&&Nt>=ft&&Qe<=rn))return ln;const En=getComputedStyle(Bt),Vn=parseInt(En.borderLeftWidth,10),Re=parseInt(En.borderTopWidth,10),Ce=parseInt(En.borderRightWidth,10),Pe=parseInt(En.borderBottomWidth,10);let Ne=0,ke=0;const Se="offsetWidth"in Bt?Bt.offsetWidth-Bt.clientWidth-Vn-Ce:0,nt="offsetHeight"in Bt?Bt.offsetHeight-Bt.clientHeight-Re-Pe:0,Pt="offsetWidth"in Bt?Bt.offsetWidth===0?0:en/Bt.offsetWidth:0,qe="offsetHeight"in Bt?Bt.offsetHeight===0?0:Gt/Bt.offsetHeight:0;if(we===Bt)Ne=ee==="start"?Ge:ee==="end"?Ge-ze:ee==="nearest"?Ct($e,$e+ze,ze,Re,Pe,$e+Ge,$e+Ge+gt,gt):Ge-ze/2,ke=he==="start"?kt:he==="center"?kt-Ie/2:he==="end"?kt-Ie:Ct(et,et+Ie,Ie,Vn,Ce,et+kt,et+kt+je,je),Ne=Math.max(0,Ne+$e),ke=Math.max(0,ke+et);else{Ne=ee==="start"?Ge-Bn-Re:ee==="end"?Ge-Cn+Pe+nt:ee==="nearest"?Ct(Bn,Cn,Gt,Re,Pe+nt,Ge,Ge+gt,gt):Ge-(Bn+Gt/2)+nt/2,ke=he==="start"?kt-ft-Vn:he==="center"?kt-(ft+en/2)+Se/2:he==="end"?kt-rn+Ce+Se:Ct(ft,rn,en,Vn,Ce+Se,kt,kt+je,je);const{scrollLeft:Ue,scrollTop:St}=Bt;Ne=qe===0?0:Math.max(0,Math.min(St+Ne/qe,Bt.scrollHeight-Gt/qe+nt)),ke=Pt===0?0:Math.max(0,Math.min(Ue+ke/Pt,Bt.scrollWidth-en/Pt+Se)),Ge+=St-Ne,kt+=Ue-ke}ln.push({el:Bt,top:Ne,left:ke})}return ln},Be=ct=>ct===!1?{block:"end",inline:"nearest"}:(He=>He===Object(He)&&Object.keys(He).length!==0)(ct)?ct:{block:"start",inline:"nearest"};function mt(ct,He){if(!ct.isConnected||!(dt=>{let Ae=dt;for(;Ae&&Ae.parentNode;){if(Ae.parentNode===document)return!0;Ae=Ae.parentNode instanceof ShadowRoot?Ae.parentNode.host:Ae.parentNode}return!1})(ct))return;const Et=(dt=>{const Ae=window.getComputedStyle(dt);return{top:parseFloat(Ae.scrollMarginTop)||0,right:parseFloat(Ae.scrollMarginRight)||0,bottom:parseFloat(Ae.scrollMarginBottom)||0,left:parseFloat(Ae.scrollMarginLeft)||0}})(ct);if((dt=>typeof dt=="object"&&typeof dt.behavior=="function")(He))return He.behavior(Ke(ct,He));const ht=typeof He=="boolean"||He==null?void 0:He.behavior;for(const{el:dt,top:Ae,left:te}of Ke(ct,Be(He))){const ee=Ae-Et.top+Et.bottom,he=te-Et.left+Et.right;dt.scroll({top:ee,left:he,behavior:ht})}}}}]);
|